]> git.sur5r.net Git - openldap/blob - configure
Disable back-bdb native syncrepl support, enable syncprov overlay,
[openldap] / configure
1 #! /bin/sh
2 # $OpenLDAP$
3 # from OpenLDAP: pkg/ldap/configure.in,v 1.556 2004/11/20 13:20:31 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
1801 else
1802         ol_enable_modules="no"
1803 fi
1804 # end --enable-modules
1805 ol_enable_multimaster=${ol_enable_multimaster-no}
1806 # OpenLDAP --enable-rewrite
1807         # Check whether --enable-rewrite or --disable-rewrite was given.
1808 if test "${enable_rewrite+set}" = set; then
1809   enableval="$enable_rewrite"
1810   
1811         ol_arg=invalid
1812         for ol_val in auto yes no ; do
1813                 if test "$enableval" = "$ol_val" ; then
1814                         ol_arg="$ol_val"
1815                 fi
1816         done
1817         if test "$ol_arg" = "invalid" ; then
1818                 { echo "configure: error: bad value $enableval for --enable-rewrite" 1>&2; exit 1; }
1819         fi
1820         ol_enable_rewrite="$ol_arg"
1821
1822 else
1823         ol_enable_rewrite="auto"
1824 fi
1825 # end --enable-rewrite
1826 # OpenLDAP --enable-rlookups
1827         # Check whether --enable-rlookups or --disable-rlookups was given.
1828 if test "${enable_rlookups+set}" = set; then
1829   enableval="$enable_rlookups"
1830   
1831         ol_arg=invalid
1832         for ol_val in auto yes no ; do
1833                 if test "$enableval" = "$ol_val" ; then
1834                         ol_arg="$ol_val"
1835                 fi
1836         done
1837         if test "$ol_arg" = "invalid" ; then
1838                 { echo "configure: error: bad value $enableval for --enable-rlookups" 1>&2; exit 1; }
1839         fi
1840         ol_enable_rlookups="$ol_arg"
1841
1842 else
1843         ol_enable_rlookups="no"
1844 fi
1845 # end --enable-rlookups
1846 # OpenLDAP --enable-slapi
1847         # Check whether --enable-slapi or --disable-slapi was given.
1848 if test "${enable_slapi+set}" = set; then
1849   enableval="$enable_slapi"
1850   
1851         ol_arg=invalid
1852         for ol_val in auto yes no ; do
1853                 if test "$enableval" = "$ol_val" ; then
1854                         ol_arg="$ol_val"
1855                 fi
1856         done
1857         if test "$ol_arg" = "invalid" ; then
1858                 { echo "configure: error: bad value $enableval for --enable-slapi" 1>&2; exit 1; }
1859         fi
1860         ol_enable_slapi="$ol_arg"
1861
1862 else
1863         ol_enable_slapi="no"
1864 fi
1865 # end --enable-slapi
1866 # OpenLDAP --enable-slp
1867         # Check whether --enable-slp or --disable-slp was given.
1868 if test "${enable_slp+set}" = set; then
1869   enableval="$enable_slp"
1870   
1871         ol_arg=invalid
1872         for ol_val in auto yes no ; do
1873                 if test "$enableval" = "$ol_val" ; then
1874                         ol_arg="$ol_val"
1875                 fi
1876         done
1877         if test "$ol_arg" = "invalid" ; then
1878                 { echo "configure: error: bad value $enableval for --enable-slp" 1>&2; exit 1; }
1879         fi
1880         ol_enable_slp="$ol_arg"
1881
1882 else
1883         ol_enable_slp="no"
1884 fi
1885 # end --enable-slp
1886 # OpenLDAP --enable-wrappers
1887         # Check whether --enable-wrappers or --disable-wrappers was given.
1888 if test "${enable_wrappers+set}" = set; then
1889   enableval="$enable_wrappers"
1890   
1891         ol_arg=invalid
1892         for ol_val in auto yes no ; do
1893                 if test "$enableval" = "$ol_val" ; then
1894                         ol_arg="$ol_val"
1895                 fi
1896         done
1897         if test "$ol_arg" = "invalid" ; then
1898                 { echo "configure: error: bad value $enableval for --enable-wrappers" 1>&2; exit 1; }
1899         fi
1900         ol_enable_wrappers="$ol_arg"
1901
1902 else
1903         ol_enable_wrappers="no"
1904 fi
1905 # end --enable-wrappers
1906
1907 Backends="bdb dnssrv hdb ldap ldbm meta monitor null \
1908         passwd perl relay shell sql"
1909
1910 # Check whether --with-xxslapbackends or --without-xxslapbackends was given.
1911 if test "${with_xxslapbackends+set}" = set; then
1912   withval="$with_xxslapbackends"
1913   :
1914 fi
1915
1916
1917 # OpenLDAP --enable-backends
1918         # Check whether --enable-backends or --disable-backends was given.
1919 if test "${enable_backends+set}" = set; then
1920   enableval="$enable_backends"
1921   
1922         ol_arg=invalid
1923         for ol_val in no yes mod ; do
1924                 if test "$enableval" = "$ol_val" ; then
1925                         ol_arg="$ol_val"
1926                 fi
1927         done
1928         if test "$ol_arg" = "invalid" ; then
1929                 { echo "configure: error: bad value $enableval for --enable-backends" 1>&2; exit 1; }
1930         fi
1931         ol_enable_backends="$ol_arg"
1932
1933 else
1934         ol_enable_backends="no"
1935 fi
1936 # end --enable-backends
1937 # OpenLDAP --enable-bdb
1938         # Check whether --enable-bdb or --disable-bdb was given.
1939 if test "${enable_bdb+set}" = set; then
1940   enableval="$enable_bdb"
1941   
1942         ol_arg=invalid
1943         for ol_val in no yes mod ; do
1944                 if test "$enableval" = "$ol_val" ; then
1945                         ol_arg="$ol_val"
1946                 fi
1947         done
1948         if test "$ol_arg" = "invalid" ; then
1949                 { echo "configure: error: bad value $enableval for --enable-bdb" 1>&2; exit 1; }
1950         fi
1951         ol_enable_bdb="$ol_arg"
1952
1953 else
1954         ol_enable_bdb="yes"
1955 fi
1956 # end --enable-bdb
1957 # OpenLDAP --enable-dnssrv
1958         # Check whether --enable-dnssrv or --disable-dnssrv was given.
1959 if test "${enable_dnssrv+set}" = set; then
1960   enableval="$enable_dnssrv"
1961   
1962         ol_arg=invalid
1963         for ol_val in no yes mod ; do
1964                 if test "$enableval" = "$ol_val" ; then
1965                         ol_arg="$ol_val"
1966                 fi
1967         done
1968         if test "$ol_arg" = "invalid" ; then
1969                 { echo "configure: error: bad value $enableval for --enable-dnssrv" 1>&2; exit 1; }
1970         fi
1971         ol_enable_dnssrv="$ol_arg"
1972
1973 else
1974         ol_enable_dnssrv="no"
1975 fi
1976 # end --enable-dnssrv
1977 # OpenLDAP --enable-hdb
1978         # Check whether --enable-hdb or --disable-hdb was given.
1979 if test "${enable_hdb+set}" = set; then
1980   enableval="$enable_hdb"
1981   
1982         ol_arg=invalid
1983         for ol_val in no yes mod ; do
1984                 if test "$enableval" = "$ol_val" ; then
1985                         ol_arg="$ol_val"
1986                 fi
1987         done
1988         if test "$ol_arg" = "invalid" ; then
1989                 { echo "configure: error: bad value $enableval for --enable-hdb" 1>&2; exit 1; }
1990         fi
1991         ol_enable_hdb="$ol_arg"
1992
1993 else
1994         ol_enable_hdb="no"
1995 fi
1996 # end --enable-hdb
1997 # OpenLDAP --enable-ldap
1998         # Check whether --enable-ldap or --disable-ldap was given.
1999 if test "${enable_ldap+set}" = set; then
2000   enableval="$enable_ldap"
2001   
2002         ol_arg=invalid
2003         for ol_val in no yes mod ; do
2004                 if test "$enableval" = "$ol_val" ; then
2005                         ol_arg="$ol_val"
2006                 fi
2007         done
2008         if test "$ol_arg" = "invalid" ; then
2009                 { echo "configure: error: bad value $enableval for --enable-ldap" 1>&2; exit 1; }
2010         fi
2011         ol_enable_ldap="$ol_arg"
2012
2013 else
2014         ol_enable_ldap="no"
2015 fi
2016 # end --enable-ldap
2017 # OpenLDAP --enable-ldbm
2018         # Check whether --enable-ldbm or --disable-ldbm was given.
2019 if test "${enable_ldbm+set}" = set; then
2020   enableval="$enable_ldbm"
2021   
2022         ol_arg=invalid
2023         for ol_val in no yes mod ; do
2024                 if test "$enableval" = "$ol_val" ; then
2025                         ol_arg="$ol_val"
2026                 fi
2027         done
2028         if test "$ol_arg" = "invalid" ; then
2029                 { echo "configure: error: bad value $enableval for --enable-ldbm" 1>&2; exit 1; }
2030         fi
2031         ol_enable_ldbm="$ol_arg"
2032
2033 else
2034         ol_enable_ldbm="no"
2035 fi
2036 # end --enable-ldbm
2037 # OpenLDAP --with-ldbm_api
2038         # Check whether --with-ldbm_api or --without-ldbm_api was given.
2039 if test "${with_ldbm_api+set}" = set; then
2040   withval="$with_ldbm_api"
2041   
2042         ol_arg=invalid
2043         for ol_val in auto berkeley bcompat mdbm gdbm ; do
2044                 if test "$withval" = "$ol_val" ; then
2045                         ol_arg="$ol_val"
2046                 fi
2047         done
2048         if test "$ol_arg" = "invalid" ; then
2049                 { echo "configure: error: bad value $withval for --with-ldbm_api" 1>&2; exit 1; }
2050         fi
2051         ol_with_ldbm_api="$ol_arg"
2052
2053 else
2054         ol_with_ldbm_api="auto"
2055 fi
2056 # end --with-ldbm_api
2057
2058 # OpenLDAP --with-ldbm_type
2059         # Check whether --with-ldbm_type or --without-ldbm_type was given.
2060 if test "${with_ldbm_type+set}" = set; then
2061   withval="$with_ldbm_type"
2062   
2063         ol_arg=invalid
2064         for ol_val in auto btree hash ; do
2065                 if test "$withval" = "$ol_val" ; then
2066                         ol_arg="$ol_val"
2067                 fi
2068         done
2069         if test "$ol_arg" = "invalid" ; then
2070                 { echo "configure: error: bad value $withval for --with-ldbm_type" 1>&2; exit 1; }
2071         fi
2072         ol_with_ldbm_type="$ol_arg"
2073
2074 else
2075         ol_with_ldbm_type="auto"
2076 fi
2077 # end --with-ldbm_type
2078
2079 # OpenLDAP --enable-meta
2080         # Check whether --enable-meta or --disable-meta was given.
2081 if test "${enable_meta+set}" = set; then
2082   enableval="$enable_meta"
2083   
2084         ol_arg=invalid
2085         for ol_val in no yes mod ; do
2086                 if test "$enableval" = "$ol_val" ; then
2087                         ol_arg="$ol_val"
2088                 fi
2089         done
2090         if test "$ol_arg" = "invalid" ; then
2091                 { echo "configure: error: bad value $enableval for --enable-meta" 1>&2; exit 1; }
2092         fi
2093         ol_enable_meta="$ol_arg"
2094
2095 else
2096         ol_enable_meta="no"
2097 fi
2098 # end --enable-meta
2099 # OpenLDAP --enable-monitor
2100         # Check whether --enable-monitor or --disable-monitor was given.
2101 if test "${enable_monitor+set}" = set; then
2102   enableval="$enable_monitor"
2103   
2104         ol_arg=invalid
2105         for ol_val in no yes mod ; do
2106                 if test "$enableval" = "$ol_val" ; then
2107                         ol_arg="$ol_val"
2108                 fi
2109         done
2110         if test "$ol_arg" = "invalid" ; then
2111                 { echo "configure: error: bad value $enableval for --enable-monitor" 1>&2; exit 1; }
2112         fi
2113         ol_enable_monitor="$ol_arg"
2114
2115 else
2116         ol_enable_monitor="yes"
2117 fi
2118 # end --enable-monitor
2119 # OpenLDAP --enable-null
2120         # Check whether --enable-null or --disable-null was given.
2121 if test "${enable_null+set}" = set; then
2122   enableval="$enable_null"
2123   
2124         ol_arg=invalid
2125         for ol_val in no yes mod ; do
2126                 if test "$enableval" = "$ol_val" ; then
2127                         ol_arg="$ol_val"
2128                 fi
2129         done
2130         if test "$ol_arg" = "invalid" ; then
2131                 { echo "configure: error: bad value $enableval for --enable-null" 1>&2; exit 1; }
2132         fi
2133         ol_enable_null="$ol_arg"
2134
2135 else
2136         ol_enable_null="no"
2137 fi
2138 # end --enable-null
2139 # OpenLDAP --enable-passwd
2140         # Check whether --enable-passwd or --disable-passwd was given.
2141 if test "${enable_passwd+set}" = set; then
2142   enableval="$enable_passwd"
2143   
2144         ol_arg=invalid
2145         for ol_val in no yes mod ; do
2146                 if test "$enableval" = "$ol_val" ; then
2147                         ol_arg="$ol_val"
2148                 fi
2149         done
2150         if test "$ol_arg" = "invalid" ; then
2151                 { echo "configure: error: bad value $enableval for --enable-passwd" 1>&2; exit 1; }
2152         fi
2153         ol_enable_passwd="$ol_arg"
2154
2155 else
2156         ol_enable_passwd="no"
2157 fi
2158 # end --enable-passwd
2159 # OpenLDAP --enable-perl
2160         # Check whether --enable-perl or --disable-perl was given.
2161 if test "${enable_perl+set}" = set; then
2162   enableval="$enable_perl"
2163   
2164         ol_arg=invalid
2165         for ol_val in no yes mod ; do
2166                 if test "$enableval" = "$ol_val" ; then
2167                         ol_arg="$ol_val"
2168                 fi
2169         done
2170         if test "$ol_arg" = "invalid" ; then
2171                 { echo "configure: error: bad value $enableval for --enable-perl" 1>&2; exit 1; }
2172         fi
2173         ol_enable_perl="$ol_arg"
2174
2175 else
2176         ol_enable_perl="no"
2177 fi
2178 # end --enable-perl
2179 # OpenLDAP --enable-relay
2180         # Check whether --enable-relay or --disable-relay was given.
2181 if test "${enable_relay+set}" = set; then
2182   enableval="$enable_relay"
2183   
2184         ol_arg=invalid
2185         for ol_val in no yes mod ; do
2186                 if test "$enableval" = "$ol_val" ; then
2187                         ol_arg="$ol_val"
2188                 fi
2189         done
2190         if test "$ol_arg" = "invalid" ; then
2191                 { echo "configure: error: bad value $enableval for --enable-relay" 1>&2; exit 1; }
2192         fi
2193         ol_enable_relay="$ol_arg"
2194
2195 else
2196         ol_enable_relay="yes"
2197 fi
2198 # end --enable-relay
2199 # OpenLDAP --enable-shell
2200         # Check whether --enable-shell or --disable-shell was given.
2201 if test "${enable_shell+set}" = set; then
2202   enableval="$enable_shell"
2203   
2204         ol_arg=invalid
2205         for ol_val in no yes mod ; do
2206                 if test "$enableval" = "$ol_val" ; then
2207                         ol_arg="$ol_val"
2208                 fi
2209         done
2210         if test "$ol_arg" = "invalid" ; then
2211                 { echo "configure: error: bad value $enableval for --enable-shell" 1>&2; exit 1; }
2212         fi
2213         ol_enable_shell="$ol_arg"
2214
2215 else
2216         ol_enable_shell="no"
2217 fi
2218 # end --enable-shell
2219 # OpenLDAP --enable-sql
2220         # Check whether --enable-sql or --disable-sql was given.
2221 if test "${enable_sql+set}" = set; then
2222   enableval="$enable_sql"
2223   
2224         ol_arg=invalid
2225         for ol_val in no yes mod ; do
2226                 if test "$enableval" = "$ol_val" ; then
2227                         ol_arg="$ol_val"
2228                 fi
2229         done
2230         if test "$ol_arg" = "invalid" ; then
2231                 { echo "configure: error: bad value $enableval for --enable-sql" 1>&2; exit 1; }
2232         fi
2233         ol_enable_sql="$ol_arg"
2234
2235 else
2236         ol_enable_sql="no"
2237 fi
2238 # end --enable-sql
2239
2240 Overlays="chain denyop dyngroup lastmod ppolicy proxycache rwm \
2241         refint syncprov unique"
2242
2243 # Check whether --with-xxslapoverlays or --without-xxslapoverlays was given.
2244 if test "${with_xxslapoverlays+set}" = set; then
2245   withval="$with_xxslapoverlays"
2246   :
2247 fi
2248
2249
2250 # OpenLDAP --enable-overlays
2251         # Check whether --enable-overlays or --disable-overlays was given.
2252 if test "${enable_overlays+set}" = set; then
2253   enableval="$enable_overlays"
2254   
2255         ol_arg=invalid
2256         for ol_val in no yes mod ; do
2257                 if test "$enableval" = "$ol_val" ; then
2258                         ol_arg="$ol_val"
2259                 fi
2260         done
2261         if test "$ol_arg" = "invalid" ; then
2262                 { echo "configure: error: bad value $enableval for --enable-overlays" 1>&2; exit 1; }
2263         fi
2264         ol_enable_overlays="$ol_arg"
2265
2266 else
2267         ol_enable_overlays="no"
2268 fi
2269 # end --enable-overlays
2270 # OpenLDAP --enable-chain
2271         # Check whether --enable-chain or --disable-chain was given.
2272 if test "${enable_chain+set}" = set; then
2273   enableval="$enable_chain"
2274   
2275         ol_arg=invalid
2276         for ol_val in no yes mod ; do
2277                 if test "$enableval" = "$ol_val" ; then
2278                         ol_arg="$ol_val"
2279                 fi
2280         done
2281         if test "$ol_arg" = "invalid" ; then
2282                 { echo "configure: error: bad value $enableval for --enable-chain" 1>&2; exit 1; }
2283         fi
2284         ol_enable_chain="$ol_arg"
2285
2286 else
2287         ol_enable_chain="no"
2288 fi
2289 # end --enable-chain
2290
2291 # OpenLDAP --enable-denyop
2292         # Check whether --enable-denyop or --disable-denyop was given.
2293 if test "${enable_denyop+set}" = set; then
2294   enableval="$enable_denyop"
2295   
2296         ol_arg=invalid
2297         for ol_val in no yes mod ; do
2298                 if test "$enableval" = "$ol_val" ; then
2299                         ol_arg="$ol_val"
2300                 fi
2301         done
2302         if test "$ol_arg" = "invalid" ; then
2303                 { echo "configure: error: bad value $enableval for --enable-denyop" 1>&2; exit 1; }
2304         fi
2305         ol_enable_denyop="$ol_arg"
2306
2307 else
2308         ol_enable_denyop="no"
2309 fi
2310 # end --enable-denyop
2311
2312 # OpenLDAP --enable-dyngroup
2313         # Check whether --enable-dyngroup or --disable-dyngroup was given.
2314 if test "${enable_dyngroup+set}" = set; then
2315   enableval="$enable_dyngroup"
2316   
2317         ol_arg=invalid
2318         for ol_val in no yes mod ; do
2319                 if test "$enableval" = "$ol_val" ; then
2320                         ol_arg="$ol_val"
2321                 fi
2322         done
2323         if test "$ol_arg" = "invalid" ; then
2324                 { echo "configure: error: bad value $enableval for --enable-dyngroup" 1>&2; exit 1; }
2325         fi
2326         ol_enable_dyngroup="$ol_arg"
2327
2328 else
2329         ol_enable_dyngroup="no"
2330 fi
2331 # end --enable-dyngroup
2332
2333 # OpenLDAP --enable-lastmod
2334         # Check whether --enable-lastmod or --disable-lastmod was given.
2335 if test "${enable_lastmod+set}" = set; then
2336   enableval="$enable_lastmod"
2337   
2338         ol_arg=invalid
2339         for ol_val in no yes mod ; do
2340                 if test "$enableval" = "$ol_val" ; then
2341                         ol_arg="$ol_val"
2342                 fi
2343         done
2344         if test "$ol_arg" = "invalid" ; then
2345                 { echo "configure: error: bad value $enableval for --enable-lastmod" 1>&2; exit 1; }
2346         fi
2347         ol_enable_lastmod="$ol_arg"
2348
2349 else
2350         ol_enable_lastmod="no"
2351 fi
2352 # end --enable-lastmod
2353
2354 # OpenLDAP --enable-ppolicy
2355         # Check whether --enable-ppolicy or --disable-ppolicy was given.
2356 if test "${enable_ppolicy+set}" = set; then
2357   enableval="$enable_ppolicy"
2358   
2359         ol_arg=invalid
2360         for ol_val in no yes mod ; do
2361                 if test "$enableval" = "$ol_val" ; then
2362                         ol_arg="$ol_val"
2363                 fi
2364         done
2365         if test "$ol_arg" = "invalid" ; then
2366                 { echo "configure: error: bad value $enableval for --enable-ppolicy" 1>&2; exit 1; }
2367         fi
2368         ol_enable_ppolicy="$ol_arg"
2369
2370 else
2371         ol_enable_ppolicy="no"
2372 fi
2373 # end --enable-ppolicy
2374
2375 # OpenLDAP --enable-proxycache
2376         # Check whether --enable-proxycache or --disable-proxycache was given.
2377 if test "${enable_proxycache+set}" = set; then
2378   enableval="$enable_proxycache"
2379   
2380         ol_arg=invalid
2381         for ol_val in no yes mod ; do
2382                 if test "$enableval" = "$ol_val" ; then
2383                         ol_arg="$ol_val"
2384                 fi
2385         done
2386         if test "$ol_arg" = "invalid" ; then
2387                 { echo "configure: error: bad value $enableval for --enable-proxycache" 1>&2; exit 1; }
2388         fi
2389         ol_enable_proxycache="$ol_arg"
2390
2391 else
2392         ol_enable_proxycache="no"
2393 fi
2394 # end --enable-proxycache
2395
2396 # OpenLDAP --enable-refint
2397         # Check whether --enable-refint or --disable-refint was given.
2398 if test "${enable_refint+set}" = set; then
2399   enableval="$enable_refint"
2400   
2401         ol_arg=invalid
2402         for ol_val in no yes mod ; do
2403                 if test "$enableval" = "$ol_val" ; then
2404                         ol_arg="$ol_val"
2405                 fi
2406         done
2407         if test "$ol_arg" = "invalid" ; then
2408                 { echo "configure: error: bad value $enableval for --enable-refint" 1>&2; exit 1; }
2409         fi
2410         ol_enable_refint="$ol_arg"
2411
2412 else
2413         ol_enable_refint="no"
2414 fi
2415 # end --enable-refint
2416
2417 # OpenLDAP --enable-rwm
2418         # Check whether --enable-rwm or --disable-rwm was given.
2419 if test "${enable_rwm+set}" = set; then
2420   enableval="$enable_rwm"
2421   
2422         ol_arg=invalid
2423         for ol_val in no yes mod ; do
2424                 if test "$enableval" = "$ol_val" ; then
2425                         ol_arg="$ol_val"
2426                 fi
2427         done
2428         if test "$ol_arg" = "invalid" ; then
2429                 { echo "configure: error: bad value $enableval for --enable-rwm" 1>&2; exit 1; }
2430         fi
2431         ol_enable_rwm="$ol_arg"
2432
2433 else
2434         ol_enable_rwm="no"
2435 fi
2436 # end --enable-rwm
2437
2438 # OpenLDAP --enable-syncprov
2439         # Check whether --enable-syncprov or --disable-syncprov was given.
2440 if test "${enable_syncprov+set}" = set; then
2441   enableval="$enable_syncprov"
2442   
2443         ol_arg=invalid
2444         for ol_val in no yes mod ; do
2445                 if test "$enableval" = "$ol_val" ; then
2446                         ol_arg="$ol_val"
2447                 fi
2448         done
2449         if test "$ol_arg" = "invalid" ; then
2450                 { echo "configure: error: bad value $enableval for --enable-syncprov" 1>&2; exit 1; }
2451         fi
2452         ol_enable_syncprov="$ol_arg"
2453
2454 else
2455         ol_enable_syncprov="yes"
2456 fi
2457 # end --enable-syncprov
2458
2459 # OpenLDAP --enable-unique
2460         # Check whether --enable-unique or --disable-unique was given.
2461 if test "${enable_unique+set}" = set; then
2462   enableval="$enable_unique"
2463   
2464         ol_arg=invalid
2465         for ol_val in no yes mod ; do
2466                 if test "$enableval" = "$ol_val" ; then
2467                         ol_arg="$ol_val"
2468                 fi
2469         done
2470         if test "$ol_arg" = "invalid" ; then
2471                 { echo "configure: error: bad value $enableval for --enable-unique" 1>&2; exit 1; }
2472         fi
2473         ol_enable_unique="$ol_arg"
2474
2475 else
2476         ol_enable_unique="no"
2477 fi
2478 # end --enable-unique
2479
2480
2481
2482 # Check whether --with-xxslurpdoptions or --without-xxslurpdoptions was given.
2483 if test "${with_xxslurpdoptions+set}" = set; then
2484   withval="$with_xxslurpdoptions"
2485   :
2486 fi
2487
2488 # OpenLDAP --enable-slurpd
2489         # Check whether --enable-slurpd or --disable-slurpd was given.
2490 if test "${enable_slurpd+set}" = set; then
2491   enableval="$enable_slurpd"
2492   
2493         ol_arg=invalid
2494         for ol_val in auto yes no ; do
2495                 if test "$enableval" = "$ol_val" ; then
2496                         ol_arg="$ol_val"
2497                 fi
2498         done
2499         if test "$ol_arg" = "invalid" ; then
2500                 { echo "configure: error: bad value $enableval for --enable-slurpd" 1>&2; exit 1; }
2501         fi
2502         ol_enable_slurpd="$ol_arg"
2503
2504 else
2505         ol_enable_slurpd="auto"
2506 fi
2507 # end --enable-slurpd
2508
2509 # Check whether --with-xxliboptions or --without-xxliboptions was given.
2510 if test "${with_xxliboptions+set}" = set; then
2511   withval="$with_xxliboptions"
2512   :
2513 fi
2514
2515 # Check whether --enable-static or --disable-static was given.
2516 if test "${enable_static+set}" = set; then
2517   enableval="$enable_static"
2518   p=${PACKAGE-default}
2519 case $enableval in
2520 yes) enable_static=yes ;;
2521 no) enable_static=no ;;
2522 *)
2523   enable_static=no
2524   # Look at the argument we got.  We use all the common list separators.
2525   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2526   for pkg in $enableval; do
2527     if test "X$pkg" = "X$p"; then
2528       enable_static=yes
2529     fi
2530   done
2531   IFS="$ac_save_ifs"
2532   ;;
2533 esac
2534 else
2535   enable_static=yes
2536 fi
2537
2538 # Check whether --enable-shared or --disable-shared was given.
2539 if test "${enable_shared+set}" = set; then
2540   enableval="$enable_shared"
2541   p=${PACKAGE-default}
2542 case $enableval in
2543 yes) enable_shared=yes ;;
2544 no) enable_shared=no ;;
2545 *)
2546   enable_shared=no
2547   # Look at the argument we got.  We use all the common list separators.
2548   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2549   for pkg in $enableval; do
2550     if test "X$pkg" = "X$p"; then
2551       enable_shared=yes
2552     fi
2553   done
2554   IFS="$ac_save_ifs"
2555   ;;
2556 esac
2557 else
2558   enable_shared=yes
2559 fi
2560
2561
2562
2563 # Activate any backends that were not explicitly enabled.
2564 # Note that back_bdb defaults to "yes" so this loop won't touch it.
2565 if test $ol_enable_backends != no ; then
2566         for i in $Backends; do
2567                 eval "ol_tmp=\$ol_enable_$i"
2568                 if test $ol_tmp = no ; then
2569                         eval "ol_enable_$i=$ol_enable_backends"
2570                 fi
2571         done
2572 fi
2573 # Activate the overlays
2574 if test $ol_enable_overlays != no ; then
2575         for i in $Overlays; do
2576                 eval "ol_tmp=\$ol_enable_$i"
2577                 if test $ol_tmp = no ; then
2578                         eval "ol_enable_$i=$ol_enable_overlays"
2579                 fi
2580         done
2581 fi
2582
2583 # validate options
2584 if test $ol_enable_slapd = no ; then
2585                 if test $ol_enable_slapi = yes ; then
2586                 echo "configure: warning: slapd disabled, ignoring --enable-slapi argument" 1>&2
2587         fi
2588         if test $ol_enable_backends != no ; then
2589                 echo "configure: warning: slapd disabled, ignoring --enable-backends argument" 1>&2
2590         fi
2591         for i in $Backends; do
2592                 eval "ol_tmp=\$ol_enable_$i"
2593                 if test $ol_tmp != no ; then
2594                         echo "configure: warning: slapd disabled, ignoring --enable-$i argument" 1>&2
2595                         eval "ol_enable_$i=no"
2596                 fi
2597         done
2598         if test $ol_enable_modules = yes ; then
2599                 echo "configure: warning: slapd disabled, ignoring --enable-modules argument" 1>&2
2600         fi
2601         if test $ol_enable_multimaster = yes ; then
2602                 echo "configure: warning: slapd disabled, ignoring --enable-multimaster argument" 1>&2
2603         fi
2604         if test $ol_enable_wrappers = yes ; then
2605                 echo "configure: warning: slapd disabled, ignoring --enable-wrappers argument" 1>&2
2606         fi
2607         if test $ol_enable_rlookups = yes ; then
2608                 echo "configure: warning: slapd disabled, ignoring --enable-rlookups argument" 1>&2
2609         fi
2610         if test $ol_enable_aci = yes ; then
2611                 echo "configure: warning: slapd disabled, ignoring --enable-aci argument" 1>&2
2612         fi
2613         if test $ol_with_ldbm_api != auto ; then
2614                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-api argument" 1>&2
2615         fi
2616         if test $ol_with_ldbm_type != auto ; then
2617                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-type argument" 1>&2
2618         fi
2619         if test $ol_enable_slurpd = yes ; then
2620                 { echo "configure: error: slurpd requires slapd" 1>&2; exit 1; }
2621         fi
2622         if test $ol_enable_rewrite = yes ; then
2623                 echo "configure: warning: slapd disabled, ignoring --enable-rewrite argument" 1>&2
2624         fi
2625                 if test $ol_enable_overlays != no ; then
2626                 echo "configure: warning: slapd disabled, ignoring --enable-overlays argument" 1>&2
2627         fi
2628         for i in $Overlays; do
2629                 eval "ol_tmp=\$ol_enable_$i"
2630                 if test $ol_tmp != no ; then
2631                         echo "configure: warning: slapd disabled, ignoring --enable-$i argument" 1>&2
2632                         eval "ol_enable_$i=no"
2633                 fi
2634         done
2635
2636         # force settings to no
2637         ol_enable_slapi=no
2638
2639         ol_enable_backends=no
2640         ol_enable_overlays=no
2641         ol_enable_modules=no
2642         ol_enable_multimaster=no
2643         ol_enable_rlookups=no
2644         ol_enable_aci=no
2645         ol_enable_wrappers=no
2646
2647         ol_with_ldbm_api=no
2648         ol_with_ldbm_type=no
2649
2650         ol_enable_slurpd=no
2651
2652         ol_enable_rewrite=no
2653
2654 elif test $ol_enable_ldbm = no ; then
2655         
2656         if test $ol_with_ldbm_api != auto ; then
2657                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-api argument" 1>&2
2658         fi
2659
2660         if test $ol_with_ldbm_type != auto ; then
2661                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-type argument" 1>&2
2662         fi
2663
2664         if test $ol_enable_modules != yes -a \
2665                 $ol_enable_bdb = no -a \
2666                 $ol_enable_dnssrv = no -a \
2667                 $ol_enable_hdb = no -a \
2668                 $ol_enable_ldap = no -a \
2669                 $ol_enable_meta = no -a \
2670                 $ol_enable_monitor = no -a \
2671                 $ol_enable_null = no -a \
2672                 $ol_enable_passwd = no -a \
2673                 $ol_enable_perl = no -a \
2674                 $ol_enable_relay = no -a \
2675                 $ol_enable_shell = no -a \
2676                 $ol_enable_sql = no ; then
2677
2678                 if test $ol_enable_slapd = yes ; then
2679                         { echo "configure: error: slapd requires a backend" 1>&2; exit 1; }
2680                 else
2681                         echo "configure: warning: skipping slapd, no backend specified" 1>&2
2682                         ol_enable_slapd=no
2683                 fi
2684         fi
2685
2686         ol_with_ldbm_api=no
2687         ol_with_ldbm_type=no
2688
2689         if test $ol_enable_bdb != no -o $ol_enable_hdb != no; then
2690                 ol_with_ldbm_api=berkeley
2691         fi
2692
2693 else
2694                 if test $ol_with_ldbm_api = gdbm -a \
2695                 $ol_with_ldbm_type = btree ; then
2696                 { echo "configure: error: GDBM only supports LDBM type hash" 1>&2; exit 1; }
2697         fi
2698         if test $ol_with_ldbm_api = mdbm -a \
2699                 $ol_with_ldbm_type = btree ; then
2700                 { echo "configure: error: MDBM only supports LDBM type hash" 1>&2; exit 1; }
2701         fi
2702         if test $ol_with_ldbm_api = ndbm -a \
2703                 $ol_with_ldbm_type = btree ; then
2704                 { echo "configure: error: NDBM only supports LDBM type hash" 1>&2; exit 1; }
2705         fi
2706
2707         if test $ol_enable_bdb != no -o $ol_enable_hdb != no ; then
2708                 if test $ol_with_ldbm_api = auto ; then
2709                         ol_with_ldbm_api=berkeley
2710                 elif test $ol_with_ldbm_api != berkeley ; then
2711                         { echo "configure: error: LDBM API not compatible with BDB/HDB" 1>&2; exit 1; }
2712                 fi
2713         fi
2714 fi
2715
2716 if test $ol_enable_chain != no -a $ol_enable_ldap = no ; then
2717         { echo "configure: error: --enable-chain requires --enable-ldap" 1>&2; exit 1; }
2718 fi
2719
2720 if test $ol_enable_meta = yes -a $ol_enable_ldap = no ; then
2721         { echo "configure: error: --enable-meta requires --enable-ldap" 1>&2; exit 1; }
2722 fi
2723
2724 if test $ol_enable_slurpd = yes ; then
2725                 if test $ol_with_threads = no ; then
2726                 { echo "configure: error: slurpd requires threads" 1>&2; exit 1; }
2727         fi
2728 fi
2729
2730 if test $ol_enable_lmpasswd = yes ; then
2731         if test $ol_with_tls = no ; then
2732                 { echo "configure: error: LAN Manager passwords require OpenSSL" 1>&2; exit 1; }
2733         fi
2734 fi
2735
2736 if test $ol_enable_kbind = yes ; then
2737         if test $ol_with_kerberos = no ; then
2738                 { echo "configure: error: options require --with-kerberos" 1>&2; exit 1; }
2739         elif test $ol_with_kerberos = auto ; then
2740                 ol_with_kerberos=yes
2741         fi
2742
2743 elif test $ol_enable_kbind = no ; then
2744         if test $ol_with_kerberos = auto ; then
2745                 ol_with_kerberos=no
2746         elif test $ol_with_kerberos != no ; then
2747                 echo "configure: warning: Kerberos detection enabled unnecessarily" 1>&2;
2748                 ol_with_kerberos=no
2749         fi
2750 fi
2751
2752 if test $ol_enable_spasswd = yes ; then
2753         if test $ol_with_cyrus_sasl = no ; then
2754                 { echo "configure: error: options require --with-cyrus-sasl" 1>&2; exit 1; }
2755         fi
2756         ol_with_cyrus_sasl=yes
2757 fi
2758
2759 echo "$ac_t""done" 1>&6
2760
2761 LDAP_LIBS=
2762 LDBM_LIBS=
2763 LTHREAD_LIBS=
2764 LUTIL_LIBS=
2765
2766 SLAPD_LIBS=
2767 SLURPD_LIBS=
2768
2769 BUILD_SLAPD=no
2770 BUILD_SLURPD=no
2771
2772 BUILD_THREAD=no
2773
2774 BUILD_SLAPI=no
2775 SLAPD_SLAPI_DEPEND=
2776
2777 BUILD_BDB=no
2778 BUILD_DNSSRV=no
2779 BUILD_HDB=no
2780 BUILD_LDAP=no
2781 BUILD_LDBM=no
2782 BUILD_META=no
2783 BUILD_MONITOR=no
2784 BUILD_NULL=no
2785 BUILD_PASSWD=no
2786 BUILD_PERL=no
2787 BUILD_RELAY=no
2788 BUILD_SHELL=no
2789 BUILD_SQL=no
2790
2791 BUILD_CHAIN=no
2792 BUILD_DENYOP=no
2793 BUILD_DYNGROUP=no
2794 BUILD_LASTMOD=no
2795 BUILD_PPOLICY=no
2796 BUILD_PROXYCACHE=no
2797 BUILD_REFINT=no
2798 BUILD_RWM=no
2799 BUILD_UNIQUE=no
2800
2801 SLAPD_DYNAMIC_OVERLAYS=
2802
2803 SLAPD_MODULES_LDFLAGS=
2804 SLAPD_MODULES_CPPFLAGS=
2805
2806 SLAPD_STATIC_BACKENDS=
2807 SLAPD_DYNAMIC_BACKENDS=
2808
2809 SLAPD_PERL_LDFLAGS=
2810 MOD_PERL_LDFLAGS=
2811 PERL_CPPFLAGS=
2812
2813 SLAPD_SQL_LDFLAGS=
2814 SLAPD_SQL_LIBS=
2815 SLAPD_SQL_INCLUDES=
2816
2817 KRB4_LIBS=
2818 KRB5_LIBS=
2819 SASL_LIBS=
2820 TLS_LIBS=
2821 MODULES_LIBS=
2822 SLAPI_LIBS=
2823 LIBSLAPI=
2824 LIBSLAPITOOLS=
2825 AUTH_LIBS=
2826
2827 SLAPD_SLP_LIBS=
2828 SLAPD_GMP_LIBS=
2829
2830
2831 cat >> confdefs.h <<\EOF
2832 #define HAVE_MKVERSION 1
2833 EOF
2834
2835
2836
2837
2838 ol_aix_threads=no
2839 case "$target" in
2840 *-*-aix*)       if test -z "$CC" ; then
2841                 case "$ol_with_threads" in
2842                 auto | yes |  posix) ol_aix_threads=yes ;;
2843                 esac
2844         fi
2845 ;;
2846 esac
2847
2848 if test $ol_aix_threads = yes ; then
2849         if test -z "${CC}" ; then
2850                 for ac_prog in cc_r xlc_r cc
2851 do
2852 # Extract the first word of "$ac_prog", so it can be a program name with args.
2853 set dummy $ac_prog; ac_word=$2
2854 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2855 echo "configure:2856: checking for $ac_word" >&5
2856 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2857   echo $ac_n "(cached) $ac_c" 1>&6
2858 else
2859   if test -n "$CC"; then
2860   ac_cv_prog_CC="$CC" # Let the user override the test.
2861 else
2862   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2863   ac_dummy="$PATH"
2864   for ac_dir in $ac_dummy; do
2865     test -z "$ac_dir" && ac_dir=.
2866     if test -f $ac_dir/$ac_word; then
2867       ac_cv_prog_CC="$ac_prog"
2868       break
2869     fi
2870   done
2871   IFS="$ac_save_ifs"
2872 fi
2873 fi
2874 CC="$ac_cv_prog_CC"
2875 if test -n "$CC"; then
2876   echo "$ac_t""$CC" 1>&6
2877 else
2878   echo "$ac_t""no" 1>&6
2879 fi
2880
2881 test -n "$CC" && break
2882 done
2883
2884
2885                 if test "$CC" = cc ; then
2886                                                 if test $ol_with_threads != auto ; then
2887                                 { echo "configure: error: --with-threads requires cc_r (or other suitable compiler) on AIX" 1>&2; exit 1; }
2888                         else
2889                                 echo "configure: warning: disabling threads, no cc_r on AIX" 1>&2
2890                         fi
2891                         ol_with_threads=no
2892                 fi
2893         fi
2894
2895         if test "${CC}" = "cc_r" -o "${CC}" = "xlc_r" ; then
2896                 ol_with_threads=posix
2897                 ol_cv_pthread_create=yes
2898         fi
2899 fi
2900
2901 if test -z "${CC}"; then
2902         for ac_prog in cc gcc
2903 do
2904 # Extract the first word of "$ac_prog", so it can be a program name with args.
2905 set dummy $ac_prog; ac_word=$2
2906 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2907 echo "configure:2908: checking for $ac_word" >&5
2908 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2909   echo $ac_n "(cached) $ac_c" 1>&6
2910 else
2911   if test -n "$CC"; then
2912   ac_cv_prog_CC="$CC" # Let the user override the test.
2913 else
2914   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2915   ac_dummy="$PATH"
2916   for ac_dir in $ac_dummy; do
2917     test -z "$ac_dir" && ac_dir=.
2918     if test -f $ac_dir/$ac_word; then
2919       ac_cv_prog_CC="$ac_prog"
2920       break
2921     fi
2922   done
2923   IFS="$ac_save_ifs"
2924 fi
2925 fi
2926 CC="$ac_cv_prog_CC"
2927 if test -n "$CC"; then
2928   echo "$ac_t""$CC" 1>&6
2929 else
2930   echo "$ac_t""no" 1>&6
2931 fi
2932
2933 test -n "$CC" && break
2934 done
2935 test -n "$CC" || CC="missing"
2936
2937
2938         if test "${CC}" = "missing" ; then
2939                 { echo "configure: error: Unable to locate cc(1) or suitable replacement.  Check PATH or set CC." 1>&2; exit 1; }
2940         fi
2941 fi
2942
2943 if test -z "${AR}"; then
2944         for ac_prog in ar gar
2945 do
2946 # Extract the first word of "$ac_prog", so it can be a program name with args.
2947 set dummy $ac_prog; ac_word=$2
2948 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2949 echo "configure:2950: checking for $ac_word" >&5
2950 if eval "test \"\${ac_cv_prog_AR+set}\" = set"; then
2951   echo $ac_n "(cached) $ac_c" 1>&6
2952 else
2953   if test -n "$AR"; then
2954   ac_cv_prog_AR="$AR" # Let the user override the test.
2955 else
2956   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2957   ac_dummy="$PATH"
2958   for ac_dir in $ac_dummy; do
2959     test -z "$ac_dir" && ac_dir=.
2960     if test -f $ac_dir/$ac_word; then
2961       ac_cv_prog_AR="$ac_prog"
2962       break
2963     fi
2964   done
2965   IFS="$ac_save_ifs"
2966 fi
2967 fi
2968 AR="$ac_cv_prog_AR"
2969 if test -n "$AR"; then
2970   echo "$ac_t""$AR" 1>&6
2971 else
2972   echo "$ac_t""no" 1>&6
2973 fi
2974
2975 test -n "$AR" && break
2976 done
2977 test -n "$AR" || AR="missing"
2978
2979
2980         if test "${AR}" = "missing" ; then
2981                 { echo "configure: error: Unable to locate ar(1) or suitable replacement.  Check PATH or set AR." 1>&2; exit 1; }
2982         fi
2983 fi
2984
2985
2986
2987 # Find the correct PATH separator.  Usually this is `:', but
2988 # DJGPP uses `;' like DOS.
2989 if test "X${PATH_SEPARATOR+set}" != Xset; then
2990   UNAME=${UNAME-`uname 2>/dev/null`}
2991   case X$UNAME in
2992     *-DOS) lt_cv_sys_path_separator=';' ;;
2993     *)     lt_cv_sys_path_separator=':' ;;
2994   esac
2995   PATH_SEPARATOR=$lt_cv_sys_path_separator
2996 fi
2997
2998 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
2999 echo "configure:3000: checking for Cygwin environment" >&5
3000 if eval "test \"\${ac_cv_cygwin+set}\" = set"; then
3001   echo $ac_n "(cached) $ac_c" 1>&6
3002 else
3003   cat > conftest.$ac_ext <<EOF
3004 #line 3005 "configure"
3005 #include "confdefs.h"
3006
3007 int main() {
3008
3009 #ifndef __CYGWIN__
3010 #define __CYGWIN__ __CYGWIN32__
3011 #endif
3012 return __CYGWIN__;
3013 ; return 0; }
3014 EOF
3015 if { (eval echo configure:3016: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3016   rm -rf conftest*
3017   ac_cv_cygwin=yes
3018 else
3019   echo "configure: failed program was:" >&5
3020   cat conftest.$ac_ext >&5
3021   rm -rf conftest*
3022   ac_cv_cygwin=no
3023 fi
3024 rm -f conftest*
3025 fi
3026
3027 echo "$ac_t""$ac_cv_cygwin" 1>&6
3028 CYGWIN=
3029 test "$ac_cv_cygwin" = yes && CYGWIN=yes
3030 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
3031 echo "configure:3032: checking for mingw32 environment" >&5
3032 if eval "test \"\${ac_cv_mingw32+set}\" = set"; then
3033   echo $ac_n "(cached) $ac_c" 1>&6
3034 else
3035   cat > conftest.$ac_ext <<EOF
3036 #line 3037 "configure"
3037 #include "confdefs.h"
3038
3039 int main() {
3040 return __MINGW32__;
3041 ; return 0; }
3042 EOF
3043 if { (eval echo configure:3044: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3044   rm -rf conftest*
3045   ac_cv_mingw32=yes
3046 else
3047   echo "configure: failed program was:" >&5
3048   cat conftest.$ac_ext >&5
3049   rm -rf conftest*
3050   ac_cv_mingw32=no
3051 fi
3052 rm -f conftest*
3053 fi
3054
3055 echo "$ac_t""$ac_cv_mingw32" 1>&6
3056 MINGW32=
3057 test "$ac_cv_mingw32" = yes && MINGW32=yes
3058 echo $ac_n "checking for EMX OS/2 environment""... $ac_c" 1>&6
3059 echo "configure:3060: checking for EMX OS/2 environment" >&5
3060 if eval "test \"\${ac_cv_emxos2+set}\" = set"; then
3061   echo $ac_n "(cached) $ac_c" 1>&6
3062 else
3063   cat > conftest.$ac_ext <<EOF
3064 #line 3065 "configure"
3065 #include "confdefs.h"
3066
3067 int main() {
3068 return __EMX__;
3069 ; return 0; }
3070 EOF
3071 if { (eval echo configure:3072: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3072   rm -rf conftest*
3073   ac_cv_emxos2=yes
3074 else
3075   echo "configure: failed program was:" >&5
3076   cat conftest.$ac_ext >&5
3077   rm -rf conftest*
3078   ac_cv_emxos2=no
3079 fi
3080 rm -f conftest*
3081 fi
3082
3083 echo "$ac_t""$ac_cv_emxos2" 1>&6
3084 EMXOS2=
3085 test "$ac_cv_emxos2" = yes && EMXOS2=yes
3086 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
3087 echo "configure:3088: checking how to run the C preprocessor" >&5
3088 # On Suns, sometimes $CPP names a directory.
3089 if test -n "$CPP" && test -d "$CPP"; then
3090   CPP=
3091 fi
3092 if test -z "$CPP"; then
3093 if eval "test \"\${ac_cv_prog_CPP+set}\" = set"; then
3094   echo $ac_n "(cached) $ac_c" 1>&6
3095 else
3096     # This must be in double quotes, not single quotes, because CPP may get
3097   # substituted into the Makefile and "${CC-cc}" will confuse make.
3098   CPP="${CC-cc} -E"
3099   # On the NeXT, cc -E runs the code through the compiler's parser,
3100   # not just through cpp.
3101   cat > conftest.$ac_ext <<EOF
3102 #line 3103 "configure"
3103 #include "confdefs.h"
3104 #include <assert.h>
3105 Syntax Error
3106 EOF
3107 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3108 { (eval echo configure:3109: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3109 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3110 if test -z "$ac_err"; then
3111   :
3112 else
3113   echo "$ac_err" >&5
3114   echo "configure: failed program was:" >&5
3115   cat conftest.$ac_ext >&5
3116   rm -rf conftest*
3117   CPP="${CC-cc} -E -traditional-cpp"
3118   cat > conftest.$ac_ext <<EOF
3119 #line 3120 "configure"
3120 #include "confdefs.h"
3121 #include <assert.h>
3122 Syntax Error
3123 EOF
3124 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3125 { (eval echo configure:3126: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3126 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3127 if test -z "$ac_err"; then
3128   :
3129 else
3130   echo "$ac_err" >&5
3131   echo "configure: failed program was:" >&5
3132   cat conftest.$ac_ext >&5
3133   rm -rf conftest*
3134   CPP="${CC-cc} -nologo -E"
3135   cat > conftest.$ac_ext <<EOF
3136 #line 3137 "configure"
3137 #include "confdefs.h"
3138 #include <assert.h>
3139 Syntax Error
3140 EOF
3141 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3142 { (eval echo configure:3143: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3143 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3144 if test -z "$ac_err"; then
3145   :
3146 else
3147   echo "$ac_err" >&5
3148   echo "configure: failed program was:" >&5
3149   cat conftest.$ac_ext >&5
3150   rm -rf conftest*
3151   CPP=/lib/cpp
3152 fi
3153 rm -f conftest*
3154 fi
3155 rm -f conftest*
3156 fi
3157 rm -f conftest*
3158   ac_cv_prog_CPP="$CPP"
3159 fi
3160   CPP="$ac_cv_prog_CPP"
3161 else
3162   ac_cv_prog_CPP="$CPP"
3163 fi
3164 echo "$ac_t""$CPP" 1>&6
3165
3166 # Check whether --enable-fast-install or --disable-fast-install was given.
3167 if test "${enable_fast_install+set}" = set; then
3168   enableval="$enable_fast_install"
3169   p=${PACKAGE-default}
3170 case $enableval in
3171 yes) enable_fast_install=yes ;;
3172 no) enable_fast_install=no ;;
3173 *)
3174   enable_fast_install=no
3175   # Look at the argument we got.  We use all the common list separators.
3176   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
3177   for pkg in $enableval; do
3178     if test "X$pkg" = "X$p"; then
3179       enable_fast_install=yes
3180     fi
3181   done
3182   IFS="$ac_save_ifs"
3183   ;;
3184 esac
3185 else
3186   enable_fast_install=yes
3187 fi
3188
3189 # Extract the first word of "gcc", so it can be a program name with args.
3190 set dummy gcc; ac_word=$2
3191 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3192 echo "configure:3193: checking for $ac_word" >&5
3193 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3194   echo $ac_n "(cached) $ac_c" 1>&6
3195 else
3196   if test -n "$CC"; then
3197   ac_cv_prog_CC="$CC" # Let the user override the test.
3198 else
3199   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3200   ac_dummy="$PATH"
3201   for ac_dir in $ac_dummy; do
3202     test -z "$ac_dir" && ac_dir=.
3203     if test -f $ac_dir/$ac_word; then
3204       ac_cv_prog_CC="gcc"
3205       break
3206     fi
3207   done
3208   IFS="$ac_save_ifs"
3209 fi
3210 fi
3211 CC="$ac_cv_prog_CC"
3212 if test -n "$CC"; then
3213   echo "$ac_t""$CC" 1>&6
3214 else
3215   echo "$ac_t""no" 1>&6
3216 fi
3217
3218 if test -z "$CC"; then
3219   # Extract the first word of "cc", so it can be a program name with args.
3220 set dummy cc; ac_word=$2
3221 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3222 echo "configure:3223: checking for $ac_word" >&5
3223 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3224   echo $ac_n "(cached) $ac_c" 1>&6
3225 else
3226   if test -n "$CC"; then
3227   ac_cv_prog_CC="$CC" # Let the user override the test.
3228 else
3229   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3230   ac_prog_rejected=no
3231   ac_dummy="$PATH"
3232   for ac_dir in $ac_dummy; do
3233     test -z "$ac_dir" && ac_dir=.
3234     if test -f $ac_dir/$ac_word; then
3235       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
3236         ac_prog_rejected=yes
3237         continue
3238       fi
3239       ac_cv_prog_CC="cc"
3240       break
3241     fi
3242   done
3243   IFS="$ac_save_ifs"
3244 if test $ac_prog_rejected = yes; then
3245   # We found a bogon in the path, so make sure we never use it.
3246   set dummy $ac_cv_prog_CC
3247   shift
3248   if test $# -gt 0; then
3249     # We chose a different compiler from the bogus one.
3250     # However, it has the same basename, so the bogon will be chosen
3251     # first if we set CC to just the basename; use the full file name.
3252     shift
3253     set dummy "$ac_dir/$ac_word" "$@"
3254     shift
3255     ac_cv_prog_CC="$@"
3256   fi
3257 fi
3258 fi
3259 fi
3260 CC="$ac_cv_prog_CC"
3261 if test -n "$CC"; then
3262   echo "$ac_t""$CC" 1>&6
3263 else
3264   echo "$ac_t""no" 1>&6
3265 fi
3266
3267   if test -z "$CC"; then
3268     case "`uname -s`" in
3269     *win32* | *WIN32* | *CYGWIN*)
3270       # Extract the first word of "cl", so it can be a program name with args.
3271 set dummy cl; ac_word=$2
3272 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3273 echo "configure:3274: checking for $ac_word" >&5
3274 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3275   echo $ac_n "(cached) $ac_c" 1>&6
3276 else
3277   if test -n "$CC"; then
3278   ac_cv_prog_CC="$CC" # Let the user override the test.
3279 else
3280   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3281   ac_dummy="$PATH"
3282   for ac_dir in $ac_dummy; do
3283     test -z "$ac_dir" && ac_dir=.
3284     if test -f $ac_dir/$ac_word; then
3285       ac_cv_prog_CC="cl"
3286       break
3287     fi
3288   done
3289   IFS="$ac_save_ifs"
3290 fi
3291 fi
3292 CC="$ac_cv_prog_CC"
3293 if test -n "$CC"; then
3294   echo "$ac_t""$CC" 1>&6
3295 else
3296   echo "$ac_t""no" 1>&6
3297 fi
3298  ;;
3299     esac
3300   fi
3301   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
3302 fi
3303
3304 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works""... $ac_c" 1>&6
3305 echo "configure:3306: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works" >&5
3306
3307 ac_ext=c
3308 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
3309 ac_cpp='$CPP $CPPFLAGS'
3310 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
3311 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
3312 cross_compiling=$ac_cv_prog_cc_cross
3313
3314 cat > conftest.$ac_ext << EOF
3315
3316 #line 3317 "configure"
3317 #include "confdefs.h"
3318
3319 main(){return(0);}
3320 EOF
3321 if { (eval echo configure:3322: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3322   ac_cv_prog_cc_works=yes
3323   # If we can't run a trivial program, we are probably using a cross compiler.
3324   if (./conftest; exit) 2>/dev/null; then
3325     ac_cv_prog_cc_cross=no
3326   else
3327     ac_cv_prog_cc_cross=yes
3328   fi
3329 else
3330   echo "configure: failed program was:" >&5
3331   cat conftest.$ac_ext >&5
3332   ac_cv_prog_cc_works=no
3333 fi
3334 rm -fr conftest*
3335 ac_ext=c
3336 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
3337 ac_cpp='$CPP $CPPFLAGS'
3338 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
3339 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
3340 cross_compiling=$ac_cv_prog_cc_cross
3341
3342 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
3343 if test $ac_cv_prog_cc_works = no; then
3344   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
3345 fi
3346 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
3347 echo "configure:3348: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler" >&5
3348 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
3349 cross_compiling=$ac_cv_prog_cc_cross
3350
3351 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
3352 echo "configure:3353: checking whether we are using GNU C" >&5
3353 if eval "test \"\${ac_cv_prog_gcc+set}\" = set"; then
3354   echo $ac_n "(cached) $ac_c" 1>&6
3355 else
3356   cat > conftest.c <<EOF
3357 #ifdef __GNUC__
3358   yes;
3359 #endif
3360 EOF
3361 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
3362   ac_cv_prog_gcc=yes
3363 else
3364   ac_cv_prog_gcc=no
3365 fi
3366 fi
3367
3368 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
3369
3370 if test $ac_cv_prog_gcc = yes; then
3371   GCC=yes
3372 else
3373   GCC=
3374 fi
3375
3376 ac_test_CFLAGS="${CFLAGS+set}"
3377 ac_save_CFLAGS="$CFLAGS"
3378 CFLAGS=
3379 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
3380 echo "configure:3381: checking whether ${CC-cc} accepts -g" >&5
3381 if eval "test \"\${ac_cv_prog_cc_g+set}\" = set"; then
3382   echo $ac_n "(cached) $ac_c" 1>&6
3383 else
3384   echo 'void f(){}' > conftest.c
3385 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
3386   ac_cv_prog_cc_g=yes
3387 else
3388   ac_cv_prog_cc_g=no
3389 fi
3390 rm -f conftest*
3391
3392 fi
3393
3394 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
3395 if test "$ac_test_CFLAGS" = set; then
3396   CFLAGS="$ac_save_CFLAGS"
3397 elif test $ac_cv_prog_cc_g = yes; then
3398   if test "$GCC" = yes; then
3399     CFLAGS="-g -O2"
3400   else
3401     CFLAGS="-g"
3402   fi
3403 else
3404   if test "$GCC" = yes; then
3405     CFLAGS="-O2"
3406   else
3407     CFLAGS=
3408   fi
3409 fi
3410
3411 # Check whether --with-gnu-ld or --without-gnu-ld was given.
3412 if test "${with_gnu_ld+set}" = set; then
3413   withval="$with_gnu_ld"
3414   test "$withval" = no || with_gnu_ld=yes
3415 else
3416   with_gnu_ld=no
3417 fi
3418
3419 ac_prog=ld
3420 if test "$GCC" = yes; then
3421   # Check if gcc -print-prog-name=ld gives a path.
3422   echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
3423 echo "configure:3424: checking for ld used by GCC" >&5
3424   case $host in
3425   *-*-mingw*)
3426     # gcc leaves a trailing carriage return which upsets mingw
3427     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
3428   *)
3429     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
3430   esac
3431   case $ac_prog in
3432     # Accept absolute paths.
3433     [\\/]* | [A-Za-z]:[\\/]*)
3434       re_direlt='/[^/][^/]*/\.\./'
3435       # Canonicalize the path of ld
3436       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
3437       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
3438         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
3439       done
3440       test -z "$LD" && LD="$ac_prog"
3441       ;;
3442   "")
3443     # If it fails, then pretend we aren't using GCC.
3444     ac_prog=ld
3445     ;;
3446   *)
3447     # If it is relative, then search for the first ld in PATH.
3448     with_gnu_ld=unknown
3449     ;;
3450   esac
3451 elif test "$with_gnu_ld" = yes; then
3452   echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
3453 echo "configure:3454: checking for GNU ld" >&5
3454 else
3455   echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
3456 echo "configure:3457: checking for non-GNU ld" >&5
3457 fi
3458 if eval "test \"\${lt_cv_path_LD+set}\" = set"; then
3459   echo $ac_n "(cached) $ac_c" 1>&6
3460 else
3461   if test -z "$LD"; then
3462   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3463   for ac_dir in $PATH; do
3464     test -z "$ac_dir" && ac_dir=.
3465     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
3466       lt_cv_path_LD="$ac_dir/$ac_prog"
3467       # Check to see if the program is GNU ld.  I'd rather use --version,
3468       # but apparently some GNU ld's only accept -v.
3469       # Break only if it was the GNU/non-GNU ld that we prefer.
3470       if "$lt_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
3471         test "$with_gnu_ld" != no && break
3472       else
3473         test "$with_gnu_ld" != yes && break
3474       fi
3475     fi
3476   done
3477   IFS="$ac_save_ifs"
3478 else
3479   lt_cv_path_LD="$LD" # Let the user override the test with a path.
3480 fi
3481 fi
3482
3483 LD="$lt_cv_path_LD"
3484 if test -n "$LD"; then
3485   echo "$ac_t""$LD" 1>&6
3486 else
3487   echo "$ac_t""no" 1>&6
3488 fi
3489 test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
3490 echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
3491 echo "configure:3492: checking if the linker ($LD) is GNU ld" >&5
3492 if eval "test \"\${lt_cv_prog_gnu_ld+set}\" = set"; then
3493   echo $ac_n "(cached) $ac_c" 1>&6
3494 else
3495   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
3496 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
3497   lt_cv_prog_gnu_ld=yes
3498 else
3499   lt_cv_prog_gnu_ld=no
3500 fi
3501 fi
3502
3503 echo "$ac_t""$lt_cv_prog_gnu_ld" 1>&6
3504 with_gnu_ld=$lt_cv_prog_gnu_ld
3505
3506
3507 echo $ac_n "checking for $LD option to reload object files""... $ac_c" 1>&6
3508 echo "configure:3509: checking for $LD option to reload object files" >&5
3509 if eval "test \"\${lt_cv_ld_reload_flag+set}\" = set"; then
3510   echo $ac_n "(cached) $ac_c" 1>&6
3511 else
3512   lt_cv_ld_reload_flag='-r'
3513 fi
3514
3515 echo "$ac_t""$lt_cv_ld_reload_flag" 1>&6
3516 reload_flag=$lt_cv_ld_reload_flag
3517 test -n "$reload_flag" && reload_flag=" $reload_flag"
3518
3519 echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
3520 echo "configure:3521: checking for BSD-compatible nm" >&5
3521 if eval "test \"\${lt_cv_path_NM+set}\" = set"; then
3522   echo $ac_n "(cached) $ac_c" 1>&6
3523 else
3524   if test -n "$NM"; then
3525   # Let the user override the test.
3526   lt_cv_path_NM="$NM"
3527 else
3528   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3529   for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
3530     test -z "$ac_dir" && ac_dir=.
3531     tmp_nm=$ac_dir/${ac_tool_prefix}nm
3532     if test -f $tmp_nm || test -f $tmp_nm$ac_exeext ; then
3533       # Check to see if the nm accepts a BSD-compat flag.
3534       # Adding the `sed 1q' prevents false positives on HP-UX, which says:
3535       #   nm: unknown option "B" ignored
3536       # Tru64's nm complains that /dev/null is an invalid object file
3537       if ($tmp_nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then
3538         lt_cv_path_NM="$tmp_nm -B"
3539         break
3540       elif ($tmp_nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
3541         lt_cv_path_NM="$tmp_nm -p"
3542         break
3543       else
3544         lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
3545         continue # so that we can try to find one that supports BSD flags
3546       fi
3547     fi
3548   done
3549   IFS="$ac_save_ifs"
3550   test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
3551 fi
3552 fi
3553
3554 NM="$lt_cv_path_NM"
3555 echo "$ac_t""$NM" 1>&6
3556
3557 echo $ac_n "checking for a sed that does not truncate output""... $ac_c" 1>&6
3558 echo "configure:3559: checking for a sed that does not truncate output" >&5
3559 if eval "test \"\${lt_cv_path_SED+set}\" = set"; then
3560   echo $ac_n "(cached) $ac_c" 1>&6
3561 else
3562   # Loop through the user's path and test for sed and gsed.
3563 # Then use that list of sed's as ones to test for truncation.
3564 as_executable_p="test -f"
3565 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3566 for as_dir in $PATH
3567 do
3568   IFS=$as_save_IFS
3569   test -z "$as_dir" && as_dir=.
3570   for ac_prog in sed gsed; do
3571     for ac_exec_ext in '' $ac_executable_extensions; do
3572       if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
3573         _sed_list="$_sed_list $as_dir/$ac_prog$ac_exec_ext"
3574       fi
3575     done
3576   done
3577 done
3578
3579   # Create a temporary directory, and hook for its removal unless debugging.
3580 $debug ||
3581 {
3582   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
3583   trap '{ (exit 1); exit 1; }' 1 2 13 15
3584 }
3585
3586 # Create a (secure) tmp directory for tmp files.
3587 : ${TMPDIR=/tmp}
3588 {
3589   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/sedXXXXXX") 2>/dev/null` &&
3590   test -n "$tmp" && test -d "$tmp"
3591 }  ||
3592 {
3593   tmp=$TMPDIR/sed$$-$RANDOM
3594   (umask 077 && mkdir $tmp)
3595 } ||
3596 {
3597    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
3598    { (exit 1); exit 1; }
3599 }
3600   _max=0
3601   _count=0
3602   # Add /usr/xpg4/bin/sed as it is typically found on Solaris
3603   # along with /bin/sed that truncates output.
3604   for _sed in $_sed_list /usr/xpg4/bin/sed; do
3605     test ! -f ${_sed} && break
3606     cat /dev/null > "$tmp/sed.in"
3607     _count=0
3608     echo ${ECHO_N-$ac_n} "0123456789${ECHO_C-$ac_c}" >"$tmp/sed.in"
3609     # Check for GNU sed and select it if it is found.
3610     if "${_sed}" --version 2>&1 < /dev/null | egrep '(GNU)' > /dev/null; then
3611       lt_cv_path_SED=${_sed}
3612       break
3613     fi
3614     while true; do
3615       cat "$tmp/sed.in" "$tmp/sed.in" >"$tmp/sed.tmp"
3616       mv "$tmp/sed.tmp" "$tmp/sed.in"
3617       cp "$tmp/sed.in" "$tmp/sed.nl"
3618       echo >>"$tmp/sed.nl"
3619       ${_sed} -e 's/a$//' < "$tmp/sed.nl" >"$tmp/sed.out" || break
3620       cmp -s "$tmp/sed.out" "$tmp/sed.nl" || break
3621       # 40000 chars as input seems more than enough
3622       test $_count -gt 10 && break
3623       _count=`expr $_count + 1`
3624       if test $_count -gt $_max; then
3625         _max=$_count
3626         lt_cv_path_SED=$_sed
3627       fi
3628     done
3629   done
3630   rm -rf "$tmp"
3631
3632 fi
3633
3634 if test "X$SED" != "X"; then
3635   lt_cv_path_SED=$SED
3636 else
3637   SED=$lt_cv_path_SED
3638 fi
3639 echo "$ac_t""$SED" 1>&6
3640
3641 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
3642 echo "configure:3643: checking whether ln -s works" >&5
3643 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
3644   echo $ac_n "(cached) $ac_c" 1>&6
3645 else
3646   rm -f conftestdata
3647 if ln -s X conftestdata 2>/dev/null
3648 then
3649   rm -f conftestdata
3650   ac_cv_prog_LN_S="ln -s"
3651 else
3652   ac_cv_prog_LN_S=ln
3653 fi
3654 fi
3655 LN_S="$ac_cv_prog_LN_S"
3656 if test "$ac_cv_prog_LN_S" = "ln -s"; then
3657   echo "$ac_t""yes" 1>&6
3658 else
3659   echo "$ac_t""no" 1>&6
3660 fi
3661
3662 echo $ac_n "checking how to recognise dependent libraries""... $ac_c" 1>&6
3663 echo "configure:3664: checking how to recognise dependent libraries" >&5
3664 if eval "test \"\${lt_cv_deplibs_check_method+set}\" = set"; then
3665   echo $ac_n "(cached) $ac_c" 1>&6
3666 else
3667   lt_cv_file_magic_cmd='$MAGIC_CMD'
3668 lt_cv_file_magic_test_file=
3669 lt_cv_deplibs_check_method='unknown'
3670 # Need to set the preceding variable on all platforms that support
3671 # interlibrary dependencies.
3672 # 'none' -- dependencies not supported.
3673 # `unknown' -- same as none, but documents that we really don't know.
3674 # 'pass_all' -- all dependencies passed with no checks.
3675 # 'test_compile' -- check by making test program.
3676 # 'file_magic [[regex]]' -- check by looking for files in library path
3677 # which responds to the $file_magic_cmd with a given egrep regex.
3678 # If you have `file' or equivalent on your system and you're not sure
3679 # whether `pass_all' will *always* work, you probably want this one.
3680
3681 case $host_os in
3682 aix4* | aix5*)
3683   lt_cv_deplibs_check_method=pass_all
3684   ;;
3685
3686 beos*)
3687   lt_cv_deplibs_check_method=pass_all
3688   ;;
3689
3690 bsdi4*)
3691   lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
3692   lt_cv_file_magic_cmd='/usr/bin/file -L'
3693   lt_cv_file_magic_test_file=/shlib/libc.so
3694   ;;
3695
3696 cygwin* | mingw* | pw32*)
3697   lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
3698   lt_cv_file_magic_cmd='$OBJDUMP -f'
3699   ;;
3700
3701 darwin* | rhapsody*)
3702   lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library'
3703   lt_cv_file_magic_cmd='/usr/bin/file -L'
3704   case "$host_os" in
3705   rhapsody* | darwin1.[012])
3706     lt_cv_file_magic_test_file=`echo /System/Library/Frameworks/System.framework/Versions/*/System | head -1`
3707     ;;
3708   *) # Darwin 1.3 on
3709     lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
3710     ;;
3711   esac
3712   ;;
3713
3714 freebsd*)
3715   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3716     case $host_cpu in
3717     i*86 )
3718       # Not sure whether the presence of OpenBSD here was a mistake.
3719       # Let's accept both of them until this is cleared up.
3720       lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[3-9]86 (compact )?demand paged shared library'
3721       lt_cv_file_magic_cmd=/usr/bin/file
3722       lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3723       ;;
3724     esac
3725   else
3726     lt_cv_deplibs_check_method=pass_all
3727   fi
3728   ;;
3729
3730 gnu*)
3731   lt_cv_deplibs_check_method=pass_all
3732   ;;
3733
3734 hpux10.20*|hpux11*)
3735   lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library'
3736   lt_cv_file_magic_cmd=/usr/bin/file
3737   lt_cv_file_magic_test_file=/usr/lib/libc.sl
3738   ;;
3739
3740 irix5* | irix6* | nonstopux*)
3741   case $host_os in
3742   irix5* | nonstopux*)
3743     # this will be overridden with pass_all, but let us keep it just in case
3744     lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
3745     ;;
3746   *)
3747     case $LD in
3748     *-32|*"-32 ") libmagic=32-bit;;
3749     *-n32|*"-n32 ") libmagic=N32;;
3750     *-64|*"-64 ") libmagic=64-bit;;
3751     *) libmagic=never-match;;
3752     esac
3753     # this will be overridden with pass_all, but let us keep it just in case
3754     lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[1234] dynamic lib MIPS - version 1"
3755     ;;
3756   esac
3757   lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
3758   lt_cv_deplibs_check_method=pass_all
3759   ;;
3760
3761 # This must be Linux ELF.
3762 linux-gnu*)
3763   case $host_cpu in
3764   alpha* | hppa* | i*86 | mips | mipsel | powerpc* | sparc* | ia64*)
3765     lt_cv_deplibs_check_method=pass_all ;;
3766   *)
3767     # glibc up to 2.1.1 does not perform some relocations on ARM
3768     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;;
3769   esac
3770   lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
3771   ;;
3772
3773 netbsd*)
3774   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3775     lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
3776   else
3777     lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so$'
3778   fi
3779   ;;
3780
3781 newos6*)
3782   lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
3783   lt_cv_file_magic_cmd=/usr/bin/file
3784   lt_cv_file_magic_test_file=/usr/lib/libnls.so
3785   ;;
3786
3787 openbsd*)
3788   lt_cv_file_magic_cmd=/usr/bin/file
3789   lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3790   if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
3791     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB shared object'
3792   else
3793     lt_cv_deplibs_check_method='file_magic OpenBSD.* shared library'
3794   fi
3795   ;;
3796
3797 openedition*)
3798   lt_cv_deplibs_check_method=pass_all
3799   ;;
3800
3801 osf3* | osf4* | osf5*)
3802   # this will be overridden with pass_all, but let us keep it just in case
3803   lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
3804   lt_cv_file_magic_test_file=/shlib/libc.so
3805   lt_cv_deplibs_check_method=pass_all
3806   ;;
3807
3808 sco3.2v5*)
3809   lt_cv_deplibs_check_method=pass_all
3810   ;;
3811
3812 solaris*)
3813   lt_cv_deplibs_check_method=pass_all
3814   lt_cv_file_magic_test_file=/lib/libc.so
3815   ;;
3816
3817 sysv5uw[78]* | sysv4*uw2*)
3818   lt_cv_deplibs_check_method=pass_all
3819   ;;
3820
3821 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
3822   case $host_vendor in
3823   motorola)
3824     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]'
3825     lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
3826     ;;
3827   ncr)
3828     lt_cv_deplibs_check_method=pass_all
3829     ;;
3830   sequent)
3831     lt_cv_file_magic_cmd='/bin/file'
3832     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'
3833     ;;
3834   sni)
3835     lt_cv_file_magic_cmd='/bin/file'
3836     lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib"
3837     lt_cv_file_magic_test_file=/lib/libc.so
3838     ;;
3839   siemens)
3840     lt_cv_deplibs_check_method=pass_all
3841     ;;
3842   esac
3843   ;;
3844 esac
3845
3846 fi
3847
3848 echo "$ac_t""$lt_cv_deplibs_check_method" 1>&6
3849 file_magic_cmd=$lt_cv_file_magic_cmd
3850 deplibs_check_method=$lt_cv_deplibs_check_method
3851
3852 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
3853 echo "configure:3854: checking for object suffix" >&5
3854 if eval "test \"\${ac_cv_objext+set}\" = set"; then
3855   echo $ac_n "(cached) $ac_c" 1>&6
3856 else
3857   rm -f conftest*
3858 echo 'int i = 1;' > conftest.$ac_ext
3859 if { (eval echo configure:3860: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3860   for ac_file in conftest.*; do
3861     case $ac_file in
3862     *.c) ;;
3863     *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
3864     esac
3865   done
3866 else
3867   { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
3868 fi
3869 rm -f conftest*
3870 fi
3871
3872 echo "$ac_t""$ac_cv_objext" 1>&6
3873 OBJEXT=$ac_cv_objext
3874 ac_objext=$ac_cv_objext
3875
3876
3877
3878
3879 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
3880 echo "configure:3881: checking for executable suffix" >&5
3881 if eval "test \"\${ac_cv_exeext+set}\" = set"; then
3882   echo $ac_n "(cached) $ac_c" 1>&6
3883 else
3884   if test "$CYGWIN" = yes || test "$MINGW32" = yes || test "$EMXOS2" = yes; then
3885   ac_cv_exeext=.exe
3886 else
3887   rm -f conftest*
3888   echo 'int main () { return 0; }' > conftest.$ac_ext
3889   ac_cv_exeext=
3890   if { (eval echo configure:3891: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
3891     for file in conftest.*; do
3892       case $file in
3893       *.c | *.C | *.o | *.obj | *.xcoff) ;;
3894       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
3895       esac
3896     done
3897   else
3898     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
3899   fi
3900   rm -f conftest*
3901   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
3902 fi
3903 fi
3904
3905 EXEEXT=""
3906 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
3907 echo "$ac_t""${ac_cv_exeext}" 1>&6
3908 ac_exeext=$EXEEXT
3909
3910 if test $host != $build; then
3911   ac_tool_prefix=${host_alias}-
3912 else
3913   ac_tool_prefix=
3914 fi
3915
3916
3917
3918
3919 # Check for command to grab the raw symbol name followed by C symbol from nm.
3920 echo $ac_n "checking command to parse $NM output""... $ac_c" 1>&6
3921 echo "configure:3922: checking command to parse $NM output" >&5
3922 if eval "test \"\${lt_cv_sys_global_symbol_pipe+set}\" = set"; then
3923   echo $ac_n "(cached) $ac_c" 1>&6
3924 else
3925   
3926 # These are sane defaults that work on at least a few old systems.
3927 # [They come from Ultrix.  What could be older than Ultrix?!! ;)]
3928
3929 # Character class describing NM global symbol codes.
3930 symcode='[BCDEGRST]'
3931
3932 # Regexp to match symbols that can be accessed directly from C.
3933 sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
3934
3935 # Transform the above into a raw symbol and a C symbol.
3936 symxfrm='\1 \2\3 \3'
3937
3938 # Transform an extracted symbol line into a proper C declaration
3939 lt_cv_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern char \1;/p'"
3940
3941 # Transform an extracted symbol line into symbol name and symbol address
3942 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'"
3943
3944 # Define system-specific variables.
3945 case $host_os in
3946 aix*)
3947   symcode='[BCDT]'
3948   ;;
3949 cygwin* | mingw* | pw32*)
3950   symcode='[ABCDGISTW]'
3951   ;;
3952 hpux*) # Its linker distinguishes data from code symbols
3953   lt_cv_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern char \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
3954   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'"
3955   ;;
3956 irix* | nonstopux*)
3957   symcode='[BCDEGRST]'
3958   ;;
3959 osf*)
3960   symcode='[BCDEGQRST]'
3961   ;;
3962 solaris* | sysv5*)
3963   symcode='[BDT]'
3964   ;;
3965 sysv4)
3966   symcode='[DFNSTU]'
3967   ;;
3968 esac
3969
3970 # Handle CRLF in mingw tool chain
3971 opt_cr=
3972 case $host_os in
3973 mingw*)
3974   opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
3975   ;;
3976 esac
3977
3978 # If we're using GNU nm, then use its standard symbol codes.
3979 if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then
3980   symcode='[ABCDGISTW]'
3981 fi
3982
3983 # Try without a prefix undercore, then with it.
3984 for ac_symprfx in "" "_"; do
3985
3986   # Write the raw and C identifiers.
3987 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[         ]\($symcode$symcode*\)[         ][      ]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'"
3988
3989   # Check to see that the pipe works correctly.
3990   pipe_works=no
3991   rm -f conftest*
3992   cat > conftest.$ac_ext <<EOF
3993 #ifdef __cplusplus
3994 extern "C" {
3995 #endif
3996 char nm_test_var;
3997 void nm_test_func(){}
3998 #ifdef __cplusplus
3999 }
4000 #endif
4001 int main(){nm_test_var='a';nm_test_func();return(0);}
4002 EOF
4003
4004   if { (eval echo configure:4005: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4005     # Now try to grab the symbols.
4006     nlist=conftest.nm
4007     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
4008       # Try sorting and uniquifying the output.
4009       if sort "$nlist" | uniq > "$nlist"T; then
4010         mv -f "$nlist"T "$nlist"
4011       else
4012         rm -f "$nlist"T
4013       fi
4014
4015       # Make sure that we snagged all the symbols we need.
4016       if egrep ' nm_test_var$' "$nlist" >/dev/null; then
4017         if egrep ' nm_test_func$' "$nlist" >/dev/null; then
4018           cat <<EOF > conftest.$ac_ext
4019 #ifdef __cplusplus
4020 extern "C" {
4021 #endif
4022
4023 EOF
4024           # Now generate the symbol file.
4025           eval "$lt_cv_global_symbol_to_cdecl"' < "$nlist" >> conftest.$ac_ext'
4026
4027           cat <<EOF >> conftest.$ac_ext
4028 #if defined (__STDC__) && __STDC__
4029 # define lt_ptr void *
4030 #else
4031 # define lt_ptr char *
4032 # define const
4033 #endif
4034
4035 /* The mapping between symbol names and symbols. */
4036 const struct {
4037   const char *name;
4038   lt_ptr address;
4039 }
4040 lt_preloaded_symbols[] =
4041 {
4042 EOF
4043           sed "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (lt_ptr) \&\2},/" < "$nlist" >> conftest.$ac_ext
4044           cat <<\EOF >> conftest.$ac_ext
4045   {0, (lt_ptr) 0}
4046 };
4047
4048 #ifdef __cplusplus
4049 }
4050 #endif
4051 EOF
4052           # Now try linking the two files.
4053           mv conftest.$ac_objext conftstm.$ac_objext
4054           save_LIBS="$LIBS"
4055           save_CFLAGS="$CFLAGS"
4056           LIBS="conftstm.$ac_objext"
4057           CFLAGS="$CFLAGS$no_builtin_flag"
4058           if { (eval echo configure:4059: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest$ac_exeext; then
4059             pipe_works=yes
4060           fi
4061           LIBS="$save_LIBS"
4062           CFLAGS="$save_CFLAGS"
4063         else
4064           echo "cannot find nm_test_func in $nlist" >&5
4065         fi
4066       else
4067         echo "cannot find nm_test_var in $nlist" >&5
4068       fi
4069     else
4070       echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5
4071     fi
4072   else
4073     echo "$progname: failed program was:" >&5
4074     cat conftest.$ac_ext >&5
4075   fi
4076   rm -f conftest* conftst*
4077
4078   # Do not use the global_symbol_pipe unless it works.
4079   if test "$pipe_works" = yes; then
4080     break
4081   else
4082     lt_cv_sys_global_symbol_pipe=
4083   fi
4084 done
4085
4086 fi
4087
4088 global_symbol_pipe="$lt_cv_sys_global_symbol_pipe"
4089 if test -z "$lt_cv_sys_global_symbol_pipe"; then
4090   global_symbol_to_cdecl=
4091   global_symbol_to_c_name_address=
4092 else
4093   global_symbol_to_cdecl="$lt_cv_global_symbol_to_cdecl"
4094   global_symbol_to_c_name_address="$lt_cv_global_symbol_to_c_name_address"
4095 fi
4096 if test -z "$global_symbol_pipe$global_symbol_to_cdec$global_symbol_to_c_name_address";
4097 then
4098   echo "$ac_t""failed" 1>&6
4099 else
4100   echo "$ac_t""ok" 1>&6
4101 fi
4102
4103 for ac_hdr in dlfcn.h
4104 do
4105 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4106 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4107 echo "configure:4108: checking for $ac_hdr" >&5
4108 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
4109   echo $ac_n "(cached) $ac_c" 1>&6
4110 else
4111   cat > conftest.$ac_ext <<EOF
4112 #line 4113 "configure"
4113 #include "confdefs.h"
4114 #include <$ac_hdr>
4115 EOF
4116 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4117 { (eval echo configure:4118: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4118 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4119 if test -z "$ac_err"; then
4120   rm -rf conftest*
4121   eval "ac_cv_header_$ac_safe=yes"
4122 else
4123   echo "$ac_err" >&5
4124   echo "configure: failed program was:" >&5
4125   cat conftest.$ac_ext >&5
4126   rm -rf conftest*
4127   eval "ac_cv_header_$ac_safe=no"
4128 fi
4129 rm -f conftest*
4130 fi
4131 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4132   echo "$ac_t""yes" 1>&6
4133     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4134   cat >> confdefs.h <<EOF
4135 #define $ac_tr_hdr 1
4136 EOF
4137  
4138 else
4139   echo "$ac_t""no" 1>&6
4140 fi
4141 done
4142
4143
4144
4145
4146
4147
4148 # Only perform the check for file, if the check method requires it
4149 case $deplibs_check_method in
4150 file_magic*)
4151   if test "$file_magic_cmd" = '$MAGIC_CMD'; then
4152     echo $ac_n "checking for ${ac_tool_prefix}file""... $ac_c" 1>&6
4153 echo "configure:4154: checking for ${ac_tool_prefix}file" >&5
4154 if eval "test \"\${lt_cv_path_MAGIC_CMD+set}\" = set"; then
4155   echo $ac_n "(cached) $ac_c" 1>&6
4156 else
4157   case $MAGIC_CMD in
4158   /*)
4159   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
4160   ;;
4161   ?:/*)
4162   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
4163   ;;
4164   *)
4165   ac_save_MAGIC_CMD="$MAGIC_CMD"
4166   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4167   ac_dummy="/usr/bin:$PATH"
4168   for ac_dir in $ac_dummy; do
4169     test -z "$ac_dir" && ac_dir=.
4170     if test -f $ac_dir/${ac_tool_prefix}file; then
4171       lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file"
4172       if test -n "$file_magic_test_file"; then
4173         case $deplibs_check_method in
4174         "file_magic "*)
4175           file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
4176           MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4177           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
4178             egrep "$file_magic_regex" > /dev/null; then
4179             :
4180           else
4181             cat <<EOF 1>&2
4182
4183 *** Warning: the command libtool uses to detect shared libraries,
4184 *** $file_magic_cmd, produces output that libtool cannot recognize.
4185 *** The result is that libtool may fail to recognize shared libraries
4186 *** as such.  This will affect the creation of libtool libraries that
4187 *** depend on shared libraries, but programs linked with such libtool
4188 *** libraries will work regardless of this problem.  Nevertheless, you
4189 *** may want to report the problem to your system manager and/or to
4190 *** bug-libtool@gnu.org
4191
4192 EOF
4193           fi ;;
4194         esac
4195       fi
4196       break
4197     fi
4198   done
4199   IFS="$ac_save_ifs"
4200   MAGIC_CMD="$ac_save_MAGIC_CMD"
4201   ;;
4202 esac
4203 fi
4204
4205 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4206 if test -n "$MAGIC_CMD"; then
4207   echo "$ac_t""$MAGIC_CMD" 1>&6
4208 else
4209   echo "$ac_t""no" 1>&6
4210 fi
4211
4212 if test -z "$lt_cv_path_MAGIC_CMD"; then
4213   if test -n "$ac_tool_prefix"; then
4214     echo $ac_n "checking for file""... $ac_c" 1>&6
4215 echo "configure:4216: checking for file" >&5
4216 if eval "test \"\${lt_cv_path_MAGIC_CMD+set}\" = set"; then
4217   echo $ac_n "(cached) $ac_c" 1>&6
4218 else
4219   case $MAGIC_CMD in
4220   /*)
4221   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
4222   ;;
4223   ?:/*)
4224   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
4225   ;;
4226   *)
4227   ac_save_MAGIC_CMD="$MAGIC_CMD"
4228   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4229   ac_dummy="/usr/bin:$PATH"
4230   for ac_dir in $ac_dummy; do
4231     test -z "$ac_dir" && ac_dir=.
4232     if test -f $ac_dir/file; then
4233       lt_cv_path_MAGIC_CMD="$ac_dir/file"
4234       if test -n "$file_magic_test_file"; then
4235         case $deplibs_check_method in
4236         "file_magic "*)
4237           file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
4238           MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4239           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
4240             egrep "$file_magic_regex" > /dev/null; then
4241             :
4242           else
4243             cat <<EOF 1>&2
4244
4245 *** Warning: the command libtool uses to detect shared libraries,
4246 *** $file_magic_cmd, produces output that libtool cannot recognize.
4247 *** The result is that libtool may fail to recognize shared libraries
4248 *** as such.  This will affect the creation of libtool libraries that
4249 *** depend on shared libraries, but programs linked with such libtool
4250 *** libraries will work regardless of this problem.  Nevertheless, you
4251 *** may want to report the problem to your system manager and/or to
4252 *** bug-libtool@gnu.org
4253
4254 EOF
4255           fi ;;
4256         esac
4257       fi
4258       break
4259     fi
4260   done
4261   IFS="$ac_save_ifs"
4262   MAGIC_CMD="$ac_save_MAGIC_CMD"
4263   ;;
4264 esac
4265 fi
4266
4267 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4268 if test -n "$MAGIC_CMD"; then
4269   echo "$ac_t""$MAGIC_CMD" 1>&6
4270 else
4271   echo "$ac_t""no" 1>&6
4272 fi
4273
4274   else
4275     MAGIC_CMD=:
4276   fi
4277 fi
4278
4279   fi
4280   ;;
4281 esac
4282
4283 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4284 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
4285 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4286 echo "configure:4287: checking for $ac_word" >&5
4287 if eval "test \"\${ac_cv_prog_RANLIB+set}\" = set"; then
4288   echo $ac_n "(cached) $ac_c" 1>&6
4289 else
4290   if test -n "$RANLIB"; then
4291   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4292 else
4293   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4294   ac_dummy="$PATH"
4295   for ac_dir in $ac_dummy; do
4296     test -z "$ac_dir" && ac_dir=.
4297     if test -f $ac_dir/$ac_word; then
4298       ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4299       break
4300     fi
4301   done
4302   IFS="$ac_save_ifs"
4303 fi
4304 fi
4305 RANLIB="$ac_cv_prog_RANLIB"
4306 if test -n "$RANLIB"; then
4307   echo "$ac_t""$RANLIB" 1>&6
4308 else
4309   echo "$ac_t""no" 1>&6
4310 fi
4311
4312
4313 if test -z "$ac_cv_prog_RANLIB"; then
4314 if test -n "$ac_tool_prefix"; then
4315   # Extract the first word of "ranlib", so it can be a program name with args.
4316 set dummy ranlib; ac_word=$2
4317 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4318 echo "configure:4319: checking for $ac_word" >&5
4319 if eval "test \"\${ac_cv_prog_RANLIB+set}\" = set"; then
4320   echo $ac_n "(cached) $ac_c" 1>&6
4321 else
4322   if test -n "$RANLIB"; then
4323   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4324 else
4325   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4326   ac_dummy="$PATH"
4327   for ac_dir in $ac_dummy; do
4328     test -z "$ac_dir" && ac_dir=.
4329     if test -f $ac_dir/$ac_word; then
4330       ac_cv_prog_RANLIB="ranlib"
4331       break
4332     fi
4333   done
4334   IFS="$ac_save_ifs"
4335   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
4336 fi
4337 fi
4338 RANLIB="$ac_cv_prog_RANLIB"
4339 if test -n "$RANLIB"; then
4340   echo "$ac_t""$RANLIB" 1>&6
4341 else
4342   echo "$ac_t""no" 1>&6
4343 fi
4344
4345 else
4346   RANLIB=":"
4347 fi
4348 fi
4349
4350 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
4351 set dummy ${ac_tool_prefix}strip; ac_word=$2
4352 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4353 echo "configure:4354: checking for $ac_word" >&5
4354 if eval "test \"\${ac_cv_prog_STRIP+set}\" = set"; then
4355   echo $ac_n "(cached) $ac_c" 1>&6
4356 else
4357   if test -n "$STRIP"; then
4358   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
4359 else
4360   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4361   ac_dummy="$PATH"
4362   for ac_dir in $ac_dummy; do
4363     test -z "$ac_dir" && ac_dir=.
4364     if test -f $ac_dir/$ac_word; then
4365       ac_cv_prog_STRIP="${ac_tool_prefix}strip"
4366       break
4367     fi
4368   done
4369   IFS="$ac_save_ifs"
4370 fi
4371 fi
4372 STRIP="$ac_cv_prog_STRIP"
4373 if test -n "$STRIP"; then
4374   echo "$ac_t""$STRIP" 1>&6
4375 else
4376   echo "$ac_t""no" 1>&6
4377 fi
4378
4379
4380 if test -z "$ac_cv_prog_STRIP"; then
4381 if test -n "$ac_tool_prefix"; then
4382   # Extract the first word of "strip", so it can be a program name with args.
4383 set dummy strip; ac_word=$2
4384 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4385 echo "configure:4386: checking for $ac_word" >&5
4386 if eval "test \"\${ac_cv_prog_STRIP+set}\" = set"; then
4387   echo $ac_n "(cached) $ac_c" 1>&6
4388 else
4389   if test -n "$STRIP"; then
4390   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
4391 else
4392   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4393   ac_dummy="$PATH"
4394   for ac_dir in $ac_dummy; do
4395     test -z "$ac_dir" && ac_dir=.
4396     if test -f $ac_dir/$ac_word; then
4397       ac_cv_prog_STRIP="strip"
4398       break
4399     fi
4400   done
4401   IFS="$ac_save_ifs"
4402   test -z "$ac_cv_prog_STRIP" && ac_cv_prog_STRIP=":"
4403 fi
4404 fi
4405 STRIP="$ac_cv_prog_STRIP"
4406 if test -n "$STRIP"; then
4407   echo "$ac_t""$STRIP" 1>&6
4408 else
4409   echo "$ac_t""no" 1>&6
4410 fi
4411
4412 else
4413   STRIP=":"
4414 fi
4415 fi
4416
4417
4418 enable_dlopen=yes
4419 enable_win32_dll=yes
4420
4421 # Check whether --enable-libtool-lock or --disable-libtool-lock was given.
4422 if test "${enable_libtool_lock+set}" = set; then
4423   enableval="$enable_libtool_lock"
4424   :
4425 fi
4426
4427 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
4428
4429 # Some flags need to be propagated to the compiler or linker for good
4430 # libtool support.
4431 case $host in
4432 *-*-irix6*)
4433   # Find out which ABI we are using.
4434   echo '#line 4435 "configure"' > conftest.$ac_ext
4435   if { (eval echo configure:4436: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4436     case `/usr/bin/file conftest.$ac_objext` in
4437     *32-bit*)
4438       LD="${LD-ld} -32"
4439       ;;
4440     *N32*)
4441       LD="${LD-ld} -n32"
4442       ;;
4443     *64-bit*)
4444       LD="${LD-ld} -64"
4445       ;;
4446     esac
4447   fi
4448   rm -rf conftest*
4449   ;;
4450
4451 *-*-sco3.2v5*)
4452   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
4453   SAVE_CFLAGS="$CFLAGS"
4454   CFLAGS="$CFLAGS -belf"
4455   echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
4456 echo "configure:4457: checking whether the C compiler needs -belf" >&5
4457 if eval "test \"\${lt_cv_cc_needs_belf+set}\" = set"; then
4458   echo $ac_n "(cached) $ac_c" 1>&6
4459 else
4460   
4461      ac_ext=c
4462 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
4463 ac_cpp='$CPP $CPPFLAGS'
4464 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
4465 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
4466 cross_compiling=$ac_cv_prog_cc_cross
4467
4468      cat > conftest.$ac_ext <<EOF
4469 #line 4470 "configure"
4470 #include "confdefs.h"
4471
4472 int main() {
4473
4474 ; return 0; }
4475 EOF
4476 if { (eval echo configure:4477: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4477   rm -rf conftest*
4478   lt_cv_cc_needs_belf=yes
4479 else
4480   echo "configure: failed program was:" >&5
4481   cat conftest.$ac_ext >&5
4482   rm -rf conftest*
4483   lt_cv_cc_needs_belf=no
4484 fi
4485 rm -f conftest*
4486      ac_ext=c
4487 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
4488 ac_cpp='$CPP $CPPFLAGS'
4489 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
4490 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
4491 cross_compiling=$ac_cv_prog_cc_cross
4492
4493 fi
4494
4495 echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6
4496   if test x"$lt_cv_cc_needs_belf" != x"yes"; then
4497     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
4498     CFLAGS="$SAVE_CFLAGS"
4499   fi
4500   ;;
4501
4502 *-*-cygwin* | *-*-mingw* | *-*-pw32*)
4503   # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
4504 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
4505 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4506 echo "configure:4507: checking for $ac_word" >&5
4507 if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then
4508   echo $ac_n "(cached) $ac_c" 1>&6
4509 else
4510   if test -n "$DLLTOOL"; then
4511   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
4512 else
4513   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4514   ac_dummy="$PATH"
4515   for ac_dir in $ac_dummy; do
4516     test -z "$ac_dir" && ac_dir=.
4517     if test -f $ac_dir/$ac_word; then
4518       ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
4519       break
4520     fi
4521   done
4522   IFS="$ac_save_ifs"
4523 fi
4524 fi
4525 DLLTOOL="$ac_cv_prog_DLLTOOL"
4526 if test -n "$DLLTOOL"; then
4527   echo "$ac_t""$DLLTOOL" 1>&6
4528 else
4529   echo "$ac_t""no" 1>&6
4530 fi
4531
4532
4533 if test -z "$ac_cv_prog_DLLTOOL"; then
4534 if test -n "$ac_tool_prefix"; then
4535   # Extract the first word of "dlltool", so it can be a program name with args.
4536 set dummy dlltool; ac_word=$2
4537 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4538 echo "configure:4539: checking for $ac_word" >&5
4539 if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then
4540   echo $ac_n "(cached) $ac_c" 1>&6
4541 else
4542   if test -n "$DLLTOOL"; then
4543   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
4544 else
4545   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4546   ac_dummy="$PATH"
4547   for ac_dir in $ac_dummy; do
4548     test -z "$ac_dir" && ac_dir=.
4549     if test -f $ac_dir/$ac_word; then
4550       ac_cv_prog_DLLTOOL="dlltool"
4551       break
4552     fi
4553   done
4554   IFS="$ac_save_ifs"
4555   test -z "$ac_cv_prog_DLLTOOL" && ac_cv_prog_DLLTOOL="false"
4556 fi
4557 fi
4558 DLLTOOL="$ac_cv_prog_DLLTOOL"
4559 if test -n "$DLLTOOL"; then
4560   echo "$ac_t""$DLLTOOL" 1>&6
4561 else
4562   echo "$ac_t""no" 1>&6
4563 fi
4564
4565 else
4566   DLLTOOL="false"
4567 fi
4568 fi
4569
4570   # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
4571 set dummy ${ac_tool_prefix}as; ac_word=$2
4572 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4573 echo "configure:4574: checking for $ac_word" >&5
4574 if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then
4575   echo $ac_n "(cached) $ac_c" 1>&6
4576 else
4577   if test -n "$AS"; then
4578   ac_cv_prog_AS="$AS" # Let the user override the test.
4579 else
4580   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4581   ac_dummy="$PATH"
4582   for ac_dir in $ac_dummy; do
4583     test -z "$ac_dir" && ac_dir=.
4584     if test -f $ac_dir/$ac_word; then
4585       ac_cv_prog_AS="${ac_tool_prefix}as"
4586       break
4587     fi
4588   done
4589   IFS="$ac_save_ifs"
4590 fi
4591 fi
4592 AS="$ac_cv_prog_AS"
4593 if test -n "$AS"; then
4594   echo "$ac_t""$AS" 1>&6
4595 else
4596   echo "$ac_t""no" 1>&6
4597 fi
4598
4599
4600 if test -z "$ac_cv_prog_AS"; then
4601 if test -n "$ac_tool_prefix"; then
4602   # Extract the first word of "as", so it can be a program name with args.
4603 set dummy as; ac_word=$2
4604 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4605 echo "configure:4606: checking for $ac_word" >&5
4606 if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then
4607   echo $ac_n "(cached) $ac_c" 1>&6
4608 else
4609   if test -n "$AS"; then
4610   ac_cv_prog_AS="$AS" # Let the user override the test.
4611 else
4612   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4613   ac_dummy="$PATH"
4614   for ac_dir in $ac_dummy; do
4615     test -z "$ac_dir" && ac_dir=.
4616     if test -f $ac_dir/$ac_word; then
4617       ac_cv_prog_AS="as"
4618       break
4619     fi
4620   done
4621   IFS="$ac_save_ifs"
4622   test -z "$ac_cv_prog_AS" && ac_cv_prog_AS="false"
4623 fi
4624 fi
4625 AS="$ac_cv_prog_AS"
4626 if test -n "$AS"; then
4627   echo "$ac_t""$AS" 1>&6
4628 else
4629   echo "$ac_t""no" 1>&6
4630 fi
4631
4632 else
4633   AS="false"
4634 fi
4635 fi
4636
4637   # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
4638 set dummy ${ac_tool_prefix}objdump; ac_word=$2
4639 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4640 echo "configure:4641: checking for $ac_word" >&5
4641 if eval "test \"\${ac_cv_prog_OBJDUMP+set}\" = set"; then
4642   echo $ac_n "(cached) $ac_c" 1>&6
4643 else
4644   if test -n "$OBJDUMP"; then
4645   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
4646 else
4647   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4648   ac_dummy="$PATH"
4649   for ac_dir in $ac_dummy; do
4650     test -z "$ac_dir" && ac_dir=.
4651     if test -f $ac_dir/$ac_word; then
4652       ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
4653       break
4654     fi
4655   done
4656   IFS="$ac_save_ifs"
4657 fi
4658 fi
4659 OBJDUMP="$ac_cv_prog_OBJDUMP"
4660 if test -n "$OBJDUMP"; then
4661   echo "$ac_t""$OBJDUMP" 1>&6
4662 else
4663   echo "$ac_t""no" 1>&6
4664 fi
4665
4666
4667 if test -z "$ac_cv_prog_OBJDUMP"; then
4668 if test -n "$ac_tool_prefix"; then
4669   # Extract the first word of "objdump", so it can be a program name with args.
4670 set dummy objdump; ac_word=$2
4671 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4672 echo "configure:4673: checking for $ac_word" >&5
4673 if eval "test \"\${ac_cv_prog_OBJDUMP+set}\" = set"; then
4674   echo $ac_n "(cached) $ac_c" 1>&6
4675 else
4676   if test -n "$OBJDUMP"; then
4677   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
4678 else
4679   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4680   ac_dummy="$PATH"
4681   for ac_dir in $ac_dummy; do
4682     test -z "$ac_dir" && ac_dir=.
4683     if test -f $ac_dir/$ac_word; then
4684       ac_cv_prog_OBJDUMP="objdump"
4685       break
4686     fi
4687   done
4688   IFS="$ac_save_ifs"
4689   test -z "$ac_cv_prog_OBJDUMP" && ac_cv_prog_OBJDUMP="false"
4690 fi
4691 fi
4692 OBJDUMP="$ac_cv_prog_OBJDUMP"
4693 if test -n "$OBJDUMP"; then
4694   echo "$ac_t""$OBJDUMP" 1>&6
4695 else
4696   echo "$ac_t""no" 1>&6
4697 fi
4698
4699 else
4700   OBJDUMP="false"
4701 fi
4702 fi
4703
4704
4705   # recent cygwin and mingw systems supply a stub DllMain which the user
4706   # can override, but on older systems we have to supply one
4707   echo $ac_n "checking if libtool should supply DllMain function""... $ac_c" 1>&6
4708 echo "configure:4709: checking if libtool should supply DllMain function" >&5
4709 if eval "test \"\${lt_cv_need_dllmain+set}\" = set"; then
4710   echo $ac_n "(cached) $ac_c" 1>&6
4711 else
4712   cat > conftest.$ac_ext <<EOF
4713 #line 4714 "configure"
4714 #include "confdefs.h"
4715
4716 int main() {
4717 extern int __attribute__((__stdcall__)) DllMain(void*, int, void*);
4718       DllMain (0, 0, 0);
4719 ; return 0; }
4720 EOF
4721 if { (eval echo configure:4722: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4722   rm -rf conftest*
4723   lt_cv_need_dllmain=no
4724 else
4725   echo "configure: failed program was:" >&5
4726   cat conftest.$ac_ext >&5
4727   rm -rf conftest*
4728   lt_cv_need_dllmain=yes
4729 fi
4730 rm -f conftest*
4731 fi
4732
4733 echo "$ac_t""$lt_cv_need_dllmain" 1>&6
4734
4735   case $host/$CC in
4736   *-*-cygwin*/gcc*-mno-cygwin*|*-*-mingw*)
4737     # old mingw systems require "-dll" to link a DLL, while more recent ones
4738     # require "-mdll"
4739     SAVE_CFLAGS="$CFLAGS"
4740     CFLAGS="$CFLAGS -mdll"
4741     echo $ac_n "checking how to link DLLs""... $ac_c" 1>&6
4742 echo "configure:4743: checking how to link DLLs" >&5
4743 if eval "test \"\${lt_cv_cc_dll_switch+set}\" = set"; then
4744   echo $ac_n "(cached) $ac_c" 1>&6
4745 else
4746   cat > conftest.$ac_ext <<EOF
4747 #line 4748 "configure"
4748 #include "confdefs.h"
4749
4750 int main() {
4751
4752 ; return 0; }
4753 EOF
4754 if { (eval echo configure:4755: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4755   rm -rf conftest*
4756   lt_cv_cc_dll_switch=-mdll
4757 else
4758   echo "configure: failed program was:" >&5
4759   cat conftest.$ac_ext >&5
4760   rm -rf conftest*
4761   lt_cv_cc_dll_switch=-dll
4762 fi
4763 rm -f conftest*
4764 fi
4765
4766 echo "$ac_t""$lt_cv_cc_dll_switch" 1>&6
4767     CFLAGS="$SAVE_CFLAGS" ;;
4768   *-*-cygwin* | *-*-pw32*)
4769     # cygwin systems need to pass --dll to the linker, and not link
4770     # crt.o which will require a WinMain@16 definition.
4771     lt_cv_cc_dll_switch="-Wl,--dll -nostartfiles" ;;
4772   esac
4773   ;;
4774   
4775 esac
4776
4777 # Sed substitution that helps us do robust quoting.  It backslashifies
4778 # metacharacters that are still active within double-quoted strings.
4779 Xsed='sed -e s/^X//'
4780 sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g'
4781
4782 # Same as above, but do not quote variable references.
4783 double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g'
4784
4785 # Sed substitution to delay expansion of an escaped shell variable in a
4786 # double_quote_subst'ed string.
4787 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
4788
4789 # Constants:
4790 rm="rm -f"
4791
4792 # Global variables:
4793 default_ofile=libtool
4794 can_build_shared=yes
4795
4796 # All known linkers require a `.a' archive for static linking (except M$VC,
4797 # which needs '.lib').
4798 libext=a
4799 ltmain="$ac_aux_dir/ltmain.sh"
4800 ofile="$default_ofile"
4801 with_gnu_ld="$lt_cv_prog_gnu_ld"
4802 need_locks="$enable_libtool_lock"
4803
4804 old_CC="$CC"
4805 old_CFLAGS="$CFLAGS"
4806
4807 # Set sane defaults for various variables
4808 test -z "$AR" && AR=ar
4809 test -z "$AR_FLAGS" && AR_FLAGS=cru
4810 test -z "$AS" && AS=as
4811 test -z "$CC" && CC=cc
4812 test -z "$DLLTOOL" && DLLTOOL=dlltool
4813 test -z "$LD" && LD=ld
4814 test -z "$LN_S" && LN_S="ln -s"
4815 test -z "$MAGIC_CMD" && MAGIC_CMD=file
4816 test -z "$NM" && NM=nm
4817 test -z "$OBJDUMP" && OBJDUMP=objdump
4818 test -z "$RANLIB" && RANLIB=:
4819 test -z "$STRIP" && STRIP=:
4820 test -z "$ac_objext" && ac_objext=o
4821
4822 if test x"$host" != x"$build"; then
4823   ac_tool_prefix=${host_alias}-
4824 else
4825   ac_tool_prefix=
4826 fi
4827
4828 # Transform linux* to *-*-linux-gnu*, to support old configure scripts.
4829 case $host_os in
4830 linux-gnu*) ;;
4831 linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
4832 esac
4833
4834 case $host_os in
4835 aix3*)
4836   # AIX sometimes has problems with the GCC collect2 program.  For some
4837   # reason, if we set the COLLECT_NAMES environment variable, the problems
4838   # vanish in a puff of smoke.
4839   if test "X${COLLECT_NAMES+set}" != Xset; then
4840     COLLECT_NAMES=
4841     export COLLECT_NAMES
4842   fi
4843   ;;
4844 esac
4845
4846 # Determine commands to create old-style static archives.
4847 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
4848 old_postinstall_cmds='chmod 644 $oldlib'
4849 old_postuninstall_cmds=
4850
4851 if test -n "$RANLIB"; then
4852   case $host_os in
4853   openbsd*)
4854     old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds"
4855     ;;
4856   *)
4857     old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
4858     ;;
4859   esac
4860   old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
4861 fi
4862
4863 # Allow CC to be a program name with arguments.
4864 set dummy $CC
4865 compiler="$2"
4866
4867 echo $ac_n "checking for objdir""... $ac_c" 1>&6
4868 echo "configure:4869: checking for objdir" >&5
4869 rm -f .libs 2>/dev/null
4870 mkdir .libs 2>/dev/null
4871 if test -d .libs; then
4872   objdir=.libs
4873 else
4874   # MS-DOS does not allow filenames that begin with a dot.
4875   objdir=_libs
4876 fi
4877 rmdir .libs 2>/dev/null
4878 echo "$ac_t""$objdir" 1>&6
4879
4880
4881 # Check whether --with-pic or --without-pic was given.
4882 if test "${with_pic+set}" = set; then
4883   withval="$with_pic"
4884   pic_mode="$withval"
4885 else
4886   pic_mode=default
4887 fi
4888
4889 test -z "$pic_mode" && pic_mode=default
4890
4891 # We assume here that the value for lt_cv_prog_cc_pic will not be cached
4892 # in isolation, and that seeing it set (from the cache) indicates that
4893 # the associated values are set (in the cache) correctly too.
4894 echo $ac_n "checking for $compiler option to produce PIC""... $ac_c" 1>&6
4895 echo "configure:4896: checking for $compiler option to produce PIC" >&5
4896 if eval "test \"\${lt_cv_prog_cc_pic+set}\" = set"; then
4897   echo $ac_n "(cached) $ac_c" 1>&6
4898 else
4899    lt_cv_prog_cc_pic=
4900   lt_cv_prog_cc_shlib=
4901   lt_cv_prog_cc_wl=
4902   lt_cv_prog_cc_static=
4903   lt_cv_prog_cc_no_builtin=
4904   lt_cv_prog_cc_can_build_shared=$can_build_shared
4905
4906   if test "$GCC" = yes; then
4907     lt_cv_prog_cc_wl='-Wl,'
4908     lt_cv_prog_cc_static='-static'
4909
4910     case $host_os in
4911     aix*)
4912       # Below there is a dirty hack to force normal static linking with -ldl
4913       # The problem is because libdl dynamically linked with both libc and
4914       # libC (AIX C++ library), which obviously doesn't included in libraries
4915       # list by gcc. This cause undefined symbols with -static flags.
4916       # This hack allows C programs to be linked with "-static -ldl", but
4917       # not sure about C++ programs.
4918       lt_cv_prog_cc_static="$lt_cv_prog_cc_static ${lt_cv_prog_cc_wl}-lC"
4919       ;;
4920     amigaos*)
4921       # FIXME: we need at least 68020 code to build shared libraries, but
4922       # adding the `-m68020' flag to GCC prevents building anything better,
4923       # like `-m68040'.
4924       lt_cv_prog_cc_pic='-m68020 -resident32 -malways-restore-a4'
4925       ;;
4926     beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
4927       # PIC is the default for these OSes.
4928       ;;
4929     darwin* | rhapsody*)
4930       # PIC is the default on this platform
4931       # Common symbols not allowed in MH_DYLIB files
4932       lt_cv_prog_cc_pic='-fno-common'
4933       ;;
4934     cygwin* | mingw* | pw32* | os2*)
4935       # This hack is so that the source file can tell whether it is being
4936       # built for inclusion in a dll (and should export symbols for example).
4937       lt_cv_prog_cc_pic='-DDLL_EXPORT'
4938       ;;
4939     sysv4*MP*)
4940       if test -d /usr/nec; then
4941          lt_cv_prog_cc_pic=-Kconform_pic
4942       fi
4943       ;;
4944     *)
4945       lt_cv_prog_cc_pic='-fPIC'
4946       ;;
4947     esac
4948   else
4949     # PORTME Check for PIC flags for the system compiler.
4950     case $host_os in
4951     aix3* | aix4* | aix5*)
4952       lt_cv_prog_cc_wl='-Wl,'
4953       # All AIX code is PIC.
4954       if test "$host_cpu" = ia64; then
4955         # AIX 5 now supports IA64 processor
4956         lt_cv_prog_cc_static='-Bstatic'
4957       else
4958         lt_cv_prog_cc_static='-bnso -bI:/lib/syscalls.exp'
4959       fi
4960       ;;
4961
4962     hpux9* | hpux10* | hpux11*)
4963       # Is there a better lt_cv_prog_cc_static that works with the bundled CC?
4964       lt_cv_prog_cc_wl='-Wl,'
4965       lt_cv_prog_cc_static="${lt_cv_prog_cc_wl}-a ${lt_cv_prog_cc_wl}archive"
4966       lt_cv_prog_cc_pic='+Z'
4967       ;;
4968
4969     irix5* | irix6* | nonstopux*)
4970       lt_cv_prog_cc_wl='-Wl,'
4971       lt_cv_prog_cc_static='-non_shared'
4972       # PIC (with -KPIC) is the default.
4973       ;;
4974
4975     cygwin* | mingw* | pw32* | os2*)
4976       # This hack is so that the source file can tell whether it is being
4977       # built for inclusion in a dll (and should export symbols for example).
4978       lt_cv_prog_cc_pic='-DDLL_EXPORT'
4979       ;;
4980
4981     newsos6)
4982       lt_cv_prog_cc_pic='-KPIC'
4983       lt_cv_prog_cc_static='-Bstatic'
4984       ;;
4985     
4986     openedition)
4987       # XPLINK code is PIC by default
4988       ;;
4989
4990     osf3* | osf4* | osf5*)
4991       # All OSF/1 code is PIC.
4992       lt_cv_prog_cc_wl='-Wl,'
4993       lt_cv_prog_cc_static='-non_shared'
4994       ;;
4995
4996     sco3.2v5*)
4997       lt_cv_prog_cc_pic='-Kpic'
4998       lt_cv_prog_cc_static='-dn'
4999       lt_cv_prog_cc_shlib='-belf'
5000       ;;
5001
5002     solaris*)
5003       lt_cv_prog_cc_pic='-KPIC'
5004       lt_cv_prog_cc_static='-Bstatic'
5005       lt_cv_prog_cc_wl='-Wl,'
5006       ;;
5007
5008     sunos4*)
5009       lt_cv_prog_cc_pic='-PIC'
5010       lt_cv_prog_cc_static='-Bstatic'
5011       lt_cv_prog_cc_wl='-Qoption ld '
5012       ;;
5013
5014     sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
5015       lt_cv_prog_cc_pic='-KPIC'
5016       lt_cv_prog_cc_static='-Bstatic'
5017       lt_cv_prog_cc_wl='-Wl,'
5018       ;;
5019
5020     uts4*)
5021       lt_cv_prog_cc_pic='-pic'
5022       lt_cv_prog_cc_static='-Bstatic'
5023       ;;
5024
5025     sysv4*MP*)
5026       if test -d /usr/nec ;then
5027         lt_cv_prog_cc_pic='-Kconform_pic'
5028         lt_cv_prog_cc_static='-Bstatic'
5029       fi
5030       ;;
5031
5032     *)
5033       lt_cv_prog_cc_can_build_shared=no
5034       ;;
5035     esac
5036   fi
5037
5038 fi
5039
5040 if test -z "$lt_cv_prog_cc_pic"; then
5041   echo "$ac_t""none" 1>&6
5042 else
5043   echo "$ac_t""$lt_cv_prog_cc_pic" 1>&6
5044
5045   # Check to make sure the pic_flag actually works.
5046   echo $ac_n "checking if $compiler PIC flag $lt_cv_prog_cc_pic works""... $ac_c" 1>&6
5047 echo "configure:5048: checking if $compiler PIC flag $lt_cv_prog_cc_pic works" >&5
5048   if eval "test \"\${lt_cv_prog_cc_pic_works+set}\" = set"; then
5049   echo $ac_n "(cached) $ac_c" 1>&6
5050 else
5051       save_CFLAGS="$CFLAGS"
5052     CFLAGS="$CFLAGS $lt_cv_prog_cc_pic -DPIC"
5053     cat > conftest.$ac_ext <<EOF
5054 #line 5055 "configure"
5055 #include "confdefs.h"
5056
5057 int main() {
5058
5059 ; return 0; }
5060 EOF
5061 if { (eval echo configure:5062: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5062   rm -rf conftest*
5063         case $host_os in
5064       hpux9* | hpux10* | hpux11*)
5065         # On HP-UX, both CC and GCC only warn that PIC is supported... then
5066         # they create non-PIC objects.  So, if there were any warnings, we
5067         # assume that PIC is not supported.
5068         if test -s conftest.err; then
5069           lt_cv_prog_cc_pic_works=no
5070         else
5071           lt_cv_prog_cc_pic_works=yes
5072         fi
5073         ;;
5074       *)
5075         lt_cv_prog_cc_pic_works=yes
5076         ;;
5077       esac
5078     
5079 else
5080   echo "configure: failed program was:" >&5
5081   cat conftest.$ac_ext >&5
5082   rm -rf conftest*
5083         lt_cv_prog_cc_pic_works=no
5084     
5085 fi
5086 rm -f conftest*
5087     CFLAGS="$save_CFLAGS"
5088   
5089 fi
5090
5091
5092   if test "X$lt_cv_prog_cc_pic_works" = Xno; then
5093     lt_cv_prog_cc_pic=
5094     lt_cv_prog_cc_can_build_shared=no
5095   else
5096     lt_cv_prog_cc_pic=" $lt_cv_prog_cc_pic"
5097   fi
5098
5099   echo "$ac_t""$lt_cv_prog_cc_pic_works" 1>&6
5100 fi
5101
5102 # Check for any special shared library compilation flags.
5103 if test -n "$lt_cv_prog_cc_shlib"; then
5104   echo "configure: warning: \`$CC' requires \`$lt_cv_prog_cc_shlib' to build shared libraries" 1>&2
5105   if echo "$old_CC $old_CFLAGS " | egrep -e "[  ]$lt_cv_prog_cc_shlib[  ]" >/dev/null; then :
5106   else
5107    echo "configure: warning: add \`$lt_cv_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure" 1>&2
5108     lt_cv_prog_cc_can_build_shared=no
5109   fi
5110 fi
5111
5112 echo $ac_n "checking if $compiler static flag $lt_cv_prog_cc_static works""... $ac_c" 1>&6
5113 echo "configure:5114: checking if $compiler static flag $lt_cv_prog_cc_static works" >&5
5114 if eval "test \"\${lt_cv_prog_cc_static_works+set}\" = set"; then
5115   echo $ac_n "(cached) $ac_c" 1>&6
5116 else
5117     lt_cv_prog_cc_static_works=no
5118   save_LDFLAGS="$LDFLAGS"
5119   LDFLAGS="$LDFLAGS $lt_cv_prog_cc_static"
5120   cat > conftest.$ac_ext <<EOF
5121 #line 5122 "configure"
5122 #include "confdefs.h"
5123
5124 int main() {
5125
5126 ; return 0; }
5127 EOF
5128 if { (eval echo configure:5129: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5129   rm -rf conftest*
5130   lt_cv_prog_cc_static_works=yes
5131 else
5132   echo "configure: failed program was:" >&5
5133   cat conftest.$ac_ext >&5
5134 fi
5135 rm -f conftest*
5136   LDFLAGS="$save_LDFLAGS"
5137
5138 fi
5139
5140
5141 # Belt *and* braces to stop my trousers falling down:
5142 test "X$lt_cv_prog_cc_static_works" = Xno && lt_cv_prog_cc_static=
5143 echo "$ac_t""$lt_cv_prog_cc_static_works" 1>&6
5144
5145 pic_flag="$lt_cv_prog_cc_pic"
5146 special_shlib_compile_flags="$lt_cv_prog_cc_shlib"
5147 wl="$lt_cv_prog_cc_wl"
5148 link_static_flag="$lt_cv_prog_cc_static"
5149 no_builtin_flag="$lt_cv_prog_cc_no_builtin"
5150 can_build_shared="$lt_cv_prog_cc_can_build_shared"
5151
5152
5153 # Check to see if options -o and -c are simultaneously supported by compiler
5154 echo $ac_n "checking if $compiler supports -c -o file.$ac_objext""... $ac_c" 1>&6
5155 echo "configure:5156: checking if $compiler supports -c -o file.$ac_objext" >&5
5156 if eval "test \"\${lt_cv_compiler_c_o+set}\" = set"; then
5157   echo $ac_n "(cached) $ac_c" 1>&6
5158 else
5159   
5160 $rm -r conftest 2>/dev/null
5161 mkdir conftest
5162 cd conftest
5163 echo "int some_variable = 0;" > conftest.$ac_ext
5164 mkdir out
5165 # According to Tom Tromey, Ian Lance Taylor reported there are C compilers
5166 # that will create temporary files in the current directory regardless of
5167 # the output directory.  Thus, making CWD read-only will cause this test
5168 # to fail, enabling locking or at least warning the user not to do parallel
5169 # builds.
5170 chmod -w .
5171 save_CFLAGS="$CFLAGS"
5172 CFLAGS="$CFLAGS -o out/conftest2.$ac_objext"
5173 compiler_c_o=no
5174 if { (eval echo configure:5175: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then
5175   # The compiler can only warn and ignore the option if not recognized
5176   # So say no if there are warnings
5177   if test -s out/conftest.err; then
5178     lt_cv_compiler_c_o=no
5179   else
5180     lt_cv_compiler_c_o=yes
5181   fi
5182 else
5183   # Append any errors to the config.log.
5184   cat out/conftest.err 1>&5
5185   lt_cv_compiler_c_o=no
5186 fi
5187 CFLAGS="$save_CFLAGS"
5188 chmod u+w .
5189 $rm conftest* out/*
5190 rmdir out
5191 cd ..
5192 rmdir conftest
5193 $rm -r conftest 2>/dev/null
5194
5195 fi
5196
5197 compiler_c_o=$lt_cv_compiler_c_o
5198 echo "$ac_t""$compiler_c_o" 1>&6
5199
5200 if test x"$compiler_c_o" = x"yes"; then
5201   # Check to see if we can write to a .lo
5202   echo $ac_n "checking if $compiler supports -c -o file.lo""... $ac_c" 1>&6
5203 echo "configure:5204: checking if $compiler supports -c -o file.lo" >&5
5204   if eval "test \"\${lt_cv_compiler_o_lo+set}\" = set"; then
5205   echo $ac_n "(cached) $ac_c" 1>&6
5206 else
5207   
5208   lt_cv_compiler_o_lo=no
5209   save_CFLAGS="$CFLAGS"
5210   CFLAGS="$CFLAGS -c -o conftest.lo"
5211   save_objext="$ac_objext"
5212   ac_objext=lo
5213   cat > conftest.$ac_ext <<EOF
5214 #line 5215 "configure"
5215 #include "confdefs.h"
5216
5217 int main() {
5218 int some_variable = 0;
5219 ; return 0; }
5220 EOF
5221 if { (eval echo configure:5222: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5222   rm -rf conftest*
5223       # The compiler can only warn and ignore the option if not recognized
5224     # So say no if there are warnings
5225     if test -s conftest.err; then
5226       lt_cv_compiler_o_lo=no
5227     else
5228       lt_cv_compiler_o_lo=yes
5229     fi
5230   
5231 else
5232   echo "configure: failed program was:" >&5
5233   cat conftest.$ac_ext >&5
5234 fi
5235 rm -f conftest*
5236   ac_objext="$save_objext"
5237   CFLAGS="$save_CFLAGS"
5238   
5239 fi
5240
5241   compiler_o_lo=$lt_cv_compiler_o_lo
5242   echo "$ac_t""$compiler_o_lo" 1>&6
5243 else
5244   compiler_o_lo=no
5245 fi
5246
5247 # Check to see if we can do hard links to lock some files if needed
5248 hard_links="nottested"
5249 if test "$compiler_c_o" = no && test "$need_locks" != no; then
5250   # do not overwrite the value of need_locks provided by the user
5251   echo $ac_n "checking if we can lock with hard links""... $ac_c" 1>&6
5252 echo "configure:5253: checking if we can lock with hard links" >&5
5253   hard_links=yes
5254   $rm conftest*
5255   ln conftest.a conftest.b 2>/dev/null && hard_links=no
5256   touch conftest.a
5257   ln conftest.a conftest.b 2>&5 || hard_links=no
5258   ln conftest.a conftest.b 2>/dev/null && hard_links=no
5259   echo "$ac_t""$hard_links" 1>&6
5260   if test "$hard_links" = no; then
5261     echo "configure: warning: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" 1>&2
5262     need_locks=warn
5263   fi
5264 else
5265   need_locks=no
5266 fi
5267
5268 if test "$GCC" = yes; then
5269   # Check to see if options -fno-rtti -fno-exceptions are supported by compiler
5270   echo $ac_n "checking if $compiler supports -fno-rtti -fno-exceptions""... $ac_c" 1>&6
5271 echo "configure:5272: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
5272   echo "int some_variable = 0;" > conftest.$ac_ext
5273   save_CFLAGS="$CFLAGS"
5274   CFLAGS="$CFLAGS -fno-rtti -fno-exceptions -c conftest.$ac_ext"
5275   compiler_rtti_exceptions=no
5276   cat > conftest.$ac_ext <<EOF
5277 #line 5278 "configure"
5278 #include "confdefs.h"
5279
5280 int main() {
5281 int some_variable = 0;
5282 ; return 0; }
5283 EOF
5284 if { (eval echo configure:5285: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5285   rm -rf conftest*
5286       # The compiler can only warn and ignore the option if not recognized
5287     # So say no if there are warnings
5288     if test -s conftest.err; then
5289       compiler_rtti_exceptions=no
5290     else
5291       compiler_rtti_exceptions=yes
5292     fi
5293   
5294 else
5295   echo "configure: failed program was:" >&5
5296   cat conftest.$ac_ext >&5
5297 fi
5298 rm -f conftest*
5299   CFLAGS="$save_CFLAGS"
5300   echo "$ac_t""$compiler_rtti_exceptions" 1>&6
5301
5302   if test "$compiler_rtti_exceptions" = "yes"; then
5303     no_builtin_flag=' -fno-builtin -fno-rtti -fno-exceptions'
5304   else
5305     no_builtin_flag=' -fno-builtin'
5306   fi
5307 fi
5308
5309 # See if the linker supports building shared libraries.
5310 echo $ac_n "checking whether the linker ($LD) supports shared libraries""... $ac_c" 1>&6
5311 echo "configure:5312: checking whether the linker ($LD) supports shared libraries" >&5
5312
5313 allow_undefined_flag=
5314 no_undefined_flag=
5315 need_lib_prefix=unknown
5316 need_version=unknown
5317 # when you set need_version to no, make sure it does not cause -set_version
5318 # flags to be left without arguments
5319 archive_cmds=
5320 archive_expsym_cmds=
5321 old_archive_from_new_cmds=
5322 old_archive_from_expsyms_cmds=
5323 export_dynamic_flag_spec=
5324 whole_archive_flag_spec=
5325 thread_safe_flag_spec=
5326 hardcode_into_libs=no
5327 hardcode_libdir_flag_spec=
5328 hardcode_libdir_separator=
5329 hardcode_direct=no
5330 hardcode_minus_L=no
5331 hardcode_shlibpath_var=unsupported
5332 runpath_var=
5333 link_all_deplibs=unknown
5334 always_export_symbols=no
5335 export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols'
5336 # include_expsyms should be a list of space-separated symbols to be *always*
5337 # included in the symbol list
5338 include_expsyms=
5339 # exclude_expsyms can be an egrep regular expression of symbols to exclude
5340 # it will be wrapped by ` (' and `)$', so one must not match beginning or
5341 # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
5342 # as well as any symbol that contains `d'.
5343 exclude_expsyms="_GLOBAL_OFFSET_TABLE_"
5344 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
5345 # platforms (ab)use it in PIC code, but their linkers get confused if
5346 # the symbol is explicitly referenced.  Since portable code cannot
5347 # rely on this symbol name, it's probably fine to never include it in
5348 # preloaded symbol tables.
5349 extract_expsyms_cmds=
5350
5351 case $host_os in
5352 cygwin* | mingw* | pw32*)
5353   # FIXME: the MSVC++ port hasn't been tested in a loooong time
5354   # When not using gcc, we currently assume that we are using
5355   # Microsoft Visual C++.
5356   if test "$GCC" != yes; then
5357     with_gnu_ld=no
5358   fi
5359   ;;
5360 openbsd*)
5361   with_gnu_ld=no
5362   ;;
5363 esac
5364
5365 ld_shlibs=yes
5366 if test "$with_gnu_ld" = yes; then
5367   # If archive_cmds runs LD, not CC, wlarc should be empty
5368   wlarc='${wl}'
5369
5370   # See if GNU ld supports shared libraries.
5371   case $host_os in
5372   aix3* | aix4* | aix5*)
5373     # On AIX, the GNU linker is very broken
5374     # Note:Check GNU linker on AIX 5-IA64 when/if it becomes available.
5375     ld_shlibs=no
5376     cat <<EOF 1>&2
5377
5378 *** Warning: the GNU linker, at least up to release 2.9.1, is reported
5379 *** to be unable to reliably create shared libraries on AIX.
5380 *** Therefore, libtool is disabling shared libraries support.  If you
5381 *** really care for shared libraries, you may want to modify your PATH
5382 *** so that a non-GNU linker is found, and then restart.
5383
5384 EOF
5385     ;;
5386
5387   amigaos*)
5388     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)'
5389     hardcode_libdir_flag_spec='-L$libdir'
5390     hardcode_minus_L=yes
5391
5392     # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
5393     # that the semantics of dynamic libraries on AmigaOS, at least up
5394     # to version 4, is to share data among multiple programs linked
5395     # with the same dynamic library.  Since this doesn't match the
5396     # behavior of shared libraries on other platforms, we can use
5397     # them.
5398     ld_shlibs=no
5399     ;;
5400
5401   beos*)
5402     if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
5403       allow_undefined_flag=unsupported
5404       # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
5405       # support --undefined.  This deserves some investigation.  FIXME
5406       archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5407     else
5408       ld_shlibs=no
5409     fi
5410     ;;
5411
5412   cygwin* | mingw* | pw32*)
5413     # hardcode_libdir_flag_spec is actually meaningless, as there is
5414     # no search path for DLLs.
5415     hardcode_libdir_flag_spec='-L$libdir'
5416     allow_undefined_flag=unsupported
5417     always_export_symbols=yes
5418
5419     extract_expsyms_cmds='test -f $output_objdir/impgen.c || \
5420       sed -e "/^# \/\* impgen\.c starts here \*\//,/^# \/\* impgen.c ends here \*\// { s/^# //;s/^# *$//; p; }" -e d < $''0 > $output_objdir/impgen.c~
5421       test -f $output_objdir/impgen.exe || (cd $output_objdir && \
5422       if test "x$HOST_CC" != "x" ; then $HOST_CC -o impgen impgen.c ; \
5423       else $CC -o impgen impgen.c ; fi)~
5424       $output_objdir/impgen $dir/$soroot > $output_objdir/$soname-def'
5425
5426     old_archive_from_expsyms_cmds='$DLLTOOL --as=$AS --dllname $soname --def $output_objdir/$soname-def --output-lib $output_objdir/$newlib'
5427
5428     # cygwin and mingw dlls have different entry points and sets of symbols
5429     # to exclude.
5430     # FIXME: what about values for MSVC?
5431     dll_entry=__cygwin_dll_entry@12
5432     dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12~
5433     case $host_os in
5434     mingw*)
5435       # mingw values
5436       dll_entry=_DllMainCRTStartup@12
5437       dll_exclude_symbols=DllMain@12,DllMainCRTStartup@12,DllEntryPoint@12~
5438       ;;
5439     esac
5440
5441     # mingw and cygwin differ, and it's simplest to just exclude the union
5442     # of the two symbol sets.
5443     dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12,DllMainCRTStartup@12,DllEntryPoint@12
5444
5445     # recent cygwin and mingw systems supply a stub DllMain which the user
5446     # can override, but on older systems we have to supply one (in ltdll.c)
5447     if test "x$lt_cv_need_dllmain" = "xyes"; then
5448       ltdll_obj='$output_objdir/$soname-ltdll.'"$ac_objext "
5449       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~
5450         test -f $output_objdir/$soname-ltdll.$ac_objext || (cd $output_objdir && $CC -c $soname-ltdll.c)~'
5451     else
5452       ltdll_obj=
5453       ltdll_cmds=
5454     fi
5455
5456     # Extract the symbol export list from an `--export-all' def file,
5457     # then regenerate the def file from the symbol export list, so that
5458     # the compiled dll only exports the symbol export list.
5459     # Be careful not to strip the DATA tag left be newer dlltools.
5460     export_symbols_cmds="$ltdll_cmds"'
5461       $DLLTOOL --export-all --exclude-symbols '$dll_exclude_symbols' --output-def $output_objdir/$soname-def '$ltdll_obj'$libobjs $convenience~
5462       sed -e "1,/EXPORTS/d" -e "s/ @ [0-9]*//" -e "s/ *;.*$//" < $output_objdir/$soname-def > $export_symbols'
5463
5464     # If the export-symbols file already is a .def file (1st line
5465     # is EXPORTS), use it as is.
5466     # If DATA tags from a recent dlltool are present, honour them!
5467     archive_expsym_cmds='if test "x`sed 1q $export_symbols`" = xEXPORTS; then
5468         cp $export_symbols $output_objdir/$soname-def;
5469       else
5470         echo EXPORTS > $output_objdir/$soname-def;
5471         _lt_hint=1;
5472         cat $export_symbols | while read symbol; do
5473          set dummy \$symbol;
5474          case \$# in
5475            2) echo "   \$2 @ \$_lt_hint ; " >> $output_objdir/$soname-def;;
5476            4) echo "   \$2 \$3 \$4 ; " >> $output_objdir/$soname-def; _lt_hint=`expr \$_lt_hint - 1`;;
5477            *) echo "     \$2 @ \$_lt_hint \$3 ; " >> $output_objdir/$soname-def;;
5478          esac;
5479          _lt_hint=`expr 1 + \$_lt_hint`;
5480         done;
5481       fi~
5482       '"$ltdll_cmds"'
5483       $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~
5484       $DLLTOOL --as=$AS --dllname $soname --exclude-symbols '$dll_exclude_symbols' --def $output_objdir/$soname-def --base-file $output_objdir/$soname-base --output-exp $output_objdir/$soname-exp~
5485       $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~
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 --output-lib $output_objdir/$libname.dll.a~
5487       $CC $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags'
5488     ;;
5489
5490   netbsd*)
5491     if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
5492       archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
5493       wlarc=
5494     else
5495       archive_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5496       archive_expsym_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5497     fi
5498     ;;
5499
5500   solaris* | sysv5*)
5501     if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then
5502       ld_shlibs=no
5503       cat <<EOF 1>&2
5504
5505 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
5506 *** create shared libraries on Solaris systems.  Therefore, libtool
5507 *** is disabling shared libraries support.  We urge you to upgrade GNU
5508 *** binutils to release 2.9.1 or newer.  Another option is to modify
5509 *** your PATH or compiler configuration so that the native linker is
5510 *** used, and then restart.
5511
5512 EOF
5513     elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
5514       archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5515       archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5516     else
5517       ld_shlibs=no
5518     fi
5519     ;;
5520
5521   sunos4*)
5522     archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5523     wlarc=
5524     hardcode_direct=yes
5525     hardcode_shlibpath_var=no
5526     ;;
5527
5528   *)
5529     if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
5530       archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5531       archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5532     else
5533       ld_shlibs=no
5534     fi
5535     ;;
5536   esac
5537
5538   if test "$ld_shlibs" = yes; then
5539     runpath_var=LD_RUN_PATH
5540     hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir'
5541     export_dynamic_flag_spec='${wl}--export-dynamic'
5542     case $host_os in
5543     cygwin* | mingw* | pw32*)
5544       # dlltool doesn't understand --whole-archive et. al.
5545       whole_archive_flag_spec=
5546       ;;
5547     *)
5548       # ancient GNU ld didn't support --whole-archive et. al.
5549       if $LD --help 2>&1 | egrep 'no-whole-archive' > /dev/null; then
5550         whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
5551       else
5552         whole_archive_flag_spec=
5553       fi
5554       ;;
5555     esac
5556   fi
5557 else
5558   # PORTME fill in a description of your system's linker (not GNU ld)
5559   case $host_os in
5560   aix3*)
5561     allow_undefined_flag=unsupported
5562     always_export_symbols=yes
5563     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'
5564     # Note: this linker hardcodes the directories in LIBPATH if there
5565     # are no directories specified by -L.
5566     hardcode_minus_L=yes
5567     if test "$GCC" = yes && test -z "$link_static_flag"; then
5568       # Neither direct hardcoding nor static linking is supported with a
5569       # broken collect2.
5570       hardcode_direct=unsupported
5571     fi
5572     ;;
5573
5574   aix4* | aix5*)
5575     if test "$host_cpu" = ia64; then
5576       # On IA64, the linker does run time linking by default, so we don't
5577       # have to do anything special.
5578       aix_use_runtimelinking=no
5579       exp_sym_flag='-Bexport'
5580       no_entry_flag=""
5581     else
5582       aix_use_runtimelinking=no
5583
5584       # Test if we are trying to use run time linking or normal
5585       # AIX style linking. If -brtl is somewhere in LDFLAGS, we
5586       # need to do runtime linking.
5587       case $host_os in aix4.[23]|aix4.[23].*|aix5*)
5588         for ld_flag in $LDFLAGS; do
5589           case $ld_flag in
5590           *-brtl*)
5591             aix_use_runtimelinking=yes
5592             break
5593           ;;
5594           esac
5595         done
5596       esac
5597
5598       exp_sym_flag='-bexport'
5599       no_entry_flag='-bnoentry'
5600     fi
5601
5602     # When large executables or shared objects are built, AIX ld can
5603     # have problems creating the table of contents.  If linking a library
5604     # or program results in "error TOC overflow" add -mminimal-toc to
5605     # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
5606     # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
5607
5608     hardcode_direct=yes
5609     archive_cmds=''
5610     hardcode_libdir_separator=':'
5611     if test "$GCC" = yes; then
5612       case $host_os in aix4.[012]|aix4.[012].*)
5613         collect2name=`${CC} -print-prog-name=collect2`
5614         if test -f "$collect2name" && \
5615           strings "$collect2name" | grep resolve_lib_name >/dev/null
5616         then
5617           # We have reworked collect2
5618           hardcode_direct=yes
5619         else
5620           # We have old collect2
5621           hardcode_direct=unsupported
5622           # It fails to find uninstalled libraries when the uninstalled
5623           # path is not listed in the libpath.  Setting hardcode_minus_L
5624           # to unsupported forces relinking
5625           hardcode_minus_L=yes
5626           hardcode_libdir_flag_spec='-L$libdir'
5627           hardcode_libdir_separator=
5628         fi
5629       esac
5630
5631       shared_flag='-shared'
5632     else
5633       # not using gcc
5634       if test "$host_cpu" = ia64; then
5635         shared_flag='${wl}-G'
5636       else
5637         if test "$aix_use_runtimelinking" = yes; then
5638           shared_flag='${wl}-G'
5639         else
5640           shared_flag='${wl}-bM:SRE'
5641         fi
5642       fi
5643     fi
5644
5645     # It seems that -bexpall can do strange things, so it is better to
5646     # generate a list of symbols to export.
5647     always_export_symbols=yes
5648     if test "$aix_use_runtimelinking" = yes; then
5649       # Warning - without using the other runtime loading flags (-brtl),
5650       # -berok will link without error, but may produce a broken library.
5651       allow_undefined_flag='-berok'
5652       hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:/usr/lib:/lib'
5653       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"
5654     else
5655       if test "$host_cpu" = ia64; then
5656         hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
5657         allow_undefined_flag="-z nodefs"
5658         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"
5659       else
5660         hardcode_libdir_flag_spec='${wl}-bnolibpath ${wl}-blibpath:$libdir:/usr/lib:/lib'
5661         # Warning - without using the other run time loading flags,
5662         # -berok will link without error, but may produce a broken library.
5663         allow_undefined_flag='${wl}-berok'
5664         # This is a bit strange, but is similar to how AIX traditionally builds
5665         # it's shared libraries.
5666         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'
5667       fi
5668     fi
5669     ;;
5670
5671   amigaos*)
5672     archive_cmds='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
5673     hardcode_libdir_flag_spec='-L$libdir'
5674     hardcode_minus_L=yes
5675     # see comment about different semantics on the GNU ld section
5676     ld_shlibs=no
5677     ;;
5678
5679   cygwin* | mingw* | pw32*)
5680     # When not using gcc, we currently assume that we are using
5681     # Microsoft Visual C++.
5682     # hardcode_libdir_flag_spec is actually meaningless, as there is
5683     # no search path for DLLs.
5684     hardcode_libdir_flag_spec=' '
5685     allow_undefined_flag=unsupported
5686     # Tell ltmain to make .lib files, not .a files.
5687     libext=lib
5688     # FIXME: Setting linknames here is a bad hack.
5689     archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | sed -e '\''s/ -lc$//'\''` -link -dll~linknames='
5690     # The linker will automatically build a .lib file if we build a DLL.
5691     old_archive_from_new_cmds='true'
5692     # FIXME: Should let the user specify the lib program.
5693     old_archive_cmds='lib /OUT:$oldlib$oldobjs$old_deplibs'
5694     fix_srcfile_path='`cygpath -w "$srcfile"`'
5695     ;;
5696
5697   darwin* | rhapsody*)
5698     case "$host_os" in
5699     rhapsody* | darwin1.[012])
5700       allow_undefined_flag='-undefined suppress'
5701       ;;
5702     *) # Darwin 1.3 on
5703       allow_undefined_flag='-flat_namespace -undefined suppress'
5704       ;;
5705     esac
5706     # FIXME: Relying on posixy $() will cause problems for
5707     #        cross-compilation, but unfortunately the echo tests do not
5708     #        yet detect zsh echo's removal of \ escapes.  Also zsh mangles
5709     #        `"' quotes if we put them in here... so don't!
5710     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)'
5711     # We need to add '_' to the symbols in $export_symbols first
5712     #archive_expsym_cmds="$archive_cmds"' && strip -s $export_symbols'
5713     hardcode_direct=yes
5714     hardcode_shlibpath_var=no
5715     whole_archive_flag_spec='-all_load $convenience'
5716     ;;
5717
5718   freebsd1*)
5719     ld_shlibs=no
5720     ;;
5721
5722   # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
5723   # support.  Future versions do this automatically, but an explicit c++rt0.o
5724   # does not break anything, and helps significantly (at the cost of a little
5725   # extra space).
5726   freebsd2.2*)
5727     archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
5728     hardcode_libdir_flag_spec='-R$libdir'
5729     hardcode_direct=yes
5730     hardcode_shlibpath_var=no
5731     ;;
5732
5733   # Unfortunately, older versions of FreeBSD 2 do not have this feature.
5734   freebsd2*)
5735     archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5736     hardcode_direct=yes
5737     hardcode_minus_L=yes
5738     hardcode_shlibpath_var=no
5739     ;;
5740
5741   # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
5742   freebsd*)
5743     archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
5744     hardcode_libdir_flag_spec='-R$libdir'
5745     hardcode_direct=yes
5746     hardcode_shlibpath_var=no
5747     ;;
5748
5749   hpux9* | hpux10* | hpux11*)
5750     case $host_os in
5751     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' ;;
5752     *) archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' ;;
5753     esac
5754     hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
5755     hardcode_libdir_separator=:
5756     hardcode_direct=yes
5757     hardcode_minus_L=yes # Not in the search PATH, but as the default
5758                          # location of the library.
5759     export_dynamic_flag_spec='${wl}-E'
5760     ;;
5761
5762   irix5* | irix6* | nonstopux*)
5763     if test "$GCC" = yes; then
5764       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'
5765       hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5766     else
5767       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'
5768       hardcode_libdir_flag_spec='-rpath $libdir'
5769     fi
5770     hardcode_libdir_separator=:
5771     link_all_deplibs=yes
5772     ;;
5773
5774   netbsd*)
5775     if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
5776       archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
5777     else
5778       archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
5779     fi
5780     hardcode_libdir_flag_spec='-R$libdir'
5781     hardcode_direct=yes
5782     hardcode_shlibpath_var=no
5783     ;;
5784
5785   newsos6)
5786     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5787     hardcode_direct=yes
5788     hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5789     hardcode_libdir_separator=:
5790     hardcode_shlibpath_var=no
5791     ;;
5792
5793   openbsd*)
5794     hardcode_direct=yes
5795     hardcode_shlibpath_var=no
5796     if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
5797       archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5798       hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
5799       export_dynamic_flag_spec='${wl}-E'
5800     else
5801       case "$host_os" in
5802       openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
5803         archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5804         hardcode_libdir_flag_spec='-R$libdir'
5805         ;;
5806       *)
5807         archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5808         hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
5809         ;;
5810       esac
5811     fi
5812     ;;
5813
5814   openedition*)
5815     archive_cmds="\$CC -Wl,DLL \$libobjs \$deplibs \$compiler_flags -o \$lib &&
5816         cp \$linknames \$output_objdir && linknames=''"
5817     export_dynamic_flag_spec="-Wl,DLL"
5818     ;;
5819
5820   os2*)
5821     hardcode_libdir_flag_spec='-L$libdir'
5822     hardcode_minus_L=yes
5823     allow_undefined_flag=unsupported
5824     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'
5825     old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
5826     ;;
5827
5828   osf3*)
5829     if test "$GCC" = yes; then
5830       allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
5831       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'
5832     else
5833       allow_undefined_flag=' -expect_unresolved \*'
5834       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'
5835     fi
5836     hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5837     hardcode_libdir_separator=:
5838     ;;
5839
5840   osf4* | osf5*)        # as osf3* with the addition of -msym flag
5841     if test "$GCC" = yes; then
5842       allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
5843       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'
5844       hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5845     else
5846       allow_undefined_flag=' -expect_unresolved \*'
5847       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'
5848       archive_expsym_cmds='for i in `cat $export_symbols`; do printf "-exported_symbol " >> $lib.exp; echo "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
5849       $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'
5850
5851       #Both c and cxx compiler support -rpath directly
5852       hardcode_libdir_flag_spec='-rpath $libdir'
5853     fi
5854     hardcode_libdir_separator=:
5855     ;;
5856
5857   sco3.2v5*)
5858     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5859     hardcode_shlibpath_var=no
5860     runpath_var=LD_RUN_PATH
5861     hardcode_runpath_var=yes
5862     export_dynamic_flag_spec='${wl}-Bexport'
5863     ;;
5864
5865   solaris*)
5866     # gcc --version < 3.0 without binutils cannot create self contained
5867     # shared libraries reliably, requiring libgcc.a to resolve some of
5868     # the object symbols generated in some cases.  Libraries that use
5869     # assert need libgcc.a to resolve __eprintf, for example.  Linking
5870     # a copy of libgcc.a into every shared library to guarantee resolving
5871     # such symbols causes other problems:  According to Tim Van Holder
5872     # <tim.van.holder@pandora.be>, C++ libraries end up with a separate
5873     # (to the application) exception stack for one thing.
5874     no_undefined_flag=' -z defs'
5875     if test "$GCC" = yes; then
5876       case `$CC --version 2>/dev/null` in
5877       [12].*)
5878         cat <<EOF 1>&2
5879
5880 *** Warning: Releases of GCC earlier than version 3.0 cannot reliably
5881 *** create self contained shared libraries on Solaris systems, without
5882 *** introducing a dependency on libgcc.a.  Therefore, libtool is disabling
5883 *** -no-undefined support, which will at least allow you to build shared
5884 *** libraries.  However, you may find that when you link such libraries
5885 *** into an application without using GCC, you have to manually add
5886 *** \`gcc --print-libgcc-file-name\` to the link command.  We urge you to
5887 *** upgrade to a newer version of GCC.  Another option is to rebuild your
5888 *** current GCC to use the GNU linker from GNU binutils 2.9.1 or newer.
5889
5890 EOF
5891         no_undefined_flag=
5892         ;;
5893       esac
5894     fi
5895     # $CC -shared without GNU ld will not create a library from C++
5896     # object files and a static libstdc++, better avoid it by now
5897     archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
5898     archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
5899                 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
5900     hardcode_libdir_flag_spec='-R$libdir'
5901     hardcode_shlibpath_var=no
5902     case $host_os in
5903     solaris2.[0-5] | solaris2.[0-5].*) ;;
5904     *) # Supported since Solaris 2.6 (maybe 2.5.1?)
5905       whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;;
5906     esac
5907     link_all_deplibs=yes
5908     ;;
5909
5910   sunos4*)
5911     if test "x$host_vendor" = xsequent; then
5912       # Use $CC to link under sequent, because it throws in some extra .o
5913       # files that make .init and .fini sections work.
5914       archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
5915     else
5916       archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
5917     fi
5918     hardcode_libdir_flag_spec='-L$libdir'
5919     hardcode_direct=yes
5920     hardcode_minus_L=yes
5921     hardcode_shlibpath_var=no
5922     ;;
5923
5924   sysv4)
5925     case $host_vendor in
5926       sni)
5927         archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5928         hardcode_direct=yes # is this really true???
5929         ;;
5930       siemens)
5931         ## LD is ld it makes a PLAMLIB
5932         ## CC just makes a GrossModule.
5933         archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
5934         reload_cmds='$CC -r -o $output$reload_objs'
5935         hardcode_direct=no
5936         ;;
5937       motorola)
5938         archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5939         hardcode_direct=no #Motorola manual says yes, but my tests say they lie
5940         ;;
5941     esac
5942     runpath_var='LD_RUN_PATH'
5943     hardcode_shlibpath_var=no
5944     ;;
5945
5946   sysv4.3*)
5947     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5948     hardcode_shlibpath_var=no
5949     export_dynamic_flag_spec='-Bexport'
5950     ;;
5951
5952   sysv5*)
5953     no_undefined_flag=' -z text'
5954     # $CC -shared without GNU ld will not create a library from C++
5955     # object files and a static libstdc++, better avoid it by now
5956     archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
5957     archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
5958                 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
5959     hardcode_libdir_flag_spec=
5960     hardcode_shlibpath_var=no
5961     runpath_var='LD_RUN_PATH'
5962     ;;
5963
5964   uts4*)
5965     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5966     hardcode_libdir_flag_spec='-L$libdir'
5967     hardcode_shlibpath_var=no
5968     ;;
5969
5970   dgux*)
5971     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5972     hardcode_libdir_flag_spec='-L$libdir'
5973     hardcode_shlibpath_var=no
5974     ;;
5975
5976   sysv4*MP*)
5977     if test -d /usr/nec; then
5978       archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5979       hardcode_shlibpath_var=no
5980       runpath_var=LD_RUN_PATH
5981       hardcode_runpath_var=yes
5982       ld_shlibs=yes
5983     fi
5984     ;;
5985
5986   sysv4.2uw2*)
5987     archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
5988     hardcode_direct=yes
5989     hardcode_minus_L=no
5990     hardcode_shlibpath_var=no
5991     hardcode_runpath_var=yes
5992     runpath_var=LD_RUN_PATH
5993     ;;
5994
5995   sysv5uw7* | unixware7*)
5996     no_undefined_flag='${wl}-z ${wl}text'
5997     if test "$GCC" = yes; then
5998       archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
5999     else
6000       archive_cmds='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6001     fi
6002     runpath_var='LD_RUN_PATH'
6003     hardcode_shlibpath_var=no
6004     ;;
6005
6006   *)
6007     ld_shlibs=no
6008     ;;
6009   esac
6010 fi
6011 echo "$ac_t""$ld_shlibs" 1>&6
6012 test "$ld_shlibs" = no && can_build_shared=no
6013
6014 # Check hardcoding attributes.
6015 echo $ac_n "checking how to hardcode library paths into programs""... $ac_c" 1>&6
6016 echo "configure:6017: checking how to hardcode library paths into programs" >&5
6017 hardcode_action=
6018 if test -n "$hardcode_libdir_flag_spec" || \
6019    test -n "$runpath_var"; then
6020
6021   # We can hardcode non-existant directories.
6022   if test "$hardcode_direct" != no &&
6023      # If the only mechanism to avoid hardcoding is shlibpath_var, we
6024      # have to relink, otherwise we might link with an installed library
6025      # when we should be linking with a yet-to-be-installed one
6026      ## test "$hardcode_shlibpath_var" != no &&
6027      test "$hardcode_minus_L" != no; then
6028     # Linking always hardcodes the temporary library directory.
6029     hardcode_action=relink
6030   else
6031     # We can link without hardcoding, and we can hardcode nonexisting dirs.
6032     hardcode_action=immediate
6033   fi
6034 else
6035   # We cannot hardcode anything, or else we can only hardcode existing
6036   # directories.
6037   hardcode_action=unsupported
6038 fi
6039 echo "$ac_t""$hardcode_action" 1>&6
6040
6041 striplib=
6042 old_striplib=
6043 echo $ac_n "checking whether stripping libraries is possible""... $ac_c" 1>&6
6044 echo "configure:6045: checking whether stripping libraries is possible" >&5
6045 if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
6046   test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
6047   test -z "$striplib" && striplib="$STRIP --strip-unneeded"
6048   echo "$ac_t""yes" 1>&6
6049 else
6050   echo "$ac_t""no" 1>&6
6051 fi
6052
6053 reload_cmds='$LD$reload_flag -o $output$reload_objs'
6054 test -z "$deplibs_check_method" && deplibs_check_method=unknown
6055
6056 # PORTME Fill in your ld.so characteristics
6057 echo $ac_n "checking dynamic linker characteristics""... $ac_c" 1>&6
6058 echo "configure:6059: checking dynamic linker characteristics" >&5
6059 library_names_spec=
6060 libname_spec='lib$name'
6061 soname_spec=
6062 postinstall_cmds=
6063 postuninstall_cmds=
6064 finish_cmds=
6065 finish_eval=
6066 shlibpath_var=
6067 shlibpath_overrides_runpath=unknown
6068 version_type=none
6069 dynamic_linker="$host_os ld.so"
6070 sys_lib_dlsearch_path_spec="/lib /usr/lib"
6071 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
6072
6073 case $host_os in
6074 aix3*)
6075   version_type=linux
6076   library_names_spec='${libname}${release}.so$versuffix $libname.a'
6077   shlibpath_var=LIBPATH
6078
6079   # AIX has no versioning support, so we append a major version to the name.
6080   soname_spec='${libname}${release}.so$major'
6081   ;;
6082
6083 aix4* | aix5*)
6084   version_type=linux
6085   need_lib_prefix=no
6086   need_version=no
6087   hardcode_into_libs=yes
6088   if test "$host_cpu" = ia64; then
6089     # AIX 5 supports IA64
6090     library_names_spec='${libname}${release}.so$major ${libname}${release}.so$versuffix $libname.so'
6091     shlibpath_var=LD_LIBRARY_PATH
6092   else
6093     # With GCC up to 2.95.x, collect2 would create an import file
6094     # for dependence libraries.  The import file would start with
6095     # the line `#! .'.  This would cause the generated library to
6096     # depend on `.', always an invalid library.  This was fixed in
6097     # development snapshots of GCC prior to 3.0.
6098     case $host_os in
6099       aix4 | aix4.[01] | aix4.[01].*)
6100         if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
6101              echo ' yes '
6102              echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
6103           :
6104         else
6105           can_build_shared=no
6106         fi
6107         ;;
6108     esac
6109     # AIX (on Power*) has no versioning support, so currently we can
6110     # not hardcode correct soname into executable. Probably we can
6111     # add versioning support to collect2, so additional links can
6112     # be useful in future.
6113     if test "$aix_use_runtimelinking" = yes; then
6114       # If using run time linking (on AIX 4.2 or later) use lib<name>.so
6115       # instead of lib<name>.a to let people know that these are not
6116       # typical AIX shared libraries.
6117       library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6118     else
6119       # We preserve .a as extension for shared libraries through AIX4.2
6120       # and later when we are not doing run time linking.
6121       library_names_spec='${libname}${release}.a $libname.a'
6122       soname_spec='${libname}${release}.so$major'
6123     fi
6124     shlibpath_var=LIBPATH
6125   fi
6126   hardcode_into_libs=yes
6127   ;;
6128
6129 amigaos*)
6130   library_names_spec='$libname.ixlibrary $libname.a'
6131   # Create ${libname}_ixlibrary.a entries in /sys/libs.
6132   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'
6133   ;;
6134
6135 beos*)
6136   library_names_spec='${libname}.so'
6137   dynamic_linker="$host_os ld.so"
6138   shlibpath_var=LIBRARY_PATH
6139   ;;
6140
6141 bsdi4*)
6142   version_type=linux
6143   need_version=no
6144   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6145   soname_spec='${libname}${release}.so$major'
6146   finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
6147   shlibpath_var=LD_LIBRARY_PATH
6148   sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
6149   sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
6150   export_dynamic_flag_spec=-rdynamic
6151   # the default ld.so.conf also contains /usr/contrib/lib and
6152   # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
6153   # libtool to hard-code these into programs
6154   ;;
6155
6156 cygwin* | mingw* | pw32*)
6157   version_type=windows
6158   need_version=no
6159   need_lib_prefix=no
6160   case $GCC,$host_os in
6161   yes,cygwin*)
6162     library_names_spec='$libname.dll.a'
6163     soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
6164     postinstall_cmds='dlpath=`bash 2>&1 -c '\''. $dir/${file}i;echo \$dlname'\''`~
6165       dldir=$destdir/`dirname \$dlpath`~
6166       test -d \$dldir || mkdir -p \$dldir~
6167       $install_prog .libs/$dlname \$dldir/$dlname'
6168     postuninstall_cmds='dldll=`bash 2>&1 -c '\''. $file; echo \$dlname'\''`~
6169       dlpath=$dir/\$dldll~
6170        $rm \$dlpath'
6171     ;;
6172   yes,mingw*)
6173     library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
6174     sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | sed -e "s/^libraries://" -e "s/;/ /g" -e "s,=/,/,g"`
6175     ;;
6176   yes,pw32*)
6177     library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | sed -e 's/./-/g'`${versuffix}.dll'
6178     ;;
6179   *)
6180     library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll $libname.lib'
6181     ;;
6182   esac
6183   dynamic_linker='Win32 ld.exe'
6184   # FIXME: first we should search . and the directory the executable is in
6185   shlibpath_var=PATH
6186   ;;
6187
6188 darwin* | rhapsody*)
6189   dynamic_linker="$host_os dyld"
6190   version_type=darwin
6191   need_lib_prefix=no
6192   need_version=no
6193   # FIXME: Relying on posixy $() will cause problems for
6194   #        cross-compilation, but unfortunately the echo tests do not
6195   #        yet detect zsh echo's removal of \ escapes.
6196   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)'
6197   soname_spec='${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib)'
6198   shlibpath_overrides_runpath=yes
6199   shlibpath_var=DYLD_LIBRARY_PATH
6200   ;;
6201
6202 freebsd1*)
6203   dynamic_linker=no
6204   ;;
6205
6206 freebsd*)
6207   objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
6208   version_type=freebsd-$objformat
6209   case $version_type in
6210     freebsd-elf*)
6211       library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
6212       need_version=no
6213       need_lib_prefix=no
6214       ;;
6215     freebsd-*)
6216       library_names_spec='${libname}${release}.so$versuffix $libname.so$versuffix'
6217       need_version=yes
6218       ;;
6219   esac
6220   shlibpath_var=LD_LIBRARY_PATH
6221   case $host_os in
6222   freebsd2*)
6223     shlibpath_overrides_runpath=yes
6224     ;;
6225   *)
6226     shlibpath_overrides_runpath=no
6227     hardcode_into_libs=yes
6228     ;;
6229   esac
6230   ;;
6231
6232 gnu*)
6233   version_type=linux
6234   need_lib_prefix=no
6235   need_version=no
6236   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so${major} ${libname}.so'
6237   soname_spec='${libname}${release}.so$major'
6238   shlibpath_var=LD_LIBRARY_PATH
6239   hardcode_into_libs=yes
6240   ;;
6241
6242 hpux9* | hpux10* | hpux11*)
6243   # Give a soname corresponding to the major version so that dld.sl refuses to
6244   # link against other versions.
6245   dynamic_linker="$host_os dld.sl"
6246   version_type=sunos
6247   need_lib_prefix=no
6248   need_version=no
6249   shlibpath_var=SHLIB_PATH
6250   shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
6251   library_names_spec='${libname}${release}.sl$versuffix ${libname}${release}.sl$major $libname.sl'
6252   soname_spec='${libname}${release}.sl$major'
6253   # HP-UX runs *really* slowly unless shared libraries are mode 555.
6254   postinstall_cmds='chmod 555 $lib'
6255   ;;
6256
6257 irix5* | irix6* | nonstopux*)
6258   case $host_os in
6259     nonstopux*) version_type=nonstopux ;;
6260     *)          version_type=irix ;;
6261   esac
6262   need_lib_prefix=no
6263   need_version=no
6264   soname_spec='${libname}${release}.so$major'
6265   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so $libname.so'
6266   case $host_os in
6267   irix5* | nonstopux*)
6268     libsuff= shlibsuff=
6269     ;;
6270   *)
6271     case $LD in # libtool.m4 will add one of these switches to LD
6272     *-32|*"-32 ") libsuff= shlibsuff= libmagic=32-bit;;
6273     *-n32|*"-n32 ") libsuff=32 shlibsuff=N32 libmagic=N32;;
6274     *-64|*"-64 ") libsuff=64 shlibsuff=64 libmagic=64-bit;;
6275     *) libsuff= shlibsuff= libmagic=never-match;;
6276     esac
6277     ;;
6278   esac
6279   shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
6280   shlibpath_overrides_runpath=no
6281   sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
6282   sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
6283   ;;
6284
6285 # No shared lib support for Linux oldld, aout, or coff.
6286 linux-gnuoldld* | linux-gnuaout* | linux-gnucoff*)
6287   dynamic_linker=no
6288   ;;
6289
6290 # This must be Linux ELF.
6291 linux-gnu*)
6292   version_type=linux
6293   need_lib_prefix=no
6294   need_version=no
6295   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6296   soname_spec='${libname}${release}.so$major'
6297   finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
6298   shlibpath_var=LD_LIBRARY_PATH
6299   shlibpath_overrides_runpath=no
6300   # This implies no fast_install, which is unacceptable.
6301   # Some rework will be needed to allow for fast_install
6302   # before this can be enabled.
6303   hardcode_into_libs=yes
6304
6305   # We used to test for /lib/ld.so.1 and disable shared libraries on
6306   # powerpc, because MkLinux only supported shared libraries with the
6307   # GNU dynamic linker.  Since this was broken with cross compilers,
6308   # most powerpc-linux boxes support dynamic linking these days and
6309   # people can always --disable-shared, the test was removed, and we
6310   # assume the GNU/Linux dynamic linker is in use.
6311   dynamic_linker='GNU/Linux ld.so'
6312   ;;
6313
6314 netbsd*)
6315   version_type=sunos
6316   need_lib_prefix=no
6317   need_version=no
6318   if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
6319     library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
6320     finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
6321     dynamic_linker='NetBSD (a.out) ld.so'
6322   else
6323     library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so ${libname}.so'
6324     soname_spec='${libname}${release}.so$major'
6325     dynamic_linker='NetBSD ld.elf_so'
6326   fi
6327   shlibpath_var=LD_LIBRARY_PATH
6328   shlibpath_overrides_runpath=yes
6329   hardcode_into_libs=yes
6330   ;;
6331
6332 newsos6)
6333   version_type=linux
6334   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6335   shlibpath_var=LD_LIBRARY_PATH
6336   shlibpath_overrides_runpath=yes
6337   ;;
6338
6339 openbsd*)
6340   version_type=sunos
6341   need_lib_prefix=no
6342   need_version=no
6343   if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
6344     case "$host_os" in
6345     openbsd2.[89] | openbsd2.[89].*)
6346       shlibpath_overrides_runpath=no
6347       ;;
6348     *)
6349       shlibpath_overrides_runpath=yes
6350       ;;
6351     esac
6352   else
6353     shlibpath_overrides_runpath=yes
6354   fi
6355   library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
6356   finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
6357   shlibpath_var=LD_LIBRARY_PATH
6358   ;;
6359
6360 openedition*)
6361   need_lib_prefix=no
6362   need_version=no
6363   shlibpath_overrides_runpath=yes
6364   shlibpath_var=LIBPATH
6365   postinstall_cmds="rm \$destdir/\$linkname; cp \$linkname \$destdir; chmod a+x \$lib"
6366   # the library's exports are in libname.x; this is the file that must
6367   # actually be linked with to use a DLL.
6368   library_names_spec="\${libname}\${release}.so\$versuffix \${libname}.x"
6369   ;;
6370
6371 os2*)
6372   libname_spec='$name'
6373   need_lib_prefix=no
6374   library_names_spec='$libname.dll $libname.a'
6375   dynamic_linker='OS/2 ld.exe'
6376   shlibpath_var=LIBPATH
6377   ;;
6378
6379 osf3* | osf4* | osf5*)
6380   version_type=osf
6381   need_version=no
6382   soname_spec='${libname}${release}.so$major'
6383   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6384   shlibpath_var=LD_LIBRARY_PATH
6385   sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
6386   sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
6387   hardcode_into_libs=yes
6388   ;;
6389
6390 sco3.2v5*)
6391   version_type=osf
6392   soname_spec='${libname}${release}.so$major'
6393   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6394   shlibpath_var=LD_LIBRARY_PATH
6395   ;;
6396
6397 solaris*)
6398   version_type=linux
6399   need_lib_prefix=no
6400   need_version=no
6401   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6402   soname_spec='${libname}${release}.so$major'
6403   shlibpath_var=LD_LIBRARY_PATH
6404   shlibpath_overrides_runpath=yes
6405   hardcode_into_libs=yes
6406   # ldd complains unless libraries are executable
6407   postinstall_cmds='chmod +x $lib'
6408   ;;
6409
6410 sunos4*)
6411   version_type=sunos
6412   library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
6413   finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
6414   shlibpath_var=LD_LIBRARY_PATH
6415   shlibpath_overrides_runpath=yes
6416   if test "$with_gnu_ld" = yes; then
6417     need_lib_prefix=no
6418   fi
6419   need_version=yes
6420   ;;
6421
6422 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
6423   version_type=linux
6424   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6425   soname_spec='${libname}${release}.so$major'
6426   shlibpath_var=LD_LIBRARY_PATH
6427   case $host_vendor in
6428     sni)
6429       shlibpath_overrides_runpath=no
6430       need_lib_prefix=no
6431       export_dynamic_flag_spec='${wl}-Blargedynsym'
6432       runpath_var=LD_RUN_PATH
6433       ;;
6434     siemens)
6435       need_lib_prefix=no
6436       ;;
6437     motorola)
6438       need_lib_prefix=no
6439       need_version=no
6440       shlibpath_overrides_runpath=no
6441       sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
6442       ;;
6443   esac
6444   ;;
6445
6446 uts4*)
6447   version_type=linux
6448   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6449   soname_spec='${libname}${release}.so$major'
6450   shlibpath_var=LD_LIBRARY_PATH
6451   ;;
6452
6453 dgux*)
6454   version_type=linux
6455   need_lib_prefix=no
6456   need_version=no
6457   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6458   soname_spec='${libname}${release}.so$major'
6459   shlibpath_var=LD_LIBRARY_PATH
6460   ;;
6461
6462 sysv4*MP*)
6463   if test -d /usr/nec ;then
6464     version_type=linux
6465     library_names_spec='$libname.so.$versuffix $libname.so.$major $libname.so'
6466     soname_spec='$libname.so.$major'
6467     shlibpath_var=LD_LIBRARY_PATH
6468   fi
6469   ;;
6470
6471 *)
6472   dynamic_linker=no
6473   ;;
6474 esac
6475 echo "$ac_t""$dynamic_linker" 1>&6
6476 test "$dynamic_linker" = no && can_build_shared=no
6477
6478 # Report the final consequences.
6479 echo $ac_n "checking if libtool supports shared libraries""... $ac_c" 1>&6
6480 echo "configure:6481: checking if libtool supports shared libraries" >&5
6481 echo "$ac_t""$can_build_shared" 1>&6
6482
6483 echo $ac_n "checking whether to build shared libraries""... $ac_c" 1>&6
6484 echo "configure:6485: checking whether to build shared libraries" >&5
6485 test "$can_build_shared" = "no" && enable_shared=no
6486
6487 # On AIX, shared libraries and static libraries use the same namespace, and
6488 # are all built from PIC.
6489 case "$host_os" in
6490 aix3*)
6491   test "$enable_shared" = yes && enable_static=no
6492   if test -n "$RANLIB"; then
6493     archive_cmds="$archive_cmds~\$RANLIB \$lib"
6494     postinstall_cmds='$RANLIB $lib'
6495   fi
6496   ;;
6497
6498 aix4*)
6499   if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
6500     test "$enable_shared" = yes && enable_static=no
6501   fi
6502   ;;
6503 esac
6504 echo "$ac_t""$enable_shared" 1>&6
6505
6506 echo $ac_n "checking whether to build static libraries""... $ac_c" 1>&6
6507 echo "configure:6508: checking whether to build static libraries" >&5
6508 # Make sure either enable_shared or enable_static is yes.
6509 test "$enable_shared" = yes || enable_static=yes
6510 echo "$ac_t""$enable_static" 1>&6
6511
6512 if test "$hardcode_action" = relink; then
6513   # Fast installation is not supported
6514   enable_fast_install=no
6515 elif test "$shlibpath_overrides_runpath" = yes ||
6516      test "$enable_shared" = no; then
6517   # Fast installation is not necessary
6518   enable_fast_install=needless
6519 fi
6520
6521 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
6522 if test "$GCC" = yes; then
6523   variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
6524 fi
6525
6526 if test "x$enable_dlopen" != xyes; then
6527   enable_dlopen=unknown
6528   enable_dlopen_self=unknown
6529   enable_dlopen_self_static=unknown
6530 else
6531   lt_cv_dlopen=no
6532   lt_cv_dlopen_libs=
6533
6534   case $host_os in
6535   beos*)
6536     lt_cv_dlopen="load_add_on"
6537     lt_cv_dlopen_libs=
6538     lt_cv_dlopen_self=yes
6539     ;;
6540
6541   cygwin* | mingw* | pw32*)
6542     lt_cv_dlopen="LoadLibrary"
6543     lt_cv_dlopen_libs=
6544    ;;
6545
6546   *)
6547     echo $ac_n "checking for dllload""... $ac_c" 1>&6
6548 echo "configure:6549: checking for dllload" >&5
6549 if eval "test \"\${ac_cv_func_dllload+set}\" = set"; then
6550   echo $ac_n "(cached) $ac_c" 1>&6
6551 else
6552   cat > conftest.$ac_ext <<EOF
6553 #line 6554 "configure"
6554 #include "confdefs.h"
6555 /* System header to define __stub macros and hopefully few prototypes,
6556     which can conflict with char dllload(); below.  */
6557 #include <assert.h>
6558 /* Override any gcc2 internal prototype to avoid an error.  */
6559 /* We use char because int might match the return type of a gcc2
6560     builtin and then its argument prototype would still apply.  */
6561 char dllload();
6562 char (*f)();
6563
6564 int main() {
6565
6566 /* The GNU C library defines this for functions which it implements
6567     to always fail with ENOSYS.  Some functions are actually named
6568     something starting with __ and the normal name is an alias.  */
6569 #if defined (__stub_dllload) || defined (__stub___dllload)
6570 choke me
6571 #else
6572 f = dllload;
6573 #endif
6574
6575 ; return 0; }
6576 EOF
6577 if { (eval echo configure:6578: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6578   rm -rf conftest*
6579   eval "ac_cv_func_dllload=yes"
6580 else
6581   echo "configure: failed program was:" >&5
6582   cat conftest.$ac_ext >&5
6583   rm -rf conftest*
6584   eval "ac_cv_func_dllload=no"
6585 fi
6586 rm -f conftest*
6587 fi
6588
6589 if eval "test \"`echo '$ac_cv_func_'dllload`\" = yes"; then
6590   echo "$ac_t""yes" 1>&6
6591   lt_cv_dlopen="dllload"
6592 else
6593   echo "$ac_t""no" 1>&6
6594 echo $ac_n "checking for shl_load""... $ac_c" 1>&6
6595 echo "configure:6596: checking for shl_load" >&5
6596 if eval "test \"\${ac_cv_func_shl_load+set}\" = set"; then
6597   echo $ac_n "(cached) $ac_c" 1>&6
6598 else
6599   cat > conftest.$ac_ext <<EOF
6600 #line 6601 "configure"
6601 #include "confdefs.h"
6602 /* System header to define __stub macros and hopefully few prototypes,
6603     which can conflict with char shl_load(); below.  */
6604 #include <assert.h>
6605 /* Override any gcc2 internal prototype to avoid an error.  */
6606 /* We use char because int might match the return type of a gcc2
6607     builtin and then its argument prototype would still apply.  */
6608 char shl_load();
6609 char (*f)();
6610
6611 int main() {
6612
6613 /* The GNU C library defines this for functions which it implements
6614     to always fail with ENOSYS.  Some functions are actually named
6615     something starting with __ and the normal name is an alias.  */
6616 #if defined (__stub_shl_load) || defined (__stub___shl_load)
6617 choke me
6618 #else
6619 f = shl_load;
6620 #endif
6621
6622 ; return 0; }
6623 EOF
6624 if { (eval echo configure:6625: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6625   rm -rf conftest*
6626   eval "ac_cv_func_shl_load=yes"
6627 else
6628   echo "configure: failed program was:" >&5
6629   cat conftest.$ac_ext >&5
6630   rm -rf conftest*
6631   eval "ac_cv_func_shl_load=no"
6632 fi
6633 rm -f conftest*
6634 fi
6635
6636 if eval "test \"`echo '$ac_cv_func_'shl_load`\" = yes"; then
6637   echo "$ac_t""yes" 1>&6
6638   lt_cv_dlopen="shl_load"
6639 else
6640   echo "$ac_t""no" 1>&6
6641 echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
6642 echo "configure:6643: checking for shl_load in -ldld" >&5
6643 ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-:%__p__%'`
6644 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6645   echo $ac_n "(cached) $ac_c" 1>&6
6646 else
6647   ac_save_LIBS="$LIBS"
6648 LIBS="-ldld  $LIBS"
6649 cat > conftest.$ac_ext <<EOF
6650 #line 6651 "configure"
6651 #include "confdefs.h"
6652 /* Override any gcc2 internal prototype to avoid an error.  */
6653 /* We use char because int might match the return type of a gcc2
6654     builtin and then its argument prototype would still apply.  */
6655 char shl_load();
6656
6657 int main() {
6658 shl_load()
6659 ; return 0; }
6660 EOF
6661 if { (eval echo configure:6662: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6662   rm -rf conftest*
6663   eval "ac_cv_lib_$ac_lib_var=yes"
6664 else
6665   echo "configure: failed program was:" >&5
6666   cat conftest.$ac_ext >&5
6667   rm -rf conftest*
6668   eval "ac_cv_lib_$ac_lib_var=no"
6669 fi
6670 rm -f conftest*
6671 LIBS="$ac_save_LIBS"
6672
6673 fi
6674 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6675   echo "$ac_t""yes" 1>&6
6676   lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"
6677 else
6678   echo "$ac_t""no" 1>&6
6679 echo $ac_n "checking for dlopen""... $ac_c" 1>&6
6680 echo "configure:6681: checking for dlopen" >&5
6681 if eval "test \"\${ac_cv_func_dlopen+set}\" = set"; then
6682   echo $ac_n "(cached) $ac_c" 1>&6
6683 else
6684   cat > conftest.$ac_ext <<EOF
6685 #line 6686 "configure"
6686 #include "confdefs.h"
6687 /* System header to define __stub macros and hopefully few prototypes,
6688     which can conflict with char dlopen(); below.  */
6689 #include <assert.h>
6690 /* Override any gcc2 internal prototype to avoid an error.  */
6691 /* We use char because int might match the return type of a gcc2
6692     builtin and then its argument prototype would still apply.  */
6693 char dlopen();
6694 char (*f)();
6695
6696 int main() {
6697
6698 /* The GNU C library defines this for functions which it implements
6699     to always fail with ENOSYS.  Some functions are actually named
6700     something starting with __ and the normal name is an alias.  */
6701 #if defined (__stub_dlopen) || defined (__stub___dlopen)
6702 choke me
6703 #else
6704 f = dlopen;
6705 #endif
6706
6707 ; return 0; }
6708 EOF
6709 if { (eval echo configure:6710: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6710   rm -rf conftest*
6711   eval "ac_cv_func_dlopen=yes"
6712 else
6713   echo "configure: failed program was:" >&5
6714   cat conftest.$ac_ext >&5
6715   rm -rf conftest*
6716   eval "ac_cv_func_dlopen=no"
6717 fi
6718 rm -f conftest*
6719 fi
6720
6721 if eval "test \"`echo '$ac_cv_func_'dlopen`\" = yes"; then
6722   echo "$ac_t""yes" 1>&6
6723   lt_cv_dlopen="dlopen"
6724 else
6725   echo "$ac_t""no" 1>&6
6726 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
6727 echo "configure:6728: checking for dlopen in -ldl" >&5
6728 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-:%__p__%'`
6729 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6730   echo $ac_n "(cached) $ac_c" 1>&6
6731 else
6732   ac_save_LIBS="$LIBS"
6733 LIBS="-ldl  $LIBS"
6734 cat > conftest.$ac_ext <<EOF
6735 #line 6736 "configure"
6736 #include "confdefs.h"
6737 /* Override any gcc2 internal prototype to avoid an error.  */
6738 /* We use char because int might match the return type of a gcc2
6739     builtin and then its argument prototype would still apply.  */
6740 char dlopen();
6741
6742 int main() {
6743 dlopen()
6744 ; return 0; }
6745 EOF
6746 if { (eval echo configure:6747: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6747   rm -rf conftest*
6748   eval "ac_cv_lib_$ac_lib_var=yes"
6749 else
6750   echo "configure: failed program was:" >&5
6751   cat conftest.$ac_ext >&5
6752   rm -rf conftest*
6753   eval "ac_cv_lib_$ac_lib_var=no"
6754 fi
6755 rm -f conftest*
6756 LIBS="$ac_save_LIBS"
6757
6758 fi
6759 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6760   echo "$ac_t""yes" 1>&6
6761   lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
6762 else
6763   echo "$ac_t""no" 1>&6
6764 echo $ac_n "checking for dlopen in -lsvld""... $ac_c" 1>&6
6765 echo "configure:6766: checking for dlopen in -lsvld" >&5
6766 ac_lib_var=`echo svld'_'dlopen | sed 'y%./+-:%__p__%'`
6767 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6768   echo $ac_n "(cached) $ac_c" 1>&6
6769 else
6770   ac_save_LIBS="$LIBS"
6771 LIBS="-lsvld  $LIBS"
6772 cat > conftest.$ac_ext <<EOF
6773 #line 6774 "configure"
6774 #include "confdefs.h"
6775 /* Override any gcc2 internal prototype to avoid an error.  */
6776 /* We use char because int might match the return type of a gcc2
6777     builtin and then its argument prototype would still apply.  */
6778 char dlopen();
6779
6780 int main() {
6781 dlopen()
6782 ; return 0; }
6783 EOF
6784 if { (eval echo configure:6785: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6785   rm -rf conftest*
6786   eval "ac_cv_lib_$ac_lib_var=yes"
6787 else
6788   echo "configure: failed program was:" >&5
6789   cat conftest.$ac_ext >&5
6790   rm -rf conftest*
6791   eval "ac_cv_lib_$ac_lib_var=no"
6792 fi
6793 rm -f conftest*
6794 LIBS="$ac_save_LIBS"
6795
6796 fi
6797 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6798   echo "$ac_t""yes" 1>&6
6799   lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"
6800 else
6801   echo "$ac_t""no" 1>&6
6802 echo $ac_n "checking for dld_link in -ldld""... $ac_c" 1>&6
6803 echo "configure:6804: checking for dld_link in -ldld" >&5
6804 ac_lib_var=`echo dld'_'dld_link | sed 'y%./+-:%__p__%'`
6805 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6806   echo $ac_n "(cached) $ac_c" 1>&6
6807 else
6808   ac_save_LIBS="$LIBS"
6809 LIBS="-ldld  $LIBS"
6810 cat > conftest.$ac_ext <<EOF
6811 #line 6812 "configure"
6812 #include "confdefs.h"
6813 /* Override any gcc2 internal prototype to avoid an error.  */
6814 /* We use char because int might match the return type of a gcc2
6815     builtin and then its argument prototype would still apply.  */
6816 char dld_link();
6817
6818 int main() {
6819 dld_link()
6820 ; return 0; }
6821 EOF
6822 if { (eval echo configure:6823: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6823   rm -rf conftest*
6824   eval "ac_cv_lib_$ac_lib_var=yes"
6825 else
6826   echo "configure: failed program was:" >&5
6827   cat conftest.$ac_ext >&5
6828   rm -rf conftest*
6829   eval "ac_cv_lib_$ac_lib_var=no"
6830 fi
6831 rm -f conftest*
6832 LIBS="$ac_save_LIBS"
6833
6834 fi
6835 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6836   echo "$ac_t""yes" 1>&6
6837   lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"
6838 else
6839   echo "$ac_t""no" 1>&6
6840 fi
6841
6842               
6843 fi
6844
6845             
6846 fi
6847
6848           
6849 fi
6850
6851         
6852 fi
6853
6854       
6855 fi
6856
6857     
6858 fi
6859
6860     ;;
6861   esac
6862
6863   if test "x$lt_cv_dlopen" != xno; then
6864     enable_dlopen=yes
6865   else
6866     enable_dlopen=no
6867   fi
6868
6869   case $lt_cv_dlopen in
6870   dlopen)
6871     save_CPPFLAGS="$CPPFLAGS"
6872         test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
6873
6874     save_LDFLAGS="$LDFLAGS"
6875     eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
6876
6877     save_LIBS="$LIBS"
6878     LIBS="$lt_cv_dlopen_libs $LIBS"
6879
6880     echo $ac_n "checking whether a program can dlopen itself""... $ac_c" 1>&6
6881 echo "configure:6882: checking whether a program can dlopen itself" >&5
6882 if eval "test \"\${lt_cv_dlopen_self+set}\" = set"; then
6883   echo $ac_n "(cached) $ac_c" 1>&6
6884 else
6885           if test "$cross_compiling" = yes; then :
6886   lt_cv_dlopen_self=cross
6887 else
6888     lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
6889   lt_status=$lt_dlunknown
6890   cat > conftest.$ac_ext <<EOF
6891 #line 6892 "configure"
6892 #include "confdefs.h"
6893
6894 #if HAVE_DLFCN_H
6895 #include <dlfcn.h>
6896 #endif
6897
6898 #include <stdio.h>
6899
6900 #ifdef RTLD_GLOBAL
6901 #  define LT_DLGLOBAL           RTLD_GLOBAL
6902 #else
6903 #  ifdef DL_GLOBAL
6904 #    define LT_DLGLOBAL         DL_GLOBAL
6905 #  else
6906 #    define LT_DLGLOBAL         0
6907 #  endif
6908 #endif
6909
6910 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
6911    find out it does not work in some platform. */
6912 #ifndef LT_DLLAZY_OR_NOW
6913 #  ifdef RTLD_LAZY
6914 #    define LT_DLLAZY_OR_NOW            RTLD_LAZY
6915 #  else
6916 #    ifdef DL_LAZY
6917 #      define LT_DLLAZY_OR_NOW          DL_LAZY
6918 #    else
6919 #      ifdef RTLD_NOW
6920 #        define LT_DLLAZY_OR_NOW        RTLD_NOW
6921 #      else
6922 #        ifdef DL_NOW
6923 #          define LT_DLLAZY_OR_NOW      DL_NOW
6924 #        else
6925 #          define LT_DLLAZY_OR_NOW      0
6926 #        endif
6927 #      endif
6928 #    endif
6929 #  endif
6930 #endif
6931
6932 #ifdef __cplusplus
6933 extern "C" void exit (int);
6934 #endif
6935
6936 void fnord() { int i=42;}
6937 int main ()
6938 {
6939   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
6940   int status = $lt_dlunknown;
6941
6942   if (self)
6943     {
6944       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
6945       else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
6946       /* dlclose (self); */
6947     }
6948
6949     exit (status);
6950 }
6951 EOF
6952   if { (eval echo configure:6953: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} 2>/dev/null; then
6953     (./conftest; exit; ) 2>/dev/null
6954     lt_status=$?
6955     case x$lt_status in
6956       x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;;
6957       x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;;
6958       x$lt_unknown|x*) lt_cv_dlopen_self=no ;;
6959     esac
6960   else :
6961     # compilation failed
6962     lt_cv_dlopen_self=no
6963   fi
6964 fi
6965 rm -fr conftest*
6966
6967     
6968 fi
6969
6970 echo "$ac_t""$lt_cv_dlopen_self" 1>&6
6971
6972     if test "x$lt_cv_dlopen_self" = xyes; then
6973       LDFLAGS="$LDFLAGS $link_static_flag"
6974       echo $ac_n "checking whether a statically linked program can dlopen itself""... $ac_c" 1>&6
6975 echo "configure:6976: checking whether a statically linked program can dlopen itself" >&5
6976 if eval "test \"\${lt_cv_dlopen_self_static+set}\" = set"; then
6977   echo $ac_n "(cached) $ac_c" 1>&6
6978 else
6979           if test "$cross_compiling" = yes; then :
6980   lt_cv_dlopen_self_static=cross
6981 else
6982     lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
6983   lt_status=$lt_dlunknown
6984   cat > conftest.$ac_ext <<EOF
6985 #line 6986 "configure"
6986 #include "confdefs.h"
6987
6988 #if HAVE_DLFCN_H
6989 #include <dlfcn.h>
6990 #endif
6991
6992 #include <stdio.h>
6993
6994 #ifdef RTLD_GLOBAL
6995 #  define LT_DLGLOBAL           RTLD_GLOBAL
6996 #else
6997 #  ifdef DL_GLOBAL
6998 #    define LT_DLGLOBAL         DL_GLOBAL
6999 #  else
7000 #    define LT_DLGLOBAL         0
7001 #  endif
7002 #endif
7003
7004 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
7005    find out it does not work in some platform. */
7006 #ifndef LT_DLLAZY_OR_NOW
7007 #  ifdef RTLD_LAZY
7008 #    define LT_DLLAZY_OR_NOW            RTLD_LAZY
7009 #  else
7010 #    ifdef DL_LAZY
7011 #      define LT_DLLAZY_OR_NOW          DL_LAZY
7012 #    else
7013 #      ifdef RTLD_NOW
7014 #        define LT_DLLAZY_OR_NOW        RTLD_NOW
7015 #      else
7016 #        ifdef DL_NOW
7017 #          define LT_DLLAZY_OR_NOW      DL_NOW
7018 #        else
7019 #          define LT_DLLAZY_OR_NOW      0
7020 #        endif
7021 #      endif
7022 #    endif
7023 #  endif
7024 #endif
7025
7026 #ifdef __cplusplus
7027 extern "C" void exit (int);
7028 #endif
7029
7030 void fnord() { int i=42;}
7031 int main ()
7032 {
7033   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
7034   int status = $lt_dlunknown;
7035
7036   if (self)
7037     {
7038       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
7039       else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
7040       /* dlclose (self); */
7041     }
7042
7043     exit (status);
7044 }
7045 EOF
7046   if { (eval echo configure:7047: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} 2>/dev/null; then
7047     (./conftest; exit; ) 2>/dev/null
7048     lt_status=$?
7049     case x$lt_status in
7050       x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;;
7051       x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;;
7052       x$lt_unknown|x*) lt_cv_dlopen_self_static=no ;;
7053     esac
7054   else :
7055     # compilation failed
7056     lt_cv_dlopen_self_static=no
7057   fi
7058 fi
7059 rm -fr conftest*
7060
7061       
7062 fi
7063
7064 echo "$ac_t""$lt_cv_dlopen_self_static" 1>&6
7065     fi
7066
7067     CPPFLAGS="$save_CPPFLAGS"
7068     LDFLAGS="$save_LDFLAGS"
7069     LIBS="$save_LIBS"
7070     ;;
7071   esac
7072
7073   case $lt_cv_dlopen_self in
7074   yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
7075   *) enable_dlopen_self=unknown ;;
7076   esac
7077
7078   case $lt_cv_dlopen_self_static in
7079   yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
7080   *) enable_dlopen_self_static=unknown ;;
7081   esac
7082 fi
7083
7084
7085 if test "$enable_shared" = yes && test "$GCC" = yes; then
7086   case $archive_cmds in
7087   *'~'*)
7088     # FIXME: we may have to deal with multi-command sequences.
7089     ;;
7090   '$CC '*)
7091     # Test whether the compiler implicitly links with -lc since on some
7092     # systems, -lgcc has to come before -lc. If gcc already passes -lc
7093     # to ld, don't add -lc before -lgcc.
7094     echo $ac_n "checking whether -lc should be explicitly linked in""... $ac_c" 1>&6
7095 echo "configure:7096: checking whether -lc should be explicitly linked in" >&5
7096     if eval "test \"\${lt_cv_archive_cmds_need_lc+set}\" = set"; then
7097   echo $ac_n "(cached) $ac_c" 1>&6
7098 else
7099   $rm conftest*
7100     echo 'static int dummy;' > conftest.$ac_ext
7101
7102     if { (eval echo configure:7103: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7103       soname=conftest
7104       lib=conftest
7105       libobjs=conftest.$ac_objext
7106       deplibs=
7107       wl=$lt_cv_prog_cc_wl
7108       compiler_flags=-v
7109       linker_flags=-v
7110       verstring=
7111       output_objdir=.
7112       libname=conftest
7113       save_allow_undefined_flag=$allow_undefined_flag
7114       allow_undefined_flag=
7115       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; }
7116       then
7117         lt_cv_archive_cmds_need_lc=no
7118       else
7119         lt_cv_archive_cmds_need_lc=yes
7120       fi
7121       allow_undefined_flag=$save_allow_undefined_flag
7122     else
7123       cat conftest.err 1>&5
7124     fi
7125 fi
7126
7127     echo "$ac_t""$lt_cv_archive_cmds_need_lc" 1>&6
7128     ;;
7129   esac
7130 fi
7131 need_lc=${lt_cv_archive_cmds_need_lc-yes}
7132
7133 # The second clause should only fire when bootstrapping the
7134 # libtool distribution, otherwise you forgot to ship ltmain.sh
7135 # with your package, and you will get complaints that there are
7136 # no rules to generate ltmain.sh.
7137 if test -f "$ltmain"; then
7138   :
7139 else
7140   # If there is no Makefile yet, we rely on a make rule to execute
7141   # `config.status --recheck' to rerun these tests and create the
7142   # libtool script then.
7143   test -f Makefile && make "$ltmain"
7144 fi
7145
7146 if test -f "$ltmain"; then
7147   trap "$rm \"${ofile}T\"; exit 1" 1 2 15
7148   $rm -f "${ofile}T"
7149
7150   echo creating $ofile
7151
7152   # Now quote all the things that may contain metacharacters while being
7153   # careful not to overquote the AC_SUBSTed values.  We take copies of the
7154   # variables and quote the copies for generation of the libtool script.
7155   for var in echo old_CC old_CFLAGS SED \
7156     AR AR_FLAGS CC LD LN_S NM SHELL \
7157     reload_flag reload_cmds wl \
7158     pic_flag link_static_flag no_builtin_flag export_dynamic_flag_spec \
7159     thread_safe_flag_spec whole_archive_flag_spec libname_spec \
7160     library_names_spec soname_spec \
7161     RANLIB old_archive_cmds old_archive_from_new_cmds old_postinstall_cmds \
7162     old_postuninstall_cmds archive_cmds archive_expsym_cmds postinstall_cmds \
7163     postuninstall_cmds extract_expsyms_cmds old_archive_from_expsyms_cmds \
7164     old_striplib striplib file_magic_cmd export_symbols_cmds \
7165     deplibs_check_method allow_undefined_flag no_undefined_flag \
7166     finish_cmds finish_eval global_symbol_pipe global_symbol_to_cdecl \
7167     global_symbol_to_c_name_address \
7168     hardcode_libdir_flag_spec hardcode_libdir_separator  \
7169     sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
7170     compiler_c_o compiler_o_lo need_locks exclude_expsyms include_expsyms; do
7171
7172     case $var in
7173     reload_cmds | old_archive_cmds | old_archive_from_new_cmds | \
7174     old_postinstall_cmds | old_postuninstall_cmds | \
7175     export_symbols_cmds | archive_cmds | archive_expsym_cmds | \
7176     extract_expsyms_cmds | old_archive_from_expsyms_cmds | \
7177     postinstall_cmds | postuninstall_cmds | \
7178     finish_cmds | sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
7179       # Double-quote double-evaled strings.
7180       eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
7181       ;;
7182     *)
7183       eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
7184       ;;
7185     esac
7186   done
7187
7188   cat <<__EOF__ > "${ofile}T"
7189 #! $SHELL
7190
7191 # `$echo "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
7192 # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
7193 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
7194 #
7195 # Copyright (C) 1996-2000 Free Software Foundation, Inc.
7196 # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
7197 #
7198 # This program is free software; you can redistribute it and/or modify
7199 # it under the terms of the GNU General Public License as published by
7200 # the Free Software Foundation; either version 2 of the License, or
7201 # (at your option) any later version.
7202 #
7203 # This program is distributed in the hope that it will be useful, but
7204 # WITHOUT ANY WARRANTY; without even the implied warranty of
7205 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
7206 # General Public License for more details.
7207 #
7208 # You should have received a copy of the GNU General Public License
7209 # along with this program; if not, write to the Free Software
7210 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
7211 #
7212 # As a special exception to the GNU General Public License, if you
7213 # distribute this file as part of a program that contains a
7214 # configuration script generated by Autoconf, you may include it under
7215 # the same distribution terms that you use for the rest of that program.
7216
7217 # A sed that does not truncate output.
7218 SED=$lt_SED
7219
7220 # Sed that helps us avoid accidentally triggering echo(1) options like -n.
7221 Xsed="${SED} -e s/^X//"
7222
7223 # The HP-UX ksh and POSIX shell print the target directory to stdout
7224 # if CDPATH is set.
7225 if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
7226
7227 # ### BEGIN LIBTOOL CONFIG
7228
7229 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
7230
7231 # Shell to use when invoking shell scripts.
7232 SHELL=$lt_SHELL
7233
7234 # Whether or not to build shared libraries.
7235 build_libtool_libs=$enable_shared
7236
7237 # Whether or not to build static libraries.
7238 build_old_libs=$enable_static
7239
7240 # Whether or not to add -lc for building shared libraries.
7241 build_libtool_need_lc=$need_lc
7242
7243 # Whether or not to optimize for fast installation.
7244 fast_install=$enable_fast_install
7245
7246 # The host system.
7247 host_alias=$host_alias
7248 host=$host
7249
7250 # An echo program that does not interpret backslashes.
7251 echo=$lt_echo
7252
7253 # The archiver.
7254 AR=$lt_AR
7255 AR_FLAGS=$lt_AR_FLAGS
7256
7257 # The default C compiler.
7258 CC=$lt_CC
7259
7260 # Is the compiler the GNU C compiler?
7261 with_gcc=$GCC
7262
7263 # The linker used to build libraries.
7264 LD=$lt_LD
7265
7266 # Whether we need hard or soft links.
7267 LN_S=$lt_LN_S
7268
7269 # A BSD-compatible nm program.
7270 NM=$lt_NM
7271
7272 # A symbol stripping program
7273 STRIP=$STRIP
7274
7275 # Used to examine libraries when file_magic_cmd begins "file"
7276 MAGIC_CMD=$MAGIC_CMD
7277
7278 # Used on cygwin: DLL creation program.
7279 DLLTOOL="$DLLTOOL"
7280
7281 # Used on cygwin: object dumper.
7282 OBJDUMP="$OBJDUMP"
7283
7284 # Used on cygwin: assembler.
7285 AS="$AS"
7286
7287 # The name of the directory that contains temporary libtool files.
7288 objdir=$objdir
7289
7290 # How to create reloadable object files.
7291 reload_flag=$lt_reload_flag
7292 reload_cmds=$lt_reload_cmds
7293
7294 # How to pass a linker flag through the compiler.
7295 wl=$lt_wl
7296
7297 # Object file suffix (normally "o").
7298 objext="$ac_objext"
7299
7300 # Old archive suffix (normally "a").
7301 libext="$libext"
7302
7303 # Executable file suffix (normally "").
7304 exeext="$exeext"
7305
7306 # Additional compiler flags for building library objects.
7307 pic_flag=$lt_pic_flag
7308 pic_mode=$pic_mode
7309
7310 # Does compiler simultaneously support -c and -o options?
7311 compiler_c_o=$lt_compiler_c_o
7312
7313 # Can we write directly to a .lo ?
7314 compiler_o_lo=$lt_compiler_o_lo
7315
7316 # Must we lock files when doing compilation ?
7317 need_locks=$lt_need_locks
7318
7319 # Do we need the lib prefix for modules?
7320 need_lib_prefix=$need_lib_prefix
7321
7322 # Do we need a version for libraries?
7323 need_version=$need_version
7324
7325 # Whether dlopen is supported.
7326 dlopen_support=$enable_dlopen
7327
7328 # Whether dlopen of programs is supported.
7329 dlopen_self=$enable_dlopen_self
7330
7331 # Whether dlopen of statically linked programs is supported.
7332 dlopen_self_static=$enable_dlopen_self_static
7333
7334 # Compiler flag to prevent dynamic linking.
7335 link_static_flag=$lt_link_static_flag
7336
7337 # Compiler flag to turn off builtin functions.
7338 no_builtin_flag=$lt_no_builtin_flag
7339
7340 # Compiler flag to allow reflexive dlopens.
7341 export_dynamic_flag_spec=$lt_export_dynamic_flag_spec
7342
7343 # Compiler flag to generate shared objects directly from archives.
7344 whole_archive_flag_spec=$lt_whole_archive_flag_spec
7345
7346 # Compiler flag to generate thread-safe objects.
7347 thread_safe_flag_spec=$lt_thread_safe_flag_spec
7348
7349 # Library versioning type.
7350 version_type=$version_type
7351
7352 # Format of library name prefix.
7353 libname_spec=$lt_libname_spec
7354
7355 # List of archive names.  First name is the real one, the rest are links.
7356 # The last name is the one that the linker finds with -lNAME.
7357 library_names_spec=$lt_library_names_spec
7358
7359 # The coded name of the library, if different from the real name.
7360 soname_spec=$lt_soname_spec
7361
7362 # Commands used to build and install an old-style archive.
7363 RANLIB=$lt_RANLIB
7364 old_archive_cmds=$lt_old_archive_cmds
7365 old_postinstall_cmds=$lt_old_postinstall_cmds
7366 old_postuninstall_cmds=$lt_old_postuninstall_cmds
7367
7368 # Create an old-style archive from a shared archive.
7369 old_archive_from_new_cmds=$lt_old_archive_from_new_cmds
7370
7371 # Create a temporary old-style archive to link instead of a shared archive.
7372 old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds
7373
7374 # Commands used to build and install a shared archive.
7375 archive_cmds=$lt_archive_cmds
7376 archive_expsym_cmds=$lt_archive_expsym_cmds
7377 postinstall_cmds=$lt_postinstall_cmds
7378 postuninstall_cmds=$lt_postuninstall_cmds
7379
7380 # Commands to strip libraries.
7381 old_striplib=$lt_old_striplib
7382 striplib=$lt_striplib
7383
7384 # Method to check whether dependent libraries are shared objects.
7385 deplibs_check_method=$lt_deplibs_check_method
7386
7387 # Command to use when deplibs_check_method == file_magic.
7388 file_magic_cmd=$lt_file_magic_cmd
7389
7390 # Flag that allows shared libraries with undefined symbols to be built.
7391 allow_undefined_flag=$lt_allow_undefined_flag
7392
7393 # Flag that forces no undefined symbols.
7394 no_undefined_flag=$lt_no_undefined_flag
7395
7396 # Commands used to finish a libtool library installation in a directory.
7397 finish_cmds=$lt_finish_cmds
7398
7399 # Same as above, but a single script fragment to be evaled but not shown.
7400 finish_eval=$lt_finish_eval
7401
7402 # Take the output of nm and produce a listing of raw symbols and C names.
7403 global_symbol_pipe=$lt_global_symbol_pipe
7404
7405 # Transform the output of nm in a proper C declaration
7406 global_symbol_to_cdecl=$lt_global_symbol_to_cdecl
7407
7408 # Transform the output of nm in a C name address pair
7409 global_symbol_to_c_name_address=$lt_global_symbol_to_c_name_address
7410
7411 # This is the shared library runtime path variable.
7412 runpath_var=$runpath_var
7413
7414 # This is the shared library path variable.
7415 shlibpath_var=$shlibpath_var
7416
7417 # Is shlibpath searched before the hard-coded library search path?
7418 shlibpath_overrides_runpath=$shlibpath_overrides_runpath
7419
7420 # How to hardcode a shared library path into an executable.
7421 hardcode_action=$hardcode_action
7422
7423 # Whether we should hardcode library paths into libraries.
7424 hardcode_into_libs=$hardcode_into_libs
7425
7426 # Flag to hardcode \$libdir into a binary during linking.
7427 # This must work even if \$libdir does not exist.
7428 hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
7429
7430 # Whether we need a single -rpath flag with a separated argument.
7431 hardcode_libdir_separator=$lt_hardcode_libdir_separator
7432
7433 # Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
7434 # resulting binary.
7435 hardcode_direct=$hardcode_direct
7436
7437 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
7438 # resulting binary.
7439 hardcode_minus_L=$hardcode_minus_L
7440
7441 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
7442 # the resulting binary.
7443 hardcode_shlibpath_var=$hardcode_shlibpath_var
7444
7445 # Variables whose values should be saved in libtool wrapper scripts and
7446 # restored at relink time.
7447 variables_saved_for_relink="$variables_saved_for_relink"
7448
7449 # Whether libtool must link a program against all its dependency libraries.
7450 link_all_deplibs=$link_all_deplibs
7451
7452 # Compile-time system search path for libraries
7453 sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
7454
7455 # Run-time system search path for libraries
7456 sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
7457
7458 # Fix the shell variable \$srcfile for the compiler.
7459 fix_srcfile_path="$fix_srcfile_path"
7460
7461 # Set to yes if exported symbols are required.
7462 always_export_symbols=$always_export_symbols
7463
7464 # The commands to list exported symbols.
7465 export_symbols_cmds=$lt_export_symbols_cmds
7466
7467 # The commands to extract the exported symbol list from a shared archive.
7468 extract_expsyms_cmds=$lt_extract_expsyms_cmds
7469
7470 # Symbols that should not be listed in the preloaded symbols.
7471 exclude_expsyms=$lt_exclude_expsyms
7472
7473 # Symbols that must always be exported.
7474 include_expsyms=$lt_include_expsyms
7475
7476 # ### END LIBTOOL CONFIG
7477
7478 __EOF__
7479
7480   case $host_os in
7481   aix3*)
7482     cat <<\EOF >> "${ofile}T"
7483
7484 # AIX sometimes has problems with the GCC collect2 program.  For some
7485 # reason, if we set the COLLECT_NAMES environment variable, the problems
7486 # vanish in a puff of smoke.
7487 if test "X${COLLECT_NAMES+set}" != Xset; then
7488   COLLECT_NAMES=
7489   export COLLECT_NAMES
7490 fi
7491 EOF
7492     ;;
7493   esac
7494
7495   case $host_os in
7496   cygwin* | mingw* | pw32* | os2*)
7497     cat <<'EOF' >> "${ofile}T"
7498       # This is a source program that is used to create dlls on Windows
7499       # Don't remove nor modify the starting and closing comments
7500 # /* ltdll.c starts here */
7501 # #define WIN32_LEAN_AND_MEAN
7502 # #include <windows.h>
7503 # #undef WIN32_LEAN_AND_MEAN
7504 # #include <stdio.h>
7505 #
7506 # #ifndef __CYGWIN__
7507 # #  ifdef __CYGWIN32__
7508 # #    define __CYGWIN__ __CYGWIN32__
7509 # #  endif
7510 # #endif
7511 #
7512 # #ifdef __cplusplus
7513 # extern "C" {
7514 # #endif
7515 # BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
7516 # #ifdef __cplusplus
7517 # }
7518 # #endif
7519 #
7520 # #ifdef __CYGWIN__
7521 # #include <cygwin/cygwin_dll.h>
7522 # DECLARE_CYGWIN_DLL( DllMain );
7523 # #endif
7524 # HINSTANCE __hDllInstance_base;
7525 #
7526 # BOOL APIENTRY
7527 # DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
7528 # {
7529 #   __hDllInstance_base = hInst;
7530 #   return TRUE;
7531 # }
7532 # /* ltdll.c ends here */
7533         # This is a source program that is used to create import libraries
7534         # on Windows for dlls which lack them. Don't remove nor modify the
7535         # starting and closing comments
7536 # /* impgen.c starts here */
7537 # /*   Copyright (C) 1999-2000 Free Software Foundation, Inc.
7538 #
7539 #  This file is part of GNU libtool.
7540 #
7541 #  This program is free software; you can redistribute it and/or modify
7542 #  it under the terms of the GNU General Public License as published by
7543 #  the Free Software Foundation; either version 2 of the License, or
7544 #  (at your option) any later version.
7545 #
7546 #  This program is distributed in the hope that it will be useful,
7547 #  but WITHOUT ANY WARRANTY; without even the implied warranty of
7548 #  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
7549 #  GNU General Public License for more details.
7550 #
7551 #  You should have received a copy of the GNU General Public License
7552 #  along with this program; if not, write to the Free Software
7553 #  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
7554 #  */
7555 #
7556 # #include <stdio.h>            /* for printf() */
7557 # #include <unistd.h>           /* for open(), lseek(), read() */
7558 # #include <fcntl.h>            /* for O_RDONLY, O_BINARY */
7559 # #include <string.h>           /* for strdup() */
7560 #
7561 # /* O_BINARY isn't required (or even defined sometimes) under Unix */
7562 # #ifndef O_BINARY
7563 # #define O_BINARY 0
7564 # #endif
7565 #
7566 # static unsigned int
7567 # pe_get16 (fd, offset)
7568 #      int fd;
7569 #      int offset;
7570 # {
7571 #   unsigned char b[2];
7572 #   lseek (fd, offset, SEEK_SET);
7573 #   read (fd, b, 2);
7574 #   return b[0] + (b[1]<<8);
7575 # }
7576 #
7577 # static unsigned int
7578 # pe_get32 (fd, offset)
7579 #     int fd;
7580 #     int offset;
7581 # {
7582 #   unsigned char b[4];
7583 #   lseek (fd, offset, SEEK_SET);
7584 #   read (fd, b, 4);
7585 #   return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
7586 # }
7587 #
7588 # static unsigned int
7589 # pe_as32 (ptr)
7590 #      void *ptr;
7591 # {
7592 #   unsigned char *b = ptr;
7593 #   return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
7594 # }
7595 #
7596 # int
7597 # main (argc, argv)
7598 #     int argc;
7599 #     char *argv[];
7600 # {
7601 #     int dll;
7602 #     unsigned long pe_header_offset, opthdr_ofs, num_entries, i;
7603 #     unsigned long export_rva, export_size, nsections, secptr, expptr;
7604 #     unsigned long name_rvas, nexp;
7605 #     unsigned char *expdata, *erva;
7606 #     char *filename, *dll_name;
7607 #
7608 #     filename = argv[1];
7609 #
7610 #     dll = open(filename, O_RDONLY|O_BINARY);
7611 #     if (dll < 1)
7612 #       return 1;
7613 #
7614 #     dll_name = filename;
7615 #
7616 #     for (i=0; filename[i]; i++)
7617 #       if (filename[i] == '/' || filename[i] == '\\'  || filename[i] == ':')
7618 #           dll_name = filename + i +1;
7619 #
7620 #     pe_header_offset = pe_get32 (dll, 0x3c);
7621 #     opthdr_ofs = pe_header_offset + 4 + 20;
7622 #     num_entries = pe_get32 (dll, opthdr_ofs + 92);
7623 #
7624 #     if (num_entries < 1) /* no exports */
7625 #       return 1;
7626 #
7627 #     export_rva = pe_get32 (dll, opthdr_ofs + 96);
7628 #     export_size = pe_get32 (dll, opthdr_ofs + 100);
7629 #     nsections = pe_get16 (dll, pe_header_offset + 4 +2);
7630 #     secptr = (pe_header_offset + 4 + 20 +
7631 #             pe_get16 (dll, pe_header_offset + 4 + 16));
7632 #
7633 #     expptr = 0;
7634 #     for (i = 0; i < nsections; i++)
7635 #     {
7636 #       char sname[8];
7637 #       unsigned long secptr1 = secptr + 40 * i;
7638 #       unsigned long vaddr = pe_get32 (dll, secptr1 + 12);
7639 #       unsigned long vsize = pe_get32 (dll, secptr1 + 16);
7640 #       unsigned long fptr = pe_get32 (dll, secptr1 + 20);
7641 #       lseek(dll, secptr1, SEEK_SET);
7642 #       read(dll, sname, 8);
7643 #       if (vaddr <= export_rva && vaddr+vsize > export_rva)
7644 #       {
7645 #           expptr = fptr + (export_rva - vaddr);
7646 #           if (export_rva + export_size > vaddr + vsize)
7647 #               export_size = vsize - (export_rva - vaddr);
7648 #           break;
7649 #       }
7650 #     }
7651 #
7652 #     expdata = (unsigned char*)malloc(export_size);
7653 #     lseek (dll, expptr, SEEK_SET);
7654 #     read (dll, expdata, export_size);
7655 #     erva = expdata - export_rva;
7656 #
7657 #     nexp = pe_as32 (expdata+24);
7658 #     name_rvas = pe_as32 (expdata+32);
7659 #
7660 #     printf ("EXPORTS\n");
7661 #     for (i = 0; i<nexp; i++)
7662 #     {
7663 #       unsigned long name_rva = pe_as32 (erva+name_rvas+i*4);
7664 #       printf ("\t%s @ %ld ;\n", erva+name_rva, 1+ i);
7665 #     }
7666 #
7667 #     return 0;
7668 # }
7669 # /* impgen.c ends here */
7670
7671 EOF
7672     ;;
7673   esac
7674
7675   # We use sed instead of cat because bash on DJGPP gets confused if
7676   # if finds mixed CR/LF and LF-only lines.  Since sed operates in
7677   # text mode, it properly converts lines to CR/LF.  This bash problem
7678   # is reportedly fixed, but why not run on old versions too?
7679   sed '$q' "$ltmain" >> "${ofile}T" || (rm -f "${ofile}T"; exit 1)
7680
7681   mv -f "${ofile}T" "$ofile" || \
7682     (rm -f "$ofile" && cp "${ofile}T" "$ofile" && rm -f "${ofile}T")
7683   chmod +x "$ofile"
7684 fi
7685
7686
7687
7688
7689
7690 # This can be used to rebuild libtool when needed
7691 LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
7692
7693 # Always use our own libtool.
7694 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
7695
7696 # Prevent multiple expansion
7697
7698
7699
7700 ol_link_perl=no
7701 if test $ol_enable_perl != no ; then
7702         # Extract the first word of "perl", so it can be a program name with args.
7703 set dummy perl; ac_word=$2
7704 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
7705 echo "configure:7706: checking for $ac_word" >&5
7706 if eval "test \"\${ac_cv_path_PERLBIN+set}\" = set"; then
7707   echo $ac_n "(cached) $ac_c" 1>&6
7708 else
7709   case "$PERLBIN" in
7710   /*)
7711   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a path.
7712   ;;
7713   ?:/*)
7714   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a dos path.
7715   ;;
7716   *)
7717   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
7718   ac_dummy="$PATH"
7719   for ac_dir in $ac_dummy; do 
7720     test -z "$ac_dir" && ac_dir=.
7721     if test -f $ac_dir/$ac_word; then
7722       ac_cv_path_PERLBIN="$ac_dir/$ac_word"
7723       break
7724     fi
7725   done
7726   IFS="$ac_save_ifs"
7727   test -z "$ac_cv_path_PERLBIN" && ac_cv_path_PERLBIN="/usr/bin/perl"
7728   ;;
7729 esac
7730 fi
7731 PERLBIN="$ac_cv_path_PERLBIN"
7732 if test -n "$PERLBIN"; then
7733   echo "$ac_t""$PERLBIN" 1>&6
7734 else
7735   echo "$ac_t""no" 1>&6
7736 fi
7737
7738
7739         if test "no$PERLBIN" = "no" ; then
7740                 if test $ol_enable_perl = yes ; then
7741                         { echo "configure: error: could not locate perl" 1>&2; exit 1; }
7742                 fi
7743
7744         else
7745                 PERL_CPPFLAGS="`$PERLBIN -MExtUtils::Embed -e ccopts`"
7746                 PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e 's/ -lc / /' -e 's/ -lc$//'`"
7747
7748                 if test x"$ol_enable_perl" = "xyes" ; then
7749                         SLAPD_PERL_LDFLAGS="$PERL_LDFLAGS"
7750                 else
7751                         MOD_PERL_LDFLAGS="$PERL_LDFLAGS"
7752                 fi
7753                                 ol_link_perl=yes
7754         fi
7755 fi
7756
7757 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
7758 echo "configure:7759: checking how to run the C preprocessor" >&5
7759 # On Suns, sometimes $CPP names a directory.
7760 if test -n "$CPP" && test -d "$CPP"; then
7761   CPP=
7762 fi
7763 if test -z "$CPP"; then
7764 if eval "test \"\${ac_cv_prog_CPP+set}\" = set"; then
7765   echo $ac_n "(cached) $ac_c" 1>&6
7766 else
7767     # This must be in double quotes, not single quotes, because CPP may get
7768   # substituted into the Makefile and "${CC-cc}" will confuse make.
7769   CPP="${CC-cc} -E"
7770   # On the NeXT, cc -E runs the code through the compiler's parser,
7771   # not just through cpp.
7772   cat > conftest.$ac_ext <<EOF
7773 #line 7774 "configure"
7774 #include "confdefs.h"
7775 #include <assert.h>
7776 Syntax Error
7777 EOF
7778 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7779 { (eval echo configure:7780: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7780 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7781 if test -z "$ac_err"; then
7782   :
7783 else
7784   echo "$ac_err" >&5
7785   echo "configure: failed program was:" >&5
7786   cat conftest.$ac_ext >&5
7787   rm -rf conftest*
7788   CPP="${CC-cc} -E -traditional-cpp"
7789   cat > conftest.$ac_ext <<EOF
7790 #line 7791 "configure"
7791 #include "confdefs.h"
7792 #include <assert.h>
7793 Syntax Error
7794 EOF
7795 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7796 { (eval echo configure:7797: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7797 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7798 if test -z "$ac_err"; then
7799   :
7800 else
7801   echo "$ac_err" >&5
7802   echo "configure: failed program was:" >&5
7803   cat conftest.$ac_ext >&5
7804   rm -rf conftest*
7805   CPP="${CC-cc} -nologo -E"
7806   cat > conftest.$ac_ext <<EOF
7807 #line 7808 "configure"
7808 #include "confdefs.h"
7809 #include <assert.h>
7810 Syntax Error
7811 EOF
7812 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7813 { (eval echo configure:7814: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7814 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7815 if test -z "$ac_err"; then
7816   :
7817 else
7818   echo "$ac_err" >&5
7819   echo "configure: failed program was:" >&5
7820   cat conftest.$ac_ext >&5
7821   rm -rf conftest*
7822   CPP=/lib/cpp
7823 fi
7824 rm -f conftest*
7825 fi
7826 rm -f conftest*
7827 fi
7828 rm -f conftest*
7829   ac_cv_prog_CPP="$CPP"
7830 fi
7831   CPP="$ac_cv_prog_CPP"
7832 else
7833   ac_cv_prog_CPP="$CPP"
7834 fi
7835 echo "$ac_t""$CPP" 1>&6
7836
7837
7838
7839 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
7840 echo "configure:7841: checking for Cygwin environment" >&5
7841 if eval "test \"\${ac_cv_cygwin+set}\" = set"; then
7842   echo $ac_n "(cached) $ac_c" 1>&6
7843 else
7844   cat > conftest.$ac_ext <<EOF
7845 #line 7846 "configure"
7846 #include "confdefs.h"
7847
7848 int main() {
7849
7850 #ifndef __CYGWIN__
7851 #define __CYGWIN__ __CYGWIN32__
7852 #endif
7853 return __CYGWIN__;
7854 ; return 0; }
7855 EOF
7856 if { (eval echo configure:7857: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7857   rm -rf conftest*
7858   ac_cv_cygwin=yes
7859 else
7860   echo "configure: failed program was:" >&5
7861   cat conftest.$ac_ext >&5
7862   rm -rf conftest*
7863   ac_cv_cygwin=no
7864 fi
7865 rm -f conftest*
7866 fi
7867
7868 echo "$ac_t""$ac_cv_cygwin" 1>&6
7869 CYGWIN=
7870 test "$ac_cv_cygwin" = yes && CYGWIN=yes
7871 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
7872 echo "configure:7873: checking for mingw32 environment" >&5
7873 if eval "test \"\${ac_cv_mingw32+set}\" = set"; then
7874   echo $ac_n "(cached) $ac_c" 1>&6
7875 else
7876   cat > conftest.$ac_ext <<EOF
7877 #line 7878 "configure"
7878 #include "confdefs.h"
7879
7880 int main() {
7881 return __MINGW32__;
7882 ; return 0; }
7883 EOF
7884 if { (eval echo configure:7885: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7885   rm -rf conftest*
7886   ac_cv_mingw32=yes
7887 else
7888   echo "configure: failed program was:" >&5
7889   cat conftest.$ac_ext >&5
7890   rm -rf conftest*
7891   ac_cv_mingw32=no
7892 fi
7893 rm -f conftest*
7894 fi
7895
7896 echo "$ac_t""$ac_cv_mingw32" 1>&6
7897 MINGW32=
7898 test "$ac_cv_mingw32" = yes && MINGW32=yes
7899
7900
7901
7902 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
7903 echo "configure:7904: checking for executable suffix" >&5
7904 if eval "test \"\${ac_cv_exeext+set}\" = set"; then
7905   echo $ac_n "(cached) $ac_c" 1>&6
7906 else
7907   if test "$CYGWIN" = yes || test "$MINGW32" = yes || test "$EMXOS2" = yes; then
7908   ac_cv_exeext=.exe
7909 else
7910   rm -f conftest*
7911   echo 'int main () { return 0; }' > conftest.$ac_ext
7912   ac_cv_exeext=
7913   if { (eval echo configure:7914: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
7914     for file in conftest.*; do
7915       case $file in
7916       *.c | *.C | *.o | *.obj | *.xcoff) ;;
7917       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
7918       esac
7919     done
7920   else
7921     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
7922   fi
7923   rm -f conftest*
7924   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
7925 fi
7926 fi
7927
7928 EXEEXT=""
7929 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
7930 echo "$ac_t""${ac_cv_exeext}" 1>&6
7931 ac_exeext=$EXEEXT
7932
7933 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
7934 echo "configure:7935: checking for object suffix" >&5
7935 if eval "test \"\${ac_cv_objext+set}\" = set"; then
7936   echo $ac_n "(cached) $ac_c" 1>&6
7937 else
7938   rm -f conftest*
7939 echo 'int i = 1;' > conftest.$ac_ext
7940 if { (eval echo configure:7941: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7941   for ac_file in conftest.*; do
7942     case $ac_file in
7943     *.c) ;;
7944     *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
7945     esac
7946   done
7947 else
7948   { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
7949 fi
7950 rm -f conftest*
7951 fi
7952
7953 echo "$ac_t""$ac_cv_objext" 1>&6
7954 OBJEXT=$ac_cv_objext
7955 ac_objext=$ac_cv_objext
7956
7957
7958 cat >> confdefs.h <<EOF
7959 #define EXEEXT "${EXEEXT}"
7960 EOF
7961
7962
7963 echo $ac_n "checking for be_app in -lbe""... $ac_c" 1>&6
7964 echo "configure:7965: checking for be_app in -lbe" >&5
7965 ac_lib_var=`echo be'_'be_app | sed 'y%./+-:%__p__%'`
7966 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
7967   echo $ac_n "(cached) $ac_c" 1>&6
7968 else
7969   ac_save_LIBS="$LIBS"
7970 LIBS="-lbe -lroot -lnet $LIBS"
7971 cat > conftest.$ac_ext <<EOF
7972 #line 7973 "configure"
7973 #include "confdefs.h"
7974 /* Override any gcc2 internal prototype to avoid an error.  */
7975 /* We use char because int might match the return type of a gcc2
7976     builtin and then its argument prototype would still apply.  */
7977 char be_app();
7978
7979 int main() {
7980 be_app()
7981 ; return 0; }
7982 EOF
7983 if { (eval echo configure:7984: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7984   rm -rf conftest*
7985   eval "ac_cv_lib_$ac_lib_var=yes"
7986 else
7987   echo "configure: failed program was:" >&5
7988   cat conftest.$ac_ext >&5
7989   rm -rf conftest*
7990   eval "ac_cv_lib_$ac_lib_var=no"
7991 fi
7992 rm -f conftest*
7993 LIBS="$ac_save_LIBS"
7994
7995 fi
7996 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7997   echo "$ac_t""yes" 1>&6
7998   LIBS="$LIBS -lbe -lroot -lnet"
7999 else
8000   echo "$ac_t""no" 1>&6
8001 :
8002 fi
8003
8004
8005
8006
8007
8008 echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
8009 echo "configure:8010: checking for ${CC-cc} option to accept ANSI C" >&5
8010 if eval "test \"\${am_cv_prog_cc_stdc+set}\" = set"; then
8011   echo $ac_n "(cached) $ac_c" 1>&6
8012 else
8013   am_cv_prog_cc_stdc=no
8014 ac_save_CC="$CC"
8015 # Don't try gcc -ansi; that turns off useful extensions and
8016 # breaks some systems' header files.
8017 # AIX                   -qlanglvl=ansi
8018 # Ultrix and OSF/1      -std1
8019 # HP-UX 10.20 and later -Ae
8020 # HP-UX older versions  -Aa -D_HPUX_SOURCE
8021 # SVR4                  -Xc -D__EXTENSIONS__
8022 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
8023 do
8024   CC="$ac_save_CC $ac_arg"
8025   cat > conftest.$ac_ext <<EOF
8026 #line 8027 "configure"
8027 #include "confdefs.h"
8028 #include <stdarg.h>
8029 #include <stdio.h>
8030 #include <sys/types.h>
8031 #include <sys/stat.h>
8032 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
8033 struct buf { int x; };
8034 FILE * (*rcsopen) (struct buf *, struct stat *, int);
8035 static char *e (p, i)
8036      char **p;
8037      int i;
8038 {
8039   return p[i];
8040 }
8041 static char *f (char * (*g) (char **, int), char **p, ...)
8042 {
8043   char *s;
8044   va_list v;
8045   va_start (v,p);
8046   s = g (p, va_arg (v,int));
8047   va_end (v);
8048   return s;
8049 }
8050 int test (int i, double x);
8051 struct s1 {int (*f) (int a);};
8052 struct s2 {int (*f) (double a);};
8053 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
8054 int argc;
8055 char **argv;
8056
8057 int main() {
8058
8059 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
8060
8061 ; return 0; }
8062 EOF
8063 if { (eval echo configure:8064: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8064   rm -rf conftest*
8065   am_cv_prog_cc_stdc="$ac_arg"; break
8066 else
8067   echo "configure: failed program was:" >&5
8068   cat conftest.$ac_ext >&5
8069 fi
8070 rm -f conftest*
8071 done
8072 CC="$ac_save_CC"
8073
8074 fi
8075
8076 if test -z "$am_cv_prog_cc_stdc"; then
8077   echo "$ac_t""none needed" 1>&6
8078 else
8079   echo "$ac_t""$am_cv_prog_cc_stdc" 1>&6
8080 fi
8081 case "x$am_cv_prog_cc_stdc" in
8082   x|xno) ;;
8083   *) CC="$CC $am_cv_prog_cc_stdc" ;;
8084 esac
8085
8086 if test "X${am_cv_prog_cc_stdc}" = "Xno" ; then
8087         { echo "configure: error: OpenLDAP requires compiler to support STDC constructs." 1>&2; exit 1; }
8088 fi
8089
8090 # test for make depend flag
8091 OL_MKDEP=
8092 OL_MKDEP_FLAGS=
8093 if test -z "${MKDEP}"; then
8094         OL_MKDEP="${CC-cc}"
8095         if test -z "${MKDEP_FLAGS}"; then
8096                 echo $ac_n "checking for ${OL_MKDEP} depend flag""... $ac_c" 1>&6
8097 echo "configure:8098: checking for ${OL_MKDEP} depend flag" >&5
8098 if eval "test \"\${ol_cv_mkdep+set}\" = set"; then
8099   echo $ac_n "(cached) $ac_c" 1>&6
8100 else
8101   
8102                         ol_cv_mkdep=no
8103                         for flag in "-M" "-xM"; do
8104                                 cat > conftest.c <<EOF
8105  noCode;
8106 EOF
8107                                 if { ac_try='$OL_MKDEP $flag conftest.c'; { (eval echo configure:8108: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } \
8108                                         | egrep '^conftest\.'"${ac_objext}" >/dev/null 2>&1
8109                                 then
8110                                         if test ! -f conftest."${ac_object}" ; then
8111                                                 ol_cv_mkdep=$flag
8112                                                 OL_MKDEP_FLAGS="$flag"
8113                                                 break
8114                                         fi
8115                                 fi
8116                         done
8117                         rm -f conftest*
8118                 
8119 fi
8120
8121 echo "$ac_t""$ol_cv_mkdep" 1>&6
8122         else
8123                 cc_cv_mkdep=yes
8124                 OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
8125         fi
8126 else
8127         cc_cv_mkdep=yes
8128         OL_MKDEP="${MKDEP}"
8129         OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
8130 fi
8131
8132
8133
8134 if test "${ol_cv_mkdep}" = no ; then
8135         # this will soon become an error
8136         echo "configure: warning: do not know how to generate dependencies" 1>&2
8137 fi
8138
8139 echo $ac_n "checking for afopen in -ls""... $ac_c" 1>&6
8140 echo "configure:8141: checking for afopen in -ls" >&5
8141 ac_lib_var=`echo s'_'afopen | sed 'y%./+-:%__p__%'`
8142 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8143   echo $ac_n "(cached) $ac_c" 1>&6
8144 else
8145   ac_save_LIBS="$LIBS"
8146 LIBS="-ls  $LIBS"
8147 cat > conftest.$ac_ext <<EOF
8148 #line 8149 "configure"
8149 #include "confdefs.h"
8150 /* Override any gcc2 internal prototype to avoid an error.  */
8151 /* We use char because int might match the return type of a gcc2
8152     builtin and then its argument prototype would still apply.  */
8153 char afopen();
8154
8155 int main() {
8156 afopen()
8157 ; return 0; }
8158 EOF
8159 if { (eval echo configure:8160: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8160   rm -rf conftest*
8161   eval "ac_cv_lib_$ac_lib_var=yes"
8162 else
8163   echo "configure: failed program was:" >&5
8164   cat conftest.$ac_ext >&5
8165   rm -rf conftest*
8166   eval "ac_cv_lib_$ac_lib_var=no"
8167 fi
8168 rm -f conftest*
8169 LIBS="$ac_save_LIBS"
8170
8171 fi
8172 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8173   echo "$ac_t""yes" 1>&6
8174   
8175         AUTH_LIBS=-ls
8176         cat >> confdefs.h <<\EOF
8177 #define HAVE_AIX_SECURITY 1
8178 EOF
8179
8180
8181 else
8182   echo "$ac_t""no" 1>&6
8183 fi
8184
8185
8186 case "$target" in
8187 *-ibm-openedition)
8188         ac_cv_func_getopt=no
8189         cat >> confdefs.h <<\EOF
8190 #define BOTH_STRINGS_H 1
8191 EOF
8192
8193         ;;
8194 esac
8195
8196 ol_link_modules=no
8197 if test $ol_enable_modules != no ; then
8198         for ac_hdr in ltdl.h
8199 do
8200 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8201 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8202 echo "configure:8203: checking for $ac_hdr" >&5
8203 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
8204   echo $ac_n "(cached) $ac_c" 1>&6
8205 else
8206   cat > conftest.$ac_ext <<EOF
8207 #line 8208 "configure"
8208 #include "confdefs.h"
8209 #include <$ac_hdr>
8210 EOF
8211 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8212 { (eval echo configure:8213: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8213 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8214 if test -z "$ac_err"; then
8215   rm -rf conftest*
8216   eval "ac_cv_header_$ac_safe=yes"
8217 else
8218   echo "$ac_err" >&5
8219   echo "configure: failed program was:" >&5
8220   cat conftest.$ac_ext >&5
8221   rm -rf conftest*
8222   eval "ac_cv_header_$ac_safe=no"
8223 fi
8224 rm -f conftest*
8225 fi
8226 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8227   echo "$ac_t""yes" 1>&6
8228     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8229   cat >> confdefs.h <<EOF
8230 #define $ac_tr_hdr 1
8231 EOF
8232  
8233 else
8234   echo "$ac_t""no" 1>&6
8235 fi
8236 done
8237
8238
8239         if test $ac_cv_header_ltdl_h = no ; then
8240                 { echo "configure: error: could not locate libtool ltdl.h" 1>&2; exit 1; }
8241         fi
8242
8243         echo $ac_n "checking for lt_dlinit in -lltdl""... $ac_c" 1>&6
8244 echo "configure:8245: checking for lt_dlinit in -lltdl" >&5
8245 ac_lib_var=`echo ltdl'_'lt_dlinit | sed 'y%./+-:%__p__%'`
8246 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8247   echo $ac_n "(cached) $ac_c" 1>&6
8248 else
8249   ac_save_LIBS="$LIBS"
8250 LIBS="-lltdl  $LIBS"
8251 cat > conftest.$ac_ext <<EOF
8252 #line 8253 "configure"
8253 #include "confdefs.h"
8254 /* Override any gcc2 internal prototype to avoid an error.  */
8255 /* We use char because int might match the return type of a gcc2
8256     builtin and then its argument prototype would still apply.  */
8257 char lt_dlinit();
8258
8259 int main() {
8260 lt_dlinit()
8261 ; return 0; }
8262 EOF
8263 if { (eval echo configure:8264: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8264   rm -rf conftest*
8265   eval "ac_cv_lib_$ac_lib_var=yes"
8266 else
8267   echo "configure: failed program was:" >&5
8268   cat conftest.$ac_ext >&5
8269   rm -rf conftest*
8270   eval "ac_cv_lib_$ac_lib_var=no"
8271 fi
8272 rm -f conftest*
8273 LIBS="$ac_save_LIBS"
8274
8275 fi
8276 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8277   echo "$ac_t""yes" 1>&6
8278   
8279                 MODULES_LIBS=-lltdl
8280                 cat >> confdefs.h <<\EOF
8281 #define HAVE_LIBLTDL 1
8282 EOF
8283
8284         
8285 else
8286   echo "$ac_t""no" 1>&6
8287 fi
8288
8289
8290         if test "$ac_cv_lib_ltdl_lt_dlinit" = no ; then
8291                 { echo "configure: error: could not locate libtool -lltdl" 1>&2; exit 1; }
8292         fi
8293         ol_link_modules=yes
8294
8295 else
8296         for i in $Backends; do
8297                 eval "ol_tmp=\$ol_enable_$i"
8298                 if test $ol_tmp = mod ; then
8299                         echo "configure: warning: building static $i backend" 1>&2
8300                         eval "ol_enable_$i=yes"
8301                 fi
8302         done
8303         for i in $Overlays; do
8304                 eval "ol_tmp=\$ol_enable_$i"
8305                 if test $ol_tmp = mod ; then
8306                         echo "configure: warning: building static $i overlay" 1>&2
8307                         eval "ol_enable_$i=yes"
8308                 fi
8309         done
8310 fi
8311
8312 # test for EBCDIC
8313 echo $ac_n "checking for EBCDIC""... $ac_c" 1>&6
8314 echo "configure:8315: checking for EBCDIC" >&5
8315 if eval "test \"\${ol_cv_cpp_ebcdic+set}\" = set"; then
8316   echo $ac_n "(cached) $ac_c" 1>&6
8317 else
8318   
8319         cat > conftest.$ac_ext <<EOF
8320 #line 8321 "configure"
8321 #include "confdefs.h"
8322
8323 #if !('M' == 0xd4)
8324 #include <__ASCII__/generate_error.h>
8325 #endif
8326
8327 EOF
8328 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8329 { (eval echo configure:8330: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8330 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8331 if test -z "$ac_err"; then
8332   rm -rf conftest*
8333   ol_cv_cpp_ebcdic=yes
8334 else
8335   echo "$ac_err" >&5
8336   echo "configure: failed program was:" >&5
8337   cat conftest.$ac_ext >&5
8338   rm -rf conftest*
8339   ol_cv_cpp_ebcdic=no
8340 fi
8341 rm -f conftest*
8342 fi
8343
8344 echo "$ac_t""$ol_cv_cpp_ebcdic" 1>&6
8345 if test $ol_cv_cpp_ebcdic = yes ; then
8346         cat >> confdefs.h <<\EOF
8347 #define HAVE_EBCDIC 1
8348 EOF
8349
8350 fi
8351
8352 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
8353 echo "configure:8354: checking for ANSI C header files" >&5
8354 if eval "test \"\${ol_cv_header_stdc+set}\" = set"; then
8355   echo $ac_n "(cached) $ac_c" 1>&6
8356 else
8357   cat > conftest.$ac_ext <<EOF
8358 #line 8359 "configure"
8359 #include "confdefs.h"
8360 #include <stdlib.h>
8361 #include <stdarg.h>
8362 #include <string.h>
8363 #include <float.h>
8364 EOF
8365 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8366 { (eval echo configure:8367: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8367 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8368 if test -z "$ac_err"; then
8369   rm -rf conftest*
8370   ol_cv_header_stdc=yes
8371 else
8372   echo "$ac_err" >&5
8373   echo "configure: failed program was:" >&5
8374   cat conftest.$ac_ext >&5
8375   rm -rf conftest*
8376   ol_cv_header_stdc=no
8377 fi
8378 rm -f conftest*
8379
8380 if test $ol_cv_header_stdc = yes; then
8381   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
8382 cat > conftest.$ac_ext <<EOF
8383 #line 8384 "configure"
8384 #include "confdefs.h"
8385 #include <string.h>
8386 EOF
8387 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8388   egrep "memchr" >/dev/null 2>&1; then
8389   :
8390 else
8391   rm -rf conftest*
8392   ol_cv_header_stdc=no
8393 fi
8394 rm -f conftest*
8395
8396 fi
8397
8398 if test $ol_cv_header_stdc = yes; then
8399   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
8400 cat > conftest.$ac_ext <<EOF
8401 #line 8402 "configure"
8402 #include "confdefs.h"
8403 #include <stdlib.h>
8404 EOF
8405 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8406   egrep "free" >/dev/null 2>&1; then
8407   :
8408 else
8409   rm -rf conftest*
8410   ol_cv_header_stdc=no
8411 fi
8412 rm -f conftest*
8413
8414 fi
8415
8416 if test $ol_cv_header_stdc = yes; then
8417   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
8418 if test "$cross_compiling" = yes; then
8419   :
8420 else
8421   cat > conftest.$ac_ext <<EOF
8422 #line 8423 "configure"
8423 #include "confdefs.h"
8424 #include <ctype.h>
8425 #ifndef HAVE_EBCDIC
8426 #       define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
8427 #       define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
8428 #else
8429 #       define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
8430                 || ('j' <= (c) && (c) <= 'r') \
8431                 || ('s' <= (c) && (c) <= 'z'))
8432 #       define TOUPPER(c)       (ISLOWER(c) ? ((c) | 0x40) : (c))
8433 #endif
8434 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
8435 int main () { int i; for (i = 0; i < 256; i++)
8436 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
8437 exit (0); }
8438
8439 EOF
8440 if { (eval echo configure:8441: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
8441 then
8442   :
8443 else
8444   echo "configure: failed program was:" >&5
8445   cat conftest.$ac_ext >&5
8446   rm -fr conftest*
8447   ol_cv_header_stdc=no
8448 fi
8449 rm -fr conftest*
8450 fi
8451
8452 fi
8453 fi
8454
8455 echo "$ac_t""$ol_cv_header_stdc" 1>&6
8456 if test $ol_cv_header_stdc = yes; then
8457   cat >> confdefs.h <<\EOF
8458 #define STDC_HEADERS 1
8459 EOF
8460
8461 fi
8462 ac_cv_header_stdc=disable
8463
8464
8465 if test $ol_cv_header_stdc != yes; then
8466         echo "configure: warning: could not locate Standard C compliant headers" 1>&2
8467 fi
8468
8469 ac_header_dirent=no
8470 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
8471 do
8472 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8473 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
8474 echo "configure:8475: checking for $ac_hdr that defines DIR" >&5
8475 if eval "test \"\${ac_cv_header_dirent_$ac_safe+set}\" = set"; then
8476   echo $ac_n "(cached) $ac_c" 1>&6
8477 else
8478   cat > conftest.$ac_ext <<EOF
8479 #line 8480 "configure"
8480 #include "confdefs.h"
8481 #include <sys/types.h>
8482 #include <$ac_hdr>
8483 int main() {
8484 DIR *dirp = 0;
8485 ; return 0; }
8486 EOF
8487 if { (eval echo configure:8488: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8488   rm -rf conftest*
8489   eval "ac_cv_header_dirent_$ac_safe=yes"
8490 else
8491   echo "configure: failed program was:" >&5
8492   cat conftest.$ac_ext >&5
8493   rm -rf conftest*
8494   eval "ac_cv_header_dirent_$ac_safe=no"
8495 fi
8496 rm -f conftest*
8497 fi
8498 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
8499   echo "$ac_t""yes" 1>&6
8500     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8501   cat >> confdefs.h <<EOF
8502 #define $ac_tr_hdr 1
8503 EOF
8504  ac_header_dirent=$ac_hdr; break
8505 else
8506   echo "$ac_t""no" 1>&6
8507 fi
8508 done
8509 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
8510 if test $ac_header_dirent = dirent.h; then
8511 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
8512 echo "configure:8513: checking for opendir in -ldir" >&5
8513 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-:%__p__%'`
8514 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8515   echo $ac_n "(cached) $ac_c" 1>&6
8516 else
8517   ac_save_LIBS="$LIBS"
8518 LIBS="-ldir  $LIBS"
8519 cat > conftest.$ac_ext <<EOF
8520 #line 8521 "configure"
8521 #include "confdefs.h"
8522 /* Override any gcc2 internal prototype to avoid an error.  */
8523 /* We use char because int might match the return type of a gcc2
8524     builtin and then its argument prototype would still apply.  */
8525 char opendir();
8526
8527 int main() {
8528 opendir()
8529 ; return 0; }
8530 EOF
8531 if { (eval echo configure:8532: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8532   rm -rf conftest*
8533   eval "ac_cv_lib_$ac_lib_var=yes"
8534 else
8535   echo "configure: failed program was:" >&5
8536   cat conftest.$ac_ext >&5
8537   rm -rf conftest*
8538   eval "ac_cv_lib_$ac_lib_var=no"
8539 fi
8540 rm -f conftest*
8541 LIBS="$ac_save_LIBS"
8542
8543 fi
8544 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8545   echo "$ac_t""yes" 1>&6
8546   LIBS="$LIBS -ldir"
8547 else
8548   echo "$ac_t""no" 1>&6
8549 fi
8550
8551 else
8552 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
8553 echo "configure:8554: checking for opendir in -lx" >&5
8554 ac_lib_var=`echo x'_'opendir | sed 'y%./+-:%__p__%'`
8555 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8556   echo $ac_n "(cached) $ac_c" 1>&6
8557 else
8558   ac_save_LIBS="$LIBS"
8559 LIBS="-lx  $LIBS"
8560 cat > conftest.$ac_ext <<EOF
8561 #line 8562 "configure"
8562 #include "confdefs.h"
8563 /* Override any gcc2 internal prototype to avoid an error.  */
8564 /* We use char because int might match the return type of a gcc2
8565     builtin and then its argument prototype would still apply.  */
8566 char opendir();
8567
8568 int main() {
8569 opendir()
8570 ; return 0; }
8571 EOF
8572 if { (eval echo configure:8573: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8573   rm -rf conftest*
8574   eval "ac_cv_lib_$ac_lib_var=yes"
8575 else
8576   echo "configure: failed program was:" >&5
8577   cat conftest.$ac_ext >&5
8578   rm -rf conftest*
8579   eval "ac_cv_lib_$ac_lib_var=no"
8580 fi
8581 rm -f conftest*
8582 LIBS="$ac_save_LIBS"
8583
8584 fi
8585 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8586   echo "$ac_t""yes" 1>&6
8587   LIBS="$LIBS -lx"
8588 else
8589   echo "$ac_t""no" 1>&6
8590 fi
8591
8592 fi
8593
8594 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
8595 echo "configure:8596: checking for sys/wait.h that is POSIX.1 compatible" >&5
8596 if eval "test \"\${ac_cv_header_sys_wait_h+set}\" = set"; then
8597   echo $ac_n "(cached) $ac_c" 1>&6
8598 else
8599   cat > conftest.$ac_ext <<EOF
8600 #line 8601 "configure"
8601 #include "confdefs.h"
8602 #include <sys/types.h>
8603 #include <sys/wait.h>
8604 #ifndef WEXITSTATUS
8605 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
8606 #endif
8607 #ifndef WIFEXITED
8608 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
8609 #endif
8610 int main() {
8611 int s;
8612 wait (&s);
8613 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
8614 ; return 0; }
8615 EOF
8616 if { (eval echo configure:8617: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8617   rm -rf conftest*
8618   ac_cv_header_sys_wait_h=yes
8619 else
8620   echo "configure: failed program was:" >&5
8621   cat conftest.$ac_ext >&5
8622   rm -rf conftest*
8623   ac_cv_header_sys_wait_h=no
8624 fi
8625 rm -f conftest*
8626 fi
8627
8628 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
8629 if test $ac_cv_header_sys_wait_h = yes; then
8630   cat >> confdefs.h <<\EOF
8631 #define HAVE_SYS_WAIT_H 1
8632 EOF
8633
8634 fi
8635
8636 echo $ac_n "checking POSIX termios""... $ac_c" 1>&6
8637 echo "configure:8638: checking POSIX termios" >&5
8638 if eval "test \"\${am_cv_sys_posix_termios+set}\" = set"; then
8639   echo $ac_n "(cached) $ac_c" 1>&6
8640 else
8641   cat > conftest.$ac_ext <<EOF
8642 #line 8643 "configure"
8643 #include "confdefs.h"
8644 #include <sys/types.h>
8645 #include <unistd.h>
8646 #include <termios.h>
8647 int main() {
8648 /* SunOS 4.0.3 has termios.h but not the library calls.  */
8649    tcgetattr(0, 0);
8650 ; return 0; }
8651 EOF
8652 if { (eval echo configure:8653: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8653   rm -rf conftest*
8654   am_cv_sys_posix_termios=yes
8655 else
8656   echo "configure: failed program was:" >&5
8657   cat conftest.$ac_ext >&5
8658   rm -rf conftest*
8659   am_cv_sys_posix_termios=no
8660 fi
8661 rm -f conftest*
8662 fi
8663
8664 echo "$ac_t""$am_cv_sys_posix_termios" 1>&6
8665
8666
8667  echo $ac_n "checking whether use of TIOCGWINSZ requires sys/ioctl.h""... $ac_c" 1>&6
8668 echo "configure:8669: checking whether use of TIOCGWINSZ requires sys/ioctl.h" >&5
8669 if eval "test \"\${am_cv_sys_tiocgwinsz_needs_sys_ioctl_h+set}\" = set"; then
8670   echo $ac_n "(cached) $ac_c" 1>&6
8671 else
8672   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=no
8673
8674   gwinsz_in_termios_h=no
8675   if test $am_cv_sys_posix_termios = yes; then
8676     cat > conftest.$ac_ext <<EOF
8677 #line 8678 "configure"
8678 #include "confdefs.h"
8679 #include <sys/types.h>
8680 #     include <termios.h>
8681 #     ifdef TIOCGWINSZ
8682         yes
8683 #     endif
8684     
8685 EOF
8686 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8687   egrep "yes" >/dev/null 2>&1; then
8688   rm -rf conftest*
8689   gwinsz_in_termios_h=yes
8690 fi
8691 rm -f conftest*
8692
8693   fi
8694
8695   if test $gwinsz_in_termios_h = no; then
8696     cat > conftest.$ac_ext <<EOF
8697 #line 8698 "configure"
8698 #include "confdefs.h"
8699 #include <sys/types.h>
8700 #     include <sys/ioctl.h>
8701 #     ifdef TIOCGWINSZ
8702         yes
8703 #     endif
8704     
8705 EOF
8706 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8707   egrep "yes" >/dev/null 2>&1; then
8708   rm -rf conftest*
8709   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=yes
8710 fi
8711 rm -f conftest*
8712
8713   fi
8714   
8715 fi
8716
8717 echo "$ac_t""$am_cv_sys_tiocgwinsz_needs_sys_ioctl_h" 1>&6
8718   if test $am_cv_sys_tiocgwinsz_needs_sys_ioctl_h = yes; then
8719     cat >> confdefs.h <<\EOF
8720 #define GWINSZ_IN_SYS_IOCTL 1
8721 EOF
8722
8723   fi
8724
8725 if test $am_cv_sys_posix_termios = yes ; then
8726         cat >> confdefs.h <<\EOF
8727 #define HAVE_POSIX_TERMIOS 1
8728 EOF
8729
8730 fi
8731
8732 for ac_hdr in \
8733         arpa/inet.h             \
8734         arpa/nameser.h  \
8735         assert.h                \
8736         bits/types.h    \
8737         conio.h                 \
8738         crypt.h                 \
8739         direct.h                \
8740         errno.h                 \
8741         fcntl.h                 \
8742         filio.h                 \
8743         getopt.h                \
8744         grp.h                   \
8745         io.h                    \
8746         libutil.h               \
8747         limits.h                \
8748         locale.h                \
8749         netinet/tcp.h   \
8750         malloc.h                \
8751         memory.h                \
8752         psap.h                  \
8753         pwd.h                   \
8754         process.h               \
8755         resolv.h                \
8756         sgtty.h                 \
8757         shadow.h                \
8758         stddef.h                \
8759         string.h                \
8760         strings.h               \
8761         sysexits.h              \
8762         sys/file.h              \
8763         sys/filio.h             \
8764         sys/errno.h             \
8765         sys/ioctl.h             \
8766         sys/param.h             \
8767         sys/resource.h  \
8768         sys/select.h    \
8769         sys/socket.h    \
8770         sys/stat.h              \
8771         sys/syslog.h    \
8772         sys/time.h              \
8773         sys/types.h             \
8774         sys/ucred.h             \
8775         sys/uio.h               \
8776         syslog.h                \
8777         termios.h               \
8778         unistd.h                \
8779         winsock.h               \
8780         winsock2.h              \
8781
8782 do
8783 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8784 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8785 echo "configure:8786: checking for $ac_hdr" >&5
8786 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
8787   echo $ac_n "(cached) $ac_c" 1>&6
8788 else
8789   cat > conftest.$ac_ext <<EOF
8790 #line 8791 "configure"
8791 #include "confdefs.h"
8792 #include <$ac_hdr>
8793 EOF
8794 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8795 { (eval echo configure:8796: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8796 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8797 if test -z "$ac_err"; then
8798   rm -rf conftest*
8799   eval "ac_cv_header_$ac_safe=yes"
8800 else
8801   echo "$ac_err" >&5
8802   echo "configure: failed program was:" >&5
8803   cat conftest.$ac_ext >&5
8804   rm -rf conftest*
8805   eval "ac_cv_header_$ac_safe=no"
8806 fi
8807 rm -f conftest*
8808 fi
8809 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8810   echo "$ac_t""yes" 1>&6
8811     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8812   cat >> confdefs.h <<EOF
8813 #define $ac_tr_hdr 1
8814 EOF
8815  
8816 else
8817   echo "$ac_t""no" 1>&6
8818 fi
8819 done
8820
8821
8822
8823
8824 echo $ac_n "checking for sigset in -lV3""... $ac_c" 1>&6
8825 echo "configure:8826: checking for sigset in -lV3" >&5
8826 ac_lib_var=`echo V3'_'sigset | sed 'y%./+-:%__p__%'`
8827 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8828   echo $ac_n "(cached) $ac_c" 1>&6
8829 else
8830   ac_save_LIBS="$LIBS"
8831 LIBS="-lV3  $LIBS"
8832 cat > conftest.$ac_ext <<EOF
8833 #line 8834 "configure"
8834 #include "confdefs.h"
8835 /* Override any gcc2 internal prototype to avoid an error.  */
8836 /* We use char because int might match the return type of a gcc2
8837     builtin and then its argument prototype would still apply.  */
8838 char sigset();
8839
8840 int main() {
8841 sigset()
8842 ; return 0; }
8843 EOF
8844 if { (eval echo configure:8845: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8845   rm -rf conftest*
8846   eval "ac_cv_lib_$ac_lib_var=yes"
8847 else
8848   echo "configure: failed program was:" >&5
8849   cat conftest.$ac_ext >&5
8850   rm -rf conftest*
8851   eval "ac_cv_lib_$ac_lib_var=no"
8852 fi
8853 rm -f conftest*
8854 LIBS="$ac_save_LIBS"
8855
8856 fi
8857 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8858   echo "$ac_t""yes" 1>&6
8859     ac_tr_lib=HAVE_LIB`echo V3 | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8860     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8861   cat >> confdefs.h <<EOF
8862 #define $ac_tr_lib 1
8863 EOF
8864
8865   LIBS="-lV3 $LIBS"
8866
8867 else
8868   echo "$ac_t""no" 1>&6
8869 fi
8870
8871
8872 if test "$ac_cv_header_winsock_h" = yes; then
8873 echo $ac_n "checking for winsock""... $ac_c" 1>&6
8874 echo "configure:8875: checking for winsock" >&5
8875 if eval "test \"\${ol_cv_winsock+set}\" = set"; then
8876   echo $ac_n "(cached) $ac_c" 1>&6
8877 else
8878   save_LIBS="$LIBS"
8879 for curlib in ws2_32 wsock32; do
8880         LIBS="$LIBS -l$curlib"
8881         cat > conftest.$ac_ext <<EOF
8882 #line 8883 "configure"
8883 #include "confdefs.h"
8884 #include <winsock.h>
8885                         
8886 int main() {
8887
8888                         socket(0,0,0);
8889                         select(0,NULL,NULL,NULL,NULL);
8890                         closesocket(0);
8891                         gethostname(NULL,0);
8892                         
8893 ; return 0; }
8894 EOF
8895 if { (eval echo configure:8896: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8896   rm -rf conftest*
8897   ol_cv_winsock=yes
8898 else
8899   echo "configure: failed program was:" >&5
8900   cat conftest.$ac_ext >&5
8901   rm -rf conftest*
8902   ol_cv_winsock=no
8903 fi
8904 rm -f conftest*
8905
8906         if test $ol_cv_winsock = yes; then
8907                 cat >> confdefs.h <<\EOF
8908 #define HAVE_WINSOCK 1
8909 EOF
8910
8911                 ac_cv_func_socket=yes
8912                 ac_cv_func_select=yes
8913                 ac_cv_func_closesocket=yes
8914                 ac_cv_func_gethostname=yes
8915                 if test $curlib = ws2_32; then
8916                         ol_cv_winsock=winsock2
8917                         cat >> confdefs.h <<\EOF
8918 #define HAVE_WINSOCK2 1
8919 EOF
8920
8921                 fi
8922                 break
8923         fi
8924         LIBS="$save_LIBS"
8925 done
8926 fi
8927
8928 echo "$ac_t""$ol_cv_winsock" 1>&6
8929 fi
8930
8931
8932 echo $ac_n "checking for socket""... $ac_c" 1>&6
8933 echo "configure:8934: checking for socket" >&5
8934 if eval "test \"\${ac_cv_func_socket+set}\" = set"; then
8935   echo $ac_n "(cached) $ac_c" 1>&6
8936 else
8937   cat > conftest.$ac_ext <<EOF
8938 #line 8939 "configure"
8939 #include "confdefs.h"
8940 /* System header to define __stub macros and hopefully few prototypes,
8941     which can conflict with char socket(); below.  */
8942 #include <assert.h>
8943 /* Override any gcc2 internal prototype to avoid an error.  */
8944 /* We use char because int might match the return type of a gcc2
8945     builtin and then its argument prototype would still apply.  */
8946 char socket();
8947 char (*f)();
8948
8949 int main() {
8950
8951 /* The GNU C library defines this for functions which it implements
8952     to always fail with ENOSYS.  Some functions are actually named
8953     something starting with __ and the normal name is an alias.  */
8954 #if defined (__stub_socket) || defined (__stub___socket)
8955 choke me
8956 #else
8957 f = socket;
8958 #endif
8959
8960 ; return 0; }
8961 EOF
8962 if { (eval echo configure:8963: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8963   rm -rf conftest*
8964   eval "ac_cv_func_socket=yes"
8965 else
8966   echo "configure: failed program was:" >&5
8967   cat conftest.$ac_ext >&5
8968   rm -rf conftest*
8969   eval "ac_cv_func_socket=no"
8970 fi
8971 rm -f conftest*
8972 fi
8973
8974 if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
8975   echo "$ac_t""yes" 1>&6
8976   :
8977 else
8978   echo "$ac_t""no" 1>&6
8979         
8980         echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6
8981 echo "configure:8982: checking for main in -lsocket" >&5
8982 ac_lib_var=`echo socket'_'main | sed 'y%./+-:%__p__%'`
8983 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8984   echo $ac_n "(cached) $ac_c" 1>&6
8985 else
8986   ac_save_LIBS="$LIBS"
8987 LIBS="-lsocket  $LIBS"
8988 cat > conftest.$ac_ext <<EOF
8989 #line 8990 "configure"
8990 #include "confdefs.h"
8991
8992 int main() {
8993 main()
8994 ; return 0; }
8995 EOF
8996 if { (eval echo configure:8997: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8997   rm -rf conftest*
8998   eval "ac_cv_lib_$ac_lib_var=yes"
8999 else
9000   echo "configure: failed program was:" >&5
9001   cat conftest.$ac_ext >&5
9002   rm -rf conftest*
9003   eval "ac_cv_lib_$ac_lib_var=no"
9004 fi
9005 rm -f conftest*
9006 LIBS="$ac_save_LIBS"
9007
9008 fi
9009 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9010   echo "$ac_t""yes" 1>&6
9011     ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9012     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9013   cat >> confdefs.h <<EOF
9014 #define $ac_tr_lib 1
9015 EOF
9016
9017   LIBS="-lsocket $LIBS"
9018
9019 else
9020   echo "$ac_t""no" 1>&6
9021 fi
9022
9023         echo $ac_n "checking for main in -lnet""... $ac_c" 1>&6
9024 echo "configure:9025: checking for main in -lnet" >&5
9025 ac_lib_var=`echo net'_'main | sed 'y%./+-:%__p__%'`
9026 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9027   echo $ac_n "(cached) $ac_c" 1>&6
9028 else
9029   ac_save_LIBS="$LIBS"
9030 LIBS="-lnet  $LIBS"
9031 cat > conftest.$ac_ext <<EOF
9032 #line 9033 "configure"
9033 #include "confdefs.h"
9034
9035 int main() {
9036 main()
9037 ; return 0; }
9038 EOF
9039 if { (eval echo configure:9040: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9040   rm -rf conftest*
9041   eval "ac_cv_lib_$ac_lib_var=yes"
9042 else
9043   echo "configure: failed program was:" >&5
9044   cat conftest.$ac_ext >&5
9045   rm -rf conftest*
9046   eval "ac_cv_lib_$ac_lib_var=no"
9047 fi
9048 rm -f conftest*
9049 LIBS="$ac_save_LIBS"
9050
9051 fi
9052 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9053   echo "$ac_t""yes" 1>&6
9054     ac_tr_lib=HAVE_LIB`echo net | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9055     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9056   cat >> confdefs.h <<EOF
9057 #define $ac_tr_lib 1
9058 EOF
9059
9060   LIBS="-lnet $LIBS"
9061
9062 else
9063   echo "$ac_t""no" 1>&6
9064 fi
9065
9066         echo $ac_n "checking for main in -lnsl_s""... $ac_c" 1>&6
9067 echo "configure:9068: checking for main in -lnsl_s" >&5
9068 ac_lib_var=`echo nsl_s'_'main | sed 'y%./+-:%__p__%'`
9069 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9070   echo $ac_n "(cached) $ac_c" 1>&6
9071 else
9072   ac_save_LIBS="$LIBS"
9073 LIBS="-lnsl_s  $LIBS"
9074 cat > conftest.$ac_ext <<EOF
9075 #line 9076 "configure"
9076 #include "confdefs.h"
9077
9078 int main() {
9079 main()
9080 ; return 0; }
9081 EOF
9082 if { (eval echo configure:9083: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9083   rm -rf conftest*
9084   eval "ac_cv_lib_$ac_lib_var=yes"
9085 else
9086   echo "configure: failed program was:" >&5
9087   cat conftest.$ac_ext >&5
9088   rm -rf conftest*
9089   eval "ac_cv_lib_$ac_lib_var=no"
9090 fi
9091 rm -f conftest*
9092 LIBS="$ac_save_LIBS"
9093
9094 fi
9095 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9096   echo "$ac_t""yes" 1>&6
9097     ac_tr_lib=HAVE_LIB`echo nsl_s | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9098     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9099   cat >> confdefs.h <<EOF
9100 #define $ac_tr_lib 1
9101 EOF
9102
9103   LIBS="-lnsl_s $LIBS"
9104
9105 else
9106   echo "$ac_t""no" 1>&6
9107 fi
9108
9109         echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
9110 echo "configure:9111: checking for main in -lnsl" >&5
9111 ac_lib_var=`echo nsl'_'main | sed 'y%./+-:%__p__%'`
9112 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9113   echo $ac_n "(cached) $ac_c" 1>&6
9114 else
9115   ac_save_LIBS="$LIBS"
9116 LIBS="-lnsl  $LIBS"
9117 cat > conftest.$ac_ext <<EOF
9118 #line 9119 "configure"
9119 #include "confdefs.h"
9120
9121 int main() {
9122 main()
9123 ; return 0; }
9124 EOF
9125 if { (eval echo configure:9126: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9126   rm -rf conftest*
9127   eval "ac_cv_lib_$ac_lib_var=yes"
9128 else
9129   echo "configure: failed program was:" >&5
9130   cat conftest.$ac_ext >&5
9131   rm -rf conftest*
9132   eval "ac_cv_lib_$ac_lib_var=no"
9133 fi
9134 rm -f conftest*
9135 LIBS="$ac_save_LIBS"
9136
9137 fi
9138 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9139   echo "$ac_t""yes" 1>&6
9140     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9141     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9142   cat >> confdefs.h <<EOF
9143 #define $ac_tr_lib 1
9144 EOF
9145
9146   LIBS="-lnsl $LIBS"
9147
9148 else
9149   echo "$ac_t""no" 1>&6
9150 fi
9151
9152         echo $ac_n "checking for socket in -linet""... $ac_c" 1>&6
9153 echo "configure:9154: checking for socket in -linet" >&5
9154 ac_lib_var=`echo inet'_'socket | sed 'y%./+-:%__p__%'`
9155 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9156   echo $ac_n "(cached) $ac_c" 1>&6
9157 else
9158   ac_save_LIBS="$LIBS"
9159 LIBS="-linet  $LIBS"
9160 cat > conftest.$ac_ext <<EOF
9161 #line 9162 "configure"
9162 #include "confdefs.h"
9163 /* Override any gcc2 internal prototype to avoid an error.  */
9164 /* We use char because int might match the return type of a gcc2
9165     builtin and then its argument prototype would still apply.  */
9166 char socket();
9167
9168 int main() {
9169 socket()
9170 ; return 0; }
9171 EOF
9172 if { (eval echo configure:9173: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9173   rm -rf conftest*
9174   eval "ac_cv_lib_$ac_lib_var=yes"
9175 else
9176   echo "configure: failed program was:" >&5
9177   cat conftest.$ac_ext >&5
9178   rm -rf conftest*
9179   eval "ac_cv_lib_$ac_lib_var=no"
9180 fi
9181 rm -f conftest*
9182 LIBS="$ac_save_LIBS"
9183
9184 fi
9185 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9186   echo "$ac_t""yes" 1>&6
9187     ac_tr_lib=HAVE_LIB`echo inet | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9188     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9189   cat >> confdefs.h <<EOF
9190 #define $ac_tr_lib 1
9191 EOF
9192
9193   LIBS="-linet $LIBS"
9194
9195 else
9196   echo "$ac_t""no" 1>&6
9197 fi
9198
9199         echo $ac_n "checking for main in -lgen""... $ac_c" 1>&6
9200 echo "configure:9201: checking for main in -lgen" >&5
9201 ac_lib_var=`echo gen'_'main | sed 'y%./+-:%__p__%'`
9202 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9203   echo $ac_n "(cached) $ac_c" 1>&6
9204 else
9205   ac_save_LIBS="$LIBS"
9206 LIBS="-lgen  $LIBS"
9207 cat > conftest.$ac_ext <<EOF
9208 #line 9209 "configure"
9209 #include "confdefs.h"
9210
9211 int main() {
9212 main()
9213 ; return 0; }
9214 EOF
9215 if { (eval echo configure:9216: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9216   rm -rf conftest*
9217   eval "ac_cv_lib_$ac_lib_var=yes"
9218 else
9219   echo "configure: failed program was:" >&5
9220   cat conftest.$ac_ext >&5
9221   rm -rf conftest*
9222   eval "ac_cv_lib_$ac_lib_var=no"
9223 fi
9224 rm -f conftest*
9225 LIBS="$ac_save_LIBS"
9226
9227 fi
9228 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9229   echo "$ac_t""yes" 1>&6
9230     ac_tr_lib=HAVE_LIB`echo gen | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9231     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9232   cat >> confdefs.h <<EOF
9233 #define $ac_tr_lib 1
9234 EOF
9235
9236   LIBS="-lgen $LIBS"
9237
9238 else
9239   echo "$ac_t""no" 1>&6
9240 fi
9241
9242
9243 fi
9244
9245
9246 echo $ac_n "checking for select""... $ac_c" 1>&6
9247 echo "configure:9248: checking for select" >&5
9248 if eval "test \"\${ac_cv_func_select+set}\" = set"; then
9249   echo $ac_n "(cached) $ac_c" 1>&6
9250 else
9251   cat > conftest.$ac_ext <<EOF
9252 #line 9253 "configure"
9253 #include "confdefs.h"
9254 /* System header to define __stub macros and hopefully few prototypes,
9255     which can conflict with char select(); below.  */
9256 #include <assert.h>
9257 /* Override any gcc2 internal prototype to avoid an error.  */
9258 /* We use char because int might match the return type of a gcc2
9259     builtin and then its argument prototype would still apply.  */
9260 char select();
9261 char (*f)();
9262
9263 int main() {
9264
9265 /* The GNU C library defines this for functions which it implements
9266     to always fail with ENOSYS.  Some functions are actually named
9267     something starting with __ and the normal name is an alias.  */
9268 #if defined (__stub_select) || defined (__stub___select)
9269 choke me
9270 #else
9271 f = select;
9272 #endif
9273
9274 ; return 0; }
9275 EOF
9276 if { (eval echo configure:9277: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9277   rm -rf conftest*
9278   eval "ac_cv_func_select=yes"
9279 else
9280   echo "configure: failed program was:" >&5
9281   cat conftest.$ac_ext >&5
9282   rm -rf conftest*
9283   eval "ac_cv_func_select=no"
9284 fi
9285 rm -f conftest*
9286 fi
9287
9288 if eval "test \"`echo '$ac_cv_func_'select`\" = yes"; then
9289   echo "$ac_t""yes" 1>&6
9290   :
9291 else
9292   echo "$ac_t""no" 1>&6
9293 { echo "configure: error: select() required." 1>&2; exit 1; }
9294 fi
9295
9296
9297 if test "${ac_cv_header_winsock_h}" != yes; then
9298                                 echo $ac_n "checking types of arguments for select()""... $ac_c" 1>&6
9299 echo "configure:9300: checking types of arguments for select()" >&5
9300  if eval "test \"\${ac_cv_func_select_arg234+set}\" = set"; then
9301   echo $ac_n "(cached) $ac_c" 1>&6
9302 else
9303    if eval "test \"\${ac_cv_func_select_arg1+set}\" = set"; then
9304   echo $ac_n "(cached) $ac_c" 1>&6
9305 else
9306     if eval "test \"\${ac_cv_func_select_arg5+set}\" = set"; then
9307   echo $ac_n "(cached) $ac_c" 1>&6
9308 else
9309      for ac_cv_func_select_arg234 in 'fd_set *' 'int *' 'void *'; do
9310      for ac_cv_func_select_arg1 in 'int' 'size_t' 'unsigned long' 'unsigned'; do
9311       for ac_cv_func_select_arg5 in 'struct timeval *' 'const struct timeval *'; do
9312        cat > conftest.$ac_ext <<EOF
9313 #line 9314 "configure"
9314 #include "confdefs.h"
9315 #ifdef HAVE_SYS_TYPES_H
9316 #include <sys/types.h>
9317 #endif
9318 #ifdef HAVE_SYS_TIME_H
9319 #include <sys/time.h>
9320 #endif
9321 #ifdef HAVE_SYS_SELECT_H
9322 #include <sys/select.h>
9323 #endif
9324 #ifdef HAVE_SYS_SOCKET_H
9325 #include <sys/socket.h>
9326 #endif
9327 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);
9328 int main() {
9329
9330 ; return 0; }
9331 EOF
9332 if { (eval echo configure:9333: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9333   rm -rf conftest*
9334           ac_not_found=no ; break 3
9335 else
9336   echo "configure: failed program was:" >&5
9337   cat conftest.$ac_ext >&5
9338   rm -rf conftest*
9339   ac_not_found=yes
9340 fi
9341 rm -f conftest*
9342       done
9343      done
9344     done
9345    
9346 fi
9347   
9348 fi
9349  
9350 fi
9351  if test "$ac_not_found" = yes; then
9352   ac_cv_func_select_arg1=int 
9353   ac_cv_func_select_arg234='int *' 
9354   ac_cv_func_select_arg5='struct timeval *'
9355  fi
9356  echo "$ac_t""$ac_cv_func_select_arg1,$ac_cv_func_select_arg234,$ac_cv_func_select_arg5" 1>&6
9357  cat >> confdefs.h <<EOF
9358 #define SELECT_TYPE_ARG1 $ac_cv_func_select_arg1
9359 EOF
9360
9361  cat >> confdefs.h <<EOF
9362 #define SELECT_TYPE_ARG234 ($ac_cv_func_select_arg234)
9363 EOF
9364
9365  cat >> confdefs.h <<EOF
9366 #define SELECT_TYPE_ARG5 ($ac_cv_func_select_arg5)
9367 EOF
9368
9369
9370 fi
9371
9372
9373 for ac_func in poll 
9374 do
9375 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9376 echo "configure:9377: checking for $ac_func" >&5
9377 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
9378   echo $ac_n "(cached) $ac_c" 1>&6
9379 else
9380   cat > conftest.$ac_ext <<EOF
9381 #line 9382 "configure"
9382 #include "confdefs.h"
9383 /* System header to define __stub macros and hopefully few prototypes,
9384     which can conflict with char $ac_func(); below.  */
9385 #include <assert.h>
9386 /* Override any gcc2 internal prototype to avoid an error.  */
9387 /* We use char because int might match the return type of a gcc2
9388     builtin and then its argument prototype would still apply.  */
9389 char $ac_func();
9390 char (*f)();
9391
9392 int main() {
9393
9394 /* The GNU C library defines this for functions which it implements
9395     to always fail with ENOSYS.  Some functions are actually named
9396     something starting with __ and the normal name is an alias.  */
9397 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9398 choke me
9399 #else
9400 f = $ac_func;
9401 #endif
9402
9403 ; return 0; }
9404 EOF
9405 if { (eval echo configure:9406: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9406   rm -rf conftest*
9407   eval "ac_cv_func_$ac_func=yes"
9408 else
9409   echo "configure: failed program was:" >&5
9410   cat conftest.$ac_ext >&5
9411   rm -rf conftest*
9412   eval "ac_cv_func_$ac_func=no"
9413 fi
9414 rm -f conftest*
9415 fi
9416
9417 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9418   echo "$ac_t""yes" 1>&6
9419     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9420   cat >> confdefs.h <<EOF
9421 #define $ac_tr_func 1
9422 EOF
9423  
9424 else
9425   echo "$ac_t""no" 1>&6
9426 fi
9427 done
9428
9429 for ac_hdr in poll.h 
9430 do
9431 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9432 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9433 echo "configure:9434: checking for $ac_hdr" >&5
9434 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9435   echo $ac_n "(cached) $ac_c" 1>&6
9436 else
9437   cat > conftest.$ac_ext <<EOF
9438 #line 9439 "configure"
9439 #include "confdefs.h"
9440 #include <$ac_hdr>
9441 EOF
9442 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9443 { (eval echo configure:9444: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9444 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9445 if test -z "$ac_err"; then
9446   rm -rf conftest*
9447   eval "ac_cv_header_$ac_safe=yes"
9448 else
9449   echo "$ac_err" >&5
9450   echo "configure: failed program was:" >&5
9451   cat conftest.$ac_ext >&5
9452   rm -rf conftest*
9453   eval "ac_cv_header_$ac_safe=no"
9454 fi
9455 rm -f conftest*
9456 fi
9457 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9458   echo "$ac_t""yes" 1>&6
9459     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9460   cat >> confdefs.h <<EOF
9461 #define $ac_tr_hdr 1
9462 EOF
9463  
9464 else
9465   echo "$ac_t""no" 1>&6
9466 fi
9467 done
9468
9469
9470 for ac_hdr in sys/epoll.h 
9471 do
9472 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9473 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9474 echo "configure:9475: checking for $ac_hdr" >&5
9475 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9476   echo $ac_n "(cached) $ac_c" 1>&6
9477 else
9478   cat > conftest.$ac_ext <<EOF
9479 #line 9480 "configure"
9480 #include "confdefs.h"
9481 #include <$ac_hdr>
9482 EOF
9483 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9484 { (eval echo configure:9485: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9485 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9486 if test -z "$ac_err"; then
9487   rm -rf conftest*
9488   eval "ac_cv_header_$ac_safe=yes"
9489 else
9490   echo "$ac_err" >&5
9491   echo "configure: failed program was:" >&5
9492   cat conftest.$ac_ext >&5
9493   rm -rf conftest*
9494   eval "ac_cv_header_$ac_safe=no"
9495 fi
9496 rm -f conftest*
9497 fi
9498 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9499   echo "$ac_t""yes" 1>&6
9500     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9501   cat >> confdefs.h <<EOF
9502 #define $ac_tr_hdr 1
9503 EOF
9504  
9505 else
9506   echo "$ac_t""no" 1>&6
9507 fi
9508 done
9509
9510 if test "${ac_cv_header_sys_epoll_h}" = yes; then
9511 echo $ac_n "checking for epoll system call""... $ac_c" 1>&6
9512 echo "configure:9513: checking for epoll system call" >&5
9513 if test "$cross_compiling" = yes; then
9514   echo "$ac_t""no" 1>&6
9515 else
9516   cat > conftest.$ac_ext <<EOF
9517 #line 9518 "configure"
9518 #include "confdefs.h"
9519 int main(int argc, char *argv)
9520 {
9521         int epfd = epoll_create(256);
9522         exit (epfd == -1 ? 1 : 0);
9523 }
9524 EOF
9525 if { (eval echo configure:9526: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
9526 then
9527   echo "$ac_t""yes" 1>&6
9528 cat >> confdefs.h <<\EOF
9529 #define HAVE_EPOLL 1
9530 EOF
9531
9532 else
9533   echo "configure: failed program was:" >&5
9534   cat conftest.$ac_ext >&5
9535   rm -fr conftest*
9536   echo "$ac_t""no" 1>&6
9537 fi
9538 rm -fr conftest*
9539 fi
9540
9541 fi
9542
9543 # strerror checks
9544 echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6
9545 echo "configure:9546: checking declaration of sys_errlist" >&5
9546 if eval "test \"\${ol_cv_dcl_sys_errlist+set}\" = set"; then
9547   echo $ac_n "(cached) $ac_c" 1>&6
9548 else
9549   
9550         cat > conftest.$ac_ext <<EOF
9551 #line 9552 "configure"
9552 #include "confdefs.h"
9553
9554 #include <stdio.h>
9555 #include <sys/types.h>
9556 #include <errno.h>
9557 #ifdef WINNT
9558 #include <stdlib.h>
9559 #endif 
9560 int main() {
9561 char *c = (char *) *sys_errlist
9562 ; return 0; }
9563 EOF
9564 if { (eval echo configure:9565: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9565   rm -rf conftest*
9566   ol_cv_dcl_sys_errlist=yes
9567         ol_cv_have_sys_errlist=yes
9568 else
9569   echo "configure: failed program was:" >&5
9570   cat conftest.$ac_ext >&5
9571   rm -rf conftest*
9572   ol_cv_dcl_sys_errlist=no
9573 fi
9574 rm -f conftest*
9575 fi
9576
9577 echo "$ac_t""$ol_cv_dcl_sys_errlist" 1>&6
9578 #
9579 # It's possible (for near-UNIX clones) that sys_errlist doesn't exist
9580 if test $ol_cv_dcl_sys_errlist = no ; then
9581         cat >> confdefs.h <<\EOF
9582 #define DECL_SYS_ERRLIST 1
9583 EOF
9584
9585
9586         echo $ac_n "checking existence of sys_errlist""... $ac_c" 1>&6
9587 echo "configure:9588: checking existence of sys_errlist" >&5
9588 if eval "test \"\${ol_cv_have_sys_errlist+set}\" = set"; then
9589   echo $ac_n "(cached) $ac_c" 1>&6
9590 else
9591   
9592                 cat > conftest.$ac_ext <<EOF
9593 #line 9594 "configure"
9594 #include "confdefs.h"
9595 #include <errno.h>
9596 int main() {
9597 char *c = (char *) *sys_errlist
9598 ; return 0; }
9599 EOF
9600 if { (eval echo configure:9601: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9601   rm -rf conftest*
9602   ol_cv_have_sys_errlist=yes
9603 else
9604   echo "configure: failed program was:" >&5
9605   cat conftest.$ac_ext >&5
9606   rm -rf conftest*
9607   ol_cv_have_sys_errlist=no
9608 fi
9609 rm -f conftest*
9610 fi
9611
9612 echo "$ac_t""$ol_cv_have_sys_errlist" 1>&6
9613 fi
9614 if test $ol_cv_have_sys_errlist = yes ; then
9615         cat >> confdefs.h <<\EOF
9616 #define HAVE_SYS_ERRLIST 1
9617 EOF
9618
9619 fi
9620  for ac_func in strerror strerror_r
9621 do
9622 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9623 echo "configure:9624: checking for $ac_func" >&5
9624 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
9625   echo $ac_n "(cached) $ac_c" 1>&6
9626 else
9627   cat > conftest.$ac_ext <<EOF
9628 #line 9629 "configure"
9629 #include "confdefs.h"
9630 /* System header to define __stub macros and hopefully few prototypes,
9631     which can conflict with char $ac_func(); below.  */
9632 #include <assert.h>
9633 /* Override any gcc2 internal prototype to avoid an error.  */
9634 /* We use char because int might match the return type of a gcc2
9635     builtin and then its argument prototype would still apply.  */
9636 char $ac_func();
9637 char (*f)();
9638
9639 int main() {
9640
9641 /* The GNU C library defines this for functions which it implements
9642     to always fail with ENOSYS.  Some functions are actually named
9643     something starting with __ and the normal name is an alias.  */
9644 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9645 choke me
9646 #else
9647 f = $ac_func;
9648 #endif
9649
9650 ; return 0; }
9651 EOF
9652 if { (eval echo configure:9653: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9653   rm -rf conftest*
9654   eval "ac_cv_func_$ac_func=yes"
9655 else
9656   echo "configure: failed program was:" >&5
9657   cat conftest.$ac_ext >&5
9658   rm -rf conftest*
9659   eval "ac_cv_func_$ac_func=no"
9660 fi
9661 rm -f conftest*
9662 fi
9663
9664 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9665   echo "$ac_t""yes" 1>&6
9666     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9667   cat >> confdefs.h <<EOF
9668 #define $ac_tr_func 1
9669 EOF
9670  
9671 else
9672   echo "$ac_t""no" 1>&6
9673 fi
9674 done
9675
9676 ol_cv_func_strerror_r=no
9677 if test "${ac_cv_func_strerror_r}" = yes ; then
9678         echo $ac_n "checking non-posix strerror_r""... $ac_c" 1>&6
9679 echo "configure:9680: checking non-posix strerror_r" >&5
9680 if eval "test \"\${ol_cv_nonposix_strerror_r+set}\" = set"; then
9681   echo $ac_n "(cached) $ac_c" 1>&6
9682 else
9683   
9684         cat > conftest.$ac_ext <<EOF
9685 #line 9686 "configure"
9686 #include "confdefs.h"
9687 #include <string.h>
9688 EOF
9689 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9690   egrep "strerror_r" >/dev/null 2>&1; then
9691   rm -rf conftest*
9692   ol_decl_strerror_r=yes
9693 else
9694   rm -rf conftest*
9695   ol_decl_strerror_r=no
9696 fi
9697 rm -f conftest*
9698
9699         if test $ol_decl_strerror_r = yes ; then
9700                 cat > conftest.$ac_ext <<EOF
9701 #line 9702 "configure"
9702 #include "confdefs.h"
9703 #include <string.h>
9704 int main() {
9705    /* from autoconf 2.59 */
9706                                 char buf[100];
9707                                 char x = *strerror_r (0, buf, sizeof buf);
9708                                 char *p = strerror_r (0, buf, sizeof buf);
9709                         
9710 ; return 0; }
9711 EOF
9712 if { (eval echo configure:9713: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9713   rm -rf conftest*
9714   ol_cv_nonposix_strerror_r=yes
9715 else
9716   echo "configure: failed program was:" >&5
9717   cat conftest.$ac_ext >&5
9718   rm -rf conftest*
9719   ol_cv_nonposix_strerror_r=no
9720 fi
9721 rm -f conftest*
9722         else
9723                 if test "$cross_compiling" = yes; then
9724   ol_cv_nonposix_strerror=no
9725 else
9726   cat > conftest.$ac_ext <<EOF
9727 #line 9728 "configure"
9728 #include "confdefs.h"
9729
9730                         main() {
9731                                 char buf[100];
9732                                 buf[0] = 0;
9733                                 strerror_r( 1, buf, sizeof buf );
9734                                 exit( buf[0] == 0 );
9735                         }
9736                         
9737 EOF
9738 if { (eval echo configure:9739: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
9739 then
9740   ol_cv_nonposix_strerror_r=yes
9741 else
9742   echo "configure: failed program was:" >&5
9743   cat conftest.$ac_ext >&5
9744   rm -fr conftest*
9745   ol_cv_nonposix_strerror=no
9746 fi
9747 rm -fr conftest*
9748 fi
9749
9750         fi
9751         
9752 fi
9753
9754 echo "$ac_t""$ol_cv_nonposix_strerror_r" 1>&6
9755 if test $ol_cv_nonposix_strerror_r = yes ; then
9756         cat >> confdefs.h <<\EOF
9757 #define HAVE_NONPOSIX_STRERROR_R 1
9758 EOF
9759
9760 fi
9761
9762 elif test "${ac_cv_func_strerror}" = no ; then
9763         echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6
9764 echo "configure:9765: checking declaration of sys_errlist" >&5
9765 if eval "test \"\${ol_cv_dcl_sys_errlist+set}\" = set"; then
9766   echo $ac_n "(cached) $ac_c" 1>&6
9767 else
9768   
9769         cat > conftest.$ac_ext <<EOF
9770 #line 9771 "configure"
9771 #include "confdefs.h"
9772
9773 #include <stdio.h>
9774 #include <sys/types.h>
9775 #include <errno.h>
9776 #ifdef WINNT
9777 #include <stdlib.h>
9778 #endif 
9779 int main() {
9780 char *c = (char *) *sys_errlist
9781 ; return 0; }
9782 EOF
9783 if { (eval echo configure:9784: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9784   rm -rf conftest*
9785   ol_cv_dcl_sys_errlist=yes
9786         ol_cv_have_sys_errlist=yes
9787 else
9788   echo "configure: failed program was:" >&5
9789   cat conftest.$ac_ext >&5
9790   rm -rf conftest*
9791   ol_cv_dcl_sys_errlist=no
9792 fi
9793 rm -f conftest*
9794 fi
9795
9796 echo "$ac_t""$ol_cv_dcl_sys_errlist" 1>&6
9797 #
9798 # It's possible (for near-UNIX clones) that sys_errlist doesn't exist
9799 if test $ol_cv_dcl_sys_errlist = no ; then
9800         cat >> confdefs.h <<\EOF
9801 #define DECL_SYS_ERRLIST 1
9802 EOF
9803
9804
9805         echo $ac_n "checking existence of sys_errlist""... $ac_c" 1>&6
9806 echo "configure:9807: checking existence of sys_errlist" >&5
9807 if eval "test \"\${ol_cv_have_sys_errlist+set}\" = set"; then
9808   echo $ac_n "(cached) $ac_c" 1>&6
9809 else
9810   
9811                 cat > conftest.$ac_ext <<EOF
9812 #line 9813 "configure"
9813 #include "confdefs.h"
9814 #include <errno.h>
9815 int main() {
9816 char *c = (char *) *sys_errlist
9817 ; return 0; }
9818 EOF
9819 if { (eval echo configure:9820: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9820   rm -rf conftest*
9821   ol_cv_have_sys_errlist=yes
9822 else
9823   echo "configure: failed program was:" >&5
9824   cat conftest.$ac_ext >&5
9825   rm -rf conftest*
9826   ol_cv_have_sys_errlist=no
9827 fi
9828 rm -f conftest*
9829 fi
9830
9831 echo "$ac_t""$ol_cv_have_sys_errlist" 1>&6
9832 fi
9833 if test $ol_cv_have_sys_errlist = yes ; then
9834         cat >> confdefs.h <<\EOF
9835 #define HAVE_SYS_ERRLIST 1
9836 EOF
9837
9838 fi
9839
9840 fi
9841
9842
9843 for ac_hdr in regex.h 
9844 do
9845 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9846 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9847 echo "configure:9848: checking for $ac_hdr" >&5
9848 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9849   echo $ac_n "(cached) $ac_c" 1>&6
9850 else
9851   cat > conftest.$ac_ext <<EOF
9852 #line 9853 "configure"
9853 #include "confdefs.h"
9854 #include <$ac_hdr>
9855 EOF
9856 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9857 { (eval echo configure:9858: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9858 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9859 if test -z "$ac_err"; then
9860   rm -rf conftest*
9861   eval "ac_cv_header_$ac_safe=yes"
9862 else
9863   echo "$ac_err" >&5
9864   echo "configure: failed program was:" >&5
9865   cat conftest.$ac_ext >&5
9866   rm -rf conftest*
9867   eval "ac_cv_header_$ac_safe=no"
9868 fi
9869 rm -f conftest*
9870 fi
9871 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9872   echo "$ac_t""yes" 1>&6
9873     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9874   cat >> confdefs.h <<EOF
9875 #define $ac_tr_hdr 1
9876 EOF
9877  
9878 else
9879   echo "$ac_t""no" 1>&6
9880 fi
9881 done
9882
9883 if test "$ac_cv_header_regex_h" != yes ; then
9884         { echo "configure: error: POSIX regex.h required." 1>&2; exit 1; }
9885 fi
9886
9887 echo $ac_n "checking for library containing regfree""... $ac_c" 1>&6
9888 echo "configure:9889: checking for library containing regfree" >&5
9889 if eval "test \"\${ac_cv_search_regfree+set}\" = set"; then
9890   echo $ac_n "(cached) $ac_c" 1>&6
9891 else
9892   ac_func_search_save_LIBS="$LIBS"
9893 ac_cv_search_regfree="no"
9894 cat > conftest.$ac_ext <<EOF
9895 #line 9896 "configure"
9896 #include "confdefs.h"
9897 /* Override any gcc2 internal prototype to avoid an error.  */
9898 /* We use char because int might match the return type of a gcc2
9899     builtin and then its argument prototype would still apply.  */
9900 char regfree();
9901
9902 int main() {
9903 regfree()
9904 ; return 0; }
9905 EOF
9906 if { (eval echo configure:9907: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9907   rm -rf conftest*
9908   ac_cv_search_regfree="none required"
9909 else
9910   echo "configure: failed program was:" >&5
9911   cat conftest.$ac_ext >&5
9912 fi
9913 rm -f conftest*
9914 test "$ac_cv_search_regfree" = "no" && for ac_lib in regex gnuregex; do
9915 LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9916 cat > conftest.$ac_ext <<EOF
9917 #line 9918 "configure"
9918 #include "confdefs.h"
9919 /* Override any gcc2 internal prototype to avoid an error.  */
9920 /* We use char because int might match the return type of a gcc2
9921     builtin and then its argument prototype would still apply.  */
9922 char regfree();
9923
9924 int main() {
9925 regfree()
9926 ; return 0; }
9927 EOF
9928 if { (eval echo configure:9929: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9929   rm -rf conftest*
9930   ac_cv_search_regfree="-l$ac_lib"
9931 break
9932 else
9933   echo "configure: failed program was:" >&5
9934   cat conftest.$ac_ext >&5
9935 fi
9936 rm -f conftest*
9937 done
9938 LIBS="$ac_func_search_save_LIBS"
9939 fi
9940
9941 echo "$ac_t""$ac_cv_search_regfree" 1>&6
9942 if test "$ac_cv_search_regfree" != "no"; then
9943   test "$ac_cv_search_regfree" = "none required" || LIBS="$ac_cv_search_regfree $LIBS"
9944   :
9945 else :
9946   { echo "configure: error: POSIX regex required." 1>&2; exit 1; }
9947 fi
9948
9949
9950 echo $ac_n "checking for compatible POSIX regex""... $ac_c" 1>&6
9951 echo "configure:9952: checking for compatible POSIX regex" >&5
9952 if eval "test \"\${ol_cv_c_posix_regex+set}\" = set"; then
9953   echo $ac_n "(cached) $ac_c" 1>&6
9954 else
9955   
9956         if test "$cross_compiling" = yes; then
9957   ol_cv_c_posix_regex=cross
9958 else
9959   cat > conftest.$ac_ext <<EOF
9960 #line 9961 "configure"
9961 #include "confdefs.h"
9962
9963 #include <sys/types.h>
9964 #include <regex.h>
9965 static char *pattern, *string;
9966 main()
9967 {
9968         int rc;
9969         regex_t re;
9970
9971         pattern = "^A";
9972
9973         if(regcomp(&re, pattern, 0)) {
9974                 return -1;
9975         }
9976         
9977         string = "ALL MATCH";
9978         
9979         rc = regexec(&re, string, 0, (void*)0, 0);
9980
9981         regfree(&re);
9982
9983         return rc;
9984 }
9985 EOF
9986 if { (eval echo configure:9987: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
9987 then
9988   ol_cv_c_posix_regex=yes
9989 else
9990   echo "configure: failed program was:" >&5
9991   cat conftest.$ac_ext >&5
9992   rm -fr conftest*
9993   ol_cv_c_posix_regex=no
9994 fi
9995 rm -fr conftest*
9996 fi
9997
9998 fi
9999
10000 echo "$ac_t""$ol_cv_c_posix_regex" 1>&6
10001
10002 if test "$ol_cv_c_posix_regex" = no ; then
10003         { echo "configure: error: broken POSIX regex!" 1>&2; exit 1; }
10004 fi
10005
10006
10007 have_uuid=no
10008 for ac_hdr in sys/uuid.h
10009 do
10010 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10011 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10012 echo "configure:10013: checking for $ac_hdr" >&5
10013 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10014   echo $ac_n "(cached) $ac_c" 1>&6
10015 else
10016   cat > conftest.$ac_ext <<EOF
10017 #line 10018 "configure"
10018 #include "confdefs.h"
10019 #include <$ac_hdr>
10020 EOF
10021 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10022 { (eval echo configure:10023: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10023 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10024 if test -z "$ac_err"; then
10025   rm -rf conftest*
10026   eval "ac_cv_header_$ac_safe=yes"
10027 else
10028   echo "$ac_err" >&5
10029   echo "configure: failed program was:" >&5
10030   cat conftest.$ac_ext >&5
10031   rm -rf conftest*
10032   eval "ac_cv_header_$ac_safe=no"
10033 fi
10034 rm -f conftest*
10035 fi
10036 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10037   echo "$ac_t""yes" 1>&6
10038     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10039   cat >> confdefs.h <<EOF
10040 #define $ac_tr_hdr 1
10041 EOF
10042  
10043 else
10044   echo "$ac_t""no" 1>&6
10045 fi
10046 done
10047
10048 if test $ac_cv_header_sys_uuid_h = yes ; then
10049         save_LIBS="$LIBS"
10050         
10051 echo $ac_n "checking for library containing uuid_to_str""... $ac_c" 1>&6
10052 echo "configure:10053: checking for library containing uuid_to_str" >&5
10053 if eval "test \"\${ac_cv_search_uuid_to_str+set}\" = set"; then
10054   echo $ac_n "(cached) $ac_c" 1>&6
10055 else
10056   ac_func_search_save_LIBS="$LIBS"
10057 ac_cv_search_uuid_to_str="no"
10058 cat > conftest.$ac_ext <<EOF
10059 #line 10060 "configure"
10060 #include "confdefs.h"
10061 /* Override any gcc2 internal prototype to avoid an error.  */
10062 /* We use char because int might match the return type of a gcc2
10063     builtin and then its argument prototype would still apply.  */
10064 char uuid_to_str();
10065
10066 int main() {
10067 uuid_to_str()
10068 ; return 0; }
10069 EOF
10070 if { (eval echo configure:10071: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10071   rm -rf conftest*
10072   ac_cv_search_uuid_to_str="none required"
10073 else
10074   echo "configure: failed program was:" >&5
10075   cat conftest.$ac_ext >&5
10076 fi
10077 rm -f conftest*
10078 test "$ac_cv_search_uuid_to_str" = "no" && for ac_lib in uuid; do
10079 LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
10080 cat > conftest.$ac_ext <<EOF
10081 #line 10082 "configure"
10082 #include "confdefs.h"
10083 /* Override any gcc2 internal prototype to avoid an error.  */
10084 /* We use char because int might match the return type of a gcc2
10085     builtin and then its argument prototype would still apply.  */
10086 char uuid_to_str();
10087
10088 int main() {
10089 uuid_to_str()
10090 ; return 0; }
10091 EOF
10092 if { (eval echo configure:10093: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10093   rm -rf conftest*
10094   ac_cv_search_uuid_to_str="-l$ac_lib"
10095 break
10096 else
10097   echo "configure: failed program was:" >&5
10098   cat conftest.$ac_ext >&5
10099 fi
10100 rm -f conftest*
10101 done
10102 LIBS="$ac_func_search_save_LIBS"
10103 fi
10104
10105 echo "$ac_t""$ac_cv_search_uuid_to_str" 1>&6
10106 if test "$ac_cv_search_uuid_to_str" != "no"; then
10107   test "$ac_cv_search_uuid_to_str" = "none required" || LIBS="$ac_cv_search_uuid_to_str $LIBS"
10108   have_uuid=yes
10109 else :
10110   :
10111 fi
10112         LIBS="$save_LIBS"
10113
10114         if test have_uuid = yes ; then
10115                 cat >> confdefs.h <<\EOF
10116 #define HAVE_UUID_TO_STR 1
10117 EOF
10118
10119
10120                 test "$ac_cv_search_uuid_to_str" = "none required" || \
10121                         SLAPD_LIBS="$SLAPD_LIBS $ac_cv_search_uuid_to_str"
10122         fi
10123 fi
10124
10125 if test $have_uuid = no ; then
10126         echo $ac_n "checking to see if -lrpcrt4 is needed for win32 UUID support""... $ac_c" 1>&6
10127 echo "configure:10128: checking to see if -lrpcrt4 is needed for win32 UUID support" >&5
10128         save_LIBS="$LIBS"
10129         LIBS="$LIBS -lrpcrt4"
10130         cat > conftest.$ac_ext <<EOF
10131 #line 10132 "configure"
10132 #include "confdefs.h"
10133
10134                 int __stdcall UuidCreate(void *);
10135                 int __stdcall UuidToStringA(void *,void **);
10136                 
10137 int main() {
10138
10139                 UuidCreate(0);
10140                 UuidToStringA(0,0);
10141                 
10142 ; return 0; }
10143 EOF
10144 if { (eval echo configure:10145: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10145   rm -rf conftest*
10146   need_rpcrt=yes
10147 else
10148   echo "configure: failed program was:" >&5
10149   cat conftest.$ac_ext >&5
10150   rm -rf conftest*
10151   need_rpcrt=no
10152 fi
10153 rm -f conftest*
10154         if test $need_rpcrt = yes; then
10155                 SLAPD_LIBS="$SLAPD_LIBS -lrpcrt4"
10156         fi
10157         LIBS="$save_LIBS"
10158         echo "$ac_t""$need_rpcrt" 1>&6
10159 fi
10160
10161 ol_link_dnssrv=no
10162 echo $ac_n "checking for res_query""... $ac_c" 1>&6
10163 echo "configure:10164: checking for res_query" >&5
10164 if eval "test \"\${ac_cv_func_res_query+set}\" = set"; then
10165   echo $ac_n "(cached) $ac_c" 1>&6
10166 else
10167   cat > conftest.$ac_ext <<EOF
10168 #line 10169 "configure"
10169 #include "confdefs.h"
10170 /* System header to define __stub macros and hopefully few prototypes,
10171     which can conflict with char res_query(); below.  */
10172 #include <assert.h>
10173 /* Override any gcc2 internal prototype to avoid an error.  */
10174 /* We use char because int might match the return type of a gcc2
10175     builtin and then its argument prototype would still apply.  */
10176 char res_query();
10177 char (*f)();
10178
10179 int main() {
10180
10181 /* The GNU C library defines this for functions which it implements
10182     to always fail with ENOSYS.  Some functions are actually named
10183     something starting with __ and the normal name is an alias.  */
10184 #if defined (__stub_res_query) || defined (__stub___res_query)
10185 choke me
10186 #else
10187 f = res_query;
10188 #endif
10189
10190 ; return 0; }
10191 EOF
10192 if { (eval echo configure:10193: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10193   rm -rf conftest*
10194   eval "ac_cv_func_res_query=yes"
10195 else
10196   echo "configure: failed program was:" >&5
10197   cat conftest.$ac_ext >&5
10198   rm -rf conftest*
10199   eval "ac_cv_func_res_query=no"
10200 fi
10201 rm -f conftest*
10202 fi
10203
10204 if eval "test \"`echo '$ac_cv_func_'res_query`\" = yes"; then
10205   echo "$ac_t""yes" 1>&6
10206   :
10207 else
10208   echo "$ac_t""no" 1>&6
10209 fi
10210
10211 if test $ac_cv_func_res_query = no ; then 
10212         echo $ac_n "checking for __res_query""... $ac_c" 1>&6
10213 echo "configure:10214: checking for __res_query" >&5
10214 if eval "test \"\${ac_cv_func___res_query+set}\" = set"; then
10215   echo $ac_n "(cached) $ac_c" 1>&6
10216 else
10217   cat > conftest.$ac_ext <<EOF
10218 #line 10219 "configure"
10219 #include "confdefs.h"
10220 /* System header to define __stub macros and hopefully few prototypes,
10221     which can conflict with char __res_query(); below.  */
10222 #include <assert.h>
10223 /* Override any gcc2 internal prototype to avoid an error.  */
10224 /* We use char because int might match the return type of a gcc2
10225     builtin and then its argument prototype would still apply.  */
10226 char __res_query();
10227 char (*f)();
10228
10229 int main() {
10230
10231 /* The GNU C library defines this for functions which it implements
10232     to always fail with ENOSYS.  Some functions are actually named
10233     something starting with __ and the normal name is an alias.  */
10234 #if defined (__stub___res_query) || defined (__stub_____res_query)
10235 choke me
10236 #else
10237 f = __res_query;
10238 #endif
10239
10240 ; return 0; }
10241 EOF
10242 if { (eval echo configure:10243: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10243   rm -rf conftest*
10244   eval "ac_cv_func___res_query=yes"
10245 else
10246   echo "configure: failed program was:" >&5
10247   cat conftest.$ac_ext >&5
10248   rm -rf conftest*
10249   eval "ac_cv_func___res_query=no"
10250 fi
10251 rm -f conftest*
10252 fi
10253
10254 if eval "test \"`echo '$ac_cv_func_'__res_query`\" = yes"; then
10255   echo "$ac_t""yes" 1>&6
10256   :
10257 else
10258   echo "$ac_t""no" 1>&6
10259 fi
10260
10261         ac_cv_func_res_query=$ac_cv_func___res_query
10262 fi
10263
10264 if test $ac_cv_func_res_query = no ; then 
10265         echo $ac_n "checking for res_query in -lbind""... $ac_c" 1>&6
10266 echo "configure:10267: checking for res_query in -lbind" >&5
10267 ac_lib_var=`echo bind'_'res_query | sed 'y%./+-:%__p__%'`
10268 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10269   echo $ac_n "(cached) $ac_c" 1>&6
10270 else
10271   ac_save_LIBS="$LIBS"
10272 LIBS="-lbind  $LIBS"
10273 cat > conftest.$ac_ext <<EOF
10274 #line 10275 "configure"
10275 #include "confdefs.h"
10276 /* Override any gcc2 internal prototype to avoid an error.  */
10277 /* We use char because int might match the return type of a gcc2
10278     builtin and then its argument prototype would still apply.  */
10279 char res_query();
10280
10281 int main() {
10282 res_query()
10283 ; return 0; }
10284 EOF
10285 if { (eval echo configure:10286: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10286   rm -rf conftest*
10287   eval "ac_cv_lib_$ac_lib_var=yes"
10288 else
10289   echo "configure: failed program was:" >&5
10290   cat conftest.$ac_ext >&5
10291   rm -rf conftest*
10292   eval "ac_cv_lib_$ac_lib_var=no"
10293 fi
10294 rm -f conftest*
10295 LIBS="$ac_save_LIBS"
10296
10297 fi
10298 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10299   echo "$ac_t""yes" 1>&6
10300     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10301     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10302   cat >> confdefs.h <<EOF
10303 #define $ac_tr_lib 1
10304 EOF
10305
10306   LIBS="-lbind $LIBS"
10307
10308 else
10309   echo "$ac_t""no" 1>&6
10310 fi
10311
10312         ac_cv_func_res_query=$ac_cv_lib_bind_res_query
10313 fi
10314
10315 if test $ac_cv_func_res_query = no ; then 
10316         echo $ac_n "checking for __res_query in -lbind""... $ac_c" 1>&6
10317 echo "configure:10318: checking for __res_query in -lbind" >&5
10318 ac_lib_var=`echo bind'_'__res_query | sed 'y%./+-:%__p__%'`
10319 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10320   echo $ac_n "(cached) $ac_c" 1>&6
10321 else
10322   ac_save_LIBS="$LIBS"
10323 LIBS="-lbind  $LIBS"
10324 cat > conftest.$ac_ext <<EOF
10325 #line 10326 "configure"
10326 #include "confdefs.h"
10327 /* Override any gcc2 internal prototype to avoid an error.  */
10328 /* We use char because int might match the return type of a gcc2
10329     builtin and then its argument prototype would still apply.  */
10330 char __res_query();
10331
10332 int main() {
10333 __res_query()
10334 ; return 0; }
10335 EOF
10336 if { (eval echo configure:10337: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10337   rm -rf conftest*
10338   eval "ac_cv_lib_$ac_lib_var=yes"
10339 else
10340   echo "configure: failed program was:" >&5
10341   cat conftest.$ac_ext >&5
10342   rm -rf conftest*
10343   eval "ac_cv_lib_$ac_lib_var=no"
10344 fi
10345 rm -f conftest*
10346 LIBS="$ac_save_LIBS"
10347
10348 fi
10349 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10350   echo "$ac_t""yes" 1>&6
10351     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10352     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10353   cat >> confdefs.h <<EOF
10354 #define $ac_tr_lib 1
10355 EOF
10356
10357   LIBS="-lbind $LIBS"
10358
10359 else
10360   echo "$ac_t""no" 1>&6
10361 fi
10362
10363         ac_cv_func_res_query=$ac_cv_lib_bind___res_query
10364 fi
10365
10366 if test $ac_cv_func_res_query = no ; then 
10367         echo $ac_n "checking for res_query in -lresolv""... $ac_c" 1>&6
10368 echo "configure:10369: checking for res_query in -lresolv" >&5
10369 ac_lib_var=`echo resolv'_'res_query | sed 'y%./+-:%__p__%'`
10370 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10371   echo $ac_n "(cached) $ac_c" 1>&6
10372 else
10373   ac_save_LIBS="$LIBS"
10374 LIBS="-lresolv  $LIBS"
10375 cat > conftest.$ac_ext <<EOF
10376 #line 10377 "configure"
10377 #include "confdefs.h"
10378 /* Override any gcc2 internal prototype to avoid an error.  */
10379 /* We use char because int might match the return type of a gcc2
10380     builtin and then its argument prototype would still apply.  */
10381 char res_query();
10382
10383 int main() {
10384 res_query()
10385 ; return 0; }
10386 EOF
10387 if { (eval echo configure:10388: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10388   rm -rf conftest*
10389   eval "ac_cv_lib_$ac_lib_var=yes"
10390 else
10391   echo "configure: failed program was:" >&5
10392   cat conftest.$ac_ext >&5
10393   rm -rf conftest*
10394   eval "ac_cv_lib_$ac_lib_var=no"
10395 fi
10396 rm -f conftest*
10397 LIBS="$ac_save_LIBS"
10398
10399 fi
10400 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10401   echo "$ac_t""yes" 1>&6
10402     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10403     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10404   cat >> confdefs.h <<EOF
10405 #define $ac_tr_lib 1
10406 EOF
10407
10408   LIBS="-lresolv $LIBS"
10409
10410 else
10411   echo "$ac_t""no" 1>&6
10412 fi
10413
10414         ac_cv_func_res_query=$ac_cv_lib_resolv_res_query
10415 fi
10416
10417 if test $ac_cv_func_res_query = no ; then 
10418         echo $ac_n "checking for __res_query in -lresolv""... $ac_c" 1>&6
10419 echo "configure:10420: checking for __res_query in -lresolv" >&5
10420 ac_lib_var=`echo resolv'_'__res_query | sed 'y%./+-:%__p__%'`
10421 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10422   echo $ac_n "(cached) $ac_c" 1>&6
10423 else
10424   ac_save_LIBS="$LIBS"
10425 LIBS="-lresolv  $LIBS"
10426 cat > conftest.$ac_ext <<EOF
10427 #line 10428 "configure"
10428 #include "confdefs.h"
10429 /* Override any gcc2 internal prototype to avoid an error.  */
10430 /* We use char because int might match the return type of a gcc2
10431     builtin and then its argument prototype would still apply.  */
10432 char __res_query();
10433
10434 int main() {
10435 __res_query()
10436 ; return 0; }
10437 EOF
10438 if { (eval echo configure:10439: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10439   rm -rf conftest*
10440   eval "ac_cv_lib_$ac_lib_var=yes"
10441 else
10442   echo "configure: failed program was:" >&5
10443   cat conftest.$ac_ext >&5
10444   rm -rf conftest*
10445   eval "ac_cv_lib_$ac_lib_var=no"
10446 fi
10447 rm -f conftest*
10448 LIBS="$ac_save_LIBS"
10449
10450 fi
10451 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10452   echo "$ac_t""yes" 1>&6
10453     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10454     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10455   cat >> confdefs.h <<EOF
10456 #define $ac_tr_lib 1
10457 EOF
10458
10459   LIBS="-lresolv $LIBS"
10460
10461 else
10462   echo "$ac_t""no" 1>&6
10463 fi
10464
10465         ac_cv_func_res_query=$ac_cv_lib_resolv___res_query
10466 fi
10467
10468 if test $ac_cv_func_res_query = no ; then 
10469         echo $ac_n "checking for _res_9_query in -lresolv""... $ac_c" 1>&6
10470 echo "configure:10471: checking for _res_9_query in -lresolv" >&5
10471 ac_lib_var=`echo resolv'_'_res_9_query | sed 'y%./+-:%__p__%'`
10472 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10473   echo $ac_n "(cached) $ac_c" 1>&6
10474 else
10475   ac_save_LIBS="$LIBS"
10476 LIBS="-lresolv  $LIBS"
10477 cat > conftest.$ac_ext <<EOF
10478 #line 10479 "configure"
10479 #include "confdefs.h"
10480 /* Override any gcc2 internal prototype to avoid an error.  */
10481 /* We use char because int might match the return type of a gcc2
10482     builtin and then its argument prototype would still apply.  */
10483 char _res_9_query();
10484
10485 int main() {
10486 _res_9_query()
10487 ; return 0; }
10488 EOF
10489 if { (eval echo configure:10490: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10490   rm -rf conftest*
10491   eval "ac_cv_lib_$ac_lib_var=yes"
10492 else
10493   echo "configure: failed program was:" >&5
10494   cat conftest.$ac_ext >&5
10495   rm -rf conftest*
10496   eval "ac_cv_lib_$ac_lib_var=no"
10497 fi
10498 rm -f conftest*
10499 LIBS="$ac_save_LIBS"
10500
10501 fi
10502 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10503   echo "$ac_t""yes" 1>&6
10504     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10505     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10506   cat >> confdefs.h <<EOF
10507 #define $ac_tr_lib 1
10508 EOF
10509
10510   LIBS="-lresolv $LIBS"
10511
10512 else
10513   echo "$ac_t""no" 1>&6
10514 fi
10515
10516         ac_cv_func_res_query=$ac_cv_lib_resolv_res_9_query
10517 fi
10518
10519 if test "$ac_cv_func_res_query" = yes ; then
10520         cat >> confdefs.h <<\EOF
10521 #define HAVE_RES_QUERY 1
10522 EOF
10523
10524
10525         if test $ol_enable_dnssrv != no ; then
10526                 ol_link_dnssrv=yes
10527         fi
10528 fi
10529
10530 if test "$ol_enable_dnssrv" != no -a "$ol_link_dnssrv" = no ; then
10531         { echo "configure: error: DNSSRV requires res_query()" 1>&2; exit 1; }
10532 fi
10533
10534 for ac_func in hstrerror 
10535 do
10536 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10537 echo "configure:10538: checking for $ac_func" >&5
10538 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10539   echo $ac_n "(cached) $ac_c" 1>&6
10540 else
10541   cat > conftest.$ac_ext <<EOF
10542 #line 10543 "configure"
10543 #include "confdefs.h"
10544 /* System header to define __stub macros and hopefully few prototypes,
10545     which can conflict with char $ac_func(); below.  */
10546 #include <assert.h>
10547 /* Override any gcc2 internal prototype to avoid an error.  */
10548 /* We use char because int might match the return type of a gcc2
10549     builtin and then its argument prototype would still apply.  */
10550 char $ac_func();
10551 char (*f)();
10552
10553 int main() {
10554
10555 /* The GNU C library defines this for functions which it implements
10556     to always fail with ENOSYS.  Some functions are actually named
10557     something starting with __ and the normal name is an alias.  */
10558 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10559 choke me
10560 #else
10561 f = $ac_func;
10562 #endif
10563
10564 ; return 0; }
10565 EOF
10566 if { (eval echo configure:10567: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10567   rm -rf conftest*
10568   eval "ac_cv_func_$ac_func=yes"
10569 else
10570   echo "configure: failed program was:" >&5
10571   cat conftest.$ac_ext >&5
10572   rm -rf conftest*
10573   eval "ac_cv_func_$ac_func=no"
10574 fi
10575 rm -f conftest*
10576 fi
10577
10578 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10579   echo "$ac_t""yes" 1>&6
10580     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10581   cat >> confdefs.h <<EOF
10582 #define $ac_tr_func 1
10583 EOF
10584  
10585 else
10586   echo "$ac_t""no" 1>&6
10587 fi
10588 done
10589
10590
10591 for ac_func in getaddrinfo getnameinfo gai_strerror inet_ntop 
10592 do
10593 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10594 echo "configure:10595: checking for $ac_func" >&5
10595 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10596   echo $ac_n "(cached) $ac_c" 1>&6
10597 else
10598   cat > conftest.$ac_ext <<EOF
10599 #line 10600 "configure"
10600 #include "confdefs.h"
10601 /* System header to define __stub macros and hopefully few prototypes,
10602     which can conflict with char $ac_func(); below.  */
10603 #include <assert.h>
10604 /* Override any gcc2 internal prototype to avoid an error.  */
10605 /* We use char because int might match the return type of a gcc2
10606     builtin and then its argument prototype would still apply.  */
10607 char $ac_func();
10608 char (*f)();
10609
10610 int main() {
10611
10612 /* The GNU C library defines this for functions which it implements
10613     to always fail with ENOSYS.  Some functions are actually named
10614     something starting with __ and the normal name is an alias.  */
10615 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10616 choke me
10617 #else
10618 f = $ac_func;
10619 #endif
10620
10621 ; return 0; }
10622 EOF
10623 if { (eval echo configure:10624: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10624   rm -rf conftest*
10625   eval "ac_cv_func_$ac_func=yes"
10626 else
10627   echo "configure: failed program was:" >&5
10628   cat conftest.$ac_ext >&5
10629   rm -rf conftest*
10630   eval "ac_cv_func_$ac_func=no"
10631 fi
10632 rm -f conftest*
10633 fi
10634
10635 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10636   echo "$ac_t""yes" 1>&6
10637     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10638   cat >> confdefs.h <<EOF
10639 #define $ac_tr_func 1
10640 EOF
10641  
10642 else
10643   echo "$ac_t""no" 1>&6
10644 fi
10645 done
10646
10647
10648 ol_link_ipv6=no
10649 if test $ac_cv_func_getaddrinfo = no -o $ac_cv_func_inet_ntop = no ; then
10650         if test $ol_enable_ipv6 = yes ; then
10651                 { echo "configure: error: IPv6 support requires getaddrinfo() and inet_ntop()" 1>&2; exit 1; }
10652         fi
10653 elif test $ol_enable_ipv6 != no ; then
10654         echo $ac_n "checking INET6_ADDRSTRLEN""... $ac_c" 1>&6
10655 echo "configure:10656: checking INET6_ADDRSTRLEN" >&5
10656 if eval "test \"\${ol_cv_inet6_addrstrlen+set}\" = set"; then
10657   echo $ac_n "(cached) $ac_c" 1>&6
10658 else
10659   
10660                 cat > conftest.$ac_ext <<EOF
10661 #line 10662 "configure"
10662 #include "confdefs.h"
10663
10664 #                       include <netinet/in.h>
10665 #                       ifdef INET6_ADDRSTRLEN
10666                                 __has_inet6_addrstrlen__;
10667 #                       endif
10668                 
10669 EOF
10670 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10671   egrep "__has_inet6_addrstrlen__" >/dev/null 2>&1; then
10672   rm -rf conftest*
10673   ol_cv_inet6_addrstrlen=yes
10674 else
10675   rm -rf conftest*
10676   ol_cv_inet6_addrstrlen=no
10677 fi
10678 rm -f conftest*
10679
10680 fi
10681
10682 echo "$ac_t""$ol_cv_inet6_addrstrlen" 1>&6
10683
10684
10685         echo $ac_n "checking struct sockaddr_storage""... $ac_c" 1>&6
10686 echo "configure:10687: checking struct sockaddr_storage" >&5
10687 if eval "test \"\${ol_cv_struct_sockaddr_storage+set}\" = set"; then
10688   echo $ac_n "(cached) $ac_c" 1>&6
10689 else
10690   
10691                 cat > conftest.$ac_ext <<EOF
10692 #line 10693 "configure"
10693 #include "confdefs.h"
10694
10695 #include <sys/types.h>
10696 #include <sys/socket.h>
10697
10698 int main() {
10699
10700                         struct sockaddr_storage ss;
10701
10702 ; return 0; }
10703 EOF
10704 if { (eval echo configure:10705: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10705   rm -rf conftest*
10706   ol_cv_struct_sockaddr_storage=yes
10707 else
10708   echo "configure: failed program was:" >&5
10709   cat conftest.$ac_ext >&5
10710   rm -rf conftest*
10711   ol_cv_struct_sockaddr_storage=no
10712 fi
10713 rm -f conftest*
10714 fi
10715
10716 echo "$ac_t""$ol_cv_struct_sockaddr_storage" 1>&6
10717
10718         if test $ol_cv_inet6_addrstrlen = yes \
10719                 -a $ol_cv_struct_sockaddr_storage = yes ; then
10720                 ol_link_ipv6=yes
10721         elif test $ol_enable_ipv6 = yes \
10722                         -a $ol_cv_inet6_addrstrlen = no ; then
10723                 { echo "configure: error: IPv6 support requires INET6_ADDRSTRLEN" 1>&2; exit 1; }
10724         elif test $ol_enable_ipv6 = yes \
10725                         -a $ol_cv_struct_sockaddr_storage = no ; then
10726                 { echo "configure: error: IPv6 support requires struct sockaddr_storage" 1>&2; exit 1; }
10727         fi
10728 fi
10729
10730 if test $ol_enable_local != no ; then
10731         for ac_hdr in sys/un.h 
10732 do
10733 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10734 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10735 echo "configure:10736: checking for $ac_hdr" >&5
10736 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10737   echo $ac_n "(cached) $ac_c" 1>&6
10738 else
10739   cat > conftest.$ac_ext <<EOF
10740 #line 10741 "configure"
10741 #include "confdefs.h"
10742 #include <$ac_hdr>
10743 EOF
10744 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10745 { (eval echo configure:10746: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10746 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10747 if test -z "$ac_err"; then
10748   rm -rf conftest*
10749   eval "ac_cv_header_$ac_safe=yes"
10750 else
10751   echo "$ac_err" >&5
10752   echo "configure: failed program was:" >&5
10753   cat conftest.$ac_ext >&5
10754   rm -rf conftest*
10755   eval "ac_cv_header_$ac_safe=no"
10756 fi
10757 rm -f conftest*
10758 fi
10759 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10760   echo "$ac_t""yes" 1>&6
10761     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10762   cat >> confdefs.h <<EOF
10763 #define $ac_tr_hdr 1
10764 EOF
10765  
10766 else
10767   echo "$ac_t""no" 1>&6
10768 fi
10769 done
10770
10771
10772         if test $ol_enable_local = auto ; then
10773                 ol_enable_local=$ac_cv_header_sys_un_h
10774         elif test $ac_cv_header_sys_un_h = no ; then
10775                 { echo "configure: error: AF_LOCAL domain support requires sys/un.h" 1>&2; exit 1; }
10776         fi
10777 fi
10778
10779 ol_link_kbind=no
10780 ol_link_krb5=no
10781 ol_link_krb4=no
10782
10783 if test $ol_with_kerberos = yes -o $ol_with_kerberos = auto \
10784         -o $ol_with_kerberos = k5 -o $ol_with_kerberos = k5only \
10785         -o $ol_with_kerberos = k425 ; then
10786
10787         for ac_hdr in krb5.h
10788 do
10789 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10790 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10791 echo "configure:10792: checking for $ac_hdr" >&5
10792 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10793   echo $ac_n "(cached) $ac_c" 1>&6
10794 else
10795   cat > conftest.$ac_ext <<EOF
10796 #line 10797 "configure"
10797 #include "confdefs.h"
10798 #include <$ac_hdr>
10799 EOF
10800 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10801 { (eval echo configure:10802: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10802 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10803 if test -z "$ac_err"; then
10804   rm -rf conftest*
10805   eval "ac_cv_header_$ac_safe=yes"
10806 else
10807   echo "$ac_err" >&5
10808   echo "configure: failed program was:" >&5
10809   cat conftest.$ac_ext >&5
10810   rm -rf conftest*
10811   eval "ac_cv_header_$ac_safe=no"
10812 fi
10813 rm -f conftest*
10814 fi
10815 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10816   echo "$ac_t""yes" 1>&6
10817     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10818   cat >> confdefs.h <<EOF
10819 #define $ac_tr_hdr 1
10820 EOF
10821  
10822 else
10823   echo "$ac_t""no" 1>&6
10824 fi
10825 done
10826
10827
10828         if test $ac_cv_header_krb5_h = yes ; then
10829                                 for ac_hdr in heim_err.h
10830 do
10831 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10832 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10833 echo "configure:10834: checking for $ac_hdr" >&5
10834 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10835   echo $ac_n "(cached) $ac_c" 1>&6
10836 else
10837   cat > conftest.$ac_ext <<EOF
10838 #line 10839 "configure"
10839 #include "confdefs.h"
10840 #include <$ac_hdr>
10841 EOF
10842 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10843 { (eval echo configure:10844: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10844 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10845 if test -z "$ac_err"; then
10846   rm -rf conftest*
10847   eval "ac_cv_header_$ac_safe=yes"
10848 else
10849   echo "$ac_err" >&5
10850   echo "configure: failed program was:" >&5
10851   cat conftest.$ac_ext >&5
10852   rm -rf conftest*
10853   eval "ac_cv_header_$ac_safe=no"
10854 fi
10855 rm -f conftest*
10856 fi
10857 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10858   echo "$ac_t""yes" 1>&6
10859     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10860   cat >> confdefs.h <<EOF
10861 #define $ac_tr_hdr 1
10862 EOF
10863  
10864 else
10865   echo "$ac_t""no" 1>&6
10866 fi
10867 done
10868
10869                 if test $ac_cv_header_heim_err_h = yes ; then
10870                         krb5_impl=heimdal
10871                 else
10872                         krb5_impl=mit
10873                 fi
10874
10875                 if test $krb5_impl = mit; then
10876                         echo $ac_n "checking for main in -lk5crypto""... $ac_c" 1>&6
10877 echo "configure:10878: checking for main in -lk5crypto" >&5
10878 ac_lib_var=`echo k5crypto'_'main | sed 'y%./+-:%__p__%'`
10879 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10880   echo $ac_n "(cached) $ac_c" 1>&6
10881 else
10882   ac_save_LIBS="$LIBS"
10883 LIBS="-lk5crypto  $LIBS"
10884 cat > conftest.$ac_ext <<EOF
10885 #line 10886 "configure"
10886 #include "confdefs.h"
10887
10888 int main() {
10889 main()
10890 ; return 0; }
10891 EOF
10892 if { (eval echo configure:10893: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10893   rm -rf conftest*
10894   eval "ac_cv_lib_$ac_lib_var=yes"
10895 else
10896   echo "configure: failed program was:" >&5
10897   cat conftest.$ac_ext >&5
10898   rm -rf conftest*
10899   eval "ac_cv_lib_$ac_lib_var=no"
10900 fi
10901 rm -f conftest*
10902 LIBS="$ac_save_LIBS"
10903
10904 fi
10905 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10906   echo "$ac_t""yes" 1>&6
10907   krb5crypto=k5crypto
10908 else
10909   echo "$ac_t""no" 1>&6
10910 krb5crypto=crypto
10911 fi
10912
10913
10914                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
10915 echo "configure:10916: checking for main in -lkrb5" >&5
10916 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
10917 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10918   echo $ac_n "(cached) $ac_c" 1>&6
10919 else
10920   ac_save_LIBS="$LIBS"
10921 LIBS="-lkrb5 -l$krb5crypto -lcom_err $LIBS"
10922 cat > conftest.$ac_ext <<EOF
10923 #line 10924 "configure"
10924 #include "confdefs.h"
10925
10926 int main() {
10927 main()
10928 ; return 0; }
10929 EOF
10930 if { (eval echo configure:10931: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10931   rm -rf conftest*
10932   eval "ac_cv_lib_$ac_lib_var=yes"
10933 else
10934   echo "configure: failed program was:" >&5
10935   cat conftest.$ac_ext >&5
10936   rm -rf conftest*
10937   eval "ac_cv_lib_$ac_lib_var=no"
10938 fi
10939 rm -f conftest*
10940 LIBS="$ac_save_LIBS"
10941
10942 fi
10943 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10944   echo "$ac_t""yes" 1>&6
10945   have_krb5=yes
10946                                 KRB5_LIBS="-lkrb5 -l$krb5crypto -lcom_err"
10947 else
10948   echo "$ac_t""no" 1>&6
10949 have_krb5=no
10950 fi
10951
10952
10953                 elif test $krb5_impl = heimdal; then
10954                         echo $ac_n "checking for main in -ldes""... $ac_c" 1>&6
10955 echo "configure:10956: checking for main in -ldes" >&5
10956 ac_lib_var=`echo des'_'main | sed 'y%./+-:%__p__%'`
10957 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10958   echo $ac_n "(cached) $ac_c" 1>&6
10959 else
10960   ac_save_LIBS="$LIBS"
10961 LIBS="-ldes  $LIBS"
10962 cat > conftest.$ac_ext <<EOF
10963 #line 10964 "configure"
10964 #include "confdefs.h"
10965
10966 int main() {
10967 main()
10968 ; return 0; }
10969 EOF
10970 if { (eval echo configure:10971: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10971   rm -rf conftest*
10972   eval "ac_cv_lib_$ac_lib_var=yes"
10973 else
10974   echo "configure: failed program was:" >&5
10975   cat conftest.$ac_ext >&5
10976   rm -rf conftest*
10977   eval "ac_cv_lib_$ac_lib_var=no"
10978 fi
10979 rm -f conftest*
10980 LIBS="$ac_save_LIBS"
10981
10982 fi
10983 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10984   echo "$ac_t""yes" 1>&6
10985   krb5crypto=des
10986 else
10987   echo "$ac_t""no" 1>&6
10988 krb5crypto=crypto
10989 fi
10990
10991
10992                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
10993 echo "configure:10994: checking for main in -lkrb5" >&5
10994 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
10995 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10996   echo $ac_n "(cached) $ac_c" 1>&6
10997 else
10998   ac_save_LIBS="$LIBS"
10999 LIBS="-lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err $LIBS"
11000 cat > conftest.$ac_ext <<EOF
11001 #line 11002 "configure"
11002 #include "confdefs.h"
11003
11004 int main() {
11005 main()
11006 ; return 0; }
11007 EOF
11008 if { (eval echo configure:11009: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11009   rm -rf conftest*
11010   eval "ac_cv_lib_$ac_lib_var=yes"
11011 else
11012   echo "configure: failed program was:" >&5
11013   cat conftest.$ac_ext >&5
11014   rm -rf conftest*
11015   eval "ac_cv_lib_$ac_lib_var=no"
11016 fi
11017 rm -f conftest*
11018 LIBS="$ac_save_LIBS"
11019
11020 fi
11021 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11022   echo "$ac_t""yes" 1>&6
11023   have_krb5=yes
11024                                 KRB5_LIBS="-lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err"
11025 else
11026   echo "$ac_t""no" 1>&6
11027 have_krb5=no
11028 fi
11029
11030
11031                         cat >> confdefs.h <<\EOF
11032 #define HAVE_HEIMDAL_KERBEROS 1
11033 EOF
11034
11035
11036                 else
11037                         have_krb5=no
11038                         echo "configure: warning: Unrecognized Kerberos5 Implementation" 1>&2
11039                 fi
11040
11041                 if test $have_krb5 = yes ; then
11042                         ol_link_krb5=yes
11043
11044                         cat >> confdefs.h <<\EOF
11045 #define HAVE_KRB5 1
11046 EOF
11047
11048
11049                         if test $ol_with_kerberos = k5only ; then
11050                                 ol_with_kerberos=found
11051                         fi
11052
11053                 elif test $ol_with_kerberos != auto ; then
11054                         { echo "configure: error: Required Kerberos 5 support not available" 1>&2; exit 1; }
11055                 fi
11056
11057         fi
11058 fi
11059
11060 if test $ol_link_krb5 = yes -a \( $ol_with_kerberos = yes -o \
11061         $ol_with_kerberos = auto -o $ol_with_kerberos = k425 \) ; then
11062
11063         for ac_hdr in kerberosIV/krb.h kerberosIV/des.h
11064 do
11065 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11066 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11067 echo "configure:11068: checking for $ac_hdr" >&5
11068 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11069   echo $ac_n "(cached) $ac_c" 1>&6
11070 else
11071   cat > conftest.$ac_ext <<EOF
11072 #line 11073 "configure"
11073 #include "confdefs.h"
11074 #include <$ac_hdr>
11075 EOF
11076 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11077 { (eval echo configure:11078: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11078 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11079 if test -z "$ac_err"; then
11080   rm -rf conftest*
11081   eval "ac_cv_header_$ac_safe=yes"
11082 else
11083   echo "$ac_err" >&5
11084   echo "configure: failed program was:" >&5
11085   cat conftest.$ac_ext >&5
11086   rm -rf conftest*
11087   eval "ac_cv_header_$ac_safe=no"
11088 fi
11089 rm -f conftest*
11090 fi
11091 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11092   echo "$ac_t""yes" 1>&6
11093     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11094   cat >> confdefs.h <<EOF
11095 #define $ac_tr_hdr 1
11096 EOF
11097  
11098 else
11099   echo "$ac_t""no" 1>&6
11100 fi
11101 done
11102
11103
11104         if test $ac_cv_header_kerberosIV_krb_h = yes ; then
11105                 if test $krb5_impl = mit; then
11106                         echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
11107 echo "configure:11108: checking for main in -lkrb4" >&5
11108 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
11109 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11110   echo $ac_n "(cached) $ac_c" 1>&6
11111 else
11112   ac_save_LIBS="$LIBS"
11113 LIBS="-lkrb4 -ldes425 -lkrb5 -l$krb5crypto -lcom_err $LIBS"
11114 cat > conftest.$ac_ext <<EOF
11115 #line 11116 "configure"
11116 #include "confdefs.h"
11117
11118 int main() {
11119 main()
11120 ; return 0; }
11121 EOF
11122 if { (eval echo configure:11123: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11123   rm -rf conftest*
11124   eval "ac_cv_lib_$ac_lib_var=yes"
11125 else
11126   echo "configure: failed program was:" >&5
11127   cat conftest.$ac_ext >&5
11128   rm -rf conftest*
11129   eval "ac_cv_lib_$ac_lib_var=no"
11130 fi
11131 rm -f conftest*
11132 LIBS="$ac_save_LIBS"
11133
11134 fi
11135 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11136   echo "$ac_t""yes" 1>&6
11137   have_k425=yes
11138                                 KRB4_LIBS="-lkrb4 -ldes425"
11139 else
11140   echo "$ac_t""no" 1>&6
11141 have_k425=no
11142 fi
11143
11144
11145                 elif test $krb5_impl = heimdal; then
11146                         echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
11147 echo "configure:11148: checking for main in -lkrb4" >&5
11148 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
11149 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11150   echo $ac_n "(cached) $ac_c" 1>&6
11151 else
11152   ac_save_LIBS="$LIBS"
11153 LIBS="-lkrb4 -lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err $LIBS"
11154 cat > conftest.$ac_ext <<EOF
11155 #line 11156 "configure"
11156 #include "confdefs.h"
11157
11158 int main() {
11159 main()
11160 ; return 0; }
11161 EOF
11162 if { (eval echo configure:11163: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11163   rm -rf conftest*
11164   eval "ac_cv_lib_$ac_lib_var=yes"
11165 else
11166   echo "configure: failed program was:" >&5
11167   cat conftest.$ac_ext >&5
11168   rm -rf conftest*
11169   eval "ac_cv_lib_$ac_lib_var=no"
11170 fi
11171 rm -f conftest*
11172 LIBS="$ac_save_LIBS"
11173
11174 fi
11175 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11176   echo "$ac_t""yes" 1>&6
11177   have_k425=yes
11178                                 KRB4_LIBS="-lkrb4"
11179 else
11180   echo "$ac_t""no" 1>&6
11181 have_k425=no
11182 fi
11183
11184
11185                 else
11186                         have_425=no
11187                         echo "configure: warning: Unrecongized Kerberos V Implementation" 1>&2
11188                 fi
11189
11190                 if test $have_k425 = yes ; then
11191                         ol_with_kerberos=found
11192                         ol_link_krb4=yes
11193
11194                         cat >> confdefs.h <<\EOF
11195 #define HAVE_KRB425 1
11196 EOF
11197
11198                         cat >> confdefs.h <<\EOF
11199 #define HAVE_KRB4 1
11200 EOF
11201
11202
11203                         echo $ac_n "checking for des_debug in Kerberos libraries""... $ac_c" 1>&6
11204 echo "configure:11205: checking for des_debug in Kerberos libraries" >&5
11205 if eval "test \"\${ol_cv_var_des_debug+set}\" = set"; then
11206   echo $ac_n "(cached) $ac_c" 1>&6
11207 else
11208   
11209                                                                 save_LIBS="$LIBS"
11210                                 LIBS="$KRB4_LIBS $KRB5_LIBS $LIBS"
11211                                 cat > conftest.$ac_ext <<EOF
11212 #line 11213 "configure"
11213 #include "confdefs.h"
11214
11215 #include <kerberosIV/krb.h>
11216 #include <kerberosIV/des.h>
11217 extern int des_debug;
11218
11219 int main() {
11220
11221 des_debug = 1;
11222
11223 ; return 0; }
11224 EOF
11225 if { (eval echo configure:11226: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11226   rm -rf conftest*
11227   ol_cv_var_des_debug=yes
11228 else
11229   echo "configure: failed program was:" >&5
11230   cat conftest.$ac_ext >&5
11231   rm -rf conftest*
11232   ol_cv_var_des_debug=no
11233 fi
11234 rm -f conftest*
11235                                                                 LIBS="$save_LIBS"
11236                         
11237 fi
11238
11239 echo "$ac_t""$ol_cv_var_des_debug" 1>&6
11240
11241                         if test $ol_cv_var_des_debug = yes ; then
11242                                 cat >> confdefs.h <<\EOF
11243 #define HAVE_DES_DEBUG 1
11244 EOF
11245
11246                         fi
11247
11248                         LIBS="$save_LIBS"
11249                 fi
11250         fi
11251 fi
11252
11253 if test $ol_link_krb5 = yes ; then
11254         ol_with_kerberos=found
11255 fi
11256
11257 if test $ol_with_kerberos = yes -o $ol_with_kerberos = auto \
11258         -o $ol_with_kerberos = k4 -o $ol_with_kerberos = kth ; then
11259
11260         for ac_hdr in krb.h des.h krb-archaeology.h 
11261 do
11262 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11263 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11264 echo "configure:11265: checking for $ac_hdr" >&5
11265 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11266   echo $ac_n "(cached) $ac_c" 1>&6
11267 else
11268   cat > conftest.$ac_ext <<EOF
11269 #line 11270 "configure"
11270 #include "confdefs.h"
11271 #include <$ac_hdr>
11272 EOF
11273 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11274 { (eval echo configure:11275: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11275 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11276 if test -z "$ac_err"; then
11277   rm -rf conftest*
11278   eval "ac_cv_header_$ac_safe=yes"
11279 else
11280   echo "$ac_err" >&5
11281   echo "configure: failed program was:" >&5
11282   cat conftest.$ac_ext >&5
11283   rm -rf conftest*
11284   eval "ac_cv_header_$ac_safe=no"
11285 fi
11286 rm -f conftest*
11287 fi
11288 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11289   echo "$ac_t""yes" 1>&6
11290     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11291   cat >> confdefs.h <<EOF
11292 #define $ac_tr_hdr 1
11293 EOF
11294  
11295 else
11296   echo "$ac_t""no" 1>&6
11297 fi
11298 done
11299
11300
11301         if test $ac_cv_header_krb_h = yes ; then
11302                 echo $ac_n "checking for main in -lkrb""... $ac_c" 1>&6
11303 echo "configure:11304: checking for main in -lkrb" >&5
11304 ac_lib_var=`echo krb'_'main | sed 'y%./+-:%__p__%'`
11305 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11306   echo $ac_n "(cached) $ac_c" 1>&6
11307 else
11308   ac_save_LIBS="$LIBS"
11309 LIBS="-lkrb -ldes $LIBS"
11310 cat > conftest.$ac_ext <<EOF
11311 #line 11312 "configure"
11312 #include "confdefs.h"
11313
11314 int main() {
11315 main()
11316 ; return 0; }
11317 EOF
11318 if { (eval echo configure:11319: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11319   rm -rf conftest*
11320   eval "ac_cv_lib_$ac_lib_var=yes"
11321 else
11322   echo "configure: failed program was:" >&5
11323   cat conftest.$ac_ext >&5
11324   rm -rf conftest*
11325   eval "ac_cv_lib_$ac_lib_var=no"
11326 fi
11327 rm -f conftest*
11328 LIBS="$ac_save_LIBS"
11329
11330 fi
11331 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11332   echo "$ac_t""yes" 1>&6
11333   have_k4=yes
11334 else
11335   echo "$ac_t""no" 1>&6
11336 have_k4=no
11337 fi
11338
11339
11340                 if test $have_k4 = yes ; then
11341                         ol_with_kerberos=found
11342                         ol_link_krb4=yes
11343
11344                         cat >> confdefs.h <<\EOF
11345 #define HAVE_KRB4 1
11346 EOF
11347
11348
11349                         KRB4_LIBS="-lkrb -ldes"
11350
11351                         if test $ac_cv_header_krb_archaeology_h = yes ; then
11352                                 cat >> confdefs.h <<\EOF
11353 #define HAVE_KTH_KERBEROS 1
11354 EOF
11355
11356                         fi
11357                 fi
11358         fi
11359 fi
11360
11361 if test $ol_link_krb4 = yes -a $ol_enable_kbind != no ; then
11362         ol_link_kbind=yes
11363
11364 elif test $ol_enable_kbind = yes ; then
11365         { echo "configure: error: Kerberos IV detection failed" 1>&2; exit 1; }
11366 fi
11367
11368 if test $ol_link_krb4 = yes -o $ol_link_krb5 = yes ; then
11369         cat >> confdefs.h <<\EOF
11370 #define HAVE_KERBEROS 1
11371 EOF
11372
11373
11374 elif test $ol_with_kerberos != auto -a $ol_with_kerberos != no ; then
11375         { echo "configure: error: Kerberos detection failed" 1>&2; exit 1; }
11376 fi
11377
11378         
11379 ol_link_tls=no
11380 if test $ol_with_tls != no ; then
11381         for ac_hdr in openssl/ssl.h ssl.h
11382 do
11383 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11384 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11385 echo "configure:11386: checking for $ac_hdr" >&5
11386 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11387   echo $ac_n "(cached) $ac_c" 1>&6
11388 else
11389   cat > conftest.$ac_ext <<EOF
11390 #line 11391 "configure"
11391 #include "confdefs.h"
11392 #include <$ac_hdr>
11393 EOF
11394 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11395 { (eval echo configure:11396: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11396 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11397 if test -z "$ac_err"; then
11398   rm -rf conftest*
11399   eval "ac_cv_header_$ac_safe=yes"
11400 else
11401   echo "$ac_err" >&5
11402   echo "configure: failed program was:" >&5
11403   cat conftest.$ac_ext >&5
11404   rm -rf conftest*
11405   eval "ac_cv_header_$ac_safe=no"
11406 fi
11407 rm -f conftest*
11408 fi
11409 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11410   echo "$ac_t""yes" 1>&6
11411     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11412   cat >> confdefs.h <<EOF
11413 #define $ac_tr_hdr 1
11414 EOF
11415  
11416 else
11417   echo "$ac_t""no" 1>&6
11418 fi
11419 done
11420
11421
11422         if test $ac_cv_header_openssl_ssl_h = yes \
11423                 -o $ac_cv_header_ssl_h = yes ; then
11424                 echo $ac_n "checking for SSLeay_add_ssl_algorithms in -lssl""... $ac_c" 1>&6
11425 echo "configure:11426: checking for SSLeay_add_ssl_algorithms in -lssl" >&5
11426 ac_lib_var=`echo ssl'_'SSLeay_add_ssl_algorithms | sed 'y%./+-:%__p__%'`
11427 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11428   echo $ac_n "(cached) $ac_c" 1>&6
11429 else
11430   ac_save_LIBS="$LIBS"
11431 LIBS="-lssl -lcrypto $LIBS"
11432 cat > conftest.$ac_ext <<EOF
11433 #line 11434 "configure"
11434 #include "confdefs.h"
11435 /* Override any gcc2 internal prototype to avoid an error.  */
11436 /* We use char because int might match the return type of a gcc2
11437     builtin and then its argument prototype would still apply.  */
11438 char SSLeay_add_ssl_algorithms();
11439
11440 int main() {
11441 SSLeay_add_ssl_algorithms()
11442 ; return 0; }
11443 EOF
11444 if { (eval echo configure:11445: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11445   rm -rf conftest*
11446   eval "ac_cv_lib_$ac_lib_var=yes"
11447 else
11448   echo "configure: failed program was:" >&5
11449   cat conftest.$ac_ext >&5
11450   rm -rf conftest*
11451   eval "ac_cv_lib_$ac_lib_var=no"
11452 fi
11453 rm -f conftest*
11454 LIBS="$ac_save_LIBS"
11455
11456 fi
11457 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11458   echo "$ac_t""yes" 1>&6
11459   have_ssleay=yes
11460                         need_rsaref=no
11461 else
11462   echo "$ac_t""no" 1>&6
11463 have_ssleay=no
11464 fi
11465
11466                         
11467                 if test $have_ssleay = no ; then
11468                         echo $ac_n "checking for SSL_library_init in -lssl""... $ac_c" 1>&6
11469 echo "configure:11470: checking for SSL_library_init in -lssl" >&5
11470 ac_lib_var=`echo ssl'_'SSL_library_init | sed 'y%./+-:%__p__%'`
11471 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11472   echo $ac_n "(cached) $ac_c" 1>&6
11473 else
11474   ac_save_LIBS="$LIBS"
11475 LIBS="-lssl -lcrypto $LIBS"
11476 cat > conftest.$ac_ext <<EOF
11477 #line 11478 "configure"
11478 #include "confdefs.h"
11479 /* Override any gcc2 internal prototype to avoid an error.  */
11480 /* We use char because int might match the return type of a gcc2
11481     builtin and then its argument prototype would still apply.  */
11482 char SSL_library_init();
11483
11484 int main() {
11485 SSL_library_init()
11486 ; return 0; }
11487 EOF
11488 if { (eval echo configure:11489: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11489   rm -rf conftest*
11490   eval "ac_cv_lib_$ac_lib_var=yes"
11491 else
11492   echo "configure: failed program was:" >&5
11493   cat conftest.$ac_ext >&5
11494   rm -rf conftest*
11495   eval "ac_cv_lib_$ac_lib_var=no"
11496 fi
11497 rm -f conftest*
11498 LIBS="$ac_save_LIBS"
11499
11500 fi
11501 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11502   echo "$ac_t""yes" 1>&6
11503   have_ssleay=yes
11504                                 need_rsaref=no
11505 else
11506   echo "$ac_t""no" 1>&6
11507 have_ssleay=no
11508 fi
11509
11510                 fi
11511
11512                 if test $have_ssleay = no ; then
11513                         echo $ac_n "checking for ssl3_accept in -lssl""... $ac_c" 1>&6
11514 echo "configure:11515: checking for ssl3_accept in -lssl" >&5
11515 ac_lib_var=`echo ssl'_'ssl3_accept | sed 'y%./+-:%__p__%'`
11516 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11517   echo $ac_n "(cached) $ac_c" 1>&6
11518 else
11519   ac_save_LIBS="$LIBS"
11520 LIBS="-lssl -lcrypto -lRSAglue -lrsaref $LIBS"
11521 cat > conftest.$ac_ext <<EOF
11522 #line 11523 "configure"
11523 #include "confdefs.h"
11524 /* Override any gcc2 internal prototype to avoid an error.  */
11525 /* We use char because int might match the return type of a gcc2
11526     builtin and then its argument prototype would still apply.  */
11527 char ssl3_accept();
11528
11529 int main() {
11530 ssl3_accept()
11531 ; return 0; }
11532 EOF
11533 if { (eval echo configure:11534: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11534   rm -rf conftest*
11535   eval "ac_cv_lib_$ac_lib_var=yes"
11536 else
11537   echo "configure: failed program was:" >&5
11538   cat conftest.$ac_ext >&5
11539   rm -rf conftest*
11540   eval "ac_cv_lib_$ac_lib_var=no"
11541 fi
11542 rm -f conftest*
11543 LIBS="$ac_save_LIBS"
11544
11545 fi
11546 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11547   echo "$ac_t""yes" 1>&6
11548   have_ssleay=yes
11549                                 need_rsaref=yes
11550 else
11551   echo "$ac_t""no" 1>&6
11552 have_ssleay=no
11553 fi
11554
11555                 fi
11556
11557                 if test $have_ssleay = yes ; then
11558                         ol_with_tls=found
11559                         ol_link_tls=yes
11560
11561                         cat >> confdefs.h <<\EOF
11562 #define HAVE_SSLEAY 1
11563 EOF
11564
11565
11566                         if test $need_rsaref = yes; then
11567                                 cat >> confdefs.h <<\EOF
11568 #define HAVE_RSAREF 1
11569 EOF
11570
11571
11572                                 TLS_LIBS="-lssl -lcrypto -lRSAglue -lrsaref"
11573                         else
11574                                 TLS_LIBS="-lssl -lcrypto"
11575                         fi
11576                 fi
11577                 echo $ac_n "checking OpenSSL library version (CRL checking capability)""... $ac_c" 1>&6
11578 echo "configure:11579: checking OpenSSL library version (CRL checking capability)" >&5
11579 if eval "test \"\${ol_cv_ssl_crl_compat+set}\" = set"; then
11580   echo $ac_n "(cached) $ac_c" 1>&6
11581 else
11582   
11583         cat > conftest.$ac_ext <<EOF
11584 #line 11585 "configure"
11585 #include "confdefs.h"
11586
11587 #ifdef HAVE_OPENSSL_SSL_H
11588 #include <openssl/ssl.h>
11589 #else
11590 #include <ssl.h>
11591 #endif
11592
11593 /* Require 0.9.7d+ */
11594 #if OPENSSL_VERSION_NUMBER >= 0x0090704fL
11595         char *__ssl_compat = "0.9.7d";
11596 #endif
11597         
11598 EOF
11599 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11600   egrep "__ssl_compat" >/dev/null 2>&1; then
11601   rm -rf conftest*
11602   ol_cv_ssl_crl_compat=yes
11603 else
11604   rm -rf conftest*
11605   ol_cv_ssl_crl_compat=no
11606 fi
11607 rm -f conftest*
11608
11609 fi
11610
11611 echo "$ac_t""$ol_cv_ssl_crl_compat" 1>&6
11612
11613                 if test $ol_cv_ssl_crl_compat = no ; then
11614                         ol_link_ssl=no
11615                 else 
11616                         cat >> confdefs.h <<\EOF
11617 #define HAVE_OPENSSL_CRL 1
11618 EOF
11619
11620                 fi
11621         fi
11622
11623 else
11624         echo "configure: warning: TLS data protection not supported!" 1>&2
11625 fi
11626
11627 WITH_TLS=no
11628 if test $ol_link_tls = yes ; then
11629         cat >> confdefs.h <<\EOF
11630 #define HAVE_TLS 1
11631 EOF
11632
11633         WITH_TLS=yes
11634
11635 elif test $ol_with_tls = auto ; then
11636         echo "configure: warning: Could not locate TLS/SSL package" 1>&2
11637         echo "configure: warning: TLS data protection not supported!" 1>&2
11638
11639 elif test $ol_with_tls != no ; then
11640         { echo "configure: error: Could not locate TLS/SSL package" 1>&2; exit 1; }
11641 fi
11642
11643 if test $ol_enable_lmpasswd != no; then
11644         if test $ol_link_tls != yes ; then
11645                 { echo "configure: error: LAN Manager passwords require OpenSSL" 1>&2; exit 1; }
11646         fi
11647
11648         cat >> confdefs.h <<\EOF
11649 #define SLAPD_LMHASH 1
11650 EOF
11651
11652 fi
11653
11654 ol_link_threads=no
11655
11656 if test $ol_with_threads = auto -o $ol_with_threads = yes \
11657         -o $ol_with_threads = nt ; then
11658
11659         
11660         echo $ac_n "checking for _beginthread""... $ac_c" 1>&6
11661 echo "configure:11662: checking for _beginthread" >&5
11662 if eval "test \"\${ac_cv_func__beginthread+set}\" = set"; then
11663   echo $ac_n "(cached) $ac_c" 1>&6
11664 else
11665   cat > conftest.$ac_ext <<EOF
11666 #line 11667 "configure"
11667 #include "confdefs.h"
11668 /* System header to define __stub macros and hopefully few prototypes,
11669     which can conflict with char _beginthread(); below.  */
11670 #include <assert.h>
11671 /* Override any gcc2 internal prototype to avoid an error.  */
11672 /* We use char because int might match the return type of a gcc2
11673     builtin and then its argument prototype would still apply.  */
11674 char _beginthread();
11675 char (*f)();
11676
11677 int main() {
11678
11679 /* The GNU C library defines this for functions which it implements
11680     to always fail with ENOSYS.  Some functions are actually named
11681     something starting with __ and the normal name is an alias.  */
11682 #if defined (__stub__beginthread) || defined (__stub____beginthread)
11683 choke me
11684 #else
11685 f = _beginthread;
11686 #endif
11687
11688 ; return 0; }
11689 EOF
11690 if { (eval echo configure:11691: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11691   rm -rf conftest*
11692   eval "ac_cv_func__beginthread=yes"
11693 else
11694   echo "configure: failed program was:" >&5
11695   cat conftest.$ac_ext >&5
11696   rm -rf conftest*
11697   eval "ac_cv_func__beginthread=no"
11698 fi
11699 rm -f conftest*
11700 fi
11701
11702 if eval "test \"`echo '$ac_cv_func_'_beginthread`\" = yes"; then
11703   echo "$ac_t""yes" 1>&6
11704   :
11705 else
11706   echo "$ac_t""no" 1>&6
11707 fi
11708
11709
11710         if test $ac_cv_func__beginthread = yes ; then
11711                 cat >> confdefs.h <<\EOF
11712 #define HAVE_NT_THREADS 1
11713 EOF
11714
11715                 ol_cv_nt_threads=yes
11716         fi
11717
11718
11719         if test "$ol_cv_nt_threads" = yes ; then
11720                 ol_link_threads=nt
11721                 ol_with_threads=found
11722                 ol_with_yielding_select=yes
11723
11724                 cat >> confdefs.h <<\EOF
11725 #define HAVE_NT_SERVICE_MANAGER 1
11726 EOF
11727
11728                 cat >> confdefs.h <<\EOF
11729 #define HAVE_NT_EVENT_LOG 1
11730 EOF
11731
11732         fi
11733
11734         if test $ol_with_threads = nt ; then
11735                 { echo "configure: error: could not locate NT Threads" 1>&2; exit 1; }
11736         fi
11737 fi
11738
11739 if test $ol_with_threads = auto -o $ol_with_threads = yes \
11740         -o $ol_with_threads = posix ; then
11741
11742         for ac_hdr in pthread.h
11743 do
11744 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11745 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11746 echo "configure:11747: checking for $ac_hdr" >&5
11747 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11748   echo $ac_n "(cached) $ac_c" 1>&6
11749 else
11750   cat > conftest.$ac_ext <<EOF
11751 #line 11752 "configure"
11752 #include "confdefs.h"
11753 #include <$ac_hdr>
11754 EOF
11755 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11756 { (eval echo configure:11757: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11757 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11758 if test -z "$ac_err"; then
11759   rm -rf conftest*
11760   eval "ac_cv_header_$ac_safe=yes"
11761 else
11762   echo "$ac_err" >&5
11763   echo "configure: failed program was:" >&5
11764   cat conftest.$ac_ext >&5
11765   rm -rf conftest*
11766   eval "ac_cv_header_$ac_safe=no"
11767 fi
11768 rm -f conftest*
11769 fi
11770 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11771   echo "$ac_t""yes" 1>&6
11772     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11773   cat >> confdefs.h <<EOF
11774 #define $ac_tr_hdr 1
11775 EOF
11776  
11777 else
11778   echo "$ac_t""no" 1>&6
11779 fi
11780 done
11781
11782
11783         if test $ac_cv_header_pthread_h = yes ; then
11784                 echo $ac_n "checking POSIX thread version""... $ac_c" 1>&6
11785 echo "configure:11786: checking POSIX thread version" >&5
11786 if eval "test \"\${ol_cv_pthread_version+set}\" = set"; then
11787   echo $ac_n "(cached) $ac_c" 1>&6
11788 else
11789   
11790         cat > conftest.$ac_ext <<EOF
11791 #line 11792 "configure"
11792 #include "confdefs.h"
11793
11794 #               include <pthread.h>
11795         
11796 int main() {
11797
11798                 int i = PTHREAD_CREATE_JOINABLE;
11799         
11800 ; return 0; }
11801 EOF
11802 if { (eval echo configure:11803: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11803   rm -rf conftest*
11804   
11805         cat > conftest.$ac_ext <<EOF
11806 #line 11807 "configure"
11807 #include "confdefs.h"
11808 #include <pthread.h>
11809 EOF
11810 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11811   egrep "pthread_detach" >/dev/null 2>&1; then
11812   rm -rf conftest*
11813   ol_cv_pthread_version=10
11814 else
11815   rm -rf conftest*
11816   ol_cv_pthread_version=8
11817 fi
11818 rm -f conftest*
11819
11820 else
11821   echo "configure: failed program was:" >&5
11822   cat conftest.$ac_ext >&5
11823   rm -rf conftest*
11824   
11825         cat > conftest.$ac_ext <<EOF
11826 #line 11827 "configure"
11827 #include "confdefs.h"
11828
11829 #               include <pthread.h>
11830 #               ifdef PTHREAD_CREATE_UNDETACHED
11831                 draft7
11832 #               endif
11833         
11834 EOF
11835 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11836   egrep "draft7" >/dev/null 2>&1; then
11837   rm -rf conftest*
11838   ol_cv_pthread_version=7
11839 else
11840   rm -rf conftest*
11841   
11842         cat > conftest.$ac_ext <<EOF
11843 #line 11844 "configure"
11844 #include "confdefs.h"
11845 #include <pthread.h>
11846 EOF
11847 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11848   egrep "pthread_attr_init" >/dev/null 2>&1; then
11849   rm -rf conftest*
11850   ol_cv_pthread_version=6
11851 else
11852   rm -rf conftest*
11853   
11854         cat > conftest.$ac_ext <<EOF
11855 #line 11856 "configure"
11856 #include "confdefs.h"
11857
11858 #               include <pthread.h>
11859 #ifdef          PTHREAD_MUTEX_INITIALIZER
11860                 draft5
11861 #endif
11862         
11863 EOF
11864 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11865   egrep "draft5" >/dev/null 2>&1; then
11866   rm -rf conftest*
11867   ol_cv_pthread_version=5
11868 else
11869   rm -rf conftest*
11870   ol_cv_pthread_version=4
11871 fi
11872 rm -f conftest*
11873  
11874 fi
11875 rm -f conftest*
11876  
11877 fi
11878 rm -f conftest*
11879  
11880 fi
11881 rm -f conftest*
11882
11883 fi
11884
11885 echo "$ac_t""$ol_cv_pthread_version" 1>&6
11886
11887
11888                 if test $ol_cv_pthread_version != 0 ; then
11889                         cat >> confdefs.h <<EOF
11890 #define HAVE_PTHREADS $ol_cv_pthread_version
11891 EOF
11892
11893                 else
11894                         { echo "configure: error: unknown pthread version" 1>&2; exit 1; }
11895                 fi
11896
11897                 # consider threads found
11898                 ol_with_threads=found
11899
11900                 
11901         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
11902 echo "configure:11903: checking for LinuxThreads pthread.h" >&5
11903 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
11904   echo $ac_n "(cached) $ac_c" 1>&6
11905 else
11906   cat > conftest.$ac_ext <<EOF
11907 #line 11908 "configure"
11908 #include "confdefs.h"
11909 #include <pthread.h>
11910 EOF
11911 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11912   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
11913   rm -rf conftest*
11914   ol_cv_header_linux_threads=yes
11915 else
11916   rm -rf conftest*
11917   ol_cv_header_linux_threads=no
11918 fi
11919 rm -f conftest*
11920
11921                 
11922 fi
11923
11924 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
11925         if test $ol_cv_header_linux_threads = yes; then
11926                 cat >> confdefs.h <<\EOF
11927 #define HAVE_LINUX_THREADS 1
11928 EOF
11929
11930         fi
11931
11932                 
11933         echo $ac_n "checking for GNU Pth pthread.h""... $ac_c" 1>&6
11934 echo "configure:11935: checking for GNU Pth pthread.h" >&5
11935 if eval "test \"\${ol_cv_header_gnu_pth_pthread_h+set}\" = set"; then
11936   echo $ac_n "(cached) $ac_c" 1>&6
11937 else
11938   cat > conftest.$ac_ext <<EOF
11939 #line 11940 "configure"
11940 #include "confdefs.h"
11941 #include <pthread.h>
11942 #ifdef _POSIX_THREAD_IS_GNU_PTH
11943         __gnu_pth__;
11944 #endif
11945
11946 EOF
11947 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11948   egrep "__gnu_pth__" >/dev/null 2>&1; then
11949   rm -rf conftest*
11950   ol_cv_header_gnu_pth_pthread_h=yes
11951 else
11952   rm -rf conftest*
11953   ol_cv_header_gnu_pth_pthread_h=no
11954 fi
11955 rm -f conftest*
11956
11957                 
11958 fi
11959
11960 echo "$ac_t""$ol_cv_header_gnu_pth_pthread_h" 1>&6
11961
11962
11963                 if test $ol_cv_header_gnu_pth_pthread_h = no ; then
11964                         for ac_hdr in sched.h
11965 do
11966 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11967 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11968 echo "configure:11969: checking for $ac_hdr" >&5
11969 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11970   echo $ac_n "(cached) $ac_c" 1>&6
11971 else
11972   cat > conftest.$ac_ext <<EOF
11973 #line 11974 "configure"
11974 #include "confdefs.h"
11975 #include <$ac_hdr>
11976 EOF
11977 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11978 { (eval echo configure:11979: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11979 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11980 if test -z "$ac_err"; then
11981   rm -rf conftest*
11982   eval "ac_cv_header_$ac_safe=yes"
11983 else
11984   echo "$ac_err" >&5
11985   echo "configure: failed program was:" >&5
11986   cat conftest.$ac_ext >&5
11987   rm -rf conftest*
11988   eval "ac_cv_header_$ac_safe=no"
11989 fi
11990 rm -f conftest*
11991 fi
11992 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11993   echo "$ac_t""yes" 1>&6
11994     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11995   cat >> confdefs.h <<EOF
11996 #define $ac_tr_hdr 1
11997 EOF
11998  
11999 else
12000   echo "$ac_t""no" 1>&6
12001 fi
12002 done
12003
12004                 fi
12005
12006                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
12007                                 echo $ac_n "checking for pthread_create in default libraries""... $ac_c" 1>&6
12008 echo "configure:12009: checking for pthread_create in default libraries" >&5
12009 if eval "test \"\${ol_cv_pthread_create+set}\" = set"; then
12010   echo $ac_n "(cached) $ac_c" 1>&6
12011 else
12012   
12013                 if test "$cross_compiling" = yes; then
12014   cat > conftest.$ac_ext <<EOF
12015 #line 12016 "configure"
12016 #include "confdefs.h"
12017 /* pthread test headers */
12018 #include <pthread.h>
12019 #if HAVE_PTHREADS < 7
12020 #include <errno.h>
12021 #endif
12022 #ifndef NULL
12023 #define NULL (void*)0
12024 #endif
12025
12026 static void *task(p)
12027         void *p;
12028 {
12029         return (void *) (p == NULL);
12030 }
12031
12032 int main() {
12033
12034         /* pthread test function */
12035 #ifndef PTHREAD_CREATE_DETACHED
12036 #define PTHREAD_CREATE_DETACHED 1
12037 #endif
12038         pthread_t t;
12039         int status;
12040         int detach = PTHREAD_CREATE_DETACHED;
12041
12042 #if HAVE_PTHREADS > 4
12043         /* Final pthreads */
12044         pthread_attr_t attr;
12045
12046         status = pthread_attr_init(&attr);
12047         if( status ) return status;
12048
12049 #if HAVE_PTHREADS < 7
12050         status = pthread_attr_setdetachstate(&attr, &detach);
12051         if( status < 0 ) status = errno;
12052 #else
12053         status = pthread_attr_setdetachstate(&attr, detach);
12054 #endif
12055         if( status ) return status;
12056         status = pthread_create( &t, &attr, task, NULL );
12057 #if HAVE_PTHREADS < 7
12058         if( status < 0 ) status = errno;
12059 #endif
12060         if( status ) return status;
12061 #else
12062         /* Draft 4 pthreads */
12063         status = pthread_create( &t, pthread_attr_default, task, NULL );
12064         if( status ) return errno;
12065
12066         /* give thread a chance to complete */
12067         /* it should remain joinable and hence detachable */
12068         sleep( 1 );
12069
12070         status = pthread_detach( &t );
12071         if( status ) return errno;
12072 #endif
12073
12074 #ifdef HAVE_LINUX_THREADS
12075         pthread_kill_other_threads_np();
12076 #endif
12077
12078         return 0;
12079
12080 ; return 0; }
12081 EOF
12082 if { (eval echo configure:12083: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12083   rm -rf conftest*
12084   ol_cv_pthread_create=yes
12085 else
12086   echo "configure: failed program was:" >&5
12087   cat conftest.$ac_ext >&5
12088   rm -rf conftest*
12089   ol_cv_pthread_create=no
12090 fi
12091 rm -f conftest*
12092 else
12093   cat > conftest.$ac_ext <<EOF
12094 #line 12095 "configure"
12095 #include "confdefs.h"
12096 /* pthread test headers */
12097 #include <pthread.h>
12098 #if HAVE_PTHREADS < 7
12099 #include <errno.h>
12100 #endif
12101 #ifndef NULL
12102 #define NULL (void*)0
12103 #endif
12104
12105 static void *task(p)
12106         void *p;
12107 {
12108         return (void *) (p == NULL);
12109 }
12110
12111
12112 int main(argc, argv)
12113         int argc;
12114         char **argv;
12115 {
12116
12117         /* pthread test function */
12118 #ifndef PTHREAD_CREATE_DETACHED
12119 #define PTHREAD_CREATE_DETACHED 1
12120 #endif
12121         pthread_t t;
12122         int status;
12123         int detach = PTHREAD_CREATE_DETACHED;
12124
12125 #if HAVE_PTHREADS > 4
12126         /* Final pthreads */
12127         pthread_attr_t attr;
12128
12129         status = pthread_attr_init(&attr);
12130         if( status ) return status;
12131
12132 #if HAVE_PTHREADS < 7
12133         status = pthread_attr_setdetachstate(&attr, &detach);
12134         if( status < 0 ) status = errno;
12135 #else
12136         status = pthread_attr_setdetachstate(&attr, detach);
12137 #endif
12138         if( status ) return status;
12139         status = pthread_create( &t, &attr, task, NULL );
12140 #if HAVE_PTHREADS < 7
12141         if( status < 0 ) status = errno;
12142 #endif
12143         if( status ) return status;
12144 #else
12145         /* Draft 4 pthreads */
12146         status = pthread_create( &t, pthread_attr_default, task, NULL );
12147         if( status ) return errno;
12148
12149         /* give thread a chance to complete */
12150         /* it should remain joinable and hence detachable */
12151         sleep( 1 );
12152
12153         status = pthread_detach( &t );
12154         if( status ) return errno;
12155 #endif
12156
12157 #ifdef HAVE_LINUX_THREADS
12158         pthread_kill_other_threads_np();
12159 #endif
12160
12161         return 0;
12162
12163 }
12164
12165 EOF
12166 if { (eval echo configure:12167: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
12167 then
12168   ol_cv_pthread_create=yes
12169 else
12170   echo "configure: failed program was:" >&5
12171   cat conftest.$ac_ext >&5
12172   rm -fr conftest*
12173   ol_cv_pthread_create=no
12174 fi
12175 rm -fr conftest*
12176 fi
12177
12178 fi
12179
12180 echo "$ac_t""$ol_cv_pthread_create" 1>&6
12181
12182                 if test $ol_cv_pthread_create != no ; then
12183                         ol_link_threads=posix
12184                         ol_link_pthreads=""
12185                 fi
12186                 
12187                 # Pthread try link: -kthread (ol_cv_pthread_kthread)
12188 if test "$ol_link_threads" = no ; then
12189         # try -kthread
12190         echo $ac_n "checking for pthread link with -kthread""... $ac_c" 1>&6
12191 echo "configure:12192: checking for pthread link with -kthread" >&5
12192 if eval "test \"\${ol_cv_pthread_kthread+set}\" = set"; then
12193   echo $ac_n "(cached) $ac_c" 1>&6
12194 else
12195   
12196                 # save the flags
12197                 ol_LIBS="$LIBS"
12198                 LIBS="-kthread $LIBS"
12199
12200                 if test "$cross_compiling" = yes; then
12201   cat > conftest.$ac_ext <<EOF
12202 #line 12203 "configure"
12203 #include "confdefs.h"
12204 /* pthread test headers */
12205 #include <pthread.h>
12206 #if HAVE_PTHREADS < 7
12207 #include <errno.h>
12208 #endif
12209 #ifndef NULL
12210 #define NULL (void*)0
12211 #endif
12212
12213 static void *task(p)
12214         void *p;
12215 {
12216         return (void *) (p == NULL);
12217 }
12218
12219 int main() {
12220
12221         /* pthread test function */
12222 #ifndef PTHREAD_CREATE_DETACHED
12223 #define PTHREAD_CREATE_DETACHED 1
12224 #endif
12225         pthread_t t;
12226         int status;
12227         int detach = PTHREAD_CREATE_DETACHED;
12228
12229 #if HAVE_PTHREADS > 4
12230         /* Final pthreads */
12231         pthread_attr_t attr;
12232
12233         status = pthread_attr_init(&attr);
12234         if( status ) return status;
12235
12236 #if HAVE_PTHREADS < 7
12237         status = pthread_attr_setdetachstate(&attr, &detach);
12238         if( status < 0 ) status = errno;
12239 #else
12240         status = pthread_attr_setdetachstate(&attr, detach);
12241 #endif
12242         if( status ) return status;
12243         status = pthread_create( &t, &attr, task, NULL );
12244 #if HAVE_PTHREADS < 7
12245         if( status < 0 ) status = errno;
12246 #endif
12247         if( status ) return status;
12248 #else
12249         /* Draft 4 pthreads */
12250         status = pthread_create( &t, pthread_attr_default, task, NULL );
12251         if( status ) return errno;
12252
12253         /* give thread a chance to complete */
12254         /* it should remain joinable and hence detachable */
12255         sleep( 1 );
12256
12257         status = pthread_detach( &t );
12258         if( status ) return errno;
12259 #endif
12260
12261 #ifdef HAVE_LINUX_THREADS
12262         pthread_kill_other_threads_np();
12263 #endif
12264
12265         return 0;
12266
12267 ; return 0; }
12268 EOF
12269 if { (eval echo configure:12270: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12270   rm -rf conftest*
12271   ol_cv_pthread_kthread=yes
12272 else
12273   echo "configure: failed program was:" >&5
12274   cat conftest.$ac_ext >&5
12275   rm -rf conftest*
12276   ol_cv_pthread_kthread=no
12277 fi
12278 rm -f conftest*
12279 else
12280   cat > conftest.$ac_ext <<EOF
12281 #line 12282 "configure"
12282 #include "confdefs.h"
12283 /* pthread test headers */
12284 #include <pthread.h>
12285 #if HAVE_PTHREADS < 7
12286 #include <errno.h>
12287 #endif
12288 #ifndef NULL
12289 #define NULL (void*)0
12290 #endif
12291
12292 static void *task(p)
12293         void *p;
12294 {
12295         return (void *) (p == NULL);
12296 }
12297
12298
12299 int main(argc, argv)
12300         int argc;
12301         char **argv;
12302 {
12303
12304         /* pthread test function */
12305 #ifndef PTHREAD_CREATE_DETACHED
12306 #define PTHREAD_CREATE_DETACHED 1
12307 #endif
12308         pthread_t t;
12309         int status;
12310         int detach = PTHREAD_CREATE_DETACHED;
12311
12312 #if HAVE_PTHREADS > 4
12313         /* Final pthreads */
12314         pthread_attr_t attr;
12315
12316         status = pthread_attr_init(&attr);
12317         if( status ) return status;
12318
12319 #if HAVE_PTHREADS < 7
12320         status = pthread_attr_setdetachstate(&attr, &detach);
12321         if( status < 0 ) status = errno;
12322 #else
12323         status = pthread_attr_setdetachstate(&attr, detach);
12324 #endif
12325         if( status ) return status;
12326         status = pthread_create( &t, &attr, task, NULL );
12327 #if HAVE_PTHREADS < 7
12328         if( status < 0 ) status = errno;
12329 #endif
12330         if( status ) return status;
12331 #else
12332         /* Draft 4 pthreads */
12333         status = pthread_create( &t, pthread_attr_default, task, NULL );
12334         if( status ) return errno;
12335
12336         /* give thread a chance to complete */
12337         /* it should remain joinable and hence detachable */
12338         sleep( 1 );
12339
12340         status = pthread_detach( &t );
12341         if( status ) return errno;
12342 #endif
12343
12344 #ifdef HAVE_LINUX_THREADS
12345         pthread_kill_other_threads_np();
12346 #endif
12347
12348         return 0;
12349
12350 }
12351
12352 EOF
12353 if { (eval echo configure:12354: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
12354 then
12355   ol_cv_pthread_kthread=yes
12356 else
12357   echo "configure: failed program was:" >&5
12358   cat conftest.$ac_ext >&5
12359   rm -fr conftest*
12360   ol_cv_pthread_kthread=no
12361 fi
12362 rm -fr conftest*
12363 fi
12364
12365
12366                 # restore the LIBS
12367                 LIBS="$ol_LIBS"
12368         
12369 fi
12370
12371 echo "$ac_t""$ol_cv_pthread_kthread" 1>&6
12372
12373         if test $ol_cv_pthread_kthread = yes ; then
12374                 ol_link_pthreads="-kthread"
12375                 ol_link_threads=posix
12376         fi
12377 fi
12378
12379                 # Pthread try link: -pthread (ol_cv_pthread_pthread)
12380 if test "$ol_link_threads" = no ; then
12381         # try -pthread
12382         echo $ac_n "checking for pthread link with -pthread""... $ac_c" 1>&6
12383 echo "configure:12384: checking for pthread link with -pthread" >&5
12384 if eval "test \"\${ol_cv_pthread_pthread+set}\" = set"; then
12385   echo $ac_n "(cached) $ac_c" 1>&6
12386 else
12387   
12388                 # save the flags
12389                 ol_LIBS="$LIBS"
12390                 LIBS="-pthread $LIBS"
12391
12392                 if test "$cross_compiling" = yes; then
12393   cat > conftest.$ac_ext <<EOF
12394 #line 12395 "configure"
12395 #include "confdefs.h"
12396 /* pthread test headers */
12397 #include <pthread.h>
12398 #if HAVE_PTHREADS < 7
12399 #include <errno.h>
12400 #endif
12401 #ifndef NULL
12402 #define NULL (void*)0
12403 #endif
12404
12405 static void *task(p)
12406         void *p;
12407 {
12408         return (void *) (p == NULL);
12409 }
12410
12411 int main() {
12412
12413         /* pthread test function */
12414 #ifndef PTHREAD_CREATE_DETACHED
12415 #define PTHREAD_CREATE_DETACHED 1
12416 #endif
12417         pthread_t t;
12418         int status;
12419         int detach = PTHREAD_CREATE_DETACHED;
12420
12421 #if HAVE_PTHREADS > 4
12422         /* Final pthreads */
12423         pthread_attr_t attr;
12424
12425         status = pthread_attr_init(&attr);
12426         if( status ) return status;
12427
12428 #if HAVE_PTHREADS < 7
12429         status = pthread_attr_setdetachstate(&attr, &detach);
12430         if( status < 0 ) status = errno;
12431 #else
12432         status = pthread_attr_setdetachstate(&attr, detach);
12433 #endif
12434         if( status ) return status;
12435         status = pthread_create( &t, &attr, task, NULL );
12436 #if HAVE_PTHREADS < 7
12437         if( status < 0 ) status = errno;
12438 #endif
12439         if( status ) return status;
12440 #else
12441         /* Draft 4 pthreads */
12442         status = pthread_create( &t, pthread_attr_default, task, NULL );
12443         if( status ) return errno;
12444
12445         /* give thread a chance to complete */
12446         /* it should remain joinable and hence detachable */
12447         sleep( 1 );
12448
12449         status = pthread_detach( &t );
12450         if( status ) return errno;
12451 #endif
12452
12453 #ifdef HAVE_LINUX_THREADS
12454         pthread_kill_other_threads_np();
12455 #endif
12456
12457         return 0;
12458
12459 ; return 0; }
12460 EOF
12461 if { (eval echo configure:12462: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12462   rm -rf conftest*
12463   ol_cv_pthread_pthread=yes
12464 else
12465   echo "configure: failed program was:" >&5
12466   cat conftest.$ac_ext >&5
12467   rm -rf conftest*
12468   ol_cv_pthread_pthread=no
12469 fi
12470 rm -f conftest*
12471 else
12472   cat > conftest.$ac_ext <<EOF
12473 #line 12474 "configure"
12474 #include "confdefs.h"
12475 /* pthread test headers */
12476 #include <pthread.h>
12477 #if HAVE_PTHREADS < 7
12478 #include <errno.h>
12479 #endif
12480 #ifndef NULL
12481 #define NULL (void*)0
12482 #endif
12483
12484 static void *task(p)
12485         void *p;
12486 {
12487         return (void *) (p == NULL);
12488 }
12489
12490
12491 int main(argc, argv)
12492         int argc;
12493         char **argv;
12494 {
12495
12496         /* pthread test function */
12497 #ifndef PTHREAD_CREATE_DETACHED
12498 #define PTHREAD_CREATE_DETACHED 1
12499 #endif
12500         pthread_t t;
12501         int status;
12502         int detach = PTHREAD_CREATE_DETACHED;
12503
12504 #if HAVE_PTHREADS > 4
12505         /* Final pthreads */
12506         pthread_attr_t attr;
12507
12508         status = pthread_attr_init(&attr);
12509         if( status ) return status;
12510
12511 #if HAVE_PTHREADS < 7
12512         status = pthread_attr_setdetachstate(&attr, &detach);
12513         if( status < 0 ) status = errno;
12514 #else
12515         status = pthread_attr_setdetachstate(&attr, detach);
12516 #endif
12517         if( status ) return status;
12518         status = pthread_create( &t, &attr, task, NULL );
12519 #if HAVE_PTHREADS < 7
12520         if( status < 0 ) status = errno;
12521 #endif
12522         if( status ) return status;
12523 #else
12524         /* Draft 4 pthreads */
12525         status = pthread_create( &t, pthread_attr_default, task, NULL );
12526         if( status ) return errno;
12527
12528         /* give thread a chance to complete */
12529         /* it should remain joinable and hence detachable */
12530         sleep( 1 );
12531
12532         status = pthread_detach( &t );
12533         if( status ) return errno;
12534 #endif
12535
12536 #ifdef HAVE_LINUX_THREADS
12537         pthread_kill_other_threads_np();
12538 #endif
12539
12540         return 0;
12541
12542 }
12543
12544 EOF
12545 if { (eval echo configure:12546: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
12546 then
12547   ol_cv_pthread_pthread=yes
12548 else
12549   echo "configure: failed program was:" >&5
12550   cat conftest.$ac_ext >&5
12551   rm -fr conftest*
12552   ol_cv_pthread_pthread=no
12553 fi
12554 rm -fr conftest*
12555 fi
12556
12557
12558                 # restore the LIBS
12559                 LIBS="$ol_LIBS"
12560         
12561 fi
12562
12563 echo "$ac_t""$ol_cv_pthread_pthread" 1>&6
12564
12565         if test $ol_cv_pthread_pthread = yes ; then
12566                 ol_link_pthreads="-pthread"
12567                 ol_link_threads=posix
12568         fi
12569 fi
12570
12571                 # Pthread try link: -pthreads (ol_cv_pthread_pthreads)
12572 if test "$ol_link_threads" = no ; then
12573         # try -pthreads
12574         echo $ac_n "checking for pthread link with -pthreads""... $ac_c" 1>&6
12575 echo "configure:12576: checking for pthread link with -pthreads" >&5
12576 if eval "test \"\${ol_cv_pthread_pthreads+set}\" = set"; then
12577   echo $ac_n "(cached) $ac_c" 1>&6
12578 else
12579   
12580                 # save the flags
12581                 ol_LIBS="$LIBS"
12582                 LIBS="-pthreads $LIBS"
12583
12584                 if test "$cross_compiling" = yes; then
12585   cat > conftest.$ac_ext <<EOF
12586 #line 12587 "configure"
12587 #include "confdefs.h"
12588 /* pthread test headers */
12589 #include <pthread.h>
12590 #if HAVE_PTHREADS < 7
12591 #include <errno.h>
12592 #endif
12593 #ifndef NULL
12594 #define NULL (void*)0
12595 #endif
12596
12597 static void *task(p)
12598         void *p;
12599 {
12600         return (void *) (p == NULL);
12601 }
12602
12603 int main() {
12604
12605         /* pthread test function */
12606 #ifndef PTHREAD_CREATE_DETACHED
12607 #define PTHREAD_CREATE_DETACHED 1
12608 #endif
12609         pthread_t t;
12610         int status;
12611         int detach = PTHREAD_CREATE_DETACHED;
12612
12613 #if HAVE_PTHREADS > 4
12614         /* Final pthreads */
12615         pthread_attr_t attr;
12616
12617         status = pthread_attr_init(&attr);
12618         if( status ) return status;
12619
12620 #if HAVE_PTHREADS < 7
12621         status = pthread_attr_setdetachstate(&attr, &detach);
12622         if( status < 0 ) status = errno;
12623 #else
12624         status = pthread_attr_setdetachstate(&attr, detach);
12625 #endif
12626         if( status ) return status;
12627         status = pthread_create( &t, &attr, task, NULL );
12628 #if HAVE_PTHREADS < 7
12629         if( status < 0 ) status = errno;
12630 #endif
12631         if( status ) return status;
12632 #else
12633         /* Draft 4 pthreads */
12634         status = pthread_create( &t, pthread_attr_default, task, NULL );
12635         if( status ) return errno;
12636
12637         /* give thread a chance to complete */
12638         /* it should remain joinable and hence detachable */
12639         sleep( 1 );
12640
12641         status = pthread_detach( &t );
12642         if( status ) return errno;
12643 #endif
12644
12645 #ifdef HAVE_LINUX_THREADS
12646         pthread_kill_other_threads_np();
12647 #endif
12648
12649         return 0;
12650
12651 ; return 0; }
12652 EOF
12653 if { (eval echo configure:12654: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12654   rm -rf conftest*
12655   ol_cv_pthread_pthreads=yes
12656 else
12657   echo "configure: failed program was:" >&5
12658   cat conftest.$ac_ext >&5
12659   rm -rf conftest*
12660   ol_cv_pthread_pthreads=no
12661 fi
12662 rm -f conftest*
12663 else
12664   cat > conftest.$ac_ext <<EOF
12665 #line 12666 "configure"
12666 #include "confdefs.h"
12667 /* pthread test headers */
12668 #include <pthread.h>
12669 #if HAVE_PTHREADS < 7
12670 #include <errno.h>
12671 #endif
12672 #ifndef NULL
12673 #define NULL (void*)0
12674 #endif
12675
12676 static void *task(p)
12677         void *p;
12678 {
12679         return (void *) (p == NULL);
12680 }
12681
12682
12683 int main(argc, argv)
12684         int argc;
12685         char **argv;
12686 {
12687
12688         /* pthread test function */
12689 #ifndef PTHREAD_CREATE_DETACHED
12690 #define PTHREAD_CREATE_DETACHED 1
12691 #endif
12692         pthread_t t;
12693         int status;
12694         int detach = PTHREAD_CREATE_DETACHED;
12695
12696 #if HAVE_PTHREADS > 4
12697         /* Final pthreads */
12698         pthread_attr_t attr;
12699
12700         status = pthread_attr_init(&attr);
12701         if( status ) return status;
12702
12703 #if HAVE_PTHREADS < 7
12704         status = pthread_attr_setdetachstate(&attr, &detach);
12705         if( status < 0 ) status = errno;
12706 #else
12707         status = pthread_attr_setdetachstate(&attr, detach);
12708 #endif
12709         if( status ) return status;
12710         status = pthread_create( &t, &attr, task, NULL );
12711 #if HAVE_PTHREADS < 7
12712         if( status < 0 ) status = errno;
12713 #endif
12714         if( status ) return status;
12715 #else
12716         /* Draft 4 pthreads */
12717         status = pthread_create( &t, pthread_attr_default, task, NULL );
12718         if( status ) return errno;
12719
12720         /* give thread a chance to complete */
12721         /* it should remain joinable and hence detachable */
12722         sleep( 1 );
12723
12724         status = pthread_detach( &t );
12725         if( status ) return errno;
12726 #endif
12727
12728 #ifdef HAVE_LINUX_THREADS
12729         pthread_kill_other_threads_np();
12730 #endif
12731
12732         return 0;
12733
12734 }
12735
12736 EOF
12737 if { (eval echo configure:12738: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
12738 then
12739   ol_cv_pthread_pthreads=yes
12740 else
12741   echo "configure: failed program was:" >&5
12742   cat conftest.$ac_ext >&5
12743   rm -fr conftest*
12744   ol_cv_pthread_pthreads=no
12745 fi
12746 rm -fr conftest*
12747 fi
12748
12749
12750                 # restore the LIBS
12751                 LIBS="$ol_LIBS"
12752         
12753 fi
12754
12755 echo "$ac_t""$ol_cv_pthread_pthreads" 1>&6
12756
12757         if test $ol_cv_pthread_pthreads = yes ; then
12758                 ol_link_pthreads="-pthreads"
12759                 ol_link_threads=posix
12760         fi
12761 fi
12762
12763                 # Pthread try link: -mthreads (ol_cv_pthread_mthreads)
12764 if test "$ol_link_threads" = no ; then
12765         # try -mthreads
12766         echo $ac_n "checking for pthread link with -mthreads""... $ac_c" 1>&6
12767 echo "configure:12768: checking for pthread link with -mthreads" >&5
12768 if eval "test \"\${ol_cv_pthread_mthreads+set}\" = set"; then
12769   echo $ac_n "(cached) $ac_c" 1>&6
12770 else
12771   
12772                 # save the flags
12773                 ol_LIBS="$LIBS"
12774                 LIBS="-mthreads $LIBS"
12775
12776                 if test "$cross_compiling" = yes; then
12777   cat > conftest.$ac_ext <<EOF
12778 #line 12779 "configure"
12779 #include "confdefs.h"
12780 /* pthread test headers */
12781 #include <pthread.h>
12782 #if HAVE_PTHREADS < 7
12783 #include <errno.h>
12784 #endif
12785 #ifndef NULL
12786 #define NULL (void*)0
12787 #endif
12788
12789 static void *task(p)
12790         void *p;
12791 {
12792         return (void *) (p == NULL);
12793 }
12794
12795 int main() {
12796
12797         /* pthread test function */
12798 #ifndef PTHREAD_CREATE_DETACHED
12799 #define PTHREAD_CREATE_DETACHED 1
12800 #endif
12801         pthread_t t;
12802         int status;
12803         int detach = PTHREAD_CREATE_DETACHED;
12804
12805 #if HAVE_PTHREADS > 4
12806         /* Final pthreads */
12807         pthread_attr_t attr;
12808
12809         status = pthread_attr_init(&attr);
12810         if( status ) return status;
12811
12812 #if HAVE_PTHREADS < 7
12813         status = pthread_attr_setdetachstate(&attr, &detach);
12814         if( status < 0 ) status = errno;
12815 #else
12816         status = pthread_attr_setdetachstate(&attr, detach);
12817 #endif
12818         if( status ) return status;
12819         status = pthread_create( &t, &attr, task, NULL );
12820 #if HAVE_PTHREADS < 7
12821         if( status < 0 ) status = errno;
12822 #endif
12823         if( status ) return status;
12824 #else
12825         /* Draft 4 pthreads */
12826         status = pthread_create( &t, pthread_attr_default, task, NULL );
12827         if( status ) return errno;
12828
12829         /* give thread a chance to complete */
12830         /* it should remain joinable and hence detachable */
12831         sleep( 1 );
12832
12833         status = pthread_detach( &t );
12834         if( status ) return errno;
12835 #endif
12836
12837 #ifdef HAVE_LINUX_THREADS
12838         pthread_kill_other_threads_np();
12839 #endif
12840
12841         return 0;
12842
12843 ; return 0; }
12844 EOF
12845 if { (eval echo configure:12846: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12846   rm -rf conftest*
12847   ol_cv_pthread_mthreads=yes
12848 else
12849   echo "configure: failed program was:" >&5
12850   cat conftest.$ac_ext >&5
12851   rm -rf conftest*
12852   ol_cv_pthread_mthreads=no
12853 fi
12854 rm -f conftest*
12855 else
12856   cat > conftest.$ac_ext <<EOF
12857 #line 12858 "configure"
12858 #include "confdefs.h"
12859 /* pthread test headers */
12860 #include <pthread.h>
12861 #if HAVE_PTHREADS < 7
12862 #include <errno.h>
12863 #endif
12864 #ifndef NULL
12865 #define NULL (void*)0
12866 #endif
12867
12868 static void *task(p)
12869         void *p;
12870 {
12871         return (void *) (p == NULL);
12872 }
12873
12874
12875 int main(argc, argv)
12876         int argc;
12877         char **argv;
12878 {
12879
12880         /* pthread test function */
12881 #ifndef PTHREAD_CREATE_DETACHED
12882 #define PTHREAD_CREATE_DETACHED 1
12883 #endif
12884         pthread_t t;
12885         int status;
12886         int detach = PTHREAD_CREATE_DETACHED;
12887
12888 #if HAVE_PTHREADS > 4
12889         /* Final pthreads */
12890         pthread_attr_t attr;
12891
12892         status = pthread_attr_init(&attr);
12893         if( status ) return status;
12894
12895 #if HAVE_PTHREADS < 7
12896         status = pthread_attr_setdetachstate(&attr, &detach);
12897         if( status < 0 ) status = errno;
12898 #else
12899         status = pthread_attr_setdetachstate(&attr, detach);
12900 #endif
12901         if( status ) return status;
12902         status = pthread_create( &t, &attr, task, NULL );
12903 #if HAVE_PTHREADS < 7
12904         if( status < 0 ) status = errno;
12905 #endif
12906         if( status ) return status;
12907 #else
12908         /* Draft 4 pthreads */
12909         status = pthread_create( &t, pthread_attr_default, task, NULL );
12910         if( status ) return errno;
12911
12912         /* give thread a chance to complete */
12913         /* it should remain joinable and hence detachable */
12914         sleep( 1 );
12915
12916         status = pthread_detach( &t );
12917         if( status ) return errno;
12918 #endif
12919
12920 #ifdef HAVE_LINUX_THREADS
12921         pthread_kill_other_threads_np();
12922 #endif
12923
12924         return 0;
12925
12926 }
12927
12928 EOF
12929 if { (eval echo configure:12930: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
12930 then
12931   ol_cv_pthread_mthreads=yes
12932 else
12933   echo "configure: failed program was:" >&5
12934   cat conftest.$ac_ext >&5
12935   rm -fr conftest*
12936   ol_cv_pthread_mthreads=no
12937 fi
12938 rm -fr conftest*
12939 fi
12940
12941
12942                 # restore the LIBS
12943                 LIBS="$ol_LIBS"
12944         
12945 fi
12946
12947 echo "$ac_t""$ol_cv_pthread_mthreads" 1>&6
12948
12949         if test $ol_cv_pthread_mthreads = yes ; then
12950                 ol_link_pthreads="-mthreads"
12951                 ol_link_threads=posix
12952         fi
12953 fi
12954
12955                 # Pthread try link: -thread (ol_cv_pthread_thread)
12956 if test "$ol_link_threads" = no ; then
12957         # try -thread
12958         echo $ac_n "checking for pthread link with -thread""... $ac_c" 1>&6
12959 echo "configure:12960: checking for pthread link with -thread" >&5
12960 if eval "test \"\${ol_cv_pthread_thread+set}\" = set"; then
12961   echo $ac_n "(cached) $ac_c" 1>&6
12962 else
12963   
12964                 # save the flags
12965                 ol_LIBS="$LIBS"
12966                 LIBS="-thread $LIBS"
12967
12968                 if test "$cross_compiling" = yes; then
12969   cat > conftest.$ac_ext <<EOF
12970 #line 12971 "configure"
12971 #include "confdefs.h"
12972 /* pthread test headers */
12973 #include <pthread.h>
12974 #if HAVE_PTHREADS < 7
12975 #include <errno.h>
12976 #endif
12977 #ifndef NULL
12978 #define NULL (void*)0
12979 #endif
12980
12981 static void *task(p)
12982         void *p;
12983 {
12984         return (void *) (p == NULL);
12985 }
12986
12987 int main() {
12988
12989         /* pthread test function */
12990 #ifndef PTHREAD_CREATE_DETACHED
12991 #define PTHREAD_CREATE_DETACHED 1
12992 #endif
12993         pthread_t t;
12994         int status;
12995         int detach = PTHREAD_CREATE_DETACHED;
12996
12997 #if HAVE_PTHREADS > 4
12998         /* Final pthreads */
12999         pthread_attr_t attr;
13000
13001         status = pthread_attr_init(&attr);
13002         if( status ) return status;
13003
13004 #if HAVE_PTHREADS < 7
13005         status = pthread_attr_setdetachstate(&attr, &detach);
13006         if( status < 0 ) status = errno;
13007 #else
13008         status = pthread_attr_setdetachstate(&attr, detach);
13009 #endif
13010         if( status ) return status;
13011         status = pthread_create( &t, &attr, task, NULL );
13012 #if HAVE_PTHREADS < 7
13013         if( status < 0 ) status = errno;
13014 #endif
13015         if( status ) return status;
13016 #else
13017         /* Draft 4 pthreads */
13018         status = pthread_create( &t, pthread_attr_default, task, NULL );
13019         if( status ) return errno;
13020
13021         /* give thread a chance to complete */
13022         /* it should remain joinable and hence detachable */
13023         sleep( 1 );
13024
13025         status = pthread_detach( &t );
13026         if( status ) return errno;
13027 #endif
13028
13029 #ifdef HAVE_LINUX_THREADS
13030         pthread_kill_other_threads_np();
13031 #endif
13032
13033         return 0;
13034
13035 ; return 0; }
13036 EOF
13037 if { (eval echo configure:13038: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13038   rm -rf conftest*
13039   ol_cv_pthread_thread=yes
13040 else
13041   echo "configure: failed program was:" >&5
13042   cat conftest.$ac_ext >&5
13043   rm -rf conftest*
13044   ol_cv_pthread_thread=no
13045 fi
13046 rm -f conftest*
13047 else
13048   cat > conftest.$ac_ext <<EOF
13049 #line 13050 "configure"
13050 #include "confdefs.h"
13051 /* pthread test headers */
13052 #include <pthread.h>
13053 #if HAVE_PTHREADS < 7
13054 #include <errno.h>
13055 #endif
13056 #ifndef NULL
13057 #define NULL (void*)0
13058 #endif
13059
13060 static void *task(p)
13061         void *p;
13062 {
13063         return (void *) (p == NULL);
13064 }
13065
13066
13067 int main(argc, argv)
13068         int argc;
13069         char **argv;
13070 {
13071
13072         /* pthread test function */
13073 #ifndef PTHREAD_CREATE_DETACHED
13074 #define PTHREAD_CREATE_DETACHED 1
13075 #endif
13076         pthread_t t;
13077         int status;
13078         int detach = PTHREAD_CREATE_DETACHED;
13079
13080 #if HAVE_PTHREADS > 4
13081         /* Final pthreads */
13082         pthread_attr_t attr;
13083
13084         status = pthread_attr_init(&attr);
13085         if( status ) return status;
13086
13087 #if HAVE_PTHREADS < 7
13088         status = pthread_attr_setdetachstate(&attr, &detach);
13089         if( status < 0 ) status = errno;
13090 #else
13091         status = pthread_attr_setdetachstate(&attr, detach);
13092 #endif
13093         if( status ) return status;
13094         status = pthread_create( &t, &attr, task, NULL );
13095 #if HAVE_PTHREADS < 7
13096         if( status < 0 ) status = errno;
13097 #endif
13098         if( status ) return status;
13099 #else
13100         /* Draft 4 pthreads */
13101         status = pthread_create( &t, pthread_attr_default, task, NULL );
13102         if( status ) return errno;
13103
13104         /* give thread a chance to complete */
13105         /* it should remain joinable and hence detachable */
13106         sleep( 1 );
13107
13108         status = pthread_detach( &t );
13109         if( status ) return errno;
13110 #endif
13111
13112 #ifdef HAVE_LINUX_THREADS
13113         pthread_kill_other_threads_np();
13114 #endif
13115
13116         return 0;
13117
13118 }
13119
13120 EOF
13121 if { (eval echo configure:13122: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
13122 then
13123   ol_cv_pthread_thread=yes
13124 else
13125   echo "configure: failed program was:" >&5
13126   cat conftest.$ac_ext >&5
13127   rm -fr conftest*
13128   ol_cv_pthread_thread=no
13129 fi
13130 rm -fr conftest*
13131 fi
13132
13133
13134                 # restore the LIBS
13135                 LIBS="$ol_LIBS"
13136         
13137 fi
13138
13139 echo "$ac_t""$ol_cv_pthread_thread" 1>&6
13140
13141         if test $ol_cv_pthread_thread = yes ; then
13142                 ol_link_pthreads="-thread"
13143                 ol_link_threads=posix
13144         fi
13145 fi
13146
13147
13148                 # Pthread try link: -lpthread -lmach -lexc -lc_r (ol_cv_pthread_lpthread_lmach_lexc_lc_r)
13149 if test "$ol_link_threads" = no ; then
13150         # try -lpthread -lmach -lexc -lc_r
13151         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc -lc_r""... $ac_c" 1>&6
13152 echo "configure:13153: checking for pthread link with -lpthread -lmach -lexc -lc_r" >&5
13153 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc_lc_r+set}\" = set"; then
13154   echo $ac_n "(cached) $ac_c" 1>&6
13155 else
13156   
13157                 # save the flags
13158                 ol_LIBS="$LIBS"
13159                 LIBS="-lpthread -lmach -lexc -lc_r $LIBS"
13160
13161                 if test "$cross_compiling" = yes; then
13162   cat > conftest.$ac_ext <<EOF
13163 #line 13164 "configure"
13164 #include "confdefs.h"
13165 /* pthread test headers */
13166 #include <pthread.h>
13167 #if HAVE_PTHREADS < 7
13168 #include <errno.h>
13169 #endif
13170 #ifndef NULL
13171 #define NULL (void*)0
13172 #endif
13173
13174 static void *task(p)
13175         void *p;
13176 {
13177         return (void *) (p == NULL);
13178 }
13179
13180 int main() {
13181
13182         /* pthread test function */
13183 #ifndef PTHREAD_CREATE_DETACHED
13184 #define PTHREAD_CREATE_DETACHED 1
13185 #endif
13186         pthread_t t;
13187         int status;
13188         int detach = PTHREAD_CREATE_DETACHED;
13189
13190 #if HAVE_PTHREADS > 4
13191         /* Final pthreads */
13192         pthread_attr_t attr;
13193
13194         status = pthread_attr_init(&attr);
13195         if( status ) return status;
13196
13197 #if HAVE_PTHREADS < 7
13198         status = pthread_attr_setdetachstate(&attr, &detach);
13199         if( status < 0 ) status = errno;
13200 #else
13201         status = pthread_attr_setdetachstate(&attr, detach);
13202 #endif
13203         if( status ) return status;
13204         status = pthread_create( &t, &attr, task, NULL );
13205 #if HAVE_PTHREADS < 7
13206         if( status < 0 ) status = errno;
13207 #endif
13208         if( status ) return status;
13209 #else
13210         /* Draft 4 pthreads */
13211         status = pthread_create( &t, pthread_attr_default, task, NULL );
13212         if( status ) return errno;
13213
13214         /* give thread a chance to complete */
13215         /* it should remain joinable and hence detachable */
13216         sleep( 1 );
13217
13218         status = pthread_detach( &t );
13219         if( status ) return errno;
13220 #endif
13221
13222 #ifdef HAVE_LINUX_THREADS
13223         pthread_kill_other_threads_np();
13224 #endif
13225
13226         return 0;
13227
13228 ; return 0; }
13229 EOF
13230 if { (eval echo configure:13231: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13231   rm -rf conftest*
13232   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
13233 else
13234   echo "configure: failed program was:" >&5
13235   cat conftest.$ac_ext >&5
13236   rm -rf conftest*
13237   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
13238 fi
13239 rm -f conftest*
13240 else
13241   cat > conftest.$ac_ext <<EOF
13242 #line 13243 "configure"
13243 #include "confdefs.h"
13244 /* pthread test headers */
13245 #include <pthread.h>
13246 #if HAVE_PTHREADS < 7
13247 #include <errno.h>
13248 #endif
13249 #ifndef NULL
13250 #define NULL (void*)0
13251 #endif
13252
13253 static void *task(p)
13254         void *p;
13255 {
13256         return (void *) (p == NULL);
13257 }
13258
13259
13260 int main(argc, argv)
13261         int argc;
13262         char **argv;
13263 {
13264
13265         /* pthread test function */
13266 #ifndef PTHREAD_CREATE_DETACHED
13267 #define PTHREAD_CREATE_DETACHED 1
13268 #endif
13269         pthread_t t;
13270         int status;
13271         int detach = PTHREAD_CREATE_DETACHED;
13272
13273 #if HAVE_PTHREADS > 4
13274         /* Final pthreads */
13275         pthread_attr_t attr;
13276
13277         status = pthread_attr_init(&attr);
13278         if( status ) return status;
13279
13280 #if HAVE_PTHREADS < 7
13281         status = pthread_attr_setdetachstate(&attr, &detach);
13282         if( status < 0 ) status = errno;
13283 #else
13284         status = pthread_attr_setdetachstate(&attr, detach);
13285 #endif
13286         if( status ) return status;
13287         status = pthread_create( &t, &attr, task, NULL );
13288 #if HAVE_PTHREADS < 7
13289         if( status < 0 ) status = errno;
13290 #endif
13291         if( status ) return status;
13292 #else
13293         /* Draft 4 pthreads */
13294         status = pthread_create( &t, pthread_attr_default, task, NULL );
13295         if( status ) return errno;
13296
13297         /* give thread a chance to complete */
13298         /* it should remain joinable and hence detachable */
13299         sleep( 1 );
13300
13301         status = pthread_detach( &t );
13302         if( status ) return errno;
13303 #endif
13304
13305 #ifdef HAVE_LINUX_THREADS
13306         pthread_kill_other_threads_np();
13307 #endif
13308
13309         return 0;
13310
13311 }
13312
13313 EOF
13314 if { (eval echo configure:13315: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
13315 then
13316   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
13317 else
13318   echo "configure: failed program was:" >&5
13319   cat conftest.$ac_ext >&5
13320   rm -fr conftest*
13321   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
13322 fi
13323 rm -fr conftest*
13324 fi
13325
13326
13327                 # restore the LIBS
13328                 LIBS="$ol_LIBS"
13329         
13330 fi
13331
13332 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc_lc_r" 1>&6
13333
13334         if test $ol_cv_pthread_lpthread_lmach_lexc_lc_r = yes ; then
13335                 ol_link_pthreads="-lpthread -lmach -lexc -lc_r"
13336                 ol_link_threads=posix
13337         fi
13338 fi
13339
13340                 # Pthread try link: -lpthread -lmach -lexc (ol_cv_pthread_lpthread_lmach_lexc)
13341 if test "$ol_link_threads" = no ; then
13342         # try -lpthread -lmach -lexc
13343         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc""... $ac_c" 1>&6
13344 echo "configure:13345: checking for pthread link with -lpthread -lmach -lexc" >&5
13345 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc+set}\" = set"; then
13346   echo $ac_n "(cached) $ac_c" 1>&6
13347 else
13348   
13349                 # save the flags
13350                 ol_LIBS="$LIBS"
13351                 LIBS="-lpthread -lmach -lexc $LIBS"
13352
13353                 if test "$cross_compiling" = yes; then
13354   cat > conftest.$ac_ext <<EOF
13355 #line 13356 "configure"
13356 #include "confdefs.h"
13357 /* pthread test headers */
13358 #include <pthread.h>
13359 #if HAVE_PTHREADS < 7
13360 #include <errno.h>
13361 #endif
13362 #ifndef NULL
13363 #define NULL (void*)0
13364 #endif
13365
13366 static void *task(p)
13367         void *p;
13368 {
13369         return (void *) (p == NULL);
13370 }
13371
13372 int main() {
13373
13374         /* pthread test function */
13375 #ifndef PTHREAD_CREATE_DETACHED
13376 #define PTHREAD_CREATE_DETACHED 1
13377 #endif
13378         pthread_t t;
13379         int status;
13380         int detach = PTHREAD_CREATE_DETACHED;
13381
13382 #if HAVE_PTHREADS > 4
13383         /* Final pthreads */
13384         pthread_attr_t attr;
13385
13386         status = pthread_attr_init(&attr);
13387         if( status ) return status;
13388
13389 #if HAVE_PTHREADS < 7
13390         status = pthread_attr_setdetachstate(&attr, &detach);
13391         if( status < 0 ) status = errno;
13392 #else
13393         status = pthread_attr_setdetachstate(&attr, detach);
13394 #endif
13395         if( status ) return status;
13396         status = pthread_create( &t, &attr, task, NULL );
13397 #if HAVE_PTHREADS < 7
13398         if( status < 0 ) status = errno;
13399 #endif
13400         if( status ) return status;
13401 #else
13402         /* Draft 4 pthreads */
13403         status = pthread_create( &t, pthread_attr_default, task, NULL );
13404         if( status ) return errno;
13405
13406         /* give thread a chance to complete */
13407         /* it should remain joinable and hence detachable */
13408         sleep( 1 );
13409
13410         status = pthread_detach( &t );
13411         if( status ) return errno;
13412 #endif
13413
13414 #ifdef HAVE_LINUX_THREADS
13415         pthread_kill_other_threads_np();
13416 #endif
13417
13418         return 0;
13419
13420 ; return 0; }
13421 EOF
13422 if { (eval echo configure:13423: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13423   rm -rf conftest*
13424   ol_cv_pthread_lpthread_lmach_lexc=yes
13425 else
13426   echo "configure: failed program was:" >&5
13427   cat conftest.$ac_ext >&5
13428   rm -rf conftest*
13429   ol_cv_pthread_lpthread_lmach_lexc=no
13430 fi
13431 rm -f conftest*
13432 else
13433   cat > conftest.$ac_ext <<EOF
13434 #line 13435 "configure"
13435 #include "confdefs.h"
13436 /* pthread test headers */
13437 #include <pthread.h>
13438 #if HAVE_PTHREADS < 7
13439 #include <errno.h>
13440 #endif
13441 #ifndef NULL
13442 #define NULL (void*)0
13443 #endif
13444
13445 static void *task(p)
13446         void *p;
13447 {
13448         return (void *) (p == NULL);
13449 }
13450
13451
13452 int main(argc, argv)
13453         int argc;
13454         char **argv;
13455 {
13456
13457         /* pthread test function */
13458 #ifndef PTHREAD_CREATE_DETACHED
13459 #define PTHREAD_CREATE_DETACHED 1
13460 #endif
13461         pthread_t t;
13462         int status;
13463         int detach = PTHREAD_CREATE_DETACHED;
13464
13465 #if HAVE_PTHREADS > 4
13466         /* Final pthreads */
13467         pthread_attr_t attr;
13468
13469         status = pthread_attr_init(&attr);
13470         if( status ) return status;
13471
13472 #if HAVE_PTHREADS < 7
13473         status = pthread_attr_setdetachstate(&attr, &detach);
13474         if( status < 0 ) status = errno;
13475 #else
13476         status = pthread_attr_setdetachstate(&attr, detach);
13477 #endif
13478         if( status ) return status;
13479         status = pthread_create( &t, &attr, task, NULL );
13480 #if HAVE_PTHREADS < 7
13481         if( status < 0 ) status = errno;
13482 #endif
13483         if( status ) return status;
13484 #else
13485         /* Draft 4 pthreads */
13486         status = pthread_create( &t, pthread_attr_default, task, NULL );
13487         if( status ) return errno;
13488
13489         /* give thread a chance to complete */
13490         /* it should remain joinable and hence detachable */
13491         sleep( 1 );
13492
13493         status = pthread_detach( &t );
13494         if( status ) return errno;
13495 #endif
13496
13497 #ifdef HAVE_LINUX_THREADS
13498         pthread_kill_other_threads_np();
13499 #endif
13500
13501         return 0;
13502
13503 }
13504
13505 EOF
13506 if { (eval echo configure:13507: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
13507 then
13508   ol_cv_pthread_lpthread_lmach_lexc=yes
13509 else
13510   echo "configure: failed program was:" >&5
13511   cat conftest.$ac_ext >&5
13512   rm -fr conftest*
13513   ol_cv_pthread_lpthread_lmach_lexc=no
13514 fi
13515 rm -fr conftest*
13516 fi
13517
13518
13519                 # restore the LIBS
13520                 LIBS="$ol_LIBS"
13521         
13522 fi
13523
13524 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc" 1>&6
13525
13526         if test $ol_cv_pthread_lpthread_lmach_lexc = yes ; then
13527                 ol_link_pthreads="-lpthread -lmach -lexc"
13528                 ol_link_threads=posix
13529         fi
13530 fi
13531
13532
13533                 # Pthread try link: -lpthread -Wl,-woff,85 (ol_cv_pthread_lib_lpthread_woff)
13534 if test "$ol_link_threads" = no ; then
13535         # try -lpthread -Wl,-woff,85
13536         echo $ac_n "checking for pthread link with -lpthread -Wl,-woff,85""... $ac_c" 1>&6
13537 echo "configure:13538: checking for pthread link with -lpthread -Wl,-woff,85" >&5
13538 if eval "test \"\${ol_cv_pthread_lib_lpthread_woff+set}\" = set"; then
13539   echo $ac_n "(cached) $ac_c" 1>&6
13540 else
13541   
13542                 # save the flags
13543                 ol_LIBS="$LIBS"
13544                 LIBS="-lpthread -Wl,-woff,85 $LIBS"
13545
13546                 if test "$cross_compiling" = yes; then
13547   cat > conftest.$ac_ext <<EOF
13548 #line 13549 "configure"
13549 #include "confdefs.h"
13550 /* pthread test headers */
13551 #include <pthread.h>
13552 #if HAVE_PTHREADS < 7
13553 #include <errno.h>
13554 #endif
13555 #ifndef NULL
13556 #define NULL (void*)0
13557 #endif
13558
13559 static void *task(p)
13560         void *p;
13561 {
13562         return (void *) (p == NULL);
13563 }
13564
13565 int main() {
13566
13567         /* pthread test function */
13568 #ifndef PTHREAD_CREATE_DETACHED
13569 #define PTHREAD_CREATE_DETACHED 1
13570 #endif
13571         pthread_t t;
13572         int status;
13573         int detach = PTHREAD_CREATE_DETACHED;
13574
13575 #if HAVE_PTHREADS > 4
13576         /* Final pthreads */
13577         pthread_attr_t attr;
13578
13579         status = pthread_attr_init(&attr);
13580         if( status ) return status;
13581
13582 #if HAVE_PTHREADS < 7
13583         status = pthread_attr_setdetachstate(&attr, &detach);
13584         if( status < 0 ) status = errno;
13585 #else
13586         status = pthread_attr_setdetachstate(&attr, detach);
13587 #endif
13588         if( status ) return status;
13589         status = pthread_create( &t, &attr, task, NULL );
13590 #if HAVE_PTHREADS < 7
13591         if( status < 0 ) status = errno;
13592 #endif
13593         if( status ) return status;
13594 #else
13595         /* Draft 4 pthreads */
13596         status = pthread_create( &t, pthread_attr_default, task, NULL );
13597         if( status ) return errno;
13598
13599         /* give thread a chance to complete */
13600         /* it should remain joinable and hence detachable */
13601         sleep( 1 );
13602
13603         status = pthread_detach( &t );
13604         if( status ) return errno;
13605 #endif
13606
13607 #ifdef HAVE_LINUX_THREADS
13608         pthread_kill_other_threads_np();
13609 #endif
13610
13611         return 0;
13612
13613 ; return 0; }
13614 EOF
13615 if { (eval echo configure:13616: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13616   rm -rf conftest*
13617   ol_cv_pthread_lib_lpthread_woff=yes
13618 else
13619   echo "configure: failed program was:" >&5
13620   cat conftest.$ac_ext >&5
13621   rm -rf conftest*
13622   ol_cv_pthread_lib_lpthread_woff=no
13623 fi
13624 rm -f conftest*
13625 else
13626   cat > conftest.$ac_ext <<EOF
13627 #line 13628 "configure"
13628 #include "confdefs.h"
13629 /* pthread test headers */
13630 #include <pthread.h>
13631 #if HAVE_PTHREADS < 7
13632 #include <errno.h>
13633 #endif
13634 #ifndef NULL
13635 #define NULL (void*)0
13636 #endif
13637
13638 static void *task(p)
13639         void *p;
13640 {
13641         return (void *) (p == NULL);
13642 }
13643
13644
13645 int main(argc, argv)
13646         int argc;
13647         char **argv;
13648 {
13649
13650         /* pthread test function */
13651 #ifndef PTHREAD_CREATE_DETACHED
13652 #define PTHREAD_CREATE_DETACHED 1
13653 #endif
13654         pthread_t t;
13655         int status;
13656         int detach = PTHREAD_CREATE_DETACHED;
13657
13658 #if HAVE_PTHREADS > 4
13659         /* Final pthreads */
13660         pthread_attr_t attr;
13661
13662         status = pthread_attr_init(&attr);
13663         if( status ) return status;
13664
13665 #if HAVE_PTHREADS < 7
13666         status = pthread_attr_setdetachstate(&attr, &detach);
13667         if( status < 0 ) status = errno;
13668 #else
13669         status = pthread_attr_setdetachstate(&attr, detach);
13670 #endif
13671         if( status ) return status;
13672         status = pthread_create( &t, &attr, task, NULL );
13673 #if HAVE_PTHREADS < 7
13674         if( status < 0 ) status = errno;
13675 #endif
13676         if( status ) return status;
13677 #else
13678         /* Draft 4 pthreads */
13679         status = pthread_create( &t, pthread_attr_default, task, NULL );
13680         if( status ) return errno;
13681
13682         /* give thread a chance to complete */
13683         /* it should remain joinable and hence detachable */
13684         sleep( 1 );
13685
13686         status = pthread_detach( &t );
13687         if( status ) return errno;
13688 #endif
13689
13690 #ifdef HAVE_LINUX_THREADS
13691         pthread_kill_other_threads_np();
13692 #endif
13693
13694         return 0;
13695
13696 }
13697
13698 EOF
13699 if { (eval echo configure:13700: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
13700 then
13701   ol_cv_pthread_lib_lpthread_woff=yes
13702 else
13703   echo "configure: failed program was:" >&5
13704   cat conftest.$ac_ext >&5
13705   rm -fr conftest*
13706   ol_cv_pthread_lib_lpthread_woff=no
13707 fi
13708 rm -fr conftest*
13709 fi
13710
13711
13712                 # restore the LIBS
13713                 LIBS="$ol_LIBS"
13714         
13715 fi
13716
13717 echo "$ac_t""$ol_cv_pthread_lib_lpthread_woff" 1>&6
13718
13719         if test $ol_cv_pthread_lib_lpthread_woff = yes ; then
13720                 ol_link_pthreads="-lpthread -Wl,-woff,85"
13721                 ol_link_threads=posix
13722         fi
13723 fi
13724
13725
13726                 # Pthread try link: -lpthread (ol_cv_pthread_lpthread)
13727 if test "$ol_link_threads" = no ; then
13728         # try -lpthread
13729         echo $ac_n "checking for pthread link with -lpthread""... $ac_c" 1>&6
13730 echo "configure:13731: checking for pthread link with -lpthread" >&5
13731 if eval "test \"\${ol_cv_pthread_lpthread+set}\" = set"; then
13732   echo $ac_n "(cached) $ac_c" 1>&6
13733 else
13734   
13735                 # save the flags
13736                 ol_LIBS="$LIBS"
13737                 LIBS="-lpthread $LIBS"
13738
13739                 if test "$cross_compiling" = yes; then
13740   cat > conftest.$ac_ext <<EOF
13741 #line 13742 "configure"
13742 #include "confdefs.h"
13743 /* pthread test headers */
13744 #include <pthread.h>
13745 #if HAVE_PTHREADS < 7
13746 #include <errno.h>
13747 #endif
13748 #ifndef NULL
13749 #define NULL (void*)0
13750 #endif
13751
13752 static void *task(p)
13753         void *p;
13754 {
13755         return (void *) (p == NULL);
13756 }
13757
13758 int main() {
13759
13760         /* pthread test function */
13761 #ifndef PTHREAD_CREATE_DETACHED
13762 #define PTHREAD_CREATE_DETACHED 1
13763 #endif
13764         pthread_t t;
13765         int status;
13766         int detach = PTHREAD_CREATE_DETACHED;
13767
13768 #if HAVE_PTHREADS > 4
13769         /* Final pthreads */
13770         pthread_attr_t attr;
13771
13772         status = pthread_attr_init(&attr);
13773         if( status ) return status;
13774
13775 #if HAVE_PTHREADS < 7
13776         status = pthread_attr_setdetachstate(&attr, &detach);
13777         if( status < 0 ) status = errno;
13778 #else
13779         status = pthread_attr_setdetachstate(&attr, detach);
13780 #endif
13781         if( status ) return status;
13782         status = pthread_create( &t, &attr, task, NULL );
13783 #if HAVE_PTHREADS < 7
13784         if( status < 0 ) status = errno;
13785 #endif
13786         if( status ) return status;
13787 #else
13788         /* Draft 4 pthreads */
13789         status = pthread_create( &t, pthread_attr_default, task, NULL );
13790         if( status ) return errno;
13791
13792         /* give thread a chance to complete */
13793         /* it should remain joinable and hence detachable */
13794         sleep( 1 );
13795
13796         status = pthread_detach( &t );
13797         if( status ) return errno;
13798 #endif
13799
13800 #ifdef HAVE_LINUX_THREADS
13801         pthread_kill_other_threads_np();
13802 #endif
13803
13804         return 0;
13805
13806 ; return 0; }
13807 EOF
13808 if { (eval echo configure:13809: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13809   rm -rf conftest*
13810   ol_cv_pthread_lpthread=yes
13811 else
13812   echo "configure: failed program was:" >&5
13813   cat conftest.$ac_ext >&5
13814   rm -rf conftest*
13815   ol_cv_pthread_lpthread=no
13816 fi
13817 rm -f conftest*
13818 else
13819   cat > conftest.$ac_ext <<EOF
13820 #line 13821 "configure"
13821 #include "confdefs.h"
13822 /* pthread test headers */
13823 #include <pthread.h>
13824 #if HAVE_PTHREADS < 7
13825 #include <errno.h>
13826 #endif
13827 #ifndef NULL
13828 #define NULL (void*)0
13829 #endif
13830
13831 static void *task(p)
13832         void *p;
13833 {
13834         return (void *) (p == NULL);
13835 }
13836
13837
13838 int main(argc, argv)
13839         int argc;
13840         char **argv;
13841 {
13842
13843         /* pthread test function */
13844 #ifndef PTHREAD_CREATE_DETACHED
13845 #define PTHREAD_CREATE_DETACHED 1
13846 #endif
13847         pthread_t t;
13848         int status;
13849         int detach = PTHREAD_CREATE_DETACHED;
13850
13851 #if HAVE_PTHREADS > 4
13852         /* Final pthreads */
13853         pthread_attr_t attr;
13854
13855         status = pthread_attr_init(&attr);
13856         if( status ) return status;
13857
13858 #if HAVE_PTHREADS < 7
13859         status = pthread_attr_setdetachstate(&attr, &detach);
13860         if( status < 0 ) status = errno;
13861 #else
13862         status = pthread_attr_setdetachstate(&attr, detach);
13863 #endif
13864         if( status ) return status;
13865         status = pthread_create( &t, &attr, task, NULL );
13866 #if HAVE_PTHREADS < 7
13867         if( status < 0 ) status = errno;
13868 #endif
13869         if( status ) return status;
13870 #else
13871         /* Draft 4 pthreads */
13872         status = pthread_create( &t, pthread_attr_default, task, NULL );
13873         if( status ) return errno;
13874
13875         /* give thread a chance to complete */
13876         /* it should remain joinable and hence detachable */
13877         sleep( 1 );
13878
13879         status = pthread_detach( &t );
13880         if( status ) return errno;
13881 #endif
13882
13883 #ifdef HAVE_LINUX_THREADS
13884         pthread_kill_other_threads_np();
13885 #endif
13886
13887         return 0;
13888
13889 }
13890
13891 EOF
13892 if { (eval echo configure:13893: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
13893 then
13894   ol_cv_pthread_lpthread=yes
13895 else
13896   echo "configure: failed program was:" >&5
13897   cat conftest.$ac_ext >&5
13898   rm -fr conftest*
13899   ol_cv_pthread_lpthread=no
13900 fi
13901 rm -fr conftest*
13902 fi
13903
13904
13905                 # restore the LIBS
13906                 LIBS="$ol_LIBS"
13907         
13908 fi
13909
13910 echo "$ac_t""$ol_cv_pthread_lpthread" 1>&6
13911
13912         if test $ol_cv_pthread_lpthread = yes ; then
13913                 ol_link_pthreads="-lpthread"
13914                 ol_link_threads=posix
13915         fi
13916 fi
13917
13918                 # Pthread try link: -lc_r (ol_cv_pthread_lc_r)
13919 if test "$ol_link_threads" = no ; then
13920         # try -lc_r
13921         echo $ac_n "checking for pthread link with -lc_r""... $ac_c" 1>&6
13922 echo "configure:13923: checking for pthread link with -lc_r" >&5
13923 if eval "test \"\${ol_cv_pthread_lc_r+set}\" = set"; then
13924   echo $ac_n "(cached) $ac_c" 1>&6
13925 else
13926   
13927                 # save the flags
13928                 ol_LIBS="$LIBS"
13929                 LIBS="-lc_r $LIBS"
13930
13931                 if test "$cross_compiling" = yes; then
13932   cat > conftest.$ac_ext <<EOF
13933 #line 13934 "configure"
13934 #include "confdefs.h"
13935 /* pthread test headers */
13936 #include <pthread.h>
13937 #if HAVE_PTHREADS < 7
13938 #include <errno.h>
13939 #endif
13940 #ifndef NULL
13941 #define NULL (void*)0
13942 #endif
13943
13944 static void *task(p)
13945         void *p;
13946 {
13947         return (void *) (p == NULL);
13948 }
13949
13950 int main() {
13951
13952         /* pthread test function */
13953 #ifndef PTHREAD_CREATE_DETACHED
13954 #define PTHREAD_CREATE_DETACHED 1
13955 #endif
13956         pthread_t t;
13957         int status;
13958         int detach = PTHREAD_CREATE_DETACHED;
13959
13960 #if HAVE_PTHREADS > 4
13961         /* Final pthreads */
13962         pthread_attr_t attr;
13963
13964         status = pthread_attr_init(&attr);
13965         if( status ) return status;
13966
13967 #if HAVE_PTHREADS < 7
13968         status = pthread_attr_setdetachstate(&attr, &detach);
13969         if( status < 0 ) status = errno;
13970 #else
13971         status = pthread_attr_setdetachstate(&attr, detach);
13972 #endif
13973         if( status ) return status;
13974         status = pthread_create( &t, &attr, task, NULL );
13975 #if HAVE_PTHREADS < 7
13976         if( status < 0 ) status = errno;
13977 #endif
13978         if( status ) return status;
13979 #else
13980         /* Draft 4 pthreads */
13981         status = pthread_create( &t, pthread_attr_default, task, NULL );
13982         if( status ) return errno;
13983
13984         /* give thread a chance to complete */
13985         /* it should remain joinable and hence detachable */
13986         sleep( 1 );
13987
13988         status = pthread_detach( &t );
13989         if( status ) return errno;
13990 #endif
13991
13992 #ifdef HAVE_LINUX_THREADS
13993         pthread_kill_other_threads_np();
13994 #endif
13995
13996         return 0;
13997
13998 ; return 0; }
13999 EOF
14000 if { (eval echo configure:14001: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14001   rm -rf conftest*
14002   ol_cv_pthread_lc_r=yes
14003 else
14004   echo "configure: failed program was:" >&5
14005   cat conftest.$ac_ext >&5
14006   rm -rf conftest*
14007   ol_cv_pthread_lc_r=no
14008 fi
14009 rm -f conftest*
14010 else
14011   cat > conftest.$ac_ext <<EOF
14012 #line 14013 "configure"
14013 #include "confdefs.h"
14014 /* pthread test headers */
14015 #include <pthread.h>
14016 #if HAVE_PTHREADS < 7
14017 #include <errno.h>
14018 #endif
14019 #ifndef NULL
14020 #define NULL (void*)0
14021 #endif
14022
14023 static void *task(p)
14024         void *p;
14025 {
14026         return (void *) (p == NULL);
14027 }
14028
14029
14030 int main(argc, argv)
14031         int argc;
14032         char **argv;
14033 {
14034
14035         /* pthread test function */
14036 #ifndef PTHREAD_CREATE_DETACHED
14037 #define PTHREAD_CREATE_DETACHED 1
14038 #endif
14039         pthread_t t;
14040         int status;
14041         int detach = PTHREAD_CREATE_DETACHED;
14042
14043 #if HAVE_PTHREADS > 4
14044         /* Final pthreads */
14045         pthread_attr_t attr;
14046
14047         status = pthread_attr_init(&attr);
14048         if( status ) return status;
14049
14050 #if HAVE_PTHREADS < 7
14051         status = pthread_attr_setdetachstate(&attr, &detach);
14052         if( status < 0 ) status = errno;
14053 #else
14054         status = pthread_attr_setdetachstate(&attr, detach);
14055 #endif
14056         if( status ) return status;
14057         status = pthread_create( &t, &attr, task, NULL );
14058 #if HAVE_PTHREADS < 7
14059         if( status < 0 ) status = errno;
14060 #endif
14061         if( status ) return status;
14062 #else
14063         /* Draft 4 pthreads */
14064         status = pthread_create( &t, pthread_attr_default, task, NULL );
14065         if( status ) return errno;
14066
14067         /* give thread a chance to complete */
14068         /* it should remain joinable and hence detachable */
14069         sleep( 1 );
14070
14071         status = pthread_detach( &t );
14072         if( status ) return errno;
14073 #endif
14074
14075 #ifdef HAVE_LINUX_THREADS
14076         pthread_kill_other_threads_np();
14077 #endif
14078
14079         return 0;
14080
14081 }
14082
14083 EOF
14084 if { (eval echo configure:14085: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
14085 then
14086   ol_cv_pthread_lc_r=yes
14087 else
14088   echo "configure: failed program was:" >&5
14089   cat conftest.$ac_ext >&5
14090   rm -fr conftest*
14091   ol_cv_pthread_lc_r=no
14092 fi
14093 rm -fr conftest*
14094 fi
14095
14096
14097                 # restore the LIBS
14098                 LIBS="$ol_LIBS"
14099         
14100 fi
14101
14102 echo "$ac_t""$ol_cv_pthread_lc_r" 1>&6
14103
14104         if test $ol_cv_pthread_lc_r = yes ; then
14105                 ol_link_pthreads="-lc_r"
14106                 ol_link_threads=posix
14107         fi
14108 fi
14109
14110
14111                 # Pthread try link: -threads (ol_cv_pthread_threads)
14112 if test "$ol_link_threads" = no ; then
14113         # try -threads
14114         echo $ac_n "checking for pthread link with -threads""... $ac_c" 1>&6
14115 echo "configure:14116: checking for pthread link with -threads" >&5
14116 if eval "test \"\${ol_cv_pthread_threads+set}\" = set"; then
14117   echo $ac_n "(cached) $ac_c" 1>&6
14118 else
14119   
14120                 # save the flags
14121                 ol_LIBS="$LIBS"
14122                 LIBS="-threads $LIBS"
14123
14124                 if test "$cross_compiling" = yes; then
14125   cat > conftest.$ac_ext <<EOF
14126 #line 14127 "configure"
14127 #include "confdefs.h"
14128 /* pthread test headers */
14129 #include <pthread.h>
14130 #if HAVE_PTHREADS < 7
14131 #include <errno.h>
14132 #endif
14133 #ifndef NULL
14134 #define NULL (void*)0
14135 #endif
14136
14137 static void *task(p)
14138         void *p;
14139 {
14140         return (void *) (p == NULL);
14141 }
14142
14143 int main() {
14144
14145         /* pthread test function */
14146 #ifndef PTHREAD_CREATE_DETACHED
14147 #define PTHREAD_CREATE_DETACHED 1
14148 #endif
14149         pthread_t t;
14150         int status;
14151         int detach = PTHREAD_CREATE_DETACHED;
14152
14153 #if HAVE_PTHREADS > 4
14154         /* Final pthreads */
14155         pthread_attr_t attr;
14156
14157         status = pthread_attr_init(&attr);
14158         if( status ) return status;
14159
14160 #if HAVE_PTHREADS < 7
14161         status = pthread_attr_setdetachstate(&attr, &detach);
14162         if( status < 0 ) status = errno;
14163 #else
14164         status = pthread_attr_setdetachstate(&attr, detach);
14165 #endif
14166         if( status ) return status;
14167         status = pthread_create( &t, &attr, task, NULL );
14168 #if HAVE_PTHREADS < 7
14169         if( status < 0 ) status = errno;
14170 #endif
14171         if( status ) return status;
14172 #else
14173         /* Draft 4 pthreads */
14174         status = pthread_create( &t, pthread_attr_default, task, NULL );
14175         if( status ) return errno;
14176
14177         /* give thread a chance to complete */
14178         /* it should remain joinable and hence detachable */
14179         sleep( 1 );
14180
14181         status = pthread_detach( &t );
14182         if( status ) return errno;
14183 #endif
14184
14185 #ifdef HAVE_LINUX_THREADS
14186         pthread_kill_other_threads_np();
14187 #endif
14188
14189         return 0;
14190
14191 ; return 0; }
14192 EOF
14193 if { (eval echo configure:14194: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14194   rm -rf conftest*
14195   ol_cv_pthread_threads=yes
14196 else
14197   echo "configure: failed program was:" >&5
14198   cat conftest.$ac_ext >&5
14199   rm -rf conftest*
14200   ol_cv_pthread_threads=no
14201 fi
14202 rm -f conftest*
14203 else
14204   cat > conftest.$ac_ext <<EOF
14205 #line 14206 "configure"
14206 #include "confdefs.h"
14207 /* pthread test headers */
14208 #include <pthread.h>
14209 #if HAVE_PTHREADS < 7
14210 #include <errno.h>
14211 #endif
14212 #ifndef NULL
14213 #define NULL (void*)0
14214 #endif
14215
14216 static void *task(p)
14217         void *p;
14218 {
14219         return (void *) (p == NULL);
14220 }
14221
14222
14223 int main(argc, argv)
14224         int argc;
14225         char **argv;
14226 {
14227
14228         /* pthread test function */
14229 #ifndef PTHREAD_CREATE_DETACHED
14230 #define PTHREAD_CREATE_DETACHED 1
14231 #endif
14232         pthread_t t;
14233         int status;
14234         int detach = PTHREAD_CREATE_DETACHED;
14235
14236 #if HAVE_PTHREADS > 4
14237         /* Final pthreads */
14238         pthread_attr_t attr;
14239
14240         status = pthread_attr_init(&attr);
14241         if( status ) return status;
14242
14243 #if HAVE_PTHREADS < 7
14244         status = pthread_attr_setdetachstate(&attr, &detach);
14245         if( status < 0 ) status = errno;
14246 #else
14247         status = pthread_attr_setdetachstate(&attr, detach);
14248 #endif
14249         if( status ) return status;
14250         status = pthread_create( &t, &attr, task, NULL );
14251 #if HAVE_PTHREADS < 7
14252         if( status < 0 ) status = errno;
14253 #endif
14254         if( status ) return status;
14255 #else
14256         /* Draft 4 pthreads */
14257         status = pthread_create( &t, pthread_attr_default, task, NULL );
14258         if( status ) return errno;
14259
14260         /* give thread a chance to complete */
14261         /* it should remain joinable and hence detachable */
14262         sleep( 1 );
14263
14264         status = pthread_detach( &t );
14265         if( status ) return errno;
14266 #endif
14267
14268 #ifdef HAVE_LINUX_THREADS
14269         pthread_kill_other_threads_np();
14270 #endif
14271
14272         return 0;
14273
14274 }
14275
14276 EOF
14277 if { (eval echo configure:14278: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
14278 then
14279   ol_cv_pthread_threads=yes
14280 else
14281   echo "configure: failed program was:" >&5
14282   cat conftest.$ac_ext >&5
14283   rm -fr conftest*
14284   ol_cv_pthread_threads=no
14285 fi
14286 rm -fr conftest*
14287 fi
14288
14289
14290                 # restore the LIBS
14291                 LIBS="$ol_LIBS"
14292         
14293 fi
14294
14295 echo "$ac_t""$ol_cv_pthread_threads" 1>&6
14296
14297         if test $ol_cv_pthread_threads = yes ; then
14298                 ol_link_pthreads="-threads"
14299                 ol_link_threads=posix
14300         fi
14301 fi
14302
14303
14304                 # Pthread try link: -lpthreads -lmach -lexc -lc_r (ol_cv_pthread_lpthreads_lmach_lexc_lc_r)
14305 if test "$ol_link_threads" = no ; then
14306         # try -lpthreads -lmach -lexc -lc_r
14307         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc -lc_r""... $ac_c" 1>&6
14308 echo "configure:14309: checking for pthread link with -lpthreads -lmach -lexc -lc_r" >&5
14309 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc_lc_r+set}\" = set"; then
14310   echo $ac_n "(cached) $ac_c" 1>&6
14311 else
14312   
14313                 # save the flags
14314                 ol_LIBS="$LIBS"
14315                 LIBS="-lpthreads -lmach -lexc -lc_r $LIBS"
14316
14317                 if test "$cross_compiling" = yes; then
14318   cat > conftest.$ac_ext <<EOF
14319 #line 14320 "configure"
14320 #include "confdefs.h"
14321 /* pthread test headers */
14322 #include <pthread.h>
14323 #if HAVE_PTHREADS < 7
14324 #include <errno.h>
14325 #endif
14326 #ifndef NULL
14327 #define NULL (void*)0
14328 #endif
14329
14330 static void *task(p)
14331         void *p;
14332 {
14333         return (void *) (p == NULL);
14334 }
14335
14336 int main() {
14337
14338         /* pthread test function */
14339 #ifndef PTHREAD_CREATE_DETACHED
14340 #define PTHREAD_CREATE_DETACHED 1
14341 #endif
14342         pthread_t t;
14343         int status;
14344         int detach = PTHREAD_CREATE_DETACHED;
14345
14346 #if HAVE_PTHREADS > 4
14347         /* Final pthreads */
14348         pthread_attr_t attr;
14349
14350         status = pthread_attr_init(&attr);
14351         if( status ) return status;
14352
14353 #if HAVE_PTHREADS < 7
14354         status = pthread_attr_setdetachstate(&attr, &detach);
14355         if( status < 0 ) status = errno;
14356 #else
14357         status = pthread_attr_setdetachstate(&attr, detach);
14358 #endif
14359         if( status ) return status;
14360         status = pthread_create( &t, &attr, task, NULL );
14361 #if HAVE_PTHREADS < 7
14362         if( status < 0 ) status = errno;
14363 #endif
14364         if( status ) return status;
14365 #else
14366         /* Draft 4 pthreads */
14367         status = pthread_create( &t, pthread_attr_default, task, NULL );
14368         if( status ) return errno;
14369
14370         /* give thread a chance to complete */
14371         /* it should remain joinable and hence detachable */
14372         sleep( 1 );
14373
14374         status = pthread_detach( &t );
14375         if( status ) return errno;
14376 #endif
14377
14378 #ifdef HAVE_LINUX_THREADS
14379         pthread_kill_other_threads_np();
14380 #endif
14381
14382         return 0;
14383
14384 ; return 0; }
14385 EOF
14386 if { (eval echo configure:14387: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14387   rm -rf conftest*
14388   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
14389 else
14390   echo "configure: failed program was:" >&5
14391   cat conftest.$ac_ext >&5
14392   rm -rf conftest*
14393   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
14394 fi
14395 rm -f conftest*
14396 else
14397   cat > conftest.$ac_ext <<EOF
14398 #line 14399 "configure"
14399 #include "confdefs.h"
14400 /* pthread test headers */
14401 #include <pthread.h>
14402 #if HAVE_PTHREADS < 7
14403 #include <errno.h>
14404 #endif
14405 #ifndef NULL
14406 #define NULL (void*)0
14407 #endif
14408
14409 static void *task(p)
14410         void *p;
14411 {
14412         return (void *) (p == NULL);
14413 }
14414
14415
14416 int main(argc, argv)
14417         int argc;
14418         char **argv;
14419 {
14420
14421         /* pthread test function */
14422 #ifndef PTHREAD_CREATE_DETACHED
14423 #define PTHREAD_CREATE_DETACHED 1
14424 #endif
14425         pthread_t t;
14426         int status;
14427         int detach = PTHREAD_CREATE_DETACHED;
14428
14429 #if HAVE_PTHREADS > 4
14430         /* Final pthreads */
14431         pthread_attr_t attr;
14432
14433         status = pthread_attr_init(&attr);
14434         if( status ) return status;
14435
14436 #if HAVE_PTHREADS < 7
14437         status = pthread_attr_setdetachstate(&attr, &detach);
14438         if( status < 0 ) status = errno;
14439 #else
14440         status = pthread_attr_setdetachstate(&attr, detach);
14441 #endif
14442         if( status ) return status;
14443         status = pthread_create( &t, &attr, task, NULL );
14444 #if HAVE_PTHREADS < 7
14445         if( status < 0 ) status = errno;
14446 #endif
14447         if( status ) return status;
14448 #else
14449         /* Draft 4 pthreads */
14450         status = pthread_create( &t, pthread_attr_default, task, NULL );
14451         if( status ) return errno;
14452
14453         /* give thread a chance to complete */
14454         /* it should remain joinable and hence detachable */
14455         sleep( 1 );
14456
14457         status = pthread_detach( &t );
14458         if( status ) return errno;
14459 #endif
14460
14461 #ifdef HAVE_LINUX_THREADS
14462         pthread_kill_other_threads_np();
14463 #endif
14464
14465         return 0;
14466
14467 }
14468
14469 EOF
14470 if { (eval echo configure:14471: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
14471 then
14472   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
14473 else
14474   echo "configure: failed program was:" >&5
14475   cat conftest.$ac_ext >&5
14476   rm -fr conftest*
14477   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
14478 fi
14479 rm -fr conftest*
14480 fi
14481
14482
14483                 # restore the LIBS
14484                 LIBS="$ol_LIBS"
14485         
14486 fi
14487
14488 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc_lc_r" 1>&6
14489
14490         if test $ol_cv_pthread_lpthreads_lmach_lexc_lc_r = yes ; then
14491                 ol_link_pthreads="-lpthreads -lmach -lexc -lc_r"
14492                 ol_link_threads=posix
14493         fi
14494 fi
14495
14496                 # Pthread try link: -lpthreads -lmach -lexc (ol_cv_pthread_lpthreads_lmach_lexc)
14497 if test "$ol_link_threads" = no ; then
14498         # try -lpthreads -lmach -lexc
14499         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc""... $ac_c" 1>&6
14500 echo "configure:14501: checking for pthread link with -lpthreads -lmach -lexc" >&5
14501 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc+set}\" = set"; then
14502   echo $ac_n "(cached) $ac_c" 1>&6
14503 else
14504   
14505                 # save the flags
14506                 ol_LIBS="$LIBS"
14507                 LIBS="-lpthreads -lmach -lexc $LIBS"
14508
14509                 if test "$cross_compiling" = yes; then
14510   cat > conftest.$ac_ext <<EOF
14511 #line 14512 "configure"
14512 #include "confdefs.h"
14513 /* pthread test headers */
14514 #include <pthread.h>
14515 #if HAVE_PTHREADS < 7
14516 #include <errno.h>
14517 #endif
14518 #ifndef NULL
14519 #define NULL (void*)0
14520 #endif
14521
14522 static void *task(p)
14523         void *p;
14524 {
14525         return (void *) (p == NULL);
14526 }
14527
14528 int main() {
14529
14530         /* pthread test function */
14531 #ifndef PTHREAD_CREATE_DETACHED
14532 #define PTHREAD_CREATE_DETACHED 1
14533 #endif
14534         pthread_t t;
14535         int status;
14536         int detach = PTHREAD_CREATE_DETACHED;
14537
14538 #if HAVE_PTHREADS > 4
14539         /* Final pthreads */
14540         pthread_attr_t attr;
14541
14542         status = pthread_attr_init(&attr);
14543         if( status ) return status;
14544
14545 #if HAVE_PTHREADS < 7
14546         status = pthread_attr_setdetachstate(&attr, &detach);
14547         if( status < 0 ) status = errno;
14548 #else
14549         status = pthread_attr_setdetachstate(&attr, detach);
14550 #endif
14551         if( status ) return status;
14552         status = pthread_create( &t, &attr, task, NULL );
14553 #if HAVE_PTHREADS < 7
14554         if( status < 0 ) status = errno;
14555 #endif
14556         if( status ) return status;
14557 #else
14558         /* Draft 4 pthreads */
14559         status = pthread_create( &t, pthread_attr_default, task, NULL );
14560         if( status ) return errno;
14561
14562         /* give thread a chance to complete */
14563         /* it should remain joinable and hence detachable */
14564         sleep( 1 );
14565
14566         status = pthread_detach( &t );
14567         if( status ) return errno;
14568 #endif
14569
14570 #ifdef HAVE_LINUX_THREADS
14571         pthread_kill_other_threads_np();
14572 #endif
14573
14574         return 0;
14575
14576 ; return 0; }
14577 EOF
14578 if { (eval echo configure:14579: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14579   rm -rf conftest*
14580   ol_cv_pthread_lpthreads_lmach_lexc=yes
14581 else
14582   echo "configure: failed program was:" >&5
14583   cat conftest.$ac_ext >&5
14584   rm -rf conftest*
14585   ol_cv_pthread_lpthreads_lmach_lexc=no
14586 fi
14587 rm -f conftest*
14588 else
14589   cat > conftest.$ac_ext <<EOF
14590 #line 14591 "configure"
14591 #include "confdefs.h"
14592 /* pthread test headers */
14593 #include <pthread.h>
14594 #if HAVE_PTHREADS < 7
14595 #include <errno.h>
14596 #endif
14597 #ifndef NULL
14598 #define NULL (void*)0
14599 #endif
14600
14601 static void *task(p)
14602         void *p;
14603 {
14604         return (void *) (p == NULL);
14605 }
14606
14607
14608 int main(argc, argv)
14609         int argc;
14610         char **argv;
14611 {
14612
14613         /* pthread test function */
14614 #ifndef PTHREAD_CREATE_DETACHED
14615 #define PTHREAD_CREATE_DETACHED 1
14616 #endif
14617         pthread_t t;
14618         int status;
14619         int detach = PTHREAD_CREATE_DETACHED;
14620
14621 #if HAVE_PTHREADS > 4
14622         /* Final pthreads */
14623         pthread_attr_t attr;
14624
14625         status = pthread_attr_init(&attr);
14626         if( status ) return status;
14627
14628 #if HAVE_PTHREADS < 7
14629         status = pthread_attr_setdetachstate(&attr, &detach);
14630         if( status < 0 ) status = errno;
14631 #else
14632         status = pthread_attr_setdetachstate(&attr, detach);
14633 #endif
14634         if( status ) return status;
14635         status = pthread_create( &t, &attr, task, NULL );
14636 #if HAVE_PTHREADS < 7
14637         if( status < 0 ) status = errno;
14638 #endif
14639         if( status ) return status;
14640 #else
14641         /* Draft 4 pthreads */
14642         status = pthread_create( &t, pthread_attr_default, task, NULL );
14643         if( status ) return errno;
14644
14645         /* give thread a chance to complete */
14646         /* it should remain joinable and hence detachable */
14647         sleep( 1 );
14648
14649         status = pthread_detach( &t );
14650         if( status ) return errno;
14651 #endif
14652
14653 #ifdef HAVE_LINUX_THREADS
14654         pthread_kill_other_threads_np();
14655 #endif
14656
14657         return 0;
14658
14659 }
14660
14661 EOF
14662 if { (eval echo configure:14663: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
14663 then
14664   ol_cv_pthread_lpthreads_lmach_lexc=yes
14665 else
14666   echo "configure: failed program was:" >&5
14667   cat conftest.$ac_ext >&5
14668   rm -fr conftest*
14669   ol_cv_pthread_lpthreads_lmach_lexc=no
14670 fi
14671 rm -fr conftest*
14672 fi
14673
14674
14675                 # restore the LIBS
14676                 LIBS="$ol_LIBS"
14677         
14678 fi
14679
14680 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc" 1>&6
14681
14682         if test $ol_cv_pthread_lpthreads_lmach_lexc = yes ; then
14683                 ol_link_pthreads="-lpthreads -lmach -lexc"
14684                 ol_link_threads=posix
14685         fi
14686 fi
14687
14688                 # Pthread try link: -lpthreads -lexc (ol_cv_pthread_lpthreads_lexc)
14689 if test "$ol_link_threads" = no ; then
14690         # try -lpthreads -lexc
14691         echo $ac_n "checking for pthread link with -lpthreads -lexc""... $ac_c" 1>&6
14692 echo "configure:14693: checking for pthread link with -lpthreads -lexc" >&5
14693 if eval "test \"\${ol_cv_pthread_lpthreads_lexc+set}\" = set"; then
14694   echo $ac_n "(cached) $ac_c" 1>&6
14695 else
14696   
14697                 # save the flags
14698                 ol_LIBS="$LIBS"
14699                 LIBS="-lpthreads -lexc $LIBS"
14700
14701                 if test "$cross_compiling" = yes; then
14702   cat > conftest.$ac_ext <<EOF
14703 #line 14704 "configure"
14704 #include "confdefs.h"
14705 /* pthread test headers */
14706 #include <pthread.h>
14707 #if HAVE_PTHREADS < 7
14708 #include <errno.h>
14709 #endif
14710 #ifndef NULL
14711 #define NULL (void*)0
14712 #endif
14713
14714 static void *task(p)
14715         void *p;
14716 {
14717         return (void *) (p == NULL);
14718 }
14719
14720 int main() {
14721
14722         /* pthread test function */
14723 #ifndef PTHREAD_CREATE_DETACHED
14724 #define PTHREAD_CREATE_DETACHED 1
14725 #endif
14726         pthread_t t;
14727         int status;
14728         int detach = PTHREAD_CREATE_DETACHED;
14729
14730 #if HAVE_PTHREADS > 4
14731         /* Final pthreads */
14732         pthread_attr_t attr;
14733
14734         status = pthread_attr_init(&attr);
14735         if( status ) return status;
14736
14737 #if HAVE_PTHREADS < 7
14738         status = pthread_attr_setdetachstate(&attr, &detach);
14739         if( status < 0 ) status = errno;
14740 #else
14741         status = pthread_attr_setdetachstate(&attr, detach);
14742 #endif
14743         if( status ) return status;
14744         status = pthread_create( &t, &attr, task, NULL );
14745 #if HAVE_PTHREADS < 7
14746         if( status < 0 ) status = errno;
14747 #endif
14748         if( status ) return status;
14749 #else
14750         /* Draft 4 pthreads */
14751         status = pthread_create( &t, pthread_attr_default, task, NULL );
14752         if( status ) return errno;
14753
14754         /* give thread a chance to complete */
14755         /* it should remain joinable and hence detachable */
14756         sleep( 1 );
14757
14758         status = pthread_detach( &t );
14759         if( status ) return errno;
14760 #endif
14761
14762 #ifdef HAVE_LINUX_THREADS
14763         pthread_kill_other_threads_np();
14764 #endif
14765
14766         return 0;
14767
14768 ; return 0; }
14769 EOF
14770 if { (eval echo configure:14771: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14771   rm -rf conftest*
14772   ol_cv_pthread_lpthreads_lexc=yes
14773 else
14774   echo "configure: failed program was:" >&5
14775   cat conftest.$ac_ext >&5
14776   rm -rf conftest*
14777   ol_cv_pthread_lpthreads_lexc=no
14778 fi
14779 rm -f conftest*
14780 else
14781   cat > conftest.$ac_ext <<EOF
14782 #line 14783 "configure"
14783 #include "confdefs.h"
14784 /* pthread test headers */
14785 #include <pthread.h>
14786 #if HAVE_PTHREADS < 7
14787 #include <errno.h>
14788 #endif
14789 #ifndef NULL
14790 #define NULL (void*)0
14791 #endif
14792
14793 static void *task(p)
14794         void *p;
14795 {
14796         return (void *) (p == NULL);
14797 }
14798
14799
14800 int main(argc, argv)
14801         int argc;
14802         char **argv;
14803 {
14804
14805         /* pthread test function */
14806 #ifndef PTHREAD_CREATE_DETACHED
14807 #define PTHREAD_CREATE_DETACHED 1
14808 #endif
14809         pthread_t t;
14810         int status;
14811         int detach = PTHREAD_CREATE_DETACHED;
14812
14813 #if HAVE_PTHREADS > 4
14814         /* Final pthreads */
14815         pthread_attr_t attr;
14816
14817         status = pthread_attr_init(&attr);
14818         if( status ) return status;
14819
14820 #if HAVE_PTHREADS < 7
14821         status = pthread_attr_setdetachstate(&attr, &detach);
14822         if( status < 0 ) status = errno;
14823 #else
14824         status = pthread_attr_setdetachstate(&attr, detach);
14825 #endif
14826         if( status ) return status;
14827         status = pthread_create( &t, &attr, task, NULL );
14828 #if HAVE_PTHREADS < 7
14829         if( status < 0 ) status = errno;
14830 #endif
14831         if( status ) return status;
14832 #else
14833         /* Draft 4 pthreads */
14834         status = pthread_create( &t, pthread_attr_default, task, NULL );
14835         if( status ) return errno;
14836
14837         /* give thread a chance to complete */
14838         /* it should remain joinable and hence detachable */
14839         sleep( 1 );
14840
14841         status = pthread_detach( &t );
14842         if( status ) return errno;
14843 #endif
14844
14845 #ifdef HAVE_LINUX_THREADS
14846         pthread_kill_other_threads_np();
14847 #endif
14848
14849         return 0;
14850
14851 }
14852
14853 EOF
14854 if { (eval echo configure:14855: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
14855 then
14856   ol_cv_pthread_lpthreads_lexc=yes
14857 else
14858   echo "configure: failed program was:" >&5
14859   cat conftest.$ac_ext >&5
14860   rm -fr conftest*
14861   ol_cv_pthread_lpthreads_lexc=no
14862 fi
14863 rm -fr conftest*
14864 fi
14865
14866
14867                 # restore the LIBS
14868                 LIBS="$ol_LIBS"
14869         
14870 fi
14871
14872 echo "$ac_t""$ol_cv_pthread_lpthreads_lexc" 1>&6
14873
14874         if test $ol_cv_pthread_lpthreads_lexc = yes ; then
14875                 ol_link_pthreads="-lpthreads -lexc"
14876                 ol_link_threads=posix
14877         fi
14878 fi
14879
14880
14881                 # Pthread try link: -lpthreads (ol_cv_pthread_lib_lpthreads)
14882 if test "$ol_link_threads" = no ; then
14883         # try -lpthreads
14884         echo $ac_n "checking for pthread link with -lpthreads""... $ac_c" 1>&6
14885 echo "configure:14886: checking for pthread link with -lpthreads" >&5
14886 if eval "test \"\${ol_cv_pthread_lib_lpthreads+set}\" = set"; then
14887   echo $ac_n "(cached) $ac_c" 1>&6
14888 else
14889   
14890                 # save the flags
14891                 ol_LIBS="$LIBS"
14892                 LIBS="-lpthreads $LIBS"
14893
14894                 if test "$cross_compiling" = yes; then
14895   cat > conftest.$ac_ext <<EOF
14896 #line 14897 "configure"
14897 #include "confdefs.h"
14898 /* pthread test headers */
14899 #include <pthread.h>
14900 #if HAVE_PTHREADS < 7
14901 #include <errno.h>
14902 #endif
14903 #ifndef NULL
14904 #define NULL (void*)0
14905 #endif
14906
14907 static void *task(p)
14908         void *p;
14909 {
14910         return (void *) (p == NULL);
14911 }
14912
14913 int main() {
14914
14915         /* pthread test function */
14916 #ifndef PTHREAD_CREATE_DETACHED
14917 #define PTHREAD_CREATE_DETACHED 1
14918 #endif
14919         pthread_t t;
14920         int status;
14921         int detach = PTHREAD_CREATE_DETACHED;
14922
14923 #if HAVE_PTHREADS > 4
14924         /* Final pthreads */
14925         pthread_attr_t attr;
14926
14927         status = pthread_attr_init(&attr);
14928         if( status ) return status;
14929
14930 #if HAVE_PTHREADS < 7
14931         status = pthread_attr_setdetachstate(&attr, &detach);
14932         if( status < 0 ) status = errno;
14933 #else
14934         status = pthread_attr_setdetachstate(&attr, detach);
14935 #endif
14936         if( status ) return status;
14937         status = pthread_create( &t, &attr, task, NULL );
14938 #if HAVE_PTHREADS < 7
14939         if( status < 0 ) status = errno;
14940 #endif
14941         if( status ) return status;
14942 #else
14943         /* Draft 4 pthreads */
14944         status = pthread_create( &t, pthread_attr_default, task, NULL );
14945         if( status ) return errno;
14946
14947         /* give thread a chance to complete */
14948         /* it should remain joinable and hence detachable */
14949         sleep( 1 );
14950
14951         status = pthread_detach( &t );
14952         if( status ) return errno;
14953 #endif
14954
14955 #ifdef HAVE_LINUX_THREADS
14956         pthread_kill_other_threads_np();
14957 #endif
14958
14959         return 0;
14960
14961 ; return 0; }
14962 EOF
14963 if { (eval echo configure:14964: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14964   rm -rf conftest*
14965   ol_cv_pthread_lib_lpthreads=yes
14966 else
14967   echo "configure: failed program was:" >&5
14968   cat conftest.$ac_ext >&5
14969   rm -rf conftest*
14970   ol_cv_pthread_lib_lpthreads=no
14971 fi
14972 rm -f conftest*
14973 else
14974   cat > conftest.$ac_ext <<EOF
14975 #line 14976 "configure"
14976 #include "confdefs.h"
14977 /* pthread test headers */
14978 #include <pthread.h>
14979 #if HAVE_PTHREADS < 7
14980 #include <errno.h>
14981 #endif
14982 #ifndef NULL
14983 #define NULL (void*)0
14984 #endif
14985
14986 static void *task(p)
14987         void *p;
14988 {
14989         return (void *) (p == NULL);
14990 }
14991
14992
14993 int main(argc, argv)
14994         int argc;
14995         char **argv;
14996 {
14997
14998         /* pthread test function */
14999 #ifndef PTHREAD_CREATE_DETACHED
15000 #define PTHREAD_CREATE_DETACHED 1
15001 #endif
15002         pthread_t t;
15003         int status;
15004         int detach = PTHREAD_CREATE_DETACHED;
15005
15006 #if HAVE_PTHREADS > 4
15007         /* Final pthreads */
15008         pthread_attr_t attr;
15009
15010         status = pthread_attr_init(&attr);
15011         if( status ) return status;
15012
15013 #if HAVE_PTHREADS < 7
15014         status = pthread_attr_setdetachstate(&attr, &detach);
15015         if( status < 0 ) status = errno;
15016 #else
15017         status = pthread_attr_setdetachstate(&attr, detach);
15018 #endif
15019         if( status ) return status;
15020         status = pthread_create( &t, &attr, task, NULL );
15021 #if HAVE_PTHREADS < 7
15022         if( status < 0 ) status = errno;
15023 #endif
15024         if( status ) return status;
15025 #else
15026         /* Draft 4 pthreads */
15027         status = pthread_create( &t, pthread_attr_default, task, NULL );
15028         if( status ) return errno;
15029
15030         /* give thread a chance to complete */
15031         /* it should remain joinable and hence detachable */
15032         sleep( 1 );
15033
15034         status = pthread_detach( &t );
15035         if( status ) return errno;
15036 #endif
15037
15038 #ifdef HAVE_LINUX_THREADS
15039         pthread_kill_other_threads_np();
15040 #endif
15041
15042         return 0;
15043
15044 }
15045
15046 EOF
15047 if { (eval echo configure:15048: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
15048 then
15049   ol_cv_pthread_lib_lpthreads=yes
15050 else
15051   echo "configure: failed program was:" >&5
15052   cat conftest.$ac_ext >&5
15053   rm -fr conftest*
15054   ol_cv_pthread_lib_lpthreads=no
15055 fi
15056 rm -fr conftest*
15057 fi
15058
15059
15060                 # restore the LIBS
15061                 LIBS="$ol_LIBS"
15062         
15063 fi
15064
15065 echo "$ac_t""$ol_cv_pthread_lib_lpthreads" 1>&6
15066
15067         if test $ol_cv_pthread_lib_lpthreads = yes ; then
15068                 ol_link_pthreads="-lpthreads"
15069                 ol_link_threads=posix
15070         fi
15071 fi
15072
15073
15074                 if test $ol_link_threads != no ; then
15075                         LTHREAD_LIBS="$LTHREAD_LIBS $ol_link_pthreads"
15076
15077                                                 save_CPPFLAGS="$CPPFLAGS"
15078                         save_LIBS="$LIBS"
15079                         LIBS="$LTHREAD_LIBS $LIBS"
15080
15081                                                                                                 for ac_func in sched_yield pthread_yield thr_yield
15082 do
15083 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15084 echo "configure:15085: checking for $ac_func" >&5
15085 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15086   echo $ac_n "(cached) $ac_c" 1>&6
15087 else
15088   cat > conftest.$ac_ext <<EOF
15089 #line 15090 "configure"
15090 #include "confdefs.h"
15091 /* System header to define __stub macros and hopefully few prototypes,
15092     which can conflict with char $ac_func(); below.  */
15093 #include <assert.h>
15094 /* Override any gcc2 internal prototype to avoid an error.  */
15095 /* We use char because int might match the return type of a gcc2
15096     builtin and then its argument prototype would still apply.  */
15097 char $ac_func();
15098 char (*f)();
15099
15100 int main() {
15101
15102 /* The GNU C library defines this for functions which it implements
15103     to always fail with ENOSYS.  Some functions are actually named
15104     something starting with __ and the normal name is an alias.  */
15105 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15106 choke me
15107 #else
15108 f = $ac_func;
15109 #endif
15110
15111 ; return 0; }
15112 EOF
15113 if { (eval echo configure:15114: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15114   rm -rf conftest*
15115   eval "ac_cv_func_$ac_func=yes"
15116 else
15117   echo "configure: failed program was:" >&5
15118   cat conftest.$ac_ext >&5
15119   rm -rf conftest*
15120   eval "ac_cv_func_$ac_func=no"
15121 fi
15122 rm -f conftest*
15123 fi
15124
15125 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15126   echo "$ac_t""yes" 1>&6
15127     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15128   cat >> confdefs.h <<EOF
15129 #define $ac_tr_func 1
15130 EOF
15131  
15132 else
15133   echo "$ac_t""no" 1>&6
15134 fi
15135 done
15136
15137
15138                         if test $ac_cv_func_sched_yield = no -a \
15139                                 $ac_cv_func_pthread_yield = no -a \
15140                                 $ac_cv_func_thr_yield = no ; then
15141                                                                 echo $ac_n "checking for sched_yield in -lrt""... $ac_c" 1>&6
15142 echo "configure:15143: checking for sched_yield in -lrt" >&5
15143 ac_lib_var=`echo rt'_'sched_yield | sed 'y%./+-:%__p__%'`
15144 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
15145   echo $ac_n "(cached) $ac_c" 1>&6
15146 else
15147   ac_save_LIBS="$LIBS"
15148 LIBS="-lrt  $LIBS"
15149 cat > conftest.$ac_ext <<EOF
15150 #line 15151 "configure"
15151 #include "confdefs.h"
15152 /* Override any gcc2 internal prototype to avoid an error.  */
15153 /* We use char because int might match the return type of a gcc2
15154     builtin and then its argument prototype would still apply.  */
15155 char sched_yield();
15156
15157 int main() {
15158 sched_yield()
15159 ; return 0; }
15160 EOF
15161 if { (eval echo configure:15162: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15162   rm -rf conftest*
15163   eval "ac_cv_lib_$ac_lib_var=yes"
15164 else
15165   echo "configure: failed program was:" >&5
15166   cat conftest.$ac_ext >&5
15167   rm -rf conftest*
15168   eval "ac_cv_lib_$ac_lib_var=no"
15169 fi
15170 rm -f conftest*
15171 LIBS="$ac_save_LIBS"
15172
15173 fi
15174 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
15175   echo "$ac_t""yes" 1>&6
15176   LTHREAD_LIBS="$LTHREAD_LIBS -lrt"
15177                                         cat >> confdefs.h <<\EOF
15178 #define HAVE_SCHED_YIELD 1
15179 EOF
15180
15181                                         ac_cv_func_sched_yield=yes
15182 else
15183   echo "$ac_t""no" 1>&6
15184 ac_cv_func_sched_yield=no
15185 fi
15186
15187                         fi
15188                         if test $ac_cv_func_sched_yield = no -a \
15189                                 $ac_cv_func_pthread_yield = no -a \
15190                                 "$ac_cv_func_thr_yield" = no ; then
15191                                 echo "configure: warning: could not locate sched_yield() or pthread_yield()" 1>&2
15192                         fi
15193
15194                                                 for ac_func in pthread_kill pthread_rwlock_destroy
15195 do
15196 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15197 echo "configure:15198: checking for $ac_func" >&5
15198 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15199   echo $ac_n "(cached) $ac_c" 1>&6
15200 else
15201   cat > conftest.$ac_ext <<EOF
15202 #line 15203 "configure"
15203 #include "confdefs.h"
15204 /* System header to define __stub macros and hopefully few prototypes,
15205     which can conflict with char $ac_func(); below.  */
15206 #include <assert.h>
15207 /* Override any gcc2 internal prototype to avoid an error.  */
15208 /* We use char because int might match the return type of a gcc2
15209     builtin and then its argument prototype would still apply.  */
15210 char $ac_func();
15211 char (*f)();
15212
15213 int main() {
15214
15215 /* The GNU C library defines this for functions which it implements
15216     to always fail with ENOSYS.  Some functions are actually named
15217     something starting with __ and the normal name is an alias.  */
15218 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15219 choke me
15220 #else
15221 f = $ac_func;
15222 #endif
15223
15224 ; return 0; }
15225 EOF
15226 if { (eval echo configure:15227: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15227   rm -rf conftest*
15228   eval "ac_cv_func_$ac_func=yes"
15229 else
15230   echo "configure: failed program was:" >&5
15231   cat conftest.$ac_ext >&5
15232   rm -rf conftest*
15233   eval "ac_cv_func_$ac_func=no"
15234 fi
15235 rm -f conftest*
15236 fi
15237
15238 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15239   echo "$ac_t""yes" 1>&6
15240     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15241   cat >> confdefs.h <<EOF
15242 #define $ac_tr_func 1
15243 EOF
15244  
15245 else
15246   echo "$ac_t""no" 1>&6
15247 fi
15248 done
15249
15250
15251                                                                         echo $ac_n "checking for pthread_detach with <pthread.h>""... $ac_c" 1>&6
15252 echo "configure:15253: checking for pthread_detach with <pthread.h>" >&5
15253 if eval "test \"\${ol_cv_func_pthread_detach+set}\" = set"; then
15254   echo $ac_n "(cached) $ac_c" 1>&6
15255 else
15256   
15257                                                                 cat > conftest.$ac_ext <<EOF
15258 #line 15259 "configure"
15259 #include "confdefs.h"
15260
15261 #include <pthread.h>
15262 #ifndef NULL
15263 #define NULL (void*)0
15264 #endif
15265
15266 int main() {
15267 pthread_detach(NULL);
15268 ; return 0; }
15269 EOF
15270 if { (eval echo configure:15271: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15271   rm -rf conftest*
15272   ol_cv_func_pthread_detach=yes
15273 else
15274   echo "configure: failed program was:" >&5
15275   cat conftest.$ac_ext >&5
15276   rm -rf conftest*
15277   ol_cv_func_pthread_detach=no
15278 fi
15279 rm -f conftest*
15280                         
15281 fi
15282
15283 echo "$ac_t""$ol_cv_func_pthread_detach" 1>&6
15284
15285                         if test $ol_cv_func_pthread_detach = no ; then
15286                                 { echo "configure: error: could not locate pthread_detach()" 1>&2; exit 1; }
15287                         fi
15288
15289                         cat >> confdefs.h <<\EOF
15290 #define HAVE_PTHREAD_DETACH 1
15291 EOF
15292
15293
15294                                                 for ac_func in \
15295                                 pthread_setconcurrency \
15296                                 pthread_getconcurrency \
15297                                 thr_setconcurrency \
15298                                 thr_getconcurrency \
15299                         
15300 do
15301 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15302 echo "configure:15303: checking for $ac_func" >&5
15303 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15304   echo $ac_n "(cached) $ac_c" 1>&6
15305 else
15306   cat > conftest.$ac_ext <<EOF
15307 #line 15308 "configure"
15308 #include "confdefs.h"
15309 /* System header to define __stub macros and hopefully few prototypes,
15310     which can conflict with char $ac_func(); below.  */
15311 #include <assert.h>
15312 /* Override any gcc2 internal prototype to avoid an error.  */
15313 /* We use char because int might match the return type of a gcc2
15314     builtin and then its argument prototype would still apply.  */
15315 char $ac_func();
15316 char (*f)();
15317
15318 int main() {
15319
15320 /* The GNU C library defines this for functions which it implements
15321     to always fail with ENOSYS.  Some functions are actually named
15322     something starting with __ and the normal name is an alias.  */
15323 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15324 choke me
15325 #else
15326 f = $ac_func;
15327 #endif
15328
15329 ; return 0; }
15330 EOF
15331 if { (eval echo configure:15332: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15332   rm -rf conftest*
15333   eval "ac_cv_func_$ac_func=yes"
15334 else
15335   echo "configure: failed program was:" >&5
15336   cat conftest.$ac_ext >&5
15337   rm -rf conftest*
15338   eval "ac_cv_func_$ac_func=no"
15339 fi
15340 rm -f conftest*
15341 fi
15342
15343 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15344   echo "$ac_t""yes" 1>&6
15345     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15346   cat >> confdefs.h <<EOF
15347 #define $ac_tr_func 1
15348 EOF
15349  
15350 else
15351   echo "$ac_t""no" 1>&6
15352 fi
15353 done
15354
15355
15356                         
15357         for ac_func in pthread_kill_other_threads_np
15358 do
15359 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15360 echo "configure:15361: checking for $ac_func" >&5
15361 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15362   echo $ac_n "(cached) $ac_c" 1>&6
15363 else
15364   cat > conftest.$ac_ext <<EOF
15365 #line 15366 "configure"
15366 #include "confdefs.h"
15367 /* System header to define __stub macros and hopefully few prototypes,
15368     which can conflict with char $ac_func(); below.  */
15369 #include <assert.h>
15370 /* Override any gcc2 internal prototype to avoid an error.  */
15371 /* We use char because int might match the return type of a gcc2
15372     builtin and then its argument prototype would still apply.  */
15373 char $ac_func();
15374 char (*f)();
15375
15376 int main() {
15377
15378 /* The GNU C library defines this for functions which it implements
15379     to always fail with ENOSYS.  Some functions are actually named
15380     something starting with __ and the normal name is an alias.  */
15381 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15382 choke me
15383 #else
15384 f = $ac_func;
15385 #endif
15386
15387 ; return 0; }
15388 EOF
15389 if { (eval echo configure:15390: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15390   rm -rf conftest*
15391   eval "ac_cv_func_$ac_func=yes"
15392 else
15393   echo "configure: failed program was:" >&5
15394   cat conftest.$ac_ext >&5
15395   rm -rf conftest*
15396   eval "ac_cv_func_$ac_func=no"
15397 fi
15398 rm -f conftest*
15399 fi
15400
15401 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15402   echo "$ac_t""yes" 1>&6
15403     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15404   cat >> confdefs.h <<EOF
15405 #define $ac_tr_func 1
15406 EOF
15407  
15408 else
15409   echo "$ac_t""no" 1>&6
15410 fi
15411 done
15412
15413         echo $ac_n "checking for LinuxThreads implementation""... $ac_c" 1>&6
15414 echo "configure:15415: checking for LinuxThreads implementation" >&5
15415 if eval "test \"\${ol_cv_sys_linux_threads+set}\" = set"; then
15416   echo $ac_n "(cached) $ac_c" 1>&6
15417 else
15418   ol_cv_sys_linux_threads=$ac_cv_func_pthread_kill_other_threads_np
15419 fi
15420
15421 echo "$ac_t""$ol_cv_sys_linux_threads" 1>&6
15422
15423                         
15424         
15425         
15426         echo $ac_n "checking for LinuxThreads consistency""... $ac_c" 1>&6
15427 echo "configure:15428: checking for LinuxThreads consistency" >&5
15428 if eval "test \"\${ol_cv_linux_threads+set}\" = set"; then
15429   echo $ac_n "(cached) $ac_c" 1>&6
15430 else
15431   
15432                 if test $ol_cv_header_linux_threads = yes -a \
15433                         $ol_cv_sys_linux_threads = yes; then
15434                         ol_cv_linux_threads=yes
15435                 elif test $ol_cv_header_linux_threads = no -a \
15436                         $ol_cv_sys_linux_threads = no; then
15437                         ol_cv_linux_threads=no
15438                 else
15439                         ol_cv_linux_threads=error
15440                 fi
15441         
15442 fi
15443
15444 echo "$ac_t""$ol_cv_linux_threads" 1>&6
15445
15446
15447                         if test $ol_cv_linux_threads = error; then
15448                                 { echo "configure: error: LinuxThreads header/library mismatch" 1>&2; exit 1; };
15449                         fi
15450
15451                         echo $ac_n "checking if pthread_create() works""... $ac_c" 1>&6
15452 echo "configure:15453: checking if pthread_create() works" >&5
15453 if eval "test \"\${ol_cv_pthread_create_works+set}\" = set"; then
15454   echo $ac_n "(cached) $ac_c" 1>&6
15455 else
15456   
15457                         if test "$cross_compiling" = yes; then
15458                                 ol_cv_pthread_create_works=yes
15459 else
15460   cat > conftest.$ac_ext <<EOF
15461 #line 15462 "configure"
15462 #include "confdefs.h"
15463 /* pthread test headers */
15464 #include <pthread.h>
15465 #if HAVE_PTHREADS < 7
15466 #include <errno.h>
15467 #endif
15468 #ifndef NULL
15469 #define NULL (void*)0
15470 #endif
15471
15472 static void *task(p)
15473         void *p;
15474 {
15475         return (void *) (p == NULL);
15476 }
15477
15478
15479 int main(argc, argv)
15480         int argc;
15481         char **argv;
15482 {
15483
15484         /* pthread test function */
15485 #ifndef PTHREAD_CREATE_DETACHED
15486 #define PTHREAD_CREATE_DETACHED 1
15487 #endif
15488         pthread_t t;
15489         int status;
15490         int detach = PTHREAD_CREATE_DETACHED;
15491
15492 #if HAVE_PTHREADS > 4
15493         /* Final pthreads */
15494         pthread_attr_t attr;
15495
15496         status = pthread_attr_init(&attr);
15497         if( status ) return status;
15498
15499 #if HAVE_PTHREADS < 7
15500         status = pthread_attr_setdetachstate(&attr, &detach);
15501         if( status < 0 ) status = errno;
15502 #else
15503         status = pthread_attr_setdetachstate(&attr, detach);
15504 #endif
15505         if( status ) return status;
15506         status = pthread_create( &t, &attr, task, NULL );
15507 #if HAVE_PTHREADS < 7
15508         if( status < 0 ) status = errno;
15509 #endif
15510         if( status ) return status;
15511 #else
15512         /* Draft 4 pthreads */
15513         status = pthread_create( &t, pthread_attr_default, task, NULL );
15514         if( status ) return errno;
15515
15516         /* give thread a chance to complete */
15517         /* it should remain joinable and hence detachable */
15518         sleep( 1 );
15519
15520         status = pthread_detach( &t );
15521         if( status ) return errno;
15522 #endif
15523
15524 #ifdef HAVE_LINUX_THREADS
15525         pthread_kill_other_threads_np();
15526 #endif
15527
15528         return 0;
15529
15530 }
15531
15532 EOF
15533 if { (eval echo configure:15534: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
15534 then
15535   ol_cv_pthread_create_works=yes
15536 else
15537   echo "configure: failed program was:" >&5
15538   cat conftest.$ac_ext >&5
15539   rm -fr conftest*
15540   ol_cv_pthread_create_works=no
15541 fi
15542 rm -fr conftest*
15543 fi
15544
15545 fi
15546
15547 echo "$ac_t""$ol_cv_pthread_create_works" 1>&6
15548
15549                         if test $ol_cv_pthread_create_works = no ; then
15550                                 { echo "configure: error: pthread_create is not usable, check environment settings" 1>&2; exit 1; }
15551                         fi
15552
15553                                                 if test $ol_with_yielding_select = auto ; then
15554                                 echo $ac_n "checking if select yields when using pthreads""... $ac_c" 1>&6
15555 echo "configure:15556: checking if select yields when using pthreads" >&5
15556 if eval "test \"\${ol_cv_pthread_select_yields+set}\" = set"; then
15557   echo $ac_n "(cached) $ac_c" 1>&6
15558 else
15559   
15560                                 if test "$cross_compiling" = yes; then
15561   ol_cv_pthread_select_yields=cross
15562 else
15563   cat > conftest.$ac_ext <<EOF
15564 #line 15565 "configure"
15565 #include "confdefs.h"
15566
15567 #include <sys/types.h>
15568 #include <sys/time.h>
15569 #include <unistd.h>
15570 #include <pthread.h>
15571 #ifndef NULL
15572 #define NULL (void*) 0
15573 #endif
15574
15575 static int fildes[2];
15576
15577 static void *task(p)
15578         void *p;
15579 {
15580         int i;
15581         struct timeval tv;
15582
15583         fd_set rfds;
15584
15585         tv.tv_sec=10;
15586         tv.tv_usec=0;
15587
15588         FD_ZERO(&rfds);
15589         FD_SET(fildes[0], &rfds);
15590
15591         /* we're not interested in any fds */
15592         i = select(FD_SETSIZE, &rfds, NULL, NULL, &tv);
15593
15594         if(i < 0) {
15595                 perror("select");
15596                 exit(10);
15597         }
15598
15599         exit(0); /* if we exit here, the select blocked the whole process */
15600 }
15601
15602 int main(argc, argv)
15603         int argc;
15604         char **argv;
15605 {
15606         pthread_t t;
15607
15608         /* create a pipe to select */
15609         if(pipe(&fildes[0])) {
15610                 perror("select");
15611                 exit(1);
15612         }
15613
15614 #ifdef HAVE_PTHREAD_SETCONCURRENCY
15615         (void) pthread_setconcurrency(2);
15616 #else
15617 #ifdef HAVE_THR_SETCONCURRENCY
15618         /* Set Solaris LWP concurrency to 2 */
15619         thr_setconcurrency(2);
15620 #endif
15621 #endif
15622
15623 #if HAVE_PTHREADS < 6
15624         pthread_create(&t, pthread_attr_default, task, NULL);
15625 #else
15626         pthread_create(&t, NULL, task, NULL);
15627 #endif
15628
15629         /* make sure task runs first */
15630 #if HAVE_THR_YIELD
15631         thr_yield();
15632 #elif defined( HAVE_SCHED_YIELD )
15633         sched_yield();
15634 #elif defined( HAVE_PTHREAD_YIELD )
15635         pthread_yield();
15636 #endif
15637
15638         exit(2);
15639 }
15640 EOF
15641 if { (eval echo configure:15642: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
15642 then
15643   ol_cv_pthread_select_yields=no
15644 else
15645   echo "configure: failed program was:" >&5
15646   cat conftest.$ac_ext >&5
15647   rm -fr conftest*
15648   ol_cv_pthread_select_yields=yes
15649 fi
15650 rm -fr conftest*
15651 fi
15652
15653 fi
15654
15655 echo "$ac_t""$ol_cv_pthread_select_yields" 1>&6
15656
15657                                 if test $ol_cv_pthread_select_yields = cross ; then
15658                                         { echo "configure: error: crossing compiling: use --with-yielding_select=yes|no|manual" 1>&2; exit 1; }
15659                                 fi
15660
15661                                 if test $ol_cv_pthread_select_yields = yes ; then
15662                                         ol_with_yielding_select=yes
15663                                 fi
15664                         fi
15665
15666                                                 CPPFLAGS="$save_CPPFLAGS"
15667                         LIBS="$save_LIBS"
15668                 else
15669                         { echo "configure: error: could not locate usable POSIX Threads" 1>&2; exit 1; }
15670                 fi
15671         fi
15672
15673         if test $ol_with_threads = posix ; then
15674                 { echo "configure: error: could not locate POSIX Threads" 1>&2; exit 1; }
15675         fi
15676 fi
15677
15678 if test $ol_with_threads = auto -o $ol_with_threads = yes \
15679         -o $ol_with_threads = mach ; then
15680
15681                 for ac_hdr in mach/cthreads.h cthreads.h
15682 do
15683 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15684 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15685 echo "configure:15686: checking for $ac_hdr" >&5
15686 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15687   echo $ac_n "(cached) $ac_c" 1>&6
15688 else
15689   cat > conftest.$ac_ext <<EOF
15690 #line 15691 "configure"
15691 #include "confdefs.h"
15692 #include <$ac_hdr>
15693 EOF
15694 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15695 { (eval echo configure:15696: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15696 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15697 if test -z "$ac_err"; then
15698   rm -rf conftest*
15699   eval "ac_cv_header_$ac_safe=yes"
15700 else
15701   echo "$ac_err" >&5
15702   echo "configure: failed program was:" >&5
15703   cat conftest.$ac_ext >&5
15704   rm -rf conftest*
15705   eval "ac_cv_header_$ac_safe=no"
15706 fi
15707 rm -f conftest*
15708 fi
15709 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15710   echo "$ac_t""yes" 1>&6
15711     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15712   cat >> confdefs.h <<EOF
15713 #define $ac_tr_hdr 1
15714 EOF
15715  
15716 else
15717   echo "$ac_t""no" 1>&6
15718 fi
15719 done
15720
15721         if test $ac_cv_header_mach_cthreads_h = yes ; then
15722                 ol_with_threads=found
15723
15724                                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
15725 echo "configure:15726: checking for cthread_fork" >&5
15726 if eval "test \"\${ac_cv_func_cthread_fork+set}\" = set"; then
15727   echo $ac_n "(cached) $ac_c" 1>&6
15728 else
15729   cat > conftest.$ac_ext <<EOF
15730 #line 15731 "configure"
15731 #include "confdefs.h"
15732 /* System header to define __stub macros and hopefully few prototypes,
15733     which can conflict with char cthread_fork(); below.  */
15734 #include <assert.h>
15735 /* Override any gcc2 internal prototype to avoid an error.  */
15736 /* We use char because int might match the return type of a gcc2
15737     builtin and then its argument prototype would still apply.  */
15738 char cthread_fork();
15739 char (*f)();
15740
15741 int main() {
15742
15743 /* The GNU C library defines this for functions which it implements
15744     to always fail with ENOSYS.  Some functions are actually named
15745     something starting with __ and the normal name is an alias.  */
15746 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
15747 choke me
15748 #else
15749 f = cthread_fork;
15750 #endif
15751
15752 ; return 0; }
15753 EOF
15754 if { (eval echo configure:15755: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15755   rm -rf conftest*
15756   eval "ac_cv_func_cthread_fork=yes"
15757 else
15758   echo "configure: failed program was:" >&5
15759   cat conftest.$ac_ext >&5
15760   rm -rf conftest*
15761   eval "ac_cv_func_cthread_fork=no"
15762 fi
15763 rm -f conftest*
15764 fi
15765
15766 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
15767   echo "$ac_t""yes" 1>&6
15768   ol_link_threads=yes
15769 else
15770   echo "$ac_t""no" 1>&6
15771 fi
15772
15773
15774                 if test $ol_link_threads = no ; then
15775                                                                         echo $ac_n "checking for cthread_fork with -all_load""... $ac_c" 1>&6
15776 echo "configure:15777: checking for cthread_fork with -all_load" >&5
15777 if eval "test \"\${ol_cv_cthread_all_load+set}\" = set"; then
15778   echo $ac_n "(cached) $ac_c" 1>&6
15779 else
15780   
15781                                                                 save_LIBS="$LIBS"
15782                                 LIBS="-all_load $LIBS"
15783                                 cat > conftest.$ac_ext <<EOF
15784 #line 15785 "configure"
15785 #include "confdefs.h"
15786 #include <mach/cthreads.h>
15787 int main() {
15788
15789                                         cthread_fork((void *)0, (void *)0);
15790                                         
15791 ; return 0; }
15792 EOF
15793 if { (eval echo configure:15794: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15794   rm -rf conftest*
15795   ol_cv_cthread_all_load=yes
15796 else
15797   echo "configure: failed program was:" >&5
15798   cat conftest.$ac_ext >&5
15799   rm -rf conftest*
15800   ol_cv_cthread_all_load=no
15801 fi
15802 rm -f conftest*
15803                                                                 LIBS="$save_LIBS"
15804                         
15805 fi
15806
15807 echo "$ac_t""$ol_cv_cthread_all_load" 1>&6
15808
15809                         if test $ol_cv_cthread_all_load = yes ; then
15810                                 LTHREAD_LIBS="$LTHREAD_LIBS -all_load"
15811                                 ol_link_threads=mach
15812                                 ol_with_threads=found
15813                         fi
15814                 fi
15815
15816         elif test $ac_cv_header_cthreads_h = yes ; then
15817                                 
15818                 ol_with_threads=found
15819  
15820                                 save_LIBS="$LIBS"
15821                 LIBS="$LIBS -lthreads"
15822                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
15823 echo "configure:15824: checking for cthread_fork" >&5
15824 if eval "test \"\${ac_cv_func_cthread_fork+set}\" = set"; then
15825   echo $ac_n "(cached) $ac_c" 1>&6
15826 else
15827   cat > conftest.$ac_ext <<EOF
15828 #line 15829 "configure"
15829 #include "confdefs.h"
15830 /* System header to define __stub macros and hopefully few prototypes,
15831     which can conflict with char cthread_fork(); below.  */
15832 #include <assert.h>
15833 /* Override any gcc2 internal prototype to avoid an error.  */
15834 /* We use char because int might match the return type of a gcc2
15835     builtin and then its argument prototype would still apply.  */
15836 char cthread_fork();
15837 char (*f)();
15838
15839 int main() {
15840
15841 /* The GNU C library defines this for functions which it implements
15842     to always fail with ENOSYS.  Some functions are actually named
15843     something starting with __ and the normal name is an alias.  */
15844 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
15845 choke me
15846 #else
15847 f = cthread_fork;
15848 #endif
15849
15850 ; return 0; }
15851 EOF
15852 if { (eval echo configure:15853: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15853   rm -rf conftest*
15854   eval "ac_cv_func_cthread_fork=yes"
15855 else
15856   echo "configure: failed program was:" >&5
15857   cat conftest.$ac_ext >&5
15858   rm -rf conftest*
15859   eval "ac_cv_func_cthread_fork=no"
15860 fi
15861 rm -f conftest*
15862 fi
15863
15864 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
15865   echo "$ac_t""yes" 1>&6
15866   ol_link_threads=yes
15867 else
15868   echo "$ac_t""no" 1>&6
15869 fi
15870
15871                 LIBS="$save_LIBS"
15872
15873                 if test $ol_link_threads = yes ; then
15874                         LTHREAD_LIBS="-lthreads"
15875                         ol_link_threads=mach
15876                         ol_with_threads=found
15877                 else
15878                         { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
15879                 fi
15880
15881         elif test $ol_with_threads = mach ; then
15882                 { echo "configure: error: could not locate Mach CThreads" 1>&2; exit 1; }
15883         fi
15884
15885         if test $ol_link_threads = mach ; then
15886                 cat >> confdefs.h <<\EOF
15887 #define HAVE_MACH_CTHREADS 1
15888 EOF
15889
15890         elif test $ol_with_threads = found ; then
15891                 { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
15892         fi
15893 fi
15894
15895 if test $ol_with_threads = auto -o $ol_with_threads = yes \
15896         -o $ol_with_threads = pth ; then
15897
15898         for ac_hdr in pth.h
15899 do
15900 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15901 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15902 echo "configure:15903: checking for $ac_hdr" >&5
15903 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15904   echo $ac_n "(cached) $ac_c" 1>&6
15905 else
15906   cat > conftest.$ac_ext <<EOF
15907 #line 15908 "configure"
15908 #include "confdefs.h"
15909 #include <$ac_hdr>
15910 EOF
15911 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15912 { (eval echo configure:15913: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15913 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15914 if test -z "$ac_err"; then
15915   rm -rf conftest*
15916   eval "ac_cv_header_$ac_safe=yes"
15917 else
15918   echo "$ac_err" >&5
15919   echo "configure: failed program was:" >&5
15920   cat conftest.$ac_ext >&5
15921   rm -rf conftest*
15922   eval "ac_cv_header_$ac_safe=no"
15923 fi
15924 rm -f conftest*
15925 fi
15926 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15927   echo "$ac_t""yes" 1>&6
15928     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15929   cat >> confdefs.h <<EOF
15930 #define $ac_tr_hdr 1
15931 EOF
15932  
15933 else
15934   echo "$ac_t""no" 1>&6
15935 fi
15936 done
15937
15938
15939         if test $ac_cv_header_pth_h = yes ; then
15940                 echo $ac_n "checking for pth_version in -lpth""... $ac_c" 1>&6
15941 echo "configure:15942: checking for pth_version in -lpth" >&5
15942 ac_lib_var=`echo pth'_'pth_version | sed 'y%./+-:%__p__%'`
15943 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
15944   echo $ac_n "(cached) $ac_c" 1>&6
15945 else
15946   ac_save_LIBS="$LIBS"
15947 LIBS="-lpth  $LIBS"
15948 cat > conftest.$ac_ext <<EOF
15949 #line 15950 "configure"
15950 #include "confdefs.h"
15951 /* Override any gcc2 internal prototype to avoid an error.  */
15952 /* We use char because int might match the return type of a gcc2
15953     builtin and then its argument prototype would still apply.  */
15954 char pth_version();
15955
15956 int main() {
15957 pth_version()
15958 ; return 0; }
15959 EOF
15960 if { (eval echo configure:15961: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15961   rm -rf conftest*
15962   eval "ac_cv_lib_$ac_lib_var=yes"
15963 else
15964   echo "configure: failed program was:" >&5
15965   cat conftest.$ac_ext >&5
15966   rm -rf conftest*
15967   eval "ac_cv_lib_$ac_lib_var=no"
15968 fi
15969 rm -f conftest*
15970 LIBS="$ac_save_LIBS"
15971
15972 fi
15973 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
15974   echo "$ac_t""yes" 1>&6
15975   have_pth=yes
15976 else
15977   echo "$ac_t""no" 1>&6
15978 have_pth=no
15979 fi
15980
15981
15982                 if test $have_pth = yes ; then
15983                         cat >> confdefs.h <<\EOF
15984 #define HAVE_GNU_PTH 1
15985 EOF
15986
15987                         LTHREAD_LIBS="$LTHREAD_LIBS -lpth"
15988                         ol_link_threads=pth
15989                         ol_with_threads=found
15990
15991                         if test $ol_with_yielding_select = auto ; then
15992                                 ol_with_yielding_select=yes
15993                         fi
15994                 fi
15995         fi
15996 fi
15997
15998 if test $ol_with_threads = auto -o $ol_with_threads = yes \
15999         -o $ol_with_threads = lwp ; then
16000
16001                 for ac_hdr in thread.h synch.h
16002 do
16003 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16004 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16005 echo "configure:16006: checking for $ac_hdr" >&5
16006 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16007   echo $ac_n "(cached) $ac_c" 1>&6
16008 else
16009   cat > conftest.$ac_ext <<EOF
16010 #line 16011 "configure"
16011 #include "confdefs.h"
16012 #include <$ac_hdr>
16013 EOF
16014 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16015 { (eval echo configure:16016: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16016 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16017 if test -z "$ac_err"; then
16018   rm -rf conftest*
16019   eval "ac_cv_header_$ac_safe=yes"
16020 else
16021   echo "$ac_err" >&5
16022   echo "configure: failed program was:" >&5
16023   cat conftest.$ac_ext >&5
16024   rm -rf conftest*
16025   eval "ac_cv_header_$ac_safe=no"
16026 fi
16027 rm -f conftest*
16028 fi
16029 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16030   echo "$ac_t""yes" 1>&6
16031     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16032   cat >> confdefs.h <<EOF
16033 #define $ac_tr_hdr 1
16034 EOF
16035  
16036 else
16037   echo "$ac_t""no" 1>&6
16038 fi
16039 done
16040
16041         if test $ac_cv_header_thread_h = yes -a $ac_cv_header_synch_h = yes ; then
16042                 echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6
16043 echo "configure:16044: checking for thr_create in -lthread" >&5
16044 ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-:%__p__%'`
16045 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
16046   echo $ac_n "(cached) $ac_c" 1>&6
16047 else
16048   ac_save_LIBS="$LIBS"
16049 LIBS="-lthread  $LIBS"
16050 cat > conftest.$ac_ext <<EOF
16051 #line 16052 "configure"
16052 #include "confdefs.h"
16053 /* Override any gcc2 internal prototype to avoid an error.  */
16054 /* We use char because int might match the return type of a gcc2
16055     builtin and then its argument prototype would still apply.  */
16056 char thr_create();
16057
16058 int main() {
16059 thr_create()
16060 ; return 0; }
16061 EOF
16062 if { (eval echo configure:16063: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16063   rm -rf conftest*
16064   eval "ac_cv_lib_$ac_lib_var=yes"
16065 else
16066   echo "configure: failed program was:" >&5
16067   cat conftest.$ac_ext >&5
16068   rm -rf conftest*
16069   eval "ac_cv_lib_$ac_lib_var=no"
16070 fi
16071 rm -f conftest*
16072 LIBS="$ac_save_LIBS"
16073
16074 fi
16075 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
16076   echo "$ac_t""yes" 1>&6
16077   have_thr=yes
16078 else
16079   echo "$ac_t""no" 1>&6
16080 have_thr=no
16081 fi
16082
16083
16084                 if test $have_thr = yes ; then
16085                         cat >> confdefs.h <<\EOF
16086 #define HAVE_THR 1
16087 EOF
16088
16089                         LTHREAD_LIBS="$LTHREAD_LIBS -lthread"
16090                         ol_link_threads=thr
16091
16092                         if test $ol_with_yielding_select = auto ; then
16093                                 ol_with_yielding_select=yes
16094                         fi
16095
16096                                                 for ac_func in \
16097                                 thr_setconcurrency \
16098                                 thr_getconcurrency \
16099                         
16100 do
16101 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
16102 echo "configure:16103: checking for $ac_func" >&5
16103 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
16104   echo $ac_n "(cached) $ac_c" 1>&6
16105 else
16106   cat > conftest.$ac_ext <<EOF
16107 #line 16108 "configure"
16108 #include "confdefs.h"
16109 /* System header to define __stub macros and hopefully few prototypes,
16110     which can conflict with char $ac_func(); below.  */
16111 #include <assert.h>
16112 /* Override any gcc2 internal prototype to avoid an error.  */
16113 /* We use char because int might match the return type of a gcc2
16114     builtin and then its argument prototype would still apply.  */
16115 char $ac_func();
16116 char (*f)();
16117
16118 int main() {
16119
16120 /* The GNU C library defines this for functions which it implements
16121     to always fail with ENOSYS.  Some functions are actually named
16122     something starting with __ and the normal name is an alias.  */
16123 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16124 choke me
16125 #else
16126 f = $ac_func;
16127 #endif
16128
16129 ; return 0; }
16130 EOF
16131 if { (eval echo configure:16132: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16132   rm -rf conftest*
16133   eval "ac_cv_func_$ac_func=yes"
16134 else
16135   echo "configure: failed program was:" >&5
16136   cat conftest.$ac_ext >&5
16137   rm -rf conftest*
16138   eval "ac_cv_func_$ac_func=no"
16139 fi
16140 rm -f conftest*
16141 fi
16142
16143 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
16144   echo "$ac_t""yes" 1>&6
16145     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
16146   cat >> confdefs.h <<EOF
16147 #define $ac_tr_func 1
16148 EOF
16149  
16150 else
16151   echo "$ac_t""no" 1>&6
16152 fi
16153 done
16154
16155                 fi
16156         fi
16157
16158                 for ac_hdr in lwp/lwp.h
16159 do
16160 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16161 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16162 echo "configure:16163: checking for $ac_hdr" >&5
16163 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16164   echo $ac_n "(cached) $ac_c" 1>&6
16165 else
16166   cat > conftest.$ac_ext <<EOF
16167 #line 16168 "configure"
16168 #include "confdefs.h"
16169 #include <$ac_hdr>
16170 EOF
16171 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16172 { (eval echo configure:16173: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16173 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16174 if test -z "$ac_err"; then
16175   rm -rf conftest*
16176   eval "ac_cv_header_$ac_safe=yes"
16177 else
16178   echo "$ac_err" >&5
16179   echo "configure: failed program was:" >&5
16180   cat conftest.$ac_ext >&5
16181   rm -rf conftest*
16182   eval "ac_cv_header_$ac_safe=no"
16183 fi
16184 rm -f conftest*
16185 fi
16186 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16187   echo "$ac_t""yes" 1>&6
16188     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16189   cat >> confdefs.h <<EOF
16190 #define $ac_tr_hdr 1
16191 EOF
16192  
16193 else
16194   echo "$ac_t""no" 1>&6
16195 fi
16196 done
16197
16198         if test $ac_cv_header_lwp_lwp_h = yes ; then
16199                 echo $ac_n "checking for lwp_create in -llwp""... $ac_c" 1>&6
16200 echo "configure:16201: checking for lwp_create in -llwp" >&5
16201 ac_lib_var=`echo lwp'_'lwp_create | sed 'y%./+-:%__p__%'`
16202 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
16203   echo $ac_n "(cached) $ac_c" 1>&6
16204 else
16205   ac_save_LIBS="$LIBS"
16206 LIBS="-llwp  $LIBS"
16207 cat > conftest.$ac_ext <<EOF
16208 #line 16209 "configure"
16209 #include "confdefs.h"
16210 /* Override any gcc2 internal prototype to avoid an error.  */
16211 /* We use char because int might match the return type of a gcc2
16212     builtin and then its argument prototype would still apply.  */
16213 char lwp_create();
16214
16215 int main() {
16216 lwp_create()
16217 ; return 0; }
16218 EOF
16219 if { (eval echo configure:16220: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16220   rm -rf conftest*
16221   eval "ac_cv_lib_$ac_lib_var=yes"
16222 else
16223   echo "configure: failed program was:" >&5
16224   cat conftest.$ac_ext >&5
16225   rm -rf conftest*
16226   eval "ac_cv_lib_$ac_lib_var=no"
16227 fi
16228 rm -f conftest*
16229 LIBS="$ac_save_LIBS"
16230
16231 fi
16232 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
16233   echo "$ac_t""yes" 1>&6
16234   have_lwp=yes
16235 else
16236   echo "$ac_t""no" 1>&6
16237 have_lwp=no
16238 fi
16239
16240
16241                 if test $have_lwp = yes ; then
16242                         cat >> confdefs.h <<\EOF
16243 #define HAVE_LWP 1
16244 EOF
16245
16246                         LTHREAD_LIBS="$LTHREAD_LIBS -llwp"
16247                         ol_link_threads=lwp
16248
16249                         if test $ol_with_yielding_select = auto ; then
16250                                 ol_with_yielding_select=no
16251                         fi
16252                 fi
16253         fi
16254 fi
16255
16256 if test $ol_with_yielding_select = yes ; then
16257         cat >> confdefs.h <<\EOF
16258 #define HAVE_YIELDING_SELECT 1
16259 EOF
16260
16261 fi
16262
16263 if test $ol_with_threads = manual ; then
16264                 ol_link_threads=yes
16265
16266         echo "configure: warning: thread defines and link options must be set manually" 1>&2
16267
16268         for ac_hdr in pthread.h sched.h
16269 do
16270 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16271 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16272 echo "configure:16273: checking for $ac_hdr" >&5
16273 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16274   echo $ac_n "(cached) $ac_c" 1>&6
16275 else
16276   cat > conftest.$ac_ext <<EOF
16277 #line 16278 "configure"
16278 #include "confdefs.h"
16279 #include <$ac_hdr>
16280 EOF
16281 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16282 { (eval echo configure:16283: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16283 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16284 if test -z "$ac_err"; then
16285   rm -rf conftest*
16286   eval "ac_cv_header_$ac_safe=yes"
16287 else
16288   echo "$ac_err" >&5
16289   echo "configure: failed program was:" >&5
16290   cat conftest.$ac_ext >&5
16291   rm -rf conftest*
16292   eval "ac_cv_header_$ac_safe=no"
16293 fi
16294 rm -f conftest*
16295 fi
16296 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16297   echo "$ac_t""yes" 1>&6
16298     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16299   cat >> confdefs.h <<EOF
16300 #define $ac_tr_hdr 1
16301 EOF
16302  
16303 else
16304   echo "$ac_t""no" 1>&6
16305 fi
16306 done
16307
16308         for ac_func in sched_yield pthread_yield
16309 do
16310 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
16311 echo "configure:16312: checking for $ac_func" >&5
16312 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
16313   echo $ac_n "(cached) $ac_c" 1>&6
16314 else
16315   cat > conftest.$ac_ext <<EOF
16316 #line 16317 "configure"
16317 #include "confdefs.h"
16318 /* System header to define __stub macros and hopefully few prototypes,
16319     which can conflict with char $ac_func(); below.  */
16320 #include <assert.h>
16321 /* Override any gcc2 internal prototype to avoid an error.  */
16322 /* We use char because int might match the return type of a gcc2
16323     builtin and then its argument prototype would still apply.  */
16324 char $ac_func();
16325 char (*f)();
16326
16327 int main() {
16328
16329 /* The GNU C library defines this for functions which it implements
16330     to always fail with ENOSYS.  Some functions are actually named
16331     something starting with __ and the normal name is an alias.  */
16332 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16333 choke me
16334 #else
16335 f = $ac_func;
16336 #endif
16337
16338 ; return 0; }
16339 EOF
16340 if { (eval echo configure:16341: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16341   rm -rf conftest*
16342   eval "ac_cv_func_$ac_func=yes"
16343 else
16344   echo "configure: failed program was:" >&5
16345   cat conftest.$ac_ext >&5
16346   rm -rf conftest*
16347   eval "ac_cv_func_$ac_func=no"
16348 fi
16349 rm -f conftest*
16350 fi
16351
16352 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
16353   echo "$ac_t""yes" 1>&6
16354     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
16355   cat >> confdefs.h <<EOF
16356 #define $ac_tr_func 1
16357 EOF
16358  
16359 else
16360   echo "$ac_t""no" 1>&6
16361 fi
16362 done
16363
16364         
16365         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
16366 echo "configure:16367: checking for LinuxThreads pthread.h" >&5
16367 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
16368   echo $ac_n "(cached) $ac_c" 1>&6
16369 else
16370   cat > conftest.$ac_ext <<EOF
16371 #line 16372 "configure"
16372 #include "confdefs.h"
16373 #include <pthread.h>
16374 EOF
16375 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16376   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
16377   rm -rf conftest*
16378   ol_cv_header_linux_threads=yes
16379 else
16380   rm -rf conftest*
16381   ol_cv_header_linux_threads=no
16382 fi
16383 rm -f conftest*
16384
16385                 
16386 fi
16387
16388 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
16389         if test $ol_cv_header_linux_threads = yes; then
16390                 cat >> confdefs.h <<\EOF
16391 #define HAVE_LINUX_THREADS 1
16392 EOF
16393
16394         fi
16395
16396
16397         for ac_hdr in mach/cthreads.h
16398 do
16399 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16400 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16401 echo "configure:16402: checking for $ac_hdr" >&5
16402 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16403   echo $ac_n "(cached) $ac_c" 1>&6
16404 else
16405   cat > conftest.$ac_ext <<EOF
16406 #line 16407 "configure"
16407 #include "confdefs.h"
16408 #include <$ac_hdr>
16409 EOF
16410 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16411 { (eval echo configure:16412: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16412 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16413 if test -z "$ac_err"; then
16414   rm -rf conftest*
16415   eval "ac_cv_header_$ac_safe=yes"
16416 else
16417   echo "$ac_err" >&5
16418   echo "configure: failed program was:" >&5
16419   cat conftest.$ac_ext >&5
16420   rm -rf conftest*
16421   eval "ac_cv_header_$ac_safe=no"
16422 fi
16423 rm -f conftest*
16424 fi
16425 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16426   echo "$ac_t""yes" 1>&6
16427     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16428   cat >> confdefs.h <<EOF
16429 #define $ac_tr_hdr 1
16430 EOF
16431  
16432 else
16433   echo "$ac_t""no" 1>&6
16434 fi
16435 done
16436
16437         for ac_hdr in lwp/lwp.h
16438 do
16439 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16440 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16441 echo "configure:16442: checking for $ac_hdr" >&5
16442 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16443   echo $ac_n "(cached) $ac_c" 1>&6
16444 else
16445   cat > conftest.$ac_ext <<EOF
16446 #line 16447 "configure"
16447 #include "confdefs.h"
16448 #include <$ac_hdr>
16449 EOF
16450 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16451 { (eval echo configure:16452: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16452 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16453 if test -z "$ac_err"; then
16454   rm -rf conftest*
16455   eval "ac_cv_header_$ac_safe=yes"
16456 else
16457   echo "$ac_err" >&5
16458   echo "configure: failed program was:" >&5
16459   cat conftest.$ac_ext >&5
16460   rm -rf conftest*
16461   eval "ac_cv_header_$ac_safe=no"
16462 fi
16463 rm -f conftest*
16464 fi
16465 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16466   echo "$ac_t""yes" 1>&6
16467     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16468   cat >> confdefs.h <<EOF
16469 #define $ac_tr_hdr 1
16470 EOF
16471  
16472 else
16473   echo "$ac_t""no" 1>&6
16474 fi
16475 done
16476
16477         for ac_hdr in thread.h synch.h
16478 do
16479 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16480 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16481 echo "configure:16482: checking for $ac_hdr" >&5
16482 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16483   echo $ac_n "(cached) $ac_c" 1>&6
16484 else
16485   cat > conftest.$ac_ext <<EOF
16486 #line 16487 "configure"
16487 #include "confdefs.h"
16488 #include <$ac_hdr>
16489 EOF
16490 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16491 { (eval echo configure:16492: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16492 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16493 if test -z "$ac_err"; then
16494   rm -rf conftest*
16495   eval "ac_cv_header_$ac_safe=yes"
16496 else
16497   echo "$ac_err" >&5
16498   echo "configure: failed program was:" >&5
16499   cat conftest.$ac_ext >&5
16500   rm -rf conftest*
16501   eval "ac_cv_header_$ac_safe=no"
16502 fi
16503 rm -f conftest*
16504 fi
16505 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16506   echo "$ac_t""yes" 1>&6
16507     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16508   cat >> confdefs.h <<EOF
16509 #define $ac_tr_hdr 1
16510 EOF
16511  
16512 else
16513   echo "$ac_t""no" 1>&6
16514 fi
16515 done
16516
16517 fi
16518
16519 if test $ol_link_threads != no -a $ol_link_threads != nt ; then  
16520                         cat >> confdefs.h <<\EOF
16521 #define REENTRANT 1
16522 EOF
16523
16524         cat >> confdefs.h <<\EOF
16525 #define _REENTRANT 1
16526 EOF
16527
16528         cat >> confdefs.h <<\EOF
16529 #define THREAD_SAFE 1
16530 EOF
16531
16532         cat >> confdefs.h <<\EOF
16533 #define _THREAD_SAFE 1
16534 EOF
16535
16536         cat >> confdefs.h <<\EOF
16537 #define THREADSAFE 1
16538 EOF
16539
16540         cat >> confdefs.h <<\EOF
16541 #define _THREADSAFE 1
16542 EOF
16543
16544         cat >> confdefs.h <<\EOF
16545 #define _SGI_MP_SOURCE 1
16546 EOF
16547
16548
16549                         echo $ac_n "checking for thread specific errno""... $ac_c" 1>&6
16550 echo "configure:16551: checking for thread specific errno" >&5
16551 if eval "test \"\${ol_cv_errno_thread_specific+set}\" = set"; then
16552   echo $ac_n "(cached) $ac_c" 1>&6
16553 else
16554   
16555                 cat > conftest.$ac_ext <<EOF
16556 #line 16557 "configure"
16557 #include "confdefs.h"
16558 #include <errno.h>
16559 int main() {
16560 errno = 0;
16561 ; return 0; }
16562 EOF
16563 if { (eval echo configure:16564: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16564   rm -rf conftest*
16565   ol_cv_errno_thread_specific=yes
16566 else
16567   echo "configure: failed program was:" >&5
16568   cat conftest.$ac_ext >&5
16569   rm -rf conftest*
16570   ol_cv_errno_thread_specific=no
16571 fi
16572 rm -f conftest*
16573         
16574 fi
16575
16576 echo "$ac_t""$ol_cv_errno_thread_specific" 1>&6
16577
16578                         echo $ac_n "checking for thread specific h_errno""... $ac_c" 1>&6
16579 echo "configure:16580: checking for thread specific h_errno" >&5
16580 if eval "test \"\${ol_cv_h_errno_thread_specific+set}\" = set"; then
16581   echo $ac_n "(cached) $ac_c" 1>&6
16582 else
16583   
16584                 cat > conftest.$ac_ext <<EOF
16585 #line 16586 "configure"
16586 #include "confdefs.h"
16587 #include <netdb.h>
16588 int main() {
16589 h_errno = 0;
16590 ; return 0; }
16591 EOF
16592 if { (eval echo configure:16593: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16593   rm -rf conftest*
16594   ol_cv_h_errno_thread_specific=yes
16595 else
16596   echo "configure: failed program was:" >&5
16597   cat conftest.$ac_ext >&5
16598   rm -rf conftest*
16599   ol_cv_h_errno_thread_specific=no
16600 fi
16601 rm -f conftest*
16602         
16603 fi
16604
16605 echo "$ac_t""$ol_cv_h_errno_thread_specific" 1>&6
16606
16607         if test $ol_cv_errno_thread_specific != yes \
16608                 -o $ol_cv_h_errno_thread_specific != yes ; then
16609                 LIBS="$LTHREAD_LIBS $LIBS"
16610                 LTHREAD_LIBS=""
16611         fi
16612
16613 fi  
16614
16615 if test $ol_link_threads = no ; then
16616         if test $ol_with_threads = yes ; then
16617                 { echo "configure: error: no suitable thread support" 1>&2; exit 1; }
16618         fi
16619
16620         if test $ol_with_threads = auto ; then
16621                 echo "configure: warning: no suitable thread support, disabling threads" 1>&2
16622                 ol_with_threads=no
16623         fi
16624
16625         cat >> confdefs.h <<\EOF
16626 #define NO_THREADS 1
16627 EOF
16628
16629         LTHREAD_LIBS=""
16630 fi
16631
16632 if test $ol_link_threads != no ; then
16633         cat >> confdefs.h <<\EOF
16634 #define LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE 1
16635 EOF
16636
16637 fi
16638
16639 for ac_func in \
16640         ctime_r                 \
16641         gethostbyname_r gethostbyaddr_r \
16642
16643 do
16644 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
16645 echo "configure:16646: checking for $ac_func" >&5
16646 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
16647   echo $ac_n "(cached) $ac_c" 1>&6
16648 else
16649   cat > conftest.$ac_ext <<EOF
16650 #line 16651 "configure"
16651 #include "confdefs.h"
16652 /* System header to define __stub macros and hopefully few prototypes,
16653     which can conflict with char $ac_func(); below.  */
16654 #include <assert.h>
16655 /* Override any gcc2 internal prototype to avoid an error.  */
16656 /* We use char because int might match the return type of a gcc2
16657     builtin and then its argument prototype would still apply.  */
16658 char $ac_func();
16659 char (*f)();
16660
16661 int main() {
16662
16663 /* The GNU C library defines this for functions which it implements
16664     to always fail with ENOSYS.  Some functions are actually named
16665     something starting with __ and the normal name is an alias.  */
16666 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16667 choke me
16668 #else
16669 f = $ac_func;
16670 #endif
16671
16672 ; return 0; }
16673 EOF
16674 if { (eval echo configure:16675: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16675   rm -rf conftest*
16676   eval "ac_cv_func_$ac_func=yes"
16677 else
16678   echo "configure: failed program was:" >&5
16679   cat conftest.$ac_ext >&5
16680   rm -rf conftest*
16681   eval "ac_cv_func_$ac_func=no"
16682 fi
16683 rm -f conftest*
16684 fi
16685
16686 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
16687   echo "$ac_t""yes" 1>&6
16688     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
16689   cat >> confdefs.h <<EOF
16690 #define $ac_tr_func 1
16691 EOF
16692  
16693 else
16694   echo "$ac_t""no" 1>&6
16695 fi
16696 done
16697
16698
16699 if test "$ac_cv_func_ctime_r" = no ; then
16700         ol_cv_func_ctime_r_nargs=0
16701 else
16702         echo $ac_n "checking number of arguments of ctime_r""... $ac_c" 1>&6
16703 echo "configure:16704: checking number of arguments of ctime_r" >&5
16704 if eval "test \"\${ol_cv_func_ctime_r_nargs+set}\" = set"; then
16705   echo $ac_n "(cached) $ac_c" 1>&6
16706 else
16707   cat > conftest.$ac_ext <<EOF
16708 #line 16709 "configure"
16709 #include "confdefs.h"
16710 #include <time.h>
16711 int main() {
16712 time_t ti; char *buffer; ctime_r(&ti,buffer,32);
16713 ; return 0; }
16714 EOF
16715 if { (eval echo configure:16716: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16716   rm -rf conftest*
16717   ol_cv_func_ctime_r_nargs3=yes
16718 else
16719   echo "configure: failed program was:" >&5
16720   cat conftest.$ac_ext >&5
16721   rm -rf conftest*
16722   ol_cv_func_ctime_r_nargs3=no
16723 fi
16724 rm -f conftest*
16725
16726         cat > conftest.$ac_ext <<EOF
16727 #line 16728 "configure"
16728 #include "confdefs.h"
16729 #include <time.h>
16730 int main() {
16731 time_t ti; char *buffer; ctime_r(&ti,buffer);
16732 ; return 0; }
16733 EOF
16734 if { (eval echo configure:16735: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16735   rm -rf conftest*
16736   ol_cv_func_ctime_r_nargs2=yes
16737 else
16738   echo "configure: failed program was:" >&5
16739   cat conftest.$ac_ext >&5
16740   rm -rf conftest*
16741   ol_cv_func_ctime_r_nargs2=no
16742 fi
16743 rm -f conftest*
16744
16745         if test $ol_cv_func_ctime_r_nargs3 = yes -a \
16746                 $ol_cv_func_ctime_r_nargs2 = no ; then
16747
16748                 ol_cv_func_ctime_r_nargs=3
16749
16750         elif test $ol_cv_func_ctime_r_nargs3 = no -a \
16751                 $ol_cv_func_ctime_r_nargs2 = yes ; then
16752
16753                 ol_cv_func_ctime_r_nargs=2
16754
16755         else
16756                 ol_cv_func_ctime_r_nargs=0
16757         fi
16758   
16759 fi
16760
16761 echo "$ac_t""$ol_cv_func_ctime_r_nargs" 1>&6
16762
16763   if test $ol_cv_func_ctime_r_nargs -gt 1 ; then
16764         cat >> confdefs.h <<EOF
16765 #define CTIME_R_NARGS $ol_cv_func_ctime_r_nargs
16766 EOF
16767
16768   fi
16769
16770 fi
16771
16772 if test "$ac_cv_func_gethostbyname_r" = yes ; then
16773         echo $ac_n "checking number of arguments of gethostbyname_r""... $ac_c" 1>&6
16774 echo "configure:16775: checking number of arguments of gethostbyname_r" >&5
16775 if eval "test \"\${ol_cv_func_gethostbyname_r_nargs+set}\" = set"; then
16776   echo $ac_n "(cached) $ac_c" 1>&6
16777 else
16778   cat > conftest.$ac_ext <<EOF
16779 #line 16780 "configure"
16780 #include "confdefs.h"
16781 #include <sys/types.h>
16782 #include <sys/socket.h>
16783 #include <netinet/in.h>
16784 #include <netdb.h>
16785 #define BUFSIZE (sizeof(struct hostent)+10)
16786 int main() {
16787 struct hostent hent; char buffer[BUFSIZE];
16788                 int bufsize=BUFSIZE;int h_errno;
16789                 (void)gethostbyname_r("segovia.cs.purdue.edu", &hent,
16790                         buffer, bufsize, &h_errno);
16791 ; return 0; }
16792 EOF
16793 if { (eval echo configure:16794: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16794   rm -rf conftest*
16795   ol_cv_func_gethostbyname_r_nargs5=yes
16796 else
16797   echo "configure: failed program was:" >&5
16798   cat conftest.$ac_ext >&5
16799   rm -rf conftest*
16800   ol_cv_func_gethostbyname_r_nargs5=no
16801 fi
16802 rm -f conftest*
16803
16804         cat > conftest.$ac_ext <<EOF
16805 #line 16806 "configure"
16806 #include "confdefs.h"
16807 #include <sys/types.h>
16808 #include <sys/socket.h>
16809 #include <netinet/in.h>
16810 #include <netdb.h>
16811 #define BUFSIZE (sizeof(struct hostent)+10)
16812 int main() {
16813 struct hostent hent;struct hostent *rhent;
16814                 char buffer[BUFSIZE];
16815                 int bufsize=BUFSIZE;int h_errno;
16816                 (void)gethostbyname_r("localhost", &hent, buffer, bufsize,
16817                         &rhent, &h_errno);
16818 ; return 0; }
16819 EOF
16820 if { (eval echo configure:16821: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16821   rm -rf conftest*
16822   ol_cv_func_gethostbyname_r_nargs6=yes
16823 else
16824   echo "configure: failed program was:" >&5
16825   cat conftest.$ac_ext >&5
16826   rm -rf conftest*
16827   ol_cv_func_gethostbyname_r_nargs6=no
16828 fi
16829 rm -f conftest*
16830
16831         if test $ol_cv_func_gethostbyname_r_nargs5 = yes -a \
16832                 $ol_cv_func_gethostbyname_r_nargs6 = no ; then
16833
16834                 ol_cv_func_gethostbyname_r_nargs=5
16835
16836         elif test $ol_cv_func_gethostbyname_r_nargs5 = no -a \
16837                 $ol_cv_func_gethostbyname_r_nargs6 = yes ; then
16838
16839                 ol_cv_func_gethostbyname_r_nargs=6
16840
16841         else
16842                 ol_cv_func_gethostbyname_r_nargs=0
16843         fi
16844   
16845 fi
16846
16847 echo "$ac_t""$ol_cv_func_gethostbyname_r_nargs" 1>&6
16848   if test $ol_cv_func_gethostbyname_r_nargs -gt 1 ; then
16849         cat >> confdefs.h <<EOF
16850 #define GETHOSTBYNAME_R_NARGS $ol_cv_func_gethostbyname_r_nargs
16851 EOF
16852
16853   fi
16854
16855 else
16856         ol_cv_func_gethostbyname_r_nargs=0
16857 fi
16858  
16859 if test "$ac_cv_func_gethostbyaddr_r" = yes ; then
16860         echo $ac_n "checking number of arguments of gethostbyaddr_r""... $ac_c" 1>&6
16861 echo "configure:16862: checking number of arguments of gethostbyaddr_r" >&5
16862 if eval "test \"\${ol_cv_func_gethostbyaddr_r_nargs+set}\" = set"; then
16863   echo $ac_n "(cached) $ac_c" 1>&6
16864 else
16865   cat > conftest.$ac_ext <<EOF
16866 #line 16867 "configure"
16867 #include "confdefs.h"
16868 #include <sys/types.h>
16869 #include <sys/socket.h>
16870 #include <netinet/in.h>
16871 #include <netdb.h>
16872 #define BUFSIZE (sizeof(struct hostent)+10)
16873 int main() {
16874 struct hostent hent; char buffer[BUFSIZE]; 
16875             struct in_addr add;
16876             size_t alen=sizeof(struct in_addr);
16877             int bufsize=BUFSIZE;int h_errno;
16878                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
16879                         alen, AF_INET, &hent, buffer, bufsize, &h_errno);
16880 ; return 0; }
16881 EOF
16882 if { (eval echo configure:16883: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16883   rm -rf conftest*
16884   ol_cv_func_gethostbyaddr_r_nargs7=yes
16885 else
16886   echo "configure: failed program was:" >&5
16887   cat conftest.$ac_ext >&5
16888   rm -rf conftest*
16889   ol_cv_func_gethostbyaddr_r_nargs7=no
16890 fi
16891 rm -f conftest*
16892
16893         cat > conftest.$ac_ext <<EOF
16894 #line 16895 "configure"
16895 #include "confdefs.h"
16896 #include <sys/types.h>
16897 #include <sys/socket.h>
16898 #include <netinet/in.h>
16899 #include <netdb.h>
16900 #define BUFSIZE (sizeof(struct hostent)+10)
16901 int main() {
16902 struct hostent hent;
16903                 struct hostent *rhent; char buffer[BUFSIZE]; 
16904                 struct in_addr add;
16905                 size_t alen=sizeof(struct in_addr);
16906                 int bufsize=BUFSIZE;int h_errno;
16907                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
16908                         alen, AF_INET, &hent, buffer, bufsize, 
16909                         &rhent, &h_errno);
16910 ; return 0; }
16911 EOF
16912 if { (eval echo configure:16913: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16913   rm -rf conftest*
16914   ol_cv_func_gethostbyaddr_r_nargs8=yes
16915 else
16916   echo "configure: failed program was:" >&5
16917   cat conftest.$ac_ext >&5
16918   rm -rf conftest*
16919   ol_cv_func_gethostbyaddr_r_nargs8=no
16920 fi
16921 rm -f conftest*
16922
16923         if test $ol_cv_func_gethostbyaddr_r_nargs7 = yes -a \
16924                 $ol_cv_func_gethostbyaddr_r_nargs8 = no ; then
16925
16926                 ol_cv_func_gethostbyaddr_r_nargs=7
16927
16928         elif test $ol_cv_func_gethostbyaddr_r_nargs7 = no -a \
16929                 $ol_cv_func_gethostbyaddr_r_nargs8 = yes ; then
16930
16931                 ol_cv_func_gethostbyaddr_r_nargs=8
16932
16933         else
16934                 ol_cv_func_gethostbyaddr_r_nargs=0
16935         fi
16936   
16937 fi
16938
16939 echo "$ac_t""$ol_cv_func_gethostbyaddr_r_nargs" 1>&6
16940   if test $ol_cv_func_gethostbyaddr_r_nargs -gt 1 ; then
16941     cat >> confdefs.h <<EOF
16942 #define GETHOSTBYADDR_R_NARGS $ol_cv_func_gethostbyaddr_r_nargs
16943 EOF
16944
16945   fi
16946
16947 else
16948         ol_cv_func_gethostbyaddr_r_nargs=0
16949 fi
16950
16951 ol_link_ldbm=no 
16952
16953 if test $ol_with_ldbm_api = auto \
16954         -o $ol_with_ldbm_api = berkeley \
16955         -o $ol_with_ldbm_api = bcompat ; then
16956
16957         if test $ol_with_ldbm_api = bcompat; then \
16958                 for ac_hdr in db_185.h db.h
16959 do
16960 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16961 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16962 echo "configure:16963: checking for $ac_hdr" >&5
16963 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16964   echo $ac_n "(cached) $ac_c" 1>&6
16965 else
16966   cat > conftest.$ac_ext <<EOF
16967 #line 16968 "configure"
16968 #include "confdefs.h"
16969 #include <$ac_hdr>
16970 EOF
16971 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16972 { (eval echo configure:16973: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16973 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16974 if test -z "$ac_err"; then
16975   rm -rf conftest*
16976   eval "ac_cv_header_$ac_safe=yes"
16977 else
16978   echo "$ac_err" >&5
16979   echo "configure: failed program was:" >&5
16980   cat conftest.$ac_ext >&5
16981   rm -rf conftest*
16982   eval "ac_cv_header_$ac_safe=no"
16983 fi
16984 rm -f conftest*
16985 fi
16986 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16987   echo "$ac_t""yes" 1>&6
16988     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16989   cat >> confdefs.h <<EOF
16990 #define $ac_tr_hdr 1
16991 EOF
16992  
16993 else
16994   echo "$ac_t""no" 1>&6
16995 fi
16996 done
16997
16998 if test $ac_cv_header_db_185_h = yes -o $ac_cv_header_db_h = yes; then
16999         echo $ac_n "checking if Berkeley DB header compatibility""... $ac_c" 1>&6
17000 echo "configure:17001: checking if Berkeley DB header compatibility" >&5
17001 if eval "test \"\${ol_cv_header_db1+set}\" = set"; then
17002   echo $ac_n "(cached) $ac_c" 1>&6
17003 else
17004   
17005                 cat > conftest.$ac_ext <<EOF
17006 #line 17007 "configure"
17007 #include "confdefs.h"
17008
17009 #if HAVE_DB_185_H
17010 #       include <db_185.h>
17011 #else
17012 #       include <db.h>
17013 #endif
17014
17015  /* this check could be improved */
17016 #ifndef DB_VERSION_MAJOR
17017 #       define DB_VERSION_MAJOR 1
17018 #endif
17019
17020 #if DB_VERSION_MAJOR == 1 
17021         __db_version_1
17022 #endif
17023
17024 EOF
17025 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
17026   egrep "__db_version_1" >/dev/null 2>&1; then
17027   rm -rf conftest*
17028   ol_cv_header_db1=yes
17029 else
17030   rm -rf conftest*
17031   ol_cv_header_db1=no
17032 fi
17033 rm -f conftest*
17034
17035 fi
17036
17037 echo "$ac_t""$ol_cv_header_db1" 1>&6
17038
17039         if test $ol_cv_header_db1 = yes ; then
17040                 ol_cv_lib_db=no
17041 if test $ol_cv_lib_db = no ; then
17042         echo $ac_n "checking for Berkeley DB link (default)""... $ac_c" 1>&6
17043 echo "configure:17044: checking for Berkeley DB link (default)" >&5
17044 if eval "test \"\${ol_cv_db_none+set}\" = set"; then
17045   echo $ac_n "(cached) $ac_c" 1>&6
17046 else
17047   
17048         ol_DB_LIB=
17049         ol_LIBS=$LIBS
17050         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17051
17052         cat > conftest.$ac_ext <<EOF
17053 #line 17054 "configure"
17054 #include "confdefs.h"
17055
17056 #ifdef HAVE_DB_185_H
17057 # include <db_185.h>
17058 #else
17059 # include <db.h>
17060 #endif
17061
17062 #ifndef DB_VERSION_MAJOR
17063 # define DB_VERSION_MAJOR 1
17064 #endif
17065
17066 #ifndef NULL
17067 #define NULL ((void*)0)
17068 #endif
17069
17070 int main() {
17071
17072 #if DB_VERSION_MAJOR > 1
17073         {
17074                 char *version;
17075                 int major, minor, patch;
17076
17077                 version = db_version( &major, &minor, &patch );
17078
17079                 if( major != DB_VERSION_MAJOR ||
17080                         minor < DB_VERSION_MINOR )
17081                 {
17082                         printf("Berkeley DB version mismatch\n"
17083                                 "\theader: %s\n\tlibrary: %s\n",
17084                                 DB_VERSION_STRING, version);
17085                         return 1;
17086                 }
17087         }
17088 #endif
17089
17090 #if DB_VERSION_MAJOR > 2
17091         db_env_create( NULL, 0 );
17092 #elif DB_VERSION_MAJOR > 1
17093         db_appexit( NULL );
17094 #else
17095         (void) dbopen( NULL, 0, 0, 0, NULL);
17096 #endif
17097
17098 ; return 0; }
17099 EOF
17100 if { (eval echo configure:17101: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17101   rm -rf conftest*
17102   ol_cv_db_none=yes
17103 else
17104   echo "configure: failed program was:" >&5
17105   cat conftest.$ac_ext >&5
17106   rm -rf conftest*
17107   ol_cv_db_none=no
17108 fi
17109 rm -f conftest*
17110
17111         LIBS="$ol_LIBS"
17112
17113 fi
17114
17115 echo "$ac_t""$ol_cv_db_none" 1>&6
17116
17117         if test $ol_cv_db_none = yes ; then
17118                 ol_cv_lib_db=yes
17119         fi
17120 fi
17121
17122 if test $ol_cv_lib_db = no ; then
17123         echo $ac_n "checking for Berkeley DB link (-ldb43)""... $ac_c" 1>&6
17124 echo "configure:17125: checking for Berkeley DB link (-ldb43)" >&5
17125 if eval "test \"\${ol_cv_db_db43+set}\" = set"; then
17126   echo $ac_n "(cached) $ac_c" 1>&6
17127 else
17128   
17129         ol_DB_LIB=-ldb43
17130         ol_LIBS=$LIBS
17131         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17132
17133         cat > conftest.$ac_ext <<EOF
17134 #line 17135 "configure"
17135 #include "confdefs.h"
17136
17137 #ifdef HAVE_DB_185_H
17138 # include <db_185.h>
17139 #else
17140 # include <db.h>
17141 #endif
17142
17143 #ifndef DB_VERSION_MAJOR
17144 # define DB_VERSION_MAJOR 1
17145 #endif
17146
17147 #ifndef NULL
17148 #define NULL ((void*)0)
17149 #endif
17150
17151 int main() {
17152
17153 #if DB_VERSION_MAJOR > 1
17154         {
17155                 char *version;
17156                 int major, minor, patch;
17157
17158                 version = db_version( &major, &minor, &patch );
17159
17160                 if( major != DB_VERSION_MAJOR ||
17161                         minor < DB_VERSION_MINOR )
17162                 {
17163                         printf("Berkeley DB version mismatch\n"
17164                                 "\theader: %s\n\tlibrary: %s\n",
17165                                 DB_VERSION_STRING, version);
17166                         return 1;
17167                 }
17168         }
17169 #endif
17170
17171 #if DB_VERSION_MAJOR > 2
17172         db_env_create( NULL, 0 );
17173 #elif DB_VERSION_MAJOR > 1
17174         db_appexit( NULL );
17175 #else
17176         (void) dbopen( NULL, 0, 0, 0, NULL);
17177 #endif
17178
17179 ; return 0; }
17180 EOF
17181 if { (eval echo configure:17182: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17182   rm -rf conftest*
17183   ol_cv_db_db43=yes
17184 else
17185   echo "configure: failed program was:" >&5
17186   cat conftest.$ac_ext >&5
17187   rm -rf conftest*
17188   ol_cv_db_db43=no
17189 fi
17190 rm -f conftest*
17191
17192         LIBS="$ol_LIBS"
17193
17194 fi
17195
17196 echo "$ac_t""$ol_cv_db_db43" 1>&6
17197
17198         if test $ol_cv_db_db43 = yes ; then
17199                 ol_cv_lib_db=-ldb43
17200         fi
17201 fi
17202
17203 if test $ol_cv_lib_db = no ; then
17204         echo $ac_n "checking for Berkeley DB link (-ldb-43)""... $ac_c" 1>&6
17205 echo "configure:17206: checking for Berkeley DB link (-ldb-43)" >&5
17206 if eval "test \"\${ol_cv_db_db_43+set}\" = set"; then
17207   echo $ac_n "(cached) $ac_c" 1>&6
17208 else
17209   
17210         ol_DB_LIB=-ldb-43
17211         ol_LIBS=$LIBS
17212         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17213
17214         cat > conftest.$ac_ext <<EOF
17215 #line 17216 "configure"
17216 #include "confdefs.h"
17217
17218 #ifdef HAVE_DB_185_H
17219 # include <db_185.h>
17220 #else
17221 # include <db.h>
17222 #endif
17223
17224 #ifndef DB_VERSION_MAJOR
17225 # define DB_VERSION_MAJOR 1
17226 #endif
17227
17228 #ifndef NULL
17229 #define NULL ((void*)0)
17230 #endif
17231
17232 int main() {
17233
17234 #if DB_VERSION_MAJOR > 1
17235         {
17236                 char *version;
17237                 int major, minor, patch;
17238
17239                 version = db_version( &major, &minor, &patch );
17240
17241                 if( major != DB_VERSION_MAJOR ||
17242                         minor < DB_VERSION_MINOR )
17243                 {
17244                         printf("Berkeley DB version mismatch\n"
17245                                 "\theader: %s\n\tlibrary: %s\n",
17246                                 DB_VERSION_STRING, version);
17247                         return 1;
17248                 }
17249         }
17250 #endif
17251
17252 #if DB_VERSION_MAJOR > 2
17253         db_env_create( NULL, 0 );
17254 #elif DB_VERSION_MAJOR > 1
17255         db_appexit( NULL );
17256 #else
17257         (void) dbopen( NULL, 0, 0, 0, NULL);
17258 #endif
17259
17260 ; return 0; }
17261 EOF
17262 if { (eval echo configure:17263: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17263   rm -rf conftest*
17264   ol_cv_db_db_43=yes
17265 else
17266   echo "configure: failed program was:" >&5
17267   cat conftest.$ac_ext >&5
17268   rm -rf conftest*
17269   ol_cv_db_db_43=no
17270 fi
17271 rm -f conftest*
17272
17273         LIBS="$ol_LIBS"
17274
17275 fi
17276
17277 echo "$ac_t""$ol_cv_db_db_43" 1>&6
17278
17279         if test $ol_cv_db_db_43 = yes ; then
17280                 ol_cv_lib_db=-ldb-43
17281         fi
17282 fi
17283
17284 if test $ol_cv_lib_db = no ; then
17285         echo $ac_n "checking for Berkeley DB link (-ldb-4.3)""... $ac_c" 1>&6
17286 echo "configure:17287: checking for Berkeley DB link (-ldb-4.3)" >&5
17287 if eval "test \"\${ol_cv_db_db_4_dot_3+set}\" = set"; then
17288   echo $ac_n "(cached) $ac_c" 1>&6
17289 else
17290   
17291         ol_DB_LIB=-ldb-4.3
17292         ol_LIBS=$LIBS
17293         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17294
17295         cat > conftest.$ac_ext <<EOF
17296 #line 17297 "configure"
17297 #include "confdefs.h"
17298
17299 #ifdef HAVE_DB_185_H
17300 # include <db_185.h>
17301 #else
17302 # include <db.h>
17303 #endif
17304
17305 #ifndef DB_VERSION_MAJOR
17306 # define DB_VERSION_MAJOR 1
17307 #endif
17308
17309 #ifndef NULL
17310 #define NULL ((void*)0)
17311 #endif
17312
17313 int main() {
17314
17315 #if DB_VERSION_MAJOR > 1
17316         {
17317                 char *version;
17318                 int major, minor, patch;
17319
17320                 version = db_version( &major, &minor, &patch );
17321
17322                 if( major != DB_VERSION_MAJOR ||
17323                         minor < DB_VERSION_MINOR )
17324                 {
17325                         printf("Berkeley DB version mismatch\n"
17326                                 "\theader: %s\n\tlibrary: %s\n",
17327                                 DB_VERSION_STRING, version);
17328                         return 1;
17329                 }
17330         }
17331 #endif
17332
17333 #if DB_VERSION_MAJOR > 2
17334         db_env_create( NULL, 0 );
17335 #elif DB_VERSION_MAJOR > 1
17336         db_appexit( NULL );
17337 #else
17338         (void) dbopen( NULL, 0, 0, 0, NULL);
17339 #endif
17340
17341 ; return 0; }
17342 EOF
17343 if { (eval echo configure:17344: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17344   rm -rf conftest*
17345   ol_cv_db_db_4_dot_3=yes
17346 else
17347   echo "configure: failed program was:" >&5
17348   cat conftest.$ac_ext >&5
17349   rm -rf conftest*
17350   ol_cv_db_db_4_dot_3=no
17351 fi
17352 rm -f conftest*
17353
17354         LIBS="$ol_LIBS"
17355
17356 fi
17357
17358 echo "$ac_t""$ol_cv_db_db_4_dot_3" 1>&6
17359
17360         if test $ol_cv_db_db_4_dot_3 = yes ; then
17361                 ol_cv_lib_db=-ldb-4.3
17362         fi
17363 fi
17364
17365 if test $ol_cv_lib_db = no ; then
17366         echo $ac_n "checking for Berkeley DB link (-ldb-4-3)""... $ac_c" 1>&6
17367 echo "configure:17368: checking for Berkeley DB link (-ldb-4-3)" >&5
17368 if eval "test \"\${ol_cv_db_db_4_3+set}\" = set"; then
17369   echo $ac_n "(cached) $ac_c" 1>&6
17370 else
17371   
17372         ol_DB_LIB=-ldb-4-3
17373         ol_LIBS=$LIBS
17374         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17375
17376         cat > conftest.$ac_ext <<EOF
17377 #line 17378 "configure"
17378 #include "confdefs.h"
17379
17380 #ifdef HAVE_DB_185_H
17381 # include <db_185.h>
17382 #else
17383 # include <db.h>
17384 #endif
17385
17386 #ifndef DB_VERSION_MAJOR
17387 # define DB_VERSION_MAJOR 1
17388 #endif
17389
17390 #ifndef NULL
17391 #define NULL ((void*)0)
17392 #endif
17393
17394 int main() {
17395
17396 #if DB_VERSION_MAJOR > 1
17397         {
17398                 char *version;
17399                 int major, minor, patch;
17400
17401                 version = db_version( &major, &minor, &patch );
17402
17403                 if( major != DB_VERSION_MAJOR ||
17404                         minor < DB_VERSION_MINOR )
17405                 {
17406                         printf("Berkeley DB version mismatch\n"
17407                                 "\theader: %s\n\tlibrary: %s\n",
17408                                 DB_VERSION_STRING, version);
17409                         return 1;
17410                 }
17411         }
17412 #endif
17413
17414 #if DB_VERSION_MAJOR > 2
17415         db_env_create( NULL, 0 );
17416 #elif DB_VERSION_MAJOR > 1
17417         db_appexit( NULL );
17418 #else
17419         (void) dbopen( NULL, 0, 0, 0, NULL);
17420 #endif
17421
17422 ; return 0; }
17423 EOF
17424 if { (eval echo configure:17425: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17425   rm -rf conftest*
17426   ol_cv_db_db_4_3=yes
17427 else
17428   echo "configure: failed program was:" >&5
17429   cat conftest.$ac_ext >&5
17430   rm -rf conftest*
17431   ol_cv_db_db_4_3=no
17432 fi
17433 rm -f conftest*
17434
17435         LIBS="$ol_LIBS"
17436
17437 fi
17438
17439 echo "$ac_t""$ol_cv_db_db_4_3" 1>&6
17440
17441         if test $ol_cv_db_db_4_3 = yes ; then
17442                 ol_cv_lib_db=-ldb-4-3
17443         fi
17444 fi
17445
17446 if test $ol_cv_lib_db = no ; then
17447         echo $ac_n "checking for Berkeley DB link (-ldb42)""... $ac_c" 1>&6
17448 echo "configure:17449: checking for Berkeley DB link (-ldb42)" >&5
17449 if eval "test \"\${ol_cv_db_db42+set}\" = set"; then
17450   echo $ac_n "(cached) $ac_c" 1>&6
17451 else
17452   
17453         ol_DB_LIB=-ldb42
17454         ol_LIBS=$LIBS
17455         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17456
17457         cat > conftest.$ac_ext <<EOF
17458 #line 17459 "configure"
17459 #include "confdefs.h"
17460
17461 #ifdef HAVE_DB_185_H
17462 # include <db_185.h>
17463 #else
17464 # include <db.h>
17465 #endif
17466
17467 #ifndef DB_VERSION_MAJOR
17468 # define DB_VERSION_MAJOR 1
17469 #endif
17470
17471 #ifndef NULL
17472 #define NULL ((void*)0)
17473 #endif
17474
17475 int main() {
17476
17477 #if DB_VERSION_MAJOR > 1
17478         {
17479                 char *version;
17480                 int major, minor, patch;
17481
17482                 version = db_version( &major, &minor, &patch );
17483
17484                 if( major != DB_VERSION_MAJOR ||
17485                         minor < DB_VERSION_MINOR )
17486                 {
17487                         printf("Berkeley DB version mismatch\n"
17488                                 "\theader: %s\n\tlibrary: %s\n",
17489                                 DB_VERSION_STRING, version);
17490                         return 1;
17491                 }
17492         }
17493 #endif
17494
17495 #if DB_VERSION_MAJOR > 2
17496         db_env_create( NULL, 0 );
17497 #elif DB_VERSION_MAJOR > 1
17498         db_appexit( NULL );
17499 #else
17500         (void) dbopen( NULL, 0, 0, 0, NULL);
17501 #endif
17502
17503 ; return 0; }
17504 EOF
17505 if { (eval echo configure:17506: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17506   rm -rf conftest*
17507   ol_cv_db_db42=yes
17508 else
17509   echo "configure: failed program was:" >&5
17510   cat conftest.$ac_ext >&5
17511   rm -rf conftest*
17512   ol_cv_db_db42=no
17513 fi
17514 rm -f conftest*
17515
17516         LIBS="$ol_LIBS"
17517
17518 fi
17519
17520 echo "$ac_t""$ol_cv_db_db42" 1>&6
17521
17522         if test $ol_cv_db_db42 = yes ; then
17523                 ol_cv_lib_db=-ldb42
17524         fi
17525 fi
17526
17527 if test $ol_cv_lib_db = no ; then
17528         echo $ac_n "checking for Berkeley DB link (-ldb-42)""... $ac_c" 1>&6
17529 echo "configure:17530: checking for Berkeley DB link (-ldb-42)" >&5
17530 if eval "test \"\${ol_cv_db_db_42+set}\" = set"; then
17531   echo $ac_n "(cached) $ac_c" 1>&6
17532 else
17533   
17534         ol_DB_LIB=-ldb-42
17535         ol_LIBS=$LIBS
17536         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17537
17538         cat > conftest.$ac_ext <<EOF
17539 #line 17540 "configure"
17540 #include "confdefs.h"
17541
17542 #ifdef HAVE_DB_185_H
17543 # include <db_185.h>
17544 #else
17545 # include <db.h>
17546 #endif
17547
17548 #ifndef DB_VERSION_MAJOR
17549 # define DB_VERSION_MAJOR 1
17550 #endif
17551
17552 #ifndef NULL
17553 #define NULL ((void*)0)
17554 #endif
17555
17556 int main() {
17557
17558 #if DB_VERSION_MAJOR > 1
17559         {
17560                 char *version;
17561                 int major, minor, patch;
17562
17563                 version = db_version( &major, &minor, &patch );
17564
17565                 if( major != DB_VERSION_MAJOR ||
17566                         minor < DB_VERSION_MINOR )
17567                 {
17568                         printf("Berkeley DB version mismatch\n"
17569                                 "\theader: %s\n\tlibrary: %s\n",
17570                                 DB_VERSION_STRING, version);
17571                         return 1;
17572                 }
17573         }
17574 #endif
17575
17576 #if DB_VERSION_MAJOR > 2
17577         db_env_create( NULL, 0 );
17578 #elif DB_VERSION_MAJOR > 1
17579         db_appexit( NULL );
17580 #else
17581         (void) dbopen( NULL, 0, 0, 0, NULL);
17582 #endif
17583
17584 ; return 0; }
17585 EOF
17586 if { (eval echo configure:17587: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17587   rm -rf conftest*
17588   ol_cv_db_db_42=yes
17589 else
17590   echo "configure: failed program was:" >&5
17591   cat conftest.$ac_ext >&5
17592   rm -rf conftest*
17593   ol_cv_db_db_42=no
17594 fi
17595 rm -f conftest*
17596
17597         LIBS="$ol_LIBS"
17598
17599 fi
17600
17601 echo "$ac_t""$ol_cv_db_db_42" 1>&6
17602
17603         if test $ol_cv_db_db_42 = yes ; then
17604                 ol_cv_lib_db=-ldb-42
17605         fi
17606 fi
17607
17608 if test $ol_cv_lib_db = no ; then
17609         echo $ac_n "checking for Berkeley DB link (-ldb-4.2)""... $ac_c" 1>&6
17610 echo "configure:17611: checking for Berkeley DB link (-ldb-4.2)" >&5
17611 if eval "test \"\${ol_cv_db_db_4_dot_2+set}\" = set"; then
17612   echo $ac_n "(cached) $ac_c" 1>&6
17613 else
17614   
17615         ol_DB_LIB=-ldb-4.2
17616         ol_LIBS=$LIBS
17617         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17618
17619         cat > conftest.$ac_ext <<EOF
17620 #line 17621 "configure"
17621 #include "confdefs.h"
17622
17623 #ifdef HAVE_DB_185_H
17624 # include <db_185.h>
17625 #else
17626 # include <db.h>
17627 #endif
17628
17629 #ifndef DB_VERSION_MAJOR
17630 # define DB_VERSION_MAJOR 1
17631 #endif
17632
17633 #ifndef NULL
17634 #define NULL ((void*)0)
17635 #endif
17636
17637 int main() {
17638
17639 #if DB_VERSION_MAJOR > 1
17640         {
17641                 char *version;
17642                 int major, minor, patch;
17643
17644                 version = db_version( &major, &minor, &patch );
17645
17646                 if( major != DB_VERSION_MAJOR ||
17647                         minor < DB_VERSION_MINOR )
17648                 {
17649                         printf("Berkeley DB version mismatch\n"
17650                                 "\theader: %s\n\tlibrary: %s\n",
17651                                 DB_VERSION_STRING, version);
17652                         return 1;
17653                 }
17654         }
17655 #endif
17656
17657 #if DB_VERSION_MAJOR > 2
17658         db_env_create( NULL, 0 );
17659 #elif DB_VERSION_MAJOR > 1
17660         db_appexit( NULL );
17661 #else
17662         (void) dbopen( NULL, 0, 0, 0, NULL);
17663 #endif
17664
17665 ; return 0; }
17666 EOF
17667 if { (eval echo configure:17668: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17668   rm -rf conftest*
17669   ol_cv_db_db_4_dot_2=yes
17670 else
17671   echo "configure: failed program was:" >&5
17672   cat conftest.$ac_ext >&5
17673   rm -rf conftest*
17674   ol_cv_db_db_4_dot_2=no
17675 fi
17676 rm -f conftest*
17677
17678         LIBS="$ol_LIBS"
17679
17680 fi
17681
17682 echo "$ac_t""$ol_cv_db_db_4_dot_2" 1>&6
17683
17684         if test $ol_cv_db_db_4_dot_2 = yes ; then
17685                 ol_cv_lib_db=-ldb-4.2
17686         fi
17687 fi
17688
17689 if test $ol_cv_lib_db = no ; then
17690         echo $ac_n "checking for Berkeley DB link (-ldb-4-2)""... $ac_c" 1>&6
17691 echo "configure:17692: checking for Berkeley DB link (-ldb-4-2)" >&5
17692 if eval "test \"\${ol_cv_db_db_4_2+set}\" = set"; then
17693   echo $ac_n "(cached) $ac_c" 1>&6
17694 else
17695   
17696         ol_DB_LIB=-ldb-4-2
17697         ol_LIBS=$LIBS
17698         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17699
17700         cat > conftest.$ac_ext <<EOF
17701 #line 17702 "configure"
17702 #include "confdefs.h"
17703
17704 #ifdef HAVE_DB_185_H
17705 # include <db_185.h>
17706 #else
17707 # include <db.h>
17708 #endif
17709
17710 #ifndef DB_VERSION_MAJOR
17711 # define DB_VERSION_MAJOR 1
17712 #endif
17713
17714 #ifndef NULL
17715 #define NULL ((void*)0)
17716 #endif
17717
17718 int main() {
17719
17720 #if DB_VERSION_MAJOR > 1
17721         {
17722                 char *version;
17723                 int major, minor, patch;
17724
17725                 version = db_version( &major, &minor, &patch );
17726
17727                 if( major != DB_VERSION_MAJOR ||
17728                         minor < DB_VERSION_MINOR )
17729                 {
17730                         printf("Berkeley DB version mismatch\n"
17731                                 "\theader: %s\n\tlibrary: %s\n",
17732                                 DB_VERSION_STRING, version);
17733                         return 1;
17734                 }
17735         }
17736 #endif
17737
17738 #if DB_VERSION_MAJOR > 2
17739         db_env_create( NULL, 0 );
17740 #elif DB_VERSION_MAJOR > 1
17741         db_appexit( NULL );
17742 #else
17743         (void) dbopen( NULL, 0, 0, 0, NULL);
17744 #endif
17745
17746 ; return 0; }
17747 EOF
17748 if { (eval echo configure:17749: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17749   rm -rf conftest*
17750   ol_cv_db_db_4_2=yes
17751 else
17752   echo "configure: failed program was:" >&5
17753   cat conftest.$ac_ext >&5
17754   rm -rf conftest*
17755   ol_cv_db_db_4_2=no
17756 fi
17757 rm -f conftest*
17758
17759         LIBS="$ol_LIBS"
17760
17761 fi
17762
17763 echo "$ac_t""$ol_cv_db_db_4_2" 1>&6
17764
17765         if test $ol_cv_db_db_4_2 = yes ; then
17766                 ol_cv_lib_db=-ldb-4-2
17767         fi
17768 fi
17769
17770 if test $ol_cv_lib_db = no ; then
17771         echo $ac_n "checking for Berkeley DB link (-ldb-4)""... $ac_c" 1>&6
17772 echo "configure:17773: checking for Berkeley DB link (-ldb-4)" >&5
17773 if eval "test \"\${ol_cv_db_db_4+set}\" = set"; then
17774   echo $ac_n "(cached) $ac_c" 1>&6
17775 else
17776   
17777         ol_DB_LIB=-ldb-4
17778         ol_LIBS=$LIBS
17779         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17780
17781         cat > conftest.$ac_ext <<EOF
17782 #line 17783 "configure"
17783 #include "confdefs.h"
17784
17785 #ifdef HAVE_DB_185_H
17786 # include <db_185.h>
17787 #else
17788 # include <db.h>
17789 #endif
17790
17791 #ifndef DB_VERSION_MAJOR
17792 # define DB_VERSION_MAJOR 1
17793 #endif
17794
17795 #ifndef NULL
17796 #define NULL ((void*)0)
17797 #endif
17798
17799 int main() {
17800
17801 #if DB_VERSION_MAJOR > 1
17802         {
17803                 char *version;
17804                 int major, minor, patch;
17805
17806                 version = db_version( &major, &minor, &patch );
17807
17808                 if( major != DB_VERSION_MAJOR ||
17809                         minor < DB_VERSION_MINOR )
17810                 {
17811                         printf("Berkeley DB version mismatch\n"
17812                                 "\theader: %s\n\tlibrary: %s\n",
17813                                 DB_VERSION_STRING, version);
17814                         return 1;
17815                 }
17816         }
17817 #endif
17818
17819 #if DB_VERSION_MAJOR > 2
17820         db_env_create( NULL, 0 );
17821 #elif DB_VERSION_MAJOR > 1
17822         db_appexit( NULL );
17823 #else
17824         (void) dbopen( NULL, 0, 0, 0, NULL);
17825 #endif
17826
17827 ; return 0; }
17828 EOF
17829 if { (eval echo configure:17830: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17830   rm -rf conftest*
17831   ol_cv_db_db_4=yes
17832 else
17833   echo "configure: failed program was:" >&5
17834   cat conftest.$ac_ext >&5
17835   rm -rf conftest*
17836   ol_cv_db_db_4=no
17837 fi
17838 rm -f conftest*
17839
17840         LIBS="$ol_LIBS"
17841
17842 fi
17843
17844 echo "$ac_t""$ol_cv_db_db_4" 1>&6
17845
17846         if test $ol_cv_db_db_4 = yes ; then
17847                 ol_cv_lib_db=-ldb-4
17848         fi
17849 fi
17850
17851 if test $ol_cv_lib_db = no ; then
17852         echo $ac_n "checking for Berkeley DB link (-ldb4)""... $ac_c" 1>&6
17853 echo "configure:17854: checking for Berkeley DB link (-ldb4)" >&5
17854 if eval "test \"\${ol_cv_db_db4+set}\" = set"; then
17855   echo $ac_n "(cached) $ac_c" 1>&6
17856 else
17857   
17858         ol_DB_LIB=-ldb4
17859         ol_LIBS=$LIBS
17860         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17861
17862         cat > conftest.$ac_ext <<EOF
17863 #line 17864 "configure"
17864 #include "confdefs.h"
17865
17866 #ifdef HAVE_DB_185_H
17867 # include <db_185.h>
17868 #else
17869 # include <db.h>
17870 #endif
17871
17872 #ifndef DB_VERSION_MAJOR
17873 # define DB_VERSION_MAJOR 1
17874 #endif
17875
17876 #ifndef NULL
17877 #define NULL ((void*)0)
17878 #endif
17879
17880 int main() {
17881
17882 #if DB_VERSION_MAJOR > 1
17883         {
17884                 char *version;
17885                 int major, minor, patch;
17886
17887                 version = db_version( &major, &minor, &patch );
17888
17889                 if( major != DB_VERSION_MAJOR ||
17890                         minor < DB_VERSION_MINOR )
17891                 {
17892                         printf("Berkeley DB version mismatch\n"
17893                                 "\theader: %s\n\tlibrary: %s\n",
17894                                 DB_VERSION_STRING, version);
17895                         return 1;
17896                 }
17897         }
17898 #endif
17899
17900 #if DB_VERSION_MAJOR > 2
17901         db_env_create( NULL, 0 );
17902 #elif DB_VERSION_MAJOR > 1
17903         db_appexit( NULL );
17904 #else
17905         (void) dbopen( NULL, 0, 0, 0, NULL);
17906 #endif
17907
17908 ; return 0; }
17909 EOF
17910 if { (eval echo configure:17911: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17911   rm -rf conftest*
17912   ol_cv_db_db4=yes
17913 else
17914   echo "configure: failed program was:" >&5
17915   cat conftest.$ac_ext >&5
17916   rm -rf conftest*
17917   ol_cv_db_db4=no
17918 fi
17919 rm -f conftest*
17920
17921         LIBS="$ol_LIBS"
17922
17923 fi
17924
17925 echo "$ac_t""$ol_cv_db_db4" 1>&6
17926
17927         if test $ol_cv_db_db4 = yes ; then
17928                 ol_cv_lib_db=-ldb4
17929         fi
17930 fi
17931
17932 if test $ol_cv_lib_db = no ; then
17933         echo $ac_n "checking for Berkeley DB link (-ldb)""... $ac_c" 1>&6
17934 echo "configure:17935: checking for Berkeley DB link (-ldb)" >&5
17935 if eval "test \"\${ol_cv_db_db+set}\" = set"; then
17936   echo $ac_n "(cached) $ac_c" 1>&6
17937 else
17938   
17939         ol_DB_LIB=-ldb
17940         ol_LIBS=$LIBS
17941         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17942
17943         cat > conftest.$ac_ext <<EOF
17944 #line 17945 "configure"
17945 #include "confdefs.h"
17946
17947 #ifdef HAVE_DB_185_H
17948 # include <db_185.h>
17949 #else
17950 # include <db.h>
17951 #endif
17952
17953 #ifndef DB_VERSION_MAJOR
17954 # define DB_VERSION_MAJOR 1
17955 #endif
17956
17957 #ifndef NULL
17958 #define NULL ((void*)0)
17959 #endif
17960
17961 int main() {
17962
17963 #if DB_VERSION_MAJOR > 1
17964         {
17965                 char *version;
17966                 int major, minor, patch;
17967
17968                 version = db_version( &major, &minor, &patch );
17969
17970                 if( major != DB_VERSION_MAJOR ||
17971                         minor < DB_VERSION_MINOR )
17972                 {
17973                         printf("Berkeley DB version mismatch\n"
17974                                 "\theader: %s\n\tlibrary: %s\n",
17975                                 DB_VERSION_STRING, version);
17976                         return 1;
17977                 }
17978         }
17979 #endif
17980
17981 #if DB_VERSION_MAJOR > 2
17982         db_env_create( NULL, 0 );
17983 #elif DB_VERSION_MAJOR > 1
17984         db_appexit( NULL );
17985 #else
17986         (void) dbopen( NULL, 0, 0, 0, NULL);
17987 #endif
17988
17989 ; return 0; }
17990 EOF
17991 if { (eval echo configure:17992: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17992   rm -rf conftest*
17993   ol_cv_db_db=yes
17994 else
17995   echo "configure: failed program was:" >&5
17996   cat conftest.$ac_ext >&5
17997   rm -rf conftest*
17998   ol_cv_db_db=no
17999 fi
18000 rm -f conftest*
18001
18002         LIBS="$ol_LIBS"
18003
18004 fi
18005
18006 echo "$ac_t""$ol_cv_db_db" 1>&6
18007
18008         if test $ol_cv_db_db = yes ; then
18009                 ol_cv_lib_db=-ldb
18010         fi
18011 fi
18012
18013 if test $ol_cv_lib_db = no ; then
18014         echo $ac_n "checking for Berkeley DB link (-ldb41)""... $ac_c" 1>&6
18015 echo "configure:18016: checking for Berkeley DB link (-ldb41)" >&5
18016 if eval "test \"\${ol_cv_db_db41+set}\" = set"; then
18017   echo $ac_n "(cached) $ac_c" 1>&6
18018 else
18019   
18020         ol_DB_LIB=-ldb41
18021         ol_LIBS=$LIBS
18022         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18023
18024         cat > conftest.$ac_ext <<EOF
18025 #line 18026 "configure"
18026 #include "confdefs.h"
18027
18028 #ifdef HAVE_DB_185_H
18029 # include <db_185.h>
18030 #else
18031 # include <db.h>
18032 #endif
18033
18034 #ifndef DB_VERSION_MAJOR
18035 # define DB_VERSION_MAJOR 1
18036 #endif
18037
18038 #ifndef NULL
18039 #define NULL ((void*)0)
18040 #endif
18041
18042 int main() {
18043
18044 #if DB_VERSION_MAJOR > 1
18045         {
18046                 char *version;
18047                 int major, minor, patch;
18048
18049                 version = db_version( &major, &minor, &patch );
18050
18051                 if( major != DB_VERSION_MAJOR ||
18052                         minor < DB_VERSION_MINOR )
18053                 {
18054                         printf("Berkeley DB version mismatch\n"
18055                                 "\theader: %s\n\tlibrary: %s\n",
18056                                 DB_VERSION_STRING, version);
18057                         return 1;
18058                 }
18059         }
18060 #endif
18061
18062 #if DB_VERSION_MAJOR > 2
18063         db_env_create( NULL, 0 );
18064 #elif DB_VERSION_MAJOR > 1
18065         db_appexit( NULL );
18066 #else
18067         (void) dbopen( NULL, 0, 0, 0, NULL);
18068 #endif
18069
18070 ; return 0; }
18071 EOF
18072 if { (eval echo configure:18073: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18073   rm -rf conftest*
18074   ol_cv_db_db41=yes
18075 else
18076   echo "configure: failed program was:" >&5
18077   cat conftest.$ac_ext >&5
18078   rm -rf conftest*
18079   ol_cv_db_db41=no
18080 fi
18081 rm -f conftest*
18082
18083         LIBS="$ol_LIBS"
18084
18085 fi
18086
18087 echo "$ac_t""$ol_cv_db_db41" 1>&6
18088
18089         if test $ol_cv_db_db41 = yes ; then
18090                 ol_cv_lib_db=-ldb41
18091         fi
18092 fi
18093
18094 if test $ol_cv_lib_db = no ; then
18095         echo $ac_n "checking for Berkeley DB link (-ldb-41)""... $ac_c" 1>&6
18096 echo "configure:18097: checking for Berkeley DB link (-ldb-41)" >&5
18097 if eval "test \"\${ol_cv_db_db_41+set}\" = set"; then
18098   echo $ac_n "(cached) $ac_c" 1>&6
18099 else
18100   
18101         ol_DB_LIB=-ldb-41
18102         ol_LIBS=$LIBS
18103         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18104
18105         cat > conftest.$ac_ext <<EOF
18106 #line 18107 "configure"
18107 #include "confdefs.h"
18108
18109 #ifdef HAVE_DB_185_H
18110 # include <db_185.h>
18111 #else
18112 # include <db.h>
18113 #endif
18114
18115 #ifndef DB_VERSION_MAJOR
18116 # define DB_VERSION_MAJOR 1
18117 #endif
18118
18119 #ifndef NULL
18120 #define NULL ((void*)0)
18121 #endif
18122
18123 int main() {
18124
18125 #if DB_VERSION_MAJOR > 1
18126         {
18127                 char *version;
18128                 int major, minor, patch;
18129
18130                 version = db_version( &major, &minor, &patch );
18131
18132                 if( major != DB_VERSION_MAJOR ||
18133                         minor < DB_VERSION_MINOR )
18134                 {
18135                         printf("Berkeley DB version mismatch\n"
18136                                 "\theader: %s\n\tlibrary: %s\n",
18137                                 DB_VERSION_STRING, version);
18138                         return 1;
18139                 }
18140         }
18141 #endif
18142
18143 #if DB_VERSION_MAJOR > 2
18144         db_env_create( NULL, 0 );
18145 #elif DB_VERSION_MAJOR > 1
18146         db_appexit( NULL );
18147 #else
18148         (void) dbopen( NULL, 0, 0, 0, NULL);
18149 #endif
18150
18151 ; return 0; }
18152 EOF
18153 if { (eval echo configure:18154: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18154   rm -rf conftest*
18155   ol_cv_db_db_41=yes
18156 else
18157   echo "configure: failed program was:" >&5
18158   cat conftest.$ac_ext >&5
18159   rm -rf conftest*
18160   ol_cv_db_db_41=no
18161 fi
18162 rm -f conftest*
18163
18164         LIBS="$ol_LIBS"
18165
18166 fi
18167
18168 echo "$ac_t""$ol_cv_db_db_41" 1>&6
18169
18170         if test $ol_cv_db_db_41 = yes ; then
18171                 ol_cv_lib_db=-ldb-41
18172         fi
18173 fi
18174
18175 if test $ol_cv_lib_db = no ; then
18176         echo $ac_n "checking for Berkeley DB link (-ldb-4.1)""... $ac_c" 1>&6
18177 echo "configure:18178: checking for Berkeley DB link (-ldb-4.1)" >&5
18178 if eval "test \"\${ol_cv_db_db_4_dot_1+set}\" = set"; then
18179   echo $ac_n "(cached) $ac_c" 1>&6
18180 else
18181   
18182         ol_DB_LIB=-ldb-4.1
18183         ol_LIBS=$LIBS
18184         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18185
18186         cat > conftest.$ac_ext <<EOF
18187 #line 18188 "configure"
18188 #include "confdefs.h"
18189
18190 #ifdef HAVE_DB_185_H
18191 # include <db_185.h>
18192 #else
18193 # include <db.h>
18194 #endif
18195
18196 #ifndef DB_VERSION_MAJOR
18197 # define DB_VERSION_MAJOR 1
18198 #endif
18199
18200 #ifndef NULL
18201 #define NULL ((void*)0)
18202 #endif
18203
18204 int main() {
18205
18206 #if DB_VERSION_MAJOR > 1
18207         {
18208                 char *version;
18209                 int major, minor, patch;
18210
18211                 version = db_version( &major, &minor, &patch );
18212
18213                 if( major != DB_VERSION_MAJOR ||
18214                         minor < DB_VERSION_MINOR )
18215                 {
18216                         printf("Berkeley DB version mismatch\n"
18217                                 "\theader: %s\n\tlibrary: %s\n",
18218                                 DB_VERSION_STRING, version);
18219                         return 1;
18220                 }
18221         }
18222 #endif
18223
18224 #if DB_VERSION_MAJOR > 2
18225         db_env_create( NULL, 0 );
18226 #elif DB_VERSION_MAJOR > 1
18227         db_appexit( NULL );
18228 #else
18229         (void) dbopen( NULL, 0, 0, 0, NULL);
18230 #endif
18231
18232 ; return 0; }
18233 EOF
18234 if { (eval echo configure:18235: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18235   rm -rf conftest*
18236   ol_cv_db_db_4_dot_1=yes
18237 else
18238   echo "configure: failed program was:" >&5
18239   cat conftest.$ac_ext >&5
18240   rm -rf conftest*
18241   ol_cv_db_db_4_dot_1=no
18242 fi
18243 rm -f conftest*
18244
18245         LIBS="$ol_LIBS"
18246
18247 fi
18248
18249 echo "$ac_t""$ol_cv_db_db_4_dot_1" 1>&6
18250
18251         if test $ol_cv_db_db_4_dot_1 = yes ; then
18252                 ol_cv_lib_db=-ldb-4.1
18253         fi
18254 fi
18255
18256 if test $ol_cv_lib_db = no ; then
18257         echo $ac_n "checking for Berkeley DB link (-ldb-4-1)""... $ac_c" 1>&6
18258 echo "configure:18259: checking for Berkeley DB link (-ldb-4-1)" >&5
18259 if eval "test \"\${ol_cv_db_db_4_1+set}\" = set"; then
18260   echo $ac_n "(cached) $ac_c" 1>&6
18261 else
18262   
18263         ol_DB_LIB=-ldb-4-1
18264         ol_LIBS=$LIBS
18265         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18266
18267         cat > conftest.$ac_ext <<EOF
18268 #line 18269 "configure"
18269 #include "confdefs.h"
18270
18271 #ifdef HAVE_DB_185_H
18272 # include <db_185.h>
18273 #else
18274 # include <db.h>
18275 #endif
18276
18277 #ifndef DB_VERSION_MAJOR
18278 # define DB_VERSION_MAJOR 1
18279 #endif
18280
18281 #ifndef NULL
18282 #define NULL ((void*)0)
18283 #endif
18284
18285 int main() {
18286
18287 #if DB_VERSION_MAJOR > 1
18288         {
18289                 char *version;
18290                 int major, minor, patch;
18291
18292                 version = db_version( &major, &minor, &patch );
18293
18294                 if( major != DB_VERSION_MAJOR ||
18295                         minor < DB_VERSION_MINOR )
18296                 {
18297                         printf("Berkeley DB version mismatch\n"
18298                                 "\theader: %s\n\tlibrary: %s\n",
18299                                 DB_VERSION_STRING, version);
18300                         return 1;
18301                 }
18302         }
18303 #endif
18304
18305 #if DB_VERSION_MAJOR > 2
18306         db_env_create( NULL, 0 );
18307 #elif DB_VERSION_MAJOR > 1
18308         db_appexit( NULL );
18309 #else
18310         (void) dbopen( NULL, 0, 0, 0, NULL);
18311 #endif
18312
18313 ; return 0; }
18314 EOF
18315 if { (eval echo configure:18316: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18316   rm -rf conftest*
18317   ol_cv_db_db_4_1=yes
18318 else
18319   echo "configure: failed program was:" >&5
18320   cat conftest.$ac_ext >&5
18321   rm -rf conftest*
18322   ol_cv_db_db_4_1=no
18323 fi
18324 rm -f conftest*
18325
18326         LIBS="$ol_LIBS"
18327
18328 fi
18329
18330 echo "$ac_t""$ol_cv_db_db_4_1" 1>&6
18331
18332         if test $ol_cv_db_db_4_1 = yes ; then
18333                 ol_cv_lib_db=-ldb-4-1
18334         fi
18335 fi
18336
18337 if test $ol_cv_lib_db = no ; then
18338         echo $ac_n "checking for Berkeley DB link (-ldb3)""... $ac_c" 1>&6
18339 echo "configure:18340: checking for Berkeley DB link (-ldb3)" >&5
18340 if eval "test \"\${ol_cv_db_db3+set}\" = set"; then
18341   echo $ac_n "(cached) $ac_c" 1>&6
18342 else
18343   
18344         ol_DB_LIB=-ldb3
18345         ol_LIBS=$LIBS
18346         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18347
18348         cat > conftest.$ac_ext <<EOF
18349 #line 18350 "configure"
18350 #include "confdefs.h"
18351
18352 #ifdef HAVE_DB_185_H
18353 # include <db_185.h>
18354 #else
18355 # include <db.h>
18356 #endif
18357
18358 #ifndef DB_VERSION_MAJOR
18359 # define DB_VERSION_MAJOR 1
18360 #endif
18361
18362 #ifndef NULL
18363 #define NULL ((void*)0)
18364 #endif
18365
18366 int main() {
18367
18368 #if DB_VERSION_MAJOR > 1
18369         {
18370                 char *version;
18371                 int major, minor, patch;
18372
18373                 version = db_version( &major, &minor, &patch );
18374
18375                 if( major != DB_VERSION_MAJOR ||
18376                         minor < DB_VERSION_MINOR )
18377                 {
18378                         printf("Berkeley DB version mismatch\n"
18379                                 "\theader: %s\n\tlibrary: %s\n",
18380                                 DB_VERSION_STRING, version);
18381                         return 1;
18382                 }
18383         }
18384 #endif
18385
18386 #if DB_VERSION_MAJOR > 2
18387         db_env_create( NULL, 0 );
18388 #elif DB_VERSION_MAJOR > 1
18389         db_appexit( NULL );
18390 #else
18391         (void) dbopen( NULL, 0, 0, 0, NULL);
18392 #endif
18393
18394 ; return 0; }
18395 EOF
18396 if { (eval echo configure:18397: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18397   rm -rf conftest*
18398   ol_cv_db_db3=yes
18399 else
18400   echo "configure: failed program was:" >&5
18401   cat conftest.$ac_ext >&5
18402   rm -rf conftest*
18403   ol_cv_db_db3=no
18404 fi
18405 rm -f conftest*
18406
18407         LIBS="$ol_LIBS"
18408
18409 fi
18410
18411 echo "$ac_t""$ol_cv_db_db3" 1>&6
18412
18413         if test $ol_cv_db_db3 = yes ; then
18414                 ol_cv_lib_db=-ldb3
18415         fi
18416 fi
18417
18418 if test $ol_cv_lib_db = no ; then
18419         echo $ac_n "checking for Berkeley DB link (-ldb-3)""... $ac_c" 1>&6
18420 echo "configure:18421: checking for Berkeley DB link (-ldb-3)" >&5
18421 if eval "test \"\${ol_cv_db_db_3+set}\" = set"; then
18422   echo $ac_n "(cached) $ac_c" 1>&6
18423 else
18424   
18425         ol_DB_LIB=-ldb-3
18426         ol_LIBS=$LIBS
18427         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18428
18429         cat > conftest.$ac_ext <<EOF
18430 #line 18431 "configure"
18431 #include "confdefs.h"
18432
18433 #ifdef HAVE_DB_185_H
18434 # include <db_185.h>
18435 #else
18436 # include <db.h>
18437 #endif
18438
18439 #ifndef DB_VERSION_MAJOR
18440 # define DB_VERSION_MAJOR 1
18441 #endif
18442
18443 #ifndef NULL
18444 #define NULL ((void*)0)
18445 #endif
18446
18447 int main() {
18448
18449 #if DB_VERSION_MAJOR > 1
18450         {
18451                 char *version;
18452                 int major, minor, patch;
18453
18454                 version = db_version( &major, &minor, &patch );
18455
18456                 if( major != DB_VERSION_MAJOR ||
18457                         minor < DB_VERSION_MINOR )
18458                 {
18459                         printf("Berkeley DB version mismatch\n"
18460                                 "\theader: %s\n\tlibrary: %s\n",
18461                                 DB_VERSION_STRING, version);
18462                         return 1;
18463                 }
18464         }
18465 #endif
18466
18467 #if DB_VERSION_MAJOR > 2
18468         db_env_create( NULL, 0 );
18469 #elif DB_VERSION_MAJOR > 1
18470         db_appexit( NULL );
18471 #else
18472         (void) dbopen( NULL, 0, 0, 0, NULL);
18473 #endif
18474
18475 ; return 0; }
18476 EOF
18477 if { (eval echo configure:18478: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18478   rm -rf conftest*
18479   ol_cv_db_db_3=yes
18480 else
18481   echo "configure: failed program was:" >&5
18482   cat conftest.$ac_ext >&5
18483   rm -rf conftest*
18484   ol_cv_db_db_3=no
18485 fi
18486 rm -f conftest*
18487
18488         LIBS="$ol_LIBS"
18489
18490 fi
18491
18492 echo "$ac_t""$ol_cv_db_db_3" 1>&6
18493
18494         if test $ol_cv_db_db_3 = yes ; then
18495                 ol_cv_lib_db=-ldb-3
18496         fi
18497 fi
18498
18499 if test $ol_cv_lib_db = no ; then
18500         echo $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6
18501 echo "configure:18502: checking for Berkeley DB link (-ldb2)" >&5
18502 if eval "test \"\${ol_cv_db_db2+set}\" = set"; then
18503   echo $ac_n "(cached) $ac_c" 1>&6
18504 else
18505   
18506         ol_DB_LIB=-ldb2
18507         ol_LIBS=$LIBS
18508         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18509
18510         cat > conftest.$ac_ext <<EOF
18511 #line 18512 "configure"
18512 #include "confdefs.h"
18513
18514 #ifdef HAVE_DB_185_H
18515 # include <db_185.h>
18516 #else
18517 # include <db.h>
18518 #endif
18519
18520 #ifndef DB_VERSION_MAJOR
18521 # define DB_VERSION_MAJOR 1
18522 #endif
18523
18524 #ifndef NULL
18525 #define NULL ((void*)0)
18526 #endif
18527
18528 int main() {
18529
18530 #if DB_VERSION_MAJOR > 1
18531         {
18532                 char *version;
18533                 int major, minor, patch;
18534
18535                 version = db_version( &major, &minor, &patch );
18536
18537                 if( major != DB_VERSION_MAJOR ||
18538                         minor < DB_VERSION_MINOR )
18539                 {
18540                         printf("Berkeley DB version mismatch\n"
18541                                 "\theader: %s\n\tlibrary: %s\n",
18542                                 DB_VERSION_STRING, version);
18543                         return 1;
18544                 }
18545         }
18546 #endif
18547
18548 #if DB_VERSION_MAJOR > 2
18549         db_env_create( NULL, 0 );
18550 #elif DB_VERSION_MAJOR > 1
18551         db_appexit( NULL );
18552 #else
18553         (void) dbopen( NULL, 0, 0, 0, NULL);
18554 #endif
18555
18556 ; return 0; }
18557 EOF
18558 if { (eval echo configure:18559: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18559   rm -rf conftest*
18560   ol_cv_db_db2=yes
18561 else
18562   echo "configure: failed program was:" >&5
18563   cat conftest.$ac_ext >&5
18564   rm -rf conftest*
18565   ol_cv_db_db2=no
18566 fi
18567 rm -f conftest*
18568
18569         LIBS="$ol_LIBS"
18570
18571 fi
18572
18573 echo "$ac_t""$ol_cv_db_db2" 1>&6
18574
18575         if test $ol_cv_db_db2 = yes ; then
18576                 ol_cv_lib_db=-ldb2
18577         fi
18578 fi
18579
18580 if test $ol_cv_lib_db = no ; then
18581         echo $ac_n "checking for Berkeley DB link (-ldb-2)""... $ac_c" 1>&6
18582 echo "configure:18583: checking for Berkeley DB link (-ldb-2)" >&5
18583 if eval "test \"\${ol_cv_db_db_2+set}\" = set"; then
18584   echo $ac_n "(cached) $ac_c" 1>&6
18585 else
18586   
18587         ol_DB_LIB=-ldb-2
18588         ol_LIBS=$LIBS
18589         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18590
18591         cat > conftest.$ac_ext <<EOF
18592 #line 18593 "configure"
18593 #include "confdefs.h"
18594
18595 #ifdef HAVE_DB_185_H
18596 # include <db_185.h>
18597 #else
18598 # include <db.h>
18599 #endif
18600
18601 #ifndef DB_VERSION_MAJOR
18602 # define DB_VERSION_MAJOR 1
18603 #endif
18604
18605 #ifndef NULL
18606 #define NULL ((void*)0)
18607 #endif
18608
18609 int main() {
18610
18611 #if DB_VERSION_MAJOR > 1
18612         {
18613                 char *version;
18614                 int major, minor, patch;
18615
18616                 version = db_version( &major, &minor, &patch );
18617
18618                 if( major != DB_VERSION_MAJOR ||
18619                         minor < DB_VERSION_MINOR )
18620                 {
18621                         printf("Berkeley DB version mismatch\n"
18622                                 "\theader: %s\n\tlibrary: %s\n",
18623                                 DB_VERSION_STRING, version);
18624                         return 1;
18625                 }
18626         }
18627 #endif
18628
18629 #if DB_VERSION_MAJOR > 2
18630         db_env_create( NULL, 0 );
18631 #elif DB_VERSION_MAJOR > 1
18632         db_appexit( NULL );
18633 #else
18634         (void) dbopen( NULL, 0, 0, 0, NULL);
18635 #endif
18636
18637 ; return 0; }
18638 EOF
18639 if { (eval echo configure:18640: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18640   rm -rf conftest*
18641   ol_cv_db_db_2=yes
18642 else
18643   echo "configure: failed program was:" >&5
18644   cat conftest.$ac_ext >&5
18645   rm -rf conftest*
18646   ol_cv_db_db_2=no
18647 fi
18648 rm -f conftest*
18649
18650         LIBS="$ol_LIBS"
18651
18652 fi
18653
18654 echo "$ac_t""$ol_cv_db_db_2" 1>&6
18655
18656         if test $ol_cv_db_db_2 = yes ; then
18657                 ol_cv_lib_db=-ldb-2
18658         fi
18659 fi
18660
18661 if test $ol_cv_lib_db = no ; then
18662         echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6
18663 echo "configure:18664: checking for Berkeley DB link (-ldb1)" >&5
18664 if eval "test \"\${ol_cv_db_db1+set}\" = set"; then
18665   echo $ac_n "(cached) $ac_c" 1>&6
18666 else
18667   
18668         ol_DB_LIB=-ldb1
18669         ol_LIBS=$LIBS
18670         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18671
18672         cat > conftest.$ac_ext <<EOF
18673 #line 18674 "configure"
18674 #include "confdefs.h"
18675
18676 #ifdef HAVE_DB_185_H
18677 # include <db_185.h>
18678 #else
18679 # include <db.h>
18680 #endif
18681
18682 #ifndef DB_VERSION_MAJOR
18683 # define DB_VERSION_MAJOR 1
18684 #endif
18685
18686 #ifndef NULL
18687 #define NULL ((void*)0)
18688 #endif
18689
18690 int main() {
18691
18692 #if DB_VERSION_MAJOR > 1
18693         {
18694                 char *version;
18695                 int major, minor, patch;
18696
18697                 version = db_version( &major, &minor, &patch );
18698
18699                 if( major != DB_VERSION_MAJOR ||
18700                         minor < DB_VERSION_MINOR )
18701                 {
18702                         printf("Berkeley DB version mismatch\n"
18703                                 "\theader: %s\n\tlibrary: %s\n",
18704                                 DB_VERSION_STRING, version);
18705                         return 1;
18706                 }
18707         }
18708 #endif
18709
18710 #if DB_VERSION_MAJOR > 2
18711         db_env_create( NULL, 0 );
18712 #elif DB_VERSION_MAJOR > 1
18713         db_appexit( NULL );
18714 #else
18715         (void) dbopen( NULL, 0, 0, 0, NULL);
18716 #endif
18717
18718 ; return 0; }
18719 EOF
18720 if { (eval echo configure:18721: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18721   rm -rf conftest*
18722   ol_cv_db_db1=yes
18723 else
18724   echo "configure: failed program was:" >&5
18725   cat conftest.$ac_ext >&5
18726   rm -rf conftest*
18727   ol_cv_db_db1=no
18728 fi
18729 rm -f conftest*
18730
18731         LIBS="$ol_LIBS"
18732
18733 fi
18734
18735 echo "$ac_t""$ol_cv_db_db1" 1>&6
18736
18737         if test $ol_cv_db_db1 = yes ; then
18738                 ol_cv_lib_db=-ldb1
18739         fi
18740 fi
18741
18742 if test $ol_cv_lib_db = no ; then
18743         echo $ac_n "checking for Berkeley DB link (-ldb-1)""... $ac_c" 1>&6
18744 echo "configure:18745: checking for Berkeley DB link (-ldb-1)" >&5
18745 if eval "test \"\${ol_cv_db_db_1+set}\" = set"; then
18746   echo $ac_n "(cached) $ac_c" 1>&6
18747 else
18748   
18749         ol_DB_LIB=-ldb-1
18750         ol_LIBS=$LIBS
18751         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18752
18753         cat > conftest.$ac_ext <<EOF
18754 #line 18755 "configure"
18755 #include "confdefs.h"
18756
18757 #ifdef HAVE_DB_185_H
18758 # include <db_185.h>
18759 #else
18760 # include <db.h>
18761 #endif
18762
18763 #ifndef DB_VERSION_MAJOR
18764 # define DB_VERSION_MAJOR 1
18765 #endif
18766
18767 #ifndef NULL
18768 #define NULL ((void*)0)
18769 #endif
18770
18771 int main() {
18772
18773 #if DB_VERSION_MAJOR > 1
18774         {
18775                 char *version;
18776                 int major, minor, patch;
18777
18778                 version = db_version( &major, &minor, &patch );
18779
18780                 if( major != DB_VERSION_MAJOR ||
18781                         minor < DB_VERSION_MINOR )
18782                 {
18783                         printf("Berkeley DB version mismatch\n"
18784                                 "\theader: %s\n\tlibrary: %s\n",
18785                                 DB_VERSION_STRING, version);
18786                         return 1;
18787                 }
18788         }
18789 #endif
18790
18791 #if DB_VERSION_MAJOR > 2
18792         db_env_create( NULL, 0 );
18793 #elif DB_VERSION_MAJOR > 1
18794         db_appexit( NULL );
18795 #else
18796         (void) dbopen( NULL, 0, 0, 0, NULL);
18797 #endif
18798
18799 ; return 0; }
18800 EOF
18801 if { (eval echo configure:18802: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18802   rm -rf conftest*
18803   ol_cv_db_db_1=yes
18804 else
18805   echo "configure: failed program was:" >&5
18806   cat conftest.$ac_ext >&5
18807   rm -rf conftest*
18808   ol_cv_db_db_1=no
18809 fi
18810 rm -f conftest*
18811
18812         LIBS="$ol_LIBS"
18813
18814 fi
18815
18816 echo "$ac_t""$ol_cv_db_db_1" 1>&6
18817
18818         if test $ol_cv_db_db_1 = yes ; then
18819                 ol_cv_lib_db=-ldb-1
18820         fi
18821 fi
18822
18823
18824                 if test "$ol_cv_lib_db" != no ; then
18825                         ol_cv_berkeley_db=yes
18826                 fi
18827         fi
18828 fi
18829
18830         else
18831                 ol_cv_berkeley_db=no
18832 for ac_hdr in db.h
18833 do
18834 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
18835 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
18836 echo "configure:18837: checking for $ac_hdr" >&5
18837 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
18838   echo $ac_n "(cached) $ac_c" 1>&6
18839 else
18840   cat > conftest.$ac_ext <<EOF
18841 #line 18842 "configure"
18842 #include "confdefs.h"
18843 #include <$ac_hdr>
18844 EOF
18845 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
18846 { (eval echo configure:18847: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
18847 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
18848 if test -z "$ac_err"; then
18849   rm -rf conftest*
18850   eval "ac_cv_header_$ac_safe=yes"
18851 else
18852   echo "$ac_err" >&5
18853   echo "configure: failed program was:" >&5
18854   cat conftest.$ac_ext >&5
18855   rm -rf conftest*
18856   eval "ac_cv_header_$ac_safe=no"
18857 fi
18858 rm -f conftest*
18859 fi
18860 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
18861   echo "$ac_t""yes" 1>&6
18862     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
18863   cat >> confdefs.h <<EOF
18864 #define $ac_tr_hdr 1
18865 EOF
18866  
18867 else
18868   echo "$ac_t""no" 1>&6
18869 fi
18870 done
18871
18872 if test $ac_cv_header_db_h = yes; then
18873         ol_cv_lib_db=no
18874 if test $ol_cv_lib_db = no ; then
18875         echo $ac_n "checking for Berkeley DB link (default)""... $ac_c" 1>&6
18876 echo "configure:18877: checking for Berkeley DB link (default)" >&5
18877 if eval "test \"\${ol_cv_db_none+set}\" = set"; then
18878   echo $ac_n "(cached) $ac_c" 1>&6
18879 else
18880   
18881         ol_DB_LIB=
18882         ol_LIBS=$LIBS
18883         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18884
18885         cat > conftest.$ac_ext <<EOF
18886 #line 18887 "configure"
18887 #include "confdefs.h"
18888
18889 #ifdef HAVE_DB_185_H
18890 # include <db_185.h>
18891 #else
18892 # include <db.h>
18893 #endif
18894
18895 #ifndef DB_VERSION_MAJOR
18896 # define DB_VERSION_MAJOR 1
18897 #endif
18898
18899 #ifndef NULL
18900 #define NULL ((void*)0)
18901 #endif
18902
18903 int main() {
18904
18905 #if DB_VERSION_MAJOR > 1
18906         {
18907                 char *version;
18908                 int major, minor, patch;
18909
18910                 version = db_version( &major, &minor, &patch );
18911
18912                 if( major != DB_VERSION_MAJOR ||
18913                         minor < DB_VERSION_MINOR )
18914                 {
18915                         printf("Berkeley DB version mismatch\n"
18916                                 "\theader: %s\n\tlibrary: %s\n",
18917                                 DB_VERSION_STRING, version);
18918                         return 1;
18919                 }
18920         }
18921 #endif
18922
18923 #if DB_VERSION_MAJOR > 2
18924         db_env_create( NULL, 0 );
18925 #elif DB_VERSION_MAJOR > 1
18926         db_appexit( NULL );
18927 #else
18928         (void) dbopen( NULL, 0, 0, 0, NULL);
18929 #endif
18930
18931 ; return 0; }
18932 EOF
18933 if { (eval echo configure:18934: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18934   rm -rf conftest*
18935   ol_cv_db_none=yes
18936 else
18937   echo "configure: failed program was:" >&5
18938   cat conftest.$ac_ext >&5
18939   rm -rf conftest*
18940   ol_cv_db_none=no
18941 fi
18942 rm -f conftest*
18943
18944         LIBS="$ol_LIBS"
18945
18946 fi
18947
18948 echo "$ac_t""$ol_cv_db_none" 1>&6
18949
18950         if test $ol_cv_db_none = yes ; then
18951                 ol_cv_lib_db=yes
18952         fi
18953 fi
18954
18955 if test $ol_cv_lib_db = no ; then
18956         echo $ac_n "checking for Berkeley DB link (-ldb43)""... $ac_c" 1>&6
18957 echo "configure:18958: checking for Berkeley DB link (-ldb43)" >&5
18958 if eval "test \"\${ol_cv_db_db43+set}\" = set"; then
18959   echo $ac_n "(cached) $ac_c" 1>&6
18960 else
18961   
18962         ol_DB_LIB=-ldb43
18963         ol_LIBS=$LIBS
18964         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18965
18966         cat > conftest.$ac_ext <<EOF
18967 #line 18968 "configure"
18968 #include "confdefs.h"
18969
18970 #ifdef HAVE_DB_185_H
18971 # include <db_185.h>
18972 #else
18973 # include <db.h>
18974 #endif
18975
18976 #ifndef DB_VERSION_MAJOR
18977 # define DB_VERSION_MAJOR 1
18978 #endif
18979
18980 #ifndef NULL
18981 #define NULL ((void*)0)
18982 #endif
18983
18984 int main() {
18985
18986 #if DB_VERSION_MAJOR > 1
18987         {
18988                 char *version;
18989                 int major, minor, patch;
18990
18991                 version = db_version( &major, &minor, &patch );
18992
18993                 if( major != DB_VERSION_MAJOR ||
18994                         minor < DB_VERSION_MINOR )
18995                 {
18996                         printf("Berkeley DB version mismatch\n"
18997                                 "\theader: %s\n\tlibrary: %s\n",
18998                                 DB_VERSION_STRING, version);
18999                         return 1;
19000                 }
19001         }
19002 #endif
19003
19004 #if DB_VERSION_MAJOR > 2
19005         db_env_create( NULL, 0 );
19006 #elif DB_VERSION_MAJOR > 1
19007         db_appexit( NULL );
19008 #else
19009         (void) dbopen( NULL, 0, 0, 0, NULL);
19010 #endif
19011
19012 ; return 0; }
19013 EOF
19014 if { (eval echo configure:19015: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19015   rm -rf conftest*
19016   ol_cv_db_db43=yes
19017 else
19018   echo "configure: failed program was:" >&5
19019   cat conftest.$ac_ext >&5
19020   rm -rf conftest*
19021   ol_cv_db_db43=no
19022 fi
19023 rm -f conftest*
19024
19025         LIBS="$ol_LIBS"
19026
19027 fi
19028
19029 echo "$ac_t""$ol_cv_db_db43" 1>&6
19030
19031         if test $ol_cv_db_db43 = yes ; then
19032                 ol_cv_lib_db=-ldb43
19033         fi
19034 fi
19035
19036 if test $ol_cv_lib_db = no ; then
19037         echo $ac_n "checking for Berkeley DB link (-ldb-43)""... $ac_c" 1>&6
19038 echo "configure:19039: checking for Berkeley DB link (-ldb-43)" >&5
19039 if eval "test \"\${ol_cv_db_db_43+set}\" = set"; then
19040   echo $ac_n "(cached) $ac_c" 1>&6
19041 else
19042   
19043         ol_DB_LIB=-ldb-43
19044         ol_LIBS=$LIBS
19045         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19046
19047         cat > conftest.$ac_ext <<EOF
19048 #line 19049 "configure"
19049 #include "confdefs.h"
19050
19051 #ifdef HAVE_DB_185_H
19052 # include <db_185.h>
19053 #else
19054 # include <db.h>
19055 #endif
19056
19057 #ifndef DB_VERSION_MAJOR
19058 # define DB_VERSION_MAJOR 1
19059 #endif
19060
19061 #ifndef NULL
19062 #define NULL ((void*)0)
19063 #endif
19064
19065 int main() {
19066
19067 #if DB_VERSION_MAJOR > 1
19068         {
19069                 char *version;
19070                 int major, minor, patch;
19071
19072                 version = db_version( &major, &minor, &patch );
19073
19074                 if( major != DB_VERSION_MAJOR ||
19075                         minor < DB_VERSION_MINOR )
19076                 {
19077                         printf("Berkeley DB version mismatch\n"
19078                                 "\theader: %s\n\tlibrary: %s\n",
19079                                 DB_VERSION_STRING, version);
19080                         return 1;
19081                 }
19082         }
19083 #endif
19084
19085 #if DB_VERSION_MAJOR > 2
19086         db_env_create( NULL, 0 );
19087 #elif DB_VERSION_MAJOR > 1
19088         db_appexit( NULL );
19089 #else
19090         (void) dbopen( NULL, 0, 0, 0, NULL);
19091 #endif
19092
19093 ; return 0; }
19094 EOF
19095 if { (eval echo configure:19096: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19096   rm -rf conftest*
19097   ol_cv_db_db_43=yes
19098 else
19099   echo "configure: failed program was:" >&5
19100   cat conftest.$ac_ext >&5
19101   rm -rf conftest*
19102   ol_cv_db_db_43=no
19103 fi
19104 rm -f conftest*
19105
19106         LIBS="$ol_LIBS"
19107
19108 fi
19109
19110 echo "$ac_t""$ol_cv_db_db_43" 1>&6
19111
19112         if test $ol_cv_db_db_43 = yes ; then
19113                 ol_cv_lib_db=-ldb-43
19114         fi
19115 fi
19116
19117 if test $ol_cv_lib_db = no ; then
19118         echo $ac_n "checking for Berkeley DB link (-ldb-4.3)""... $ac_c" 1>&6
19119 echo "configure:19120: checking for Berkeley DB link (-ldb-4.3)" >&5
19120 if eval "test \"\${ol_cv_db_db_4_dot_3+set}\" = set"; then
19121   echo $ac_n "(cached) $ac_c" 1>&6
19122 else
19123   
19124         ol_DB_LIB=-ldb-4.3
19125         ol_LIBS=$LIBS
19126         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19127
19128         cat > conftest.$ac_ext <<EOF
19129 #line 19130 "configure"
19130 #include "confdefs.h"
19131
19132 #ifdef HAVE_DB_185_H
19133 # include <db_185.h>
19134 #else
19135 # include <db.h>
19136 #endif
19137
19138 #ifndef DB_VERSION_MAJOR
19139 # define DB_VERSION_MAJOR 1
19140 #endif
19141
19142 #ifndef NULL
19143 #define NULL ((void*)0)
19144 #endif
19145
19146 int main() {
19147
19148 #if DB_VERSION_MAJOR > 1
19149         {
19150                 char *version;
19151                 int major, minor, patch;
19152
19153                 version = db_version( &major, &minor, &patch );
19154
19155                 if( major != DB_VERSION_MAJOR ||
19156                         minor < DB_VERSION_MINOR )
19157                 {
19158                         printf("Berkeley DB version mismatch\n"
19159                                 "\theader: %s\n\tlibrary: %s\n",
19160                                 DB_VERSION_STRING, version);
19161                         return 1;
19162                 }
19163         }
19164 #endif
19165
19166 #if DB_VERSION_MAJOR > 2
19167         db_env_create( NULL, 0 );
19168 #elif DB_VERSION_MAJOR > 1
19169         db_appexit( NULL );
19170 #else
19171         (void) dbopen( NULL, 0, 0, 0, NULL);
19172 #endif
19173
19174 ; return 0; }
19175 EOF
19176 if { (eval echo configure:19177: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19177   rm -rf conftest*
19178   ol_cv_db_db_4_dot_3=yes
19179 else
19180   echo "configure: failed program was:" >&5
19181   cat conftest.$ac_ext >&5
19182   rm -rf conftest*
19183   ol_cv_db_db_4_dot_3=no
19184 fi
19185 rm -f conftest*
19186
19187         LIBS="$ol_LIBS"
19188
19189 fi
19190
19191 echo "$ac_t""$ol_cv_db_db_4_dot_3" 1>&6
19192
19193         if test $ol_cv_db_db_4_dot_3 = yes ; then
19194                 ol_cv_lib_db=-ldb-4.3
19195         fi
19196 fi
19197
19198 if test $ol_cv_lib_db = no ; then
19199         echo $ac_n "checking for Berkeley DB link (-ldb-4-3)""... $ac_c" 1>&6
19200 echo "configure:19201: checking for Berkeley DB link (-ldb-4-3)" >&5
19201 if eval "test \"\${ol_cv_db_db_4_3+set}\" = set"; then
19202   echo $ac_n "(cached) $ac_c" 1>&6
19203 else
19204   
19205         ol_DB_LIB=-ldb-4-3
19206         ol_LIBS=$LIBS
19207         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19208
19209         cat > conftest.$ac_ext <<EOF
19210 #line 19211 "configure"
19211 #include "confdefs.h"
19212
19213 #ifdef HAVE_DB_185_H
19214 # include <db_185.h>
19215 #else
19216 # include <db.h>
19217 #endif
19218
19219 #ifndef DB_VERSION_MAJOR
19220 # define DB_VERSION_MAJOR 1
19221 #endif
19222
19223 #ifndef NULL
19224 #define NULL ((void*)0)
19225 #endif
19226
19227 int main() {
19228
19229 #if DB_VERSION_MAJOR > 1
19230         {
19231                 char *version;
19232                 int major, minor, patch;
19233
19234                 version = db_version( &major, &minor, &patch );
19235
19236                 if( major != DB_VERSION_MAJOR ||
19237                         minor < DB_VERSION_MINOR )
19238                 {
19239                         printf("Berkeley DB version mismatch\n"
19240                                 "\theader: %s\n\tlibrary: %s\n",
19241                                 DB_VERSION_STRING, version);
19242                         return 1;
19243                 }
19244         }
19245 #endif
19246
19247 #if DB_VERSION_MAJOR > 2
19248         db_env_create( NULL, 0 );
19249 #elif DB_VERSION_MAJOR > 1
19250         db_appexit( NULL );
19251 #else
19252         (void) dbopen( NULL, 0, 0, 0, NULL);
19253 #endif
19254
19255 ; return 0; }
19256 EOF
19257 if { (eval echo configure:19258: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19258   rm -rf conftest*
19259   ol_cv_db_db_4_3=yes
19260 else
19261   echo "configure: failed program was:" >&5
19262   cat conftest.$ac_ext >&5
19263   rm -rf conftest*
19264   ol_cv_db_db_4_3=no
19265 fi
19266 rm -f conftest*
19267
19268         LIBS="$ol_LIBS"
19269
19270 fi
19271
19272 echo "$ac_t""$ol_cv_db_db_4_3" 1>&6
19273
19274         if test $ol_cv_db_db_4_3 = yes ; then
19275                 ol_cv_lib_db=-ldb-4-3
19276         fi
19277 fi
19278
19279 if test $ol_cv_lib_db = no ; then
19280         echo $ac_n "checking for Berkeley DB link (-ldb42)""... $ac_c" 1>&6
19281 echo "configure:19282: checking for Berkeley DB link (-ldb42)" >&5
19282 if eval "test \"\${ol_cv_db_db42+set}\" = set"; then
19283   echo $ac_n "(cached) $ac_c" 1>&6
19284 else
19285   
19286         ol_DB_LIB=-ldb42
19287         ol_LIBS=$LIBS
19288         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19289
19290         cat > conftest.$ac_ext <<EOF
19291 #line 19292 "configure"
19292 #include "confdefs.h"
19293
19294 #ifdef HAVE_DB_185_H
19295 # include <db_185.h>
19296 #else
19297 # include <db.h>
19298 #endif
19299
19300 #ifndef DB_VERSION_MAJOR
19301 # define DB_VERSION_MAJOR 1
19302 #endif
19303
19304 #ifndef NULL
19305 #define NULL ((void*)0)
19306 #endif
19307
19308 int main() {
19309
19310 #if DB_VERSION_MAJOR > 1
19311         {
19312                 char *version;
19313                 int major, minor, patch;
19314
19315                 version = db_version( &major, &minor, &patch );
19316
19317                 if( major != DB_VERSION_MAJOR ||
19318                         minor < DB_VERSION_MINOR )
19319                 {
19320                         printf("Berkeley DB version mismatch\n"
19321                                 "\theader: %s\n\tlibrary: %s\n",
19322                                 DB_VERSION_STRING, version);
19323                         return 1;
19324                 }
19325         }
19326 #endif
19327
19328 #if DB_VERSION_MAJOR > 2
19329         db_env_create( NULL, 0 );
19330 #elif DB_VERSION_MAJOR > 1
19331         db_appexit( NULL );
19332 #else
19333         (void) dbopen( NULL, 0, 0, 0, NULL);
19334 #endif
19335
19336 ; return 0; }
19337 EOF
19338 if { (eval echo configure:19339: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19339   rm -rf conftest*
19340   ol_cv_db_db42=yes
19341 else
19342   echo "configure: failed program was:" >&5
19343   cat conftest.$ac_ext >&5
19344   rm -rf conftest*
19345   ol_cv_db_db42=no
19346 fi
19347 rm -f conftest*
19348
19349         LIBS="$ol_LIBS"
19350
19351 fi
19352
19353 echo "$ac_t""$ol_cv_db_db42" 1>&6
19354
19355         if test $ol_cv_db_db42 = yes ; then
19356                 ol_cv_lib_db=-ldb42
19357         fi
19358 fi
19359
19360 if test $ol_cv_lib_db = no ; then
19361         echo $ac_n "checking for Berkeley DB link (-ldb-42)""... $ac_c" 1>&6
19362 echo "configure:19363: checking for Berkeley DB link (-ldb-42)" >&5
19363 if eval "test \"\${ol_cv_db_db_42+set}\" = set"; then
19364   echo $ac_n "(cached) $ac_c" 1>&6
19365 else
19366   
19367         ol_DB_LIB=-ldb-42
19368         ol_LIBS=$LIBS
19369         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19370
19371         cat > conftest.$ac_ext <<EOF
19372 #line 19373 "configure"
19373 #include "confdefs.h"
19374
19375 #ifdef HAVE_DB_185_H
19376 # include <db_185.h>
19377 #else
19378 # include <db.h>
19379 #endif
19380
19381 #ifndef DB_VERSION_MAJOR
19382 # define DB_VERSION_MAJOR 1
19383 #endif
19384
19385 #ifndef NULL
19386 #define NULL ((void*)0)
19387 #endif
19388
19389 int main() {
19390
19391 #if DB_VERSION_MAJOR > 1
19392         {
19393                 char *version;
19394                 int major, minor, patch;
19395
19396                 version = db_version( &major, &minor, &patch );
19397
19398                 if( major != DB_VERSION_MAJOR ||
19399                         minor < DB_VERSION_MINOR )
19400                 {
19401                         printf("Berkeley DB version mismatch\n"
19402                                 "\theader: %s\n\tlibrary: %s\n",
19403                                 DB_VERSION_STRING, version);
19404                         return 1;
19405                 }
19406         }
19407 #endif
19408
19409 #if DB_VERSION_MAJOR > 2
19410         db_env_create( NULL, 0 );
19411 #elif DB_VERSION_MAJOR > 1
19412         db_appexit( NULL );
19413 #else
19414         (void) dbopen( NULL, 0, 0, 0, NULL);
19415 #endif
19416
19417 ; return 0; }
19418 EOF
19419 if { (eval echo configure:19420: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19420   rm -rf conftest*
19421   ol_cv_db_db_42=yes
19422 else
19423   echo "configure: failed program was:" >&5
19424   cat conftest.$ac_ext >&5
19425   rm -rf conftest*
19426   ol_cv_db_db_42=no
19427 fi
19428 rm -f conftest*
19429
19430         LIBS="$ol_LIBS"
19431
19432 fi
19433
19434 echo "$ac_t""$ol_cv_db_db_42" 1>&6
19435
19436         if test $ol_cv_db_db_42 = yes ; then
19437                 ol_cv_lib_db=-ldb-42
19438         fi
19439 fi
19440
19441 if test $ol_cv_lib_db = no ; then
19442         echo $ac_n "checking for Berkeley DB link (-ldb-4.2)""... $ac_c" 1>&6
19443 echo "configure:19444: checking for Berkeley DB link (-ldb-4.2)" >&5
19444 if eval "test \"\${ol_cv_db_db_4_dot_2+set}\" = set"; then
19445   echo $ac_n "(cached) $ac_c" 1>&6
19446 else
19447   
19448         ol_DB_LIB=-ldb-4.2
19449         ol_LIBS=$LIBS
19450         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19451
19452         cat > conftest.$ac_ext <<EOF
19453 #line 19454 "configure"
19454 #include "confdefs.h"
19455
19456 #ifdef HAVE_DB_185_H
19457 # include <db_185.h>
19458 #else
19459 # include <db.h>
19460 #endif
19461
19462 #ifndef DB_VERSION_MAJOR
19463 # define DB_VERSION_MAJOR 1
19464 #endif
19465
19466 #ifndef NULL
19467 #define NULL ((void*)0)
19468 #endif
19469
19470 int main() {
19471
19472 #if DB_VERSION_MAJOR > 1
19473         {
19474                 char *version;
19475                 int major, minor, patch;
19476
19477                 version = db_version( &major, &minor, &patch );
19478
19479                 if( major != DB_VERSION_MAJOR ||
19480                         minor < DB_VERSION_MINOR )
19481                 {
19482                         printf("Berkeley DB version mismatch\n"
19483                                 "\theader: %s\n\tlibrary: %s\n",
19484                                 DB_VERSION_STRING, version);
19485                         return 1;
19486                 }
19487         }
19488 #endif
19489
19490 #if DB_VERSION_MAJOR > 2
19491         db_env_create( NULL, 0 );
19492 #elif DB_VERSION_MAJOR > 1
19493         db_appexit( NULL );
19494 #else
19495         (void) dbopen( NULL, 0, 0, 0, NULL);
19496 #endif
19497
19498 ; return 0; }
19499 EOF
19500 if { (eval echo configure:19501: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19501   rm -rf conftest*
19502   ol_cv_db_db_4_dot_2=yes
19503 else
19504   echo "configure: failed program was:" >&5
19505   cat conftest.$ac_ext >&5
19506   rm -rf conftest*
19507   ol_cv_db_db_4_dot_2=no
19508 fi
19509 rm -f conftest*
19510
19511         LIBS="$ol_LIBS"
19512
19513 fi
19514
19515 echo "$ac_t""$ol_cv_db_db_4_dot_2" 1>&6
19516
19517         if test $ol_cv_db_db_4_dot_2 = yes ; then
19518                 ol_cv_lib_db=-ldb-4.2
19519         fi
19520 fi
19521
19522 if test $ol_cv_lib_db = no ; then
19523         echo $ac_n "checking for Berkeley DB link (-ldb-4-2)""... $ac_c" 1>&6
19524 echo "configure:19525: checking for Berkeley DB link (-ldb-4-2)" >&5
19525 if eval "test \"\${ol_cv_db_db_4_2+set}\" = set"; then
19526   echo $ac_n "(cached) $ac_c" 1>&6
19527 else
19528   
19529         ol_DB_LIB=-ldb-4-2
19530         ol_LIBS=$LIBS
19531         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19532
19533         cat > conftest.$ac_ext <<EOF
19534 #line 19535 "configure"
19535 #include "confdefs.h"
19536
19537 #ifdef HAVE_DB_185_H
19538 # include <db_185.h>
19539 #else
19540 # include <db.h>
19541 #endif
19542
19543 #ifndef DB_VERSION_MAJOR
19544 # define DB_VERSION_MAJOR 1
19545 #endif
19546
19547 #ifndef NULL
19548 #define NULL ((void*)0)
19549 #endif
19550
19551 int main() {
19552
19553 #if DB_VERSION_MAJOR > 1
19554         {
19555                 char *version;
19556                 int major, minor, patch;
19557
19558                 version = db_version( &major, &minor, &patch );
19559
19560                 if( major != DB_VERSION_MAJOR ||
19561                         minor < DB_VERSION_MINOR )
19562                 {
19563                         printf("Berkeley DB version mismatch\n"
19564                                 "\theader: %s\n\tlibrary: %s\n",
19565                                 DB_VERSION_STRING, version);
19566                         return 1;
19567                 }
19568         }
19569 #endif
19570
19571 #if DB_VERSION_MAJOR > 2
19572         db_env_create( NULL, 0 );
19573 #elif DB_VERSION_MAJOR > 1
19574         db_appexit( NULL );
19575 #else
19576         (void) dbopen( NULL, 0, 0, 0, NULL);
19577 #endif
19578
19579 ; return 0; }
19580 EOF
19581 if { (eval echo configure:19582: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19582   rm -rf conftest*
19583   ol_cv_db_db_4_2=yes
19584 else
19585   echo "configure: failed program was:" >&5
19586   cat conftest.$ac_ext >&5
19587   rm -rf conftest*
19588   ol_cv_db_db_4_2=no
19589 fi
19590 rm -f conftest*
19591
19592         LIBS="$ol_LIBS"
19593
19594 fi
19595
19596 echo "$ac_t""$ol_cv_db_db_4_2" 1>&6
19597
19598         if test $ol_cv_db_db_4_2 = yes ; then
19599                 ol_cv_lib_db=-ldb-4-2
19600         fi
19601 fi
19602
19603 if test $ol_cv_lib_db = no ; then
19604         echo $ac_n "checking for Berkeley DB link (-ldb-4)""... $ac_c" 1>&6
19605 echo "configure:19606: checking for Berkeley DB link (-ldb-4)" >&5
19606 if eval "test \"\${ol_cv_db_db_4+set}\" = set"; then
19607   echo $ac_n "(cached) $ac_c" 1>&6
19608 else
19609   
19610         ol_DB_LIB=-ldb-4
19611         ol_LIBS=$LIBS
19612         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19613
19614         cat > conftest.$ac_ext <<EOF
19615 #line 19616 "configure"
19616 #include "confdefs.h"
19617
19618 #ifdef HAVE_DB_185_H
19619 # include <db_185.h>
19620 #else
19621 # include <db.h>
19622 #endif
19623
19624 #ifndef DB_VERSION_MAJOR
19625 # define DB_VERSION_MAJOR 1
19626 #endif
19627
19628 #ifndef NULL
19629 #define NULL ((void*)0)
19630 #endif
19631
19632 int main() {
19633
19634 #if DB_VERSION_MAJOR > 1
19635         {
19636                 char *version;
19637                 int major, minor, patch;
19638
19639                 version = db_version( &major, &minor, &patch );
19640
19641                 if( major != DB_VERSION_MAJOR ||
19642                         minor < DB_VERSION_MINOR )
19643                 {
19644                         printf("Berkeley DB version mismatch\n"
19645                                 "\theader: %s\n\tlibrary: %s\n",
19646                                 DB_VERSION_STRING, version);
19647                         return 1;
19648                 }
19649         }
19650 #endif
19651
19652 #if DB_VERSION_MAJOR > 2
19653         db_env_create( NULL, 0 );
19654 #elif DB_VERSION_MAJOR > 1
19655         db_appexit( NULL );
19656 #else
19657         (void) dbopen( NULL, 0, 0, 0, NULL);
19658 #endif
19659
19660 ; return 0; }
19661 EOF
19662 if { (eval echo configure:19663: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19663   rm -rf conftest*
19664   ol_cv_db_db_4=yes
19665 else
19666   echo "configure: failed program was:" >&5
19667   cat conftest.$ac_ext >&5
19668   rm -rf conftest*
19669   ol_cv_db_db_4=no
19670 fi
19671 rm -f conftest*
19672
19673         LIBS="$ol_LIBS"
19674
19675 fi
19676
19677 echo "$ac_t""$ol_cv_db_db_4" 1>&6
19678
19679         if test $ol_cv_db_db_4 = yes ; then
19680                 ol_cv_lib_db=-ldb-4
19681         fi
19682 fi
19683
19684 if test $ol_cv_lib_db = no ; then
19685         echo $ac_n "checking for Berkeley DB link (-ldb4)""... $ac_c" 1>&6
19686 echo "configure:19687: checking for Berkeley DB link (-ldb4)" >&5
19687 if eval "test \"\${ol_cv_db_db4+set}\" = set"; then
19688   echo $ac_n "(cached) $ac_c" 1>&6
19689 else
19690   
19691         ol_DB_LIB=-ldb4
19692         ol_LIBS=$LIBS
19693         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19694
19695         cat > conftest.$ac_ext <<EOF
19696 #line 19697 "configure"
19697 #include "confdefs.h"
19698
19699 #ifdef HAVE_DB_185_H
19700 # include <db_185.h>
19701 #else
19702 # include <db.h>
19703 #endif
19704
19705 #ifndef DB_VERSION_MAJOR
19706 # define DB_VERSION_MAJOR 1
19707 #endif
19708
19709 #ifndef NULL
19710 #define NULL ((void*)0)
19711 #endif
19712
19713 int main() {
19714
19715 #if DB_VERSION_MAJOR > 1
19716         {
19717                 char *version;
19718                 int major, minor, patch;
19719
19720                 version = db_version( &major, &minor, &patch );
19721
19722                 if( major != DB_VERSION_MAJOR ||
19723                         minor < DB_VERSION_MINOR )
19724                 {
19725                         printf("Berkeley DB version mismatch\n"
19726                                 "\theader: %s\n\tlibrary: %s\n",
19727                                 DB_VERSION_STRING, version);
19728                         return 1;
19729                 }
19730         }
19731 #endif
19732
19733 #if DB_VERSION_MAJOR > 2
19734         db_env_create( NULL, 0 );
19735 #elif DB_VERSION_MAJOR > 1
19736         db_appexit( NULL );
19737 #else
19738         (void) dbopen( NULL, 0, 0, 0, NULL);
19739 #endif
19740
19741 ; return 0; }
19742 EOF
19743 if { (eval echo configure:19744: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19744   rm -rf conftest*
19745   ol_cv_db_db4=yes
19746 else
19747   echo "configure: failed program was:" >&5
19748   cat conftest.$ac_ext >&5
19749   rm -rf conftest*
19750   ol_cv_db_db4=no
19751 fi
19752 rm -f conftest*
19753
19754         LIBS="$ol_LIBS"
19755
19756 fi
19757
19758 echo "$ac_t""$ol_cv_db_db4" 1>&6
19759
19760         if test $ol_cv_db_db4 = yes ; then
19761                 ol_cv_lib_db=-ldb4
19762         fi
19763 fi
19764
19765 if test $ol_cv_lib_db = no ; then
19766         echo $ac_n "checking for Berkeley DB link (-ldb)""... $ac_c" 1>&6
19767 echo "configure:19768: checking for Berkeley DB link (-ldb)" >&5
19768 if eval "test \"\${ol_cv_db_db+set}\" = set"; then
19769   echo $ac_n "(cached) $ac_c" 1>&6
19770 else
19771   
19772         ol_DB_LIB=-ldb
19773         ol_LIBS=$LIBS
19774         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19775
19776         cat > conftest.$ac_ext <<EOF
19777 #line 19778 "configure"
19778 #include "confdefs.h"
19779
19780 #ifdef HAVE_DB_185_H
19781 # include <db_185.h>
19782 #else
19783 # include <db.h>
19784 #endif
19785
19786 #ifndef DB_VERSION_MAJOR
19787 # define DB_VERSION_MAJOR 1
19788 #endif
19789
19790 #ifndef NULL
19791 #define NULL ((void*)0)
19792 #endif
19793
19794 int main() {
19795
19796 #if DB_VERSION_MAJOR > 1
19797         {
19798                 char *version;
19799                 int major, minor, patch;
19800
19801                 version = db_version( &major, &minor, &patch );
19802
19803                 if( major != DB_VERSION_MAJOR ||
19804                         minor < DB_VERSION_MINOR )
19805                 {
19806                         printf("Berkeley DB version mismatch\n"
19807                                 "\theader: %s\n\tlibrary: %s\n",
19808                                 DB_VERSION_STRING, version);
19809                         return 1;
19810                 }
19811         }
19812 #endif
19813
19814 #if DB_VERSION_MAJOR > 2
19815         db_env_create( NULL, 0 );
19816 #elif DB_VERSION_MAJOR > 1
19817         db_appexit( NULL );
19818 #else
19819         (void) dbopen( NULL, 0, 0, 0, NULL);
19820 #endif
19821
19822 ; return 0; }
19823 EOF
19824 if { (eval echo configure:19825: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19825   rm -rf conftest*
19826   ol_cv_db_db=yes
19827 else
19828   echo "configure: failed program was:" >&5
19829   cat conftest.$ac_ext >&5
19830   rm -rf conftest*
19831   ol_cv_db_db=no
19832 fi
19833 rm -f conftest*
19834
19835         LIBS="$ol_LIBS"
19836
19837 fi
19838
19839 echo "$ac_t""$ol_cv_db_db" 1>&6
19840
19841         if test $ol_cv_db_db = yes ; then
19842                 ol_cv_lib_db=-ldb
19843         fi
19844 fi
19845
19846 if test $ol_cv_lib_db = no ; then
19847         echo $ac_n "checking for Berkeley DB link (-ldb41)""... $ac_c" 1>&6
19848 echo "configure:19849: checking for Berkeley DB link (-ldb41)" >&5
19849 if eval "test \"\${ol_cv_db_db41+set}\" = set"; then
19850   echo $ac_n "(cached) $ac_c" 1>&6
19851 else
19852   
19853         ol_DB_LIB=-ldb41
19854         ol_LIBS=$LIBS
19855         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19856
19857         cat > conftest.$ac_ext <<EOF
19858 #line 19859 "configure"
19859 #include "confdefs.h"
19860
19861 #ifdef HAVE_DB_185_H
19862 # include <db_185.h>
19863 #else
19864 # include <db.h>
19865 #endif
19866
19867 #ifndef DB_VERSION_MAJOR
19868 # define DB_VERSION_MAJOR 1
19869 #endif
19870
19871 #ifndef NULL
19872 #define NULL ((void*)0)
19873 #endif
19874
19875 int main() {
19876
19877 #if DB_VERSION_MAJOR > 1
19878         {
19879                 char *version;
19880                 int major, minor, patch;
19881
19882                 version = db_version( &major, &minor, &patch );
19883
19884                 if( major != DB_VERSION_MAJOR ||
19885                         minor < DB_VERSION_MINOR )
19886                 {
19887                         printf("Berkeley DB version mismatch\n"
19888                                 "\theader: %s\n\tlibrary: %s\n",
19889                                 DB_VERSION_STRING, version);
19890                         return 1;
19891                 }
19892         }
19893 #endif
19894
19895 #if DB_VERSION_MAJOR > 2
19896         db_env_create( NULL, 0 );
19897 #elif DB_VERSION_MAJOR > 1
19898         db_appexit( NULL );
19899 #else
19900         (void) dbopen( NULL, 0, 0, 0, NULL);
19901 #endif
19902
19903 ; return 0; }
19904 EOF
19905 if { (eval echo configure:19906: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19906   rm -rf conftest*
19907   ol_cv_db_db41=yes
19908 else
19909   echo "configure: failed program was:" >&5
19910   cat conftest.$ac_ext >&5
19911   rm -rf conftest*
19912   ol_cv_db_db41=no
19913 fi
19914 rm -f conftest*
19915
19916         LIBS="$ol_LIBS"
19917
19918 fi
19919
19920 echo "$ac_t""$ol_cv_db_db41" 1>&6
19921
19922         if test $ol_cv_db_db41 = yes ; then
19923                 ol_cv_lib_db=-ldb41
19924         fi
19925 fi
19926
19927 if test $ol_cv_lib_db = no ; then
19928         echo $ac_n "checking for Berkeley DB link (-ldb-41)""... $ac_c" 1>&6
19929 echo "configure:19930: checking for Berkeley DB link (-ldb-41)" >&5
19930 if eval "test \"\${ol_cv_db_db_41+set}\" = set"; then
19931   echo $ac_n "(cached) $ac_c" 1>&6
19932 else
19933   
19934         ol_DB_LIB=-ldb-41
19935         ol_LIBS=$LIBS
19936         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19937
19938         cat > conftest.$ac_ext <<EOF
19939 #line 19940 "configure"
19940 #include "confdefs.h"
19941
19942 #ifdef HAVE_DB_185_H
19943 # include <db_185.h>
19944 #else
19945 # include <db.h>
19946 #endif
19947
19948 #ifndef DB_VERSION_MAJOR
19949 # define DB_VERSION_MAJOR 1
19950 #endif
19951
19952 #ifndef NULL
19953 #define NULL ((void*)0)
19954 #endif
19955
19956 int main() {
19957
19958 #if DB_VERSION_MAJOR > 1
19959         {
19960                 char *version;
19961                 int major, minor, patch;
19962
19963                 version = db_version( &major, &minor, &patch );
19964
19965                 if( major != DB_VERSION_MAJOR ||
19966                         minor < DB_VERSION_MINOR )
19967                 {
19968                         printf("Berkeley DB version mismatch\n"
19969                                 "\theader: %s\n\tlibrary: %s\n",
19970                                 DB_VERSION_STRING, version);
19971                         return 1;
19972                 }
19973         }
19974 #endif
19975
19976 #if DB_VERSION_MAJOR > 2
19977         db_env_create( NULL, 0 );
19978 #elif DB_VERSION_MAJOR > 1
19979         db_appexit( NULL );
19980 #else
19981         (void) dbopen( NULL, 0, 0, 0, NULL);
19982 #endif
19983
19984 ; return 0; }
19985 EOF
19986 if { (eval echo configure:19987: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19987   rm -rf conftest*
19988   ol_cv_db_db_41=yes
19989 else
19990   echo "configure: failed program was:" >&5
19991   cat conftest.$ac_ext >&5
19992   rm -rf conftest*
19993   ol_cv_db_db_41=no
19994 fi
19995 rm -f conftest*
19996
19997         LIBS="$ol_LIBS"
19998
19999 fi
20000
20001 echo "$ac_t""$ol_cv_db_db_41" 1>&6
20002
20003         if test $ol_cv_db_db_41 = yes ; then
20004                 ol_cv_lib_db=-ldb-41
20005         fi
20006 fi
20007
20008 if test $ol_cv_lib_db = no ; then
20009         echo $ac_n "checking for Berkeley DB link (-ldb-4.1)""... $ac_c" 1>&6
20010 echo "configure:20011: checking for Berkeley DB link (-ldb-4.1)" >&5
20011 if eval "test \"\${ol_cv_db_db_4_dot_1+set}\" = set"; then
20012   echo $ac_n "(cached) $ac_c" 1>&6
20013 else
20014   
20015         ol_DB_LIB=-ldb-4.1
20016         ol_LIBS=$LIBS
20017         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
20018
20019         cat > conftest.$ac_ext <<EOF
20020 #line 20021 "configure"
20021 #include "confdefs.h"
20022
20023 #ifdef HAVE_DB_185_H
20024 # include <db_185.h>
20025 #else
20026 # include <db.h>
20027 #endif
20028
20029 #ifndef DB_VERSION_MAJOR
20030 # define DB_VERSION_MAJOR 1
20031 #endif
20032
20033 #ifndef NULL
20034 #define NULL ((void*)0)
20035 #endif
20036
20037 int main() {
20038
20039 #if DB_VERSION_MAJOR > 1
20040         {
20041                 char *version;
20042                 int major, minor, patch;
20043
20044                 version = db_version( &major, &minor, &patch );
20045
20046                 if( major != DB_VERSION_MAJOR ||
20047                         minor < DB_VERSION_MINOR )
20048                 {
20049                         printf("Berkeley DB version mismatch\n"
20050                                 "\theader: %s\n\tlibrary: %s\n",
20051                                 DB_VERSION_STRING, version);
20052                         return 1;
20053                 }
20054         }
20055 #endif
20056
20057 #if DB_VERSION_MAJOR > 2
20058         db_env_create( NULL, 0 );
20059 #elif DB_VERSION_MAJOR > 1
20060         db_appexit( NULL );
20061 #else
20062         (void) dbopen( NULL, 0, 0, 0, NULL);
20063 #endif
20064
20065 ; return 0; }
20066 EOF
20067 if { (eval echo configure:20068: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20068   rm -rf conftest*
20069   ol_cv_db_db_4_dot_1=yes
20070 else
20071   echo "configure: failed program was:" >&5
20072   cat conftest.$ac_ext >&5
20073   rm -rf conftest*
20074   ol_cv_db_db_4_dot_1=no
20075 fi
20076 rm -f conftest*
20077
20078         LIBS="$ol_LIBS"
20079
20080 fi
20081
20082 echo "$ac_t""$ol_cv_db_db_4_dot_1" 1>&6
20083
20084         if test $ol_cv_db_db_4_dot_1 = yes ; then
20085                 ol_cv_lib_db=-ldb-4.1
20086         fi
20087 fi
20088
20089 if test $ol_cv_lib_db = no ; then
20090         echo $ac_n "checking for Berkeley DB link (-ldb-4-1)""... $ac_c" 1>&6
20091 echo "configure:20092: checking for Berkeley DB link (-ldb-4-1)" >&5
20092 if eval "test \"\${ol_cv_db_db_4_1+set}\" = set"; then
20093   echo $ac_n "(cached) $ac_c" 1>&6
20094 else
20095   
20096         ol_DB_LIB=-ldb-4-1
20097         ol_LIBS=$LIBS
20098         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
20099
20100         cat > conftest.$ac_ext <<EOF
20101 #line 20102 "configure"
20102 #include "confdefs.h"
20103
20104 #ifdef HAVE_DB_185_H
20105 # include <db_185.h>
20106 #else
20107 # include <db.h>
20108 #endif
20109
20110 #ifndef DB_VERSION_MAJOR
20111 # define DB_VERSION_MAJOR 1
20112 #endif
20113
20114 #ifndef NULL
20115 #define NULL ((void*)0)
20116 #endif
20117
20118 int main() {
20119
20120 #if DB_VERSION_MAJOR > 1
20121         {
20122                 char *version;
20123                 int major, minor, patch;
20124
20125                 version = db_version( &major, &minor, &patch );
20126
20127                 if( major != DB_VERSION_MAJOR ||
20128                         minor < DB_VERSION_MINOR )
20129                 {
20130                         printf("Berkeley DB version mismatch\n"
20131                                 "\theader: %s\n\tlibrary: %s\n",
20132                                 DB_VERSION_STRING, version);
20133                         return 1;
20134                 }
20135         }
20136 #endif
20137
20138 #if DB_VERSION_MAJOR > 2
20139         db_env_create( NULL, 0 );
20140 #elif DB_VERSION_MAJOR > 1
20141         db_appexit( NULL );
20142 #else
20143         (void) dbopen( NULL, 0, 0, 0, NULL);
20144 #endif
20145
20146 ; return 0; }
20147 EOF
20148 if { (eval echo configure:20149: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20149   rm -rf conftest*
20150   ol_cv_db_db_4_1=yes
20151 else
20152   echo "configure: failed program was:" >&5
20153   cat conftest.$ac_ext >&5
20154   rm -rf conftest*
20155   ol_cv_db_db_4_1=no
20156 fi
20157 rm -f conftest*
20158
20159         LIBS="$ol_LIBS"
20160
20161 fi
20162
20163 echo "$ac_t""$ol_cv_db_db_4_1" 1>&6
20164
20165         if test $ol_cv_db_db_4_1 = yes ; then
20166                 ol_cv_lib_db=-ldb-4-1
20167         fi
20168 fi
20169
20170 if test $ol_cv_lib_db = no ; then
20171         echo $ac_n "checking for Berkeley DB link (-ldb3)""... $ac_c" 1>&6
20172 echo "configure:20173: checking for Berkeley DB link (-ldb3)" >&5
20173 if eval "test \"\${ol_cv_db_db3+set}\" = set"; then
20174   echo $ac_n "(cached) $ac_c" 1>&6
20175 else
20176   
20177         ol_DB_LIB=-ldb3
20178         ol_LIBS=$LIBS
20179         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
20180
20181         cat > conftest.$ac_ext <<EOF
20182 #line 20183 "configure"
20183 #include "confdefs.h"
20184
20185 #ifdef HAVE_DB_185_H
20186 # include <db_185.h>
20187 #else
20188 # include <db.h>
20189 #endif
20190
20191 #ifndef DB_VERSION_MAJOR
20192 # define DB_VERSION_MAJOR 1
20193 #endif
20194
20195 #ifndef NULL
20196 #define NULL ((void*)0)
20197 #endif
20198
20199 int main() {
20200
20201 #if DB_VERSION_MAJOR > 1
20202         {
20203                 char *version;
20204                 int major, minor, patch;
20205
20206                 version = db_version( &major, &minor, &patch );
20207
20208                 if( major != DB_VERSION_MAJOR ||
20209                         minor < DB_VERSION_MINOR )
20210                 {
20211                         printf("Berkeley DB version mismatch\n"
20212                                 "\theader: %s\n\tlibrary: %s\n",
20213                                 DB_VERSION_STRING, version);
20214                         return 1;
20215                 }
20216         }
20217 #endif
20218
20219 #if DB_VERSION_MAJOR > 2
20220         db_env_create( NULL, 0 );
20221 #elif DB_VERSION_MAJOR > 1
20222         db_appexit( NULL );
20223 #else
20224         (void) dbopen( NULL, 0, 0, 0, NULL);
20225 #endif
20226
20227 ; return 0; }
20228 EOF
20229 if { (eval echo configure:20230: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20230   rm -rf conftest*
20231   ol_cv_db_db3=yes
20232 else
20233   echo "configure: failed program was:" >&5
20234   cat conftest.$ac_ext >&5
20235   rm -rf conftest*
20236   ol_cv_db_db3=no
20237 fi
20238 rm -f conftest*
20239
20240         LIBS="$ol_LIBS"
20241
20242 fi
20243
20244 echo "$ac_t""$ol_cv_db_db3" 1>&6
20245
20246         if test $ol_cv_db_db3 = yes ; then
20247                 ol_cv_lib_db=-ldb3
20248         fi
20249 fi
20250
20251 if test $ol_cv_lib_db = no ; then
20252         echo $ac_n "checking for Berkeley DB link (-ldb-3)""... $ac_c" 1>&6
20253 echo "configure:20254: checking for Berkeley DB link (-ldb-3)" >&5
20254 if eval "test \"\${ol_cv_db_db_3+set}\" = set"; then
20255   echo $ac_n "(cached) $ac_c" 1>&6
20256 else
20257   
20258         ol_DB_LIB=-ldb-3
20259         ol_LIBS=$LIBS
20260         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
20261
20262         cat > conftest.$ac_ext <<EOF
20263 #line 20264 "configure"
20264 #include "confdefs.h"
20265
20266 #ifdef HAVE_DB_185_H
20267 # include <db_185.h>
20268 #else
20269 # include <db.h>
20270 #endif
20271
20272 #ifndef DB_VERSION_MAJOR
20273 # define DB_VERSION_MAJOR 1
20274 #endif
20275
20276 #ifndef NULL
20277 #define NULL ((void*)0)
20278 #endif
20279
20280 int main() {
20281
20282 #if DB_VERSION_MAJOR > 1
20283         {
20284                 char *version;
20285                 int major, minor, patch;
20286
20287                 version = db_version( &major, &minor, &patch );
20288
20289                 if( major != DB_VERSION_MAJOR ||
20290                         minor < DB_VERSION_MINOR )
20291                 {
20292                         printf("Berkeley DB version mismatch\n"
20293                                 "\theader: %s\n\tlibrary: %s\n",
20294                                 DB_VERSION_STRING, version);
20295                         return 1;
20296                 }
20297         }
20298 #endif
20299
20300 #if DB_VERSION_MAJOR > 2
20301         db_env_create( NULL, 0 );
20302 #elif DB_VERSION_MAJOR > 1
20303         db_appexit( NULL );
20304 #else
20305         (void) dbopen( NULL, 0, 0, 0, NULL);
20306 #endif
20307
20308 ; return 0; }
20309 EOF
20310 if { (eval echo configure:20311: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20311   rm -rf conftest*
20312   ol_cv_db_db_3=yes
20313 else
20314   echo "configure: failed program was:" >&5
20315   cat conftest.$ac_ext >&5
20316   rm -rf conftest*
20317   ol_cv_db_db_3=no
20318 fi
20319 rm -f conftest*
20320
20321         LIBS="$ol_LIBS"
20322
20323 fi
20324
20325 echo "$ac_t""$ol_cv_db_db_3" 1>&6
20326
20327         if test $ol_cv_db_db_3 = yes ; then
20328                 ol_cv_lib_db=-ldb-3
20329         fi
20330 fi
20331
20332 if test $ol_cv_lib_db = no ; then
20333         echo $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6
20334 echo "configure:20335: checking for Berkeley DB link (-ldb2)" >&5
20335 if eval "test \"\${ol_cv_db_db2+set}\" = set"; then
20336   echo $ac_n "(cached) $ac_c" 1>&6
20337 else
20338   
20339         ol_DB_LIB=-ldb2
20340         ol_LIBS=$LIBS
20341         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
20342
20343         cat > conftest.$ac_ext <<EOF
20344 #line 20345 "configure"
20345 #include "confdefs.h"
20346
20347 #ifdef HAVE_DB_185_H
20348 # include <db_185.h>
20349 #else
20350 # include <db.h>
20351 #endif
20352
20353 #ifndef DB_VERSION_MAJOR
20354 # define DB_VERSION_MAJOR 1
20355 #endif
20356
20357 #ifndef NULL
20358 #define NULL ((void*)0)
20359 #endif
20360
20361 int main() {
20362
20363 #if DB_VERSION_MAJOR > 1
20364         {
20365                 char *version;
20366                 int major, minor, patch;
20367
20368                 version = db_version( &major, &minor, &patch );
20369
20370                 if( major != DB_VERSION_MAJOR ||
20371                         minor < DB_VERSION_MINOR )
20372                 {
20373                         printf("Berkeley DB version mismatch\n"
20374                                 "\theader: %s\n\tlibrary: %s\n",
20375                                 DB_VERSION_STRING, version);
20376                         return 1;
20377                 }
20378         }
20379 #endif
20380
20381 #if DB_VERSION_MAJOR > 2
20382         db_env_create( NULL, 0 );
20383 #elif DB_VERSION_MAJOR > 1
20384         db_appexit( NULL );
20385 #else
20386         (void) dbopen( NULL, 0, 0, 0, NULL);
20387 #endif
20388
20389 ; return 0; }
20390 EOF
20391 if { (eval echo configure:20392: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20392   rm -rf conftest*
20393   ol_cv_db_db2=yes
20394 else
20395   echo "configure: failed program was:" >&5
20396   cat conftest.$ac_ext >&5
20397   rm -rf conftest*
20398   ol_cv_db_db2=no
20399 fi
20400 rm -f conftest*
20401
20402         LIBS="$ol_LIBS"
20403
20404 fi
20405
20406 echo "$ac_t""$ol_cv_db_db2" 1>&6
20407
20408         if test $ol_cv_db_db2 = yes ; then
20409                 ol_cv_lib_db=-ldb2
20410         fi
20411 fi
20412
20413 if test $ol_cv_lib_db = no ; then
20414         echo $ac_n "checking for Berkeley DB link (-ldb-2)""... $ac_c" 1>&6
20415 echo "configure:20416: checking for Berkeley DB link (-ldb-2)" >&5
20416 if eval "test \"\${ol_cv_db_db_2+set}\" = set"; then
20417   echo $ac_n "(cached) $ac_c" 1>&6
20418 else
20419   
20420         ol_DB_LIB=-ldb-2
20421         ol_LIBS=$LIBS
20422         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
20423
20424         cat > conftest.$ac_ext <<EOF
20425 #line 20426 "configure"
20426 #include "confdefs.h"
20427
20428 #ifdef HAVE_DB_185_H
20429 # include <db_185.h>
20430 #else
20431 # include <db.h>
20432 #endif
20433
20434 #ifndef DB_VERSION_MAJOR
20435 # define DB_VERSION_MAJOR 1
20436 #endif
20437
20438 #ifndef NULL
20439 #define NULL ((void*)0)
20440 #endif
20441
20442 int main() {
20443
20444 #if DB_VERSION_MAJOR > 1
20445         {
20446                 char *version;
20447                 int major, minor, patch;
20448
20449                 version = db_version( &major, &minor, &patch );
20450
20451                 if( major != DB_VERSION_MAJOR ||
20452                         minor < DB_VERSION_MINOR )
20453                 {
20454                         printf("Berkeley DB version mismatch\n"
20455                                 "\theader: %s\n\tlibrary: %s\n",
20456                                 DB_VERSION_STRING, version);
20457                         return 1;
20458                 }
20459         }
20460 #endif
20461
20462 #if DB_VERSION_MAJOR > 2
20463         db_env_create( NULL, 0 );
20464 #elif DB_VERSION_MAJOR > 1
20465         db_appexit( NULL );
20466 #else
20467         (void) dbopen( NULL, 0, 0, 0, NULL);
20468 #endif
20469
20470 ; return 0; }
20471 EOF
20472 if { (eval echo configure:20473: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20473   rm -rf conftest*
20474   ol_cv_db_db_2=yes
20475 else
20476   echo "configure: failed program was:" >&5
20477   cat conftest.$ac_ext >&5
20478   rm -rf conftest*
20479   ol_cv_db_db_2=no
20480 fi
20481 rm -f conftest*
20482
20483         LIBS="$ol_LIBS"
20484
20485 fi
20486
20487 echo "$ac_t""$ol_cv_db_db_2" 1>&6
20488
20489         if test $ol_cv_db_db_2 = yes ; then
20490                 ol_cv_lib_db=-ldb-2
20491         fi
20492 fi
20493
20494 if test $ol_cv_lib_db = no ; then
20495         echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6
20496 echo "configure:20497: checking for Berkeley DB link (-ldb1)" >&5
20497 if eval "test \"\${ol_cv_db_db1+set}\" = set"; then
20498   echo $ac_n "(cached) $ac_c" 1>&6
20499 else
20500   
20501         ol_DB_LIB=-ldb1
20502         ol_LIBS=$LIBS
20503         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
20504
20505         cat > conftest.$ac_ext <<EOF
20506 #line 20507 "configure"
20507 #include "confdefs.h"
20508
20509 #ifdef HAVE_DB_185_H
20510 # include <db_185.h>
20511 #else
20512 # include <db.h>
20513 #endif
20514
20515 #ifndef DB_VERSION_MAJOR
20516 # define DB_VERSION_MAJOR 1
20517 #endif
20518
20519 #ifndef NULL
20520 #define NULL ((void*)0)
20521 #endif
20522
20523 int main() {
20524
20525 #if DB_VERSION_MAJOR > 1
20526         {
20527                 char *version;
20528                 int major, minor, patch;
20529
20530                 version = db_version( &major, &minor, &patch );
20531
20532                 if( major != DB_VERSION_MAJOR ||
20533                         minor < DB_VERSION_MINOR )
20534                 {
20535                         printf("Berkeley DB version mismatch\n"
20536                                 "\theader: %s\n\tlibrary: %s\n",
20537                                 DB_VERSION_STRING, version);
20538                         return 1;
20539                 }
20540         }
20541 #endif
20542
20543 #if DB_VERSION_MAJOR > 2
20544         db_env_create( NULL, 0 );
20545 #elif DB_VERSION_MAJOR > 1
20546         db_appexit( NULL );
20547 #else
20548         (void) dbopen( NULL, 0, 0, 0, NULL);
20549 #endif
20550
20551 ; return 0; }
20552 EOF
20553 if { (eval echo configure:20554: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20554   rm -rf conftest*
20555   ol_cv_db_db1=yes
20556 else
20557   echo "configure: failed program was:" >&5
20558   cat conftest.$ac_ext >&5
20559   rm -rf conftest*
20560   ol_cv_db_db1=no
20561 fi
20562 rm -f conftest*
20563
20564         LIBS="$ol_LIBS"
20565
20566 fi
20567
20568 echo "$ac_t""$ol_cv_db_db1" 1>&6
20569
20570         if test $ol_cv_db_db1 = yes ; then
20571                 ol_cv_lib_db=-ldb1
20572         fi
20573 fi
20574
20575 if test $ol_cv_lib_db = no ; then
20576         echo $ac_n "checking for Berkeley DB link (-ldb-1)""... $ac_c" 1>&6
20577 echo "configure:20578: checking for Berkeley DB link (-ldb-1)" >&5
20578 if eval "test \"\${ol_cv_db_db_1+set}\" = set"; then
20579   echo $ac_n "(cached) $ac_c" 1>&6
20580 else
20581   
20582         ol_DB_LIB=-ldb-1
20583         ol_LIBS=$LIBS
20584         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
20585
20586         cat > conftest.$ac_ext <<EOF
20587 #line 20588 "configure"
20588 #include "confdefs.h"
20589
20590 #ifdef HAVE_DB_185_H
20591 # include <db_185.h>
20592 #else
20593 # include <db.h>
20594 #endif
20595
20596 #ifndef DB_VERSION_MAJOR
20597 # define DB_VERSION_MAJOR 1
20598 #endif
20599
20600 #ifndef NULL
20601 #define NULL ((void*)0)
20602 #endif
20603
20604 int main() {
20605
20606 #if DB_VERSION_MAJOR > 1
20607         {
20608                 char *version;
20609                 int major, minor, patch;
20610
20611                 version = db_version( &major, &minor, &patch );
20612
20613                 if( major != DB_VERSION_MAJOR ||
20614                         minor < DB_VERSION_MINOR )
20615                 {
20616                         printf("Berkeley DB version mismatch\n"
20617                                 "\theader: %s\n\tlibrary: %s\n",
20618                                 DB_VERSION_STRING, version);
20619                         return 1;
20620                 }
20621         }
20622 #endif
20623
20624 #if DB_VERSION_MAJOR > 2
20625         db_env_create( NULL, 0 );
20626 #elif DB_VERSION_MAJOR > 1
20627         db_appexit( NULL );
20628 #else
20629         (void) dbopen( NULL, 0, 0, 0, NULL);
20630 #endif
20631
20632 ; return 0; }
20633 EOF
20634 if { (eval echo configure:20635: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20635   rm -rf conftest*
20636   ol_cv_db_db_1=yes
20637 else
20638   echo "configure: failed program was:" >&5
20639   cat conftest.$ac_ext >&5
20640   rm -rf conftest*
20641   ol_cv_db_db_1=no
20642 fi
20643 rm -f conftest*
20644
20645         LIBS="$ol_LIBS"
20646
20647 fi
20648
20649 echo "$ac_t""$ol_cv_db_db_1" 1>&6
20650
20651         if test $ol_cv_db_db_1 = yes ; then
20652                 ol_cv_lib_db=-ldb-1
20653         fi
20654 fi
20655
20656
20657         if test "$ol_cv_lib_db" != no ; then
20658                 ol_cv_berkeley_db=yes
20659                 echo $ac_n "checking for Berkeley DB version match""... $ac_c" 1>&6
20660 echo "configure:20661: checking for Berkeley DB version match" >&5
20661 if eval "test \"\${ol_cv_berkeley_db_version+set}\" = set"; then
20662   echo $ac_n "(cached) $ac_c" 1>&6
20663 else
20664   
20665         ol_LIBS="$LIBS"
20666         LIBS="$LTHREAD_LIBS $LIBS"
20667         if test $ol_cv_lib_db != yes ; then
20668                 LIBS="$ol_cv_lib_db $LIBS"
20669         fi
20670
20671         if test "$cross_compiling" = yes; then
20672   ol_cv_berkeley_db_version=cross
20673 else
20674   cat > conftest.$ac_ext <<EOF
20675 #line 20676 "configure"
20676 #include "confdefs.h"
20677
20678 #ifdef HAVE_DB_185_H
20679         choke me;
20680 #else
20681 #include <db.h>
20682 #endif
20683 #ifndef DB_VERSION_MAJOR
20684 # define DB_VERSION_MAJOR 1
20685 #endif
20686 #ifndef NULL
20687 #define NULL ((void *)0)
20688 #endif
20689 main()
20690 {
20691 #if DB_VERSION_MAJOR > 1
20692         char *version;
20693         int major, minor, patch;
20694
20695         version = db_version( &major, &minor, &patch );
20696
20697         if( major != DB_VERSION_MAJOR || minor < DB_VERSION_MINOR ) {
20698                 printf("Berkeley DB version mismatch\n"
20699                         "\theader: %s\n\tlibrary: %s\n",
20700                         DB_VERSION_STRING, version);
20701                 return 1;
20702         }
20703 #endif
20704
20705         return 0;
20706 }
20707 EOF
20708 if { (eval echo configure:20709: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
20709 then
20710   ol_cv_berkeley_db_version=yes
20711 else
20712   echo "configure: failed program was:" >&5
20713   cat conftest.$ac_ext >&5
20714   rm -fr conftest*
20715   ol_cv_berkeley_db_version=no
20716 fi
20717 rm -fr conftest*
20718 fi
20719
20720
20721         LIBS="$ol_LIBS"
20722
20723 fi
20724
20725 echo "$ac_t""$ol_cv_berkeley_db_version" 1>&6
20726
20727         if test $ol_cv_berkeley_db_version = no ; then
20728                 { echo "configure: error: Berkeley DB version mismatch" 1>&2; exit 1; }
20729         fi
20730
20731                 echo $ac_n "checking for Berkeley DB thread support""... $ac_c" 1>&6
20732 echo "configure:20733: checking for Berkeley DB thread support" >&5
20733 if eval "test \"\${ol_cv_berkeley_db_thread+set}\" = set"; then
20734   echo $ac_n "(cached) $ac_c" 1>&6
20735 else
20736   
20737         ol_LIBS="$LIBS"
20738         LIBS="$LTHREAD_LIBS $LIBS"
20739         if test $ol_cv_lib_db != yes ; then
20740                 LIBS="$ol_cv_lib_db $LIBS"
20741         fi
20742
20743         if test "$cross_compiling" = yes; then
20744   ol_cv_berkeley_db_thread=cross
20745 else
20746   cat > conftest.$ac_ext <<EOF
20747 #line 20748 "configure"
20748 #include "confdefs.h"
20749
20750 #ifdef HAVE_DB_185_H
20751         choke me;
20752 #else
20753 #include <db.h>
20754 #endif
20755 #ifndef NULL
20756 #define NULL ((void *)0)
20757 #endif
20758 main()
20759 {
20760         int rc;
20761         u_int32_t flags = DB_CREATE |
20762 #ifdef DB_PRIVATE
20763                 DB_PRIVATE |
20764 #endif
20765                 DB_THREAD;
20766
20767 #if DB_VERSION_MAJOR > 2
20768         DB_ENV *env = NULL;
20769
20770         rc = db_env_create( &env, 0 );
20771
20772         flags |= DB_INIT_MPOOL;
20773 #ifdef DB_MPOOL_PRIVATE
20774         flags |= DB_MPOOL_PRIVATE;
20775 #endif
20776
20777         if( rc ) {
20778                 printf("BerkeleyDB: %s\n", db_strerror(rc) );
20779                 return rc;
20780         }
20781
20782 #if (DB_VERSION_MAJOR > 3) || (DB_VERSION_MINOR >= 1)
20783         rc = env->open( env, NULL, flags, 0 );
20784 #else
20785         rc = env->open( env, NULL, NULL, flags, 0 );
20786 #endif
20787
20788         if ( rc == 0 ) {
20789                 rc = env->close( env, 0 );
20790         }
20791
20792         if( rc ) {
20793                 printf("BerkeleyDB: %s\n", db_strerror(rc) );
20794                 return rc;
20795         }
20796
20797 #else
20798         DB_ENV env;
20799         memset( &env, '\0', sizeof(env) );
20800
20801         rc = db_appinit( NULL, NULL, &env, flags );
20802
20803         if( rc == 0 ) {
20804                 db_appexit( &env );
20805         }
20806
20807         unlink("__db_mpool.share");
20808         unlink("__db_lock.share");
20809 #endif
20810
20811         return rc;
20812 }
20813 EOF
20814 if { (eval echo configure:20815: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
20815 then
20816   ol_cv_berkeley_db_thread=yes
20817 else
20818   echo "configure: failed program was:" >&5
20819   cat conftest.$ac_ext >&5
20820   rm -fr conftest*
20821   ol_cv_berkeley_db_thread=no
20822 fi
20823 rm -fr conftest*
20824 fi
20825
20826
20827         LIBS="$ol_LIBS"
20828
20829 fi
20830
20831 echo "$ac_t""$ol_cv_berkeley_db_thread" 1>&6
20832
20833         if test $ol_cv_berkeley_db_thread != no ; then
20834                 cat >> confdefs.h <<\EOF
20835 #define HAVE_BERKELEY_DB_THREAD 1
20836 EOF
20837
20838         fi
20839
20840         fi
20841 fi
20842
20843         fi
20844
20845         if test $ol_cv_berkeley_db != no ; then
20846                 cat >> confdefs.h <<\EOF
20847 #define HAVE_BERKELEY_DB 1
20848 EOF
20849
20850
20851                 ol_link_ldbm=berkeley
20852                 ol_with_ldbm_api=berkeley
20853
20854                 if test $ol_with_ldbm_type = hash ; then
20855                         cat >> confdefs.h <<\EOF
20856 #define LDBM_USE_DBHASH 1
20857 EOF
20858
20859                 else
20860                         cat >> confdefs.h <<\EOF
20861 #define LDBM_USE_DBBTREE 1
20862 EOF
20863
20864                 fi
20865
20866                                                 if test $ol_cv_lib_db != yes ; then
20867                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db"
20868                 fi
20869         fi
20870 fi
20871
20872 if test $ol_enable_bdb != no -o $ol_enable_hdb != no; then
20873         if test $ol_link_ldbm != berkeley ; then
20874                 { echo "configure: error: BDB/HDB: BerkeleyDB not available" 1>&2; exit 1; }
20875         else
20876                 echo $ac_n "checking Berkeley DB version for BDB backend""... $ac_c" 1>&6
20877 echo "configure:20878: checking Berkeley DB version for BDB backend" >&5
20878 if eval "test \"\${ol_cv_bdb_compat+set}\" = set"; then
20879   echo $ac_n "(cached) $ac_c" 1>&6
20880 else
20881   
20882         cat > conftest.$ac_ext <<EOF
20883 #line 20884 "configure"
20884 #include "confdefs.h"
20885
20886 #include <db.h>
20887
20888  /* this check could be improved */
20889 #ifndef DB_VERSION_MAJOR
20890 #       define DB_VERSION_MAJOR 1
20891 #endif
20892 #ifndef DB_VERSION_MINOR
20893 #       define DB_VERSION_MINOR 0
20894 #endif
20895
20896 /* require 4.2 or later */
20897 #if (DB_VERSION_MAJOR >= 4) && (DB_VERSION_MINOR >= 2)
20898         __db_version_compat
20899 #endif
20900         
20901 EOF
20902 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20903   egrep "__db_version_compat" >/dev/null 2>&1; then
20904   rm -rf conftest*
20905   ol_cv_bdb_compat=yes
20906 else
20907   rm -rf conftest*
20908   ol_cv_bdb_compat=no
20909 fi
20910 rm -f conftest*
20911
20912 fi
20913
20914 echo "$ac_t""$ol_cv_bdb_compat" 1>&6
20915
20916
20917                 if test $ol_cv_bdb_compat != yes ; then
20918                         { echo "configure: error: BDB/HDB: BerkeleyDB version incompatible" 1>&2; exit 1; }
20919                 fi
20920         fi
20921 fi
20922
20923 if test $ol_link_ldbm = no -a $ol_with_ldbm_type = btree ; then
20924         echo "configure: warning: Could not find LDBM with BTREE support" 1>&2
20925         ol_with_ldbm_api=none
20926 fi
20927
20928 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = mdbm ; then
20929         echo $ac_n "checking for MDBM library""... $ac_c" 1>&6
20930 echo "configure:20931: checking for MDBM library" >&5
20931 if eval "test \"\${ol_cv_lib_mdbm+set}\" = set"; then
20932   echo $ac_n "(cached) $ac_c" 1>&6
20933 else
20934         ol_LIBS="$LIBS"
20935         echo $ac_n "checking for mdbm_set_chain""... $ac_c" 1>&6
20936 echo "configure:20937: checking for mdbm_set_chain" >&5
20937 if eval "test \"\${ac_cv_func_mdbm_set_chain+set}\" = set"; then
20938   echo $ac_n "(cached) $ac_c" 1>&6
20939 else
20940   cat > conftest.$ac_ext <<EOF
20941 #line 20942 "configure"
20942 #include "confdefs.h"
20943 /* System header to define __stub macros and hopefully few prototypes,
20944     which can conflict with char mdbm_set_chain(); below.  */
20945 #include <assert.h>
20946 /* Override any gcc2 internal prototype to avoid an error.  */
20947 /* We use char because int might match the return type of a gcc2
20948     builtin and then its argument prototype would still apply.  */
20949 char mdbm_set_chain();
20950 char (*f)();
20951
20952 int main() {
20953
20954 /* The GNU C library defines this for functions which it implements
20955     to always fail with ENOSYS.  Some functions are actually named
20956     something starting with __ and the normal name is an alias.  */
20957 #if defined (__stub_mdbm_set_chain) || defined (__stub___mdbm_set_chain)
20958 choke me
20959 #else
20960 f = mdbm_set_chain;
20961 #endif
20962
20963 ; return 0; }
20964 EOF
20965 if { (eval echo configure:20966: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20966   rm -rf conftest*
20967   eval "ac_cv_func_mdbm_set_chain=yes"
20968 else
20969   echo "configure: failed program was:" >&5
20970   cat conftest.$ac_ext >&5
20971   rm -rf conftest*
20972   eval "ac_cv_func_mdbm_set_chain=no"
20973 fi
20974 rm -f conftest*
20975 fi
20976
20977 if eval "test \"`echo '$ac_cv_func_'mdbm_set_chain`\" = yes"; then
20978   echo "$ac_t""yes" 1>&6
20979   ol_cv_lib_mdbm=yes
20980 else
20981   echo "$ac_t""no" 1>&6
20982
20983                 echo $ac_n "checking for mdbm_set_chain in -lmdbm""... $ac_c" 1>&6
20984 echo "configure:20985: checking for mdbm_set_chain in -lmdbm" >&5
20985 ac_lib_var=`echo mdbm'_'mdbm_set_chain | sed 'y%./+-:%__p__%'`
20986 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20987   echo $ac_n "(cached) $ac_c" 1>&6
20988 else
20989   ac_save_LIBS="$LIBS"
20990 LIBS="-lmdbm  $LIBS"
20991 cat > conftest.$ac_ext <<EOF
20992 #line 20993 "configure"
20993 #include "confdefs.h"
20994 /* Override any gcc2 internal prototype to avoid an error.  */
20995 /* We use char because int might match the return type of a gcc2
20996     builtin and then its argument prototype would still apply.  */
20997 char mdbm_set_chain();
20998
20999 int main() {
21000 mdbm_set_chain()
21001 ; return 0; }
21002 EOF
21003 if { (eval echo configure:21004: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21004   rm -rf conftest*
21005   eval "ac_cv_lib_$ac_lib_var=yes"
21006 else
21007   echo "configure: failed program was:" >&5
21008   cat conftest.$ac_ext >&5
21009   rm -rf conftest*
21010   eval "ac_cv_lib_$ac_lib_var=no"
21011 fi
21012 rm -f conftest*
21013 LIBS="$ac_save_LIBS"
21014
21015 fi
21016 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
21017   echo "$ac_t""yes" 1>&6
21018   ol_cv_lib_mdbm=-lmdbm
21019 else
21020   echo "$ac_t""no" 1>&6
21021 ol_cv_lib_mdbm=no
21022 fi
21023
21024         
21025 fi
21026
21027         LIBS="$ol_LIBS"
21028
21029 fi
21030
21031 echo "$ac_t""$ol_cv_lib_mdbm" 1>&6
21032
21033
21034  for ac_hdr in mdbm.h
21035 do
21036 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
21037 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
21038 echo "configure:21039: checking for $ac_hdr" >&5
21039 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
21040   echo $ac_n "(cached) $ac_c" 1>&6
21041 else
21042   cat > conftest.$ac_ext <<EOF
21043 #line 21044 "configure"
21044 #include "confdefs.h"
21045 #include <$ac_hdr>
21046 EOF
21047 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
21048 { (eval echo configure:21049: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
21049 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
21050 if test -z "$ac_err"; then
21051   rm -rf conftest*
21052   eval "ac_cv_header_$ac_safe=yes"
21053 else
21054   echo "$ac_err" >&5
21055   echo "configure: failed program was:" >&5
21056   cat conftest.$ac_ext >&5
21057   rm -rf conftest*
21058   eval "ac_cv_header_$ac_safe=no"
21059 fi
21060 rm -f conftest*
21061 fi
21062 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
21063   echo "$ac_t""yes" 1>&6
21064     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
21065   cat >> confdefs.h <<EOF
21066 #define $ac_tr_hdr 1
21067 EOF
21068  
21069 else
21070   echo "$ac_t""no" 1>&6
21071 fi
21072 done
21073
21074  echo $ac_n "checking for db""... $ac_c" 1>&6
21075 echo "configure:21076: checking for db" >&5
21076 if eval "test \"\${ol_cv_mdbm+set}\" = set"; then
21077   echo $ac_n "(cached) $ac_c" 1>&6
21078 else
21079   
21080         if test $ol_cv_lib_mdbm = no -o $ac_cv_header_mdbm_h = no ; then
21081                 ol_cv_mdbm=no
21082         else
21083                 ol_cv_mdbm=yes
21084         fi
21085
21086 fi
21087
21088 echo "$ac_t""$ol_cv_mdbm" 1>&6
21089  if test $ol_cv_mdbm = yes ; then
21090         cat >> confdefs.h <<\EOF
21091 #define HAVE_MDBM 1
21092 EOF
21093
21094  fi
21095
21096
21097         if test $ol_cv_mdbm = yes ; then
21098                 ol_link_ldbm=mdbm
21099                 ol_with_ldbm_api=mdbm
21100                 if test $ol_cv_lib_mdbm != yes ; then
21101                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_mdbm"
21102                 fi
21103         fi
21104 fi
21105
21106 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = gdbm ; then
21107         echo $ac_n "checking for GDBM library""... $ac_c" 1>&6
21108 echo "configure:21109: checking for GDBM library" >&5
21109 if eval "test \"\${ol_cv_lib_gdbm+set}\" = set"; then
21110   echo $ac_n "(cached) $ac_c" 1>&6
21111 else
21112         ol_LIBS="$LIBS"
21113         echo $ac_n "checking for gdbm_open""... $ac_c" 1>&6
21114 echo "configure:21115: checking for gdbm_open" >&5
21115 if eval "test \"\${ac_cv_func_gdbm_open+set}\" = set"; then
21116   echo $ac_n "(cached) $ac_c" 1>&6
21117 else
21118   cat > conftest.$ac_ext <<EOF
21119 #line 21120 "configure"
21120 #include "confdefs.h"
21121 /* System header to define __stub macros and hopefully few prototypes,
21122     which can conflict with char gdbm_open(); below.  */
21123 #include <assert.h>
21124 /* Override any gcc2 internal prototype to avoid an error.  */
21125 /* We use char because int might match the return type of a gcc2
21126     builtin and then its argument prototype would still apply.  */
21127 char gdbm_open();
21128 char (*f)();
21129
21130 int main() {
21131
21132 /* The GNU C library defines this for functions which it implements
21133     to always fail with ENOSYS.  Some functions are actually named
21134     something starting with __ and the normal name is an alias.  */
21135 #if defined (__stub_gdbm_open) || defined (__stub___gdbm_open)
21136 choke me
21137 #else
21138 f = gdbm_open;
21139 #endif
21140
21141 ; return 0; }
21142 EOF
21143 if { (eval echo configure:21144: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21144   rm -rf conftest*
21145   eval "ac_cv_func_gdbm_open=yes"
21146 else
21147   echo "configure: failed program was:" >&5
21148   cat conftest.$ac_ext >&5
21149   rm -rf conftest*
21150   eval "ac_cv_func_gdbm_open=no"
21151 fi
21152 rm -f conftest*
21153 fi
21154
21155 if eval "test \"`echo '$ac_cv_func_'gdbm_open`\" = yes"; then
21156   echo "$ac_t""yes" 1>&6
21157   ol_cv_lib_gdbm=yes
21158 else
21159   echo "$ac_t""no" 1>&6
21160
21161                 echo $ac_n "checking for gdbm_open in -lgdbm""... $ac_c" 1>&6
21162 echo "configure:21163: checking for gdbm_open in -lgdbm" >&5
21163 ac_lib_var=`echo gdbm'_'gdbm_open | sed 'y%./+-:%__p__%'`
21164 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
21165   echo $ac_n "(cached) $ac_c" 1>&6
21166 else
21167   ac_save_LIBS="$LIBS"
21168 LIBS="-lgdbm  $LIBS"
21169 cat > conftest.$ac_ext <<EOF
21170 #line 21171 "configure"
21171 #include "confdefs.h"
21172 /* Override any gcc2 internal prototype to avoid an error.  */
21173 /* We use char because int might match the return type of a gcc2
21174     builtin and then its argument prototype would still apply.  */
21175 char gdbm_open();
21176
21177 int main() {
21178 gdbm_open()
21179 ; return 0; }
21180 EOF
21181 if { (eval echo configure:21182: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21182   rm -rf conftest*
21183   eval "ac_cv_lib_$ac_lib_var=yes"
21184 else
21185   echo "configure: failed program was:" >&5
21186   cat conftest.$ac_ext >&5
21187   rm -rf conftest*
21188   eval "ac_cv_lib_$ac_lib_var=no"
21189 fi
21190 rm -f conftest*
21191 LIBS="$ac_save_LIBS"
21192
21193 fi
21194 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
21195   echo "$ac_t""yes" 1>&6
21196   ol_cv_lib_gdbm=-lgdbm
21197 else
21198   echo "$ac_t""no" 1>&6
21199 ol_cv_lib_gdbm=no
21200 fi
21201
21202         
21203 fi
21204
21205         LIBS="$ol_LIBS"
21206
21207 fi
21208
21209 echo "$ac_t""$ol_cv_lib_gdbm" 1>&6
21210
21211
21212  for ac_hdr in gdbm.h
21213 do
21214 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
21215 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
21216 echo "configure:21217: checking for $ac_hdr" >&5
21217 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
21218   echo $ac_n "(cached) $ac_c" 1>&6
21219 else
21220   cat > conftest.$ac_ext <<EOF
21221 #line 21222 "configure"
21222 #include "confdefs.h"
21223 #include <$ac_hdr>
21224 EOF
21225 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
21226 { (eval echo configure:21227: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
21227 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
21228 if test -z "$ac_err"; then
21229   rm -rf conftest*
21230   eval "ac_cv_header_$ac_safe=yes"
21231 else
21232   echo "$ac_err" >&5
21233   echo "configure: failed program was:" >&5
21234   cat conftest.$ac_ext >&5
21235   rm -rf conftest*
21236   eval "ac_cv_header_$ac_safe=no"
21237 fi
21238 rm -f conftest*
21239 fi
21240 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
21241   echo "$ac_t""yes" 1>&6
21242     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
21243   cat >> confdefs.h <<EOF
21244 #define $ac_tr_hdr 1
21245 EOF
21246  
21247 else
21248   echo "$ac_t""no" 1>&6
21249 fi
21250 done
21251
21252  echo $ac_n "checking for db""... $ac_c" 1>&6
21253 echo "configure:21254: checking for db" >&5
21254 if eval "test \"\${ol_cv_gdbm+set}\" = set"; then
21255   echo $ac_n "(cached) $ac_c" 1>&6
21256 else
21257   
21258         if test $ol_cv_lib_gdbm = no -o $ac_cv_header_gdbm_h = no ; then
21259                 ol_cv_gdbm=no
21260         else
21261                 ol_cv_gdbm=yes
21262         fi
21263
21264 fi
21265
21266 echo "$ac_t""$ol_cv_gdbm" 1>&6
21267  if test $ol_cv_gdbm = yes ; then
21268         cat >> confdefs.h <<\EOF
21269 #define HAVE_GDBM 1
21270 EOF
21271
21272  fi
21273
21274
21275         if test $ol_cv_gdbm = yes ; then
21276                 ol_link_ldbm=gdbm
21277                 ol_with_ldbm_api=gdbm
21278
21279                 if test $ol_cv_lib_gdbm != yes ; then
21280                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_gdbm"
21281                 fi
21282         fi
21283 fi
21284
21285 if test $ol_with_ldbm_api = ndbm ; then
21286         echo $ac_n "checking for NDBM library""... $ac_c" 1>&6
21287 echo "configure:21288: checking for NDBM library" >&5
21288 if eval "test \"\${ol_cv_lib_ndbm+set}\" = set"; then
21289   echo $ac_n "(cached) $ac_c" 1>&6
21290 else
21291         ol_LIBS="$LIBS"
21292         echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
21293 echo "configure:21294: checking for dbm_open" >&5
21294 if eval "test \"\${ac_cv_func_dbm_open+set}\" = set"; then
21295   echo $ac_n "(cached) $ac_c" 1>&6
21296 else
21297   cat > conftest.$ac_ext <<EOF
21298 #line 21299 "configure"
21299 #include "confdefs.h"
21300 /* System header to define __stub macros and hopefully few prototypes,
21301     which can conflict with char dbm_open(); below.  */
21302 #include <assert.h>
21303 /* Override any gcc2 internal prototype to avoid an error.  */
21304 /* We use char because int might match the return type of a gcc2
21305     builtin and then its argument prototype would still apply.  */
21306 char dbm_open();
21307 char (*f)();
21308
21309 int main() {
21310
21311 /* The GNU C library defines this for functions which it implements
21312     to always fail with ENOSYS.  Some functions are actually named
21313     something starting with __ and the normal name is an alias.  */
21314 #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
21315 choke me
21316 #else
21317 f = dbm_open;
21318 #endif
21319
21320 ; return 0; }
21321 EOF
21322 if { (eval echo configure:21323: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21323   rm -rf conftest*
21324   eval "ac_cv_func_dbm_open=yes"
21325 else
21326   echo "configure: failed program was:" >&5
21327   cat conftest.$ac_ext >&5
21328   rm -rf conftest*
21329   eval "ac_cv_func_dbm_open=no"
21330 fi
21331 rm -f conftest*
21332 fi
21333
21334 if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then
21335   echo "$ac_t""yes" 1>&6
21336   ol_cv_lib_ndbm=yes
21337 else
21338   echo "$ac_t""no" 1>&6
21339
21340                 echo $ac_n "checking for dbm_open in -lndbm""... $ac_c" 1>&6
21341 echo "configure:21342: checking for dbm_open in -lndbm" >&5
21342 ac_lib_var=`echo ndbm'_'dbm_open | sed 'y%./+-:%__p__%'`
21343 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
21344   echo $ac_n "(cached) $ac_c" 1>&6
21345 else
21346   ac_save_LIBS="$LIBS"
21347 LIBS="-lndbm  $LIBS"
21348 cat > conftest.$ac_ext <<EOF
21349 #line 21350 "configure"
21350 #include "confdefs.h"
21351 /* Override any gcc2 internal prototype to avoid an error.  */
21352 /* We use char because int might match the return type of a gcc2
21353     builtin and then its argument prototype would still apply.  */
21354 char dbm_open();
21355
21356 int main() {
21357 dbm_open()
21358 ; return 0; }
21359 EOF
21360 if { (eval echo configure:21361: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21361   rm -rf conftest*
21362   eval "ac_cv_lib_$ac_lib_var=yes"
21363 else
21364   echo "configure: failed program was:" >&5
21365   cat conftest.$ac_ext >&5
21366   rm -rf conftest*
21367   eval "ac_cv_lib_$ac_lib_var=no"
21368 fi
21369 rm -f conftest*
21370 LIBS="$ac_save_LIBS"
21371
21372 fi
21373 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
21374   echo "$ac_t""yes" 1>&6
21375   ol_cv_lib_ndbm=-lndbm
21376 else
21377   echo "$ac_t""no" 1>&6
21378
21379                         echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
21380 echo "configure:21381: checking for dbm_open in -ldbm" >&5
21381 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-:%__p__%'`
21382 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
21383   echo $ac_n "(cached) $ac_c" 1>&6
21384 else
21385   ac_save_LIBS="$LIBS"
21386 LIBS="-ldbm  $LIBS"
21387 cat > conftest.$ac_ext <<EOF
21388 #line 21389 "configure"
21389 #include "confdefs.h"
21390 /* Override any gcc2 internal prototype to avoid an error.  */
21391 /* We use char because int might match the return type of a gcc2
21392     builtin and then its argument prototype would still apply.  */
21393 char dbm_open();
21394
21395 int main() {
21396 dbm_open()
21397 ; return 0; }
21398 EOF
21399 if { (eval echo configure:21400: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21400   rm -rf conftest*
21401   eval "ac_cv_lib_$ac_lib_var=yes"
21402 else
21403   echo "configure: failed program was:" >&5
21404   cat conftest.$ac_ext >&5
21405   rm -rf conftest*
21406   eval "ac_cv_lib_$ac_lib_var=no"
21407 fi
21408 rm -f conftest*
21409 LIBS="$ac_save_LIBS"
21410
21411 fi
21412 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
21413   echo "$ac_t""yes" 1>&6
21414   ol_cv_lib_ndbm=-ldbm
21415 else
21416   echo "$ac_t""no" 1>&6
21417 ol_cv_lib_ndbm=no
21418 fi
21419                 
21420 fi
21421
21422         
21423 fi
21424
21425         LIBS="$ol_LIBS"
21426
21427 fi
21428
21429 echo "$ac_t""$ol_cv_lib_ndbm" 1>&6
21430
21431
21432  for ac_hdr in ndbm.h
21433 do
21434 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
21435 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
21436 echo "configure:21437: checking for $ac_hdr" >&5
21437 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
21438   echo $ac_n "(cached) $ac_c" 1>&6
21439 else
21440   cat > conftest.$ac_ext <<EOF
21441 #line 21442 "configure"
21442 #include "confdefs.h"
21443 #include <$ac_hdr>
21444 EOF
21445 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
21446 { (eval echo configure:21447: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
21447 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
21448 if test -z "$ac_err"; then
21449   rm -rf conftest*
21450   eval "ac_cv_header_$ac_safe=yes"
21451 else
21452   echo "$ac_err" >&5
21453   echo "configure: failed program was:" >&5
21454   cat conftest.$ac_ext >&5
21455   rm -rf conftest*
21456   eval "ac_cv_header_$ac_safe=no"
21457 fi
21458 rm -f conftest*
21459 fi
21460 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
21461   echo "$ac_t""yes" 1>&6
21462     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
21463   cat >> confdefs.h <<EOF
21464 #define $ac_tr_hdr 1
21465 EOF
21466  
21467 else
21468   echo "$ac_t""no" 1>&6
21469 fi
21470 done
21471
21472  echo $ac_n "checking for db""... $ac_c" 1>&6
21473 echo "configure:21474: checking for db" >&5
21474 if eval "test \"\${ol_cv_ndbm+set}\" = set"; then
21475   echo $ac_n "(cached) $ac_c" 1>&6
21476 else
21477   
21478         if test $ol_cv_lib_ndbm = no -o $ac_cv_header_ndbm_h = no ; then
21479                 ol_cv_ndbm=no
21480         else
21481                 ol_cv_ndbm=yes
21482         fi
21483
21484 fi
21485
21486 echo "$ac_t""$ol_cv_ndbm" 1>&6
21487  if test $ol_cv_ndbm = yes ; then
21488         cat >> confdefs.h <<\EOF
21489 #define HAVE_NDBM 1
21490 EOF
21491
21492  fi
21493
21494
21495         if test $ol_cv_ndbm = yes ; then
21496                 ol_link_ldbm=ndbm
21497                 ol_with_ldbm_api=ndbm
21498
21499                 if test $ol_cv_lib_ndbm != yes ; then
21500                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_ndbm"
21501                 fi
21502         fi
21503 fi
21504
21505 if test $ol_link_ldbm = no -a $ol_enable_ldbm != no ; then
21506         { echo "configure: error: could not find suitable LDBM backend" 1>&2; exit 1; }
21507 fi
21508
21509 if test $ol_enable_bdb = yes -o \
21510         $ol_enable_hdb = yes -o \
21511         $ol_enable_ldbm = yes ; then
21512         SLAPD_LIBS="$SLAPD_LIBS \$(LDBM_LIBS)"
21513 fi
21514
21515
21516 if test $ol_enable_dynamic = yes -a $enable_shared = yes ; then
21517         BUILD_LIBS_DYNAMIC=shared
21518         cat >> confdefs.h <<\EOF
21519 #define LDAP_LIBS_DYNAMIC 1
21520 EOF
21521
21522         LTSTATIC=""
21523 else
21524         BUILD_LIBS_DYNAMIC=static
21525         LTSTATIC="-static"
21526 fi
21527
21528 if test $ol_enable_wrappers != no ; then
21529         for ac_hdr in tcpd.h
21530 do
21531 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
21532 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
21533 echo "configure:21534: checking for $ac_hdr" >&5
21534 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
21535   echo $ac_n "(cached) $ac_c" 1>&6
21536 else
21537   cat > conftest.$ac_ext <<EOF
21538 #line 21539 "configure"
21539 #include "confdefs.h"
21540 #include <$ac_hdr>
21541 EOF
21542 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
21543 { (eval echo configure:21544: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
21544 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
21545 if test -z "$ac_err"; then
21546   rm -rf conftest*
21547   eval "ac_cv_header_$ac_safe=yes"
21548 else
21549   echo "$ac_err" >&5
21550   echo "configure: failed program was:" >&5
21551   cat conftest.$ac_ext >&5
21552   rm -rf conftest*
21553   eval "ac_cv_header_$ac_safe=no"
21554 fi
21555 rm -f conftest*
21556 fi
21557 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
21558   echo "$ac_t""yes" 1>&6
21559     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
21560   cat >> confdefs.h <<EOF
21561 #define $ac_tr_hdr 1
21562 EOF
21563  
21564                 echo $ac_n "checking for TCP wrappers library""... $ac_c" 1>&6
21565 echo "configure:21566: checking for TCP wrappers library" >&5
21566                 save_LIBS="$LIBS"
21567                 LIBS="$LIBS -lwrap"
21568                 cat > conftest.$ac_ext <<EOF
21569 #line 21570 "configure"
21570 #include "confdefs.h"
21571
21572 #include <tcpd.h>
21573 int allow_severity = 0;
21574 int deny_severity  = 0;
21575
21576 struct request_info *req;
21577                 
21578 int main() {
21579
21580 hosts_access(req)
21581                 
21582 ; return 0; }
21583 EOF
21584 if { (eval echo configure:21585: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21585   rm -rf conftest*
21586   echo "$ac_t""-lwrap" 1>&6
21587                 have_wrappers=yes
21588                 LIBS="$save_LIBS"
21589 else
21590   echo "configure: failed program was:" >&5
21591   cat conftest.$ac_ext >&5
21592   rm -rf conftest*
21593   
21594                                 LIBS="$LIBS -lnsl"
21595                 cat > conftest.$ac_ext <<EOF
21596 #line 21597 "configure"
21597 #include "confdefs.h"
21598
21599 #include <tcpd.h>
21600 int allow_severity = 0;
21601 int deny_severity  = 0;
21602
21603 struct request_info *req;
21604                 
21605 int main() {
21606
21607 hosts_access(req)
21608                 
21609 ; return 0; }
21610 EOF
21611 if { (eval echo configure:21612: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21612   rm -rf conftest*
21613   echo "$ac_t""-lwrap -lnsl" 1>&6
21614                 have_wrappers=yes
21615                 LIBS="$save_LIBS -lnsl"
21616 else
21617   echo "configure: failed program was:" >&5
21618   cat conftest.$ac_ext >&5
21619   rm -rf conftest*
21620   
21621                 echo "$ac_t""no" 1>&6
21622                 have_wrappers=no
21623                 LIBS=$save_LIBS
21624 fi
21625 rm -f conftest*
21626 fi
21627 rm -f conftest*
21628 else
21629   echo "$ac_t""no" 1>&6
21630 have_wrappers=no
21631 fi
21632 done
21633
21634
21635         if test $have_wrappers = yes ; then
21636                 cat >> confdefs.h <<\EOF
21637 #define HAVE_TCPD 1
21638 EOF
21639
21640                 WRAP_LIBS="-lwrap"
21641         elif test $ol_enable_wrappers = yes ; then
21642                 { echo "configure: error: could not find TCP wrappers, select apppropriate options or disable" 1>&2; exit 1; }
21643         else
21644                 echo "configure: warning: could not find TCP wrappers, support disabled" 1>&2
21645                 WRAP_LIBS=""
21646         fi
21647 fi
21648
21649 if test $ol_enable_syslog != no ; then
21650         echo $ac_n "checking for openlog""... $ac_c" 1>&6
21651 echo "configure:21652: checking for openlog" >&5
21652 if eval "test \"\${ac_cv_func_openlog+set}\" = set"; then
21653   echo $ac_n "(cached) $ac_c" 1>&6
21654 else
21655   cat > conftest.$ac_ext <<EOF
21656 #line 21657 "configure"
21657 #include "confdefs.h"
21658 /* System header to define __stub macros and hopefully few prototypes,
21659     which can conflict with char openlog(); below.  */
21660 #include <assert.h>
21661 /* Override any gcc2 internal prototype to avoid an error.  */
21662 /* We use char because int might match the return type of a gcc2
21663     builtin and then its argument prototype would still apply.  */
21664 char openlog();
21665 char (*f)();
21666
21667 int main() {
21668
21669 /* The GNU C library defines this for functions which it implements
21670     to always fail with ENOSYS.  Some functions are actually named
21671     something starting with __ and the normal name is an alias.  */
21672 #if defined (__stub_openlog) || defined (__stub___openlog)
21673 choke me
21674 #else
21675 f = openlog;
21676 #endif
21677
21678 ; return 0; }
21679 EOF
21680 if { (eval echo configure:21681: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21681   rm -rf conftest*
21682   eval "ac_cv_func_openlog=yes"
21683 else
21684   echo "configure: failed program was:" >&5
21685   cat conftest.$ac_ext >&5
21686   rm -rf conftest*
21687   eval "ac_cv_func_openlog=no"
21688 fi
21689 rm -f conftest*
21690 fi
21691
21692 if eval "test \"`echo '$ac_cv_func_'openlog`\" = yes"; then
21693   echo "$ac_t""yes" 1>&6
21694   :
21695 else
21696   echo "$ac_t""no" 1>&6
21697 fi
21698
21699         if test $ac_cv_func_openlog = no -a $ol_enable_syslog = yes; then
21700                 { echo "configure: error: could not find syslog" 1>&2; exit 1; }
21701         fi
21702         ol_enable_syslog=$ac_cv_func_openlog
21703 fi
21704
21705
21706 ol_link_sql=no
21707 if test $ol_enable_sql != no ; then
21708         for ac_hdr in sql.h sqlext.h
21709 do
21710 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
21711 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
21712 echo "configure:21713: checking for $ac_hdr" >&5
21713 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
21714   echo $ac_n "(cached) $ac_c" 1>&6
21715 else
21716   cat > conftest.$ac_ext <<EOF
21717 #line 21718 "configure"
21718 #include "confdefs.h"
21719 #include <$ac_hdr>
21720 EOF
21721 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
21722 { (eval echo configure:21723: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
21723 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
21724 if test -z "$ac_err"; then
21725   rm -rf conftest*
21726   eval "ac_cv_header_$ac_safe=yes"
21727 else
21728   echo "$ac_err" >&5
21729   echo "configure: failed program was:" >&5
21730   cat conftest.$ac_ext >&5
21731   rm -rf conftest*
21732   eval "ac_cv_header_$ac_safe=no"
21733 fi
21734 rm -f conftest*
21735 fi
21736 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
21737   echo "$ac_t""yes" 1>&6
21738     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
21739   cat >> confdefs.h <<EOF
21740 #define $ac_tr_hdr 1
21741 EOF
21742  
21743 else
21744   echo "$ac_t""no" 1>&6
21745 { echo "configure: error: could not locate SQL headers" 1>&2; exit 1; }
21746         
21747 fi
21748 done
21749
21750
21751         echo $ac_n "checking for SQLDriverConnect in -liodbc""... $ac_c" 1>&6
21752 echo "configure:21753: checking for SQLDriverConnect in -liodbc" >&5
21753 ac_lib_var=`echo iodbc'_'SQLDriverConnect | sed 'y%./+-:%__p__%'`
21754 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
21755   echo $ac_n "(cached) $ac_c" 1>&6
21756 else
21757   ac_save_LIBS="$LIBS"
21758 LIBS="-liodbc  $LIBS"
21759 cat > conftest.$ac_ext <<EOF
21760 #line 21761 "configure"
21761 #include "confdefs.h"
21762 /* Override any gcc2 internal prototype to avoid an error.  */
21763 /* We use char because int might match the return type of a gcc2
21764     builtin and then its argument prototype would still apply.  */
21765 char SQLDriverConnect();
21766
21767 int main() {
21768 SQLDriverConnect()
21769 ; return 0; }
21770 EOF
21771 if { (eval echo configure:21772: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21772   rm -rf conftest*
21773   eval "ac_cv_lib_$ac_lib_var=yes"
21774 else
21775   echo "configure: failed program was:" >&5
21776   cat conftest.$ac_ext >&5
21777   rm -rf conftest*
21778   eval "ac_cv_lib_$ac_lib_var=no"
21779 fi
21780 rm -f conftest*
21781 LIBS="$ac_save_LIBS"
21782
21783 fi
21784 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
21785   echo "$ac_t""yes" 1>&6
21786   have_iodbc=yes
21787 else
21788   echo "$ac_t""no" 1>&6
21789 have_iodbc=no
21790 fi
21791
21792         if test $have_iodbc = yes ; then
21793                 ol_link_sql="-liodbc"
21794         else
21795                 echo $ac_n "checking for SQLDriverConnect in -lodbc""... $ac_c" 1>&6
21796 echo "configure:21797: checking for SQLDriverConnect in -lodbc" >&5
21797 ac_lib_var=`echo odbc'_'SQLDriverConnect | sed 'y%./+-:%__p__%'`
21798 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
21799   echo $ac_n "(cached) $ac_c" 1>&6
21800 else
21801   ac_save_LIBS="$LIBS"
21802 LIBS="-lodbc  $LIBS"
21803 cat > conftest.$ac_ext <<EOF
21804 #line 21805 "configure"
21805 #include "confdefs.h"
21806 /* Override any gcc2 internal prototype to avoid an error.  */
21807 /* We use char because int might match the return type of a gcc2
21808     builtin and then its argument prototype would still apply.  */
21809 char SQLDriverConnect();
21810
21811 int main() {
21812 SQLDriverConnect()
21813 ; return 0; }
21814 EOF
21815 if { (eval echo configure:21816: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21816   rm -rf conftest*
21817   eval "ac_cv_lib_$ac_lib_var=yes"
21818 else
21819   echo "configure: failed program was:" >&5
21820   cat conftest.$ac_ext >&5
21821   rm -rf conftest*
21822   eval "ac_cv_lib_$ac_lib_var=no"
21823 fi
21824 rm -f conftest*
21825 LIBS="$ac_save_LIBS"
21826
21827 fi
21828 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
21829   echo "$ac_t""yes" 1>&6
21830   have_odbc=yes
21831 else
21832   echo "$ac_t""no" 1>&6
21833 have_odbc=no
21834 fi
21835
21836                 if test $have_odbc = yes ; then
21837                         ol_link_sql="-lodbc"
21838                 fi
21839         fi
21840
21841         if test $ol_link_sql != no ; then
21842                 SLAPD_SQL_LIBS="$ol_link_sql"
21843
21844         elif test $ol_enable_sql != auto ; then
21845                 { echo "configure: error: could not locate suitable ODBC library" 1>&2; exit 1; }
21846         fi
21847 fi
21848
21849 WITH_SASL=no
21850 ol_link_sasl=no
21851 ol_link_spasswd=no
21852 if test $ol_with_cyrus_sasl != no ; then
21853         for ac_hdr in sasl/sasl.h sasl.h
21854 do
21855 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
21856 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
21857 echo "configure:21858: checking for $ac_hdr" >&5
21858 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
21859   echo $ac_n "(cached) $ac_c" 1>&6
21860 else
21861   cat > conftest.$ac_ext <<EOF
21862 #line 21863 "configure"
21863 #include "confdefs.h"
21864 #include <$ac_hdr>
21865 EOF
21866 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
21867 { (eval echo configure:21868: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
21868 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
21869 if test -z "$ac_err"; then
21870   rm -rf conftest*
21871   eval "ac_cv_header_$ac_safe=yes"
21872 else
21873   echo "$ac_err" >&5
21874   echo "configure: failed program was:" >&5
21875   cat conftest.$ac_ext >&5
21876   rm -rf conftest*
21877   eval "ac_cv_header_$ac_safe=no"
21878 fi
21879 rm -f conftest*
21880 fi
21881 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
21882   echo "$ac_t""yes" 1>&6
21883     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
21884   cat >> confdefs.h <<EOF
21885 #define $ac_tr_hdr 1
21886 EOF
21887  
21888 else
21889   echo "$ac_t""no" 1>&6
21890 fi
21891 done
21892
21893
21894         if test $ac_cv_header_sasl_sasl_h = yes -o $ac_cv_header_sasl_h = yes; then
21895                 echo $ac_n "checking for sasl_client_init in -lsasl2""... $ac_c" 1>&6
21896 echo "configure:21897: checking for sasl_client_init in -lsasl2" >&5
21897 ac_lib_var=`echo sasl2'_'sasl_client_init | sed 'y%./+-:%__p__%'`
21898 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
21899   echo $ac_n "(cached) $ac_c" 1>&6
21900 else
21901   ac_save_LIBS="$LIBS"
21902 LIBS="-lsasl2  $LIBS"
21903 cat > conftest.$ac_ext <<EOF
21904 #line 21905 "configure"
21905 #include "confdefs.h"
21906 /* Override any gcc2 internal prototype to avoid an error.  */
21907 /* We use char because int might match the return type of a gcc2
21908     builtin and then its argument prototype would still apply.  */
21909 char sasl_client_init();
21910
21911 int main() {
21912 sasl_client_init()
21913 ; return 0; }
21914 EOF
21915 if { (eval echo configure:21916: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21916   rm -rf conftest*
21917   eval "ac_cv_lib_$ac_lib_var=yes"
21918 else
21919   echo "configure: failed program was:" >&5
21920   cat conftest.$ac_ext >&5
21921   rm -rf conftest*
21922   eval "ac_cv_lib_$ac_lib_var=no"
21923 fi
21924 rm -f conftest*
21925 LIBS="$ac_save_LIBS"
21926
21927 fi
21928 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
21929   echo "$ac_t""yes" 1>&6
21930   ol_link_sasl="-lsasl2"
21931 else
21932   echo "$ac_t""no" 1>&6
21933 echo $ac_n "checking for sasl_client_init in -lsasl""... $ac_c" 1>&6
21934 echo "configure:21935: checking for sasl_client_init in -lsasl" >&5
21935 ac_lib_var=`echo sasl'_'sasl_client_init | sed 'y%./+-:%__p__%'`
21936 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
21937   echo $ac_n "(cached) $ac_c" 1>&6
21938 else
21939   ac_save_LIBS="$LIBS"
21940 LIBS="-lsasl  $LIBS"
21941 cat > conftest.$ac_ext <<EOF
21942 #line 21943 "configure"
21943 #include "confdefs.h"
21944 /* Override any gcc2 internal prototype to avoid an error.  */
21945 /* We use char because int might match the return type of a gcc2
21946     builtin and then its argument prototype would still apply.  */
21947 char sasl_client_init();
21948
21949 int main() {
21950 sasl_client_init()
21951 ; return 0; }
21952 EOF
21953 if { (eval echo configure:21954: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21954   rm -rf conftest*
21955   eval "ac_cv_lib_$ac_lib_var=yes"
21956 else
21957   echo "configure: failed program was:" >&5
21958   cat conftest.$ac_ext >&5
21959   rm -rf conftest*
21960   eval "ac_cv_lib_$ac_lib_var=no"
21961 fi
21962 rm -f conftest*
21963 LIBS="$ac_save_LIBS"
21964
21965 fi
21966 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
21967   echo "$ac_t""yes" 1>&6
21968   ol_link_sasl="-lsasl"
21969 else
21970   echo "$ac_t""no" 1>&6
21971 fi
21972
21973 fi
21974
21975         fi
21976
21977         if test $ol_link_sasl = no ; then
21978                 if test $ol_with_cyrus_sasl != auto ; then
21979                         { echo "configure: error: Could not locate Cyrus SASL" 1>&2; exit 1; }
21980                 else
21981                         echo "configure: warning: Could not locate Cyrus SASL" 1>&2
21982                         echo "configure: warning: SASL authentication not supported!" 1>&2
21983                         if test $ol_link_tls = no ; then
21984                                 echo "configure: warning: Strong authentication not supported!" 1>&2
21985                         fi
21986                 fi
21987         else
21988                 echo $ac_n "checking Cyrus SASL library version""... $ac_c" 1>&6
21989 echo "configure:21990: checking Cyrus SASL library version" >&5
21990 if eval "test \"\${ol_cv_sasl_compat+set}\" = set"; then
21991   echo $ac_n "(cached) $ac_c" 1>&6
21992 else
21993   
21994         cat > conftest.$ac_ext <<EOF
21995 #line 21996 "configure"
21996 #include "confdefs.h"
21997
21998 #ifdef HAVE_SASL_SASL_H
21999 #include <sasl/sasl.h>
22000 #else
22001 #include <sasl.h>
22002 #endif
22003
22004 /* Require 2.1.15+ */
22005 #if SASL_VERSION_MAJOR == 2  && SASL_VERSION_MINOR > 1
22006         char *__sasl_compat = "2.2+ or better okay (we guess)";
22007 #elif SASL_VERSION_MAJOR == 2  && SASL_VERSION_MINOR == 1 \
22008         && SASL_VERSION_STEP >=15
22009         char *__sasl_compat = "2.1.15+ or better okay";
22010 #endif
22011         
22012 EOF
22013 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
22014   egrep "__sasl_compat" >/dev/null 2>&1; then
22015   rm -rf conftest*
22016   ol_cv_sasl_compat=yes
22017 else
22018   rm -rf conftest*
22019   ol_cv_sasl_compat=no
22020 fi
22021 rm -f conftest*
22022
22023 fi
22024
22025 echo "$ac_t""$ol_cv_sasl_compat" 1>&6
22026
22027                 if test $ol_cv_sasl_compat = no ; then
22028                         ol_link_sasl=no
22029                         { echo "configure: error: Cyrus SASL library located but is incompatible" 1>&2; exit 1; }
22030                 fi
22031
22032                 cat >> confdefs.h <<\EOF
22033 #define HAVE_CYRUS_SASL 1
22034 EOF
22035
22036                 SASL_LIBS="$ol_link_sasl"
22037                 if test $ol_enable_spasswd != no ; then
22038                         ol_link_spasswd=yes
22039                 fi
22040
22041                 ac_save_LIBS="$LIBS"
22042                 LIBS="$LIBS $ol_link_sasl"
22043                 echo $ac_n "checking for sasl_version""... $ac_c" 1>&6
22044 echo "configure:22045: checking for sasl_version" >&5
22045 if eval "test \"\${ac_cv_func_sasl_version+set}\" = set"; then
22046   echo $ac_n "(cached) $ac_c" 1>&6
22047 else
22048   cat > conftest.$ac_ext <<EOF
22049 #line 22050 "configure"
22050 #include "confdefs.h"
22051 /* System header to define __stub macros and hopefully few prototypes,
22052     which can conflict with char sasl_version(); below.  */
22053 #include <assert.h>
22054 /* Override any gcc2 internal prototype to avoid an error.  */
22055 /* We use char because int might match the return type of a gcc2
22056     builtin and then its argument prototype would still apply.  */
22057 char sasl_version();
22058 char (*f)();
22059
22060 int main() {
22061
22062 /* The GNU C library defines this for functions which it implements
22063     to always fail with ENOSYS.  Some functions are actually named
22064     something starting with __ and the normal name is an alias.  */
22065 #if defined (__stub_sasl_version) || defined (__stub___sasl_version)
22066 choke me
22067 #else
22068 f = sasl_version;
22069 #endif
22070
22071 ; return 0; }
22072 EOF
22073 if { (eval echo configure:22074: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22074   rm -rf conftest*
22075   eval "ac_cv_func_sasl_version=yes"
22076 else
22077   echo "configure: failed program was:" >&5
22078   cat conftest.$ac_ext >&5
22079   rm -rf conftest*
22080   eval "ac_cv_func_sasl_version=no"
22081 fi
22082 rm -f conftest*
22083 fi
22084
22085 if eval "test \"`echo '$ac_cv_func_'sasl_version`\" = yes"; then
22086   echo "$ac_t""yes" 1>&6
22087   cat >> confdefs.h <<\EOF
22088 #define HAVE_SASL_VERSION 1
22089 EOF
22090
22091 else
22092   echo "$ac_t""no" 1>&6
22093 fi
22094
22095                 LIBS="$ac_save_LIBS"
22096
22097                 WITH_SASL=yes
22098         fi
22099
22100 else
22101         echo "configure: warning: SASL authentication not supported!" 1>&2
22102         if test $ol_link_tls = no ; then
22103                 echo "configure: warning: Strong authentication not supported!" 1>&2
22104         fi
22105 fi
22106
22107 if test $cross_compiling != yes -a "$ac_cv_mingw32" != yes ; then
22108         dev=no
22109         if test -r /dev/urandom ; then
22110                 dev="/dev/urandom";
22111         elif test -r /idev/urandom ; then
22112                 dev="/idev/urandom";
22113         elif test -r /dev/srandom ; then
22114                 dev="/dev/srandom";
22115         elif test -r /dev/random ; then
22116                 dev="/dev/random";
22117         elif test -r /idev/random ; then
22118                 dev="/idev/random";
22119         fi
22120
22121         if test $dev != no ; then
22122                 cat >> confdefs.h <<EOF
22123 #define URANDOM_DEVICE "$dev"
22124 EOF
22125
22126         fi
22127 fi
22128
22129 ol_link_fetch=no
22130 if test $ol_with_fetch != no ; then
22131         ol_LIBS=$LIBS
22132 LIBS="-lfetch -lcom_err $LIBS"
22133 echo $ac_n "checking fetch(3) library""... $ac_c" 1>&6
22134 echo "configure:22135: checking fetch(3) library" >&5
22135 if eval "test \"\${ol_cv_lib_fetch+set}\" = set"; then
22136   echo $ac_n "(cached) $ac_c" 1>&6
22137 else
22138   
22139         cat > conftest.$ac_ext <<EOF
22140 #line 22141 "configure"
22141 #include "confdefs.h"
22142
22143 #include <sys/param.h>
22144 #include <stdio.h>
22145 #include <fetch.h>
22146 int main() {
22147 struct url *u = fetchParseURL("file:///"); 
22148 ; return 0; }
22149 EOF
22150 if { (eval echo configure:22151: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22151   rm -rf conftest*
22152   ol_cv_lib_fetch=yes
22153 else
22154   echo "configure: failed program was:" >&5
22155   cat conftest.$ac_ext >&5
22156   rm -rf conftest*
22157   ol_cv_lib_fetch=no
22158 fi
22159 rm -f conftest*
22160 fi
22161
22162 echo "$ac_t""$ol_cv_lib_fetch" 1>&6
22163 LIBS=$ol_LIBS
22164 if test $ol_cv_lib_fetch != no ; then
22165         ol_link_fetch="-lfetch -lcom_err"
22166         cat >> confdefs.h <<\EOF
22167 #define HAVE_FETCH 1
22168 EOF
22169
22170 fi
22171
22172
22173         if test $ol_cv_lib_fetch != no ; then
22174                 LUTIL_LIBS="$LUTIL_LIBS $ol_link_fetch"
22175                 ol_link_fetch=freebsd
22176
22177         elif test $ol_with_fetch != auto ; then
22178                 { echo "configure: error: no suitable API for --with-fetch=$ol_with_fetch" 1>&2; exit 1; }
22179         fi 
22180 fi
22181
22182 if test $ol_enable_crypt != no ; then
22183         save_LIBS="$LIBS"
22184         LIBS="$TLS_LIBS $LIBS"
22185
22186         echo $ac_n "checking for crypt""... $ac_c" 1>&6
22187 echo "configure:22188: checking for crypt" >&5
22188 if eval "test \"\${ac_cv_func_crypt+set}\" = set"; then
22189   echo $ac_n "(cached) $ac_c" 1>&6
22190 else
22191   cat > conftest.$ac_ext <<EOF
22192 #line 22193 "configure"
22193 #include "confdefs.h"
22194 /* System header to define __stub macros and hopefully few prototypes,
22195     which can conflict with char crypt(); below.  */
22196 #include <assert.h>
22197 /* Override any gcc2 internal prototype to avoid an error.  */
22198 /* We use char because int might match the return type of a gcc2
22199     builtin and then its argument prototype would still apply.  */
22200 char crypt();
22201 char (*f)();
22202
22203 int main() {
22204
22205 /* The GNU C library defines this for functions which it implements
22206     to always fail with ENOSYS.  Some functions are actually named
22207     something starting with __ and the normal name is an alias.  */
22208 #if defined (__stub_crypt) || defined (__stub___crypt)
22209 choke me
22210 #else
22211 f = crypt;
22212 #endif
22213
22214 ; return 0; }
22215 EOF
22216 if { (eval echo configure:22217: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22217   rm -rf conftest*
22218   eval "ac_cv_func_crypt=yes"
22219 else
22220   echo "configure: failed program was:" >&5
22221   cat conftest.$ac_ext >&5
22222   rm -rf conftest*
22223   eval "ac_cv_func_crypt=no"
22224 fi
22225 rm -f conftest*
22226 fi
22227
22228 if eval "test \"`echo '$ac_cv_func_'crypt`\" = yes"; then
22229   echo "$ac_t""yes" 1>&6
22230   have_crypt=yes
22231 else
22232   echo "$ac_t""no" 1>&6
22233
22234                 LIBS="$save_LIBS"
22235                 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
22236 echo "configure:22237: checking for crypt in -lcrypt" >&5
22237 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-:%__p__%'`
22238 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
22239   echo $ac_n "(cached) $ac_c" 1>&6
22240 else
22241   ac_save_LIBS="$LIBS"
22242 LIBS="-lcrypt  $LIBS"
22243 cat > conftest.$ac_ext <<EOF
22244 #line 22245 "configure"
22245 #include "confdefs.h"
22246 /* Override any gcc2 internal prototype to avoid an error.  */
22247 /* We use char because int might match the return type of a gcc2
22248     builtin and then its argument prototype would still apply.  */
22249 char crypt();
22250
22251 int main() {
22252 crypt()
22253 ; return 0; }
22254 EOF
22255 if { (eval echo configure:22256: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22256   rm -rf conftest*
22257   eval "ac_cv_lib_$ac_lib_var=yes"
22258 else
22259   echo "configure: failed program was:" >&5
22260   cat conftest.$ac_ext >&5
22261   rm -rf conftest*
22262   eval "ac_cv_lib_$ac_lib_var=no"
22263 fi
22264 rm -f conftest*
22265 LIBS="$ac_save_LIBS"
22266
22267 fi
22268 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
22269   echo "$ac_t""yes" 1>&6
22270   LUTIL_LIBS="$LUTIL_LIBS -lcrypt"
22271                         have_crypt=yes
22272 else
22273   echo "$ac_t""no" 1>&6
22274 have_crypt=no
22275 fi
22276
22277 fi
22278
22279
22280         LIBS="$save_LIBS"
22281
22282         if test $have_crypt = yes ; then
22283                 cat >> confdefs.h <<\EOF
22284 #define HAVE_CRYPT 1
22285 EOF
22286
22287         else
22288                 echo "configure: warning: could not find crypt" 1>&2
22289                 if test $ol_enable_crypt = yes ; then
22290                         { echo "configure: error: could not find crypt, select appropriate options or disable" 1>&2; exit 1; }
22291                 fi
22292
22293                 echo "configure: warning: disabling crypt support" 1>&2
22294                 ol_enable_crypt=no
22295         fi
22296 fi
22297
22298 if test $ol_enable_proctitle != no ; then
22299         echo $ac_n "checking for setproctitle""... $ac_c" 1>&6
22300 echo "configure:22301: checking for setproctitle" >&5
22301 if eval "test \"\${ac_cv_func_setproctitle+set}\" = set"; then
22302   echo $ac_n "(cached) $ac_c" 1>&6
22303 else
22304   cat > conftest.$ac_ext <<EOF
22305 #line 22306 "configure"
22306 #include "confdefs.h"
22307 /* System header to define __stub macros and hopefully few prototypes,
22308     which can conflict with char setproctitle(); below.  */
22309 #include <assert.h>
22310 /* Override any gcc2 internal prototype to avoid an error.  */
22311 /* We use char because int might match the return type of a gcc2
22312     builtin and then its argument prototype would still apply.  */
22313 char setproctitle();
22314 char (*f)();
22315
22316 int main() {
22317
22318 /* The GNU C library defines this for functions which it implements
22319     to always fail with ENOSYS.  Some functions are actually named
22320     something starting with __ and the normal name is an alias.  */
22321 #if defined (__stub_setproctitle) || defined (__stub___setproctitle)
22322 choke me
22323 #else
22324 f = setproctitle;
22325 #endif
22326
22327 ; return 0; }
22328 EOF
22329 if { (eval echo configure:22330: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22330   rm -rf conftest*
22331   eval "ac_cv_func_setproctitle=yes"
22332 else
22333   echo "configure: failed program was:" >&5
22334   cat conftest.$ac_ext >&5
22335   rm -rf conftest*
22336   eval "ac_cv_func_setproctitle=no"
22337 fi
22338 rm -f conftest*
22339 fi
22340
22341 if eval "test \"`echo '$ac_cv_func_'setproctitle`\" = yes"; then
22342   echo "$ac_t""yes" 1>&6
22343   have_setproctitle=yes
22344 else
22345   echo "$ac_t""no" 1>&6
22346
22347                 echo $ac_n "checking for setproctitle in -lutil""... $ac_c" 1>&6
22348 echo "configure:22349: checking for setproctitle in -lutil" >&5
22349 ac_lib_var=`echo util'_'setproctitle | sed 'y%./+-:%__p__%'`
22350 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
22351   echo $ac_n "(cached) $ac_c" 1>&6
22352 else
22353   ac_save_LIBS="$LIBS"
22354 LIBS="-lutil  $LIBS"
22355 cat > conftest.$ac_ext <<EOF
22356 #line 22357 "configure"
22357 #include "confdefs.h"
22358 /* Override any gcc2 internal prototype to avoid an error.  */
22359 /* We use char because int might match the return type of a gcc2
22360     builtin and then its argument prototype would still apply.  */
22361 char setproctitle();
22362
22363 int main() {
22364 setproctitle()
22365 ; return 0; }
22366 EOF
22367 if { (eval echo configure:22368: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22368   rm -rf conftest*
22369   eval "ac_cv_lib_$ac_lib_var=yes"
22370 else
22371   echo "configure: failed program was:" >&5
22372   cat conftest.$ac_ext >&5
22373   rm -rf conftest*
22374   eval "ac_cv_lib_$ac_lib_var=no"
22375 fi
22376 rm -f conftest*
22377 LIBS="$ac_save_LIBS"
22378
22379 fi
22380 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
22381   echo "$ac_t""yes" 1>&6
22382   have_setproctitle=yes
22383                         LUTIL_LIBS="$LUTIL_LIBS -lutil"
22384 else
22385   echo "$ac_t""no" 1>&6
22386 have_setproctitle=no
22387                         LIBOBJS="$LIBOBJS setproctitle.o"
22388                         LIBSRCS="$LIBSRCS setproctitle.c"
22389 fi
22390
22391 fi
22392
22393
22394         if test $have_setproctitle = yes ; then
22395                 cat >> confdefs.h <<\EOF
22396 #define HAVE_SETPROCTITLE 1
22397 EOF
22398
22399         fi
22400 fi
22401
22402 if test $ol_enable_slp != no ; then
22403         for ac_hdr in slp.h 
22404 do
22405 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
22406 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
22407 echo "configure:22408: checking for $ac_hdr" >&5
22408 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
22409   echo $ac_n "(cached) $ac_c" 1>&6
22410 else
22411   cat > conftest.$ac_ext <<EOF
22412 #line 22413 "configure"
22413 #include "confdefs.h"
22414 #include <$ac_hdr>
22415 EOF
22416 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
22417 { (eval echo configure:22418: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
22418 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
22419 if test -z "$ac_err"; then
22420   rm -rf conftest*
22421   eval "ac_cv_header_$ac_safe=yes"
22422 else
22423   echo "$ac_err" >&5
22424   echo "configure: failed program was:" >&5
22425   cat conftest.$ac_ext >&5
22426   rm -rf conftest*
22427   eval "ac_cv_header_$ac_safe=no"
22428 fi
22429 rm -f conftest*
22430 fi
22431 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
22432   echo "$ac_t""yes" 1>&6
22433     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
22434   cat >> confdefs.h <<EOF
22435 #define $ac_tr_hdr 1
22436 EOF
22437  
22438 else
22439   echo "$ac_t""no" 1>&6
22440 fi
22441 done
22442
22443
22444         if test $ac_cv_header_slp_h = yes ; then
22445                 echo $ac_n "checking for SLPOpen in -lslp""... $ac_c" 1>&6
22446 echo "configure:22447: checking for SLPOpen in -lslp" >&5
22447 ac_lib_var=`echo slp'_'SLPOpen | sed 'y%./+-:%__p__%'`
22448 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
22449   echo $ac_n "(cached) $ac_c" 1>&6
22450 else
22451   ac_save_LIBS="$LIBS"
22452 LIBS="-lslp  $LIBS"
22453 cat > conftest.$ac_ext <<EOF
22454 #line 22455 "configure"
22455 #include "confdefs.h"
22456 /* Override any gcc2 internal prototype to avoid an error.  */
22457 /* We use char because int might match the return type of a gcc2
22458     builtin and then its argument prototype would still apply.  */
22459 char SLPOpen();
22460
22461 int main() {
22462 SLPOpen()
22463 ; return 0; }
22464 EOF
22465 if { (eval echo configure:22466: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22466   rm -rf conftest*
22467   eval "ac_cv_lib_$ac_lib_var=yes"
22468 else
22469   echo "configure: failed program was:" >&5
22470   cat conftest.$ac_ext >&5
22471   rm -rf conftest*
22472   eval "ac_cv_lib_$ac_lib_var=no"
22473 fi
22474 rm -f conftest*
22475 LIBS="$ac_save_LIBS"
22476
22477 fi
22478 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
22479   echo "$ac_t""yes" 1>&6
22480   have_slp=yes
22481 else
22482   echo "$ac_t""no" 1>&6
22483 have_slp=no
22484 fi
22485
22486                 if test $have_slp = yes ; then
22487                         cat >> confdefs.h <<\EOF
22488 #define HAVE_SLP 1
22489 EOF
22490
22491                         SLAPD_SLP_LIBS=-lslp
22492                 fi
22493
22494         elif test $ol_enable_slp = yes ; then
22495                 { echo "configure: error: SLP not found" 1>&2; exit 1; }
22496         fi
22497 fi
22498
22499 if test "$ol_with_multiple_precision" != "no" ; then
22500         ol_have_bignum=no
22501         ol_have_gmp=no
22502
22503         for ac_hdr in openssl/bn.h bn.h
22504 do
22505 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
22506 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
22507 echo "configure:22508: checking for $ac_hdr" >&5
22508 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
22509   echo $ac_n "(cached) $ac_c" 1>&6
22510 else
22511   cat > conftest.$ac_ext <<EOF
22512 #line 22513 "configure"
22513 #include "confdefs.h"
22514 #include <$ac_hdr>
22515 EOF
22516 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
22517 { (eval echo configure:22518: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
22518 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
22519 if test -z "$ac_err"; then
22520   rm -rf conftest*
22521   eval "ac_cv_header_$ac_safe=yes"
22522 else
22523   echo "$ac_err" >&5
22524   echo "configure: failed program was:" >&5
22525   cat conftest.$ac_ext >&5
22526   rm -rf conftest*
22527   eval "ac_cv_header_$ac_safe=no"
22528 fi
22529 rm -f conftest*
22530 fi
22531 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
22532   echo "$ac_t""yes" 1>&6
22533     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
22534   cat >> confdefs.h <<EOF
22535 #define $ac_tr_hdr 1
22536 EOF
22537  
22538 else
22539   echo "$ac_t""no" 1>&6
22540 fi
22541 done
22542
22543         for ac_hdr in openssl/crypto.h crypto.h
22544 do
22545 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
22546 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
22547 echo "configure:22548: checking for $ac_hdr" >&5
22548 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
22549   echo $ac_n "(cached) $ac_c" 1>&6
22550 else
22551   cat > conftest.$ac_ext <<EOF
22552 #line 22553 "configure"
22553 #include "confdefs.h"
22554 #include <$ac_hdr>
22555 EOF
22556 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
22557 { (eval echo configure:22558: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
22558 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
22559 if test -z "$ac_err"; then
22560   rm -rf conftest*
22561   eval "ac_cv_header_$ac_safe=yes"
22562 else
22563   echo "$ac_err" >&5
22564   echo "configure: failed program was:" >&5
22565   cat conftest.$ac_ext >&5
22566   rm -rf conftest*
22567   eval "ac_cv_header_$ac_safe=no"
22568 fi
22569 rm -f conftest*
22570 fi
22571 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
22572   echo "$ac_t""yes" 1>&6
22573     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
22574   cat >> confdefs.h <<EOF
22575 #define $ac_tr_hdr 1
22576 EOF
22577  
22578 else
22579   echo "$ac_t""no" 1>&6
22580 fi
22581 done
22582
22583         for ac_hdr in gmp.h 
22584 do
22585 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
22586 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
22587 echo "configure:22588: checking for $ac_hdr" >&5
22588 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
22589   echo $ac_n "(cached) $ac_c" 1>&6
22590 else
22591   cat > conftest.$ac_ext <<EOF
22592 #line 22593 "configure"
22593 #include "confdefs.h"
22594 #include <$ac_hdr>
22595 EOF
22596 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
22597 { (eval echo configure:22598: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
22598 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
22599 if test -z "$ac_err"; then
22600   rm -rf conftest*
22601   eval "ac_cv_header_$ac_safe=yes"
22602 else
22603   echo "$ac_err" >&5
22604   echo "configure: failed program was:" >&5
22605   cat conftest.$ac_ext >&5
22606   rm -rf conftest*
22607   eval "ac_cv_header_$ac_safe=no"
22608 fi
22609 rm -f conftest*
22610 fi
22611 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
22612   echo "$ac_t""yes" 1>&6
22613     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
22614   cat >> confdefs.h <<EOF
22615 #define $ac_tr_hdr 1
22616 EOF
22617  
22618 else
22619   echo "$ac_t""no" 1>&6
22620 fi
22621 done
22622
22623
22624         if test "$ol_with_tls" = "found" ; then
22625                 ol_have_bn_h=no
22626                 ol_have_crypto_h=no
22627
22628                 if test "$ac_cv_header_openssl_bn_h" = "yes" \
22629                                 -o "$ac_cv_header_bn_h" = "yes" ; then
22630                         ol_have_bn_h=yes
22631                 fi
22632
22633                 if test "$ac_cv_header_openssl_crypto_h" = "yes" \
22634                                 -o "$ac_cv_header_crypto_h" = "yes" ; then
22635                         ol_have_crypto_h=yes
22636                 fi
22637
22638                 if test "$ol_have_bn_h" = "yes" \
22639                                 -a "$ol_have_crypto_h" = "yes" ; then
22640                         ol_have_bignum=yes
22641                 fi
22642         fi
22643
22644         if test $ac_cv_header_gmp_h = yes ; then
22645                 echo $ac_n "checking for __gmpz_add_ui in -lgmp""... $ac_c" 1>&6
22646 echo "configure:22647: checking for __gmpz_add_ui in -lgmp" >&5
22647 ac_lib_var=`echo gmp'_'__gmpz_add_ui | sed 'y%./+-:%__p__%'`
22648 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
22649   echo $ac_n "(cached) $ac_c" 1>&6
22650 else
22651   ac_save_LIBS="$LIBS"
22652 LIBS="-lgmp  $LIBS"
22653 cat > conftest.$ac_ext <<EOF
22654 #line 22655 "configure"
22655 #include "confdefs.h"
22656 /* Override any gcc2 internal prototype to avoid an error.  */
22657 /* We use char because int might match the return type of a gcc2
22658     builtin and then its argument prototype would still apply.  */
22659 char __gmpz_add_ui();
22660
22661 int main() {
22662 __gmpz_add_ui()
22663 ; return 0; }
22664 EOF
22665 if { (eval echo configure:22666: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22666   rm -rf conftest*
22667   eval "ac_cv_lib_$ac_lib_var=yes"
22668 else
22669   echo "configure: failed program was:" >&5
22670   cat conftest.$ac_ext >&5
22671   rm -rf conftest*
22672   eval "ac_cv_lib_$ac_lib_var=no"
22673 fi
22674 rm -f conftest*
22675 LIBS="$ac_save_LIBS"
22676
22677 fi
22678 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
22679   echo "$ac_t""yes" 1>&6
22680   have_gmp=yes
22681 else
22682   echo "$ac_t""no" 1>&6
22683 have_gmp=no
22684 fi
22685
22686                 if test $have_gmp = yes ; then
22687                         ol_have_gmp=yes
22688                 fi
22689         fi
22690
22691         echo $ac_n "checking for multiple precision support""... $ac_c" 1>&6
22692 echo "configure:22693: checking for multiple precision support" >&5
22693
22694         ol_mp_support="none"
22695         case "$ol_with_multiple_precision" in
22696         auto)
22697                                                                                 if test "$ol_have_bignum" = "yes" ; then
22698                         ol_mp_support="bignum"
22699                 else
22700                         if test "$ol_have_gmp" = "yes" ; then
22701                                 ol_mp_support="gmp"
22702                         fi
22703                 fi
22704                 ;;
22705         bignum)
22706                 if test "$ol_have_bignum" != "yes" ; then
22707                         { echo "configure: error: OpenSSL's BIGNUM not available" 1>&2; exit 1; }
22708                 fi
22709                 ol_mp_support="bignum"
22710                 ;;
22711         gmp)
22712                 if test "$ol_have_gmp" != "yes" ; then
22713                         { echo "configure: error: GMP not available" 1>&2; exit 1; }
22714                 fi
22715                 ol_mp_support="gmp"
22716                 ;;
22717         yes)
22718                 if test "$ol_have_bignum" = "yes" ; then
22719                         ol_mp_support="bignum"
22720                 elif test "$ol_have_gmp" = "yes" ; then
22721                         ol_mp_support="gmp"
22722                 else
22723                         { echo "configure: error: not available" 1>&2; exit 1; }
22724                 fi
22725                 ;;
22726         esac
22727
22728         case "$ol_mp_support" in
22729         bignum)
22730                 cat >> confdefs.h <<\EOF
22731 #define HAVE_BIGNUM 1
22732 EOF
22733
22734                 ;;
22735         gmp)
22736                 cat >> confdefs.h <<\EOF
22737 #define HAVE_GMP 1
22738 EOF
22739
22740                 SLAPD_GMP_LIBS=-lgmp
22741                 ;;
22742         none)
22743                 ;;
22744         esac
22745
22746         echo "$ac_t""$ol_mp_support" 1>&6
22747 fi
22748
22749
22750 echo $ac_n "checking long long""... $ac_c" 1>&6
22751 echo "configure:22752: checking long long" >&5
22752 if eval "test \"\${ol_cv_type_long_long+set}\" = set"; then
22753   echo $ac_n "(cached) $ac_c" 1>&6
22754 else
22755   
22756         cat > conftest.$ac_ext <<EOF
22757 #line 22758 "configure"
22758 #include "confdefs.h"
22759
22760 int main() {
22761 long long x;
22762 ; return 0; }
22763 EOF
22764 if { (eval echo configure:22765: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22765   rm -rf conftest*
22766   ol_cv_type_long_long=yes
22767 else
22768   echo "configure: failed program was:" >&5
22769   cat conftest.$ac_ext >&5
22770   rm -rf conftest*
22771   ol_cv_type_long_long=no
22772 fi
22773 rm -f conftest*
22774 fi
22775
22776 echo "$ac_t""$ol_cv_type_long_long" 1>&6
22777 if test $ol_cv_type_long_long = yes; then
22778         cat >> confdefs.h <<\EOF
22779 #define HAVE_LONG_LONG 1
22780 EOF
22781
22782 fi
22783
22784 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
22785 echo "configure:22786: checking for ANSI C header files" >&5
22786 if eval "test \"\${ac_cv_header_stdc+set}\" = set"; then
22787   echo $ac_n "(cached) $ac_c" 1>&6
22788 else
22789   cat > conftest.$ac_ext <<EOF
22790 #line 22791 "configure"
22791 #include "confdefs.h"
22792 #include <stdlib.h>
22793 #include <stdarg.h>
22794 #include <string.h>
22795 #include <float.h>
22796 EOF
22797 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
22798 { (eval echo configure:22799: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
22799 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
22800 if test -z "$ac_err"; then
22801   rm -rf conftest*
22802   ac_cv_header_stdc=yes
22803 else
22804   echo "$ac_err" >&5
22805   echo "configure: failed program was:" >&5
22806   cat conftest.$ac_ext >&5
22807   rm -rf conftest*
22808   ac_cv_header_stdc=no
22809 fi
22810 rm -f conftest*
22811
22812 if test $ac_cv_header_stdc = yes; then
22813   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
22814 cat > conftest.$ac_ext <<EOF
22815 #line 22816 "configure"
22816 #include "confdefs.h"
22817 #include <string.h>
22818 EOF
22819 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
22820   egrep "memchr" >/dev/null 2>&1; then
22821   :
22822 else
22823   rm -rf conftest*
22824   ac_cv_header_stdc=no
22825 fi
22826 rm -f conftest*
22827
22828 fi
22829
22830 if test $ac_cv_header_stdc = yes; then
22831   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
22832 cat > conftest.$ac_ext <<EOF
22833 #line 22834 "configure"
22834 #include "confdefs.h"
22835 #include <stdlib.h>
22836 EOF
22837 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
22838   egrep "free" >/dev/null 2>&1; then
22839   :
22840 else
22841   rm -rf conftest*
22842   ac_cv_header_stdc=no
22843 fi
22844 rm -f conftest*
22845
22846 fi
22847
22848 if test $ac_cv_header_stdc = yes; then
22849   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
22850 if test "$cross_compiling" = yes; then
22851   :
22852 else
22853   cat > conftest.$ac_ext <<EOF
22854 #line 22855 "configure"
22855 #include "confdefs.h"
22856 #include <ctype.h>
22857 #if ((' ' & 0x0FF) == 0x020)
22858 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
22859 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
22860 #else
22861 #define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
22862  || ('j' <= (c) && (c) <= 'r') \
22863  || ('s' <= (c) && (c) <= 'z'))
22864 #define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
22865 #endif
22866 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
22867 int main () { int i; for (i = 0; i < 256; i++)
22868 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
22869 exit (0); }
22870
22871 EOF
22872 if { (eval echo configure:22873: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
22873 then
22874   :
22875 else
22876   echo "configure: failed program was:" >&5
22877   cat conftest.$ac_ext >&5
22878   rm -fr conftest*
22879   ac_cv_header_stdc=no
22880 fi
22881 rm -fr conftest*
22882 fi
22883
22884 fi
22885 fi
22886
22887 echo "$ac_t""$ac_cv_header_stdc" 1>&6
22888 if test $ac_cv_header_stdc = yes; then
22889   cat >> confdefs.h <<\EOF
22890 #define STDC_HEADERS 1
22891 EOF
22892
22893 fi
22894
22895 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
22896 echo "configure:22897: checking for mode_t" >&5
22897 if eval "test \"\${ac_cv_type_mode_t+set}\" = set"; then
22898   echo $ac_n "(cached) $ac_c" 1>&6
22899 else
22900   cat > conftest.$ac_ext <<EOF
22901 #line 22902 "configure"
22902 #include "confdefs.h"
22903 #include <sys/types.h>
22904 #if STDC_HEADERS
22905 #include <stdlib.h>
22906 #include <stddef.h>
22907 #endif
22908
22909 EOF
22910 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
22911   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
22912   rm -rf conftest*
22913   eval "ac_cv_type_mode_t=yes"
22914 else
22915   rm -rf conftest*
22916   eval "ac_cv_type_mode_t=no"
22917 fi
22918 rm -f conftest*
22919
22920 fi
22921 if eval "test \"`echo '$ac_cv_type_'mode_t`\" = yes"; then
22922   echo "$ac_t""yes" 1>&6
22923 else
22924   echo "$ac_t""no" 1>&6
22925   cat >> confdefs.h <<EOF
22926 #define mode_t int
22927 EOF
22928
22929 fi
22930
22931 echo $ac_n "checking for off_t""... $ac_c" 1>&6
22932 echo "configure:22933: checking for off_t" >&5
22933 if eval "test \"\${ac_cv_type_off_t+set}\" = set"; then
22934   echo $ac_n "(cached) $ac_c" 1>&6
22935 else
22936   cat > conftest.$ac_ext <<EOF
22937 #line 22938 "configure"
22938 #include "confdefs.h"
22939 #include <sys/types.h>
22940 #if STDC_HEADERS
22941 #include <stdlib.h>
22942 #include <stddef.h>
22943 #endif
22944
22945 EOF
22946 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
22947   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
22948   rm -rf conftest*
22949   eval "ac_cv_type_off_t=yes"
22950 else
22951   rm -rf conftest*
22952   eval "ac_cv_type_off_t=no"
22953 fi
22954 rm -f conftest*
22955
22956 fi
22957 if eval "test \"`echo '$ac_cv_type_'off_t`\" = yes"; then
22958   echo "$ac_t""yes" 1>&6
22959 else
22960   echo "$ac_t""no" 1>&6
22961   cat >> confdefs.h <<EOF
22962 #define off_t long
22963 EOF
22964
22965 fi
22966
22967 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
22968 echo "configure:22969: checking for pid_t" >&5
22969 if eval "test \"\${ac_cv_type_pid_t+set}\" = set"; then
22970   echo $ac_n "(cached) $ac_c" 1>&6
22971 else
22972   cat > conftest.$ac_ext <<EOF
22973 #line 22974 "configure"
22974 #include "confdefs.h"
22975 #include <sys/types.h>
22976 #if STDC_HEADERS
22977 #include <stdlib.h>
22978 #include <stddef.h>
22979 #endif
22980
22981 EOF
22982 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
22983   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
22984   rm -rf conftest*
22985   eval "ac_cv_type_pid_t=yes"
22986 else
22987   rm -rf conftest*
22988   eval "ac_cv_type_pid_t=no"
22989 fi
22990 rm -f conftest*
22991
22992 fi
22993 if eval "test \"`echo '$ac_cv_type_'pid_t`\" = yes"; then
22994   echo "$ac_t""yes" 1>&6
22995 else
22996   echo "$ac_t""no" 1>&6
22997   cat >> confdefs.h <<EOF
22998 #define pid_t int
22999 EOF
23000
23001 fi
23002
23003 echo $ac_n "checking for ptrdiff_t""... $ac_c" 1>&6
23004 echo "configure:23005: checking for ptrdiff_t" >&5
23005 if eval "test \"\${am_cv_type_ptrdiff_t+set}\" = set"; then
23006   echo $ac_n "(cached) $ac_c" 1>&6
23007 else
23008   cat > conftest.$ac_ext <<EOF
23009 #line 23010 "configure"
23010 #include "confdefs.h"
23011 #include <stddef.h>
23012 int main() {
23013 ptrdiff_t p
23014 ; return 0; }
23015 EOF
23016 if { (eval echo configure:23017: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23017   rm -rf conftest*
23018   am_cv_type_ptrdiff_t=yes
23019 else
23020   echo "configure: failed program was:" >&5
23021   cat conftest.$ac_ext >&5
23022   rm -rf conftest*
23023   am_cv_type_ptrdiff_t=no
23024 fi
23025 rm -f conftest*
23026 fi
23027
23028 echo "$ac_t""$am_cv_type_ptrdiff_t" 1>&6
23029    if test $am_cv_type_ptrdiff_t = yes; then
23030      cat >> confdefs.h <<\EOF
23031 #define HAVE_PTRDIFF_T 1
23032 EOF
23033
23034    fi
23035
23036 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
23037 echo "configure:23038: checking return type of signal handlers" >&5
23038 if eval "test \"\${ac_cv_type_signal+set}\" = set"; then
23039   echo $ac_n "(cached) $ac_c" 1>&6
23040 else
23041   cat > conftest.$ac_ext <<EOF
23042 #line 23043 "configure"
23043 #include "confdefs.h"
23044 #include <sys/types.h>
23045 #include <signal.h>
23046 #ifdef signal
23047 #undef signal
23048 #endif
23049 #ifdef __cplusplus
23050 extern "C" void (*signal (int, void (*)(int)))(int);
23051 #else
23052 void (*signal ()) ();
23053 #endif
23054
23055 int main() {
23056 int i;
23057 ; return 0; }
23058 EOF
23059 if { (eval echo configure:23060: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23060   rm -rf conftest*
23061   ac_cv_type_signal=void
23062 else
23063   echo "configure: failed program was:" >&5
23064   cat conftest.$ac_ext >&5
23065   rm -rf conftest*
23066   ac_cv_type_signal=int
23067 fi
23068 rm -f conftest*
23069 fi
23070
23071 echo "$ac_t""$ac_cv_type_signal" 1>&6
23072 cat >> confdefs.h <<EOF
23073 #define RETSIGTYPE $ac_cv_type_signal
23074 EOF
23075
23076
23077 echo $ac_n "checking for size_t""... $ac_c" 1>&6
23078 echo "configure:23079: checking for size_t" >&5
23079 if eval "test \"\${ac_cv_type_size_t+set}\" = set"; then
23080   echo $ac_n "(cached) $ac_c" 1>&6
23081 else
23082   cat > conftest.$ac_ext <<EOF
23083 #line 23084 "configure"
23084 #include "confdefs.h"
23085 #include <sys/types.h>
23086 #if STDC_HEADERS
23087 #include <stdlib.h>
23088 #include <stddef.h>
23089 #endif
23090
23091 EOF
23092 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
23093   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
23094   rm -rf conftest*
23095   eval "ac_cv_type_size_t=yes"
23096 else
23097   rm -rf conftest*
23098   eval "ac_cv_type_size_t=no"
23099 fi
23100 rm -f conftest*
23101
23102 fi
23103 if eval "test \"`echo '$ac_cv_type_'size_t`\" = yes"; then
23104   echo "$ac_t""yes" 1>&6
23105 else
23106   echo "$ac_t""no" 1>&6
23107   cat >> confdefs.h <<EOF
23108 #define size_t unsigned
23109 EOF
23110
23111 fi
23112
23113
23114 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
23115 echo "configure:23116: checking for ssize_t" >&5
23116 if eval "test \"\${ac_cv_type_ssize_t+set}\" = set"; then
23117   echo $ac_n "(cached) $ac_c" 1>&6
23118 else
23119   cat > conftest.$ac_ext <<EOF
23120 #line 23121 "configure"
23121 #include "confdefs.h"
23122 #include <sys/types.h>
23123 #if STDC_HEADERS
23124 #include <stdlib.h>
23125 #include <stddef.h>
23126 #endif
23127
23128 EOF
23129 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
23130   egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
23131   rm -rf conftest*
23132   eval "ac_cv_type_ssize_t=yes"
23133 else
23134   rm -rf conftest*
23135   eval "ac_cv_type_ssize_t=no"
23136 fi
23137 rm -f conftest*
23138
23139 fi
23140 if eval "test \"`echo '$ac_cv_type_'ssize_t`\" = yes"; then
23141   echo "$ac_t""yes" 1>&6
23142 else
23143   echo "$ac_t""no" 1>&6
23144   cat >> confdefs.h <<EOF
23145 #define ssize_t signed int
23146 EOF
23147
23148 fi
23149
23150 echo $ac_n "checking for caddr_t""... $ac_c" 1>&6
23151 echo "configure:23152: checking for caddr_t" >&5
23152 if eval "test \"\${ac_cv_type_caddr_t+set}\" = set"; then
23153   echo $ac_n "(cached) $ac_c" 1>&6
23154 else
23155   cat > conftest.$ac_ext <<EOF
23156 #line 23157 "configure"
23157 #include "confdefs.h"
23158 #include <sys/types.h>
23159 #if STDC_HEADERS
23160 #include <stdlib.h>
23161 #include <stddef.h>
23162 #endif
23163
23164 EOF
23165 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
23166   egrep "(^|[^a-zA-Z_0-9])caddr_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
23167   rm -rf conftest*
23168   eval "ac_cv_type_caddr_t=yes"
23169 else
23170   rm -rf conftest*
23171   eval "ac_cv_type_caddr_t=no"
23172 fi
23173 rm -f conftest*
23174
23175 fi
23176 if eval "test \"`echo '$ac_cv_type_'caddr_t`\" = yes"; then
23177   echo "$ac_t""yes" 1>&6
23178 else
23179   echo "$ac_t""no" 1>&6
23180   cat >> confdefs.h <<EOF
23181 #define caddr_t char *
23182 EOF
23183
23184 fi
23185
23186
23187 echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
23188 echo "configure:23189: checking for socklen_t" >&5
23189 if eval "test \"\${ol_cv_type_socklen_t+set}\" = set"; then
23190   echo $ac_n "(cached) $ac_c" 1>&6
23191 else
23192   cat > conftest.$ac_ext <<EOF
23193 #line 23194 "configure"
23194 #include "confdefs.h"
23195
23196 #ifdef HAVE_SYS_TYPES_H
23197 #include <sys/types.h>
23198 #endif
23199 #ifdef HAVE_SYS_SOCKET_H
23200 #include <sys/socket.h>
23201 #endif
23202
23203 int main() {
23204 socklen_t len;
23205 ; return 0; }
23206 EOF
23207 if { (eval echo configure:23208: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23208   rm -rf conftest*
23209   ol_cv_type_socklen_t=yes
23210 else
23211   echo "configure: failed program was:" >&5
23212   cat conftest.$ac_ext >&5
23213   rm -rf conftest*
23214   ol_cv_type_socklen_t=no
23215 fi
23216 rm -f conftest*
23217 fi
23218
23219 echo "$ac_t""$ol_cv_type_socklen_t" 1>&6
23220   if test $ol_cv_type_socklen_t = no; then
23221     cat >> confdefs.h <<\EOF
23222 #define socklen_t int
23223 EOF
23224
23225   fi
23226  
23227 echo $ac_n "checking for member st_blksize in aggregate type struct stat""... $ac_c" 1>&6
23228 echo "configure:23229: checking for member st_blksize in aggregate type struct stat" >&5
23229 if eval "test \"\${ac_cv_c_struct_member_st_blksize+set}\" = set"; then
23230   echo $ac_n "(cached) $ac_c" 1>&6
23231 else
23232   cat > conftest.$ac_ext <<EOF
23233 #line 23234 "configure"
23234 #include "confdefs.h"
23235 #include <sys/types.h>
23236 #include <sys/stat.h>
23237 int main() {
23238 struct stat foo; foo.st_blksize;
23239 ; return 0; }
23240 EOF
23241 if { (eval echo configure:23242: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23242   rm -rf conftest*
23243   ac_cv_c_struct_member_st_blksize=yes
23244 else
23245   echo "configure: failed program was:" >&5
23246   cat conftest.$ac_ext >&5
23247   rm -rf conftest*
23248   ac_cv_c_struct_member_st_blksize=no
23249 fi
23250 rm -f conftest*
23251 fi
23252
23253 echo "$ac_t""$ac_cv_c_struct_member_st_blksize" 1>&6
23254 st_blksize="$ac_cv_c_struct_member_st_blksize"
23255 if test $ac_cv_c_struct_member_st_blksize = yes; then
23256   cat >> confdefs.h <<\EOF
23257 #define HAVE_ST_BLKSIZE 1
23258 EOF
23259
23260 fi
23261
23262 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
23263 echo "configure:23264: checking whether time.h and sys/time.h may both be included" >&5
23264 if eval "test \"\${ac_cv_header_time+set}\" = set"; then
23265   echo $ac_n "(cached) $ac_c" 1>&6
23266 else
23267   cat > conftest.$ac_ext <<EOF
23268 #line 23269 "configure"
23269 #include "confdefs.h"
23270 #include <sys/types.h>
23271 #include <sys/time.h>
23272 #include <time.h>
23273 int main() {
23274 struct tm *tp;
23275 ; return 0; }
23276 EOF
23277 if { (eval echo configure:23278: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23278   rm -rf conftest*
23279   ac_cv_header_time=yes
23280 else
23281   echo "configure: failed program was:" >&5
23282   cat conftest.$ac_ext >&5
23283   rm -rf conftest*
23284   ac_cv_header_time=no
23285 fi
23286 rm -f conftest*
23287 fi
23288
23289 echo "$ac_t""$ac_cv_header_time" 1>&6
23290 if test $ac_cv_header_time = yes; then
23291   cat >> confdefs.h <<\EOF
23292 #define TIME_WITH_SYS_TIME 1
23293 EOF
23294
23295 fi
23296
23297 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
23298 echo "configure:23299: checking whether struct tm is in sys/time.h or time.h" >&5
23299 if eval "test \"\${ac_cv_struct_tm+set}\" = set"; then
23300   echo $ac_n "(cached) $ac_c" 1>&6
23301 else
23302   cat > conftest.$ac_ext <<EOF
23303 #line 23304 "configure"
23304 #include "confdefs.h"
23305 #include <sys/types.h>
23306 #include <time.h>
23307 int main() {
23308 struct tm *tp; tp->tm_sec;
23309 ; return 0; }
23310 EOF
23311 if { (eval echo configure:23312: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23312   rm -rf conftest*
23313   ac_cv_struct_tm=time.h
23314 else
23315   echo "configure: failed program was:" >&5
23316   cat conftest.$ac_ext >&5
23317   rm -rf conftest*
23318   ac_cv_struct_tm=sys/time.h
23319 fi
23320 rm -f conftest*
23321 fi
23322
23323 echo "$ac_t""$ac_cv_struct_tm" 1>&6
23324 if test $ac_cv_struct_tm = sys/time.h; then
23325   cat >> confdefs.h <<\EOF
23326 #define TM_IN_SYS_TIME 1
23327 EOF
23328
23329 fi
23330
23331 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
23332 echo "configure:23333: checking for uid_t in sys/types.h" >&5
23333 if eval "test \"\${ac_cv_type_uid_t+set}\" = set"; then
23334   echo $ac_n "(cached) $ac_c" 1>&6
23335 else
23336   cat > conftest.$ac_ext <<EOF
23337 #line 23338 "configure"
23338 #include "confdefs.h"
23339 #include <sys/types.h>
23340 EOF
23341 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
23342   egrep "uid_t" >/dev/null 2>&1; then
23343   rm -rf conftest*
23344   ac_cv_type_uid_t=yes
23345 else
23346   rm -rf conftest*
23347   ac_cv_type_uid_t=no
23348 fi
23349 rm -f conftest*
23350
23351 fi
23352
23353 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
23354 if test $ac_cv_type_uid_t = no; then
23355   cat >> confdefs.h <<\EOF
23356 #define uid_t int
23357 EOF
23358
23359   cat >> confdefs.h <<\EOF
23360 #define gid_t int
23361 EOF
23362
23363 fi
23364
23365 echo $ac_n "checking for sig_atomic_t""... $ac_c" 1>&6
23366 echo "configure:23367: checking for sig_atomic_t" >&5
23367 if eval "test \"\${ol_cv_type_sig_atomic_t+set}\" = set"; then
23368   echo $ac_n "(cached) $ac_c" 1>&6
23369 else
23370   cat > conftest.$ac_ext <<EOF
23371 #line 23372 "configure"
23372 #include "confdefs.h"
23373 #include <signal.h>
23374 int main() {
23375 sig_atomic_t atomic;
23376 ; return 0; }
23377 EOF
23378 if { (eval echo configure:23379: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23379   rm -rf conftest*
23380   ol_cv_type_sig_atomic_t=yes
23381 else
23382   echo "configure: failed program was:" >&5
23383   cat conftest.$ac_ext >&5
23384   rm -rf conftest*
23385   ol_cv_type_sig_atomic_t=no
23386 fi
23387 rm -f conftest*
23388 fi
23389
23390 echo "$ac_t""$ol_cv_type_sig_atomic_t" 1>&6
23391   if test $ol_cv_type_sig_atomic_t = no; then
23392     cat >> confdefs.h <<\EOF
23393 #define sig_atomic_t int
23394 EOF
23395
23396   fi
23397  
23398
23399
23400 # test for pw_gecos in struct passwd
23401 echo $ac_n "checking struct passwd for pw_gecos""... $ac_c" 1>&6
23402 echo "configure:23403: checking struct passwd for pw_gecos" >&5
23403 if eval "test \"\${ol_cv_struct_passwd_pw_gecos+set}\" = set"; then
23404   echo $ac_n "(cached) $ac_c" 1>&6
23405 else
23406   
23407         cat > conftest.$ac_ext <<EOF
23408 #line 23409 "configure"
23409 #include "confdefs.h"
23410 #include <pwd.h>
23411 int main() {
23412
23413         struct passwd pwd;
23414         pwd.pw_gecos = pwd.pw_name;
23415
23416 ; return 0; }
23417 EOF
23418 if { (eval echo configure:23419: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23419   rm -rf conftest*
23420   ol_cv_struct_passwd_pw_gecos=yes
23421 else
23422   echo "configure: failed program was:" >&5
23423   cat conftest.$ac_ext >&5
23424   rm -rf conftest*
23425   ol_cv_struct_passwd_pw_gecos=no
23426 fi
23427 rm -f conftest*
23428 fi
23429
23430 echo "$ac_t""$ol_cv_struct_passwd_pw_gecos" 1>&6
23431 if test $ol_cv_struct_passwd_pw_gecos = yes ; then
23432         cat >> confdefs.h <<\EOF
23433 #define HAVE_PW_GECOS 1
23434 EOF
23435
23436 fi
23437
23438 # test for pw_passwd in struct passwd
23439 echo $ac_n "checking struct passwd for pw_passwd""... $ac_c" 1>&6
23440 echo "configure:23441: checking struct passwd for pw_passwd" >&5
23441 if eval "test \"\${ol_cv_struct_passwd_pw_passwd+set}\" = set"; then
23442   echo $ac_n "(cached) $ac_c" 1>&6
23443 else
23444   
23445         cat > conftest.$ac_ext <<EOF
23446 #line 23447 "configure"
23447 #include "confdefs.h"
23448 #include <pwd.h>
23449 int main() {
23450
23451         struct passwd pwd;
23452         pwd.pw_passwd = pwd.pw_name;
23453
23454 ; return 0; }
23455 EOF
23456 if { (eval echo configure:23457: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23457   rm -rf conftest*
23458   ol_cv_struct_passwd_pw_passwd=yes
23459 else
23460   echo "configure: failed program was:" >&5
23461   cat conftest.$ac_ext >&5
23462   rm -rf conftest*
23463   ol_cv_struct_passwd_pw_passwd=no
23464 fi
23465 rm -f conftest*
23466 fi
23467
23468 echo "$ac_t""$ol_cv_struct_passwd_pw_passwd" 1>&6
23469 if test $ol_cv_struct_passwd_pw_passwd = yes ; then
23470         cat >> confdefs.h <<\EOF
23471 #define HAVE_PW_PASSWD 1
23472 EOF
23473
23474 fi
23475
23476
23477 echo $ac_n "checking if toupper() requires islower()""... $ac_c" 1>&6
23478 echo "configure:23479: checking if toupper() requires islower()" >&5
23479 if eval "test \"\${ol_cv_c_upper_lower+set}\" = set"; then
23480   echo $ac_n "(cached) $ac_c" 1>&6
23481 else
23482   
23483         if test "$cross_compiling" = yes; then
23484   ol_cv_c_upper_lower=safe
23485 else
23486   cat > conftest.$ac_ext <<EOF
23487 #line 23488 "configure"
23488 #include "confdefs.h"
23489
23490 #include <ctype.h>
23491 main()
23492 {
23493         if ('C' == toupper('C'))
23494                 exit(0);
23495         else
23496                 exit(1);
23497 }
23498 EOF
23499 if { (eval echo configure:23500: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
23500 then
23501   ol_cv_c_upper_lower=no
23502 else
23503   echo "configure: failed program was:" >&5
23504   cat conftest.$ac_ext >&5
23505   rm -fr conftest*
23506   ol_cv_c_upper_lower=yes
23507 fi
23508 rm -fr conftest*
23509 fi
23510
23511 fi
23512
23513 echo "$ac_t""$ol_cv_c_upper_lower" 1>&6
23514 if test $ol_cv_c_upper_lower != no ; then
23515         cat >> confdefs.h <<\EOF
23516 #define C_UPPER_LOWER 1
23517 EOF
23518
23519 fi
23520
23521 echo $ac_n "checking for working const""... $ac_c" 1>&6
23522 echo "configure:23523: checking for working const" >&5
23523 if eval "test \"\${ac_cv_c_const+set}\" = set"; then
23524   echo $ac_n "(cached) $ac_c" 1>&6
23525 else
23526   cat > conftest.$ac_ext <<EOF
23527 #line 23528 "configure"
23528 #include "confdefs.h"
23529
23530 int main() {
23531
23532 /* Ultrix mips cc rejects this.  */
23533 typedef int charset[2]; const charset x;
23534 /* SunOS 4.1.1 cc rejects this.  */
23535 char const *const *ccp;
23536 char **p;
23537 /* NEC SVR4.0.2 mips cc rejects this.  */
23538 struct point {int x, y;};
23539 static struct point const zero = {0,0};
23540 /* AIX XL C 1.02.0.0 rejects this.
23541    It does not let you subtract one const X* pointer from another in an arm
23542    of an if-expression whose if-part is not a constant expression */
23543 const char *g = "string";
23544 ccp = &g + (g ? g-g : 0);
23545 /* HPUX 7.0 cc rejects these. */
23546 ++ccp;
23547 p = (char**) ccp;
23548 ccp = (char const *const *) p;
23549 { /* SCO 3.2v4 cc rejects this.  */
23550   char *t;
23551   char const *s = 0 ? (char *) 0 : (char const *) 0;
23552
23553   *t++ = 0;
23554 }
23555 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
23556   int x[] = {25, 17};
23557   const int *foo = &x[0];
23558   ++foo;
23559 }
23560 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
23561   typedef const int *iptr;
23562   iptr p = 0;
23563   ++p;
23564 }
23565 { /* AIX XL C 1.02.0.0 rejects this saying
23566      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
23567   struct s { int j; const int *ap[3]; };
23568   struct s *b; b->j = 5;
23569 }
23570 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
23571   const int foo = 10;
23572 }
23573
23574 ; return 0; }
23575 EOF
23576 if { (eval echo configure:23577: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23577   rm -rf conftest*
23578   ac_cv_c_const=yes
23579 else
23580   echo "configure: failed program was:" >&5
23581   cat conftest.$ac_ext >&5
23582   rm -rf conftest*
23583   ac_cv_c_const=no
23584 fi
23585 rm -f conftest*
23586 fi
23587
23588 echo "$ac_t""$ac_cv_c_const" 1>&6
23589 if test $ac_cv_c_const = no; then
23590   cat >> confdefs.h <<\EOF
23591 #define const 
23592 EOF
23593
23594 fi
23595
23596 echo $ac_n "checking if compiler understands volatile""... $ac_c" 1>&6
23597 echo "configure:23598: checking if compiler understands volatile" >&5
23598 if eval "test \"\${ol_cv_c_volatile+set}\" = set"; then
23599   echo $ac_n "(cached) $ac_c" 1>&6
23600 else
23601   cat > conftest.$ac_ext <<EOF
23602 #line 23603 "configure"
23603 #include "confdefs.h"
23604 int x, y, z;
23605 int main() {
23606 volatile int a; int * volatile b = x ? &y : &z;
23607       /* Older MIPS compilers (eg., in Ultrix 4.2) don't like *b = 0 */
23608       *b = 0;
23609 ; return 0; }
23610 EOF
23611 if { (eval echo configure:23612: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23612   rm -rf conftest*
23613   ol_cv_c_volatile=yes
23614 else
23615   echo "configure: failed program was:" >&5
23616   cat conftest.$ac_ext >&5
23617   rm -rf conftest*
23618   ol_cv_c_volatile=no
23619 fi
23620 rm -f conftest*
23621 fi
23622
23623 echo "$ac_t""$ol_cv_c_volatile" 1>&6
23624   if test $ol_cv_c_volatile = yes; then
23625     : 
23626   else
23627     cat >> confdefs.h <<\EOF
23628 #define volatile 
23629 EOF
23630
23631   fi
23632  
23633
23634 if test $cross_compiling = yes ; then
23635         echo "configure: warning: Crossing compiling... all bets are off!" 1>&2
23636         cat >> confdefs.h <<\EOF
23637 #define CROSS_COMPILING 1
23638 EOF
23639
23640 else
23641         echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
23642 echo "configure:23643: checking whether byte ordering is bigendian" >&5
23643 if eval "test \"\${ac_cv_c_bigendian+set}\" = set"; then
23644   echo $ac_n "(cached) $ac_c" 1>&6
23645 else
23646   ac_cv_c_bigendian=unknown
23647 # See if sys/param.h defines the BYTE_ORDER macro.
23648 cat > conftest.$ac_ext <<EOF
23649 #line 23650 "configure"
23650 #include "confdefs.h"
23651 #include <sys/types.h>
23652 #include <sys/param.h>
23653 int main() {
23654
23655 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
23656  bogus endian macros
23657 #endif
23658 ; return 0; }
23659 EOF
23660 if { (eval echo configure:23661: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23661   rm -rf conftest*
23662   # It does; now see whether it defined to BIG_ENDIAN or not.
23663 cat > conftest.$ac_ext <<EOF
23664 #line 23665 "configure"
23665 #include "confdefs.h"
23666 #include <sys/types.h>
23667 #include <sys/param.h>
23668 int main() {
23669
23670 #if BYTE_ORDER != BIG_ENDIAN
23671  not big endian
23672 #endif
23673 ; return 0; }
23674 EOF
23675 if { (eval echo configure:23676: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23676   rm -rf conftest*
23677   ac_cv_c_bigendian=yes
23678 else
23679   echo "configure: failed program was:" >&5
23680   cat conftest.$ac_ext >&5
23681   rm -rf conftest*
23682   ac_cv_c_bigendian=no
23683 fi
23684 rm -f conftest*
23685 else
23686   echo "configure: failed program was:" >&5
23687   cat conftest.$ac_ext >&5
23688 fi
23689 rm -f conftest*
23690 if test $ac_cv_c_bigendian = unknown; then
23691 if test "$cross_compiling" = yes; then
23692     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
23693 else
23694   cat > conftest.$ac_ext <<EOF
23695 #line 23696 "configure"
23696 #include "confdefs.h"
23697 main () {
23698   /* Are we little or big endian?  From Harbison&Steele.  */
23699   union
23700   {
23701     long l;
23702     char c[sizeof (long)];
23703   } u;
23704   u.l = 1;
23705   exit (u.c[sizeof (long) - 1] == 1);
23706 }
23707 EOF
23708 if { (eval echo configure:23709: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
23709 then
23710   ac_cv_c_bigendian=no
23711 else
23712   echo "configure: failed program was:" >&5
23713   cat conftest.$ac_ext >&5
23714   rm -fr conftest*
23715   ac_cv_c_bigendian=yes
23716 fi
23717 rm -fr conftest*
23718 fi
23719
23720 fi
23721 fi
23722
23723 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
23724 if test $ac_cv_c_bigendian = yes; then
23725   cat >> confdefs.h <<\EOF
23726 #define WORDS_BIGENDIAN 1
23727 EOF
23728
23729 fi
23730
23731 fi
23732
23733 echo $ac_n "checking size of short""... $ac_c" 1>&6
23734 echo "configure:23735: checking size of short" >&5 
23735 if eval "test \"\${ac_cv_sizeof_short+set}\" = set"; then
23736   echo $ac_n "(cached) $ac_c" 1>&6
23737 else
23738   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
23739   cat > conftest.$ac_ext <<EOF
23740 #line 23741 "configure"
23741 #include "confdefs.h"
23742 #include "confdefs.h" 
23743 #include <stdlib.h>
23744 #include <sys/types.h> 
23745  
23746
23747 int main() {
23748 switch (0) case 0: case (sizeof (short) == $ac_size):;
23749 ; return 0; }
23750 EOF
23751 if { (eval echo configure:23752: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23752   rm -rf conftest*
23753   ac_cv_sizeof_short=$ac_size
23754 else
23755   echo "configure: failed program was:" >&5
23756   cat conftest.$ac_ext >&5
23757 fi
23758 rm -f conftest* 
23759   if test x$ac_cv_sizeof_short != x ; then break; fi 
23760 done 
23761
23762 fi
23763  
23764 if test x$ac_cv_sizeof_short = x ; then 
23765   { echo "configure: error: cannot determine a size for short" 1>&2; exit 1; } 
23766 fi 
23767 echo "$ac_t""$ac_cv_sizeof_short" 1>&6 
23768 cat >> confdefs.h <<EOF
23769 #define SIZEOF_SHORT $ac_cv_sizeof_short
23770 EOF
23771  
23772  
23773 echo $ac_n "checking size of int""... $ac_c" 1>&6
23774 echo "configure:23775: checking size of int" >&5 
23775 if eval "test \"\${ac_cv_sizeof_int+set}\" = set"; then
23776   echo $ac_n "(cached) $ac_c" 1>&6
23777 else
23778   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
23779   cat > conftest.$ac_ext <<EOF
23780 #line 23781 "configure"
23781 #include "confdefs.h"
23782 #include "confdefs.h" 
23783 #include <stdlib.h>
23784 #include <sys/types.h> 
23785  
23786
23787 int main() {
23788 switch (0) case 0: case (sizeof (int) == $ac_size):;
23789 ; return 0; }
23790 EOF
23791 if { (eval echo configure:23792: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23792   rm -rf conftest*
23793   ac_cv_sizeof_int=$ac_size
23794 else
23795   echo "configure: failed program was:" >&5
23796   cat conftest.$ac_ext >&5
23797 fi
23798 rm -f conftest* 
23799   if test x$ac_cv_sizeof_int != x ; then break; fi 
23800 done 
23801
23802 fi
23803  
23804 if test x$ac_cv_sizeof_int = x ; then 
23805   { echo "configure: error: cannot determine a size for int" 1>&2; exit 1; } 
23806 fi 
23807 echo "$ac_t""$ac_cv_sizeof_int" 1>&6 
23808 cat >> confdefs.h <<EOF
23809 #define SIZEOF_INT $ac_cv_sizeof_int
23810 EOF
23811  
23812  
23813 echo $ac_n "checking size of long""... $ac_c" 1>&6
23814 echo "configure:23815: checking size of long" >&5 
23815 if eval "test \"\${ac_cv_sizeof_long+set}\" = set"; then
23816   echo $ac_n "(cached) $ac_c" 1>&6
23817 else
23818   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
23819   cat > conftest.$ac_ext <<EOF
23820 #line 23821 "configure"
23821 #include "confdefs.h"
23822 #include "confdefs.h" 
23823 #include <stdlib.h>
23824 #include <sys/types.h> 
23825  
23826
23827 int main() {
23828 switch (0) case 0: case (sizeof (long) == $ac_size):;
23829 ; return 0; }
23830 EOF
23831 if { (eval echo configure:23832: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23832   rm -rf conftest*
23833   ac_cv_sizeof_long=$ac_size
23834 else
23835   echo "configure: failed program was:" >&5
23836   cat conftest.$ac_ext >&5
23837 fi
23838 rm -f conftest* 
23839   if test x$ac_cv_sizeof_long != x ; then break; fi 
23840 done 
23841
23842 fi
23843  
23844 if test x$ac_cv_sizeof_long = x ; then 
23845   { echo "configure: error: cannot determine a size for long" 1>&2; exit 1; } 
23846 fi 
23847 echo "$ac_t""$ac_cv_sizeof_long" 1>&6 
23848 cat >> confdefs.h <<EOF
23849 #define SIZEOF_LONG $ac_cv_sizeof_long
23850 EOF
23851  
23852
23853 echo $ac_n "checking size of wchar_t""... $ac_c" 1>&6
23854 echo "configure:23855: checking size of wchar_t" >&5 
23855 if eval "test \"\${ac_cv_sizeof_wchar_t+set}\" = set"; then
23856   echo $ac_n "(cached) $ac_c" 1>&6
23857 else
23858   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
23859   cat > conftest.$ac_ext <<EOF
23860 #line 23861 "configure"
23861 #include "confdefs.h"
23862 #include "confdefs.h" 
23863 #include <stdlib.h>
23864 #include <sys/types.h> 
23865  
23866
23867 int main() {
23868 switch (0) case 0: case (sizeof (wchar_t) == $ac_size):;
23869 ; return 0; }
23870 EOF
23871 if { (eval echo configure:23872: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23872   rm -rf conftest*
23873   ac_cv_sizeof_wchar_t=$ac_size
23874 else
23875   echo "configure: failed program was:" >&5
23876   cat conftest.$ac_ext >&5
23877 fi
23878 rm -f conftest* 
23879   if test x$ac_cv_sizeof_wchar_t != x ; then break; fi 
23880 done 
23881
23882 fi
23883  
23884 if test x$ac_cv_sizeof_wchar_t = x ; then 
23885   { echo "configure: error: cannot determine a size for wchar_t" 1>&2; exit 1; } 
23886 fi 
23887 echo "$ac_t""$ac_cv_sizeof_wchar_t" 1>&6 
23888 cat >> confdefs.h <<EOF
23889 #define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
23890 EOF
23891  
23892
23893
23894 if test "$ac_cv_sizeof_int" -lt 4 ; then
23895         echo "configure: warning: OpenLDAP requires 'int' to be 32 bits or greater." 1>&2
23896
23897         cat >> confdefs.h <<\EOF
23898 #define LBER_INT_T long
23899 EOF
23900
23901 else
23902         cat >> confdefs.h <<\EOF
23903 #define LBER_INT_T int
23904 EOF
23905
23906 fi
23907
23908 cat >> confdefs.h <<\EOF
23909 #define LBER_LEN_T long
23910 EOF
23911
23912 cat >> confdefs.h <<\EOF
23913 #define LBER_SOCKET_T int
23914 EOF
23915
23916 cat >> confdefs.h <<\EOF
23917 #define LBER_TAG_T long
23918 EOF
23919
23920
23921 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
23922 echo "configure:23923: checking for 8-bit clean memcmp" >&5
23923 if eval "test \"\${ac_cv_func_memcmp_clean+set}\" = set"; then
23924   echo $ac_n "(cached) $ac_c" 1>&6
23925 else
23926   if test "$cross_compiling" = yes; then
23927   ac_cv_func_memcmp_clean=no
23928 else
23929   cat > conftest.$ac_ext <<EOF
23930 #line 23931 "configure"
23931 #include "confdefs.h"
23932
23933 main()
23934 {
23935   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
23936   exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
23937 }
23938
23939 EOF
23940 if { (eval echo configure:23941: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
23941 then
23942   ac_cv_func_memcmp_clean=yes
23943 else
23944   echo "configure: failed program was:" >&5
23945   cat conftest.$ac_ext >&5
23946   rm -fr conftest*
23947   ac_cv_func_memcmp_clean=no
23948 fi
23949 rm -fr conftest*
23950 fi
23951
23952 fi
23953
23954 echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
23955 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
23956
23957 echo $ac_n "checking for strftime""... $ac_c" 1>&6
23958 echo "configure:23959: checking for strftime" >&5
23959 if eval "test \"\${ac_cv_func_strftime+set}\" = set"; then
23960   echo $ac_n "(cached) $ac_c" 1>&6
23961 else
23962   cat > conftest.$ac_ext <<EOF
23963 #line 23964 "configure"
23964 #include "confdefs.h"
23965 /* System header to define __stub macros and hopefully few prototypes,
23966     which can conflict with char strftime(); below.  */
23967 #include <assert.h>
23968 /* Override any gcc2 internal prototype to avoid an error.  */
23969 /* We use char because int might match the return type of a gcc2
23970     builtin and then its argument prototype would still apply.  */
23971 char strftime();
23972 char (*f)();
23973
23974 int main() {
23975
23976 /* The GNU C library defines this for functions which it implements
23977     to always fail with ENOSYS.  Some functions are actually named
23978     something starting with __ and the normal name is an alias.  */
23979 #if defined (__stub_strftime) || defined (__stub___strftime)
23980 choke me
23981 #else
23982 f = strftime;
23983 #endif
23984
23985 ; return 0; }
23986 EOF
23987 if { (eval echo configure:23988: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
23988   rm -rf conftest*
23989   eval "ac_cv_func_strftime=yes"
23990 else
23991   echo "configure: failed program was:" >&5
23992   cat conftest.$ac_ext >&5
23993   rm -rf conftest*
23994   eval "ac_cv_func_strftime=no"
23995 fi
23996 rm -f conftest*
23997 fi
23998
23999 if eval "test \"`echo '$ac_cv_func_'strftime`\" = yes"; then
24000   echo "$ac_t""yes" 1>&6
24001   cat >> confdefs.h <<\EOF
24002 #define HAVE_STRFTIME 1
24003 EOF
24004
24005 else
24006   echo "$ac_t""no" 1>&6
24007 # strftime is in -lintl on SCO UNIX.
24008 echo $ac_n "checking for strftime in -lintl""... $ac_c" 1>&6
24009 echo "configure:24010: checking for strftime in -lintl" >&5
24010 ac_lib_var=`echo intl'_'strftime | sed 'y%./+-:%__p__%'`
24011 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
24012   echo $ac_n "(cached) $ac_c" 1>&6
24013 else
24014   ac_save_LIBS="$LIBS"
24015 LIBS="-lintl  $LIBS"
24016 cat > conftest.$ac_ext <<EOF
24017 #line 24018 "configure"
24018 #include "confdefs.h"
24019 /* Override any gcc2 internal prototype to avoid an error.  */
24020 /* We use char because int might match the return type of a gcc2
24021     builtin and then its argument prototype would still apply.  */
24022 char strftime();
24023
24024 int main() {
24025 strftime()
24026 ; return 0; }
24027 EOF
24028 if { (eval echo configure:24029: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
24029   rm -rf conftest*
24030   eval "ac_cv_lib_$ac_lib_var=yes"
24031 else
24032   echo "configure: failed program was:" >&5
24033   cat conftest.$ac_ext >&5
24034   rm -rf conftest*
24035   eval "ac_cv_lib_$ac_lib_var=no"
24036 fi
24037 rm -f conftest*
24038 LIBS="$ac_save_LIBS"
24039
24040 fi
24041 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
24042   echo "$ac_t""yes" 1>&6
24043   cat >> confdefs.h <<\EOF
24044 #define HAVE_STRFTIME 1
24045 EOF
24046
24047 LIBS="-lintl $LIBS"
24048 else
24049   echo "$ac_t""no" 1>&6
24050 fi
24051
24052 fi
24053
24054
24055 echo $ac_n "checking for inet_aton()""... $ac_c" 1>&6
24056 echo "configure:24057: checking for inet_aton()" >&5
24057 if eval "test \"\${ol_cv_func_inet_aton+set}\" = set"; then
24058   echo $ac_n "(cached) $ac_c" 1>&6
24059 else
24060   cat > conftest.$ac_ext <<EOF
24061 #line 24062 "configure"
24062 #include "confdefs.h"
24063
24064 #ifdef HAVE_SYS_TYPES_H
24065 #       include <sys/types.h>
24066 #endif
24067 #ifdef HAVE_SYS_SOCKET_H
24068 #       include <sys/socket.h>
24069 #       ifdef HAVE_SYS_SELECT_H
24070 #               include <sys/select.h>
24071 #       endif
24072 #       include <netinet/in.h>
24073 #       ifdef HAVE_ARPA_INET_H
24074 #               include <arpa/inet.h>
24075 #       endif
24076 #endif
24077
24078 int main() {
24079 struct in_addr in;
24080 int rc = inet_aton( "255.255.255.255", &in );
24081 ; return 0; }
24082 EOF
24083 if { (eval echo configure:24084: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
24084   rm -rf conftest*
24085   ol_cv_func_inet_aton=yes
24086 else
24087   echo "configure: failed program was:" >&5
24088   cat conftest.$ac_ext >&5
24089   rm -rf conftest*
24090   ol_cv_func_inet_aton=no
24091 fi
24092 rm -f conftest*
24093 fi
24094
24095 echo "$ac_t""$ol_cv_func_inet_aton" 1>&6
24096   if test $ol_cv_func_inet_aton != no; then
24097     cat >> confdefs.h <<\EOF
24098 #define HAVE_INET_ATON 1
24099 EOF
24100
24101   fi
24102  
24103
24104 echo $ac_n "checking for _spawnlp""... $ac_c" 1>&6
24105 echo "configure:24106: checking for _spawnlp" >&5
24106 if eval "test \"\${ac_cv_func__spawnlp+set}\" = set"; then
24107   echo $ac_n "(cached) $ac_c" 1>&6
24108 else
24109   cat > conftest.$ac_ext <<EOF
24110 #line 24111 "configure"
24111 #include "confdefs.h"
24112 /* System header to define __stub macros and hopefully few prototypes,
24113     which can conflict with char _spawnlp(); below.  */
24114 #include <assert.h>
24115 /* Override any gcc2 internal prototype to avoid an error.  */
24116 /* We use char because int might match the return type of a gcc2
24117     builtin and then its argument prototype would still apply.  */
24118 char _spawnlp();
24119 char (*f)();
24120
24121 int main() {
24122
24123 /* The GNU C library defines this for functions which it implements
24124     to always fail with ENOSYS.  Some functions are actually named
24125     something starting with __ and the normal name is an alias.  */
24126 #if defined (__stub__spawnlp) || defined (__stub____spawnlp)
24127 choke me
24128 #else
24129 f = _spawnlp;
24130 #endif
24131
24132 ; return 0; }
24133 EOF
24134 if { (eval echo configure:24135: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
24135   rm -rf conftest*
24136   eval "ac_cv_func__spawnlp=yes"
24137 else
24138   echo "configure: failed program was:" >&5
24139   cat conftest.$ac_ext >&5
24140   rm -rf conftest*
24141   eval "ac_cv_func__spawnlp=no"
24142 fi
24143 rm -f conftest*
24144 fi
24145
24146 if eval "test \"`echo '$ac_cv_func_'_spawnlp`\" = yes"; then
24147   echo "$ac_t""yes" 1>&6
24148   cat >> confdefs.h <<\EOF
24149 #define HAVE_SPAWNLP 1
24150 EOF
24151
24152 else
24153   echo "$ac_t""no" 1>&6
24154 fi
24155
24156
24157 echo $ac_n "checking for _snprintf""... $ac_c" 1>&6
24158 echo "configure:24159: checking for _snprintf" >&5
24159 if eval "test \"\${ac_cv_func__snprintf+set}\" = set"; then
24160   echo $ac_n "(cached) $ac_c" 1>&6
24161 else
24162   cat > conftest.$ac_ext <<EOF
24163 #line 24164 "configure"
24164 #include "confdefs.h"
24165 /* System header to define __stub macros and hopefully few prototypes,
24166     which can conflict with char _snprintf(); below.  */
24167 #include <assert.h>
24168 /* Override any gcc2 internal prototype to avoid an error.  */
24169 /* We use char because int might match the return type of a gcc2
24170     builtin and then its argument prototype would still apply.  */
24171 char _snprintf();
24172 char (*f)();
24173
24174 int main() {
24175
24176 /* The GNU C library defines this for functions which it implements
24177     to always fail with ENOSYS.  Some functions are actually named
24178     something starting with __ and the normal name is an alias.  */
24179 #if defined (__stub__snprintf) || defined (__stub____snprintf)
24180 choke me
24181 #else
24182 f = _snprintf;
24183 #endif
24184
24185 ; return 0; }
24186 EOF
24187 if { (eval echo configure:24188: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
24188   rm -rf conftest*
24189   eval "ac_cv_func__snprintf=yes"
24190 else
24191   echo "configure: failed program was:" >&5
24192   cat conftest.$ac_ext >&5
24193   rm -rf conftest*
24194   eval "ac_cv_func__snprintf=no"
24195 fi
24196 rm -f conftest*
24197 fi
24198
24199 if eval "test \"`echo '$ac_cv_func_'_snprintf`\" = yes"; then
24200   echo "$ac_t""yes" 1>&6
24201   ac_cv_func_snprintf=yes
24202         cat >> confdefs.h <<\EOF
24203 #define snprintf _snprintf
24204 EOF
24205
24206
24207 else
24208   echo "$ac_t""no" 1>&6
24209 fi
24210
24211
24212 echo $ac_n "checking for _vsnprintf""... $ac_c" 1>&6
24213 echo "configure:24214: checking for _vsnprintf" >&5
24214 if eval "test \"\${ac_cv_func__vsnprintf+set}\" = set"; then
24215   echo $ac_n "(cached) $ac_c" 1>&6
24216 else
24217   cat > conftest.$ac_ext <<EOF
24218 #line 24219 "configure"
24219 #include "confdefs.h"
24220 /* System header to define __stub macros and hopefully few prototypes,
24221     which can conflict with char _vsnprintf(); below.  */
24222 #include <assert.h>
24223 /* Override any gcc2 internal prototype to avoid an error.  */
24224 /* We use char because int might match the return type of a gcc2
24225     builtin and then its argument prototype would still apply.  */
24226 char _vsnprintf();
24227 char (*f)();
24228
24229 int main() {
24230
24231 /* The GNU C library defines this for functions which it implements
24232     to always fail with ENOSYS.  Some functions are actually named
24233     something starting with __ and the normal name is an alias.  */
24234 #if defined (__stub__vsnprintf) || defined (__stub____vsnprintf)
24235 choke me
24236 #else
24237 f = _vsnprintf;
24238 #endif
24239
24240 ; return 0; }
24241 EOF
24242 if { (eval echo configure:24243: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
24243   rm -rf conftest*
24244   eval "ac_cv_func__vsnprintf=yes"
24245 else
24246   echo "configure: failed program was:" >&5
24247   cat conftest.$ac_ext >&5
24248   rm -rf conftest*
24249   eval "ac_cv_func__vsnprintf=no"
24250 fi
24251 rm -f conftest*
24252 fi
24253
24254 if eval "test \"`echo '$ac_cv_func_'_vsnprintf`\" = yes"; then
24255   echo "$ac_t""yes" 1>&6
24256   ac_cv_func_vsnprintf=yes
24257         cat >> confdefs.h <<\EOF
24258 #define vsnprintf _vsnprintf
24259 EOF
24260
24261
24262 else
24263   echo "$ac_t""no" 1>&6
24264 fi
24265
24266
24267 echo $ac_n "checking for vprintf""... $ac_c" 1>&6
24268 echo "configure:24269: checking for vprintf" >&5
24269 if eval "test \"\${ac_cv_func_vprintf+set}\" = set"; then
24270   echo $ac_n "(cached) $ac_c" 1>&6
24271 else
24272   cat > conftest.$ac_ext <<EOF
24273 #line 24274 "configure"
24274 #include "confdefs.h"
24275 /* System header to define __stub macros and hopefully few prototypes,
24276     which can conflict with char vprintf(); below.  */
24277 #include <assert.h>
24278 /* Override any gcc2 internal prototype to avoid an error.  */
24279 /* We use char because int might match the return type of a gcc2
24280     builtin and then its argument prototype would still apply.  */
24281 char vprintf();
24282 char (*f)();
24283
24284 int main() {
24285
24286 /* The GNU C library defines this for functions which it implements
24287     to always fail with ENOSYS.  Some functions are actually named
24288     something starting with __ and the normal name is an alias.  */
24289 #if defined (__stub_vprintf) || defined (__stub___vprintf)
24290 choke me
24291 #else
24292 f = vprintf;
24293 #endif
24294
24295 ; return 0; }
24296 EOF
24297 if { (eval echo configure:24298: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
24298   rm -rf conftest*
24299   eval "ac_cv_func_vprintf=yes"
24300 else
24301   echo "configure: failed program was:" >&5
24302   cat conftest.$ac_ext >&5
24303   rm -rf conftest*
24304   eval "ac_cv_func_vprintf=no"
24305 fi
24306 rm -f conftest*
24307 fi
24308
24309 if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
24310   echo "$ac_t""yes" 1>&6
24311   cat >> confdefs.h <<\EOF
24312 #define HAVE_VPRINTF 1
24313 EOF
24314
24315 else
24316   echo "$ac_t""no" 1>&6
24317 fi
24318
24319 if test "$ac_cv_func_vprintf" != yes; then
24320 echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
24321 echo "configure:24322: checking for _doprnt" >&5
24322 if eval "test \"\${ac_cv_func__doprnt+set}\" = set"; then
24323   echo $ac_n "(cached) $ac_c" 1>&6
24324 else
24325   cat > conftest.$ac_ext <<EOF
24326 #line 24327 "configure"
24327 #include "confdefs.h"
24328 /* System header to define __stub macros and hopefully few prototypes,
24329     which can conflict with char _doprnt(); below.  */
24330 #include <assert.h>
24331 /* Override any gcc2 internal prototype to avoid an error.  */
24332 /* We use char because int might match the return type of a gcc2
24333     builtin and then its argument prototype would still apply.  */
24334 char _doprnt();
24335 char (*f)();
24336
24337 int main() {
24338
24339 /* The GNU C library defines this for functions which it implements
24340     to always fail with ENOSYS.  Some functions are actually named
24341     something starting with __ and the normal name is an alias.  */
24342 #if defined (__stub__doprnt) || defined (__stub____doprnt)
24343 choke me
24344 #else
24345 f = _doprnt;
24346 #endif
24347
24348 ; return 0; }
24349 EOF
24350 if { (eval echo configure:24351: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
24351   rm -rf conftest*
24352   eval "ac_cv_func__doprnt=yes"
24353 else
24354   echo "configure: failed program was:" >&5
24355   cat conftest.$ac_ext >&5
24356   rm -rf conftest*
24357   eval "ac_cv_func__doprnt=no"
24358 fi
24359 rm -f conftest*
24360 fi
24361
24362 if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
24363   echo "$ac_t""yes" 1>&6
24364   cat >> confdefs.h <<\EOF
24365 #define HAVE_DOPRNT 1
24366 EOF
24367
24368 else
24369   echo "$ac_t""no" 1>&6
24370 fi
24371
24372 fi
24373
24374
24375 if test $ac_cv_func_vprintf = yes ; then
24376                 for ac_func in snprintf vsnprintf
24377 do
24378 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
24379 echo "configure:24380: checking for $ac_func" >&5
24380 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
24381   echo $ac_n "(cached) $ac_c" 1>&6
24382 else
24383   cat > conftest.$ac_ext <<EOF
24384 #line 24385 "configure"
24385 #include "confdefs.h"
24386 /* System header to define __stub macros and hopefully few prototypes,
24387     which can conflict with char $ac_func(); below.  */
24388 #include <assert.h>
24389 /* Override any gcc2 internal prototype to avoid an error.  */
24390 /* We use char because int might match the return type of a gcc2
24391     builtin and then its argument prototype would still apply.  */
24392 char $ac_func();
24393 char (*f)();
24394
24395 int main() {
24396
24397 /* The GNU C library defines this for functions which it implements
24398     to always fail with ENOSYS.  Some functions are actually named
24399     something starting with __ and the normal name is an alias.  */
24400 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
24401 choke me
24402 #else
24403 f = $ac_func;
24404 #endif
24405
24406 ; return 0; }
24407 EOF
24408 if { (eval echo configure:24409: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
24409   rm -rf conftest*
24410   eval "ac_cv_func_$ac_func=yes"
24411 else
24412   echo "configure: failed program was:" >&5
24413   cat conftest.$ac_ext >&5
24414   rm -rf conftest*
24415   eval "ac_cv_func_$ac_func=no"
24416 fi
24417 rm -f conftest*
24418 fi
24419
24420 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
24421   echo "$ac_t""yes" 1>&6
24422     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
24423   cat >> confdefs.h <<EOF
24424 #define $ac_tr_func 1
24425 EOF
24426  
24427 else
24428   echo "$ac_t""no" 1>&6
24429 fi
24430 done
24431
24432 fi
24433
24434 for ac_func in \
24435         bcopy                   \
24436         closesocket             \
24437         chroot                  \
24438         endgrent                \
24439         endpwent                \
24440         fcntl                   \
24441         flock                   \
24442         fstat                   \
24443         getdtablesize   \
24444         getgrgid                \
24445         gethostname             \
24446         getpass                 \
24447         getpassphrase   \
24448         getpwuid                \
24449         getpwnam                \
24450         getspnam                \
24451         gettimeofday    \
24452         initgroups              \
24453         lockf                   \
24454         memcpy                  \
24455         memmove                 \
24456         mkstemp                 \
24457         mktemp                  \
24458         pipe                    \
24459         read                    \
24460         recv                    \
24461         recvfrom                \
24462         setpwfile               \
24463         setgid                  \
24464         setegid                 \
24465         setsid                  \
24466         setuid                  \
24467         seteuid                 \
24468         sigaction               \
24469         signal                  \
24470         sigset                  \
24471         strdup                  \
24472         strpbrk                 \
24473         strrchr                 \
24474         strsep                  \
24475         strstr                  \
24476         strtol                  \
24477         strtoul                 \
24478         strtoq                  \
24479         strtouq                 \
24480         strtoll                 \
24481         strspn                  \
24482         sysconf                 \
24483         usleep                  \
24484         waitpid                 \
24485         wait4                   \
24486         write                   \
24487         send                    \
24488         sendmsg                 \
24489         sendto                  \
24490
24491 do
24492 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
24493 echo "configure:24494: checking for $ac_func" >&5
24494 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
24495   echo $ac_n "(cached) $ac_c" 1>&6
24496 else
24497   cat > conftest.$ac_ext <<EOF
24498 #line 24499 "configure"
24499 #include "confdefs.h"
24500 /* System header to define __stub macros and hopefully few prototypes,
24501     which can conflict with char $ac_func(); below.  */
24502 #include <assert.h>
24503 /* Override any gcc2 internal prototype to avoid an error.  */
24504 /* We use char because int might match the return type of a gcc2
24505     builtin and then its argument prototype would still apply.  */
24506 char $ac_func();
24507 char (*f)();
24508
24509 int main() {
24510
24511 /* The GNU C library defines this for functions which it implements
24512     to always fail with ENOSYS.  Some functions are actually named
24513     something starting with __ and the normal name is an alias.  */
24514 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
24515 choke me
24516 #else
24517 f = $ac_func;
24518 #endif
24519
24520 ; return 0; }
24521 EOF
24522 if { (eval echo configure:24523: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
24523   rm -rf conftest*
24524   eval "ac_cv_func_$ac_func=yes"
24525 else
24526   echo "configure: failed program was:" >&5
24527   cat conftest.$ac_ext >&5
24528   rm -rf conftest*
24529   eval "ac_cv_func_$ac_func=no"
24530 fi
24531 rm -f conftest*
24532 fi
24533
24534 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
24535   echo "$ac_t""yes" 1>&6
24536     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
24537   cat >> confdefs.h <<EOF
24538 #define $ac_tr_func 1
24539 EOF
24540  
24541 else
24542   echo "$ac_t""no" 1>&6
24543 fi
24544 done
24545
24546
24547 for ac_func in getopt getpeereid
24548 do
24549 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
24550 echo "configure:24551: checking for $ac_func" >&5
24551 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
24552   echo $ac_n "(cached) $ac_c" 1>&6
24553 else
24554   cat > conftest.$ac_ext <<EOF
24555 #line 24556 "configure"
24556 #include "confdefs.h"
24557 /* System header to define __stub macros and hopefully few prototypes,
24558     which can conflict with char $ac_func(); below.  */
24559 #include <assert.h>
24560 /* Override any gcc2 internal prototype to avoid an error.  */
24561 /* We use char because int might match the return type of a gcc2
24562     builtin and then its argument prototype would still apply.  */
24563 char $ac_func();
24564 char (*f)();
24565
24566 int main() {
24567
24568 /* The GNU C library defines this for functions which it implements
24569     to always fail with ENOSYS.  Some functions are actually named
24570     something starting with __ and the normal name is an alias.  */
24571 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
24572 choke me
24573 #else
24574 f = $ac_func;
24575 #endif
24576
24577 ; return 0; }
24578 EOF
24579 if { (eval echo configure:24580: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
24580   rm -rf conftest*
24581   eval "ac_cv_func_$ac_func=yes"
24582 else
24583   echo "configure: failed program was:" >&5
24584   cat conftest.$ac_ext >&5
24585   rm -rf conftest*
24586   eval "ac_cv_func_$ac_func=no"
24587 fi
24588 rm -f conftest*
24589 fi
24590
24591 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
24592   echo "$ac_t""yes" 1>&6
24593     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
24594   cat >> confdefs.h <<EOF
24595 #define $ac_tr_func 1
24596 EOF
24597  
24598 else
24599   echo "$ac_t""no" 1>&6
24600 LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
24601 fi
24602 done
24603
24604
24605
24606 if test "$ac_cv_func_getopt" != yes; then
24607         LIBSRCS="$LIBSRCS getopt.c"
24608 fi
24609 if test "$ac_cv_func_getpeereid" != yes; then
24610         echo $ac_n "checking for msg_accrights in msghdr""... $ac_c" 1>&6
24611 echo "configure:24612: checking for msg_accrights in msghdr" >&5
24612 if eval "test \"\${ol_cv_msghdr_msg_accrights+set}\" = set"; then
24613   echo $ac_n "(cached) $ac_c" 1>&6
24614 else
24615   cat > conftest.$ac_ext <<EOF
24616 #line 24617 "configure"
24617 #include "confdefs.h"
24618 #include <sys/socket.h>
24619 int main() {
24620 struct msghdr m; m.msg_accrightslen=0
24621 ; return 0; }
24622 EOF
24623 if { (eval echo configure:24624: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
24624   rm -rf conftest*
24625   ol_cv_msghdr_msg_accrights=yes
24626 else
24627   echo "configure: failed program was:" >&5
24628   cat conftest.$ac_ext >&5
24629   rm -rf conftest*
24630   ol_cv_msghdr_msg_accrights=no
24631 fi
24632 rm -f conftest*
24633         
24634 fi
24635
24636 echo "$ac_t""$ol_cv_msghdr_msg_accrights" 1>&6
24637   if test $ol_cv_msghdr_msg_accrights = "yes" ; then
24638         cat >> confdefs.h <<\EOF
24639 #define HAVE_MSGHDR_MSG_ACCRIGHTS 1
24640 EOF
24641
24642   fi
24643
24644         LIBSRCS="$LIBSRCS getpeereid.c"
24645 fi
24646 if test "$ac_cv_func_snprintf" != yes -o "$ac_cv_func_vsnprintf" != yes; then
24647         if test "$ac_cv_func_snprintf" != yes; then
24648                 cat >> confdefs.h <<\EOF
24649 #define snprintf ber_pvt_snprintf
24650 EOF
24651
24652         fi
24653         if test "$ac_cv_func_vsnprintf" != yes; then
24654                 cat >> confdefs.h <<\EOF
24655 #define vsnprintf ber_pvt_vsnprintf
24656 EOF
24657
24658         fi
24659 fi
24660
24661
24662 if test "$ol_enable_slapi" != no ; then
24663                         for ac_hdr in ltdl.h
24664 do
24665 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
24666 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
24667 echo "configure:24668: checking for $ac_hdr" >&5
24668 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
24669   echo $ac_n "(cached) $ac_c" 1>&6
24670 else
24671   cat > conftest.$ac_ext <<EOF
24672 #line 24673 "configure"
24673 #include "confdefs.h"
24674 #include <$ac_hdr>
24675 EOF
24676 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
24677 { (eval echo configure:24678: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
24678 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
24679 if test -z "$ac_err"; then
24680   rm -rf conftest*
24681   eval "ac_cv_header_$ac_safe=yes"
24682 else
24683   echo "$ac_err" >&5
24684   echo "configure: failed program was:" >&5
24685   cat conftest.$ac_ext >&5
24686   rm -rf conftest*
24687   eval "ac_cv_header_$ac_safe=no"
24688 fi
24689 rm -f conftest*
24690 fi
24691 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
24692   echo "$ac_t""yes" 1>&6
24693     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
24694   cat >> confdefs.h <<EOF
24695 #define $ac_tr_hdr 1
24696 EOF
24697  
24698 else
24699   echo "$ac_t""no" 1>&6
24700 fi
24701 done
24702
24703
24704         if test $ac_cv_header_ltdl_h != yes ; then
24705                 { echo "configure: error: could not locate <ltdl.h>" 1>&2; exit 1; }
24706         fi
24707         echo $ac_n "checking for lt_dlinit in -lltdl""... $ac_c" 1>&6
24708 echo "configure:24709: checking for lt_dlinit in -lltdl" >&5
24709 ac_lib_var=`echo ltdl'_'lt_dlinit | sed 'y%./+-:%__p__%'`
24710 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
24711   echo $ac_n "(cached) $ac_c" 1>&6
24712 else
24713   ac_save_LIBS="$LIBS"
24714 LIBS="-lltdl  $LIBS"
24715 cat > conftest.$ac_ext <<EOF
24716 #line 24717 "configure"
24717 #include "confdefs.h"
24718 /* Override any gcc2 internal prototype to avoid an error.  */
24719 /* We use char because int might match the return type of a gcc2
24720     builtin and then its argument prototype would still apply.  */
24721 char lt_dlinit();
24722
24723 int main() {
24724 lt_dlinit()
24725 ; return 0; }
24726 EOF
24727 if { (eval echo configure:24728: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
24728   rm -rf conftest*
24729   eval "ac_cv_lib_$ac_lib_var=yes"
24730 else
24731   echo "configure: failed program was:" >&5
24732   cat conftest.$ac_ext >&5
24733   rm -rf conftest*
24734   eval "ac_cv_lib_$ac_lib_var=no"
24735 fi
24736 rm -f conftest*
24737 LIBS="$ac_save_LIBS"
24738
24739 fi
24740 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
24741   echo "$ac_t""yes" 1>&6
24742   
24743                 SLAPI_LIBS=-lltdl
24744                 LIBSLAPI=libslapi.a
24745                 LIBSLAPITOOLS=../libslapi.a
24746                 cat >> confdefs.h <<\EOF
24747 #define HAVE_LIBLTDL 1
24748 EOF
24749
24750         
24751 else
24752   echo "$ac_t""no" 1>&6
24753 { echo "configure: error: could not locate libtool -lltdl" 1>&2; exit 1; }
24754 fi
24755
24756
24757         cat >> confdefs.h <<\EOF
24758 #define LDAP_SLAPI 1
24759 EOF
24760
24761 fi
24762
24763 if test "$ol_enable_debug" != no ; then
24764         cat >> confdefs.h <<\EOF
24765 #define LDAP_DEBUG 1
24766 EOF
24767
24768 fi
24769 if test "$ol_enable_syslog" = yes ; then
24770         cat >> confdefs.h <<\EOF
24771 #define LDAP_SYSLOG 1
24772 EOF
24773
24774 fi
24775 if test "$ol_link_kbind" != no ; then
24776         cat >> confdefs.h <<\EOF
24777 #define LDAP_API_FEATURE_X_OPENLDAP_V2_KBIND LDAP_VENDOR_VERSION
24778 EOF
24779
24780 fi
24781 if test "$ol_enable_proctitle" != no ; then
24782         cat >> confdefs.h <<\EOF
24783 #define LDAP_PROCTITLE 1
24784 EOF
24785
24786 fi
24787 if test "$ol_enable_referrals" != no ; then
24788         cat >> confdefs.h <<\EOF
24789 #define LDAP_API_FEATURE_X_OPENLDAP_V2_REFERRALS LDAP_VENDOR_VERSION
24790 EOF
24791
24792 fi
24793 if test "$ol_enable_local" != no; then
24794         cat >> confdefs.h <<\EOF
24795 #define LDAP_PF_LOCAL 1
24796 EOF
24797
24798 fi
24799 if test "$ol_link_ipv6" != no; then
24800         cat >> confdefs.h <<\EOF
24801 #define LDAP_PF_INET6 1
24802 EOF
24803
24804 fi
24805 if test "$ol_enable_cleartext" != no ; then
24806         cat >> confdefs.h <<\EOF
24807 #define SLAPD_CLEARTEXT 1
24808 EOF
24809
24810 fi
24811 if test "$ol_enable_crypt" != no ; then
24812         cat >> confdefs.h <<\EOF
24813 #define SLAPD_CRYPT 1
24814 EOF
24815
24816 fi
24817 if test "$ol_link_spasswd" != no ; then
24818         cat >> confdefs.h <<\EOF
24819 #define SLAPD_SPASSWD 1
24820 EOF
24821
24822 fi
24823 if test "$ol_enable_multimaster" != no ; then
24824         cat >> confdefs.h <<\EOF
24825 #define SLAPD_MULTIMASTER 1
24826 EOF
24827
24828 fi
24829 if test "$ol_enable_rlookups" != no ; then
24830         cat >> confdefs.h <<\EOF
24831 #define SLAPD_RLOOKUPS 1
24832 EOF
24833
24834 fi
24835 if test "$ol_enable_aci" != no ; then
24836         cat >> confdefs.h <<\EOF
24837 #define SLAPD_ACI_ENABLED 1
24838 EOF
24839
24840 fi
24841
24842 if test "$ol_link_modules" != no ; then
24843         cat >> confdefs.h <<\EOF
24844 #define SLAPD_MODULES 1
24845 EOF
24846
24847         BUILD_SLAPD=yes
24848         SLAPD_MODULES_LDFLAGS="-dlopen self"
24849 fi
24850
24851 cat >> confdefs.h <<\EOF
24852 #define SLAPD_MOD_STATIC 1
24853 EOF
24854
24855 cat >> confdefs.h <<\EOF
24856 #define SLAPD_MOD_DYNAMIC 2
24857 EOF
24858
24859
24860 if test "$ol_enable_bdb" != no ; then
24861         BUILD_SLAPD=yes
24862         BUILD_BDB=$ol_enable_bdb
24863         if test "$ol_enable_bdb" = mod ; then
24864                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-bdb"
24865                 MFLAG=SLAPD_MOD_DYNAMIC
24866         else
24867                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-bdb"
24868                 MFLAG=SLAPD_MOD_STATIC
24869         fi
24870         cat >> confdefs.h <<EOF
24871 #define SLAPD_BDB $MFLAG
24872 EOF
24873
24874 fi
24875
24876 if test "$ol_enable_dnssrv" != no ; then
24877         BUILD_SLAPD=yes
24878         BUILD_DNSSRV=$ol_enable_dnssrv
24879         if test "$ol_enable_dnssrv" = mod ; then
24880                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-dnssrv"
24881                 MFLAG=SLAPD_MOD_DYNAMIC
24882         else
24883                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-dnssrv"
24884                 MFLAG=SLAPD_MOD_STATIC
24885         fi
24886         cat >> confdefs.h <<EOF
24887 #define SLAPD_DNSSRV $MFLAG
24888 EOF
24889
24890 fi
24891
24892 if test "$ol_enable_hdb" != no ; then
24893         BUILD_SLAPD=yes
24894         BUILD_HDB=$ol_enable_hdb
24895         if test "$ol_enable_hdb" = mod ; then
24896                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-hdb"
24897                 MFLAG=SLAPD_MOD_DYNAMIC
24898         else
24899                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-hdb"
24900                 MFLAG=SLAPD_MOD_STATIC
24901         fi
24902         cat >> confdefs.h <<EOF
24903 #define SLAPD_HDB $MFLAG
24904 EOF
24905
24906 fi
24907
24908 if test "$ol_enable_ldap" != no ; then
24909         BUILD_SLAPD=yes
24910         BUILD_LDAP=$ol_enable_ldap
24911         if test "$ol_enable_ldap" = mod ; then
24912                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-ldap"
24913                 MFLAG=SLAPD_MOD_DYNAMIC
24914         else
24915                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-ldap"
24916                 MFLAG=SLAPD_MOD_STATIC
24917         fi
24918         cat >> confdefs.h <<EOF
24919 #define SLAPD_LDAP $MFLAG
24920 EOF
24921
24922 fi
24923
24924 if test "$ol_link_ldbm" != no -a $ol_enable_ldbm != no; then
24925         BUILD_SLAPD=yes
24926         BUILD_LDBM=$ol_enable_ldbm
24927         if test "$ol_enable_ldbm" = mod ; then
24928                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-ldbm"
24929                 MFLAG=SLAPD_MOD_DYNAMIC
24930         else
24931                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-ldbm"
24932                 MFLAG=SLAPD_MOD_STATIC
24933         fi
24934         cat >> confdefs.h <<EOF
24935 #define SLAPD_LDBM $MFLAG
24936 EOF
24937
24938 fi
24939
24940 if test "$ol_enable_meta" != no ; then
24941         BUILD_SLAPD=yes
24942         BUILD_META=$ol_enable_meta
24943         BUILD_REWRITE=yes
24944         if test "$ol_enable_meta" = mod ; then
24945                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-meta"
24946                 MFLAG=SLAPD_MOD_DYNAMIC
24947         else
24948                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-meta"
24949                 MFLAG=SLAPD_MOD_STATIC
24950         fi
24951         cat >> confdefs.h <<EOF
24952 #define SLAPD_META $MFLAG
24953 EOF
24954
24955 fi
24956
24957 if test "$ol_enable_monitor" != no ; then
24958         BUILD_SLAPD=yes
24959         BUILD_MONITOR=$ol_enable_monitor
24960         if test "$ol_enable_monitor" = mod ; then
24961                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-monitor"
24962                 MFLAG=SLAPD_MOD_DYNAMIC
24963         else
24964                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-monitor"
24965                 MFLAG=SLAPD_MOD_STATIC
24966         fi
24967         cat >> confdefs.h <<EOF
24968 #define SLAPD_MONITOR $MFLAG
24969 EOF
24970
24971 fi
24972
24973 if test "$ol_enable_null" != no ; then
24974         BUILD_SLAPD=yes
24975         BUILD_NULL=$ol_enable_null
24976         if test "$ol_enable_null" = mod ; then
24977                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-null"
24978                 MFLAG=SLAPD_MOD_DYNAMIC
24979         else
24980                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-null"
24981                 MFLAG=SLAPD_MOD_STATIC
24982         fi
24983         cat >> confdefs.h <<EOF
24984 #define SLAPD_NULL $MFLAG
24985 EOF
24986
24987 fi
24988
24989 if test "$ol_enable_passwd" != no ; then
24990         BUILD_SLAPD=yes
24991         BUILD_PASSWD=$ol_enable_passwd
24992         if test "$ol_enable_passwd" = mod ; then
24993                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-passwd"
24994                 MFLAG=SLAPD_MOD_DYNAMIC
24995         else
24996                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-passwd"
24997                 MFLAG=SLAPD_MOD_STATIC
24998         fi
24999         cat >> confdefs.h <<EOF
25000 #define SLAPD_PASSWD $MFLAG
25001 EOF
25002
25003 fi
25004
25005 if test "$ol_link_perl" != no ; then
25006         BUILD_SLAPD=yes
25007         BUILD_PERL=$ol_enable_perl
25008         if test "$ol_enable_perl" = mod ; then
25009                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-perl"
25010                 MFLAG=SLAPD_MOD_DYNAMIC
25011         else
25012                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-perl"
25013                 MFLAG=SLAPD_MOD_STATIC
25014         fi
25015         cat >> confdefs.h <<EOF
25016 #define SLAPD_PERL $MFLAG
25017 EOF
25018
25019 fi
25020
25021 if test "$ol_enable_relay" != no ; then
25022         BUILD_SLAPD=yes
25023         BUILD_RELAY=$ol_enable_relay
25024         if test "$ol_enable_relay" = mod ; then
25025                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-relay"
25026                 MFLAG=SLAPD_MOD_DYNAMIC
25027         else
25028                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-relay"
25029                 MFLAG=SLAPD_MOD_STATIC
25030         fi
25031         cat >> confdefs.h <<EOF
25032 #define SLAPD_RELAY $MFLAG
25033 EOF
25034
25035 fi
25036
25037 if test "$ol_enable_shell" != no ; then
25038         if test "$ol_link_thread" != no ; then
25039                 echo "configure: warning: Use of --without-threads is recommended with back-shell" 1>&2
25040         fi
25041         BUILD_SLAPD=yes
25042         BUILD_SHELL=$ol_enable_shell
25043         if test "$ol_enable_shell" = mod ; then
25044                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-shell"
25045                 MFLAG=SLAPD_MOD_DYNAMIC
25046         else
25047                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-shell"
25048                 MFLAG=SLAPD_MOD_STATIC
25049         fi
25050         cat >> confdefs.h <<EOF
25051 #define SLAPD_SHELL $MFLAG
25052 EOF
25053
25054 fi
25055
25056 if test "$ol_link_sql" != no ; then
25057         BUILD_SLAPD=yes
25058         BUILD_SQL=$ol_enable_sql
25059         if test "$ol_enable_sql" = mod; then
25060                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-sql"
25061                 MFLAG=SLAPD_MOD_DYNAMIC
25062         else
25063                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-sql"
25064                 MFLAG=SLAPD_MOD_STATIC
25065         fi
25066         cat >> confdefs.h <<EOF
25067 #define SLAPD_SQL $MFLAG
25068 EOF
25069
25070 fi
25071
25072 if test "$ol_enable_chain" != no ; then
25073         BUILD_CHAIN=$ol_enable_chain
25074         if test "$ol_enable_chain" = mod ; then
25075                 MFLAG=SLAPD_MOD_DYNAMIC
25076                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS chain.la"
25077         else
25078                 MFLAG=SLAPD_MOD_STATIC
25079         fi
25080         cat >> confdefs.h <<EOF
25081 #define SLAPD_OVER_CHAIN $MFLAG
25082 EOF
25083
25084 fi
25085
25086 if test "$ol_enable_denyop" != no ; then
25087         BUILD_DENYOP=$ol_enable_denyop
25088         if test "$ol_enable_denyop" = mod ; then
25089                 MFLAG=SLAPD_MOD_DYNAMIC
25090                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS denyop.la"
25091         else
25092                 MFLAG=SLAPD_MOD_STATIC
25093         fi
25094         cat >> confdefs.h <<EOF
25095 #define SLAPD_OVER_DENYOP $MFLAG
25096 EOF
25097
25098 fi
25099
25100 if test "$ol_enable_dyngroup" != no ; then
25101         BUILD_DYNGROUP=$ol_enable_dyngroup
25102         if test "$ol_enable_dyngroup" = mod ; then
25103                 MFLAG=SLAPD_MOD_DYNAMIC
25104                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS dyngroup.la"
25105         else
25106                 MFLAG=SLAPD_MOD_STATIC
25107         fi
25108         cat >> confdefs.h <<EOF
25109 #define SLAPD_OVER_DYNGROUP $MFLAG
25110 EOF
25111
25112 fi
25113
25114 if test "$ol_enable_lastmod" != no ; then
25115         BUILD_LASTMOD=$ol_enable_lastmod
25116         if test "$ol_enable_lastmod" = mod ; then
25117                 MFLAG=SLAPD_MOD_DYNAMIC
25118                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS lastmod.la"
25119         else
25120                 MFLAG=SLAPD_MOD_STATIC
25121         fi
25122         cat >> confdefs.h <<EOF
25123 #define SLAPD_OVER_LASTMOD $MFLAG
25124 EOF
25125
25126 fi
25127
25128 if test "$ol_enable_ppolicy" != no ; then
25129         BUILD_PPOLICY=$ol_enable_ppolicy
25130         if test "$ol_enable_ppolicy" = mod ; then
25131                 MFLAG=SLAPD_MOD_DYNAMIC
25132                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS ppolicy.la"
25133         else
25134                 MFLAG=SLAPD_MOD_STATIC
25135         fi
25136         cat >> confdefs.h <<EOF
25137 #define SLAPD_OVER_PPOLICY $MFLAG
25138 EOF
25139
25140 fi
25141
25142 if test "$ol_enable_proxycache" != no ; then
25143         BUILD_PROXYCACHE=$ol_enable_proxycache
25144         if test "$ol_enable_proxycache" = mod ; then
25145                 MFLAG=SLAPD_MOD_DYNAMIC
25146                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS pcache.la"
25147         else
25148                 MFLAG=SLAPD_MOD_STATIC
25149         fi
25150         cat >> confdefs.h <<EOF
25151 #define SLAPD_OVER_PROXYCACHE $MFLAG
25152 EOF
25153
25154 fi
25155
25156 if test "$ol_enable_refint" != no ; then
25157         BUILD_REFINT=$ol_enable_refint
25158         if test "$ol_enable_refint" = mod ; then
25159                 MFLAG=SLAPD_MOD_DYNAMIC
25160                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS refint.la"
25161         else
25162                 MFLAG=SLAPD_MOD_STATIC
25163         fi
25164         cat >> confdefs.h <<EOF
25165 #define SLAPD_OVER_REFINT $MFLAG
25166 EOF
25167
25168 fi
25169
25170 if test "$ol_enable_rwm" != no ; then
25171         BUILD_REWRITE=yes
25172         BUILD_RWM=$ol_enable_rwm
25173         if test "$ol_enable_rwm" = mod ; then
25174                 MFLAG=SLAPD_MOD_DYNAMIC
25175                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS rwm.la"
25176         else
25177                 MFLAG=SLAPD_MOD_STATIC
25178         fi
25179         cat >> confdefs.h <<EOF
25180 #define SLAPD_OVER_RWM $MFLAG
25181 EOF
25182
25183 fi
25184
25185 if test "$ol_enable_syncprov" != no ; then
25186         BUILD_SYNCPROV=$ol_enable_syncprov
25187         if test "$ol_enable_syncprov" = mod ; then
25188                 MFLAG=SLAPD_MOD_DYNAMIC
25189                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS syncprov.la"
25190         else
25191                 MFLAG=SLAPD_MOD_STATIC
25192         fi
25193         cat >> confdefs.h <<EOF
25194 #define SLAPD_OVER_SYNCPROV $MFLAG
25195 EOF
25196
25197 fi
25198
25199 if test "$ol_enable_unique" != no ; then
25200         BUILD_UNIQUE=$ol_enable_unique
25201         if test "$ol_enable_unique" = mod ; then
25202                 MFLAG=SLAPD_MOD_DYNAMIC
25203                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS unique.la"
25204         else
25205                 MFLAG=SLAPD_MOD_STATIC
25206         fi
25207         cat >> confdefs.h <<EOF
25208 #define SLAPD_OVER_UNIQUE $MFLAG
25209 EOF
25210
25211 fi
25212
25213 if test "$ol_enable_slurpd" != no -a "$ol_link_threads" != no -a \
25214         $BUILD_SLAPD = yes ; then
25215         BUILD_SLURPD=yes
25216 fi
25217
25218 if test "$ol_enable_rewrite" != no ; then
25219         cat >> confdefs.h <<\EOF
25220 #define ENABLE_REWRITE 1
25221 EOF
25222
25223         BUILD_REWRITE=yes
25224 fi
25225
25226 if test "$ol_enable_slapi" != no ; then
25227         cat >> confdefs.h <<\EOF
25228 #define ENABLE_SLAPI 1
25229 EOF
25230
25231         BUILD_SLAPI=yes
25232         SLAPD_SLAPI_DEPEND=libslapi.a
25233 fi
25234
25235
25236
25237 if test "$ac_cv_mingw32" = yes ; then
25238         PLAT=NT
25239         SLAPD_MODULES_LDFLAGS=
25240 else
25241         PLAT=UNIX
25242 fi
25243
25244 if test -z "$SLAPD_STATIC_BACKENDS"; then
25245         SLAPD_NO_STATIC='#'
25246 else
25247         SLAPD_NO_STATIC=
25248 fi
25249
25250 BACKEND_HEADER=servers/slapd/backend.h
25251 cat > $BACKEND_HEADER << EOF
25252 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
25253  *
25254  * Copyright 1998-2004 The OpenLDAP Foundation.
25255  * All rights reserved.
25256  *
25257  * Redistribution and use in source and binary forms, with or without
25258  * modification, are permitted only as authorized by the OpenLDAP
25259  * Public License.
25260  *
25261  * A copy of this license is available in the file LICENSE in the
25262  * top-level directory of the distribution or, alternatively, at
25263  * <http://www.OpenLDAP.org/license.html>.
25264  */
25265 /* This file is automatically generated by configure; please do not edit.
25266  */
25267
25268 EOF
25269
25270 for b in $SLAPD_STATIC_BACKENDS; do
25271         bb=`echo "$b" | sed -e 's;back-;;'`
25272         
25273         cat >> $BACKEND_HEADER << EOF
25274 extern BI_init ${bb}_back_initialize;
25275 EOF
25276 done
25277
25278 cat >> $BACKEND_HEADER << EOF
25279
25280 static BackendInfo binfo[] = {
25281 EOF
25282
25283 for b in $SLAPD_STATIC_BACKENDS; do
25284         bb=`echo "$b" | sed -e 's;back-;;'`
25285         
25286         cat >> $BACKEND_HEADER << EOF
25287         { "$bb", ${bb}_back_initialize },
25288 EOF
25289 done
25290
25291 cat >> $BACKEND_HEADER << EOF
25292         { NULL, NULL }
25293 };
25294
25295 /* end of generated file */
25296 EOF
25297
25298
25299
25300
25301
25302
25303
25304
25305
25306   
25307   
25308   
25309   
25310   
25311   
25312   
25313   
25314   
25315   
25316   
25317   
25318   
25319   
25320   
25321   
25322   
25323   
25324   
25325   
25326   
25327   
25328   
25329   
25330   
25331
25332
25333
25334
25335
25336
25337
25338
25339
25340
25341
25342
25343
25344
25345
25346
25347
25348
25349
25350
25351
25352
25353
25354
25355
25356
25357
25358
25359
25360
25361
25362
25363
25364
25365
25366
25367
25368
25369
25370 # Check whether --with-xxinstall or --without-xxinstall was given.
25371 if test "${with_xxinstall+set}" = set; then
25372   withval="$with_xxinstall"
25373   :
25374 fi
25375
25376
25377
25378 trap '' 1 2 15
25379
25380 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
25381
25382 test "x$prefix" = xNONE && prefix=$ac_default_prefix
25383 # Let make expand exec_prefix.
25384 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
25385
25386 # Any assignment to VPATH causes Sun make to only execute
25387 # the first set of double-colon rules, so remove it if not needed.
25388 # If there is a colon in the path, we need to keep it.
25389 if test "x$srcdir" = x.; then
25390   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
25391 fi
25392
25393 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
25394
25395 DEFS=-DHAVE_CONFIG_H
25396
25397 # Without the "./", some shells look in PATH for config.status.
25398 : ${CONFIG_STATUS=./config.status}
25399
25400 echo creating $CONFIG_STATUS
25401 rm -f $CONFIG_STATUS
25402 cat > $CONFIG_STATUS <<EOF
25403 #! /bin/sh
25404 # Generated automatically by configure.
25405 # Run this file to recreate the current configuration.
25406 # This directory was configured as follows,
25407 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
25408 #
25409 # $0 $ac_configure_args
25410 #
25411 # Compiler output produced by configure, useful for debugging
25412 # configure, is in ./config.log if it exists.
25413
25414 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
25415 for ac_option
25416 do
25417   case "\$ac_option" in
25418   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
25419     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
25420     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
25421   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
25422     echo "$CONFIG_STATUS generated by autoconf version 2.13.1"
25423     exit 0 ;;
25424   -help | --help | --hel | --he | --h)
25425     echo "\$ac_cs_usage"; exit 0 ;;
25426   *) echo "\$ac_cs_usage"; exit 1 ;;
25427   esac
25428 done
25429
25430 ac_given_srcdir=$srcdir
25431 ac_given_INSTALL="$INSTALL"
25432
25433 trap 'rm -fr `echo "\
25434 Makefile:build/top.mk:Makefile.in:build/dir.mk \
25435 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
25436 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
25437 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
25438 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
25439 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
25440 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
25441 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
25442 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
25443 include/Makefile:build/top.mk:include/Makefile.in \
25444 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
25445 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
25446 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
25447 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
25448 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk  \
25449 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
25450 libraries/librewrite/Makefile:build/top.mk:libraries/librewrite/Makefile.in:build/lib.mk:build/lib-static.mk \
25451 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
25452 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
25453 servers/slapd/back-bdb/Makefile:build/top.mk:servers/slapd/back-bdb/Makefile.in:build/mod.mk \
25454 servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
25455 servers/slapd/back-hdb/Makefile:build/top.mk:servers/slapd/back-hdb/Makefile.in:build/mod.mk \
25456 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
25457 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
25458 servers/slapd/back-meta/Makefile:build/top.mk:servers/slapd/back-meta/Makefile.in:build/mod.mk \
25459 servers/slapd/back-monitor/Makefile:build/top.mk:servers/slapd/back-monitor/Makefile.in:build/mod.mk \
25460 servers/slapd/back-null/Makefile:build/top.mk:servers/slapd/back-null/Makefile.in:build/mod.mk \
25461 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
25462 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
25463 servers/slapd/back-relay/Makefile:build/top.mk:servers/slapd/back-relay/Makefile.in:build/mod.mk \
25464 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
25465 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
25466 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
25467 servers/slapd/slapi/Makefile:build/top.mk:servers/slapd/slapi/Makefile.in:build/lib.mk:build/lib-shared.mk  \
25468 servers/slapd/overlays/Makefile:build/top.mk:servers/slapd/overlays/Makefile.in:build/lib.mk \
25469 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
25470 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
25471 tests/run \
25472 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
25473  include/portable.h include/ldap_features.h include/lber_types.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
25474 EOF
25475 cat >> $CONFIG_STATUS <<EOF
25476
25477 # Protect against being on the right side of a sed subst in config.status.
25478 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
25479  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
25480 $ac_vpsub
25481 $extrasub
25482 s%@SHELL@%$SHELL%g
25483 s%@CFLAGS@%$CFLAGS%g
25484 s%@CPPFLAGS@%$CPPFLAGS%g
25485 s%@CXXFLAGS@%$CXXFLAGS%g
25486 s%@FFLAGS@%$FFLAGS%g
25487 s%@DEFS@%$DEFS%g
25488 s%@LDFLAGS@%$LDFLAGS%g
25489 s%@LIBS@%$LIBS%g
25490 s%@exec_prefix@%$exec_prefix%g
25491 s%@prefix@%$prefix%g
25492 s%@program_transform_name@%$program_transform_name%g
25493 s%@bindir@%$bindir%g
25494 s%@sbindir@%$sbindir%g
25495 s%@libexecdir@%$libexecdir%g
25496 s%@datadir@%$datadir%g
25497 s%@sysconfdir@%$sysconfdir%g
25498 s%@sharedstatedir@%$sharedstatedir%g
25499 s%@localstatedir@%$localstatedir%g
25500 s%@libdir@%$libdir%g
25501 s%@includedir@%$includedir%g
25502 s%@oldincludedir@%$oldincludedir%g
25503 s%@infodir@%$infodir%g
25504 s%@mandir@%$mandir%g
25505 s%@host@%$host%g
25506 s%@host_alias@%$host_alias%g
25507 s%@host_cpu@%$host_cpu%g
25508 s%@host_vendor@%$host_vendor%g
25509 s%@host_os@%$host_os%g
25510 s%@target@%$target%g
25511 s%@target_alias@%$target_alias%g
25512 s%@target_cpu@%$target_cpu%g
25513 s%@target_vendor@%$target_vendor%g
25514 s%@target_os@%$target_os%g
25515 s%@build@%$build%g
25516 s%@build_alias@%$build_alias%g
25517 s%@build_cpu@%$build_cpu%g
25518 s%@build_vendor@%$build_vendor%g
25519 s%@build_os@%$build_os%g
25520 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
25521 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
25522 s%@INSTALL_DATA@%$INSTALL_DATA%g
25523 s%@PACKAGE@%$PACKAGE%g
25524 s%@VERSION@%$VERSION%g
25525 s%@ACLOCAL@%$ACLOCAL%g
25526 s%@AUTOCONF@%$AUTOCONF%g
25527 s%@AUTOMAKE@%$AUTOMAKE%g
25528 s%@AUTOHEADER@%$AUTOHEADER%g
25529 s%@MAKEINFO@%$MAKEINFO%g
25530 s%@install_sh@%$install_sh%g
25531 s%@AMTAR@%$AMTAR%g
25532 s%@AWK@%$AWK%g
25533 s%@AMTARFLAGS@%$AMTARFLAGS%g
25534 s%@SET_MAKE@%$SET_MAKE%g
25535 s%@OPENLDAP_LIBRELEASE@%$OPENLDAP_LIBRELEASE%g
25536 s%@OPENLDAP_LIBVERSION@%$OPENLDAP_LIBVERSION%g
25537 s%@OPENLDAP_RELEASE_DATE@%$OPENLDAP_RELEASE_DATE%g
25538 s%@top_builddir@%$top_builddir%g
25539 s%@ldap_subdir@%$ldap_subdir%g
25540 s%@CC@%$CC%g
25541 s%@AR@%$AR%g
25542 s%@LN_S@%$LN_S%g
25543 s%@OBJEXT@%$OBJEXT%g
25544 s%@EXEEXT@%$EXEEXT%g
25545 s%@ECHO@%$ECHO%g
25546 s%@RANLIB@%$RANLIB%g
25547 s%@STRIP@%$STRIP%g
25548 s%@DLLTOOL@%$DLLTOOL%g
25549 s%@AS@%$AS%g
25550 s%@OBJDUMP@%$OBJDUMP%g
25551 s%@CPP@%$CPP%g
25552 s%@LIBTOOL@%$LIBTOOL%g
25553 s%@PERLBIN@%$PERLBIN%g
25554 s%@OL_MKDEP@%$OL_MKDEP%g
25555 s%@OL_MKDEP_FLAGS@%$OL_MKDEP_FLAGS%g
25556 s%@LTSTATIC@%$LTSTATIC%g
25557 s%@LIBOBJS@%$LIBOBJS%g
25558 s%@LIBSRCS@%$LIBSRCS%g
25559 s%@PLAT@%$PLAT%g
25560 s%@WITH_SASL@%$WITH_SASL%g
25561 s%@WITH_TLS@%$WITH_TLS%g
25562 s%@WITH_MODULES_ENABLED@%$WITH_MODULES_ENABLED%g
25563 s%@BUILD_LIBS_DYNAMIC@%$BUILD_LIBS_DYNAMIC%g
25564 s%@BUILD_SLAPD@%$BUILD_SLAPD%g
25565 s%@BUILD_SLAPI@%$BUILD_SLAPI%g
25566 s%@SLAPD_SLAPI_DEPEND@%$SLAPD_SLAPI_DEPEND%g
25567 s%@BUILD_BDB@%$BUILD_BDB%g
25568 s%@BUILD_DNSSRV@%$BUILD_DNSSRV%g
25569 s%@BUILD_HDB@%$BUILD_HDB%g
25570 s%@BUILD_LDAP@%$BUILD_LDAP%g
25571 s%@BUILD_LDBM@%$BUILD_LDBM%g
25572 s%@BUILD_META@%$BUILD_META%g
25573 s%@BUILD_MONITOR@%$BUILD_MONITOR%g
25574 s%@BUILD_NULL@%$BUILD_NULL%g
25575 s%@BUILD_PASSWD@%$BUILD_PASSWD%g
25576 s%@BUILD_RELAY@%$BUILD_RELAY%g
25577 s%@BUILD_PERL@%$BUILD_PERL%g
25578 s%@BUILD_SHELL@%$BUILD_SHELL%g
25579 s%@BUILD_SQL@%$BUILD_SQL%g
25580 s%@BUILD_CHAIN@%$BUILD_CHAIN%g
25581 s%@BUILD_DENYOP@%$BUILD_DENYOP%g
25582 s%@BUILD_DYNGROUP@%$BUILD_DYNGROUP%g
25583 s%@BUILD_LASTMOD@%$BUILD_LASTMOD%g
25584 s%@BUILD_PPOLICY@%$BUILD_PPOLICY%g
25585 s%@BUILD_PROXYCACHE@%$BUILD_PROXYCACHE%g
25586 s%@BUILD_REFINT@%$BUILD_REFINT%g
25587 s%@BUILD_RWM@%$BUILD_RWM%g
25588 s%@BUILD_SYNCPROV@%$BUILD_SYNCPROV%g
25589 s%@BUILD_UNIQUE@%$BUILD_UNIQUE%g
25590 s%@BUILD_SLURPD@%$BUILD_SLURPD%g
25591 s%@LDAP_LIBS@%$LDAP_LIBS%g
25592 s%@SLAPD_LIBS@%$SLAPD_LIBS%g
25593 s%@SLURPD_LIBS@%$SLURPD_LIBS%g
25594 s%@LDBM_LIBS@%$LDBM_LIBS%g
25595 s%@LTHREAD_LIBS@%$LTHREAD_LIBS%g
25596 s%@LUTIL_LIBS@%$LUTIL_LIBS%g
25597 s%@WRAP_LIBS@%$WRAP_LIBS%g
25598 s%@SLAPD_MODULES_CPPFLAGS@%$SLAPD_MODULES_CPPFLAGS%g
25599 s%@SLAPD_MODULES_LDFLAGS@%$SLAPD_MODULES_LDFLAGS%g
25600 s%@SLAPD_NO_STATIC@%$SLAPD_NO_STATIC%g
25601 s%@SLAPD_STATIC_BACKENDS@%$SLAPD_STATIC_BACKENDS%g
25602 s%@SLAPD_DYNAMIC_BACKENDS@%$SLAPD_DYNAMIC_BACKENDS%g
25603 s%@SLAPD_DYNAMIC_OVERLAYS@%$SLAPD_DYNAMIC_OVERLAYS%g
25604 s%@PERL_CPPFLAGS@%$PERL_CPPFLAGS%g
25605 s%@SLAPD_PERL_LDFLAGS@%$SLAPD_PERL_LDFLAGS%g
25606 s%@MOD_PERL_LDFLAGS@%$MOD_PERL_LDFLAGS%g
25607 s%@KRB4_LIBS@%$KRB4_LIBS%g
25608 s%@KRB5_LIBS@%$KRB5_LIBS%g
25609 s%@SASL_LIBS@%$SASL_LIBS%g
25610 s%@TLS_LIBS@%$TLS_LIBS%g
25611 s%@MODULES_LIBS@%$MODULES_LIBS%g
25612 s%@SLAPI_LIBS@%$SLAPI_LIBS%g
25613 s%@LIBSLAPI@%$LIBSLAPI%g
25614 s%@LIBSLAPITOOLS@%$LIBSLAPITOOLS%g
25615 s%@AUTH_LIBS@%$AUTH_LIBS%g
25616 s%@SLAPD_SLP_LIBS@%$SLAPD_SLP_LIBS%g
25617 s%@SLAPD_GMP_LIBS@%$SLAPD_GMP_LIBS%g
25618 s%@SLAPD_SQL_LDFLAGS@%$SLAPD_SQL_LDFLAGS%g
25619 s%@SLAPD_SQL_LIBS@%$SLAPD_SQL_LIBS%g
25620 s%@SLAPD_SQL_INCLUDES@%$SLAPD_SQL_INCLUDES%g
25621
25622 CEOF
25623 EOF
25624
25625 cat >> $CONFIG_STATUS <<\EOF
25626
25627 # Split the substitutions into bite-sized pieces for seds with
25628 # small command number limits, like on Digital OSF/1 and HP-UX.
25629 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
25630 ac_file=1 # Number of current file.
25631 ac_beg=1 # First line for current file.
25632 ac_end=$ac_max_sed_cmds # Line after last line for current file.
25633 ac_more_lines=:
25634 ac_sed_cmds=""
25635 while $ac_more_lines; do
25636   if test $ac_beg -gt 1; then
25637     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
25638   else
25639     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
25640   fi
25641   if test ! -s conftest.s$ac_file; then
25642     ac_more_lines=false
25643     rm -f conftest.s$ac_file
25644   else
25645     if test -z "$ac_sed_cmds"; then
25646       ac_sed_cmds="sed -f conftest.s$ac_file"
25647     else
25648       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
25649     fi
25650     ac_file=`expr $ac_file + 1`
25651     ac_beg=$ac_end
25652     ac_end=`expr $ac_end + $ac_max_sed_cmds`
25653   fi
25654 done
25655 if test -z "$ac_sed_cmds"; then
25656   ac_sed_cmds=cat
25657 fi
25658 EOF
25659
25660 cat >> $CONFIG_STATUS <<EOF
25661
25662 CONFIG_FILES=\${CONFIG_FILES-"\
25663 Makefile:build/top.mk:Makefile.in:build/dir.mk \
25664 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
25665 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
25666 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
25667 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
25668 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
25669 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
25670 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
25671 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
25672 include/Makefile:build/top.mk:include/Makefile.in \
25673 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
25674 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
25675 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
25676 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
25677 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk  \
25678 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
25679 libraries/librewrite/Makefile:build/top.mk:libraries/librewrite/Makefile.in:build/lib.mk:build/lib-static.mk \
25680 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
25681 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
25682 servers/slapd/back-bdb/Makefile:build/top.mk:servers/slapd/back-bdb/Makefile.in:build/mod.mk \
25683 servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
25684 servers/slapd/back-hdb/Makefile:build/top.mk:servers/slapd/back-hdb/Makefile.in:build/mod.mk \
25685 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
25686 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
25687 servers/slapd/back-meta/Makefile:build/top.mk:servers/slapd/back-meta/Makefile.in:build/mod.mk \
25688 servers/slapd/back-monitor/Makefile:build/top.mk:servers/slapd/back-monitor/Makefile.in:build/mod.mk \
25689 servers/slapd/back-null/Makefile:build/top.mk:servers/slapd/back-null/Makefile.in:build/mod.mk \
25690 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
25691 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
25692 servers/slapd/back-relay/Makefile:build/top.mk:servers/slapd/back-relay/Makefile.in:build/mod.mk \
25693 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
25694 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
25695 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
25696 servers/slapd/slapi/Makefile:build/top.mk:servers/slapd/slapi/Makefile.in:build/lib.mk:build/lib-shared.mk  \
25697 servers/slapd/overlays/Makefile:build/top.mk:servers/slapd/overlays/Makefile.in:build/lib.mk \
25698 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
25699 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
25700 tests/run \
25701 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
25702 "}
25703 EOF
25704 cat >> $CONFIG_STATUS <<\EOF
25705 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
25706   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
25707   case "$ac_file" in
25708   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
25709        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
25710   *) ac_file_in="${ac_file}.in" ;;
25711   esac
25712
25713   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
25714
25715   # Remove last slash and all that follows it.  Not all systems have dirname.
25716   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
25717   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
25718     # The file is in a subdirectory.
25719     test ! -d "$ac_dir" && mkdir "$ac_dir"
25720     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
25721     # A "../" for each directory in $ac_dir_suffix.
25722     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
25723   else
25724     ac_dir_suffix= ac_dots=
25725   fi
25726
25727   case "$ac_given_srcdir" in
25728   .)  srcdir=.
25729       if test -z "$ac_dots"; then top_srcdir=.
25730       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
25731   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
25732   *) # Relative path.
25733     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
25734     top_srcdir="$ac_dots$ac_given_srcdir" ;;
25735   esac
25736
25737   case "$ac_given_INSTALL" in
25738   [/$]*) INSTALL="$ac_given_INSTALL" ;;
25739   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
25740   esac
25741
25742   echo creating "$ac_file"
25743   rm -f "$ac_file"
25744   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
25745   case "$ac_file" in
25746   *[Mm]akefile*) ac_comsub="1i\\
25747 # $configure_input" ;;
25748   *) ac_comsub= ;;
25749   esac
25750
25751   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
25752   sed -e "$ac_comsub
25753 s%@configure_input@%$configure_input%g
25754 s%@srcdir@%$srcdir%g
25755 s%@top_srcdir@%$top_srcdir%g
25756 s%@INSTALL@%$INSTALL%g
25757 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
25758 fi; done
25759 rm -f conftest.s*
25760
25761 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
25762 # NAME is the cpp macro being defined and VALUE is the value it is being given.
25763 #
25764 # ac_d sets the value in "#define NAME VALUE" lines.
25765 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
25766 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
25767 ac_dC='\3'
25768 ac_dD='%g'
25769 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
25770 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
25771 ac_uB='\([      ]\)%\1#\2define\3'
25772 ac_uC=' '
25773 ac_uD='\4%g'
25774 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
25775 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
25776 ac_eB='$%\1#\2define\3'
25777 ac_eC=' '
25778 ac_eD='%g'
25779
25780 if test "${CONFIG_HEADERS+set}" != set; then
25781 EOF
25782 cat >> $CONFIG_STATUS <<EOF
25783   CONFIG_HEADERS="include/portable.h include/ldap_features.h include/lber_types.h"
25784 EOF
25785 cat >> $CONFIG_STATUS <<\EOF
25786 fi
25787 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
25788   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
25789   case "$ac_file" in
25790   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
25791        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
25792   *) ac_file_in="${ac_file}.in" ;;
25793   esac
25794
25795   echo creating $ac_file
25796
25797   rm -f conftest.frag conftest.in conftest.out
25798   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
25799   cat $ac_file_inputs > conftest.in
25800
25801 EOF
25802
25803 # Transform confdefs.h into a sed script conftest.vals that substitutes
25804 # the proper values into config.h.in to produce config.h.  And first:
25805 # Protect against being on the right side of a sed subst in config.status.
25806 # Protect against being in an unquoted here document in config.status.
25807 rm -f conftest.vals
25808 cat > conftest.hdr <<\EOF
25809 s/[\\&%]/\\&/g
25810 s%[\\$`]%\\&%g
25811 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
25812 s%ac_d%ac_u%gp
25813 s%ac_u%ac_e%gp
25814 EOF
25815 sed -n -f conftest.hdr confdefs.h > conftest.vals
25816 rm -f conftest.hdr
25817
25818 # This sed command replaces #undef with comments.  This is necessary, for
25819 # example, in the case of _POSIX_SOURCE, which is predefined and required
25820 # on some systems where configure will not decide to define it.
25821 cat >> conftest.vals <<\EOF
25822 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
25823 EOF
25824
25825 # Break up conftest.vals because some shells have a limit on
25826 # the size of here documents, and old seds have small limits too.
25827
25828 rm -f conftest.tail
25829 while :
25830 do
25831   ac_lines=`grep -c . conftest.vals`
25832   # grep -c gives empty output for an empty file on some AIX systems.
25833   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
25834   # Write a limited-size here document to conftest.frag.
25835   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
25836   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
25837   echo 'CEOF
25838   sed -f conftest.frag conftest.in > conftest.out
25839   rm -f conftest.in
25840   mv conftest.out conftest.in
25841 ' >> $CONFIG_STATUS
25842   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
25843   rm -f conftest.vals
25844   mv conftest.tail conftest.vals
25845 done
25846 rm -f conftest.vals
25847
25848 cat >> $CONFIG_STATUS <<\EOF
25849   rm -f conftest.frag conftest.h
25850   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
25851   cat conftest.in >> conftest.h
25852   rm -f conftest.in
25853   if cmp -s $ac_file conftest.h 2>/dev/null; then
25854     echo "$ac_file is unchanged"
25855     rm -f conftest.h
25856   else
25857     # Remove last slash and all that follows it.  Not all systems have dirname.
25858       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
25859       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
25860       # The file is in a subdirectory.
25861       test ! -d "$ac_dir" && mkdir "$ac_dir"
25862     fi
25863     rm -f $ac_file
25864     mv conftest.h $ac_file
25865   fi
25866 fi; done
25867
25868 EOF
25869 cat >> $CONFIG_STATUS <<EOF
25870
25871 EOF
25872 cat >> $CONFIG_STATUS <<\EOF
25873
25874 chmod +x tests/run
25875 date > stamp-h
25876 echo Please run \"make depend\" to build dependencies
25877
25878 exit 0
25879 EOF
25880 chmod +x $CONFIG_STATUS
25881 rm -fr confdefs* $ac_clean_files
25882 test "$no_create" = yes || $SHELL $CONFIG_STATUS || exit 1
25883