]> git.sur5r.net Git - openldap/blob - configure
Always initialize back-config implicitly
[openldap] / configure
1 #! /bin/sh
2 # $OpenLDAP$
3 # from OpenLDAP: pkg/ldap/configure.in,v 1.564 2005/02/27 15:46:50 kurt Exp  
4
5 # This work is part of OpenLDAP Software <http://www.openldap.org/>.
6 #
7 # Copyright 1998-2005 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-2005 The OpenLDAP Foundation. All rights reserved."
19 echo "  Restrictions apply, see COPYRIGHT and LICENSE files."
20
21 # Guess values for system-dependent variables and create Makefiles.
22 # Generated automatically using autoconf version 2.13.1 
23 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
24 #
25 # This configure script is free software; the Free Software Foundation
26 # gives unlimited permission to copy, distribute and modify it.
27
28 # Defaults:
29 ac_help=
30 ac_default_prefix=/usr/local
31 # Any additions from configure.in:
32 ac_default_prefix=/usr/local
33 ac_help="$ac_help
34   --with-subdir=DIR       change default subdirectory used for installs"
35 ac_help="$ac_help
36   --enable-debug          enable debugging [yes]"
37 ac_help="$ac_help
38   --enable-dynamic        enable linking built binaries with dynamic libs [no]"
39 ac_help="$ac_help
40   --enable-syslog         enable syslog support [auto]"
41 ac_help="$ac_help
42   --enable-proctitle      enable proctitle support [yes]"
43 ac_help="$ac_help
44   --enable-ipv6           enable IPv6 support [auto]"
45 ac_help="$ac_help
46   --enable-local          enable AF_LOCAL (AF_UNIX) socket support [auto]"
47 ac_help="$ac_help
48   --with-cyrus-sasl       with Cyrus SASL support [auto]"
49 ac_help="$ac_help
50   --with-fetch            with fetch(3) URL support [auto]"
51 ac_help="$ac_help
52   --with-threads          with threads [auto]"
53 ac_help="$ac_help
54   --with-tls              with TLS/SSL support [auto]"
55 ac_help="$ac_help
56   --with-yielding-select  with implicitly yielding select [auto]"
57 ac_help="$ac_help
58   --with-multiple-precision
59                           multiple precision support for statistics
60                           auto|bignum|gmp [auto]"
61 ac_help="$ac_help
62
63 SLAPD (Standalone LDAP Daemon) Options:"
64 ac_help="$ac_help
65   --enable-slapd          enable building slapd [yes]"
66 ac_help="$ac_help
67     --enable-aci          enable per-object ACIs (experimental) [no]"
68 ac_help="$ac_help
69     --enable-cleartext    enable cleartext passwords [yes]"
70 ac_help="$ac_help
71     --enable-crypt        enable crypt(3) passwords [no]"
72 ac_help="$ac_help
73     --enable-lmpasswd     enable LAN Manager passwords [no]"
74 ac_help="$ac_help
75     --enable-spasswd      enable (Cyrus) SASL password verification [no]"
76 ac_help="$ac_help
77     --enable-modules      enable dynamic module support [no]"
78 ac_help="$ac_help
79     --enable-rewrite      enable DN rewriting in back-ldap and the rwm overlay [auto]"
80 ac_help="$ac_help
81     --enable-rlookups     enable reverse lookups of client hostnames [no]"
82 ac_help="$ac_help
83     --enable-slapi        enable SLAPI support (experimental) [no]"
84 ac_help="$ac_help
85     --enable-slp          enable SLPv2 support [no]"
86 ac_help="$ac_help
87     --enable-wrappers     enable tcp wrapper support [no]"
88 ac_help="$ac_help
89
90 SLAPD Backend Options:"
91 ac_help="$ac_help
92     --enable-backends     enable all available backends no|yes|mod [no]"
93 ac_help="$ac_help
94     --enable-bdb          enable Berkeley DB backend no|yes|mod [yes]"
95 ac_help="$ac_help
96     --enable-dnssrv       enable dnssrv backend no|yes|mod [no]"
97 ac_help="$ac_help
98     --enable-hdb          enable Hierarchical DB backend no|yes|mod [no]"
99 ac_help="$ac_help
100     --enable-ldap         enable ldap backend no|yes|mod [no]"
101 ac_help="$ac_help
102     --enable-ldbm         enable ldbm backend no|yes|mod [no]"
103 ac_help="$ac_help
104       --with-ldbm-api     with LDBM API auto|berkeley|bcompat|mdbm|gdbm [auto]"
105 ac_help="$ac_help
106       --with-ldbm-type    use LDBM type auto|btree|hash [auto]"
107 ac_help="$ac_help
108     --enable-meta         enable metadirectory backend no|yes|mod [no]"
109 ac_help="$ac_help
110     --enable-monitor      enable monitor backend no|yes|mod [yes]"
111 ac_help="$ac_help
112     --enable-null         enable null backend no|yes|mod [no]"
113 ac_help="$ac_help
114     --enable-passwd       enable passwd backend no|yes|mod [no]"
115 ac_help="$ac_help
116     --enable-perl         enable perl backend no|yes|mod [no]"
117 ac_help="$ac_help
118     --enable-relay        enable relay backend no|yes|mod [yes]"
119 ac_help="$ac_help
120     --enable-shell        enable shell backend no|yes|mod [no]"
121 ac_help="$ac_help
122     --enable-sql          enable sql backend no|yes|mod [no]"
123 ac_help="$ac_help
124
125 SLAPD Overlay Options:"
126 ac_help="$ac_help
127     --enable-overlays     enable all available overlays no|yes|mod [no]"
128 ac_help="$ac_help
129     --enable-denyop       Deny Operation overlay no|yes|mod [no]"
130 ac_help="$ac_help
131     --enable-dyngroup     Dynamic Group overlay no|yes|mod [no]"
132 ac_help="$ac_help
133     --enable-glue         Backend Glue overlay no|yes|mod [yes]"
134 ac_help="$ac_help
135     --enable-lastmod      Last Modification overlay no|yes|mod [no]"
136 ac_help="$ac_help
137     --enable-ppolicy      Password Policy overlay no|yes|mod [no]"
138 ac_help="$ac_help
139     --enable-proxycache   Proxy Cache overlay no|yes|mod [no]"
140 ac_help="$ac_help
141     --enable-refint       Referential Integrity overlay no|yes|mod [no]"
142 ac_help="$ac_help
143     --enable-rwm          Rewrite/Remap overlay no|yes|mod [no]"
144 ac_help="$ac_help
145     --enable-syncprov             Syncrepl Provider overlay no|yes|mod [yes]"
146 ac_help="$ac_help
147     --enable-unique       Attribute Uniqueness overlay no|yes|mod [no]"
148 ac_help="$ac_help
149
150 SLURPD (Replication Daemon) Options:"
151 ac_help="$ac_help
152   --enable-slurpd         enable building slurpd [auto]"
153 ac_help="$ac_help
154
155 Library Generation & Linking Options"
156 ac_help="$ac_help
157   --enable-static[=PKGS]  build static libraries [default=yes]"
158 ac_help="$ac_help
159   --enable-shared[=PKGS]  build shared libraries [default=yes]"
160 ac_help="$ac_help
161   --enable-fast-install[=PKGS]  optimize for fast installation [default=yes]"
162 ac_help="$ac_help
163   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]"
164
165 # Find the correct PATH separator.  Usually this is `:', but
166 # DJGPP uses `;' like DOS.
167 if test "X${PATH_SEPARATOR+set}" != Xset; then
168   UNAME=${UNAME-`uname 2>/dev/null`}
169   case X$UNAME in
170     *-DOS) lt_cv_sys_path_separator=';' ;;
171     *)     lt_cv_sys_path_separator=':' ;;
172   esac
173   PATH_SEPARATOR=$lt_cv_sys_path_separator
174 fi
175
176
177 # Check that we are running under the correct shell.
178 SHELL=${CONFIG_SHELL-/bin/sh}
179
180 case X$ECHO in
181 X*--fallback-echo)
182   # Remove one level of quotation (which was required for Make).
183   ECHO=`echo "$ECHO" | sed 's,\\\\\$\\$0,'$0','`
184   ;;
185 esac
186
187 echo=${ECHO-echo}
188 if test "X$1" = X--no-reexec; then
189   # Discard the --no-reexec flag, and continue.
190   shift
191 elif test "X$1" = X--fallback-echo; then
192   # Avoid inline document here, it may be left over
193   :
194 elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then
195   # Yippee, $echo works!
196   :
197 else
198   # Restart under the correct shell.
199   exec $SHELL "$0" --no-reexec ${1+"$@"}
200 fi
201
202 if test "X$1" = X--fallback-echo; then
203   # used as fallback echo
204   shift
205   cat <<EOF
206
207 EOF
208   exit 0
209 fi
210
211 # The HP-UX ksh and POSIX shell print the target directory to stdout
212 # if CDPATH is set.
213 if test "X${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
214
215 if test -z "$ECHO"; then
216 if test "X${echo_test_string+set}" != Xset; then
217 # find a string as large as possible, as long as the shell can cope with it
218   for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do
219     # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
220     if (echo_test_string="`eval $cmd`") 2>/dev/null &&
221        echo_test_string="`eval $cmd`" &&
222        (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
223     then
224       break
225     fi
226   done
227 fi
228
229 if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
230    echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
231    test "X$echo_testing_string" = "X$echo_test_string"; then
232   :
233 else
234   # The Solaris, AIX, and Digital Unix default echo programs unquote
235   # backslashes.  This makes it impossible to quote backslashes using
236   #   echo "$something" | sed 's/\\/\\\\/g'
237   #
238   # So, first we look for a working echo in the user's PATH.
239
240   IFS="${IFS=   }"; save_ifs="$IFS"; IFS=$PATH_SEPARATOR
241   for dir in $PATH /usr/ucb; do
242     if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
243        test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
244        echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
245        test "X$echo_testing_string" = "X$echo_test_string"; then
246       echo="$dir/echo"
247       break
248     fi
249   done
250   IFS="$save_ifs"
251
252   if test "X$echo" = Xecho; then
253     # We didn't find a better echo, so look for alternatives.
254     if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
255        echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
256        test "X$echo_testing_string" = "X$echo_test_string"; then
257       # This shell has a builtin print -r that does the trick.
258       echo='print -r'
259     elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
260          test "X$CONFIG_SHELL" != X/bin/ksh; then
261       # If we have ksh, try running configure again with it.
262       ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
263       export ORIGINAL_CONFIG_SHELL
264       CONFIG_SHELL=/bin/ksh
265       export CONFIG_SHELL
266       exec $CONFIG_SHELL "$0" --no-reexec ${1+"$@"}
267     else
268       # Try using printf.
269       echo='printf %s\n'
270       if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
271          echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
272          test "X$echo_testing_string" = "X$echo_test_string"; then
273         # Cool, printf works
274         :
275       elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` &&
276            test "X$echo_testing_string" = 'X\t' &&
277            echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
278            test "X$echo_testing_string" = "X$echo_test_string"; then
279         CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
280         export CONFIG_SHELL
281         SHELL="$CONFIG_SHELL"
282         export SHELL
283         echo="$CONFIG_SHELL $0 --fallback-echo"
284       elif echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` &&
285            test "X$echo_testing_string" = 'X\t' &&
286            echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
287            test "X$echo_testing_string" = "X$echo_test_string"; then
288         echo="$CONFIG_SHELL $0 --fallback-echo"
289       else
290         # maybe with a smaller string...
291         prev=:
292
293         for cmd in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed 50q "$0"'; do
294           if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
295           then
296             break
297           fi
298           prev="$cmd"
299         done
300
301         if test "$prev" != 'sed 50q "$0"'; then
302           echo_test_string=`eval $prev`
303           export echo_test_string
304           exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "$0" ${1+"$@"}
305         else
306           # Oops.  We lost completely, so just stick with echo.
307           echo=echo
308         fi
309       fi
310     fi
311   fi
312 fi
313 fi
314
315 # Copy echo and quote the copy suitably for passing to libtool from
316 # the Makefile, instead of quoting the original, which is used later.
317 ECHO=$echo
318 if test "X$ECHO" = "X$CONFIG_SHELL $0 --fallback-echo"; then
319    ECHO="$CONFIG_SHELL \\\$\$0 --fallback-echo"
320 fi
321
322
323 ac_help="$ac_help
324   --disable-libtool-lock  avoid locking (might break parallel builds)"
325 ac_help="$ac_help
326   --with-pic              try to use only PIC/non-PIC objects [default=use both]"
327 ac_help="$ac_help
328
329 See INSTALL file for further details."
330
331 # Initialize some variables set by options.
332 # The variables have the same names as the options, with
333 # dashes changed to underlines.
334 build=NONE
335 cache_file=./config.cache
336 exec_prefix=NONE
337 host=NONE
338 no_create=
339 nonopt=NONE
340 no_recursion=
341 prefix=NONE
342 program_prefix=NONE
343 program_suffix=NONE
344 program_transform_name=s,x,x,
345 silent=
346 site=
347 srcdir=
348 target=NONE
349 verbose=
350 x_includes=NONE
351 x_libraries=NONE
352 bindir='${exec_prefix}/bin'
353 sbindir='${exec_prefix}/sbin'
354 libexecdir='${exec_prefix}/libexec'
355 datadir='${prefix}/share'
356 sysconfdir='${prefix}/etc'
357 sharedstatedir='${prefix}/com'
358 localstatedir='${prefix}/var'
359 libdir='${exec_prefix}/lib'
360 includedir='${prefix}/include'
361 oldincludedir='/usr/include'
362 infodir='${prefix}/info'
363 mandir='${prefix}/man'
364
365 # Initialize some other variables.
366 subdirs=
367 MFLAGS= MAKEFLAGS=
368 SHELL=${CONFIG_SHELL-/bin/sh}
369 # Maximum number of lines to put in a shell here document.
370 ac_max_here_lines=12
371
372 ac_prev=
373 for ac_option
374 do
375
376   # If the previous option needs an argument, assign it.
377   if test -n "$ac_prev"; then
378     eval "$ac_prev=\$ac_option"
379     ac_prev=
380     continue
381   fi
382
383   case "$ac_option" in
384   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
385   *) ac_optarg= ;;
386   esac
387
388   # Accept the important Cygnus configure options, so we can diagnose typos.
389
390   case "$ac_option" in
391
392   -bindir | --bindir | --bindi | --bind | --bin | --bi)
393     ac_prev=bindir ;;
394   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
395     bindir="$ac_optarg" ;;
396
397   -build | --build | --buil | --bui | --bu)
398     ac_prev=build ;;
399   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
400     build="$ac_optarg" ;;
401
402   -cache-file | --cache-file | --cache-fil | --cache-fi \
403   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
404     ac_prev=cache_file ;;
405   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
406   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
407     cache_file="$ac_optarg" ;;
408
409   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
410     ac_prev=datadir ;;
411   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
412   | --da=*)
413     datadir="$ac_optarg" ;;
414
415   -disable-* | --disable-*)
416     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
417     # Reject names that are not valid shell variable names.
418     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
419       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
420     fi
421     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
422     eval "enable_${ac_feature}=no" ;;
423
424   -enable-* | --enable-*)
425     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
426     # Reject names that are not valid shell variable names.
427     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
428       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
429     fi
430     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
431     case "$ac_option" in
432       *=*) ;;
433       *) ac_optarg=yes ;;
434     esac
435     eval "enable_${ac_feature}='$ac_optarg'" ;;
436
437   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
438   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
439   | --exec | --exe | --ex)
440     ac_prev=exec_prefix ;;
441   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
442   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
443   | --exec=* | --exe=* | --ex=*)
444     exec_prefix="$ac_optarg" ;;
445
446   -gas | --gas | --ga | --g)
447     # Obsolete; use --with-gas.
448     with_gas=yes ;;
449
450   -help | --help | --hel | --he)
451     # Omit some internal or obsolete options to make the list less imposing.
452     # This message is too long to be a string in the A/UX 3.1 sh.
453     cat << EOF
454 Usage: configure [options] [host]
455 Options: [defaults in brackets after descriptions]
456 Configuration:
457   --cache-file=FILE       cache test results in FILE
458   --help                  print this message
459   --no-create             do not create output files
460   --quiet, --silent       do not print \`checking...' messages
461   --version               print the version of autoconf that created configure
462 Directory and file names:
463   --prefix=PREFIX         install architecture-independent files in PREFIX
464                           [$ac_default_prefix]
465   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
466                           [same as prefix]
467   --bindir=DIR            user executables in DIR [EPREFIX/bin]
468   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
469   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
470   --datadir=DIR           read-only architecture-independent data in DIR
471                           [PREFIX/share]
472   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
473   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
474                           [PREFIX/com]
475   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
476   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
477   --includedir=DIR        C header files in DIR [PREFIX/include]
478   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
479   --infodir=DIR           info documentation in DIR [PREFIX/info]
480   --mandir=DIR            man documentation in DIR [PREFIX/man]
481   --srcdir=DIR            find the sources in DIR [configure dir or ..]
482   --program-prefix=PREFIX prepend PREFIX to installed program names
483   --program-suffix=SUFFIX append SUFFIX to installed program names
484   --program-transform-name=PROGRAM
485                           run sed PROGRAM on installed program names
486 EOF
487     cat << EOF
488 Host type:
489   --build=BUILD           configure for building on BUILD [BUILD=HOST]
490   --host=HOST             configure for HOST [guessed]
491   --target=TARGET         configure for TARGET [TARGET=HOST]
492 Features and packages:
493   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
494   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
495   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
496   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
497   --x-includes=DIR        X include files are in DIR
498   --x-libraries=DIR       X library files are in DIR
499 EOF
500     if test -n "$ac_help"; then
501       echo "--enable and --with options recognized:$ac_help"
502     fi
503     exit 0 ;;
504
505   -host | --host | --hos | --ho)
506     ac_prev=host ;;
507   -host=* | --host=* | --hos=* | --ho=*)
508     host="$ac_optarg" ;;
509
510   -includedir | --includedir | --includedi | --included | --include \
511   | --includ | --inclu | --incl | --inc)
512     ac_prev=includedir ;;
513   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
514   | --includ=* | --inclu=* | --incl=* | --inc=*)
515     includedir="$ac_optarg" ;;
516
517   -infodir | --infodir | --infodi | --infod | --info | --inf)
518     ac_prev=infodir ;;
519   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
520     infodir="$ac_optarg" ;;
521
522   -libdir | --libdir | --libdi | --libd)
523     ac_prev=libdir ;;
524   -libdir=* | --libdir=* | --libdi=* | --libd=*)
525     libdir="$ac_optarg" ;;
526
527   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
528   | --libexe | --libex | --libe)
529     ac_prev=libexecdir ;;
530   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
531   | --libexe=* | --libex=* | --libe=*)
532     libexecdir="$ac_optarg" ;;
533
534   -localstatedir | --localstatedir | --localstatedi | --localstated \
535   | --localstate | --localstat | --localsta | --localst \
536   | --locals | --local | --loca | --loc | --lo)
537     ac_prev=localstatedir ;;
538   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
539   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
540   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
541     localstatedir="$ac_optarg" ;;
542
543   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
544     ac_prev=mandir ;;
545   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
546     mandir="$ac_optarg" ;;
547
548   -nfp | --nfp | --nf)
549     # Obsolete; use --without-fp.
550     with_fp=no ;;
551
552   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
553   | --no-cr | --no-c)
554     no_create=yes ;;
555
556   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
557   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
558     no_recursion=yes ;;
559
560   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
561   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
562   | --oldin | --oldi | --old | --ol | --o)
563     ac_prev=oldincludedir ;;
564   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
565   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
566   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
567     oldincludedir="$ac_optarg" ;;
568
569   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
570     ac_prev=prefix ;;
571   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
572     prefix="$ac_optarg" ;;
573
574   -program-prefix | --program-prefix | --program-prefi | --program-pref \
575   | --program-pre | --program-pr | --program-p)
576     ac_prev=program_prefix ;;
577   -program-prefix=* | --program-prefix=* | --program-prefi=* \
578   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
579     program_prefix="$ac_optarg" ;;
580
581   -program-suffix | --program-suffix | --program-suffi | --program-suff \
582   | --program-suf | --program-su | --program-s)
583     ac_prev=program_suffix ;;
584   -program-suffix=* | --program-suffix=* | --program-suffi=* \
585   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
586     program_suffix="$ac_optarg" ;;
587
588   -program-transform-name | --program-transform-name \
589   | --program-transform-nam | --program-transform-na \
590   | --program-transform-n | --program-transform- \
591   | --program-transform | --program-transfor \
592   | --program-transfo | --program-transf \
593   | --program-trans | --program-tran \
594   | --progr-tra | --program-tr | --program-t)
595     ac_prev=program_transform_name ;;
596   -program-transform-name=* | --program-transform-name=* \
597   | --program-transform-nam=* | --program-transform-na=* \
598   | --program-transform-n=* | --program-transform-=* \
599   | --program-transform=* | --program-transfor=* \
600   | --program-transfo=* | --program-transf=* \
601   | --program-trans=* | --program-tran=* \
602   | --progr-tra=* | --program-tr=* | --program-t=*)
603     program_transform_name="$ac_optarg" ;;
604
605   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
606   | -silent | --silent | --silen | --sile | --sil)
607     silent=yes ;;
608
609   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
610     ac_prev=sbindir ;;
611   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
612   | --sbi=* | --sb=*)
613     sbindir="$ac_optarg" ;;
614
615   -sharedstatedir | --sharedstatedir | --sharedstatedi \
616   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
617   | --sharedst | --shareds | --shared | --share | --shar \
618   | --sha | --sh)
619     ac_prev=sharedstatedir ;;
620   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
621   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
622   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
623   | --sha=* | --sh=*)
624     sharedstatedir="$ac_optarg" ;;
625
626   -site | --site | --sit)
627     ac_prev=site ;;
628   -site=* | --site=* | --sit=*)
629     site="$ac_optarg" ;;
630
631   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
632     ac_prev=srcdir ;;
633   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
634     srcdir="$ac_optarg" ;;
635
636   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
637   | --syscon | --sysco | --sysc | --sys | --sy)
638     ac_prev=sysconfdir ;;
639   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
640   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
641     sysconfdir="$ac_optarg" ;;
642
643   -target | --target | --targe | --targ | --tar | --ta | --t)
644     ac_prev=target ;;
645   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
646     target="$ac_optarg" ;;
647
648   -v | -verbose | --verbose | --verbos | --verbo | --verb)
649     verbose=yes ;;
650
651   -version | --version | --versio | --versi | --vers)
652     echo "configure generated by autoconf version 2.13.1"
653     exit 0 ;;
654
655   -with-* | --with-*)
656     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
657     # Reject names that are not valid shell variable names.
658     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
659       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
660     fi
661     ac_package=`echo $ac_package| sed 's/-/_/g'`
662     case "$ac_option" in
663       *=*) ;;
664       *) ac_optarg=yes ;;
665     esac
666     eval "with_${ac_package}='$ac_optarg'" ;;
667
668   -without-* | --without-*)
669     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
670     # Reject names that are not valid shell variable names.
671     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
672       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
673     fi
674     ac_package=`echo $ac_package| sed 's/-/_/g'`
675     eval "with_${ac_package}=no" ;;
676
677   --x)
678     # Obsolete; use --with-x.
679     with_x=yes ;;
680
681   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
682   | --x-incl | --x-inc | --x-in | --x-i)
683     ac_prev=x_includes ;;
684   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
685   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
686     x_includes="$ac_optarg" ;;
687
688   -x-libraries | --x-libraries | --x-librarie | --x-librari \
689   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
690     ac_prev=x_libraries ;;
691   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
692   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
693     x_libraries="$ac_optarg" ;;
694
695   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
696     ;;
697
698   *)
699     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
700       echo "configure: warning: $ac_option: invalid host type" 1>&2
701     fi
702     if test "x$nonopt" != xNONE; then
703       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
704     fi
705     nonopt="$ac_option"
706     ;;
707
708   esac
709 done
710
711 if test -n "$ac_prev"; then
712   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
713 fi
714
715 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
716
717 # File descriptor usage:
718 # 0 standard input
719 # 1 file creation
720 # 2 errors and warnings
721 # 3 some systems may open it to /dev/tty
722 # 4 used on the Kubota Titan
723 # 6 checking for... messages and results
724 # 5 compiler messages saved in config.log
725 if test "$silent" = yes; then
726   exec 6>/dev/null
727 else
728   exec 6>&1
729 fi
730 exec 5>./config.log
731
732 echo "\
733 This file contains any messages produced by compilers while
734 running configure, to aid debugging if configure makes a mistake.
735 " 1>&5
736
737 # Strip out --no-create and --no-recursion so they do not pile up.
738 # Also quote any args containing shell metacharacters.
739 ac_configure_args=
740 for ac_arg
741 do
742   case "$ac_arg" in
743   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
744   | --no-cr | --no-c) ;;
745   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
746   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
747   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
748   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
749   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
750   esac
751 done
752
753 # NLS nuisances.
754 # Only set these to C if already set.  These must not be set unconditionally
755 # because not all systems understand e.g. LANG=C (notably SCO).
756 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
757 # Non-C LC_CTYPE values break the ctype check.
758 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
759 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
760 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
761 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
762
763 # confdefs.h avoids OS command line length limits that DEFS can exceed.
764 rm -rf conftest* confdefs.h
765 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
766 echo > confdefs.h
767
768 # A filename unique to this package, relative to the directory that
769 # configure is in, which we can look for to find out if srcdir is correct.
770 ac_unique_file=build/version.sh
771
772 # Find the source files, if location was not specified.
773 if test -z "$srcdir"; then
774   ac_srcdir_defaulted=yes
775   # Try the directory containing this script, then its parent.
776   ac_prog=$0
777   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
778   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
779   srcdir=$ac_confdir
780   if test ! -r $srcdir/$ac_unique_file; then
781     srcdir=..
782   fi
783 else
784   ac_srcdir_defaulted=no
785 fi
786 if test ! -r $srcdir/$ac_unique_file; then
787   if test "$ac_srcdir_defaulted" = yes; then
788     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
789   else
790     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
791   fi
792 fi
793 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
794
795 # Prefer explicitly selected file to automatically selected ones.
796 if test -z "$CONFIG_SITE"; then
797   if test "x$prefix" != xNONE; then
798     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
799   else
800     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
801   fi
802 fi
803 for ac_site_file in $CONFIG_SITE; do
804   if test -r "$ac_site_file"; then
805     echo "loading site script $ac_site_file"
806     . "$ac_site_file"
807   fi
808 done
809
810
811 ac_ext=c
812 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
813 ac_cpp='$CPP $CPPFLAGS'
814 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
815 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
816 cross_compiling=$ac_cv_prog_cc_cross
817
818 ac_exeext=
819 ac_objext=o
820 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
821   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
822   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
823     ac_n= ac_c='
824 ' ac_t='        '
825   else
826     ac_n=-n ac_c= ac_t=
827   fi
828 else
829   ac_n= ac_c='\c' ac_t=
830 fi
831
832
833 # set unset (borrowed from autoconf 2.49c)
834 if (OL_FOO=OL_FOO; unset OL_FOO) >/dev/null 2>&1; then
835   ol_unset=unset
836 else
837   ol_unset=false
838 fi
839 # unset CDPATH
840 $ol_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
841
842 ac_aux_dir=
843 for ac_dir in build $srcdir/build; do
844   if test -f $ac_dir/install-sh; then
845     ac_aux_dir=$ac_dir
846     ac_install_sh="$ac_aux_dir/install-sh -c"
847     break
848   elif test -f $ac_dir/install.sh; then
849     ac_aux_dir=$ac_dir
850     ac_install_sh="$ac_aux_dir/install.sh -c"
851     break
852   elif test -f $ac_dir/shtool; then
853     ac_aux_dir=$ac_dir
854     ac_install_sh="$ac_aux_dir/shtool install -c"
855     break
856   fi
857 done
858 if test -z "$ac_aux_dir"; then
859   { echo "configure: error: can not find install-sh or install.sh in build $srcdir/build" 1>&2; exit 1; }
860 fi
861 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
862 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
863 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
864
865 eval `$ac_aux_dir/version.sh`
866 if test -z "$OL_STRING"; then
867         { echo "configure: error: could not determine version" 1>&2; exit 1; }
868 fi
869
870 if test -f "$ac_aux_dir/shtool" -a ! -d $ac_aux_dir/shtool; then
871         ac_cv_shtool="$ac_aux_dir/shtool"
872 else
873         { echo "configure: error: no shtool found in $ac_aux_dir" 1>&2; exit 1; }
874 fi
875
876 SHTOOL="$ac_cv_shtool"
877
878 TB="`$SHTOOL echo -e '%B' 2>/dev/null`"
879 TN="`$SHTOOL echo -e '%b' 2>/dev/null`"
880
881 OPENLDAP_CVS=""
882 if test -d $ac_aux_dir/CVS; then
883         OPENLDAP_CVS="(from CVS sources) "
884 fi
885
886 echo "Configuring ${TB}${OL_STRING}${TN} ${OPENLDAP_CVS}..."
887
888
889 echo $ac_n "checking host system type""... $ac_c" 1>&6
890 echo "configure:891: checking host system type" >&5
891 if test "x$ac_cv_host" = "x" || (test "x$host" != "xNONE" && test "x$host" != "x$ac_cv_host_alias"); then
892
893 # Make sure we can run config.sub.
894   if $ac_config_sub sun4 >/dev/null 2>&1; then :
895     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
896   fi
897
898   ac_cv_host_alias=$host
899   case "$ac_cv_host_alias" in
900   NONE)
901     case $nonopt in
902     NONE)
903       if ac_cv_host_alias=`$ac_config_guess`; then :
904       else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
905       fi ;;
906     *) ac_cv_host_alias=$nonopt ;;
907     esac ;;
908   esac
909
910   ac_cv_host=`$ac_config_sub $ac_cv_host_alias`
911   ac_cv_host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
912   ac_cv_host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
913   ac_cv_host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
914 else
915   echo $ac_n "(cached) $ac_c" 1>&6
916 fi
917
918 echo "$ac_t""$ac_cv_host" 1>&6
919
920 host=$ac_cv_host
921 host_alias=$ac_cv_host_alias
922 host_cpu=$ac_cv_host_cpu
923 host_vendor=$ac_cv_host_vendor
924 host_os=$ac_cv_host_os
925
926
927
928
929
930 echo $ac_n "checking target system type""... $ac_c" 1>&6
931 echo "configure:932: checking target system type" >&5
932 if test "x$ac_cv_target" = "x" || (test "x$target" != "xNONE" && test "x$target" != "x$ac_cv_target_alias"); then
933
934 # Make sure we can run config.sub.
935   if $ac_config_sub sun4 >/dev/null 2>&1; then :
936     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
937   fi
938
939   ac_cv_target_alias=$target
940   case "$ac_cv_target_alias" in
941   NONE)
942     case $nonopt in
943     NONE)
944       ac_cv_target_alias=$host_alias ;;
945
946     *) ac_cv_target_alias=$nonopt ;;
947     esac ;;
948   esac
949
950   ac_cv_target=`$ac_config_sub $ac_cv_target_alias`
951   ac_cv_target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
952   ac_cv_target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
953   ac_cv_target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
954 else
955   echo $ac_n "(cached) $ac_c" 1>&6
956 fi
957
958 echo "$ac_t""$ac_cv_target" 1>&6
959
960 target=$ac_cv_target
961 target_alias=$ac_cv_target_alias
962 target_cpu=$ac_cv_target_cpu
963 target_vendor=$ac_cv_target_vendor
964 target_os=$ac_cv_target_os
965
966
967
968
969
970 echo $ac_n "checking build system type""... $ac_c" 1>&6
971 echo "configure:972: checking build system type" >&5
972 if test "x$ac_cv_build" = "x" || (test "x$build" != "xNONE" && test "x$build" != "x$ac_cv_build_alias"); then
973
974 # Make sure we can run config.sub.
975   if $ac_config_sub sun4 >/dev/null 2>&1; then :
976     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
977   fi
978
979   ac_cv_build_alias=$build
980   case "$ac_cv_build_alias" in
981   NONE)
982     case $nonopt in
983     NONE)
984       ac_cv_build_alias=$host_alias ;;
985
986     *) ac_cv_build_alias=$nonopt ;;
987     esac ;;
988   esac
989
990   ac_cv_build=`$ac_config_sub $ac_cv_build_alias`
991   ac_cv_build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
992   ac_cv_build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
993   ac_cv_build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
994 else
995   echo $ac_n "(cached) $ac_c" 1>&6
996 fi
997
998 echo "$ac_t""$ac_cv_build" 1>&6
999
1000 build=$ac_cv_build
1001 build_alias=$ac_cv_build_alias
1002 build_cpu=$ac_cv_build_cpu
1003 build_vendor=$ac_cv_build_vendor
1004 build_os=$ac_cv_build_os
1005
1006
1007
1008
1009
1010 # Do some error checking and defaulting for the host and target type.
1011 # The inputs are:
1012 #    configure --host=HOST --target=TARGET --build=BUILD NONOPT
1013 #
1014 # The rules are:
1015 # 1. You are not allowed to specify --host, --target, and nonopt at the
1016 #    same time.
1017 # 2. Host defaults to nonopt.
1018 # 3. If nonopt is not specified, then host defaults to the current host,
1019 #    as determined by config.guess.
1020 # 4. Target and build default to nonopt.
1021 # 5. If nonopt is not specified, then target and build default to host.
1022
1023 # The aliases save the names the user supplied, while $host etc.
1024 # will get canonicalized.
1025 case $host---$target---$nonopt in
1026 NONE---*---* | *---NONE---* | *---*---NONE) ;;
1027 *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
1028 esac
1029
1030 test "$host_alias" != "$target_alias" &&
1031   test "$program_prefix$program_suffix$program_transform_name" = \
1032     NONENONEs,x,x, &&
1033   program_prefix=${target_alias}-
1034
1035
1036 # Find a good install program.  We prefer a C program (faster),
1037 # so one script is as good as another.  But avoid the broken or
1038 # incompatible versions:
1039 # SysV /etc/install, /usr/sbin/install
1040 # SunOS /usr/etc/install
1041 # IRIX /sbin/install
1042 # AIX /bin/install
1043 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
1044 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
1045 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
1046 # ./install, which can be erroneously created by make from ./install.sh.
1047 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
1048 echo "configure:1049: checking for a BSD compatible install" >&5
1049 if test -z "$INSTALL"; then
1050 if eval "test \"\${ac_cv_path_install+set}\" = set"; then
1051   echo $ac_n "(cached) $ac_c" 1>&6
1052 else
1053     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
1054   for ac_dir in $PATH; do
1055     # Account for people who put trailing slashes in PATH elements.
1056     case "$ac_dir/" in
1057     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
1058     *)
1059       # OSF1 and SCO ODT 3.0 have their own names for install.
1060       # Don't use installbsd from OSF since it installs stuff as root
1061       # by default.
1062       for ac_prog in ginstall scoinst install; do
1063         if test -f $ac_dir/$ac_prog; then
1064           if test $ac_prog = install &&
1065             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
1066             # AIX install.  It has an incompatible calling convention.
1067             :
1068           elif test $ac_prog = install &&
1069             grep pwplus $ac_dir/$ac_prog >/dev/null 2>&1; then
1070             # program-specific install script used by HP pwplus--don't use.
1071             :
1072           else
1073             ac_cv_path_install="$ac_dir/$ac_prog -c"
1074             break 2
1075           fi
1076         fi
1077       done
1078       ;;
1079     esac
1080   done
1081   IFS="$ac_save_IFS"
1082
1083 fi
1084   if test "${ac_cv_path_install+set}" = set; then
1085     INSTALL="$ac_cv_path_install"
1086   else
1087     # As a last resort, use the slow shell script.  We don't cache a
1088     # path for INSTALL within a source directory, because that will
1089     # break other packages using the cache if that directory is
1090     # removed, or if the path is relative.
1091     INSTALL="$ac_install_sh"
1092   fi
1093 fi
1094 echo "$ac_t""$INSTALL" 1>&6
1095
1096 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
1097 # It thinks the first close brace ends the variable substitution.
1098 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
1099
1100 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
1101
1102 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1103
1104 echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
1105 echo "configure:1106: checking whether build environment is sane" >&5
1106 # Just in case
1107 sleep 1
1108 echo timestamp > conftestfile
1109 # Do `set' in a subshell so we don't clobber the current shell's
1110 # arguments.  Must try -L first in case configure is actually a
1111 # symlink; some systems play weird games with the mod time of symlinks
1112 # (eg FreeBSD returns the mod time of the symlink's containing
1113 # directory).
1114 if (
1115    set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
1116    if test "$*" = "X"; then
1117       # -L didn't work.
1118       set X `ls -t $srcdir/configure conftestfile`
1119    fi
1120    if test "$*" != "X $srcdir/configure conftestfile" \
1121       && test "$*" != "X conftestfile $srcdir/configure"; then
1122
1123       # If neither matched, then we have a broken ls.  This can happen
1124       # if, for instance, CONFIG_SHELL is bash and it inherits a
1125       # broken ls alias from the environment.  This has actually
1126       # happened.  Such a system could not be considered "sane".
1127       { echo "configure: error: ls -t appears to fail.  Make sure there is not a broken
1128 alias in your environment" 1>&2; exit 1; }
1129    fi
1130
1131    test "$2" = conftestfile
1132    )
1133 then
1134    # Ok.
1135    :
1136 else
1137    { echo "configure: error: newly created file is older than distributed files!
1138 Check your system clock" 1>&2; exit 1; }
1139 fi
1140 rm -f conftest*
1141 echo "$ac_t""yes" 1>&6
1142 if test "$program_transform_name" = s,x,x,; then
1143   program_transform_name=
1144 else
1145   # Double any \ or $.  echo might interpret backslashes.
1146   cat <<\EOF_SED > conftestsed
1147 s,\\,\\\\,g; s,\$,$$,g
1148 EOF_SED
1149   program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
1150   rm -f conftestsed
1151 fi
1152 test "$program_prefix" != NONE &&
1153   program_transform_name="s,^,${program_prefix},;$program_transform_name"
1154 # Use a double $ so make ignores it.
1155 test "$program_suffix" != NONE &&
1156   program_transform_name="s,\$\$,${program_suffix},;$program_transform_name"
1157
1158 # sed with no file args requires a program.
1159 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
1160
1161 for ac_prog in mawk gawk nawk awk
1162 do
1163 # Extract the first word of "$ac_prog", so it can be a program name with args.
1164 set dummy $ac_prog; ac_word=$2
1165 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1166 echo "configure:1167: checking for $ac_word" >&5
1167 if eval "test \"\${ac_cv_prog_AWK+set}\" = set"; then
1168   echo $ac_n "(cached) $ac_c" 1>&6
1169 else
1170   if test -n "$AWK"; then
1171   ac_cv_prog_AWK="$AWK" # Let the user override the test.
1172 else
1173   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1174   ac_dummy="$PATH"
1175   for ac_dir in $ac_dummy; do
1176     test -z "$ac_dir" && ac_dir=.
1177     if test -f $ac_dir/$ac_word; then
1178       ac_cv_prog_AWK="$ac_prog"
1179       break
1180     fi
1181   done
1182   IFS="$ac_save_ifs"
1183 fi
1184 fi
1185 AWK="$ac_cv_prog_AWK"
1186 if test -n "$AWK"; then
1187   echo "$ac_t""$AWK" 1>&6
1188 else
1189   echo "$ac_t""no" 1>&6
1190 fi
1191
1192 test -n "$AWK" && break
1193 done
1194
1195 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
1196 echo "configure:1197: checking whether ${MAKE-make} sets \${MAKE}" >&5
1197 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
1198 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
1199   echo $ac_n "(cached) $ac_c" 1>&6
1200 else
1201   cat > conftestmake <<\EOF
1202 all:
1203         @echo 'ac_maketemp="${MAKE}"'
1204 EOF
1205 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
1206 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
1207 if test -n "$ac_maketemp"; then
1208   eval ac_cv_prog_make_${ac_make}_set=yes
1209 else
1210   eval ac_cv_prog_make_${ac_make}_set=no
1211 fi
1212 rm -f conftestmake
1213 fi
1214 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
1215   echo "$ac_t""yes" 1>&6
1216   SET_MAKE=
1217 else
1218   echo "$ac_t""no" 1>&6
1219   SET_MAKE="MAKE=${MAKE-make}"
1220 fi
1221
1222
1223
1224 PACKAGE=$OL_PACKAGE
1225
1226 VERSION=$OL_VERSION
1227
1228 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
1229   { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
1230 fi
1231
1232
1233
1234 missing_dir=`cd $ac_aux_dir && pwd`
1235 echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
1236 echo "configure:1237: checking for working aclocal" >&5
1237 # Run test in a subshell; some versions of sh will print an error if
1238 # an executable is not found, even if stderr is redirected.
1239 # Redirect stdin to placate older versions of autoconf.  Sigh.
1240 if (aclocal --version) < /dev/null > /dev/null 2>&1; then
1241    ACLOCAL=aclocal
1242    echo "$ac_t""found" 1>&6
1243 else
1244    ACLOCAL="$missing_dir/missing aclocal"
1245    echo "$ac_t""missing" 1>&6
1246 fi
1247
1248 echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
1249 echo "configure:1250: checking for working autoconf" >&5
1250 # Run test in a subshell; some versions of sh will print an error if
1251 # an executable is not found, even if stderr is redirected.
1252 # Redirect stdin to placate older versions of autoconf.  Sigh.
1253 if (autoconf --version) < /dev/null > /dev/null 2>&1; then
1254    AUTOCONF=autoconf
1255    echo "$ac_t""found" 1>&6
1256 else
1257    AUTOCONF="$missing_dir/missing autoconf"
1258    echo "$ac_t""missing" 1>&6
1259 fi
1260
1261 echo $ac_n "checking for working automake""... $ac_c" 1>&6
1262 echo "configure:1263: checking for working automake" >&5
1263 # Run test in a subshell; some versions of sh will print an error if
1264 # an executable is not found, even if stderr is redirected.
1265 # Redirect stdin to placate older versions of autoconf.  Sigh.
1266 if (automake --version) < /dev/null > /dev/null 2>&1; then
1267    AUTOMAKE=automake
1268    echo "$ac_t""found" 1>&6
1269 else
1270    AUTOMAKE="$missing_dir/missing automake"
1271    echo "$ac_t""missing" 1>&6
1272 fi
1273
1274 echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
1275 echo "configure:1276: checking for working autoheader" >&5
1276 # Run test in a subshell; some versions of sh will print an error if
1277 # an executable is not found, even if stderr is redirected.
1278 # Redirect stdin to placate older versions of autoconf.  Sigh.
1279 if (autoheader --version) < /dev/null > /dev/null 2>&1; then
1280    AUTOHEADER=autoheader
1281    echo "$ac_t""found" 1>&6
1282 else
1283    AUTOHEADER="$missing_dir/missing autoheader"
1284    echo "$ac_t""missing" 1>&6
1285 fi
1286
1287 echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
1288 echo "configure:1289: checking for working makeinfo" >&5
1289 # Run test in a subshell; some versions of sh will print an error if
1290 # an executable is not found, even if stderr is redirected.
1291 # Redirect stdin to placate older versions of autoconf.  Sigh.
1292 if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
1293    MAKEINFO=makeinfo
1294    echo "$ac_t""found" 1>&6
1295 else
1296    MAKEINFO="$missing_dir/missing makeinfo"
1297    echo "$ac_t""missing" 1>&6
1298 fi
1299
1300 install_sh="$missing_dir/install-sh"
1301 test -f "$install_sh" || install_sh="$missing_dir/install.sh"
1302
1303 for ac_prog in gnutar gtar tar
1304 do
1305 # Extract the first word of "$ac_prog", so it can be a program name with args.
1306 set dummy $ac_prog; ac_word=$2
1307 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1308 echo "configure:1309: checking for $ac_word" >&5
1309 if eval "test \"\${ac_cv_prog_AMTAR+set}\" = set"; then
1310   echo $ac_n "(cached) $ac_c" 1>&6
1311 else
1312   if test -n "$AMTAR"; then
1313   ac_cv_prog_AMTAR="$AMTAR" # Let the user override the test.
1314 else
1315   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1316   ac_dummy="$PATH"
1317   for ac_dir in $ac_dummy; do
1318     test -z "$ac_dir" && ac_dir=.
1319     if test -f $ac_dir/$ac_word; then
1320       ac_cv_prog_AMTAR="$ac_prog"
1321       break
1322     fi
1323   done
1324   IFS="$ac_save_ifs"
1325 fi
1326 fi
1327 AMTAR="$ac_cv_prog_AMTAR"
1328 if test -n "$AMTAR"; then
1329   echo "$ac_t""$AMTAR" 1>&6
1330 else
1331   echo "$ac_t""no" 1>&6
1332 fi
1333
1334 test -n "$AMTAR" && break
1335 done
1336
1337
1338 AMTARFLAGS=
1339 if test -n "$AMTAR"; then
1340   if $SHELL -c "$AMTAR --version" > /dev/null 2>&1; then
1341         AMTARFLAGS=o
1342   fi
1343 fi
1344
1345 cat >> confdefs.h <<EOF
1346 #define OPENLDAP_PACKAGE "$PACKAGE"
1347 EOF
1348
1349 cat >> confdefs.h <<EOF
1350 #define OPENLDAP_VERSION "$VERSION"
1351 EOF
1352
1353
1354 cat >> confdefs.h <<EOF
1355 #define LDAP_VENDOR_VERSION $OL_API_INC
1356 EOF
1357
1358 cat >> confdefs.h <<EOF
1359 #define LDAP_VENDOR_VERSION_MAJOR $OL_MAJOR
1360 EOF
1361
1362 cat >> confdefs.h <<EOF
1363 #define LDAP_VENDOR_VERSION_MINOR $OL_MINOR
1364 EOF
1365
1366 cat >> confdefs.h <<EOF
1367 #define LDAP_VENDOR_VERSION_PATCH $OL_PATCH
1368 EOF
1369
1370
1371 OPENLDAP_LIBRELEASE=$OL_API_LIB_RELEASE
1372
1373 OPENLDAP_LIBVERSION=$OL_API_LIB_VERSION
1374
1375 OPENLDAP_RELEASE_DATE="$OL_RELEASE_DATE"
1376
1377
1378
1379 echo $ac_n "checking configure arguments""... $ac_c" 1>&6
1380 echo "configure:1381: checking configure arguments" >&5
1381
1382
1383 top_builddir=`pwd`
1384
1385 ldap_subdir="/openldap"
1386
1387 # Check whether --with-subdir or --without-subdir was given.
1388 if test "${with_subdir+set}" = set; then
1389   withval="$with_subdir"
1390   case "$withval" in
1391         no) ldap_subdir=""
1392                 ;;
1393         yes)
1394                 ;;
1395         /*|\\*)
1396                 ldap_subdir="$withval"
1397                 ;;
1398         *)
1399                 ldap_subdir="/$withval"
1400                 ;;
1401 esac
1402
1403 fi
1404
1405
1406 # OpenLDAP --enable-debug
1407         # Check whether --enable-debug or --disable-debug was given.
1408 if test "${enable_debug+set}" = set; then
1409   enableval="$enable_debug"
1410   
1411         ol_arg=invalid
1412         for ol_val in auto yes no ; do
1413                 if test "$enableval" = "$ol_val" ; then
1414                         ol_arg="$ol_val"
1415                 fi
1416         done
1417         if test "$ol_arg" = "invalid" ; then
1418                 { echo "configure: error: bad value $enableval for --enable-debug" 1>&2; exit 1; }
1419         fi
1420         ol_enable_debug="$ol_arg"
1421
1422 else
1423         ol_enable_debug="yes"
1424 fi
1425 # end --enable-debug
1426 # OpenLDAP --enable-dynamic
1427         # Check whether --enable-dynamic or --disable-dynamic was given.
1428 if test "${enable_dynamic+set}" = set; then
1429   enableval="$enable_dynamic"
1430   
1431         ol_arg=invalid
1432         for ol_val in auto yes no ; do
1433                 if test "$enableval" = "$ol_val" ; then
1434                         ol_arg="$ol_val"
1435                 fi
1436         done
1437         if test "$ol_arg" = "invalid" ; then
1438                 { echo "configure: error: bad value $enableval for --enable-dynamic" 1>&2; exit 1; }
1439         fi
1440         ol_enable_dynamic="$ol_arg"
1441
1442 else
1443         ol_enable_dynamic="no"
1444 fi
1445 # end --enable-dynamic
1446 # OpenLDAP --enable-syslog
1447         # Check whether --enable-syslog or --disable-syslog was given.
1448 if test "${enable_syslog+set}" = set; then
1449   enableval="$enable_syslog"
1450   
1451         ol_arg=invalid
1452         for ol_val in auto yes no ; do
1453                 if test "$enableval" = "$ol_val" ; then
1454                         ol_arg="$ol_val"
1455                 fi
1456         done
1457         if test "$ol_arg" = "invalid" ; then
1458                 { echo "configure: error: bad value $enableval for --enable-syslog" 1>&2; exit 1; }
1459         fi
1460         ol_enable_syslog="$ol_arg"
1461
1462 else
1463         ol_enable_syslog="auto"
1464 fi
1465 # end --enable-syslog
1466 # OpenLDAP --enable-proctitle
1467         # Check whether --enable-proctitle or --disable-proctitle was given.
1468 if test "${enable_proctitle+set}" = set; then
1469   enableval="$enable_proctitle"
1470   
1471         ol_arg=invalid
1472         for ol_val in auto yes no ; do
1473                 if test "$enableval" = "$ol_val" ; then
1474                         ol_arg="$ol_val"
1475                 fi
1476         done
1477         if test "$ol_arg" = "invalid" ; then
1478                 { echo "configure: error: bad value $enableval for --enable-proctitle" 1>&2; exit 1; }
1479         fi
1480         ol_enable_proctitle="$ol_arg"
1481
1482 else
1483         ol_enable_proctitle="yes"
1484 fi
1485 # end --enable-proctitle
1486 ol_enable_referrals=${ol_enable_referrals-no}
1487 ol_enable_kbind=${ol_enable_kbind-no}
1488 # OpenLDAP --enable-ipv6
1489         # Check whether --enable-ipv6 or --disable-ipv6 was given.
1490 if test "${enable_ipv6+set}" = set; then
1491   enableval="$enable_ipv6"
1492   
1493         ol_arg=invalid
1494         for ol_val in auto yes no ; do
1495                 if test "$enableval" = "$ol_val" ; then
1496                         ol_arg="$ol_val"
1497                 fi
1498         done
1499         if test "$ol_arg" = "invalid" ; then
1500                 { echo "configure: error: bad value $enableval for --enable-ipv6" 1>&2; exit 1; }
1501         fi
1502         ol_enable_ipv6="$ol_arg"
1503
1504 else
1505         ol_enable_ipv6="auto"
1506 fi
1507 # end --enable-ipv6
1508 # OpenLDAP --enable-local
1509         # Check whether --enable-local or --disable-local was given.
1510 if test "${enable_local+set}" = set; then
1511   enableval="$enable_local"
1512   
1513         ol_arg=invalid
1514         for ol_val in auto yes no ; do
1515                 if test "$enableval" = "$ol_val" ; then
1516                         ol_arg="$ol_val"
1517                 fi
1518         done
1519         if test "$ol_arg" = "invalid" ; then
1520                 { echo "configure: error: bad value $enableval for --enable-local" 1>&2; exit 1; }
1521         fi
1522         ol_enable_local="$ol_arg"
1523
1524 else
1525         ol_enable_local="auto"
1526 fi
1527 # end --enable-local
1528
1529
1530 # OpenLDAP --with-cyrus_sasl
1531         # Check whether --with-cyrus_sasl or --without-cyrus_sasl was given.
1532 if test "${with_cyrus_sasl+set}" = set; then
1533   withval="$with_cyrus_sasl"
1534   
1535         ol_arg=invalid
1536         for ol_val in auto yes no  ; do
1537                 if test "$withval" = "$ol_val" ; then
1538                         ol_arg="$ol_val"
1539                 fi
1540         done
1541         if test "$ol_arg" = "invalid" ; then
1542                 { echo "configure: error: bad value $withval for --with-cyrus_sasl" 1>&2; exit 1; }
1543         fi
1544         ol_with_cyrus_sasl="$ol_arg"
1545
1546 else
1547         ol_with_cyrus_sasl="auto"
1548 fi
1549 # end --with-cyrus_sasl
1550
1551 # OpenLDAP --with-fetch
1552         # Check whether --with-fetch or --without-fetch was given.
1553 if test "${with_fetch+set}" = set; then
1554   withval="$with_fetch"
1555   
1556         ol_arg=invalid
1557         for ol_val in auto yes no  ; do
1558                 if test "$withval" = "$ol_val" ; then
1559                         ol_arg="$ol_val"
1560                 fi
1561         done
1562         if test "$ol_arg" = "invalid" ; then
1563                 { echo "configure: error: bad value $withval for --with-fetch" 1>&2; exit 1; }
1564         fi
1565         ol_with_fetch="$ol_arg"
1566
1567 else
1568         ol_with_fetch="auto"
1569 fi
1570 # end --with-fetch
1571
1572 ol_with_kerberos=${ol_with_kerberos-auto}
1573 # OpenLDAP --with-threads
1574         # Check whether --with-threads or --without-threads was given.
1575 if test "${with_threads+set}" = set; then
1576   withval="$with_threads"
1577   
1578         ol_arg=invalid
1579         for ol_val in auto nt posix mach pth lwp yes no manual  ; do
1580                 if test "$withval" = "$ol_val" ; then
1581                         ol_arg="$ol_val"
1582                 fi
1583         done
1584         if test "$ol_arg" = "invalid" ; then
1585                 { echo "configure: error: bad value $withval for --with-threads" 1>&2; exit 1; }
1586         fi
1587         ol_with_threads="$ol_arg"
1588
1589 else
1590         ol_with_threads="auto"
1591 fi
1592 # end --with-threads
1593
1594 # OpenLDAP --with-tls
1595         # Check whether --with-tls or --without-tls was given.
1596 if test "${with_tls+set}" = set; then
1597   withval="$with_tls"
1598   
1599         ol_arg=invalid
1600         for ol_val in auto ssleay openssl yes no  ; do
1601                 if test "$withval" = "$ol_val" ; then
1602                         ol_arg="$ol_val"
1603                 fi
1604         done
1605         if test "$ol_arg" = "invalid" ; then
1606                 { echo "configure: error: bad value $withval for --with-tls" 1>&2; exit 1; }
1607         fi
1608         ol_with_tls="$ol_arg"
1609
1610 else
1611         ol_with_tls="auto"
1612 fi
1613 # end --with-tls
1614
1615 # OpenLDAP --with-yielding_select
1616         # Check whether --with-yielding_select or --without-yielding_select was given.
1617 if test "${with_yielding_select+set}" = set; then
1618   withval="$with_yielding_select"
1619   
1620         ol_arg=invalid
1621         for ol_val in auto yes no manual  ; do
1622                 if test "$withval" = "$ol_val" ; then
1623                         ol_arg="$ol_val"
1624                 fi
1625         done
1626         if test "$ol_arg" = "invalid" ; then
1627                 { echo "configure: error: bad value $withval for --with-yielding_select" 1>&2; exit 1; }
1628         fi
1629         ol_with_yielding_select="$ol_arg"
1630
1631 else
1632         ol_with_yielding_select="auto"
1633 fi
1634 # end --with-yielding_select
1635
1636 # OpenLDAP --with-multiple_precision
1637         # Check whether --with-multiple_precision or --without-multiple_precision was given.
1638 if test "${with_multiple_precision+set}" = set; then
1639   withval="$with_multiple_precision"
1640   
1641         ol_arg=invalid
1642         for ol_val in auto bignum gmp yes no  ; do
1643                 if test "$withval" = "$ol_val" ; then
1644                         ol_arg="$ol_val"
1645                 fi
1646         done
1647         if test "$ol_arg" = "invalid" ; then
1648                 { echo "configure: error: bad value $withval for --with-multiple_precision" 1>&2; exit 1; }
1649         fi
1650         ol_with_multiple_precision="$ol_arg"
1651
1652 else
1653         ol_with_multiple_precision="auto"
1654 fi
1655 # end --with-multiple_precision
1656
1657
1658
1659 # Check whether --with-xxslapdoptions or --without-xxslapdoptions was given.
1660 if test "${with_xxslapdoptions+set}" = set; then
1661   withval="$with_xxslapdoptions"
1662   :
1663 fi
1664
1665 # OpenLDAP --enable-slapd
1666         # Check whether --enable-slapd or --disable-slapd was given.
1667 if test "${enable_slapd+set}" = set; then
1668   enableval="$enable_slapd"
1669   
1670         ol_arg=invalid
1671         for ol_val in auto yes no ; do
1672                 if test "$enableval" = "$ol_val" ; then
1673                         ol_arg="$ol_val"
1674                 fi
1675         done
1676         if test "$ol_arg" = "invalid" ; then
1677                 { echo "configure: error: bad value $enableval for --enable-slapd" 1>&2; exit 1; }
1678         fi
1679         ol_enable_slapd="$ol_arg"
1680
1681 else
1682         ol_enable_slapd="yes"
1683 fi
1684 # end --enable-slapd
1685 # OpenLDAP --enable-aci
1686         # Check whether --enable-aci or --disable-aci was given.
1687 if test "${enable_aci+set}" = set; then
1688   enableval="$enable_aci"
1689   
1690         ol_arg=invalid
1691         for ol_val in auto yes no ; do
1692                 if test "$enableval" = "$ol_val" ; then
1693                         ol_arg="$ol_val"
1694                 fi
1695         done
1696         if test "$ol_arg" = "invalid" ; then
1697                 { echo "configure: error: bad value $enableval for --enable-aci" 1>&2; exit 1; }
1698         fi
1699         ol_enable_aci="$ol_arg"
1700
1701 else
1702         ol_enable_aci="no"
1703 fi
1704 # end --enable-aci
1705 # OpenLDAP --enable-cleartext
1706         # Check whether --enable-cleartext or --disable-cleartext was given.
1707 if test "${enable_cleartext+set}" = set; then
1708   enableval="$enable_cleartext"
1709   
1710         ol_arg=invalid
1711         for ol_val in auto yes no ; do
1712                 if test "$enableval" = "$ol_val" ; then
1713                         ol_arg="$ol_val"
1714                 fi
1715         done
1716         if test "$ol_arg" = "invalid" ; then
1717                 { echo "configure: error: bad value $enableval for --enable-cleartext" 1>&2; exit 1; }
1718         fi
1719         ol_enable_cleartext="$ol_arg"
1720
1721 else
1722         ol_enable_cleartext="yes"
1723 fi
1724 # end --enable-cleartext
1725 # OpenLDAP --enable-crypt
1726         # Check whether --enable-crypt or --disable-crypt was given.
1727 if test "${enable_crypt+set}" = set; then
1728   enableval="$enable_crypt"
1729   
1730         ol_arg=invalid
1731         for ol_val in auto yes no ; do
1732                 if test "$enableval" = "$ol_val" ; then
1733                         ol_arg="$ol_val"
1734                 fi
1735         done
1736         if test "$ol_arg" = "invalid" ; then
1737                 { echo "configure: error: bad value $enableval for --enable-crypt" 1>&2; exit 1; }
1738         fi
1739         ol_enable_crypt="$ol_arg"
1740
1741 else
1742         ol_enable_crypt="no"
1743 fi
1744 # end --enable-crypt
1745 # OpenLDAP --enable-lmpasswd
1746         # Check whether --enable-lmpasswd or --disable-lmpasswd was given.
1747 if test "${enable_lmpasswd+set}" = set; then
1748   enableval="$enable_lmpasswd"
1749   
1750         ol_arg=invalid
1751         for ol_val in auto yes no ; do
1752                 if test "$enableval" = "$ol_val" ; then
1753                         ol_arg="$ol_val"
1754                 fi
1755         done
1756         if test "$ol_arg" = "invalid" ; then
1757                 { echo "configure: error: bad value $enableval for --enable-lmpasswd" 1>&2; exit 1; }
1758         fi
1759         ol_enable_lmpasswd="$ol_arg"
1760
1761 else
1762         ol_enable_lmpasswd="no"
1763 fi
1764 # end --enable-lmpasswd
1765 # OpenLDAP --enable-spasswd
1766         # Check whether --enable-spasswd or --disable-spasswd was given.
1767 if test "${enable_spasswd+set}" = set; then
1768   enableval="$enable_spasswd"
1769   
1770         ol_arg=invalid
1771         for ol_val in auto yes no ; do
1772                 if test "$enableval" = "$ol_val" ; then
1773                         ol_arg="$ol_val"
1774                 fi
1775         done
1776         if test "$ol_arg" = "invalid" ; then
1777                 { echo "configure: error: bad value $enableval for --enable-spasswd" 1>&2; exit 1; }
1778         fi
1779         ol_enable_spasswd="$ol_arg"
1780
1781 else
1782         ol_enable_spasswd="no"
1783 fi
1784 # end --enable-spasswd
1785 # OpenLDAP --enable-modules
1786         # Check whether --enable-modules or --disable-modules was given.
1787 if test "${enable_modules+set}" = set; then
1788   enableval="$enable_modules"
1789   
1790         ol_arg=invalid
1791         for ol_val in auto yes no ; do
1792                 if test "$enableval" = "$ol_val" ; then
1793                         ol_arg="$ol_val"
1794                 fi
1795         done
1796         if test "$ol_arg" = "invalid" ; then
1797                 { echo "configure: error: bad value $enableval for --enable-modules" 1>&2; exit 1; }
1798         fi
1799         ol_enable_modules="$ol_arg"
1800
1801 else
1802         ol_enable_modules="no"
1803 fi
1804 # end --enable-modules
1805 ol_enable_multimaster=${ol_enable_multimaster-no}
1806 # OpenLDAP --enable-rewrite
1807         # Check whether --enable-rewrite or --disable-rewrite was given.
1808 if test "${enable_rewrite+set}" = set; then
1809   enableval="$enable_rewrite"
1810   
1811         ol_arg=invalid
1812         for ol_val in auto yes no ; do
1813                 if test "$enableval" = "$ol_val" ; then
1814                         ol_arg="$ol_val"
1815                 fi
1816         done
1817         if test "$ol_arg" = "invalid" ; then
1818                 { echo "configure: error: bad value $enableval for --enable-rewrite" 1>&2; exit 1; }
1819         fi
1820         ol_enable_rewrite="$ol_arg"
1821
1822 else
1823         ol_enable_rewrite="auto"
1824 fi
1825 # end --enable-rewrite
1826 # OpenLDAP --enable-rlookups
1827         # Check whether --enable-rlookups or --disable-rlookups was given.
1828 if test "${enable_rlookups+set}" = set; then
1829   enableval="$enable_rlookups"
1830   
1831         ol_arg=invalid
1832         for ol_val in auto yes no ; do
1833                 if test "$enableval" = "$ol_val" ; then
1834                         ol_arg="$ol_val"
1835                 fi
1836         done
1837         if test "$ol_arg" = "invalid" ; then
1838                 { echo "configure: error: bad value $enableval for --enable-rlookups" 1>&2; exit 1; }
1839         fi
1840         ol_enable_rlookups="$ol_arg"
1841
1842 else
1843         ol_enable_rlookups="no"
1844 fi
1845 # end --enable-rlookups
1846 # OpenLDAP --enable-slapi
1847         # Check whether --enable-slapi or --disable-slapi was given.
1848 if test "${enable_slapi+set}" = set; then
1849   enableval="$enable_slapi"
1850   
1851         ol_arg=invalid
1852         for ol_val in auto yes no ; do
1853                 if test "$enableval" = "$ol_val" ; then
1854                         ol_arg="$ol_val"
1855                 fi
1856         done
1857         if test "$ol_arg" = "invalid" ; then
1858                 { echo "configure: error: bad value $enableval for --enable-slapi" 1>&2; exit 1; }
1859         fi
1860         ol_enable_slapi="$ol_arg"
1861
1862 else
1863         ol_enable_slapi="no"
1864 fi
1865 # end --enable-slapi
1866 # OpenLDAP --enable-slp
1867         # Check whether --enable-slp or --disable-slp was given.
1868 if test "${enable_slp+set}" = set; then
1869   enableval="$enable_slp"
1870   
1871         ol_arg=invalid
1872         for ol_val in auto yes no ; do
1873                 if test "$enableval" = "$ol_val" ; then
1874                         ol_arg="$ol_val"
1875                 fi
1876         done
1877         if test "$ol_arg" = "invalid" ; then
1878                 { echo "configure: error: bad value $enableval for --enable-slp" 1>&2; exit 1; }
1879         fi
1880         ol_enable_slp="$ol_arg"
1881
1882 else
1883         ol_enable_slp="no"
1884 fi
1885 # end --enable-slp
1886 # OpenLDAP --enable-wrappers
1887         # Check whether --enable-wrappers or --disable-wrappers was given.
1888 if test "${enable_wrappers+set}" = set; then
1889   enableval="$enable_wrappers"
1890   
1891         ol_arg=invalid
1892         for ol_val in auto yes no ; do
1893                 if test "$enableval" = "$ol_val" ; then
1894                         ol_arg="$ol_val"
1895                 fi
1896         done
1897         if test "$ol_arg" = "invalid" ; then
1898                 { echo "configure: error: bad value $enableval for --enable-wrappers" 1>&2; exit 1; }
1899         fi
1900         ol_enable_wrappers="$ol_arg"
1901
1902 else
1903         ol_enable_wrappers="no"
1904 fi
1905 # end --enable-wrappers
1906
1907 Backends="bdb dnssrv hdb ldap ldbm meta monitor null \
1908         passwd perl relay shell sql"
1909
1910 # Check whether --with-xxslapbackends or --without-xxslapbackends was given.
1911 if test "${with_xxslapbackends+set}" = set; then
1912   withval="$with_xxslapbackends"
1913   :
1914 fi
1915
1916
1917 # OpenLDAP --enable-backends
1918         # Check whether --enable-backends or --disable-backends was given.
1919 if test "${enable_backends+set}" = set; then
1920   enableval="$enable_backends"
1921   
1922         ol_arg=invalid
1923         for ol_val in no yes mod ; do
1924                 if test "$enableval" = "$ol_val" ; then
1925                         ol_arg="$ol_val"
1926                 fi
1927         done
1928         if test "$ol_arg" = "invalid" ; then
1929                 { echo "configure: error: bad value $enableval for --enable-backends" 1>&2; exit 1; }
1930         fi
1931         ol_enable_backends="$ol_arg"
1932
1933 else
1934         ol_enable_backends="no"
1935 fi
1936 # end --enable-backends
1937 # OpenLDAP --enable-bdb
1938         # Check whether --enable-bdb or --disable-bdb was given.
1939 if test "${enable_bdb+set}" = set; then
1940   enableval="$enable_bdb"
1941   
1942         ol_arg=invalid
1943         for ol_val in no yes mod ; do
1944                 if test "$enableval" = "$ol_val" ; then
1945                         ol_arg="$ol_val"
1946                 fi
1947         done
1948         if test "$ol_arg" = "invalid" ; then
1949                 { echo "configure: error: bad value $enableval for --enable-bdb" 1>&2; exit 1; }
1950         fi
1951         ol_enable_bdb="$ol_arg"
1952
1953 else
1954         ol_enable_bdb="yes"
1955 fi
1956 # end --enable-bdb
1957 # OpenLDAP --enable-dnssrv
1958         # Check whether --enable-dnssrv or --disable-dnssrv was given.
1959 if test "${enable_dnssrv+set}" = set; then
1960   enableval="$enable_dnssrv"
1961   
1962         ol_arg=invalid
1963         for ol_val in no yes mod ; do
1964                 if test "$enableval" = "$ol_val" ; then
1965                         ol_arg="$ol_val"
1966                 fi
1967         done
1968         if test "$ol_arg" = "invalid" ; then
1969                 { echo "configure: error: bad value $enableval for --enable-dnssrv" 1>&2; exit 1; }
1970         fi
1971         ol_enable_dnssrv="$ol_arg"
1972
1973 else
1974         ol_enable_dnssrv="no"
1975 fi
1976 # end --enable-dnssrv
1977 # OpenLDAP --enable-hdb
1978         # Check whether --enable-hdb or --disable-hdb was given.
1979 if test "${enable_hdb+set}" = set; then
1980   enableval="$enable_hdb"
1981   
1982         ol_arg=invalid
1983         for ol_val in no yes mod ; do
1984                 if test "$enableval" = "$ol_val" ; then
1985                         ol_arg="$ol_val"
1986                 fi
1987         done
1988         if test "$ol_arg" = "invalid" ; then
1989                 { echo "configure: error: bad value $enableval for --enable-hdb" 1>&2; exit 1; }
1990         fi
1991         ol_enable_hdb="$ol_arg"
1992
1993 else
1994         ol_enable_hdb="no"
1995 fi
1996 # end --enable-hdb
1997 # OpenLDAP --enable-ldap
1998         # Check whether --enable-ldap or --disable-ldap was given.
1999 if test "${enable_ldap+set}" = set; then
2000   enableval="$enable_ldap"
2001   
2002         ol_arg=invalid
2003         for ol_val in no yes mod ; do
2004                 if test "$enableval" = "$ol_val" ; then
2005                         ol_arg="$ol_val"
2006                 fi
2007         done
2008         if test "$ol_arg" = "invalid" ; then
2009                 { echo "configure: error: bad value $enableval for --enable-ldap" 1>&2; exit 1; }
2010         fi
2011         ol_enable_ldap="$ol_arg"
2012
2013 else
2014         ol_enable_ldap="no"
2015 fi
2016 # end --enable-ldap
2017 # OpenLDAP --enable-ldbm
2018         # Check whether --enable-ldbm or --disable-ldbm was given.
2019 if test "${enable_ldbm+set}" = set; then
2020   enableval="$enable_ldbm"
2021   
2022         ol_arg=invalid
2023         for ol_val in no yes mod ; do
2024                 if test "$enableval" = "$ol_val" ; then
2025                         ol_arg="$ol_val"
2026                 fi
2027         done
2028         if test "$ol_arg" = "invalid" ; then
2029                 { echo "configure: error: bad value $enableval for --enable-ldbm" 1>&2; exit 1; }
2030         fi
2031         ol_enable_ldbm="$ol_arg"
2032
2033 else
2034         ol_enable_ldbm="no"
2035 fi
2036 # end --enable-ldbm
2037 # OpenLDAP --with-ldbm_api
2038         # Check whether --with-ldbm_api or --without-ldbm_api was given.
2039 if test "${with_ldbm_api+set}" = set; then
2040   withval="$with_ldbm_api"
2041   
2042         ol_arg=invalid
2043         for ol_val in auto berkeley bcompat mdbm gdbm ; do
2044                 if test "$withval" = "$ol_val" ; then
2045                         ol_arg="$ol_val"
2046                 fi
2047         done
2048         if test "$ol_arg" = "invalid" ; then
2049                 { echo "configure: error: bad value $withval for --with-ldbm_api" 1>&2; exit 1; }
2050         fi
2051         ol_with_ldbm_api="$ol_arg"
2052
2053 else
2054         ol_with_ldbm_api="auto"
2055 fi
2056 # end --with-ldbm_api
2057
2058 # OpenLDAP --with-ldbm_type
2059         # Check whether --with-ldbm_type or --without-ldbm_type was given.
2060 if test "${with_ldbm_type+set}" = set; then
2061   withval="$with_ldbm_type"
2062   
2063         ol_arg=invalid
2064         for ol_val in auto btree hash ; do
2065                 if test "$withval" = "$ol_val" ; then
2066                         ol_arg="$ol_val"
2067                 fi
2068         done
2069         if test "$ol_arg" = "invalid" ; then
2070                 { echo "configure: error: bad value $withval for --with-ldbm_type" 1>&2; exit 1; }
2071         fi
2072         ol_with_ldbm_type="$ol_arg"
2073
2074 else
2075         ol_with_ldbm_type="auto"
2076 fi
2077 # end --with-ldbm_type
2078
2079 # OpenLDAP --enable-meta
2080         # Check whether --enable-meta or --disable-meta was given.
2081 if test "${enable_meta+set}" = set; then
2082   enableval="$enable_meta"
2083   
2084         ol_arg=invalid
2085         for ol_val in no yes mod ; do
2086                 if test "$enableval" = "$ol_val" ; then
2087                         ol_arg="$ol_val"
2088                 fi
2089         done
2090         if test "$ol_arg" = "invalid" ; then
2091                 { echo "configure: error: bad value $enableval for --enable-meta" 1>&2; exit 1; }
2092         fi
2093         ol_enable_meta="$ol_arg"
2094
2095 else
2096         ol_enable_meta="no"
2097 fi
2098 # end --enable-meta
2099 # OpenLDAP --enable-monitor
2100         # Check whether --enable-monitor or --disable-monitor was given.
2101 if test "${enable_monitor+set}" = set; then
2102   enableval="$enable_monitor"
2103   
2104         ol_arg=invalid
2105         for ol_val in no yes mod ; do
2106                 if test "$enableval" = "$ol_val" ; then
2107                         ol_arg="$ol_val"
2108                 fi
2109         done
2110         if test "$ol_arg" = "invalid" ; then
2111                 { echo "configure: error: bad value $enableval for --enable-monitor" 1>&2; exit 1; }
2112         fi
2113         ol_enable_monitor="$ol_arg"
2114
2115 else
2116         ol_enable_monitor="yes"
2117 fi
2118 # end --enable-monitor
2119 # OpenLDAP --enable-null
2120         # Check whether --enable-null or --disable-null was given.
2121 if test "${enable_null+set}" = set; then
2122   enableval="$enable_null"
2123   
2124         ol_arg=invalid
2125         for ol_val in no yes mod ; do
2126                 if test "$enableval" = "$ol_val" ; then
2127                         ol_arg="$ol_val"
2128                 fi
2129         done
2130         if test "$ol_arg" = "invalid" ; then
2131                 { echo "configure: error: bad value $enableval for --enable-null" 1>&2; exit 1; }
2132         fi
2133         ol_enable_null="$ol_arg"
2134
2135 else
2136         ol_enable_null="no"
2137 fi
2138 # end --enable-null
2139 # OpenLDAP --enable-passwd
2140         # Check whether --enable-passwd or --disable-passwd was given.
2141 if test "${enable_passwd+set}" = set; then
2142   enableval="$enable_passwd"
2143   
2144         ol_arg=invalid
2145         for ol_val in no yes mod ; do
2146                 if test "$enableval" = "$ol_val" ; then
2147                         ol_arg="$ol_val"
2148                 fi
2149         done
2150         if test "$ol_arg" = "invalid" ; then
2151                 { echo "configure: error: bad value $enableval for --enable-passwd" 1>&2; exit 1; }
2152         fi
2153         ol_enable_passwd="$ol_arg"
2154
2155 else
2156         ol_enable_passwd="no"
2157 fi
2158 # end --enable-passwd
2159 # OpenLDAP --enable-perl
2160         # Check whether --enable-perl or --disable-perl was given.
2161 if test "${enable_perl+set}" = set; then
2162   enableval="$enable_perl"
2163   
2164         ol_arg=invalid
2165         for ol_val in no yes mod ; 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-perl" 1>&2; exit 1; }
2172         fi
2173         ol_enable_perl="$ol_arg"
2174
2175 else
2176         ol_enable_perl="no"
2177 fi
2178 # end --enable-perl
2179 # OpenLDAP --enable-relay
2180         # Check whether --enable-relay or --disable-relay was given.
2181 if test "${enable_relay+set}" = set; then
2182   enableval="$enable_relay"
2183   
2184         ol_arg=invalid
2185         for ol_val in no yes mod ; do
2186                 if test "$enableval" = "$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 $enableval for --enable-relay" 1>&2; exit 1; }
2192         fi
2193         ol_enable_relay="$ol_arg"
2194
2195 else
2196         ol_enable_relay="yes"
2197 fi
2198 # end --enable-relay
2199 # OpenLDAP --enable-shell
2200         # Check whether --enable-shell or --disable-shell was given.
2201 if test "${enable_shell+set}" = set; then
2202   enableval="$enable_shell"
2203   
2204         ol_arg=invalid
2205         for ol_val in no yes mod ; do
2206                 if test "$enableval" = "$ol_val" ; then
2207                         ol_arg="$ol_val"
2208                 fi
2209         done
2210         if test "$ol_arg" = "invalid" ; then
2211                 { echo "configure: error: bad value $enableval for --enable-shell" 1>&2; exit 1; }
2212         fi
2213         ol_enable_shell="$ol_arg"
2214
2215 else
2216         ol_enable_shell="no"
2217 fi
2218 # end --enable-shell
2219 # OpenLDAP --enable-sql
2220         # Check whether --enable-sql or --disable-sql was given.
2221 if test "${enable_sql+set}" = set; then
2222   enableval="$enable_sql"
2223   
2224         ol_arg=invalid
2225         for ol_val in no yes mod ; do
2226                 if test "$enableval" = "$ol_val" ; then
2227                         ol_arg="$ol_val"
2228                 fi
2229         done
2230         if test "$ol_arg" = "invalid" ; then
2231                 { echo "configure: error: bad value $enableval for --enable-sql" 1>&2; exit 1; }
2232         fi
2233         ol_enable_sql="$ol_arg"
2234
2235 else
2236         ol_enable_sql="no"
2237 fi
2238 # end --enable-sql
2239
2240 Overlays="denyop dyngroup glue lastmod ppolicy proxycache rwm \
2241         refint syncprov unique"
2242
2243 # Check whether --with-xxslapoverlays or --without-xxslapoverlays was given.
2244 if test "${with_xxslapoverlays+set}" = set; then
2245   withval="$with_xxslapoverlays"
2246   :
2247 fi
2248
2249
2250 # OpenLDAP --enable-overlays
2251         # Check whether --enable-overlays or --disable-overlays was given.
2252 if test "${enable_overlays+set}" = set; then
2253   enableval="$enable_overlays"
2254   
2255         ol_arg=invalid
2256         for ol_val in no yes mod ; do
2257                 if test "$enableval" = "$ol_val" ; then
2258                         ol_arg="$ol_val"
2259                 fi
2260         done
2261         if test "$ol_arg" = "invalid" ; then
2262                 { echo "configure: error: bad value $enableval for --enable-overlays" 1>&2; exit 1; }
2263         fi
2264         ol_enable_overlays="$ol_arg"
2265
2266 else
2267         ol_enable_overlays="no"
2268 fi
2269 # end --enable-overlays
2270 # OpenLDAP --enable-denyop
2271         # Check whether --enable-denyop or --disable-denyop was given.
2272 if test "${enable_denyop+set}" = set; then
2273   enableval="$enable_denyop"
2274   
2275         ol_arg=invalid
2276         for ol_val in no yes mod ; do
2277                 if test "$enableval" = "$ol_val" ; then
2278                         ol_arg="$ol_val"
2279                 fi
2280         done
2281         if test "$ol_arg" = "invalid" ; then
2282                 { echo "configure: error: bad value $enableval for --enable-denyop" 1>&2; exit 1; }
2283         fi
2284         ol_enable_denyop="$ol_arg"
2285
2286 else
2287         ol_enable_denyop="no"
2288 fi
2289 # end --enable-denyop
2290
2291 # OpenLDAP --enable-dyngroup
2292         # Check whether --enable-dyngroup or --disable-dyngroup was given.
2293 if test "${enable_dyngroup+set}" = set; then
2294   enableval="$enable_dyngroup"
2295   
2296         ol_arg=invalid
2297         for ol_val in no yes mod ; do
2298                 if test "$enableval" = "$ol_val" ; then
2299                         ol_arg="$ol_val"
2300                 fi
2301         done
2302         if test "$ol_arg" = "invalid" ; then
2303                 { echo "configure: error: bad value $enableval for --enable-dyngroup" 1>&2; exit 1; }
2304         fi
2305         ol_enable_dyngroup="$ol_arg"
2306
2307 else
2308         ol_enable_dyngroup="no"
2309 fi
2310 # end --enable-dyngroup
2311
2312 # OpenLDAP --enable-glue
2313         # Check whether --enable-glue or --disable-glue was given.
2314 if test "${enable_glue+set}" = set; then
2315   enableval="$enable_glue"
2316   
2317         ol_arg=invalid
2318         for ol_val in no yes mod ; do
2319                 if test "$enableval" = "$ol_val" ; then
2320                         ol_arg="$ol_val"
2321                 fi
2322         done
2323         if test "$ol_arg" = "invalid" ; then
2324                 { echo "configure: error: bad value $enableval for --enable-glue" 1>&2; exit 1; }
2325         fi
2326         ol_enable_glue="$ol_arg"
2327
2328 else
2329         ol_enable_glue="yes"
2330 fi
2331 # end --enable-glue
2332
2333 # OpenLDAP --enable-lastmod
2334         # Check whether --enable-lastmod or --disable-lastmod was given.
2335 if test "${enable_lastmod+set}" = set; then
2336   enableval="$enable_lastmod"
2337   
2338         ol_arg=invalid
2339         for ol_val in no yes mod ; do
2340                 if test "$enableval" = "$ol_val" ; then
2341                         ol_arg="$ol_val"
2342                 fi
2343         done
2344         if test "$ol_arg" = "invalid" ; then
2345                 { echo "configure: error: bad value $enableval for --enable-lastmod" 1>&2; exit 1; }
2346         fi
2347         ol_enable_lastmod="$ol_arg"
2348
2349 else
2350         ol_enable_lastmod="no"
2351 fi
2352 # end --enable-lastmod
2353
2354 # OpenLDAP --enable-ppolicy
2355         # Check whether --enable-ppolicy or --disable-ppolicy was given.
2356 if test "${enable_ppolicy+set}" = set; then
2357   enableval="$enable_ppolicy"
2358   
2359         ol_arg=invalid
2360         for ol_val in no yes mod ; do
2361                 if test "$enableval" = "$ol_val" ; then
2362                         ol_arg="$ol_val"
2363                 fi
2364         done
2365         if test "$ol_arg" = "invalid" ; then
2366                 { echo "configure: error: bad value $enableval for --enable-ppolicy" 1>&2; exit 1; }
2367         fi
2368         ol_enable_ppolicy="$ol_arg"
2369
2370 else
2371         ol_enable_ppolicy="no"
2372 fi
2373 # end --enable-ppolicy
2374
2375 # OpenLDAP --enable-proxycache
2376         # Check whether --enable-proxycache or --disable-proxycache was given.
2377 if test "${enable_proxycache+set}" = set; then
2378   enableval="$enable_proxycache"
2379   
2380         ol_arg=invalid
2381         for ol_val in no yes mod ; do
2382                 if test "$enableval" = "$ol_val" ; then
2383                         ol_arg="$ol_val"
2384                 fi
2385         done
2386         if test "$ol_arg" = "invalid" ; then
2387                 { echo "configure: error: bad value $enableval for --enable-proxycache" 1>&2; exit 1; }
2388         fi
2389         ol_enable_proxycache="$ol_arg"
2390
2391 else
2392         ol_enable_proxycache="no"
2393 fi
2394 # end --enable-proxycache
2395
2396 # OpenLDAP --enable-refint
2397         # Check whether --enable-refint or --disable-refint was given.
2398 if test "${enable_refint+set}" = set; then
2399   enableval="$enable_refint"
2400   
2401         ol_arg=invalid
2402         for ol_val in no yes mod ; do
2403                 if test "$enableval" = "$ol_val" ; then
2404                         ol_arg="$ol_val"
2405                 fi
2406         done
2407         if test "$ol_arg" = "invalid" ; then
2408                 { echo "configure: error: bad value $enableval for --enable-refint" 1>&2; exit 1; }
2409         fi
2410         ol_enable_refint="$ol_arg"
2411
2412 else
2413         ol_enable_refint="no"
2414 fi
2415 # end --enable-refint
2416
2417 # OpenLDAP --enable-rwm
2418         # Check whether --enable-rwm or --disable-rwm was given.
2419 if test "${enable_rwm+set}" = set; then
2420   enableval="$enable_rwm"
2421   
2422         ol_arg=invalid
2423         for ol_val in no yes mod ; do
2424                 if test "$enableval" = "$ol_val" ; then
2425                         ol_arg="$ol_val"
2426                 fi
2427         done
2428         if test "$ol_arg" = "invalid" ; then
2429                 { echo "configure: error: bad value $enableval for --enable-rwm" 1>&2; exit 1; }
2430         fi
2431         ol_enable_rwm="$ol_arg"
2432
2433 else
2434         ol_enable_rwm="no"
2435 fi
2436 # end --enable-rwm
2437
2438 # OpenLDAP --enable-syncprov
2439         # Check whether --enable-syncprov or --disable-syncprov was given.
2440 if test "${enable_syncprov+set}" = set; then
2441   enableval="$enable_syncprov"
2442   
2443         ol_arg=invalid
2444         for ol_val in no yes mod ; do
2445                 if test "$enableval" = "$ol_val" ; then
2446                         ol_arg="$ol_val"
2447                 fi
2448         done
2449         if test "$ol_arg" = "invalid" ; then
2450                 { echo "configure: error: bad value $enableval for --enable-syncprov" 1>&2; exit 1; }
2451         fi
2452         ol_enable_syncprov="$ol_arg"
2453
2454 else
2455         ol_enable_syncprov="yes"
2456 fi
2457 # end --enable-syncprov
2458
2459 # OpenLDAP --enable-unique
2460         # Check whether --enable-unique or --disable-unique was given.
2461 if test "${enable_unique+set}" = set; then
2462   enableval="$enable_unique"
2463   
2464         ol_arg=invalid
2465         for ol_val in no yes mod ; do
2466                 if test "$enableval" = "$ol_val" ; then
2467                         ol_arg="$ol_val"
2468                 fi
2469         done
2470         if test "$ol_arg" = "invalid" ; then
2471                 { echo "configure: error: bad value $enableval for --enable-unique" 1>&2; exit 1; }
2472         fi
2473         ol_enable_unique="$ol_arg"
2474
2475 else
2476         ol_enable_unique="no"
2477 fi
2478 # end --enable-unique
2479
2480
2481
2482 # Check whether --with-xxslurpdoptions or --without-xxslurpdoptions was given.
2483 if test "${with_xxslurpdoptions+set}" = set; then
2484   withval="$with_xxslurpdoptions"
2485   :
2486 fi
2487
2488 # OpenLDAP --enable-slurpd
2489         # Check whether --enable-slurpd or --disable-slurpd was given.
2490 if test "${enable_slurpd+set}" = set; then
2491   enableval="$enable_slurpd"
2492   
2493         ol_arg=invalid
2494         for ol_val in auto yes no ; do
2495                 if test "$enableval" = "$ol_val" ; then
2496                         ol_arg="$ol_val"
2497                 fi
2498         done
2499         if test "$ol_arg" = "invalid" ; then
2500                 { echo "configure: error: bad value $enableval for --enable-slurpd" 1>&2; exit 1; }
2501         fi
2502         ol_enable_slurpd="$ol_arg"
2503
2504 else
2505         ol_enable_slurpd="auto"
2506 fi
2507 # end --enable-slurpd
2508
2509 # Check whether --with-xxliboptions or --without-xxliboptions was given.
2510 if test "${with_xxliboptions+set}" = set; then
2511   withval="$with_xxliboptions"
2512   :
2513 fi
2514
2515 # Check whether --enable-static or --disable-static was given.
2516 if test "${enable_static+set}" = set; then
2517   enableval="$enable_static"
2518   p=${PACKAGE-default}
2519 case $enableval in
2520 yes) enable_static=yes ;;
2521 no) enable_static=no ;;
2522 *)
2523   enable_static=no
2524   # Look at the argument we got.  We use all the common list separators.
2525   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2526   for pkg in $enableval; do
2527     if test "X$pkg" = "X$p"; then
2528       enable_static=yes
2529     fi
2530   done
2531   IFS="$ac_save_ifs"
2532   ;;
2533 esac
2534 else
2535   enable_static=yes
2536 fi
2537
2538 # Check whether --enable-shared or --disable-shared was given.
2539 if test "${enable_shared+set}" = set; then
2540   enableval="$enable_shared"
2541   p=${PACKAGE-default}
2542 case $enableval in
2543 yes) enable_shared=yes ;;
2544 no) enable_shared=no ;;
2545 *)
2546   enable_shared=no
2547   # Look at the argument we got.  We use all the common list separators.
2548   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2549   for pkg in $enableval; do
2550     if test "X$pkg" = "X$p"; then
2551       enable_shared=yes
2552     fi
2553   done
2554   IFS="$ac_save_ifs"
2555   ;;
2556 esac
2557 else
2558   enable_shared=yes
2559 fi
2560
2561
2562
2563 # Activate any backends that were not explicitly enabled.
2564 # Note that back_bdb defaults to "yes" so this loop won't touch it.
2565 if test $ol_enable_backends != no ; then
2566         for i in $Backends; do
2567                 eval "ol_tmp=\$ol_enable_$i"
2568                 if test $ol_tmp = no ; then
2569                         eval "ol_enable_$i=$ol_enable_backends"
2570                 fi
2571         done
2572 fi
2573 # Activate the overlays
2574 if test $ol_enable_overlays != no ; then
2575         for i in $Overlays; do
2576                 eval "ol_tmp=\$ol_enable_$i"
2577                 if test $ol_tmp = no ; then
2578                         eval "ol_enable_$i=$ol_enable_overlays"
2579                 fi
2580         done
2581 fi
2582
2583 # validate options
2584 if test $ol_enable_slapd = no ; then
2585                 if test $ol_enable_slapi = yes ; then
2586                 echo "configure: warning: slapd disabled, ignoring --enable-slapi argument" 1>&2
2587         fi
2588         if test $ol_enable_backends != no ; then
2589                 echo "configure: warning: slapd disabled, ignoring --enable-backends argument" 1>&2
2590         fi
2591         for i in $Backends; do
2592                 eval "ol_tmp=\$ol_enable_$i"
2593                 if test $ol_tmp != no ; then
2594                         echo "configure: warning: slapd disabled, ignoring --enable-$i argument" 1>&2
2595                         eval "ol_enable_$i=no"
2596                 fi
2597         done
2598         if test $ol_enable_modules = yes ; then
2599                 echo "configure: warning: slapd disabled, ignoring --enable-modules argument" 1>&2
2600         fi
2601         if test $ol_enable_multimaster = yes ; then
2602                 echo "configure: warning: slapd disabled, ignoring --enable-multimaster argument" 1>&2
2603         fi
2604         if test $ol_enable_wrappers = yes ; then
2605                 echo "configure: warning: slapd disabled, ignoring --enable-wrappers argument" 1>&2
2606         fi
2607         if test $ol_enable_rlookups = yes ; then
2608                 echo "configure: warning: slapd disabled, ignoring --enable-rlookups argument" 1>&2
2609         fi
2610         if test $ol_enable_aci = yes ; then
2611                 echo "configure: warning: slapd disabled, ignoring --enable-aci argument" 1>&2
2612         fi
2613         if test $ol_with_ldbm_api != auto ; then
2614                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-api argument" 1>&2
2615         fi
2616         if test $ol_with_ldbm_type != auto ; then
2617                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-type argument" 1>&2
2618         fi
2619         if test $ol_enable_slurpd = yes ; then
2620                 { echo "configure: error: slurpd requires slapd" 1>&2; exit 1; }
2621         fi
2622         if test $ol_enable_rewrite = yes ; then
2623                 echo "configure: warning: slapd disabled, ignoring --enable-rewrite argument" 1>&2
2624         fi
2625                 if test $ol_enable_overlays != no ; then
2626                 echo "configure: warning: slapd disabled, ignoring --enable-overlays argument" 1>&2
2627         fi
2628         for i in $Overlays; do
2629                 eval "ol_tmp=\$ol_enable_$i"
2630                 if test $ol_tmp != no ; then
2631                         echo "configure: warning: slapd disabled, ignoring --enable-$i argument" 1>&2
2632                         eval "ol_enable_$i=no"
2633                 fi
2634         done
2635
2636         # force settings to no
2637         ol_enable_slapi=no
2638
2639         ol_enable_backends=no
2640         ol_enable_overlays=no
2641         ol_enable_modules=no
2642         ol_enable_multimaster=no
2643         ol_enable_rlookups=no
2644         ol_enable_aci=no
2645         ol_enable_wrappers=no
2646
2647         ol_with_ldbm_api=no
2648         ol_with_ldbm_type=no
2649
2650         ol_enable_slurpd=no
2651
2652         ol_enable_rewrite=no
2653
2654 elif test $ol_enable_ldbm = no ; then
2655         
2656         if test $ol_with_ldbm_api != auto ; then
2657                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-api argument" 1>&2
2658         fi
2659
2660         if test $ol_with_ldbm_type != auto ; then
2661                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-type argument" 1>&2
2662         fi
2663
2664         if test $ol_enable_modules != yes -a \
2665                 $ol_enable_bdb = no -a \
2666                 $ol_enable_dnssrv = no -a \
2667                 $ol_enable_hdb = no -a \
2668                 $ol_enable_ldap = no -a \
2669                 $ol_enable_meta = no -a \
2670                 $ol_enable_monitor = no -a \
2671                 $ol_enable_null = no -a \
2672                 $ol_enable_passwd = no -a \
2673                 $ol_enable_perl = no -a \
2674                 $ol_enable_relay = no -a \
2675                 $ol_enable_shell = no -a \
2676                 $ol_enable_sql = no ; then
2677
2678                 if test $ol_enable_slapd = yes ; then
2679                         { echo "configure: error: slapd requires a backend" 1>&2; exit 1; }
2680                 else
2681                         echo "configure: warning: skipping slapd, no backend specified" 1>&2
2682                         ol_enable_slapd=no
2683                 fi
2684         fi
2685
2686         ol_with_ldbm_api=no
2687         ol_with_ldbm_type=no
2688
2689         if test $ol_enable_bdb != no -o $ol_enable_hdb != no; then
2690                 ol_with_ldbm_api=berkeley
2691         fi
2692
2693 else
2694                 if test $ol_with_ldbm_api = gdbm -a \
2695                 $ol_with_ldbm_type = btree ; then
2696                 { echo "configure: error: GDBM only supports LDBM type hash" 1>&2; exit 1; }
2697         fi
2698         if test $ol_with_ldbm_api = mdbm -a \
2699                 $ol_with_ldbm_type = btree ; then
2700                 { echo "configure: error: MDBM only supports LDBM type hash" 1>&2; exit 1; }
2701         fi
2702         if test $ol_with_ldbm_api = ndbm -a \
2703                 $ol_with_ldbm_type = btree ; then
2704                 { echo "configure: error: NDBM only supports LDBM type hash" 1>&2; exit 1; }
2705         fi
2706
2707         if test $ol_enable_bdb != no -o $ol_enable_hdb != no ; then
2708                 if test $ol_with_ldbm_api = auto ; then
2709                         ol_with_ldbm_api=berkeley
2710                 elif test $ol_with_ldbm_api != berkeley ; then
2711                         { echo "configure: error: LDBM API not compatible with BDB/HDB" 1>&2; exit 1; }
2712                 fi
2713         fi
2714 fi
2715
2716 if test $ol_enable_meta = yes -a $ol_enable_ldap = no ; then
2717         { echo "configure: error: --enable-meta requires --enable-ldap" 1>&2; exit 1; }
2718 fi
2719
2720 if test $ol_enable_slurpd = yes ; then
2721                 if test $ol_with_threads = no ; then
2722                 { echo "configure: error: slurpd requires threads" 1>&2; exit 1; }
2723         fi
2724 fi
2725
2726 if test $ol_enable_lmpasswd = yes ; then
2727         if test $ol_with_tls = no ; then
2728                 { echo "configure: error: LAN Manager passwords require OpenSSL" 1>&2; exit 1; }
2729         fi
2730 fi
2731
2732 if test $ol_enable_kbind = yes ; then
2733         if test $ol_with_kerberos = no ; then
2734                 { echo "configure: error: options require --with-kerberos" 1>&2; exit 1; }
2735         elif test $ol_with_kerberos = auto ; then
2736                 ol_with_kerberos=yes
2737         fi
2738
2739 elif test $ol_enable_kbind = no ; then
2740         if test $ol_with_kerberos = auto ; then
2741                 ol_with_kerberos=no
2742         elif test $ol_with_kerberos != no ; then
2743                 echo "configure: warning: Kerberos detection enabled unnecessarily" 1>&2;
2744                 ol_with_kerberos=no
2745         fi
2746 fi
2747
2748 if test $ol_enable_spasswd = yes ; then
2749         if test $ol_with_cyrus_sasl = no ; then
2750                 { echo "configure: error: options require --with-cyrus-sasl" 1>&2; exit 1; }
2751         fi
2752         ol_with_cyrus_sasl=yes
2753 fi
2754
2755 echo "$ac_t""done" 1>&6
2756
2757 LDAP_LIBS=
2758 LDBM_LIBS=
2759 LTHREAD_LIBS=
2760 LUTIL_LIBS=
2761
2762 SLAPD_LIBS=
2763 SLURPD_LIBS=
2764
2765 BUILD_SLAPD=no
2766 BUILD_SLURPD=no
2767
2768 BUILD_THREAD=no
2769
2770 BUILD_SLAPI=no
2771 SLAPD_SLAPI_DEPEND=
2772
2773 BUILD_BDB=no
2774 BUILD_DNSSRV=no
2775 BUILD_HDB=no
2776 BUILD_LDAP=no
2777 BUILD_LDBM=no
2778 BUILD_META=no
2779 BUILD_MONITOR=no
2780 BUILD_NULL=no
2781 BUILD_PASSWD=no
2782 BUILD_PERL=no
2783 BUILD_RELAY=no
2784 BUILD_SHELL=no
2785 BUILD_SQL=no
2786
2787 BUILD_CHAIN=no
2788 BUILD_DENYOP=no
2789 BUILD_DYNGROUP=no
2790 BUILD_GLUE=no
2791 BUILD_LASTMOD=no
2792 BUILD_PPOLICY=no
2793 BUILD_PROXYCACHE=no
2794 BUILD_REFINT=no
2795 BUILD_RWM=no
2796 BUILD_SYNCPROV=no
2797 BUILD_UNIQUE=no
2798
2799 SLAPD_DYNAMIC_OVERLAYS=
2800
2801 SLAPD_MODULES_LDFLAGS=
2802 SLAPD_MODULES_CPPFLAGS=
2803
2804 SLAPD_STATIC_BACKENDS=
2805 SLAPD_DYNAMIC_BACKENDS=
2806
2807 SLAPD_PERL_LDFLAGS=
2808 MOD_PERL_LDFLAGS=
2809 PERL_CPPFLAGS=
2810
2811 SLAPD_SQL_LDFLAGS=
2812 SLAPD_SQL_LIBS=
2813 SLAPD_SQL_INCLUDES=
2814
2815 KRB4_LIBS=
2816 KRB5_LIBS=
2817 SASL_LIBS=
2818 TLS_LIBS=
2819 MODULES_LIBS=
2820 SLAPI_LIBS=
2821 LIBSLAPI=
2822 LIBSLAPITOOLS=
2823 AUTH_LIBS=
2824
2825 SLAPD_SLP_LIBS=
2826 SLAPD_GMP_LIBS=
2827
2828
2829 cat >> confdefs.h <<\EOF
2830 #define HAVE_MKVERSION 1
2831 EOF
2832
2833
2834
2835
2836 ol_aix_threads=no
2837 case "$target" in
2838 *-*-aix*)       if test -z "$CC" ; then
2839                 case "$ol_with_threads" in
2840                 auto | yes |  posix) ol_aix_threads=yes ;;
2841                 esac
2842         fi
2843 ;;
2844 esac
2845
2846 if test $ol_aix_threads = yes ; then
2847         if test -z "${CC}" ; then
2848                 for ac_prog in cc_r xlc_r cc
2849 do
2850 # Extract the first word of "$ac_prog", so it can be a program name with args.
2851 set dummy $ac_prog; ac_word=$2
2852 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2853 echo "configure:2854: checking for $ac_word" >&5
2854 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2855   echo $ac_n "(cached) $ac_c" 1>&6
2856 else
2857   if test -n "$CC"; then
2858   ac_cv_prog_CC="$CC" # Let the user override the test.
2859 else
2860   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2861   ac_dummy="$PATH"
2862   for ac_dir in $ac_dummy; do
2863     test -z "$ac_dir" && ac_dir=.
2864     if test -f $ac_dir/$ac_word; then
2865       ac_cv_prog_CC="$ac_prog"
2866       break
2867     fi
2868   done
2869   IFS="$ac_save_ifs"
2870 fi
2871 fi
2872 CC="$ac_cv_prog_CC"
2873 if test -n "$CC"; then
2874   echo "$ac_t""$CC" 1>&6
2875 else
2876   echo "$ac_t""no" 1>&6
2877 fi
2878
2879 test -n "$CC" && break
2880 done
2881
2882
2883                 if test "$CC" = cc ; then
2884                                                 if test $ol_with_threads != auto ; then
2885                                 { echo "configure: error: --with-threads requires cc_r (or other suitable compiler) on AIX" 1>&2; exit 1; }
2886                         else
2887                                 echo "configure: warning: disabling threads, no cc_r on AIX" 1>&2
2888                         fi
2889                         ol_with_threads=no
2890                 fi
2891         fi
2892
2893         if test "${CC}" = "cc_r" -o "${CC}" = "xlc_r" ; then
2894                 ol_with_threads=posix
2895                 ol_cv_pthread_create=yes
2896         fi
2897 fi
2898
2899 if test -z "${CC}"; then
2900         for ac_prog in cc gcc
2901 do
2902 # Extract the first word of "$ac_prog", so it can be a program name with args.
2903 set dummy $ac_prog; ac_word=$2
2904 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2905 echo "configure:2906: checking for $ac_word" >&5
2906 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2907   echo $ac_n "(cached) $ac_c" 1>&6
2908 else
2909   if test -n "$CC"; then
2910   ac_cv_prog_CC="$CC" # Let the user override the test.
2911 else
2912   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2913   ac_dummy="$PATH"
2914   for ac_dir in $ac_dummy; do
2915     test -z "$ac_dir" && ac_dir=.
2916     if test -f $ac_dir/$ac_word; then
2917       ac_cv_prog_CC="$ac_prog"
2918       break
2919     fi
2920   done
2921   IFS="$ac_save_ifs"
2922 fi
2923 fi
2924 CC="$ac_cv_prog_CC"
2925 if test -n "$CC"; then
2926   echo "$ac_t""$CC" 1>&6
2927 else
2928   echo "$ac_t""no" 1>&6
2929 fi
2930
2931 test -n "$CC" && break
2932 done
2933 test -n "$CC" || CC="missing"
2934
2935
2936         if test "${CC}" = "missing" ; then
2937                 { echo "configure: error: Unable to locate cc(1) or suitable replacement.  Check PATH or set CC." 1>&2; exit 1; }
2938         fi
2939 fi
2940
2941 if test -z "${AR}"; then
2942         for ac_prog in ar gar
2943 do
2944 # Extract the first word of "$ac_prog", so it can be a program name with args.
2945 set dummy $ac_prog; ac_word=$2
2946 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2947 echo "configure:2948: checking for $ac_word" >&5
2948 if eval "test \"\${ac_cv_prog_AR+set}\" = set"; then
2949   echo $ac_n "(cached) $ac_c" 1>&6
2950 else
2951   if test -n "$AR"; then
2952   ac_cv_prog_AR="$AR" # Let the user override the test.
2953 else
2954   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2955   ac_dummy="$PATH"
2956   for ac_dir in $ac_dummy; do
2957     test -z "$ac_dir" && ac_dir=.
2958     if test -f $ac_dir/$ac_word; then
2959       ac_cv_prog_AR="$ac_prog"
2960       break
2961     fi
2962   done
2963   IFS="$ac_save_ifs"
2964 fi
2965 fi
2966 AR="$ac_cv_prog_AR"
2967 if test -n "$AR"; then
2968   echo "$ac_t""$AR" 1>&6
2969 else
2970   echo "$ac_t""no" 1>&6
2971 fi
2972
2973 test -n "$AR" && break
2974 done
2975 test -n "$AR" || AR="missing"
2976
2977
2978         if test "${AR}" = "missing" ; then
2979                 { echo "configure: error: Unable to locate ar(1) or suitable replacement.  Check PATH or set AR." 1>&2; exit 1; }
2980         fi
2981 fi
2982
2983
2984
2985 # Find the correct PATH separator.  Usually this is `:', but
2986 # DJGPP uses `;' like DOS.
2987 if test "X${PATH_SEPARATOR+set}" != Xset; then
2988   UNAME=${UNAME-`uname 2>/dev/null`}
2989   case X$UNAME in
2990     *-DOS) lt_cv_sys_path_separator=';' ;;
2991     *)     lt_cv_sys_path_separator=':' ;;
2992   esac
2993   PATH_SEPARATOR=$lt_cv_sys_path_separator
2994 fi
2995
2996 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
2997 echo "configure:2998: checking for Cygwin environment" >&5
2998 if eval "test \"\${ac_cv_cygwin+set}\" = set"; then
2999   echo $ac_n "(cached) $ac_c" 1>&6
3000 else
3001   cat > conftest.$ac_ext <<EOF
3002 #line 3003 "configure"
3003 #include "confdefs.h"
3004
3005 int main() {
3006
3007 #ifndef __CYGWIN__
3008 #define __CYGWIN__ __CYGWIN32__
3009 #endif
3010 return __CYGWIN__;
3011 ; return 0; }
3012 EOF
3013 if { (eval echo configure:3014: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3014   rm -rf conftest*
3015   ac_cv_cygwin=yes
3016 else
3017   echo "configure: failed program was:" >&5
3018   cat conftest.$ac_ext >&5
3019   rm -rf conftest*
3020   ac_cv_cygwin=no
3021 fi
3022 rm -f conftest*
3023 fi
3024
3025 echo "$ac_t""$ac_cv_cygwin" 1>&6
3026 CYGWIN=
3027 test "$ac_cv_cygwin" = yes && CYGWIN=yes
3028 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
3029 echo "configure:3030: checking for mingw32 environment" >&5
3030 if eval "test \"\${ac_cv_mingw32+set}\" = set"; then
3031   echo $ac_n "(cached) $ac_c" 1>&6
3032 else
3033   cat > conftest.$ac_ext <<EOF
3034 #line 3035 "configure"
3035 #include "confdefs.h"
3036
3037 int main() {
3038 return __MINGW32__;
3039 ; return 0; }
3040 EOF
3041 if { (eval echo configure:3042: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3042   rm -rf conftest*
3043   ac_cv_mingw32=yes
3044 else
3045   echo "configure: failed program was:" >&5
3046   cat conftest.$ac_ext >&5
3047   rm -rf conftest*
3048   ac_cv_mingw32=no
3049 fi
3050 rm -f conftest*
3051 fi
3052
3053 echo "$ac_t""$ac_cv_mingw32" 1>&6
3054 MINGW32=
3055 test "$ac_cv_mingw32" = yes && MINGW32=yes
3056 echo $ac_n "checking for EMX OS/2 environment""... $ac_c" 1>&6
3057 echo "configure:3058: checking for EMX OS/2 environment" >&5
3058 if eval "test \"\${ac_cv_emxos2+set}\" = set"; then
3059   echo $ac_n "(cached) $ac_c" 1>&6
3060 else
3061   cat > conftest.$ac_ext <<EOF
3062 #line 3063 "configure"
3063 #include "confdefs.h"
3064
3065 int main() {
3066 return __EMX__;
3067 ; return 0; }
3068 EOF
3069 if { (eval echo configure:3070: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3070   rm -rf conftest*
3071   ac_cv_emxos2=yes
3072 else
3073   echo "configure: failed program was:" >&5
3074   cat conftest.$ac_ext >&5
3075   rm -rf conftest*
3076   ac_cv_emxos2=no
3077 fi
3078 rm -f conftest*
3079 fi
3080
3081 echo "$ac_t""$ac_cv_emxos2" 1>&6
3082 EMXOS2=
3083 test "$ac_cv_emxos2" = yes && EMXOS2=yes
3084 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
3085 echo "configure:3086: checking how to run the C preprocessor" >&5
3086 # On Suns, sometimes $CPP names a directory.
3087 if test -n "$CPP" && test -d "$CPP"; then
3088   CPP=
3089 fi
3090 if test -z "$CPP"; then
3091 if eval "test \"\${ac_cv_prog_CPP+set}\" = set"; then
3092   echo $ac_n "(cached) $ac_c" 1>&6
3093 else
3094     # This must be in double quotes, not single quotes, because CPP may get
3095   # substituted into the Makefile and "${CC-cc}" will confuse make.
3096   CPP="${CC-cc} -E"
3097   # On the NeXT, cc -E runs the code through the compiler's parser,
3098   # not just through cpp.
3099   cat > conftest.$ac_ext <<EOF
3100 #line 3101 "configure"
3101 #include "confdefs.h"
3102 #include <assert.h>
3103 Syntax Error
3104 EOF
3105 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3106 { (eval echo configure:3107: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3107 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3108 if test -z "$ac_err"; then
3109   :
3110 else
3111   echo "$ac_err" >&5
3112   echo "configure: failed program was:" >&5
3113   cat conftest.$ac_ext >&5
3114   rm -rf conftest*
3115   CPP="${CC-cc} -E -traditional-cpp"
3116   cat > conftest.$ac_ext <<EOF
3117 #line 3118 "configure"
3118 #include "confdefs.h"
3119 #include <assert.h>
3120 Syntax Error
3121 EOF
3122 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3123 { (eval echo configure:3124: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3124 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3125 if test -z "$ac_err"; then
3126   :
3127 else
3128   echo "$ac_err" >&5
3129   echo "configure: failed program was:" >&5
3130   cat conftest.$ac_ext >&5
3131   rm -rf conftest*
3132   CPP="${CC-cc} -nologo -E"
3133   cat > conftest.$ac_ext <<EOF
3134 #line 3135 "configure"
3135 #include "confdefs.h"
3136 #include <assert.h>
3137 Syntax Error
3138 EOF
3139 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3140 { (eval echo configure:3141: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3141 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3142 if test -z "$ac_err"; then
3143   :
3144 else
3145   echo "$ac_err" >&5
3146   echo "configure: failed program was:" >&5
3147   cat conftest.$ac_ext >&5
3148   rm -rf conftest*
3149   CPP=/lib/cpp
3150 fi
3151 rm -f conftest*
3152 fi
3153 rm -f conftest*
3154 fi
3155 rm -f conftest*
3156   ac_cv_prog_CPP="$CPP"
3157 fi
3158   CPP="$ac_cv_prog_CPP"
3159 else
3160   ac_cv_prog_CPP="$CPP"
3161 fi
3162 echo "$ac_t""$CPP" 1>&6
3163
3164 # Check whether --enable-fast-install or --disable-fast-install was given.
3165 if test "${enable_fast_install+set}" = set; then
3166   enableval="$enable_fast_install"
3167   p=${PACKAGE-default}
3168 case $enableval in
3169 yes) enable_fast_install=yes ;;
3170 no) enable_fast_install=no ;;
3171 *)
3172   enable_fast_install=no
3173   # Look at the argument we got.  We use all the common list separators.
3174   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
3175   for pkg in $enableval; do
3176     if test "X$pkg" = "X$p"; then
3177       enable_fast_install=yes
3178     fi
3179   done
3180   IFS="$ac_save_ifs"
3181   ;;
3182 esac
3183 else
3184   enable_fast_install=yes
3185 fi
3186
3187 # Extract the first word of "gcc", so it can be a program name with args.
3188 set dummy gcc; ac_word=$2
3189 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3190 echo "configure:3191: checking for $ac_word" >&5
3191 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3192   echo $ac_n "(cached) $ac_c" 1>&6
3193 else
3194   if test -n "$CC"; then
3195   ac_cv_prog_CC="$CC" # Let the user override the test.
3196 else
3197   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3198   ac_dummy="$PATH"
3199   for ac_dir in $ac_dummy; do
3200     test -z "$ac_dir" && ac_dir=.
3201     if test -f $ac_dir/$ac_word; then
3202       ac_cv_prog_CC="gcc"
3203       break
3204     fi
3205   done
3206   IFS="$ac_save_ifs"
3207 fi
3208 fi
3209 CC="$ac_cv_prog_CC"
3210 if test -n "$CC"; then
3211   echo "$ac_t""$CC" 1>&6
3212 else
3213   echo "$ac_t""no" 1>&6
3214 fi
3215
3216 if test -z "$CC"; then
3217   # Extract the first word of "cc", so it can be a program name with args.
3218 set dummy cc; ac_word=$2
3219 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3220 echo "configure:3221: checking for $ac_word" >&5
3221 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3222   echo $ac_n "(cached) $ac_c" 1>&6
3223 else
3224   if test -n "$CC"; then
3225   ac_cv_prog_CC="$CC" # Let the user override the test.
3226 else
3227   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3228   ac_prog_rejected=no
3229   ac_dummy="$PATH"
3230   for ac_dir in $ac_dummy; do
3231     test -z "$ac_dir" && ac_dir=.
3232     if test -f $ac_dir/$ac_word; then
3233       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
3234         ac_prog_rejected=yes
3235         continue
3236       fi
3237       ac_cv_prog_CC="cc"
3238       break
3239     fi
3240   done
3241   IFS="$ac_save_ifs"
3242 if test $ac_prog_rejected = yes; then
3243   # We found a bogon in the path, so make sure we never use it.
3244   set dummy $ac_cv_prog_CC
3245   shift
3246   if test $# -gt 0; then
3247     # We chose a different compiler from the bogus one.
3248     # However, it has the same basename, so the bogon will be chosen
3249     # first if we set CC to just the basename; use the full file name.
3250     shift
3251     set dummy "$ac_dir/$ac_word" "$@"
3252     shift
3253     ac_cv_prog_CC="$@"
3254   fi
3255 fi
3256 fi
3257 fi
3258 CC="$ac_cv_prog_CC"
3259 if test -n "$CC"; then
3260   echo "$ac_t""$CC" 1>&6
3261 else
3262   echo "$ac_t""no" 1>&6
3263 fi
3264
3265   if test -z "$CC"; then
3266     case "`uname -s`" in
3267     *win32* | *WIN32* | *CYGWIN*)
3268       # Extract the first word of "cl", so it can be a program name with args.
3269 set dummy cl; ac_word=$2
3270 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3271 echo "configure:3272: checking for $ac_word" >&5
3272 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3273   echo $ac_n "(cached) $ac_c" 1>&6
3274 else
3275   if test -n "$CC"; then
3276   ac_cv_prog_CC="$CC" # Let the user override the test.
3277 else
3278   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3279   ac_dummy="$PATH"
3280   for ac_dir in $ac_dummy; do
3281     test -z "$ac_dir" && ac_dir=.
3282     if test -f $ac_dir/$ac_word; then
3283       ac_cv_prog_CC="cl"
3284       break
3285     fi
3286   done
3287   IFS="$ac_save_ifs"
3288 fi
3289 fi
3290 CC="$ac_cv_prog_CC"
3291 if test -n "$CC"; then
3292   echo "$ac_t""$CC" 1>&6
3293 else
3294   echo "$ac_t""no" 1>&6
3295 fi
3296  ;;
3297     esac
3298   fi
3299   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
3300 fi
3301
3302 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works""... $ac_c" 1>&6
3303 echo "configure:3304: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works" >&5
3304
3305 ac_ext=c
3306 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
3307 ac_cpp='$CPP $CPPFLAGS'
3308 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
3309 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
3310 cross_compiling=$ac_cv_prog_cc_cross
3311
3312 cat > conftest.$ac_ext << EOF
3313
3314 #line 3315 "configure"
3315 #include "confdefs.h"
3316
3317 main(){return(0);}
3318 EOF
3319 if { (eval echo configure:3320: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3320   ac_cv_prog_cc_works=yes
3321   # If we can't run a trivial program, we are probably using a cross compiler.
3322   if (./conftest; exit) 2>/dev/null; then
3323     ac_cv_prog_cc_cross=no
3324   else
3325     ac_cv_prog_cc_cross=yes
3326   fi
3327 else
3328   echo "configure: failed program was:" >&5
3329   cat conftest.$ac_ext >&5
3330   ac_cv_prog_cc_works=no
3331 fi
3332 rm -fr conftest*
3333 ac_ext=c
3334 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
3335 ac_cpp='$CPP $CPPFLAGS'
3336 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
3337 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
3338 cross_compiling=$ac_cv_prog_cc_cross
3339
3340 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
3341 if test $ac_cv_prog_cc_works = no; then
3342   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
3343 fi
3344 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
3345 echo "configure:3346: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler" >&5
3346 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
3347 cross_compiling=$ac_cv_prog_cc_cross
3348
3349 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
3350 echo "configure:3351: checking whether we are using GNU C" >&5
3351 if eval "test \"\${ac_cv_prog_gcc+set}\" = set"; then
3352   echo $ac_n "(cached) $ac_c" 1>&6
3353 else
3354   cat > conftest.c <<EOF
3355 #ifdef __GNUC__
3356   yes;
3357 #endif
3358 EOF
3359 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:3360: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
3360   ac_cv_prog_gcc=yes
3361 else
3362   ac_cv_prog_gcc=no
3363 fi
3364 fi
3365
3366 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
3367
3368 if test $ac_cv_prog_gcc = yes; then
3369   GCC=yes
3370 else
3371   GCC=
3372 fi
3373
3374 ac_test_CFLAGS="${CFLAGS+set}"
3375 ac_save_CFLAGS="$CFLAGS"
3376 CFLAGS=
3377 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
3378 echo "configure:3379: checking whether ${CC-cc} accepts -g" >&5
3379 if eval "test \"\${ac_cv_prog_cc_g+set}\" = set"; then
3380   echo $ac_n "(cached) $ac_c" 1>&6
3381 else
3382   echo 'void f(){}' > conftest.c
3383 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
3384   ac_cv_prog_cc_g=yes
3385 else
3386   ac_cv_prog_cc_g=no
3387 fi
3388 rm -f conftest*
3389
3390 fi
3391
3392 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
3393 if test "$ac_test_CFLAGS" = set; then
3394   CFLAGS="$ac_save_CFLAGS"
3395 elif test $ac_cv_prog_cc_g = yes; then
3396   if test "$GCC" = yes; then
3397     CFLAGS="-g -O2"
3398   else
3399     CFLAGS="-g"
3400   fi
3401 else
3402   if test "$GCC" = yes; then
3403     CFLAGS="-O2"
3404   else
3405     CFLAGS=
3406   fi
3407 fi
3408
3409 # Check whether --with-gnu-ld or --without-gnu-ld was given.
3410 if test "${with_gnu_ld+set}" = set; then
3411   withval="$with_gnu_ld"
3412   test "$withval" = no || with_gnu_ld=yes
3413 else
3414   with_gnu_ld=no
3415 fi
3416
3417 ac_prog=ld
3418 if test "$GCC" = yes; then
3419   # Check if gcc -print-prog-name=ld gives a path.
3420   echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
3421 echo "configure:3422: checking for ld used by GCC" >&5
3422   case $host in
3423   *-*-mingw*)
3424     # gcc leaves a trailing carriage return which upsets mingw
3425     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
3426   *)
3427     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
3428   esac
3429   case $ac_prog in
3430     # Accept absolute paths.
3431     [\\/]* | [A-Za-z]:[\\/]*)
3432       re_direlt='/[^/][^/]*/\.\./'
3433       # Canonicalize the path of ld
3434       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
3435       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
3436         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
3437       done
3438       test -z "$LD" && LD="$ac_prog"
3439       ;;
3440   "")
3441     # If it fails, then pretend we aren't using GCC.
3442     ac_prog=ld
3443     ;;
3444   *)
3445     # If it is relative, then search for the first ld in PATH.
3446     with_gnu_ld=unknown
3447     ;;
3448   esac
3449 elif test "$with_gnu_ld" = yes; then
3450   echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
3451 echo "configure:3452: checking for GNU ld" >&5
3452 else
3453   echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
3454 echo "configure:3455: checking for non-GNU ld" >&5
3455 fi
3456 if eval "test \"\${lt_cv_path_LD+set}\" = set"; then
3457   echo $ac_n "(cached) $ac_c" 1>&6
3458 else
3459   if test -z "$LD"; then
3460   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3461   for ac_dir in $PATH; do
3462     test -z "$ac_dir" && ac_dir=.
3463     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
3464       lt_cv_path_LD="$ac_dir/$ac_prog"
3465       # Check to see if the program is GNU ld.  I'd rather use --version,
3466       # but apparently some GNU ld's only accept -v.
3467       # Break only if it was the GNU/non-GNU ld that we prefer.
3468       if "$lt_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
3469         test "$with_gnu_ld" != no && break
3470       else
3471         test "$with_gnu_ld" != yes && break
3472       fi
3473     fi
3474   done
3475   IFS="$ac_save_ifs"
3476 else
3477   lt_cv_path_LD="$LD" # Let the user override the test with a path.
3478 fi
3479 fi
3480
3481 LD="$lt_cv_path_LD"
3482 if test -n "$LD"; then
3483   echo "$ac_t""$LD" 1>&6
3484 else
3485   echo "$ac_t""no" 1>&6
3486 fi
3487 test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
3488 echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
3489 echo "configure:3490: checking if the linker ($LD) is GNU ld" >&5
3490 if eval "test \"\${lt_cv_prog_gnu_ld+set}\" = set"; then
3491   echo $ac_n "(cached) $ac_c" 1>&6
3492 else
3493   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
3494 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
3495   lt_cv_prog_gnu_ld=yes
3496 else
3497   lt_cv_prog_gnu_ld=no
3498 fi
3499 fi
3500
3501 echo "$ac_t""$lt_cv_prog_gnu_ld" 1>&6
3502 with_gnu_ld=$lt_cv_prog_gnu_ld
3503
3504
3505 echo $ac_n "checking for $LD option to reload object files""... $ac_c" 1>&6
3506 echo "configure:3507: checking for $LD option to reload object files" >&5
3507 if eval "test \"\${lt_cv_ld_reload_flag+set}\" = set"; then
3508   echo $ac_n "(cached) $ac_c" 1>&6
3509 else
3510   lt_cv_ld_reload_flag='-r'
3511 fi
3512
3513 echo "$ac_t""$lt_cv_ld_reload_flag" 1>&6
3514 reload_flag=$lt_cv_ld_reload_flag
3515 test -n "$reload_flag" && reload_flag=" $reload_flag"
3516
3517 echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
3518 echo "configure:3519: checking for BSD-compatible nm" >&5
3519 if eval "test \"\${lt_cv_path_NM+set}\" = set"; then
3520   echo $ac_n "(cached) $ac_c" 1>&6
3521 else
3522   if test -n "$NM"; then
3523   # Let the user override the test.
3524   lt_cv_path_NM="$NM"
3525 else
3526   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3527   for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
3528     test -z "$ac_dir" && ac_dir=.
3529     tmp_nm=$ac_dir/${ac_tool_prefix}nm
3530     if test -f $tmp_nm || test -f $tmp_nm$ac_exeext ; then
3531       # Check to see if the nm accepts a BSD-compat flag.
3532       # Adding the `sed 1q' prevents false positives on HP-UX, which says:
3533       #   nm: unknown option "B" ignored
3534       # Tru64's nm complains that /dev/null is an invalid object file
3535       if ($tmp_nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then
3536         lt_cv_path_NM="$tmp_nm -B"
3537         break
3538       elif ($tmp_nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
3539         lt_cv_path_NM="$tmp_nm -p"
3540         break
3541       else
3542         lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
3543         continue # so that we can try to find one that supports BSD flags
3544       fi
3545     fi
3546   done
3547   IFS="$ac_save_ifs"
3548   test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
3549 fi
3550 fi
3551
3552 NM="$lt_cv_path_NM"
3553 echo "$ac_t""$NM" 1>&6
3554
3555 echo $ac_n "checking for a sed that does not truncate output""... $ac_c" 1>&6
3556 echo "configure:3557: checking for a sed that does not truncate output" >&5
3557 if eval "test \"\${lt_cv_path_SED+set}\" = set"; then
3558   echo $ac_n "(cached) $ac_c" 1>&6
3559 else
3560   # Loop through the user's path and test for sed and gsed.
3561 # Then use that list of sed's as ones to test for truncation.
3562 as_executable_p="test -f"
3563 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3564 for as_dir in $PATH
3565 do
3566   IFS=$as_save_IFS
3567   test -z "$as_dir" && as_dir=.
3568   for ac_prog in sed gsed; do
3569     for ac_exec_ext in '' $ac_executable_extensions; do
3570       if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
3571         _sed_list="$_sed_list $as_dir/$ac_prog$ac_exec_ext"
3572       fi
3573     done
3574   done
3575 done
3576
3577   # Create a temporary directory, and hook for its removal unless debugging.
3578 $debug ||
3579 {
3580   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
3581   trap '{ (exit 1); exit 1; }' 1 2 13 15
3582 }
3583
3584 # Create a (secure) tmp directory for tmp files.
3585 : ${TMPDIR=/tmp}
3586 {
3587   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/sedXXXXXX") 2>/dev/null` &&
3588   test -n "$tmp" && test -d "$tmp"
3589 }  ||
3590 {
3591   tmp=$TMPDIR/sed$$-$RANDOM
3592   (umask 077 && mkdir $tmp)
3593 } ||
3594 {
3595    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
3596    { (exit 1); exit 1; }
3597 }
3598   _max=0
3599   _count=0
3600   # Add /usr/xpg4/bin/sed as it is typically found on Solaris
3601   # along with /bin/sed that truncates output.
3602   for _sed in $_sed_list /usr/xpg4/bin/sed; do
3603     test ! -f ${_sed} && break
3604     cat /dev/null > "$tmp/sed.in"
3605     _count=0
3606     echo ${ECHO_N-$ac_n} "0123456789${ECHO_C-$ac_c}" >"$tmp/sed.in"
3607     # Check for GNU sed and select it if it is found.
3608     if "${_sed}" --version 2>&1 < /dev/null | egrep '(GNU)' > /dev/null; then
3609       lt_cv_path_SED=${_sed}
3610       break
3611     fi
3612     while true; do
3613       cat "$tmp/sed.in" "$tmp/sed.in" >"$tmp/sed.tmp"
3614       mv "$tmp/sed.tmp" "$tmp/sed.in"
3615       cp "$tmp/sed.in" "$tmp/sed.nl"
3616       echo >>"$tmp/sed.nl"
3617       ${_sed} -e 's/a$//' < "$tmp/sed.nl" >"$tmp/sed.out" || break
3618       cmp -s "$tmp/sed.out" "$tmp/sed.nl" || break
3619       # 40000 chars as input seems more than enough
3620       test $_count -gt 10 && break
3621       _count=`expr $_count + 1`
3622       if test $_count -gt $_max; then
3623         _max=$_count
3624         lt_cv_path_SED=$_sed
3625       fi
3626     done
3627   done
3628   rm -rf "$tmp"
3629
3630 fi
3631
3632 if test "X$SED" != "X"; then
3633   lt_cv_path_SED=$SED
3634 else
3635   SED=$lt_cv_path_SED
3636 fi
3637 echo "$ac_t""$SED" 1>&6
3638
3639 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
3640 echo "configure:3641: checking whether ln -s works" >&5
3641 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
3642   echo $ac_n "(cached) $ac_c" 1>&6
3643 else
3644   rm -f conftestdata
3645 if ln -s X conftestdata 2>/dev/null
3646 then
3647   rm -f conftestdata
3648   ac_cv_prog_LN_S="ln -s"
3649 else
3650   ac_cv_prog_LN_S=ln
3651 fi
3652 fi
3653 LN_S="$ac_cv_prog_LN_S"
3654 if test "$ac_cv_prog_LN_S" = "ln -s"; then
3655   echo "$ac_t""yes" 1>&6
3656 else
3657   echo "$ac_t""no" 1>&6
3658 fi
3659
3660 echo $ac_n "checking how to recognise dependent libraries""... $ac_c" 1>&6
3661 echo "configure:3662: checking how to recognise dependent libraries" >&5
3662 if eval "test \"\${lt_cv_deplibs_check_method+set}\" = set"; then
3663   echo $ac_n "(cached) $ac_c" 1>&6
3664 else
3665   lt_cv_file_magic_cmd='$MAGIC_CMD'
3666 lt_cv_file_magic_test_file=
3667 lt_cv_deplibs_check_method='unknown'
3668 # Need to set the preceding variable on all platforms that support
3669 # interlibrary dependencies.
3670 # 'none' -- dependencies not supported.
3671 # `unknown' -- same as none, but documents that we really don't know.
3672 # 'pass_all' -- all dependencies passed with no checks.
3673 # 'test_compile' -- check by making test program.
3674 # 'file_magic [[regex]]' -- check by looking for files in library path
3675 # which responds to the $file_magic_cmd with a given egrep regex.
3676 # If you have `file' or equivalent on your system and you're not sure
3677 # whether `pass_all' will *always* work, you probably want this one.
3678
3679 case $host_os in
3680 aix4* | aix5*)
3681   lt_cv_deplibs_check_method=pass_all
3682   ;;
3683
3684 beos*)
3685   lt_cv_deplibs_check_method=pass_all
3686   ;;
3687
3688 bsdi4*)
3689   lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
3690   lt_cv_file_magic_cmd='/usr/bin/file -L'
3691   lt_cv_file_magic_test_file=/shlib/libc.so
3692   ;;
3693
3694 cygwin* | mingw* | pw32*)
3695   lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
3696   lt_cv_file_magic_cmd='$OBJDUMP -f'
3697   ;;
3698
3699 darwin* | rhapsody*)
3700   lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library'
3701   lt_cv_file_magic_cmd='/usr/bin/file -L'
3702   case "$host_os" in
3703   rhapsody* | darwin1.[012])
3704     lt_cv_file_magic_test_file=`echo /System/Library/Frameworks/System.framework/Versions/*/System | head -1`
3705     ;;
3706   *) # Darwin 1.3 on
3707     lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
3708     ;;
3709   esac
3710   ;;
3711
3712 freebsd*)
3713   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3714     case $host_cpu in
3715     i*86 )
3716       # Not sure whether the presence of OpenBSD here was a mistake.
3717       # Let's accept both of them until this is cleared up.
3718       lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[3-9]86 (compact )?demand paged shared library'
3719       lt_cv_file_magic_cmd=/usr/bin/file
3720       lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3721       ;;
3722     esac
3723   else
3724     lt_cv_deplibs_check_method=pass_all
3725   fi
3726   ;;
3727
3728 gnu*)
3729   lt_cv_deplibs_check_method=pass_all
3730   ;;
3731
3732 hpux10.20*|hpux11*)
3733   lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library'
3734   lt_cv_file_magic_cmd=/usr/bin/file
3735   lt_cv_file_magic_test_file=/usr/lib/libc.sl
3736   ;;
3737
3738 irix5* | irix6* | nonstopux*)
3739   case $host_os in
3740   irix5* | nonstopux*)
3741     # this will be overridden with pass_all, but let us keep it just in case
3742     lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
3743     ;;
3744   *)
3745     case $LD in
3746     *-32|*"-32 ") libmagic=32-bit;;
3747     *-n32|*"-n32 ") libmagic=N32;;
3748     *-64|*"-64 ") libmagic=64-bit;;
3749     *) libmagic=never-match;;
3750     esac
3751     # this will be overridden with pass_all, but let us keep it just in case
3752     lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[1234] dynamic lib MIPS - version 1"
3753     ;;
3754   esac
3755   lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
3756   lt_cv_deplibs_check_method=pass_all
3757   ;;
3758
3759 # This must be Linux ELF.
3760 linux-gnu*)
3761   case $host_cpu in
3762   alpha* | hppa* | i*86 | mips | mipsel | powerpc* | sparc* | ia64*)
3763     lt_cv_deplibs_check_method=pass_all ;;
3764   *)
3765     # glibc up to 2.1.1 does not perform some relocations on ARM
3766     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;;
3767   esac
3768   lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
3769   ;;
3770
3771 netbsd*)
3772   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3773     lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
3774   else
3775     lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so$'
3776   fi
3777   ;;
3778
3779 newos6*)
3780   lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
3781   lt_cv_file_magic_cmd=/usr/bin/file
3782   lt_cv_file_magic_test_file=/usr/lib/libnls.so
3783   ;;
3784
3785 openbsd*)
3786   lt_cv_file_magic_cmd=/usr/bin/file
3787   lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3788   if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
3789     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB shared object'
3790   else
3791     lt_cv_deplibs_check_method='file_magic OpenBSD.* shared library'
3792   fi
3793   ;;
3794
3795 openedition*)
3796   lt_cv_deplibs_check_method=pass_all
3797   ;;
3798
3799 osf3* | osf4* | osf5*)
3800   # this will be overridden with pass_all, but let us keep it just in case
3801   lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
3802   lt_cv_file_magic_test_file=/shlib/libc.so
3803   lt_cv_deplibs_check_method=pass_all
3804   ;;
3805
3806 sco3.2v5*)
3807   lt_cv_deplibs_check_method=pass_all
3808   ;;
3809
3810 solaris*)
3811   lt_cv_deplibs_check_method=pass_all
3812   lt_cv_file_magic_test_file=/lib/libc.so
3813   ;;
3814
3815 sysv5uw[78]* | sysv4*uw2*)
3816   lt_cv_deplibs_check_method=pass_all
3817   ;;
3818
3819 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
3820   case $host_vendor in
3821   motorola)
3822     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]'
3823     lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
3824     ;;
3825   ncr)
3826     lt_cv_deplibs_check_method=pass_all
3827     ;;
3828   sequent)
3829     lt_cv_file_magic_cmd='/bin/file'
3830     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'
3831     ;;
3832   sni)
3833     lt_cv_file_magic_cmd='/bin/file'
3834     lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib"
3835     lt_cv_file_magic_test_file=/lib/libc.so
3836     ;;
3837   siemens)
3838     lt_cv_deplibs_check_method=pass_all
3839     ;;
3840   esac
3841   ;;
3842 esac
3843
3844 fi
3845
3846 echo "$ac_t""$lt_cv_deplibs_check_method" 1>&6
3847 file_magic_cmd=$lt_cv_file_magic_cmd
3848 deplibs_check_method=$lt_cv_deplibs_check_method
3849
3850 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
3851 echo "configure:3852: checking for object suffix" >&5
3852 if eval "test \"\${ac_cv_objext+set}\" = set"; then
3853   echo $ac_n "(cached) $ac_c" 1>&6
3854 else
3855   rm -f conftest*
3856 echo 'int i = 1;' > conftest.$ac_ext
3857 if { (eval echo configure:3858: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3858   for ac_file in conftest.*; do
3859     case $ac_file in
3860     *.c) ;;
3861     *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
3862     esac
3863   done
3864 else
3865   { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
3866 fi
3867 rm -f conftest*
3868 fi
3869
3870 echo "$ac_t""$ac_cv_objext" 1>&6
3871 OBJEXT=$ac_cv_objext
3872 ac_objext=$ac_cv_objext
3873
3874
3875
3876
3877 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
3878 echo "configure:3879: checking for executable suffix" >&5
3879 if eval "test \"\${ac_cv_exeext+set}\" = set"; then
3880   echo $ac_n "(cached) $ac_c" 1>&6
3881 else
3882   if test "$CYGWIN" = yes || test "$MINGW32" = yes || test "$EMXOS2" = yes; then
3883   ac_cv_exeext=.exe
3884 else
3885   rm -f conftest*
3886   echo 'int main () { return 0; }' > conftest.$ac_ext
3887   ac_cv_exeext=
3888   if { (eval echo configure:3889: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
3889     for file in conftest.*; do
3890       case $file in
3891       *.c | *.C | *.o | *.obj | *.xcoff) ;;
3892       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
3893       esac
3894     done
3895   else
3896     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
3897   fi
3898   rm -f conftest*
3899   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
3900 fi
3901 fi
3902
3903 EXEEXT=""
3904 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
3905 echo "$ac_t""${ac_cv_exeext}" 1>&6
3906 ac_exeext=$EXEEXT
3907
3908 if test $host != $build; then
3909   ac_tool_prefix=${host_alias}-
3910 else
3911   ac_tool_prefix=
3912 fi
3913
3914
3915
3916
3917 # Check for command to grab the raw symbol name followed by C symbol from nm.
3918 echo $ac_n "checking command to parse $NM output""... $ac_c" 1>&6
3919 echo "configure:3920: checking command to parse $NM output" >&5
3920 if eval "test \"\${lt_cv_sys_global_symbol_pipe+set}\" = set"; then
3921   echo $ac_n "(cached) $ac_c" 1>&6
3922 else
3923   
3924 # These are sane defaults that work on at least a few old systems.
3925 # [They come from Ultrix.  What could be older than Ultrix?!! ;)]
3926
3927 # Character class describing NM global symbol codes.
3928 symcode='[BCDEGRST]'
3929
3930 # Regexp to match symbols that can be accessed directly from C.
3931 sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
3932
3933 # Transform the above into a raw symbol and a C symbol.
3934 symxfrm='\1 \2\3 \3'
3935
3936 # Transform an extracted symbol line into a proper C declaration
3937 lt_cv_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern char \1;/p'"
3938
3939 # Transform an extracted symbol line into symbol name and symbol address
3940 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'"
3941
3942 # Define system-specific variables.
3943 case $host_os in
3944 aix*)
3945   symcode='[BCDT]'
3946   ;;
3947 cygwin* | mingw* | pw32*)
3948   symcode='[ABCDGISTW]'
3949   ;;
3950 hpux*) # Its linker distinguishes data from code symbols
3951   lt_cv_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern char \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
3952   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'"
3953   ;;
3954 irix* | nonstopux*)
3955   symcode='[BCDEGRST]'
3956   ;;
3957 osf*)
3958   symcode='[BCDEGQRST]'
3959   ;;
3960 solaris* | sysv5*)
3961   symcode='[BDT]'
3962   ;;
3963 sysv4)
3964   symcode='[DFNSTU]'
3965   ;;
3966 esac
3967
3968 # Handle CRLF in mingw tool chain
3969 opt_cr=
3970 case $host_os in
3971 mingw*)
3972   opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
3973   ;;
3974 esac
3975
3976 # If we're using GNU nm, then use its standard symbol codes.
3977 if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then
3978   symcode='[ABCDGISTW]'
3979 fi
3980
3981 # Try without a prefix undercore, then with it.
3982 for ac_symprfx in "" "_"; do
3983
3984   # Write the raw and C identifiers.
3985 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[         ]\($symcode$symcode*\)[         ][      ]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'"
3986
3987   # Check to see that the pipe works correctly.
3988   pipe_works=no
3989   rm -f conftest*
3990   cat > conftest.$ac_ext <<EOF
3991 #ifdef __cplusplus
3992 extern "C" {
3993 #endif
3994 char nm_test_var;
3995 void nm_test_func(){}
3996 #ifdef __cplusplus
3997 }
3998 #endif
3999 int main(){nm_test_var='a';nm_test_func();return(0);}
4000 EOF
4001
4002   if { (eval echo configure:4003: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4003     # Now try to grab the symbols.
4004     nlist=conftest.nm
4005     if { (eval echo configure:4006: \"$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
4006       # Try sorting and uniquifying the output.
4007       if sort "$nlist" | uniq > "$nlist"T; then
4008         mv -f "$nlist"T "$nlist"
4009       else
4010         rm -f "$nlist"T
4011       fi
4012
4013       # Make sure that we snagged all the symbols we need.
4014       if egrep ' nm_test_var$' "$nlist" >/dev/null; then
4015         if egrep ' nm_test_func$' "$nlist" >/dev/null; then
4016           cat <<EOF > conftest.$ac_ext
4017 #ifdef __cplusplus
4018 extern "C" {
4019 #endif
4020
4021 EOF
4022           # Now generate the symbol file.
4023           eval "$lt_cv_global_symbol_to_cdecl"' < "$nlist" >> conftest.$ac_ext'
4024
4025           cat <<EOF >> conftest.$ac_ext
4026 #if defined (__STDC__) && __STDC__
4027 # define lt_ptr void *
4028 #else
4029 # define lt_ptr char *
4030 # define const
4031 #endif
4032
4033 /* The mapping between symbol names and symbols. */
4034 const struct {
4035   const char *name;
4036   lt_ptr address;
4037 }
4038 lt_preloaded_symbols[] =
4039 {
4040 EOF
4041           sed "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (lt_ptr) \&\2},/" < "$nlist" >> conftest.$ac_ext
4042           cat <<\EOF >> conftest.$ac_ext
4043   {0, (lt_ptr) 0}
4044 };
4045
4046 #ifdef __cplusplus
4047 }
4048 #endif
4049 EOF
4050           # Now try linking the two files.
4051           mv conftest.$ac_objext conftstm.$ac_objext
4052           save_LIBS="$LIBS"
4053           save_CFLAGS="$CFLAGS"
4054           LIBS="conftstm.$ac_objext"
4055           CFLAGS="$CFLAGS$no_builtin_flag"
4056           if { (eval echo configure:4057: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest$ac_exeext; then
4057             pipe_works=yes
4058           fi
4059           LIBS="$save_LIBS"
4060           CFLAGS="$save_CFLAGS"
4061         else
4062           echo "cannot find nm_test_func in $nlist" >&5
4063         fi
4064       else
4065         echo "cannot find nm_test_var in $nlist" >&5
4066       fi
4067     else
4068       echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5
4069     fi
4070   else
4071     echo "$progname: failed program was:" >&5
4072     cat conftest.$ac_ext >&5
4073   fi
4074   rm -f conftest* conftst*
4075
4076   # Do not use the global_symbol_pipe unless it works.
4077   if test "$pipe_works" = yes; then
4078     break
4079   else
4080     lt_cv_sys_global_symbol_pipe=
4081   fi
4082 done
4083
4084 fi
4085
4086 global_symbol_pipe="$lt_cv_sys_global_symbol_pipe"
4087 if test -z "$lt_cv_sys_global_symbol_pipe"; then
4088   global_symbol_to_cdecl=
4089   global_symbol_to_c_name_address=
4090 else
4091   global_symbol_to_cdecl="$lt_cv_global_symbol_to_cdecl"
4092   global_symbol_to_c_name_address="$lt_cv_global_symbol_to_c_name_address"
4093 fi
4094 if test -z "$global_symbol_pipe$global_symbol_to_cdec$global_symbol_to_c_name_address";
4095 then
4096   echo "$ac_t""failed" 1>&6
4097 else
4098   echo "$ac_t""ok" 1>&6
4099 fi
4100
4101 for ac_hdr in dlfcn.h
4102 do
4103 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4104 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4105 echo "configure:4106: checking for $ac_hdr" >&5
4106 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
4107   echo $ac_n "(cached) $ac_c" 1>&6
4108 else
4109   cat > conftest.$ac_ext <<EOF
4110 #line 4111 "configure"
4111 #include "confdefs.h"
4112 #include <$ac_hdr>
4113 EOF
4114 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4115 { (eval echo configure:4116: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4116 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4117 if test -z "$ac_err"; then
4118   rm -rf conftest*
4119   eval "ac_cv_header_$ac_safe=yes"
4120 else
4121   echo "$ac_err" >&5
4122   echo "configure: failed program was:" >&5
4123   cat conftest.$ac_ext >&5
4124   rm -rf conftest*
4125   eval "ac_cv_header_$ac_safe=no"
4126 fi
4127 rm -f conftest*
4128 fi
4129 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4130   echo "$ac_t""yes" 1>&6
4131     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4132   cat >> confdefs.h <<EOF
4133 #define $ac_tr_hdr 1
4134 EOF
4135  
4136 else
4137   echo "$ac_t""no" 1>&6
4138 fi
4139 done
4140
4141
4142
4143
4144
4145
4146 # Only perform the check for file, if the check method requires it
4147 case $deplibs_check_method in
4148 file_magic*)
4149   if test "$file_magic_cmd" = '$MAGIC_CMD'; then
4150     echo $ac_n "checking for ${ac_tool_prefix}file""... $ac_c" 1>&6
4151 echo "configure:4152: checking for ${ac_tool_prefix}file" >&5
4152 if eval "test \"\${lt_cv_path_MAGIC_CMD+set}\" = set"; then
4153   echo $ac_n "(cached) $ac_c" 1>&6
4154 else
4155   case $MAGIC_CMD in
4156   /*)
4157   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
4158   ;;
4159   ?:/*)
4160   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
4161   ;;
4162   *)
4163   ac_save_MAGIC_CMD="$MAGIC_CMD"
4164   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4165   ac_dummy="/usr/bin:$PATH"
4166   for ac_dir in $ac_dummy; do
4167     test -z "$ac_dir" && ac_dir=.
4168     if test -f $ac_dir/${ac_tool_prefix}file; then
4169       lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file"
4170       if test -n "$file_magic_test_file"; then
4171         case $deplibs_check_method in
4172         "file_magic "*)
4173           file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
4174           MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4175           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
4176             egrep "$file_magic_regex" > /dev/null; then
4177             :
4178           else
4179             cat <<EOF 1>&2
4180
4181 *** Warning: the command libtool uses to detect shared libraries,
4182 *** $file_magic_cmd, produces output that libtool cannot recognize.
4183 *** The result is that libtool may fail to recognize shared libraries
4184 *** as such.  This will affect the creation of libtool libraries that
4185 *** depend on shared libraries, but programs linked with such libtool
4186 *** libraries will work regardless of this problem.  Nevertheless, you
4187 *** may want to report the problem to your system manager and/or to
4188 *** bug-libtool@gnu.org
4189
4190 EOF
4191           fi ;;
4192         esac
4193       fi
4194       break
4195     fi
4196   done
4197   IFS="$ac_save_ifs"
4198   MAGIC_CMD="$ac_save_MAGIC_CMD"
4199   ;;
4200 esac
4201 fi
4202
4203 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4204 if test -n "$MAGIC_CMD"; then
4205   echo "$ac_t""$MAGIC_CMD" 1>&6
4206 else
4207   echo "$ac_t""no" 1>&6
4208 fi
4209
4210 if test -z "$lt_cv_path_MAGIC_CMD"; then
4211   if test -n "$ac_tool_prefix"; then
4212     echo $ac_n "checking for file""... $ac_c" 1>&6
4213 echo "configure:4214: checking for file" >&5
4214 if eval "test \"\${lt_cv_path_MAGIC_CMD+set}\" = set"; then
4215   echo $ac_n "(cached) $ac_c" 1>&6
4216 else
4217   case $MAGIC_CMD in
4218   /*)
4219   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
4220   ;;
4221   ?:/*)
4222   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
4223   ;;
4224   *)
4225   ac_save_MAGIC_CMD="$MAGIC_CMD"
4226   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4227   ac_dummy="/usr/bin:$PATH"
4228   for ac_dir in $ac_dummy; do
4229     test -z "$ac_dir" && ac_dir=.
4230     if test -f $ac_dir/file; then
4231       lt_cv_path_MAGIC_CMD="$ac_dir/file"
4232       if test -n "$file_magic_test_file"; then
4233         case $deplibs_check_method in
4234         "file_magic "*)
4235           file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
4236           MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4237           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
4238             egrep "$file_magic_regex" > /dev/null; then
4239             :
4240           else
4241             cat <<EOF 1>&2
4242
4243 *** Warning: the command libtool uses to detect shared libraries,
4244 *** $file_magic_cmd, produces output that libtool cannot recognize.
4245 *** The result is that libtool may fail to recognize shared libraries
4246 *** as such.  This will affect the creation of libtool libraries that
4247 *** depend on shared libraries, but programs linked with such libtool
4248 *** libraries will work regardless of this problem.  Nevertheless, you
4249 *** may want to report the problem to your system manager and/or to
4250 *** bug-libtool@gnu.org
4251
4252 EOF
4253           fi ;;
4254         esac
4255       fi
4256       break
4257     fi
4258   done
4259   IFS="$ac_save_ifs"
4260   MAGIC_CMD="$ac_save_MAGIC_CMD"
4261   ;;
4262 esac
4263 fi
4264
4265 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4266 if test -n "$MAGIC_CMD"; then
4267   echo "$ac_t""$MAGIC_CMD" 1>&6
4268 else
4269   echo "$ac_t""no" 1>&6
4270 fi
4271
4272   else
4273     MAGIC_CMD=:
4274   fi
4275 fi
4276
4277   fi
4278   ;;
4279 esac
4280
4281 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4282 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
4283 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4284 echo "configure:4285: checking for $ac_word" >&5
4285 if eval "test \"\${ac_cv_prog_RANLIB+set}\" = set"; then
4286   echo $ac_n "(cached) $ac_c" 1>&6
4287 else
4288   if test -n "$RANLIB"; then
4289   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4290 else
4291   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4292   ac_dummy="$PATH"
4293   for ac_dir in $ac_dummy; do
4294     test -z "$ac_dir" && ac_dir=.
4295     if test -f $ac_dir/$ac_word; then
4296       ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4297       break
4298     fi
4299   done
4300   IFS="$ac_save_ifs"
4301 fi
4302 fi
4303 RANLIB="$ac_cv_prog_RANLIB"
4304 if test -n "$RANLIB"; then
4305   echo "$ac_t""$RANLIB" 1>&6
4306 else
4307   echo "$ac_t""no" 1>&6
4308 fi
4309
4310
4311 if test -z "$ac_cv_prog_RANLIB"; then
4312 if test -n "$ac_tool_prefix"; then
4313   # Extract the first word of "ranlib", so it can be a program name with args.
4314 set dummy ranlib; ac_word=$2
4315 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4316 echo "configure:4317: checking for $ac_word" >&5
4317 if eval "test \"\${ac_cv_prog_RANLIB+set}\" = set"; then
4318   echo $ac_n "(cached) $ac_c" 1>&6
4319 else
4320   if test -n "$RANLIB"; then
4321   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4322 else
4323   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4324   ac_dummy="$PATH"
4325   for ac_dir in $ac_dummy; do
4326     test -z "$ac_dir" && ac_dir=.
4327     if test -f $ac_dir/$ac_word; then
4328       ac_cv_prog_RANLIB="ranlib"
4329       break
4330     fi
4331   done
4332   IFS="$ac_save_ifs"
4333   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
4334 fi
4335 fi
4336 RANLIB="$ac_cv_prog_RANLIB"
4337 if test -n "$RANLIB"; then
4338   echo "$ac_t""$RANLIB" 1>&6
4339 else
4340   echo "$ac_t""no" 1>&6
4341 fi
4342
4343 else
4344   RANLIB=":"
4345 fi
4346 fi
4347
4348 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
4349 set dummy ${ac_tool_prefix}strip; ac_word=$2
4350 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4351 echo "configure:4352: checking for $ac_word" >&5
4352 if eval "test \"\${ac_cv_prog_STRIP+set}\" = set"; then
4353   echo $ac_n "(cached) $ac_c" 1>&6
4354 else
4355   if test -n "$STRIP"; then
4356   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
4357 else
4358   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4359   ac_dummy="$PATH"
4360   for ac_dir in $ac_dummy; do
4361     test -z "$ac_dir" && ac_dir=.
4362     if test -f $ac_dir/$ac_word; then
4363       ac_cv_prog_STRIP="${ac_tool_prefix}strip"
4364       break
4365     fi
4366   done
4367   IFS="$ac_save_ifs"
4368 fi
4369 fi
4370 STRIP="$ac_cv_prog_STRIP"
4371 if test -n "$STRIP"; then
4372   echo "$ac_t""$STRIP" 1>&6
4373 else
4374   echo "$ac_t""no" 1>&6
4375 fi
4376
4377
4378 if test -z "$ac_cv_prog_STRIP"; then
4379 if test -n "$ac_tool_prefix"; then
4380   # Extract the first word of "strip", so it can be a program name with args.
4381 set dummy strip; ac_word=$2
4382 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4383 echo "configure:4384: checking for $ac_word" >&5
4384 if eval "test \"\${ac_cv_prog_STRIP+set}\" = set"; then
4385   echo $ac_n "(cached) $ac_c" 1>&6
4386 else
4387   if test -n "$STRIP"; then
4388   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
4389 else
4390   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4391   ac_dummy="$PATH"
4392   for ac_dir in $ac_dummy; do
4393     test -z "$ac_dir" && ac_dir=.
4394     if test -f $ac_dir/$ac_word; then
4395       ac_cv_prog_STRIP="strip"
4396       break
4397     fi
4398   done
4399   IFS="$ac_save_ifs"
4400   test -z "$ac_cv_prog_STRIP" && ac_cv_prog_STRIP=":"
4401 fi
4402 fi
4403 STRIP="$ac_cv_prog_STRIP"
4404 if test -n "$STRIP"; then
4405   echo "$ac_t""$STRIP" 1>&6
4406 else
4407   echo "$ac_t""no" 1>&6
4408 fi
4409
4410 else
4411   STRIP=":"
4412 fi
4413 fi
4414
4415
4416 enable_dlopen=yes
4417 enable_win32_dll=yes
4418
4419 # Check whether --enable-libtool-lock or --disable-libtool-lock was given.
4420 if test "${enable_libtool_lock+set}" = set; then
4421   enableval="$enable_libtool_lock"
4422   :
4423 fi
4424
4425 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
4426
4427 # Some flags need to be propagated to the compiler or linker for good
4428 # libtool support.
4429 case $host in
4430 *-*-irix6*)
4431   # Find out which ABI we are using.
4432   echo '#line 4433 "configure"' > conftest.$ac_ext
4433   if { (eval echo configure:4434: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4434     case `/usr/bin/file conftest.$ac_objext` in
4435     *32-bit*)
4436       LD="${LD-ld} -32"
4437       ;;
4438     *N32*)
4439       LD="${LD-ld} -n32"
4440       ;;
4441     *64-bit*)
4442       LD="${LD-ld} -64"
4443       ;;
4444     esac
4445   fi
4446   rm -rf conftest*
4447   ;;
4448
4449 *-*-sco3.2v5*)
4450   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
4451   SAVE_CFLAGS="$CFLAGS"
4452   CFLAGS="$CFLAGS -belf"
4453   echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
4454 echo "configure:4455: checking whether the C compiler needs -belf" >&5
4455 if eval "test \"\${lt_cv_cc_needs_belf+set}\" = set"; then
4456   echo $ac_n "(cached) $ac_c" 1>&6
4457 else
4458   
4459      ac_ext=c
4460 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
4461 ac_cpp='$CPP $CPPFLAGS'
4462 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
4463 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
4464 cross_compiling=$ac_cv_prog_cc_cross
4465
4466      cat > conftest.$ac_ext <<EOF
4467 #line 4468 "configure"
4468 #include "confdefs.h"
4469
4470 int main() {
4471
4472 ; return 0; }
4473 EOF
4474 if { (eval echo configure:4475: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4475   rm -rf conftest*
4476   lt_cv_cc_needs_belf=yes
4477 else
4478   echo "configure: failed program was:" >&5
4479   cat conftest.$ac_ext >&5
4480   rm -rf conftest*
4481   lt_cv_cc_needs_belf=no
4482 fi
4483 rm -f conftest*
4484      ac_ext=c
4485 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
4486 ac_cpp='$CPP $CPPFLAGS'
4487 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
4488 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
4489 cross_compiling=$ac_cv_prog_cc_cross
4490
4491 fi
4492
4493 echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6
4494   if test x"$lt_cv_cc_needs_belf" != x"yes"; then
4495     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
4496     CFLAGS="$SAVE_CFLAGS"
4497   fi
4498   ;;
4499
4500 *-*-cygwin* | *-*-mingw* | *-*-pw32*)
4501   # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
4502 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
4503 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4504 echo "configure:4505: checking for $ac_word" >&5
4505 if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then
4506   echo $ac_n "(cached) $ac_c" 1>&6
4507 else
4508   if test -n "$DLLTOOL"; then
4509   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
4510 else
4511   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4512   ac_dummy="$PATH"
4513   for ac_dir in $ac_dummy; do
4514     test -z "$ac_dir" && ac_dir=.
4515     if test -f $ac_dir/$ac_word; then
4516       ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
4517       break
4518     fi
4519   done
4520   IFS="$ac_save_ifs"
4521 fi
4522 fi
4523 DLLTOOL="$ac_cv_prog_DLLTOOL"
4524 if test -n "$DLLTOOL"; then
4525   echo "$ac_t""$DLLTOOL" 1>&6
4526 else
4527   echo "$ac_t""no" 1>&6
4528 fi
4529
4530
4531 if test -z "$ac_cv_prog_DLLTOOL"; then
4532 if test -n "$ac_tool_prefix"; then
4533   # Extract the first word of "dlltool", so it can be a program name with args.
4534 set dummy dlltool; ac_word=$2
4535 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4536 echo "configure:4537: checking for $ac_word" >&5
4537 if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then
4538   echo $ac_n "(cached) $ac_c" 1>&6
4539 else
4540   if test -n "$DLLTOOL"; then
4541   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
4542 else
4543   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4544   ac_dummy="$PATH"
4545   for ac_dir in $ac_dummy; do
4546     test -z "$ac_dir" && ac_dir=.
4547     if test -f $ac_dir/$ac_word; then
4548       ac_cv_prog_DLLTOOL="dlltool"
4549       break
4550     fi
4551   done
4552   IFS="$ac_save_ifs"
4553   test -z "$ac_cv_prog_DLLTOOL" && ac_cv_prog_DLLTOOL="false"
4554 fi
4555 fi
4556 DLLTOOL="$ac_cv_prog_DLLTOOL"
4557 if test -n "$DLLTOOL"; then
4558   echo "$ac_t""$DLLTOOL" 1>&6
4559 else
4560   echo "$ac_t""no" 1>&6
4561 fi
4562
4563 else
4564   DLLTOOL="false"
4565 fi
4566 fi
4567
4568   # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
4569 set dummy ${ac_tool_prefix}as; ac_word=$2
4570 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4571 echo "configure:4572: checking for $ac_word" >&5
4572 if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then
4573   echo $ac_n "(cached) $ac_c" 1>&6
4574 else
4575   if test -n "$AS"; then
4576   ac_cv_prog_AS="$AS" # Let the user override the test.
4577 else
4578   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4579   ac_dummy="$PATH"
4580   for ac_dir in $ac_dummy; do
4581     test -z "$ac_dir" && ac_dir=.
4582     if test -f $ac_dir/$ac_word; then
4583       ac_cv_prog_AS="${ac_tool_prefix}as"
4584       break
4585     fi
4586   done
4587   IFS="$ac_save_ifs"
4588 fi
4589 fi
4590 AS="$ac_cv_prog_AS"
4591 if test -n "$AS"; then
4592   echo "$ac_t""$AS" 1>&6
4593 else
4594   echo "$ac_t""no" 1>&6
4595 fi
4596
4597
4598 if test -z "$ac_cv_prog_AS"; then
4599 if test -n "$ac_tool_prefix"; then
4600   # Extract the first word of "as", so it can be a program name with args.
4601 set dummy as; ac_word=$2
4602 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4603 echo "configure:4604: checking for $ac_word" >&5
4604 if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then
4605   echo $ac_n "(cached) $ac_c" 1>&6
4606 else
4607   if test -n "$AS"; then
4608   ac_cv_prog_AS="$AS" # Let the user override the test.
4609 else
4610   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4611   ac_dummy="$PATH"
4612   for ac_dir in $ac_dummy; do
4613     test -z "$ac_dir" && ac_dir=.
4614     if test -f $ac_dir/$ac_word; then
4615       ac_cv_prog_AS="as"
4616       break
4617     fi
4618   done
4619   IFS="$ac_save_ifs"
4620   test -z "$ac_cv_prog_AS" && ac_cv_prog_AS="false"
4621 fi
4622 fi
4623 AS="$ac_cv_prog_AS"
4624 if test -n "$AS"; then
4625   echo "$ac_t""$AS" 1>&6
4626 else
4627   echo "$ac_t""no" 1>&6
4628 fi
4629
4630 else
4631   AS="false"
4632 fi
4633 fi
4634
4635   # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
4636 set dummy ${ac_tool_prefix}objdump; ac_word=$2
4637 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4638 echo "configure:4639: checking for $ac_word" >&5
4639 if eval "test \"\${ac_cv_prog_OBJDUMP+set}\" = set"; then
4640   echo $ac_n "(cached) $ac_c" 1>&6
4641 else
4642   if test -n "$OBJDUMP"; then
4643   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
4644 else
4645   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4646   ac_dummy="$PATH"
4647   for ac_dir in $ac_dummy; do
4648     test -z "$ac_dir" && ac_dir=.
4649     if test -f $ac_dir/$ac_word; then
4650       ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
4651       break
4652     fi
4653   done
4654   IFS="$ac_save_ifs"
4655 fi
4656 fi
4657 OBJDUMP="$ac_cv_prog_OBJDUMP"
4658 if test -n "$OBJDUMP"; then
4659   echo "$ac_t""$OBJDUMP" 1>&6
4660 else
4661   echo "$ac_t""no" 1>&6
4662 fi
4663
4664
4665 if test -z "$ac_cv_prog_OBJDUMP"; then
4666 if test -n "$ac_tool_prefix"; then
4667   # Extract the first word of "objdump", so it can be a program name with args.
4668 set dummy objdump; ac_word=$2
4669 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4670 echo "configure:4671: checking for $ac_word" >&5
4671 if eval "test \"\${ac_cv_prog_OBJDUMP+set}\" = set"; then
4672   echo $ac_n "(cached) $ac_c" 1>&6
4673 else
4674   if test -n "$OBJDUMP"; then
4675   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
4676 else
4677   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4678   ac_dummy="$PATH"
4679   for ac_dir in $ac_dummy; do
4680     test -z "$ac_dir" && ac_dir=.
4681     if test -f $ac_dir/$ac_word; then
4682       ac_cv_prog_OBJDUMP="objdump"
4683       break
4684     fi
4685   done
4686   IFS="$ac_save_ifs"
4687   test -z "$ac_cv_prog_OBJDUMP" && ac_cv_prog_OBJDUMP="false"
4688 fi
4689 fi
4690 OBJDUMP="$ac_cv_prog_OBJDUMP"
4691 if test -n "$OBJDUMP"; then
4692   echo "$ac_t""$OBJDUMP" 1>&6
4693 else
4694   echo "$ac_t""no" 1>&6
4695 fi
4696
4697 else
4698   OBJDUMP="false"
4699 fi
4700 fi
4701
4702
4703   # recent cygwin and mingw systems supply a stub DllMain which the user
4704   # can override, but on older systems we have to supply one
4705   echo $ac_n "checking if libtool should supply DllMain function""... $ac_c" 1>&6
4706 echo "configure:4707: checking if libtool should supply DllMain function" >&5
4707 if eval "test \"\${lt_cv_need_dllmain+set}\" = set"; then
4708   echo $ac_n "(cached) $ac_c" 1>&6
4709 else
4710   cat > conftest.$ac_ext <<EOF
4711 #line 4712 "configure"
4712 #include "confdefs.h"
4713
4714 int main() {
4715 extern int __attribute__((__stdcall__)) DllMain(void*, int, void*);
4716       DllMain (0, 0, 0);
4717 ; return 0; }
4718 EOF
4719 if { (eval echo configure:4720: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4720   rm -rf conftest*
4721   lt_cv_need_dllmain=no
4722 else
4723   echo "configure: failed program was:" >&5
4724   cat conftest.$ac_ext >&5
4725   rm -rf conftest*
4726   lt_cv_need_dllmain=yes
4727 fi
4728 rm -f conftest*
4729 fi
4730
4731 echo "$ac_t""$lt_cv_need_dllmain" 1>&6
4732
4733   case $host/$CC in
4734   *-*-cygwin*/gcc*-mno-cygwin*|*-*-mingw*)
4735     # old mingw systems require "-dll" to link a DLL, while more recent ones
4736     # require "-mdll"
4737     SAVE_CFLAGS="$CFLAGS"
4738     CFLAGS="$CFLAGS -mdll"
4739     echo $ac_n "checking how to link DLLs""... $ac_c" 1>&6
4740 echo "configure:4741: checking how to link DLLs" >&5
4741 if eval "test \"\${lt_cv_cc_dll_switch+set}\" = set"; then
4742   echo $ac_n "(cached) $ac_c" 1>&6
4743 else
4744   cat > conftest.$ac_ext <<EOF
4745 #line 4746 "configure"
4746 #include "confdefs.h"
4747
4748 int main() {
4749
4750 ; return 0; }
4751 EOF
4752 if { (eval echo configure:4753: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4753   rm -rf conftest*
4754   lt_cv_cc_dll_switch=-mdll
4755 else
4756   echo "configure: failed program was:" >&5
4757   cat conftest.$ac_ext >&5
4758   rm -rf conftest*
4759   lt_cv_cc_dll_switch=-dll
4760 fi
4761 rm -f conftest*
4762 fi
4763
4764 echo "$ac_t""$lt_cv_cc_dll_switch" 1>&6
4765     CFLAGS="$SAVE_CFLAGS" ;;
4766   *-*-cygwin* | *-*-pw32*)
4767     # cygwin systems need to pass --dll to the linker, and not link
4768     # crt.o which will require a WinMain@16 definition.
4769     lt_cv_cc_dll_switch="-Wl,--dll -nostartfiles" ;;
4770   esac
4771   ;;
4772   
4773 esac
4774
4775 # Sed substitution that helps us do robust quoting.  It backslashifies
4776 # metacharacters that are still active within double-quoted strings.
4777 Xsed='sed -e s/^X//'
4778 sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g'
4779
4780 # Same as above, but do not quote variable references.
4781 double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g'
4782
4783 # Sed substitution to delay expansion of an escaped shell variable in a
4784 # double_quote_subst'ed string.
4785 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
4786
4787 # Constants:
4788 rm="rm -f"
4789
4790 # Global variables:
4791 default_ofile=libtool
4792 can_build_shared=yes
4793
4794 # All known linkers require a `.a' archive for static linking (except M$VC,
4795 # which needs '.lib').
4796 libext=a
4797 ltmain="$ac_aux_dir/ltmain.sh"
4798 ofile="$default_ofile"
4799 with_gnu_ld="$lt_cv_prog_gnu_ld"
4800 need_locks="$enable_libtool_lock"
4801
4802 old_CC="$CC"
4803 old_CFLAGS="$CFLAGS"
4804
4805 # Set sane defaults for various variables
4806 test -z "$AR" && AR=ar
4807 test -z "$AR_FLAGS" && AR_FLAGS=cru
4808 test -z "$AS" && AS=as
4809 test -z "$CC" && CC=cc
4810 test -z "$DLLTOOL" && DLLTOOL=dlltool
4811 test -z "$LD" && LD=ld
4812 test -z "$LN_S" && LN_S="ln -s"
4813 test -z "$MAGIC_CMD" && MAGIC_CMD=file
4814 test -z "$NM" && NM=nm
4815 test -z "$OBJDUMP" && OBJDUMP=objdump
4816 test -z "$RANLIB" && RANLIB=:
4817 test -z "$STRIP" && STRIP=:
4818 test -z "$ac_objext" && ac_objext=o
4819
4820 if test x"$host" != x"$build"; then
4821   ac_tool_prefix=${host_alias}-
4822 else
4823   ac_tool_prefix=
4824 fi
4825
4826 # Transform linux* to *-*-linux-gnu*, to support old configure scripts.
4827 case $host_os in
4828 linux-gnu*) ;;
4829 linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
4830 esac
4831
4832 case $host_os in
4833 aix3*)
4834   # AIX sometimes has problems with the GCC collect2 program.  For some
4835   # reason, if we set the COLLECT_NAMES environment variable, the problems
4836   # vanish in a puff of smoke.
4837   if test "X${COLLECT_NAMES+set}" != Xset; then
4838     COLLECT_NAMES=
4839     export COLLECT_NAMES
4840   fi
4841   ;;
4842 esac
4843
4844 # Determine commands to create old-style static archives.
4845 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
4846 old_postinstall_cmds='chmod 644 $oldlib'
4847 old_postuninstall_cmds=
4848
4849 if test -n "$RANLIB"; then
4850   case $host_os in
4851   openbsd*)
4852     old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds"
4853     ;;
4854   *)
4855     old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
4856     ;;
4857   esac
4858   old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
4859 fi
4860
4861 # Allow CC to be a program name with arguments.
4862 set dummy $CC
4863 compiler="$2"
4864
4865 echo $ac_n "checking for objdir""... $ac_c" 1>&6
4866 echo "configure:4867: checking for objdir" >&5
4867 rm -f .libs 2>/dev/null
4868 mkdir .libs 2>/dev/null
4869 if test -d .libs; then
4870   objdir=.libs
4871 else
4872   # MS-DOS does not allow filenames that begin with a dot.
4873   objdir=_libs
4874 fi
4875 rmdir .libs 2>/dev/null
4876 echo "$ac_t""$objdir" 1>&6
4877
4878
4879 # Check whether --with-pic or --without-pic was given.
4880 if test "${with_pic+set}" = set; then
4881   withval="$with_pic"
4882   pic_mode="$withval"
4883 else
4884   pic_mode=default
4885 fi
4886
4887 test -z "$pic_mode" && pic_mode=default
4888
4889 # We assume here that the value for lt_cv_prog_cc_pic will not be cached
4890 # in isolation, and that seeing it set (from the cache) indicates that
4891 # the associated values are set (in the cache) correctly too.
4892 echo $ac_n "checking for $compiler option to produce PIC""... $ac_c" 1>&6
4893 echo "configure:4894: checking for $compiler option to produce PIC" >&5
4894 if eval "test \"\${lt_cv_prog_cc_pic+set}\" = set"; then
4895   echo $ac_n "(cached) $ac_c" 1>&6
4896 else
4897    lt_cv_prog_cc_pic=
4898   lt_cv_prog_cc_shlib=
4899   lt_cv_prog_cc_wl=
4900   lt_cv_prog_cc_static=
4901   lt_cv_prog_cc_no_builtin=
4902   lt_cv_prog_cc_can_build_shared=$can_build_shared
4903
4904   if test "$GCC" = yes; then
4905     lt_cv_prog_cc_wl='-Wl,'
4906     lt_cv_prog_cc_static='-static'
4907
4908     case $host_os in
4909     aix*)
4910       # Below there is a dirty hack to force normal static linking with -ldl
4911       # The problem is because libdl dynamically linked with both libc and
4912       # libC (AIX C++ library), which obviously doesn't included in libraries
4913       # list by gcc. This cause undefined symbols with -static flags.
4914       # This hack allows C programs to be linked with "-static -ldl", but
4915       # not sure about C++ programs.
4916       lt_cv_prog_cc_static="$lt_cv_prog_cc_static ${lt_cv_prog_cc_wl}-lC"
4917       ;;
4918     amigaos*)
4919       # FIXME: we need at least 68020 code to build shared libraries, but
4920       # adding the `-m68020' flag to GCC prevents building anything better,
4921       # like `-m68040'.
4922       lt_cv_prog_cc_pic='-m68020 -resident32 -malways-restore-a4'
4923       ;;
4924     beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
4925       # PIC is the default for these OSes.
4926       ;;
4927     darwin* | rhapsody*)
4928       # PIC is the default on this platform
4929       # Common symbols not allowed in MH_DYLIB files
4930       lt_cv_prog_cc_pic='-fno-common'
4931       ;;
4932     cygwin* | mingw* | pw32* | os2*)
4933       # This hack is so that the source file can tell whether it is being
4934       # built for inclusion in a dll (and should export symbols for example).
4935       lt_cv_prog_cc_pic='-DDLL_EXPORT'
4936       ;;
4937     sysv4*MP*)
4938       if test -d /usr/nec; then
4939          lt_cv_prog_cc_pic=-Kconform_pic
4940       fi
4941       ;;
4942     *)
4943       lt_cv_prog_cc_pic='-fPIC'
4944       ;;
4945     esac
4946   else
4947     # PORTME Check for PIC flags for the system compiler.
4948     case $host_os in
4949     aix3* | aix4* | aix5*)
4950       lt_cv_prog_cc_wl='-Wl,'
4951       # All AIX code is PIC.
4952       if test "$host_cpu" = ia64; then
4953         # AIX 5 now supports IA64 processor
4954         lt_cv_prog_cc_static='-Bstatic'
4955       else
4956         lt_cv_prog_cc_static='-bnso -bI:/lib/syscalls.exp'
4957       fi
4958       ;;
4959
4960     hpux9* | hpux10* | hpux11*)
4961       # Is there a better lt_cv_prog_cc_static that works with the bundled CC?
4962       lt_cv_prog_cc_wl='-Wl,'
4963       lt_cv_prog_cc_static="${lt_cv_prog_cc_wl}-a ${lt_cv_prog_cc_wl}archive"
4964       lt_cv_prog_cc_pic='+Z'
4965       ;;
4966
4967     irix5* | irix6* | nonstopux*)
4968       lt_cv_prog_cc_wl='-Wl,'
4969       lt_cv_prog_cc_static='-non_shared'
4970       # PIC (with -KPIC) is the default.
4971       ;;
4972
4973     cygwin* | mingw* | pw32* | os2*)
4974       # This hack is so that the source file can tell whether it is being
4975       # built for inclusion in a dll (and should export symbols for example).
4976       lt_cv_prog_cc_pic='-DDLL_EXPORT'
4977       ;;
4978
4979     newsos6)
4980       lt_cv_prog_cc_pic='-KPIC'
4981       lt_cv_prog_cc_static='-Bstatic'
4982       ;;
4983     
4984     openedition)
4985       # XPLINK code is PIC by default
4986       ;;
4987
4988     osf3* | osf4* | osf5*)
4989       # All OSF/1 code is PIC.
4990       lt_cv_prog_cc_wl='-Wl,'
4991       lt_cv_prog_cc_static='-non_shared'
4992       ;;
4993
4994     sco3.2v5*)
4995       lt_cv_prog_cc_pic='-Kpic'
4996       lt_cv_prog_cc_static='-dn'
4997       lt_cv_prog_cc_shlib='-belf'
4998       ;;
4999
5000     solaris*)
5001       lt_cv_prog_cc_pic='-KPIC'
5002       lt_cv_prog_cc_static='-Bstatic'
5003       lt_cv_prog_cc_wl='-Wl,'
5004       ;;
5005
5006     sunos4*)
5007       lt_cv_prog_cc_pic='-PIC'
5008       lt_cv_prog_cc_static='-Bstatic'
5009       lt_cv_prog_cc_wl='-Qoption ld '
5010       ;;
5011
5012     sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
5013       lt_cv_prog_cc_pic='-KPIC'
5014       lt_cv_prog_cc_static='-Bstatic'
5015       lt_cv_prog_cc_wl='-Wl,'
5016       ;;
5017
5018     uts4*)
5019       lt_cv_prog_cc_pic='-pic'
5020       lt_cv_prog_cc_static='-Bstatic'
5021       ;;
5022
5023     sysv4*MP*)
5024       if test -d /usr/nec ;then
5025         lt_cv_prog_cc_pic='-Kconform_pic'
5026         lt_cv_prog_cc_static='-Bstatic'
5027       fi
5028       ;;
5029
5030     *)
5031       lt_cv_prog_cc_can_build_shared=no
5032       ;;
5033     esac
5034   fi
5035
5036 fi
5037
5038 if test -z "$lt_cv_prog_cc_pic"; then
5039   echo "$ac_t""none" 1>&6
5040 else
5041   echo "$ac_t""$lt_cv_prog_cc_pic" 1>&6
5042
5043   # Check to make sure the pic_flag actually works.
5044   echo $ac_n "checking if $compiler PIC flag $lt_cv_prog_cc_pic works""... $ac_c" 1>&6
5045 echo "configure:5046: checking if $compiler PIC flag $lt_cv_prog_cc_pic works" >&5
5046   if eval "test \"\${lt_cv_prog_cc_pic_works+set}\" = set"; then
5047   echo $ac_n "(cached) $ac_c" 1>&6
5048 else
5049       save_CFLAGS="$CFLAGS"
5050     CFLAGS="$CFLAGS $lt_cv_prog_cc_pic -DPIC"
5051     cat > conftest.$ac_ext <<EOF
5052 #line 5053 "configure"
5053 #include "confdefs.h"
5054
5055 int main() {
5056
5057 ; return 0; }
5058 EOF
5059 if { (eval echo configure:5060: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5060   rm -rf conftest*
5061         case $host_os in
5062       hpux9* | hpux10* | hpux11*)
5063         # On HP-UX, both CC and GCC only warn that PIC is supported... then
5064         # they create non-PIC objects.  So, if there were any warnings, we
5065         # assume that PIC is not supported.
5066         if test -s conftest.err; then
5067           lt_cv_prog_cc_pic_works=no
5068         else
5069           lt_cv_prog_cc_pic_works=yes
5070         fi
5071         ;;
5072       *)
5073         lt_cv_prog_cc_pic_works=yes
5074         ;;
5075       esac
5076     
5077 else
5078   echo "configure: failed program was:" >&5
5079   cat conftest.$ac_ext >&5
5080   rm -rf conftest*
5081         lt_cv_prog_cc_pic_works=no
5082     
5083 fi
5084 rm -f conftest*
5085     CFLAGS="$save_CFLAGS"
5086   
5087 fi
5088
5089
5090   if test "X$lt_cv_prog_cc_pic_works" = Xno; then
5091     lt_cv_prog_cc_pic=
5092     lt_cv_prog_cc_can_build_shared=no
5093   else
5094     lt_cv_prog_cc_pic=" $lt_cv_prog_cc_pic"
5095   fi
5096
5097   echo "$ac_t""$lt_cv_prog_cc_pic_works" 1>&6
5098 fi
5099
5100 # Check for any special shared library compilation flags.
5101 if test -n "$lt_cv_prog_cc_shlib"; then
5102   echo "configure: warning: \`$CC' requires \`$lt_cv_prog_cc_shlib' to build shared libraries" 1>&2
5103   if echo "$old_CC $old_CFLAGS " | egrep -e "[  ]$lt_cv_prog_cc_shlib[  ]" >/dev/null; then :
5104   else
5105    echo "configure: warning: add \`$lt_cv_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure" 1>&2
5106     lt_cv_prog_cc_can_build_shared=no
5107   fi
5108 fi
5109
5110 echo $ac_n "checking if $compiler static flag $lt_cv_prog_cc_static works""... $ac_c" 1>&6
5111 echo "configure:5112: checking if $compiler static flag $lt_cv_prog_cc_static works" >&5
5112 if eval "test \"\${lt_cv_prog_cc_static_works+set}\" = set"; then
5113   echo $ac_n "(cached) $ac_c" 1>&6
5114 else
5115     lt_cv_prog_cc_static_works=no
5116   save_LDFLAGS="$LDFLAGS"
5117   LDFLAGS="$LDFLAGS $lt_cv_prog_cc_static"
5118   cat > conftest.$ac_ext <<EOF
5119 #line 5120 "configure"
5120 #include "confdefs.h"
5121
5122 int main() {
5123
5124 ; return 0; }
5125 EOF
5126 if { (eval echo configure:5127: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5127   rm -rf conftest*
5128   lt_cv_prog_cc_static_works=yes
5129 else
5130   echo "configure: failed program was:" >&5
5131   cat conftest.$ac_ext >&5
5132 fi
5133 rm -f conftest*
5134   LDFLAGS="$save_LDFLAGS"
5135
5136 fi
5137
5138
5139 # Belt *and* braces to stop my trousers falling down:
5140 test "X$lt_cv_prog_cc_static_works" = Xno && lt_cv_prog_cc_static=
5141 echo "$ac_t""$lt_cv_prog_cc_static_works" 1>&6
5142
5143 pic_flag="$lt_cv_prog_cc_pic"
5144 special_shlib_compile_flags="$lt_cv_prog_cc_shlib"
5145 wl="$lt_cv_prog_cc_wl"
5146 link_static_flag="$lt_cv_prog_cc_static"
5147 no_builtin_flag="$lt_cv_prog_cc_no_builtin"
5148 can_build_shared="$lt_cv_prog_cc_can_build_shared"
5149
5150
5151 # Check to see if options -o and -c are simultaneously supported by compiler
5152 echo $ac_n "checking if $compiler supports -c -o file.$ac_objext""... $ac_c" 1>&6
5153 echo "configure:5154: checking if $compiler supports -c -o file.$ac_objext" >&5
5154 if eval "test \"\${lt_cv_compiler_c_o+set}\" = set"; then
5155   echo $ac_n "(cached) $ac_c" 1>&6
5156 else
5157   
5158 $rm -r conftest 2>/dev/null
5159 mkdir conftest
5160 cd conftest
5161 echo "int some_variable = 0;" > conftest.$ac_ext
5162 mkdir out
5163 # According to Tom Tromey, Ian Lance Taylor reported there are C compilers
5164 # that will create temporary files in the current directory regardless of
5165 # the output directory.  Thus, making CWD read-only will cause this test
5166 # to fail, enabling locking or at least warning the user not to do parallel
5167 # builds.
5168 chmod -w .
5169 save_CFLAGS="$CFLAGS"
5170 CFLAGS="$CFLAGS -o out/conftest2.$ac_objext"
5171 compiler_c_o=no
5172 if { (eval echo configure:5173: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then
5173   # The compiler can only warn and ignore the option if not recognized
5174   # So say no if there are warnings
5175   if test -s out/conftest.err; then
5176     lt_cv_compiler_c_o=no
5177   else
5178     lt_cv_compiler_c_o=yes
5179   fi
5180 else
5181   # Append any errors to the config.log.
5182   cat out/conftest.err 1>&5
5183   lt_cv_compiler_c_o=no
5184 fi
5185 CFLAGS="$save_CFLAGS"
5186 chmod u+w .
5187 $rm conftest* out/*
5188 rmdir out
5189 cd ..
5190 rmdir conftest
5191 $rm -r conftest 2>/dev/null
5192
5193 fi
5194
5195 compiler_c_o=$lt_cv_compiler_c_o
5196 echo "$ac_t""$compiler_c_o" 1>&6
5197
5198 if test x"$compiler_c_o" = x"yes"; then
5199   # Check to see if we can write to a .lo
5200   echo $ac_n "checking if $compiler supports -c -o file.lo""... $ac_c" 1>&6
5201 echo "configure:5202: checking if $compiler supports -c -o file.lo" >&5
5202   if eval "test \"\${lt_cv_compiler_o_lo+set}\" = set"; then
5203   echo $ac_n "(cached) $ac_c" 1>&6
5204 else
5205   
5206   lt_cv_compiler_o_lo=no
5207   save_CFLAGS="$CFLAGS"
5208   CFLAGS="$CFLAGS -c -o conftest.lo"
5209   save_objext="$ac_objext"
5210   ac_objext=lo
5211   cat > conftest.$ac_ext <<EOF
5212 #line 5213 "configure"
5213 #include "confdefs.h"
5214
5215 int main() {
5216 int some_variable = 0;
5217 ; return 0; }
5218 EOF
5219 if { (eval echo configure:5220: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5220   rm -rf conftest*
5221       # The compiler can only warn and ignore the option if not recognized
5222     # So say no if there are warnings
5223     if test -s conftest.err; then
5224       lt_cv_compiler_o_lo=no
5225     else
5226       lt_cv_compiler_o_lo=yes
5227     fi
5228   
5229 else
5230   echo "configure: failed program was:" >&5
5231   cat conftest.$ac_ext >&5
5232 fi
5233 rm -f conftest*
5234   ac_objext="$save_objext"
5235   CFLAGS="$save_CFLAGS"
5236   
5237 fi
5238
5239   compiler_o_lo=$lt_cv_compiler_o_lo
5240   echo "$ac_t""$compiler_o_lo" 1>&6
5241 else
5242   compiler_o_lo=no
5243 fi
5244
5245 # Check to see if we can do hard links to lock some files if needed
5246 hard_links="nottested"
5247 if test "$compiler_c_o" = no && test "$need_locks" != no; then
5248   # do not overwrite the value of need_locks provided by the user
5249   echo $ac_n "checking if we can lock with hard links""... $ac_c" 1>&6
5250 echo "configure:5251: checking if we can lock with hard links" >&5
5251   hard_links=yes
5252   $rm conftest*
5253   ln conftest.a conftest.b 2>/dev/null && hard_links=no
5254   touch conftest.a
5255   ln conftest.a conftest.b 2>&5 || hard_links=no
5256   ln conftest.a conftest.b 2>/dev/null && hard_links=no
5257   echo "$ac_t""$hard_links" 1>&6
5258   if test "$hard_links" = no; then
5259     echo "configure: warning: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" 1>&2
5260     need_locks=warn
5261   fi
5262 else
5263   need_locks=no
5264 fi
5265
5266 if test "$GCC" = yes; then
5267   # Check to see if options -fno-rtti -fno-exceptions are supported by compiler
5268   echo $ac_n "checking if $compiler supports -fno-rtti -fno-exceptions""... $ac_c" 1>&6
5269 echo "configure:5270: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
5270   echo "int some_variable = 0;" > conftest.$ac_ext
5271   save_CFLAGS="$CFLAGS"
5272   CFLAGS="$CFLAGS -fno-rtti -fno-exceptions -c conftest.$ac_ext"
5273   compiler_rtti_exceptions=no
5274   cat > conftest.$ac_ext <<EOF
5275 #line 5276 "configure"
5276 #include "confdefs.h"
5277
5278 int main() {
5279 int some_variable = 0;
5280 ; return 0; }
5281 EOF
5282 if { (eval echo configure:5283: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5283   rm -rf conftest*
5284       # The compiler can only warn and ignore the option if not recognized
5285     # So say no if there are warnings
5286     if test -s conftest.err; then
5287       compiler_rtti_exceptions=no
5288     else
5289       compiler_rtti_exceptions=yes
5290     fi
5291   
5292 else
5293   echo "configure: failed program was:" >&5
5294   cat conftest.$ac_ext >&5
5295 fi
5296 rm -f conftest*
5297   CFLAGS="$save_CFLAGS"
5298   echo "$ac_t""$compiler_rtti_exceptions" 1>&6
5299
5300   if test "$compiler_rtti_exceptions" = "yes"; then
5301     no_builtin_flag=' -fno-builtin -fno-rtti -fno-exceptions'
5302   else
5303     no_builtin_flag=' -fno-builtin'
5304   fi
5305 fi
5306
5307 # See if the linker supports building shared libraries.
5308 echo $ac_n "checking whether the linker ($LD) supports shared libraries""... $ac_c" 1>&6
5309 echo "configure:5310: checking whether the linker ($LD) supports shared libraries" >&5
5310
5311 allow_undefined_flag=
5312 no_undefined_flag=
5313 need_lib_prefix=unknown
5314 need_version=unknown
5315 # when you set need_version to no, make sure it does not cause -set_version
5316 # flags to be left without arguments
5317 archive_cmds=
5318 archive_expsym_cmds=
5319 old_archive_from_new_cmds=
5320 old_archive_from_expsyms_cmds=
5321 export_dynamic_flag_spec=
5322 whole_archive_flag_spec=
5323 thread_safe_flag_spec=
5324 hardcode_into_libs=no
5325 hardcode_libdir_flag_spec=
5326 hardcode_libdir_separator=
5327 hardcode_direct=no
5328 hardcode_minus_L=no
5329 hardcode_shlibpath_var=unsupported
5330 runpath_var=
5331 link_all_deplibs=unknown
5332 always_export_symbols=no
5333 export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols'
5334 # include_expsyms should be a list of space-separated symbols to be *always*
5335 # included in the symbol list
5336 include_expsyms=
5337 # exclude_expsyms can be an egrep regular expression of symbols to exclude
5338 # it will be wrapped by ` (' and `)$', so one must not match beginning or
5339 # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
5340 # as well as any symbol that contains `d'.
5341 exclude_expsyms="_GLOBAL_OFFSET_TABLE_"
5342 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
5343 # platforms (ab)use it in PIC code, but their linkers get confused if
5344 # the symbol is explicitly referenced.  Since portable code cannot
5345 # rely on this symbol name, it's probably fine to never include it in
5346 # preloaded symbol tables.
5347 extract_expsyms_cmds=
5348
5349 case $host_os in
5350 cygwin* | mingw* | pw32*)
5351   # FIXME: the MSVC++ port hasn't been tested in a loooong time
5352   # When not using gcc, we currently assume that we are using
5353   # Microsoft Visual C++.
5354   if test "$GCC" != yes; then
5355     with_gnu_ld=no
5356   fi
5357   ;;
5358 openbsd*)
5359   with_gnu_ld=no
5360   ;;
5361 esac
5362
5363 ld_shlibs=yes
5364 if test "$with_gnu_ld" = yes; then
5365   # If archive_cmds runs LD, not CC, wlarc should be empty
5366   wlarc='${wl}'
5367
5368   # See if GNU ld supports shared libraries.
5369   case $host_os in
5370   aix3* | aix4* | aix5*)
5371     # On AIX, the GNU linker is very broken
5372     # Note:Check GNU linker on AIX 5-IA64 when/if it becomes available.
5373     ld_shlibs=no
5374     cat <<EOF 1>&2
5375
5376 *** Warning: the GNU linker, at least up to release 2.9.1, is reported
5377 *** to be unable to reliably create shared libraries on AIX.
5378 *** Therefore, libtool is disabling shared libraries support.  If you
5379 *** really care for shared libraries, you may want to modify your PATH
5380 *** so that a non-GNU linker is found, and then restart.
5381
5382 EOF
5383     ;;
5384
5385   amigaos*)
5386     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)'
5387     hardcode_libdir_flag_spec='-L$libdir'
5388     hardcode_minus_L=yes
5389
5390     # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
5391     # that the semantics of dynamic libraries on AmigaOS, at least up
5392     # to version 4, is to share data among multiple programs linked
5393     # with the same dynamic library.  Since this doesn't match the
5394     # behavior of shared libraries on other platforms, we can use
5395     # them.
5396     ld_shlibs=no
5397     ;;
5398
5399   beos*)
5400     if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
5401       allow_undefined_flag=unsupported
5402       # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
5403       # support --undefined.  This deserves some investigation.  FIXME
5404       archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5405     else
5406       ld_shlibs=no
5407     fi
5408     ;;
5409
5410   cygwin* | mingw* | pw32*)
5411     # hardcode_libdir_flag_spec is actually meaningless, as there is
5412     # no search path for DLLs.
5413     hardcode_libdir_flag_spec='-L$libdir'
5414     allow_undefined_flag=unsupported
5415     always_export_symbols=yes
5416
5417     extract_expsyms_cmds='test -f $output_objdir/impgen.c || \
5418       sed -e "/^# \/\* impgen\.c starts here \*\//,/^# \/\* impgen.c ends here \*\// { s/^# //;s/^# *$//; p; }" -e d < $''0 > $output_objdir/impgen.c~
5419       test -f $output_objdir/impgen.exe || (cd $output_objdir && \
5420       if test "x$HOST_CC" != "x" ; then $HOST_CC -o impgen impgen.c ; \
5421       else $CC -o impgen impgen.c ; fi)~
5422       $output_objdir/impgen $dir/$soroot > $output_objdir/$soname-def'
5423
5424     old_archive_from_expsyms_cmds='$DLLTOOL --as=$AS --dllname $soname --def $output_objdir/$soname-def --output-lib $output_objdir/$newlib'
5425
5426     # cygwin and mingw dlls have different entry points and sets of symbols
5427     # to exclude.
5428     # FIXME: what about values for MSVC?
5429     dll_entry=__cygwin_dll_entry@12
5430     dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12~
5431     case $host_os in
5432     mingw*)
5433       # mingw values
5434       dll_entry=_DllMainCRTStartup@12
5435       dll_exclude_symbols=DllMain@12,DllMainCRTStartup@12,DllEntryPoint@12~
5436       ;;
5437     esac
5438
5439     # mingw and cygwin differ, and it's simplest to just exclude the union
5440     # of the two symbol sets.
5441     dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12,DllMainCRTStartup@12,DllEntryPoint@12
5442
5443     # recent cygwin and mingw systems supply a stub DllMain which the user
5444     # can override, but on older systems we have to supply one (in ltdll.c)
5445     if test "x$lt_cv_need_dllmain" = "xyes"; then
5446       ltdll_obj='$output_objdir/$soname-ltdll.'"$ac_objext "
5447       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~
5448         test -f $output_objdir/$soname-ltdll.$ac_objext || (cd $output_objdir && $CC -c $soname-ltdll.c)~'
5449     else
5450       ltdll_obj=
5451       ltdll_cmds=
5452     fi
5453
5454     # Extract the symbol export list from an `--export-all' def file,
5455     # then regenerate the def file from the symbol export list, so that
5456     # the compiled dll only exports the symbol export list.
5457     # Be careful not to strip the DATA tag left be newer dlltools.
5458     export_symbols_cmds="$ltdll_cmds"'
5459       $DLLTOOL --export-all --exclude-symbols '$dll_exclude_symbols' --output-def $output_objdir/$soname-def '$ltdll_obj'$libobjs $convenience~
5460       sed -e "1,/EXPORTS/d" -e "s/ @ [0-9]*//" -e "s/ *;.*$//" < $output_objdir/$soname-def > $export_symbols'
5461
5462     # If the export-symbols file already is a .def file (1st line
5463     # is EXPORTS), use it as is.
5464     # If DATA tags from a recent dlltool are present, honour them!
5465     archive_expsym_cmds='if test "x`sed 1q $export_symbols`" = xEXPORTS; then
5466         cp $export_symbols $output_objdir/$soname-def;
5467       else
5468         echo EXPORTS > $output_objdir/$soname-def;
5469         _lt_hint=1;
5470         cat $export_symbols | while read symbol; do
5471          set dummy \$symbol;
5472          case \$# in
5473            2) echo "   \$2 @ \$_lt_hint ; " >> $output_objdir/$soname-def;;
5474            4) echo "   \$2 \$3 \$4 ; " >> $output_objdir/$soname-def; _lt_hint=`expr \$_lt_hint - 1`;;
5475            *) echo "     \$2 @ \$_lt_hint \$3 ; " >> $output_objdir/$soname-def;;
5476          esac;
5477          _lt_hint=`expr 1 + \$_lt_hint`;
5478         done;
5479       fi~
5480       '"$ltdll_cmds"'
5481       $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~
5482       $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~
5483       $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~
5484       $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~
5485       $CC $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags'
5486     ;;
5487
5488   netbsd*)
5489     if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
5490       archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
5491       wlarc=
5492     else
5493       archive_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5494       archive_expsym_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5495     fi
5496     ;;
5497
5498   solaris* | sysv5*)
5499     if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then
5500       ld_shlibs=no
5501       cat <<EOF 1>&2
5502
5503 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
5504 *** create shared libraries on Solaris systems.  Therefore, libtool
5505 *** is disabling shared libraries support.  We urge you to upgrade GNU
5506 *** binutils to release 2.9.1 or newer.  Another option is to modify
5507 *** your PATH or compiler configuration so that the native linker is
5508 *** used, and then restart.
5509
5510 EOF
5511     elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
5512       archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5513       archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5514     else
5515       ld_shlibs=no
5516     fi
5517     ;;
5518
5519   sunos4*)
5520     archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5521     wlarc=
5522     hardcode_direct=yes
5523     hardcode_shlibpath_var=no
5524     ;;
5525
5526   *)
5527     if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
5528       archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5529       archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5530     else
5531       ld_shlibs=no
5532     fi
5533     ;;
5534   esac
5535
5536   if test "$ld_shlibs" = yes; then
5537     runpath_var=LD_RUN_PATH
5538     hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir'
5539     export_dynamic_flag_spec='${wl}--export-dynamic'
5540     case $host_os in
5541     cygwin* | mingw* | pw32*)
5542       # dlltool doesn't understand --whole-archive et. al.
5543       whole_archive_flag_spec=
5544       ;;
5545     *)
5546       # ancient GNU ld didn't support --whole-archive et. al.
5547       if $LD --help 2>&1 | egrep 'no-whole-archive' > /dev/null; then
5548         whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
5549       else
5550         whole_archive_flag_spec=
5551       fi
5552       ;;
5553     esac
5554   fi
5555 else
5556   # PORTME fill in a description of your system's linker (not GNU ld)
5557   case $host_os in
5558   aix3*)
5559     allow_undefined_flag=unsupported
5560     always_export_symbols=yes
5561     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'
5562     # Note: this linker hardcodes the directories in LIBPATH if there
5563     # are no directories specified by -L.
5564     hardcode_minus_L=yes
5565     if test "$GCC" = yes && test -z "$link_static_flag"; then
5566       # Neither direct hardcoding nor static linking is supported with a
5567       # broken collect2.
5568       hardcode_direct=unsupported
5569     fi
5570     ;;
5571
5572   aix4* | aix5*)
5573     if test "$host_cpu" = ia64; then
5574       # On IA64, the linker does run time linking by default, so we don't
5575       # have to do anything special.
5576       aix_use_runtimelinking=no
5577       exp_sym_flag='-Bexport'
5578       no_entry_flag=""
5579     else
5580       aix_use_runtimelinking=no
5581
5582       # Test if we are trying to use run time linking or normal
5583       # AIX style linking. If -brtl is somewhere in LDFLAGS, we
5584       # need to do runtime linking.
5585       case $host_os in aix4.[23]|aix4.[23].*|aix5*)
5586         for ld_flag in $LDFLAGS; do
5587           case $ld_flag in
5588           *-brtl*)
5589             aix_use_runtimelinking=yes
5590             break
5591           ;;
5592           esac
5593         done
5594       esac
5595
5596       exp_sym_flag='-bexport'
5597       no_entry_flag='-bnoentry'
5598     fi
5599
5600     # When large executables or shared objects are built, AIX ld can
5601     # have problems creating the table of contents.  If linking a library
5602     # or program results in "error TOC overflow" add -mminimal-toc to
5603     # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
5604     # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
5605
5606     hardcode_direct=yes
5607     archive_cmds=''
5608     hardcode_libdir_separator=':'
5609     if test "$GCC" = yes; then
5610       case $host_os in aix4.[012]|aix4.[012].*)
5611         collect2name=`${CC} -print-prog-name=collect2`
5612         if test -f "$collect2name" && \
5613           strings "$collect2name" | grep resolve_lib_name >/dev/null
5614         then
5615           # We have reworked collect2
5616           hardcode_direct=yes
5617         else
5618           # We have old collect2
5619           hardcode_direct=unsupported
5620           # It fails to find uninstalled libraries when the uninstalled
5621           # path is not listed in the libpath.  Setting hardcode_minus_L
5622           # to unsupported forces relinking
5623           hardcode_minus_L=yes
5624           hardcode_libdir_flag_spec='-L$libdir'
5625           hardcode_libdir_separator=
5626         fi
5627       esac
5628
5629       shared_flag='-shared'
5630     else
5631       # not using gcc
5632       if test "$host_cpu" = ia64; then
5633         shared_flag='${wl}-G'
5634       else
5635         if test "$aix_use_runtimelinking" = yes; then
5636           shared_flag='${wl}-G'
5637         else
5638           shared_flag='${wl}-bM:SRE'
5639         fi
5640       fi
5641     fi
5642
5643     # It seems that -bexpall can do strange things, so it is better to
5644     # generate a list of symbols to export.
5645     always_export_symbols=yes
5646     if test "$aix_use_runtimelinking" = yes; then
5647       # Warning - without using the other runtime loading flags (-brtl),
5648       # -berok will link without error, but may produce a broken library.
5649       allow_undefined_flag='-berok'
5650       hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:/usr/lib:/lib'
5651       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"
5652     else
5653       if test "$host_cpu" = ia64; then
5654         hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
5655         allow_undefined_flag="-z nodefs"
5656         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"
5657       else
5658         hardcode_libdir_flag_spec='${wl}-bnolibpath ${wl}-blibpath:$libdir:/usr/lib:/lib'
5659         # Warning - without using the other run time loading flags,
5660         # -berok will link without error, but may produce a broken library.
5661         allow_undefined_flag='${wl}-berok'
5662         # This is a bit strange, but is similar to how AIX traditionally builds
5663         # it's shared libraries.
5664         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'
5665       fi
5666     fi
5667     ;;
5668
5669   amigaos*)
5670     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)'
5671     hardcode_libdir_flag_spec='-L$libdir'
5672     hardcode_minus_L=yes
5673     # see comment about different semantics on the GNU ld section
5674     ld_shlibs=no
5675     ;;
5676
5677   cygwin* | mingw* | pw32*)
5678     # When not using gcc, we currently assume that we are using
5679     # Microsoft Visual C++.
5680     # hardcode_libdir_flag_spec is actually meaningless, as there is
5681     # no search path for DLLs.
5682     hardcode_libdir_flag_spec=' '
5683     allow_undefined_flag=unsupported
5684     # Tell ltmain to make .lib files, not .a files.
5685     libext=lib
5686     # FIXME: Setting linknames here is a bad hack.
5687     archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | sed -e '\''s/ -lc$//'\''` -link -dll~linknames='
5688     # The linker will automatically build a .lib file if we build a DLL.
5689     old_archive_from_new_cmds='true'
5690     # FIXME: Should let the user specify the lib program.
5691     old_archive_cmds='lib /OUT:$oldlib$oldobjs$old_deplibs'
5692     fix_srcfile_path='`cygpath -w "$srcfile"`'
5693     ;;
5694
5695   darwin* | rhapsody*)
5696     case "$host_os" in
5697     rhapsody* | darwin1.[012])
5698       allow_undefined_flag='-undefined suppress'
5699       ;;
5700     *) # Darwin 1.3 on
5701       allow_undefined_flag='-flat_namespace -undefined suppress'
5702       ;;
5703     esac
5704     # FIXME: Relying on posixy $() will cause problems for
5705     #        cross-compilation, but unfortunately the echo tests do not
5706     #        yet detect zsh echo's removal of \ escapes.  Also zsh mangles
5707     #        `"' quotes if we put them in here... so don't!
5708     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)'
5709     # We need to add '_' to the symbols in $export_symbols first
5710     #archive_expsym_cmds="$archive_cmds"' && strip -s $export_symbols'
5711     hardcode_direct=yes
5712     hardcode_shlibpath_var=no
5713     whole_archive_flag_spec='-all_load $convenience'
5714     ;;
5715
5716   freebsd1*)
5717     ld_shlibs=no
5718     ;;
5719
5720   # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
5721   # support.  Future versions do this automatically, but an explicit c++rt0.o
5722   # does not break anything, and helps significantly (at the cost of a little
5723   # extra space).
5724   freebsd2.2*)
5725     archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
5726     hardcode_libdir_flag_spec='-R$libdir'
5727     hardcode_direct=yes
5728     hardcode_shlibpath_var=no
5729     ;;
5730
5731   # Unfortunately, older versions of FreeBSD 2 do not have this feature.
5732   freebsd2*)
5733     archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5734     hardcode_direct=yes
5735     hardcode_minus_L=yes
5736     hardcode_shlibpath_var=no
5737     ;;
5738
5739   # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
5740   freebsd*)
5741     archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
5742     hardcode_libdir_flag_spec='-R$libdir'
5743     hardcode_direct=yes
5744     hardcode_shlibpath_var=no
5745     ;;
5746
5747   hpux9* | hpux10* | hpux11*)
5748     case $host_os in
5749     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' ;;
5750     *) archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' ;;
5751     esac
5752     hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
5753     hardcode_libdir_separator=:
5754     hardcode_direct=yes
5755     hardcode_minus_L=yes # Not in the search PATH, but as the default
5756                          # location of the library.
5757     export_dynamic_flag_spec='${wl}-E'
5758     ;;
5759
5760   irix5* | irix6* | nonstopux*)
5761     if test "$GCC" = yes; then
5762       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'
5763       hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5764     else
5765       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'
5766       hardcode_libdir_flag_spec='-rpath $libdir'
5767     fi
5768     hardcode_libdir_separator=:
5769     link_all_deplibs=yes
5770     ;;
5771
5772   netbsd*)
5773     if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
5774       archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
5775     else
5776       archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
5777     fi
5778     hardcode_libdir_flag_spec='-R$libdir'
5779     hardcode_direct=yes
5780     hardcode_shlibpath_var=no
5781     ;;
5782
5783   newsos6)
5784     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5785     hardcode_direct=yes
5786     hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5787     hardcode_libdir_separator=:
5788     hardcode_shlibpath_var=no
5789     ;;
5790
5791   openbsd*)
5792     hardcode_direct=yes
5793     hardcode_shlibpath_var=no
5794     if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
5795       archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5796       hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
5797       export_dynamic_flag_spec='${wl}-E'
5798     else
5799       case "$host_os" in
5800       openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
5801         archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5802         hardcode_libdir_flag_spec='-R$libdir'
5803         ;;
5804       *)
5805         archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5806         hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
5807         ;;
5808       esac
5809     fi
5810     ;;
5811
5812   openedition*)
5813     archive_cmds="\$CC -Wl,DLL \$libobjs \$deplibs \$compiler_flags -o \$lib &&
5814         cp \$linknames \$output_objdir && linknames=''"
5815     export_dynamic_flag_spec="-Wl,DLL"
5816     ;;
5817
5818   os2*)
5819     hardcode_libdir_flag_spec='-L$libdir'
5820     hardcode_minus_L=yes
5821     allow_undefined_flag=unsupported
5822     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'
5823     old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
5824     ;;
5825
5826   osf3*)
5827     if test "$GCC" = yes; then
5828       allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
5829       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'
5830     else
5831       allow_undefined_flag=' -expect_unresolved \*'
5832       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'
5833     fi
5834     hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5835     hardcode_libdir_separator=:
5836     ;;
5837
5838   osf4* | osf5*)        # as osf3* with the addition of -msym flag
5839     if test "$GCC" = yes; then
5840       allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
5841       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'
5842       hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5843     else
5844       allow_undefined_flag=' -expect_unresolved \*'
5845       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'
5846       archive_expsym_cmds='for i in `cat $export_symbols`; do printf "-exported_symbol " >> $lib.exp; echo "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
5847       $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'
5848
5849       #Both c and cxx compiler support -rpath directly
5850       hardcode_libdir_flag_spec='-rpath $libdir'
5851     fi
5852     hardcode_libdir_separator=:
5853     ;;
5854
5855   sco3.2v5*)
5856     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5857     hardcode_shlibpath_var=no
5858     runpath_var=LD_RUN_PATH
5859     hardcode_runpath_var=yes
5860     export_dynamic_flag_spec='${wl}-Bexport'
5861     ;;
5862
5863   solaris*)
5864     # gcc --version < 3.0 without binutils cannot create self contained
5865     # shared libraries reliably, requiring libgcc.a to resolve some of
5866     # the object symbols generated in some cases.  Libraries that use
5867     # assert need libgcc.a to resolve __eprintf, for example.  Linking
5868     # a copy of libgcc.a into every shared library to guarantee resolving
5869     # such symbols causes other problems:  According to Tim Van Holder
5870     # <tim.van.holder@pandora.be>, C++ libraries end up with a separate
5871     # (to the application) exception stack for one thing.
5872     no_undefined_flag=' -z defs'
5873     if test "$GCC" = yes; then
5874       case `$CC --version 2>/dev/null` in
5875       [12].*)
5876         cat <<EOF 1>&2
5877
5878 *** Warning: Releases of GCC earlier than version 3.0 cannot reliably
5879 *** create self contained shared libraries on Solaris systems, without
5880 *** introducing a dependency on libgcc.a.  Therefore, libtool is disabling
5881 *** -no-undefined support, which will at least allow you to build shared
5882 *** libraries.  However, you may find that when you link such libraries
5883 *** into an application without using GCC, you have to manually add
5884 *** \`gcc --print-libgcc-file-name\` to the link command.  We urge you to
5885 *** upgrade to a newer version of GCC.  Another option is to rebuild your
5886 *** current GCC to use the GNU linker from GNU binutils 2.9.1 or newer.
5887
5888 EOF
5889         no_undefined_flag=
5890         ;;
5891       esac
5892     fi
5893     # $CC -shared without GNU ld will not create a library from C++
5894     # object files and a static libstdc++, better avoid it by now
5895     archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
5896     archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
5897                 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
5898     hardcode_libdir_flag_spec='-R$libdir'
5899     hardcode_shlibpath_var=no
5900     case $host_os in
5901     solaris2.[0-5] | solaris2.[0-5].*) ;;
5902     *) # Supported since Solaris 2.6 (maybe 2.5.1?)
5903       whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;;
5904     esac
5905     link_all_deplibs=yes
5906     ;;
5907
5908   sunos4*)
5909     if test "x$host_vendor" = xsequent; then
5910       # Use $CC to link under sequent, because it throws in some extra .o
5911       # files that make .init and .fini sections work.
5912       archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
5913     else
5914       archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
5915     fi
5916     hardcode_libdir_flag_spec='-L$libdir'
5917     hardcode_direct=yes
5918     hardcode_minus_L=yes
5919     hardcode_shlibpath_var=no
5920     ;;
5921
5922   sysv4)
5923     case $host_vendor in
5924       sni)
5925         archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5926         hardcode_direct=yes # is this really true???
5927         ;;
5928       siemens)
5929         ## LD is ld it makes a PLAMLIB
5930         ## CC just makes a GrossModule.
5931         archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
5932         reload_cmds='$CC -r -o $output$reload_objs'
5933         hardcode_direct=no
5934         ;;
5935       motorola)
5936         archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5937         hardcode_direct=no #Motorola manual says yes, but my tests say they lie
5938         ;;
5939     esac
5940     runpath_var='LD_RUN_PATH'
5941     hardcode_shlibpath_var=no
5942     ;;
5943
5944   sysv4.3*)
5945     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5946     hardcode_shlibpath_var=no
5947     export_dynamic_flag_spec='-Bexport'
5948     ;;
5949
5950   sysv5*)
5951     no_undefined_flag=' -z text'
5952     # $CC -shared without GNU ld will not create a library from C++
5953     # object files and a static libstdc++, better avoid it by now
5954     archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
5955     archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
5956                 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
5957     hardcode_libdir_flag_spec=
5958     hardcode_shlibpath_var=no
5959     runpath_var='LD_RUN_PATH'
5960     ;;
5961
5962   uts4*)
5963     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5964     hardcode_libdir_flag_spec='-L$libdir'
5965     hardcode_shlibpath_var=no
5966     ;;
5967
5968   dgux*)
5969     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5970     hardcode_libdir_flag_spec='-L$libdir'
5971     hardcode_shlibpath_var=no
5972     ;;
5973
5974   sysv4*MP*)
5975     if test -d /usr/nec; then
5976       archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5977       hardcode_shlibpath_var=no
5978       runpath_var=LD_RUN_PATH
5979       hardcode_runpath_var=yes
5980       ld_shlibs=yes
5981     fi
5982     ;;
5983
5984   sysv4.2uw2*)
5985     archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
5986     hardcode_direct=yes
5987     hardcode_minus_L=no
5988     hardcode_shlibpath_var=no
5989     hardcode_runpath_var=yes
5990     runpath_var=LD_RUN_PATH
5991     ;;
5992
5993   sysv5uw7* | unixware7*)
5994     no_undefined_flag='${wl}-z ${wl}text'
5995     if test "$GCC" = yes; then
5996       archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
5997     else
5998       archive_cmds='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
5999     fi
6000     runpath_var='LD_RUN_PATH'
6001     hardcode_shlibpath_var=no
6002     ;;
6003
6004   *)
6005     ld_shlibs=no
6006     ;;
6007   esac
6008 fi
6009 echo "$ac_t""$ld_shlibs" 1>&6
6010 test "$ld_shlibs" = no && can_build_shared=no
6011
6012 # Check hardcoding attributes.
6013 echo $ac_n "checking how to hardcode library paths into programs""... $ac_c" 1>&6
6014 echo "configure:6015: checking how to hardcode library paths into programs" >&5
6015 hardcode_action=
6016 if test -n "$hardcode_libdir_flag_spec" || \
6017    test -n "$runpath_var"; then
6018
6019   # We can hardcode non-existant directories.
6020   if test "$hardcode_direct" != no &&
6021      # If the only mechanism to avoid hardcoding is shlibpath_var, we
6022      # have to relink, otherwise we might link with an installed library
6023      # when we should be linking with a yet-to-be-installed one
6024      ## test "$hardcode_shlibpath_var" != no &&
6025      test "$hardcode_minus_L" != no; then
6026     # Linking always hardcodes the temporary library directory.
6027     hardcode_action=relink
6028   else
6029     # We can link without hardcoding, and we can hardcode nonexisting dirs.
6030     hardcode_action=immediate
6031   fi
6032 else
6033   # We cannot hardcode anything, or else we can only hardcode existing
6034   # directories.
6035   hardcode_action=unsupported
6036 fi
6037 echo "$ac_t""$hardcode_action" 1>&6
6038
6039 striplib=
6040 old_striplib=
6041 echo $ac_n "checking whether stripping libraries is possible""... $ac_c" 1>&6
6042 echo "configure:6043: checking whether stripping libraries is possible" >&5
6043 if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
6044   test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
6045   test -z "$striplib" && striplib="$STRIP --strip-unneeded"
6046   echo "$ac_t""yes" 1>&6
6047 else
6048   echo "$ac_t""no" 1>&6
6049 fi
6050
6051 reload_cmds='$LD$reload_flag -o $output$reload_objs'
6052 test -z "$deplibs_check_method" && deplibs_check_method=unknown
6053
6054 # PORTME Fill in your ld.so characteristics
6055 echo $ac_n "checking dynamic linker characteristics""... $ac_c" 1>&6
6056 echo "configure:6057: checking dynamic linker characteristics" >&5
6057 library_names_spec=
6058 libname_spec='lib$name'
6059 soname_spec=
6060 postinstall_cmds=
6061 postuninstall_cmds=
6062 finish_cmds=
6063 finish_eval=
6064 shlibpath_var=
6065 shlibpath_overrides_runpath=unknown
6066 version_type=none
6067 dynamic_linker="$host_os ld.so"
6068 sys_lib_dlsearch_path_spec="/lib /usr/lib"
6069 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
6070
6071 case $host_os in
6072 aix3*)
6073   version_type=linux
6074   library_names_spec='${libname}${release}.so$versuffix $libname.a'
6075   shlibpath_var=LIBPATH
6076
6077   # AIX has no versioning support, so we append a major version to the name.
6078   soname_spec='${libname}${release}.so$major'
6079   ;;
6080
6081 aix4* | aix5*)
6082   version_type=linux
6083   need_lib_prefix=no
6084   need_version=no
6085   hardcode_into_libs=yes
6086   if test "$host_cpu" = ia64; then
6087     # AIX 5 supports IA64
6088     library_names_spec='${libname}${release}.so$major ${libname}${release}.so$versuffix $libname.so'
6089     shlibpath_var=LD_LIBRARY_PATH
6090   else
6091     # With GCC up to 2.95.x, collect2 would create an import file
6092     # for dependence libraries.  The import file would start with
6093     # the line `#! .'.  This would cause the generated library to
6094     # depend on `.', always an invalid library.  This was fixed in
6095     # development snapshots of GCC prior to 3.0.
6096     case $host_os in
6097       aix4 | aix4.[01] | aix4.[01].*)
6098         if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
6099              echo ' yes '
6100              echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
6101           :
6102         else
6103           can_build_shared=no
6104         fi
6105         ;;
6106     esac
6107     # AIX (on Power*) has no versioning support, so currently we can
6108     # not hardcode correct soname into executable. Probably we can
6109     # add versioning support to collect2, so additional links can
6110     # be useful in future.
6111     if test "$aix_use_runtimelinking" = yes; then
6112       # If using run time linking (on AIX 4.2 or later) use lib<name>.so
6113       # instead of lib<name>.a to let people know that these are not
6114       # typical AIX shared libraries.
6115       library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6116     else
6117       # We preserve .a as extension for shared libraries through AIX4.2
6118       # and later when we are not doing run time linking.
6119       library_names_spec='${libname}${release}.a $libname.a'
6120       soname_spec='${libname}${release}.so$major'
6121     fi
6122     shlibpath_var=LIBPATH
6123   fi
6124   hardcode_into_libs=yes
6125   ;;
6126
6127 amigaos*)
6128   library_names_spec='$libname.ixlibrary $libname.a'
6129   # Create ${libname}_ixlibrary.a entries in /sys/libs.
6130   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'
6131   ;;
6132
6133 beos*)
6134   library_names_spec='${libname}.so'
6135   dynamic_linker="$host_os ld.so"
6136   shlibpath_var=LIBRARY_PATH
6137   ;;
6138
6139 bsdi4*)
6140   version_type=linux
6141   need_version=no
6142   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6143   soname_spec='${libname}${release}.so$major'
6144   finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
6145   shlibpath_var=LD_LIBRARY_PATH
6146   sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
6147   sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
6148   export_dynamic_flag_spec=-rdynamic
6149   # the default ld.so.conf also contains /usr/contrib/lib and
6150   # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
6151   # libtool to hard-code these into programs
6152   ;;
6153
6154 cygwin* | mingw* | pw32*)
6155   version_type=windows
6156   need_version=no
6157   need_lib_prefix=no
6158   case $GCC,$host_os in
6159   yes,cygwin*)
6160     library_names_spec='$libname.dll.a'
6161     soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
6162     postinstall_cmds='dlpath=`bash 2>&1 -c '\''. $dir/${file}i;echo \$dlname'\''`~
6163       dldir=$destdir/`dirname \$dlpath`~
6164       test -d \$dldir || mkdir -p \$dldir~
6165       $install_prog .libs/$dlname \$dldir/$dlname'
6166     postuninstall_cmds='dldll=`bash 2>&1 -c '\''. $file; echo \$dlname'\''`~
6167       dlpath=$dir/\$dldll~
6168        $rm \$dlpath'
6169     ;;
6170   yes,mingw*)
6171     library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
6172     sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | sed -e "s/^libraries://" -e "s/;/ /g" -e "s,=/,/,g"`
6173     ;;
6174   yes,pw32*)
6175     library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | sed -e 's/./-/g'`${versuffix}.dll'
6176     ;;
6177   *)
6178     library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll $libname.lib'
6179     ;;
6180   esac
6181   dynamic_linker='Win32 ld.exe'
6182   # FIXME: first we should search . and the directory the executable is in
6183   shlibpath_var=PATH
6184   ;;
6185
6186 darwin* | rhapsody*)
6187   dynamic_linker="$host_os dyld"
6188   version_type=darwin
6189   need_lib_prefix=no
6190   need_version=no
6191   # FIXME: Relying on posixy $() will cause problems for
6192   #        cross-compilation, but unfortunately the echo tests do not
6193   #        yet detect zsh echo's removal of \ escapes.
6194   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)'
6195   soname_spec='${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib)'
6196   shlibpath_overrides_runpath=yes
6197   shlibpath_var=DYLD_LIBRARY_PATH
6198   ;;
6199
6200 freebsd1*)
6201   dynamic_linker=no
6202   ;;
6203
6204 freebsd*)
6205   objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
6206   version_type=freebsd-$objformat
6207   case $version_type in
6208     freebsd-elf*)
6209       library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
6210       need_version=no
6211       need_lib_prefix=no
6212       ;;
6213     freebsd-*)
6214       library_names_spec='${libname}${release}.so$versuffix $libname.so$versuffix'
6215       need_version=yes
6216       ;;
6217   esac
6218   shlibpath_var=LD_LIBRARY_PATH
6219   case $host_os in
6220   freebsd2*)
6221     shlibpath_overrides_runpath=yes
6222     ;;
6223   *)
6224     shlibpath_overrides_runpath=no
6225     hardcode_into_libs=yes
6226     ;;
6227   esac
6228   ;;
6229
6230 gnu*)
6231   version_type=linux
6232   need_lib_prefix=no
6233   need_version=no
6234   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so${major} ${libname}.so'
6235   soname_spec='${libname}${release}.so$major'
6236   shlibpath_var=LD_LIBRARY_PATH
6237   hardcode_into_libs=yes
6238   ;;
6239
6240 hpux9* | hpux10* | hpux11*)
6241   # Give a soname corresponding to the major version so that dld.sl refuses to
6242   # link against other versions.
6243   dynamic_linker="$host_os dld.sl"
6244   version_type=sunos
6245   need_lib_prefix=no
6246   need_version=no
6247   shlibpath_var=SHLIB_PATH
6248   shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
6249   library_names_spec='${libname}${release}.sl$versuffix ${libname}${release}.sl$major $libname.sl'
6250   soname_spec='${libname}${release}.sl$major'
6251   # HP-UX runs *really* slowly unless shared libraries are mode 555.
6252   postinstall_cmds='chmod 555 $lib'
6253   ;;
6254
6255 irix5* | irix6* | nonstopux*)
6256   case $host_os in
6257     nonstopux*) version_type=nonstopux ;;
6258     *)          version_type=irix ;;
6259   esac
6260   need_lib_prefix=no
6261   need_version=no
6262   soname_spec='${libname}${release}.so$major'
6263   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so $libname.so'
6264   case $host_os in
6265   irix5* | nonstopux*)
6266     libsuff= shlibsuff=
6267     ;;
6268   *)
6269     case $LD in # libtool.m4 will add one of these switches to LD
6270     *-32|*"-32 ") libsuff= shlibsuff= libmagic=32-bit;;
6271     *-n32|*"-n32 ") libsuff=32 shlibsuff=N32 libmagic=N32;;
6272     *-64|*"-64 ") libsuff=64 shlibsuff=64 libmagic=64-bit;;
6273     *) libsuff= shlibsuff= libmagic=never-match;;
6274     esac
6275     ;;
6276   esac
6277   shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
6278   shlibpath_overrides_runpath=no
6279   sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
6280   sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
6281   ;;
6282
6283 # No shared lib support for Linux oldld, aout, or coff.
6284 linux-gnuoldld* | linux-gnuaout* | linux-gnucoff*)
6285   dynamic_linker=no
6286   ;;
6287
6288 # This must be Linux ELF.
6289 linux-gnu*)
6290   version_type=linux
6291   need_lib_prefix=no
6292   need_version=no
6293   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6294   soname_spec='${libname}${release}.so$major'
6295   finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
6296   shlibpath_var=LD_LIBRARY_PATH
6297   shlibpath_overrides_runpath=no
6298   # This implies no fast_install, which is unacceptable.
6299   # Some rework will be needed to allow for fast_install
6300   # before this can be enabled.
6301   hardcode_into_libs=yes
6302
6303   # We used to test for /lib/ld.so.1 and disable shared libraries on
6304   # powerpc, because MkLinux only supported shared libraries with the
6305   # GNU dynamic linker.  Since this was broken with cross compilers,
6306   # most powerpc-linux boxes support dynamic linking these days and
6307   # people can always --disable-shared, the test was removed, and we
6308   # assume the GNU/Linux dynamic linker is in use.
6309   dynamic_linker='GNU/Linux ld.so'
6310   ;;
6311
6312 netbsd*)
6313   version_type=sunos
6314   need_lib_prefix=no
6315   need_version=no
6316   if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
6317     library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
6318     finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
6319     dynamic_linker='NetBSD (a.out) ld.so'
6320   else
6321     library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so ${libname}.so'
6322     soname_spec='${libname}${release}.so$major'
6323     dynamic_linker='NetBSD ld.elf_so'
6324   fi
6325   shlibpath_var=LD_LIBRARY_PATH
6326   shlibpath_overrides_runpath=yes
6327   hardcode_into_libs=yes
6328   ;;
6329
6330 newsos6)
6331   version_type=linux
6332   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6333   shlibpath_var=LD_LIBRARY_PATH
6334   shlibpath_overrides_runpath=yes
6335   ;;
6336
6337 openbsd*)
6338   version_type=sunos
6339   need_lib_prefix=no
6340   need_version=no
6341   if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
6342     case "$host_os" in
6343     openbsd2.[89] | openbsd2.[89].*)
6344       shlibpath_overrides_runpath=no
6345       ;;
6346     *)
6347       shlibpath_overrides_runpath=yes
6348       ;;
6349     esac
6350   else
6351     shlibpath_overrides_runpath=yes
6352   fi
6353   library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
6354   finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
6355   shlibpath_var=LD_LIBRARY_PATH
6356   ;;
6357
6358 openedition*)
6359   need_lib_prefix=no
6360   need_version=no
6361   shlibpath_overrides_runpath=yes
6362   shlibpath_var=LIBPATH
6363   postinstall_cmds="rm \$destdir/\$linkname; cp \$linkname \$destdir; chmod a+x \$lib"
6364   # the library's exports are in libname.x; this is the file that must
6365   # actually be linked with to use a DLL.
6366   library_names_spec="\${libname}\${release}.so\$versuffix \${libname}.x"
6367   ;;
6368
6369 os2*)
6370   libname_spec='$name'
6371   need_lib_prefix=no
6372   library_names_spec='$libname.dll $libname.a'
6373   dynamic_linker='OS/2 ld.exe'
6374   shlibpath_var=LIBPATH
6375   ;;
6376
6377 osf3* | osf4* | osf5*)
6378   version_type=osf
6379   need_version=no
6380   soname_spec='${libname}${release}.so$major'
6381   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6382   shlibpath_var=LD_LIBRARY_PATH
6383   sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
6384   sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
6385   hardcode_into_libs=yes
6386   ;;
6387
6388 sco3.2v5*)
6389   version_type=osf
6390   soname_spec='${libname}${release}.so$major'
6391   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6392   shlibpath_var=LD_LIBRARY_PATH
6393   ;;
6394
6395 solaris*)
6396   version_type=linux
6397   need_lib_prefix=no
6398   need_version=no
6399   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6400   soname_spec='${libname}${release}.so$major'
6401   shlibpath_var=LD_LIBRARY_PATH
6402   shlibpath_overrides_runpath=yes
6403   hardcode_into_libs=yes
6404   # ldd complains unless libraries are executable
6405   postinstall_cmds='chmod +x $lib'
6406   ;;
6407
6408 sunos4*)
6409   version_type=sunos
6410   library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
6411   finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
6412   shlibpath_var=LD_LIBRARY_PATH
6413   shlibpath_overrides_runpath=yes
6414   if test "$with_gnu_ld" = yes; then
6415     need_lib_prefix=no
6416   fi
6417   need_version=yes
6418   ;;
6419
6420 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
6421   version_type=linux
6422   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6423   soname_spec='${libname}${release}.so$major'
6424   shlibpath_var=LD_LIBRARY_PATH
6425   case $host_vendor in
6426     sni)
6427       shlibpath_overrides_runpath=no
6428       need_lib_prefix=no
6429       export_dynamic_flag_spec='${wl}-Blargedynsym'
6430       runpath_var=LD_RUN_PATH
6431       ;;
6432     siemens)
6433       need_lib_prefix=no
6434       ;;
6435     motorola)
6436       need_lib_prefix=no
6437       need_version=no
6438       shlibpath_overrides_runpath=no
6439       sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
6440       ;;
6441   esac
6442   ;;
6443
6444 uts4*)
6445   version_type=linux
6446   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6447   soname_spec='${libname}${release}.so$major'
6448   shlibpath_var=LD_LIBRARY_PATH
6449   ;;
6450
6451 dgux*)
6452   version_type=linux
6453   need_lib_prefix=no
6454   need_version=no
6455   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6456   soname_spec='${libname}${release}.so$major'
6457   shlibpath_var=LD_LIBRARY_PATH
6458   ;;
6459
6460 sysv4*MP*)
6461   if test -d /usr/nec ;then
6462     version_type=linux
6463     library_names_spec='$libname.so.$versuffix $libname.so.$major $libname.so'
6464     soname_spec='$libname.so.$major'
6465     shlibpath_var=LD_LIBRARY_PATH
6466   fi
6467   ;;
6468
6469 *)
6470   dynamic_linker=no
6471   ;;
6472 esac
6473 echo "$ac_t""$dynamic_linker" 1>&6
6474 test "$dynamic_linker" = no && can_build_shared=no
6475
6476 # Report the final consequences.
6477 echo $ac_n "checking if libtool supports shared libraries""... $ac_c" 1>&6
6478 echo "configure:6479: checking if libtool supports shared libraries" >&5
6479 echo "$ac_t""$can_build_shared" 1>&6
6480
6481 echo $ac_n "checking whether to build shared libraries""... $ac_c" 1>&6
6482 echo "configure:6483: checking whether to build shared libraries" >&5
6483 test "$can_build_shared" = "no" && enable_shared=no
6484
6485 # On AIX, shared libraries and static libraries use the same namespace, and
6486 # are all built from PIC.
6487 case "$host_os" in
6488 aix3*)
6489   test "$enable_shared" = yes && enable_static=no
6490   if test -n "$RANLIB"; then
6491     archive_cmds="$archive_cmds~\$RANLIB \$lib"
6492     postinstall_cmds='$RANLIB $lib'
6493   fi
6494   ;;
6495
6496 aix4*)
6497   if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
6498     test "$enable_shared" = yes && enable_static=no
6499   fi
6500   ;;
6501 esac
6502 echo "$ac_t""$enable_shared" 1>&6
6503
6504 echo $ac_n "checking whether to build static libraries""... $ac_c" 1>&6
6505 echo "configure:6506: checking whether to build static libraries" >&5
6506 # Make sure either enable_shared or enable_static is yes.
6507 test "$enable_shared" = yes || enable_static=yes
6508 echo "$ac_t""$enable_static" 1>&6
6509
6510 if test "$hardcode_action" = relink; then
6511   # Fast installation is not supported
6512   enable_fast_install=no
6513 elif test "$shlibpath_overrides_runpath" = yes ||
6514      test "$enable_shared" = no; then
6515   # Fast installation is not necessary
6516   enable_fast_install=needless
6517 fi
6518
6519 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
6520 if test "$GCC" = yes; then
6521   variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
6522 fi
6523
6524 if test "x$enable_dlopen" != xyes; then
6525   enable_dlopen=unknown
6526   enable_dlopen_self=unknown
6527   enable_dlopen_self_static=unknown
6528 else
6529   lt_cv_dlopen=no
6530   lt_cv_dlopen_libs=
6531
6532   case $host_os in
6533   beos*)
6534     lt_cv_dlopen="load_add_on"
6535     lt_cv_dlopen_libs=
6536     lt_cv_dlopen_self=yes
6537     ;;
6538
6539   cygwin* | mingw* | pw32*)
6540     lt_cv_dlopen="LoadLibrary"
6541     lt_cv_dlopen_libs=
6542    ;;
6543
6544   *)
6545     echo $ac_n "checking for dllload""... $ac_c" 1>&6
6546 echo "configure:6547: checking for dllload" >&5
6547 if eval "test \"\${ac_cv_func_dllload+set}\" = set"; then
6548   echo $ac_n "(cached) $ac_c" 1>&6
6549 else
6550   cat > conftest.$ac_ext <<EOF
6551 #line 6552 "configure"
6552 #include "confdefs.h"
6553 /* System header to define __stub macros and hopefully few prototypes,
6554     which can conflict with char dllload(); below.  */
6555 #include <assert.h>
6556 /* Override any gcc2 internal prototype to avoid an error.  */
6557 /* We use char because int might match the return type of a gcc2
6558     builtin and then its argument prototype would still apply.  */
6559 char dllload();
6560 char (*f)();
6561
6562 int main() {
6563
6564 /* The GNU C library defines this for functions which it implements
6565     to always fail with ENOSYS.  Some functions are actually named
6566     something starting with __ and the normal name is an alias.  */
6567 #if defined (__stub_dllload) || defined (__stub___dllload)
6568 choke me
6569 #else
6570 f = dllload;
6571 #endif
6572
6573 ; return 0; }
6574 EOF
6575 if { (eval echo configure:6576: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6576   rm -rf conftest*
6577   eval "ac_cv_func_dllload=yes"
6578 else
6579   echo "configure: failed program was:" >&5
6580   cat conftest.$ac_ext >&5
6581   rm -rf conftest*
6582   eval "ac_cv_func_dllload=no"
6583 fi
6584 rm -f conftest*
6585 fi
6586
6587 if eval "test \"`echo '$ac_cv_func_'dllload`\" = yes"; then
6588   echo "$ac_t""yes" 1>&6
6589   lt_cv_dlopen="dllload"
6590 else
6591   echo "$ac_t""no" 1>&6
6592 echo $ac_n "checking for shl_load""... $ac_c" 1>&6
6593 echo "configure:6594: checking for shl_load" >&5
6594 if eval "test \"\${ac_cv_func_shl_load+set}\" = set"; then
6595   echo $ac_n "(cached) $ac_c" 1>&6
6596 else
6597   cat > conftest.$ac_ext <<EOF
6598 #line 6599 "configure"
6599 #include "confdefs.h"
6600 /* System header to define __stub macros and hopefully few prototypes,
6601     which can conflict with char shl_load(); below.  */
6602 #include <assert.h>
6603 /* Override any gcc2 internal prototype to avoid an error.  */
6604 /* We use char because int might match the return type of a gcc2
6605     builtin and then its argument prototype would still apply.  */
6606 char shl_load();
6607 char (*f)();
6608
6609 int main() {
6610
6611 /* The GNU C library defines this for functions which it implements
6612     to always fail with ENOSYS.  Some functions are actually named
6613     something starting with __ and the normal name is an alias.  */
6614 #if defined (__stub_shl_load) || defined (__stub___shl_load)
6615 choke me
6616 #else
6617 f = shl_load;
6618 #endif
6619
6620 ; return 0; }
6621 EOF
6622 if { (eval echo configure:6623: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6623   rm -rf conftest*
6624   eval "ac_cv_func_shl_load=yes"
6625 else
6626   echo "configure: failed program was:" >&5
6627   cat conftest.$ac_ext >&5
6628   rm -rf conftest*
6629   eval "ac_cv_func_shl_load=no"
6630 fi
6631 rm -f conftest*
6632 fi
6633
6634 if eval "test \"`echo '$ac_cv_func_'shl_load`\" = yes"; then
6635   echo "$ac_t""yes" 1>&6
6636   lt_cv_dlopen="shl_load"
6637 else
6638   echo "$ac_t""no" 1>&6
6639 echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
6640 echo "configure:6641: checking for shl_load in -ldld" >&5
6641 ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-:%__p__%'`
6642 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6643   echo $ac_n "(cached) $ac_c" 1>&6
6644 else
6645   ac_save_LIBS="$LIBS"
6646 LIBS="-ldld  $LIBS"
6647 cat > conftest.$ac_ext <<EOF
6648 #line 6649 "configure"
6649 #include "confdefs.h"
6650 /* Override any gcc2 internal prototype to avoid an error.  */
6651 /* We use char because int might match the return type of a gcc2
6652     builtin and then its argument prototype would still apply.  */
6653 char shl_load();
6654
6655 int main() {
6656 shl_load()
6657 ; return 0; }
6658 EOF
6659 if { (eval echo configure:6660: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6660   rm -rf conftest*
6661   eval "ac_cv_lib_$ac_lib_var=yes"
6662 else
6663   echo "configure: failed program was:" >&5
6664   cat conftest.$ac_ext >&5
6665   rm -rf conftest*
6666   eval "ac_cv_lib_$ac_lib_var=no"
6667 fi
6668 rm -f conftest*
6669 LIBS="$ac_save_LIBS"
6670
6671 fi
6672 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6673   echo "$ac_t""yes" 1>&6
6674   lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"
6675 else
6676   echo "$ac_t""no" 1>&6
6677 echo $ac_n "checking for dlopen""... $ac_c" 1>&6
6678 echo "configure:6679: checking for dlopen" >&5
6679 if eval "test \"\${ac_cv_func_dlopen+set}\" = set"; then
6680   echo $ac_n "(cached) $ac_c" 1>&6
6681 else
6682   cat > conftest.$ac_ext <<EOF
6683 #line 6684 "configure"
6684 #include "confdefs.h"
6685 /* System header to define __stub macros and hopefully few prototypes,
6686     which can conflict with char dlopen(); below.  */
6687 #include <assert.h>
6688 /* Override any gcc2 internal prototype to avoid an error.  */
6689 /* We use char because int might match the return type of a gcc2
6690     builtin and then its argument prototype would still apply.  */
6691 char dlopen();
6692 char (*f)();
6693
6694 int main() {
6695
6696 /* The GNU C library defines this for functions which it implements
6697     to always fail with ENOSYS.  Some functions are actually named
6698     something starting with __ and the normal name is an alias.  */
6699 #if defined (__stub_dlopen) || defined (__stub___dlopen)
6700 choke me
6701 #else
6702 f = dlopen;
6703 #endif
6704
6705 ; return 0; }
6706 EOF
6707 if { (eval echo configure:6708: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6708   rm -rf conftest*
6709   eval "ac_cv_func_dlopen=yes"
6710 else
6711   echo "configure: failed program was:" >&5
6712   cat conftest.$ac_ext >&5
6713   rm -rf conftest*
6714   eval "ac_cv_func_dlopen=no"
6715 fi
6716 rm -f conftest*
6717 fi
6718
6719 if eval "test \"`echo '$ac_cv_func_'dlopen`\" = yes"; then
6720   echo "$ac_t""yes" 1>&6
6721   lt_cv_dlopen="dlopen"
6722 else
6723   echo "$ac_t""no" 1>&6
6724 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
6725 echo "configure:6726: checking for dlopen in -ldl" >&5
6726 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-:%__p__%'`
6727 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6728   echo $ac_n "(cached) $ac_c" 1>&6
6729 else
6730   ac_save_LIBS="$LIBS"
6731 LIBS="-ldl  $LIBS"
6732 cat > conftest.$ac_ext <<EOF
6733 #line 6734 "configure"
6734 #include "confdefs.h"
6735 /* Override any gcc2 internal prototype to avoid an error.  */
6736 /* We use char because int might match the return type of a gcc2
6737     builtin and then its argument prototype would still apply.  */
6738 char dlopen();
6739
6740 int main() {
6741 dlopen()
6742 ; return 0; }
6743 EOF
6744 if { (eval echo configure:6745: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6745   rm -rf conftest*
6746   eval "ac_cv_lib_$ac_lib_var=yes"
6747 else
6748   echo "configure: failed program was:" >&5
6749   cat conftest.$ac_ext >&5
6750   rm -rf conftest*
6751   eval "ac_cv_lib_$ac_lib_var=no"
6752 fi
6753 rm -f conftest*
6754 LIBS="$ac_save_LIBS"
6755
6756 fi
6757 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6758   echo "$ac_t""yes" 1>&6
6759   lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
6760 else
6761   echo "$ac_t""no" 1>&6
6762 echo $ac_n "checking for dlopen in -lsvld""... $ac_c" 1>&6
6763 echo "configure:6764: checking for dlopen in -lsvld" >&5
6764 ac_lib_var=`echo svld'_'dlopen | sed 'y%./+-:%__p__%'`
6765 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6766   echo $ac_n "(cached) $ac_c" 1>&6
6767 else
6768   ac_save_LIBS="$LIBS"
6769 LIBS="-lsvld  $LIBS"
6770 cat > conftest.$ac_ext <<EOF
6771 #line 6772 "configure"
6772 #include "confdefs.h"
6773 /* Override any gcc2 internal prototype to avoid an error.  */
6774 /* We use char because int might match the return type of a gcc2
6775     builtin and then its argument prototype would still apply.  */
6776 char dlopen();
6777
6778 int main() {
6779 dlopen()
6780 ; return 0; }
6781 EOF
6782 if { (eval echo configure:6783: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6783   rm -rf conftest*
6784   eval "ac_cv_lib_$ac_lib_var=yes"
6785 else
6786   echo "configure: failed program was:" >&5
6787   cat conftest.$ac_ext >&5
6788   rm -rf conftest*
6789   eval "ac_cv_lib_$ac_lib_var=no"
6790 fi
6791 rm -f conftest*
6792 LIBS="$ac_save_LIBS"
6793
6794 fi
6795 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6796   echo "$ac_t""yes" 1>&6
6797   lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"
6798 else
6799   echo "$ac_t""no" 1>&6
6800 echo $ac_n "checking for dld_link in -ldld""... $ac_c" 1>&6
6801 echo "configure:6802: checking for dld_link in -ldld" >&5
6802 ac_lib_var=`echo dld'_'dld_link | sed 'y%./+-:%__p__%'`
6803 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6804   echo $ac_n "(cached) $ac_c" 1>&6
6805 else
6806   ac_save_LIBS="$LIBS"
6807 LIBS="-ldld  $LIBS"
6808 cat > conftest.$ac_ext <<EOF
6809 #line 6810 "configure"
6810 #include "confdefs.h"
6811 /* Override any gcc2 internal prototype to avoid an error.  */
6812 /* We use char because int might match the return type of a gcc2
6813     builtin and then its argument prototype would still apply.  */
6814 char dld_link();
6815
6816 int main() {
6817 dld_link()
6818 ; return 0; }
6819 EOF
6820 if { (eval echo configure:6821: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6821   rm -rf conftest*
6822   eval "ac_cv_lib_$ac_lib_var=yes"
6823 else
6824   echo "configure: failed program was:" >&5
6825   cat conftest.$ac_ext >&5
6826   rm -rf conftest*
6827   eval "ac_cv_lib_$ac_lib_var=no"
6828 fi
6829 rm -f conftest*
6830 LIBS="$ac_save_LIBS"
6831
6832 fi
6833 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6834   echo "$ac_t""yes" 1>&6
6835   lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"
6836 else
6837   echo "$ac_t""no" 1>&6
6838 fi
6839
6840               
6841 fi
6842
6843             
6844 fi
6845
6846           
6847 fi
6848
6849         
6850 fi
6851
6852       
6853 fi
6854
6855     
6856 fi
6857
6858     ;;
6859   esac
6860
6861   if test "x$lt_cv_dlopen" != xno; then
6862     enable_dlopen=yes
6863   else
6864     enable_dlopen=no
6865   fi
6866
6867   case $lt_cv_dlopen in
6868   dlopen)
6869     save_CPPFLAGS="$CPPFLAGS"
6870         test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
6871
6872     save_LDFLAGS="$LDFLAGS"
6873     eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
6874
6875     save_LIBS="$LIBS"
6876     LIBS="$lt_cv_dlopen_libs $LIBS"
6877
6878     echo $ac_n "checking whether a program can dlopen itself""... $ac_c" 1>&6
6879 echo "configure:6880: checking whether a program can dlopen itself" >&5
6880 if eval "test \"\${lt_cv_dlopen_self+set}\" = set"; then
6881   echo $ac_n "(cached) $ac_c" 1>&6
6882 else
6883           if test "$cross_compiling" = yes; then :
6884   lt_cv_dlopen_self=cross
6885 else
6886     lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
6887   lt_status=$lt_dlunknown
6888   cat > conftest.$ac_ext <<EOF
6889 #line 6890 "configure"
6890 #include "confdefs.h"
6891
6892 #if HAVE_DLFCN_H
6893 #include <dlfcn.h>
6894 #endif
6895
6896 #include <stdio.h>
6897
6898 #ifdef RTLD_GLOBAL
6899 #  define LT_DLGLOBAL           RTLD_GLOBAL
6900 #else
6901 #  ifdef DL_GLOBAL
6902 #    define LT_DLGLOBAL         DL_GLOBAL
6903 #  else
6904 #    define LT_DLGLOBAL         0
6905 #  endif
6906 #endif
6907
6908 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
6909    find out it does not work in some platform. */
6910 #ifndef LT_DLLAZY_OR_NOW
6911 #  ifdef RTLD_LAZY
6912 #    define LT_DLLAZY_OR_NOW            RTLD_LAZY
6913 #  else
6914 #    ifdef DL_LAZY
6915 #      define LT_DLLAZY_OR_NOW          DL_LAZY
6916 #    else
6917 #      ifdef RTLD_NOW
6918 #        define LT_DLLAZY_OR_NOW        RTLD_NOW
6919 #      else
6920 #        ifdef DL_NOW
6921 #          define LT_DLLAZY_OR_NOW      DL_NOW
6922 #        else
6923 #          define LT_DLLAZY_OR_NOW      0
6924 #        endif
6925 #      endif
6926 #    endif
6927 #  endif
6928 #endif
6929
6930 #ifdef __cplusplus
6931 extern "C" void exit (int);
6932 #endif
6933
6934 void fnord() { int i=42;}
6935 int main ()
6936 {
6937   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
6938   int status = $lt_dlunknown;
6939
6940   if (self)
6941     {
6942       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
6943       else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
6944       /* dlclose (self); */
6945     }
6946
6947     exit (status);
6948 }
6949 EOF
6950   if { (eval echo configure:6951: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} 2>/dev/null; then
6951     (./conftest; exit; ) 2>/dev/null
6952     lt_status=$?
6953     case x$lt_status in
6954       x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;;
6955       x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;;
6956       x$lt_unknown|x*) lt_cv_dlopen_self=no ;;
6957     esac
6958   else :
6959     # compilation failed
6960     lt_cv_dlopen_self=no
6961   fi
6962 fi
6963 rm -fr conftest*
6964
6965     
6966 fi
6967
6968 echo "$ac_t""$lt_cv_dlopen_self" 1>&6
6969
6970     if test "x$lt_cv_dlopen_self" = xyes; then
6971       LDFLAGS="$LDFLAGS $link_static_flag"
6972       echo $ac_n "checking whether a statically linked program can dlopen itself""... $ac_c" 1>&6
6973 echo "configure:6974: checking whether a statically linked program can dlopen itself" >&5
6974 if eval "test \"\${lt_cv_dlopen_self_static+set}\" = set"; then
6975   echo $ac_n "(cached) $ac_c" 1>&6
6976 else
6977           if test "$cross_compiling" = yes; then :
6978   lt_cv_dlopen_self_static=cross
6979 else
6980     lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
6981   lt_status=$lt_dlunknown
6982   cat > conftest.$ac_ext <<EOF
6983 #line 6984 "configure"
6984 #include "confdefs.h"
6985
6986 #if HAVE_DLFCN_H
6987 #include <dlfcn.h>
6988 #endif
6989
6990 #include <stdio.h>
6991
6992 #ifdef RTLD_GLOBAL
6993 #  define LT_DLGLOBAL           RTLD_GLOBAL
6994 #else
6995 #  ifdef DL_GLOBAL
6996 #    define LT_DLGLOBAL         DL_GLOBAL
6997 #  else
6998 #    define LT_DLGLOBAL         0
6999 #  endif
7000 #endif
7001
7002 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
7003    find out it does not work in some platform. */
7004 #ifndef LT_DLLAZY_OR_NOW
7005 #  ifdef RTLD_LAZY
7006 #    define LT_DLLAZY_OR_NOW            RTLD_LAZY
7007 #  else
7008 #    ifdef DL_LAZY
7009 #      define LT_DLLAZY_OR_NOW          DL_LAZY
7010 #    else
7011 #      ifdef RTLD_NOW
7012 #        define LT_DLLAZY_OR_NOW        RTLD_NOW
7013 #      else
7014 #        ifdef DL_NOW
7015 #          define LT_DLLAZY_OR_NOW      DL_NOW
7016 #        else
7017 #          define LT_DLLAZY_OR_NOW      0
7018 #        endif
7019 #      endif
7020 #    endif
7021 #  endif
7022 #endif
7023
7024 #ifdef __cplusplus
7025 extern "C" void exit (int);
7026 #endif
7027
7028 void fnord() { int i=42;}
7029 int main ()
7030 {
7031   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
7032   int status = $lt_dlunknown;
7033
7034   if (self)
7035     {
7036       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
7037       else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
7038       /* dlclose (self); */
7039     }
7040
7041     exit (status);
7042 }
7043 EOF
7044   if { (eval echo configure:7045: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} 2>/dev/null; then
7045     (./conftest; exit; ) 2>/dev/null
7046     lt_status=$?
7047     case x$lt_status in
7048       x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;;
7049       x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;;
7050       x$lt_unknown|x*) lt_cv_dlopen_self_static=no ;;
7051     esac
7052   else :
7053     # compilation failed
7054     lt_cv_dlopen_self_static=no
7055   fi
7056 fi
7057 rm -fr conftest*
7058
7059       
7060 fi
7061
7062 echo "$ac_t""$lt_cv_dlopen_self_static" 1>&6
7063     fi
7064
7065     CPPFLAGS="$save_CPPFLAGS"
7066     LDFLAGS="$save_LDFLAGS"
7067     LIBS="$save_LIBS"
7068     ;;
7069   esac
7070
7071   case $lt_cv_dlopen_self in
7072   yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
7073   *) enable_dlopen_self=unknown ;;
7074   esac
7075
7076   case $lt_cv_dlopen_self_static in
7077   yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
7078   *) enable_dlopen_self_static=unknown ;;
7079   esac
7080 fi
7081
7082
7083 if test "$enable_shared" = yes && test "$GCC" = yes; then
7084   case $archive_cmds in
7085   *'~'*)
7086     # FIXME: we may have to deal with multi-command sequences.
7087     ;;
7088   '$CC '*)
7089     # Test whether the compiler implicitly links with -lc since on some
7090     # systems, -lgcc has to come before -lc. If gcc already passes -lc
7091     # to ld, don't add -lc before -lgcc.
7092     echo $ac_n "checking whether -lc should be explicitly linked in""... $ac_c" 1>&6
7093 echo "configure:7094: checking whether -lc should be explicitly linked in" >&5
7094     if eval "test \"\${lt_cv_archive_cmds_need_lc+set}\" = set"; then
7095   echo $ac_n "(cached) $ac_c" 1>&6
7096 else
7097   $rm conftest*
7098     echo 'static int dummy;' > conftest.$ac_ext
7099
7100     if { (eval echo configure:7101: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7101       soname=conftest
7102       lib=conftest
7103       libobjs=conftest.$ac_objext
7104       deplibs=
7105       wl=$lt_cv_prog_cc_wl
7106       compiler_flags=-v
7107       linker_flags=-v
7108       verstring=
7109       output_objdir=.
7110       libname=conftest
7111       save_allow_undefined_flag=$allow_undefined_flag
7112       allow_undefined_flag=
7113       if { (eval echo configure:7114: \"$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; }
7114       then
7115         lt_cv_archive_cmds_need_lc=no
7116       else
7117         lt_cv_archive_cmds_need_lc=yes
7118       fi
7119       allow_undefined_flag=$save_allow_undefined_flag
7120     else
7121       cat conftest.err 1>&5
7122     fi
7123 fi
7124
7125     echo "$ac_t""$lt_cv_archive_cmds_need_lc" 1>&6
7126     ;;
7127   esac
7128 fi
7129 need_lc=${lt_cv_archive_cmds_need_lc-yes}
7130
7131 # The second clause should only fire when bootstrapping the
7132 # libtool distribution, otherwise you forgot to ship ltmain.sh
7133 # with your package, and you will get complaints that there are
7134 # no rules to generate ltmain.sh.
7135 if test -f "$ltmain"; then
7136   :
7137 else
7138   # If there is no Makefile yet, we rely on a make rule to execute
7139   # `config.status --recheck' to rerun these tests and create the
7140   # libtool script then.
7141   test -f Makefile && make "$ltmain"
7142 fi
7143
7144 if test -f "$ltmain"; then
7145   trap "$rm \"${ofile}T\"; exit 1" 1 2 15
7146   $rm -f "${ofile}T"
7147
7148   echo creating $ofile
7149
7150   # Now quote all the things that may contain metacharacters while being
7151   # careful not to overquote the AC_SUBSTed values.  We take copies of the
7152   # variables and quote the copies for generation of the libtool script.
7153   for var in echo old_CC old_CFLAGS SED \
7154     AR AR_FLAGS CC LD LN_S NM SHELL \
7155     reload_flag reload_cmds wl \
7156     pic_flag link_static_flag no_builtin_flag export_dynamic_flag_spec \
7157     thread_safe_flag_spec whole_archive_flag_spec libname_spec \
7158     library_names_spec soname_spec \
7159     RANLIB old_archive_cmds old_archive_from_new_cmds old_postinstall_cmds \
7160     old_postuninstall_cmds archive_cmds archive_expsym_cmds postinstall_cmds \
7161     postuninstall_cmds extract_expsyms_cmds old_archive_from_expsyms_cmds \
7162     old_striplib striplib file_magic_cmd export_symbols_cmds \
7163     deplibs_check_method allow_undefined_flag no_undefined_flag \
7164     finish_cmds finish_eval global_symbol_pipe global_symbol_to_cdecl \
7165     global_symbol_to_c_name_address \
7166     hardcode_libdir_flag_spec hardcode_libdir_separator  \
7167     sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
7168     compiler_c_o compiler_o_lo need_locks exclude_expsyms include_expsyms; do
7169
7170     case $var in
7171     reload_cmds | old_archive_cmds | old_archive_from_new_cmds | \
7172     old_postinstall_cmds | old_postuninstall_cmds | \
7173     export_symbols_cmds | archive_cmds | archive_expsym_cmds | \
7174     extract_expsyms_cmds | old_archive_from_expsyms_cmds | \
7175     postinstall_cmds | postuninstall_cmds | \
7176     finish_cmds | sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
7177       # Double-quote double-evaled strings.
7178       eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
7179       ;;
7180     *)
7181       eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
7182       ;;
7183     esac
7184   done
7185
7186   cat <<__EOF__ > "${ofile}T"
7187 #! $SHELL
7188
7189 # `$echo "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
7190 # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
7191 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
7192 #
7193 # Copyright (C) 1996-2000 Free Software Foundation, Inc.
7194 # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
7195 #
7196 # This program is free software; you can redistribute it and/or modify
7197 # it under the terms of the GNU General Public License as published by
7198 # the Free Software Foundation; either version 2 of the License, or
7199 # (at your option) any later version.
7200 #
7201 # This program is distributed in the hope that it will be useful, but
7202 # WITHOUT ANY WARRANTY; without even the implied warranty of
7203 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
7204 # General Public License for more details.
7205 #
7206 # You should have received a copy of the GNU General Public License
7207 # along with this program; if not, write to the Free Software
7208 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
7209 #
7210 # As a special exception to the GNU General Public License, if you
7211 # distribute this file as part of a program that contains a
7212 # configuration script generated by Autoconf, you may include it under
7213 # the same distribution terms that you use for the rest of that program.
7214
7215 # A sed that does not truncate output.
7216 SED=$lt_SED
7217
7218 # Sed that helps us avoid accidentally triggering echo(1) options like -n.
7219 Xsed="${SED} -e s/^X//"
7220
7221 # The HP-UX ksh and POSIX shell print the target directory to stdout
7222 # if CDPATH is set.
7223 if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
7224
7225 # ### BEGIN LIBTOOL CONFIG
7226
7227 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
7228
7229 # Shell to use when invoking shell scripts.
7230 SHELL=$lt_SHELL
7231
7232 # Whether or not to build shared libraries.
7233 build_libtool_libs=$enable_shared
7234
7235 # Whether or not to build static libraries.
7236 build_old_libs=$enable_static
7237
7238 # Whether or not to add -lc for building shared libraries.
7239 build_libtool_need_lc=$need_lc
7240
7241 # Whether or not to optimize for fast installation.
7242 fast_install=$enable_fast_install
7243
7244 # The host system.
7245 host_alias=$host_alias
7246 host=$host
7247
7248 # An echo program that does not interpret backslashes.
7249 echo=$lt_echo
7250
7251 # The archiver.
7252 AR=$lt_AR
7253 AR_FLAGS=$lt_AR_FLAGS
7254
7255 # The default C compiler.
7256 CC=$lt_CC
7257
7258 # Is the compiler the GNU C compiler?
7259 with_gcc=$GCC
7260
7261 # The linker used to build libraries.
7262 LD=$lt_LD
7263
7264 # Whether we need hard or soft links.
7265 LN_S=$lt_LN_S
7266
7267 # A BSD-compatible nm program.
7268 NM=$lt_NM
7269
7270 # A symbol stripping program
7271 STRIP=$STRIP
7272
7273 # Used to examine libraries when file_magic_cmd begins "file"
7274 MAGIC_CMD=$MAGIC_CMD
7275
7276 # Used on cygwin: DLL creation program.
7277 DLLTOOL="$DLLTOOL"
7278
7279 # Used on cygwin: object dumper.
7280 OBJDUMP="$OBJDUMP"
7281
7282 # Used on cygwin: assembler.
7283 AS="$AS"
7284
7285 # The name of the directory that contains temporary libtool files.
7286 objdir=$objdir
7287
7288 # How to create reloadable object files.
7289 reload_flag=$lt_reload_flag
7290 reload_cmds=$lt_reload_cmds
7291
7292 # How to pass a linker flag through the compiler.
7293 wl=$lt_wl
7294
7295 # Object file suffix (normally "o").
7296 objext="$ac_objext"
7297
7298 # Old archive suffix (normally "a").
7299 libext="$libext"
7300
7301 # Executable file suffix (normally "").
7302 exeext="$exeext"
7303
7304 # Additional compiler flags for building library objects.
7305 pic_flag=$lt_pic_flag
7306 pic_mode=$pic_mode
7307
7308 # Does compiler simultaneously support -c and -o options?
7309 compiler_c_o=$lt_compiler_c_o
7310
7311 # Can we write directly to a .lo ?
7312 compiler_o_lo=$lt_compiler_o_lo
7313
7314 # Must we lock files when doing compilation ?
7315 need_locks=$lt_need_locks
7316
7317 # Do we need the lib prefix for modules?
7318 need_lib_prefix=$need_lib_prefix
7319
7320 # Do we need a version for libraries?
7321 need_version=$need_version
7322
7323 # Whether dlopen is supported.
7324 dlopen_support=$enable_dlopen
7325
7326 # Whether dlopen of programs is supported.
7327 dlopen_self=$enable_dlopen_self
7328
7329 # Whether dlopen of statically linked programs is supported.
7330 dlopen_self_static=$enable_dlopen_self_static
7331
7332 # Compiler flag to prevent dynamic linking.
7333 link_static_flag=$lt_link_static_flag
7334
7335 # Compiler flag to turn off builtin functions.
7336 no_builtin_flag=$lt_no_builtin_flag
7337
7338 # Compiler flag to allow reflexive dlopens.
7339 export_dynamic_flag_spec=$lt_export_dynamic_flag_spec
7340
7341 # Compiler flag to generate shared objects directly from archives.
7342 whole_archive_flag_spec=$lt_whole_archive_flag_spec
7343
7344 # Compiler flag to generate thread-safe objects.
7345 thread_safe_flag_spec=$lt_thread_safe_flag_spec
7346
7347 # Library versioning type.
7348 version_type=$version_type
7349
7350 # Format of library name prefix.
7351 libname_spec=$lt_libname_spec
7352
7353 # List of archive names.  First name is the real one, the rest are links.
7354 # The last name is the one that the linker finds with -lNAME.
7355 library_names_spec=$lt_library_names_spec
7356
7357 # The coded name of the library, if different from the real name.
7358 soname_spec=$lt_soname_spec
7359
7360 # Commands used to build and install an old-style archive.
7361 RANLIB=$lt_RANLIB
7362 old_archive_cmds=$lt_old_archive_cmds
7363 old_postinstall_cmds=$lt_old_postinstall_cmds
7364 old_postuninstall_cmds=$lt_old_postuninstall_cmds
7365
7366 # Create an old-style archive from a shared archive.
7367 old_archive_from_new_cmds=$lt_old_archive_from_new_cmds
7368
7369 # Create a temporary old-style archive to link instead of a shared archive.
7370 old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds
7371
7372 # Commands used to build and install a shared archive.
7373 archive_cmds=$lt_archive_cmds
7374 archive_expsym_cmds=$lt_archive_expsym_cmds
7375 postinstall_cmds=$lt_postinstall_cmds
7376 postuninstall_cmds=$lt_postuninstall_cmds
7377
7378 # Commands to strip libraries.
7379 old_striplib=$lt_old_striplib
7380 striplib=$lt_striplib
7381
7382 # Method to check whether dependent libraries are shared objects.
7383 deplibs_check_method=$lt_deplibs_check_method
7384
7385 # Command to use when deplibs_check_method == file_magic.
7386 file_magic_cmd=$lt_file_magic_cmd
7387
7388 # Flag that allows shared libraries with undefined symbols to be built.
7389 allow_undefined_flag=$lt_allow_undefined_flag
7390
7391 # Flag that forces no undefined symbols.
7392 no_undefined_flag=$lt_no_undefined_flag
7393
7394 # Commands used to finish a libtool library installation in a directory.
7395 finish_cmds=$lt_finish_cmds
7396
7397 # Same as above, but a single script fragment to be evaled but not shown.
7398 finish_eval=$lt_finish_eval
7399
7400 # Take the output of nm and produce a listing of raw symbols and C names.
7401 global_symbol_pipe=$lt_global_symbol_pipe
7402
7403 # Transform the output of nm in a proper C declaration
7404 global_symbol_to_cdecl=$lt_global_symbol_to_cdecl
7405
7406 # Transform the output of nm in a C name address pair
7407 global_symbol_to_c_name_address=$lt_global_symbol_to_c_name_address
7408
7409 # This is the shared library runtime path variable.
7410 runpath_var=$runpath_var
7411
7412 # This is the shared library path variable.
7413 shlibpath_var=$shlibpath_var
7414
7415 # Is shlibpath searched before the hard-coded library search path?
7416 shlibpath_overrides_runpath=$shlibpath_overrides_runpath
7417
7418 # How to hardcode a shared library path into an executable.
7419 hardcode_action=$hardcode_action
7420
7421 # Whether we should hardcode library paths into libraries.
7422 hardcode_into_libs=$hardcode_into_libs
7423
7424 # Flag to hardcode \$libdir into a binary during linking.
7425 # This must work even if \$libdir does not exist.
7426 hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
7427
7428 # Whether we need a single -rpath flag with a separated argument.
7429 hardcode_libdir_separator=$lt_hardcode_libdir_separator
7430
7431 # Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
7432 # resulting binary.
7433 hardcode_direct=$hardcode_direct
7434
7435 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
7436 # resulting binary.
7437 hardcode_minus_L=$hardcode_minus_L
7438
7439 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
7440 # the resulting binary.
7441 hardcode_shlibpath_var=$hardcode_shlibpath_var
7442
7443 # Variables whose values should be saved in libtool wrapper scripts and
7444 # restored at relink time.
7445 variables_saved_for_relink="$variables_saved_for_relink"
7446
7447 # Whether libtool must link a program against all its dependency libraries.
7448 link_all_deplibs=$link_all_deplibs
7449
7450 # Compile-time system search path for libraries
7451 sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
7452
7453 # Run-time system search path for libraries
7454 sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
7455
7456 # Fix the shell variable \$srcfile for the compiler.
7457 fix_srcfile_path="$fix_srcfile_path"
7458
7459 # Set to yes if exported symbols are required.
7460 always_export_symbols=$always_export_symbols
7461
7462 # The commands to list exported symbols.
7463 export_symbols_cmds=$lt_export_symbols_cmds
7464
7465 # The commands to extract the exported symbol list from a shared archive.
7466 extract_expsyms_cmds=$lt_extract_expsyms_cmds
7467
7468 # Symbols that should not be listed in the preloaded symbols.
7469 exclude_expsyms=$lt_exclude_expsyms
7470
7471 # Symbols that must always be exported.
7472 include_expsyms=$lt_include_expsyms
7473
7474 # ### END LIBTOOL CONFIG
7475
7476 __EOF__
7477
7478   case $host_os in
7479   aix3*)
7480     cat <<\EOF >> "${ofile}T"
7481
7482 # AIX sometimes has problems with the GCC collect2 program.  For some
7483 # reason, if we set the COLLECT_NAMES environment variable, the problems
7484 # vanish in a puff of smoke.
7485 if test "X${COLLECT_NAMES+set}" != Xset; then
7486   COLLECT_NAMES=
7487   export COLLECT_NAMES
7488 fi
7489 EOF
7490     ;;
7491   esac
7492
7493   case $host_os in
7494   cygwin* | mingw* | pw32* | os2*)
7495     cat <<'EOF' >> "${ofile}T"
7496       # This is a source program that is used to create dlls on Windows
7497       # Don't remove nor modify the starting and closing comments
7498 # /* ltdll.c starts here */
7499 # #define WIN32_LEAN_AND_MEAN
7500 # #include <windows.h>
7501 # #undef WIN32_LEAN_AND_MEAN
7502 # #include <stdio.h>
7503 #
7504 # #ifndef __CYGWIN__
7505 # #  ifdef __CYGWIN32__
7506 # #    define __CYGWIN__ __CYGWIN32__
7507 # #  endif
7508 # #endif
7509 #
7510 # #ifdef __cplusplus
7511 # extern "C" {
7512 # #endif
7513 # BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
7514 # #ifdef __cplusplus
7515 # }
7516 # #endif
7517 #
7518 # #ifdef __CYGWIN__
7519 # #include <cygwin/cygwin_dll.h>
7520 # DECLARE_CYGWIN_DLL( DllMain );
7521 # #endif
7522 # HINSTANCE __hDllInstance_base;
7523 #
7524 # BOOL APIENTRY
7525 # DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
7526 # {
7527 #   __hDllInstance_base = hInst;
7528 #   return TRUE;
7529 # }
7530 # /* ltdll.c ends here */
7531         # This is a source program that is used to create import libraries
7532         # on Windows for dlls which lack them. Don't remove nor modify the
7533         # starting and closing comments
7534 # /* impgen.c starts here */
7535 # /*   Copyright (C) 1999-2000 Free Software Foundation, Inc.
7536 #
7537 #  This file is part of GNU libtool.
7538 #
7539 #  This program is free software; you can redistribute it and/or modify
7540 #  it under the terms of the GNU General Public License as published by
7541 #  the Free Software Foundation; either version 2 of the License, or
7542 #  (at your option) any later version.
7543 #
7544 #  This program is distributed in the hope that it will be useful,
7545 #  but WITHOUT ANY WARRANTY; without even the implied warranty of
7546 #  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
7547 #  GNU General Public License for more details.
7548 #
7549 #  You should have received a copy of the GNU General Public License
7550 #  along with this program; if not, write to the Free Software
7551 #  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
7552 #  */
7553 #
7554 # #include <stdio.h>            /* for printf() */
7555 # #include <unistd.h>           /* for open(), lseek(), read() */
7556 # #include <fcntl.h>            /* for O_RDONLY, O_BINARY */
7557 # #include <string.h>           /* for strdup() */
7558 #
7559 # /* O_BINARY isn't required (or even defined sometimes) under Unix */
7560 # #ifndef O_BINARY
7561 # #define O_BINARY 0
7562 # #endif
7563 #
7564 # static unsigned int
7565 # pe_get16 (fd, offset)
7566 #      int fd;
7567 #      int offset;
7568 # {
7569 #   unsigned char b[2];
7570 #   lseek (fd, offset, SEEK_SET);
7571 #   read (fd, b, 2);
7572 #   return b[0] + (b[1]<<8);
7573 # }
7574 #
7575 # static unsigned int
7576 # pe_get32 (fd, offset)
7577 #     int fd;
7578 #     int offset;
7579 # {
7580 #   unsigned char b[4];
7581 #   lseek (fd, offset, SEEK_SET);
7582 #   read (fd, b, 4);
7583 #   return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
7584 # }
7585 #
7586 # static unsigned int
7587 # pe_as32 (ptr)
7588 #      void *ptr;
7589 # {
7590 #   unsigned char *b = ptr;
7591 #   return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
7592 # }
7593 #
7594 # int
7595 # main (argc, argv)
7596 #     int argc;
7597 #     char *argv[];
7598 # {
7599 #     int dll;
7600 #     unsigned long pe_header_offset, opthdr_ofs, num_entries, i;
7601 #     unsigned long export_rva, export_size, nsections, secptr, expptr;
7602 #     unsigned long name_rvas, nexp;
7603 #     unsigned char *expdata, *erva;
7604 #     char *filename, *dll_name;
7605 #
7606 #     filename = argv[1];
7607 #
7608 #     dll = open(filename, O_RDONLY|O_BINARY);
7609 #     if (dll < 1)
7610 #       return 1;
7611 #
7612 #     dll_name = filename;
7613 #
7614 #     for (i=0; filename[i]; i++)
7615 #       if (filename[i] == '/' || filename[i] == '\\'  || filename[i] == ':')
7616 #           dll_name = filename + i +1;
7617 #
7618 #     pe_header_offset = pe_get32 (dll, 0x3c);
7619 #     opthdr_ofs = pe_header_offset + 4 + 20;
7620 #     num_entries = pe_get32 (dll, opthdr_ofs + 92);
7621 #
7622 #     if (num_entries < 1) /* no exports */
7623 #       return 1;
7624 #
7625 #     export_rva = pe_get32 (dll, opthdr_ofs + 96);
7626 #     export_size = pe_get32 (dll, opthdr_ofs + 100);
7627 #     nsections = pe_get16 (dll, pe_header_offset + 4 +2);
7628 #     secptr = (pe_header_offset + 4 + 20 +
7629 #             pe_get16 (dll, pe_header_offset + 4 + 16));
7630 #
7631 #     expptr = 0;
7632 #     for (i = 0; i < nsections; i++)
7633 #     {
7634 #       char sname[8];
7635 #       unsigned long secptr1 = secptr + 40 * i;
7636 #       unsigned long vaddr = pe_get32 (dll, secptr1 + 12);
7637 #       unsigned long vsize = pe_get32 (dll, secptr1 + 16);
7638 #       unsigned long fptr = pe_get32 (dll, secptr1 + 20);
7639 #       lseek(dll, secptr1, SEEK_SET);
7640 #       read(dll, sname, 8);
7641 #       if (vaddr <= export_rva && vaddr+vsize > export_rva)
7642 #       {
7643 #           expptr = fptr + (export_rva - vaddr);
7644 #           if (export_rva + export_size > vaddr + vsize)
7645 #               export_size = vsize - (export_rva - vaddr);
7646 #           break;
7647 #       }
7648 #     }
7649 #
7650 #     expdata = (unsigned char*)malloc(export_size);
7651 #     lseek (dll, expptr, SEEK_SET);
7652 #     read (dll, expdata, export_size);
7653 #     erva = expdata - export_rva;
7654 #
7655 #     nexp = pe_as32 (expdata+24);
7656 #     name_rvas = pe_as32 (expdata+32);
7657 #
7658 #     printf ("EXPORTS\n");
7659 #     for (i = 0; i<nexp; i++)
7660 #     {
7661 #       unsigned long name_rva = pe_as32 (erva+name_rvas+i*4);
7662 #       printf ("\t%s @ %ld ;\n", erva+name_rva, 1+ i);
7663 #     }
7664 #
7665 #     return 0;
7666 # }
7667 # /* impgen.c ends here */
7668
7669 EOF
7670     ;;
7671   esac
7672
7673   # We use sed instead of cat because bash on DJGPP gets confused if
7674   # if finds mixed CR/LF and LF-only lines.  Since sed operates in
7675   # text mode, it properly converts lines to CR/LF.  This bash problem
7676   # is reportedly fixed, but why not run on old versions too?
7677   sed '$q' "$ltmain" >> "${ofile}T" || (rm -f "${ofile}T"; exit 1)
7678
7679   mv -f "${ofile}T" "$ofile" || \
7680     (rm -f "$ofile" && cp "${ofile}T" "$ofile" && rm -f "${ofile}T")
7681   chmod +x "$ofile"
7682 fi
7683
7684
7685
7686
7687
7688 # This can be used to rebuild libtool when needed
7689 LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
7690
7691 # Always use our own libtool.
7692 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
7693
7694 # Prevent multiple expansion
7695
7696
7697
7698 ol_link_perl=no
7699 if test $ol_enable_perl != no ; then
7700         # Extract the first word of "perl", so it can be a program name with args.
7701 set dummy perl; ac_word=$2
7702 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
7703 echo "configure:7704: checking for $ac_word" >&5
7704 if eval "test \"\${ac_cv_path_PERLBIN+set}\" = set"; then
7705   echo $ac_n "(cached) $ac_c" 1>&6
7706 else
7707   case "$PERLBIN" in
7708   /*)
7709   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a path.
7710   ;;
7711   ?:/*)
7712   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a dos path.
7713   ;;
7714   *)
7715   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
7716   ac_dummy="$PATH"
7717   for ac_dir in $ac_dummy; do 
7718     test -z "$ac_dir" && ac_dir=.
7719     if test -f $ac_dir/$ac_word; then
7720       ac_cv_path_PERLBIN="$ac_dir/$ac_word"
7721       break
7722     fi
7723   done
7724   IFS="$ac_save_ifs"
7725   test -z "$ac_cv_path_PERLBIN" && ac_cv_path_PERLBIN="/usr/bin/perl"
7726   ;;
7727 esac
7728 fi
7729 PERLBIN="$ac_cv_path_PERLBIN"
7730 if test -n "$PERLBIN"; then
7731   echo "$ac_t""$PERLBIN" 1>&6
7732 else
7733   echo "$ac_t""no" 1>&6
7734 fi
7735
7736
7737         if test "no$PERLBIN" = "no" ; then
7738                 if test $ol_enable_perl = yes ; then
7739                         { echo "configure: error: could not locate perl" 1>&2; exit 1; }
7740                 fi
7741
7742         else
7743                 PERL_CPPFLAGS="`$PERLBIN -MExtUtils::Embed -e ccopts`"
7744                 PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e 's/ -lc / /' -e 's/ -lc$//'`"
7745
7746                 if test x"$ol_enable_perl" = "xyes" ; then
7747                         SLAPD_PERL_LDFLAGS="$PERL_LDFLAGS"
7748                 else
7749                         MOD_PERL_LDFLAGS="$PERL_LDFLAGS"
7750                 fi
7751                                 ol_link_perl=yes
7752         fi
7753 fi
7754
7755 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
7756 echo "configure:7757: checking how to run the C preprocessor" >&5
7757 # On Suns, sometimes $CPP names a directory.
7758 if test -n "$CPP" && test -d "$CPP"; then
7759   CPP=
7760 fi
7761 if test -z "$CPP"; then
7762 if eval "test \"\${ac_cv_prog_CPP+set}\" = set"; then
7763   echo $ac_n "(cached) $ac_c" 1>&6
7764 else
7765     # This must be in double quotes, not single quotes, because CPP may get
7766   # substituted into the Makefile and "${CC-cc}" will confuse make.
7767   CPP="${CC-cc} -E"
7768   # On the NeXT, cc -E runs the code through the compiler's parser,
7769   # not just through cpp.
7770   cat > conftest.$ac_ext <<EOF
7771 #line 7772 "configure"
7772 #include "confdefs.h"
7773 #include <assert.h>
7774 Syntax Error
7775 EOF
7776 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7777 { (eval echo configure:7778: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7778 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7779 if test -z "$ac_err"; then
7780   :
7781 else
7782   echo "$ac_err" >&5
7783   echo "configure: failed program was:" >&5
7784   cat conftest.$ac_ext >&5
7785   rm -rf conftest*
7786   CPP="${CC-cc} -E -traditional-cpp"
7787   cat > conftest.$ac_ext <<EOF
7788 #line 7789 "configure"
7789 #include "confdefs.h"
7790 #include <assert.h>
7791 Syntax Error
7792 EOF
7793 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7794 { (eval echo configure:7795: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7795 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7796 if test -z "$ac_err"; then
7797   :
7798 else
7799   echo "$ac_err" >&5
7800   echo "configure: failed program was:" >&5
7801   cat conftest.$ac_ext >&5
7802   rm -rf conftest*
7803   CPP="${CC-cc} -nologo -E"
7804   cat > conftest.$ac_ext <<EOF
7805 #line 7806 "configure"
7806 #include "confdefs.h"
7807 #include <assert.h>
7808 Syntax Error
7809 EOF
7810 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7811 { (eval echo configure:7812: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7812 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7813 if test -z "$ac_err"; then
7814   :
7815 else
7816   echo "$ac_err" >&5
7817   echo "configure: failed program was:" >&5
7818   cat conftest.$ac_ext >&5
7819   rm -rf conftest*
7820   CPP=/lib/cpp
7821 fi
7822 rm -f conftest*
7823 fi
7824 rm -f conftest*
7825 fi
7826 rm -f conftest*
7827   ac_cv_prog_CPP="$CPP"
7828 fi
7829   CPP="$ac_cv_prog_CPP"
7830 else
7831   ac_cv_prog_CPP="$CPP"
7832 fi
7833 echo "$ac_t""$CPP" 1>&6
7834
7835
7836
7837 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
7838 echo "configure:7839: checking for Cygwin environment" >&5
7839 if eval "test \"\${ac_cv_cygwin+set}\" = set"; then
7840   echo $ac_n "(cached) $ac_c" 1>&6
7841 else
7842   cat > conftest.$ac_ext <<EOF
7843 #line 7844 "configure"
7844 #include "confdefs.h"
7845
7846 int main() {
7847
7848 #ifndef __CYGWIN__
7849 #define __CYGWIN__ __CYGWIN32__
7850 #endif
7851 return __CYGWIN__;
7852 ; return 0; }
7853 EOF
7854 if { (eval echo configure:7855: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7855   rm -rf conftest*
7856   ac_cv_cygwin=yes
7857 else
7858   echo "configure: failed program was:" >&5
7859   cat conftest.$ac_ext >&5
7860   rm -rf conftest*
7861   ac_cv_cygwin=no
7862 fi
7863 rm -f conftest*
7864 fi
7865
7866 echo "$ac_t""$ac_cv_cygwin" 1>&6
7867 CYGWIN=
7868 test "$ac_cv_cygwin" = yes && CYGWIN=yes
7869 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
7870 echo "configure:7871: checking for mingw32 environment" >&5
7871 if eval "test \"\${ac_cv_mingw32+set}\" = set"; then
7872   echo $ac_n "(cached) $ac_c" 1>&6
7873 else
7874   cat > conftest.$ac_ext <<EOF
7875 #line 7876 "configure"
7876 #include "confdefs.h"
7877
7878 int main() {
7879 return __MINGW32__;
7880 ; return 0; }
7881 EOF
7882 if { (eval echo configure:7883: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7883   rm -rf conftest*
7884   ac_cv_mingw32=yes
7885 else
7886   echo "configure: failed program was:" >&5
7887   cat conftest.$ac_ext >&5
7888   rm -rf conftest*
7889   ac_cv_mingw32=no
7890 fi
7891 rm -f conftest*
7892 fi
7893
7894 echo "$ac_t""$ac_cv_mingw32" 1>&6
7895 MINGW32=
7896 test "$ac_cv_mingw32" = yes && MINGW32=yes
7897
7898
7899
7900 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
7901 echo "configure:7902: checking for executable suffix" >&5
7902 if eval "test \"\${ac_cv_exeext+set}\" = set"; then
7903   echo $ac_n "(cached) $ac_c" 1>&6
7904 else
7905   if test "$CYGWIN" = yes || test "$MINGW32" = yes || test "$EMXOS2" = yes; then
7906   ac_cv_exeext=.exe
7907 else
7908   rm -f conftest*
7909   echo 'int main () { return 0; }' > conftest.$ac_ext
7910   ac_cv_exeext=
7911   if { (eval echo configure:7912: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
7912     for file in conftest.*; do
7913       case $file in
7914       *.c | *.C | *.o | *.obj | *.xcoff) ;;
7915       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
7916       esac
7917     done
7918   else
7919     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
7920   fi
7921   rm -f conftest*
7922   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
7923 fi
7924 fi
7925
7926 EXEEXT=""
7927 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
7928 echo "$ac_t""${ac_cv_exeext}" 1>&6
7929 ac_exeext=$EXEEXT
7930
7931 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
7932 echo "configure:7933: checking for object suffix" >&5
7933 if eval "test \"\${ac_cv_objext+set}\" = set"; then
7934   echo $ac_n "(cached) $ac_c" 1>&6
7935 else
7936   rm -f conftest*
7937 echo 'int i = 1;' > conftest.$ac_ext
7938 if { (eval echo configure:7939: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7939   for ac_file in conftest.*; do
7940     case $ac_file in
7941     *.c) ;;
7942     *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
7943     esac
7944   done
7945 else
7946   { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
7947 fi
7948 rm -f conftest*
7949 fi
7950
7951 echo "$ac_t""$ac_cv_objext" 1>&6
7952 OBJEXT=$ac_cv_objext
7953 ac_objext=$ac_cv_objext
7954
7955
7956 cat >> confdefs.h <<EOF
7957 #define EXEEXT "${EXEEXT}"
7958 EOF
7959
7960
7961 echo $ac_n "checking for be_app in -lbe""... $ac_c" 1>&6
7962 echo "configure:7963: checking for be_app in -lbe" >&5
7963 ac_lib_var=`echo be'_'be_app | sed 'y%./+-:%__p__%'`
7964 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
7965   echo $ac_n "(cached) $ac_c" 1>&6
7966 else
7967   ac_save_LIBS="$LIBS"
7968 LIBS="-lbe -lroot -lnet $LIBS"
7969 cat > conftest.$ac_ext <<EOF
7970 #line 7971 "configure"
7971 #include "confdefs.h"
7972 /* Override any gcc2 internal prototype to avoid an error.  */
7973 /* We use char because int might match the return type of a gcc2
7974     builtin and then its argument prototype would still apply.  */
7975 char be_app();
7976
7977 int main() {
7978 be_app()
7979 ; return 0; }
7980 EOF
7981 if { (eval echo configure:7982: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7982   rm -rf conftest*
7983   eval "ac_cv_lib_$ac_lib_var=yes"
7984 else
7985   echo "configure: failed program was:" >&5
7986   cat conftest.$ac_ext >&5
7987   rm -rf conftest*
7988   eval "ac_cv_lib_$ac_lib_var=no"
7989 fi
7990 rm -f conftest*
7991 LIBS="$ac_save_LIBS"
7992
7993 fi
7994 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7995   echo "$ac_t""yes" 1>&6
7996   LIBS="$LIBS -lbe -lroot -lnet"
7997 else
7998   echo "$ac_t""no" 1>&6
7999 :
8000 fi
8001
8002
8003
8004
8005
8006 echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
8007 echo "configure:8008: checking for ${CC-cc} option to accept ANSI C" >&5
8008 if eval "test \"\${am_cv_prog_cc_stdc+set}\" = set"; then
8009   echo $ac_n "(cached) $ac_c" 1>&6
8010 else
8011   am_cv_prog_cc_stdc=no
8012 ac_save_CC="$CC"
8013 # Don't try gcc -ansi; that turns off useful extensions and
8014 # breaks some systems' header files.
8015 # AIX                   -qlanglvl=ansi
8016 # Ultrix and OSF/1      -std1
8017 # HP-UX 10.20 and later -Ae
8018 # HP-UX older versions  -Aa -D_HPUX_SOURCE
8019 # SVR4                  -Xc -D__EXTENSIONS__
8020 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
8021 do
8022   CC="$ac_save_CC $ac_arg"
8023   cat > conftest.$ac_ext <<EOF
8024 #line 8025 "configure"
8025 #include "confdefs.h"
8026 #include <stdarg.h>
8027 #include <stdio.h>
8028 #include <sys/types.h>
8029 #include <sys/stat.h>
8030 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
8031 struct buf { int x; };
8032 FILE * (*rcsopen) (struct buf *, struct stat *, int);
8033 static char *e (p, i)
8034      char **p;
8035      int i;
8036 {
8037   return p[i];
8038 }
8039 static char *f (char * (*g) (char **, int), char **p, ...)
8040 {
8041   char *s;
8042   va_list v;
8043   va_start (v,p);
8044   s = g (p, va_arg (v,int));
8045   va_end (v);
8046   return s;
8047 }
8048 int test (int i, double x);
8049 struct s1 {int (*f) (int a);};
8050 struct s2 {int (*f) (double a);};
8051 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
8052 int argc;
8053 char **argv;
8054
8055 int main() {
8056
8057 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
8058
8059 ; return 0; }
8060 EOF
8061 if { (eval echo configure:8062: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8062   rm -rf conftest*
8063   am_cv_prog_cc_stdc="$ac_arg"; break
8064 else
8065   echo "configure: failed program was:" >&5
8066   cat conftest.$ac_ext >&5
8067 fi
8068 rm -f conftest*
8069 done
8070 CC="$ac_save_CC"
8071
8072 fi
8073
8074 if test -z "$am_cv_prog_cc_stdc"; then
8075   echo "$ac_t""none needed" 1>&6
8076 else
8077   echo "$ac_t""$am_cv_prog_cc_stdc" 1>&6
8078 fi
8079 case "x$am_cv_prog_cc_stdc" in
8080   x|xno) ;;
8081   *) CC="$CC $am_cv_prog_cc_stdc" ;;
8082 esac
8083
8084 if test "X${am_cv_prog_cc_stdc}" = "Xno" ; then
8085         { echo "configure: error: OpenLDAP requires compiler to support STDC constructs." 1>&2; exit 1; }
8086 fi
8087
8088 # test for make depend flag
8089 OL_MKDEP=
8090 OL_MKDEP_FLAGS=
8091 if test -z "${MKDEP}"; then
8092         OL_MKDEP="${CC-cc}"
8093         if test -z "${MKDEP_FLAGS}"; then
8094                 echo $ac_n "checking for ${OL_MKDEP} depend flag""... $ac_c" 1>&6
8095 echo "configure:8096: checking for ${OL_MKDEP} depend flag" >&5
8096 if eval "test \"\${ol_cv_mkdep+set}\" = set"; then
8097   echo $ac_n "(cached) $ac_c" 1>&6
8098 else
8099   
8100                         ol_cv_mkdep=no
8101                         for flag in "-M" "-xM"; do
8102                                 cat > conftest.c <<EOF
8103  noCode;
8104 EOF
8105                                 if { ac_try='$OL_MKDEP $flag conftest.c'; { (eval echo configure:8106: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } \
8106                                         | egrep '^conftest\.'"${ac_objext}" >/dev/null 2>&1
8107                                 then
8108                                         if test ! -f conftest."${ac_object}" ; then
8109                                                 ol_cv_mkdep=$flag
8110                                                 OL_MKDEP_FLAGS="$flag"
8111                                                 break
8112                                         fi
8113                                 fi
8114                         done
8115                         rm -f conftest*
8116                 
8117 fi
8118
8119 echo "$ac_t""$ol_cv_mkdep" 1>&6
8120         else
8121                 cc_cv_mkdep=yes
8122                 OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
8123         fi
8124 else
8125         cc_cv_mkdep=yes
8126         OL_MKDEP="${MKDEP}"
8127         OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
8128 fi
8129
8130
8131
8132 if test "${ol_cv_mkdep}" = no ; then
8133         # this will soon become an error
8134         echo "configure: warning: do not know how to generate dependencies" 1>&2
8135 fi
8136
8137 echo $ac_n "checking for afopen in -ls""... $ac_c" 1>&6
8138 echo "configure:8139: checking for afopen in -ls" >&5
8139 ac_lib_var=`echo s'_'afopen | sed 'y%./+-:%__p__%'`
8140 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8141   echo $ac_n "(cached) $ac_c" 1>&6
8142 else
8143   ac_save_LIBS="$LIBS"
8144 LIBS="-ls  $LIBS"
8145 cat > conftest.$ac_ext <<EOF
8146 #line 8147 "configure"
8147 #include "confdefs.h"
8148 /* Override any gcc2 internal prototype to avoid an error.  */
8149 /* We use char because int might match the return type of a gcc2
8150     builtin and then its argument prototype would still apply.  */
8151 char afopen();
8152
8153 int main() {
8154 afopen()
8155 ; return 0; }
8156 EOF
8157 if { (eval echo configure:8158: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8158   rm -rf conftest*
8159   eval "ac_cv_lib_$ac_lib_var=yes"
8160 else
8161   echo "configure: failed program was:" >&5
8162   cat conftest.$ac_ext >&5
8163   rm -rf conftest*
8164   eval "ac_cv_lib_$ac_lib_var=no"
8165 fi
8166 rm -f conftest*
8167 LIBS="$ac_save_LIBS"
8168
8169 fi
8170 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8171   echo "$ac_t""yes" 1>&6
8172   
8173         AUTH_LIBS=-ls
8174         cat >> confdefs.h <<\EOF
8175 #define HAVE_AIX_SECURITY 1
8176 EOF
8177
8178
8179 else
8180   echo "$ac_t""no" 1>&6
8181 fi
8182
8183
8184 case "$target" in
8185 *-ibm-openedition)
8186         ac_cv_func_getopt=no
8187         cat >> confdefs.h <<\EOF
8188 #define BOTH_STRINGS_H 1
8189 EOF
8190
8191         ;;
8192 esac
8193
8194 ol_link_modules=no
8195 WITH_MODULES_ENABLED=no
8196 if test $ol_enable_modules != no ; then
8197         for ac_hdr in ltdl.h
8198 do
8199 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8200 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8201 echo "configure:8202: checking for $ac_hdr" >&5
8202 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
8203   echo $ac_n "(cached) $ac_c" 1>&6
8204 else
8205   cat > conftest.$ac_ext <<EOF
8206 #line 8207 "configure"
8207 #include "confdefs.h"
8208 #include <$ac_hdr>
8209 EOF
8210 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8211 { (eval echo configure:8212: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8212 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8213 if test -z "$ac_err"; then
8214   rm -rf conftest*
8215   eval "ac_cv_header_$ac_safe=yes"
8216 else
8217   echo "$ac_err" >&5
8218   echo "configure: failed program was:" >&5
8219   cat conftest.$ac_ext >&5
8220   rm -rf conftest*
8221   eval "ac_cv_header_$ac_safe=no"
8222 fi
8223 rm -f conftest*
8224 fi
8225 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8226   echo "$ac_t""yes" 1>&6
8227     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8228   cat >> confdefs.h <<EOF
8229 #define $ac_tr_hdr 1
8230 EOF
8231  
8232 else
8233   echo "$ac_t""no" 1>&6
8234 fi
8235 done
8236
8237
8238         if test $ac_cv_header_ltdl_h = no ; then
8239                 { echo "configure: error: could not locate libtool ltdl.h" 1>&2; exit 1; }
8240         fi
8241
8242         echo $ac_n "checking for lt_dlinit in -lltdl""... $ac_c" 1>&6
8243 echo "configure:8244: checking for lt_dlinit in -lltdl" >&5
8244 ac_lib_var=`echo ltdl'_'lt_dlinit | sed 'y%./+-:%__p__%'`
8245 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8246   echo $ac_n "(cached) $ac_c" 1>&6
8247 else
8248   ac_save_LIBS="$LIBS"
8249 LIBS="-lltdl  $LIBS"
8250 cat > conftest.$ac_ext <<EOF
8251 #line 8252 "configure"
8252 #include "confdefs.h"
8253 /* Override any gcc2 internal prototype to avoid an error.  */
8254 /* We use char because int might match the return type of a gcc2
8255     builtin and then its argument prototype would still apply.  */
8256 char lt_dlinit();
8257
8258 int main() {
8259 lt_dlinit()
8260 ; return 0; }
8261 EOF
8262 if { (eval echo configure:8263: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8263   rm -rf conftest*
8264   eval "ac_cv_lib_$ac_lib_var=yes"
8265 else
8266   echo "configure: failed program was:" >&5
8267   cat conftest.$ac_ext >&5
8268   rm -rf conftest*
8269   eval "ac_cv_lib_$ac_lib_var=no"
8270 fi
8271 rm -f conftest*
8272 LIBS="$ac_save_LIBS"
8273
8274 fi
8275 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8276   echo "$ac_t""yes" 1>&6
8277   
8278                 MODULES_LIBS=-lltdl
8279                 cat >> confdefs.h <<\EOF
8280 #define HAVE_LIBLTDL 1
8281 EOF
8282
8283         
8284 else
8285   echo "$ac_t""no" 1>&6
8286 fi
8287
8288
8289         if test "$ac_cv_lib_ltdl_lt_dlinit" = no ; then
8290                 { echo "configure: error: could not locate libtool -lltdl" 1>&2; exit 1; }
8291         fi
8292         ol_link_modules=yes
8293         WITH_MODULES_ENABLED=yes
8294
8295 else
8296         for i in $Backends; do
8297                 eval "ol_tmp=\$ol_enable_$i"
8298                 if test $ol_tmp = mod ; then
8299                         echo "configure: warning: building static $i backend" 1>&2
8300                         eval "ol_enable_$i=yes"
8301                 fi
8302         done
8303         for i in $Overlays; do
8304                 eval "ol_tmp=\$ol_enable_$i"
8305                 if test $ol_tmp = mod ; then
8306                         echo "configure: warning: building static $i overlay" 1>&2
8307                         eval "ol_enable_$i=yes"
8308                 fi
8309         done
8310 fi
8311
8312 # test for EBCDIC
8313 echo $ac_n "checking for EBCDIC""... $ac_c" 1>&6
8314 echo "configure:8315: checking for EBCDIC" >&5
8315 if eval "test \"\${ol_cv_cpp_ebcdic+set}\" = set"; then
8316   echo $ac_n "(cached) $ac_c" 1>&6
8317 else
8318   
8319         cat > conftest.$ac_ext <<EOF
8320 #line 8321 "configure"
8321 #include "confdefs.h"
8322
8323 #if !('M' == 0xd4)
8324 #include <__ASCII__/generate_error.h>
8325 #endif
8326
8327 EOF
8328 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8329 { (eval echo configure:8330: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8330 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8331 if test -z "$ac_err"; then
8332   rm -rf conftest*
8333   ol_cv_cpp_ebcdic=yes
8334 else
8335   echo "$ac_err" >&5
8336   echo "configure: failed program was:" >&5
8337   cat conftest.$ac_ext >&5
8338   rm -rf conftest*
8339   ol_cv_cpp_ebcdic=no
8340 fi
8341 rm -f conftest*
8342 fi
8343
8344 echo "$ac_t""$ol_cv_cpp_ebcdic" 1>&6
8345 if test $ol_cv_cpp_ebcdic = yes ; then
8346         cat >> confdefs.h <<\EOF
8347 #define HAVE_EBCDIC 1
8348 EOF
8349
8350 fi
8351
8352 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
8353 echo "configure:8354: checking for ANSI C header files" >&5
8354 if eval "test \"\${ol_cv_header_stdc+set}\" = set"; then
8355   echo $ac_n "(cached) $ac_c" 1>&6
8356 else
8357   cat > conftest.$ac_ext <<EOF
8358 #line 8359 "configure"
8359 #include "confdefs.h"
8360 #include <stdlib.h>
8361 #include <stdarg.h>
8362 #include <string.h>
8363 #include <float.h>
8364 EOF
8365 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8366 { (eval echo configure:8367: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8367 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8368 if test -z "$ac_err"; then
8369   rm -rf conftest*
8370   ol_cv_header_stdc=yes
8371 else
8372   echo "$ac_err" >&5
8373   echo "configure: failed program was:" >&5
8374   cat conftest.$ac_ext >&5
8375   rm -rf conftest*
8376   ol_cv_header_stdc=no
8377 fi
8378 rm -f conftest*
8379
8380 if test $ol_cv_header_stdc = yes; then
8381   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
8382 cat > conftest.$ac_ext <<EOF
8383 #line 8384 "configure"
8384 #include "confdefs.h"
8385 #include <string.h>
8386 EOF
8387 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8388   egrep "memchr" >/dev/null 2>&1; then
8389   :
8390 else
8391   rm -rf conftest*
8392   ol_cv_header_stdc=no
8393 fi
8394 rm -f conftest*
8395
8396 fi
8397
8398 if test $ol_cv_header_stdc = yes; then
8399   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
8400 cat > conftest.$ac_ext <<EOF
8401 #line 8402 "configure"
8402 #include "confdefs.h"
8403 #include <stdlib.h>
8404 EOF
8405 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8406   egrep "free" >/dev/null 2>&1; then
8407   :
8408 else
8409   rm -rf conftest*
8410   ol_cv_header_stdc=no
8411 fi
8412 rm -f conftest*
8413
8414 fi
8415
8416 if test $ol_cv_header_stdc = yes; then
8417   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
8418 if test "$cross_compiling" = yes; then
8419   :
8420 else
8421   cat > conftest.$ac_ext <<EOF
8422 #line 8423 "configure"
8423 #include "confdefs.h"
8424 #include <ctype.h>
8425 #ifndef HAVE_EBCDIC
8426 #       define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
8427 #       define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
8428 #else
8429 #       define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
8430                 || ('j' <= (c) && (c) <= 'r') \
8431                 || ('s' <= (c) && (c) <= 'z'))
8432 #       define TOUPPER(c)       (ISLOWER(c) ? ((c) | 0x40) : (c))
8433 #endif
8434 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
8435 int main () { int i; for (i = 0; i < 256; i++)
8436 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
8437 exit (0); }
8438
8439 EOF
8440 if { (eval echo configure:8441: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
8441 then
8442   :
8443 else
8444   echo "configure: failed program was:" >&5
8445   cat conftest.$ac_ext >&5
8446   rm -fr conftest*
8447   ol_cv_header_stdc=no
8448 fi
8449 rm -fr conftest*
8450 fi
8451
8452 fi
8453 fi
8454
8455 echo "$ac_t""$ol_cv_header_stdc" 1>&6
8456 if test $ol_cv_header_stdc = yes; then
8457   cat >> confdefs.h <<\EOF
8458 #define STDC_HEADERS 1
8459 EOF
8460
8461 fi
8462 ac_cv_header_stdc=disable
8463
8464
8465 if test $ol_cv_header_stdc != yes; then
8466         echo "configure: warning: could not locate Standard C compliant headers" 1>&2
8467 fi
8468
8469 ac_header_dirent=no
8470 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
8471 do
8472 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8473 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
8474 echo "configure:8475: checking for $ac_hdr that defines DIR" >&5
8475 if eval "test \"\${ac_cv_header_dirent_$ac_safe+set}\" = set"; then
8476   echo $ac_n "(cached) $ac_c" 1>&6
8477 else
8478   cat > conftest.$ac_ext <<EOF
8479 #line 8480 "configure"
8480 #include "confdefs.h"
8481 #include <sys/types.h>
8482 #include <$ac_hdr>
8483 int main() {
8484 DIR *dirp = 0;
8485 ; return 0; }
8486 EOF
8487 if { (eval echo configure:8488: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8488   rm -rf conftest*
8489   eval "ac_cv_header_dirent_$ac_safe=yes"
8490 else
8491   echo "configure: failed program was:" >&5
8492   cat conftest.$ac_ext >&5
8493   rm -rf conftest*
8494   eval "ac_cv_header_dirent_$ac_safe=no"
8495 fi
8496 rm -f conftest*
8497 fi
8498 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
8499   echo "$ac_t""yes" 1>&6
8500     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8501   cat >> confdefs.h <<EOF
8502 #define $ac_tr_hdr 1
8503 EOF
8504  ac_header_dirent=$ac_hdr; break
8505 else
8506   echo "$ac_t""no" 1>&6
8507 fi
8508 done
8509 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
8510 if test $ac_header_dirent = dirent.h; then
8511 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
8512 echo "configure:8513: checking for opendir in -ldir" >&5
8513 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-:%__p__%'`
8514 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8515   echo $ac_n "(cached) $ac_c" 1>&6
8516 else
8517   ac_save_LIBS="$LIBS"
8518 LIBS="-ldir  $LIBS"
8519 cat > conftest.$ac_ext <<EOF
8520 #line 8521 "configure"
8521 #include "confdefs.h"
8522 /* Override any gcc2 internal prototype to avoid an error.  */
8523 /* We use char because int might match the return type of a gcc2
8524     builtin and then its argument prototype would still apply.  */
8525 char opendir();
8526
8527 int main() {
8528 opendir()
8529 ; return 0; }
8530 EOF
8531 if { (eval echo configure:8532: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8532   rm -rf conftest*
8533   eval "ac_cv_lib_$ac_lib_var=yes"
8534 else
8535   echo "configure: failed program was:" >&5
8536   cat conftest.$ac_ext >&5
8537   rm -rf conftest*
8538   eval "ac_cv_lib_$ac_lib_var=no"
8539 fi
8540 rm -f conftest*
8541 LIBS="$ac_save_LIBS"
8542
8543 fi
8544 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8545   echo "$ac_t""yes" 1>&6
8546   LIBS="$LIBS -ldir"
8547 else
8548   echo "$ac_t""no" 1>&6
8549 fi
8550
8551 else
8552 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
8553 echo "configure:8554: checking for opendir in -lx" >&5
8554 ac_lib_var=`echo x'_'opendir | sed 'y%./+-:%__p__%'`
8555 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8556   echo $ac_n "(cached) $ac_c" 1>&6
8557 else
8558   ac_save_LIBS="$LIBS"
8559 LIBS="-lx  $LIBS"
8560 cat > conftest.$ac_ext <<EOF
8561 #line 8562 "configure"
8562 #include "confdefs.h"
8563 /* Override any gcc2 internal prototype to avoid an error.  */
8564 /* We use char because int might match the return type of a gcc2
8565     builtin and then its argument prototype would still apply.  */
8566 char opendir();
8567
8568 int main() {
8569 opendir()
8570 ; return 0; }
8571 EOF
8572 if { (eval echo configure:8573: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8573   rm -rf conftest*
8574   eval "ac_cv_lib_$ac_lib_var=yes"
8575 else
8576   echo "configure: failed program was:" >&5
8577   cat conftest.$ac_ext >&5
8578   rm -rf conftest*
8579   eval "ac_cv_lib_$ac_lib_var=no"
8580 fi
8581 rm -f conftest*
8582 LIBS="$ac_save_LIBS"
8583
8584 fi
8585 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8586   echo "$ac_t""yes" 1>&6
8587   LIBS="$LIBS -lx"
8588 else
8589   echo "$ac_t""no" 1>&6
8590 fi
8591
8592 fi
8593
8594 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
8595 echo "configure:8596: checking for sys/wait.h that is POSIX.1 compatible" >&5
8596 if eval "test \"\${ac_cv_header_sys_wait_h+set}\" = set"; then
8597   echo $ac_n "(cached) $ac_c" 1>&6
8598 else
8599   cat > conftest.$ac_ext <<EOF
8600 #line 8601 "configure"
8601 #include "confdefs.h"
8602 #include <sys/types.h>
8603 #include <sys/wait.h>
8604 #ifndef WEXITSTATUS
8605 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
8606 #endif
8607 #ifndef WIFEXITED
8608 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
8609 #endif
8610 int main() {
8611 int s;
8612 wait (&s);
8613 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
8614 ; return 0; }
8615 EOF
8616 if { (eval echo configure:8617: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8617   rm -rf conftest*
8618   ac_cv_header_sys_wait_h=yes
8619 else
8620   echo "configure: failed program was:" >&5
8621   cat conftest.$ac_ext >&5
8622   rm -rf conftest*
8623   ac_cv_header_sys_wait_h=no
8624 fi
8625 rm -f conftest*
8626 fi
8627
8628 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
8629 if test $ac_cv_header_sys_wait_h = yes; then
8630   cat >> confdefs.h <<\EOF
8631 #define HAVE_SYS_WAIT_H 1
8632 EOF
8633
8634 fi
8635
8636 echo $ac_n "checking POSIX termios""... $ac_c" 1>&6
8637 echo "configure:8638: checking POSIX termios" >&5
8638 if eval "test \"\${am_cv_sys_posix_termios+set}\" = set"; then
8639   echo $ac_n "(cached) $ac_c" 1>&6
8640 else
8641   cat > conftest.$ac_ext <<EOF
8642 #line 8643 "configure"
8643 #include "confdefs.h"
8644 #include <sys/types.h>
8645 #include <unistd.h>
8646 #include <termios.h>
8647 int main() {
8648 /* SunOS 4.0.3 has termios.h but not the library calls.  */
8649    tcgetattr(0, 0);
8650 ; return 0; }
8651 EOF
8652 if { (eval echo configure:8653: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8653   rm -rf conftest*
8654   am_cv_sys_posix_termios=yes
8655 else
8656   echo "configure: failed program was:" >&5
8657   cat conftest.$ac_ext >&5
8658   rm -rf conftest*
8659   am_cv_sys_posix_termios=no
8660 fi
8661 rm -f conftest*
8662 fi
8663
8664 echo "$ac_t""$am_cv_sys_posix_termios" 1>&6
8665
8666
8667  echo $ac_n "checking whether use of TIOCGWINSZ requires sys/ioctl.h""... $ac_c" 1>&6
8668 echo "configure:8669: checking whether use of TIOCGWINSZ requires sys/ioctl.h" >&5
8669 if eval "test \"\${am_cv_sys_tiocgwinsz_needs_sys_ioctl_h+set}\" = set"; then
8670   echo $ac_n "(cached) $ac_c" 1>&6
8671 else
8672   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=no
8673
8674   gwinsz_in_termios_h=no
8675   if test $am_cv_sys_posix_termios = yes; then
8676     cat > conftest.$ac_ext <<EOF
8677 #line 8678 "configure"
8678 #include "confdefs.h"
8679 #include <sys/types.h>
8680 #     include <termios.h>
8681 #     ifdef TIOCGWINSZ
8682         yes
8683 #     endif
8684     
8685 EOF
8686 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8687   egrep "yes" >/dev/null 2>&1; then
8688   rm -rf conftest*
8689   gwinsz_in_termios_h=yes
8690 fi
8691 rm -f conftest*
8692
8693   fi
8694
8695   if test $gwinsz_in_termios_h = no; then
8696     cat > conftest.$ac_ext <<EOF
8697 #line 8698 "configure"
8698 #include "confdefs.h"
8699 #include <sys/types.h>
8700 #     include <sys/ioctl.h>
8701 #     ifdef TIOCGWINSZ
8702         yes
8703 #     endif
8704     
8705 EOF
8706 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8707   egrep "yes" >/dev/null 2>&1; then
8708   rm -rf conftest*
8709   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=yes
8710 fi
8711 rm -f conftest*
8712
8713   fi
8714   
8715 fi
8716
8717 echo "$ac_t""$am_cv_sys_tiocgwinsz_needs_sys_ioctl_h" 1>&6
8718   if test $am_cv_sys_tiocgwinsz_needs_sys_ioctl_h = yes; then
8719     cat >> confdefs.h <<\EOF
8720 #define GWINSZ_IN_SYS_IOCTL 1
8721 EOF
8722
8723   fi
8724
8725 if test $am_cv_sys_posix_termios = yes ; then
8726         cat >> confdefs.h <<\EOF
8727 #define HAVE_POSIX_TERMIOS 1
8728 EOF
8729
8730 fi
8731
8732 for ac_hdr in \
8733         arpa/inet.h             \
8734         arpa/nameser.h  \
8735         assert.h                \
8736         bits/types.h    \
8737         conio.h                 \
8738         crypt.h                 \
8739         direct.h                \
8740         errno.h                 \
8741         fcntl.h                 \
8742         filio.h                 \
8743         getopt.h                \
8744         grp.h                   \
8745         io.h                    \
8746         libutil.h               \
8747         limits.h                \
8748         locale.h                \
8749         netinet/tcp.h   \
8750         malloc.h                \
8751         memory.h                \
8752         psap.h                  \
8753         pwd.h                   \
8754         process.h               \
8755         resolv.h                \
8756         sgtty.h                 \
8757         shadow.h                \
8758         stddef.h                \
8759         string.h                \
8760         strings.h               \
8761         sysexits.h              \
8762         sys/file.h              \
8763         sys/filio.h             \
8764         sys/errno.h             \
8765         sys/ioctl.h             \
8766         sys/param.h             \
8767         sys/resource.h  \
8768         sys/select.h    \
8769         sys/socket.h    \
8770         sys/stat.h              \
8771         sys/syslog.h    \
8772         sys/time.h              \
8773         sys/types.h             \
8774         sys/ucred.h             \
8775         sys/uio.h               \
8776         syslog.h                \
8777         termios.h               \
8778         unistd.h                \
8779         winsock.h               \
8780         winsock2.h              \
8781
8782 do
8783 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8784 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8785 echo "configure:8786: checking for $ac_hdr" >&5
8786 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
8787   echo $ac_n "(cached) $ac_c" 1>&6
8788 else
8789   cat > conftest.$ac_ext <<EOF
8790 #line 8791 "configure"
8791 #include "confdefs.h"
8792 #include <$ac_hdr>
8793 EOF
8794 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8795 { (eval echo configure:8796: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8796 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8797 if test -z "$ac_err"; then
8798   rm -rf conftest*
8799   eval "ac_cv_header_$ac_safe=yes"
8800 else
8801   echo "$ac_err" >&5
8802   echo "configure: failed program was:" >&5
8803   cat conftest.$ac_ext >&5
8804   rm -rf conftest*
8805   eval "ac_cv_header_$ac_safe=no"
8806 fi
8807 rm -f conftest*
8808 fi
8809 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8810   echo "$ac_t""yes" 1>&6
8811     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8812   cat >> confdefs.h <<EOF
8813 #define $ac_tr_hdr 1
8814 EOF
8815  
8816 else
8817   echo "$ac_t""no" 1>&6
8818 fi
8819 done
8820
8821
8822
8823 for ac_func in sigaction sigset 
8824 do
8825 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8826 echo "configure:8827: checking for $ac_func" >&5
8827 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
8828   echo $ac_n "(cached) $ac_c" 1>&6
8829 else
8830   cat > conftest.$ac_ext <<EOF
8831 #line 8832 "configure"
8832 #include "confdefs.h"
8833 /* System header to define __stub macros and hopefully few prototypes,
8834     which can conflict with char $ac_func(); below.  */
8835 #include <assert.h>
8836 /* Override any gcc2 internal prototype to avoid an error.  */
8837 /* We use char because int might match the return type of a gcc2
8838     builtin and then its argument prototype would still apply.  */
8839 char $ac_func();
8840 char (*f)();
8841
8842 int main() {
8843
8844 /* The GNU C library defines this for functions which it implements
8845     to always fail with ENOSYS.  Some functions are actually named
8846     something starting with __ and the normal name is an alias.  */
8847 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8848 choke me
8849 #else
8850 f = $ac_func;
8851 #endif
8852
8853 ; return 0; }
8854 EOF
8855 if { (eval echo configure:8856: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8856   rm -rf conftest*
8857   eval "ac_cv_func_$ac_func=yes"
8858 else
8859   echo "configure: failed program was:" >&5
8860   cat conftest.$ac_ext >&5
8861   rm -rf conftest*
8862   eval "ac_cv_func_$ac_func=no"
8863 fi
8864 rm -f conftest*
8865 fi
8866
8867 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8868   echo "$ac_t""yes" 1>&6
8869     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8870   cat >> confdefs.h <<EOF
8871 #define $ac_tr_func 1
8872 EOF
8873  
8874 else
8875   echo "$ac_t""no" 1>&6
8876 fi
8877 done
8878
8879
8880 if test $ac_cv_func_sigaction = no && test $ac_cv_func_sigaction = no ; then
8881         echo $ac_n "checking for sigset in -lV3""... $ac_c" 1>&6
8882 echo "configure:8883: checking for sigset in -lV3" >&5
8883 ac_lib_var=`echo V3'_'sigset | sed 'y%./+-:%__p__%'`
8884 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8885   echo $ac_n "(cached) $ac_c" 1>&6
8886 else
8887   ac_save_LIBS="$LIBS"
8888 LIBS="-lV3  $LIBS"
8889 cat > conftest.$ac_ext <<EOF
8890 #line 8891 "configure"
8891 #include "confdefs.h"
8892 /* Override any gcc2 internal prototype to avoid an error.  */
8893 /* We use char because int might match the return type of a gcc2
8894     builtin and then its argument prototype would still apply.  */
8895 char sigset();
8896
8897 int main() {
8898 sigset()
8899 ; return 0; }
8900 EOF
8901 if { (eval echo configure:8902: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8902   rm -rf conftest*
8903   eval "ac_cv_lib_$ac_lib_var=yes"
8904 else
8905   echo "configure: failed program was:" >&5
8906   cat conftest.$ac_ext >&5
8907   rm -rf conftest*
8908   eval "ac_cv_lib_$ac_lib_var=no"
8909 fi
8910 rm -f conftest*
8911 LIBS="$ac_save_LIBS"
8912
8913 fi
8914 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8915   echo "$ac_t""yes" 1>&6
8916     ac_tr_lib=HAVE_LIB`echo V3 | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8917     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8918   cat >> confdefs.h <<EOF
8919 #define $ac_tr_lib 1
8920 EOF
8921
8922   LIBS="-lV3 $LIBS"
8923
8924 else
8925   echo "$ac_t""no" 1>&6
8926 fi
8927
8928 fi
8929
8930 if test "$ac_cv_header_winsock_h" = yes; then
8931 echo $ac_n "checking for winsock""... $ac_c" 1>&6
8932 echo "configure:8933: checking for winsock" >&5
8933 if eval "test \"\${ol_cv_winsock+set}\" = set"; then
8934   echo $ac_n "(cached) $ac_c" 1>&6
8935 else
8936   save_LIBS="$LIBS"
8937 for curlib in ws2_32 wsock32; do
8938         LIBS="$LIBS -l$curlib"
8939         cat > conftest.$ac_ext <<EOF
8940 #line 8941 "configure"
8941 #include "confdefs.h"
8942 #include <winsock.h>
8943                         
8944 int main() {
8945
8946                         socket(0,0,0);
8947                         select(0,NULL,NULL,NULL,NULL);
8948                         closesocket(0);
8949                         gethostname(NULL,0);
8950                         
8951 ; return 0; }
8952 EOF
8953 if { (eval echo configure:8954: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8954   rm -rf conftest*
8955   ol_cv_winsock=yes
8956 else
8957   echo "configure: failed program was:" >&5
8958   cat conftest.$ac_ext >&5
8959   rm -rf conftest*
8960   ol_cv_winsock=no
8961 fi
8962 rm -f conftest*
8963
8964         if test $ol_cv_winsock = yes; then
8965                 cat >> confdefs.h <<\EOF
8966 #define HAVE_WINSOCK 1
8967 EOF
8968
8969                 ac_cv_func_socket=yes
8970                 ac_cv_func_select=yes
8971                 ac_cv_func_closesocket=yes
8972                 ac_cv_func_gethostname=yes
8973                 if test $curlib = ws2_32; then
8974                         ol_cv_winsock=winsock2
8975                         cat >> confdefs.h <<\EOF
8976 #define HAVE_WINSOCK2 1
8977 EOF
8978
8979                 fi
8980                 break
8981         fi
8982         LIBS="$save_LIBS"
8983 done
8984 fi
8985
8986 echo "$ac_t""$ol_cv_winsock" 1>&6
8987 fi
8988
8989
8990 echo $ac_n "checking for socket""... $ac_c" 1>&6
8991 echo "configure:8992: checking for socket" >&5
8992 if eval "test \"\${ac_cv_func_socket+set}\" = set"; then
8993   echo $ac_n "(cached) $ac_c" 1>&6
8994 else
8995   cat > conftest.$ac_ext <<EOF
8996 #line 8997 "configure"
8997 #include "confdefs.h"
8998 /* System header to define __stub macros and hopefully few prototypes,
8999     which can conflict with char socket(); below.  */
9000 #include <assert.h>
9001 /* Override any gcc2 internal prototype to avoid an error.  */
9002 /* We use char because int might match the return type of a gcc2
9003     builtin and then its argument prototype would still apply.  */
9004 char socket();
9005 char (*f)();
9006
9007 int main() {
9008
9009 /* The GNU C library defines this for functions which it implements
9010     to always fail with ENOSYS.  Some functions are actually named
9011     something starting with __ and the normal name is an alias.  */
9012 #if defined (__stub_socket) || defined (__stub___socket)
9013 choke me
9014 #else
9015 f = socket;
9016 #endif
9017
9018 ; return 0; }
9019 EOF
9020 if { (eval echo configure:9021: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9021   rm -rf conftest*
9022   eval "ac_cv_func_socket=yes"
9023 else
9024   echo "configure: failed program was:" >&5
9025   cat conftest.$ac_ext >&5
9026   rm -rf conftest*
9027   eval "ac_cv_func_socket=no"
9028 fi
9029 rm -f conftest*
9030 fi
9031
9032 if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
9033   echo "$ac_t""yes" 1>&6
9034   :
9035 else
9036   echo "$ac_t""no" 1>&6
9037         
9038         echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6
9039 echo "configure:9040: checking for main in -lsocket" >&5
9040 ac_lib_var=`echo socket'_'main | sed 'y%./+-:%__p__%'`
9041 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9042   echo $ac_n "(cached) $ac_c" 1>&6
9043 else
9044   ac_save_LIBS="$LIBS"
9045 LIBS="-lsocket  $LIBS"
9046 cat > conftest.$ac_ext <<EOF
9047 #line 9048 "configure"
9048 #include "confdefs.h"
9049
9050 int main() {
9051 main()
9052 ; return 0; }
9053 EOF
9054 if { (eval echo configure:9055: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9055   rm -rf conftest*
9056   eval "ac_cv_lib_$ac_lib_var=yes"
9057 else
9058   echo "configure: failed program was:" >&5
9059   cat conftest.$ac_ext >&5
9060   rm -rf conftest*
9061   eval "ac_cv_lib_$ac_lib_var=no"
9062 fi
9063 rm -f conftest*
9064 LIBS="$ac_save_LIBS"
9065
9066 fi
9067 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9068   echo "$ac_t""yes" 1>&6
9069     ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9070     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9071   cat >> confdefs.h <<EOF
9072 #define $ac_tr_lib 1
9073 EOF
9074
9075   LIBS="-lsocket $LIBS"
9076
9077 else
9078   echo "$ac_t""no" 1>&6
9079 fi
9080
9081         echo $ac_n "checking for main in -lnet""... $ac_c" 1>&6
9082 echo "configure:9083: checking for main in -lnet" >&5
9083 ac_lib_var=`echo net'_'main | sed 'y%./+-:%__p__%'`
9084 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9085   echo $ac_n "(cached) $ac_c" 1>&6
9086 else
9087   ac_save_LIBS="$LIBS"
9088 LIBS="-lnet  $LIBS"
9089 cat > conftest.$ac_ext <<EOF
9090 #line 9091 "configure"
9091 #include "confdefs.h"
9092
9093 int main() {
9094 main()
9095 ; return 0; }
9096 EOF
9097 if { (eval echo configure:9098: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9098   rm -rf conftest*
9099   eval "ac_cv_lib_$ac_lib_var=yes"
9100 else
9101   echo "configure: failed program was:" >&5
9102   cat conftest.$ac_ext >&5
9103   rm -rf conftest*
9104   eval "ac_cv_lib_$ac_lib_var=no"
9105 fi
9106 rm -f conftest*
9107 LIBS="$ac_save_LIBS"
9108
9109 fi
9110 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9111   echo "$ac_t""yes" 1>&6
9112     ac_tr_lib=HAVE_LIB`echo net | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9113     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9114   cat >> confdefs.h <<EOF
9115 #define $ac_tr_lib 1
9116 EOF
9117
9118   LIBS="-lnet $LIBS"
9119
9120 else
9121   echo "$ac_t""no" 1>&6
9122 fi
9123
9124         echo $ac_n "checking for main in -lnsl_s""... $ac_c" 1>&6
9125 echo "configure:9126: checking for main in -lnsl_s" >&5
9126 ac_lib_var=`echo nsl_s'_'main | sed 'y%./+-:%__p__%'`
9127 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9128   echo $ac_n "(cached) $ac_c" 1>&6
9129 else
9130   ac_save_LIBS="$LIBS"
9131 LIBS="-lnsl_s  $LIBS"
9132 cat > conftest.$ac_ext <<EOF
9133 #line 9134 "configure"
9134 #include "confdefs.h"
9135
9136 int main() {
9137 main()
9138 ; return 0; }
9139 EOF
9140 if { (eval echo configure:9141: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9141   rm -rf conftest*
9142   eval "ac_cv_lib_$ac_lib_var=yes"
9143 else
9144   echo "configure: failed program was:" >&5
9145   cat conftest.$ac_ext >&5
9146   rm -rf conftest*
9147   eval "ac_cv_lib_$ac_lib_var=no"
9148 fi
9149 rm -f conftest*
9150 LIBS="$ac_save_LIBS"
9151
9152 fi
9153 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9154   echo "$ac_t""yes" 1>&6
9155     ac_tr_lib=HAVE_LIB`echo nsl_s | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9156     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9157   cat >> confdefs.h <<EOF
9158 #define $ac_tr_lib 1
9159 EOF
9160
9161   LIBS="-lnsl_s $LIBS"
9162
9163 else
9164   echo "$ac_t""no" 1>&6
9165 fi
9166
9167         echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
9168 echo "configure:9169: checking for main in -lnsl" >&5
9169 ac_lib_var=`echo nsl'_'main | sed 'y%./+-:%__p__%'`
9170 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9171   echo $ac_n "(cached) $ac_c" 1>&6
9172 else
9173   ac_save_LIBS="$LIBS"
9174 LIBS="-lnsl  $LIBS"
9175 cat > conftest.$ac_ext <<EOF
9176 #line 9177 "configure"
9177 #include "confdefs.h"
9178
9179 int main() {
9180 main()
9181 ; return 0; }
9182 EOF
9183 if { (eval echo configure:9184: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9184   rm -rf conftest*
9185   eval "ac_cv_lib_$ac_lib_var=yes"
9186 else
9187   echo "configure: failed program was:" >&5
9188   cat conftest.$ac_ext >&5
9189   rm -rf conftest*
9190   eval "ac_cv_lib_$ac_lib_var=no"
9191 fi
9192 rm -f conftest*
9193 LIBS="$ac_save_LIBS"
9194
9195 fi
9196 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9197   echo "$ac_t""yes" 1>&6
9198     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9199     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9200   cat >> confdefs.h <<EOF
9201 #define $ac_tr_lib 1
9202 EOF
9203
9204   LIBS="-lnsl $LIBS"
9205
9206 else
9207   echo "$ac_t""no" 1>&6
9208 fi
9209
9210         echo $ac_n "checking for socket in -linet""... $ac_c" 1>&6
9211 echo "configure:9212: checking for socket in -linet" >&5
9212 ac_lib_var=`echo inet'_'socket | sed 'y%./+-:%__p__%'`
9213 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9214   echo $ac_n "(cached) $ac_c" 1>&6
9215 else
9216   ac_save_LIBS="$LIBS"
9217 LIBS="-linet  $LIBS"
9218 cat > conftest.$ac_ext <<EOF
9219 #line 9220 "configure"
9220 #include "confdefs.h"
9221 /* Override any gcc2 internal prototype to avoid an error.  */
9222 /* We use char because int might match the return type of a gcc2
9223     builtin and then its argument prototype would still apply.  */
9224 char socket();
9225
9226 int main() {
9227 socket()
9228 ; return 0; }
9229 EOF
9230 if { (eval echo configure:9231: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9231   rm -rf conftest*
9232   eval "ac_cv_lib_$ac_lib_var=yes"
9233 else
9234   echo "configure: failed program was:" >&5
9235   cat conftest.$ac_ext >&5
9236   rm -rf conftest*
9237   eval "ac_cv_lib_$ac_lib_var=no"
9238 fi
9239 rm -f conftest*
9240 LIBS="$ac_save_LIBS"
9241
9242 fi
9243 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9244   echo "$ac_t""yes" 1>&6
9245     ac_tr_lib=HAVE_LIB`echo inet | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9246     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9247   cat >> confdefs.h <<EOF
9248 #define $ac_tr_lib 1
9249 EOF
9250
9251   LIBS="-linet $LIBS"
9252
9253 else
9254   echo "$ac_t""no" 1>&6
9255 fi
9256
9257         echo $ac_n "checking for main in -lgen""... $ac_c" 1>&6
9258 echo "configure:9259: checking for main in -lgen" >&5
9259 ac_lib_var=`echo gen'_'main | sed 'y%./+-:%__p__%'`
9260 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9261   echo $ac_n "(cached) $ac_c" 1>&6
9262 else
9263   ac_save_LIBS="$LIBS"
9264 LIBS="-lgen  $LIBS"
9265 cat > conftest.$ac_ext <<EOF
9266 #line 9267 "configure"
9267 #include "confdefs.h"
9268
9269 int main() {
9270 main()
9271 ; return 0; }
9272 EOF
9273 if { (eval echo configure:9274: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9274   rm -rf conftest*
9275   eval "ac_cv_lib_$ac_lib_var=yes"
9276 else
9277   echo "configure: failed program was:" >&5
9278   cat conftest.$ac_ext >&5
9279   rm -rf conftest*
9280   eval "ac_cv_lib_$ac_lib_var=no"
9281 fi
9282 rm -f conftest*
9283 LIBS="$ac_save_LIBS"
9284
9285 fi
9286 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9287   echo "$ac_t""yes" 1>&6
9288     ac_tr_lib=HAVE_LIB`echo gen | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9289     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9290   cat >> confdefs.h <<EOF
9291 #define $ac_tr_lib 1
9292 EOF
9293
9294   LIBS="-lgen $LIBS"
9295
9296 else
9297   echo "$ac_t""no" 1>&6
9298 fi
9299
9300
9301 fi
9302
9303
9304 echo $ac_n "checking for select""... $ac_c" 1>&6
9305 echo "configure:9306: checking for select" >&5
9306 if eval "test \"\${ac_cv_func_select+set}\" = set"; then
9307   echo $ac_n "(cached) $ac_c" 1>&6
9308 else
9309   cat > conftest.$ac_ext <<EOF
9310 #line 9311 "configure"
9311 #include "confdefs.h"
9312 /* System header to define __stub macros and hopefully few prototypes,
9313     which can conflict with char select(); below.  */
9314 #include <assert.h>
9315 /* Override any gcc2 internal prototype to avoid an error.  */
9316 /* We use char because int might match the return type of a gcc2
9317     builtin and then its argument prototype would still apply.  */
9318 char select();
9319 char (*f)();
9320
9321 int main() {
9322
9323 /* The GNU C library defines this for functions which it implements
9324     to always fail with ENOSYS.  Some functions are actually named
9325     something starting with __ and the normal name is an alias.  */
9326 #if defined (__stub_select) || defined (__stub___select)
9327 choke me
9328 #else
9329 f = select;
9330 #endif
9331
9332 ; return 0; }
9333 EOF
9334 if { (eval echo configure:9335: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9335   rm -rf conftest*
9336   eval "ac_cv_func_select=yes"
9337 else
9338   echo "configure: failed program was:" >&5
9339   cat conftest.$ac_ext >&5
9340   rm -rf conftest*
9341   eval "ac_cv_func_select=no"
9342 fi
9343 rm -f conftest*
9344 fi
9345
9346 if eval "test \"`echo '$ac_cv_func_'select`\" = yes"; then
9347   echo "$ac_t""yes" 1>&6
9348   :
9349 else
9350   echo "$ac_t""no" 1>&6
9351 { echo "configure: error: select() required." 1>&2; exit 1; }
9352 fi
9353
9354
9355 if test "${ac_cv_header_winsock_h}" != yes; then
9356                                 echo $ac_n "checking types of arguments for select()""... $ac_c" 1>&6
9357 echo "configure:9358: checking types of arguments for select()" >&5
9358  if eval "test \"\${ac_cv_func_select_arg234+set}\" = set"; then
9359   echo $ac_n "(cached) $ac_c" 1>&6
9360 else
9361    if eval "test \"\${ac_cv_func_select_arg1+set}\" = set"; then
9362   echo $ac_n "(cached) $ac_c" 1>&6
9363 else
9364     if eval "test \"\${ac_cv_func_select_arg5+set}\" = set"; then
9365   echo $ac_n "(cached) $ac_c" 1>&6
9366 else
9367      for ac_cv_func_select_arg234 in 'fd_set *' 'int *' 'void *'; do
9368      for ac_cv_func_select_arg1 in 'int' 'size_t' 'unsigned long' 'unsigned'; do
9369       for ac_cv_func_select_arg5 in 'struct timeval *' 'const struct timeval *'; do
9370        cat > conftest.$ac_ext <<EOF
9371 #line 9372 "configure"
9372 #include "confdefs.h"
9373 #ifdef HAVE_SYS_TYPES_H
9374 #include <sys/types.h>
9375 #endif
9376 #ifdef HAVE_SYS_TIME_H
9377 #include <sys/time.h>
9378 #endif
9379 #ifdef HAVE_SYS_SELECT_H
9380 #include <sys/select.h>
9381 #endif
9382 #ifdef HAVE_SYS_SOCKET_H
9383 #include <sys/socket.h>
9384 #endif
9385 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);
9386 int main() {
9387
9388 ; return 0; }
9389 EOF
9390 if { (eval echo configure:9391: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9391   rm -rf conftest*
9392           ac_not_found=no ; break 3
9393 else
9394   echo "configure: failed program was:" >&5
9395   cat conftest.$ac_ext >&5
9396   rm -rf conftest*
9397   ac_not_found=yes
9398 fi
9399 rm -f conftest*
9400       done
9401      done
9402     done
9403    
9404 fi
9405   
9406 fi
9407  
9408 fi
9409  if test "$ac_not_found" = yes; then
9410   ac_cv_func_select_arg1=int 
9411   ac_cv_func_select_arg234='int *' 
9412   ac_cv_func_select_arg5='struct timeval *'
9413  fi
9414  echo "$ac_t""$ac_cv_func_select_arg1,$ac_cv_func_select_arg234,$ac_cv_func_select_arg5" 1>&6
9415  cat >> confdefs.h <<EOF
9416 #define SELECT_TYPE_ARG1 $ac_cv_func_select_arg1
9417 EOF
9418
9419  cat >> confdefs.h <<EOF
9420 #define SELECT_TYPE_ARG234 ($ac_cv_func_select_arg234)
9421 EOF
9422
9423  cat >> confdefs.h <<EOF
9424 #define SELECT_TYPE_ARG5 ($ac_cv_func_select_arg5)
9425 EOF
9426
9427
9428 fi
9429
9430
9431 for ac_func in poll 
9432 do
9433 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9434 echo "configure:9435: checking for $ac_func" >&5
9435 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
9436   echo $ac_n "(cached) $ac_c" 1>&6
9437 else
9438   cat > conftest.$ac_ext <<EOF
9439 #line 9440 "configure"
9440 #include "confdefs.h"
9441 /* System header to define __stub macros and hopefully few prototypes,
9442     which can conflict with char $ac_func(); below.  */
9443 #include <assert.h>
9444 /* Override any gcc2 internal prototype to avoid an error.  */
9445 /* We use char because int might match the return type of a gcc2
9446     builtin and then its argument prototype would still apply.  */
9447 char $ac_func();
9448 char (*f)();
9449
9450 int main() {
9451
9452 /* The GNU C library defines this for functions which it implements
9453     to always fail with ENOSYS.  Some functions are actually named
9454     something starting with __ and the normal name is an alias.  */
9455 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9456 choke me
9457 #else
9458 f = $ac_func;
9459 #endif
9460
9461 ; return 0; }
9462 EOF
9463 if { (eval echo configure:9464: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9464   rm -rf conftest*
9465   eval "ac_cv_func_$ac_func=yes"
9466 else
9467   echo "configure: failed program was:" >&5
9468   cat conftest.$ac_ext >&5
9469   rm -rf conftest*
9470   eval "ac_cv_func_$ac_func=no"
9471 fi
9472 rm -f conftest*
9473 fi
9474
9475 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9476   echo "$ac_t""yes" 1>&6
9477     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9478   cat >> confdefs.h <<EOF
9479 #define $ac_tr_func 1
9480 EOF
9481  
9482 else
9483   echo "$ac_t""no" 1>&6
9484 fi
9485 done
9486
9487 for ac_hdr in poll.h 
9488 do
9489 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9490 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9491 echo "configure:9492: checking for $ac_hdr" >&5
9492 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9493   echo $ac_n "(cached) $ac_c" 1>&6
9494 else
9495   cat > conftest.$ac_ext <<EOF
9496 #line 9497 "configure"
9497 #include "confdefs.h"
9498 #include <$ac_hdr>
9499 EOF
9500 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9501 { (eval echo configure:9502: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9502 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9503 if test -z "$ac_err"; then
9504   rm -rf conftest*
9505   eval "ac_cv_header_$ac_safe=yes"
9506 else
9507   echo "$ac_err" >&5
9508   echo "configure: failed program was:" >&5
9509   cat conftest.$ac_ext >&5
9510   rm -rf conftest*
9511   eval "ac_cv_header_$ac_safe=no"
9512 fi
9513 rm -f conftest*
9514 fi
9515 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9516   echo "$ac_t""yes" 1>&6
9517     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9518   cat >> confdefs.h <<EOF
9519 #define $ac_tr_hdr 1
9520 EOF
9521  
9522 else
9523   echo "$ac_t""no" 1>&6
9524 fi
9525 done
9526
9527
9528 for ac_hdr in sys/epoll.h 
9529 do
9530 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9531 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9532 echo "configure:9533: checking for $ac_hdr" >&5
9533 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9534   echo $ac_n "(cached) $ac_c" 1>&6
9535 else
9536   cat > conftest.$ac_ext <<EOF
9537 #line 9538 "configure"
9538 #include "confdefs.h"
9539 #include <$ac_hdr>
9540 EOF
9541 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9542 { (eval echo configure:9543: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9543 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9544 if test -z "$ac_err"; then
9545   rm -rf conftest*
9546   eval "ac_cv_header_$ac_safe=yes"
9547 else
9548   echo "$ac_err" >&5
9549   echo "configure: failed program was:" >&5
9550   cat conftest.$ac_ext >&5
9551   rm -rf conftest*
9552   eval "ac_cv_header_$ac_safe=no"
9553 fi
9554 rm -f conftest*
9555 fi
9556 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9557   echo "$ac_t""yes" 1>&6
9558     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9559   cat >> confdefs.h <<EOF
9560 #define $ac_tr_hdr 1
9561 EOF
9562  
9563 else
9564   echo "$ac_t""no" 1>&6
9565 fi
9566 done
9567
9568 if test "${ac_cv_header_sys_epoll_h}" = yes; then
9569 echo $ac_n "checking for epoll system call""... $ac_c" 1>&6
9570 echo "configure:9571: checking for epoll system call" >&5
9571 if test "$cross_compiling" = yes; then
9572   echo "$ac_t""no" 1>&6
9573 else
9574   cat > conftest.$ac_ext <<EOF
9575 #line 9576 "configure"
9576 #include "confdefs.h"
9577 int main(int argc, char *argv)
9578 {
9579         int epfd = epoll_create(256);
9580         exit (epfd == -1 ? 1 : 0);
9581 }
9582 EOF
9583 if { (eval echo configure:9584: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
9584 then
9585   echo "$ac_t""yes" 1>&6
9586 cat >> confdefs.h <<\EOF
9587 #define HAVE_EPOLL 1
9588 EOF
9589
9590 else
9591   echo "configure: failed program was:" >&5
9592   cat conftest.$ac_ext >&5
9593   rm -fr conftest*
9594   echo "$ac_t""no" 1>&6
9595 fi
9596 rm -fr conftest*
9597 fi
9598
9599 fi
9600
9601 # strerror checks
9602 echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6
9603 echo "configure:9604: checking declaration of sys_errlist" >&5
9604 if eval "test \"\${ol_cv_dcl_sys_errlist+set}\" = set"; then
9605   echo $ac_n "(cached) $ac_c" 1>&6
9606 else
9607   
9608         cat > conftest.$ac_ext <<EOF
9609 #line 9610 "configure"
9610 #include "confdefs.h"
9611
9612 #include <stdio.h>
9613 #include <sys/types.h>
9614 #include <errno.h>
9615 #ifdef WINNT
9616 #include <stdlib.h>
9617 #endif 
9618 int main() {
9619 char *c = (char *) *sys_errlist
9620 ; return 0; }
9621 EOF
9622 if { (eval echo configure:9623: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9623   rm -rf conftest*
9624   ol_cv_dcl_sys_errlist=yes
9625         ol_cv_have_sys_errlist=yes
9626 else
9627   echo "configure: failed program was:" >&5
9628   cat conftest.$ac_ext >&5
9629   rm -rf conftest*
9630   ol_cv_dcl_sys_errlist=no
9631 fi
9632 rm -f conftest*
9633 fi
9634
9635 echo "$ac_t""$ol_cv_dcl_sys_errlist" 1>&6
9636 #
9637 # It's possible (for near-UNIX clones) that sys_errlist doesn't exist
9638 if test $ol_cv_dcl_sys_errlist = no ; then
9639         cat >> confdefs.h <<\EOF
9640 #define DECL_SYS_ERRLIST 1
9641 EOF
9642
9643
9644         echo $ac_n "checking existence of sys_errlist""... $ac_c" 1>&6
9645 echo "configure:9646: checking existence of sys_errlist" >&5
9646 if eval "test \"\${ol_cv_have_sys_errlist+set}\" = set"; then
9647   echo $ac_n "(cached) $ac_c" 1>&6
9648 else
9649   
9650                 cat > conftest.$ac_ext <<EOF
9651 #line 9652 "configure"
9652 #include "confdefs.h"
9653 #include <errno.h>
9654 int main() {
9655 char *c = (char *) *sys_errlist
9656 ; return 0; }
9657 EOF
9658 if { (eval echo configure:9659: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9659   rm -rf conftest*
9660   ol_cv_have_sys_errlist=yes
9661 else
9662   echo "configure: failed program was:" >&5
9663   cat conftest.$ac_ext >&5
9664   rm -rf conftest*
9665   ol_cv_have_sys_errlist=no
9666 fi
9667 rm -f conftest*
9668 fi
9669
9670 echo "$ac_t""$ol_cv_have_sys_errlist" 1>&6
9671 fi
9672 if test $ol_cv_have_sys_errlist = yes ; then
9673         cat >> confdefs.h <<\EOF
9674 #define HAVE_SYS_ERRLIST 1
9675 EOF
9676
9677 fi
9678  for ac_func in strerror strerror_r
9679 do
9680 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9681 echo "configure:9682: checking for $ac_func" >&5
9682 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
9683   echo $ac_n "(cached) $ac_c" 1>&6
9684 else
9685   cat > conftest.$ac_ext <<EOF
9686 #line 9687 "configure"
9687 #include "confdefs.h"
9688 /* System header to define __stub macros and hopefully few prototypes,
9689     which can conflict with char $ac_func(); below.  */
9690 #include <assert.h>
9691 /* Override any gcc2 internal prototype to avoid an error.  */
9692 /* We use char because int might match the return type of a gcc2
9693     builtin and then its argument prototype would still apply.  */
9694 char $ac_func();
9695 char (*f)();
9696
9697 int main() {
9698
9699 /* The GNU C library defines this for functions which it implements
9700     to always fail with ENOSYS.  Some functions are actually named
9701     something starting with __ and the normal name is an alias.  */
9702 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9703 choke me
9704 #else
9705 f = $ac_func;
9706 #endif
9707
9708 ; return 0; }
9709 EOF
9710 if { (eval echo configure:9711: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9711   rm -rf conftest*
9712   eval "ac_cv_func_$ac_func=yes"
9713 else
9714   echo "configure: failed program was:" >&5
9715   cat conftest.$ac_ext >&5
9716   rm -rf conftest*
9717   eval "ac_cv_func_$ac_func=no"
9718 fi
9719 rm -f conftest*
9720 fi
9721
9722 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9723   echo "$ac_t""yes" 1>&6
9724     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9725   cat >> confdefs.h <<EOF
9726 #define $ac_tr_func 1
9727 EOF
9728  
9729 else
9730   echo "$ac_t""no" 1>&6
9731 fi
9732 done
9733
9734 ol_cv_func_strerror_r=no
9735 if test "${ac_cv_func_strerror_r}" = yes ; then
9736         echo $ac_n "checking non-posix strerror_r""... $ac_c" 1>&6
9737 echo "configure:9738: checking non-posix strerror_r" >&5
9738 if eval "test \"\${ol_cv_nonposix_strerror_r+set}\" = set"; then
9739   echo $ac_n "(cached) $ac_c" 1>&6
9740 else
9741   
9742         cat > conftest.$ac_ext <<EOF
9743 #line 9744 "configure"
9744 #include "confdefs.h"
9745 #include <string.h>
9746 EOF
9747 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9748   egrep "strerror_r" >/dev/null 2>&1; then
9749   rm -rf conftest*
9750   ol_decl_strerror_r=yes
9751 else
9752   rm -rf conftest*
9753   ol_decl_strerror_r=no
9754 fi
9755 rm -f conftest*
9756
9757         if test $ol_decl_strerror_r = yes ; then
9758                 cat > conftest.$ac_ext <<EOF
9759 #line 9760 "configure"
9760 #include "confdefs.h"
9761 #include <string.h>
9762 int main() {
9763    /* from autoconf 2.59 */
9764                                 char buf[100];
9765                                 char x = *strerror_r (0, buf, sizeof buf);
9766                                 char *p = strerror_r (0, buf, sizeof buf);
9767                         
9768 ; return 0; }
9769 EOF
9770 if { (eval echo configure:9771: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9771   rm -rf conftest*
9772   ol_cv_nonposix_strerror_r=yes
9773 else
9774   echo "configure: failed program was:" >&5
9775   cat conftest.$ac_ext >&5
9776   rm -rf conftest*
9777   ol_cv_nonposix_strerror_r=no
9778 fi
9779 rm -f conftest*
9780         else
9781                 if test "$cross_compiling" = yes; then
9782   ol_cv_nonposix_strerror=no
9783 else
9784   cat > conftest.$ac_ext <<EOF
9785 #line 9786 "configure"
9786 #include "confdefs.h"
9787
9788                         main() {
9789                                 char buf[100];
9790                                 buf[0] = 0;
9791                                 strerror_r( 1, buf, sizeof buf );
9792                                 exit( buf[0] == 0 );
9793                         }
9794                         
9795 EOF
9796 if { (eval echo configure:9797: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
9797 then
9798   ol_cv_nonposix_strerror_r=yes
9799 else
9800   echo "configure: failed program was:" >&5
9801   cat conftest.$ac_ext >&5
9802   rm -fr conftest*
9803   ol_cv_nonposix_strerror=no
9804 fi
9805 rm -fr conftest*
9806 fi
9807
9808         fi
9809         
9810 fi
9811
9812 echo "$ac_t""$ol_cv_nonposix_strerror_r" 1>&6
9813 if test $ol_cv_nonposix_strerror_r = yes ; then
9814         cat >> confdefs.h <<\EOF
9815 #define HAVE_NONPOSIX_STRERROR_R 1
9816 EOF
9817
9818 fi
9819
9820 elif test "${ac_cv_func_strerror}" = no ; then
9821         echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6
9822 echo "configure:9823: checking declaration of sys_errlist" >&5
9823 if eval "test \"\${ol_cv_dcl_sys_errlist+set}\" = set"; then
9824   echo $ac_n "(cached) $ac_c" 1>&6
9825 else
9826   
9827         cat > conftest.$ac_ext <<EOF
9828 #line 9829 "configure"
9829 #include "confdefs.h"
9830
9831 #include <stdio.h>
9832 #include <sys/types.h>
9833 #include <errno.h>
9834 #ifdef WINNT
9835 #include <stdlib.h>
9836 #endif 
9837 int main() {
9838 char *c = (char *) *sys_errlist
9839 ; return 0; }
9840 EOF
9841 if { (eval echo configure:9842: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9842   rm -rf conftest*
9843   ol_cv_dcl_sys_errlist=yes
9844         ol_cv_have_sys_errlist=yes
9845 else
9846   echo "configure: failed program was:" >&5
9847   cat conftest.$ac_ext >&5
9848   rm -rf conftest*
9849   ol_cv_dcl_sys_errlist=no
9850 fi
9851 rm -f conftest*
9852 fi
9853
9854 echo "$ac_t""$ol_cv_dcl_sys_errlist" 1>&6
9855 #
9856 # It's possible (for near-UNIX clones) that sys_errlist doesn't exist
9857 if test $ol_cv_dcl_sys_errlist = no ; then
9858         cat >> confdefs.h <<\EOF
9859 #define DECL_SYS_ERRLIST 1
9860 EOF
9861
9862
9863         echo $ac_n "checking existence of sys_errlist""... $ac_c" 1>&6
9864 echo "configure:9865: checking existence of sys_errlist" >&5
9865 if eval "test \"\${ol_cv_have_sys_errlist+set}\" = set"; then
9866   echo $ac_n "(cached) $ac_c" 1>&6
9867 else
9868   
9869                 cat > conftest.$ac_ext <<EOF
9870 #line 9871 "configure"
9871 #include "confdefs.h"
9872 #include <errno.h>
9873 int main() {
9874 char *c = (char *) *sys_errlist
9875 ; return 0; }
9876 EOF
9877 if { (eval echo configure:9878: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9878   rm -rf conftest*
9879   ol_cv_have_sys_errlist=yes
9880 else
9881   echo "configure: failed program was:" >&5
9882   cat conftest.$ac_ext >&5
9883   rm -rf conftest*
9884   ol_cv_have_sys_errlist=no
9885 fi
9886 rm -f conftest*
9887 fi
9888
9889 echo "$ac_t""$ol_cv_have_sys_errlist" 1>&6
9890 fi
9891 if test $ol_cv_have_sys_errlist = yes ; then
9892         cat >> confdefs.h <<\EOF
9893 #define HAVE_SYS_ERRLIST 1
9894 EOF
9895
9896 fi
9897
9898 fi
9899
9900
9901 for ac_hdr in regex.h 
9902 do
9903 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9904 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9905 echo "configure:9906: checking for $ac_hdr" >&5
9906 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9907   echo $ac_n "(cached) $ac_c" 1>&6
9908 else
9909   cat > conftest.$ac_ext <<EOF
9910 #line 9911 "configure"
9911 #include "confdefs.h"
9912 #include <$ac_hdr>
9913 EOF
9914 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9915 { (eval echo configure:9916: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9916 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9917 if test -z "$ac_err"; then
9918   rm -rf conftest*
9919   eval "ac_cv_header_$ac_safe=yes"
9920 else
9921   echo "$ac_err" >&5
9922   echo "configure: failed program was:" >&5
9923   cat conftest.$ac_ext >&5
9924   rm -rf conftest*
9925   eval "ac_cv_header_$ac_safe=no"
9926 fi
9927 rm -f conftest*
9928 fi
9929 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9930   echo "$ac_t""yes" 1>&6
9931     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9932   cat >> confdefs.h <<EOF
9933 #define $ac_tr_hdr 1
9934 EOF
9935  
9936 else
9937   echo "$ac_t""no" 1>&6
9938 fi
9939 done
9940
9941 if test "$ac_cv_header_regex_h" != yes ; then
9942         { echo "configure: error: POSIX regex.h required." 1>&2; exit 1; }
9943 fi
9944
9945 echo $ac_n "checking for library containing regfree""... $ac_c" 1>&6
9946 echo "configure:9947: checking for library containing regfree" >&5
9947 if eval "test \"\${ac_cv_search_regfree+set}\" = set"; then
9948   echo $ac_n "(cached) $ac_c" 1>&6
9949 else
9950   ac_func_search_save_LIBS="$LIBS"
9951 ac_cv_search_regfree="no"
9952 cat > conftest.$ac_ext <<EOF
9953 #line 9954 "configure"
9954 #include "confdefs.h"
9955 /* Override any gcc2 internal prototype to avoid an error.  */
9956 /* We use char because int might match the return type of a gcc2
9957     builtin and then its argument prototype would still apply.  */
9958 char regfree();
9959
9960 int main() {
9961 regfree()
9962 ; return 0; }
9963 EOF
9964 if { (eval echo configure:9965: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9965   rm -rf conftest*
9966   ac_cv_search_regfree="none required"
9967 else
9968   echo "configure: failed program was:" >&5
9969   cat conftest.$ac_ext >&5
9970 fi
9971 rm -f conftest*
9972 test "$ac_cv_search_regfree" = "no" && for ac_lib in regex gnuregex; do
9973 LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9974 cat > conftest.$ac_ext <<EOF
9975 #line 9976 "configure"
9976 #include "confdefs.h"
9977 /* Override any gcc2 internal prototype to avoid an error.  */
9978 /* We use char because int might match the return type of a gcc2
9979     builtin and then its argument prototype would still apply.  */
9980 char regfree();
9981
9982 int main() {
9983 regfree()
9984 ; return 0; }
9985 EOF
9986 if { (eval echo configure:9987: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9987   rm -rf conftest*
9988   ac_cv_search_regfree="-l$ac_lib"
9989 break
9990 else
9991   echo "configure: failed program was:" >&5
9992   cat conftest.$ac_ext >&5
9993 fi
9994 rm -f conftest*
9995 done
9996 LIBS="$ac_func_search_save_LIBS"
9997 fi
9998
9999 echo "$ac_t""$ac_cv_search_regfree" 1>&6
10000 if test "$ac_cv_search_regfree" != "no"; then
10001   test "$ac_cv_search_regfree" = "none required" || LIBS="$ac_cv_search_regfree $LIBS"
10002   :
10003 else :
10004   { echo "configure: error: POSIX regex required." 1>&2; exit 1; }
10005 fi
10006
10007
10008 echo $ac_n "checking for compatible POSIX regex""... $ac_c" 1>&6
10009 echo "configure:10010: checking for compatible POSIX regex" >&5
10010 if eval "test \"\${ol_cv_c_posix_regex+set}\" = set"; then
10011   echo $ac_n "(cached) $ac_c" 1>&6
10012 else
10013   
10014         if test "$cross_compiling" = yes; then
10015   ol_cv_c_posix_regex=cross
10016 else
10017   cat > conftest.$ac_ext <<EOF
10018 #line 10019 "configure"
10019 #include "confdefs.h"
10020
10021 #include <sys/types.h>
10022 #include <regex.h>
10023 static char *pattern, *string;
10024 main()
10025 {
10026         int rc;
10027         regex_t re;
10028
10029         pattern = "^A";
10030
10031         if(regcomp(&re, pattern, 0)) {
10032                 return -1;
10033         }
10034         
10035         string = "ALL MATCH";
10036         
10037         rc = regexec(&re, string, 0, (void*)0, 0);
10038
10039         regfree(&re);
10040
10041         return rc;
10042 }
10043 EOF
10044 if { (eval echo configure:10045: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
10045 then
10046   ol_cv_c_posix_regex=yes
10047 else
10048   echo "configure: failed program was:" >&5
10049   cat conftest.$ac_ext >&5
10050   rm -fr conftest*
10051   ol_cv_c_posix_regex=no
10052 fi
10053 rm -fr conftest*
10054 fi
10055
10056 fi
10057
10058 echo "$ac_t""$ol_cv_c_posix_regex" 1>&6
10059
10060 if test "$ol_cv_c_posix_regex" = no ; then
10061         { echo "configure: error: broken POSIX regex!" 1>&2; exit 1; }
10062 fi
10063
10064
10065 have_uuid=no
10066 for ac_hdr in sys/uuid.h
10067 do
10068 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10069 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10070 echo "configure:10071: checking for $ac_hdr" >&5
10071 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10072   echo $ac_n "(cached) $ac_c" 1>&6
10073 else
10074   cat > conftest.$ac_ext <<EOF
10075 #line 10076 "configure"
10076 #include "confdefs.h"
10077 #include <$ac_hdr>
10078 EOF
10079 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10080 { (eval echo configure:10081: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10081 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10082 if test -z "$ac_err"; then
10083   rm -rf conftest*
10084   eval "ac_cv_header_$ac_safe=yes"
10085 else
10086   echo "$ac_err" >&5
10087   echo "configure: failed program was:" >&5
10088   cat conftest.$ac_ext >&5
10089   rm -rf conftest*
10090   eval "ac_cv_header_$ac_safe=no"
10091 fi
10092 rm -f conftest*
10093 fi
10094 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10095   echo "$ac_t""yes" 1>&6
10096     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10097   cat >> confdefs.h <<EOF
10098 #define $ac_tr_hdr 1
10099 EOF
10100  
10101 else
10102   echo "$ac_t""no" 1>&6
10103 fi
10104 done
10105
10106 if test $ac_cv_header_sys_uuid_h = yes ; then
10107         save_LIBS="$LIBS"
10108         
10109 echo $ac_n "checking for library containing uuid_to_str""... $ac_c" 1>&6
10110 echo "configure:10111: checking for library containing uuid_to_str" >&5
10111 if eval "test \"\${ac_cv_search_uuid_to_str+set}\" = set"; then
10112   echo $ac_n "(cached) $ac_c" 1>&6
10113 else
10114   ac_func_search_save_LIBS="$LIBS"
10115 ac_cv_search_uuid_to_str="no"
10116 cat > conftest.$ac_ext <<EOF
10117 #line 10118 "configure"
10118 #include "confdefs.h"
10119 /* Override any gcc2 internal prototype to avoid an error.  */
10120 /* We use char because int might match the return type of a gcc2
10121     builtin and then its argument prototype would still apply.  */
10122 char uuid_to_str();
10123
10124 int main() {
10125 uuid_to_str()
10126 ; return 0; }
10127 EOF
10128 if { (eval echo configure:10129: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10129   rm -rf conftest*
10130   ac_cv_search_uuid_to_str="none required"
10131 else
10132   echo "configure: failed program was:" >&5
10133   cat conftest.$ac_ext >&5
10134 fi
10135 rm -f conftest*
10136 test "$ac_cv_search_uuid_to_str" = "no" && for ac_lib in uuid; do
10137 LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
10138 cat > conftest.$ac_ext <<EOF
10139 #line 10140 "configure"
10140 #include "confdefs.h"
10141 /* Override any gcc2 internal prototype to avoid an error.  */
10142 /* We use char because int might match the return type of a gcc2
10143     builtin and then its argument prototype would still apply.  */
10144 char uuid_to_str();
10145
10146 int main() {
10147 uuid_to_str()
10148 ; return 0; }
10149 EOF
10150 if { (eval echo configure:10151: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10151   rm -rf conftest*
10152   ac_cv_search_uuid_to_str="-l$ac_lib"
10153 break
10154 else
10155   echo "configure: failed program was:" >&5
10156   cat conftest.$ac_ext >&5
10157 fi
10158 rm -f conftest*
10159 done
10160 LIBS="$ac_func_search_save_LIBS"
10161 fi
10162
10163 echo "$ac_t""$ac_cv_search_uuid_to_str" 1>&6
10164 if test "$ac_cv_search_uuid_to_str" != "no"; then
10165   test "$ac_cv_search_uuid_to_str" = "none required" || LIBS="$ac_cv_search_uuid_to_str $LIBS"
10166   have_uuid=yes
10167 else :
10168   :
10169 fi
10170         LIBS="$save_LIBS"
10171
10172         if test have_uuid = yes ; then
10173                 cat >> confdefs.h <<\EOF
10174 #define HAVE_UUID_TO_STR 1
10175 EOF
10176
10177
10178                 test "$ac_cv_search_uuid_to_str" = "none required" || \
10179                         SLAPD_LIBS="$SLAPD_LIBS $ac_cv_search_uuid_to_str"
10180         fi
10181 fi
10182
10183 if test $have_uuid = no ; then
10184         echo $ac_n "checking to see if -lrpcrt4 is needed for win32 UUID support""... $ac_c" 1>&6
10185 echo "configure:10186: checking to see if -lrpcrt4 is needed for win32 UUID support" >&5
10186         save_LIBS="$LIBS"
10187         LIBS="$LIBS -lrpcrt4"
10188         cat > conftest.$ac_ext <<EOF
10189 #line 10190 "configure"
10190 #include "confdefs.h"
10191
10192                 int __stdcall UuidCreate(void *);
10193                 int __stdcall UuidToStringA(void *,void **);
10194                 
10195 int main() {
10196
10197                 UuidCreate(0);
10198                 UuidToStringA(0,0);
10199                 
10200 ; return 0; }
10201 EOF
10202 if { (eval echo configure:10203: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10203   rm -rf conftest*
10204   need_rpcrt=yes
10205 else
10206   echo "configure: failed program was:" >&5
10207   cat conftest.$ac_ext >&5
10208   rm -rf conftest*
10209   need_rpcrt=no
10210 fi
10211 rm -f conftest*
10212         if test $need_rpcrt = yes; then
10213                 SLAPD_LIBS="$SLAPD_LIBS -lrpcrt4"
10214         fi
10215         LIBS="$save_LIBS"
10216         echo "$ac_t""$need_rpcrt" 1>&6
10217 fi
10218
10219 ol_link_dnssrv=no
10220 echo $ac_n "checking for res_query""... $ac_c" 1>&6
10221 echo "configure:10222: checking for res_query" >&5
10222 if eval "test \"\${ac_cv_func_res_query+set}\" = set"; then
10223   echo $ac_n "(cached) $ac_c" 1>&6
10224 else
10225   cat > conftest.$ac_ext <<EOF
10226 #line 10227 "configure"
10227 #include "confdefs.h"
10228 /* System header to define __stub macros and hopefully few prototypes,
10229     which can conflict with char res_query(); below.  */
10230 #include <assert.h>
10231 /* Override any gcc2 internal prototype to avoid an error.  */
10232 /* We use char because int might match the return type of a gcc2
10233     builtin and then its argument prototype would still apply.  */
10234 char res_query();
10235 char (*f)();
10236
10237 int main() {
10238
10239 /* The GNU C library defines this for functions which it implements
10240     to always fail with ENOSYS.  Some functions are actually named
10241     something starting with __ and the normal name is an alias.  */
10242 #if defined (__stub_res_query) || defined (__stub___res_query)
10243 choke me
10244 #else
10245 f = res_query;
10246 #endif
10247
10248 ; return 0; }
10249 EOF
10250 if { (eval echo configure:10251: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10251   rm -rf conftest*
10252   eval "ac_cv_func_res_query=yes"
10253 else
10254   echo "configure: failed program was:" >&5
10255   cat conftest.$ac_ext >&5
10256   rm -rf conftest*
10257   eval "ac_cv_func_res_query=no"
10258 fi
10259 rm -f conftest*
10260 fi
10261
10262 if eval "test \"`echo '$ac_cv_func_'res_query`\" = yes"; then
10263   echo "$ac_t""yes" 1>&6
10264   :
10265 else
10266   echo "$ac_t""no" 1>&6
10267 fi
10268
10269 if test $ac_cv_func_res_query = no ; then 
10270         echo $ac_n "checking for __res_query""... $ac_c" 1>&6
10271 echo "configure:10272: checking for __res_query" >&5
10272 if eval "test \"\${ac_cv_func___res_query+set}\" = set"; then
10273   echo $ac_n "(cached) $ac_c" 1>&6
10274 else
10275   cat > conftest.$ac_ext <<EOF
10276 #line 10277 "configure"
10277 #include "confdefs.h"
10278 /* System header to define __stub macros and hopefully few prototypes,
10279     which can conflict with char __res_query(); below.  */
10280 #include <assert.h>
10281 /* Override any gcc2 internal prototype to avoid an error.  */
10282 /* We use char because int might match the return type of a gcc2
10283     builtin and then its argument prototype would still apply.  */
10284 char __res_query();
10285 char (*f)();
10286
10287 int main() {
10288
10289 /* The GNU C library defines this for functions which it implements
10290     to always fail with ENOSYS.  Some functions are actually named
10291     something starting with __ and the normal name is an alias.  */
10292 #if defined (__stub___res_query) || defined (__stub_____res_query)
10293 choke me
10294 #else
10295 f = __res_query;
10296 #endif
10297
10298 ; return 0; }
10299 EOF
10300 if { (eval echo configure:10301: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10301   rm -rf conftest*
10302   eval "ac_cv_func___res_query=yes"
10303 else
10304   echo "configure: failed program was:" >&5
10305   cat conftest.$ac_ext >&5
10306   rm -rf conftest*
10307   eval "ac_cv_func___res_query=no"
10308 fi
10309 rm -f conftest*
10310 fi
10311
10312 if eval "test \"`echo '$ac_cv_func_'__res_query`\" = yes"; then
10313   echo "$ac_t""yes" 1>&6
10314   :
10315 else
10316   echo "$ac_t""no" 1>&6
10317 fi
10318
10319         ac_cv_func_res_query=$ac_cv_func___res_query
10320 fi
10321
10322 if test $ac_cv_func_res_query = no ; then 
10323         echo $ac_n "checking for res_query in -lbind""... $ac_c" 1>&6
10324 echo "configure:10325: checking for res_query in -lbind" >&5
10325 ac_lib_var=`echo bind'_'res_query | sed 'y%./+-:%__p__%'`
10326 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10327   echo $ac_n "(cached) $ac_c" 1>&6
10328 else
10329   ac_save_LIBS="$LIBS"
10330 LIBS="-lbind  $LIBS"
10331 cat > conftest.$ac_ext <<EOF
10332 #line 10333 "configure"
10333 #include "confdefs.h"
10334 /* Override any gcc2 internal prototype to avoid an error.  */
10335 /* We use char because int might match the return type of a gcc2
10336     builtin and then its argument prototype would still apply.  */
10337 char res_query();
10338
10339 int main() {
10340 res_query()
10341 ; return 0; }
10342 EOF
10343 if { (eval echo configure:10344: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10344   rm -rf conftest*
10345   eval "ac_cv_lib_$ac_lib_var=yes"
10346 else
10347   echo "configure: failed program was:" >&5
10348   cat conftest.$ac_ext >&5
10349   rm -rf conftest*
10350   eval "ac_cv_lib_$ac_lib_var=no"
10351 fi
10352 rm -f conftest*
10353 LIBS="$ac_save_LIBS"
10354
10355 fi
10356 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10357   echo "$ac_t""yes" 1>&6
10358     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10359     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10360   cat >> confdefs.h <<EOF
10361 #define $ac_tr_lib 1
10362 EOF
10363
10364   LIBS="-lbind $LIBS"
10365
10366 else
10367   echo "$ac_t""no" 1>&6
10368 fi
10369
10370         ac_cv_func_res_query=$ac_cv_lib_bind_res_query
10371 fi
10372
10373 if test $ac_cv_func_res_query = no ; then 
10374         echo $ac_n "checking for __res_query in -lbind""... $ac_c" 1>&6
10375 echo "configure:10376: checking for __res_query in -lbind" >&5
10376 ac_lib_var=`echo bind'_'__res_query | sed 'y%./+-:%__p__%'`
10377 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10378   echo $ac_n "(cached) $ac_c" 1>&6
10379 else
10380   ac_save_LIBS="$LIBS"
10381 LIBS="-lbind  $LIBS"
10382 cat > conftest.$ac_ext <<EOF
10383 #line 10384 "configure"
10384 #include "confdefs.h"
10385 /* Override any gcc2 internal prototype to avoid an error.  */
10386 /* We use char because int might match the return type of a gcc2
10387     builtin and then its argument prototype would still apply.  */
10388 char __res_query();
10389
10390 int main() {
10391 __res_query()
10392 ; return 0; }
10393 EOF
10394 if { (eval echo configure:10395: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10395   rm -rf conftest*
10396   eval "ac_cv_lib_$ac_lib_var=yes"
10397 else
10398   echo "configure: failed program was:" >&5
10399   cat conftest.$ac_ext >&5
10400   rm -rf conftest*
10401   eval "ac_cv_lib_$ac_lib_var=no"
10402 fi
10403 rm -f conftest*
10404 LIBS="$ac_save_LIBS"
10405
10406 fi
10407 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10408   echo "$ac_t""yes" 1>&6
10409     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10410     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10411   cat >> confdefs.h <<EOF
10412 #define $ac_tr_lib 1
10413 EOF
10414
10415   LIBS="-lbind $LIBS"
10416
10417 else
10418   echo "$ac_t""no" 1>&6
10419 fi
10420
10421         ac_cv_func_res_query=$ac_cv_lib_bind___res_query
10422 fi
10423
10424 if test $ac_cv_func_res_query = no ; then 
10425         echo $ac_n "checking for res_query in -lresolv""... $ac_c" 1>&6
10426 echo "configure:10427: checking for res_query in -lresolv" >&5
10427 ac_lib_var=`echo resolv'_'res_query | sed 'y%./+-:%__p__%'`
10428 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10429   echo $ac_n "(cached) $ac_c" 1>&6
10430 else
10431   ac_save_LIBS="$LIBS"
10432 LIBS="-lresolv  $LIBS"
10433 cat > conftest.$ac_ext <<EOF
10434 #line 10435 "configure"
10435 #include "confdefs.h"
10436 /* Override any gcc2 internal prototype to avoid an error.  */
10437 /* We use char because int might match the return type of a gcc2
10438     builtin and then its argument prototype would still apply.  */
10439 char res_query();
10440
10441 int main() {
10442 res_query()
10443 ; return 0; }
10444 EOF
10445 if { (eval echo configure:10446: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10446   rm -rf conftest*
10447   eval "ac_cv_lib_$ac_lib_var=yes"
10448 else
10449   echo "configure: failed program was:" >&5
10450   cat conftest.$ac_ext >&5
10451   rm -rf conftest*
10452   eval "ac_cv_lib_$ac_lib_var=no"
10453 fi
10454 rm -f conftest*
10455 LIBS="$ac_save_LIBS"
10456
10457 fi
10458 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10459   echo "$ac_t""yes" 1>&6
10460     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10461     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10462   cat >> confdefs.h <<EOF
10463 #define $ac_tr_lib 1
10464 EOF
10465
10466   LIBS="-lresolv $LIBS"
10467
10468 else
10469   echo "$ac_t""no" 1>&6
10470 fi
10471
10472         ac_cv_func_res_query=$ac_cv_lib_resolv_res_query
10473 fi
10474
10475 if test $ac_cv_func_res_query = no ; then 
10476         echo $ac_n "checking for __res_query in -lresolv""... $ac_c" 1>&6
10477 echo "configure:10478: checking for __res_query in -lresolv" >&5
10478 ac_lib_var=`echo resolv'_'__res_query | sed 'y%./+-:%__p__%'`
10479 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10480   echo $ac_n "(cached) $ac_c" 1>&6
10481 else
10482   ac_save_LIBS="$LIBS"
10483 LIBS="-lresolv  $LIBS"
10484 cat > conftest.$ac_ext <<EOF
10485 #line 10486 "configure"
10486 #include "confdefs.h"
10487 /* Override any gcc2 internal prototype to avoid an error.  */
10488 /* We use char because int might match the return type of a gcc2
10489     builtin and then its argument prototype would still apply.  */
10490 char __res_query();
10491
10492 int main() {
10493 __res_query()
10494 ; return 0; }
10495 EOF
10496 if { (eval echo configure:10497: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10497   rm -rf conftest*
10498   eval "ac_cv_lib_$ac_lib_var=yes"
10499 else
10500   echo "configure: failed program was:" >&5
10501   cat conftest.$ac_ext >&5
10502   rm -rf conftest*
10503   eval "ac_cv_lib_$ac_lib_var=no"
10504 fi
10505 rm -f conftest*
10506 LIBS="$ac_save_LIBS"
10507
10508 fi
10509 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10510   echo "$ac_t""yes" 1>&6
10511     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10512     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10513   cat >> confdefs.h <<EOF
10514 #define $ac_tr_lib 1
10515 EOF
10516
10517   LIBS="-lresolv $LIBS"
10518
10519 else
10520   echo "$ac_t""no" 1>&6
10521 fi
10522
10523         ac_cv_func_res_query=$ac_cv_lib_resolv___res_query
10524 fi
10525
10526 if test $ac_cv_func_res_query = no ; then 
10527         echo $ac_n "checking for _res_9_query in -lresolv""... $ac_c" 1>&6
10528 echo "configure:10529: checking for _res_9_query in -lresolv" >&5
10529 ac_lib_var=`echo resolv'_'_res_9_query | sed 'y%./+-:%__p__%'`
10530 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10531   echo $ac_n "(cached) $ac_c" 1>&6
10532 else
10533   ac_save_LIBS="$LIBS"
10534 LIBS="-lresolv  $LIBS"
10535 cat > conftest.$ac_ext <<EOF
10536 #line 10537 "configure"
10537 #include "confdefs.h"
10538 /* Override any gcc2 internal prototype to avoid an error.  */
10539 /* We use char because int might match the return type of a gcc2
10540     builtin and then its argument prototype would still apply.  */
10541 char _res_9_query();
10542
10543 int main() {
10544 _res_9_query()
10545 ; return 0; }
10546 EOF
10547 if { (eval echo configure:10548: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10548   rm -rf conftest*
10549   eval "ac_cv_lib_$ac_lib_var=yes"
10550 else
10551   echo "configure: failed program was:" >&5
10552   cat conftest.$ac_ext >&5
10553   rm -rf conftest*
10554   eval "ac_cv_lib_$ac_lib_var=no"
10555 fi
10556 rm -f conftest*
10557 LIBS="$ac_save_LIBS"
10558
10559 fi
10560 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10561   echo "$ac_t""yes" 1>&6
10562     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10563     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10564   cat >> confdefs.h <<EOF
10565 #define $ac_tr_lib 1
10566 EOF
10567
10568   LIBS="-lresolv $LIBS"
10569
10570 else
10571   echo "$ac_t""no" 1>&6
10572 fi
10573
10574         ac_cv_func_res_query=$ac_cv_lib_resolv_res_9_query
10575 fi
10576
10577 if test "$ac_cv_func_res_query" = yes ; then
10578         cat >> confdefs.h <<\EOF
10579 #define HAVE_RES_QUERY 1
10580 EOF
10581
10582
10583         if test $ol_enable_dnssrv != no ; then
10584                 ol_link_dnssrv=yes
10585         fi
10586 fi
10587
10588 if test "$ol_enable_dnssrv" != no -a "$ol_link_dnssrv" = no ; then
10589         { echo "configure: error: DNSSRV requires res_query()" 1>&2; exit 1; }
10590 fi
10591
10592 for ac_func in hstrerror 
10593 do
10594 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10595 echo "configure:10596: checking for $ac_func" >&5
10596 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10597   echo $ac_n "(cached) $ac_c" 1>&6
10598 else
10599   cat > conftest.$ac_ext <<EOF
10600 #line 10601 "configure"
10601 #include "confdefs.h"
10602 /* System header to define __stub macros and hopefully few prototypes,
10603     which can conflict with char $ac_func(); below.  */
10604 #include <assert.h>
10605 /* Override any gcc2 internal prototype to avoid an error.  */
10606 /* We use char because int might match the return type of a gcc2
10607     builtin and then its argument prototype would still apply.  */
10608 char $ac_func();
10609 char (*f)();
10610
10611 int main() {
10612
10613 /* The GNU C library defines this for functions which it implements
10614     to always fail with ENOSYS.  Some functions are actually named
10615     something starting with __ and the normal name is an alias.  */
10616 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10617 choke me
10618 #else
10619 f = $ac_func;
10620 #endif
10621
10622 ; return 0; }
10623 EOF
10624 if { (eval echo configure:10625: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10625   rm -rf conftest*
10626   eval "ac_cv_func_$ac_func=yes"
10627 else
10628   echo "configure: failed program was:" >&5
10629   cat conftest.$ac_ext >&5
10630   rm -rf conftest*
10631   eval "ac_cv_func_$ac_func=no"
10632 fi
10633 rm -f conftest*
10634 fi
10635
10636 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10637   echo "$ac_t""yes" 1>&6
10638     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10639   cat >> confdefs.h <<EOF
10640 #define $ac_tr_func 1
10641 EOF
10642  
10643 else
10644   echo "$ac_t""no" 1>&6
10645 fi
10646 done
10647
10648
10649 for ac_func in getaddrinfo getnameinfo gai_strerror inet_ntop 
10650 do
10651 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10652 echo "configure:10653: checking for $ac_func" >&5
10653 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10654   echo $ac_n "(cached) $ac_c" 1>&6
10655 else
10656   cat > conftest.$ac_ext <<EOF
10657 #line 10658 "configure"
10658 #include "confdefs.h"
10659 /* System header to define __stub macros and hopefully few prototypes,
10660     which can conflict with char $ac_func(); below.  */
10661 #include <assert.h>
10662 /* Override any gcc2 internal prototype to avoid an error.  */
10663 /* We use char because int might match the return type of a gcc2
10664     builtin and then its argument prototype would still apply.  */
10665 char $ac_func();
10666 char (*f)();
10667
10668 int main() {
10669
10670 /* The GNU C library defines this for functions which it implements
10671     to always fail with ENOSYS.  Some functions are actually named
10672     something starting with __ and the normal name is an alias.  */
10673 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10674 choke me
10675 #else
10676 f = $ac_func;
10677 #endif
10678
10679 ; return 0; }
10680 EOF
10681 if { (eval echo configure:10682: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10682   rm -rf conftest*
10683   eval "ac_cv_func_$ac_func=yes"
10684 else
10685   echo "configure: failed program was:" >&5
10686   cat conftest.$ac_ext >&5
10687   rm -rf conftest*
10688   eval "ac_cv_func_$ac_func=no"
10689 fi
10690 rm -f conftest*
10691 fi
10692
10693 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10694   echo "$ac_t""yes" 1>&6
10695     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10696   cat >> confdefs.h <<EOF
10697 #define $ac_tr_func 1
10698 EOF
10699  
10700 else
10701   echo "$ac_t""no" 1>&6
10702 fi
10703 done
10704
10705
10706 ol_link_ipv6=no
10707 if test $ac_cv_func_getaddrinfo = no -o $ac_cv_func_inet_ntop = no ; then
10708         if test $ol_enable_ipv6 = yes ; then
10709                 { echo "configure: error: IPv6 support requires getaddrinfo() and inet_ntop()" 1>&2; exit 1; }
10710         fi
10711 elif test $ol_enable_ipv6 != no ; then
10712         echo $ac_n "checking INET6_ADDRSTRLEN""... $ac_c" 1>&6
10713 echo "configure:10714: checking INET6_ADDRSTRLEN" >&5
10714 if eval "test \"\${ol_cv_inet6_addrstrlen+set}\" = set"; then
10715   echo $ac_n "(cached) $ac_c" 1>&6
10716 else
10717   
10718                 cat > conftest.$ac_ext <<EOF
10719 #line 10720 "configure"
10720 #include "confdefs.h"
10721
10722 #                       include <netinet/in.h>
10723 #                       ifdef INET6_ADDRSTRLEN
10724                                 __has_inet6_addrstrlen__;
10725 #                       endif
10726                 
10727 EOF
10728 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10729   egrep "__has_inet6_addrstrlen__" >/dev/null 2>&1; then
10730   rm -rf conftest*
10731   ol_cv_inet6_addrstrlen=yes
10732 else
10733   rm -rf conftest*
10734   ol_cv_inet6_addrstrlen=no
10735 fi
10736 rm -f conftest*
10737
10738 fi
10739
10740 echo "$ac_t""$ol_cv_inet6_addrstrlen" 1>&6
10741
10742
10743         echo $ac_n "checking struct sockaddr_storage""... $ac_c" 1>&6
10744 echo "configure:10745: checking struct sockaddr_storage" >&5
10745 if eval "test \"\${ol_cv_struct_sockaddr_storage+set}\" = set"; then
10746   echo $ac_n "(cached) $ac_c" 1>&6
10747 else
10748   
10749                 cat > conftest.$ac_ext <<EOF
10750 #line 10751 "configure"
10751 #include "confdefs.h"
10752
10753 #include <sys/types.h>
10754 #include <sys/socket.h>
10755
10756 int main() {
10757
10758                         struct sockaddr_storage ss;
10759
10760 ; return 0; }
10761 EOF
10762 if { (eval echo configure:10763: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10763   rm -rf conftest*
10764   ol_cv_struct_sockaddr_storage=yes
10765 else
10766   echo "configure: failed program was:" >&5
10767   cat conftest.$ac_ext >&5
10768   rm -rf conftest*
10769   ol_cv_struct_sockaddr_storage=no
10770 fi
10771 rm -f conftest*
10772 fi
10773
10774 echo "$ac_t""$ol_cv_struct_sockaddr_storage" 1>&6
10775
10776         if test $ol_cv_inet6_addrstrlen = yes \
10777                 -a $ol_cv_struct_sockaddr_storage = yes ; then
10778                 ol_link_ipv6=yes
10779         elif test $ol_enable_ipv6 = yes \
10780                         -a $ol_cv_inet6_addrstrlen = no ; then
10781                 { echo "configure: error: IPv6 support requires INET6_ADDRSTRLEN" 1>&2; exit 1; }
10782         elif test $ol_enable_ipv6 = yes \
10783                         -a $ol_cv_struct_sockaddr_storage = no ; then
10784                 { echo "configure: error: IPv6 support requires struct sockaddr_storage" 1>&2; exit 1; }
10785         fi
10786 fi
10787
10788 if test $ol_enable_local != no ; then
10789         for ac_hdr in sys/un.h 
10790 do
10791 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10792 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10793 echo "configure:10794: checking for $ac_hdr" >&5
10794 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10795   echo $ac_n "(cached) $ac_c" 1>&6
10796 else
10797   cat > conftest.$ac_ext <<EOF
10798 #line 10799 "configure"
10799 #include "confdefs.h"
10800 #include <$ac_hdr>
10801 EOF
10802 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10803 { (eval echo configure:10804: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10804 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10805 if test -z "$ac_err"; then
10806   rm -rf conftest*
10807   eval "ac_cv_header_$ac_safe=yes"
10808 else
10809   echo "$ac_err" >&5
10810   echo "configure: failed program was:" >&5
10811   cat conftest.$ac_ext >&5
10812   rm -rf conftest*
10813   eval "ac_cv_header_$ac_safe=no"
10814 fi
10815 rm -f conftest*
10816 fi
10817 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10818   echo "$ac_t""yes" 1>&6
10819     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10820   cat >> confdefs.h <<EOF
10821 #define $ac_tr_hdr 1
10822 EOF
10823  
10824 else
10825   echo "$ac_t""no" 1>&6
10826 fi
10827 done
10828
10829
10830         if test $ol_enable_local = auto ; then
10831                 ol_enable_local=$ac_cv_header_sys_un_h
10832         elif test $ac_cv_header_sys_un_h = no ; then
10833                 { echo "configure: error: AF_LOCAL domain support requires sys/un.h" 1>&2; exit 1; }
10834         fi
10835 fi
10836
10837 ol_link_kbind=no
10838 ol_link_krb5=no
10839 ol_link_krb4=no
10840
10841 if test $ol_with_kerberos = yes -o $ol_with_kerberos = auto \
10842         -o $ol_with_kerberos = k5 -o $ol_with_kerberos = k5only \
10843         -o $ol_with_kerberos = k425 ; then
10844
10845         for ac_hdr in krb5.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_krb5_h = yes ; then
10887                                 for ac_hdr in heim_err.h
10888 do
10889 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10890 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10891 echo "configure:10892: checking for $ac_hdr" >&5
10892 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10893   echo $ac_n "(cached) $ac_c" 1>&6
10894 else
10895   cat > conftest.$ac_ext <<EOF
10896 #line 10897 "configure"
10897 #include "confdefs.h"
10898 #include <$ac_hdr>
10899 EOF
10900 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10901 { (eval echo configure:10902: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10902 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10903 if test -z "$ac_err"; then
10904   rm -rf conftest*
10905   eval "ac_cv_header_$ac_safe=yes"
10906 else
10907   echo "$ac_err" >&5
10908   echo "configure: failed program was:" >&5
10909   cat conftest.$ac_ext >&5
10910   rm -rf conftest*
10911   eval "ac_cv_header_$ac_safe=no"
10912 fi
10913 rm -f conftest*
10914 fi
10915 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10916   echo "$ac_t""yes" 1>&6
10917     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10918   cat >> confdefs.h <<EOF
10919 #define $ac_tr_hdr 1
10920 EOF
10921  
10922 else
10923   echo "$ac_t""no" 1>&6
10924 fi
10925 done
10926
10927                 if test $ac_cv_header_heim_err_h = yes ; then
10928                         krb5_impl=heimdal
10929                 else
10930                         krb5_impl=mit
10931                 fi
10932
10933                 if test $krb5_impl = mit; then
10934                         echo $ac_n "checking for main in -lk5crypto""... $ac_c" 1>&6
10935 echo "configure:10936: checking for main in -lk5crypto" >&5
10936 ac_lib_var=`echo k5crypto'_'main | sed 'y%./+-:%__p__%'`
10937 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10938   echo $ac_n "(cached) $ac_c" 1>&6
10939 else
10940   ac_save_LIBS="$LIBS"
10941 LIBS="-lk5crypto  $LIBS"
10942 cat > conftest.$ac_ext <<EOF
10943 #line 10944 "configure"
10944 #include "confdefs.h"
10945
10946 int main() {
10947 main()
10948 ; return 0; }
10949 EOF
10950 if { (eval echo configure:10951: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10951   rm -rf conftest*
10952   eval "ac_cv_lib_$ac_lib_var=yes"
10953 else
10954   echo "configure: failed program was:" >&5
10955   cat conftest.$ac_ext >&5
10956   rm -rf conftest*
10957   eval "ac_cv_lib_$ac_lib_var=no"
10958 fi
10959 rm -f conftest*
10960 LIBS="$ac_save_LIBS"
10961
10962 fi
10963 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10964   echo "$ac_t""yes" 1>&6
10965   krb5crypto=k5crypto
10966 else
10967   echo "$ac_t""no" 1>&6
10968 krb5crypto=crypto
10969 fi
10970
10971
10972                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
10973 echo "configure:10974: checking for main in -lkrb5" >&5
10974 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
10975 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10976   echo $ac_n "(cached) $ac_c" 1>&6
10977 else
10978   ac_save_LIBS="$LIBS"
10979 LIBS="-lkrb5 -l$krb5crypto -lcom_err $LIBS"
10980 cat > conftest.$ac_ext <<EOF
10981 #line 10982 "configure"
10982 #include "confdefs.h"
10983
10984 int main() {
10985 main()
10986 ; return 0; }
10987 EOF
10988 if { (eval echo configure:10989: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10989   rm -rf conftest*
10990   eval "ac_cv_lib_$ac_lib_var=yes"
10991 else
10992   echo "configure: failed program was:" >&5
10993   cat conftest.$ac_ext >&5
10994   rm -rf conftest*
10995   eval "ac_cv_lib_$ac_lib_var=no"
10996 fi
10997 rm -f conftest*
10998 LIBS="$ac_save_LIBS"
10999
11000 fi
11001 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11002   echo "$ac_t""yes" 1>&6
11003   have_krb5=yes
11004                                 KRB5_LIBS="-lkrb5 -l$krb5crypto -lcom_err"
11005 else
11006   echo "$ac_t""no" 1>&6
11007 have_krb5=no
11008 fi
11009
11010
11011                 elif test $krb5_impl = heimdal; then
11012                         echo $ac_n "checking for main in -ldes""... $ac_c" 1>&6
11013 echo "configure:11014: checking for main in -ldes" >&5
11014 ac_lib_var=`echo des'_'main | sed 'y%./+-:%__p__%'`
11015 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11016   echo $ac_n "(cached) $ac_c" 1>&6
11017 else
11018   ac_save_LIBS="$LIBS"
11019 LIBS="-ldes  $LIBS"
11020 cat > conftest.$ac_ext <<EOF
11021 #line 11022 "configure"
11022 #include "confdefs.h"
11023
11024 int main() {
11025 main()
11026 ; return 0; }
11027 EOF
11028 if { (eval echo configure:11029: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11029   rm -rf conftest*
11030   eval "ac_cv_lib_$ac_lib_var=yes"
11031 else
11032   echo "configure: failed program was:" >&5
11033   cat conftest.$ac_ext >&5
11034   rm -rf conftest*
11035   eval "ac_cv_lib_$ac_lib_var=no"
11036 fi
11037 rm -f conftest*
11038 LIBS="$ac_save_LIBS"
11039
11040 fi
11041 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11042   echo "$ac_t""yes" 1>&6
11043   krb5crypto=des
11044 else
11045   echo "$ac_t""no" 1>&6
11046 krb5crypto=crypto
11047 fi
11048
11049
11050                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
11051 echo "configure:11052: checking for main in -lkrb5" >&5
11052 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
11053 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11054   echo $ac_n "(cached) $ac_c" 1>&6
11055 else
11056   ac_save_LIBS="$LIBS"
11057 LIBS="-lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err $LIBS"
11058 cat > conftest.$ac_ext <<EOF
11059 #line 11060 "configure"
11060 #include "confdefs.h"
11061
11062 int main() {
11063 main()
11064 ; return 0; }
11065 EOF
11066 if { (eval echo configure:11067: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11067   rm -rf conftest*
11068   eval "ac_cv_lib_$ac_lib_var=yes"
11069 else
11070   echo "configure: failed program was:" >&5
11071   cat conftest.$ac_ext >&5
11072   rm -rf conftest*
11073   eval "ac_cv_lib_$ac_lib_var=no"
11074 fi
11075 rm -f conftest*
11076 LIBS="$ac_save_LIBS"
11077
11078 fi
11079 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11080   echo "$ac_t""yes" 1>&6
11081   have_krb5=yes
11082                                 KRB5_LIBS="-lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err"
11083 else
11084   echo "$ac_t""no" 1>&6
11085 have_krb5=no
11086 fi
11087
11088
11089                         cat >> confdefs.h <<\EOF
11090 #define HAVE_HEIMDAL_KERBEROS 1
11091 EOF
11092
11093
11094                 else
11095                         have_krb5=no
11096                         echo "configure: warning: Unrecognized Kerberos5 Implementation" 1>&2
11097                 fi
11098
11099                 if test $have_krb5 = yes ; then
11100                         ol_link_krb5=yes
11101
11102                         cat >> confdefs.h <<\EOF
11103 #define HAVE_KRB5 1
11104 EOF
11105
11106
11107                         if test $ol_with_kerberos = k5only ; then
11108                                 ol_with_kerberos=found
11109                         fi
11110
11111                 elif test $ol_with_kerberos != auto ; then
11112                         { echo "configure: error: Required Kerberos 5 support not available" 1>&2; exit 1; }
11113                 fi
11114
11115         fi
11116 fi
11117
11118 if test $ol_link_krb5 = yes -a \( $ol_with_kerberos = yes -o \
11119         $ol_with_kerberos = auto -o $ol_with_kerberos = k425 \) ; then
11120
11121         for ac_hdr in kerberosIV/krb.h kerberosIV/des.h
11122 do
11123 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11124 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11125 echo "configure:11126: checking for $ac_hdr" >&5
11126 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11127   echo $ac_n "(cached) $ac_c" 1>&6
11128 else
11129   cat > conftest.$ac_ext <<EOF
11130 #line 11131 "configure"
11131 #include "confdefs.h"
11132 #include <$ac_hdr>
11133 EOF
11134 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11135 { (eval echo configure:11136: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11136 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11137 if test -z "$ac_err"; then
11138   rm -rf conftest*
11139   eval "ac_cv_header_$ac_safe=yes"
11140 else
11141   echo "$ac_err" >&5
11142   echo "configure: failed program was:" >&5
11143   cat conftest.$ac_ext >&5
11144   rm -rf conftest*
11145   eval "ac_cv_header_$ac_safe=no"
11146 fi
11147 rm -f conftest*
11148 fi
11149 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11150   echo "$ac_t""yes" 1>&6
11151     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11152   cat >> confdefs.h <<EOF
11153 #define $ac_tr_hdr 1
11154 EOF
11155  
11156 else
11157   echo "$ac_t""no" 1>&6
11158 fi
11159 done
11160
11161
11162         if test $ac_cv_header_kerberosIV_krb_h = yes ; then
11163                 if test $krb5_impl = mit; then
11164                         echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
11165 echo "configure:11166: checking for main in -lkrb4" >&5
11166 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
11167 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11168   echo $ac_n "(cached) $ac_c" 1>&6
11169 else
11170   ac_save_LIBS="$LIBS"
11171 LIBS="-lkrb4 -ldes425 -lkrb5 -l$krb5crypto -lcom_err $LIBS"
11172 cat > conftest.$ac_ext <<EOF
11173 #line 11174 "configure"
11174 #include "confdefs.h"
11175
11176 int main() {
11177 main()
11178 ; return 0; }
11179 EOF
11180 if { (eval echo configure:11181: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11181   rm -rf conftest*
11182   eval "ac_cv_lib_$ac_lib_var=yes"
11183 else
11184   echo "configure: failed program was:" >&5
11185   cat conftest.$ac_ext >&5
11186   rm -rf conftest*
11187   eval "ac_cv_lib_$ac_lib_var=no"
11188 fi
11189 rm -f conftest*
11190 LIBS="$ac_save_LIBS"
11191
11192 fi
11193 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11194   echo "$ac_t""yes" 1>&6
11195   have_k425=yes
11196                                 KRB4_LIBS="-lkrb4 -ldes425"
11197 else
11198   echo "$ac_t""no" 1>&6
11199 have_k425=no
11200 fi
11201
11202
11203                 elif test $krb5_impl = heimdal; then
11204                         echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
11205 echo "configure:11206: checking for main in -lkrb4" >&5
11206 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
11207 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11208   echo $ac_n "(cached) $ac_c" 1>&6
11209 else
11210   ac_save_LIBS="$LIBS"
11211 LIBS="-lkrb4 -lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err $LIBS"
11212 cat > conftest.$ac_ext <<EOF
11213 #line 11214 "configure"
11214 #include "confdefs.h"
11215
11216 int main() {
11217 main()
11218 ; return 0; }
11219 EOF
11220 if { (eval echo configure:11221: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11221   rm -rf conftest*
11222   eval "ac_cv_lib_$ac_lib_var=yes"
11223 else
11224   echo "configure: failed program was:" >&5
11225   cat conftest.$ac_ext >&5
11226   rm -rf conftest*
11227   eval "ac_cv_lib_$ac_lib_var=no"
11228 fi
11229 rm -f conftest*
11230 LIBS="$ac_save_LIBS"
11231
11232 fi
11233 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11234   echo "$ac_t""yes" 1>&6
11235   have_k425=yes
11236                                 KRB4_LIBS="-lkrb4"
11237 else
11238   echo "$ac_t""no" 1>&6
11239 have_k425=no
11240 fi
11241
11242
11243                 else
11244                         have_425=no
11245                         echo "configure: warning: Unrecongized Kerberos V Implementation" 1>&2
11246                 fi
11247
11248                 if test $have_k425 = yes ; then
11249                         ol_with_kerberos=found
11250                         ol_link_krb4=yes
11251
11252                         cat >> confdefs.h <<\EOF
11253 #define HAVE_KRB425 1
11254 EOF
11255
11256                         cat >> confdefs.h <<\EOF
11257 #define HAVE_KRB4 1
11258 EOF
11259
11260
11261                         echo $ac_n "checking for des_debug in Kerberos libraries""... $ac_c" 1>&6
11262 echo "configure:11263: checking for des_debug in Kerberos libraries" >&5
11263 if eval "test \"\${ol_cv_var_des_debug+set}\" = set"; then
11264   echo $ac_n "(cached) $ac_c" 1>&6
11265 else
11266   
11267                                                                 save_LIBS="$LIBS"
11268                                 LIBS="$KRB4_LIBS $KRB5_LIBS $LIBS"
11269                                 cat > conftest.$ac_ext <<EOF
11270 #line 11271 "configure"
11271 #include "confdefs.h"
11272
11273 #include <kerberosIV/krb.h>
11274 #include <kerberosIV/des.h>
11275 extern int des_debug;
11276
11277 int main() {
11278
11279 des_debug = 1;
11280
11281 ; return 0; }
11282 EOF
11283 if { (eval echo configure:11284: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11284   rm -rf conftest*
11285   ol_cv_var_des_debug=yes
11286 else
11287   echo "configure: failed program was:" >&5
11288   cat conftest.$ac_ext >&5
11289   rm -rf conftest*
11290   ol_cv_var_des_debug=no
11291 fi
11292 rm -f conftest*
11293                                                                 LIBS="$save_LIBS"
11294                         
11295 fi
11296
11297 echo "$ac_t""$ol_cv_var_des_debug" 1>&6
11298
11299                         if test $ol_cv_var_des_debug = yes ; then
11300                                 cat >> confdefs.h <<\EOF
11301 #define HAVE_DES_DEBUG 1
11302 EOF
11303
11304                         fi
11305
11306                         LIBS="$save_LIBS"
11307                 fi
11308         fi
11309 fi
11310
11311 if test $ol_link_krb5 = yes ; then
11312         ol_with_kerberos=found
11313 fi
11314
11315 if test $ol_with_kerberos = yes -o $ol_with_kerberos = auto \
11316         -o $ol_with_kerberos = k4 -o $ol_with_kerberos = kth ; then
11317
11318         for ac_hdr in krb.h des.h krb-archaeology.h 
11319 do
11320 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11321 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11322 echo "configure:11323: checking for $ac_hdr" >&5
11323 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11324   echo $ac_n "(cached) $ac_c" 1>&6
11325 else
11326   cat > conftest.$ac_ext <<EOF
11327 #line 11328 "configure"
11328 #include "confdefs.h"
11329 #include <$ac_hdr>
11330 EOF
11331 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11332 { (eval echo configure:11333: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11333 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11334 if test -z "$ac_err"; then
11335   rm -rf conftest*
11336   eval "ac_cv_header_$ac_safe=yes"
11337 else
11338   echo "$ac_err" >&5
11339   echo "configure: failed program was:" >&5
11340   cat conftest.$ac_ext >&5
11341   rm -rf conftest*
11342   eval "ac_cv_header_$ac_safe=no"
11343 fi
11344 rm -f conftest*
11345 fi
11346 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11347   echo "$ac_t""yes" 1>&6
11348     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11349   cat >> confdefs.h <<EOF
11350 #define $ac_tr_hdr 1
11351 EOF
11352  
11353 else
11354   echo "$ac_t""no" 1>&6
11355 fi
11356 done
11357
11358
11359         if test $ac_cv_header_krb_h = yes ; then
11360                 echo $ac_n "checking for main in -lkrb""... $ac_c" 1>&6
11361 echo "configure:11362: checking for main in -lkrb" >&5
11362 ac_lib_var=`echo krb'_'main | sed 'y%./+-:%__p__%'`
11363 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11364   echo $ac_n "(cached) $ac_c" 1>&6
11365 else
11366   ac_save_LIBS="$LIBS"
11367 LIBS="-lkrb -ldes $LIBS"
11368 cat > conftest.$ac_ext <<EOF
11369 #line 11370 "configure"
11370 #include "confdefs.h"
11371
11372 int main() {
11373 main()
11374 ; return 0; }
11375 EOF
11376 if { (eval echo configure:11377: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11377   rm -rf conftest*
11378   eval "ac_cv_lib_$ac_lib_var=yes"
11379 else
11380   echo "configure: failed program was:" >&5
11381   cat conftest.$ac_ext >&5
11382   rm -rf conftest*
11383   eval "ac_cv_lib_$ac_lib_var=no"
11384 fi
11385 rm -f conftest*
11386 LIBS="$ac_save_LIBS"
11387
11388 fi
11389 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11390   echo "$ac_t""yes" 1>&6
11391   have_k4=yes
11392 else
11393   echo "$ac_t""no" 1>&6
11394 have_k4=no
11395 fi
11396
11397
11398                 if test $have_k4 = yes ; then
11399                         ol_with_kerberos=found
11400                         ol_link_krb4=yes
11401
11402                         cat >> confdefs.h <<\EOF
11403 #define HAVE_KRB4 1
11404 EOF
11405
11406
11407                         KRB4_LIBS="-lkrb -ldes"
11408
11409                         if test $ac_cv_header_krb_archaeology_h = yes ; then
11410                                 cat >> confdefs.h <<\EOF
11411 #define HAVE_KTH_KERBEROS 1
11412 EOF
11413
11414                         fi
11415                 fi
11416         fi
11417 fi
11418
11419 if test $ol_link_krb4 = yes -a $ol_enable_kbind != no ; then
11420         ol_link_kbind=yes
11421
11422 elif test $ol_enable_kbind = yes ; then
11423         { echo "configure: error: Kerberos IV detection failed" 1>&2; exit 1; }
11424 fi
11425
11426 if test $ol_link_krb4 = yes -o $ol_link_krb5 = yes ; then
11427         cat >> confdefs.h <<\EOF
11428 #define HAVE_KERBEROS 1
11429 EOF
11430
11431
11432 elif test $ol_with_kerberos != auto -a $ol_with_kerberos != no ; then
11433         { echo "configure: error: Kerberos detection failed" 1>&2; exit 1; }
11434 fi
11435
11436         
11437 ol_link_tls=no
11438 if test $ol_with_tls != no ; then
11439         for ac_hdr in openssl/ssl.h ssl.h
11440 do
11441 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11442 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11443 echo "configure:11444: checking for $ac_hdr" >&5
11444 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11445   echo $ac_n "(cached) $ac_c" 1>&6
11446 else
11447   cat > conftest.$ac_ext <<EOF
11448 #line 11449 "configure"
11449 #include "confdefs.h"
11450 #include <$ac_hdr>
11451 EOF
11452 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11453 { (eval echo configure:11454: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11454 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11455 if test -z "$ac_err"; then
11456   rm -rf conftest*
11457   eval "ac_cv_header_$ac_safe=yes"
11458 else
11459   echo "$ac_err" >&5
11460   echo "configure: failed program was:" >&5
11461   cat conftest.$ac_ext >&5
11462   rm -rf conftest*
11463   eval "ac_cv_header_$ac_safe=no"
11464 fi
11465 rm -f conftest*
11466 fi
11467 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11468   echo "$ac_t""yes" 1>&6
11469     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11470   cat >> confdefs.h <<EOF
11471 #define $ac_tr_hdr 1
11472 EOF
11473  
11474 else
11475   echo "$ac_t""no" 1>&6
11476 fi
11477 done
11478
11479
11480         if test $ac_cv_header_openssl_ssl_h = yes \
11481                 -o $ac_cv_header_ssl_h = yes ; then
11482                 echo $ac_n "checking for SSLeay_add_ssl_algorithms in -lssl""... $ac_c" 1>&6
11483 echo "configure:11484: checking for SSLeay_add_ssl_algorithms in -lssl" >&5
11484 ac_lib_var=`echo ssl'_'SSLeay_add_ssl_algorithms | sed 'y%./+-:%__p__%'`
11485 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11486   echo $ac_n "(cached) $ac_c" 1>&6
11487 else
11488   ac_save_LIBS="$LIBS"
11489 LIBS="-lssl -lcrypto $LIBS"
11490 cat > conftest.$ac_ext <<EOF
11491 #line 11492 "configure"
11492 #include "confdefs.h"
11493 /* Override any gcc2 internal prototype to avoid an error.  */
11494 /* We use char because int might match the return type of a gcc2
11495     builtin and then its argument prototype would still apply.  */
11496 char SSLeay_add_ssl_algorithms();
11497
11498 int main() {
11499 SSLeay_add_ssl_algorithms()
11500 ; return 0; }
11501 EOF
11502 if { (eval echo configure:11503: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11503   rm -rf conftest*
11504   eval "ac_cv_lib_$ac_lib_var=yes"
11505 else
11506   echo "configure: failed program was:" >&5
11507   cat conftest.$ac_ext >&5
11508   rm -rf conftest*
11509   eval "ac_cv_lib_$ac_lib_var=no"
11510 fi
11511 rm -f conftest*
11512 LIBS="$ac_save_LIBS"
11513
11514 fi
11515 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11516   echo "$ac_t""yes" 1>&6
11517   have_ssleay=yes
11518                         need_rsaref=no
11519 else
11520   echo "$ac_t""no" 1>&6
11521 have_ssleay=no
11522 fi
11523
11524                         
11525                 if test $have_ssleay = no ; then
11526                         echo $ac_n "checking for SSL_library_init in -lssl""... $ac_c" 1>&6
11527 echo "configure:11528: checking for SSL_library_init in -lssl" >&5
11528 ac_lib_var=`echo ssl'_'SSL_library_init | sed 'y%./+-:%__p__%'`
11529 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11530   echo $ac_n "(cached) $ac_c" 1>&6
11531 else
11532   ac_save_LIBS="$LIBS"
11533 LIBS="-lssl -lcrypto $LIBS"
11534 cat > conftest.$ac_ext <<EOF
11535 #line 11536 "configure"
11536 #include "confdefs.h"
11537 /* Override any gcc2 internal prototype to avoid an error.  */
11538 /* We use char because int might match the return type of a gcc2
11539     builtin and then its argument prototype would still apply.  */
11540 char SSL_library_init();
11541
11542 int main() {
11543 SSL_library_init()
11544 ; return 0; }
11545 EOF
11546 if { (eval echo configure:11547: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11547   rm -rf conftest*
11548   eval "ac_cv_lib_$ac_lib_var=yes"
11549 else
11550   echo "configure: failed program was:" >&5
11551   cat conftest.$ac_ext >&5
11552   rm -rf conftest*
11553   eval "ac_cv_lib_$ac_lib_var=no"
11554 fi
11555 rm -f conftest*
11556 LIBS="$ac_save_LIBS"
11557
11558 fi
11559 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11560   echo "$ac_t""yes" 1>&6
11561   have_ssleay=yes
11562                                 need_rsaref=no
11563 else
11564   echo "$ac_t""no" 1>&6
11565 have_ssleay=no
11566 fi
11567
11568                 fi
11569
11570                 if test $have_ssleay = no ; then
11571                         echo $ac_n "checking for ssl3_accept in -lssl""... $ac_c" 1>&6
11572 echo "configure:11573: checking for ssl3_accept in -lssl" >&5
11573 ac_lib_var=`echo ssl'_'ssl3_accept | sed 'y%./+-:%__p__%'`
11574 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11575   echo $ac_n "(cached) $ac_c" 1>&6
11576 else
11577   ac_save_LIBS="$LIBS"
11578 LIBS="-lssl -lcrypto -lRSAglue -lrsaref $LIBS"
11579 cat > conftest.$ac_ext <<EOF
11580 #line 11581 "configure"
11581 #include "confdefs.h"
11582 /* Override any gcc2 internal prototype to avoid an error.  */
11583 /* We use char because int might match the return type of a gcc2
11584     builtin and then its argument prototype would still apply.  */
11585 char ssl3_accept();
11586
11587 int main() {
11588 ssl3_accept()
11589 ; return 0; }
11590 EOF
11591 if { (eval echo configure:11592: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11592   rm -rf conftest*
11593   eval "ac_cv_lib_$ac_lib_var=yes"
11594 else
11595   echo "configure: failed program was:" >&5
11596   cat conftest.$ac_ext >&5
11597   rm -rf conftest*
11598   eval "ac_cv_lib_$ac_lib_var=no"
11599 fi
11600 rm -f conftest*
11601 LIBS="$ac_save_LIBS"
11602
11603 fi
11604 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11605   echo "$ac_t""yes" 1>&6
11606   have_ssleay=yes
11607                                 need_rsaref=yes
11608 else
11609   echo "$ac_t""no" 1>&6
11610 have_ssleay=no
11611 fi
11612
11613                 fi
11614
11615                 if test $have_ssleay = yes ; then
11616                         ol_with_tls=found
11617                         ol_link_tls=yes
11618
11619                         cat >> confdefs.h <<\EOF
11620 #define HAVE_SSLEAY 1
11621 EOF
11622
11623
11624                         if test $need_rsaref = yes; then
11625                                 cat >> confdefs.h <<\EOF
11626 #define HAVE_RSAREF 1
11627 EOF
11628
11629
11630                                 TLS_LIBS="-lssl -lcrypto -lRSAglue -lrsaref"
11631                         else
11632                                 TLS_LIBS="-lssl -lcrypto"
11633                         fi
11634                 fi
11635                 echo $ac_n "checking OpenSSL library version (CRL checking capability)""... $ac_c" 1>&6
11636 echo "configure:11637: checking OpenSSL library version (CRL checking capability)" >&5
11637 if eval "test \"\${ol_cv_ssl_crl_compat+set}\" = set"; then
11638   echo $ac_n "(cached) $ac_c" 1>&6
11639 else
11640   
11641         cat > conftest.$ac_ext <<EOF
11642 #line 11643 "configure"
11643 #include "confdefs.h"
11644
11645 #ifdef HAVE_OPENSSL_SSL_H
11646 #include <openssl/ssl.h>
11647 #else
11648 #include <ssl.h>
11649 #endif
11650
11651 /* Require 0.9.7d+ */
11652 #if OPENSSL_VERSION_NUMBER >= 0x0090704fL
11653         char *__ssl_compat = "0.9.7d";
11654 #endif
11655         
11656 EOF
11657 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11658   egrep "__ssl_compat" >/dev/null 2>&1; then
11659   rm -rf conftest*
11660   ol_cv_ssl_crl_compat=yes
11661 else
11662   rm -rf conftest*
11663   ol_cv_ssl_crl_compat=no
11664 fi
11665 rm -f conftest*
11666
11667 fi
11668
11669 echo "$ac_t""$ol_cv_ssl_crl_compat" 1>&6
11670
11671                 if test $ol_cv_ssl_crl_compat = no ; then
11672                         ol_link_ssl=no
11673                 else 
11674                         cat >> confdefs.h <<\EOF
11675 #define HAVE_OPENSSL_CRL 1
11676 EOF
11677
11678                 fi
11679         fi
11680
11681 else
11682         echo "configure: warning: TLS data protection not supported!" 1>&2
11683 fi
11684
11685 WITH_TLS=no
11686 if test $ol_link_tls = yes ; then
11687         cat >> confdefs.h <<\EOF
11688 #define HAVE_TLS 1
11689 EOF
11690
11691         WITH_TLS=yes
11692
11693 elif test $ol_with_tls = auto ; then
11694         echo "configure: warning: Could not locate TLS/SSL package" 1>&2
11695         echo "configure: warning: TLS data protection not supported!" 1>&2
11696
11697 elif test $ol_with_tls != no ; then
11698         { echo "configure: error: Could not locate TLS/SSL package" 1>&2; exit 1; }
11699 fi
11700
11701 if test $ol_enable_lmpasswd != no; then
11702         if test $ol_link_tls != yes ; then
11703                 { echo "configure: error: LAN Manager passwords require OpenSSL" 1>&2; exit 1; }
11704         fi
11705
11706         cat >> confdefs.h <<\EOF
11707 #define SLAPD_LMHASH 1
11708 EOF
11709
11710 fi
11711
11712 ol_link_threads=no
11713
11714 if test $ol_with_threads = auto -o $ol_with_threads = yes \
11715         -o $ol_with_threads = nt ; then
11716
11717         
11718         echo $ac_n "checking for _beginthread""... $ac_c" 1>&6
11719 echo "configure:11720: checking for _beginthread" >&5
11720 if eval "test \"\${ac_cv_func__beginthread+set}\" = set"; then
11721   echo $ac_n "(cached) $ac_c" 1>&6
11722 else
11723   cat > conftest.$ac_ext <<EOF
11724 #line 11725 "configure"
11725 #include "confdefs.h"
11726 /* System header to define __stub macros and hopefully few prototypes,
11727     which can conflict with char _beginthread(); below.  */
11728 #include <assert.h>
11729 /* Override any gcc2 internal prototype to avoid an error.  */
11730 /* We use char because int might match the return type of a gcc2
11731     builtin and then its argument prototype would still apply.  */
11732 char _beginthread();
11733 char (*f)();
11734
11735 int main() {
11736
11737 /* The GNU C library defines this for functions which it implements
11738     to always fail with ENOSYS.  Some functions are actually named
11739     something starting with __ and the normal name is an alias.  */
11740 #if defined (__stub__beginthread) || defined (__stub____beginthread)
11741 choke me
11742 #else
11743 f = _beginthread;
11744 #endif
11745
11746 ; return 0; }
11747 EOF
11748 if { (eval echo configure:11749: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11749   rm -rf conftest*
11750   eval "ac_cv_func__beginthread=yes"
11751 else
11752   echo "configure: failed program was:" >&5
11753   cat conftest.$ac_ext >&5
11754   rm -rf conftest*
11755   eval "ac_cv_func__beginthread=no"
11756 fi
11757 rm -f conftest*
11758 fi
11759
11760 if eval "test \"`echo '$ac_cv_func_'_beginthread`\" = yes"; then
11761   echo "$ac_t""yes" 1>&6
11762   :
11763 else
11764   echo "$ac_t""no" 1>&6
11765 fi
11766
11767
11768         if test $ac_cv_func__beginthread = yes ; then
11769                 cat >> confdefs.h <<\EOF
11770 #define HAVE_NT_THREADS 1
11771 EOF
11772
11773                 ol_cv_nt_threads=yes
11774         fi
11775
11776
11777         if test "$ol_cv_nt_threads" = yes ; then
11778                 ol_link_threads=nt
11779                 ol_with_threads=found
11780                 ol_with_yielding_select=yes
11781
11782                 cat >> confdefs.h <<\EOF
11783 #define HAVE_NT_SERVICE_MANAGER 1
11784 EOF
11785
11786                 cat >> confdefs.h <<\EOF
11787 #define HAVE_NT_EVENT_LOG 1
11788 EOF
11789
11790         fi
11791
11792         if test $ol_with_threads = nt ; then
11793                 { echo "configure: error: could not locate NT Threads" 1>&2; exit 1; }
11794         fi
11795 fi
11796
11797 if test $ol_with_threads = auto -o $ol_with_threads = yes \
11798         -o $ol_with_threads = posix ; then
11799
11800         for ac_hdr in pthread.h
11801 do
11802 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11803 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11804 echo "configure:11805: checking for $ac_hdr" >&5
11805 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11806   echo $ac_n "(cached) $ac_c" 1>&6
11807 else
11808   cat > conftest.$ac_ext <<EOF
11809 #line 11810 "configure"
11810 #include "confdefs.h"
11811 #include <$ac_hdr>
11812 EOF
11813 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11814 { (eval echo configure:11815: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11815 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11816 if test -z "$ac_err"; then
11817   rm -rf conftest*
11818   eval "ac_cv_header_$ac_safe=yes"
11819 else
11820   echo "$ac_err" >&5
11821   echo "configure: failed program was:" >&5
11822   cat conftest.$ac_ext >&5
11823   rm -rf conftest*
11824   eval "ac_cv_header_$ac_safe=no"
11825 fi
11826 rm -f conftest*
11827 fi
11828 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11829   echo "$ac_t""yes" 1>&6
11830     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11831   cat >> confdefs.h <<EOF
11832 #define $ac_tr_hdr 1
11833 EOF
11834  
11835 else
11836   echo "$ac_t""no" 1>&6
11837 fi
11838 done
11839
11840
11841         if test $ac_cv_header_pthread_h = yes ; then
11842                 echo $ac_n "checking POSIX thread version""... $ac_c" 1>&6
11843 echo "configure:11844: checking POSIX thread version" >&5
11844 if eval "test \"\${ol_cv_pthread_version+set}\" = set"; then
11845   echo $ac_n "(cached) $ac_c" 1>&6
11846 else
11847   
11848         cat > conftest.$ac_ext <<EOF
11849 #line 11850 "configure"
11850 #include "confdefs.h"
11851
11852 #               include <pthread.h>
11853         
11854 int main() {
11855
11856                 int i = PTHREAD_CREATE_JOINABLE;
11857         
11858 ; return 0; }
11859 EOF
11860 if { (eval echo configure:11861: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11861   rm -rf conftest*
11862   
11863         cat > conftest.$ac_ext <<EOF
11864 #line 11865 "configure"
11865 #include "confdefs.h"
11866 #include <pthread.h>
11867 EOF
11868 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11869   egrep "pthread_detach" >/dev/null 2>&1; then
11870   rm -rf conftest*
11871   ol_cv_pthread_version=10
11872 else
11873   rm -rf conftest*
11874   ol_cv_pthread_version=8
11875 fi
11876 rm -f conftest*
11877
11878 else
11879   echo "configure: failed program was:" >&5
11880   cat conftest.$ac_ext >&5
11881   rm -rf conftest*
11882   
11883         cat > conftest.$ac_ext <<EOF
11884 #line 11885 "configure"
11885 #include "confdefs.h"
11886
11887 #               include <pthread.h>
11888 #               ifdef PTHREAD_CREATE_UNDETACHED
11889                 draft7
11890 #               endif
11891         
11892 EOF
11893 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11894   egrep "draft7" >/dev/null 2>&1; then
11895   rm -rf conftest*
11896   ol_cv_pthread_version=7
11897 else
11898   rm -rf conftest*
11899   
11900         cat > conftest.$ac_ext <<EOF
11901 #line 11902 "configure"
11902 #include "confdefs.h"
11903 #include <pthread.h>
11904 EOF
11905 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11906   egrep "pthread_attr_init" >/dev/null 2>&1; then
11907   rm -rf conftest*
11908   ol_cv_pthread_version=6
11909 else
11910   rm -rf conftest*
11911   
11912         cat > conftest.$ac_ext <<EOF
11913 #line 11914 "configure"
11914 #include "confdefs.h"
11915
11916 #               include <pthread.h>
11917 #ifdef          PTHREAD_MUTEX_INITIALIZER
11918                 draft5
11919 #endif
11920         
11921 EOF
11922 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11923   egrep "draft5" >/dev/null 2>&1; then
11924   rm -rf conftest*
11925   ol_cv_pthread_version=5
11926 else
11927   rm -rf conftest*
11928   ol_cv_pthread_version=4
11929 fi
11930 rm -f conftest*
11931  
11932 fi
11933 rm -f conftest*
11934  
11935 fi
11936 rm -f conftest*
11937  
11938 fi
11939 rm -f conftest*
11940
11941 fi
11942
11943 echo "$ac_t""$ol_cv_pthread_version" 1>&6
11944
11945
11946                 if test $ol_cv_pthread_version != 0 ; then
11947                         cat >> confdefs.h <<EOF
11948 #define HAVE_PTHREADS $ol_cv_pthread_version
11949 EOF
11950
11951                 else
11952                         { echo "configure: error: unknown pthread version" 1>&2; exit 1; }
11953                 fi
11954
11955                 # consider threads found
11956                 ol_with_threads=found
11957
11958                 
11959         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
11960 echo "configure:11961: checking for LinuxThreads pthread.h" >&5
11961 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
11962   echo $ac_n "(cached) $ac_c" 1>&6
11963 else
11964   cat > conftest.$ac_ext <<EOF
11965 #line 11966 "configure"
11966 #include "confdefs.h"
11967 #include <pthread.h>
11968 EOF
11969 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11970   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
11971   rm -rf conftest*
11972   ol_cv_header_linux_threads=yes
11973 else
11974   rm -rf conftest*
11975   ol_cv_header_linux_threads=no
11976 fi
11977 rm -f conftest*
11978
11979                 
11980 fi
11981
11982 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
11983         if test $ol_cv_header_linux_threads = yes; then
11984                 cat >> confdefs.h <<\EOF
11985 #define HAVE_LINUX_THREADS 1
11986 EOF
11987
11988         fi
11989
11990                 
11991         echo $ac_n "checking for GNU Pth pthread.h""... $ac_c" 1>&6
11992 echo "configure:11993: checking for GNU Pth pthread.h" >&5
11993 if eval "test \"\${ol_cv_header_gnu_pth_pthread_h+set}\" = set"; then
11994   echo $ac_n "(cached) $ac_c" 1>&6
11995 else
11996   cat > conftest.$ac_ext <<EOF
11997 #line 11998 "configure"
11998 #include "confdefs.h"
11999 #include <pthread.h>
12000 #ifdef _POSIX_THREAD_IS_GNU_PTH
12001         __gnu_pth__;
12002 #endif
12003
12004 EOF
12005 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12006   egrep "__gnu_pth__" >/dev/null 2>&1; then
12007   rm -rf conftest*
12008   ol_cv_header_gnu_pth_pthread_h=yes
12009 else
12010   rm -rf conftest*
12011   ol_cv_header_gnu_pth_pthread_h=no
12012 fi
12013 rm -f conftest*
12014
12015                 
12016 fi
12017
12018 echo "$ac_t""$ol_cv_header_gnu_pth_pthread_h" 1>&6
12019
12020
12021                 if test $ol_cv_header_gnu_pth_pthread_h = no ; then
12022                         for ac_hdr in sched.h
12023 do
12024 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12025 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12026 echo "configure:12027: checking for $ac_hdr" >&5
12027 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12028   echo $ac_n "(cached) $ac_c" 1>&6
12029 else
12030   cat > conftest.$ac_ext <<EOF
12031 #line 12032 "configure"
12032 #include "confdefs.h"
12033 #include <$ac_hdr>
12034 EOF
12035 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12036 { (eval echo configure:12037: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12037 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12038 if test -z "$ac_err"; then
12039   rm -rf conftest*
12040   eval "ac_cv_header_$ac_safe=yes"
12041 else
12042   echo "$ac_err" >&5
12043   echo "configure: failed program was:" >&5
12044   cat conftest.$ac_ext >&5
12045   rm -rf conftest*
12046   eval "ac_cv_header_$ac_safe=no"
12047 fi
12048 rm -f conftest*
12049 fi
12050 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12051   echo "$ac_t""yes" 1>&6
12052     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12053   cat >> confdefs.h <<EOF
12054 #define $ac_tr_hdr 1
12055 EOF
12056  
12057 else
12058   echo "$ac_t""no" 1>&6
12059 fi
12060 done
12061
12062                 fi
12063
12064                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
12065                                 echo $ac_n "checking for pthread_create in default libraries""... $ac_c" 1>&6
12066 echo "configure:12067: checking for pthread_create in default libraries" >&5
12067 if eval "test \"\${ol_cv_pthread_create+set}\" = set"; then
12068   echo $ac_n "(cached) $ac_c" 1>&6
12069 else
12070   
12071                 if test "$cross_compiling" = yes; then
12072   cat > conftest.$ac_ext <<EOF
12073 #line 12074 "configure"
12074 #include "confdefs.h"
12075 /* pthread test headers */
12076 #include <pthread.h>
12077 #if HAVE_PTHREADS < 7
12078 #include <errno.h>
12079 #endif
12080 #ifndef NULL
12081 #define NULL (void*)0
12082 #endif
12083
12084 static void *task(p)
12085         void *p;
12086 {
12087         return (void *) (p == NULL);
12088 }
12089
12090 int main() {
12091
12092         /* pthread test function */
12093 #ifndef PTHREAD_CREATE_DETACHED
12094 #define PTHREAD_CREATE_DETACHED 1
12095 #endif
12096         pthread_t t;
12097         int status;
12098         int detach = PTHREAD_CREATE_DETACHED;
12099
12100 #if HAVE_PTHREADS > 4
12101         /* Final pthreads */
12102         pthread_attr_t attr;
12103
12104         status = pthread_attr_init(&attr);
12105         if( status ) return status;
12106
12107 #if HAVE_PTHREADS < 7
12108         status = pthread_attr_setdetachstate(&attr, &detach);
12109         if( status < 0 ) status = errno;
12110 #else
12111         status = pthread_attr_setdetachstate(&attr, detach);
12112 #endif
12113         if( status ) return status;
12114         status = pthread_create( &t, &attr, task, NULL );
12115 #if HAVE_PTHREADS < 7
12116         if( status < 0 ) status = errno;
12117 #endif
12118         if( status ) return status;
12119 #else
12120         /* Draft 4 pthreads */
12121         status = pthread_create( &t, pthread_attr_default, task, NULL );
12122         if( status ) return errno;
12123
12124         /* give thread a chance to complete */
12125         /* it should remain joinable and hence detachable */
12126         sleep( 1 );
12127
12128         status = pthread_detach( &t );
12129         if( status ) return errno;
12130 #endif
12131
12132 #ifdef HAVE_LINUX_THREADS
12133         pthread_kill_other_threads_np();
12134 #endif
12135
12136         return 0;
12137
12138 ; return 0; }
12139 EOF
12140 if { (eval echo configure:12141: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12141   rm -rf conftest*
12142   ol_cv_pthread_create=yes
12143 else
12144   echo "configure: failed program was:" >&5
12145   cat conftest.$ac_ext >&5
12146   rm -rf conftest*
12147   ol_cv_pthread_create=no
12148 fi
12149 rm -f conftest*
12150 else
12151   cat > conftest.$ac_ext <<EOF
12152 #line 12153 "configure"
12153 #include "confdefs.h"
12154 /* pthread test headers */
12155 #include <pthread.h>
12156 #if HAVE_PTHREADS < 7
12157 #include <errno.h>
12158 #endif
12159 #ifndef NULL
12160 #define NULL (void*)0
12161 #endif
12162
12163 static void *task(p)
12164         void *p;
12165 {
12166         return (void *) (p == NULL);
12167 }
12168
12169
12170 int main(argc, argv)
12171         int argc;
12172         char **argv;
12173 {
12174
12175         /* pthread test function */
12176 #ifndef PTHREAD_CREATE_DETACHED
12177 #define PTHREAD_CREATE_DETACHED 1
12178 #endif
12179         pthread_t t;
12180         int status;
12181         int detach = PTHREAD_CREATE_DETACHED;
12182
12183 #if HAVE_PTHREADS > 4
12184         /* Final pthreads */
12185         pthread_attr_t attr;
12186
12187         status = pthread_attr_init(&attr);
12188         if( status ) return status;
12189
12190 #if HAVE_PTHREADS < 7
12191         status = pthread_attr_setdetachstate(&attr, &detach);
12192         if( status < 0 ) status = errno;
12193 #else
12194         status = pthread_attr_setdetachstate(&attr, detach);
12195 #endif
12196         if( status ) return status;
12197         status = pthread_create( &t, &attr, task, NULL );
12198 #if HAVE_PTHREADS < 7
12199         if( status < 0 ) status = errno;
12200 #endif
12201         if( status ) return status;
12202 #else
12203         /* Draft 4 pthreads */
12204         status = pthread_create( &t, pthread_attr_default, task, NULL );
12205         if( status ) return errno;
12206
12207         /* give thread a chance to complete */
12208         /* it should remain joinable and hence detachable */
12209         sleep( 1 );
12210
12211         status = pthread_detach( &t );
12212         if( status ) return errno;
12213 #endif
12214
12215 #ifdef HAVE_LINUX_THREADS
12216         pthread_kill_other_threads_np();
12217 #endif
12218
12219         return 0;
12220
12221 }
12222
12223 EOF
12224 if { (eval echo configure:12225: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
12225 then
12226   ol_cv_pthread_create=yes
12227 else
12228   echo "configure: failed program was:" >&5
12229   cat conftest.$ac_ext >&5
12230   rm -fr conftest*
12231   ol_cv_pthread_create=no
12232 fi
12233 rm -fr conftest*
12234 fi
12235
12236 fi
12237
12238 echo "$ac_t""$ol_cv_pthread_create" 1>&6
12239
12240                 if test $ol_cv_pthread_create != no ; then
12241                         ol_link_threads=posix
12242                         ol_link_pthreads=""
12243                 fi
12244                 
12245                 # Pthread try link: -kthread (ol_cv_pthread_kthread)
12246 if test "$ol_link_threads" = no ; then
12247         # try -kthread
12248         echo $ac_n "checking for pthread link with -kthread""... $ac_c" 1>&6
12249 echo "configure:12250: checking for pthread link with -kthread" >&5
12250 if eval "test \"\${ol_cv_pthread_kthread+set}\" = set"; then
12251   echo $ac_n "(cached) $ac_c" 1>&6
12252 else
12253   
12254                 # save the flags
12255                 ol_LIBS="$LIBS"
12256                 LIBS="-kthread $LIBS"
12257
12258                 if test "$cross_compiling" = yes; then
12259   cat > conftest.$ac_ext <<EOF
12260 #line 12261 "configure"
12261 #include "confdefs.h"
12262 /* pthread test headers */
12263 #include <pthread.h>
12264 #if HAVE_PTHREADS < 7
12265 #include <errno.h>
12266 #endif
12267 #ifndef NULL
12268 #define NULL (void*)0
12269 #endif
12270
12271 static void *task(p)
12272         void *p;
12273 {
12274         return (void *) (p == NULL);
12275 }
12276
12277 int main() {
12278
12279         /* pthread test function */
12280 #ifndef PTHREAD_CREATE_DETACHED
12281 #define PTHREAD_CREATE_DETACHED 1
12282 #endif
12283         pthread_t t;
12284         int status;
12285         int detach = PTHREAD_CREATE_DETACHED;
12286
12287 #if HAVE_PTHREADS > 4
12288         /* Final pthreads */
12289         pthread_attr_t attr;
12290
12291         status = pthread_attr_init(&attr);
12292         if( status ) return status;
12293
12294 #if HAVE_PTHREADS < 7
12295         status = pthread_attr_setdetachstate(&attr, &detach);
12296         if( status < 0 ) status = errno;
12297 #else
12298         status = pthread_attr_setdetachstate(&attr, detach);
12299 #endif
12300         if( status ) return status;
12301         status = pthread_create( &t, &attr, task, NULL );
12302 #if HAVE_PTHREADS < 7
12303         if( status < 0 ) status = errno;
12304 #endif
12305         if( status ) return status;
12306 #else
12307         /* Draft 4 pthreads */
12308         status = pthread_create( &t, pthread_attr_default, task, NULL );
12309         if( status ) return errno;
12310
12311         /* give thread a chance to complete */
12312         /* it should remain joinable and hence detachable */
12313         sleep( 1 );
12314
12315         status = pthread_detach( &t );
12316         if( status ) return errno;
12317 #endif
12318
12319 #ifdef HAVE_LINUX_THREADS
12320         pthread_kill_other_threads_np();
12321 #endif
12322
12323         return 0;
12324
12325 ; return 0; }
12326 EOF
12327 if { (eval echo configure:12328: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12328   rm -rf conftest*
12329   ol_cv_pthread_kthread=yes
12330 else
12331   echo "configure: failed program was:" >&5
12332   cat conftest.$ac_ext >&5
12333   rm -rf conftest*
12334   ol_cv_pthread_kthread=no
12335 fi
12336 rm -f conftest*
12337 else
12338   cat > conftest.$ac_ext <<EOF
12339 #line 12340 "configure"
12340 #include "confdefs.h"
12341 /* pthread test headers */
12342 #include <pthread.h>
12343 #if HAVE_PTHREADS < 7
12344 #include <errno.h>
12345 #endif
12346 #ifndef NULL
12347 #define NULL (void*)0
12348 #endif
12349
12350 static void *task(p)
12351         void *p;
12352 {
12353         return (void *) (p == NULL);
12354 }
12355
12356
12357 int main(argc, argv)
12358         int argc;
12359         char **argv;
12360 {
12361
12362         /* pthread test function */
12363 #ifndef PTHREAD_CREATE_DETACHED
12364 #define PTHREAD_CREATE_DETACHED 1
12365 #endif
12366         pthread_t t;
12367         int status;
12368         int detach = PTHREAD_CREATE_DETACHED;
12369
12370 #if HAVE_PTHREADS > 4
12371         /* Final pthreads */
12372         pthread_attr_t attr;
12373
12374         status = pthread_attr_init(&attr);
12375         if( status ) return status;
12376
12377 #if HAVE_PTHREADS < 7
12378         status = pthread_attr_setdetachstate(&attr, &detach);
12379         if( status < 0 ) status = errno;
12380 #else
12381         status = pthread_attr_setdetachstate(&attr, detach);
12382 #endif
12383         if( status ) return status;
12384         status = pthread_create( &t, &attr, task, NULL );
12385 #if HAVE_PTHREADS < 7
12386         if( status < 0 ) status = errno;
12387 #endif
12388         if( status ) return status;
12389 #else
12390         /* Draft 4 pthreads */
12391         status = pthread_create( &t, pthread_attr_default, task, NULL );
12392         if( status ) return errno;
12393
12394         /* give thread a chance to complete */
12395         /* it should remain joinable and hence detachable */
12396         sleep( 1 );
12397
12398         status = pthread_detach( &t );
12399         if( status ) return errno;
12400 #endif
12401
12402 #ifdef HAVE_LINUX_THREADS
12403         pthread_kill_other_threads_np();
12404 #endif
12405
12406         return 0;
12407
12408 }
12409
12410 EOF
12411 if { (eval echo configure:12412: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
12412 then
12413   ol_cv_pthread_kthread=yes
12414 else
12415   echo "configure: failed program was:" >&5
12416   cat conftest.$ac_ext >&5
12417   rm -fr conftest*
12418   ol_cv_pthread_kthread=no
12419 fi
12420 rm -fr conftest*
12421 fi
12422
12423
12424                 # restore the LIBS
12425                 LIBS="$ol_LIBS"
12426         
12427 fi
12428
12429 echo "$ac_t""$ol_cv_pthread_kthread" 1>&6
12430
12431         if test $ol_cv_pthread_kthread = yes ; then
12432                 ol_link_pthreads="-kthread"
12433                 ol_link_threads=posix
12434         fi
12435 fi
12436
12437                 # Pthread try link: -pthread (ol_cv_pthread_pthread)
12438 if test "$ol_link_threads" = no ; then
12439         # try -pthread
12440         echo $ac_n "checking for pthread link with -pthread""... $ac_c" 1>&6
12441 echo "configure:12442: checking for pthread link with -pthread" >&5
12442 if eval "test \"\${ol_cv_pthread_pthread+set}\" = set"; then
12443   echo $ac_n "(cached) $ac_c" 1>&6
12444 else
12445   
12446                 # save the flags
12447                 ol_LIBS="$LIBS"
12448                 LIBS="-pthread $LIBS"
12449
12450                 if test "$cross_compiling" = yes; then
12451   cat > conftest.$ac_ext <<EOF
12452 #line 12453 "configure"
12453 #include "confdefs.h"
12454 /* pthread test headers */
12455 #include <pthread.h>
12456 #if HAVE_PTHREADS < 7
12457 #include <errno.h>
12458 #endif
12459 #ifndef NULL
12460 #define NULL (void*)0
12461 #endif
12462
12463 static void *task(p)
12464         void *p;
12465 {
12466         return (void *) (p == NULL);
12467 }
12468
12469 int main() {
12470
12471         /* pthread test function */
12472 #ifndef PTHREAD_CREATE_DETACHED
12473 #define PTHREAD_CREATE_DETACHED 1
12474 #endif
12475         pthread_t t;
12476         int status;
12477         int detach = PTHREAD_CREATE_DETACHED;
12478
12479 #if HAVE_PTHREADS > 4
12480         /* Final pthreads */
12481         pthread_attr_t attr;
12482
12483         status = pthread_attr_init(&attr);
12484         if( status ) return status;
12485
12486 #if HAVE_PTHREADS < 7
12487         status = pthread_attr_setdetachstate(&attr, &detach);
12488         if( status < 0 ) status = errno;
12489 #else
12490         status = pthread_attr_setdetachstate(&attr, detach);
12491 #endif
12492         if( status ) return status;
12493         status = pthread_create( &t, &attr, task, NULL );
12494 #if HAVE_PTHREADS < 7
12495         if( status < 0 ) status = errno;
12496 #endif
12497         if( status ) return status;
12498 #else
12499         /* Draft 4 pthreads */
12500         status = pthread_create( &t, pthread_attr_default, task, NULL );
12501         if( status ) return errno;
12502
12503         /* give thread a chance to complete */
12504         /* it should remain joinable and hence detachable */
12505         sleep( 1 );
12506
12507         status = pthread_detach( &t );
12508         if( status ) return errno;
12509 #endif
12510
12511 #ifdef HAVE_LINUX_THREADS
12512         pthread_kill_other_threads_np();
12513 #endif
12514
12515         return 0;
12516
12517 ; return 0; }
12518 EOF
12519 if { (eval echo configure:12520: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12520   rm -rf conftest*
12521   ol_cv_pthread_pthread=yes
12522 else
12523   echo "configure: failed program was:" >&5
12524   cat conftest.$ac_ext >&5
12525   rm -rf conftest*
12526   ol_cv_pthread_pthread=no
12527 fi
12528 rm -f conftest*
12529 else
12530   cat > conftest.$ac_ext <<EOF
12531 #line 12532 "configure"
12532 #include "confdefs.h"
12533 /* pthread test headers */
12534 #include <pthread.h>
12535 #if HAVE_PTHREADS < 7
12536 #include <errno.h>
12537 #endif
12538 #ifndef NULL
12539 #define NULL (void*)0
12540 #endif
12541
12542 static void *task(p)
12543         void *p;
12544 {
12545         return (void *) (p == NULL);
12546 }
12547
12548
12549 int main(argc, argv)
12550         int argc;
12551         char **argv;
12552 {
12553
12554         /* pthread test function */
12555 #ifndef PTHREAD_CREATE_DETACHED
12556 #define PTHREAD_CREATE_DETACHED 1
12557 #endif
12558         pthread_t t;
12559         int status;
12560         int detach = PTHREAD_CREATE_DETACHED;
12561
12562 #if HAVE_PTHREADS > 4
12563         /* Final pthreads */
12564         pthread_attr_t attr;
12565
12566         status = pthread_attr_init(&attr);
12567         if( status ) return status;
12568
12569 #if HAVE_PTHREADS < 7
12570         status = pthread_attr_setdetachstate(&attr, &detach);
12571         if( status < 0 ) status = errno;
12572 #else
12573         status = pthread_attr_setdetachstate(&attr, detach);
12574 #endif
12575         if( status ) return status;
12576         status = pthread_create( &t, &attr, task, NULL );
12577 #if HAVE_PTHREADS < 7
12578         if( status < 0 ) status = errno;
12579 #endif
12580         if( status ) return status;
12581 #else
12582         /* Draft 4 pthreads */
12583         status = pthread_create( &t, pthread_attr_default, task, NULL );
12584         if( status ) return errno;
12585
12586         /* give thread a chance to complete */
12587         /* it should remain joinable and hence detachable */
12588         sleep( 1 );
12589
12590         status = pthread_detach( &t );
12591         if( status ) return errno;
12592 #endif
12593
12594 #ifdef HAVE_LINUX_THREADS
12595         pthread_kill_other_threads_np();
12596 #endif
12597
12598         return 0;
12599
12600 }
12601
12602 EOF
12603 if { (eval echo configure:12604: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
12604 then
12605   ol_cv_pthread_pthread=yes
12606 else
12607   echo "configure: failed program was:" >&5
12608   cat conftest.$ac_ext >&5
12609   rm -fr conftest*
12610   ol_cv_pthread_pthread=no
12611 fi
12612 rm -fr conftest*
12613 fi
12614
12615
12616                 # restore the LIBS
12617                 LIBS="$ol_LIBS"
12618         
12619 fi
12620
12621 echo "$ac_t""$ol_cv_pthread_pthread" 1>&6
12622
12623         if test $ol_cv_pthread_pthread = yes ; then
12624                 ol_link_pthreads="-pthread"
12625                 ol_link_threads=posix
12626         fi
12627 fi
12628
12629                 # Pthread try link: -pthreads (ol_cv_pthread_pthreads)
12630 if test "$ol_link_threads" = no ; then
12631         # try -pthreads
12632         echo $ac_n "checking for pthread link with -pthreads""... $ac_c" 1>&6
12633 echo "configure:12634: checking for pthread link with -pthreads" >&5
12634 if eval "test \"\${ol_cv_pthread_pthreads+set}\" = set"; then
12635   echo $ac_n "(cached) $ac_c" 1>&6
12636 else
12637   
12638                 # save the flags
12639                 ol_LIBS="$LIBS"
12640                 LIBS="-pthreads $LIBS"
12641
12642                 if test "$cross_compiling" = yes; then
12643   cat > conftest.$ac_ext <<EOF
12644 #line 12645 "configure"
12645 #include "confdefs.h"
12646 /* pthread test headers */
12647 #include <pthread.h>
12648 #if HAVE_PTHREADS < 7
12649 #include <errno.h>
12650 #endif
12651 #ifndef NULL
12652 #define NULL (void*)0
12653 #endif
12654
12655 static void *task(p)
12656         void *p;
12657 {
12658         return (void *) (p == NULL);
12659 }
12660
12661 int main() {
12662
12663         /* pthread test function */
12664 #ifndef PTHREAD_CREATE_DETACHED
12665 #define PTHREAD_CREATE_DETACHED 1
12666 #endif
12667         pthread_t t;
12668         int status;
12669         int detach = PTHREAD_CREATE_DETACHED;
12670
12671 #if HAVE_PTHREADS > 4
12672         /* Final pthreads */
12673         pthread_attr_t attr;
12674
12675         status = pthread_attr_init(&attr);
12676         if( status ) return status;
12677
12678 #if HAVE_PTHREADS < 7
12679         status = pthread_attr_setdetachstate(&attr, &detach);
12680         if( status < 0 ) status = errno;
12681 #else
12682         status = pthread_attr_setdetachstate(&attr, detach);
12683 #endif
12684         if( status ) return status;
12685         status = pthread_create( &t, &attr, task, NULL );
12686 #if HAVE_PTHREADS < 7
12687         if( status < 0 ) status = errno;
12688 #endif
12689         if( status ) return status;
12690 #else
12691         /* Draft 4 pthreads */
12692         status = pthread_create( &t, pthread_attr_default, task, NULL );
12693         if( status ) return errno;
12694
12695         /* give thread a chance to complete */
12696         /* it should remain joinable and hence detachable */
12697         sleep( 1 );
12698
12699         status = pthread_detach( &t );
12700         if( status ) return errno;
12701 #endif
12702
12703 #ifdef HAVE_LINUX_THREADS
12704         pthread_kill_other_threads_np();
12705 #endif
12706
12707         return 0;
12708
12709 ; return 0; }
12710 EOF
12711 if { (eval echo configure:12712: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12712   rm -rf conftest*
12713   ol_cv_pthread_pthreads=yes
12714 else
12715   echo "configure: failed program was:" >&5
12716   cat conftest.$ac_ext >&5
12717   rm -rf conftest*
12718   ol_cv_pthread_pthreads=no
12719 fi
12720 rm -f conftest*
12721 else
12722   cat > conftest.$ac_ext <<EOF
12723 #line 12724 "configure"
12724 #include "confdefs.h"
12725 /* pthread test headers */
12726 #include <pthread.h>
12727 #if HAVE_PTHREADS < 7
12728 #include <errno.h>
12729 #endif
12730 #ifndef NULL
12731 #define NULL (void*)0
12732 #endif
12733
12734 static void *task(p)
12735         void *p;
12736 {
12737         return (void *) (p == NULL);
12738 }
12739
12740
12741 int main(argc, argv)
12742         int argc;
12743         char **argv;
12744 {
12745
12746         /* pthread test function */
12747 #ifndef PTHREAD_CREATE_DETACHED
12748 #define PTHREAD_CREATE_DETACHED 1
12749 #endif
12750         pthread_t t;
12751         int status;
12752         int detach = PTHREAD_CREATE_DETACHED;
12753
12754 #if HAVE_PTHREADS > 4
12755         /* Final pthreads */
12756         pthread_attr_t attr;
12757
12758         status = pthread_attr_init(&attr);
12759         if( status ) return status;
12760
12761 #if HAVE_PTHREADS < 7
12762         status = pthread_attr_setdetachstate(&attr, &detach);
12763         if( status < 0 ) status = errno;
12764 #else
12765         status = pthread_attr_setdetachstate(&attr, detach);
12766 #endif
12767         if( status ) return status;
12768         status = pthread_create( &t, &attr, task, NULL );
12769 #if HAVE_PTHREADS < 7
12770         if( status < 0 ) status = errno;
12771 #endif
12772         if( status ) return status;
12773 #else
12774         /* Draft 4 pthreads */
12775         status = pthread_create( &t, pthread_attr_default, task, NULL );
12776         if( status ) return errno;
12777
12778         /* give thread a chance to complete */
12779         /* it should remain joinable and hence detachable */
12780         sleep( 1 );
12781
12782         status = pthread_detach( &t );
12783         if( status ) return errno;
12784 #endif
12785
12786 #ifdef HAVE_LINUX_THREADS
12787         pthread_kill_other_threads_np();
12788 #endif
12789
12790         return 0;
12791
12792 }
12793
12794 EOF
12795 if { (eval echo configure:12796: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
12796 then
12797   ol_cv_pthread_pthreads=yes
12798 else
12799   echo "configure: failed program was:" >&5
12800   cat conftest.$ac_ext >&5
12801   rm -fr conftest*
12802   ol_cv_pthread_pthreads=no
12803 fi
12804 rm -fr conftest*
12805 fi
12806
12807
12808                 # restore the LIBS
12809                 LIBS="$ol_LIBS"
12810         
12811 fi
12812
12813 echo "$ac_t""$ol_cv_pthread_pthreads" 1>&6
12814
12815         if test $ol_cv_pthread_pthreads = yes ; then
12816                 ol_link_pthreads="-pthreads"
12817                 ol_link_threads=posix
12818         fi
12819 fi
12820
12821                 # Pthread try link: -mthreads (ol_cv_pthread_mthreads)
12822 if test "$ol_link_threads" = no ; then
12823         # try -mthreads
12824         echo $ac_n "checking for pthread link with -mthreads""... $ac_c" 1>&6
12825 echo "configure:12826: checking for pthread link with -mthreads" >&5
12826 if eval "test \"\${ol_cv_pthread_mthreads+set}\" = set"; then
12827   echo $ac_n "(cached) $ac_c" 1>&6
12828 else
12829   
12830                 # save the flags
12831                 ol_LIBS="$LIBS"
12832                 LIBS="-mthreads $LIBS"
12833
12834                 if test "$cross_compiling" = yes; then
12835   cat > conftest.$ac_ext <<EOF
12836 #line 12837 "configure"
12837 #include "confdefs.h"
12838 /* pthread test headers */
12839 #include <pthread.h>
12840 #if HAVE_PTHREADS < 7
12841 #include <errno.h>
12842 #endif
12843 #ifndef NULL
12844 #define NULL (void*)0
12845 #endif
12846
12847 static void *task(p)
12848         void *p;
12849 {
12850         return (void *) (p == NULL);
12851 }
12852
12853 int main() {
12854
12855         /* pthread test function */
12856 #ifndef PTHREAD_CREATE_DETACHED
12857 #define PTHREAD_CREATE_DETACHED 1
12858 #endif
12859         pthread_t t;
12860         int status;
12861         int detach = PTHREAD_CREATE_DETACHED;
12862
12863 #if HAVE_PTHREADS > 4
12864         /* Final pthreads */
12865         pthread_attr_t attr;
12866
12867         status = pthread_attr_init(&attr);
12868         if( status ) return status;
12869
12870 #if HAVE_PTHREADS < 7
12871         status = pthread_attr_setdetachstate(&attr, &detach);
12872         if( status < 0 ) status = errno;
12873 #else
12874         status = pthread_attr_setdetachstate(&attr, detach);
12875 #endif
12876         if( status ) return status;
12877         status = pthread_create( &t, &attr, task, NULL );
12878 #if HAVE_PTHREADS < 7
12879         if( status < 0 ) status = errno;
12880 #endif
12881         if( status ) return status;
12882 #else
12883         /* Draft 4 pthreads */
12884         status = pthread_create( &t, pthread_attr_default, task, NULL );
12885         if( status ) return errno;
12886
12887         /* give thread a chance to complete */
12888         /* it should remain joinable and hence detachable */
12889         sleep( 1 );
12890
12891         status = pthread_detach( &t );
12892         if( status ) return errno;
12893 #endif
12894
12895 #ifdef HAVE_LINUX_THREADS
12896         pthread_kill_other_threads_np();
12897 #endif
12898
12899         return 0;
12900
12901 ; return 0; }
12902 EOF
12903 if { (eval echo configure:12904: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12904   rm -rf conftest*
12905   ol_cv_pthread_mthreads=yes
12906 else
12907   echo "configure: failed program was:" >&5
12908   cat conftest.$ac_ext >&5
12909   rm -rf conftest*
12910   ol_cv_pthread_mthreads=no
12911 fi
12912 rm -f conftest*
12913 else
12914   cat > conftest.$ac_ext <<EOF
12915 #line 12916 "configure"
12916 #include "confdefs.h"
12917 /* pthread test headers */
12918 #include <pthread.h>
12919 #if HAVE_PTHREADS < 7
12920 #include <errno.h>
12921 #endif
12922 #ifndef NULL
12923 #define NULL (void*)0
12924 #endif
12925
12926 static void *task(p)
12927         void *p;
12928 {
12929         return (void *) (p == NULL);
12930 }
12931
12932
12933 int main(argc, argv)
12934         int argc;
12935         char **argv;
12936 {
12937
12938         /* pthread test function */
12939 #ifndef PTHREAD_CREATE_DETACHED
12940 #define PTHREAD_CREATE_DETACHED 1
12941 #endif
12942         pthread_t t;
12943         int status;
12944         int detach = PTHREAD_CREATE_DETACHED;
12945
12946 #if HAVE_PTHREADS > 4
12947         /* Final pthreads */
12948         pthread_attr_t attr;
12949
12950         status = pthread_attr_init(&attr);
12951         if( status ) return status;
12952
12953 #if HAVE_PTHREADS < 7
12954         status = pthread_attr_setdetachstate(&attr, &detach);
12955         if( status < 0 ) status = errno;
12956 #else
12957         status = pthread_attr_setdetachstate(&attr, detach);
12958 #endif
12959         if( status ) return status;
12960         status = pthread_create( &t, &attr, task, NULL );
12961 #if HAVE_PTHREADS < 7
12962         if( status < 0 ) status = errno;
12963 #endif
12964         if( status ) return status;
12965 #else
12966         /* Draft 4 pthreads */
12967         status = pthread_create( &t, pthread_attr_default, task, NULL );
12968         if( status ) return errno;
12969
12970         /* give thread a chance to complete */
12971         /* it should remain joinable and hence detachable */
12972         sleep( 1 );
12973
12974         status = pthread_detach( &t );
12975         if( status ) return errno;
12976 #endif
12977
12978 #ifdef HAVE_LINUX_THREADS
12979         pthread_kill_other_threads_np();
12980 #endif
12981
12982         return 0;
12983
12984 }
12985
12986 EOF
12987 if { (eval echo configure:12988: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
12988 then
12989   ol_cv_pthread_mthreads=yes
12990 else
12991   echo "configure: failed program was:" >&5
12992   cat conftest.$ac_ext >&5
12993   rm -fr conftest*
12994   ol_cv_pthread_mthreads=no
12995 fi
12996 rm -fr conftest*
12997 fi
12998
12999
13000                 # restore the LIBS
13001                 LIBS="$ol_LIBS"
13002         
13003 fi
13004
13005 echo "$ac_t""$ol_cv_pthread_mthreads" 1>&6
13006
13007         if test $ol_cv_pthread_mthreads = yes ; then
13008                 ol_link_pthreads="-mthreads"
13009                 ol_link_threads=posix
13010         fi
13011 fi
13012
13013                 # Pthread try link: -thread (ol_cv_pthread_thread)
13014 if test "$ol_link_threads" = no ; then
13015         # try -thread
13016         echo $ac_n "checking for pthread link with -thread""... $ac_c" 1>&6
13017 echo "configure:13018: checking for pthread link with -thread" >&5
13018 if eval "test \"\${ol_cv_pthread_thread+set}\" = set"; then
13019   echo $ac_n "(cached) $ac_c" 1>&6
13020 else
13021   
13022                 # save the flags
13023                 ol_LIBS="$LIBS"
13024                 LIBS="-thread $LIBS"
13025
13026                 if test "$cross_compiling" = yes; then
13027   cat > conftest.$ac_ext <<EOF
13028 #line 13029 "configure"
13029 #include "confdefs.h"
13030 /* pthread test headers */
13031 #include <pthread.h>
13032 #if HAVE_PTHREADS < 7
13033 #include <errno.h>
13034 #endif
13035 #ifndef NULL
13036 #define NULL (void*)0
13037 #endif
13038
13039 static void *task(p)
13040         void *p;
13041 {
13042         return (void *) (p == NULL);
13043 }
13044
13045 int main() {
13046
13047         /* pthread test function */
13048 #ifndef PTHREAD_CREATE_DETACHED
13049 #define PTHREAD_CREATE_DETACHED 1
13050 #endif
13051         pthread_t t;
13052         int status;
13053         int detach = PTHREAD_CREATE_DETACHED;
13054
13055 #if HAVE_PTHREADS > 4
13056         /* Final pthreads */
13057         pthread_attr_t attr;
13058
13059         status = pthread_attr_init(&attr);
13060         if( status ) return status;
13061
13062 #if HAVE_PTHREADS < 7
13063         status = pthread_attr_setdetachstate(&attr, &detach);
13064         if( status < 0 ) status = errno;
13065 #else
13066         status = pthread_attr_setdetachstate(&attr, detach);
13067 #endif
13068         if( status ) return status;
13069         status = pthread_create( &t, &attr, task, NULL );
13070 #if HAVE_PTHREADS < 7
13071         if( status < 0 ) status = errno;
13072 #endif
13073         if( status ) return status;
13074 #else
13075         /* Draft 4 pthreads */
13076         status = pthread_create( &t, pthread_attr_default, task, NULL );
13077         if( status ) return errno;
13078
13079         /* give thread a chance to complete */
13080         /* it should remain joinable and hence detachable */
13081         sleep( 1 );
13082
13083         status = pthread_detach( &t );
13084         if( status ) return errno;
13085 #endif
13086
13087 #ifdef HAVE_LINUX_THREADS
13088         pthread_kill_other_threads_np();
13089 #endif
13090
13091         return 0;
13092
13093 ; return 0; }
13094 EOF
13095 if { (eval echo configure:13096: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13096   rm -rf conftest*
13097   ol_cv_pthread_thread=yes
13098 else
13099   echo "configure: failed program was:" >&5
13100   cat conftest.$ac_ext >&5
13101   rm -rf conftest*
13102   ol_cv_pthread_thread=no
13103 fi
13104 rm -f conftest*
13105 else
13106   cat > conftest.$ac_ext <<EOF
13107 #line 13108 "configure"
13108 #include "confdefs.h"
13109 /* pthread test headers */
13110 #include <pthread.h>
13111 #if HAVE_PTHREADS < 7
13112 #include <errno.h>
13113 #endif
13114 #ifndef NULL
13115 #define NULL (void*)0
13116 #endif
13117
13118 static void *task(p)
13119         void *p;
13120 {
13121         return (void *) (p == NULL);
13122 }
13123
13124
13125 int main(argc, argv)
13126         int argc;
13127         char **argv;
13128 {
13129
13130         /* pthread test function */
13131 #ifndef PTHREAD_CREATE_DETACHED
13132 #define PTHREAD_CREATE_DETACHED 1
13133 #endif
13134         pthread_t t;
13135         int status;
13136         int detach = PTHREAD_CREATE_DETACHED;
13137
13138 #if HAVE_PTHREADS > 4
13139         /* Final pthreads */
13140         pthread_attr_t attr;
13141
13142         status = pthread_attr_init(&attr);
13143         if( status ) return status;
13144
13145 #if HAVE_PTHREADS < 7
13146         status = pthread_attr_setdetachstate(&attr, &detach);
13147         if( status < 0 ) status = errno;
13148 #else
13149         status = pthread_attr_setdetachstate(&attr, detach);
13150 #endif
13151         if( status ) return status;
13152         status = pthread_create( &t, &attr, task, NULL );
13153 #if HAVE_PTHREADS < 7
13154         if( status < 0 ) status = errno;
13155 #endif
13156         if( status ) return status;
13157 #else
13158         /* Draft 4 pthreads */
13159         status = pthread_create( &t, pthread_attr_default, task, NULL );
13160         if( status ) return errno;
13161
13162         /* give thread a chance to complete */
13163         /* it should remain joinable and hence detachable */
13164         sleep( 1 );
13165
13166         status = pthread_detach( &t );
13167         if( status ) return errno;
13168 #endif
13169
13170 #ifdef HAVE_LINUX_THREADS
13171         pthread_kill_other_threads_np();
13172 #endif
13173
13174         return 0;
13175
13176 }
13177
13178 EOF
13179 if { (eval echo configure:13180: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
13180 then
13181   ol_cv_pthread_thread=yes
13182 else
13183   echo "configure: failed program was:" >&5
13184   cat conftest.$ac_ext >&5
13185   rm -fr conftest*
13186   ol_cv_pthread_thread=no
13187 fi
13188 rm -fr conftest*
13189 fi
13190
13191
13192                 # restore the LIBS
13193                 LIBS="$ol_LIBS"
13194         
13195 fi
13196
13197 echo "$ac_t""$ol_cv_pthread_thread" 1>&6
13198
13199         if test $ol_cv_pthread_thread = yes ; then
13200                 ol_link_pthreads="-thread"
13201                 ol_link_threads=posix
13202         fi
13203 fi
13204
13205
13206                 # Pthread try link: -lpthread -lmach -lexc -lc_r (ol_cv_pthread_lpthread_lmach_lexc_lc_r)
13207 if test "$ol_link_threads" = no ; then
13208         # try -lpthread -lmach -lexc -lc_r
13209         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc -lc_r""... $ac_c" 1>&6
13210 echo "configure:13211: checking for pthread link with -lpthread -lmach -lexc -lc_r" >&5
13211 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc_lc_r+set}\" = set"; then
13212   echo $ac_n "(cached) $ac_c" 1>&6
13213 else
13214   
13215                 # save the flags
13216                 ol_LIBS="$LIBS"
13217                 LIBS="-lpthread -lmach -lexc -lc_r $LIBS"
13218
13219                 if test "$cross_compiling" = yes; then
13220   cat > conftest.$ac_ext <<EOF
13221 #line 13222 "configure"
13222 #include "confdefs.h"
13223 /* pthread test headers */
13224 #include <pthread.h>
13225 #if HAVE_PTHREADS < 7
13226 #include <errno.h>
13227 #endif
13228 #ifndef NULL
13229 #define NULL (void*)0
13230 #endif
13231
13232 static void *task(p)
13233         void *p;
13234 {
13235         return (void *) (p == NULL);
13236 }
13237
13238 int main() {
13239
13240         /* pthread test function */
13241 #ifndef PTHREAD_CREATE_DETACHED
13242 #define PTHREAD_CREATE_DETACHED 1
13243 #endif
13244         pthread_t t;
13245         int status;
13246         int detach = PTHREAD_CREATE_DETACHED;
13247
13248 #if HAVE_PTHREADS > 4
13249         /* Final pthreads */
13250         pthread_attr_t attr;
13251
13252         status = pthread_attr_init(&attr);
13253         if( status ) return status;
13254
13255 #if HAVE_PTHREADS < 7
13256         status = pthread_attr_setdetachstate(&attr, &detach);
13257         if( status < 0 ) status = errno;
13258 #else
13259         status = pthread_attr_setdetachstate(&attr, detach);
13260 #endif
13261         if( status ) return status;
13262         status = pthread_create( &t, &attr, task, NULL );
13263 #if HAVE_PTHREADS < 7
13264         if( status < 0 ) status = errno;
13265 #endif
13266         if( status ) return status;
13267 #else
13268         /* Draft 4 pthreads */
13269         status = pthread_create( &t, pthread_attr_default, task, NULL );
13270         if( status ) return errno;
13271
13272         /* give thread a chance to complete */
13273         /* it should remain joinable and hence detachable */
13274         sleep( 1 );
13275
13276         status = pthread_detach( &t );
13277         if( status ) return errno;
13278 #endif
13279
13280 #ifdef HAVE_LINUX_THREADS
13281         pthread_kill_other_threads_np();
13282 #endif
13283
13284         return 0;
13285
13286 ; return 0; }
13287 EOF
13288 if { (eval echo configure:13289: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13289   rm -rf conftest*
13290   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
13291 else
13292   echo "configure: failed program was:" >&5
13293   cat conftest.$ac_ext >&5
13294   rm -rf conftest*
13295   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
13296 fi
13297 rm -f conftest*
13298 else
13299   cat > conftest.$ac_ext <<EOF
13300 #line 13301 "configure"
13301 #include "confdefs.h"
13302 /* pthread test headers */
13303 #include <pthread.h>
13304 #if HAVE_PTHREADS < 7
13305 #include <errno.h>
13306 #endif
13307 #ifndef NULL
13308 #define NULL (void*)0
13309 #endif
13310
13311 static void *task(p)
13312         void *p;
13313 {
13314         return (void *) (p == NULL);
13315 }
13316
13317
13318 int main(argc, argv)
13319         int argc;
13320         char **argv;
13321 {
13322
13323         /* pthread test function */
13324 #ifndef PTHREAD_CREATE_DETACHED
13325 #define PTHREAD_CREATE_DETACHED 1
13326 #endif
13327         pthread_t t;
13328         int status;
13329         int detach = PTHREAD_CREATE_DETACHED;
13330
13331 #if HAVE_PTHREADS > 4
13332         /* Final pthreads */
13333         pthread_attr_t attr;
13334
13335         status = pthread_attr_init(&attr);
13336         if( status ) return status;
13337
13338 #if HAVE_PTHREADS < 7
13339         status = pthread_attr_setdetachstate(&attr, &detach);
13340         if( status < 0 ) status = errno;
13341 #else
13342         status = pthread_attr_setdetachstate(&attr, detach);
13343 #endif
13344         if( status ) return status;
13345         status = pthread_create( &t, &attr, task, NULL );
13346 #if HAVE_PTHREADS < 7
13347         if( status < 0 ) status = errno;
13348 #endif
13349         if( status ) return status;
13350 #else
13351         /* Draft 4 pthreads */
13352         status = pthread_create( &t, pthread_attr_default, task, NULL );
13353         if( status ) return errno;
13354
13355         /* give thread a chance to complete */
13356         /* it should remain joinable and hence detachable */
13357         sleep( 1 );
13358
13359         status = pthread_detach( &t );
13360         if( status ) return errno;
13361 #endif
13362
13363 #ifdef HAVE_LINUX_THREADS
13364         pthread_kill_other_threads_np();
13365 #endif
13366
13367         return 0;
13368
13369 }
13370
13371 EOF
13372 if { (eval echo configure:13373: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
13373 then
13374   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
13375 else
13376   echo "configure: failed program was:" >&5
13377   cat conftest.$ac_ext >&5
13378   rm -fr conftest*
13379   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
13380 fi
13381 rm -fr conftest*
13382 fi
13383
13384
13385                 # restore the LIBS
13386                 LIBS="$ol_LIBS"
13387         
13388 fi
13389
13390 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc_lc_r" 1>&6
13391
13392         if test $ol_cv_pthread_lpthread_lmach_lexc_lc_r = yes ; then
13393                 ol_link_pthreads="-lpthread -lmach -lexc -lc_r"
13394                 ol_link_threads=posix
13395         fi
13396 fi
13397
13398                 # Pthread try link: -lpthread -lmach -lexc (ol_cv_pthread_lpthread_lmach_lexc)
13399 if test "$ol_link_threads" = no ; then
13400         # try -lpthread -lmach -lexc
13401         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc""... $ac_c" 1>&6
13402 echo "configure:13403: checking for pthread link with -lpthread -lmach -lexc" >&5
13403 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc+set}\" = set"; then
13404   echo $ac_n "(cached) $ac_c" 1>&6
13405 else
13406   
13407                 # save the flags
13408                 ol_LIBS="$LIBS"
13409                 LIBS="-lpthread -lmach -lexc $LIBS"
13410
13411                 if test "$cross_compiling" = yes; then
13412   cat > conftest.$ac_ext <<EOF
13413 #line 13414 "configure"
13414 #include "confdefs.h"
13415 /* pthread test headers */
13416 #include <pthread.h>
13417 #if HAVE_PTHREADS < 7
13418 #include <errno.h>
13419 #endif
13420 #ifndef NULL
13421 #define NULL (void*)0
13422 #endif
13423
13424 static void *task(p)
13425         void *p;
13426 {
13427         return (void *) (p == NULL);
13428 }
13429
13430 int main() {
13431
13432         /* pthread test function */
13433 #ifndef PTHREAD_CREATE_DETACHED
13434 #define PTHREAD_CREATE_DETACHED 1
13435 #endif
13436         pthread_t t;
13437         int status;
13438         int detach = PTHREAD_CREATE_DETACHED;
13439
13440 #if HAVE_PTHREADS > 4
13441         /* Final pthreads */
13442         pthread_attr_t attr;
13443
13444         status = pthread_attr_init(&attr);
13445         if( status ) return status;
13446
13447 #if HAVE_PTHREADS < 7
13448         status = pthread_attr_setdetachstate(&attr, &detach);
13449         if( status < 0 ) status = errno;
13450 #else
13451         status = pthread_attr_setdetachstate(&attr, detach);
13452 #endif
13453         if( status ) return status;
13454         status = pthread_create( &t, &attr, task, NULL );
13455 #if HAVE_PTHREADS < 7
13456         if( status < 0 ) status = errno;
13457 #endif
13458         if( status ) return status;
13459 #else
13460         /* Draft 4 pthreads */
13461         status = pthread_create( &t, pthread_attr_default, task, NULL );
13462         if( status ) return errno;
13463
13464         /* give thread a chance to complete */
13465         /* it should remain joinable and hence detachable */
13466         sleep( 1 );
13467
13468         status = pthread_detach( &t );
13469         if( status ) return errno;
13470 #endif
13471
13472 #ifdef HAVE_LINUX_THREADS
13473         pthread_kill_other_threads_np();
13474 #endif
13475
13476         return 0;
13477
13478 ; return 0; }
13479 EOF
13480 if { (eval echo configure:13481: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13481   rm -rf conftest*
13482   ol_cv_pthread_lpthread_lmach_lexc=yes
13483 else
13484   echo "configure: failed program was:" >&5
13485   cat conftest.$ac_ext >&5
13486   rm -rf conftest*
13487   ol_cv_pthread_lpthread_lmach_lexc=no
13488 fi
13489 rm -f conftest*
13490 else
13491   cat > conftest.$ac_ext <<EOF
13492 #line 13493 "configure"
13493 #include "confdefs.h"
13494 /* pthread test headers */
13495 #include <pthread.h>
13496 #if HAVE_PTHREADS < 7
13497 #include <errno.h>
13498 #endif
13499 #ifndef NULL
13500 #define NULL (void*)0
13501 #endif
13502
13503 static void *task(p)
13504         void *p;
13505 {
13506         return (void *) (p == NULL);
13507 }
13508
13509
13510 int main(argc, argv)
13511         int argc;
13512         char **argv;
13513 {
13514
13515         /* pthread test function */
13516 #ifndef PTHREAD_CREATE_DETACHED
13517 #define PTHREAD_CREATE_DETACHED 1
13518 #endif
13519         pthread_t t;
13520         int status;
13521         int detach = PTHREAD_CREATE_DETACHED;
13522
13523 #if HAVE_PTHREADS > 4
13524         /* Final pthreads */
13525         pthread_attr_t attr;
13526
13527         status = pthread_attr_init(&attr);
13528         if( status ) return status;
13529
13530 #if HAVE_PTHREADS < 7
13531         status = pthread_attr_setdetachstate(&attr, &detach);
13532         if( status < 0 ) status = errno;
13533 #else
13534         status = pthread_attr_setdetachstate(&attr, detach);
13535 #endif
13536         if( status ) return status;
13537         status = pthread_create( &t, &attr, task, NULL );
13538 #if HAVE_PTHREADS < 7
13539         if( status < 0 ) status = errno;
13540 #endif
13541         if( status ) return status;
13542 #else
13543         /* Draft 4 pthreads */
13544         status = pthread_create( &t, pthread_attr_default, task, NULL );
13545         if( status ) return errno;
13546
13547         /* give thread a chance to complete */
13548         /* it should remain joinable and hence detachable */
13549         sleep( 1 );
13550
13551         status = pthread_detach( &t );
13552         if( status ) return errno;
13553 #endif
13554
13555 #ifdef HAVE_LINUX_THREADS
13556         pthread_kill_other_threads_np();
13557 #endif
13558
13559         return 0;
13560
13561 }
13562
13563 EOF
13564 if { (eval echo configure:13565: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
13565 then
13566   ol_cv_pthread_lpthread_lmach_lexc=yes
13567 else
13568   echo "configure: failed program was:" >&5
13569   cat conftest.$ac_ext >&5
13570   rm -fr conftest*
13571   ol_cv_pthread_lpthread_lmach_lexc=no
13572 fi
13573 rm -fr conftest*
13574 fi
13575
13576
13577                 # restore the LIBS
13578                 LIBS="$ol_LIBS"
13579         
13580 fi
13581
13582 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc" 1>&6
13583
13584         if test $ol_cv_pthread_lpthread_lmach_lexc = yes ; then
13585                 ol_link_pthreads="-lpthread -lmach -lexc"
13586                 ol_link_threads=posix
13587         fi
13588 fi
13589
13590
13591                 # Pthread try link: -lpthread -Wl,-woff,85 (ol_cv_pthread_lib_lpthread_woff)
13592 if test "$ol_link_threads" = no ; then
13593         # try -lpthread -Wl,-woff,85
13594         echo $ac_n "checking for pthread link with -lpthread -Wl,-woff,85""... $ac_c" 1>&6
13595 echo "configure:13596: checking for pthread link with -lpthread -Wl,-woff,85" >&5
13596 if eval "test \"\${ol_cv_pthread_lib_lpthread_woff+set}\" = set"; then
13597   echo $ac_n "(cached) $ac_c" 1>&6
13598 else
13599   
13600                 # save the flags
13601                 ol_LIBS="$LIBS"
13602                 LIBS="-lpthread -Wl,-woff,85 $LIBS"
13603
13604                 if test "$cross_compiling" = yes; then
13605   cat > conftest.$ac_ext <<EOF
13606 #line 13607 "configure"
13607 #include "confdefs.h"
13608 /* pthread test headers */
13609 #include <pthread.h>
13610 #if HAVE_PTHREADS < 7
13611 #include <errno.h>
13612 #endif
13613 #ifndef NULL
13614 #define NULL (void*)0
13615 #endif
13616
13617 static void *task(p)
13618         void *p;
13619 {
13620         return (void *) (p == NULL);
13621 }
13622
13623 int main() {
13624
13625         /* pthread test function */
13626 #ifndef PTHREAD_CREATE_DETACHED
13627 #define PTHREAD_CREATE_DETACHED 1
13628 #endif
13629         pthread_t t;
13630         int status;
13631         int detach = PTHREAD_CREATE_DETACHED;
13632
13633 #if HAVE_PTHREADS > 4
13634         /* Final pthreads */
13635         pthread_attr_t attr;
13636
13637         status = pthread_attr_init(&attr);
13638         if( status ) return status;
13639
13640 #if HAVE_PTHREADS < 7
13641         status = pthread_attr_setdetachstate(&attr, &detach);
13642         if( status < 0 ) status = errno;
13643 #else
13644         status = pthread_attr_setdetachstate(&attr, detach);
13645 #endif
13646         if( status ) return status;
13647         status = pthread_create( &t, &attr, task, NULL );
13648 #if HAVE_PTHREADS < 7
13649         if( status < 0 ) status = errno;
13650 #endif
13651         if( status ) return status;
13652 #else
13653         /* Draft 4 pthreads */
13654         status = pthread_create( &t, pthread_attr_default, task, NULL );
13655         if( status ) return errno;
13656
13657         /* give thread a chance to complete */
13658         /* it should remain joinable and hence detachable */
13659         sleep( 1 );
13660
13661         status = pthread_detach( &t );
13662         if( status ) return errno;
13663 #endif
13664
13665 #ifdef HAVE_LINUX_THREADS
13666         pthread_kill_other_threads_np();
13667 #endif
13668
13669         return 0;
13670
13671 ; return 0; }
13672 EOF
13673 if { (eval echo configure:13674: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13674   rm -rf conftest*
13675   ol_cv_pthread_lib_lpthread_woff=yes
13676 else
13677   echo "configure: failed program was:" >&5
13678   cat conftest.$ac_ext >&5
13679   rm -rf conftest*
13680   ol_cv_pthread_lib_lpthread_woff=no
13681 fi
13682 rm -f conftest*
13683 else
13684   cat > conftest.$ac_ext <<EOF
13685 #line 13686 "configure"
13686 #include "confdefs.h"
13687 /* pthread test headers */
13688 #include <pthread.h>
13689 #if HAVE_PTHREADS < 7
13690 #include <errno.h>
13691 #endif
13692 #ifndef NULL
13693 #define NULL (void*)0
13694 #endif
13695
13696 static void *task(p)
13697         void *p;
13698 {
13699         return (void *) (p == NULL);
13700 }
13701
13702
13703 int main(argc, argv)
13704         int argc;
13705         char **argv;
13706 {
13707
13708         /* pthread test function */
13709 #ifndef PTHREAD_CREATE_DETACHED
13710 #define PTHREAD_CREATE_DETACHED 1
13711 #endif
13712         pthread_t t;
13713         int status;
13714         int detach = PTHREAD_CREATE_DETACHED;
13715
13716 #if HAVE_PTHREADS > 4
13717         /* Final pthreads */
13718         pthread_attr_t attr;
13719
13720         status = pthread_attr_init(&attr);
13721         if( status ) return status;
13722
13723 #if HAVE_PTHREADS < 7
13724         status = pthread_attr_setdetachstate(&attr, &detach);
13725         if( status < 0 ) status = errno;
13726 #else
13727         status = pthread_attr_setdetachstate(&attr, detach);
13728 #endif
13729         if( status ) return status;
13730         status = pthread_create( &t, &attr, task, NULL );
13731 #if HAVE_PTHREADS < 7
13732         if( status < 0 ) status = errno;
13733 #endif
13734         if( status ) return status;
13735 #else
13736         /* Draft 4 pthreads */
13737         status = pthread_create( &t, pthread_attr_default, task, NULL );
13738         if( status ) return errno;
13739
13740         /* give thread a chance to complete */
13741         /* it should remain joinable and hence detachable */
13742         sleep( 1 );
13743
13744         status = pthread_detach( &t );
13745         if( status ) return errno;
13746 #endif
13747
13748 #ifdef HAVE_LINUX_THREADS
13749         pthread_kill_other_threads_np();
13750 #endif
13751
13752         return 0;
13753
13754 }
13755
13756 EOF
13757 if { (eval echo configure:13758: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
13758 then
13759   ol_cv_pthread_lib_lpthread_woff=yes
13760 else
13761   echo "configure: failed program was:" >&5
13762   cat conftest.$ac_ext >&5
13763   rm -fr conftest*
13764   ol_cv_pthread_lib_lpthread_woff=no
13765 fi
13766 rm -fr conftest*
13767 fi
13768
13769
13770                 # restore the LIBS
13771                 LIBS="$ol_LIBS"
13772         
13773 fi
13774
13775 echo "$ac_t""$ol_cv_pthread_lib_lpthread_woff" 1>&6
13776
13777         if test $ol_cv_pthread_lib_lpthread_woff = yes ; then
13778                 ol_link_pthreads="-lpthread -Wl,-woff,85"
13779                 ol_link_threads=posix
13780         fi
13781 fi
13782
13783
13784                 # Pthread try link: -lpthread (ol_cv_pthread_lpthread)
13785 if test "$ol_link_threads" = no ; then
13786         # try -lpthread
13787         echo $ac_n "checking for pthread link with -lpthread""... $ac_c" 1>&6
13788 echo "configure:13789: checking for pthread link with -lpthread" >&5
13789 if eval "test \"\${ol_cv_pthread_lpthread+set}\" = set"; then
13790   echo $ac_n "(cached) $ac_c" 1>&6
13791 else
13792   
13793                 # save the flags
13794                 ol_LIBS="$LIBS"
13795                 LIBS="-lpthread $LIBS"
13796
13797                 if test "$cross_compiling" = yes; then
13798   cat > conftest.$ac_ext <<EOF
13799 #line 13800 "configure"
13800 #include "confdefs.h"
13801 /* pthread test headers */
13802 #include <pthread.h>
13803 #if HAVE_PTHREADS < 7
13804 #include <errno.h>
13805 #endif
13806 #ifndef NULL
13807 #define NULL (void*)0
13808 #endif
13809
13810 static void *task(p)
13811         void *p;
13812 {
13813         return (void *) (p == NULL);
13814 }
13815
13816 int main() {
13817
13818         /* pthread test function */
13819 #ifndef PTHREAD_CREATE_DETACHED
13820 #define PTHREAD_CREATE_DETACHED 1
13821 #endif
13822         pthread_t t;
13823         int status;
13824         int detach = PTHREAD_CREATE_DETACHED;
13825
13826 #if HAVE_PTHREADS > 4
13827         /* Final pthreads */
13828         pthread_attr_t attr;
13829
13830         status = pthread_attr_init(&attr);
13831         if( status ) return status;
13832
13833 #if HAVE_PTHREADS < 7
13834         status = pthread_attr_setdetachstate(&attr, &detach);
13835         if( status < 0 ) status = errno;
13836 #else
13837         status = pthread_attr_setdetachstate(&attr, detach);
13838 #endif
13839         if( status ) return status;
13840         status = pthread_create( &t, &attr, task, NULL );
13841 #if HAVE_PTHREADS < 7
13842         if( status < 0 ) status = errno;
13843 #endif
13844         if( status ) return status;
13845 #else
13846         /* Draft 4 pthreads */
13847         status = pthread_create( &t, pthread_attr_default, task, NULL );
13848         if( status ) return errno;
13849
13850         /* give thread a chance to complete */
13851         /* it should remain joinable and hence detachable */
13852         sleep( 1 );
13853
13854         status = pthread_detach( &t );
13855         if( status ) return errno;
13856 #endif
13857
13858 #ifdef HAVE_LINUX_THREADS
13859         pthread_kill_other_threads_np();
13860 #endif
13861
13862         return 0;
13863
13864 ; return 0; }
13865 EOF
13866 if { (eval echo configure:13867: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13867   rm -rf conftest*
13868   ol_cv_pthread_lpthread=yes
13869 else
13870   echo "configure: failed program was:" >&5
13871   cat conftest.$ac_ext >&5
13872   rm -rf conftest*
13873   ol_cv_pthread_lpthread=no
13874 fi
13875 rm -f conftest*
13876 else
13877   cat > conftest.$ac_ext <<EOF
13878 #line 13879 "configure"
13879 #include "confdefs.h"
13880 /* pthread test headers */
13881 #include <pthread.h>
13882 #if HAVE_PTHREADS < 7
13883 #include <errno.h>
13884 #endif
13885 #ifndef NULL
13886 #define NULL (void*)0
13887 #endif
13888
13889 static void *task(p)
13890         void *p;
13891 {
13892         return (void *) (p == NULL);
13893 }
13894
13895
13896 int main(argc, argv)
13897         int argc;
13898         char **argv;
13899 {
13900
13901         /* pthread test function */
13902 #ifndef PTHREAD_CREATE_DETACHED
13903 #define PTHREAD_CREATE_DETACHED 1
13904 #endif
13905         pthread_t t;
13906         int status;
13907         int detach = PTHREAD_CREATE_DETACHED;
13908
13909 #if HAVE_PTHREADS > 4
13910         /* Final pthreads */
13911         pthread_attr_t attr;
13912
13913         status = pthread_attr_init(&attr);
13914         if( status ) return status;
13915
13916 #if HAVE_PTHREADS < 7
13917         status = pthread_attr_setdetachstate(&attr, &detach);
13918         if( status < 0 ) status = errno;
13919 #else
13920         status = pthread_attr_setdetachstate(&attr, detach);
13921 #endif
13922         if( status ) return status;
13923         status = pthread_create( &t, &attr, task, NULL );
13924 #if HAVE_PTHREADS < 7
13925         if( status < 0 ) status = errno;
13926 #endif
13927         if( status ) return status;
13928 #else
13929         /* Draft 4 pthreads */
13930         status = pthread_create( &t, pthread_attr_default, task, NULL );
13931         if( status ) return errno;
13932
13933         /* give thread a chance to complete */
13934         /* it should remain joinable and hence detachable */
13935         sleep( 1 );
13936
13937         status = pthread_detach( &t );
13938         if( status ) return errno;
13939 #endif
13940
13941 #ifdef HAVE_LINUX_THREADS
13942         pthread_kill_other_threads_np();
13943 #endif
13944
13945         return 0;
13946
13947 }
13948
13949 EOF
13950 if { (eval echo configure:13951: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
13951 then
13952   ol_cv_pthread_lpthread=yes
13953 else
13954   echo "configure: failed program was:" >&5
13955   cat conftest.$ac_ext >&5
13956   rm -fr conftest*
13957   ol_cv_pthread_lpthread=no
13958 fi
13959 rm -fr conftest*
13960 fi
13961
13962
13963                 # restore the LIBS
13964                 LIBS="$ol_LIBS"
13965         
13966 fi
13967
13968 echo "$ac_t""$ol_cv_pthread_lpthread" 1>&6
13969
13970         if test $ol_cv_pthread_lpthread = yes ; then
13971                 ol_link_pthreads="-lpthread"
13972                 ol_link_threads=posix
13973         fi
13974 fi
13975
13976                 # Pthread try link: -lc_r (ol_cv_pthread_lc_r)
13977 if test "$ol_link_threads" = no ; then
13978         # try -lc_r
13979         echo $ac_n "checking for pthread link with -lc_r""... $ac_c" 1>&6
13980 echo "configure:13981: checking for pthread link with -lc_r" >&5
13981 if eval "test \"\${ol_cv_pthread_lc_r+set}\" = set"; then
13982   echo $ac_n "(cached) $ac_c" 1>&6
13983 else
13984   
13985                 # save the flags
13986                 ol_LIBS="$LIBS"
13987                 LIBS="-lc_r $LIBS"
13988
13989                 if test "$cross_compiling" = yes; then
13990   cat > conftest.$ac_ext <<EOF
13991 #line 13992 "configure"
13992 #include "confdefs.h"
13993 /* pthread test headers */
13994 #include <pthread.h>
13995 #if HAVE_PTHREADS < 7
13996 #include <errno.h>
13997 #endif
13998 #ifndef NULL
13999 #define NULL (void*)0
14000 #endif
14001
14002 static void *task(p)
14003         void *p;
14004 {
14005         return (void *) (p == NULL);
14006 }
14007
14008 int main() {
14009
14010         /* pthread test function */
14011 #ifndef PTHREAD_CREATE_DETACHED
14012 #define PTHREAD_CREATE_DETACHED 1
14013 #endif
14014         pthread_t t;
14015         int status;
14016         int detach = PTHREAD_CREATE_DETACHED;
14017
14018 #if HAVE_PTHREADS > 4
14019         /* Final pthreads */
14020         pthread_attr_t attr;
14021
14022         status = pthread_attr_init(&attr);
14023         if( status ) return status;
14024
14025 #if HAVE_PTHREADS < 7
14026         status = pthread_attr_setdetachstate(&attr, &detach);
14027         if( status < 0 ) status = errno;
14028 #else
14029         status = pthread_attr_setdetachstate(&attr, detach);
14030 #endif
14031         if( status ) return status;
14032         status = pthread_create( &t, &attr, task, NULL );
14033 #if HAVE_PTHREADS < 7
14034         if( status < 0 ) status = errno;
14035 #endif
14036         if( status ) return status;
14037 #else
14038         /* Draft 4 pthreads */
14039         status = pthread_create( &t, pthread_attr_default, task, NULL );
14040         if( status ) return errno;
14041
14042         /* give thread a chance to complete */
14043         /* it should remain joinable and hence detachable */
14044         sleep( 1 );
14045
14046         status = pthread_detach( &t );
14047         if( status ) return errno;
14048 #endif
14049
14050 #ifdef HAVE_LINUX_THREADS
14051         pthread_kill_other_threads_np();
14052 #endif
14053
14054         return 0;
14055
14056 ; return 0; }
14057 EOF
14058 if { (eval echo configure:14059: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14059   rm -rf conftest*
14060   ol_cv_pthread_lc_r=yes
14061 else
14062   echo "configure: failed program was:" >&5
14063   cat conftest.$ac_ext >&5
14064   rm -rf conftest*
14065   ol_cv_pthread_lc_r=no
14066 fi
14067 rm -f conftest*
14068 else
14069   cat > conftest.$ac_ext <<EOF
14070 #line 14071 "configure"
14071 #include "confdefs.h"
14072 /* pthread test headers */
14073 #include <pthread.h>
14074 #if HAVE_PTHREADS < 7
14075 #include <errno.h>
14076 #endif
14077 #ifndef NULL
14078 #define NULL (void*)0
14079 #endif
14080
14081 static void *task(p)
14082         void *p;
14083 {
14084         return (void *) (p == NULL);
14085 }
14086
14087
14088 int main(argc, argv)
14089         int argc;
14090         char **argv;
14091 {
14092
14093         /* pthread test function */
14094 #ifndef PTHREAD_CREATE_DETACHED
14095 #define PTHREAD_CREATE_DETACHED 1
14096 #endif
14097         pthread_t t;
14098         int status;
14099         int detach = PTHREAD_CREATE_DETACHED;
14100
14101 #if HAVE_PTHREADS > 4
14102         /* Final pthreads */
14103         pthread_attr_t attr;
14104
14105         status = pthread_attr_init(&attr);
14106         if( status ) return status;
14107
14108 #if HAVE_PTHREADS < 7
14109         status = pthread_attr_setdetachstate(&attr, &detach);
14110         if( status < 0 ) status = errno;
14111 #else
14112         status = pthread_attr_setdetachstate(&attr, detach);
14113 #endif
14114         if( status ) return status;
14115         status = pthread_create( &t, &attr, task, NULL );
14116 #if HAVE_PTHREADS < 7
14117         if( status < 0 ) status = errno;
14118 #endif
14119         if( status ) return status;
14120 #else
14121         /* Draft 4 pthreads */
14122         status = pthread_create( &t, pthread_attr_default, task, NULL );
14123         if( status ) return errno;
14124
14125         /* give thread a chance to complete */
14126         /* it should remain joinable and hence detachable */
14127         sleep( 1 );
14128
14129         status = pthread_detach( &t );
14130         if( status ) return errno;
14131 #endif
14132
14133 #ifdef HAVE_LINUX_THREADS
14134         pthread_kill_other_threads_np();
14135 #endif
14136
14137         return 0;
14138
14139 }
14140
14141 EOF
14142 if { (eval echo configure:14143: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
14143 then
14144   ol_cv_pthread_lc_r=yes
14145 else
14146   echo "configure: failed program was:" >&5
14147   cat conftest.$ac_ext >&5
14148   rm -fr conftest*
14149   ol_cv_pthread_lc_r=no
14150 fi
14151 rm -fr conftest*
14152 fi
14153
14154
14155                 # restore the LIBS
14156                 LIBS="$ol_LIBS"
14157         
14158 fi
14159
14160 echo "$ac_t""$ol_cv_pthread_lc_r" 1>&6
14161
14162         if test $ol_cv_pthread_lc_r = yes ; then
14163                 ol_link_pthreads="-lc_r"
14164                 ol_link_threads=posix
14165         fi
14166 fi
14167
14168
14169                 # Pthread try link: -threads (ol_cv_pthread_threads)
14170 if test "$ol_link_threads" = no ; then
14171         # try -threads
14172         echo $ac_n "checking for pthread link with -threads""... $ac_c" 1>&6
14173 echo "configure:14174: checking for pthread link with -threads" >&5
14174 if eval "test \"\${ol_cv_pthread_threads+set}\" = set"; then
14175   echo $ac_n "(cached) $ac_c" 1>&6
14176 else
14177   
14178                 # save the flags
14179                 ol_LIBS="$LIBS"
14180                 LIBS="-threads $LIBS"
14181
14182                 if test "$cross_compiling" = yes; then
14183   cat > conftest.$ac_ext <<EOF
14184 #line 14185 "configure"
14185 #include "confdefs.h"
14186 /* pthread test headers */
14187 #include <pthread.h>
14188 #if HAVE_PTHREADS < 7
14189 #include <errno.h>
14190 #endif
14191 #ifndef NULL
14192 #define NULL (void*)0
14193 #endif
14194
14195 static void *task(p)
14196         void *p;
14197 {
14198         return (void *) (p == NULL);
14199 }
14200
14201 int main() {
14202
14203         /* pthread test function */
14204 #ifndef PTHREAD_CREATE_DETACHED
14205 #define PTHREAD_CREATE_DETACHED 1
14206 #endif
14207         pthread_t t;
14208         int status;
14209         int detach = PTHREAD_CREATE_DETACHED;
14210
14211 #if HAVE_PTHREADS > 4
14212         /* Final pthreads */
14213         pthread_attr_t attr;
14214
14215         status = pthread_attr_init(&attr);
14216         if( status ) return status;
14217
14218 #if HAVE_PTHREADS < 7
14219         status = pthread_attr_setdetachstate(&attr, &detach);
14220         if( status < 0 ) status = errno;
14221 #else
14222         status = pthread_attr_setdetachstate(&attr, detach);
14223 #endif
14224         if( status ) return status;
14225         status = pthread_create( &t, &attr, task, NULL );
14226 #if HAVE_PTHREADS < 7
14227         if( status < 0 ) status = errno;
14228 #endif
14229         if( status ) return status;
14230 #else
14231         /* Draft 4 pthreads */
14232         status = pthread_create( &t, pthread_attr_default, task, NULL );
14233         if( status ) return errno;
14234
14235         /* give thread a chance to complete */
14236         /* it should remain joinable and hence detachable */
14237         sleep( 1 );
14238
14239         status = pthread_detach( &t );
14240         if( status ) return errno;
14241 #endif
14242
14243 #ifdef HAVE_LINUX_THREADS
14244         pthread_kill_other_threads_np();
14245 #endif
14246
14247         return 0;
14248
14249 ; return 0; }
14250 EOF
14251 if { (eval echo configure:14252: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14252   rm -rf conftest*
14253   ol_cv_pthread_threads=yes
14254 else
14255   echo "configure: failed program was:" >&5
14256   cat conftest.$ac_ext >&5
14257   rm -rf conftest*
14258   ol_cv_pthread_threads=no
14259 fi
14260 rm -f conftest*
14261 else
14262   cat > conftest.$ac_ext <<EOF
14263 #line 14264 "configure"
14264 #include "confdefs.h"
14265 /* pthread test headers */
14266 #include <pthread.h>
14267 #if HAVE_PTHREADS < 7
14268 #include <errno.h>
14269 #endif
14270 #ifndef NULL
14271 #define NULL (void*)0
14272 #endif
14273
14274 static void *task(p)
14275         void *p;
14276 {
14277         return (void *) (p == NULL);
14278 }
14279
14280
14281 int main(argc, argv)
14282         int argc;
14283         char **argv;
14284 {
14285
14286         /* pthread test function */
14287 #ifndef PTHREAD_CREATE_DETACHED
14288 #define PTHREAD_CREATE_DETACHED 1
14289 #endif
14290         pthread_t t;
14291         int status;
14292         int detach = PTHREAD_CREATE_DETACHED;
14293
14294 #if HAVE_PTHREADS > 4
14295         /* Final pthreads */
14296         pthread_attr_t attr;
14297
14298         status = pthread_attr_init(&attr);
14299         if( status ) return status;
14300
14301 #if HAVE_PTHREADS < 7
14302         status = pthread_attr_setdetachstate(&attr, &detach);
14303         if( status < 0 ) status = errno;
14304 #else
14305         status = pthread_attr_setdetachstate(&attr, detach);
14306 #endif
14307         if( status ) return status;
14308         status = pthread_create( &t, &attr, task, NULL );
14309 #if HAVE_PTHREADS < 7
14310         if( status < 0 ) status = errno;
14311 #endif
14312         if( status ) return status;
14313 #else
14314         /* Draft 4 pthreads */
14315         status = pthread_create( &t, pthread_attr_default, task, NULL );
14316         if( status ) return errno;
14317
14318         /* give thread a chance to complete */
14319         /* it should remain joinable and hence detachable */
14320         sleep( 1 );
14321
14322         status = pthread_detach( &t );
14323         if( status ) return errno;
14324 #endif
14325
14326 #ifdef HAVE_LINUX_THREADS
14327         pthread_kill_other_threads_np();
14328 #endif
14329
14330         return 0;
14331
14332 }
14333
14334 EOF
14335 if { (eval echo configure:14336: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
14336 then
14337   ol_cv_pthread_threads=yes
14338 else
14339   echo "configure: failed program was:" >&5
14340   cat conftest.$ac_ext >&5
14341   rm -fr conftest*
14342   ol_cv_pthread_threads=no
14343 fi
14344 rm -fr conftest*
14345 fi
14346
14347
14348                 # restore the LIBS
14349                 LIBS="$ol_LIBS"
14350         
14351 fi
14352
14353 echo "$ac_t""$ol_cv_pthread_threads" 1>&6
14354
14355         if test $ol_cv_pthread_threads = yes ; then
14356                 ol_link_pthreads="-threads"
14357                 ol_link_threads=posix
14358         fi
14359 fi
14360
14361
14362                 # Pthread try link: -lpthreads -lmach -lexc -lc_r (ol_cv_pthread_lpthreads_lmach_lexc_lc_r)
14363 if test "$ol_link_threads" = no ; then
14364         # try -lpthreads -lmach -lexc -lc_r
14365         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc -lc_r""... $ac_c" 1>&6
14366 echo "configure:14367: checking for pthread link with -lpthreads -lmach -lexc -lc_r" >&5
14367 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc_lc_r+set}\" = set"; then
14368   echo $ac_n "(cached) $ac_c" 1>&6
14369 else
14370   
14371                 # save the flags
14372                 ol_LIBS="$LIBS"
14373                 LIBS="-lpthreads -lmach -lexc -lc_r $LIBS"
14374
14375                 if test "$cross_compiling" = yes; then
14376   cat > conftest.$ac_ext <<EOF
14377 #line 14378 "configure"
14378 #include "confdefs.h"
14379 /* pthread test headers */
14380 #include <pthread.h>
14381 #if HAVE_PTHREADS < 7
14382 #include <errno.h>
14383 #endif
14384 #ifndef NULL
14385 #define NULL (void*)0
14386 #endif
14387
14388 static void *task(p)
14389         void *p;
14390 {
14391         return (void *) (p == NULL);
14392 }
14393
14394 int main() {
14395
14396         /* pthread test function */
14397 #ifndef PTHREAD_CREATE_DETACHED
14398 #define PTHREAD_CREATE_DETACHED 1
14399 #endif
14400         pthread_t t;
14401         int status;
14402         int detach = PTHREAD_CREATE_DETACHED;
14403
14404 #if HAVE_PTHREADS > 4
14405         /* Final pthreads */
14406         pthread_attr_t attr;
14407
14408         status = pthread_attr_init(&attr);
14409         if( status ) return status;
14410
14411 #if HAVE_PTHREADS < 7
14412         status = pthread_attr_setdetachstate(&attr, &detach);
14413         if( status < 0 ) status = errno;
14414 #else
14415         status = pthread_attr_setdetachstate(&attr, detach);
14416 #endif
14417         if( status ) return status;
14418         status = pthread_create( &t, &attr, task, NULL );
14419 #if HAVE_PTHREADS < 7
14420         if( status < 0 ) status = errno;
14421 #endif
14422         if( status ) return status;
14423 #else
14424         /* Draft 4 pthreads */
14425         status = pthread_create( &t, pthread_attr_default, task, NULL );
14426         if( status ) return errno;
14427
14428         /* give thread a chance to complete */
14429         /* it should remain joinable and hence detachable */
14430         sleep( 1 );
14431
14432         status = pthread_detach( &t );
14433         if( status ) return errno;
14434 #endif
14435
14436 #ifdef HAVE_LINUX_THREADS
14437         pthread_kill_other_threads_np();
14438 #endif
14439
14440         return 0;
14441
14442 ; return 0; }
14443 EOF
14444 if { (eval echo configure:14445: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14445   rm -rf conftest*
14446   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
14447 else
14448   echo "configure: failed program was:" >&5
14449   cat conftest.$ac_ext >&5
14450   rm -rf conftest*
14451   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
14452 fi
14453 rm -f conftest*
14454 else
14455   cat > conftest.$ac_ext <<EOF
14456 #line 14457 "configure"
14457 #include "confdefs.h"
14458 /* pthread test headers */
14459 #include <pthread.h>
14460 #if HAVE_PTHREADS < 7
14461 #include <errno.h>
14462 #endif
14463 #ifndef NULL
14464 #define NULL (void*)0
14465 #endif
14466
14467 static void *task(p)
14468         void *p;
14469 {
14470         return (void *) (p == NULL);
14471 }
14472
14473
14474 int main(argc, argv)
14475         int argc;
14476         char **argv;
14477 {
14478
14479         /* pthread test function */
14480 #ifndef PTHREAD_CREATE_DETACHED
14481 #define PTHREAD_CREATE_DETACHED 1
14482 #endif
14483         pthread_t t;
14484         int status;
14485         int detach = PTHREAD_CREATE_DETACHED;
14486
14487 #if HAVE_PTHREADS > 4
14488         /* Final pthreads */
14489         pthread_attr_t attr;
14490
14491         status = pthread_attr_init(&attr);
14492         if( status ) return status;
14493
14494 #if HAVE_PTHREADS < 7
14495         status = pthread_attr_setdetachstate(&attr, &detach);
14496         if( status < 0 ) status = errno;
14497 #else
14498         status = pthread_attr_setdetachstate(&attr, detach);
14499 #endif
14500         if( status ) return status;
14501         status = pthread_create( &t, &attr, task, NULL );
14502 #if HAVE_PTHREADS < 7
14503         if( status < 0 ) status = errno;
14504 #endif
14505         if( status ) return status;
14506 #else
14507         /* Draft 4 pthreads */
14508         status = pthread_create( &t, pthread_attr_default, task, NULL );
14509         if( status ) return errno;
14510
14511         /* give thread a chance to complete */
14512         /* it should remain joinable and hence detachable */
14513         sleep( 1 );
14514
14515         status = pthread_detach( &t );
14516         if( status ) return errno;
14517 #endif
14518
14519 #ifdef HAVE_LINUX_THREADS
14520         pthread_kill_other_threads_np();
14521 #endif
14522
14523         return 0;
14524
14525 }
14526
14527 EOF
14528 if { (eval echo configure:14529: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
14529 then
14530   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
14531 else
14532   echo "configure: failed program was:" >&5
14533   cat conftest.$ac_ext >&5
14534   rm -fr conftest*
14535   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
14536 fi
14537 rm -fr conftest*
14538 fi
14539
14540
14541                 # restore the LIBS
14542                 LIBS="$ol_LIBS"
14543         
14544 fi
14545
14546 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc_lc_r" 1>&6
14547
14548         if test $ol_cv_pthread_lpthreads_lmach_lexc_lc_r = yes ; then
14549                 ol_link_pthreads="-lpthreads -lmach -lexc -lc_r"
14550                 ol_link_threads=posix
14551         fi
14552 fi
14553
14554                 # Pthread try link: -lpthreads -lmach -lexc (ol_cv_pthread_lpthreads_lmach_lexc)
14555 if test "$ol_link_threads" = no ; then
14556         # try -lpthreads -lmach -lexc
14557         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc""... $ac_c" 1>&6
14558 echo "configure:14559: checking for pthread link with -lpthreads -lmach -lexc" >&5
14559 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc+set}\" = set"; then
14560   echo $ac_n "(cached) $ac_c" 1>&6
14561 else
14562   
14563                 # save the flags
14564                 ol_LIBS="$LIBS"
14565                 LIBS="-lpthreads -lmach -lexc $LIBS"
14566
14567                 if test "$cross_compiling" = yes; then
14568   cat > conftest.$ac_ext <<EOF
14569 #line 14570 "configure"
14570 #include "confdefs.h"
14571 /* pthread test headers */
14572 #include <pthread.h>
14573 #if HAVE_PTHREADS < 7
14574 #include <errno.h>
14575 #endif
14576 #ifndef NULL
14577 #define NULL (void*)0
14578 #endif
14579
14580 static void *task(p)
14581         void *p;
14582 {
14583         return (void *) (p == NULL);
14584 }
14585
14586 int main() {
14587
14588         /* pthread test function */
14589 #ifndef PTHREAD_CREATE_DETACHED
14590 #define PTHREAD_CREATE_DETACHED 1
14591 #endif
14592         pthread_t t;
14593         int status;
14594         int detach = PTHREAD_CREATE_DETACHED;
14595
14596 #if HAVE_PTHREADS > 4
14597         /* Final pthreads */
14598         pthread_attr_t attr;
14599
14600         status = pthread_attr_init(&attr);
14601         if( status ) return status;
14602
14603 #if HAVE_PTHREADS < 7
14604         status = pthread_attr_setdetachstate(&attr, &detach);
14605         if( status < 0 ) status = errno;
14606 #else
14607         status = pthread_attr_setdetachstate(&attr, detach);
14608 #endif
14609         if( status ) return status;
14610         status = pthread_create( &t, &attr, task, NULL );
14611 #if HAVE_PTHREADS < 7
14612         if( status < 0 ) status = errno;
14613 #endif
14614         if( status ) return status;
14615 #else
14616         /* Draft 4 pthreads */
14617         status = pthread_create( &t, pthread_attr_default, task, NULL );
14618         if( status ) return errno;
14619
14620         /* give thread a chance to complete */
14621         /* it should remain joinable and hence detachable */
14622         sleep( 1 );
14623
14624         status = pthread_detach( &t );
14625         if( status ) return errno;
14626 #endif
14627
14628 #ifdef HAVE_LINUX_THREADS
14629         pthread_kill_other_threads_np();
14630 #endif
14631
14632         return 0;
14633
14634 ; return 0; }
14635 EOF
14636 if { (eval echo configure:14637: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14637   rm -rf conftest*
14638   ol_cv_pthread_lpthreads_lmach_lexc=yes
14639 else
14640   echo "configure: failed program was:" >&5
14641   cat conftest.$ac_ext >&5
14642   rm -rf conftest*
14643   ol_cv_pthread_lpthreads_lmach_lexc=no
14644 fi
14645 rm -f conftest*
14646 else
14647   cat > conftest.$ac_ext <<EOF
14648 #line 14649 "configure"
14649 #include "confdefs.h"
14650 /* pthread test headers */
14651 #include <pthread.h>
14652 #if HAVE_PTHREADS < 7
14653 #include <errno.h>
14654 #endif
14655 #ifndef NULL
14656 #define NULL (void*)0
14657 #endif
14658
14659 static void *task(p)
14660         void *p;
14661 {
14662         return (void *) (p == NULL);
14663 }
14664
14665
14666 int main(argc, argv)
14667         int argc;
14668         char **argv;
14669 {
14670
14671         /* pthread test function */
14672 #ifndef PTHREAD_CREATE_DETACHED
14673 #define PTHREAD_CREATE_DETACHED 1
14674 #endif
14675         pthread_t t;
14676         int status;
14677         int detach = PTHREAD_CREATE_DETACHED;
14678
14679 #if HAVE_PTHREADS > 4
14680         /* Final pthreads */
14681         pthread_attr_t attr;
14682
14683         status = pthread_attr_init(&attr);
14684         if( status ) return status;
14685
14686 #if HAVE_PTHREADS < 7
14687         status = pthread_attr_setdetachstate(&attr, &detach);
14688         if( status < 0 ) status = errno;
14689 #else
14690         status = pthread_attr_setdetachstate(&attr, detach);
14691 #endif
14692         if( status ) return status;
14693         status = pthread_create( &t, &attr, task, NULL );
14694 #if HAVE_PTHREADS < 7
14695         if( status < 0 ) status = errno;
14696 #endif
14697         if( status ) return status;
14698 #else
14699         /* Draft 4 pthreads */
14700         status = pthread_create( &t, pthread_attr_default, task, NULL );
14701         if( status ) return errno;
14702
14703         /* give thread a chance to complete */
14704         /* it should remain joinable and hence detachable */
14705         sleep( 1 );
14706
14707         status = pthread_detach( &t );
14708         if( status ) return errno;
14709 #endif
14710
14711 #ifdef HAVE_LINUX_THREADS
14712         pthread_kill_other_threads_np();
14713 #endif
14714
14715         return 0;
14716
14717 }
14718
14719 EOF
14720 if { (eval echo configure:14721: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
14721 then
14722   ol_cv_pthread_lpthreads_lmach_lexc=yes
14723 else
14724   echo "configure: failed program was:" >&5
14725   cat conftest.$ac_ext >&5
14726   rm -fr conftest*
14727   ol_cv_pthread_lpthreads_lmach_lexc=no
14728 fi
14729 rm -fr conftest*
14730 fi
14731
14732
14733                 # restore the LIBS
14734                 LIBS="$ol_LIBS"
14735         
14736 fi
14737
14738 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc" 1>&6
14739
14740         if test $ol_cv_pthread_lpthreads_lmach_lexc = yes ; then
14741                 ol_link_pthreads="-lpthreads -lmach -lexc"
14742                 ol_link_threads=posix
14743         fi
14744 fi
14745
14746                 # Pthread try link: -lpthreads -lexc (ol_cv_pthread_lpthreads_lexc)
14747 if test "$ol_link_threads" = no ; then
14748         # try -lpthreads -lexc
14749         echo $ac_n "checking for pthread link with -lpthreads -lexc""... $ac_c" 1>&6
14750 echo "configure:14751: checking for pthread link with -lpthreads -lexc" >&5
14751 if eval "test \"\${ol_cv_pthread_lpthreads_lexc+set}\" = set"; then
14752   echo $ac_n "(cached) $ac_c" 1>&6
14753 else
14754   
14755                 # save the flags
14756                 ol_LIBS="$LIBS"
14757                 LIBS="-lpthreads -lexc $LIBS"
14758
14759                 if test "$cross_compiling" = yes; then
14760   cat > conftest.$ac_ext <<EOF
14761 #line 14762 "configure"
14762 #include "confdefs.h"
14763 /* pthread test headers */
14764 #include <pthread.h>
14765 #if HAVE_PTHREADS < 7
14766 #include <errno.h>
14767 #endif
14768 #ifndef NULL
14769 #define NULL (void*)0
14770 #endif
14771
14772 static void *task(p)
14773         void *p;
14774 {
14775         return (void *) (p == NULL);
14776 }
14777
14778 int main() {
14779
14780         /* pthread test function */
14781 #ifndef PTHREAD_CREATE_DETACHED
14782 #define PTHREAD_CREATE_DETACHED 1
14783 #endif
14784         pthread_t t;
14785         int status;
14786         int detach = PTHREAD_CREATE_DETACHED;
14787
14788 #if HAVE_PTHREADS > 4
14789         /* Final pthreads */
14790         pthread_attr_t attr;
14791
14792         status = pthread_attr_init(&attr);
14793         if( status ) return status;
14794
14795 #if HAVE_PTHREADS < 7
14796         status = pthread_attr_setdetachstate(&attr, &detach);
14797         if( status < 0 ) status = errno;
14798 #else
14799         status = pthread_attr_setdetachstate(&attr, detach);
14800 #endif
14801         if( status ) return status;
14802         status = pthread_create( &t, &attr, task, NULL );
14803 #if HAVE_PTHREADS < 7
14804         if( status < 0 ) status = errno;
14805 #endif
14806         if( status ) return status;
14807 #else
14808         /* Draft 4 pthreads */
14809         status = pthread_create( &t, pthread_attr_default, task, NULL );
14810         if( status ) return errno;
14811
14812         /* give thread a chance to complete */
14813         /* it should remain joinable and hence detachable */
14814         sleep( 1 );
14815
14816         status = pthread_detach( &t );
14817         if( status ) return errno;
14818 #endif
14819
14820 #ifdef HAVE_LINUX_THREADS
14821         pthread_kill_other_threads_np();
14822 #endif
14823
14824         return 0;
14825
14826 ; return 0; }
14827 EOF
14828 if { (eval echo configure:14829: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14829   rm -rf conftest*
14830   ol_cv_pthread_lpthreads_lexc=yes
14831 else
14832   echo "configure: failed program was:" >&5
14833   cat conftest.$ac_ext >&5
14834   rm -rf conftest*
14835   ol_cv_pthread_lpthreads_lexc=no
14836 fi
14837 rm -f conftest*
14838 else
14839   cat > conftest.$ac_ext <<EOF
14840 #line 14841 "configure"
14841 #include "confdefs.h"
14842 /* pthread test headers */
14843 #include <pthread.h>
14844 #if HAVE_PTHREADS < 7
14845 #include <errno.h>
14846 #endif
14847 #ifndef NULL
14848 #define NULL (void*)0
14849 #endif
14850
14851 static void *task(p)
14852         void *p;
14853 {
14854         return (void *) (p == NULL);
14855 }
14856
14857
14858 int main(argc, argv)
14859         int argc;
14860         char **argv;
14861 {
14862
14863         /* pthread test function */
14864 #ifndef PTHREAD_CREATE_DETACHED
14865 #define PTHREAD_CREATE_DETACHED 1
14866 #endif
14867         pthread_t t;
14868         int status;
14869         int detach = PTHREAD_CREATE_DETACHED;
14870
14871 #if HAVE_PTHREADS > 4
14872         /* Final pthreads */
14873         pthread_attr_t attr;
14874
14875         status = pthread_attr_init(&attr);
14876         if( status ) return status;
14877
14878 #if HAVE_PTHREADS < 7
14879         status = pthread_attr_setdetachstate(&attr, &detach);
14880         if( status < 0 ) status = errno;
14881 #else
14882         status = pthread_attr_setdetachstate(&attr, detach);
14883 #endif
14884         if( status ) return status;
14885         status = pthread_create( &t, &attr, task, NULL );
14886 #if HAVE_PTHREADS < 7
14887         if( status < 0 ) status = errno;
14888 #endif
14889         if( status ) return status;
14890 #else
14891         /* Draft 4 pthreads */
14892         status = pthread_create( &t, pthread_attr_default, task, NULL );
14893         if( status ) return errno;
14894
14895         /* give thread a chance to complete */
14896         /* it should remain joinable and hence detachable */
14897         sleep( 1 );
14898
14899         status = pthread_detach( &t );
14900         if( status ) return errno;
14901 #endif
14902
14903 #ifdef HAVE_LINUX_THREADS
14904         pthread_kill_other_threads_np();
14905 #endif
14906
14907         return 0;
14908
14909 }
14910
14911 EOF
14912 if { (eval echo configure:14913: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
14913 then
14914   ol_cv_pthread_lpthreads_lexc=yes
14915 else
14916   echo "configure: failed program was:" >&5
14917   cat conftest.$ac_ext >&5
14918   rm -fr conftest*
14919   ol_cv_pthread_lpthreads_lexc=no
14920 fi
14921 rm -fr conftest*
14922 fi
14923
14924
14925                 # restore the LIBS
14926                 LIBS="$ol_LIBS"
14927         
14928 fi
14929
14930 echo "$ac_t""$ol_cv_pthread_lpthreads_lexc" 1>&6
14931
14932         if test $ol_cv_pthread_lpthreads_lexc = yes ; then
14933                 ol_link_pthreads="-lpthreads -lexc"
14934                 ol_link_threads=posix
14935         fi
14936 fi
14937
14938
14939                 # Pthread try link: -lpthreads (ol_cv_pthread_lib_lpthreads)
14940 if test "$ol_link_threads" = no ; then
14941         # try -lpthreads
14942         echo $ac_n "checking for pthread link with -lpthreads""... $ac_c" 1>&6
14943 echo "configure:14944: checking for pthread link with -lpthreads" >&5
14944 if eval "test \"\${ol_cv_pthread_lib_lpthreads+set}\" = set"; then
14945   echo $ac_n "(cached) $ac_c" 1>&6
14946 else
14947   
14948                 # save the flags
14949                 ol_LIBS="$LIBS"
14950                 LIBS="-lpthreads $LIBS"
14951
14952                 if test "$cross_compiling" = yes; then
14953   cat > conftest.$ac_ext <<EOF
14954 #line 14955 "configure"
14955 #include "confdefs.h"
14956 /* pthread test headers */
14957 #include <pthread.h>
14958 #if HAVE_PTHREADS < 7
14959 #include <errno.h>
14960 #endif
14961 #ifndef NULL
14962 #define NULL (void*)0
14963 #endif
14964
14965 static void *task(p)
14966         void *p;
14967 {
14968         return (void *) (p == NULL);
14969 }
14970
14971 int main() {
14972
14973         /* pthread test function */
14974 #ifndef PTHREAD_CREATE_DETACHED
14975 #define PTHREAD_CREATE_DETACHED 1
14976 #endif
14977         pthread_t t;
14978         int status;
14979         int detach = PTHREAD_CREATE_DETACHED;
14980
14981 #if HAVE_PTHREADS > 4
14982         /* Final pthreads */
14983         pthread_attr_t attr;
14984
14985         status = pthread_attr_init(&attr);
14986         if( status ) return status;
14987
14988 #if HAVE_PTHREADS < 7
14989         status = pthread_attr_setdetachstate(&attr, &detach);
14990         if( status < 0 ) status = errno;
14991 #else
14992         status = pthread_attr_setdetachstate(&attr, detach);
14993 #endif
14994         if( status ) return status;
14995         status = pthread_create( &t, &attr, task, NULL );
14996 #if HAVE_PTHREADS < 7
14997         if( status < 0 ) status = errno;
14998 #endif
14999         if( status ) return status;
15000 #else
15001         /* Draft 4 pthreads */
15002         status = pthread_create( &t, pthread_attr_default, task, NULL );
15003         if( status ) return errno;
15004
15005         /* give thread a chance to complete */
15006         /* it should remain joinable and hence detachable */
15007         sleep( 1 );
15008
15009         status = pthread_detach( &t );
15010         if( status ) return errno;
15011 #endif
15012
15013 #ifdef HAVE_LINUX_THREADS
15014         pthread_kill_other_threads_np();
15015 #endif
15016
15017         return 0;
15018
15019 ; return 0; }
15020 EOF
15021 if { (eval echo configure:15022: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15022   rm -rf conftest*
15023   ol_cv_pthread_lib_lpthreads=yes
15024 else
15025   echo "configure: failed program was:" >&5
15026   cat conftest.$ac_ext >&5
15027   rm -rf conftest*
15028   ol_cv_pthread_lib_lpthreads=no
15029 fi
15030 rm -f conftest*
15031 else
15032   cat > conftest.$ac_ext <<EOF
15033 #line 15034 "configure"
15034 #include "confdefs.h"
15035 /* pthread test headers */
15036 #include <pthread.h>
15037 #if HAVE_PTHREADS < 7
15038 #include <errno.h>
15039 #endif
15040 #ifndef NULL
15041 #define NULL (void*)0
15042 #endif
15043
15044 static void *task(p)
15045         void *p;
15046 {
15047         return (void *) (p == NULL);
15048 }
15049
15050
15051 int main(argc, argv)
15052         int argc;
15053         char **argv;
15054 {
15055
15056         /* pthread test function */
15057 #ifndef PTHREAD_CREATE_DETACHED
15058 #define PTHREAD_CREATE_DETACHED 1
15059 #endif
15060         pthread_t t;
15061         int status;
15062         int detach = PTHREAD_CREATE_DETACHED;
15063
15064 #if HAVE_PTHREADS > 4
15065         /* Final pthreads */
15066         pthread_attr_t attr;
15067
15068         status = pthread_attr_init(&attr);
15069         if( status ) return status;
15070
15071 #if HAVE_PTHREADS < 7
15072         status = pthread_attr_setdetachstate(&attr, &detach);
15073         if( status < 0 ) status = errno;
15074 #else
15075         status = pthread_attr_setdetachstate(&attr, detach);
15076 #endif
15077         if( status ) return status;
15078         status = pthread_create( &t, &attr, task, NULL );
15079 #if HAVE_PTHREADS < 7
15080         if( status < 0 ) status = errno;
15081 #endif
15082         if( status ) return status;
15083 #else
15084         /* Draft 4 pthreads */
15085         status = pthread_create( &t, pthread_attr_default, task, NULL );
15086         if( status ) return errno;
15087
15088         /* give thread a chance to complete */
15089         /* it should remain joinable and hence detachable */
15090         sleep( 1 );
15091
15092         status = pthread_detach( &t );
15093         if( status ) return errno;
15094 #endif
15095
15096 #ifdef HAVE_LINUX_THREADS
15097         pthread_kill_other_threads_np();
15098 #endif
15099
15100         return 0;
15101
15102 }
15103
15104 EOF
15105 if { (eval echo configure:15106: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
15106 then
15107   ol_cv_pthread_lib_lpthreads=yes
15108 else
15109   echo "configure: failed program was:" >&5
15110   cat conftest.$ac_ext >&5
15111   rm -fr conftest*
15112   ol_cv_pthread_lib_lpthreads=no
15113 fi
15114 rm -fr conftest*
15115 fi
15116
15117
15118                 # restore the LIBS
15119                 LIBS="$ol_LIBS"
15120         
15121 fi
15122
15123 echo "$ac_t""$ol_cv_pthread_lib_lpthreads" 1>&6
15124
15125         if test $ol_cv_pthread_lib_lpthreads = yes ; then
15126                 ol_link_pthreads="-lpthreads"
15127                 ol_link_threads=posix
15128         fi
15129 fi
15130
15131
15132                 if test $ol_link_threads != no ; then
15133                         LTHREAD_LIBS="$LTHREAD_LIBS $ol_link_pthreads"
15134
15135                                                 save_CPPFLAGS="$CPPFLAGS"
15136                         save_LIBS="$LIBS"
15137                         LIBS="$LTHREAD_LIBS $LIBS"
15138
15139                                                                                                 for ac_func in sched_yield pthread_yield thr_yield
15140 do
15141 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15142 echo "configure:15143: checking for $ac_func" >&5
15143 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15144   echo $ac_n "(cached) $ac_c" 1>&6
15145 else
15146   cat > conftest.$ac_ext <<EOF
15147 #line 15148 "configure"
15148 #include "confdefs.h"
15149 /* System header to define __stub macros and hopefully few prototypes,
15150     which can conflict with char $ac_func(); below.  */
15151 #include <assert.h>
15152 /* Override any gcc2 internal prototype to avoid an error.  */
15153 /* We use char because int might match the return type of a gcc2
15154     builtin and then its argument prototype would still apply.  */
15155 char $ac_func();
15156 char (*f)();
15157
15158 int main() {
15159
15160 /* The GNU C library defines this for functions which it implements
15161     to always fail with ENOSYS.  Some functions are actually named
15162     something starting with __ and the normal name is an alias.  */
15163 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15164 choke me
15165 #else
15166 f = $ac_func;
15167 #endif
15168
15169 ; return 0; }
15170 EOF
15171 if { (eval echo configure:15172: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15172   rm -rf conftest*
15173   eval "ac_cv_func_$ac_func=yes"
15174 else
15175   echo "configure: failed program was:" >&5
15176   cat conftest.$ac_ext >&5
15177   rm -rf conftest*
15178   eval "ac_cv_func_$ac_func=no"
15179 fi
15180 rm -f conftest*
15181 fi
15182
15183 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15184   echo "$ac_t""yes" 1>&6
15185     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15186   cat >> confdefs.h <<EOF
15187 #define $ac_tr_func 1
15188 EOF
15189  
15190 else
15191   echo "$ac_t""no" 1>&6
15192 fi
15193 done
15194
15195
15196                         if test $ac_cv_func_sched_yield = no -a \
15197                                 $ac_cv_func_pthread_yield = no -a \
15198                                 $ac_cv_func_thr_yield = no ; then
15199                                                                 echo $ac_n "checking for sched_yield in -lrt""... $ac_c" 1>&6
15200 echo "configure:15201: checking for sched_yield in -lrt" >&5
15201 ac_lib_var=`echo rt'_'sched_yield | sed 'y%./+-:%__p__%'`
15202 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
15203   echo $ac_n "(cached) $ac_c" 1>&6
15204 else
15205   ac_save_LIBS="$LIBS"
15206 LIBS="-lrt  $LIBS"
15207 cat > conftest.$ac_ext <<EOF
15208 #line 15209 "configure"
15209 #include "confdefs.h"
15210 /* Override any gcc2 internal prototype to avoid an error.  */
15211 /* We use char because int might match the return type of a gcc2
15212     builtin and then its argument prototype would still apply.  */
15213 char sched_yield();
15214
15215 int main() {
15216 sched_yield()
15217 ; return 0; }
15218 EOF
15219 if { (eval echo configure:15220: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15220   rm -rf conftest*
15221   eval "ac_cv_lib_$ac_lib_var=yes"
15222 else
15223   echo "configure: failed program was:" >&5
15224   cat conftest.$ac_ext >&5
15225   rm -rf conftest*
15226   eval "ac_cv_lib_$ac_lib_var=no"
15227 fi
15228 rm -f conftest*
15229 LIBS="$ac_save_LIBS"
15230
15231 fi
15232 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
15233   echo "$ac_t""yes" 1>&6
15234   LTHREAD_LIBS="$LTHREAD_LIBS -lrt"
15235                                         cat >> confdefs.h <<\EOF
15236 #define HAVE_SCHED_YIELD 1
15237 EOF
15238
15239                                         ac_cv_func_sched_yield=yes
15240 else
15241   echo "$ac_t""no" 1>&6
15242 ac_cv_func_sched_yield=no
15243 fi
15244
15245                         fi
15246                         if test $ac_cv_func_sched_yield = no -a \
15247                                 $ac_cv_func_pthread_yield = no -a \
15248                                 "$ac_cv_func_thr_yield" = no ; then
15249                                 echo "configure: warning: could not locate sched_yield() or pthread_yield()" 1>&2
15250                         fi
15251
15252                                                 for ac_func in pthread_kill pthread_rwlock_destroy
15253 do
15254 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15255 echo "configure:15256: checking for $ac_func" >&5
15256 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15257   echo $ac_n "(cached) $ac_c" 1>&6
15258 else
15259   cat > conftest.$ac_ext <<EOF
15260 #line 15261 "configure"
15261 #include "confdefs.h"
15262 /* System header to define __stub macros and hopefully few prototypes,
15263     which can conflict with char $ac_func(); below.  */
15264 #include <assert.h>
15265 /* Override any gcc2 internal prototype to avoid an error.  */
15266 /* We use char because int might match the return type of a gcc2
15267     builtin and then its argument prototype would still apply.  */
15268 char $ac_func();
15269 char (*f)();
15270
15271 int main() {
15272
15273 /* The GNU C library defines this for functions which it implements
15274     to always fail with ENOSYS.  Some functions are actually named
15275     something starting with __ and the normal name is an alias.  */
15276 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15277 choke me
15278 #else
15279 f = $ac_func;
15280 #endif
15281
15282 ; return 0; }
15283 EOF
15284 if { (eval echo configure:15285: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15285   rm -rf conftest*
15286   eval "ac_cv_func_$ac_func=yes"
15287 else
15288   echo "configure: failed program was:" >&5
15289   cat conftest.$ac_ext >&5
15290   rm -rf conftest*
15291   eval "ac_cv_func_$ac_func=no"
15292 fi
15293 rm -f conftest*
15294 fi
15295
15296 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15297   echo "$ac_t""yes" 1>&6
15298     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15299   cat >> confdefs.h <<EOF
15300 #define $ac_tr_func 1
15301 EOF
15302  
15303 else
15304   echo "$ac_t""no" 1>&6
15305 fi
15306 done
15307
15308
15309                                                                         echo $ac_n "checking for pthread_detach with <pthread.h>""... $ac_c" 1>&6
15310 echo "configure:15311: checking for pthread_detach with <pthread.h>" >&5
15311 if eval "test \"\${ol_cv_func_pthread_detach+set}\" = set"; then
15312   echo $ac_n "(cached) $ac_c" 1>&6
15313 else
15314   
15315                                                                 cat > conftest.$ac_ext <<EOF
15316 #line 15317 "configure"
15317 #include "confdefs.h"
15318
15319 #include <pthread.h>
15320 #ifndef NULL
15321 #define NULL (void*)0
15322 #endif
15323
15324 int main() {
15325 pthread_detach(NULL);
15326 ; return 0; }
15327 EOF
15328 if { (eval echo configure:15329: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15329   rm -rf conftest*
15330   ol_cv_func_pthread_detach=yes
15331 else
15332   echo "configure: failed program was:" >&5
15333   cat conftest.$ac_ext >&5
15334   rm -rf conftest*
15335   ol_cv_func_pthread_detach=no
15336 fi
15337 rm -f conftest*
15338                         
15339 fi
15340
15341 echo "$ac_t""$ol_cv_func_pthread_detach" 1>&6
15342
15343                         if test $ol_cv_func_pthread_detach = no ; then
15344                                 { echo "configure: error: could not locate pthread_detach()" 1>&2; exit 1; }
15345                         fi
15346
15347                         cat >> confdefs.h <<\EOF
15348 #define HAVE_PTHREAD_DETACH 1
15349 EOF
15350
15351
15352                                                 for ac_func in \
15353                                 pthread_setconcurrency \
15354                                 pthread_getconcurrency \
15355                                 thr_setconcurrency \
15356                                 thr_getconcurrency \
15357                         
15358 do
15359 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15360 echo "configure:15361: checking for $ac_func" >&5
15361 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15362   echo $ac_n "(cached) $ac_c" 1>&6
15363 else
15364   cat > conftest.$ac_ext <<EOF
15365 #line 15366 "configure"
15366 #include "confdefs.h"
15367 /* System header to define __stub macros and hopefully few prototypes,
15368     which can conflict with char $ac_func(); below.  */
15369 #include <assert.h>
15370 /* Override any gcc2 internal prototype to avoid an error.  */
15371 /* We use char because int might match the return type of a gcc2
15372     builtin and then its argument prototype would still apply.  */
15373 char $ac_func();
15374 char (*f)();
15375
15376 int main() {
15377
15378 /* The GNU C library defines this for functions which it implements
15379     to always fail with ENOSYS.  Some functions are actually named
15380     something starting with __ and the normal name is an alias.  */
15381 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15382 choke me
15383 #else
15384 f = $ac_func;
15385 #endif
15386
15387 ; return 0; }
15388 EOF
15389 if { (eval echo configure:15390: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15390   rm -rf conftest*
15391   eval "ac_cv_func_$ac_func=yes"
15392 else
15393   echo "configure: failed program was:" >&5
15394   cat conftest.$ac_ext >&5
15395   rm -rf conftest*
15396   eval "ac_cv_func_$ac_func=no"
15397 fi
15398 rm -f conftest*
15399 fi
15400
15401 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15402   echo "$ac_t""yes" 1>&6
15403     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15404   cat >> confdefs.h <<EOF
15405 #define $ac_tr_func 1
15406 EOF
15407  
15408 else
15409   echo "$ac_t""no" 1>&6
15410 fi
15411 done
15412
15413
15414                         
15415         for ac_func in pthread_kill_other_threads_np
15416 do
15417 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15418 echo "configure:15419: checking for $ac_func" >&5
15419 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15420   echo $ac_n "(cached) $ac_c" 1>&6
15421 else
15422   cat > conftest.$ac_ext <<EOF
15423 #line 15424 "configure"
15424 #include "confdefs.h"
15425 /* System header to define __stub macros and hopefully few prototypes,
15426     which can conflict with char $ac_func(); below.  */
15427 #include <assert.h>
15428 /* Override any gcc2 internal prototype to avoid an error.  */
15429 /* We use char because int might match the return type of a gcc2
15430     builtin and then its argument prototype would still apply.  */
15431 char $ac_func();
15432 char (*f)();
15433
15434 int main() {
15435
15436 /* The GNU C library defines this for functions which it implements
15437     to always fail with ENOSYS.  Some functions are actually named
15438     something starting with __ and the normal name is an alias.  */
15439 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15440 choke me
15441 #else
15442 f = $ac_func;
15443 #endif
15444
15445 ; return 0; }
15446 EOF
15447 if { (eval echo configure:15448: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15448   rm -rf conftest*
15449   eval "ac_cv_func_$ac_func=yes"
15450 else
15451   echo "configure: failed program was:" >&5
15452   cat conftest.$ac_ext >&5
15453   rm -rf conftest*
15454   eval "ac_cv_func_$ac_func=no"
15455 fi
15456 rm -f conftest*
15457 fi
15458
15459 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15460   echo "$ac_t""yes" 1>&6
15461     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15462   cat >> confdefs.h <<EOF
15463 #define $ac_tr_func 1
15464 EOF
15465  
15466 else
15467   echo "$ac_t""no" 1>&6
15468 fi
15469 done
15470
15471         echo $ac_n "checking for LinuxThreads implementation""... $ac_c" 1>&6
15472 echo "configure:15473: checking for LinuxThreads implementation" >&5
15473 if eval "test \"\${ol_cv_sys_linux_threads+set}\" = set"; then
15474   echo $ac_n "(cached) $ac_c" 1>&6
15475 else
15476   ol_cv_sys_linux_threads=$ac_cv_func_pthread_kill_other_threads_np
15477 fi
15478
15479 echo "$ac_t""$ol_cv_sys_linux_threads" 1>&6
15480
15481                         
15482         
15483         
15484         echo $ac_n "checking for LinuxThreads consistency""... $ac_c" 1>&6
15485 echo "configure:15486: checking for LinuxThreads consistency" >&5
15486 if eval "test \"\${ol_cv_linux_threads+set}\" = set"; then
15487   echo $ac_n "(cached) $ac_c" 1>&6
15488 else
15489   
15490                 if test $ol_cv_header_linux_threads = yes -a \
15491                         $ol_cv_sys_linux_threads = yes; then
15492                         ol_cv_linux_threads=yes
15493                 elif test $ol_cv_header_linux_threads = no -a \
15494                         $ol_cv_sys_linux_threads = no; then
15495                         ol_cv_linux_threads=no
15496                 else
15497                         ol_cv_linux_threads=error
15498                 fi
15499         
15500 fi
15501
15502 echo "$ac_t""$ol_cv_linux_threads" 1>&6
15503
15504
15505                         if test $ol_cv_linux_threads = error; then
15506                                 { echo "configure: error: LinuxThreads header/library mismatch" 1>&2; exit 1; };
15507                         fi
15508
15509                         echo $ac_n "checking if pthread_create() works""... $ac_c" 1>&6
15510 echo "configure:15511: checking if pthread_create() works" >&5
15511 if eval "test \"\${ol_cv_pthread_create_works+set}\" = set"; then
15512   echo $ac_n "(cached) $ac_c" 1>&6
15513 else
15514   
15515                         if test "$cross_compiling" = yes; then
15516                                 ol_cv_pthread_create_works=yes
15517 else
15518   cat > conftest.$ac_ext <<EOF
15519 #line 15520 "configure"
15520 #include "confdefs.h"
15521 /* pthread test headers */
15522 #include <pthread.h>
15523 #if HAVE_PTHREADS < 7
15524 #include <errno.h>
15525 #endif
15526 #ifndef NULL
15527 #define NULL (void*)0
15528 #endif
15529
15530 static void *task(p)
15531         void *p;
15532 {
15533         return (void *) (p == NULL);
15534 }
15535
15536
15537 int main(argc, argv)
15538         int argc;
15539         char **argv;
15540 {
15541
15542         /* pthread test function */
15543 #ifndef PTHREAD_CREATE_DETACHED
15544 #define PTHREAD_CREATE_DETACHED 1
15545 #endif
15546         pthread_t t;
15547         int status;
15548         int detach = PTHREAD_CREATE_DETACHED;
15549
15550 #if HAVE_PTHREADS > 4
15551         /* Final pthreads */
15552         pthread_attr_t attr;
15553
15554         status = pthread_attr_init(&attr);
15555         if( status ) return status;
15556
15557 #if HAVE_PTHREADS < 7
15558         status = pthread_attr_setdetachstate(&attr, &detach);
15559         if( status < 0 ) status = errno;
15560 #else
15561         status = pthread_attr_setdetachstate(&attr, detach);
15562 #endif
15563         if( status ) return status;
15564         status = pthread_create( &t, &attr, task, NULL );
15565 #if HAVE_PTHREADS < 7
15566         if( status < 0 ) status = errno;
15567 #endif
15568         if( status ) return status;
15569 #else
15570         /* Draft 4 pthreads */
15571         status = pthread_create( &t, pthread_attr_default, task, NULL );
15572         if( status ) return errno;
15573
15574         /* give thread a chance to complete */
15575         /* it should remain joinable and hence detachable */
15576         sleep( 1 );
15577
15578         status = pthread_detach( &t );
15579         if( status ) return errno;
15580 #endif
15581
15582 #ifdef HAVE_LINUX_THREADS
15583         pthread_kill_other_threads_np();
15584 #endif
15585
15586         return 0;
15587
15588 }
15589
15590 EOF
15591 if { (eval echo configure:15592: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
15592 then
15593   ol_cv_pthread_create_works=yes
15594 else
15595   echo "configure: failed program was:" >&5
15596   cat conftest.$ac_ext >&5
15597   rm -fr conftest*
15598   ol_cv_pthread_create_works=no
15599 fi
15600 rm -fr conftest*
15601 fi
15602
15603 fi
15604
15605 echo "$ac_t""$ol_cv_pthread_create_works" 1>&6
15606
15607                         if test $ol_cv_pthread_create_works = no ; then
15608                                 { echo "configure: error: pthread_create is not usable, check environment settings" 1>&2; exit 1; }
15609                         fi
15610
15611                                                 if test $ol_with_yielding_select = auto ; then
15612                                 echo $ac_n "checking if select yields when using pthreads""... $ac_c" 1>&6
15613 echo "configure:15614: checking if select yields when using pthreads" >&5
15614 if eval "test \"\${ol_cv_pthread_select_yields+set}\" = set"; then
15615   echo $ac_n "(cached) $ac_c" 1>&6
15616 else
15617   
15618                                 if test "$cross_compiling" = yes; then
15619   ol_cv_pthread_select_yields=cross
15620 else
15621   cat > conftest.$ac_ext <<EOF
15622 #line 15623 "configure"
15623 #include "confdefs.h"
15624
15625 #include <sys/types.h>
15626 #include <sys/time.h>
15627 #include <unistd.h>
15628 #include <pthread.h>
15629 #ifndef NULL
15630 #define NULL (void*) 0
15631 #endif
15632
15633 static int fildes[2];
15634
15635 static void *task(p)
15636         void *p;
15637 {
15638         int i;
15639         struct timeval tv;
15640
15641         fd_set rfds;
15642
15643         tv.tv_sec=10;
15644         tv.tv_usec=0;
15645
15646         FD_ZERO(&rfds);
15647         FD_SET(fildes[0], &rfds);
15648
15649         /* we're not interested in any fds */
15650         i = select(FD_SETSIZE, &rfds, NULL, NULL, &tv);
15651
15652         if(i < 0) {
15653                 perror("select");
15654                 exit(10);
15655         }
15656
15657         exit(0); /* if we exit here, the select blocked the whole process */
15658 }
15659
15660 int main(argc, argv)
15661         int argc;
15662         char **argv;
15663 {
15664         pthread_t t;
15665
15666         /* create a pipe to select */
15667         if(pipe(&fildes[0])) {
15668                 perror("select");
15669                 exit(1);
15670         }
15671
15672 #ifdef HAVE_PTHREAD_SETCONCURRENCY
15673         (void) pthread_setconcurrency(2);
15674 #else
15675 #ifdef HAVE_THR_SETCONCURRENCY
15676         /* Set Solaris LWP concurrency to 2 */
15677         thr_setconcurrency(2);
15678 #endif
15679 #endif
15680
15681 #if HAVE_PTHREADS < 6
15682         pthread_create(&t, pthread_attr_default, task, NULL);
15683 #else
15684         pthread_create(&t, NULL, task, NULL);
15685 #endif
15686
15687         /* make sure task runs first */
15688 #if HAVE_THR_YIELD
15689         thr_yield();
15690 #elif defined( HAVE_SCHED_YIELD )
15691         sched_yield();
15692 #elif defined( HAVE_PTHREAD_YIELD )
15693         pthread_yield();
15694 #endif
15695
15696         exit(2);
15697 }
15698 EOF
15699 if { (eval echo configure:15700: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
15700 then
15701   ol_cv_pthread_select_yields=no
15702 else
15703   echo "configure: failed program was:" >&5
15704   cat conftest.$ac_ext >&5
15705   rm -fr conftest*
15706   ol_cv_pthread_select_yields=yes
15707 fi
15708 rm -fr conftest*
15709 fi
15710
15711 fi
15712
15713 echo "$ac_t""$ol_cv_pthread_select_yields" 1>&6
15714
15715                                 if test $ol_cv_pthread_select_yields = cross ; then
15716                                         { echo "configure: error: crossing compiling: use --with-yielding_select=yes|no|manual" 1>&2; exit 1; }
15717                                 fi
15718
15719                                 if test $ol_cv_pthread_select_yields = yes ; then
15720                                         ol_with_yielding_select=yes
15721                                 fi
15722                         fi
15723
15724                                                 CPPFLAGS="$save_CPPFLAGS"
15725                         LIBS="$save_LIBS"
15726                 else
15727                         { echo "configure: error: could not locate usable POSIX Threads" 1>&2; exit 1; }
15728                 fi
15729         fi
15730
15731         if test $ol_with_threads = posix ; then
15732                 { echo "configure: error: could not locate POSIX Threads" 1>&2; exit 1; }
15733         fi
15734 fi
15735
15736 if test $ol_with_threads = auto -o $ol_with_threads = yes \
15737         -o $ol_with_threads = mach ; then
15738
15739                 for ac_hdr in mach/cthreads.h cthreads.h
15740 do
15741 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15742 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15743 echo "configure:15744: checking for $ac_hdr" >&5
15744 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15745   echo $ac_n "(cached) $ac_c" 1>&6
15746 else
15747   cat > conftest.$ac_ext <<EOF
15748 #line 15749 "configure"
15749 #include "confdefs.h"
15750 #include <$ac_hdr>
15751 EOF
15752 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15753 { (eval echo configure:15754: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15754 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15755 if test -z "$ac_err"; then
15756   rm -rf conftest*
15757   eval "ac_cv_header_$ac_safe=yes"
15758 else
15759   echo "$ac_err" >&5
15760   echo "configure: failed program was:" >&5
15761   cat conftest.$ac_ext >&5
15762   rm -rf conftest*
15763   eval "ac_cv_header_$ac_safe=no"
15764 fi
15765 rm -f conftest*
15766 fi
15767 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15768   echo "$ac_t""yes" 1>&6
15769     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15770   cat >> confdefs.h <<EOF
15771 #define $ac_tr_hdr 1
15772 EOF
15773  
15774 else
15775   echo "$ac_t""no" 1>&6
15776 fi
15777 done
15778
15779         if test $ac_cv_header_mach_cthreads_h = yes ; then
15780                 ol_with_threads=found
15781
15782                                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
15783 echo "configure:15784: checking for cthread_fork" >&5
15784 if eval "test \"\${ac_cv_func_cthread_fork+set}\" = set"; then
15785   echo $ac_n "(cached) $ac_c" 1>&6
15786 else
15787   cat > conftest.$ac_ext <<EOF
15788 #line 15789 "configure"
15789 #include "confdefs.h"
15790 /* System header to define __stub macros and hopefully few prototypes,
15791     which can conflict with char cthread_fork(); below.  */
15792 #include <assert.h>
15793 /* Override any gcc2 internal prototype to avoid an error.  */
15794 /* We use char because int might match the return type of a gcc2
15795     builtin and then its argument prototype would still apply.  */
15796 char cthread_fork();
15797 char (*f)();
15798
15799 int main() {
15800
15801 /* The GNU C library defines this for functions which it implements
15802     to always fail with ENOSYS.  Some functions are actually named
15803     something starting with __ and the normal name is an alias.  */
15804 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
15805 choke me
15806 #else
15807 f = cthread_fork;
15808 #endif
15809
15810 ; return 0; }
15811 EOF
15812 if { (eval echo configure:15813: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15813   rm -rf conftest*
15814   eval "ac_cv_func_cthread_fork=yes"
15815 else
15816   echo "configure: failed program was:" >&5
15817   cat conftest.$ac_ext >&5
15818   rm -rf conftest*
15819   eval "ac_cv_func_cthread_fork=no"
15820 fi
15821 rm -f conftest*
15822 fi
15823
15824 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
15825   echo "$ac_t""yes" 1>&6
15826   ol_link_threads=yes
15827 else
15828   echo "$ac_t""no" 1>&6
15829 fi
15830
15831
15832                 if test $ol_link_threads = no ; then
15833                                                                         echo $ac_n "checking for cthread_fork with -all_load""... $ac_c" 1>&6
15834 echo "configure:15835: checking for cthread_fork with -all_load" >&5
15835 if eval "test \"\${ol_cv_cthread_all_load+set}\" = set"; then
15836   echo $ac_n "(cached) $ac_c" 1>&6
15837 else
15838   
15839                                                                 save_LIBS="$LIBS"
15840                                 LIBS="-all_load $LIBS"
15841                                 cat > conftest.$ac_ext <<EOF
15842 #line 15843 "configure"
15843 #include "confdefs.h"
15844 #include <mach/cthreads.h>
15845 int main() {
15846
15847                                         cthread_fork((void *)0, (void *)0);
15848                                         
15849 ; return 0; }
15850 EOF
15851 if { (eval echo configure:15852: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15852   rm -rf conftest*
15853   ol_cv_cthread_all_load=yes
15854 else
15855   echo "configure: failed program was:" >&5
15856   cat conftest.$ac_ext >&5
15857   rm -rf conftest*
15858   ol_cv_cthread_all_load=no
15859 fi
15860 rm -f conftest*
15861                                                                 LIBS="$save_LIBS"
15862                         
15863 fi
15864
15865 echo "$ac_t""$ol_cv_cthread_all_load" 1>&6
15866
15867                         if test $ol_cv_cthread_all_load = yes ; then
15868                                 LTHREAD_LIBS="$LTHREAD_LIBS -all_load"
15869                                 ol_link_threads=mach
15870                                 ol_with_threads=found
15871                         fi
15872                 fi
15873
15874         elif test $ac_cv_header_cthreads_h = yes ; then
15875                                 
15876                 ol_with_threads=found
15877  
15878                                 save_LIBS="$LIBS"
15879                 LIBS="$LIBS -lthreads"
15880                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
15881 echo "configure:15882: checking for cthread_fork" >&5
15882 if eval "test \"\${ac_cv_func_cthread_fork+set}\" = set"; then
15883   echo $ac_n "(cached) $ac_c" 1>&6
15884 else
15885   cat > conftest.$ac_ext <<EOF
15886 #line 15887 "configure"
15887 #include "confdefs.h"
15888 /* System header to define __stub macros and hopefully few prototypes,
15889     which can conflict with char cthread_fork(); below.  */
15890 #include <assert.h>
15891 /* Override any gcc2 internal prototype to avoid an error.  */
15892 /* We use char because int might match the return type of a gcc2
15893     builtin and then its argument prototype would still apply.  */
15894 char cthread_fork();
15895 char (*f)();
15896
15897 int main() {
15898
15899 /* The GNU C library defines this for functions which it implements
15900     to always fail with ENOSYS.  Some functions are actually named
15901     something starting with __ and the normal name is an alias.  */
15902 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
15903 choke me
15904 #else
15905 f = cthread_fork;
15906 #endif
15907
15908 ; return 0; }
15909 EOF
15910 if { (eval echo configure:15911: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15911   rm -rf conftest*
15912   eval "ac_cv_func_cthread_fork=yes"
15913 else
15914   echo "configure: failed program was:" >&5
15915   cat conftest.$ac_ext >&5
15916   rm -rf conftest*
15917   eval "ac_cv_func_cthread_fork=no"
15918 fi
15919 rm -f conftest*
15920 fi
15921
15922 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
15923   echo "$ac_t""yes" 1>&6
15924   ol_link_threads=yes
15925 else
15926   echo "$ac_t""no" 1>&6
15927 fi
15928
15929                 LIBS="$save_LIBS"
15930
15931                 if test $ol_link_threads = yes ; then
15932                         LTHREAD_LIBS="-lthreads"
15933                         ol_link_threads=mach
15934                         ol_with_threads=found
15935                 else
15936                         { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
15937                 fi
15938
15939         elif test $ol_with_threads = mach ; then
15940                 { echo "configure: error: could not locate Mach CThreads" 1>&2; exit 1; }
15941         fi
15942
15943         if test $ol_link_threads = mach ; then
15944                 cat >> confdefs.h <<\EOF
15945 #define HAVE_MACH_CTHREADS 1
15946 EOF
15947
15948         elif test $ol_with_threads = found ; then
15949                 { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
15950         fi
15951 fi
15952
15953 if test $ol_with_threads = auto -o $ol_with_threads = yes \
15954         -o $ol_with_threads = pth ; then
15955
15956         for ac_hdr in pth.h
15957 do
15958 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15959 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15960 echo "configure:15961: checking for $ac_hdr" >&5
15961 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15962   echo $ac_n "(cached) $ac_c" 1>&6
15963 else
15964   cat > conftest.$ac_ext <<EOF
15965 #line 15966 "configure"
15966 #include "confdefs.h"
15967 #include <$ac_hdr>
15968 EOF
15969 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15970 { (eval echo configure:15971: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15971 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15972 if test -z "$ac_err"; then
15973   rm -rf conftest*
15974   eval "ac_cv_header_$ac_safe=yes"
15975 else
15976   echo "$ac_err" >&5
15977   echo "configure: failed program was:" >&5
15978   cat conftest.$ac_ext >&5
15979   rm -rf conftest*
15980   eval "ac_cv_header_$ac_safe=no"
15981 fi
15982 rm -f conftest*
15983 fi
15984 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15985   echo "$ac_t""yes" 1>&6
15986     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15987   cat >> confdefs.h <<EOF
15988 #define $ac_tr_hdr 1
15989 EOF
15990  
15991 else
15992   echo "$ac_t""no" 1>&6
15993 fi
15994 done
15995
15996
15997         if test $ac_cv_header_pth_h = yes ; then
15998                 echo $ac_n "checking for pth_version in -lpth""... $ac_c" 1>&6
15999 echo "configure:16000: checking for pth_version in -lpth" >&5
16000 ac_lib_var=`echo pth'_'pth_version | sed 'y%./+-:%__p__%'`
16001 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
16002   echo $ac_n "(cached) $ac_c" 1>&6
16003 else
16004   ac_save_LIBS="$LIBS"
16005 LIBS="-lpth  $LIBS"
16006 cat > conftest.$ac_ext <<EOF
16007 #line 16008 "configure"
16008 #include "confdefs.h"
16009 /* Override any gcc2 internal prototype to avoid an error.  */
16010 /* We use char because int might match the return type of a gcc2
16011     builtin and then its argument prototype would still apply.  */
16012 char pth_version();
16013
16014 int main() {
16015 pth_version()
16016 ; return 0; }
16017 EOF
16018 if { (eval echo configure:16019: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16019   rm -rf conftest*
16020   eval "ac_cv_lib_$ac_lib_var=yes"
16021 else
16022   echo "configure: failed program was:" >&5
16023   cat conftest.$ac_ext >&5
16024   rm -rf conftest*
16025   eval "ac_cv_lib_$ac_lib_var=no"
16026 fi
16027 rm -f conftest*
16028 LIBS="$ac_save_LIBS"
16029
16030 fi
16031 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
16032   echo "$ac_t""yes" 1>&6
16033   have_pth=yes
16034 else
16035   echo "$ac_t""no" 1>&6
16036 have_pth=no
16037 fi
16038
16039
16040                 if test $have_pth = yes ; then
16041                         cat >> confdefs.h <<\EOF
16042 #define HAVE_GNU_PTH 1
16043 EOF
16044
16045                         LTHREAD_LIBS="$LTHREAD_LIBS -lpth"
16046                         ol_link_threads=pth
16047                         ol_with_threads=found
16048
16049                         if test $ol_with_yielding_select = auto ; then
16050                                 ol_with_yielding_select=yes
16051                         fi
16052                 fi
16053         fi
16054 fi
16055
16056 if test $ol_with_threads = auto -o $ol_with_threads = yes \
16057         -o $ol_with_threads = lwp ; then
16058
16059                 for ac_hdr in thread.h synch.h
16060 do
16061 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16062 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16063 echo "configure:16064: checking for $ac_hdr" >&5
16064 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16065   echo $ac_n "(cached) $ac_c" 1>&6
16066 else
16067   cat > conftest.$ac_ext <<EOF
16068 #line 16069 "configure"
16069 #include "confdefs.h"
16070 #include <$ac_hdr>
16071 EOF
16072 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16073 { (eval echo configure:16074: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16074 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16075 if test -z "$ac_err"; then
16076   rm -rf conftest*
16077   eval "ac_cv_header_$ac_safe=yes"
16078 else
16079   echo "$ac_err" >&5
16080   echo "configure: failed program was:" >&5
16081   cat conftest.$ac_ext >&5
16082   rm -rf conftest*
16083   eval "ac_cv_header_$ac_safe=no"
16084 fi
16085 rm -f conftest*
16086 fi
16087 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16088   echo "$ac_t""yes" 1>&6
16089     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16090   cat >> confdefs.h <<EOF
16091 #define $ac_tr_hdr 1
16092 EOF
16093  
16094 else
16095   echo "$ac_t""no" 1>&6
16096 fi
16097 done
16098
16099         if test $ac_cv_header_thread_h = yes -a $ac_cv_header_synch_h = yes ; then
16100                 echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6
16101 echo "configure:16102: checking for thr_create in -lthread" >&5
16102 ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-:%__p__%'`
16103 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
16104   echo $ac_n "(cached) $ac_c" 1>&6
16105 else
16106   ac_save_LIBS="$LIBS"
16107 LIBS="-lthread  $LIBS"
16108 cat > conftest.$ac_ext <<EOF
16109 #line 16110 "configure"
16110 #include "confdefs.h"
16111 /* Override any gcc2 internal prototype to avoid an error.  */
16112 /* We use char because int might match the return type of a gcc2
16113     builtin and then its argument prototype would still apply.  */
16114 char thr_create();
16115
16116 int main() {
16117 thr_create()
16118 ; return 0; }
16119 EOF
16120 if { (eval echo configure:16121: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16121   rm -rf conftest*
16122   eval "ac_cv_lib_$ac_lib_var=yes"
16123 else
16124   echo "configure: failed program was:" >&5
16125   cat conftest.$ac_ext >&5
16126   rm -rf conftest*
16127   eval "ac_cv_lib_$ac_lib_var=no"
16128 fi
16129 rm -f conftest*
16130 LIBS="$ac_save_LIBS"
16131
16132 fi
16133 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
16134   echo "$ac_t""yes" 1>&6
16135   have_thr=yes
16136 else
16137   echo "$ac_t""no" 1>&6
16138 have_thr=no
16139 fi
16140
16141
16142                 if test $have_thr = yes ; then
16143                         cat >> confdefs.h <<\EOF
16144 #define HAVE_THR 1
16145 EOF
16146
16147                         LTHREAD_LIBS="$LTHREAD_LIBS -lthread"
16148                         ol_link_threads=thr
16149
16150                         if test $ol_with_yielding_select = auto ; then
16151                                 ol_with_yielding_select=yes
16152                         fi
16153
16154                                                 for ac_func in \
16155                                 thr_setconcurrency \
16156                                 thr_getconcurrency \
16157                         
16158 do
16159 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
16160 echo "configure:16161: checking for $ac_func" >&5
16161 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
16162   echo $ac_n "(cached) $ac_c" 1>&6
16163 else
16164   cat > conftest.$ac_ext <<EOF
16165 #line 16166 "configure"
16166 #include "confdefs.h"
16167 /* System header to define __stub macros and hopefully few prototypes,
16168     which can conflict with char $ac_func(); below.  */
16169 #include <assert.h>
16170 /* Override any gcc2 internal prototype to avoid an error.  */
16171 /* We use char because int might match the return type of a gcc2
16172     builtin and then its argument prototype would still apply.  */
16173 char $ac_func();
16174 char (*f)();
16175
16176 int main() {
16177
16178 /* The GNU C library defines this for functions which it implements
16179     to always fail with ENOSYS.  Some functions are actually named
16180     something starting with __ and the normal name is an alias.  */
16181 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16182 choke me
16183 #else
16184 f = $ac_func;
16185 #endif
16186
16187 ; return 0; }
16188 EOF
16189 if { (eval echo configure:16190: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16190   rm -rf conftest*
16191   eval "ac_cv_func_$ac_func=yes"
16192 else
16193   echo "configure: failed program was:" >&5
16194   cat conftest.$ac_ext >&5
16195   rm -rf conftest*
16196   eval "ac_cv_func_$ac_func=no"
16197 fi
16198 rm -f conftest*
16199 fi
16200
16201 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
16202   echo "$ac_t""yes" 1>&6
16203     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
16204   cat >> confdefs.h <<EOF
16205 #define $ac_tr_func 1
16206 EOF
16207  
16208 else
16209   echo "$ac_t""no" 1>&6
16210 fi
16211 done
16212
16213                 fi
16214         fi
16215
16216                 for ac_hdr in lwp/lwp.h
16217 do
16218 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16219 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16220 echo "configure:16221: checking for $ac_hdr" >&5
16221 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16222   echo $ac_n "(cached) $ac_c" 1>&6
16223 else
16224   cat > conftest.$ac_ext <<EOF
16225 #line 16226 "configure"
16226 #include "confdefs.h"
16227 #include <$ac_hdr>
16228 EOF
16229 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16230 { (eval echo configure:16231: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16231 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16232 if test -z "$ac_err"; then
16233   rm -rf conftest*
16234   eval "ac_cv_header_$ac_safe=yes"
16235 else
16236   echo "$ac_err" >&5
16237   echo "configure: failed program was:" >&5
16238   cat conftest.$ac_ext >&5
16239   rm -rf conftest*
16240   eval "ac_cv_header_$ac_safe=no"
16241 fi
16242 rm -f conftest*
16243 fi
16244 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16245   echo "$ac_t""yes" 1>&6
16246     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16247   cat >> confdefs.h <<EOF
16248 #define $ac_tr_hdr 1
16249 EOF
16250  
16251 else
16252   echo "$ac_t""no" 1>&6
16253 fi
16254 done
16255
16256         if test $ac_cv_header_lwp_lwp_h = yes ; then
16257                 echo $ac_n "checking for lwp_create in -llwp""... $ac_c" 1>&6
16258 echo "configure:16259: checking for lwp_create in -llwp" >&5
16259 ac_lib_var=`echo lwp'_'lwp_create | sed 'y%./+-:%__p__%'`
16260 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
16261   echo $ac_n "(cached) $ac_c" 1>&6
16262 else
16263   ac_save_LIBS="$LIBS"
16264 LIBS="-llwp  $LIBS"
16265 cat > conftest.$ac_ext <<EOF
16266 #line 16267 "configure"
16267 #include "confdefs.h"
16268 /* Override any gcc2 internal prototype to avoid an error.  */
16269 /* We use char because int might match the return type of a gcc2
16270     builtin and then its argument prototype would still apply.  */
16271 char lwp_create();
16272
16273 int main() {
16274 lwp_create()
16275 ; return 0; }
16276 EOF
16277 if { (eval echo configure:16278: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16278   rm -rf conftest*
16279   eval "ac_cv_lib_$ac_lib_var=yes"
16280 else
16281   echo "configure: failed program was:" >&5
16282   cat conftest.$ac_ext >&5
16283   rm -rf conftest*
16284   eval "ac_cv_lib_$ac_lib_var=no"
16285 fi
16286 rm -f conftest*
16287 LIBS="$ac_save_LIBS"
16288
16289 fi
16290 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
16291   echo "$ac_t""yes" 1>&6
16292   have_lwp=yes
16293 else
16294   echo "$ac_t""no" 1>&6
16295 have_lwp=no
16296 fi
16297
16298
16299                 if test $have_lwp = yes ; then
16300                         cat >> confdefs.h <<\EOF
16301 #define HAVE_LWP 1
16302 EOF
16303
16304                         LTHREAD_LIBS="$LTHREAD_LIBS -llwp"
16305                         ol_link_threads=lwp
16306
16307                         if test $ol_with_yielding_select = auto ; then
16308                                 ol_with_yielding_select=no
16309                         fi
16310                 fi
16311         fi
16312 fi
16313
16314 if test $ol_with_yielding_select = yes ; then
16315         cat >> confdefs.h <<\EOF
16316 #define HAVE_YIELDING_SELECT 1
16317 EOF
16318
16319 fi
16320
16321 if test $ol_with_threads = manual ; then
16322                 ol_link_threads=yes
16323
16324         echo "configure: warning: thread defines and link options must be set manually" 1>&2
16325
16326         for ac_hdr in pthread.h sched.h
16327 do
16328 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16329 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16330 echo "configure:16331: checking for $ac_hdr" >&5
16331 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16332   echo $ac_n "(cached) $ac_c" 1>&6
16333 else
16334   cat > conftest.$ac_ext <<EOF
16335 #line 16336 "configure"
16336 #include "confdefs.h"
16337 #include <$ac_hdr>
16338 EOF
16339 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16340 { (eval echo configure:16341: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16341 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16342 if test -z "$ac_err"; then
16343   rm -rf conftest*
16344   eval "ac_cv_header_$ac_safe=yes"
16345 else
16346   echo "$ac_err" >&5
16347   echo "configure: failed program was:" >&5
16348   cat conftest.$ac_ext >&5
16349   rm -rf conftest*
16350   eval "ac_cv_header_$ac_safe=no"
16351 fi
16352 rm -f conftest*
16353 fi
16354 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16355   echo "$ac_t""yes" 1>&6
16356     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16357   cat >> confdefs.h <<EOF
16358 #define $ac_tr_hdr 1
16359 EOF
16360  
16361 else
16362   echo "$ac_t""no" 1>&6
16363 fi
16364 done
16365
16366         for ac_func in sched_yield pthread_yield
16367 do
16368 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
16369 echo "configure:16370: checking for $ac_func" >&5
16370 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
16371   echo $ac_n "(cached) $ac_c" 1>&6
16372 else
16373   cat > conftest.$ac_ext <<EOF
16374 #line 16375 "configure"
16375 #include "confdefs.h"
16376 /* System header to define __stub macros and hopefully few prototypes,
16377     which can conflict with char $ac_func(); below.  */
16378 #include <assert.h>
16379 /* Override any gcc2 internal prototype to avoid an error.  */
16380 /* We use char because int might match the return type of a gcc2
16381     builtin and then its argument prototype would still apply.  */
16382 char $ac_func();
16383 char (*f)();
16384
16385 int main() {
16386
16387 /* The GNU C library defines this for functions which it implements
16388     to always fail with ENOSYS.  Some functions are actually named
16389     something starting with __ and the normal name is an alias.  */
16390 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16391 choke me
16392 #else
16393 f = $ac_func;
16394 #endif
16395
16396 ; return 0; }
16397 EOF
16398 if { (eval echo configure:16399: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16399   rm -rf conftest*
16400   eval "ac_cv_func_$ac_func=yes"
16401 else
16402   echo "configure: failed program was:" >&5
16403   cat conftest.$ac_ext >&5
16404   rm -rf conftest*
16405   eval "ac_cv_func_$ac_func=no"
16406 fi
16407 rm -f conftest*
16408 fi
16409
16410 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
16411   echo "$ac_t""yes" 1>&6
16412     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
16413   cat >> confdefs.h <<EOF
16414 #define $ac_tr_func 1
16415 EOF
16416  
16417 else
16418   echo "$ac_t""no" 1>&6
16419 fi
16420 done
16421
16422         
16423         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
16424 echo "configure:16425: checking for LinuxThreads pthread.h" >&5
16425 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
16426   echo $ac_n "(cached) $ac_c" 1>&6
16427 else
16428   cat > conftest.$ac_ext <<EOF
16429 #line 16430 "configure"
16430 #include "confdefs.h"
16431 #include <pthread.h>
16432 EOF
16433 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16434   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
16435   rm -rf conftest*
16436   ol_cv_header_linux_threads=yes
16437 else
16438   rm -rf conftest*
16439   ol_cv_header_linux_threads=no
16440 fi
16441 rm -f conftest*
16442
16443                 
16444 fi
16445
16446 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
16447         if test $ol_cv_header_linux_threads = yes; then
16448                 cat >> confdefs.h <<\EOF
16449 #define HAVE_LINUX_THREADS 1
16450 EOF
16451
16452         fi
16453
16454
16455         for ac_hdr in mach/cthreads.h
16456 do
16457 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16458 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16459 echo "configure:16460: checking for $ac_hdr" >&5
16460 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16461   echo $ac_n "(cached) $ac_c" 1>&6
16462 else
16463   cat > conftest.$ac_ext <<EOF
16464 #line 16465 "configure"
16465 #include "confdefs.h"
16466 #include <$ac_hdr>
16467 EOF
16468 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16469 { (eval echo configure:16470: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16470 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16471 if test -z "$ac_err"; then
16472   rm -rf conftest*
16473   eval "ac_cv_header_$ac_safe=yes"
16474 else
16475   echo "$ac_err" >&5
16476   echo "configure: failed program was:" >&5
16477   cat conftest.$ac_ext >&5
16478   rm -rf conftest*
16479   eval "ac_cv_header_$ac_safe=no"
16480 fi
16481 rm -f conftest*
16482 fi
16483 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16484   echo "$ac_t""yes" 1>&6
16485     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16486   cat >> confdefs.h <<EOF
16487 #define $ac_tr_hdr 1
16488 EOF
16489  
16490 else
16491   echo "$ac_t""no" 1>&6
16492 fi
16493 done
16494
16495         for ac_hdr in lwp/lwp.h
16496 do
16497 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16498 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16499 echo "configure:16500: checking for $ac_hdr" >&5
16500 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16501   echo $ac_n "(cached) $ac_c" 1>&6
16502 else
16503   cat > conftest.$ac_ext <<EOF
16504 #line 16505 "configure"
16505 #include "confdefs.h"
16506 #include <$ac_hdr>
16507 EOF
16508 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16509 { (eval echo configure:16510: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16510 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16511 if test -z "$ac_err"; then
16512   rm -rf conftest*
16513   eval "ac_cv_header_$ac_safe=yes"
16514 else
16515   echo "$ac_err" >&5
16516   echo "configure: failed program was:" >&5
16517   cat conftest.$ac_ext >&5
16518   rm -rf conftest*
16519   eval "ac_cv_header_$ac_safe=no"
16520 fi
16521 rm -f conftest*
16522 fi
16523 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16524   echo "$ac_t""yes" 1>&6
16525     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16526   cat >> confdefs.h <<EOF
16527 #define $ac_tr_hdr 1
16528 EOF
16529  
16530 else
16531   echo "$ac_t""no" 1>&6
16532 fi
16533 done
16534
16535         for ac_hdr in thread.h synch.h
16536 do
16537 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16538 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16539 echo "configure:16540: checking for $ac_hdr" >&5
16540 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16541   echo $ac_n "(cached) $ac_c" 1>&6
16542 else
16543   cat > conftest.$ac_ext <<EOF
16544 #line 16545 "configure"
16545 #include "confdefs.h"
16546 #include <$ac_hdr>
16547 EOF
16548 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16549 { (eval echo configure:16550: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16550 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16551 if test -z "$ac_err"; then
16552   rm -rf conftest*
16553   eval "ac_cv_header_$ac_safe=yes"
16554 else
16555   echo "$ac_err" >&5
16556   echo "configure: failed program was:" >&5
16557   cat conftest.$ac_ext >&5
16558   rm -rf conftest*
16559   eval "ac_cv_header_$ac_safe=no"
16560 fi
16561 rm -f conftest*
16562 fi
16563 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16564   echo "$ac_t""yes" 1>&6
16565     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16566   cat >> confdefs.h <<EOF
16567 #define $ac_tr_hdr 1
16568 EOF
16569  
16570 else
16571   echo "$ac_t""no" 1>&6
16572 fi
16573 done
16574
16575 fi
16576
16577 if test $ol_link_threads != no -a $ol_link_threads != nt ; then  
16578                         cat >> confdefs.h <<\EOF
16579 #define REENTRANT 1
16580 EOF
16581
16582         cat >> confdefs.h <<\EOF
16583 #define _REENTRANT 1
16584 EOF
16585
16586         cat >> confdefs.h <<\EOF
16587 #define THREAD_SAFE 1
16588 EOF
16589
16590         cat >> confdefs.h <<\EOF
16591 #define _THREAD_SAFE 1
16592 EOF
16593
16594         cat >> confdefs.h <<\EOF
16595 #define THREADSAFE 1
16596 EOF
16597
16598         cat >> confdefs.h <<\EOF
16599 #define _THREADSAFE 1
16600 EOF
16601
16602         cat >> confdefs.h <<\EOF
16603 #define _SGI_MP_SOURCE 1
16604 EOF
16605
16606
16607                         echo $ac_n "checking for thread specific errno""... $ac_c" 1>&6
16608 echo "configure:16609: checking for thread specific errno" >&5
16609 if eval "test \"\${ol_cv_errno_thread_specific+set}\" = set"; then
16610   echo $ac_n "(cached) $ac_c" 1>&6
16611 else
16612   
16613                 cat > conftest.$ac_ext <<EOF
16614 #line 16615 "configure"
16615 #include "confdefs.h"
16616 #include <errno.h>
16617 int main() {
16618 errno = 0;
16619 ; return 0; }
16620 EOF
16621 if { (eval echo configure:16622: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16622   rm -rf conftest*
16623   ol_cv_errno_thread_specific=yes
16624 else
16625   echo "configure: failed program was:" >&5
16626   cat conftest.$ac_ext >&5
16627   rm -rf conftest*
16628   ol_cv_errno_thread_specific=no
16629 fi
16630 rm -f conftest*
16631         
16632 fi
16633
16634 echo "$ac_t""$ol_cv_errno_thread_specific" 1>&6
16635
16636                         echo $ac_n "checking for thread specific h_errno""... $ac_c" 1>&6
16637 echo "configure:16638: checking for thread specific h_errno" >&5
16638 if eval "test \"\${ol_cv_h_errno_thread_specific+set}\" = set"; then
16639   echo $ac_n "(cached) $ac_c" 1>&6
16640 else
16641   
16642                 cat > conftest.$ac_ext <<EOF
16643 #line 16644 "configure"
16644 #include "confdefs.h"
16645 #include <netdb.h>
16646 int main() {
16647 h_errno = 0;
16648 ; return 0; }
16649 EOF
16650 if { (eval echo configure:16651: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16651   rm -rf conftest*
16652   ol_cv_h_errno_thread_specific=yes
16653 else
16654   echo "configure: failed program was:" >&5
16655   cat conftest.$ac_ext >&5
16656   rm -rf conftest*
16657   ol_cv_h_errno_thread_specific=no
16658 fi
16659 rm -f conftest*
16660         
16661 fi
16662
16663 echo "$ac_t""$ol_cv_h_errno_thread_specific" 1>&6
16664
16665         if test $ol_cv_errno_thread_specific != yes \
16666                 -o $ol_cv_h_errno_thread_specific != yes ; then
16667                 LIBS="$LTHREAD_LIBS $LIBS"
16668                 LTHREAD_LIBS=""
16669         fi
16670
16671 fi  
16672
16673 if test $ol_link_threads = no ; then
16674         if test $ol_with_threads = yes ; then
16675                 { echo "configure: error: no suitable thread support" 1>&2; exit 1; }
16676         fi
16677
16678         if test $ol_with_threads = auto ; then
16679                 echo "configure: warning: no suitable thread support, disabling threads" 1>&2
16680                 ol_with_threads=no
16681         fi
16682
16683         cat >> confdefs.h <<\EOF
16684 #define NO_THREADS 1
16685 EOF
16686
16687         LTHREAD_LIBS=""
16688 fi
16689
16690 if test $ol_link_threads != no ; then
16691         cat >> confdefs.h <<\EOF
16692 #define LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE 1
16693 EOF
16694
16695 fi
16696
16697 for ac_func in \
16698         ctime_r                 \
16699         gethostbyname_r gethostbyaddr_r \
16700
16701 do
16702 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
16703 echo "configure:16704: checking for $ac_func" >&5
16704 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
16705   echo $ac_n "(cached) $ac_c" 1>&6
16706 else
16707   cat > conftest.$ac_ext <<EOF
16708 #line 16709 "configure"
16709 #include "confdefs.h"
16710 /* System header to define __stub macros and hopefully few prototypes,
16711     which can conflict with char $ac_func(); below.  */
16712 #include <assert.h>
16713 /* Override any gcc2 internal prototype to avoid an error.  */
16714 /* We use char because int might match the return type of a gcc2
16715     builtin and then its argument prototype would still apply.  */
16716 char $ac_func();
16717 char (*f)();
16718
16719 int main() {
16720
16721 /* The GNU C library defines this for functions which it implements
16722     to always fail with ENOSYS.  Some functions are actually named
16723     something starting with __ and the normal name is an alias.  */
16724 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16725 choke me
16726 #else
16727 f = $ac_func;
16728 #endif
16729
16730 ; return 0; }
16731 EOF
16732 if { (eval echo configure:16733: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16733   rm -rf conftest*
16734   eval "ac_cv_func_$ac_func=yes"
16735 else
16736   echo "configure: failed program was:" >&5
16737   cat conftest.$ac_ext >&5
16738   rm -rf conftest*
16739   eval "ac_cv_func_$ac_func=no"
16740 fi
16741 rm -f conftest*
16742 fi
16743
16744 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
16745   echo "$ac_t""yes" 1>&6
16746     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
16747   cat >> confdefs.h <<EOF
16748 #define $ac_tr_func 1
16749 EOF
16750  
16751 else
16752   echo "$ac_t""no" 1>&6
16753 fi
16754 done
16755
16756
16757 if test "$ac_cv_func_ctime_r" = no ; then
16758         ol_cv_func_ctime_r_nargs=0
16759 else
16760         echo $ac_n "checking number of arguments of ctime_r""... $ac_c" 1>&6
16761 echo "configure:16762: checking number of arguments of ctime_r" >&5
16762 if eval "test \"\${ol_cv_func_ctime_r_nargs+set}\" = set"; then
16763   echo $ac_n "(cached) $ac_c" 1>&6
16764 else
16765   cat > conftest.$ac_ext <<EOF
16766 #line 16767 "configure"
16767 #include "confdefs.h"
16768 #include <time.h>
16769 int main() {
16770 time_t ti; char *buffer; ctime_r(&ti,buffer,32);
16771 ; return 0; }
16772 EOF
16773 if { (eval echo configure:16774: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16774   rm -rf conftest*
16775   ol_cv_func_ctime_r_nargs3=yes
16776 else
16777   echo "configure: failed program was:" >&5
16778   cat conftest.$ac_ext >&5
16779   rm -rf conftest*
16780   ol_cv_func_ctime_r_nargs3=no
16781 fi
16782 rm -f conftest*
16783
16784         cat > conftest.$ac_ext <<EOF
16785 #line 16786 "configure"
16786 #include "confdefs.h"
16787 #include <time.h>
16788 int main() {
16789 time_t ti; char *buffer; ctime_r(&ti,buffer);
16790 ; return 0; }
16791 EOF
16792 if { (eval echo configure:16793: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16793   rm -rf conftest*
16794   ol_cv_func_ctime_r_nargs2=yes
16795 else
16796   echo "configure: failed program was:" >&5
16797   cat conftest.$ac_ext >&5
16798   rm -rf conftest*
16799   ol_cv_func_ctime_r_nargs2=no
16800 fi
16801 rm -f conftest*
16802
16803         if test $ol_cv_func_ctime_r_nargs3 = yes -a \
16804                 $ol_cv_func_ctime_r_nargs2 = no ; then
16805
16806                 ol_cv_func_ctime_r_nargs=3
16807
16808         elif test $ol_cv_func_ctime_r_nargs3 = no -a \
16809                 $ol_cv_func_ctime_r_nargs2 = yes ; then
16810
16811                 ol_cv_func_ctime_r_nargs=2
16812
16813         else
16814                 ol_cv_func_ctime_r_nargs=0
16815         fi
16816   
16817 fi
16818
16819 echo "$ac_t""$ol_cv_func_ctime_r_nargs" 1>&6
16820
16821   if test $ol_cv_func_ctime_r_nargs -gt 1 ; then
16822         cat >> confdefs.h <<EOF
16823 #define CTIME_R_NARGS $ol_cv_func_ctime_r_nargs
16824 EOF
16825
16826   fi
16827
16828 fi
16829
16830 if test "$ac_cv_func_gethostbyname_r" = yes ; then
16831         echo $ac_n "checking number of arguments of gethostbyname_r""... $ac_c" 1>&6
16832 echo "configure:16833: checking number of arguments of gethostbyname_r" >&5
16833 if eval "test \"\${ol_cv_func_gethostbyname_r_nargs+set}\" = set"; then
16834   echo $ac_n "(cached) $ac_c" 1>&6
16835 else
16836   cat > conftest.$ac_ext <<EOF
16837 #line 16838 "configure"
16838 #include "confdefs.h"
16839 #include <sys/types.h>
16840 #include <sys/socket.h>
16841 #include <netinet/in.h>
16842 #include <netdb.h>
16843 #define BUFSIZE (sizeof(struct hostent)+10)
16844 int main() {
16845 struct hostent hent; char buffer[BUFSIZE];
16846                 int bufsize=BUFSIZE;int h_errno;
16847                 (void)gethostbyname_r("segovia.cs.purdue.edu", &hent,
16848                         buffer, bufsize, &h_errno);
16849 ; return 0; }
16850 EOF
16851 if { (eval echo configure:16852: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16852   rm -rf conftest*
16853   ol_cv_func_gethostbyname_r_nargs5=yes
16854 else
16855   echo "configure: failed program was:" >&5
16856   cat conftest.$ac_ext >&5
16857   rm -rf conftest*
16858   ol_cv_func_gethostbyname_r_nargs5=no
16859 fi
16860 rm -f conftest*
16861
16862         cat > conftest.$ac_ext <<EOF
16863 #line 16864 "configure"
16864 #include "confdefs.h"
16865 #include <sys/types.h>
16866 #include <sys/socket.h>
16867 #include <netinet/in.h>
16868 #include <netdb.h>
16869 #define BUFSIZE (sizeof(struct hostent)+10)
16870 int main() {
16871 struct hostent hent;struct hostent *rhent;
16872                 char buffer[BUFSIZE];
16873                 int bufsize=BUFSIZE;int h_errno;
16874                 (void)gethostbyname_r("localhost", &hent, buffer, bufsize,
16875                         &rhent, &h_errno);
16876 ; return 0; }
16877 EOF
16878 if { (eval echo configure:16879: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16879   rm -rf conftest*
16880   ol_cv_func_gethostbyname_r_nargs6=yes
16881 else
16882   echo "configure: failed program was:" >&5
16883   cat conftest.$ac_ext >&5
16884   rm -rf conftest*
16885   ol_cv_func_gethostbyname_r_nargs6=no
16886 fi
16887 rm -f conftest*
16888
16889         if test $ol_cv_func_gethostbyname_r_nargs5 = yes -a \
16890                 $ol_cv_func_gethostbyname_r_nargs6 = no ; then
16891
16892                 ol_cv_func_gethostbyname_r_nargs=5
16893
16894         elif test $ol_cv_func_gethostbyname_r_nargs5 = no -a \
16895                 $ol_cv_func_gethostbyname_r_nargs6 = yes ; then
16896
16897                 ol_cv_func_gethostbyname_r_nargs=6
16898
16899         else
16900                 ol_cv_func_gethostbyname_r_nargs=0
16901         fi
16902   
16903 fi
16904
16905 echo "$ac_t""$ol_cv_func_gethostbyname_r_nargs" 1>&6
16906   if test $ol_cv_func_gethostbyname_r_nargs -gt 1 ; then
16907         cat >> confdefs.h <<EOF
16908 #define GETHOSTBYNAME_R_NARGS $ol_cv_func_gethostbyname_r_nargs
16909 EOF
16910
16911   fi
16912
16913 else
16914         ol_cv_func_gethostbyname_r_nargs=0
16915 fi
16916  
16917 if test "$ac_cv_func_gethostbyaddr_r" = yes ; then
16918         echo $ac_n "checking number of arguments of gethostbyaddr_r""... $ac_c" 1>&6
16919 echo "configure:16920: checking number of arguments of gethostbyaddr_r" >&5
16920 if eval "test \"\${ol_cv_func_gethostbyaddr_r_nargs+set}\" = set"; then
16921   echo $ac_n "(cached) $ac_c" 1>&6
16922 else
16923   cat > conftest.$ac_ext <<EOF
16924 #line 16925 "configure"
16925 #include "confdefs.h"
16926 #include <sys/types.h>
16927 #include <sys/socket.h>
16928 #include <netinet/in.h>
16929 #include <netdb.h>
16930 #define BUFSIZE (sizeof(struct hostent)+10)
16931 int main() {
16932 struct hostent hent; char buffer[BUFSIZE]; 
16933             struct in_addr add;
16934             size_t alen=sizeof(struct in_addr);
16935             int bufsize=BUFSIZE;int h_errno;
16936                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
16937                         alen, AF_INET, &hent, buffer, bufsize, &h_errno);
16938 ; return 0; }
16939 EOF
16940 if { (eval echo configure:16941: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16941   rm -rf conftest*
16942   ol_cv_func_gethostbyaddr_r_nargs7=yes
16943 else
16944   echo "configure: failed program was:" >&5
16945   cat conftest.$ac_ext >&5
16946   rm -rf conftest*
16947   ol_cv_func_gethostbyaddr_r_nargs7=no
16948 fi
16949 rm -f conftest*
16950
16951         cat > conftest.$ac_ext <<EOF
16952 #line 16953 "configure"
16953 #include "confdefs.h"
16954 #include <sys/types.h>
16955 #include <sys/socket.h>
16956 #include <netinet/in.h>
16957 #include <netdb.h>
16958 #define BUFSIZE (sizeof(struct hostent)+10)
16959 int main() {
16960 struct hostent hent;
16961                 struct hostent *rhent; char buffer[BUFSIZE]; 
16962                 struct in_addr add;
16963                 size_t alen=sizeof(struct in_addr);
16964                 int bufsize=BUFSIZE;int h_errno;
16965                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
16966                         alen, AF_INET, &hent, buffer, bufsize, 
16967                         &rhent, &h_errno);
16968 ; return 0; }
16969 EOF
16970 if { (eval echo configure:16971: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16971   rm -rf conftest*
16972   ol_cv_func_gethostbyaddr_r_nargs8=yes
16973 else
16974   echo "configure: failed program was:" >&5
16975   cat conftest.$ac_ext >&5
16976   rm -rf conftest*
16977   ol_cv_func_gethostbyaddr_r_nargs8=no
16978 fi
16979 rm -f conftest*
16980
16981         if test $ol_cv_func_gethostbyaddr_r_nargs7 = yes -a \
16982                 $ol_cv_func_gethostbyaddr_r_nargs8 = no ; then
16983
16984                 ol_cv_func_gethostbyaddr_r_nargs=7
16985
16986         elif test $ol_cv_func_gethostbyaddr_r_nargs7 = no -a \
16987                 $ol_cv_func_gethostbyaddr_r_nargs8 = yes ; then
16988
16989                 ol_cv_func_gethostbyaddr_r_nargs=8
16990
16991         else
16992                 ol_cv_func_gethostbyaddr_r_nargs=0
16993         fi
16994   
16995 fi
16996
16997 echo "$ac_t""$ol_cv_func_gethostbyaddr_r_nargs" 1>&6
16998   if test $ol_cv_func_gethostbyaddr_r_nargs -gt 1 ; then
16999     cat >> confdefs.h <<EOF
17000 #define GETHOSTBYADDR_R_NARGS $ol_cv_func_gethostbyaddr_r_nargs
17001 EOF
17002
17003   fi
17004
17005 else
17006         ol_cv_func_gethostbyaddr_r_nargs=0
17007 fi
17008
17009 ol_link_ldbm=no 
17010
17011 if test $ol_with_ldbm_api = auto \
17012         -o $ol_with_ldbm_api = berkeley \
17013         -o $ol_with_ldbm_api = bcompat ; then
17014
17015         if test $ol_with_ldbm_api = bcompat; then \
17016                 for ac_hdr in db_185.h db.h
17017 do
17018 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
17019 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
17020 echo "configure:17021: checking for $ac_hdr" >&5
17021 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
17022   echo $ac_n "(cached) $ac_c" 1>&6
17023 else
17024   cat > conftest.$ac_ext <<EOF
17025 #line 17026 "configure"
17026 #include "confdefs.h"
17027 #include <$ac_hdr>
17028 EOF
17029 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
17030 { (eval echo configure:17031: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
17031 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
17032 if test -z "$ac_err"; then
17033   rm -rf conftest*
17034   eval "ac_cv_header_$ac_safe=yes"
17035 else
17036   echo "$ac_err" >&5
17037   echo "configure: failed program was:" >&5
17038   cat conftest.$ac_ext >&5
17039   rm -rf conftest*
17040   eval "ac_cv_header_$ac_safe=no"
17041 fi
17042 rm -f conftest*
17043 fi
17044 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
17045   echo "$ac_t""yes" 1>&6
17046     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
17047   cat >> confdefs.h <<EOF
17048 #define $ac_tr_hdr 1
17049 EOF
17050  
17051 else
17052   echo "$ac_t""no" 1>&6
17053 fi
17054 done
17055
17056 if test $ac_cv_header_db_185_h = yes -o $ac_cv_header_db_h = yes; then
17057         echo $ac_n "checking if Berkeley DB header compatibility""... $ac_c" 1>&6
17058 echo "configure:17059: checking if Berkeley DB header compatibility" >&5
17059 if eval "test \"\${ol_cv_header_db1+set}\" = set"; then
17060   echo $ac_n "(cached) $ac_c" 1>&6
17061 else
17062   
17063                 cat > conftest.$ac_ext <<EOF
17064 #line 17065 "configure"
17065 #include "confdefs.h"
17066
17067 #if HAVE_DB_185_H
17068 #       include <db_185.h>
17069 #else
17070 #       include <db.h>
17071 #endif
17072
17073  /* this check could be improved */
17074 #ifndef DB_VERSION_MAJOR
17075 #       define DB_VERSION_MAJOR 1
17076 #endif
17077
17078 #if DB_VERSION_MAJOR == 1 
17079         __db_version_1
17080 #endif
17081
17082 EOF
17083 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
17084   egrep "__db_version_1" >/dev/null 2>&1; then
17085   rm -rf conftest*
17086   ol_cv_header_db1=yes
17087 else
17088   rm -rf conftest*
17089   ol_cv_header_db1=no
17090 fi
17091 rm -f conftest*
17092
17093 fi
17094
17095 echo "$ac_t""$ol_cv_header_db1" 1>&6
17096
17097         if test $ol_cv_header_db1 = yes ; then
17098                 ol_cv_lib_db=no
17099 if test $ol_cv_lib_db = no ; then
17100         echo $ac_n "checking for Berkeley DB link (default)""... $ac_c" 1>&6
17101 echo "configure:17102: checking for Berkeley DB link (default)" >&5
17102 if eval "test \"\${ol_cv_db_none+set}\" = set"; then
17103   echo $ac_n "(cached) $ac_c" 1>&6
17104 else
17105   
17106         ol_DB_LIB=
17107         ol_LIBS=$LIBS
17108         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17109
17110         cat > conftest.$ac_ext <<EOF
17111 #line 17112 "configure"
17112 #include "confdefs.h"
17113
17114 #ifdef HAVE_DB_185_H
17115 # include <db_185.h>
17116 #else
17117 # include <db.h>
17118 #endif
17119
17120 #ifndef DB_VERSION_MAJOR
17121 # define DB_VERSION_MAJOR 1
17122 #endif
17123
17124 #ifndef NULL
17125 #define NULL ((void*)0)
17126 #endif
17127
17128 int main() {
17129
17130 #if DB_VERSION_MAJOR > 1
17131         {
17132                 char *version;
17133                 int major, minor, patch;
17134
17135                 version = db_version( &major, &minor, &patch );
17136
17137                 if( major != DB_VERSION_MAJOR ||
17138                         minor < DB_VERSION_MINOR )
17139                 {
17140                         printf("Berkeley DB version mismatch\n"
17141                                 "\theader: %s\n\tlibrary: %s\n",
17142                                 DB_VERSION_STRING, version);
17143                         return 1;
17144                 }
17145         }
17146 #endif
17147
17148 #if DB_VERSION_MAJOR > 2
17149         db_env_create( NULL, 0 );
17150 #elif DB_VERSION_MAJOR > 1
17151         db_appexit( NULL );
17152 #else
17153         (void) dbopen( NULL, 0, 0, 0, NULL);
17154 #endif
17155
17156 ; return 0; }
17157 EOF
17158 if { (eval echo configure:17159: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17159   rm -rf conftest*
17160   ol_cv_db_none=yes
17161 else
17162   echo "configure: failed program was:" >&5
17163   cat conftest.$ac_ext >&5
17164   rm -rf conftest*
17165   ol_cv_db_none=no
17166 fi
17167 rm -f conftest*
17168
17169         LIBS="$ol_LIBS"
17170
17171 fi
17172
17173 echo "$ac_t""$ol_cv_db_none" 1>&6
17174
17175         if test $ol_cv_db_none = yes ; then
17176                 ol_cv_lib_db=yes
17177         fi
17178 fi
17179
17180 if test $ol_cv_lib_db = no ; then
17181         echo $ac_n "checking for Berkeley DB link (-ldb43)""... $ac_c" 1>&6
17182 echo "configure:17183: checking for Berkeley DB link (-ldb43)" >&5
17183 if eval "test \"\${ol_cv_db_db43+set}\" = set"; then
17184   echo $ac_n "(cached) $ac_c" 1>&6
17185 else
17186   
17187         ol_DB_LIB=-ldb43
17188         ol_LIBS=$LIBS
17189         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17190
17191         cat > conftest.$ac_ext <<EOF
17192 #line 17193 "configure"
17193 #include "confdefs.h"
17194
17195 #ifdef HAVE_DB_185_H
17196 # include <db_185.h>
17197 #else
17198 # include <db.h>
17199 #endif
17200
17201 #ifndef DB_VERSION_MAJOR
17202 # define DB_VERSION_MAJOR 1
17203 #endif
17204
17205 #ifndef NULL
17206 #define NULL ((void*)0)
17207 #endif
17208
17209 int main() {
17210
17211 #if DB_VERSION_MAJOR > 1
17212         {
17213                 char *version;
17214                 int major, minor, patch;
17215
17216                 version = db_version( &major, &minor, &patch );
17217
17218                 if( major != DB_VERSION_MAJOR ||
17219                         minor < DB_VERSION_MINOR )
17220                 {
17221                         printf("Berkeley DB version mismatch\n"
17222                                 "\theader: %s\n\tlibrary: %s\n",
17223                                 DB_VERSION_STRING, version);
17224                         return 1;
17225                 }
17226         }
17227 #endif
17228
17229 #if DB_VERSION_MAJOR > 2
17230         db_env_create( NULL, 0 );
17231 #elif DB_VERSION_MAJOR > 1
17232         db_appexit( NULL );
17233 #else
17234         (void) dbopen( NULL, 0, 0, 0, NULL);
17235 #endif
17236
17237 ; return 0; }
17238 EOF
17239 if { (eval echo configure:17240: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17240   rm -rf conftest*
17241   ol_cv_db_db43=yes
17242 else
17243   echo "configure: failed program was:" >&5
17244   cat conftest.$ac_ext >&5
17245   rm -rf conftest*
17246   ol_cv_db_db43=no
17247 fi
17248 rm -f conftest*
17249
17250         LIBS="$ol_LIBS"
17251
17252 fi
17253
17254 echo "$ac_t""$ol_cv_db_db43" 1>&6
17255
17256         if test $ol_cv_db_db43 = yes ; then
17257                 ol_cv_lib_db=-ldb43
17258         fi
17259 fi
17260
17261 if test $ol_cv_lib_db = no ; then
17262         echo $ac_n "checking for Berkeley DB link (-ldb-43)""... $ac_c" 1>&6
17263 echo "configure:17264: checking for Berkeley DB link (-ldb-43)" >&5
17264 if eval "test \"\${ol_cv_db_db_43+set}\" = set"; then
17265   echo $ac_n "(cached) $ac_c" 1>&6
17266 else
17267   
17268         ol_DB_LIB=-ldb-43
17269         ol_LIBS=$LIBS
17270         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17271
17272         cat > conftest.$ac_ext <<EOF
17273 #line 17274 "configure"
17274 #include "confdefs.h"
17275
17276 #ifdef HAVE_DB_185_H
17277 # include <db_185.h>
17278 #else
17279 # include <db.h>
17280 #endif
17281
17282 #ifndef DB_VERSION_MAJOR
17283 # define DB_VERSION_MAJOR 1
17284 #endif
17285
17286 #ifndef NULL
17287 #define NULL ((void*)0)
17288 #endif
17289
17290 int main() {
17291
17292 #if DB_VERSION_MAJOR > 1
17293         {
17294                 char *version;
17295                 int major, minor, patch;
17296
17297                 version = db_version( &major, &minor, &patch );
17298
17299                 if( major != DB_VERSION_MAJOR ||
17300                         minor < DB_VERSION_MINOR )
17301                 {
17302                         printf("Berkeley DB version mismatch\n"
17303                                 "\theader: %s\n\tlibrary: %s\n",
17304                                 DB_VERSION_STRING, version);
17305                         return 1;
17306                 }
17307         }
17308 #endif
17309
17310 #if DB_VERSION_MAJOR > 2
17311         db_env_create( NULL, 0 );
17312 #elif DB_VERSION_MAJOR > 1
17313         db_appexit( NULL );
17314 #else
17315         (void) dbopen( NULL, 0, 0, 0, NULL);
17316 #endif
17317
17318 ; return 0; }
17319 EOF
17320 if { (eval echo configure:17321: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17321   rm -rf conftest*
17322   ol_cv_db_db_43=yes
17323 else
17324   echo "configure: failed program was:" >&5
17325   cat conftest.$ac_ext >&5
17326   rm -rf conftest*
17327   ol_cv_db_db_43=no
17328 fi
17329 rm -f conftest*
17330
17331         LIBS="$ol_LIBS"
17332
17333 fi
17334
17335 echo "$ac_t""$ol_cv_db_db_43" 1>&6
17336
17337         if test $ol_cv_db_db_43 = yes ; then
17338                 ol_cv_lib_db=-ldb-43
17339         fi
17340 fi
17341
17342 if test $ol_cv_lib_db = no ; then
17343         echo $ac_n "checking for Berkeley DB link (-ldb-4.3)""... $ac_c" 1>&6
17344 echo "configure:17345: checking for Berkeley DB link (-ldb-4.3)" >&5
17345 if eval "test \"\${ol_cv_db_db_4_dot_3+set}\" = set"; then
17346   echo $ac_n "(cached) $ac_c" 1>&6
17347 else
17348   
17349         ol_DB_LIB=-ldb-4.3
17350         ol_LIBS=$LIBS
17351         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17352
17353         cat > conftest.$ac_ext <<EOF
17354 #line 17355 "configure"
17355 #include "confdefs.h"
17356
17357 #ifdef HAVE_DB_185_H
17358 # include <db_185.h>
17359 #else
17360 # include <db.h>
17361 #endif
17362
17363 #ifndef DB_VERSION_MAJOR
17364 # define DB_VERSION_MAJOR 1
17365 #endif
17366
17367 #ifndef NULL
17368 #define NULL ((void*)0)
17369 #endif
17370
17371 int main() {
17372
17373 #if DB_VERSION_MAJOR > 1
17374         {
17375                 char *version;
17376                 int major, minor, patch;
17377
17378                 version = db_version( &major, &minor, &patch );
17379
17380                 if( major != DB_VERSION_MAJOR ||
17381                         minor < DB_VERSION_MINOR )
17382                 {
17383                         printf("Berkeley DB version mismatch\n"
17384                                 "\theader: %s\n\tlibrary: %s\n",
17385                                 DB_VERSION_STRING, version);
17386                         return 1;
17387                 }
17388         }
17389 #endif
17390
17391 #if DB_VERSION_MAJOR > 2
17392         db_env_create( NULL, 0 );
17393 #elif DB_VERSION_MAJOR > 1
17394         db_appexit( NULL );
17395 #else
17396         (void) dbopen( NULL, 0, 0, 0, NULL);
17397 #endif
17398
17399 ; return 0; }
17400 EOF
17401 if { (eval echo configure:17402: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17402   rm -rf conftest*
17403   ol_cv_db_db_4_dot_3=yes
17404 else
17405   echo "configure: failed program was:" >&5
17406   cat conftest.$ac_ext >&5
17407   rm -rf conftest*
17408   ol_cv_db_db_4_dot_3=no
17409 fi
17410 rm -f conftest*
17411
17412         LIBS="$ol_LIBS"
17413
17414 fi
17415
17416 echo "$ac_t""$ol_cv_db_db_4_dot_3" 1>&6
17417
17418         if test $ol_cv_db_db_4_dot_3 = yes ; then
17419                 ol_cv_lib_db=-ldb-4.3
17420         fi
17421 fi
17422
17423 if test $ol_cv_lib_db = no ; then
17424         echo $ac_n "checking for Berkeley DB link (-ldb-4-3)""... $ac_c" 1>&6
17425 echo "configure:17426: checking for Berkeley DB link (-ldb-4-3)" >&5
17426 if eval "test \"\${ol_cv_db_db_4_3+set}\" = set"; then
17427   echo $ac_n "(cached) $ac_c" 1>&6
17428 else
17429   
17430         ol_DB_LIB=-ldb-4-3
17431         ol_LIBS=$LIBS
17432         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17433
17434         cat > conftest.$ac_ext <<EOF
17435 #line 17436 "configure"
17436 #include "confdefs.h"
17437
17438 #ifdef HAVE_DB_185_H
17439 # include <db_185.h>
17440 #else
17441 # include <db.h>
17442 #endif
17443
17444 #ifndef DB_VERSION_MAJOR
17445 # define DB_VERSION_MAJOR 1
17446 #endif
17447
17448 #ifndef NULL
17449 #define NULL ((void*)0)
17450 #endif
17451
17452 int main() {
17453
17454 #if DB_VERSION_MAJOR > 1
17455         {
17456                 char *version;
17457                 int major, minor, patch;
17458
17459                 version = db_version( &major, &minor, &patch );
17460
17461                 if( major != DB_VERSION_MAJOR ||
17462                         minor < DB_VERSION_MINOR )
17463                 {
17464                         printf("Berkeley DB version mismatch\n"
17465                                 "\theader: %s\n\tlibrary: %s\n",
17466                                 DB_VERSION_STRING, version);
17467                         return 1;
17468                 }
17469         }
17470 #endif
17471
17472 #if DB_VERSION_MAJOR > 2
17473         db_env_create( NULL, 0 );
17474 #elif DB_VERSION_MAJOR > 1
17475         db_appexit( NULL );
17476 #else
17477         (void) dbopen( NULL, 0, 0, 0, NULL);
17478 #endif
17479
17480 ; return 0; }
17481 EOF
17482 if { (eval echo configure:17483: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17483   rm -rf conftest*
17484   ol_cv_db_db_4_3=yes
17485 else
17486   echo "configure: failed program was:" >&5
17487   cat conftest.$ac_ext >&5
17488   rm -rf conftest*
17489   ol_cv_db_db_4_3=no
17490 fi
17491 rm -f conftest*
17492
17493         LIBS="$ol_LIBS"
17494
17495 fi
17496
17497 echo "$ac_t""$ol_cv_db_db_4_3" 1>&6
17498
17499         if test $ol_cv_db_db_4_3 = yes ; then
17500                 ol_cv_lib_db=-ldb-4-3
17501         fi
17502 fi
17503
17504 if test $ol_cv_lib_db = no ; then
17505         echo $ac_n "checking for Berkeley DB link (-ldb42)""... $ac_c" 1>&6
17506 echo "configure:17507: checking for Berkeley DB link (-ldb42)" >&5
17507 if eval "test \"\${ol_cv_db_db42+set}\" = set"; then
17508   echo $ac_n "(cached) $ac_c" 1>&6
17509 else
17510   
17511         ol_DB_LIB=-ldb42
17512         ol_LIBS=$LIBS
17513         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17514
17515         cat > conftest.$ac_ext <<EOF
17516 #line 17517 "configure"
17517 #include "confdefs.h"
17518
17519 #ifdef HAVE_DB_185_H
17520 # include <db_185.h>
17521 #else
17522 # include <db.h>
17523 #endif
17524
17525 #ifndef DB_VERSION_MAJOR
17526 # define DB_VERSION_MAJOR 1
17527 #endif
17528
17529 #ifndef NULL
17530 #define NULL ((void*)0)
17531 #endif
17532
17533 int main() {
17534
17535 #if DB_VERSION_MAJOR > 1
17536         {
17537                 char *version;
17538                 int major, minor, patch;
17539
17540                 version = db_version( &major, &minor, &patch );
17541
17542                 if( major != DB_VERSION_MAJOR ||
17543                         minor < DB_VERSION_MINOR )
17544                 {
17545                         printf("Berkeley DB version mismatch\n"
17546                                 "\theader: %s\n\tlibrary: %s\n",
17547                                 DB_VERSION_STRING, version);
17548                         return 1;
17549                 }
17550         }
17551 #endif
17552
17553 #if DB_VERSION_MAJOR > 2
17554         db_env_create( NULL, 0 );
17555 #elif DB_VERSION_MAJOR > 1
17556         db_appexit( NULL );
17557 #else
17558         (void) dbopen( NULL, 0, 0, 0, NULL);
17559 #endif
17560
17561 ; return 0; }
17562 EOF
17563 if { (eval echo configure:17564: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17564   rm -rf conftest*
17565   ol_cv_db_db42=yes
17566 else
17567   echo "configure: failed program was:" >&5
17568   cat conftest.$ac_ext >&5
17569   rm -rf conftest*
17570   ol_cv_db_db42=no
17571 fi
17572 rm -f conftest*
17573
17574         LIBS="$ol_LIBS"
17575
17576 fi
17577
17578 echo "$ac_t""$ol_cv_db_db42" 1>&6
17579
17580         if test $ol_cv_db_db42 = yes ; then
17581                 ol_cv_lib_db=-ldb42
17582         fi
17583 fi
17584
17585 if test $ol_cv_lib_db = no ; then
17586         echo $ac_n "checking for Berkeley DB link (-ldb-42)""... $ac_c" 1>&6
17587 echo "configure:17588: checking for Berkeley DB link (-ldb-42)" >&5
17588 if eval "test \"\${ol_cv_db_db_42+set}\" = set"; then
17589   echo $ac_n "(cached) $ac_c" 1>&6
17590 else
17591   
17592         ol_DB_LIB=-ldb-42
17593         ol_LIBS=$LIBS
17594         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17595
17596         cat > conftest.$ac_ext <<EOF
17597 #line 17598 "configure"
17598 #include "confdefs.h"
17599
17600 #ifdef HAVE_DB_185_H
17601 # include <db_185.h>
17602 #else
17603 # include <db.h>
17604 #endif
17605
17606 #ifndef DB_VERSION_MAJOR
17607 # define DB_VERSION_MAJOR 1
17608 #endif
17609
17610 #ifndef NULL
17611 #define NULL ((void*)0)
17612 #endif
17613
17614 int main() {
17615
17616 #if DB_VERSION_MAJOR > 1
17617         {
17618                 char *version;
17619                 int major, minor, patch;
17620
17621                 version = db_version( &major, &minor, &patch );
17622
17623                 if( major != DB_VERSION_MAJOR ||
17624                         minor < DB_VERSION_MINOR )
17625                 {
17626                         printf("Berkeley DB version mismatch\n"
17627                                 "\theader: %s\n\tlibrary: %s\n",
17628                                 DB_VERSION_STRING, version);
17629                         return 1;
17630                 }
17631         }
17632 #endif
17633
17634 #if DB_VERSION_MAJOR > 2
17635         db_env_create( NULL, 0 );
17636 #elif DB_VERSION_MAJOR > 1
17637         db_appexit( NULL );
17638 #else
17639         (void) dbopen( NULL, 0, 0, 0, NULL);
17640 #endif
17641
17642 ; return 0; }
17643 EOF
17644 if { (eval echo configure:17645: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17645   rm -rf conftest*
17646   ol_cv_db_db_42=yes
17647 else
17648   echo "configure: failed program was:" >&5
17649   cat conftest.$ac_ext >&5
17650   rm -rf conftest*
17651   ol_cv_db_db_42=no
17652 fi
17653 rm -f conftest*
17654
17655         LIBS="$ol_LIBS"
17656
17657 fi
17658
17659 echo "$ac_t""$ol_cv_db_db_42" 1>&6
17660
17661         if test $ol_cv_db_db_42 = yes ; then
17662                 ol_cv_lib_db=-ldb-42
17663         fi
17664 fi
17665
17666 if test $ol_cv_lib_db = no ; then
17667         echo $ac_n "checking for Berkeley DB link (-ldb-4.2)""... $ac_c" 1>&6
17668 echo "configure:17669: checking for Berkeley DB link (-ldb-4.2)" >&5
17669 if eval "test \"\${ol_cv_db_db_4_dot_2+set}\" = set"; then
17670   echo $ac_n "(cached) $ac_c" 1>&6
17671 else
17672   
17673         ol_DB_LIB=-ldb-4.2
17674         ol_LIBS=$LIBS
17675         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17676
17677         cat > conftest.$ac_ext <<EOF
17678 #line 17679 "configure"
17679 #include "confdefs.h"
17680
17681 #ifdef HAVE_DB_185_H
17682 # include <db_185.h>
17683 #else
17684 # include <db.h>
17685 #endif
17686
17687 #ifndef DB_VERSION_MAJOR
17688 # define DB_VERSION_MAJOR 1
17689 #endif
17690
17691 #ifndef NULL
17692 #define NULL ((void*)0)
17693 #endif
17694
17695 int main() {
17696
17697 #if DB_VERSION_MAJOR > 1
17698         {
17699                 char *version;
17700                 int major, minor, patch;
17701
17702                 version = db_version( &major, &minor, &patch );
17703
17704                 if( major != DB_VERSION_MAJOR ||
17705                         minor < DB_VERSION_MINOR )
17706                 {
17707                         printf("Berkeley DB version mismatch\n"
17708                                 "\theader: %s\n\tlibrary: %s\n",
17709                                 DB_VERSION_STRING, version);
17710                         return 1;
17711                 }
17712         }
17713 #endif
17714
17715 #if DB_VERSION_MAJOR > 2
17716         db_env_create( NULL, 0 );
17717 #elif DB_VERSION_MAJOR > 1
17718         db_appexit( NULL );
17719 #else
17720         (void) dbopen( NULL, 0, 0, 0, NULL);
17721 #endif
17722
17723 ; return 0; }
17724 EOF
17725 if { (eval echo configure:17726: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17726   rm -rf conftest*
17727   ol_cv_db_db_4_dot_2=yes
17728 else
17729   echo "configure: failed program was:" >&5
17730   cat conftest.$ac_ext >&5
17731   rm -rf conftest*
17732   ol_cv_db_db_4_dot_2=no
17733 fi
17734 rm -f conftest*
17735
17736         LIBS="$ol_LIBS"
17737
17738 fi
17739
17740 echo "$ac_t""$ol_cv_db_db_4_dot_2" 1>&6
17741
17742         if test $ol_cv_db_db_4_dot_2 = yes ; then
17743                 ol_cv_lib_db=-ldb-4.2
17744         fi
17745 fi
17746
17747 if test $ol_cv_lib_db = no ; then
17748         echo $ac_n "checking for Berkeley DB link (-ldb-4-2)""... $ac_c" 1>&6
17749 echo "configure:17750: checking for Berkeley DB link (-ldb-4-2)" >&5
17750 if eval "test \"\${ol_cv_db_db_4_2+set}\" = set"; then
17751   echo $ac_n "(cached) $ac_c" 1>&6
17752 else
17753   
17754         ol_DB_LIB=-ldb-4-2
17755         ol_LIBS=$LIBS
17756         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17757
17758         cat > conftest.$ac_ext <<EOF
17759 #line 17760 "configure"
17760 #include "confdefs.h"
17761
17762 #ifdef HAVE_DB_185_H
17763 # include <db_185.h>
17764 #else
17765 # include <db.h>
17766 #endif
17767
17768 #ifndef DB_VERSION_MAJOR
17769 # define DB_VERSION_MAJOR 1
17770 #endif
17771
17772 #ifndef NULL
17773 #define NULL ((void*)0)
17774 #endif
17775
17776 int main() {
17777
17778 #if DB_VERSION_MAJOR > 1
17779         {
17780                 char *version;
17781                 int major, minor, patch;
17782
17783                 version = db_version( &major, &minor, &patch );
17784
17785                 if( major != DB_VERSION_MAJOR ||
17786                         minor < DB_VERSION_MINOR )
17787                 {
17788                         printf("Berkeley DB version mismatch\n"
17789                                 "\theader: %s\n\tlibrary: %s\n",
17790                                 DB_VERSION_STRING, version);
17791                         return 1;
17792                 }
17793         }
17794 #endif
17795
17796 #if DB_VERSION_MAJOR > 2
17797         db_env_create( NULL, 0 );
17798 #elif DB_VERSION_MAJOR > 1
17799         db_appexit( NULL );
17800 #else
17801         (void) dbopen( NULL, 0, 0, 0, NULL);
17802 #endif
17803
17804 ; return 0; }
17805 EOF
17806 if { (eval echo configure:17807: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17807   rm -rf conftest*
17808   ol_cv_db_db_4_2=yes
17809 else
17810   echo "configure: failed program was:" >&5
17811   cat conftest.$ac_ext >&5
17812   rm -rf conftest*
17813   ol_cv_db_db_4_2=no
17814 fi
17815 rm -f conftest*
17816
17817         LIBS="$ol_LIBS"
17818
17819 fi
17820
17821 echo "$ac_t""$ol_cv_db_db_4_2" 1>&6
17822
17823         if test $ol_cv_db_db_4_2 = yes ; then
17824                 ol_cv_lib_db=-ldb-4-2
17825         fi
17826 fi
17827
17828 if test $ol_cv_lib_db = no ; then
17829         echo $ac_n "checking for Berkeley DB link (-ldb-4)""... $ac_c" 1>&6
17830 echo "configure:17831: checking for Berkeley DB link (-ldb-4)" >&5
17831 if eval "test \"\${ol_cv_db_db_4+set}\" = set"; then
17832   echo $ac_n "(cached) $ac_c" 1>&6
17833 else
17834   
17835         ol_DB_LIB=-ldb-4
17836         ol_LIBS=$LIBS
17837         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17838
17839         cat > conftest.$ac_ext <<EOF
17840 #line 17841 "configure"
17841 #include "confdefs.h"
17842
17843 #ifdef HAVE_DB_185_H
17844 # include <db_185.h>
17845 #else
17846 # include <db.h>
17847 #endif
17848
17849 #ifndef DB_VERSION_MAJOR
17850 # define DB_VERSION_MAJOR 1
17851 #endif
17852
17853 #ifndef NULL
17854 #define NULL ((void*)0)
17855 #endif
17856
17857 int main() {
17858
17859 #if DB_VERSION_MAJOR > 1
17860         {
17861                 char *version;
17862                 int major, minor, patch;
17863
17864                 version = db_version( &major, &minor, &patch );
17865
17866                 if( major != DB_VERSION_MAJOR ||
17867                         minor < DB_VERSION_MINOR )
17868                 {
17869                         printf("Berkeley DB version mismatch\n"
17870                                 "\theader: %s\n\tlibrary: %s\n",
17871                                 DB_VERSION_STRING, version);
17872                         return 1;
17873                 }
17874         }
17875 #endif
17876
17877 #if DB_VERSION_MAJOR > 2
17878         db_env_create( NULL, 0 );
17879 #elif DB_VERSION_MAJOR > 1
17880         db_appexit( NULL );
17881 #else
17882         (void) dbopen( NULL, 0, 0, 0, NULL);
17883 #endif
17884
17885 ; return 0; }
17886 EOF
17887 if { (eval echo configure:17888: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17888   rm -rf conftest*
17889   ol_cv_db_db_4=yes
17890 else
17891   echo "configure: failed program was:" >&5
17892   cat conftest.$ac_ext >&5
17893   rm -rf conftest*
17894   ol_cv_db_db_4=no
17895 fi
17896 rm -f conftest*
17897
17898         LIBS="$ol_LIBS"
17899
17900 fi
17901
17902 echo "$ac_t""$ol_cv_db_db_4" 1>&6
17903
17904         if test $ol_cv_db_db_4 = yes ; then
17905                 ol_cv_lib_db=-ldb-4
17906         fi
17907 fi
17908
17909 if test $ol_cv_lib_db = no ; then
17910         echo $ac_n "checking for Berkeley DB link (-ldb4)""... $ac_c" 1>&6
17911 echo "configure:17912: checking for Berkeley DB link (-ldb4)" >&5
17912 if eval "test \"\${ol_cv_db_db4+set}\" = set"; then
17913   echo $ac_n "(cached) $ac_c" 1>&6
17914 else
17915   
17916         ol_DB_LIB=-ldb4
17917         ol_LIBS=$LIBS
17918         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17919
17920         cat > conftest.$ac_ext <<EOF
17921 #line 17922 "configure"
17922 #include "confdefs.h"
17923
17924 #ifdef HAVE_DB_185_H
17925 # include <db_185.h>
17926 #else
17927 # include <db.h>
17928 #endif
17929
17930 #ifndef DB_VERSION_MAJOR
17931 # define DB_VERSION_MAJOR 1
17932 #endif
17933
17934 #ifndef NULL
17935 #define NULL ((void*)0)
17936 #endif
17937
17938 int main() {
17939
17940 #if DB_VERSION_MAJOR > 1
17941         {
17942                 char *version;
17943                 int major, minor, patch;
17944
17945                 version = db_version( &major, &minor, &patch );
17946
17947                 if( major != DB_VERSION_MAJOR ||
17948                         minor < DB_VERSION_MINOR )
17949                 {
17950                         printf("Berkeley DB version mismatch\n"
17951                                 "\theader: %s\n\tlibrary: %s\n",
17952                                 DB_VERSION_STRING, version);
17953                         return 1;
17954                 }
17955         }
17956 #endif
17957
17958 #if DB_VERSION_MAJOR > 2
17959         db_env_create( NULL, 0 );
17960 #elif DB_VERSION_MAJOR > 1
17961         db_appexit( NULL );
17962 #else
17963         (void) dbopen( NULL, 0, 0, 0, NULL);
17964 #endif
17965
17966 ; return 0; }
17967 EOF
17968 if { (eval echo configure:17969: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17969   rm -rf conftest*
17970   ol_cv_db_db4=yes
17971 else
17972   echo "configure: failed program was:" >&5
17973   cat conftest.$ac_ext >&5
17974   rm -rf conftest*
17975   ol_cv_db_db4=no
17976 fi
17977 rm -f conftest*
17978
17979         LIBS="$ol_LIBS"
17980
17981 fi
17982
17983 echo "$ac_t""$ol_cv_db_db4" 1>&6
17984
17985         if test $ol_cv_db_db4 = yes ; then
17986                 ol_cv_lib_db=-ldb4
17987         fi
17988 fi
17989
17990 if test $ol_cv_lib_db = no ; then
17991         echo $ac_n "checking for Berkeley DB link (-ldb)""... $ac_c" 1>&6
17992 echo "configure:17993: checking for Berkeley DB link (-ldb)" >&5
17993 if eval "test \"\${ol_cv_db_db+set}\" = set"; then
17994   echo $ac_n "(cached) $ac_c" 1>&6
17995 else
17996   
17997         ol_DB_LIB=-ldb
17998         ol_LIBS=$LIBS
17999         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18000
18001         cat > conftest.$ac_ext <<EOF
18002 #line 18003 "configure"
18003 #include "confdefs.h"
18004
18005 #ifdef HAVE_DB_185_H
18006 # include <db_185.h>
18007 #else
18008 # include <db.h>
18009 #endif
18010
18011 #ifndef DB_VERSION_MAJOR
18012 # define DB_VERSION_MAJOR 1
18013 #endif
18014
18015 #ifndef NULL
18016 #define NULL ((void*)0)
18017 #endif
18018
18019 int main() {
18020
18021 #if DB_VERSION_MAJOR > 1
18022         {
18023                 char *version;
18024                 int major, minor, patch;
18025
18026                 version = db_version( &major, &minor, &patch );
18027
18028                 if( major != DB_VERSION_MAJOR ||
18029                         minor < DB_VERSION_MINOR )
18030                 {
18031                         printf("Berkeley DB version mismatch\n"
18032                                 "\theader: %s\n\tlibrary: %s\n",
18033                                 DB_VERSION_STRING, version);
18034                         return 1;
18035                 }
18036         }
18037 #endif
18038
18039 #if DB_VERSION_MAJOR > 2
18040         db_env_create( NULL, 0 );
18041 #elif DB_VERSION_MAJOR > 1
18042         db_appexit( NULL );
18043 #else
18044         (void) dbopen( NULL, 0, 0, 0, NULL);
18045 #endif
18046
18047 ; return 0; }
18048 EOF
18049 if { (eval echo configure:18050: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18050   rm -rf conftest*
18051   ol_cv_db_db=yes
18052 else
18053   echo "configure: failed program was:" >&5
18054   cat conftest.$ac_ext >&5
18055   rm -rf conftest*
18056   ol_cv_db_db=no
18057 fi
18058 rm -f conftest*
18059
18060         LIBS="$ol_LIBS"
18061
18062 fi
18063
18064 echo "$ac_t""$ol_cv_db_db" 1>&6
18065
18066         if test $ol_cv_db_db = yes ; then
18067                 ol_cv_lib_db=-ldb
18068         fi
18069 fi
18070
18071 if test $ol_cv_lib_db = no ; then
18072         echo $ac_n "checking for Berkeley DB link (-ldb41)""... $ac_c" 1>&6
18073 echo "configure:18074: checking for Berkeley DB link (-ldb41)" >&5
18074 if eval "test \"\${ol_cv_db_db41+set}\" = set"; then
18075   echo $ac_n "(cached) $ac_c" 1>&6
18076 else
18077   
18078         ol_DB_LIB=-ldb41
18079         ol_LIBS=$LIBS
18080         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18081
18082         cat > conftest.$ac_ext <<EOF
18083 #line 18084 "configure"
18084 #include "confdefs.h"
18085
18086 #ifdef HAVE_DB_185_H
18087 # include <db_185.h>
18088 #else
18089 # include <db.h>
18090 #endif
18091
18092 #ifndef DB_VERSION_MAJOR
18093 # define DB_VERSION_MAJOR 1
18094 #endif
18095
18096 #ifndef NULL
18097 #define NULL ((void*)0)
18098 #endif
18099
18100 int main() {
18101
18102 #if DB_VERSION_MAJOR > 1
18103         {
18104                 char *version;
18105                 int major, minor, patch;
18106
18107                 version = db_version( &major, &minor, &patch );
18108
18109                 if( major != DB_VERSION_MAJOR ||
18110                         minor < DB_VERSION_MINOR )
18111                 {
18112                         printf("Berkeley DB version mismatch\n"
18113                                 "\theader: %s\n\tlibrary: %s\n",
18114                                 DB_VERSION_STRING, version);
18115                         return 1;
18116                 }
18117         }
18118 #endif
18119
18120 #if DB_VERSION_MAJOR > 2
18121         db_env_create( NULL, 0 );
18122 #elif DB_VERSION_MAJOR > 1
18123         db_appexit( NULL );
18124 #else
18125         (void) dbopen( NULL, 0, 0, 0, NULL);
18126 #endif
18127
18128 ; return 0; }
18129 EOF
18130 if { (eval echo configure:18131: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18131   rm -rf conftest*
18132   ol_cv_db_db41=yes
18133 else
18134   echo "configure: failed program was:" >&5
18135   cat conftest.$ac_ext >&5
18136   rm -rf conftest*
18137   ol_cv_db_db41=no
18138 fi
18139 rm -f conftest*
18140
18141         LIBS="$ol_LIBS"
18142
18143 fi
18144
18145 echo "$ac_t""$ol_cv_db_db41" 1>&6
18146
18147         if test $ol_cv_db_db41 = yes ; then
18148                 ol_cv_lib_db=-ldb41
18149         fi
18150 fi
18151
18152 if test $ol_cv_lib_db = no ; then
18153         echo $ac_n "checking for Berkeley DB link (-ldb-41)""... $ac_c" 1>&6
18154 echo "configure:18155: checking for Berkeley DB link (-ldb-41)" >&5
18155 if eval "test \"\${ol_cv_db_db_41+set}\" = set"; then
18156   echo $ac_n "(cached) $ac_c" 1>&6
18157 else
18158   
18159         ol_DB_LIB=-ldb-41
18160         ol_LIBS=$LIBS
18161         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18162
18163         cat > conftest.$ac_ext <<EOF
18164 #line 18165 "configure"
18165 #include "confdefs.h"
18166
18167 #ifdef HAVE_DB_185_H
18168 # include <db_185.h>
18169 #else
18170 # include <db.h>
18171 #endif
18172
18173 #ifndef DB_VERSION_MAJOR
18174 # define DB_VERSION_MAJOR 1
18175 #endif
18176
18177 #ifndef NULL
18178 #define NULL ((void*)0)
18179 #endif
18180
18181 int main() {
18182
18183 #if DB_VERSION_MAJOR > 1
18184         {
18185                 char *version;
18186                 int major, minor, patch;
18187
18188                 version = db_version( &major, &minor, &patch );
18189
18190                 if( major != DB_VERSION_MAJOR ||
18191                         minor < DB_VERSION_MINOR )
18192                 {
18193                         printf("Berkeley DB version mismatch\n"
18194                                 "\theader: %s\n\tlibrary: %s\n",
18195                                 DB_VERSION_STRING, version);
18196                         return 1;
18197                 }
18198         }
18199 #endif
18200
18201 #if DB_VERSION_MAJOR > 2
18202         db_env_create( NULL, 0 );
18203 #elif DB_VERSION_MAJOR > 1
18204         db_appexit( NULL );
18205 #else
18206         (void) dbopen( NULL, 0, 0, 0, NULL);
18207 #endif
18208
18209 ; return 0; }
18210 EOF
18211 if { (eval echo configure:18212: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18212   rm -rf conftest*
18213   ol_cv_db_db_41=yes
18214 else
18215   echo "configure: failed program was:" >&5
18216   cat conftest.$ac_ext >&5
18217   rm -rf conftest*
18218   ol_cv_db_db_41=no
18219 fi
18220 rm -f conftest*
18221
18222         LIBS="$ol_LIBS"
18223
18224 fi
18225
18226 echo "$ac_t""$ol_cv_db_db_41" 1>&6
18227
18228         if test $ol_cv_db_db_41 = yes ; then
18229                 ol_cv_lib_db=-ldb-41
18230         fi
18231 fi
18232
18233 if test $ol_cv_lib_db = no ; then
18234         echo $ac_n "checking for Berkeley DB link (-ldb-4.1)""... $ac_c" 1>&6
18235 echo "configure:18236: checking for Berkeley DB link (-ldb-4.1)" >&5
18236 if eval "test \"\${ol_cv_db_db_4_dot_1+set}\" = set"; then
18237   echo $ac_n "(cached) $ac_c" 1>&6
18238 else
18239   
18240         ol_DB_LIB=-ldb-4.1
18241         ol_LIBS=$LIBS
18242         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18243
18244         cat > conftest.$ac_ext <<EOF
18245 #line 18246 "configure"
18246 #include "confdefs.h"
18247
18248 #ifdef HAVE_DB_185_H
18249 # include <db_185.h>
18250 #else
18251 # include <db.h>
18252 #endif
18253
18254 #ifndef DB_VERSION_MAJOR
18255 # define DB_VERSION_MAJOR 1
18256 #endif
18257
18258 #ifndef NULL
18259 #define NULL ((void*)0)
18260 #endif
18261
18262 int main() {
18263
18264 #if DB_VERSION_MAJOR > 1
18265         {
18266                 char *version;
18267                 int major, minor, patch;
18268
18269                 version = db_version( &major, &minor, &patch );
18270
18271                 if( major != DB_VERSION_MAJOR ||
18272                         minor < DB_VERSION_MINOR )
18273                 {
18274                         printf("Berkeley DB version mismatch\n"
18275                                 "\theader: %s\n\tlibrary: %s\n",
18276                                 DB_VERSION_STRING, version);
18277                         return 1;
18278                 }
18279         }
18280 #endif
18281
18282 #if DB_VERSION_MAJOR > 2
18283         db_env_create( NULL, 0 );
18284 #elif DB_VERSION_MAJOR > 1
18285         db_appexit( NULL );
18286 #else
18287         (void) dbopen( NULL, 0, 0, 0, NULL);
18288 #endif
18289
18290 ; return 0; }
18291 EOF
18292 if { (eval echo configure:18293: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18293   rm -rf conftest*
18294   ol_cv_db_db_4_dot_1=yes
18295 else
18296   echo "configure: failed program was:" >&5
18297   cat conftest.$ac_ext >&5
18298   rm -rf conftest*
18299   ol_cv_db_db_4_dot_1=no
18300 fi
18301 rm -f conftest*
18302
18303         LIBS="$ol_LIBS"
18304
18305 fi
18306
18307 echo "$ac_t""$ol_cv_db_db_4_dot_1" 1>&6
18308
18309         if test $ol_cv_db_db_4_dot_1 = yes ; then
18310                 ol_cv_lib_db=-ldb-4.1
18311         fi
18312 fi
18313
18314 if test $ol_cv_lib_db = no ; then
18315         echo $ac_n "checking for Berkeley DB link (-ldb-4-1)""... $ac_c" 1>&6
18316 echo "configure:18317: checking for Berkeley DB link (-ldb-4-1)" >&5
18317 if eval "test \"\${ol_cv_db_db_4_1+set}\" = set"; then
18318   echo $ac_n "(cached) $ac_c" 1>&6
18319 else
18320   
18321         ol_DB_LIB=-ldb-4-1
18322         ol_LIBS=$LIBS
18323         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18324
18325         cat > conftest.$ac_ext <<EOF
18326 #line 18327 "configure"
18327 #include "confdefs.h"
18328
18329 #ifdef HAVE_DB_185_H
18330 # include <db_185.h>
18331 #else
18332 # include <db.h>
18333 #endif
18334
18335 #ifndef DB_VERSION_MAJOR
18336 # define DB_VERSION_MAJOR 1
18337 #endif
18338
18339 #ifndef NULL
18340 #define NULL ((void*)0)
18341 #endif
18342
18343 int main() {
18344
18345 #if DB_VERSION_MAJOR > 1
18346         {
18347                 char *version;
18348                 int major, minor, patch;
18349
18350                 version = db_version( &major, &minor, &patch );
18351
18352                 if( major != DB_VERSION_MAJOR ||
18353                         minor < DB_VERSION_MINOR )
18354                 {
18355                         printf("Berkeley DB version mismatch\n"
18356                                 "\theader: %s\n\tlibrary: %s\n",
18357                                 DB_VERSION_STRING, version);
18358                         return 1;
18359                 }
18360         }
18361 #endif
18362
18363 #if DB_VERSION_MAJOR > 2
18364         db_env_create( NULL, 0 );
18365 #elif DB_VERSION_MAJOR > 1
18366         db_appexit( NULL );
18367 #else
18368         (void) dbopen( NULL, 0, 0, 0, NULL);
18369 #endif
18370
18371 ; return 0; }
18372 EOF
18373 if { (eval echo configure:18374: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18374   rm -rf conftest*
18375   ol_cv_db_db_4_1=yes
18376 else
18377   echo "configure: failed program was:" >&5
18378   cat conftest.$ac_ext >&5
18379   rm -rf conftest*
18380   ol_cv_db_db_4_1=no
18381 fi
18382 rm -f conftest*
18383
18384         LIBS="$ol_LIBS"
18385
18386 fi
18387
18388 echo "$ac_t""$ol_cv_db_db_4_1" 1>&6
18389
18390         if test $ol_cv_db_db_4_1 = yes ; then
18391                 ol_cv_lib_db=-ldb-4-1
18392         fi
18393 fi
18394
18395 if test $ol_cv_lib_db = no ; then
18396         echo $ac_n "checking for Berkeley DB link (-ldb3)""... $ac_c" 1>&6
18397 echo "configure:18398: checking for Berkeley DB link (-ldb3)" >&5
18398 if eval "test \"\${ol_cv_db_db3+set}\" = set"; then
18399   echo $ac_n "(cached) $ac_c" 1>&6
18400 else
18401   
18402         ol_DB_LIB=-ldb3
18403         ol_LIBS=$LIBS
18404         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18405
18406         cat > conftest.$ac_ext <<EOF
18407 #line 18408 "configure"
18408 #include "confdefs.h"
18409
18410 #ifdef HAVE_DB_185_H
18411 # include <db_185.h>
18412 #else
18413 # include <db.h>
18414 #endif
18415
18416 #ifndef DB_VERSION_MAJOR
18417 # define DB_VERSION_MAJOR 1
18418 #endif
18419
18420 #ifndef NULL
18421 #define NULL ((void*)0)
18422 #endif
18423
18424 int main() {
18425
18426 #if DB_VERSION_MAJOR > 1
18427         {
18428                 char *version;
18429                 int major, minor, patch;
18430
18431                 version = db_version( &major, &minor, &patch );
18432
18433                 if( major != DB_VERSION_MAJOR ||
18434                         minor < DB_VERSION_MINOR )
18435                 {
18436                         printf("Berkeley DB version mismatch\n"
18437                                 "\theader: %s\n\tlibrary: %s\n",
18438                                 DB_VERSION_STRING, version);
18439                         return 1;
18440                 }
18441         }
18442 #endif
18443
18444 #if DB_VERSION_MAJOR > 2
18445         db_env_create( NULL, 0 );
18446 #elif DB_VERSION_MAJOR > 1
18447         db_appexit( NULL );
18448 #else
18449         (void) dbopen( NULL, 0, 0, 0, NULL);
18450 #endif
18451
18452 ; return 0; }
18453 EOF
18454 if { (eval echo configure:18455: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18455   rm -rf conftest*
18456   ol_cv_db_db3=yes
18457 else
18458   echo "configure: failed program was:" >&5
18459   cat conftest.$ac_ext >&5
18460   rm -rf conftest*
18461   ol_cv_db_db3=no
18462 fi
18463 rm -f conftest*
18464
18465         LIBS="$ol_LIBS"
18466
18467 fi
18468
18469 echo "$ac_t""$ol_cv_db_db3" 1>&6
18470
18471         if test $ol_cv_db_db3 = yes ; then
18472                 ol_cv_lib_db=-ldb3
18473         fi
18474 fi
18475
18476 if test $ol_cv_lib_db = no ; then
18477         echo $ac_n "checking for Berkeley DB link (-ldb-3)""... $ac_c" 1>&6
18478 echo "configure:18479: checking for Berkeley DB link (-ldb-3)" >&5
18479 if eval "test \"\${ol_cv_db_db_3+set}\" = set"; then
18480   echo $ac_n "(cached) $ac_c" 1>&6
18481 else
18482   
18483         ol_DB_LIB=-ldb-3
18484         ol_LIBS=$LIBS
18485         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18486
18487         cat > conftest.$ac_ext <<EOF
18488 #line 18489 "configure"
18489 #include "confdefs.h"
18490
18491 #ifdef HAVE_DB_185_H
18492 # include <db_185.h>
18493 #else
18494 # include <db.h>
18495 #endif
18496
18497 #ifndef DB_VERSION_MAJOR
18498 # define DB_VERSION_MAJOR 1
18499 #endif
18500
18501 #ifndef NULL
18502 #define NULL ((void*)0)
18503 #endif
18504
18505 int main() {
18506
18507 #if DB_VERSION_MAJOR > 1
18508         {
18509                 char *version;
18510                 int major, minor, patch;
18511
18512                 version = db_version( &major, &minor, &patch );
18513
18514                 if( major != DB_VERSION_MAJOR ||
18515                         minor < DB_VERSION_MINOR )
18516                 {
18517                         printf("Berkeley DB version mismatch\n"
18518                                 "\theader: %s\n\tlibrary: %s\n",
18519                                 DB_VERSION_STRING, version);
18520                         return 1;
18521                 }
18522         }
18523 #endif
18524
18525 #if DB_VERSION_MAJOR > 2
18526         db_env_create( NULL, 0 );
18527 #elif DB_VERSION_MAJOR > 1
18528         db_appexit( NULL );
18529 #else
18530         (void) dbopen( NULL, 0, 0, 0, NULL);
18531 #endif
18532
18533 ; return 0; }
18534 EOF
18535 if { (eval echo configure:18536: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18536   rm -rf conftest*
18537   ol_cv_db_db_3=yes
18538 else
18539   echo "configure: failed program was:" >&5
18540   cat conftest.$ac_ext >&5
18541   rm -rf conftest*
18542   ol_cv_db_db_3=no
18543 fi
18544 rm -f conftest*
18545
18546         LIBS="$ol_LIBS"
18547
18548 fi
18549
18550 echo "$ac_t""$ol_cv_db_db_3" 1>&6
18551
18552         if test $ol_cv_db_db_3 = yes ; then
18553                 ol_cv_lib_db=-ldb-3
18554         fi
18555 fi
18556
18557 if test $ol_cv_lib_db = no ; then
18558         echo $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6
18559 echo "configure:18560: checking for Berkeley DB link (-ldb2)" >&5
18560 if eval "test \"\${ol_cv_db_db2+set}\" = set"; then
18561   echo $ac_n "(cached) $ac_c" 1>&6
18562 else
18563   
18564         ol_DB_LIB=-ldb2
18565         ol_LIBS=$LIBS
18566         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18567
18568         cat > conftest.$ac_ext <<EOF
18569 #line 18570 "configure"
18570 #include "confdefs.h"
18571
18572 #ifdef HAVE_DB_185_H
18573 # include <db_185.h>
18574 #else
18575 # include <db.h>
18576 #endif
18577
18578 #ifndef DB_VERSION_MAJOR
18579 # define DB_VERSION_MAJOR 1
18580 #endif
18581
18582 #ifndef NULL
18583 #define NULL ((void*)0)
18584 #endif
18585
18586 int main() {
18587
18588 #if DB_VERSION_MAJOR > 1
18589         {
18590                 char *version;
18591                 int major, minor, patch;
18592
18593                 version = db_version( &major, &minor, &patch );
18594
18595                 if( major != DB_VERSION_MAJOR ||
18596                         minor < DB_VERSION_MINOR )
18597                 {
18598                         printf("Berkeley DB version mismatch\n"
18599                                 "\theader: %s\n\tlibrary: %s\n",
18600                                 DB_VERSION_STRING, version);
18601                         return 1;
18602                 }
18603         }
18604 #endif
18605
18606 #if DB_VERSION_MAJOR > 2
18607         db_env_create( NULL, 0 );
18608 #elif DB_VERSION_MAJOR > 1
18609         db_appexit( NULL );
18610 #else
18611         (void) dbopen( NULL, 0, 0, 0, NULL);
18612 #endif
18613
18614 ; return 0; }
18615 EOF
18616 if { (eval echo configure:18617: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18617   rm -rf conftest*
18618   ol_cv_db_db2=yes
18619 else
18620   echo "configure: failed program was:" >&5
18621   cat conftest.$ac_ext >&5
18622   rm -rf conftest*
18623   ol_cv_db_db2=no
18624 fi
18625 rm -f conftest*
18626
18627         LIBS="$ol_LIBS"
18628
18629 fi
18630
18631 echo "$ac_t""$ol_cv_db_db2" 1>&6
18632
18633         if test $ol_cv_db_db2 = yes ; then
18634                 ol_cv_lib_db=-ldb2
18635         fi
18636 fi
18637
18638 if test $ol_cv_lib_db = no ; then
18639         echo $ac_n "checking for Berkeley DB link (-ldb-2)""... $ac_c" 1>&6
18640 echo "configure:18641: checking for Berkeley DB link (-ldb-2)" >&5
18641 if eval "test \"\${ol_cv_db_db_2+set}\" = set"; then
18642   echo $ac_n "(cached) $ac_c" 1>&6
18643 else
18644   
18645         ol_DB_LIB=-ldb-2
18646         ol_LIBS=$LIBS
18647         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18648
18649         cat > conftest.$ac_ext <<EOF
18650 #line 18651 "configure"
18651 #include "confdefs.h"
18652
18653 #ifdef HAVE_DB_185_H
18654 # include <db_185.h>
18655 #else
18656 # include <db.h>
18657 #endif
18658
18659 #ifndef DB_VERSION_MAJOR
18660 # define DB_VERSION_MAJOR 1
18661 #endif
18662
18663 #ifndef NULL
18664 #define NULL ((void*)0)
18665 #endif
18666
18667 int main() {
18668
18669 #if DB_VERSION_MAJOR > 1
18670         {
18671                 char *version;
18672                 int major, minor, patch;
18673
18674                 version = db_version( &major, &minor, &patch );
18675
18676                 if( major != DB_VERSION_MAJOR ||
18677                         minor < DB_VERSION_MINOR )
18678                 {
18679                         printf("Berkeley DB version mismatch\n"
18680                                 "\theader: %s\n\tlibrary: %s\n",
18681                                 DB_VERSION_STRING, version);
18682                         return 1;
18683                 }
18684         }
18685 #endif
18686
18687 #if DB_VERSION_MAJOR > 2
18688         db_env_create( NULL, 0 );
18689 #elif DB_VERSION_MAJOR > 1
18690         db_appexit( NULL );
18691 #else
18692         (void) dbopen( NULL, 0, 0, 0, NULL);
18693 #endif
18694
18695 ; return 0; }
18696 EOF
18697 if { (eval echo configure:18698: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18698   rm -rf conftest*
18699   ol_cv_db_db_2=yes
18700 else
18701   echo "configure: failed program was:" >&5
18702   cat conftest.$ac_ext >&5
18703   rm -rf conftest*
18704   ol_cv_db_db_2=no
18705 fi
18706 rm -f conftest*
18707
18708         LIBS="$ol_LIBS"
18709
18710 fi
18711
18712 echo "$ac_t""$ol_cv_db_db_2" 1>&6
18713
18714         if test $ol_cv_db_db_2 = yes ; then
18715                 ol_cv_lib_db=-ldb-2
18716         fi
18717 fi
18718
18719 if test $ol_cv_lib_db = no ; then
18720         echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6
18721 echo "configure:18722: checking for Berkeley DB link (-ldb1)" >&5
18722 if eval "test \"\${ol_cv_db_db1+set}\" = set"; then
18723   echo $ac_n "(cached) $ac_c" 1>&6
18724 else
18725   
18726         ol_DB_LIB=-ldb1
18727         ol_LIBS=$LIBS
18728         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18729
18730         cat > conftest.$ac_ext <<EOF
18731 #line 18732 "configure"
18732 #include "confdefs.h"
18733
18734 #ifdef HAVE_DB_185_H
18735 # include <db_185.h>
18736 #else
18737 # include <db.h>
18738 #endif
18739
18740 #ifndef DB_VERSION_MAJOR
18741 # define DB_VERSION_MAJOR 1
18742 #endif
18743
18744 #ifndef NULL
18745 #define NULL ((void*)0)
18746 #endif
18747
18748 int main() {
18749
18750 #if DB_VERSION_MAJOR > 1
18751         {
18752                 char *version;
18753                 int major, minor, patch;
18754
18755                 version = db_version( &major, &minor, &patch );
18756
18757                 if( major != DB_VERSION_MAJOR ||
18758                         minor < DB_VERSION_MINOR )
18759                 {
18760                         printf("Berkeley DB version mismatch\n"
18761                                 "\theader: %s\n\tlibrary: %s\n",
18762                                 DB_VERSION_STRING, version);
18763                         return 1;
18764                 }
18765         }
18766 #endif
18767
18768 #if DB_VERSION_MAJOR > 2
18769         db_env_create( NULL, 0 );
18770 #elif DB_VERSION_MAJOR > 1
18771         db_appexit( NULL );
18772 #else
18773         (void) dbopen( NULL, 0, 0, 0, NULL);
18774 #endif
18775
18776 ; return 0; }
18777 EOF
18778 if { (eval echo configure:18779: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18779   rm -rf conftest*
18780   ol_cv_db_db1=yes
18781 else
18782   echo "configure: failed program was:" >&5
18783   cat conftest.$ac_ext >&5
18784   rm -rf conftest*
18785   ol_cv_db_db1=no
18786 fi
18787 rm -f conftest*
18788
18789         LIBS="$ol_LIBS"
18790
18791 fi
18792
18793 echo "$ac_t""$ol_cv_db_db1" 1>&6
18794
18795         if test $ol_cv_db_db1 = yes ; then
18796                 ol_cv_lib_db=-ldb1
18797         fi
18798 fi
18799
18800 if test $ol_cv_lib_db = no ; then
18801         echo $ac_n "checking for Berkeley DB link (-ldb-1)""... $ac_c" 1>&6
18802 echo "configure:18803: checking for Berkeley DB link (-ldb-1)" >&5
18803 if eval "test \"\${ol_cv_db_db_1+set}\" = set"; then
18804   echo $ac_n "(cached) $ac_c" 1>&6
18805 else
18806   
18807         ol_DB_LIB=-ldb-1
18808         ol_LIBS=$LIBS
18809         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18810
18811         cat > conftest.$ac_ext <<EOF
18812 #line 18813 "configure"
18813 #include "confdefs.h"
18814
18815 #ifdef HAVE_DB_185_H
18816 # include <db_185.h>
18817 #else
18818 # include <db.h>
18819 #endif
18820
18821 #ifndef DB_VERSION_MAJOR
18822 # define DB_VERSION_MAJOR 1
18823 #endif
18824
18825 #ifndef NULL
18826 #define NULL ((void*)0)
18827 #endif
18828
18829 int main() {
18830
18831 #if DB_VERSION_MAJOR > 1
18832         {
18833                 char *version;
18834                 int major, minor, patch;
18835
18836                 version = db_version( &major, &minor, &patch );
18837
18838                 if( major != DB_VERSION_MAJOR ||
18839                         minor < DB_VERSION_MINOR )
18840                 {
18841                         printf("Berkeley DB version mismatch\n"
18842                                 "\theader: %s\n\tlibrary: %s\n",
18843                                 DB_VERSION_STRING, version);
18844                         return 1;
18845                 }
18846         }
18847 #endif
18848
18849 #if DB_VERSION_MAJOR > 2
18850         db_env_create( NULL, 0 );
18851 #elif DB_VERSION_MAJOR > 1
18852         db_appexit( NULL );
18853 #else
18854         (void) dbopen( NULL, 0, 0, 0, NULL);
18855 #endif
18856
18857 ; return 0; }
18858 EOF
18859 if { (eval echo configure:18860: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18860   rm -rf conftest*
18861   ol_cv_db_db_1=yes
18862 else
18863   echo "configure: failed program was:" >&5
18864   cat conftest.$ac_ext >&5
18865   rm -rf conftest*
18866   ol_cv_db_db_1=no
18867 fi
18868 rm -f conftest*
18869
18870         LIBS="$ol_LIBS"
18871
18872 fi
18873
18874 echo "$ac_t""$ol_cv_db_db_1" 1>&6
18875
18876         if test $ol_cv_db_db_1 = yes ; then
18877                 ol_cv_lib_db=-ldb-1
18878         fi
18879 fi
18880
18881
18882                 if test "$ol_cv_lib_db" != no ; then
18883                         ol_cv_berkeley_db=yes
18884                 fi
18885         fi
18886 fi
18887
18888         else
18889                 ol_cv_berkeley_db=no
18890 for ac_hdr in db.h
18891 do
18892 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
18893 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
18894 echo "configure:18895: checking for $ac_hdr" >&5
18895 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
18896   echo $ac_n "(cached) $ac_c" 1>&6
18897 else
18898   cat > conftest.$ac_ext <<EOF
18899 #line 18900 "configure"
18900 #include "confdefs.h"
18901 #include <$ac_hdr>
18902 EOF
18903 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
18904 { (eval echo configure:18905: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
18905 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
18906 if test -z "$ac_err"; then
18907   rm -rf conftest*
18908   eval "ac_cv_header_$ac_safe=yes"
18909 else
18910   echo "$ac_err" >&5
18911   echo "configure: failed program was:" >&5
18912   cat conftest.$ac_ext >&5
18913   rm -rf conftest*
18914   eval "ac_cv_header_$ac_safe=no"
18915 fi
18916 rm -f conftest*
18917 fi
18918 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
18919   echo "$ac_t""yes" 1>&6
18920     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
18921   cat >> confdefs.h <<EOF
18922 #define $ac_tr_hdr 1
18923 EOF
18924  
18925 else
18926   echo "$ac_t""no" 1>&6
18927 fi
18928 done
18929
18930 if test $ac_cv_header_db_h = yes; then
18931         ol_cv_lib_db=no
18932 if test $ol_cv_lib_db = no ; then
18933         echo $ac_n "checking for Berkeley DB link (default)""... $ac_c" 1>&6
18934 echo "configure:18935: checking for Berkeley DB link (default)" >&5
18935 if eval "test \"\${ol_cv_db_none+set}\" = set"; then
18936   echo $ac_n "(cached) $ac_c" 1>&6
18937 else
18938   
18939         ol_DB_LIB=
18940         ol_LIBS=$LIBS
18941         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18942
18943         cat > conftest.$ac_ext <<EOF
18944 #line 18945 "configure"
18945 #include "confdefs.h"
18946
18947 #ifdef HAVE_DB_185_H
18948 # include <db_185.h>
18949 #else
18950 # include <db.h>
18951 #endif
18952
18953 #ifndef DB_VERSION_MAJOR
18954 # define DB_VERSION_MAJOR 1
18955 #endif
18956
18957 #ifndef NULL
18958 #define NULL ((void*)0)
18959 #endif
18960
18961 int main() {
18962
18963 #if DB_VERSION_MAJOR > 1
18964         {
18965                 char *version;
18966                 int major, minor, patch;
18967
18968                 version = db_version( &major, &minor, &patch );
18969
18970                 if( major != DB_VERSION_MAJOR ||
18971                         minor < DB_VERSION_MINOR )
18972                 {
18973                         printf("Berkeley DB version mismatch\n"
18974                                 "\theader: %s\n\tlibrary: %s\n",
18975                                 DB_VERSION_STRING, version);
18976                         return 1;
18977                 }
18978         }
18979 #endif
18980
18981 #if DB_VERSION_MAJOR > 2
18982         db_env_create( NULL, 0 );
18983 #elif DB_VERSION_MAJOR > 1
18984         db_appexit( NULL );
18985 #else
18986         (void) dbopen( NULL, 0, 0, 0, NULL);
18987 #endif
18988
18989 ; return 0; }
18990 EOF
18991 if { (eval echo configure:18992: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18992   rm -rf conftest*
18993   ol_cv_db_none=yes
18994 else
18995   echo "configure: failed program was:" >&5
18996   cat conftest.$ac_ext >&5
18997   rm -rf conftest*
18998   ol_cv_db_none=no
18999 fi
19000 rm -f conftest*
19001
19002         LIBS="$ol_LIBS"
19003
19004 fi
19005
19006 echo "$ac_t""$ol_cv_db_none" 1>&6
19007
19008         if test $ol_cv_db_none = yes ; then
19009                 ol_cv_lib_db=yes
19010         fi
19011 fi
19012
19013 if test $ol_cv_lib_db = no ; then
19014         echo $ac_n "checking for Berkeley DB link (-ldb43)""... $ac_c" 1>&6
19015 echo "configure:19016: checking for Berkeley DB link (-ldb43)" >&5
19016 if eval "test \"\${ol_cv_db_db43+set}\" = set"; then
19017   echo $ac_n "(cached) $ac_c" 1>&6
19018 else
19019   
19020         ol_DB_LIB=-ldb43
19021         ol_LIBS=$LIBS
19022         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19023
19024         cat > conftest.$ac_ext <<EOF
19025 #line 19026 "configure"
19026 #include "confdefs.h"
19027
19028 #ifdef HAVE_DB_185_H
19029 # include <db_185.h>
19030 #else
19031 # include <db.h>
19032 #endif
19033
19034 #ifndef DB_VERSION_MAJOR
19035 # define DB_VERSION_MAJOR 1
19036 #endif
19037
19038 #ifndef NULL
19039 #define NULL ((void*)0)
19040 #endif
19041
19042 int main() {
19043
19044 #if DB_VERSION_MAJOR > 1
19045         {
19046                 char *version;
19047                 int major, minor, patch;
19048
19049                 version = db_version( &major, &minor, &patch );
19050
19051                 if( major != DB_VERSION_MAJOR ||
19052                         minor < DB_VERSION_MINOR )
19053                 {
19054                         printf("Berkeley DB version mismatch\n"
19055                                 "\theader: %s\n\tlibrary: %s\n",
19056                                 DB_VERSION_STRING, version);
19057                         return 1;
19058                 }
19059         }
19060 #endif
19061
19062 #if DB_VERSION_MAJOR > 2
19063         db_env_create( NULL, 0 );
19064 #elif DB_VERSION_MAJOR > 1
19065         db_appexit( NULL );
19066 #else
19067         (void) dbopen( NULL, 0, 0, 0, NULL);
19068 #endif
19069
19070 ; return 0; }
19071 EOF
19072 if { (eval echo configure:19073: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19073   rm -rf conftest*
19074   ol_cv_db_db43=yes
19075 else
19076   echo "configure: failed program was:" >&5
19077   cat conftest.$ac_ext >&5
19078   rm -rf conftest*
19079   ol_cv_db_db43=no
19080 fi
19081 rm -f conftest*
19082
19083         LIBS="$ol_LIBS"
19084
19085 fi
19086
19087 echo "$ac_t""$ol_cv_db_db43" 1>&6
19088
19089         if test $ol_cv_db_db43 = yes ; then
19090                 ol_cv_lib_db=-ldb43
19091         fi
19092 fi
19093
19094 if test $ol_cv_lib_db = no ; then
19095         echo $ac_n "checking for Berkeley DB link (-ldb-43)""... $ac_c" 1>&6
19096 echo "configure:19097: checking for Berkeley DB link (-ldb-43)" >&5
19097 if eval "test \"\${ol_cv_db_db_43+set}\" = set"; then
19098   echo $ac_n "(cached) $ac_c" 1>&6
19099 else
19100   
19101         ol_DB_LIB=-ldb-43
19102         ol_LIBS=$LIBS
19103         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19104
19105         cat > conftest.$ac_ext <<EOF
19106 #line 19107 "configure"
19107 #include "confdefs.h"
19108
19109 #ifdef HAVE_DB_185_H
19110 # include <db_185.h>
19111 #else
19112 # include <db.h>
19113 #endif
19114
19115 #ifndef DB_VERSION_MAJOR
19116 # define DB_VERSION_MAJOR 1
19117 #endif
19118
19119 #ifndef NULL
19120 #define NULL ((void*)0)
19121 #endif
19122
19123 int main() {
19124
19125 #if DB_VERSION_MAJOR > 1
19126         {
19127                 char *version;
19128                 int major, minor, patch;
19129
19130                 version = db_version( &major, &minor, &patch );
19131
19132                 if( major != DB_VERSION_MAJOR ||
19133                         minor < DB_VERSION_MINOR )
19134                 {
19135                         printf("Berkeley DB version mismatch\n"
19136                                 "\theader: %s\n\tlibrary: %s\n",
19137                                 DB_VERSION_STRING, version);
19138                         return 1;
19139                 }
19140         }
19141 #endif
19142
19143 #if DB_VERSION_MAJOR > 2
19144         db_env_create( NULL, 0 );
19145 #elif DB_VERSION_MAJOR > 1
19146         db_appexit( NULL );
19147 #else
19148         (void) dbopen( NULL, 0, 0, 0, NULL);
19149 #endif
19150
19151 ; return 0; }
19152 EOF
19153 if { (eval echo configure:19154: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19154   rm -rf conftest*
19155   ol_cv_db_db_43=yes
19156 else
19157   echo "configure: failed program was:" >&5
19158   cat conftest.$ac_ext >&5
19159   rm -rf conftest*
19160   ol_cv_db_db_43=no
19161 fi
19162 rm -f conftest*
19163
19164         LIBS="$ol_LIBS"
19165
19166 fi
19167
19168 echo "$ac_t""$ol_cv_db_db_43" 1>&6
19169
19170         if test $ol_cv_db_db_43 = yes ; then
19171                 ol_cv_lib_db=-ldb-43
19172         fi
19173 fi
19174
19175 if test $ol_cv_lib_db = no ; then
19176         echo $ac_n "checking for Berkeley DB link (-ldb-4.3)""... $ac_c" 1>&6
19177 echo "configure:19178: checking for Berkeley DB link (-ldb-4.3)" >&5
19178 if eval "test \"\${ol_cv_db_db_4_dot_3+set}\" = set"; then
19179   echo $ac_n "(cached) $ac_c" 1>&6
19180 else
19181   
19182         ol_DB_LIB=-ldb-4.3
19183         ol_LIBS=$LIBS
19184         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19185
19186         cat > conftest.$ac_ext <<EOF
19187 #line 19188 "configure"
19188 #include "confdefs.h"
19189
19190 #ifdef HAVE_DB_185_H
19191 # include <db_185.h>
19192 #else
19193 # include <db.h>
19194 #endif
19195
19196 #ifndef DB_VERSION_MAJOR
19197 # define DB_VERSION_MAJOR 1
19198 #endif
19199
19200 #ifndef NULL
19201 #define NULL ((void*)0)
19202 #endif
19203
19204 int main() {
19205
19206 #if DB_VERSION_MAJOR > 1
19207         {
19208                 char *version;
19209                 int major, minor, patch;
19210
19211                 version = db_version( &major, &minor, &patch );
19212
19213                 if( major != DB_VERSION_MAJOR ||
19214                         minor < DB_VERSION_MINOR )
19215                 {
19216                         printf("Berkeley DB version mismatch\n"
19217                                 "\theader: %s\n\tlibrary: %s\n",
19218                                 DB_VERSION_STRING, version);
19219                         return 1;
19220                 }
19221         }
19222 #endif
19223
19224 #if DB_VERSION_MAJOR > 2
19225         db_env_create( NULL, 0 );
19226 #elif DB_VERSION_MAJOR > 1
19227         db_appexit( NULL );
19228 #else
19229         (void) dbopen( NULL, 0, 0, 0, NULL);
19230 #endif
19231
19232 ; return 0; }
19233 EOF
19234 if { (eval echo configure:19235: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19235   rm -rf conftest*
19236   ol_cv_db_db_4_dot_3=yes
19237 else
19238   echo "configure: failed program was:" >&5
19239   cat conftest.$ac_ext >&5
19240   rm -rf conftest*
19241   ol_cv_db_db_4_dot_3=no
19242 fi
19243 rm -f conftest*
19244
19245         LIBS="$ol_LIBS"
19246
19247 fi
19248
19249 echo "$ac_t""$ol_cv_db_db_4_dot_3" 1>&6
19250
19251         if test $ol_cv_db_db_4_dot_3 = yes ; then
19252                 ol_cv_lib_db=-ldb-4.3
19253         fi
19254 fi
19255
19256 if test $ol_cv_lib_db = no ; then
19257         echo $ac_n "checking for Berkeley DB link (-ldb-4-3)""... $ac_c" 1>&6
19258 echo "configure:19259: checking for Berkeley DB link (-ldb-4-3)" >&5
19259 if eval "test \"\${ol_cv_db_db_4_3+set}\" = set"; then
19260   echo $ac_n "(cached) $ac_c" 1>&6
19261 else
19262   
19263         ol_DB_LIB=-ldb-4-3
19264         ol_LIBS=$LIBS
19265         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19266
19267         cat > conftest.$ac_ext <<EOF
19268 #line 19269 "configure"
19269 #include "confdefs.h"
19270
19271 #ifdef HAVE_DB_185_H
19272 # include <db_185.h>
19273 #else
19274 # include <db.h>
19275 #endif
19276
19277 #ifndef DB_VERSION_MAJOR
19278 # define DB_VERSION_MAJOR 1
19279 #endif
19280
19281 #ifndef NULL
19282 #define NULL ((void*)0)
19283 #endif
19284
19285 int main() {
19286
19287 #if DB_VERSION_MAJOR > 1
19288         {
19289                 char *version;
19290                 int major, minor, patch;
19291
19292                 version = db_version( &major, &minor, &patch );
19293
19294                 if( major != DB_VERSION_MAJOR ||
19295                         minor < DB_VERSION_MINOR )
19296                 {
19297                         printf("Berkeley DB version mismatch\n"
19298                                 "\theader: %s\n\tlibrary: %s\n",
19299                                 DB_VERSION_STRING, version);
19300                         return 1;
19301                 }
19302         }
19303 #endif
19304
19305 #if DB_VERSION_MAJOR > 2
19306         db_env_create( NULL, 0 );
19307 #elif DB_VERSION_MAJOR > 1
19308         db_appexit( NULL );
19309 #else
19310         (void) dbopen( NULL, 0, 0, 0, NULL);
19311 #endif
19312
19313 ; return 0; }
19314 EOF
19315 if { (eval echo configure:19316: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19316   rm -rf conftest*
19317   ol_cv_db_db_4_3=yes
19318 else
19319   echo "configure: failed program was:" >&5
19320   cat conftest.$ac_ext >&5
19321   rm -rf conftest*
19322   ol_cv_db_db_4_3=no
19323 fi
19324 rm -f conftest*
19325
19326         LIBS="$ol_LIBS"
19327
19328 fi
19329
19330 echo "$ac_t""$ol_cv_db_db_4_3" 1>&6
19331
19332         if test $ol_cv_db_db_4_3 = yes ; then
19333                 ol_cv_lib_db=-ldb-4-3
19334         fi
19335 fi
19336
19337 if test $ol_cv_lib_db = no ; then
19338         echo $ac_n "checking for Berkeley DB link (-ldb42)""... $ac_c" 1>&6
19339 echo "configure:19340: checking for Berkeley DB link (-ldb42)" >&5
19340 if eval "test \"\${ol_cv_db_db42+set}\" = set"; then
19341   echo $ac_n "(cached) $ac_c" 1>&6
19342 else
19343   
19344         ol_DB_LIB=-ldb42
19345         ol_LIBS=$LIBS
19346         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19347
19348         cat > conftest.$ac_ext <<EOF
19349 #line 19350 "configure"
19350 #include "confdefs.h"
19351
19352 #ifdef HAVE_DB_185_H
19353 # include <db_185.h>
19354 #else
19355 # include <db.h>
19356 #endif
19357
19358 #ifndef DB_VERSION_MAJOR
19359 # define DB_VERSION_MAJOR 1
19360 #endif
19361
19362 #ifndef NULL
19363 #define NULL ((void*)0)
19364 #endif
19365
19366 int main() {
19367
19368 #if DB_VERSION_MAJOR > 1
19369         {
19370                 char *version;
19371                 int major, minor, patch;
19372
19373                 version = db_version( &major, &minor, &patch );
19374
19375                 if( major != DB_VERSION_MAJOR ||
19376                         minor < DB_VERSION_MINOR )
19377                 {
19378                         printf("Berkeley DB version mismatch\n"
19379                                 "\theader: %s\n\tlibrary: %s\n",
19380                                 DB_VERSION_STRING, version);
19381                         return 1;
19382                 }
19383         }
19384 #endif
19385
19386 #if DB_VERSION_MAJOR > 2
19387         db_env_create( NULL, 0 );
19388 #elif DB_VERSION_MAJOR > 1
19389         db_appexit( NULL );
19390 #else
19391         (void) dbopen( NULL, 0, 0, 0, NULL);
19392 #endif
19393
19394 ; return 0; }
19395 EOF
19396 if { (eval echo configure:19397: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19397   rm -rf conftest*
19398   ol_cv_db_db42=yes
19399 else
19400   echo "configure: failed program was:" >&5
19401   cat conftest.$ac_ext >&5
19402   rm -rf conftest*
19403   ol_cv_db_db42=no
19404 fi
19405 rm -f conftest*
19406
19407         LIBS="$ol_LIBS"
19408
19409 fi
19410
19411 echo "$ac_t""$ol_cv_db_db42" 1>&6
19412
19413         if test $ol_cv_db_db42 = yes ; then
19414                 ol_cv_lib_db=-ldb42
19415         fi
19416 fi
19417
19418 if test $ol_cv_lib_db = no ; then
19419         echo $ac_n "checking for Berkeley DB link (-ldb-42)""... $ac_c" 1>&6
19420 echo "configure:19421: checking for Berkeley DB link (-ldb-42)" >&5
19421 if eval "test \"\${ol_cv_db_db_42+set}\" = set"; then
19422   echo $ac_n "(cached) $ac_c" 1>&6
19423 else
19424   
19425         ol_DB_LIB=-ldb-42
19426         ol_LIBS=$LIBS
19427         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19428
19429         cat > conftest.$ac_ext <<EOF
19430 #line 19431 "configure"
19431 #include "confdefs.h"
19432
19433 #ifdef HAVE_DB_185_H
19434 # include <db_185.h>
19435 #else
19436 # include <db.h>
19437 #endif
19438
19439 #ifndef DB_VERSION_MAJOR
19440 # define DB_VERSION_MAJOR 1
19441 #endif
19442
19443 #ifndef NULL
19444 #define NULL ((void*)0)
19445 #endif
19446
19447 int main() {
19448
19449 #if DB_VERSION_MAJOR > 1
19450         {
19451                 char *version;
19452                 int major, minor, patch;
19453
19454                 version = db_version( &major, &minor, &patch );
19455
19456                 if( major != DB_VERSION_MAJOR ||
19457                         minor < DB_VERSION_MINOR )
19458                 {
19459                         printf("Berkeley DB version mismatch\n"
19460                                 "\theader: %s\n\tlibrary: %s\n",
19461                                 DB_VERSION_STRING, version);
19462                         return 1;
19463                 }
19464         }
19465 #endif
19466
19467 #if DB_VERSION_MAJOR > 2
19468         db_env_create( NULL, 0 );
19469 #elif DB_VERSION_MAJOR > 1
19470         db_appexit( NULL );
19471 #else
19472         (void) dbopen( NULL, 0, 0, 0, NULL);
19473 #endif
19474
19475 ; return 0; }
19476 EOF
19477 if { (eval echo configure:19478: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19478   rm -rf conftest*
19479   ol_cv_db_db_42=yes
19480 else
19481   echo "configure: failed program was:" >&5
19482   cat conftest.$ac_ext >&5
19483   rm -rf conftest*
19484   ol_cv_db_db_42=no
19485 fi
19486 rm -f conftest*
19487
19488         LIBS="$ol_LIBS"
19489
19490 fi
19491
19492 echo "$ac_t""$ol_cv_db_db_42" 1>&6
19493
19494         if test $ol_cv_db_db_42 = yes ; then
19495                 ol_cv_lib_db=-ldb-42
19496         fi
19497 fi
19498
19499 if test $ol_cv_lib_db = no ; then
19500         echo $ac_n "checking for Berkeley DB link (-ldb-4.2)""... $ac_c" 1>&6
19501 echo "configure:19502: checking for Berkeley DB link (-ldb-4.2)" >&5
19502 if eval "test \"\${ol_cv_db_db_4_dot_2+set}\" = set"; then
19503   echo $ac_n "(cached) $ac_c" 1>&6
19504 else
19505   
19506         ol_DB_LIB=-ldb-4.2
19507         ol_LIBS=$LIBS
19508         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19509
19510         cat > conftest.$ac_ext <<EOF
19511 #line 19512 "configure"
19512 #include "confdefs.h"
19513
19514 #ifdef HAVE_DB_185_H
19515 # include <db_185.h>
19516 #else
19517 # include <db.h>
19518 #endif
19519
19520 #ifndef DB_VERSION_MAJOR
19521 # define DB_VERSION_MAJOR 1
19522 #endif
19523
19524 #ifndef NULL
19525 #define NULL ((void*)0)
19526 #endif
19527
19528 int main() {
19529
19530 #if DB_VERSION_MAJOR > 1
19531         {
19532                 char *version;
19533                 int major, minor, patch;
19534
19535                 version = db_version( &major, &minor, &patch );
19536
19537                 if( major != DB_VERSION_MAJOR ||
19538                         minor < DB_VERSION_MINOR )
19539                 {
19540                         printf("Berkeley DB version mismatch\n"
19541                                 "\theader: %s\n\tlibrary: %s\n",
19542                                 DB_VERSION_STRING, version);
19543                         return 1;
19544                 }
19545         }
19546 #endif
19547
19548 #if DB_VERSION_MAJOR > 2
19549         db_env_create( NULL, 0 );
19550 #elif DB_VERSION_MAJOR > 1
19551         db_appexit( NULL );
19552 #else
19553         (void) dbopen( NULL, 0, 0, 0, NULL);
19554 #endif
19555
19556 ; return 0; }
19557 EOF
19558 if { (eval echo configure:19559: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19559   rm -rf conftest*
19560   ol_cv_db_db_4_dot_2=yes
19561 else
19562   echo "configure: failed program was:" >&5
19563   cat conftest.$ac_ext >&5
19564   rm -rf conftest*
19565   ol_cv_db_db_4_dot_2=no
19566 fi
19567 rm -f conftest*
19568
19569         LIBS="$ol_LIBS"
19570
19571 fi
19572
19573 echo "$ac_t""$ol_cv_db_db_4_dot_2" 1>&6
19574
19575         if test $ol_cv_db_db_4_dot_2 = yes ; then
19576                 ol_cv_lib_db=-ldb-4.2
19577         fi
19578 fi
19579
19580 if test $ol_cv_lib_db = no ; then
19581         echo $ac_n "checking for Berkeley DB link (-ldb-4-2)""... $ac_c" 1>&6
19582 echo "configure:19583: checking for Berkeley DB link (-ldb-4-2)" >&5
19583 if eval "test \"\${ol_cv_db_db_4_2+set}\" = set"; then
19584   echo $ac_n "(cached) $ac_c" 1>&6
19585 else
19586   
19587         ol_DB_LIB=-ldb-4-2
19588         ol_LIBS=$LIBS
19589         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19590
19591         cat > conftest.$ac_ext <<EOF
19592 #line 19593 "configure"
19593 #include "confdefs.h"
19594
19595 #ifdef HAVE_DB_185_H
19596 # include <db_185.h>
19597 #else
19598 # include <db.h>
19599 #endif
19600
19601 #ifndef DB_VERSION_MAJOR
19602 # define DB_VERSION_MAJOR 1
19603 #endif
19604
19605 #ifndef NULL
19606 #define NULL ((void*)0)
19607 #endif
19608
19609 int main() {
19610
19611 #if DB_VERSION_MAJOR > 1
19612         {
19613                 char *version;
19614                 int major, minor, patch;
19615
19616                 version = db_version( &major, &minor, &patch );
19617
19618                 if( major != DB_VERSION_MAJOR ||
19619                         minor < DB_VERSION_MINOR )
19620                 {
19621                         printf("Berkeley DB version mismatch\n"
19622                                 "\theader: %s\n\tlibrary: %s\n",
19623                                 DB_VERSION_STRING, version);
19624                         return 1;
19625                 }
19626         }
19627 #endif
19628
19629 #if DB_VERSION_MAJOR > 2
19630         db_env_create( NULL, 0 );
19631 #elif DB_VERSION_MAJOR > 1
19632         db_appexit( NULL );
19633 #else
19634         (void) dbopen( NULL, 0, 0, 0, NULL);
19635 #endif
19636
19637 ; return 0; }
19638 EOF
19639 if { (eval echo configure:19640: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19640   rm -rf conftest*
19641   ol_cv_db_db_4_2=yes
19642 else
19643   echo "configure: failed program was:" >&5
19644   cat conftest.$ac_ext >&5
19645   rm -rf conftest*
19646   ol_cv_db_db_4_2=no
19647 fi
19648 rm -f conftest*
19649
19650         LIBS="$ol_LIBS"
19651
19652 fi
19653
19654 echo "$ac_t""$ol_cv_db_db_4_2" 1>&6
19655
19656         if test $ol_cv_db_db_4_2 = yes ; then
19657                 ol_cv_lib_db=-ldb-4-2
19658         fi
19659 fi
19660
19661 if test $ol_cv_lib_db = no ; then
19662         echo $ac_n "checking for Berkeley DB link (-ldb-4)""... $ac_c" 1>&6
19663 echo "configure:19664: checking for Berkeley DB link (-ldb-4)" >&5
19664 if eval "test \"\${ol_cv_db_db_4+set}\" = set"; then
19665   echo $ac_n "(cached) $ac_c" 1>&6
19666 else
19667   
19668         ol_DB_LIB=-ldb-4
19669         ol_LIBS=$LIBS
19670         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19671
19672         cat > conftest.$ac_ext <<EOF
19673 #line 19674 "configure"
19674 #include "confdefs.h"
19675
19676 #ifdef HAVE_DB_185_H
19677 # include <db_185.h>
19678 #else
19679 # include <db.h>
19680 #endif
19681
19682 #ifndef DB_VERSION_MAJOR
19683 # define DB_VERSION_MAJOR 1
19684 #endif
19685
19686 #ifndef NULL
19687 #define NULL ((void*)0)
19688 #endif
19689
19690 int main() {
19691
19692 #if DB_VERSION_MAJOR > 1
19693         {
19694                 char *version;
19695                 int major, minor, patch;
19696
19697                 version = db_version( &major, &minor, &patch );
19698
19699                 if( major != DB_VERSION_MAJOR ||
19700                         minor < DB_VERSION_MINOR )
19701                 {
19702                         printf("Berkeley DB version mismatch\n"
19703                                 "\theader: %s\n\tlibrary: %s\n",
19704                                 DB_VERSION_STRING, version);
19705                         return 1;
19706                 }
19707         }
19708 #endif
19709
19710 #if DB_VERSION_MAJOR > 2
19711         db_env_create( NULL, 0 );
19712 #elif DB_VERSION_MAJOR > 1
19713         db_appexit( NULL );
19714 #else
19715         (void) dbopen( NULL, 0, 0, 0, NULL);
19716 #endif
19717
19718 ; return 0; }
19719 EOF
19720 if { (eval echo configure:19721: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19721   rm -rf conftest*
19722   ol_cv_db_db_4=yes
19723 else
19724   echo "configure: failed program was:" >&5
19725   cat conftest.$ac_ext >&5
19726   rm -rf conftest*
19727   ol_cv_db_db_4=no
19728 fi
19729 rm -f conftest*
19730
19731         LIBS="$ol_LIBS"
19732
19733 fi
19734
19735 echo "$ac_t""$ol_cv_db_db_4" 1>&6
19736
19737         if test $ol_cv_db_db_4 = yes ; then
19738                 ol_cv_lib_db=-ldb-4
19739         fi
19740 fi
19741
19742 if test $ol_cv_lib_db = no ; then
19743         echo $ac_n "checking for Berkeley DB link (-ldb4)""... $ac_c" 1>&6
19744 echo "configure:19745: checking for Berkeley DB link (-ldb4)" >&5
19745 if eval "test \"\${ol_cv_db_db4+set}\" = set"; then
19746   echo $ac_n "(cached) $ac_c" 1>&6
19747 else
19748   
19749         ol_DB_LIB=-ldb4
19750         ol_LIBS=$LIBS
19751         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19752
19753         cat > conftest.$ac_ext <<EOF
19754 #line 19755 "configure"
19755 #include "confdefs.h"
19756
19757 #ifdef HAVE_DB_185_H
19758 # include <db_185.h>
19759 #else
19760 # include <db.h>
19761 #endif
19762
19763 #ifndef DB_VERSION_MAJOR
19764 # define DB_VERSION_MAJOR 1
19765 #endif
19766
19767 #ifndef NULL
19768 #define NULL ((void*)0)
19769 #endif
19770
19771 int main() {
19772
19773 #if DB_VERSION_MAJOR > 1
19774         {
19775                 char *version;
19776                 int major, minor, patch;
19777
19778                 version = db_version( &major, &minor, &patch );
19779
19780                 if( major != DB_VERSION_MAJOR ||
19781                         minor < DB_VERSION_MINOR )
19782                 {
19783                         printf("Berkeley DB version mismatch\n"
19784                                 "\theader: %s\n\tlibrary: %s\n",
19785                                 DB_VERSION_STRING, version);
19786                         return 1;
19787                 }
19788         }
19789 #endif
19790
19791 #if DB_VERSION_MAJOR > 2
19792         db_env_create( NULL, 0 );
19793 #elif DB_VERSION_MAJOR > 1
19794         db_appexit( NULL );
19795 #else
19796         (void) dbopen( NULL, 0, 0, 0, NULL);
19797 #endif
19798
19799 ; return 0; }
19800 EOF
19801 if { (eval echo configure:19802: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19802   rm -rf conftest*
19803   ol_cv_db_db4=yes
19804 else
19805   echo "configure: failed program was:" >&5
19806   cat conftest.$ac_ext >&5
19807   rm -rf conftest*
19808   ol_cv_db_db4=no
19809 fi
19810 rm -f conftest*
19811
19812         LIBS="$ol_LIBS"
19813
19814 fi
19815
19816 echo "$ac_t""$ol_cv_db_db4" 1>&6
19817
19818         if test $ol_cv_db_db4 = yes ; then
19819                 ol_cv_lib_db=-ldb4
19820         fi
19821 fi
19822
19823 if test $ol_cv_lib_db = no ; then
19824         echo $ac_n "checking for Berkeley DB link (-ldb)""... $ac_c" 1>&6
19825 echo "configure:19826: checking for Berkeley DB link (-ldb)" >&5
19826 if eval "test \"\${ol_cv_db_db+set}\" = set"; then
19827   echo $ac_n "(cached) $ac_c" 1>&6
19828 else
19829   
19830         ol_DB_LIB=-ldb
19831         ol_LIBS=$LIBS
19832         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19833
19834         cat > conftest.$ac_ext <<EOF
19835 #line 19836 "configure"
19836 #include "confdefs.h"
19837
19838 #ifdef HAVE_DB_185_H
19839 # include <db_185.h>
19840 #else
19841 # include <db.h>
19842 #endif
19843
19844 #ifndef DB_VERSION_MAJOR
19845 # define DB_VERSION_MAJOR 1
19846 #endif
19847
19848 #ifndef NULL
19849 #define NULL ((void*)0)
19850 #endif
19851
19852 int main() {
19853
19854 #if DB_VERSION_MAJOR > 1
19855         {
19856                 char *version;
19857                 int major, minor, patch;
19858
19859                 version = db_version( &major, &minor, &patch );
19860
19861                 if( major != DB_VERSION_MAJOR ||
19862                         minor < DB_VERSION_MINOR )
19863                 {
19864                         printf("Berkeley DB version mismatch\n"
19865                                 "\theader: %s\n\tlibrary: %s\n",
19866                                 DB_VERSION_STRING, version);
19867                         return 1;
19868                 }
19869         }
19870 #endif
19871
19872 #if DB_VERSION_MAJOR > 2
19873         db_env_create( NULL, 0 );
19874 #elif DB_VERSION_MAJOR > 1
19875         db_appexit( NULL );
19876 #else
19877         (void) dbopen( NULL, 0, 0, 0, NULL);
19878 #endif
19879
19880 ; return 0; }
19881 EOF
19882 if { (eval echo configure:19883: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19883   rm -rf conftest*
19884   ol_cv_db_db=yes
19885 else
19886   echo "configure: failed program was:" >&5
19887   cat conftest.$ac_ext >&5
19888   rm -rf conftest*
19889   ol_cv_db_db=no
19890 fi
19891 rm -f conftest*
19892
19893         LIBS="$ol_LIBS"
19894
19895 fi
19896
19897 echo "$ac_t""$ol_cv_db_db" 1>&6
19898
19899         if test $ol_cv_db_db = yes ; then
19900                 ol_cv_lib_db=-ldb
19901         fi
19902 fi
19903
19904 if test $ol_cv_lib_db = no ; then
19905         echo $ac_n "checking for Berkeley DB link (-ldb41)""... $ac_c" 1>&6
19906 echo "configure:19907: checking for Berkeley DB link (-ldb41)" >&5
19907 if eval "test \"\${ol_cv_db_db41+set}\" = set"; then
19908   echo $ac_n "(cached) $ac_c" 1>&6
19909 else
19910   
19911         ol_DB_LIB=-ldb41
19912         ol_LIBS=$LIBS
19913         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19914
19915         cat > conftest.$ac_ext <<EOF
19916 #line 19917 "configure"
19917 #include "confdefs.h"
19918
19919 #ifdef HAVE_DB_185_H
19920 # include <db_185.h>
19921 #else
19922 # include <db.h>
19923 #endif
19924
19925 #ifndef DB_VERSION_MAJOR
19926 # define DB_VERSION_MAJOR 1
19927 #endif
19928
19929 #ifndef NULL
19930 #define NULL ((void*)0)
19931 #endif
19932
19933 int main() {
19934
19935 #if DB_VERSION_MAJOR > 1
19936         {
19937                 char *version;
19938                 int major, minor, patch;
19939
19940                 version = db_version( &major, &minor, &patch );
19941
19942                 if( major != DB_VERSION_MAJOR ||
19943                         minor < DB_VERSION_MINOR )
19944                 {
19945                         printf("Berkeley DB version mismatch\n"
19946                                 "\theader: %s\n\tlibrary: %s\n",
19947                                 DB_VERSION_STRING, version);
19948                         return 1;
19949                 }
19950         }
19951 #endif
19952
19953 #if DB_VERSION_MAJOR > 2
19954         db_env_create( NULL, 0 );
19955 #elif DB_VERSION_MAJOR > 1
19956         db_appexit( NULL );
19957 #else
19958         (void) dbopen( NULL, 0, 0, 0, NULL);
19959 #endif
19960
19961 ; return 0; }
19962 EOF
19963 if { (eval echo configure:19964: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19964   rm -rf conftest*
19965   ol_cv_db_db41=yes
19966 else
19967   echo "configure: failed program was:" >&5
19968   cat conftest.$ac_ext >&5
19969   rm -rf conftest*
19970   ol_cv_db_db41=no
19971 fi
19972 rm -f conftest*
19973
19974         LIBS="$ol_LIBS"
19975
19976 fi
19977
19978 echo "$ac_t""$ol_cv_db_db41" 1>&6
19979
19980         if test $ol_cv_db_db41 = yes ; then
19981                 ol_cv_lib_db=-ldb41
19982         fi
19983 fi
19984
19985 if test $ol_cv_lib_db = no ; then
19986         echo $ac_n "checking for Berkeley DB link (-ldb-41)""... $ac_c" 1>&6
19987 echo "configure:19988: checking for Berkeley DB link (-ldb-41)" >&5
19988 if eval "test \"\${ol_cv_db_db_41+set}\" = set"; then
19989   echo $ac_n "(cached) $ac_c" 1>&6
19990 else
19991   
19992         ol_DB_LIB=-ldb-41
19993         ol_LIBS=$LIBS
19994         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19995
19996         cat > conftest.$ac_ext <<EOF
19997 #line 19998 "configure"
19998 #include "confdefs.h"
19999
20000 #ifdef HAVE_DB_185_H
20001 # include <db_185.h>
20002 #else
20003 # include <db.h>
20004 #endif
20005
20006 #ifndef DB_VERSION_MAJOR
20007 # define DB_VERSION_MAJOR 1
20008 #endif
20009
20010 #ifndef NULL
20011 #define NULL ((void*)0)
20012 #endif
20013
20014 int main() {
20015
20016 #if DB_VERSION_MAJOR > 1
20017         {
20018                 char *version;
20019                 int major, minor, patch;
20020
20021                 version = db_version( &major, &minor, &patch );
20022
20023                 if( major != DB_VERSION_MAJOR ||
20024                         minor < DB_VERSION_MINOR )
20025                 {
20026                         printf("Berkeley DB version mismatch\n"
20027                                 "\theader: %s\n\tlibrary: %s\n",
20028                                 DB_VERSION_STRING, version);
20029                         return 1;
20030                 }
20031         }
20032 #endif
20033
20034 #if DB_VERSION_MAJOR > 2
20035         db_env_create( NULL, 0 );
20036 #elif DB_VERSION_MAJOR > 1
20037         db_appexit( NULL );
20038 #else
20039         (void) dbopen( NULL, 0, 0, 0, NULL);
20040 #endif
20041
20042 ; return 0; }
20043 EOF
20044 if { (eval echo configure:20045: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20045   rm -rf conftest*
20046   ol_cv_db_db_41=yes
20047 else
20048   echo "configure: failed program was:" >&5
20049   cat conftest.$ac_ext >&5
20050   rm -rf conftest*
20051   ol_cv_db_db_41=no
20052 fi
20053 rm -f conftest*
20054
20055         LIBS="$ol_LIBS"
20056
20057 fi
20058
20059 echo "$ac_t""$ol_cv_db_db_41" 1>&6
20060
20061         if test $ol_cv_db_db_41 = yes ; then
20062                 ol_cv_lib_db=-ldb-41
20063         fi
20064 fi
20065
20066 if test $ol_cv_lib_db = no ; then
20067         echo $ac_n "checking for Berkeley DB link (-ldb-4.1)""... $ac_c" 1>&6
20068 echo "configure:20069: checking for Berkeley DB link (-ldb-4.1)" >&5
20069 if eval "test \"\${ol_cv_db_db_4_dot_1+set}\" = set"; then
20070   echo $ac_n "(cached) $ac_c" 1>&6
20071 else
20072   
20073         ol_DB_LIB=-ldb-4.1
20074         ol_LIBS=$LIBS
20075         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
20076
20077         cat > conftest.$ac_ext <<EOF
20078 #line 20079 "configure"
20079 #include "confdefs.h"
20080
20081 #ifdef HAVE_DB_185_H
20082 # include <db_185.h>
20083 #else
20084 # include <db.h>
20085 #endif
20086
20087 #ifndef DB_VERSION_MAJOR
20088 # define DB_VERSION_MAJOR 1
20089 #endif
20090
20091 #ifndef NULL
20092 #define NULL ((void*)0)
20093 #endif
20094
20095 int main() {
20096
20097 #if DB_VERSION_MAJOR > 1
20098         {
20099                 char *version;
20100                 int major, minor, patch;
20101
20102                 version = db_version( &major, &minor, &patch );
20103
20104                 if( major != DB_VERSION_MAJOR ||
20105                         minor < DB_VERSION_MINOR )
20106                 {
20107                         printf("Berkeley DB version mismatch\n"
20108                                 "\theader: %s\n\tlibrary: %s\n",
20109                                 DB_VERSION_STRING, version);
20110                         return 1;
20111                 }
20112         }
20113 #endif
20114
20115 #if DB_VERSION_MAJOR > 2
20116         db_env_create( NULL, 0 );
20117 #elif DB_VERSION_MAJOR > 1
20118         db_appexit( NULL );
20119 #else
20120         (void) dbopen( NULL, 0, 0, 0, NULL);
20121 #endif
20122
20123 ; return 0; }
20124 EOF
20125 if { (eval echo configure:20126: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20126   rm -rf conftest*
20127   ol_cv_db_db_4_dot_1=yes
20128 else
20129   echo "configure: failed program was:" >&5
20130   cat conftest.$ac_ext >&5
20131   rm -rf conftest*
20132   ol_cv_db_db_4_dot_1=no
20133 fi
20134 rm -f conftest*
20135
20136         LIBS="$ol_LIBS"
20137
20138 fi
20139
20140 echo "$ac_t""$ol_cv_db_db_4_dot_1" 1>&6
20141
20142         if test $ol_cv_db_db_4_dot_1 = yes ; then
20143                 ol_cv_lib_db=-ldb-4.1
20144         fi
20145 fi
20146
20147 if test $ol_cv_lib_db = no ; then
20148         echo $ac_n "checking for Berkeley DB link (-ldb-4-1)""... $ac_c" 1>&6
20149 echo "configure:20150: checking for Berkeley DB link (-ldb-4-1)" >&5
20150 if eval "test \"\${ol_cv_db_db_4_1+set}\" = set"; then
20151   echo $ac_n "(cached) $ac_c" 1>&6
20152 else
20153   
20154         ol_DB_LIB=-ldb-4-1
20155         ol_LIBS=$LIBS
20156         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
20157
20158         cat > conftest.$ac_ext <<EOF
20159 #line 20160 "configure"
20160 #include "confdefs.h"
20161
20162 #ifdef HAVE_DB_185_H
20163 # include <db_185.h>
20164 #else
20165 # include <db.h>
20166 #endif
20167
20168 #ifndef DB_VERSION_MAJOR
20169 # define DB_VERSION_MAJOR 1
20170 #endif
20171
20172 #ifndef NULL
20173 #define NULL ((void*)0)
20174 #endif
20175
20176 int main() {
20177
20178 #if DB_VERSION_MAJOR > 1
20179         {
20180                 char *version;
20181                 int major, minor, patch;
20182
20183                 version = db_version( &major, &minor, &patch );
20184
20185                 if( major != DB_VERSION_MAJOR ||
20186                         minor < DB_VERSION_MINOR )
20187                 {
20188                         printf("Berkeley DB version mismatch\n"
20189                                 "\theader: %s\n\tlibrary: %s\n",
20190                                 DB_VERSION_STRING, version);
20191                         return 1;
20192                 }
20193         }
20194 #endif
20195
20196 #if DB_VERSION_MAJOR > 2
20197         db_env_create( NULL, 0 );
20198 #elif DB_VERSION_MAJOR > 1
20199         db_appexit( NULL );
20200 #else
20201         (void) dbopen( NULL, 0, 0, 0, NULL);
20202 #endif
20203
20204 ; return 0; }
20205 EOF
20206 if { (eval echo configure:20207: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20207   rm -rf conftest*
20208   ol_cv_db_db_4_1=yes
20209 else
20210   echo "configure: failed program was:" >&5
20211   cat conftest.$ac_ext >&5
20212   rm -rf conftest*
20213   ol_cv_db_db_4_1=no
20214 fi
20215 rm -f conftest*
20216
20217         LIBS="$ol_LIBS"
20218
20219 fi
20220
20221 echo "$ac_t""$ol_cv_db_db_4_1" 1>&6
20222
20223         if test $ol_cv_db_db_4_1 = yes ; then
20224                 ol_cv_lib_db=-ldb-4-1
20225         fi
20226 fi
20227
20228 if test $ol_cv_lib_db = no ; then
20229         echo $ac_n "checking for Berkeley DB link (-ldb3)""... $ac_c" 1>&6
20230 echo "configure:20231: checking for Berkeley DB link (-ldb3)" >&5
20231 if eval "test \"\${ol_cv_db_db3+set}\" = set"; then
20232   echo $ac_n "(cached) $ac_c" 1>&6
20233 else
20234   
20235         ol_DB_LIB=-ldb3
20236         ol_LIBS=$LIBS
20237         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
20238
20239         cat > conftest.$ac_ext <<EOF
20240 #line 20241 "configure"
20241 #include "confdefs.h"
20242
20243 #ifdef HAVE_DB_185_H
20244 # include <db_185.h>
20245 #else
20246 # include <db.h>
20247 #endif
20248
20249 #ifndef DB_VERSION_MAJOR
20250 # define DB_VERSION_MAJOR 1
20251 #endif
20252
20253 #ifndef NULL
20254 #define NULL ((void*)0)
20255 #endif
20256
20257 int main() {
20258
20259 #if DB_VERSION_MAJOR > 1
20260         {
20261                 char *version;
20262                 int major, minor, patch;
20263
20264                 version = db_version( &major, &minor, &patch );
20265
20266                 if( major != DB_VERSION_MAJOR ||
20267                         minor < DB_VERSION_MINOR )
20268                 {
20269                         printf("Berkeley DB version mismatch\n"
20270                                 "\theader: %s\n\tlibrary: %s\n",
20271                                 DB_VERSION_STRING, version);
20272                         return 1;
20273                 }
20274         }
20275 #endif
20276
20277 #if DB_VERSION_MAJOR > 2
20278         db_env_create( NULL, 0 );
20279 #elif DB_VERSION_MAJOR > 1
20280         db_appexit( NULL );
20281 #else
20282         (void) dbopen( NULL, 0, 0, 0, NULL);
20283 #endif
20284
20285 ; return 0; }
20286 EOF
20287 if { (eval echo configure:20288: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20288   rm -rf conftest*
20289   ol_cv_db_db3=yes
20290 else
20291   echo "configure: failed program was:" >&5
20292   cat conftest.$ac_ext >&5
20293   rm -rf conftest*
20294   ol_cv_db_db3=no
20295 fi
20296 rm -f conftest*
20297
20298         LIBS="$ol_LIBS"
20299
20300 fi
20301
20302 echo "$ac_t""$ol_cv_db_db3" 1>&6
20303
20304         if test $ol_cv_db_db3 = yes ; then
20305                 ol_cv_lib_db=-ldb3
20306         fi
20307 fi
20308
20309 if test $ol_cv_lib_db = no ; then
20310         echo $ac_n "checking for Berkeley DB link (-ldb-3)""... $ac_c" 1>&6
20311 echo "configure:20312: checking for Berkeley DB link (-ldb-3)" >&5
20312 if eval "test \"\${ol_cv_db_db_3+set}\" = set"; then
20313   echo $ac_n "(cached) $ac_c" 1>&6
20314 else
20315   
20316         ol_DB_LIB=-ldb-3
20317         ol_LIBS=$LIBS
20318         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
20319
20320         cat > conftest.$ac_ext <<EOF
20321 #line 20322 "configure"
20322 #include "confdefs.h"
20323
20324 #ifdef HAVE_DB_185_H
20325 # include <db_185.h>
20326 #else
20327 # include <db.h>
20328 #endif
20329
20330 #ifndef DB_VERSION_MAJOR
20331 # define DB_VERSION_MAJOR 1
20332 #endif
20333
20334 #ifndef NULL
20335 #define NULL ((void*)0)
20336 #endif
20337
20338 int main() {
20339
20340 #if DB_VERSION_MAJOR > 1
20341         {
20342                 char *version;
20343                 int major, minor, patch;
20344
20345                 version = db_version( &major, &minor, &patch );
20346
20347                 if( major != DB_VERSION_MAJOR ||
20348                         minor < DB_VERSION_MINOR )
20349                 {
20350                         printf("Berkeley DB version mismatch\n"
20351                                 "\theader: %s\n\tlibrary: %s\n",
20352                                 DB_VERSION_STRING, version);
20353                         return 1;
20354                 }
20355         }
20356 #endif
20357
20358 #if DB_VERSION_MAJOR > 2
20359         db_env_create( NULL, 0 );
20360 #elif DB_VERSION_MAJOR > 1
20361         db_appexit( NULL );
20362 #else
20363         (void) dbopen( NULL, 0, 0, 0, NULL);
20364 #endif
20365
20366 ; return 0; }
20367 EOF
20368 if { (eval echo configure:20369: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20369   rm -rf conftest*
20370   ol_cv_db_db_3=yes
20371 else
20372   echo "configure: failed program was:" >&5
20373   cat conftest.$ac_ext >&5
20374   rm -rf conftest*
20375   ol_cv_db_db_3=no
20376 fi
20377 rm -f conftest*
20378
20379         LIBS="$ol_LIBS"
20380
20381 fi
20382
20383 echo "$ac_t""$ol_cv_db_db_3" 1>&6
20384
20385         if test $ol_cv_db_db_3 = yes ; then
20386                 ol_cv_lib_db=-ldb-3
20387         fi
20388 fi
20389
20390 if test $ol_cv_lib_db = no ; then
20391         echo $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6
20392 echo "configure:20393: checking for Berkeley DB link (-ldb2)" >&5
20393 if eval "test \"\${ol_cv_db_db2+set}\" = set"; then
20394   echo $ac_n "(cached) $ac_c" 1>&6
20395 else
20396   
20397         ol_DB_LIB=-ldb2
20398         ol_LIBS=$LIBS
20399         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
20400
20401         cat > conftest.$ac_ext <<EOF
20402 #line 20403 "configure"
20403 #include "confdefs.h"
20404
20405 #ifdef HAVE_DB_185_H
20406 # include <db_185.h>
20407 #else
20408 # include <db.h>
20409 #endif
20410
20411 #ifndef DB_VERSION_MAJOR
20412 # define DB_VERSION_MAJOR 1
20413 #endif
20414
20415 #ifndef NULL
20416 #define NULL ((void*)0)
20417 #endif
20418
20419 int main() {
20420
20421 #if DB_VERSION_MAJOR > 1
20422         {
20423                 char *version;
20424                 int major, minor, patch;
20425
20426                 version = db_version( &major, &minor, &patch );
20427
20428                 if( major != DB_VERSION_MAJOR ||
20429                         minor < DB_VERSION_MINOR )
20430                 {
20431                         printf("Berkeley DB version mismatch\n"
20432                                 "\theader: %s\n\tlibrary: %s\n",
20433                                 DB_VERSION_STRING, version);
20434                         return 1;
20435                 }
20436         }
20437 #endif
20438
20439 #if DB_VERSION_MAJOR > 2
20440         db_env_create( NULL, 0 );
20441 #elif DB_VERSION_MAJOR > 1
20442         db_appexit( NULL );
20443 #else
20444         (void) dbopen( NULL, 0, 0, 0, NULL);
20445 #endif
20446
20447 ; return 0; }
20448 EOF
20449 if { (eval echo configure:20450: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20450   rm -rf conftest*
20451   ol_cv_db_db2=yes
20452 else
20453   echo "configure: failed program was:" >&5
20454   cat conftest.$ac_ext >&5
20455   rm -rf conftest*
20456   ol_cv_db_db2=no
20457 fi
20458 rm -f conftest*
20459
20460         LIBS="$ol_LIBS"
20461
20462 fi
20463
20464 echo "$ac_t""$ol_cv_db_db2" 1>&6
20465
20466         if test $ol_cv_db_db2 = yes ; then
20467                 ol_cv_lib_db=-ldb2
20468         fi
20469 fi
20470
20471 if test $ol_cv_lib_db = no ; then
20472         echo $ac_n "checking for Berkeley DB link (-ldb-2)""... $ac_c" 1>&6
20473 echo "configure:20474: checking for Berkeley DB link (-ldb-2)" >&5
20474 if eval "test \"\${ol_cv_db_db_2+set}\" = set"; then
20475   echo $ac_n "(cached) $ac_c" 1>&6
20476 else
20477   
20478         ol_DB_LIB=-ldb-2
20479         ol_LIBS=$LIBS
20480         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
20481
20482         cat > conftest.$ac_ext <<EOF
20483 #line 20484 "configure"
20484 #include "confdefs.h"
20485
20486 #ifdef HAVE_DB_185_H
20487 # include <db_185.h>
20488 #else
20489 # include <db.h>
20490 #endif
20491
20492 #ifndef DB_VERSION_MAJOR
20493 # define DB_VERSION_MAJOR 1
20494 #endif
20495
20496 #ifndef NULL
20497 #define NULL ((void*)0)
20498 #endif
20499
20500 int main() {
20501
20502 #if DB_VERSION_MAJOR > 1
20503         {
20504                 char *version;
20505                 int major, minor, patch;
20506
20507                 version = db_version( &major, &minor, &patch );
20508
20509                 if( major != DB_VERSION_MAJOR ||
20510                         minor < DB_VERSION_MINOR )
20511                 {
20512                         printf("Berkeley DB version mismatch\n"
20513                                 "\theader: %s\n\tlibrary: %s\n",
20514                                 DB_VERSION_STRING, version);
20515                         return 1;
20516                 }
20517         }
20518 #endif
20519
20520 #if DB_VERSION_MAJOR > 2
20521         db_env_create( NULL, 0 );
20522 #elif DB_VERSION_MAJOR > 1
20523         db_appexit( NULL );
20524 #else
20525         (void) dbopen( NULL, 0, 0, 0, NULL);
20526 #endif
20527
20528 ; return 0; }
20529 EOF
20530 if { (eval echo configure:20531: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20531   rm -rf conftest*
20532   ol_cv_db_db_2=yes
20533 else
20534   echo "configure: failed program was:" >&5
20535   cat conftest.$ac_ext >&5
20536   rm -rf conftest*
20537   ol_cv_db_db_2=no
20538 fi
20539 rm -f conftest*
20540
20541         LIBS="$ol_LIBS"
20542
20543 fi
20544
20545 echo "$ac_t""$ol_cv_db_db_2" 1>&6
20546
20547         if test $ol_cv_db_db_2 = yes ; then
20548                 ol_cv_lib_db=-ldb-2
20549         fi
20550 fi
20551
20552 if test $ol_cv_lib_db = no ; then
20553         echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6
20554 echo "configure:20555: checking for Berkeley DB link (-ldb1)" >&5
20555 if eval "test \"\${ol_cv_db_db1+set}\" = set"; then
20556   echo $ac_n "(cached) $ac_c" 1>&6
20557 else
20558   
20559         ol_DB_LIB=-ldb1
20560         ol_LIBS=$LIBS
20561         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
20562
20563         cat > conftest.$ac_ext <<EOF
20564 #line 20565 "configure"
20565 #include "confdefs.h"
20566
20567 #ifdef HAVE_DB_185_H
20568 # include <db_185.h>
20569 #else
20570 # include <db.h>
20571 #endif
20572
20573 #ifndef DB_VERSION_MAJOR
20574 # define DB_VERSION_MAJOR 1
20575 #endif
20576
20577 #ifndef NULL
20578 #define NULL ((void*)0)
20579 #endif
20580
20581 int main() {
20582
20583 #if DB_VERSION_MAJOR > 1
20584         {
20585                 char *version;
20586                 int major, minor, patch;
20587
20588                 version = db_version( &major, &minor, &patch );
20589
20590                 if( major != DB_VERSION_MAJOR ||
20591                         minor < DB_VERSION_MINOR )
20592                 {
20593                         printf("Berkeley DB version mismatch\n"
20594                                 "\theader: %s\n\tlibrary: %s\n",
20595                                 DB_VERSION_STRING, version);
20596                         return 1;
20597                 }
20598         }
20599 #endif
20600
20601 #if DB_VERSION_MAJOR > 2
20602         db_env_create( NULL, 0 );
20603 #elif DB_VERSION_MAJOR > 1
20604         db_appexit( NULL );
20605 #else
20606         (void) dbopen( NULL, 0, 0, 0, NULL);
20607 #endif
20608
20609 ; return 0; }
20610 EOF
20611 if { (eval echo configure:20612: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20612   rm -rf conftest*
20613   ol_cv_db_db1=yes
20614 else
20615   echo "configure: failed program was:" >&5
20616   cat conftest.$ac_ext >&5
20617   rm -rf conftest*
20618   ol_cv_db_db1=no
20619 fi
20620 rm -f conftest*
20621
20622         LIBS="$ol_LIBS"
20623
20624 fi
20625
20626 echo "$ac_t""$ol_cv_db_db1" 1>&6
20627
20628         if test $ol_cv_db_db1 = yes ; then
20629                 ol_cv_lib_db=-ldb1
20630         fi
20631 fi
20632
20633 if test $ol_cv_lib_db = no ; then
20634         echo $ac_n "checking for Berkeley DB link (-ldb-1)""... $ac_c" 1>&6
20635 echo "configure:20636: checking for Berkeley DB link (-ldb-1)" >&5
20636 if eval "test \"\${ol_cv_db_db_1+set}\" = set"; then
20637   echo $ac_n "(cached) $ac_c" 1>&6
20638 else
20639   
20640         ol_DB_LIB=-ldb-1
20641         ol_LIBS=$LIBS
20642         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
20643
20644         cat > conftest.$ac_ext <<EOF
20645 #line 20646 "configure"
20646 #include "confdefs.h"
20647
20648 #ifdef HAVE_DB_185_H
20649 # include <db_185.h>
20650 #else
20651 # include <db.h>
20652 #endif
20653
20654 #ifndef DB_VERSION_MAJOR
20655 # define DB_VERSION_MAJOR 1
20656 #endif
20657
20658 #ifndef NULL
20659 #define NULL ((void*)0)
20660 #endif
20661
20662 int main() {
20663
20664 #if DB_VERSION_MAJOR > 1
20665         {
20666                 char *version;
20667                 int major, minor, patch;
20668
20669                 version = db_version( &major, &minor, &patch );
20670
20671                 if( major != DB_VERSION_MAJOR ||
20672                         minor < DB_VERSION_MINOR )
20673                 {
20674                         printf("Berkeley DB version mismatch\n"
20675                                 "\theader: %s\n\tlibrary: %s\n",
20676                                 DB_VERSION_STRING, version);
20677                         return 1;
20678                 }
20679         }
20680 #endif
20681
20682 #if DB_VERSION_MAJOR > 2
20683         db_env_create( NULL, 0 );
20684 #elif DB_VERSION_MAJOR > 1
20685         db_appexit( NULL );
20686 #else
20687         (void) dbopen( NULL, 0, 0, 0, NULL);
20688 #endif
20689
20690 ; return 0; }
20691 EOF
20692 if { (eval echo configure:20693: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20693   rm -rf conftest*
20694   ol_cv_db_db_1=yes
20695 else
20696   echo "configure: failed program was:" >&5
20697   cat conftest.$ac_ext >&5
20698   rm -rf conftest*
20699   ol_cv_db_db_1=no
20700 fi
20701 rm -f conftest*
20702
20703         LIBS="$ol_LIBS"
20704
20705 fi
20706
20707 echo "$ac_t""$ol_cv_db_db_1" 1>&6
20708
20709         if test $ol_cv_db_db_1 = yes ; then
20710                 ol_cv_lib_db=-ldb-1
20711         fi
20712 fi
20713
20714
20715         if test "$ol_cv_lib_db" != no ; then
20716                 ol_cv_berkeley_db=yes
20717                 echo $ac_n "checking for Berkeley DB version match""... $ac_c" 1>&6
20718 echo "configure:20719: checking for Berkeley DB version match" >&5
20719 if eval "test \"\${ol_cv_berkeley_db_version+set}\" = set"; then
20720   echo $ac_n "(cached) $ac_c" 1>&6
20721 else
20722   
20723         ol_LIBS="$LIBS"
20724         LIBS="$LTHREAD_LIBS $LIBS"
20725         if test $ol_cv_lib_db != yes ; then
20726                 LIBS="$ol_cv_lib_db $LIBS"
20727         fi
20728
20729         if test "$cross_compiling" = yes; then
20730   ol_cv_berkeley_db_version=cross
20731 else
20732   cat > conftest.$ac_ext <<EOF
20733 #line 20734 "configure"
20734 #include "confdefs.h"
20735
20736 #ifdef HAVE_DB_185_H
20737         choke me;
20738 #else
20739 #include <db.h>
20740 #endif
20741 #ifndef DB_VERSION_MAJOR
20742 # define DB_VERSION_MAJOR 1
20743 #endif
20744 #ifndef NULL
20745 #define NULL ((void *)0)
20746 #endif
20747 main()
20748 {
20749 #if DB_VERSION_MAJOR > 1
20750         char *version;
20751         int major, minor, patch;
20752
20753         version = db_version( &major, &minor, &patch );
20754
20755         if( major != DB_VERSION_MAJOR || minor < DB_VERSION_MINOR ) {
20756                 printf("Berkeley DB version mismatch\n"
20757                         "\theader: %s\n\tlibrary: %s\n",
20758                         DB_VERSION_STRING, version);
20759                 return 1;
20760         }
20761 #endif
20762
20763         return 0;
20764 }
20765 EOF
20766 if { (eval echo configure:20767: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
20767 then
20768   ol_cv_berkeley_db_version=yes
20769 else
20770   echo "configure: failed program was:" >&5
20771   cat conftest.$ac_ext >&5
20772   rm -fr conftest*
20773   ol_cv_berkeley_db_version=no
20774 fi
20775 rm -fr conftest*
20776 fi
20777
20778
20779         LIBS="$ol_LIBS"
20780
20781 fi
20782
20783 echo "$ac_t""$ol_cv_berkeley_db_version" 1>&6
20784
20785         if test $ol_cv_berkeley_db_version = no ; then
20786                 { echo "configure: error: Berkeley DB version mismatch" 1>&2; exit 1; }
20787         fi
20788
20789                 echo $ac_n "checking for Berkeley DB thread support""... $ac_c" 1>&6
20790 echo "configure:20791: checking for Berkeley DB thread support" >&5
20791 if eval "test \"\${ol_cv_berkeley_db_thread+set}\" = set"; then
20792   echo $ac_n "(cached) $ac_c" 1>&6
20793 else
20794   
20795         ol_LIBS="$LIBS"
20796         LIBS="$LTHREAD_LIBS $LIBS"
20797         if test $ol_cv_lib_db != yes ; then
20798                 LIBS="$ol_cv_lib_db $LIBS"
20799         fi
20800
20801         if test "$cross_compiling" = yes; then
20802   ol_cv_berkeley_db_thread=cross
20803 else
20804   cat > conftest.$ac_ext <<EOF
20805 #line 20806 "configure"
20806 #include "confdefs.h"
20807
20808 #ifdef HAVE_DB_185_H
20809         choke me;
20810 #else
20811 #include <db.h>
20812 #endif
20813 #ifndef NULL
20814 #define NULL ((void *)0)
20815 #endif
20816 main()
20817 {
20818         int rc;
20819         u_int32_t flags = DB_CREATE |
20820 #ifdef DB_PRIVATE
20821                 DB_PRIVATE |
20822 #endif
20823                 DB_THREAD;
20824
20825 #if DB_VERSION_MAJOR > 2
20826         DB_ENV *env = NULL;
20827
20828         rc = db_env_create( &env, 0 );
20829
20830         flags |= DB_INIT_MPOOL;
20831 #ifdef DB_MPOOL_PRIVATE
20832         flags |= DB_MPOOL_PRIVATE;
20833 #endif
20834
20835         if( rc ) {
20836                 printf("BerkeleyDB: %s\n", db_strerror(rc) );
20837                 return rc;
20838         }
20839
20840 #if (DB_VERSION_MAJOR > 3) || (DB_VERSION_MINOR >= 1)
20841         rc = env->open( env, NULL, flags, 0 );
20842 #else
20843         rc = env->open( env, NULL, NULL, flags, 0 );
20844 #endif
20845
20846         if ( rc == 0 ) {
20847                 rc = env->close( env, 0 );
20848         }
20849
20850         if( rc ) {
20851                 printf("BerkeleyDB: %s\n", db_strerror(rc) );
20852                 return rc;
20853         }
20854
20855 #else
20856         DB_ENV env;
20857         memset( &env, '\0', sizeof(env) );
20858
20859         rc = db_appinit( NULL, NULL, &env, flags );
20860
20861         if( rc == 0 ) {
20862                 db_appexit( &env );
20863         }
20864
20865         unlink("__db_mpool.share");
20866         unlink("__db_lock.share");
20867 #endif
20868
20869         return rc;
20870 }
20871 EOF
20872 if { (eval echo configure:20873: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
20873 then
20874   ol_cv_berkeley_db_thread=yes
20875 else
20876   echo "configure: failed program was:" >&5
20877   cat conftest.$ac_ext >&5
20878   rm -fr conftest*
20879   ol_cv_berkeley_db_thread=no
20880 fi
20881 rm -fr conftest*
20882 fi
20883
20884
20885         LIBS="$ol_LIBS"
20886
20887 fi
20888
20889 echo "$ac_t""$ol_cv_berkeley_db_thread" 1>&6
20890
20891         if test $ol_cv_berkeley_db_thread != no ; then
20892                 cat >> confdefs.h <<\EOF
20893 #define HAVE_BERKELEY_DB_THREAD 1
20894 EOF
20895
20896         fi
20897
20898         fi
20899 fi
20900
20901         fi
20902
20903         if test $ol_cv_berkeley_db != no ; then
20904                 cat >> confdefs.h <<\EOF
20905 #define HAVE_BERKELEY_DB 1
20906 EOF
20907
20908
20909                 ol_link_ldbm=berkeley
20910                 ol_with_ldbm_api=berkeley
20911
20912                 if test $ol_with_ldbm_type = hash ; then
20913                         cat >> confdefs.h <<\EOF
20914 #define LDBM_USE_DBHASH 1
20915 EOF
20916
20917                 else
20918                         cat >> confdefs.h <<\EOF
20919 #define LDBM_USE_DBBTREE 1
20920 EOF
20921
20922                 fi
20923
20924                                                 if test $ol_cv_lib_db != yes ; then
20925                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db"
20926                 fi
20927         fi
20928 fi
20929
20930 if test $ol_enable_bdb != no -o $ol_enable_hdb != no; then
20931         if test $ol_link_ldbm != berkeley ; then
20932                 { echo "configure: error: BDB/HDB: BerkeleyDB not available" 1>&2; exit 1; }
20933         else
20934                 echo $ac_n "checking Berkeley DB version for BDB backend""... $ac_c" 1>&6
20935 echo "configure:20936: checking Berkeley DB version for BDB backend" >&5
20936 if eval "test \"\${ol_cv_bdb_compat+set}\" = set"; then
20937   echo $ac_n "(cached) $ac_c" 1>&6
20938 else
20939   
20940         cat > conftest.$ac_ext <<EOF
20941 #line 20942 "configure"
20942 #include "confdefs.h"
20943
20944 #include <db.h>
20945
20946  /* this check could be improved */
20947 #ifndef DB_VERSION_MAJOR
20948 #       define DB_VERSION_MAJOR 1
20949 #endif
20950 #ifndef DB_VERSION_MINOR
20951 #       define DB_VERSION_MINOR 0
20952 #endif
20953
20954 /* require 4.2 or later */
20955 #if (DB_VERSION_MAJOR >= 4) && (DB_VERSION_MINOR >= 2)
20956         __db_version_compat
20957 #endif
20958         
20959 EOF
20960 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20961   egrep "__db_version_compat" >/dev/null 2>&1; then
20962   rm -rf conftest*
20963   ol_cv_bdb_compat=yes
20964 else
20965   rm -rf conftest*
20966   ol_cv_bdb_compat=no
20967 fi
20968 rm -f conftest*
20969
20970 fi
20971
20972 echo "$ac_t""$ol_cv_bdb_compat" 1>&6
20973
20974
20975                 if test $ol_cv_bdb_compat != yes ; then
20976                         { echo "configure: error: BDB/HDB: BerkeleyDB version incompatible" 1>&2; exit 1; }
20977                 fi
20978         fi
20979 fi
20980
20981 if test $ol_link_ldbm = no -a $ol_with_ldbm_type = btree ; then
20982         echo "configure: warning: Could not find LDBM with BTREE support" 1>&2
20983         ol_with_ldbm_api=none
20984 fi
20985
20986 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = mdbm ; then
20987         echo $ac_n "checking for MDBM library""... $ac_c" 1>&6
20988 echo "configure:20989: checking for MDBM library" >&5
20989 if eval "test \"\${ol_cv_lib_mdbm+set}\" = set"; then
20990   echo $ac_n "(cached) $ac_c" 1>&6
20991 else
20992         ol_LIBS="$LIBS"
20993         echo $ac_n "checking for mdbm_set_chain""... $ac_c" 1>&6
20994 echo "configure:20995: checking for mdbm_set_chain" >&5
20995 if eval "test \"\${ac_cv_func_mdbm_set_chain+set}\" = set"; then
20996   echo $ac_n "(cached) $ac_c" 1>&6
20997 else
20998   cat > conftest.$ac_ext <<EOF
20999 #line 21000 "configure"
21000 #include "confdefs.h"
21001 /* System header to define __stub macros and hopefully few prototypes,
21002     which can conflict with char mdbm_set_chain(); below.  */
21003 #include <assert.h>
21004 /* Override any gcc2 internal prototype to avoid an error.  */
21005 /* We use char because int might match the return type of a gcc2
21006     builtin and then its argument prototype would still apply.  */
21007 char mdbm_set_chain();
21008 char (*f)();
21009
21010 int main() {
21011
21012 /* The GNU C library defines this for functions which it implements
21013     to always fail with ENOSYS.  Some functions are actually named
21014     something starting with __ and the normal name is an alias.  */
21015 #if defined (__stub_mdbm_set_chain) || defined (__stub___mdbm_set_chain)
21016 choke me
21017 #else
21018 f = mdbm_set_chain;
21019 #endif
21020
21021 ; return 0; }
21022 EOF
21023 if { (eval echo configure:21024: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21024   rm -rf conftest*
21025   eval "ac_cv_func_mdbm_set_chain=yes"
21026 else
21027   echo "configure: failed program was:" >&5
21028   cat conftest.$ac_ext >&5
21029   rm -rf conftest*
21030   eval "ac_cv_func_mdbm_set_chain=no"
21031 fi
21032 rm -f conftest*
21033 fi
21034
21035 if eval "test \"`echo '$ac_cv_func_'mdbm_set_chain`\" = yes"; then
21036   echo "$ac_t""yes" 1>&6
21037   ol_cv_lib_mdbm=yes
21038 else
21039   echo "$ac_t""no" 1>&6
21040
21041                 echo $ac_n "checking for mdbm_set_chain in -lmdbm""... $ac_c" 1>&6
21042 echo "configure:21043: checking for mdbm_set_chain in -lmdbm" >&5
21043 ac_lib_var=`echo mdbm'_'mdbm_set_chain | sed 'y%./+-:%__p__%'`
21044 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
21045   echo $ac_n "(cached) $ac_c" 1>&6
21046 else
21047   ac_save_LIBS="$LIBS"
21048 LIBS="-lmdbm  $LIBS"
21049 cat > conftest.$ac_ext <<EOF
21050 #line 21051 "configure"
21051 #include "confdefs.h"
21052 /* Override any gcc2 internal prototype to avoid an error.  */
21053 /* We use char because int might match the return type of a gcc2
21054     builtin and then its argument prototype would still apply.  */
21055 char mdbm_set_chain();
21056
21057 int main() {
21058 mdbm_set_chain()
21059 ; return 0; }
21060 EOF
21061 if { (eval echo configure:21062: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21062   rm -rf conftest*
21063   eval "ac_cv_lib_$ac_lib_var=yes"
21064 else
21065   echo "configure: failed program was:" >&5
21066   cat conftest.$ac_ext >&5
21067   rm -rf conftest*
21068   eval "ac_cv_lib_$ac_lib_var=no"
21069 fi
21070 rm -f conftest*
21071 LIBS="$ac_save_LIBS"
21072
21073 fi
21074 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
21075   echo "$ac_t""yes" 1>&6
21076   ol_cv_lib_mdbm=-lmdbm
21077 else
21078   echo "$ac_t""no" 1>&6
21079 ol_cv_lib_mdbm=no
21080 fi
21081
21082         
21083 fi
21084
21085         LIBS="$ol_LIBS"
21086
21087 fi
21088
21089 echo "$ac_t""$ol_cv_lib_mdbm" 1>&6
21090
21091
21092  for ac_hdr in mdbm.h
21093 do
21094 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
21095 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
21096 echo "configure:21097: checking for $ac_hdr" >&5
21097 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
21098   echo $ac_n "(cached) $ac_c" 1>&6
21099 else
21100   cat > conftest.$ac_ext <<EOF
21101 #line 21102 "configure"
21102 #include "confdefs.h"
21103 #include <$ac_hdr>
21104 EOF
21105 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
21106 { (eval echo configure:21107: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
21107 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
21108 if test -z "$ac_err"; then
21109   rm -rf conftest*
21110   eval "ac_cv_header_$ac_safe=yes"
21111 else
21112   echo "$ac_err" >&5
21113   echo "configure: failed program was:" >&5
21114   cat conftest.$ac_ext >&5
21115   rm -rf conftest*
21116   eval "ac_cv_header_$ac_safe=no"
21117 fi
21118 rm -f conftest*
21119 fi
21120 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
21121   echo "$ac_t""yes" 1>&6
21122     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
21123   cat >> confdefs.h <<EOF
21124 #define $ac_tr_hdr 1
21125 EOF
21126  
21127 else
21128   echo "$ac_t""no" 1>&6
21129 fi
21130 done
21131
21132  echo $ac_n "checking for db""... $ac_c" 1>&6
21133 echo "configure:21134: checking for db" >&5
21134 if eval "test \"\${ol_cv_mdbm+set}\" = set"; then
21135   echo $ac_n "(cached) $ac_c" 1>&6
21136 else
21137   
21138         if test $ol_cv_lib_mdbm = no -o $ac_cv_header_mdbm_h = no ; then
21139                 ol_cv_mdbm=no
21140         else
21141                 ol_cv_mdbm=yes
21142         fi
21143
21144 fi
21145
21146 echo "$ac_t""$ol_cv_mdbm" 1>&6
21147  if test $ol_cv_mdbm = yes ; then
21148         cat >> confdefs.h <<\EOF
21149 #define HAVE_MDBM 1
21150 EOF
21151
21152  fi
21153
21154
21155         if test $ol_cv_mdbm = yes ; then
21156                 ol_link_ldbm=mdbm
21157                 ol_with_ldbm_api=mdbm
21158                 if test $ol_cv_lib_mdbm != yes ; then
21159                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_mdbm"
21160                 fi
21161         fi
21162 fi
21163
21164 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = gdbm ; then
21165         echo $ac_n "checking for GDBM library""... $ac_c" 1>&6
21166 echo "configure:21167: checking for GDBM library" >&5
21167 if eval "test \"\${ol_cv_lib_gdbm+set}\" = set"; then
21168   echo $ac_n "(cached) $ac_c" 1>&6
21169 else
21170         ol_LIBS="$LIBS"
21171         echo $ac_n "checking for gdbm_open""... $ac_c" 1>&6
21172 echo "configure:21173: checking for gdbm_open" >&5
21173 if eval "test \"\${ac_cv_func_gdbm_open+set}\" = set"; then
21174   echo $ac_n "(cached) $ac_c" 1>&6
21175 else
21176   cat > conftest.$ac_ext <<EOF
21177 #line 21178 "configure"
21178 #include "confdefs.h"
21179 /* System header to define __stub macros and hopefully few prototypes,
21180     which can conflict with char gdbm_open(); below.  */
21181 #include <assert.h>
21182 /* Override any gcc2 internal prototype to avoid an error.  */
21183 /* We use char because int might match the return type of a gcc2
21184     builtin and then its argument prototype would still apply.  */
21185 char gdbm_open();
21186 char (*f)();
21187
21188 int main() {
21189
21190 /* The GNU C library defines this for functions which it implements
21191     to always fail with ENOSYS.  Some functions are actually named
21192     something starting with __ and the normal name is an alias.  */
21193 #if defined (__stub_gdbm_open) || defined (__stub___gdbm_open)
21194 choke me
21195 #else
21196 f = gdbm_open;
21197 #endif
21198
21199 ; return 0; }
21200 EOF
21201 if { (eval echo configure:21202: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21202   rm -rf conftest*
21203   eval "ac_cv_func_gdbm_open=yes"
21204 else
21205   echo "configure: failed program was:" >&5
21206   cat conftest.$ac_ext >&5
21207   rm -rf conftest*
21208   eval "ac_cv_func_gdbm_open=no"
21209 fi
21210 rm -f conftest*
21211 fi
21212
21213 if eval "test \"`echo '$ac_cv_func_'gdbm_open`\" = yes"; then
21214   echo "$ac_t""yes" 1>&6
21215   ol_cv_lib_gdbm=yes
21216 else
21217   echo "$ac_t""no" 1>&6
21218
21219                 echo $ac_n "checking for gdbm_open in -lgdbm""... $ac_c" 1>&6
21220 echo "configure:21221: checking for gdbm_open in -lgdbm" >&5
21221 ac_lib_var=`echo gdbm'_'gdbm_open | sed 'y%./+-:%__p__%'`
21222 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
21223   echo $ac_n "(cached) $ac_c" 1>&6
21224 else
21225   ac_save_LIBS="$LIBS"
21226 LIBS="-lgdbm  $LIBS"
21227 cat > conftest.$ac_ext <<EOF
21228 #line 21229 "configure"
21229 #include "confdefs.h"
21230 /* Override any gcc2 internal prototype to avoid an error.  */
21231 /* We use char because int might match the return type of a gcc2
21232     builtin and then its argument prototype would still apply.  */
21233 char gdbm_open();
21234
21235 int main() {
21236 gdbm_open()
21237 ; return 0; }
21238 EOF
21239 if { (eval echo configure:21240: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21240   rm -rf conftest*
21241   eval "ac_cv_lib_$ac_lib_var=yes"
21242 else
21243   echo "configure: failed program was:" >&5
21244   cat conftest.$ac_ext >&5
21245   rm -rf conftest*
21246   eval "ac_cv_lib_$ac_lib_var=no"
21247 fi
21248 rm -f conftest*
21249 LIBS="$ac_save_LIBS"
21250
21251 fi
21252 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
21253   echo "$ac_t""yes" 1>&6
21254   ol_cv_lib_gdbm=-lgdbm
21255 else
21256   echo "$ac_t""no" 1>&6
21257 ol_cv_lib_gdbm=no
21258 fi
21259
21260         
21261 fi
21262
21263         LIBS="$ol_LIBS"
21264
21265 fi
21266
21267 echo "$ac_t""$ol_cv_lib_gdbm" 1>&6
21268
21269
21270  for ac_hdr in gdbm.h
21271 do
21272 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
21273 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
21274 echo "configure:21275: checking for $ac_hdr" >&5
21275 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
21276   echo $ac_n "(cached) $ac_c" 1>&6
21277 else
21278   cat > conftest.$ac_ext <<EOF
21279 #line 21280 "configure"
21280 #include "confdefs.h"
21281 #include <$ac_hdr>
21282 EOF
21283 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
21284 { (eval echo configure:21285: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
21285 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
21286 if test -z "$ac_err"; then
21287   rm -rf conftest*
21288   eval "ac_cv_header_$ac_safe=yes"
21289 else
21290   echo "$ac_err" >&5
21291   echo "configure: failed program was:" >&5
21292   cat conftest.$ac_ext >&5
21293   rm -rf conftest*
21294   eval "ac_cv_header_$ac_safe=no"
21295 fi
21296 rm -f conftest*
21297 fi
21298 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
21299   echo "$ac_t""yes" 1>&6
21300     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
21301   cat >> confdefs.h <<EOF
21302 #define $ac_tr_hdr 1
21303 EOF
21304  
21305 else
21306   echo "$ac_t""no" 1>&6
21307 fi
21308 done
21309
21310  echo $ac_n "checking for db""... $ac_c" 1>&6
21311 echo "configure:21312: checking for db" >&5
21312 if eval "test \"\${ol_cv_gdbm+set}\" = set"; then
21313   echo $ac_n "(cached) $ac_c" 1>&6
21314 else
21315   
21316         if test $ol_cv_lib_gdbm = no -o $ac_cv_header_gdbm_h = no ; then
21317                 ol_cv_gdbm=no
21318         else
21319                 ol_cv_gdbm=yes
21320         fi
21321
21322 fi
21323
21324 echo "$ac_t""$ol_cv_gdbm" 1>&6
21325  if test $ol_cv_gdbm = yes ; then
21326         cat >> confdefs.h <<\EOF
21327 #define HAVE_GDBM 1
21328 EOF
21329
21330  fi
21331
21332
21333         if test $ol_cv_gdbm = yes ; then
21334                 ol_link_ldbm=gdbm
21335                 ol_with_ldbm_api=gdbm
21336
21337                 if test $ol_cv_lib_gdbm != yes ; then
21338                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_gdbm"
21339                 fi
21340         fi
21341 fi
21342
21343 if test $ol_with_ldbm_api = ndbm ; then
21344         echo $ac_n "checking for NDBM library""... $ac_c" 1>&6
21345 echo "configure:21346: checking for NDBM library" >&5
21346 if eval "test \"\${ol_cv_lib_ndbm+set}\" = set"; then
21347   echo $ac_n "(cached) $ac_c" 1>&6
21348 else
21349         ol_LIBS="$LIBS"
21350         echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
21351 echo "configure:21352: checking for dbm_open" >&5
21352 if eval "test \"\${ac_cv_func_dbm_open+set}\" = set"; then
21353   echo $ac_n "(cached) $ac_c" 1>&6
21354 else
21355   cat > conftest.$ac_ext <<EOF
21356 #line 21357 "configure"
21357 #include "confdefs.h"
21358 /* System header to define __stub macros and hopefully few prototypes,
21359     which can conflict with char dbm_open(); below.  */
21360 #include <assert.h>
21361 /* Override any gcc2 internal prototype to avoid an error.  */
21362 /* We use char because int might match the return type of a gcc2
21363     builtin and then its argument prototype would still apply.  */
21364 char dbm_open();
21365 char (*f)();
21366
21367 int main() {
21368
21369 /* The GNU C library defines this for functions which it implements
21370     to always fail with ENOSYS.  Some functions are actually named
21371     something starting with __ and the normal name is an alias.  */
21372 #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
21373 choke me
21374 #else
21375 f = dbm_open;
21376 #endif
21377
21378 ; return 0; }
21379 EOF
21380 if { (eval echo configure:21381: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21381   rm -rf conftest*
21382   eval "ac_cv_func_dbm_open=yes"
21383 else
21384   echo "configure: failed program was:" >&5
21385   cat conftest.$ac_ext >&5
21386   rm -rf conftest*
21387   eval "ac_cv_func_dbm_open=no"
21388 fi
21389 rm -f conftest*
21390 fi
21391
21392 if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then
21393   echo "$ac_t""yes" 1>&6
21394   ol_cv_lib_ndbm=yes
21395 else
21396   echo "$ac_t""no" 1>&6
21397
21398                 echo $ac_n "checking for dbm_open in -lndbm""... $ac_c" 1>&6
21399 echo "configure:21400: checking for dbm_open in -lndbm" >&5
21400 ac_lib_var=`echo ndbm'_'dbm_open | sed 'y%./+-:%__p__%'`
21401 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
21402   echo $ac_n "(cached) $ac_c" 1>&6
21403 else
21404   ac_save_LIBS="$LIBS"
21405 LIBS="-lndbm  $LIBS"
21406 cat > conftest.$ac_ext <<EOF
21407 #line 21408 "configure"
21408 #include "confdefs.h"
21409 /* Override any gcc2 internal prototype to avoid an error.  */
21410 /* We use char because int might match the return type of a gcc2
21411     builtin and then its argument prototype would still apply.  */
21412 char dbm_open();
21413
21414 int main() {
21415 dbm_open()
21416 ; return 0; }
21417 EOF
21418 if { (eval echo configure:21419: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21419   rm -rf conftest*
21420   eval "ac_cv_lib_$ac_lib_var=yes"
21421 else
21422   echo "configure: failed program was:" >&5
21423   cat conftest.$ac_ext >&5
21424   rm -rf conftest*
21425   eval "ac_cv_lib_$ac_lib_var=no"
21426 fi
21427 rm -f conftest*
21428 LIBS="$ac_save_LIBS"
21429
21430 fi
21431 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
21432   echo "$ac_t""yes" 1>&6
21433   ol_cv_lib_ndbm=-lndbm
21434 else
21435   echo "$ac_t""no" 1>&6
21436
21437                         echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
21438 echo "configure:21439: checking for dbm_open in -ldbm" >&5
21439 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-:%__p__%'`
21440 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
21441   echo $ac_n "(cached) $ac_c" 1>&6
21442 else
21443   ac_save_LIBS="$LIBS"
21444 LIBS="-ldbm  $LIBS"
21445 cat > conftest.$ac_ext <<EOF
21446 #line 21447 "configure"
21447 #include "confdefs.h"
21448 /* Override any gcc2 internal prototype to avoid an error.  */
21449 /* We use char because int might match the return type of a gcc2
21450     builtin and then its argument prototype would still apply.  */
21451 char dbm_open();
21452
21453 int main() {
21454 dbm_open()
21455 ; return 0; }
21456 EOF
21457 if { (eval echo configure:21458: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21458   rm -rf conftest*
21459   eval "ac_cv_lib_$ac_lib_var=yes"
21460 else
21461   echo "configure: failed program was:" >&5
21462   cat conftest.$ac_ext >&5
21463   rm -rf conftest*
21464   eval "ac_cv_lib_$ac_lib_var=no"
21465 fi
21466 rm -f conftest*
21467 LIBS="$ac_save_LIBS"
21468
21469 fi
21470 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
21471   echo "$ac_t""yes" 1>&6
21472   ol_cv_lib_ndbm=-ldbm
21473 else
21474   echo "$ac_t""no" 1>&6
21475 ol_cv_lib_ndbm=no
21476 fi
21477                 
21478 fi
21479
21480         
21481 fi
21482
21483         LIBS="$ol_LIBS"
21484
21485 fi
21486
21487 echo "$ac_t""$ol_cv_lib_ndbm" 1>&6
21488
21489
21490  for ac_hdr in ndbm.h
21491 do
21492 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
21493 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
21494 echo "configure:21495: checking for $ac_hdr" >&5
21495 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
21496   echo $ac_n "(cached) $ac_c" 1>&6
21497 else
21498   cat > conftest.$ac_ext <<EOF
21499 #line 21500 "configure"
21500 #include "confdefs.h"
21501 #include <$ac_hdr>
21502 EOF
21503 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
21504 { (eval echo configure:21505: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
21505 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
21506 if test -z "$ac_err"; then
21507   rm -rf conftest*
21508   eval "ac_cv_header_$ac_safe=yes"
21509 else
21510   echo "$ac_err" >&5
21511   echo "configure: failed program was:" >&5
21512   cat conftest.$ac_ext >&5
21513   rm -rf conftest*
21514   eval "ac_cv_header_$ac_safe=no"
21515 fi
21516 rm -f conftest*
21517 fi
21518 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
21519   echo "$ac_t""yes" 1>&6
21520     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
21521   cat >> confdefs.h <<EOF
21522 #define $ac_tr_hdr 1
21523 EOF
21524  
21525 else
21526   echo "$ac_t""no" 1>&6
21527 fi
21528 done
21529
21530  echo $ac_n "checking for db""... $ac_c" 1>&6
21531 echo "configure:21532: checking for db" >&5
21532 if eval "test \"\${ol_cv_ndbm+set}\" = set"; then
21533   echo $ac_n "(cached) $ac_c" 1>&6
21534 else
21535   
21536         if test $ol_cv_lib_ndbm = no -o $ac_cv_header_ndbm_h = no ; then
21537                 ol_cv_ndbm=no
21538         else
21539                 ol_cv_ndbm=yes
21540         fi
21541
21542 fi
21543
21544 echo "$ac_t""$ol_cv_ndbm" 1>&6
21545  if test $ol_cv_ndbm = yes ; then
21546         cat >> confdefs.h <<\EOF
21547 #define HAVE_NDBM 1
21548 EOF
21549
21550  fi
21551
21552
21553         if test $ol_cv_ndbm = yes ; then
21554                 ol_link_ldbm=ndbm
21555                 ol_with_ldbm_api=ndbm
21556
21557                 if test $ol_cv_lib_ndbm != yes ; then
21558                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_ndbm"
21559                 fi
21560         fi
21561 fi
21562
21563 if test $ol_link_ldbm = no -a $ol_enable_ldbm != no ; then
21564         { echo "configure: error: could not find suitable LDBM backend" 1>&2; exit 1; }
21565 fi
21566
21567 if test $ol_enable_bdb = yes -o \
21568         $ol_enable_hdb = yes -o \
21569         $ol_enable_ldbm = yes ; then
21570         SLAPD_LIBS="$SLAPD_LIBS \$(LDBM_LIBS)"
21571 fi
21572
21573
21574 if test $ol_enable_dynamic = yes -a $enable_shared = yes ; then
21575         BUILD_LIBS_DYNAMIC=shared
21576         cat >> confdefs.h <<\EOF
21577 #define LDAP_LIBS_DYNAMIC 1
21578 EOF
21579
21580         LTSTATIC=""
21581 else
21582         BUILD_LIBS_DYNAMIC=static
21583         LTSTATIC="-static"
21584 fi
21585
21586 if test $ol_enable_wrappers != no ; then
21587         for ac_hdr in tcpd.h
21588 do
21589 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
21590 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
21591 echo "configure:21592: checking for $ac_hdr" >&5
21592 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
21593   echo $ac_n "(cached) $ac_c" 1>&6
21594 else
21595   cat > conftest.$ac_ext <<EOF
21596 #line 21597 "configure"
21597 #include "confdefs.h"
21598 #include <$ac_hdr>
21599 EOF
21600 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
21601 { (eval echo configure:21602: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
21602 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
21603 if test -z "$ac_err"; then
21604   rm -rf conftest*
21605   eval "ac_cv_header_$ac_safe=yes"
21606 else
21607   echo "$ac_err" >&5
21608   echo "configure: failed program was:" >&5
21609   cat conftest.$ac_ext >&5
21610   rm -rf conftest*
21611   eval "ac_cv_header_$ac_safe=no"
21612 fi
21613 rm -f conftest*
21614 fi
21615 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
21616   echo "$ac_t""yes" 1>&6
21617     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
21618   cat >> confdefs.h <<EOF
21619 #define $ac_tr_hdr 1
21620 EOF
21621  
21622                 echo $ac_n "checking for TCP wrappers library""... $ac_c" 1>&6
21623 echo "configure:21624: checking for TCP wrappers library" >&5
21624                 save_LIBS="$LIBS"
21625                 LIBS="$LIBS -lwrap"
21626                 cat > conftest.$ac_ext <<EOF
21627 #line 21628 "configure"
21628 #include "confdefs.h"
21629
21630 #include <tcpd.h>
21631 int allow_severity = 0;
21632 int deny_severity  = 0;
21633
21634 struct request_info *req;
21635                 
21636 int main() {
21637
21638 hosts_access(req)
21639                 
21640 ; return 0; }
21641 EOF
21642 if { (eval echo configure:21643: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21643   rm -rf conftest*
21644   echo "$ac_t""-lwrap" 1>&6
21645                 have_wrappers=yes
21646                 LIBS="$save_LIBS"
21647 else
21648   echo "configure: failed program was:" >&5
21649   cat conftest.$ac_ext >&5
21650   rm -rf conftest*
21651   
21652                                 LIBS="$LIBS -lnsl"
21653                 cat > conftest.$ac_ext <<EOF
21654 #line 21655 "configure"
21655 #include "confdefs.h"
21656
21657 #include <tcpd.h>
21658 int allow_severity = 0;
21659 int deny_severity  = 0;
21660
21661 struct request_info *req;
21662                 
21663 int main() {
21664
21665 hosts_access(req)
21666                 
21667 ; return 0; }
21668 EOF
21669 if { (eval echo configure:21670: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21670   rm -rf conftest*
21671   echo "$ac_t""-lwrap -lnsl" 1>&6
21672                 have_wrappers=yes
21673                 LIBS="$save_LIBS -lnsl"
21674 else
21675   echo "configure: failed program was:" >&5
21676   cat conftest.$ac_ext >&5
21677   rm -rf conftest*
21678   
21679                 echo "$ac_t""no" 1>&6
21680                 have_wrappers=no
21681                 LIBS=$save_LIBS
21682 fi
21683 rm -f conftest*
21684 fi
21685 rm -f conftest*
21686 else
21687   echo "$ac_t""no" 1>&6
21688 have_wrappers=no
21689 fi
21690 done
21691
21692
21693         if test $have_wrappers = yes ; then
21694                 cat >> confdefs.h <<\EOF
21695 #define HAVE_TCPD 1
21696 EOF
21697
21698                 WRAP_LIBS="-lwrap"
21699         elif test $ol_enable_wrappers = yes ; then
21700                 { echo "configure: error: could not find TCP wrappers, select apppropriate options or disable" 1>&2; exit 1; }
21701         else
21702                 echo "configure: warning: could not find TCP wrappers, support disabled" 1>&2
21703                 WRAP_LIBS=""
21704         fi
21705 fi
21706
21707 if test $ol_enable_syslog != no ; then
21708         echo $ac_n "checking for openlog""... $ac_c" 1>&6
21709 echo "configure:21710: checking for openlog" >&5
21710 if eval "test \"\${ac_cv_func_openlog+set}\" = set"; then
21711   echo $ac_n "(cached) $ac_c" 1>&6
21712 else
21713   cat > conftest.$ac_ext <<EOF
21714 #line 21715 "configure"
21715 #include "confdefs.h"
21716 /* System header to define __stub macros and hopefully few prototypes,
21717     which can conflict with char openlog(); below.  */
21718 #include <assert.h>
21719 /* Override any gcc2 internal prototype to avoid an error.  */
21720 /* We use char because int might match the return type of a gcc2
21721     builtin and then its argument prototype would still apply.  */
21722 char openlog();
21723 char (*f)();
21724
21725 int main() {
21726
21727 /* The GNU C library defines this for functions which it implements
21728     to always fail with ENOSYS.  Some functions are actually named
21729     something starting with __ and the normal name is an alias.  */
21730 #if defined (__stub_openlog) || defined (__stub___openlog)
21731 choke me
21732 #else
21733 f = openlog;
21734 #endif
21735
21736 ; return 0; }
21737 EOF
21738 if { (eval echo configure:21739: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21739   rm -rf conftest*
21740   eval "ac_cv_func_openlog=yes"
21741 else
21742   echo "configure: failed program was:" >&5
21743   cat conftest.$ac_ext >&5
21744   rm -rf conftest*
21745   eval "ac_cv_func_openlog=no"
21746 fi
21747 rm -f conftest*
21748 fi
21749
21750 if eval "test \"`echo '$ac_cv_func_'openlog`\" = yes"; then
21751   echo "$ac_t""yes" 1>&6
21752   :
21753 else
21754   echo "$ac_t""no" 1>&6
21755 fi
21756
21757         if test $ac_cv_func_openlog = no -a $ol_enable_syslog = yes; then
21758                 { echo "configure: error: could not find syslog" 1>&2; exit 1; }
21759         fi
21760         ol_enable_syslog=$ac_cv_func_openlog
21761 fi
21762
21763
21764 ol_link_sql=no
21765 if test $ol_enable_sql != no ; then
21766         for ac_hdr in sql.h sqlext.h
21767 do
21768 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
21769 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
21770 echo "configure:21771: checking for $ac_hdr" >&5
21771 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
21772   echo $ac_n "(cached) $ac_c" 1>&6
21773 else
21774   cat > conftest.$ac_ext <<EOF
21775 #line 21776 "configure"
21776 #include "confdefs.h"
21777 #include <$ac_hdr>
21778 EOF
21779 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
21780 { (eval echo configure:21781: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
21781 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
21782 if test -z "$ac_err"; then
21783   rm -rf conftest*
21784   eval "ac_cv_header_$ac_safe=yes"
21785 else
21786   echo "$ac_err" >&5
21787   echo "configure: failed program was:" >&5
21788   cat conftest.$ac_ext >&5
21789   rm -rf conftest*
21790   eval "ac_cv_header_$ac_safe=no"
21791 fi
21792 rm -f conftest*
21793 fi
21794 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
21795   echo "$ac_t""yes" 1>&6
21796     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
21797   cat >> confdefs.h <<EOF
21798 #define $ac_tr_hdr 1
21799 EOF
21800  
21801 else
21802   echo "$ac_t""no" 1>&6
21803 { echo "configure: error: could not locate SQL headers" 1>&2; exit 1; }
21804         
21805 fi
21806 done
21807
21808
21809         echo $ac_n "checking for SQLDriverConnect in -liodbc""... $ac_c" 1>&6
21810 echo "configure:21811: checking for SQLDriverConnect in -liodbc" >&5
21811 ac_lib_var=`echo iodbc'_'SQLDriverConnect | sed 'y%./+-:%__p__%'`
21812 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
21813   echo $ac_n "(cached) $ac_c" 1>&6
21814 else
21815   ac_save_LIBS="$LIBS"
21816 LIBS="-liodbc  $LIBS"
21817 cat > conftest.$ac_ext <<EOF
21818 #line 21819 "configure"
21819 #include "confdefs.h"
21820 /* Override any gcc2 internal prototype to avoid an error.  */
21821 /* We use char because int might match the return type of a gcc2
21822     builtin and then its argument prototype would still apply.  */
21823 char SQLDriverConnect();
21824
21825 int main() {
21826 SQLDriverConnect()
21827 ; return 0; }
21828 EOF
21829 if { (eval echo configure:21830: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21830   rm -rf conftest*
21831   eval "ac_cv_lib_$ac_lib_var=yes"
21832 else
21833   echo "configure: failed program was:" >&5
21834   cat conftest.$ac_ext >&5
21835   rm -rf conftest*
21836   eval "ac_cv_lib_$ac_lib_var=no"
21837 fi
21838 rm -f conftest*
21839 LIBS="$ac_save_LIBS"
21840
21841 fi
21842 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
21843   echo "$ac_t""yes" 1>&6
21844   have_iodbc=yes
21845 else
21846   echo "$ac_t""no" 1>&6
21847 have_iodbc=no
21848 fi
21849
21850         if test $have_iodbc = yes ; then
21851                 ol_link_sql="-liodbc"
21852         else
21853                 echo $ac_n "checking for SQLDriverConnect in -lodbc""... $ac_c" 1>&6
21854 echo "configure:21855: checking for SQLDriverConnect in -lodbc" >&5
21855 ac_lib_var=`echo odbc'_'SQLDriverConnect | sed 'y%./+-:%__p__%'`
21856 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
21857   echo $ac_n "(cached) $ac_c" 1>&6
21858 else
21859   ac_save_LIBS="$LIBS"
21860 LIBS="-lodbc  $LIBS"
21861 cat > conftest.$ac_ext <<EOF
21862 #line 21863 "configure"
21863 #include "confdefs.h"
21864 /* Override any gcc2 internal prototype to avoid an error.  */
21865 /* We use char because int might match the return type of a gcc2
21866     builtin and then its argument prototype would still apply.  */
21867 char SQLDriverConnect();
21868
21869 int main() {
21870 SQLDriverConnect()
21871 ; return 0; }
21872 EOF
21873 if { (eval echo configure:21874: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21874   rm -rf conftest*
21875   eval "ac_cv_lib_$ac_lib_var=yes"
21876 else
21877   echo "configure: failed program was:" >&5
21878   cat conftest.$ac_ext >&5
21879   rm -rf conftest*
21880   eval "ac_cv_lib_$ac_lib_var=no"
21881 fi
21882 rm -f conftest*
21883 LIBS="$ac_save_LIBS"
21884
21885 fi
21886 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
21887   echo "$ac_t""yes" 1>&6
21888   have_odbc=yes
21889 else
21890   echo "$ac_t""no" 1>&6
21891 have_odbc=no
21892 fi
21893
21894                 if test $have_odbc = yes ; then
21895                         ol_link_sql="-lodbc"
21896                 fi
21897         fi
21898
21899         if test $ol_link_sql != no ; then
21900                 SLAPD_SQL_LIBS="$ol_link_sql"
21901
21902         elif test $ol_enable_sql != auto ; then
21903                 { echo "configure: error: could not locate suitable ODBC library" 1>&2; exit 1; }
21904         fi
21905 fi
21906
21907 WITH_SASL=no
21908 ol_link_sasl=no
21909 ol_link_spasswd=no
21910 if test $ol_with_cyrus_sasl != no ; then
21911         for ac_hdr in sasl/sasl.h sasl.h
21912 do
21913 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
21914 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
21915 echo "configure:21916: checking for $ac_hdr" >&5
21916 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
21917   echo $ac_n "(cached) $ac_c" 1>&6
21918 else
21919   cat > conftest.$ac_ext <<EOF
21920 #line 21921 "configure"
21921 #include "confdefs.h"
21922 #include <$ac_hdr>
21923 EOF
21924 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
21925 { (eval echo configure:21926: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
21926 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
21927 if test -z "$ac_err"; then
21928   rm -rf conftest*
21929   eval "ac_cv_header_$ac_safe=yes"
21930 else
21931   echo "$ac_err" >&5
21932   echo "configure: failed program was:" >&5
21933   cat conftest.$ac_ext >&5
21934   rm -rf conftest*
21935   eval "ac_cv_header_$ac_safe=no"
21936 fi
21937 rm -f conftest*
21938 fi
21939 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
21940   echo "$ac_t""yes" 1>&6
21941     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
21942   cat >> confdefs.h <<EOF
21943 #define $ac_tr_hdr 1
21944 EOF
21945  
21946 else
21947   echo "$ac_t""no" 1>&6
21948 fi
21949 done
21950
21951
21952         if test $ac_cv_header_sasl_sasl_h = yes -o $ac_cv_header_sasl_h = yes; then
21953                 echo $ac_n "checking for sasl_client_init in -lsasl2""... $ac_c" 1>&6
21954 echo "configure:21955: checking for sasl_client_init in -lsasl2" >&5
21955 ac_lib_var=`echo sasl2'_'sasl_client_init | sed 'y%./+-:%__p__%'`
21956 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
21957   echo $ac_n "(cached) $ac_c" 1>&6
21958 else
21959   ac_save_LIBS="$LIBS"
21960 LIBS="-lsasl2  $LIBS"
21961 cat > conftest.$ac_ext <<EOF
21962 #line 21963 "configure"
21963 #include "confdefs.h"
21964 /* Override any gcc2 internal prototype to avoid an error.  */
21965 /* We use char because int might match the return type of a gcc2
21966     builtin and then its argument prototype would still apply.  */
21967 char sasl_client_init();
21968
21969 int main() {
21970 sasl_client_init()
21971 ; return 0; }
21972 EOF
21973 if { (eval echo configure:21974: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21974   rm -rf conftest*
21975   eval "ac_cv_lib_$ac_lib_var=yes"
21976 else
21977   echo "configure: failed program was:" >&5
21978   cat conftest.$ac_ext >&5
21979   rm -rf conftest*
21980   eval "ac_cv_lib_$ac_lib_var=no"
21981 fi
21982 rm -f conftest*
21983 LIBS="$ac_save_LIBS"
21984
21985 fi
21986 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
21987   echo "$ac_t""yes" 1>&6
21988   ol_link_sasl="-lsasl2"
21989 else
21990   echo "$ac_t""no" 1>&6
21991 echo $ac_n "checking for sasl_client_init in -lsasl""... $ac_c" 1>&6
21992 echo "configure:21993: checking for sasl_client_init in -lsasl" >&5
21993 ac_lib_var=`echo sasl'_'sasl_client_init | sed 'y%./+-:%__p__%'`
21994 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
21995   echo $ac_n "(cached) $ac_c" 1>&6
21996 else
21997   ac_save_LIBS="$LIBS"
21998 LIBS="-lsasl  $LIBS"
21999 cat > conftest.$ac_ext <<EOF
22000 #line 22001 "configure"
22001 #include "confdefs.h"
22002 /* Override any gcc2 internal prototype to avoid an error.  */
22003 /* We use char because int might match the return type of a gcc2
22004     builtin and then its argument prototype would still apply.  */
22005 char sasl_client_init();
22006
22007 int main() {
22008 sasl_client_init()
22009 ; return 0; }
22010 EOF
22011 if { (eval echo configure:22012: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22012   rm -rf conftest*
22013   eval "ac_cv_lib_$ac_lib_var=yes"
22014 else
22015   echo "configure: failed program was:" >&5
22016   cat conftest.$ac_ext >&5
22017   rm -rf conftest*
22018   eval "ac_cv_lib_$ac_lib_var=no"
22019 fi
22020 rm -f conftest*
22021 LIBS="$ac_save_LIBS"
22022
22023 fi
22024 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
22025   echo "$ac_t""yes" 1>&6
22026   ol_link_sasl="-lsasl"
22027 else
22028   echo "$ac_t""no" 1>&6
22029 fi
22030
22031 fi
22032
22033         fi
22034
22035         if test $ol_link_sasl = no ; then
22036                 if test $ol_with_cyrus_sasl != auto ; then
22037                         { echo "configure: error: Could not locate Cyrus SASL" 1>&2; exit 1; }
22038                 else
22039                         echo "configure: warning: Could not locate Cyrus SASL" 1>&2
22040                         echo "configure: warning: SASL authentication not supported!" 1>&2
22041                         if test $ol_link_tls = no ; then
22042                                 echo "configure: warning: Strong authentication not supported!" 1>&2
22043                         fi
22044                 fi
22045         else
22046                 echo $ac_n "checking Cyrus SASL library version""... $ac_c" 1>&6
22047 echo "configure:22048: checking Cyrus SASL library version" >&5
22048 if eval "test \"\${ol_cv_sasl_compat+set}\" = set"; then
22049   echo $ac_n "(cached) $ac_c" 1>&6
22050 else
22051   
22052         cat > conftest.$ac_ext <<EOF
22053 #line 22054 "configure"
22054 #include "confdefs.h"
22055
22056 #ifdef HAVE_SASL_SASL_H
22057 #include <sasl/sasl.h>
22058 #else
22059 #include <sasl.h>
22060 #endif
22061
22062 /* Require 2.1.15+ */
22063 #if SASL_VERSION_MAJOR == 2  && SASL_VERSION_MINOR > 1
22064         char *__sasl_compat = "2.2+ or better okay (we guess)";
22065 #elif SASL_VERSION_MAJOR == 2  && SASL_VERSION_MINOR == 1 \
22066         && SASL_VERSION_STEP >=15
22067         char *__sasl_compat = "2.1.15+ or better okay";
22068 #endif
22069         
22070 EOF
22071 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
22072   egrep "__sasl_compat" >/dev/null 2>&1; then
22073   rm -rf conftest*
22074   ol_cv_sasl_compat=yes
22075 else
22076   rm -rf conftest*
22077   ol_cv_sasl_compat=no
22078 fi
22079 rm -f conftest*
22080
22081 fi
22082
22083 echo "$ac_t""$ol_cv_sasl_compat" 1>&6
22084
22085                 if test $ol_cv_sasl_compat = no ; then
22086                         ol_link_sasl=no
22087                         { echo "configure: error: Cyrus SASL library located but is incompatible" 1>&2; exit 1; }
22088                 fi
22089
22090                 cat >> confdefs.h <<\EOF
22091 #define HAVE_CYRUS_SASL 1
22092 EOF
22093
22094                 SASL_LIBS="$ol_link_sasl"
22095                 if test $ol_enable_spasswd != no ; then
22096                         ol_link_spasswd=yes
22097                 fi
22098
22099                 ac_save_LIBS="$LIBS"
22100                 LIBS="$LIBS $ol_link_sasl"
22101                 echo $ac_n "checking for sasl_version""... $ac_c" 1>&6
22102 echo "configure:22103: checking for sasl_version" >&5
22103 if eval "test \"\${ac_cv_func_sasl_version+set}\" = set"; then
22104   echo $ac_n "(cached) $ac_c" 1>&6
22105 else
22106   cat > conftest.$ac_ext <<EOF
22107 #line 22108 "configure"
22108 #include "confdefs.h"
22109 /* System header to define __stub macros and hopefully few prototypes,
22110     which can conflict with char sasl_version(); below.  */
22111 #include <assert.h>
22112 /* Override any gcc2 internal prototype to avoid an error.  */
22113 /* We use char because int might match the return type of a gcc2
22114     builtin and then its argument prototype would still apply.  */
22115 char sasl_version();
22116 char (*f)();
22117
22118 int main() {
22119
22120 /* The GNU C library defines this for functions which it implements
22121     to always fail with ENOSYS.  Some functions are actually named
22122     something starting with __ and the normal name is an alias.  */
22123 #if defined (__stub_sasl_version) || defined (__stub___sasl_version)
22124 choke me
22125 #else
22126 f = sasl_version;
22127 #endif
22128
22129 ; return 0; }
22130 EOF
22131 if { (eval echo configure:22132: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22132   rm -rf conftest*
22133   eval "ac_cv_func_sasl_version=yes"
22134 else
22135   echo "configure: failed program was:" >&5
22136   cat conftest.$ac_ext >&5
22137   rm -rf conftest*
22138   eval "ac_cv_func_sasl_version=no"
22139 fi
22140 rm -f conftest*
22141 fi
22142
22143 if eval "test \"`echo '$ac_cv_func_'sasl_version`\" = yes"; then
22144   echo "$ac_t""yes" 1>&6
22145   cat >> confdefs.h <<\EOF
22146 #define HAVE_SASL_VERSION 1
22147 EOF
22148
22149 else
22150   echo "$ac_t""no" 1>&6
22151 fi
22152
22153                 LIBS="$ac_save_LIBS"
22154
22155                 WITH_SASL=yes
22156         fi
22157
22158 else
22159         echo "configure: warning: SASL authentication not supported!" 1>&2
22160         if test $ol_link_tls = no ; then
22161                 echo "configure: warning: Strong authentication not supported!" 1>&2
22162         fi
22163 fi
22164
22165 if test $cross_compiling != yes -a "$ac_cv_mingw32" != yes ; then
22166         dev=no
22167         if test -r /dev/urandom ; then
22168                 dev="/dev/urandom";
22169         elif test -r /idev/urandom ; then
22170                 dev="/idev/urandom";
22171         elif test -r /dev/srandom ; then
22172                 dev="/dev/srandom";
22173         elif test -r /dev/random ; then
22174                 dev="/dev/random";
22175         elif test -r /idev/random ; then
22176                 dev="/idev/random";
22177         fi
22178
22179         if test $dev != no ; then
22180                 cat >> confdefs.h <<EOF
22181 #define URANDOM_DEVICE "$dev"
22182 EOF
22183
22184         fi
22185 fi
22186
22187 ol_link_fetch=no
22188 if test $ol_with_fetch != no ; then
22189         ol_LIBS=$LIBS
22190 LIBS="-lfetch -lcom_err $LIBS"
22191 echo $ac_n "checking fetch(3) library""... $ac_c" 1>&6
22192 echo "configure:22193: checking fetch(3) library" >&5
22193 if eval "test \"\${ol_cv_lib_fetch+set}\" = set"; then
22194   echo $ac_n "(cached) $ac_c" 1>&6
22195 else
22196   
22197         cat > conftest.$ac_ext <<EOF
22198 #line 22199 "configure"
22199 #include "confdefs.h"
22200
22201 #include <sys/param.h>
22202 #include <stdio.h>
22203 #include <fetch.h>
22204 int main() {
22205 struct url *u = fetchParseURL("file:///"); 
22206 ; return 0; }
22207 EOF
22208 if { (eval echo configure:22209: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22209   rm -rf conftest*
22210   ol_cv_lib_fetch=yes
22211 else
22212   echo "configure: failed program was:" >&5
22213   cat conftest.$ac_ext >&5
22214   rm -rf conftest*
22215   ol_cv_lib_fetch=no
22216 fi
22217 rm -f conftest*
22218 fi
22219
22220 echo "$ac_t""$ol_cv_lib_fetch" 1>&6
22221 LIBS=$ol_LIBS
22222 if test $ol_cv_lib_fetch != no ; then
22223         ol_link_fetch="-lfetch -lcom_err"
22224         cat >> confdefs.h <<\EOF
22225 #define HAVE_FETCH 1
22226 EOF
22227
22228 fi
22229
22230
22231         if test $ol_cv_lib_fetch != no ; then
22232                 LUTIL_LIBS="$LUTIL_LIBS $ol_link_fetch"
22233                 ol_link_fetch=freebsd
22234
22235         elif test $ol_with_fetch != auto ; then
22236                 { echo "configure: error: no suitable API for --with-fetch=$ol_with_fetch" 1>&2; exit 1; }
22237         fi 
22238 fi
22239
22240 if test $ol_enable_crypt != no ; then
22241         save_LIBS="$LIBS"
22242         LIBS="$TLS_LIBS $LIBS"
22243
22244         echo $ac_n "checking for crypt""... $ac_c" 1>&6
22245 echo "configure:22246: checking for crypt" >&5
22246 if eval "test \"\${ac_cv_func_crypt+set}\" = set"; then
22247   echo $ac_n "(cached) $ac_c" 1>&6
22248 else
22249   cat > conftest.$ac_ext <<EOF
22250 #line 22251 "configure"
22251 #include "confdefs.h"
22252 /* System header to define __stub macros and hopefully few prototypes,
22253     which can conflict with char crypt(); below.  */
22254 #include <assert.h>
22255 /* Override any gcc2 internal prototype to avoid an error.  */
22256 /* We use char because int might match the return type of a gcc2
22257     builtin and then its argument prototype would still apply.  */
22258 char crypt();
22259 char (*f)();
22260
22261 int main() {
22262
22263 /* The GNU C library defines this for functions which it implements
22264     to always fail with ENOSYS.  Some functions are actually named
22265     something starting with __ and the normal name is an alias.  */
22266 #if defined (__stub_crypt) || defined (__stub___crypt)
22267 choke me
22268 #else
22269 f = crypt;
22270 #endif
22271
22272 ; return 0; }
22273 EOF
22274 if { (eval echo configure:22275: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22275   rm -rf conftest*
22276   eval "ac_cv_func_crypt=yes"
22277 else
22278   echo "configure: failed program was:" >&5
22279   cat conftest.$ac_ext >&5
22280   rm -rf conftest*
22281   eval "ac_cv_func_crypt=no"
22282 fi
22283 rm -f conftest*
22284 fi
22285
22286 if eval "test \"`echo '$ac_cv_func_'crypt`\" = yes"; then
22287   echo "$ac_t""yes" 1>&6
22288   have_crypt=yes
22289 else
22290   echo "$ac_t""no" 1>&6
22291
22292                 LIBS="$save_LIBS"
22293                 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
22294 echo "configure:22295: checking for crypt in -lcrypt" >&5
22295 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-:%__p__%'`
22296 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
22297   echo $ac_n "(cached) $ac_c" 1>&6
22298 else
22299   ac_save_LIBS="$LIBS"
22300 LIBS="-lcrypt  $LIBS"
22301 cat > conftest.$ac_ext <<EOF
22302 #line 22303 "configure"
22303 #include "confdefs.h"
22304 /* Override any gcc2 internal prototype to avoid an error.  */
22305 /* We use char because int might match the return type of a gcc2
22306     builtin and then its argument prototype would still apply.  */
22307 char crypt();
22308
22309 int main() {
22310 crypt()
22311 ; return 0; }
22312 EOF
22313 if { (eval echo configure:22314: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22314   rm -rf conftest*
22315   eval "ac_cv_lib_$ac_lib_var=yes"
22316 else
22317   echo "configure: failed program was:" >&5
22318   cat conftest.$ac_ext >&5
22319   rm -rf conftest*
22320   eval "ac_cv_lib_$ac_lib_var=no"
22321 fi
22322 rm -f conftest*
22323 LIBS="$ac_save_LIBS"
22324
22325 fi
22326 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
22327   echo "$ac_t""yes" 1>&6
22328   LUTIL_LIBS="$LUTIL_LIBS -lcrypt"
22329                         have_crypt=yes
22330 else
22331   echo "$ac_t""no" 1>&6
22332 have_crypt=no
22333 fi
22334
22335 fi
22336
22337
22338         LIBS="$save_LIBS"
22339
22340         if test $have_crypt = yes ; then
22341                 cat >> confdefs.h <<\EOF
22342 #define HAVE_CRYPT 1
22343 EOF
22344
22345         else
22346                 echo "configure: warning: could not find crypt" 1>&2
22347                 if test $ol_enable_crypt = yes ; then
22348                         { echo "configure: error: could not find crypt, select appropriate options or disable" 1>&2; exit 1; }
22349                 fi
22350
22351                 echo "configure: warning: disabling crypt support" 1>&2
22352                 ol_enable_crypt=no
22353         fi
22354 fi
22355
22356 if test $ol_enable_proctitle != no ; then
22357         echo $ac_n "checking for setproctitle""... $ac_c" 1>&6
22358 echo "configure:22359: checking for setproctitle" >&5
22359 if eval "test \"\${ac_cv_func_setproctitle+set}\" = set"; then
22360   echo $ac_n "(cached) $ac_c" 1>&6
22361 else
22362   cat > conftest.$ac_ext <<EOF
22363 #line 22364 "configure"
22364 #include "confdefs.h"
22365 /* System header to define __stub macros and hopefully few prototypes,
22366     which can conflict with char setproctitle(); below.  */
22367 #include <assert.h>
22368 /* Override any gcc2 internal prototype to avoid an error.  */
22369 /* We use char because int might match the return type of a gcc2
22370     builtin and then its argument prototype would still apply.  */
22371 char setproctitle();
22372 char (*f)();
22373
22374 int main() {
22375
22376 /* The GNU C library defines this for functions which it implements
22377     to always fail with ENOSYS.  Some functions are actually named
22378     something starting with __ and the normal name is an alias.  */
22379 #if defined (__stub_setproctitle) || defined (__stub___setproctitle)
22380 choke me
22381 #else
22382 f = setproctitle;
22383 #endif
22384
22385 ; return 0; }
22386 EOF
22387 if { (eval echo configure:22388: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22388   rm -rf conftest*
22389   eval "ac_cv_func_setproctitle=yes"
22390 else
22391   echo "configure: failed program was:" >&5
22392   cat conftest.$ac_ext >&5
22393   rm -rf conftest*
22394   eval "ac_cv_func_setproctitle=no"
22395 fi
22396 rm -f conftest*
22397 fi
22398
22399 if eval "test \"`echo '$ac_cv_func_'setproctitle`\" = yes"; then
22400   echo "$ac_t""yes" 1>&6
22401   have_setproctitle=yes
22402 else
22403   echo "$ac_t""no" 1>&6
22404
22405                 echo $ac_n "checking for setproctitle in -lutil""... $ac_c" 1>&6
22406 echo "configure:22407: checking for setproctitle in -lutil" >&5
22407 ac_lib_var=`echo util'_'setproctitle | sed 'y%./+-:%__p__%'`
22408 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
22409   echo $ac_n "(cached) $ac_c" 1>&6
22410 else
22411   ac_save_LIBS="$LIBS"
22412 LIBS="-lutil  $LIBS"
22413 cat > conftest.$ac_ext <<EOF
22414 #line 22415 "configure"
22415 #include "confdefs.h"
22416 /* Override any gcc2 internal prototype to avoid an error.  */
22417 /* We use char because int might match the return type of a gcc2
22418     builtin and then its argument prototype would still apply.  */
22419 char setproctitle();
22420
22421 int main() {
22422 setproctitle()
22423 ; return 0; }
22424 EOF
22425 if { (eval echo configure:22426: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22426   rm -rf conftest*
22427   eval "ac_cv_lib_$ac_lib_var=yes"
22428 else
22429   echo "configure: failed program was:" >&5
22430   cat conftest.$ac_ext >&5
22431   rm -rf conftest*
22432   eval "ac_cv_lib_$ac_lib_var=no"
22433 fi
22434 rm -f conftest*
22435 LIBS="$ac_save_LIBS"
22436
22437 fi
22438 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
22439   echo "$ac_t""yes" 1>&6
22440   have_setproctitle=yes
22441                         LUTIL_LIBS="$LUTIL_LIBS -lutil"
22442 else
22443   echo "$ac_t""no" 1>&6
22444 have_setproctitle=no
22445                         LIBOBJS="$LIBOBJS setproctitle.o"
22446                         LIBSRCS="$LIBSRCS setproctitle.c"
22447 fi
22448
22449 fi
22450
22451
22452         if test $have_setproctitle = yes ; then
22453                 cat >> confdefs.h <<\EOF
22454 #define HAVE_SETPROCTITLE 1
22455 EOF
22456
22457         fi
22458 fi
22459
22460 if test $ol_enable_slp != no ; then
22461         for ac_hdr in slp.h 
22462 do
22463 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
22464 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
22465 echo "configure:22466: checking for $ac_hdr" >&5
22466 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
22467   echo $ac_n "(cached) $ac_c" 1>&6
22468 else
22469   cat > conftest.$ac_ext <<EOF
22470 #line 22471 "configure"
22471 #include "confdefs.h"
22472 #include <$ac_hdr>
22473 EOF
22474 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
22475 { (eval echo configure:22476: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
22476 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
22477 if test -z "$ac_err"; then
22478   rm -rf conftest*
22479   eval "ac_cv_header_$ac_safe=yes"
22480 else
22481   echo "$ac_err" >&5
22482   echo "configure: failed program was:" >&5
22483   cat conftest.$ac_ext >&5
22484   rm -rf conftest*
22485   eval "ac_cv_header_$ac_safe=no"
22486 fi
22487 rm -f conftest*
22488 fi
22489 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
22490   echo "$ac_t""yes" 1>&6
22491     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
22492   cat >> confdefs.h <<EOF
22493 #define $ac_tr_hdr 1
22494 EOF
22495  
22496 else
22497   echo "$ac_t""no" 1>&6
22498 fi
22499 done
22500
22501
22502         if test $ac_cv_header_slp_h = yes ; then
22503                 echo $ac_n "checking for SLPOpen in -lslp""... $ac_c" 1>&6
22504 echo "configure:22505: checking for SLPOpen in -lslp" >&5
22505 ac_lib_var=`echo slp'_'SLPOpen | sed 'y%./+-:%__p__%'`
22506 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
22507   echo $ac_n "(cached) $ac_c" 1>&6
22508 else
22509   ac_save_LIBS="$LIBS"
22510 LIBS="-lslp  $LIBS"
22511 cat > conftest.$ac_ext <<EOF
22512 #line 22513 "configure"
22513 #include "confdefs.h"
22514 /* Override any gcc2 internal prototype to avoid an error.  */
22515 /* We use char because int might match the return type of a gcc2
22516     builtin and then its argument prototype would still apply.  */
22517 char SLPOpen();
22518
22519 int main() {
22520 SLPOpen()
22521 ; return 0; }
22522 EOF
22523 if { (eval echo configure:22524: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22524   rm -rf conftest*
22525   eval "ac_cv_lib_$ac_lib_var=yes"
22526 else
22527   echo "configure: failed program was:" >&5
22528   cat conftest.$ac_ext >&5
22529   rm -rf conftest*
22530   eval "ac_cv_lib_$ac_lib_var=no"
22531 fi
22532 rm -f conftest*
22533 LIBS="$ac_save_LIBS"
22534
22535 fi
22536 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
22537   echo "$ac_t""yes" 1>&6
22538   have_slp=yes
22539 else
22540   echo "$ac_t""no" 1>&6
22541 have_slp=no
22542 fi
22543
22544                 if test $have_slp = yes ; then
22545                         cat >> confdefs.h <<\EOF
22546 #define HAVE_SLP 1
22547 EOF
22548
22549                         SLAPD_SLP_LIBS=-lslp
22550                 fi
22551
22552         elif test $ol_enable_slp = yes ; then
22553                 { echo "configure: error: SLP not found" 1>&2; exit 1; }
22554         fi
22555 fi
22556
22557 if test "$ol_with_multiple_precision" != "no" ; then
22558         ol_have_bignum=no
22559         ol_have_gmp=no
22560
22561         for ac_hdr in openssl/bn.h bn.h
22562 do
22563 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
22564 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
22565 echo "configure:22566: checking for $ac_hdr" >&5
22566 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
22567   echo $ac_n "(cached) $ac_c" 1>&6
22568 else
22569   cat > conftest.$ac_ext <<EOF
22570 #line 22571 "configure"
22571 #include "confdefs.h"
22572 #include <$ac_hdr>
22573 EOF
22574 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
22575 { (eval echo configure:22576: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
22576 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
22577 if test -z "$ac_err"; then
22578   rm -rf conftest*
22579   eval "ac_cv_header_$ac_safe=yes"
22580 else
22581   echo "$ac_err" >&5
22582   echo "configure: failed program was:" >&5
22583   cat conftest.$ac_ext >&5
22584   rm -rf conftest*
22585   eval "ac_cv_header_$ac_safe=no"
22586 fi
22587 rm -f conftest*
22588 fi
22589 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
22590   echo "$ac_t""yes" 1>&6
22591     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
22592   cat >> confdefs.h <<EOF
22593 #define $ac_tr_hdr 1
22594 EOF
22595  
22596 else
22597   echo "$ac_t""no" 1>&6
22598 fi
22599 done
22600
22601         for ac_hdr in openssl/crypto.h crypto.h
22602 do
22603 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
22604 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
22605 echo "configure:22606: checking for $ac_hdr" >&5
22606 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
22607   echo $ac_n "(cached) $ac_c" 1>&6
22608 else
22609   cat > conftest.$ac_ext <<EOF
22610 #line 22611 "configure"
22611 #include "confdefs.h"
22612 #include <$ac_hdr>
22613 EOF
22614 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
22615 { (eval echo configure:22616: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
22616 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
22617 if test -z "$ac_err"; then
22618   rm -rf conftest*
22619   eval "ac_cv_header_$ac_safe=yes"
22620 else
22621   echo "$ac_err" >&5
22622   echo "configure: failed program was:" >&5
22623   cat conftest.$ac_ext >&5
22624   rm -rf conftest*
22625   eval "ac_cv_header_$ac_safe=no"
22626 fi
22627 rm -f conftest*
22628 fi
22629 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
22630   echo "$ac_t""yes" 1>&6
22631     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
22632   cat >> confdefs.h <<EOF
22633 #define $ac_tr_hdr 1
22634 EOF
22635  
22636 else
22637   echo "$ac_t""no" 1>&6
22638 fi
22639 done
22640
22641         for ac_hdr in gmp.h 
22642 do
22643 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
22644 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
22645 echo "configure:22646: checking for $ac_hdr" >&5
22646 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
22647   echo $ac_n "(cached) $ac_c" 1>&6
22648 else
22649   cat > conftest.$ac_ext <<EOF
22650 #line 22651 "configure"
22651 #include "confdefs.h"
22652 #include <$ac_hdr>
22653 EOF
22654 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
22655 { (eval echo configure:22656: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
22656 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
22657 if test -z "$ac_err"; then
22658   rm -rf conftest*
22659   eval "ac_cv_header_$ac_safe=yes"
22660 else
22661   echo "$ac_err" >&5
22662   echo "configure: failed program was:" >&5
22663   cat conftest.$ac_ext >&5
22664   rm -rf conftest*
22665   eval "ac_cv_header_$ac_safe=no"
22666 fi
22667 rm -f conftest*
22668 fi
22669 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
22670   echo "$ac_t""yes" 1>&6
22671     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
22672   cat >> confdefs.h <<EOF
22673 #define $ac_tr_hdr 1
22674 EOF
22675  
22676 else
22677   echo "$ac_t""no" 1>&6
22678 fi
22679 done
22680
22681
22682         if test "$ol_with_tls" = "found" ; then
22683                 ol_have_bn_h=no
22684                 ol_have_crypto_h=no
22685
22686                 if test "$ac_cv_header_openssl_bn_h" = "yes" \
22687                                 -o "$ac_cv_header_bn_h" = "yes" ; then
22688                         ol_have_bn_h=yes
22689                 fi
22690
22691                 if test "$ac_cv_header_openssl_crypto_h" = "yes" \
22692                                 -o "$ac_cv_header_crypto_h" = "yes" ; then
22693                         ol_have_crypto_h=yes
22694                 fi
22695
22696                 if test "$ol_have_bn_h" = "yes" \
22697                                 -a "$ol_have_crypto_h" = "yes" ; then
22698                         ol_have_bignum=yes
22699                 fi
22700         fi
22701
22702         if test $ac_cv_header_gmp_h = yes ; then
22703                 echo $ac_n "checking for __gmpz_add_ui in -lgmp""... $ac_c" 1>&6
22704 echo "configure:22705: checking for __gmpz_add_ui in -lgmp" >&5
22705 ac_lib_var=`echo gmp'_'__gmpz_add_ui | sed 'y%./+-:%__p__%'`
22706 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
22707   echo $ac_n "(cached) $ac_c" 1>&6
22708 else
22709   ac_save_LIBS="$LIBS"
22710 LIBS="-lgmp  $LIBS"
22711 cat > conftest.$ac_ext <<EOF
22712 #line 22713 "configure"
22713 #include "confdefs.h"
22714 /* Override any gcc2 internal prototype to avoid an error.  */
22715 /* We use char because int might match the return type of a gcc2
22716     builtin and then its argument prototype would still apply.  */
22717 char __gmpz_add_ui();
22718
22719 int main() {
22720 __gmpz_add_ui()
22721 ; return 0; }
22722 EOF
22723 if { (eval echo configure:22724: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22724   rm -rf conftest*
22725   eval "ac_cv_lib_$ac_lib_var=yes"
22726 else
22727   echo "configure: failed program was:" >&5
22728   cat conftest.$ac_ext >&5
22729   rm -rf conftest*
22730   eval "ac_cv_lib_$ac_lib_var=no"
22731 fi
22732 rm -f conftest*
22733 LIBS="$ac_save_LIBS"
22734
22735 fi
22736 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
22737   echo "$ac_t""yes" 1>&6
22738   have_gmp=yes
22739 else
22740   echo "$ac_t""no" 1>&6
22741 have_gmp=no
22742 fi
22743
22744                 if test $have_gmp = yes ; then
22745                         ol_have_gmp=yes
22746                 fi
22747         fi
22748
22749         echo $ac_n "checking for multiple precision support""... $ac_c" 1>&6
22750 echo "configure:22751: checking for multiple precision support" >&5
22751
22752         ol_mp_support="none"
22753         case "$ol_with_multiple_precision" in
22754         auto)
22755                                                                                 if test "$ol_have_bignum" = "yes" ; then
22756                         ol_mp_support="bignum"
22757                 else
22758                         if test "$ol_have_gmp" = "yes" ; then
22759                                 ol_mp_support="gmp"
22760                         fi
22761                 fi
22762                 ;;
22763         bignum)
22764                 if test "$ol_have_bignum" != "yes" ; then
22765                         { echo "configure: error: OpenSSL's BIGNUM not available" 1>&2; exit 1; }
22766                 fi
22767                 ol_mp_support="bignum"
22768                 ;;
22769         gmp)
22770                 if test "$ol_have_gmp" != "yes" ; then
22771                         { echo "configure: error: GMP not available" 1>&2; exit 1; }
22772                 fi
22773                 ol_mp_support="gmp"
22774                 ;;
22775         yes)
22776                 if test "$ol_have_bignum" = "yes" ; then
22777                         ol_mp_support="bignum"
22778                 elif test "$ol_have_gmp" = "yes" ; then
22779                         ol_mp_support="gmp"
22780                 else
22781                         { echo "configure: error: not available" 1>&2; exit 1; }
22782                 fi
22783                 ;;
22784         esac
22785
22786         case "$ol_mp_support" in
22787         bignum)
22788                 cat >> confdefs.h <<\EOF
22789 #define HAVE_BIGNUM 1
22790 EOF
22791
22792                 ;;
22793         gmp)
22794                 cat >> confdefs.h <<\EOF
22795 #define HAVE_GMP 1
22796 EOF
22797
22798                 SLAPD_GMP_LIBS=-lgmp
22799                 ;;
22800         none)
22801                 ;;
22802         esac
22803
22804         echo "$ac_t""$ol_mp_support" 1>&6
22805 fi
22806
22807
22808 echo $ac_n "checking long long""... $ac_c" 1>&6
22809 echo "configure:22810: checking long long" >&5
22810 if eval "test \"\${ol_cv_type_long_long+set}\" = set"; then
22811   echo $ac_n "(cached) $ac_c" 1>&6
22812 else
22813   
22814         cat > conftest.$ac_ext <<EOF
22815 #line 22816 "configure"
22816 #include "confdefs.h"
22817
22818 int main() {
22819 long long x;
22820 ; return 0; }
22821 EOF
22822 if { (eval echo configure:22823: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22823   rm -rf conftest*
22824   ol_cv_type_long_long=yes
22825 else
22826   echo "configure: failed program was:" >&5
22827   cat conftest.$ac_ext >&5
22828   rm -rf conftest*
22829   ol_cv_type_long_long=no
22830 fi
22831 rm -f conftest*
22832 fi
22833
22834 echo "$ac_t""$ol_cv_type_long_long" 1>&6
22835 if test $ol_cv_type_long_long = yes; then
22836         cat >> confdefs.h <<\EOF
22837 #define HAVE_LONG_LONG 1
22838 EOF
22839
22840 fi
22841
22842 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
22843 echo "configure:22844: checking for ANSI C header files" >&5
22844 if eval "test \"\${ac_cv_header_stdc+set}\" = set"; then
22845   echo $ac_n "(cached) $ac_c" 1>&6
22846 else
22847   cat > conftest.$ac_ext <<EOF
22848 #line 22849 "configure"
22849 #include "confdefs.h"
22850 #include <stdlib.h>
22851 #include <stdarg.h>
22852 #include <string.h>
22853 #include <float.h>
22854 EOF
22855 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
22856 { (eval echo configure:22857: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
22857 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
22858 if test -z "$ac_err"; then
22859   rm -rf conftest*
22860   ac_cv_header_stdc=yes
22861 else
22862   echo "$ac_err" >&5
22863   echo "configure: failed program was:" >&5
22864   cat conftest.$ac_ext >&5
22865   rm -rf conftest*
22866   ac_cv_header_stdc=no
22867 fi
22868 rm -f conftest*
22869
22870 if test $ac_cv_header_stdc = yes; then
22871   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
22872 cat > conftest.$ac_ext <<EOF
22873 #line 22874 "configure"
22874 #include "confdefs.h"
22875 #include <string.h>
22876 EOF
22877 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
22878   egrep "memchr" >/dev/null 2>&1; then
22879   :
22880 else
22881   rm -rf conftest*
22882   ac_cv_header_stdc=no
22883 fi
22884 rm -f conftest*
22885
22886 fi
22887
22888 if test $ac_cv_header_stdc = yes; then
22889   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
22890 cat > conftest.$ac_ext <<EOF
22891 #line 22892 "configure"
22892 #include "confdefs.h"
22893 #include <stdlib.h>
22894 EOF
22895 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
22896   egrep "free" >/dev/null 2>&1; then
22897   :
22898 else
22899   rm -rf conftest*
22900   ac_cv_header_stdc=no
22901 fi
22902 rm -f conftest*
22903
22904 fi
22905
22906 if test $ac_cv_header_stdc = yes; then
22907   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
22908 if test "$cross_compiling" = yes; then
22909   :
22910 else
22911   cat > conftest.$ac_ext <<EOF
22912 #line 22913 "configure"
22913 #include "confdefs.h"
22914 #include <ctype.h>
22915 #if ((' ' & 0x0FF) == 0x020)
22916 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
22917 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
22918 #else
22919 #define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
22920  || ('j' <= (c) && (c) <= 'r') \
22921  || ('s' <= (c) && (c) <= 'z'))
22922 #define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
22923 #endif
22924 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
22925 int main () { int i; for (i = 0; i < 256; i++)
22926 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
22927 exit (0); }
22928
22929 EOF
22930 if { (eval echo configure:22931: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
22931 then
22932   :
22933 else
22934   echo "configure: failed program was:" >&5
22935   cat conftest.$ac_ext >&5
22936   rm -fr conftest*
22937   ac_cv_header_stdc=no
22938 fi
22939 rm -fr conftest*
22940 fi
22941
22942 fi
22943 fi
22944
22945 echo "$ac_t""$ac_cv_header_stdc" 1>&6
22946 if test $ac_cv_header_stdc = yes; then
22947   cat >> confdefs.h <<\EOF
22948 #define STDC_HEADERS 1
22949 EOF
22950
22951 fi
22952
22953 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
22954 echo "configure:22955: checking for mode_t" >&5
22955 if eval "test \"\${ac_cv_type_mode_t+set}\" = set"; then
22956   echo $ac_n "(cached) $ac_c" 1>&6
22957 else
22958   cat > conftest.$ac_ext <<EOF
22959 #line 22960 "configure"
22960 #include "confdefs.h"
22961 #include <sys/types.h>
22962 #if STDC_HEADERS
22963 #include <stdlib.h>
22964 #include <stddef.h>
22965 #endif
22966
22967 EOF
22968 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
22969   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
22970   rm -rf conftest*
22971   eval "ac_cv_type_mode_t=yes"
22972 else
22973   rm -rf conftest*
22974   eval "ac_cv_type_mode_t=no"
22975 fi
22976 rm -f conftest*
22977
22978 fi
22979 if eval "test \"`echo '$ac_cv_type_'mode_t`\" = yes"; then
22980   echo "$ac_t""yes" 1>&6
22981 else
22982   echo "$ac_t""no" 1>&6
22983   cat >> confdefs.h <<EOF
22984 #define mode_t int
22985 EOF
22986
22987 fi
22988
22989 echo $ac_n "checking for off_t""... $ac_c" 1>&6
22990 echo "configure:22991: checking for off_t" >&5
22991 if eval "test \"\${ac_cv_type_off_t+set}\" = set"; then
22992   echo $ac_n "(cached) $ac_c" 1>&6
22993 else
22994   cat > conftest.$ac_ext <<EOF
22995 #line 22996 "configure"
22996 #include "confdefs.h"
22997 #include <sys/types.h>
22998 #if STDC_HEADERS
22999 #include <stdlib.h>
23000 #include <stddef.h>
23001 #endif
23002
23003 EOF
23004 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
23005   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
23006   rm -rf conftest*
23007   eval "ac_cv_type_off_t=yes"
23008 else
23009   rm -rf conftest*
23010   eval "ac_cv_type_off_t=no"
23011 fi
23012 rm -f conftest*
23013
23014 fi
23015 if eval "test \"`echo '$ac_cv_type_'off_t`\" = yes"; then
23016   echo "$ac_t""yes" 1>&6
23017 else
23018   echo "$ac_t""no" 1>&6
23019   cat >> confdefs.h <<EOF
23020 #define off_t long
23021 EOF
23022
23023 fi
23024
23025 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
23026 echo "configure:23027: checking for pid_t" >&5
23027 if eval "test \"\${ac_cv_type_pid_t+set}\" = set"; then
23028   echo $ac_n "(cached) $ac_c" 1>&6
23029 else
23030   cat > conftest.$ac_ext <<EOF
23031 #line 23032 "configure"
23032 #include "confdefs.h"
23033 #include <sys/types.h>
23034 #if STDC_HEADERS
23035 #include <stdlib.h>
23036 #include <stddef.h>
23037 #endif
23038
23039 EOF
23040 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
23041   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
23042   rm -rf conftest*
23043   eval "ac_cv_type_pid_t=yes"
23044 else
23045   rm -rf conftest*
23046   eval "ac_cv_type_pid_t=no"
23047 fi
23048 rm -f conftest*
23049
23050 fi
23051 if eval "test \"`echo '$ac_cv_type_'pid_t`\" = yes"; then
23052   echo "$ac_t""yes" 1>&6
23053 else
23054   echo "$ac_t""no" 1>&6
23055   cat >> confdefs.h <<EOF
23056 #define pid_t int
23057 EOF
23058
23059 fi
23060
23061 echo $ac_n "checking for ptrdiff_t""... $ac_c" 1>&6
23062 echo "configure:23063: checking for ptrdiff_t" >&5
23063 if eval "test \"\${am_cv_type_ptrdiff_t+set}\" = set"; then
23064   echo $ac_n "(cached) $ac_c" 1>&6
23065 else
23066   cat > conftest.$ac_ext <<EOF
23067 #line 23068 "configure"
23068 #include "confdefs.h"
23069 #include <stddef.h>
23070 int main() {
23071 ptrdiff_t p
23072 ; return 0; }
23073 EOF
23074 if { (eval echo configure:23075: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23075   rm -rf conftest*
23076   am_cv_type_ptrdiff_t=yes
23077 else
23078   echo "configure: failed program was:" >&5
23079   cat conftest.$ac_ext >&5
23080   rm -rf conftest*
23081   am_cv_type_ptrdiff_t=no
23082 fi
23083 rm -f conftest*
23084 fi
23085
23086 echo "$ac_t""$am_cv_type_ptrdiff_t" 1>&6
23087    if test $am_cv_type_ptrdiff_t = yes; then
23088      cat >> confdefs.h <<\EOF
23089 #define HAVE_PTRDIFF_T 1
23090 EOF
23091
23092    fi
23093
23094 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
23095 echo "configure:23096: checking return type of signal handlers" >&5
23096 if eval "test \"\${ac_cv_type_signal+set}\" = set"; then
23097   echo $ac_n "(cached) $ac_c" 1>&6
23098 else
23099   cat > conftest.$ac_ext <<EOF
23100 #line 23101 "configure"
23101 #include "confdefs.h"
23102 #include <sys/types.h>
23103 #include <signal.h>
23104 #ifdef signal
23105 #undef signal
23106 #endif
23107 #ifdef __cplusplus
23108 extern "C" void (*signal (int, void (*)(int)))(int);
23109 #else
23110 void (*signal ()) ();
23111 #endif
23112
23113 int main() {
23114 int i;
23115 ; return 0; }
23116 EOF
23117 if { (eval echo configure:23118: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23118   rm -rf conftest*
23119   ac_cv_type_signal=void
23120 else
23121   echo "configure: failed program was:" >&5
23122   cat conftest.$ac_ext >&5
23123   rm -rf conftest*
23124   ac_cv_type_signal=int
23125 fi
23126 rm -f conftest*
23127 fi
23128
23129 echo "$ac_t""$ac_cv_type_signal" 1>&6
23130 cat >> confdefs.h <<EOF
23131 #define RETSIGTYPE $ac_cv_type_signal
23132 EOF
23133
23134
23135 echo $ac_n "checking for size_t""... $ac_c" 1>&6
23136 echo "configure:23137: checking for size_t" >&5
23137 if eval "test \"\${ac_cv_type_size_t+set}\" = set"; then
23138   echo $ac_n "(cached) $ac_c" 1>&6
23139 else
23140   cat > conftest.$ac_ext <<EOF
23141 #line 23142 "configure"
23142 #include "confdefs.h"
23143 #include <sys/types.h>
23144 #if STDC_HEADERS
23145 #include <stdlib.h>
23146 #include <stddef.h>
23147 #endif
23148
23149 EOF
23150 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
23151   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
23152   rm -rf conftest*
23153   eval "ac_cv_type_size_t=yes"
23154 else
23155   rm -rf conftest*
23156   eval "ac_cv_type_size_t=no"
23157 fi
23158 rm -f conftest*
23159
23160 fi
23161 if eval "test \"`echo '$ac_cv_type_'size_t`\" = yes"; then
23162   echo "$ac_t""yes" 1>&6
23163 else
23164   echo "$ac_t""no" 1>&6
23165   cat >> confdefs.h <<EOF
23166 #define size_t unsigned
23167 EOF
23168
23169 fi
23170
23171
23172 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
23173 echo "configure:23174: checking for ssize_t" >&5
23174 if eval "test \"\${ac_cv_type_ssize_t+set}\" = set"; then
23175   echo $ac_n "(cached) $ac_c" 1>&6
23176 else
23177   cat > conftest.$ac_ext <<EOF
23178 #line 23179 "configure"
23179 #include "confdefs.h"
23180 #include <sys/types.h>
23181 #if STDC_HEADERS
23182 #include <stdlib.h>
23183 #include <stddef.h>
23184 #endif
23185
23186 EOF
23187 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
23188   egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
23189   rm -rf conftest*
23190   eval "ac_cv_type_ssize_t=yes"
23191 else
23192   rm -rf conftest*
23193   eval "ac_cv_type_ssize_t=no"
23194 fi
23195 rm -f conftest*
23196
23197 fi
23198 if eval "test \"`echo '$ac_cv_type_'ssize_t`\" = yes"; then
23199   echo "$ac_t""yes" 1>&6
23200 else
23201   echo "$ac_t""no" 1>&6
23202   cat >> confdefs.h <<EOF
23203 #define ssize_t signed int
23204 EOF
23205
23206 fi
23207
23208 echo $ac_n "checking for caddr_t""... $ac_c" 1>&6
23209 echo "configure:23210: checking for caddr_t" >&5
23210 if eval "test \"\${ac_cv_type_caddr_t+set}\" = set"; then
23211   echo $ac_n "(cached) $ac_c" 1>&6
23212 else
23213   cat > conftest.$ac_ext <<EOF
23214 #line 23215 "configure"
23215 #include "confdefs.h"
23216 #include <sys/types.h>
23217 #if STDC_HEADERS
23218 #include <stdlib.h>
23219 #include <stddef.h>
23220 #endif
23221
23222 EOF
23223 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
23224   egrep "(^|[^a-zA-Z_0-9])caddr_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
23225   rm -rf conftest*
23226   eval "ac_cv_type_caddr_t=yes"
23227 else
23228   rm -rf conftest*
23229   eval "ac_cv_type_caddr_t=no"
23230 fi
23231 rm -f conftest*
23232
23233 fi
23234 if eval "test \"`echo '$ac_cv_type_'caddr_t`\" = yes"; then
23235   echo "$ac_t""yes" 1>&6
23236 else
23237   echo "$ac_t""no" 1>&6
23238   cat >> confdefs.h <<EOF
23239 #define caddr_t char *
23240 EOF
23241
23242 fi
23243
23244
23245 echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
23246 echo "configure:23247: checking for socklen_t" >&5
23247 if eval "test \"\${ol_cv_type_socklen_t+set}\" = set"; then
23248   echo $ac_n "(cached) $ac_c" 1>&6
23249 else
23250   cat > conftest.$ac_ext <<EOF
23251 #line 23252 "configure"
23252 #include "confdefs.h"
23253
23254 #ifdef HAVE_SYS_TYPES_H
23255 #include <sys/types.h>
23256 #endif
23257 #ifdef HAVE_SYS_SOCKET_H
23258 #include <sys/socket.h>
23259 #endif
23260
23261 int main() {
23262 socklen_t len;
23263 ; return 0; }
23264 EOF
23265 if { (eval echo configure:23266: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23266   rm -rf conftest*
23267   ol_cv_type_socklen_t=yes
23268 else
23269   echo "configure: failed program was:" >&5
23270   cat conftest.$ac_ext >&5
23271   rm -rf conftest*
23272   ol_cv_type_socklen_t=no
23273 fi
23274 rm -f conftest*
23275 fi
23276
23277 echo "$ac_t""$ol_cv_type_socklen_t" 1>&6
23278   if test $ol_cv_type_socklen_t = no; then
23279     cat >> confdefs.h <<\EOF
23280 #define socklen_t int
23281 EOF
23282
23283   fi
23284  
23285 echo $ac_n "checking for member st_blksize in aggregate type struct stat""... $ac_c" 1>&6
23286 echo "configure:23287: checking for member st_blksize in aggregate type struct stat" >&5
23287 if eval "test \"\${ac_cv_c_struct_member_st_blksize+set}\" = set"; then
23288   echo $ac_n "(cached) $ac_c" 1>&6
23289 else
23290   cat > conftest.$ac_ext <<EOF
23291 #line 23292 "configure"
23292 #include "confdefs.h"
23293 #include <sys/types.h>
23294 #include <sys/stat.h>
23295 int main() {
23296 struct stat foo; foo.st_blksize;
23297 ; return 0; }
23298 EOF
23299 if { (eval echo configure:23300: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23300   rm -rf conftest*
23301   ac_cv_c_struct_member_st_blksize=yes
23302 else
23303   echo "configure: failed program was:" >&5
23304   cat conftest.$ac_ext >&5
23305   rm -rf conftest*
23306   ac_cv_c_struct_member_st_blksize=no
23307 fi
23308 rm -f conftest*
23309 fi
23310
23311 echo "$ac_t""$ac_cv_c_struct_member_st_blksize" 1>&6
23312 st_blksize="$ac_cv_c_struct_member_st_blksize"
23313 if test $ac_cv_c_struct_member_st_blksize = yes; then
23314   cat >> confdefs.h <<\EOF
23315 #define HAVE_ST_BLKSIZE 1
23316 EOF
23317
23318 fi
23319
23320 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
23321 echo "configure:23322: checking whether time.h and sys/time.h may both be included" >&5
23322 if eval "test \"\${ac_cv_header_time+set}\" = set"; then
23323   echo $ac_n "(cached) $ac_c" 1>&6
23324 else
23325   cat > conftest.$ac_ext <<EOF
23326 #line 23327 "configure"
23327 #include "confdefs.h"
23328 #include <sys/types.h>
23329 #include <sys/time.h>
23330 #include <time.h>
23331 int main() {
23332 struct tm *tp;
23333 ; return 0; }
23334 EOF
23335 if { (eval echo configure:23336: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23336   rm -rf conftest*
23337   ac_cv_header_time=yes
23338 else
23339   echo "configure: failed program was:" >&5
23340   cat conftest.$ac_ext >&5
23341   rm -rf conftest*
23342   ac_cv_header_time=no
23343 fi
23344 rm -f conftest*
23345 fi
23346
23347 echo "$ac_t""$ac_cv_header_time" 1>&6
23348 if test $ac_cv_header_time = yes; then
23349   cat >> confdefs.h <<\EOF
23350 #define TIME_WITH_SYS_TIME 1
23351 EOF
23352
23353 fi
23354
23355 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
23356 echo "configure:23357: checking whether struct tm is in sys/time.h or time.h" >&5
23357 if eval "test \"\${ac_cv_struct_tm+set}\" = set"; then
23358   echo $ac_n "(cached) $ac_c" 1>&6
23359 else
23360   cat > conftest.$ac_ext <<EOF
23361 #line 23362 "configure"
23362 #include "confdefs.h"
23363 #include <sys/types.h>
23364 #include <time.h>
23365 int main() {
23366 struct tm *tp; tp->tm_sec;
23367 ; return 0; }
23368 EOF
23369 if { (eval echo configure:23370: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23370   rm -rf conftest*
23371   ac_cv_struct_tm=time.h
23372 else
23373   echo "configure: failed program was:" >&5
23374   cat conftest.$ac_ext >&5
23375   rm -rf conftest*
23376   ac_cv_struct_tm=sys/time.h
23377 fi
23378 rm -f conftest*
23379 fi
23380
23381 echo "$ac_t""$ac_cv_struct_tm" 1>&6
23382 if test $ac_cv_struct_tm = sys/time.h; then
23383   cat >> confdefs.h <<\EOF
23384 #define TM_IN_SYS_TIME 1
23385 EOF
23386
23387 fi
23388
23389 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
23390 echo "configure:23391: checking for uid_t in sys/types.h" >&5
23391 if eval "test \"\${ac_cv_type_uid_t+set}\" = set"; then
23392   echo $ac_n "(cached) $ac_c" 1>&6
23393 else
23394   cat > conftest.$ac_ext <<EOF
23395 #line 23396 "configure"
23396 #include "confdefs.h"
23397 #include <sys/types.h>
23398 EOF
23399 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
23400   egrep "uid_t" >/dev/null 2>&1; then
23401   rm -rf conftest*
23402   ac_cv_type_uid_t=yes
23403 else
23404   rm -rf conftest*
23405   ac_cv_type_uid_t=no
23406 fi
23407 rm -f conftest*
23408
23409 fi
23410
23411 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
23412 if test $ac_cv_type_uid_t = no; then
23413   cat >> confdefs.h <<\EOF
23414 #define uid_t int
23415 EOF
23416
23417   cat >> confdefs.h <<\EOF
23418 #define gid_t int
23419 EOF
23420
23421 fi
23422
23423 echo $ac_n "checking for sig_atomic_t""... $ac_c" 1>&6
23424 echo "configure:23425: checking for sig_atomic_t" >&5
23425 if eval "test \"\${ol_cv_type_sig_atomic_t+set}\" = set"; then
23426   echo $ac_n "(cached) $ac_c" 1>&6
23427 else
23428   cat > conftest.$ac_ext <<EOF
23429 #line 23430 "configure"
23430 #include "confdefs.h"
23431 #include <signal.h>
23432 int main() {
23433 sig_atomic_t atomic;
23434 ; return 0; }
23435 EOF
23436 if { (eval echo configure:23437: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23437   rm -rf conftest*
23438   ol_cv_type_sig_atomic_t=yes
23439 else
23440   echo "configure: failed program was:" >&5
23441   cat conftest.$ac_ext >&5
23442   rm -rf conftest*
23443   ol_cv_type_sig_atomic_t=no
23444 fi
23445 rm -f conftest*
23446 fi
23447
23448 echo "$ac_t""$ol_cv_type_sig_atomic_t" 1>&6
23449   if test $ol_cv_type_sig_atomic_t = no; then
23450     cat >> confdefs.h <<\EOF
23451 #define sig_atomic_t int
23452 EOF
23453
23454   fi
23455  
23456
23457
23458 # test for pw_gecos in struct passwd
23459 echo $ac_n "checking struct passwd for pw_gecos""... $ac_c" 1>&6
23460 echo "configure:23461: checking struct passwd for pw_gecos" >&5
23461 if eval "test \"\${ol_cv_struct_passwd_pw_gecos+set}\" = set"; then
23462   echo $ac_n "(cached) $ac_c" 1>&6
23463 else
23464   
23465         cat > conftest.$ac_ext <<EOF
23466 #line 23467 "configure"
23467 #include "confdefs.h"
23468 #include <pwd.h>
23469 int main() {
23470
23471         struct passwd pwd;
23472         pwd.pw_gecos = pwd.pw_name;
23473
23474 ; return 0; }
23475 EOF
23476 if { (eval echo configure:23477: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23477   rm -rf conftest*
23478   ol_cv_struct_passwd_pw_gecos=yes
23479 else
23480   echo "configure: failed program was:" >&5
23481   cat conftest.$ac_ext >&5
23482   rm -rf conftest*
23483   ol_cv_struct_passwd_pw_gecos=no
23484 fi
23485 rm -f conftest*
23486 fi
23487
23488 echo "$ac_t""$ol_cv_struct_passwd_pw_gecos" 1>&6
23489 if test $ol_cv_struct_passwd_pw_gecos = yes ; then
23490         cat >> confdefs.h <<\EOF
23491 #define HAVE_PW_GECOS 1
23492 EOF
23493
23494 fi
23495
23496 # test for pw_passwd in struct passwd
23497 echo $ac_n "checking struct passwd for pw_passwd""... $ac_c" 1>&6
23498 echo "configure:23499: checking struct passwd for pw_passwd" >&5
23499 if eval "test \"\${ol_cv_struct_passwd_pw_passwd+set}\" = set"; then
23500   echo $ac_n "(cached) $ac_c" 1>&6
23501 else
23502   
23503         cat > conftest.$ac_ext <<EOF
23504 #line 23505 "configure"
23505 #include "confdefs.h"
23506 #include <pwd.h>
23507 int main() {
23508
23509         struct passwd pwd;
23510         pwd.pw_passwd = pwd.pw_name;
23511
23512 ; return 0; }
23513 EOF
23514 if { (eval echo configure:23515: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23515   rm -rf conftest*
23516   ol_cv_struct_passwd_pw_passwd=yes
23517 else
23518   echo "configure: failed program was:" >&5
23519   cat conftest.$ac_ext >&5
23520   rm -rf conftest*
23521   ol_cv_struct_passwd_pw_passwd=no
23522 fi
23523 rm -f conftest*
23524 fi
23525
23526 echo "$ac_t""$ol_cv_struct_passwd_pw_passwd" 1>&6
23527 if test $ol_cv_struct_passwd_pw_passwd = yes ; then
23528         cat >> confdefs.h <<\EOF
23529 #define HAVE_PW_PASSWD 1
23530 EOF
23531
23532 fi
23533
23534
23535 echo $ac_n "checking if toupper() requires islower()""... $ac_c" 1>&6
23536 echo "configure:23537: checking if toupper() requires islower()" >&5
23537 if eval "test \"\${ol_cv_c_upper_lower+set}\" = set"; then
23538   echo $ac_n "(cached) $ac_c" 1>&6
23539 else
23540   
23541         if test "$cross_compiling" = yes; then
23542   ol_cv_c_upper_lower=safe
23543 else
23544   cat > conftest.$ac_ext <<EOF
23545 #line 23546 "configure"
23546 #include "confdefs.h"
23547
23548 #include <ctype.h>
23549 main()
23550 {
23551         if ('C' == toupper('C'))
23552                 exit(0);
23553         else
23554                 exit(1);
23555 }
23556 EOF
23557 if { (eval echo configure:23558: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
23558 then
23559   ol_cv_c_upper_lower=no
23560 else
23561   echo "configure: failed program was:" >&5
23562   cat conftest.$ac_ext >&5
23563   rm -fr conftest*
23564   ol_cv_c_upper_lower=yes
23565 fi
23566 rm -fr conftest*
23567 fi
23568
23569 fi
23570
23571 echo "$ac_t""$ol_cv_c_upper_lower" 1>&6
23572 if test $ol_cv_c_upper_lower != no ; then
23573         cat >> confdefs.h <<\EOF
23574 #define C_UPPER_LOWER 1
23575 EOF
23576
23577 fi
23578
23579 echo $ac_n "checking for working const""... $ac_c" 1>&6
23580 echo "configure:23581: checking for working const" >&5
23581 if eval "test \"\${ac_cv_c_const+set}\" = set"; then
23582   echo $ac_n "(cached) $ac_c" 1>&6
23583 else
23584   cat > conftest.$ac_ext <<EOF
23585 #line 23586 "configure"
23586 #include "confdefs.h"
23587
23588 int main() {
23589
23590 /* Ultrix mips cc rejects this.  */
23591 typedef int charset[2]; const charset x;
23592 /* SunOS 4.1.1 cc rejects this.  */
23593 char const *const *ccp;
23594 char **p;
23595 /* NEC SVR4.0.2 mips cc rejects this.  */
23596 struct point {int x, y;};
23597 static struct point const zero = {0,0};
23598 /* AIX XL C 1.02.0.0 rejects this.
23599    It does not let you subtract one const X* pointer from another in an arm
23600    of an if-expression whose if-part is not a constant expression */
23601 const char *g = "string";
23602 ccp = &g + (g ? g-g : 0);
23603 /* HPUX 7.0 cc rejects these. */
23604 ++ccp;
23605 p = (char**) ccp;
23606 ccp = (char const *const *) p;
23607 { /* SCO 3.2v4 cc rejects this.  */
23608   char *t;
23609   char const *s = 0 ? (char *) 0 : (char const *) 0;
23610
23611   *t++ = 0;
23612 }
23613 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
23614   int x[] = {25, 17};
23615   const int *foo = &x[0];
23616   ++foo;
23617 }
23618 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
23619   typedef const int *iptr;
23620   iptr p = 0;
23621   ++p;
23622 }
23623 { /* AIX XL C 1.02.0.0 rejects this saying
23624      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
23625   struct s { int j; const int *ap[3]; };
23626   struct s *b; b->j = 5;
23627 }
23628 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
23629   const int foo = 10;
23630 }
23631
23632 ; return 0; }
23633 EOF
23634 if { (eval echo configure:23635: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23635   rm -rf conftest*
23636   ac_cv_c_const=yes
23637 else
23638   echo "configure: failed program was:" >&5
23639   cat conftest.$ac_ext >&5
23640   rm -rf conftest*
23641   ac_cv_c_const=no
23642 fi
23643 rm -f conftest*
23644 fi
23645
23646 echo "$ac_t""$ac_cv_c_const" 1>&6
23647 if test $ac_cv_c_const = no; then
23648   cat >> confdefs.h <<\EOF
23649 #define const 
23650 EOF
23651
23652 fi
23653
23654 echo $ac_n "checking if compiler understands volatile""... $ac_c" 1>&6
23655 echo "configure:23656: checking if compiler understands volatile" >&5
23656 if eval "test \"\${ol_cv_c_volatile+set}\" = set"; then
23657   echo $ac_n "(cached) $ac_c" 1>&6
23658 else
23659   cat > conftest.$ac_ext <<EOF
23660 #line 23661 "configure"
23661 #include "confdefs.h"
23662 int x, y, z;
23663 int main() {
23664 volatile int a; int * volatile b = x ? &y : &z;
23665       /* Older MIPS compilers (eg., in Ultrix 4.2) don't like *b = 0 */
23666       *b = 0;
23667 ; return 0; }
23668 EOF
23669 if { (eval echo configure:23670: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23670   rm -rf conftest*
23671   ol_cv_c_volatile=yes
23672 else
23673   echo "configure: failed program was:" >&5
23674   cat conftest.$ac_ext >&5
23675   rm -rf conftest*
23676   ol_cv_c_volatile=no
23677 fi
23678 rm -f conftest*
23679 fi
23680
23681 echo "$ac_t""$ol_cv_c_volatile" 1>&6
23682   if test $ol_cv_c_volatile = yes; then
23683     : 
23684   else
23685     cat >> confdefs.h <<\EOF
23686 #define volatile 
23687 EOF
23688
23689   fi
23690  
23691
23692 if test $cross_compiling = yes ; then
23693         echo "configure: warning: Crossing compiling... all bets are off!" 1>&2
23694         cat >> confdefs.h <<\EOF
23695 #define CROSS_COMPILING 1
23696 EOF
23697
23698 else
23699         echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
23700 echo "configure:23701: checking whether byte ordering is bigendian" >&5
23701 if eval "test \"\${ac_cv_c_bigendian+set}\" = set"; then
23702   echo $ac_n "(cached) $ac_c" 1>&6
23703 else
23704   ac_cv_c_bigendian=unknown
23705 # See if sys/param.h defines the BYTE_ORDER macro.
23706 cat > conftest.$ac_ext <<EOF
23707 #line 23708 "configure"
23708 #include "confdefs.h"
23709 #include <sys/types.h>
23710 #include <sys/param.h>
23711 int main() {
23712
23713 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
23714  bogus endian macros
23715 #endif
23716 ; return 0; }
23717 EOF
23718 if { (eval echo configure:23719: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23719   rm -rf conftest*
23720   # It does; now see whether it defined to BIG_ENDIAN or not.
23721 cat > conftest.$ac_ext <<EOF
23722 #line 23723 "configure"
23723 #include "confdefs.h"
23724 #include <sys/types.h>
23725 #include <sys/param.h>
23726 int main() {
23727
23728 #if BYTE_ORDER != BIG_ENDIAN
23729  not big endian
23730 #endif
23731 ; return 0; }
23732 EOF
23733 if { (eval echo configure:23734: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23734   rm -rf conftest*
23735   ac_cv_c_bigendian=yes
23736 else
23737   echo "configure: failed program was:" >&5
23738   cat conftest.$ac_ext >&5
23739   rm -rf conftest*
23740   ac_cv_c_bigendian=no
23741 fi
23742 rm -f conftest*
23743 else
23744   echo "configure: failed program was:" >&5
23745   cat conftest.$ac_ext >&5
23746 fi
23747 rm -f conftest*
23748 if test $ac_cv_c_bigendian = unknown; then
23749 if test "$cross_compiling" = yes; then
23750     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
23751 else
23752   cat > conftest.$ac_ext <<EOF
23753 #line 23754 "configure"
23754 #include "confdefs.h"
23755 main () {
23756   /* Are we little or big endian?  From Harbison&Steele.  */
23757   union
23758   {
23759     long l;
23760     char c[sizeof (long)];
23761   } u;
23762   u.l = 1;
23763   exit (u.c[sizeof (long) - 1] == 1);
23764 }
23765 EOF
23766 if { (eval echo configure:23767: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
23767 then
23768   ac_cv_c_bigendian=no
23769 else
23770   echo "configure: failed program was:" >&5
23771   cat conftest.$ac_ext >&5
23772   rm -fr conftest*
23773   ac_cv_c_bigendian=yes
23774 fi
23775 rm -fr conftest*
23776 fi
23777
23778 fi
23779 fi
23780
23781 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
23782 if test $ac_cv_c_bigendian = yes; then
23783   cat >> confdefs.h <<\EOF
23784 #define WORDS_BIGENDIAN 1
23785 EOF
23786
23787 fi
23788
23789 fi
23790
23791 echo $ac_n "checking size of short""... $ac_c" 1>&6
23792 echo "configure:23793: checking size of short" >&5 
23793 if eval "test \"\${ac_cv_sizeof_short+set}\" = set"; then
23794   echo $ac_n "(cached) $ac_c" 1>&6
23795 else
23796   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
23797   cat > conftest.$ac_ext <<EOF
23798 #line 23799 "configure"
23799 #include "confdefs.h"
23800 #include "confdefs.h" 
23801 #include <stdlib.h>
23802 #include <sys/types.h> 
23803  
23804
23805 int main() {
23806 switch (0) case 0: case (sizeof (short) == $ac_size):;
23807 ; return 0; }
23808 EOF
23809 if { (eval echo configure:23810: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23810   rm -rf conftest*
23811   ac_cv_sizeof_short=$ac_size
23812 else
23813   echo "configure: failed program was:" >&5
23814   cat conftest.$ac_ext >&5
23815 fi
23816 rm -f conftest* 
23817   if test x$ac_cv_sizeof_short != x ; then break; fi 
23818 done 
23819
23820 fi
23821  
23822 if test x$ac_cv_sizeof_short = x ; then 
23823   { echo "configure: error: cannot determine a size for short" 1>&2; exit 1; } 
23824 fi 
23825 echo "$ac_t""$ac_cv_sizeof_short" 1>&6 
23826 cat >> confdefs.h <<EOF
23827 #define SIZEOF_SHORT $ac_cv_sizeof_short
23828 EOF
23829  
23830  
23831 echo $ac_n "checking size of int""... $ac_c" 1>&6
23832 echo "configure:23833: checking size of int" >&5 
23833 if eval "test \"\${ac_cv_sizeof_int+set}\" = set"; then
23834   echo $ac_n "(cached) $ac_c" 1>&6
23835 else
23836   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
23837   cat > conftest.$ac_ext <<EOF
23838 #line 23839 "configure"
23839 #include "confdefs.h"
23840 #include "confdefs.h" 
23841 #include <stdlib.h>
23842 #include <sys/types.h> 
23843  
23844
23845 int main() {
23846 switch (0) case 0: case (sizeof (int) == $ac_size):;
23847 ; return 0; }
23848 EOF
23849 if { (eval echo configure:23850: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23850   rm -rf conftest*
23851   ac_cv_sizeof_int=$ac_size
23852 else
23853   echo "configure: failed program was:" >&5
23854   cat conftest.$ac_ext >&5
23855 fi
23856 rm -f conftest* 
23857   if test x$ac_cv_sizeof_int != x ; then break; fi 
23858 done 
23859
23860 fi
23861  
23862 if test x$ac_cv_sizeof_int = x ; then 
23863   { echo "configure: error: cannot determine a size for int" 1>&2; exit 1; } 
23864 fi 
23865 echo "$ac_t""$ac_cv_sizeof_int" 1>&6 
23866 cat >> confdefs.h <<EOF
23867 #define SIZEOF_INT $ac_cv_sizeof_int
23868 EOF
23869  
23870  
23871 echo $ac_n "checking size of long""... $ac_c" 1>&6
23872 echo "configure:23873: checking size of long" >&5 
23873 if eval "test \"\${ac_cv_sizeof_long+set}\" = set"; then
23874   echo $ac_n "(cached) $ac_c" 1>&6
23875 else
23876   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
23877   cat > conftest.$ac_ext <<EOF
23878 #line 23879 "configure"
23879 #include "confdefs.h"
23880 #include "confdefs.h" 
23881 #include <stdlib.h>
23882 #include <sys/types.h> 
23883  
23884
23885 int main() {
23886 switch (0) case 0: case (sizeof (long) == $ac_size):;
23887 ; return 0; }
23888 EOF
23889 if { (eval echo configure:23890: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23890   rm -rf conftest*
23891   ac_cv_sizeof_long=$ac_size
23892 else
23893   echo "configure: failed program was:" >&5
23894   cat conftest.$ac_ext >&5
23895 fi
23896 rm -f conftest* 
23897   if test x$ac_cv_sizeof_long != x ; then break; fi 
23898 done 
23899
23900 fi
23901  
23902 if test x$ac_cv_sizeof_long = x ; then 
23903   { echo "configure: error: cannot determine a size for long" 1>&2; exit 1; } 
23904 fi 
23905 echo "$ac_t""$ac_cv_sizeof_long" 1>&6 
23906 cat >> confdefs.h <<EOF
23907 #define SIZEOF_LONG $ac_cv_sizeof_long
23908 EOF
23909  
23910
23911 echo $ac_n "checking size of wchar_t""... $ac_c" 1>&6
23912 echo "configure:23913: checking size of wchar_t" >&5 
23913 if eval "test \"\${ac_cv_sizeof_wchar_t+set}\" = set"; then
23914   echo $ac_n "(cached) $ac_c" 1>&6
23915 else
23916   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
23917   cat > conftest.$ac_ext <<EOF
23918 #line 23919 "configure"
23919 #include "confdefs.h"
23920 #include "confdefs.h" 
23921 #include <stdlib.h>
23922 #include <sys/types.h> 
23923  
23924
23925 int main() {
23926 switch (0) case 0: case (sizeof (wchar_t) == $ac_size):;
23927 ; return 0; }
23928 EOF
23929 if { (eval echo configure:23930: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23930   rm -rf conftest*
23931   ac_cv_sizeof_wchar_t=$ac_size
23932 else
23933   echo "configure: failed program was:" >&5
23934   cat conftest.$ac_ext >&5
23935 fi
23936 rm -f conftest* 
23937   if test x$ac_cv_sizeof_wchar_t != x ; then break; fi 
23938 done 
23939
23940 fi
23941  
23942 if test x$ac_cv_sizeof_wchar_t = x ; then 
23943   { echo "configure: error: cannot determine a size for wchar_t" 1>&2; exit 1; } 
23944 fi 
23945 echo "$ac_t""$ac_cv_sizeof_wchar_t" 1>&6 
23946 cat >> confdefs.h <<EOF
23947 #define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
23948 EOF
23949  
23950
23951
23952 if test "$ac_cv_sizeof_int" -lt 4 ; then
23953         echo "configure: warning: OpenLDAP requires 'int' to be 32 bits or greater." 1>&2
23954
23955         cat >> confdefs.h <<\EOF
23956 #define LBER_INT_T long
23957 EOF
23958
23959 else
23960         cat >> confdefs.h <<\EOF
23961 #define LBER_INT_T int
23962 EOF
23963
23964 fi
23965
23966 cat >> confdefs.h <<\EOF
23967 #define LBER_LEN_T long
23968 EOF
23969
23970 cat >> confdefs.h <<\EOF
23971 #define LBER_SOCKET_T int
23972 EOF
23973
23974 cat >> confdefs.h <<\EOF
23975 #define LBER_TAG_T long
23976 EOF
23977
23978
23979 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
23980 echo "configure:23981: checking for 8-bit clean memcmp" >&5
23981 if eval "test \"\${ac_cv_func_memcmp_clean+set}\" = set"; then
23982   echo $ac_n "(cached) $ac_c" 1>&6
23983 else
23984   if test "$cross_compiling" = yes; then
23985   ac_cv_func_memcmp_clean=no
23986 else
23987   cat > conftest.$ac_ext <<EOF
23988 #line 23989 "configure"
23989 #include "confdefs.h"
23990
23991 main()
23992 {
23993   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
23994   exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
23995 }
23996
23997 EOF
23998 if { (eval echo configure:23999: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
23999 then
24000   ac_cv_func_memcmp_clean=yes
24001 else
24002   echo "configure: failed program was:" >&5
24003   cat conftest.$ac_ext >&5
24004   rm -fr conftest*
24005   ac_cv_func_memcmp_clean=no
24006 fi
24007 rm -fr conftest*
24008 fi
24009
24010 fi
24011
24012 echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
24013 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
24014
24015 echo $ac_n "checking for strftime""... $ac_c" 1>&6
24016 echo "configure:24017: checking for strftime" >&5
24017 if eval "test \"\${ac_cv_func_strftime+set}\" = set"; then
24018   echo $ac_n "(cached) $ac_c" 1>&6
24019 else
24020   cat > conftest.$ac_ext <<EOF
24021 #line 24022 "configure"
24022 #include "confdefs.h"
24023 /* System header to define __stub macros and hopefully few prototypes,
24024     which can conflict with char strftime(); below.  */
24025 #include <assert.h>
24026 /* Override any gcc2 internal prototype to avoid an error.  */
24027 /* We use char because int might match the return type of a gcc2
24028     builtin and then its argument prototype would still apply.  */
24029 char strftime();
24030 char (*f)();
24031
24032 int main() {
24033
24034 /* The GNU C library defines this for functions which it implements
24035     to always fail with ENOSYS.  Some functions are actually named
24036     something starting with __ and the normal name is an alias.  */
24037 #if defined (__stub_strftime) || defined (__stub___strftime)
24038 choke me
24039 #else
24040 f = strftime;
24041 #endif
24042
24043 ; return 0; }
24044 EOF
24045 if { (eval echo configure:24046: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
24046   rm -rf conftest*
24047   eval "ac_cv_func_strftime=yes"
24048 else
24049   echo "configure: failed program was:" >&5
24050   cat conftest.$ac_ext >&5
24051   rm -rf conftest*
24052   eval "ac_cv_func_strftime=no"
24053 fi
24054 rm -f conftest*
24055 fi
24056
24057 if eval "test \"`echo '$ac_cv_func_'strftime`\" = yes"; then
24058   echo "$ac_t""yes" 1>&6
24059   cat >> confdefs.h <<\EOF
24060 #define HAVE_STRFTIME 1
24061 EOF
24062
24063 else
24064   echo "$ac_t""no" 1>&6
24065 # strftime is in -lintl on SCO UNIX.
24066 echo $ac_n "checking for strftime in -lintl""... $ac_c" 1>&6
24067 echo "configure:24068: checking for strftime in -lintl" >&5
24068 ac_lib_var=`echo intl'_'strftime | sed 'y%./+-:%__p__%'`
24069 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
24070   echo $ac_n "(cached) $ac_c" 1>&6
24071 else
24072   ac_save_LIBS="$LIBS"
24073 LIBS="-lintl  $LIBS"
24074 cat > conftest.$ac_ext <<EOF
24075 #line 24076 "configure"
24076 #include "confdefs.h"
24077 /* Override any gcc2 internal prototype to avoid an error.  */
24078 /* We use char because int might match the return type of a gcc2
24079     builtin and then its argument prototype would still apply.  */
24080 char strftime();
24081
24082 int main() {
24083 strftime()
24084 ; return 0; }
24085 EOF
24086 if { (eval echo configure:24087: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
24087   rm -rf conftest*
24088   eval "ac_cv_lib_$ac_lib_var=yes"
24089 else
24090   echo "configure: failed program was:" >&5
24091   cat conftest.$ac_ext >&5
24092   rm -rf conftest*
24093   eval "ac_cv_lib_$ac_lib_var=no"
24094 fi
24095 rm -f conftest*
24096 LIBS="$ac_save_LIBS"
24097
24098 fi
24099 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
24100   echo "$ac_t""yes" 1>&6
24101   cat >> confdefs.h <<\EOF
24102 #define HAVE_STRFTIME 1
24103 EOF
24104
24105 LIBS="-lintl $LIBS"
24106 else
24107   echo "$ac_t""no" 1>&6
24108 fi
24109
24110 fi
24111
24112
24113 echo $ac_n "checking for inet_aton()""... $ac_c" 1>&6
24114 echo "configure:24115: checking for inet_aton()" >&5
24115 if eval "test \"\${ol_cv_func_inet_aton+set}\" = set"; then
24116   echo $ac_n "(cached) $ac_c" 1>&6
24117 else
24118   cat > conftest.$ac_ext <<EOF
24119 #line 24120 "configure"
24120 #include "confdefs.h"
24121
24122 #ifdef HAVE_SYS_TYPES_H
24123 #       include <sys/types.h>
24124 #endif
24125 #ifdef HAVE_SYS_SOCKET_H
24126 #       include <sys/socket.h>
24127 #       ifdef HAVE_SYS_SELECT_H
24128 #               include <sys/select.h>
24129 #       endif
24130 #       include <netinet/in.h>
24131 #       ifdef HAVE_ARPA_INET_H
24132 #               include <arpa/inet.h>
24133 #       endif
24134 #endif
24135
24136 int main() {
24137 struct in_addr in;
24138 int rc = inet_aton( "255.255.255.255", &in );
24139 ; return 0; }
24140 EOF
24141 if { (eval echo configure:24142: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
24142   rm -rf conftest*
24143   ol_cv_func_inet_aton=yes
24144 else
24145   echo "configure: failed program was:" >&5
24146   cat conftest.$ac_ext >&5
24147   rm -rf conftest*
24148   ol_cv_func_inet_aton=no
24149 fi
24150 rm -f conftest*
24151 fi
24152
24153 echo "$ac_t""$ol_cv_func_inet_aton" 1>&6
24154   if test $ol_cv_func_inet_aton != no; then
24155     cat >> confdefs.h <<\EOF
24156 #define HAVE_INET_ATON 1
24157 EOF
24158
24159   fi
24160  
24161
24162 echo $ac_n "checking for _spawnlp""... $ac_c" 1>&6
24163 echo "configure:24164: checking for _spawnlp" >&5
24164 if eval "test \"\${ac_cv_func__spawnlp+set}\" = set"; then
24165   echo $ac_n "(cached) $ac_c" 1>&6
24166 else
24167   cat > conftest.$ac_ext <<EOF
24168 #line 24169 "configure"
24169 #include "confdefs.h"
24170 /* System header to define __stub macros and hopefully few prototypes,
24171     which can conflict with char _spawnlp(); below.  */
24172 #include <assert.h>
24173 /* Override any gcc2 internal prototype to avoid an error.  */
24174 /* We use char because int might match the return type of a gcc2
24175     builtin and then its argument prototype would still apply.  */
24176 char _spawnlp();
24177 char (*f)();
24178
24179 int main() {
24180
24181 /* The GNU C library defines this for functions which it implements
24182     to always fail with ENOSYS.  Some functions are actually named
24183     something starting with __ and the normal name is an alias.  */
24184 #if defined (__stub__spawnlp) || defined (__stub____spawnlp)
24185 choke me
24186 #else
24187 f = _spawnlp;
24188 #endif
24189
24190 ; return 0; }
24191 EOF
24192 if { (eval echo configure:24193: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
24193   rm -rf conftest*
24194   eval "ac_cv_func__spawnlp=yes"
24195 else
24196   echo "configure: failed program was:" >&5
24197   cat conftest.$ac_ext >&5
24198   rm -rf conftest*
24199   eval "ac_cv_func__spawnlp=no"
24200 fi
24201 rm -f conftest*
24202 fi
24203
24204 if eval "test \"`echo '$ac_cv_func_'_spawnlp`\" = yes"; then
24205   echo "$ac_t""yes" 1>&6
24206   cat >> confdefs.h <<\EOF
24207 #define HAVE_SPAWNLP 1
24208 EOF
24209
24210 else
24211   echo "$ac_t""no" 1>&6
24212 fi
24213
24214
24215 echo $ac_n "checking for _snprintf""... $ac_c" 1>&6
24216 echo "configure:24217: checking for _snprintf" >&5
24217 if eval "test \"\${ac_cv_func__snprintf+set}\" = set"; then
24218   echo $ac_n "(cached) $ac_c" 1>&6
24219 else
24220   cat > conftest.$ac_ext <<EOF
24221 #line 24222 "configure"
24222 #include "confdefs.h"
24223 /* System header to define __stub macros and hopefully few prototypes,
24224     which can conflict with char _snprintf(); below.  */
24225 #include <assert.h>
24226 /* Override any gcc2 internal prototype to avoid an error.  */
24227 /* We use char because int might match the return type of a gcc2
24228     builtin and then its argument prototype would still apply.  */
24229 char _snprintf();
24230 char (*f)();
24231
24232 int main() {
24233
24234 /* The GNU C library defines this for functions which it implements
24235     to always fail with ENOSYS.  Some functions are actually named
24236     something starting with __ and the normal name is an alias.  */
24237 #if defined (__stub__snprintf) || defined (__stub____snprintf)
24238 choke me
24239 #else
24240 f = _snprintf;
24241 #endif
24242
24243 ; return 0; }
24244 EOF
24245 if { (eval echo configure:24246: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
24246   rm -rf conftest*
24247   eval "ac_cv_func__snprintf=yes"
24248 else
24249   echo "configure: failed program was:" >&5
24250   cat conftest.$ac_ext >&5
24251   rm -rf conftest*
24252   eval "ac_cv_func__snprintf=no"
24253 fi
24254 rm -f conftest*
24255 fi
24256
24257 if eval "test \"`echo '$ac_cv_func_'_snprintf`\" = yes"; then
24258   echo "$ac_t""yes" 1>&6
24259   ac_cv_func_snprintf=yes
24260         cat >> confdefs.h <<\EOF
24261 #define snprintf _snprintf
24262 EOF
24263
24264
24265 else
24266   echo "$ac_t""no" 1>&6
24267 fi
24268
24269
24270 echo $ac_n "checking for _vsnprintf""... $ac_c" 1>&6
24271 echo "configure:24272: checking for _vsnprintf" >&5
24272 if eval "test \"\${ac_cv_func__vsnprintf+set}\" = set"; then
24273   echo $ac_n "(cached) $ac_c" 1>&6
24274 else
24275   cat > conftest.$ac_ext <<EOF
24276 #line 24277 "configure"
24277 #include "confdefs.h"
24278 /* System header to define __stub macros and hopefully few prototypes,
24279     which can conflict with char _vsnprintf(); below.  */
24280 #include <assert.h>
24281 /* Override any gcc2 internal prototype to avoid an error.  */
24282 /* We use char because int might match the return type of a gcc2
24283     builtin and then its argument prototype would still apply.  */
24284 char _vsnprintf();
24285 char (*f)();
24286
24287 int main() {
24288
24289 /* The GNU C library defines this for functions which it implements
24290     to always fail with ENOSYS.  Some functions are actually named
24291     something starting with __ and the normal name is an alias.  */
24292 #if defined (__stub__vsnprintf) || defined (__stub____vsnprintf)
24293 choke me
24294 #else
24295 f = _vsnprintf;
24296 #endif
24297
24298 ; return 0; }
24299 EOF
24300 if { (eval echo configure:24301: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
24301   rm -rf conftest*
24302   eval "ac_cv_func__vsnprintf=yes"
24303 else
24304   echo "configure: failed program was:" >&5
24305   cat conftest.$ac_ext >&5
24306   rm -rf conftest*
24307   eval "ac_cv_func__vsnprintf=no"
24308 fi
24309 rm -f conftest*
24310 fi
24311
24312 if eval "test \"`echo '$ac_cv_func_'_vsnprintf`\" = yes"; then
24313   echo "$ac_t""yes" 1>&6
24314   ac_cv_func_vsnprintf=yes
24315         cat >> confdefs.h <<\EOF
24316 #define vsnprintf _vsnprintf
24317 EOF
24318
24319
24320 else
24321   echo "$ac_t""no" 1>&6
24322 fi
24323
24324
24325 echo $ac_n "checking for vprintf""... $ac_c" 1>&6
24326 echo "configure:24327: checking for vprintf" >&5
24327 if eval "test \"\${ac_cv_func_vprintf+set}\" = set"; then
24328   echo $ac_n "(cached) $ac_c" 1>&6
24329 else
24330   cat > conftest.$ac_ext <<EOF
24331 #line 24332 "configure"
24332 #include "confdefs.h"
24333 /* System header to define __stub macros and hopefully few prototypes,
24334     which can conflict with char vprintf(); below.  */
24335 #include <assert.h>
24336 /* Override any gcc2 internal prototype to avoid an error.  */
24337 /* We use char because int might match the return type of a gcc2
24338     builtin and then its argument prototype would still apply.  */
24339 char vprintf();
24340 char (*f)();
24341
24342 int main() {
24343
24344 /* The GNU C library defines this for functions which it implements
24345     to always fail with ENOSYS.  Some functions are actually named
24346     something starting with __ and the normal name is an alias.  */
24347 #if defined (__stub_vprintf) || defined (__stub___vprintf)
24348 choke me
24349 #else
24350 f = vprintf;
24351 #endif
24352
24353 ; return 0; }
24354 EOF
24355 if { (eval echo configure:24356: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
24356   rm -rf conftest*
24357   eval "ac_cv_func_vprintf=yes"
24358 else
24359   echo "configure: failed program was:" >&5
24360   cat conftest.$ac_ext >&5
24361   rm -rf conftest*
24362   eval "ac_cv_func_vprintf=no"
24363 fi
24364 rm -f conftest*
24365 fi
24366
24367 if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
24368   echo "$ac_t""yes" 1>&6
24369   cat >> confdefs.h <<\EOF
24370 #define HAVE_VPRINTF 1
24371 EOF
24372
24373 else
24374   echo "$ac_t""no" 1>&6
24375 fi
24376
24377 if test "$ac_cv_func_vprintf" != yes; then
24378 echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
24379 echo "configure:24380: checking for _doprnt" >&5
24380 if eval "test \"\${ac_cv_func__doprnt+set}\" = set"; then
24381   echo $ac_n "(cached) $ac_c" 1>&6
24382 else
24383   cat > conftest.$ac_ext <<EOF
24384 #line 24385 "configure"
24385 #include "confdefs.h"
24386 /* System header to define __stub macros and hopefully few prototypes,
24387     which can conflict with char _doprnt(); below.  */
24388 #include <assert.h>
24389 /* Override any gcc2 internal prototype to avoid an error.  */
24390 /* We use char because int might match the return type of a gcc2
24391     builtin and then its argument prototype would still apply.  */
24392 char _doprnt();
24393 char (*f)();
24394
24395 int main() {
24396
24397 /* The GNU C library defines this for functions which it implements
24398     to always fail with ENOSYS.  Some functions are actually named
24399     something starting with __ and the normal name is an alias.  */
24400 #if defined (__stub__doprnt) || defined (__stub____doprnt)
24401 choke me
24402 #else
24403 f = _doprnt;
24404 #endif
24405
24406 ; return 0; }
24407 EOF
24408 if { (eval echo configure:24409: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
24409   rm -rf conftest*
24410   eval "ac_cv_func__doprnt=yes"
24411 else
24412   echo "configure: failed program was:" >&5
24413   cat conftest.$ac_ext >&5
24414   rm -rf conftest*
24415   eval "ac_cv_func__doprnt=no"
24416 fi
24417 rm -f conftest*
24418 fi
24419
24420 if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
24421   echo "$ac_t""yes" 1>&6
24422   cat >> confdefs.h <<\EOF
24423 #define HAVE_DOPRNT 1
24424 EOF
24425
24426 else
24427   echo "$ac_t""no" 1>&6
24428 fi
24429
24430 fi
24431
24432
24433 if test $ac_cv_func_vprintf = yes ; then
24434                 for ac_func in snprintf vsnprintf
24435 do
24436 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
24437 echo "configure:24438: checking for $ac_func" >&5
24438 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
24439   echo $ac_n "(cached) $ac_c" 1>&6
24440 else
24441   cat > conftest.$ac_ext <<EOF
24442 #line 24443 "configure"
24443 #include "confdefs.h"
24444 /* System header to define __stub macros and hopefully few prototypes,
24445     which can conflict with char $ac_func(); below.  */
24446 #include <assert.h>
24447 /* Override any gcc2 internal prototype to avoid an error.  */
24448 /* We use char because int might match the return type of a gcc2
24449     builtin and then its argument prototype would still apply.  */
24450 char $ac_func();
24451 char (*f)();
24452
24453 int main() {
24454
24455 /* The GNU C library defines this for functions which it implements
24456     to always fail with ENOSYS.  Some functions are actually named
24457     something starting with __ and the normal name is an alias.  */
24458 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
24459 choke me
24460 #else
24461 f = $ac_func;
24462 #endif
24463
24464 ; return 0; }
24465 EOF
24466 if { (eval echo configure:24467: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
24467   rm -rf conftest*
24468   eval "ac_cv_func_$ac_func=yes"
24469 else
24470   echo "configure: failed program was:" >&5
24471   cat conftest.$ac_ext >&5
24472   rm -rf conftest*
24473   eval "ac_cv_func_$ac_func=no"
24474 fi
24475 rm -f conftest*
24476 fi
24477
24478 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
24479   echo "$ac_t""yes" 1>&6
24480     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
24481   cat >> confdefs.h <<EOF
24482 #define $ac_tr_func 1
24483 EOF
24484  
24485 else
24486   echo "$ac_t""no" 1>&6
24487 fi
24488 done
24489
24490 fi
24491
24492 for ac_func in \
24493         bcopy                   \
24494         closesocket             \
24495         chroot                  \
24496         endgrent                \
24497         endpwent                \
24498         fcntl                   \
24499         flock                   \
24500         fstat                   \
24501         getdtablesize   \
24502         getgrgid                \
24503         gethostname             \
24504         getpass                 \
24505         getpassphrase   \
24506         getpwuid                \
24507         getpwnam                \
24508         getspnam                \
24509         gettimeofday    \
24510         initgroups              \
24511         lockf                   \
24512         memcpy                  \
24513         memmove                 \
24514         mkstemp                 \
24515         mktemp                  \
24516         pipe                    \
24517         read                    \
24518         recv                    \
24519         recvfrom                \
24520         setpwfile               \
24521         setgid                  \
24522         setegid                 \
24523         setsid                  \
24524         setuid                  \
24525         seteuid                 \
24526         signal                  \
24527         strdup                  \
24528         strpbrk                 \
24529         strrchr                 \
24530         strsep                  \
24531         strstr                  \
24532         strtol                  \
24533         strtoul                 \
24534         strtoq                  \
24535         strtouq                 \
24536         strtoll                 \
24537         strspn                  \
24538         sysconf                 \
24539         usleep                  \
24540         waitpid                 \
24541         wait4                   \
24542         write                   \
24543         send                    \
24544         sendmsg                 \
24545         sendto                  \
24546
24547 do
24548 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
24549 echo "configure:24550: checking for $ac_func" >&5
24550 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
24551   echo $ac_n "(cached) $ac_c" 1>&6
24552 else
24553   cat > conftest.$ac_ext <<EOF
24554 #line 24555 "configure"
24555 #include "confdefs.h"
24556 /* System header to define __stub macros and hopefully few prototypes,
24557     which can conflict with char $ac_func(); below.  */
24558 #include <assert.h>
24559 /* Override any gcc2 internal prototype to avoid an error.  */
24560 /* We use char because int might match the return type of a gcc2
24561     builtin and then its argument prototype would still apply.  */
24562 char $ac_func();
24563 char (*f)();
24564
24565 int main() {
24566
24567 /* The GNU C library defines this for functions which it implements
24568     to always fail with ENOSYS.  Some functions are actually named
24569     something starting with __ and the normal name is an alias.  */
24570 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
24571 choke me
24572 #else
24573 f = $ac_func;
24574 #endif
24575
24576 ; return 0; }
24577 EOF
24578 if { (eval echo configure:24579: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
24579   rm -rf conftest*
24580   eval "ac_cv_func_$ac_func=yes"
24581 else
24582   echo "configure: failed program was:" >&5
24583   cat conftest.$ac_ext >&5
24584   rm -rf conftest*
24585   eval "ac_cv_func_$ac_func=no"
24586 fi
24587 rm -f conftest*
24588 fi
24589
24590 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
24591   echo "$ac_t""yes" 1>&6
24592     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
24593   cat >> confdefs.h <<EOF
24594 #define $ac_tr_func 1
24595 EOF
24596  
24597 else
24598   echo "$ac_t""no" 1>&6
24599 fi
24600 done
24601
24602
24603 for ac_func in getopt getpeereid
24604 do
24605 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
24606 echo "configure:24607: checking for $ac_func" >&5
24607 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
24608   echo $ac_n "(cached) $ac_c" 1>&6
24609 else
24610   cat > conftest.$ac_ext <<EOF
24611 #line 24612 "configure"
24612 #include "confdefs.h"
24613 /* System header to define __stub macros and hopefully few prototypes,
24614     which can conflict with char $ac_func(); below.  */
24615 #include <assert.h>
24616 /* Override any gcc2 internal prototype to avoid an error.  */
24617 /* We use char because int might match the return type of a gcc2
24618     builtin and then its argument prototype would still apply.  */
24619 char $ac_func();
24620 char (*f)();
24621
24622 int main() {
24623
24624 /* The GNU C library defines this for functions which it implements
24625     to always fail with ENOSYS.  Some functions are actually named
24626     something starting with __ and the normal name is an alias.  */
24627 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
24628 choke me
24629 #else
24630 f = $ac_func;
24631 #endif
24632
24633 ; return 0; }
24634 EOF
24635 if { (eval echo configure:24636: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
24636   rm -rf conftest*
24637   eval "ac_cv_func_$ac_func=yes"
24638 else
24639   echo "configure: failed program was:" >&5
24640   cat conftest.$ac_ext >&5
24641   rm -rf conftest*
24642   eval "ac_cv_func_$ac_func=no"
24643 fi
24644 rm -f conftest*
24645 fi
24646
24647 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
24648   echo "$ac_t""yes" 1>&6
24649     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
24650   cat >> confdefs.h <<EOF
24651 #define $ac_tr_func 1
24652 EOF
24653  
24654 else
24655   echo "$ac_t""no" 1>&6
24656 LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
24657 fi
24658 done
24659
24660
24661
24662 if test "$ac_cv_func_getopt" != yes; then
24663         LIBSRCS="$LIBSRCS getopt.c"
24664 fi
24665 if test "$ac_cv_func_getpeereid" != yes; then
24666         echo $ac_n "checking for msg_accrights in msghdr""... $ac_c" 1>&6
24667 echo "configure:24668: checking for msg_accrights in msghdr" >&5
24668 if eval "test \"\${ol_cv_msghdr_msg_accrights+set}\" = set"; then
24669   echo $ac_n "(cached) $ac_c" 1>&6
24670 else
24671   cat > conftest.$ac_ext <<EOF
24672 #line 24673 "configure"
24673 #include "confdefs.h"
24674 #include <sys/socket.h>
24675 int main() {
24676 struct msghdr m; m.msg_accrightslen=0
24677 ; return 0; }
24678 EOF
24679 if { (eval echo configure:24680: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
24680   rm -rf conftest*
24681   ol_cv_msghdr_msg_accrights=yes
24682 else
24683   echo "configure: failed program was:" >&5
24684   cat conftest.$ac_ext >&5
24685   rm -rf conftest*
24686   ol_cv_msghdr_msg_accrights=no
24687 fi
24688 rm -f conftest*
24689         
24690 fi
24691
24692 echo "$ac_t""$ol_cv_msghdr_msg_accrights" 1>&6
24693   if test $ol_cv_msghdr_msg_accrights = "yes" ; then
24694         cat >> confdefs.h <<\EOF
24695 #define HAVE_MSGHDR_MSG_ACCRIGHTS 1
24696 EOF
24697
24698   fi
24699
24700         LIBSRCS="$LIBSRCS getpeereid.c"
24701 fi
24702 if test "$ac_cv_func_snprintf" != yes -o "$ac_cv_func_vsnprintf" != yes; then
24703         if test "$ac_cv_func_snprintf" != yes; then
24704                 cat >> confdefs.h <<\EOF
24705 #define snprintf ber_pvt_snprintf
24706 EOF
24707
24708         fi
24709         if test "$ac_cv_func_vsnprintf" != yes; then
24710                 cat >> confdefs.h <<\EOF
24711 #define vsnprintf ber_pvt_vsnprintf
24712 EOF
24713
24714         fi
24715 fi
24716
24717
24718 if test "$ol_enable_slapi" != no ; then
24719                         for ac_hdr in ltdl.h
24720 do
24721 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
24722 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
24723 echo "configure:24724: checking for $ac_hdr" >&5
24724 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
24725   echo $ac_n "(cached) $ac_c" 1>&6
24726 else
24727   cat > conftest.$ac_ext <<EOF
24728 #line 24729 "configure"
24729 #include "confdefs.h"
24730 #include <$ac_hdr>
24731 EOF
24732 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
24733 { (eval echo configure:24734: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
24734 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
24735 if test -z "$ac_err"; then
24736   rm -rf conftest*
24737   eval "ac_cv_header_$ac_safe=yes"
24738 else
24739   echo "$ac_err" >&5
24740   echo "configure: failed program was:" >&5
24741   cat conftest.$ac_ext >&5
24742   rm -rf conftest*
24743   eval "ac_cv_header_$ac_safe=no"
24744 fi
24745 rm -f conftest*
24746 fi
24747 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
24748   echo "$ac_t""yes" 1>&6
24749     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
24750   cat >> confdefs.h <<EOF
24751 #define $ac_tr_hdr 1
24752 EOF
24753  
24754 else
24755   echo "$ac_t""no" 1>&6
24756 fi
24757 done
24758
24759
24760         if test $ac_cv_header_ltdl_h != yes ; then
24761                 { echo "configure: error: could not locate <ltdl.h>" 1>&2; exit 1; }
24762         fi
24763         echo $ac_n "checking for lt_dlinit in -lltdl""... $ac_c" 1>&6
24764 echo "configure:24765: checking for lt_dlinit in -lltdl" >&5
24765 ac_lib_var=`echo ltdl'_'lt_dlinit | sed 'y%./+-:%__p__%'`
24766 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
24767   echo $ac_n "(cached) $ac_c" 1>&6
24768 else
24769   ac_save_LIBS="$LIBS"
24770 LIBS="-lltdl  $LIBS"
24771 cat > conftest.$ac_ext <<EOF
24772 #line 24773 "configure"
24773 #include "confdefs.h"
24774 /* Override any gcc2 internal prototype to avoid an error.  */
24775 /* We use char because int might match the return type of a gcc2
24776     builtin and then its argument prototype would still apply.  */
24777 char lt_dlinit();
24778
24779 int main() {
24780 lt_dlinit()
24781 ; return 0; }
24782 EOF
24783 if { (eval echo configure:24784: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
24784   rm -rf conftest*
24785   eval "ac_cv_lib_$ac_lib_var=yes"
24786 else
24787   echo "configure: failed program was:" >&5
24788   cat conftest.$ac_ext >&5
24789   rm -rf conftest*
24790   eval "ac_cv_lib_$ac_lib_var=no"
24791 fi
24792 rm -f conftest*
24793 LIBS="$ac_save_LIBS"
24794
24795 fi
24796 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
24797   echo "$ac_t""yes" 1>&6
24798   
24799                 SLAPI_LIBS=-lltdl
24800                 LIBSLAPI=libslapi.a
24801                 LIBSLAPITOOLS=../libslapi.a
24802                 cat >> confdefs.h <<\EOF
24803 #define HAVE_LIBLTDL 1
24804 EOF
24805
24806         
24807 else
24808   echo "$ac_t""no" 1>&6
24809 { echo "configure: error: could not locate libtool -lltdl" 1>&2; exit 1; }
24810 fi
24811
24812
24813         cat >> confdefs.h <<\EOF
24814 #define LDAP_SLAPI 1
24815 EOF
24816
24817 fi
24818
24819 if test "$ol_enable_debug" != no ; then
24820         cat >> confdefs.h <<\EOF
24821 #define LDAP_DEBUG 1
24822 EOF
24823
24824 fi
24825 if test "$ol_enable_syslog" = yes ; then
24826         cat >> confdefs.h <<\EOF
24827 #define LDAP_SYSLOG 1
24828 EOF
24829
24830 fi
24831 if test "$ol_link_kbind" != no ; then
24832         cat >> confdefs.h <<\EOF
24833 #define LDAP_API_FEATURE_X_OPENLDAP_V2_KBIND LDAP_VENDOR_VERSION
24834 EOF
24835
24836 fi
24837 if test "$ol_enable_proctitle" != no ; then
24838         cat >> confdefs.h <<\EOF
24839 #define LDAP_PROCTITLE 1
24840 EOF
24841
24842 fi
24843 if test "$ol_enable_referrals" != no ; then
24844         cat >> confdefs.h <<\EOF
24845 #define LDAP_API_FEATURE_X_OPENLDAP_V2_REFERRALS LDAP_VENDOR_VERSION
24846 EOF
24847
24848 fi
24849 if test "$ol_enable_local" != no; then
24850         cat >> confdefs.h <<\EOF
24851 #define LDAP_PF_LOCAL 1
24852 EOF
24853
24854 fi
24855 if test "$ol_link_ipv6" != no; then
24856         cat >> confdefs.h <<\EOF
24857 #define LDAP_PF_INET6 1
24858 EOF
24859
24860 fi
24861 if test "$ol_enable_cleartext" != no ; then
24862         cat >> confdefs.h <<\EOF
24863 #define SLAPD_CLEARTEXT 1
24864 EOF
24865
24866 fi
24867 if test "$ol_enable_crypt" != no ; then
24868         cat >> confdefs.h <<\EOF
24869 #define SLAPD_CRYPT 1
24870 EOF
24871
24872 fi
24873 if test "$ol_link_spasswd" != no ; then
24874         cat >> confdefs.h <<\EOF
24875 #define SLAPD_SPASSWD 1
24876 EOF
24877
24878 fi
24879 if test "$ol_enable_multimaster" != no ; then
24880         cat >> confdefs.h <<\EOF
24881 #define SLAPD_MULTIMASTER 1
24882 EOF
24883
24884 fi
24885 if test "$ol_enable_rlookups" != no ; then
24886         cat >> confdefs.h <<\EOF
24887 #define SLAPD_RLOOKUPS 1
24888 EOF
24889
24890 fi
24891 if test "$ol_enable_aci" != no ; then
24892         cat >> confdefs.h <<\EOF
24893 #define SLAPD_ACI_ENABLED 1
24894 EOF
24895
24896 fi
24897
24898 if test "$ol_link_modules" != no ; then
24899         cat >> confdefs.h <<\EOF
24900 #define SLAPD_MODULES 1
24901 EOF
24902
24903         BUILD_SLAPD=yes
24904         SLAPD_MODULES_LDFLAGS="-dlopen self"
24905 fi
24906
24907 cat >> confdefs.h <<\EOF
24908 #define SLAPD_MOD_STATIC 1
24909 EOF
24910
24911 cat >> confdefs.h <<\EOF
24912 #define SLAPD_MOD_DYNAMIC 2
24913 EOF
24914
24915
24916 if test "$ol_enable_bdb" != no ; then
24917         BUILD_SLAPD=yes
24918         BUILD_BDB=$ol_enable_bdb
24919         if test "$ol_enable_bdb" = mod ; then
24920                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-bdb"
24921                 MFLAG=SLAPD_MOD_DYNAMIC
24922         else
24923                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-bdb"
24924                 MFLAG=SLAPD_MOD_STATIC
24925         fi
24926         cat >> confdefs.h <<EOF
24927 #define SLAPD_BDB $MFLAG
24928 EOF
24929
24930 fi
24931
24932 if test "$ol_enable_dnssrv" != no ; then
24933         BUILD_SLAPD=yes
24934         BUILD_DNSSRV=$ol_enable_dnssrv
24935         if test "$ol_enable_dnssrv" = mod ; then
24936                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-dnssrv"
24937                 MFLAG=SLAPD_MOD_DYNAMIC
24938         else
24939                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-dnssrv"
24940                 MFLAG=SLAPD_MOD_STATIC
24941         fi
24942         cat >> confdefs.h <<EOF
24943 #define SLAPD_DNSSRV $MFLAG
24944 EOF
24945
24946 fi
24947
24948 if test "$ol_enable_hdb" != no ; then
24949         BUILD_SLAPD=yes
24950         BUILD_HDB=$ol_enable_hdb
24951         if test "$ol_enable_hdb" = mod ; then
24952                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-hdb"
24953                 MFLAG=SLAPD_MOD_DYNAMIC
24954         else
24955                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-hdb"
24956                 MFLAG=SLAPD_MOD_STATIC
24957         fi
24958         cat >> confdefs.h <<EOF
24959 #define SLAPD_HDB $MFLAG
24960 EOF
24961
24962 fi
24963
24964 if test "$ol_enable_ldap" != no ; then
24965         BUILD_SLAPD=yes
24966         BUILD_LDAP=$ol_enable_ldap
24967         if test "$ol_enable_ldap" = mod ; then
24968                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-ldap"
24969                 MFLAG=SLAPD_MOD_DYNAMIC
24970         else
24971                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-ldap"
24972                 MFLAG=SLAPD_MOD_STATIC
24973         fi
24974         cat >> confdefs.h <<EOF
24975 #define SLAPD_LDAP $MFLAG
24976 EOF
24977
24978 fi
24979
24980 if test "$ol_link_ldbm" != no -a $ol_enable_ldbm != no; then
24981         BUILD_SLAPD=yes
24982         BUILD_LDBM=$ol_enable_ldbm
24983         if test "$ol_enable_ldbm" = mod ; then
24984                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-ldbm"
24985                 MFLAG=SLAPD_MOD_DYNAMIC
24986         else
24987                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-ldbm"
24988                 MFLAG=SLAPD_MOD_STATIC
24989         fi
24990         cat >> confdefs.h <<EOF
24991 #define SLAPD_LDBM $MFLAG
24992 EOF
24993
24994 fi
24995
24996 if test "$ol_enable_meta" != no ; then
24997         BUILD_SLAPD=yes
24998         BUILD_META=$ol_enable_meta
24999         BUILD_REWRITE=yes
25000         if test "$ol_enable_meta" = mod ; then
25001                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-meta"
25002                 MFLAG=SLAPD_MOD_DYNAMIC
25003         else
25004                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-meta"
25005                 MFLAG=SLAPD_MOD_STATIC
25006         fi
25007         cat >> confdefs.h <<EOF
25008 #define SLAPD_META $MFLAG
25009 EOF
25010
25011 fi
25012
25013 if test "$ol_enable_monitor" != no ; then
25014         BUILD_SLAPD=yes
25015         BUILD_MONITOR=$ol_enable_monitor
25016         if test "$ol_enable_monitor" = mod ; then
25017                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-monitor"
25018                 MFLAG=SLAPD_MOD_DYNAMIC
25019         else
25020                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-monitor"
25021                 MFLAG=SLAPD_MOD_STATIC
25022         fi
25023         cat >> confdefs.h <<EOF
25024 #define SLAPD_MONITOR $MFLAG
25025 EOF
25026
25027 fi
25028
25029 if test "$ol_enable_null" != no ; then
25030         BUILD_SLAPD=yes
25031         BUILD_NULL=$ol_enable_null
25032         if test "$ol_enable_null" = mod ; then
25033                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-null"
25034                 MFLAG=SLAPD_MOD_DYNAMIC
25035         else
25036                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-null"
25037                 MFLAG=SLAPD_MOD_STATIC
25038         fi
25039         cat >> confdefs.h <<EOF
25040 #define SLAPD_NULL $MFLAG
25041 EOF
25042
25043 fi
25044
25045 if test "$ol_enable_passwd" != no ; then
25046         BUILD_SLAPD=yes
25047         BUILD_PASSWD=$ol_enable_passwd
25048         if test "$ol_enable_passwd" = mod ; then
25049                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-passwd"
25050                 MFLAG=SLAPD_MOD_DYNAMIC
25051         else
25052                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-passwd"
25053                 MFLAG=SLAPD_MOD_STATIC
25054         fi
25055         cat >> confdefs.h <<EOF
25056 #define SLAPD_PASSWD $MFLAG
25057 EOF
25058
25059 fi
25060
25061 if test "$ol_link_perl" != no ; then
25062         BUILD_SLAPD=yes
25063         BUILD_PERL=$ol_enable_perl
25064         if test "$ol_enable_perl" = mod ; then
25065                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-perl"
25066                 MFLAG=SLAPD_MOD_DYNAMIC
25067         else
25068                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-perl"
25069                 MFLAG=SLAPD_MOD_STATIC
25070         fi
25071         cat >> confdefs.h <<EOF
25072 #define SLAPD_PERL $MFLAG
25073 EOF
25074
25075 fi
25076
25077 if test "$ol_enable_relay" != no ; then
25078         BUILD_SLAPD=yes
25079         BUILD_RELAY=$ol_enable_relay
25080         if test "$ol_enable_relay" = mod ; then
25081                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-relay"
25082                 MFLAG=SLAPD_MOD_DYNAMIC
25083         else
25084                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-relay"
25085                 MFLAG=SLAPD_MOD_STATIC
25086         fi
25087         cat >> confdefs.h <<EOF
25088 #define SLAPD_RELAY $MFLAG
25089 EOF
25090
25091 fi
25092
25093 if test "$ol_enable_shell" != no ; then
25094         if test "$ol_link_thread" != no ; then
25095                 echo "configure: warning: Use of --without-threads is recommended with back-shell" 1>&2
25096         fi
25097         BUILD_SLAPD=yes
25098         BUILD_SHELL=$ol_enable_shell
25099         if test "$ol_enable_shell" = mod ; then
25100                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-shell"
25101                 MFLAG=SLAPD_MOD_DYNAMIC
25102         else
25103                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-shell"
25104                 MFLAG=SLAPD_MOD_STATIC
25105         fi
25106         cat >> confdefs.h <<EOF
25107 #define SLAPD_SHELL $MFLAG
25108 EOF
25109
25110 fi
25111
25112 if test "$ol_link_sql" != no ; then
25113         BUILD_SLAPD=yes
25114         BUILD_SQL=$ol_enable_sql
25115         if test "$ol_enable_sql" = mod; then
25116                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-sql"
25117                 MFLAG=SLAPD_MOD_DYNAMIC
25118         else
25119                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-sql"
25120                 MFLAG=SLAPD_MOD_STATIC
25121         fi
25122         cat >> confdefs.h <<EOF
25123 #define SLAPD_SQL $MFLAG
25124 EOF
25125
25126 fi
25127
25128 if test "$ol_enable_denyop" != no ; then
25129         BUILD_DENYOP=$ol_enable_denyop
25130         if test "$ol_enable_denyop" = mod ; then
25131                 MFLAG=SLAPD_MOD_DYNAMIC
25132                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS denyop.la"
25133         else
25134                 MFLAG=SLAPD_MOD_STATIC
25135         fi
25136         cat >> confdefs.h <<EOF
25137 #define SLAPD_OVER_DENYOP $MFLAG
25138 EOF
25139
25140 fi
25141
25142 if test "$ol_enable_dyngroup" != no ; then
25143         BUILD_DYNGROUP=$ol_enable_dyngroup
25144         if test "$ol_enable_dyngroup" = mod ; then
25145                 MFLAG=SLAPD_MOD_DYNAMIC
25146                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS dyngroup.la"
25147         else
25148                 MFLAG=SLAPD_MOD_STATIC
25149         fi
25150         cat >> confdefs.h <<EOF
25151 #define SLAPD_OVER_DYNGROUP $MFLAG
25152 EOF
25153
25154 fi
25155
25156 if test "$ol_enable_glue" != no ; then
25157         BUILD_GLUE=$ol_enable_glue
25158         if test "$ol_enable_glue" = mod ; then
25159                 MFLAG=SLAPD_MOD_DYNAMIC
25160                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS glue.la"
25161         else
25162                 MFLAG=SLAPD_MOD_STATIC
25163         fi
25164         cat >> confdefs.h <<EOF
25165 #define SLAPD_OVER_GLUE $MFLAG
25166 EOF
25167
25168 fi
25169
25170 if test "$ol_enable_lastmod" != no ; then
25171         BUILD_LASTMOD=$ol_enable_lastmod
25172         if test "$ol_enable_lastmod" = mod ; then
25173                 MFLAG=SLAPD_MOD_DYNAMIC
25174                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS lastmod.la"
25175         else
25176                 MFLAG=SLAPD_MOD_STATIC
25177         fi
25178         cat >> confdefs.h <<EOF
25179 #define SLAPD_OVER_LASTMOD $MFLAG
25180 EOF
25181
25182 fi
25183
25184 if test "$ol_enable_ppolicy" != no ; then
25185         BUILD_PPOLICY=$ol_enable_ppolicy
25186         if test "$ol_enable_ppolicy" = mod ; then
25187                 MFLAG=SLAPD_MOD_DYNAMIC
25188                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS ppolicy.la"
25189         else
25190                 MFLAG=SLAPD_MOD_STATIC
25191         fi
25192         cat >> confdefs.h <<EOF
25193 #define SLAPD_OVER_PPOLICY $MFLAG
25194 EOF
25195
25196 fi
25197
25198 if test "$ol_enable_proxycache" != no ; then
25199         BUILD_PROXYCACHE=$ol_enable_proxycache
25200         if test "$ol_enable_proxycache" = mod ; then
25201                 MFLAG=SLAPD_MOD_DYNAMIC
25202                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS pcache.la"
25203         else
25204                 MFLAG=SLAPD_MOD_STATIC
25205         fi
25206         cat >> confdefs.h <<EOF
25207 #define SLAPD_OVER_PROXYCACHE $MFLAG
25208 EOF
25209
25210 fi
25211
25212 if test "$ol_enable_refint" != no ; then
25213         BUILD_REFINT=$ol_enable_refint
25214         if test "$ol_enable_refint" = mod ; then
25215                 MFLAG=SLAPD_MOD_DYNAMIC
25216                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS refint.la"
25217         else
25218                 MFLAG=SLAPD_MOD_STATIC
25219         fi
25220         cat >> confdefs.h <<EOF
25221 #define SLAPD_OVER_REFINT $MFLAG
25222 EOF
25223
25224 fi
25225
25226 if test "$ol_enable_rwm" != no ; then
25227         BUILD_REWRITE=yes
25228         BUILD_RWM=$ol_enable_rwm
25229         if test "$ol_enable_rwm" = mod ; then
25230                 MFLAG=SLAPD_MOD_DYNAMIC
25231                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS rwm.la"
25232         else
25233                 MFLAG=SLAPD_MOD_STATIC
25234         fi
25235         cat >> confdefs.h <<EOF
25236 #define SLAPD_OVER_RWM $MFLAG
25237 EOF
25238
25239 fi
25240
25241 if test "$ol_enable_syncprov" != no ; then
25242         BUILD_SYNCPROV=$ol_enable_syncprov
25243         if test "$ol_enable_syncprov" = mod ; then
25244                 MFLAG=SLAPD_MOD_DYNAMIC
25245                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS syncprov.la"
25246         else
25247                 MFLAG=SLAPD_MOD_STATIC
25248         fi
25249         cat >> confdefs.h <<EOF
25250 #define SLAPD_OVER_SYNCPROV $MFLAG
25251 EOF
25252
25253 fi
25254
25255 if test "$ol_enable_unique" != no ; then
25256         BUILD_UNIQUE=$ol_enable_unique
25257         if test "$ol_enable_unique" = mod ; then
25258                 MFLAG=SLAPD_MOD_DYNAMIC
25259                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS unique.la"
25260         else
25261                 MFLAG=SLAPD_MOD_STATIC
25262         fi
25263         cat >> confdefs.h <<EOF
25264 #define SLAPD_OVER_UNIQUE $MFLAG
25265 EOF
25266
25267 fi
25268
25269 if test "$ol_enable_slurpd" != no -a "$ol_link_threads" != no -a \
25270         $BUILD_SLAPD = yes ; then
25271         BUILD_SLURPD=yes
25272 fi
25273
25274 if test "$ol_enable_rewrite" != no ; then
25275         cat >> confdefs.h <<\EOF
25276 #define ENABLE_REWRITE 1
25277 EOF
25278
25279         BUILD_REWRITE=yes
25280 fi
25281
25282 if test "$ol_enable_slapi" != no ; then
25283         cat >> confdefs.h <<\EOF
25284 #define ENABLE_SLAPI 1
25285 EOF
25286
25287         BUILD_SLAPI=yes
25288         SLAPD_SLAPI_DEPEND=libslapi.a
25289 fi
25290
25291
25292
25293 if test "$ac_cv_mingw32" = yes ; then
25294         PLAT=NT
25295         SLAPD_MODULES_LDFLAGS=
25296 else
25297         PLAT=UNIX
25298 fi
25299
25300
25301
25302
25303
25304
25305
25306
25307
25308   
25309   
25310   
25311   
25312   
25313   
25314   
25315   
25316   
25317   
25318   
25319   
25320   
25321   
25322   
25323   
25324   
25325   
25326   
25327   
25328   
25329   
25330   
25331   
25332   
25333   
25334
25335
25336
25337
25338
25339
25340
25341
25342
25343
25344
25345
25346
25347
25348
25349
25350
25351
25352
25353
25354
25355
25356
25357
25358
25359
25360
25361
25362
25363
25364
25365
25366
25367
25368
25369
25370
25371
25372
25373 # Check whether --with-xxinstall or --without-xxinstall was given.
25374 if test "${with_xxinstall+set}" = set; then
25375   withval="$with_xxinstall"
25376   :
25377 fi
25378
25379
25380
25381 trap '' 1 2 15
25382
25383 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
25384
25385 test "x$prefix" = xNONE && prefix=$ac_default_prefix
25386 # Let make expand exec_prefix.
25387 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
25388
25389 # Any assignment to VPATH causes Sun make to only execute
25390 # the first set of double-colon rules, so remove it if not needed.
25391 # If there is a colon in the path, we need to keep it.
25392 if test "x$srcdir" = x.; then
25393   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
25394 fi
25395
25396 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
25397
25398 DEFS=-DHAVE_CONFIG_H
25399
25400 # Without the "./", some shells look in PATH for config.status.
25401 : ${CONFIG_STATUS=./config.status}
25402
25403 echo creating $CONFIG_STATUS
25404 rm -f $CONFIG_STATUS
25405 cat > $CONFIG_STATUS <<EOF
25406 #! /bin/sh
25407 # Generated automatically by configure.
25408 # Run this file to recreate the current configuration.
25409 # This directory was configured as follows,
25410 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
25411 #
25412 # $0 $ac_configure_args
25413 #
25414 # Compiler output produced by configure, useful for debugging
25415 # configure, is in ./config.log if it exists.
25416
25417 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
25418 for ac_option
25419 do
25420   case "\$ac_option" in
25421   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
25422     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
25423     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
25424   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
25425     echo "$CONFIG_STATUS generated by autoconf version 2.13.1"
25426     exit 0 ;;
25427   -help | --help | --hel | --he | --h)
25428     echo "\$ac_cs_usage"; exit 0 ;;
25429   *) echo "\$ac_cs_usage"; exit 1 ;;
25430   esac
25431 done
25432
25433 ac_given_srcdir=$srcdir
25434 ac_given_INSTALL="$INSTALL"
25435
25436 trap 'rm -fr `echo "\
25437 Makefile:build/top.mk:Makefile.in:build/dir.mk \
25438 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
25439 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
25440 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
25441 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
25442 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
25443 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
25444 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
25445 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
25446 include/Makefile:build/top.mk:include/Makefile.in \
25447 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
25448 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
25449 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
25450 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
25451 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk  \
25452 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
25453 libraries/librewrite/Makefile:build/top.mk:libraries/librewrite/Makefile.in:build/lib.mk:build/lib-static.mk \
25454 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
25455 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
25456 servers/slapd/back-bdb/Makefile:build/top.mk:servers/slapd/back-bdb/Makefile.in:build/mod.mk \
25457 servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
25458 servers/slapd/back-hdb/Makefile:build/top.mk:servers/slapd/back-hdb/Makefile.in:build/mod.mk \
25459 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
25460 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
25461 servers/slapd/back-meta/Makefile:build/top.mk:servers/slapd/back-meta/Makefile.in:build/mod.mk \
25462 servers/slapd/back-monitor/Makefile:build/top.mk:servers/slapd/back-monitor/Makefile.in:build/mod.mk \
25463 servers/slapd/back-null/Makefile:build/top.mk:servers/slapd/back-null/Makefile.in:build/mod.mk \
25464 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
25465 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
25466 servers/slapd/back-relay/Makefile:build/top.mk:servers/slapd/back-relay/Makefile.in:build/mod.mk \
25467 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
25468 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
25469 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
25470 servers/slapd/slapi/Makefile:build/top.mk:servers/slapd/slapi/Makefile.in:build/lib.mk:build/lib-shared.mk  \
25471 servers/slapd/overlays/Makefile:build/top.mk:servers/slapd/overlays/Makefile.in:build/lib.mk \
25472 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
25473 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
25474 tests/run \
25475 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
25476  include/portable.h include/ldap_features.h include/lber_types.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
25477 EOF
25478 cat >> $CONFIG_STATUS <<EOF
25479
25480 # Protect against being on the right side of a sed subst in config.status.
25481 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
25482  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
25483 $ac_vpsub
25484 $extrasub
25485 s%@SHELL@%$SHELL%g
25486 s%@CFLAGS@%$CFLAGS%g
25487 s%@CPPFLAGS@%$CPPFLAGS%g
25488 s%@CXXFLAGS@%$CXXFLAGS%g
25489 s%@FFLAGS@%$FFLAGS%g
25490 s%@DEFS@%$DEFS%g
25491 s%@LDFLAGS@%$LDFLAGS%g
25492 s%@LIBS@%$LIBS%g
25493 s%@exec_prefix@%$exec_prefix%g
25494 s%@prefix@%$prefix%g
25495 s%@program_transform_name@%$program_transform_name%g
25496 s%@bindir@%$bindir%g
25497 s%@sbindir@%$sbindir%g
25498 s%@libexecdir@%$libexecdir%g
25499 s%@datadir@%$datadir%g
25500 s%@sysconfdir@%$sysconfdir%g
25501 s%@sharedstatedir@%$sharedstatedir%g
25502 s%@localstatedir@%$localstatedir%g
25503 s%@libdir@%$libdir%g
25504 s%@includedir@%$includedir%g
25505 s%@oldincludedir@%$oldincludedir%g
25506 s%@infodir@%$infodir%g
25507 s%@mandir@%$mandir%g
25508 s%@host@%$host%g
25509 s%@host_alias@%$host_alias%g
25510 s%@host_cpu@%$host_cpu%g
25511 s%@host_vendor@%$host_vendor%g
25512 s%@host_os@%$host_os%g
25513 s%@target@%$target%g
25514 s%@target_alias@%$target_alias%g
25515 s%@target_cpu@%$target_cpu%g
25516 s%@target_vendor@%$target_vendor%g
25517 s%@target_os@%$target_os%g
25518 s%@build@%$build%g
25519 s%@build_alias@%$build_alias%g
25520 s%@build_cpu@%$build_cpu%g
25521 s%@build_vendor@%$build_vendor%g
25522 s%@build_os@%$build_os%g
25523 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
25524 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
25525 s%@INSTALL_DATA@%$INSTALL_DATA%g
25526 s%@PACKAGE@%$PACKAGE%g
25527 s%@VERSION@%$VERSION%g
25528 s%@ACLOCAL@%$ACLOCAL%g
25529 s%@AUTOCONF@%$AUTOCONF%g
25530 s%@AUTOMAKE@%$AUTOMAKE%g
25531 s%@AUTOHEADER@%$AUTOHEADER%g
25532 s%@MAKEINFO@%$MAKEINFO%g
25533 s%@install_sh@%$install_sh%g
25534 s%@AMTAR@%$AMTAR%g
25535 s%@AWK@%$AWK%g
25536 s%@AMTARFLAGS@%$AMTARFLAGS%g
25537 s%@SET_MAKE@%$SET_MAKE%g
25538 s%@OPENLDAP_LIBRELEASE@%$OPENLDAP_LIBRELEASE%g
25539 s%@OPENLDAP_LIBVERSION@%$OPENLDAP_LIBVERSION%g
25540 s%@OPENLDAP_RELEASE_DATE@%$OPENLDAP_RELEASE_DATE%g
25541 s%@top_builddir@%$top_builddir%g
25542 s%@ldap_subdir@%$ldap_subdir%g
25543 s%@CC@%$CC%g
25544 s%@AR@%$AR%g
25545 s%@LN_S@%$LN_S%g
25546 s%@OBJEXT@%$OBJEXT%g
25547 s%@EXEEXT@%$EXEEXT%g
25548 s%@ECHO@%$ECHO%g
25549 s%@RANLIB@%$RANLIB%g
25550 s%@STRIP@%$STRIP%g
25551 s%@DLLTOOL@%$DLLTOOL%g
25552 s%@AS@%$AS%g
25553 s%@OBJDUMP@%$OBJDUMP%g
25554 s%@CPP@%$CPP%g
25555 s%@LIBTOOL@%$LIBTOOL%g
25556 s%@PERLBIN@%$PERLBIN%g
25557 s%@OL_MKDEP@%$OL_MKDEP%g
25558 s%@OL_MKDEP_FLAGS@%$OL_MKDEP_FLAGS%g
25559 s%@LTSTATIC@%$LTSTATIC%g
25560 s%@LIBOBJS@%$LIBOBJS%g
25561 s%@LIBSRCS@%$LIBSRCS%g
25562 s%@PLAT@%$PLAT%g
25563 s%@WITH_SASL@%$WITH_SASL%g
25564 s%@WITH_TLS@%$WITH_TLS%g
25565 s%@WITH_MODULES_ENABLED@%$WITH_MODULES_ENABLED%g
25566 s%@BUILD_LIBS_DYNAMIC@%$BUILD_LIBS_DYNAMIC%g
25567 s%@BUILD_SLAPD@%$BUILD_SLAPD%g
25568 s%@BUILD_SLAPI@%$BUILD_SLAPI%g
25569 s%@SLAPD_SLAPI_DEPEND@%$SLAPD_SLAPI_DEPEND%g
25570 s%@BUILD_BDB@%$BUILD_BDB%g
25571 s%@BUILD_DNSSRV@%$BUILD_DNSSRV%g
25572 s%@BUILD_HDB@%$BUILD_HDB%g
25573 s%@BUILD_LDAP@%$BUILD_LDAP%g
25574 s%@BUILD_LDBM@%$BUILD_LDBM%g
25575 s%@BUILD_META@%$BUILD_META%g
25576 s%@BUILD_MONITOR@%$BUILD_MONITOR%g
25577 s%@BUILD_NULL@%$BUILD_NULL%g
25578 s%@BUILD_PASSWD@%$BUILD_PASSWD%g
25579 s%@BUILD_RELAY@%$BUILD_RELAY%g
25580 s%@BUILD_PERL@%$BUILD_PERL%g
25581 s%@BUILD_SHELL@%$BUILD_SHELL%g
25582 s%@BUILD_SQL@%$BUILD_SQL%g
25583 s%@BUILD_CHAIN@%$BUILD_CHAIN%g
25584 s%@BUILD_DENYOP@%$BUILD_DENYOP%g
25585 s%@BUILD_DYNGROUP@%$BUILD_DYNGROUP%g
25586 s%@BUILD_GLUE@%$BUILD_GLUE%g
25587 s%@BUILD_LASTMOD@%$BUILD_LASTMOD%g
25588 s%@BUILD_PPOLICY@%$BUILD_PPOLICY%g
25589 s%@BUILD_PROXYCACHE@%$BUILD_PROXYCACHE%g
25590 s%@BUILD_REFINT@%$BUILD_REFINT%g
25591 s%@BUILD_RWM@%$BUILD_RWM%g
25592 s%@BUILD_SYNCPROV@%$BUILD_SYNCPROV%g
25593 s%@BUILD_UNIQUE@%$BUILD_UNIQUE%g
25594 s%@BUILD_SLURPD@%$BUILD_SLURPD%g
25595 s%@LDAP_LIBS@%$LDAP_LIBS%g
25596 s%@SLAPD_LIBS@%$SLAPD_LIBS%g
25597 s%@SLURPD_LIBS@%$SLURPD_LIBS%g
25598 s%@LDBM_LIBS@%$LDBM_LIBS%g
25599 s%@LTHREAD_LIBS@%$LTHREAD_LIBS%g
25600 s%@LUTIL_LIBS@%$LUTIL_LIBS%g
25601 s%@WRAP_LIBS@%$WRAP_LIBS%g
25602 s%@SLAPD_MODULES_CPPFLAGS@%$SLAPD_MODULES_CPPFLAGS%g
25603 s%@SLAPD_MODULES_LDFLAGS@%$SLAPD_MODULES_LDFLAGS%g
25604 s%@SLAPD_NO_STATIC@%$SLAPD_NO_STATIC%g
25605 s%@SLAPD_STATIC_BACKENDS@%$SLAPD_STATIC_BACKENDS%g
25606 s%@SLAPD_DYNAMIC_BACKENDS@%$SLAPD_DYNAMIC_BACKENDS%g
25607 s%@SLAPD_DYNAMIC_OVERLAYS@%$SLAPD_DYNAMIC_OVERLAYS%g
25608 s%@PERL_CPPFLAGS@%$PERL_CPPFLAGS%g
25609 s%@SLAPD_PERL_LDFLAGS@%$SLAPD_PERL_LDFLAGS%g
25610 s%@MOD_PERL_LDFLAGS@%$MOD_PERL_LDFLAGS%g
25611 s%@KRB4_LIBS@%$KRB4_LIBS%g
25612 s%@KRB5_LIBS@%$KRB5_LIBS%g
25613 s%@SASL_LIBS@%$SASL_LIBS%g
25614 s%@TLS_LIBS@%$TLS_LIBS%g
25615 s%@MODULES_LIBS@%$MODULES_LIBS%g
25616 s%@SLAPI_LIBS@%$SLAPI_LIBS%g
25617 s%@LIBSLAPI@%$LIBSLAPI%g
25618 s%@LIBSLAPITOOLS@%$LIBSLAPITOOLS%g
25619 s%@AUTH_LIBS@%$AUTH_LIBS%g
25620 s%@SLAPD_SLP_LIBS@%$SLAPD_SLP_LIBS%g
25621 s%@SLAPD_GMP_LIBS@%$SLAPD_GMP_LIBS%g
25622 s%@SLAPD_SQL_LDFLAGS@%$SLAPD_SQL_LDFLAGS%g
25623 s%@SLAPD_SQL_LIBS@%$SLAPD_SQL_LIBS%g
25624 s%@SLAPD_SQL_INCLUDES@%$SLAPD_SQL_INCLUDES%g
25625
25626 CEOF
25627 EOF
25628
25629 cat >> $CONFIG_STATUS <<\EOF
25630
25631 # Split the substitutions into bite-sized pieces for seds with
25632 # small command number limits, like on Digital OSF/1 and HP-UX.
25633 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
25634 ac_file=1 # Number of current file.
25635 ac_beg=1 # First line for current file.
25636 ac_end=$ac_max_sed_cmds # Line after last line for current file.
25637 ac_more_lines=:
25638 ac_sed_cmds=""
25639 while $ac_more_lines; do
25640   if test $ac_beg -gt 1; then
25641     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
25642   else
25643     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
25644   fi
25645   if test ! -s conftest.s$ac_file; then
25646     ac_more_lines=false
25647     rm -f conftest.s$ac_file
25648   else
25649     if test -z "$ac_sed_cmds"; then
25650       ac_sed_cmds="sed -f conftest.s$ac_file"
25651     else
25652       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
25653     fi
25654     ac_file=`expr $ac_file + 1`
25655     ac_beg=$ac_end
25656     ac_end=`expr $ac_end + $ac_max_sed_cmds`
25657   fi
25658 done
25659 if test -z "$ac_sed_cmds"; then
25660   ac_sed_cmds=cat
25661 fi
25662 EOF
25663
25664 cat >> $CONFIG_STATUS <<EOF
25665
25666 CONFIG_FILES=\${CONFIG_FILES-"\
25667 Makefile:build/top.mk:Makefile.in:build/dir.mk \
25668 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
25669 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
25670 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
25671 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
25672 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
25673 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
25674 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
25675 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
25676 include/Makefile:build/top.mk:include/Makefile.in \
25677 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
25678 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
25679 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
25680 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
25681 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk  \
25682 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
25683 libraries/librewrite/Makefile:build/top.mk:libraries/librewrite/Makefile.in:build/lib.mk:build/lib-static.mk \
25684 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
25685 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
25686 servers/slapd/back-bdb/Makefile:build/top.mk:servers/slapd/back-bdb/Makefile.in:build/mod.mk \
25687 servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
25688 servers/slapd/back-hdb/Makefile:build/top.mk:servers/slapd/back-hdb/Makefile.in:build/mod.mk \
25689 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
25690 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
25691 servers/slapd/back-meta/Makefile:build/top.mk:servers/slapd/back-meta/Makefile.in:build/mod.mk \
25692 servers/slapd/back-monitor/Makefile:build/top.mk:servers/slapd/back-monitor/Makefile.in:build/mod.mk \
25693 servers/slapd/back-null/Makefile:build/top.mk:servers/slapd/back-null/Makefile.in:build/mod.mk \
25694 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
25695 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
25696 servers/slapd/back-relay/Makefile:build/top.mk:servers/slapd/back-relay/Makefile.in:build/mod.mk \
25697 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
25698 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
25699 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
25700 servers/slapd/slapi/Makefile:build/top.mk:servers/slapd/slapi/Makefile.in:build/lib.mk:build/lib-shared.mk  \
25701 servers/slapd/overlays/Makefile:build/top.mk:servers/slapd/overlays/Makefile.in:build/lib.mk \
25702 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
25703 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
25704 tests/run \
25705 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
25706 "}
25707 EOF
25708 cat >> $CONFIG_STATUS <<\EOF
25709 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
25710   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
25711   case "$ac_file" in
25712   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
25713        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
25714   *) ac_file_in="${ac_file}.in" ;;
25715   esac
25716
25717   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
25718
25719   # Remove last slash and all that follows it.  Not all systems have dirname.
25720   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
25721   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
25722     # The file is in a subdirectory.
25723     test ! -d "$ac_dir" && mkdir "$ac_dir"
25724     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
25725     # A "../" for each directory in $ac_dir_suffix.
25726     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
25727   else
25728     ac_dir_suffix= ac_dots=
25729   fi
25730
25731   case "$ac_given_srcdir" in
25732   .)  srcdir=.
25733       if test -z "$ac_dots"; then top_srcdir=.
25734       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
25735   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
25736   *) # Relative path.
25737     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
25738     top_srcdir="$ac_dots$ac_given_srcdir" ;;
25739   esac
25740
25741   case "$ac_given_INSTALL" in
25742   [/$]*) INSTALL="$ac_given_INSTALL" ;;
25743   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
25744   esac
25745
25746   echo creating "$ac_file"
25747   rm -f "$ac_file"
25748   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
25749   case "$ac_file" in
25750   *[Mm]akefile*) ac_comsub="1i\\
25751 # $configure_input" ;;
25752   *) ac_comsub= ;;
25753   esac
25754
25755   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
25756   sed -e "$ac_comsub
25757 s%@configure_input@%$configure_input%g
25758 s%@srcdir@%$srcdir%g
25759 s%@top_srcdir@%$top_srcdir%g
25760 s%@INSTALL@%$INSTALL%g
25761 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
25762 fi; done
25763 rm -f conftest.s*
25764
25765 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
25766 # NAME is the cpp macro being defined and VALUE is the value it is being given.
25767 #
25768 # ac_d sets the value in "#define NAME VALUE" lines.
25769 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
25770 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
25771 ac_dC='\3'
25772 ac_dD='%g'
25773 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
25774 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
25775 ac_uB='\([      ]\)%\1#\2define\3'
25776 ac_uC=' '
25777 ac_uD='\4%g'
25778 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
25779 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
25780 ac_eB='$%\1#\2define\3'
25781 ac_eC=' '
25782 ac_eD='%g'
25783
25784 if test "${CONFIG_HEADERS+set}" != set; then
25785 EOF
25786 cat >> $CONFIG_STATUS <<EOF
25787   CONFIG_HEADERS="include/portable.h include/ldap_features.h include/lber_types.h"
25788 EOF
25789 cat >> $CONFIG_STATUS <<\EOF
25790 fi
25791 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
25792   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
25793   case "$ac_file" in
25794   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
25795        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
25796   *) ac_file_in="${ac_file}.in" ;;
25797   esac
25798
25799   echo creating $ac_file
25800
25801   rm -f conftest.frag conftest.in conftest.out
25802   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
25803   cat $ac_file_inputs > conftest.in
25804
25805 EOF
25806
25807 # Transform confdefs.h into a sed script conftest.vals that substitutes
25808 # the proper values into config.h.in to produce config.h.  And first:
25809 # Protect against being on the right side of a sed subst in config.status.
25810 # Protect against being in an unquoted here document in config.status.
25811 rm -f conftest.vals
25812 cat > conftest.hdr <<\EOF
25813 s/[\\&%]/\\&/g
25814 s%[\\$`]%\\&%g
25815 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
25816 s%ac_d%ac_u%gp
25817 s%ac_u%ac_e%gp
25818 EOF
25819 sed -n -f conftest.hdr confdefs.h > conftest.vals
25820 rm -f conftest.hdr
25821
25822 # This sed command replaces #undef with comments.  This is necessary, for
25823 # example, in the case of _POSIX_SOURCE, which is predefined and required
25824 # on some systems where configure will not decide to define it.
25825 cat >> conftest.vals <<\EOF
25826 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
25827 EOF
25828
25829 # Break up conftest.vals because some shells have a limit on
25830 # the size of here documents, and old seds have small limits too.
25831
25832 rm -f conftest.tail
25833 while :
25834 do
25835   ac_lines=`grep -c . conftest.vals`
25836   # grep -c gives empty output for an empty file on some AIX systems.
25837   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
25838   # Write a limited-size here document to conftest.frag.
25839   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
25840   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
25841   echo 'CEOF
25842   sed -f conftest.frag conftest.in > conftest.out
25843   rm -f conftest.in
25844   mv conftest.out conftest.in
25845 ' >> $CONFIG_STATUS
25846   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
25847   rm -f conftest.vals
25848   mv conftest.tail conftest.vals
25849 done
25850 rm -f conftest.vals
25851
25852 cat >> $CONFIG_STATUS <<\EOF
25853   rm -f conftest.frag conftest.h
25854   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
25855   cat conftest.in >> conftest.h
25856   rm -f conftest.in
25857   if cmp -s $ac_file conftest.h 2>/dev/null; then
25858     echo "$ac_file is unchanged"
25859     rm -f conftest.h
25860   else
25861     # Remove last slash and all that follows it.  Not all systems have dirname.
25862       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
25863       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
25864       # The file is in a subdirectory.
25865       test ! -d "$ac_dir" && mkdir "$ac_dir"
25866     fi
25867     rm -f $ac_file
25868     mv conftest.h $ac_file
25869   fi
25870 fi; done
25871
25872 EOF
25873 cat >> $CONFIG_STATUS <<EOF
25874 STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS"
25875 EOF
25876 cat >> $CONFIG_STATUS <<\EOF
25877
25878 chmod +x tests/run
25879 date > stamp-h
25880 BACKENDSC="servers/slapd/backends.c"
25881 echo "Making $BACKENDSC"
25882 rm -f $BACKENDSC
25883 cat > $BACKENDSC << ENDX
25884 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
25885  *
25886  * Copyright 1998-2005 The OpenLDAP Foundation.
25887  * All rights reserved.
25888  *
25889  * Redistribution and use in source and binary forms, with or without
25890  * modification, are permitted only as authorized by the OpenLDAP
25891  * Public License.
25892  *
25893  * A copy of this license is available in the file LICENSE in the
25894  * top-level directory of the distribution or, alternatively, at
25895  * <http://www.OpenLDAP.org/license.html>.
25896  */
25897 /* This file is automatically generated by configure; please do not edit. */
25898
25899 #include "portable.h"
25900 #include "slap.h"
25901
25902 ENDX
25903 if test "${STATIC_BACKENDS}"; then
25904         for b in config ${STATIC_BACKENDS}; do
25905                 bb=`echo "${b}" | sed -e 's/back-//'`
25906                 cat >> $BACKENDSC << ENDX
25907 extern BI_init ${bb}_back_initialize;
25908 ENDX
25909         done
25910
25911         cat >> $BACKENDSC << ENDX
25912
25913 BackendInfo slap_binfo[] = {
25914 ENDX
25915
25916         for b in config ${STATIC_BACKENDS}; do
25917                 bb=`echo "${b}" | sed -e 's/back-//'`
25918                 echo "    Add ${bb} ..."
25919                 cat >> $BACKENDSC << ENDX
25920         { "${bb}", ${bb}_back_initialize },
25921 ENDX
25922         done
25923
25924         cat >> $BACKENDSC << ENDX
25925         { NULL, NULL },
25926 };
25927
25928 /* end of generated file */
25929 ENDX
25930 fi
25931
25932 echo Please run \"make depend\" to build dependencies
25933
25934 exit 0
25935 EOF
25936 chmod +x $CONFIG_STATUS
25937 rm -fr confdefs* $ac_clean_files
25938 test "$no_create" = yes || $SHELL $CONFIG_STATUS || exit 1
25939