]> git.sur5r.net Git - openldap/blob - configure
422a15287cdaafdaf3e4f6da4c3ffe1b42bc2c9f
[openldap] / configure
1 #! /bin/sh
2 # $OpenLDAP$
3 # from OpenLDAP: pkg/ldap/configure.in,v 1.557 2004/11/25 20:16:55 hyc Exp  
4
5 # This work is part of OpenLDAP Software <http://www.openldap.org/>.
6 #
7 # Copyright 1998-2004 The OpenLDAP Foundation.
8 # All rights reserved.
9 #
10 # Redistribution and use in source and binary forms, with or without
11 # modification, are permitted only as authorized by the OpenLDAP
12 # Public License.
13 #
14 # A copy of this license is available in the file LICENSE in the
15 # top-level directory of the distribution or, alternatively, at
16 # <http://www.OpenLDAP.org/license.html>.
17
18 echo "Copyright 1998-2004 The OpenLDAP Foundation. All rights reserved."
19 echo "  Restrictions apply, see COPYRIGHT and LICENSE files."
20
21 # Guess values for system-dependent variables and create Makefiles.
22 # Generated automatically using autoconf version 2.13.1 
23 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
24 #
25 # This configure script is free software; the Free Software Foundation
26 # gives unlimited permission to copy, distribute and modify it.
27
28 # Defaults:
29 ac_help=
30 ac_default_prefix=/usr/local
31 # Any additions from configure.in:
32 ac_default_prefix=/usr/local
33 ac_help="$ac_help
34   --with-subdir=DIR       change default subdirectory used for installs"
35 ac_help="$ac_help
36   --enable-debug          enable debugging [yes]"
37 ac_help="$ac_help
38   --enable-dynamic        enable linking built binaries with dynamic libs [no]"
39 ac_help="$ac_help
40   --enable-syslog         enable syslog support [auto]"
41 ac_help="$ac_help
42   --enable-proctitle      enable proctitle support [yes]"
43 ac_help="$ac_help
44   --enable-ipv6           enable IPv6 support [auto]"
45 ac_help="$ac_help
46   --enable-local          enable AF_LOCAL (AF_UNIX) socket support [auto]"
47 ac_help="$ac_help
48   --with-cyrus-sasl       with Cyrus SASL support [auto]"
49 ac_help="$ac_help
50   --with-fetch            with fetch(3) URL support [auto]"
51 ac_help="$ac_help
52   --with-threads          with threads [auto]"
53 ac_help="$ac_help
54   --with-tls              with TLS/SSL support [auto]"
55 ac_help="$ac_help
56   --with-yielding-select  with implicitly yielding select [auto]"
57 ac_help="$ac_help
58   --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-chain        LDAP Chain Response no|yes|mod [no]"
130 ac_help="$ac_help
131     --enable-denyop       Deny Operation overlay no|yes|mod [no]"
132 ac_help="$ac_help
133     --enable-dyngroup     Dynamic Group overlay no|yes|mod [no]"
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         WITH_MODULES_ENABLED=yes
1801
1802 else
1803         ol_enable_modules="no"
1804         WITH_MODULES_ENABLED=no
1805 fi
1806 # end --enable-modules
1807 ol_enable_multimaster=${ol_enable_multimaster-no}
1808 # OpenLDAP --enable-rewrite
1809         # Check whether --enable-rewrite or --disable-rewrite was given.
1810 if test "${enable_rewrite+set}" = set; then
1811   enableval="$enable_rewrite"
1812   
1813         ol_arg=invalid
1814         for ol_val in auto yes no ; do
1815                 if test "$enableval" = "$ol_val" ; then
1816                         ol_arg="$ol_val"
1817                 fi
1818         done
1819         if test "$ol_arg" = "invalid" ; then
1820                 { echo "configure: error: bad value $enableval for --enable-rewrite" 1>&2; exit 1; }
1821         fi
1822         ol_enable_rewrite="$ol_arg"
1823
1824 else
1825         ol_enable_rewrite="auto"
1826 fi
1827 # end --enable-rewrite
1828 # OpenLDAP --enable-rlookups
1829         # Check whether --enable-rlookups or --disable-rlookups was given.
1830 if test "${enable_rlookups+set}" = set; then
1831   enableval="$enable_rlookups"
1832   
1833         ol_arg=invalid
1834         for ol_val in auto yes no ; do
1835                 if test "$enableval" = "$ol_val" ; then
1836                         ol_arg="$ol_val"
1837                 fi
1838         done
1839         if test "$ol_arg" = "invalid" ; then
1840                 { echo "configure: error: bad value $enableval for --enable-rlookups" 1>&2; exit 1; }
1841         fi
1842         ol_enable_rlookups="$ol_arg"
1843
1844 else
1845         ol_enable_rlookups="no"
1846 fi
1847 # end --enable-rlookups
1848 # OpenLDAP --enable-slapi
1849         # Check whether --enable-slapi or --disable-slapi was given.
1850 if test "${enable_slapi+set}" = set; then
1851   enableval="$enable_slapi"
1852   
1853         ol_arg=invalid
1854         for ol_val in auto yes no ; do
1855                 if test "$enableval" = "$ol_val" ; then
1856                         ol_arg="$ol_val"
1857                 fi
1858         done
1859         if test "$ol_arg" = "invalid" ; then
1860                 { echo "configure: error: bad value $enableval for --enable-slapi" 1>&2; exit 1; }
1861         fi
1862         ol_enable_slapi="$ol_arg"
1863
1864 else
1865         ol_enable_slapi="no"
1866 fi
1867 # end --enable-slapi
1868 # OpenLDAP --enable-slp
1869         # Check whether --enable-slp or --disable-slp was given.
1870 if test "${enable_slp+set}" = set; then
1871   enableval="$enable_slp"
1872   
1873         ol_arg=invalid
1874         for ol_val in auto yes no ; do
1875                 if test "$enableval" = "$ol_val" ; then
1876                         ol_arg="$ol_val"
1877                 fi
1878         done
1879         if test "$ol_arg" = "invalid" ; then
1880                 { echo "configure: error: bad value $enableval for --enable-slp" 1>&2; exit 1; }
1881         fi
1882         ol_enable_slp="$ol_arg"
1883
1884 else
1885         ol_enable_slp="no"
1886 fi
1887 # end --enable-slp
1888 # OpenLDAP --enable-wrappers
1889         # Check whether --enable-wrappers or --disable-wrappers was given.
1890 if test "${enable_wrappers+set}" = set; then
1891   enableval="$enable_wrappers"
1892   
1893         ol_arg=invalid
1894         for ol_val in auto yes no ; do
1895                 if test "$enableval" = "$ol_val" ; then
1896                         ol_arg="$ol_val"
1897                 fi
1898         done
1899         if test "$ol_arg" = "invalid" ; then
1900                 { echo "configure: error: bad value $enableval for --enable-wrappers" 1>&2; exit 1; }
1901         fi
1902         ol_enable_wrappers="$ol_arg"
1903
1904 else
1905         ol_enable_wrappers="no"
1906 fi
1907 # end --enable-wrappers
1908
1909 Backends="bdb dnssrv hdb ldap ldbm meta monitor null \
1910         passwd perl relay shell sql"
1911
1912 # Check whether --with-xxslapbackends or --without-xxslapbackends was given.
1913 if test "${with_xxslapbackends+set}" = set; then
1914   withval="$with_xxslapbackends"
1915   :
1916 fi
1917
1918
1919 # OpenLDAP --enable-backends
1920         # Check whether --enable-backends or --disable-backends was given.
1921 if test "${enable_backends+set}" = set; then
1922   enableval="$enable_backends"
1923   
1924         ol_arg=invalid
1925         for ol_val in no yes mod ; do
1926                 if test "$enableval" = "$ol_val" ; then
1927                         ol_arg="$ol_val"
1928                 fi
1929         done
1930         if test "$ol_arg" = "invalid" ; then
1931                 { echo "configure: error: bad value $enableval for --enable-backends" 1>&2; exit 1; }
1932         fi
1933         ol_enable_backends="$ol_arg"
1934
1935 else
1936         ol_enable_backends="no"
1937 fi
1938 # end --enable-backends
1939 # OpenLDAP --enable-bdb
1940         # Check whether --enable-bdb or --disable-bdb was given.
1941 if test "${enable_bdb+set}" = set; then
1942   enableval="$enable_bdb"
1943   
1944         ol_arg=invalid
1945         for ol_val in no yes mod ; do
1946                 if test "$enableval" = "$ol_val" ; then
1947                         ol_arg="$ol_val"
1948                 fi
1949         done
1950         if test "$ol_arg" = "invalid" ; then
1951                 { echo "configure: error: bad value $enableval for --enable-bdb" 1>&2; exit 1; }
1952         fi
1953         ol_enable_bdb="$ol_arg"
1954
1955 else
1956         ol_enable_bdb="yes"
1957 fi
1958 # end --enable-bdb
1959 # OpenLDAP --enable-dnssrv
1960         # Check whether --enable-dnssrv or --disable-dnssrv was given.
1961 if test "${enable_dnssrv+set}" = set; then
1962   enableval="$enable_dnssrv"
1963   
1964         ol_arg=invalid
1965         for ol_val in no yes mod ; do
1966                 if test "$enableval" = "$ol_val" ; then
1967                         ol_arg="$ol_val"
1968                 fi
1969         done
1970         if test "$ol_arg" = "invalid" ; then
1971                 { echo "configure: error: bad value $enableval for --enable-dnssrv" 1>&2; exit 1; }
1972         fi
1973         ol_enable_dnssrv="$ol_arg"
1974
1975 else
1976         ol_enable_dnssrv="no"
1977 fi
1978 # end --enable-dnssrv
1979 # OpenLDAP --enable-hdb
1980         # Check whether --enable-hdb or --disable-hdb was given.
1981 if test "${enable_hdb+set}" = set; then
1982   enableval="$enable_hdb"
1983   
1984         ol_arg=invalid
1985         for ol_val in no yes mod ; do
1986                 if test "$enableval" = "$ol_val" ; then
1987                         ol_arg="$ol_val"
1988                 fi
1989         done
1990         if test "$ol_arg" = "invalid" ; then
1991                 { echo "configure: error: bad value $enableval for --enable-hdb" 1>&2; exit 1; }
1992         fi
1993         ol_enable_hdb="$ol_arg"
1994
1995 else
1996         ol_enable_hdb="no"
1997 fi
1998 # end --enable-hdb
1999 # OpenLDAP --enable-ldap
2000         # Check whether --enable-ldap or --disable-ldap was given.
2001 if test "${enable_ldap+set}" = set; then
2002   enableval="$enable_ldap"
2003   
2004         ol_arg=invalid
2005         for ol_val in no yes mod ; do
2006                 if test "$enableval" = "$ol_val" ; then
2007                         ol_arg="$ol_val"
2008                 fi
2009         done
2010         if test "$ol_arg" = "invalid" ; then
2011                 { echo "configure: error: bad value $enableval for --enable-ldap" 1>&2; exit 1; }
2012         fi
2013         ol_enable_ldap="$ol_arg"
2014
2015 else
2016         ol_enable_ldap="no"
2017 fi
2018 # end --enable-ldap
2019 # OpenLDAP --enable-ldbm
2020         # Check whether --enable-ldbm or --disable-ldbm was given.
2021 if test "${enable_ldbm+set}" = set; then
2022   enableval="$enable_ldbm"
2023   
2024         ol_arg=invalid
2025         for ol_val in no yes mod ; do
2026                 if test "$enableval" = "$ol_val" ; then
2027                         ol_arg="$ol_val"
2028                 fi
2029         done
2030         if test "$ol_arg" = "invalid" ; then
2031                 { echo "configure: error: bad value $enableval for --enable-ldbm" 1>&2; exit 1; }
2032         fi
2033         ol_enable_ldbm="$ol_arg"
2034
2035 else
2036         ol_enable_ldbm="no"
2037 fi
2038 # end --enable-ldbm
2039 # OpenLDAP --with-ldbm_api
2040         # Check whether --with-ldbm_api or --without-ldbm_api was given.
2041 if test "${with_ldbm_api+set}" = set; then
2042   withval="$with_ldbm_api"
2043   
2044         ol_arg=invalid
2045         for ol_val in auto berkeley bcompat mdbm gdbm ; do
2046                 if test "$withval" = "$ol_val" ; then
2047                         ol_arg="$ol_val"
2048                 fi
2049         done
2050         if test "$ol_arg" = "invalid" ; then
2051                 { echo "configure: error: bad value $withval for --with-ldbm_api" 1>&2; exit 1; }
2052         fi
2053         ol_with_ldbm_api="$ol_arg"
2054
2055 else
2056         ol_with_ldbm_api="auto"
2057 fi
2058 # end --with-ldbm_api
2059
2060 # OpenLDAP --with-ldbm_type
2061         # Check whether --with-ldbm_type or --without-ldbm_type was given.
2062 if test "${with_ldbm_type+set}" = set; then
2063   withval="$with_ldbm_type"
2064   
2065         ol_arg=invalid
2066         for ol_val in auto btree hash ; do
2067                 if test "$withval" = "$ol_val" ; then
2068                         ol_arg="$ol_val"
2069                 fi
2070         done
2071         if test "$ol_arg" = "invalid" ; then
2072                 { echo "configure: error: bad value $withval for --with-ldbm_type" 1>&2; exit 1; }
2073         fi
2074         ol_with_ldbm_type="$ol_arg"
2075
2076 else
2077         ol_with_ldbm_type="auto"
2078 fi
2079 # end --with-ldbm_type
2080
2081 # OpenLDAP --enable-meta
2082         # Check whether --enable-meta or --disable-meta was given.
2083 if test "${enable_meta+set}" = set; then
2084   enableval="$enable_meta"
2085   
2086         ol_arg=invalid
2087         for ol_val in no yes mod ; do
2088                 if test "$enableval" = "$ol_val" ; then
2089                         ol_arg="$ol_val"
2090                 fi
2091         done
2092         if test "$ol_arg" = "invalid" ; then
2093                 { echo "configure: error: bad value $enableval for --enable-meta" 1>&2; exit 1; }
2094         fi
2095         ol_enable_meta="$ol_arg"
2096
2097 else
2098         ol_enable_meta="no"
2099 fi
2100 # end --enable-meta
2101 # OpenLDAP --enable-monitor
2102         # Check whether --enable-monitor or --disable-monitor was given.
2103 if test "${enable_monitor+set}" = set; then
2104   enableval="$enable_monitor"
2105   
2106         ol_arg=invalid
2107         for ol_val in no yes mod ; do
2108                 if test "$enableval" = "$ol_val" ; then
2109                         ol_arg="$ol_val"
2110                 fi
2111         done
2112         if test "$ol_arg" = "invalid" ; then
2113                 { echo "configure: error: bad value $enableval for --enable-monitor" 1>&2; exit 1; }
2114         fi
2115         ol_enable_monitor="$ol_arg"
2116
2117 else
2118         ol_enable_monitor="yes"
2119 fi
2120 # end --enable-monitor
2121 # OpenLDAP --enable-null
2122         # Check whether --enable-null or --disable-null was given.
2123 if test "${enable_null+set}" = set; then
2124   enableval="$enable_null"
2125   
2126         ol_arg=invalid
2127         for ol_val in no yes mod ; do
2128                 if test "$enableval" = "$ol_val" ; then
2129                         ol_arg="$ol_val"
2130                 fi
2131         done
2132         if test "$ol_arg" = "invalid" ; then
2133                 { echo "configure: error: bad value $enableval for --enable-null" 1>&2; exit 1; }
2134         fi
2135         ol_enable_null="$ol_arg"
2136
2137 else
2138         ol_enable_null="no"
2139 fi
2140 # end --enable-null
2141 # OpenLDAP --enable-passwd
2142         # Check whether --enable-passwd or --disable-passwd was given.
2143 if test "${enable_passwd+set}" = set; then
2144   enableval="$enable_passwd"
2145   
2146         ol_arg=invalid
2147         for ol_val in no yes mod ; do
2148                 if test "$enableval" = "$ol_val" ; then
2149                         ol_arg="$ol_val"
2150                 fi
2151         done
2152         if test "$ol_arg" = "invalid" ; then
2153                 { echo "configure: error: bad value $enableval for --enable-passwd" 1>&2; exit 1; }
2154         fi
2155         ol_enable_passwd="$ol_arg"
2156
2157 else
2158         ol_enable_passwd="no"
2159 fi
2160 # end --enable-passwd
2161 # OpenLDAP --enable-perl
2162         # Check whether --enable-perl or --disable-perl was given.
2163 if test "${enable_perl+set}" = set; then
2164   enableval="$enable_perl"
2165   
2166         ol_arg=invalid
2167         for ol_val in no yes mod ; do
2168                 if test "$enableval" = "$ol_val" ; then
2169                         ol_arg="$ol_val"
2170                 fi
2171         done
2172         if test "$ol_arg" = "invalid" ; then
2173                 { echo "configure: error: bad value $enableval for --enable-perl" 1>&2; exit 1; }
2174         fi
2175         ol_enable_perl="$ol_arg"
2176
2177 else
2178         ol_enable_perl="no"
2179 fi
2180 # end --enable-perl
2181 # OpenLDAP --enable-relay
2182         # Check whether --enable-relay or --disable-relay was given.
2183 if test "${enable_relay+set}" = set; then
2184   enableval="$enable_relay"
2185   
2186         ol_arg=invalid
2187         for ol_val in no yes mod ; do
2188                 if test "$enableval" = "$ol_val" ; then
2189                         ol_arg="$ol_val"
2190                 fi
2191         done
2192         if test "$ol_arg" = "invalid" ; then
2193                 { echo "configure: error: bad value $enableval for --enable-relay" 1>&2; exit 1; }
2194         fi
2195         ol_enable_relay="$ol_arg"
2196
2197 else
2198         ol_enable_relay="yes"
2199 fi
2200 # end --enable-relay
2201 # OpenLDAP --enable-shell
2202         # Check whether --enable-shell or --disable-shell was given.
2203 if test "${enable_shell+set}" = set; then
2204   enableval="$enable_shell"
2205   
2206         ol_arg=invalid
2207         for ol_val in no yes mod ; do
2208                 if test "$enableval" = "$ol_val" ; then
2209                         ol_arg="$ol_val"
2210                 fi
2211         done
2212         if test "$ol_arg" = "invalid" ; then
2213                 { echo "configure: error: bad value $enableval for --enable-shell" 1>&2; exit 1; }
2214         fi
2215         ol_enable_shell="$ol_arg"
2216
2217 else
2218         ol_enable_shell="no"
2219 fi
2220 # end --enable-shell
2221 # OpenLDAP --enable-sql
2222         # Check whether --enable-sql or --disable-sql was given.
2223 if test "${enable_sql+set}" = set; then
2224   enableval="$enable_sql"
2225   
2226         ol_arg=invalid
2227         for ol_val in no yes mod ; do
2228                 if test "$enableval" = "$ol_val" ; then
2229                         ol_arg="$ol_val"
2230                 fi
2231         done
2232         if test "$ol_arg" = "invalid" ; then
2233                 { echo "configure: error: bad value $enableval for --enable-sql" 1>&2; exit 1; }
2234         fi
2235         ol_enable_sql="$ol_arg"
2236
2237 else
2238         ol_enable_sql="no"
2239 fi
2240 # end --enable-sql
2241
2242 Overlays="chain denyop dyngroup lastmod ppolicy proxycache rwm \
2243         refint syncprov unique"
2244
2245 # Check whether --with-xxslapoverlays or --without-xxslapoverlays was given.
2246 if test "${with_xxslapoverlays+set}" = set; then
2247   withval="$with_xxslapoverlays"
2248   :
2249 fi
2250
2251
2252 # OpenLDAP --enable-overlays
2253         # Check whether --enable-overlays or --disable-overlays was given.
2254 if test "${enable_overlays+set}" = set; then
2255   enableval="$enable_overlays"
2256   
2257         ol_arg=invalid
2258         for ol_val in no yes mod ; do
2259                 if test "$enableval" = "$ol_val" ; then
2260                         ol_arg="$ol_val"
2261                 fi
2262         done
2263         if test "$ol_arg" = "invalid" ; then
2264                 { echo "configure: error: bad value $enableval for --enable-overlays" 1>&2; exit 1; }
2265         fi
2266         ol_enable_overlays="$ol_arg"
2267
2268 else
2269         ol_enable_overlays="no"
2270 fi
2271 # end --enable-overlays
2272 # OpenLDAP --enable-chain
2273         # Check whether --enable-chain or --disable-chain was given.
2274 if test "${enable_chain+set}" = set; then
2275   enableval="$enable_chain"
2276   
2277         ol_arg=invalid
2278         for ol_val in no yes mod ; do
2279                 if test "$enableval" = "$ol_val" ; then
2280                         ol_arg="$ol_val"
2281                 fi
2282         done
2283         if test "$ol_arg" = "invalid" ; then
2284                 { echo "configure: error: bad value $enableval for --enable-chain" 1>&2; exit 1; }
2285         fi
2286         ol_enable_chain="$ol_arg"
2287
2288 else
2289         ol_enable_chain="no"
2290 fi
2291 # end --enable-chain
2292
2293 # OpenLDAP --enable-denyop
2294         # Check whether --enable-denyop or --disable-denyop was given.
2295 if test "${enable_denyop+set}" = set; then
2296   enableval="$enable_denyop"
2297   
2298         ol_arg=invalid
2299         for ol_val in no yes mod ; do
2300                 if test "$enableval" = "$ol_val" ; then
2301                         ol_arg="$ol_val"
2302                 fi
2303         done
2304         if test "$ol_arg" = "invalid" ; then
2305                 { echo "configure: error: bad value $enableval for --enable-denyop" 1>&2; exit 1; }
2306         fi
2307         ol_enable_denyop="$ol_arg"
2308
2309 else
2310         ol_enable_denyop="no"
2311 fi
2312 # end --enable-denyop
2313
2314 # OpenLDAP --enable-dyngroup
2315         # Check whether --enable-dyngroup or --disable-dyngroup was given.
2316 if test "${enable_dyngroup+set}" = set; then
2317   enableval="$enable_dyngroup"
2318   
2319         ol_arg=invalid
2320         for ol_val in no yes mod ; do
2321                 if test "$enableval" = "$ol_val" ; then
2322                         ol_arg="$ol_val"
2323                 fi
2324         done
2325         if test "$ol_arg" = "invalid" ; then
2326                 { echo "configure: error: bad value $enableval for --enable-dyngroup" 1>&2; exit 1; }
2327         fi
2328         ol_enable_dyngroup="$ol_arg"
2329
2330 else
2331         ol_enable_dyngroup="no"
2332 fi
2333 # end --enable-dyngroup
2334
2335 # OpenLDAP --enable-lastmod
2336         # Check whether --enable-lastmod or --disable-lastmod was given.
2337 if test "${enable_lastmod+set}" = set; then
2338   enableval="$enable_lastmod"
2339   
2340         ol_arg=invalid
2341         for ol_val in no yes mod ; do
2342                 if test "$enableval" = "$ol_val" ; then
2343                         ol_arg="$ol_val"
2344                 fi
2345         done
2346         if test "$ol_arg" = "invalid" ; then
2347                 { echo "configure: error: bad value $enableval for --enable-lastmod" 1>&2; exit 1; }
2348         fi
2349         ol_enable_lastmod="$ol_arg"
2350
2351 else
2352         ol_enable_lastmod="no"
2353 fi
2354 # end --enable-lastmod
2355
2356 # OpenLDAP --enable-ppolicy
2357         # Check whether --enable-ppolicy or --disable-ppolicy was given.
2358 if test "${enable_ppolicy+set}" = set; then
2359   enableval="$enable_ppolicy"
2360   
2361         ol_arg=invalid
2362         for ol_val in no yes mod ; do
2363                 if test "$enableval" = "$ol_val" ; then
2364                         ol_arg="$ol_val"
2365                 fi
2366         done
2367         if test "$ol_arg" = "invalid" ; then
2368                 { echo "configure: error: bad value $enableval for --enable-ppolicy" 1>&2; exit 1; }
2369         fi
2370         ol_enable_ppolicy="$ol_arg"
2371
2372 else
2373         ol_enable_ppolicy="no"
2374 fi
2375 # end --enable-ppolicy
2376
2377 # OpenLDAP --enable-proxycache
2378         # Check whether --enable-proxycache or --disable-proxycache was given.
2379 if test "${enable_proxycache+set}" = set; then
2380   enableval="$enable_proxycache"
2381   
2382         ol_arg=invalid
2383         for ol_val in no yes mod ; do
2384                 if test "$enableval" = "$ol_val" ; then
2385                         ol_arg="$ol_val"
2386                 fi
2387         done
2388         if test "$ol_arg" = "invalid" ; then
2389                 { echo "configure: error: bad value $enableval for --enable-proxycache" 1>&2; exit 1; }
2390         fi
2391         ol_enable_proxycache="$ol_arg"
2392
2393 else
2394         ol_enable_proxycache="no"
2395 fi
2396 # end --enable-proxycache
2397
2398 # OpenLDAP --enable-refint
2399         # Check whether --enable-refint or --disable-refint was given.
2400 if test "${enable_refint+set}" = set; then
2401   enableval="$enable_refint"
2402   
2403         ol_arg=invalid
2404         for ol_val in no yes mod ; do
2405                 if test "$enableval" = "$ol_val" ; then
2406                         ol_arg="$ol_val"
2407                 fi
2408         done
2409         if test "$ol_arg" = "invalid" ; then
2410                 { echo "configure: error: bad value $enableval for --enable-refint" 1>&2; exit 1; }
2411         fi
2412         ol_enable_refint="$ol_arg"
2413
2414 else
2415         ol_enable_refint="no"
2416 fi
2417 # end --enable-refint
2418
2419 # OpenLDAP --enable-rwm
2420         # Check whether --enable-rwm or --disable-rwm was given.
2421 if test "${enable_rwm+set}" = set; then
2422   enableval="$enable_rwm"
2423   
2424         ol_arg=invalid
2425         for ol_val in no yes mod ; do
2426                 if test "$enableval" = "$ol_val" ; then
2427                         ol_arg="$ol_val"
2428                 fi
2429         done
2430         if test "$ol_arg" = "invalid" ; then
2431                 { echo "configure: error: bad value $enableval for --enable-rwm" 1>&2; exit 1; }
2432         fi
2433         ol_enable_rwm="$ol_arg"
2434
2435 else
2436         ol_enable_rwm="no"
2437 fi
2438 # end --enable-rwm
2439
2440 # OpenLDAP --enable-syncprov
2441         # Check whether --enable-syncprov or --disable-syncprov was given.
2442 if test "${enable_syncprov+set}" = set; then
2443   enableval="$enable_syncprov"
2444   
2445         ol_arg=invalid
2446         for ol_val in no yes mod ; do
2447                 if test "$enableval" = "$ol_val" ; then
2448                         ol_arg="$ol_val"
2449                 fi
2450         done
2451         if test "$ol_arg" = "invalid" ; then
2452                 { echo "configure: error: bad value $enableval for --enable-syncprov" 1>&2; exit 1; }
2453         fi
2454         ol_enable_syncprov="$ol_arg"
2455
2456 else
2457         ol_enable_syncprov="yes"
2458 fi
2459 # end --enable-syncprov
2460
2461 # OpenLDAP --enable-unique
2462         # Check whether --enable-unique or --disable-unique was given.
2463 if test "${enable_unique+set}" = set; then
2464   enableval="$enable_unique"
2465   
2466         ol_arg=invalid
2467         for ol_val in no yes mod ; do
2468                 if test "$enableval" = "$ol_val" ; then
2469                         ol_arg="$ol_val"
2470                 fi
2471         done
2472         if test "$ol_arg" = "invalid" ; then
2473                 { echo "configure: error: bad value $enableval for --enable-unique" 1>&2; exit 1; }
2474         fi
2475         ol_enable_unique="$ol_arg"
2476
2477 else
2478         ol_enable_unique="no"
2479 fi
2480 # end --enable-unique
2481
2482
2483
2484 # Check whether --with-xxslurpdoptions or --without-xxslurpdoptions was given.
2485 if test "${with_xxslurpdoptions+set}" = set; then
2486   withval="$with_xxslurpdoptions"
2487   :
2488 fi
2489
2490 # OpenLDAP --enable-slurpd
2491         # Check whether --enable-slurpd or --disable-slurpd was given.
2492 if test "${enable_slurpd+set}" = set; then
2493   enableval="$enable_slurpd"
2494   
2495         ol_arg=invalid
2496         for ol_val in auto yes no ; do
2497                 if test "$enableval" = "$ol_val" ; then
2498                         ol_arg="$ol_val"
2499                 fi
2500         done
2501         if test "$ol_arg" = "invalid" ; then
2502                 { echo "configure: error: bad value $enableval for --enable-slurpd" 1>&2; exit 1; }
2503         fi
2504         ol_enable_slurpd="$ol_arg"
2505
2506 else
2507         ol_enable_slurpd="auto"
2508 fi
2509 # end --enable-slurpd
2510
2511 # Check whether --with-xxliboptions or --without-xxliboptions was given.
2512 if test "${with_xxliboptions+set}" = set; then
2513   withval="$with_xxliboptions"
2514   :
2515 fi
2516
2517 # Check whether --enable-static or --disable-static was given.
2518 if test "${enable_static+set}" = set; then
2519   enableval="$enable_static"
2520   p=${PACKAGE-default}
2521 case $enableval in
2522 yes) enable_static=yes ;;
2523 no) enable_static=no ;;
2524 *)
2525   enable_static=no
2526   # Look at the argument we got.  We use all the common list separators.
2527   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2528   for pkg in $enableval; do
2529     if test "X$pkg" = "X$p"; then
2530       enable_static=yes
2531     fi
2532   done
2533   IFS="$ac_save_ifs"
2534   ;;
2535 esac
2536 else
2537   enable_static=yes
2538 fi
2539
2540 # Check whether --enable-shared or --disable-shared was given.
2541 if test "${enable_shared+set}" = set; then
2542   enableval="$enable_shared"
2543   p=${PACKAGE-default}
2544 case $enableval in
2545 yes) enable_shared=yes ;;
2546 no) enable_shared=no ;;
2547 *)
2548   enable_shared=no
2549   # Look at the argument we got.  We use all the common list separators.
2550   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2551   for pkg in $enableval; do
2552     if test "X$pkg" = "X$p"; then
2553       enable_shared=yes
2554     fi
2555   done
2556   IFS="$ac_save_ifs"
2557   ;;
2558 esac
2559 else
2560   enable_shared=yes
2561 fi
2562
2563
2564
2565 # Activate any backends that were not explicitly enabled.
2566 # Note that back_bdb defaults to "yes" so this loop won't touch it.
2567 if test $ol_enable_backends != no ; then
2568         for i in $Backends; do
2569                 eval "ol_tmp=\$ol_enable_$i"
2570                 if test $ol_tmp = no ; then
2571                         eval "ol_enable_$i=$ol_enable_backends"
2572                 fi
2573         done
2574 fi
2575 # Activate the overlays
2576 if test $ol_enable_overlays != no ; then
2577         for i in $Overlays; do
2578                 eval "ol_tmp=\$ol_enable_$i"
2579                 if test $ol_tmp = no ; then
2580                         eval "ol_enable_$i=$ol_enable_overlays"
2581                 fi
2582         done
2583 fi
2584
2585 # validate options
2586 if test $ol_enable_slapd = no ; then
2587                 if test $ol_enable_slapi = yes ; then
2588                 echo "configure: warning: slapd disabled, ignoring --enable-slapi argument" 1>&2
2589         fi
2590         if test $ol_enable_backends != no ; then
2591                 echo "configure: warning: slapd disabled, ignoring --enable-backends argument" 1>&2
2592         fi
2593         for i in $Backends; do
2594                 eval "ol_tmp=\$ol_enable_$i"
2595                 if test $ol_tmp != no ; then
2596                         echo "configure: warning: slapd disabled, ignoring --enable-$i argument" 1>&2
2597                         eval "ol_enable_$i=no"
2598                 fi
2599         done
2600         if test $ol_enable_modules = yes ; then
2601                 echo "configure: warning: slapd disabled, ignoring --enable-modules argument" 1>&2
2602         fi
2603         if test $ol_enable_multimaster = yes ; then
2604                 echo "configure: warning: slapd disabled, ignoring --enable-multimaster argument" 1>&2
2605         fi
2606         if test $ol_enable_wrappers = yes ; then
2607                 echo "configure: warning: slapd disabled, ignoring --enable-wrappers argument" 1>&2
2608         fi
2609         if test $ol_enable_rlookups = yes ; then
2610                 echo "configure: warning: slapd disabled, ignoring --enable-rlookups argument" 1>&2
2611         fi
2612         if test $ol_enable_aci = yes ; then
2613                 echo "configure: warning: slapd disabled, ignoring --enable-aci argument" 1>&2
2614         fi
2615         if test $ol_with_ldbm_api != auto ; then
2616                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-api argument" 1>&2
2617         fi
2618         if test $ol_with_ldbm_type != auto ; then
2619                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-type argument" 1>&2
2620         fi
2621         if test $ol_enable_slurpd = yes ; then
2622                 { echo "configure: error: slurpd requires slapd" 1>&2; exit 1; }
2623         fi
2624         if test $ol_enable_rewrite = yes ; then
2625                 echo "configure: warning: slapd disabled, ignoring --enable-rewrite argument" 1>&2
2626         fi
2627                 if test $ol_enable_overlays != no ; then
2628                 echo "configure: warning: slapd disabled, ignoring --enable-overlays argument" 1>&2
2629         fi
2630         for i in $Overlays; do
2631                 eval "ol_tmp=\$ol_enable_$i"
2632                 if test $ol_tmp != no ; then
2633                         echo "configure: warning: slapd disabled, ignoring --enable-$i argument" 1>&2
2634                         eval "ol_enable_$i=no"
2635                 fi
2636         done
2637
2638         # force settings to no
2639         ol_enable_slapi=no
2640
2641         ol_enable_backends=no
2642         ol_enable_overlays=no
2643         ol_enable_modules=no
2644         ol_enable_multimaster=no
2645         ol_enable_rlookups=no
2646         ol_enable_aci=no
2647         ol_enable_wrappers=no
2648
2649         ol_with_ldbm_api=no
2650         ol_with_ldbm_type=no
2651
2652         ol_enable_slurpd=no
2653
2654         ol_enable_rewrite=no
2655
2656 elif test $ol_enable_ldbm = no ; then
2657         
2658         if test $ol_with_ldbm_api != auto ; then
2659                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-api argument" 1>&2
2660         fi
2661
2662         if test $ol_with_ldbm_type != auto ; then
2663                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-type argument" 1>&2
2664         fi
2665
2666         if test $ol_enable_modules != yes -a \
2667                 $ol_enable_bdb = no -a \
2668                 $ol_enable_dnssrv = no -a \
2669                 $ol_enable_hdb = no -a \
2670                 $ol_enable_ldap = no -a \
2671                 $ol_enable_meta = no -a \
2672                 $ol_enable_monitor = no -a \
2673                 $ol_enable_null = no -a \
2674                 $ol_enable_passwd = no -a \
2675                 $ol_enable_perl = no -a \
2676                 $ol_enable_relay = no -a \
2677                 $ol_enable_shell = no -a \
2678                 $ol_enable_sql = no ; then
2679
2680                 if test $ol_enable_slapd = yes ; then
2681                         { echo "configure: error: slapd requires a backend" 1>&2; exit 1; }
2682                 else
2683                         echo "configure: warning: skipping slapd, no backend specified" 1>&2
2684                         ol_enable_slapd=no
2685                 fi
2686         fi
2687
2688         ol_with_ldbm_api=no
2689         ol_with_ldbm_type=no
2690
2691         if test $ol_enable_bdb != no -o $ol_enable_hdb != no; then
2692                 ol_with_ldbm_api=berkeley
2693         fi
2694
2695 else
2696                 if test $ol_with_ldbm_api = gdbm -a \
2697                 $ol_with_ldbm_type = btree ; then
2698                 { echo "configure: error: GDBM only supports LDBM type hash" 1>&2; exit 1; }
2699         fi
2700         if test $ol_with_ldbm_api = mdbm -a \
2701                 $ol_with_ldbm_type = btree ; then
2702                 { echo "configure: error: MDBM only supports LDBM type hash" 1>&2; exit 1; }
2703         fi
2704         if test $ol_with_ldbm_api = ndbm -a \
2705                 $ol_with_ldbm_type = btree ; then
2706                 { echo "configure: error: NDBM only supports LDBM type hash" 1>&2; exit 1; }
2707         fi
2708
2709         if test $ol_enable_bdb != no -o $ol_enable_hdb != no ; then
2710                 if test $ol_with_ldbm_api = auto ; then
2711                         ol_with_ldbm_api=berkeley
2712                 elif test $ol_with_ldbm_api != berkeley ; then
2713                         { echo "configure: error: LDBM API not compatible with BDB/HDB" 1>&2; exit 1; }
2714                 fi
2715         fi
2716 fi
2717
2718 if test $ol_enable_chain != no -a $ol_enable_ldap = no ; then
2719         { echo "configure: error: --enable-chain requires --enable-ldap" 1>&2; exit 1; }
2720 fi
2721
2722 if test $ol_enable_meta = yes -a $ol_enable_ldap = no ; then
2723         { echo "configure: error: --enable-meta requires --enable-ldap" 1>&2; exit 1; }
2724 fi
2725
2726 if test $ol_enable_slurpd = yes ; then
2727                 if test $ol_with_threads = no ; then
2728                 { echo "configure: error: slurpd requires threads" 1>&2; exit 1; }
2729         fi
2730 fi
2731
2732 if test $ol_enable_lmpasswd = yes ; then
2733         if test $ol_with_tls = no ; then
2734                 { echo "configure: error: LAN Manager passwords require OpenSSL" 1>&2; exit 1; }
2735         fi
2736 fi
2737
2738 if test $ol_enable_kbind = yes ; then
2739         if test $ol_with_kerberos = no ; then
2740                 { echo "configure: error: options require --with-kerberos" 1>&2; exit 1; }
2741         elif test $ol_with_kerberos = auto ; then
2742                 ol_with_kerberos=yes
2743         fi
2744
2745 elif test $ol_enable_kbind = no ; then
2746         if test $ol_with_kerberos = auto ; then
2747                 ol_with_kerberos=no
2748         elif test $ol_with_kerberos != no ; then
2749                 echo "configure: warning: Kerberos detection enabled unnecessarily" 1>&2;
2750                 ol_with_kerberos=no
2751         fi
2752 fi
2753
2754 if test $ol_enable_spasswd = yes ; then
2755         if test $ol_with_cyrus_sasl = no ; then
2756                 { echo "configure: error: options require --with-cyrus-sasl" 1>&2; exit 1; }
2757         fi
2758         ol_with_cyrus_sasl=yes
2759 fi
2760
2761 echo "$ac_t""done" 1>&6
2762
2763 LDAP_LIBS=
2764 LDBM_LIBS=
2765 LTHREAD_LIBS=
2766 LUTIL_LIBS=
2767
2768 SLAPD_LIBS=
2769 SLURPD_LIBS=
2770
2771 BUILD_SLAPD=no
2772 BUILD_SLURPD=no
2773
2774 BUILD_THREAD=no
2775
2776 BUILD_SLAPI=no
2777 SLAPD_SLAPI_DEPEND=
2778
2779 BUILD_BDB=no
2780 BUILD_DNSSRV=no
2781 BUILD_HDB=no
2782 BUILD_LDAP=no
2783 BUILD_LDBM=no
2784 BUILD_META=no
2785 BUILD_MONITOR=no
2786 BUILD_NULL=no
2787 BUILD_PASSWD=no
2788 BUILD_PERL=no
2789 BUILD_RELAY=no
2790 BUILD_SHELL=no
2791 BUILD_SQL=no
2792
2793 BUILD_CHAIN=no
2794 BUILD_DENYOP=no
2795 BUILD_DYNGROUP=no
2796 BUILD_LASTMOD=no
2797 BUILD_PPOLICY=no
2798 BUILD_PROXYCACHE=no
2799 BUILD_REFINT=no
2800 BUILD_RWM=no
2801 BUILD_UNIQUE=no
2802
2803 SLAPD_DYNAMIC_OVERLAYS=
2804
2805 SLAPD_MODULES_LDFLAGS=
2806 SLAPD_MODULES_CPPFLAGS=
2807
2808 SLAPD_STATIC_BACKENDS=
2809 SLAPD_DYNAMIC_BACKENDS=
2810
2811 SLAPD_PERL_LDFLAGS=
2812 MOD_PERL_LDFLAGS=
2813 PERL_CPPFLAGS=
2814
2815 SLAPD_SQL_LDFLAGS=
2816 SLAPD_SQL_LIBS=
2817 SLAPD_SQL_INCLUDES=
2818
2819 KRB4_LIBS=
2820 KRB5_LIBS=
2821 SASL_LIBS=
2822 TLS_LIBS=
2823 MODULES_LIBS=
2824 SLAPI_LIBS=
2825 LIBSLAPI=
2826 LIBSLAPITOOLS=
2827 AUTH_LIBS=
2828
2829 SLAPD_SLP_LIBS=
2830 SLAPD_GMP_LIBS=
2831
2832
2833 cat >> confdefs.h <<\EOF
2834 #define HAVE_MKVERSION 1
2835 EOF
2836
2837
2838
2839
2840 ol_aix_threads=no
2841 case "$target" in
2842 *-*-aix*)       if test -z "$CC" ; then
2843                 case "$ol_with_threads" in
2844                 auto | yes |  posix) ol_aix_threads=yes ;;
2845                 esac
2846         fi
2847 ;;
2848 esac
2849
2850 if test $ol_aix_threads = yes ; then
2851         if test -z "${CC}" ; then
2852                 for ac_prog in cc_r xlc_r cc
2853 do
2854 # Extract the first word of "$ac_prog", so it can be a program name with args.
2855 set dummy $ac_prog; ac_word=$2
2856 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2857 echo "configure:2856: checking for $ac_word" >&5
2858 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2859   echo $ac_n "(cached) $ac_c" 1>&6
2860 else
2861   if test -n "$CC"; then
2862   ac_cv_prog_CC="$CC" # Let the user override the test.
2863 else
2864   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2865   ac_dummy="$PATH"
2866   for ac_dir in $ac_dummy; do
2867     test -z "$ac_dir" && ac_dir=.
2868     if test -f $ac_dir/$ac_word; then
2869       ac_cv_prog_CC="$ac_prog"
2870       break
2871     fi
2872   done
2873   IFS="$ac_save_ifs"
2874 fi
2875 fi
2876 CC="$ac_cv_prog_CC"
2877 if test -n "$CC"; then
2878   echo "$ac_t""$CC" 1>&6
2879 else
2880   echo "$ac_t""no" 1>&6
2881 fi
2882
2883 test -n "$CC" && break
2884 done
2885
2886
2887                 if test "$CC" = cc ; then
2888                                                 if test $ol_with_threads != auto ; then
2889                                 { echo "configure: error: --with-threads requires cc_r (or other suitable compiler) on AIX" 1>&2; exit 1; }
2890                         else
2891                                 echo "configure: warning: disabling threads, no cc_r on AIX" 1>&2
2892                         fi
2893                         ol_with_threads=no
2894                 fi
2895         fi
2896
2897         if test "${CC}" = "cc_r" -o "${CC}" = "xlc_r" ; then
2898                 ol_with_threads=posix
2899                 ol_cv_pthread_create=yes
2900         fi
2901 fi
2902
2903 if test -z "${CC}"; then
2904         for ac_prog in cc gcc
2905 do
2906 # Extract the first word of "$ac_prog", so it can be a program name with args.
2907 set dummy $ac_prog; ac_word=$2
2908 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2909 echo "configure:2908: checking for $ac_word" >&5
2910 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2911   echo $ac_n "(cached) $ac_c" 1>&6
2912 else
2913   if test -n "$CC"; then
2914   ac_cv_prog_CC="$CC" # Let the user override the test.
2915 else
2916   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2917   ac_dummy="$PATH"
2918   for ac_dir in $ac_dummy; do
2919     test -z "$ac_dir" && ac_dir=.
2920     if test -f $ac_dir/$ac_word; then
2921       ac_cv_prog_CC="$ac_prog"
2922       break
2923     fi
2924   done
2925   IFS="$ac_save_ifs"
2926 fi
2927 fi
2928 CC="$ac_cv_prog_CC"
2929 if test -n "$CC"; then
2930   echo "$ac_t""$CC" 1>&6
2931 else
2932   echo "$ac_t""no" 1>&6
2933 fi
2934
2935 test -n "$CC" && break
2936 done
2937 test -n "$CC" || CC="missing"
2938
2939
2940         if test "${CC}" = "missing" ; then
2941                 { echo "configure: error: Unable to locate cc(1) or suitable replacement.  Check PATH or set CC." 1>&2; exit 1; }
2942         fi
2943 fi
2944
2945 if test -z "${AR}"; then
2946         for ac_prog in ar gar
2947 do
2948 # Extract the first word of "$ac_prog", so it can be a program name with args.
2949 set dummy $ac_prog; ac_word=$2
2950 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2951 echo "configure:2950: checking for $ac_word" >&5
2952 if eval "test \"\${ac_cv_prog_AR+set}\" = set"; then
2953   echo $ac_n "(cached) $ac_c" 1>&6
2954 else
2955   if test -n "$AR"; then
2956   ac_cv_prog_AR="$AR" # Let the user override the test.
2957 else
2958   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2959   ac_dummy="$PATH"
2960   for ac_dir in $ac_dummy; do
2961     test -z "$ac_dir" && ac_dir=.
2962     if test -f $ac_dir/$ac_word; then
2963       ac_cv_prog_AR="$ac_prog"
2964       break
2965     fi
2966   done
2967   IFS="$ac_save_ifs"
2968 fi
2969 fi
2970 AR="$ac_cv_prog_AR"
2971 if test -n "$AR"; then
2972   echo "$ac_t""$AR" 1>&6
2973 else
2974   echo "$ac_t""no" 1>&6
2975 fi
2976
2977 test -n "$AR" && break
2978 done
2979 test -n "$AR" || AR="missing"
2980
2981
2982         if test "${AR}" = "missing" ; then
2983                 { echo "configure: error: Unable to locate ar(1) or suitable replacement.  Check PATH or set AR." 1>&2; exit 1; }
2984         fi
2985 fi
2986
2987
2988
2989 # Find the correct PATH separator.  Usually this is `:', but
2990 # DJGPP uses `;' like DOS.
2991 if test "X${PATH_SEPARATOR+set}" != Xset; then
2992   UNAME=${UNAME-`uname 2>/dev/null`}
2993   case X$UNAME in
2994     *-DOS) lt_cv_sys_path_separator=';' ;;
2995     *)     lt_cv_sys_path_separator=':' ;;
2996   esac
2997   PATH_SEPARATOR=$lt_cv_sys_path_separator
2998 fi
2999
3000 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
3001 echo "configure:3000: checking for Cygwin environment" >&5
3002 if eval "test \"\${ac_cv_cygwin+set}\" = set"; then
3003   echo $ac_n "(cached) $ac_c" 1>&6
3004 else
3005   cat > conftest.$ac_ext <<EOF
3006 #line 3005 "configure"
3007 #include "confdefs.h"
3008
3009 int main() {
3010
3011 #ifndef __CYGWIN__
3012 #define __CYGWIN__ __CYGWIN32__
3013 #endif
3014 return __CYGWIN__;
3015 ; return 0; }
3016 EOF
3017 if { (eval echo configure:3016: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3018   rm -rf conftest*
3019   ac_cv_cygwin=yes
3020 else
3021   echo "configure: failed program was:" >&5
3022   cat conftest.$ac_ext >&5
3023   rm -rf conftest*
3024   ac_cv_cygwin=no
3025 fi
3026 rm -f conftest*
3027 fi
3028
3029 echo "$ac_t""$ac_cv_cygwin" 1>&6
3030 CYGWIN=
3031 test "$ac_cv_cygwin" = yes && CYGWIN=yes
3032 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
3033 echo "configure:3032: checking for mingw32 environment" >&5
3034 if eval "test \"\${ac_cv_mingw32+set}\" = set"; then
3035   echo $ac_n "(cached) $ac_c" 1>&6
3036 else
3037   cat > conftest.$ac_ext <<EOF
3038 #line 3037 "configure"
3039 #include "confdefs.h"
3040
3041 int main() {
3042 return __MINGW32__;
3043 ; return 0; }
3044 EOF
3045 if { (eval echo configure:3044: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3046   rm -rf conftest*
3047   ac_cv_mingw32=yes
3048 else
3049   echo "configure: failed program was:" >&5
3050   cat conftest.$ac_ext >&5
3051   rm -rf conftest*
3052   ac_cv_mingw32=no
3053 fi
3054 rm -f conftest*
3055 fi
3056
3057 echo "$ac_t""$ac_cv_mingw32" 1>&6
3058 MINGW32=
3059 test "$ac_cv_mingw32" = yes && MINGW32=yes
3060 echo $ac_n "checking for EMX OS/2 environment""... $ac_c" 1>&6
3061 echo "configure:3060: checking for EMX OS/2 environment" >&5
3062 if eval "test \"\${ac_cv_emxos2+set}\" = set"; then
3063   echo $ac_n "(cached) $ac_c" 1>&6
3064 else
3065   cat > conftest.$ac_ext <<EOF
3066 #line 3065 "configure"
3067 #include "confdefs.h"
3068
3069 int main() {
3070 return __EMX__;
3071 ; return 0; }
3072 EOF
3073 if { (eval echo configure:3072: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3074   rm -rf conftest*
3075   ac_cv_emxos2=yes
3076 else
3077   echo "configure: failed program was:" >&5
3078   cat conftest.$ac_ext >&5
3079   rm -rf conftest*
3080   ac_cv_emxos2=no
3081 fi
3082 rm -f conftest*
3083 fi
3084
3085 echo "$ac_t""$ac_cv_emxos2" 1>&6
3086 EMXOS2=
3087 test "$ac_cv_emxos2" = yes && EMXOS2=yes
3088 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
3089 echo "configure:3088: checking how to run the C preprocessor" >&5
3090 # On Suns, sometimes $CPP names a directory.
3091 if test -n "$CPP" && test -d "$CPP"; then
3092   CPP=
3093 fi
3094 if test -z "$CPP"; then
3095 if eval "test \"\${ac_cv_prog_CPP+set}\" = set"; then
3096   echo $ac_n "(cached) $ac_c" 1>&6
3097 else
3098     # This must be in double quotes, not single quotes, because CPP may get
3099   # substituted into the Makefile and "${CC-cc}" will confuse make.
3100   CPP="${CC-cc} -E"
3101   # On the NeXT, cc -E runs the code through the compiler's parser,
3102   # not just through cpp.
3103   cat > conftest.$ac_ext <<EOF
3104 #line 3103 "configure"
3105 #include "confdefs.h"
3106 #include <assert.h>
3107 Syntax Error
3108 EOF
3109 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3110 { (eval echo configure:3109: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3111 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3112 if test -z "$ac_err"; then
3113   :
3114 else
3115   echo "$ac_err" >&5
3116   echo "configure: failed program was:" >&5
3117   cat conftest.$ac_ext >&5
3118   rm -rf conftest*
3119   CPP="${CC-cc} -E -traditional-cpp"
3120   cat > conftest.$ac_ext <<EOF
3121 #line 3120 "configure"
3122 #include "confdefs.h"
3123 #include <assert.h>
3124 Syntax Error
3125 EOF
3126 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3127 { (eval echo configure:3126: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3128 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3129 if test -z "$ac_err"; then
3130   :
3131 else
3132   echo "$ac_err" >&5
3133   echo "configure: failed program was:" >&5
3134   cat conftest.$ac_ext >&5
3135   rm -rf conftest*
3136   CPP="${CC-cc} -nologo -E"
3137   cat > conftest.$ac_ext <<EOF
3138 #line 3137 "configure"
3139 #include "confdefs.h"
3140 #include <assert.h>
3141 Syntax Error
3142 EOF
3143 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3144 { (eval echo configure:3143: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3145 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3146 if test -z "$ac_err"; then
3147   :
3148 else
3149   echo "$ac_err" >&5
3150   echo "configure: failed program was:" >&5
3151   cat conftest.$ac_ext >&5
3152   rm -rf conftest*
3153   CPP=/lib/cpp
3154 fi
3155 rm -f conftest*
3156 fi
3157 rm -f conftest*
3158 fi
3159 rm -f conftest*
3160   ac_cv_prog_CPP="$CPP"
3161 fi
3162   CPP="$ac_cv_prog_CPP"
3163 else
3164   ac_cv_prog_CPP="$CPP"
3165 fi
3166 echo "$ac_t""$CPP" 1>&6
3167
3168 # Check whether --enable-fast-install or --disable-fast-install was given.
3169 if test "${enable_fast_install+set}" = set; then
3170   enableval="$enable_fast_install"
3171   p=${PACKAGE-default}
3172 case $enableval in
3173 yes) enable_fast_install=yes ;;
3174 no) enable_fast_install=no ;;
3175 *)
3176   enable_fast_install=no
3177   # Look at the argument we got.  We use all the common list separators.
3178   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
3179   for pkg in $enableval; do
3180     if test "X$pkg" = "X$p"; then
3181       enable_fast_install=yes
3182     fi
3183   done
3184   IFS="$ac_save_ifs"
3185   ;;
3186 esac
3187 else
3188   enable_fast_install=yes
3189 fi
3190
3191 # Extract the first word of "gcc", so it can be a program name with args.
3192 set dummy gcc; ac_word=$2
3193 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3194 echo "configure:3193: checking for $ac_word" >&5
3195 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3196   echo $ac_n "(cached) $ac_c" 1>&6
3197 else
3198   if test -n "$CC"; then
3199   ac_cv_prog_CC="$CC" # Let the user override the test.
3200 else
3201   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3202   ac_dummy="$PATH"
3203   for ac_dir in $ac_dummy; do
3204     test -z "$ac_dir" && ac_dir=.
3205     if test -f $ac_dir/$ac_word; then
3206       ac_cv_prog_CC="gcc"
3207       break
3208     fi
3209   done
3210   IFS="$ac_save_ifs"
3211 fi
3212 fi
3213 CC="$ac_cv_prog_CC"
3214 if test -n "$CC"; then
3215   echo "$ac_t""$CC" 1>&6
3216 else
3217   echo "$ac_t""no" 1>&6
3218 fi
3219
3220 if test -z "$CC"; then
3221   # Extract the first word of "cc", so it can be a program name with args.
3222 set dummy cc; ac_word=$2
3223 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3224 echo "configure:3223: checking for $ac_word" >&5
3225 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3226   echo $ac_n "(cached) $ac_c" 1>&6
3227 else
3228   if test -n "$CC"; then
3229   ac_cv_prog_CC="$CC" # Let the user override the test.
3230 else
3231   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3232   ac_prog_rejected=no
3233   ac_dummy="$PATH"
3234   for ac_dir in $ac_dummy; do
3235     test -z "$ac_dir" && ac_dir=.
3236     if test -f $ac_dir/$ac_word; then
3237       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
3238         ac_prog_rejected=yes
3239         continue
3240       fi
3241       ac_cv_prog_CC="cc"
3242       break
3243     fi
3244   done
3245   IFS="$ac_save_ifs"
3246 if test $ac_prog_rejected = yes; then
3247   # We found a bogon in the path, so make sure we never use it.
3248   set dummy $ac_cv_prog_CC
3249   shift
3250   if test $# -gt 0; then
3251     # We chose a different compiler from the bogus one.
3252     # However, it has the same basename, so the bogon will be chosen
3253     # first if we set CC to just the basename; use the full file name.
3254     shift
3255     set dummy "$ac_dir/$ac_word" "$@"
3256     shift
3257     ac_cv_prog_CC="$@"
3258   fi
3259 fi
3260 fi
3261 fi
3262 CC="$ac_cv_prog_CC"
3263 if test -n "$CC"; then
3264   echo "$ac_t""$CC" 1>&6
3265 else
3266   echo "$ac_t""no" 1>&6
3267 fi
3268
3269   if test -z "$CC"; then
3270     case "`uname -s`" in
3271     *win32* | *WIN32* | *CYGWIN*)
3272       # Extract the first word of "cl", so it can be a program name with args.
3273 set dummy cl; ac_word=$2
3274 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3275 echo "configure:3274: checking for $ac_word" >&5
3276 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3277   echo $ac_n "(cached) $ac_c" 1>&6
3278 else
3279   if test -n "$CC"; then
3280   ac_cv_prog_CC="$CC" # Let the user override the test.
3281 else
3282   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3283   ac_dummy="$PATH"
3284   for ac_dir in $ac_dummy; do
3285     test -z "$ac_dir" && ac_dir=.
3286     if test -f $ac_dir/$ac_word; then
3287       ac_cv_prog_CC="cl"
3288       break
3289     fi
3290   done
3291   IFS="$ac_save_ifs"
3292 fi
3293 fi
3294 CC="$ac_cv_prog_CC"
3295 if test -n "$CC"; then
3296   echo "$ac_t""$CC" 1>&6
3297 else
3298   echo "$ac_t""no" 1>&6
3299 fi
3300  ;;
3301     esac
3302   fi
3303   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
3304 fi
3305
3306 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works""... $ac_c" 1>&6
3307 echo "configure:3306: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works" >&5
3308
3309 ac_ext=c
3310 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
3311 ac_cpp='$CPP $CPPFLAGS'
3312 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
3313 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
3314 cross_compiling=$ac_cv_prog_cc_cross
3315
3316 cat > conftest.$ac_ext << EOF
3317
3318 #line 3317 "configure"
3319 #include "confdefs.h"
3320
3321 main(){return(0);}
3322 EOF
3323 if { (eval echo configure:3322: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3324   ac_cv_prog_cc_works=yes
3325   # If we can't run a trivial program, we are probably using a cross compiler.
3326   if (./conftest; exit) 2>/dev/null; then
3327     ac_cv_prog_cc_cross=no
3328   else
3329     ac_cv_prog_cc_cross=yes
3330   fi
3331 else
3332   echo "configure: failed program was:" >&5
3333   cat conftest.$ac_ext >&5
3334   ac_cv_prog_cc_works=no
3335 fi
3336 rm -fr conftest*
3337 ac_ext=c
3338 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
3339 ac_cpp='$CPP $CPPFLAGS'
3340 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
3341 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
3342 cross_compiling=$ac_cv_prog_cc_cross
3343
3344 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
3345 if test $ac_cv_prog_cc_works = no; then
3346   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
3347 fi
3348 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
3349 echo "configure:3348: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler" >&5
3350 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
3351 cross_compiling=$ac_cv_prog_cc_cross
3352
3353 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
3354 echo "configure:3353: checking whether we are using GNU C" >&5
3355 if eval "test \"\${ac_cv_prog_gcc+set}\" = set"; then
3356   echo $ac_n "(cached) $ac_c" 1>&6
3357 else
3358   cat > conftest.c <<EOF
3359 #ifdef __GNUC__
3360   yes;
3361 #endif
3362 EOF
3363 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:3362: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
3364   ac_cv_prog_gcc=yes
3365 else
3366   ac_cv_prog_gcc=no
3367 fi
3368 fi
3369
3370 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
3371
3372 if test $ac_cv_prog_gcc = yes; then
3373   GCC=yes
3374 else
3375   GCC=
3376 fi
3377
3378 ac_test_CFLAGS="${CFLAGS+set}"
3379 ac_save_CFLAGS="$CFLAGS"
3380 CFLAGS=
3381 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
3382 echo "configure:3381: checking whether ${CC-cc} accepts -g" >&5
3383 if eval "test \"\${ac_cv_prog_cc_g+set}\" = set"; then
3384   echo $ac_n "(cached) $ac_c" 1>&6
3385 else
3386   echo 'void f(){}' > conftest.c
3387 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
3388   ac_cv_prog_cc_g=yes
3389 else
3390   ac_cv_prog_cc_g=no
3391 fi
3392 rm -f conftest*
3393
3394 fi
3395
3396 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
3397 if test "$ac_test_CFLAGS" = set; then
3398   CFLAGS="$ac_save_CFLAGS"
3399 elif test $ac_cv_prog_cc_g = yes; then
3400   if test "$GCC" = yes; then
3401     CFLAGS="-g -O2"
3402   else
3403     CFLAGS="-g"
3404   fi
3405 else
3406   if test "$GCC" = yes; then
3407     CFLAGS="-O2"
3408   else
3409     CFLAGS=
3410   fi
3411 fi
3412
3413 # Check whether --with-gnu-ld or --without-gnu-ld was given.
3414 if test "${with_gnu_ld+set}" = set; then
3415   withval="$with_gnu_ld"
3416   test "$withval" = no || with_gnu_ld=yes
3417 else
3418   with_gnu_ld=no
3419 fi
3420
3421 ac_prog=ld
3422 if test "$GCC" = yes; then
3423   # Check if gcc -print-prog-name=ld gives a path.
3424   echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
3425 echo "configure:3424: checking for ld used by GCC" >&5
3426   case $host in
3427   *-*-mingw*)
3428     # gcc leaves a trailing carriage return which upsets mingw
3429     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
3430   *)
3431     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
3432   esac
3433   case $ac_prog in
3434     # Accept absolute paths.
3435     [\\/]* | [A-Za-z]:[\\/]*)
3436       re_direlt='/[^/][^/]*/\.\./'
3437       # Canonicalize the path of ld
3438       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
3439       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
3440         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
3441       done
3442       test -z "$LD" && LD="$ac_prog"
3443       ;;
3444   "")
3445     # If it fails, then pretend we aren't using GCC.
3446     ac_prog=ld
3447     ;;
3448   *)
3449     # If it is relative, then search for the first ld in PATH.
3450     with_gnu_ld=unknown
3451     ;;
3452   esac
3453 elif test "$with_gnu_ld" = yes; then
3454   echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
3455 echo "configure:3454: checking for GNU ld" >&5
3456 else
3457   echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
3458 echo "configure:3457: checking for non-GNU ld" >&5
3459 fi
3460 if eval "test \"\${lt_cv_path_LD+set}\" = set"; then
3461   echo $ac_n "(cached) $ac_c" 1>&6
3462 else
3463   if test -z "$LD"; then
3464   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3465   for ac_dir in $PATH; do
3466     test -z "$ac_dir" && ac_dir=.
3467     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
3468       lt_cv_path_LD="$ac_dir/$ac_prog"
3469       # Check to see if the program is GNU ld.  I'd rather use --version,
3470       # but apparently some GNU ld's only accept -v.
3471       # Break only if it was the GNU/non-GNU ld that we prefer.
3472       if "$lt_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
3473         test "$with_gnu_ld" != no && break
3474       else
3475         test "$with_gnu_ld" != yes && break
3476       fi
3477     fi
3478   done
3479   IFS="$ac_save_ifs"
3480 else
3481   lt_cv_path_LD="$LD" # Let the user override the test with a path.
3482 fi
3483 fi
3484
3485 LD="$lt_cv_path_LD"
3486 if test -n "$LD"; then
3487   echo "$ac_t""$LD" 1>&6
3488 else
3489   echo "$ac_t""no" 1>&6
3490 fi
3491 test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
3492 echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
3493 echo "configure:3492: checking if the linker ($LD) is GNU ld" >&5
3494 if eval "test \"\${lt_cv_prog_gnu_ld+set}\" = set"; then
3495   echo $ac_n "(cached) $ac_c" 1>&6
3496 else
3497   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
3498 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
3499   lt_cv_prog_gnu_ld=yes
3500 else
3501   lt_cv_prog_gnu_ld=no
3502 fi
3503 fi
3504
3505 echo "$ac_t""$lt_cv_prog_gnu_ld" 1>&6
3506 with_gnu_ld=$lt_cv_prog_gnu_ld
3507
3508
3509 echo $ac_n "checking for $LD option to reload object files""... $ac_c" 1>&6
3510 echo "configure:3509: checking for $LD option to reload object files" >&5
3511 if eval "test \"\${lt_cv_ld_reload_flag+set}\" = set"; then
3512   echo $ac_n "(cached) $ac_c" 1>&6
3513 else
3514   lt_cv_ld_reload_flag='-r'
3515 fi
3516
3517 echo "$ac_t""$lt_cv_ld_reload_flag" 1>&6
3518 reload_flag=$lt_cv_ld_reload_flag
3519 test -n "$reload_flag" && reload_flag=" $reload_flag"
3520
3521 echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
3522 echo "configure:3521: checking for BSD-compatible nm" >&5
3523 if eval "test \"\${lt_cv_path_NM+set}\" = set"; then
3524   echo $ac_n "(cached) $ac_c" 1>&6
3525 else
3526   if test -n "$NM"; then
3527   # Let the user override the test.
3528   lt_cv_path_NM="$NM"
3529 else
3530   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3531   for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
3532     test -z "$ac_dir" && ac_dir=.
3533     tmp_nm=$ac_dir/${ac_tool_prefix}nm
3534     if test -f $tmp_nm || test -f $tmp_nm$ac_exeext ; then
3535       # Check to see if the nm accepts a BSD-compat flag.
3536       # Adding the `sed 1q' prevents false positives on HP-UX, which says:
3537       #   nm: unknown option "B" ignored
3538       # Tru64's nm complains that /dev/null is an invalid object file
3539       if ($tmp_nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then
3540         lt_cv_path_NM="$tmp_nm -B"
3541         break
3542       elif ($tmp_nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
3543         lt_cv_path_NM="$tmp_nm -p"
3544         break
3545       else
3546         lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
3547         continue # so that we can try to find one that supports BSD flags
3548       fi
3549     fi
3550   done
3551   IFS="$ac_save_ifs"
3552   test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
3553 fi
3554 fi
3555
3556 NM="$lt_cv_path_NM"
3557 echo "$ac_t""$NM" 1>&6
3558
3559 echo $ac_n "checking for a sed that does not truncate output""... $ac_c" 1>&6
3560 echo "configure:3559: checking for a sed that does not truncate output" >&5
3561 if eval "test \"\${lt_cv_path_SED+set}\" = set"; then
3562   echo $ac_n "(cached) $ac_c" 1>&6
3563 else
3564   # Loop through the user's path and test for sed and gsed.
3565 # Then use that list of sed's as ones to test for truncation.
3566 as_executable_p="test -f"
3567 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3568 for as_dir in $PATH
3569 do
3570   IFS=$as_save_IFS
3571   test -z "$as_dir" && as_dir=.
3572   for ac_prog in sed gsed; do
3573     for ac_exec_ext in '' $ac_executable_extensions; do
3574       if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
3575         _sed_list="$_sed_list $as_dir/$ac_prog$ac_exec_ext"
3576       fi
3577     done
3578   done
3579 done
3580
3581   # Create a temporary directory, and hook for its removal unless debugging.
3582 $debug ||
3583 {
3584   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
3585   trap '{ (exit 1); exit 1; }' 1 2 13 15
3586 }
3587
3588 # Create a (secure) tmp directory for tmp files.
3589 : ${TMPDIR=/tmp}
3590 {
3591   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/sedXXXXXX") 2>/dev/null` &&
3592   test -n "$tmp" && test -d "$tmp"
3593 }  ||
3594 {
3595   tmp=$TMPDIR/sed$$-$RANDOM
3596   (umask 077 && mkdir $tmp)
3597 } ||
3598 {
3599    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
3600    { (exit 1); exit 1; }
3601 }
3602   _max=0
3603   _count=0
3604   # Add /usr/xpg4/bin/sed as it is typically found on Solaris
3605   # along with /bin/sed that truncates output.
3606   for _sed in $_sed_list /usr/xpg4/bin/sed; do
3607     test ! -f ${_sed} && break
3608     cat /dev/null > "$tmp/sed.in"
3609     _count=0
3610     echo ${ECHO_N-$ac_n} "0123456789${ECHO_C-$ac_c}" >"$tmp/sed.in"
3611     # Check for GNU sed and select it if it is found.
3612     if "${_sed}" --version 2>&1 < /dev/null | egrep '(GNU)' > /dev/null; then
3613       lt_cv_path_SED=${_sed}
3614       break
3615     fi
3616     while true; do
3617       cat "$tmp/sed.in" "$tmp/sed.in" >"$tmp/sed.tmp"
3618       mv "$tmp/sed.tmp" "$tmp/sed.in"
3619       cp "$tmp/sed.in" "$tmp/sed.nl"
3620       echo >>"$tmp/sed.nl"
3621       ${_sed} -e 's/a$//' < "$tmp/sed.nl" >"$tmp/sed.out" || break
3622       cmp -s "$tmp/sed.out" "$tmp/sed.nl" || break
3623       # 40000 chars as input seems more than enough
3624       test $_count -gt 10 && break
3625       _count=`expr $_count + 1`
3626       if test $_count -gt $_max; then
3627         _max=$_count
3628         lt_cv_path_SED=$_sed
3629       fi
3630     done
3631   done
3632   rm -rf "$tmp"
3633
3634 fi
3635
3636 if test "X$SED" != "X"; then
3637   lt_cv_path_SED=$SED
3638 else
3639   SED=$lt_cv_path_SED
3640 fi
3641 echo "$ac_t""$SED" 1>&6
3642
3643 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
3644 echo "configure:3643: checking whether ln -s works" >&5
3645 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
3646   echo $ac_n "(cached) $ac_c" 1>&6
3647 else
3648   rm -f conftestdata
3649 if ln -s X conftestdata 2>/dev/null
3650 then
3651   rm -f conftestdata
3652   ac_cv_prog_LN_S="ln -s"
3653 else
3654   ac_cv_prog_LN_S=ln
3655 fi
3656 fi
3657 LN_S="$ac_cv_prog_LN_S"
3658 if test "$ac_cv_prog_LN_S" = "ln -s"; then
3659   echo "$ac_t""yes" 1>&6
3660 else
3661   echo "$ac_t""no" 1>&6
3662 fi
3663
3664 echo $ac_n "checking how to recognise dependent libraries""... $ac_c" 1>&6
3665 echo "configure:3664: checking how to recognise dependent libraries" >&5
3666 if eval "test \"\${lt_cv_deplibs_check_method+set}\" = set"; then
3667   echo $ac_n "(cached) $ac_c" 1>&6
3668 else
3669   lt_cv_file_magic_cmd='$MAGIC_CMD'
3670 lt_cv_file_magic_test_file=
3671 lt_cv_deplibs_check_method='unknown'
3672 # Need to set the preceding variable on all platforms that support
3673 # interlibrary dependencies.
3674 # 'none' -- dependencies not supported.
3675 # `unknown' -- same as none, but documents that we really don't know.
3676 # 'pass_all' -- all dependencies passed with no checks.
3677 # 'test_compile' -- check by making test program.
3678 # 'file_magic [[regex]]' -- check by looking for files in library path
3679 # which responds to the $file_magic_cmd with a given egrep regex.
3680 # If you have `file' or equivalent on your system and you're not sure
3681 # whether `pass_all' will *always* work, you probably want this one.
3682
3683 case $host_os in
3684 aix4* | aix5*)
3685   lt_cv_deplibs_check_method=pass_all
3686   ;;
3687
3688 beos*)
3689   lt_cv_deplibs_check_method=pass_all
3690   ;;
3691
3692 bsdi4*)
3693   lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
3694   lt_cv_file_magic_cmd='/usr/bin/file -L'
3695   lt_cv_file_magic_test_file=/shlib/libc.so
3696   ;;
3697
3698 cygwin* | mingw* | pw32*)
3699   lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
3700   lt_cv_file_magic_cmd='$OBJDUMP -f'
3701   ;;
3702
3703 darwin* | rhapsody*)
3704   lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library'
3705   lt_cv_file_magic_cmd='/usr/bin/file -L'
3706   case "$host_os" in
3707   rhapsody* | darwin1.[012])
3708     lt_cv_file_magic_test_file=`echo /System/Library/Frameworks/System.framework/Versions/*/System | head -1`
3709     ;;
3710   *) # Darwin 1.3 on
3711     lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
3712     ;;
3713   esac
3714   ;;
3715
3716 freebsd*)
3717   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3718     case $host_cpu in
3719     i*86 )
3720       # Not sure whether the presence of OpenBSD here was a mistake.
3721       # Let's accept both of them until this is cleared up.
3722       lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[3-9]86 (compact )?demand paged shared library'
3723       lt_cv_file_magic_cmd=/usr/bin/file
3724       lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3725       ;;
3726     esac
3727   else
3728     lt_cv_deplibs_check_method=pass_all
3729   fi
3730   ;;
3731
3732 gnu*)
3733   lt_cv_deplibs_check_method=pass_all
3734   ;;
3735
3736 hpux10.20*|hpux11*)
3737   lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library'
3738   lt_cv_file_magic_cmd=/usr/bin/file
3739   lt_cv_file_magic_test_file=/usr/lib/libc.sl
3740   ;;
3741
3742 irix5* | irix6* | nonstopux*)
3743   case $host_os in
3744   irix5* | nonstopux*)
3745     # this will be overridden with pass_all, but let us keep it just in case
3746     lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
3747     ;;
3748   *)
3749     case $LD in
3750     *-32|*"-32 ") libmagic=32-bit;;
3751     *-n32|*"-n32 ") libmagic=N32;;
3752     *-64|*"-64 ") libmagic=64-bit;;
3753     *) libmagic=never-match;;
3754     esac
3755     # this will be overridden with pass_all, but let us keep it just in case
3756     lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[1234] dynamic lib MIPS - version 1"
3757     ;;
3758   esac
3759   lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
3760   lt_cv_deplibs_check_method=pass_all
3761   ;;
3762
3763 # This must be Linux ELF.
3764 linux-gnu*)
3765   case $host_cpu in
3766   alpha* | hppa* | i*86 | mips | mipsel | powerpc* | sparc* | ia64*)
3767     lt_cv_deplibs_check_method=pass_all ;;
3768   *)
3769     # glibc up to 2.1.1 does not perform some relocations on ARM
3770     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;;
3771   esac
3772   lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
3773   ;;
3774
3775 netbsd*)
3776   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3777     lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
3778   else
3779     lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so$'
3780   fi
3781   ;;
3782
3783 newos6*)
3784   lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
3785   lt_cv_file_magic_cmd=/usr/bin/file
3786   lt_cv_file_magic_test_file=/usr/lib/libnls.so
3787   ;;
3788
3789 openbsd*)
3790   lt_cv_file_magic_cmd=/usr/bin/file
3791   lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3792   if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
3793     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB shared object'
3794   else
3795     lt_cv_deplibs_check_method='file_magic OpenBSD.* shared library'
3796   fi
3797   ;;
3798
3799 openedition*)
3800   lt_cv_deplibs_check_method=pass_all
3801   ;;
3802
3803 osf3* | osf4* | osf5*)
3804   # this will be overridden with pass_all, but let us keep it just in case
3805   lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
3806   lt_cv_file_magic_test_file=/shlib/libc.so
3807   lt_cv_deplibs_check_method=pass_all
3808   ;;
3809
3810 sco3.2v5*)
3811   lt_cv_deplibs_check_method=pass_all
3812   ;;
3813
3814 solaris*)
3815   lt_cv_deplibs_check_method=pass_all
3816   lt_cv_file_magic_test_file=/lib/libc.so
3817   ;;
3818
3819 sysv5uw[78]* | sysv4*uw2*)
3820   lt_cv_deplibs_check_method=pass_all
3821   ;;
3822
3823 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
3824   case $host_vendor in
3825   motorola)
3826     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]'
3827     lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
3828     ;;
3829   ncr)
3830     lt_cv_deplibs_check_method=pass_all
3831     ;;
3832   sequent)
3833     lt_cv_file_magic_cmd='/bin/file'
3834     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'
3835     ;;
3836   sni)
3837     lt_cv_file_magic_cmd='/bin/file'
3838     lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib"
3839     lt_cv_file_magic_test_file=/lib/libc.so
3840     ;;
3841   siemens)
3842     lt_cv_deplibs_check_method=pass_all
3843     ;;
3844   esac
3845   ;;
3846 esac
3847
3848 fi
3849
3850 echo "$ac_t""$lt_cv_deplibs_check_method" 1>&6
3851 file_magic_cmd=$lt_cv_file_magic_cmd
3852 deplibs_check_method=$lt_cv_deplibs_check_method
3853
3854 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
3855 echo "configure:3854: checking for object suffix" >&5
3856 if eval "test \"\${ac_cv_objext+set}\" = set"; then
3857   echo $ac_n "(cached) $ac_c" 1>&6
3858 else
3859   rm -f conftest*
3860 echo 'int i = 1;' > conftest.$ac_ext
3861 if { (eval echo configure:3860: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3862   for ac_file in conftest.*; do
3863     case $ac_file in
3864     *.c) ;;
3865     *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
3866     esac
3867   done
3868 else
3869   { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
3870 fi
3871 rm -f conftest*
3872 fi
3873
3874 echo "$ac_t""$ac_cv_objext" 1>&6
3875 OBJEXT=$ac_cv_objext
3876 ac_objext=$ac_cv_objext
3877
3878
3879
3880
3881 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
3882 echo "configure:3881: checking for executable suffix" >&5
3883 if eval "test \"\${ac_cv_exeext+set}\" = set"; then
3884   echo $ac_n "(cached) $ac_c" 1>&6
3885 else
3886   if test "$CYGWIN" = yes || test "$MINGW32" = yes || test "$EMXOS2" = yes; then
3887   ac_cv_exeext=.exe
3888 else
3889   rm -f conftest*
3890   echo 'int main () { return 0; }' > conftest.$ac_ext
3891   ac_cv_exeext=
3892   if { (eval echo configure:3891: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
3893     for file in conftest.*; do
3894       case $file in
3895       *.c | *.C | *.o | *.obj | *.xcoff) ;;
3896       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
3897       esac
3898     done
3899   else
3900     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
3901   fi
3902   rm -f conftest*
3903   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
3904 fi
3905 fi
3906
3907 EXEEXT=""
3908 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
3909 echo "$ac_t""${ac_cv_exeext}" 1>&6
3910 ac_exeext=$EXEEXT
3911
3912 if test $host != $build; then
3913   ac_tool_prefix=${host_alias}-
3914 else
3915   ac_tool_prefix=
3916 fi
3917
3918
3919
3920
3921 # Check for command to grab the raw symbol name followed by C symbol from nm.
3922 echo $ac_n "checking command to parse $NM output""... $ac_c" 1>&6
3923 echo "configure:3922: checking command to parse $NM output" >&5
3924 if eval "test \"\${lt_cv_sys_global_symbol_pipe+set}\" = set"; then
3925   echo $ac_n "(cached) $ac_c" 1>&6
3926 else
3927   
3928 # These are sane defaults that work on at least a few old systems.
3929 # [They come from Ultrix.  What could be older than Ultrix?!! ;)]
3930
3931 # Character class describing NM global symbol codes.
3932 symcode='[BCDEGRST]'
3933
3934 # Regexp to match symbols that can be accessed directly from C.
3935 sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
3936
3937 # Transform the above into a raw symbol and a C symbol.
3938 symxfrm='\1 \2\3 \3'
3939
3940 # Transform an extracted symbol line into a proper C declaration
3941 lt_cv_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern char \1;/p'"
3942
3943 # Transform an extracted symbol line into symbol name and symbol address
3944 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'"
3945
3946 # Define system-specific variables.
3947 case $host_os in
3948 aix*)
3949   symcode='[BCDT]'
3950   ;;
3951 cygwin* | mingw* | pw32*)
3952   symcode='[ABCDGISTW]'
3953   ;;
3954 hpux*) # Its linker distinguishes data from code symbols
3955   lt_cv_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern char \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
3956   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'"
3957   ;;
3958 irix* | nonstopux*)
3959   symcode='[BCDEGRST]'
3960   ;;
3961 osf*)
3962   symcode='[BCDEGQRST]'
3963   ;;
3964 solaris* | sysv5*)
3965   symcode='[BDT]'
3966   ;;
3967 sysv4)
3968   symcode='[DFNSTU]'
3969   ;;
3970 esac
3971
3972 # Handle CRLF in mingw tool chain
3973 opt_cr=
3974 case $host_os in
3975 mingw*)
3976   opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
3977   ;;
3978 esac
3979
3980 # If we're using GNU nm, then use its standard symbol codes.
3981 if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then
3982   symcode='[ABCDGISTW]'
3983 fi
3984
3985 # Try without a prefix undercore, then with it.
3986 for ac_symprfx in "" "_"; do
3987
3988   # Write the raw and C identifiers.
3989 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[         ]\($symcode$symcode*\)[         ][      ]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'"
3990
3991   # Check to see that the pipe works correctly.
3992   pipe_works=no
3993   rm -f conftest*
3994   cat > conftest.$ac_ext <<EOF
3995 #ifdef __cplusplus
3996 extern "C" {
3997 #endif
3998 char nm_test_var;
3999 void nm_test_func(){}
4000 #ifdef __cplusplus
4001 }
4002 #endif
4003 int main(){nm_test_var='a';nm_test_func();return(0);}
4004 EOF
4005
4006   if { (eval echo configure:4005: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4007     # Now try to grab the symbols.
4008     nlist=conftest.nm
4009     if { (eval echo configure:4008: \"$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
4010       # Try sorting and uniquifying the output.
4011       if sort "$nlist" | uniq > "$nlist"T; then
4012         mv -f "$nlist"T "$nlist"
4013       else
4014         rm -f "$nlist"T
4015       fi
4016
4017       # Make sure that we snagged all the symbols we need.
4018       if egrep ' nm_test_var$' "$nlist" >/dev/null; then
4019         if egrep ' nm_test_func$' "$nlist" >/dev/null; then
4020           cat <<EOF > conftest.$ac_ext
4021 #ifdef __cplusplus
4022 extern "C" {
4023 #endif
4024
4025 EOF
4026           # Now generate the symbol file.
4027           eval "$lt_cv_global_symbol_to_cdecl"' < "$nlist" >> conftest.$ac_ext'
4028
4029           cat <<EOF >> conftest.$ac_ext
4030 #if defined (__STDC__) && __STDC__
4031 # define lt_ptr void *
4032 #else
4033 # define lt_ptr char *
4034 # define const
4035 #endif
4036
4037 /* The mapping between symbol names and symbols. */
4038 const struct {
4039   const char *name;
4040   lt_ptr address;
4041 }
4042 lt_preloaded_symbols[] =
4043 {
4044 EOF
4045           sed "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (lt_ptr) \&\2},/" < "$nlist" >> conftest.$ac_ext
4046           cat <<\EOF >> conftest.$ac_ext
4047   {0, (lt_ptr) 0}
4048 };
4049
4050 #ifdef __cplusplus
4051 }
4052 #endif
4053 EOF
4054           # Now try linking the two files.
4055           mv conftest.$ac_objext conftstm.$ac_objext
4056           save_LIBS="$LIBS"
4057           save_CFLAGS="$CFLAGS"
4058           LIBS="conftstm.$ac_objext"
4059           CFLAGS="$CFLAGS$no_builtin_flag"
4060           if { (eval echo configure:4059: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest$ac_exeext; then
4061             pipe_works=yes
4062           fi
4063           LIBS="$save_LIBS"
4064           CFLAGS="$save_CFLAGS"
4065         else
4066           echo "cannot find nm_test_func in $nlist" >&5
4067         fi
4068       else
4069         echo "cannot find nm_test_var in $nlist" >&5
4070       fi
4071     else
4072       echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5
4073     fi
4074   else
4075     echo "$progname: failed program was:" >&5
4076     cat conftest.$ac_ext >&5
4077   fi
4078   rm -f conftest* conftst*
4079
4080   # Do not use the global_symbol_pipe unless it works.
4081   if test "$pipe_works" = yes; then
4082     break
4083   else
4084     lt_cv_sys_global_symbol_pipe=
4085   fi
4086 done
4087
4088 fi
4089
4090 global_symbol_pipe="$lt_cv_sys_global_symbol_pipe"
4091 if test -z "$lt_cv_sys_global_symbol_pipe"; then
4092   global_symbol_to_cdecl=
4093   global_symbol_to_c_name_address=
4094 else
4095   global_symbol_to_cdecl="$lt_cv_global_symbol_to_cdecl"
4096   global_symbol_to_c_name_address="$lt_cv_global_symbol_to_c_name_address"
4097 fi
4098 if test -z "$global_symbol_pipe$global_symbol_to_cdec$global_symbol_to_c_name_address";
4099 then
4100   echo "$ac_t""failed" 1>&6
4101 else
4102   echo "$ac_t""ok" 1>&6
4103 fi
4104
4105 for ac_hdr in dlfcn.h
4106 do
4107 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4108 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4109 echo "configure:4108: checking for $ac_hdr" >&5
4110 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
4111   echo $ac_n "(cached) $ac_c" 1>&6
4112 else
4113   cat > conftest.$ac_ext <<EOF
4114 #line 4113 "configure"
4115 #include "confdefs.h"
4116 #include <$ac_hdr>
4117 EOF
4118 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4119 { (eval echo configure:4118: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4120 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4121 if test -z "$ac_err"; then
4122   rm -rf conftest*
4123   eval "ac_cv_header_$ac_safe=yes"
4124 else
4125   echo "$ac_err" >&5
4126   echo "configure: failed program was:" >&5
4127   cat conftest.$ac_ext >&5
4128   rm -rf conftest*
4129   eval "ac_cv_header_$ac_safe=no"
4130 fi
4131 rm -f conftest*
4132 fi
4133 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4134   echo "$ac_t""yes" 1>&6
4135     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4136   cat >> confdefs.h <<EOF
4137 #define $ac_tr_hdr 1
4138 EOF
4139  
4140 else
4141   echo "$ac_t""no" 1>&6
4142 fi
4143 done
4144
4145
4146
4147
4148
4149
4150 # Only perform the check for file, if the check method requires it
4151 case $deplibs_check_method in
4152 file_magic*)
4153   if test "$file_magic_cmd" = '$MAGIC_CMD'; then
4154     echo $ac_n "checking for ${ac_tool_prefix}file""... $ac_c" 1>&6
4155 echo "configure:4154: checking for ${ac_tool_prefix}file" >&5
4156 if eval "test \"\${lt_cv_path_MAGIC_CMD+set}\" = set"; then
4157   echo $ac_n "(cached) $ac_c" 1>&6
4158 else
4159   case $MAGIC_CMD in
4160   /*)
4161   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
4162   ;;
4163   ?:/*)
4164   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
4165   ;;
4166   *)
4167   ac_save_MAGIC_CMD="$MAGIC_CMD"
4168   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4169   ac_dummy="/usr/bin:$PATH"
4170   for ac_dir in $ac_dummy; do
4171     test -z "$ac_dir" && ac_dir=.
4172     if test -f $ac_dir/${ac_tool_prefix}file; then
4173       lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file"
4174       if test -n "$file_magic_test_file"; then
4175         case $deplibs_check_method in
4176         "file_magic "*)
4177           file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
4178           MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4179           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
4180             egrep "$file_magic_regex" > /dev/null; then
4181             :
4182           else
4183             cat <<EOF 1>&2
4184
4185 *** Warning: the command libtool uses to detect shared libraries,
4186 *** $file_magic_cmd, produces output that libtool cannot recognize.
4187 *** The result is that libtool may fail to recognize shared libraries
4188 *** as such.  This will affect the creation of libtool libraries that
4189 *** depend on shared libraries, but programs linked with such libtool
4190 *** libraries will work regardless of this problem.  Nevertheless, you
4191 *** may want to report the problem to your system manager and/or to
4192 *** bug-libtool@gnu.org
4193
4194 EOF
4195           fi ;;
4196         esac
4197       fi
4198       break
4199     fi
4200   done
4201   IFS="$ac_save_ifs"
4202   MAGIC_CMD="$ac_save_MAGIC_CMD"
4203   ;;
4204 esac
4205 fi
4206
4207 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4208 if test -n "$MAGIC_CMD"; then
4209   echo "$ac_t""$MAGIC_CMD" 1>&6
4210 else
4211   echo "$ac_t""no" 1>&6
4212 fi
4213
4214 if test -z "$lt_cv_path_MAGIC_CMD"; then
4215   if test -n "$ac_tool_prefix"; then
4216     echo $ac_n "checking for file""... $ac_c" 1>&6
4217 echo "configure:4216: checking for file" >&5
4218 if eval "test \"\${lt_cv_path_MAGIC_CMD+set}\" = set"; then
4219   echo $ac_n "(cached) $ac_c" 1>&6
4220 else
4221   case $MAGIC_CMD in
4222   /*)
4223   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
4224   ;;
4225   ?:/*)
4226   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
4227   ;;
4228   *)
4229   ac_save_MAGIC_CMD="$MAGIC_CMD"
4230   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4231   ac_dummy="/usr/bin:$PATH"
4232   for ac_dir in $ac_dummy; do
4233     test -z "$ac_dir" && ac_dir=.
4234     if test -f $ac_dir/file; then
4235       lt_cv_path_MAGIC_CMD="$ac_dir/file"
4236       if test -n "$file_magic_test_file"; then
4237         case $deplibs_check_method in
4238         "file_magic "*)
4239           file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
4240           MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4241           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
4242             egrep "$file_magic_regex" > /dev/null; then
4243             :
4244           else
4245             cat <<EOF 1>&2
4246
4247 *** Warning: the command libtool uses to detect shared libraries,
4248 *** $file_magic_cmd, produces output that libtool cannot recognize.
4249 *** The result is that libtool may fail to recognize shared libraries
4250 *** as such.  This will affect the creation of libtool libraries that
4251 *** depend on shared libraries, but programs linked with such libtool
4252 *** libraries will work regardless of this problem.  Nevertheless, you
4253 *** may want to report the problem to your system manager and/or to
4254 *** bug-libtool@gnu.org
4255
4256 EOF
4257           fi ;;
4258         esac
4259       fi
4260       break
4261     fi
4262   done
4263   IFS="$ac_save_ifs"
4264   MAGIC_CMD="$ac_save_MAGIC_CMD"
4265   ;;
4266 esac
4267 fi
4268
4269 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4270 if test -n "$MAGIC_CMD"; then
4271   echo "$ac_t""$MAGIC_CMD" 1>&6
4272 else
4273   echo "$ac_t""no" 1>&6
4274 fi
4275
4276   else
4277     MAGIC_CMD=:
4278   fi
4279 fi
4280
4281   fi
4282   ;;
4283 esac
4284
4285 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4286 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
4287 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4288 echo "configure:4287: checking for $ac_word" >&5
4289 if eval "test \"\${ac_cv_prog_RANLIB+set}\" = set"; then
4290   echo $ac_n "(cached) $ac_c" 1>&6
4291 else
4292   if test -n "$RANLIB"; then
4293   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4294 else
4295   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4296   ac_dummy="$PATH"
4297   for ac_dir in $ac_dummy; do
4298     test -z "$ac_dir" && ac_dir=.
4299     if test -f $ac_dir/$ac_word; then
4300       ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4301       break
4302     fi
4303   done
4304   IFS="$ac_save_ifs"
4305 fi
4306 fi
4307 RANLIB="$ac_cv_prog_RANLIB"
4308 if test -n "$RANLIB"; then
4309   echo "$ac_t""$RANLIB" 1>&6
4310 else
4311   echo "$ac_t""no" 1>&6
4312 fi
4313
4314
4315 if test -z "$ac_cv_prog_RANLIB"; then
4316 if test -n "$ac_tool_prefix"; then
4317   # Extract the first word of "ranlib", so it can be a program name with args.
4318 set dummy ranlib; ac_word=$2
4319 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4320 echo "configure:4319: checking for $ac_word" >&5
4321 if eval "test \"\${ac_cv_prog_RANLIB+set}\" = set"; then
4322   echo $ac_n "(cached) $ac_c" 1>&6
4323 else
4324   if test -n "$RANLIB"; then
4325   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4326 else
4327   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4328   ac_dummy="$PATH"
4329   for ac_dir in $ac_dummy; do
4330     test -z "$ac_dir" && ac_dir=.
4331     if test -f $ac_dir/$ac_word; then
4332       ac_cv_prog_RANLIB="ranlib"
4333       break
4334     fi
4335   done
4336   IFS="$ac_save_ifs"
4337   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
4338 fi
4339 fi
4340 RANLIB="$ac_cv_prog_RANLIB"
4341 if test -n "$RANLIB"; then
4342   echo "$ac_t""$RANLIB" 1>&6
4343 else
4344   echo "$ac_t""no" 1>&6
4345 fi
4346
4347 else
4348   RANLIB=":"
4349 fi
4350 fi
4351
4352 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
4353 set dummy ${ac_tool_prefix}strip; ac_word=$2
4354 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4355 echo "configure:4354: checking for $ac_word" >&5
4356 if eval "test \"\${ac_cv_prog_STRIP+set}\" = set"; then
4357   echo $ac_n "(cached) $ac_c" 1>&6
4358 else
4359   if test -n "$STRIP"; then
4360   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
4361 else
4362   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4363   ac_dummy="$PATH"
4364   for ac_dir in $ac_dummy; do
4365     test -z "$ac_dir" && ac_dir=.
4366     if test -f $ac_dir/$ac_word; then
4367       ac_cv_prog_STRIP="${ac_tool_prefix}strip"
4368       break
4369     fi
4370   done
4371   IFS="$ac_save_ifs"
4372 fi
4373 fi
4374 STRIP="$ac_cv_prog_STRIP"
4375 if test -n "$STRIP"; then
4376   echo "$ac_t""$STRIP" 1>&6
4377 else
4378   echo "$ac_t""no" 1>&6
4379 fi
4380
4381
4382 if test -z "$ac_cv_prog_STRIP"; then
4383 if test -n "$ac_tool_prefix"; then
4384   # Extract the first word of "strip", so it can be a program name with args.
4385 set dummy strip; ac_word=$2
4386 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4387 echo "configure:4386: checking for $ac_word" >&5
4388 if eval "test \"\${ac_cv_prog_STRIP+set}\" = set"; then
4389   echo $ac_n "(cached) $ac_c" 1>&6
4390 else
4391   if test -n "$STRIP"; then
4392   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
4393 else
4394   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4395   ac_dummy="$PATH"
4396   for ac_dir in $ac_dummy; do
4397     test -z "$ac_dir" && ac_dir=.
4398     if test -f $ac_dir/$ac_word; then
4399       ac_cv_prog_STRIP="strip"
4400       break
4401     fi
4402   done
4403   IFS="$ac_save_ifs"
4404   test -z "$ac_cv_prog_STRIP" && ac_cv_prog_STRIP=":"
4405 fi
4406 fi
4407 STRIP="$ac_cv_prog_STRIP"
4408 if test -n "$STRIP"; then
4409   echo "$ac_t""$STRIP" 1>&6
4410 else
4411   echo "$ac_t""no" 1>&6
4412 fi
4413
4414 else
4415   STRIP=":"
4416 fi
4417 fi
4418
4419
4420 enable_dlopen=yes
4421 enable_win32_dll=yes
4422
4423 # Check whether --enable-libtool-lock or --disable-libtool-lock was given.
4424 if test "${enable_libtool_lock+set}" = set; then
4425   enableval="$enable_libtool_lock"
4426   :
4427 fi
4428
4429 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
4430
4431 # Some flags need to be propagated to the compiler or linker for good
4432 # libtool support.
4433 case $host in
4434 *-*-irix6*)
4435   # Find out which ABI we are using.
4436   echo '#line 4435 "configure"' > conftest.$ac_ext
4437   if { (eval echo configure:4436: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4438     case `/usr/bin/file conftest.$ac_objext` in
4439     *32-bit*)
4440       LD="${LD-ld} -32"
4441       ;;
4442     *N32*)
4443       LD="${LD-ld} -n32"
4444       ;;
4445     *64-bit*)
4446       LD="${LD-ld} -64"
4447       ;;
4448     esac
4449   fi
4450   rm -rf conftest*
4451   ;;
4452
4453 *-*-sco3.2v5*)
4454   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
4455   SAVE_CFLAGS="$CFLAGS"
4456   CFLAGS="$CFLAGS -belf"
4457   echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
4458 echo "configure:4457: checking whether the C compiler needs -belf" >&5
4459 if eval "test \"\${lt_cv_cc_needs_belf+set}\" = set"; then
4460   echo $ac_n "(cached) $ac_c" 1>&6
4461 else
4462   
4463      ac_ext=c
4464 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
4465 ac_cpp='$CPP $CPPFLAGS'
4466 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
4467 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
4468 cross_compiling=$ac_cv_prog_cc_cross
4469
4470      cat > conftest.$ac_ext <<EOF
4471 #line 4470 "configure"
4472 #include "confdefs.h"
4473
4474 int main() {
4475
4476 ; return 0; }
4477 EOF
4478 if { (eval echo configure:4477: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4479   rm -rf conftest*
4480   lt_cv_cc_needs_belf=yes
4481 else
4482   echo "configure: failed program was:" >&5
4483   cat conftest.$ac_ext >&5
4484   rm -rf conftest*
4485   lt_cv_cc_needs_belf=no
4486 fi
4487 rm -f conftest*
4488      ac_ext=c
4489 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
4490 ac_cpp='$CPP $CPPFLAGS'
4491 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
4492 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
4493 cross_compiling=$ac_cv_prog_cc_cross
4494
4495 fi
4496
4497 echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6
4498   if test x"$lt_cv_cc_needs_belf" != x"yes"; then
4499     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
4500     CFLAGS="$SAVE_CFLAGS"
4501   fi
4502   ;;
4503
4504 *-*-cygwin* | *-*-mingw* | *-*-pw32*)
4505   # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
4506 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
4507 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4508 echo "configure:4507: checking for $ac_word" >&5
4509 if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then
4510   echo $ac_n "(cached) $ac_c" 1>&6
4511 else
4512   if test -n "$DLLTOOL"; then
4513   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
4514 else
4515   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4516   ac_dummy="$PATH"
4517   for ac_dir in $ac_dummy; do
4518     test -z "$ac_dir" && ac_dir=.
4519     if test -f $ac_dir/$ac_word; then
4520       ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
4521       break
4522     fi
4523   done
4524   IFS="$ac_save_ifs"
4525 fi
4526 fi
4527 DLLTOOL="$ac_cv_prog_DLLTOOL"
4528 if test -n "$DLLTOOL"; then
4529   echo "$ac_t""$DLLTOOL" 1>&6
4530 else
4531   echo "$ac_t""no" 1>&6
4532 fi
4533
4534
4535 if test -z "$ac_cv_prog_DLLTOOL"; then
4536 if test -n "$ac_tool_prefix"; then
4537   # Extract the first word of "dlltool", so it can be a program name with args.
4538 set dummy dlltool; ac_word=$2
4539 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4540 echo "configure:4539: checking for $ac_word" >&5
4541 if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then
4542   echo $ac_n "(cached) $ac_c" 1>&6
4543 else
4544   if test -n "$DLLTOOL"; then
4545   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
4546 else
4547   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4548   ac_dummy="$PATH"
4549   for ac_dir in $ac_dummy; do
4550     test -z "$ac_dir" && ac_dir=.
4551     if test -f $ac_dir/$ac_word; then
4552       ac_cv_prog_DLLTOOL="dlltool"
4553       break
4554     fi
4555   done
4556   IFS="$ac_save_ifs"
4557   test -z "$ac_cv_prog_DLLTOOL" && ac_cv_prog_DLLTOOL="false"
4558 fi
4559 fi
4560 DLLTOOL="$ac_cv_prog_DLLTOOL"
4561 if test -n "$DLLTOOL"; then
4562   echo "$ac_t""$DLLTOOL" 1>&6
4563 else
4564   echo "$ac_t""no" 1>&6
4565 fi
4566
4567 else
4568   DLLTOOL="false"
4569 fi
4570 fi
4571
4572   # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
4573 set dummy ${ac_tool_prefix}as; ac_word=$2
4574 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4575 echo "configure:4574: checking for $ac_word" >&5
4576 if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then
4577   echo $ac_n "(cached) $ac_c" 1>&6
4578 else
4579   if test -n "$AS"; then
4580   ac_cv_prog_AS="$AS" # Let the user override the test.
4581 else
4582   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4583   ac_dummy="$PATH"
4584   for ac_dir in $ac_dummy; do
4585     test -z "$ac_dir" && ac_dir=.
4586     if test -f $ac_dir/$ac_word; then
4587       ac_cv_prog_AS="${ac_tool_prefix}as"
4588       break
4589     fi
4590   done
4591   IFS="$ac_save_ifs"
4592 fi
4593 fi
4594 AS="$ac_cv_prog_AS"
4595 if test -n "$AS"; then
4596   echo "$ac_t""$AS" 1>&6
4597 else
4598   echo "$ac_t""no" 1>&6
4599 fi
4600
4601
4602 if test -z "$ac_cv_prog_AS"; then
4603 if test -n "$ac_tool_prefix"; then
4604   # Extract the first word of "as", so it can be a program name with args.
4605 set dummy as; ac_word=$2
4606 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4607 echo "configure:4606: checking for $ac_word" >&5
4608 if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then
4609   echo $ac_n "(cached) $ac_c" 1>&6
4610 else
4611   if test -n "$AS"; then
4612   ac_cv_prog_AS="$AS" # Let the user override the test.
4613 else
4614   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4615   ac_dummy="$PATH"
4616   for ac_dir in $ac_dummy; do
4617     test -z "$ac_dir" && ac_dir=.
4618     if test -f $ac_dir/$ac_word; then
4619       ac_cv_prog_AS="as"
4620       break
4621     fi
4622   done
4623   IFS="$ac_save_ifs"
4624   test -z "$ac_cv_prog_AS" && ac_cv_prog_AS="false"
4625 fi
4626 fi
4627 AS="$ac_cv_prog_AS"
4628 if test -n "$AS"; then
4629   echo "$ac_t""$AS" 1>&6
4630 else
4631   echo "$ac_t""no" 1>&6
4632 fi
4633
4634 else
4635   AS="false"
4636 fi
4637 fi
4638
4639   # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
4640 set dummy ${ac_tool_prefix}objdump; ac_word=$2
4641 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4642 echo "configure:4641: checking for $ac_word" >&5
4643 if eval "test \"\${ac_cv_prog_OBJDUMP+set}\" = set"; then
4644   echo $ac_n "(cached) $ac_c" 1>&6
4645 else
4646   if test -n "$OBJDUMP"; then
4647   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
4648 else
4649   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4650   ac_dummy="$PATH"
4651   for ac_dir in $ac_dummy; do
4652     test -z "$ac_dir" && ac_dir=.
4653     if test -f $ac_dir/$ac_word; then
4654       ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
4655       break
4656     fi
4657   done
4658   IFS="$ac_save_ifs"
4659 fi
4660 fi
4661 OBJDUMP="$ac_cv_prog_OBJDUMP"
4662 if test -n "$OBJDUMP"; then
4663   echo "$ac_t""$OBJDUMP" 1>&6
4664 else
4665   echo "$ac_t""no" 1>&6
4666 fi
4667
4668
4669 if test -z "$ac_cv_prog_OBJDUMP"; then
4670 if test -n "$ac_tool_prefix"; then
4671   # Extract the first word of "objdump", so it can be a program name with args.
4672 set dummy objdump; ac_word=$2
4673 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4674 echo "configure:4673: checking for $ac_word" >&5
4675 if eval "test \"\${ac_cv_prog_OBJDUMP+set}\" = set"; then
4676   echo $ac_n "(cached) $ac_c" 1>&6
4677 else
4678   if test -n "$OBJDUMP"; then
4679   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
4680 else
4681   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4682   ac_dummy="$PATH"
4683   for ac_dir in $ac_dummy; do
4684     test -z "$ac_dir" && ac_dir=.
4685     if test -f $ac_dir/$ac_word; then
4686       ac_cv_prog_OBJDUMP="objdump"
4687       break
4688     fi
4689   done
4690   IFS="$ac_save_ifs"
4691   test -z "$ac_cv_prog_OBJDUMP" && ac_cv_prog_OBJDUMP="false"
4692 fi
4693 fi
4694 OBJDUMP="$ac_cv_prog_OBJDUMP"
4695 if test -n "$OBJDUMP"; then
4696   echo "$ac_t""$OBJDUMP" 1>&6
4697 else
4698   echo "$ac_t""no" 1>&6
4699 fi
4700
4701 else
4702   OBJDUMP="false"
4703 fi
4704 fi
4705
4706
4707   # recent cygwin and mingw systems supply a stub DllMain which the user
4708   # can override, but on older systems we have to supply one
4709   echo $ac_n "checking if libtool should supply DllMain function""... $ac_c" 1>&6
4710 echo "configure:4709: checking if libtool should supply DllMain function" >&5
4711 if eval "test \"\${lt_cv_need_dllmain+set}\" = set"; then
4712   echo $ac_n "(cached) $ac_c" 1>&6
4713 else
4714   cat > conftest.$ac_ext <<EOF
4715 #line 4714 "configure"
4716 #include "confdefs.h"
4717
4718 int main() {
4719 extern int __attribute__((__stdcall__)) DllMain(void*, int, void*);
4720       DllMain (0, 0, 0);
4721 ; return 0; }
4722 EOF
4723 if { (eval echo configure:4722: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4724   rm -rf conftest*
4725   lt_cv_need_dllmain=no
4726 else
4727   echo "configure: failed program was:" >&5
4728   cat conftest.$ac_ext >&5
4729   rm -rf conftest*
4730   lt_cv_need_dllmain=yes
4731 fi
4732 rm -f conftest*
4733 fi
4734
4735 echo "$ac_t""$lt_cv_need_dllmain" 1>&6
4736
4737   case $host/$CC in
4738   *-*-cygwin*/gcc*-mno-cygwin*|*-*-mingw*)
4739     # old mingw systems require "-dll" to link a DLL, while more recent ones
4740     # require "-mdll"
4741     SAVE_CFLAGS="$CFLAGS"
4742     CFLAGS="$CFLAGS -mdll"
4743     echo $ac_n "checking how to link DLLs""... $ac_c" 1>&6
4744 echo "configure:4743: checking how to link DLLs" >&5
4745 if eval "test \"\${lt_cv_cc_dll_switch+set}\" = set"; then
4746   echo $ac_n "(cached) $ac_c" 1>&6
4747 else
4748   cat > conftest.$ac_ext <<EOF
4749 #line 4748 "configure"
4750 #include "confdefs.h"
4751
4752 int main() {
4753
4754 ; return 0; }
4755 EOF
4756 if { (eval echo configure:4755: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4757   rm -rf conftest*
4758   lt_cv_cc_dll_switch=-mdll
4759 else
4760   echo "configure: failed program was:" >&5
4761   cat conftest.$ac_ext >&5
4762   rm -rf conftest*
4763   lt_cv_cc_dll_switch=-dll
4764 fi
4765 rm -f conftest*
4766 fi
4767
4768 echo "$ac_t""$lt_cv_cc_dll_switch" 1>&6
4769     CFLAGS="$SAVE_CFLAGS" ;;
4770   *-*-cygwin* | *-*-pw32*)
4771     # cygwin systems need to pass --dll to the linker, and not link
4772     # crt.o which will require a WinMain@16 definition.
4773     lt_cv_cc_dll_switch="-Wl,--dll -nostartfiles" ;;
4774   esac
4775   ;;
4776   
4777 esac
4778
4779 # Sed substitution that helps us do robust quoting.  It backslashifies
4780 # metacharacters that are still active within double-quoted strings.
4781 Xsed='sed -e s/^X//'
4782 sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g'
4783
4784 # Same as above, but do not quote variable references.
4785 double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g'
4786
4787 # Sed substitution to delay expansion of an escaped shell variable in a
4788 # double_quote_subst'ed string.
4789 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
4790
4791 # Constants:
4792 rm="rm -f"
4793
4794 # Global variables:
4795 default_ofile=libtool
4796 can_build_shared=yes
4797
4798 # All known linkers require a `.a' archive for static linking (except M$VC,
4799 # which needs '.lib').
4800 libext=a
4801 ltmain="$ac_aux_dir/ltmain.sh"
4802 ofile="$default_ofile"
4803 with_gnu_ld="$lt_cv_prog_gnu_ld"
4804 need_locks="$enable_libtool_lock"
4805
4806 old_CC="$CC"
4807 old_CFLAGS="$CFLAGS"
4808
4809 # Set sane defaults for various variables
4810 test -z "$AR" && AR=ar
4811 test -z "$AR_FLAGS" && AR_FLAGS=cru
4812 test -z "$AS" && AS=as
4813 test -z "$CC" && CC=cc
4814 test -z "$DLLTOOL" && DLLTOOL=dlltool
4815 test -z "$LD" && LD=ld
4816 test -z "$LN_S" && LN_S="ln -s"
4817 test -z "$MAGIC_CMD" && MAGIC_CMD=file
4818 test -z "$NM" && NM=nm
4819 test -z "$OBJDUMP" && OBJDUMP=objdump
4820 test -z "$RANLIB" && RANLIB=:
4821 test -z "$STRIP" && STRIP=:
4822 test -z "$ac_objext" && ac_objext=o
4823
4824 if test x"$host" != x"$build"; then
4825   ac_tool_prefix=${host_alias}-
4826 else
4827   ac_tool_prefix=
4828 fi
4829
4830 # Transform linux* to *-*-linux-gnu*, to support old configure scripts.
4831 case $host_os in
4832 linux-gnu*) ;;
4833 linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
4834 esac
4835
4836 case $host_os in
4837 aix3*)
4838   # AIX sometimes has problems with the GCC collect2 program.  For some
4839   # reason, if we set the COLLECT_NAMES environment variable, the problems
4840   # vanish in a puff of smoke.
4841   if test "X${COLLECT_NAMES+set}" != Xset; then
4842     COLLECT_NAMES=
4843     export COLLECT_NAMES
4844   fi
4845   ;;
4846 esac
4847
4848 # Determine commands to create old-style static archives.
4849 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
4850 old_postinstall_cmds='chmod 644 $oldlib'
4851 old_postuninstall_cmds=
4852
4853 if test -n "$RANLIB"; then
4854   case $host_os in
4855   openbsd*)
4856     old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds"
4857     ;;
4858   *)
4859     old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
4860     ;;
4861   esac
4862   old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
4863 fi
4864
4865 # Allow CC to be a program name with arguments.
4866 set dummy $CC
4867 compiler="$2"
4868
4869 echo $ac_n "checking for objdir""... $ac_c" 1>&6
4870 echo "configure:4869: checking for objdir" >&5
4871 rm -f .libs 2>/dev/null
4872 mkdir .libs 2>/dev/null
4873 if test -d .libs; then
4874   objdir=.libs
4875 else
4876   # MS-DOS does not allow filenames that begin with a dot.
4877   objdir=_libs
4878 fi
4879 rmdir .libs 2>/dev/null
4880 echo "$ac_t""$objdir" 1>&6
4881
4882
4883 # Check whether --with-pic or --without-pic was given.
4884 if test "${with_pic+set}" = set; then
4885   withval="$with_pic"
4886   pic_mode="$withval"
4887 else
4888   pic_mode=default
4889 fi
4890
4891 test -z "$pic_mode" && pic_mode=default
4892
4893 # We assume here that the value for lt_cv_prog_cc_pic will not be cached
4894 # in isolation, and that seeing it set (from the cache) indicates that
4895 # the associated values are set (in the cache) correctly too.
4896 echo $ac_n "checking for $compiler option to produce PIC""... $ac_c" 1>&6
4897 echo "configure:4896: checking for $compiler option to produce PIC" >&5
4898 if eval "test \"\${lt_cv_prog_cc_pic+set}\" = set"; then
4899   echo $ac_n "(cached) $ac_c" 1>&6
4900 else
4901    lt_cv_prog_cc_pic=
4902   lt_cv_prog_cc_shlib=
4903   lt_cv_prog_cc_wl=
4904   lt_cv_prog_cc_static=
4905   lt_cv_prog_cc_no_builtin=
4906   lt_cv_prog_cc_can_build_shared=$can_build_shared
4907
4908   if test "$GCC" = yes; then
4909     lt_cv_prog_cc_wl='-Wl,'
4910     lt_cv_prog_cc_static='-static'
4911
4912     case $host_os in
4913     aix*)
4914       # Below there is a dirty hack to force normal static linking with -ldl
4915       # The problem is because libdl dynamically linked with both libc and
4916       # libC (AIX C++ library), which obviously doesn't included in libraries
4917       # list by gcc. This cause undefined symbols with -static flags.
4918       # This hack allows C programs to be linked with "-static -ldl", but
4919       # not sure about C++ programs.
4920       lt_cv_prog_cc_static="$lt_cv_prog_cc_static ${lt_cv_prog_cc_wl}-lC"
4921       ;;
4922     amigaos*)
4923       # FIXME: we need at least 68020 code to build shared libraries, but
4924       # adding the `-m68020' flag to GCC prevents building anything better,
4925       # like `-m68040'.
4926       lt_cv_prog_cc_pic='-m68020 -resident32 -malways-restore-a4'
4927       ;;
4928     beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
4929       # PIC is the default for these OSes.
4930       ;;
4931     darwin* | rhapsody*)
4932       # PIC is the default on this platform
4933       # Common symbols not allowed in MH_DYLIB files
4934       lt_cv_prog_cc_pic='-fno-common'
4935       ;;
4936     cygwin* | mingw* | pw32* | os2*)
4937       # This hack is so that the source file can tell whether it is being
4938       # built for inclusion in a dll (and should export symbols for example).
4939       lt_cv_prog_cc_pic='-DDLL_EXPORT'
4940       ;;
4941     sysv4*MP*)
4942       if test -d /usr/nec; then
4943          lt_cv_prog_cc_pic=-Kconform_pic
4944       fi
4945       ;;
4946     *)
4947       lt_cv_prog_cc_pic='-fPIC'
4948       ;;
4949     esac
4950   else
4951     # PORTME Check for PIC flags for the system compiler.
4952     case $host_os in
4953     aix3* | aix4* | aix5*)
4954       lt_cv_prog_cc_wl='-Wl,'
4955       # All AIX code is PIC.
4956       if test "$host_cpu" = ia64; then
4957         # AIX 5 now supports IA64 processor
4958         lt_cv_prog_cc_static='-Bstatic'
4959       else
4960         lt_cv_prog_cc_static='-bnso -bI:/lib/syscalls.exp'
4961       fi
4962       ;;
4963
4964     hpux9* | hpux10* | hpux11*)
4965       # Is there a better lt_cv_prog_cc_static that works with the bundled CC?
4966       lt_cv_prog_cc_wl='-Wl,'
4967       lt_cv_prog_cc_static="${lt_cv_prog_cc_wl}-a ${lt_cv_prog_cc_wl}archive"
4968       lt_cv_prog_cc_pic='+Z'
4969       ;;
4970
4971     irix5* | irix6* | nonstopux*)
4972       lt_cv_prog_cc_wl='-Wl,'
4973       lt_cv_prog_cc_static='-non_shared'
4974       # PIC (with -KPIC) is the default.
4975       ;;
4976
4977     cygwin* | mingw* | pw32* | os2*)
4978       # This hack is so that the source file can tell whether it is being
4979       # built for inclusion in a dll (and should export symbols for example).
4980       lt_cv_prog_cc_pic='-DDLL_EXPORT'
4981       ;;
4982
4983     newsos6)
4984       lt_cv_prog_cc_pic='-KPIC'
4985       lt_cv_prog_cc_static='-Bstatic'
4986       ;;
4987     
4988     openedition)
4989       # XPLINK code is PIC by default
4990       ;;
4991
4992     osf3* | osf4* | osf5*)
4993       # All OSF/1 code is PIC.
4994       lt_cv_prog_cc_wl='-Wl,'
4995       lt_cv_prog_cc_static='-non_shared'
4996       ;;
4997
4998     sco3.2v5*)
4999       lt_cv_prog_cc_pic='-Kpic'
5000       lt_cv_prog_cc_static='-dn'
5001       lt_cv_prog_cc_shlib='-belf'
5002       ;;
5003
5004     solaris*)
5005       lt_cv_prog_cc_pic='-KPIC'
5006       lt_cv_prog_cc_static='-Bstatic'
5007       lt_cv_prog_cc_wl='-Wl,'
5008       ;;
5009
5010     sunos4*)
5011       lt_cv_prog_cc_pic='-PIC'
5012       lt_cv_prog_cc_static='-Bstatic'
5013       lt_cv_prog_cc_wl='-Qoption ld '
5014       ;;
5015
5016     sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
5017       lt_cv_prog_cc_pic='-KPIC'
5018       lt_cv_prog_cc_static='-Bstatic'
5019       lt_cv_prog_cc_wl='-Wl,'
5020       ;;
5021
5022     uts4*)
5023       lt_cv_prog_cc_pic='-pic'
5024       lt_cv_prog_cc_static='-Bstatic'
5025       ;;
5026
5027     sysv4*MP*)
5028       if test -d /usr/nec ;then
5029         lt_cv_prog_cc_pic='-Kconform_pic'
5030         lt_cv_prog_cc_static='-Bstatic'
5031       fi
5032       ;;
5033
5034     *)
5035       lt_cv_prog_cc_can_build_shared=no
5036       ;;
5037     esac
5038   fi
5039
5040 fi
5041
5042 if test -z "$lt_cv_prog_cc_pic"; then
5043   echo "$ac_t""none" 1>&6
5044 else
5045   echo "$ac_t""$lt_cv_prog_cc_pic" 1>&6
5046
5047   # Check to make sure the pic_flag actually works.
5048   echo $ac_n "checking if $compiler PIC flag $lt_cv_prog_cc_pic works""... $ac_c" 1>&6
5049 echo "configure:5048: checking if $compiler PIC flag $lt_cv_prog_cc_pic works" >&5
5050   if eval "test \"\${lt_cv_prog_cc_pic_works+set}\" = set"; then
5051   echo $ac_n "(cached) $ac_c" 1>&6
5052 else
5053       save_CFLAGS="$CFLAGS"
5054     CFLAGS="$CFLAGS $lt_cv_prog_cc_pic -DPIC"
5055     cat > conftest.$ac_ext <<EOF
5056 #line 5055 "configure"
5057 #include "confdefs.h"
5058
5059 int main() {
5060
5061 ; return 0; }
5062 EOF
5063 if { (eval echo configure:5062: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5064   rm -rf conftest*
5065         case $host_os in
5066       hpux9* | hpux10* | hpux11*)
5067         # On HP-UX, both CC and GCC only warn that PIC is supported... then
5068         # they create non-PIC objects.  So, if there were any warnings, we
5069         # assume that PIC is not supported.
5070         if test -s conftest.err; then
5071           lt_cv_prog_cc_pic_works=no
5072         else
5073           lt_cv_prog_cc_pic_works=yes
5074         fi
5075         ;;
5076       *)
5077         lt_cv_prog_cc_pic_works=yes
5078         ;;
5079       esac
5080     
5081 else
5082   echo "configure: failed program was:" >&5
5083   cat conftest.$ac_ext >&5
5084   rm -rf conftest*
5085         lt_cv_prog_cc_pic_works=no
5086     
5087 fi
5088 rm -f conftest*
5089     CFLAGS="$save_CFLAGS"
5090   
5091 fi
5092
5093
5094   if test "X$lt_cv_prog_cc_pic_works" = Xno; then
5095     lt_cv_prog_cc_pic=
5096     lt_cv_prog_cc_can_build_shared=no
5097   else
5098     lt_cv_prog_cc_pic=" $lt_cv_prog_cc_pic"
5099   fi
5100
5101   echo "$ac_t""$lt_cv_prog_cc_pic_works" 1>&6
5102 fi
5103
5104 # Check for any special shared library compilation flags.
5105 if test -n "$lt_cv_prog_cc_shlib"; then
5106   echo "configure: warning: \`$CC' requires \`$lt_cv_prog_cc_shlib' to build shared libraries" 1>&2
5107   if echo "$old_CC $old_CFLAGS " | egrep -e "[  ]$lt_cv_prog_cc_shlib[  ]" >/dev/null; then :
5108   else
5109    echo "configure: warning: add \`$lt_cv_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure" 1>&2
5110     lt_cv_prog_cc_can_build_shared=no
5111   fi
5112 fi
5113
5114 echo $ac_n "checking if $compiler static flag $lt_cv_prog_cc_static works""... $ac_c" 1>&6
5115 echo "configure:5114: checking if $compiler static flag $lt_cv_prog_cc_static works" >&5
5116 if eval "test \"\${lt_cv_prog_cc_static_works+set}\" = set"; then
5117   echo $ac_n "(cached) $ac_c" 1>&6
5118 else
5119     lt_cv_prog_cc_static_works=no
5120   save_LDFLAGS="$LDFLAGS"
5121   LDFLAGS="$LDFLAGS $lt_cv_prog_cc_static"
5122   cat > conftest.$ac_ext <<EOF
5123 #line 5122 "configure"
5124 #include "confdefs.h"
5125
5126 int main() {
5127
5128 ; return 0; }
5129 EOF
5130 if { (eval echo configure:5129: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5131   rm -rf conftest*
5132   lt_cv_prog_cc_static_works=yes
5133 else
5134   echo "configure: failed program was:" >&5
5135   cat conftest.$ac_ext >&5
5136 fi
5137 rm -f conftest*
5138   LDFLAGS="$save_LDFLAGS"
5139
5140 fi
5141
5142
5143 # Belt *and* braces to stop my trousers falling down:
5144 test "X$lt_cv_prog_cc_static_works" = Xno && lt_cv_prog_cc_static=
5145 echo "$ac_t""$lt_cv_prog_cc_static_works" 1>&6
5146
5147 pic_flag="$lt_cv_prog_cc_pic"
5148 special_shlib_compile_flags="$lt_cv_prog_cc_shlib"
5149 wl="$lt_cv_prog_cc_wl"
5150 link_static_flag="$lt_cv_prog_cc_static"
5151 no_builtin_flag="$lt_cv_prog_cc_no_builtin"
5152 can_build_shared="$lt_cv_prog_cc_can_build_shared"
5153
5154
5155 # Check to see if options -o and -c are simultaneously supported by compiler
5156 echo $ac_n "checking if $compiler supports -c -o file.$ac_objext""... $ac_c" 1>&6
5157 echo "configure:5156: checking if $compiler supports -c -o file.$ac_objext" >&5
5158 if eval "test \"\${lt_cv_compiler_c_o+set}\" = set"; then
5159   echo $ac_n "(cached) $ac_c" 1>&6
5160 else
5161   
5162 $rm -r conftest 2>/dev/null
5163 mkdir conftest
5164 cd conftest
5165 echo "int some_variable = 0;" > conftest.$ac_ext
5166 mkdir out
5167 # According to Tom Tromey, Ian Lance Taylor reported there are C compilers
5168 # that will create temporary files in the current directory regardless of
5169 # the output directory.  Thus, making CWD read-only will cause this test
5170 # to fail, enabling locking or at least warning the user not to do parallel
5171 # builds.
5172 chmod -w .
5173 save_CFLAGS="$CFLAGS"
5174 CFLAGS="$CFLAGS -o out/conftest2.$ac_objext"
5175 compiler_c_o=no
5176 if { (eval echo configure:5175: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then
5177   # The compiler can only warn and ignore the option if not recognized
5178   # So say no if there are warnings
5179   if test -s out/conftest.err; then
5180     lt_cv_compiler_c_o=no
5181   else
5182     lt_cv_compiler_c_o=yes
5183   fi
5184 else
5185   # Append any errors to the config.log.
5186   cat out/conftest.err 1>&5
5187   lt_cv_compiler_c_o=no
5188 fi
5189 CFLAGS="$save_CFLAGS"
5190 chmod u+w .
5191 $rm conftest* out/*
5192 rmdir out
5193 cd ..
5194 rmdir conftest
5195 $rm -r conftest 2>/dev/null
5196
5197 fi
5198
5199 compiler_c_o=$lt_cv_compiler_c_o
5200 echo "$ac_t""$compiler_c_o" 1>&6
5201
5202 if test x"$compiler_c_o" = x"yes"; then
5203   # Check to see if we can write to a .lo
5204   echo $ac_n "checking if $compiler supports -c -o file.lo""... $ac_c" 1>&6
5205 echo "configure:5204: checking if $compiler supports -c -o file.lo" >&5
5206   if eval "test \"\${lt_cv_compiler_o_lo+set}\" = set"; then
5207   echo $ac_n "(cached) $ac_c" 1>&6
5208 else
5209   
5210   lt_cv_compiler_o_lo=no
5211   save_CFLAGS="$CFLAGS"
5212   CFLAGS="$CFLAGS -c -o conftest.lo"
5213   save_objext="$ac_objext"
5214   ac_objext=lo
5215   cat > conftest.$ac_ext <<EOF
5216 #line 5215 "configure"
5217 #include "confdefs.h"
5218
5219 int main() {
5220 int some_variable = 0;
5221 ; return 0; }
5222 EOF
5223 if { (eval echo configure:5222: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5224   rm -rf conftest*
5225       # The compiler can only warn and ignore the option if not recognized
5226     # So say no if there are warnings
5227     if test -s conftest.err; then
5228       lt_cv_compiler_o_lo=no
5229     else
5230       lt_cv_compiler_o_lo=yes
5231     fi
5232   
5233 else
5234   echo "configure: failed program was:" >&5
5235   cat conftest.$ac_ext >&5
5236 fi
5237 rm -f conftest*
5238   ac_objext="$save_objext"
5239   CFLAGS="$save_CFLAGS"
5240   
5241 fi
5242
5243   compiler_o_lo=$lt_cv_compiler_o_lo
5244   echo "$ac_t""$compiler_o_lo" 1>&6
5245 else
5246   compiler_o_lo=no
5247 fi
5248
5249 # Check to see if we can do hard links to lock some files if needed
5250 hard_links="nottested"
5251 if test "$compiler_c_o" = no && test "$need_locks" != no; then
5252   # do not overwrite the value of need_locks provided by the user
5253   echo $ac_n "checking if we can lock with hard links""... $ac_c" 1>&6
5254 echo "configure:5253: checking if we can lock with hard links" >&5
5255   hard_links=yes
5256   $rm conftest*
5257   ln conftest.a conftest.b 2>/dev/null && hard_links=no
5258   touch conftest.a
5259   ln conftest.a conftest.b 2>&5 || hard_links=no
5260   ln conftest.a conftest.b 2>/dev/null && hard_links=no
5261   echo "$ac_t""$hard_links" 1>&6
5262   if test "$hard_links" = no; then
5263     echo "configure: warning: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" 1>&2
5264     need_locks=warn
5265   fi
5266 else
5267   need_locks=no
5268 fi
5269
5270 if test "$GCC" = yes; then
5271   # Check to see if options -fno-rtti -fno-exceptions are supported by compiler
5272   echo $ac_n "checking if $compiler supports -fno-rtti -fno-exceptions""... $ac_c" 1>&6
5273 echo "configure:5272: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
5274   echo "int some_variable = 0;" > conftest.$ac_ext
5275   save_CFLAGS="$CFLAGS"
5276   CFLAGS="$CFLAGS -fno-rtti -fno-exceptions -c conftest.$ac_ext"
5277   compiler_rtti_exceptions=no
5278   cat > conftest.$ac_ext <<EOF
5279 #line 5278 "configure"
5280 #include "confdefs.h"
5281
5282 int main() {
5283 int some_variable = 0;
5284 ; return 0; }
5285 EOF
5286 if { (eval echo configure:5285: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5287   rm -rf conftest*
5288       # The compiler can only warn and ignore the option if not recognized
5289     # So say no if there are warnings
5290     if test -s conftest.err; then
5291       compiler_rtti_exceptions=no
5292     else
5293       compiler_rtti_exceptions=yes
5294     fi
5295   
5296 else
5297   echo "configure: failed program was:" >&5
5298   cat conftest.$ac_ext >&5
5299 fi
5300 rm -f conftest*
5301   CFLAGS="$save_CFLAGS"
5302   echo "$ac_t""$compiler_rtti_exceptions" 1>&6
5303
5304   if test "$compiler_rtti_exceptions" = "yes"; then
5305     no_builtin_flag=' -fno-builtin -fno-rtti -fno-exceptions'
5306   else
5307     no_builtin_flag=' -fno-builtin'
5308   fi
5309 fi
5310
5311 # See if the linker supports building shared libraries.
5312 echo $ac_n "checking whether the linker ($LD) supports shared libraries""... $ac_c" 1>&6
5313 echo "configure:5312: checking whether the linker ($LD) supports shared libraries" >&5
5314
5315 allow_undefined_flag=
5316 no_undefined_flag=
5317 need_lib_prefix=unknown
5318 need_version=unknown
5319 # when you set need_version to no, make sure it does not cause -set_version
5320 # flags to be left without arguments
5321 archive_cmds=
5322 archive_expsym_cmds=
5323 old_archive_from_new_cmds=
5324 old_archive_from_expsyms_cmds=
5325 export_dynamic_flag_spec=
5326 whole_archive_flag_spec=
5327 thread_safe_flag_spec=
5328 hardcode_into_libs=no
5329 hardcode_libdir_flag_spec=
5330 hardcode_libdir_separator=
5331 hardcode_direct=no
5332 hardcode_minus_L=no
5333 hardcode_shlibpath_var=unsupported
5334 runpath_var=
5335 link_all_deplibs=unknown
5336 always_export_symbols=no
5337 export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols'
5338 # include_expsyms should be a list of space-separated symbols to be *always*
5339 # included in the symbol list
5340 include_expsyms=
5341 # exclude_expsyms can be an egrep regular expression of symbols to exclude
5342 # it will be wrapped by ` (' and `)$', so one must not match beginning or
5343 # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
5344 # as well as any symbol that contains `d'.
5345 exclude_expsyms="_GLOBAL_OFFSET_TABLE_"
5346 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
5347 # platforms (ab)use it in PIC code, but their linkers get confused if
5348 # the symbol is explicitly referenced.  Since portable code cannot
5349 # rely on this symbol name, it's probably fine to never include it in
5350 # preloaded symbol tables.
5351 extract_expsyms_cmds=
5352
5353 case $host_os in
5354 cygwin* | mingw* | pw32*)
5355   # FIXME: the MSVC++ port hasn't been tested in a loooong time
5356   # When not using gcc, we currently assume that we are using
5357   # Microsoft Visual C++.
5358   if test "$GCC" != yes; then
5359     with_gnu_ld=no
5360   fi
5361   ;;
5362 openbsd*)
5363   with_gnu_ld=no
5364   ;;
5365 esac
5366
5367 ld_shlibs=yes
5368 if test "$with_gnu_ld" = yes; then
5369   # If archive_cmds runs LD, not CC, wlarc should be empty
5370   wlarc='${wl}'
5371
5372   # See if GNU ld supports shared libraries.
5373   case $host_os in
5374   aix3* | aix4* | aix5*)
5375     # On AIX, the GNU linker is very broken
5376     # Note:Check GNU linker on AIX 5-IA64 when/if it becomes available.
5377     ld_shlibs=no
5378     cat <<EOF 1>&2
5379
5380 *** Warning: the GNU linker, at least up to release 2.9.1, is reported
5381 *** to be unable to reliably create shared libraries on AIX.
5382 *** Therefore, libtool is disabling shared libraries support.  If you
5383 *** really care for shared libraries, you may want to modify your PATH
5384 *** so that a non-GNU linker is found, and then restart.
5385
5386 EOF
5387     ;;
5388
5389   amigaos*)
5390     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)'
5391     hardcode_libdir_flag_spec='-L$libdir'
5392     hardcode_minus_L=yes
5393
5394     # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
5395     # that the semantics of dynamic libraries on AmigaOS, at least up
5396     # to version 4, is to share data among multiple programs linked
5397     # with the same dynamic library.  Since this doesn't match the
5398     # behavior of shared libraries on other platforms, we can use
5399     # them.
5400     ld_shlibs=no
5401     ;;
5402
5403   beos*)
5404     if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
5405       allow_undefined_flag=unsupported
5406       # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
5407       # support --undefined.  This deserves some investigation.  FIXME
5408       archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5409     else
5410       ld_shlibs=no
5411     fi
5412     ;;
5413
5414   cygwin* | mingw* | pw32*)
5415     # hardcode_libdir_flag_spec is actually meaningless, as there is
5416     # no search path for DLLs.
5417     hardcode_libdir_flag_spec='-L$libdir'
5418     allow_undefined_flag=unsupported
5419     always_export_symbols=yes
5420
5421     extract_expsyms_cmds='test -f $output_objdir/impgen.c || \
5422       sed -e "/^# \/\* impgen\.c starts here \*\//,/^# \/\* impgen.c ends here \*\// { s/^# //;s/^# *$//; p; }" -e d < $''0 > $output_objdir/impgen.c~
5423       test -f $output_objdir/impgen.exe || (cd $output_objdir && \
5424       if test "x$HOST_CC" != "x" ; then $HOST_CC -o impgen impgen.c ; \
5425       else $CC -o impgen impgen.c ; fi)~
5426       $output_objdir/impgen $dir/$soroot > $output_objdir/$soname-def'
5427
5428     old_archive_from_expsyms_cmds='$DLLTOOL --as=$AS --dllname $soname --def $output_objdir/$soname-def --output-lib $output_objdir/$newlib'
5429
5430     # cygwin and mingw dlls have different entry points and sets of symbols
5431     # to exclude.
5432     # FIXME: what about values for MSVC?
5433     dll_entry=__cygwin_dll_entry@12
5434     dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12~
5435     case $host_os in
5436     mingw*)
5437       # mingw values
5438       dll_entry=_DllMainCRTStartup@12
5439       dll_exclude_symbols=DllMain@12,DllMainCRTStartup@12,DllEntryPoint@12~
5440       ;;
5441     esac
5442
5443     # mingw and cygwin differ, and it's simplest to just exclude the union
5444     # of the two symbol sets.
5445     dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12,DllMainCRTStartup@12,DllEntryPoint@12
5446
5447     # recent cygwin and mingw systems supply a stub DllMain which the user
5448     # can override, but on older systems we have to supply one (in ltdll.c)
5449     if test "x$lt_cv_need_dllmain" = "xyes"; then
5450       ltdll_obj='$output_objdir/$soname-ltdll.'"$ac_objext "
5451       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~
5452         test -f $output_objdir/$soname-ltdll.$ac_objext || (cd $output_objdir && $CC -c $soname-ltdll.c)~'
5453     else
5454       ltdll_obj=
5455       ltdll_cmds=
5456     fi
5457
5458     # Extract the symbol export list from an `--export-all' def file,
5459     # then regenerate the def file from the symbol export list, so that
5460     # the compiled dll only exports the symbol export list.
5461     # Be careful not to strip the DATA tag left be newer dlltools.
5462     export_symbols_cmds="$ltdll_cmds"'
5463       $DLLTOOL --export-all --exclude-symbols '$dll_exclude_symbols' --output-def $output_objdir/$soname-def '$ltdll_obj'$libobjs $convenience~
5464       sed -e "1,/EXPORTS/d" -e "s/ @ [0-9]*//" -e "s/ *;.*$//" < $output_objdir/$soname-def > $export_symbols'
5465
5466     # If the export-symbols file already is a .def file (1st line
5467     # is EXPORTS), use it as is.
5468     # If DATA tags from a recent dlltool are present, honour them!
5469     archive_expsym_cmds='if test "x`sed 1q $export_symbols`" = xEXPORTS; then
5470         cp $export_symbols $output_objdir/$soname-def;
5471       else
5472         echo EXPORTS > $output_objdir/$soname-def;
5473         _lt_hint=1;
5474         cat $export_symbols | while read symbol; do
5475          set dummy \$symbol;
5476          case \$# in
5477            2) echo "   \$2 @ \$_lt_hint ; " >> $output_objdir/$soname-def;;
5478            4) echo "   \$2 \$3 \$4 ; " >> $output_objdir/$soname-def; _lt_hint=`expr \$_lt_hint - 1`;;
5479            *) echo "     \$2 @ \$_lt_hint \$3 ; " >> $output_objdir/$soname-def;;
5480          esac;
5481          _lt_hint=`expr 1 + \$_lt_hint`;
5482         done;
5483       fi~
5484       '"$ltdll_cmds"'
5485       $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~
5486       $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~
5487       $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~
5488       $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~
5489       $CC $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags'
5490     ;;
5491
5492   netbsd*)
5493     if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
5494       archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
5495       wlarc=
5496     else
5497       archive_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5498       archive_expsym_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5499     fi
5500     ;;
5501
5502   solaris* | sysv5*)
5503     if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then
5504       ld_shlibs=no
5505       cat <<EOF 1>&2
5506
5507 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
5508 *** create shared libraries on Solaris systems.  Therefore, libtool
5509 *** is disabling shared libraries support.  We urge you to upgrade GNU
5510 *** binutils to release 2.9.1 or newer.  Another option is to modify
5511 *** your PATH or compiler configuration so that the native linker is
5512 *** used, and then restart.
5513
5514 EOF
5515     elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
5516       archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5517       archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5518     else
5519       ld_shlibs=no
5520     fi
5521     ;;
5522
5523   sunos4*)
5524     archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5525     wlarc=
5526     hardcode_direct=yes
5527     hardcode_shlibpath_var=no
5528     ;;
5529
5530   *)
5531     if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
5532       archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5533       archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5534     else
5535       ld_shlibs=no
5536     fi
5537     ;;
5538   esac
5539
5540   if test "$ld_shlibs" = yes; then
5541     runpath_var=LD_RUN_PATH
5542     hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir'
5543     export_dynamic_flag_spec='${wl}--export-dynamic'
5544     case $host_os in
5545     cygwin* | mingw* | pw32*)
5546       # dlltool doesn't understand --whole-archive et. al.
5547       whole_archive_flag_spec=
5548       ;;
5549     *)
5550       # ancient GNU ld didn't support --whole-archive et. al.
5551       if $LD --help 2>&1 | egrep 'no-whole-archive' > /dev/null; then
5552         whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
5553       else
5554         whole_archive_flag_spec=
5555       fi
5556       ;;
5557     esac
5558   fi
5559 else
5560   # PORTME fill in a description of your system's linker (not GNU ld)
5561   case $host_os in
5562   aix3*)
5563     allow_undefined_flag=unsupported
5564     always_export_symbols=yes
5565     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'
5566     # Note: this linker hardcodes the directories in LIBPATH if there
5567     # are no directories specified by -L.
5568     hardcode_minus_L=yes
5569     if test "$GCC" = yes && test -z "$link_static_flag"; then
5570       # Neither direct hardcoding nor static linking is supported with a
5571       # broken collect2.
5572       hardcode_direct=unsupported
5573     fi
5574     ;;
5575
5576   aix4* | aix5*)
5577     if test "$host_cpu" = ia64; then
5578       # On IA64, the linker does run time linking by default, so we don't
5579       # have to do anything special.
5580       aix_use_runtimelinking=no
5581       exp_sym_flag='-Bexport'
5582       no_entry_flag=""
5583     else
5584       aix_use_runtimelinking=no
5585
5586       # Test if we are trying to use run time linking or normal
5587       # AIX style linking. If -brtl is somewhere in LDFLAGS, we
5588       # need to do runtime linking.
5589       case $host_os in aix4.[23]|aix4.[23].*|aix5*)
5590         for ld_flag in $LDFLAGS; do
5591           case $ld_flag in
5592           *-brtl*)
5593             aix_use_runtimelinking=yes
5594             break
5595           ;;
5596           esac
5597         done
5598       esac
5599
5600       exp_sym_flag='-bexport'
5601       no_entry_flag='-bnoentry'
5602     fi
5603
5604     # When large executables or shared objects are built, AIX ld can
5605     # have problems creating the table of contents.  If linking a library
5606     # or program results in "error TOC overflow" add -mminimal-toc to
5607     # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
5608     # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
5609
5610     hardcode_direct=yes
5611     archive_cmds=''
5612     hardcode_libdir_separator=':'
5613     if test "$GCC" = yes; then
5614       case $host_os in aix4.[012]|aix4.[012].*)
5615         collect2name=`${CC} -print-prog-name=collect2`
5616         if test -f "$collect2name" && \
5617           strings "$collect2name" | grep resolve_lib_name >/dev/null
5618         then
5619           # We have reworked collect2
5620           hardcode_direct=yes
5621         else
5622           # We have old collect2
5623           hardcode_direct=unsupported
5624           # It fails to find uninstalled libraries when the uninstalled
5625           # path is not listed in the libpath.  Setting hardcode_minus_L
5626           # to unsupported forces relinking
5627           hardcode_minus_L=yes
5628           hardcode_libdir_flag_spec='-L$libdir'
5629           hardcode_libdir_separator=
5630         fi
5631       esac
5632
5633       shared_flag='-shared'
5634     else
5635       # not using gcc
5636       if test "$host_cpu" = ia64; then
5637         shared_flag='${wl}-G'
5638       else
5639         if test "$aix_use_runtimelinking" = yes; then
5640           shared_flag='${wl}-G'
5641         else
5642           shared_flag='${wl}-bM:SRE'
5643         fi
5644       fi
5645     fi
5646
5647     # It seems that -bexpall can do strange things, so it is better to
5648     # generate a list of symbols to export.
5649     always_export_symbols=yes
5650     if test "$aix_use_runtimelinking" = yes; then
5651       # Warning - without using the other runtime loading flags (-brtl),
5652       # -berok will link without error, but may produce a broken library.
5653       allow_undefined_flag='-berok'
5654       hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:/usr/lib:/lib'
5655       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"
5656     else
5657       if test "$host_cpu" = ia64; then
5658         hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
5659         allow_undefined_flag="-z nodefs"
5660         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"
5661       else
5662         hardcode_libdir_flag_spec='${wl}-bnolibpath ${wl}-blibpath:$libdir:/usr/lib:/lib'
5663         # Warning - without using the other run time loading flags,
5664         # -berok will link without error, but may produce a broken library.
5665         allow_undefined_flag='${wl}-berok'
5666         # This is a bit strange, but is similar to how AIX traditionally builds
5667         # it's shared libraries.
5668         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'
5669       fi
5670     fi
5671     ;;
5672
5673   amigaos*)
5674     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)'
5675     hardcode_libdir_flag_spec='-L$libdir'
5676     hardcode_minus_L=yes
5677     # see comment about different semantics on the GNU ld section
5678     ld_shlibs=no
5679     ;;
5680
5681   cygwin* | mingw* | pw32*)
5682     # When not using gcc, we currently assume that we are using
5683     # Microsoft Visual C++.
5684     # hardcode_libdir_flag_spec is actually meaningless, as there is
5685     # no search path for DLLs.
5686     hardcode_libdir_flag_spec=' '
5687     allow_undefined_flag=unsupported
5688     # Tell ltmain to make .lib files, not .a files.
5689     libext=lib
5690     # FIXME: Setting linknames here is a bad hack.
5691     archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | sed -e '\''s/ -lc$//'\''` -link -dll~linknames='
5692     # The linker will automatically build a .lib file if we build a DLL.
5693     old_archive_from_new_cmds='true'
5694     # FIXME: Should let the user specify the lib program.
5695     old_archive_cmds='lib /OUT:$oldlib$oldobjs$old_deplibs'
5696     fix_srcfile_path='`cygpath -w "$srcfile"`'
5697     ;;
5698
5699   darwin* | rhapsody*)
5700     case "$host_os" in
5701     rhapsody* | darwin1.[012])
5702       allow_undefined_flag='-undefined suppress'
5703       ;;
5704     *) # Darwin 1.3 on
5705       allow_undefined_flag='-flat_namespace -undefined suppress'
5706       ;;
5707     esac
5708     # FIXME: Relying on posixy $() will cause problems for
5709     #        cross-compilation, but unfortunately the echo tests do not
5710     #        yet detect zsh echo's removal of \ escapes.  Also zsh mangles
5711     #        `"' quotes if we put them in here... so don't!
5712     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)'
5713     # We need to add '_' to the symbols in $export_symbols first
5714     #archive_expsym_cmds="$archive_cmds"' && strip -s $export_symbols'
5715     hardcode_direct=yes
5716     hardcode_shlibpath_var=no
5717     whole_archive_flag_spec='-all_load $convenience'
5718     ;;
5719
5720   freebsd1*)
5721     ld_shlibs=no
5722     ;;
5723
5724   # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
5725   # support.  Future versions do this automatically, but an explicit c++rt0.o
5726   # does not break anything, and helps significantly (at the cost of a little
5727   # extra space).
5728   freebsd2.2*)
5729     archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
5730     hardcode_libdir_flag_spec='-R$libdir'
5731     hardcode_direct=yes
5732     hardcode_shlibpath_var=no
5733     ;;
5734
5735   # Unfortunately, older versions of FreeBSD 2 do not have this feature.
5736   freebsd2*)
5737     archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5738     hardcode_direct=yes
5739     hardcode_minus_L=yes
5740     hardcode_shlibpath_var=no
5741     ;;
5742
5743   # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
5744   freebsd*)
5745     archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
5746     hardcode_libdir_flag_spec='-R$libdir'
5747     hardcode_direct=yes
5748     hardcode_shlibpath_var=no
5749     ;;
5750
5751   hpux9* | hpux10* | hpux11*)
5752     case $host_os in
5753     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' ;;
5754     *) archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' ;;
5755     esac
5756     hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
5757     hardcode_libdir_separator=:
5758     hardcode_direct=yes
5759     hardcode_minus_L=yes # Not in the search PATH, but as the default
5760                          # location of the library.
5761     export_dynamic_flag_spec='${wl}-E'
5762     ;;
5763
5764   irix5* | irix6* | nonstopux*)
5765     if test "$GCC" = yes; then
5766       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'
5767       hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5768     else
5769       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'
5770       hardcode_libdir_flag_spec='-rpath $libdir'
5771     fi
5772     hardcode_libdir_separator=:
5773     link_all_deplibs=yes
5774     ;;
5775
5776   netbsd*)
5777     if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
5778       archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
5779     else
5780       archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
5781     fi
5782     hardcode_libdir_flag_spec='-R$libdir'
5783     hardcode_direct=yes
5784     hardcode_shlibpath_var=no
5785     ;;
5786
5787   newsos6)
5788     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5789     hardcode_direct=yes
5790     hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5791     hardcode_libdir_separator=:
5792     hardcode_shlibpath_var=no
5793     ;;
5794
5795   openbsd*)
5796     hardcode_direct=yes
5797     hardcode_shlibpath_var=no
5798     if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
5799       archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5800       hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
5801       export_dynamic_flag_spec='${wl}-E'
5802     else
5803       case "$host_os" in
5804       openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
5805         archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5806         hardcode_libdir_flag_spec='-R$libdir'
5807         ;;
5808       *)
5809         archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5810         hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
5811         ;;
5812       esac
5813     fi
5814     ;;
5815
5816   openedition*)
5817     archive_cmds="\$CC -Wl,DLL \$libobjs \$deplibs \$compiler_flags -o \$lib &&
5818         cp \$linknames \$output_objdir && linknames=''"
5819     export_dynamic_flag_spec="-Wl,DLL"
5820     ;;
5821
5822   os2*)
5823     hardcode_libdir_flag_spec='-L$libdir'
5824     hardcode_minus_L=yes
5825     allow_undefined_flag=unsupported
5826     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'
5827     old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
5828     ;;
5829
5830   osf3*)
5831     if test "$GCC" = yes; then
5832       allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
5833       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'
5834     else
5835       allow_undefined_flag=' -expect_unresolved \*'
5836       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'
5837     fi
5838     hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5839     hardcode_libdir_separator=:
5840     ;;
5841
5842   osf4* | osf5*)        # as osf3* with the addition of -msym flag
5843     if test "$GCC" = yes; then
5844       allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
5845       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'
5846       hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5847     else
5848       allow_undefined_flag=' -expect_unresolved \*'
5849       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'
5850       archive_expsym_cmds='for i in `cat $export_symbols`; do printf "-exported_symbol " >> $lib.exp; echo "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
5851       $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'
5852
5853       #Both c and cxx compiler support -rpath directly
5854       hardcode_libdir_flag_spec='-rpath $libdir'
5855     fi
5856     hardcode_libdir_separator=:
5857     ;;
5858
5859   sco3.2v5*)
5860     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5861     hardcode_shlibpath_var=no
5862     runpath_var=LD_RUN_PATH
5863     hardcode_runpath_var=yes
5864     export_dynamic_flag_spec='${wl}-Bexport'
5865     ;;
5866
5867   solaris*)
5868     # gcc --version < 3.0 without binutils cannot create self contained
5869     # shared libraries reliably, requiring libgcc.a to resolve some of
5870     # the object symbols generated in some cases.  Libraries that use
5871     # assert need libgcc.a to resolve __eprintf, for example.  Linking
5872     # a copy of libgcc.a into every shared library to guarantee resolving
5873     # such symbols causes other problems:  According to Tim Van Holder
5874     # <tim.van.holder@pandora.be>, C++ libraries end up with a separate
5875     # (to the application) exception stack for one thing.
5876     no_undefined_flag=' -z defs'
5877     if test "$GCC" = yes; then
5878       case `$CC --version 2>/dev/null` in
5879       [12].*)
5880         cat <<EOF 1>&2
5881
5882 *** Warning: Releases of GCC earlier than version 3.0 cannot reliably
5883 *** create self contained shared libraries on Solaris systems, without
5884 *** introducing a dependency on libgcc.a.  Therefore, libtool is disabling
5885 *** -no-undefined support, which will at least allow you to build shared
5886 *** libraries.  However, you may find that when you link such libraries
5887 *** into an application without using GCC, you have to manually add
5888 *** \`gcc --print-libgcc-file-name\` to the link command.  We urge you to
5889 *** upgrade to a newer version of GCC.  Another option is to rebuild your
5890 *** current GCC to use the GNU linker from GNU binutils 2.9.1 or newer.
5891
5892 EOF
5893         no_undefined_flag=
5894         ;;
5895       esac
5896     fi
5897     # $CC -shared without GNU ld will not create a library from C++
5898     # object files and a static libstdc++, better avoid it by now
5899     archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
5900     archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
5901                 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
5902     hardcode_libdir_flag_spec='-R$libdir'
5903     hardcode_shlibpath_var=no
5904     case $host_os in
5905     solaris2.[0-5] | solaris2.[0-5].*) ;;
5906     *) # Supported since Solaris 2.6 (maybe 2.5.1?)
5907       whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;;
5908     esac
5909     link_all_deplibs=yes
5910     ;;
5911
5912   sunos4*)
5913     if test "x$host_vendor" = xsequent; then
5914       # Use $CC to link under sequent, because it throws in some extra .o
5915       # files that make .init and .fini sections work.
5916       archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
5917     else
5918       archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
5919     fi
5920     hardcode_libdir_flag_spec='-L$libdir'
5921     hardcode_direct=yes
5922     hardcode_minus_L=yes
5923     hardcode_shlibpath_var=no
5924     ;;
5925
5926   sysv4)
5927     case $host_vendor in
5928       sni)
5929         archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5930         hardcode_direct=yes # is this really true???
5931         ;;
5932       siemens)
5933         ## LD is ld it makes a PLAMLIB
5934         ## CC just makes a GrossModule.
5935         archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
5936         reload_cmds='$CC -r -o $output$reload_objs'
5937         hardcode_direct=no
5938         ;;
5939       motorola)
5940         archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5941         hardcode_direct=no #Motorola manual says yes, but my tests say they lie
5942         ;;
5943     esac
5944     runpath_var='LD_RUN_PATH'
5945     hardcode_shlibpath_var=no
5946     ;;
5947
5948   sysv4.3*)
5949     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5950     hardcode_shlibpath_var=no
5951     export_dynamic_flag_spec='-Bexport'
5952     ;;
5953
5954   sysv5*)
5955     no_undefined_flag=' -z text'
5956     # $CC -shared without GNU ld will not create a library from C++
5957     # object files and a static libstdc++, better avoid it by now
5958     archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
5959     archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
5960                 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
5961     hardcode_libdir_flag_spec=
5962     hardcode_shlibpath_var=no
5963     runpath_var='LD_RUN_PATH'
5964     ;;
5965
5966   uts4*)
5967     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5968     hardcode_libdir_flag_spec='-L$libdir'
5969     hardcode_shlibpath_var=no
5970     ;;
5971
5972   dgux*)
5973     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5974     hardcode_libdir_flag_spec='-L$libdir'
5975     hardcode_shlibpath_var=no
5976     ;;
5977
5978   sysv4*MP*)
5979     if test -d /usr/nec; then
5980       archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5981       hardcode_shlibpath_var=no
5982       runpath_var=LD_RUN_PATH
5983       hardcode_runpath_var=yes
5984       ld_shlibs=yes
5985     fi
5986     ;;
5987
5988   sysv4.2uw2*)
5989     archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
5990     hardcode_direct=yes
5991     hardcode_minus_L=no
5992     hardcode_shlibpath_var=no
5993     hardcode_runpath_var=yes
5994     runpath_var=LD_RUN_PATH
5995     ;;
5996
5997   sysv5uw7* | unixware7*)
5998     no_undefined_flag='${wl}-z ${wl}text'
5999     if test "$GCC" = yes; then
6000       archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6001     else
6002       archive_cmds='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6003     fi
6004     runpath_var='LD_RUN_PATH'
6005     hardcode_shlibpath_var=no
6006     ;;
6007
6008   *)
6009     ld_shlibs=no
6010     ;;
6011   esac
6012 fi
6013 echo "$ac_t""$ld_shlibs" 1>&6
6014 test "$ld_shlibs" = no && can_build_shared=no
6015
6016 # Check hardcoding attributes.
6017 echo $ac_n "checking how to hardcode library paths into programs""... $ac_c" 1>&6
6018 echo "configure:6017: checking how to hardcode library paths into programs" >&5
6019 hardcode_action=
6020 if test -n "$hardcode_libdir_flag_spec" || \
6021    test -n "$runpath_var"; then
6022
6023   # We can hardcode non-existant directories.
6024   if test "$hardcode_direct" != no &&
6025      # If the only mechanism to avoid hardcoding is shlibpath_var, we
6026      # have to relink, otherwise we might link with an installed library
6027      # when we should be linking with a yet-to-be-installed one
6028      ## test "$hardcode_shlibpath_var" != no &&
6029      test "$hardcode_minus_L" != no; then
6030     # Linking always hardcodes the temporary library directory.
6031     hardcode_action=relink
6032   else
6033     # We can link without hardcoding, and we can hardcode nonexisting dirs.
6034     hardcode_action=immediate
6035   fi
6036 else
6037   # We cannot hardcode anything, or else we can only hardcode existing
6038   # directories.
6039   hardcode_action=unsupported
6040 fi
6041 echo "$ac_t""$hardcode_action" 1>&6
6042
6043 striplib=
6044 old_striplib=
6045 echo $ac_n "checking whether stripping libraries is possible""... $ac_c" 1>&6
6046 echo "configure:6045: checking whether stripping libraries is possible" >&5
6047 if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
6048   test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
6049   test -z "$striplib" && striplib="$STRIP --strip-unneeded"
6050   echo "$ac_t""yes" 1>&6
6051 else
6052   echo "$ac_t""no" 1>&6
6053 fi
6054
6055 reload_cmds='$LD$reload_flag -o $output$reload_objs'
6056 test -z "$deplibs_check_method" && deplibs_check_method=unknown
6057
6058 # PORTME Fill in your ld.so characteristics
6059 echo $ac_n "checking dynamic linker characteristics""... $ac_c" 1>&6
6060 echo "configure:6059: checking dynamic linker characteristics" >&5
6061 library_names_spec=
6062 libname_spec='lib$name'
6063 soname_spec=
6064 postinstall_cmds=
6065 postuninstall_cmds=
6066 finish_cmds=
6067 finish_eval=
6068 shlibpath_var=
6069 shlibpath_overrides_runpath=unknown
6070 version_type=none
6071 dynamic_linker="$host_os ld.so"
6072 sys_lib_dlsearch_path_spec="/lib /usr/lib"
6073 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
6074
6075 case $host_os in
6076 aix3*)
6077   version_type=linux
6078   library_names_spec='${libname}${release}.so$versuffix $libname.a'
6079   shlibpath_var=LIBPATH
6080
6081   # AIX has no versioning support, so we append a major version to the name.
6082   soname_spec='${libname}${release}.so$major'
6083   ;;
6084
6085 aix4* | aix5*)
6086   version_type=linux
6087   need_lib_prefix=no
6088   need_version=no
6089   hardcode_into_libs=yes
6090   if test "$host_cpu" = ia64; then
6091     # AIX 5 supports IA64
6092     library_names_spec='${libname}${release}.so$major ${libname}${release}.so$versuffix $libname.so'
6093     shlibpath_var=LD_LIBRARY_PATH
6094   else
6095     # With GCC up to 2.95.x, collect2 would create an import file
6096     # for dependence libraries.  The import file would start with
6097     # the line `#! .'.  This would cause the generated library to
6098     # depend on `.', always an invalid library.  This was fixed in
6099     # development snapshots of GCC prior to 3.0.
6100     case $host_os in
6101       aix4 | aix4.[01] | aix4.[01].*)
6102         if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
6103              echo ' yes '
6104              echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
6105           :
6106         else
6107           can_build_shared=no
6108         fi
6109         ;;
6110     esac
6111     # AIX (on Power*) has no versioning support, so currently we can
6112     # not hardcode correct soname into executable. Probably we can
6113     # add versioning support to collect2, so additional links can
6114     # be useful in future.
6115     if test "$aix_use_runtimelinking" = yes; then
6116       # If using run time linking (on AIX 4.2 or later) use lib<name>.so
6117       # instead of lib<name>.a to let people know that these are not
6118       # typical AIX shared libraries.
6119       library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6120     else
6121       # We preserve .a as extension for shared libraries through AIX4.2
6122       # and later when we are not doing run time linking.
6123       library_names_spec='${libname}${release}.a $libname.a'
6124       soname_spec='${libname}${release}.so$major'
6125     fi
6126     shlibpath_var=LIBPATH
6127   fi
6128   hardcode_into_libs=yes
6129   ;;
6130
6131 amigaos*)
6132   library_names_spec='$libname.ixlibrary $libname.a'
6133   # Create ${libname}_ixlibrary.a entries in /sys/libs.
6134   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'
6135   ;;
6136
6137 beos*)
6138   library_names_spec='${libname}.so'
6139   dynamic_linker="$host_os ld.so"
6140   shlibpath_var=LIBRARY_PATH
6141   ;;
6142
6143 bsdi4*)
6144   version_type=linux
6145   need_version=no
6146   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6147   soname_spec='${libname}${release}.so$major'
6148   finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
6149   shlibpath_var=LD_LIBRARY_PATH
6150   sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
6151   sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
6152   export_dynamic_flag_spec=-rdynamic
6153   # the default ld.so.conf also contains /usr/contrib/lib and
6154   # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
6155   # libtool to hard-code these into programs
6156   ;;
6157
6158 cygwin* | mingw* | pw32*)
6159   version_type=windows
6160   need_version=no
6161   need_lib_prefix=no
6162   case $GCC,$host_os in
6163   yes,cygwin*)
6164     library_names_spec='$libname.dll.a'
6165     soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
6166     postinstall_cmds='dlpath=`bash 2>&1 -c '\''. $dir/${file}i;echo \$dlname'\''`~
6167       dldir=$destdir/`dirname \$dlpath`~
6168       test -d \$dldir || mkdir -p \$dldir~
6169       $install_prog .libs/$dlname \$dldir/$dlname'
6170     postuninstall_cmds='dldll=`bash 2>&1 -c '\''. $file; echo \$dlname'\''`~
6171       dlpath=$dir/\$dldll~
6172        $rm \$dlpath'
6173     ;;
6174   yes,mingw*)
6175     library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
6176     sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | sed -e "s/^libraries://" -e "s/;/ /g" -e "s,=/,/,g"`
6177     ;;
6178   yes,pw32*)
6179     library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | sed -e 's/./-/g'`${versuffix}.dll'
6180     ;;
6181   *)
6182     library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll $libname.lib'
6183     ;;
6184   esac
6185   dynamic_linker='Win32 ld.exe'
6186   # FIXME: first we should search . and the directory the executable is in
6187   shlibpath_var=PATH
6188   ;;
6189
6190 darwin* | rhapsody*)
6191   dynamic_linker="$host_os dyld"
6192   version_type=darwin
6193   need_lib_prefix=no
6194   need_version=no
6195   # FIXME: Relying on posixy $() will cause problems for
6196   #        cross-compilation, but unfortunately the echo tests do not
6197   #        yet detect zsh echo's removal of \ escapes.
6198   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)'
6199   soname_spec='${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib)'
6200   shlibpath_overrides_runpath=yes
6201   shlibpath_var=DYLD_LIBRARY_PATH
6202   ;;
6203
6204 freebsd1*)
6205   dynamic_linker=no
6206   ;;
6207
6208 freebsd*)
6209   objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
6210   version_type=freebsd-$objformat
6211   case $version_type in
6212     freebsd-elf*)
6213       library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
6214       need_version=no
6215       need_lib_prefix=no
6216       ;;
6217     freebsd-*)
6218       library_names_spec='${libname}${release}.so$versuffix $libname.so$versuffix'
6219       need_version=yes
6220       ;;
6221   esac
6222   shlibpath_var=LD_LIBRARY_PATH
6223   case $host_os in
6224   freebsd2*)
6225     shlibpath_overrides_runpath=yes
6226     ;;
6227   *)
6228     shlibpath_overrides_runpath=no
6229     hardcode_into_libs=yes
6230     ;;
6231   esac
6232   ;;
6233
6234 gnu*)
6235   version_type=linux
6236   need_lib_prefix=no
6237   need_version=no
6238   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so${major} ${libname}.so'
6239   soname_spec='${libname}${release}.so$major'
6240   shlibpath_var=LD_LIBRARY_PATH
6241   hardcode_into_libs=yes
6242   ;;
6243
6244 hpux9* | hpux10* | hpux11*)
6245   # Give a soname corresponding to the major version so that dld.sl refuses to
6246   # link against other versions.
6247   dynamic_linker="$host_os dld.sl"
6248   version_type=sunos
6249   need_lib_prefix=no
6250   need_version=no
6251   shlibpath_var=SHLIB_PATH
6252   shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
6253   library_names_spec='${libname}${release}.sl$versuffix ${libname}${release}.sl$major $libname.sl'
6254   soname_spec='${libname}${release}.sl$major'
6255   # HP-UX runs *really* slowly unless shared libraries are mode 555.
6256   postinstall_cmds='chmod 555 $lib'
6257   ;;
6258
6259 irix5* | irix6* | nonstopux*)
6260   case $host_os in
6261     nonstopux*) version_type=nonstopux ;;
6262     *)          version_type=irix ;;
6263   esac
6264   need_lib_prefix=no
6265   need_version=no
6266   soname_spec='${libname}${release}.so$major'
6267   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so $libname.so'
6268   case $host_os in
6269   irix5* | nonstopux*)
6270     libsuff= shlibsuff=
6271     ;;
6272   *)
6273     case $LD in # libtool.m4 will add one of these switches to LD
6274     *-32|*"-32 ") libsuff= shlibsuff= libmagic=32-bit;;
6275     *-n32|*"-n32 ") libsuff=32 shlibsuff=N32 libmagic=N32;;
6276     *-64|*"-64 ") libsuff=64 shlibsuff=64 libmagic=64-bit;;
6277     *) libsuff= shlibsuff= libmagic=never-match;;
6278     esac
6279     ;;
6280   esac
6281   shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
6282   shlibpath_overrides_runpath=no
6283   sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
6284   sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
6285   ;;
6286
6287 # No shared lib support for Linux oldld, aout, or coff.
6288 linux-gnuoldld* | linux-gnuaout* | linux-gnucoff*)
6289   dynamic_linker=no
6290   ;;
6291
6292 # This must be Linux ELF.
6293 linux-gnu*)
6294   version_type=linux
6295   need_lib_prefix=no
6296   need_version=no
6297   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6298   soname_spec='${libname}${release}.so$major'
6299   finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
6300   shlibpath_var=LD_LIBRARY_PATH
6301   shlibpath_overrides_runpath=no
6302   # This implies no fast_install, which is unacceptable.
6303   # Some rework will be needed to allow for fast_install
6304   # before this can be enabled.
6305   hardcode_into_libs=yes
6306
6307   # We used to test for /lib/ld.so.1 and disable shared libraries on
6308   # powerpc, because MkLinux only supported shared libraries with the
6309   # GNU dynamic linker.  Since this was broken with cross compilers,
6310   # most powerpc-linux boxes support dynamic linking these days and
6311   # people can always --disable-shared, the test was removed, and we
6312   # assume the GNU/Linux dynamic linker is in use.
6313   dynamic_linker='GNU/Linux ld.so'
6314   ;;
6315
6316 netbsd*)
6317   version_type=sunos
6318   need_lib_prefix=no
6319   need_version=no
6320   if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
6321     library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
6322     finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
6323     dynamic_linker='NetBSD (a.out) ld.so'
6324   else
6325     library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so ${libname}.so'
6326     soname_spec='${libname}${release}.so$major'
6327     dynamic_linker='NetBSD ld.elf_so'
6328   fi
6329   shlibpath_var=LD_LIBRARY_PATH
6330   shlibpath_overrides_runpath=yes
6331   hardcode_into_libs=yes
6332   ;;
6333
6334 newsos6)
6335   version_type=linux
6336   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6337   shlibpath_var=LD_LIBRARY_PATH
6338   shlibpath_overrides_runpath=yes
6339   ;;
6340
6341 openbsd*)
6342   version_type=sunos
6343   need_lib_prefix=no
6344   need_version=no
6345   if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
6346     case "$host_os" in
6347     openbsd2.[89] | openbsd2.[89].*)
6348       shlibpath_overrides_runpath=no
6349       ;;
6350     *)
6351       shlibpath_overrides_runpath=yes
6352       ;;
6353     esac
6354   else
6355     shlibpath_overrides_runpath=yes
6356   fi
6357   library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
6358   finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
6359   shlibpath_var=LD_LIBRARY_PATH
6360   ;;
6361
6362 openedition*)
6363   need_lib_prefix=no
6364   need_version=no
6365   shlibpath_overrides_runpath=yes
6366   shlibpath_var=LIBPATH
6367   postinstall_cmds="rm \$destdir/\$linkname; cp \$linkname \$destdir; chmod a+x \$lib"
6368   # the library's exports are in libname.x; this is the file that must
6369   # actually be linked with to use a DLL.
6370   library_names_spec="\${libname}\${release}.so\$versuffix \${libname}.x"
6371   ;;
6372
6373 os2*)
6374   libname_spec='$name'
6375   need_lib_prefix=no
6376   library_names_spec='$libname.dll $libname.a'
6377   dynamic_linker='OS/2 ld.exe'
6378   shlibpath_var=LIBPATH
6379   ;;
6380
6381 osf3* | osf4* | osf5*)
6382   version_type=osf
6383   need_version=no
6384   soname_spec='${libname}${release}.so$major'
6385   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6386   shlibpath_var=LD_LIBRARY_PATH
6387   sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
6388   sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
6389   hardcode_into_libs=yes
6390   ;;
6391
6392 sco3.2v5*)
6393   version_type=osf
6394   soname_spec='${libname}${release}.so$major'
6395   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6396   shlibpath_var=LD_LIBRARY_PATH
6397   ;;
6398
6399 solaris*)
6400   version_type=linux
6401   need_lib_prefix=no
6402   need_version=no
6403   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6404   soname_spec='${libname}${release}.so$major'
6405   shlibpath_var=LD_LIBRARY_PATH
6406   shlibpath_overrides_runpath=yes
6407   hardcode_into_libs=yes
6408   # ldd complains unless libraries are executable
6409   postinstall_cmds='chmod +x $lib'
6410   ;;
6411
6412 sunos4*)
6413   version_type=sunos
6414   library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
6415   finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
6416   shlibpath_var=LD_LIBRARY_PATH
6417   shlibpath_overrides_runpath=yes
6418   if test "$with_gnu_ld" = yes; then
6419     need_lib_prefix=no
6420   fi
6421   need_version=yes
6422   ;;
6423
6424 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
6425   version_type=linux
6426   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6427   soname_spec='${libname}${release}.so$major'
6428   shlibpath_var=LD_LIBRARY_PATH
6429   case $host_vendor in
6430     sni)
6431       shlibpath_overrides_runpath=no
6432       need_lib_prefix=no
6433       export_dynamic_flag_spec='${wl}-Blargedynsym'
6434       runpath_var=LD_RUN_PATH
6435       ;;
6436     siemens)
6437       need_lib_prefix=no
6438       ;;
6439     motorola)
6440       need_lib_prefix=no
6441       need_version=no
6442       shlibpath_overrides_runpath=no
6443       sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
6444       ;;
6445   esac
6446   ;;
6447
6448 uts4*)
6449   version_type=linux
6450   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6451   soname_spec='${libname}${release}.so$major'
6452   shlibpath_var=LD_LIBRARY_PATH
6453   ;;
6454
6455 dgux*)
6456   version_type=linux
6457   need_lib_prefix=no
6458   need_version=no
6459   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6460   soname_spec='${libname}${release}.so$major'
6461   shlibpath_var=LD_LIBRARY_PATH
6462   ;;
6463
6464 sysv4*MP*)
6465   if test -d /usr/nec ;then
6466     version_type=linux
6467     library_names_spec='$libname.so.$versuffix $libname.so.$major $libname.so'
6468     soname_spec='$libname.so.$major'
6469     shlibpath_var=LD_LIBRARY_PATH
6470   fi
6471   ;;
6472
6473 *)
6474   dynamic_linker=no
6475   ;;
6476 esac
6477 echo "$ac_t""$dynamic_linker" 1>&6
6478 test "$dynamic_linker" = no && can_build_shared=no
6479
6480 # Report the final consequences.
6481 echo $ac_n "checking if libtool supports shared libraries""... $ac_c" 1>&6
6482 echo "configure:6481: checking if libtool supports shared libraries" >&5
6483 echo "$ac_t""$can_build_shared" 1>&6
6484
6485 echo $ac_n "checking whether to build shared libraries""... $ac_c" 1>&6
6486 echo "configure:6485: checking whether to build shared libraries" >&5
6487 test "$can_build_shared" = "no" && enable_shared=no
6488
6489 # On AIX, shared libraries and static libraries use the same namespace, and
6490 # are all built from PIC.
6491 case "$host_os" in
6492 aix3*)
6493   test "$enable_shared" = yes && enable_static=no
6494   if test -n "$RANLIB"; then
6495     archive_cmds="$archive_cmds~\$RANLIB \$lib"
6496     postinstall_cmds='$RANLIB $lib'
6497   fi
6498   ;;
6499
6500 aix4*)
6501   if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
6502     test "$enable_shared" = yes && enable_static=no
6503   fi
6504   ;;
6505 esac
6506 echo "$ac_t""$enable_shared" 1>&6
6507
6508 echo $ac_n "checking whether to build static libraries""... $ac_c" 1>&6
6509 echo "configure:6508: checking whether to build static libraries" >&5
6510 # Make sure either enable_shared or enable_static is yes.
6511 test "$enable_shared" = yes || enable_static=yes
6512 echo "$ac_t""$enable_static" 1>&6
6513
6514 if test "$hardcode_action" = relink; then
6515   # Fast installation is not supported
6516   enable_fast_install=no
6517 elif test "$shlibpath_overrides_runpath" = yes ||
6518      test "$enable_shared" = no; then
6519   # Fast installation is not necessary
6520   enable_fast_install=needless
6521 fi
6522
6523 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
6524 if test "$GCC" = yes; then
6525   variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
6526 fi
6527
6528 if test "x$enable_dlopen" != xyes; then
6529   enable_dlopen=unknown
6530   enable_dlopen_self=unknown
6531   enable_dlopen_self_static=unknown
6532 else
6533   lt_cv_dlopen=no
6534   lt_cv_dlopen_libs=
6535
6536   case $host_os in
6537   beos*)
6538     lt_cv_dlopen="load_add_on"
6539     lt_cv_dlopen_libs=
6540     lt_cv_dlopen_self=yes
6541     ;;
6542
6543   cygwin* | mingw* | pw32*)
6544     lt_cv_dlopen="LoadLibrary"
6545     lt_cv_dlopen_libs=
6546    ;;
6547
6548   *)
6549     echo $ac_n "checking for dllload""... $ac_c" 1>&6
6550 echo "configure:6549: checking for dllload" >&5
6551 if eval "test \"\${ac_cv_func_dllload+set}\" = set"; then
6552   echo $ac_n "(cached) $ac_c" 1>&6
6553 else
6554   cat > conftest.$ac_ext <<EOF
6555 #line 6554 "configure"
6556 #include "confdefs.h"
6557 /* System header to define __stub macros and hopefully few prototypes,
6558     which can conflict with char dllload(); below.  */
6559 #include <assert.h>
6560 /* Override any gcc2 internal prototype to avoid an error.  */
6561 /* We use char because int might match the return type of a gcc2
6562     builtin and then its argument prototype would still apply.  */
6563 char dllload();
6564 char (*f)();
6565
6566 int main() {
6567
6568 /* The GNU C library defines this for functions which it implements
6569     to always fail with ENOSYS.  Some functions are actually named
6570     something starting with __ and the normal name is an alias.  */
6571 #if defined (__stub_dllload) || defined (__stub___dllload)
6572 choke me
6573 #else
6574 f = dllload;
6575 #endif
6576
6577 ; return 0; }
6578 EOF
6579 if { (eval echo configure:6578: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6580   rm -rf conftest*
6581   eval "ac_cv_func_dllload=yes"
6582 else
6583   echo "configure: failed program was:" >&5
6584   cat conftest.$ac_ext >&5
6585   rm -rf conftest*
6586   eval "ac_cv_func_dllload=no"
6587 fi
6588 rm -f conftest*
6589 fi
6590
6591 if eval "test \"`echo '$ac_cv_func_'dllload`\" = yes"; then
6592   echo "$ac_t""yes" 1>&6
6593   lt_cv_dlopen="dllload"
6594 else
6595   echo "$ac_t""no" 1>&6
6596 echo $ac_n "checking for shl_load""... $ac_c" 1>&6
6597 echo "configure:6596: checking for shl_load" >&5
6598 if eval "test \"\${ac_cv_func_shl_load+set}\" = set"; then
6599   echo $ac_n "(cached) $ac_c" 1>&6
6600 else
6601   cat > conftest.$ac_ext <<EOF
6602 #line 6601 "configure"
6603 #include "confdefs.h"
6604 /* System header to define __stub macros and hopefully few prototypes,
6605     which can conflict with char shl_load(); below.  */
6606 #include <assert.h>
6607 /* Override any gcc2 internal prototype to avoid an error.  */
6608 /* We use char because int might match the return type of a gcc2
6609     builtin and then its argument prototype would still apply.  */
6610 char shl_load();
6611 char (*f)();
6612
6613 int main() {
6614
6615 /* The GNU C library defines this for functions which it implements
6616     to always fail with ENOSYS.  Some functions are actually named
6617     something starting with __ and the normal name is an alias.  */
6618 #if defined (__stub_shl_load) || defined (__stub___shl_load)
6619 choke me
6620 #else
6621 f = shl_load;
6622 #endif
6623
6624 ; return 0; }
6625 EOF
6626 if { (eval echo configure:6625: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6627   rm -rf conftest*
6628   eval "ac_cv_func_shl_load=yes"
6629 else
6630   echo "configure: failed program was:" >&5
6631   cat conftest.$ac_ext >&5
6632   rm -rf conftest*
6633   eval "ac_cv_func_shl_load=no"
6634 fi
6635 rm -f conftest*
6636 fi
6637
6638 if eval "test \"`echo '$ac_cv_func_'shl_load`\" = yes"; then
6639   echo "$ac_t""yes" 1>&6
6640   lt_cv_dlopen="shl_load"
6641 else
6642   echo "$ac_t""no" 1>&6
6643 echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
6644 echo "configure:6643: checking for shl_load in -ldld" >&5
6645 ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-:%__p__%'`
6646 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6647   echo $ac_n "(cached) $ac_c" 1>&6
6648 else
6649   ac_save_LIBS="$LIBS"
6650 LIBS="-ldld  $LIBS"
6651 cat > conftest.$ac_ext <<EOF
6652 #line 6651 "configure"
6653 #include "confdefs.h"
6654 /* Override any gcc2 internal prototype to avoid an error.  */
6655 /* We use char because int might match the return type of a gcc2
6656     builtin and then its argument prototype would still apply.  */
6657 char shl_load();
6658
6659 int main() {
6660 shl_load()
6661 ; return 0; }
6662 EOF
6663 if { (eval echo configure:6662: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6664   rm -rf conftest*
6665   eval "ac_cv_lib_$ac_lib_var=yes"
6666 else
6667   echo "configure: failed program was:" >&5
6668   cat conftest.$ac_ext >&5
6669   rm -rf conftest*
6670   eval "ac_cv_lib_$ac_lib_var=no"
6671 fi
6672 rm -f conftest*
6673 LIBS="$ac_save_LIBS"
6674
6675 fi
6676 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6677   echo "$ac_t""yes" 1>&6
6678   lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"
6679 else
6680   echo "$ac_t""no" 1>&6
6681 echo $ac_n "checking for dlopen""... $ac_c" 1>&6
6682 echo "configure:6681: checking for dlopen" >&5
6683 if eval "test \"\${ac_cv_func_dlopen+set}\" = set"; then
6684   echo $ac_n "(cached) $ac_c" 1>&6
6685 else
6686   cat > conftest.$ac_ext <<EOF
6687 #line 6686 "configure"
6688 #include "confdefs.h"
6689 /* System header to define __stub macros and hopefully few prototypes,
6690     which can conflict with char dlopen(); below.  */
6691 #include <assert.h>
6692 /* Override any gcc2 internal prototype to avoid an error.  */
6693 /* We use char because int might match the return type of a gcc2
6694     builtin and then its argument prototype would still apply.  */
6695 char dlopen();
6696 char (*f)();
6697
6698 int main() {
6699
6700 /* The GNU C library defines this for functions which it implements
6701     to always fail with ENOSYS.  Some functions are actually named
6702     something starting with __ and the normal name is an alias.  */
6703 #if defined (__stub_dlopen) || defined (__stub___dlopen)
6704 choke me
6705 #else
6706 f = dlopen;
6707 #endif
6708
6709 ; return 0; }
6710 EOF
6711 if { (eval echo configure:6710: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6712   rm -rf conftest*
6713   eval "ac_cv_func_dlopen=yes"
6714 else
6715   echo "configure: failed program was:" >&5
6716   cat conftest.$ac_ext >&5
6717   rm -rf conftest*
6718   eval "ac_cv_func_dlopen=no"
6719 fi
6720 rm -f conftest*
6721 fi
6722
6723 if eval "test \"`echo '$ac_cv_func_'dlopen`\" = yes"; then
6724   echo "$ac_t""yes" 1>&6
6725   lt_cv_dlopen="dlopen"
6726 else
6727   echo "$ac_t""no" 1>&6
6728 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
6729 echo "configure:6728: checking for dlopen in -ldl" >&5
6730 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-:%__p__%'`
6731 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6732   echo $ac_n "(cached) $ac_c" 1>&6
6733 else
6734   ac_save_LIBS="$LIBS"
6735 LIBS="-ldl  $LIBS"
6736 cat > conftest.$ac_ext <<EOF
6737 #line 6736 "configure"
6738 #include "confdefs.h"
6739 /* Override any gcc2 internal prototype to avoid an error.  */
6740 /* We use char because int might match the return type of a gcc2
6741     builtin and then its argument prototype would still apply.  */
6742 char dlopen();
6743
6744 int main() {
6745 dlopen()
6746 ; return 0; }
6747 EOF
6748 if { (eval echo configure:6747: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6749   rm -rf conftest*
6750   eval "ac_cv_lib_$ac_lib_var=yes"
6751 else
6752   echo "configure: failed program was:" >&5
6753   cat conftest.$ac_ext >&5
6754   rm -rf conftest*
6755   eval "ac_cv_lib_$ac_lib_var=no"
6756 fi
6757 rm -f conftest*
6758 LIBS="$ac_save_LIBS"
6759
6760 fi
6761 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6762   echo "$ac_t""yes" 1>&6
6763   lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
6764 else
6765   echo "$ac_t""no" 1>&6
6766 echo $ac_n "checking for dlopen in -lsvld""... $ac_c" 1>&6
6767 echo "configure:6766: checking for dlopen in -lsvld" >&5
6768 ac_lib_var=`echo svld'_'dlopen | sed 'y%./+-:%__p__%'`
6769 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6770   echo $ac_n "(cached) $ac_c" 1>&6
6771 else
6772   ac_save_LIBS="$LIBS"
6773 LIBS="-lsvld  $LIBS"
6774 cat > conftest.$ac_ext <<EOF
6775 #line 6774 "configure"
6776 #include "confdefs.h"
6777 /* Override any gcc2 internal prototype to avoid an error.  */
6778 /* We use char because int might match the return type of a gcc2
6779     builtin and then its argument prototype would still apply.  */
6780 char dlopen();
6781
6782 int main() {
6783 dlopen()
6784 ; return 0; }
6785 EOF
6786 if { (eval echo configure:6785: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6787   rm -rf conftest*
6788   eval "ac_cv_lib_$ac_lib_var=yes"
6789 else
6790   echo "configure: failed program was:" >&5
6791   cat conftest.$ac_ext >&5
6792   rm -rf conftest*
6793   eval "ac_cv_lib_$ac_lib_var=no"
6794 fi
6795 rm -f conftest*
6796 LIBS="$ac_save_LIBS"
6797
6798 fi
6799 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6800   echo "$ac_t""yes" 1>&6
6801   lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"
6802 else
6803   echo "$ac_t""no" 1>&6
6804 echo $ac_n "checking for dld_link in -ldld""... $ac_c" 1>&6
6805 echo "configure:6804: checking for dld_link in -ldld" >&5
6806 ac_lib_var=`echo dld'_'dld_link | sed 'y%./+-:%__p__%'`
6807 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6808   echo $ac_n "(cached) $ac_c" 1>&6
6809 else
6810   ac_save_LIBS="$LIBS"
6811 LIBS="-ldld  $LIBS"
6812 cat > conftest.$ac_ext <<EOF
6813 #line 6812 "configure"
6814 #include "confdefs.h"
6815 /* Override any gcc2 internal prototype to avoid an error.  */
6816 /* We use char because int might match the return type of a gcc2
6817     builtin and then its argument prototype would still apply.  */
6818 char dld_link();
6819
6820 int main() {
6821 dld_link()
6822 ; return 0; }
6823 EOF
6824 if { (eval echo configure:6823: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6825   rm -rf conftest*
6826   eval "ac_cv_lib_$ac_lib_var=yes"
6827 else
6828   echo "configure: failed program was:" >&5
6829   cat conftest.$ac_ext >&5
6830   rm -rf conftest*
6831   eval "ac_cv_lib_$ac_lib_var=no"
6832 fi
6833 rm -f conftest*
6834 LIBS="$ac_save_LIBS"
6835
6836 fi
6837 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6838   echo "$ac_t""yes" 1>&6
6839   lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"
6840 else
6841   echo "$ac_t""no" 1>&6
6842 fi
6843
6844               
6845 fi
6846
6847             
6848 fi
6849
6850           
6851 fi
6852
6853         
6854 fi
6855
6856       
6857 fi
6858
6859     
6860 fi
6861
6862     ;;
6863   esac
6864
6865   if test "x$lt_cv_dlopen" != xno; then
6866     enable_dlopen=yes
6867   else
6868     enable_dlopen=no
6869   fi
6870
6871   case $lt_cv_dlopen in
6872   dlopen)
6873     save_CPPFLAGS="$CPPFLAGS"
6874         test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
6875
6876     save_LDFLAGS="$LDFLAGS"
6877     eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
6878
6879     save_LIBS="$LIBS"
6880     LIBS="$lt_cv_dlopen_libs $LIBS"
6881
6882     echo $ac_n "checking whether a program can dlopen itself""... $ac_c" 1>&6
6883 echo "configure:6882: checking whether a program can dlopen itself" >&5
6884 if eval "test \"\${lt_cv_dlopen_self+set}\" = set"; then
6885   echo $ac_n "(cached) $ac_c" 1>&6
6886 else
6887           if test "$cross_compiling" = yes; then :
6888   lt_cv_dlopen_self=cross
6889 else
6890     lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
6891   lt_status=$lt_dlunknown
6892   cat > conftest.$ac_ext <<EOF
6893 #line 6892 "configure"
6894 #include "confdefs.h"
6895
6896 #if HAVE_DLFCN_H
6897 #include <dlfcn.h>
6898 #endif
6899
6900 #include <stdio.h>
6901
6902 #ifdef RTLD_GLOBAL
6903 #  define LT_DLGLOBAL           RTLD_GLOBAL
6904 #else
6905 #  ifdef DL_GLOBAL
6906 #    define LT_DLGLOBAL         DL_GLOBAL
6907 #  else
6908 #    define LT_DLGLOBAL         0
6909 #  endif
6910 #endif
6911
6912 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
6913    find out it does not work in some platform. */
6914 #ifndef LT_DLLAZY_OR_NOW
6915 #  ifdef RTLD_LAZY
6916 #    define LT_DLLAZY_OR_NOW            RTLD_LAZY
6917 #  else
6918 #    ifdef DL_LAZY
6919 #      define LT_DLLAZY_OR_NOW          DL_LAZY
6920 #    else
6921 #      ifdef RTLD_NOW
6922 #        define LT_DLLAZY_OR_NOW        RTLD_NOW
6923 #      else
6924 #        ifdef DL_NOW
6925 #          define LT_DLLAZY_OR_NOW      DL_NOW
6926 #        else
6927 #          define LT_DLLAZY_OR_NOW      0
6928 #        endif
6929 #      endif
6930 #    endif
6931 #  endif
6932 #endif
6933
6934 #ifdef __cplusplus
6935 extern "C" void exit (int);
6936 #endif
6937
6938 void fnord() { int i=42;}
6939 int main ()
6940 {
6941   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
6942   int status = $lt_dlunknown;
6943
6944   if (self)
6945     {
6946       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
6947       else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
6948       /* dlclose (self); */
6949     }
6950
6951     exit (status);
6952 }
6953 EOF
6954   if { (eval echo configure:6953: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} 2>/dev/null; then
6955     (./conftest; exit; ) 2>/dev/null
6956     lt_status=$?
6957     case x$lt_status in
6958       x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;;
6959       x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;;
6960       x$lt_unknown|x*) lt_cv_dlopen_self=no ;;
6961     esac
6962   else :
6963     # compilation failed
6964     lt_cv_dlopen_self=no
6965   fi
6966 fi
6967 rm -fr conftest*
6968
6969     
6970 fi
6971
6972 echo "$ac_t""$lt_cv_dlopen_self" 1>&6
6973
6974     if test "x$lt_cv_dlopen_self" = xyes; then
6975       LDFLAGS="$LDFLAGS $link_static_flag"
6976       echo $ac_n "checking whether a statically linked program can dlopen itself""... $ac_c" 1>&6
6977 echo "configure:6976: checking whether a statically linked program can dlopen itself" >&5
6978 if eval "test \"\${lt_cv_dlopen_self_static+set}\" = set"; then
6979   echo $ac_n "(cached) $ac_c" 1>&6
6980 else
6981           if test "$cross_compiling" = yes; then :
6982   lt_cv_dlopen_self_static=cross
6983 else
6984     lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
6985   lt_status=$lt_dlunknown
6986   cat > conftest.$ac_ext <<EOF
6987 #line 6986 "configure"
6988 #include "confdefs.h"
6989
6990 #if HAVE_DLFCN_H
6991 #include <dlfcn.h>
6992 #endif
6993
6994 #include <stdio.h>
6995
6996 #ifdef RTLD_GLOBAL
6997 #  define LT_DLGLOBAL           RTLD_GLOBAL
6998 #else
6999 #  ifdef DL_GLOBAL
7000 #    define LT_DLGLOBAL         DL_GLOBAL
7001 #  else
7002 #    define LT_DLGLOBAL         0
7003 #  endif
7004 #endif
7005
7006 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
7007    find out it does not work in some platform. */
7008 #ifndef LT_DLLAZY_OR_NOW
7009 #  ifdef RTLD_LAZY
7010 #    define LT_DLLAZY_OR_NOW            RTLD_LAZY
7011 #  else
7012 #    ifdef DL_LAZY
7013 #      define LT_DLLAZY_OR_NOW          DL_LAZY
7014 #    else
7015 #      ifdef RTLD_NOW
7016 #        define LT_DLLAZY_OR_NOW        RTLD_NOW
7017 #      else
7018 #        ifdef DL_NOW
7019 #          define LT_DLLAZY_OR_NOW      DL_NOW
7020 #        else
7021 #          define LT_DLLAZY_OR_NOW      0
7022 #        endif
7023 #      endif
7024 #    endif
7025 #  endif
7026 #endif
7027
7028 #ifdef __cplusplus
7029 extern "C" void exit (int);
7030 #endif
7031
7032 void fnord() { int i=42;}
7033 int main ()
7034 {
7035   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
7036   int status = $lt_dlunknown;
7037
7038   if (self)
7039     {
7040       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
7041       else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
7042       /* dlclose (self); */
7043     }
7044
7045     exit (status);
7046 }
7047 EOF
7048   if { (eval echo configure:7047: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} 2>/dev/null; then
7049     (./conftest; exit; ) 2>/dev/null
7050     lt_status=$?
7051     case x$lt_status in
7052       x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;;
7053       x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;;
7054       x$lt_unknown|x*) lt_cv_dlopen_self_static=no ;;
7055     esac
7056   else :
7057     # compilation failed
7058     lt_cv_dlopen_self_static=no
7059   fi
7060 fi
7061 rm -fr conftest*
7062
7063       
7064 fi
7065
7066 echo "$ac_t""$lt_cv_dlopen_self_static" 1>&6
7067     fi
7068
7069     CPPFLAGS="$save_CPPFLAGS"
7070     LDFLAGS="$save_LDFLAGS"
7071     LIBS="$save_LIBS"
7072     ;;
7073   esac
7074
7075   case $lt_cv_dlopen_self in
7076   yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
7077   *) enable_dlopen_self=unknown ;;
7078   esac
7079
7080   case $lt_cv_dlopen_self_static in
7081   yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
7082   *) enable_dlopen_self_static=unknown ;;
7083   esac
7084 fi
7085
7086
7087 if test "$enable_shared" = yes && test "$GCC" = yes; then
7088   case $archive_cmds in
7089   *'~'*)
7090     # FIXME: we may have to deal with multi-command sequences.
7091     ;;
7092   '$CC '*)
7093     # Test whether the compiler implicitly links with -lc since on some
7094     # systems, -lgcc has to come before -lc. If gcc already passes -lc
7095     # to ld, don't add -lc before -lgcc.
7096     echo $ac_n "checking whether -lc should be explicitly linked in""... $ac_c" 1>&6
7097 echo "configure:7096: checking whether -lc should be explicitly linked in" >&5
7098     if eval "test \"\${lt_cv_archive_cmds_need_lc+set}\" = set"; then
7099   echo $ac_n "(cached) $ac_c" 1>&6
7100 else
7101   $rm conftest*
7102     echo 'static int dummy;' > conftest.$ac_ext
7103
7104     if { (eval echo configure:7103: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7105       soname=conftest
7106       lib=conftest
7107       libobjs=conftest.$ac_objext
7108       deplibs=
7109       wl=$lt_cv_prog_cc_wl
7110       compiler_flags=-v
7111       linker_flags=-v
7112       verstring=
7113       output_objdir=.
7114       libname=conftest
7115       save_allow_undefined_flag=$allow_undefined_flag
7116       allow_undefined_flag=
7117       if { (eval echo configure:7116: \"$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; }
7118       then
7119         lt_cv_archive_cmds_need_lc=no
7120       else
7121         lt_cv_archive_cmds_need_lc=yes
7122       fi
7123       allow_undefined_flag=$save_allow_undefined_flag
7124     else
7125       cat conftest.err 1>&5
7126     fi
7127 fi
7128
7129     echo "$ac_t""$lt_cv_archive_cmds_need_lc" 1>&6
7130     ;;
7131   esac
7132 fi
7133 need_lc=${lt_cv_archive_cmds_need_lc-yes}
7134
7135 # The second clause should only fire when bootstrapping the
7136 # libtool distribution, otherwise you forgot to ship ltmain.sh
7137 # with your package, and you will get complaints that there are
7138 # no rules to generate ltmain.sh.
7139 if test -f "$ltmain"; then
7140   :
7141 else
7142   # If there is no Makefile yet, we rely on a make rule to execute
7143   # `config.status --recheck' to rerun these tests and create the
7144   # libtool script then.
7145   test -f Makefile && make "$ltmain"
7146 fi
7147
7148 if test -f "$ltmain"; then
7149   trap "$rm \"${ofile}T\"; exit 1" 1 2 15
7150   $rm -f "${ofile}T"
7151
7152   echo creating $ofile
7153
7154   # Now quote all the things that may contain metacharacters while being
7155   # careful not to overquote the AC_SUBSTed values.  We take copies of the
7156   # variables and quote the copies for generation of the libtool script.
7157   for var in echo old_CC old_CFLAGS SED \
7158     AR AR_FLAGS CC LD LN_S NM SHELL \
7159     reload_flag reload_cmds wl \
7160     pic_flag link_static_flag no_builtin_flag export_dynamic_flag_spec \
7161     thread_safe_flag_spec whole_archive_flag_spec libname_spec \
7162     library_names_spec soname_spec \
7163     RANLIB old_archive_cmds old_archive_from_new_cmds old_postinstall_cmds \
7164     old_postuninstall_cmds archive_cmds archive_expsym_cmds postinstall_cmds \
7165     postuninstall_cmds extract_expsyms_cmds old_archive_from_expsyms_cmds \
7166     old_striplib striplib file_magic_cmd export_symbols_cmds \
7167     deplibs_check_method allow_undefined_flag no_undefined_flag \
7168     finish_cmds finish_eval global_symbol_pipe global_symbol_to_cdecl \
7169     global_symbol_to_c_name_address \
7170     hardcode_libdir_flag_spec hardcode_libdir_separator  \
7171     sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
7172     compiler_c_o compiler_o_lo need_locks exclude_expsyms include_expsyms; do
7173
7174     case $var in
7175     reload_cmds | old_archive_cmds | old_archive_from_new_cmds | \
7176     old_postinstall_cmds | old_postuninstall_cmds | \
7177     export_symbols_cmds | archive_cmds | archive_expsym_cmds | \
7178     extract_expsyms_cmds | old_archive_from_expsyms_cmds | \
7179     postinstall_cmds | postuninstall_cmds | \
7180     finish_cmds | sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
7181       # Double-quote double-evaled strings.
7182       eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
7183       ;;
7184     *)
7185       eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
7186       ;;
7187     esac
7188   done
7189
7190   cat <<__EOF__ > "${ofile}T"
7191 #! $SHELL
7192
7193 # `$echo "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
7194 # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
7195 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
7196 #
7197 # Copyright (C) 1996-2000 Free Software Foundation, Inc.
7198 # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
7199 #
7200 # This program is free software; you can redistribute it and/or modify
7201 # it under the terms of the GNU General Public License as published by
7202 # the Free Software Foundation; either version 2 of the License, or
7203 # (at your option) any later version.
7204 #
7205 # This program is distributed in the hope that it will be useful, but
7206 # WITHOUT ANY WARRANTY; without even the implied warranty of
7207 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
7208 # General Public License for more details.
7209 #
7210 # You should have received a copy of the GNU General Public License
7211 # along with this program; if not, write to the Free Software
7212 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
7213 #
7214 # As a special exception to the GNU General Public License, if you
7215 # distribute this file as part of a program that contains a
7216 # configuration script generated by Autoconf, you may include it under
7217 # the same distribution terms that you use for the rest of that program.
7218
7219 # A sed that does not truncate output.
7220 SED=$lt_SED
7221
7222 # Sed that helps us avoid accidentally triggering echo(1) options like -n.
7223 Xsed="${SED} -e s/^X//"
7224
7225 # The HP-UX ksh and POSIX shell print the target directory to stdout
7226 # if CDPATH is set.
7227 if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
7228
7229 # ### BEGIN LIBTOOL CONFIG
7230
7231 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
7232
7233 # Shell to use when invoking shell scripts.
7234 SHELL=$lt_SHELL
7235
7236 # Whether or not to build shared libraries.
7237 build_libtool_libs=$enable_shared
7238
7239 # Whether or not to build static libraries.
7240 build_old_libs=$enable_static
7241
7242 # Whether or not to add -lc for building shared libraries.
7243 build_libtool_need_lc=$need_lc
7244
7245 # Whether or not to optimize for fast installation.
7246 fast_install=$enable_fast_install
7247
7248 # The host system.
7249 host_alias=$host_alias
7250 host=$host
7251
7252 # An echo program that does not interpret backslashes.
7253 echo=$lt_echo
7254
7255 # The archiver.
7256 AR=$lt_AR
7257 AR_FLAGS=$lt_AR_FLAGS
7258
7259 # The default C compiler.
7260 CC=$lt_CC
7261
7262 # Is the compiler the GNU C compiler?
7263 with_gcc=$GCC
7264
7265 # The linker used to build libraries.
7266 LD=$lt_LD
7267
7268 # Whether we need hard or soft links.
7269 LN_S=$lt_LN_S
7270
7271 # A BSD-compatible nm program.
7272 NM=$lt_NM
7273
7274 # A symbol stripping program
7275 STRIP=$STRIP
7276
7277 # Used to examine libraries when file_magic_cmd begins "file"
7278 MAGIC_CMD=$MAGIC_CMD
7279
7280 # Used on cygwin: DLL creation program.
7281 DLLTOOL="$DLLTOOL"
7282
7283 # Used on cygwin: object dumper.
7284 OBJDUMP="$OBJDUMP"
7285
7286 # Used on cygwin: assembler.
7287 AS="$AS"
7288
7289 # The name of the directory that contains temporary libtool files.
7290 objdir=$objdir
7291
7292 # How to create reloadable object files.
7293 reload_flag=$lt_reload_flag
7294 reload_cmds=$lt_reload_cmds
7295
7296 # How to pass a linker flag through the compiler.
7297 wl=$lt_wl
7298
7299 # Object file suffix (normally "o").
7300 objext="$ac_objext"
7301
7302 # Old archive suffix (normally "a").
7303 libext="$libext"
7304
7305 # Executable file suffix (normally "").
7306 exeext="$exeext"
7307
7308 # Additional compiler flags for building library objects.
7309 pic_flag=$lt_pic_flag
7310 pic_mode=$pic_mode
7311
7312 # Does compiler simultaneously support -c and -o options?
7313 compiler_c_o=$lt_compiler_c_o
7314
7315 # Can we write directly to a .lo ?
7316 compiler_o_lo=$lt_compiler_o_lo
7317
7318 # Must we lock files when doing compilation ?
7319 need_locks=$lt_need_locks
7320
7321 # Do we need the lib prefix for modules?
7322 need_lib_prefix=$need_lib_prefix
7323
7324 # Do we need a version for libraries?
7325 need_version=$need_version
7326
7327 # Whether dlopen is supported.
7328 dlopen_support=$enable_dlopen
7329
7330 # Whether dlopen of programs is supported.
7331 dlopen_self=$enable_dlopen_self
7332
7333 # Whether dlopen of statically linked programs is supported.
7334 dlopen_self_static=$enable_dlopen_self_static
7335
7336 # Compiler flag to prevent dynamic linking.
7337 link_static_flag=$lt_link_static_flag
7338
7339 # Compiler flag to turn off builtin functions.
7340 no_builtin_flag=$lt_no_builtin_flag
7341
7342 # Compiler flag to allow reflexive dlopens.
7343 export_dynamic_flag_spec=$lt_export_dynamic_flag_spec
7344
7345 # Compiler flag to generate shared objects directly from archives.
7346 whole_archive_flag_spec=$lt_whole_archive_flag_spec
7347
7348 # Compiler flag to generate thread-safe objects.
7349 thread_safe_flag_spec=$lt_thread_safe_flag_spec
7350
7351 # Library versioning type.
7352 version_type=$version_type
7353
7354 # Format of library name prefix.
7355 libname_spec=$lt_libname_spec
7356
7357 # List of archive names.  First name is the real one, the rest are links.
7358 # The last name is the one that the linker finds with -lNAME.
7359 library_names_spec=$lt_library_names_spec
7360
7361 # The coded name of the library, if different from the real name.
7362 soname_spec=$lt_soname_spec
7363
7364 # Commands used to build and install an old-style archive.
7365 RANLIB=$lt_RANLIB
7366 old_archive_cmds=$lt_old_archive_cmds
7367 old_postinstall_cmds=$lt_old_postinstall_cmds
7368 old_postuninstall_cmds=$lt_old_postuninstall_cmds
7369
7370 # Create an old-style archive from a shared archive.
7371 old_archive_from_new_cmds=$lt_old_archive_from_new_cmds
7372
7373 # Create a temporary old-style archive to link instead of a shared archive.
7374 old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds
7375
7376 # Commands used to build and install a shared archive.
7377 archive_cmds=$lt_archive_cmds
7378 archive_expsym_cmds=$lt_archive_expsym_cmds
7379 postinstall_cmds=$lt_postinstall_cmds
7380 postuninstall_cmds=$lt_postuninstall_cmds
7381
7382 # Commands to strip libraries.
7383 old_striplib=$lt_old_striplib
7384 striplib=$lt_striplib
7385
7386 # Method to check whether dependent libraries are shared objects.
7387 deplibs_check_method=$lt_deplibs_check_method
7388
7389 # Command to use when deplibs_check_method == file_magic.
7390 file_magic_cmd=$lt_file_magic_cmd
7391
7392 # Flag that allows shared libraries with undefined symbols to be built.
7393 allow_undefined_flag=$lt_allow_undefined_flag
7394
7395 # Flag that forces no undefined symbols.
7396 no_undefined_flag=$lt_no_undefined_flag
7397
7398 # Commands used to finish a libtool library installation in a directory.
7399 finish_cmds=$lt_finish_cmds
7400
7401 # Same as above, but a single script fragment to be evaled but not shown.
7402 finish_eval=$lt_finish_eval
7403
7404 # Take the output of nm and produce a listing of raw symbols and C names.
7405 global_symbol_pipe=$lt_global_symbol_pipe
7406
7407 # Transform the output of nm in a proper C declaration
7408 global_symbol_to_cdecl=$lt_global_symbol_to_cdecl
7409
7410 # Transform the output of nm in a C name address pair
7411 global_symbol_to_c_name_address=$lt_global_symbol_to_c_name_address
7412
7413 # This is the shared library runtime path variable.
7414 runpath_var=$runpath_var
7415
7416 # This is the shared library path variable.
7417 shlibpath_var=$shlibpath_var
7418
7419 # Is shlibpath searched before the hard-coded library search path?
7420 shlibpath_overrides_runpath=$shlibpath_overrides_runpath
7421
7422 # How to hardcode a shared library path into an executable.
7423 hardcode_action=$hardcode_action
7424
7425 # Whether we should hardcode library paths into libraries.
7426 hardcode_into_libs=$hardcode_into_libs
7427
7428 # Flag to hardcode \$libdir into a binary during linking.
7429 # This must work even if \$libdir does not exist.
7430 hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
7431
7432 # Whether we need a single -rpath flag with a separated argument.
7433 hardcode_libdir_separator=$lt_hardcode_libdir_separator
7434
7435 # Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
7436 # resulting binary.
7437 hardcode_direct=$hardcode_direct
7438
7439 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
7440 # resulting binary.
7441 hardcode_minus_L=$hardcode_minus_L
7442
7443 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
7444 # the resulting binary.
7445 hardcode_shlibpath_var=$hardcode_shlibpath_var
7446
7447 # Variables whose values should be saved in libtool wrapper scripts and
7448 # restored at relink time.
7449 variables_saved_for_relink="$variables_saved_for_relink"
7450
7451 # Whether libtool must link a program against all its dependency libraries.
7452 link_all_deplibs=$link_all_deplibs
7453
7454 # Compile-time system search path for libraries
7455 sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
7456
7457 # Run-time system search path for libraries
7458 sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
7459
7460 # Fix the shell variable \$srcfile for the compiler.
7461 fix_srcfile_path="$fix_srcfile_path"
7462
7463 # Set to yes if exported symbols are required.
7464 always_export_symbols=$always_export_symbols
7465
7466 # The commands to list exported symbols.
7467 export_symbols_cmds=$lt_export_symbols_cmds
7468
7469 # The commands to extract the exported symbol list from a shared archive.
7470 extract_expsyms_cmds=$lt_extract_expsyms_cmds
7471
7472 # Symbols that should not be listed in the preloaded symbols.
7473 exclude_expsyms=$lt_exclude_expsyms
7474
7475 # Symbols that must always be exported.
7476 include_expsyms=$lt_include_expsyms
7477
7478 # ### END LIBTOOL CONFIG
7479
7480 __EOF__
7481
7482   case $host_os in
7483   aix3*)
7484     cat <<\EOF >> "${ofile}T"
7485
7486 # AIX sometimes has problems with the GCC collect2 program.  For some
7487 # reason, if we set the COLLECT_NAMES environment variable, the problems
7488 # vanish in a puff of smoke.
7489 if test "X${COLLECT_NAMES+set}" != Xset; then
7490   COLLECT_NAMES=
7491   export COLLECT_NAMES
7492 fi
7493 EOF
7494     ;;
7495   esac
7496
7497   case $host_os in
7498   cygwin* | mingw* | pw32* | os2*)
7499     cat <<'EOF' >> "${ofile}T"
7500       # This is a source program that is used to create dlls on Windows
7501       # Don't remove nor modify the starting and closing comments
7502 # /* ltdll.c starts here */
7503 # #define WIN32_LEAN_AND_MEAN
7504 # #include <windows.h>
7505 # #undef WIN32_LEAN_AND_MEAN
7506 # #include <stdio.h>
7507 #
7508 # #ifndef __CYGWIN__
7509 # #  ifdef __CYGWIN32__
7510 # #    define __CYGWIN__ __CYGWIN32__
7511 # #  endif
7512 # #endif
7513 #
7514 # #ifdef __cplusplus
7515 # extern "C" {
7516 # #endif
7517 # BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
7518 # #ifdef __cplusplus
7519 # }
7520 # #endif
7521 #
7522 # #ifdef __CYGWIN__
7523 # #include <cygwin/cygwin_dll.h>
7524 # DECLARE_CYGWIN_DLL( DllMain );
7525 # #endif
7526 # HINSTANCE __hDllInstance_base;
7527 #
7528 # BOOL APIENTRY
7529 # DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
7530 # {
7531 #   __hDllInstance_base = hInst;
7532 #   return TRUE;
7533 # }
7534 # /* ltdll.c ends here */
7535         # This is a source program that is used to create import libraries
7536         # on Windows for dlls which lack them. Don't remove nor modify the
7537         # starting and closing comments
7538 # /* impgen.c starts here */
7539 # /*   Copyright (C) 1999-2000 Free Software Foundation, Inc.
7540 #
7541 #  This file is part of GNU libtool.
7542 #
7543 #  This program is free software; you can redistribute it and/or modify
7544 #  it under the terms of the GNU General Public License as published by
7545 #  the Free Software Foundation; either version 2 of the License, or
7546 #  (at your option) any later version.
7547 #
7548 #  This program is distributed in the hope that it will be useful,
7549 #  but WITHOUT ANY WARRANTY; without even the implied warranty of
7550 #  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
7551 #  GNU General Public License for more details.
7552 #
7553 #  You should have received a copy of the GNU General Public License
7554 #  along with this program; if not, write to the Free Software
7555 #  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
7556 #  */
7557 #
7558 # #include <stdio.h>            /* for printf() */
7559 # #include <unistd.h>           /* for open(), lseek(), read() */
7560 # #include <fcntl.h>            /* for O_RDONLY, O_BINARY */
7561 # #include <string.h>           /* for strdup() */
7562 #
7563 # /* O_BINARY isn't required (or even defined sometimes) under Unix */
7564 # #ifndef O_BINARY
7565 # #define O_BINARY 0
7566 # #endif
7567 #
7568 # static unsigned int
7569 # pe_get16 (fd, offset)
7570 #      int fd;
7571 #      int offset;
7572 # {
7573 #   unsigned char b[2];
7574 #   lseek (fd, offset, SEEK_SET);
7575 #   read (fd, b, 2);
7576 #   return b[0] + (b[1]<<8);
7577 # }
7578 #
7579 # static unsigned int
7580 # pe_get32 (fd, offset)
7581 #     int fd;
7582 #     int offset;
7583 # {
7584 #   unsigned char b[4];
7585 #   lseek (fd, offset, SEEK_SET);
7586 #   read (fd, b, 4);
7587 #   return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
7588 # }
7589 #
7590 # static unsigned int
7591 # pe_as32 (ptr)
7592 #      void *ptr;
7593 # {
7594 #   unsigned char *b = ptr;
7595 #   return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
7596 # }
7597 #
7598 # int
7599 # main (argc, argv)
7600 #     int argc;
7601 #     char *argv[];
7602 # {
7603 #     int dll;
7604 #     unsigned long pe_header_offset, opthdr_ofs, num_entries, i;
7605 #     unsigned long export_rva, export_size, nsections, secptr, expptr;
7606 #     unsigned long name_rvas, nexp;
7607 #     unsigned char *expdata, *erva;
7608 #     char *filename, *dll_name;
7609 #
7610 #     filename = argv[1];
7611 #
7612 #     dll = open(filename, O_RDONLY|O_BINARY);
7613 #     if (dll < 1)
7614 #       return 1;
7615 #
7616 #     dll_name = filename;
7617 #
7618 #     for (i=0; filename[i]; i++)
7619 #       if (filename[i] == '/' || filename[i] == '\\'  || filename[i] == ':')
7620 #           dll_name = filename + i +1;
7621 #
7622 #     pe_header_offset = pe_get32 (dll, 0x3c);
7623 #     opthdr_ofs = pe_header_offset + 4 + 20;
7624 #     num_entries = pe_get32 (dll, opthdr_ofs + 92);
7625 #
7626 #     if (num_entries < 1) /* no exports */
7627 #       return 1;
7628 #
7629 #     export_rva = pe_get32 (dll, opthdr_ofs + 96);
7630 #     export_size = pe_get32 (dll, opthdr_ofs + 100);
7631 #     nsections = pe_get16 (dll, pe_header_offset + 4 +2);
7632 #     secptr = (pe_header_offset + 4 + 20 +
7633 #             pe_get16 (dll, pe_header_offset + 4 + 16));
7634 #
7635 #     expptr = 0;
7636 #     for (i = 0; i < nsections; i++)
7637 #     {
7638 #       char sname[8];
7639 #       unsigned long secptr1 = secptr + 40 * i;
7640 #       unsigned long vaddr = pe_get32 (dll, secptr1 + 12);
7641 #       unsigned long vsize = pe_get32 (dll, secptr1 + 16);
7642 #       unsigned long fptr = pe_get32 (dll, secptr1 + 20);
7643 #       lseek(dll, secptr1, SEEK_SET);
7644 #       read(dll, sname, 8);
7645 #       if (vaddr <= export_rva && vaddr+vsize > export_rva)
7646 #       {
7647 #           expptr = fptr + (export_rva - vaddr);
7648 #           if (export_rva + export_size > vaddr + vsize)
7649 #               export_size = vsize - (export_rva - vaddr);
7650 #           break;
7651 #       }
7652 #     }
7653 #
7654 #     expdata = (unsigned char*)malloc(export_size);
7655 #     lseek (dll, expptr, SEEK_SET);
7656 #     read (dll, expdata, export_size);
7657 #     erva = expdata - export_rva;
7658 #
7659 #     nexp = pe_as32 (expdata+24);
7660 #     name_rvas = pe_as32 (expdata+32);
7661 #
7662 #     printf ("EXPORTS\n");
7663 #     for (i = 0; i<nexp; i++)
7664 #     {
7665 #       unsigned long name_rva = pe_as32 (erva+name_rvas+i*4);
7666 #       printf ("\t%s @ %ld ;\n", erva+name_rva, 1+ i);
7667 #     }
7668 #
7669 #     return 0;
7670 # }
7671 # /* impgen.c ends here */
7672
7673 EOF
7674     ;;
7675   esac
7676
7677   # We use sed instead of cat because bash on DJGPP gets confused if
7678   # if finds mixed CR/LF and LF-only lines.  Since sed operates in
7679   # text mode, it properly converts lines to CR/LF.  This bash problem
7680   # is reportedly fixed, but why not run on old versions too?
7681   sed '$q' "$ltmain" >> "${ofile}T" || (rm -f "${ofile}T"; exit 1)
7682
7683   mv -f "${ofile}T" "$ofile" || \
7684     (rm -f "$ofile" && cp "${ofile}T" "$ofile" && rm -f "${ofile}T")
7685   chmod +x "$ofile"
7686 fi
7687
7688
7689
7690
7691
7692 # This can be used to rebuild libtool when needed
7693 LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
7694
7695 # Always use our own libtool.
7696 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
7697
7698 # Prevent multiple expansion
7699
7700
7701
7702 ol_link_perl=no
7703 if test $ol_enable_perl != no ; then
7704         # Extract the first word of "perl", so it can be a program name with args.
7705 set dummy perl; ac_word=$2
7706 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
7707 echo "configure:7706: checking for $ac_word" >&5
7708 if eval "test \"\${ac_cv_path_PERLBIN+set}\" = set"; then
7709   echo $ac_n "(cached) $ac_c" 1>&6
7710 else
7711   case "$PERLBIN" in
7712   /*)
7713   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a path.
7714   ;;
7715   ?:/*)
7716   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a dos path.
7717   ;;
7718   *)
7719   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
7720   ac_dummy="$PATH"
7721   for ac_dir in $ac_dummy; do 
7722     test -z "$ac_dir" && ac_dir=.
7723     if test -f $ac_dir/$ac_word; then
7724       ac_cv_path_PERLBIN="$ac_dir/$ac_word"
7725       break
7726     fi
7727   done
7728   IFS="$ac_save_ifs"
7729   test -z "$ac_cv_path_PERLBIN" && ac_cv_path_PERLBIN="/usr/bin/perl"
7730   ;;
7731 esac
7732 fi
7733 PERLBIN="$ac_cv_path_PERLBIN"
7734 if test -n "$PERLBIN"; then
7735   echo "$ac_t""$PERLBIN" 1>&6
7736 else
7737   echo "$ac_t""no" 1>&6
7738 fi
7739
7740
7741         if test "no$PERLBIN" = "no" ; then
7742                 if test $ol_enable_perl = yes ; then
7743                         { echo "configure: error: could not locate perl" 1>&2; exit 1; }
7744                 fi
7745
7746         else
7747                 PERL_CPPFLAGS="`$PERLBIN -MExtUtils::Embed -e ccopts`"
7748                 PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e 's/ -lc / /' -e 's/ -lc$//'`"
7749
7750                 if test x"$ol_enable_perl" = "xyes" ; then
7751                         SLAPD_PERL_LDFLAGS="$PERL_LDFLAGS"
7752                 else
7753                         MOD_PERL_LDFLAGS="$PERL_LDFLAGS"
7754                 fi
7755                                 ol_link_perl=yes
7756         fi
7757 fi
7758
7759 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
7760 echo "configure:7759: checking how to run the C preprocessor" >&5
7761 # On Suns, sometimes $CPP names a directory.
7762 if test -n "$CPP" && test -d "$CPP"; then
7763   CPP=
7764 fi
7765 if test -z "$CPP"; then
7766 if eval "test \"\${ac_cv_prog_CPP+set}\" = set"; then
7767   echo $ac_n "(cached) $ac_c" 1>&6
7768 else
7769     # This must be in double quotes, not single quotes, because CPP may get
7770   # substituted into the Makefile and "${CC-cc}" will confuse make.
7771   CPP="${CC-cc} -E"
7772   # On the NeXT, cc -E runs the code through the compiler's parser,
7773   # not just through cpp.
7774   cat > conftest.$ac_ext <<EOF
7775 #line 7774 "configure"
7776 #include "confdefs.h"
7777 #include <assert.h>
7778 Syntax Error
7779 EOF
7780 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7781 { (eval echo configure:7780: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7782 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7783 if test -z "$ac_err"; then
7784   :
7785 else
7786   echo "$ac_err" >&5
7787   echo "configure: failed program was:" >&5
7788   cat conftest.$ac_ext >&5
7789   rm -rf conftest*
7790   CPP="${CC-cc} -E -traditional-cpp"
7791   cat > conftest.$ac_ext <<EOF
7792 #line 7791 "configure"
7793 #include "confdefs.h"
7794 #include <assert.h>
7795 Syntax Error
7796 EOF
7797 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7798 { (eval echo configure:7797: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7799 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7800 if test -z "$ac_err"; then
7801   :
7802 else
7803   echo "$ac_err" >&5
7804   echo "configure: failed program was:" >&5
7805   cat conftest.$ac_ext >&5
7806   rm -rf conftest*
7807   CPP="${CC-cc} -nologo -E"
7808   cat > conftest.$ac_ext <<EOF
7809 #line 7808 "configure"
7810 #include "confdefs.h"
7811 #include <assert.h>
7812 Syntax Error
7813 EOF
7814 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7815 { (eval echo configure:7814: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7816 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7817 if test -z "$ac_err"; then
7818   :
7819 else
7820   echo "$ac_err" >&5
7821   echo "configure: failed program was:" >&5
7822   cat conftest.$ac_ext >&5
7823   rm -rf conftest*
7824   CPP=/lib/cpp
7825 fi
7826 rm -f conftest*
7827 fi
7828 rm -f conftest*
7829 fi
7830 rm -f conftest*
7831   ac_cv_prog_CPP="$CPP"
7832 fi
7833   CPP="$ac_cv_prog_CPP"
7834 else
7835   ac_cv_prog_CPP="$CPP"
7836 fi
7837 echo "$ac_t""$CPP" 1>&6
7838
7839
7840
7841 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
7842 echo "configure:7841: checking for Cygwin environment" >&5
7843 if eval "test \"\${ac_cv_cygwin+set}\" = set"; then
7844   echo $ac_n "(cached) $ac_c" 1>&6
7845 else
7846   cat > conftest.$ac_ext <<EOF
7847 #line 7846 "configure"
7848 #include "confdefs.h"
7849
7850 int main() {
7851
7852 #ifndef __CYGWIN__
7853 #define __CYGWIN__ __CYGWIN32__
7854 #endif
7855 return __CYGWIN__;
7856 ; return 0; }
7857 EOF
7858 if { (eval echo configure:7857: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7859   rm -rf conftest*
7860   ac_cv_cygwin=yes
7861 else
7862   echo "configure: failed program was:" >&5
7863   cat conftest.$ac_ext >&5
7864   rm -rf conftest*
7865   ac_cv_cygwin=no
7866 fi
7867 rm -f conftest*
7868 fi
7869
7870 echo "$ac_t""$ac_cv_cygwin" 1>&6
7871 CYGWIN=
7872 test "$ac_cv_cygwin" = yes && CYGWIN=yes
7873 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
7874 echo "configure:7873: checking for mingw32 environment" >&5
7875 if eval "test \"\${ac_cv_mingw32+set}\" = set"; then
7876   echo $ac_n "(cached) $ac_c" 1>&6
7877 else
7878   cat > conftest.$ac_ext <<EOF
7879 #line 7878 "configure"
7880 #include "confdefs.h"
7881
7882 int main() {
7883 return __MINGW32__;
7884 ; return 0; }
7885 EOF
7886 if { (eval echo configure:7885: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7887   rm -rf conftest*
7888   ac_cv_mingw32=yes
7889 else
7890   echo "configure: failed program was:" >&5
7891   cat conftest.$ac_ext >&5
7892   rm -rf conftest*
7893   ac_cv_mingw32=no
7894 fi
7895 rm -f conftest*
7896 fi
7897
7898 echo "$ac_t""$ac_cv_mingw32" 1>&6
7899 MINGW32=
7900 test "$ac_cv_mingw32" = yes && MINGW32=yes
7901
7902
7903
7904 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
7905 echo "configure:7904: checking for executable suffix" >&5
7906 if eval "test \"\${ac_cv_exeext+set}\" = set"; then
7907   echo $ac_n "(cached) $ac_c" 1>&6
7908 else
7909   if test "$CYGWIN" = yes || test "$MINGW32" = yes || test "$EMXOS2" = yes; then
7910   ac_cv_exeext=.exe
7911 else
7912   rm -f conftest*
7913   echo 'int main () { return 0; }' > conftest.$ac_ext
7914   ac_cv_exeext=
7915   if { (eval echo configure:7914: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
7916     for file in conftest.*; do
7917       case $file in
7918       *.c | *.C | *.o | *.obj | *.xcoff) ;;
7919       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
7920       esac
7921     done
7922   else
7923     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
7924   fi
7925   rm -f conftest*
7926   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
7927 fi
7928 fi
7929
7930 EXEEXT=""
7931 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
7932 echo "$ac_t""${ac_cv_exeext}" 1>&6
7933 ac_exeext=$EXEEXT
7934
7935 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
7936 echo "configure:7935: checking for object suffix" >&5
7937 if eval "test \"\${ac_cv_objext+set}\" = set"; then
7938   echo $ac_n "(cached) $ac_c" 1>&6
7939 else
7940   rm -f conftest*
7941 echo 'int i = 1;' > conftest.$ac_ext
7942 if { (eval echo configure:7941: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7943   for ac_file in conftest.*; do
7944     case $ac_file in
7945     *.c) ;;
7946     *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
7947     esac
7948   done
7949 else
7950   { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
7951 fi
7952 rm -f conftest*
7953 fi
7954
7955 echo "$ac_t""$ac_cv_objext" 1>&6
7956 OBJEXT=$ac_cv_objext
7957 ac_objext=$ac_cv_objext
7958
7959
7960 cat >> confdefs.h <<EOF
7961 #define EXEEXT "${EXEEXT}"
7962 EOF
7963
7964
7965 echo $ac_n "checking for be_app in -lbe""... $ac_c" 1>&6
7966 echo "configure:7965: checking for be_app in -lbe" >&5
7967 ac_lib_var=`echo be'_'be_app | sed 'y%./+-:%__p__%'`
7968 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
7969   echo $ac_n "(cached) $ac_c" 1>&6
7970 else
7971   ac_save_LIBS="$LIBS"
7972 LIBS="-lbe -lroot -lnet $LIBS"
7973 cat > conftest.$ac_ext <<EOF
7974 #line 7973 "configure"
7975 #include "confdefs.h"
7976 /* Override any gcc2 internal prototype to avoid an error.  */
7977 /* We use char because int might match the return type of a gcc2
7978     builtin and then its argument prototype would still apply.  */
7979 char be_app();
7980
7981 int main() {
7982 be_app()
7983 ; return 0; }
7984 EOF
7985 if { (eval echo configure:7984: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7986   rm -rf conftest*
7987   eval "ac_cv_lib_$ac_lib_var=yes"
7988 else
7989   echo "configure: failed program was:" >&5
7990   cat conftest.$ac_ext >&5
7991   rm -rf conftest*
7992   eval "ac_cv_lib_$ac_lib_var=no"
7993 fi
7994 rm -f conftest*
7995 LIBS="$ac_save_LIBS"
7996
7997 fi
7998 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7999   echo "$ac_t""yes" 1>&6
8000   LIBS="$LIBS -lbe -lroot -lnet"
8001 else
8002   echo "$ac_t""no" 1>&6
8003 :
8004 fi
8005
8006
8007
8008
8009
8010 echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
8011 echo "configure:8010: checking for ${CC-cc} option to accept ANSI C" >&5
8012 if eval "test \"\${am_cv_prog_cc_stdc+set}\" = set"; then
8013   echo $ac_n "(cached) $ac_c" 1>&6
8014 else
8015   am_cv_prog_cc_stdc=no
8016 ac_save_CC="$CC"
8017 # Don't try gcc -ansi; that turns off useful extensions and
8018 # breaks some systems' header files.
8019 # AIX                   -qlanglvl=ansi
8020 # Ultrix and OSF/1      -std1
8021 # HP-UX 10.20 and later -Ae
8022 # HP-UX older versions  -Aa -D_HPUX_SOURCE
8023 # SVR4                  -Xc -D__EXTENSIONS__
8024 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
8025 do
8026   CC="$ac_save_CC $ac_arg"
8027   cat > conftest.$ac_ext <<EOF
8028 #line 8027 "configure"
8029 #include "confdefs.h"
8030 #include <stdarg.h>
8031 #include <stdio.h>
8032 #include <sys/types.h>
8033 #include <sys/stat.h>
8034 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
8035 struct buf { int x; };
8036 FILE * (*rcsopen) (struct buf *, struct stat *, int);
8037 static char *e (p, i)
8038      char **p;
8039      int i;
8040 {
8041   return p[i];
8042 }
8043 static char *f (char * (*g) (char **, int), char **p, ...)
8044 {
8045   char *s;
8046   va_list v;
8047   va_start (v,p);
8048   s = g (p, va_arg (v,int));
8049   va_end (v);
8050   return s;
8051 }
8052 int test (int i, double x);
8053 struct s1 {int (*f) (int a);};
8054 struct s2 {int (*f) (double a);};
8055 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
8056 int argc;
8057 char **argv;
8058
8059 int main() {
8060
8061 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
8062
8063 ; return 0; }
8064 EOF
8065 if { (eval echo configure:8064: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8066   rm -rf conftest*
8067   am_cv_prog_cc_stdc="$ac_arg"; break
8068 else
8069   echo "configure: failed program was:" >&5
8070   cat conftest.$ac_ext >&5
8071 fi
8072 rm -f conftest*
8073 done
8074 CC="$ac_save_CC"
8075
8076 fi
8077
8078 if test -z "$am_cv_prog_cc_stdc"; then
8079   echo "$ac_t""none needed" 1>&6
8080 else
8081   echo "$ac_t""$am_cv_prog_cc_stdc" 1>&6
8082 fi
8083 case "x$am_cv_prog_cc_stdc" in
8084   x|xno) ;;
8085   *) CC="$CC $am_cv_prog_cc_stdc" ;;
8086 esac
8087
8088 if test "X${am_cv_prog_cc_stdc}" = "Xno" ; then
8089         { echo "configure: error: OpenLDAP requires compiler to support STDC constructs." 1>&2; exit 1; }
8090 fi
8091
8092 # test for make depend flag
8093 OL_MKDEP=
8094 OL_MKDEP_FLAGS=
8095 if test -z "${MKDEP}"; then
8096         OL_MKDEP="${CC-cc}"
8097         if test -z "${MKDEP_FLAGS}"; then
8098                 echo $ac_n "checking for ${OL_MKDEP} depend flag""... $ac_c" 1>&6
8099 echo "configure:8098: checking for ${OL_MKDEP} depend flag" >&5
8100 if eval "test \"\${ol_cv_mkdep+set}\" = set"; then
8101   echo $ac_n "(cached) $ac_c" 1>&6
8102 else
8103   
8104                         ol_cv_mkdep=no
8105                         for flag in "-M" "-xM"; do
8106                                 cat > conftest.c <<EOF
8107  noCode;
8108 EOF
8109                                 if { ac_try='$OL_MKDEP $flag conftest.c'; { (eval echo configure:8108: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } \
8110                                         | egrep '^conftest\.'"${ac_objext}" >/dev/null 2>&1
8111                                 then
8112                                         if test ! -f conftest."${ac_object}" ; then
8113                                                 ol_cv_mkdep=$flag
8114                                                 OL_MKDEP_FLAGS="$flag"
8115                                                 break
8116                                         fi
8117                                 fi
8118                         done
8119                         rm -f conftest*
8120                 
8121 fi
8122
8123 echo "$ac_t""$ol_cv_mkdep" 1>&6
8124         else
8125                 cc_cv_mkdep=yes
8126                 OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
8127         fi
8128 else
8129         cc_cv_mkdep=yes
8130         OL_MKDEP="${MKDEP}"
8131         OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
8132 fi
8133
8134
8135
8136 if test "${ol_cv_mkdep}" = no ; then
8137         # this will soon become an error
8138         echo "configure: warning: do not know how to generate dependencies" 1>&2
8139 fi
8140
8141 echo $ac_n "checking for afopen in -ls""... $ac_c" 1>&6
8142 echo "configure:8141: checking for afopen in -ls" >&5
8143 ac_lib_var=`echo s'_'afopen | sed 'y%./+-:%__p__%'`
8144 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8145   echo $ac_n "(cached) $ac_c" 1>&6
8146 else
8147   ac_save_LIBS="$LIBS"
8148 LIBS="-ls  $LIBS"
8149 cat > conftest.$ac_ext <<EOF
8150 #line 8149 "configure"
8151 #include "confdefs.h"
8152 /* Override any gcc2 internal prototype to avoid an error.  */
8153 /* We use char because int might match the return type of a gcc2
8154     builtin and then its argument prototype would still apply.  */
8155 char afopen();
8156
8157 int main() {
8158 afopen()
8159 ; return 0; }
8160 EOF
8161 if { (eval echo configure:8160: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8162   rm -rf conftest*
8163   eval "ac_cv_lib_$ac_lib_var=yes"
8164 else
8165   echo "configure: failed program was:" >&5
8166   cat conftest.$ac_ext >&5
8167   rm -rf conftest*
8168   eval "ac_cv_lib_$ac_lib_var=no"
8169 fi
8170 rm -f conftest*
8171 LIBS="$ac_save_LIBS"
8172
8173 fi
8174 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8175   echo "$ac_t""yes" 1>&6
8176   
8177         AUTH_LIBS=-ls
8178         cat >> confdefs.h <<\EOF
8179 #define HAVE_AIX_SECURITY 1
8180 EOF
8181
8182
8183 else
8184   echo "$ac_t""no" 1>&6
8185 fi
8186
8187
8188 case "$target" in
8189 *-ibm-openedition)
8190         ac_cv_func_getopt=no
8191         cat >> confdefs.h <<\EOF
8192 #define BOTH_STRINGS_H 1
8193 EOF
8194
8195         ;;
8196 esac
8197
8198 ol_link_modules=no
8199 if test $ol_enable_modules != no ; then
8200         for ac_hdr in ltdl.h
8201 do
8202 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8203 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8204 echo "configure:8203: checking for $ac_hdr" >&5
8205 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
8206   echo $ac_n "(cached) $ac_c" 1>&6
8207 else
8208   cat > conftest.$ac_ext <<EOF
8209 #line 8208 "configure"
8210 #include "confdefs.h"
8211 #include <$ac_hdr>
8212 EOF
8213 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8214 { (eval echo configure:8213: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8215 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8216 if test -z "$ac_err"; then
8217   rm -rf conftest*
8218   eval "ac_cv_header_$ac_safe=yes"
8219 else
8220   echo "$ac_err" >&5
8221   echo "configure: failed program was:" >&5
8222   cat conftest.$ac_ext >&5
8223   rm -rf conftest*
8224   eval "ac_cv_header_$ac_safe=no"
8225 fi
8226 rm -f conftest*
8227 fi
8228 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8229   echo "$ac_t""yes" 1>&6
8230     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8231   cat >> confdefs.h <<EOF
8232 #define $ac_tr_hdr 1
8233 EOF
8234  
8235 else
8236   echo "$ac_t""no" 1>&6
8237 fi
8238 done
8239
8240
8241         if test $ac_cv_header_ltdl_h = no ; then
8242                 { echo "configure: error: could not locate libtool ltdl.h" 1>&2; exit 1; }
8243         fi
8244
8245         echo $ac_n "checking for lt_dlinit in -lltdl""... $ac_c" 1>&6
8246 echo "configure:8245: checking for lt_dlinit in -lltdl" >&5
8247 ac_lib_var=`echo ltdl'_'lt_dlinit | sed 'y%./+-:%__p__%'`
8248 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8249   echo $ac_n "(cached) $ac_c" 1>&6
8250 else
8251   ac_save_LIBS="$LIBS"
8252 LIBS="-lltdl  $LIBS"
8253 cat > conftest.$ac_ext <<EOF
8254 #line 8253 "configure"
8255 #include "confdefs.h"
8256 /* Override any gcc2 internal prototype to avoid an error.  */
8257 /* We use char because int might match the return type of a gcc2
8258     builtin and then its argument prototype would still apply.  */
8259 char lt_dlinit();
8260
8261 int main() {
8262 lt_dlinit()
8263 ; return 0; }
8264 EOF
8265 if { (eval echo configure:8264: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8266   rm -rf conftest*
8267   eval "ac_cv_lib_$ac_lib_var=yes"
8268 else
8269   echo "configure: failed program was:" >&5
8270   cat conftest.$ac_ext >&5
8271   rm -rf conftest*
8272   eval "ac_cv_lib_$ac_lib_var=no"
8273 fi
8274 rm -f conftest*
8275 LIBS="$ac_save_LIBS"
8276
8277 fi
8278 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8279   echo "$ac_t""yes" 1>&6
8280   
8281                 MODULES_LIBS=-lltdl
8282                 cat >> confdefs.h <<\EOF
8283 #define HAVE_LIBLTDL 1
8284 EOF
8285
8286         
8287 else
8288   echo "$ac_t""no" 1>&6
8289 fi
8290
8291
8292         if test "$ac_cv_lib_ltdl_lt_dlinit" = no ; then
8293                 { echo "configure: error: could not locate libtool -lltdl" 1>&2; exit 1; }
8294         fi
8295         ol_link_modules=yes
8296
8297 else
8298         for i in $Backends; do
8299                 eval "ol_tmp=\$ol_enable_$i"
8300                 if test $ol_tmp = mod ; then
8301                         echo "configure: warning: building static $i backend" 1>&2
8302                         eval "ol_enable_$i=yes"
8303                 fi
8304         done
8305         for i in $Overlays; do
8306                 eval "ol_tmp=\$ol_enable_$i"
8307                 if test $ol_tmp = mod ; then
8308                         echo "configure: warning: building static $i overlay" 1>&2
8309                         eval "ol_enable_$i=yes"
8310                 fi
8311         done
8312 fi
8313
8314 # test for EBCDIC
8315 echo $ac_n "checking for EBCDIC""... $ac_c" 1>&6
8316 echo "configure:8315: checking for EBCDIC" >&5
8317 if eval "test \"\${ol_cv_cpp_ebcdic+set}\" = set"; then
8318   echo $ac_n "(cached) $ac_c" 1>&6
8319 else
8320   
8321         cat > conftest.$ac_ext <<EOF
8322 #line 8321 "configure"
8323 #include "confdefs.h"
8324
8325 #if !('M' == 0xd4)
8326 #include <__ASCII__/generate_error.h>
8327 #endif
8328
8329 EOF
8330 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8331 { (eval echo configure:8330: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8332 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8333 if test -z "$ac_err"; then
8334   rm -rf conftest*
8335   ol_cv_cpp_ebcdic=yes
8336 else
8337   echo "$ac_err" >&5
8338   echo "configure: failed program was:" >&5
8339   cat conftest.$ac_ext >&5
8340   rm -rf conftest*
8341   ol_cv_cpp_ebcdic=no
8342 fi
8343 rm -f conftest*
8344 fi
8345
8346 echo "$ac_t""$ol_cv_cpp_ebcdic" 1>&6
8347 if test $ol_cv_cpp_ebcdic = yes ; then
8348         cat >> confdefs.h <<\EOF
8349 #define HAVE_EBCDIC 1
8350 EOF
8351
8352 fi
8353
8354 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
8355 echo "configure:8354: checking for ANSI C header files" >&5
8356 if eval "test \"\${ol_cv_header_stdc+set}\" = set"; then
8357   echo $ac_n "(cached) $ac_c" 1>&6
8358 else
8359   cat > conftest.$ac_ext <<EOF
8360 #line 8359 "configure"
8361 #include "confdefs.h"
8362 #include <stdlib.h>
8363 #include <stdarg.h>
8364 #include <string.h>
8365 #include <float.h>
8366 EOF
8367 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8368 { (eval echo configure:8367: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8369 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8370 if test -z "$ac_err"; then
8371   rm -rf conftest*
8372   ol_cv_header_stdc=yes
8373 else
8374   echo "$ac_err" >&5
8375   echo "configure: failed program was:" >&5
8376   cat conftest.$ac_ext >&5
8377   rm -rf conftest*
8378   ol_cv_header_stdc=no
8379 fi
8380 rm -f conftest*
8381
8382 if test $ol_cv_header_stdc = yes; then
8383   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
8384 cat > conftest.$ac_ext <<EOF
8385 #line 8384 "configure"
8386 #include "confdefs.h"
8387 #include <string.h>
8388 EOF
8389 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8390   egrep "memchr" >/dev/null 2>&1; then
8391   :
8392 else
8393   rm -rf conftest*
8394   ol_cv_header_stdc=no
8395 fi
8396 rm -f conftest*
8397
8398 fi
8399
8400 if test $ol_cv_header_stdc = yes; then
8401   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
8402 cat > conftest.$ac_ext <<EOF
8403 #line 8402 "configure"
8404 #include "confdefs.h"
8405 #include <stdlib.h>
8406 EOF
8407 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8408   egrep "free" >/dev/null 2>&1; then
8409   :
8410 else
8411   rm -rf conftest*
8412   ol_cv_header_stdc=no
8413 fi
8414 rm -f conftest*
8415
8416 fi
8417
8418 if test $ol_cv_header_stdc = yes; then
8419   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
8420 if test "$cross_compiling" = yes; then
8421   :
8422 else
8423   cat > conftest.$ac_ext <<EOF
8424 #line 8423 "configure"
8425 #include "confdefs.h"
8426 #include <ctype.h>
8427 #ifndef HAVE_EBCDIC
8428 #       define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
8429 #       define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
8430 #else
8431 #       define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
8432                 || ('j' <= (c) && (c) <= 'r') \
8433                 || ('s' <= (c) && (c) <= 'z'))
8434 #       define TOUPPER(c)       (ISLOWER(c) ? ((c) | 0x40) : (c))
8435 #endif
8436 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
8437 int main () { int i; for (i = 0; i < 256; i++)
8438 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
8439 exit (0); }
8440
8441 EOF
8442 if { (eval echo configure:8441: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8443 then
8444   :
8445 else
8446   echo "configure: failed program was:" >&5
8447   cat conftest.$ac_ext >&5
8448   rm -fr conftest*
8449   ol_cv_header_stdc=no
8450 fi
8451 rm -fr conftest*
8452 fi
8453
8454 fi
8455 fi
8456
8457 echo "$ac_t""$ol_cv_header_stdc" 1>&6
8458 if test $ol_cv_header_stdc = yes; then
8459   cat >> confdefs.h <<\EOF
8460 #define STDC_HEADERS 1
8461 EOF
8462
8463 fi
8464 ac_cv_header_stdc=disable
8465
8466
8467 if test $ol_cv_header_stdc != yes; then
8468         echo "configure: warning: could not locate Standard C compliant headers" 1>&2
8469 fi
8470
8471 ac_header_dirent=no
8472 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
8473 do
8474 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8475 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
8476 echo "configure:8475: checking for $ac_hdr that defines DIR" >&5
8477 if eval "test \"\${ac_cv_header_dirent_$ac_safe+set}\" = set"; then
8478   echo $ac_n "(cached) $ac_c" 1>&6
8479 else
8480   cat > conftest.$ac_ext <<EOF
8481 #line 8480 "configure"
8482 #include "confdefs.h"
8483 #include <sys/types.h>
8484 #include <$ac_hdr>
8485 int main() {
8486 DIR *dirp = 0;
8487 ; return 0; }
8488 EOF
8489 if { (eval echo configure:8488: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8490   rm -rf conftest*
8491   eval "ac_cv_header_dirent_$ac_safe=yes"
8492 else
8493   echo "configure: failed program was:" >&5
8494   cat conftest.$ac_ext >&5
8495   rm -rf conftest*
8496   eval "ac_cv_header_dirent_$ac_safe=no"
8497 fi
8498 rm -f conftest*
8499 fi
8500 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
8501   echo "$ac_t""yes" 1>&6
8502     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8503   cat >> confdefs.h <<EOF
8504 #define $ac_tr_hdr 1
8505 EOF
8506  ac_header_dirent=$ac_hdr; break
8507 else
8508   echo "$ac_t""no" 1>&6
8509 fi
8510 done
8511 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
8512 if test $ac_header_dirent = dirent.h; then
8513 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
8514 echo "configure:8513: checking for opendir in -ldir" >&5
8515 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-:%__p__%'`
8516 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8517   echo $ac_n "(cached) $ac_c" 1>&6
8518 else
8519   ac_save_LIBS="$LIBS"
8520 LIBS="-ldir  $LIBS"
8521 cat > conftest.$ac_ext <<EOF
8522 #line 8521 "configure"
8523 #include "confdefs.h"
8524 /* Override any gcc2 internal prototype to avoid an error.  */
8525 /* We use char because int might match the return type of a gcc2
8526     builtin and then its argument prototype would still apply.  */
8527 char opendir();
8528
8529 int main() {
8530 opendir()
8531 ; return 0; }
8532 EOF
8533 if { (eval echo configure:8532: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8534   rm -rf conftest*
8535   eval "ac_cv_lib_$ac_lib_var=yes"
8536 else
8537   echo "configure: failed program was:" >&5
8538   cat conftest.$ac_ext >&5
8539   rm -rf conftest*
8540   eval "ac_cv_lib_$ac_lib_var=no"
8541 fi
8542 rm -f conftest*
8543 LIBS="$ac_save_LIBS"
8544
8545 fi
8546 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8547   echo "$ac_t""yes" 1>&6
8548   LIBS="$LIBS -ldir"
8549 else
8550   echo "$ac_t""no" 1>&6
8551 fi
8552
8553 else
8554 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
8555 echo "configure:8554: checking for opendir in -lx" >&5
8556 ac_lib_var=`echo x'_'opendir | sed 'y%./+-:%__p__%'`
8557 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8558   echo $ac_n "(cached) $ac_c" 1>&6
8559 else
8560   ac_save_LIBS="$LIBS"
8561 LIBS="-lx  $LIBS"
8562 cat > conftest.$ac_ext <<EOF
8563 #line 8562 "configure"
8564 #include "confdefs.h"
8565 /* Override any gcc2 internal prototype to avoid an error.  */
8566 /* We use char because int might match the return type of a gcc2
8567     builtin and then its argument prototype would still apply.  */
8568 char opendir();
8569
8570 int main() {
8571 opendir()
8572 ; return 0; }
8573 EOF
8574 if { (eval echo configure:8573: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8575   rm -rf conftest*
8576   eval "ac_cv_lib_$ac_lib_var=yes"
8577 else
8578   echo "configure: failed program was:" >&5
8579   cat conftest.$ac_ext >&5
8580   rm -rf conftest*
8581   eval "ac_cv_lib_$ac_lib_var=no"
8582 fi
8583 rm -f conftest*
8584 LIBS="$ac_save_LIBS"
8585
8586 fi
8587 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8588   echo "$ac_t""yes" 1>&6
8589   LIBS="$LIBS -lx"
8590 else
8591   echo "$ac_t""no" 1>&6
8592 fi
8593
8594 fi
8595
8596 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
8597 echo "configure:8596: checking for sys/wait.h that is POSIX.1 compatible" >&5
8598 if eval "test \"\${ac_cv_header_sys_wait_h+set}\" = set"; then
8599   echo $ac_n "(cached) $ac_c" 1>&6
8600 else
8601   cat > conftest.$ac_ext <<EOF
8602 #line 8601 "configure"
8603 #include "confdefs.h"
8604 #include <sys/types.h>
8605 #include <sys/wait.h>
8606 #ifndef WEXITSTATUS
8607 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
8608 #endif
8609 #ifndef WIFEXITED
8610 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
8611 #endif
8612 int main() {
8613 int s;
8614 wait (&s);
8615 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
8616 ; return 0; }
8617 EOF
8618 if { (eval echo configure:8617: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8619   rm -rf conftest*
8620   ac_cv_header_sys_wait_h=yes
8621 else
8622   echo "configure: failed program was:" >&5
8623   cat conftest.$ac_ext >&5
8624   rm -rf conftest*
8625   ac_cv_header_sys_wait_h=no
8626 fi
8627 rm -f conftest*
8628 fi
8629
8630 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
8631 if test $ac_cv_header_sys_wait_h = yes; then
8632   cat >> confdefs.h <<\EOF
8633 #define HAVE_SYS_WAIT_H 1
8634 EOF
8635
8636 fi
8637
8638 echo $ac_n "checking POSIX termios""... $ac_c" 1>&6
8639 echo "configure:8638: checking POSIX termios" >&5
8640 if eval "test \"\${am_cv_sys_posix_termios+set}\" = set"; then
8641   echo $ac_n "(cached) $ac_c" 1>&6
8642 else
8643   cat > conftest.$ac_ext <<EOF
8644 #line 8643 "configure"
8645 #include "confdefs.h"
8646 #include <sys/types.h>
8647 #include <unistd.h>
8648 #include <termios.h>
8649 int main() {
8650 /* SunOS 4.0.3 has termios.h but not the library calls.  */
8651    tcgetattr(0, 0);
8652 ; return 0; }
8653 EOF
8654 if { (eval echo configure:8653: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8655   rm -rf conftest*
8656   am_cv_sys_posix_termios=yes
8657 else
8658   echo "configure: failed program was:" >&5
8659   cat conftest.$ac_ext >&5
8660   rm -rf conftest*
8661   am_cv_sys_posix_termios=no
8662 fi
8663 rm -f conftest*
8664 fi
8665
8666 echo "$ac_t""$am_cv_sys_posix_termios" 1>&6
8667
8668
8669  echo $ac_n "checking whether use of TIOCGWINSZ requires sys/ioctl.h""... $ac_c" 1>&6
8670 echo "configure:8669: checking whether use of TIOCGWINSZ requires sys/ioctl.h" >&5
8671 if eval "test \"\${am_cv_sys_tiocgwinsz_needs_sys_ioctl_h+set}\" = set"; then
8672   echo $ac_n "(cached) $ac_c" 1>&6
8673 else
8674   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=no
8675
8676   gwinsz_in_termios_h=no
8677   if test $am_cv_sys_posix_termios = yes; then
8678     cat > conftest.$ac_ext <<EOF
8679 #line 8678 "configure"
8680 #include "confdefs.h"
8681 #include <sys/types.h>
8682 #     include <termios.h>
8683 #     ifdef TIOCGWINSZ
8684         yes
8685 #     endif
8686     
8687 EOF
8688 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8689   egrep "yes" >/dev/null 2>&1; then
8690   rm -rf conftest*
8691   gwinsz_in_termios_h=yes
8692 fi
8693 rm -f conftest*
8694
8695   fi
8696
8697   if test $gwinsz_in_termios_h = no; then
8698     cat > conftest.$ac_ext <<EOF
8699 #line 8698 "configure"
8700 #include "confdefs.h"
8701 #include <sys/types.h>
8702 #     include <sys/ioctl.h>
8703 #     ifdef TIOCGWINSZ
8704         yes
8705 #     endif
8706     
8707 EOF
8708 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8709   egrep "yes" >/dev/null 2>&1; then
8710   rm -rf conftest*
8711   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=yes
8712 fi
8713 rm -f conftest*
8714
8715   fi
8716   
8717 fi
8718
8719 echo "$ac_t""$am_cv_sys_tiocgwinsz_needs_sys_ioctl_h" 1>&6
8720   if test $am_cv_sys_tiocgwinsz_needs_sys_ioctl_h = yes; then
8721     cat >> confdefs.h <<\EOF
8722 #define GWINSZ_IN_SYS_IOCTL 1
8723 EOF
8724
8725   fi
8726
8727 if test $am_cv_sys_posix_termios = yes ; then
8728         cat >> confdefs.h <<\EOF
8729 #define HAVE_POSIX_TERMIOS 1
8730 EOF
8731
8732 fi
8733
8734 for ac_hdr in \
8735         arpa/inet.h             \
8736         arpa/nameser.h  \
8737         assert.h                \
8738         bits/types.h    \
8739         conio.h                 \
8740         crypt.h                 \
8741         direct.h                \
8742         errno.h                 \
8743         fcntl.h                 \
8744         filio.h                 \
8745         getopt.h                \
8746         grp.h                   \
8747         io.h                    \
8748         libutil.h               \
8749         limits.h                \
8750         locale.h                \
8751         netinet/tcp.h   \
8752         malloc.h                \
8753         memory.h                \
8754         psap.h                  \
8755         pwd.h                   \
8756         process.h               \
8757         resolv.h                \
8758         sgtty.h                 \
8759         shadow.h                \
8760         stddef.h                \
8761         string.h                \
8762         strings.h               \
8763         sysexits.h              \
8764         sys/file.h              \
8765         sys/filio.h             \
8766         sys/errno.h             \
8767         sys/ioctl.h             \
8768         sys/param.h             \
8769         sys/resource.h  \
8770         sys/select.h    \
8771         sys/socket.h    \
8772         sys/stat.h              \
8773         sys/syslog.h    \
8774         sys/time.h              \
8775         sys/types.h             \
8776         sys/ucred.h             \
8777         sys/uio.h               \
8778         syslog.h                \
8779         termios.h               \
8780         unistd.h                \
8781         winsock.h               \
8782         winsock2.h              \
8783
8784 do
8785 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8786 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8787 echo "configure:8786: checking for $ac_hdr" >&5
8788 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
8789   echo $ac_n "(cached) $ac_c" 1>&6
8790 else
8791   cat > conftest.$ac_ext <<EOF
8792 #line 8791 "configure"
8793 #include "confdefs.h"
8794 #include <$ac_hdr>
8795 EOF
8796 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8797 { (eval echo configure:8796: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8798 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8799 if test -z "$ac_err"; then
8800   rm -rf conftest*
8801   eval "ac_cv_header_$ac_safe=yes"
8802 else
8803   echo "$ac_err" >&5
8804   echo "configure: failed program was:" >&5
8805   cat conftest.$ac_ext >&5
8806   rm -rf conftest*
8807   eval "ac_cv_header_$ac_safe=no"
8808 fi
8809 rm -f conftest*
8810 fi
8811 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8812   echo "$ac_t""yes" 1>&6
8813     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8814   cat >> confdefs.h <<EOF
8815 #define $ac_tr_hdr 1
8816 EOF
8817  
8818 else
8819   echo "$ac_t""no" 1>&6
8820 fi
8821 done
8822
8823
8824
8825
8826 echo $ac_n "checking for sigset in -lV3""... $ac_c" 1>&6
8827 echo "configure:8826: checking for sigset in -lV3" >&5
8828 ac_lib_var=`echo V3'_'sigset | sed 'y%./+-:%__p__%'`
8829 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8830   echo $ac_n "(cached) $ac_c" 1>&6
8831 else
8832   ac_save_LIBS="$LIBS"
8833 LIBS="-lV3  $LIBS"
8834 cat > conftest.$ac_ext <<EOF
8835 #line 8834 "configure"
8836 #include "confdefs.h"
8837 /* Override any gcc2 internal prototype to avoid an error.  */
8838 /* We use char because int might match the return type of a gcc2
8839     builtin and then its argument prototype would still apply.  */
8840 char sigset();
8841
8842 int main() {
8843 sigset()
8844 ; return 0; }
8845 EOF
8846 if { (eval echo configure:8845: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8847   rm -rf conftest*
8848   eval "ac_cv_lib_$ac_lib_var=yes"
8849 else
8850   echo "configure: failed program was:" >&5
8851   cat conftest.$ac_ext >&5
8852   rm -rf conftest*
8853   eval "ac_cv_lib_$ac_lib_var=no"
8854 fi
8855 rm -f conftest*
8856 LIBS="$ac_save_LIBS"
8857
8858 fi
8859 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8860   echo "$ac_t""yes" 1>&6
8861     ac_tr_lib=HAVE_LIB`echo V3 | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8862     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8863   cat >> confdefs.h <<EOF
8864 #define $ac_tr_lib 1
8865 EOF
8866
8867   LIBS="-lV3 $LIBS"
8868
8869 else
8870   echo "$ac_t""no" 1>&6
8871 fi
8872
8873
8874 if test "$ac_cv_header_winsock_h" = yes; then
8875 echo $ac_n "checking for winsock""... $ac_c" 1>&6
8876 echo "configure:8875: checking for winsock" >&5
8877 if eval "test \"\${ol_cv_winsock+set}\" = set"; then
8878   echo $ac_n "(cached) $ac_c" 1>&6
8879 else
8880   save_LIBS="$LIBS"
8881 for curlib in ws2_32 wsock32; do
8882         LIBS="$LIBS -l$curlib"
8883         cat > conftest.$ac_ext <<EOF
8884 #line 8883 "configure"
8885 #include "confdefs.h"
8886 #include <winsock.h>
8887                         
8888 int main() {
8889
8890                         socket(0,0,0);
8891                         select(0,NULL,NULL,NULL,NULL);
8892                         closesocket(0);
8893                         gethostname(NULL,0);
8894                         
8895 ; return 0; }
8896 EOF
8897 if { (eval echo configure:8896: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8898   rm -rf conftest*
8899   ol_cv_winsock=yes
8900 else
8901   echo "configure: failed program was:" >&5
8902   cat conftest.$ac_ext >&5
8903   rm -rf conftest*
8904   ol_cv_winsock=no
8905 fi
8906 rm -f conftest*
8907
8908         if test $ol_cv_winsock = yes; then
8909                 cat >> confdefs.h <<\EOF
8910 #define HAVE_WINSOCK 1
8911 EOF
8912
8913                 ac_cv_func_socket=yes
8914                 ac_cv_func_select=yes
8915                 ac_cv_func_closesocket=yes
8916                 ac_cv_func_gethostname=yes
8917                 if test $curlib = ws2_32; then
8918                         ol_cv_winsock=winsock2
8919                         cat >> confdefs.h <<\EOF
8920 #define HAVE_WINSOCK2 1
8921 EOF
8922
8923                 fi
8924                 break
8925         fi
8926         LIBS="$save_LIBS"
8927 done
8928 fi
8929
8930 echo "$ac_t""$ol_cv_winsock" 1>&6
8931 fi
8932
8933
8934 echo $ac_n "checking for socket""... $ac_c" 1>&6
8935 echo "configure:8934: checking for socket" >&5
8936 if eval "test \"\${ac_cv_func_socket+set}\" = set"; then
8937   echo $ac_n "(cached) $ac_c" 1>&6
8938 else
8939   cat > conftest.$ac_ext <<EOF
8940 #line 8939 "configure"
8941 #include "confdefs.h"
8942 /* System header to define __stub macros and hopefully few prototypes,
8943     which can conflict with char socket(); below.  */
8944 #include <assert.h>
8945 /* Override any gcc2 internal prototype to avoid an error.  */
8946 /* We use char because int might match the return type of a gcc2
8947     builtin and then its argument prototype would still apply.  */
8948 char socket();
8949 char (*f)();
8950
8951 int main() {
8952
8953 /* The GNU C library defines this for functions which it implements
8954     to always fail with ENOSYS.  Some functions are actually named
8955     something starting with __ and the normal name is an alias.  */
8956 #if defined (__stub_socket) || defined (__stub___socket)
8957 choke me
8958 #else
8959 f = socket;
8960 #endif
8961
8962 ; return 0; }
8963 EOF
8964 if { (eval echo configure:8963: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8965   rm -rf conftest*
8966   eval "ac_cv_func_socket=yes"
8967 else
8968   echo "configure: failed program was:" >&5
8969   cat conftest.$ac_ext >&5
8970   rm -rf conftest*
8971   eval "ac_cv_func_socket=no"
8972 fi
8973 rm -f conftest*
8974 fi
8975
8976 if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
8977   echo "$ac_t""yes" 1>&6
8978   :
8979 else
8980   echo "$ac_t""no" 1>&6
8981         
8982         echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6
8983 echo "configure:8982: checking for main in -lsocket" >&5
8984 ac_lib_var=`echo socket'_'main | sed 'y%./+-:%__p__%'`
8985 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8986   echo $ac_n "(cached) $ac_c" 1>&6
8987 else
8988   ac_save_LIBS="$LIBS"
8989 LIBS="-lsocket  $LIBS"
8990 cat > conftest.$ac_ext <<EOF
8991 #line 8990 "configure"
8992 #include "confdefs.h"
8993
8994 int main() {
8995 main()
8996 ; return 0; }
8997 EOF
8998 if { (eval echo configure:8997: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8999   rm -rf conftest*
9000   eval "ac_cv_lib_$ac_lib_var=yes"
9001 else
9002   echo "configure: failed program was:" >&5
9003   cat conftest.$ac_ext >&5
9004   rm -rf conftest*
9005   eval "ac_cv_lib_$ac_lib_var=no"
9006 fi
9007 rm -f conftest*
9008 LIBS="$ac_save_LIBS"
9009
9010 fi
9011 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9012   echo "$ac_t""yes" 1>&6
9013     ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9014     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9015   cat >> confdefs.h <<EOF
9016 #define $ac_tr_lib 1
9017 EOF
9018
9019   LIBS="-lsocket $LIBS"
9020
9021 else
9022   echo "$ac_t""no" 1>&6
9023 fi
9024
9025         echo $ac_n "checking for main in -lnet""... $ac_c" 1>&6
9026 echo "configure:9025: checking for main in -lnet" >&5
9027 ac_lib_var=`echo net'_'main | sed 'y%./+-:%__p__%'`
9028 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9029   echo $ac_n "(cached) $ac_c" 1>&6
9030 else
9031   ac_save_LIBS="$LIBS"
9032 LIBS="-lnet  $LIBS"
9033 cat > conftest.$ac_ext <<EOF
9034 #line 9033 "configure"
9035 #include "confdefs.h"
9036
9037 int main() {
9038 main()
9039 ; return 0; }
9040 EOF
9041 if { (eval echo configure:9040: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9042   rm -rf conftest*
9043   eval "ac_cv_lib_$ac_lib_var=yes"
9044 else
9045   echo "configure: failed program was:" >&5
9046   cat conftest.$ac_ext >&5
9047   rm -rf conftest*
9048   eval "ac_cv_lib_$ac_lib_var=no"
9049 fi
9050 rm -f conftest*
9051 LIBS="$ac_save_LIBS"
9052
9053 fi
9054 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9055   echo "$ac_t""yes" 1>&6
9056     ac_tr_lib=HAVE_LIB`echo net | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9057     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9058   cat >> confdefs.h <<EOF
9059 #define $ac_tr_lib 1
9060 EOF
9061
9062   LIBS="-lnet $LIBS"
9063
9064 else
9065   echo "$ac_t""no" 1>&6
9066 fi
9067
9068         echo $ac_n "checking for main in -lnsl_s""... $ac_c" 1>&6
9069 echo "configure:9068: checking for main in -lnsl_s" >&5
9070 ac_lib_var=`echo nsl_s'_'main | sed 'y%./+-:%__p__%'`
9071 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9072   echo $ac_n "(cached) $ac_c" 1>&6
9073 else
9074   ac_save_LIBS="$LIBS"
9075 LIBS="-lnsl_s  $LIBS"
9076 cat > conftest.$ac_ext <<EOF
9077 #line 9076 "configure"
9078 #include "confdefs.h"
9079
9080 int main() {
9081 main()
9082 ; return 0; }
9083 EOF
9084 if { (eval echo configure:9083: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9085   rm -rf conftest*
9086   eval "ac_cv_lib_$ac_lib_var=yes"
9087 else
9088   echo "configure: failed program was:" >&5
9089   cat conftest.$ac_ext >&5
9090   rm -rf conftest*
9091   eval "ac_cv_lib_$ac_lib_var=no"
9092 fi
9093 rm -f conftest*
9094 LIBS="$ac_save_LIBS"
9095
9096 fi
9097 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9098   echo "$ac_t""yes" 1>&6
9099     ac_tr_lib=HAVE_LIB`echo nsl_s | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9100     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9101   cat >> confdefs.h <<EOF
9102 #define $ac_tr_lib 1
9103 EOF
9104
9105   LIBS="-lnsl_s $LIBS"
9106
9107 else
9108   echo "$ac_t""no" 1>&6
9109 fi
9110
9111         echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
9112 echo "configure:9111: checking for main in -lnsl" >&5
9113 ac_lib_var=`echo nsl'_'main | sed 'y%./+-:%__p__%'`
9114 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9115   echo $ac_n "(cached) $ac_c" 1>&6
9116 else
9117   ac_save_LIBS="$LIBS"
9118 LIBS="-lnsl  $LIBS"
9119 cat > conftest.$ac_ext <<EOF
9120 #line 9119 "configure"
9121 #include "confdefs.h"
9122
9123 int main() {
9124 main()
9125 ; return 0; }
9126 EOF
9127 if { (eval echo configure:9126: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9128   rm -rf conftest*
9129   eval "ac_cv_lib_$ac_lib_var=yes"
9130 else
9131   echo "configure: failed program was:" >&5
9132   cat conftest.$ac_ext >&5
9133   rm -rf conftest*
9134   eval "ac_cv_lib_$ac_lib_var=no"
9135 fi
9136 rm -f conftest*
9137 LIBS="$ac_save_LIBS"
9138
9139 fi
9140 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9141   echo "$ac_t""yes" 1>&6
9142     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9143     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9144   cat >> confdefs.h <<EOF
9145 #define $ac_tr_lib 1
9146 EOF
9147
9148   LIBS="-lnsl $LIBS"
9149
9150 else
9151   echo "$ac_t""no" 1>&6
9152 fi
9153
9154         echo $ac_n "checking for socket in -linet""... $ac_c" 1>&6
9155 echo "configure:9154: checking for socket in -linet" >&5
9156 ac_lib_var=`echo inet'_'socket | sed 'y%./+-:%__p__%'`
9157 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9158   echo $ac_n "(cached) $ac_c" 1>&6
9159 else
9160   ac_save_LIBS="$LIBS"
9161 LIBS="-linet  $LIBS"
9162 cat > conftest.$ac_ext <<EOF
9163 #line 9162 "configure"
9164 #include "confdefs.h"
9165 /* Override any gcc2 internal prototype to avoid an error.  */
9166 /* We use char because int might match the return type of a gcc2
9167     builtin and then its argument prototype would still apply.  */
9168 char socket();
9169
9170 int main() {
9171 socket()
9172 ; return 0; }
9173 EOF
9174 if { (eval echo configure:9173: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9175   rm -rf conftest*
9176   eval "ac_cv_lib_$ac_lib_var=yes"
9177 else
9178   echo "configure: failed program was:" >&5
9179   cat conftest.$ac_ext >&5
9180   rm -rf conftest*
9181   eval "ac_cv_lib_$ac_lib_var=no"
9182 fi
9183 rm -f conftest*
9184 LIBS="$ac_save_LIBS"
9185
9186 fi
9187 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9188   echo "$ac_t""yes" 1>&6
9189     ac_tr_lib=HAVE_LIB`echo inet | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9190     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9191   cat >> confdefs.h <<EOF
9192 #define $ac_tr_lib 1
9193 EOF
9194
9195   LIBS="-linet $LIBS"
9196
9197 else
9198   echo "$ac_t""no" 1>&6
9199 fi
9200
9201         echo $ac_n "checking for main in -lgen""... $ac_c" 1>&6
9202 echo "configure:9201: checking for main in -lgen" >&5
9203 ac_lib_var=`echo gen'_'main | sed 'y%./+-:%__p__%'`
9204 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9205   echo $ac_n "(cached) $ac_c" 1>&6
9206 else
9207   ac_save_LIBS="$LIBS"
9208 LIBS="-lgen  $LIBS"
9209 cat > conftest.$ac_ext <<EOF
9210 #line 9209 "configure"
9211 #include "confdefs.h"
9212
9213 int main() {
9214 main()
9215 ; return 0; }
9216 EOF
9217 if { (eval echo configure:9216: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9218   rm -rf conftest*
9219   eval "ac_cv_lib_$ac_lib_var=yes"
9220 else
9221   echo "configure: failed program was:" >&5
9222   cat conftest.$ac_ext >&5
9223   rm -rf conftest*
9224   eval "ac_cv_lib_$ac_lib_var=no"
9225 fi
9226 rm -f conftest*
9227 LIBS="$ac_save_LIBS"
9228
9229 fi
9230 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9231   echo "$ac_t""yes" 1>&6
9232     ac_tr_lib=HAVE_LIB`echo gen | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9233     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9234   cat >> confdefs.h <<EOF
9235 #define $ac_tr_lib 1
9236 EOF
9237
9238   LIBS="-lgen $LIBS"
9239
9240 else
9241   echo "$ac_t""no" 1>&6
9242 fi
9243
9244
9245 fi
9246
9247
9248 echo $ac_n "checking for select""... $ac_c" 1>&6
9249 echo "configure:9248: checking for select" >&5
9250 if eval "test \"\${ac_cv_func_select+set}\" = set"; then
9251   echo $ac_n "(cached) $ac_c" 1>&6
9252 else
9253   cat > conftest.$ac_ext <<EOF
9254 #line 9253 "configure"
9255 #include "confdefs.h"
9256 /* System header to define __stub macros and hopefully few prototypes,
9257     which can conflict with char select(); below.  */
9258 #include <assert.h>
9259 /* Override any gcc2 internal prototype to avoid an error.  */
9260 /* We use char because int might match the return type of a gcc2
9261     builtin and then its argument prototype would still apply.  */
9262 char select();
9263 char (*f)();
9264
9265 int main() {
9266
9267 /* The GNU C library defines this for functions which it implements
9268     to always fail with ENOSYS.  Some functions are actually named
9269     something starting with __ and the normal name is an alias.  */
9270 #if defined (__stub_select) || defined (__stub___select)
9271 choke me
9272 #else
9273 f = select;
9274 #endif
9275
9276 ; return 0; }
9277 EOF
9278 if { (eval echo configure:9277: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9279   rm -rf conftest*
9280   eval "ac_cv_func_select=yes"
9281 else
9282   echo "configure: failed program was:" >&5
9283   cat conftest.$ac_ext >&5
9284   rm -rf conftest*
9285   eval "ac_cv_func_select=no"
9286 fi
9287 rm -f conftest*
9288 fi
9289
9290 if eval "test \"`echo '$ac_cv_func_'select`\" = yes"; then
9291   echo "$ac_t""yes" 1>&6
9292   :
9293 else
9294   echo "$ac_t""no" 1>&6
9295 { echo "configure: error: select() required." 1>&2; exit 1; }
9296 fi
9297
9298
9299 if test "${ac_cv_header_winsock_h}" != yes; then
9300                                 echo $ac_n "checking types of arguments for select()""... $ac_c" 1>&6
9301 echo "configure:9300: checking types of arguments for select()" >&5
9302  if eval "test \"\${ac_cv_func_select_arg234+set}\" = set"; then
9303   echo $ac_n "(cached) $ac_c" 1>&6
9304 else
9305    if eval "test \"\${ac_cv_func_select_arg1+set}\" = set"; then
9306   echo $ac_n "(cached) $ac_c" 1>&6
9307 else
9308     if eval "test \"\${ac_cv_func_select_arg5+set}\" = set"; then
9309   echo $ac_n "(cached) $ac_c" 1>&6
9310 else
9311      for ac_cv_func_select_arg234 in 'fd_set *' 'int *' 'void *'; do
9312      for ac_cv_func_select_arg1 in 'int' 'size_t' 'unsigned long' 'unsigned'; do
9313       for ac_cv_func_select_arg5 in 'struct timeval *' 'const struct timeval *'; do
9314        cat > conftest.$ac_ext <<EOF
9315 #line 9314 "configure"
9316 #include "confdefs.h"
9317 #ifdef HAVE_SYS_TYPES_H
9318 #include <sys/types.h>
9319 #endif
9320 #ifdef HAVE_SYS_TIME_H
9321 #include <sys/time.h>
9322 #endif
9323 #ifdef HAVE_SYS_SELECT_H
9324 #include <sys/select.h>
9325 #endif
9326 #ifdef HAVE_SYS_SOCKET_H
9327 #include <sys/socket.h>
9328 #endif
9329 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);
9330 int main() {
9331
9332 ; return 0; }
9333 EOF
9334 if { (eval echo configure:9333: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9335   rm -rf conftest*
9336           ac_not_found=no ; break 3
9337 else
9338   echo "configure: failed program was:" >&5
9339   cat conftest.$ac_ext >&5
9340   rm -rf conftest*
9341   ac_not_found=yes
9342 fi
9343 rm -f conftest*
9344       done
9345      done
9346     done
9347    
9348 fi
9349   
9350 fi
9351  
9352 fi
9353  if test "$ac_not_found" = yes; then
9354   ac_cv_func_select_arg1=int 
9355   ac_cv_func_select_arg234='int *' 
9356   ac_cv_func_select_arg5='struct timeval *'
9357  fi
9358  echo "$ac_t""$ac_cv_func_select_arg1,$ac_cv_func_select_arg234,$ac_cv_func_select_arg5" 1>&6
9359  cat >> confdefs.h <<EOF
9360 #define SELECT_TYPE_ARG1 $ac_cv_func_select_arg1
9361 EOF
9362
9363  cat >> confdefs.h <<EOF
9364 #define SELECT_TYPE_ARG234 ($ac_cv_func_select_arg234)
9365 EOF
9366
9367  cat >> confdefs.h <<EOF
9368 #define SELECT_TYPE_ARG5 ($ac_cv_func_select_arg5)
9369 EOF
9370
9371
9372 fi
9373
9374
9375 for ac_func in poll 
9376 do
9377 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9378 echo "configure:9377: checking for $ac_func" >&5
9379 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
9380   echo $ac_n "(cached) $ac_c" 1>&6
9381 else
9382   cat > conftest.$ac_ext <<EOF
9383 #line 9382 "configure"
9384 #include "confdefs.h"
9385 /* System header to define __stub macros and hopefully few prototypes,
9386     which can conflict with char $ac_func(); below.  */
9387 #include <assert.h>
9388 /* Override any gcc2 internal prototype to avoid an error.  */
9389 /* We use char because int might match the return type of a gcc2
9390     builtin and then its argument prototype would still apply.  */
9391 char $ac_func();
9392 char (*f)();
9393
9394 int main() {
9395
9396 /* The GNU C library defines this for functions which it implements
9397     to always fail with ENOSYS.  Some functions are actually named
9398     something starting with __ and the normal name is an alias.  */
9399 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9400 choke me
9401 #else
9402 f = $ac_func;
9403 #endif
9404
9405 ; return 0; }
9406 EOF
9407 if { (eval echo configure:9406: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9408   rm -rf conftest*
9409   eval "ac_cv_func_$ac_func=yes"
9410 else
9411   echo "configure: failed program was:" >&5
9412   cat conftest.$ac_ext >&5
9413   rm -rf conftest*
9414   eval "ac_cv_func_$ac_func=no"
9415 fi
9416 rm -f conftest*
9417 fi
9418
9419 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9420   echo "$ac_t""yes" 1>&6
9421     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9422   cat >> confdefs.h <<EOF
9423 #define $ac_tr_func 1
9424 EOF
9425  
9426 else
9427   echo "$ac_t""no" 1>&6
9428 fi
9429 done
9430
9431 for ac_hdr in poll.h 
9432 do
9433 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9434 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9435 echo "configure:9434: checking for $ac_hdr" >&5
9436 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9437   echo $ac_n "(cached) $ac_c" 1>&6
9438 else
9439   cat > conftest.$ac_ext <<EOF
9440 #line 9439 "configure"
9441 #include "confdefs.h"
9442 #include <$ac_hdr>
9443 EOF
9444 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9445 { (eval echo configure:9444: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9446 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9447 if test -z "$ac_err"; then
9448   rm -rf conftest*
9449   eval "ac_cv_header_$ac_safe=yes"
9450 else
9451   echo "$ac_err" >&5
9452   echo "configure: failed program was:" >&5
9453   cat conftest.$ac_ext >&5
9454   rm -rf conftest*
9455   eval "ac_cv_header_$ac_safe=no"
9456 fi
9457 rm -f conftest*
9458 fi
9459 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9460   echo "$ac_t""yes" 1>&6
9461     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9462   cat >> confdefs.h <<EOF
9463 #define $ac_tr_hdr 1
9464 EOF
9465  
9466 else
9467   echo "$ac_t""no" 1>&6
9468 fi
9469 done
9470
9471
9472 for ac_hdr in sys/epoll.h 
9473 do
9474 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9475 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9476 echo "configure:9475: checking for $ac_hdr" >&5
9477 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9478   echo $ac_n "(cached) $ac_c" 1>&6
9479 else
9480   cat > conftest.$ac_ext <<EOF
9481 #line 9480 "configure"
9482 #include "confdefs.h"
9483 #include <$ac_hdr>
9484 EOF
9485 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9486 { (eval echo configure:9485: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9487 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9488 if test -z "$ac_err"; then
9489   rm -rf conftest*
9490   eval "ac_cv_header_$ac_safe=yes"
9491 else
9492   echo "$ac_err" >&5
9493   echo "configure: failed program was:" >&5
9494   cat conftest.$ac_ext >&5
9495   rm -rf conftest*
9496   eval "ac_cv_header_$ac_safe=no"
9497 fi
9498 rm -f conftest*
9499 fi
9500 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9501   echo "$ac_t""yes" 1>&6
9502     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9503   cat >> confdefs.h <<EOF
9504 #define $ac_tr_hdr 1
9505 EOF
9506  
9507 else
9508   echo "$ac_t""no" 1>&6
9509 fi
9510 done
9511
9512 if test "${ac_cv_header_sys_epoll_h}" = yes; then
9513 echo $ac_n "checking for epoll system call""... $ac_c" 1>&6
9514 echo "configure:9513: checking for epoll system call" >&5
9515 if test "$cross_compiling" = yes; then
9516   echo "$ac_t""no" 1>&6
9517 else
9518   cat > conftest.$ac_ext <<EOF
9519 #line 9518 "configure"
9520 #include "confdefs.h"
9521 int main(int argc, char *argv)
9522 {
9523         int epfd = epoll_create(256);
9524         exit (epfd == -1 ? 1 : 0);
9525 }
9526 EOF
9527 if { (eval echo configure:9526: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9528 then
9529   echo "$ac_t""yes" 1>&6
9530 cat >> confdefs.h <<\EOF
9531 #define HAVE_EPOLL 1
9532 EOF
9533
9534 else
9535   echo "configure: failed program was:" >&5
9536   cat conftest.$ac_ext >&5
9537   rm -fr conftest*
9538   echo "$ac_t""no" 1>&6
9539 fi
9540 rm -fr conftest*
9541 fi
9542
9543 fi
9544
9545 # strerror checks
9546 echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6
9547 echo "configure:9546: checking declaration of sys_errlist" >&5
9548 if eval "test \"\${ol_cv_dcl_sys_errlist+set}\" = set"; then
9549   echo $ac_n "(cached) $ac_c" 1>&6
9550 else
9551   
9552         cat > conftest.$ac_ext <<EOF
9553 #line 9552 "configure"
9554 #include "confdefs.h"
9555
9556 #include <stdio.h>
9557 #include <sys/types.h>
9558 #include <errno.h>
9559 #ifdef WINNT
9560 #include <stdlib.h>
9561 #endif 
9562 int main() {
9563 char *c = (char *) *sys_errlist
9564 ; return 0; }
9565 EOF
9566 if { (eval echo configure:9565: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9567   rm -rf conftest*
9568   ol_cv_dcl_sys_errlist=yes
9569         ol_cv_have_sys_errlist=yes
9570 else
9571   echo "configure: failed program was:" >&5
9572   cat conftest.$ac_ext >&5
9573   rm -rf conftest*
9574   ol_cv_dcl_sys_errlist=no
9575 fi
9576 rm -f conftest*
9577 fi
9578
9579 echo "$ac_t""$ol_cv_dcl_sys_errlist" 1>&6
9580 #
9581 # It's possible (for near-UNIX clones) that sys_errlist doesn't exist
9582 if test $ol_cv_dcl_sys_errlist = no ; then
9583         cat >> confdefs.h <<\EOF
9584 #define DECL_SYS_ERRLIST 1
9585 EOF
9586
9587
9588         echo $ac_n "checking existence of sys_errlist""... $ac_c" 1>&6
9589 echo "configure:9588: checking existence of sys_errlist" >&5
9590 if eval "test \"\${ol_cv_have_sys_errlist+set}\" = set"; then
9591   echo $ac_n "(cached) $ac_c" 1>&6
9592 else
9593   
9594                 cat > conftest.$ac_ext <<EOF
9595 #line 9594 "configure"
9596 #include "confdefs.h"
9597 #include <errno.h>
9598 int main() {
9599 char *c = (char *) *sys_errlist
9600 ; return 0; }
9601 EOF
9602 if { (eval echo configure:9601: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9603   rm -rf conftest*
9604   ol_cv_have_sys_errlist=yes
9605 else
9606   echo "configure: failed program was:" >&5
9607   cat conftest.$ac_ext >&5
9608   rm -rf conftest*
9609   ol_cv_have_sys_errlist=no
9610 fi
9611 rm -f conftest*
9612 fi
9613
9614 echo "$ac_t""$ol_cv_have_sys_errlist" 1>&6
9615 fi
9616 if test $ol_cv_have_sys_errlist = yes ; then
9617         cat >> confdefs.h <<\EOF
9618 #define HAVE_SYS_ERRLIST 1
9619 EOF
9620
9621 fi
9622  for ac_func in strerror strerror_r
9623 do
9624 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9625 echo "configure:9624: checking for $ac_func" >&5
9626 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
9627   echo $ac_n "(cached) $ac_c" 1>&6
9628 else
9629   cat > conftest.$ac_ext <<EOF
9630 #line 9629 "configure"
9631 #include "confdefs.h"
9632 /* System header to define __stub macros and hopefully few prototypes,
9633     which can conflict with char $ac_func(); below.  */
9634 #include <assert.h>
9635 /* Override any gcc2 internal prototype to avoid an error.  */
9636 /* We use char because int might match the return type of a gcc2
9637     builtin and then its argument prototype would still apply.  */
9638 char $ac_func();
9639 char (*f)();
9640
9641 int main() {
9642
9643 /* The GNU C library defines this for functions which it implements
9644     to always fail with ENOSYS.  Some functions are actually named
9645     something starting with __ and the normal name is an alias.  */
9646 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9647 choke me
9648 #else
9649 f = $ac_func;
9650 #endif
9651
9652 ; return 0; }
9653 EOF
9654 if { (eval echo configure:9653: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9655   rm -rf conftest*
9656   eval "ac_cv_func_$ac_func=yes"
9657 else
9658   echo "configure: failed program was:" >&5
9659   cat conftest.$ac_ext >&5
9660   rm -rf conftest*
9661   eval "ac_cv_func_$ac_func=no"
9662 fi
9663 rm -f conftest*
9664 fi
9665
9666 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9667   echo "$ac_t""yes" 1>&6
9668     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9669   cat >> confdefs.h <<EOF
9670 #define $ac_tr_func 1
9671 EOF
9672  
9673 else
9674   echo "$ac_t""no" 1>&6
9675 fi
9676 done
9677
9678 ol_cv_func_strerror_r=no
9679 if test "${ac_cv_func_strerror_r}" = yes ; then
9680         echo $ac_n "checking non-posix strerror_r""... $ac_c" 1>&6
9681 echo "configure:9680: checking non-posix strerror_r" >&5
9682 if eval "test \"\${ol_cv_nonposix_strerror_r+set}\" = set"; then
9683   echo $ac_n "(cached) $ac_c" 1>&6
9684 else
9685   
9686         cat > conftest.$ac_ext <<EOF
9687 #line 9686 "configure"
9688 #include "confdefs.h"
9689 #include <string.h>
9690 EOF
9691 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9692   egrep "strerror_r" >/dev/null 2>&1; then
9693   rm -rf conftest*
9694   ol_decl_strerror_r=yes
9695 else
9696   rm -rf conftest*
9697   ol_decl_strerror_r=no
9698 fi
9699 rm -f conftest*
9700
9701         if test $ol_decl_strerror_r = yes ; then
9702                 cat > conftest.$ac_ext <<EOF
9703 #line 9702 "configure"
9704 #include "confdefs.h"
9705 #include <string.h>
9706 int main() {
9707    /* from autoconf 2.59 */
9708                                 char buf[100];
9709                                 char x = *strerror_r (0, buf, sizeof buf);
9710                                 char *p = strerror_r (0, buf, sizeof buf);
9711                         
9712 ; return 0; }
9713 EOF
9714 if { (eval echo configure:9713: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9715   rm -rf conftest*
9716   ol_cv_nonposix_strerror_r=yes
9717 else
9718   echo "configure: failed program was:" >&5
9719   cat conftest.$ac_ext >&5
9720   rm -rf conftest*
9721   ol_cv_nonposix_strerror_r=no
9722 fi
9723 rm -f conftest*
9724         else
9725                 if test "$cross_compiling" = yes; then
9726   ol_cv_nonposix_strerror=no
9727 else
9728   cat > conftest.$ac_ext <<EOF
9729 #line 9728 "configure"
9730 #include "confdefs.h"
9731
9732                         main() {
9733                                 char buf[100];
9734                                 buf[0] = 0;
9735                                 strerror_r( 1, buf, sizeof buf );
9736                                 exit( buf[0] == 0 );
9737                         }
9738                         
9739 EOF
9740 if { (eval echo configure:9739: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9741 then
9742   ol_cv_nonposix_strerror_r=yes
9743 else
9744   echo "configure: failed program was:" >&5
9745   cat conftest.$ac_ext >&5
9746   rm -fr conftest*
9747   ol_cv_nonposix_strerror=no
9748 fi
9749 rm -fr conftest*
9750 fi
9751
9752         fi
9753         
9754 fi
9755
9756 echo "$ac_t""$ol_cv_nonposix_strerror_r" 1>&6
9757 if test $ol_cv_nonposix_strerror_r = yes ; then
9758         cat >> confdefs.h <<\EOF
9759 #define HAVE_NONPOSIX_STRERROR_R 1
9760 EOF
9761
9762 fi
9763
9764 elif test "${ac_cv_func_strerror}" = no ; then
9765         echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6
9766 echo "configure:9765: checking declaration of sys_errlist" >&5
9767 if eval "test \"\${ol_cv_dcl_sys_errlist+set}\" = set"; then
9768   echo $ac_n "(cached) $ac_c" 1>&6
9769 else
9770   
9771         cat > conftest.$ac_ext <<EOF
9772 #line 9771 "configure"
9773 #include "confdefs.h"
9774
9775 #include <stdio.h>
9776 #include <sys/types.h>
9777 #include <errno.h>
9778 #ifdef WINNT
9779 #include <stdlib.h>
9780 #endif 
9781 int main() {
9782 char *c = (char *) *sys_errlist
9783 ; return 0; }
9784 EOF
9785 if { (eval echo configure:9784: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9786   rm -rf conftest*
9787   ol_cv_dcl_sys_errlist=yes
9788         ol_cv_have_sys_errlist=yes
9789 else
9790   echo "configure: failed program was:" >&5
9791   cat conftest.$ac_ext >&5
9792   rm -rf conftest*
9793   ol_cv_dcl_sys_errlist=no
9794 fi
9795 rm -f conftest*
9796 fi
9797
9798 echo "$ac_t""$ol_cv_dcl_sys_errlist" 1>&6
9799 #
9800 # It's possible (for near-UNIX clones) that sys_errlist doesn't exist
9801 if test $ol_cv_dcl_sys_errlist = no ; then
9802         cat >> confdefs.h <<\EOF
9803 #define DECL_SYS_ERRLIST 1
9804 EOF
9805
9806
9807         echo $ac_n "checking existence of sys_errlist""... $ac_c" 1>&6
9808 echo "configure:9807: checking existence of sys_errlist" >&5
9809 if eval "test \"\${ol_cv_have_sys_errlist+set}\" = set"; then
9810   echo $ac_n "(cached) $ac_c" 1>&6
9811 else
9812   
9813                 cat > conftest.$ac_ext <<EOF
9814 #line 9813 "configure"
9815 #include "confdefs.h"
9816 #include <errno.h>
9817 int main() {
9818 char *c = (char *) *sys_errlist
9819 ; return 0; }
9820 EOF
9821 if { (eval echo configure:9820: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9822   rm -rf conftest*
9823   ol_cv_have_sys_errlist=yes
9824 else
9825   echo "configure: failed program was:" >&5
9826   cat conftest.$ac_ext >&5
9827   rm -rf conftest*
9828   ol_cv_have_sys_errlist=no
9829 fi
9830 rm -f conftest*
9831 fi
9832
9833 echo "$ac_t""$ol_cv_have_sys_errlist" 1>&6
9834 fi
9835 if test $ol_cv_have_sys_errlist = yes ; then
9836         cat >> confdefs.h <<\EOF
9837 #define HAVE_SYS_ERRLIST 1
9838 EOF
9839
9840 fi
9841
9842 fi
9843
9844
9845 for ac_hdr in regex.h 
9846 do
9847 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9848 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9849 echo "configure:9848: checking for $ac_hdr" >&5
9850 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9851   echo $ac_n "(cached) $ac_c" 1>&6
9852 else
9853   cat > conftest.$ac_ext <<EOF
9854 #line 9853 "configure"
9855 #include "confdefs.h"
9856 #include <$ac_hdr>
9857 EOF
9858 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9859 { (eval echo configure:9858: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9860 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9861 if test -z "$ac_err"; then
9862   rm -rf conftest*
9863   eval "ac_cv_header_$ac_safe=yes"
9864 else
9865   echo "$ac_err" >&5
9866   echo "configure: failed program was:" >&5
9867   cat conftest.$ac_ext >&5
9868   rm -rf conftest*
9869   eval "ac_cv_header_$ac_safe=no"
9870 fi
9871 rm -f conftest*
9872 fi
9873 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9874   echo "$ac_t""yes" 1>&6
9875     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9876   cat >> confdefs.h <<EOF
9877 #define $ac_tr_hdr 1
9878 EOF
9879  
9880 else
9881   echo "$ac_t""no" 1>&6
9882 fi
9883 done
9884
9885 if test "$ac_cv_header_regex_h" != yes ; then
9886         { echo "configure: error: POSIX regex.h required." 1>&2; exit 1; }
9887 fi
9888
9889 echo $ac_n "checking for library containing regfree""... $ac_c" 1>&6
9890 echo "configure:9889: checking for library containing regfree" >&5
9891 if eval "test \"\${ac_cv_search_regfree+set}\" = set"; then
9892   echo $ac_n "(cached) $ac_c" 1>&6
9893 else
9894   ac_func_search_save_LIBS="$LIBS"
9895 ac_cv_search_regfree="no"
9896 cat > conftest.$ac_ext <<EOF
9897 #line 9896 "configure"
9898 #include "confdefs.h"
9899 /* Override any gcc2 internal prototype to avoid an error.  */
9900 /* We use char because int might match the return type of a gcc2
9901     builtin and then its argument prototype would still apply.  */
9902 char regfree();
9903
9904 int main() {
9905 regfree()
9906 ; return 0; }
9907 EOF
9908 if { (eval echo configure:9907: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9909   rm -rf conftest*
9910   ac_cv_search_regfree="none required"
9911 else
9912   echo "configure: failed program was:" >&5
9913   cat conftest.$ac_ext >&5
9914 fi
9915 rm -f conftest*
9916 test "$ac_cv_search_regfree" = "no" && for ac_lib in regex gnuregex; do
9917 LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9918 cat > conftest.$ac_ext <<EOF
9919 #line 9918 "configure"
9920 #include "confdefs.h"
9921 /* Override any gcc2 internal prototype to avoid an error.  */
9922 /* We use char because int might match the return type of a gcc2
9923     builtin and then its argument prototype would still apply.  */
9924 char regfree();
9925
9926 int main() {
9927 regfree()
9928 ; return 0; }
9929 EOF
9930 if { (eval echo configure:9929: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9931   rm -rf conftest*
9932   ac_cv_search_regfree="-l$ac_lib"
9933 break
9934 else
9935   echo "configure: failed program was:" >&5
9936   cat conftest.$ac_ext >&5
9937 fi
9938 rm -f conftest*
9939 done
9940 LIBS="$ac_func_search_save_LIBS"
9941 fi
9942
9943 echo "$ac_t""$ac_cv_search_regfree" 1>&6
9944 if test "$ac_cv_search_regfree" != "no"; then
9945   test "$ac_cv_search_regfree" = "none required" || LIBS="$ac_cv_search_regfree $LIBS"
9946   :
9947 else :
9948   { echo "configure: error: POSIX regex required." 1>&2; exit 1; }
9949 fi
9950
9951
9952 echo $ac_n "checking for compatible POSIX regex""... $ac_c" 1>&6
9953 echo "configure:9952: checking for compatible POSIX regex" >&5
9954 if eval "test \"\${ol_cv_c_posix_regex+set}\" = set"; then
9955   echo $ac_n "(cached) $ac_c" 1>&6
9956 else
9957   
9958         if test "$cross_compiling" = yes; then
9959   ol_cv_c_posix_regex=cross
9960 else
9961   cat > conftest.$ac_ext <<EOF
9962 #line 9961 "configure"
9963 #include "confdefs.h"
9964
9965 #include <sys/types.h>
9966 #include <regex.h>
9967 static char *pattern, *string;
9968 main()
9969 {
9970         int rc;
9971         regex_t re;
9972
9973         pattern = "^A";
9974
9975         if(regcomp(&re, pattern, 0)) {
9976                 return -1;
9977         }
9978         
9979         string = "ALL MATCH";
9980         
9981         rc = regexec(&re, string, 0, (void*)0, 0);
9982
9983         regfree(&re);
9984
9985         return rc;
9986 }
9987 EOF
9988 if { (eval echo configure:9987: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9989 then
9990   ol_cv_c_posix_regex=yes
9991 else
9992   echo "configure: failed program was:" >&5
9993   cat conftest.$ac_ext >&5
9994   rm -fr conftest*
9995   ol_cv_c_posix_regex=no
9996 fi
9997 rm -fr conftest*
9998 fi
9999
10000 fi
10001
10002 echo "$ac_t""$ol_cv_c_posix_regex" 1>&6
10003
10004 if test "$ol_cv_c_posix_regex" = no ; then
10005         { echo "configure: error: broken POSIX regex!" 1>&2; exit 1; }
10006 fi
10007
10008
10009 have_uuid=no
10010 for ac_hdr in sys/uuid.h
10011 do
10012 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10013 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10014 echo "configure:10013: checking for $ac_hdr" >&5
10015 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10016   echo $ac_n "(cached) $ac_c" 1>&6
10017 else
10018   cat > conftest.$ac_ext <<EOF
10019 #line 10018 "configure"
10020 #include "confdefs.h"
10021 #include <$ac_hdr>
10022 EOF
10023 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10024 { (eval echo configure:10023: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10025 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10026 if test -z "$ac_err"; then
10027   rm -rf conftest*
10028   eval "ac_cv_header_$ac_safe=yes"
10029 else
10030   echo "$ac_err" >&5
10031   echo "configure: failed program was:" >&5
10032   cat conftest.$ac_ext >&5
10033   rm -rf conftest*
10034   eval "ac_cv_header_$ac_safe=no"
10035 fi
10036 rm -f conftest*
10037 fi
10038 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10039   echo "$ac_t""yes" 1>&6
10040     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10041   cat >> confdefs.h <<EOF
10042 #define $ac_tr_hdr 1
10043 EOF
10044  
10045 else
10046   echo "$ac_t""no" 1>&6
10047 fi
10048 done
10049
10050 if test $ac_cv_header_sys_uuid_h = yes ; then
10051         save_LIBS="$LIBS"
10052         
10053 echo $ac_n "checking for library containing uuid_to_str""... $ac_c" 1>&6
10054 echo "configure:10053: checking for library containing uuid_to_str" >&5
10055 if eval "test \"\${ac_cv_search_uuid_to_str+set}\" = set"; then
10056   echo $ac_n "(cached) $ac_c" 1>&6
10057 else
10058   ac_func_search_save_LIBS="$LIBS"
10059 ac_cv_search_uuid_to_str="no"
10060 cat > conftest.$ac_ext <<EOF
10061 #line 10060 "configure"
10062 #include "confdefs.h"
10063 /* Override any gcc2 internal prototype to avoid an error.  */
10064 /* We use char because int might match the return type of a gcc2
10065     builtin and then its argument prototype would still apply.  */
10066 char uuid_to_str();
10067
10068 int main() {
10069 uuid_to_str()
10070 ; return 0; }
10071 EOF
10072 if { (eval echo configure:10071: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10073   rm -rf conftest*
10074   ac_cv_search_uuid_to_str="none required"
10075 else
10076   echo "configure: failed program was:" >&5
10077   cat conftest.$ac_ext >&5
10078 fi
10079 rm -f conftest*
10080 test "$ac_cv_search_uuid_to_str" = "no" && for ac_lib in uuid; do
10081 LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
10082 cat > conftest.$ac_ext <<EOF
10083 #line 10082 "configure"
10084 #include "confdefs.h"
10085 /* Override any gcc2 internal prototype to avoid an error.  */
10086 /* We use char because int might match the return type of a gcc2
10087     builtin and then its argument prototype would still apply.  */
10088 char uuid_to_str();
10089
10090 int main() {
10091 uuid_to_str()
10092 ; return 0; }
10093 EOF
10094 if { (eval echo configure:10093: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10095   rm -rf conftest*
10096   ac_cv_search_uuid_to_str="-l$ac_lib"
10097 break
10098 else
10099   echo "configure: failed program was:" >&5
10100   cat conftest.$ac_ext >&5
10101 fi
10102 rm -f conftest*
10103 done
10104 LIBS="$ac_func_search_save_LIBS"
10105 fi
10106
10107 echo "$ac_t""$ac_cv_search_uuid_to_str" 1>&6
10108 if test "$ac_cv_search_uuid_to_str" != "no"; then
10109   test "$ac_cv_search_uuid_to_str" = "none required" || LIBS="$ac_cv_search_uuid_to_str $LIBS"
10110   have_uuid=yes
10111 else :
10112   :
10113 fi
10114         LIBS="$save_LIBS"
10115
10116         if test have_uuid = yes ; then
10117                 cat >> confdefs.h <<\EOF
10118 #define HAVE_UUID_TO_STR 1
10119 EOF
10120
10121
10122                 test "$ac_cv_search_uuid_to_str" = "none required" || \
10123                         SLAPD_LIBS="$SLAPD_LIBS $ac_cv_search_uuid_to_str"
10124         fi
10125 fi
10126
10127 if test $have_uuid = no ; then
10128         echo $ac_n "checking to see if -lrpcrt4 is needed for win32 UUID support""... $ac_c" 1>&6
10129 echo "configure:10128: checking to see if -lrpcrt4 is needed for win32 UUID support" >&5
10130         save_LIBS="$LIBS"
10131         LIBS="$LIBS -lrpcrt4"
10132         cat > conftest.$ac_ext <<EOF
10133 #line 10132 "configure"
10134 #include "confdefs.h"
10135
10136                 int __stdcall UuidCreate(void *);
10137                 int __stdcall UuidToStringA(void *,void **);
10138                 
10139 int main() {
10140
10141                 UuidCreate(0);
10142                 UuidToStringA(0,0);
10143                 
10144 ; return 0; }
10145 EOF
10146 if { (eval echo configure:10145: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10147   rm -rf conftest*
10148   need_rpcrt=yes
10149 else
10150   echo "configure: failed program was:" >&5
10151   cat conftest.$ac_ext >&5
10152   rm -rf conftest*
10153   need_rpcrt=no
10154 fi
10155 rm -f conftest*
10156         if test $need_rpcrt = yes; then
10157                 SLAPD_LIBS="$SLAPD_LIBS -lrpcrt4"
10158         fi
10159         LIBS="$save_LIBS"
10160         echo "$ac_t""$need_rpcrt" 1>&6
10161 fi
10162
10163 ol_link_dnssrv=no
10164 echo $ac_n "checking for res_query""... $ac_c" 1>&6
10165 echo "configure:10164: checking for res_query" >&5
10166 if eval "test \"\${ac_cv_func_res_query+set}\" = set"; then
10167   echo $ac_n "(cached) $ac_c" 1>&6
10168 else
10169   cat > conftest.$ac_ext <<EOF
10170 #line 10169 "configure"
10171 #include "confdefs.h"
10172 /* System header to define __stub macros and hopefully few prototypes,
10173     which can conflict with char res_query(); below.  */
10174 #include <assert.h>
10175 /* Override any gcc2 internal prototype to avoid an error.  */
10176 /* We use char because int might match the return type of a gcc2
10177     builtin and then its argument prototype would still apply.  */
10178 char res_query();
10179 char (*f)();
10180
10181 int main() {
10182
10183 /* The GNU C library defines this for functions which it implements
10184     to always fail with ENOSYS.  Some functions are actually named
10185     something starting with __ and the normal name is an alias.  */
10186 #if defined (__stub_res_query) || defined (__stub___res_query)
10187 choke me
10188 #else
10189 f = res_query;
10190 #endif
10191
10192 ; return 0; }
10193 EOF
10194 if { (eval echo configure:10193: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10195   rm -rf conftest*
10196   eval "ac_cv_func_res_query=yes"
10197 else
10198   echo "configure: failed program was:" >&5
10199   cat conftest.$ac_ext >&5
10200   rm -rf conftest*
10201   eval "ac_cv_func_res_query=no"
10202 fi
10203 rm -f conftest*
10204 fi
10205
10206 if eval "test \"`echo '$ac_cv_func_'res_query`\" = yes"; then
10207   echo "$ac_t""yes" 1>&6
10208   :
10209 else
10210   echo "$ac_t""no" 1>&6
10211 fi
10212
10213 if test $ac_cv_func_res_query = no ; then 
10214         echo $ac_n "checking for __res_query""... $ac_c" 1>&6
10215 echo "configure:10214: checking for __res_query" >&5
10216 if eval "test \"\${ac_cv_func___res_query+set}\" = set"; then
10217   echo $ac_n "(cached) $ac_c" 1>&6
10218 else
10219   cat > conftest.$ac_ext <<EOF
10220 #line 10219 "configure"
10221 #include "confdefs.h"
10222 /* System header to define __stub macros and hopefully few prototypes,
10223     which can conflict with char __res_query(); below.  */
10224 #include <assert.h>
10225 /* Override any gcc2 internal prototype to avoid an error.  */
10226 /* We use char because int might match the return type of a gcc2
10227     builtin and then its argument prototype would still apply.  */
10228 char __res_query();
10229 char (*f)();
10230
10231 int main() {
10232
10233 /* The GNU C library defines this for functions which it implements
10234     to always fail with ENOSYS.  Some functions are actually named
10235     something starting with __ and the normal name is an alias.  */
10236 #if defined (__stub___res_query) || defined (__stub_____res_query)
10237 choke me
10238 #else
10239 f = __res_query;
10240 #endif
10241
10242 ; return 0; }
10243 EOF
10244 if { (eval echo configure:10243: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10245   rm -rf conftest*
10246   eval "ac_cv_func___res_query=yes"
10247 else
10248   echo "configure: failed program was:" >&5
10249   cat conftest.$ac_ext >&5
10250   rm -rf conftest*
10251   eval "ac_cv_func___res_query=no"
10252 fi
10253 rm -f conftest*
10254 fi
10255
10256 if eval "test \"`echo '$ac_cv_func_'__res_query`\" = yes"; then
10257   echo "$ac_t""yes" 1>&6
10258   :
10259 else
10260   echo "$ac_t""no" 1>&6
10261 fi
10262
10263         ac_cv_func_res_query=$ac_cv_func___res_query
10264 fi
10265
10266 if test $ac_cv_func_res_query = no ; then 
10267         echo $ac_n "checking for res_query in -lbind""... $ac_c" 1>&6
10268 echo "configure:10267: checking for res_query in -lbind" >&5
10269 ac_lib_var=`echo bind'_'res_query | sed 'y%./+-:%__p__%'`
10270 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10271   echo $ac_n "(cached) $ac_c" 1>&6
10272 else
10273   ac_save_LIBS="$LIBS"
10274 LIBS="-lbind  $LIBS"
10275 cat > conftest.$ac_ext <<EOF
10276 #line 10275 "configure"
10277 #include "confdefs.h"
10278 /* Override any gcc2 internal prototype to avoid an error.  */
10279 /* We use char because int might match the return type of a gcc2
10280     builtin and then its argument prototype would still apply.  */
10281 char res_query();
10282
10283 int main() {
10284 res_query()
10285 ; return 0; }
10286 EOF
10287 if { (eval echo configure:10286: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10288   rm -rf conftest*
10289   eval "ac_cv_lib_$ac_lib_var=yes"
10290 else
10291   echo "configure: failed program was:" >&5
10292   cat conftest.$ac_ext >&5
10293   rm -rf conftest*
10294   eval "ac_cv_lib_$ac_lib_var=no"
10295 fi
10296 rm -f conftest*
10297 LIBS="$ac_save_LIBS"
10298
10299 fi
10300 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10301   echo "$ac_t""yes" 1>&6
10302     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10303     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10304   cat >> confdefs.h <<EOF
10305 #define $ac_tr_lib 1
10306 EOF
10307
10308   LIBS="-lbind $LIBS"
10309
10310 else
10311   echo "$ac_t""no" 1>&6
10312 fi
10313
10314         ac_cv_func_res_query=$ac_cv_lib_bind_res_query
10315 fi
10316
10317 if test $ac_cv_func_res_query = no ; then 
10318         echo $ac_n "checking for __res_query in -lbind""... $ac_c" 1>&6
10319 echo "configure:10318: checking for __res_query in -lbind" >&5
10320 ac_lib_var=`echo bind'_'__res_query | sed 'y%./+-:%__p__%'`
10321 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10322   echo $ac_n "(cached) $ac_c" 1>&6
10323 else
10324   ac_save_LIBS="$LIBS"
10325 LIBS="-lbind  $LIBS"
10326 cat > conftest.$ac_ext <<EOF
10327 #line 10326 "configure"
10328 #include "confdefs.h"
10329 /* Override any gcc2 internal prototype to avoid an error.  */
10330 /* We use char because int might match the return type of a gcc2
10331     builtin and then its argument prototype would still apply.  */
10332 char __res_query();
10333
10334 int main() {
10335 __res_query()
10336 ; return 0; }
10337 EOF
10338 if { (eval echo configure:10337: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10339   rm -rf conftest*
10340   eval "ac_cv_lib_$ac_lib_var=yes"
10341 else
10342   echo "configure: failed program was:" >&5
10343   cat conftest.$ac_ext >&5
10344   rm -rf conftest*
10345   eval "ac_cv_lib_$ac_lib_var=no"
10346 fi
10347 rm -f conftest*
10348 LIBS="$ac_save_LIBS"
10349
10350 fi
10351 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10352   echo "$ac_t""yes" 1>&6
10353     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10354     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10355   cat >> confdefs.h <<EOF
10356 #define $ac_tr_lib 1
10357 EOF
10358
10359   LIBS="-lbind $LIBS"
10360
10361 else
10362   echo "$ac_t""no" 1>&6
10363 fi
10364
10365         ac_cv_func_res_query=$ac_cv_lib_bind___res_query
10366 fi
10367
10368 if test $ac_cv_func_res_query = no ; then 
10369         echo $ac_n "checking for res_query in -lresolv""... $ac_c" 1>&6
10370 echo "configure:10369: checking for res_query in -lresolv" >&5
10371 ac_lib_var=`echo resolv'_'res_query | sed 'y%./+-:%__p__%'`
10372 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10373   echo $ac_n "(cached) $ac_c" 1>&6
10374 else
10375   ac_save_LIBS="$LIBS"
10376 LIBS="-lresolv  $LIBS"
10377 cat > conftest.$ac_ext <<EOF
10378 #line 10377 "configure"
10379 #include "confdefs.h"
10380 /* Override any gcc2 internal prototype to avoid an error.  */
10381 /* We use char because int might match the return type of a gcc2
10382     builtin and then its argument prototype would still apply.  */
10383 char res_query();
10384
10385 int main() {
10386 res_query()
10387 ; return 0; }
10388 EOF
10389 if { (eval echo configure:10388: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10390   rm -rf conftest*
10391   eval "ac_cv_lib_$ac_lib_var=yes"
10392 else
10393   echo "configure: failed program was:" >&5
10394   cat conftest.$ac_ext >&5
10395   rm -rf conftest*
10396   eval "ac_cv_lib_$ac_lib_var=no"
10397 fi
10398 rm -f conftest*
10399 LIBS="$ac_save_LIBS"
10400
10401 fi
10402 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10403   echo "$ac_t""yes" 1>&6
10404     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10405     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10406   cat >> confdefs.h <<EOF
10407 #define $ac_tr_lib 1
10408 EOF
10409
10410   LIBS="-lresolv $LIBS"
10411
10412 else
10413   echo "$ac_t""no" 1>&6
10414 fi
10415
10416         ac_cv_func_res_query=$ac_cv_lib_resolv_res_query
10417 fi
10418
10419 if test $ac_cv_func_res_query = no ; then 
10420         echo $ac_n "checking for __res_query in -lresolv""... $ac_c" 1>&6
10421 echo "configure:10420: checking for __res_query in -lresolv" >&5
10422 ac_lib_var=`echo resolv'_'__res_query | sed 'y%./+-:%__p__%'`
10423 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10424   echo $ac_n "(cached) $ac_c" 1>&6
10425 else
10426   ac_save_LIBS="$LIBS"
10427 LIBS="-lresolv  $LIBS"
10428 cat > conftest.$ac_ext <<EOF
10429 #line 10428 "configure"
10430 #include "confdefs.h"
10431 /* Override any gcc2 internal prototype to avoid an error.  */
10432 /* We use char because int might match the return type of a gcc2
10433     builtin and then its argument prototype would still apply.  */
10434 char __res_query();
10435
10436 int main() {
10437 __res_query()
10438 ; return 0; }
10439 EOF
10440 if { (eval echo configure:10439: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10441   rm -rf conftest*
10442   eval "ac_cv_lib_$ac_lib_var=yes"
10443 else
10444   echo "configure: failed program was:" >&5
10445   cat conftest.$ac_ext >&5
10446   rm -rf conftest*
10447   eval "ac_cv_lib_$ac_lib_var=no"
10448 fi
10449 rm -f conftest*
10450 LIBS="$ac_save_LIBS"
10451
10452 fi
10453 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10454   echo "$ac_t""yes" 1>&6
10455     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10456     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10457   cat >> confdefs.h <<EOF
10458 #define $ac_tr_lib 1
10459 EOF
10460
10461   LIBS="-lresolv $LIBS"
10462
10463 else
10464   echo "$ac_t""no" 1>&6
10465 fi
10466
10467         ac_cv_func_res_query=$ac_cv_lib_resolv___res_query
10468 fi
10469
10470 if test $ac_cv_func_res_query = no ; then 
10471         echo $ac_n "checking for _res_9_query in -lresolv""... $ac_c" 1>&6
10472 echo "configure:10471: checking for _res_9_query in -lresolv" >&5
10473 ac_lib_var=`echo resolv'_'_res_9_query | sed 'y%./+-:%__p__%'`
10474 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10475   echo $ac_n "(cached) $ac_c" 1>&6
10476 else
10477   ac_save_LIBS="$LIBS"
10478 LIBS="-lresolv  $LIBS"
10479 cat > conftest.$ac_ext <<EOF
10480 #line 10479 "configure"
10481 #include "confdefs.h"
10482 /* Override any gcc2 internal prototype to avoid an error.  */
10483 /* We use char because int might match the return type of a gcc2
10484     builtin and then its argument prototype would still apply.  */
10485 char _res_9_query();
10486
10487 int main() {
10488 _res_9_query()
10489 ; return 0; }
10490 EOF
10491 if { (eval echo configure:10490: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10492   rm -rf conftest*
10493   eval "ac_cv_lib_$ac_lib_var=yes"
10494 else
10495   echo "configure: failed program was:" >&5
10496   cat conftest.$ac_ext >&5
10497   rm -rf conftest*
10498   eval "ac_cv_lib_$ac_lib_var=no"
10499 fi
10500 rm -f conftest*
10501 LIBS="$ac_save_LIBS"
10502
10503 fi
10504 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10505   echo "$ac_t""yes" 1>&6
10506     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10507     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10508   cat >> confdefs.h <<EOF
10509 #define $ac_tr_lib 1
10510 EOF
10511
10512   LIBS="-lresolv $LIBS"
10513
10514 else
10515   echo "$ac_t""no" 1>&6
10516 fi
10517
10518         ac_cv_func_res_query=$ac_cv_lib_resolv_res_9_query
10519 fi
10520
10521 if test "$ac_cv_func_res_query" = yes ; then
10522         cat >> confdefs.h <<\EOF
10523 #define HAVE_RES_QUERY 1
10524 EOF
10525
10526
10527         if test $ol_enable_dnssrv != no ; then
10528                 ol_link_dnssrv=yes
10529         fi
10530 fi
10531
10532 if test "$ol_enable_dnssrv" != no -a "$ol_link_dnssrv" = no ; then
10533         { echo "configure: error: DNSSRV requires res_query()" 1>&2; exit 1; }
10534 fi
10535
10536 for ac_func in hstrerror 
10537 do
10538 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10539 echo "configure:10538: checking for $ac_func" >&5
10540 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10541   echo $ac_n "(cached) $ac_c" 1>&6
10542 else
10543   cat > conftest.$ac_ext <<EOF
10544 #line 10543 "configure"
10545 #include "confdefs.h"
10546 /* System header to define __stub macros and hopefully few prototypes,
10547     which can conflict with char $ac_func(); below.  */
10548 #include <assert.h>
10549 /* Override any gcc2 internal prototype to avoid an error.  */
10550 /* We use char because int might match the return type of a gcc2
10551     builtin and then its argument prototype would still apply.  */
10552 char $ac_func();
10553 char (*f)();
10554
10555 int main() {
10556
10557 /* The GNU C library defines this for functions which it implements
10558     to always fail with ENOSYS.  Some functions are actually named
10559     something starting with __ and the normal name is an alias.  */
10560 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10561 choke me
10562 #else
10563 f = $ac_func;
10564 #endif
10565
10566 ; return 0; }
10567 EOF
10568 if { (eval echo configure:10567: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10569   rm -rf conftest*
10570   eval "ac_cv_func_$ac_func=yes"
10571 else
10572   echo "configure: failed program was:" >&5
10573   cat conftest.$ac_ext >&5
10574   rm -rf conftest*
10575   eval "ac_cv_func_$ac_func=no"
10576 fi
10577 rm -f conftest*
10578 fi
10579
10580 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10581   echo "$ac_t""yes" 1>&6
10582     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10583   cat >> confdefs.h <<EOF
10584 #define $ac_tr_func 1
10585 EOF
10586  
10587 else
10588   echo "$ac_t""no" 1>&6
10589 fi
10590 done
10591
10592
10593 for ac_func in getaddrinfo getnameinfo gai_strerror inet_ntop 
10594 do
10595 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10596 echo "configure:10595: checking for $ac_func" >&5
10597 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10598   echo $ac_n "(cached) $ac_c" 1>&6
10599 else
10600   cat > conftest.$ac_ext <<EOF
10601 #line 10600 "configure"
10602 #include "confdefs.h"
10603 /* System header to define __stub macros and hopefully few prototypes,
10604     which can conflict with char $ac_func(); below.  */
10605 #include <assert.h>
10606 /* Override any gcc2 internal prototype to avoid an error.  */
10607 /* We use char because int might match the return type of a gcc2
10608     builtin and then its argument prototype would still apply.  */
10609 char $ac_func();
10610 char (*f)();
10611
10612 int main() {
10613
10614 /* The GNU C library defines this for functions which it implements
10615     to always fail with ENOSYS.  Some functions are actually named
10616     something starting with __ and the normal name is an alias.  */
10617 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10618 choke me
10619 #else
10620 f = $ac_func;
10621 #endif
10622
10623 ; return 0; }
10624 EOF
10625 if { (eval echo configure:10624: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10626   rm -rf conftest*
10627   eval "ac_cv_func_$ac_func=yes"
10628 else
10629   echo "configure: failed program was:" >&5
10630   cat conftest.$ac_ext >&5
10631   rm -rf conftest*
10632   eval "ac_cv_func_$ac_func=no"
10633 fi
10634 rm -f conftest*
10635 fi
10636
10637 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10638   echo "$ac_t""yes" 1>&6
10639     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10640   cat >> confdefs.h <<EOF
10641 #define $ac_tr_func 1
10642 EOF
10643  
10644 else
10645   echo "$ac_t""no" 1>&6
10646 fi
10647 done
10648
10649
10650 ol_link_ipv6=no
10651 if test $ac_cv_func_getaddrinfo = no -o $ac_cv_func_inet_ntop = no ; then
10652         if test $ol_enable_ipv6 = yes ; then
10653                 { echo "configure: error: IPv6 support requires getaddrinfo() and inet_ntop()" 1>&2; exit 1; }
10654         fi
10655 elif test $ol_enable_ipv6 != no ; then
10656         echo $ac_n "checking INET6_ADDRSTRLEN""... $ac_c" 1>&6
10657 echo "configure:10656: checking INET6_ADDRSTRLEN" >&5
10658 if eval "test \"\${ol_cv_inet6_addrstrlen+set}\" = set"; then
10659   echo $ac_n "(cached) $ac_c" 1>&6
10660 else
10661   
10662                 cat > conftest.$ac_ext <<EOF
10663 #line 10662 "configure"
10664 #include "confdefs.h"
10665
10666 #                       include <netinet/in.h>
10667 #                       ifdef INET6_ADDRSTRLEN
10668                                 __has_inet6_addrstrlen__;
10669 #                       endif
10670                 
10671 EOF
10672 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10673   egrep "__has_inet6_addrstrlen__" >/dev/null 2>&1; then
10674   rm -rf conftest*
10675   ol_cv_inet6_addrstrlen=yes
10676 else
10677   rm -rf conftest*
10678   ol_cv_inet6_addrstrlen=no
10679 fi
10680 rm -f conftest*
10681
10682 fi
10683
10684 echo "$ac_t""$ol_cv_inet6_addrstrlen" 1>&6
10685
10686
10687         echo $ac_n "checking struct sockaddr_storage""... $ac_c" 1>&6
10688 echo "configure:10687: checking struct sockaddr_storage" >&5
10689 if eval "test \"\${ol_cv_struct_sockaddr_storage+set}\" = set"; then
10690   echo $ac_n "(cached) $ac_c" 1>&6
10691 else
10692   
10693                 cat > conftest.$ac_ext <<EOF
10694 #line 10693 "configure"
10695 #include "confdefs.h"
10696
10697 #include <sys/types.h>
10698 #include <sys/socket.h>
10699
10700 int main() {
10701
10702                         struct sockaddr_storage ss;
10703
10704 ; return 0; }
10705 EOF
10706 if { (eval echo configure:10705: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10707   rm -rf conftest*
10708   ol_cv_struct_sockaddr_storage=yes
10709 else
10710   echo "configure: failed program was:" >&5
10711   cat conftest.$ac_ext >&5
10712   rm -rf conftest*
10713   ol_cv_struct_sockaddr_storage=no
10714 fi
10715 rm -f conftest*
10716 fi
10717
10718 echo "$ac_t""$ol_cv_struct_sockaddr_storage" 1>&6
10719
10720         if test $ol_cv_inet6_addrstrlen = yes \
10721                 -a $ol_cv_struct_sockaddr_storage = yes ; then
10722                 ol_link_ipv6=yes
10723         elif test $ol_enable_ipv6 = yes \
10724                         -a $ol_cv_inet6_addrstrlen = no ; then
10725                 { echo "configure: error: IPv6 support requires INET6_ADDRSTRLEN" 1>&2; exit 1; }
10726         elif test $ol_enable_ipv6 = yes \
10727                         -a $ol_cv_struct_sockaddr_storage = no ; then
10728                 { echo "configure: error: IPv6 support requires struct sockaddr_storage" 1>&2; exit 1; }
10729         fi
10730 fi
10731
10732 if test $ol_enable_local != no ; then
10733         for ac_hdr in sys/un.h 
10734 do
10735 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10736 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10737 echo "configure:10736: checking for $ac_hdr" >&5
10738 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10739   echo $ac_n "(cached) $ac_c" 1>&6
10740 else
10741   cat > conftest.$ac_ext <<EOF
10742 #line 10741 "configure"
10743 #include "confdefs.h"
10744 #include <$ac_hdr>
10745 EOF
10746 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10747 { (eval echo configure:10746: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10748 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10749 if test -z "$ac_err"; then
10750   rm -rf conftest*
10751   eval "ac_cv_header_$ac_safe=yes"
10752 else
10753   echo "$ac_err" >&5
10754   echo "configure: failed program was:" >&5
10755   cat conftest.$ac_ext >&5
10756   rm -rf conftest*
10757   eval "ac_cv_header_$ac_safe=no"
10758 fi
10759 rm -f conftest*
10760 fi
10761 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10762   echo "$ac_t""yes" 1>&6
10763     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10764   cat >> confdefs.h <<EOF
10765 #define $ac_tr_hdr 1
10766 EOF
10767  
10768 else
10769   echo "$ac_t""no" 1>&6
10770 fi
10771 done
10772
10773
10774         if test $ol_enable_local = auto ; then
10775                 ol_enable_local=$ac_cv_header_sys_un_h
10776         elif test $ac_cv_header_sys_un_h = no ; then
10777                 { echo "configure: error: AF_LOCAL domain support requires sys/un.h" 1>&2; exit 1; }
10778         fi
10779 fi
10780
10781 ol_link_kbind=no
10782 ol_link_krb5=no
10783 ol_link_krb4=no
10784
10785 if test $ol_with_kerberos = yes -o $ol_with_kerberos = auto \
10786         -o $ol_with_kerberos = k5 -o $ol_with_kerberos = k5only \
10787         -o $ol_with_kerberos = k425 ; then
10788
10789         for ac_hdr in krb5.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:10792: 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 10797 "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:10802: \"$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 $ac_cv_header_krb5_h = yes ; then
10831                                 for ac_hdr in heim_err.h
10832 do
10833 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10834 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10835 echo "configure:10834: checking for $ac_hdr" >&5
10836 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10837   echo $ac_n "(cached) $ac_c" 1>&6
10838 else
10839   cat > conftest.$ac_ext <<EOF
10840 #line 10839 "configure"
10841 #include "confdefs.h"
10842 #include <$ac_hdr>
10843 EOF
10844 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10845 { (eval echo configure:10844: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10846 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10847 if test -z "$ac_err"; then
10848   rm -rf conftest*
10849   eval "ac_cv_header_$ac_safe=yes"
10850 else
10851   echo "$ac_err" >&5
10852   echo "configure: failed program was:" >&5
10853   cat conftest.$ac_ext >&5
10854   rm -rf conftest*
10855   eval "ac_cv_header_$ac_safe=no"
10856 fi
10857 rm -f conftest*
10858 fi
10859 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10860   echo "$ac_t""yes" 1>&6
10861     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10862   cat >> confdefs.h <<EOF
10863 #define $ac_tr_hdr 1
10864 EOF
10865  
10866 else
10867   echo "$ac_t""no" 1>&6
10868 fi
10869 done
10870
10871                 if test $ac_cv_header_heim_err_h = yes ; then
10872                         krb5_impl=heimdal
10873                 else
10874                         krb5_impl=mit
10875                 fi
10876
10877                 if test $krb5_impl = mit; then
10878                         echo $ac_n "checking for main in -lk5crypto""... $ac_c" 1>&6
10879 echo "configure:10878: checking for main in -lk5crypto" >&5
10880 ac_lib_var=`echo k5crypto'_'main | sed 'y%./+-:%__p__%'`
10881 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10882   echo $ac_n "(cached) $ac_c" 1>&6
10883 else
10884   ac_save_LIBS="$LIBS"
10885 LIBS="-lk5crypto  $LIBS"
10886 cat > conftest.$ac_ext <<EOF
10887 #line 10886 "configure"
10888 #include "confdefs.h"
10889
10890 int main() {
10891 main()
10892 ; return 0; }
10893 EOF
10894 if { (eval echo configure:10893: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10895   rm -rf conftest*
10896   eval "ac_cv_lib_$ac_lib_var=yes"
10897 else
10898   echo "configure: failed program was:" >&5
10899   cat conftest.$ac_ext >&5
10900   rm -rf conftest*
10901   eval "ac_cv_lib_$ac_lib_var=no"
10902 fi
10903 rm -f conftest*
10904 LIBS="$ac_save_LIBS"
10905
10906 fi
10907 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10908   echo "$ac_t""yes" 1>&6
10909   krb5crypto=k5crypto
10910 else
10911   echo "$ac_t""no" 1>&6
10912 krb5crypto=crypto
10913 fi
10914
10915
10916                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
10917 echo "configure:10916: checking for main in -lkrb5" >&5
10918 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
10919 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10920   echo $ac_n "(cached) $ac_c" 1>&6
10921 else
10922   ac_save_LIBS="$LIBS"
10923 LIBS="-lkrb5 -l$krb5crypto -lcom_err $LIBS"
10924 cat > conftest.$ac_ext <<EOF
10925 #line 10924 "configure"
10926 #include "confdefs.h"
10927
10928 int main() {
10929 main()
10930 ; return 0; }
10931 EOF
10932 if { (eval echo configure:10931: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10933   rm -rf conftest*
10934   eval "ac_cv_lib_$ac_lib_var=yes"
10935 else
10936   echo "configure: failed program was:" >&5
10937   cat conftest.$ac_ext >&5
10938   rm -rf conftest*
10939   eval "ac_cv_lib_$ac_lib_var=no"
10940 fi
10941 rm -f conftest*
10942 LIBS="$ac_save_LIBS"
10943
10944 fi
10945 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10946   echo "$ac_t""yes" 1>&6
10947   have_krb5=yes
10948                                 KRB5_LIBS="-lkrb5 -l$krb5crypto -lcom_err"
10949 else
10950   echo "$ac_t""no" 1>&6
10951 have_krb5=no
10952 fi
10953
10954
10955                 elif test $krb5_impl = heimdal; then
10956                         echo $ac_n "checking for main in -ldes""... $ac_c" 1>&6
10957 echo "configure:10956: checking for main in -ldes" >&5
10958 ac_lib_var=`echo des'_'main | sed 'y%./+-:%__p__%'`
10959 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10960   echo $ac_n "(cached) $ac_c" 1>&6
10961 else
10962   ac_save_LIBS="$LIBS"
10963 LIBS="-ldes  $LIBS"
10964 cat > conftest.$ac_ext <<EOF
10965 #line 10964 "configure"
10966 #include "confdefs.h"
10967
10968 int main() {
10969 main()
10970 ; return 0; }
10971 EOF
10972 if { (eval echo configure:10971: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10973   rm -rf conftest*
10974   eval "ac_cv_lib_$ac_lib_var=yes"
10975 else
10976   echo "configure: failed program was:" >&5
10977   cat conftest.$ac_ext >&5
10978   rm -rf conftest*
10979   eval "ac_cv_lib_$ac_lib_var=no"
10980 fi
10981 rm -f conftest*
10982 LIBS="$ac_save_LIBS"
10983
10984 fi
10985 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10986   echo "$ac_t""yes" 1>&6
10987   krb5crypto=des
10988 else
10989   echo "$ac_t""no" 1>&6
10990 krb5crypto=crypto
10991 fi
10992
10993
10994                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
10995 echo "configure:10994: checking for main in -lkrb5" >&5
10996 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
10997 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10998   echo $ac_n "(cached) $ac_c" 1>&6
10999 else
11000   ac_save_LIBS="$LIBS"
11001 LIBS="-lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err $LIBS"
11002 cat > conftest.$ac_ext <<EOF
11003 #line 11002 "configure"
11004 #include "confdefs.h"
11005
11006 int main() {
11007 main()
11008 ; return 0; }
11009 EOF
11010 if { (eval echo configure:11009: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11011   rm -rf conftest*
11012   eval "ac_cv_lib_$ac_lib_var=yes"
11013 else
11014   echo "configure: failed program was:" >&5
11015   cat conftest.$ac_ext >&5
11016   rm -rf conftest*
11017   eval "ac_cv_lib_$ac_lib_var=no"
11018 fi
11019 rm -f conftest*
11020 LIBS="$ac_save_LIBS"
11021
11022 fi
11023 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11024   echo "$ac_t""yes" 1>&6
11025   have_krb5=yes
11026                                 KRB5_LIBS="-lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err"
11027 else
11028   echo "$ac_t""no" 1>&6
11029 have_krb5=no
11030 fi
11031
11032
11033                         cat >> confdefs.h <<\EOF
11034 #define HAVE_HEIMDAL_KERBEROS 1
11035 EOF
11036
11037
11038                 else
11039                         have_krb5=no
11040                         echo "configure: warning: Unrecognized Kerberos5 Implementation" 1>&2
11041                 fi
11042
11043                 if test $have_krb5 = yes ; then
11044                         ol_link_krb5=yes
11045
11046                         cat >> confdefs.h <<\EOF
11047 #define HAVE_KRB5 1
11048 EOF
11049
11050
11051                         if test $ol_with_kerberos = k5only ; then
11052                                 ol_with_kerberos=found
11053                         fi
11054
11055                 elif test $ol_with_kerberos != auto ; then
11056                         { echo "configure: error: Required Kerberos 5 support not available" 1>&2; exit 1; }
11057                 fi
11058
11059         fi
11060 fi
11061
11062 if test $ol_link_krb5 = yes -a \( $ol_with_kerberos = yes -o \
11063         $ol_with_kerberos = auto -o $ol_with_kerberos = k425 \) ; then
11064
11065         for ac_hdr in kerberosIV/krb.h kerberosIV/des.h
11066 do
11067 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11068 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11069 echo "configure:11068: checking for $ac_hdr" >&5
11070 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11071   echo $ac_n "(cached) $ac_c" 1>&6
11072 else
11073   cat > conftest.$ac_ext <<EOF
11074 #line 11073 "configure"
11075 #include "confdefs.h"
11076 #include <$ac_hdr>
11077 EOF
11078 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11079 { (eval echo configure:11078: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11080 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11081 if test -z "$ac_err"; then
11082   rm -rf conftest*
11083   eval "ac_cv_header_$ac_safe=yes"
11084 else
11085   echo "$ac_err" >&5
11086   echo "configure: failed program was:" >&5
11087   cat conftest.$ac_ext >&5
11088   rm -rf conftest*
11089   eval "ac_cv_header_$ac_safe=no"
11090 fi
11091 rm -f conftest*
11092 fi
11093 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11094   echo "$ac_t""yes" 1>&6
11095     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11096   cat >> confdefs.h <<EOF
11097 #define $ac_tr_hdr 1
11098 EOF
11099  
11100 else
11101   echo "$ac_t""no" 1>&6
11102 fi
11103 done
11104
11105
11106         if test $ac_cv_header_kerberosIV_krb_h = yes ; then
11107                 if test $krb5_impl = mit; then
11108                         echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
11109 echo "configure:11108: checking for main in -lkrb4" >&5
11110 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
11111 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11112   echo $ac_n "(cached) $ac_c" 1>&6
11113 else
11114   ac_save_LIBS="$LIBS"
11115 LIBS="-lkrb4 -ldes425 -lkrb5 -l$krb5crypto -lcom_err $LIBS"
11116 cat > conftest.$ac_ext <<EOF
11117 #line 11116 "configure"
11118 #include "confdefs.h"
11119
11120 int main() {
11121 main()
11122 ; return 0; }
11123 EOF
11124 if { (eval echo configure:11123: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11125   rm -rf conftest*
11126   eval "ac_cv_lib_$ac_lib_var=yes"
11127 else
11128   echo "configure: failed program was:" >&5
11129   cat conftest.$ac_ext >&5
11130   rm -rf conftest*
11131   eval "ac_cv_lib_$ac_lib_var=no"
11132 fi
11133 rm -f conftest*
11134 LIBS="$ac_save_LIBS"
11135
11136 fi
11137 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11138   echo "$ac_t""yes" 1>&6
11139   have_k425=yes
11140                                 KRB4_LIBS="-lkrb4 -ldes425"
11141 else
11142   echo "$ac_t""no" 1>&6
11143 have_k425=no
11144 fi
11145
11146
11147                 elif test $krb5_impl = heimdal; then
11148                         echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
11149 echo "configure:11148: checking for main in -lkrb4" >&5
11150 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
11151 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11152   echo $ac_n "(cached) $ac_c" 1>&6
11153 else
11154   ac_save_LIBS="$LIBS"
11155 LIBS="-lkrb4 -lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err $LIBS"
11156 cat > conftest.$ac_ext <<EOF
11157 #line 11156 "configure"
11158 #include "confdefs.h"
11159
11160 int main() {
11161 main()
11162 ; return 0; }
11163 EOF
11164 if { (eval echo configure:11163: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11165   rm -rf conftest*
11166   eval "ac_cv_lib_$ac_lib_var=yes"
11167 else
11168   echo "configure: failed program was:" >&5
11169   cat conftest.$ac_ext >&5
11170   rm -rf conftest*
11171   eval "ac_cv_lib_$ac_lib_var=no"
11172 fi
11173 rm -f conftest*
11174 LIBS="$ac_save_LIBS"
11175
11176 fi
11177 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11178   echo "$ac_t""yes" 1>&6
11179   have_k425=yes
11180                                 KRB4_LIBS="-lkrb4"
11181 else
11182   echo "$ac_t""no" 1>&6
11183 have_k425=no
11184 fi
11185
11186
11187                 else
11188                         have_425=no
11189                         echo "configure: warning: Unrecongized Kerberos V Implementation" 1>&2
11190                 fi
11191
11192                 if test $have_k425 = yes ; then
11193                         ol_with_kerberos=found
11194                         ol_link_krb4=yes
11195
11196                         cat >> confdefs.h <<\EOF
11197 #define HAVE_KRB425 1
11198 EOF
11199
11200                         cat >> confdefs.h <<\EOF
11201 #define HAVE_KRB4 1
11202 EOF
11203
11204
11205                         echo $ac_n "checking for des_debug in Kerberos libraries""... $ac_c" 1>&6
11206 echo "configure:11205: checking for des_debug in Kerberos libraries" >&5
11207 if eval "test \"\${ol_cv_var_des_debug+set}\" = set"; then
11208   echo $ac_n "(cached) $ac_c" 1>&6
11209 else
11210   
11211                                                                 save_LIBS="$LIBS"
11212                                 LIBS="$KRB4_LIBS $KRB5_LIBS $LIBS"
11213                                 cat > conftest.$ac_ext <<EOF
11214 #line 11213 "configure"
11215 #include "confdefs.h"
11216
11217 #include <kerberosIV/krb.h>
11218 #include <kerberosIV/des.h>
11219 extern int des_debug;
11220
11221 int main() {
11222
11223 des_debug = 1;
11224
11225 ; return 0; }
11226 EOF
11227 if { (eval echo configure:11226: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11228   rm -rf conftest*
11229   ol_cv_var_des_debug=yes
11230 else
11231   echo "configure: failed program was:" >&5
11232   cat conftest.$ac_ext >&5
11233   rm -rf conftest*
11234   ol_cv_var_des_debug=no
11235 fi
11236 rm -f conftest*
11237                                                                 LIBS="$save_LIBS"
11238                         
11239 fi
11240
11241 echo "$ac_t""$ol_cv_var_des_debug" 1>&6
11242
11243                         if test $ol_cv_var_des_debug = yes ; then
11244                                 cat >> confdefs.h <<\EOF
11245 #define HAVE_DES_DEBUG 1
11246 EOF
11247
11248                         fi
11249
11250                         LIBS="$save_LIBS"
11251                 fi
11252         fi
11253 fi
11254
11255 if test $ol_link_krb5 = yes ; then
11256         ol_with_kerberos=found
11257 fi
11258
11259 if test $ol_with_kerberos = yes -o $ol_with_kerberos = auto \
11260         -o $ol_with_kerberos = k4 -o $ol_with_kerberos = kth ; then
11261
11262         for ac_hdr in krb.h des.h krb-archaeology.h 
11263 do
11264 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11265 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11266 echo "configure:11265: checking for $ac_hdr" >&5
11267 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11268   echo $ac_n "(cached) $ac_c" 1>&6
11269 else
11270   cat > conftest.$ac_ext <<EOF
11271 #line 11270 "configure"
11272 #include "confdefs.h"
11273 #include <$ac_hdr>
11274 EOF
11275 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11276 { (eval echo configure:11275: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11277 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11278 if test -z "$ac_err"; then
11279   rm -rf conftest*
11280   eval "ac_cv_header_$ac_safe=yes"
11281 else
11282   echo "$ac_err" >&5
11283   echo "configure: failed program was:" >&5
11284   cat conftest.$ac_ext >&5
11285   rm -rf conftest*
11286   eval "ac_cv_header_$ac_safe=no"
11287 fi
11288 rm -f conftest*
11289 fi
11290 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11291   echo "$ac_t""yes" 1>&6
11292     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11293   cat >> confdefs.h <<EOF
11294 #define $ac_tr_hdr 1
11295 EOF
11296  
11297 else
11298   echo "$ac_t""no" 1>&6
11299 fi
11300 done
11301
11302
11303         if test $ac_cv_header_krb_h = yes ; then
11304                 echo $ac_n "checking for main in -lkrb""... $ac_c" 1>&6
11305 echo "configure:11304: checking for main in -lkrb" >&5
11306 ac_lib_var=`echo krb'_'main | sed 'y%./+-:%__p__%'`
11307 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11308   echo $ac_n "(cached) $ac_c" 1>&6
11309 else
11310   ac_save_LIBS="$LIBS"
11311 LIBS="-lkrb -ldes $LIBS"
11312 cat > conftest.$ac_ext <<EOF
11313 #line 11312 "configure"
11314 #include "confdefs.h"
11315
11316 int main() {
11317 main()
11318 ; return 0; }
11319 EOF
11320 if { (eval echo configure:11319: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11321   rm -rf conftest*
11322   eval "ac_cv_lib_$ac_lib_var=yes"
11323 else
11324   echo "configure: failed program was:" >&5
11325   cat conftest.$ac_ext >&5
11326   rm -rf conftest*
11327   eval "ac_cv_lib_$ac_lib_var=no"
11328 fi
11329 rm -f conftest*
11330 LIBS="$ac_save_LIBS"
11331
11332 fi
11333 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11334   echo "$ac_t""yes" 1>&6
11335   have_k4=yes
11336 else
11337   echo "$ac_t""no" 1>&6
11338 have_k4=no
11339 fi
11340
11341
11342                 if test $have_k4 = yes ; then
11343                         ol_with_kerberos=found
11344                         ol_link_krb4=yes
11345
11346                         cat >> confdefs.h <<\EOF
11347 #define HAVE_KRB4 1
11348 EOF
11349
11350
11351                         KRB4_LIBS="-lkrb -ldes"
11352
11353                         if test $ac_cv_header_krb_archaeology_h = yes ; then
11354                                 cat >> confdefs.h <<\EOF
11355 #define HAVE_KTH_KERBEROS 1
11356 EOF
11357
11358                         fi
11359                 fi
11360         fi
11361 fi
11362
11363 if test $ol_link_krb4 = yes -a $ol_enable_kbind != no ; then
11364         ol_link_kbind=yes
11365
11366 elif test $ol_enable_kbind = yes ; then
11367         { echo "configure: error: Kerberos IV detection failed" 1>&2; exit 1; }
11368 fi
11369
11370 if test $ol_link_krb4 = yes -o $ol_link_krb5 = yes ; then
11371         cat >> confdefs.h <<\EOF
11372 #define HAVE_KERBEROS 1
11373 EOF
11374
11375
11376 elif test $ol_with_kerberos != auto -a $ol_with_kerberos != no ; then
11377         { echo "configure: error: Kerberos detection failed" 1>&2; exit 1; }
11378 fi
11379
11380         
11381 ol_link_tls=no
11382 if test $ol_with_tls != no ; then
11383         for ac_hdr in openssl/ssl.h ssl.h
11384 do
11385 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11386 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11387 echo "configure:11386: checking for $ac_hdr" >&5
11388 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11389   echo $ac_n "(cached) $ac_c" 1>&6
11390 else
11391   cat > conftest.$ac_ext <<EOF
11392 #line 11391 "configure"
11393 #include "confdefs.h"
11394 #include <$ac_hdr>
11395 EOF
11396 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11397 { (eval echo configure:11396: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11398 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11399 if test -z "$ac_err"; then
11400   rm -rf conftest*
11401   eval "ac_cv_header_$ac_safe=yes"
11402 else
11403   echo "$ac_err" >&5
11404   echo "configure: failed program was:" >&5
11405   cat conftest.$ac_ext >&5
11406   rm -rf conftest*
11407   eval "ac_cv_header_$ac_safe=no"
11408 fi
11409 rm -f conftest*
11410 fi
11411 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11412   echo "$ac_t""yes" 1>&6
11413     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11414   cat >> confdefs.h <<EOF
11415 #define $ac_tr_hdr 1
11416 EOF
11417  
11418 else
11419   echo "$ac_t""no" 1>&6
11420 fi
11421 done
11422
11423
11424         if test $ac_cv_header_openssl_ssl_h = yes \
11425                 -o $ac_cv_header_ssl_h = yes ; then
11426                 echo $ac_n "checking for SSLeay_add_ssl_algorithms in -lssl""... $ac_c" 1>&6
11427 echo "configure:11426: checking for SSLeay_add_ssl_algorithms in -lssl" >&5
11428 ac_lib_var=`echo ssl'_'SSLeay_add_ssl_algorithms | sed 'y%./+-:%__p__%'`
11429 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11430   echo $ac_n "(cached) $ac_c" 1>&6
11431 else
11432   ac_save_LIBS="$LIBS"
11433 LIBS="-lssl -lcrypto $LIBS"
11434 cat > conftest.$ac_ext <<EOF
11435 #line 11434 "configure"
11436 #include "confdefs.h"
11437 /* Override any gcc2 internal prototype to avoid an error.  */
11438 /* We use char because int might match the return type of a gcc2
11439     builtin and then its argument prototype would still apply.  */
11440 char SSLeay_add_ssl_algorithms();
11441
11442 int main() {
11443 SSLeay_add_ssl_algorithms()
11444 ; return 0; }
11445 EOF
11446 if { (eval echo configure:11445: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11447   rm -rf conftest*
11448   eval "ac_cv_lib_$ac_lib_var=yes"
11449 else
11450   echo "configure: failed program was:" >&5
11451   cat conftest.$ac_ext >&5
11452   rm -rf conftest*
11453   eval "ac_cv_lib_$ac_lib_var=no"
11454 fi
11455 rm -f conftest*
11456 LIBS="$ac_save_LIBS"
11457
11458 fi
11459 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11460   echo "$ac_t""yes" 1>&6
11461   have_ssleay=yes
11462                         need_rsaref=no
11463 else
11464   echo "$ac_t""no" 1>&6
11465 have_ssleay=no
11466 fi
11467
11468                         
11469                 if test $have_ssleay = no ; then
11470                         echo $ac_n "checking for SSL_library_init in -lssl""... $ac_c" 1>&6
11471 echo "configure:11470: checking for SSL_library_init in -lssl" >&5
11472 ac_lib_var=`echo ssl'_'SSL_library_init | sed 'y%./+-:%__p__%'`
11473 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11474   echo $ac_n "(cached) $ac_c" 1>&6
11475 else
11476   ac_save_LIBS="$LIBS"
11477 LIBS="-lssl -lcrypto $LIBS"
11478 cat > conftest.$ac_ext <<EOF
11479 #line 11478 "configure"
11480 #include "confdefs.h"
11481 /* Override any gcc2 internal prototype to avoid an error.  */
11482 /* We use char because int might match the return type of a gcc2
11483     builtin and then its argument prototype would still apply.  */
11484 char SSL_library_init();
11485
11486 int main() {
11487 SSL_library_init()
11488 ; return 0; }
11489 EOF
11490 if { (eval echo configure:11489: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11491   rm -rf conftest*
11492   eval "ac_cv_lib_$ac_lib_var=yes"
11493 else
11494   echo "configure: failed program was:" >&5
11495   cat conftest.$ac_ext >&5
11496   rm -rf conftest*
11497   eval "ac_cv_lib_$ac_lib_var=no"
11498 fi
11499 rm -f conftest*
11500 LIBS="$ac_save_LIBS"
11501
11502 fi
11503 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11504   echo "$ac_t""yes" 1>&6
11505   have_ssleay=yes
11506                                 need_rsaref=no
11507 else
11508   echo "$ac_t""no" 1>&6
11509 have_ssleay=no
11510 fi
11511
11512                 fi
11513
11514                 if test $have_ssleay = no ; then
11515                         echo $ac_n "checking for ssl3_accept in -lssl""... $ac_c" 1>&6
11516 echo "configure:11515: checking for ssl3_accept in -lssl" >&5
11517 ac_lib_var=`echo ssl'_'ssl3_accept | sed 'y%./+-:%__p__%'`
11518 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11519   echo $ac_n "(cached) $ac_c" 1>&6
11520 else
11521   ac_save_LIBS="$LIBS"
11522 LIBS="-lssl -lcrypto -lRSAglue -lrsaref $LIBS"
11523 cat > conftest.$ac_ext <<EOF
11524 #line 11523 "configure"
11525 #include "confdefs.h"
11526 /* Override any gcc2 internal prototype to avoid an error.  */
11527 /* We use char because int might match the return type of a gcc2
11528     builtin and then its argument prototype would still apply.  */
11529 char ssl3_accept();
11530
11531 int main() {
11532 ssl3_accept()
11533 ; return 0; }
11534 EOF
11535 if { (eval echo configure:11534: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11536   rm -rf conftest*
11537   eval "ac_cv_lib_$ac_lib_var=yes"
11538 else
11539   echo "configure: failed program was:" >&5
11540   cat conftest.$ac_ext >&5
11541   rm -rf conftest*
11542   eval "ac_cv_lib_$ac_lib_var=no"
11543 fi
11544 rm -f conftest*
11545 LIBS="$ac_save_LIBS"
11546
11547 fi
11548 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11549   echo "$ac_t""yes" 1>&6
11550   have_ssleay=yes
11551                                 need_rsaref=yes
11552 else
11553   echo "$ac_t""no" 1>&6
11554 have_ssleay=no
11555 fi
11556
11557                 fi
11558
11559                 if test $have_ssleay = yes ; then
11560                         ol_with_tls=found
11561                         ol_link_tls=yes
11562
11563                         cat >> confdefs.h <<\EOF
11564 #define HAVE_SSLEAY 1
11565 EOF
11566
11567
11568                         if test $need_rsaref = yes; then
11569                                 cat >> confdefs.h <<\EOF
11570 #define HAVE_RSAREF 1
11571 EOF
11572
11573
11574                                 TLS_LIBS="-lssl -lcrypto -lRSAglue -lrsaref"
11575                         else
11576                                 TLS_LIBS="-lssl -lcrypto"
11577                         fi
11578                 fi
11579                 echo $ac_n "checking OpenSSL library version (CRL checking capability)""... $ac_c" 1>&6
11580 echo "configure:11579: checking OpenSSL library version (CRL checking capability)" >&5
11581 if eval "test \"\${ol_cv_ssl_crl_compat+set}\" = set"; then
11582   echo $ac_n "(cached) $ac_c" 1>&6
11583 else
11584   
11585         cat > conftest.$ac_ext <<EOF
11586 #line 11585 "configure"
11587 #include "confdefs.h"
11588
11589 #ifdef HAVE_OPENSSL_SSL_H
11590 #include <openssl/ssl.h>
11591 #else
11592 #include <ssl.h>
11593 #endif
11594
11595 /* Require 0.9.7d+ */
11596 #if OPENSSL_VERSION_NUMBER >= 0x0090704fL
11597         char *__ssl_compat = "0.9.7d";
11598 #endif
11599         
11600 EOF
11601 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11602   egrep "__ssl_compat" >/dev/null 2>&1; then
11603   rm -rf conftest*
11604   ol_cv_ssl_crl_compat=yes
11605 else
11606   rm -rf conftest*
11607   ol_cv_ssl_crl_compat=no
11608 fi
11609 rm -f conftest*
11610
11611 fi
11612
11613 echo "$ac_t""$ol_cv_ssl_crl_compat" 1>&6
11614
11615                 if test $ol_cv_ssl_crl_compat = no ; then
11616                         ol_link_ssl=no
11617                 else 
11618                         cat >> confdefs.h <<\EOF
11619 #define HAVE_OPENSSL_CRL 1
11620 EOF
11621
11622                 fi
11623         fi
11624
11625 else
11626         echo "configure: warning: TLS data protection not supported!" 1>&2
11627 fi
11628
11629 WITH_TLS=no
11630 if test $ol_link_tls = yes ; then
11631         cat >> confdefs.h <<\EOF
11632 #define HAVE_TLS 1
11633 EOF
11634
11635         WITH_TLS=yes
11636
11637 elif test $ol_with_tls = auto ; then
11638         echo "configure: warning: Could not locate TLS/SSL package" 1>&2
11639         echo "configure: warning: TLS data protection not supported!" 1>&2
11640
11641 elif test $ol_with_tls != no ; then
11642         { echo "configure: error: Could not locate TLS/SSL package" 1>&2; exit 1; }
11643 fi
11644
11645 if test $ol_enable_lmpasswd != no; then
11646         if test $ol_link_tls != yes ; then
11647                 { echo "configure: error: LAN Manager passwords require OpenSSL" 1>&2; exit 1; }
11648         fi
11649
11650         cat >> confdefs.h <<\EOF
11651 #define SLAPD_LMHASH 1
11652 EOF
11653
11654 fi
11655
11656 ol_link_threads=no
11657
11658 if test $ol_with_threads = auto -o $ol_with_threads = yes \
11659         -o $ol_with_threads = nt ; then
11660
11661         
11662         echo $ac_n "checking for _beginthread""... $ac_c" 1>&6
11663 echo "configure:11662: checking for _beginthread" >&5
11664 if eval "test \"\${ac_cv_func__beginthread+set}\" = set"; then
11665   echo $ac_n "(cached) $ac_c" 1>&6
11666 else
11667   cat > conftest.$ac_ext <<EOF
11668 #line 11667 "configure"
11669 #include "confdefs.h"
11670 /* System header to define __stub macros and hopefully few prototypes,
11671     which can conflict with char _beginthread(); below.  */
11672 #include <assert.h>
11673 /* Override any gcc2 internal prototype to avoid an error.  */
11674 /* We use char because int might match the return type of a gcc2
11675     builtin and then its argument prototype would still apply.  */
11676 char _beginthread();
11677 char (*f)();
11678
11679 int main() {
11680
11681 /* The GNU C library defines this for functions which it implements
11682     to always fail with ENOSYS.  Some functions are actually named
11683     something starting with __ and the normal name is an alias.  */
11684 #if defined (__stub__beginthread) || defined (__stub____beginthread)
11685 choke me
11686 #else
11687 f = _beginthread;
11688 #endif
11689
11690 ; return 0; }
11691 EOF
11692 if { (eval echo configure:11691: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11693   rm -rf conftest*
11694   eval "ac_cv_func__beginthread=yes"
11695 else
11696   echo "configure: failed program was:" >&5
11697   cat conftest.$ac_ext >&5
11698   rm -rf conftest*
11699   eval "ac_cv_func__beginthread=no"
11700 fi
11701 rm -f conftest*
11702 fi
11703
11704 if eval "test \"`echo '$ac_cv_func_'_beginthread`\" = yes"; then
11705   echo "$ac_t""yes" 1>&6
11706   :
11707 else
11708   echo "$ac_t""no" 1>&6
11709 fi
11710
11711
11712         if test $ac_cv_func__beginthread = yes ; then
11713                 cat >> confdefs.h <<\EOF
11714 #define HAVE_NT_THREADS 1
11715 EOF
11716
11717                 ol_cv_nt_threads=yes
11718         fi
11719
11720
11721         if test "$ol_cv_nt_threads" = yes ; then
11722                 ol_link_threads=nt
11723                 ol_with_threads=found
11724                 ol_with_yielding_select=yes
11725
11726                 cat >> confdefs.h <<\EOF
11727 #define HAVE_NT_SERVICE_MANAGER 1
11728 EOF
11729
11730                 cat >> confdefs.h <<\EOF
11731 #define HAVE_NT_EVENT_LOG 1
11732 EOF
11733
11734         fi
11735
11736         if test $ol_with_threads = nt ; then
11737                 { echo "configure: error: could not locate NT Threads" 1>&2; exit 1; }
11738         fi
11739 fi
11740
11741 if test $ol_with_threads = auto -o $ol_with_threads = yes \
11742         -o $ol_with_threads = posix ; then
11743
11744         for ac_hdr in pthread.h
11745 do
11746 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11747 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11748 echo "configure:11747: checking for $ac_hdr" >&5
11749 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11750   echo $ac_n "(cached) $ac_c" 1>&6
11751 else
11752   cat > conftest.$ac_ext <<EOF
11753 #line 11752 "configure"
11754 #include "confdefs.h"
11755 #include <$ac_hdr>
11756 EOF
11757 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11758 { (eval echo configure:11757: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11759 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11760 if test -z "$ac_err"; then
11761   rm -rf conftest*
11762   eval "ac_cv_header_$ac_safe=yes"
11763 else
11764   echo "$ac_err" >&5
11765   echo "configure: failed program was:" >&5
11766   cat conftest.$ac_ext >&5
11767   rm -rf conftest*
11768   eval "ac_cv_header_$ac_safe=no"
11769 fi
11770 rm -f conftest*
11771 fi
11772 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11773   echo "$ac_t""yes" 1>&6
11774     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11775   cat >> confdefs.h <<EOF
11776 #define $ac_tr_hdr 1
11777 EOF
11778  
11779 else
11780   echo "$ac_t""no" 1>&6
11781 fi
11782 done
11783
11784
11785         if test $ac_cv_header_pthread_h = yes ; then
11786                 echo $ac_n "checking POSIX thread version""... $ac_c" 1>&6
11787 echo "configure:11786: checking POSIX thread version" >&5
11788 if eval "test \"\${ol_cv_pthread_version+set}\" = set"; then
11789   echo $ac_n "(cached) $ac_c" 1>&6
11790 else
11791   
11792         cat > conftest.$ac_ext <<EOF
11793 #line 11792 "configure"
11794 #include "confdefs.h"
11795
11796 #               include <pthread.h>
11797         
11798 int main() {
11799
11800                 int i = PTHREAD_CREATE_JOINABLE;
11801         
11802 ; return 0; }
11803 EOF
11804 if { (eval echo configure:11803: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11805   rm -rf conftest*
11806   
11807         cat > conftest.$ac_ext <<EOF
11808 #line 11807 "configure"
11809 #include "confdefs.h"
11810 #include <pthread.h>
11811 EOF
11812 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11813   egrep "pthread_detach" >/dev/null 2>&1; then
11814   rm -rf conftest*
11815   ol_cv_pthread_version=10
11816 else
11817   rm -rf conftest*
11818   ol_cv_pthread_version=8
11819 fi
11820 rm -f conftest*
11821
11822 else
11823   echo "configure: failed program was:" >&5
11824   cat conftest.$ac_ext >&5
11825   rm -rf conftest*
11826   
11827         cat > conftest.$ac_ext <<EOF
11828 #line 11827 "configure"
11829 #include "confdefs.h"
11830
11831 #               include <pthread.h>
11832 #               ifdef PTHREAD_CREATE_UNDETACHED
11833                 draft7
11834 #               endif
11835         
11836 EOF
11837 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11838   egrep "draft7" >/dev/null 2>&1; then
11839   rm -rf conftest*
11840   ol_cv_pthread_version=7
11841 else
11842   rm -rf conftest*
11843   
11844         cat > conftest.$ac_ext <<EOF
11845 #line 11844 "configure"
11846 #include "confdefs.h"
11847 #include <pthread.h>
11848 EOF
11849 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11850   egrep "pthread_attr_init" >/dev/null 2>&1; then
11851   rm -rf conftest*
11852   ol_cv_pthread_version=6
11853 else
11854   rm -rf conftest*
11855   
11856         cat > conftest.$ac_ext <<EOF
11857 #line 11856 "configure"
11858 #include "confdefs.h"
11859
11860 #               include <pthread.h>
11861 #ifdef          PTHREAD_MUTEX_INITIALIZER
11862                 draft5
11863 #endif
11864         
11865 EOF
11866 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11867   egrep "draft5" >/dev/null 2>&1; then
11868   rm -rf conftest*
11869   ol_cv_pthread_version=5
11870 else
11871   rm -rf conftest*
11872   ol_cv_pthread_version=4
11873 fi
11874 rm -f conftest*
11875  
11876 fi
11877 rm -f conftest*
11878  
11879 fi
11880 rm -f conftest*
11881  
11882 fi
11883 rm -f conftest*
11884
11885 fi
11886
11887 echo "$ac_t""$ol_cv_pthread_version" 1>&6
11888
11889
11890                 if test $ol_cv_pthread_version != 0 ; then
11891                         cat >> confdefs.h <<EOF
11892 #define HAVE_PTHREADS $ol_cv_pthread_version
11893 EOF
11894
11895                 else
11896                         { echo "configure: error: unknown pthread version" 1>&2; exit 1; }
11897                 fi
11898
11899                 # consider threads found
11900                 ol_with_threads=found
11901
11902                 
11903         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
11904 echo "configure:11903: checking for LinuxThreads pthread.h" >&5
11905 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
11906   echo $ac_n "(cached) $ac_c" 1>&6
11907 else
11908   cat > conftest.$ac_ext <<EOF
11909 #line 11908 "configure"
11910 #include "confdefs.h"
11911 #include <pthread.h>
11912 EOF
11913 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11914   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
11915   rm -rf conftest*
11916   ol_cv_header_linux_threads=yes
11917 else
11918   rm -rf conftest*
11919   ol_cv_header_linux_threads=no
11920 fi
11921 rm -f conftest*
11922
11923                 
11924 fi
11925
11926 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
11927         if test $ol_cv_header_linux_threads = yes; then
11928                 cat >> confdefs.h <<\EOF
11929 #define HAVE_LINUX_THREADS 1
11930 EOF
11931
11932         fi
11933
11934                 
11935         echo $ac_n "checking for GNU Pth pthread.h""... $ac_c" 1>&6
11936 echo "configure:11935: checking for GNU Pth pthread.h" >&5
11937 if eval "test \"\${ol_cv_header_gnu_pth_pthread_h+set}\" = set"; then
11938   echo $ac_n "(cached) $ac_c" 1>&6
11939 else
11940   cat > conftest.$ac_ext <<EOF
11941 #line 11940 "configure"
11942 #include "confdefs.h"
11943 #include <pthread.h>
11944 #ifdef _POSIX_THREAD_IS_GNU_PTH
11945         __gnu_pth__;
11946 #endif
11947
11948 EOF
11949 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11950   egrep "__gnu_pth__" >/dev/null 2>&1; then
11951   rm -rf conftest*
11952   ol_cv_header_gnu_pth_pthread_h=yes
11953 else
11954   rm -rf conftest*
11955   ol_cv_header_gnu_pth_pthread_h=no
11956 fi
11957 rm -f conftest*
11958
11959                 
11960 fi
11961
11962 echo "$ac_t""$ol_cv_header_gnu_pth_pthread_h" 1>&6
11963
11964
11965                 if test $ol_cv_header_gnu_pth_pthread_h = no ; then
11966                         for ac_hdr in sched.h
11967 do
11968 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11969 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11970 echo "configure:11969: checking for $ac_hdr" >&5
11971 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11972   echo $ac_n "(cached) $ac_c" 1>&6
11973 else
11974   cat > conftest.$ac_ext <<EOF
11975 #line 11974 "configure"
11976 #include "confdefs.h"
11977 #include <$ac_hdr>
11978 EOF
11979 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11980 { (eval echo configure:11979: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11981 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11982 if test -z "$ac_err"; then
11983   rm -rf conftest*
11984   eval "ac_cv_header_$ac_safe=yes"
11985 else
11986   echo "$ac_err" >&5
11987   echo "configure: failed program was:" >&5
11988   cat conftest.$ac_ext >&5
11989   rm -rf conftest*
11990   eval "ac_cv_header_$ac_safe=no"
11991 fi
11992 rm -f conftest*
11993 fi
11994 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11995   echo "$ac_t""yes" 1>&6
11996     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11997   cat >> confdefs.h <<EOF
11998 #define $ac_tr_hdr 1
11999 EOF
12000  
12001 else
12002   echo "$ac_t""no" 1>&6
12003 fi
12004 done
12005
12006                 fi
12007
12008                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
12009                                 echo $ac_n "checking for pthread_create in default libraries""... $ac_c" 1>&6
12010 echo "configure:12009: checking for pthread_create in default libraries" >&5
12011 if eval "test \"\${ol_cv_pthread_create+set}\" = set"; then
12012   echo $ac_n "(cached) $ac_c" 1>&6
12013 else
12014   
12015                 if test "$cross_compiling" = yes; then
12016   cat > conftest.$ac_ext <<EOF
12017 #line 12016 "configure"
12018 #include "confdefs.h"
12019 /* pthread test headers */
12020 #include <pthread.h>
12021 #if HAVE_PTHREADS < 7
12022 #include <errno.h>
12023 #endif
12024 #ifndef NULL
12025 #define NULL (void*)0
12026 #endif
12027
12028 static void *task(p)
12029         void *p;
12030 {
12031         return (void *) (p == NULL);
12032 }
12033
12034 int main() {
12035
12036         /* pthread test function */
12037 #ifndef PTHREAD_CREATE_DETACHED
12038 #define PTHREAD_CREATE_DETACHED 1
12039 #endif
12040         pthread_t t;
12041         int status;
12042         int detach = PTHREAD_CREATE_DETACHED;
12043
12044 #if HAVE_PTHREADS > 4
12045         /* Final pthreads */
12046         pthread_attr_t attr;
12047
12048         status = pthread_attr_init(&attr);
12049         if( status ) return status;
12050
12051 #if HAVE_PTHREADS < 7
12052         status = pthread_attr_setdetachstate(&attr, &detach);
12053         if( status < 0 ) status = errno;
12054 #else
12055         status = pthread_attr_setdetachstate(&attr, detach);
12056 #endif
12057         if( status ) return status;
12058         status = pthread_create( &t, &attr, task, NULL );
12059 #if HAVE_PTHREADS < 7
12060         if( status < 0 ) status = errno;
12061 #endif
12062         if( status ) return status;
12063 #else
12064         /* Draft 4 pthreads */
12065         status = pthread_create( &t, pthread_attr_default, task, NULL );
12066         if( status ) return errno;
12067
12068         /* give thread a chance to complete */
12069         /* it should remain joinable and hence detachable */
12070         sleep( 1 );
12071
12072         status = pthread_detach( &t );
12073         if( status ) return errno;
12074 #endif
12075
12076 #ifdef HAVE_LINUX_THREADS
12077         pthread_kill_other_threads_np();
12078 #endif
12079
12080         return 0;
12081
12082 ; return 0; }
12083 EOF
12084 if { (eval echo configure:12083: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12085   rm -rf conftest*
12086   ol_cv_pthread_create=yes
12087 else
12088   echo "configure: failed program was:" >&5
12089   cat conftest.$ac_ext >&5
12090   rm -rf conftest*
12091   ol_cv_pthread_create=no
12092 fi
12093 rm -f conftest*
12094 else
12095   cat > conftest.$ac_ext <<EOF
12096 #line 12095 "configure"
12097 #include "confdefs.h"
12098 /* pthread test headers */
12099 #include <pthread.h>
12100 #if HAVE_PTHREADS < 7
12101 #include <errno.h>
12102 #endif
12103 #ifndef NULL
12104 #define NULL (void*)0
12105 #endif
12106
12107 static void *task(p)
12108         void *p;
12109 {
12110         return (void *) (p == NULL);
12111 }
12112
12113
12114 int main(argc, argv)
12115         int argc;
12116         char **argv;
12117 {
12118
12119         /* pthread test function */
12120 #ifndef PTHREAD_CREATE_DETACHED
12121 #define PTHREAD_CREATE_DETACHED 1
12122 #endif
12123         pthread_t t;
12124         int status;
12125         int detach = PTHREAD_CREATE_DETACHED;
12126
12127 #if HAVE_PTHREADS > 4
12128         /* Final pthreads */
12129         pthread_attr_t attr;
12130
12131         status = pthread_attr_init(&attr);
12132         if( status ) return status;
12133
12134 #if HAVE_PTHREADS < 7
12135         status = pthread_attr_setdetachstate(&attr, &detach);
12136         if( status < 0 ) status = errno;
12137 #else
12138         status = pthread_attr_setdetachstate(&attr, detach);
12139 #endif
12140         if( status ) return status;
12141         status = pthread_create( &t, &attr, task, NULL );
12142 #if HAVE_PTHREADS < 7
12143         if( status < 0 ) status = errno;
12144 #endif
12145         if( status ) return status;
12146 #else
12147         /* Draft 4 pthreads */
12148         status = pthread_create( &t, pthread_attr_default, task, NULL );
12149         if( status ) return errno;
12150
12151         /* give thread a chance to complete */
12152         /* it should remain joinable and hence detachable */
12153         sleep( 1 );
12154
12155         status = pthread_detach( &t );
12156         if( status ) return errno;
12157 #endif
12158
12159 #ifdef HAVE_LINUX_THREADS
12160         pthread_kill_other_threads_np();
12161 #endif
12162
12163         return 0;
12164
12165 }
12166
12167 EOF
12168 if { (eval echo configure:12167: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12169 then
12170   ol_cv_pthread_create=yes
12171 else
12172   echo "configure: failed program was:" >&5
12173   cat conftest.$ac_ext >&5
12174   rm -fr conftest*
12175   ol_cv_pthread_create=no
12176 fi
12177 rm -fr conftest*
12178 fi
12179
12180 fi
12181
12182 echo "$ac_t""$ol_cv_pthread_create" 1>&6
12183
12184                 if test $ol_cv_pthread_create != no ; then
12185                         ol_link_threads=posix
12186                         ol_link_pthreads=""
12187                 fi
12188                 
12189                 # Pthread try link: -kthread (ol_cv_pthread_kthread)
12190 if test "$ol_link_threads" = no ; then
12191         # try -kthread
12192         echo $ac_n "checking for pthread link with -kthread""... $ac_c" 1>&6
12193 echo "configure:12192: checking for pthread link with -kthread" >&5
12194 if eval "test \"\${ol_cv_pthread_kthread+set}\" = set"; then
12195   echo $ac_n "(cached) $ac_c" 1>&6
12196 else
12197   
12198                 # save the flags
12199                 ol_LIBS="$LIBS"
12200                 LIBS="-kthread $LIBS"
12201
12202                 if test "$cross_compiling" = yes; then
12203   cat > conftest.$ac_ext <<EOF
12204 #line 12203 "configure"
12205 #include "confdefs.h"
12206 /* pthread test headers */
12207 #include <pthread.h>
12208 #if HAVE_PTHREADS < 7
12209 #include <errno.h>
12210 #endif
12211 #ifndef NULL
12212 #define NULL (void*)0
12213 #endif
12214
12215 static void *task(p)
12216         void *p;
12217 {
12218         return (void *) (p == NULL);
12219 }
12220
12221 int main() {
12222
12223         /* pthread test function */
12224 #ifndef PTHREAD_CREATE_DETACHED
12225 #define PTHREAD_CREATE_DETACHED 1
12226 #endif
12227         pthread_t t;
12228         int status;
12229         int detach = PTHREAD_CREATE_DETACHED;
12230
12231 #if HAVE_PTHREADS > 4
12232         /* Final pthreads */
12233         pthread_attr_t attr;
12234
12235         status = pthread_attr_init(&attr);
12236         if( status ) return status;
12237
12238 #if HAVE_PTHREADS < 7
12239         status = pthread_attr_setdetachstate(&attr, &detach);
12240         if( status < 0 ) status = errno;
12241 #else
12242         status = pthread_attr_setdetachstate(&attr, detach);
12243 #endif
12244         if( status ) return status;
12245         status = pthread_create( &t, &attr, task, NULL );
12246 #if HAVE_PTHREADS < 7
12247         if( status < 0 ) status = errno;
12248 #endif
12249         if( status ) return status;
12250 #else
12251         /* Draft 4 pthreads */
12252         status = pthread_create( &t, pthread_attr_default, task, NULL );
12253         if( status ) return errno;
12254
12255         /* give thread a chance to complete */
12256         /* it should remain joinable and hence detachable */
12257         sleep( 1 );
12258
12259         status = pthread_detach( &t );
12260         if( status ) return errno;
12261 #endif
12262
12263 #ifdef HAVE_LINUX_THREADS
12264         pthread_kill_other_threads_np();
12265 #endif
12266
12267         return 0;
12268
12269 ; return 0; }
12270 EOF
12271 if { (eval echo configure:12270: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12272   rm -rf conftest*
12273   ol_cv_pthread_kthread=yes
12274 else
12275   echo "configure: failed program was:" >&5
12276   cat conftest.$ac_ext >&5
12277   rm -rf conftest*
12278   ol_cv_pthread_kthread=no
12279 fi
12280 rm -f conftest*
12281 else
12282   cat > conftest.$ac_ext <<EOF
12283 #line 12282 "configure"
12284 #include "confdefs.h"
12285 /* pthread test headers */
12286 #include <pthread.h>
12287 #if HAVE_PTHREADS < 7
12288 #include <errno.h>
12289 #endif
12290 #ifndef NULL
12291 #define NULL (void*)0
12292 #endif
12293
12294 static void *task(p)
12295         void *p;
12296 {
12297         return (void *) (p == NULL);
12298 }
12299
12300
12301 int main(argc, argv)
12302         int argc;
12303         char **argv;
12304 {
12305
12306         /* pthread test function */
12307 #ifndef PTHREAD_CREATE_DETACHED
12308 #define PTHREAD_CREATE_DETACHED 1
12309 #endif
12310         pthread_t t;
12311         int status;
12312         int detach = PTHREAD_CREATE_DETACHED;
12313
12314 #if HAVE_PTHREADS > 4
12315         /* Final pthreads */
12316         pthread_attr_t attr;
12317
12318         status = pthread_attr_init(&attr);
12319         if( status ) return status;
12320
12321 #if HAVE_PTHREADS < 7
12322         status = pthread_attr_setdetachstate(&attr, &detach);
12323         if( status < 0 ) status = errno;
12324 #else
12325         status = pthread_attr_setdetachstate(&attr, detach);
12326 #endif
12327         if( status ) return status;
12328         status = pthread_create( &t, &attr, task, NULL );
12329 #if HAVE_PTHREADS < 7
12330         if( status < 0 ) status = errno;
12331 #endif
12332         if( status ) return status;
12333 #else
12334         /* Draft 4 pthreads */
12335         status = pthread_create( &t, pthread_attr_default, task, NULL );
12336         if( status ) return errno;
12337
12338         /* give thread a chance to complete */
12339         /* it should remain joinable and hence detachable */
12340         sleep( 1 );
12341
12342         status = pthread_detach( &t );
12343         if( status ) return errno;
12344 #endif
12345
12346 #ifdef HAVE_LINUX_THREADS
12347         pthread_kill_other_threads_np();
12348 #endif
12349
12350         return 0;
12351
12352 }
12353
12354 EOF
12355 if { (eval echo configure:12354: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12356 then
12357   ol_cv_pthread_kthread=yes
12358 else
12359   echo "configure: failed program was:" >&5
12360   cat conftest.$ac_ext >&5
12361   rm -fr conftest*
12362   ol_cv_pthread_kthread=no
12363 fi
12364 rm -fr conftest*
12365 fi
12366
12367
12368                 # restore the LIBS
12369                 LIBS="$ol_LIBS"
12370         
12371 fi
12372
12373 echo "$ac_t""$ol_cv_pthread_kthread" 1>&6
12374
12375         if test $ol_cv_pthread_kthread = yes ; then
12376                 ol_link_pthreads="-kthread"
12377                 ol_link_threads=posix
12378         fi
12379 fi
12380
12381                 # Pthread try link: -pthread (ol_cv_pthread_pthread)
12382 if test "$ol_link_threads" = no ; then
12383         # try -pthread
12384         echo $ac_n "checking for pthread link with -pthread""... $ac_c" 1>&6
12385 echo "configure:12384: checking for pthread link with -pthread" >&5
12386 if eval "test \"\${ol_cv_pthread_pthread+set}\" = set"; then
12387   echo $ac_n "(cached) $ac_c" 1>&6
12388 else
12389   
12390                 # save the flags
12391                 ol_LIBS="$LIBS"
12392                 LIBS="-pthread $LIBS"
12393
12394                 if test "$cross_compiling" = yes; then
12395   cat > conftest.$ac_ext <<EOF
12396 #line 12395 "configure"
12397 #include "confdefs.h"
12398 /* pthread test headers */
12399 #include <pthread.h>
12400 #if HAVE_PTHREADS < 7
12401 #include <errno.h>
12402 #endif
12403 #ifndef NULL
12404 #define NULL (void*)0
12405 #endif
12406
12407 static void *task(p)
12408         void *p;
12409 {
12410         return (void *) (p == NULL);
12411 }
12412
12413 int main() {
12414
12415         /* pthread test function */
12416 #ifndef PTHREAD_CREATE_DETACHED
12417 #define PTHREAD_CREATE_DETACHED 1
12418 #endif
12419         pthread_t t;
12420         int status;
12421         int detach = PTHREAD_CREATE_DETACHED;
12422
12423 #if HAVE_PTHREADS > 4
12424         /* Final pthreads */
12425         pthread_attr_t attr;
12426
12427         status = pthread_attr_init(&attr);
12428         if( status ) return status;
12429
12430 #if HAVE_PTHREADS < 7
12431         status = pthread_attr_setdetachstate(&attr, &detach);
12432         if( status < 0 ) status = errno;
12433 #else
12434         status = pthread_attr_setdetachstate(&attr, detach);
12435 #endif
12436         if( status ) return status;
12437         status = pthread_create( &t, &attr, task, NULL );
12438 #if HAVE_PTHREADS < 7
12439         if( status < 0 ) status = errno;
12440 #endif
12441         if( status ) return status;
12442 #else
12443         /* Draft 4 pthreads */
12444         status = pthread_create( &t, pthread_attr_default, task, NULL );
12445         if( status ) return errno;
12446
12447         /* give thread a chance to complete */
12448         /* it should remain joinable and hence detachable */
12449         sleep( 1 );
12450
12451         status = pthread_detach( &t );
12452         if( status ) return errno;
12453 #endif
12454
12455 #ifdef HAVE_LINUX_THREADS
12456         pthread_kill_other_threads_np();
12457 #endif
12458
12459         return 0;
12460
12461 ; return 0; }
12462 EOF
12463 if { (eval echo configure:12462: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12464   rm -rf conftest*
12465   ol_cv_pthread_pthread=yes
12466 else
12467   echo "configure: failed program was:" >&5
12468   cat conftest.$ac_ext >&5
12469   rm -rf conftest*
12470   ol_cv_pthread_pthread=no
12471 fi
12472 rm -f conftest*
12473 else
12474   cat > conftest.$ac_ext <<EOF
12475 #line 12474 "configure"
12476 #include "confdefs.h"
12477 /* pthread test headers */
12478 #include <pthread.h>
12479 #if HAVE_PTHREADS < 7
12480 #include <errno.h>
12481 #endif
12482 #ifndef NULL
12483 #define NULL (void*)0
12484 #endif
12485
12486 static void *task(p)
12487         void *p;
12488 {
12489         return (void *) (p == NULL);
12490 }
12491
12492
12493 int main(argc, argv)
12494         int argc;
12495         char **argv;
12496 {
12497
12498         /* pthread test function */
12499 #ifndef PTHREAD_CREATE_DETACHED
12500 #define PTHREAD_CREATE_DETACHED 1
12501 #endif
12502         pthread_t t;
12503         int status;
12504         int detach = PTHREAD_CREATE_DETACHED;
12505
12506 #if HAVE_PTHREADS > 4
12507         /* Final pthreads */
12508         pthread_attr_t attr;
12509
12510         status = pthread_attr_init(&attr);
12511         if( status ) return status;
12512
12513 #if HAVE_PTHREADS < 7
12514         status = pthread_attr_setdetachstate(&attr, &detach);
12515         if( status < 0 ) status = errno;
12516 #else
12517         status = pthread_attr_setdetachstate(&attr, detach);
12518 #endif
12519         if( status ) return status;
12520         status = pthread_create( &t, &attr, task, NULL );
12521 #if HAVE_PTHREADS < 7
12522         if( status < 0 ) status = errno;
12523 #endif
12524         if( status ) return status;
12525 #else
12526         /* Draft 4 pthreads */
12527         status = pthread_create( &t, pthread_attr_default, task, NULL );
12528         if( status ) return errno;
12529
12530         /* give thread a chance to complete */
12531         /* it should remain joinable and hence detachable */
12532         sleep( 1 );
12533
12534         status = pthread_detach( &t );
12535         if( status ) return errno;
12536 #endif
12537
12538 #ifdef HAVE_LINUX_THREADS
12539         pthread_kill_other_threads_np();
12540 #endif
12541
12542         return 0;
12543
12544 }
12545
12546 EOF
12547 if { (eval echo configure:12546: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12548 then
12549   ol_cv_pthread_pthread=yes
12550 else
12551   echo "configure: failed program was:" >&5
12552   cat conftest.$ac_ext >&5
12553   rm -fr conftest*
12554   ol_cv_pthread_pthread=no
12555 fi
12556 rm -fr conftest*
12557 fi
12558
12559
12560                 # restore the LIBS
12561                 LIBS="$ol_LIBS"
12562         
12563 fi
12564
12565 echo "$ac_t""$ol_cv_pthread_pthread" 1>&6
12566
12567         if test $ol_cv_pthread_pthread = yes ; then
12568                 ol_link_pthreads="-pthread"
12569                 ol_link_threads=posix
12570         fi
12571 fi
12572
12573                 # Pthread try link: -pthreads (ol_cv_pthread_pthreads)
12574 if test "$ol_link_threads" = no ; then
12575         # try -pthreads
12576         echo $ac_n "checking for pthread link with -pthreads""... $ac_c" 1>&6
12577 echo "configure:12576: checking for pthread link with -pthreads" >&5
12578 if eval "test \"\${ol_cv_pthread_pthreads+set}\" = set"; then
12579   echo $ac_n "(cached) $ac_c" 1>&6
12580 else
12581   
12582                 # save the flags
12583                 ol_LIBS="$LIBS"
12584                 LIBS="-pthreads $LIBS"
12585
12586                 if test "$cross_compiling" = yes; then
12587   cat > conftest.$ac_ext <<EOF
12588 #line 12587 "configure"
12589 #include "confdefs.h"
12590 /* pthread test headers */
12591 #include <pthread.h>
12592 #if HAVE_PTHREADS < 7
12593 #include <errno.h>
12594 #endif
12595 #ifndef NULL
12596 #define NULL (void*)0
12597 #endif
12598
12599 static void *task(p)
12600         void *p;
12601 {
12602         return (void *) (p == NULL);
12603 }
12604
12605 int main() {
12606
12607         /* pthread test function */
12608 #ifndef PTHREAD_CREATE_DETACHED
12609 #define PTHREAD_CREATE_DETACHED 1
12610 #endif
12611         pthread_t t;
12612         int status;
12613         int detach = PTHREAD_CREATE_DETACHED;
12614
12615 #if HAVE_PTHREADS > 4
12616         /* Final pthreads */
12617         pthread_attr_t attr;
12618
12619         status = pthread_attr_init(&attr);
12620         if( status ) return status;
12621
12622 #if HAVE_PTHREADS < 7
12623         status = pthread_attr_setdetachstate(&attr, &detach);
12624         if( status < 0 ) status = errno;
12625 #else
12626         status = pthread_attr_setdetachstate(&attr, detach);
12627 #endif
12628         if( status ) return status;
12629         status = pthread_create( &t, &attr, task, NULL );
12630 #if HAVE_PTHREADS < 7
12631         if( status < 0 ) status = errno;
12632 #endif
12633         if( status ) return status;
12634 #else
12635         /* Draft 4 pthreads */
12636         status = pthread_create( &t, pthread_attr_default, task, NULL );
12637         if( status ) return errno;
12638
12639         /* give thread a chance to complete */
12640         /* it should remain joinable and hence detachable */
12641         sleep( 1 );
12642
12643         status = pthread_detach( &t );
12644         if( status ) return errno;
12645 #endif
12646
12647 #ifdef HAVE_LINUX_THREADS
12648         pthread_kill_other_threads_np();
12649 #endif
12650
12651         return 0;
12652
12653 ; return 0; }
12654 EOF
12655 if { (eval echo configure:12654: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12656   rm -rf conftest*
12657   ol_cv_pthread_pthreads=yes
12658 else
12659   echo "configure: failed program was:" >&5
12660   cat conftest.$ac_ext >&5
12661   rm -rf conftest*
12662   ol_cv_pthread_pthreads=no
12663 fi
12664 rm -f conftest*
12665 else
12666   cat > conftest.$ac_ext <<EOF
12667 #line 12666 "configure"
12668 #include "confdefs.h"
12669 /* pthread test headers */
12670 #include <pthread.h>
12671 #if HAVE_PTHREADS < 7
12672 #include <errno.h>
12673 #endif
12674 #ifndef NULL
12675 #define NULL (void*)0
12676 #endif
12677
12678 static void *task(p)
12679         void *p;
12680 {
12681         return (void *) (p == NULL);
12682 }
12683
12684
12685 int main(argc, argv)
12686         int argc;
12687         char **argv;
12688 {
12689
12690         /* pthread test function */
12691 #ifndef PTHREAD_CREATE_DETACHED
12692 #define PTHREAD_CREATE_DETACHED 1
12693 #endif
12694         pthread_t t;
12695         int status;
12696         int detach = PTHREAD_CREATE_DETACHED;
12697
12698 #if HAVE_PTHREADS > 4
12699         /* Final pthreads */
12700         pthread_attr_t attr;
12701
12702         status = pthread_attr_init(&attr);
12703         if( status ) return status;
12704
12705 #if HAVE_PTHREADS < 7
12706         status = pthread_attr_setdetachstate(&attr, &detach);
12707         if( status < 0 ) status = errno;
12708 #else
12709         status = pthread_attr_setdetachstate(&attr, detach);
12710 #endif
12711         if( status ) return status;
12712         status = pthread_create( &t, &attr, task, NULL );
12713 #if HAVE_PTHREADS < 7
12714         if( status < 0 ) status = errno;
12715 #endif
12716         if( status ) return status;
12717 #else
12718         /* Draft 4 pthreads */
12719         status = pthread_create( &t, pthread_attr_default, task, NULL );
12720         if( status ) return errno;
12721
12722         /* give thread a chance to complete */
12723         /* it should remain joinable and hence detachable */
12724         sleep( 1 );
12725
12726         status = pthread_detach( &t );
12727         if( status ) return errno;
12728 #endif
12729
12730 #ifdef HAVE_LINUX_THREADS
12731         pthread_kill_other_threads_np();
12732 #endif
12733
12734         return 0;
12735
12736 }
12737
12738 EOF
12739 if { (eval echo configure:12738: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12740 then
12741   ol_cv_pthread_pthreads=yes
12742 else
12743   echo "configure: failed program was:" >&5
12744   cat conftest.$ac_ext >&5
12745   rm -fr conftest*
12746   ol_cv_pthread_pthreads=no
12747 fi
12748 rm -fr conftest*
12749 fi
12750
12751
12752                 # restore the LIBS
12753                 LIBS="$ol_LIBS"
12754         
12755 fi
12756
12757 echo "$ac_t""$ol_cv_pthread_pthreads" 1>&6
12758
12759         if test $ol_cv_pthread_pthreads = yes ; then
12760                 ol_link_pthreads="-pthreads"
12761                 ol_link_threads=posix
12762         fi
12763 fi
12764
12765                 # Pthread try link: -mthreads (ol_cv_pthread_mthreads)
12766 if test "$ol_link_threads" = no ; then
12767         # try -mthreads
12768         echo $ac_n "checking for pthread link with -mthreads""... $ac_c" 1>&6
12769 echo "configure:12768: checking for pthread link with -mthreads" >&5
12770 if eval "test \"\${ol_cv_pthread_mthreads+set}\" = set"; then
12771   echo $ac_n "(cached) $ac_c" 1>&6
12772 else
12773   
12774                 # save the flags
12775                 ol_LIBS="$LIBS"
12776                 LIBS="-mthreads $LIBS"
12777
12778                 if test "$cross_compiling" = yes; then
12779   cat > conftest.$ac_ext <<EOF
12780 #line 12779 "configure"
12781 #include "confdefs.h"
12782 /* pthread test headers */
12783 #include <pthread.h>
12784 #if HAVE_PTHREADS < 7
12785 #include <errno.h>
12786 #endif
12787 #ifndef NULL
12788 #define NULL (void*)0
12789 #endif
12790
12791 static void *task(p)
12792         void *p;
12793 {
12794         return (void *) (p == NULL);
12795 }
12796
12797 int main() {
12798
12799         /* pthread test function */
12800 #ifndef PTHREAD_CREATE_DETACHED
12801 #define PTHREAD_CREATE_DETACHED 1
12802 #endif
12803         pthread_t t;
12804         int status;
12805         int detach = PTHREAD_CREATE_DETACHED;
12806
12807 #if HAVE_PTHREADS > 4
12808         /* Final pthreads */
12809         pthread_attr_t attr;
12810
12811         status = pthread_attr_init(&attr);
12812         if( status ) return status;
12813
12814 #if HAVE_PTHREADS < 7
12815         status = pthread_attr_setdetachstate(&attr, &detach);
12816         if( status < 0 ) status = errno;
12817 #else
12818         status = pthread_attr_setdetachstate(&attr, detach);
12819 #endif
12820         if( status ) return status;
12821         status = pthread_create( &t, &attr, task, NULL );
12822 #if HAVE_PTHREADS < 7
12823         if( status < 0 ) status = errno;
12824 #endif
12825         if( status ) return status;
12826 #else
12827         /* Draft 4 pthreads */
12828         status = pthread_create( &t, pthread_attr_default, task, NULL );
12829         if( status ) return errno;
12830
12831         /* give thread a chance to complete */
12832         /* it should remain joinable and hence detachable */
12833         sleep( 1 );
12834
12835         status = pthread_detach( &t );
12836         if( status ) return errno;
12837 #endif
12838
12839 #ifdef HAVE_LINUX_THREADS
12840         pthread_kill_other_threads_np();
12841 #endif
12842
12843         return 0;
12844
12845 ; return 0; }
12846 EOF
12847 if { (eval echo configure:12846: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12848   rm -rf conftest*
12849   ol_cv_pthread_mthreads=yes
12850 else
12851   echo "configure: failed program was:" >&5
12852   cat conftest.$ac_ext >&5
12853   rm -rf conftest*
12854   ol_cv_pthread_mthreads=no
12855 fi
12856 rm -f conftest*
12857 else
12858   cat > conftest.$ac_ext <<EOF
12859 #line 12858 "configure"
12860 #include "confdefs.h"
12861 /* pthread test headers */
12862 #include <pthread.h>
12863 #if HAVE_PTHREADS < 7
12864 #include <errno.h>
12865 #endif
12866 #ifndef NULL
12867 #define NULL (void*)0
12868 #endif
12869
12870 static void *task(p)
12871         void *p;
12872 {
12873         return (void *) (p == NULL);
12874 }
12875
12876
12877 int main(argc, argv)
12878         int argc;
12879         char **argv;
12880 {
12881
12882         /* pthread test function */
12883 #ifndef PTHREAD_CREATE_DETACHED
12884 #define PTHREAD_CREATE_DETACHED 1
12885 #endif
12886         pthread_t t;
12887         int status;
12888         int detach = PTHREAD_CREATE_DETACHED;
12889
12890 #if HAVE_PTHREADS > 4
12891         /* Final pthreads */
12892         pthread_attr_t attr;
12893
12894         status = pthread_attr_init(&attr);
12895         if( status ) return status;
12896
12897 #if HAVE_PTHREADS < 7
12898         status = pthread_attr_setdetachstate(&attr, &detach);
12899         if( status < 0 ) status = errno;
12900 #else
12901         status = pthread_attr_setdetachstate(&attr, detach);
12902 #endif
12903         if( status ) return status;
12904         status = pthread_create( &t, &attr, task, NULL );
12905 #if HAVE_PTHREADS < 7
12906         if( status < 0 ) status = errno;
12907 #endif
12908         if( status ) return status;
12909 #else
12910         /* Draft 4 pthreads */
12911         status = pthread_create( &t, pthread_attr_default, task, NULL );
12912         if( status ) return errno;
12913
12914         /* give thread a chance to complete */
12915         /* it should remain joinable and hence detachable */
12916         sleep( 1 );
12917
12918         status = pthread_detach( &t );
12919         if( status ) return errno;
12920 #endif
12921
12922 #ifdef HAVE_LINUX_THREADS
12923         pthread_kill_other_threads_np();
12924 #endif
12925
12926         return 0;
12927
12928 }
12929
12930 EOF
12931 if { (eval echo configure:12930: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12932 then
12933   ol_cv_pthread_mthreads=yes
12934 else
12935   echo "configure: failed program was:" >&5
12936   cat conftest.$ac_ext >&5
12937   rm -fr conftest*
12938   ol_cv_pthread_mthreads=no
12939 fi
12940 rm -fr conftest*
12941 fi
12942
12943
12944                 # restore the LIBS
12945                 LIBS="$ol_LIBS"
12946         
12947 fi
12948
12949 echo "$ac_t""$ol_cv_pthread_mthreads" 1>&6
12950
12951         if test $ol_cv_pthread_mthreads = yes ; then
12952                 ol_link_pthreads="-mthreads"
12953                 ol_link_threads=posix
12954         fi
12955 fi
12956
12957                 # Pthread try link: -thread (ol_cv_pthread_thread)
12958 if test "$ol_link_threads" = no ; then
12959         # try -thread
12960         echo $ac_n "checking for pthread link with -thread""... $ac_c" 1>&6
12961 echo "configure:12960: checking for pthread link with -thread" >&5
12962 if eval "test \"\${ol_cv_pthread_thread+set}\" = set"; then
12963   echo $ac_n "(cached) $ac_c" 1>&6
12964 else
12965   
12966                 # save the flags
12967                 ol_LIBS="$LIBS"
12968                 LIBS="-thread $LIBS"
12969
12970                 if test "$cross_compiling" = yes; then
12971   cat > conftest.$ac_ext <<EOF
12972 #line 12971 "configure"
12973 #include "confdefs.h"
12974 /* pthread test headers */
12975 #include <pthread.h>
12976 #if HAVE_PTHREADS < 7
12977 #include <errno.h>
12978 #endif
12979 #ifndef NULL
12980 #define NULL (void*)0
12981 #endif
12982
12983 static void *task(p)
12984         void *p;
12985 {
12986         return (void *) (p == NULL);
12987 }
12988
12989 int main() {
12990
12991         /* pthread test function */
12992 #ifndef PTHREAD_CREATE_DETACHED
12993 #define PTHREAD_CREATE_DETACHED 1
12994 #endif
12995         pthread_t t;
12996         int status;
12997         int detach = PTHREAD_CREATE_DETACHED;
12998
12999 #if HAVE_PTHREADS > 4
13000         /* Final pthreads */
13001         pthread_attr_t attr;
13002
13003         status = pthread_attr_init(&attr);
13004         if( status ) return status;
13005
13006 #if HAVE_PTHREADS < 7
13007         status = pthread_attr_setdetachstate(&attr, &detach);
13008         if( status < 0 ) status = errno;
13009 #else
13010         status = pthread_attr_setdetachstate(&attr, detach);
13011 #endif
13012         if( status ) return status;
13013         status = pthread_create( &t, &attr, task, NULL );
13014 #if HAVE_PTHREADS < 7
13015         if( status < 0 ) status = errno;
13016 #endif
13017         if( status ) return status;
13018 #else
13019         /* Draft 4 pthreads */
13020         status = pthread_create( &t, pthread_attr_default, task, NULL );
13021         if( status ) return errno;
13022
13023         /* give thread a chance to complete */
13024         /* it should remain joinable and hence detachable */
13025         sleep( 1 );
13026
13027         status = pthread_detach( &t );
13028         if( status ) return errno;
13029 #endif
13030
13031 #ifdef HAVE_LINUX_THREADS
13032         pthread_kill_other_threads_np();
13033 #endif
13034
13035         return 0;
13036
13037 ; return 0; }
13038 EOF
13039 if { (eval echo configure:13038: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13040   rm -rf conftest*
13041   ol_cv_pthread_thread=yes
13042 else
13043   echo "configure: failed program was:" >&5
13044   cat conftest.$ac_ext >&5
13045   rm -rf conftest*
13046   ol_cv_pthread_thread=no
13047 fi
13048 rm -f conftest*
13049 else
13050   cat > conftest.$ac_ext <<EOF
13051 #line 13050 "configure"
13052 #include "confdefs.h"
13053 /* pthread test headers */
13054 #include <pthread.h>
13055 #if HAVE_PTHREADS < 7
13056 #include <errno.h>
13057 #endif
13058 #ifndef NULL
13059 #define NULL (void*)0
13060 #endif
13061
13062 static void *task(p)
13063         void *p;
13064 {
13065         return (void *) (p == NULL);
13066 }
13067
13068
13069 int main(argc, argv)
13070         int argc;
13071         char **argv;
13072 {
13073
13074         /* pthread test function */
13075 #ifndef PTHREAD_CREATE_DETACHED
13076 #define PTHREAD_CREATE_DETACHED 1
13077 #endif
13078         pthread_t t;
13079         int status;
13080         int detach = PTHREAD_CREATE_DETACHED;
13081
13082 #if HAVE_PTHREADS > 4
13083         /* Final pthreads */
13084         pthread_attr_t attr;
13085
13086         status = pthread_attr_init(&attr);
13087         if( status ) return status;
13088
13089 #if HAVE_PTHREADS < 7
13090         status = pthread_attr_setdetachstate(&attr, &detach);
13091         if( status < 0 ) status = errno;
13092 #else
13093         status = pthread_attr_setdetachstate(&attr, detach);
13094 #endif
13095         if( status ) return status;
13096         status = pthread_create( &t, &attr, task, NULL );
13097 #if HAVE_PTHREADS < 7
13098         if( status < 0 ) status = errno;
13099 #endif
13100         if( status ) return status;
13101 #else
13102         /* Draft 4 pthreads */
13103         status = pthread_create( &t, pthread_attr_default, task, NULL );
13104         if( status ) return errno;
13105
13106         /* give thread a chance to complete */
13107         /* it should remain joinable and hence detachable */
13108         sleep( 1 );
13109
13110         status = pthread_detach( &t );
13111         if( status ) return errno;
13112 #endif
13113
13114 #ifdef HAVE_LINUX_THREADS
13115         pthread_kill_other_threads_np();
13116 #endif
13117
13118         return 0;
13119
13120 }
13121
13122 EOF
13123 if { (eval echo configure:13122: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13124 then
13125   ol_cv_pthread_thread=yes
13126 else
13127   echo "configure: failed program was:" >&5
13128   cat conftest.$ac_ext >&5
13129   rm -fr conftest*
13130   ol_cv_pthread_thread=no
13131 fi
13132 rm -fr conftest*
13133 fi
13134
13135
13136                 # restore the LIBS
13137                 LIBS="$ol_LIBS"
13138         
13139 fi
13140
13141 echo "$ac_t""$ol_cv_pthread_thread" 1>&6
13142
13143         if test $ol_cv_pthread_thread = yes ; then
13144                 ol_link_pthreads="-thread"
13145                 ol_link_threads=posix
13146         fi
13147 fi
13148
13149
13150                 # Pthread try link: -lpthread -lmach -lexc -lc_r (ol_cv_pthread_lpthread_lmach_lexc_lc_r)
13151 if test "$ol_link_threads" = no ; then
13152         # try -lpthread -lmach -lexc -lc_r
13153         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc -lc_r""... $ac_c" 1>&6
13154 echo "configure:13153: checking for pthread link with -lpthread -lmach -lexc -lc_r" >&5
13155 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc_lc_r+set}\" = set"; then
13156   echo $ac_n "(cached) $ac_c" 1>&6
13157 else
13158   
13159                 # save the flags
13160                 ol_LIBS="$LIBS"
13161                 LIBS="-lpthread -lmach -lexc -lc_r $LIBS"
13162
13163                 if test "$cross_compiling" = yes; then
13164   cat > conftest.$ac_ext <<EOF
13165 #line 13164 "configure"
13166 #include "confdefs.h"
13167 /* pthread test headers */
13168 #include <pthread.h>
13169 #if HAVE_PTHREADS < 7
13170 #include <errno.h>
13171 #endif
13172 #ifndef NULL
13173 #define NULL (void*)0
13174 #endif
13175
13176 static void *task(p)
13177         void *p;
13178 {
13179         return (void *) (p == NULL);
13180 }
13181
13182 int main() {
13183
13184         /* pthread test function */
13185 #ifndef PTHREAD_CREATE_DETACHED
13186 #define PTHREAD_CREATE_DETACHED 1
13187 #endif
13188         pthread_t t;
13189         int status;
13190         int detach = PTHREAD_CREATE_DETACHED;
13191
13192 #if HAVE_PTHREADS > 4
13193         /* Final pthreads */
13194         pthread_attr_t attr;
13195
13196         status = pthread_attr_init(&attr);
13197         if( status ) return status;
13198
13199 #if HAVE_PTHREADS < 7
13200         status = pthread_attr_setdetachstate(&attr, &detach);
13201         if( status < 0 ) status = errno;
13202 #else
13203         status = pthread_attr_setdetachstate(&attr, detach);
13204 #endif
13205         if( status ) return status;
13206         status = pthread_create( &t, &attr, task, NULL );
13207 #if HAVE_PTHREADS < 7
13208         if( status < 0 ) status = errno;
13209 #endif
13210         if( status ) return status;
13211 #else
13212         /* Draft 4 pthreads */
13213         status = pthread_create( &t, pthread_attr_default, task, NULL );
13214         if( status ) return errno;
13215
13216         /* give thread a chance to complete */
13217         /* it should remain joinable and hence detachable */
13218         sleep( 1 );
13219
13220         status = pthread_detach( &t );
13221         if( status ) return errno;
13222 #endif
13223
13224 #ifdef HAVE_LINUX_THREADS
13225         pthread_kill_other_threads_np();
13226 #endif
13227
13228         return 0;
13229
13230 ; return 0; }
13231 EOF
13232 if { (eval echo configure:13231: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13233   rm -rf conftest*
13234   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
13235 else
13236   echo "configure: failed program was:" >&5
13237   cat conftest.$ac_ext >&5
13238   rm -rf conftest*
13239   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
13240 fi
13241 rm -f conftest*
13242 else
13243   cat > conftest.$ac_ext <<EOF
13244 #line 13243 "configure"
13245 #include "confdefs.h"
13246 /* pthread test headers */
13247 #include <pthread.h>
13248 #if HAVE_PTHREADS < 7
13249 #include <errno.h>
13250 #endif
13251 #ifndef NULL
13252 #define NULL (void*)0
13253 #endif
13254
13255 static void *task(p)
13256         void *p;
13257 {
13258         return (void *) (p == NULL);
13259 }
13260
13261
13262 int main(argc, argv)
13263         int argc;
13264         char **argv;
13265 {
13266
13267         /* pthread test function */
13268 #ifndef PTHREAD_CREATE_DETACHED
13269 #define PTHREAD_CREATE_DETACHED 1
13270 #endif
13271         pthread_t t;
13272         int status;
13273         int detach = PTHREAD_CREATE_DETACHED;
13274
13275 #if HAVE_PTHREADS > 4
13276         /* Final pthreads */
13277         pthread_attr_t attr;
13278
13279         status = pthread_attr_init(&attr);
13280         if( status ) return status;
13281
13282 #if HAVE_PTHREADS < 7
13283         status = pthread_attr_setdetachstate(&attr, &detach);
13284         if( status < 0 ) status = errno;
13285 #else
13286         status = pthread_attr_setdetachstate(&attr, detach);
13287 #endif
13288         if( status ) return status;
13289         status = pthread_create( &t, &attr, task, NULL );
13290 #if HAVE_PTHREADS < 7
13291         if( status < 0 ) status = errno;
13292 #endif
13293         if( status ) return status;
13294 #else
13295         /* Draft 4 pthreads */
13296         status = pthread_create( &t, pthread_attr_default, task, NULL );
13297         if( status ) return errno;
13298
13299         /* give thread a chance to complete */
13300         /* it should remain joinable and hence detachable */
13301         sleep( 1 );
13302
13303         status = pthread_detach( &t );
13304         if( status ) return errno;
13305 #endif
13306
13307 #ifdef HAVE_LINUX_THREADS
13308         pthread_kill_other_threads_np();
13309 #endif
13310
13311         return 0;
13312
13313 }
13314
13315 EOF
13316 if { (eval echo configure:13315: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13317 then
13318   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
13319 else
13320   echo "configure: failed program was:" >&5
13321   cat conftest.$ac_ext >&5
13322   rm -fr conftest*
13323   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
13324 fi
13325 rm -fr conftest*
13326 fi
13327
13328
13329                 # restore the LIBS
13330                 LIBS="$ol_LIBS"
13331         
13332 fi
13333
13334 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc_lc_r" 1>&6
13335
13336         if test $ol_cv_pthread_lpthread_lmach_lexc_lc_r = yes ; then
13337                 ol_link_pthreads="-lpthread -lmach -lexc -lc_r"
13338                 ol_link_threads=posix
13339         fi
13340 fi
13341
13342                 # Pthread try link: -lpthread -lmach -lexc (ol_cv_pthread_lpthread_lmach_lexc)
13343 if test "$ol_link_threads" = no ; then
13344         # try -lpthread -lmach -lexc
13345         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc""... $ac_c" 1>&6
13346 echo "configure:13345: checking for pthread link with -lpthread -lmach -lexc" >&5
13347 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc+set}\" = set"; then
13348   echo $ac_n "(cached) $ac_c" 1>&6
13349 else
13350   
13351                 # save the flags
13352                 ol_LIBS="$LIBS"
13353                 LIBS="-lpthread -lmach -lexc $LIBS"
13354
13355                 if test "$cross_compiling" = yes; then
13356   cat > conftest.$ac_ext <<EOF
13357 #line 13356 "configure"
13358 #include "confdefs.h"
13359 /* pthread test headers */
13360 #include <pthread.h>
13361 #if HAVE_PTHREADS < 7
13362 #include <errno.h>
13363 #endif
13364 #ifndef NULL
13365 #define NULL (void*)0
13366 #endif
13367
13368 static void *task(p)
13369         void *p;
13370 {
13371         return (void *) (p == NULL);
13372 }
13373
13374 int main() {
13375
13376         /* pthread test function */
13377 #ifndef PTHREAD_CREATE_DETACHED
13378 #define PTHREAD_CREATE_DETACHED 1
13379 #endif
13380         pthread_t t;
13381         int status;
13382         int detach = PTHREAD_CREATE_DETACHED;
13383
13384 #if HAVE_PTHREADS > 4
13385         /* Final pthreads */
13386         pthread_attr_t attr;
13387
13388         status = pthread_attr_init(&attr);
13389         if( status ) return status;
13390
13391 #if HAVE_PTHREADS < 7
13392         status = pthread_attr_setdetachstate(&attr, &detach);
13393         if( status < 0 ) status = errno;
13394 #else
13395         status = pthread_attr_setdetachstate(&attr, detach);
13396 #endif
13397         if( status ) return status;
13398         status = pthread_create( &t, &attr, task, NULL );
13399 #if HAVE_PTHREADS < 7
13400         if( status < 0 ) status = errno;
13401 #endif
13402         if( status ) return status;
13403 #else
13404         /* Draft 4 pthreads */
13405         status = pthread_create( &t, pthread_attr_default, task, NULL );
13406         if( status ) return errno;
13407
13408         /* give thread a chance to complete */
13409         /* it should remain joinable and hence detachable */
13410         sleep( 1 );
13411
13412         status = pthread_detach( &t );
13413         if( status ) return errno;
13414 #endif
13415
13416 #ifdef HAVE_LINUX_THREADS
13417         pthread_kill_other_threads_np();
13418 #endif
13419
13420         return 0;
13421
13422 ; return 0; }
13423 EOF
13424 if { (eval echo configure:13423: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13425   rm -rf conftest*
13426   ol_cv_pthread_lpthread_lmach_lexc=yes
13427 else
13428   echo "configure: failed program was:" >&5
13429   cat conftest.$ac_ext >&5
13430   rm -rf conftest*
13431   ol_cv_pthread_lpthread_lmach_lexc=no
13432 fi
13433 rm -f conftest*
13434 else
13435   cat > conftest.$ac_ext <<EOF
13436 #line 13435 "configure"
13437 #include "confdefs.h"
13438 /* pthread test headers */
13439 #include <pthread.h>
13440 #if HAVE_PTHREADS < 7
13441 #include <errno.h>
13442 #endif
13443 #ifndef NULL
13444 #define NULL (void*)0
13445 #endif
13446
13447 static void *task(p)
13448         void *p;
13449 {
13450         return (void *) (p == NULL);
13451 }
13452
13453
13454 int main(argc, argv)
13455         int argc;
13456         char **argv;
13457 {
13458
13459         /* pthread test function */
13460 #ifndef PTHREAD_CREATE_DETACHED
13461 #define PTHREAD_CREATE_DETACHED 1
13462 #endif
13463         pthread_t t;
13464         int status;
13465         int detach = PTHREAD_CREATE_DETACHED;
13466
13467 #if HAVE_PTHREADS > 4
13468         /* Final pthreads */
13469         pthread_attr_t attr;
13470
13471         status = pthread_attr_init(&attr);
13472         if( status ) return status;
13473
13474 #if HAVE_PTHREADS < 7
13475         status = pthread_attr_setdetachstate(&attr, &detach);
13476         if( status < 0 ) status = errno;
13477 #else
13478         status = pthread_attr_setdetachstate(&attr, detach);
13479 #endif
13480         if( status ) return status;
13481         status = pthread_create( &t, &attr, task, NULL );
13482 #if HAVE_PTHREADS < 7
13483         if( status < 0 ) status = errno;
13484 #endif
13485         if( status ) return status;
13486 #else
13487         /* Draft 4 pthreads */
13488         status = pthread_create( &t, pthread_attr_default, task, NULL );
13489         if( status ) return errno;
13490
13491         /* give thread a chance to complete */
13492         /* it should remain joinable and hence detachable */
13493         sleep( 1 );
13494
13495         status = pthread_detach( &t );
13496         if( status ) return errno;
13497 #endif
13498
13499 #ifdef HAVE_LINUX_THREADS
13500         pthread_kill_other_threads_np();
13501 #endif
13502
13503         return 0;
13504
13505 }
13506
13507 EOF
13508 if { (eval echo configure:13507: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13509 then
13510   ol_cv_pthread_lpthread_lmach_lexc=yes
13511 else
13512   echo "configure: failed program was:" >&5
13513   cat conftest.$ac_ext >&5
13514   rm -fr conftest*
13515   ol_cv_pthread_lpthread_lmach_lexc=no
13516 fi
13517 rm -fr conftest*
13518 fi
13519
13520
13521                 # restore the LIBS
13522                 LIBS="$ol_LIBS"
13523         
13524 fi
13525
13526 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc" 1>&6
13527
13528         if test $ol_cv_pthread_lpthread_lmach_lexc = yes ; then
13529                 ol_link_pthreads="-lpthread -lmach -lexc"
13530                 ol_link_threads=posix
13531         fi
13532 fi
13533
13534
13535                 # Pthread try link: -lpthread -Wl,-woff,85 (ol_cv_pthread_lib_lpthread_woff)
13536 if test "$ol_link_threads" = no ; then
13537         # try -lpthread -Wl,-woff,85
13538         echo $ac_n "checking for pthread link with -lpthread -Wl,-woff,85""... $ac_c" 1>&6
13539 echo "configure:13538: checking for pthread link with -lpthread -Wl,-woff,85" >&5
13540 if eval "test \"\${ol_cv_pthread_lib_lpthread_woff+set}\" = set"; then
13541   echo $ac_n "(cached) $ac_c" 1>&6
13542 else
13543   
13544                 # save the flags
13545                 ol_LIBS="$LIBS"
13546                 LIBS="-lpthread -Wl,-woff,85 $LIBS"
13547
13548                 if test "$cross_compiling" = yes; then
13549   cat > conftest.$ac_ext <<EOF
13550 #line 13549 "configure"
13551 #include "confdefs.h"
13552 /* pthread test headers */
13553 #include <pthread.h>
13554 #if HAVE_PTHREADS < 7
13555 #include <errno.h>
13556 #endif
13557 #ifndef NULL
13558 #define NULL (void*)0
13559 #endif
13560
13561 static void *task(p)
13562         void *p;
13563 {
13564         return (void *) (p == NULL);
13565 }
13566
13567 int main() {
13568
13569         /* pthread test function */
13570 #ifndef PTHREAD_CREATE_DETACHED
13571 #define PTHREAD_CREATE_DETACHED 1
13572 #endif
13573         pthread_t t;
13574         int status;
13575         int detach = PTHREAD_CREATE_DETACHED;
13576
13577 #if HAVE_PTHREADS > 4
13578         /* Final pthreads */
13579         pthread_attr_t attr;
13580
13581         status = pthread_attr_init(&attr);
13582         if( status ) return status;
13583
13584 #if HAVE_PTHREADS < 7
13585         status = pthread_attr_setdetachstate(&attr, &detach);
13586         if( status < 0 ) status = errno;
13587 #else
13588         status = pthread_attr_setdetachstate(&attr, detach);
13589 #endif
13590         if( status ) return status;
13591         status = pthread_create( &t, &attr, task, NULL );
13592 #if HAVE_PTHREADS < 7
13593         if( status < 0 ) status = errno;
13594 #endif
13595         if( status ) return status;
13596 #else
13597         /* Draft 4 pthreads */
13598         status = pthread_create( &t, pthread_attr_default, task, NULL );
13599         if( status ) return errno;
13600
13601         /* give thread a chance to complete */
13602         /* it should remain joinable and hence detachable */
13603         sleep( 1 );
13604
13605         status = pthread_detach( &t );
13606         if( status ) return errno;
13607 #endif
13608
13609 #ifdef HAVE_LINUX_THREADS
13610         pthread_kill_other_threads_np();
13611 #endif
13612
13613         return 0;
13614
13615 ; return 0; }
13616 EOF
13617 if { (eval echo configure:13616: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13618   rm -rf conftest*
13619   ol_cv_pthread_lib_lpthread_woff=yes
13620 else
13621   echo "configure: failed program was:" >&5
13622   cat conftest.$ac_ext >&5
13623   rm -rf conftest*
13624   ol_cv_pthread_lib_lpthread_woff=no
13625 fi
13626 rm -f conftest*
13627 else
13628   cat > conftest.$ac_ext <<EOF
13629 #line 13628 "configure"
13630 #include "confdefs.h"
13631 /* pthread test headers */
13632 #include <pthread.h>
13633 #if HAVE_PTHREADS < 7
13634 #include <errno.h>
13635 #endif
13636 #ifndef NULL
13637 #define NULL (void*)0
13638 #endif
13639
13640 static void *task(p)
13641         void *p;
13642 {
13643         return (void *) (p == NULL);
13644 }
13645
13646
13647 int main(argc, argv)
13648         int argc;
13649         char **argv;
13650 {
13651
13652         /* pthread test function */
13653 #ifndef PTHREAD_CREATE_DETACHED
13654 #define PTHREAD_CREATE_DETACHED 1
13655 #endif
13656         pthread_t t;
13657         int status;
13658         int detach = PTHREAD_CREATE_DETACHED;
13659
13660 #if HAVE_PTHREADS > 4
13661         /* Final pthreads */
13662         pthread_attr_t attr;
13663
13664         status = pthread_attr_init(&attr);
13665         if( status ) return status;
13666
13667 #if HAVE_PTHREADS < 7
13668         status = pthread_attr_setdetachstate(&attr, &detach);
13669         if( status < 0 ) status = errno;
13670 #else
13671         status = pthread_attr_setdetachstate(&attr, detach);
13672 #endif
13673         if( status ) return status;
13674         status = pthread_create( &t, &attr, task, NULL );
13675 #if HAVE_PTHREADS < 7
13676         if( status < 0 ) status = errno;
13677 #endif
13678         if( status ) return status;
13679 #else
13680         /* Draft 4 pthreads */
13681         status = pthread_create( &t, pthread_attr_default, task, NULL );
13682         if( status ) return errno;
13683
13684         /* give thread a chance to complete */
13685         /* it should remain joinable and hence detachable */
13686         sleep( 1 );
13687
13688         status = pthread_detach( &t );
13689         if( status ) return errno;
13690 #endif
13691
13692 #ifdef HAVE_LINUX_THREADS
13693         pthread_kill_other_threads_np();
13694 #endif
13695
13696         return 0;
13697
13698 }
13699
13700 EOF
13701 if { (eval echo configure:13700: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13702 then
13703   ol_cv_pthread_lib_lpthread_woff=yes
13704 else
13705   echo "configure: failed program was:" >&5
13706   cat conftest.$ac_ext >&5
13707   rm -fr conftest*
13708   ol_cv_pthread_lib_lpthread_woff=no
13709 fi
13710 rm -fr conftest*
13711 fi
13712
13713
13714                 # restore the LIBS
13715                 LIBS="$ol_LIBS"
13716         
13717 fi
13718
13719 echo "$ac_t""$ol_cv_pthread_lib_lpthread_woff" 1>&6
13720
13721         if test $ol_cv_pthread_lib_lpthread_woff = yes ; then
13722                 ol_link_pthreads="-lpthread -Wl,-woff,85"
13723                 ol_link_threads=posix
13724         fi
13725 fi
13726
13727
13728                 # Pthread try link: -lpthread (ol_cv_pthread_lpthread)
13729 if test "$ol_link_threads" = no ; then
13730         # try -lpthread
13731         echo $ac_n "checking for pthread link with -lpthread""... $ac_c" 1>&6
13732 echo "configure:13731: checking for pthread link with -lpthread" >&5
13733 if eval "test \"\${ol_cv_pthread_lpthread+set}\" = set"; then
13734   echo $ac_n "(cached) $ac_c" 1>&6
13735 else
13736   
13737                 # save the flags
13738                 ol_LIBS="$LIBS"
13739                 LIBS="-lpthread $LIBS"
13740
13741                 if test "$cross_compiling" = yes; then
13742   cat > conftest.$ac_ext <<EOF
13743 #line 13742 "configure"
13744 #include "confdefs.h"
13745 /* pthread test headers */
13746 #include <pthread.h>
13747 #if HAVE_PTHREADS < 7
13748 #include <errno.h>
13749 #endif
13750 #ifndef NULL
13751 #define NULL (void*)0
13752 #endif
13753
13754 static void *task(p)
13755         void *p;
13756 {
13757         return (void *) (p == NULL);
13758 }
13759
13760 int main() {
13761
13762         /* pthread test function */
13763 #ifndef PTHREAD_CREATE_DETACHED
13764 #define PTHREAD_CREATE_DETACHED 1
13765 #endif
13766         pthread_t t;
13767         int status;
13768         int detach = PTHREAD_CREATE_DETACHED;
13769
13770 #if HAVE_PTHREADS > 4
13771         /* Final pthreads */
13772         pthread_attr_t attr;
13773
13774         status = pthread_attr_init(&attr);
13775         if( status ) return status;
13776
13777 #if HAVE_PTHREADS < 7
13778         status = pthread_attr_setdetachstate(&attr, &detach);
13779         if( status < 0 ) status = errno;
13780 #else
13781         status = pthread_attr_setdetachstate(&attr, detach);
13782 #endif
13783         if( status ) return status;
13784         status = pthread_create( &t, &attr, task, NULL );
13785 #if HAVE_PTHREADS < 7
13786         if( status < 0 ) status = errno;
13787 #endif
13788         if( status ) return status;
13789 #else
13790         /* Draft 4 pthreads */
13791         status = pthread_create( &t, pthread_attr_default, task, NULL );
13792         if( status ) return errno;
13793
13794         /* give thread a chance to complete */
13795         /* it should remain joinable and hence detachable */
13796         sleep( 1 );
13797
13798         status = pthread_detach( &t );
13799         if( status ) return errno;
13800 #endif
13801
13802 #ifdef HAVE_LINUX_THREADS
13803         pthread_kill_other_threads_np();
13804 #endif
13805
13806         return 0;
13807
13808 ; return 0; }
13809 EOF
13810 if { (eval echo configure:13809: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13811   rm -rf conftest*
13812   ol_cv_pthread_lpthread=yes
13813 else
13814   echo "configure: failed program was:" >&5
13815   cat conftest.$ac_ext >&5
13816   rm -rf conftest*
13817   ol_cv_pthread_lpthread=no
13818 fi
13819 rm -f conftest*
13820 else
13821   cat > conftest.$ac_ext <<EOF
13822 #line 13821 "configure"
13823 #include "confdefs.h"
13824 /* pthread test headers */
13825 #include <pthread.h>
13826 #if HAVE_PTHREADS < 7
13827 #include <errno.h>
13828 #endif
13829 #ifndef NULL
13830 #define NULL (void*)0
13831 #endif
13832
13833 static void *task(p)
13834         void *p;
13835 {
13836         return (void *) (p == NULL);
13837 }
13838
13839
13840 int main(argc, argv)
13841         int argc;
13842         char **argv;
13843 {
13844
13845         /* pthread test function */
13846 #ifndef PTHREAD_CREATE_DETACHED
13847 #define PTHREAD_CREATE_DETACHED 1
13848 #endif
13849         pthread_t t;
13850         int status;
13851         int detach = PTHREAD_CREATE_DETACHED;
13852
13853 #if HAVE_PTHREADS > 4
13854         /* Final pthreads */
13855         pthread_attr_t attr;
13856
13857         status = pthread_attr_init(&attr);
13858         if( status ) return status;
13859
13860 #if HAVE_PTHREADS < 7
13861         status = pthread_attr_setdetachstate(&attr, &detach);
13862         if( status < 0 ) status = errno;
13863 #else
13864         status = pthread_attr_setdetachstate(&attr, detach);
13865 #endif
13866         if( status ) return status;
13867         status = pthread_create( &t, &attr, task, NULL );
13868 #if HAVE_PTHREADS < 7
13869         if( status < 0 ) status = errno;
13870 #endif
13871         if( status ) return status;
13872 #else
13873         /* Draft 4 pthreads */
13874         status = pthread_create( &t, pthread_attr_default, task, NULL );
13875         if( status ) return errno;
13876
13877         /* give thread a chance to complete */
13878         /* it should remain joinable and hence detachable */
13879         sleep( 1 );
13880
13881         status = pthread_detach( &t );
13882         if( status ) return errno;
13883 #endif
13884
13885 #ifdef HAVE_LINUX_THREADS
13886         pthread_kill_other_threads_np();
13887 #endif
13888
13889         return 0;
13890
13891 }
13892
13893 EOF
13894 if { (eval echo configure:13893: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13895 then
13896   ol_cv_pthread_lpthread=yes
13897 else
13898   echo "configure: failed program was:" >&5
13899   cat conftest.$ac_ext >&5
13900   rm -fr conftest*
13901   ol_cv_pthread_lpthread=no
13902 fi
13903 rm -fr conftest*
13904 fi
13905
13906
13907                 # restore the LIBS
13908                 LIBS="$ol_LIBS"
13909         
13910 fi
13911
13912 echo "$ac_t""$ol_cv_pthread_lpthread" 1>&6
13913
13914         if test $ol_cv_pthread_lpthread = yes ; then
13915                 ol_link_pthreads="-lpthread"
13916                 ol_link_threads=posix
13917         fi
13918 fi
13919
13920                 # Pthread try link: -lc_r (ol_cv_pthread_lc_r)
13921 if test "$ol_link_threads" = no ; then
13922         # try -lc_r
13923         echo $ac_n "checking for pthread link with -lc_r""... $ac_c" 1>&6
13924 echo "configure:13923: checking for pthread link with -lc_r" >&5
13925 if eval "test \"\${ol_cv_pthread_lc_r+set}\" = set"; then
13926   echo $ac_n "(cached) $ac_c" 1>&6
13927 else
13928   
13929                 # save the flags
13930                 ol_LIBS="$LIBS"
13931                 LIBS="-lc_r $LIBS"
13932
13933                 if test "$cross_compiling" = yes; then
13934   cat > conftest.$ac_ext <<EOF
13935 #line 13934 "configure"
13936 #include "confdefs.h"
13937 /* pthread test headers */
13938 #include <pthread.h>
13939 #if HAVE_PTHREADS < 7
13940 #include <errno.h>
13941 #endif
13942 #ifndef NULL
13943 #define NULL (void*)0
13944 #endif
13945
13946 static void *task(p)
13947         void *p;
13948 {
13949         return (void *) (p == NULL);
13950 }
13951
13952 int main() {
13953
13954         /* pthread test function */
13955 #ifndef PTHREAD_CREATE_DETACHED
13956 #define PTHREAD_CREATE_DETACHED 1
13957 #endif
13958         pthread_t t;
13959         int status;
13960         int detach = PTHREAD_CREATE_DETACHED;
13961
13962 #if HAVE_PTHREADS > 4
13963         /* Final pthreads */
13964         pthread_attr_t attr;
13965
13966         status = pthread_attr_init(&attr);
13967         if( status ) return status;
13968
13969 #if HAVE_PTHREADS < 7
13970         status = pthread_attr_setdetachstate(&attr, &detach);
13971         if( status < 0 ) status = errno;
13972 #else
13973         status = pthread_attr_setdetachstate(&attr, detach);
13974 #endif
13975         if( status ) return status;
13976         status = pthread_create( &t, &attr, task, NULL );
13977 #if HAVE_PTHREADS < 7
13978         if( status < 0 ) status = errno;
13979 #endif
13980         if( status ) return status;
13981 #else
13982         /* Draft 4 pthreads */
13983         status = pthread_create( &t, pthread_attr_default, task, NULL );
13984         if( status ) return errno;
13985
13986         /* give thread a chance to complete */
13987         /* it should remain joinable and hence detachable */
13988         sleep( 1 );
13989
13990         status = pthread_detach( &t );
13991         if( status ) return errno;
13992 #endif
13993
13994 #ifdef HAVE_LINUX_THREADS
13995         pthread_kill_other_threads_np();
13996 #endif
13997
13998         return 0;
13999
14000 ; return 0; }
14001 EOF
14002 if { (eval echo configure:14001: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14003   rm -rf conftest*
14004   ol_cv_pthread_lc_r=yes
14005 else
14006   echo "configure: failed program was:" >&5
14007   cat conftest.$ac_ext >&5
14008   rm -rf conftest*
14009   ol_cv_pthread_lc_r=no
14010 fi
14011 rm -f conftest*
14012 else
14013   cat > conftest.$ac_ext <<EOF
14014 #line 14013 "configure"
14015 #include "confdefs.h"
14016 /* pthread test headers */
14017 #include <pthread.h>
14018 #if HAVE_PTHREADS < 7
14019 #include <errno.h>
14020 #endif
14021 #ifndef NULL
14022 #define NULL (void*)0
14023 #endif
14024
14025 static void *task(p)
14026         void *p;
14027 {
14028         return (void *) (p == NULL);
14029 }
14030
14031
14032 int main(argc, argv)
14033         int argc;
14034         char **argv;
14035 {
14036
14037         /* pthread test function */
14038 #ifndef PTHREAD_CREATE_DETACHED
14039 #define PTHREAD_CREATE_DETACHED 1
14040 #endif
14041         pthread_t t;
14042         int status;
14043         int detach = PTHREAD_CREATE_DETACHED;
14044
14045 #if HAVE_PTHREADS > 4
14046         /* Final pthreads */
14047         pthread_attr_t attr;
14048
14049         status = pthread_attr_init(&attr);
14050         if( status ) return status;
14051
14052 #if HAVE_PTHREADS < 7
14053         status = pthread_attr_setdetachstate(&attr, &detach);
14054         if( status < 0 ) status = errno;
14055 #else
14056         status = pthread_attr_setdetachstate(&attr, detach);
14057 #endif
14058         if( status ) return status;
14059         status = pthread_create( &t, &attr, task, NULL );
14060 #if HAVE_PTHREADS < 7
14061         if( status < 0 ) status = errno;
14062 #endif
14063         if( status ) return status;
14064 #else
14065         /* Draft 4 pthreads */
14066         status = pthread_create( &t, pthread_attr_default, task, NULL );
14067         if( status ) return errno;
14068
14069         /* give thread a chance to complete */
14070         /* it should remain joinable and hence detachable */
14071         sleep( 1 );
14072
14073         status = pthread_detach( &t );
14074         if( status ) return errno;
14075 #endif
14076
14077 #ifdef HAVE_LINUX_THREADS
14078         pthread_kill_other_threads_np();
14079 #endif
14080
14081         return 0;
14082
14083 }
14084
14085 EOF
14086 if { (eval echo configure:14085: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14087 then
14088   ol_cv_pthread_lc_r=yes
14089 else
14090   echo "configure: failed program was:" >&5
14091   cat conftest.$ac_ext >&5
14092   rm -fr conftest*
14093   ol_cv_pthread_lc_r=no
14094 fi
14095 rm -fr conftest*
14096 fi
14097
14098
14099                 # restore the LIBS
14100                 LIBS="$ol_LIBS"
14101         
14102 fi
14103
14104 echo "$ac_t""$ol_cv_pthread_lc_r" 1>&6
14105
14106         if test $ol_cv_pthread_lc_r = yes ; then
14107                 ol_link_pthreads="-lc_r"
14108                 ol_link_threads=posix
14109         fi
14110 fi
14111
14112
14113                 # Pthread try link: -threads (ol_cv_pthread_threads)
14114 if test "$ol_link_threads" = no ; then
14115         # try -threads
14116         echo $ac_n "checking for pthread link with -threads""... $ac_c" 1>&6
14117 echo "configure:14116: checking for pthread link with -threads" >&5
14118 if eval "test \"\${ol_cv_pthread_threads+set}\" = set"; then
14119   echo $ac_n "(cached) $ac_c" 1>&6
14120 else
14121   
14122                 # save the flags
14123                 ol_LIBS="$LIBS"
14124                 LIBS="-threads $LIBS"
14125
14126                 if test "$cross_compiling" = yes; then
14127   cat > conftest.$ac_ext <<EOF
14128 #line 14127 "configure"
14129 #include "confdefs.h"
14130 /* pthread test headers */
14131 #include <pthread.h>
14132 #if HAVE_PTHREADS < 7
14133 #include <errno.h>
14134 #endif
14135 #ifndef NULL
14136 #define NULL (void*)0
14137 #endif
14138
14139 static void *task(p)
14140         void *p;
14141 {
14142         return (void *) (p == NULL);
14143 }
14144
14145 int main() {
14146
14147         /* pthread test function */
14148 #ifndef PTHREAD_CREATE_DETACHED
14149 #define PTHREAD_CREATE_DETACHED 1
14150 #endif
14151         pthread_t t;
14152         int status;
14153         int detach = PTHREAD_CREATE_DETACHED;
14154
14155 #if HAVE_PTHREADS > 4
14156         /* Final pthreads */
14157         pthread_attr_t attr;
14158
14159         status = pthread_attr_init(&attr);
14160         if( status ) return status;
14161
14162 #if HAVE_PTHREADS < 7
14163         status = pthread_attr_setdetachstate(&attr, &detach);
14164         if( status < 0 ) status = errno;
14165 #else
14166         status = pthread_attr_setdetachstate(&attr, detach);
14167 #endif
14168         if( status ) return status;
14169         status = pthread_create( &t, &attr, task, NULL );
14170 #if HAVE_PTHREADS < 7
14171         if( status < 0 ) status = errno;
14172 #endif
14173         if( status ) return status;
14174 #else
14175         /* Draft 4 pthreads */
14176         status = pthread_create( &t, pthread_attr_default, task, NULL );
14177         if( status ) return errno;
14178
14179         /* give thread a chance to complete */
14180         /* it should remain joinable and hence detachable */
14181         sleep( 1 );
14182
14183         status = pthread_detach( &t );
14184         if( status ) return errno;
14185 #endif
14186
14187 #ifdef HAVE_LINUX_THREADS
14188         pthread_kill_other_threads_np();
14189 #endif
14190
14191         return 0;
14192
14193 ; return 0; }
14194 EOF
14195 if { (eval echo configure:14194: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14196   rm -rf conftest*
14197   ol_cv_pthread_threads=yes
14198 else
14199   echo "configure: failed program was:" >&5
14200   cat conftest.$ac_ext >&5
14201   rm -rf conftest*
14202   ol_cv_pthread_threads=no
14203 fi
14204 rm -f conftest*
14205 else
14206   cat > conftest.$ac_ext <<EOF
14207 #line 14206 "configure"
14208 #include "confdefs.h"
14209 /* pthread test headers */
14210 #include <pthread.h>
14211 #if HAVE_PTHREADS < 7
14212 #include <errno.h>
14213 #endif
14214 #ifndef NULL
14215 #define NULL (void*)0
14216 #endif
14217
14218 static void *task(p)
14219         void *p;
14220 {
14221         return (void *) (p == NULL);
14222 }
14223
14224
14225 int main(argc, argv)
14226         int argc;
14227         char **argv;
14228 {
14229
14230         /* pthread test function */
14231 #ifndef PTHREAD_CREATE_DETACHED
14232 #define PTHREAD_CREATE_DETACHED 1
14233 #endif
14234         pthread_t t;
14235         int status;
14236         int detach = PTHREAD_CREATE_DETACHED;
14237
14238 #if HAVE_PTHREADS > 4
14239         /* Final pthreads */
14240         pthread_attr_t attr;
14241
14242         status = pthread_attr_init(&attr);
14243         if( status ) return status;
14244
14245 #if HAVE_PTHREADS < 7
14246         status = pthread_attr_setdetachstate(&attr, &detach);
14247         if( status < 0 ) status = errno;
14248 #else
14249         status = pthread_attr_setdetachstate(&attr, detach);
14250 #endif
14251         if( status ) return status;
14252         status = pthread_create( &t, &attr, task, NULL );
14253 #if HAVE_PTHREADS < 7
14254         if( status < 0 ) status = errno;
14255 #endif
14256         if( status ) return status;
14257 #else
14258         /* Draft 4 pthreads */
14259         status = pthread_create( &t, pthread_attr_default, task, NULL );
14260         if( status ) return errno;
14261
14262         /* give thread a chance to complete */
14263         /* it should remain joinable and hence detachable */
14264         sleep( 1 );
14265
14266         status = pthread_detach( &t );
14267         if( status ) return errno;
14268 #endif
14269
14270 #ifdef HAVE_LINUX_THREADS
14271         pthread_kill_other_threads_np();
14272 #endif
14273
14274         return 0;
14275
14276 }
14277
14278 EOF
14279 if { (eval echo configure:14278: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14280 then
14281   ol_cv_pthread_threads=yes
14282 else
14283   echo "configure: failed program was:" >&5
14284   cat conftest.$ac_ext >&5
14285   rm -fr conftest*
14286   ol_cv_pthread_threads=no
14287 fi
14288 rm -fr conftest*
14289 fi
14290
14291
14292                 # restore the LIBS
14293                 LIBS="$ol_LIBS"
14294         
14295 fi
14296
14297 echo "$ac_t""$ol_cv_pthread_threads" 1>&6
14298
14299         if test $ol_cv_pthread_threads = yes ; then
14300                 ol_link_pthreads="-threads"
14301                 ol_link_threads=posix
14302         fi
14303 fi
14304
14305
14306                 # Pthread try link: -lpthreads -lmach -lexc -lc_r (ol_cv_pthread_lpthreads_lmach_lexc_lc_r)
14307 if test "$ol_link_threads" = no ; then
14308         # try -lpthreads -lmach -lexc -lc_r
14309         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc -lc_r""... $ac_c" 1>&6
14310 echo "configure:14309: checking for pthread link with -lpthreads -lmach -lexc -lc_r" >&5
14311 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc_lc_r+set}\" = set"; then
14312   echo $ac_n "(cached) $ac_c" 1>&6
14313 else
14314   
14315                 # save the flags
14316                 ol_LIBS="$LIBS"
14317                 LIBS="-lpthreads -lmach -lexc -lc_r $LIBS"
14318
14319                 if test "$cross_compiling" = yes; then
14320   cat > conftest.$ac_ext <<EOF
14321 #line 14320 "configure"
14322 #include "confdefs.h"
14323 /* pthread test headers */
14324 #include <pthread.h>
14325 #if HAVE_PTHREADS < 7
14326 #include <errno.h>
14327 #endif
14328 #ifndef NULL
14329 #define NULL (void*)0
14330 #endif
14331
14332 static void *task(p)
14333         void *p;
14334 {
14335         return (void *) (p == NULL);
14336 }
14337
14338 int main() {
14339
14340         /* pthread test function */
14341 #ifndef PTHREAD_CREATE_DETACHED
14342 #define PTHREAD_CREATE_DETACHED 1
14343 #endif
14344         pthread_t t;
14345         int status;
14346         int detach = PTHREAD_CREATE_DETACHED;
14347
14348 #if HAVE_PTHREADS > 4
14349         /* Final pthreads */
14350         pthread_attr_t attr;
14351
14352         status = pthread_attr_init(&attr);
14353         if( status ) return status;
14354
14355 #if HAVE_PTHREADS < 7
14356         status = pthread_attr_setdetachstate(&attr, &detach);
14357         if( status < 0 ) status = errno;
14358 #else
14359         status = pthread_attr_setdetachstate(&attr, detach);
14360 #endif
14361         if( status ) return status;
14362         status = pthread_create( &t, &attr, task, NULL );
14363 #if HAVE_PTHREADS < 7
14364         if( status < 0 ) status = errno;
14365 #endif
14366         if( status ) return status;
14367 #else
14368         /* Draft 4 pthreads */
14369         status = pthread_create( &t, pthread_attr_default, task, NULL );
14370         if( status ) return errno;
14371
14372         /* give thread a chance to complete */
14373         /* it should remain joinable and hence detachable */
14374         sleep( 1 );
14375
14376         status = pthread_detach( &t );
14377         if( status ) return errno;
14378 #endif
14379
14380 #ifdef HAVE_LINUX_THREADS
14381         pthread_kill_other_threads_np();
14382 #endif
14383
14384         return 0;
14385
14386 ; return 0; }
14387 EOF
14388 if { (eval echo configure:14387: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14389   rm -rf conftest*
14390   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
14391 else
14392   echo "configure: failed program was:" >&5
14393   cat conftest.$ac_ext >&5
14394   rm -rf conftest*
14395   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
14396 fi
14397 rm -f conftest*
14398 else
14399   cat > conftest.$ac_ext <<EOF
14400 #line 14399 "configure"
14401 #include "confdefs.h"
14402 /* pthread test headers */
14403 #include <pthread.h>
14404 #if HAVE_PTHREADS < 7
14405 #include <errno.h>
14406 #endif
14407 #ifndef NULL
14408 #define NULL (void*)0
14409 #endif
14410
14411 static void *task(p)
14412         void *p;
14413 {
14414         return (void *) (p == NULL);
14415 }
14416
14417
14418 int main(argc, argv)
14419         int argc;
14420         char **argv;
14421 {
14422
14423         /* pthread test function */
14424 #ifndef PTHREAD_CREATE_DETACHED
14425 #define PTHREAD_CREATE_DETACHED 1
14426 #endif
14427         pthread_t t;
14428         int status;
14429         int detach = PTHREAD_CREATE_DETACHED;
14430
14431 #if HAVE_PTHREADS > 4
14432         /* Final pthreads */
14433         pthread_attr_t attr;
14434
14435         status = pthread_attr_init(&attr);
14436         if( status ) return status;
14437
14438 #if HAVE_PTHREADS < 7
14439         status = pthread_attr_setdetachstate(&attr, &detach);
14440         if( status < 0 ) status = errno;
14441 #else
14442         status = pthread_attr_setdetachstate(&attr, detach);
14443 #endif
14444         if( status ) return status;
14445         status = pthread_create( &t, &attr, task, NULL );
14446 #if HAVE_PTHREADS < 7
14447         if( status < 0 ) status = errno;
14448 #endif
14449         if( status ) return status;
14450 #else
14451         /* Draft 4 pthreads */
14452         status = pthread_create( &t, pthread_attr_default, task, NULL );
14453         if( status ) return errno;
14454
14455         /* give thread a chance to complete */
14456         /* it should remain joinable and hence detachable */
14457         sleep( 1 );
14458
14459         status = pthread_detach( &t );
14460         if( status ) return errno;
14461 #endif
14462
14463 #ifdef HAVE_LINUX_THREADS
14464         pthread_kill_other_threads_np();
14465 #endif
14466
14467         return 0;
14468
14469 }
14470
14471 EOF
14472 if { (eval echo configure:14471: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14473 then
14474   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
14475 else
14476   echo "configure: failed program was:" >&5
14477   cat conftest.$ac_ext >&5
14478   rm -fr conftest*
14479   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
14480 fi
14481 rm -fr conftest*
14482 fi
14483
14484
14485                 # restore the LIBS
14486                 LIBS="$ol_LIBS"
14487         
14488 fi
14489
14490 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc_lc_r" 1>&6
14491
14492         if test $ol_cv_pthread_lpthreads_lmach_lexc_lc_r = yes ; then
14493                 ol_link_pthreads="-lpthreads -lmach -lexc -lc_r"
14494                 ol_link_threads=posix
14495         fi
14496 fi
14497
14498                 # Pthread try link: -lpthreads -lmach -lexc (ol_cv_pthread_lpthreads_lmach_lexc)
14499 if test "$ol_link_threads" = no ; then
14500         # try -lpthreads -lmach -lexc
14501         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc""... $ac_c" 1>&6
14502 echo "configure:14501: checking for pthread link with -lpthreads -lmach -lexc" >&5
14503 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc+set}\" = set"; then
14504   echo $ac_n "(cached) $ac_c" 1>&6
14505 else
14506   
14507                 # save the flags
14508                 ol_LIBS="$LIBS"
14509                 LIBS="-lpthreads -lmach -lexc $LIBS"
14510
14511                 if test "$cross_compiling" = yes; then
14512   cat > conftest.$ac_ext <<EOF
14513 #line 14512 "configure"
14514 #include "confdefs.h"
14515 /* pthread test headers */
14516 #include <pthread.h>
14517 #if HAVE_PTHREADS < 7
14518 #include <errno.h>
14519 #endif
14520 #ifndef NULL
14521 #define NULL (void*)0
14522 #endif
14523
14524 static void *task(p)
14525         void *p;
14526 {
14527         return (void *) (p == NULL);
14528 }
14529
14530 int main() {
14531
14532         /* pthread test function */
14533 #ifndef PTHREAD_CREATE_DETACHED
14534 #define PTHREAD_CREATE_DETACHED 1
14535 #endif
14536         pthread_t t;
14537         int status;
14538         int detach = PTHREAD_CREATE_DETACHED;
14539
14540 #if HAVE_PTHREADS > 4
14541         /* Final pthreads */
14542         pthread_attr_t attr;
14543
14544         status = pthread_attr_init(&attr);
14545         if( status ) return status;
14546
14547 #if HAVE_PTHREADS < 7
14548         status = pthread_attr_setdetachstate(&attr, &detach);
14549         if( status < 0 ) status = errno;
14550 #else
14551         status = pthread_attr_setdetachstate(&attr, detach);
14552 #endif
14553         if( status ) return status;
14554         status = pthread_create( &t, &attr, task, NULL );
14555 #if HAVE_PTHREADS < 7
14556         if( status < 0 ) status = errno;
14557 #endif
14558         if( status ) return status;
14559 #else
14560         /* Draft 4 pthreads */
14561         status = pthread_create( &t, pthread_attr_default, task, NULL );
14562         if( status ) return errno;
14563
14564         /* give thread a chance to complete */
14565         /* it should remain joinable and hence detachable */
14566         sleep( 1 );
14567
14568         status = pthread_detach( &t );
14569         if( status ) return errno;
14570 #endif
14571
14572 #ifdef HAVE_LINUX_THREADS
14573         pthread_kill_other_threads_np();
14574 #endif
14575
14576         return 0;
14577
14578 ; return 0; }
14579 EOF
14580 if { (eval echo configure:14579: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14581   rm -rf conftest*
14582   ol_cv_pthread_lpthreads_lmach_lexc=yes
14583 else
14584   echo "configure: failed program was:" >&5
14585   cat conftest.$ac_ext >&5
14586   rm -rf conftest*
14587   ol_cv_pthread_lpthreads_lmach_lexc=no
14588 fi
14589 rm -f conftest*
14590 else
14591   cat > conftest.$ac_ext <<EOF
14592 #line 14591 "configure"
14593 #include "confdefs.h"
14594 /* pthread test headers */
14595 #include <pthread.h>
14596 #if HAVE_PTHREADS < 7
14597 #include <errno.h>
14598 #endif
14599 #ifndef NULL
14600 #define NULL (void*)0
14601 #endif
14602
14603 static void *task(p)
14604         void *p;
14605 {
14606         return (void *) (p == NULL);
14607 }
14608
14609
14610 int main(argc, argv)
14611         int argc;
14612         char **argv;
14613 {
14614
14615         /* pthread test function */
14616 #ifndef PTHREAD_CREATE_DETACHED
14617 #define PTHREAD_CREATE_DETACHED 1
14618 #endif
14619         pthread_t t;
14620         int status;
14621         int detach = PTHREAD_CREATE_DETACHED;
14622
14623 #if HAVE_PTHREADS > 4
14624         /* Final pthreads */
14625         pthread_attr_t attr;
14626
14627         status = pthread_attr_init(&attr);
14628         if( status ) return status;
14629
14630 #if HAVE_PTHREADS < 7
14631         status = pthread_attr_setdetachstate(&attr, &detach);
14632         if( status < 0 ) status = errno;
14633 #else
14634         status = pthread_attr_setdetachstate(&attr, detach);
14635 #endif
14636         if( status ) return status;
14637         status = pthread_create( &t, &attr, task, NULL );
14638 #if HAVE_PTHREADS < 7
14639         if( status < 0 ) status = errno;
14640 #endif
14641         if( status ) return status;
14642 #else
14643         /* Draft 4 pthreads */
14644         status = pthread_create( &t, pthread_attr_default, task, NULL );
14645         if( status ) return errno;
14646
14647         /* give thread a chance to complete */
14648         /* it should remain joinable and hence detachable */
14649         sleep( 1 );
14650
14651         status = pthread_detach( &t );
14652         if( status ) return errno;
14653 #endif
14654
14655 #ifdef HAVE_LINUX_THREADS
14656         pthread_kill_other_threads_np();
14657 #endif
14658
14659         return 0;
14660
14661 }
14662
14663 EOF
14664 if { (eval echo configure:14663: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14665 then
14666   ol_cv_pthread_lpthreads_lmach_lexc=yes
14667 else
14668   echo "configure: failed program was:" >&5
14669   cat conftest.$ac_ext >&5
14670   rm -fr conftest*
14671   ol_cv_pthread_lpthreads_lmach_lexc=no
14672 fi
14673 rm -fr conftest*
14674 fi
14675
14676
14677                 # restore the LIBS
14678                 LIBS="$ol_LIBS"
14679         
14680 fi
14681
14682 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc" 1>&6
14683
14684         if test $ol_cv_pthread_lpthreads_lmach_lexc = yes ; then
14685                 ol_link_pthreads="-lpthreads -lmach -lexc"
14686                 ol_link_threads=posix
14687         fi
14688 fi
14689
14690                 # Pthread try link: -lpthreads -lexc (ol_cv_pthread_lpthreads_lexc)
14691 if test "$ol_link_threads" = no ; then
14692         # try -lpthreads -lexc
14693         echo $ac_n "checking for pthread link with -lpthreads -lexc""... $ac_c" 1>&6
14694 echo "configure:14693: checking for pthread link with -lpthreads -lexc" >&5
14695 if eval "test \"\${ol_cv_pthread_lpthreads_lexc+set}\" = set"; then
14696   echo $ac_n "(cached) $ac_c" 1>&6
14697 else
14698   
14699                 # save the flags
14700                 ol_LIBS="$LIBS"
14701                 LIBS="-lpthreads -lexc $LIBS"
14702
14703                 if test "$cross_compiling" = yes; then
14704   cat > conftest.$ac_ext <<EOF
14705 #line 14704 "configure"
14706 #include "confdefs.h"
14707 /* pthread test headers */
14708 #include <pthread.h>
14709 #if HAVE_PTHREADS < 7
14710 #include <errno.h>
14711 #endif
14712 #ifndef NULL
14713 #define NULL (void*)0
14714 #endif
14715
14716 static void *task(p)
14717         void *p;
14718 {
14719         return (void *) (p == NULL);
14720 }
14721
14722 int main() {
14723
14724         /* pthread test function */
14725 #ifndef PTHREAD_CREATE_DETACHED
14726 #define PTHREAD_CREATE_DETACHED 1
14727 #endif
14728         pthread_t t;
14729         int status;
14730         int detach = PTHREAD_CREATE_DETACHED;
14731
14732 #if HAVE_PTHREADS > 4
14733         /* Final pthreads */
14734         pthread_attr_t attr;
14735
14736         status = pthread_attr_init(&attr);
14737         if( status ) return status;
14738
14739 #if HAVE_PTHREADS < 7
14740         status = pthread_attr_setdetachstate(&attr, &detach);
14741         if( status < 0 ) status = errno;
14742 #else
14743         status = pthread_attr_setdetachstate(&attr, detach);
14744 #endif
14745         if( status ) return status;
14746         status = pthread_create( &t, &attr, task, NULL );
14747 #if HAVE_PTHREADS < 7
14748         if( status < 0 ) status = errno;
14749 #endif
14750         if( status ) return status;
14751 #else
14752         /* Draft 4 pthreads */
14753         status = pthread_create( &t, pthread_attr_default, task, NULL );
14754         if( status ) return errno;
14755
14756         /* give thread a chance to complete */
14757         /* it should remain joinable and hence detachable */
14758         sleep( 1 );
14759
14760         status = pthread_detach( &t );
14761         if( status ) return errno;
14762 #endif
14763
14764 #ifdef HAVE_LINUX_THREADS
14765         pthread_kill_other_threads_np();
14766 #endif
14767
14768         return 0;
14769
14770 ; return 0; }
14771 EOF
14772 if { (eval echo configure:14771: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14773   rm -rf conftest*
14774   ol_cv_pthread_lpthreads_lexc=yes
14775 else
14776   echo "configure: failed program was:" >&5
14777   cat conftest.$ac_ext >&5
14778   rm -rf conftest*
14779   ol_cv_pthread_lpthreads_lexc=no
14780 fi
14781 rm -f conftest*
14782 else
14783   cat > conftest.$ac_ext <<EOF
14784 #line 14783 "configure"
14785 #include "confdefs.h"
14786 /* pthread test headers */
14787 #include <pthread.h>
14788 #if HAVE_PTHREADS < 7
14789 #include <errno.h>
14790 #endif
14791 #ifndef NULL
14792 #define NULL (void*)0
14793 #endif
14794
14795 static void *task(p)
14796         void *p;
14797 {
14798         return (void *) (p == NULL);
14799 }
14800
14801
14802 int main(argc, argv)
14803         int argc;
14804         char **argv;
14805 {
14806
14807         /* pthread test function */
14808 #ifndef PTHREAD_CREATE_DETACHED
14809 #define PTHREAD_CREATE_DETACHED 1
14810 #endif
14811         pthread_t t;
14812         int status;
14813         int detach = PTHREAD_CREATE_DETACHED;
14814
14815 #if HAVE_PTHREADS > 4
14816         /* Final pthreads */
14817         pthread_attr_t attr;
14818
14819         status = pthread_attr_init(&attr);
14820         if( status ) return status;
14821
14822 #if HAVE_PTHREADS < 7
14823         status = pthread_attr_setdetachstate(&attr, &detach);
14824         if( status < 0 ) status = errno;
14825 #else
14826         status = pthread_attr_setdetachstate(&attr, detach);
14827 #endif
14828         if( status ) return status;
14829         status = pthread_create( &t, &attr, task, NULL );
14830 #if HAVE_PTHREADS < 7
14831         if( status < 0 ) status = errno;
14832 #endif
14833         if( status ) return status;
14834 #else
14835         /* Draft 4 pthreads */
14836         status = pthread_create( &t, pthread_attr_default, task, NULL );
14837         if( status ) return errno;
14838
14839         /* give thread a chance to complete */
14840         /* it should remain joinable and hence detachable */
14841         sleep( 1 );
14842
14843         status = pthread_detach( &t );
14844         if( status ) return errno;
14845 #endif
14846
14847 #ifdef HAVE_LINUX_THREADS
14848         pthread_kill_other_threads_np();
14849 #endif
14850
14851         return 0;
14852
14853 }
14854
14855 EOF
14856 if { (eval echo configure:14855: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14857 then
14858   ol_cv_pthread_lpthreads_lexc=yes
14859 else
14860   echo "configure: failed program was:" >&5
14861   cat conftest.$ac_ext >&5
14862   rm -fr conftest*
14863   ol_cv_pthread_lpthreads_lexc=no
14864 fi
14865 rm -fr conftest*
14866 fi
14867
14868
14869                 # restore the LIBS
14870                 LIBS="$ol_LIBS"
14871         
14872 fi
14873
14874 echo "$ac_t""$ol_cv_pthread_lpthreads_lexc" 1>&6
14875
14876         if test $ol_cv_pthread_lpthreads_lexc = yes ; then
14877                 ol_link_pthreads="-lpthreads -lexc"
14878                 ol_link_threads=posix
14879         fi
14880 fi
14881
14882
14883                 # Pthread try link: -lpthreads (ol_cv_pthread_lib_lpthreads)
14884 if test "$ol_link_threads" = no ; then
14885         # try -lpthreads
14886         echo $ac_n "checking for pthread link with -lpthreads""... $ac_c" 1>&6
14887 echo "configure:14886: checking for pthread link with -lpthreads" >&5
14888 if eval "test \"\${ol_cv_pthread_lib_lpthreads+set}\" = set"; then
14889   echo $ac_n "(cached) $ac_c" 1>&6
14890 else
14891   
14892                 # save the flags
14893                 ol_LIBS="$LIBS"
14894                 LIBS="-lpthreads $LIBS"
14895
14896                 if test "$cross_compiling" = yes; then
14897   cat > conftest.$ac_ext <<EOF
14898 #line 14897 "configure"
14899 #include "confdefs.h"
14900 /* pthread test headers */
14901 #include <pthread.h>
14902 #if HAVE_PTHREADS < 7
14903 #include <errno.h>
14904 #endif
14905 #ifndef NULL
14906 #define NULL (void*)0
14907 #endif
14908
14909 static void *task(p)
14910         void *p;
14911 {
14912         return (void *) (p == NULL);
14913 }
14914
14915 int main() {
14916
14917         /* pthread test function */
14918 #ifndef PTHREAD_CREATE_DETACHED
14919 #define PTHREAD_CREATE_DETACHED 1
14920 #endif
14921         pthread_t t;
14922         int status;
14923         int detach = PTHREAD_CREATE_DETACHED;
14924
14925 #if HAVE_PTHREADS > 4
14926         /* Final pthreads */
14927         pthread_attr_t attr;
14928
14929         status = pthread_attr_init(&attr);
14930         if( status ) return status;
14931
14932 #if HAVE_PTHREADS < 7
14933         status = pthread_attr_setdetachstate(&attr, &detach);
14934         if( status < 0 ) status = errno;
14935 #else
14936         status = pthread_attr_setdetachstate(&attr, detach);
14937 #endif
14938         if( status ) return status;
14939         status = pthread_create( &t, &attr, task, NULL );
14940 #if HAVE_PTHREADS < 7
14941         if( status < 0 ) status = errno;
14942 #endif
14943         if( status ) return status;
14944 #else
14945         /* Draft 4 pthreads */
14946         status = pthread_create( &t, pthread_attr_default, task, NULL );
14947         if( status ) return errno;
14948
14949         /* give thread a chance to complete */
14950         /* it should remain joinable and hence detachable */
14951         sleep( 1 );
14952
14953         status = pthread_detach( &t );
14954         if( status ) return errno;
14955 #endif
14956
14957 #ifdef HAVE_LINUX_THREADS
14958         pthread_kill_other_threads_np();
14959 #endif
14960
14961         return 0;
14962
14963 ; return 0; }
14964 EOF
14965 if { (eval echo configure:14964: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14966   rm -rf conftest*
14967   ol_cv_pthread_lib_lpthreads=yes
14968 else
14969   echo "configure: failed program was:" >&5
14970   cat conftest.$ac_ext >&5
14971   rm -rf conftest*
14972   ol_cv_pthread_lib_lpthreads=no
14973 fi
14974 rm -f conftest*
14975 else
14976   cat > conftest.$ac_ext <<EOF
14977 #line 14976 "configure"
14978 #include "confdefs.h"
14979 /* pthread test headers */
14980 #include <pthread.h>
14981 #if HAVE_PTHREADS < 7
14982 #include <errno.h>
14983 #endif
14984 #ifndef NULL
14985 #define NULL (void*)0
14986 #endif
14987
14988 static void *task(p)
14989         void *p;
14990 {
14991         return (void *) (p == NULL);
14992 }
14993
14994
14995 int main(argc, argv)
14996         int argc;
14997         char **argv;
14998 {
14999
15000         /* pthread test function */
15001 #ifndef PTHREAD_CREATE_DETACHED
15002 #define PTHREAD_CREATE_DETACHED 1
15003 #endif
15004         pthread_t t;
15005         int status;
15006         int detach = PTHREAD_CREATE_DETACHED;
15007
15008 #if HAVE_PTHREADS > 4
15009         /* Final pthreads */
15010         pthread_attr_t attr;
15011
15012         status = pthread_attr_init(&attr);
15013         if( status ) return status;
15014
15015 #if HAVE_PTHREADS < 7
15016         status = pthread_attr_setdetachstate(&attr, &detach);
15017         if( status < 0 ) status = errno;
15018 #else
15019         status = pthread_attr_setdetachstate(&attr, detach);
15020 #endif
15021         if( status ) return status;
15022         status = pthread_create( &t, &attr, task, NULL );
15023 #if HAVE_PTHREADS < 7
15024         if( status < 0 ) status = errno;
15025 #endif
15026         if( status ) return status;
15027 #else
15028         /* Draft 4 pthreads */
15029         status = pthread_create( &t, pthread_attr_default, task, NULL );
15030         if( status ) return errno;
15031
15032         /* give thread a chance to complete */
15033         /* it should remain joinable and hence detachable */
15034         sleep( 1 );
15035
15036         status = pthread_detach( &t );
15037         if( status ) return errno;
15038 #endif
15039
15040 #ifdef HAVE_LINUX_THREADS
15041         pthread_kill_other_threads_np();
15042 #endif
15043
15044         return 0;
15045
15046 }
15047
15048 EOF
15049 if { (eval echo configure:15048: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
15050 then
15051   ol_cv_pthread_lib_lpthreads=yes
15052 else
15053   echo "configure: failed program was:" >&5
15054   cat conftest.$ac_ext >&5
15055   rm -fr conftest*
15056   ol_cv_pthread_lib_lpthreads=no
15057 fi
15058 rm -fr conftest*
15059 fi
15060
15061
15062                 # restore the LIBS
15063                 LIBS="$ol_LIBS"
15064         
15065 fi
15066
15067 echo "$ac_t""$ol_cv_pthread_lib_lpthreads" 1>&6
15068
15069         if test $ol_cv_pthread_lib_lpthreads = yes ; then
15070                 ol_link_pthreads="-lpthreads"
15071                 ol_link_threads=posix
15072         fi
15073 fi
15074
15075
15076                 if test $ol_link_threads != no ; then
15077                         LTHREAD_LIBS="$LTHREAD_LIBS $ol_link_pthreads"
15078
15079                                                 save_CPPFLAGS="$CPPFLAGS"
15080                         save_LIBS="$LIBS"
15081                         LIBS="$LTHREAD_LIBS $LIBS"
15082
15083                                                                                                 for ac_func in sched_yield pthread_yield thr_yield
15084 do
15085 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15086 echo "configure:15085: checking for $ac_func" >&5
15087 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15088   echo $ac_n "(cached) $ac_c" 1>&6
15089 else
15090   cat > conftest.$ac_ext <<EOF
15091 #line 15090 "configure"
15092 #include "confdefs.h"
15093 /* System header to define __stub macros and hopefully few prototypes,
15094     which can conflict with char $ac_func(); below.  */
15095 #include <assert.h>
15096 /* Override any gcc2 internal prototype to avoid an error.  */
15097 /* We use char because int might match the return type of a gcc2
15098     builtin and then its argument prototype would still apply.  */
15099 char $ac_func();
15100 char (*f)();
15101
15102 int main() {
15103
15104 /* The GNU C library defines this for functions which it implements
15105     to always fail with ENOSYS.  Some functions are actually named
15106     something starting with __ and the normal name is an alias.  */
15107 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15108 choke me
15109 #else
15110 f = $ac_func;
15111 #endif
15112
15113 ; return 0; }
15114 EOF
15115 if { (eval echo configure:15114: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15116   rm -rf conftest*
15117   eval "ac_cv_func_$ac_func=yes"
15118 else
15119   echo "configure: failed program was:" >&5
15120   cat conftest.$ac_ext >&5
15121   rm -rf conftest*
15122   eval "ac_cv_func_$ac_func=no"
15123 fi
15124 rm -f conftest*
15125 fi
15126
15127 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15128   echo "$ac_t""yes" 1>&6
15129     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15130   cat >> confdefs.h <<EOF
15131 #define $ac_tr_func 1
15132 EOF
15133  
15134 else
15135   echo "$ac_t""no" 1>&6
15136 fi
15137 done
15138
15139
15140                         if test $ac_cv_func_sched_yield = no -a \
15141                                 $ac_cv_func_pthread_yield = no -a \
15142                                 $ac_cv_func_thr_yield = no ; then
15143                                                                 echo $ac_n "checking for sched_yield in -lrt""... $ac_c" 1>&6
15144 echo "configure:15143: checking for sched_yield in -lrt" >&5
15145 ac_lib_var=`echo rt'_'sched_yield | sed 'y%./+-:%__p__%'`
15146 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
15147   echo $ac_n "(cached) $ac_c" 1>&6
15148 else
15149   ac_save_LIBS="$LIBS"
15150 LIBS="-lrt  $LIBS"
15151 cat > conftest.$ac_ext <<EOF
15152 #line 15151 "configure"
15153 #include "confdefs.h"
15154 /* Override any gcc2 internal prototype to avoid an error.  */
15155 /* We use char because int might match the return type of a gcc2
15156     builtin and then its argument prototype would still apply.  */
15157 char sched_yield();
15158
15159 int main() {
15160 sched_yield()
15161 ; return 0; }
15162 EOF
15163 if { (eval echo configure:15162: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15164   rm -rf conftest*
15165   eval "ac_cv_lib_$ac_lib_var=yes"
15166 else
15167   echo "configure: failed program was:" >&5
15168   cat conftest.$ac_ext >&5
15169   rm -rf conftest*
15170   eval "ac_cv_lib_$ac_lib_var=no"
15171 fi
15172 rm -f conftest*
15173 LIBS="$ac_save_LIBS"
15174
15175 fi
15176 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
15177   echo "$ac_t""yes" 1>&6
15178   LTHREAD_LIBS="$LTHREAD_LIBS -lrt"
15179                                         cat >> confdefs.h <<\EOF
15180 #define HAVE_SCHED_YIELD 1
15181 EOF
15182
15183                                         ac_cv_func_sched_yield=yes
15184 else
15185   echo "$ac_t""no" 1>&6
15186 ac_cv_func_sched_yield=no
15187 fi
15188
15189                         fi
15190                         if test $ac_cv_func_sched_yield = no -a \
15191                                 $ac_cv_func_pthread_yield = no -a \
15192                                 "$ac_cv_func_thr_yield" = no ; then
15193                                 echo "configure: warning: could not locate sched_yield() or pthread_yield()" 1>&2
15194                         fi
15195
15196                                                 for ac_func in pthread_kill pthread_rwlock_destroy
15197 do
15198 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15199 echo "configure:15198: checking for $ac_func" >&5
15200 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15201   echo $ac_n "(cached) $ac_c" 1>&6
15202 else
15203   cat > conftest.$ac_ext <<EOF
15204 #line 15203 "configure"
15205 #include "confdefs.h"
15206 /* System header to define __stub macros and hopefully few prototypes,
15207     which can conflict with char $ac_func(); below.  */
15208 #include <assert.h>
15209 /* Override any gcc2 internal prototype to avoid an error.  */
15210 /* We use char because int might match the return type of a gcc2
15211     builtin and then its argument prototype would still apply.  */
15212 char $ac_func();
15213 char (*f)();
15214
15215 int main() {
15216
15217 /* The GNU C library defines this for functions which it implements
15218     to always fail with ENOSYS.  Some functions are actually named
15219     something starting with __ and the normal name is an alias.  */
15220 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15221 choke me
15222 #else
15223 f = $ac_func;
15224 #endif
15225
15226 ; return 0; }
15227 EOF
15228 if { (eval echo configure:15227: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15229   rm -rf conftest*
15230   eval "ac_cv_func_$ac_func=yes"
15231 else
15232   echo "configure: failed program was:" >&5
15233   cat conftest.$ac_ext >&5
15234   rm -rf conftest*
15235   eval "ac_cv_func_$ac_func=no"
15236 fi
15237 rm -f conftest*
15238 fi
15239
15240 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15241   echo "$ac_t""yes" 1>&6
15242     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15243   cat >> confdefs.h <<EOF
15244 #define $ac_tr_func 1
15245 EOF
15246  
15247 else
15248   echo "$ac_t""no" 1>&6
15249 fi
15250 done
15251
15252
15253                                                                         echo $ac_n "checking for pthread_detach with <pthread.h>""... $ac_c" 1>&6
15254 echo "configure:15253: checking for pthread_detach with <pthread.h>" >&5
15255 if eval "test \"\${ol_cv_func_pthread_detach+set}\" = set"; then
15256   echo $ac_n "(cached) $ac_c" 1>&6
15257 else
15258   
15259                                                                 cat > conftest.$ac_ext <<EOF
15260 #line 15259 "configure"
15261 #include "confdefs.h"
15262
15263 #include <pthread.h>
15264 #ifndef NULL
15265 #define NULL (void*)0
15266 #endif
15267
15268 int main() {
15269 pthread_detach(NULL);
15270 ; return 0; }
15271 EOF
15272 if { (eval echo configure:15271: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15273   rm -rf conftest*
15274   ol_cv_func_pthread_detach=yes
15275 else
15276   echo "configure: failed program was:" >&5
15277   cat conftest.$ac_ext >&5
15278   rm -rf conftest*
15279   ol_cv_func_pthread_detach=no
15280 fi
15281 rm -f conftest*
15282                         
15283 fi
15284
15285 echo "$ac_t""$ol_cv_func_pthread_detach" 1>&6
15286
15287                         if test $ol_cv_func_pthread_detach = no ; then
15288                                 { echo "configure: error: could not locate pthread_detach()" 1>&2; exit 1; }
15289                         fi
15290
15291                         cat >> confdefs.h <<\EOF
15292 #define HAVE_PTHREAD_DETACH 1
15293 EOF
15294
15295
15296                                                 for ac_func in \
15297                                 pthread_setconcurrency \
15298                                 pthread_getconcurrency \
15299                                 thr_setconcurrency \
15300                                 thr_getconcurrency \
15301                         
15302 do
15303 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15304 echo "configure:15303: checking for $ac_func" >&5
15305 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15306   echo $ac_n "(cached) $ac_c" 1>&6
15307 else
15308   cat > conftest.$ac_ext <<EOF
15309 #line 15308 "configure"
15310 #include "confdefs.h"
15311 /* System header to define __stub macros and hopefully few prototypes,
15312     which can conflict with char $ac_func(); below.  */
15313 #include <assert.h>
15314 /* Override any gcc2 internal prototype to avoid an error.  */
15315 /* We use char because int might match the return type of a gcc2
15316     builtin and then its argument prototype would still apply.  */
15317 char $ac_func();
15318 char (*f)();
15319
15320 int main() {
15321
15322 /* The GNU C library defines this for functions which it implements
15323     to always fail with ENOSYS.  Some functions are actually named
15324     something starting with __ and the normal name is an alias.  */
15325 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15326 choke me
15327 #else
15328 f = $ac_func;
15329 #endif
15330
15331 ; return 0; }
15332 EOF
15333 if { (eval echo configure:15332: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15334   rm -rf conftest*
15335   eval "ac_cv_func_$ac_func=yes"
15336 else
15337   echo "configure: failed program was:" >&5
15338   cat conftest.$ac_ext >&5
15339   rm -rf conftest*
15340   eval "ac_cv_func_$ac_func=no"
15341 fi
15342 rm -f conftest*
15343 fi
15344
15345 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15346   echo "$ac_t""yes" 1>&6
15347     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15348   cat >> confdefs.h <<EOF
15349 #define $ac_tr_func 1
15350 EOF
15351  
15352 else
15353   echo "$ac_t""no" 1>&6
15354 fi
15355 done
15356
15357
15358                         
15359         for ac_func in pthread_kill_other_threads_np
15360 do
15361 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15362 echo "configure:15361: checking for $ac_func" >&5
15363 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15364   echo $ac_n "(cached) $ac_c" 1>&6
15365 else
15366   cat > conftest.$ac_ext <<EOF
15367 #line 15366 "configure"
15368 #include "confdefs.h"
15369 /* System header to define __stub macros and hopefully few prototypes,
15370     which can conflict with char $ac_func(); below.  */
15371 #include <assert.h>
15372 /* Override any gcc2 internal prototype to avoid an error.  */
15373 /* We use char because int might match the return type of a gcc2
15374     builtin and then its argument prototype would still apply.  */
15375 char $ac_func();
15376 char (*f)();
15377
15378 int main() {
15379
15380 /* The GNU C library defines this for functions which it implements
15381     to always fail with ENOSYS.  Some functions are actually named
15382     something starting with __ and the normal name is an alias.  */
15383 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15384 choke me
15385 #else
15386 f = $ac_func;
15387 #endif
15388
15389 ; return 0; }
15390 EOF
15391 if { (eval echo configure:15390: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15392   rm -rf conftest*
15393   eval "ac_cv_func_$ac_func=yes"
15394 else
15395   echo "configure: failed program was:" >&5
15396   cat conftest.$ac_ext >&5
15397   rm -rf conftest*
15398   eval "ac_cv_func_$ac_func=no"
15399 fi
15400 rm -f conftest*
15401 fi
15402
15403 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15404   echo "$ac_t""yes" 1>&6
15405     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15406   cat >> confdefs.h <<EOF
15407 #define $ac_tr_func 1
15408 EOF
15409  
15410 else
15411   echo "$ac_t""no" 1>&6
15412 fi
15413 done
15414
15415         echo $ac_n "checking for LinuxThreads implementation""... $ac_c" 1>&6
15416 echo "configure:15415: checking for LinuxThreads implementation" >&5
15417 if eval "test \"\${ol_cv_sys_linux_threads+set}\" = set"; then
15418   echo $ac_n "(cached) $ac_c" 1>&6
15419 else
15420   ol_cv_sys_linux_threads=$ac_cv_func_pthread_kill_other_threads_np
15421 fi
15422
15423 echo "$ac_t""$ol_cv_sys_linux_threads" 1>&6
15424
15425                         
15426         
15427         
15428         echo $ac_n "checking for LinuxThreads consistency""... $ac_c" 1>&6
15429 echo "configure:15428: checking for LinuxThreads consistency" >&5
15430 if eval "test \"\${ol_cv_linux_threads+set}\" = set"; then
15431   echo $ac_n "(cached) $ac_c" 1>&6
15432 else
15433   
15434                 if test $ol_cv_header_linux_threads = yes -a \
15435                         $ol_cv_sys_linux_threads = yes; then
15436                         ol_cv_linux_threads=yes
15437                 elif test $ol_cv_header_linux_threads = no -a \
15438                         $ol_cv_sys_linux_threads = no; then
15439                         ol_cv_linux_threads=no
15440                 else
15441                         ol_cv_linux_threads=error
15442                 fi
15443         
15444 fi
15445
15446 echo "$ac_t""$ol_cv_linux_threads" 1>&6
15447
15448
15449                         if test $ol_cv_linux_threads = error; then
15450                                 { echo "configure: error: LinuxThreads header/library mismatch" 1>&2; exit 1; };
15451                         fi
15452
15453                         echo $ac_n "checking if pthread_create() works""... $ac_c" 1>&6
15454 echo "configure:15453: checking if pthread_create() works" >&5
15455 if eval "test \"\${ol_cv_pthread_create_works+set}\" = set"; then
15456   echo $ac_n "(cached) $ac_c" 1>&6
15457 else
15458   
15459                         if test "$cross_compiling" = yes; then
15460                                 ol_cv_pthread_create_works=yes
15461 else
15462   cat > conftest.$ac_ext <<EOF
15463 #line 15462 "configure"
15464 #include "confdefs.h"
15465 /* pthread test headers */
15466 #include <pthread.h>
15467 #if HAVE_PTHREADS < 7
15468 #include <errno.h>
15469 #endif
15470 #ifndef NULL
15471 #define NULL (void*)0
15472 #endif
15473
15474 static void *task(p)
15475         void *p;
15476 {
15477         return (void *) (p == NULL);
15478 }
15479
15480
15481 int main(argc, argv)
15482         int argc;
15483         char **argv;
15484 {
15485
15486         /* pthread test function */
15487 #ifndef PTHREAD_CREATE_DETACHED
15488 #define PTHREAD_CREATE_DETACHED 1
15489 #endif
15490         pthread_t t;
15491         int status;
15492         int detach = PTHREAD_CREATE_DETACHED;
15493
15494 #if HAVE_PTHREADS > 4
15495         /* Final pthreads */
15496         pthread_attr_t attr;
15497
15498         status = pthread_attr_init(&attr);
15499         if( status ) return status;
15500
15501 #if HAVE_PTHREADS < 7
15502         status = pthread_attr_setdetachstate(&attr, &detach);
15503         if( status < 0 ) status = errno;
15504 #else
15505         status = pthread_attr_setdetachstate(&attr, detach);
15506 #endif
15507         if( status ) return status;
15508         status = pthread_create( &t, &attr, task, NULL );
15509 #if HAVE_PTHREADS < 7
15510         if( status < 0 ) status = errno;
15511 #endif
15512         if( status ) return status;
15513 #else
15514         /* Draft 4 pthreads */
15515         status = pthread_create( &t, pthread_attr_default, task, NULL );
15516         if( status ) return errno;
15517
15518         /* give thread a chance to complete */
15519         /* it should remain joinable and hence detachable */
15520         sleep( 1 );
15521
15522         status = pthread_detach( &t );
15523         if( status ) return errno;
15524 #endif
15525
15526 #ifdef HAVE_LINUX_THREADS
15527         pthread_kill_other_threads_np();
15528 #endif
15529
15530         return 0;
15531
15532 }
15533
15534 EOF
15535 if { (eval echo configure:15534: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
15536 then
15537   ol_cv_pthread_create_works=yes
15538 else
15539   echo "configure: failed program was:" >&5
15540   cat conftest.$ac_ext >&5
15541   rm -fr conftest*
15542   ol_cv_pthread_create_works=no
15543 fi
15544 rm -fr conftest*
15545 fi
15546
15547 fi
15548
15549 echo "$ac_t""$ol_cv_pthread_create_works" 1>&6
15550
15551                         if test $ol_cv_pthread_create_works = no ; then
15552                                 { echo "configure: error: pthread_create is not usable, check environment settings" 1>&2; exit 1; }
15553                         fi
15554
15555                                                 if test $ol_with_yielding_select = auto ; then
15556                                 echo $ac_n "checking if select yields when using pthreads""... $ac_c" 1>&6
15557 echo "configure:15556: checking if select yields when using pthreads" >&5
15558 if eval "test \"\${ol_cv_pthread_select_yields+set}\" = set"; then
15559   echo $ac_n "(cached) $ac_c" 1>&6
15560 else
15561   
15562                                 if test "$cross_compiling" = yes; then
15563   ol_cv_pthread_select_yields=cross
15564 else
15565   cat > conftest.$ac_ext <<EOF
15566 #line 15565 "configure"
15567 #include "confdefs.h"
15568
15569 #include <sys/types.h>
15570 #include <sys/time.h>
15571 #include <unistd.h>
15572 #include <pthread.h>
15573 #ifndef NULL
15574 #define NULL (void*) 0
15575 #endif
15576
15577 static int fildes[2];
15578
15579 static void *task(p)
15580         void *p;
15581 {
15582         int i;
15583         struct timeval tv;
15584
15585         fd_set rfds;
15586
15587         tv.tv_sec=10;
15588         tv.tv_usec=0;
15589
15590         FD_ZERO(&rfds);
15591         FD_SET(fildes[0], &rfds);
15592
15593         /* we're not interested in any fds */
15594         i = select(FD_SETSIZE, &rfds, NULL, NULL, &tv);
15595
15596         if(i < 0) {
15597                 perror("select");
15598                 exit(10);
15599         }
15600
15601         exit(0); /* if we exit here, the select blocked the whole process */
15602 }
15603
15604 int main(argc, argv)
15605         int argc;
15606         char **argv;
15607 {
15608         pthread_t t;
15609
15610         /* create a pipe to select */
15611         if(pipe(&fildes[0])) {
15612                 perror("select");
15613                 exit(1);
15614         }
15615
15616 #ifdef HAVE_PTHREAD_SETCONCURRENCY
15617         (void) pthread_setconcurrency(2);
15618 #else
15619 #ifdef HAVE_THR_SETCONCURRENCY
15620         /* Set Solaris LWP concurrency to 2 */
15621         thr_setconcurrency(2);
15622 #endif
15623 #endif
15624
15625 #if HAVE_PTHREADS < 6
15626         pthread_create(&t, pthread_attr_default, task, NULL);
15627 #else
15628         pthread_create(&t, NULL, task, NULL);
15629 #endif
15630
15631         /* make sure task runs first */
15632 #if HAVE_THR_YIELD
15633         thr_yield();
15634 #elif defined( HAVE_SCHED_YIELD )
15635         sched_yield();
15636 #elif defined( HAVE_PTHREAD_YIELD )
15637         pthread_yield();
15638 #endif
15639
15640         exit(2);
15641 }
15642 EOF
15643 if { (eval echo configure:15642: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
15644 then
15645   ol_cv_pthread_select_yields=no
15646 else
15647   echo "configure: failed program was:" >&5
15648   cat conftest.$ac_ext >&5
15649   rm -fr conftest*
15650   ol_cv_pthread_select_yields=yes
15651 fi
15652 rm -fr conftest*
15653 fi
15654
15655 fi
15656
15657 echo "$ac_t""$ol_cv_pthread_select_yields" 1>&6
15658
15659                                 if test $ol_cv_pthread_select_yields = cross ; then
15660                                         { echo "configure: error: crossing compiling: use --with-yielding_select=yes|no|manual" 1>&2; exit 1; }
15661                                 fi
15662
15663                                 if test $ol_cv_pthread_select_yields = yes ; then
15664                                         ol_with_yielding_select=yes
15665                                 fi
15666                         fi
15667
15668                                                 CPPFLAGS="$save_CPPFLAGS"
15669                         LIBS="$save_LIBS"
15670                 else
15671                         { echo "configure: error: could not locate usable POSIX Threads" 1>&2; exit 1; }
15672                 fi
15673         fi
15674
15675         if test $ol_with_threads = posix ; then
15676                 { echo "configure: error: could not locate POSIX Threads" 1>&2; exit 1; }
15677         fi
15678 fi
15679
15680 if test $ol_with_threads = auto -o $ol_with_threads = yes \
15681         -o $ol_with_threads = mach ; then
15682
15683                 for ac_hdr in mach/cthreads.h cthreads.h
15684 do
15685 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15686 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15687 echo "configure:15686: checking for $ac_hdr" >&5
15688 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15689   echo $ac_n "(cached) $ac_c" 1>&6
15690 else
15691   cat > conftest.$ac_ext <<EOF
15692 #line 15691 "configure"
15693 #include "confdefs.h"
15694 #include <$ac_hdr>
15695 EOF
15696 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15697 { (eval echo configure:15696: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15698 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15699 if test -z "$ac_err"; then
15700   rm -rf conftest*
15701   eval "ac_cv_header_$ac_safe=yes"
15702 else
15703   echo "$ac_err" >&5
15704   echo "configure: failed program was:" >&5
15705   cat conftest.$ac_ext >&5
15706   rm -rf conftest*
15707   eval "ac_cv_header_$ac_safe=no"
15708 fi
15709 rm -f conftest*
15710 fi
15711 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15712   echo "$ac_t""yes" 1>&6
15713     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15714   cat >> confdefs.h <<EOF
15715 #define $ac_tr_hdr 1
15716 EOF
15717  
15718 else
15719   echo "$ac_t""no" 1>&6
15720 fi
15721 done
15722
15723         if test $ac_cv_header_mach_cthreads_h = yes ; then
15724                 ol_with_threads=found
15725
15726                                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
15727 echo "configure:15726: checking for cthread_fork" >&5
15728 if eval "test \"\${ac_cv_func_cthread_fork+set}\" = set"; then
15729   echo $ac_n "(cached) $ac_c" 1>&6
15730 else
15731   cat > conftest.$ac_ext <<EOF
15732 #line 15731 "configure"
15733 #include "confdefs.h"
15734 /* System header to define __stub macros and hopefully few prototypes,
15735     which can conflict with char cthread_fork(); below.  */
15736 #include <assert.h>
15737 /* Override any gcc2 internal prototype to avoid an error.  */
15738 /* We use char because int might match the return type of a gcc2
15739     builtin and then its argument prototype would still apply.  */
15740 char cthread_fork();
15741 char (*f)();
15742
15743 int main() {
15744
15745 /* The GNU C library defines this for functions which it implements
15746     to always fail with ENOSYS.  Some functions are actually named
15747     something starting with __ and the normal name is an alias.  */
15748 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
15749 choke me
15750 #else
15751 f = cthread_fork;
15752 #endif
15753
15754 ; return 0; }
15755 EOF
15756 if { (eval echo configure:15755: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15757   rm -rf conftest*
15758   eval "ac_cv_func_cthread_fork=yes"
15759 else
15760   echo "configure: failed program was:" >&5
15761   cat conftest.$ac_ext >&5
15762   rm -rf conftest*
15763   eval "ac_cv_func_cthread_fork=no"
15764 fi
15765 rm -f conftest*
15766 fi
15767
15768 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
15769   echo "$ac_t""yes" 1>&6
15770   ol_link_threads=yes
15771 else
15772   echo "$ac_t""no" 1>&6
15773 fi
15774
15775
15776                 if test $ol_link_threads = no ; then
15777                                                                         echo $ac_n "checking for cthread_fork with -all_load""... $ac_c" 1>&6
15778 echo "configure:15777: checking for cthread_fork with -all_load" >&5
15779 if eval "test \"\${ol_cv_cthread_all_load+set}\" = set"; then
15780   echo $ac_n "(cached) $ac_c" 1>&6
15781 else
15782   
15783                                                                 save_LIBS="$LIBS"
15784                                 LIBS="-all_load $LIBS"
15785                                 cat > conftest.$ac_ext <<EOF
15786 #line 15785 "configure"
15787 #include "confdefs.h"
15788 #include <mach/cthreads.h>
15789 int main() {
15790
15791                                         cthread_fork((void *)0, (void *)0);
15792                                         
15793 ; return 0; }
15794 EOF
15795 if { (eval echo configure:15794: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15796   rm -rf conftest*
15797   ol_cv_cthread_all_load=yes
15798 else
15799   echo "configure: failed program was:" >&5
15800   cat conftest.$ac_ext >&5
15801   rm -rf conftest*
15802   ol_cv_cthread_all_load=no
15803 fi
15804 rm -f conftest*
15805                                                                 LIBS="$save_LIBS"
15806                         
15807 fi
15808
15809 echo "$ac_t""$ol_cv_cthread_all_load" 1>&6
15810
15811                         if test $ol_cv_cthread_all_load = yes ; then
15812                                 LTHREAD_LIBS="$LTHREAD_LIBS -all_load"
15813                                 ol_link_threads=mach
15814                                 ol_with_threads=found
15815                         fi
15816                 fi
15817
15818         elif test $ac_cv_header_cthreads_h = yes ; then
15819                                 
15820                 ol_with_threads=found
15821  
15822                                 save_LIBS="$LIBS"
15823                 LIBS="$LIBS -lthreads"
15824                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
15825 echo "configure:15824: checking for cthread_fork" >&5
15826 if eval "test \"\${ac_cv_func_cthread_fork+set}\" = set"; then
15827   echo $ac_n "(cached) $ac_c" 1>&6
15828 else
15829   cat > conftest.$ac_ext <<EOF
15830 #line 15829 "configure"
15831 #include "confdefs.h"
15832 /* System header to define __stub macros and hopefully few prototypes,
15833     which can conflict with char cthread_fork(); below.  */
15834 #include <assert.h>
15835 /* Override any gcc2 internal prototype to avoid an error.  */
15836 /* We use char because int might match the return type of a gcc2
15837     builtin and then its argument prototype would still apply.  */
15838 char cthread_fork();
15839 char (*f)();
15840
15841 int main() {
15842
15843 /* The GNU C library defines this for functions which it implements
15844     to always fail with ENOSYS.  Some functions are actually named
15845     something starting with __ and the normal name is an alias.  */
15846 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
15847 choke me
15848 #else
15849 f = cthread_fork;
15850 #endif
15851
15852 ; return 0; }
15853 EOF
15854 if { (eval echo configure:15853: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15855   rm -rf conftest*
15856   eval "ac_cv_func_cthread_fork=yes"
15857 else
15858   echo "configure: failed program was:" >&5
15859   cat conftest.$ac_ext >&5
15860   rm -rf conftest*
15861   eval "ac_cv_func_cthread_fork=no"
15862 fi
15863 rm -f conftest*
15864 fi
15865
15866 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
15867   echo "$ac_t""yes" 1>&6
15868   ol_link_threads=yes
15869 else
15870   echo "$ac_t""no" 1>&6
15871 fi
15872
15873                 LIBS="$save_LIBS"
15874
15875                 if test $ol_link_threads = yes ; then
15876                         LTHREAD_LIBS="-lthreads"
15877                         ol_link_threads=mach
15878                         ol_with_threads=found
15879                 else
15880                         { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
15881                 fi
15882
15883         elif test $ol_with_threads = mach ; then
15884                 { echo "configure: error: could not locate Mach CThreads" 1>&2; exit 1; }
15885         fi
15886
15887         if test $ol_link_threads = mach ; then
15888                 cat >> confdefs.h <<\EOF
15889 #define HAVE_MACH_CTHREADS 1
15890 EOF
15891
15892         elif test $ol_with_threads = found ; then
15893                 { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
15894         fi
15895 fi
15896
15897 if test $ol_with_threads = auto -o $ol_with_threads = yes \
15898         -o $ol_with_threads = pth ; then
15899
15900         for ac_hdr in pth.h
15901 do
15902 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15903 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15904 echo "configure:15903: checking for $ac_hdr" >&5
15905 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15906   echo $ac_n "(cached) $ac_c" 1>&6
15907 else
15908   cat > conftest.$ac_ext <<EOF
15909 #line 15908 "configure"
15910 #include "confdefs.h"
15911 #include <$ac_hdr>
15912 EOF
15913 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15914 { (eval echo configure:15913: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15915 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15916 if test -z "$ac_err"; then
15917   rm -rf conftest*
15918   eval "ac_cv_header_$ac_safe=yes"
15919 else
15920   echo "$ac_err" >&5
15921   echo "configure: failed program was:" >&5
15922   cat conftest.$ac_ext >&5
15923   rm -rf conftest*
15924   eval "ac_cv_header_$ac_safe=no"
15925 fi
15926 rm -f conftest*
15927 fi
15928 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15929   echo "$ac_t""yes" 1>&6
15930     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15931   cat >> confdefs.h <<EOF
15932 #define $ac_tr_hdr 1
15933 EOF
15934  
15935 else
15936   echo "$ac_t""no" 1>&6
15937 fi
15938 done
15939
15940
15941         if test $ac_cv_header_pth_h = yes ; then
15942                 echo $ac_n "checking for pth_version in -lpth""... $ac_c" 1>&6
15943 echo "configure:15942: checking for pth_version in -lpth" >&5
15944 ac_lib_var=`echo pth'_'pth_version | sed 'y%./+-:%__p__%'`
15945 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
15946   echo $ac_n "(cached) $ac_c" 1>&6
15947 else
15948   ac_save_LIBS="$LIBS"
15949 LIBS="-lpth  $LIBS"
15950 cat > conftest.$ac_ext <<EOF
15951 #line 15950 "configure"
15952 #include "confdefs.h"
15953 /* Override any gcc2 internal prototype to avoid an error.  */
15954 /* We use char because int might match the return type of a gcc2
15955     builtin and then its argument prototype would still apply.  */
15956 char pth_version();
15957
15958 int main() {
15959 pth_version()
15960 ; return 0; }
15961 EOF
15962 if { (eval echo configure:15961: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15963   rm -rf conftest*
15964   eval "ac_cv_lib_$ac_lib_var=yes"
15965 else
15966   echo "configure: failed program was:" >&5
15967   cat conftest.$ac_ext >&5
15968   rm -rf conftest*
15969   eval "ac_cv_lib_$ac_lib_var=no"
15970 fi
15971 rm -f conftest*
15972 LIBS="$ac_save_LIBS"
15973
15974 fi
15975 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
15976   echo "$ac_t""yes" 1>&6
15977   have_pth=yes
15978 else
15979   echo "$ac_t""no" 1>&6
15980 have_pth=no
15981 fi
15982
15983
15984                 if test $have_pth = yes ; then
15985                         cat >> confdefs.h <<\EOF
15986 #define HAVE_GNU_PTH 1
15987 EOF
15988
15989                         LTHREAD_LIBS="$LTHREAD_LIBS -lpth"
15990                         ol_link_threads=pth
15991                         ol_with_threads=found
15992
15993                         if test $ol_with_yielding_select = auto ; then
15994                                 ol_with_yielding_select=yes
15995                         fi
15996                 fi
15997         fi
15998 fi
15999
16000 if test $ol_with_threads = auto -o $ol_with_threads = yes \
16001         -o $ol_with_threads = lwp ; then
16002
16003                 for ac_hdr in thread.h synch.h
16004 do
16005 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16006 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16007 echo "configure:16006: checking for $ac_hdr" >&5
16008 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16009   echo $ac_n "(cached) $ac_c" 1>&6
16010 else
16011   cat > conftest.$ac_ext <<EOF
16012 #line 16011 "configure"
16013 #include "confdefs.h"
16014 #include <$ac_hdr>
16015 EOF
16016 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16017 { (eval echo configure:16016: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16018 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16019 if test -z "$ac_err"; then
16020   rm -rf conftest*
16021   eval "ac_cv_header_$ac_safe=yes"
16022 else
16023   echo "$ac_err" >&5
16024   echo "configure: failed program was:" >&5
16025   cat conftest.$ac_ext >&5
16026   rm -rf conftest*
16027   eval "ac_cv_header_$ac_safe=no"
16028 fi
16029 rm -f conftest*
16030 fi
16031 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16032   echo "$ac_t""yes" 1>&6
16033     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16034   cat >> confdefs.h <<EOF
16035 #define $ac_tr_hdr 1
16036 EOF
16037  
16038 else
16039   echo "$ac_t""no" 1>&6
16040 fi
16041 done
16042
16043         if test $ac_cv_header_thread_h = yes -a $ac_cv_header_synch_h = yes ; then
16044                 echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6
16045 echo "configure:16044: checking for thr_create in -lthread" >&5
16046 ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-:%__p__%'`
16047 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
16048   echo $ac_n "(cached) $ac_c" 1>&6
16049 else
16050   ac_save_LIBS="$LIBS"
16051 LIBS="-lthread  $LIBS"
16052 cat > conftest.$ac_ext <<EOF
16053 #line 16052 "configure"
16054 #include "confdefs.h"
16055 /* Override any gcc2 internal prototype to avoid an error.  */
16056 /* We use char because int might match the return type of a gcc2
16057     builtin and then its argument prototype would still apply.  */
16058 char thr_create();
16059
16060 int main() {
16061 thr_create()
16062 ; return 0; }
16063 EOF
16064 if { (eval echo configure:16063: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16065   rm -rf conftest*
16066   eval "ac_cv_lib_$ac_lib_var=yes"
16067 else
16068   echo "configure: failed program was:" >&5
16069   cat conftest.$ac_ext >&5
16070   rm -rf conftest*
16071   eval "ac_cv_lib_$ac_lib_var=no"
16072 fi
16073 rm -f conftest*
16074 LIBS="$ac_save_LIBS"
16075
16076 fi
16077 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
16078   echo "$ac_t""yes" 1>&6
16079   have_thr=yes
16080 else
16081   echo "$ac_t""no" 1>&6
16082 have_thr=no
16083 fi
16084
16085
16086                 if test $have_thr = yes ; then
16087                         cat >> confdefs.h <<\EOF
16088 #define HAVE_THR 1
16089 EOF
16090
16091                         LTHREAD_LIBS="$LTHREAD_LIBS -lthread"
16092                         ol_link_threads=thr
16093
16094                         if test $ol_with_yielding_select = auto ; then
16095                                 ol_with_yielding_select=yes
16096                         fi
16097
16098                                                 for ac_func in \
16099                                 thr_setconcurrency \
16100                                 thr_getconcurrency \
16101                         
16102 do
16103 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
16104 echo "configure:16103: checking for $ac_func" >&5
16105 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
16106   echo $ac_n "(cached) $ac_c" 1>&6
16107 else
16108   cat > conftest.$ac_ext <<EOF
16109 #line 16108 "configure"
16110 #include "confdefs.h"
16111 /* System header to define __stub macros and hopefully few prototypes,
16112     which can conflict with char $ac_func(); below.  */
16113 #include <assert.h>
16114 /* Override any gcc2 internal prototype to avoid an error.  */
16115 /* We use char because int might match the return type of a gcc2
16116     builtin and then its argument prototype would still apply.  */
16117 char $ac_func();
16118 char (*f)();
16119
16120 int main() {
16121
16122 /* The GNU C library defines this for functions which it implements
16123     to always fail with ENOSYS.  Some functions are actually named
16124     something starting with __ and the normal name is an alias.  */
16125 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16126 choke me
16127 #else
16128 f = $ac_func;
16129 #endif
16130
16131 ; return 0; }
16132 EOF
16133 if { (eval echo configure:16132: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16134   rm -rf conftest*
16135   eval "ac_cv_func_$ac_func=yes"
16136 else
16137   echo "configure: failed program was:" >&5
16138   cat conftest.$ac_ext >&5
16139   rm -rf conftest*
16140   eval "ac_cv_func_$ac_func=no"
16141 fi
16142 rm -f conftest*
16143 fi
16144
16145 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
16146   echo "$ac_t""yes" 1>&6
16147     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
16148   cat >> confdefs.h <<EOF
16149 #define $ac_tr_func 1
16150 EOF
16151  
16152 else
16153   echo "$ac_t""no" 1>&6
16154 fi
16155 done
16156
16157                 fi
16158         fi
16159
16160                 for ac_hdr in lwp/lwp.h
16161 do
16162 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16163 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16164 echo "configure:16163: checking for $ac_hdr" >&5
16165 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16166   echo $ac_n "(cached) $ac_c" 1>&6
16167 else
16168   cat > conftest.$ac_ext <<EOF
16169 #line 16168 "configure"
16170 #include "confdefs.h"
16171 #include <$ac_hdr>
16172 EOF
16173 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16174 { (eval echo configure:16173: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16175 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16176 if test -z "$ac_err"; then
16177   rm -rf conftest*
16178   eval "ac_cv_header_$ac_safe=yes"
16179 else
16180   echo "$ac_err" >&5
16181   echo "configure: failed program was:" >&5
16182   cat conftest.$ac_ext >&5
16183   rm -rf conftest*
16184   eval "ac_cv_header_$ac_safe=no"
16185 fi
16186 rm -f conftest*
16187 fi
16188 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16189   echo "$ac_t""yes" 1>&6
16190     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16191   cat >> confdefs.h <<EOF
16192 #define $ac_tr_hdr 1
16193 EOF
16194  
16195 else
16196   echo "$ac_t""no" 1>&6
16197 fi
16198 done
16199
16200         if test $ac_cv_header_lwp_lwp_h = yes ; then
16201                 echo $ac_n "checking for lwp_create in -llwp""... $ac_c" 1>&6
16202 echo "configure:16201: checking for lwp_create in -llwp" >&5
16203 ac_lib_var=`echo lwp'_'lwp_create | sed 'y%./+-:%__p__%'`
16204 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
16205   echo $ac_n "(cached) $ac_c" 1>&6
16206 else
16207   ac_save_LIBS="$LIBS"
16208 LIBS="-llwp  $LIBS"
16209 cat > conftest.$ac_ext <<EOF
16210 #line 16209 "configure"
16211 #include "confdefs.h"
16212 /* Override any gcc2 internal prototype to avoid an error.  */
16213 /* We use char because int might match the return type of a gcc2
16214     builtin and then its argument prototype would still apply.  */
16215 char lwp_create();
16216
16217 int main() {
16218 lwp_create()
16219 ; return 0; }
16220 EOF
16221 if { (eval echo configure:16220: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16222   rm -rf conftest*
16223   eval "ac_cv_lib_$ac_lib_var=yes"
16224 else
16225   echo "configure: failed program was:" >&5
16226   cat conftest.$ac_ext >&5
16227   rm -rf conftest*
16228   eval "ac_cv_lib_$ac_lib_var=no"
16229 fi
16230 rm -f conftest*
16231 LIBS="$ac_save_LIBS"
16232
16233 fi
16234 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
16235   echo "$ac_t""yes" 1>&6
16236   have_lwp=yes
16237 else
16238   echo "$ac_t""no" 1>&6
16239 have_lwp=no
16240 fi
16241
16242
16243                 if test $have_lwp = yes ; then
16244                         cat >> confdefs.h <<\EOF
16245 #define HAVE_LWP 1
16246 EOF
16247
16248                         LTHREAD_LIBS="$LTHREAD_LIBS -llwp"
16249                         ol_link_threads=lwp
16250
16251                         if test $ol_with_yielding_select = auto ; then
16252                                 ol_with_yielding_select=no
16253                         fi
16254                 fi
16255         fi
16256 fi
16257
16258 if test $ol_with_yielding_select = yes ; then
16259         cat >> confdefs.h <<\EOF
16260 #define HAVE_YIELDING_SELECT 1
16261 EOF
16262
16263 fi
16264
16265 if test $ol_with_threads = manual ; then
16266                 ol_link_threads=yes
16267
16268         echo "configure: warning: thread defines and link options must be set manually" 1>&2
16269
16270         for ac_hdr in pthread.h sched.h
16271 do
16272 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16273 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16274 echo "configure:16273: checking for $ac_hdr" >&5
16275 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16276   echo $ac_n "(cached) $ac_c" 1>&6
16277 else
16278   cat > conftest.$ac_ext <<EOF
16279 #line 16278 "configure"
16280 #include "confdefs.h"
16281 #include <$ac_hdr>
16282 EOF
16283 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16284 { (eval echo configure:16283: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16285 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16286 if test -z "$ac_err"; then
16287   rm -rf conftest*
16288   eval "ac_cv_header_$ac_safe=yes"
16289 else
16290   echo "$ac_err" >&5
16291   echo "configure: failed program was:" >&5
16292   cat conftest.$ac_ext >&5
16293   rm -rf conftest*
16294   eval "ac_cv_header_$ac_safe=no"
16295 fi
16296 rm -f conftest*
16297 fi
16298 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16299   echo "$ac_t""yes" 1>&6
16300     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16301   cat >> confdefs.h <<EOF
16302 #define $ac_tr_hdr 1
16303 EOF
16304  
16305 else
16306   echo "$ac_t""no" 1>&6
16307 fi
16308 done
16309
16310         for ac_func in sched_yield pthread_yield
16311 do
16312 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
16313 echo "configure:16312: checking for $ac_func" >&5
16314 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
16315   echo $ac_n "(cached) $ac_c" 1>&6
16316 else
16317   cat > conftest.$ac_ext <<EOF
16318 #line 16317 "configure"
16319 #include "confdefs.h"
16320 /* System header to define __stub macros and hopefully few prototypes,
16321     which can conflict with char $ac_func(); below.  */
16322 #include <assert.h>
16323 /* Override any gcc2 internal prototype to avoid an error.  */
16324 /* We use char because int might match the return type of a gcc2
16325     builtin and then its argument prototype would still apply.  */
16326 char $ac_func();
16327 char (*f)();
16328
16329 int main() {
16330
16331 /* The GNU C library defines this for functions which it implements
16332     to always fail with ENOSYS.  Some functions are actually named
16333     something starting with __ and the normal name is an alias.  */
16334 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16335 choke me
16336 #else
16337 f = $ac_func;
16338 #endif
16339
16340 ; return 0; }
16341 EOF
16342 if { (eval echo configure:16341: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16343   rm -rf conftest*
16344   eval "ac_cv_func_$ac_func=yes"
16345 else
16346   echo "configure: failed program was:" >&5
16347   cat conftest.$ac_ext >&5
16348   rm -rf conftest*
16349   eval "ac_cv_func_$ac_func=no"
16350 fi
16351 rm -f conftest*
16352 fi
16353
16354 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
16355   echo "$ac_t""yes" 1>&6
16356     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
16357   cat >> confdefs.h <<EOF
16358 #define $ac_tr_func 1
16359 EOF
16360  
16361 else
16362   echo "$ac_t""no" 1>&6
16363 fi
16364 done
16365
16366         
16367         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
16368 echo "configure:16367: checking for LinuxThreads pthread.h" >&5
16369 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
16370   echo $ac_n "(cached) $ac_c" 1>&6
16371 else
16372   cat > conftest.$ac_ext <<EOF
16373 #line 16372 "configure"
16374 #include "confdefs.h"
16375 #include <pthread.h>
16376 EOF
16377 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16378   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
16379   rm -rf conftest*
16380   ol_cv_header_linux_threads=yes
16381 else
16382   rm -rf conftest*
16383   ol_cv_header_linux_threads=no
16384 fi
16385 rm -f conftest*
16386
16387                 
16388 fi
16389
16390 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
16391         if test $ol_cv_header_linux_threads = yes; then
16392                 cat >> confdefs.h <<\EOF
16393 #define HAVE_LINUX_THREADS 1
16394 EOF
16395
16396         fi
16397
16398
16399         for ac_hdr in mach/cthreads.h
16400 do
16401 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16402 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16403 echo "configure:16402: checking for $ac_hdr" >&5
16404 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16405   echo $ac_n "(cached) $ac_c" 1>&6
16406 else
16407   cat > conftest.$ac_ext <<EOF
16408 #line 16407 "configure"
16409 #include "confdefs.h"
16410 #include <$ac_hdr>
16411 EOF
16412 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16413 { (eval echo configure:16412: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16414 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16415 if test -z "$ac_err"; then
16416   rm -rf conftest*
16417   eval "ac_cv_header_$ac_safe=yes"
16418 else
16419   echo "$ac_err" >&5
16420   echo "configure: failed program was:" >&5
16421   cat conftest.$ac_ext >&5
16422   rm -rf conftest*
16423   eval "ac_cv_header_$ac_safe=no"
16424 fi
16425 rm -f conftest*
16426 fi
16427 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16428   echo "$ac_t""yes" 1>&6
16429     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16430   cat >> confdefs.h <<EOF
16431 #define $ac_tr_hdr 1
16432 EOF
16433  
16434 else
16435   echo "$ac_t""no" 1>&6
16436 fi
16437 done
16438
16439         for ac_hdr in lwp/lwp.h
16440 do
16441 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16442 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16443 echo "configure:16442: checking for $ac_hdr" >&5
16444 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16445   echo $ac_n "(cached) $ac_c" 1>&6
16446 else
16447   cat > conftest.$ac_ext <<EOF
16448 #line 16447 "configure"
16449 #include "confdefs.h"
16450 #include <$ac_hdr>
16451 EOF
16452 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16453 { (eval echo configure:16452: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16454 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16455 if test -z "$ac_err"; then
16456   rm -rf conftest*
16457   eval "ac_cv_header_$ac_safe=yes"
16458 else
16459   echo "$ac_err" >&5
16460   echo "configure: failed program was:" >&5
16461   cat conftest.$ac_ext >&5
16462   rm -rf conftest*
16463   eval "ac_cv_header_$ac_safe=no"
16464 fi
16465 rm -f conftest*
16466 fi
16467 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16468   echo "$ac_t""yes" 1>&6
16469     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16470   cat >> confdefs.h <<EOF
16471 #define $ac_tr_hdr 1
16472 EOF
16473  
16474 else
16475   echo "$ac_t""no" 1>&6
16476 fi
16477 done
16478
16479         for ac_hdr in thread.h synch.h
16480 do
16481 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16482 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16483 echo "configure:16482: checking for $ac_hdr" >&5
16484 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16485   echo $ac_n "(cached) $ac_c" 1>&6
16486 else
16487   cat > conftest.$ac_ext <<EOF
16488 #line 16487 "configure"
16489 #include "confdefs.h"
16490 #include <$ac_hdr>
16491 EOF
16492 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16493 { (eval echo configure:16492: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16494 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16495 if test -z "$ac_err"; then
16496   rm -rf conftest*
16497   eval "ac_cv_header_$ac_safe=yes"
16498 else
16499   echo "$ac_err" >&5
16500   echo "configure: failed program was:" >&5
16501   cat conftest.$ac_ext >&5
16502   rm -rf conftest*
16503   eval "ac_cv_header_$ac_safe=no"
16504 fi
16505 rm -f conftest*
16506 fi
16507 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16508   echo "$ac_t""yes" 1>&6
16509     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16510   cat >> confdefs.h <<EOF
16511 #define $ac_tr_hdr 1
16512 EOF
16513  
16514 else
16515   echo "$ac_t""no" 1>&6
16516 fi
16517 done
16518
16519 fi
16520
16521 if test $ol_link_threads != no -a $ol_link_threads != nt ; then  
16522                         cat >> confdefs.h <<\EOF
16523 #define REENTRANT 1
16524 EOF
16525
16526         cat >> confdefs.h <<\EOF
16527 #define _REENTRANT 1
16528 EOF
16529
16530         cat >> confdefs.h <<\EOF
16531 #define THREAD_SAFE 1
16532 EOF
16533
16534         cat >> confdefs.h <<\EOF
16535 #define _THREAD_SAFE 1
16536 EOF
16537
16538         cat >> confdefs.h <<\EOF
16539 #define THREADSAFE 1
16540 EOF
16541
16542         cat >> confdefs.h <<\EOF
16543 #define _THREADSAFE 1
16544 EOF
16545
16546         cat >> confdefs.h <<\EOF
16547 #define _SGI_MP_SOURCE 1
16548 EOF
16549
16550
16551                         echo $ac_n "checking for thread specific errno""... $ac_c" 1>&6
16552 echo "configure:16551: checking for thread specific errno" >&5
16553 if eval "test \"\${ol_cv_errno_thread_specific+set}\" = set"; then
16554   echo $ac_n "(cached) $ac_c" 1>&6
16555 else
16556   
16557                 cat > conftest.$ac_ext <<EOF
16558 #line 16557 "configure"
16559 #include "confdefs.h"
16560 #include <errno.h>
16561 int main() {
16562 errno = 0;
16563 ; return 0; }
16564 EOF
16565 if { (eval echo configure:16564: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16566   rm -rf conftest*
16567   ol_cv_errno_thread_specific=yes
16568 else
16569   echo "configure: failed program was:" >&5
16570   cat conftest.$ac_ext >&5
16571   rm -rf conftest*
16572   ol_cv_errno_thread_specific=no
16573 fi
16574 rm -f conftest*
16575         
16576 fi
16577
16578 echo "$ac_t""$ol_cv_errno_thread_specific" 1>&6
16579
16580                         echo $ac_n "checking for thread specific h_errno""... $ac_c" 1>&6
16581 echo "configure:16580: checking for thread specific h_errno" >&5
16582 if eval "test \"\${ol_cv_h_errno_thread_specific+set}\" = set"; then
16583   echo $ac_n "(cached) $ac_c" 1>&6
16584 else
16585   
16586                 cat > conftest.$ac_ext <<EOF
16587 #line 16586 "configure"
16588 #include "confdefs.h"
16589 #include <netdb.h>
16590 int main() {
16591 h_errno = 0;
16592 ; return 0; }
16593 EOF
16594 if { (eval echo configure:16593: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16595   rm -rf conftest*
16596   ol_cv_h_errno_thread_specific=yes
16597 else
16598   echo "configure: failed program was:" >&5
16599   cat conftest.$ac_ext >&5
16600   rm -rf conftest*
16601   ol_cv_h_errno_thread_specific=no
16602 fi
16603 rm -f conftest*
16604         
16605 fi
16606
16607 echo "$ac_t""$ol_cv_h_errno_thread_specific" 1>&6
16608
16609         if test $ol_cv_errno_thread_specific != yes \
16610                 -o $ol_cv_h_errno_thread_specific != yes ; then
16611                 LIBS="$LTHREAD_LIBS $LIBS"
16612                 LTHREAD_LIBS=""
16613         fi
16614
16615 fi  
16616
16617 if test $ol_link_threads = no ; then
16618         if test $ol_with_threads = yes ; then
16619                 { echo "configure: error: no suitable thread support" 1>&2; exit 1; }
16620         fi
16621
16622         if test $ol_with_threads = auto ; then
16623                 echo "configure: warning: no suitable thread support, disabling threads" 1>&2
16624                 ol_with_threads=no
16625         fi
16626
16627         cat >> confdefs.h <<\EOF
16628 #define NO_THREADS 1
16629 EOF
16630
16631         LTHREAD_LIBS=""
16632 fi
16633
16634 if test $ol_link_threads != no ; then
16635         cat >> confdefs.h <<\EOF
16636 #define LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE 1
16637 EOF
16638
16639 fi
16640
16641 for ac_func in \
16642         ctime_r                 \
16643         gethostbyname_r gethostbyaddr_r \
16644
16645 do
16646 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
16647 echo "configure:16646: checking for $ac_func" >&5
16648 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
16649   echo $ac_n "(cached) $ac_c" 1>&6
16650 else
16651   cat > conftest.$ac_ext <<EOF
16652 #line 16651 "configure"
16653 #include "confdefs.h"
16654 /* System header to define __stub macros and hopefully few prototypes,
16655     which can conflict with char $ac_func(); below.  */
16656 #include <assert.h>
16657 /* Override any gcc2 internal prototype to avoid an error.  */
16658 /* We use char because int might match the return type of a gcc2
16659     builtin and then its argument prototype would still apply.  */
16660 char $ac_func();
16661 char (*f)();
16662
16663 int main() {
16664
16665 /* The GNU C library defines this for functions which it implements
16666     to always fail with ENOSYS.  Some functions are actually named
16667     something starting with __ and the normal name is an alias.  */
16668 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16669 choke me
16670 #else
16671 f = $ac_func;
16672 #endif
16673
16674 ; return 0; }
16675 EOF
16676 if { (eval echo configure:16675: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16677   rm -rf conftest*
16678   eval "ac_cv_func_$ac_func=yes"
16679 else
16680   echo "configure: failed program was:" >&5
16681   cat conftest.$ac_ext >&5
16682   rm -rf conftest*
16683   eval "ac_cv_func_$ac_func=no"
16684 fi
16685 rm -f conftest*
16686 fi
16687
16688 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
16689   echo "$ac_t""yes" 1>&6
16690     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
16691   cat >> confdefs.h <<EOF
16692 #define $ac_tr_func 1
16693 EOF
16694  
16695 else
16696   echo "$ac_t""no" 1>&6
16697 fi
16698 done
16699
16700
16701 if test "$ac_cv_func_ctime_r" = no ; then
16702         ol_cv_func_ctime_r_nargs=0
16703 else
16704         echo $ac_n "checking number of arguments of ctime_r""... $ac_c" 1>&6
16705 echo "configure:16704: checking number of arguments of ctime_r" >&5
16706 if eval "test \"\${ol_cv_func_ctime_r_nargs+set}\" = set"; then
16707   echo $ac_n "(cached) $ac_c" 1>&6
16708 else
16709   cat > conftest.$ac_ext <<EOF
16710 #line 16709 "configure"
16711 #include "confdefs.h"
16712 #include <time.h>
16713 int main() {
16714 time_t ti; char *buffer; ctime_r(&ti,buffer,32);
16715 ; return 0; }
16716 EOF
16717 if { (eval echo configure:16716: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16718   rm -rf conftest*
16719   ol_cv_func_ctime_r_nargs3=yes
16720 else
16721   echo "configure: failed program was:" >&5
16722   cat conftest.$ac_ext >&5
16723   rm -rf conftest*
16724   ol_cv_func_ctime_r_nargs3=no
16725 fi
16726 rm -f conftest*
16727
16728         cat > conftest.$ac_ext <<EOF
16729 #line 16728 "configure"
16730 #include "confdefs.h"
16731 #include <time.h>
16732 int main() {
16733 time_t ti; char *buffer; ctime_r(&ti,buffer);
16734 ; return 0; }
16735 EOF
16736 if { (eval echo configure:16735: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16737   rm -rf conftest*
16738   ol_cv_func_ctime_r_nargs2=yes
16739 else
16740   echo "configure: failed program was:" >&5
16741   cat conftest.$ac_ext >&5
16742   rm -rf conftest*
16743   ol_cv_func_ctime_r_nargs2=no
16744 fi
16745 rm -f conftest*
16746
16747         if test $ol_cv_func_ctime_r_nargs3 = yes -a \
16748                 $ol_cv_func_ctime_r_nargs2 = no ; then
16749
16750                 ol_cv_func_ctime_r_nargs=3
16751
16752         elif test $ol_cv_func_ctime_r_nargs3 = no -a \
16753                 $ol_cv_func_ctime_r_nargs2 = yes ; then
16754
16755                 ol_cv_func_ctime_r_nargs=2
16756
16757         else
16758                 ol_cv_func_ctime_r_nargs=0
16759         fi
16760   
16761 fi
16762
16763 echo "$ac_t""$ol_cv_func_ctime_r_nargs" 1>&6
16764
16765   if test $ol_cv_func_ctime_r_nargs -gt 1 ; then
16766         cat >> confdefs.h <<EOF
16767 #define CTIME_R_NARGS $ol_cv_func_ctime_r_nargs
16768 EOF
16769
16770   fi
16771
16772 fi
16773
16774 if test "$ac_cv_func_gethostbyname_r" = yes ; then
16775         echo $ac_n "checking number of arguments of gethostbyname_r""... $ac_c" 1>&6
16776 echo "configure:16775: checking number of arguments of gethostbyname_r" >&5
16777 if eval "test \"\${ol_cv_func_gethostbyname_r_nargs+set}\" = set"; then
16778   echo $ac_n "(cached) $ac_c" 1>&6
16779 else
16780   cat > conftest.$ac_ext <<EOF
16781 #line 16780 "configure"
16782 #include "confdefs.h"
16783 #include <sys/types.h>
16784 #include <sys/socket.h>
16785 #include <netinet/in.h>
16786 #include <netdb.h>
16787 #define BUFSIZE (sizeof(struct hostent)+10)
16788 int main() {
16789 struct hostent hent; char buffer[BUFSIZE];
16790                 int bufsize=BUFSIZE;int h_errno;
16791                 (void)gethostbyname_r("segovia.cs.purdue.edu", &hent,
16792                         buffer, bufsize, &h_errno);
16793 ; return 0; }
16794 EOF
16795 if { (eval echo configure:16794: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16796   rm -rf conftest*
16797   ol_cv_func_gethostbyname_r_nargs5=yes
16798 else
16799   echo "configure: failed program was:" >&5
16800   cat conftest.$ac_ext >&5
16801   rm -rf conftest*
16802   ol_cv_func_gethostbyname_r_nargs5=no
16803 fi
16804 rm -f conftest*
16805
16806         cat > conftest.$ac_ext <<EOF
16807 #line 16806 "configure"
16808 #include "confdefs.h"
16809 #include <sys/types.h>
16810 #include <sys/socket.h>
16811 #include <netinet/in.h>
16812 #include <netdb.h>
16813 #define BUFSIZE (sizeof(struct hostent)+10)
16814 int main() {
16815 struct hostent hent;struct hostent *rhent;
16816                 char buffer[BUFSIZE];
16817                 int bufsize=BUFSIZE;int h_errno;
16818                 (void)gethostbyname_r("localhost", &hent, buffer, bufsize,
16819                         &rhent, &h_errno);
16820 ; return 0; }
16821 EOF
16822 if { (eval echo configure:16821: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16823   rm -rf conftest*
16824   ol_cv_func_gethostbyname_r_nargs6=yes
16825 else
16826   echo "configure: failed program was:" >&5
16827   cat conftest.$ac_ext >&5
16828   rm -rf conftest*
16829   ol_cv_func_gethostbyname_r_nargs6=no
16830 fi
16831 rm -f conftest*
16832
16833         if test $ol_cv_func_gethostbyname_r_nargs5 = yes -a \
16834                 $ol_cv_func_gethostbyname_r_nargs6 = no ; then
16835
16836                 ol_cv_func_gethostbyname_r_nargs=5
16837
16838         elif test $ol_cv_func_gethostbyname_r_nargs5 = no -a \
16839                 $ol_cv_func_gethostbyname_r_nargs6 = yes ; then
16840
16841                 ol_cv_func_gethostbyname_r_nargs=6
16842
16843         else
16844                 ol_cv_func_gethostbyname_r_nargs=0
16845         fi
16846   
16847 fi
16848
16849 echo "$ac_t""$ol_cv_func_gethostbyname_r_nargs" 1>&6
16850   if test $ol_cv_func_gethostbyname_r_nargs -gt 1 ; then
16851         cat >> confdefs.h <<EOF
16852 #define GETHOSTBYNAME_R_NARGS $ol_cv_func_gethostbyname_r_nargs
16853 EOF
16854
16855   fi
16856
16857 else
16858         ol_cv_func_gethostbyname_r_nargs=0
16859 fi
16860  
16861 if test "$ac_cv_func_gethostbyaddr_r" = yes ; then
16862         echo $ac_n "checking number of arguments of gethostbyaddr_r""... $ac_c" 1>&6
16863 echo "configure:16862: checking number of arguments of gethostbyaddr_r" >&5
16864 if eval "test \"\${ol_cv_func_gethostbyaddr_r_nargs+set}\" = set"; then
16865   echo $ac_n "(cached) $ac_c" 1>&6
16866 else
16867   cat > conftest.$ac_ext <<EOF
16868 #line 16867 "configure"
16869 #include "confdefs.h"
16870 #include <sys/types.h>
16871 #include <sys/socket.h>
16872 #include <netinet/in.h>
16873 #include <netdb.h>
16874 #define BUFSIZE (sizeof(struct hostent)+10)
16875 int main() {
16876 struct hostent hent; char buffer[BUFSIZE]; 
16877             struct in_addr add;
16878             size_t alen=sizeof(struct in_addr);
16879             int bufsize=BUFSIZE;int h_errno;
16880                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
16881                         alen, AF_INET, &hent, buffer, bufsize, &h_errno);
16882 ; return 0; }
16883 EOF
16884 if { (eval echo configure:16883: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16885   rm -rf conftest*
16886   ol_cv_func_gethostbyaddr_r_nargs7=yes
16887 else
16888   echo "configure: failed program was:" >&5
16889   cat conftest.$ac_ext >&5
16890   rm -rf conftest*
16891   ol_cv_func_gethostbyaddr_r_nargs7=no
16892 fi
16893 rm -f conftest*
16894
16895         cat > conftest.$ac_ext <<EOF
16896 #line 16895 "configure"
16897 #include "confdefs.h"
16898 #include <sys/types.h>
16899 #include <sys/socket.h>
16900 #include <netinet/in.h>
16901 #include <netdb.h>
16902 #define BUFSIZE (sizeof(struct hostent)+10)
16903 int main() {
16904 struct hostent hent;
16905                 struct hostent *rhent; char buffer[BUFSIZE]; 
16906                 struct in_addr add;
16907                 size_t alen=sizeof(struct in_addr);
16908                 int bufsize=BUFSIZE;int h_errno;
16909                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
16910                         alen, AF_INET, &hent, buffer, bufsize, 
16911                         &rhent, &h_errno);
16912 ; return 0; }
16913 EOF
16914 if { (eval echo configure:16913: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16915   rm -rf conftest*
16916   ol_cv_func_gethostbyaddr_r_nargs8=yes
16917 else
16918   echo "configure: failed program was:" >&5
16919   cat conftest.$ac_ext >&5
16920   rm -rf conftest*
16921   ol_cv_func_gethostbyaddr_r_nargs8=no
16922 fi
16923 rm -f conftest*
16924
16925         if test $ol_cv_func_gethostbyaddr_r_nargs7 = yes -a \
16926                 $ol_cv_func_gethostbyaddr_r_nargs8 = no ; then
16927
16928                 ol_cv_func_gethostbyaddr_r_nargs=7
16929
16930         elif test $ol_cv_func_gethostbyaddr_r_nargs7 = no -a \
16931                 $ol_cv_func_gethostbyaddr_r_nargs8 = yes ; then
16932
16933                 ol_cv_func_gethostbyaddr_r_nargs=8
16934
16935         else
16936                 ol_cv_func_gethostbyaddr_r_nargs=0
16937         fi
16938   
16939 fi
16940
16941 echo "$ac_t""$ol_cv_func_gethostbyaddr_r_nargs" 1>&6
16942   if test $ol_cv_func_gethostbyaddr_r_nargs -gt 1 ; then
16943     cat >> confdefs.h <<EOF
16944 #define GETHOSTBYADDR_R_NARGS $ol_cv_func_gethostbyaddr_r_nargs
16945 EOF
16946
16947   fi
16948
16949 else
16950         ol_cv_func_gethostbyaddr_r_nargs=0
16951 fi
16952
16953 ol_link_ldbm=no 
16954
16955 if test $ol_with_ldbm_api = auto \
16956         -o $ol_with_ldbm_api = berkeley \
16957         -o $ol_with_ldbm_api = bcompat ; then
16958
16959         if test $ol_with_ldbm_api = bcompat; then \
16960                 for ac_hdr in db_185.h db.h
16961 do
16962 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16963 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16964 echo "configure:16963: checking for $ac_hdr" >&5
16965 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16966   echo $ac_n "(cached) $ac_c" 1>&6
16967 else
16968   cat > conftest.$ac_ext <<EOF
16969 #line 16968 "configure"
16970 #include "confdefs.h"
16971 #include <$ac_hdr>
16972 EOF
16973 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16974 { (eval echo configure:16973: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16975 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16976 if test -z "$ac_err"; then
16977   rm -rf conftest*
16978   eval "ac_cv_header_$ac_safe=yes"
16979 else
16980   echo "$ac_err" >&5
16981   echo "configure: failed program was:" >&5
16982   cat conftest.$ac_ext >&5
16983   rm -rf conftest*
16984   eval "ac_cv_header_$ac_safe=no"
16985 fi
16986 rm -f conftest*
16987 fi
16988 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16989   echo "$ac_t""yes" 1>&6
16990     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16991   cat >> confdefs.h <<EOF
16992 #define $ac_tr_hdr 1
16993 EOF
16994  
16995 else
16996   echo "$ac_t""no" 1>&6
16997 fi
16998 done
16999
17000 if test $ac_cv_header_db_185_h = yes -o $ac_cv_header_db_h = yes; then
17001         echo $ac_n "checking if Berkeley DB header compatibility""... $ac_c" 1>&6
17002 echo "configure:17001: checking if Berkeley DB header compatibility" >&5
17003 if eval "test \"\${ol_cv_header_db1+set}\" = set"; then
17004   echo $ac_n "(cached) $ac_c" 1>&6
17005 else
17006   
17007                 cat > conftest.$ac_ext <<EOF
17008 #line 17007 "configure"
17009 #include "confdefs.h"
17010
17011 #if HAVE_DB_185_H
17012 #       include <db_185.h>
17013 #else
17014 #       include <db.h>
17015 #endif
17016
17017  /* this check could be improved */
17018 #ifndef DB_VERSION_MAJOR
17019 #       define DB_VERSION_MAJOR 1
17020 #endif
17021
17022 #if DB_VERSION_MAJOR == 1 
17023         __db_version_1
17024 #endif
17025
17026 EOF
17027 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
17028   egrep "__db_version_1" >/dev/null 2>&1; then
17029   rm -rf conftest*
17030   ol_cv_header_db1=yes
17031 else
17032   rm -rf conftest*
17033   ol_cv_header_db1=no
17034 fi
17035 rm -f conftest*
17036
17037 fi
17038
17039 echo "$ac_t""$ol_cv_header_db1" 1>&6
17040
17041         if test $ol_cv_header_db1 = yes ; then
17042                 ol_cv_lib_db=no
17043 if test $ol_cv_lib_db = no ; then
17044         echo $ac_n "checking for Berkeley DB link (default)""... $ac_c" 1>&6
17045 echo "configure:17044: checking for Berkeley DB link (default)" >&5
17046 if eval "test \"\${ol_cv_db_none+set}\" = set"; then
17047   echo $ac_n "(cached) $ac_c" 1>&6
17048 else
17049   
17050         ol_DB_LIB=
17051         ol_LIBS=$LIBS
17052         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17053
17054         cat > conftest.$ac_ext <<EOF
17055 #line 17054 "configure"
17056 #include "confdefs.h"
17057
17058 #ifdef HAVE_DB_185_H
17059 # include <db_185.h>
17060 #else
17061 # include <db.h>
17062 #endif
17063
17064 #ifndef DB_VERSION_MAJOR
17065 # define DB_VERSION_MAJOR 1
17066 #endif
17067
17068 #ifndef NULL
17069 #define NULL ((void*)0)
17070 #endif
17071
17072 int main() {
17073
17074 #if DB_VERSION_MAJOR > 1
17075         {
17076                 char *version;
17077                 int major, minor, patch;
17078
17079                 version = db_version( &major, &minor, &patch );
17080
17081                 if( major != DB_VERSION_MAJOR ||
17082                         minor < DB_VERSION_MINOR )
17083                 {
17084                         printf("Berkeley DB version mismatch\n"
17085                                 "\theader: %s\n\tlibrary: %s\n",
17086                                 DB_VERSION_STRING, version);
17087                         return 1;
17088                 }
17089         }
17090 #endif
17091
17092 #if DB_VERSION_MAJOR > 2
17093         db_env_create( NULL, 0 );
17094 #elif DB_VERSION_MAJOR > 1
17095         db_appexit( NULL );
17096 #else
17097         (void) dbopen( NULL, 0, 0, 0, NULL);
17098 #endif
17099
17100 ; return 0; }
17101 EOF
17102 if { (eval echo configure:17101: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17103   rm -rf conftest*
17104   ol_cv_db_none=yes
17105 else
17106   echo "configure: failed program was:" >&5
17107   cat conftest.$ac_ext >&5
17108   rm -rf conftest*
17109   ol_cv_db_none=no
17110 fi
17111 rm -f conftest*
17112
17113         LIBS="$ol_LIBS"
17114
17115 fi
17116
17117 echo "$ac_t""$ol_cv_db_none" 1>&6
17118
17119         if test $ol_cv_db_none = yes ; then
17120                 ol_cv_lib_db=yes
17121         fi
17122 fi
17123
17124 if test $ol_cv_lib_db = no ; then
17125         echo $ac_n "checking for Berkeley DB link (-ldb43)""... $ac_c" 1>&6
17126 echo "configure:17125: checking for Berkeley DB link (-ldb43)" >&5
17127 if eval "test \"\${ol_cv_db_db43+set}\" = set"; then
17128   echo $ac_n "(cached) $ac_c" 1>&6
17129 else
17130   
17131         ol_DB_LIB=-ldb43
17132         ol_LIBS=$LIBS
17133         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17134
17135         cat > conftest.$ac_ext <<EOF
17136 #line 17135 "configure"
17137 #include "confdefs.h"
17138
17139 #ifdef HAVE_DB_185_H
17140 # include <db_185.h>
17141 #else
17142 # include <db.h>
17143 #endif
17144
17145 #ifndef DB_VERSION_MAJOR
17146 # define DB_VERSION_MAJOR 1
17147 #endif
17148
17149 #ifndef NULL
17150 #define NULL ((void*)0)
17151 #endif
17152
17153 int main() {
17154
17155 #if DB_VERSION_MAJOR > 1
17156         {
17157                 char *version;
17158                 int major, minor, patch;
17159
17160                 version = db_version( &major, &minor, &patch );
17161
17162                 if( major != DB_VERSION_MAJOR ||
17163                         minor < DB_VERSION_MINOR )
17164                 {
17165                         printf("Berkeley DB version mismatch\n"
17166                                 "\theader: %s\n\tlibrary: %s\n",
17167                                 DB_VERSION_STRING, version);
17168                         return 1;
17169                 }
17170         }
17171 #endif
17172
17173 #if DB_VERSION_MAJOR > 2
17174         db_env_create( NULL, 0 );
17175 #elif DB_VERSION_MAJOR > 1
17176         db_appexit( NULL );
17177 #else
17178         (void) dbopen( NULL, 0, 0, 0, NULL);
17179 #endif
17180
17181 ; return 0; }
17182 EOF
17183 if { (eval echo configure:17182: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17184   rm -rf conftest*
17185   ol_cv_db_db43=yes
17186 else
17187   echo "configure: failed program was:" >&5
17188   cat conftest.$ac_ext >&5
17189   rm -rf conftest*
17190   ol_cv_db_db43=no
17191 fi
17192 rm -f conftest*
17193
17194         LIBS="$ol_LIBS"
17195
17196 fi
17197
17198 echo "$ac_t""$ol_cv_db_db43" 1>&6
17199
17200         if test $ol_cv_db_db43 = yes ; then
17201                 ol_cv_lib_db=-ldb43
17202         fi
17203 fi
17204
17205 if test $ol_cv_lib_db = no ; then
17206         echo $ac_n "checking for Berkeley DB link (-ldb-43)""... $ac_c" 1>&6
17207 echo "configure:17206: checking for Berkeley DB link (-ldb-43)" >&5
17208 if eval "test \"\${ol_cv_db_db_43+set}\" = set"; then
17209   echo $ac_n "(cached) $ac_c" 1>&6
17210 else
17211   
17212         ol_DB_LIB=-ldb-43
17213         ol_LIBS=$LIBS
17214         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17215
17216         cat > conftest.$ac_ext <<EOF
17217 #line 17216 "configure"
17218 #include "confdefs.h"
17219
17220 #ifdef HAVE_DB_185_H
17221 # include <db_185.h>
17222 #else
17223 # include <db.h>
17224 #endif
17225
17226 #ifndef DB_VERSION_MAJOR
17227 # define DB_VERSION_MAJOR 1
17228 #endif
17229
17230 #ifndef NULL
17231 #define NULL ((void*)0)
17232 #endif
17233
17234 int main() {
17235
17236 #if DB_VERSION_MAJOR > 1
17237         {
17238                 char *version;
17239                 int major, minor, patch;
17240
17241                 version = db_version( &major, &minor, &patch );
17242
17243                 if( major != DB_VERSION_MAJOR ||
17244                         minor < DB_VERSION_MINOR )
17245                 {
17246                         printf("Berkeley DB version mismatch\n"
17247                                 "\theader: %s\n\tlibrary: %s\n",
17248                                 DB_VERSION_STRING, version);
17249                         return 1;
17250                 }
17251         }
17252 #endif
17253
17254 #if DB_VERSION_MAJOR > 2
17255         db_env_create( NULL, 0 );
17256 #elif DB_VERSION_MAJOR > 1
17257         db_appexit( NULL );
17258 #else
17259         (void) dbopen( NULL, 0, 0, 0, NULL);
17260 #endif
17261
17262 ; return 0; }
17263 EOF
17264 if { (eval echo configure:17263: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17265   rm -rf conftest*
17266   ol_cv_db_db_43=yes
17267 else
17268   echo "configure: failed program was:" >&5
17269   cat conftest.$ac_ext >&5
17270   rm -rf conftest*
17271   ol_cv_db_db_43=no
17272 fi
17273 rm -f conftest*
17274
17275         LIBS="$ol_LIBS"
17276
17277 fi
17278
17279 echo "$ac_t""$ol_cv_db_db_43" 1>&6
17280
17281         if test $ol_cv_db_db_43 = yes ; then
17282                 ol_cv_lib_db=-ldb-43
17283         fi
17284 fi
17285
17286 if test $ol_cv_lib_db = no ; then
17287         echo $ac_n "checking for Berkeley DB link (-ldb-4.3)""... $ac_c" 1>&6
17288 echo "configure:17287: checking for Berkeley DB link (-ldb-4.3)" >&5
17289 if eval "test \"\${ol_cv_db_db_4_dot_3+set}\" = set"; then
17290   echo $ac_n "(cached) $ac_c" 1>&6
17291 else
17292   
17293         ol_DB_LIB=-ldb-4.3
17294         ol_LIBS=$LIBS
17295         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17296
17297         cat > conftest.$ac_ext <<EOF
17298 #line 17297 "configure"
17299 #include "confdefs.h"
17300
17301 #ifdef HAVE_DB_185_H
17302 # include <db_185.h>
17303 #else
17304 # include <db.h>
17305 #endif
17306
17307 #ifndef DB_VERSION_MAJOR
17308 # define DB_VERSION_MAJOR 1
17309 #endif
17310
17311 #ifndef NULL
17312 #define NULL ((void*)0)
17313 #endif
17314
17315 int main() {
17316
17317 #if DB_VERSION_MAJOR > 1
17318         {
17319                 char *version;
17320                 int major, minor, patch;
17321
17322                 version = db_version( &major, &minor, &patch );
17323
17324                 if( major != DB_VERSION_MAJOR ||
17325                         minor < DB_VERSION_MINOR )
17326                 {
17327                         printf("Berkeley DB version mismatch\n"
17328                                 "\theader: %s\n\tlibrary: %s\n",
17329                                 DB_VERSION_STRING, version);
17330                         return 1;
17331                 }
17332         }
17333 #endif
17334
17335 #if DB_VERSION_MAJOR > 2
17336         db_env_create( NULL, 0 );
17337 #elif DB_VERSION_MAJOR > 1
17338         db_appexit( NULL );
17339 #else
17340         (void) dbopen( NULL, 0, 0, 0, NULL);
17341 #endif
17342
17343 ; return 0; }
17344 EOF
17345 if { (eval echo configure:17344: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17346   rm -rf conftest*
17347   ol_cv_db_db_4_dot_3=yes
17348 else
17349   echo "configure: failed program was:" >&5
17350   cat conftest.$ac_ext >&5
17351   rm -rf conftest*
17352   ol_cv_db_db_4_dot_3=no
17353 fi
17354 rm -f conftest*
17355
17356         LIBS="$ol_LIBS"
17357
17358 fi
17359
17360 echo "$ac_t""$ol_cv_db_db_4_dot_3" 1>&6
17361
17362         if test $ol_cv_db_db_4_dot_3 = yes ; then
17363                 ol_cv_lib_db=-ldb-4.3
17364         fi
17365 fi
17366
17367 if test $ol_cv_lib_db = no ; then
17368         echo $ac_n "checking for Berkeley DB link (-ldb-4-3)""... $ac_c" 1>&6
17369 echo "configure:17368: checking for Berkeley DB link (-ldb-4-3)" >&5
17370 if eval "test \"\${ol_cv_db_db_4_3+set}\" = set"; then
17371   echo $ac_n "(cached) $ac_c" 1>&6
17372 else
17373   
17374         ol_DB_LIB=-ldb-4-3
17375         ol_LIBS=$LIBS
17376         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17377
17378         cat > conftest.$ac_ext <<EOF
17379 #line 17378 "configure"
17380 #include "confdefs.h"
17381
17382 #ifdef HAVE_DB_185_H
17383 # include <db_185.h>
17384 #else
17385 # include <db.h>
17386 #endif
17387
17388 #ifndef DB_VERSION_MAJOR
17389 # define DB_VERSION_MAJOR 1
17390 #endif
17391
17392 #ifndef NULL
17393 #define NULL ((void*)0)
17394 #endif
17395
17396 int main() {
17397
17398 #if DB_VERSION_MAJOR > 1
17399         {
17400                 char *version;
17401                 int major, minor, patch;
17402
17403                 version = db_version( &major, &minor, &patch );
17404
17405                 if( major != DB_VERSION_MAJOR ||
17406                         minor < DB_VERSION_MINOR )
17407                 {
17408                         printf("Berkeley DB version mismatch\n"
17409                                 "\theader: %s\n\tlibrary: %s\n",
17410                                 DB_VERSION_STRING, version);
17411                         return 1;
17412                 }
17413         }
17414 #endif
17415
17416 #if DB_VERSION_MAJOR > 2
17417         db_env_create( NULL, 0 );
17418 #elif DB_VERSION_MAJOR > 1
17419         db_appexit( NULL );
17420 #else
17421         (void) dbopen( NULL, 0, 0, 0, NULL);
17422 #endif
17423
17424 ; return 0; }
17425 EOF
17426 if { (eval echo configure:17425: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17427   rm -rf conftest*
17428   ol_cv_db_db_4_3=yes
17429 else
17430   echo "configure: failed program was:" >&5
17431   cat conftest.$ac_ext >&5
17432   rm -rf conftest*
17433   ol_cv_db_db_4_3=no
17434 fi
17435 rm -f conftest*
17436
17437         LIBS="$ol_LIBS"
17438
17439 fi
17440
17441 echo "$ac_t""$ol_cv_db_db_4_3" 1>&6
17442
17443         if test $ol_cv_db_db_4_3 = yes ; then
17444                 ol_cv_lib_db=-ldb-4-3
17445         fi
17446 fi
17447
17448 if test $ol_cv_lib_db = no ; then
17449         echo $ac_n "checking for Berkeley DB link (-ldb42)""... $ac_c" 1>&6
17450 echo "configure:17449: checking for Berkeley DB link (-ldb42)" >&5
17451 if eval "test \"\${ol_cv_db_db42+set}\" = set"; then
17452   echo $ac_n "(cached) $ac_c" 1>&6
17453 else
17454   
17455         ol_DB_LIB=-ldb42
17456         ol_LIBS=$LIBS
17457         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17458
17459         cat > conftest.$ac_ext <<EOF
17460 #line 17459 "configure"
17461 #include "confdefs.h"
17462
17463 #ifdef HAVE_DB_185_H
17464 # include <db_185.h>
17465 #else
17466 # include <db.h>
17467 #endif
17468
17469 #ifndef DB_VERSION_MAJOR
17470 # define DB_VERSION_MAJOR 1
17471 #endif
17472
17473 #ifndef NULL
17474 #define NULL ((void*)0)
17475 #endif
17476
17477 int main() {
17478
17479 #if DB_VERSION_MAJOR > 1
17480         {
17481                 char *version;
17482                 int major, minor, patch;
17483
17484                 version = db_version( &major, &minor, &patch );
17485
17486                 if( major != DB_VERSION_MAJOR ||
17487                         minor < DB_VERSION_MINOR )
17488                 {
17489                         printf("Berkeley DB version mismatch\n"
17490                                 "\theader: %s\n\tlibrary: %s\n",
17491                                 DB_VERSION_STRING, version);
17492                         return 1;
17493                 }
17494         }
17495 #endif
17496
17497 #if DB_VERSION_MAJOR > 2
17498         db_env_create( NULL, 0 );
17499 #elif DB_VERSION_MAJOR > 1
17500         db_appexit( NULL );
17501 #else
17502         (void) dbopen( NULL, 0, 0, 0, NULL);
17503 #endif
17504
17505 ; return 0; }
17506 EOF
17507 if { (eval echo configure:17506: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17508   rm -rf conftest*
17509   ol_cv_db_db42=yes
17510 else
17511   echo "configure: failed program was:" >&5
17512   cat conftest.$ac_ext >&5
17513   rm -rf conftest*
17514   ol_cv_db_db42=no
17515 fi
17516 rm -f conftest*
17517
17518         LIBS="$ol_LIBS"
17519
17520 fi
17521
17522 echo "$ac_t""$ol_cv_db_db42" 1>&6
17523
17524         if test $ol_cv_db_db42 = yes ; then
17525                 ol_cv_lib_db=-ldb42
17526         fi
17527 fi
17528
17529 if test $ol_cv_lib_db = no ; then
17530         echo $ac_n "checking for Berkeley DB link (-ldb-42)""... $ac_c" 1>&6
17531 echo "configure:17530: checking for Berkeley DB link (-ldb-42)" >&5
17532 if eval "test \"\${ol_cv_db_db_42+set}\" = set"; then
17533   echo $ac_n "(cached) $ac_c" 1>&6
17534 else
17535   
17536         ol_DB_LIB=-ldb-42
17537         ol_LIBS=$LIBS
17538         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17539
17540         cat > conftest.$ac_ext <<EOF
17541 #line 17540 "configure"
17542 #include "confdefs.h"
17543
17544 #ifdef HAVE_DB_185_H
17545 # include <db_185.h>
17546 #else
17547 # include <db.h>
17548 #endif
17549
17550 #ifndef DB_VERSION_MAJOR
17551 # define DB_VERSION_MAJOR 1
17552 #endif
17553
17554 #ifndef NULL
17555 #define NULL ((void*)0)
17556 #endif
17557
17558 int main() {
17559
17560 #if DB_VERSION_MAJOR > 1
17561         {
17562                 char *version;
17563                 int major, minor, patch;
17564
17565                 version = db_version( &major, &minor, &patch );
17566
17567                 if( major != DB_VERSION_MAJOR ||
17568                         minor < DB_VERSION_MINOR )
17569                 {
17570                         printf("Berkeley DB version mismatch\n"
17571                                 "\theader: %s\n\tlibrary: %s\n",
17572                                 DB_VERSION_STRING, version);
17573                         return 1;
17574                 }
17575         }
17576 #endif
17577
17578 #if DB_VERSION_MAJOR > 2
17579         db_env_create( NULL, 0 );
17580 #elif DB_VERSION_MAJOR > 1
17581         db_appexit( NULL );
17582 #else
17583         (void) dbopen( NULL, 0, 0, 0, NULL);
17584 #endif
17585
17586 ; return 0; }
17587 EOF
17588 if { (eval echo configure:17587: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17589   rm -rf conftest*
17590   ol_cv_db_db_42=yes
17591 else
17592   echo "configure: failed program was:" >&5
17593   cat conftest.$ac_ext >&5
17594   rm -rf conftest*
17595   ol_cv_db_db_42=no
17596 fi
17597 rm -f conftest*
17598
17599         LIBS="$ol_LIBS"
17600
17601 fi
17602
17603 echo "$ac_t""$ol_cv_db_db_42" 1>&6
17604
17605         if test $ol_cv_db_db_42 = yes ; then
17606                 ol_cv_lib_db=-ldb-42
17607         fi
17608 fi
17609
17610 if test $ol_cv_lib_db = no ; then
17611         echo $ac_n "checking for Berkeley DB link (-ldb-4.2)""... $ac_c" 1>&6
17612 echo "configure:17611: checking for Berkeley DB link (-ldb-4.2)" >&5
17613 if eval "test \"\${ol_cv_db_db_4_dot_2+set}\" = set"; then
17614   echo $ac_n "(cached) $ac_c" 1>&6
17615 else
17616   
17617         ol_DB_LIB=-ldb-4.2
17618         ol_LIBS=$LIBS
17619         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17620
17621         cat > conftest.$ac_ext <<EOF
17622 #line 17621 "configure"
17623 #include "confdefs.h"
17624
17625 #ifdef HAVE_DB_185_H
17626 # include <db_185.h>
17627 #else
17628 # include <db.h>
17629 #endif
17630
17631 #ifndef DB_VERSION_MAJOR
17632 # define DB_VERSION_MAJOR 1
17633 #endif
17634
17635 #ifndef NULL
17636 #define NULL ((void*)0)
17637 #endif
17638
17639 int main() {
17640
17641 #if DB_VERSION_MAJOR > 1
17642         {
17643                 char *version;
17644                 int major, minor, patch;
17645
17646                 version = db_version( &major, &minor, &patch );
17647
17648                 if( major != DB_VERSION_MAJOR ||
17649                         minor < DB_VERSION_MINOR )
17650                 {
17651                         printf("Berkeley DB version mismatch\n"
17652                                 "\theader: %s\n\tlibrary: %s\n",
17653                                 DB_VERSION_STRING, version);
17654                         return 1;
17655                 }
17656         }
17657 #endif
17658
17659 #if DB_VERSION_MAJOR > 2
17660         db_env_create( NULL, 0 );
17661 #elif DB_VERSION_MAJOR > 1
17662         db_appexit( NULL );
17663 #else
17664         (void) dbopen( NULL, 0, 0, 0, NULL);
17665 #endif
17666
17667 ; return 0; }
17668 EOF
17669 if { (eval echo configure:17668: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17670   rm -rf conftest*
17671   ol_cv_db_db_4_dot_2=yes
17672 else
17673   echo "configure: failed program was:" >&5
17674   cat conftest.$ac_ext >&5
17675   rm -rf conftest*
17676   ol_cv_db_db_4_dot_2=no
17677 fi
17678 rm -f conftest*
17679
17680         LIBS="$ol_LIBS"
17681
17682 fi
17683
17684 echo "$ac_t""$ol_cv_db_db_4_dot_2" 1>&6
17685
17686         if test $ol_cv_db_db_4_dot_2 = yes ; then
17687                 ol_cv_lib_db=-ldb-4.2
17688         fi
17689 fi
17690
17691 if test $ol_cv_lib_db = no ; then
17692         echo $ac_n "checking for Berkeley DB link (-ldb-4-2)""... $ac_c" 1>&6
17693 echo "configure:17692: checking for Berkeley DB link (-ldb-4-2)" >&5
17694 if eval "test \"\${ol_cv_db_db_4_2+set}\" = set"; then
17695   echo $ac_n "(cached) $ac_c" 1>&6
17696 else
17697   
17698         ol_DB_LIB=-ldb-4-2
17699         ol_LIBS=$LIBS
17700         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17701
17702         cat > conftest.$ac_ext <<EOF
17703 #line 17702 "configure"
17704 #include "confdefs.h"
17705
17706 #ifdef HAVE_DB_185_H
17707 # include <db_185.h>
17708 #else
17709 # include <db.h>
17710 #endif
17711
17712 #ifndef DB_VERSION_MAJOR
17713 # define DB_VERSION_MAJOR 1
17714 #endif
17715
17716 #ifndef NULL
17717 #define NULL ((void*)0)
17718 #endif
17719
17720 int main() {
17721
17722 #if DB_VERSION_MAJOR > 1
17723         {
17724                 char *version;
17725                 int major, minor, patch;
17726
17727                 version = db_version( &major, &minor, &patch );
17728
17729                 if( major != DB_VERSION_MAJOR ||
17730                         minor < DB_VERSION_MINOR )
17731                 {
17732                         printf("Berkeley DB version mismatch\n"
17733                                 "\theader: %s\n\tlibrary: %s\n",
17734                                 DB_VERSION_STRING, version);
17735                         return 1;
17736                 }
17737         }
17738 #endif
17739
17740 #if DB_VERSION_MAJOR > 2
17741         db_env_create( NULL, 0 );
17742 #elif DB_VERSION_MAJOR > 1
17743         db_appexit( NULL );
17744 #else
17745         (void) dbopen( NULL, 0, 0, 0, NULL);
17746 #endif
17747
17748 ; return 0; }
17749 EOF
17750 if { (eval echo configure:17749: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17751   rm -rf conftest*
17752   ol_cv_db_db_4_2=yes
17753 else
17754   echo "configure: failed program was:" >&5
17755   cat conftest.$ac_ext >&5
17756   rm -rf conftest*
17757   ol_cv_db_db_4_2=no
17758 fi
17759 rm -f conftest*
17760
17761         LIBS="$ol_LIBS"
17762
17763 fi
17764
17765 echo "$ac_t""$ol_cv_db_db_4_2" 1>&6
17766
17767         if test $ol_cv_db_db_4_2 = yes ; then
17768                 ol_cv_lib_db=-ldb-4-2
17769         fi
17770 fi
17771
17772 if test $ol_cv_lib_db = no ; then
17773         echo $ac_n "checking for Berkeley DB link (-ldb-4)""... $ac_c" 1>&6
17774 echo "configure:17773: checking for Berkeley DB link (-ldb-4)" >&5
17775 if eval "test \"\${ol_cv_db_db_4+set}\" = set"; then
17776   echo $ac_n "(cached) $ac_c" 1>&6
17777 else
17778   
17779         ol_DB_LIB=-ldb-4
17780         ol_LIBS=$LIBS
17781         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17782
17783         cat > conftest.$ac_ext <<EOF
17784 #line 17783 "configure"
17785 #include "confdefs.h"
17786
17787 #ifdef HAVE_DB_185_H
17788 # include <db_185.h>
17789 #else
17790 # include <db.h>
17791 #endif
17792
17793 #ifndef DB_VERSION_MAJOR
17794 # define DB_VERSION_MAJOR 1
17795 #endif
17796
17797 #ifndef NULL
17798 #define NULL ((void*)0)
17799 #endif
17800
17801 int main() {
17802
17803 #if DB_VERSION_MAJOR > 1
17804         {
17805                 char *version;
17806                 int major, minor, patch;
17807
17808                 version = db_version( &major, &minor, &patch );
17809
17810                 if( major != DB_VERSION_MAJOR ||
17811                         minor < DB_VERSION_MINOR )
17812                 {
17813                         printf("Berkeley DB version mismatch\n"
17814                                 "\theader: %s\n\tlibrary: %s\n",
17815                                 DB_VERSION_STRING, version);
17816                         return 1;
17817                 }
17818         }
17819 #endif
17820
17821 #if DB_VERSION_MAJOR > 2
17822         db_env_create( NULL, 0 );
17823 #elif DB_VERSION_MAJOR > 1
17824         db_appexit( NULL );
17825 #else
17826         (void) dbopen( NULL, 0, 0, 0, NULL);
17827 #endif
17828
17829 ; return 0; }
17830 EOF
17831 if { (eval echo configure:17830: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17832   rm -rf conftest*
17833   ol_cv_db_db_4=yes
17834 else
17835   echo "configure: failed program was:" >&5
17836   cat conftest.$ac_ext >&5
17837   rm -rf conftest*
17838   ol_cv_db_db_4=no
17839 fi
17840 rm -f conftest*
17841
17842         LIBS="$ol_LIBS"
17843
17844 fi
17845
17846 echo "$ac_t""$ol_cv_db_db_4" 1>&6
17847
17848         if test $ol_cv_db_db_4 = yes ; then
17849                 ol_cv_lib_db=-ldb-4
17850         fi
17851 fi
17852
17853 if test $ol_cv_lib_db = no ; then
17854         echo $ac_n "checking for Berkeley DB link (-ldb4)""... $ac_c" 1>&6
17855 echo "configure:17854: checking for Berkeley DB link (-ldb4)" >&5
17856 if eval "test \"\${ol_cv_db_db4+set}\" = set"; then
17857   echo $ac_n "(cached) $ac_c" 1>&6
17858 else
17859   
17860         ol_DB_LIB=-ldb4
17861         ol_LIBS=$LIBS
17862         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17863
17864         cat > conftest.$ac_ext <<EOF
17865 #line 17864 "configure"
17866 #include "confdefs.h"
17867
17868 #ifdef HAVE_DB_185_H
17869 # include <db_185.h>
17870 #else
17871 # include <db.h>
17872 #endif
17873
17874 #ifndef DB_VERSION_MAJOR
17875 # define DB_VERSION_MAJOR 1
17876 #endif
17877
17878 #ifndef NULL
17879 #define NULL ((void*)0)
17880 #endif
17881
17882 int main() {
17883
17884 #if DB_VERSION_MAJOR > 1
17885         {
17886                 char *version;
17887                 int major, minor, patch;
17888
17889                 version = db_version( &major, &minor, &patch );
17890
17891                 if( major != DB_VERSION_MAJOR ||
17892                         minor < DB_VERSION_MINOR )
17893                 {
17894                         printf("Berkeley DB version mismatch\n"
17895                                 "\theader: %s\n\tlibrary: %s\n",
17896                                 DB_VERSION_STRING, version);
17897                         return 1;
17898                 }
17899         }
17900 #endif
17901
17902 #if DB_VERSION_MAJOR > 2
17903         db_env_create( NULL, 0 );
17904 #elif DB_VERSION_MAJOR > 1
17905         db_appexit( NULL );
17906 #else
17907         (void) dbopen( NULL, 0, 0, 0, NULL);
17908 #endif
17909
17910 ; return 0; }
17911 EOF
17912 if { (eval echo configure:17911: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17913   rm -rf conftest*
17914   ol_cv_db_db4=yes
17915 else
17916   echo "configure: failed program was:" >&5
17917   cat conftest.$ac_ext >&5
17918   rm -rf conftest*
17919   ol_cv_db_db4=no
17920 fi
17921 rm -f conftest*
17922
17923         LIBS="$ol_LIBS"
17924
17925 fi
17926
17927 echo "$ac_t""$ol_cv_db_db4" 1>&6
17928
17929         if test $ol_cv_db_db4 = yes ; then
17930                 ol_cv_lib_db=-ldb4
17931         fi
17932 fi
17933
17934 if test $ol_cv_lib_db = no ; then
17935         echo $ac_n "checking for Berkeley DB link (-ldb)""... $ac_c" 1>&6
17936 echo "configure:17935: checking for Berkeley DB link (-ldb)" >&5
17937 if eval "test \"\${ol_cv_db_db+set}\" = set"; then
17938   echo $ac_n "(cached) $ac_c" 1>&6
17939 else
17940   
17941         ol_DB_LIB=-ldb
17942         ol_LIBS=$LIBS
17943         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17944
17945         cat > conftest.$ac_ext <<EOF
17946 #line 17945 "configure"
17947 #include "confdefs.h"
17948
17949 #ifdef HAVE_DB_185_H
17950 # include <db_185.h>
17951 #else
17952 # include <db.h>
17953 #endif
17954
17955 #ifndef DB_VERSION_MAJOR
17956 # define DB_VERSION_MAJOR 1
17957 #endif
17958
17959 #ifndef NULL
17960 #define NULL ((void*)0)
17961 #endif
17962
17963 int main() {
17964
17965 #if DB_VERSION_MAJOR > 1
17966         {
17967                 char *version;
17968                 int major, minor, patch;
17969
17970                 version = db_version( &major, &minor, &patch );
17971
17972                 if( major != DB_VERSION_MAJOR ||
17973                         minor < DB_VERSION_MINOR )
17974                 {
17975                         printf("Berkeley DB version mismatch\n"
17976                                 "\theader: %s\n\tlibrary: %s\n",
17977                                 DB_VERSION_STRING, version);
17978                         return 1;
17979                 }
17980         }
17981 #endif
17982
17983 #if DB_VERSION_MAJOR > 2
17984         db_env_create( NULL, 0 );
17985 #elif DB_VERSION_MAJOR > 1
17986         db_appexit( NULL );
17987 #else
17988         (void) dbopen( NULL, 0, 0, 0, NULL);
17989 #endif
17990
17991 ; return 0; }
17992 EOF
17993 if { (eval echo configure:17992: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17994   rm -rf conftest*
17995   ol_cv_db_db=yes
17996 else
17997   echo "configure: failed program was:" >&5
17998   cat conftest.$ac_ext >&5
17999   rm -rf conftest*
18000   ol_cv_db_db=no
18001 fi
18002 rm -f conftest*
18003
18004         LIBS="$ol_LIBS"
18005
18006 fi
18007
18008 echo "$ac_t""$ol_cv_db_db" 1>&6
18009
18010         if test $ol_cv_db_db = yes ; then
18011                 ol_cv_lib_db=-ldb
18012         fi
18013 fi
18014
18015 if test $ol_cv_lib_db = no ; then
18016         echo $ac_n "checking for Berkeley DB link (-ldb41)""... $ac_c" 1>&6
18017 echo "configure:18016: checking for Berkeley DB link (-ldb41)" >&5
18018 if eval "test \"\${ol_cv_db_db41+set}\" = set"; then
18019   echo $ac_n "(cached) $ac_c" 1>&6
18020 else
18021   
18022         ol_DB_LIB=-ldb41
18023         ol_LIBS=$LIBS
18024         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18025
18026         cat > conftest.$ac_ext <<EOF
18027 #line 18026 "configure"
18028 #include "confdefs.h"
18029
18030 #ifdef HAVE_DB_185_H
18031 # include <db_185.h>
18032 #else
18033 # include <db.h>
18034 #endif
18035
18036 #ifndef DB_VERSION_MAJOR
18037 # define DB_VERSION_MAJOR 1
18038 #endif
18039
18040 #ifndef NULL
18041 #define NULL ((void*)0)
18042 #endif
18043
18044 int main() {
18045
18046 #if DB_VERSION_MAJOR > 1
18047         {
18048                 char *version;
18049                 int major, minor, patch;
18050
18051                 version = db_version( &major, &minor, &patch );
18052
18053                 if( major != DB_VERSION_MAJOR ||
18054                         minor < DB_VERSION_MINOR )
18055                 {
18056                         printf("Berkeley DB version mismatch\n"
18057                                 "\theader: %s\n\tlibrary: %s\n",
18058                                 DB_VERSION_STRING, version);
18059                         return 1;
18060                 }
18061         }
18062 #endif
18063
18064 #if DB_VERSION_MAJOR > 2
18065         db_env_create( NULL, 0 );
18066 #elif DB_VERSION_MAJOR > 1
18067         db_appexit( NULL );
18068 #else
18069         (void) dbopen( NULL, 0, 0, 0, NULL);
18070 #endif
18071
18072 ; return 0; }
18073 EOF
18074 if { (eval echo configure:18073: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18075   rm -rf conftest*
18076   ol_cv_db_db41=yes
18077 else
18078   echo "configure: failed program was:" >&5
18079   cat conftest.$ac_ext >&5
18080   rm -rf conftest*
18081   ol_cv_db_db41=no
18082 fi
18083 rm -f conftest*
18084
18085         LIBS="$ol_LIBS"
18086
18087 fi
18088
18089 echo "$ac_t""$ol_cv_db_db41" 1>&6
18090
18091         if test $ol_cv_db_db41 = yes ; then
18092                 ol_cv_lib_db=-ldb41
18093         fi
18094 fi
18095
18096 if test $ol_cv_lib_db = no ; then
18097         echo $ac_n "checking for Berkeley DB link (-ldb-41)""... $ac_c" 1>&6
18098 echo "configure:18097: checking for Berkeley DB link (-ldb-41)" >&5
18099 if eval "test \"\${ol_cv_db_db_41+set}\" = set"; then
18100   echo $ac_n "(cached) $ac_c" 1>&6
18101 else
18102   
18103         ol_DB_LIB=-ldb-41
18104         ol_LIBS=$LIBS
18105         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18106
18107         cat > conftest.$ac_ext <<EOF
18108 #line 18107 "configure"
18109 #include "confdefs.h"
18110
18111 #ifdef HAVE_DB_185_H
18112 # include <db_185.h>
18113 #else
18114 # include <db.h>
18115 #endif
18116
18117 #ifndef DB_VERSION_MAJOR
18118 # define DB_VERSION_MAJOR 1
18119 #endif
18120
18121 #ifndef NULL
18122 #define NULL ((void*)0)
18123 #endif
18124
18125 int main() {
18126
18127 #if DB_VERSION_MAJOR > 1
18128         {
18129                 char *version;
18130                 int major, minor, patch;
18131
18132                 version = db_version( &major, &minor, &patch );
18133
18134                 if( major != DB_VERSION_MAJOR ||
18135                         minor < DB_VERSION_MINOR )
18136                 {
18137                         printf("Berkeley DB version mismatch\n"
18138                                 "\theader: %s\n\tlibrary: %s\n",
18139                                 DB_VERSION_STRING, version);
18140                         return 1;
18141                 }
18142         }
18143 #endif
18144
18145 #if DB_VERSION_MAJOR > 2
18146         db_env_create( NULL, 0 );
18147 #elif DB_VERSION_MAJOR > 1
18148         db_appexit( NULL );
18149 #else
18150         (void) dbopen( NULL, 0, 0, 0, NULL);
18151 #endif
18152
18153 ; return 0; }
18154 EOF
18155 if { (eval echo configure:18154: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18156   rm -rf conftest*
18157   ol_cv_db_db_41=yes
18158 else
18159   echo "configure: failed program was:" >&5
18160   cat conftest.$ac_ext >&5
18161   rm -rf conftest*
18162   ol_cv_db_db_41=no
18163 fi
18164 rm -f conftest*
18165
18166         LIBS="$ol_LIBS"
18167
18168 fi
18169
18170 echo "$ac_t""$ol_cv_db_db_41" 1>&6
18171
18172         if test $ol_cv_db_db_41 = yes ; then
18173                 ol_cv_lib_db=-ldb-41
18174         fi
18175 fi
18176
18177 if test $ol_cv_lib_db = no ; then
18178         echo $ac_n "checking for Berkeley DB link (-ldb-4.1)""... $ac_c" 1>&6
18179 echo "configure:18178: checking for Berkeley DB link (-ldb-4.1)" >&5
18180 if eval "test \"\${ol_cv_db_db_4_dot_1+set}\" = set"; then
18181   echo $ac_n "(cached) $ac_c" 1>&6
18182 else
18183   
18184         ol_DB_LIB=-ldb-4.1
18185         ol_LIBS=$LIBS
18186         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18187
18188         cat > conftest.$ac_ext <<EOF
18189 #line 18188 "configure"
18190 #include "confdefs.h"
18191
18192 #ifdef HAVE_DB_185_H
18193 # include <db_185.h>
18194 #else
18195 # include <db.h>
18196 #endif
18197
18198 #ifndef DB_VERSION_MAJOR
18199 # define DB_VERSION_MAJOR 1
18200 #endif
18201
18202 #ifndef NULL
18203 #define NULL ((void*)0)
18204 #endif
18205
18206 int main() {
18207
18208 #if DB_VERSION_MAJOR > 1
18209         {
18210                 char *version;
18211                 int major, minor, patch;
18212
18213                 version = db_version( &major, &minor, &patch );
18214
18215                 if( major != DB_VERSION_MAJOR ||
18216                         minor < DB_VERSION_MINOR )
18217                 {
18218                         printf("Berkeley DB version mismatch\n"
18219                                 "\theader: %s\n\tlibrary: %s\n",
18220                                 DB_VERSION_STRING, version);
18221                         return 1;
18222                 }
18223         }
18224 #endif
18225
18226 #if DB_VERSION_MAJOR > 2
18227         db_env_create( NULL, 0 );
18228 #elif DB_VERSION_MAJOR > 1
18229         db_appexit( NULL );
18230 #else
18231         (void) dbopen( NULL, 0, 0, 0, NULL);
18232 #endif
18233
18234 ; return 0; }
18235 EOF
18236 if { (eval echo configure:18235: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18237   rm -rf conftest*
18238   ol_cv_db_db_4_dot_1=yes
18239 else
18240   echo "configure: failed program was:" >&5
18241   cat conftest.$ac_ext >&5
18242   rm -rf conftest*
18243   ol_cv_db_db_4_dot_1=no
18244 fi
18245 rm -f conftest*
18246
18247         LIBS="$ol_LIBS"
18248
18249 fi
18250
18251 echo "$ac_t""$ol_cv_db_db_4_dot_1" 1>&6
18252
18253         if test $ol_cv_db_db_4_dot_1 = yes ; then
18254                 ol_cv_lib_db=-ldb-4.1
18255         fi
18256 fi
18257
18258 if test $ol_cv_lib_db = no ; then
18259         echo $ac_n "checking for Berkeley DB link (-ldb-4-1)""... $ac_c" 1>&6
18260 echo "configure:18259: checking for Berkeley DB link (-ldb-4-1)" >&5
18261 if eval "test \"\${ol_cv_db_db_4_1+set}\" = set"; then
18262   echo $ac_n "(cached) $ac_c" 1>&6
18263 else
18264   
18265         ol_DB_LIB=-ldb-4-1
18266         ol_LIBS=$LIBS
18267         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18268
18269         cat > conftest.$ac_ext <<EOF
18270 #line 18269 "configure"
18271 #include "confdefs.h"
18272
18273 #ifdef HAVE_DB_185_H
18274 # include <db_185.h>
18275 #else
18276 # include <db.h>
18277 #endif
18278
18279 #ifndef DB_VERSION_MAJOR
18280 # define DB_VERSION_MAJOR 1
18281 #endif
18282
18283 #ifndef NULL
18284 #define NULL ((void*)0)
18285 #endif
18286
18287 int main() {
18288
18289 #if DB_VERSION_MAJOR > 1
18290         {
18291                 char *version;
18292                 int major, minor, patch;
18293
18294                 version = db_version( &major, &minor, &patch );
18295
18296                 if( major != DB_VERSION_MAJOR ||
18297                         minor < DB_VERSION_MINOR )
18298                 {
18299                         printf("Berkeley DB version mismatch\n"
18300                                 "\theader: %s\n\tlibrary: %s\n",
18301                                 DB_VERSION_STRING, version);
18302                         return 1;
18303                 }
18304         }
18305 #endif
18306
18307 #if DB_VERSION_MAJOR > 2
18308         db_env_create( NULL, 0 );
18309 #elif DB_VERSION_MAJOR > 1
18310         db_appexit( NULL );
18311 #else
18312         (void) dbopen( NULL, 0, 0, 0, NULL);
18313 #endif
18314
18315 ; return 0; }
18316 EOF
18317 if { (eval echo configure:18316: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18318   rm -rf conftest*
18319   ol_cv_db_db_4_1=yes
18320 else
18321   echo "configure: failed program was:" >&5
18322   cat conftest.$ac_ext >&5
18323   rm -rf conftest*
18324   ol_cv_db_db_4_1=no
18325 fi
18326 rm -f conftest*
18327
18328         LIBS="$ol_LIBS"
18329
18330 fi
18331
18332 echo "$ac_t""$ol_cv_db_db_4_1" 1>&6
18333
18334         if test $ol_cv_db_db_4_1 = yes ; then
18335                 ol_cv_lib_db=-ldb-4-1
18336         fi
18337 fi
18338
18339 if test $ol_cv_lib_db = no ; then
18340         echo $ac_n "checking for Berkeley DB link (-ldb3)""... $ac_c" 1>&6
18341 echo "configure:18340: checking for Berkeley DB link (-ldb3)" >&5
18342 if eval "test \"\${ol_cv_db_db3+set}\" = set"; then
18343   echo $ac_n "(cached) $ac_c" 1>&6
18344 else
18345   
18346         ol_DB_LIB=-ldb3
18347         ol_LIBS=$LIBS
18348         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18349
18350         cat > conftest.$ac_ext <<EOF
18351 #line 18350 "configure"
18352 #include "confdefs.h"
18353
18354 #ifdef HAVE_DB_185_H
18355 # include <db_185.h>
18356 #else
18357 # include <db.h>
18358 #endif
18359
18360 #ifndef DB_VERSION_MAJOR
18361 # define DB_VERSION_MAJOR 1
18362 #endif
18363
18364 #ifndef NULL
18365 #define NULL ((void*)0)
18366 #endif
18367
18368 int main() {
18369
18370 #if DB_VERSION_MAJOR > 1
18371         {
18372                 char *version;
18373                 int major, minor, patch;
18374
18375                 version = db_version( &major, &minor, &patch );
18376
18377                 if( major != DB_VERSION_MAJOR ||
18378                         minor < DB_VERSION_MINOR )
18379                 {
18380                         printf("Berkeley DB version mismatch\n"
18381                                 "\theader: %s\n\tlibrary: %s\n",
18382                                 DB_VERSION_STRING, version);
18383                         return 1;
18384                 }
18385         }
18386 #endif
18387
18388 #if DB_VERSION_MAJOR > 2
18389         db_env_create( NULL, 0 );
18390 #elif DB_VERSION_MAJOR > 1
18391         db_appexit( NULL );
18392 #else
18393         (void) dbopen( NULL, 0, 0, 0, NULL);
18394 #endif
18395
18396 ; return 0; }
18397 EOF
18398 if { (eval echo configure:18397: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18399   rm -rf conftest*
18400   ol_cv_db_db3=yes
18401 else
18402   echo "configure: failed program was:" >&5
18403   cat conftest.$ac_ext >&5
18404   rm -rf conftest*
18405   ol_cv_db_db3=no
18406 fi
18407 rm -f conftest*
18408
18409         LIBS="$ol_LIBS"
18410
18411 fi
18412
18413 echo "$ac_t""$ol_cv_db_db3" 1>&6
18414
18415         if test $ol_cv_db_db3 = yes ; then
18416                 ol_cv_lib_db=-ldb3
18417         fi
18418 fi
18419
18420 if test $ol_cv_lib_db = no ; then
18421         echo $ac_n "checking for Berkeley DB link (-ldb-3)""... $ac_c" 1>&6
18422 echo "configure:18421: checking for Berkeley DB link (-ldb-3)" >&5
18423 if eval "test \"\${ol_cv_db_db_3+set}\" = set"; then
18424   echo $ac_n "(cached) $ac_c" 1>&6
18425 else
18426   
18427         ol_DB_LIB=-ldb-3
18428         ol_LIBS=$LIBS
18429         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18430
18431         cat > conftest.$ac_ext <<EOF
18432 #line 18431 "configure"
18433 #include "confdefs.h"
18434
18435 #ifdef HAVE_DB_185_H
18436 # include <db_185.h>
18437 #else
18438 # include <db.h>
18439 #endif
18440
18441 #ifndef DB_VERSION_MAJOR
18442 # define DB_VERSION_MAJOR 1
18443 #endif
18444
18445 #ifndef NULL
18446 #define NULL ((void*)0)
18447 #endif
18448
18449 int main() {
18450
18451 #if DB_VERSION_MAJOR > 1
18452         {
18453                 char *version;
18454                 int major, minor, patch;
18455
18456                 version = db_version( &major, &minor, &patch );
18457
18458                 if( major != DB_VERSION_MAJOR ||
18459                         minor < DB_VERSION_MINOR )
18460                 {
18461                         printf("Berkeley DB version mismatch\n"
18462                                 "\theader: %s\n\tlibrary: %s\n",
18463                                 DB_VERSION_STRING, version);
18464                         return 1;
18465                 }
18466         }
18467 #endif
18468
18469 #if DB_VERSION_MAJOR > 2
18470         db_env_create( NULL, 0 );
18471 #elif DB_VERSION_MAJOR > 1
18472         db_appexit( NULL );
18473 #else
18474         (void) dbopen( NULL, 0, 0, 0, NULL);
18475 #endif
18476
18477 ; return 0; }
18478 EOF
18479 if { (eval echo configure:18478: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18480   rm -rf conftest*
18481   ol_cv_db_db_3=yes
18482 else
18483   echo "configure: failed program was:" >&5
18484   cat conftest.$ac_ext >&5
18485   rm -rf conftest*
18486   ol_cv_db_db_3=no
18487 fi
18488 rm -f conftest*
18489
18490         LIBS="$ol_LIBS"
18491
18492 fi
18493
18494 echo "$ac_t""$ol_cv_db_db_3" 1>&6
18495
18496         if test $ol_cv_db_db_3 = yes ; then
18497                 ol_cv_lib_db=-ldb-3
18498         fi
18499 fi
18500
18501 if test $ol_cv_lib_db = no ; then
18502         echo $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6
18503 echo "configure:18502: checking for Berkeley DB link (-ldb2)" >&5
18504 if eval "test \"\${ol_cv_db_db2+set}\" = set"; then
18505   echo $ac_n "(cached) $ac_c" 1>&6
18506 else
18507   
18508         ol_DB_LIB=-ldb2
18509         ol_LIBS=$LIBS
18510         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18511
18512         cat > conftest.$ac_ext <<EOF
18513 #line 18512 "configure"
18514 #include "confdefs.h"
18515
18516 #ifdef HAVE_DB_185_H
18517 # include <db_185.h>
18518 #else
18519 # include <db.h>
18520 #endif
18521
18522 #ifndef DB_VERSION_MAJOR
18523 # define DB_VERSION_MAJOR 1
18524 #endif
18525
18526 #ifndef NULL
18527 #define NULL ((void*)0)
18528 #endif
18529
18530 int main() {
18531
18532 #if DB_VERSION_MAJOR > 1
18533         {
18534                 char *version;
18535                 int major, minor, patch;
18536
18537                 version = db_version( &major, &minor, &patch );
18538
18539                 if( major != DB_VERSION_MAJOR ||
18540                         minor < DB_VERSION_MINOR )
18541                 {
18542                         printf("Berkeley DB version mismatch\n"
18543                                 "\theader: %s\n\tlibrary: %s\n",
18544                                 DB_VERSION_STRING, version);
18545                         return 1;
18546                 }
18547         }
18548 #endif
18549
18550 #if DB_VERSION_MAJOR > 2
18551         db_env_create( NULL, 0 );
18552 #elif DB_VERSION_MAJOR > 1
18553         db_appexit( NULL );
18554 #else
18555         (void) dbopen( NULL, 0, 0, 0, NULL);
18556 #endif
18557
18558 ; return 0; }
18559 EOF
18560 if { (eval echo configure:18559: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18561   rm -rf conftest*
18562   ol_cv_db_db2=yes
18563 else
18564   echo "configure: failed program was:" >&5
18565   cat conftest.$ac_ext >&5
18566   rm -rf conftest*
18567   ol_cv_db_db2=no
18568 fi
18569 rm -f conftest*
18570
18571         LIBS="$ol_LIBS"
18572
18573 fi
18574
18575 echo "$ac_t""$ol_cv_db_db2" 1>&6
18576
18577         if test $ol_cv_db_db2 = yes ; then
18578                 ol_cv_lib_db=-ldb2
18579         fi
18580 fi
18581
18582 if test $ol_cv_lib_db = no ; then
18583         echo $ac_n "checking for Berkeley DB link (-ldb-2)""... $ac_c" 1>&6
18584 echo "configure:18583: checking for Berkeley DB link (-ldb-2)" >&5
18585 if eval "test \"\${ol_cv_db_db_2+set}\" = set"; then
18586   echo $ac_n "(cached) $ac_c" 1>&6
18587 else
18588   
18589         ol_DB_LIB=-ldb-2
18590         ol_LIBS=$LIBS
18591         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18592
18593         cat > conftest.$ac_ext <<EOF
18594 #line 18593 "configure"
18595 #include "confdefs.h"
18596
18597 #ifdef HAVE_DB_185_H
18598 # include <db_185.h>
18599 #else
18600 # include <db.h>
18601 #endif
18602
18603 #ifndef DB_VERSION_MAJOR
18604 # define DB_VERSION_MAJOR 1
18605 #endif
18606
18607 #ifndef NULL
18608 #define NULL ((void*)0)
18609 #endif
18610
18611 int main() {
18612
18613 #if DB_VERSION_MAJOR > 1
18614         {
18615                 char *version;
18616                 int major, minor, patch;
18617
18618                 version = db_version( &major, &minor, &patch );
18619
18620                 if( major != DB_VERSION_MAJOR ||
18621                         minor < DB_VERSION_MINOR )
18622                 {
18623                         printf("Berkeley DB version mismatch\n"
18624                                 "\theader: %s\n\tlibrary: %s\n",
18625                                 DB_VERSION_STRING, version);
18626                         return 1;
18627                 }
18628         }
18629 #endif
18630
18631 #if DB_VERSION_MAJOR > 2
18632         db_env_create( NULL, 0 );
18633 #elif DB_VERSION_MAJOR > 1
18634         db_appexit( NULL );
18635 #else
18636         (void) dbopen( NULL, 0, 0, 0, NULL);
18637 #endif
18638
18639 ; return 0; }
18640 EOF
18641 if { (eval echo configure:18640: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18642   rm -rf conftest*
18643   ol_cv_db_db_2=yes
18644 else
18645   echo "configure: failed program was:" >&5
18646   cat conftest.$ac_ext >&5
18647   rm -rf conftest*
18648   ol_cv_db_db_2=no
18649 fi
18650 rm -f conftest*
18651
18652         LIBS="$ol_LIBS"
18653
18654 fi
18655
18656 echo "$ac_t""$ol_cv_db_db_2" 1>&6
18657
18658         if test $ol_cv_db_db_2 = yes ; then
18659                 ol_cv_lib_db=-ldb-2
18660         fi
18661 fi
18662
18663 if test $ol_cv_lib_db = no ; then
18664         echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6
18665 echo "configure:18664: checking for Berkeley DB link (-ldb1)" >&5
18666 if eval "test \"\${ol_cv_db_db1+set}\" = set"; then
18667   echo $ac_n "(cached) $ac_c" 1>&6
18668 else
18669   
18670         ol_DB_LIB=-ldb1
18671         ol_LIBS=$LIBS
18672         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18673
18674         cat > conftest.$ac_ext <<EOF
18675 #line 18674 "configure"
18676 #include "confdefs.h"
18677
18678 #ifdef HAVE_DB_185_H
18679 # include <db_185.h>
18680 #else
18681 # include <db.h>
18682 #endif
18683
18684 #ifndef DB_VERSION_MAJOR
18685 # define DB_VERSION_MAJOR 1
18686 #endif
18687
18688 #ifndef NULL
18689 #define NULL ((void*)0)
18690 #endif
18691
18692 int main() {
18693
18694 #if DB_VERSION_MAJOR > 1
18695         {
18696                 char *version;
18697                 int major, minor, patch;
18698
18699                 version = db_version( &major, &minor, &patch );
18700
18701                 if( major != DB_VERSION_MAJOR ||
18702                         minor < DB_VERSION_MINOR )
18703                 {
18704                         printf("Berkeley DB version mismatch\n"
18705                                 "\theader: %s\n\tlibrary: %s\n",
18706                                 DB_VERSION_STRING, version);
18707                         return 1;
18708                 }
18709         }
18710 #endif
18711
18712 #if DB_VERSION_MAJOR > 2
18713         db_env_create( NULL, 0 );
18714 #elif DB_VERSION_MAJOR > 1
18715         db_appexit( NULL );
18716 #else
18717         (void) dbopen( NULL, 0, 0, 0, NULL);
18718 #endif
18719
18720 ; return 0; }
18721 EOF
18722 if { (eval echo configure:18721: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18723   rm -rf conftest*
18724   ol_cv_db_db1=yes
18725 else
18726   echo "configure: failed program was:" >&5
18727   cat conftest.$ac_ext >&5
18728   rm -rf conftest*
18729   ol_cv_db_db1=no
18730 fi
18731 rm -f conftest*
18732
18733         LIBS="$ol_LIBS"
18734
18735 fi
18736
18737 echo "$ac_t""$ol_cv_db_db1" 1>&6
18738
18739         if test $ol_cv_db_db1 = yes ; then
18740                 ol_cv_lib_db=-ldb1
18741         fi
18742 fi
18743
18744 if test $ol_cv_lib_db = no ; then
18745         echo $ac_n "checking for Berkeley DB link (-ldb-1)""... $ac_c" 1>&6
18746 echo "configure:18745: checking for Berkeley DB link (-ldb-1)" >&5
18747 if eval "test \"\${ol_cv_db_db_1+set}\" = set"; then
18748   echo $ac_n "(cached) $ac_c" 1>&6
18749 else
18750   
18751         ol_DB_LIB=-ldb-1
18752         ol_LIBS=$LIBS
18753         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18754
18755         cat > conftest.$ac_ext <<EOF
18756 #line 18755 "configure"
18757 #include "confdefs.h"
18758
18759 #ifdef HAVE_DB_185_H
18760 # include <db_185.h>
18761 #else
18762 # include <db.h>
18763 #endif
18764
18765 #ifndef DB_VERSION_MAJOR
18766 # define DB_VERSION_MAJOR 1
18767 #endif
18768
18769 #ifndef NULL
18770 #define NULL ((void*)0)
18771 #endif
18772
18773 int main() {
18774
18775 #if DB_VERSION_MAJOR > 1
18776         {
18777                 char *version;
18778                 int major, minor, patch;
18779
18780                 version = db_version( &major, &minor, &patch );
18781
18782                 if( major != DB_VERSION_MAJOR ||
18783                         minor < DB_VERSION_MINOR )
18784                 {
18785                         printf("Berkeley DB version mismatch\n"
18786                                 "\theader: %s\n\tlibrary: %s\n",
18787                                 DB_VERSION_STRING, version);
18788                         return 1;
18789                 }
18790         }
18791 #endif
18792
18793 #if DB_VERSION_MAJOR > 2
18794         db_env_create( NULL, 0 );
18795 #elif DB_VERSION_MAJOR > 1
18796         db_appexit( NULL );
18797 #else
18798         (void) dbopen( NULL, 0, 0, 0, NULL);
18799 #endif
18800
18801 ; return 0; }
18802 EOF
18803 if { (eval echo configure:18802: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18804   rm -rf conftest*
18805   ol_cv_db_db_1=yes
18806 else
18807   echo "configure: failed program was:" >&5
18808   cat conftest.$ac_ext >&5
18809   rm -rf conftest*
18810   ol_cv_db_db_1=no
18811 fi
18812 rm -f conftest*
18813
18814         LIBS="$ol_LIBS"
18815
18816 fi
18817
18818 echo "$ac_t""$ol_cv_db_db_1" 1>&6
18819
18820         if test $ol_cv_db_db_1 = yes ; then
18821                 ol_cv_lib_db=-ldb-1
18822         fi
18823 fi
18824
18825
18826                 if test "$ol_cv_lib_db" != no ; then
18827                         ol_cv_berkeley_db=yes
18828                 fi
18829         fi
18830 fi
18831
18832         else
18833                 ol_cv_berkeley_db=no
18834 for ac_hdr in db.h
18835 do
18836 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
18837 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
18838 echo "configure:18837: checking for $ac_hdr" >&5
18839 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
18840   echo $ac_n "(cached) $ac_c" 1>&6
18841 else
18842   cat > conftest.$ac_ext <<EOF
18843 #line 18842 "configure"
18844 #include "confdefs.h"
18845 #include <$ac_hdr>
18846 EOF
18847 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
18848 { (eval echo configure:18847: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
18849 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
18850 if test -z "$ac_err"; then
18851   rm -rf conftest*
18852   eval "ac_cv_header_$ac_safe=yes"
18853 else
18854   echo "$ac_err" >&5
18855   echo "configure: failed program was:" >&5
18856   cat conftest.$ac_ext >&5
18857   rm -rf conftest*
18858   eval "ac_cv_header_$ac_safe=no"
18859 fi
18860 rm -f conftest*
18861 fi
18862 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
18863   echo "$ac_t""yes" 1>&6
18864     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
18865   cat >> confdefs.h <<EOF
18866 #define $ac_tr_hdr 1
18867 EOF
18868  
18869 else
18870   echo "$ac_t""no" 1>&6
18871 fi
18872 done
18873
18874 if test $ac_cv_header_db_h = yes; then
18875         ol_cv_lib_db=no
18876 if test $ol_cv_lib_db = no ; then
18877         echo $ac_n "checking for Berkeley DB link (default)""... $ac_c" 1>&6
18878 echo "configure:18877: checking for Berkeley DB link (default)" >&5
18879 if eval "test \"\${ol_cv_db_none+set}\" = set"; then
18880   echo $ac_n "(cached) $ac_c" 1>&6
18881 else
18882   
18883         ol_DB_LIB=
18884         ol_LIBS=$LIBS
18885         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18886
18887         cat > conftest.$ac_ext <<EOF
18888 #line 18887 "configure"
18889 #include "confdefs.h"
18890
18891 #ifdef HAVE_DB_185_H
18892 # include <db_185.h>
18893 #else
18894 # include <db.h>
18895 #endif
18896
18897 #ifndef DB_VERSION_MAJOR
18898 # define DB_VERSION_MAJOR 1
18899 #endif
18900
18901 #ifndef NULL
18902 #define NULL ((void*)0)
18903 #endif
18904
18905 int main() {
18906
18907 #if DB_VERSION_MAJOR > 1
18908         {
18909                 char *version;
18910                 int major, minor, patch;
18911
18912                 version = db_version( &major, &minor, &patch );
18913
18914                 if( major != DB_VERSION_MAJOR ||
18915                         minor < DB_VERSION_MINOR )
18916                 {
18917                         printf("Berkeley DB version mismatch\n"
18918                                 "\theader: %s\n\tlibrary: %s\n",
18919                                 DB_VERSION_STRING, version);
18920                         return 1;
18921                 }
18922         }
18923 #endif
18924
18925 #if DB_VERSION_MAJOR > 2
18926         db_env_create( NULL, 0 );
18927 #elif DB_VERSION_MAJOR > 1
18928         db_appexit( NULL );
18929 #else
18930         (void) dbopen( NULL, 0, 0, 0, NULL);
18931 #endif
18932
18933 ; return 0; }
18934 EOF
18935 if { (eval echo configure:18934: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18936   rm -rf conftest*
18937   ol_cv_db_none=yes
18938 else
18939   echo "configure: failed program was:" >&5
18940   cat conftest.$ac_ext >&5
18941   rm -rf conftest*
18942   ol_cv_db_none=no
18943 fi
18944 rm -f conftest*
18945
18946         LIBS="$ol_LIBS"
18947
18948 fi
18949
18950 echo "$ac_t""$ol_cv_db_none" 1>&6
18951
18952         if test $ol_cv_db_none = yes ; then
18953                 ol_cv_lib_db=yes
18954         fi
18955 fi
18956
18957 if test $ol_cv_lib_db = no ; then
18958         echo $ac_n "checking for Berkeley DB link (-ldb43)""... $ac_c" 1>&6
18959 echo "configure:18958: checking for Berkeley DB link (-ldb43)" >&5
18960 if eval "test \"\${ol_cv_db_db43+set}\" = set"; then
18961   echo $ac_n "(cached) $ac_c" 1>&6
18962 else
18963   
18964         ol_DB_LIB=-ldb43
18965         ol_LIBS=$LIBS
18966         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18967
18968         cat > conftest.$ac_ext <<EOF
18969 #line 18968 "configure"
18970 #include "confdefs.h"
18971
18972 #ifdef HAVE_DB_185_H
18973 # include <db_185.h>
18974 #else
18975 # include <db.h>
18976 #endif
18977
18978 #ifndef DB_VERSION_MAJOR
18979 # define DB_VERSION_MAJOR 1
18980 #endif
18981
18982 #ifndef NULL
18983 #define NULL ((void*)0)
18984 #endif
18985
18986 int main() {
18987
18988 #if DB_VERSION_MAJOR > 1
18989         {
18990                 char *version;
18991                 int major, minor, patch;
18992
18993                 version = db_version( &major, &minor, &patch );
18994
18995                 if( major != DB_VERSION_MAJOR ||
18996                         minor < DB_VERSION_MINOR )
18997                 {
18998                         printf("Berkeley DB version mismatch\n"
18999                                 "\theader: %s\n\tlibrary: %s\n",
19000                                 DB_VERSION_STRING, version);
19001                         return 1;
19002                 }
19003         }
19004 #endif
19005
19006 #if DB_VERSION_MAJOR > 2
19007         db_env_create( NULL, 0 );
19008 #elif DB_VERSION_MAJOR > 1
19009         db_appexit( NULL );
19010 #else
19011         (void) dbopen( NULL, 0, 0, 0, NULL);
19012 #endif
19013
19014 ; return 0; }
19015 EOF
19016 if { (eval echo configure:19015: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19017   rm -rf conftest*
19018   ol_cv_db_db43=yes
19019 else
19020   echo "configure: failed program was:" >&5
19021   cat conftest.$ac_ext >&5
19022   rm -rf conftest*
19023   ol_cv_db_db43=no
19024 fi
19025 rm -f conftest*
19026
19027         LIBS="$ol_LIBS"
19028
19029 fi
19030
19031 echo "$ac_t""$ol_cv_db_db43" 1>&6
19032
19033         if test $ol_cv_db_db43 = yes ; then
19034                 ol_cv_lib_db=-ldb43
19035         fi
19036 fi
19037
19038 if test $ol_cv_lib_db = no ; then
19039         echo $ac_n "checking for Berkeley DB link (-ldb-43)""... $ac_c" 1>&6
19040 echo "configure:19039: checking for Berkeley DB link (-ldb-43)" >&5
19041 if eval "test \"\${ol_cv_db_db_43+set}\" = set"; then
19042   echo $ac_n "(cached) $ac_c" 1>&6
19043 else
19044   
19045         ol_DB_LIB=-ldb-43
19046         ol_LIBS=$LIBS
19047         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19048
19049         cat > conftest.$ac_ext <<EOF
19050 #line 19049 "configure"
19051 #include "confdefs.h"
19052
19053 #ifdef HAVE_DB_185_H
19054 # include <db_185.h>
19055 #else
19056 # include <db.h>
19057 #endif
19058
19059 #ifndef DB_VERSION_MAJOR
19060 # define DB_VERSION_MAJOR 1
19061 #endif
19062
19063 #ifndef NULL
19064 #define NULL ((void*)0)
19065 #endif
19066
19067 int main() {
19068
19069 #if DB_VERSION_MAJOR > 1
19070         {
19071                 char *version;
19072                 int major, minor, patch;
19073
19074                 version = db_version( &major, &minor, &patch );
19075
19076                 if( major != DB_VERSION_MAJOR ||
19077                         minor < DB_VERSION_MINOR )
19078                 {
19079                         printf("Berkeley DB version mismatch\n"
19080                                 "\theader: %s\n\tlibrary: %s\n",
19081                                 DB_VERSION_STRING, version);
19082                         return 1;
19083                 }
19084         }
19085 #endif
19086
19087 #if DB_VERSION_MAJOR > 2
19088         db_env_create( NULL, 0 );
19089 #elif DB_VERSION_MAJOR > 1
19090         db_appexit( NULL );
19091 #else
19092         (void) dbopen( NULL, 0, 0, 0, NULL);
19093 #endif
19094
19095 ; return 0; }
19096 EOF
19097 if { (eval echo configure:19096: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19098   rm -rf conftest*
19099   ol_cv_db_db_43=yes
19100 else
19101   echo "configure: failed program was:" >&5
19102   cat conftest.$ac_ext >&5
19103   rm -rf conftest*
19104   ol_cv_db_db_43=no
19105 fi
19106 rm -f conftest*
19107
19108         LIBS="$ol_LIBS"
19109
19110 fi
19111
19112 echo "$ac_t""$ol_cv_db_db_43" 1>&6
19113
19114         if test $ol_cv_db_db_43 = yes ; then
19115                 ol_cv_lib_db=-ldb-43
19116         fi
19117 fi
19118
19119 if test $ol_cv_lib_db = no ; then
19120         echo $ac_n "checking for Berkeley DB link (-ldb-4.3)""... $ac_c" 1>&6
19121 echo "configure:19120: checking for Berkeley DB link (-ldb-4.3)" >&5
19122 if eval "test \"\${ol_cv_db_db_4_dot_3+set}\" = set"; then
19123   echo $ac_n "(cached) $ac_c" 1>&6
19124 else
19125   
19126         ol_DB_LIB=-ldb-4.3
19127         ol_LIBS=$LIBS
19128         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19129
19130         cat > conftest.$ac_ext <<EOF
19131 #line 19130 "configure"
19132 #include "confdefs.h"
19133
19134 #ifdef HAVE_DB_185_H
19135 # include <db_185.h>
19136 #else
19137 # include <db.h>
19138 #endif
19139
19140 #ifndef DB_VERSION_MAJOR
19141 # define DB_VERSION_MAJOR 1
19142 #endif
19143
19144 #ifndef NULL
19145 #define NULL ((void*)0)
19146 #endif
19147
19148 int main() {
19149
19150 #if DB_VERSION_MAJOR > 1
19151         {
19152                 char *version;
19153                 int major, minor, patch;
19154
19155                 version = db_version( &major, &minor, &patch );
19156
19157                 if( major != DB_VERSION_MAJOR ||
19158                         minor < DB_VERSION_MINOR )
19159                 {
19160                         printf("Berkeley DB version mismatch\n"
19161                                 "\theader: %s\n\tlibrary: %s\n",
19162                                 DB_VERSION_STRING, version);
19163                         return 1;
19164                 }
19165         }
19166 #endif
19167
19168 #if DB_VERSION_MAJOR > 2
19169         db_env_create( NULL, 0 );
19170 #elif DB_VERSION_MAJOR > 1
19171         db_appexit( NULL );
19172 #else
19173         (void) dbopen( NULL, 0, 0, 0, NULL);
19174 #endif
19175
19176 ; return 0; }
19177 EOF
19178 if { (eval echo configure:19177: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19179   rm -rf conftest*
19180   ol_cv_db_db_4_dot_3=yes
19181 else
19182   echo "configure: failed program was:" >&5
19183   cat conftest.$ac_ext >&5
19184   rm -rf conftest*
19185   ol_cv_db_db_4_dot_3=no
19186 fi
19187 rm -f conftest*
19188
19189         LIBS="$ol_LIBS"
19190
19191 fi
19192
19193 echo "$ac_t""$ol_cv_db_db_4_dot_3" 1>&6
19194
19195         if test $ol_cv_db_db_4_dot_3 = yes ; then
19196                 ol_cv_lib_db=-ldb-4.3
19197         fi
19198 fi
19199
19200 if test $ol_cv_lib_db = no ; then
19201         echo $ac_n "checking for Berkeley DB link (-ldb-4-3)""... $ac_c" 1>&6
19202 echo "configure:19201: checking for Berkeley DB link (-ldb-4-3)" >&5
19203 if eval "test \"\${ol_cv_db_db_4_3+set}\" = set"; then
19204   echo $ac_n "(cached) $ac_c" 1>&6
19205 else
19206   
19207         ol_DB_LIB=-ldb-4-3
19208         ol_LIBS=$LIBS
19209         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19210
19211         cat > conftest.$ac_ext <<EOF
19212 #line 19211 "configure"
19213 #include "confdefs.h"
19214
19215 #ifdef HAVE_DB_185_H
19216 # include <db_185.h>
19217 #else
19218 # include <db.h>
19219 #endif
19220
19221 #ifndef DB_VERSION_MAJOR
19222 # define DB_VERSION_MAJOR 1
19223 #endif
19224
19225 #ifndef NULL
19226 #define NULL ((void*)0)
19227 #endif
19228
19229 int main() {
19230
19231 #if DB_VERSION_MAJOR > 1
19232         {
19233                 char *version;
19234                 int major, minor, patch;
19235
19236                 version = db_version( &major, &minor, &patch );
19237
19238                 if( major != DB_VERSION_MAJOR ||
19239                         minor < DB_VERSION_MINOR )
19240                 {
19241                         printf("Berkeley DB version mismatch\n"
19242                                 "\theader: %s\n\tlibrary: %s\n",
19243                                 DB_VERSION_STRING, version);
19244                         return 1;
19245                 }
19246         }
19247 #endif
19248
19249 #if DB_VERSION_MAJOR > 2
19250         db_env_create( NULL, 0 );
19251 #elif DB_VERSION_MAJOR > 1
19252         db_appexit( NULL );
19253 #else
19254         (void) dbopen( NULL, 0, 0, 0, NULL);
19255 #endif
19256
19257 ; return 0; }
19258 EOF
19259 if { (eval echo configure:19258: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19260   rm -rf conftest*
19261   ol_cv_db_db_4_3=yes
19262 else
19263   echo "configure: failed program was:" >&5
19264   cat conftest.$ac_ext >&5
19265   rm -rf conftest*
19266   ol_cv_db_db_4_3=no
19267 fi
19268 rm -f conftest*
19269
19270         LIBS="$ol_LIBS"
19271
19272 fi
19273
19274 echo "$ac_t""$ol_cv_db_db_4_3" 1>&6
19275
19276         if test $ol_cv_db_db_4_3 = yes ; then
19277                 ol_cv_lib_db=-ldb-4-3
19278         fi
19279 fi
19280
19281 if test $ol_cv_lib_db = no ; then
19282         echo $ac_n "checking for Berkeley DB link (-ldb42)""... $ac_c" 1>&6
19283 echo "configure:19282: checking for Berkeley DB link (-ldb42)" >&5
19284 if eval "test \"\${ol_cv_db_db42+set}\" = set"; then
19285   echo $ac_n "(cached) $ac_c" 1>&6
19286 else
19287   
19288         ol_DB_LIB=-ldb42
19289         ol_LIBS=$LIBS
19290         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19291
19292         cat > conftest.$ac_ext <<EOF
19293 #line 19292 "configure"
19294 #include "confdefs.h"
19295
19296 #ifdef HAVE_DB_185_H
19297 # include <db_185.h>
19298 #else
19299 # include <db.h>
19300 #endif
19301
19302 #ifndef DB_VERSION_MAJOR
19303 # define DB_VERSION_MAJOR 1
19304 #endif
19305
19306 #ifndef NULL
19307 #define NULL ((void*)0)
19308 #endif
19309
19310 int main() {
19311
19312 #if DB_VERSION_MAJOR > 1
19313         {
19314                 char *version;
19315                 int major, minor, patch;
19316
19317                 version = db_version( &major, &minor, &patch );
19318
19319                 if( major != DB_VERSION_MAJOR ||
19320                         minor < DB_VERSION_MINOR )
19321                 {
19322                         printf("Berkeley DB version mismatch\n"
19323                                 "\theader: %s\n\tlibrary: %s\n",
19324                                 DB_VERSION_STRING, version);
19325                         return 1;
19326                 }
19327         }
19328 #endif
19329
19330 #if DB_VERSION_MAJOR > 2
19331         db_env_create( NULL, 0 );
19332 #elif DB_VERSION_MAJOR > 1
19333         db_appexit( NULL );
19334 #else
19335         (void) dbopen( NULL, 0, 0, 0, NULL);
19336 #endif
19337
19338 ; return 0; }
19339 EOF
19340 if { (eval echo configure:19339: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19341   rm -rf conftest*
19342   ol_cv_db_db42=yes
19343 else
19344   echo "configure: failed program was:" >&5
19345   cat conftest.$ac_ext >&5
19346   rm -rf conftest*
19347   ol_cv_db_db42=no
19348 fi
19349 rm -f conftest*
19350
19351         LIBS="$ol_LIBS"
19352
19353 fi
19354
19355 echo "$ac_t""$ol_cv_db_db42" 1>&6
19356
19357         if test $ol_cv_db_db42 = yes ; then
19358                 ol_cv_lib_db=-ldb42
19359         fi
19360 fi
19361
19362 if test $ol_cv_lib_db = no ; then
19363         echo $ac_n "checking for Berkeley DB link (-ldb-42)""... $ac_c" 1>&6
19364 echo "configure:19363: checking for Berkeley DB link (-ldb-42)" >&5
19365 if eval "test \"\${ol_cv_db_db_42+set}\" = set"; then
19366   echo $ac_n "(cached) $ac_c" 1>&6
19367 else
19368   
19369         ol_DB_LIB=-ldb-42
19370         ol_LIBS=$LIBS
19371         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19372
19373         cat > conftest.$ac_ext <<EOF
19374 #line 19373 "configure"
19375 #include "confdefs.h"
19376
19377 #ifdef HAVE_DB_185_H
19378 # include <db_185.h>
19379 #else
19380 # include <db.h>
19381 #endif
19382
19383 #ifndef DB_VERSION_MAJOR
19384 # define DB_VERSION_MAJOR 1
19385 #endif
19386
19387 #ifndef NULL
19388 #define NULL ((void*)0)
19389 #endif
19390
19391 int main() {
19392
19393 #if DB_VERSION_MAJOR > 1
19394         {
19395                 char *version;
19396                 int major, minor, patch;
19397
19398                 version = db_version( &major, &minor, &patch );
19399
19400                 if( major != DB_VERSION_MAJOR ||
19401                         minor < DB_VERSION_MINOR )
19402                 {
19403                         printf("Berkeley DB version mismatch\n"
19404                                 "\theader: %s\n\tlibrary: %s\n",
19405                                 DB_VERSION_STRING, version);
19406                         return 1;
19407                 }
19408         }
19409 #endif
19410
19411 #if DB_VERSION_MAJOR > 2
19412         db_env_create( NULL, 0 );
19413 #elif DB_VERSION_MAJOR > 1
19414         db_appexit( NULL );
19415 #else
19416         (void) dbopen( NULL, 0, 0, 0, NULL);
19417 #endif
19418
19419 ; return 0; }
19420 EOF
19421 if { (eval echo configure:19420: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19422   rm -rf conftest*
19423   ol_cv_db_db_42=yes
19424 else
19425   echo "configure: failed program was:" >&5
19426   cat conftest.$ac_ext >&5
19427   rm -rf conftest*
19428   ol_cv_db_db_42=no
19429 fi
19430 rm -f conftest*
19431
19432         LIBS="$ol_LIBS"
19433
19434 fi
19435
19436 echo "$ac_t""$ol_cv_db_db_42" 1>&6
19437
19438         if test $ol_cv_db_db_42 = yes ; then
19439                 ol_cv_lib_db=-ldb-42
19440         fi
19441 fi
19442
19443 if test $ol_cv_lib_db = no ; then
19444         echo $ac_n "checking for Berkeley DB link (-ldb-4.2)""... $ac_c" 1>&6
19445 echo "configure:19444: checking for Berkeley DB link (-ldb-4.2)" >&5
19446 if eval "test \"\${ol_cv_db_db_4_dot_2+set}\" = set"; then
19447   echo $ac_n "(cached) $ac_c" 1>&6
19448 else
19449   
19450         ol_DB_LIB=-ldb-4.2
19451         ol_LIBS=$LIBS
19452         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19453
19454         cat > conftest.$ac_ext <<EOF
19455 #line 19454 "configure"
19456 #include "confdefs.h"
19457
19458 #ifdef HAVE_DB_185_H
19459 # include <db_185.h>
19460 #else
19461 # include <db.h>
19462 #endif
19463
19464 #ifndef DB_VERSION_MAJOR
19465 # define DB_VERSION_MAJOR 1
19466 #endif
19467
19468 #ifndef NULL
19469 #define NULL ((void*)0)
19470 #endif
19471
19472 int main() {
19473
19474 #if DB_VERSION_MAJOR > 1
19475         {
19476                 char *version;
19477                 int major, minor, patch;
19478
19479                 version = db_version( &major, &minor, &patch );
19480
19481                 if( major != DB_VERSION_MAJOR ||
19482                         minor < DB_VERSION_MINOR )
19483                 {
19484                         printf("Berkeley DB version mismatch\n"
19485                                 "\theader: %s\n\tlibrary: %s\n",
19486                                 DB_VERSION_STRING, version);
19487                         return 1;
19488                 }
19489         }
19490 #endif
19491
19492 #if DB_VERSION_MAJOR > 2
19493         db_env_create( NULL, 0 );
19494 #elif DB_VERSION_MAJOR > 1
19495         db_appexit( NULL );
19496 #else
19497         (void) dbopen( NULL, 0, 0, 0, NULL);
19498 #endif
19499
19500 ; return 0; }
19501 EOF
19502 if { (eval echo configure:19501: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19503   rm -rf conftest*
19504   ol_cv_db_db_4_dot_2=yes
19505 else
19506   echo "configure: failed program was:" >&5
19507   cat conftest.$ac_ext >&5
19508   rm -rf conftest*
19509   ol_cv_db_db_4_dot_2=no
19510 fi
19511 rm -f conftest*
19512
19513         LIBS="$ol_LIBS"
19514
19515 fi
19516
19517 echo "$ac_t""$ol_cv_db_db_4_dot_2" 1>&6
19518
19519         if test $ol_cv_db_db_4_dot_2 = yes ; then
19520                 ol_cv_lib_db=-ldb-4.2
19521         fi
19522 fi
19523
19524 if test $ol_cv_lib_db = no ; then
19525         echo $ac_n "checking for Berkeley DB link (-ldb-4-2)""... $ac_c" 1>&6
19526 echo "configure:19525: checking for Berkeley DB link (-ldb-4-2)" >&5
19527 if eval "test \"\${ol_cv_db_db_4_2+set}\" = set"; then
19528   echo $ac_n "(cached) $ac_c" 1>&6
19529 else
19530   
19531         ol_DB_LIB=-ldb-4-2
19532         ol_LIBS=$LIBS
19533         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19534
19535         cat > conftest.$ac_ext <<EOF
19536 #line 19535 "configure"
19537 #include "confdefs.h"
19538
19539 #ifdef HAVE_DB_185_H
19540 # include <db_185.h>
19541 #else
19542 # include <db.h>
19543 #endif
19544
19545 #ifndef DB_VERSION_MAJOR
19546 # define DB_VERSION_MAJOR 1
19547 #endif
19548
19549 #ifndef NULL
19550 #define NULL ((void*)0)
19551 #endif
19552
19553 int main() {
19554
19555 #if DB_VERSION_MAJOR > 1
19556         {
19557                 char *version;
19558                 int major, minor, patch;
19559
19560                 version = db_version( &major, &minor, &patch );
19561
19562                 if( major != DB_VERSION_MAJOR ||
19563                         minor < DB_VERSION_MINOR )
19564                 {
19565                         printf("Berkeley DB version mismatch\n"
19566                                 "\theader: %s\n\tlibrary: %s\n",
19567                                 DB_VERSION_STRING, version);
19568                         return 1;
19569                 }
19570         }
19571 #endif
19572
19573 #if DB_VERSION_MAJOR > 2
19574         db_env_create( NULL, 0 );
19575 #elif DB_VERSION_MAJOR > 1
19576         db_appexit( NULL );
19577 #else
19578         (void) dbopen( NULL, 0, 0, 0, NULL);
19579 #endif
19580
19581 ; return 0; }
19582 EOF
19583 if { (eval echo configure:19582: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19584   rm -rf conftest*
19585   ol_cv_db_db_4_2=yes
19586 else
19587   echo "configure: failed program was:" >&5
19588   cat conftest.$ac_ext >&5
19589   rm -rf conftest*
19590   ol_cv_db_db_4_2=no
19591 fi
19592 rm -f conftest*
19593
19594         LIBS="$ol_LIBS"
19595
19596 fi
19597
19598 echo "$ac_t""$ol_cv_db_db_4_2" 1>&6
19599
19600         if test $ol_cv_db_db_4_2 = yes ; then
19601                 ol_cv_lib_db=-ldb-4-2
19602         fi
19603 fi
19604
19605 if test $ol_cv_lib_db = no ; then
19606         echo $ac_n "checking for Berkeley DB link (-ldb-4)""... $ac_c" 1>&6
19607 echo "configure:19606: checking for Berkeley DB link (-ldb-4)" >&5
19608 if eval "test \"\${ol_cv_db_db_4+set}\" = set"; then
19609   echo $ac_n "(cached) $ac_c" 1>&6
19610 else
19611   
19612         ol_DB_LIB=-ldb-4
19613         ol_LIBS=$LIBS
19614         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19615
19616         cat > conftest.$ac_ext <<EOF
19617 #line 19616 "configure"
19618 #include "confdefs.h"
19619
19620 #ifdef HAVE_DB_185_H
19621 # include <db_185.h>
19622 #else
19623 # include <db.h>
19624 #endif
19625
19626 #ifndef DB_VERSION_MAJOR
19627 # define DB_VERSION_MAJOR 1
19628 #endif
19629
19630 #ifndef NULL
19631 #define NULL ((void*)0)
19632 #endif
19633
19634 int main() {
19635
19636 #if DB_VERSION_MAJOR > 1
19637         {
19638                 char *version;
19639                 int major, minor, patch;
19640
19641                 version = db_version( &major, &minor, &patch );
19642
19643                 if( major != DB_VERSION_MAJOR ||
19644                         minor < DB_VERSION_MINOR )
19645                 {
19646                         printf("Berkeley DB version mismatch\n"
19647                                 "\theader: %s\n\tlibrary: %s\n",
19648                                 DB_VERSION_STRING, version);
19649                         return 1;
19650                 }
19651         }
19652 #endif
19653
19654 #if DB_VERSION_MAJOR > 2
19655         db_env_create( NULL, 0 );
19656 #elif DB_VERSION_MAJOR > 1
19657         db_appexit( NULL );
19658 #else
19659         (void) dbopen( NULL, 0, 0, 0, NULL);
19660 #endif
19661
19662 ; return 0; }
19663 EOF
19664 if { (eval echo configure:19663: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19665   rm -rf conftest*
19666   ol_cv_db_db_4=yes
19667 else
19668   echo "configure: failed program was:" >&5
19669   cat conftest.$ac_ext >&5
19670   rm -rf conftest*
19671   ol_cv_db_db_4=no
19672 fi
19673 rm -f conftest*
19674
19675         LIBS="$ol_LIBS"
19676
19677 fi
19678
19679 echo "$ac_t""$ol_cv_db_db_4" 1>&6
19680
19681         if test $ol_cv_db_db_4 = yes ; then
19682                 ol_cv_lib_db=-ldb-4
19683         fi
19684 fi
19685
19686 if test $ol_cv_lib_db = no ; then
19687         echo $ac_n "checking for Berkeley DB link (-ldb4)""... $ac_c" 1>&6
19688 echo "configure:19687: checking for Berkeley DB link (-ldb4)" >&5
19689 if eval "test \"\${ol_cv_db_db4+set}\" = set"; then
19690   echo $ac_n "(cached) $ac_c" 1>&6
19691 else
19692   
19693         ol_DB_LIB=-ldb4
19694         ol_LIBS=$LIBS
19695         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19696
19697         cat > conftest.$ac_ext <<EOF
19698 #line 19697 "configure"
19699 #include "confdefs.h"
19700
19701 #ifdef HAVE_DB_185_H
19702 # include <db_185.h>
19703 #else
19704 # include <db.h>
19705 #endif
19706
19707 #ifndef DB_VERSION_MAJOR
19708 # define DB_VERSION_MAJOR 1
19709 #endif
19710
19711 #ifndef NULL
19712 #define NULL ((void*)0)
19713 #endif
19714
19715 int main() {
19716
19717 #if DB_VERSION_MAJOR > 1
19718         {
19719                 char *version;
19720                 int major, minor, patch;
19721
19722                 version = db_version( &major, &minor, &patch );
19723
19724                 if( major != DB_VERSION_MAJOR ||
19725                         minor < DB_VERSION_MINOR )
19726                 {
19727                         printf("Berkeley DB version mismatch\n"
19728                                 "\theader: %s\n\tlibrary: %s\n",
19729                                 DB_VERSION_STRING, version);
19730                         return 1;
19731                 }
19732         }
19733 #endif
19734
19735 #if DB_VERSION_MAJOR > 2
19736         db_env_create( NULL, 0 );
19737 #elif DB_VERSION_MAJOR > 1
19738         db_appexit( NULL );
19739 #else
19740         (void) dbopen( NULL, 0, 0, 0, NULL);
19741 #endif
19742
19743 ; return 0; }
19744 EOF
19745 if { (eval echo configure:19744: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19746   rm -rf conftest*
19747   ol_cv_db_db4=yes
19748 else
19749   echo "configure: failed program was:" >&5
19750   cat conftest.$ac_ext >&5
19751   rm -rf conftest*
19752   ol_cv_db_db4=no
19753 fi
19754 rm -f conftest*
19755
19756         LIBS="$ol_LIBS"
19757
19758 fi
19759
19760 echo "$ac_t""$ol_cv_db_db4" 1>&6
19761
19762         if test $ol_cv_db_db4 = yes ; then
19763                 ol_cv_lib_db=-ldb4
19764         fi
19765 fi
19766
19767 if test $ol_cv_lib_db = no ; then
19768         echo $ac_n "checking for Berkeley DB link (-ldb)""... $ac_c" 1>&6
19769 echo "configure:19768: checking for Berkeley DB link (-ldb)" >&5
19770 if eval "test \"\${ol_cv_db_db+set}\" = set"; then
19771   echo $ac_n "(cached) $ac_c" 1>&6
19772 else
19773   
19774         ol_DB_LIB=-ldb
19775         ol_LIBS=$LIBS
19776         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19777
19778         cat > conftest.$ac_ext <<EOF
19779 #line 19778 "configure"
19780 #include "confdefs.h"
19781
19782 #ifdef HAVE_DB_185_H
19783 # include <db_185.h>
19784 #else
19785 # include <db.h>
19786 #endif
19787
19788 #ifndef DB_VERSION_MAJOR
19789 # define DB_VERSION_MAJOR 1
19790 #endif
19791
19792 #ifndef NULL
19793 #define NULL ((void*)0)
19794 #endif
19795
19796 int main() {
19797
19798 #if DB_VERSION_MAJOR > 1
19799         {
19800                 char *version;
19801                 int major, minor, patch;
19802
19803                 version = db_version( &major, &minor, &patch );
19804
19805                 if( major != DB_VERSION_MAJOR ||
19806                         minor < DB_VERSION_MINOR )
19807                 {
19808                         printf("Berkeley DB version mismatch\n"
19809                                 "\theader: %s\n\tlibrary: %s\n",
19810                                 DB_VERSION_STRING, version);
19811                         return 1;
19812                 }
19813         }
19814 #endif
19815
19816 #if DB_VERSION_MAJOR > 2
19817         db_env_create( NULL, 0 );
19818 #elif DB_VERSION_MAJOR > 1
19819         db_appexit( NULL );
19820 #else
19821         (void) dbopen( NULL, 0, 0, 0, NULL);
19822 #endif
19823
19824 ; return 0; }
19825 EOF
19826 if { (eval echo configure:19825: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19827   rm -rf conftest*
19828   ol_cv_db_db=yes
19829 else
19830   echo "configure: failed program was:" >&5
19831   cat conftest.$ac_ext >&5
19832   rm -rf conftest*
19833   ol_cv_db_db=no
19834 fi
19835 rm -f conftest*
19836
19837         LIBS="$ol_LIBS"
19838
19839 fi
19840
19841 echo "$ac_t""$ol_cv_db_db" 1>&6
19842
19843         if test $ol_cv_db_db = yes ; then
19844                 ol_cv_lib_db=-ldb
19845         fi
19846 fi
19847
19848 if test $ol_cv_lib_db = no ; then
19849         echo $ac_n "checking for Berkeley DB link (-ldb41)""... $ac_c" 1>&6
19850 echo "configure:19849: checking for Berkeley DB link (-ldb41)" >&5
19851 if eval "test \"\${ol_cv_db_db41+set}\" = set"; then
19852   echo $ac_n "(cached) $ac_c" 1>&6
19853 else
19854   
19855         ol_DB_LIB=-ldb41
19856         ol_LIBS=$LIBS
19857         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19858
19859         cat > conftest.$ac_ext <<EOF
19860 #line 19859 "configure"
19861 #include "confdefs.h"
19862
19863 #ifdef HAVE_DB_185_H
19864 # include <db_185.h>
19865 #else
19866 # include <db.h>
19867 #endif
19868
19869 #ifndef DB_VERSION_MAJOR
19870 # define DB_VERSION_MAJOR 1
19871 #endif
19872
19873 #ifndef NULL
19874 #define NULL ((void*)0)
19875 #endif
19876
19877 int main() {
19878
19879 #if DB_VERSION_MAJOR > 1
19880         {
19881                 char *version;
19882                 int major, minor, patch;
19883
19884                 version = db_version( &major, &minor, &patch );
19885
19886                 if( major != DB_VERSION_MAJOR ||
19887                         minor < DB_VERSION_MINOR )
19888                 {
19889                         printf("Berkeley DB version mismatch\n"
19890                                 "\theader: %s\n\tlibrary: %s\n",
19891                                 DB_VERSION_STRING, version);
19892                         return 1;
19893                 }
19894         }
19895 #endif
19896
19897 #if DB_VERSION_MAJOR > 2
19898         db_env_create( NULL, 0 );
19899 #elif DB_VERSION_MAJOR > 1
19900         db_appexit( NULL );
19901 #else
19902         (void) dbopen( NULL, 0, 0, 0, NULL);
19903 #endif
19904
19905 ; return 0; }
19906 EOF
19907 if { (eval echo configure:19906: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19908   rm -rf conftest*
19909   ol_cv_db_db41=yes
19910 else
19911   echo "configure: failed program was:" >&5
19912   cat conftest.$ac_ext >&5
19913   rm -rf conftest*
19914   ol_cv_db_db41=no
19915 fi
19916 rm -f conftest*
19917
19918         LIBS="$ol_LIBS"
19919
19920 fi
19921
19922 echo "$ac_t""$ol_cv_db_db41" 1>&6
19923
19924         if test $ol_cv_db_db41 = yes ; then
19925                 ol_cv_lib_db=-ldb41
19926         fi
19927 fi
19928
19929 if test $ol_cv_lib_db = no ; then
19930         echo $ac_n "checking for Berkeley DB link (-ldb-41)""... $ac_c" 1>&6
19931 echo "configure:19930: checking for Berkeley DB link (-ldb-41)" >&5
19932 if eval "test \"\${ol_cv_db_db_41+set}\" = set"; then
19933   echo $ac_n "(cached) $ac_c" 1>&6
19934 else
19935   
19936         ol_DB_LIB=-ldb-41
19937         ol_LIBS=$LIBS
19938         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19939
19940         cat > conftest.$ac_ext <<EOF
19941 #line 19940 "configure"
19942 #include "confdefs.h"
19943
19944 #ifdef HAVE_DB_185_H
19945 # include <db_185.h>
19946 #else
19947 # include <db.h>
19948 #endif
19949
19950 #ifndef DB_VERSION_MAJOR
19951 # define DB_VERSION_MAJOR 1
19952 #endif
19953
19954 #ifndef NULL
19955 #define NULL ((void*)0)
19956 #endif
19957
19958 int main() {
19959
19960 #if DB_VERSION_MAJOR > 1
19961         {
19962                 char *version;
19963                 int major, minor, patch;
19964
19965                 version = db_version( &major, &minor, &patch );
19966
19967                 if( major != DB_VERSION_MAJOR ||
19968                         minor < DB_VERSION_MINOR )
19969                 {
19970                         printf("Berkeley DB version mismatch\n"
19971                                 "\theader: %s\n\tlibrary: %s\n",
19972                                 DB_VERSION_STRING, version);
19973                         return 1;
19974                 }
19975         }
19976 #endif
19977
19978 #if DB_VERSION_MAJOR > 2
19979         db_env_create( NULL, 0 );
19980 #elif DB_VERSION_MAJOR > 1
19981         db_appexit( NULL );
19982 #else
19983         (void) dbopen( NULL, 0, 0, 0, NULL);
19984 #endif
19985
19986 ; return 0; }
19987 EOF
19988 if { (eval echo configure:19987: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19989   rm -rf conftest*
19990   ol_cv_db_db_41=yes
19991 else
19992   echo "configure: failed program was:" >&5
19993   cat conftest.$ac_ext >&5
19994   rm -rf conftest*
19995   ol_cv_db_db_41=no
19996 fi
19997 rm -f conftest*
19998
19999         LIBS="$ol_LIBS"
20000
20001 fi
20002
20003 echo "$ac_t""$ol_cv_db_db_41" 1>&6
20004
20005         if test $ol_cv_db_db_41 = yes ; then
20006                 ol_cv_lib_db=-ldb-41
20007         fi
20008 fi
20009
20010 if test $ol_cv_lib_db = no ; then
20011         echo $ac_n "checking for Berkeley DB link (-ldb-4.1)""... $ac_c" 1>&6
20012 echo "configure:20011: checking for Berkeley DB link (-ldb-4.1)" >&5
20013 if eval "test \"\${ol_cv_db_db_4_dot_1+set}\" = set"; then
20014   echo $ac_n "(cached) $ac_c" 1>&6
20015 else
20016   
20017         ol_DB_LIB=-ldb-4.1
20018         ol_LIBS=$LIBS
20019         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
20020
20021         cat > conftest.$ac_ext <<EOF
20022 #line 20021 "configure"
20023 #include "confdefs.h"
20024
20025 #ifdef HAVE_DB_185_H
20026 # include <db_185.h>
20027 #else
20028 # include <db.h>
20029 #endif
20030
20031 #ifndef DB_VERSION_MAJOR
20032 # define DB_VERSION_MAJOR 1
20033 #endif
20034
20035 #ifndef NULL
20036 #define NULL ((void*)0)
20037 #endif
20038
20039 int main() {
20040
20041 #if DB_VERSION_MAJOR > 1
20042         {
20043                 char *version;
20044                 int major, minor, patch;
20045
20046                 version = db_version( &major, &minor, &patch );
20047
20048                 if( major != DB_VERSION_MAJOR ||
20049                         minor < DB_VERSION_MINOR )
20050                 {
20051                         printf("Berkeley DB version mismatch\n"
20052                                 "\theader: %s\n\tlibrary: %s\n",
20053                                 DB_VERSION_STRING, version);
20054                         return 1;
20055                 }
20056         }
20057 #endif
20058
20059 #if DB_VERSION_MAJOR > 2
20060         db_env_create( NULL, 0 );
20061 #elif DB_VERSION_MAJOR > 1
20062         db_appexit( NULL );
20063 #else
20064         (void) dbopen( NULL, 0, 0, 0, NULL);
20065 #endif
20066
20067 ; return 0; }
20068 EOF
20069 if { (eval echo configure:20068: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20070   rm -rf conftest*
20071   ol_cv_db_db_4_dot_1=yes
20072 else
20073   echo "configure: failed program was:" >&5
20074   cat conftest.$ac_ext >&5
20075   rm -rf conftest*
20076   ol_cv_db_db_4_dot_1=no
20077 fi
20078 rm -f conftest*
20079
20080         LIBS="$ol_LIBS"
20081
20082 fi
20083
20084 echo "$ac_t""$ol_cv_db_db_4_dot_1" 1>&6
20085
20086         if test $ol_cv_db_db_4_dot_1 = yes ; then
20087                 ol_cv_lib_db=-ldb-4.1
20088         fi
20089 fi
20090
20091 if test $ol_cv_lib_db = no ; then
20092         echo $ac_n "checking for Berkeley DB link (-ldb-4-1)""... $ac_c" 1>&6
20093 echo "configure:20092: checking for Berkeley DB link (-ldb-4-1)" >&5
20094 if eval "test \"\${ol_cv_db_db_4_1+set}\" = set"; then
20095   echo $ac_n "(cached) $ac_c" 1>&6
20096 else
20097   
20098         ol_DB_LIB=-ldb-4-1
20099         ol_LIBS=$LIBS
20100         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
20101
20102         cat > conftest.$ac_ext <<EOF
20103 #line 20102 "configure"
20104 #include "confdefs.h"
20105
20106 #ifdef HAVE_DB_185_H
20107 # include <db_185.h>
20108 #else
20109 # include <db.h>
20110 #endif
20111
20112 #ifndef DB_VERSION_MAJOR
20113 # define DB_VERSION_MAJOR 1
20114 #endif
20115
20116 #ifndef NULL
20117 #define NULL ((void*)0)
20118 #endif
20119
20120 int main() {
20121
20122 #if DB_VERSION_MAJOR > 1
20123         {
20124                 char *version;
20125                 int major, minor, patch;
20126
20127                 version = db_version( &major, &minor, &patch );
20128
20129                 if( major != DB_VERSION_MAJOR ||
20130                         minor < DB_VERSION_MINOR )
20131                 {
20132                         printf("Berkeley DB version mismatch\n"
20133                                 "\theader: %s\n\tlibrary: %s\n",
20134                                 DB_VERSION_STRING, version);
20135                         return 1;
20136                 }
20137         }
20138 #endif
20139
20140 #if DB_VERSION_MAJOR > 2
20141         db_env_create( NULL, 0 );
20142 #elif DB_VERSION_MAJOR > 1
20143         db_appexit( NULL );
20144 #else
20145         (void) dbopen( NULL, 0, 0, 0, NULL);
20146 #endif
20147
20148 ; return 0; }
20149 EOF
20150 if { (eval echo configure:20149: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20151   rm -rf conftest*
20152   ol_cv_db_db_4_1=yes
20153 else
20154   echo "configure: failed program was:" >&5
20155   cat conftest.$ac_ext >&5
20156   rm -rf conftest*
20157   ol_cv_db_db_4_1=no
20158 fi
20159 rm -f conftest*
20160
20161         LIBS="$ol_LIBS"
20162
20163 fi
20164
20165 echo "$ac_t""$ol_cv_db_db_4_1" 1>&6
20166
20167         if test $ol_cv_db_db_4_1 = yes ; then
20168                 ol_cv_lib_db=-ldb-4-1
20169         fi
20170 fi
20171
20172 if test $ol_cv_lib_db = no ; then
20173         echo $ac_n "checking for Berkeley DB link (-ldb3)""... $ac_c" 1>&6
20174 echo "configure:20173: checking for Berkeley DB link (-ldb3)" >&5
20175 if eval "test \"\${ol_cv_db_db3+set}\" = set"; then
20176   echo $ac_n "(cached) $ac_c" 1>&6
20177 else
20178   
20179         ol_DB_LIB=-ldb3
20180         ol_LIBS=$LIBS
20181         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
20182
20183         cat > conftest.$ac_ext <<EOF
20184 #line 20183 "configure"
20185 #include "confdefs.h"
20186
20187 #ifdef HAVE_DB_185_H
20188 # include <db_185.h>
20189 #else
20190 # include <db.h>
20191 #endif
20192
20193 #ifndef DB_VERSION_MAJOR
20194 # define DB_VERSION_MAJOR 1
20195 #endif
20196
20197 #ifndef NULL
20198 #define NULL ((void*)0)
20199 #endif
20200
20201 int main() {
20202
20203 #if DB_VERSION_MAJOR > 1
20204         {
20205                 char *version;
20206                 int major, minor, patch;
20207
20208                 version = db_version( &major, &minor, &patch );
20209
20210                 if( major != DB_VERSION_MAJOR ||
20211                         minor < DB_VERSION_MINOR )
20212                 {
20213                         printf("Berkeley DB version mismatch\n"
20214                                 "\theader: %s\n\tlibrary: %s\n",
20215                                 DB_VERSION_STRING, version);
20216                         return 1;
20217                 }
20218         }
20219 #endif
20220
20221 #if DB_VERSION_MAJOR > 2
20222         db_env_create( NULL, 0 );
20223 #elif DB_VERSION_MAJOR > 1
20224         db_appexit( NULL );
20225 #else
20226         (void) dbopen( NULL, 0, 0, 0, NULL);
20227 #endif
20228
20229 ; return 0; }
20230 EOF
20231 if { (eval echo configure:20230: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20232   rm -rf conftest*
20233   ol_cv_db_db3=yes
20234 else
20235   echo "configure: failed program was:" >&5
20236   cat conftest.$ac_ext >&5
20237   rm -rf conftest*
20238   ol_cv_db_db3=no
20239 fi
20240 rm -f conftest*
20241
20242         LIBS="$ol_LIBS"
20243
20244 fi
20245
20246 echo "$ac_t""$ol_cv_db_db3" 1>&6
20247
20248         if test $ol_cv_db_db3 = yes ; then
20249                 ol_cv_lib_db=-ldb3
20250         fi
20251 fi
20252
20253 if test $ol_cv_lib_db = no ; then
20254         echo $ac_n "checking for Berkeley DB link (-ldb-3)""... $ac_c" 1>&6
20255 echo "configure:20254: checking for Berkeley DB link (-ldb-3)" >&5
20256 if eval "test \"\${ol_cv_db_db_3+set}\" = set"; then
20257   echo $ac_n "(cached) $ac_c" 1>&6
20258 else
20259   
20260         ol_DB_LIB=-ldb-3
20261         ol_LIBS=$LIBS
20262         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
20263
20264         cat > conftest.$ac_ext <<EOF
20265 #line 20264 "configure"
20266 #include "confdefs.h"
20267
20268 #ifdef HAVE_DB_185_H
20269 # include <db_185.h>
20270 #else
20271 # include <db.h>
20272 #endif
20273
20274 #ifndef DB_VERSION_MAJOR
20275 # define DB_VERSION_MAJOR 1
20276 #endif
20277
20278 #ifndef NULL
20279 #define NULL ((void*)0)
20280 #endif
20281
20282 int main() {
20283
20284 #if DB_VERSION_MAJOR > 1
20285         {
20286                 char *version;
20287                 int major, minor, patch;
20288
20289                 version = db_version( &major, &minor, &patch );
20290
20291                 if( major != DB_VERSION_MAJOR ||
20292                         minor < DB_VERSION_MINOR )
20293                 {
20294                         printf("Berkeley DB version mismatch\n"
20295                                 "\theader: %s\n\tlibrary: %s\n",
20296                                 DB_VERSION_STRING, version);
20297                         return 1;
20298                 }
20299         }
20300 #endif
20301
20302 #if DB_VERSION_MAJOR > 2
20303         db_env_create( NULL, 0 );
20304 #elif DB_VERSION_MAJOR > 1
20305         db_appexit( NULL );
20306 #else
20307         (void) dbopen( NULL, 0, 0, 0, NULL);
20308 #endif
20309
20310 ; return 0; }
20311 EOF
20312 if { (eval echo configure:20311: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20313   rm -rf conftest*
20314   ol_cv_db_db_3=yes
20315 else
20316   echo "configure: failed program was:" >&5
20317   cat conftest.$ac_ext >&5
20318   rm -rf conftest*
20319   ol_cv_db_db_3=no
20320 fi
20321 rm -f conftest*
20322
20323         LIBS="$ol_LIBS"
20324
20325 fi
20326
20327 echo "$ac_t""$ol_cv_db_db_3" 1>&6
20328
20329         if test $ol_cv_db_db_3 = yes ; then
20330                 ol_cv_lib_db=-ldb-3
20331         fi
20332 fi
20333
20334 if test $ol_cv_lib_db = no ; then
20335         echo $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6
20336 echo "configure:20335: checking for Berkeley DB link (-ldb2)" >&5
20337 if eval "test \"\${ol_cv_db_db2+set}\" = set"; then
20338   echo $ac_n "(cached) $ac_c" 1>&6
20339 else
20340   
20341         ol_DB_LIB=-ldb2
20342         ol_LIBS=$LIBS
20343         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
20344
20345         cat > conftest.$ac_ext <<EOF
20346 #line 20345 "configure"
20347 #include "confdefs.h"
20348
20349 #ifdef HAVE_DB_185_H
20350 # include <db_185.h>
20351 #else
20352 # include <db.h>
20353 #endif
20354
20355 #ifndef DB_VERSION_MAJOR
20356 # define DB_VERSION_MAJOR 1
20357 #endif
20358
20359 #ifndef NULL
20360 #define NULL ((void*)0)
20361 #endif
20362
20363 int main() {
20364
20365 #if DB_VERSION_MAJOR > 1
20366         {
20367                 char *version;
20368                 int major, minor, patch;
20369
20370                 version = db_version( &major, &minor, &patch );
20371
20372                 if( major != DB_VERSION_MAJOR ||
20373                         minor < DB_VERSION_MINOR )
20374                 {
20375                         printf("Berkeley DB version mismatch\n"
20376                                 "\theader: %s\n\tlibrary: %s\n",
20377                                 DB_VERSION_STRING, version);
20378                         return 1;
20379                 }
20380         }
20381 #endif
20382
20383 #if DB_VERSION_MAJOR > 2
20384         db_env_create( NULL, 0 );
20385 #elif DB_VERSION_MAJOR > 1
20386         db_appexit( NULL );
20387 #else
20388         (void) dbopen( NULL, 0, 0, 0, NULL);
20389 #endif
20390
20391 ; return 0; }
20392 EOF
20393 if { (eval echo configure:20392: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20394   rm -rf conftest*
20395   ol_cv_db_db2=yes
20396 else
20397   echo "configure: failed program was:" >&5
20398   cat conftest.$ac_ext >&5
20399   rm -rf conftest*
20400   ol_cv_db_db2=no
20401 fi
20402 rm -f conftest*
20403
20404         LIBS="$ol_LIBS"
20405
20406 fi
20407
20408 echo "$ac_t""$ol_cv_db_db2" 1>&6
20409
20410         if test $ol_cv_db_db2 = yes ; then
20411                 ol_cv_lib_db=-ldb2
20412         fi
20413 fi
20414
20415 if test $ol_cv_lib_db = no ; then
20416         echo $ac_n "checking for Berkeley DB link (-ldb-2)""... $ac_c" 1>&6
20417 echo "configure:20416: checking for Berkeley DB link (-ldb-2)" >&5
20418 if eval "test \"\${ol_cv_db_db_2+set}\" = set"; then
20419   echo $ac_n "(cached) $ac_c" 1>&6
20420 else
20421   
20422         ol_DB_LIB=-ldb-2
20423         ol_LIBS=$LIBS
20424         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
20425
20426         cat > conftest.$ac_ext <<EOF
20427 #line 20426 "configure"
20428 #include "confdefs.h"
20429
20430 #ifdef HAVE_DB_185_H
20431 # include <db_185.h>
20432 #else
20433 # include <db.h>
20434 #endif
20435
20436 #ifndef DB_VERSION_MAJOR
20437 # define DB_VERSION_MAJOR 1
20438 #endif
20439
20440 #ifndef NULL
20441 #define NULL ((void*)0)
20442 #endif
20443
20444 int main() {
20445
20446 #if DB_VERSION_MAJOR > 1
20447         {
20448                 char *version;
20449                 int major, minor, patch;
20450
20451                 version = db_version( &major, &minor, &patch );
20452
20453                 if( major != DB_VERSION_MAJOR ||
20454                         minor < DB_VERSION_MINOR )
20455                 {
20456                         printf("Berkeley DB version mismatch\n"
20457                                 "\theader: %s\n\tlibrary: %s\n",
20458                                 DB_VERSION_STRING, version);
20459                         return 1;
20460                 }
20461         }
20462 #endif
20463
20464 #if DB_VERSION_MAJOR > 2
20465         db_env_create( NULL, 0 );
20466 #elif DB_VERSION_MAJOR > 1
20467         db_appexit( NULL );
20468 #else
20469         (void) dbopen( NULL, 0, 0, 0, NULL);
20470 #endif
20471
20472 ; return 0; }
20473 EOF
20474 if { (eval echo configure:20473: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20475   rm -rf conftest*
20476   ol_cv_db_db_2=yes
20477 else
20478   echo "configure: failed program was:" >&5
20479   cat conftest.$ac_ext >&5
20480   rm -rf conftest*
20481   ol_cv_db_db_2=no
20482 fi
20483 rm -f conftest*
20484
20485         LIBS="$ol_LIBS"
20486
20487 fi
20488
20489 echo "$ac_t""$ol_cv_db_db_2" 1>&6
20490
20491         if test $ol_cv_db_db_2 = yes ; then
20492                 ol_cv_lib_db=-ldb-2
20493         fi
20494 fi
20495
20496 if test $ol_cv_lib_db = no ; then
20497         echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6
20498 echo "configure:20497: checking for Berkeley DB link (-ldb1)" >&5
20499 if eval "test \"\${ol_cv_db_db1+set}\" = set"; then
20500   echo $ac_n "(cached) $ac_c" 1>&6
20501 else
20502   
20503         ol_DB_LIB=-ldb1
20504         ol_LIBS=$LIBS
20505         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
20506
20507         cat > conftest.$ac_ext <<EOF
20508 #line 20507 "configure"
20509 #include "confdefs.h"
20510
20511 #ifdef HAVE_DB_185_H
20512 # include <db_185.h>
20513 #else
20514 # include <db.h>
20515 #endif
20516
20517 #ifndef DB_VERSION_MAJOR
20518 # define DB_VERSION_MAJOR 1
20519 #endif
20520
20521 #ifndef NULL
20522 #define NULL ((void*)0)
20523 #endif
20524
20525 int main() {
20526
20527 #if DB_VERSION_MAJOR > 1
20528         {
20529                 char *version;
20530                 int major, minor, patch;
20531
20532                 version = db_version( &major, &minor, &patch );
20533
20534                 if( major != DB_VERSION_MAJOR ||
20535                         minor < DB_VERSION_MINOR )
20536                 {
20537                         printf("Berkeley DB version mismatch\n"
20538                                 "\theader: %s\n\tlibrary: %s\n",
20539                                 DB_VERSION_STRING, version);
20540                         return 1;
20541                 }
20542         }
20543 #endif
20544
20545 #if DB_VERSION_MAJOR > 2
20546         db_env_create( NULL, 0 );
20547 #elif DB_VERSION_MAJOR > 1
20548         db_appexit( NULL );
20549 #else
20550         (void) dbopen( NULL, 0, 0, 0, NULL);
20551 #endif
20552
20553 ; return 0; }
20554 EOF
20555 if { (eval echo configure:20554: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20556   rm -rf conftest*
20557   ol_cv_db_db1=yes
20558 else
20559   echo "configure: failed program was:" >&5
20560   cat conftest.$ac_ext >&5
20561   rm -rf conftest*
20562   ol_cv_db_db1=no
20563 fi
20564 rm -f conftest*
20565
20566         LIBS="$ol_LIBS"
20567
20568 fi
20569
20570 echo "$ac_t""$ol_cv_db_db1" 1>&6
20571
20572         if test $ol_cv_db_db1 = yes ; then
20573                 ol_cv_lib_db=-ldb1
20574         fi
20575 fi
20576
20577 if test $ol_cv_lib_db = no ; then
20578         echo $ac_n "checking for Berkeley DB link (-ldb-1)""... $ac_c" 1>&6
20579 echo "configure:20578: checking for Berkeley DB link (-ldb-1)" >&5
20580 if eval "test \"\${ol_cv_db_db_1+set}\" = set"; then
20581   echo $ac_n "(cached) $ac_c" 1>&6
20582 else
20583   
20584         ol_DB_LIB=-ldb-1
20585         ol_LIBS=$LIBS
20586         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
20587
20588         cat > conftest.$ac_ext <<EOF
20589 #line 20588 "configure"
20590 #include "confdefs.h"
20591
20592 #ifdef HAVE_DB_185_H
20593 # include <db_185.h>
20594 #else
20595 # include <db.h>
20596 #endif
20597
20598 #ifndef DB_VERSION_MAJOR
20599 # define DB_VERSION_MAJOR 1
20600 #endif
20601
20602 #ifndef NULL
20603 #define NULL ((void*)0)
20604 #endif
20605
20606 int main() {
20607
20608 #if DB_VERSION_MAJOR > 1
20609         {
20610                 char *version;
20611                 int major, minor, patch;
20612
20613                 version = db_version( &major, &minor, &patch );
20614
20615                 if( major != DB_VERSION_MAJOR ||
20616                         minor < DB_VERSION_MINOR )
20617                 {
20618                         printf("Berkeley DB version mismatch\n"
20619                                 "\theader: %s\n\tlibrary: %s\n",
20620                                 DB_VERSION_STRING, version);
20621                         return 1;
20622                 }
20623         }
20624 #endif
20625
20626 #if DB_VERSION_MAJOR > 2
20627         db_env_create( NULL, 0 );
20628 #elif DB_VERSION_MAJOR > 1
20629         db_appexit( NULL );
20630 #else
20631         (void) dbopen( NULL, 0, 0, 0, NULL);
20632 #endif
20633
20634 ; return 0; }
20635 EOF
20636 if { (eval echo configure:20635: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20637   rm -rf conftest*
20638   ol_cv_db_db_1=yes
20639 else
20640   echo "configure: failed program was:" >&5
20641   cat conftest.$ac_ext >&5
20642   rm -rf conftest*
20643   ol_cv_db_db_1=no
20644 fi
20645 rm -f conftest*
20646
20647         LIBS="$ol_LIBS"
20648
20649 fi
20650
20651 echo "$ac_t""$ol_cv_db_db_1" 1>&6
20652
20653         if test $ol_cv_db_db_1 = yes ; then
20654                 ol_cv_lib_db=-ldb-1
20655         fi
20656 fi
20657
20658
20659         if test "$ol_cv_lib_db" != no ; then
20660                 ol_cv_berkeley_db=yes
20661                 echo $ac_n "checking for Berkeley DB version match""... $ac_c" 1>&6
20662 echo "configure:20661: checking for Berkeley DB version match" >&5
20663 if eval "test \"\${ol_cv_berkeley_db_version+set}\" = set"; then
20664   echo $ac_n "(cached) $ac_c" 1>&6
20665 else
20666   
20667         ol_LIBS="$LIBS"
20668         LIBS="$LTHREAD_LIBS $LIBS"
20669         if test $ol_cv_lib_db != yes ; then
20670                 LIBS="$ol_cv_lib_db $LIBS"
20671         fi
20672
20673         if test "$cross_compiling" = yes; then
20674   ol_cv_berkeley_db_version=cross
20675 else
20676   cat > conftest.$ac_ext <<EOF
20677 #line 20676 "configure"
20678 #include "confdefs.h"
20679
20680 #ifdef HAVE_DB_185_H
20681         choke me;
20682 #else
20683 #include <db.h>
20684 #endif
20685 #ifndef DB_VERSION_MAJOR
20686 # define DB_VERSION_MAJOR 1
20687 #endif
20688 #ifndef NULL
20689 #define NULL ((void *)0)
20690 #endif
20691 main()
20692 {
20693 #if DB_VERSION_MAJOR > 1
20694         char *version;
20695         int major, minor, patch;
20696
20697         version = db_version( &major, &minor, &patch );
20698
20699         if( major != DB_VERSION_MAJOR || minor < DB_VERSION_MINOR ) {
20700                 printf("Berkeley DB version mismatch\n"
20701                         "\theader: %s\n\tlibrary: %s\n",
20702                         DB_VERSION_STRING, version);
20703                 return 1;
20704         }
20705 #endif
20706
20707         return 0;
20708 }
20709 EOF
20710 if { (eval echo configure:20709: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
20711 then
20712   ol_cv_berkeley_db_version=yes
20713 else
20714   echo "configure: failed program was:" >&5
20715   cat conftest.$ac_ext >&5
20716   rm -fr conftest*
20717   ol_cv_berkeley_db_version=no
20718 fi
20719 rm -fr conftest*
20720 fi
20721
20722
20723         LIBS="$ol_LIBS"
20724
20725 fi
20726
20727 echo "$ac_t""$ol_cv_berkeley_db_version" 1>&6
20728
20729         if test $ol_cv_berkeley_db_version = no ; then
20730                 { echo "configure: error: Berkeley DB version mismatch" 1>&2; exit 1; }
20731         fi
20732
20733                 echo $ac_n "checking for Berkeley DB thread support""... $ac_c" 1>&6
20734 echo "configure:20733: checking for Berkeley DB thread support" >&5
20735 if eval "test \"\${ol_cv_berkeley_db_thread+set}\" = set"; then
20736   echo $ac_n "(cached) $ac_c" 1>&6
20737 else
20738   
20739         ol_LIBS="$LIBS"
20740         LIBS="$LTHREAD_LIBS $LIBS"
20741         if test $ol_cv_lib_db != yes ; then
20742                 LIBS="$ol_cv_lib_db $LIBS"
20743         fi
20744
20745         if test "$cross_compiling" = yes; then
20746   ol_cv_berkeley_db_thread=cross
20747 else
20748   cat > conftest.$ac_ext <<EOF
20749 #line 20748 "configure"
20750 #include "confdefs.h"
20751
20752 #ifdef HAVE_DB_185_H
20753         choke me;
20754 #else
20755 #include <db.h>
20756 #endif
20757 #ifndef NULL
20758 #define NULL ((void *)0)
20759 #endif
20760 main()
20761 {
20762         int rc;
20763         u_int32_t flags = DB_CREATE |
20764 #ifdef DB_PRIVATE
20765                 DB_PRIVATE |
20766 #endif
20767                 DB_THREAD;
20768
20769 #if DB_VERSION_MAJOR > 2
20770         DB_ENV *env = NULL;
20771
20772         rc = db_env_create( &env, 0 );
20773
20774         flags |= DB_INIT_MPOOL;
20775 #ifdef DB_MPOOL_PRIVATE
20776         flags |= DB_MPOOL_PRIVATE;
20777 #endif
20778
20779         if( rc ) {
20780                 printf("BerkeleyDB: %s\n", db_strerror(rc) );
20781                 return rc;
20782         }
20783
20784 #if (DB_VERSION_MAJOR > 3) || (DB_VERSION_MINOR >= 1)
20785         rc = env->open( env, NULL, flags, 0 );
20786 #else
20787         rc = env->open( env, NULL, NULL, flags, 0 );
20788 #endif
20789
20790         if ( rc == 0 ) {
20791                 rc = env->close( env, 0 );
20792         }
20793
20794         if( rc ) {
20795                 printf("BerkeleyDB: %s\n", db_strerror(rc) );
20796                 return rc;
20797         }
20798
20799 #else
20800         DB_ENV env;
20801         memset( &env, '\0', sizeof(env) );
20802
20803         rc = db_appinit( NULL, NULL, &env, flags );
20804
20805         if( rc == 0 ) {
20806                 db_appexit( &env );
20807         }
20808
20809         unlink("__db_mpool.share");
20810         unlink("__db_lock.share");
20811 #endif
20812
20813         return rc;
20814 }
20815 EOF
20816 if { (eval echo configure:20815: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
20817 then
20818   ol_cv_berkeley_db_thread=yes
20819 else
20820   echo "configure: failed program was:" >&5
20821   cat conftest.$ac_ext >&5
20822   rm -fr conftest*
20823   ol_cv_berkeley_db_thread=no
20824 fi
20825 rm -fr conftest*
20826 fi
20827
20828
20829         LIBS="$ol_LIBS"
20830
20831 fi
20832
20833 echo "$ac_t""$ol_cv_berkeley_db_thread" 1>&6
20834
20835         if test $ol_cv_berkeley_db_thread != no ; then
20836                 cat >> confdefs.h <<\EOF
20837 #define HAVE_BERKELEY_DB_THREAD 1
20838 EOF
20839
20840         fi
20841
20842         fi
20843 fi
20844
20845         fi
20846
20847         if test $ol_cv_berkeley_db != no ; then
20848                 cat >> confdefs.h <<\EOF
20849 #define HAVE_BERKELEY_DB 1
20850 EOF
20851
20852
20853                 ol_link_ldbm=berkeley
20854                 ol_with_ldbm_api=berkeley
20855
20856                 if test $ol_with_ldbm_type = hash ; then
20857                         cat >> confdefs.h <<\EOF
20858 #define LDBM_USE_DBHASH 1
20859 EOF
20860
20861                 else
20862                         cat >> confdefs.h <<\EOF
20863 #define LDBM_USE_DBBTREE 1
20864 EOF
20865
20866                 fi
20867
20868                                                 if test $ol_cv_lib_db != yes ; then
20869                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db"
20870                 fi
20871         fi
20872 fi
20873
20874 if test $ol_enable_bdb != no -o $ol_enable_hdb != no; then
20875         if test $ol_link_ldbm != berkeley ; then
20876                 { echo "configure: error: BDB/HDB: BerkeleyDB not available" 1>&2; exit 1; }
20877         else
20878                 echo $ac_n "checking Berkeley DB version for BDB backend""... $ac_c" 1>&6
20879 echo "configure:20878: checking Berkeley DB version for BDB backend" >&5
20880 if eval "test \"\${ol_cv_bdb_compat+set}\" = set"; then
20881   echo $ac_n "(cached) $ac_c" 1>&6
20882 else
20883   
20884         cat > conftest.$ac_ext <<EOF
20885 #line 20884 "configure"
20886 #include "confdefs.h"
20887
20888 #include <db.h>
20889
20890  /* this check could be improved */
20891 #ifndef DB_VERSION_MAJOR
20892 #       define DB_VERSION_MAJOR 1
20893 #endif
20894 #ifndef DB_VERSION_MINOR
20895 #       define DB_VERSION_MINOR 0
20896 #endif
20897
20898 /* require 4.2 or later */
20899 #if (DB_VERSION_MAJOR >= 4) && (DB_VERSION_MINOR >= 2)
20900         __db_version_compat
20901 #endif
20902         
20903 EOF
20904 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20905   egrep "__db_version_compat" >/dev/null 2>&1; then
20906   rm -rf conftest*
20907   ol_cv_bdb_compat=yes
20908 else
20909   rm -rf conftest*
20910   ol_cv_bdb_compat=no
20911 fi
20912 rm -f conftest*
20913
20914 fi
20915
20916 echo "$ac_t""$ol_cv_bdb_compat" 1>&6
20917
20918
20919                 if test $ol_cv_bdb_compat != yes ; then
20920                         { echo "configure: error: BDB/HDB: BerkeleyDB version incompatible" 1>&2; exit 1; }
20921                 fi
20922         fi
20923 fi
20924
20925 if test $ol_link_ldbm = no -a $ol_with_ldbm_type = btree ; then
20926         echo "configure: warning: Could not find LDBM with BTREE support" 1>&2
20927         ol_with_ldbm_api=none
20928 fi
20929
20930 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = mdbm ; then
20931         echo $ac_n "checking for MDBM library""... $ac_c" 1>&6
20932 echo "configure:20931: checking for MDBM library" >&5
20933 if eval "test \"\${ol_cv_lib_mdbm+set}\" = set"; then
20934   echo $ac_n "(cached) $ac_c" 1>&6
20935 else
20936         ol_LIBS="$LIBS"
20937         echo $ac_n "checking for mdbm_set_chain""... $ac_c" 1>&6
20938 echo "configure:20937: checking for mdbm_set_chain" >&5
20939 if eval "test \"\${ac_cv_func_mdbm_set_chain+set}\" = set"; then
20940   echo $ac_n "(cached) $ac_c" 1>&6
20941 else
20942   cat > conftest.$ac_ext <<EOF
20943 #line 20942 "configure"
20944 #include "confdefs.h"
20945 /* System header to define __stub macros and hopefully few prototypes,
20946     which can conflict with char mdbm_set_chain(); below.  */
20947 #include <assert.h>
20948 /* Override any gcc2 internal prototype to avoid an error.  */
20949 /* We use char because int might match the return type of a gcc2
20950     builtin and then its argument prototype would still apply.  */
20951 char mdbm_set_chain();
20952 char (*f)();
20953
20954 int main() {
20955
20956 /* The GNU C library defines this for functions which it implements
20957     to always fail with ENOSYS.  Some functions are actually named
20958     something starting with __ and the normal name is an alias.  */
20959 #if defined (__stub_mdbm_set_chain) || defined (__stub___mdbm_set_chain)
20960 choke me
20961 #else
20962 f = mdbm_set_chain;
20963 #endif
20964
20965 ; return 0; }
20966 EOF
20967 if { (eval echo configure:20966: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20968   rm -rf conftest*
20969   eval "ac_cv_func_mdbm_set_chain=yes"
20970 else
20971   echo "configure: failed program was:" >&5
20972   cat conftest.$ac_ext >&5
20973   rm -rf conftest*
20974   eval "ac_cv_func_mdbm_set_chain=no"
20975 fi
20976 rm -f conftest*
20977 fi
20978
20979 if eval "test \"`echo '$ac_cv_func_'mdbm_set_chain`\" = yes"; then
20980   echo "$ac_t""yes" 1>&6
20981   ol_cv_lib_mdbm=yes
20982 else
20983   echo "$ac_t""no" 1>&6
20984
20985                 echo $ac_n "checking for mdbm_set_chain in -lmdbm""... $ac_c" 1>&6
20986 echo "configure:20985: checking for mdbm_set_chain in -lmdbm" >&5
20987 ac_lib_var=`echo mdbm'_'mdbm_set_chain | sed 'y%./+-:%__p__%'`
20988 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20989   echo $ac_n "(cached) $ac_c" 1>&6
20990 else
20991   ac_save_LIBS="$LIBS"
20992 LIBS="-lmdbm  $LIBS"
20993 cat > conftest.$ac_ext <<EOF
20994 #line 20993 "configure"
20995 #include "confdefs.h"
20996 /* Override any gcc2 internal prototype to avoid an error.  */
20997 /* We use char because int might match the return type of a gcc2
20998     builtin and then its argument prototype would still apply.  */
20999 char mdbm_set_chain();
21000
21001 int main() {
21002 mdbm_set_chain()
21003 ; return 0; }
21004 EOF
21005 if { (eval echo configure:21004: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21006   rm -rf conftest*
21007   eval "ac_cv_lib_$ac_lib_var=yes"
21008 else
21009   echo "configure: failed program was:" >&5
21010   cat conftest.$ac_ext >&5
21011   rm -rf conftest*
21012   eval "ac_cv_lib_$ac_lib_var=no"
21013 fi
21014 rm -f conftest*
21015 LIBS="$ac_save_LIBS"
21016
21017 fi
21018 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
21019   echo "$ac_t""yes" 1>&6
21020   ol_cv_lib_mdbm=-lmdbm
21021 else
21022   echo "$ac_t""no" 1>&6
21023 ol_cv_lib_mdbm=no
21024 fi
21025
21026         
21027 fi
21028
21029         LIBS="$ol_LIBS"
21030
21031 fi
21032
21033 echo "$ac_t""$ol_cv_lib_mdbm" 1>&6
21034
21035
21036  for ac_hdr in mdbm.h
21037 do
21038 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
21039 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
21040 echo "configure:21039: checking for $ac_hdr" >&5
21041 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
21042   echo $ac_n "(cached) $ac_c" 1>&6
21043 else
21044   cat > conftest.$ac_ext <<EOF
21045 #line 21044 "configure"
21046 #include "confdefs.h"
21047 #include <$ac_hdr>
21048 EOF
21049 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
21050 { (eval echo configure:21049: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
21051 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
21052 if test -z "$ac_err"; then
21053   rm -rf conftest*
21054   eval "ac_cv_header_$ac_safe=yes"
21055 else
21056   echo "$ac_err" >&5
21057   echo "configure: failed program was:" >&5
21058   cat conftest.$ac_ext >&5
21059   rm -rf conftest*
21060   eval "ac_cv_header_$ac_safe=no"
21061 fi
21062 rm -f conftest*
21063 fi
21064 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
21065   echo "$ac_t""yes" 1>&6
21066     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
21067   cat >> confdefs.h <<EOF
21068 #define $ac_tr_hdr 1
21069 EOF
21070  
21071 else
21072   echo "$ac_t""no" 1>&6
21073 fi
21074 done
21075
21076  echo $ac_n "checking for db""... $ac_c" 1>&6
21077 echo "configure:21076: checking for db" >&5
21078 if eval "test \"\${ol_cv_mdbm+set}\" = set"; then
21079   echo $ac_n "(cached) $ac_c" 1>&6
21080 else
21081   
21082         if test $ol_cv_lib_mdbm = no -o $ac_cv_header_mdbm_h = no ; then
21083                 ol_cv_mdbm=no
21084         else
21085                 ol_cv_mdbm=yes
21086         fi
21087
21088 fi
21089
21090 echo "$ac_t""$ol_cv_mdbm" 1>&6
21091  if test $ol_cv_mdbm = yes ; then
21092         cat >> confdefs.h <<\EOF
21093 #define HAVE_MDBM 1
21094 EOF
21095
21096  fi
21097
21098
21099         if test $ol_cv_mdbm = yes ; then
21100                 ol_link_ldbm=mdbm
21101                 ol_with_ldbm_api=mdbm
21102                 if test $ol_cv_lib_mdbm != yes ; then
21103                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_mdbm"
21104                 fi
21105         fi
21106 fi
21107
21108 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = gdbm ; then
21109         echo $ac_n "checking for GDBM library""... $ac_c" 1>&6
21110 echo "configure:21109: checking for GDBM library" >&5
21111 if eval "test \"\${ol_cv_lib_gdbm+set}\" = set"; then
21112   echo $ac_n "(cached) $ac_c" 1>&6
21113 else
21114         ol_LIBS="$LIBS"
21115         echo $ac_n "checking for gdbm_open""... $ac_c" 1>&6
21116 echo "configure:21115: checking for gdbm_open" >&5
21117 if eval "test \"\${ac_cv_func_gdbm_open+set}\" = set"; then
21118   echo $ac_n "(cached) $ac_c" 1>&6
21119 else
21120   cat > conftest.$ac_ext <<EOF
21121 #line 21120 "configure"
21122 #include "confdefs.h"
21123 /* System header to define __stub macros and hopefully few prototypes,
21124     which can conflict with char gdbm_open(); below.  */
21125 #include <assert.h>
21126 /* Override any gcc2 internal prototype to avoid an error.  */
21127 /* We use char because int might match the return type of a gcc2
21128     builtin and then its argument prototype would still apply.  */
21129 char gdbm_open();
21130 char (*f)();
21131
21132 int main() {
21133
21134 /* The GNU C library defines this for functions which it implements
21135     to always fail with ENOSYS.  Some functions are actually named
21136     something starting with __ and the normal name is an alias.  */
21137 #if defined (__stub_gdbm_open) || defined (__stub___gdbm_open)
21138 choke me
21139 #else
21140 f = gdbm_open;
21141 #endif
21142
21143 ; return 0; }
21144 EOF
21145 if { (eval echo configure:21144: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21146   rm -rf conftest*
21147   eval "ac_cv_func_gdbm_open=yes"
21148 else
21149   echo "configure: failed program was:" >&5
21150   cat conftest.$ac_ext >&5
21151   rm -rf conftest*
21152   eval "ac_cv_func_gdbm_open=no"
21153 fi
21154 rm -f conftest*
21155 fi
21156
21157 if eval "test \"`echo '$ac_cv_func_'gdbm_open`\" = yes"; then
21158   echo "$ac_t""yes" 1>&6
21159   ol_cv_lib_gdbm=yes
21160 else
21161   echo "$ac_t""no" 1>&6
21162
21163                 echo $ac_n "checking for gdbm_open in -lgdbm""... $ac_c" 1>&6
21164 echo "configure:21163: checking for gdbm_open in -lgdbm" >&5
21165 ac_lib_var=`echo gdbm'_'gdbm_open | sed 'y%./+-:%__p__%'`
21166 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
21167   echo $ac_n "(cached) $ac_c" 1>&6
21168 else
21169   ac_save_LIBS="$LIBS"
21170 LIBS="-lgdbm  $LIBS"
21171 cat > conftest.$ac_ext <<EOF
21172 #line 21171 "configure"
21173 #include "confdefs.h"
21174 /* Override any gcc2 internal prototype to avoid an error.  */
21175 /* We use char because int might match the return type of a gcc2
21176     builtin and then its argument prototype would still apply.  */
21177 char gdbm_open();
21178
21179 int main() {
21180 gdbm_open()
21181 ; return 0; }
21182 EOF
21183 if { (eval echo configure:21182: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21184   rm -rf conftest*
21185   eval "ac_cv_lib_$ac_lib_var=yes"
21186 else
21187   echo "configure: failed program was:" >&5
21188   cat conftest.$ac_ext >&5
21189   rm -rf conftest*
21190   eval "ac_cv_lib_$ac_lib_var=no"
21191 fi
21192 rm -f conftest*
21193 LIBS="$ac_save_LIBS"
21194
21195 fi
21196 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
21197   echo "$ac_t""yes" 1>&6
21198   ol_cv_lib_gdbm=-lgdbm
21199 else
21200   echo "$ac_t""no" 1>&6
21201 ol_cv_lib_gdbm=no
21202 fi
21203
21204         
21205 fi
21206
21207         LIBS="$ol_LIBS"
21208
21209 fi
21210
21211 echo "$ac_t""$ol_cv_lib_gdbm" 1>&6
21212
21213
21214  for ac_hdr in gdbm.h
21215 do
21216 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
21217 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
21218 echo "configure:21217: checking for $ac_hdr" >&5
21219 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
21220   echo $ac_n "(cached) $ac_c" 1>&6
21221 else
21222   cat > conftest.$ac_ext <<EOF
21223 #line 21222 "configure"
21224 #include "confdefs.h"
21225 #include <$ac_hdr>
21226 EOF
21227 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
21228 { (eval echo configure:21227: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
21229 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
21230 if test -z "$ac_err"; then
21231   rm -rf conftest*
21232   eval "ac_cv_header_$ac_safe=yes"
21233 else
21234   echo "$ac_err" >&5
21235   echo "configure: failed program was:" >&5
21236   cat conftest.$ac_ext >&5
21237   rm -rf conftest*
21238   eval "ac_cv_header_$ac_safe=no"
21239 fi
21240 rm -f conftest*
21241 fi
21242 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
21243   echo "$ac_t""yes" 1>&6
21244     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
21245   cat >> confdefs.h <<EOF
21246 #define $ac_tr_hdr 1
21247 EOF
21248  
21249 else
21250   echo "$ac_t""no" 1>&6
21251 fi
21252 done
21253
21254  echo $ac_n "checking for db""... $ac_c" 1>&6
21255 echo "configure:21254: checking for db" >&5
21256 if eval "test \"\${ol_cv_gdbm+set}\" = set"; then
21257   echo $ac_n "(cached) $ac_c" 1>&6
21258 else
21259   
21260         if test $ol_cv_lib_gdbm = no -o $ac_cv_header_gdbm_h = no ; then
21261                 ol_cv_gdbm=no
21262         else
21263                 ol_cv_gdbm=yes
21264         fi
21265
21266 fi
21267
21268 echo "$ac_t""$ol_cv_gdbm" 1>&6
21269  if test $ol_cv_gdbm = yes ; then
21270         cat >> confdefs.h <<\EOF
21271 #define HAVE_GDBM 1
21272 EOF
21273
21274  fi
21275
21276
21277         if test $ol_cv_gdbm = yes ; then
21278                 ol_link_ldbm=gdbm
21279                 ol_with_ldbm_api=gdbm
21280
21281                 if test $ol_cv_lib_gdbm != yes ; then
21282                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_gdbm"
21283                 fi
21284         fi
21285 fi
21286
21287 if test $ol_with_ldbm_api = ndbm ; then
21288         echo $ac_n "checking for NDBM library""... $ac_c" 1>&6
21289 echo "configure:21288: checking for NDBM library" >&5
21290 if eval "test \"\${ol_cv_lib_ndbm+set}\" = set"; then
21291   echo $ac_n "(cached) $ac_c" 1>&6
21292 else
21293         ol_LIBS="$LIBS"
21294         echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
21295 echo "configure:21294: checking for dbm_open" >&5
21296 if eval "test \"\${ac_cv_func_dbm_open+set}\" = set"; then
21297   echo $ac_n "(cached) $ac_c" 1>&6
21298 else
21299   cat > conftest.$ac_ext <<EOF
21300 #line 21299 "configure"
21301 #include "confdefs.h"
21302 /* System header to define __stub macros and hopefully few prototypes,
21303     which can conflict with char dbm_open(); below.  */
21304 #include <assert.h>
21305 /* Override any gcc2 internal prototype to avoid an error.  */
21306 /* We use char because int might match the return type of a gcc2
21307     builtin and then its argument prototype would still apply.  */
21308 char dbm_open();
21309 char (*f)();
21310
21311 int main() {
21312
21313 /* The GNU C library defines this for functions which it implements
21314     to always fail with ENOSYS.  Some functions are actually named
21315     something starting with __ and the normal name is an alias.  */
21316 #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
21317 choke me
21318 #else
21319 f = dbm_open;
21320 #endif
21321
21322 ; return 0; }
21323 EOF
21324 if { (eval echo configure:21323: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21325   rm -rf conftest*
21326   eval "ac_cv_func_dbm_open=yes"
21327 else
21328   echo "configure: failed program was:" >&5
21329   cat conftest.$ac_ext >&5
21330   rm -rf conftest*
21331   eval "ac_cv_func_dbm_open=no"
21332 fi
21333 rm -f conftest*
21334 fi
21335
21336 if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then
21337   echo "$ac_t""yes" 1>&6
21338   ol_cv_lib_ndbm=yes
21339 else
21340   echo "$ac_t""no" 1>&6
21341
21342                 echo $ac_n "checking for dbm_open in -lndbm""... $ac_c" 1>&6
21343 echo "configure:21342: checking for dbm_open in -lndbm" >&5
21344 ac_lib_var=`echo ndbm'_'dbm_open | sed 'y%./+-:%__p__%'`
21345 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
21346   echo $ac_n "(cached) $ac_c" 1>&6
21347 else
21348   ac_save_LIBS="$LIBS"
21349 LIBS="-lndbm  $LIBS"
21350 cat > conftest.$ac_ext <<EOF
21351 #line 21350 "configure"
21352 #include "confdefs.h"
21353 /* Override any gcc2 internal prototype to avoid an error.  */
21354 /* We use char because int might match the return type of a gcc2
21355     builtin and then its argument prototype would still apply.  */
21356 char dbm_open();
21357
21358 int main() {
21359 dbm_open()
21360 ; return 0; }
21361 EOF
21362 if { (eval echo configure:21361: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21363   rm -rf conftest*
21364   eval "ac_cv_lib_$ac_lib_var=yes"
21365 else
21366   echo "configure: failed program was:" >&5
21367   cat conftest.$ac_ext >&5
21368   rm -rf conftest*
21369   eval "ac_cv_lib_$ac_lib_var=no"
21370 fi
21371 rm -f conftest*
21372 LIBS="$ac_save_LIBS"
21373
21374 fi
21375 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
21376   echo "$ac_t""yes" 1>&6
21377   ol_cv_lib_ndbm=-lndbm
21378 else
21379   echo "$ac_t""no" 1>&6
21380
21381                         echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
21382 echo "configure:21381: checking for dbm_open in -ldbm" >&5
21383 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-:%__p__%'`
21384 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
21385   echo $ac_n "(cached) $ac_c" 1>&6
21386 else
21387   ac_save_LIBS="$LIBS"
21388 LIBS="-ldbm  $LIBS"
21389 cat > conftest.$ac_ext <<EOF
21390 #line 21389 "configure"
21391 #include "confdefs.h"
21392 /* Override any gcc2 internal prototype to avoid an error.  */
21393 /* We use char because int might match the return type of a gcc2
21394     builtin and then its argument prototype would still apply.  */
21395 char dbm_open();
21396
21397 int main() {
21398 dbm_open()
21399 ; return 0; }
21400 EOF
21401 if { (eval echo configure:21400: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21402   rm -rf conftest*
21403   eval "ac_cv_lib_$ac_lib_var=yes"
21404 else
21405   echo "configure: failed program was:" >&5
21406   cat conftest.$ac_ext >&5
21407   rm -rf conftest*
21408   eval "ac_cv_lib_$ac_lib_var=no"
21409 fi
21410 rm -f conftest*
21411 LIBS="$ac_save_LIBS"
21412
21413 fi
21414 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
21415   echo "$ac_t""yes" 1>&6
21416   ol_cv_lib_ndbm=-ldbm
21417 else
21418   echo "$ac_t""no" 1>&6
21419 ol_cv_lib_ndbm=no
21420 fi
21421                 
21422 fi
21423
21424         
21425 fi
21426
21427         LIBS="$ol_LIBS"
21428
21429 fi
21430
21431 echo "$ac_t""$ol_cv_lib_ndbm" 1>&6
21432
21433
21434  for ac_hdr in ndbm.h
21435 do
21436 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
21437 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
21438 echo "configure:21437: checking for $ac_hdr" >&5
21439 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
21440   echo $ac_n "(cached) $ac_c" 1>&6
21441 else
21442   cat > conftest.$ac_ext <<EOF
21443 #line 21442 "configure"
21444 #include "confdefs.h"
21445 #include <$ac_hdr>
21446 EOF
21447 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
21448 { (eval echo configure:21447: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
21449 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
21450 if test -z "$ac_err"; then
21451   rm -rf conftest*
21452   eval "ac_cv_header_$ac_safe=yes"
21453 else
21454   echo "$ac_err" >&5
21455   echo "configure: failed program was:" >&5
21456   cat conftest.$ac_ext >&5
21457   rm -rf conftest*
21458   eval "ac_cv_header_$ac_safe=no"
21459 fi
21460 rm -f conftest*
21461 fi
21462 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
21463   echo "$ac_t""yes" 1>&6
21464     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
21465   cat >> confdefs.h <<EOF
21466 #define $ac_tr_hdr 1
21467 EOF
21468  
21469 else
21470   echo "$ac_t""no" 1>&6
21471 fi
21472 done
21473
21474  echo $ac_n "checking for db""... $ac_c" 1>&6
21475 echo "configure:21474: checking for db" >&5
21476 if eval "test \"\${ol_cv_ndbm+set}\" = set"; then
21477   echo $ac_n "(cached) $ac_c" 1>&6
21478 else
21479   
21480         if test $ol_cv_lib_ndbm = no -o $ac_cv_header_ndbm_h = no ; then
21481                 ol_cv_ndbm=no
21482         else
21483                 ol_cv_ndbm=yes
21484         fi
21485
21486 fi
21487
21488 echo "$ac_t""$ol_cv_ndbm" 1>&6
21489  if test $ol_cv_ndbm = yes ; then
21490         cat >> confdefs.h <<\EOF
21491 #define HAVE_NDBM 1
21492 EOF
21493
21494  fi
21495
21496
21497         if test $ol_cv_ndbm = yes ; then
21498                 ol_link_ldbm=ndbm
21499                 ol_with_ldbm_api=ndbm
21500
21501                 if test $ol_cv_lib_ndbm != yes ; then
21502                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_ndbm"
21503                 fi
21504         fi
21505 fi
21506
21507 if test $ol_link_ldbm = no -a $ol_enable_ldbm != no ; then
21508         { echo "configure: error: could not find suitable LDBM backend" 1>&2; exit 1; }
21509 fi
21510
21511 if test $ol_enable_bdb = yes -o \
21512         $ol_enable_hdb = yes -o \
21513         $ol_enable_ldbm = yes ; then
21514         SLAPD_LIBS="$SLAPD_LIBS \$(LDBM_LIBS)"
21515 fi
21516
21517
21518 if test $ol_enable_dynamic = yes -a $enable_shared = yes ; then
21519         BUILD_LIBS_DYNAMIC=shared
21520         cat >> confdefs.h <<\EOF
21521 #define LDAP_LIBS_DYNAMIC 1
21522 EOF
21523
21524         LTSTATIC=""
21525 else
21526         BUILD_LIBS_DYNAMIC=static
21527         LTSTATIC="-static"
21528 fi
21529
21530 if test $ol_enable_wrappers != no ; then
21531         for ac_hdr in tcpd.h
21532 do
21533 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
21534 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
21535 echo "configure:21534: checking for $ac_hdr" >&5
21536 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
21537   echo $ac_n "(cached) $ac_c" 1>&6
21538 else
21539   cat > conftest.$ac_ext <<EOF
21540 #line 21539 "configure"
21541 #include "confdefs.h"
21542 #include <$ac_hdr>
21543 EOF
21544 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
21545 { (eval echo configure:21544: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
21546 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
21547 if test -z "$ac_err"; then
21548   rm -rf conftest*
21549   eval "ac_cv_header_$ac_safe=yes"
21550 else
21551   echo "$ac_err" >&5
21552   echo "configure: failed program was:" >&5
21553   cat conftest.$ac_ext >&5
21554   rm -rf conftest*
21555   eval "ac_cv_header_$ac_safe=no"
21556 fi
21557 rm -f conftest*
21558 fi
21559 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
21560   echo "$ac_t""yes" 1>&6
21561     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
21562   cat >> confdefs.h <<EOF
21563 #define $ac_tr_hdr 1
21564 EOF
21565  
21566                 echo $ac_n "checking for TCP wrappers library""... $ac_c" 1>&6
21567 echo "configure:21566: checking for TCP wrappers library" >&5
21568                 save_LIBS="$LIBS"
21569                 LIBS="$LIBS -lwrap"
21570                 cat > conftest.$ac_ext <<EOF
21571 #line 21570 "configure"
21572 #include "confdefs.h"
21573
21574 #include <tcpd.h>
21575 int allow_severity = 0;
21576 int deny_severity  = 0;
21577
21578 struct request_info *req;
21579                 
21580 int main() {
21581
21582 hosts_access(req)
21583                 
21584 ; return 0; }
21585 EOF
21586 if { (eval echo configure:21585: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21587   rm -rf conftest*
21588   echo "$ac_t""-lwrap" 1>&6
21589                 have_wrappers=yes
21590                 LIBS="$save_LIBS"
21591 else
21592   echo "configure: failed program was:" >&5
21593   cat conftest.$ac_ext >&5
21594   rm -rf conftest*
21595   
21596                                 LIBS="$LIBS -lnsl"
21597                 cat > conftest.$ac_ext <<EOF
21598 #line 21597 "configure"
21599 #include "confdefs.h"
21600
21601 #include <tcpd.h>
21602 int allow_severity = 0;
21603 int deny_severity  = 0;
21604
21605 struct request_info *req;
21606                 
21607 int main() {
21608
21609 hosts_access(req)
21610                 
21611 ; return 0; }
21612 EOF
21613 if { (eval echo configure:21612: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21614   rm -rf conftest*
21615   echo "$ac_t""-lwrap -lnsl" 1>&6
21616                 have_wrappers=yes
21617                 LIBS="$save_LIBS -lnsl"
21618 else
21619   echo "configure: failed program was:" >&5
21620   cat conftest.$ac_ext >&5
21621   rm -rf conftest*
21622   
21623                 echo "$ac_t""no" 1>&6
21624                 have_wrappers=no
21625                 LIBS=$save_LIBS
21626 fi
21627 rm -f conftest*
21628 fi
21629 rm -f conftest*
21630 else
21631   echo "$ac_t""no" 1>&6
21632 have_wrappers=no
21633 fi
21634 done
21635
21636
21637         if test $have_wrappers = yes ; then
21638                 cat >> confdefs.h <<\EOF
21639 #define HAVE_TCPD 1
21640 EOF
21641
21642                 WRAP_LIBS="-lwrap"
21643         elif test $ol_enable_wrappers = yes ; then
21644                 { echo "configure: error: could not find TCP wrappers, select apppropriate options or disable" 1>&2; exit 1; }
21645         else
21646                 echo "configure: warning: could not find TCP wrappers, support disabled" 1>&2
21647                 WRAP_LIBS=""
21648         fi
21649 fi
21650
21651 if test $ol_enable_syslog != no ; then
21652         echo $ac_n "checking for openlog""... $ac_c" 1>&6
21653 echo "configure:21652: checking for openlog" >&5
21654 if eval "test \"\${ac_cv_func_openlog+set}\" = set"; then
21655   echo $ac_n "(cached) $ac_c" 1>&6
21656 else
21657   cat > conftest.$ac_ext <<EOF
21658 #line 21657 "configure"
21659 #include "confdefs.h"
21660 /* System header to define __stub macros and hopefully few prototypes,
21661     which can conflict with char openlog(); below.  */
21662 #include <assert.h>
21663 /* Override any gcc2 internal prototype to avoid an error.  */
21664 /* We use char because int might match the return type of a gcc2
21665     builtin and then its argument prototype would still apply.  */
21666 char openlog();
21667 char (*f)();
21668
21669 int main() {
21670
21671 /* The GNU C library defines this for functions which it implements
21672     to always fail with ENOSYS.  Some functions are actually named
21673     something starting with __ and the normal name is an alias.  */
21674 #if defined (__stub_openlog) || defined (__stub___openlog)
21675 choke me
21676 #else
21677 f = openlog;
21678 #endif
21679
21680 ; return 0; }
21681 EOF
21682 if { (eval echo configure:21681: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21683   rm -rf conftest*
21684   eval "ac_cv_func_openlog=yes"
21685 else
21686   echo "configure: failed program was:" >&5
21687   cat conftest.$ac_ext >&5
21688   rm -rf conftest*
21689   eval "ac_cv_func_openlog=no"
21690 fi
21691 rm -f conftest*
21692 fi
21693
21694 if eval "test \"`echo '$ac_cv_func_'openlog`\" = yes"; then
21695   echo "$ac_t""yes" 1>&6
21696   :
21697 else
21698   echo "$ac_t""no" 1>&6
21699 fi
21700
21701         if test $ac_cv_func_openlog = no -a $ol_enable_syslog = yes; then
21702                 { echo "configure: error: could not find syslog" 1>&2; exit 1; }
21703         fi
21704         ol_enable_syslog=$ac_cv_func_openlog
21705 fi
21706
21707
21708 ol_link_sql=no
21709 if test $ol_enable_sql != no ; then
21710         for ac_hdr in sql.h sqlext.h
21711 do
21712 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
21713 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
21714 echo "configure:21713: checking for $ac_hdr" >&5
21715 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
21716   echo $ac_n "(cached) $ac_c" 1>&6
21717 else
21718   cat > conftest.$ac_ext <<EOF
21719 #line 21718 "configure"
21720 #include "confdefs.h"
21721 #include <$ac_hdr>
21722 EOF
21723 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
21724 { (eval echo configure:21723: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
21725 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
21726 if test -z "$ac_err"; then
21727   rm -rf conftest*
21728   eval "ac_cv_header_$ac_safe=yes"
21729 else
21730   echo "$ac_err" >&5
21731   echo "configure: failed program was:" >&5
21732   cat conftest.$ac_ext >&5
21733   rm -rf conftest*
21734   eval "ac_cv_header_$ac_safe=no"
21735 fi
21736 rm -f conftest*
21737 fi
21738 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
21739   echo "$ac_t""yes" 1>&6
21740     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
21741   cat >> confdefs.h <<EOF
21742 #define $ac_tr_hdr 1
21743 EOF
21744  
21745 else
21746   echo "$ac_t""no" 1>&6
21747 { echo "configure: error: could not locate SQL headers" 1>&2; exit 1; }
21748         
21749 fi
21750 done
21751
21752
21753         echo $ac_n "checking for SQLDriverConnect in -liodbc""... $ac_c" 1>&6
21754 echo "configure:21753: checking for SQLDriverConnect in -liodbc" >&5
21755 ac_lib_var=`echo iodbc'_'SQLDriverConnect | sed 'y%./+-:%__p__%'`
21756 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
21757   echo $ac_n "(cached) $ac_c" 1>&6
21758 else
21759   ac_save_LIBS="$LIBS"
21760 LIBS="-liodbc  $LIBS"
21761 cat > conftest.$ac_ext <<EOF
21762 #line 21761 "configure"
21763 #include "confdefs.h"
21764 /* Override any gcc2 internal prototype to avoid an error.  */
21765 /* We use char because int might match the return type of a gcc2
21766     builtin and then its argument prototype would still apply.  */
21767 char SQLDriverConnect();
21768
21769 int main() {
21770 SQLDriverConnect()
21771 ; return 0; }
21772 EOF
21773 if { (eval echo configure:21772: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21774   rm -rf conftest*
21775   eval "ac_cv_lib_$ac_lib_var=yes"
21776 else
21777   echo "configure: failed program was:" >&5
21778   cat conftest.$ac_ext >&5
21779   rm -rf conftest*
21780   eval "ac_cv_lib_$ac_lib_var=no"
21781 fi
21782 rm -f conftest*
21783 LIBS="$ac_save_LIBS"
21784
21785 fi
21786 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
21787   echo "$ac_t""yes" 1>&6
21788   have_iodbc=yes
21789 else
21790   echo "$ac_t""no" 1>&6
21791 have_iodbc=no
21792 fi
21793
21794         if test $have_iodbc = yes ; then
21795                 ol_link_sql="-liodbc"
21796         else
21797                 echo $ac_n "checking for SQLDriverConnect in -lodbc""... $ac_c" 1>&6
21798 echo "configure:21797: checking for SQLDriverConnect in -lodbc" >&5
21799 ac_lib_var=`echo odbc'_'SQLDriverConnect | sed 'y%./+-:%__p__%'`
21800 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
21801   echo $ac_n "(cached) $ac_c" 1>&6
21802 else
21803   ac_save_LIBS="$LIBS"
21804 LIBS="-lodbc  $LIBS"
21805 cat > conftest.$ac_ext <<EOF
21806 #line 21805 "configure"
21807 #include "confdefs.h"
21808 /* Override any gcc2 internal prototype to avoid an error.  */
21809 /* We use char because int might match the return type of a gcc2
21810     builtin and then its argument prototype would still apply.  */
21811 char SQLDriverConnect();
21812
21813 int main() {
21814 SQLDriverConnect()
21815 ; return 0; }
21816 EOF
21817 if { (eval echo configure:21816: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21818   rm -rf conftest*
21819   eval "ac_cv_lib_$ac_lib_var=yes"
21820 else
21821   echo "configure: failed program was:" >&5
21822   cat conftest.$ac_ext >&5
21823   rm -rf conftest*
21824   eval "ac_cv_lib_$ac_lib_var=no"
21825 fi
21826 rm -f conftest*
21827 LIBS="$ac_save_LIBS"
21828
21829 fi
21830 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
21831   echo "$ac_t""yes" 1>&6
21832   have_odbc=yes
21833 else
21834   echo "$ac_t""no" 1>&6
21835 have_odbc=no
21836 fi
21837
21838                 if test $have_odbc = yes ; then
21839                         ol_link_sql="-lodbc"
21840                 fi
21841         fi
21842
21843         if test $ol_link_sql != no ; then
21844                 SLAPD_SQL_LIBS="$ol_link_sql"
21845
21846         elif test $ol_enable_sql != auto ; then
21847                 { echo "configure: error: could not locate suitable ODBC library" 1>&2; exit 1; }
21848         fi
21849 fi
21850
21851 WITH_SASL=no
21852 ol_link_sasl=no
21853 ol_link_spasswd=no
21854 if test $ol_with_cyrus_sasl != no ; then
21855         for ac_hdr in sasl/sasl.h sasl.h
21856 do
21857 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
21858 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
21859 echo "configure:21858: checking for $ac_hdr" >&5
21860 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
21861   echo $ac_n "(cached) $ac_c" 1>&6
21862 else
21863   cat > conftest.$ac_ext <<EOF
21864 #line 21863 "configure"
21865 #include "confdefs.h"
21866 #include <$ac_hdr>
21867 EOF
21868 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
21869 { (eval echo configure:21868: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
21870 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
21871 if test -z "$ac_err"; then
21872   rm -rf conftest*
21873   eval "ac_cv_header_$ac_safe=yes"
21874 else
21875   echo "$ac_err" >&5
21876   echo "configure: failed program was:" >&5
21877   cat conftest.$ac_ext >&5
21878   rm -rf conftest*
21879   eval "ac_cv_header_$ac_safe=no"
21880 fi
21881 rm -f conftest*
21882 fi
21883 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
21884   echo "$ac_t""yes" 1>&6
21885     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
21886   cat >> confdefs.h <<EOF
21887 #define $ac_tr_hdr 1
21888 EOF
21889  
21890 else
21891   echo "$ac_t""no" 1>&6
21892 fi
21893 done
21894
21895
21896         if test $ac_cv_header_sasl_sasl_h = yes -o $ac_cv_header_sasl_h = yes; then
21897                 echo $ac_n "checking for sasl_client_init in -lsasl2""... $ac_c" 1>&6
21898 echo "configure:21897: checking for sasl_client_init in -lsasl2" >&5
21899 ac_lib_var=`echo sasl2'_'sasl_client_init | sed 'y%./+-:%__p__%'`
21900 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
21901   echo $ac_n "(cached) $ac_c" 1>&6
21902 else
21903   ac_save_LIBS="$LIBS"
21904 LIBS="-lsasl2  $LIBS"
21905 cat > conftest.$ac_ext <<EOF
21906 #line 21905 "configure"
21907 #include "confdefs.h"
21908 /* Override any gcc2 internal prototype to avoid an error.  */
21909 /* We use char because int might match the return type of a gcc2
21910     builtin and then its argument prototype would still apply.  */
21911 char sasl_client_init();
21912
21913 int main() {
21914 sasl_client_init()
21915 ; return 0; }
21916 EOF
21917 if { (eval echo configure:21916: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21918   rm -rf conftest*
21919   eval "ac_cv_lib_$ac_lib_var=yes"
21920 else
21921   echo "configure: failed program was:" >&5
21922   cat conftest.$ac_ext >&5
21923   rm -rf conftest*
21924   eval "ac_cv_lib_$ac_lib_var=no"
21925 fi
21926 rm -f conftest*
21927 LIBS="$ac_save_LIBS"
21928
21929 fi
21930 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
21931   echo "$ac_t""yes" 1>&6
21932   ol_link_sasl="-lsasl2"
21933 else
21934   echo "$ac_t""no" 1>&6
21935 echo $ac_n "checking for sasl_client_init in -lsasl""... $ac_c" 1>&6
21936 echo "configure:21935: checking for sasl_client_init in -lsasl" >&5
21937 ac_lib_var=`echo sasl'_'sasl_client_init | sed 'y%./+-:%__p__%'`
21938 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
21939   echo $ac_n "(cached) $ac_c" 1>&6
21940 else
21941   ac_save_LIBS="$LIBS"
21942 LIBS="-lsasl  $LIBS"
21943 cat > conftest.$ac_ext <<EOF
21944 #line 21943 "configure"
21945 #include "confdefs.h"
21946 /* Override any gcc2 internal prototype to avoid an error.  */
21947 /* We use char because int might match the return type of a gcc2
21948     builtin and then its argument prototype would still apply.  */
21949 char sasl_client_init();
21950
21951 int main() {
21952 sasl_client_init()
21953 ; return 0; }
21954 EOF
21955 if { (eval echo configure:21954: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21956   rm -rf conftest*
21957   eval "ac_cv_lib_$ac_lib_var=yes"
21958 else
21959   echo "configure: failed program was:" >&5
21960   cat conftest.$ac_ext >&5
21961   rm -rf conftest*
21962   eval "ac_cv_lib_$ac_lib_var=no"
21963 fi
21964 rm -f conftest*
21965 LIBS="$ac_save_LIBS"
21966
21967 fi
21968 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
21969   echo "$ac_t""yes" 1>&6
21970   ol_link_sasl="-lsasl"
21971 else
21972   echo "$ac_t""no" 1>&6
21973 fi
21974
21975 fi
21976
21977         fi
21978
21979         if test $ol_link_sasl = no ; then
21980                 if test $ol_with_cyrus_sasl != auto ; then
21981                         { echo "configure: error: Could not locate Cyrus SASL" 1>&2; exit 1; }
21982                 else
21983                         echo "configure: warning: Could not locate Cyrus SASL" 1>&2
21984                         echo "configure: warning: SASL authentication not supported!" 1>&2
21985                         if test $ol_link_tls = no ; then
21986                                 echo "configure: warning: Strong authentication not supported!" 1>&2
21987                         fi
21988                 fi
21989         else
21990                 echo $ac_n "checking Cyrus SASL library version""... $ac_c" 1>&6
21991 echo "configure:21990: checking Cyrus SASL library version" >&5
21992 if eval "test \"\${ol_cv_sasl_compat+set}\" = set"; then
21993   echo $ac_n "(cached) $ac_c" 1>&6
21994 else
21995   
21996         cat > conftest.$ac_ext <<EOF
21997 #line 21996 "configure"
21998 #include "confdefs.h"
21999
22000 #ifdef HAVE_SASL_SASL_H
22001 #include <sasl/sasl.h>
22002 #else
22003 #include <sasl.h>
22004 #endif
22005
22006 /* Require 2.1.15+ */
22007 #if SASL_VERSION_MAJOR == 2  && SASL_VERSION_MINOR > 1
22008         char *__sasl_compat = "2.2+ or better okay (we guess)";
22009 #elif SASL_VERSION_MAJOR == 2  && SASL_VERSION_MINOR == 1 \
22010         && SASL_VERSION_STEP >=15
22011         char *__sasl_compat = "2.1.15+ or better okay";
22012 #endif
22013         
22014 EOF
22015 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
22016   egrep "__sasl_compat" >/dev/null 2>&1; then
22017   rm -rf conftest*
22018   ol_cv_sasl_compat=yes
22019 else
22020   rm -rf conftest*
22021   ol_cv_sasl_compat=no
22022 fi
22023 rm -f conftest*
22024
22025 fi
22026
22027 echo "$ac_t""$ol_cv_sasl_compat" 1>&6
22028
22029                 if test $ol_cv_sasl_compat = no ; then
22030                         ol_link_sasl=no
22031                         { echo "configure: error: Cyrus SASL library located but is incompatible" 1>&2; exit 1; }
22032                 fi
22033
22034                 cat >> confdefs.h <<\EOF
22035 #define HAVE_CYRUS_SASL 1
22036 EOF
22037
22038                 SASL_LIBS="$ol_link_sasl"
22039                 if test $ol_enable_spasswd != no ; then
22040                         ol_link_spasswd=yes
22041                 fi
22042
22043                 ac_save_LIBS="$LIBS"
22044                 LIBS="$LIBS $ol_link_sasl"
22045                 echo $ac_n "checking for sasl_version""... $ac_c" 1>&6
22046 echo "configure:22045: checking for sasl_version" >&5
22047 if eval "test \"\${ac_cv_func_sasl_version+set}\" = set"; then
22048   echo $ac_n "(cached) $ac_c" 1>&6
22049 else
22050   cat > conftest.$ac_ext <<EOF
22051 #line 22050 "configure"
22052 #include "confdefs.h"
22053 /* System header to define __stub macros and hopefully few prototypes,
22054     which can conflict with char sasl_version(); below.  */
22055 #include <assert.h>
22056 /* Override any gcc2 internal prototype to avoid an error.  */
22057 /* We use char because int might match the return type of a gcc2
22058     builtin and then its argument prototype would still apply.  */
22059 char sasl_version();
22060 char (*f)();
22061
22062 int main() {
22063
22064 /* The GNU C library defines this for functions which it implements
22065     to always fail with ENOSYS.  Some functions are actually named
22066     something starting with __ and the normal name is an alias.  */
22067 #if defined (__stub_sasl_version) || defined (__stub___sasl_version)
22068 choke me
22069 #else
22070 f = sasl_version;
22071 #endif
22072
22073 ; return 0; }
22074 EOF
22075 if { (eval echo configure:22074: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22076   rm -rf conftest*
22077   eval "ac_cv_func_sasl_version=yes"
22078 else
22079   echo "configure: failed program was:" >&5
22080   cat conftest.$ac_ext >&5
22081   rm -rf conftest*
22082   eval "ac_cv_func_sasl_version=no"
22083 fi
22084 rm -f conftest*
22085 fi
22086
22087 if eval "test \"`echo '$ac_cv_func_'sasl_version`\" = yes"; then
22088   echo "$ac_t""yes" 1>&6
22089   cat >> confdefs.h <<\EOF
22090 #define HAVE_SASL_VERSION 1
22091 EOF
22092
22093 else
22094   echo "$ac_t""no" 1>&6
22095 fi
22096
22097                 LIBS="$ac_save_LIBS"
22098
22099                 WITH_SASL=yes
22100         fi
22101
22102 else
22103         echo "configure: warning: SASL authentication not supported!" 1>&2
22104         if test $ol_link_tls = no ; then
22105                 echo "configure: warning: Strong authentication not supported!" 1>&2
22106         fi
22107 fi
22108
22109 if test $cross_compiling != yes -a "$ac_cv_mingw32" != yes ; then
22110         dev=no
22111         if test -r /dev/urandom ; then
22112                 dev="/dev/urandom";
22113         elif test -r /idev/urandom ; then
22114                 dev="/idev/urandom";
22115         elif test -r /dev/srandom ; then
22116                 dev="/dev/srandom";
22117         elif test -r /dev/random ; then
22118                 dev="/dev/random";
22119         elif test -r /idev/random ; then
22120                 dev="/idev/random";
22121         fi
22122
22123         if test $dev != no ; then
22124                 cat >> confdefs.h <<EOF
22125 #define URANDOM_DEVICE "$dev"
22126 EOF
22127
22128         fi
22129 fi
22130
22131 ol_link_fetch=no
22132 if test $ol_with_fetch != no ; then
22133         ol_LIBS=$LIBS
22134 LIBS="-lfetch -lcom_err $LIBS"
22135 echo $ac_n "checking fetch(3) library""... $ac_c" 1>&6
22136 echo "configure:22135: checking fetch(3) library" >&5
22137 if eval "test \"\${ol_cv_lib_fetch+set}\" = set"; then
22138   echo $ac_n "(cached) $ac_c" 1>&6
22139 else
22140   
22141         cat > conftest.$ac_ext <<EOF
22142 #line 22141 "configure"
22143 #include "confdefs.h"
22144
22145 #include <sys/param.h>
22146 #include <stdio.h>
22147 #include <fetch.h>
22148 int main() {
22149 struct url *u = fetchParseURL("file:///"); 
22150 ; return 0; }
22151 EOF
22152 if { (eval echo configure:22151: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22153   rm -rf conftest*
22154   ol_cv_lib_fetch=yes
22155 else
22156   echo "configure: failed program was:" >&5
22157   cat conftest.$ac_ext >&5
22158   rm -rf conftest*
22159   ol_cv_lib_fetch=no
22160 fi
22161 rm -f conftest*
22162 fi
22163
22164 echo "$ac_t""$ol_cv_lib_fetch" 1>&6
22165 LIBS=$ol_LIBS
22166 if test $ol_cv_lib_fetch != no ; then
22167         ol_link_fetch="-lfetch -lcom_err"
22168         cat >> confdefs.h <<\EOF
22169 #define HAVE_FETCH 1
22170 EOF
22171
22172 fi
22173
22174
22175         if test $ol_cv_lib_fetch != no ; then
22176                 LUTIL_LIBS="$LUTIL_LIBS $ol_link_fetch"
22177                 ol_link_fetch=freebsd
22178
22179         elif test $ol_with_fetch != auto ; then
22180                 { echo "configure: error: no suitable API for --with-fetch=$ol_with_fetch" 1>&2; exit 1; }
22181         fi 
22182 fi
22183
22184 if test $ol_enable_crypt != no ; then
22185         save_LIBS="$LIBS"
22186         LIBS="$TLS_LIBS $LIBS"
22187
22188         echo $ac_n "checking for crypt""... $ac_c" 1>&6
22189 echo "configure:22188: checking for crypt" >&5
22190 if eval "test \"\${ac_cv_func_crypt+set}\" = set"; then
22191   echo $ac_n "(cached) $ac_c" 1>&6
22192 else
22193   cat > conftest.$ac_ext <<EOF
22194 #line 22193 "configure"
22195 #include "confdefs.h"
22196 /* System header to define __stub macros and hopefully few prototypes,
22197     which can conflict with char crypt(); below.  */
22198 #include <assert.h>
22199 /* Override any gcc2 internal prototype to avoid an error.  */
22200 /* We use char because int might match the return type of a gcc2
22201     builtin and then its argument prototype would still apply.  */
22202 char crypt();
22203 char (*f)();
22204
22205 int main() {
22206
22207 /* The GNU C library defines this for functions which it implements
22208     to always fail with ENOSYS.  Some functions are actually named
22209     something starting with __ and the normal name is an alias.  */
22210 #if defined (__stub_crypt) || defined (__stub___crypt)
22211 choke me
22212 #else
22213 f = crypt;
22214 #endif
22215
22216 ; return 0; }
22217 EOF
22218 if { (eval echo configure:22217: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22219   rm -rf conftest*
22220   eval "ac_cv_func_crypt=yes"
22221 else
22222   echo "configure: failed program was:" >&5
22223   cat conftest.$ac_ext >&5
22224   rm -rf conftest*
22225   eval "ac_cv_func_crypt=no"
22226 fi
22227 rm -f conftest*
22228 fi
22229
22230 if eval "test \"`echo '$ac_cv_func_'crypt`\" = yes"; then
22231   echo "$ac_t""yes" 1>&6
22232   have_crypt=yes
22233 else
22234   echo "$ac_t""no" 1>&6
22235
22236                 LIBS="$save_LIBS"
22237                 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
22238 echo "configure:22237: checking for crypt in -lcrypt" >&5
22239 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-:%__p__%'`
22240 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
22241   echo $ac_n "(cached) $ac_c" 1>&6
22242 else
22243   ac_save_LIBS="$LIBS"
22244 LIBS="-lcrypt  $LIBS"
22245 cat > conftest.$ac_ext <<EOF
22246 #line 22245 "configure"
22247 #include "confdefs.h"
22248 /* Override any gcc2 internal prototype to avoid an error.  */
22249 /* We use char because int might match the return type of a gcc2
22250     builtin and then its argument prototype would still apply.  */
22251 char crypt();
22252
22253 int main() {
22254 crypt()
22255 ; return 0; }
22256 EOF
22257 if { (eval echo configure:22256: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22258   rm -rf conftest*
22259   eval "ac_cv_lib_$ac_lib_var=yes"
22260 else
22261   echo "configure: failed program was:" >&5
22262   cat conftest.$ac_ext >&5
22263   rm -rf conftest*
22264   eval "ac_cv_lib_$ac_lib_var=no"
22265 fi
22266 rm -f conftest*
22267 LIBS="$ac_save_LIBS"
22268
22269 fi
22270 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
22271   echo "$ac_t""yes" 1>&6
22272   LUTIL_LIBS="$LUTIL_LIBS -lcrypt"
22273                         have_crypt=yes
22274 else
22275   echo "$ac_t""no" 1>&6
22276 have_crypt=no
22277 fi
22278
22279 fi
22280
22281
22282         LIBS="$save_LIBS"
22283
22284         if test $have_crypt = yes ; then
22285                 cat >> confdefs.h <<\EOF
22286 #define HAVE_CRYPT 1
22287 EOF
22288
22289         else
22290                 echo "configure: warning: could not find crypt" 1>&2
22291                 if test $ol_enable_crypt = yes ; then
22292                         { echo "configure: error: could not find crypt, select appropriate options or disable" 1>&2; exit 1; }
22293                 fi
22294
22295                 echo "configure: warning: disabling crypt support" 1>&2
22296                 ol_enable_crypt=no
22297         fi
22298 fi
22299
22300 if test $ol_enable_proctitle != no ; then
22301         echo $ac_n "checking for setproctitle""... $ac_c" 1>&6
22302 echo "configure:22301: checking for setproctitle" >&5
22303 if eval "test \"\${ac_cv_func_setproctitle+set}\" = set"; then
22304   echo $ac_n "(cached) $ac_c" 1>&6
22305 else
22306   cat > conftest.$ac_ext <<EOF
22307 #line 22306 "configure"
22308 #include "confdefs.h"
22309 /* System header to define __stub macros and hopefully few prototypes,
22310     which can conflict with char setproctitle(); below.  */
22311 #include <assert.h>
22312 /* Override any gcc2 internal prototype to avoid an error.  */
22313 /* We use char because int might match the return type of a gcc2
22314     builtin and then its argument prototype would still apply.  */
22315 char setproctitle();
22316 char (*f)();
22317
22318 int main() {
22319
22320 /* The GNU C library defines this for functions which it implements
22321     to always fail with ENOSYS.  Some functions are actually named
22322     something starting with __ and the normal name is an alias.  */
22323 #if defined (__stub_setproctitle) || defined (__stub___setproctitle)
22324 choke me
22325 #else
22326 f = setproctitle;
22327 #endif
22328
22329 ; return 0; }
22330 EOF
22331 if { (eval echo configure:22330: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22332   rm -rf conftest*
22333   eval "ac_cv_func_setproctitle=yes"
22334 else
22335   echo "configure: failed program was:" >&5
22336   cat conftest.$ac_ext >&5
22337   rm -rf conftest*
22338   eval "ac_cv_func_setproctitle=no"
22339 fi
22340 rm -f conftest*
22341 fi
22342
22343 if eval "test \"`echo '$ac_cv_func_'setproctitle`\" = yes"; then
22344   echo "$ac_t""yes" 1>&6
22345   have_setproctitle=yes
22346 else
22347   echo "$ac_t""no" 1>&6
22348
22349                 echo $ac_n "checking for setproctitle in -lutil""... $ac_c" 1>&6
22350 echo "configure:22349: checking for setproctitle in -lutil" >&5
22351 ac_lib_var=`echo util'_'setproctitle | sed 'y%./+-:%__p__%'`
22352 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
22353   echo $ac_n "(cached) $ac_c" 1>&6
22354 else
22355   ac_save_LIBS="$LIBS"
22356 LIBS="-lutil  $LIBS"
22357 cat > conftest.$ac_ext <<EOF
22358 #line 22357 "configure"
22359 #include "confdefs.h"
22360 /* Override any gcc2 internal prototype to avoid an error.  */
22361 /* We use char because int might match the return type of a gcc2
22362     builtin and then its argument prototype would still apply.  */
22363 char setproctitle();
22364
22365 int main() {
22366 setproctitle()
22367 ; return 0; }
22368 EOF
22369 if { (eval echo configure:22368: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22370   rm -rf conftest*
22371   eval "ac_cv_lib_$ac_lib_var=yes"
22372 else
22373   echo "configure: failed program was:" >&5
22374   cat conftest.$ac_ext >&5
22375   rm -rf conftest*
22376   eval "ac_cv_lib_$ac_lib_var=no"
22377 fi
22378 rm -f conftest*
22379 LIBS="$ac_save_LIBS"
22380
22381 fi
22382 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
22383   echo "$ac_t""yes" 1>&6
22384   have_setproctitle=yes
22385                         LUTIL_LIBS="$LUTIL_LIBS -lutil"
22386 else
22387   echo "$ac_t""no" 1>&6
22388 have_setproctitle=no
22389                         LIBOBJS="$LIBOBJS setproctitle.o"
22390                         LIBSRCS="$LIBSRCS setproctitle.c"
22391 fi
22392
22393 fi
22394
22395
22396         if test $have_setproctitle = yes ; then
22397                 cat >> confdefs.h <<\EOF
22398 #define HAVE_SETPROCTITLE 1
22399 EOF
22400
22401         fi
22402 fi
22403
22404 if test $ol_enable_slp != no ; then
22405         for ac_hdr in slp.h 
22406 do
22407 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
22408 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
22409 echo "configure:22408: checking for $ac_hdr" >&5
22410 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
22411   echo $ac_n "(cached) $ac_c" 1>&6
22412 else
22413   cat > conftest.$ac_ext <<EOF
22414 #line 22413 "configure"
22415 #include "confdefs.h"
22416 #include <$ac_hdr>
22417 EOF
22418 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
22419 { (eval echo configure:22418: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
22420 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
22421 if test -z "$ac_err"; then
22422   rm -rf conftest*
22423   eval "ac_cv_header_$ac_safe=yes"
22424 else
22425   echo "$ac_err" >&5
22426   echo "configure: failed program was:" >&5
22427   cat conftest.$ac_ext >&5
22428   rm -rf conftest*
22429   eval "ac_cv_header_$ac_safe=no"
22430 fi
22431 rm -f conftest*
22432 fi
22433 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
22434   echo "$ac_t""yes" 1>&6
22435     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
22436   cat >> confdefs.h <<EOF
22437 #define $ac_tr_hdr 1
22438 EOF
22439  
22440 else
22441   echo "$ac_t""no" 1>&6
22442 fi
22443 done
22444
22445
22446         if test $ac_cv_header_slp_h = yes ; then
22447                 echo $ac_n "checking for SLPOpen in -lslp""... $ac_c" 1>&6
22448 echo "configure:22447: checking for SLPOpen in -lslp" >&5
22449 ac_lib_var=`echo slp'_'SLPOpen | sed 'y%./+-:%__p__%'`
22450 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
22451   echo $ac_n "(cached) $ac_c" 1>&6
22452 else
22453   ac_save_LIBS="$LIBS"
22454 LIBS="-lslp  $LIBS"
22455 cat > conftest.$ac_ext <<EOF
22456 #line 22455 "configure"
22457 #include "confdefs.h"
22458 /* Override any gcc2 internal prototype to avoid an error.  */
22459 /* We use char because int might match the return type of a gcc2
22460     builtin and then its argument prototype would still apply.  */
22461 char SLPOpen();
22462
22463 int main() {
22464 SLPOpen()
22465 ; return 0; }
22466 EOF
22467 if { (eval echo configure:22466: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22468   rm -rf conftest*
22469   eval "ac_cv_lib_$ac_lib_var=yes"
22470 else
22471   echo "configure: failed program was:" >&5
22472   cat conftest.$ac_ext >&5
22473   rm -rf conftest*
22474   eval "ac_cv_lib_$ac_lib_var=no"
22475 fi
22476 rm -f conftest*
22477 LIBS="$ac_save_LIBS"
22478
22479 fi
22480 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
22481   echo "$ac_t""yes" 1>&6
22482   have_slp=yes
22483 else
22484   echo "$ac_t""no" 1>&6
22485 have_slp=no
22486 fi
22487
22488                 if test $have_slp = yes ; then
22489                         cat >> confdefs.h <<\EOF
22490 #define HAVE_SLP 1
22491 EOF
22492
22493                         SLAPD_SLP_LIBS=-lslp
22494                 fi
22495
22496         elif test $ol_enable_slp = yes ; then
22497                 { echo "configure: error: SLP not found" 1>&2; exit 1; }
22498         fi
22499 fi
22500
22501 if test "$ol_with_multiple_precision" != "no" ; then
22502         ol_have_bignum=no
22503         ol_have_gmp=no
22504
22505         for ac_hdr in openssl/bn.h bn.h
22506 do
22507 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
22508 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
22509 echo "configure:22508: checking for $ac_hdr" >&5
22510 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
22511   echo $ac_n "(cached) $ac_c" 1>&6
22512 else
22513   cat > conftest.$ac_ext <<EOF
22514 #line 22513 "configure"
22515 #include "confdefs.h"
22516 #include <$ac_hdr>
22517 EOF
22518 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
22519 { (eval echo configure:22518: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
22520 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
22521 if test -z "$ac_err"; then
22522   rm -rf conftest*
22523   eval "ac_cv_header_$ac_safe=yes"
22524 else
22525   echo "$ac_err" >&5
22526   echo "configure: failed program was:" >&5
22527   cat conftest.$ac_ext >&5
22528   rm -rf conftest*
22529   eval "ac_cv_header_$ac_safe=no"
22530 fi
22531 rm -f conftest*
22532 fi
22533 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
22534   echo "$ac_t""yes" 1>&6
22535     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
22536   cat >> confdefs.h <<EOF
22537 #define $ac_tr_hdr 1
22538 EOF
22539  
22540 else
22541   echo "$ac_t""no" 1>&6
22542 fi
22543 done
22544
22545         for ac_hdr in openssl/crypto.h crypto.h
22546 do
22547 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
22548 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
22549 echo "configure:22548: checking for $ac_hdr" >&5
22550 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
22551   echo $ac_n "(cached) $ac_c" 1>&6
22552 else
22553   cat > conftest.$ac_ext <<EOF
22554 #line 22553 "configure"
22555 #include "confdefs.h"
22556 #include <$ac_hdr>
22557 EOF
22558 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
22559 { (eval echo configure:22558: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
22560 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
22561 if test -z "$ac_err"; then
22562   rm -rf conftest*
22563   eval "ac_cv_header_$ac_safe=yes"
22564 else
22565   echo "$ac_err" >&5
22566   echo "configure: failed program was:" >&5
22567   cat conftest.$ac_ext >&5
22568   rm -rf conftest*
22569   eval "ac_cv_header_$ac_safe=no"
22570 fi
22571 rm -f conftest*
22572 fi
22573 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
22574   echo "$ac_t""yes" 1>&6
22575     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
22576   cat >> confdefs.h <<EOF
22577 #define $ac_tr_hdr 1
22578 EOF
22579  
22580 else
22581   echo "$ac_t""no" 1>&6
22582 fi
22583 done
22584
22585         for ac_hdr in gmp.h 
22586 do
22587 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
22588 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
22589 echo "configure:22588: checking for $ac_hdr" >&5
22590 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
22591   echo $ac_n "(cached) $ac_c" 1>&6
22592 else
22593   cat > conftest.$ac_ext <<EOF
22594 #line 22593 "configure"
22595 #include "confdefs.h"
22596 #include <$ac_hdr>
22597 EOF
22598 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
22599 { (eval echo configure:22598: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
22600 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
22601 if test -z "$ac_err"; then
22602   rm -rf conftest*
22603   eval "ac_cv_header_$ac_safe=yes"
22604 else
22605   echo "$ac_err" >&5
22606   echo "configure: failed program was:" >&5
22607   cat conftest.$ac_ext >&5
22608   rm -rf conftest*
22609   eval "ac_cv_header_$ac_safe=no"
22610 fi
22611 rm -f conftest*
22612 fi
22613 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
22614   echo "$ac_t""yes" 1>&6
22615     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
22616   cat >> confdefs.h <<EOF
22617 #define $ac_tr_hdr 1
22618 EOF
22619  
22620 else
22621   echo "$ac_t""no" 1>&6
22622 fi
22623 done
22624
22625
22626         if test "$ol_with_tls" = "found" ; then
22627                 ol_have_bn_h=no
22628                 ol_have_crypto_h=no
22629
22630                 if test "$ac_cv_header_openssl_bn_h" = "yes" \
22631                                 -o "$ac_cv_header_bn_h" = "yes" ; then
22632                         ol_have_bn_h=yes
22633                 fi
22634
22635                 if test "$ac_cv_header_openssl_crypto_h" = "yes" \
22636                                 -o "$ac_cv_header_crypto_h" = "yes" ; then
22637                         ol_have_crypto_h=yes
22638                 fi
22639
22640                 if test "$ol_have_bn_h" = "yes" \
22641                                 -a "$ol_have_crypto_h" = "yes" ; then
22642                         ol_have_bignum=yes
22643                 fi
22644         fi
22645
22646         if test $ac_cv_header_gmp_h = yes ; then
22647                 echo $ac_n "checking for __gmpz_add_ui in -lgmp""... $ac_c" 1>&6
22648 echo "configure:22647: checking for __gmpz_add_ui in -lgmp" >&5
22649 ac_lib_var=`echo gmp'_'__gmpz_add_ui | sed 'y%./+-:%__p__%'`
22650 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
22651   echo $ac_n "(cached) $ac_c" 1>&6
22652 else
22653   ac_save_LIBS="$LIBS"
22654 LIBS="-lgmp  $LIBS"
22655 cat > conftest.$ac_ext <<EOF
22656 #line 22655 "configure"
22657 #include "confdefs.h"
22658 /* Override any gcc2 internal prototype to avoid an error.  */
22659 /* We use char because int might match the return type of a gcc2
22660     builtin and then its argument prototype would still apply.  */
22661 char __gmpz_add_ui();
22662
22663 int main() {
22664 __gmpz_add_ui()
22665 ; return 0; }
22666 EOF
22667 if { (eval echo configure:22666: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22668   rm -rf conftest*
22669   eval "ac_cv_lib_$ac_lib_var=yes"
22670 else
22671   echo "configure: failed program was:" >&5
22672   cat conftest.$ac_ext >&5
22673   rm -rf conftest*
22674   eval "ac_cv_lib_$ac_lib_var=no"
22675 fi
22676 rm -f conftest*
22677 LIBS="$ac_save_LIBS"
22678
22679 fi
22680 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
22681   echo "$ac_t""yes" 1>&6
22682   have_gmp=yes
22683 else
22684   echo "$ac_t""no" 1>&6
22685 have_gmp=no
22686 fi
22687
22688                 if test $have_gmp = yes ; then
22689                         ol_have_gmp=yes
22690                 fi
22691         fi
22692
22693         echo $ac_n "checking for multiple precision support""... $ac_c" 1>&6
22694 echo "configure:22693: checking for multiple precision support" >&5
22695
22696         ol_mp_support="none"
22697         case "$ol_with_multiple_precision" in
22698         auto)
22699                                                                                 if test "$ol_have_bignum" = "yes" ; then
22700                         ol_mp_support="bignum"
22701                 else
22702                         if test "$ol_have_gmp" = "yes" ; then
22703                                 ol_mp_support="gmp"
22704                         fi
22705                 fi
22706                 ;;
22707         bignum)
22708                 if test "$ol_have_bignum" != "yes" ; then
22709                         { echo "configure: error: OpenSSL's BIGNUM not available" 1>&2; exit 1; }
22710                 fi
22711                 ol_mp_support="bignum"
22712                 ;;
22713         gmp)
22714                 if test "$ol_have_gmp" != "yes" ; then
22715                         { echo "configure: error: GMP not available" 1>&2; exit 1; }
22716                 fi
22717                 ol_mp_support="gmp"
22718                 ;;
22719         yes)
22720                 if test "$ol_have_bignum" = "yes" ; then
22721                         ol_mp_support="bignum"
22722                 elif test "$ol_have_gmp" = "yes" ; then
22723                         ol_mp_support="gmp"
22724                 else
22725                         { echo "configure: error: not available" 1>&2; exit 1; }
22726                 fi
22727                 ;;
22728         esac
22729
22730         case "$ol_mp_support" in
22731         bignum)
22732                 cat >> confdefs.h <<\EOF
22733 #define HAVE_BIGNUM 1
22734 EOF
22735
22736                 ;;
22737         gmp)
22738                 cat >> confdefs.h <<\EOF
22739 #define HAVE_GMP 1
22740 EOF
22741
22742                 SLAPD_GMP_LIBS=-lgmp
22743                 ;;
22744         none)
22745                 ;;
22746         esac
22747
22748         echo "$ac_t""$ol_mp_support" 1>&6
22749 fi
22750
22751
22752 echo $ac_n "checking long long""... $ac_c" 1>&6
22753 echo "configure:22752: checking long long" >&5
22754 if eval "test \"\${ol_cv_type_long_long+set}\" = set"; then
22755   echo $ac_n "(cached) $ac_c" 1>&6
22756 else
22757   
22758         cat > conftest.$ac_ext <<EOF
22759 #line 22758 "configure"
22760 #include "confdefs.h"
22761
22762 int main() {
22763 long long x;
22764 ; return 0; }
22765 EOF
22766 if { (eval echo configure:22765: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22767   rm -rf conftest*
22768   ol_cv_type_long_long=yes
22769 else
22770   echo "configure: failed program was:" >&5
22771   cat conftest.$ac_ext >&5
22772   rm -rf conftest*
22773   ol_cv_type_long_long=no
22774 fi
22775 rm -f conftest*
22776 fi
22777
22778 echo "$ac_t""$ol_cv_type_long_long" 1>&6
22779 if test $ol_cv_type_long_long = yes; then
22780         cat >> confdefs.h <<\EOF
22781 #define HAVE_LONG_LONG 1
22782 EOF
22783
22784 fi
22785
22786 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
22787 echo "configure:22786: checking for ANSI C header files" >&5
22788 if eval "test \"\${ac_cv_header_stdc+set}\" = set"; then
22789   echo $ac_n "(cached) $ac_c" 1>&6
22790 else
22791   cat > conftest.$ac_ext <<EOF
22792 #line 22791 "configure"
22793 #include "confdefs.h"
22794 #include <stdlib.h>
22795 #include <stdarg.h>
22796 #include <string.h>
22797 #include <float.h>
22798 EOF
22799 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
22800 { (eval echo configure:22799: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
22801 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
22802 if test -z "$ac_err"; then
22803   rm -rf conftest*
22804   ac_cv_header_stdc=yes
22805 else
22806   echo "$ac_err" >&5
22807   echo "configure: failed program was:" >&5
22808   cat conftest.$ac_ext >&5
22809   rm -rf conftest*
22810   ac_cv_header_stdc=no
22811 fi
22812 rm -f conftest*
22813
22814 if test $ac_cv_header_stdc = yes; then
22815   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
22816 cat > conftest.$ac_ext <<EOF
22817 #line 22816 "configure"
22818 #include "confdefs.h"
22819 #include <string.h>
22820 EOF
22821 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
22822   egrep "memchr" >/dev/null 2>&1; then
22823   :
22824 else
22825   rm -rf conftest*
22826   ac_cv_header_stdc=no
22827 fi
22828 rm -f conftest*
22829
22830 fi
22831
22832 if test $ac_cv_header_stdc = yes; then
22833   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
22834 cat > conftest.$ac_ext <<EOF
22835 #line 22834 "configure"
22836 #include "confdefs.h"
22837 #include <stdlib.h>
22838 EOF
22839 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
22840   egrep "free" >/dev/null 2>&1; then
22841   :
22842 else
22843   rm -rf conftest*
22844   ac_cv_header_stdc=no
22845 fi
22846 rm -f conftest*
22847
22848 fi
22849
22850 if test $ac_cv_header_stdc = yes; then
22851   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
22852 if test "$cross_compiling" = yes; then
22853   :
22854 else
22855   cat > conftest.$ac_ext <<EOF
22856 #line 22855 "configure"
22857 #include "confdefs.h"
22858 #include <ctype.h>
22859 #if ((' ' & 0x0FF) == 0x020)
22860 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
22861 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
22862 #else
22863 #define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
22864  || ('j' <= (c) && (c) <= 'r') \
22865  || ('s' <= (c) && (c) <= 'z'))
22866 #define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
22867 #endif
22868 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
22869 int main () { int i; for (i = 0; i < 256; i++)
22870 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
22871 exit (0); }
22872
22873 EOF
22874 if { (eval echo configure:22873: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
22875 then
22876   :
22877 else
22878   echo "configure: failed program was:" >&5
22879   cat conftest.$ac_ext >&5
22880   rm -fr conftest*
22881   ac_cv_header_stdc=no
22882 fi
22883 rm -fr conftest*
22884 fi
22885
22886 fi
22887 fi
22888
22889 echo "$ac_t""$ac_cv_header_stdc" 1>&6
22890 if test $ac_cv_header_stdc = yes; then
22891   cat >> confdefs.h <<\EOF
22892 #define STDC_HEADERS 1
22893 EOF
22894
22895 fi
22896
22897 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
22898 echo "configure:22897: checking for mode_t" >&5
22899 if eval "test \"\${ac_cv_type_mode_t+set}\" = set"; then
22900   echo $ac_n "(cached) $ac_c" 1>&6
22901 else
22902   cat > conftest.$ac_ext <<EOF
22903 #line 22902 "configure"
22904 #include "confdefs.h"
22905 #include <sys/types.h>
22906 #if STDC_HEADERS
22907 #include <stdlib.h>
22908 #include <stddef.h>
22909 #endif
22910
22911 EOF
22912 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
22913   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
22914   rm -rf conftest*
22915   eval "ac_cv_type_mode_t=yes"
22916 else
22917   rm -rf conftest*
22918   eval "ac_cv_type_mode_t=no"
22919 fi
22920 rm -f conftest*
22921
22922 fi
22923 if eval "test \"`echo '$ac_cv_type_'mode_t`\" = yes"; then
22924   echo "$ac_t""yes" 1>&6
22925 else
22926   echo "$ac_t""no" 1>&6
22927   cat >> confdefs.h <<EOF
22928 #define mode_t int
22929 EOF
22930
22931 fi
22932
22933 echo $ac_n "checking for off_t""... $ac_c" 1>&6
22934 echo "configure:22933: checking for off_t" >&5
22935 if eval "test \"\${ac_cv_type_off_t+set}\" = set"; then
22936   echo $ac_n "(cached) $ac_c" 1>&6
22937 else
22938   cat > conftest.$ac_ext <<EOF
22939 #line 22938 "configure"
22940 #include "confdefs.h"
22941 #include <sys/types.h>
22942 #if STDC_HEADERS
22943 #include <stdlib.h>
22944 #include <stddef.h>
22945 #endif
22946
22947 EOF
22948 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
22949   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
22950   rm -rf conftest*
22951   eval "ac_cv_type_off_t=yes"
22952 else
22953   rm -rf conftest*
22954   eval "ac_cv_type_off_t=no"
22955 fi
22956 rm -f conftest*
22957
22958 fi
22959 if eval "test \"`echo '$ac_cv_type_'off_t`\" = yes"; then
22960   echo "$ac_t""yes" 1>&6
22961 else
22962   echo "$ac_t""no" 1>&6
22963   cat >> confdefs.h <<EOF
22964 #define off_t long
22965 EOF
22966
22967 fi
22968
22969 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
22970 echo "configure:22969: checking for pid_t" >&5
22971 if eval "test \"\${ac_cv_type_pid_t+set}\" = set"; then
22972   echo $ac_n "(cached) $ac_c" 1>&6
22973 else
22974   cat > conftest.$ac_ext <<EOF
22975 #line 22974 "configure"
22976 #include "confdefs.h"
22977 #include <sys/types.h>
22978 #if STDC_HEADERS
22979 #include <stdlib.h>
22980 #include <stddef.h>
22981 #endif
22982
22983 EOF
22984 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
22985   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
22986   rm -rf conftest*
22987   eval "ac_cv_type_pid_t=yes"
22988 else
22989   rm -rf conftest*
22990   eval "ac_cv_type_pid_t=no"
22991 fi
22992 rm -f conftest*
22993
22994 fi
22995 if eval "test \"`echo '$ac_cv_type_'pid_t`\" = yes"; then
22996   echo "$ac_t""yes" 1>&6
22997 else
22998   echo "$ac_t""no" 1>&6
22999   cat >> confdefs.h <<EOF
23000 #define pid_t int
23001 EOF
23002
23003 fi
23004
23005 echo $ac_n "checking for ptrdiff_t""... $ac_c" 1>&6
23006 echo "configure:23005: checking for ptrdiff_t" >&5
23007 if eval "test \"\${am_cv_type_ptrdiff_t+set}\" = set"; then
23008   echo $ac_n "(cached) $ac_c" 1>&6
23009 else
23010   cat > conftest.$ac_ext <<EOF
23011 #line 23010 "configure"
23012 #include "confdefs.h"
23013 #include <stddef.h>
23014 int main() {
23015 ptrdiff_t p
23016 ; return 0; }
23017 EOF
23018 if { (eval echo configure:23017: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23019   rm -rf conftest*
23020   am_cv_type_ptrdiff_t=yes
23021 else
23022   echo "configure: failed program was:" >&5
23023   cat conftest.$ac_ext >&5
23024   rm -rf conftest*
23025   am_cv_type_ptrdiff_t=no
23026 fi
23027 rm -f conftest*
23028 fi
23029
23030 echo "$ac_t""$am_cv_type_ptrdiff_t" 1>&6
23031    if test $am_cv_type_ptrdiff_t = yes; then
23032      cat >> confdefs.h <<\EOF
23033 #define HAVE_PTRDIFF_T 1
23034 EOF
23035
23036    fi
23037
23038 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
23039 echo "configure:23038: checking return type of signal handlers" >&5
23040 if eval "test \"\${ac_cv_type_signal+set}\" = set"; then
23041   echo $ac_n "(cached) $ac_c" 1>&6
23042 else
23043   cat > conftest.$ac_ext <<EOF
23044 #line 23043 "configure"
23045 #include "confdefs.h"
23046 #include <sys/types.h>
23047 #include <signal.h>
23048 #ifdef signal
23049 #undef signal
23050 #endif
23051 #ifdef __cplusplus
23052 extern "C" void (*signal (int, void (*)(int)))(int);
23053 #else
23054 void (*signal ()) ();
23055 #endif
23056
23057 int main() {
23058 int i;
23059 ; return 0; }
23060 EOF
23061 if { (eval echo configure:23060: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23062   rm -rf conftest*
23063   ac_cv_type_signal=void
23064 else
23065   echo "configure: failed program was:" >&5
23066   cat conftest.$ac_ext >&5
23067   rm -rf conftest*
23068   ac_cv_type_signal=int
23069 fi
23070 rm -f conftest*
23071 fi
23072
23073 echo "$ac_t""$ac_cv_type_signal" 1>&6
23074 cat >> confdefs.h <<EOF
23075 #define RETSIGTYPE $ac_cv_type_signal
23076 EOF
23077
23078
23079 echo $ac_n "checking for size_t""... $ac_c" 1>&6
23080 echo "configure:23079: checking for size_t" >&5
23081 if eval "test \"\${ac_cv_type_size_t+set}\" = set"; then
23082   echo $ac_n "(cached) $ac_c" 1>&6
23083 else
23084   cat > conftest.$ac_ext <<EOF
23085 #line 23084 "configure"
23086 #include "confdefs.h"
23087 #include <sys/types.h>
23088 #if STDC_HEADERS
23089 #include <stdlib.h>
23090 #include <stddef.h>
23091 #endif
23092
23093 EOF
23094 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
23095   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
23096   rm -rf conftest*
23097   eval "ac_cv_type_size_t=yes"
23098 else
23099   rm -rf conftest*
23100   eval "ac_cv_type_size_t=no"
23101 fi
23102 rm -f conftest*
23103
23104 fi
23105 if eval "test \"`echo '$ac_cv_type_'size_t`\" = yes"; then
23106   echo "$ac_t""yes" 1>&6
23107 else
23108   echo "$ac_t""no" 1>&6
23109   cat >> confdefs.h <<EOF
23110 #define size_t unsigned
23111 EOF
23112
23113 fi
23114
23115
23116 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
23117 echo "configure:23116: checking for ssize_t" >&5
23118 if eval "test \"\${ac_cv_type_ssize_t+set}\" = set"; then
23119   echo $ac_n "(cached) $ac_c" 1>&6
23120 else
23121   cat > conftest.$ac_ext <<EOF
23122 #line 23121 "configure"
23123 #include "confdefs.h"
23124 #include <sys/types.h>
23125 #if STDC_HEADERS
23126 #include <stdlib.h>
23127 #include <stddef.h>
23128 #endif
23129
23130 EOF
23131 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
23132   egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
23133   rm -rf conftest*
23134   eval "ac_cv_type_ssize_t=yes"
23135 else
23136   rm -rf conftest*
23137   eval "ac_cv_type_ssize_t=no"
23138 fi
23139 rm -f conftest*
23140
23141 fi
23142 if eval "test \"`echo '$ac_cv_type_'ssize_t`\" = yes"; then
23143   echo "$ac_t""yes" 1>&6
23144 else
23145   echo "$ac_t""no" 1>&6
23146   cat >> confdefs.h <<EOF
23147 #define ssize_t signed int
23148 EOF
23149
23150 fi
23151
23152 echo $ac_n "checking for caddr_t""... $ac_c" 1>&6
23153 echo "configure:23152: checking for caddr_t" >&5
23154 if eval "test \"\${ac_cv_type_caddr_t+set}\" = set"; then
23155   echo $ac_n "(cached) $ac_c" 1>&6
23156 else
23157   cat > conftest.$ac_ext <<EOF
23158 #line 23157 "configure"
23159 #include "confdefs.h"
23160 #include <sys/types.h>
23161 #if STDC_HEADERS
23162 #include <stdlib.h>
23163 #include <stddef.h>
23164 #endif
23165
23166 EOF
23167 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
23168   egrep "(^|[^a-zA-Z_0-9])caddr_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
23169   rm -rf conftest*
23170   eval "ac_cv_type_caddr_t=yes"
23171 else
23172   rm -rf conftest*
23173   eval "ac_cv_type_caddr_t=no"
23174 fi
23175 rm -f conftest*
23176
23177 fi
23178 if eval "test \"`echo '$ac_cv_type_'caddr_t`\" = yes"; then
23179   echo "$ac_t""yes" 1>&6
23180 else
23181   echo "$ac_t""no" 1>&6
23182   cat >> confdefs.h <<EOF
23183 #define caddr_t char *
23184 EOF
23185
23186 fi
23187
23188
23189 echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
23190 echo "configure:23189: checking for socklen_t" >&5
23191 if eval "test \"\${ol_cv_type_socklen_t+set}\" = set"; then
23192   echo $ac_n "(cached) $ac_c" 1>&6
23193 else
23194   cat > conftest.$ac_ext <<EOF
23195 #line 23194 "configure"
23196 #include "confdefs.h"
23197
23198 #ifdef HAVE_SYS_TYPES_H
23199 #include <sys/types.h>
23200 #endif
23201 #ifdef HAVE_SYS_SOCKET_H
23202 #include <sys/socket.h>
23203 #endif
23204
23205 int main() {
23206 socklen_t len;
23207 ; return 0; }
23208 EOF
23209 if { (eval echo configure:23208: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23210   rm -rf conftest*
23211   ol_cv_type_socklen_t=yes
23212 else
23213   echo "configure: failed program was:" >&5
23214   cat conftest.$ac_ext >&5
23215   rm -rf conftest*
23216   ol_cv_type_socklen_t=no
23217 fi
23218 rm -f conftest*
23219 fi
23220
23221 echo "$ac_t""$ol_cv_type_socklen_t" 1>&6
23222   if test $ol_cv_type_socklen_t = no; then
23223     cat >> confdefs.h <<\EOF
23224 #define socklen_t int
23225 EOF
23226
23227   fi
23228  
23229 echo $ac_n "checking for member st_blksize in aggregate type struct stat""... $ac_c" 1>&6
23230 echo "configure:23229: checking for member st_blksize in aggregate type struct stat" >&5
23231 if eval "test \"\${ac_cv_c_struct_member_st_blksize+set}\" = set"; then
23232   echo $ac_n "(cached) $ac_c" 1>&6
23233 else
23234   cat > conftest.$ac_ext <<EOF
23235 #line 23234 "configure"
23236 #include "confdefs.h"
23237 #include <sys/types.h>
23238 #include <sys/stat.h>
23239 int main() {
23240 struct stat foo; foo.st_blksize;
23241 ; return 0; }
23242 EOF
23243 if { (eval echo configure:23242: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23244   rm -rf conftest*
23245   ac_cv_c_struct_member_st_blksize=yes
23246 else
23247   echo "configure: failed program was:" >&5
23248   cat conftest.$ac_ext >&5
23249   rm -rf conftest*
23250   ac_cv_c_struct_member_st_blksize=no
23251 fi
23252 rm -f conftest*
23253 fi
23254
23255 echo "$ac_t""$ac_cv_c_struct_member_st_blksize" 1>&6
23256 st_blksize="$ac_cv_c_struct_member_st_blksize"
23257 if test $ac_cv_c_struct_member_st_blksize = yes; then
23258   cat >> confdefs.h <<\EOF
23259 #define HAVE_ST_BLKSIZE 1
23260 EOF
23261
23262 fi
23263
23264 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
23265 echo "configure:23264: checking whether time.h and sys/time.h may both be included" >&5
23266 if eval "test \"\${ac_cv_header_time+set}\" = set"; then
23267   echo $ac_n "(cached) $ac_c" 1>&6
23268 else
23269   cat > conftest.$ac_ext <<EOF
23270 #line 23269 "configure"
23271 #include "confdefs.h"
23272 #include <sys/types.h>
23273 #include <sys/time.h>
23274 #include <time.h>
23275 int main() {
23276 struct tm *tp;
23277 ; return 0; }
23278 EOF
23279 if { (eval echo configure:23278: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23280   rm -rf conftest*
23281   ac_cv_header_time=yes
23282 else
23283   echo "configure: failed program was:" >&5
23284   cat conftest.$ac_ext >&5
23285   rm -rf conftest*
23286   ac_cv_header_time=no
23287 fi
23288 rm -f conftest*
23289 fi
23290
23291 echo "$ac_t""$ac_cv_header_time" 1>&6
23292 if test $ac_cv_header_time = yes; then
23293   cat >> confdefs.h <<\EOF
23294 #define TIME_WITH_SYS_TIME 1
23295 EOF
23296
23297 fi
23298
23299 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
23300 echo "configure:23299: checking whether struct tm is in sys/time.h or time.h" >&5
23301 if eval "test \"\${ac_cv_struct_tm+set}\" = set"; then
23302   echo $ac_n "(cached) $ac_c" 1>&6
23303 else
23304   cat > conftest.$ac_ext <<EOF
23305 #line 23304 "configure"
23306 #include "confdefs.h"
23307 #include <sys/types.h>
23308 #include <time.h>
23309 int main() {
23310 struct tm *tp; tp->tm_sec;
23311 ; return 0; }
23312 EOF
23313 if { (eval echo configure:23312: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23314   rm -rf conftest*
23315   ac_cv_struct_tm=time.h
23316 else
23317   echo "configure: failed program was:" >&5
23318   cat conftest.$ac_ext >&5
23319   rm -rf conftest*
23320   ac_cv_struct_tm=sys/time.h
23321 fi
23322 rm -f conftest*
23323 fi
23324
23325 echo "$ac_t""$ac_cv_struct_tm" 1>&6
23326 if test $ac_cv_struct_tm = sys/time.h; then
23327   cat >> confdefs.h <<\EOF
23328 #define TM_IN_SYS_TIME 1
23329 EOF
23330
23331 fi
23332
23333 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
23334 echo "configure:23333: checking for uid_t in sys/types.h" >&5
23335 if eval "test \"\${ac_cv_type_uid_t+set}\" = set"; then
23336   echo $ac_n "(cached) $ac_c" 1>&6
23337 else
23338   cat > conftest.$ac_ext <<EOF
23339 #line 23338 "configure"
23340 #include "confdefs.h"
23341 #include <sys/types.h>
23342 EOF
23343 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
23344   egrep "uid_t" >/dev/null 2>&1; then
23345   rm -rf conftest*
23346   ac_cv_type_uid_t=yes
23347 else
23348   rm -rf conftest*
23349   ac_cv_type_uid_t=no
23350 fi
23351 rm -f conftest*
23352
23353 fi
23354
23355 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
23356 if test $ac_cv_type_uid_t = no; then
23357   cat >> confdefs.h <<\EOF
23358 #define uid_t int
23359 EOF
23360
23361   cat >> confdefs.h <<\EOF
23362 #define gid_t int
23363 EOF
23364
23365 fi
23366
23367 echo $ac_n "checking for sig_atomic_t""... $ac_c" 1>&6
23368 echo "configure:23367: checking for sig_atomic_t" >&5
23369 if eval "test \"\${ol_cv_type_sig_atomic_t+set}\" = set"; then
23370   echo $ac_n "(cached) $ac_c" 1>&6
23371 else
23372   cat > conftest.$ac_ext <<EOF
23373 #line 23372 "configure"
23374 #include "confdefs.h"
23375 #include <signal.h>
23376 int main() {
23377 sig_atomic_t atomic;
23378 ; return 0; }
23379 EOF
23380 if { (eval echo configure:23379: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23381   rm -rf conftest*
23382   ol_cv_type_sig_atomic_t=yes
23383 else
23384   echo "configure: failed program was:" >&5
23385   cat conftest.$ac_ext >&5
23386   rm -rf conftest*
23387   ol_cv_type_sig_atomic_t=no
23388 fi
23389 rm -f conftest*
23390 fi
23391
23392 echo "$ac_t""$ol_cv_type_sig_atomic_t" 1>&6
23393   if test $ol_cv_type_sig_atomic_t = no; then
23394     cat >> confdefs.h <<\EOF
23395 #define sig_atomic_t int
23396 EOF
23397
23398   fi
23399  
23400
23401
23402 # test for pw_gecos in struct passwd
23403 echo $ac_n "checking struct passwd for pw_gecos""... $ac_c" 1>&6
23404 echo "configure:23403: checking struct passwd for pw_gecos" >&5
23405 if eval "test \"\${ol_cv_struct_passwd_pw_gecos+set}\" = set"; then
23406   echo $ac_n "(cached) $ac_c" 1>&6
23407 else
23408   
23409         cat > conftest.$ac_ext <<EOF
23410 #line 23409 "configure"
23411 #include "confdefs.h"
23412 #include <pwd.h>
23413 int main() {
23414
23415         struct passwd pwd;
23416         pwd.pw_gecos = pwd.pw_name;
23417
23418 ; return 0; }
23419 EOF
23420 if { (eval echo configure:23419: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23421   rm -rf conftest*
23422   ol_cv_struct_passwd_pw_gecos=yes
23423 else
23424   echo "configure: failed program was:" >&5
23425   cat conftest.$ac_ext >&5
23426   rm -rf conftest*
23427   ol_cv_struct_passwd_pw_gecos=no
23428 fi
23429 rm -f conftest*
23430 fi
23431
23432 echo "$ac_t""$ol_cv_struct_passwd_pw_gecos" 1>&6
23433 if test $ol_cv_struct_passwd_pw_gecos = yes ; then
23434         cat >> confdefs.h <<\EOF
23435 #define HAVE_PW_GECOS 1
23436 EOF
23437
23438 fi
23439
23440 # test for pw_passwd in struct passwd
23441 echo $ac_n "checking struct passwd for pw_passwd""... $ac_c" 1>&6
23442 echo "configure:23441: checking struct passwd for pw_passwd" >&5
23443 if eval "test \"\${ol_cv_struct_passwd_pw_passwd+set}\" = set"; then
23444   echo $ac_n "(cached) $ac_c" 1>&6
23445 else
23446   
23447         cat > conftest.$ac_ext <<EOF
23448 #line 23447 "configure"
23449 #include "confdefs.h"
23450 #include <pwd.h>
23451 int main() {
23452
23453         struct passwd pwd;
23454         pwd.pw_passwd = pwd.pw_name;
23455
23456 ; return 0; }
23457 EOF
23458 if { (eval echo configure:23457: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23459   rm -rf conftest*
23460   ol_cv_struct_passwd_pw_passwd=yes
23461 else
23462   echo "configure: failed program was:" >&5
23463   cat conftest.$ac_ext >&5
23464   rm -rf conftest*
23465   ol_cv_struct_passwd_pw_passwd=no
23466 fi
23467 rm -f conftest*
23468 fi
23469
23470 echo "$ac_t""$ol_cv_struct_passwd_pw_passwd" 1>&6
23471 if test $ol_cv_struct_passwd_pw_passwd = yes ; then
23472         cat >> confdefs.h <<\EOF
23473 #define HAVE_PW_PASSWD 1
23474 EOF
23475
23476 fi
23477
23478
23479 echo $ac_n "checking if toupper() requires islower()""... $ac_c" 1>&6
23480 echo "configure:23479: checking if toupper() requires islower()" >&5
23481 if eval "test \"\${ol_cv_c_upper_lower+set}\" = set"; then
23482   echo $ac_n "(cached) $ac_c" 1>&6
23483 else
23484   
23485         if test "$cross_compiling" = yes; then
23486   ol_cv_c_upper_lower=safe
23487 else
23488   cat > conftest.$ac_ext <<EOF
23489 #line 23488 "configure"
23490 #include "confdefs.h"
23491
23492 #include <ctype.h>
23493 main()
23494 {
23495         if ('C' == toupper('C'))
23496                 exit(0);
23497         else
23498                 exit(1);
23499 }
23500 EOF
23501 if { (eval echo configure:23500: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
23502 then
23503   ol_cv_c_upper_lower=no
23504 else
23505   echo "configure: failed program was:" >&5
23506   cat conftest.$ac_ext >&5
23507   rm -fr conftest*
23508   ol_cv_c_upper_lower=yes
23509 fi
23510 rm -fr conftest*
23511 fi
23512
23513 fi
23514
23515 echo "$ac_t""$ol_cv_c_upper_lower" 1>&6
23516 if test $ol_cv_c_upper_lower != no ; then
23517         cat >> confdefs.h <<\EOF
23518 #define C_UPPER_LOWER 1
23519 EOF
23520
23521 fi
23522
23523 echo $ac_n "checking for working const""... $ac_c" 1>&6
23524 echo "configure:23523: checking for working const" >&5
23525 if eval "test \"\${ac_cv_c_const+set}\" = set"; then
23526   echo $ac_n "(cached) $ac_c" 1>&6
23527 else
23528   cat > conftest.$ac_ext <<EOF
23529 #line 23528 "configure"
23530 #include "confdefs.h"
23531
23532 int main() {
23533
23534 /* Ultrix mips cc rejects this.  */
23535 typedef int charset[2]; const charset x;
23536 /* SunOS 4.1.1 cc rejects this.  */
23537 char const *const *ccp;
23538 char **p;
23539 /* NEC SVR4.0.2 mips cc rejects this.  */
23540 struct point {int x, y;};
23541 static struct point const zero = {0,0};
23542 /* AIX XL C 1.02.0.0 rejects this.
23543    It does not let you subtract one const X* pointer from another in an arm
23544    of an if-expression whose if-part is not a constant expression */
23545 const char *g = "string";
23546 ccp = &g + (g ? g-g : 0);
23547 /* HPUX 7.0 cc rejects these. */
23548 ++ccp;
23549 p = (char**) ccp;
23550 ccp = (char const *const *) p;
23551 { /* SCO 3.2v4 cc rejects this.  */
23552   char *t;
23553   char const *s = 0 ? (char *) 0 : (char const *) 0;
23554
23555   *t++ = 0;
23556 }
23557 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
23558   int x[] = {25, 17};
23559   const int *foo = &x[0];
23560   ++foo;
23561 }
23562 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
23563   typedef const int *iptr;
23564   iptr p = 0;
23565   ++p;
23566 }
23567 { /* AIX XL C 1.02.0.0 rejects this saying
23568      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
23569   struct s { int j; const int *ap[3]; };
23570   struct s *b; b->j = 5;
23571 }
23572 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
23573   const int foo = 10;
23574 }
23575
23576 ; return 0; }
23577 EOF
23578 if { (eval echo configure:23577: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23579   rm -rf conftest*
23580   ac_cv_c_const=yes
23581 else
23582   echo "configure: failed program was:" >&5
23583   cat conftest.$ac_ext >&5
23584   rm -rf conftest*
23585   ac_cv_c_const=no
23586 fi
23587 rm -f conftest*
23588 fi
23589
23590 echo "$ac_t""$ac_cv_c_const" 1>&6
23591 if test $ac_cv_c_const = no; then
23592   cat >> confdefs.h <<\EOF
23593 #define const 
23594 EOF
23595
23596 fi
23597
23598 echo $ac_n "checking if compiler understands volatile""... $ac_c" 1>&6
23599 echo "configure:23598: checking if compiler understands volatile" >&5
23600 if eval "test \"\${ol_cv_c_volatile+set}\" = set"; then
23601   echo $ac_n "(cached) $ac_c" 1>&6
23602 else
23603   cat > conftest.$ac_ext <<EOF
23604 #line 23603 "configure"
23605 #include "confdefs.h"
23606 int x, y, z;
23607 int main() {
23608 volatile int a; int * volatile b = x ? &y : &z;
23609       /* Older MIPS compilers (eg., in Ultrix 4.2) don't like *b = 0 */
23610       *b = 0;
23611 ; return 0; }
23612 EOF
23613 if { (eval echo configure:23612: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23614   rm -rf conftest*
23615   ol_cv_c_volatile=yes
23616 else
23617   echo "configure: failed program was:" >&5
23618   cat conftest.$ac_ext >&5
23619   rm -rf conftest*
23620   ol_cv_c_volatile=no
23621 fi
23622 rm -f conftest*
23623 fi
23624
23625 echo "$ac_t""$ol_cv_c_volatile" 1>&6
23626   if test $ol_cv_c_volatile = yes; then
23627     : 
23628   else
23629     cat >> confdefs.h <<\EOF
23630 #define volatile 
23631 EOF
23632
23633   fi
23634  
23635
23636 if test $cross_compiling = yes ; then
23637         echo "configure: warning: Crossing compiling... all bets are off!" 1>&2
23638         cat >> confdefs.h <<\EOF
23639 #define CROSS_COMPILING 1
23640 EOF
23641
23642 else
23643         echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
23644 echo "configure:23643: checking whether byte ordering is bigendian" >&5
23645 if eval "test \"\${ac_cv_c_bigendian+set}\" = set"; then
23646   echo $ac_n "(cached) $ac_c" 1>&6
23647 else
23648   ac_cv_c_bigendian=unknown
23649 # See if sys/param.h defines the BYTE_ORDER macro.
23650 cat > conftest.$ac_ext <<EOF
23651 #line 23650 "configure"
23652 #include "confdefs.h"
23653 #include <sys/types.h>
23654 #include <sys/param.h>
23655 int main() {
23656
23657 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
23658  bogus endian macros
23659 #endif
23660 ; return 0; }
23661 EOF
23662 if { (eval echo configure:23661: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23663   rm -rf conftest*
23664   # It does; now see whether it defined to BIG_ENDIAN or not.
23665 cat > conftest.$ac_ext <<EOF
23666 #line 23665 "configure"
23667 #include "confdefs.h"
23668 #include <sys/types.h>
23669 #include <sys/param.h>
23670 int main() {
23671
23672 #if BYTE_ORDER != BIG_ENDIAN
23673  not big endian
23674 #endif
23675 ; return 0; }
23676 EOF
23677 if { (eval echo configure:23676: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23678   rm -rf conftest*
23679   ac_cv_c_bigendian=yes
23680 else
23681   echo "configure: failed program was:" >&5
23682   cat conftest.$ac_ext >&5
23683   rm -rf conftest*
23684   ac_cv_c_bigendian=no
23685 fi
23686 rm -f conftest*
23687 else
23688   echo "configure: failed program was:" >&5
23689   cat conftest.$ac_ext >&5
23690 fi
23691 rm -f conftest*
23692 if test $ac_cv_c_bigendian = unknown; then
23693 if test "$cross_compiling" = yes; then
23694     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
23695 else
23696   cat > conftest.$ac_ext <<EOF
23697 #line 23696 "configure"
23698 #include "confdefs.h"
23699 main () {
23700   /* Are we little or big endian?  From Harbison&Steele.  */
23701   union
23702   {
23703     long l;
23704     char c[sizeof (long)];
23705   } u;
23706   u.l = 1;
23707   exit (u.c[sizeof (long) - 1] == 1);
23708 }
23709 EOF
23710 if { (eval echo configure:23709: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
23711 then
23712   ac_cv_c_bigendian=no
23713 else
23714   echo "configure: failed program was:" >&5
23715   cat conftest.$ac_ext >&5
23716   rm -fr conftest*
23717   ac_cv_c_bigendian=yes
23718 fi
23719 rm -fr conftest*
23720 fi
23721
23722 fi
23723 fi
23724
23725 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
23726 if test $ac_cv_c_bigendian = yes; then
23727   cat >> confdefs.h <<\EOF
23728 #define WORDS_BIGENDIAN 1
23729 EOF
23730
23731 fi
23732
23733 fi
23734
23735 echo $ac_n "checking size of short""... $ac_c" 1>&6
23736 echo "configure:23735: checking size of short" >&5 
23737 if eval "test \"\${ac_cv_sizeof_short+set}\" = set"; then
23738   echo $ac_n "(cached) $ac_c" 1>&6
23739 else
23740   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
23741   cat > conftest.$ac_ext <<EOF
23742 #line 23741 "configure"
23743 #include "confdefs.h"
23744 #include "confdefs.h" 
23745 #include <stdlib.h>
23746 #include <sys/types.h> 
23747  
23748
23749 int main() {
23750 switch (0) case 0: case (sizeof (short) == $ac_size):;
23751 ; return 0; }
23752 EOF
23753 if { (eval echo configure:23752: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23754   rm -rf conftest*
23755   ac_cv_sizeof_short=$ac_size
23756 else
23757   echo "configure: failed program was:" >&5
23758   cat conftest.$ac_ext >&5
23759 fi
23760 rm -f conftest* 
23761   if test x$ac_cv_sizeof_short != x ; then break; fi 
23762 done 
23763
23764 fi
23765  
23766 if test x$ac_cv_sizeof_short = x ; then 
23767   { echo "configure: error: cannot determine a size for short" 1>&2; exit 1; } 
23768 fi 
23769 echo "$ac_t""$ac_cv_sizeof_short" 1>&6 
23770 cat >> confdefs.h <<EOF
23771 #define SIZEOF_SHORT $ac_cv_sizeof_short
23772 EOF
23773  
23774  
23775 echo $ac_n "checking size of int""... $ac_c" 1>&6
23776 echo "configure:23775: checking size of int" >&5 
23777 if eval "test \"\${ac_cv_sizeof_int+set}\" = set"; then
23778   echo $ac_n "(cached) $ac_c" 1>&6
23779 else
23780   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
23781   cat > conftest.$ac_ext <<EOF
23782 #line 23781 "configure"
23783 #include "confdefs.h"
23784 #include "confdefs.h" 
23785 #include <stdlib.h>
23786 #include <sys/types.h> 
23787  
23788
23789 int main() {
23790 switch (0) case 0: case (sizeof (int) == $ac_size):;
23791 ; return 0; }
23792 EOF
23793 if { (eval echo configure:23792: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23794   rm -rf conftest*
23795   ac_cv_sizeof_int=$ac_size
23796 else
23797   echo "configure: failed program was:" >&5
23798   cat conftest.$ac_ext >&5
23799 fi
23800 rm -f conftest* 
23801   if test x$ac_cv_sizeof_int != x ; then break; fi 
23802 done 
23803
23804 fi
23805  
23806 if test x$ac_cv_sizeof_int = x ; then 
23807   { echo "configure: error: cannot determine a size for int" 1>&2; exit 1; } 
23808 fi 
23809 echo "$ac_t""$ac_cv_sizeof_int" 1>&6 
23810 cat >> confdefs.h <<EOF
23811 #define SIZEOF_INT $ac_cv_sizeof_int
23812 EOF
23813  
23814  
23815 echo $ac_n "checking size of long""... $ac_c" 1>&6
23816 echo "configure:23815: checking size of long" >&5 
23817 if eval "test \"\${ac_cv_sizeof_long+set}\" = set"; then
23818   echo $ac_n "(cached) $ac_c" 1>&6
23819 else
23820   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
23821   cat > conftest.$ac_ext <<EOF
23822 #line 23821 "configure"
23823 #include "confdefs.h"
23824 #include "confdefs.h" 
23825 #include <stdlib.h>
23826 #include <sys/types.h> 
23827  
23828
23829 int main() {
23830 switch (0) case 0: case (sizeof (long) == $ac_size):;
23831 ; return 0; }
23832 EOF
23833 if { (eval echo configure:23832: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23834   rm -rf conftest*
23835   ac_cv_sizeof_long=$ac_size
23836 else
23837   echo "configure: failed program was:" >&5
23838   cat conftest.$ac_ext >&5
23839 fi
23840 rm -f conftest* 
23841   if test x$ac_cv_sizeof_long != x ; then break; fi 
23842 done 
23843
23844 fi
23845  
23846 if test x$ac_cv_sizeof_long = x ; then 
23847   { echo "configure: error: cannot determine a size for long" 1>&2; exit 1; } 
23848 fi 
23849 echo "$ac_t""$ac_cv_sizeof_long" 1>&6 
23850 cat >> confdefs.h <<EOF
23851 #define SIZEOF_LONG $ac_cv_sizeof_long
23852 EOF
23853  
23854
23855 echo $ac_n "checking size of wchar_t""... $ac_c" 1>&6
23856 echo "configure:23855: checking size of wchar_t" >&5 
23857 if eval "test \"\${ac_cv_sizeof_wchar_t+set}\" = set"; then
23858   echo $ac_n "(cached) $ac_c" 1>&6
23859 else
23860   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
23861   cat > conftest.$ac_ext <<EOF
23862 #line 23861 "configure"
23863 #include "confdefs.h"
23864 #include "confdefs.h" 
23865 #include <stdlib.h>
23866 #include <sys/types.h> 
23867  
23868
23869 int main() {
23870 switch (0) case 0: case (sizeof (wchar_t) == $ac_size):;
23871 ; return 0; }
23872 EOF
23873 if { (eval echo configure:23872: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23874   rm -rf conftest*
23875   ac_cv_sizeof_wchar_t=$ac_size
23876 else
23877   echo "configure: failed program was:" >&5
23878   cat conftest.$ac_ext >&5
23879 fi
23880 rm -f conftest* 
23881   if test x$ac_cv_sizeof_wchar_t != x ; then break; fi 
23882 done 
23883
23884 fi
23885  
23886 if test x$ac_cv_sizeof_wchar_t = x ; then 
23887   { echo "configure: error: cannot determine a size for wchar_t" 1>&2; exit 1; } 
23888 fi 
23889 echo "$ac_t""$ac_cv_sizeof_wchar_t" 1>&6 
23890 cat >> confdefs.h <<EOF
23891 #define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
23892 EOF
23893  
23894
23895
23896 if test "$ac_cv_sizeof_int" -lt 4 ; then
23897         echo "configure: warning: OpenLDAP requires 'int' to be 32 bits or greater." 1>&2
23898
23899         cat >> confdefs.h <<\EOF
23900 #define LBER_INT_T long
23901 EOF
23902
23903 else
23904         cat >> confdefs.h <<\EOF
23905 #define LBER_INT_T int
23906 EOF
23907
23908 fi
23909
23910 cat >> confdefs.h <<\EOF
23911 #define LBER_LEN_T long
23912 EOF
23913
23914 cat >> confdefs.h <<\EOF
23915 #define LBER_SOCKET_T int
23916 EOF
23917
23918 cat >> confdefs.h <<\EOF
23919 #define LBER_TAG_T long
23920 EOF
23921
23922
23923 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
23924 echo "configure:23923: checking for 8-bit clean memcmp" >&5
23925 if eval "test \"\${ac_cv_func_memcmp_clean+set}\" = set"; then
23926   echo $ac_n "(cached) $ac_c" 1>&6
23927 else
23928   if test "$cross_compiling" = yes; then
23929   ac_cv_func_memcmp_clean=no
23930 else
23931   cat > conftest.$ac_ext <<EOF
23932 #line 23931 "configure"
23933 #include "confdefs.h"
23934
23935 main()
23936 {
23937   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
23938   exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
23939 }
23940
23941 EOF
23942 if { (eval echo configure:23941: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
23943 then
23944   ac_cv_func_memcmp_clean=yes
23945 else
23946   echo "configure: failed program was:" >&5
23947   cat conftest.$ac_ext >&5
23948   rm -fr conftest*
23949   ac_cv_func_memcmp_clean=no
23950 fi
23951 rm -fr conftest*
23952 fi
23953
23954 fi
23955
23956 echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
23957 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
23958
23959 echo $ac_n "checking for strftime""... $ac_c" 1>&6
23960 echo "configure:23959: checking for strftime" >&5
23961 if eval "test \"\${ac_cv_func_strftime+set}\" = set"; then
23962   echo $ac_n "(cached) $ac_c" 1>&6
23963 else
23964   cat > conftest.$ac_ext <<EOF
23965 #line 23964 "configure"
23966 #include "confdefs.h"
23967 /* System header to define __stub macros and hopefully few prototypes,
23968     which can conflict with char strftime(); below.  */
23969 #include <assert.h>
23970 /* Override any gcc2 internal prototype to avoid an error.  */
23971 /* We use char because int might match the return type of a gcc2
23972     builtin and then its argument prototype would still apply.  */
23973 char strftime();
23974 char (*f)();
23975
23976 int main() {
23977
23978 /* The GNU C library defines this for functions which it implements
23979     to always fail with ENOSYS.  Some functions are actually named
23980     something starting with __ and the normal name is an alias.  */
23981 #if defined (__stub_strftime) || defined (__stub___strftime)
23982 choke me
23983 #else
23984 f = strftime;
23985 #endif
23986
23987 ; return 0; }
23988 EOF
23989 if { (eval echo configure:23988: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
23990   rm -rf conftest*
23991   eval "ac_cv_func_strftime=yes"
23992 else
23993   echo "configure: failed program was:" >&5
23994   cat conftest.$ac_ext >&5
23995   rm -rf conftest*
23996   eval "ac_cv_func_strftime=no"
23997 fi
23998 rm -f conftest*
23999 fi
24000
24001 if eval "test \"`echo '$ac_cv_func_'strftime`\" = yes"; then
24002   echo "$ac_t""yes" 1>&6
24003   cat >> confdefs.h <<\EOF
24004 #define HAVE_STRFTIME 1
24005 EOF
24006
24007 else
24008   echo "$ac_t""no" 1>&6
24009 # strftime is in -lintl on SCO UNIX.
24010 echo $ac_n "checking for strftime in -lintl""... $ac_c" 1>&6
24011 echo "configure:24010: checking for strftime in -lintl" >&5
24012 ac_lib_var=`echo intl'_'strftime | sed 'y%./+-:%__p__%'`
24013 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
24014   echo $ac_n "(cached) $ac_c" 1>&6
24015 else
24016   ac_save_LIBS="$LIBS"
24017 LIBS="-lintl  $LIBS"
24018 cat > conftest.$ac_ext <<EOF
24019 #line 24018 "configure"
24020 #include "confdefs.h"
24021 /* Override any gcc2 internal prototype to avoid an error.  */
24022 /* We use char because int might match the return type of a gcc2
24023     builtin and then its argument prototype would still apply.  */
24024 char strftime();
24025
24026 int main() {
24027 strftime()
24028 ; return 0; }
24029 EOF
24030 if { (eval echo configure:24029: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
24031   rm -rf conftest*
24032   eval "ac_cv_lib_$ac_lib_var=yes"
24033 else
24034   echo "configure: failed program was:" >&5
24035   cat conftest.$ac_ext >&5
24036   rm -rf conftest*
24037   eval "ac_cv_lib_$ac_lib_var=no"
24038 fi
24039 rm -f conftest*
24040 LIBS="$ac_save_LIBS"
24041
24042 fi
24043 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
24044   echo "$ac_t""yes" 1>&6
24045   cat >> confdefs.h <<\EOF
24046 #define HAVE_STRFTIME 1
24047 EOF
24048
24049 LIBS="-lintl $LIBS"
24050 else
24051   echo "$ac_t""no" 1>&6
24052 fi
24053
24054 fi
24055
24056
24057 echo $ac_n "checking for inet_aton()""... $ac_c" 1>&6
24058 echo "configure:24057: checking for inet_aton()" >&5
24059 if eval "test \"\${ol_cv_func_inet_aton+set}\" = set"; then
24060   echo $ac_n "(cached) $ac_c" 1>&6
24061 else
24062   cat > conftest.$ac_ext <<EOF
24063 #line 24062 "configure"
24064 #include "confdefs.h"
24065
24066 #ifdef HAVE_SYS_TYPES_H
24067 #       include <sys/types.h>
24068 #endif
24069 #ifdef HAVE_SYS_SOCKET_H
24070 #       include <sys/socket.h>
24071 #       ifdef HAVE_SYS_SELECT_H
24072 #               include <sys/select.h>
24073 #       endif
24074 #       include <netinet/in.h>
24075 #       ifdef HAVE_ARPA_INET_H
24076 #               include <arpa/inet.h>
24077 #       endif
24078 #endif
24079
24080 int main() {
24081 struct in_addr in;
24082 int rc = inet_aton( "255.255.255.255", &in );
24083 ; return 0; }
24084 EOF
24085 if { (eval echo configure:24084: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
24086   rm -rf conftest*
24087   ol_cv_func_inet_aton=yes
24088 else
24089   echo "configure: failed program was:" >&5
24090   cat conftest.$ac_ext >&5
24091   rm -rf conftest*
24092   ol_cv_func_inet_aton=no
24093 fi
24094 rm -f conftest*
24095 fi
24096
24097 echo "$ac_t""$ol_cv_func_inet_aton" 1>&6
24098   if test $ol_cv_func_inet_aton != no; then
24099     cat >> confdefs.h <<\EOF
24100 #define HAVE_INET_ATON 1
24101 EOF
24102
24103   fi
24104  
24105
24106 echo $ac_n "checking for _spawnlp""... $ac_c" 1>&6
24107 echo "configure:24106: checking for _spawnlp" >&5
24108 if eval "test \"\${ac_cv_func__spawnlp+set}\" = set"; then
24109   echo $ac_n "(cached) $ac_c" 1>&6
24110 else
24111   cat > conftest.$ac_ext <<EOF
24112 #line 24111 "configure"
24113 #include "confdefs.h"
24114 /* System header to define __stub macros and hopefully few prototypes,
24115     which can conflict with char _spawnlp(); below.  */
24116 #include <assert.h>
24117 /* Override any gcc2 internal prototype to avoid an error.  */
24118 /* We use char because int might match the return type of a gcc2
24119     builtin and then its argument prototype would still apply.  */
24120 char _spawnlp();
24121 char (*f)();
24122
24123 int main() {
24124
24125 /* The GNU C library defines this for functions which it implements
24126     to always fail with ENOSYS.  Some functions are actually named
24127     something starting with __ and the normal name is an alias.  */
24128 #if defined (__stub__spawnlp) || defined (__stub____spawnlp)
24129 choke me
24130 #else
24131 f = _spawnlp;
24132 #endif
24133
24134 ; return 0; }
24135 EOF
24136 if { (eval echo configure:24135: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
24137   rm -rf conftest*
24138   eval "ac_cv_func__spawnlp=yes"
24139 else
24140   echo "configure: failed program was:" >&5
24141   cat conftest.$ac_ext >&5
24142   rm -rf conftest*
24143   eval "ac_cv_func__spawnlp=no"
24144 fi
24145 rm -f conftest*
24146 fi
24147
24148 if eval "test \"`echo '$ac_cv_func_'_spawnlp`\" = yes"; then
24149   echo "$ac_t""yes" 1>&6
24150   cat >> confdefs.h <<\EOF
24151 #define HAVE_SPAWNLP 1
24152 EOF
24153
24154 else
24155   echo "$ac_t""no" 1>&6
24156 fi
24157
24158
24159 echo $ac_n "checking for _snprintf""... $ac_c" 1>&6
24160 echo "configure:24159: checking for _snprintf" >&5
24161 if eval "test \"\${ac_cv_func__snprintf+set}\" = set"; then
24162   echo $ac_n "(cached) $ac_c" 1>&6
24163 else
24164   cat > conftest.$ac_ext <<EOF
24165 #line 24164 "configure"
24166 #include "confdefs.h"
24167 /* System header to define __stub macros and hopefully few prototypes,
24168     which can conflict with char _snprintf(); below.  */
24169 #include <assert.h>
24170 /* Override any gcc2 internal prototype to avoid an error.  */
24171 /* We use char because int might match the return type of a gcc2
24172     builtin and then its argument prototype would still apply.  */
24173 char _snprintf();
24174 char (*f)();
24175
24176 int main() {
24177
24178 /* The GNU C library defines this for functions which it implements
24179     to always fail with ENOSYS.  Some functions are actually named
24180     something starting with __ and the normal name is an alias.  */
24181 #if defined (__stub__snprintf) || defined (__stub____snprintf)
24182 choke me
24183 #else
24184 f = _snprintf;
24185 #endif
24186
24187 ; return 0; }
24188 EOF
24189 if { (eval echo configure:24188: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
24190   rm -rf conftest*
24191   eval "ac_cv_func__snprintf=yes"
24192 else
24193   echo "configure: failed program was:" >&5
24194   cat conftest.$ac_ext >&5
24195   rm -rf conftest*
24196   eval "ac_cv_func__snprintf=no"
24197 fi
24198 rm -f conftest*
24199 fi
24200
24201 if eval "test \"`echo '$ac_cv_func_'_snprintf`\" = yes"; then
24202   echo "$ac_t""yes" 1>&6
24203   ac_cv_func_snprintf=yes
24204         cat >> confdefs.h <<\EOF
24205 #define snprintf _snprintf
24206 EOF
24207
24208
24209 else
24210   echo "$ac_t""no" 1>&6
24211 fi
24212
24213
24214 echo $ac_n "checking for _vsnprintf""... $ac_c" 1>&6
24215 echo "configure:24214: checking for _vsnprintf" >&5
24216 if eval "test \"\${ac_cv_func__vsnprintf+set}\" = set"; then
24217   echo $ac_n "(cached) $ac_c" 1>&6
24218 else
24219   cat > conftest.$ac_ext <<EOF
24220 #line 24219 "configure"
24221 #include "confdefs.h"
24222 /* System header to define __stub macros and hopefully few prototypes,
24223     which can conflict with char _vsnprintf(); below.  */
24224 #include <assert.h>
24225 /* Override any gcc2 internal prototype to avoid an error.  */
24226 /* We use char because int might match the return type of a gcc2
24227     builtin and then its argument prototype would still apply.  */
24228 char _vsnprintf();
24229 char (*f)();
24230
24231 int main() {
24232
24233 /* The GNU C library defines this for functions which it implements
24234     to always fail with ENOSYS.  Some functions are actually named
24235     something starting with __ and the normal name is an alias.  */
24236 #if defined (__stub__vsnprintf) || defined (__stub____vsnprintf)
24237 choke me
24238 #else
24239 f = _vsnprintf;
24240 #endif
24241
24242 ; return 0; }
24243 EOF
24244 if { (eval echo configure:24243: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
24245   rm -rf conftest*
24246   eval "ac_cv_func__vsnprintf=yes"
24247 else
24248   echo "configure: failed program was:" >&5
24249   cat conftest.$ac_ext >&5
24250   rm -rf conftest*
24251   eval "ac_cv_func__vsnprintf=no"
24252 fi
24253 rm -f conftest*
24254 fi
24255
24256 if eval "test \"`echo '$ac_cv_func_'_vsnprintf`\" = yes"; then
24257   echo "$ac_t""yes" 1>&6
24258   ac_cv_func_vsnprintf=yes
24259         cat >> confdefs.h <<\EOF
24260 #define vsnprintf _vsnprintf
24261 EOF
24262
24263
24264 else
24265   echo "$ac_t""no" 1>&6
24266 fi
24267
24268
24269 echo $ac_n "checking for vprintf""... $ac_c" 1>&6
24270 echo "configure:24269: checking for vprintf" >&5
24271 if eval "test \"\${ac_cv_func_vprintf+set}\" = set"; then
24272   echo $ac_n "(cached) $ac_c" 1>&6
24273 else
24274   cat > conftest.$ac_ext <<EOF
24275 #line 24274 "configure"
24276 #include "confdefs.h"
24277 /* System header to define __stub macros and hopefully few prototypes,
24278     which can conflict with char vprintf(); below.  */
24279 #include <assert.h>
24280 /* Override any gcc2 internal prototype to avoid an error.  */
24281 /* We use char because int might match the return type of a gcc2
24282     builtin and then its argument prototype would still apply.  */
24283 char vprintf();
24284 char (*f)();
24285
24286 int main() {
24287
24288 /* The GNU C library defines this for functions which it implements
24289     to always fail with ENOSYS.  Some functions are actually named
24290     something starting with __ and the normal name is an alias.  */
24291 #if defined (__stub_vprintf) || defined (__stub___vprintf)
24292 choke me
24293 #else
24294 f = vprintf;
24295 #endif
24296
24297 ; return 0; }
24298 EOF
24299 if { (eval echo configure:24298: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
24300   rm -rf conftest*
24301   eval "ac_cv_func_vprintf=yes"
24302 else
24303   echo "configure: failed program was:" >&5
24304   cat conftest.$ac_ext >&5
24305   rm -rf conftest*
24306   eval "ac_cv_func_vprintf=no"
24307 fi
24308 rm -f conftest*
24309 fi
24310
24311 if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
24312   echo "$ac_t""yes" 1>&6
24313   cat >> confdefs.h <<\EOF
24314 #define HAVE_VPRINTF 1
24315 EOF
24316
24317 else
24318   echo "$ac_t""no" 1>&6
24319 fi
24320
24321 if test "$ac_cv_func_vprintf" != yes; then
24322 echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
24323 echo "configure:24322: checking for _doprnt" >&5
24324 if eval "test \"\${ac_cv_func__doprnt+set}\" = set"; then
24325   echo $ac_n "(cached) $ac_c" 1>&6
24326 else
24327   cat > conftest.$ac_ext <<EOF
24328 #line 24327 "configure"
24329 #include "confdefs.h"
24330 /* System header to define __stub macros and hopefully few prototypes,
24331     which can conflict with char _doprnt(); below.  */
24332 #include <assert.h>
24333 /* Override any gcc2 internal prototype to avoid an error.  */
24334 /* We use char because int might match the return type of a gcc2
24335     builtin and then its argument prototype would still apply.  */
24336 char _doprnt();
24337 char (*f)();
24338
24339 int main() {
24340
24341 /* The GNU C library defines this for functions which it implements
24342     to always fail with ENOSYS.  Some functions are actually named
24343     something starting with __ and the normal name is an alias.  */
24344 #if defined (__stub__doprnt) || defined (__stub____doprnt)
24345 choke me
24346 #else
24347 f = _doprnt;
24348 #endif
24349
24350 ; return 0; }
24351 EOF
24352 if { (eval echo configure:24351: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
24353   rm -rf conftest*
24354   eval "ac_cv_func__doprnt=yes"
24355 else
24356   echo "configure: failed program was:" >&5
24357   cat conftest.$ac_ext >&5
24358   rm -rf conftest*
24359   eval "ac_cv_func__doprnt=no"
24360 fi
24361 rm -f conftest*
24362 fi
24363
24364 if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
24365   echo "$ac_t""yes" 1>&6
24366   cat >> confdefs.h <<\EOF
24367 #define HAVE_DOPRNT 1
24368 EOF
24369
24370 else
24371   echo "$ac_t""no" 1>&6
24372 fi
24373
24374 fi
24375
24376
24377 if test $ac_cv_func_vprintf = yes ; then
24378                 for ac_func in snprintf vsnprintf
24379 do
24380 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
24381 echo "configure:24380: checking for $ac_func" >&5
24382 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
24383   echo $ac_n "(cached) $ac_c" 1>&6
24384 else
24385   cat > conftest.$ac_ext <<EOF
24386 #line 24385 "configure"
24387 #include "confdefs.h"
24388 /* System header to define __stub macros and hopefully few prototypes,
24389     which can conflict with char $ac_func(); below.  */
24390 #include <assert.h>
24391 /* Override any gcc2 internal prototype to avoid an error.  */
24392 /* We use char because int might match the return type of a gcc2
24393     builtin and then its argument prototype would still apply.  */
24394 char $ac_func();
24395 char (*f)();
24396
24397 int main() {
24398
24399 /* The GNU C library defines this for functions which it implements
24400     to always fail with ENOSYS.  Some functions are actually named
24401     something starting with __ and the normal name is an alias.  */
24402 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
24403 choke me
24404 #else
24405 f = $ac_func;
24406 #endif
24407
24408 ; return 0; }
24409 EOF
24410 if { (eval echo configure:24409: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
24411   rm -rf conftest*
24412   eval "ac_cv_func_$ac_func=yes"
24413 else
24414   echo "configure: failed program was:" >&5
24415   cat conftest.$ac_ext >&5
24416   rm -rf conftest*
24417   eval "ac_cv_func_$ac_func=no"
24418 fi
24419 rm -f conftest*
24420 fi
24421
24422 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
24423   echo "$ac_t""yes" 1>&6
24424     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
24425   cat >> confdefs.h <<EOF
24426 #define $ac_tr_func 1
24427 EOF
24428  
24429 else
24430   echo "$ac_t""no" 1>&6
24431 fi
24432 done
24433
24434 fi
24435
24436 for ac_func in \
24437         bcopy                   \
24438         closesocket             \
24439         chroot                  \
24440         endgrent                \
24441         endpwent                \
24442         fcntl                   \
24443         flock                   \
24444         fstat                   \
24445         getdtablesize   \
24446         getgrgid                \
24447         gethostname             \
24448         getpass                 \
24449         getpassphrase   \
24450         getpwuid                \
24451         getpwnam                \
24452         getspnam                \
24453         gettimeofday    \
24454         initgroups              \
24455         lockf                   \
24456         memcpy                  \
24457         memmove                 \
24458         mkstemp                 \
24459         mktemp                  \
24460         pipe                    \
24461         read                    \
24462         recv                    \
24463         recvfrom                \
24464         setpwfile               \
24465         setgid                  \
24466         setegid                 \
24467         setsid                  \
24468         setuid                  \
24469         seteuid                 \
24470         sigaction               \
24471         signal                  \
24472         sigset                  \
24473         strdup                  \
24474         strpbrk                 \
24475         strrchr                 \
24476         strsep                  \
24477         strstr                  \
24478         strtol                  \
24479         strtoul                 \
24480         strtoq                  \
24481         strtouq                 \
24482         strtoll                 \
24483         strspn                  \
24484         sysconf                 \
24485         usleep                  \
24486         waitpid                 \
24487         wait4                   \
24488         write                   \
24489         send                    \
24490         sendmsg                 \
24491         sendto                  \
24492
24493 do
24494 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
24495 echo "configure:24494: checking for $ac_func" >&5
24496 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
24497   echo $ac_n "(cached) $ac_c" 1>&6
24498 else
24499   cat > conftest.$ac_ext <<EOF
24500 #line 24499 "configure"
24501 #include "confdefs.h"
24502 /* System header to define __stub macros and hopefully few prototypes,
24503     which can conflict with char $ac_func(); below.  */
24504 #include <assert.h>
24505 /* Override any gcc2 internal prototype to avoid an error.  */
24506 /* We use char because int might match the return type of a gcc2
24507     builtin and then its argument prototype would still apply.  */
24508 char $ac_func();
24509 char (*f)();
24510
24511 int main() {
24512
24513 /* The GNU C library defines this for functions which it implements
24514     to always fail with ENOSYS.  Some functions are actually named
24515     something starting with __ and the normal name is an alias.  */
24516 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
24517 choke me
24518 #else
24519 f = $ac_func;
24520 #endif
24521
24522 ; return 0; }
24523 EOF
24524 if { (eval echo configure:24523: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
24525   rm -rf conftest*
24526   eval "ac_cv_func_$ac_func=yes"
24527 else
24528   echo "configure: failed program was:" >&5
24529   cat conftest.$ac_ext >&5
24530   rm -rf conftest*
24531   eval "ac_cv_func_$ac_func=no"
24532 fi
24533 rm -f conftest*
24534 fi
24535
24536 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
24537   echo "$ac_t""yes" 1>&6
24538     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
24539   cat >> confdefs.h <<EOF
24540 #define $ac_tr_func 1
24541 EOF
24542  
24543 else
24544   echo "$ac_t""no" 1>&6
24545 fi
24546 done
24547
24548
24549 for ac_func in getopt getpeereid
24550 do
24551 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
24552 echo "configure:24551: checking for $ac_func" >&5
24553 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
24554   echo $ac_n "(cached) $ac_c" 1>&6
24555 else
24556   cat > conftest.$ac_ext <<EOF
24557 #line 24556 "configure"
24558 #include "confdefs.h"
24559 /* System header to define __stub macros and hopefully few prototypes,
24560     which can conflict with char $ac_func(); below.  */
24561 #include <assert.h>
24562 /* Override any gcc2 internal prototype to avoid an error.  */
24563 /* We use char because int might match the return type of a gcc2
24564     builtin and then its argument prototype would still apply.  */
24565 char $ac_func();
24566 char (*f)();
24567
24568 int main() {
24569
24570 /* The GNU C library defines this for functions which it implements
24571     to always fail with ENOSYS.  Some functions are actually named
24572     something starting with __ and the normal name is an alias.  */
24573 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
24574 choke me
24575 #else
24576 f = $ac_func;
24577 #endif
24578
24579 ; return 0; }
24580 EOF
24581 if { (eval echo configure:24580: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
24582   rm -rf conftest*
24583   eval "ac_cv_func_$ac_func=yes"
24584 else
24585   echo "configure: failed program was:" >&5
24586   cat conftest.$ac_ext >&5
24587   rm -rf conftest*
24588   eval "ac_cv_func_$ac_func=no"
24589 fi
24590 rm -f conftest*
24591 fi
24592
24593 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
24594   echo "$ac_t""yes" 1>&6
24595     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
24596   cat >> confdefs.h <<EOF
24597 #define $ac_tr_func 1
24598 EOF
24599  
24600 else
24601   echo "$ac_t""no" 1>&6
24602 LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
24603 fi
24604 done
24605
24606
24607
24608 if test "$ac_cv_func_getopt" != yes; then
24609         LIBSRCS="$LIBSRCS getopt.c"
24610 fi
24611 if test "$ac_cv_func_getpeereid" != yes; then
24612         echo $ac_n "checking for msg_accrights in msghdr""... $ac_c" 1>&6
24613 echo "configure:24612: checking for msg_accrights in msghdr" >&5
24614 if eval "test \"\${ol_cv_msghdr_msg_accrights+set}\" = set"; then
24615   echo $ac_n "(cached) $ac_c" 1>&6
24616 else
24617   cat > conftest.$ac_ext <<EOF
24618 #line 24617 "configure"
24619 #include "confdefs.h"
24620 #include <sys/socket.h>
24621 int main() {
24622 struct msghdr m; m.msg_accrightslen=0
24623 ; return 0; }
24624 EOF
24625 if { (eval echo configure:24624: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
24626   rm -rf conftest*
24627   ol_cv_msghdr_msg_accrights=yes
24628 else
24629   echo "configure: failed program was:" >&5
24630   cat conftest.$ac_ext >&5
24631   rm -rf conftest*
24632   ol_cv_msghdr_msg_accrights=no
24633 fi
24634 rm -f conftest*
24635         
24636 fi
24637
24638 echo "$ac_t""$ol_cv_msghdr_msg_accrights" 1>&6
24639   if test $ol_cv_msghdr_msg_accrights = "yes" ; then
24640         cat >> confdefs.h <<\EOF
24641 #define HAVE_MSGHDR_MSG_ACCRIGHTS 1
24642 EOF
24643
24644   fi
24645
24646         LIBSRCS="$LIBSRCS getpeereid.c"
24647 fi
24648 if test "$ac_cv_func_snprintf" != yes -o "$ac_cv_func_vsnprintf" != yes; then
24649         if test "$ac_cv_func_snprintf" != yes; then
24650                 cat >> confdefs.h <<\EOF
24651 #define snprintf ber_pvt_snprintf
24652 EOF
24653
24654         fi
24655         if test "$ac_cv_func_vsnprintf" != yes; then
24656                 cat >> confdefs.h <<\EOF
24657 #define vsnprintf ber_pvt_vsnprintf
24658 EOF
24659
24660         fi
24661 fi
24662
24663
24664 if test "$ol_enable_slapi" != no ; then
24665                         for ac_hdr in ltdl.h
24666 do
24667 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
24668 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
24669 echo "configure:24668: checking for $ac_hdr" >&5
24670 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
24671   echo $ac_n "(cached) $ac_c" 1>&6
24672 else
24673   cat > conftest.$ac_ext <<EOF
24674 #line 24673 "configure"
24675 #include "confdefs.h"
24676 #include <$ac_hdr>
24677 EOF
24678 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
24679 { (eval echo configure:24678: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
24680 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
24681 if test -z "$ac_err"; then
24682   rm -rf conftest*
24683   eval "ac_cv_header_$ac_safe=yes"
24684 else
24685   echo "$ac_err" >&5
24686   echo "configure: failed program was:" >&5
24687   cat conftest.$ac_ext >&5
24688   rm -rf conftest*
24689   eval "ac_cv_header_$ac_safe=no"
24690 fi
24691 rm -f conftest*
24692 fi
24693 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
24694   echo "$ac_t""yes" 1>&6
24695     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
24696   cat >> confdefs.h <<EOF
24697 #define $ac_tr_hdr 1
24698 EOF
24699  
24700 else
24701   echo "$ac_t""no" 1>&6
24702 fi
24703 done
24704
24705
24706         if test $ac_cv_header_ltdl_h != yes ; then
24707                 { echo "configure: error: could not locate <ltdl.h>" 1>&2; exit 1; }
24708         fi
24709         echo $ac_n "checking for lt_dlinit in -lltdl""... $ac_c" 1>&6
24710 echo "configure:24709: checking for lt_dlinit in -lltdl" >&5
24711 ac_lib_var=`echo ltdl'_'lt_dlinit | sed 'y%./+-:%__p__%'`
24712 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
24713   echo $ac_n "(cached) $ac_c" 1>&6
24714 else
24715   ac_save_LIBS="$LIBS"
24716 LIBS="-lltdl  $LIBS"
24717 cat > conftest.$ac_ext <<EOF
24718 #line 24717 "configure"
24719 #include "confdefs.h"
24720 /* Override any gcc2 internal prototype to avoid an error.  */
24721 /* We use char because int might match the return type of a gcc2
24722     builtin and then its argument prototype would still apply.  */
24723 char lt_dlinit();
24724
24725 int main() {
24726 lt_dlinit()
24727 ; return 0; }
24728 EOF
24729 if { (eval echo configure:24728: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
24730   rm -rf conftest*
24731   eval "ac_cv_lib_$ac_lib_var=yes"
24732 else
24733   echo "configure: failed program was:" >&5
24734   cat conftest.$ac_ext >&5
24735   rm -rf conftest*
24736   eval "ac_cv_lib_$ac_lib_var=no"
24737 fi
24738 rm -f conftest*
24739 LIBS="$ac_save_LIBS"
24740
24741 fi
24742 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
24743   echo "$ac_t""yes" 1>&6
24744   
24745                 SLAPI_LIBS=-lltdl
24746                 LIBSLAPI=libslapi.a
24747                 LIBSLAPITOOLS=../libslapi.a
24748                 cat >> confdefs.h <<\EOF
24749 #define HAVE_LIBLTDL 1
24750 EOF
24751
24752         
24753 else
24754   echo "$ac_t""no" 1>&6
24755 { echo "configure: error: could not locate libtool -lltdl" 1>&2; exit 1; }
24756 fi
24757
24758
24759         cat >> confdefs.h <<\EOF
24760 #define LDAP_SLAPI 1
24761 EOF
24762
24763 fi
24764
24765 if test "$ol_enable_debug" != no ; then
24766         cat >> confdefs.h <<\EOF
24767 #define LDAP_DEBUG 1
24768 EOF
24769
24770 fi
24771 if test "$ol_enable_syslog" = yes ; then
24772         cat >> confdefs.h <<\EOF
24773 #define LDAP_SYSLOG 1
24774 EOF
24775
24776 fi
24777 if test "$ol_link_kbind" != no ; then
24778         cat >> confdefs.h <<\EOF
24779 #define LDAP_API_FEATURE_X_OPENLDAP_V2_KBIND LDAP_VENDOR_VERSION
24780 EOF
24781
24782 fi
24783 if test "$ol_enable_proctitle" != no ; then
24784         cat >> confdefs.h <<\EOF
24785 #define LDAP_PROCTITLE 1
24786 EOF
24787
24788 fi
24789 if test "$ol_enable_referrals" != no ; then
24790         cat >> confdefs.h <<\EOF
24791 #define LDAP_API_FEATURE_X_OPENLDAP_V2_REFERRALS LDAP_VENDOR_VERSION
24792 EOF
24793
24794 fi
24795 if test "$ol_enable_local" != no; then
24796         cat >> confdefs.h <<\EOF
24797 #define LDAP_PF_LOCAL 1
24798 EOF
24799
24800 fi
24801 if test "$ol_link_ipv6" != no; then
24802         cat >> confdefs.h <<\EOF
24803 #define LDAP_PF_INET6 1
24804 EOF
24805
24806 fi
24807 if test "$ol_enable_cleartext" != no ; then
24808         cat >> confdefs.h <<\EOF
24809 #define SLAPD_CLEARTEXT 1
24810 EOF
24811
24812 fi
24813 if test "$ol_enable_crypt" != no ; then
24814         cat >> confdefs.h <<\EOF
24815 #define SLAPD_CRYPT 1
24816 EOF
24817
24818 fi
24819 if test "$ol_link_spasswd" != no ; then
24820         cat >> confdefs.h <<\EOF
24821 #define SLAPD_SPASSWD 1
24822 EOF
24823
24824 fi
24825 if test "$ol_enable_multimaster" != no ; then
24826         cat >> confdefs.h <<\EOF
24827 #define SLAPD_MULTIMASTER 1
24828 EOF
24829
24830 fi
24831 if test "$ol_enable_rlookups" != no ; then
24832         cat >> confdefs.h <<\EOF
24833 #define SLAPD_RLOOKUPS 1
24834 EOF
24835
24836 fi
24837 if test "$ol_enable_aci" != no ; then
24838         cat >> confdefs.h <<\EOF
24839 #define SLAPD_ACI_ENABLED 1
24840 EOF
24841
24842 fi
24843
24844 WITH_MODULES_ENABLED=no
24845 if test "$ol_link_modules" != no ; then
24846         cat >> confdefs.h <<\EOF
24847 #define SLAPD_MODULES 1
24848 EOF
24849
24850         BUILD_SLAPD=yes
24851         SLAPD_MODULES_LDFLAGS="-dlopen self"
24852         WITH_MODULES_ENABLED=yes
24853 fi
24854
24855 cat >> confdefs.h <<\EOF
24856 #define SLAPD_MOD_STATIC 1
24857 EOF
24858
24859 cat >> confdefs.h <<\EOF
24860 #define SLAPD_MOD_DYNAMIC 2
24861 EOF
24862
24863
24864 if test "$ol_enable_bdb" != no ; then
24865         BUILD_SLAPD=yes
24866         BUILD_BDB=$ol_enable_bdb
24867         if test "$ol_enable_bdb" = mod ; then
24868                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-bdb"
24869                 MFLAG=SLAPD_MOD_DYNAMIC
24870         else
24871                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-bdb"
24872                 MFLAG=SLAPD_MOD_STATIC
24873         fi
24874         cat >> confdefs.h <<EOF
24875 #define SLAPD_BDB $MFLAG
24876 EOF
24877
24878 fi
24879
24880 if test "$ol_enable_dnssrv" != no ; then
24881         BUILD_SLAPD=yes
24882         BUILD_DNSSRV=$ol_enable_dnssrv
24883         if test "$ol_enable_dnssrv" = mod ; then
24884                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-dnssrv"
24885                 MFLAG=SLAPD_MOD_DYNAMIC
24886         else
24887                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-dnssrv"
24888                 MFLAG=SLAPD_MOD_STATIC
24889         fi
24890         cat >> confdefs.h <<EOF
24891 #define SLAPD_DNSSRV $MFLAG
24892 EOF
24893
24894 fi
24895
24896 if test "$ol_enable_hdb" != no ; then
24897         BUILD_SLAPD=yes
24898         BUILD_HDB=$ol_enable_hdb
24899         if test "$ol_enable_hdb" = mod ; then
24900                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-hdb"
24901                 MFLAG=SLAPD_MOD_DYNAMIC
24902         else
24903                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-hdb"
24904                 MFLAG=SLAPD_MOD_STATIC
24905         fi
24906         cat >> confdefs.h <<EOF
24907 #define SLAPD_HDB $MFLAG
24908 EOF
24909
24910 fi
24911
24912 if test "$ol_enable_ldap" != no ; then
24913         BUILD_SLAPD=yes
24914         BUILD_LDAP=$ol_enable_ldap
24915         if test "$ol_enable_ldap" = mod ; then
24916                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-ldap"
24917                 MFLAG=SLAPD_MOD_DYNAMIC
24918         else
24919                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-ldap"
24920                 MFLAG=SLAPD_MOD_STATIC
24921         fi
24922         cat >> confdefs.h <<EOF
24923 #define SLAPD_LDAP $MFLAG
24924 EOF
24925
24926 fi
24927
24928 if test "$ol_link_ldbm" != no -a $ol_enable_ldbm != no; then
24929         BUILD_SLAPD=yes
24930         BUILD_LDBM=$ol_enable_ldbm
24931         if test "$ol_enable_ldbm" = mod ; then
24932                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-ldbm"
24933                 MFLAG=SLAPD_MOD_DYNAMIC
24934         else
24935                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-ldbm"
24936                 MFLAG=SLAPD_MOD_STATIC
24937         fi
24938         cat >> confdefs.h <<EOF
24939 #define SLAPD_LDBM $MFLAG
24940 EOF
24941
24942 fi
24943
24944 if test "$ol_enable_meta" != no ; then
24945         BUILD_SLAPD=yes
24946         BUILD_META=$ol_enable_meta
24947         BUILD_REWRITE=yes
24948         if test "$ol_enable_meta" = mod ; then
24949                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-meta"
24950                 MFLAG=SLAPD_MOD_DYNAMIC
24951         else
24952                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-meta"
24953                 MFLAG=SLAPD_MOD_STATIC
24954         fi
24955         cat >> confdefs.h <<EOF
24956 #define SLAPD_META $MFLAG
24957 EOF
24958
24959 fi
24960
24961 if test "$ol_enable_monitor" != no ; then
24962         BUILD_SLAPD=yes
24963         BUILD_MONITOR=$ol_enable_monitor
24964         if test "$ol_enable_monitor" = mod ; then
24965                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-monitor"
24966                 MFLAG=SLAPD_MOD_DYNAMIC
24967         else
24968                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-monitor"
24969                 MFLAG=SLAPD_MOD_STATIC
24970         fi
24971         cat >> confdefs.h <<EOF
24972 #define SLAPD_MONITOR $MFLAG
24973 EOF
24974
24975 fi
24976
24977 if test "$ol_enable_null" != no ; then
24978         BUILD_SLAPD=yes
24979         BUILD_NULL=$ol_enable_null
24980         if test "$ol_enable_null" = mod ; then
24981                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-null"
24982                 MFLAG=SLAPD_MOD_DYNAMIC
24983         else
24984                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-null"
24985                 MFLAG=SLAPD_MOD_STATIC
24986         fi
24987         cat >> confdefs.h <<EOF
24988 #define SLAPD_NULL $MFLAG
24989 EOF
24990
24991 fi
24992
24993 if test "$ol_enable_passwd" != no ; then
24994         BUILD_SLAPD=yes
24995         BUILD_PASSWD=$ol_enable_passwd
24996         if test "$ol_enable_passwd" = mod ; then
24997                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-passwd"
24998                 MFLAG=SLAPD_MOD_DYNAMIC
24999         else
25000                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-passwd"
25001                 MFLAG=SLAPD_MOD_STATIC
25002         fi
25003         cat >> confdefs.h <<EOF
25004 #define SLAPD_PASSWD $MFLAG
25005 EOF
25006
25007 fi
25008
25009 if test "$ol_link_perl" != no ; then
25010         BUILD_SLAPD=yes
25011         BUILD_PERL=$ol_enable_perl
25012         if test "$ol_enable_perl" = mod ; then
25013                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-perl"
25014                 MFLAG=SLAPD_MOD_DYNAMIC
25015         else
25016                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-perl"
25017                 MFLAG=SLAPD_MOD_STATIC
25018         fi
25019         cat >> confdefs.h <<EOF
25020 #define SLAPD_PERL $MFLAG
25021 EOF
25022
25023 fi
25024
25025 if test "$ol_enable_relay" != no ; then
25026         BUILD_SLAPD=yes
25027         BUILD_RELAY=$ol_enable_relay
25028         if test "$ol_enable_relay" = mod ; then
25029                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-relay"
25030                 MFLAG=SLAPD_MOD_DYNAMIC
25031         else
25032                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-relay"
25033                 MFLAG=SLAPD_MOD_STATIC
25034         fi
25035         cat >> confdefs.h <<EOF
25036 #define SLAPD_RELAY $MFLAG
25037 EOF
25038
25039 fi
25040
25041 if test "$ol_enable_shell" != no ; then
25042         if test "$ol_link_thread" != no ; then
25043                 echo "configure: warning: Use of --without-threads is recommended with back-shell" 1>&2
25044         fi
25045         BUILD_SLAPD=yes
25046         BUILD_SHELL=$ol_enable_shell
25047         if test "$ol_enable_shell" = mod ; then
25048                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-shell"
25049                 MFLAG=SLAPD_MOD_DYNAMIC
25050         else
25051                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-shell"
25052                 MFLAG=SLAPD_MOD_STATIC
25053         fi
25054         cat >> confdefs.h <<EOF
25055 #define SLAPD_SHELL $MFLAG
25056 EOF
25057
25058 fi
25059
25060 if test "$ol_link_sql" != no ; then
25061         BUILD_SLAPD=yes
25062         BUILD_SQL=$ol_enable_sql
25063         if test "$ol_enable_sql" = mod; then
25064                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-sql"
25065                 MFLAG=SLAPD_MOD_DYNAMIC
25066         else
25067                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-sql"
25068                 MFLAG=SLAPD_MOD_STATIC
25069         fi
25070         cat >> confdefs.h <<EOF
25071 #define SLAPD_SQL $MFLAG
25072 EOF
25073
25074 fi
25075
25076 if test "$ol_enable_chain" != no ; then
25077         BUILD_CHAIN=$ol_enable_chain
25078         if test "$ol_enable_chain" = mod ; then
25079                 MFLAG=SLAPD_MOD_DYNAMIC
25080                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS chain.la"
25081         else
25082                 MFLAG=SLAPD_MOD_STATIC
25083         fi
25084         cat >> confdefs.h <<EOF
25085 #define SLAPD_OVER_CHAIN $MFLAG
25086 EOF
25087
25088 fi
25089
25090 if test "$ol_enable_denyop" != no ; then
25091         BUILD_DENYOP=$ol_enable_denyop
25092         if test "$ol_enable_denyop" = mod ; then
25093                 MFLAG=SLAPD_MOD_DYNAMIC
25094                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS denyop.la"
25095         else
25096                 MFLAG=SLAPD_MOD_STATIC
25097         fi
25098         cat >> confdefs.h <<EOF
25099 #define SLAPD_OVER_DENYOP $MFLAG
25100 EOF
25101
25102 fi
25103
25104 if test "$ol_enable_dyngroup" != no ; then
25105         BUILD_DYNGROUP=$ol_enable_dyngroup
25106         if test "$ol_enable_dyngroup" = mod ; then
25107                 MFLAG=SLAPD_MOD_DYNAMIC
25108                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS dyngroup.la"
25109         else
25110                 MFLAG=SLAPD_MOD_STATIC
25111         fi
25112         cat >> confdefs.h <<EOF
25113 #define SLAPD_OVER_DYNGROUP $MFLAG
25114 EOF
25115
25116 fi
25117
25118 if test "$ol_enable_lastmod" != no ; then
25119         BUILD_LASTMOD=$ol_enable_lastmod
25120         if test "$ol_enable_lastmod" = mod ; then
25121                 MFLAG=SLAPD_MOD_DYNAMIC
25122                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS lastmod.la"
25123         else
25124                 MFLAG=SLAPD_MOD_STATIC
25125         fi
25126         cat >> confdefs.h <<EOF
25127 #define SLAPD_OVER_LASTMOD $MFLAG
25128 EOF
25129
25130 fi
25131
25132 if test "$ol_enable_ppolicy" != no ; then
25133         BUILD_PPOLICY=$ol_enable_ppolicy
25134         if test "$ol_enable_ppolicy" = mod ; then
25135                 MFLAG=SLAPD_MOD_DYNAMIC
25136                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS ppolicy.la"
25137         else
25138                 MFLAG=SLAPD_MOD_STATIC
25139         fi
25140         cat >> confdefs.h <<EOF
25141 #define SLAPD_OVER_PPOLICY $MFLAG
25142 EOF
25143
25144 fi
25145
25146 if test "$ol_enable_proxycache" != no ; then
25147         BUILD_PROXYCACHE=$ol_enable_proxycache
25148         if test "$ol_enable_proxycache" = mod ; then
25149                 MFLAG=SLAPD_MOD_DYNAMIC
25150                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS pcache.la"
25151         else
25152                 MFLAG=SLAPD_MOD_STATIC
25153         fi
25154         cat >> confdefs.h <<EOF
25155 #define SLAPD_OVER_PROXYCACHE $MFLAG
25156 EOF
25157
25158 fi
25159
25160 if test "$ol_enable_refint" != no ; then
25161         BUILD_REFINT=$ol_enable_refint
25162         if test "$ol_enable_refint" = mod ; then
25163                 MFLAG=SLAPD_MOD_DYNAMIC
25164                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS refint.la"
25165         else
25166                 MFLAG=SLAPD_MOD_STATIC
25167         fi
25168         cat >> confdefs.h <<EOF
25169 #define SLAPD_OVER_REFINT $MFLAG
25170 EOF
25171
25172 fi
25173
25174 if test "$ol_enable_rwm" != no ; then
25175         BUILD_REWRITE=yes
25176         BUILD_RWM=$ol_enable_rwm
25177         if test "$ol_enable_rwm" = mod ; then
25178                 MFLAG=SLAPD_MOD_DYNAMIC
25179                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS rwm.la"
25180         else
25181                 MFLAG=SLAPD_MOD_STATIC
25182         fi
25183         cat >> confdefs.h <<EOF
25184 #define SLAPD_OVER_RWM $MFLAG
25185 EOF
25186
25187 fi
25188
25189 if test "$ol_enable_syncprov" != no ; then
25190         BUILD_SYNCPROV=$ol_enable_syncprov
25191         if test "$ol_enable_syncprov" = mod ; then
25192                 MFLAG=SLAPD_MOD_DYNAMIC
25193                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS syncprov.la"
25194         else
25195                 MFLAG=SLAPD_MOD_STATIC
25196         fi
25197         cat >> confdefs.h <<EOF
25198 #define SLAPD_OVER_SYNCPROV $MFLAG
25199 EOF
25200
25201 fi
25202
25203 if test "$ol_enable_unique" != no ; then
25204         BUILD_UNIQUE=$ol_enable_unique
25205         if test "$ol_enable_unique" = mod ; then
25206                 MFLAG=SLAPD_MOD_DYNAMIC
25207                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS unique.la"
25208         else
25209                 MFLAG=SLAPD_MOD_STATIC
25210         fi
25211         cat >> confdefs.h <<EOF
25212 #define SLAPD_OVER_UNIQUE $MFLAG
25213 EOF
25214
25215 fi
25216
25217 if test "$ol_enable_slurpd" != no -a "$ol_link_threads" != no -a \
25218         $BUILD_SLAPD = yes ; then
25219         BUILD_SLURPD=yes
25220 fi
25221
25222 if test "$ol_enable_rewrite" != no ; then
25223         cat >> confdefs.h <<\EOF
25224 #define ENABLE_REWRITE 1
25225 EOF
25226
25227         BUILD_REWRITE=yes
25228 fi
25229
25230 if test "$ol_enable_slapi" != no ; then
25231         cat >> confdefs.h <<\EOF
25232 #define ENABLE_SLAPI 1
25233 EOF
25234
25235         BUILD_SLAPI=yes
25236         SLAPD_SLAPI_DEPEND=libslapi.a
25237 fi
25238
25239
25240
25241 if test "$ac_cv_mingw32" = yes ; then
25242         PLAT=NT
25243         SLAPD_MODULES_LDFLAGS=
25244 else
25245         PLAT=UNIX
25246 fi
25247
25248 if test -z "$SLAPD_STATIC_BACKENDS"; then
25249         SLAPD_NO_STATIC='#'
25250 else
25251         SLAPD_NO_STATIC=
25252 fi
25253
25254 BACKEND_HEADER=servers/slapd/backend.h
25255 cat > $BACKEND_HEADER << EOF
25256 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
25257  *
25258  * Copyright 1998-2004 The OpenLDAP Foundation.
25259  * All rights reserved.
25260  *
25261  * Redistribution and use in source and binary forms, with or without
25262  * modification, are permitted only as authorized by the OpenLDAP
25263  * Public License.
25264  *
25265  * A copy of this license is available in the file LICENSE in the
25266  * top-level directory of the distribution or, alternatively, at
25267  * <http://www.OpenLDAP.org/license.html>.
25268  */
25269 /* This file is automatically generated by configure; please do not edit.
25270  */
25271
25272 EOF
25273
25274 for b in $SLAPD_STATIC_BACKENDS; do
25275         bb=`echo "$b" | sed -e 's;back-;;'`
25276         
25277         cat >> $BACKEND_HEADER << EOF
25278 extern BI_init ${bb}_back_initialize;
25279 EOF
25280 done
25281
25282 cat >> $BACKEND_HEADER << EOF
25283
25284 static BackendInfo binfo[] = {
25285 EOF
25286
25287 for b in $SLAPD_STATIC_BACKENDS; do
25288         bb=`echo "$b" | sed -e 's;back-;;'`
25289         
25290         cat >> $BACKEND_HEADER << EOF
25291         { "$bb", ${bb}_back_initialize },
25292 EOF
25293 done
25294
25295 cat >> $BACKEND_HEADER << EOF
25296         { NULL, NULL }
25297 };
25298
25299 /* end of generated file */
25300 EOF
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
25374 # Check whether --with-xxinstall or --without-xxinstall was given.
25375 if test "${with_xxinstall+set}" = set; then
25376   withval="$with_xxinstall"
25377   :
25378 fi
25379
25380
25381
25382 trap '' 1 2 15
25383
25384 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
25385
25386 test "x$prefix" = xNONE && prefix=$ac_default_prefix
25387 # Let make expand exec_prefix.
25388 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
25389
25390 # Any assignment to VPATH causes Sun make to only execute
25391 # the first set of double-colon rules, so remove it if not needed.
25392 # If there is a colon in the path, we need to keep it.
25393 if test "x$srcdir" = x.; then
25394   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
25395 fi
25396
25397 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
25398
25399 DEFS=-DHAVE_CONFIG_H
25400
25401 # Without the "./", some shells look in PATH for config.status.
25402 : ${CONFIG_STATUS=./config.status}
25403
25404 echo creating $CONFIG_STATUS
25405 rm -f $CONFIG_STATUS
25406 cat > $CONFIG_STATUS <<EOF
25407 #! /bin/sh
25408 # Generated automatically by configure.
25409 # Run this file to recreate the current configuration.
25410 # This directory was configured as follows,
25411 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
25412 #
25413 # $0 $ac_configure_args
25414 #
25415 # Compiler output produced by configure, useful for debugging
25416 # configure, is in ./config.log if it exists.
25417
25418 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
25419 for ac_option
25420 do
25421   case "\$ac_option" in
25422   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
25423     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
25424     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
25425   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
25426     echo "$CONFIG_STATUS generated by autoconf version 2.13.1"
25427     exit 0 ;;
25428   -help | --help | --hel | --he | --h)
25429     echo "\$ac_cs_usage"; exit 0 ;;
25430   *) echo "\$ac_cs_usage"; exit 1 ;;
25431   esac
25432 done
25433
25434 ac_given_srcdir=$srcdir
25435 ac_given_INSTALL="$INSTALL"
25436
25437 trap 'rm -fr `echo "\
25438 Makefile:build/top.mk:Makefile.in:build/dir.mk \
25439 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
25440 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
25441 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
25442 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
25443 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
25444 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
25445 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
25446 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
25447 include/Makefile:build/top.mk:include/Makefile.in \
25448 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
25449 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
25450 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
25451 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
25452 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk  \
25453 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
25454 libraries/librewrite/Makefile:build/top.mk:libraries/librewrite/Makefile.in:build/lib.mk:build/lib-static.mk \
25455 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
25456 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
25457 servers/slapd/back-bdb/Makefile:build/top.mk:servers/slapd/back-bdb/Makefile.in:build/mod.mk \
25458 servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
25459 servers/slapd/back-hdb/Makefile:build/top.mk:servers/slapd/back-hdb/Makefile.in:build/mod.mk \
25460 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
25461 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
25462 servers/slapd/back-meta/Makefile:build/top.mk:servers/slapd/back-meta/Makefile.in:build/mod.mk \
25463 servers/slapd/back-monitor/Makefile:build/top.mk:servers/slapd/back-monitor/Makefile.in:build/mod.mk \
25464 servers/slapd/back-null/Makefile:build/top.mk:servers/slapd/back-null/Makefile.in:build/mod.mk \
25465 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
25466 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
25467 servers/slapd/back-relay/Makefile:build/top.mk:servers/slapd/back-relay/Makefile.in:build/mod.mk \
25468 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
25469 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
25470 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
25471 servers/slapd/slapi/Makefile:build/top.mk:servers/slapd/slapi/Makefile.in:build/lib.mk:build/lib-shared.mk  \
25472 servers/slapd/overlays/Makefile:build/top.mk:servers/slapd/overlays/Makefile.in:build/lib.mk \
25473 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
25474 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
25475 tests/run \
25476 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
25477  include/portable.h include/ldap_features.h include/lber_types.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
25478 EOF
25479 cat >> $CONFIG_STATUS <<EOF
25480
25481 # Protect against being on the right side of a sed subst in config.status.
25482 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
25483  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
25484 $ac_vpsub
25485 $extrasub
25486 s%@SHELL@%$SHELL%g
25487 s%@CFLAGS@%$CFLAGS%g
25488 s%@CPPFLAGS@%$CPPFLAGS%g
25489 s%@CXXFLAGS@%$CXXFLAGS%g
25490 s%@FFLAGS@%$FFLAGS%g
25491 s%@DEFS@%$DEFS%g
25492 s%@LDFLAGS@%$LDFLAGS%g
25493 s%@LIBS@%$LIBS%g
25494 s%@exec_prefix@%$exec_prefix%g
25495 s%@prefix@%$prefix%g
25496 s%@program_transform_name@%$program_transform_name%g
25497 s%@bindir@%$bindir%g
25498 s%@sbindir@%$sbindir%g
25499 s%@libexecdir@%$libexecdir%g
25500 s%@datadir@%$datadir%g
25501 s%@sysconfdir@%$sysconfdir%g
25502 s%@sharedstatedir@%$sharedstatedir%g
25503 s%@localstatedir@%$localstatedir%g
25504 s%@libdir@%$libdir%g
25505 s%@includedir@%$includedir%g
25506 s%@oldincludedir@%$oldincludedir%g
25507 s%@infodir@%$infodir%g
25508 s%@mandir@%$mandir%g
25509 s%@host@%$host%g
25510 s%@host_alias@%$host_alias%g
25511 s%@host_cpu@%$host_cpu%g
25512 s%@host_vendor@%$host_vendor%g
25513 s%@host_os@%$host_os%g
25514 s%@target@%$target%g
25515 s%@target_alias@%$target_alias%g
25516 s%@target_cpu@%$target_cpu%g
25517 s%@target_vendor@%$target_vendor%g
25518 s%@target_os@%$target_os%g
25519 s%@build@%$build%g
25520 s%@build_alias@%$build_alias%g
25521 s%@build_cpu@%$build_cpu%g
25522 s%@build_vendor@%$build_vendor%g
25523 s%@build_os@%$build_os%g
25524 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
25525 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
25526 s%@INSTALL_DATA@%$INSTALL_DATA%g
25527 s%@PACKAGE@%$PACKAGE%g
25528 s%@VERSION@%$VERSION%g
25529 s%@ACLOCAL@%$ACLOCAL%g
25530 s%@AUTOCONF@%$AUTOCONF%g
25531 s%@AUTOMAKE@%$AUTOMAKE%g
25532 s%@AUTOHEADER@%$AUTOHEADER%g
25533 s%@MAKEINFO@%$MAKEINFO%g
25534 s%@install_sh@%$install_sh%g
25535 s%@AMTAR@%$AMTAR%g
25536 s%@AWK@%$AWK%g
25537 s%@AMTARFLAGS@%$AMTARFLAGS%g
25538 s%@SET_MAKE@%$SET_MAKE%g
25539 s%@OPENLDAP_LIBRELEASE@%$OPENLDAP_LIBRELEASE%g
25540 s%@OPENLDAP_LIBVERSION@%$OPENLDAP_LIBVERSION%g
25541 s%@OPENLDAP_RELEASE_DATE@%$OPENLDAP_RELEASE_DATE%g
25542 s%@top_builddir@%$top_builddir%g
25543 s%@ldap_subdir@%$ldap_subdir%g
25544 s%@CC@%$CC%g
25545 s%@AR@%$AR%g
25546 s%@LN_S@%$LN_S%g
25547 s%@OBJEXT@%$OBJEXT%g
25548 s%@EXEEXT@%$EXEEXT%g
25549 s%@ECHO@%$ECHO%g
25550 s%@RANLIB@%$RANLIB%g
25551 s%@STRIP@%$STRIP%g
25552 s%@DLLTOOL@%$DLLTOOL%g
25553 s%@AS@%$AS%g
25554 s%@OBJDUMP@%$OBJDUMP%g
25555 s%@CPP@%$CPP%g
25556 s%@LIBTOOL@%$LIBTOOL%g
25557 s%@PERLBIN@%$PERLBIN%g
25558 s%@OL_MKDEP@%$OL_MKDEP%g
25559 s%@OL_MKDEP_FLAGS@%$OL_MKDEP_FLAGS%g
25560 s%@LTSTATIC@%$LTSTATIC%g
25561 s%@LIBOBJS@%$LIBOBJS%g
25562 s%@LIBSRCS@%$LIBSRCS%g
25563 s%@PLAT@%$PLAT%g
25564 s%@WITH_SASL@%$WITH_SASL%g
25565 s%@WITH_TLS@%$WITH_TLS%g
25566 s%@WITH_MODULES_ENABLED@%$WITH_MODULES_ENABLED%g
25567 s%@BUILD_LIBS_DYNAMIC@%$BUILD_LIBS_DYNAMIC%g
25568 s%@BUILD_SLAPD@%$BUILD_SLAPD%g
25569 s%@BUILD_SLAPI@%$BUILD_SLAPI%g
25570 s%@SLAPD_SLAPI_DEPEND@%$SLAPD_SLAPI_DEPEND%g
25571 s%@BUILD_BDB@%$BUILD_BDB%g
25572 s%@BUILD_DNSSRV@%$BUILD_DNSSRV%g
25573 s%@BUILD_HDB@%$BUILD_HDB%g
25574 s%@BUILD_LDAP@%$BUILD_LDAP%g
25575 s%@BUILD_LDBM@%$BUILD_LDBM%g
25576 s%@BUILD_META@%$BUILD_META%g
25577 s%@BUILD_MONITOR@%$BUILD_MONITOR%g
25578 s%@BUILD_NULL@%$BUILD_NULL%g
25579 s%@BUILD_PASSWD@%$BUILD_PASSWD%g
25580 s%@BUILD_RELAY@%$BUILD_RELAY%g
25581 s%@BUILD_PERL@%$BUILD_PERL%g
25582 s%@BUILD_SHELL@%$BUILD_SHELL%g
25583 s%@BUILD_SQL@%$BUILD_SQL%g
25584 s%@BUILD_CHAIN@%$BUILD_CHAIN%g
25585 s%@BUILD_DENYOP@%$BUILD_DENYOP%g
25586 s%@BUILD_DYNGROUP@%$BUILD_DYNGROUP%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
25875 EOF
25876 cat >> $CONFIG_STATUS <<\EOF
25877
25878 chmod +x tests/run
25879 date > stamp-h
25880 echo Please run \"make depend\" to build dependencies
25881
25882 exit 0
25883 EOF
25884 chmod +x $CONFIG_STATUS
25885 rm -fr confdefs* $ac_clean_files
25886 test "$no_create" = yes || $SHELL $CONFIG_STATUS || exit 1
25887