]> git.sur5r.net Git - openldap/blob - configure
don't leak entry/referrals in case of reference
[openldap] / configure
1 #! /bin/sh
2 # $OpenLDAP$
3 # from OpenLDAP: pkg/ldap/configure.in,v 1.586 2005/08/07 16:08:02 hallvard Exp  
4
5 # This work is part of OpenLDAP Software <http://www.openldap.org/>.
6 #
7 # Copyright 1998-2005 The OpenLDAP Foundation.
8 # All rights reserved.
9 #
10 # Redistribution and use in source and binary forms, with or without
11 # modification, are permitted only as authorized by the OpenLDAP
12 # Public License.
13 #
14 # A copy of this license is available in the file LICENSE in the
15 # top-level directory of the distribution or, alternatively, at
16 # <http://www.OpenLDAP.org/license.html>.
17
18 echo "Copyright 1998-2005 The OpenLDAP Foundation. All rights reserved."
19 echo "  Restrictions apply, see COPYRIGHT and LICENSE files."
20
21 # Guess values for system-dependent variables and create Makefiles.
22 # Generated automatically using autoconf version 2.13.1 
23 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
24 #
25 # This configure script is free software; the Free Software Foundation
26 # gives unlimited permission to copy, distribute and modify it.
27
28 # Defaults:
29 ac_help=
30 ac_default_prefix=/usr/local
31 # Any additions from configure.in:
32 ac_default_prefix=/usr/local
33 ac_help="$ac_help
34   --with-subdir=DIR       change default subdirectory used for installs"
35 ac_help="$ac_help
36   --enable-debug          enable debugging [yes]"
37 ac_help="$ac_help
38   --enable-dynamic        enable linking built binaries with dynamic libs [no]"
39 ac_help="$ac_help
40   --enable-syslog         enable syslog support [auto]"
41 ac_help="$ac_help
42   --enable-proctitle      enable proctitle support [yes]"
43 ac_help="$ac_help
44   --enable-ipv6           enable IPv6 support [auto]"
45 ac_help="$ac_help
46   --enable-local          enable AF_LOCAL (AF_UNIX) socket support [auto]"
47 ac_help="$ac_help
48   --with-cyrus-sasl       with Cyrus SASL support [auto]"
49 ac_help="$ac_help
50   --with-fetch            with fetch(3) URL support [auto]"
51 ac_help="$ac_help
52   --with-threads          with threads [auto]"
53 ac_help="$ac_help
54   --with-tls              with TLS/SSL support [auto]"
55 ac_help="$ac_help
56   --with-yielding-select  with implicitly yielding select [auto]"
57 ac_help="$ac_help
58   --with-multiple-precision
59                           multiple precision support for statistics
60                           auto|bignum|gmp [auto]"
61 ac_help="$ac_help
62
63 SLAPD (Standalone LDAP Daemon) Options:"
64 ac_help="$ac_help
65   --enable-slapd          enable building slapd [yes]"
66 ac_help="$ac_help
67     --enable-aci          enable per-object ACIs (experimental) [no]"
68 ac_help="$ac_help
69     --enable-cleartext    enable cleartext passwords [yes]"
70 ac_help="$ac_help
71     --enable-crypt        enable crypt(3) passwords [no]"
72 ac_help="$ac_help
73     --enable-lmpasswd     enable LAN Manager passwords [no]"
74 ac_help="$ac_help
75     --enable-spasswd      enable (Cyrus) SASL password verification [no]"
76 ac_help="$ac_help
77     --enable-modules      enable dynamic module support [no]"
78 ac_help="$ac_help
79     --enable-rewrite      enable DN rewriting in back-ldap and 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"
93 ac_help="$ac_help
94     --enable-bdb          enable Berkeley DB backend no|yes|mod [${ol_dflt_backends-yes}]"
95 ac_help="$ac_help
96     --enable-dnssrv       enable dnssrv backend no|yes|mod [${ol_dflt_backends-no}]"
97 ac_help="$ac_help
98     --enable-hdb          enable Hierarchical DB backend no|yes|mod [${ol_dflt_backends-yes}]"
99 ac_help="$ac_help
100     --enable-ldap         enable ldap backend no|yes|mod [${ol_dflt_backends-no}]"
101 ac_help="$ac_help
102     --enable-ldbm         enable ldbm backend no|yes|mod [${ol_dflt_backends-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 [${ol_dflt_backends-no}]"
109 ac_help="$ac_help
110     --enable-monitor      enable monitor backend no|yes|mod [${ol_dflt_backends-yes}]"
111 ac_help="$ac_help
112     --enable-null         enable null backend no|yes|mod [${ol_dflt_backends-no}]"
113 ac_help="$ac_help
114     --enable-passwd       enable passwd backend no|yes|mod [${ol_dflt_backends-no}]"
115 ac_help="$ac_help
116     --enable-perl         enable perl backend no|yes|mod [${ol_dflt_backends-no}]"
117 ac_help="$ac_help
118     --enable-relay        enable relay backend no|yes|mod [${ol_dflt_backends-yes}]"
119 ac_help="$ac_help
120     --enable-shell        enable shell backend no|yes|mod [${ol_dflt_backends-no}]"
121 ac_help="$ac_help
122     --enable-sql          enable sql backend no|yes|mod [${ol_dflt_backends-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"
128 ac_help="$ac_help
129     --enable-accesslog    In-Directory Access Logging overlay no|yes|mod [${ol_dflt_overlays-no}]"
130 ac_help="$ac_help
131     --enable-denyop       Deny Operation overlay no|yes|mod [${ol_dflt_overlays-no}]"
132 ac_help="$ac_help
133     --enable-dyngroup     Dynamic Group overlay no|yes|mod [${ol_dflt_overlays-no}]"
134 ac_help="$ac_help
135     --enable-dynlist      Dynamic List overlay no|yes|mod [${ol_dflt_overlays-no}]"
136 ac_help="$ac_help
137     --enable-glue         Backend Glue overlay no|yes|mod [${ol_dflt_overlays-yes}]"
138 ac_help="$ac_help
139     --enable-lastmod      Last Modification overlay no|yes|mod [${ol_dflt_overlays-no}]"
140 ac_help="$ac_help
141     --enable-ppolicy      Password Policy overlay no|yes|mod [${ol_dflt_overlays-no}]"
142 ac_help="$ac_help
143     --enable-proxycache   Proxy Cache overlay no|yes|mod [${ol_dflt_overlays-no}]"
144 ac_help="$ac_help
145     --enable-refint       Referential Integrity overlay no|yes|mod [${ol_dflt_overlays-no}]"
146 ac_help="$ac_help
147     --enable-retcode      Return Code testing overlay no|yes|mod [${ol_dflt_overlays-no}]"
148 ac_help="$ac_help
149     --enable-rwm          Rewrite/Remap overlay no|yes|mod [${ol_dflt_overlays-no}]"
150 ac_help="$ac_help
151     --enable-syncprov     Syncrepl Provider overlay no|yes|mod [${ol_dflt_overlays-yes}]"
152 ac_help="$ac_help
153     --enable-translucent  Translucent Proxy overlay no|yes|mod [${ol_dflt_overlays-no}]"
154 ac_help="$ac_help
155     --enable-unique       Attribute Uniqueness overlay no|yes|mod [${ol_dflt_overlays-no}]"
156 ac_help="$ac_help
157
158 SLURPD (Replication Daemon) Options:"
159 ac_help="$ac_help
160   --enable-slurpd         enable building slurpd [auto]"
161 ac_help="$ac_help
162
163 Library Generation & Linking Options"
164 ac_help="$ac_help
165   --enable-static[=PKGS]  build static libraries [default=yes]"
166 ac_help="$ac_help
167   --enable-shared[=PKGS]  build shared libraries [default=yes]"
168 ac_help="$ac_help
169   --enable-fast-install[=PKGS]  optimize for fast installation [default=yes]"
170 ac_help="$ac_help
171   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]"
172
173 # Find the correct PATH separator.  Usually this is `:', but
174 # DJGPP uses `;' like DOS.
175 if test "X${PATH_SEPARATOR+set}" != Xset; then
176   UNAME=${UNAME-`uname 2>/dev/null`}
177   case X$UNAME in
178     *-DOS) lt_cv_sys_path_separator=';' ;;
179     *)     lt_cv_sys_path_separator=':' ;;
180   esac
181   PATH_SEPARATOR=$lt_cv_sys_path_separator
182 fi
183
184
185 # Check that we are running under the correct shell.
186 SHELL=${CONFIG_SHELL-/bin/sh}
187
188 case X$ECHO in
189 X*--fallback-echo)
190   # Remove one level of quotation (which was required for Make).
191   ECHO=`echo "$ECHO" | sed 's,\\\\\$\\$0,'$0','`
192   ;;
193 esac
194
195 echo=${ECHO-echo}
196 if test "X$1" = X--no-reexec; then
197   # Discard the --no-reexec flag, and continue.
198   shift
199 elif test "X$1" = X--fallback-echo; then
200   # Avoid inline document here, it may be left over
201   :
202 elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then
203   # Yippee, $echo works!
204   :
205 else
206   # Restart under the correct shell.
207   exec $SHELL "$0" --no-reexec ${1+"$@"}
208 fi
209
210 if test "X$1" = X--fallback-echo; then
211   # used as fallback echo
212   shift
213   cat <<EOF
214
215 EOF
216   exit 0
217 fi
218
219 # The HP-UX ksh and POSIX shell print the target directory to stdout
220 # if CDPATH is set.
221 if test "X${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
222
223 if test -z "$ECHO"; then
224 if test "X${echo_test_string+set}" != Xset; then
225 # find a string as large as possible, as long as the shell can cope with it
226   for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do
227     # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
228     if (echo_test_string="`eval $cmd`") 2>/dev/null &&
229        echo_test_string="`eval $cmd`" &&
230        (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
231     then
232       break
233     fi
234   done
235 fi
236
237 if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
238    echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
239    test "X$echo_testing_string" = "X$echo_test_string"; then
240   :
241 else
242   # The Solaris, AIX, and Digital Unix default echo programs unquote
243   # backslashes.  This makes it impossible to quote backslashes using
244   #   echo "$something" | sed 's/\\/\\\\/g'
245   #
246   # So, first we look for a working echo in the user's PATH.
247
248   IFS="${IFS=   }"; save_ifs="$IFS"; IFS=$PATH_SEPARATOR
249   for dir in $PATH /usr/ucb; do
250     if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
251        test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
252        echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
253        test "X$echo_testing_string" = "X$echo_test_string"; then
254       echo="$dir/echo"
255       break
256     fi
257   done
258   IFS="$save_ifs"
259
260   if test "X$echo" = Xecho; then
261     # We didn't find a better echo, so look for alternatives.
262     if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
263        echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
264        test "X$echo_testing_string" = "X$echo_test_string"; then
265       # This shell has a builtin print -r that does the trick.
266       echo='print -r'
267     elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
268          test "X$CONFIG_SHELL" != X/bin/ksh; then
269       # If we have ksh, try running configure again with it.
270       ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
271       export ORIGINAL_CONFIG_SHELL
272       CONFIG_SHELL=/bin/ksh
273       export CONFIG_SHELL
274       exec $CONFIG_SHELL "$0" --no-reexec ${1+"$@"}
275     else
276       # Try using printf.
277       echo='printf %s\n'
278       if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
279          echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
280          test "X$echo_testing_string" = "X$echo_test_string"; then
281         # Cool, printf works
282         :
283       elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` &&
284            test "X$echo_testing_string" = 'X\t' &&
285            echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
286            test "X$echo_testing_string" = "X$echo_test_string"; then
287         CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
288         export CONFIG_SHELL
289         SHELL="$CONFIG_SHELL"
290         export SHELL
291         echo="$CONFIG_SHELL $0 --fallback-echo"
292       elif echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` &&
293            test "X$echo_testing_string" = 'X\t' &&
294            echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
295            test "X$echo_testing_string" = "X$echo_test_string"; then
296         echo="$CONFIG_SHELL $0 --fallback-echo"
297       else
298         # maybe with a smaller string...
299         prev=:
300
301         for cmd in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed 50q "$0"'; do
302           if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
303           then
304             break
305           fi
306           prev="$cmd"
307         done
308
309         if test "$prev" != 'sed 50q "$0"'; then
310           echo_test_string=`eval $prev`
311           export echo_test_string
312           exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "$0" ${1+"$@"}
313         else
314           # Oops.  We lost completely, so just stick with echo.
315           echo=echo
316         fi
317       fi
318     fi
319   fi
320 fi
321 fi
322
323 # Copy echo and quote the copy suitably for passing to libtool from
324 # the Makefile, instead of quoting the original, which is used later.
325 ECHO=$echo
326 if test "X$ECHO" = "X$CONFIG_SHELL $0 --fallback-echo"; then
327    ECHO="$CONFIG_SHELL \\\$\$0 --fallback-echo"
328 fi
329
330
331 ac_help="$ac_help
332   --disable-libtool-lock  avoid locking (might break parallel builds)"
333 ac_help="$ac_help
334   --with-pic              try to use only PIC/non-PIC objects [default=use both]"
335 ac_help="$ac_help
336
337 See INSTALL file for further details."
338
339 # Initialize some variables set by options.
340 # The variables have the same names as the options, with
341 # dashes changed to underlines.
342 build=NONE
343 cache_file=./config.cache
344 exec_prefix=NONE
345 host=NONE
346 no_create=
347 nonopt=NONE
348 no_recursion=
349 prefix=NONE
350 program_prefix=NONE
351 program_suffix=NONE
352 program_transform_name=s,x,x,
353 silent=
354 site=
355 srcdir=
356 target=NONE
357 verbose=
358 x_includes=NONE
359 x_libraries=NONE
360 bindir='${exec_prefix}/bin'
361 sbindir='${exec_prefix}/sbin'
362 libexecdir='${exec_prefix}/libexec'
363 datadir='${prefix}/share'
364 sysconfdir='${prefix}/etc'
365 sharedstatedir='${prefix}/com'
366 localstatedir='${prefix}/var'
367 libdir='${exec_prefix}/lib'
368 includedir='${prefix}/include'
369 oldincludedir='/usr/include'
370 infodir='${prefix}/info'
371 mandir='${prefix}/man'
372
373 # Initialize some other variables.
374 subdirs=
375 MFLAGS= MAKEFLAGS=
376 SHELL=${CONFIG_SHELL-/bin/sh}
377 # Maximum number of lines to put in a shell here document.
378 ac_max_here_lines=12
379
380 ac_prev=
381 for ac_option
382 do
383
384   # If the previous option needs an argument, assign it.
385   if test -n "$ac_prev"; then
386     eval "$ac_prev=\$ac_option"
387     ac_prev=
388     continue
389   fi
390
391   case "$ac_option" in
392   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
393   *) ac_optarg= ;;
394   esac
395
396   # Accept the important Cygnus configure options, so we can diagnose typos.
397
398   case "$ac_option" in
399
400   -bindir | --bindir | --bindi | --bind | --bin | --bi)
401     ac_prev=bindir ;;
402   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
403     bindir="$ac_optarg" ;;
404
405   -build | --build | --buil | --bui | --bu)
406     ac_prev=build ;;
407   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
408     build="$ac_optarg" ;;
409
410   -cache-file | --cache-file | --cache-fil | --cache-fi \
411   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
412     ac_prev=cache_file ;;
413   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
414   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
415     cache_file="$ac_optarg" ;;
416
417   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
418     ac_prev=datadir ;;
419   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
420   | --da=*)
421     datadir="$ac_optarg" ;;
422
423   -disable-* | --disable-*)
424     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
425     # Reject names that are not valid shell variable names.
426     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
427       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
428     fi
429     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
430     eval "enable_${ac_feature}=no" ;;
431
432   -enable-* | --enable-*)
433     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
434     # Reject names that are not valid shell variable names.
435     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
436       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
437     fi
438     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
439     case "$ac_option" in
440       *=*) ;;
441       *) ac_optarg=yes ;;
442     esac
443     eval "enable_${ac_feature}='$ac_optarg'" ;;
444
445   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
446   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
447   | --exec | --exe | --ex)
448     ac_prev=exec_prefix ;;
449   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
450   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
451   | --exec=* | --exe=* | --ex=*)
452     exec_prefix="$ac_optarg" ;;
453
454   -gas | --gas | --ga | --g)
455     # Obsolete; use --with-gas.
456     with_gas=yes ;;
457
458   -help | --help | --hel | --he)
459     # Omit some internal or obsolete options to make the list less imposing.
460     # This message is too long to be a string in the A/UX 3.1 sh.
461     cat << EOF
462 Usage: configure [options] [host]
463 Options: [defaults in brackets after descriptions]
464 Configuration:
465   --cache-file=FILE       cache test results in FILE
466   --help                  print this message
467   --no-create             do not create output files
468   --quiet, --silent       do not print \`checking...' messages
469   --version               print the version of autoconf that created configure
470 Directory and file names:
471   --prefix=PREFIX         install architecture-independent files in PREFIX
472                           [$ac_default_prefix]
473   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
474                           [same as prefix]
475   --bindir=DIR            user executables in DIR [EPREFIX/bin]
476   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
477   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
478   --datadir=DIR           read-only architecture-independent data in DIR
479                           [PREFIX/share]
480   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
481   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
482                           [PREFIX/com]
483   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
484   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
485   --includedir=DIR        C header files in DIR [PREFIX/include]
486   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
487   --infodir=DIR           info documentation in DIR [PREFIX/info]
488   --mandir=DIR            man documentation in DIR [PREFIX/man]
489   --srcdir=DIR            find the sources in DIR [configure dir or ..]
490   --program-prefix=PREFIX prepend PREFIX to installed program names
491   --program-suffix=SUFFIX append SUFFIX to installed program names
492   --program-transform-name=PROGRAM
493                           run sed PROGRAM on installed program names
494 EOF
495     cat << EOF
496 Host type:
497   --build=BUILD           configure for building on BUILD [BUILD=HOST]
498   --host=HOST             configure for HOST [guessed]
499   --target=TARGET         configure for TARGET [TARGET=HOST]
500 Features and packages:
501   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
502   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
503   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
504   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
505   --x-includes=DIR        X include files are in DIR
506   --x-libraries=DIR       X library files are in DIR
507 EOF
508     if test -n "$ac_help"; then
509       echo "--enable and --with options recognized:$ac_help"
510     fi
511     exit 0 ;;
512
513   -host | --host | --hos | --ho)
514     ac_prev=host ;;
515   -host=* | --host=* | --hos=* | --ho=*)
516     host="$ac_optarg" ;;
517
518   -includedir | --includedir | --includedi | --included | --include \
519   | --includ | --inclu | --incl | --inc)
520     ac_prev=includedir ;;
521   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
522   | --includ=* | --inclu=* | --incl=* | --inc=*)
523     includedir="$ac_optarg" ;;
524
525   -infodir | --infodir | --infodi | --infod | --info | --inf)
526     ac_prev=infodir ;;
527   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
528     infodir="$ac_optarg" ;;
529
530   -libdir | --libdir | --libdi | --libd)
531     ac_prev=libdir ;;
532   -libdir=* | --libdir=* | --libdi=* | --libd=*)
533     libdir="$ac_optarg" ;;
534
535   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
536   | --libexe | --libex | --libe)
537     ac_prev=libexecdir ;;
538   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
539   | --libexe=* | --libex=* | --libe=*)
540     libexecdir="$ac_optarg" ;;
541
542   -localstatedir | --localstatedir | --localstatedi | --localstated \
543   | --localstate | --localstat | --localsta | --localst \
544   | --locals | --local | --loca | --loc | --lo)
545     ac_prev=localstatedir ;;
546   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
547   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
548   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
549     localstatedir="$ac_optarg" ;;
550
551   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
552     ac_prev=mandir ;;
553   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
554     mandir="$ac_optarg" ;;
555
556   -nfp | --nfp | --nf)
557     # Obsolete; use --without-fp.
558     with_fp=no ;;
559
560   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
561   | --no-cr | --no-c)
562     no_create=yes ;;
563
564   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
565   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
566     no_recursion=yes ;;
567
568   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
569   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
570   | --oldin | --oldi | --old | --ol | --o)
571     ac_prev=oldincludedir ;;
572   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
573   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
574   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
575     oldincludedir="$ac_optarg" ;;
576
577   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
578     ac_prev=prefix ;;
579   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
580     prefix="$ac_optarg" ;;
581
582   -program-prefix | --program-prefix | --program-prefi | --program-pref \
583   | --program-pre | --program-pr | --program-p)
584     ac_prev=program_prefix ;;
585   -program-prefix=* | --program-prefix=* | --program-prefi=* \
586   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
587     program_prefix="$ac_optarg" ;;
588
589   -program-suffix | --program-suffix | --program-suffi | --program-suff \
590   | --program-suf | --program-su | --program-s)
591     ac_prev=program_suffix ;;
592   -program-suffix=* | --program-suffix=* | --program-suffi=* \
593   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
594     program_suffix="$ac_optarg" ;;
595
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     ac_prev=program_transform_name ;;
604   -program-transform-name=* | --program-transform-name=* \
605   | --program-transform-nam=* | --program-transform-na=* \
606   | --program-transform-n=* | --program-transform-=* \
607   | --program-transform=* | --program-transfor=* \
608   | --program-transfo=* | --program-transf=* \
609   | --program-trans=* | --program-tran=* \
610   | --progr-tra=* | --program-tr=* | --program-t=*)
611     program_transform_name="$ac_optarg" ;;
612
613   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
614   | -silent | --silent | --silen | --sile | --sil)
615     silent=yes ;;
616
617   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
618     ac_prev=sbindir ;;
619   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
620   | --sbi=* | --sb=*)
621     sbindir="$ac_optarg" ;;
622
623   -sharedstatedir | --sharedstatedir | --sharedstatedi \
624   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
625   | --sharedst | --shareds | --shared | --share | --shar \
626   | --sha | --sh)
627     ac_prev=sharedstatedir ;;
628   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
629   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
630   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
631   | --sha=* | --sh=*)
632     sharedstatedir="$ac_optarg" ;;
633
634   -site | --site | --sit)
635     ac_prev=site ;;
636   -site=* | --site=* | --sit=*)
637     site="$ac_optarg" ;;
638
639   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
640     ac_prev=srcdir ;;
641   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
642     srcdir="$ac_optarg" ;;
643
644   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
645   | --syscon | --sysco | --sysc | --sys | --sy)
646     ac_prev=sysconfdir ;;
647   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
648   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
649     sysconfdir="$ac_optarg" ;;
650
651   -target | --target | --targe | --targ | --tar | --ta | --t)
652     ac_prev=target ;;
653   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
654     target="$ac_optarg" ;;
655
656   -v | -verbose | --verbose | --verbos | --verbo | --verb)
657     verbose=yes ;;
658
659   -version | --version | --versio | --versi | --vers)
660     echo "configure generated by autoconf version 2.13.1"
661     exit 0 ;;
662
663   -with-* | --with-*)
664     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
665     # Reject names that are not valid shell variable names.
666     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
667       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
668     fi
669     ac_package=`echo $ac_package| sed 's/-/_/g'`
670     case "$ac_option" in
671       *=*) ;;
672       *) ac_optarg=yes ;;
673     esac
674     eval "with_${ac_package}='$ac_optarg'" ;;
675
676   -without-* | --without-*)
677     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
678     # Reject names that are not valid shell variable names.
679     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
680       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
681     fi
682     ac_package=`echo $ac_package| sed 's/-/_/g'`
683     eval "with_${ac_package}=no" ;;
684
685   --x)
686     # Obsolete; use --with-x.
687     with_x=yes ;;
688
689   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
690   | --x-incl | --x-inc | --x-in | --x-i)
691     ac_prev=x_includes ;;
692   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
693   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
694     x_includes="$ac_optarg" ;;
695
696   -x-libraries | --x-libraries | --x-librarie | --x-librari \
697   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
698     ac_prev=x_libraries ;;
699   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
700   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
701     x_libraries="$ac_optarg" ;;
702
703   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
704     ;;
705
706   *)
707     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
708       echo "configure: warning: $ac_option: invalid host type" 1>&2
709     fi
710     if test "x$nonopt" != xNONE; then
711       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
712     fi
713     nonopt="$ac_option"
714     ;;
715
716   esac
717 done
718
719 if test -n "$ac_prev"; then
720   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
721 fi
722
723 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
724
725 # File descriptor usage:
726 # 0 standard input
727 # 1 file creation
728 # 2 errors and warnings
729 # 3 some systems may open it to /dev/tty
730 # 4 used on the Kubota Titan
731 # 6 checking for... messages and results
732 # 5 compiler messages saved in config.log
733 if test "$silent" = yes; then
734   exec 6>/dev/null
735 else
736   exec 6>&1
737 fi
738 exec 5>./config.log
739
740 echo "\
741 This file contains any messages produced by compilers while
742 running configure, to aid debugging if configure makes a mistake.
743 " 1>&5
744
745 # Strip out --no-create and --no-recursion so they do not pile up.
746 # Also quote any args containing shell metacharacters.
747 ac_configure_args=
748 for ac_arg
749 do
750   case "$ac_arg" in
751   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
752   | --no-cr | --no-c) ;;
753   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
754   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
755   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
756   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
757   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
758   esac
759 done
760
761 # NLS nuisances.
762 # Only set these to C if already set.  These must not be set unconditionally
763 # because not all systems understand e.g. LANG=C (notably SCO).
764 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
765 # Non-C LC_CTYPE values break the ctype check.
766 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
767 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
768 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
769 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
770
771 # confdefs.h avoids OS command line length limits that DEFS can exceed.
772 rm -rf conftest* confdefs.h
773 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
774 echo > confdefs.h
775
776 # A filename unique to this package, relative to the directory that
777 # configure is in, which we can look for to find out if srcdir is correct.
778 ac_unique_file=build/version.sh
779
780 # Find the source files, if location was not specified.
781 if test -z "$srcdir"; then
782   ac_srcdir_defaulted=yes
783   # Try the directory containing this script, then its parent.
784   ac_prog=$0
785   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
786   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
787   srcdir=$ac_confdir
788   if test ! -r $srcdir/$ac_unique_file; then
789     srcdir=..
790   fi
791 else
792   ac_srcdir_defaulted=no
793 fi
794 if test ! -r $srcdir/$ac_unique_file; then
795   if test "$ac_srcdir_defaulted" = yes; then
796     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
797   else
798     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
799   fi
800 fi
801 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
802
803 # Prefer explicitly selected file to automatically selected ones.
804 if test -z "$CONFIG_SITE"; then
805   if test "x$prefix" != xNONE; then
806     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
807   else
808     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
809   fi
810 fi
811 for ac_site_file in $CONFIG_SITE; do
812   if test -r "$ac_site_file"; then
813     echo "loading site script $ac_site_file"
814     . "$ac_site_file"
815   fi
816 done
817
818
819 ac_ext=c
820 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
821 ac_cpp='$CPP $CPPFLAGS'
822 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
823 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
824 cross_compiling=$ac_cv_prog_cc_cross
825
826 ac_exeext=
827 ac_objext=o
828 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
829   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
830   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
831     ac_n= ac_c='
832 ' ac_t='        '
833   else
834     ac_n=-n ac_c= ac_t=
835   fi
836 else
837   ac_n= ac_c='\c' ac_t=
838 fi
839
840
841 # set unset (borrowed from autoconf 2.49c)
842 if (OL_FOO=OL_FOO; unset OL_FOO) >/dev/null 2>&1; then
843   ol_unset=unset
844 else
845   ol_unset=false
846 fi
847 # unset CDPATH
848 $ol_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
849
850 ac_aux_dir=
851 for ac_dir in build $srcdir/build; do
852   if test -f $ac_dir/install-sh; then
853     ac_aux_dir=$ac_dir
854     ac_install_sh="$ac_aux_dir/install-sh -c"
855     break
856   elif test -f $ac_dir/install.sh; then
857     ac_aux_dir=$ac_dir
858     ac_install_sh="$ac_aux_dir/install.sh -c"
859     break
860   elif test -f $ac_dir/shtool; then
861     ac_aux_dir=$ac_dir
862     ac_install_sh="$ac_aux_dir/shtool install -c"
863     break
864   fi
865 done
866 if test -z "$ac_aux_dir"; then
867   { echo "configure: error: can not find install-sh or install.sh in build $srcdir/build" 1>&2; exit 1; }
868 fi
869 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
870 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
871 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
872
873 eval `$ac_aux_dir/version.sh`
874 if test -z "$OL_STRING"; then
875         { echo "configure: error: could not determine version" 1>&2; exit 1; }
876 fi
877
878 if test -f "$ac_aux_dir/shtool" -a ! -d $ac_aux_dir/shtool; then
879         ac_cv_shtool="$ac_aux_dir/shtool"
880 else
881         { echo "configure: error: no shtool found in $ac_aux_dir" 1>&2; exit 1; }
882 fi
883
884 SHTOOL="$ac_cv_shtool"
885
886 TB="`$SHTOOL echo -e '%B' 2>/dev/null`"
887 TN="`$SHTOOL echo -e '%b' 2>/dev/null`"
888
889 OPENLDAP_CVS=""
890 if test -d $ac_aux_dir/CVS; then
891         OPENLDAP_CVS="(from CVS sources) "
892 fi
893
894 echo "Configuring ${TB}${OL_STRING}${TN} ${OPENLDAP_CVS}..."
895
896
897 echo $ac_n "checking host system type""... $ac_c" 1>&6
898 echo "configure:899: checking host system type" >&5
899 if test "x$ac_cv_host" = "x" || (test "x$host" != "xNONE" && test "x$host" != "x$ac_cv_host_alias"); then
900
901 # Make sure we can run config.sub.
902   if $ac_config_sub sun4 >/dev/null 2>&1; then :
903     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
904   fi
905
906   ac_cv_host_alias=$host
907   case "$ac_cv_host_alias" in
908   NONE)
909     case $nonopt in
910     NONE)
911       if ac_cv_host_alias=`$ac_config_guess`; then :
912       else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
913       fi ;;
914     *) ac_cv_host_alias=$nonopt ;;
915     esac ;;
916   esac
917
918   ac_cv_host=`$ac_config_sub $ac_cv_host_alias`
919   ac_cv_host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
920   ac_cv_host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
921   ac_cv_host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
922 else
923   echo $ac_n "(cached) $ac_c" 1>&6
924 fi
925
926 echo "$ac_t""$ac_cv_host" 1>&6
927
928 host=$ac_cv_host
929 host_alias=$ac_cv_host_alias
930 host_cpu=$ac_cv_host_cpu
931 host_vendor=$ac_cv_host_vendor
932 host_os=$ac_cv_host_os
933
934
935
936
937
938 echo $ac_n "checking target system type""... $ac_c" 1>&6
939 echo "configure:940: checking target system type" >&5
940 if test "x$ac_cv_target" = "x" || (test "x$target" != "xNONE" && test "x$target" != "x$ac_cv_target_alias"); then
941
942 # Make sure we can run config.sub.
943   if $ac_config_sub sun4 >/dev/null 2>&1; then :
944     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
945   fi
946
947   ac_cv_target_alias=$target
948   case "$ac_cv_target_alias" in
949   NONE)
950     case $nonopt in
951     NONE)
952       ac_cv_target_alias=$host_alias ;;
953
954     *) ac_cv_target_alias=$nonopt ;;
955     esac ;;
956   esac
957
958   ac_cv_target=`$ac_config_sub $ac_cv_target_alias`
959   ac_cv_target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
960   ac_cv_target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
961   ac_cv_target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
962 else
963   echo $ac_n "(cached) $ac_c" 1>&6
964 fi
965
966 echo "$ac_t""$ac_cv_target" 1>&6
967
968 target=$ac_cv_target
969 target_alias=$ac_cv_target_alias
970 target_cpu=$ac_cv_target_cpu
971 target_vendor=$ac_cv_target_vendor
972 target_os=$ac_cv_target_os
973
974
975
976
977
978 echo $ac_n "checking build system type""... $ac_c" 1>&6
979 echo "configure:980: checking build system type" >&5
980 if test "x$ac_cv_build" = "x" || (test "x$build" != "xNONE" && test "x$build" != "x$ac_cv_build_alias"); then
981
982 # Make sure we can run config.sub.
983   if $ac_config_sub sun4 >/dev/null 2>&1; then :
984     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
985   fi
986
987   ac_cv_build_alias=$build
988   case "$ac_cv_build_alias" in
989   NONE)
990     case $nonopt in
991     NONE)
992       ac_cv_build_alias=$host_alias ;;
993
994     *) ac_cv_build_alias=$nonopt ;;
995     esac ;;
996   esac
997
998   ac_cv_build=`$ac_config_sub $ac_cv_build_alias`
999   ac_cv_build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1000   ac_cv_build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1001   ac_cv_build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1002 else
1003   echo $ac_n "(cached) $ac_c" 1>&6
1004 fi
1005
1006 echo "$ac_t""$ac_cv_build" 1>&6
1007
1008 build=$ac_cv_build
1009 build_alias=$ac_cv_build_alias
1010 build_cpu=$ac_cv_build_cpu
1011 build_vendor=$ac_cv_build_vendor
1012 build_os=$ac_cv_build_os
1013
1014
1015
1016
1017
1018 # Do some error checking and defaulting for the host and target type.
1019 # The inputs are:
1020 #    configure --host=HOST --target=TARGET --build=BUILD NONOPT
1021 #
1022 # The rules are:
1023 # 1. You are not allowed to specify --host, --target, and nonopt at the
1024 #    same time.
1025 # 2. Host defaults to nonopt.
1026 # 3. If nonopt is not specified, then host defaults to the current host,
1027 #    as determined by config.guess.
1028 # 4. Target and build default to nonopt.
1029 # 5. If nonopt is not specified, then target and build default to host.
1030
1031 # The aliases save the names the user supplied, while $host etc.
1032 # will get canonicalized.
1033 case $host---$target---$nonopt in
1034 NONE---*---* | *---NONE---* | *---*---NONE) ;;
1035 *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
1036 esac
1037
1038 test "$host_alias" != "$target_alias" &&
1039   test "$program_prefix$program_suffix$program_transform_name" = \
1040     NONENONEs,x,x, &&
1041   program_prefix=${target_alias}-
1042
1043
1044 # Find a good install program.  We prefer a C program (faster),
1045 # so one script is as good as another.  But avoid the broken or
1046 # incompatible versions:
1047 # SysV /etc/install, /usr/sbin/install
1048 # SunOS /usr/etc/install
1049 # IRIX /sbin/install
1050 # AIX /bin/install
1051 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
1052 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
1053 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
1054 # ./install, which can be erroneously created by make from ./install.sh.
1055 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
1056 echo "configure:1057: checking for a BSD compatible install" >&5
1057 if test -z "$INSTALL"; then
1058 if eval "test \"\${ac_cv_path_install+set}\" = set"; then
1059   echo $ac_n "(cached) $ac_c" 1>&6
1060 else
1061     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
1062   for ac_dir in $PATH; do
1063     # Account for people who put trailing slashes in PATH elements.
1064     case "$ac_dir/" in
1065     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
1066     *)
1067       # OSF1 and SCO ODT 3.0 have their own names for install.
1068       # Don't use installbsd from OSF since it installs stuff as root
1069       # by default.
1070       for ac_prog in ginstall scoinst install; do
1071         if test -f $ac_dir/$ac_prog; then
1072           if test $ac_prog = install &&
1073             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
1074             # AIX install.  It has an incompatible calling convention.
1075             :
1076           elif test $ac_prog = install &&
1077             grep pwplus $ac_dir/$ac_prog >/dev/null 2>&1; then
1078             # program-specific install script used by HP pwplus--don't use.
1079             :
1080           else
1081             ac_cv_path_install="$ac_dir/$ac_prog -c"
1082             break 2
1083           fi
1084         fi
1085       done
1086       ;;
1087     esac
1088   done
1089   IFS="$ac_save_IFS"
1090
1091 fi
1092   if test "${ac_cv_path_install+set}" = set; then
1093     INSTALL="$ac_cv_path_install"
1094   else
1095     # As a last resort, use the slow shell script.  We don't cache a
1096     # path for INSTALL within a source directory, because that will
1097     # break other packages using the cache if that directory is
1098     # removed, or if the path is relative.
1099     INSTALL="$ac_install_sh"
1100   fi
1101 fi
1102 echo "$ac_t""$INSTALL" 1>&6
1103
1104 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
1105 # It thinks the first close brace ends the variable substitution.
1106 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
1107
1108 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
1109
1110 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1111
1112 echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
1113 echo "configure:1114: checking whether build environment is sane" >&5
1114 # Just in case
1115 sleep 1
1116 echo timestamp > conftestfile
1117 # Do `set' in a subshell so we don't clobber the current shell's
1118 # arguments.  Must try -L first in case configure is actually a
1119 # symlink; some systems play weird games with the mod time of symlinks
1120 # (eg FreeBSD returns the mod time of the symlink's containing
1121 # directory).
1122 if (
1123    set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
1124    if test "$*" = "X"; then
1125       # -L didn't work.
1126       set X `ls -t $srcdir/configure conftestfile`
1127    fi
1128    if test "$*" != "X $srcdir/configure conftestfile" \
1129       && test "$*" != "X conftestfile $srcdir/configure"; then
1130
1131       # If neither matched, then we have a broken ls.  This can happen
1132       # if, for instance, CONFIG_SHELL is bash and it inherits a
1133       # broken ls alias from the environment.  This has actually
1134       # happened.  Such a system could not be considered "sane".
1135       { echo "configure: error: ls -t appears to fail.  Make sure there is not a broken
1136 alias in your environment" 1>&2; exit 1; }
1137    fi
1138
1139    test "$2" = conftestfile
1140    )
1141 then
1142    # Ok.
1143    :
1144 else
1145    { echo "configure: error: newly created file is older than distributed files!
1146 Check your system clock" 1>&2; exit 1; }
1147 fi
1148 rm -f conftest*
1149 echo "$ac_t""yes" 1>&6
1150 if test "$program_transform_name" = s,x,x,; then
1151   program_transform_name=
1152 else
1153   # Double any \ or $.  echo might interpret backslashes.
1154   cat <<\EOF_SED > conftestsed
1155 s,\\,\\\\,g; s,\$,$$,g
1156 EOF_SED
1157   program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
1158   rm -f conftestsed
1159 fi
1160 test "$program_prefix" != NONE &&
1161   program_transform_name="s,^,${program_prefix},;$program_transform_name"
1162 # Use a double $ so make ignores it.
1163 test "$program_suffix" != NONE &&
1164   program_transform_name="s,\$\$,${program_suffix},;$program_transform_name"
1165
1166 # sed with no file args requires a program.
1167 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
1168
1169 for ac_prog in mawk gawk nawk awk
1170 do
1171 # Extract the first word of "$ac_prog", so it can be a program name with args.
1172 set dummy $ac_prog; ac_word=$2
1173 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1174 echo "configure:1175: checking for $ac_word" >&5
1175 if eval "test \"\${ac_cv_prog_AWK+set}\" = set"; then
1176   echo $ac_n "(cached) $ac_c" 1>&6
1177 else
1178   if test -n "$AWK"; then
1179   ac_cv_prog_AWK="$AWK" # Let the user override the test.
1180 else
1181   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1182   ac_dummy="$PATH"
1183   for ac_dir in $ac_dummy; do
1184     test -z "$ac_dir" && ac_dir=.
1185     if test -f $ac_dir/$ac_word; then
1186       ac_cv_prog_AWK="$ac_prog"
1187       break
1188     fi
1189   done
1190   IFS="$ac_save_ifs"
1191 fi
1192 fi
1193 AWK="$ac_cv_prog_AWK"
1194 if test -n "$AWK"; then
1195   echo "$ac_t""$AWK" 1>&6
1196 else
1197   echo "$ac_t""no" 1>&6
1198 fi
1199
1200 test -n "$AWK" && break
1201 done
1202
1203 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
1204 echo "configure:1205: checking whether ${MAKE-make} sets \${MAKE}" >&5
1205 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
1206 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
1207   echo $ac_n "(cached) $ac_c" 1>&6
1208 else
1209   cat > conftestmake <<\EOF
1210 all:
1211         @echo 'ac_maketemp="${MAKE}"'
1212 EOF
1213 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
1214 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
1215 if test -n "$ac_maketemp"; then
1216   eval ac_cv_prog_make_${ac_make}_set=yes
1217 else
1218   eval ac_cv_prog_make_${ac_make}_set=no
1219 fi
1220 rm -f conftestmake
1221 fi
1222 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
1223   echo "$ac_t""yes" 1>&6
1224   SET_MAKE=
1225 else
1226   echo "$ac_t""no" 1>&6
1227   SET_MAKE="MAKE=${MAKE-make}"
1228 fi
1229
1230
1231
1232 PACKAGE=$OL_PACKAGE
1233
1234 VERSION=$OL_VERSION
1235
1236 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
1237   { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
1238 fi
1239
1240
1241
1242 missing_dir=`cd $ac_aux_dir && pwd`
1243 echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
1244 echo "configure:1245: checking for working aclocal" >&5
1245 # Run test in a subshell; some versions of sh will print an error if
1246 # an executable is not found, even if stderr is redirected.
1247 # Redirect stdin to placate older versions of autoconf.  Sigh.
1248 if (aclocal --version) < /dev/null > /dev/null 2>&1; then
1249    ACLOCAL=aclocal
1250    echo "$ac_t""found" 1>&6
1251 else
1252    ACLOCAL="$missing_dir/missing aclocal"
1253    echo "$ac_t""missing" 1>&6
1254 fi
1255
1256 echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
1257 echo "configure:1258: checking for working autoconf" >&5
1258 # Run test in a subshell; some versions of sh will print an error if
1259 # an executable is not found, even if stderr is redirected.
1260 # Redirect stdin to placate older versions of autoconf.  Sigh.
1261 if (autoconf --version) < /dev/null > /dev/null 2>&1; then
1262    AUTOCONF=autoconf
1263    echo "$ac_t""found" 1>&6
1264 else
1265    AUTOCONF="$missing_dir/missing autoconf"
1266    echo "$ac_t""missing" 1>&6
1267 fi
1268
1269 echo $ac_n "checking for working automake""... $ac_c" 1>&6
1270 echo "configure:1271: checking for working automake" >&5
1271 # Run test in a subshell; some versions of sh will print an error if
1272 # an executable is not found, even if stderr is redirected.
1273 # Redirect stdin to placate older versions of autoconf.  Sigh.
1274 if (automake --version) < /dev/null > /dev/null 2>&1; then
1275    AUTOMAKE=automake
1276    echo "$ac_t""found" 1>&6
1277 else
1278    AUTOMAKE="$missing_dir/missing automake"
1279    echo "$ac_t""missing" 1>&6
1280 fi
1281
1282 echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
1283 echo "configure:1284: checking for working autoheader" >&5
1284 # Run test in a subshell; some versions of sh will print an error if
1285 # an executable is not found, even if stderr is redirected.
1286 # Redirect stdin to placate older versions of autoconf.  Sigh.
1287 if (autoheader --version) < /dev/null > /dev/null 2>&1; then
1288    AUTOHEADER=autoheader
1289    echo "$ac_t""found" 1>&6
1290 else
1291    AUTOHEADER="$missing_dir/missing autoheader"
1292    echo "$ac_t""missing" 1>&6
1293 fi
1294
1295 echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
1296 echo "configure:1297: checking for working makeinfo" >&5
1297 # Run test in a subshell; some versions of sh will print an error if
1298 # an executable is not found, even if stderr is redirected.
1299 # Redirect stdin to placate older versions of autoconf.  Sigh.
1300 if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
1301    MAKEINFO=makeinfo
1302    echo "$ac_t""found" 1>&6
1303 else
1304    MAKEINFO="$missing_dir/missing makeinfo"
1305    echo "$ac_t""missing" 1>&6
1306 fi
1307
1308 install_sh="$missing_dir/install-sh"
1309 test -f "$install_sh" || install_sh="$missing_dir/install.sh"
1310
1311 for ac_prog in gnutar gtar tar
1312 do
1313 # Extract the first word of "$ac_prog", so it can be a program name with args.
1314 set dummy $ac_prog; ac_word=$2
1315 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1316 echo "configure:1317: checking for $ac_word" >&5
1317 if eval "test \"\${ac_cv_prog_AMTAR+set}\" = set"; then
1318   echo $ac_n "(cached) $ac_c" 1>&6
1319 else
1320   if test -n "$AMTAR"; then
1321   ac_cv_prog_AMTAR="$AMTAR" # Let the user override the test.
1322 else
1323   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1324   ac_dummy="$PATH"
1325   for ac_dir in $ac_dummy; do
1326     test -z "$ac_dir" && ac_dir=.
1327     if test -f $ac_dir/$ac_word; then
1328       ac_cv_prog_AMTAR="$ac_prog"
1329       break
1330     fi
1331   done
1332   IFS="$ac_save_ifs"
1333 fi
1334 fi
1335 AMTAR="$ac_cv_prog_AMTAR"
1336 if test -n "$AMTAR"; then
1337   echo "$ac_t""$AMTAR" 1>&6
1338 else
1339   echo "$ac_t""no" 1>&6
1340 fi
1341
1342 test -n "$AMTAR" && break
1343 done
1344
1345
1346 AMTARFLAGS=
1347 if test -n "$AMTAR"; then
1348   if $SHELL -c "$AMTAR --version" > /dev/null 2>&1; then
1349         AMTARFLAGS=o
1350   fi
1351 fi
1352
1353 cat >> confdefs.h <<EOF
1354 #define OPENLDAP_PACKAGE "$PACKAGE"
1355 EOF
1356
1357 cat >> confdefs.h <<EOF
1358 #define OPENLDAP_VERSION "$VERSION"
1359 EOF
1360
1361
1362 cat >> confdefs.h <<EOF
1363 #define LDAP_VENDOR_VERSION $OL_API_INC
1364 EOF
1365
1366 cat >> confdefs.h <<EOF
1367 #define LDAP_VENDOR_VERSION_MAJOR $OL_MAJOR
1368 EOF
1369
1370 cat >> confdefs.h <<EOF
1371 #define LDAP_VENDOR_VERSION_MINOR $OL_MINOR
1372 EOF
1373
1374 cat >> confdefs.h <<EOF
1375 #define LDAP_VENDOR_VERSION_PATCH $OL_PATCH
1376 EOF
1377
1378
1379 OPENLDAP_LIBRELEASE=$OL_API_LIB_RELEASE
1380
1381 OPENLDAP_LIBVERSION=$OL_API_LIB_VERSION
1382
1383 OPENLDAP_RELEASE_DATE="$OL_RELEASE_DATE"
1384
1385
1386
1387 echo $ac_n "checking configure arguments""... $ac_c" 1>&6
1388 echo "configure:1389: checking configure arguments" >&5
1389
1390
1391 top_builddir=`pwd`
1392
1393 ldap_subdir="/openldap"
1394
1395 # Check whether --with-subdir or --without-subdir was given.
1396 if test "${with_subdir+set}" = set; then
1397   withval="$with_subdir"
1398   case "$withval" in
1399         no) ldap_subdir=""
1400                 ;;
1401         yes)
1402                 ;;
1403         /*|\\*)
1404                 ldap_subdir="$withval"
1405                 ;;
1406         *)
1407                 ldap_subdir="/$withval"
1408                 ;;
1409 esac
1410
1411 fi
1412
1413
1414 # OpenLDAP --enable-debug
1415         # Check whether --enable-debug or --disable-debug was given.
1416 if test "${enable_debug+set}" = set; then
1417   enableval="$enable_debug"
1418   
1419         ol_arg=invalid
1420         for ol_val in auto yes no ; do
1421                 if test "$enableval" = "$ol_val" ; then
1422                         ol_arg="$ol_val"
1423                 fi
1424         done
1425         if test "$ol_arg" = "invalid" ; then
1426                 { echo "configure: error: bad value $enableval for --enable-debug" 1>&2; exit 1; }
1427         fi
1428         ol_enable_debug="$ol_arg"
1429
1430 else
1431         ol_enable_debug="yes"
1432 fi
1433 # end --enable-debug
1434 # OpenLDAP --enable-dynamic
1435         # Check whether --enable-dynamic or --disable-dynamic was given.
1436 if test "${enable_dynamic+set}" = set; then
1437   enableval="$enable_dynamic"
1438   
1439         ol_arg=invalid
1440         for ol_val in auto yes no ; do
1441                 if test "$enableval" = "$ol_val" ; then
1442                         ol_arg="$ol_val"
1443                 fi
1444         done
1445         if test "$ol_arg" = "invalid" ; then
1446                 { echo "configure: error: bad value $enableval for --enable-dynamic" 1>&2; exit 1; }
1447         fi
1448         ol_enable_dynamic="$ol_arg"
1449
1450 else
1451         ol_enable_dynamic="no"
1452 fi
1453 # end --enable-dynamic
1454 # OpenLDAP --enable-syslog
1455         # Check whether --enable-syslog or --disable-syslog was given.
1456 if test "${enable_syslog+set}" = set; then
1457   enableval="$enable_syslog"
1458   
1459         ol_arg=invalid
1460         for ol_val in auto yes no ; do
1461                 if test "$enableval" = "$ol_val" ; then
1462                         ol_arg="$ol_val"
1463                 fi
1464         done
1465         if test "$ol_arg" = "invalid" ; then
1466                 { echo "configure: error: bad value $enableval for --enable-syslog" 1>&2; exit 1; }
1467         fi
1468         ol_enable_syslog="$ol_arg"
1469
1470 else
1471         ol_enable_syslog="auto"
1472 fi
1473 # end --enable-syslog
1474 # OpenLDAP --enable-proctitle
1475         # Check whether --enable-proctitle or --disable-proctitle was given.
1476 if test "${enable_proctitle+set}" = set; then
1477   enableval="$enable_proctitle"
1478   
1479         ol_arg=invalid
1480         for ol_val in auto yes no ; do
1481                 if test "$enableval" = "$ol_val" ; then
1482                         ol_arg="$ol_val"
1483                 fi
1484         done
1485         if test "$ol_arg" = "invalid" ; then
1486                 { echo "configure: error: bad value $enableval for --enable-proctitle" 1>&2; exit 1; }
1487         fi
1488         ol_enable_proctitle="$ol_arg"
1489
1490 else
1491         ol_enable_proctitle="yes"
1492 fi
1493 # end --enable-proctitle
1494 ol_enable_referrals=${ol_enable_referrals-no}
1495 ol_enable_kbind=${ol_enable_kbind-no}
1496 # OpenLDAP --enable-ipv6
1497         # Check whether --enable-ipv6 or --disable-ipv6 was given.
1498 if test "${enable_ipv6+set}" = set; then
1499   enableval="$enable_ipv6"
1500   
1501         ol_arg=invalid
1502         for ol_val in auto yes no ; do
1503                 if test "$enableval" = "$ol_val" ; then
1504                         ol_arg="$ol_val"
1505                 fi
1506         done
1507         if test "$ol_arg" = "invalid" ; then
1508                 { echo "configure: error: bad value $enableval for --enable-ipv6" 1>&2; exit 1; }
1509         fi
1510         ol_enable_ipv6="$ol_arg"
1511
1512 else
1513         ol_enable_ipv6="auto"
1514 fi
1515 # end --enable-ipv6
1516 # OpenLDAP --enable-local
1517         # Check whether --enable-local or --disable-local was given.
1518 if test "${enable_local+set}" = set; then
1519   enableval="$enable_local"
1520   
1521         ol_arg=invalid
1522         for ol_val in auto yes no ; do
1523                 if test "$enableval" = "$ol_val" ; then
1524                         ol_arg="$ol_val"
1525                 fi
1526         done
1527         if test "$ol_arg" = "invalid" ; then
1528                 { echo "configure: error: bad value $enableval for --enable-local" 1>&2; exit 1; }
1529         fi
1530         ol_enable_local="$ol_arg"
1531
1532 else
1533         ol_enable_local="auto"
1534 fi
1535 # end --enable-local
1536
1537
1538 # OpenLDAP --with-cyrus_sasl
1539         # Check whether --with-cyrus_sasl or --without-cyrus_sasl was given.
1540 if test "${with_cyrus_sasl+set}" = set; then
1541   withval="$with_cyrus_sasl"
1542   
1543         ol_arg=invalid
1544         for ol_val in auto yes no  ; do
1545                 if test "$withval" = "$ol_val" ; then
1546                         ol_arg="$ol_val"
1547                 fi
1548         done
1549         if test "$ol_arg" = "invalid" ; then
1550                 { echo "configure: error: bad value $withval for --with-cyrus_sasl" 1>&2; exit 1; }
1551         fi
1552         ol_with_cyrus_sasl="$ol_arg"
1553
1554 else
1555         ol_with_cyrus_sasl="auto"
1556 fi
1557 # end --with-cyrus_sasl
1558
1559 # OpenLDAP --with-fetch
1560         # Check whether --with-fetch or --without-fetch was given.
1561 if test "${with_fetch+set}" = set; then
1562   withval="$with_fetch"
1563   
1564         ol_arg=invalid
1565         for ol_val in auto yes no  ; do
1566                 if test "$withval" = "$ol_val" ; then
1567                         ol_arg="$ol_val"
1568                 fi
1569         done
1570         if test "$ol_arg" = "invalid" ; then
1571                 { echo "configure: error: bad value $withval for --with-fetch" 1>&2; exit 1; }
1572         fi
1573         ol_with_fetch="$ol_arg"
1574
1575 else
1576         ol_with_fetch="auto"
1577 fi
1578 # end --with-fetch
1579
1580 ol_with_kerberos=${ol_with_kerberos-auto}
1581 # OpenLDAP --with-threads
1582         # Check whether --with-threads or --without-threads was given.
1583 if test "${with_threads+set}" = set; then
1584   withval="$with_threads"
1585   
1586         ol_arg=invalid
1587         for ol_val in auto nt posix mach pth lwp yes no manual  ; do
1588                 if test "$withval" = "$ol_val" ; then
1589                         ol_arg="$ol_val"
1590                 fi
1591         done
1592         if test "$ol_arg" = "invalid" ; then
1593                 { echo "configure: error: bad value $withval for --with-threads" 1>&2; exit 1; }
1594         fi
1595         ol_with_threads="$ol_arg"
1596
1597 else
1598         ol_with_threads="auto"
1599 fi
1600 # end --with-threads
1601
1602 # OpenLDAP --with-tls
1603         # Check whether --with-tls or --without-tls was given.
1604 if test "${with_tls+set}" = set; then
1605   withval="$with_tls"
1606   
1607         ol_arg=invalid
1608         for ol_val in auto ssleay openssl yes no  ; do
1609                 if test "$withval" = "$ol_val" ; then
1610                         ol_arg="$ol_val"
1611                 fi
1612         done
1613         if test "$ol_arg" = "invalid" ; then
1614                 { echo "configure: error: bad value $withval for --with-tls" 1>&2; exit 1; }
1615         fi
1616         ol_with_tls="$ol_arg"
1617
1618 else
1619         ol_with_tls="auto"
1620 fi
1621 # end --with-tls
1622
1623 # OpenLDAP --with-yielding_select
1624         # Check whether --with-yielding_select or --without-yielding_select was given.
1625 if test "${with_yielding_select+set}" = set; then
1626   withval="$with_yielding_select"
1627   
1628         ol_arg=invalid
1629         for ol_val in auto yes no manual  ; do
1630                 if test "$withval" = "$ol_val" ; then
1631                         ol_arg="$ol_val"
1632                 fi
1633         done
1634         if test "$ol_arg" = "invalid" ; then
1635                 { echo "configure: error: bad value $withval for --with-yielding_select" 1>&2; exit 1; }
1636         fi
1637         ol_with_yielding_select="$ol_arg"
1638
1639 else
1640         ol_with_yielding_select="auto"
1641 fi
1642 # end --with-yielding_select
1643
1644 # OpenLDAP --with-multiple_precision
1645         # Check whether --with-multiple_precision or --without-multiple_precision was given.
1646 if test "${with_multiple_precision+set}" = set; then
1647   withval="$with_multiple_precision"
1648   
1649         ol_arg=invalid
1650         for ol_val in auto bignum gmp yes no  ; do
1651                 if test "$withval" = "$ol_val" ; then
1652                         ol_arg="$ol_val"
1653                 fi
1654         done
1655         if test "$ol_arg" = "invalid" ; then
1656                 { echo "configure: error: bad value $withval for --with-multiple_precision" 1>&2; exit 1; }
1657         fi
1658         ol_with_multiple_precision="$ol_arg"
1659
1660 else
1661         ol_with_multiple_precision="auto"
1662 fi
1663 # end --with-multiple_precision
1664
1665
1666
1667 # Check whether --with-xxslapdoptions or --without-xxslapdoptions was given.
1668 if test "${with_xxslapdoptions+set}" = set; then
1669   withval="$with_xxslapdoptions"
1670   :
1671 fi
1672
1673 # OpenLDAP --enable-slapd
1674         # Check whether --enable-slapd or --disable-slapd was given.
1675 if test "${enable_slapd+set}" = set; then
1676   enableval="$enable_slapd"
1677   
1678         ol_arg=invalid
1679         for ol_val in auto yes no ; do
1680                 if test "$enableval" = "$ol_val" ; then
1681                         ol_arg="$ol_val"
1682                 fi
1683         done
1684         if test "$ol_arg" = "invalid" ; then
1685                 { echo "configure: error: bad value $enableval for --enable-slapd" 1>&2; exit 1; }
1686         fi
1687         ol_enable_slapd="$ol_arg"
1688
1689 else
1690         ol_enable_slapd="yes"
1691 fi
1692 # end --enable-slapd
1693 # OpenLDAP --enable-aci
1694         # Check whether --enable-aci or --disable-aci was given.
1695 if test "${enable_aci+set}" = set; then
1696   enableval="$enable_aci"
1697   
1698         ol_arg=invalid
1699         for ol_val in auto yes no ; do
1700                 if test "$enableval" = "$ol_val" ; then
1701                         ol_arg="$ol_val"
1702                 fi
1703         done
1704         if test "$ol_arg" = "invalid" ; then
1705                 { echo "configure: error: bad value $enableval for --enable-aci" 1>&2; exit 1; }
1706         fi
1707         ol_enable_aci="$ol_arg"
1708
1709 else
1710         ol_enable_aci="no"
1711 fi
1712 # end --enable-aci
1713 # OpenLDAP --enable-cleartext
1714         # Check whether --enable-cleartext or --disable-cleartext was given.
1715 if test "${enable_cleartext+set}" = set; then
1716   enableval="$enable_cleartext"
1717   
1718         ol_arg=invalid
1719         for ol_val in auto yes no ; do
1720                 if test "$enableval" = "$ol_val" ; then
1721                         ol_arg="$ol_val"
1722                 fi
1723         done
1724         if test "$ol_arg" = "invalid" ; then
1725                 { echo "configure: error: bad value $enableval for --enable-cleartext" 1>&2; exit 1; }
1726         fi
1727         ol_enable_cleartext="$ol_arg"
1728
1729 else
1730         ol_enable_cleartext="yes"
1731 fi
1732 # end --enable-cleartext
1733 # OpenLDAP --enable-crypt
1734         # Check whether --enable-crypt or --disable-crypt was given.
1735 if test "${enable_crypt+set}" = set; then
1736   enableval="$enable_crypt"
1737   
1738         ol_arg=invalid
1739         for ol_val in auto yes no ; do
1740                 if test "$enableval" = "$ol_val" ; then
1741                         ol_arg="$ol_val"
1742                 fi
1743         done
1744         if test "$ol_arg" = "invalid" ; then
1745                 { echo "configure: error: bad value $enableval for --enable-crypt" 1>&2; exit 1; }
1746         fi
1747         ol_enable_crypt="$ol_arg"
1748
1749 else
1750         ol_enable_crypt="no"
1751 fi
1752 # end --enable-crypt
1753 # OpenLDAP --enable-lmpasswd
1754         # Check whether --enable-lmpasswd or --disable-lmpasswd was given.
1755 if test "${enable_lmpasswd+set}" = set; then
1756   enableval="$enable_lmpasswd"
1757   
1758         ol_arg=invalid
1759         for ol_val in auto yes no ; do
1760                 if test "$enableval" = "$ol_val" ; then
1761                         ol_arg="$ol_val"
1762                 fi
1763         done
1764         if test "$ol_arg" = "invalid" ; then
1765                 { echo "configure: error: bad value $enableval for --enable-lmpasswd" 1>&2; exit 1; }
1766         fi
1767         ol_enable_lmpasswd="$ol_arg"
1768
1769 else
1770         ol_enable_lmpasswd="no"
1771 fi
1772 # end --enable-lmpasswd
1773 # OpenLDAP --enable-spasswd
1774         # Check whether --enable-spasswd or --disable-spasswd was given.
1775 if test "${enable_spasswd+set}" = set; then
1776   enableval="$enable_spasswd"
1777   
1778         ol_arg=invalid
1779         for ol_val in auto yes no ; do
1780                 if test "$enableval" = "$ol_val" ; then
1781                         ol_arg="$ol_val"
1782                 fi
1783         done
1784         if test "$ol_arg" = "invalid" ; then
1785                 { echo "configure: error: bad value $enableval for --enable-spasswd" 1>&2; exit 1; }
1786         fi
1787         ol_enable_spasswd="$ol_arg"
1788
1789 else
1790         ol_enable_spasswd="no"
1791 fi
1792 # end --enable-spasswd
1793 # OpenLDAP --enable-modules
1794         # Check whether --enable-modules or --disable-modules was given.
1795 if test "${enable_modules+set}" = set; then
1796   enableval="$enable_modules"
1797   
1798         ol_arg=invalid
1799         for ol_val in auto yes no ; do
1800                 if test "$enableval" = "$ol_val" ; then
1801                         ol_arg="$ol_val"
1802                 fi
1803         done
1804         if test "$ol_arg" = "invalid" ; then
1805                 { echo "configure: error: bad value $enableval for --enable-modules" 1>&2; exit 1; }
1806         fi
1807         ol_enable_modules="$ol_arg"
1808
1809 else
1810         ol_enable_modules="no"
1811 fi
1812 # end --enable-modules
1813 ol_enable_multimaster=${ol_enable_multimaster-no}
1814 # OpenLDAP --enable-rewrite
1815         # Check whether --enable-rewrite or --disable-rewrite was given.
1816 if test "${enable_rewrite+set}" = set; then
1817   enableval="$enable_rewrite"
1818   
1819         ol_arg=invalid
1820         for ol_val in auto yes no ; do
1821                 if test "$enableval" = "$ol_val" ; then
1822                         ol_arg="$ol_val"
1823                 fi
1824         done
1825         if test "$ol_arg" = "invalid" ; then
1826                 { echo "configure: error: bad value $enableval for --enable-rewrite" 1>&2; exit 1; }
1827         fi
1828         ol_enable_rewrite="$ol_arg"
1829
1830 else
1831         ol_enable_rewrite="auto"
1832 fi
1833 # end --enable-rewrite
1834 # OpenLDAP --enable-rlookups
1835         # Check whether --enable-rlookups or --disable-rlookups was given.
1836 if test "${enable_rlookups+set}" = set; then
1837   enableval="$enable_rlookups"
1838   
1839         ol_arg=invalid
1840         for ol_val in auto yes no ; do
1841                 if test "$enableval" = "$ol_val" ; then
1842                         ol_arg="$ol_val"
1843                 fi
1844         done
1845         if test "$ol_arg" = "invalid" ; then
1846                 { echo "configure: error: bad value $enableval for --enable-rlookups" 1>&2; exit 1; }
1847         fi
1848         ol_enable_rlookups="$ol_arg"
1849
1850 else
1851         ol_enable_rlookups="no"
1852 fi
1853 # end --enable-rlookups
1854 # OpenLDAP --enable-slapi
1855         # Check whether --enable-slapi or --disable-slapi was given.
1856 if test "${enable_slapi+set}" = set; then
1857   enableval="$enable_slapi"
1858   
1859         ol_arg=invalid
1860         for ol_val in auto yes no ; do
1861                 if test "$enableval" = "$ol_val" ; then
1862                         ol_arg="$ol_val"
1863                 fi
1864         done
1865         if test "$ol_arg" = "invalid" ; then
1866                 { echo "configure: error: bad value $enableval for --enable-slapi" 1>&2; exit 1; }
1867         fi
1868         ol_enable_slapi="$ol_arg"
1869
1870 else
1871         ol_enable_slapi="no"
1872 fi
1873 # end --enable-slapi
1874 # OpenLDAP --enable-slp
1875         # Check whether --enable-slp or --disable-slp was given.
1876 if test "${enable_slp+set}" = set; then
1877   enableval="$enable_slp"
1878   
1879         ol_arg=invalid
1880         for ol_val in auto yes no ; do
1881                 if test "$enableval" = "$ol_val" ; then
1882                         ol_arg="$ol_val"
1883                 fi
1884         done
1885         if test "$ol_arg" = "invalid" ; then
1886                 { echo "configure: error: bad value $enableval for --enable-slp" 1>&2; exit 1; }
1887         fi
1888         ol_enable_slp="$ol_arg"
1889
1890 else
1891         ol_enable_slp="no"
1892 fi
1893 # end --enable-slp
1894 # OpenLDAP --enable-wrappers
1895         # Check whether --enable-wrappers or --disable-wrappers was given.
1896 if test "${enable_wrappers+set}" = set; then
1897   enableval="$enable_wrappers"
1898   
1899         ol_arg=invalid
1900         for ol_val in auto yes no ; do
1901                 if test "$enableval" = "$ol_val" ; then
1902                         ol_arg="$ol_val"
1903                 fi
1904         done
1905         if test "$ol_arg" = "invalid" ; then
1906                 { echo "configure: error: bad value $enableval for --enable-wrappers" 1>&2; exit 1; }
1907         fi
1908         ol_enable_wrappers="$ol_arg"
1909
1910 else
1911         ol_enable_wrappers="no"
1912 fi
1913 # end --enable-wrappers
1914
1915 Backends="bdb dnssrv hdb ldap ldbm meta monitor null \
1916         passwd perl relay shell sql"
1917
1918 # Check whether --with-xxslapbackends or --without-xxslapbackends was given.
1919 if test "${with_xxslapbackends+set}" = set; then
1920   withval="$with_xxslapbackends"
1921   :
1922 fi
1923
1924
1925 # OpenLDAP --enable-backends
1926         # Check whether --enable-backends or --disable-backends was given.
1927 if test "${enable_backends+set}" = set; then
1928   enableval="$enable_backends"
1929   
1930         ol_arg=invalid
1931         for ol_val in no yes mod ; do
1932                 if test "$enableval" = "$ol_val" ; then
1933                         ol_arg="$ol_val"
1934                 fi
1935         done
1936         if test "$ol_arg" = "invalid" ; then
1937                 { echo "configure: error: bad value $enableval for --enable-backends" 1>&2; exit 1; }
1938         fi
1939         ol_enable_backends="$ol_arg"
1940
1941 fi
1942 # end --enable-backends
1943 test -n "$ol_enable_backends" && ol_dflt_backends="$ol_enable_backends"
1944 # OpenLDAP --enable-bdb
1945         # Check whether --enable-bdb or --disable-bdb was given.
1946 if test "${enable_bdb+set}" = set; then
1947   enableval="$enable_bdb"
1948   
1949         ol_arg=invalid
1950         for ol_val in no yes mod ; do
1951                 if test "$enableval" = "$ol_val" ; then
1952                         ol_arg="$ol_val"
1953                 fi
1954         done
1955         if test "$ol_arg" = "invalid" ; then
1956                 { echo "configure: error: bad value $enableval for --enable-bdb" 1>&2; exit 1; }
1957         fi
1958         ol_enable_bdb="$ol_arg"
1959
1960 else
1961         ol_enable_bdb="${ol_dflt_backends-yes}"
1962 fi
1963 # end --enable-bdb
1964 # OpenLDAP --enable-dnssrv
1965         # Check whether --enable-dnssrv or --disable-dnssrv was given.
1966 if test "${enable_dnssrv+set}" = set; then
1967   enableval="$enable_dnssrv"
1968   
1969         ol_arg=invalid
1970         for ol_val in no yes mod ; do
1971                 if test "$enableval" = "$ol_val" ; then
1972                         ol_arg="$ol_val"
1973                 fi
1974         done
1975         if test "$ol_arg" = "invalid" ; then
1976                 { echo "configure: error: bad value $enableval for --enable-dnssrv" 1>&2; exit 1; }
1977         fi
1978         ol_enable_dnssrv="$ol_arg"
1979
1980 else
1981         ol_enable_dnssrv="${ol_dflt_backends-no}"
1982 fi
1983 # end --enable-dnssrv
1984 # OpenLDAP --enable-hdb
1985         # Check whether --enable-hdb or --disable-hdb was given.
1986 if test "${enable_hdb+set}" = set; then
1987   enableval="$enable_hdb"
1988   
1989         ol_arg=invalid
1990         for ol_val in no yes mod ; do
1991                 if test "$enableval" = "$ol_val" ; then
1992                         ol_arg="$ol_val"
1993                 fi
1994         done
1995         if test "$ol_arg" = "invalid" ; then
1996                 { echo "configure: error: bad value $enableval for --enable-hdb" 1>&2; exit 1; }
1997         fi
1998         ol_enable_hdb="$ol_arg"
1999
2000 else
2001         ol_enable_hdb="${ol_dflt_backends-yes}"
2002 fi
2003 # end --enable-hdb
2004 # OpenLDAP --enable-ldap
2005         # Check whether --enable-ldap or --disable-ldap was given.
2006 if test "${enable_ldap+set}" = set; then
2007   enableval="$enable_ldap"
2008   
2009         ol_arg=invalid
2010         for ol_val in no yes mod ; do
2011                 if test "$enableval" = "$ol_val" ; then
2012                         ol_arg="$ol_val"
2013                 fi
2014         done
2015         if test "$ol_arg" = "invalid" ; then
2016                 { echo "configure: error: bad value $enableval for --enable-ldap" 1>&2; exit 1; }
2017         fi
2018         ol_enable_ldap="$ol_arg"
2019
2020 else
2021         ol_enable_ldap="${ol_dflt_backends-no}"
2022 fi
2023 # end --enable-ldap
2024 # OpenLDAP --enable-ldbm
2025         # Check whether --enable-ldbm or --disable-ldbm was given.
2026 if test "${enable_ldbm+set}" = set; then
2027   enableval="$enable_ldbm"
2028   
2029         ol_arg=invalid
2030         for ol_val in no yes mod ; do
2031                 if test "$enableval" = "$ol_val" ; then
2032                         ol_arg="$ol_val"
2033                 fi
2034         done
2035         if test "$ol_arg" = "invalid" ; then
2036                 { echo "configure: error: bad value $enableval for --enable-ldbm" 1>&2; exit 1; }
2037         fi
2038         ol_enable_ldbm="$ol_arg"
2039
2040 else
2041         ol_enable_ldbm="${ol_dflt_backends-no}"
2042 fi
2043 # end --enable-ldbm
2044 # OpenLDAP --with-ldbm_api
2045         # Check whether --with-ldbm_api or --without-ldbm_api was given.
2046 if test "${with_ldbm_api+set}" = set; then
2047   withval="$with_ldbm_api"
2048   
2049         ol_arg=invalid
2050         for ol_val in auto berkeley bcompat mdbm gdbm ; do
2051                 if test "$withval" = "$ol_val" ; then
2052                         ol_arg="$ol_val"
2053                 fi
2054         done
2055         if test "$ol_arg" = "invalid" ; then
2056                 { echo "configure: error: bad value $withval for --with-ldbm_api" 1>&2; exit 1; }
2057         fi
2058         ol_with_ldbm_api="$ol_arg"
2059
2060 else
2061         ol_with_ldbm_api="auto"
2062 fi
2063 # end --with-ldbm_api
2064
2065 # OpenLDAP --with-ldbm_type
2066         # Check whether --with-ldbm_type or --without-ldbm_type was given.
2067 if test "${with_ldbm_type+set}" = set; then
2068   withval="$with_ldbm_type"
2069   
2070         ol_arg=invalid
2071         for ol_val in auto btree hash ; do
2072                 if test "$withval" = "$ol_val" ; then
2073                         ol_arg="$ol_val"
2074                 fi
2075         done
2076         if test "$ol_arg" = "invalid" ; then
2077                 { echo "configure: error: bad value $withval for --with-ldbm_type" 1>&2; exit 1; }
2078         fi
2079         ol_with_ldbm_type="$ol_arg"
2080
2081 else
2082         ol_with_ldbm_type="auto"
2083 fi
2084 # end --with-ldbm_type
2085
2086 # OpenLDAP --enable-meta
2087         # Check whether --enable-meta or --disable-meta was given.
2088 if test "${enable_meta+set}" = set; then
2089   enableval="$enable_meta"
2090   
2091         ol_arg=invalid
2092         for ol_val in no yes mod ; do
2093                 if test "$enableval" = "$ol_val" ; then
2094                         ol_arg="$ol_val"
2095                 fi
2096         done
2097         if test "$ol_arg" = "invalid" ; then
2098                 { echo "configure: error: bad value $enableval for --enable-meta" 1>&2; exit 1; }
2099         fi
2100         ol_enable_meta="$ol_arg"
2101
2102 else
2103         ol_enable_meta="${ol_dflt_backends-no}"
2104 fi
2105 # end --enable-meta
2106 # OpenLDAP --enable-monitor
2107         # Check whether --enable-monitor or --disable-monitor was given.
2108 if test "${enable_monitor+set}" = set; then
2109   enableval="$enable_monitor"
2110   
2111         ol_arg=invalid
2112         for ol_val in no yes mod ; do
2113                 if test "$enableval" = "$ol_val" ; then
2114                         ol_arg="$ol_val"
2115                 fi
2116         done
2117         if test "$ol_arg" = "invalid" ; then
2118                 { echo "configure: error: bad value $enableval for --enable-monitor" 1>&2; exit 1; }
2119         fi
2120         ol_enable_monitor="$ol_arg"
2121
2122 else
2123         ol_enable_monitor="${ol_dflt_backends-yes}"
2124 fi
2125 # end --enable-monitor
2126 # OpenLDAP --enable-null
2127         # Check whether --enable-null or --disable-null was given.
2128 if test "${enable_null+set}" = set; then
2129   enableval="$enable_null"
2130   
2131         ol_arg=invalid
2132         for ol_val in no yes mod ; do
2133                 if test "$enableval" = "$ol_val" ; then
2134                         ol_arg="$ol_val"
2135                 fi
2136         done
2137         if test "$ol_arg" = "invalid" ; then
2138                 { echo "configure: error: bad value $enableval for --enable-null" 1>&2; exit 1; }
2139         fi
2140         ol_enable_null="$ol_arg"
2141
2142 else
2143         ol_enable_null="${ol_dflt_backends-no}"
2144 fi
2145 # end --enable-null
2146 # OpenLDAP --enable-passwd
2147         # Check whether --enable-passwd or --disable-passwd was given.
2148 if test "${enable_passwd+set}" = set; then
2149   enableval="$enable_passwd"
2150   
2151         ol_arg=invalid
2152         for ol_val in no yes mod ; do
2153                 if test "$enableval" = "$ol_val" ; then
2154                         ol_arg="$ol_val"
2155                 fi
2156         done
2157         if test "$ol_arg" = "invalid" ; then
2158                 { echo "configure: error: bad value $enableval for --enable-passwd" 1>&2; exit 1; }
2159         fi
2160         ol_enable_passwd="$ol_arg"
2161
2162 else
2163         ol_enable_passwd="${ol_dflt_backends-no}"
2164 fi
2165 # end --enable-passwd
2166 # OpenLDAP --enable-perl
2167         # Check whether --enable-perl or --disable-perl was given.
2168 if test "${enable_perl+set}" = set; then
2169   enableval="$enable_perl"
2170   
2171         ol_arg=invalid
2172         for ol_val in no yes mod ; do
2173                 if test "$enableval" = "$ol_val" ; then
2174                         ol_arg="$ol_val"
2175                 fi
2176         done
2177         if test "$ol_arg" = "invalid" ; then
2178                 { echo "configure: error: bad value $enableval for --enable-perl" 1>&2; exit 1; }
2179         fi
2180         ol_enable_perl="$ol_arg"
2181
2182 else
2183         ol_enable_perl="${ol_dflt_backends-no}"
2184 fi
2185 # end --enable-perl
2186 # OpenLDAP --enable-relay
2187         # Check whether --enable-relay or --disable-relay was given.
2188 if test "${enable_relay+set}" = set; then
2189   enableval="$enable_relay"
2190   
2191         ol_arg=invalid
2192         for ol_val in no yes mod ; do
2193                 if test "$enableval" = "$ol_val" ; then
2194                         ol_arg="$ol_val"
2195                 fi
2196         done
2197         if test "$ol_arg" = "invalid" ; then
2198                 { echo "configure: error: bad value $enableval for --enable-relay" 1>&2; exit 1; }
2199         fi
2200         ol_enable_relay="$ol_arg"
2201
2202 else
2203         ol_enable_relay="${ol_dflt_backends-yes}"
2204 fi
2205 # end --enable-relay
2206 # OpenLDAP --enable-shell
2207         # Check whether --enable-shell or --disable-shell was given.
2208 if test "${enable_shell+set}" = set; then
2209   enableval="$enable_shell"
2210   
2211         ol_arg=invalid
2212         for ol_val in no yes mod ; do
2213                 if test "$enableval" = "$ol_val" ; then
2214                         ol_arg="$ol_val"
2215                 fi
2216         done
2217         if test "$ol_arg" = "invalid" ; then
2218                 { echo "configure: error: bad value $enableval for --enable-shell" 1>&2; exit 1; }
2219         fi
2220         ol_enable_shell="$ol_arg"
2221
2222 else
2223         ol_enable_shell="${ol_dflt_backends-no}"
2224 fi
2225 # end --enable-shell
2226 # OpenLDAP --enable-sql
2227         # Check whether --enable-sql or --disable-sql was given.
2228 if test "${enable_sql+set}" = set; then
2229   enableval="$enable_sql"
2230   
2231         ol_arg=invalid
2232         for ol_val in no yes mod ; do
2233                 if test "$enableval" = "$ol_val" ; then
2234                         ol_arg="$ol_val"
2235                 fi
2236         done
2237         if test "$ol_arg" = "invalid" ; then
2238                 { echo "configure: error: bad value $enableval for --enable-sql" 1>&2; exit 1; }
2239         fi
2240         ol_enable_sql="$ol_arg"
2241
2242 else
2243         ol_enable_sql="${ol_dflt_backends-no}"
2244 fi
2245 # end --enable-sql
2246
2247 Overlays="accesslog denyop dyngroup dynlist glue lastmod ppolicy proxycache \
2248         refint retcode rwm syncprov translucent unique"
2249
2250 # Check whether --with-xxslapoverlays or --without-xxslapoverlays was given.
2251 if test "${with_xxslapoverlays+set}" = set; then
2252   withval="$with_xxslapoverlays"
2253   :
2254 fi
2255
2256
2257 # OpenLDAP --enable-overlays
2258         # Check whether --enable-overlays or --disable-overlays was given.
2259 if test "${enable_overlays+set}" = set; then
2260   enableval="$enable_overlays"
2261   
2262         ol_arg=invalid
2263         for ol_val in no yes mod ; do
2264                 if test "$enableval" = "$ol_val" ; then
2265                         ol_arg="$ol_val"
2266                 fi
2267         done
2268         if test "$ol_arg" = "invalid" ; then
2269                 { echo "configure: error: bad value $enableval for --enable-overlays" 1>&2; exit 1; }
2270         fi
2271         ol_enable_overlays="$ol_arg"
2272
2273 fi
2274 # end --enable-overlays
2275 test -n "$ol_enable_overlays" && ol_dflt_overlays="$ol_enable_overlays"
2276 # OpenLDAP --enable-accesslog
2277         # Check whether --enable-accesslog or --disable-accesslog was given.
2278 if test "${enable_accesslog+set}" = set; then
2279   enableval="$enable_accesslog"
2280   
2281         ol_arg=invalid
2282         for ol_val in no yes mod ; do
2283                 if test "$enableval" = "$ol_val" ; then
2284                         ol_arg="$ol_val"
2285                 fi
2286         done
2287         if test "$ol_arg" = "invalid" ; then
2288                 { echo "configure: error: bad value $enableval for --enable-accesslog" 1>&2; exit 1; }
2289         fi
2290         ol_enable_accesslog="$ol_arg"
2291
2292 else
2293         ol_enable_accesslog="${ol_dflt_overlays-no}"
2294 fi
2295 # end --enable-accesslog
2296
2297 # OpenLDAP --enable-denyop
2298         # Check whether --enable-denyop or --disable-denyop was given.
2299 if test "${enable_denyop+set}" = set; then
2300   enableval="$enable_denyop"
2301   
2302         ol_arg=invalid
2303         for ol_val in no yes mod ; do
2304                 if test "$enableval" = "$ol_val" ; then
2305                         ol_arg="$ol_val"
2306                 fi
2307         done
2308         if test "$ol_arg" = "invalid" ; then
2309                 { echo "configure: error: bad value $enableval for --enable-denyop" 1>&2; exit 1; }
2310         fi
2311         ol_enable_denyop="$ol_arg"
2312
2313 else
2314         ol_enable_denyop="${ol_dflt_overlays-no}"
2315 fi
2316 # end --enable-denyop
2317
2318 # OpenLDAP --enable-dyngroup
2319         # Check whether --enable-dyngroup or --disable-dyngroup was given.
2320 if test "${enable_dyngroup+set}" = set; then
2321   enableval="$enable_dyngroup"
2322   
2323         ol_arg=invalid
2324         for ol_val in no yes mod ; do
2325                 if test "$enableval" = "$ol_val" ; then
2326                         ol_arg="$ol_val"
2327                 fi
2328         done
2329         if test "$ol_arg" = "invalid" ; then
2330                 { echo "configure: error: bad value $enableval for --enable-dyngroup" 1>&2; exit 1; }
2331         fi
2332         ol_enable_dyngroup="$ol_arg"
2333
2334 else
2335         ol_enable_dyngroup="${ol_dflt_overlays-no}"
2336 fi
2337 # end --enable-dyngroup
2338
2339 # OpenLDAP --enable-dynlist
2340         # Check whether --enable-dynlist or --disable-dynlist was given.
2341 if test "${enable_dynlist+set}" = set; then
2342   enableval="$enable_dynlist"
2343   
2344         ol_arg=invalid
2345         for ol_val in no yes mod ; do
2346                 if test "$enableval" = "$ol_val" ; then
2347                         ol_arg="$ol_val"
2348                 fi
2349         done
2350         if test "$ol_arg" = "invalid" ; then
2351                 { echo "configure: error: bad value $enableval for --enable-dynlist" 1>&2; exit 1; }
2352         fi
2353         ol_enable_dynlist="$ol_arg"
2354
2355 else
2356         ol_enable_dynlist="${ol_dflt_overlays-no}"
2357 fi
2358 # end --enable-dynlist
2359
2360 # OpenLDAP --enable-glue
2361         # Check whether --enable-glue or --disable-glue was given.
2362 if test "${enable_glue+set}" = set; then
2363   enableval="$enable_glue"
2364   
2365         ol_arg=invalid
2366         for ol_val in no yes mod ; do
2367                 if test "$enableval" = "$ol_val" ; then
2368                         ol_arg="$ol_val"
2369                 fi
2370         done
2371         if test "$ol_arg" = "invalid" ; then
2372                 { echo "configure: error: bad value $enableval for --enable-glue" 1>&2; exit 1; }
2373         fi
2374         ol_enable_glue="$ol_arg"
2375
2376 else
2377         ol_enable_glue="${ol_dflt_overlays-yes}"
2378 fi
2379 # end --enable-glue
2380
2381 # OpenLDAP --enable-lastmod
2382         # Check whether --enable-lastmod or --disable-lastmod was given.
2383 if test "${enable_lastmod+set}" = set; then
2384   enableval="$enable_lastmod"
2385   
2386         ol_arg=invalid
2387         for ol_val in no yes mod ; do
2388                 if test "$enableval" = "$ol_val" ; then
2389                         ol_arg="$ol_val"
2390                 fi
2391         done
2392         if test "$ol_arg" = "invalid" ; then
2393                 { echo "configure: error: bad value $enableval for --enable-lastmod" 1>&2; exit 1; }
2394         fi
2395         ol_enable_lastmod="$ol_arg"
2396
2397 else
2398         ol_enable_lastmod="${ol_dflt_overlays-no}"
2399 fi
2400 # end --enable-lastmod
2401
2402 # OpenLDAP --enable-ppolicy
2403         # Check whether --enable-ppolicy or --disable-ppolicy was given.
2404 if test "${enable_ppolicy+set}" = set; then
2405   enableval="$enable_ppolicy"
2406   
2407         ol_arg=invalid
2408         for ol_val in no yes mod ; do
2409                 if test "$enableval" = "$ol_val" ; then
2410                         ol_arg="$ol_val"
2411                 fi
2412         done
2413         if test "$ol_arg" = "invalid" ; then
2414                 { echo "configure: error: bad value $enableval for --enable-ppolicy" 1>&2; exit 1; }
2415         fi
2416         ol_enable_ppolicy="$ol_arg"
2417
2418 else
2419         ol_enable_ppolicy="${ol_dflt_overlays-no}"
2420 fi
2421 # end --enable-ppolicy
2422
2423 # OpenLDAP --enable-proxycache
2424         # Check whether --enable-proxycache or --disable-proxycache was given.
2425 if test "${enable_proxycache+set}" = set; then
2426   enableval="$enable_proxycache"
2427   
2428         ol_arg=invalid
2429         for ol_val in no yes mod ; do
2430                 if test "$enableval" = "$ol_val" ; then
2431                         ol_arg="$ol_val"
2432                 fi
2433         done
2434         if test "$ol_arg" = "invalid" ; then
2435                 { echo "configure: error: bad value $enableval for --enable-proxycache" 1>&2; exit 1; }
2436         fi
2437         ol_enable_proxycache="$ol_arg"
2438
2439 else
2440         ol_enable_proxycache="${ol_dflt_overlays-no}"
2441 fi
2442 # end --enable-proxycache
2443
2444 # OpenLDAP --enable-refint
2445         # Check whether --enable-refint or --disable-refint was given.
2446 if test "${enable_refint+set}" = set; then
2447   enableval="$enable_refint"
2448   
2449         ol_arg=invalid
2450         for ol_val in no yes mod ; do
2451                 if test "$enableval" = "$ol_val" ; then
2452                         ol_arg="$ol_val"
2453                 fi
2454         done
2455         if test "$ol_arg" = "invalid" ; then
2456                 { echo "configure: error: bad value $enableval for --enable-refint" 1>&2; exit 1; }
2457         fi
2458         ol_enable_refint="$ol_arg"
2459
2460 else
2461         ol_enable_refint="${ol_dflt_overlays-no}"
2462 fi
2463 # end --enable-refint
2464
2465 # OpenLDAP --enable-retcode
2466         # Check whether --enable-retcode or --disable-retcode was given.
2467 if test "${enable_retcode+set}" = set; then
2468   enableval="$enable_retcode"
2469   
2470         ol_arg=invalid
2471         for ol_val in no yes mod ; do
2472                 if test "$enableval" = "$ol_val" ; then
2473                         ol_arg="$ol_val"
2474                 fi
2475         done
2476         if test "$ol_arg" = "invalid" ; then
2477                 { echo "configure: error: bad value $enableval for --enable-retcode" 1>&2; exit 1; }
2478         fi
2479         ol_enable_retcode="$ol_arg"
2480
2481 else
2482         ol_enable_retcode="${ol_dflt_overlays-no}"
2483 fi
2484 # end --enable-retcode
2485
2486 # OpenLDAP --enable-rwm
2487         # Check whether --enable-rwm or --disable-rwm was given.
2488 if test "${enable_rwm+set}" = set; then
2489   enableval="$enable_rwm"
2490   
2491         ol_arg=invalid
2492         for ol_val in no yes mod ; do
2493                 if test "$enableval" = "$ol_val" ; then
2494                         ol_arg="$ol_val"
2495                 fi
2496         done
2497         if test "$ol_arg" = "invalid" ; then
2498                 { echo "configure: error: bad value $enableval for --enable-rwm" 1>&2; exit 1; }
2499         fi
2500         ol_enable_rwm="$ol_arg"
2501
2502 else
2503         ol_enable_rwm="${ol_dflt_overlays-no}"
2504 fi
2505 # end --enable-rwm
2506
2507 # OpenLDAP --enable-syncprov
2508         # Check whether --enable-syncprov or --disable-syncprov was given.
2509 if test "${enable_syncprov+set}" = set; then
2510   enableval="$enable_syncprov"
2511   
2512         ol_arg=invalid
2513         for ol_val in no yes mod ; do
2514                 if test "$enableval" = "$ol_val" ; then
2515                         ol_arg="$ol_val"
2516                 fi
2517         done
2518         if test "$ol_arg" = "invalid" ; then
2519                 { echo "configure: error: bad value $enableval for --enable-syncprov" 1>&2; exit 1; }
2520         fi
2521         ol_enable_syncprov="$ol_arg"
2522
2523 else
2524         ol_enable_syncprov="${ol_dflt_overlays-yes}"
2525 fi
2526 # end --enable-syncprov
2527
2528 # OpenLDAP --enable-translucent
2529         # Check whether --enable-translucent or --disable-translucent was given.
2530 if test "${enable_translucent+set}" = set; then
2531   enableval="$enable_translucent"
2532   
2533         ol_arg=invalid
2534         for ol_val in no yes mod ; do
2535                 if test "$enableval" = "$ol_val" ; then
2536                         ol_arg="$ol_val"
2537                 fi
2538         done
2539         if test "$ol_arg" = "invalid" ; then
2540                 { echo "configure: error: bad value $enableval for --enable-translucent" 1>&2; exit 1; }
2541         fi
2542         ol_enable_translucent="$ol_arg"
2543
2544 else
2545         ol_enable_translucent="${ol_dflt_overlays-no}"
2546 fi
2547 # end --enable-translucent
2548
2549 # OpenLDAP --enable-unique
2550         # Check whether --enable-unique or --disable-unique was given.
2551 if test "${enable_unique+set}" = set; then
2552   enableval="$enable_unique"
2553   
2554         ol_arg=invalid
2555         for ol_val in no yes mod ; do
2556                 if test "$enableval" = "$ol_val" ; then
2557                         ol_arg="$ol_val"
2558                 fi
2559         done
2560         if test "$ol_arg" = "invalid" ; then
2561                 { echo "configure: error: bad value $enableval for --enable-unique" 1>&2; exit 1; }
2562         fi
2563         ol_enable_unique="$ol_arg"
2564
2565 else
2566         ol_enable_unique="${ol_dflt_overlays-no}"
2567 fi
2568 # end --enable-unique
2569
2570
2571
2572 # Check whether --with-xxslurpdoptions or --without-xxslurpdoptions was given.
2573 if test "${with_xxslurpdoptions+set}" = set; then
2574   withval="$with_xxslurpdoptions"
2575   :
2576 fi
2577
2578 # OpenLDAP --enable-slurpd
2579         # Check whether --enable-slurpd or --disable-slurpd was given.
2580 if test "${enable_slurpd+set}" = set; then
2581   enableval="$enable_slurpd"
2582   
2583         ol_arg=invalid
2584         for ol_val in auto yes no ; do
2585                 if test "$enableval" = "$ol_val" ; then
2586                         ol_arg="$ol_val"
2587                 fi
2588         done
2589         if test "$ol_arg" = "invalid" ; then
2590                 { echo "configure: error: bad value $enableval for --enable-slurpd" 1>&2; exit 1; }
2591         fi
2592         ol_enable_slurpd="$ol_arg"
2593
2594 else
2595         ol_enable_slurpd="auto"
2596 fi
2597 # end --enable-slurpd
2598
2599 # Check whether --with-xxliboptions or --without-xxliboptions was given.
2600 if test "${with_xxliboptions+set}" = set; then
2601   withval="$with_xxliboptions"
2602   :
2603 fi
2604
2605 # Check whether --enable-static or --disable-static was given.
2606 if test "${enable_static+set}" = set; then
2607   enableval="$enable_static"
2608   p=${PACKAGE-default}
2609 case $enableval in
2610 yes) enable_static=yes ;;
2611 no) enable_static=no ;;
2612 *)
2613   enable_static=no
2614   # Look at the argument we got.  We use all the common list separators.
2615   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2616   for pkg in $enableval; do
2617     if test "X$pkg" = "X$p"; then
2618       enable_static=yes
2619     fi
2620   done
2621   IFS="$ac_save_ifs"
2622   ;;
2623 esac
2624 else
2625   enable_static=yes
2626 fi
2627
2628 # Check whether --enable-shared or --disable-shared was given.
2629 if test "${enable_shared+set}" = set; then
2630   enableval="$enable_shared"
2631   p=${PACKAGE-default}
2632 case $enableval in
2633 yes) enable_shared=yes ;;
2634 no) enable_shared=no ;;
2635 *)
2636   enable_shared=no
2637   # Look at the argument we got.  We use all the common list separators.
2638   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2639   for pkg in $enableval; do
2640     if test "X$pkg" = "X$p"; then
2641       enable_shared=yes
2642     fi
2643   done
2644   IFS="$ac_save_ifs"
2645   ;;
2646 esac
2647 else
2648   enable_shared=yes
2649 fi
2650
2651
2652
2653 # validate options
2654 if test $ol_enable_slapd = no ; then
2655                 if test $ol_enable_slapi = yes ; then
2656                 echo "configure: warning: slapd disabled, ignoring --enable-slapi argument" 1>&2
2657         fi
2658         case "$ol_enable_backends" in yes | mod)
2659                 echo "configure: warning: slapd disabled, ignoring --enable-backends argument" 1>&2
2660         esac
2661         for i in $Backends; do
2662                 eval "ol_tmp=\$ol_enable_$i"
2663                 if test $ol_tmp != no ; then
2664                         echo "configure: warning: slapd disabled, ignoring --enable-$i argument" 1>&2
2665                         eval "ol_enable_$i=no"
2666                 fi
2667         done
2668         if test $ol_enable_modules = yes ; then
2669                 echo "configure: warning: slapd disabled, ignoring --enable-modules argument" 1>&2
2670         fi
2671         if test $ol_enable_multimaster = yes ; then
2672                 echo "configure: warning: slapd disabled, ignoring --enable-multimaster argument" 1>&2
2673         fi
2674         if test $ol_enable_wrappers = yes ; then
2675                 echo "configure: warning: slapd disabled, ignoring --enable-wrappers argument" 1>&2
2676         fi
2677         if test $ol_enable_rlookups = yes ; then
2678                 echo "configure: warning: slapd disabled, ignoring --enable-rlookups argument" 1>&2
2679         fi
2680         if test $ol_enable_aci = yes ; then
2681                 echo "configure: warning: slapd disabled, ignoring --enable-aci argument" 1>&2
2682         fi
2683         if test $ol_with_ldbm_api != auto ; then
2684                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-api argument" 1>&2
2685         fi
2686         if test $ol_with_ldbm_type != auto ; then
2687                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-type argument" 1>&2
2688         fi
2689         if test $ol_enable_slurpd = yes ; then
2690                 { echo "configure: error: slurpd requires slapd" 1>&2; exit 1; }
2691         fi
2692         if test $ol_enable_rewrite = yes ; then
2693                 echo "configure: warning: slapd disabled, ignoring --enable-rewrite argument" 1>&2
2694         fi
2695                 case "$ol_enable_overlays" in yes | mod)
2696                 echo "configure: warning: slapd disabled, ignoring --enable-overlays argument" 1>&2
2697         esac
2698         for i in $Overlays; do
2699                 eval "ol_tmp=\$ol_enable_$i"
2700                 if test $ol_tmp != no ; then
2701                         echo "configure: warning: slapd disabled, ignoring --enable-$i argument" 1>&2
2702                         eval "ol_enable_$i=no"
2703                 fi
2704         done
2705
2706         # force settings to no
2707         ol_enable_slapi=no
2708
2709         ol_enable_backends=
2710         ol_enable_overlays=
2711         ol_enable_modules=no
2712         ol_enable_multimaster=no
2713         ol_enable_rlookups=no
2714         ol_enable_aci=no
2715         ol_enable_wrappers=no
2716
2717         ol_with_ldbm_api=no
2718         ol_with_ldbm_type=no
2719
2720         ol_enable_slurpd=no
2721
2722         ol_enable_rewrite=no
2723
2724 elif test $ol_enable_ldbm = no ; then
2725         
2726         if test $ol_with_ldbm_api != auto ; then
2727                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-api argument" 1>&2
2728         fi
2729
2730         if test $ol_with_ldbm_type != auto ; then
2731                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-type argument" 1>&2
2732         fi
2733
2734         if test $ol_enable_modules != yes -a \
2735                 $ol_enable_bdb = no -a \
2736                 $ol_enable_dnssrv = no -a \
2737                 $ol_enable_hdb = no -a \
2738                 $ol_enable_ldap = no -a \
2739                 $ol_enable_meta = no -a \
2740                 $ol_enable_monitor = no -a \
2741                 $ol_enable_null = no -a \
2742                 $ol_enable_passwd = no -a \
2743                 $ol_enable_perl = no -a \
2744                 $ol_enable_relay = no -a \
2745                 $ol_enable_shell = no -a \
2746                 $ol_enable_sql = no ; then
2747
2748                 if test $ol_enable_slapd = yes ; then
2749                         { echo "configure: error: slapd requires a backend" 1>&2; exit 1; }
2750                 else
2751                         echo "configure: warning: skipping slapd, no backend specified" 1>&2
2752                         ol_enable_slapd=no
2753                 fi
2754         fi
2755
2756         ol_with_ldbm_api=no
2757         ol_with_ldbm_type=no
2758
2759         if test $ol_enable_bdb != no -o $ol_enable_hdb != no; then
2760                 ol_with_ldbm_api=berkeley
2761         fi
2762
2763 else
2764                 if test $ol_with_ldbm_api = gdbm -a \
2765                 $ol_with_ldbm_type = btree ; then
2766                 { echo "configure: error: GDBM only supports LDBM type hash" 1>&2; exit 1; }
2767         fi
2768         if test $ol_with_ldbm_api = mdbm -a \
2769                 $ol_with_ldbm_type = btree ; then
2770                 { echo "configure: error: MDBM only supports LDBM type hash" 1>&2; exit 1; }
2771         fi
2772         if test $ol_with_ldbm_api = ndbm -a \
2773                 $ol_with_ldbm_type = btree ; then
2774                 { echo "configure: error: NDBM only supports LDBM type hash" 1>&2; exit 1; }
2775         fi
2776
2777         if test $ol_enable_bdb != no -o $ol_enable_hdb != no ; then
2778                 if test $ol_with_ldbm_api = auto ; then
2779                         ol_with_ldbm_api=berkeley
2780                 elif test $ol_with_ldbm_api != berkeley ; then
2781                         { echo "configure: error: LDBM API not compatible with BDB/HDB" 1>&2; exit 1; }
2782                 fi
2783         fi
2784 fi
2785
2786 if test $ol_enable_meta = yes -a $ol_enable_ldap = no ; then
2787         { echo "configure: error: --enable-meta requires --enable-ldap" 1>&2; exit 1; }
2788 fi
2789
2790 if test $ol_enable_slurpd = yes ; then
2791                 if test $ol_with_threads = no ; then
2792                 { echo "configure: error: slurpd requires threads" 1>&2; exit 1; }
2793         fi
2794 fi
2795
2796 if test $ol_enable_lmpasswd = yes ; then
2797         if test $ol_with_tls = no ; then
2798                 { echo "configure: error: LAN Manager passwords require OpenSSL" 1>&2; exit 1; }
2799         fi
2800 fi
2801
2802 if test $ol_enable_kbind = yes ; then
2803         if test $ol_with_kerberos = no ; then
2804                 { echo "configure: error: options require --with-kerberos" 1>&2; exit 1; }
2805         elif test $ol_with_kerberos = auto ; then
2806                 ol_with_kerberos=yes
2807         fi
2808
2809 elif test $ol_enable_kbind = no ; then
2810         if test $ol_with_kerberos = auto ; then
2811                 ol_with_kerberos=no
2812         elif test $ol_with_kerberos != no ; then
2813                 echo "configure: warning: Kerberos detection enabled unnecessarily" 1>&2;
2814                 ol_with_kerberos=no
2815         fi
2816 fi
2817
2818 if test $ol_enable_spasswd = yes ; then
2819         if test $ol_with_cyrus_sasl = no ; then
2820                 { echo "configure: error: options require --with-cyrus-sasl" 1>&2; exit 1; }
2821         fi
2822         ol_with_cyrus_sasl=yes
2823 fi
2824
2825 echo "$ac_t""done" 1>&6
2826
2827 LDAP_LIBS=
2828 LDBM_LIBS=
2829 LTHREAD_LIBS=
2830 LUTIL_LIBS=
2831
2832 SLAPD_LIBS=
2833 SLURPD_LIBS=
2834
2835 BUILD_SLAPD=no
2836 BUILD_SLURPD=no
2837
2838 BUILD_THREAD=no
2839
2840 BUILD_SLAPI=no
2841 SLAPD_SLAPI_DEPEND=
2842
2843 BUILD_BDB=no
2844 BUILD_DNSSRV=no
2845 BUILD_HDB=no
2846 BUILD_LDAP=no
2847 BUILD_LDBM=no
2848 BUILD_META=no
2849 BUILD_MONITOR=no
2850 BUILD_NULL=no
2851 BUILD_PASSWD=no
2852 BUILD_PERL=no
2853 BUILD_RELAY=no
2854 BUILD_SHELL=no
2855 BUILD_SQL=no
2856
2857 BUILD_ACCESSLOG=no
2858 BUILD_DENYOP=no
2859 BUILD_DYNGROUP=no
2860 BUILD_DYNLIST=no
2861 BUILD_GLUE=no
2862 BUILD_LASTMOD=no
2863 BUILD_PPOLICY=no
2864 BUILD_PROXYCACHE=no
2865 BUILD_REFINT=no
2866 BUILD_RETCODE=no
2867 BUILD_RWM=no
2868 BUILD_SYNCPROV=no
2869 BUILD_TRANSLUCENT=no
2870 BUILD_UNIQUE=no
2871
2872 SLAPD_STATIC_OVERLAYS=
2873 SLAPD_DYNAMIC_OVERLAYS=
2874
2875 SLAPD_MODULES_LDFLAGS=
2876 SLAPD_MODULES_CPPFLAGS=
2877
2878 SLAPD_STATIC_BACKENDS=back-ldif
2879 SLAPD_DYNAMIC_BACKENDS=
2880
2881 SLAPD_PERL_LDFLAGS=
2882 MOD_PERL_LDFLAGS=
2883 PERL_CPPFLAGS=
2884
2885 SLAPD_SQL_LDFLAGS=
2886 SLAPD_SQL_LIBS=
2887 SLAPD_SQL_INCLUDES=
2888
2889 KRB4_LIBS=
2890 KRB5_LIBS=
2891 SASL_LIBS=
2892 TLS_LIBS=
2893 MODULES_LIBS=
2894 SLAPI_LIBS=
2895 LIBSLAPI=
2896 LIBSLAPITOOLS=
2897 AUTH_LIBS=
2898
2899 SLAPD_SLP_LIBS=
2900 SLAPD_GMP_LIBS=
2901
2902
2903 cat >> confdefs.h <<\EOF
2904 #define HAVE_MKVERSION 1
2905 EOF
2906
2907
2908
2909
2910 ol_aix_threads=no
2911 case "$target" in
2912 *-*-aix*)       if test -z "$CC" ; then
2913                 case "$ol_with_threads" in
2914                 auto | yes |  posix) ol_aix_threads=yes ;;
2915                 esac
2916         fi
2917 ;;
2918 esac
2919
2920 if test $ol_aix_threads = yes ; then
2921         if test -z "${CC}" ; then
2922                 for ac_prog in cc_r xlc_r cc
2923 do
2924 # Extract the first word of "$ac_prog", so it can be a program name with args.
2925 set dummy $ac_prog; ac_word=$2
2926 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2927 echo "configure:2928: checking for $ac_word" >&5
2928 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2929   echo $ac_n "(cached) $ac_c" 1>&6
2930 else
2931   if test -n "$CC"; then
2932   ac_cv_prog_CC="$CC" # Let the user override the test.
2933 else
2934   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2935   ac_dummy="$PATH"
2936   for ac_dir in $ac_dummy; do
2937     test -z "$ac_dir" && ac_dir=.
2938     if test -f $ac_dir/$ac_word; then
2939       ac_cv_prog_CC="$ac_prog"
2940       break
2941     fi
2942   done
2943   IFS="$ac_save_ifs"
2944 fi
2945 fi
2946 CC="$ac_cv_prog_CC"
2947 if test -n "$CC"; then
2948   echo "$ac_t""$CC" 1>&6
2949 else
2950   echo "$ac_t""no" 1>&6
2951 fi
2952
2953 test -n "$CC" && break
2954 done
2955
2956
2957                 if test "$CC" = cc ; then
2958                                                 if test $ol_with_threads != auto ; then
2959                                 { echo "configure: error: --with-threads requires cc_r (or other suitable compiler) on AIX" 1>&2; exit 1; }
2960                         else
2961                                 echo "configure: warning: disabling threads, no cc_r on AIX" 1>&2
2962                         fi
2963                         ol_with_threads=no
2964                 fi
2965         fi
2966
2967         if test "${CC}" = "cc_r" -o "${CC}" = "xlc_r" ; then
2968                 ol_with_threads=posix
2969                 ol_cv_pthread_create=yes
2970         fi
2971 fi
2972
2973 if test -z "${CC}"; then
2974         for ac_prog in cc gcc
2975 do
2976 # Extract the first word of "$ac_prog", so it can be a program name with args.
2977 set dummy $ac_prog; ac_word=$2
2978 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2979 echo "configure:2980: checking for $ac_word" >&5
2980 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2981   echo $ac_n "(cached) $ac_c" 1>&6
2982 else
2983   if test -n "$CC"; then
2984   ac_cv_prog_CC="$CC" # Let the user override the test.
2985 else
2986   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2987   ac_dummy="$PATH"
2988   for ac_dir in $ac_dummy; do
2989     test -z "$ac_dir" && ac_dir=.
2990     if test -f $ac_dir/$ac_word; then
2991       ac_cv_prog_CC="$ac_prog"
2992       break
2993     fi
2994   done
2995   IFS="$ac_save_ifs"
2996 fi
2997 fi
2998 CC="$ac_cv_prog_CC"
2999 if test -n "$CC"; then
3000   echo "$ac_t""$CC" 1>&6
3001 else
3002   echo "$ac_t""no" 1>&6
3003 fi
3004
3005 test -n "$CC" && break
3006 done
3007 test -n "$CC" || CC="missing"
3008
3009
3010         if test "${CC}" = "missing" ; then
3011                 { echo "configure: error: Unable to locate cc(1) or suitable replacement.  Check PATH or set CC." 1>&2; exit 1; }
3012         fi
3013 fi
3014
3015 if test -z "${AR}"; then
3016         for ac_prog in ar gar
3017 do
3018 # Extract the first word of "$ac_prog", so it can be a program name with args.
3019 set dummy $ac_prog; ac_word=$2
3020 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3021 echo "configure:3022: checking for $ac_word" >&5
3022 if eval "test \"\${ac_cv_prog_AR+set}\" = set"; then
3023   echo $ac_n "(cached) $ac_c" 1>&6
3024 else
3025   if test -n "$AR"; then
3026   ac_cv_prog_AR="$AR" # Let the user override the test.
3027 else
3028   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3029   ac_dummy="$PATH"
3030   for ac_dir in $ac_dummy; do
3031     test -z "$ac_dir" && ac_dir=.
3032     if test -f $ac_dir/$ac_word; then
3033       ac_cv_prog_AR="$ac_prog"
3034       break
3035     fi
3036   done
3037   IFS="$ac_save_ifs"
3038 fi
3039 fi
3040 AR="$ac_cv_prog_AR"
3041 if test -n "$AR"; then
3042   echo "$ac_t""$AR" 1>&6
3043 else
3044   echo "$ac_t""no" 1>&6
3045 fi
3046
3047 test -n "$AR" && break
3048 done
3049 test -n "$AR" || AR="missing"
3050
3051
3052         if test "${AR}" = "missing" ; then
3053                 { echo "configure: error: Unable to locate ar(1) or suitable replacement.  Check PATH or set AR." 1>&2; exit 1; }
3054         fi
3055 fi
3056
3057
3058
3059 # Find the correct PATH separator.  Usually this is `:', but
3060 # DJGPP uses `;' like DOS.
3061 if test "X${PATH_SEPARATOR+set}" != Xset; then
3062   UNAME=${UNAME-`uname 2>/dev/null`}
3063   case X$UNAME in
3064     *-DOS) lt_cv_sys_path_separator=';' ;;
3065     *)     lt_cv_sys_path_separator=':' ;;
3066   esac
3067   PATH_SEPARATOR=$lt_cv_sys_path_separator
3068 fi
3069
3070 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
3071 echo "configure:3072: checking for Cygwin environment" >&5
3072 if eval "test \"\${ac_cv_cygwin+set}\" = set"; then
3073   echo $ac_n "(cached) $ac_c" 1>&6
3074 else
3075   cat > conftest.$ac_ext <<EOF
3076 #line 3077 "configure"
3077 #include "confdefs.h"
3078
3079 int main() {
3080
3081 #ifndef __CYGWIN__
3082 #define __CYGWIN__ __CYGWIN32__
3083 #endif
3084 return __CYGWIN__;
3085 ; return 0; }
3086 EOF
3087 if { (eval echo configure:3088: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3088   rm -rf conftest*
3089   ac_cv_cygwin=yes
3090 else
3091   echo "configure: failed program was:" >&5
3092   cat conftest.$ac_ext >&5
3093   rm -rf conftest*
3094   ac_cv_cygwin=no
3095 fi
3096 rm -f conftest*
3097 fi
3098
3099 echo "$ac_t""$ac_cv_cygwin" 1>&6
3100 CYGWIN=
3101 test "$ac_cv_cygwin" = yes && CYGWIN=yes
3102 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
3103 echo "configure:3104: checking for mingw32 environment" >&5
3104 if eval "test \"\${ac_cv_mingw32+set}\" = set"; then
3105   echo $ac_n "(cached) $ac_c" 1>&6
3106 else
3107   cat > conftest.$ac_ext <<EOF
3108 #line 3109 "configure"
3109 #include "confdefs.h"
3110
3111 int main() {
3112 return __MINGW32__;
3113 ; return 0; }
3114 EOF
3115 if { (eval echo configure:3116: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3116   rm -rf conftest*
3117   ac_cv_mingw32=yes
3118 else
3119   echo "configure: failed program was:" >&5
3120   cat conftest.$ac_ext >&5
3121   rm -rf conftest*
3122   ac_cv_mingw32=no
3123 fi
3124 rm -f conftest*
3125 fi
3126
3127 echo "$ac_t""$ac_cv_mingw32" 1>&6
3128 MINGW32=
3129 test "$ac_cv_mingw32" = yes && MINGW32=yes
3130 echo $ac_n "checking for EMX OS/2 environment""... $ac_c" 1>&6
3131 echo "configure:3132: checking for EMX OS/2 environment" >&5
3132 if eval "test \"\${ac_cv_emxos2+set}\" = set"; then
3133   echo $ac_n "(cached) $ac_c" 1>&6
3134 else
3135   cat > conftest.$ac_ext <<EOF
3136 #line 3137 "configure"
3137 #include "confdefs.h"
3138
3139 int main() {
3140 return __EMX__;
3141 ; return 0; }
3142 EOF
3143 if { (eval echo configure:3144: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3144   rm -rf conftest*
3145   ac_cv_emxos2=yes
3146 else
3147   echo "configure: failed program was:" >&5
3148   cat conftest.$ac_ext >&5
3149   rm -rf conftest*
3150   ac_cv_emxos2=no
3151 fi
3152 rm -f conftest*
3153 fi
3154
3155 echo "$ac_t""$ac_cv_emxos2" 1>&6
3156 EMXOS2=
3157 test "$ac_cv_emxos2" = yes && EMXOS2=yes
3158 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
3159 echo "configure:3160: checking how to run the C preprocessor" >&5
3160 # On Suns, sometimes $CPP names a directory.
3161 if test -n "$CPP" && test -d "$CPP"; then
3162   CPP=
3163 fi
3164 if test -z "$CPP"; then
3165 if eval "test \"\${ac_cv_prog_CPP+set}\" = set"; then
3166   echo $ac_n "(cached) $ac_c" 1>&6
3167 else
3168     # This must be in double quotes, not single quotes, because CPP may get
3169   # substituted into the Makefile and "${CC-cc}" will confuse make.
3170   CPP="${CC-cc} -E"
3171   # On the NeXT, cc -E runs the code through the compiler's parser,
3172   # not just through cpp.
3173   cat > conftest.$ac_ext <<EOF
3174 #line 3175 "configure"
3175 #include "confdefs.h"
3176 #include <assert.h>
3177 Syntax Error
3178 EOF
3179 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3180 { (eval echo configure:3181: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3181 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3182 if test -z "$ac_err"; then
3183   :
3184 else
3185   echo "$ac_err" >&5
3186   echo "configure: failed program was:" >&5
3187   cat conftest.$ac_ext >&5
3188   rm -rf conftest*
3189   CPP="${CC-cc} -E -traditional-cpp"
3190   cat > conftest.$ac_ext <<EOF
3191 #line 3192 "configure"
3192 #include "confdefs.h"
3193 #include <assert.h>
3194 Syntax Error
3195 EOF
3196 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3197 { (eval echo configure:3198: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3198 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3199 if test -z "$ac_err"; then
3200   :
3201 else
3202   echo "$ac_err" >&5
3203   echo "configure: failed program was:" >&5
3204   cat conftest.$ac_ext >&5
3205   rm -rf conftest*
3206   CPP="${CC-cc} -nologo -E"
3207   cat > conftest.$ac_ext <<EOF
3208 #line 3209 "configure"
3209 #include "confdefs.h"
3210 #include <assert.h>
3211 Syntax Error
3212 EOF
3213 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3214 { (eval echo configure:3215: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3215 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3216 if test -z "$ac_err"; then
3217   :
3218 else
3219   echo "$ac_err" >&5
3220   echo "configure: failed program was:" >&5
3221   cat conftest.$ac_ext >&5
3222   rm -rf conftest*
3223   CPP=/lib/cpp
3224 fi
3225 rm -f conftest*
3226 fi
3227 rm -f conftest*
3228 fi
3229 rm -f conftest*
3230   ac_cv_prog_CPP="$CPP"
3231 fi
3232   CPP="$ac_cv_prog_CPP"
3233 else
3234   ac_cv_prog_CPP="$CPP"
3235 fi
3236 echo "$ac_t""$CPP" 1>&6
3237
3238 # Check whether --enable-fast-install or --disable-fast-install was given.
3239 if test "${enable_fast_install+set}" = set; then
3240   enableval="$enable_fast_install"
3241   p=${PACKAGE-default}
3242 case $enableval in
3243 yes) enable_fast_install=yes ;;
3244 no) enable_fast_install=no ;;
3245 *)
3246   enable_fast_install=no
3247   # Look at the argument we got.  We use all the common list separators.
3248   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
3249   for pkg in $enableval; do
3250     if test "X$pkg" = "X$p"; then
3251       enable_fast_install=yes
3252     fi
3253   done
3254   IFS="$ac_save_ifs"
3255   ;;
3256 esac
3257 else
3258   enable_fast_install=yes
3259 fi
3260
3261 # Extract the first word of "gcc", so it can be a program name with args.
3262 set dummy gcc; ac_word=$2
3263 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3264 echo "configure:3265: checking for $ac_word" >&5
3265 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3266   echo $ac_n "(cached) $ac_c" 1>&6
3267 else
3268   if test -n "$CC"; then
3269   ac_cv_prog_CC="$CC" # Let the user override the test.
3270 else
3271   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3272   ac_dummy="$PATH"
3273   for ac_dir in $ac_dummy; do
3274     test -z "$ac_dir" && ac_dir=.
3275     if test -f $ac_dir/$ac_word; then
3276       ac_cv_prog_CC="gcc"
3277       break
3278     fi
3279   done
3280   IFS="$ac_save_ifs"
3281 fi
3282 fi
3283 CC="$ac_cv_prog_CC"
3284 if test -n "$CC"; then
3285   echo "$ac_t""$CC" 1>&6
3286 else
3287   echo "$ac_t""no" 1>&6
3288 fi
3289
3290 if test -z "$CC"; then
3291   # Extract the first word of "cc", so it can be a program name with args.
3292 set dummy cc; ac_word=$2
3293 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3294 echo "configure:3295: checking for $ac_word" >&5
3295 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3296   echo $ac_n "(cached) $ac_c" 1>&6
3297 else
3298   if test -n "$CC"; then
3299   ac_cv_prog_CC="$CC" # Let the user override the test.
3300 else
3301   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3302   ac_prog_rejected=no
3303   ac_dummy="$PATH"
3304   for ac_dir in $ac_dummy; do
3305     test -z "$ac_dir" && ac_dir=.
3306     if test -f $ac_dir/$ac_word; then
3307       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
3308         ac_prog_rejected=yes
3309         continue
3310       fi
3311       ac_cv_prog_CC="cc"
3312       break
3313     fi
3314   done
3315   IFS="$ac_save_ifs"
3316 if test $ac_prog_rejected = yes; then
3317   # We found a bogon in the path, so make sure we never use it.
3318   set dummy $ac_cv_prog_CC
3319   shift
3320   if test $# -gt 0; then
3321     # We chose a different compiler from the bogus one.
3322     # However, it has the same basename, so the bogon will be chosen
3323     # first if we set CC to just the basename; use the full file name.
3324     shift
3325     set dummy "$ac_dir/$ac_word" "$@"
3326     shift
3327     ac_cv_prog_CC="$@"
3328   fi
3329 fi
3330 fi
3331 fi
3332 CC="$ac_cv_prog_CC"
3333 if test -n "$CC"; then
3334   echo "$ac_t""$CC" 1>&6
3335 else
3336   echo "$ac_t""no" 1>&6
3337 fi
3338
3339   if test -z "$CC"; then
3340     case "`uname -s`" in
3341     *win32* | *WIN32* | *CYGWIN*)
3342       # Extract the first word of "cl", so it can be a program name with args.
3343 set dummy cl; ac_word=$2
3344 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3345 echo "configure:3346: checking for $ac_word" >&5
3346 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3347   echo $ac_n "(cached) $ac_c" 1>&6
3348 else
3349   if test -n "$CC"; then
3350   ac_cv_prog_CC="$CC" # Let the user override the test.
3351 else
3352   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3353   ac_dummy="$PATH"
3354   for ac_dir in $ac_dummy; do
3355     test -z "$ac_dir" && ac_dir=.
3356     if test -f $ac_dir/$ac_word; then
3357       ac_cv_prog_CC="cl"
3358       break
3359     fi
3360   done
3361   IFS="$ac_save_ifs"
3362 fi
3363 fi
3364 CC="$ac_cv_prog_CC"
3365 if test -n "$CC"; then
3366   echo "$ac_t""$CC" 1>&6
3367 else
3368   echo "$ac_t""no" 1>&6
3369 fi
3370  ;;
3371     esac
3372   fi
3373   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
3374 fi
3375
3376 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works""... $ac_c" 1>&6
3377 echo "configure:3378: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works" >&5
3378
3379 ac_ext=c
3380 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
3381 ac_cpp='$CPP $CPPFLAGS'
3382 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
3383 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
3384 cross_compiling=$ac_cv_prog_cc_cross
3385
3386 cat > conftest.$ac_ext << EOF
3387
3388 #line 3389 "configure"
3389 #include "confdefs.h"
3390
3391 main(){return(0);}
3392 EOF
3393 if { (eval echo configure:3394: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3394   ac_cv_prog_cc_works=yes
3395   # If we can't run a trivial program, we are probably using a cross compiler.
3396   if (./conftest; exit) 2>/dev/null; then
3397     ac_cv_prog_cc_cross=no
3398   else
3399     ac_cv_prog_cc_cross=yes
3400   fi
3401 else
3402   echo "configure: failed program was:" >&5
3403   cat conftest.$ac_ext >&5
3404   ac_cv_prog_cc_works=no
3405 fi
3406 rm -fr conftest*
3407 ac_ext=c
3408 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
3409 ac_cpp='$CPP $CPPFLAGS'
3410 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
3411 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
3412 cross_compiling=$ac_cv_prog_cc_cross
3413
3414 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
3415 if test $ac_cv_prog_cc_works = no; then
3416   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
3417 fi
3418 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
3419 echo "configure:3420: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler" >&5
3420 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
3421 cross_compiling=$ac_cv_prog_cc_cross
3422
3423 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
3424 echo "configure:3425: checking whether we are using GNU C" >&5
3425 if eval "test \"\${ac_cv_prog_gcc+set}\" = set"; then
3426   echo $ac_n "(cached) $ac_c" 1>&6
3427 else
3428   cat > conftest.c <<EOF
3429 #ifdef __GNUC__
3430   yes;
3431 #endif
3432 EOF
3433 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:3434: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
3434   ac_cv_prog_gcc=yes
3435 else
3436   ac_cv_prog_gcc=no
3437 fi
3438 fi
3439
3440 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
3441
3442 if test $ac_cv_prog_gcc = yes; then
3443   GCC=yes
3444 else
3445   GCC=
3446 fi
3447
3448 ac_test_CFLAGS="${CFLAGS+set}"
3449 ac_save_CFLAGS="$CFLAGS"
3450 CFLAGS=
3451 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
3452 echo "configure:3453: checking whether ${CC-cc} accepts -g" >&5
3453 if eval "test \"\${ac_cv_prog_cc_g+set}\" = set"; then
3454   echo $ac_n "(cached) $ac_c" 1>&6
3455 else
3456   echo 'void f(){}' > conftest.c
3457 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
3458   ac_cv_prog_cc_g=yes
3459 else
3460   ac_cv_prog_cc_g=no
3461 fi
3462 rm -f conftest*
3463
3464 fi
3465
3466 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
3467 if test "$ac_test_CFLAGS" = set; then
3468   CFLAGS="$ac_save_CFLAGS"
3469 elif test $ac_cv_prog_cc_g = yes; then
3470   if test "$GCC" = yes; then
3471     CFLAGS="-g -O2"
3472   else
3473     CFLAGS="-g"
3474   fi
3475 else
3476   if test "$GCC" = yes; then
3477     CFLAGS="-O2"
3478   else
3479     CFLAGS=
3480   fi
3481 fi
3482
3483 # Check whether --with-gnu-ld or --without-gnu-ld was given.
3484 if test "${with_gnu_ld+set}" = set; then
3485   withval="$with_gnu_ld"
3486   test "$withval" = no || with_gnu_ld=yes
3487 else
3488   with_gnu_ld=no
3489 fi
3490
3491 ac_prog=ld
3492 if test "$GCC" = yes; then
3493   # Check if gcc -print-prog-name=ld gives a path.
3494   echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
3495 echo "configure:3496: checking for ld used by GCC" >&5
3496   case $host in
3497   *-*-mingw*)
3498     # gcc leaves a trailing carriage return which upsets mingw
3499     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
3500   *)
3501     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
3502   esac
3503   case $ac_prog in
3504     # Accept absolute paths.
3505     [\\/]* | [A-Za-z]:[\\/]*)
3506       re_direlt='/[^/][^/]*/\.\./'
3507       # Canonicalize the path of ld
3508       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
3509       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
3510         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
3511       done
3512       test -z "$LD" && LD="$ac_prog"
3513       ;;
3514   "")
3515     # If it fails, then pretend we aren't using GCC.
3516     ac_prog=ld
3517     ;;
3518   *)
3519     # If it is relative, then search for the first ld in PATH.
3520     with_gnu_ld=unknown
3521     ;;
3522   esac
3523 elif test "$with_gnu_ld" = yes; then
3524   echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
3525 echo "configure:3526: checking for GNU ld" >&5
3526 else
3527   echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
3528 echo "configure:3529: checking for non-GNU ld" >&5
3529 fi
3530 if eval "test \"\${lt_cv_path_LD+set}\" = set"; then
3531   echo $ac_n "(cached) $ac_c" 1>&6
3532 else
3533   if test -z "$LD"; then
3534   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3535   for ac_dir in $PATH; do
3536     test -z "$ac_dir" && ac_dir=.
3537     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
3538       lt_cv_path_LD="$ac_dir/$ac_prog"
3539       # Check to see if the program is GNU ld.  I'd rather use --version,
3540       # but apparently some GNU ld's only accept -v.
3541       # Break only if it was the GNU/non-GNU ld that we prefer.
3542       if "$lt_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
3543         test "$with_gnu_ld" != no && break
3544       else
3545         test "$with_gnu_ld" != yes && break
3546       fi
3547     fi
3548   done
3549   IFS="$ac_save_ifs"
3550 else
3551   lt_cv_path_LD="$LD" # Let the user override the test with a path.
3552 fi
3553 fi
3554
3555 LD="$lt_cv_path_LD"
3556 if test -n "$LD"; then
3557   echo "$ac_t""$LD" 1>&6
3558 else
3559   echo "$ac_t""no" 1>&6
3560 fi
3561 test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
3562 echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
3563 echo "configure:3564: checking if the linker ($LD) is GNU ld" >&5
3564 if eval "test \"\${lt_cv_prog_gnu_ld+set}\" = set"; then
3565   echo $ac_n "(cached) $ac_c" 1>&6
3566 else
3567   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
3568 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
3569   lt_cv_prog_gnu_ld=yes
3570 else
3571   lt_cv_prog_gnu_ld=no
3572 fi
3573 fi
3574
3575 echo "$ac_t""$lt_cv_prog_gnu_ld" 1>&6
3576 with_gnu_ld=$lt_cv_prog_gnu_ld
3577
3578
3579 echo $ac_n "checking for $LD option to reload object files""... $ac_c" 1>&6
3580 echo "configure:3581: checking for $LD option to reload object files" >&5
3581 if eval "test \"\${lt_cv_ld_reload_flag+set}\" = set"; then
3582   echo $ac_n "(cached) $ac_c" 1>&6
3583 else
3584   lt_cv_ld_reload_flag='-r'
3585 fi
3586
3587 echo "$ac_t""$lt_cv_ld_reload_flag" 1>&6
3588 reload_flag=$lt_cv_ld_reload_flag
3589 test -n "$reload_flag" && reload_flag=" $reload_flag"
3590
3591 echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
3592 echo "configure:3593: checking for BSD-compatible nm" >&5
3593 if eval "test \"\${lt_cv_path_NM+set}\" = set"; then
3594   echo $ac_n "(cached) $ac_c" 1>&6
3595 else
3596   if test -n "$NM"; then
3597   # Let the user override the test.
3598   lt_cv_path_NM="$NM"
3599 else
3600   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3601   for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
3602     test -z "$ac_dir" && ac_dir=.
3603     tmp_nm=$ac_dir/${ac_tool_prefix}nm
3604     if test -f $tmp_nm || test -f $tmp_nm$ac_exeext ; then
3605       # Check to see if the nm accepts a BSD-compat flag.
3606       # Adding the `sed 1q' prevents false positives on HP-UX, which says:
3607       #   nm: unknown option "B" ignored
3608       # Tru64's nm complains that /dev/null is an invalid object file
3609       if ($tmp_nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then
3610         lt_cv_path_NM="$tmp_nm -B"
3611         break
3612       elif ($tmp_nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
3613         lt_cv_path_NM="$tmp_nm -p"
3614         break
3615       else
3616         lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
3617         continue # so that we can try to find one that supports BSD flags
3618       fi
3619     fi
3620   done
3621   IFS="$ac_save_ifs"
3622   test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
3623 fi
3624 fi
3625
3626 NM="$lt_cv_path_NM"
3627 echo "$ac_t""$NM" 1>&6
3628
3629 echo $ac_n "checking for a sed that does not truncate output""... $ac_c" 1>&6
3630 echo "configure:3631: checking for a sed that does not truncate output" >&5
3631 if eval "test \"\${lt_cv_path_SED+set}\" = set"; then
3632   echo $ac_n "(cached) $ac_c" 1>&6
3633 else
3634   # Loop through the user's path and test for sed and gsed.
3635 # Then use that list of sed's as ones to test for truncation.
3636 as_executable_p="test -f"
3637 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3638 for as_dir in $PATH
3639 do
3640   IFS=$as_save_IFS
3641   test -z "$as_dir" && as_dir=.
3642   for ac_prog in sed gsed; do
3643     for ac_exec_ext in '' $ac_executable_extensions; do
3644       if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
3645         _sed_list="$_sed_list $as_dir/$ac_prog$ac_exec_ext"
3646       fi
3647     done
3648   done
3649 done
3650
3651   # Create a temporary directory, and hook for its removal unless debugging.
3652 $debug ||
3653 {
3654   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
3655   trap '{ (exit 1); exit 1; }' 1 2 13 15
3656 }
3657
3658 # Create a (secure) tmp directory for tmp files.
3659 : ${TMPDIR=/tmp}
3660 {
3661   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/sedXXXXXX") 2>/dev/null` &&
3662   test -n "$tmp" && test -d "$tmp"
3663 }  ||
3664 {
3665   tmp=$TMPDIR/sed$$-$RANDOM
3666   (umask 077 && mkdir $tmp)
3667 } ||
3668 {
3669    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
3670    { (exit 1); exit 1; }
3671 }
3672   _max=0
3673   _count=0
3674   # Add /usr/xpg4/bin/sed as it is typically found on Solaris
3675   # along with /bin/sed that truncates output.
3676   for _sed in $_sed_list /usr/xpg4/bin/sed; do
3677     test ! -f ${_sed} && break
3678     cat /dev/null > "$tmp/sed.in"
3679     _count=0
3680     echo ${ECHO_N-$ac_n} "0123456789${ECHO_C-$ac_c}" >"$tmp/sed.in"
3681     # Check for GNU sed and select it if it is found.
3682     if "${_sed}" --version 2>&1 < /dev/null | egrep '(GNU)' > /dev/null; then
3683       lt_cv_path_SED=${_sed}
3684       break
3685     fi
3686     while true; do
3687       cat "$tmp/sed.in" "$tmp/sed.in" >"$tmp/sed.tmp"
3688       mv "$tmp/sed.tmp" "$tmp/sed.in"
3689       cp "$tmp/sed.in" "$tmp/sed.nl"
3690       echo >>"$tmp/sed.nl"
3691       ${_sed} -e 's/a$//' < "$tmp/sed.nl" >"$tmp/sed.out" || break
3692       cmp -s "$tmp/sed.out" "$tmp/sed.nl" || break
3693       # 40000 chars as input seems more than enough
3694       test $_count -gt 10 && break
3695       _count=`expr $_count + 1`
3696       if test $_count -gt $_max; then
3697         _max=$_count
3698         lt_cv_path_SED=$_sed
3699       fi
3700     done
3701   done
3702   rm -rf "$tmp"
3703
3704 fi
3705
3706 if test "X$SED" != "X"; then
3707   lt_cv_path_SED=$SED
3708 else
3709   SED=$lt_cv_path_SED
3710 fi
3711 echo "$ac_t""$SED" 1>&6
3712
3713 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
3714 echo "configure:3715: checking whether ln -s works" >&5
3715 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
3716   echo $ac_n "(cached) $ac_c" 1>&6
3717 else
3718   rm -f conftestdata
3719 if ln -s X conftestdata 2>/dev/null
3720 then
3721   rm -f conftestdata
3722   ac_cv_prog_LN_S="ln -s"
3723 else
3724   ac_cv_prog_LN_S=ln
3725 fi
3726 fi
3727 LN_S="$ac_cv_prog_LN_S"
3728 if test "$ac_cv_prog_LN_S" = "ln -s"; then
3729   echo "$ac_t""yes" 1>&6
3730 else
3731   echo "$ac_t""no" 1>&6
3732 fi
3733
3734 echo $ac_n "checking how to recognise dependent libraries""... $ac_c" 1>&6
3735 echo "configure:3736: checking how to recognise dependent libraries" >&5
3736 if eval "test \"\${lt_cv_deplibs_check_method+set}\" = set"; then
3737   echo $ac_n "(cached) $ac_c" 1>&6
3738 else
3739   lt_cv_file_magic_cmd='$MAGIC_CMD'
3740 lt_cv_file_magic_test_file=
3741 lt_cv_deplibs_check_method='unknown'
3742 # Need to set the preceding variable on all platforms that support
3743 # interlibrary dependencies.
3744 # 'none' -- dependencies not supported.
3745 # `unknown' -- same as none, but documents that we really don't know.
3746 # 'pass_all' -- all dependencies passed with no checks.
3747 # 'test_compile' -- check by making test program.
3748 # 'file_magic [[regex]]' -- check by looking for files in library path
3749 # which responds to the $file_magic_cmd with a given egrep regex.
3750 # If you have `file' or equivalent on your system and you're not sure
3751 # whether `pass_all' will *always* work, you probably want this one.
3752
3753 case $host_os in
3754 aix4* | aix5*)
3755   lt_cv_deplibs_check_method=pass_all
3756   ;;
3757
3758 beos*)
3759   lt_cv_deplibs_check_method=pass_all
3760   ;;
3761
3762 bsdi4*)
3763   lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
3764   lt_cv_file_magic_cmd='/usr/bin/file -L'
3765   lt_cv_file_magic_test_file=/shlib/libc.so
3766   ;;
3767
3768 cygwin* | mingw* | pw32*)
3769   lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
3770   lt_cv_file_magic_cmd='$OBJDUMP -f'
3771   ;;
3772
3773 darwin* | rhapsody*)
3774   lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library'
3775   lt_cv_file_magic_cmd='/usr/bin/file -L'
3776   case "$host_os" in
3777   rhapsody* | darwin1.[012])
3778     lt_cv_file_magic_test_file=`echo /System/Library/Frameworks/System.framework/Versions/*/System | head -1`
3779     ;;
3780   *) # Darwin 1.3 on
3781     lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
3782     ;;
3783   esac
3784   ;;
3785
3786 freebsd*)
3787   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3788     case $host_cpu in
3789     i*86 )
3790       # Not sure whether the presence of OpenBSD here was a mistake.
3791       # Let's accept both of them until this is cleared up.
3792       lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[3-9]86 (compact )?demand paged shared library'
3793       lt_cv_file_magic_cmd=/usr/bin/file
3794       lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3795       ;;
3796     esac
3797   else
3798     lt_cv_deplibs_check_method=pass_all
3799   fi
3800   ;;
3801
3802 gnu*)
3803   lt_cv_deplibs_check_method=pass_all
3804   ;;
3805
3806 hpux10.20*|hpux11*)
3807   lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library'
3808   lt_cv_file_magic_cmd=/usr/bin/file
3809   lt_cv_file_magic_test_file=/usr/lib/libc.sl
3810   ;;
3811
3812 irix5* | irix6* | nonstopux*)
3813   case $host_os in
3814   irix5* | nonstopux*)
3815     # this will be overridden with pass_all, but let us keep it just in case
3816     lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
3817     ;;
3818   *)
3819     case $LD in
3820     *-32|*"-32 ") libmagic=32-bit;;
3821     *-n32|*"-n32 ") libmagic=N32;;
3822     *-64|*"-64 ") libmagic=64-bit;;
3823     *) libmagic=never-match;;
3824     esac
3825     # this will be overridden with pass_all, but let us keep it just in case
3826     lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[1234] dynamic lib MIPS - version 1"
3827     ;;
3828   esac
3829   lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
3830   lt_cv_deplibs_check_method=pass_all
3831   ;;
3832
3833 # This must be Linux ELF.
3834 linux-gnu*)
3835   case $host_cpu in
3836   alpha* | hppa* | i*86 | mips | mipsel | powerpc* | sparc* | ia64*)
3837     lt_cv_deplibs_check_method=pass_all ;;
3838   *)
3839     # glibc up to 2.1.1 does not perform some relocations on ARM
3840     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;;
3841   esac
3842   lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
3843   ;;
3844
3845 netbsd*)
3846   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3847     lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
3848   else
3849     lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so$'
3850   fi
3851   ;;
3852
3853 newos6*)
3854   lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
3855   lt_cv_file_magic_cmd=/usr/bin/file
3856   lt_cv_file_magic_test_file=/usr/lib/libnls.so
3857   ;;
3858
3859 openbsd*)
3860   lt_cv_file_magic_cmd=/usr/bin/file
3861   lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3862   if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
3863     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB shared object'
3864   else
3865     lt_cv_deplibs_check_method='file_magic OpenBSD.* shared library'
3866   fi
3867   ;;
3868
3869 openedition*)
3870   lt_cv_deplibs_check_method=pass_all
3871   ;;
3872
3873 osf3* | osf4* | osf5*)
3874   # this will be overridden with pass_all, but let us keep it just in case
3875   lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
3876   lt_cv_file_magic_test_file=/shlib/libc.so
3877   lt_cv_deplibs_check_method=pass_all
3878   ;;
3879
3880 sco3.2v5*)
3881   lt_cv_deplibs_check_method=pass_all
3882   ;;
3883
3884 solaris*)
3885   lt_cv_deplibs_check_method=pass_all
3886   lt_cv_file_magic_test_file=/lib/libc.so
3887   ;;
3888
3889 sysv5uw[78]* | sysv4*uw2*)
3890   lt_cv_deplibs_check_method=pass_all
3891   ;;
3892
3893 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
3894   case $host_vendor in
3895   motorola)
3896     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]'
3897     lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
3898     ;;
3899   ncr)
3900     lt_cv_deplibs_check_method=pass_all
3901     ;;
3902   sequent)
3903     lt_cv_file_magic_cmd='/bin/file'
3904     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'
3905     ;;
3906   sni)
3907     lt_cv_file_magic_cmd='/bin/file'
3908     lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib"
3909     lt_cv_file_magic_test_file=/lib/libc.so
3910     ;;
3911   siemens)
3912     lt_cv_deplibs_check_method=pass_all
3913     ;;
3914   esac
3915   ;;
3916 esac
3917
3918 fi
3919
3920 echo "$ac_t""$lt_cv_deplibs_check_method" 1>&6
3921 file_magic_cmd=$lt_cv_file_magic_cmd
3922 deplibs_check_method=$lt_cv_deplibs_check_method
3923
3924 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
3925 echo "configure:3926: checking for object suffix" >&5
3926 if eval "test \"\${ac_cv_objext+set}\" = set"; then
3927   echo $ac_n "(cached) $ac_c" 1>&6
3928 else
3929   rm -f conftest*
3930 echo 'int i = 1;' > conftest.$ac_ext
3931 if { (eval echo configure:3932: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3932   for ac_file in conftest.*; do
3933     case $ac_file in
3934     *.c) ;;
3935     *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
3936     esac
3937   done
3938 else
3939   { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
3940 fi
3941 rm -f conftest*
3942 fi
3943
3944 echo "$ac_t""$ac_cv_objext" 1>&6
3945 OBJEXT=$ac_cv_objext
3946 ac_objext=$ac_cv_objext
3947
3948
3949
3950
3951 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
3952 echo "configure:3953: checking for executable suffix" >&5
3953 if eval "test \"\${ac_cv_exeext+set}\" = set"; then
3954   echo $ac_n "(cached) $ac_c" 1>&6
3955 else
3956   if test "$CYGWIN" = yes || test "$MINGW32" = yes || test "$EMXOS2" = yes; then
3957   ac_cv_exeext=.exe
3958 else
3959   rm -f conftest*
3960   echo 'int main () { return 0; }' > conftest.$ac_ext
3961   ac_cv_exeext=
3962   if { (eval echo configure:3963: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
3963     for file in conftest.*; do
3964       case $file in
3965       *.c | *.C | *.o | *.obj | *.xcoff) ;;
3966       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
3967       esac
3968     done
3969   else
3970     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
3971   fi
3972   rm -f conftest*
3973   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
3974 fi
3975 fi
3976
3977 EXEEXT=""
3978 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
3979 echo "$ac_t""${ac_cv_exeext}" 1>&6
3980 ac_exeext=$EXEEXT
3981
3982 if test $host != $build; then
3983   ac_tool_prefix=${host_alias}-
3984 else
3985   ac_tool_prefix=
3986 fi
3987
3988
3989
3990
3991 # Check for command to grab the raw symbol name followed by C symbol from nm.
3992 echo $ac_n "checking command to parse $NM output""... $ac_c" 1>&6
3993 echo "configure:3994: checking command to parse $NM output" >&5
3994 if eval "test \"\${lt_cv_sys_global_symbol_pipe+set}\" = set"; then
3995   echo $ac_n "(cached) $ac_c" 1>&6
3996 else
3997   
3998 # These are sane defaults that work on at least a few old systems.
3999 # [They come from Ultrix.  What could be older than Ultrix?!! ;)]
4000
4001 # Character class describing NM global symbol codes.
4002 symcode='[BCDEGRST]'
4003
4004 # Regexp to match symbols that can be accessed directly from C.
4005 sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
4006
4007 # Transform the above into a raw symbol and a C symbol.
4008 symxfrm='\1 \2\3 \3'
4009
4010 # Transform an extracted symbol line into a proper C declaration
4011 lt_cv_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern char \1;/p'"
4012
4013 # Transform an extracted symbol line into symbol name and symbol address
4014 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'"
4015
4016 # Define system-specific variables.
4017 case $host_os in
4018 aix*)
4019   symcode='[BCDT]'
4020   ;;
4021 cygwin* | mingw* | pw32*)
4022   symcode='[ABCDGISTW]'
4023   ;;
4024 hpux*) # Its linker distinguishes data from code symbols
4025   lt_cv_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern char \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
4026   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'"
4027   ;;
4028 irix* | nonstopux*)
4029   symcode='[BCDEGRST]'
4030   ;;
4031 osf*)
4032   symcode='[BCDEGQRST]'
4033   ;;
4034 solaris* | sysv5*)
4035   symcode='[BDT]'
4036   ;;
4037 sysv4)
4038   symcode='[DFNSTU]'
4039   ;;
4040 esac
4041
4042 # Handle CRLF in mingw tool chain
4043 opt_cr=
4044 case $host_os in
4045 mingw*)
4046   opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
4047   ;;
4048 esac
4049
4050 # If we're using GNU nm, then use its standard symbol codes.
4051 if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then
4052   symcode='[ABCDGISTW]'
4053 fi
4054
4055 # Try without a prefix undercore, then with it.
4056 for ac_symprfx in "" "_"; do
4057
4058   # Write the raw and C identifiers.
4059 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[         ]\($symcode$symcode*\)[         ][      ]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'"
4060
4061   # Check to see that the pipe works correctly.
4062   pipe_works=no
4063   rm -f conftest*
4064   cat > conftest.$ac_ext <<EOF
4065 #ifdef __cplusplus
4066 extern "C" {
4067 #endif
4068 char nm_test_var;
4069 void nm_test_func(){}
4070 #ifdef __cplusplus
4071 }
4072 #endif
4073 int main(){nm_test_var='a';nm_test_func();return(0);}
4074 EOF
4075
4076   if { (eval echo configure:4077: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4077     # Now try to grab the symbols.
4078     nlist=conftest.nm
4079     if { (eval echo configure:4080: \"$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
4080       # Try sorting and uniquifying the output.
4081       if sort "$nlist" | uniq > "$nlist"T; then
4082         mv -f "$nlist"T "$nlist"
4083       else
4084         rm -f "$nlist"T
4085       fi
4086
4087       # Make sure that we snagged all the symbols we need.
4088       if egrep ' nm_test_var$' "$nlist" >/dev/null; then
4089         if egrep ' nm_test_func$' "$nlist" >/dev/null; then
4090           cat <<EOF > conftest.$ac_ext
4091 #ifdef __cplusplus
4092 extern "C" {
4093 #endif
4094
4095 EOF
4096           # Now generate the symbol file.
4097           eval "$lt_cv_global_symbol_to_cdecl"' < "$nlist" >> conftest.$ac_ext'
4098
4099           cat <<EOF >> conftest.$ac_ext
4100 #if defined (__STDC__) && __STDC__
4101 # define lt_ptr void *
4102 #else
4103 # define lt_ptr char *
4104 # define const
4105 #endif
4106
4107 /* The mapping between symbol names and symbols. */
4108 const struct {
4109   const char *name;
4110   lt_ptr address;
4111 }
4112 lt_preloaded_symbols[] =
4113 {
4114 EOF
4115           sed "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (lt_ptr) \&\2},/" < "$nlist" >> conftest.$ac_ext
4116           cat <<\EOF >> conftest.$ac_ext
4117   {0, (lt_ptr) 0}
4118 };
4119
4120 #ifdef __cplusplus
4121 }
4122 #endif
4123 EOF
4124           # Now try linking the two files.
4125           mv conftest.$ac_objext conftstm.$ac_objext
4126           save_LIBS="$LIBS"
4127           save_CFLAGS="$CFLAGS"
4128           LIBS="conftstm.$ac_objext"
4129           CFLAGS="$CFLAGS$no_builtin_flag"
4130           if { (eval echo configure:4131: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest$ac_exeext; then
4131             pipe_works=yes
4132           fi
4133           LIBS="$save_LIBS"
4134           CFLAGS="$save_CFLAGS"
4135         else
4136           echo "cannot find nm_test_func in $nlist" >&5
4137         fi
4138       else
4139         echo "cannot find nm_test_var in $nlist" >&5
4140       fi
4141     else
4142       echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5
4143     fi
4144   else
4145     echo "$progname: failed program was:" >&5
4146     cat conftest.$ac_ext >&5
4147   fi
4148   rm -f conftest* conftst*
4149
4150   # Do not use the global_symbol_pipe unless it works.
4151   if test "$pipe_works" = yes; then
4152     break
4153   else
4154     lt_cv_sys_global_symbol_pipe=
4155   fi
4156 done
4157
4158 fi
4159
4160 global_symbol_pipe="$lt_cv_sys_global_symbol_pipe"
4161 if test -z "$lt_cv_sys_global_symbol_pipe"; then
4162   global_symbol_to_cdecl=
4163   global_symbol_to_c_name_address=
4164 else
4165   global_symbol_to_cdecl="$lt_cv_global_symbol_to_cdecl"
4166   global_symbol_to_c_name_address="$lt_cv_global_symbol_to_c_name_address"
4167 fi
4168 if test -z "$global_symbol_pipe$global_symbol_to_cdec$global_symbol_to_c_name_address";
4169 then
4170   echo "$ac_t""failed" 1>&6
4171 else
4172   echo "$ac_t""ok" 1>&6
4173 fi
4174
4175 for ac_hdr in dlfcn.h
4176 do
4177 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4178 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4179 echo "configure:4180: checking for $ac_hdr" >&5
4180 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
4181   echo $ac_n "(cached) $ac_c" 1>&6
4182 else
4183   cat > conftest.$ac_ext <<EOF
4184 #line 4185 "configure"
4185 #include "confdefs.h"
4186 #include <$ac_hdr>
4187 EOF
4188 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4189 { (eval echo configure:4190: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4190 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4191 if test -z "$ac_err"; then
4192   rm -rf conftest*
4193   eval "ac_cv_header_$ac_safe=yes"
4194 else
4195   echo "$ac_err" >&5
4196   echo "configure: failed program was:" >&5
4197   cat conftest.$ac_ext >&5
4198   rm -rf conftest*
4199   eval "ac_cv_header_$ac_safe=no"
4200 fi
4201 rm -f conftest*
4202 fi
4203 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4204   echo "$ac_t""yes" 1>&6
4205     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4206   cat >> confdefs.h <<EOF
4207 #define $ac_tr_hdr 1
4208 EOF
4209  
4210 else
4211   echo "$ac_t""no" 1>&6
4212 fi
4213 done
4214
4215
4216
4217
4218
4219
4220 # Only perform the check for file, if the check method requires it
4221 case $deplibs_check_method in
4222 file_magic*)
4223   if test "$file_magic_cmd" = '$MAGIC_CMD'; then
4224     echo $ac_n "checking for ${ac_tool_prefix}file""... $ac_c" 1>&6
4225 echo "configure:4226: checking for ${ac_tool_prefix}file" >&5
4226 if eval "test \"\${lt_cv_path_MAGIC_CMD+set}\" = set"; then
4227   echo $ac_n "(cached) $ac_c" 1>&6
4228 else
4229   case $MAGIC_CMD in
4230   /*)
4231   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
4232   ;;
4233   ?:/*)
4234   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
4235   ;;
4236   *)
4237   ac_save_MAGIC_CMD="$MAGIC_CMD"
4238   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4239   ac_dummy="/usr/bin:$PATH"
4240   for ac_dir in $ac_dummy; do
4241     test -z "$ac_dir" && ac_dir=.
4242     if test -f $ac_dir/${ac_tool_prefix}file; then
4243       lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file"
4244       if test -n "$file_magic_test_file"; then
4245         case $deplibs_check_method in
4246         "file_magic "*)
4247           file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
4248           MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4249           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
4250             egrep "$file_magic_regex" > /dev/null; then
4251             :
4252           else
4253             cat <<EOF 1>&2
4254
4255 *** Warning: the command libtool uses to detect shared libraries,
4256 *** $file_magic_cmd, produces output that libtool cannot recognize.
4257 *** The result is that libtool may fail to recognize shared libraries
4258 *** as such.  This will affect the creation of libtool libraries that
4259 *** depend on shared libraries, but programs linked with such libtool
4260 *** libraries will work regardless of this problem.  Nevertheless, you
4261 *** may want to report the problem to your system manager and/or to
4262 *** bug-libtool@gnu.org
4263
4264 EOF
4265           fi ;;
4266         esac
4267       fi
4268       break
4269     fi
4270   done
4271   IFS="$ac_save_ifs"
4272   MAGIC_CMD="$ac_save_MAGIC_CMD"
4273   ;;
4274 esac
4275 fi
4276
4277 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4278 if test -n "$MAGIC_CMD"; then
4279   echo "$ac_t""$MAGIC_CMD" 1>&6
4280 else
4281   echo "$ac_t""no" 1>&6
4282 fi
4283
4284 if test -z "$lt_cv_path_MAGIC_CMD"; then
4285   if test -n "$ac_tool_prefix"; then
4286     echo $ac_n "checking for file""... $ac_c" 1>&6
4287 echo "configure:4288: checking for file" >&5
4288 if eval "test \"\${lt_cv_path_MAGIC_CMD+set}\" = set"; then
4289   echo $ac_n "(cached) $ac_c" 1>&6
4290 else
4291   case $MAGIC_CMD in
4292   /*)
4293   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
4294   ;;
4295   ?:/*)
4296   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
4297   ;;
4298   *)
4299   ac_save_MAGIC_CMD="$MAGIC_CMD"
4300   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4301   ac_dummy="/usr/bin:$PATH"
4302   for ac_dir in $ac_dummy; do
4303     test -z "$ac_dir" && ac_dir=.
4304     if test -f $ac_dir/file; then
4305       lt_cv_path_MAGIC_CMD="$ac_dir/file"
4306       if test -n "$file_magic_test_file"; then
4307         case $deplibs_check_method in
4308         "file_magic "*)
4309           file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
4310           MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4311           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
4312             egrep "$file_magic_regex" > /dev/null; then
4313             :
4314           else
4315             cat <<EOF 1>&2
4316
4317 *** Warning: the command libtool uses to detect shared libraries,
4318 *** $file_magic_cmd, produces output that libtool cannot recognize.
4319 *** The result is that libtool may fail to recognize shared libraries
4320 *** as such.  This will affect the creation of libtool libraries that
4321 *** depend on shared libraries, but programs linked with such libtool
4322 *** libraries will work regardless of this problem.  Nevertheless, you
4323 *** may want to report the problem to your system manager and/or to
4324 *** bug-libtool@gnu.org
4325
4326 EOF
4327           fi ;;
4328         esac
4329       fi
4330       break
4331     fi
4332   done
4333   IFS="$ac_save_ifs"
4334   MAGIC_CMD="$ac_save_MAGIC_CMD"
4335   ;;
4336 esac
4337 fi
4338
4339 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4340 if test -n "$MAGIC_CMD"; then
4341   echo "$ac_t""$MAGIC_CMD" 1>&6
4342 else
4343   echo "$ac_t""no" 1>&6
4344 fi
4345
4346   else
4347     MAGIC_CMD=:
4348   fi
4349 fi
4350
4351   fi
4352   ;;
4353 esac
4354
4355 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4356 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
4357 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4358 echo "configure:4359: checking for $ac_word" >&5
4359 if eval "test \"\${ac_cv_prog_RANLIB+set}\" = set"; then
4360   echo $ac_n "(cached) $ac_c" 1>&6
4361 else
4362   if test -n "$RANLIB"; then
4363   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4364 else
4365   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4366   ac_dummy="$PATH"
4367   for ac_dir in $ac_dummy; do
4368     test -z "$ac_dir" && ac_dir=.
4369     if test -f $ac_dir/$ac_word; then
4370       ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4371       break
4372     fi
4373   done
4374   IFS="$ac_save_ifs"
4375 fi
4376 fi
4377 RANLIB="$ac_cv_prog_RANLIB"
4378 if test -n "$RANLIB"; then
4379   echo "$ac_t""$RANLIB" 1>&6
4380 else
4381   echo "$ac_t""no" 1>&6
4382 fi
4383
4384
4385 if test -z "$ac_cv_prog_RANLIB"; then
4386 if test -n "$ac_tool_prefix"; then
4387   # Extract the first word of "ranlib", so it can be a program name with args.
4388 set dummy ranlib; ac_word=$2
4389 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4390 echo "configure:4391: checking for $ac_word" >&5
4391 if eval "test \"\${ac_cv_prog_RANLIB+set}\" = set"; then
4392   echo $ac_n "(cached) $ac_c" 1>&6
4393 else
4394   if test -n "$RANLIB"; then
4395   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4396 else
4397   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4398   ac_dummy="$PATH"
4399   for ac_dir in $ac_dummy; do
4400     test -z "$ac_dir" && ac_dir=.
4401     if test -f $ac_dir/$ac_word; then
4402       ac_cv_prog_RANLIB="ranlib"
4403       break
4404     fi
4405   done
4406   IFS="$ac_save_ifs"
4407   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
4408 fi
4409 fi
4410 RANLIB="$ac_cv_prog_RANLIB"
4411 if test -n "$RANLIB"; then
4412   echo "$ac_t""$RANLIB" 1>&6
4413 else
4414   echo "$ac_t""no" 1>&6
4415 fi
4416
4417 else
4418   RANLIB=":"
4419 fi
4420 fi
4421
4422 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
4423 set dummy ${ac_tool_prefix}strip; ac_word=$2
4424 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4425 echo "configure:4426: checking for $ac_word" >&5
4426 if eval "test \"\${ac_cv_prog_STRIP+set}\" = set"; then
4427   echo $ac_n "(cached) $ac_c" 1>&6
4428 else
4429   if test -n "$STRIP"; then
4430   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
4431 else
4432   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4433   ac_dummy="$PATH"
4434   for ac_dir in $ac_dummy; do
4435     test -z "$ac_dir" && ac_dir=.
4436     if test -f $ac_dir/$ac_word; then
4437       ac_cv_prog_STRIP="${ac_tool_prefix}strip"
4438       break
4439     fi
4440   done
4441   IFS="$ac_save_ifs"
4442 fi
4443 fi
4444 STRIP="$ac_cv_prog_STRIP"
4445 if test -n "$STRIP"; then
4446   echo "$ac_t""$STRIP" 1>&6
4447 else
4448   echo "$ac_t""no" 1>&6
4449 fi
4450
4451
4452 if test -z "$ac_cv_prog_STRIP"; then
4453 if test -n "$ac_tool_prefix"; then
4454   # Extract the first word of "strip", so it can be a program name with args.
4455 set dummy strip; ac_word=$2
4456 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4457 echo "configure:4458: checking for $ac_word" >&5
4458 if eval "test \"\${ac_cv_prog_STRIP+set}\" = set"; then
4459   echo $ac_n "(cached) $ac_c" 1>&6
4460 else
4461   if test -n "$STRIP"; then
4462   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
4463 else
4464   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4465   ac_dummy="$PATH"
4466   for ac_dir in $ac_dummy; do
4467     test -z "$ac_dir" && ac_dir=.
4468     if test -f $ac_dir/$ac_word; then
4469       ac_cv_prog_STRIP="strip"
4470       break
4471     fi
4472   done
4473   IFS="$ac_save_ifs"
4474   test -z "$ac_cv_prog_STRIP" && ac_cv_prog_STRIP=":"
4475 fi
4476 fi
4477 STRIP="$ac_cv_prog_STRIP"
4478 if test -n "$STRIP"; then
4479   echo "$ac_t""$STRIP" 1>&6
4480 else
4481   echo "$ac_t""no" 1>&6
4482 fi
4483
4484 else
4485   STRIP=":"
4486 fi
4487 fi
4488
4489
4490 enable_dlopen=yes
4491 enable_win32_dll=yes
4492
4493 # Check whether --enable-libtool-lock or --disable-libtool-lock was given.
4494 if test "${enable_libtool_lock+set}" = set; then
4495   enableval="$enable_libtool_lock"
4496   :
4497 fi
4498
4499 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
4500
4501 # Some flags need to be propagated to the compiler or linker for good
4502 # libtool support.
4503 case $host in
4504 *-*-irix6*)
4505   # Find out which ABI we are using.
4506   echo '#line 4507 "configure"' > conftest.$ac_ext
4507   if { (eval echo configure:4508: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4508     case `/usr/bin/file conftest.$ac_objext` in
4509     *32-bit*)
4510       LD="${LD-ld} -32"
4511       ;;
4512     *N32*)
4513       LD="${LD-ld} -n32"
4514       ;;
4515     *64-bit*)
4516       LD="${LD-ld} -64"
4517       ;;
4518     esac
4519   fi
4520   rm -rf conftest*
4521   ;;
4522
4523 *-*-sco3.2v5*)
4524   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
4525   SAVE_CFLAGS="$CFLAGS"
4526   CFLAGS="$CFLAGS -belf"
4527   echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
4528 echo "configure:4529: checking whether the C compiler needs -belf" >&5
4529 if eval "test \"\${lt_cv_cc_needs_belf+set}\" = set"; then
4530   echo $ac_n "(cached) $ac_c" 1>&6
4531 else
4532   
4533      ac_ext=c
4534 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
4535 ac_cpp='$CPP $CPPFLAGS'
4536 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
4537 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
4538 cross_compiling=$ac_cv_prog_cc_cross
4539
4540      cat > conftest.$ac_ext <<EOF
4541 #line 4542 "configure"
4542 #include "confdefs.h"
4543
4544 int main() {
4545
4546 ; return 0; }
4547 EOF
4548 if { (eval echo configure:4549: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4549   rm -rf conftest*
4550   lt_cv_cc_needs_belf=yes
4551 else
4552   echo "configure: failed program was:" >&5
4553   cat conftest.$ac_ext >&5
4554   rm -rf conftest*
4555   lt_cv_cc_needs_belf=no
4556 fi
4557 rm -f conftest*
4558      ac_ext=c
4559 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
4560 ac_cpp='$CPP $CPPFLAGS'
4561 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
4562 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
4563 cross_compiling=$ac_cv_prog_cc_cross
4564
4565 fi
4566
4567 echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6
4568   if test x"$lt_cv_cc_needs_belf" != x"yes"; then
4569     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
4570     CFLAGS="$SAVE_CFLAGS"
4571   fi
4572   ;;
4573
4574 *-*-cygwin* | *-*-mingw* | *-*-pw32*)
4575   # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
4576 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
4577 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4578 echo "configure:4579: checking for $ac_word" >&5
4579 if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then
4580   echo $ac_n "(cached) $ac_c" 1>&6
4581 else
4582   if test -n "$DLLTOOL"; then
4583   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
4584 else
4585   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4586   ac_dummy="$PATH"
4587   for ac_dir in $ac_dummy; do
4588     test -z "$ac_dir" && ac_dir=.
4589     if test -f $ac_dir/$ac_word; then
4590       ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
4591       break
4592     fi
4593   done
4594   IFS="$ac_save_ifs"
4595 fi
4596 fi
4597 DLLTOOL="$ac_cv_prog_DLLTOOL"
4598 if test -n "$DLLTOOL"; then
4599   echo "$ac_t""$DLLTOOL" 1>&6
4600 else
4601   echo "$ac_t""no" 1>&6
4602 fi
4603
4604
4605 if test -z "$ac_cv_prog_DLLTOOL"; then
4606 if test -n "$ac_tool_prefix"; then
4607   # Extract the first word of "dlltool", so it can be a program name with args.
4608 set dummy dlltool; ac_word=$2
4609 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4610 echo "configure:4611: checking for $ac_word" >&5
4611 if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then
4612   echo $ac_n "(cached) $ac_c" 1>&6
4613 else
4614   if test -n "$DLLTOOL"; then
4615   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
4616 else
4617   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4618   ac_dummy="$PATH"
4619   for ac_dir in $ac_dummy; do
4620     test -z "$ac_dir" && ac_dir=.
4621     if test -f $ac_dir/$ac_word; then
4622       ac_cv_prog_DLLTOOL="dlltool"
4623       break
4624     fi
4625   done
4626   IFS="$ac_save_ifs"
4627   test -z "$ac_cv_prog_DLLTOOL" && ac_cv_prog_DLLTOOL="false"
4628 fi
4629 fi
4630 DLLTOOL="$ac_cv_prog_DLLTOOL"
4631 if test -n "$DLLTOOL"; then
4632   echo "$ac_t""$DLLTOOL" 1>&6
4633 else
4634   echo "$ac_t""no" 1>&6
4635 fi
4636
4637 else
4638   DLLTOOL="false"
4639 fi
4640 fi
4641
4642   # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
4643 set dummy ${ac_tool_prefix}as; ac_word=$2
4644 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4645 echo "configure:4646: checking for $ac_word" >&5
4646 if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then
4647   echo $ac_n "(cached) $ac_c" 1>&6
4648 else
4649   if test -n "$AS"; then
4650   ac_cv_prog_AS="$AS" # Let the user override the test.
4651 else
4652   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4653   ac_dummy="$PATH"
4654   for ac_dir in $ac_dummy; do
4655     test -z "$ac_dir" && ac_dir=.
4656     if test -f $ac_dir/$ac_word; then
4657       ac_cv_prog_AS="${ac_tool_prefix}as"
4658       break
4659     fi
4660   done
4661   IFS="$ac_save_ifs"
4662 fi
4663 fi
4664 AS="$ac_cv_prog_AS"
4665 if test -n "$AS"; then
4666   echo "$ac_t""$AS" 1>&6
4667 else
4668   echo "$ac_t""no" 1>&6
4669 fi
4670
4671
4672 if test -z "$ac_cv_prog_AS"; then
4673 if test -n "$ac_tool_prefix"; then
4674   # Extract the first word of "as", so it can be a program name with args.
4675 set dummy as; ac_word=$2
4676 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4677 echo "configure:4678: checking for $ac_word" >&5
4678 if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then
4679   echo $ac_n "(cached) $ac_c" 1>&6
4680 else
4681   if test -n "$AS"; then
4682   ac_cv_prog_AS="$AS" # Let the user override the test.
4683 else
4684   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4685   ac_dummy="$PATH"
4686   for ac_dir in $ac_dummy; do
4687     test -z "$ac_dir" && ac_dir=.
4688     if test -f $ac_dir/$ac_word; then
4689       ac_cv_prog_AS="as"
4690       break
4691     fi
4692   done
4693   IFS="$ac_save_ifs"
4694   test -z "$ac_cv_prog_AS" && ac_cv_prog_AS="false"
4695 fi
4696 fi
4697 AS="$ac_cv_prog_AS"
4698 if test -n "$AS"; then
4699   echo "$ac_t""$AS" 1>&6
4700 else
4701   echo "$ac_t""no" 1>&6
4702 fi
4703
4704 else
4705   AS="false"
4706 fi
4707 fi
4708
4709   # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
4710 set dummy ${ac_tool_prefix}objdump; ac_word=$2
4711 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4712 echo "configure:4713: checking for $ac_word" >&5
4713 if eval "test \"\${ac_cv_prog_OBJDUMP+set}\" = set"; then
4714   echo $ac_n "(cached) $ac_c" 1>&6
4715 else
4716   if test -n "$OBJDUMP"; then
4717   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
4718 else
4719   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4720   ac_dummy="$PATH"
4721   for ac_dir in $ac_dummy; do
4722     test -z "$ac_dir" && ac_dir=.
4723     if test -f $ac_dir/$ac_word; then
4724       ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
4725       break
4726     fi
4727   done
4728   IFS="$ac_save_ifs"
4729 fi
4730 fi
4731 OBJDUMP="$ac_cv_prog_OBJDUMP"
4732 if test -n "$OBJDUMP"; then
4733   echo "$ac_t""$OBJDUMP" 1>&6
4734 else
4735   echo "$ac_t""no" 1>&6
4736 fi
4737
4738
4739 if test -z "$ac_cv_prog_OBJDUMP"; then
4740 if test -n "$ac_tool_prefix"; then
4741   # Extract the first word of "objdump", so it can be a program name with args.
4742 set dummy objdump; ac_word=$2
4743 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4744 echo "configure:4745: checking for $ac_word" >&5
4745 if eval "test \"\${ac_cv_prog_OBJDUMP+set}\" = set"; then
4746   echo $ac_n "(cached) $ac_c" 1>&6
4747 else
4748   if test -n "$OBJDUMP"; then
4749   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
4750 else
4751   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4752   ac_dummy="$PATH"
4753   for ac_dir in $ac_dummy; do
4754     test -z "$ac_dir" && ac_dir=.
4755     if test -f $ac_dir/$ac_word; then
4756       ac_cv_prog_OBJDUMP="objdump"
4757       break
4758     fi
4759   done
4760   IFS="$ac_save_ifs"
4761   test -z "$ac_cv_prog_OBJDUMP" && ac_cv_prog_OBJDUMP="false"
4762 fi
4763 fi
4764 OBJDUMP="$ac_cv_prog_OBJDUMP"
4765 if test -n "$OBJDUMP"; then
4766   echo "$ac_t""$OBJDUMP" 1>&6
4767 else
4768   echo "$ac_t""no" 1>&6
4769 fi
4770
4771 else
4772   OBJDUMP="false"
4773 fi
4774 fi
4775
4776
4777   # recent cygwin and mingw systems supply a stub DllMain which the user
4778   # can override, but on older systems we have to supply one
4779   echo $ac_n "checking if libtool should supply DllMain function""... $ac_c" 1>&6
4780 echo "configure:4781: checking if libtool should supply DllMain function" >&5
4781 if eval "test \"\${lt_cv_need_dllmain+set}\" = set"; then
4782   echo $ac_n "(cached) $ac_c" 1>&6
4783 else
4784   cat > conftest.$ac_ext <<EOF
4785 #line 4786 "configure"
4786 #include "confdefs.h"
4787
4788 int main() {
4789 extern int __attribute__((__stdcall__)) DllMain(void*, int, void*);
4790       DllMain (0, 0, 0);
4791 ; return 0; }
4792 EOF
4793 if { (eval echo configure:4794: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4794   rm -rf conftest*
4795   lt_cv_need_dllmain=no
4796 else
4797   echo "configure: failed program was:" >&5
4798   cat conftest.$ac_ext >&5
4799   rm -rf conftest*
4800   lt_cv_need_dllmain=yes
4801 fi
4802 rm -f conftest*
4803 fi
4804
4805 echo "$ac_t""$lt_cv_need_dllmain" 1>&6
4806
4807   case $host/$CC in
4808   *-*-cygwin*/gcc*-mno-cygwin*|*-*-mingw*)
4809     # old mingw systems require "-dll" to link a DLL, while more recent ones
4810     # require "-mdll"
4811     SAVE_CFLAGS="$CFLAGS"
4812     CFLAGS="$CFLAGS -mdll"
4813     echo $ac_n "checking how to link DLLs""... $ac_c" 1>&6
4814 echo "configure:4815: checking how to link DLLs" >&5
4815 if eval "test \"\${lt_cv_cc_dll_switch+set}\" = set"; then
4816   echo $ac_n "(cached) $ac_c" 1>&6
4817 else
4818   cat > conftest.$ac_ext <<EOF
4819 #line 4820 "configure"
4820 #include "confdefs.h"
4821
4822 int main() {
4823
4824 ; return 0; }
4825 EOF
4826 if { (eval echo configure:4827: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4827   rm -rf conftest*
4828   lt_cv_cc_dll_switch=-mdll
4829 else
4830   echo "configure: failed program was:" >&5
4831   cat conftest.$ac_ext >&5
4832   rm -rf conftest*
4833   lt_cv_cc_dll_switch=-dll
4834 fi
4835 rm -f conftest*
4836 fi
4837
4838 echo "$ac_t""$lt_cv_cc_dll_switch" 1>&6
4839     CFLAGS="$SAVE_CFLAGS" ;;
4840   *-*-cygwin* | *-*-pw32*)
4841     # cygwin systems need to pass --dll to the linker, and not link
4842     # crt.o which will require a WinMain@16 definition.
4843     lt_cv_cc_dll_switch="-Wl,--dll -nostartfiles" ;;
4844   esac
4845   ;;
4846   
4847 esac
4848
4849 # Sed substitution that helps us do robust quoting.  It backslashifies
4850 # metacharacters that are still active within double-quoted strings.
4851 Xsed='sed -e s/^X//'
4852 sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g'
4853
4854 # Same as above, but do not quote variable references.
4855 double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g'
4856
4857 # Sed substitution to delay expansion of an escaped shell variable in a
4858 # double_quote_subst'ed string.
4859 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
4860
4861 # Constants:
4862 rm="rm -f"
4863
4864 # Global variables:
4865 default_ofile=libtool
4866 can_build_shared=yes
4867
4868 # All known linkers require a `.a' archive for static linking (except M$VC,
4869 # which needs '.lib').
4870 libext=a
4871 ltmain="$ac_aux_dir/ltmain.sh"
4872 ofile="$default_ofile"
4873 with_gnu_ld="$lt_cv_prog_gnu_ld"
4874 need_locks="$enable_libtool_lock"
4875
4876 old_CC="$CC"
4877 old_CFLAGS="$CFLAGS"
4878
4879 # Set sane defaults for various variables
4880 test -z "$AR" && AR=ar
4881 test -z "$AR_FLAGS" && AR_FLAGS=cru
4882 test -z "$AS" && AS=as
4883 test -z "$CC" && CC=cc
4884 test -z "$DLLTOOL" && DLLTOOL=dlltool
4885 test -z "$LD" && LD=ld
4886 test -z "$LN_S" && LN_S="ln -s"
4887 test -z "$MAGIC_CMD" && MAGIC_CMD=file
4888 test -z "$NM" && NM=nm
4889 test -z "$OBJDUMP" && OBJDUMP=objdump
4890 test -z "$RANLIB" && RANLIB=:
4891 test -z "$STRIP" && STRIP=:
4892 test -z "$ac_objext" && ac_objext=o
4893
4894 if test x"$host" != x"$build"; then
4895   ac_tool_prefix=${host_alias}-
4896 else
4897   ac_tool_prefix=
4898 fi
4899
4900 # Transform linux* to *-*-linux-gnu*, to support old configure scripts.
4901 case $host_os in
4902 linux-gnu*) ;;
4903 linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
4904 esac
4905
4906 case $host_os in
4907 aix3*)
4908   # AIX sometimes has problems with the GCC collect2 program.  For some
4909   # reason, if we set the COLLECT_NAMES environment variable, the problems
4910   # vanish in a puff of smoke.
4911   if test "X${COLLECT_NAMES+set}" != Xset; then
4912     COLLECT_NAMES=
4913     export COLLECT_NAMES
4914   fi
4915   ;;
4916 esac
4917
4918 # Determine commands to create old-style static archives.
4919 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
4920 old_postinstall_cmds='chmod 644 $oldlib'
4921 old_postuninstall_cmds=
4922
4923 if test -n "$RANLIB"; then
4924   case $host_os in
4925   openbsd*)
4926     old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds"
4927     ;;
4928   *)
4929     old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
4930     ;;
4931   esac
4932   old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
4933 fi
4934
4935 # Allow CC to be a program name with arguments.
4936 set dummy $CC
4937 compiler="$2"
4938
4939 echo $ac_n "checking for objdir""... $ac_c" 1>&6
4940 echo "configure:4941: checking for objdir" >&5
4941 rm -f .libs 2>/dev/null
4942 mkdir .libs 2>/dev/null
4943 if test -d .libs; then
4944   objdir=.libs
4945 else
4946   # MS-DOS does not allow filenames that begin with a dot.
4947   objdir=_libs
4948 fi
4949 rmdir .libs 2>/dev/null
4950 echo "$ac_t""$objdir" 1>&6
4951
4952
4953 # Check whether --with-pic or --without-pic was given.
4954 if test "${with_pic+set}" = set; then
4955   withval="$with_pic"
4956   pic_mode="$withval"
4957 else
4958   pic_mode=default
4959 fi
4960
4961 test -z "$pic_mode" && pic_mode=default
4962
4963 # We assume here that the value for lt_cv_prog_cc_pic will not be cached
4964 # in isolation, and that seeing it set (from the cache) indicates that
4965 # the associated values are set (in the cache) correctly too.
4966 echo $ac_n "checking for $compiler option to produce PIC""... $ac_c" 1>&6
4967 echo "configure:4968: checking for $compiler option to produce PIC" >&5
4968 if eval "test \"\${lt_cv_prog_cc_pic+set}\" = set"; then
4969   echo $ac_n "(cached) $ac_c" 1>&6
4970 else
4971    lt_cv_prog_cc_pic=
4972   lt_cv_prog_cc_shlib=
4973   lt_cv_prog_cc_wl=
4974   lt_cv_prog_cc_static=
4975   lt_cv_prog_cc_no_builtin=
4976   lt_cv_prog_cc_can_build_shared=$can_build_shared
4977
4978   if test "$GCC" = yes; then
4979     lt_cv_prog_cc_wl='-Wl,'
4980     lt_cv_prog_cc_static='-static'
4981
4982     case $host_os in
4983     aix*)
4984       # Below there is a dirty hack to force normal static linking with -ldl
4985       # The problem is because libdl dynamically linked with both libc and
4986       # libC (AIX C++ library), which obviously doesn't included in libraries
4987       # list by gcc. This cause undefined symbols with -static flags.
4988       # This hack allows C programs to be linked with "-static -ldl", but
4989       # not sure about C++ programs.
4990       lt_cv_prog_cc_static="$lt_cv_prog_cc_static ${lt_cv_prog_cc_wl}-lC"
4991       ;;
4992     amigaos*)
4993       # FIXME: we need at least 68020 code to build shared libraries, but
4994       # adding the `-m68020' flag to GCC prevents building anything better,
4995       # like `-m68040'.
4996       lt_cv_prog_cc_pic='-m68020 -resident32 -malways-restore-a4'
4997       ;;
4998     beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
4999       # PIC is the default for these OSes.
5000       ;;
5001     darwin* | rhapsody*)
5002       # PIC is the default on this platform
5003       # Common symbols not allowed in MH_DYLIB files
5004       lt_cv_prog_cc_pic='-fno-common'
5005       ;;
5006     cygwin* | mingw* | pw32* | os2*)
5007       # This hack is so that the source file can tell whether it is being
5008       # built for inclusion in a dll (and should export symbols for example).
5009       lt_cv_prog_cc_pic='-DDLL_EXPORT'
5010       ;;
5011     sysv4*MP*)
5012       if test -d /usr/nec; then
5013          lt_cv_prog_cc_pic=-Kconform_pic
5014       fi
5015       ;;
5016     *)
5017       lt_cv_prog_cc_pic='-fPIC'
5018       ;;
5019     esac
5020   else
5021     # PORTME Check for PIC flags for the system compiler.
5022     case $host_os in
5023     aix3* | aix4* | aix5*)
5024       lt_cv_prog_cc_wl='-Wl,'
5025       # All AIX code is PIC.
5026       if test "$host_cpu" = ia64; then
5027         # AIX 5 now supports IA64 processor
5028         lt_cv_prog_cc_static='-Bstatic'
5029       else
5030         lt_cv_prog_cc_static='-bnso -bI:/lib/syscalls.exp'
5031       fi
5032       ;;
5033
5034     hpux9* | hpux10* | hpux11*)
5035       # Is there a better lt_cv_prog_cc_static that works with the bundled CC?
5036       lt_cv_prog_cc_wl='-Wl,'
5037       lt_cv_prog_cc_static="${lt_cv_prog_cc_wl}-a ${lt_cv_prog_cc_wl}archive"
5038       lt_cv_prog_cc_pic='+Z'
5039       ;;
5040
5041     irix5* | irix6* | nonstopux*)
5042       lt_cv_prog_cc_wl='-Wl,'
5043       lt_cv_prog_cc_static='-non_shared'
5044       # PIC (with -KPIC) is the default.
5045       ;;
5046
5047     cygwin* | mingw* | pw32* | os2*)
5048       # This hack is so that the source file can tell whether it is being
5049       # built for inclusion in a dll (and should export symbols for example).
5050       lt_cv_prog_cc_pic='-DDLL_EXPORT'
5051       ;;
5052
5053     newsos6)
5054       lt_cv_prog_cc_pic='-KPIC'
5055       lt_cv_prog_cc_static='-Bstatic'
5056       ;;
5057     
5058     openedition)
5059       # XPLINK code is PIC by default
5060       ;;
5061
5062     osf3* | osf4* | osf5*)
5063       # All OSF/1 code is PIC.
5064       lt_cv_prog_cc_wl='-Wl,'
5065       lt_cv_prog_cc_static='-non_shared'
5066       ;;
5067
5068     sco3.2v5*)
5069       lt_cv_prog_cc_pic='-Kpic'
5070       lt_cv_prog_cc_static='-dn'
5071       lt_cv_prog_cc_shlib='-belf'
5072       ;;
5073
5074     solaris*)
5075       lt_cv_prog_cc_pic='-KPIC'
5076       lt_cv_prog_cc_static='-Bstatic'
5077       lt_cv_prog_cc_wl='-Wl,'
5078       ;;
5079
5080     sunos4*)
5081       lt_cv_prog_cc_pic='-PIC'
5082       lt_cv_prog_cc_static='-Bstatic'
5083       lt_cv_prog_cc_wl='-Qoption ld '
5084       ;;
5085
5086     sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
5087       lt_cv_prog_cc_pic='-KPIC'
5088       lt_cv_prog_cc_static='-Bstatic'
5089       lt_cv_prog_cc_wl='-Wl,'
5090       ;;
5091
5092     uts4*)
5093       lt_cv_prog_cc_pic='-pic'
5094       lt_cv_prog_cc_static='-Bstatic'
5095       ;;
5096
5097     sysv4*MP*)
5098       if test -d /usr/nec ;then
5099         lt_cv_prog_cc_pic='-Kconform_pic'
5100         lt_cv_prog_cc_static='-Bstatic'
5101       fi
5102       ;;
5103
5104     *)
5105       lt_cv_prog_cc_can_build_shared=no
5106       ;;
5107     esac
5108   fi
5109
5110 fi
5111
5112 if test -z "$lt_cv_prog_cc_pic"; then
5113   echo "$ac_t""none" 1>&6
5114 else
5115   echo "$ac_t""$lt_cv_prog_cc_pic" 1>&6
5116
5117   # Check to make sure the pic_flag actually works.
5118   echo $ac_n "checking if $compiler PIC flag $lt_cv_prog_cc_pic works""... $ac_c" 1>&6
5119 echo "configure:5120: checking if $compiler PIC flag $lt_cv_prog_cc_pic works" >&5
5120   if eval "test \"\${lt_cv_prog_cc_pic_works+set}\" = set"; then
5121   echo $ac_n "(cached) $ac_c" 1>&6
5122 else
5123       save_CFLAGS="$CFLAGS"
5124     CFLAGS="$CFLAGS $lt_cv_prog_cc_pic -DPIC"
5125     cat > conftest.$ac_ext <<EOF
5126 #line 5127 "configure"
5127 #include "confdefs.h"
5128
5129 int main() {
5130
5131 ; return 0; }
5132 EOF
5133 if { (eval echo configure:5134: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5134   rm -rf conftest*
5135         case $host_os in
5136       hpux9* | hpux10* | hpux11*)
5137         # On HP-UX, both CC and GCC only warn that PIC is supported... then
5138         # they create non-PIC objects.  So, if there were any warnings, we
5139         # assume that PIC is not supported.
5140         if test -s conftest.err; then
5141           lt_cv_prog_cc_pic_works=no
5142         else
5143           lt_cv_prog_cc_pic_works=yes
5144         fi
5145         ;;
5146       *)
5147         lt_cv_prog_cc_pic_works=yes
5148         ;;
5149       esac
5150     
5151 else
5152   echo "configure: failed program was:" >&5
5153   cat conftest.$ac_ext >&5
5154   rm -rf conftest*
5155         lt_cv_prog_cc_pic_works=no
5156     
5157 fi
5158 rm -f conftest*
5159     CFLAGS="$save_CFLAGS"
5160   
5161 fi
5162
5163
5164   if test "X$lt_cv_prog_cc_pic_works" = Xno; then
5165     lt_cv_prog_cc_pic=
5166     lt_cv_prog_cc_can_build_shared=no
5167   else
5168     lt_cv_prog_cc_pic=" $lt_cv_prog_cc_pic"
5169   fi
5170
5171   echo "$ac_t""$lt_cv_prog_cc_pic_works" 1>&6
5172 fi
5173
5174 # Check for any special shared library compilation flags.
5175 if test -n "$lt_cv_prog_cc_shlib"; then
5176   echo "configure: warning: \`$CC' requires \`$lt_cv_prog_cc_shlib' to build shared libraries" 1>&2
5177   if echo "$old_CC $old_CFLAGS " | egrep -e "[  ]$lt_cv_prog_cc_shlib[  ]" >/dev/null; then :
5178   else
5179    echo "configure: warning: add \`$lt_cv_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure" 1>&2
5180     lt_cv_prog_cc_can_build_shared=no
5181   fi
5182 fi
5183
5184 echo $ac_n "checking if $compiler static flag $lt_cv_prog_cc_static works""... $ac_c" 1>&6
5185 echo "configure:5186: checking if $compiler static flag $lt_cv_prog_cc_static works" >&5
5186 if eval "test \"\${lt_cv_prog_cc_static_works+set}\" = set"; then
5187   echo $ac_n "(cached) $ac_c" 1>&6
5188 else
5189     lt_cv_prog_cc_static_works=no
5190   save_LDFLAGS="$LDFLAGS"
5191   LDFLAGS="$LDFLAGS $lt_cv_prog_cc_static"
5192   cat > conftest.$ac_ext <<EOF
5193 #line 5194 "configure"
5194 #include "confdefs.h"
5195
5196 int main() {
5197
5198 ; return 0; }
5199 EOF
5200 if { (eval echo configure:5201: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5201   rm -rf conftest*
5202   lt_cv_prog_cc_static_works=yes
5203 else
5204   echo "configure: failed program was:" >&5
5205   cat conftest.$ac_ext >&5
5206 fi
5207 rm -f conftest*
5208   LDFLAGS="$save_LDFLAGS"
5209
5210 fi
5211
5212
5213 # Belt *and* braces to stop my trousers falling down:
5214 test "X$lt_cv_prog_cc_static_works" = Xno && lt_cv_prog_cc_static=
5215 echo "$ac_t""$lt_cv_prog_cc_static_works" 1>&6
5216
5217 pic_flag="$lt_cv_prog_cc_pic"
5218 special_shlib_compile_flags="$lt_cv_prog_cc_shlib"
5219 wl="$lt_cv_prog_cc_wl"
5220 link_static_flag="$lt_cv_prog_cc_static"
5221 no_builtin_flag="$lt_cv_prog_cc_no_builtin"
5222 can_build_shared="$lt_cv_prog_cc_can_build_shared"
5223
5224
5225 # Check to see if options -o and -c are simultaneously supported by compiler
5226 echo $ac_n "checking if $compiler supports -c -o file.$ac_objext""... $ac_c" 1>&6
5227 echo "configure:5228: checking if $compiler supports -c -o file.$ac_objext" >&5
5228 if eval "test \"\${lt_cv_compiler_c_o+set}\" = set"; then
5229   echo $ac_n "(cached) $ac_c" 1>&6
5230 else
5231   
5232 $rm -r conftest 2>/dev/null
5233 mkdir conftest
5234 cd conftest
5235 echo "int some_variable = 0;" > conftest.$ac_ext
5236 mkdir out
5237 # According to Tom Tromey, Ian Lance Taylor reported there are C compilers
5238 # that will create temporary files in the current directory regardless of
5239 # the output directory.  Thus, making CWD read-only will cause this test
5240 # to fail, enabling locking or at least warning the user not to do parallel
5241 # builds.
5242 chmod -w .
5243 save_CFLAGS="$CFLAGS"
5244 CFLAGS="$CFLAGS -o out/conftest2.$ac_objext"
5245 compiler_c_o=no
5246 if { (eval echo configure:5247: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then
5247   # The compiler can only warn and ignore the option if not recognized
5248   # So say no if there are warnings
5249   if test -s out/conftest.err; then
5250     lt_cv_compiler_c_o=no
5251   else
5252     lt_cv_compiler_c_o=yes
5253   fi
5254 else
5255   # Append any errors to the config.log.
5256   cat out/conftest.err 1>&5
5257   lt_cv_compiler_c_o=no
5258 fi
5259 CFLAGS="$save_CFLAGS"
5260 chmod u+w .
5261 $rm conftest* out/*
5262 rmdir out
5263 cd ..
5264 rmdir conftest
5265 $rm -r conftest 2>/dev/null
5266
5267 fi
5268
5269 compiler_c_o=$lt_cv_compiler_c_o
5270 echo "$ac_t""$compiler_c_o" 1>&6
5271
5272 if test x"$compiler_c_o" = x"yes"; then
5273   # Check to see if we can write to a .lo
5274   echo $ac_n "checking if $compiler supports -c -o file.lo""... $ac_c" 1>&6
5275 echo "configure:5276: checking if $compiler supports -c -o file.lo" >&5
5276   if eval "test \"\${lt_cv_compiler_o_lo+set}\" = set"; then
5277   echo $ac_n "(cached) $ac_c" 1>&6
5278 else
5279   
5280   lt_cv_compiler_o_lo=no
5281   save_CFLAGS="$CFLAGS"
5282   CFLAGS="$CFLAGS -c -o conftest.lo"
5283   save_objext="$ac_objext"
5284   ac_objext=lo
5285   cat > conftest.$ac_ext <<EOF
5286 #line 5287 "configure"
5287 #include "confdefs.h"
5288
5289 int main() {
5290 int some_variable = 0;
5291 ; return 0; }
5292 EOF
5293 if { (eval echo configure:5294: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5294   rm -rf conftest*
5295       # The compiler can only warn and ignore the option if not recognized
5296     # So say no if there are warnings
5297     if test -s conftest.err; then
5298       lt_cv_compiler_o_lo=no
5299     else
5300       lt_cv_compiler_o_lo=yes
5301     fi
5302   
5303 else
5304   echo "configure: failed program was:" >&5
5305   cat conftest.$ac_ext >&5
5306 fi
5307 rm -f conftest*
5308   ac_objext="$save_objext"
5309   CFLAGS="$save_CFLAGS"
5310   
5311 fi
5312
5313   compiler_o_lo=$lt_cv_compiler_o_lo
5314   echo "$ac_t""$compiler_o_lo" 1>&6
5315 else
5316   compiler_o_lo=no
5317 fi
5318
5319 # Check to see if we can do hard links to lock some files if needed
5320 hard_links="nottested"
5321 if test "$compiler_c_o" = no && test "$need_locks" != no; then
5322   # do not overwrite the value of need_locks provided by the user
5323   echo $ac_n "checking if we can lock with hard links""... $ac_c" 1>&6
5324 echo "configure:5325: checking if we can lock with hard links" >&5
5325   hard_links=yes
5326   $rm conftest*
5327   ln conftest.a conftest.b 2>/dev/null && hard_links=no
5328   touch conftest.a
5329   ln conftest.a conftest.b 2>&5 || hard_links=no
5330   ln conftest.a conftest.b 2>/dev/null && hard_links=no
5331   echo "$ac_t""$hard_links" 1>&6
5332   if test "$hard_links" = no; then
5333     echo "configure: warning: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" 1>&2
5334     need_locks=warn
5335   fi
5336 else
5337   need_locks=no
5338 fi
5339
5340 if test "$GCC" = yes; then
5341   # Check to see if options -fno-rtti -fno-exceptions are supported by compiler
5342   echo $ac_n "checking if $compiler supports -fno-rtti -fno-exceptions""... $ac_c" 1>&6
5343 echo "configure:5344: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
5344   echo "int some_variable = 0;" > conftest.$ac_ext
5345   save_CFLAGS="$CFLAGS"
5346   CFLAGS="$CFLAGS -fno-rtti -fno-exceptions -c conftest.$ac_ext"
5347   compiler_rtti_exceptions=no
5348   cat > conftest.$ac_ext <<EOF
5349 #line 5350 "configure"
5350 #include "confdefs.h"
5351
5352 int main() {
5353 int some_variable = 0;
5354 ; return 0; }
5355 EOF
5356 if { (eval echo configure:5357: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5357   rm -rf conftest*
5358       # The compiler can only warn and ignore the option if not recognized
5359     # So say no if there are warnings
5360     if test -s conftest.err; then
5361       compiler_rtti_exceptions=no
5362     else
5363       compiler_rtti_exceptions=yes
5364     fi
5365   
5366 else
5367   echo "configure: failed program was:" >&5
5368   cat conftest.$ac_ext >&5
5369 fi
5370 rm -f conftest*
5371   CFLAGS="$save_CFLAGS"
5372   echo "$ac_t""$compiler_rtti_exceptions" 1>&6
5373
5374   if test "$compiler_rtti_exceptions" = "yes"; then
5375     no_builtin_flag=' -fno-builtin -fno-rtti -fno-exceptions'
5376   else
5377     no_builtin_flag=' -fno-builtin'
5378   fi
5379 fi
5380
5381 # See if the linker supports building shared libraries.
5382 echo $ac_n "checking whether the linker ($LD) supports shared libraries""... $ac_c" 1>&6
5383 echo "configure:5384: checking whether the linker ($LD) supports shared libraries" >&5
5384
5385 allow_undefined_flag=
5386 no_undefined_flag=
5387 need_lib_prefix=unknown
5388 need_version=unknown
5389 # when you set need_version to no, make sure it does not cause -set_version
5390 # flags to be left without arguments
5391 archive_cmds=
5392 archive_expsym_cmds=
5393 old_archive_from_new_cmds=
5394 old_archive_from_expsyms_cmds=
5395 export_dynamic_flag_spec=
5396 whole_archive_flag_spec=
5397 thread_safe_flag_spec=
5398 hardcode_into_libs=no
5399 hardcode_libdir_flag_spec=
5400 hardcode_libdir_separator=
5401 hardcode_direct=no
5402 hardcode_minus_L=no
5403 hardcode_shlibpath_var=unsupported
5404 runpath_var=
5405 link_all_deplibs=unknown
5406 always_export_symbols=no
5407 export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols'
5408 # include_expsyms should be a list of space-separated symbols to be *always*
5409 # included in the symbol list
5410 include_expsyms=
5411 # exclude_expsyms can be an egrep regular expression of symbols to exclude
5412 # it will be wrapped by ` (' and `)$', so one must not match beginning or
5413 # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
5414 # as well as any symbol that contains `d'.
5415 exclude_expsyms="_GLOBAL_OFFSET_TABLE_"
5416 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
5417 # platforms (ab)use it in PIC code, but their linkers get confused if
5418 # the symbol is explicitly referenced.  Since portable code cannot
5419 # rely on this symbol name, it's probably fine to never include it in
5420 # preloaded symbol tables.
5421 extract_expsyms_cmds=
5422
5423 case $host_os in
5424 cygwin* | mingw* | pw32*)
5425   # FIXME: the MSVC++ port hasn't been tested in a loooong time
5426   # When not using gcc, we currently assume that we are using
5427   # Microsoft Visual C++.
5428   if test "$GCC" != yes; then
5429     with_gnu_ld=no
5430   fi
5431   ;;
5432 openbsd*)
5433   with_gnu_ld=no
5434   ;;
5435 esac
5436
5437 ld_shlibs=yes
5438 if test "$with_gnu_ld" = yes; then
5439   # If archive_cmds runs LD, not CC, wlarc should be empty
5440   wlarc='${wl}'
5441
5442   # See if GNU ld supports shared libraries.
5443   case $host_os in
5444   aix3* | aix4* | aix5*)
5445     # On AIX, the GNU linker is very broken
5446     # Note:Check GNU linker on AIX 5-IA64 when/if it becomes available.
5447     ld_shlibs=no
5448     cat <<EOF 1>&2
5449
5450 *** Warning: the GNU linker, at least up to release 2.9.1, is reported
5451 *** to be unable to reliably create shared libraries on AIX.
5452 *** Therefore, libtool is disabling shared libraries support.  If you
5453 *** really care for shared libraries, you may want to modify your PATH
5454 *** so that a non-GNU linker is found, and then restart.
5455
5456 EOF
5457     ;;
5458
5459   amigaos*)
5460     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)'
5461     hardcode_libdir_flag_spec='-L$libdir'
5462     hardcode_minus_L=yes
5463
5464     # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
5465     # that the semantics of dynamic libraries on AmigaOS, at least up
5466     # to version 4, is to share data among multiple programs linked
5467     # with the same dynamic library.  Since this doesn't match the
5468     # behavior of shared libraries on other platforms, we can use
5469     # them.
5470     ld_shlibs=no
5471     ;;
5472
5473   beos*)
5474     if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
5475       allow_undefined_flag=unsupported
5476       # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
5477       # support --undefined.  This deserves some investigation.  FIXME
5478       archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5479     else
5480       ld_shlibs=no
5481     fi
5482     ;;
5483
5484   cygwin* | mingw* | pw32*)
5485     # hardcode_libdir_flag_spec is actually meaningless, as there is
5486     # no search path for DLLs.
5487     hardcode_libdir_flag_spec='-L$libdir'
5488     allow_undefined_flag=unsupported
5489     always_export_symbols=yes
5490
5491     extract_expsyms_cmds='test -f $output_objdir/impgen.c || \
5492       sed -e "/^# \/\* impgen\.c starts here \*\//,/^# \/\* impgen.c ends here \*\// { s/^# //;s/^# *$//; p; }" -e d < $''0 > $output_objdir/impgen.c~
5493       test -f $output_objdir/impgen.exe || (cd $output_objdir && \
5494       if test "x$HOST_CC" != "x" ; then $HOST_CC -o impgen impgen.c ; \
5495       else $CC -o impgen impgen.c ; fi)~
5496       $output_objdir/impgen $dir/$soroot > $output_objdir/$soname-def'
5497
5498     old_archive_from_expsyms_cmds='$DLLTOOL --as=$AS --dllname $soname --def $output_objdir/$soname-def --output-lib $output_objdir/$newlib'
5499
5500     # cygwin and mingw dlls have different entry points and sets of symbols
5501     # to exclude.
5502     # FIXME: what about values for MSVC?
5503     dll_entry=__cygwin_dll_entry@12
5504     dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12~
5505     case $host_os in
5506     mingw*)
5507       # mingw values
5508       dll_entry=_DllMainCRTStartup@12
5509       dll_exclude_symbols=DllMain@12,DllMainCRTStartup@12,DllEntryPoint@12~
5510       ;;
5511     esac
5512
5513     # mingw and cygwin differ, and it's simplest to just exclude the union
5514     # of the two symbol sets.
5515     dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12,DllMainCRTStartup@12,DllEntryPoint@12
5516
5517     # recent cygwin and mingw systems supply a stub DllMain which the user
5518     # can override, but on older systems we have to supply one (in ltdll.c)
5519     if test "x$lt_cv_need_dllmain" = "xyes"; then
5520       ltdll_obj='$output_objdir/$soname-ltdll.'"$ac_objext "
5521       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~
5522         test -f $output_objdir/$soname-ltdll.$ac_objext || (cd $output_objdir && $CC -c $soname-ltdll.c)~'
5523     else
5524       ltdll_obj=
5525       ltdll_cmds=
5526     fi
5527
5528     # Extract the symbol export list from an `--export-all' def file,
5529     # then regenerate the def file from the symbol export list, so that
5530     # the compiled dll only exports the symbol export list.
5531     # Be careful not to strip the DATA tag left be newer dlltools.
5532     export_symbols_cmds="$ltdll_cmds"'
5533       $DLLTOOL --export-all --exclude-symbols '$dll_exclude_symbols' --output-def $output_objdir/$soname-def '$ltdll_obj'$libobjs $convenience~
5534       sed -e "1,/EXPORTS/d" -e "s/ @ [0-9]*//" -e "s/ *;.*$//" < $output_objdir/$soname-def > $export_symbols'
5535
5536     # If the export-symbols file already is a .def file (1st line
5537     # is EXPORTS), use it as is.
5538     # If DATA tags from a recent dlltool are present, honour them!
5539     archive_expsym_cmds='if test "x`sed 1q $export_symbols`" = xEXPORTS; then
5540         cp $export_symbols $output_objdir/$soname-def;
5541       else
5542         echo EXPORTS > $output_objdir/$soname-def;
5543         _lt_hint=1;
5544         cat $export_symbols | while read symbol; do
5545          set dummy \$symbol;
5546          case \$# in
5547            2) echo "   \$2 @ \$_lt_hint ; " >> $output_objdir/$soname-def;;
5548            4) echo "   \$2 \$3 \$4 ; " >> $output_objdir/$soname-def; _lt_hint=`expr \$_lt_hint - 1`;;
5549            *) echo "     \$2 @ \$_lt_hint \$3 ; " >> $output_objdir/$soname-def;;
5550          esac;
5551          _lt_hint=`expr 1 + \$_lt_hint`;
5552         done;
5553       fi~
5554       '"$ltdll_cmds"'
5555       $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~
5556       $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~
5557       $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~
5558       $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~
5559       $CC $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags'
5560     ;;
5561
5562   netbsd*)
5563     if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
5564       archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
5565       wlarc=
5566     else
5567       archive_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5568       archive_expsym_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5569     fi
5570     ;;
5571
5572   solaris* | sysv5*)
5573     if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then
5574       ld_shlibs=no
5575       cat <<EOF 1>&2
5576
5577 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
5578 *** create shared libraries on Solaris systems.  Therefore, libtool
5579 *** is disabling shared libraries support.  We urge you to upgrade GNU
5580 *** binutils to release 2.9.1 or newer.  Another option is to modify
5581 *** your PATH or compiler configuration so that the native linker is
5582 *** used, and then restart.
5583
5584 EOF
5585     elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
5586       archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5587       archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5588     else
5589       ld_shlibs=no
5590     fi
5591     ;;
5592
5593   sunos4*)
5594     archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5595     wlarc=
5596     hardcode_direct=yes
5597     hardcode_shlibpath_var=no
5598     ;;
5599
5600   *)
5601     if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
5602       archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5603       archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5604     else
5605       ld_shlibs=no
5606     fi
5607     ;;
5608   esac
5609
5610   if test "$ld_shlibs" = yes; then
5611     runpath_var=LD_RUN_PATH
5612     hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir'
5613     export_dynamic_flag_spec='${wl}--export-dynamic'
5614     case $host_os in
5615     cygwin* | mingw* | pw32*)
5616       # dlltool doesn't understand --whole-archive et. al.
5617       whole_archive_flag_spec=
5618       ;;
5619     *)
5620       # ancient GNU ld didn't support --whole-archive et. al.
5621       if $LD --help 2>&1 | egrep 'no-whole-archive' > /dev/null; then
5622         whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
5623       else
5624         whole_archive_flag_spec=
5625       fi
5626       ;;
5627     esac
5628   fi
5629 else
5630   # PORTME fill in a description of your system's linker (not GNU ld)
5631   case $host_os in
5632   aix3*)
5633     allow_undefined_flag=unsupported
5634     always_export_symbols=yes
5635     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'
5636     # Note: this linker hardcodes the directories in LIBPATH if there
5637     # are no directories specified by -L.
5638     hardcode_minus_L=yes
5639     if test "$GCC" = yes && test -z "$link_static_flag"; then
5640       # Neither direct hardcoding nor static linking is supported with a
5641       # broken collect2.
5642       hardcode_direct=unsupported
5643     fi
5644     ;;
5645
5646   aix4* | aix5*)
5647     if test "$host_cpu" = ia64; then
5648       # On IA64, the linker does run time linking by default, so we don't
5649       # have to do anything special.
5650       aix_use_runtimelinking=no
5651       exp_sym_flag='-Bexport'
5652       no_entry_flag=""
5653     else
5654       aix_use_runtimelinking=no
5655
5656       # Test if we are trying to use run time linking or normal
5657       # AIX style linking. If -brtl is somewhere in LDFLAGS, we
5658       # need to do runtime linking.
5659       case $host_os in aix4.[23]|aix4.[23].*|aix5*)
5660         for ld_flag in $LDFLAGS; do
5661           case $ld_flag in
5662           *-brtl*)
5663             aix_use_runtimelinking=yes
5664             break
5665           ;;
5666           esac
5667         done
5668       esac
5669
5670       exp_sym_flag='-bexport'
5671       no_entry_flag='-bnoentry'
5672     fi
5673
5674     # When large executables or shared objects are built, AIX ld can
5675     # have problems creating the table of contents.  If linking a library
5676     # or program results in "error TOC overflow" add -mminimal-toc to
5677     # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
5678     # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
5679
5680     hardcode_direct=yes
5681     archive_cmds=''
5682     hardcode_libdir_separator=':'
5683     if test "$GCC" = yes; then
5684       case $host_os in aix4.[012]|aix4.[012].*)
5685         collect2name=`${CC} -print-prog-name=collect2`
5686         if test -f "$collect2name" && \
5687           strings "$collect2name" | grep resolve_lib_name >/dev/null
5688         then
5689           # We have reworked collect2
5690           hardcode_direct=yes
5691         else
5692           # We have old collect2
5693           hardcode_direct=unsupported
5694           # It fails to find uninstalled libraries when the uninstalled
5695           # path is not listed in the libpath.  Setting hardcode_minus_L
5696           # to unsupported forces relinking
5697           hardcode_minus_L=yes
5698           hardcode_libdir_flag_spec='-L$libdir'
5699           hardcode_libdir_separator=
5700         fi
5701       esac
5702
5703       shared_flag='-shared'
5704     else
5705       # not using gcc
5706       if test "$host_cpu" = ia64; then
5707         shared_flag='${wl}-G'
5708       else
5709         if test "$aix_use_runtimelinking" = yes; then
5710           shared_flag='${wl}-G'
5711         else
5712           shared_flag='${wl}-bM:SRE'
5713         fi
5714       fi
5715     fi
5716
5717     # It seems that -bexpall can do strange things, so it is better to
5718     # generate a list of symbols to export.
5719     always_export_symbols=yes
5720     if test "$aix_use_runtimelinking" = yes; then
5721       # Warning - without using the other runtime loading flags (-brtl),
5722       # -berok will link without error, but may produce a broken library.
5723       allow_undefined_flag='-berok'
5724       hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:/usr/lib:/lib'
5725       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"
5726     else
5727       if test "$host_cpu" = ia64; then
5728         hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
5729         allow_undefined_flag="-z nodefs"
5730         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"
5731       else
5732         hardcode_libdir_flag_spec='${wl}-bnolibpath ${wl}-blibpath:$libdir:/usr/lib:/lib'
5733         # Warning - without using the other run time loading flags,
5734         # -berok will link without error, but may produce a broken library.
5735         allow_undefined_flag='${wl}-berok'
5736         # This is a bit strange, but is similar to how AIX traditionally builds
5737         # it's shared libraries.
5738         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'
5739       fi
5740     fi
5741     ;;
5742
5743   amigaos*)
5744     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)'
5745     hardcode_libdir_flag_spec='-L$libdir'
5746     hardcode_minus_L=yes
5747     # see comment about different semantics on the GNU ld section
5748     ld_shlibs=no
5749     ;;
5750
5751   cygwin* | mingw* | pw32*)
5752     # When not using gcc, we currently assume that we are using
5753     # Microsoft Visual C++.
5754     # hardcode_libdir_flag_spec is actually meaningless, as there is
5755     # no search path for DLLs.
5756     hardcode_libdir_flag_spec=' '
5757     allow_undefined_flag=unsupported
5758     # Tell ltmain to make .lib files, not .a files.
5759     libext=lib
5760     # FIXME: Setting linknames here is a bad hack.
5761     archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | sed -e '\''s/ -lc$//'\''` -link -dll~linknames='
5762     # The linker will automatically build a .lib file if we build a DLL.
5763     old_archive_from_new_cmds='true'
5764     # FIXME: Should let the user specify the lib program.
5765     old_archive_cmds='lib /OUT:$oldlib$oldobjs$old_deplibs'
5766     fix_srcfile_path='`cygpath -w "$srcfile"`'
5767     ;;
5768
5769   darwin* | rhapsody*)
5770     case "$host_os" in
5771     rhapsody* | darwin1.[012])
5772       allow_undefined_flag='-undefined suppress'
5773       ;;
5774     *) # Darwin 1.3 on
5775       allow_undefined_flag='-flat_namespace -undefined suppress'
5776       ;;
5777     esac
5778     # FIXME: Relying on posixy $() will cause problems for
5779     #        cross-compilation, but unfortunately the echo tests do not
5780     #        yet detect zsh echo's removal of \ escapes.  Also zsh mangles
5781     #        `"' quotes if we put them in here... so don't!
5782     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)'
5783     # We need to add '_' to the symbols in $export_symbols first
5784     #archive_expsym_cmds="$archive_cmds"' && strip -s $export_symbols'
5785     hardcode_direct=yes
5786     hardcode_shlibpath_var=no
5787     whole_archive_flag_spec='-all_load $convenience'
5788     ;;
5789
5790   freebsd1*)
5791     ld_shlibs=no
5792     ;;
5793
5794   # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
5795   # support.  Future versions do this automatically, but an explicit c++rt0.o
5796   # does not break anything, and helps significantly (at the cost of a little
5797   # extra space).
5798   freebsd2.2*)
5799     archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
5800     hardcode_libdir_flag_spec='-R$libdir'
5801     hardcode_direct=yes
5802     hardcode_shlibpath_var=no
5803     ;;
5804
5805   # Unfortunately, older versions of FreeBSD 2 do not have this feature.
5806   freebsd2*)
5807     archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5808     hardcode_direct=yes
5809     hardcode_minus_L=yes
5810     hardcode_shlibpath_var=no
5811     ;;
5812
5813   # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
5814   freebsd*)
5815     archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
5816     hardcode_libdir_flag_spec='-R$libdir'
5817     hardcode_direct=yes
5818     hardcode_shlibpath_var=no
5819     ;;
5820
5821   hpux9* | hpux10* | hpux11*)
5822     case $host_os in
5823     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' ;;
5824     *) archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' ;;
5825     esac
5826     hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
5827     hardcode_libdir_separator=:
5828     hardcode_direct=yes
5829     hardcode_minus_L=yes # Not in the search PATH, but as the default
5830                          # location of the library.
5831     export_dynamic_flag_spec='${wl}-E'
5832     ;;
5833
5834   irix5* | irix6* | nonstopux*)
5835     if test "$GCC" = yes; then
5836       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'
5837       hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5838     else
5839       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'
5840       hardcode_libdir_flag_spec='-rpath $libdir'
5841     fi
5842     hardcode_libdir_separator=:
5843     link_all_deplibs=yes
5844     ;;
5845
5846   netbsd*)
5847     if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
5848       archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
5849     else
5850       archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
5851     fi
5852     hardcode_libdir_flag_spec='-R$libdir'
5853     hardcode_direct=yes
5854     hardcode_shlibpath_var=no
5855     ;;
5856
5857   newsos6)
5858     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5859     hardcode_direct=yes
5860     hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5861     hardcode_libdir_separator=:
5862     hardcode_shlibpath_var=no
5863     ;;
5864
5865   openbsd*)
5866     hardcode_direct=yes
5867     hardcode_shlibpath_var=no
5868     if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
5869       archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5870       hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
5871       export_dynamic_flag_spec='${wl}-E'
5872     else
5873       case "$host_os" in
5874       openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
5875         archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5876         hardcode_libdir_flag_spec='-R$libdir'
5877         ;;
5878       *)
5879         archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5880         hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
5881         ;;
5882       esac
5883     fi
5884     ;;
5885
5886   openedition*)
5887     archive_cmds="\$CC -Wl,DLL \$libobjs \$deplibs \$compiler_flags -o \$lib &&
5888         cp \$linknames \$output_objdir && linknames=''"
5889     export_dynamic_flag_spec="-Wl,DLL"
5890     ;;
5891
5892   os2*)
5893     hardcode_libdir_flag_spec='-L$libdir'
5894     hardcode_minus_L=yes
5895     allow_undefined_flag=unsupported
5896     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'
5897     old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
5898     ;;
5899
5900   osf3*)
5901     if test "$GCC" = yes; then
5902       allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
5903       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'
5904     else
5905       allow_undefined_flag=' -expect_unresolved \*'
5906       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'
5907     fi
5908     hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5909     hardcode_libdir_separator=:
5910     ;;
5911
5912   osf4* | osf5*)        # as osf3* with the addition of -msym flag
5913     if test "$GCC" = yes; then
5914       allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
5915       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'
5916       hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5917     else
5918       allow_undefined_flag=' -expect_unresolved \*'
5919       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'
5920       archive_expsym_cmds='for i in `cat $export_symbols`; do printf "-exported_symbol " >> $lib.exp; echo "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
5921       $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'
5922
5923       #Both c and cxx compiler support -rpath directly
5924       hardcode_libdir_flag_spec='-rpath $libdir'
5925     fi
5926     hardcode_libdir_separator=:
5927     ;;
5928
5929   sco3.2v5*)
5930     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5931     hardcode_shlibpath_var=no
5932     runpath_var=LD_RUN_PATH
5933     hardcode_runpath_var=yes
5934     export_dynamic_flag_spec='${wl}-Bexport'
5935     ;;
5936
5937   solaris*)
5938     # gcc --version < 3.0 without binutils cannot create self contained
5939     # shared libraries reliably, requiring libgcc.a to resolve some of
5940     # the object symbols generated in some cases.  Libraries that use
5941     # assert need libgcc.a to resolve __eprintf, for example.  Linking
5942     # a copy of libgcc.a into every shared library to guarantee resolving
5943     # such symbols causes other problems:  According to Tim Van Holder
5944     # <tim.van.holder@pandora.be>, C++ libraries end up with a separate
5945     # (to the application) exception stack for one thing.
5946     no_undefined_flag=' -z defs'
5947     if test "$GCC" = yes; then
5948       case `$CC --version 2>/dev/null` in
5949       [12].*)
5950         cat <<EOF 1>&2
5951
5952 *** Warning: Releases of GCC earlier than version 3.0 cannot reliably
5953 *** create self contained shared libraries on Solaris systems, without
5954 *** introducing a dependency on libgcc.a.  Therefore, libtool is disabling
5955 *** -no-undefined support, which will at least allow you to build shared
5956 *** libraries.  However, you may find that when you link such libraries
5957 *** into an application without using GCC, you have to manually add
5958 *** \`gcc --print-libgcc-file-name\` to the link command.  We urge you to
5959 *** upgrade to a newer version of GCC.  Another option is to rebuild your
5960 *** current GCC to use the GNU linker from GNU binutils 2.9.1 or newer.
5961
5962 EOF
5963         no_undefined_flag=
5964         ;;
5965       esac
5966     fi
5967     # $CC -shared without GNU ld will not create a library from C++
5968     # object files and a static libstdc++, better avoid it by now
5969     archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
5970     archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
5971                 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
5972     hardcode_libdir_flag_spec='-R$libdir'
5973     hardcode_shlibpath_var=no
5974     case $host_os in
5975     solaris2.[0-5] | solaris2.[0-5].*) ;;
5976     *) # Supported since Solaris 2.6 (maybe 2.5.1?)
5977       whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;;
5978     esac
5979     link_all_deplibs=yes
5980     ;;
5981
5982   sunos4*)
5983     if test "x$host_vendor" = xsequent; then
5984       # Use $CC to link under sequent, because it throws in some extra .o
5985       # files that make .init and .fini sections work.
5986       archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
5987     else
5988       archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
5989     fi
5990     hardcode_libdir_flag_spec='-L$libdir'
5991     hardcode_direct=yes
5992     hardcode_minus_L=yes
5993     hardcode_shlibpath_var=no
5994     ;;
5995
5996   sysv4)
5997     case $host_vendor in
5998       sni)
5999         archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6000         hardcode_direct=yes # is this really true???
6001         ;;
6002       siemens)
6003         ## LD is ld it makes a PLAMLIB
6004         ## CC just makes a GrossModule.
6005         archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
6006         reload_cmds='$CC -r -o $output$reload_objs'
6007         hardcode_direct=no
6008         ;;
6009       motorola)
6010         archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6011         hardcode_direct=no #Motorola manual says yes, but my tests say they lie
6012         ;;
6013     esac
6014     runpath_var='LD_RUN_PATH'
6015     hardcode_shlibpath_var=no
6016     ;;
6017
6018   sysv4.3*)
6019     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6020     hardcode_shlibpath_var=no
6021     export_dynamic_flag_spec='-Bexport'
6022     ;;
6023
6024   sysv5*)
6025     no_undefined_flag=' -z text'
6026     # $CC -shared without GNU ld will not create a library from C++
6027     # object files and a static libstdc++, better avoid it by now
6028     archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
6029     archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
6030                 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
6031     hardcode_libdir_flag_spec=
6032     hardcode_shlibpath_var=no
6033     runpath_var='LD_RUN_PATH'
6034     ;;
6035
6036   uts4*)
6037     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6038     hardcode_libdir_flag_spec='-L$libdir'
6039     hardcode_shlibpath_var=no
6040     ;;
6041
6042   dgux*)
6043     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6044     hardcode_libdir_flag_spec='-L$libdir'
6045     hardcode_shlibpath_var=no
6046     ;;
6047
6048   sysv4*MP*)
6049     if test -d /usr/nec; then
6050       archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6051       hardcode_shlibpath_var=no
6052       runpath_var=LD_RUN_PATH
6053       hardcode_runpath_var=yes
6054       ld_shlibs=yes
6055     fi
6056     ;;
6057
6058   sysv4.2uw2*)
6059     archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
6060     hardcode_direct=yes
6061     hardcode_minus_L=no
6062     hardcode_shlibpath_var=no
6063     hardcode_runpath_var=yes
6064     runpath_var=LD_RUN_PATH
6065     ;;
6066
6067   sysv5uw7* | unixware7*)
6068     no_undefined_flag='${wl}-z ${wl}text'
6069     if test "$GCC" = yes; then
6070       archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6071     else
6072       archive_cmds='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6073     fi
6074     runpath_var='LD_RUN_PATH'
6075     hardcode_shlibpath_var=no
6076     ;;
6077
6078   *)
6079     ld_shlibs=no
6080     ;;
6081   esac
6082 fi
6083 echo "$ac_t""$ld_shlibs" 1>&6
6084 test "$ld_shlibs" = no && can_build_shared=no
6085
6086 # Check hardcoding attributes.
6087 echo $ac_n "checking how to hardcode library paths into programs""... $ac_c" 1>&6
6088 echo "configure:6089: checking how to hardcode library paths into programs" >&5
6089 hardcode_action=
6090 if test -n "$hardcode_libdir_flag_spec" || \
6091    test -n "$runpath_var"; then
6092
6093   # We can hardcode non-existant directories.
6094   if test "$hardcode_direct" != no &&
6095      # If the only mechanism to avoid hardcoding is shlibpath_var, we
6096      # have to relink, otherwise we might link with an installed library
6097      # when we should be linking with a yet-to-be-installed one
6098      ## test "$hardcode_shlibpath_var" != no &&
6099      test "$hardcode_minus_L" != no; then
6100     # Linking always hardcodes the temporary library directory.
6101     hardcode_action=relink
6102   else
6103     # We can link without hardcoding, and we can hardcode nonexisting dirs.
6104     hardcode_action=immediate
6105   fi
6106 else
6107   # We cannot hardcode anything, or else we can only hardcode existing
6108   # directories.
6109   hardcode_action=unsupported
6110 fi
6111 echo "$ac_t""$hardcode_action" 1>&6
6112
6113 striplib=
6114 old_striplib=
6115 echo $ac_n "checking whether stripping libraries is possible""... $ac_c" 1>&6
6116 echo "configure:6117: checking whether stripping libraries is possible" >&5
6117 if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
6118   test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
6119   test -z "$striplib" && striplib="$STRIP --strip-unneeded"
6120   echo "$ac_t""yes" 1>&6
6121 else
6122   echo "$ac_t""no" 1>&6
6123 fi
6124
6125 reload_cmds='$LD$reload_flag -o $output$reload_objs'
6126 test -z "$deplibs_check_method" && deplibs_check_method=unknown
6127
6128 # PORTME Fill in your ld.so characteristics
6129 echo $ac_n "checking dynamic linker characteristics""... $ac_c" 1>&6
6130 echo "configure:6131: checking dynamic linker characteristics" >&5
6131 library_names_spec=
6132 libname_spec='lib$name'
6133 soname_spec=
6134 postinstall_cmds=
6135 postuninstall_cmds=
6136 finish_cmds=
6137 finish_eval=
6138 shlibpath_var=
6139 shlibpath_overrides_runpath=unknown
6140 version_type=none
6141 dynamic_linker="$host_os ld.so"
6142 sys_lib_dlsearch_path_spec="/lib /usr/lib"
6143 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
6144
6145 case $host_os in
6146 aix3*)
6147   version_type=linux
6148   library_names_spec='${libname}${release}.so$versuffix $libname.a'
6149   shlibpath_var=LIBPATH
6150
6151   # AIX has no versioning support, so we append a major version to the name.
6152   soname_spec='${libname}${release}.so$major'
6153   ;;
6154
6155 aix4* | aix5*)
6156   version_type=linux
6157   need_lib_prefix=no
6158   need_version=no
6159   hardcode_into_libs=yes
6160   if test "$host_cpu" = ia64; then
6161     # AIX 5 supports IA64
6162     library_names_spec='${libname}${release}.so$major ${libname}${release}.so$versuffix $libname.so'
6163     shlibpath_var=LD_LIBRARY_PATH
6164   else
6165     # With GCC up to 2.95.x, collect2 would create an import file
6166     # for dependence libraries.  The import file would start with
6167     # the line `#! .'.  This would cause the generated library to
6168     # depend on `.', always an invalid library.  This was fixed in
6169     # development snapshots of GCC prior to 3.0.
6170     case $host_os in
6171       aix4 | aix4.[01] | aix4.[01].*)
6172         if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
6173              echo ' yes '
6174              echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
6175           :
6176         else
6177           can_build_shared=no
6178         fi
6179         ;;
6180     esac
6181     # AIX (on Power*) has no versioning support, so currently we can
6182     # not hardcode correct soname into executable. Probably we can
6183     # add versioning support to collect2, so additional links can
6184     # be useful in future.
6185     if test "$aix_use_runtimelinking" = yes; then
6186       # If using run time linking (on AIX 4.2 or later) use lib<name>.so
6187       # instead of lib<name>.a to let people know that these are not
6188       # typical AIX shared libraries.
6189       library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6190     else
6191       # We preserve .a as extension for shared libraries through AIX4.2
6192       # and later when we are not doing run time linking.
6193       library_names_spec='${libname}${release}.a $libname.a'
6194       soname_spec='${libname}${release}.so$major'
6195     fi
6196     shlibpath_var=LIBPATH
6197   fi
6198   hardcode_into_libs=yes
6199   ;;
6200
6201 amigaos*)
6202   library_names_spec='$libname.ixlibrary $libname.a'
6203   # Create ${libname}_ixlibrary.a entries in /sys/libs.
6204   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'
6205   ;;
6206
6207 beos*)
6208   library_names_spec='${libname}.so'
6209   dynamic_linker="$host_os ld.so"
6210   shlibpath_var=LIBRARY_PATH
6211   ;;
6212
6213 bsdi4*)
6214   version_type=linux
6215   need_version=no
6216   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6217   soname_spec='${libname}${release}.so$major'
6218   finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
6219   shlibpath_var=LD_LIBRARY_PATH
6220   sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
6221   sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
6222   export_dynamic_flag_spec=-rdynamic
6223   # the default ld.so.conf also contains /usr/contrib/lib and
6224   # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
6225   # libtool to hard-code these into programs
6226   ;;
6227
6228 cygwin* | mingw* | pw32*)
6229   version_type=windows
6230   need_version=no
6231   need_lib_prefix=no
6232   case $GCC,$host_os in
6233   yes,cygwin*)
6234     library_names_spec='$libname.dll.a'
6235     soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
6236     postinstall_cmds='dlpath=`bash 2>&1 -c '\''. $dir/${file}i;echo \$dlname'\''`~
6237       dldir=$destdir/`dirname \$dlpath`~
6238       test -d \$dldir || mkdir -p \$dldir~
6239       $install_prog .libs/$dlname \$dldir/$dlname'
6240     postuninstall_cmds='dldll=`bash 2>&1 -c '\''. $file; echo \$dlname'\''`~
6241       dlpath=$dir/\$dldll~
6242        $rm \$dlpath'
6243     ;;
6244   yes,mingw*)
6245     library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
6246     sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | sed -e "s/^libraries://" -e "s/;/ /g" -e "s,=/,/,g"`
6247     ;;
6248   yes,pw32*)
6249     library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | sed -e 's/./-/g'`${versuffix}.dll'
6250     ;;
6251   *)
6252     library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll $libname.lib'
6253     ;;
6254   esac
6255   dynamic_linker='Win32 ld.exe'
6256   # FIXME: first we should search . and the directory the executable is in
6257   shlibpath_var=PATH
6258   ;;
6259
6260 darwin* | rhapsody*)
6261   dynamic_linker="$host_os dyld"
6262   version_type=darwin
6263   need_lib_prefix=no
6264   need_version=no
6265   # FIXME: Relying on posixy $() will cause problems for
6266   #        cross-compilation, but unfortunately the echo tests do not
6267   #        yet detect zsh echo's removal of \ escapes.
6268   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)'
6269   soname_spec='${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib)'
6270   shlibpath_overrides_runpath=yes
6271   shlibpath_var=DYLD_LIBRARY_PATH
6272   ;;
6273
6274 freebsd1*)
6275   dynamic_linker=no
6276   ;;
6277
6278 freebsd*)
6279   objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
6280   version_type=freebsd-$objformat
6281   case $version_type in
6282     freebsd-elf*)
6283       library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
6284       need_version=no
6285       need_lib_prefix=no
6286       ;;
6287     freebsd-*)
6288       library_names_spec='${libname}${release}.so$versuffix $libname.so$versuffix'
6289       need_version=yes
6290       ;;
6291   esac
6292   shlibpath_var=LD_LIBRARY_PATH
6293   case $host_os in
6294   freebsd2*)
6295     shlibpath_overrides_runpath=yes
6296     ;;
6297   *)
6298     shlibpath_overrides_runpath=no
6299     hardcode_into_libs=yes
6300     ;;
6301   esac
6302   ;;
6303
6304 gnu*)
6305   version_type=linux
6306   need_lib_prefix=no
6307   need_version=no
6308   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so${major} ${libname}.so'
6309   soname_spec='${libname}${release}.so$major'
6310   shlibpath_var=LD_LIBRARY_PATH
6311   hardcode_into_libs=yes
6312   ;;
6313
6314 hpux9* | hpux10* | hpux11*)
6315   # Give a soname corresponding to the major version so that dld.sl refuses to
6316   # link against other versions.
6317   dynamic_linker="$host_os dld.sl"
6318   version_type=sunos
6319   need_lib_prefix=no
6320   need_version=no
6321   shlibpath_var=SHLIB_PATH
6322   shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
6323   library_names_spec='${libname}${release}.sl$versuffix ${libname}${release}.sl$major $libname.sl'
6324   soname_spec='${libname}${release}.sl$major'
6325   # HP-UX runs *really* slowly unless shared libraries are mode 555.
6326   postinstall_cmds='chmod 555 $lib'
6327   ;;
6328
6329 irix5* | irix6* | nonstopux*)
6330   case $host_os in
6331     nonstopux*) version_type=nonstopux ;;
6332     *)          version_type=irix ;;
6333   esac
6334   need_lib_prefix=no
6335   need_version=no
6336   soname_spec='${libname}${release}.so$major'
6337   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so $libname.so'
6338   case $host_os in
6339   irix5* | nonstopux*)
6340     libsuff= shlibsuff=
6341     ;;
6342   *)
6343     case $LD in # libtool.m4 will add one of these switches to LD
6344     *-32|*"-32 ") libsuff= shlibsuff= libmagic=32-bit;;
6345     *-n32|*"-n32 ") libsuff=32 shlibsuff=N32 libmagic=N32;;
6346     *-64|*"-64 ") libsuff=64 shlibsuff=64 libmagic=64-bit;;
6347     *) libsuff= shlibsuff= libmagic=never-match;;
6348     esac
6349     ;;
6350   esac
6351   shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
6352   shlibpath_overrides_runpath=no
6353   sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
6354   sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
6355   ;;
6356
6357 # No shared lib support for Linux oldld, aout, or coff.
6358 linux-gnuoldld* | linux-gnuaout* | linux-gnucoff*)
6359   dynamic_linker=no
6360   ;;
6361
6362 # This must be Linux ELF.
6363 linux-gnu*)
6364   version_type=linux
6365   need_lib_prefix=no
6366   need_version=no
6367   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6368   soname_spec='${libname}${release}.so$major'
6369   finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
6370   shlibpath_var=LD_LIBRARY_PATH
6371   shlibpath_overrides_runpath=no
6372   # This implies no fast_install, which is unacceptable.
6373   # Some rework will be needed to allow for fast_install
6374   # before this can be enabled.
6375   hardcode_into_libs=yes
6376
6377   # We used to test for /lib/ld.so.1 and disable shared libraries on
6378   # powerpc, because MkLinux only supported shared libraries with the
6379   # GNU dynamic linker.  Since this was broken with cross compilers,
6380   # most powerpc-linux boxes support dynamic linking these days and
6381   # people can always --disable-shared, the test was removed, and we
6382   # assume the GNU/Linux dynamic linker is in use.
6383   dynamic_linker='GNU/Linux ld.so'
6384   ;;
6385
6386 netbsd*)
6387   version_type=sunos
6388   need_lib_prefix=no
6389   need_version=no
6390   if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
6391     library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
6392     finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
6393     dynamic_linker='NetBSD (a.out) ld.so'
6394   else
6395     library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so ${libname}.so'
6396     soname_spec='${libname}${release}.so$major'
6397     dynamic_linker='NetBSD ld.elf_so'
6398   fi
6399   shlibpath_var=LD_LIBRARY_PATH
6400   shlibpath_overrides_runpath=yes
6401   hardcode_into_libs=yes
6402   ;;
6403
6404 newsos6)
6405   version_type=linux
6406   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6407   shlibpath_var=LD_LIBRARY_PATH
6408   shlibpath_overrides_runpath=yes
6409   ;;
6410
6411 openbsd*)
6412   version_type=sunos
6413   need_lib_prefix=no
6414   need_version=no
6415   if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
6416     case "$host_os" in
6417     openbsd2.[89] | openbsd2.[89].*)
6418       shlibpath_overrides_runpath=no
6419       ;;
6420     *)
6421       shlibpath_overrides_runpath=yes
6422       ;;
6423     esac
6424   else
6425     shlibpath_overrides_runpath=yes
6426   fi
6427   library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
6428   finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
6429   shlibpath_var=LD_LIBRARY_PATH
6430   ;;
6431
6432 openedition*)
6433   need_lib_prefix=no
6434   need_version=no
6435   shlibpath_overrides_runpath=yes
6436   shlibpath_var=LIBPATH
6437   postinstall_cmds="rm \$destdir/\$linkname; cp \$linkname \$destdir; chmod a+x \$lib"
6438   # the library's exports are in libname.x; this is the file that must
6439   # actually be linked with to use a DLL.
6440   library_names_spec="\${libname}\${release}.so\$versuffix \${libname}.x"
6441   ;;
6442
6443 os2*)
6444   libname_spec='$name'
6445   need_lib_prefix=no
6446   library_names_spec='$libname.dll $libname.a'
6447   dynamic_linker='OS/2 ld.exe'
6448   shlibpath_var=LIBPATH
6449   ;;
6450
6451 osf3* | osf4* | osf5*)
6452   version_type=osf
6453   need_version=no
6454   soname_spec='${libname}${release}.so$major'
6455   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6456   shlibpath_var=LD_LIBRARY_PATH
6457   sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
6458   sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
6459   hardcode_into_libs=yes
6460   ;;
6461
6462 sco3.2v5*)
6463   version_type=osf
6464   soname_spec='${libname}${release}.so$major'
6465   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6466   shlibpath_var=LD_LIBRARY_PATH
6467   ;;
6468
6469 solaris*)
6470   version_type=linux
6471   need_lib_prefix=no
6472   need_version=no
6473   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6474   soname_spec='${libname}${release}.so$major'
6475   shlibpath_var=LD_LIBRARY_PATH
6476   shlibpath_overrides_runpath=yes
6477   hardcode_into_libs=yes
6478   # ldd complains unless libraries are executable
6479   postinstall_cmds='chmod +x $lib'
6480   ;;
6481
6482 sunos4*)
6483   version_type=sunos
6484   library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
6485   finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
6486   shlibpath_var=LD_LIBRARY_PATH
6487   shlibpath_overrides_runpath=yes
6488   if test "$with_gnu_ld" = yes; then
6489     need_lib_prefix=no
6490   fi
6491   need_version=yes
6492   ;;
6493
6494 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
6495   version_type=linux
6496   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6497   soname_spec='${libname}${release}.so$major'
6498   shlibpath_var=LD_LIBRARY_PATH
6499   case $host_vendor in
6500     sni)
6501       shlibpath_overrides_runpath=no
6502       need_lib_prefix=no
6503       export_dynamic_flag_spec='${wl}-Blargedynsym'
6504       runpath_var=LD_RUN_PATH
6505       ;;
6506     siemens)
6507       need_lib_prefix=no
6508       ;;
6509     motorola)
6510       need_lib_prefix=no
6511       need_version=no
6512       shlibpath_overrides_runpath=no
6513       sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
6514       ;;
6515   esac
6516   ;;
6517
6518 uts4*)
6519   version_type=linux
6520   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6521   soname_spec='${libname}${release}.so$major'
6522   shlibpath_var=LD_LIBRARY_PATH
6523   ;;
6524
6525 dgux*)
6526   version_type=linux
6527   need_lib_prefix=no
6528   need_version=no
6529   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6530   soname_spec='${libname}${release}.so$major'
6531   shlibpath_var=LD_LIBRARY_PATH
6532   ;;
6533
6534 sysv4*MP*)
6535   if test -d /usr/nec ;then
6536     version_type=linux
6537     library_names_spec='$libname.so.$versuffix $libname.so.$major $libname.so'
6538     soname_spec='$libname.so.$major'
6539     shlibpath_var=LD_LIBRARY_PATH
6540   fi
6541   ;;
6542
6543 *)
6544   dynamic_linker=no
6545   ;;
6546 esac
6547 echo "$ac_t""$dynamic_linker" 1>&6
6548 test "$dynamic_linker" = no && can_build_shared=no
6549
6550 # Report the final consequences.
6551 echo $ac_n "checking if libtool supports shared libraries""... $ac_c" 1>&6
6552 echo "configure:6553: checking if libtool supports shared libraries" >&5
6553 echo "$ac_t""$can_build_shared" 1>&6
6554
6555 echo $ac_n "checking whether to build shared libraries""... $ac_c" 1>&6
6556 echo "configure:6557: checking whether to build shared libraries" >&5
6557 test "$can_build_shared" = "no" && enable_shared=no
6558
6559 # On AIX, shared libraries and static libraries use the same namespace, and
6560 # are all built from PIC.
6561 case "$host_os" in
6562 aix3*)
6563   test "$enable_shared" = yes && enable_static=no
6564   if test -n "$RANLIB"; then
6565     archive_cmds="$archive_cmds~\$RANLIB \$lib"
6566     postinstall_cmds='$RANLIB $lib'
6567   fi
6568   ;;
6569
6570 aix4*)
6571   if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
6572     test "$enable_shared" = yes && enable_static=no
6573   fi
6574   ;;
6575 esac
6576 echo "$ac_t""$enable_shared" 1>&6
6577
6578 echo $ac_n "checking whether to build static libraries""... $ac_c" 1>&6
6579 echo "configure:6580: checking whether to build static libraries" >&5
6580 # Make sure either enable_shared or enable_static is yes.
6581 test "$enable_shared" = yes || enable_static=yes
6582 echo "$ac_t""$enable_static" 1>&6
6583
6584 if test "$hardcode_action" = relink; then
6585   # Fast installation is not supported
6586   enable_fast_install=no
6587 elif test "$shlibpath_overrides_runpath" = yes ||
6588      test "$enable_shared" = no; then
6589   # Fast installation is not necessary
6590   enable_fast_install=needless
6591 fi
6592
6593 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
6594 if test "$GCC" = yes; then
6595   variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
6596 fi
6597
6598 if test "x$enable_dlopen" != xyes; then
6599   enable_dlopen=unknown
6600   enable_dlopen_self=unknown
6601   enable_dlopen_self_static=unknown
6602 else
6603   lt_cv_dlopen=no
6604   lt_cv_dlopen_libs=
6605
6606   case $host_os in
6607   beos*)
6608     lt_cv_dlopen="load_add_on"
6609     lt_cv_dlopen_libs=
6610     lt_cv_dlopen_self=yes
6611     ;;
6612
6613   cygwin* | mingw* | pw32*)
6614     lt_cv_dlopen="LoadLibrary"
6615     lt_cv_dlopen_libs=
6616    ;;
6617
6618   *)
6619     echo $ac_n "checking for dllload""... $ac_c" 1>&6
6620 echo "configure:6621: checking for dllload" >&5
6621 if eval "test \"\${ac_cv_func_dllload+set}\" = set"; then
6622   echo $ac_n "(cached) $ac_c" 1>&6
6623 else
6624   cat > conftest.$ac_ext <<EOF
6625 #line 6626 "configure"
6626 #include "confdefs.h"
6627 /* System header to define __stub macros and hopefully few prototypes,
6628     which can conflict with char dllload(); below.  */
6629 #include <assert.h>
6630 /* Override any gcc2 internal prototype to avoid an error.  */
6631 /* We use char because int might match the return type of a gcc2
6632     builtin and then its argument prototype would still apply.  */
6633 char dllload();
6634 char (*f)();
6635
6636 int main() {
6637
6638 /* The GNU C library defines this for functions which it implements
6639     to always fail with ENOSYS.  Some functions are actually named
6640     something starting with __ and the normal name is an alias.  */
6641 #if defined (__stub_dllload) || defined (__stub___dllload)
6642 choke me
6643 #else
6644 f = dllload;
6645 #endif
6646
6647 ; return 0; }
6648 EOF
6649 if { (eval echo configure:6650: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6650   rm -rf conftest*
6651   eval "ac_cv_func_dllload=yes"
6652 else
6653   echo "configure: failed program was:" >&5
6654   cat conftest.$ac_ext >&5
6655   rm -rf conftest*
6656   eval "ac_cv_func_dllload=no"
6657 fi
6658 rm -f conftest*
6659 fi
6660
6661 if eval "test \"`echo '$ac_cv_func_'dllload`\" = yes"; then
6662   echo "$ac_t""yes" 1>&6
6663   lt_cv_dlopen="dllload"
6664 else
6665   echo "$ac_t""no" 1>&6
6666 echo $ac_n "checking for shl_load""... $ac_c" 1>&6
6667 echo "configure:6668: checking for shl_load" >&5
6668 if eval "test \"\${ac_cv_func_shl_load+set}\" = set"; then
6669   echo $ac_n "(cached) $ac_c" 1>&6
6670 else
6671   cat > conftest.$ac_ext <<EOF
6672 #line 6673 "configure"
6673 #include "confdefs.h"
6674 /* System header to define __stub macros and hopefully few prototypes,
6675     which can conflict with char shl_load(); below.  */
6676 #include <assert.h>
6677 /* Override any gcc2 internal prototype to avoid an error.  */
6678 /* We use char because int might match the return type of a gcc2
6679     builtin and then its argument prototype would still apply.  */
6680 char shl_load();
6681 char (*f)();
6682
6683 int main() {
6684
6685 /* The GNU C library defines this for functions which it implements
6686     to always fail with ENOSYS.  Some functions are actually named
6687     something starting with __ and the normal name is an alias.  */
6688 #if defined (__stub_shl_load) || defined (__stub___shl_load)
6689 choke me
6690 #else
6691 f = shl_load;
6692 #endif
6693
6694 ; return 0; }
6695 EOF
6696 if { (eval echo configure:6697: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6697   rm -rf conftest*
6698   eval "ac_cv_func_shl_load=yes"
6699 else
6700   echo "configure: failed program was:" >&5
6701   cat conftest.$ac_ext >&5
6702   rm -rf conftest*
6703   eval "ac_cv_func_shl_load=no"
6704 fi
6705 rm -f conftest*
6706 fi
6707
6708 if eval "test \"`echo '$ac_cv_func_'shl_load`\" = yes"; then
6709   echo "$ac_t""yes" 1>&6
6710   lt_cv_dlopen="shl_load"
6711 else
6712   echo "$ac_t""no" 1>&6
6713 echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
6714 echo "configure:6715: checking for shl_load in -ldld" >&5
6715 ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-:%__p__%'`
6716 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6717   echo $ac_n "(cached) $ac_c" 1>&6
6718 else
6719   ac_save_LIBS="$LIBS"
6720 LIBS="-ldld  $LIBS"
6721 cat > conftest.$ac_ext <<EOF
6722 #line 6723 "configure"
6723 #include "confdefs.h"
6724 /* Override any gcc2 internal prototype to avoid an error.  */
6725 /* We use char because int might match the return type of a gcc2
6726     builtin and then its argument prototype would still apply.  */
6727 char shl_load();
6728
6729 int main() {
6730 shl_load()
6731 ; return 0; }
6732 EOF
6733 if { (eval echo configure:6734: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6734   rm -rf conftest*
6735   eval "ac_cv_lib_$ac_lib_var=yes"
6736 else
6737   echo "configure: failed program was:" >&5
6738   cat conftest.$ac_ext >&5
6739   rm -rf conftest*
6740   eval "ac_cv_lib_$ac_lib_var=no"
6741 fi
6742 rm -f conftest*
6743 LIBS="$ac_save_LIBS"
6744
6745 fi
6746 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6747   echo "$ac_t""yes" 1>&6
6748   lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"
6749 else
6750   echo "$ac_t""no" 1>&6
6751 echo $ac_n "checking for dlopen""... $ac_c" 1>&6
6752 echo "configure:6753: checking for dlopen" >&5
6753 if eval "test \"\${ac_cv_func_dlopen+set}\" = set"; then
6754   echo $ac_n "(cached) $ac_c" 1>&6
6755 else
6756   cat > conftest.$ac_ext <<EOF
6757 #line 6758 "configure"
6758 #include "confdefs.h"
6759 /* System header to define __stub macros and hopefully few prototypes,
6760     which can conflict with char dlopen(); below.  */
6761 #include <assert.h>
6762 /* Override any gcc2 internal prototype to avoid an error.  */
6763 /* We use char because int might match the return type of a gcc2
6764     builtin and then its argument prototype would still apply.  */
6765 char dlopen();
6766 char (*f)();
6767
6768 int main() {
6769
6770 /* The GNU C library defines this for functions which it implements
6771     to always fail with ENOSYS.  Some functions are actually named
6772     something starting with __ and the normal name is an alias.  */
6773 #if defined (__stub_dlopen) || defined (__stub___dlopen)
6774 choke me
6775 #else
6776 f = dlopen;
6777 #endif
6778
6779 ; return 0; }
6780 EOF
6781 if { (eval echo configure:6782: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6782   rm -rf conftest*
6783   eval "ac_cv_func_dlopen=yes"
6784 else
6785   echo "configure: failed program was:" >&5
6786   cat conftest.$ac_ext >&5
6787   rm -rf conftest*
6788   eval "ac_cv_func_dlopen=no"
6789 fi
6790 rm -f conftest*
6791 fi
6792
6793 if eval "test \"`echo '$ac_cv_func_'dlopen`\" = yes"; then
6794   echo "$ac_t""yes" 1>&6
6795   lt_cv_dlopen="dlopen"
6796 else
6797   echo "$ac_t""no" 1>&6
6798 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
6799 echo "configure:6800: checking for dlopen in -ldl" >&5
6800 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-:%__p__%'`
6801 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6802   echo $ac_n "(cached) $ac_c" 1>&6
6803 else
6804   ac_save_LIBS="$LIBS"
6805 LIBS="-ldl  $LIBS"
6806 cat > conftest.$ac_ext <<EOF
6807 #line 6808 "configure"
6808 #include "confdefs.h"
6809 /* Override any gcc2 internal prototype to avoid an error.  */
6810 /* We use char because int might match the return type of a gcc2
6811     builtin and then its argument prototype would still apply.  */
6812 char dlopen();
6813
6814 int main() {
6815 dlopen()
6816 ; return 0; }
6817 EOF
6818 if { (eval echo configure:6819: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6819   rm -rf conftest*
6820   eval "ac_cv_lib_$ac_lib_var=yes"
6821 else
6822   echo "configure: failed program was:" >&5
6823   cat conftest.$ac_ext >&5
6824   rm -rf conftest*
6825   eval "ac_cv_lib_$ac_lib_var=no"
6826 fi
6827 rm -f conftest*
6828 LIBS="$ac_save_LIBS"
6829
6830 fi
6831 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6832   echo "$ac_t""yes" 1>&6
6833   lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
6834 else
6835   echo "$ac_t""no" 1>&6
6836 echo $ac_n "checking for dlopen in -lsvld""... $ac_c" 1>&6
6837 echo "configure:6838: checking for dlopen in -lsvld" >&5
6838 ac_lib_var=`echo svld'_'dlopen | sed 'y%./+-:%__p__%'`
6839 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6840   echo $ac_n "(cached) $ac_c" 1>&6
6841 else
6842   ac_save_LIBS="$LIBS"
6843 LIBS="-lsvld  $LIBS"
6844 cat > conftest.$ac_ext <<EOF
6845 #line 6846 "configure"
6846 #include "confdefs.h"
6847 /* Override any gcc2 internal prototype to avoid an error.  */
6848 /* We use char because int might match the return type of a gcc2
6849     builtin and then its argument prototype would still apply.  */
6850 char dlopen();
6851
6852 int main() {
6853 dlopen()
6854 ; return 0; }
6855 EOF
6856 if { (eval echo configure:6857: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6857   rm -rf conftest*
6858   eval "ac_cv_lib_$ac_lib_var=yes"
6859 else
6860   echo "configure: failed program was:" >&5
6861   cat conftest.$ac_ext >&5
6862   rm -rf conftest*
6863   eval "ac_cv_lib_$ac_lib_var=no"
6864 fi
6865 rm -f conftest*
6866 LIBS="$ac_save_LIBS"
6867
6868 fi
6869 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6870   echo "$ac_t""yes" 1>&6
6871   lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"
6872 else
6873   echo "$ac_t""no" 1>&6
6874 echo $ac_n "checking for dld_link in -ldld""... $ac_c" 1>&6
6875 echo "configure:6876: checking for dld_link in -ldld" >&5
6876 ac_lib_var=`echo dld'_'dld_link | sed 'y%./+-:%__p__%'`
6877 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6878   echo $ac_n "(cached) $ac_c" 1>&6
6879 else
6880   ac_save_LIBS="$LIBS"
6881 LIBS="-ldld  $LIBS"
6882 cat > conftest.$ac_ext <<EOF
6883 #line 6884 "configure"
6884 #include "confdefs.h"
6885 /* Override any gcc2 internal prototype to avoid an error.  */
6886 /* We use char because int might match the return type of a gcc2
6887     builtin and then its argument prototype would still apply.  */
6888 char dld_link();
6889
6890 int main() {
6891 dld_link()
6892 ; return 0; }
6893 EOF
6894 if { (eval echo configure:6895: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6895   rm -rf conftest*
6896   eval "ac_cv_lib_$ac_lib_var=yes"
6897 else
6898   echo "configure: failed program was:" >&5
6899   cat conftest.$ac_ext >&5
6900   rm -rf conftest*
6901   eval "ac_cv_lib_$ac_lib_var=no"
6902 fi
6903 rm -f conftest*
6904 LIBS="$ac_save_LIBS"
6905
6906 fi
6907 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6908   echo "$ac_t""yes" 1>&6
6909   lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"
6910 else
6911   echo "$ac_t""no" 1>&6
6912 fi
6913
6914               
6915 fi
6916
6917             
6918 fi
6919
6920           
6921 fi
6922
6923         
6924 fi
6925
6926       
6927 fi
6928
6929     
6930 fi
6931
6932     ;;
6933   esac
6934
6935   if test "x$lt_cv_dlopen" != xno; then
6936     enable_dlopen=yes
6937   else
6938     enable_dlopen=no
6939   fi
6940
6941   case $lt_cv_dlopen in
6942   dlopen)
6943     save_CPPFLAGS="$CPPFLAGS"
6944         test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
6945
6946     save_LDFLAGS="$LDFLAGS"
6947     eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
6948
6949     save_LIBS="$LIBS"
6950     LIBS="$lt_cv_dlopen_libs $LIBS"
6951
6952     echo $ac_n "checking whether a program can dlopen itself""... $ac_c" 1>&6
6953 echo "configure:6954: checking whether a program can dlopen itself" >&5
6954 if eval "test \"\${lt_cv_dlopen_self+set}\" = set"; then
6955   echo $ac_n "(cached) $ac_c" 1>&6
6956 else
6957           if test "$cross_compiling" = yes; then :
6958   lt_cv_dlopen_self=cross
6959 else
6960     lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
6961   lt_status=$lt_dlunknown
6962   cat > conftest.$ac_ext <<EOF
6963 #line 6964 "configure"
6964 #include "confdefs.h"
6965
6966 #if HAVE_DLFCN_H
6967 #include <dlfcn.h>
6968 #endif
6969
6970 #include <stdio.h>
6971
6972 #ifdef RTLD_GLOBAL
6973 #  define LT_DLGLOBAL           RTLD_GLOBAL
6974 #else
6975 #  ifdef DL_GLOBAL
6976 #    define LT_DLGLOBAL         DL_GLOBAL
6977 #  else
6978 #    define LT_DLGLOBAL         0
6979 #  endif
6980 #endif
6981
6982 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
6983    find out it does not work in some platform. */
6984 #ifndef LT_DLLAZY_OR_NOW
6985 #  ifdef RTLD_LAZY
6986 #    define LT_DLLAZY_OR_NOW            RTLD_LAZY
6987 #  else
6988 #    ifdef DL_LAZY
6989 #      define LT_DLLAZY_OR_NOW          DL_LAZY
6990 #    else
6991 #      ifdef RTLD_NOW
6992 #        define LT_DLLAZY_OR_NOW        RTLD_NOW
6993 #      else
6994 #        ifdef DL_NOW
6995 #          define LT_DLLAZY_OR_NOW      DL_NOW
6996 #        else
6997 #          define LT_DLLAZY_OR_NOW      0
6998 #        endif
6999 #      endif
7000 #    endif
7001 #  endif
7002 #endif
7003
7004 #ifdef __cplusplus
7005 extern "C" void exit (int);
7006 #endif
7007
7008 void fnord() { int i=42;}
7009 int main ()
7010 {
7011   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
7012   int status = $lt_dlunknown;
7013
7014   if (self)
7015     {
7016       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
7017       else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
7018       /* dlclose (self); */
7019     }
7020
7021     exit (status);
7022 }
7023 EOF
7024   if { (eval echo configure:7025: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} 2>/dev/null; then
7025     (./conftest; exit; ) 2>/dev/null
7026     lt_status=$?
7027     case x$lt_status in
7028       x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;;
7029       x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;;
7030       x$lt_unknown|x*) lt_cv_dlopen_self=no ;;
7031     esac
7032   else :
7033     # compilation failed
7034     lt_cv_dlopen_self=no
7035   fi
7036 fi
7037 rm -fr conftest*
7038
7039     
7040 fi
7041
7042 echo "$ac_t""$lt_cv_dlopen_self" 1>&6
7043
7044     if test "x$lt_cv_dlopen_self" = xyes; then
7045       LDFLAGS="$LDFLAGS $link_static_flag"
7046       echo $ac_n "checking whether a statically linked program can dlopen itself""... $ac_c" 1>&6
7047 echo "configure:7048: checking whether a statically linked program can dlopen itself" >&5
7048 if eval "test \"\${lt_cv_dlopen_self_static+set}\" = set"; then
7049   echo $ac_n "(cached) $ac_c" 1>&6
7050 else
7051           if test "$cross_compiling" = yes; then :
7052   lt_cv_dlopen_self_static=cross
7053 else
7054     lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
7055   lt_status=$lt_dlunknown
7056   cat > conftest.$ac_ext <<EOF
7057 #line 7058 "configure"
7058 #include "confdefs.h"
7059
7060 #if HAVE_DLFCN_H
7061 #include <dlfcn.h>
7062 #endif
7063
7064 #include <stdio.h>
7065
7066 #ifdef RTLD_GLOBAL
7067 #  define LT_DLGLOBAL           RTLD_GLOBAL
7068 #else
7069 #  ifdef DL_GLOBAL
7070 #    define LT_DLGLOBAL         DL_GLOBAL
7071 #  else
7072 #    define LT_DLGLOBAL         0
7073 #  endif
7074 #endif
7075
7076 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
7077    find out it does not work in some platform. */
7078 #ifndef LT_DLLAZY_OR_NOW
7079 #  ifdef RTLD_LAZY
7080 #    define LT_DLLAZY_OR_NOW            RTLD_LAZY
7081 #  else
7082 #    ifdef DL_LAZY
7083 #      define LT_DLLAZY_OR_NOW          DL_LAZY
7084 #    else
7085 #      ifdef RTLD_NOW
7086 #        define LT_DLLAZY_OR_NOW        RTLD_NOW
7087 #      else
7088 #        ifdef DL_NOW
7089 #          define LT_DLLAZY_OR_NOW      DL_NOW
7090 #        else
7091 #          define LT_DLLAZY_OR_NOW      0
7092 #        endif
7093 #      endif
7094 #    endif
7095 #  endif
7096 #endif
7097
7098 #ifdef __cplusplus
7099 extern "C" void exit (int);
7100 #endif
7101
7102 void fnord() { int i=42;}
7103 int main ()
7104 {
7105   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
7106   int status = $lt_dlunknown;
7107
7108   if (self)
7109     {
7110       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
7111       else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
7112       /* dlclose (self); */
7113     }
7114
7115     exit (status);
7116 }
7117 EOF
7118   if { (eval echo configure:7119: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} 2>/dev/null; then
7119     (./conftest; exit; ) 2>/dev/null
7120     lt_status=$?
7121     case x$lt_status in
7122       x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;;
7123       x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;;
7124       x$lt_unknown|x*) lt_cv_dlopen_self_static=no ;;
7125     esac
7126   else :
7127     # compilation failed
7128     lt_cv_dlopen_self_static=no
7129   fi
7130 fi
7131 rm -fr conftest*
7132
7133       
7134 fi
7135
7136 echo "$ac_t""$lt_cv_dlopen_self_static" 1>&6
7137     fi
7138
7139     CPPFLAGS="$save_CPPFLAGS"
7140     LDFLAGS="$save_LDFLAGS"
7141     LIBS="$save_LIBS"
7142     ;;
7143   esac
7144
7145   case $lt_cv_dlopen_self in
7146   yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
7147   *) enable_dlopen_self=unknown ;;
7148   esac
7149
7150   case $lt_cv_dlopen_self_static in
7151   yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
7152   *) enable_dlopen_self_static=unknown ;;
7153   esac
7154 fi
7155
7156
7157 if test "$enable_shared" = yes && test "$GCC" = yes; then
7158   case $archive_cmds in
7159   *'~'*)
7160     # FIXME: we may have to deal with multi-command sequences.
7161     ;;
7162   '$CC '*)
7163     # Test whether the compiler implicitly links with -lc since on some
7164     # systems, -lgcc has to come before -lc. If gcc already passes -lc
7165     # to ld, don't add -lc before -lgcc.
7166     echo $ac_n "checking whether -lc should be explicitly linked in""... $ac_c" 1>&6
7167 echo "configure:7168: checking whether -lc should be explicitly linked in" >&5
7168     if eval "test \"\${lt_cv_archive_cmds_need_lc+set}\" = set"; then
7169   echo $ac_n "(cached) $ac_c" 1>&6
7170 else
7171   $rm conftest*
7172     echo 'static int dummy;' > conftest.$ac_ext
7173
7174     if { (eval echo configure:7175: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7175       soname=conftest
7176       lib=conftest
7177       libobjs=conftest.$ac_objext
7178       deplibs=
7179       wl=$lt_cv_prog_cc_wl
7180       compiler_flags=-v
7181       linker_flags=-v
7182       verstring=
7183       output_objdir=.
7184       libname=conftest
7185       save_allow_undefined_flag=$allow_undefined_flag
7186       allow_undefined_flag=
7187       if { (eval echo configure:7188: \"$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; }
7188       then
7189         lt_cv_archive_cmds_need_lc=no
7190       else
7191         lt_cv_archive_cmds_need_lc=yes
7192       fi
7193       allow_undefined_flag=$save_allow_undefined_flag
7194     else
7195       cat conftest.err 1>&5
7196     fi
7197 fi
7198
7199     echo "$ac_t""$lt_cv_archive_cmds_need_lc" 1>&6
7200     ;;
7201   esac
7202 fi
7203 need_lc=${lt_cv_archive_cmds_need_lc-yes}
7204
7205 # The second clause should only fire when bootstrapping the
7206 # libtool distribution, otherwise you forgot to ship ltmain.sh
7207 # with your package, and you will get complaints that there are
7208 # no rules to generate ltmain.sh.
7209 if test -f "$ltmain"; then
7210   :
7211 else
7212   # If there is no Makefile yet, we rely on a make rule to execute
7213   # `config.status --recheck' to rerun these tests and create the
7214   # libtool script then.
7215   test -f Makefile && make "$ltmain"
7216 fi
7217
7218 if test -f "$ltmain"; then
7219   trap "$rm \"${ofile}T\"; exit 1" 1 2 15
7220   $rm -f "${ofile}T"
7221
7222   echo creating $ofile
7223
7224   # Now quote all the things that may contain metacharacters while being
7225   # careful not to overquote the AC_SUBSTed values.  We take copies of the
7226   # variables and quote the copies for generation of the libtool script.
7227   for var in echo old_CC old_CFLAGS SED \
7228     AR AR_FLAGS CC LD LN_S NM SHELL \
7229     reload_flag reload_cmds wl \
7230     pic_flag link_static_flag no_builtin_flag export_dynamic_flag_spec \
7231     thread_safe_flag_spec whole_archive_flag_spec libname_spec \
7232     library_names_spec soname_spec \
7233     RANLIB old_archive_cmds old_archive_from_new_cmds old_postinstall_cmds \
7234     old_postuninstall_cmds archive_cmds archive_expsym_cmds postinstall_cmds \
7235     postuninstall_cmds extract_expsyms_cmds old_archive_from_expsyms_cmds \
7236     old_striplib striplib file_magic_cmd export_symbols_cmds \
7237     deplibs_check_method allow_undefined_flag no_undefined_flag \
7238     finish_cmds finish_eval global_symbol_pipe global_symbol_to_cdecl \
7239     global_symbol_to_c_name_address \
7240     hardcode_libdir_flag_spec hardcode_libdir_separator  \
7241     sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
7242     compiler_c_o compiler_o_lo need_locks exclude_expsyms include_expsyms; do
7243
7244     case $var in
7245     reload_cmds | old_archive_cmds | old_archive_from_new_cmds | \
7246     old_postinstall_cmds | old_postuninstall_cmds | \
7247     export_symbols_cmds | archive_cmds | archive_expsym_cmds | \
7248     extract_expsyms_cmds | old_archive_from_expsyms_cmds | \
7249     postinstall_cmds | postuninstall_cmds | \
7250     finish_cmds | sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
7251       # Double-quote double-evaled strings.
7252       eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
7253       ;;
7254     *)
7255       eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
7256       ;;
7257     esac
7258   done
7259
7260   cat <<__EOF__ > "${ofile}T"
7261 #! $SHELL
7262
7263 # `$echo "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
7264 # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
7265 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
7266 #
7267 # Copyright (C) 1996-2000 Free Software Foundation, Inc.
7268 # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
7269 #
7270 # This program is free software; you can redistribute it and/or modify
7271 # it under the terms of the GNU General Public License as published by
7272 # the Free Software Foundation; either version 2 of the License, or
7273 # (at your option) any later version.
7274 #
7275 # This program is distributed in the hope that it will be useful, but
7276 # WITHOUT ANY WARRANTY; without even the implied warranty of
7277 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
7278 # General Public License for more details.
7279 #
7280 # You should have received a copy of the GNU General Public License
7281 # along with this program; if not, write to the Free Software
7282 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
7283 #
7284 # As a special exception to the GNU General Public License, if you
7285 # distribute this file as part of a program that contains a
7286 # configuration script generated by Autoconf, you may include it under
7287 # the same distribution terms that you use for the rest of that program.
7288
7289 # A sed that does not truncate output.
7290 SED=$lt_SED
7291
7292 # Sed that helps us avoid accidentally triggering echo(1) options like -n.
7293 Xsed="${SED} -e s/^X//"
7294
7295 # The HP-UX ksh and POSIX shell print the target directory to stdout
7296 # if CDPATH is set.
7297 if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
7298
7299 # ### BEGIN LIBTOOL CONFIG
7300
7301 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
7302
7303 # Shell to use when invoking shell scripts.
7304 SHELL=$lt_SHELL
7305
7306 # Whether or not to build shared libraries.
7307 build_libtool_libs=$enable_shared
7308
7309 # Whether or not to build static libraries.
7310 build_old_libs=$enable_static
7311
7312 # Whether or not to add -lc for building shared libraries.
7313 build_libtool_need_lc=$need_lc
7314
7315 # Whether or not to optimize for fast installation.
7316 fast_install=$enable_fast_install
7317
7318 # The host system.
7319 host_alias=$host_alias
7320 host=$host
7321
7322 # An echo program that does not interpret backslashes.
7323 echo=$lt_echo
7324
7325 # The archiver.
7326 AR=$lt_AR
7327 AR_FLAGS=$lt_AR_FLAGS
7328
7329 # The default C compiler.
7330 CC=$lt_CC
7331
7332 # Is the compiler the GNU C compiler?
7333 with_gcc=$GCC
7334
7335 # The linker used to build libraries.
7336 LD=$lt_LD
7337
7338 # Whether we need hard or soft links.
7339 LN_S=$lt_LN_S
7340
7341 # A BSD-compatible nm program.
7342 NM=$lt_NM
7343
7344 # A symbol stripping program
7345 STRIP=$STRIP
7346
7347 # Used to examine libraries when file_magic_cmd begins "file"
7348 MAGIC_CMD=$MAGIC_CMD
7349
7350 # Used on cygwin: DLL creation program.
7351 DLLTOOL="$DLLTOOL"
7352
7353 # Used on cygwin: object dumper.
7354 OBJDUMP="$OBJDUMP"
7355
7356 # Used on cygwin: assembler.
7357 AS="$AS"
7358
7359 # The name of the directory that contains temporary libtool files.
7360 objdir=$objdir
7361
7362 # How to create reloadable object files.
7363 reload_flag=$lt_reload_flag
7364 reload_cmds=$lt_reload_cmds
7365
7366 # How to pass a linker flag through the compiler.
7367 wl=$lt_wl
7368
7369 # Object file suffix (normally "o").
7370 objext="$ac_objext"
7371
7372 # Old archive suffix (normally "a").
7373 libext="$libext"
7374
7375 # Executable file suffix (normally "").
7376 exeext="$exeext"
7377
7378 # Additional compiler flags for building library objects.
7379 pic_flag=$lt_pic_flag
7380 pic_mode=$pic_mode
7381
7382 # Does compiler simultaneously support -c and -o options?
7383 compiler_c_o=$lt_compiler_c_o
7384
7385 # Can we write directly to a .lo ?
7386 compiler_o_lo=$lt_compiler_o_lo
7387
7388 # Must we lock files when doing compilation ?
7389 need_locks=$lt_need_locks
7390
7391 # Do we need the lib prefix for modules?
7392 need_lib_prefix=$need_lib_prefix
7393
7394 # Do we need a version for libraries?
7395 need_version=$need_version
7396
7397 # Whether dlopen is supported.
7398 dlopen_support=$enable_dlopen
7399
7400 # Whether dlopen of programs is supported.
7401 dlopen_self=$enable_dlopen_self
7402
7403 # Whether dlopen of statically linked programs is supported.
7404 dlopen_self_static=$enable_dlopen_self_static
7405
7406 # Compiler flag to prevent dynamic linking.
7407 link_static_flag=$lt_link_static_flag
7408
7409 # Compiler flag to turn off builtin functions.
7410 no_builtin_flag=$lt_no_builtin_flag
7411
7412 # Compiler flag to allow reflexive dlopens.
7413 export_dynamic_flag_spec=$lt_export_dynamic_flag_spec
7414
7415 # Compiler flag to generate shared objects directly from archives.
7416 whole_archive_flag_spec=$lt_whole_archive_flag_spec
7417
7418 # Compiler flag to generate thread-safe objects.
7419 thread_safe_flag_spec=$lt_thread_safe_flag_spec
7420
7421 # Library versioning type.
7422 version_type=$version_type
7423
7424 # Format of library name prefix.
7425 libname_spec=$lt_libname_spec
7426
7427 # List of archive names.  First name is the real one, the rest are links.
7428 # The last name is the one that the linker finds with -lNAME.
7429 library_names_spec=$lt_library_names_spec
7430
7431 # The coded name of the library, if different from the real name.
7432 soname_spec=$lt_soname_spec
7433
7434 # Commands used to build and install an old-style archive.
7435 RANLIB=$lt_RANLIB
7436 old_archive_cmds=$lt_old_archive_cmds
7437 old_postinstall_cmds=$lt_old_postinstall_cmds
7438 old_postuninstall_cmds=$lt_old_postuninstall_cmds
7439
7440 # Create an old-style archive from a shared archive.
7441 old_archive_from_new_cmds=$lt_old_archive_from_new_cmds
7442
7443 # Create a temporary old-style archive to link instead of a shared archive.
7444 old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds
7445
7446 # Commands used to build and install a shared archive.
7447 archive_cmds=$lt_archive_cmds
7448 archive_expsym_cmds=$lt_archive_expsym_cmds
7449 postinstall_cmds=$lt_postinstall_cmds
7450 postuninstall_cmds=$lt_postuninstall_cmds
7451
7452 # Commands to strip libraries.
7453 old_striplib=$lt_old_striplib
7454 striplib=$lt_striplib
7455
7456 # Method to check whether dependent libraries are shared objects.
7457 deplibs_check_method=$lt_deplibs_check_method
7458
7459 # Command to use when deplibs_check_method == file_magic.
7460 file_magic_cmd=$lt_file_magic_cmd
7461
7462 # Flag that allows shared libraries with undefined symbols to be built.
7463 allow_undefined_flag=$lt_allow_undefined_flag
7464
7465 # Flag that forces no undefined symbols.
7466 no_undefined_flag=$lt_no_undefined_flag
7467
7468 # Commands used to finish a libtool library installation in a directory.
7469 finish_cmds=$lt_finish_cmds
7470
7471 # Same as above, but a single script fragment to be evaled but not shown.
7472 finish_eval=$lt_finish_eval
7473
7474 # Take the output of nm and produce a listing of raw symbols and C names.
7475 global_symbol_pipe=$lt_global_symbol_pipe
7476
7477 # Transform the output of nm in a proper C declaration
7478 global_symbol_to_cdecl=$lt_global_symbol_to_cdecl
7479
7480 # Transform the output of nm in a C name address pair
7481 global_symbol_to_c_name_address=$lt_global_symbol_to_c_name_address
7482
7483 # This is the shared library runtime path variable.
7484 runpath_var=$runpath_var
7485
7486 # This is the shared library path variable.
7487 shlibpath_var=$shlibpath_var
7488
7489 # Is shlibpath searched before the hard-coded library search path?
7490 shlibpath_overrides_runpath=$shlibpath_overrides_runpath
7491
7492 # How to hardcode a shared library path into an executable.
7493 hardcode_action=$hardcode_action
7494
7495 # Whether we should hardcode library paths into libraries.
7496 hardcode_into_libs=$hardcode_into_libs
7497
7498 # Flag to hardcode \$libdir into a binary during linking.
7499 # This must work even if \$libdir does not exist.
7500 hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
7501
7502 # Whether we need a single -rpath flag with a separated argument.
7503 hardcode_libdir_separator=$lt_hardcode_libdir_separator
7504
7505 # Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
7506 # resulting binary.
7507 hardcode_direct=$hardcode_direct
7508
7509 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
7510 # resulting binary.
7511 hardcode_minus_L=$hardcode_minus_L
7512
7513 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
7514 # the resulting binary.
7515 hardcode_shlibpath_var=$hardcode_shlibpath_var
7516
7517 # Variables whose values should be saved in libtool wrapper scripts and
7518 # restored at relink time.
7519 variables_saved_for_relink="$variables_saved_for_relink"
7520
7521 # Whether libtool must link a program against all its dependency libraries.
7522 link_all_deplibs=$link_all_deplibs
7523
7524 # Compile-time system search path for libraries
7525 sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
7526
7527 # Run-time system search path for libraries
7528 sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
7529
7530 # Fix the shell variable \$srcfile for the compiler.
7531 fix_srcfile_path="$fix_srcfile_path"
7532
7533 # Set to yes if exported symbols are required.
7534 always_export_symbols=$always_export_symbols
7535
7536 # The commands to list exported symbols.
7537 export_symbols_cmds=$lt_export_symbols_cmds
7538
7539 # The commands to extract the exported symbol list from a shared archive.
7540 extract_expsyms_cmds=$lt_extract_expsyms_cmds
7541
7542 # Symbols that should not be listed in the preloaded symbols.
7543 exclude_expsyms=$lt_exclude_expsyms
7544
7545 # Symbols that must always be exported.
7546 include_expsyms=$lt_include_expsyms
7547
7548 # ### END LIBTOOL CONFIG
7549
7550 __EOF__
7551
7552   case $host_os in
7553   aix3*)
7554     cat <<\EOF >> "${ofile}T"
7555
7556 # AIX sometimes has problems with the GCC collect2 program.  For some
7557 # reason, if we set the COLLECT_NAMES environment variable, the problems
7558 # vanish in a puff of smoke.
7559 if test "X${COLLECT_NAMES+set}" != Xset; then
7560   COLLECT_NAMES=
7561   export COLLECT_NAMES
7562 fi
7563 EOF
7564     ;;
7565   esac
7566
7567   case $host_os in
7568   cygwin* | mingw* | pw32* | os2*)
7569     cat <<'EOF' >> "${ofile}T"
7570       # This is a source program that is used to create dlls on Windows
7571       # Don't remove nor modify the starting and closing comments
7572 # /* ltdll.c starts here */
7573 # #define WIN32_LEAN_AND_MEAN
7574 # #include <windows.h>
7575 # #undef WIN32_LEAN_AND_MEAN
7576 # #include <stdio.h>
7577 #
7578 # #ifndef __CYGWIN__
7579 # #  ifdef __CYGWIN32__
7580 # #    define __CYGWIN__ __CYGWIN32__
7581 # #  endif
7582 # #endif
7583 #
7584 # #ifdef __cplusplus
7585 # extern "C" {
7586 # #endif
7587 # BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
7588 # #ifdef __cplusplus
7589 # }
7590 # #endif
7591 #
7592 # #ifdef __CYGWIN__
7593 # #include <cygwin/cygwin_dll.h>
7594 # DECLARE_CYGWIN_DLL( DllMain );
7595 # #endif
7596 # HINSTANCE __hDllInstance_base;
7597 #
7598 # BOOL APIENTRY
7599 # DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
7600 # {
7601 #   __hDllInstance_base = hInst;
7602 #   return TRUE;
7603 # }
7604 # /* ltdll.c ends here */
7605         # This is a source program that is used to create import libraries
7606         # on Windows for dlls which lack them. Don't remove nor modify the
7607         # starting and closing comments
7608 # /* impgen.c starts here */
7609 # /*   Copyright (C) 1999-2000 Free Software Foundation, Inc.
7610 #
7611 #  This file is part of GNU libtool.
7612 #
7613 #  This program is free software; you can redistribute it and/or modify
7614 #  it under the terms of the GNU General Public License as published by
7615 #  the Free Software Foundation; either version 2 of the License, or
7616 #  (at your option) any later version.
7617 #
7618 #  This program is distributed in the hope that it will be useful,
7619 #  but WITHOUT ANY WARRANTY; without even the implied warranty of
7620 #  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
7621 #  GNU General Public License for more details.
7622 #
7623 #  You should have received a copy of the GNU General Public License
7624 #  along with this program; if not, write to the Free Software
7625 #  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
7626 #  */
7627 #
7628 # #include <stdio.h>            /* for printf() */
7629 # #include <unistd.h>           /* for open(), lseek(), read() */
7630 # #include <fcntl.h>            /* for O_RDONLY, O_BINARY */
7631 # #include <string.h>           /* for strdup() */
7632 #
7633 # /* O_BINARY isn't required (or even defined sometimes) under Unix */
7634 # #ifndef O_BINARY
7635 # #define O_BINARY 0
7636 # #endif
7637 #
7638 # static unsigned int
7639 # pe_get16 (fd, offset)
7640 #      int fd;
7641 #      int offset;
7642 # {
7643 #   unsigned char b[2];
7644 #   lseek (fd, offset, SEEK_SET);
7645 #   read (fd, b, 2);
7646 #   return b[0] + (b[1]<<8);
7647 # }
7648 #
7649 # static unsigned int
7650 # pe_get32 (fd, offset)
7651 #     int fd;
7652 #     int offset;
7653 # {
7654 #   unsigned char b[4];
7655 #   lseek (fd, offset, SEEK_SET);
7656 #   read (fd, b, 4);
7657 #   return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
7658 # }
7659 #
7660 # static unsigned int
7661 # pe_as32 (ptr)
7662 #      void *ptr;
7663 # {
7664 #   unsigned char *b = ptr;
7665 #   return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
7666 # }
7667 #
7668 # int
7669 # main (argc, argv)
7670 #     int argc;
7671 #     char *argv[];
7672 # {
7673 #     int dll;
7674 #     unsigned long pe_header_offset, opthdr_ofs, num_entries, i;
7675 #     unsigned long export_rva, export_size, nsections, secptr, expptr;
7676 #     unsigned long name_rvas, nexp;
7677 #     unsigned char *expdata, *erva;
7678 #     char *filename, *dll_name;
7679 #
7680 #     filename = argv[1];
7681 #
7682 #     dll = open(filename, O_RDONLY|O_BINARY);
7683 #     if (dll < 1)
7684 #       return 1;
7685 #
7686 #     dll_name = filename;
7687 #
7688 #     for (i=0; filename[i]; i++)
7689 #       if (filename[i] == '/' || filename[i] == '\\'  || filename[i] == ':')
7690 #           dll_name = filename + i +1;
7691 #
7692 #     pe_header_offset = pe_get32 (dll, 0x3c);
7693 #     opthdr_ofs = pe_header_offset + 4 + 20;
7694 #     num_entries = pe_get32 (dll, opthdr_ofs + 92);
7695 #
7696 #     if (num_entries < 1) /* no exports */
7697 #       return 1;
7698 #
7699 #     export_rva = pe_get32 (dll, opthdr_ofs + 96);
7700 #     export_size = pe_get32 (dll, opthdr_ofs + 100);
7701 #     nsections = pe_get16 (dll, pe_header_offset + 4 +2);
7702 #     secptr = (pe_header_offset + 4 + 20 +
7703 #             pe_get16 (dll, pe_header_offset + 4 + 16));
7704 #
7705 #     expptr = 0;
7706 #     for (i = 0; i < nsections; i++)
7707 #     {
7708 #       char sname[8];
7709 #       unsigned long secptr1 = secptr + 40 * i;
7710 #       unsigned long vaddr = pe_get32 (dll, secptr1 + 12);
7711 #       unsigned long vsize = pe_get32 (dll, secptr1 + 16);
7712 #       unsigned long fptr = pe_get32 (dll, secptr1 + 20);
7713 #       lseek(dll, secptr1, SEEK_SET);
7714 #       read(dll, sname, 8);
7715 #       if (vaddr <= export_rva && vaddr+vsize > export_rva)
7716 #       {
7717 #           expptr = fptr + (export_rva - vaddr);
7718 #           if (export_rva + export_size > vaddr + vsize)
7719 #               export_size = vsize - (export_rva - vaddr);
7720 #           break;
7721 #       }
7722 #     }
7723 #
7724 #     expdata = (unsigned char*)malloc(export_size);
7725 #     lseek (dll, expptr, SEEK_SET);
7726 #     read (dll, expdata, export_size);
7727 #     erva = expdata - export_rva;
7728 #
7729 #     nexp = pe_as32 (expdata+24);
7730 #     name_rvas = pe_as32 (expdata+32);
7731 #
7732 #     printf ("EXPORTS\n");
7733 #     for (i = 0; i<nexp; i++)
7734 #     {
7735 #       unsigned long name_rva = pe_as32 (erva+name_rvas+i*4);
7736 #       printf ("\t%s @ %ld ;\n", erva+name_rva, 1+ i);
7737 #     }
7738 #
7739 #     return 0;
7740 # }
7741 # /* impgen.c ends here */
7742
7743 EOF
7744     ;;
7745   esac
7746
7747   # We use sed instead of cat because bash on DJGPP gets confused if
7748   # if finds mixed CR/LF and LF-only lines.  Since sed operates in
7749   # text mode, it properly converts lines to CR/LF.  This bash problem
7750   # is reportedly fixed, but why not run on old versions too?
7751   sed '$q' "$ltmain" >> "${ofile}T" || (rm -f "${ofile}T"; exit 1)
7752
7753   mv -f "${ofile}T" "$ofile" || \
7754     (rm -f "$ofile" && cp "${ofile}T" "$ofile" && rm -f "${ofile}T")
7755   chmod +x "$ofile"
7756 fi
7757
7758
7759
7760
7761
7762 # This can be used to rebuild libtool when needed
7763 LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
7764
7765 # Always use our own libtool.
7766 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
7767
7768 # Prevent multiple expansion
7769
7770
7771
7772 ol_link_perl=no
7773 if test $ol_enable_perl != no ; then
7774         # Extract the first word of "perl", so it can be a program name with args.
7775 set dummy perl; ac_word=$2
7776 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
7777 echo "configure:7778: checking for $ac_word" >&5
7778 if eval "test \"\${ac_cv_path_PERLBIN+set}\" = set"; then
7779   echo $ac_n "(cached) $ac_c" 1>&6
7780 else
7781   case "$PERLBIN" in
7782   /*)
7783   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a path.
7784   ;;
7785   ?:/*)
7786   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a dos path.
7787   ;;
7788   *)
7789   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
7790   ac_dummy="$PATH"
7791   for ac_dir in $ac_dummy; do 
7792     test -z "$ac_dir" && ac_dir=.
7793     if test -f $ac_dir/$ac_word; then
7794       ac_cv_path_PERLBIN="$ac_dir/$ac_word"
7795       break
7796     fi
7797   done
7798   IFS="$ac_save_ifs"
7799   test -z "$ac_cv_path_PERLBIN" && ac_cv_path_PERLBIN="/usr/bin/perl"
7800   ;;
7801 esac
7802 fi
7803 PERLBIN="$ac_cv_path_PERLBIN"
7804 if test -n "$PERLBIN"; then
7805   echo "$ac_t""$PERLBIN" 1>&6
7806 else
7807   echo "$ac_t""no" 1>&6
7808 fi
7809
7810
7811         if test "no$PERLBIN" = "no" ; then
7812                 if test $ol_enable_perl = yes ; then
7813                         { echo "configure: error: could not locate perl" 1>&2; exit 1; }
7814                 fi
7815
7816         else
7817                 PERL_CPPFLAGS="`$PERLBIN -MExtUtils::Embed -e ccopts`"
7818                 PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e 's/ -lc / /' -e 's/ -lc$//'`"
7819
7820                 if test x"$ol_enable_perl" = "xyes" ; then
7821                         SLAPD_PERL_LDFLAGS="$PERL_LDFLAGS"
7822                 else
7823                         MOD_PERL_LDFLAGS="$PERL_LDFLAGS"
7824                 fi
7825                                 ol_link_perl=yes
7826         fi
7827 fi
7828
7829 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
7830 echo "configure:7831: checking how to run the C preprocessor" >&5
7831 # On Suns, sometimes $CPP names a directory.
7832 if test -n "$CPP" && test -d "$CPP"; then
7833   CPP=
7834 fi
7835 if test -z "$CPP"; then
7836 if eval "test \"\${ac_cv_prog_CPP+set}\" = set"; then
7837   echo $ac_n "(cached) $ac_c" 1>&6
7838 else
7839     # This must be in double quotes, not single quotes, because CPP may get
7840   # substituted into the Makefile and "${CC-cc}" will confuse make.
7841   CPP="${CC-cc} -E"
7842   # On the NeXT, cc -E runs the code through the compiler's parser,
7843   # not just through cpp.
7844   cat > conftest.$ac_ext <<EOF
7845 #line 7846 "configure"
7846 #include "confdefs.h"
7847 #include <assert.h>
7848 Syntax Error
7849 EOF
7850 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7851 { (eval echo configure:7852: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7852 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7853 if test -z "$ac_err"; then
7854   :
7855 else
7856   echo "$ac_err" >&5
7857   echo "configure: failed program was:" >&5
7858   cat conftest.$ac_ext >&5
7859   rm -rf conftest*
7860   CPP="${CC-cc} -E -traditional-cpp"
7861   cat > conftest.$ac_ext <<EOF
7862 #line 7863 "configure"
7863 #include "confdefs.h"
7864 #include <assert.h>
7865 Syntax Error
7866 EOF
7867 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7868 { (eval echo configure:7869: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7869 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7870 if test -z "$ac_err"; then
7871   :
7872 else
7873   echo "$ac_err" >&5
7874   echo "configure: failed program was:" >&5
7875   cat conftest.$ac_ext >&5
7876   rm -rf conftest*
7877   CPP="${CC-cc} -nologo -E"
7878   cat > conftest.$ac_ext <<EOF
7879 #line 7880 "configure"
7880 #include "confdefs.h"
7881 #include <assert.h>
7882 Syntax Error
7883 EOF
7884 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7885 { (eval echo configure:7886: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7886 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7887 if test -z "$ac_err"; then
7888   :
7889 else
7890   echo "$ac_err" >&5
7891   echo "configure: failed program was:" >&5
7892   cat conftest.$ac_ext >&5
7893   rm -rf conftest*
7894   CPP=/lib/cpp
7895 fi
7896 rm -f conftest*
7897 fi
7898 rm -f conftest*
7899 fi
7900 rm -f conftest*
7901   ac_cv_prog_CPP="$CPP"
7902 fi
7903   CPP="$ac_cv_prog_CPP"
7904 else
7905   ac_cv_prog_CPP="$CPP"
7906 fi
7907 echo "$ac_t""$CPP" 1>&6
7908
7909
7910
7911 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
7912 echo "configure:7913: checking for Cygwin environment" >&5
7913 if eval "test \"\${ac_cv_cygwin+set}\" = set"; then
7914   echo $ac_n "(cached) $ac_c" 1>&6
7915 else
7916   cat > conftest.$ac_ext <<EOF
7917 #line 7918 "configure"
7918 #include "confdefs.h"
7919
7920 int main() {
7921
7922 #ifndef __CYGWIN__
7923 #define __CYGWIN__ __CYGWIN32__
7924 #endif
7925 return __CYGWIN__;
7926 ; return 0; }
7927 EOF
7928 if { (eval echo configure:7929: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7929   rm -rf conftest*
7930   ac_cv_cygwin=yes
7931 else
7932   echo "configure: failed program was:" >&5
7933   cat conftest.$ac_ext >&5
7934   rm -rf conftest*
7935   ac_cv_cygwin=no
7936 fi
7937 rm -f conftest*
7938 fi
7939
7940 echo "$ac_t""$ac_cv_cygwin" 1>&6
7941 CYGWIN=
7942 test "$ac_cv_cygwin" = yes && CYGWIN=yes
7943 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
7944 echo "configure:7945: checking for mingw32 environment" >&5
7945 if eval "test \"\${ac_cv_mingw32+set}\" = set"; then
7946   echo $ac_n "(cached) $ac_c" 1>&6
7947 else
7948   cat > conftest.$ac_ext <<EOF
7949 #line 7950 "configure"
7950 #include "confdefs.h"
7951
7952 int main() {
7953 return __MINGW32__;
7954 ; return 0; }
7955 EOF
7956 if { (eval echo configure:7957: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7957   rm -rf conftest*
7958   ac_cv_mingw32=yes
7959 else
7960   echo "configure: failed program was:" >&5
7961   cat conftest.$ac_ext >&5
7962   rm -rf conftest*
7963   ac_cv_mingw32=no
7964 fi
7965 rm -f conftest*
7966 fi
7967
7968 echo "$ac_t""$ac_cv_mingw32" 1>&6
7969 MINGW32=
7970 test "$ac_cv_mingw32" = yes && MINGW32=yes
7971
7972
7973
7974 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
7975 echo "configure:7976: checking for executable suffix" >&5
7976 if eval "test \"\${ac_cv_exeext+set}\" = set"; then
7977   echo $ac_n "(cached) $ac_c" 1>&6
7978 else
7979   if test "$CYGWIN" = yes || test "$MINGW32" = yes || test "$EMXOS2" = yes; then
7980   ac_cv_exeext=.exe
7981 else
7982   rm -f conftest*
7983   echo 'int main () { return 0; }' > conftest.$ac_ext
7984   ac_cv_exeext=
7985   if { (eval echo configure:7986: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
7986     for file in conftest.*; do
7987       case $file in
7988       *.c | *.C | *.o | *.obj | *.xcoff) ;;
7989       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
7990       esac
7991     done
7992   else
7993     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
7994   fi
7995   rm -f conftest*
7996   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
7997 fi
7998 fi
7999
8000 EXEEXT=""
8001 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
8002 echo "$ac_t""${ac_cv_exeext}" 1>&6
8003 ac_exeext=$EXEEXT
8004
8005 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
8006 echo "configure:8007: checking for object suffix" >&5
8007 if eval "test \"\${ac_cv_objext+set}\" = set"; then
8008   echo $ac_n "(cached) $ac_c" 1>&6
8009 else
8010   rm -f conftest*
8011 echo 'int i = 1;' > conftest.$ac_ext
8012 if { (eval echo configure:8013: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8013   for ac_file in conftest.*; do
8014     case $ac_file in
8015     *.c) ;;
8016     *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
8017     esac
8018   done
8019 else
8020   { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
8021 fi
8022 rm -f conftest*
8023 fi
8024
8025 echo "$ac_t""$ac_cv_objext" 1>&6
8026 OBJEXT=$ac_cv_objext
8027 ac_objext=$ac_cv_objext
8028
8029
8030 cat >> confdefs.h <<EOF
8031 #define EXEEXT "${EXEEXT}"
8032 EOF
8033
8034
8035 echo $ac_n "checking for be_app in -lbe""... $ac_c" 1>&6
8036 echo "configure:8037: checking for be_app in -lbe" >&5
8037 ac_lib_var=`echo be'_'be_app | sed 'y%./+-:%__p__%'`
8038 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8039   echo $ac_n "(cached) $ac_c" 1>&6
8040 else
8041   ac_save_LIBS="$LIBS"
8042 LIBS="-lbe -lroot -lnet $LIBS"
8043 cat > conftest.$ac_ext <<EOF
8044 #line 8045 "configure"
8045 #include "confdefs.h"
8046 /* Override any gcc2 internal prototype to avoid an error.  */
8047 /* We use char because int might match the return type of a gcc2
8048     builtin and then its argument prototype would still apply.  */
8049 char be_app();
8050
8051 int main() {
8052 be_app()
8053 ; return 0; }
8054 EOF
8055 if { (eval echo configure:8056: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8056   rm -rf conftest*
8057   eval "ac_cv_lib_$ac_lib_var=yes"
8058 else
8059   echo "configure: failed program was:" >&5
8060   cat conftest.$ac_ext >&5
8061   rm -rf conftest*
8062   eval "ac_cv_lib_$ac_lib_var=no"
8063 fi
8064 rm -f conftest*
8065 LIBS="$ac_save_LIBS"
8066
8067 fi
8068 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8069   echo "$ac_t""yes" 1>&6
8070   LIBS="$LIBS -lbe -lroot -lnet"
8071 else
8072   echo "$ac_t""no" 1>&6
8073 :
8074 fi
8075
8076
8077
8078
8079
8080 echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
8081 echo "configure:8082: checking for ${CC-cc} option to accept ANSI C" >&5
8082 if eval "test \"\${am_cv_prog_cc_stdc+set}\" = set"; then
8083   echo $ac_n "(cached) $ac_c" 1>&6
8084 else
8085   am_cv_prog_cc_stdc=no
8086 ac_save_CC="$CC"
8087 # Don't try gcc -ansi; that turns off useful extensions and
8088 # breaks some systems' header files.
8089 # AIX                   -qlanglvl=ansi
8090 # Ultrix and OSF/1      -std1
8091 # HP-UX 10.20 and later -Ae
8092 # HP-UX older versions  -Aa -D_HPUX_SOURCE
8093 # SVR4                  -Xc -D__EXTENSIONS__
8094 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
8095 do
8096   CC="$ac_save_CC $ac_arg"
8097   cat > conftest.$ac_ext <<EOF
8098 #line 8099 "configure"
8099 #include "confdefs.h"
8100 #include <stdarg.h>
8101 #include <stdio.h>
8102 #include <sys/types.h>
8103 #include <sys/stat.h>
8104 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
8105 struct buf { int x; };
8106 FILE * (*rcsopen) (struct buf *, struct stat *, int);
8107 static char *e (p, i)
8108      char **p;
8109      int i;
8110 {
8111   return p[i];
8112 }
8113 static char *f (char * (*g) (char **, int), char **p, ...)
8114 {
8115   char *s;
8116   va_list v;
8117   va_start (v,p);
8118   s = g (p, va_arg (v,int));
8119   va_end (v);
8120   return s;
8121 }
8122 int test (int i, double x);
8123 struct s1 {int (*f) (int a);};
8124 struct s2 {int (*f) (double a);};
8125 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
8126 int argc;
8127 char **argv;
8128
8129 int main() {
8130
8131 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
8132
8133 ; return 0; }
8134 EOF
8135 if { (eval echo configure:8136: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8136   rm -rf conftest*
8137   am_cv_prog_cc_stdc="$ac_arg"; break
8138 else
8139   echo "configure: failed program was:" >&5
8140   cat conftest.$ac_ext >&5
8141 fi
8142 rm -f conftest*
8143 done
8144 CC="$ac_save_CC"
8145
8146 fi
8147
8148 if test -z "$am_cv_prog_cc_stdc"; then
8149   echo "$ac_t""none needed" 1>&6
8150 else
8151   echo "$ac_t""$am_cv_prog_cc_stdc" 1>&6
8152 fi
8153 case "x$am_cv_prog_cc_stdc" in
8154   x|xno) ;;
8155   *) CC="$CC $am_cv_prog_cc_stdc" ;;
8156 esac
8157
8158 if test "X${am_cv_prog_cc_stdc}" = "Xno" ; then
8159         { echo "configure: error: OpenLDAP requires compiler to support STDC constructs." 1>&2; exit 1; }
8160 fi
8161
8162 # test for make depend flag
8163 OL_MKDEP=
8164 OL_MKDEP_FLAGS=
8165 if test -z "${MKDEP}"; then
8166         OL_MKDEP="${CC-cc}"
8167         if test -z "${MKDEP_FLAGS}"; then
8168                 echo $ac_n "checking for ${OL_MKDEP} depend flag""... $ac_c" 1>&6
8169 echo "configure:8170: checking for ${OL_MKDEP} depend flag" >&5
8170 if eval "test \"\${ol_cv_mkdep+set}\" = set"; then
8171   echo $ac_n "(cached) $ac_c" 1>&6
8172 else
8173   
8174                         ol_cv_mkdep=no
8175                         for flag in "-M" "-xM"; do
8176                                 cat > conftest.c <<EOF
8177  noCode;
8178 EOF
8179                                 if { ac_try='$OL_MKDEP $flag conftest.c'; { (eval echo configure:8180: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } \
8180                                         | egrep '^conftest\.'"${ac_objext}" >/dev/null 2>&1
8181                                 then
8182                                         if test ! -f conftest."${ac_object}" ; then
8183                                                 ol_cv_mkdep=$flag
8184                                                 OL_MKDEP_FLAGS="$flag"
8185                                                 break
8186                                         fi
8187                                 fi
8188                         done
8189                         rm -f conftest*
8190                 
8191 fi
8192
8193 echo "$ac_t""$ol_cv_mkdep" 1>&6
8194         else
8195                 cc_cv_mkdep=yes
8196                 OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
8197         fi
8198 else
8199         cc_cv_mkdep=yes
8200         OL_MKDEP="${MKDEP}"
8201         OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
8202 fi
8203
8204
8205
8206 if test "${ol_cv_mkdep}" = no ; then
8207         # this will soon become an error
8208         echo "configure: warning: do not know how to generate dependencies" 1>&2
8209 fi
8210
8211 echo $ac_n "checking for afopen in -ls""... $ac_c" 1>&6
8212 echo "configure:8213: checking for afopen in -ls" >&5
8213 ac_lib_var=`echo s'_'afopen | sed 'y%./+-:%__p__%'`
8214 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8215   echo $ac_n "(cached) $ac_c" 1>&6
8216 else
8217   ac_save_LIBS="$LIBS"
8218 LIBS="-ls  $LIBS"
8219 cat > conftest.$ac_ext <<EOF
8220 #line 8221 "configure"
8221 #include "confdefs.h"
8222 /* Override any gcc2 internal prototype to avoid an error.  */
8223 /* We use char because int might match the return type of a gcc2
8224     builtin and then its argument prototype would still apply.  */
8225 char afopen();
8226
8227 int main() {
8228 afopen()
8229 ; return 0; }
8230 EOF
8231 if { (eval echo configure:8232: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8232   rm -rf conftest*
8233   eval "ac_cv_lib_$ac_lib_var=yes"
8234 else
8235   echo "configure: failed program was:" >&5
8236   cat conftest.$ac_ext >&5
8237   rm -rf conftest*
8238   eval "ac_cv_lib_$ac_lib_var=no"
8239 fi
8240 rm -f conftest*
8241 LIBS="$ac_save_LIBS"
8242
8243 fi
8244 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8245   echo "$ac_t""yes" 1>&6
8246   
8247         AUTH_LIBS=-ls
8248         cat >> confdefs.h <<\EOF
8249 #define HAVE_AIX_SECURITY 1
8250 EOF
8251
8252
8253 else
8254   echo "$ac_t""no" 1>&6
8255 fi
8256
8257
8258 case "$target" in
8259 *-ibm-openedition)
8260         ac_cv_func_getopt=no
8261         cat >> confdefs.h <<\EOF
8262 #define BOTH_STRINGS_H 1
8263 EOF
8264
8265         ;;
8266 esac
8267
8268 ol_link_modules=no
8269 WITH_MODULES_ENABLED=no
8270 if test $ol_enable_modules != no ; then
8271         for ac_hdr in ltdl.h
8272 do
8273 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8274 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8275 echo "configure:8276: checking for $ac_hdr" >&5
8276 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
8277   echo $ac_n "(cached) $ac_c" 1>&6
8278 else
8279   cat > conftest.$ac_ext <<EOF
8280 #line 8281 "configure"
8281 #include "confdefs.h"
8282 #include <$ac_hdr>
8283 EOF
8284 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8285 { (eval echo configure:8286: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8286 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8287 if test -z "$ac_err"; then
8288   rm -rf conftest*
8289   eval "ac_cv_header_$ac_safe=yes"
8290 else
8291   echo "$ac_err" >&5
8292   echo "configure: failed program was:" >&5
8293   cat conftest.$ac_ext >&5
8294   rm -rf conftest*
8295   eval "ac_cv_header_$ac_safe=no"
8296 fi
8297 rm -f conftest*
8298 fi
8299 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8300   echo "$ac_t""yes" 1>&6
8301     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8302   cat >> confdefs.h <<EOF
8303 #define $ac_tr_hdr 1
8304 EOF
8305  
8306 else
8307   echo "$ac_t""no" 1>&6
8308 fi
8309 done
8310
8311
8312         if test $ac_cv_header_ltdl_h = no ; then
8313                 { echo "configure: error: could not locate libtool ltdl.h" 1>&2; exit 1; }
8314         fi
8315
8316         echo $ac_n "checking for lt_dlinit in -lltdl""... $ac_c" 1>&6
8317 echo "configure:8318: checking for lt_dlinit in -lltdl" >&5
8318 ac_lib_var=`echo ltdl'_'lt_dlinit | sed 'y%./+-:%__p__%'`
8319 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8320   echo $ac_n "(cached) $ac_c" 1>&6
8321 else
8322   ac_save_LIBS="$LIBS"
8323 LIBS="-lltdl  $LIBS"
8324 cat > conftest.$ac_ext <<EOF
8325 #line 8326 "configure"
8326 #include "confdefs.h"
8327 /* Override any gcc2 internal prototype to avoid an error.  */
8328 /* We use char because int might match the return type of a gcc2
8329     builtin and then its argument prototype would still apply.  */
8330 char lt_dlinit();
8331
8332 int main() {
8333 lt_dlinit()
8334 ; return 0; }
8335 EOF
8336 if { (eval echo configure:8337: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8337   rm -rf conftest*
8338   eval "ac_cv_lib_$ac_lib_var=yes"
8339 else
8340   echo "configure: failed program was:" >&5
8341   cat conftest.$ac_ext >&5
8342   rm -rf conftest*
8343   eval "ac_cv_lib_$ac_lib_var=no"
8344 fi
8345 rm -f conftest*
8346 LIBS="$ac_save_LIBS"
8347
8348 fi
8349 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8350   echo "$ac_t""yes" 1>&6
8351   
8352                 MODULES_LIBS=-lltdl
8353                 cat >> confdefs.h <<\EOF
8354 #define HAVE_LIBLTDL 1
8355 EOF
8356
8357         
8358 else
8359   echo "$ac_t""no" 1>&6
8360 fi
8361
8362
8363         if test "$ac_cv_lib_ltdl_lt_dlinit" = no ; then
8364                 { echo "configure: error: could not locate libtool -lltdl" 1>&2; exit 1; }
8365         fi
8366         ol_link_modules=yes
8367         WITH_MODULES_ENABLED=yes
8368
8369 else
8370         for i in $Backends; do
8371                 eval "ol_tmp=\$ol_enable_$i"
8372                 if test $ol_tmp = mod ; then
8373                         echo "configure: warning: building static $i backend" 1>&2
8374                         eval "ol_enable_$i=yes"
8375                 fi
8376         done
8377         for i in $Overlays; do
8378                 eval "ol_tmp=\$ol_enable_$i"
8379                 if test $ol_tmp = mod ; then
8380                         echo "configure: warning: building static $i overlay" 1>&2
8381                         eval "ol_enable_$i=yes"
8382                 fi
8383         done
8384 fi
8385
8386 # test for EBCDIC
8387 echo $ac_n "checking for EBCDIC""... $ac_c" 1>&6
8388 echo "configure:8389: checking for EBCDIC" >&5
8389 if eval "test \"\${ol_cv_cpp_ebcdic+set}\" = set"; then
8390   echo $ac_n "(cached) $ac_c" 1>&6
8391 else
8392   
8393         cat > conftest.$ac_ext <<EOF
8394 #line 8395 "configure"
8395 #include "confdefs.h"
8396
8397 #if !('M' == 0xd4)
8398 #include <__ASCII__/generate_error.h>
8399 #endif
8400
8401 EOF
8402 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8403 { (eval echo configure:8404: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8404 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8405 if test -z "$ac_err"; then
8406   rm -rf conftest*
8407   ol_cv_cpp_ebcdic=yes
8408 else
8409   echo "$ac_err" >&5
8410   echo "configure: failed program was:" >&5
8411   cat conftest.$ac_ext >&5
8412   rm -rf conftest*
8413   ol_cv_cpp_ebcdic=no
8414 fi
8415 rm -f conftest*
8416 fi
8417
8418 echo "$ac_t""$ol_cv_cpp_ebcdic" 1>&6
8419 if test $ol_cv_cpp_ebcdic = yes ; then
8420         cat >> confdefs.h <<\EOF
8421 #define HAVE_EBCDIC 1
8422 EOF
8423
8424 fi
8425
8426 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
8427 echo "configure:8428: checking for ANSI C header files" >&5
8428 if eval "test \"\${ol_cv_header_stdc+set}\" = set"; then
8429   echo $ac_n "(cached) $ac_c" 1>&6
8430 else
8431   cat > conftest.$ac_ext <<EOF
8432 #line 8433 "configure"
8433 #include "confdefs.h"
8434 #include <stdlib.h>
8435 #include <stdarg.h>
8436 #include <string.h>
8437 #include <float.h>
8438 EOF
8439 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8440 { (eval echo configure:8441: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8441 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8442 if test -z "$ac_err"; then
8443   rm -rf conftest*
8444   ol_cv_header_stdc=yes
8445 else
8446   echo "$ac_err" >&5
8447   echo "configure: failed program was:" >&5
8448   cat conftest.$ac_ext >&5
8449   rm -rf conftest*
8450   ol_cv_header_stdc=no
8451 fi
8452 rm -f conftest*
8453
8454 if test $ol_cv_header_stdc = yes; then
8455   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
8456 cat > conftest.$ac_ext <<EOF
8457 #line 8458 "configure"
8458 #include "confdefs.h"
8459 #include <string.h>
8460 EOF
8461 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8462   egrep "memchr" >/dev/null 2>&1; then
8463   :
8464 else
8465   rm -rf conftest*
8466   ol_cv_header_stdc=no
8467 fi
8468 rm -f conftest*
8469
8470 fi
8471
8472 if test $ol_cv_header_stdc = yes; then
8473   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
8474 cat > conftest.$ac_ext <<EOF
8475 #line 8476 "configure"
8476 #include "confdefs.h"
8477 #include <stdlib.h>
8478 EOF
8479 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8480   egrep "free" >/dev/null 2>&1; then
8481   :
8482 else
8483   rm -rf conftest*
8484   ol_cv_header_stdc=no
8485 fi
8486 rm -f conftest*
8487
8488 fi
8489
8490 if test $ol_cv_header_stdc = yes; then
8491   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
8492 if test "$cross_compiling" = yes; then
8493   :
8494 else
8495   cat > conftest.$ac_ext <<EOF
8496 #line 8497 "configure"
8497 #include "confdefs.h"
8498 #include <ctype.h>
8499 #ifndef HAVE_EBCDIC
8500 #       define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
8501 #       define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
8502 #else
8503 #       define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
8504                 || ('j' <= (c) && (c) <= 'r') \
8505                 || ('s' <= (c) && (c) <= 'z'))
8506 #       define TOUPPER(c)       (ISLOWER(c) ? ((c) | 0x40) : (c))
8507 #endif
8508 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
8509 int main () { int i; for (i = 0; i < 256; i++)
8510 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
8511 exit (0); }
8512
8513 EOF
8514 if { (eval echo configure:8515: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
8515 then
8516   :
8517 else
8518   echo "configure: failed program was:" >&5
8519   cat conftest.$ac_ext >&5
8520   rm -fr conftest*
8521   ol_cv_header_stdc=no
8522 fi
8523 rm -fr conftest*
8524 fi
8525
8526 fi
8527 fi
8528
8529 echo "$ac_t""$ol_cv_header_stdc" 1>&6
8530 if test $ol_cv_header_stdc = yes; then
8531   cat >> confdefs.h <<\EOF
8532 #define STDC_HEADERS 1
8533 EOF
8534
8535 fi
8536 ac_cv_header_stdc=disable
8537
8538
8539 if test $ol_cv_header_stdc != yes; then
8540         echo "configure: warning: could not locate Standard C compliant headers" 1>&2
8541 fi
8542
8543 ac_header_dirent=no
8544 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
8545 do
8546 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8547 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
8548 echo "configure:8549: checking for $ac_hdr that defines DIR" >&5
8549 if eval "test \"\${ac_cv_header_dirent_$ac_safe+set}\" = set"; then
8550   echo $ac_n "(cached) $ac_c" 1>&6
8551 else
8552   cat > conftest.$ac_ext <<EOF
8553 #line 8554 "configure"
8554 #include "confdefs.h"
8555 #include <sys/types.h>
8556 #include <$ac_hdr>
8557 int main() {
8558 DIR *dirp = 0;
8559 ; return 0; }
8560 EOF
8561 if { (eval echo configure:8562: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8562   rm -rf conftest*
8563   eval "ac_cv_header_dirent_$ac_safe=yes"
8564 else
8565   echo "configure: failed program was:" >&5
8566   cat conftest.$ac_ext >&5
8567   rm -rf conftest*
8568   eval "ac_cv_header_dirent_$ac_safe=no"
8569 fi
8570 rm -f conftest*
8571 fi
8572 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
8573   echo "$ac_t""yes" 1>&6
8574     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8575   cat >> confdefs.h <<EOF
8576 #define $ac_tr_hdr 1
8577 EOF
8578  ac_header_dirent=$ac_hdr; break
8579 else
8580   echo "$ac_t""no" 1>&6
8581 fi
8582 done
8583 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
8584 if test $ac_header_dirent = dirent.h; then
8585 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
8586 echo "configure:8587: checking for opendir in -ldir" >&5
8587 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-:%__p__%'`
8588 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8589   echo $ac_n "(cached) $ac_c" 1>&6
8590 else
8591   ac_save_LIBS="$LIBS"
8592 LIBS="-ldir  $LIBS"
8593 cat > conftest.$ac_ext <<EOF
8594 #line 8595 "configure"
8595 #include "confdefs.h"
8596 /* Override any gcc2 internal prototype to avoid an error.  */
8597 /* We use char because int might match the return type of a gcc2
8598     builtin and then its argument prototype would still apply.  */
8599 char opendir();
8600
8601 int main() {
8602 opendir()
8603 ; return 0; }
8604 EOF
8605 if { (eval echo configure:8606: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8606   rm -rf conftest*
8607   eval "ac_cv_lib_$ac_lib_var=yes"
8608 else
8609   echo "configure: failed program was:" >&5
8610   cat conftest.$ac_ext >&5
8611   rm -rf conftest*
8612   eval "ac_cv_lib_$ac_lib_var=no"
8613 fi
8614 rm -f conftest*
8615 LIBS="$ac_save_LIBS"
8616
8617 fi
8618 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8619   echo "$ac_t""yes" 1>&6
8620   LIBS="$LIBS -ldir"
8621 else
8622   echo "$ac_t""no" 1>&6
8623 fi
8624
8625 else
8626 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
8627 echo "configure:8628: checking for opendir in -lx" >&5
8628 ac_lib_var=`echo x'_'opendir | sed 'y%./+-:%__p__%'`
8629 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8630   echo $ac_n "(cached) $ac_c" 1>&6
8631 else
8632   ac_save_LIBS="$LIBS"
8633 LIBS="-lx  $LIBS"
8634 cat > conftest.$ac_ext <<EOF
8635 #line 8636 "configure"
8636 #include "confdefs.h"
8637 /* Override any gcc2 internal prototype to avoid an error.  */
8638 /* We use char because int might match the return type of a gcc2
8639     builtin and then its argument prototype would still apply.  */
8640 char opendir();
8641
8642 int main() {
8643 opendir()
8644 ; return 0; }
8645 EOF
8646 if { (eval echo configure:8647: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8647   rm -rf conftest*
8648   eval "ac_cv_lib_$ac_lib_var=yes"
8649 else
8650   echo "configure: failed program was:" >&5
8651   cat conftest.$ac_ext >&5
8652   rm -rf conftest*
8653   eval "ac_cv_lib_$ac_lib_var=no"
8654 fi
8655 rm -f conftest*
8656 LIBS="$ac_save_LIBS"
8657
8658 fi
8659 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8660   echo "$ac_t""yes" 1>&6
8661   LIBS="$LIBS -lx"
8662 else
8663   echo "$ac_t""no" 1>&6
8664 fi
8665
8666 fi
8667
8668 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
8669 echo "configure:8670: checking for sys/wait.h that is POSIX.1 compatible" >&5
8670 if eval "test \"\${ac_cv_header_sys_wait_h+set}\" = set"; then
8671   echo $ac_n "(cached) $ac_c" 1>&6
8672 else
8673   cat > conftest.$ac_ext <<EOF
8674 #line 8675 "configure"
8675 #include "confdefs.h"
8676 #include <sys/types.h>
8677 #include <sys/wait.h>
8678 #ifndef WEXITSTATUS
8679 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
8680 #endif
8681 #ifndef WIFEXITED
8682 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
8683 #endif
8684 int main() {
8685 int s;
8686 wait (&s);
8687 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
8688 ; return 0; }
8689 EOF
8690 if { (eval echo configure:8691: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8691   rm -rf conftest*
8692   ac_cv_header_sys_wait_h=yes
8693 else
8694   echo "configure: failed program was:" >&5
8695   cat conftest.$ac_ext >&5
8696   rm -rf conftest*
8697   ac_cv_header_sys_wait_h=no
8698 fi
8699 rm -f conftest*
8700 fi
8701
8702 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
8703 if test $ac_cv_header_sys_wait_h = yes; then
8704   cat >> confdefs.h <<\EOF
8705 #define HAVE_SYS_WAIT_H 1
8706 EOF
8707
8708 fi
8709
8710 echo $ac_n "checking POSIX termios""... $ac_c" 1>&6
8711 echo "configure:8712: checking POSIX termios" >&5
8712 if eval "test \"\${am_cv_sys_posix_termios+set}\" = set"; then
8713   echo $ac_n "(cached) $ac_c" 1>&6
8714 else
8715   cat > conftest.$ac_ext <<EOF
8716 #line 8717 "configure"
8717 #include "confdefs.h"
8718 #include <sys/types.h>
8719 #include <unistd.h>
8720 #include <termios.h>
8721 int main() {
8722 /* SunOS 4.0.3 has termios.h but not the library calls.  */
8723    tcgetattr(0, 0);
8724 ; return 0; }
8725 EOF
8726 if { (eval echo configure:8727: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8727   rm -rf conftest*
8728   am_cv_sys_posix_termios=yes
8729 else
8730   echo "configure: failed program was:" >&5
8731   cat conftest.$ac_ext >&5
8732   rm -rf conftest*
8733   am_cv_sys_posix_termios=no
8734 fi
8735 rm -f conftest*
8736 fi
8737
8738 echo "$ac_t""$am_cv_sys_posix_termios" 1>&6
8739
8740
8741  echo $ac_n "checking whether use of TIOCGWINSZ requires sys/ioctl.h""... $ac_c" 1>&6
8742 echo "configure:8743: checking whether use of TIOCGWINSZ requires sys/ioctl.h" >&5
8743 if eval "test \"\${am_cv_sys_tiocgwinsz_needs_sys_ioctl_h+set}\" = set"; then
8744   echo $ac_n "(cached) $ac_c" 1>&6
8745 else
8746   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=no
8747
8748   gwinsz_in_termios_h=no
8749   if test $am_cv_sys_posix_termios = yes; then
8750     cat > conftest.$ac_ext <<EOF
8751 #line 8752 "configure"
8752 #include "confdefs.h"
8753 #include <sys/types.h>
8754 #     include <termios.h>
8755 #     ifdef TIOCGWINSZ
8756         yes
8757 #     endif
8758     
8759 EOF
8760 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8761   egrep "yes" >/dev/null 2>&1; then
8762   rm -rf conftest*
8763   gwinsz_in_termios_h=yes
8764 fi
8765 rm -f conftest*
8766
8767   fi
8768
8769   if test $gwinsz_in_termios_h = no; then
8770     cat > conftest.$ac_ext <<EOF
8771 #line 8772 "configure"
8772 #include "confdefs.h"
8773 #include <sys/types.h>
8774 #     include <sys/ioctl.h>
8775 #     ifdef TIOCGWINSZ
8776         yes
8777 #     endif
8778     
8779 EOF
8780 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8781   egrep "yes" >/dev/null 2>&1; then
8782   rm -rf conftest*
8783   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=yes
8784 fi
8785 rm -f conftest*
8786
8787   fi
8788   
8789 fi
8790
8791 echo "$ac_t""$am_cv_sys_tiocgwinsz_needs_sys_ioctl_h" 1>&6
8792   if test $am_cv_sys_tiocgwinsz_needs_sys_ioctl_h = yes; then
8793     cat >> confdefs.h <<\EOF
8794 #define GWINSZ_IN_SYS_IOCTL 1
8795 EOF
8796
8797   fi
8798
8799 if test $am_cv_sys_posix_termios = yes ; then
8800         cat >> confdefs.h <<\EOF
8801 #define HAVE_POSIX_TERMIOS 1
8802 EOF
8803
8804 fi
8805
8806 for ac_hdr in \
8807         arpa/inet.h             \
8808         arpa/nameser.h          \
8809         assert.h                \
8810         bits/types.h            \
8811         conio.h                 \
8812         crypt.h                 \
8813         direct.h                \
8814         errno.h                 \
8815         fcntl.h                 \
8816         filio.h                 \
8817         getopt.h                \
8818         grp.h                   \
8819         io.h                    \
8820         libutil.h               \
8821         limits.h                \
8822         locale.h                \
8823         netinet/tcp.h           \
8824         malloc.h                \
8825         memory.h                \
8826         psap.h                  \
8827         pwd.h                   \
8828         process.h               \
8829         resolv.h                \
8830         sgtty.h                 \
8831         shadow.h                \
8832         stddef.h                \
8833         string.h                \
8834         strings.h               \
8835         sysexits.h              \
8836         sys/file.h              \
8837         sys/filio.h             \
8838         sys/errno.h             \
8839         sys/ioctl.h             \
8840         sys/param.h             \
8841         sys/resource.h          \
8842         sys/select.h            \
8843         sys/socket.h            \
8844         sys/stat.h              \
8845         sys/syslog.h            \
8846         sys/time.h              \
8847         sys/types.h             \
8848         sys/ucred.h             \
8849         sys/uio.h               \
8850         syslog.h                \
8851         termios.h               \
8852         unistd.h                \
8853         utime.h                 \
8854         winsock.h               \
8855         winsock2.h              \
8856
8857 do
8858 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8859 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8860 echo "configure:8861: checking for $ac_hdr" >&5
8861 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
8862   echo $ac_n "(cached) $ac_c" 1>&6
8863 else
8864   cat > conftest.$ac_ext <<EOF
8865 #line 8866 "configure"
8866 #include "confdefs.h"
8867 #include <$ac_hdr>
8868 EOF
8869 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8870 { (eval echo configure:8871: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8871 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8872 if test -z "$ac_err"; then
8873   rm -rf conftest*
8874   eval "ac_cv_header_$ac_safe=yes"
8875 else
8876   echo "$ac_err" >&5
8877   echo "configure: failed program was:" >&5
8878   cat conftest.$ac_ext >&5
8879   rm -rf conftest*
8880   eval "ac_cv_header_$ac_safe=no"
8881 fi
8882 rm -f conftest*
8883 fi
8884 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8885   echo "$ac_t""yes" 1>&6
8886     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8887   cat >> confdefs.h <<EOF
8888 #define $ac_tr_hdr 1
8889 EOF
8890  
8891 else
8892   echo "$ac_t""no" 1>&6
8893 fi
8894 done
8895
8896
8897
8898 for ac_func in sigaction sigset 
8899 do
8900 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8901 echo "configure:8902: checking for $ac_func" >&5
8902 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
8903   echo $ac_n "(cached) $ac_c" 1>&6
8904 else
8905   cat > conftest.$ac_ext <<EOF
8906 #line 8907 "configure"
8907 #include "confdefs.h"
8908 /* System header to define __stub macros and hopefully few prototypes,
8909     which can conflict with char $ac_func(); below.  */
8910 #include <assert.h>
8911 /* Override any gcc2 internal prototype to avoid an error.  */
8912 /* We use char because int might match the return type of a gcc2
8913     builtin and then its argument prototype would still apply.  */
8914 char $ac_func();
8915 char (*f)();
8916
8917 int main() {
8918
8919 /* The GNU C library defines this for functions which it implements
8920     to always fail with ENOSYS.  Some functions are actually named
8921     something starting with __ and the normal name is an alias.  */
8922 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8923 choke me
8924 #else
8925 f = $ac_func;
8926 #endif
8927
8928 ; return 0; }
8929 EOF
8930 if { (eval echo configure:8931: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8931   rm -rf conftest*
8932   eval "ac_cv_func_$ac_func=yes"
8933 else
8934   echo "configure: failed program was:" >&5
8935   cat conftest.$ac_ext >&5
8936   rm -rf conftest*
8937   eval "ac_cv_func_$ac_func=no"
8938 fi
8939 rm -f conftest*
8940 fi
8941
8942 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8943   echo "$ac_t""yes" 1>&6
8944     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8945   cat >> confdefs.h <<EOF
8946 #define $ac_tr_func 1
8947 EOF
8948  
8949 else
8950   echo "$ac_t""no" 1>&6
8951 fi
8952 done
8953
8954
8955 if test $ac_cv_func_sigaction = no && test $ac_cv_func_sigaction = no ; then
8956         echo $ac_n "checking for sigset in -lV3""... $ac_c" 1>&6
8957 echo "configure:8958: checking for sigset in -lV3" >&5
8958 ac_lib_var=`echo V3'_'sigset | sed 'y%./+-:%__p__%'`
8959 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8960   echo $ac_n "(cached) $ac_c" 1>&6
8961 else
8962   ac_save_LIBS="$LIBS"
8963 LIBS="-lV3  $LIBS"
8964 cat > conftest.$ac_ext <<EOF
8965 #line 8966 "configure"
8966 #include "confdefs.h"
8967 /* Override any gcc2 internal prototype to avoid an error.  */
8968 /* We use char because int might match the return type of a gcc2
8969     builtin and then its argument prototype would still apply.  */
8970 char sigset();
8971
8972 int main() {
8973 sigset()
8974 ; return 0; }
8975 EOF
8976 if { (eval echo configure:8977: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8977   rm -rf conftest*
8978   eval "ac_cv_lib_$ac_lib_var=yes"
8979 else
8980   echo "configure: failed program was:" >&5
8981   cat conftest.$ac_ext >&5
8982   rm -rf conftest*
8983   eval "ac_cv_lib_$ac_lib_var=no"
8984 fi
8985 rm -f conftest*
8986 LIBS="$ac_save_LIBS"
8987
8988 fi
8989 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8990   echo "$ac_t""yes" 1>&6
8991     ac_tr_lib=HAVE_LIB`echo V3 | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8992     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8993   cat >> confdefs.h <<EOF
8994 #define $ac_tr_lib 1
8995 EOF
8996
8997   LIBS="-lV3 $LIBS"
8998
8999 else
9000   echo "$ac_t""no" 1>&6
9001 fi
9002
9003 fi
9004
9005 if test "$ac_cv_cygwin" != yes && test "$ac_cv_header_winsock_h" = yes; then
9006 echo $ac_n "checking for winsock""... $ac_c" 1>&6
9007 echo "configure:9008: checking for winsock" >&5
9008 if eval "test \"\${ol_cv_winsock+set}\" = set"; then
9009   echo $ac_n "(cached) $ac_c" 1>&6
9010 else
9011   save_LIBS="$LIBS"
9012 for curlib in ws2_32 wsock32; do
9013         LIBS="$LIBS -l$curlib"
9014         cat > conftest.$ac_ext <<EOF
9015 #line 9016 "configure"
9016 #include "confdefs.h"
9017 #include <winsock.h>
9018                         
9019 int main() {
9020
9021                         socket(0,0,0);
9022                         select(0,NULL,NULL,NULL,NULL);
9023                         closesocket(0);
9024                         gethostname(NULL,0);
9025                         
9026 ; return 0; }
9027 EOF
9028 if { (eval echo configure:9029: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9029   rm -rf conftest*
9030   ol_cv_winsock=yes
9031 else
9032   echo "configure: failed program was:" >&5
9033   cat conftest.$ac_ext >&5
9034   rm -rf conftest*
9035   ol_cv_winsock=no
9036 fi
9037 rm -f conftest*
9038
9039         if test $ol_cv_winsock = yes; then
9040                 cat >> confdefs.h <<\EOF
9041 #define HAVE_WINSOCK 1
9042 EOF
9043
9044                 ac_cv_func_socket=yes
9045                 ac_cv_func_select=yes
9046                 ac_cv_func_closesocket=yes
9047                 ac_cv_func_gethostname=yes
9048                 if test $curlib = ws2_32; then
9049                         ol_cv_winsock=winsock2
9050                         cat >> confdefs.h <<\EOF
9051 #define HAVE_WINSOCK2 1
9052 EOF
9053
9054                 fi
9055                 break
9056         fi
9057         LIBS="$save_LIBS"
9058 done
9059 fi
9060
9061 echo "$ac_t""$ol_cv_winsock" 1>&6
9062 fi
9063
9064
9065 echo $ac_n "checking for socket""... $ac_c" 1>&6
9066 echo "configure:9067: checking for socket" >&5
9067 if eval "test \"\${ac_cv_func_socket+set}\" = set"; then
9068   echo $ac_n "(cached) $ac_c" 1>&6
9069 else
9070   cat > conftest.$ac_ext <<EOF
9071 #line 9072 "configure"
9072 #include "confdefs.h"
9073 /* System header to define __stub macros and hopefully few prototypes,
9074     which can conflict with char socket(); below.  */
9075 #include <assert.h>
9076 /* Override any gcc2 internal prototype to avoid an error.  */
9077 /* We use char because int might match the return type of a gcc2
9078     builtin and then its argument prototype would still apply.  */
9079 char socket();
9080 char (*f)();
9081
9082 int main() {
9083
9084 /* The GNU C library defines this for functions which it implements
9085     to always fail with ENOSYS.  Some functions are actually named
9086     something starting with __ and the normal name is an alias.  */
9087 #if defined (__stub_socket) || defined (__stub___socket)
9088 choke me
9089 #else
9090 f = socket;
9091 #endif
9092
9093 ; return 0; }
9094 EOF
9095 if { (eval echo configure:9096: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9096   rm -rf conftest*
9097   eval "ac_cv_func_socket=yes"
9098 else
9099   echo "configure: failed program was:" >&5
9100   cat conftest.$ac_ext >&5
9101   rm -rf conftest*
9102   eval "ac_cv_func_socket=no"
9103 fi
9104 rm -f conftest*
9105 fi
9106
9107 if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
9108   echo "$ac_t""yes" 1>&6
9109   :
9110 else
9111   echo "$ac_t""no" 1>&6
9112         
9113         echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6
9114 echo "configure:9115: checking for main in -lsocket" >&5
9115 ac_lib_var=`echo socket'_'main | sed 'y%./+-:%__p__%'`
9116 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9117   echo $ac_n "(cached) $ac_c" 1>&6
9118 else
9119   ac_save_LIBS="$LIBS"
9120 LIBS="-lsocket  $LIBS"
9121 cat > conftest.$ac_ext <<EOF
9122 #line 9123 "configure"
9123 #include "confdefs.h"
9124
9125 int main() {
9126 main()
9127 ; return 0; }
9128 EOF
9129 if { (eval echo configure:9130: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9130   rm -rf conftest*
9131   eval "ac_cv_lib_$ac_lib_var=yes"
9132 else
9133   echo "configure: failed program was:" >&5
9134   cat conftest.$ac_ext >&5
9135   rm -rf conftest*
9136   eval "ac_cv_lib_$ac_lib_var=no"
9137 fi
9138 rm -f conftest*
9139 LIBS="$ac_save_LIBS"
9140
9141 fi
9142 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9143   echo "$ac_t""yes" 1>&6
9144     ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9145     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9146   cat >> confdefs.h <<EOF
9147 #define $ac_tr_lib 1
9148 EOF
9149
9150   LIBS="-lsocket $LIBS"
9151
9152 else
9153   echo "$ac_t""no" 1>&6
9154 fi
9155
9156         echo $ac_n "checking for main in -lnet""... $ac_c" 1>&6
9157 echo "configure:9158: checking for main in -lnet" >&5
9158 ac_lib_var=`echo net'_'main | sed 'y%./+-:%__p__%'`
9159 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9160   echo $ac_n "(cached) $ac_c" 1>&6
9161 else
9162   ac_save_LIBS="$LIBS"
9163 LIBS="-lnet  $LIBS"
9164 cat > conftest.$ac_ext <<EOF
9165 #line 9166 "configure"
9166 #include "confdefs.h"
9167
9168 int main() {
9169 main()
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 net | 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="-lnet $LIBS"
9194
9195 else
9196   echo "$ac_t""no" 1>&6
9197 fi
9198
9199         echo $ac_n "checking for main in -lnsl_s""... $ac_c" 1>&6
9200 echo "configure:9201: checking for main in -lnsl_s" >&5
9201 ac_lib_var=`echo nsl_s'_'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="-lnsl_s  $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 nsl_s | 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="-lnsl_s $LIBS"
9237
9238 else
9239   echo "$ac_t""no" 1>&6
9240 fi
9241
9242         echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
9243 echo "configure:9244: checking for main in -lnsl" >&5
9244 ac_lib_var=`echo nsl'_'main | sed 'y%./+-:%__p__%'`
9245 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9246   echo $ac_n "(cached) $ac_c" 1>&6
9247 else
9248   ac_save_LIBS="$LIBS"
9249 LIBS="-lnsl  $LIBS"
9250 cat > conftest.$ac_ext <<EOF
9251 #line 9252 "configure"
9252 #include "confdefs.h"
9253
9254 int main() {
9255 main()
9256 ; return 0; }
9257 EOF
9258 if { (eval echo configure:9259: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9259   rm -rf conftest*
9260   eval "ac_cv_lib_$ac_lib_var=yes"
9261 else
9262   echo "configure: failed program was:" >&5
9263   cat conftest.$ac_ext >&5
9264   rm -rf conftest*
9265   eval "ac_cv_lib_$ac_lib_var=no"
9266 fi
9267 rm -f conftest*
9268 LIBS="$ac_save_LIBS"
9269
9270 fi
9271 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9272   echo "$ac_t""yes" 1>&6
9273     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9274     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9275   cat >> confdefs.h <<EOF
9276 #define $ac_tr_lib 1
9277 EOF
9278
9279   LIBS="-lnsl $LIBS"
9280
9281 else
9282   echo "$ac_t""no" 1>&6
9283 fi
9284
9285         echo $ac_n "checking for socket in -linet""... $ac_c" 1>&6
9286 echo "configure:9287: checking for socket in -linet" >&5
9287 ac_lib_var=`echo inet'_'socket | sed 'y%./+-:%__p__%'`
9288 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9289   echo $ac_n "(cached) $ac_c" 1>&6
9290 else
9291   ac_save_LIBS="$LIBS"
9292 LIBS="-linet  $LIBS"
9293 cat > conftest.$ac_ext <<EOF
9294 #line 9295 "configure"
9295 #include "confdefs.h"
9296 /* Override any gcc2 internal prototype to avoid an error.  */
9297 /* We use char because int might match the return type of a gcc2
9298     builtin and then its argument prototype would still apply.  */
9299 char socket();
9300
9301 int main() {
9302 socket()
9303 ; return 0; }
9304 EOF
9305 if { (eval echo configure:9306: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9306   rm -rf conftest*
9307   eval "ac_cv_lib_$ac_lib_var=yes"
9308 else
9309   echo "configure: failed program was:" >&5
9310   cat conftest.$ac_ext >&5
9311   rm -rf conftest*
9312   eval "ac_cv_lib_$ac_lib_var=no"
9313 fi
9314 rm -f conftest*
9315 LIBS="$ac_save_LIBS"
9316
9317 fi
9318 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9319   echo "$ac_t""yes" 1>&6
9320     ac_tr_lib=HAVE_LIB`echo inet | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9321     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9322   cat >> confdefs.h <<EOF
9323 #define $ac_tr_lib 1
9324 EOF
9325
9326   LIBS="-linet $LIBS"
9327
9328 else
9329   echo "$ac_t""no" 1>&6
9330 fi
9331
9332         echo $ac_n "checking for main in -lgen""... $ac_c" 1>&6
9333 echo "configure:9334: checking for main in -lgen" >&5
9334 ac_lib_var=`echo gen'_'main | sed 'y%./+-:%__p__%'`
9335 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9336   echo $ac_n "(cached) $ac_c" 1>&6
9337 else
9338   ac_save_LIBS="$LIBS"
9339 LIBS="-lgen  $LIBS"
9340 cat > conftest.$ac_ext <<EOF
9341 #line 9342 "configure"
9342 #include "confdefs.h"
9343
9344 int main() {
9345 main()
9346 ; return 0; }
9347 EOF
9348 if { (eval echo configure:9349: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9349   rm -rf conftest*
9350   eval "ac_cv_lib_$ac_lib_var=yes"
9351 else
9352   echo "configure: failed program was:" >&5
9353   cat conftest.$ac_ext >&5
9354   rm -rf conftest*
9355   eval "ac_cv_lib_$ac_lib_var=no"
9356 fi
9357 rm -f conftest*
9358 LIBS="$ac_save_LIBS"
9359
9360 fi
9361 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9362   echo "$ac_t""yes" 1>&6
9363     ac_tr_lib=HAVE_LIB`echo gen | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9364     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9365   cat >> confdefs.h <<EOF
9366 #define $ac_tr_lib 1
9367 EOF
9368
9369   LIBS="-lgen $LIBS"
9370
9371 else
9372   echo "$ac_t""no" 1>&6
9373 fi
9374
9375
9376 fi
9377
9378
9379 echo $ac_n "checking for select""... $ac_c" 1>&6
9380 echo "configure:9381: checking for select" >&5
9381 if eval "test \"\${ac_cv_func_select+set}\" = set"; then
9382   echo $ac_n "(cached) $ac_c" 1>&6
9383 else
9384   cat > conftest.$ac_ext <<EOF
9385 #line 9386 "configure"
9386 #include "confdefs.h"
9387 /* System header to define __stub macros and hopefully few prototypes,
9388     which can conflict with char select(); below.  */
9389 #include <assert.h>
9390 /* Override any gcc2 internal prototype to avoid an error.  */
9391 /* We use char because int might match the return type of a gcc2
9392     builtin and then its argument prototype would still apply.  */
9393 char select();
9394 char (*f)();
9395
9396 int main() {
9397
9398 /* The GNU C library defines this for functions which it implements
9399     to always fail with ENOSYS.  Some functions are actually named
9400     something starting with __ and the normal name is an alias.  */
9401 #if defined (__stub_select) || defined (__stub___select)
9402 choke me
9403 #else
9404 f = select;
9405 #endif
9406
9407 ; return 0; }
9408 EOF
9409 if { (eval echo configure:9410: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9410   rm -rf conftest*
9411   eval "ac_cv_func_select=yes"
9412 else
9413   echo "configure: failed program was:" >&5
9414   cat conftest.$ac_ext >&5
9415   rm -rf conftest*
9416   eval "ac_cv_func_select=no"
9417 fi
9418 rm -f conftest*
9419 fi
9420
9421 if eval "test \"`echo '$ac_cv_func_'select`\" = yes"; then
9422   echo "$ac_t""yes" 1>&6
9423   :
9424 else
9425   echo "$ac_t""no" 1>&6
9426 { echo "configure: error: select() required." 1>&2; exit 1; }
9427 fi
9428
9429
9430 if test "${ac_cv_header_winsock_h}" != yes; then
9431                                 echo $ac_n "checking types of arguments for select()""... $ac_c" 1>&6
9432 echo "configure:9433: checking types of arguments for select()" >&5
9433  if eval "test \"\${ac_cv_func_select_arg234+set}\" = set"; then
9434   echo $ac_n "(cached) $ac_c" 1>&6
9435 else
9436    if eval "test \"\${ac_cv_func_select_arg1+set}\" = set"; then
9437   echo $ac_n "(cached) $ac_c" 1>&6
9438 else
9439     if eval "test \"\${ac_cv_func_select_arg5+set}\" = set"; then
9440   echo $ac_n "(cached) $ac_c" 1>&6
9441 else
9442      for ac_cv_func_select_arg234 in 'fd_set *' 'int *' 'void *'; do
9443      for ac_cv_func_select_arg1 in 'int' 'size_t' 'unsigned long' 'unsigned'; do
9444       for ac_cv_func_select_arg5 in 'struct timeval *' 'const struct timeval *'; do
9445        cat > conftest.$ac_ext <<EOF
9446 #line 9447 "configure"
9447 #include "confdefs.h"
9448 #ifdef HAVE_SYS_TYPES_H
9449 #include <sys/types.h>
9450 #endif
9451 #ifdef HAVE_SYS_TIME_H
9452 #include <sys/time.h>
9453 #endif
9454 #ifdef HAVE_SYS_SELECT_H
9455 #include <sys/select.h>
9456 #endif
9457 #ifdef HAVE_SYS_SOCKET_H
9458 #include <sys/socket.h>
9459 #endif
9460 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);
9461 int main() {
9462
9463 ; return 0; }
9464 EOF
9465 if { (eval echo configure:9466: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9466   rm -rf conftest*
9467           ac_not_found=no ; break 3
9468 else
9469   echo "configure: failed program was:" >&5
9470   cat conftest.$ac_ext >&5
9471   rm -rf conftest*
9472   ac_not_found=yes
9473 fi
9474 rm -f conftest*
9475       done
9476      done
9477     done
9478    
9479 fi
9480   
9481 fi
9482  
9483 fi
9484  if test "$ac_not_found" = yes; then
9485   ac_cv_func_select_arg1=int 
9486   ac_cv_func_select_arg234='int *' 
9487   ac_cv_func_select_arg5='struct timeval *'
9488  fi
9489  echo "$ac_t""$ac_cv_func_select_arg1,$ac_cv_func_select_arg234,$ac_cv_func_select_arg5" 1>&6
9490  cat >> confdefs.h <<EOF
9491 #define SELECT_TYPE_ARG1 $ac_cv_func_select_arg1
9492 EOF
9493
9494  cat >> confdefs.h <<EOF
9495 #define SELECT_TYPE_ARG234 ($ac_cv_func_select_arg234)
9496 EOF
9497
9498  cat >> confdefs.h <<EOF
9499 #define SELECT_TYPE_ARG5 ($ac_cv_func_select_arg5)
9500 EOF
9501
9502
9503 fi
9504
9505
9506 for ac_func in poll 
9507 do
9508 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9509 echo "configure:9510: checking for $ac_func" >&5
9510 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
9511   echo $ac_n "(cached) $ac_c" 1>&6
9512 else
9513   cat > conftest.$ac_ext <<EOF
9514 #line 9515 "configure"
9515 #include "confdefs.h"
9516 /* System header to define __stub macros and hopefully few prototypes,
9517     which can conflict with char $ac_func(); below.  */
9518 #include <assert.h>
9519 /* Override any gcc2 internal prototype to avoid an error.  */
9520 /* We use char because int might match the return type of a gcc2
9521     builtin and then its argument prototype would still apply.  */
9522 char $ac_func();
9523 char (*f)();
9524
9525 int main() {
9526
9527 /* The GNU C library defines this for functions which it implements
9528     to always fail with ENOSYS.  Some functions are actually named
9529     something starting with __ and the normal name is an alias.  */
9530 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9531 choke me
9532 #else
9533 f = $ac_func;
9534 #endif
9535
9536 ; return 0; }
9537 EOF
9538 if { (eval echo configure:9539: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9539   rm -rf conftest*
9540   eval "ac_cv_func_$ac_func=yes"
9541 else
9542   echo "configure: failed program was:" >&5
9543   cat conftest.$ac_ext >&5
9544   rm -rf conftest*
9545   eval "ac_cv_func_$ac_func=no"
9546 fi
9547 rm -f conftest*
9548 fi
9549
9550 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9551   echo "$ac_t""yes" 1>&6
9552     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9553   cat >> confdefs.h <<EOF
9554 #define $ac_tr_func 1
9555 EOF
9556  
9557 else
9558   echo "$ac_t""no" 1>&6
9559 fi
9560 done
9561
9562 for ac_hdr in poll.h 
9563 do
9564 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9565 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9566 echo "configure:9567: checking for $ac_hdr" >&5
9567 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9568   echo $ac_n "(cached) $ac_c" 1>&6
9569 else
9570   cat > conftest.$ac_ext <<EOF
9571 #line 9572 "configure"
9572 #include "confdefs.h"
9573 #include <$ac_hdr>
9574 EOF
9575 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9576 { (eval echo configure:9577: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9577 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9578 if test -z "$ac_err"; then
9579   rm -rf conftest*
9580   eval "ac_cv_header_$ac_safe=yes"
9581 else
9582   echo "$ac_err" >&5
9583   echo "configure: failed program was:" >&5
9584   cat conftest.$ac_ext >&5
9585   rm -rf conftest*
9586   eval "ac_cv_header_$ac_safe=no"
9587 fi
9588 rm -f conftest*
9589 fi
9590 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9591   echo "$ac_t""yes" 1>&6
9592     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9593   cat >> confdefs.h <<EOF
9594 #define $ac_tr_hdr 1
9595 EOF
9596  
9597 else
9598   echo "$ac_t""no" 1>&6
9599 fi
9600 done
9601
9602
9603 for ac_hdr in sys/epoll.h 
9604 do
9605 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9606 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9607 echo "configure:9608: checking for $ac_hdr" >&5
9608 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9609   echo $ac_n "(cached) $ac_c" 1>&6
9610 else
9611   cat > conftest.$ac_ext <<EOF
9612 #line 9613 "configure"
9613 #include "confdefs.h"
9614 #include <$ac_hdr>
9615 EOF
9616 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9617 { (eval echo configure:9618: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9618 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9619 if test -z "$ac_err"; then
9620   rm -rf conftest*
9621   eval "ac_cv_header_$ac_safe=yes"
9622 else
9623   echo "$ac_err" >&5
9624   echo "configure: failed program was:" >&5
9625   cat conftest.$ac_ext >&5
9626   rm -rf conftest*
9627   eval "ac_cv_header_$ac_safe=no"
9628 fi
9629 rm -f conftest*
9630 fi
9631 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9632   echo "$ac_t""yes" 1>&6
9633     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9634   cat >> confdefs.h <<EOF
9635 #define $ac_tr_hdr 1
9636 EOF
9637  
9638 else
9639   echo "$ac_t""no" 1>&6
9640 fi
9641 done
9642
9643 if test "${ac_cv_header_sys_epoll_h}" = yes; then
9644 echo $ac_n "checking for epoll system call""... $ac_c" 1>&6
9645 echo "configure:9646: checking for epoll system call" >&5
9646 if test "$cross_compiling" = yes; then
9647   echo "$ac_t""no" 1>&6
9648 else
9649   cat > conftest.$ac_ext <<EOF
9650 #line 9651 "configure"
9651 #include "confdefs.h"
9652 int main(int argc, char *argv)
9653 {
9654         int epfd = epoll_create(256);
9655         exit (epfd == -1 ? 1 : 0);
9656 }
9657 EOF
9658 if { (eval echo configure:9659: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
9659 then
9660   echo "$ac_t""yes" 1>&6
9661 cat >> confdefs.h <<\EOF
9662 #define HAVE_EPOLL 1
9663 EOF
9664
9665 else
9666   echo "configure: failed program was:" >&5
9667   cat conftest.$ac_ext >&5
9668   rm -fr conftest*
9669   echo "$ac_t""no" 1>&6
9670 fi
9671 rm -fr conftest*
9672 fi
9673
9674 fi
9675
9676 # strerror checks
9677 echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6
9678 echo "configure:9679: checking declaration of sys_errlist" >&5
9679 if eval "test \"\${ol_cv_dcl_sys_errlist+set}\" = set"; then
9680   echo $ac_n "(cached) $ac_c" 1>&6
9681 else
9682   
9683         cat > conftest.$ac_ext <<EOF
9684 #line 9685 "configure"
9685 #include "confdefs.h"
9686
9687 #include <stdio.h>
9688 #include <sys/types.h>
9689 #include <errno.h>
9690 #ifdef WINNT
9691 #include <stdlib.h>
9692 #endif 
9693 int main() {
9694 char *c = (char *) *sys_errlist
9695 ; return 0; }
9696 EOF
9697 if { (eval echo configure:9698: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9698   rm -rf conftest*
9699   ol_cv_dcl_sys_errlist=yes
9700         ol_cv_have_sys_errlist=yes
9701 else
9702   echo "configure: failed program was:" >&5
9703   cat conftest.$ac_ext >&5
9704   rm -rf conftest*
9705   ol_cv_dcl_sys_errlist=no
9706 fi
9707 rm -f conftest*
9708 fi
9709
9710 echo "$ac_t""$ol_cv_dcl_sys_errlist" 1>&6
9711 #
9712 # It's possible (for near-UNIX clones) that sys_errlist doesn't exist
9713 if test $ol_cv_dcl_sys_errlist = no ; then
9714         cat >> confdefs.h <<\EOF
9715 #define DECL_SYS_ERRLIST 1
9716 EOF
9717
9718
9719         echo $ac_n "checking existence of sys_errlist""... $ac_c" 1>&6
9720 echo "configure:9721: checking existence of sys_errlist" >&5
9721 if eval "test \"\${ol_cv_have_sys_errlist+set}\" = set"; then
9722   echo $ac_n "(cached) $ac_c" 1>&6
9723 else
9724   
9725                 cat > conftest.$ac_ext <<EOF
9726 #line 9727 "configure"
9727 #include "confdefs.h"
9728 #include <errno.h>
9729 int main() {
9730 char *c = (char *) *sys_errlist
9731 ; return 0; }
9732 EOF
9733 if { (eval echo configure:9734: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9734   rm -rf conftest*
9735   ol_cv_have_sys_errlist=yes
9736 else
9737   echo "configure: failed program was:" >&5
9738   cat conftest.$ac_ext >&5
9739   rm -rf conftest*
9740   ol_cv_have_sys_errlist=no
9741 fi
9742 rm -f conftest*
9743 fi
9744
9745 echo "$ac_t""$ol_cv_have_sys_errlist" 1>&6
9746 fi
9747 if test $ol_cv_have_sys_errlist = yes ; then
9748         cat >> confdefs.h <<\EOF
9749 #define HAVE_SYS_ERRLIST 1
9750 EOF
9751
9752 fi
9753  for ac_func in strerror strerror_r
9754 do
9755 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9756 echo "configure:9757: checking for $ac_func" >&5
9757 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
9758   echo $ac_n "(cached) $ac_c" 1>&6
9759 else
9760   cat > conftest.$ac_ext <<EOF
9761 #line 9762 "configure"
9762 #include "confdefs.h"
9763 /* System header to define __stub macros and hopefully few prototypes,
9764     which can conflict with char $ac_func(); below.  */
9765 #include <assert.h>
9766 /* Override any gcc2 internal prototype to avoid an error.  */
9767 /* We use char because int might match the return type of a gcc2
9768     builtin and then its argument prototype would still apply.  */
9769 char $ac_func();
9770 char (*f)();
9771
9772 int main() {
9773
9774 /* The GNU C library defines this for functions which it implements
9775     to always fail with ENOSYS.  Some functions are actually named
9776     something starting with __ and the normal name is an alias.  */
9777 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9778 choke me
9779 #else
9780 f = $ac_func;
9781 #endif
9782
9783 ; return 0; }
9784 EOF
9785 if { (eval echo configure:9786: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9786   rm -rf conftest*
9787   eval "ac_cv_func_$ac_func=yes"
9788 else
9789   echo "configure: failed program was:" >&5
9790   cat conftest.$ac_ext >&5
9791   rm -rf conftest*
9792   eval "ac_cv_func_$ac_func=no"
9793 fi
9794 rm -f conftest*
9795 fi
9796
9797 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9798   echo "$ac_t""yes" 1>&6
9799     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9800   cat >> confdefs.h <<EOF
9801 #define $ac_tr_func 1
9802 EOF
9803  
9804 else
9805   echo "$ac_t""no" 1>&6
9806 fi
9807 done
9808
9809 ol_cv_func_strerror_r=no
9810 if test "${ac_cv_func_strerror_r}" = yes ; then
9811         echo $ac_n "checking non-posix strerror_r""... $ac_c" 1>&6
9812 echo "configure:9813: checking non-posix strerror_r" >&5
9813 if eval "test \"\${ol_cv_nonposix_strerror_r+set}\" = set"; then
9814   echo $ac_n "(cached) $ac_c" 1>&6
9815 else
9816   
9817         cat > conftest.$ac_ext <<EOF
9818 #line 9819 "configure"
9819 #include "confdefs.h"
9820 #include <string.h>
9821 EOF
9822 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9823   egrep "strerror_r" >/dev/null 2>&1; then
9824   rm -rf conftest*
9825   ol_decl_strerror_r=yes
9826 else
9827   rm -rf conftest*
9828   ol_decl_strerror_r=no
9829 fi
9830 rm -f conftest*
9831
9832         if test $ol_decl_strerror_r = yes ; then
9833                 cat > conftest.$ac_ext <<EOF
9834 #line 9835 "configure"
9835 #include "confdefs.h"
9836 #include <string.h>
9837 int main() {
9838    /* from autoconf 2.59 */
9839                                 char buf[100];
9840                                 char x = *strerror_r (0, buf, sizeof buf);
9841                                 char *p = strerror_r (0, buf, sizeof buf);
9842                         
9843 ; return 0; }
9844 EOF
9845 if { (eval echo configure:9846: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9846   rm -rf conftest*
9847   ol_cv_nonposix_strerror_r=yes
9848 else
9849   echo "configure: failed program was:" >&5
9850   cat conftest.$ac_ext >&5
9851   rm -rf conftest*
9852   ol_cv_nonposix_strerror_r=no
9853 fi
9854 rm -f conftest*
9855         else
9856                 if test "$cross_compiling" = yes; then
9857   ol_cv_nonposix_strerror=no
9858 else
9859   cat > conftest.$ac_ext <<EOF
9860 #line 9861 "configure"
9861 #include "confdefs.h"
9862
9863                         main() {
9864                                 char buf[100];
9865                                 buf[0] = 0;
9866                                 strerror_r( 1, buf, sizeof buf );
9867                                 exit( buf[0] == 0 );
9868                         }
9869                         
9870 EOF
9871 if { (eval echo configure:9872: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
9872 then
9873   ol_cv_nonposix_strerror_r=yes
9874 else
9875   echo "configure: failed program was:" >&5
9876   cat conftest.$ac_ext >&5
9877   rm -fr conftest*
9878   ol_cv_nonposix_strerror=no
9879 fi
9880 rm -fr conftest*
9881 fi
9882
9883         fi
9884         
9885 fi
9886
9887 echo "$ac_t""$ol_cv_nonposix_strerror_r" 1>&6
9888 if test $ol_cv_nonposix_strerror_r = yes ; then
9889         cat >> confdefs.h <<\EOF
9890 #define HAVE_NONPOSIX_STRERROR_R 1
9891 EOF
9892
9893 fi
9894
9895 elif test "${ac_cv_func_strerror}" = no ; then
9896         echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6
9897 echo "configure:9898: checking declaration of sys_errlist" >&5
9898 if eval "test \"\${ol_cv_dcl_sys_errlist+set}\" = set"; then
9899   echo $ac_n "(cached) $ac_c" 1>&6
9900 else
9901   
9902         cat > conftest.$ac_ext <<EOF
9903 #line 9904 "configure"
9904 #include "confdefs.h"
9905
9906 #include <stdio.h>
9907 #include <sys/types.h>
9908 #include <errno.h>
9909 #ifdef WINNT
9910 #include <stdlib.h>
9911 #endif 
9912 int main() {
9913 char *c = (char *) *sys_errlist
9914 ; return 0; }
9915 EOF
9916 if { (eval echo configure:9917: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9917   rm -rf conftest*
9918   ol_cv_dcl_sys_errlist=yes
9919         ol_cv_have_sys_errlist=yes
9920 else
9921   echo "configure: failed program was:" >&5
9922   cat conftest.$ac_ext >&5
9923   rm -rf conftest*
9924   ol_cv_dcl_sys_errlist=no
9925 fi
9926 rm -f conftest*
9927 fi
9928
9929 echo "$ac_t""$ol_cv_dcl_sys_errlist" 1>&6
9930 #
9931 # It's possible (for near-UNIX clones) that sys_errlist doesn't exist
9932 if test $ol_cv_dcl_sys_errlist = no ; then
9933         cat >> confdefs.h <<\EOF
9934 #define DECL_SYS_ERRLIST 1
9935 EOF
9936
9937
9938         echo $ac_n "checking existence of sys_errlist""... $ac_c" 1>&6
9939 echo "configure:9940: checking existence of sys_errlist" >&5
9940 if eval "test \"\${ol_cv_have_sys_errlist+set}\" = set"; then
9941   echo $ac_n "(cached) $ac_c" 1>&6
9942 else
9943   
9944                 cat > conftest.$ac_ext <<EOF
9945 #line 9946 "configure"
9946 #include "confdefs.h"
9947 #include <errno.h>
9948 int main() {
9949 char *c = (char *) *sys_errlist
9950 ; return 0; }
9951 EOF
9952 if { (eval echo configure:9953: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9953   rm -rf conftest*
9954   ol_cv_have_sys_errlist=yes
9955 else
9956   echo "configure: failed program was:" >&5
9957   cat conftest.$ac_ext >&5
9958   rm -rf conftest*
9959   ol_cv_have_sys_errlist=no
9960 fi
9961 rm -f conftest*
9962 fi
9963
9964 echo "$ac_t""$ol_cv_have_sys_errlist" 1>&6
9965 fi
9966 if test $ol_cv_have_sys_errlist = yes ; then
9967         cat >> confdefs.h <<\EOF
9968 #define HAVE_SYS_ERRLIST 1
9969 EOF
9970
9971 fi
9972
9973 fi
9974
9975
9976 for ac_hdr in regex.h 
9977 do
9978 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9979 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9980 echo "configure:9981: checking for $ac_hdr" >&5
9981 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9982   echo $ac_n "(cached) $ac_c" 1>&6
9983 else
9984   cat > conftest.$ac_ext <<EOF
9985 #line 9986 "configure"
9986 #include "confdefs.h"
9987 #include <$ac_hdr>
9988 EOF
9989 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9990 { (eval echo configure:9991: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9991 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9992 if test -z "$ac_err"; then
9993   rm -rf conftest*
9994   eval "ac_cv_header_$ac_safe=yes"
9995 else
9996   echo "$ac_err" >&5
9997   echo "configure: failed program was:" >&5
9998   cat conftest.$ac_ext >&5
9999   rm -rf conftest*
10000   eval "ac_cv_header_$ac_safe=no"
10001 fi
10002 rm -f conftest*
10003 fi
10004 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10005   echo "$ac_t""yes" 1>&6
10006     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10007   cat >> confdefs.h <<EOF
10008 #define $ac_tr_hdr 1
10009 EOF
10010  
10011 else
10012   echo "$ac_t""no" 1>&6
10013 fi
10014 done
10015
10016 if test "$ac_cv_header_regex_h" != yes ; then
10017         { echo "configure: error: POSIX regex.h required." 1>&2; exit 1; }
10018 fi
10019
10020 echo $ac_n "checking for library containing regfree""... $ac_c" 1>&6
10021 echo "configure:10022: checking for library containing regfree" >&5
10022 if eval "test \"\${ac_cv_search_regfree+set}\" = set"; then
10023   echo $ac_n "(cached) $ac_c" 1>&6
10024 else
10025   ac_func_search_save_LIBS="$LIBS"
10026 ac_cv_search_regfree="no"
10027 cat > conftest.$ac_ext <<EOF
10028 #line 10029 "configure"
10029 #include "confdefs.h"
10030 /* Override any gcc2 internal prototype to avoid an error.  */
10031 /* We use char because int might match the return type of a gcc2
10032     builtin and then its argument prototype would still apply.  */
10033 char regfree();
10034
10035 int main() {
10036 regfree()
10037 ; return 0; }
10038 EOF
10039 if { (eval echo configure:10040: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10040   rm -rf conftest*
10041   ac_cv_search_regfree="none required"
10042 else
10043   echo "configure: failed program was:" >&5
10044   cat conftest.$ac_ext >&5
10045 fi
10046 rm -f conftest*
10047 test "$ac_cv_search_regfree" = "no" && for ac_lib in regex gnuregex; do
10048 LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
10049 cat > conftest.$ac_ext <<EOF
10050 #line 10051 "configure"
10051 #include "confdefs.h"
10052 /* Override any gcc2 internal prototype to avoid an error.  */
10053 /* We use char because int might match the return type of a gcc2
10054     builtin and then its argument prototype would still apply.  */
10055 char regfree();
10056
10057 int main() {
10058 regfree()
10059 ; return 0; }
10060 EOF
10061 if { (eval echo configure:10062: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10062   rm -rf conftest*
10063   ac_cv_search_regfree="-l$ac_lib"
10064 break
10065 else
10066   echo "configure: failed program was:" >&5
10067   cat conftest.$ac_ext >&5
10068 fi
10069 rm -f conftest*
10070 done
10071 LIBS="$ac_func_search_save_LIBS"
10072 fi
10073
10074 echo "$ac_t""$ac_cv_search_regfree" 1>&6
10075 if test "$ac_cv_search_regfree" != "no"; then
10076   test "$ac_cv_search_regfree" = "none required" || LIBS="$ac_cv_search_regfree $LIBS"
10077   :
10078 else :
10079   { echo "configure: error: POSIX regex required." 1>&2; exit 1; }
10080 fi
10081
10082
10083 echo $ac_n "checking for compatible POSIX regex""... $ac_c" 1>&6
10084 echo "configure:10085: checking for compatible POSIX regex" >&5
10085 if eval "test \"\${ol_cv_c_posix_regex+set}\" = set"; then
10086   echo $ac_n "(cached) $ac_c" 1>&6
10087 else
10088   
10089         if test "$cross_compiling" = yes; then
10090   ol_cv_c_posix_regex=cross
10091 else
10092   cat > conftest.$ac_ext <<EOF
10093 #line 10094 "configure"
10094 #include "confdefs.h"
10095
10096 #include <sys/types.h>
10097 #include <regex.h>
10098 static char *pattern, *string;
10099 main()
10100 {
10101         int rc;
10102         regex_t re;
10103
10104         pattern = "^A";
10105
10106         if(regcomp(&re, pattern, 0)) {
10107                 return -1;
10108         }
10109         
10110         string = "ALL MATCH";
10111         
10112         rc = regexec(&re, string, 0, (void*)0, 0);
10113
10114         regfree(&re);
10115
10116         return rc;
10117 }
10118 EOF
10119 if { (eval echo configure:10120: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
10120 then
10121   ol_cv_c_posix_regex=yes
10122 else
10123   echo "configure: failed program was:" >&5
10124   cat conftest.$ac_ext >&5
10125   rm -fr conftest*
10126   ol_cv_c_posix_regex=no
10127 fi
10128 rm -fr conftest*
10129 fi
10130
10131 fi
10132
10133 echo "$ac_t""$ol_cv_c_posix_regex" 1>&6
10134
10135 if test "$ol_cv_c_posix_regex" = no ; then
10136         { echo "configure: error: broken POSIX regex!" 1>&2; exit 1; }
10137 fi
10138
10139
10140 have_uuid=no
10141 for ac_hdr in sys/uuid.h
10142 do
10143 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10144 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10145 echo "configure:10146: checking for $ac_hdr" >&5
10146 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10147   echo $ac_n "(cached) $ac_c" 1>&6
10148 else
10149   cat > conftest.$ac_ext <<EOF
10150 #line 10151 "configure"
10151 #include "confdefs.h"
10152 #include <$ac_hdr>
10153 EOF
10154 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10155 { (eval echo configure:10156: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10156 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10157 if test -z "$ac_err"; then
10158   rm -rf conftest*
10159   eval "ac_cv_header_$ac_safe=yes"
10160 else
10161   echo "$ac_err" >&5
10162   echo "configure: failed program was:" >&5
10163   cat conftest.$ac_ext >&5
10164   rm -rf conftest*
10165   eval "ac_cv_header_$ac_safe=no"
10166 fi
10167 rm -f conftest*
10168 fi
10169 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10170   echo "$ac_t""yes" 1>&6
10171     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10172   cat >> confdefs.h <<EOF
10173 #define $ac_tr_hdr 1
10174 EOF
10175  
10176 else
10177   echo "$ac_t""no" 1>&6
10178 fi
10179 done
10180
10181 if test $ac_cv_header_sys_uuid_h = yes ; then
10182         save_LIBS="$LIBS"
10183         
10184 echo $ac_n "checking for library containing uuid_to_str""... $ac_c" 1>&6
10185 echo "configure:10186: checking for library containing uuid_to_str" >&5
10186 if eval "test \"\${ac_cv_search_uuid_to_str+set}\" = set"; then
10187   echo $ac_n "(cached) $ac_c" 1>&6
10188 else
10189   ac_func_search_save_LIBS="$LIBS"
10190 ac_cv_search_uuid_to_str="no"
10191 cat > conftest.$ac_ext <<EOF
10192 #line 10193 "configure"
10193 #include "confdefs.h"
10194 /* Override any gcc2 internal prototype to avoid an error.  */
10195 /* We use char because int might match the return type of a gcc2
10196     builtin and then its argument prototype would still apply.  */
10197 char uuid_to_str();
10198
10199 int main() {
10200 uuid_to_str()
10201 ; return 0; }
10202 EOF
10203 if { (eval echo configure:10204: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10204   rm -rf conftest*
10205   ac_cv_search_uuid_to_str="none required"
10206 else
10207   echo "configure: failed program was:" >&5
10208   cat conftest.$ac_ext >&5
10209 fi
10210 rm -f conftest*
10211 test "$ac_cv_search_uuid_to_str" = "no" && for ac_lib in uuid; do
10212 LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
10213 cat > conftest.$ac_ext <<EOF
10214 #line 10215 "configure"
10215 #include "confdefs.h"
10216 /* Override any gcc2 internal prototype to avoid an error.  */
10217 /* We use char because int might match the return type of a gcc2
10218     builtin and then its argument prototype would still apply.  */
10219 char uuid_to_str();
10220
10221 int main() {
10222 uuid_to_str()
10223 ; return 0; }
10224 EOF
10225 if { (eval echo configure:10226: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10226   rm -rf conftest*
10227   ac_cv_search_uuid_to_str="-l$ac_lib"
10228 break
10229 else
10230   echo "configure: failed program was:" >&5
10231   cat conftest.$ac_ext >&5
10232 fi
10233 rm -f conftest*
10234 done
10235 LIBS="$ac_func_search_save_LIBS"
10236 fi
10237
10238 echo "$ac_t""$ac_cv_search_uuid_to_str" 1>&6
10239 if test "$ac_cv_search_uuid_to_str" != "no"; then
10240   test "$ac_cv_search_uuid_to_str" = "none required" || LIBS="$ac_cv_search_uuid_to_str $LIBS"
10241   have_uuid=yes
10242 else :
10243   :
10244 fi
10245         LIBS="$save_LIBS"
10246
10247         if test have_uuid = yes ; then
10248                 cat >> confdefs.h <<\EOF
10249 #define HAVE_UUID_TO_STR 1
10250 EOF
10251
10252
10253                 test "$ac_cv_search_uuid_to_str" = "none required" || \
10254                         SLAPD_LIBS="$SLAPD_LIBS $ac_cv_search_uuid_to_str"
10255         fi
10256 fi
10257
10258 if test $have_uuid = no ; then
10259         echo $ac_n "checking to see if -lrpcrt4 is needed for win32 UUID support""... $ac_c" 1>&6
10260 echo "configure:10261: checking to see if -lrpcrt4 is needed for win32 UUID support" >&5
10261         save_LIBS="$LIBS"
10262         LIBS="$LIBS -lrpcrt4"
10263         cat > conftest.$ac_ext <<EOF
10264 #line 10265 "configure"
10265 #include "confdefs.h"
10266
10267                 int __stdcall UuidCreate(void *);
10268                 int __stdcall UuidToStringA(void *,void **);
10269                 
10270 int main() {
10271
10272                 UuidCreate(0);
10273                 UuidToStringA(0,0);
10274                 
10275 ; return 0; }
10276 EOF
10277 if { (eval echo configure:10278: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10278   rm -rf conftest*
10279   need_rpcrt=yes
10280 else
10281   echo "configure: failed program was:" >&5
10282   cat conftest.$ac_ext >&5
10283   rm -rf conftest*
10284   need_rpcrt=no
10285 fi
10286 rm -f conftest*
10287         if test $need_rpcrt = yes; then
10288                 SLAPD_LIBS="$SLAPD_LIBS -lrpcrt4"
10289         fi
10290         LIBS="$save_LIBS"
10291         echo "$ac_t""$need_rpcrt" 1>&6
10292 fi
10293
10294 ol_cv_lib_resolver=no
10295 if test $ol_cv_lib_resolver = no ; then
10296         echo $ac_n "checking for resolver link (default)""... $ac_c" 1>&6
10297 echo "configure:10298: checking for resolver link (default)" >&5
10298 if eval "test \"\${ol_cv_resolver_none+set}\" = set"; then
10299   echo $ac_n "(cached) $ac_c" 1>&6
10300 else
10301   
10302         ol_RESOLVER_LIB=
10303         ol_LIBS=$LIBS
10304         LIBS="$ol_RESOLVER_LIB $LIBS"
10305
10306         cat > conftest.$ac_ext <<EOF
10307 #line 10308 "configure"
10308 #include "confdefs.h"
10309
10310 #ifdef HAVE_SYS_TYPES_H
10311 #       include <sys/types.h>
10312 #endif
10313 #include <netinet/in.h>
10314 #ifdef HAVE_ARPA_NAMESER_H
10315 #       include <arpa/nameser.h>
10316 #endif
10317 #ifdef HAVE_RESOLV_H
10318 #       include <resolv.h>
10319 #endif
10320
10321 int main() {
10322 {
10323         int len, status;
10324         char *request = NULL;
10325         unsigned char reply[64*1024];
10326         unsigned char host[64*1024];
10327         unsigned char *p;
10328
10329 #ifdef NS_HFIXEDSZ
10330         /* Bind 8/9 interface */
10331         len = res_query(request, ns_c_in, ns_t_srv, reply, sizeof(reply));
10332 #else
10333         /* Bind 4 interface */
10334 # ifndef T_SRV
10335 #  define T_SRV 33
10336 # endif
10337         len = res_query(request, C_IN, T_SRV, reply, sizeof(reply));
10338 #endif
10339         p = reply;
10340 #ifdef NS_HFIXEDSZ
10341         /* Bind 8/9 interface */
10342         p += NS_HFIXEDSZ;
10343 #elif defined(HFIXEDSZ)
10344         /* Bind 4 interface w/ HFIXEDSZ */
10345         p += HFIXEDSZ;
10346 #else
10347         /* Bind 4 interface w/o HFIXEDSZ */
10348         p += sizeof(HEADER);
10349 #endif
10350         status = dn_expand( reply, reply+len, p, host, sizeof(host));
10351 }
10352 ; return 0; }
10353 EOF
10354 if { (eval echo configure:10355: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10355   rm -rf conftest*
10356   ol_cv_resolver_none=yes
10357 else
10358   echo "configure: failed program was:" >&5
10359   cat conftest.$ac_ext >&5
10360   rm -rf conftest*
10361   ol_cv_resolver_none=no
10362 fi
10363 rm -f conftest*
10364
10365         LIBS="$ol_LIBS"
10366
10367 fi
10368
10369 echo "$ac_t""$ol_cv_resolver_none" 1>&6
10370
10371         if test $ol_cv_resolver_none = yes ; then
10372                 ol_cv_lib_resolver=yes
10373         fi
10374 fi
10375
10376 if test $ol_cv_lib_resolver = no ; then
10377         echo $ac_n "checking for resolver link (-lresolv)""... $ac_c" 1>&6
10378 echo "configure:10379: checking for resolver link (-lresolv)" >&5
10379 if eval "test \"\${ol_cv_resolver_resolv+set}\" = set"; then
10380   echo $ac_n "(cached) $ac_c" 1>&6
10381 else
10382   
10383         ol_RESOLVER_LIB=-lresolv
10384         ol_LIBS=$LIBS
10385         LIBS="$ol_RESOLVER_LIB $LIBS"
10386
10387         cat > conftest.$ac_ext <<EOF
10388 #line 10389 "configure"
10389 #include "confdefs.h"
10390
10391 #ifdef HAVE_SYS_TYPES_H
10392 #       include <sys/types.h>
10393 #endif
10394 #include <netinet/in.h>
10395 #ifdef HAVE_ARPA_NAMESER_H
10396 #       include <arpa/nameser.h>
10397 #endif
10398 #ifdef HAVE_RESOLV_H
10399 #       include <resolv.h>
10400 #endif
10401
10402 int main() {
10403 {
10404         int len, status;
10405         char *request = NULL;
10406         unsigned char reply[64*1024];
10407         unsigned char host[64*1024];
10408         unsigned char *p;
10409
10410 #ifdef NS_HFIXEDSZ
10411         /* Bind 8/9 interface */
10412         len = res_query(request, ns_c_in, ns_t_srv, reply, sizeof(reply));
10413 #else
10414         /* Bind 4 interface */
10415 # ifndef T_SRV
10416 #  define T_SRV 33
10417 # endif
10418         len = res_query(request, C_IN, T_SRV, reply, sizeof(reply));
10419 #endif
10420         p = reply;
10421 #ifdef NS_HFIXEDSZ
10422         /* Bind 8/9 interface */
10423         p += NS_HFIXEDSZ;
10424 #elif defined(HFIXEDSZ)
10425         /* Bind 4 interface w/ HFIXEDSZ */
10426         p += HFIXEDSZ;
10427 #else
10428         /* Bind 4 interface w/o HFIXEDSZ */
10429         p += sizeof(HEADER);
10430 #endif
10431         status = dn_expand( reply, reply+len, p, host, sizeof(host));
10432 }
10433 ; return 0; }
10434 EOF
10435 if { (eval echo configure:10436: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10436   rm -rf conftest*
10437   ol_cv_resolver_resolv=yes
10438 else
10439   echo "configure: failed program was:" >&5
10440   cat conftest.$ac_ext >&5
10441   rm -rf conftest*
10442   ol_cv_resolver_resolv=no
10443 fi
10444 rm -f conftest*
10445
10446         LIBS="$ol_LIBS"
10447
10448 fi
10449
10450 echo "$ac_t""$ol_cv_resolver_resolv" 1>&6
10451
10452         if test $ol_cv_resolver_resolv = yes ; then
10453                 ol_cv_lib_resolver=-lresolv
10454         fi
10455 fi
10456
10457 if test $ol_cv_lib_resolver = no ; then
10458         echo $ac_n "checking for resolver link (-lbind)""... $ac_c" 1>&6
10459 echo "configure:10460: checking for resolver link (-lbind)" >&5
10460 if eval "test \"\${ol_cv_resolver_bind+set}\" = set"; then
10461   echo $ac_n "(cached) $ac_c" 1>&6
10462 else
10463   
10464         ol_RESOLVER_LIB=-lbind
10465         ol_LIBS=$LIBS
10466         LIBS="$ol_RESOLVER_LIB $LIBS"
10467
10468         cat > conftest.$ac_ext <<EOF
10469 #line 10470 "configure"
10470 #include "confdefs.h"
10471
10472 #ifdef HAVE_SYS_TYPES_H
10473 #       include <sys/types.h>
10474 #endif
10475 #include <netinet/in.h>
10476 #ifdef HAVE_ARPA_NAMESER_H
10477 #       include <arpa/nameser.h>
10478 #endif
10479 #ifdef HAVE_RESOLV_H
10480 #       include <resolv.h>
10481 #endif
10482
10483 int main() {
10484 {
10485         int len, status;
10486         char *request = NULL;
10487         unsigned char reply[64*1024];
10488         unsigned char host[64*1024];
10489         unsigned char *p;
10490
10491 #ifdef NS_HFIXEDSZ
10492         /* Bind 8/9 interface */
10493         len = res_query(request, ns_c_in, ns_t_srv, reply, sizeof(reply));
10494 #else
10495         /* Bind 4 interface */
10496 # ifndef T_SRV
10497 #  define T_SRV 33
10498 # endif
10499         len = res_query(request, C_IN, T_SRV, reply, sizeof(reply));
10500 #endif
10501         p = reply;
10502 #ifdef NS_HFIXEDSZ
10503         /* Bind 8/9 interface */
10504         p += NS_HFIXEDSZ;
10505 #elif defined(HFIXEDSZ)
10506         /* Bind 4 interface w/ HFIXEDSZ */
10507         p += HFIXEDSZ;
10508 #else
10509         /* Bind 4 interface w/o HFIXEDSZ */
10510         p += sizeof(HEADER);
10511 #endif
10512         status = dn_expand( reply, reply+len, p, host, sizeof(host));
10513 }
10514 ; return 0; }
10515 EOF
10516 if { (eval echo configure:10517: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10517   rm -rf conftest*
10518   ol_cv_resolver_bind=yes
10519 else
10520   echo "configure: failed program was:" >&5
10521   cat conftest.$ac_ext >&5
10522   rm -rf conftest*
10523   ol_cv_resolver_bind=no
10524 fi
10525 rm -f conftest*
10526
10527         LIBS="$ol_LIBS"
10528
10529 fi
10530
10531 echo "$ac_t""$ol_cv_resolver_bind" 1>&6
10532
10533         if test $ol_cv_resolver_bind = yes ; then
10534                 ol_cv_lib_resolver=-lbind
10535         fi
10536 fi
10537
10538
10539
10540 ol_link_dnssrv=no
10541 if test "$ol_cv_lib_resolver" != no ; then
10542         cat >> confdefs.h <<\EOF
10543 #define HAVE_RES_QUERY 1
10544 EOF
10545
10546
10547         if test "$ol_enable_dnssrv" != no ; then
10548                 ol_link_dnssrv=yes
10549         fi
10550
10551         if test "$ol_cv_lib_resolver" != yes ; then
10552                 LIBS="$ol_cv_lib_resolver $LIBS"
10553         fi
10554 fi
10555
10556 if test "$ol_enable_dnssrv" = yes -o "$ol_enable_dnssrv" = mod ; then
10557         if test "$ol_link_dnssrv" = no ; then
10558                 { echo "configure: error: DNSSRV requires res_query()" 1>&2; exit 1; }
10559         fi
10560 else
10561         ol_enable_dnssrv=no
10562 fi
10563
10564 for ac_func in hstrerror 
10565 do
10566 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10567 echo "configure:10568: checking for $ac_func" >&5
10568 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10569   echo $ac_n "(cached) $ac_c" 1>&6
10570 else
10571   cat > conftest.$ac_ext <<EOF
10572 #line 10573 "configure"
10573 #include "confdefs.h"
10574 /* System header to define __stub macros and hopefully few prototypes,
10575     which can conflict with char $ac_func(); below.  */
10576 #include <assert.h>
10577 /* Override any gcc2 internal prototype to avoid an error.  */
10578 /* We use char because int might match the return type of a gcc2
10579     builtin and then its argument prototype would still apply.  */
10580 char $ac_func();
10581 char (*f)();
10582
10583 int main() {
10584
10585 /* The GNU C library defines this for functions which it implements
10586     to always fail with ENOSYS.  Some functions are actually named
10587     something starting with __ and the normal name is an alias.  */
10588 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10589 choke me
10590 #else
10591 f = $ac_func;
10592 #endif
10593
10594 ; return 0; }
10595 EOF
10596 if { (eval echo configure:10597: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10597   rm -rf conftest*
10598   eval "ac_cv_func_$ac_func=yes"
10599 else
10600   echo "configure: failed program was:" >&5
10601   cat conftest.$ac_ext >&5
10602   rm -rf conftest*
10603   eval "ac_cv_func_$ac_func=no"
10604 fi
10605 rm -f conftest*
10606 fi
10607
10608 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10609   echo "$ac_t""yes" 1>&6
10610     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10611   cat >> confdefs.h <<EOF
10612 #define $ac_tr_func 1
10613 EOF
10614  
10615 else
10616   echo "$ac_t""no" 1>&6
10617 fi
10618 done
10619
10620
10621 for ac_func in getaddrinfo getnameinfo gai_strerror inet_ntop 
10622 do
10623 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10624 echo "configure:10625: checking for $ac_func" >&5
10625 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10626   echo $ac_n "(cached) $ac_c" 1>&6
10627 else
10628   cat > conftest.$ac_ext <<EOF
10629 #line 10630 "configure"
10630 #include "confdefs.h"
10631 /* System header to define __stub macros and hopefully few prototypes,
10632     which can conflict with char $ac_func(); below.  */
10633 #include <assert.h>
10634 /* Override any gcc2 internal prototype to avoid an error.  */
10635 /* We use char because int might match the return type of a gcc2
10636     builtin and then its argument prototype would still apply.  */
10637 char $ac_func();
10638 char (*f)();
10639
10640 int main() {
10641
10642 /* The GNU C library defines this for functions which it implements
10643     to always fail with ENOSYS.  Some functions are actually named
10644     something starting with __ and the normal name is an alias.  */
10645 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10646 choke me
10647 #else
10648 f = $ac_func;
10649 #endif
10650
10651 ; return 0; }
10652 EOF
10653 if { (eval echo configure:10654: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10654   rm -rf conftest*
10655   eval "ac_cv_func_$ac_func=yes"
10656 else
10657   echo "configure: failed program was:" >&5
10658   cat conftest.$ac_ext >&5
10659   rm -rf conftest*
10660   eval "ac_cv_func_$ac_func=no"
10661 fi
10662 rm -f conftest*
10663 fi
10664
10665 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10666   echo "$ac_t""yes" 1>&6
10667     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10668   cat >> confdefs.h <<EOF
10669 #define $ac_tr_func 1
10670 EOF
10671  
10672 else
10673   echo "$ac_t""no" 1>&6
10674 fi
10675 done
10676
10677
10678 ol_link_ipv6=no
10679 if test $ac_cv_func_getaddrinfo = no -o $ac_cv_func_inet_ntop = no ; then
10680         if test $ol_enable_ipv6 = yes ; then
10681                 { echo "configure: error: IPv6 support requires getaddrinfo() and inet_ntop()" 1>&2; exit 1; }
10682         fi
10683 elif test $ol_enable_ipv6 != no ; then
10684         echo $ac_n "checking INET6_ADDRSTRLEN""... $ac_c" 1>&6
10685 echo "configure:10686: checking INET6_ADDRSTRLEN" >&5
10686 if eval "test \"\${ol_cv_inet6_addrstrlen+set}\" = set"; then
10687   echo $ac_n "(cached) $ac_c" 1>&6
10688 else
10689   
10690                 cat > conftest.$ac_ext <<EOF
10691 #line 10692 "configure"
10692 #include "confdefs.h"
10693
10694 #                       include <netinet/in.h>
10695 #                       ifdef INET6_ADDRSTRLEN
10696                                 __has_inet6_addrstrlen__;
10697 #                       endif
10698                 
10699 EOF
10700 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10701   egrep "__has_inet6_addrstrlen__" >/dev/null 2>&1; then
10702   rm -rf conftest*
10703   ol_cv_inet6_addrstrlen=yes
10704 else
10705   rm -rf conftest*
10706   ol_cv_inet6_addrstrlen=no
10707 fi
10708 rm -f conftest*
10709
10710 fi
10711
10712 echo "$ac_t""$ol_cv_inet6_addrstrlen" 1>&6
10713
10714
10715         echo $ac_n "checking struct sockaddr_storage""... $ac_c" 1>&6
10716 echo "configure:10717: checking struct sockaddr_storage" >&5
10717 if eval "test \"\${ol_cv_struct_sockaddr_storage+set}\" = set"; then
10718   echo $ac_n "(cached) $ac_c" 1>&6
10719 else
10720   
10721                 cat > conftest.$ac_ext <<EOF
10722 #line 10723 "configure"
10723 #include "confdefs.h"
10724
10725 #include <sys/types.h>
10726 #include <sys/socket.h>
10727
10728 int main() {
10729
10730                         struct sockaddr_storage ss;
10731
10732 ; return 0; }
10733 EOF
10734 if { (eval echo configure:10735: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10735   rm -rf conftest*
10736   ol_cv_struct_sockaddr_storage=yes
10737 else
10738   echo "configure: failed program was:" >&5
10739   cat conftest.$ac_ext >&5
10740   rm -rf conftest*
10741   ol_cv_struct_sockaddr_storage=no
10742 fi
10743 rm -f conftest*
10744 fi
10745
10746 echo "$ac_t""$ol_cv_struct_sockaddr_storage" 1>&6
10747
10748         if test $ol_cv_inet6_addrstrlen = yes \
10749                 -a $ol_cv_struct_sockaddr_storage = yes ; then
10750                 ol_link_ipv6=yes
10751         elif test $ol_enable_ipv6 = yes \
10752                         -a $ol_cv_inet6_addrstrlen = no ; then
10753                 { echo "configure: error: IPv6 support requires INET6_ADDRSTRLEN" 1>&2; exit 1; }
10754         elif test $ol_enable_ipv6 = yes \
10755                         -a $ol_cv_struct_sockaddr_storage = no ; then
10756                 { echo "configure: error: IPv6 support requires struct sockaddr_storage" 1>&2; exit 1; }
10757         fi
10758 fi
10759
10760 if test $ol_enable_local != no ; then
10761         for ac_hdr in sys/un.h 
10762 do
10763 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10764 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10765 echo "configure:10766: checking for $ac_hdr" >&5
10766 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10767   echo $ac_n "(cached) $ac_c" 1>&6
10768 else
10769   cat > conftest.$ac_ext <<EOF
10770 #line 10771 "configure"
10771 #include "confdefs.h"
10772 #include <$ac_hdr>
10773 EOF
10774 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10775 { (eval echo configure:10776: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10776 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10777 if test -z "$ac_err"; then
10778   rm -rf conftest*
10779   eval "ac_cv_header_$ac_safe=yes"
10780 else
10781   echo "$ac_err" >&5
10782   echo "configure: failed program was:" >&5
10783   cat conftest.$ac_ext >&5
10784   rm -rf conftest*
10785   eval "ac_cv_header_$ac_safe=no"
10786 fi
10787 rm -f conftest*
10788 fi
10789 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10790   echo "$ac_t""yes" 1>&6
10791     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10792   cat >> confdefs.h <<EOF
10793 #define $ac_tr_hdr 1
10794 EOF
10795  
10796 else
10797   echo "$ac_t""no" 1>&6
10798 fi
10799 done
10800
10801
10802         if test $ol_enable_local = auto ; then
10803                 ol_enable_local=$ac_cv_header_sys_un_h
10804         elif test $ac_cv_header_sys_un_h = no ; then
10805                 { echo "configure: error: AF_LOCAL domain support requires sys/un.h" 1>&2; exit 1; }
10806         fi
10807 fi
10808
10809 ol_link_kbind=no
10810 ol_link_krb5=no
10811 ol_link_krb4=no
10812
10813 if test $ol_with_kerberos = yes -o $ol_with_kerberos = auto \
10814         -o $ol_with_kerberos = k5 -o $ol_with_kerberos = k5only \
10815         -o $ol_with_kerberos = k425 ; then
10816
10817         for ac_hdr in krb5.h
10818 do
10819 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10820 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10821 echo "configure:10822: checking for $ac_hdr" >&5
10822 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10823   echo $ac_n "(cached) $ac_c" 1>&6
10824 else
10825   cat > conftest.$ac_ext <<EOF
10826 #line 10827 "configure"
10827 #include "confdefs.h"
10828 #include <$ac_hdr>
10829 EOF
10830 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10831 { (eval echo configure:10832: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10832 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10833 if test -z "$ac_err"; then
10834   rm -rf conftest*
10835   eval "ac_cv_header_$ac_safe=yes"
10836 else
10837   echo "$ac_err" >&5
10838   echo "configure: failed program was:" >&5
10839   cat conftest.$ac_ext >&5
10840   rm -rf conftest*
10841   eval "ac_cv_header_$ac_safe=no"
10842 fi
10843 rm -f conftest*
10844 fi
10845 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10846   echo "$ac_t""yes" 1>&6
10847     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10848   cat >> confdefs.h <<EOF
10849 #define $ac_tr_hdr 1
10850 EOF
10851  
10852 else
10853   echo "$ac_t""no" 1>&6
10854 fi
10855 done
10856
10857
10858         if test $ac_cv_header_krb5_h = yes ; then
10859                                 for ac_hdr in heim_err.h
10860 do
10861 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10862 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10863 echo "configure:10864: checking for $ac_hdr" >&5
10864 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10865   echo $ac_n "(cached) $ac_c" 1>&6
10866 else
10867   cat > conftest.$ac_ext <<EOF
10868 #line 10869 "configure"
10869 #include "confdefs.h"
10870 #include <$ac_hdr>
10871 EOF
10872 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10873 { (eval echo configure:10874: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10874 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10875 if test -z "$ac_err"; then
10876   rm -rf conftest*
10877   eval "ac_cv_header_$ac_safe=yes"
10878 else
10879   echo "$ac_err" >&5
10880   echo "configure: failed program was:" >&5
10881   cat conftest.$ac_ext >&5
10882   rm -rf conftest*
10883   eval "ac_cv_header_$ac_safe=no"
10884 fi
10885 rm -f conftest*
10886 fi
10887 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10888   echo "$ac_t""yes" 1>&6
10889     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10890   cat >> confdefs.h <<EOF
10891 #define $ac_tr_hdr 1
10892 EOF
10893  
10894 else
10895   echo "$ac_t""no" 1>&6
10896 fi
10897 done
10898
10899                 if test $ac_cv_header_heim_err_h = yes ; then
10900                         krb5_impl=heimdal
10901                 else
10902                         krb5_impl=mit
10903                 fi
10904
10905                 if test $krb5_impl = mit; then
10906                         echo $ac_n "checking for main in -lk5crypto""... $ac_c" 1>&6
10907 echo "configure:10908: checking for main in -lk5crypto" >&5
10908 ac_lib_var=`echo k5crypto'_'main | sed 'y%./+-:%__p__%'`
10909 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10910   echo $ac_n "(cached) $ac_c" 1>&6
10911 else
10912   ac_save_LIBS="$LIBS"
10913 LIBS="-lk5crypto  $LIBS"
10914 cat > conftest.$ac_ext <<EOF
10915 #line 10916 "configure"
10916 #include "confdefs.h"
10917
10918 int main() {
10919 main()
10920 ; return 0; }
10921 EOF
10922 if { (eval echo configure:10923: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10923   rm -rf conftest*
10924   eval "ac_cv_lib_$ac_lib_var=yes"
10925 else
10926   echo "configure: failed program was:" >&5
10927   cat conftest.$ac_ext >&5
10928   rm -rf conftest*
10929   eval "ac_cv_lib_$ac_lib_var=no"
10930 fi
10931 rm -f conftest*
10932 LIBS="$ac_save_LIBS"
10933
10934 fi
10935 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10936   echo "$ac_t""yes" 1>&6
10937   krb5crypto=k5crypto
10938 else
10939   echo "$ac_t""no" 1>&6
10940 krb5crypto=crypto
10941 fi
10942
10943
10944                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
10945 echo "configure:10946: checking for main in -lkrb5" >&5
10946 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
10947 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10948   echo $ac_n "(cached) $ac_c" 1>&6
10949 else
10950   ac_save_LIBS="$LIBS"
10951 LIBS="-lkrb5 -l$krb5crypto -lcom_err $LIBS"
10952 cat > conftest.$ac_ext <<EOF
10953 #line 10954 "configure"
10954 #include "confdefs.h"
10955
10956 int main() {
10957 main()
10958 ; return 0; }
10959 EOF
10960 if { (eval echo configure:10961: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10961   rm -rf conftest*
10962   eval "ac_cv_lib_$ac_lib_var=yes"
10963 else
10964   echo "configure: failed program was:" >&5
10965   cat conftest.$ac_ext >&5
10966   rm -rf conftest*
10967   eval "ac_cv_lib_$ac_lib_var=no"
10968 fi
10969 rm -f conftest*
10970 LIBS="$ac_save_LIBS"
10971
10972 fi
10973 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10974   echo "$ac_t""yes" 1>&6
10975   have_krb5=yes
10976                                 KRB5_LIBS="-lkrb5 -l$krb5crypto -lcom_err"
10977 else
10978   echo "$ac_t""no" 1>&6
10979 have_krb5=no
10980 fi
10981
10982
10983                 elif test $krb5_impl = heimdal; then
10984                         echo $ac_n "checking for main in -ldes""... $ac_c" 1>&6
10985 echo "configure:10986: checking for main in -ldes" >&5
10986 ac_lib_var=`echo des'_'main | sed 'y%./+-:%__p__%'`
10987 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10988   echo $ac_n "(cached) $ac_c" 1>&6
10989 else
10990   ac_save_LIBS="$LIBS"
10991 LIBS="-ldes  $LIBS"
10992 cat > conftest.$ac_ext <<EOF
10993 #line 10994 "configure"
10994 #include "confdefs.h"
10995
10996 int main() {
10997 main()
10998 ; return 0; }
10999 EOF
11000 if { (eval echo configure:11001: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11001   rm -rf conftest*
11002   eval "ac_cv_lib_$ac_lib_var=yes"
11003 else
11004   echo "configure: failed program was:" >&5
11005   cat conftest.$ac_ext >&5
11006   rm -rf conftest*
11007   eval "ac_cv_lib_$ac_lib_var=no"
11008 fi
11009 rm -f conftest*
11010 LIBS="$ac_save_LIBS"
11011
11012 fi
11013 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11014   echo "$ac_t""yes" 1>&6
11015   krb5crypto=des
11016 else
11017   echo "$ac_t""no" 1>&6
11018 krb5crypto=crypto
11019 fi
11020
11021
11022                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
11023 echo "configure:11024: checking for main in -lkrb5" >&5
11024 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
11025 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11026   echo $ac_n "(cached) $ac_c" 1>&6
11027 else
11028   ac_save_LIBS="$LIBS"
11029 LIBS="-lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err $LIBS"
11030 cat > conftest.$ac_ext <<EOF
11031 #line 11032 "configure"
11032 #include "confdefs.h"
11033
11034 int main() {
11035 main()
11036 ; return 0; }
11037 EOF
11038 if { (eval echo configure:11039: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11039   rm -rf conftest*
11040   eval "ac_cv_lib_$ac_lib_var=yes"
11041 else
11042   echo "configure: failed program was:" >&5
11043   cat conftest.$ac_ext >&5
11044   rm -rf conftest*
11045   eval "ac_cv_lib_$ac_lib_var=no"
11046 fi
11047 rm -f conftest*
11048 LIBS="$ac_save_LIBS"
11049
11050 fi
11051 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11052   echo "$ac_t""yes" 1>&6
11053   have_krb5=yes
11054                                 KRB5_LIBS="-lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err"
11055 else
11056   echo "$ac_t""no" 1>&6
11057 have_krb5=no
11058 fi
11059
11060
11061                         cat >> confdefs.h <<\EOF
11062 #define HAVE_HEIMDAL_KERBEROS 1
11063 EOF
11064
11065
11066                 else
11067                         have_krb5=no
11068                         echo "configure: warning: Unrecognized Kerberos5 Implementation" 1>&2
11069                 fi
11070
11071                 if test $have_krb5 = yes ; then
11072                         ol_link_krb5=yes
11073
11074                         cat >> confdefs.h <<\EOF
11075 #define HAVE_KRB5 1
11076 EOF
11077
11078
11079                         if test $ol_with_kerberos = k5only ; then
11080                                 ol_with_kerberos=found
11081                         fi
11082
11083                 elif test $ol_with_kerberos != auto ; then
11084                         { echo "configure: error: Required Kerberos 5 support not available" 1>&2; exit 1; }
11085                 fi
11086
11087         fi
11088 fi
11089
11090 if test $ol_link_krb5 = yes -a \( $ol_with_kerberos = yes -o \
11091         $ol_with_kerberos = auto -o $ol_with_kerberos = k425 \) ; then
11092
11093         for ac_hdr in kerberosIV/krb.h kerberosIV/des.h
11094 do
11095 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11096 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11097 echo "configure:11098: checking for $ac_hdr" >&5
11098 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11099   echo $ac_n "(cached) $ac_c" 1>&6
11100 else
11101   cat > conftest.$ac_ext <<EOF
11102 #line 11103 "configure"
11103 #include "confdefs.h"
11104 #include <$ac_hdr>
11105 EOF
11106 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11107 { (eval echo configure:11108: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11108 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11109 if test -z "$ac_err"; then
11110   rm -rf conftest*
11111   eval "ac_cv_header_$ac_safe=yes"
11112 else
11113   echo "$ac_err" >&5
11114   echo "configure: failed program was:" >&5
11115   cat conftest.$ac_ext >&5
11116   rm -rf conftest*
11117   eval "ac_cv_header_$ac_safe=no"
11118 fi
11119 rm -f conftest*
11120 fi
11121 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11122   echo "$ac_t""yes" 1>&6
11123     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11124   cat >> confdefs.h <<EOF
11125 #define $ac_tr_hdr 1
11126 EOF
11127  
11128 else
11129   echo "$ac_t""no" 1>&6
11130 fi
11131 done
11132
11133
11134         if test $ac_cv_header_kerberosIV_krb_h = yes ; then
11135                 if test $krb5_impl = mit; then
11136                         echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
11137 echo "configure:11138: checking for main in -lkrb4" >&5
11138 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
11139 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11140   echo $ac_n "(cached) $ac_c" 1>&6
11141 else
11142   ac_save_LIBS="$LIBS"
11143 LIBS="-lkrb4 -ldes425 -lkrb5 -l$krb5crypto -lcom_err $LIBS"
11144 cat > conftest.$ac_ext <<EOF
11145 #line 11146 "configure"
11146 #include "confdefs.h"
11147
11148 int main() {
11149 main()
11150 ; return 0; }
11151 EOF
11152 if { (eval echo configure:11153: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11153   rm -rf conftest*
11154   eval "ac_cv_lib_$ac_lib_var=yes"
11155 else
11156   echo "configure: failed program was:" >&5
11157   cat conftest.$ac_ext >&5
11158   rm -rf conftest*
11159   eval "ac_cv_lib_$ac_lib_var=no"
11160 fi
11161 rm -f conftest*
11162 LIBS="$ac_save_LIBS"
11163
11164 fi
11165 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11166   echo "$ac_t""yes" 1>&6
11167   have_k425=yes
11168                                 KRB4_LIBS="-lkrb4 -ldes425"
11169 else
11170   echo "$ac_t""no" 1>&6
11171 have_k425=no
11172 fi
11173
11174
11175                 elif test $krb5_impl = heimdal; then
11176                         echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
11177 echo "configure:11178: checking for main in -lkrb4" >&5
11178 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
11179 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11180   echo $ac_n "(cached) $ac_c" 1>&6
11181 else
11182   ac_save_LIBS="$LIBS"
11183 LIBS="-lkrb4 -lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err $LIBS"
11184 cat > conftest.$ac_ext <<EOF
11185 #line 11186 "configure"
11186 #include "confdefs.h"
11187
11188 int main() {
11189 main()
11190 ; return 0; }
11191 EOF
11192 if { (eval echo configure:11193: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11193   rm -rf conftest*
11194   eval "ac_cv_lib_$ac_lib_var=yes"
11195 else
11196   echo "configure: failed program was:" >&5
11197   cat conftest.$ac_ext >&5
11198   rm -rf conftest*
11199   eval "ac_cv_lib_$ac_lib_var=no"
11200 fi
11201 rm -f conftest*
11202 LIBS="$ac_save_LIBS"
11203
11204 fi
11205 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11206   echo "$ac_t""yes" 1>&6
11207   have_k425=yes
11208                                 KRB4_LIBS="-lkrb4"
11209 else
11210   echo "$ac_t""no" 1>&6
11211 have_k425=no
11212 fi
11213
11214
11215                 else
11216                         have_425=no
11217                         echo "configure: warning: Unrecongized Kerberos V Implementation" 1>&2
11218                 fi
11219
11220                 if test $have_k425 = yes ; then
11221                         ol_with_kerberos=found
11222                         ol_link_krb4=yes
11223
11224                         cat >> confdefs.h <<\EOF
11225 #define HAVE_KRB425 1
11226 EOF
11227
11228                         cat >> confdefs.h <<\EOF
11229 #define HAVE_KRB4 1
11230 EOF
11231
11232
11233                         echo $ac_n "checking for des_debug in Kerberos libraries""... $ac_c" 1>&6
11234 echo "configure:11235: checking for des_debug in Kerberos libraries" >&5
11235 if eval "test \"\${ol_cv_var_des_debug+set}\" = set"; then
11236   echo $ac_n "(cached) $ac_c" 1>&6
11237 else
11238   
11239                                                                 save_LIBS="$LIBS"
11240                                 LIBS="$KRB4_LIBS $KRB5_LIBS $LIBS"
11241                                 cat > conftest.$ac_ext <<EOF
11242 #line 11243 "configure"
11243 #include "confdefs.h"
11244
11245 #include <kerberosIV/krb.h>
11246 #include <kerberosIV/des.h>
11247 extern int des_debug;
11248
11249 int main() {
11250
11251 des_debug = 1;
11252
11253 ; return 0; }
11254 EOF
11255 if { (eval echo configure:11256: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11256   rm -rf conftest*
11257   ol_cv_var_des_debug=yes
11258 else
11259   echo "configure: failed program was:" >&5
11260   cat conftest.$ac_ext >&5
11261   rm -rf conftest*
11262   ol_cv_var_des_debug=no
11263 fi
11264 rm -f conftest*
11265                                                                 LIBS="$save_LIBS"
11266                         
11267 fi
11268
11269 echo "$ac_t""$ol_cv_var_des_debug" 1>&6
11270
11271                         if test $ol_cv_var_des_debug = yes ; then
11272                                 cat >> confdefs.h <<\EOF
11273 #define HAVE_DES_DEBUG 1
11274 EOF
11275
11276                         fi
11277
11278                         LIBS="$save_LIBS"
11279                 fi
11280         fi
11281 fi
11282
11283 if test $ol_link_krb5 = yes ; then
11284         ol_with_kerberos=found
11285 fi
11286
11287 if test $ol_with_kerberos = yes -o $ol_with_kerberos = auto \
11288         -o $ol_with_kerberos = k4 -o $ol_with_kerberos = kth ; then
11289
11290         for ac_hdr in krb.h des.h krb-archaeology.h 
11291 do
11292 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11293 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11294 echo "configure:11295: checking for $ac_hdr" >&5
11295 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11296   echo $ac_n "(cached) $ac_c" 1>&6
11297 else
11298   cat > conftest.$ac_ext <<EOF
11299 #line 11300 "configure"
11300 #include "confdefs.h"
11301 #include <$ac_hdr>
11302 EOF
11303 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11304 { (eval echo configure:11305: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11305 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11306 if test -z "$ac_err"; then
11307   rm -rf conftest*
11308   eval "ac_cv_header_$ac_safe=yes"
11309 else
11310   echo "$ac_err" >&5
11311   echo "configure: failed program was:" >&5
11312   cat conftest.$ac_ext >&5
11313   rm -rf conftest*
11314   eval "ac_cv_header_$ac_safe=no"
11315 fi
11316 rm -f conftest*
11317 fi
11318 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11319   echo "$ac_t""yes" 1>&6
11320     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11321   cat >> confdefs.h <<EOF
11322 #define $ac_tr_hdr 1
11323 EOF
11324  
11325 else
11326   echo "$ac_t""no" 1>&6
11327 fi
11328 done
11329
11330
11331         if test $ac_cv_header_krb_h = yes ; then
11332                 echo $ac_n "checking for main in -lkrb""... $ac_c" 1>&6
11333 echo "configure:11334: checking for main in -lkrb" >&5
11334 ac_lib_var=`echo krb'_'main | sed 'y%./+-:%__p__%'`
11335 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11336   echo $ac_n "(cached) $ac_c" 1>&6
11337 else
11338   ac_save_LIBS="$LIBS"
11339 LIBS="-lkrb -ldes $LIBS"
11340 cat > conftest.$ac_ext <<EOF
11341 #line 11342 "configure"
11342 #include "confdefs.h"
11343
11344 int main() {
11345 main()
11346 ; return 0; }
11347 EOF
11348 if { (eval echo configure:11349: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11349   rm -rf conftest*
11350   eval "ac_cv_lib_$ac_lib_var=yes"
11351 else
11352   echo "configure: failed program was:" >&5
11353   cat conftest.$ac_ext >&5
11354   rm -rf conftest*
11355   eval "ac_cv_lib_$ac_lib_var=no"
11356 fi
11357 rm -f conftest*
11358 LIBS="$ac_save_LIBS"
11359
11360 fi
11361 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11362   echo "$ac_t""yes" 1>&6
11363   have_k4=yes
11364 else
11365   echo "$ac_t""no" 1>&6
11366 have_k4=no
11367 fi
11368
11369
11370                 if test $have_k4 = yes ; then
11371                         ol_with_kerberos=found
11372                         ol_link_krb4=yes
11373
11374                         cat >> confdefs.h <<\EOF
11375 #define HAVE_KRB4 1
11376 EOF
11377
11378
11379                         KRB4_LIBS="-lkrb -ldes"
11380
11381                         if test $ac_cv_header_krb_archaeology_h = yes ; then
11382                                 cat >> confdefs.h <<\EOF
11383 #define HAVE_KTH_KERBEROS 1
11384 EOF
11385
11386                         fi
11387                 fi
11388         fi
11389 fi
11390
11391 if test $ol_link_krb4 = yes -a $ol_enable_kbind != no ; then
11392         ol_link_kbind=yes
11393
11394 elif test $ol_enable_kbind = yes ; then
11395         { echo "configure: error: Kerberos IV detection failed" 1>&2; exit 1; }
11396 fi
11397
11398 if test $ol_link_krb4 = yes -o $ol_link_krb5 = yes ; then
11399         cat >> confdefs.h <<\EOF
11400 #define HAVE_KERBEROS 1
11401 EOF
11402
11403
11404 elif test $ol_with_kerberos != auto -a $ol_with_kerberos != no ; then
11405         { echo "configure: error: Kerberos detection failed" 1>&2; exit 1; }
11406 fi
11407
11408         
11409 ol_link_tls=no
11410 if test $ol_with_tls != no ; then
11411         for ac_hdr in openssl/ssl.h ssl.h
11412 do
11413 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11414 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11415 echo "configure:11416: checking for $ac_hdr" >&5
11416 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11417   echo $ac_n "(cached) $ac_c" 1>&6
11418 else
11419   cat > conftest.$ac_ext <<EOF
11420 #line 11421 "configure"
11421 #include "confdefs.h"
11422 #include <$ac_hdr>
11423 EOF
11424 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11425 { (eval echo configure:11426: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11426 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11427 if test -z "$ac_err"; then
11428   rm -rf conftest*
11429   eval "ac_cv_header_$ac_safe=yes"
11430 else
11431   echo "$ac_err" >&5
11432   echo "configure: failed program was:" >&5
11433   cat conftest.$ac_ext >&5
11434   rm -rf conftest*
11435   eval "ac_cv_header_$ac_safe=no"
11436 fi
11437 rm -f conftest*
11438 fi
11439 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11440   echo "$ac_t""yes" 1>&6
11441     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11442   cat >> confdefs.h <<EOF
11443 #define $ac_tr_hdr 1
11444 EOF
11445  
11446 else
11447   echo "$ac_t""no" 1>&6
11448 fi
11449 done
11450
11451
11452         if test $ac_cv_header_openssl_ssl_h = yes \
11453                 -o $ac_cv_header_ssl_h = yes ; then
11454                 echo $ac_n "checking for SSLeay_add_ssl_algorithms in -lssl""... $ac_c" 1>&6
11455 echo "configure:11456: checking for SSLeay_add_ssl_algorithms in -lssl" >&5
11456 ac_lib_var=`echo ssl'_'SSLeay_add_ssl_algorithms | sed 'y%./+-:%__p__%'`
11457 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11458   echo $ac_n "(cached) $ac_c" 1>&6
11459 else
11460   ac_save_LIBS="$LIBS"
11461 LIBS="-lssl -lcrypto $LIBS"
11462 cat > conftest.$ac_ext <<EOF
11463 #line 11464 "configure"
11464 #include "confdefs.h"
11465 /* Override any gcc2 internal prototype to avoid an error.  */
11466 /* We use char because int might match the return type of a gcc2
11467     builtin and then its argument prototype would still apply.  */
11468 char SSLeay_add_ssl_algorithms();
11469
11470 int main() {
11471 SSLeay_add_ssl_algorithms()
11472 ; return 0; }
11473 EOF
11474 if { (eval echo configure:11475: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11475   rm -rf conftest*
11476   eval "ac_cv_lib_$ac_lib_var=yes"
11477 else
11478   echo "configure: failed program was:" >&5
11479   cat conftest.$ac_ext >&5
11480   rm -rf conftest*
11481   eval "ac_cv_lib_$ac_lib_var=no"
11482 fi
11483 rm -f conftest*
11484 LIBS="$ac_save_LIBS"
11485
11486 fi
11487 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11488   echo "$ac_t""yes" 1>&6
11489   have_ssleay=yes
11490                         need_rsaref=no
11491 else
11492   echo "$ac_t""no" 1>&6
11493 have_ssleay=no
11494 fi
11495
11496                         
11497                 if test $have_ssleay = no ; then
11498                         echo $ac_n "checking for SSL_library_init in -lssl""... $ac_c" 1>&6
11499 echo "configure:11500: checking for SSL_library_init in -lssl" >&5
11500 ac_lib_var=`echo ssl'_'SSL_library_init | sed 'y%./+-:%__p__%'`
11501 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11502   echo $ac_n "(cached) $ac_c" 1>&6
11503 else
11504   ac_save_LIBS="$LIBS"
11505 LIBS="-lssl -lcrypto $LIBS"
11506 cat > conftest.$ac_ext <<EOF
11507 #line 11508 "configure"
11508 #include "confdefs.h"
11509 /* Override any gcc2 internal prototype to avoid an error.  */
11510 /* We use char because int might match the return type of a gcc2
11511     builtin and then its argument prototype would still apply.  */
11512 char SSL_library_init();
11513
11514 int main() {
11515 SSL_library_init()
11516 ; return 0; }
11517 EOF
11518 if { (eval echo configure:11519: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11519   rm -rf conftest*
11520   eval "ac_cv_lib_$ac_lib_var=yes"
11521 else
11522   echo "configure: failed program was:" >&5
11523   cat conftest.$ac_ext >&5
11524   rm -rf conftest*
11525   eval "ac_cv_lib_$ac_lib_var=no"
11526 fi
11527 rm -f conftest*
11528 LIBS="$ac_save_LIBS"
11529
11530 fi
11531 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11532   echo "$ac_t""yes" 1>&6
11533   have_ssleay=yes
11534                                 need_rsaref=no
11535 else
11536   echo "$ac_t""no" 1>&6
11537 have_ssleay=no
11538 fi
11539
11540                 fi
11541
11542                 if test $have_ssleay = no ; then
11543                         echo $ac_n "checking for ssl3_accept in -lssl""... $ac_c" 1>&6
11544 echo "configure:11545: checking for ssl3_accept in -lssl" >&5
11545 ac_lib_var=`echo ssl'_'ssl3_accept | sed 'y%./+-:%__p__%'`
11546 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11547   echo $ac_n "(cached) $ac_c" 1>&6
11548 else
11549   ac_save_LIBS="$LIBS"
11550 LIBS="-lssl -lcrypto -lRSAglue -lrsaref $LIBS"
11551 cat > conftest.$ac_ext <<EOF
11552 #line 11553 "configure"
11553 #include "confdefs.h"
11554 /* Override any gcc2 internal prototype to avoid an error.  */
11555 /* We use char because int might match the return type of a gcc2
11556     builtin and then its argument prototype would still apply.  */
11557 char ssl3_accept();
11558
11559 int main() {
11560 ssl3_accept()
11561 ; return 0; }
11562 EOF
11563 if { (eval echo configure:11564: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11564   rm -rf conftest*
11565   eval "ac_cv_lib_$ac_lib_var=yes"
11566 else
11567   echo "configure: failed program was:" >&5
11568   cat conftest.$ac_ext >&5
11569   rm -rf conftest*
11570   eval "ac_cv_lib_$ac_lib_var=no"
11571 fi
11572 rm -f conftest*
11573 LIBS="$ac_save_LIBS"
11574
11575 fi
11576 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11577   echo "$ac_t""yes" 1>&6
11578   have_ssleay=yes
11579                                 need_rsaref=yes
11580 else
11581   echo "$ac_t""no" 1>&6
11582 have_ssleay=no
11583 fi
11584
11585                 fi
11586
11587                 if test $have_ssleay = yes ; then
11588                         ol_with_tls=found
11589                         ol_link_tls=yes
11590
11591                         cat >> confdefs.h <<\EOF
11592 #define HAVE_SSLEAY 1
11593 EOF
11594
11595
11596                         if test $need_rsaref = yes; then
11597                                 cat >> confdefs.h <<\EOF
11598 #define HAVE_RSAREF 1
11599 EOF
11600
11601
11602                                 TLS_LIBS="-lssl -lcrypto -lRSAglue -lrsaref"
11603                         else
11604                                 TLS_LIBS="-lssl -lcrypto"
11605                         fi
11606                 fi
11607                 echo $ac_n "checking OpenSSL library version (CRL checking capability)""... $ac_c" 1>&6
11608 echo "configure:11609: checking OpenSSL library version (CRL checking capability)" >&5
11609 if eval "test \"\${ol_cv_ssl_crl_compat+set}\" = set"; then
11610   echo $ac_n "(cached) $ac_c" 1>&6
11611 else
11612   
11613         cat > conftest.$ac_ext <<EOF
11614 #line 11615 "configure"
11615 #include "confdefs.h"
11616
11617 #ifdef HAVE_OPENSSL_SSL_H
11618 #include <openssl/ssl.h>
11619 #else
11620 #include <ssl.h>
11621 #endif
11622
11623 /* Require 0.9.7d+ */
11624 #if OPENSSL_VERSION_NUMBER >= 0x0090704fL
11625         char *__ssl_compat = "0.9.7d";
11626 #endif
11627         
11628 EOF
11629 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11630   egrep "__ssl_compat" >/dev/null 2>&1; then
11631   rm -rf conftest*
11632   ol_cv_ssl_crl_compat=yes
11633 else
11634   rm -rf conftest*
11635   ol_cv_ssl_crl_compat=no
11636 fi
11637 rm -f conftest*
11638
11639 fi
11640
11641 echo "$ac_t""$ol_cv_ssl_crl_compat" 1>&6
11642
11643                 if test $ol_cv_ssl_crl_compat = no ; then
11644                         ol_link_ssl=no
11645                 else 
11646                         cat >> confdefs.h <<\EOF
11647 #define HAVE_OPENSSL_CRL 1
11648 EOF
11649
11650                 fi
11651         fi
11652
11653 else
11654         echo "configure: warning: TLS data protection not supported!" 1>&2
11655 fi
11656
11657 WITH_TLS=no
11658 if test $ol_link_tls = yes ; then
11659         cat >> confdefs.h <<\EOF
11660 #define HAVE_TLS 1
11661 EOF
11662
11663         WITH_TLS=yes
11664
11665 elif test $ol_with_tls = auto ; then
11666         echo "configure: warning: Could not locate TLS/SSL package" 1>&2
11667         echo "configure: warning: TLS data protection not supported!" 1>&2
11668
11669 elif test $ol_with_tls != no ; then
11670         { echo "configure: error: Could not locate TLS/SSL package" 1>&2; exit 1; }
11671 fi
11672
11673 if test $ol_enable_lmpasswd != no; then
11674         if test $ol_link_tls != yes ; then
11675                 { echo "configure: error: LAN Manager passwords require OpenSSL" 1>&2; exit 1; }
11676         fi
11677
11678         cat >> confdefs.h <<\EOF
11679 #define SLAPD_LMHASH 1
11680 EOF
11681
11682 fi
11683
11684 ol_link_threads=no
11685
11686 if test $ol_with_threads = auto -o $ol_with_threads = yes \
11687         -o $ol_with_threads = nt ; then
11688
11689         
11690         echo $ac_n "checking for _beginthread""... $ac_c" 1>&6
11691 echo "configure:11692: checking for _beginthread" >&5
11692 if eval "test \"\${ac_cv_func__beginthread+set}\" = set"; then
11693   echo $ac_n "(cached) $ac_c" 1>&6
11694 else
11695   cat > conftest.$ac_ext <<EOF
11696 #line 11697 "configure"
11697 #include "confdefs.h"
11698 /* System header to define __stub macros and hopefully few prototypes,
11699     which can conflict with char _beginthread(); below.  */
11700 #include <assert.h>
11701 /* Override any gcc2 internal prototype to avoid an error.  */
11702 /* We use char because int might match the return type of a gcc2
11703     builtin and then its argument prototype would still apply.  */
11704 char _beginthread();
11705 char (*f)();
11706
11707 int main() {
11708
11709 /* The GNU C library defines this for functions which it implements
11710     to always fail with ENOSYS.  Some functions are actually named
11711     something starting with __ and the normal name is an alias.  */
11712 #if defined (__stub__beginthread) || defined (__stub____beginthread)
11713 choke me
11714 #else
11715 f = _beginthread;
11716 #endif
11717
11718 ; return 0; }
11719 EOF
11720 if { (eval echo configure:11721: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11721   rm -rf conftest*
11722   eval "ac_cv_func__beginthread=yes"
11723 else
11724   echo "configure: failed program was:" >&5
11725   cat conftest.$ac_ext >&5
11726   rm -rf conftest*
11727   eval "ac_cv_func__beginthread=no"
11728 fi
11729 rm -f conftest*
11730 fi
11731
11732 if eval "test \"`echo '$ac_cv_func_'_beginthread`\" = yes"; then
11733   echo "$ac_t""yes" 1>&6
11734   :
11735 else
11736   echo "$ac_t""no" 1>&6
11737 fi
11738
11739
11740         if test $ac_cv_func__beginthread = yes ; then
11741                 cat >> confdefs.h <<\EOF
11742 #define HAVE_NT_THREADS 1
11743 EOF
11744
11745                 ol_cv_nt_threads=yes
11746         fi
11747
11748
11749         if test "$ol_cv_nt_threads" = yes ; then
11750                 ol_link_threads=nt
11751                 ol_with_threads=found
11752                 ol_with_yielding_select=yes
11753
11754                 cat >> confdefs.h <<\EOF
11755 #define HAVE_NT_SERVICE_MANAGER 1
11756 EOF
11757
11758                 cat >> confdefs.h <<\EOF
11759 #define HAVE_NT_EVENT_LOG 1
11760 EOF
11761
11762         fi
11763
11764         if test $ol_with_threads = nt ; then
11765                 { echo "configure: error: could not locate NT Threads" 1>&2; exit 1; }
11766         fi
11767 fi
11768
11769 if test $ol_with_threads = auto -o $ol_with_threads = yes \
11770         -o $ol_with_threads = posix ; then
11771
11772         for ac_hdr in pthread.h
11773 do
11774 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11775 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11776 echo "configure:11777: checking for $ac_hdr" >&5
11777 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11778   echo $ac_n "(cached) $ac_c" 1>&6
11779 else
11780   cat > conftest.$ac_ext <<EOF
11781 #line 11782 "configure"
11782 #include "confdefs.h"
11783 #include <$ac_hdr>
11784 EOF
11785 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11786 { (eval echo configure:11787: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11787 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11788 if test -z "$ac_err"; then
11789   rm -rf conftest*
11790   eval "ac_cv_header_$ac_safe=yes"
11791 else
11792   echo "$ac_err" >&5
11793   echo "configure: failed program was:" >&5
11794   cat conftest.$ac_ext >&5
11795   rm -rf conftest*
11796   eval "ac_cv_header_$ac_safe=no"
11797 fi
11798 rm -f conftest*
11799 fi
11800 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11801   echo "$ac_t""yes" 1>&6
11802     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11803   cat >> confdefs.h <<EOF
11804 #define $ac_tr_hdr 1
11805 EOF
11806  
11807 else
11808   echo "$ac_t""no" 1>&6
11809 fi
11810 done
11811
11812
11813         if test $ac_cv_header_pthread_h = yes ; then
11814                 echo $ac_n "checking POSIX thread version""... $ac_c" 1>&6
11815 echo "configure:11816: checking POSIX thread version" >&5
11816 if eval "test \"\${ol_cv_pthread_version+set}\" = set"; then
11817   echo $ac_n "(cached) $ac_c" 1>&6
11818 else
11819   
11820         cat > conftest.$ac_ext <<EOF
11821 #line 11822 "configure"
11822 #include "confdefs.h"
11823
11824 #               include <pthread.h>
11825         
11826 int main() {
11827
11828                 int i = PTHREAD_CREATE_JOINABLE;
11829         
11830 ; return 0; }
11831 EOF
11832 if { (eval echo configure:11833: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11833   rm -rf conftest*
11834   
11835         cat > conftest.$ac_ext <<EOF
11836 #line 11837 "configure"
11837 #include "confdefs.h"
11838 #include <pthread.h>
11839 EOF
11840 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11841   egrep "pthread_detach" >/dev/null 2>&1; then
11842   rm -rf conftest*
11843   ol_cv_pthread_version=10
11844 else
11845   rm -rf conftest*
11846   ol_cv_pthread_version=8
11847 fi
11848 rm -f conftest*
11849
11850 else
11851   echo "configure: failed program was:" >&5
11852   cat conftest.$ac_ext >&5
11853   rm -rf conftest*
11854   
11855         cat > conftest.$ac_ext <<EOF
11856 #line 11857 "configure"
11857 #include "confdefs.h"
11858
11859 #               include <pthread.h>
11860 #               ifdef PTHREAD_CREATE_UNDETACHED
11861                 draft7
11862 #               endif
11863         
11864 EOF
11865 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11866   egrep "draft7" >/dev/null 2>&1; then
11867   rm -rf conftest*
11868   ol_cv_pthread_version=7
11869 else
11870   rm -rf conftest*
11871   
11872         cat > conftest.$ac_ext <<EOF
11873 #line 11874 "configure"
11874 #include "confdefs.h"
11875 #include <pthread.h>
11876 EOF
11877 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11878   egrep "pthread_attr_init" >/dev/null 2>&1; then
11879   rm -rf conftest*
11880   ol_cv_pthread_version=6
11881 else
11882   rm -rf conftest*
11883   
11884         cat > conftest.$ac_ext <<EOF
11885 #line 11886 "configure"
11886 #include "confdefs.h"
11887
11888 #               include <pthread.h>
11889 #ifdef          PTHREAD_MUTEX_INITIALIZER
11890                 draft5
11891 #endif
11892         
11893 EOF
11894 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11895   egrep "draft5" >/dev/null 2>&1; then
11896   rm -rf conftest*
11897   ol_cv_pthread_version=5
11898 else
11899   rm -rf conftest*
11900   ol_cv_pthread_version=4
11901 fi
11902 rm -f conftest*
11903  
11904 fi
11905 rm -f conftest*
11906  
11907 fi
11908 rm -f conftest*
11909  
11910 fi
11911 rm -f conftest*
11912
11913 fi
11914
11915 echo "$ac_t""$ol_cv_pthread_version" 1>&6
11916
11917
11918                 if test $ol_cv_pthread_version != 0 ; then
11919                         cat >> confdefs.h <<EOF
11920 #define HAVE_PTHREADS $ol_cv_pthread_version
11921 EOF
11922
11923                 else
11924                         { echo "configure: error: unknown pthread version" 1>&2; exit 1; }
11925                 fi
11926
11927                 # consider threads found
11928                 ol_with_threads=found
11929
11930                 
11931         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
11932 echo "configure:11933: checking for LinuxThreads pthread.h" >&5
11933 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
11934   echo $ac_n "(cached) $ac_c" 1>&6
11935 else
11936   cat > conftest.$ac_ext <<EOF
11937 #line 11938 "configure"
11938 #include "confdefs.h"
11939 #include <pthread.h>
11940 EOF
11941 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11942   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
11943   rm -rf conftest*
11944   ol_cv_header_linux_threads=yes
11945 else
11946   rm -rf conftest*
11947   ol_cv_header_linux_threads=no
11948 fi
11949 rm -f conftest*
11950
11951                 
11952 fi
11953
11954 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
11955         if test $ol_cv_header_linux_threads = yes; then
11956                 cat >> confdefs.h <<\EOF
11957 #define HAVE_LINUX_THREADS 1
11958 EOF
11959
11960         fi
11961
11962                 
11963         echo $ac_n "checking for GNU Pth pthread.h""... $ac_c" 1>&6
11964 echo "configure:11965: checking for GNU Pth pthread.h" >&5
11965 if eval "test \"\${ol_cv_header_gnu_pth_pthread_h+set}\" = set"; then
11966   echo $ac_n "(cached) $ac_c" 1>&6
11967 else
11968   cat > conftest.$ac_ext <<EOF
11969 #line 11970 "configure"
11970 #include "confdefs.h"
11971 #include <pthread.h>
11972 #ifdef _POSIX_THREAD_IS_GNU_PTH
11973         __gnu_pth__;
11974 #endif
11975
11976 EOF
11977 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11978   egrep "__gnu_pth__" >/dev/null 2>&1; then
11979   rm -rf conftest*
11980   ol_cv_header_gnu_pth_pthread_h=yes
11981 else
11982   rm -rf conftest*
11983   ol_cv_header_gnu_pth_pthread_h=no
11984 fi
11985 rm -f conftest*
11986
11987                 
11988 fi
11989
11990 echo "$ac_t""$ol_cv_header_gnu_pth_pthread_h" 1>&6
11991
11992
11993                 if test $ol_cv_header_gnu_pth_pthread_h = no ; then
11994                         for ac_hdr in sched.h
11995 do
11996 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11997 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11998 echo "configure:11999: checking for $ac_hdr" >&5
11999 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12000   echo $ac_n "(cached) $ac_c" 1>&6
12001 else
12002   cat > conftest.$ac_ext <<EOF
12003 #line 12004 "configure"
12004 #include "confdefs.h"
12005 #include <$ac_hdr>
12006 EOF
12007 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12008 { (eval echo configure:12009: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12009 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12010 if test -z "$ac_err"; then
12011   rm -rf conftest*
12012   eval "ac_cv_header_$ac_safe=yes"
12013 else
12014   echo "$ac_err" >&5
12015   echo "configure: failed program was:" >&5
12016   cat conftest.$ac_ext >&5
12017   rm -rf conftest*
12018   eval "ac_cv_header_$ac_safe=no"
12019 fi
12020 rm -f conftest*
12021 fi
12022 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12023   echo "$ac_t""yes" 1>&6
12024     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12025   cat >> confdefs.h <<EOF
12026 #define $ac_tr_hdr 1
12027 EOF
12028  
12029 else
12030   echo "$ac_t""no" 1>&6
12031 fi
12032 done
12033
12034                 fi
12035
12036                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
12037                                 echo $ac_n "checking for pthread_create in default libraries""... $ac_c" 1>&6
12038 echo "configure:12039: checking for pthread_create in default libraries" >&5
12039 if eval "test \"\${ol_cv_pthread_create+set}\" = set"; then
12040   echo $ac_n "(cached) $ac_c" 1>&6
12041 else
12042   
12043                 if test "$cross_compiling" = yes; then
12044   cat > conftest.$ac_ext <<EOF
12045 #line 12046 "configure"
12046 #include "confdefs.h"
12047 /* pthread test headers */
12048 #include <pthread.h>
12049 #if HAVE_PTHREADS < 7
12050 #include <errno.h>
12051 #endif
12052 #ifndef NULL
12053 #define NULL (void*)0
12054 #endif
12055
12056 static void *task(p)
12057         void *p;
12058 {
12059         return (void *) (p == NULL);
12060 }
12061
12062 int main() {
12063
12064         /* pthread test function */
12065 #ifndef PTHREAD_CREATE_DETACHED
12066 #define PTHREAD_CREATE_DETACHED 1
12067 #endif
12068         pthread_t t;
12069         int status;
12070         int detach = PTHREAD_CREATE_DETACHED;
12071
12072 #if HAVE_PTHREADS > 4
12073         /* Final pthreads */
12074         pthread_attr_t attr;
12075
12076         status = pthread_attr_init(&attr);
12077         if( status ) return status;
12078
12079 #if HAVE_PTHREADS < 7
12080         status = pthread_attr_setdetachstate(&attr, &detach);
12081         if( status < 0 ) status = errno;
12082 #else
12083         status = pthread_attr_setdetachstate(&attr, detach);
12084 #endif
12085         if( status ) return status;
12086         status = pthread_create( &t, &attr, task, NULL );
12087 #if HAVE_PTHREADS < 7
12088         if( status < 0 ) status = errno;
12089 #endif
12090         if( status ) return status;
12091 #else
12092         /* Draft 4 pthreads */
12093         status = pthread_create( &t, pthread_attr_default, task, NULL );
12094         if( status ) return errno;
12095
12096         /* give thread a chance to complete */
12097         /* it should remain joinable and hence detachable */
12098         sleep( 1 );
12099
12100         status = pthread_detach( &t );
12101         if( status ) return errno;
12102 #endif
12103
12104 #ifdef HAVE_LINUX_THREADS
12105         pthread_kill_other_threads_np();
12106 #endif
12107
12108         return 0;
12109
12110 ; return 0; }
12111 EOF
12112 if { (eval echo configure:12113: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12113   rm -rf conftest*
12114   ol_cv_pthread_create=yes
12115 else
12116   echo "configure: failed program was:" >&5
12117   cat conftest.$ac_ext >&5
12118   rm -rf conftest*
12119   ol_cv_pthread_create=no
12120 fi
12121 rm -f conftest*
12122 else
12123   cat > conftest.$ac_ext <<EOF
12124 #line 12125 "configure"
12125 #include "confdefs.h"
12126 /* pthread test headers */
12127 #include <pthread.h>
12128 #if HAVE_PTHREADS < 7
12129 #include <errno.h>
12130 #endif
12131 #ifndef NULL
12132 #define NULL (void*)0
12133 #endif
12134
12135 static void *task(p)
12136         void *p;
12137 {
12138         return (void *) (p == NULL);
12139 }
12140
12141
12142 int main(argc, argv)
12143         int argc;
12144         char **argv;
12145 {
12146
12147         /* pthread test function */
12148 #ifndef PTHREAD_CREATE_DETACHED
12149 #define PTHREAD_CREATE_DETACHED 1
12150 #endif
12151         pthread_t t;
12152         int status;
12153         int detach = PTHREAD_CREATE_DETACHED;
12154
12155 #if HAVE_PTHREADS > 4
12156         /* Final pthreads */
12157         pthread_attr_t attr;
12158
12159         status = pthread_attr_init(&attr);
12160         if( status ) return status;
12161
12162 #if HAVE_PTHREADS < 7
12163         status = pthread_attr_setdetachstate(&attr, &detach);
12164         if( status < 0 ) status = errno;
12165 #else
12166         status = pthread_attr_setdetachstate(&attr, detach);
12167 #endif
12168         if( status ) return status;
12169         status = pthread_create( &t, &attr, task, NULL );
12170 #if HAVE_PTHREADS < 7
12171         if( status < 0 ) status = errno;
12172 #endif
12173         if( status ) return status;
12174 #else
12175         /* Draft 4 pthreads */
12176         status = pthread_create( &t, pthread_attr_default, task, NULL );
12177         if( status ) return errno;
12178
12179         /* give thread a chance to complete */
12180         /* it should remain joinable and hence detachable */
12181         sleep( 1 );
12182
12183         status = pthread_detach( &t );
12184         if( status ) return errno;
12185 #endif
12186
12187 #ifdef HAVE_LINUX_THREADS
12188         pthread_kill_other_threads_np();
12189 #endif
12190
12191         return 0;
12192
12193 }
12194
12195 EOF
12196 if { (eval echo configure:12197: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
12197 then
12198   ol_cv_pthread_create=yes
12199 else
12200   echo "configure: failed program was:" >&5
12201   cat conftest.$ac_ext >&5
12202   rm -fr conftest*
12203   ol_cv_pthread_create=no
12204 fi
12205 rm -fr conftest*
12206 fi
12207
12208 fi
12209
12210 echo "$ac_t""$ol_cv_pthread_create" 1>&6
12211
12212                 if test $ol_cv_pthread_create != no ; then
12213                         ol_link_threads=posix
12214                         ol_link_pthreads=""
12215                 fi
12216                 
12217                 # Pthread try link: -kthread (ol_cv_pthread_kthread)
12218 if test "$ol_link_threads" = no ; then
12219         # try -kthread
12220         echo $ac_n "checking for pthread link with -kthread""... $ac_c" 1>&6
12221 echo "configure:12222: checking for pthread link with -kthread" >&5
12222 if eval "test \"\${ol_cv_pthread_kthread+set}\" = set"; then
12223   echo $ac_n "(cached) $ac_c" 1>&6
12224 else
12225   
12226                 # save the flags
12227                 ol_LIBS="$LIBS"
12228                 LIBS="-kthread $LIBS"
12229
12230                 if test "$cross_compiling" = yes; then
12231   cat > conftest.$ac_ext <<EOF
12232 #line 12233 "configure"
12233 #include "confdefs.h"
12234 /* pthread test headers */
12235 #include <pthread.h>
12236 #if HAVE_PTHREADS < 7
12237 #include <errno.h>
12238 #endif
12239 #ifndef NULL
12240 #define NULL (void*)0
12241 #endif
12242
12243 static void *task(p)
12244         void *p;
12245 {
12246         return (void *) (p == NULL);
12247 }
12248
12249 int main() {
12250
12251         /* pthread test function */
12252 #ifndef PTHREAD_CREATE_DETACHED
12253 #define PTHREAD_CREATE_DETACHED 1
12254 #endif
12255         pthread_t t;
12256         int status;
12257         int detach = PTHREAD_CREATE_DETACHED;
12258
12259 #if HAVE_PTHREADS > 4
12260         /* Final pthreads */
12261         pthread_attr_t attr;
12262
12263         status = pthread_attr_init(&attr);
12264         if( status ) return status;
12265
12266 #if HAVE_PTHREADS < 7
12267         status = pthread_attr_setdetachstate(&attr, &detach);
12268         if( status < 0 ) status = errno;
12269 #else
12270         status = pthread_attr_setdetachstate(&attr, detach);
12271 #endif
12272         if( status ) return status;
12273         status = pthread_create( &t, &attr, task, NULL );
12274 #if HAVE_PTHREADS < 7
12275         if( status < 0 ) status = errno;
12276 #endif
12277         if( status ) return status;
12278 #else
12279         /* Draft 4 pthreads */
12280         status = pthread_create( &t, pthread_attr_default, task, NULL );
12281         if( status ) return errno;
12282
12283         /* give thread a chance to complete */
12284         /* it should remain joinable and hence detachable */
12285         sleep( 1 );
12286
12287         status = pthread_detach( &t );
12288         if( status ) return errno;
12289 #endif
12290
12291 #ifdef HAVE_LINUX_THREADS
12292         pthread_kill_other_threads_np();
12293 #endif
12294
12295         return 0;
12296
12297 ; return 0; }
12298 EOF
12299 if { (eval echo configure:12300: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12300   rm -rf conftest*
12301   ol_cv_pthread_kthread=yes
12302 else
12303   echo "configure: failed program was:" >&5
12304   cat conftest.$ac_ext >&5
12305   rm -rf conftest*
12306   ol_cv_pthread_kthread=no
12307 fi
12308 rm -f conftest*
12309 else
12310   cat > conftest.$ac_ext <<EOF
12311 #line 12312 "configure"
12312 #include "confdefs.h"
12313 /* pthread test headers */
12314 #include <pthread.h>
12315 #if HAVE_PTHREADS < 7
12316 #include <errno.h>
12317 #endif
12318 #ifndef NULL
12319 #define NULL (void*)0
12320 #endif
12321
12322 static void *task(p)
12323         void *p;
12324 {
12325         return (void *) (p == NULL);
12326 }
12327
12328
12329 int main(argc, argv)
12330         int argc;
12331         char **argv;
12332 {
12333
12334         /* pthread test function */
12335 #ifndef PTHREAD_CREATE_DETACHED
12336 #define PTHREAD_CREATE_DETACHED 1
12337 #endif
12338         pthread_t t;
12339         int status;
12340         int detach = PTHREAD_CREATE_DETACHED;
12341
12342 #if HAVE_PTHREADS > 4
12343         /* Final pthreads */
12344         pthread_attr_t attr;
12345
12346         status = pthread_attr_init(&attr);
12347         if( status ) return status;
12348
12349 #if HAVE_PTHREADS < 7
12350         status = pthread_attr_setdetachstate(&attr, &detach);
12351         if( status < 0 ) status = errno;
12352 #else
12353         status = pthread_attr_setdetachstate(&attr, detach);
12354 #endif
12355         if( status ) return status;
12356         status = pthread_create( &t, &attr, task, NULL );
12357 #if HAVE_PTHREADS < 7
12358         if( status < 0 ) status = errno;
12359 #endif
12360         if( status ) return status;
12361 #else
12362         /* Draft 4 pthreads */
12363         status = pthread_create( &t, pthread_attr_default, task, NULL );
12364         if( status ) return errno;
12365
12366         /* give thread a chance to complete */
12367         /* it should remain joinable and hence detachable */
12368         sleep( 1 );
12369
12370         status = pthread_detach( &t );
12371         if( status ) return errno;
12372 #endif
12373
12374 #ifdef HAVE_LINUX_THREADS
12375         pthread_kill_other_threads_np();
12376 #endif
12377
12378         return 0;
12379
12380 }
12381
12382 EOF
12383 if { (eval echo configure:12384: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
12384 then
12385   ol_cv_pthread_kthread=yes
12386 else
12387   echo "configure: failed program was:" >&5
12388   cat conftest.$ac_ext >&5
12389   rm -fr conftest*
12390   ol_cv_pthread_kthread=no
12391 fi
12392 rm -fr conftest*
12393 fi
12394
12395
12396                 # restore the LIBS
12397                 LIBS="$ol_LIBS"
12398         
12399 fi
12400
12401 echo "$ac_t""$ol_cv_pthread_kthread" 1>&6
12402
12403         if test $ol_cv_pthread_kthread = yes ; then
12404                 ol_link_pthreads="-kthread"
12405                 ol_link_threads=posix
12406         fi
12407 fi
12408
12409                 # Pthread try link: -pthread (ol_cv_pthread_pthread)
12410 if test "$ol_link_threads" = no ; then
12411         # try -pthread
12412         echo $ac_n "checking for pthread link with -pthread""... $ac_c" 1>&6
12413 echo "configure:12414: checking for pthread link with -pthread" >&5
12414 if eval "test \"\${ol_cv_pthread_pthread+set}\" = set"; then
12415   echo $ac_n "(cached) $ac_c" 1>&6
12416 else
12417   
12418                 # save the flags
12419                 ol_LIBS="$LIBS"
12420                 LIBS="-pthread $LIBS"
12421
12422                 if test "$cross_compiling" = yes; then
12423   cat > conftest.$ac_ext <<EOF
12424 #line 12425 "configure"
12425 #include "confdefs.h"
12426 /* pthread test headers */
12427 #include <pthread.h>
12428 #if HAVE_PTHREADS < 7
12429 #include <errno.h>
12430 #endif
12431 #ifndef NULL
12432 #define NULL (void*)0
12433 #endif
12434
12435 static void *task(p)
12436         void *p;
12437 {
12438         return (void *) (p == NULL);
12439 }
12440
12441 int main() {
12442
12443         /* pthread test function */
12444 #ifndef PTHREAD_CREATE_DETACHED
12445 #define PTHREAD_CREATE_DETACHED 1
12446 #endif
12447         pthread_t t;
12448         int status;
12449         int detach = PTHREAD_CREATE_DETACHED;
12450
12451 #if HAVE_PTHREADS > 4
12452         /* Final pthreads */
12453         pthread_attr_t attr;
12454
12455         status = pthread_attr_init(&attr);
12456         if( status ) return status;
12457
12458 #if HAVE_PTHREADS < 7
12459         status = pthread_attr_setdetachstate(&attr, &detach);
12460         if( status < 0 ) status = errno;
12461 #else
12462         status = pthread_attr_setdetachstate(&attr, detach);
12463 #endif
12464         if( status ) return status;
12465         status = pthread_create( &t, &attr, task, NULL );
12466 #if HAVE_PTHREADS < 7
12467         if( status < 0 ) status = errno;
12468 #endif
12469         if( status ) return status;
12470 #else
12471         /* Draft 4 pthreads */
12472         status = pthread_create( &t, pthread_attr_default, task, NULL );
12473         if( status ) return errno;
12474
12475         /* give thread a chance to complete */
12476         /* it should remain joinable and hence detachable */
12477         sleep( 1 );
12478
12479         status = pthread_detach( &t );
12480         if( status ) return errno;
12481 #endif
12482
12483 #ifdef HAVE_LINUX_THREADS
12484         pthread_kill_other_threads_np();
12485 #endif
12486
12487         return 0;
12488
12489 ; return 0; }
12490 EOF
12491 if { (eval echo configure:12492: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12492   rm -rf conftest*
12493   ol_cv_pthread_pthread=yes
12494 else
12495   echo "configure: failed program was:" >&5
12496   cat conftest.$ac_ext >&5
12497   rm -rf conftest*
12498   ol_cv_pthread_pthread=no
12499 fi
12500 rm -f conftest*
12501 else
12502   cat > conftest.$ac_ext <<EOF
12503 #line 12504 "configure"
12504 #include "confdefs.h"
12505 /* pthread test headers */
12506 #include <pthread.h>
12507 #if HAVE_PTHREADS < 7
12508 #include <errno.h>
12509 #endif
12510 #ifndef NULL
12511 #define NULL (void*)0
12512 #endif
12513
12514 static void *task(p)
12515         void *p;
12516 {
12517         return (void *) (p == NULL);
12518 }
12519
12520
12521 int main(argc, argv)
12522         int argc;
12523         char **argv;
12524 {
12525
12526         /* pthread test function */
12527 #ifndef PTHREAD_CREATE_DETACHED
12528 #define PTHREAD_CREATE_DETACHED 1
12529 #endif
12530         pthread_t t;
12531         int status;
12532         int detach = PTHREAD_CREATE_DETACHED;
12533
12534 #if HAVE_PTHREADS > 4
12535         /* Final pthreads */
12536         pthread_attr_t attr;
12537
12538         status = pthread_attr_init(&attr);
12539         if( status ) return status;
12540
12541 #if HAVE_PTHREADS < 7
12542         status = pthread_attr_setdetachstate(&attr, &detach);
12543         if( status < 0 ) status = errno;
12544 #else
12545         status = pthread_attr_setdetachstate(&attr, detach);
12546 #endif
12547         if( status ) return status;
12548         status = pthread_create( &t, &attr, task, NULL );
12549 #if HAVE_PTHREADS < 7
12550         if( status < 0 ) status = errno;
12551 #endif
12552         if( status ) return status;
12553 #else
12554         /* Draft 4 pthreads */
12555         status = pthread_create( &t, pthread_attr_default, task, NULL );
12556         if( status ) return errno;
12557
12558         /* give thread a chance to complete */
12559         /* it should remain joinable and hence detachable */
12560         sleep( 1 );
12561
12562         status = pthread_detach( &t );
12563         if( status ) return errno;
12564 #endif
12565
12566 #ifdef HAVE_LINUX_THREADS
12567         pthread_kill_other_threads_np();
12568 #endif
12569
12570         return 0;
12571
12572 }
12573
12574 EOF
12575 if { (eval echo configure:12576: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
12576 then
12577   ol_cv_pthread_pthread=yes
12578 else
12579   echo "configure: failed program was:" >&5
12580   cat conftest.$ac_ext >&5
12581   rm -fr conftest*
12582   ol_cv_pthread_pthread=no
12583 fi
12584 rm -fr conftest*
12585 fi
12586
12587
12588                 # restore the LIBS
12589                 LIBS="$ol_LIBS"
12590         
12591 fi
12592
12593 echo "$ac_t""$ol_cv_pthread_pthread" 1>&6
12594
12595         if test $ol_cv_pthread_pthread = yes ; then
12596                 ol_link_pthreads="-pthread"
12597                 ol_link_threads=posix
12598         fi
12599 fi
12600
12601                 # Pthread try link: -pthreads (ol_cv_pthread_pthreads)
12602 if test "$ol_link_threads" = no ; then
12603         # try -pthreads
12604         echo $ac_n "checking for pthread link with -pthreads""... $ac_c" 1>&6
12605 echo "configure:12606: checking for pthread link with -pthreads" >&5
12606 if eval "test \"\${ol_cv_pthread_pthreads+set}\" = set"; then
12607   echo $ac_n "(cached) $ac_c" 1>&6
12608 else
12609   
12610                 # save the flags
12611                 ol_LIBS="$LIBS"
12612                 LIBS="-pthreads $LIBS"
12613
12614                 if test "$cross_compiling" = yes; then
12615   cat > conftest.$ac_ext <<EOF
12616 #line 12617 "configure"
12617 #include "confdefs.h"
12618 /* pthread test headers */
12619 #include <pthread.h>
12620 #if HAVE_PTHREADS < 7
12621 #include <errno.h>
12622 #endif
12623 #ifndef NULL
12624 #define NULL (void*)0
12625 #endif
12626
12627 static void *task(p)
12628         void *p;
12629 {
12630         return (void *) (p == NULL);
12631 }
12632
12633 int main() {
12634
12635         /* pthread test function */
12636 #ifndef PTHREAD_CREATE_DETACHED
12637 #define PTHREAD_CREATE_DETACHED 1
12638 #endif
12639         pthread_t t;
12640         int status;
12641         int detach = PTHREAD_CREATE_DETACHED;
12642
12643 #if HAVE_PTHREADS > 4
12644         /* Final pthreads */
12645         pthread_attr_t attr;
12646
12647         status = pthread_attr_init(&attr);
12648         if( status ) return status;
12649
12650 #if HAVE_PTHREADS < 7
12651         status = pthread_attr_setdetachstate(&attr, &detach);
12652         if( status < 0 ) status = errno;
12653 #else
12654         status = pthread_attr_setdetachstate(&attr, detach);
12655 #endif
12656         if( status ) return status;
12657         status = pthread_create( &t, &attr, task, NULL );
12658 #if HAVE_PTHREADS < 7
12659         if( status < 0 ) status = errno;
12660 #endif
12661         if( status ) return status;
12662 #else
12663         /* Draft 4 pthreads */
12664         status = pthread_create( &t, pthread_attr_default, task, NULL );
12665         if( status ) return errno;
12666
12667         /* give thread a chance to complete */
12668         /* it should remain joinable and hence detachable */
12669         sleep( 1 );
12670
12671         status = pthread_detach( &t );
12672         if( status ) return errno;
12673 #endif
12674
12675 #ifdef HAVE_LINUX_THREADS
12676         pthread_kill_other_threads_np();
12677 #endif
12678
12679         return 0;
12680
12681 ; return 0; }
12682 EOF
12683 if { (eval echo configure:12684: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12684   rm -rf conftest*
12685   ol_cv_pthread_pthreads=yes
12686 else
12687   echo "configure: failed program was:" >&5
12688   cat conftest.$ac_ext >&5
12689   rm -rf conftest*
12690   ol_cv_pthread_pthreads=no
12691 fi
12692 rm -f conftest*
12693 else
12694   cat > conftest.$ac_ext <<EOF
12695 #line 12696 "configure"
12696 #include "confdefs.h"
12697 /* pthread test headers */
12698 #include <pthread.h>
12699 #if HAVE_PTHREADS < 7
12700 #include <errno.h>
12701 #endif
12702 #ifndef NULL
12703 #define NULL (void*)0
12704 #endif
12705
12706 static void *task(p)
12707         void *p;
12708 {
12709         return (void *) (p == NULL);
12710 }
12711
12712
12713 int main(argc, argv)
12714         int argc;
12715         char **argv;
12716 {
12717
12718         /* pthread test function */
12719 #ifndef PTHREAD_CREATE_DETACHED
12720 #define PTHREAD_CREATE_DETACHED 1
12721 #endif
12722         pthread_t t;
12723         int status;
12724         int detach = PTHREAD_CREATE_DETACHED;
12725
12726 #if HAVE_PTHREADS > 4
12727         /* Final pthreads */
12728         pthread_attr_t attr;
12729
12730         status = pthread_attr_init(&attr);
12731         if( status ) return status;
12732
12733 #if HAVE_PTHREADS < 7
12734         status = pthread_attr_setdetachstate(&attr, &detach);
12735         if( status < 0 ) status = errno;
12736 #else
12737         status = pthread_attr_setdetachstate(&attr, detach);
12738 #endif
12739         if( status ) return status;
12740         status = pthread_create( &t, &attr, task, NULL );
12741 #if HAVE_PTHREADS < 7
12742         if( status < 0 ) status = errno;
12743 #endif
12744         if( status ) return status;
12745 #else
12746         /* Draft 4 pthreads */
12747         status = pthread_create( &t, pthread_attr_default, task, NULL );
12748         if( status ) return errno;
12749
12750         /* give thread a chance to complete */
12751         /* it should remain joinable and hence detachable */
12752         sleep( 1 );
12753
12754         status = pthread_detach( &t );
12755         if( status ) return errno;
12756 #endif
12757
12758 #ifdef HAVE_LINUX_THREADS
12759         pthread_kill_other_threads_np();
12760 #endif
12761
12762         return 0;
12763
12764 }
12765
12766 EOF
12767 if { (eval echo configure:12768: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
12768 then
12769   ol_cv_pthread_pthreads=yes
12770 else
12771   echo "configure: failed program was:" >&5
12772   cat conftest.$ac_ext >&5
12773   rm -fr conftest*
12774   ol_cv_pthread_pthreads=no
12775 fi
12776 rm -fr conftest*
12777 fi
12778
12779
12780                 # restore the LIBS
12781                 LIBS="$ol_LIBS"
12782         
12783 fi
12784
12785 echo "$ac_t""$ol_cv_pthread_pthreads" 1>&6
12786
12787         if test $ol_cv_pthread_pthreads = yes ; then
12788                 ol_link_pthreads="-pthreads"
12789                 ol_link_threads=posix
12790         fi
12791 fi
12792
12793                 # Pthread try link: -mthreads (ol_cv_pthread_mthreads)
12794 if test "$ol_link_threads" = no ; then
12795         # try -mthreads
12796         echo $ac_n "checking for pthread link with -mthreads""... $ac_c" 1>&6
12797 echo "configure:12798: checking for pthread link with -mthreads" >&5
12798 if eval "test \"\${ol_cv_pthread_mthreads+set}\" = set"; then
12799   echo $ac_n "(cached) $ac_c" 1>&6
12800 else
12801   
12802                 # save the flags
12803                 ol_LIBS="$LIBS"
12804                 LIBS="-mthreads $LIBS"
12805
12806                 if test "$cross_compiling" = yes; then
12807   cat > conftest.$ac_ext <<EOF
12808 #line 12809 "configure"
12809 #include "confdefs.h"
12810 /* pthread test headers */
12811 #include <pthread.h>
12812 #if HAVE_PTHREADS < 7
12813 #include <errno.h>
12814 #endif
12815 #ifndef NULL
12816 #define NULL (void*)0
12817 #endif
12818
12819 static void *task(p)
12820         void *p;
12821 {
12822         return (void *) (p == NULL);
12823 }
12824
12825 int main() {
12826
12827         /* pthread test function */
12828 #ifndef PTHREAD_CREATE_DETACHED
12829 #define PTHREAD_CREATE_DETACHED 1
12830 #endif
12831         pthread_t t;
12832         int status;
12833         int detach = PTHREAD_CREATE_DETACHED;
12834
12835 #if HAVE_PTHREADS > 4
12836         /* Final pthreads */
12837         pthread_attr_t attr;
12838
12839         status = pthread_attr_init(&attr);
12840         if( status ) return status;
12841
12842 #if HAVE_PTHREADS < 7
12843         status = pthread_attr_setdetachstate(&attr, &detach);
12844         if( status < 0 ) status = errno;
12845 #else
12846         status = pthread_attr_setdetachstate(&attr, detach);
12847 #endif
12848         if( status ) return status;
12849         status = pthread_create( &t, &attr, task, NULL );
12850 #if HAVE_PTHREADS < 7
12851         if( status < 0 ) status = errno;
12852 #endif
12853         if( status ) return status;
12854 #else
12855         /* Draft 4 pthreads */
12856         status = pthread_create( &t, pthread_attr_default, task, NULL );
12857         if( status ) return errno;
12858
12859         /* give thread a chance to complete */
12860         /* it should remain joinable and hence detachable */
12861         sleep( 1 );
12862
12863         status = pthread_detach( &t );
12864         if( status ) return errno;
12865 #endif
12866
12867 #ifdef HAVE_LINUX_THREADS
12868         pthread_kill_other_threads_np();
12869 #endif
12870
12871         return 0;
12872
12873 ; return 0; }
12874 EOF
12875 if { (eval echo configure:12876: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12876   rm -rf conftest*
12877   ol_cv_pthread_mthreads=yes
12878 else
12879   echo "configure: failed program was:" >&5
12880   cat conftest.$ac_ext >&5
12881   rm -rf conftest*
12882   ol_cv_pthread_mthreads=no
12883 fi
12884 rm -f conftest*
12885 else
12886   cat > conftest.$ac_ext <<EOF
12887 #line 12888 "configure"
12888 #include "confdefs.h"
12889 /* pthread test headers */
12890 #include <pthread.h>
12891 #if HAVE_PTHREADS < 7
12892 #include <errno.h>
12893 #endif
12894 #ifndef NULL
12895 #define NULL (void*)0
12896 #endif
12897
12898 static void *task(p)
12899         void *p;
12900 {
12901         return (void *) (p == NULL);
12902 }
12903
12904
12905 int main(argc, argv)
12906         int argc;
12907         char **argv;
12908 {
12909
12910         /* pthread test function */
12911 #ifndef PTHREAD_CREATE_DETACHED
12912 #define PTHREAD_CREATE_DETACHED 1
12913 #endif
12914         pthread_t t;
12915         int status;
12916         int detach = PTHREAD_CREATE_DETACHED;
12917
12918 #if HAVE_PTHREADS > 4
12919         /* Final pthreads */
12920         pthread_attr_t attr;
12921
12922         status = pthread_attr_init(&attr);
12923         if( status ) return status;
12924
12925 #if HAVE_PTHREADS < 7
12926         status = pthread_attr_setdetachstate(&attr, &detach);
12927         if( status < 0 ) status = errno;
12928 #else
12929         status = pthread_attr_setdetachstate(&attr, detach);
12930 #endif
12931         if( status ) return status;
12932         status = pthread_create( &t, &attr, task, NULL );
12933 #if HAVE_PTHREADS < 7
12934         if( status < 0 ) status = errno;
12935 #endif
12936         if( status ) return status;
12937 #else
12938         /* Draft 4 pthreads */
12939         status = pthread_create( &t, pthread_attr_default, task, NULL );
12940         if( status ) return errno;
12941
12942         /* give thread a chance to complete */
12943         /* it should remain joinable and hence detachable */
12944         sleep( 1 );
12945
12946         status = pthread_detach( &t );
12947         if( status ) return errno;
12948 #endif
12949
12950 #ifdef HAVE_LINUX_THREADS
12951         pthread_kill_other_threads_np();
12952 #endif
12953
12954         return 0;
12955
12956 }
12957
12958 EOF
12959 if { (eval echo configure:12960: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
12960 then
12961   ol_cv_pthread_mthreads=yes
12962 else
12963   echo "configure: failed program was:" >&5
12964   cat conftest.$ac_ext >&5
12965   rm -fr conftest*
12966   ol_cv_pthread_mthreads=no
12967 fi
12968 rm -fr conftest*
12969 fi
12970
12971
12972                 # restore the LIBS
12973                 LIBS="$ol_LIBS"
12974         
12975 fi
12976
12977 echo "$ac_t""$ol_cv_pthread_mthreads" 1>&6
12978
12979         if test $ol_cv_pthread_mthreads = yes ; then
12980                 ol_link_pthreads="-mthreads"
12981                 ol_link_threads=posix
12982         fi
12983 fi
12984
12985                 # Pthread try link: -thread (ol_cv_pthread_thread)
12986 if test "$ol_link_threads" = no ; then
12987         # try -thread
12988         echo $ac_n "checking for pthread link with -thread""... $ac_c" 1>&6
12989 echo "configure:12990: checking for pthread link with -thread" >&5
12990 if eval "test \"\${ol_cv_pthread_thread+set}\" = set"; then
12991   echo $ac_n "(cached) $ac_c" 1>&6
12992 else
12993   
12994                 # save the flags
12995                 ol_LIBS="$LIBS"
12996                 LIBS="-thread $LIBS"
12997
12998                 if test "$cross_compiling" = yes; then
12999   cat > conftest.$ac_ext <<EOF
13000 #line 13001 "configure"
13001 #include "confdefs.h"
13002 /* pthread test headers */
13003 #include <pthread.h>
13004 #if HAVE_PTHREADS < 7
13005 #include <errno.h>
13006 #endif
13007 #ifndef NULL
13008 #define NULL (void*)0
13009 #endif
13010
13011 static void *task(p)
13012         void *p;
13013 {
13014         return (void *) (p == NULL);
13015 }
13016
13017 int main() {
13018
13019         /* pthread test function */
13020 #ifndef PTHREAD_CREATE_DETACHED
13021 #define PTHREAD_CREATE_DETACHED 1
13022 #endif
13023         pthread_t t;
13024         int status;
13025         int detach = PTHREAD_CREATE_DETACHED;
13026
13027 #if HAVE_PTHREADS > 4
13028         /* Final pthreads */
13029         pthread_attr_t attr;
13030
13031         status = pthread_attr_init(&attr);
13032         if( status ) return status;
13033
13034 #if HAVE_PTHREADS < 7
13035         status = pthread_attr_setdetachstate(&attr, &detach);
13036         if( status < 0 ) status = errno;
13037 #else
13038         status = pthread_attr_setdetachstate(&attr, detach);
13039 #endif
13040         if( status ) return status;
13041         status = pthread_create( &t, &attr, task, NULL );
13042 #if HAVE_PTHREADS < 7
13043         if( status < 0 ) status = errno;
13044 #endif
13045         if( status ) return status;
13046 #else
13047         /* Draft 4 pthreads */
13048         status = pthread_create( &t, pthread_attr_default, task, NULL );
13049         if( status ) return errno;
13050
13051         /* give thread a chance to complete */
13052         /* it should remain joinable and hence detachable */
13053         sleep( 1 );
13054
13055         status = pthread_detach( &t );
13056         if( status ) return errno;
13057 #endif
13058
13059 #ifdef HAVE_LINUX_THREADS
13060         pthread_kill_other_threads_np();
13061 #endif
13062
13063         return 0;
13064
13065 ; return 0; }
13066 EOF
13067 if { (eval echo configure:13068: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13068   rm -rf conftest*
13069   ol_cv_pthread_thread=yes
13070 else
13071   echo "configure: failed program was:" >&5
13072   cat conftest.$ac_ext >&5
13073   rm -rf conftest*
13074   ol_cv_pthread_thread=no
13075 fi
13076 rm -f conftest*
13077 else
13078   cat > conftest.$ac_ext <<EOF
13079 #line 13080 "configure"
13080 #include "confdefs.h"
13081 /* pthread test headers */
13082 #include <pthread.h>
13083 #if HAVE_PTHREADS < 7
13084 #include <errno.h>
13085 #endif
13086 #ifndef NULL
13087 #define NULL (void*)0
13088 #endif
13089
13090 static void *task(p)
13091         void *p;
13092 {
13093         return (void *) (p == NULL);
13094 }
13095
13096
13097 int main(argc, argv)
13098         int argc;
13099         char **argv;
13100 {
13101
13102         /* pthread test function */
13103 #ifndef PTHREAD_CREATE_DETACHED
13104 #define PTHREAD_CREATE_DETACHED 1
13105 #endif
13106         pthread_t t;
13107         int status;
13108         int detach = PTHREAD_CREATE_DETACHED;
13109
13110 #if HAVE_PTHREADS > 4
13111         /* Final pthreads */
13112         pthread_attr_t attr;
13113
13114         status = pthread_attr_init(&attr);
13115         if( status ) return status;
13116
13117 #if HAVE_PTHREADS < 7
13118         status = pthread_attr_setdetachstate(&attr, &detach);
13119         if( status < 0 ) status = errno;
13120 #else
13121         status = pthread_attr_setdetachstate(&attr, detach);
13122 #endif
13123         if( status ) return status;
13124         status = pthread_create( &t, &attr, task, NULL );
13125 #if HAVE_PTHREADS < 7
13126         if( status < 0 ) status = errno;
13127 #endif
13128         if( status ) return status;
13129 #else
13130         /* Draft 4 pthreads */
13131         status = pthread_create( &t, pthread_attr_default, task, NULL );
13132         if( status ) return errno;
13133
13134         /* give thread a chance to complete */
13135         /* it should remain joinable and hence detachable */
13136         sleep( 1 );
13137
13138         status = pthread_detach( &t );
13139         if( status ) return errno;
13140 #endif
13141
13142 #ifdef HAVE_LINUX_THREADS
13143         pthread_kill_other_threads_np();
13144 #endif
13145
13146         return 0;
13147
13148 }
13149
13150 EOF
13151 if { (eval echo configure:13152: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
13152 then
13153   ol_cv_pthread_thread=yes
13154 else
13155   echo "configure: failed program was:" >&5
13156   cat conftest.$ac_ext >&5
13157   rm -fr conftest*
13158   ol_cv_pthread_thread=no
13159 fi
13160 rm -fr conftest*
13161 fi
13162
13163
13164                 # restore the LIBS
13165                 LIBS="$ol_LIBS"
13166         
13167 fi
13168
13169 echo "$ac_t""$ol_cv_pthread_thread" 1>&6
13170
13171         if test $ol_cv_pthread_thread = yes ; then
13172                 ol_link_pthreads="-thread"
13173                 ol_link_threads=posix
13174         fi
13175 fi
13176
13177
13178                 # Pthread try link: -lpthread -lmach -lexc -lc_r (ol_cv_pthread_lpthread_lmach_lexc_lc_r)
13179 if test "$ol_link_threads" = no ; then
13180         # try -lpthread -lmach -lexc -lc_r
13181         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc -lc_r""... $ac_c" 1>&6
13182 echo "configure:13183: checking for pthread link with -lpthread -lmach -lexc -lc_r" >&5
13183 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc_lc_r+set}\" = set"; then
13184   echo $ac_n "(cached) $ac_c" 1>&6
13185 else
13186   
13187                 # save the flags
13188                 ol_LIBS="$LIBS"
13189                 LIBS="-lpthread -lmach -lexc -lc_r $LIBS"
13190
13191                 if test "$cross_compiling" = yes; then
13192   cat > conftest.$ac_ext <<EOF
13193 #line 13194 "configure"
13194 #include "confdefs.h"
13195 /* pthread test headers */
13196 #include <pthread.h>
13197 #if HAVE_PTHREADS < 7
13198 #include <errno.h>
13199 #endif
13200 #ifndef NULL
13201 #define NULL (void*)0
13202 #endif
13203
13204 static void *task(p)
13205         void *p;
13206 {
13207         return (void *) (p == NULL);
13208 }
13209
13210 int main() {
13211
13212         /* pthread test function */
13213 #ifndef PTHREAD_CREATE_DETACHED
13214 #define PTHREAD_CREATE_DETACHED 1
13215 #endif
13216         pthread_t t;
13217         int status;
13218         int detach = PTHREAD_CREATE_DETACHED;
13219
13220 #if HAVE_PTHREADS > 4
13221         /* Final pthreads */
13222         pthread_attr_t attr;
13223
13224         status = pthread_attr_init(&attr);
13225         if( status ) return status;
13226
13227 #if HAVE_PTHREADS < 7
13228         status = pthread_attr_setdetachstate(&attr, &detach);
13229         if( status < 0 ) status = errno;
13230 #else
13231         status = pthread_attr_setdetachstate(&attr, detach);
13232 #endif
13233         if( status ) return status;
13234         status = pthread_create( &t, &attr, task, NULL );
13235 #if HAVE_PTHREADS < 7
13236         if( status < 0 ) status = errno;
13237 #endif
13238         if( status ) return status;
13239 #else
13240         /* Draft 4 pthreads */
13241         status = pthread_create( &t, pthread_attr_default, task, NULL );
13242         if( status ) return errno;
13243
13244         /* give thread a chance to complete */
13245         /* it should remain joinable and hence detachable */
13246         sleep( 1 );
13247
13248         status = pthread_detach( &t );
13249         if( status ) return errno;
13250 #endif
13251
13252 #ifdef HAVE_LINUX_THREADS
13253         pthread_kill_other_threads_np();
13254 #endif
13255
13256         return 0;
13257
13258 ; return 0; }
13259 EOF
13260 if { (eval echo configure:13261: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13261   rm -rf conftest*
13262   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
13263 else
13264   echo "configure: failed program was:" >&5
13265   cat conftest.$ac_ext >&5
13266   rm -rf conftest*
13267   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
13268 fi
13269 rm -f conftest*
13270 else
13271   cat > conftest.$ac_ext <<EOF
13272 #line 13273 "configure"
13273 #include "confdefs.h"
13274 /* pthread test headers */
13275 #include <pthread.h>
13276 #if HAVE_PTHREADS < 7
13277 #include <errno.h>
13278 #endif
13279 #ifndef NULL
13280 #define NULL (void*)0
13281 #endif
13282
13283 static void *task(p)
13284         void *p;
13285 {
13286         return (void *) (p == NULL);
13287 }
13288
13289
13290 int main(argc, argv)
13291         int argc;
13292         char **argv;
13293 {
13294
13295         /* pthread test function */
13296 #ifndef PTHREAD_CREATE_DETACHED
13297 #define PTHREAD_CREATE_DETACHED 1
13298 #endif
13299         pthread_t t;
13300         int status;
13301         int detach = PTHREAD_CREATE_DETACHED;
13302
13303 #if HAVE_PTHREADS > 4
13304         /* Final pthreads */
13305         pthread_attr_t attr;
13306
13307         status = pthread_attr_init(&attr);
13308         if( status ) return status;
13309
13310 #if HAVE_PTHREADS < 7
13311         status = pthread_attr_setdetachstate(&attr, &detach);
13312         if( status < 0 ) status = errno;
13313 #else
13314         status = pthread_attr_setdetachstate(&attr, detach);
13315 #endif
13316         if( status ) return status;
13317         status = pthread_create( &t, &attr, task, NULL );
13318 #if HAVE_PTHREADS < 7
13319         if( status < 0 ) status = errno;
13320 #endif
13321         if( status ) return status;
13322 #else
13323         /* Draft 4 pthreads */
13324         status = pthread_create( &t, pthread_attr_default, task, NULL );
13325         if( status ) return errno;
13326
13327         /* give thread a chance to complete */
13328         /* it should remain joinable and hence detachable */
13329         sleep( 1 );
13330
13331         status = pthread_detach( &t );
13332         if( status ) return errno;
13333 #endif
13334
13335 #ifdef HAVE_LINUX_THREADS
13336         pthread_kill_other_threads_np();
13337 #endif
13338
13339         return 0;
13340
13341 }
13342
13343 EOF
13344 if { (eval echo configure:13345: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
13345 then
13346   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
13347 else
13348   echo "configure: failed program was:" >&5
13349   cat conftest.$ac_ext >&5
13350   rm -fr conftest*
13351   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
13352 fi
13353 rm -fr conftest*
13354 fi
13355
13356
13357                 # restore the LIBS
13358                 LIBS="$ol_LIBS"
13359         
13360 fi
13361
13362 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc_lc_r" 1>&6
13363
13364         if test $ol_cv_pthread_lpthread_lmach_lexc_lc_r = yes ; then
13365                 ol_link_pthreads="-lpthread -lmach -lexc -lc_r"
13366                 ol_link_threads=posix
13367         fi
13368 fi
13369
13370                 # Pthread try link: -lpthread -lmach -lexc (ol_cv_pthread_lpthread_lmach_lexc)
13371 if test "$ol_link_threads" = no ; then
13372         # try -lpthread -lmach -lexc
13373         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc""... $ac_c" 1>&6
13374 echo "configure:13375: checking for pthread link with -lpthread -lmach -lexc" >&5
13375 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc+set}\" = set"; then
13376   echo $ac_n "(cached) $ac_c" 1>&6
13377 else
13378   
13379                 # save the flags
13380                 ol_LIBS="$LIBS"
13381                 LIBS="-lpthread -lmach -lexc $LIBS"
13382
13383                 if test "$cross_compiling" = yes; then
13384   cat > conftest.$ac_ext <<EOF
13385 #line 13386 "configure"
13386 #include "confdefs.h"
13387 /* pthread test headers */
13388 #include <pthread.h>
13389 #if HAVE_PTHREADS < 7
13390 #include <errno.h>
13391 #endif
13392 #ifndef NULL
13393 #define NULL (void*)0
13394 #endif
13395
13396 static void *task(p)
13397         void *p;
13398 {
13399         return (void *) (p == NULL);
13400 }
13401
13402 int main() {
13403
13404         /* pthread test function */
13405 #ifndef PTHREAD_CREATE_DETACHED
13406 #define PTHREAD_CREATE_DETACHED 1
13407 #endif
13408         pthread_t t;
13409         int status;
13410         int detach = PTHREAD_CREATE_DETACHED;
13411
13412 #if HAVE_PTHREADS > 4
13413         /* Final pthreads */
13414         pthread_attr_t attr;
13415
13416         status = pthread_attr_init(&attr);
13417         if( status ) return status;
13418
13419 #if HAVE_PTHREADS < 7
13420         status = pthread_attr_setdetachstate(&attr, &detach);
13421         if( status < 0 ) status = errno;
13422 #else
13423         status = pthread_attr_setdetachstate(&attr, detach);
13424 #endif
13425         if( status ) return status;
13426         status = pthread_create( &t, &attr, task, NULL );
13427 #if HAVE_PTHREADS < 7
13428         if( status < 0 ) status = errno;
13429 #endif
13430         if( status ) return status;
13431 #else
13432         /* Draft 4 pthreads */
13433         status = pthread_create( &t, pthread_attr_default, task, NULL );
13434         if( status ) return errno;
13435
13436         /* give thread a chance to complete */
13437         /* it should remain joinable and hence detachable */
13438         sleep( 1 );
13439
13440         status = pthread_detach( &t );
13441         if( status ) return errno;
13442 #endif
13443
13444 #ifdef HAVE_LINUX_THREADS
13445         pthread_kill_other_threads_np();
13446 #endif
13447
13448         return 0;
13449
13450 ; return 0; }
13451 EOF
13452 if { (eval echo configure:13453: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13453   rm -rf conftest*
13454   ol_cv_pthread_lpthread_lmach_lexc=yes
13455 else
13456   echo "configure: failed program was:" >&5
13457   cat conftest.$ac_ext >&5
13458   rm -rf conftest*
13459   ol_cv_pthread_lpthread_lmach_lexc=no
13460 fi
13461 rm -f conftest*
13462 else
13463   cat > conftest.$ac_ext <<EOF
13464 #line 13465 "configure"
13465 #include "confdefs.h"
13466 /* pthread test headers */
13467 #include <pthread.h>
13468 #if HAVE_PTHREADS < 7
13469 #include <errno.h>
13470 #endif
13471 #ifndef NULL
13472 #define NULL (void*)0
13473 #endif
13474
13475 static void *task(p)
13476         void *p;
13477 {
13478         return (void *) (p == NULL);
13479 }
13480
13481
13482 int main(argc, argv)
13483         int argc;
13484         char **argv;
13485 {
13486
13487         /* pthread test function */
13488 #ifndef PTHREAD_CREATE_DETACHED
13489 #define PTHREAD_CREATE_DETACHED 1
13490 #endif
13491         pthread_t t;
13492         int status;
13493         int detach = PTHREAD_CREATE_DETACHED;
13494
13495 #if HAVE_PTHREADS > 4
13496         /* Final pthreads */
13497         pthread_attr_t attr;
13498
13499         status = pthread_attr_init(&attr);
13500         if( status ) return status;
13501
13502 #if HAVE_PTHREADS < 7
13503         status = pthread_attr_setdetachstate(&attr, &detach);
13504         if( status < 0 ) status = errno;
13505 #else
13506         status = pthread_attr_setdetachstate(&attr, detach);
13507 #endif
13508         if( status ) return status;
13509         status = pthread_create( &t, &attr, task, NULL );
13510 #if HAVE_PTHREADS < 7
13511         if( status < 0 ) status = errno;
13512 #endif
13513         if( status ) return status;
13514 #else
13515         /* Draft 4 pthreads */
13516         status = pthread_create( &t, pthread_attr_default, task, NULL );
13517         if( status ) return errno;
13518
13519         /* give thread a chance to complete */
13520         /* it should remain joinable and hence detachable */
13521         sleep( 1 );
13522
13523         status = pthread_detach( &t );
13524         if( status ) return errno;
13525 #endif
13526
13527 #ifdef HAVE_LINUX_THREADS
13528         pthread_kill_other_threads_np();
13529 #endif
13530
13531         return 0;
13532
13533 }
13534
13535 EOF
13536 if { (eval echo configure:13537: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
13537 then
13538   ol_cv_pthread_lpthread_lmach_lexc=yes
13539 else
13540   echo "configure: failed program was:" >&5
13541   cat conftest.$ac_ext >&5
13542   rm -fr conftest*
13543   ol_cv_pthread_lpthread_lmach_lexc=no
13544 fi
13545 rm -fr conftest*
13546 fi
13547
13548
13549                 # restore the LIBS
13550                 LIBS="$ol_LIBS"
13551         
13552 fi
13553
13554 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc" 1>&6
13555
13556         if test $ol_cv_pthread_lpthread_lmach_lexc = yes ; then
13557                 ol_link_pthreads="-lpthread -lmach -lexc"
13558                 ol_link_threads=posix
13559         fi
13560 fi
13561
13562
13563                 # Pthread try link: -lpthread -Wl,-woff,85 (ol_cv_pthread_lib_lpthread_woff)
13564 if test "$ol_link_threads" = no ; then
13565         # try -lpthread -Wl,-woff,85
13566         echo $ac_n "checking for pthread link with -lpthread -Wl,-woff,85""... $ac_c" 1>&6
13567 echo "configure:13568: checking for pthread link with -lpthread -Wl,-woff,85" >&5
13568 if eval "test \"\${ol_cv_pthread_lib_lpthread_woff+set}\" = set"; then
13569   echo $ac_n "(cached) $ac_c" 1>&6
13570 else
13571   
13572                 # save the flags
13573                 ol_LIBS="$LIBS"
13574                 LIBS="-lpthread -Wl,-woff,85 $LIBS"
13575
13576                 if test "$cross_compiling" = yes; then
13577   cat > conftest.$ac_ext <<EOF
13578 #line 13579 "configure"
13579 #include "confdefs.h"
13580 /* pthread test headers */
13581 #include <pthread.h>
13582 #if HAVE_PTHREADS < 7
13583 #include <errno.h>
13584 #endif
13585 #ifndef NULL
13586 #define NULL (void*)0
13587 #endif
13588
13589 static void *task(p)
13590         void *p;
13591 {
13592         return (void *) (p == NULL);
13593 }
13594
13595 int main() {
13596
13597         /* pthread test function */
13598 #ifndef PTHREAD_CREATE_DETACHED
13599 #define PTHREAD_CREATE_DETACHED 1
13600 #endif
13601         pthread_t t;
13602         int status;
13603         int detach = PTHREAD_CREATE_DETACHED;
13604
13605 #if HAVE_PTHREADS > 4
13606         /* Final pthreads */
13607         pthread_attr_t attr;
13608
13609         status = pthread_attr_init(&attr);
13610         if( status ) return status;
13611
13612 #if HAVE_PTHREADS < 7
13613         status = pthread_attr_setdetachstate(&attr, &detach);
13614         if( status < 0 ) status = errno;
13615 #else
13616         status = pthread_attr_setdetachstate(&attr, detach);
13617 #endif
13618         if( status ) return status;
13619         status = pthread_create( &t, &attr, task, NULL );
13620 #if HAVE_PTHREADS < 7
13621         if( status < 0 ) status = errno;
13622 #endif
13623         if( status ) return status;
13624 #else
13625         /* Draft 4 pthreads */
13626         status = pthread_create( &t, pthread_attr_default, task, NULL );
13627         if( status ) return errno;
13628
13629         /* give thread a chance to complete */
13630         /* it should remain joinable and hence detachable */
13631         sleep( 1 );
13632
13633         status = pthread_detach( &t );
13634         if( status ) return errno;
13635 #endif
13636
13637 #ifdef HAVE_LINUX_THREADS
13638         pthread_kill_other_threads_np();
13639 #endif
13640
13641         return 0;
13642
13643 ; return 0; }
13644 EOF
13645 if { (eval echo configure:13646: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13646   rm -rf conftest*
13647   ol_cv_pthread_lib_lpthread_woff=yes
13648 else
13649   echo "configure: failed program was:" >&5
13650   cat conftest.$ac_ext >&5
13651   rm -rf conftest*
13652   ol_cv_pthread_lib_lpthread_woff=no
13653 fi
13654 rm -f conftest*
13655 else
13656   cat > conftest.$ac_ext <<EOF
13657 #line 13658 "configure"
13658 #include "confdefs.h"
13659 /* pthread test headers */
13660 #include <pthread.h>
13661 #if HAVE_PTHREADS < 7
13662 #include <errno.h>
13663 #endif
13664 #ifndef NULL
13665 #define NULL (void*)0
13666 #endif
13667
13668 static void *task(p)
13669         void *p;
13670 {
13671         return (void *) (p == NULL);
13672 }
13673
13674
13675 int main(argc, argv)
13676         int argc;
13677         char **argv;
13678 {
13679
13680         /* pthread test function */
13681 #ifndef PTHREAD_CREATE_DETACHED
13682 #define PTHREAD_CREATE_DETACHED 1
13683 #endif
13684         pthread_t t;
13685         int status;
13686         int detach = PTHREAD_CREATE_DETACHED;
13687
13688 #if HAVE_PTHREADS > 4
13689         /* Final pthreads */
13690         pthread_attr_t attr;
13691
13692         status = pthread_attr_init(&attr);
13693         if( status ) return status;
13694
13695 #if HAVE_PTHREADS < 7
13696         status = pthread_attr_setdetachstate(&attr, &detach);
13697         if( status < 0 ) status = errno;
13698 #else
13699         status = pthread_attr_setdetachstate(&attr, detach);
13700 #endif
13701         if( status ) return status;
13702         status = pthread_create( &t, &attr, task, NULL );
13703 #if HAVE_PTHREADS < 7
13704         if( status < 0 ) status = errno;
13705 #endif
13706         if( status ) return status;
13707 #else
13708         /* Draft 4 pthreads */
13709         status = pthread_create( &t, pthread_attr_default, task, NULL );
13710         if( status ) return errno;
13711
13712         /* give thread a chance to complete */
13713         /* it should remain joinable and hence detachable */
13714         sleep( 1 );
13715
13716         status = pthread_detach( &t );
13717         if( status ) return errno;
13718 #endif
13719
13720 #ifdef HAVE_LINUX_THREADS
13721         pthread_kill_other_threads_np();
13722 #endif
13723
13724         return 0;
13725
13726 }
13727
13728 EOF
13729 if { (eval echo configure:13730: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
13730 then
13731   ol_cv_pthread_lib_lpthread_woff=yes
13732 else
13733   echo "configure: failed program was:" >&5
13734   cat conftest.$ac_ext >&5
13735   rm -fr conftest*
13736   ol_cv_pthread_lib_lpthread_woff=no
13737 fi
13738 rm -fr conftest*
13739 fi
13740
13741
13742                 # restore the LIBS
13743                 LIBS="$ol_LIBS"
13744         
13745 fi
13746
13747 echo "$ac_t""$ol_cv_pthread_lib_lpthread_woff" 1>&6
13748
13749         if test $ol_cv_pthread_lib_lpthread_woff = yes ; then
13750                 ol_link_pthreads="-lpthread -Wl,-woff,85"
13751                 ol_link_threads=posix
13752         fi
13753 fi
13754
13755
13756                 # Pthread try link: -lpthread (ol_cv_pthread_lpthread)
13757 if test "$ol_link_threads" = no ; then
13758         # try -lpthread
13759         echo $ac_n "checking for pthread link with -lpthread""... $ac_c" 1>&6
13760 echo "configure:13761: checking for pthread link with -lpthread" >&5
13761 if eval "test \"\${ol_cv_pthread_lpthread+set}\" = set"; then
13762   echo $ac_n "(cached) $ac_c" 1>&6
13763 else
13764   
13765                 # save the flags
13766                 ol_LIBS="$LIBS"
13767                 LIBS="-lpthread $LIBS"
13768
13769                 if test "$cross_compiling" = yes; then
13770   cat > conftest.$ac_ext <<EOF
13771 #line 13772 "configure"
13772 #include "confdefs.h"
13773 /* pthread test headers */
13774 #include <pthread.h>
13775 #if HAVE_PTHREADS < 7
13776 #include <errno.h>
13777 #endif
13778 #ifndef NULL
13779 #define NULL (void*)0
13780 #endif
13781
13782 static void *task(p)
13783         void *p;
13784 {
13785         return (void *) (p == NULL);
13786 }
13787
13788 int main() {
13789
13790         /* pthread test function */
13791 #ifndef PTHREAD_CREATE_DETACHED
13792 #define PTHREAD_CREATE_DETACHED 1
13793 #endif
13794         pthread_t t;
13795         int status;
13796         int detach = PTHREAD_CREATE_DETACHED;
13797
13798 #if HAVE_PTHREADS > 4
13799         /* Final pthreads */
13800         pthread_attr_t attr;
13801
13802         status = pthread_attr_init(&attr);
13803         if( status ) return status;
13804
13805 #if HAVE_PTHREADS < 7
13806         status = pthread_attr_setdetachstate(&attr, &detach);
13807         if( status < 0 ) status = errno;
13808 #else
13809         status = pthread_attr_setdetachstate(&attr, detach);
13810 #endif
13811         if( status ) return status;
13812         status = pthread_create( &t, &attr, task, NULL );
13813 #if HAVE_PTHREADS < 7
13814         if( status < 0 ) status = errno;
13815 #endif
13816         if( status ) return status;
13817 #else
13818         /* Draft 4 pthreads */
13819         status = pthread_create( &t, pthread_attr_default, task, NULL );
13820         if( status ) return errno;
13821
13822         /* give thread a chance to complete */
13823         /* it should remain joinable and hence detachable */
13824         sleep( 1 );
13825
13826         status = pthread_detach( &t );
13827         if( status ) return errno;
13828 #endif
13829
13830 #ifdef HAVE_LINUX_THREADS
13831         pthread_kill_other_threads_np();
13832 #endif
13833
13834         return 0;
13835
13836 ; return 0; }
13837 EOF
13838 if { (eval echo configure:13839: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13839   rm -rf conftest*
13840   ol_cv_pthread_lpthread=yes
13841 else
13842   echo "configure: failed program was:" >&5
13843   cat conftest.$ac_ext >&5
13844   rm -rf conftest*
13845   ol_cv_pthread_lpthread=no
13846 fi
13847 rm -f conftest*
13848 else
13849   cat > conftest.$ac_ext <<EOF
13850 #line 13851 "configure"
13851 #include "confdefs.h"
13852 /* pthread test headers */
13853 #include <pthread.h>
13854 #if HAVE_PTHREADS < 7
13855 #include <errno.h>
13856 #endif
13857 #ifndef NULL
13858 #define NULL (void*)0
13859 #endif
13860
13861 static void *task(p)
13862         void *p;
13863 {
13864         return (void *) (p == NULL);
13865 }
13866
13867
13868 int main(argc, argv)
13869         int argc;
13870         char **argv;
13871 {
13872
13873         /* pthread test function */
13874 #ifndef PTHREAD_CREATE_DETACHED
13875 #define PTHREAD_CREATE_DETACHED 1
13876 #endif
13877         pthread_t t;
13878         int status;
13879         int detach = PTHREAD_CREATE_DETACHED;
13880
13881 #if HAVE_PTHREADS > 4
13882         /* Final pthreads */
13883         pthread_attr_t attr;
13884
13885         status = pthread_attr_init(&attr);
13886         if( status ) return status;
13887
13888 #if HAVE_PTHREADS < 7
13889         status = pthread_attr_setdetachstate(&attr, &detach);
13890         if( status < 0 ) status = errno;
13891 #else
13892         status = pthread_attr_setdetachstate(&attr, detach);
13893 #endif
13894         if( status ) return status;
13895         status = pthread_create( &t, &attr, task, NULL );
13896 #if HAVE_PTHREADS < 7
13897         if( status < 0 ) status = errno;
13898 #endif
13899         if( status ) return status;
13900 #else
13901         /* Draft 4 pthreads */
13902         status = pthread_create( &t, pthread_attr_default, task, NULL );
13903         if( status ) return errno;
13904
13905         /* give thread a chance to complete */
13906         /* it should remain joinable and hence detachable */
13907         sleep( 1 );
13908
13909         status = pthread_detach( &t );
13910         if( status ) return errno;
13911 #endif
13912
13913 #ifdef HAVE_LINUX_THREADS
13914         pthread_kill_other_threads_np();
13915 #endif
13916
13917         return 0;
13918
13919 }
13920
13921 EOF
13922 if { (eval echo configure:13923: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
13923 then
13924   ol_cv_pthread_lpthread=yes
13925 else
13926   echo "configure: failed program was:" >&5
13927   cat conftest.$ac_ext >&5
13928   rm -fr conftest*
13929   ol_cv_pthread_lpthread=no
13930 fi
13931 rm -fr conftest*
13932 fi
13933
13934
13935                 # restore the LIBS
13936                 LIBS="$ol_LIBS"
13937         
13938 fi
13939
13940 echo "$ac_t""$ol_cv_pthread_lpthread" 1>&6
13941
13942         if test $ol_cv_pthread_lpthread = yes ; then
13943                 ol_link_pthreads="-lpthread"
13944                 ol_link_threads=posix
13945         fi
13946 fi
13947
13948                 # Pthread try link: -lc_r (ol_cv_pthread_lc_r)
13949 if test "$ol_link_threads" = no ; then
13950         # try -lc_r
13951         echo $ac_n "checking for pthread link with -lc_r""... $ac_c" 1>&6
13952 echo "configure:13953: checking for pthread link with -lc_r" >&5
13953 if eval "test \"\${ol_cv_pthread_lc_r+set}\" = set"; then
13954   echo $ac_n "(cached) $ac_c" 1>&6
13955 else
13956   
13957                 # save the flags
13958                 ol_LIBS="$LIBS"
13959                 LIBS="-lc_r $LIBS"
13960
13961                 if test "$cross_compiling" = yes; then
13962   cat > conftest.$ac_ext <<EOF
13963 #line 13964 "configure"
13964 #include "confdefs.h"
13965 /* pthread test headers */
13966 #include <pthread.h>
13967 #if HAVE_PTHREADS < 7
13968 #include <errno.h>
13969 #endif
13970 #ifndef NULL
13971 #define NULL (void*)0
13972 #endif
13973
13974 static void *task(p)
13975         void *p;
13976 {
13977         return (void *) (p == NULL);
13978 }
13979
13980 int main() {
13981
13982         /* pthread test function */
13983 #ifndef PTHREAD_CREATE_DETACHED
13984 #define PTHREAD_CREATE_DETACHED 1
13985 #endif
13986         pthread_t t;
13987         int status;
13988         int detach = PTHREAD_CREATE_DETACHED;
13989
13990 #if HAVE_PTHREADS > 4
13991         /* Final pthreads */
13992         pthread_attr_t attr;
13993
13994         status = pthread_attr_init(&attr);
13995         if( status ) return status;
13996
13997 #if HAVE_PTHREADS < 7
13998         status = pthread_attr_setdetachstate(&attr, &detach);
13999         if( status < 0 ) status = errno;
14000 #else
14001         status = pthread_attr_setdetachstate(&attr, detach);
14002 #endif
14003         if( status ) return status;
14004         status = pthread_create( &t, &attr, task, NULL );
14005 #if HAVE_PTHREADS < 7
14006         if( status < 0 ) status = errno;
14007 #endif
14008         if( status ) return status;
14009 #else
14010         /* Draft 4 pthreads */
14011         status = pthread_create( &t, pthread_attr_default, task, NULL );
14012         if( status ) return errno;
14013
14014         /* give thread a chance to complete */
14015         /* it should remain joinable and hence detachable */
14016         sleep( 1 );
14017
14018         status = pthread_detach( &t );
14019         if( status ) return errno;
14020 #endif
14021
14022 #ifdef HAVE_LINUX_THREADS
14023         pthread_kill_other_threads_np();
14024 #endif
14025
14026         return 0;
14027
14028 ; return 0; }
14029 EOF
14030 if { (eval echo configure:14031: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14031   rm -rf conftest*
14032   ol_cv_pthread_lc_r=yes
14033 else
14034   echo "configure: failed program was:" >&5
14035   cat conftest.$ac_ext >&5
14036   rm -rf conftest*
14037   ol_cv_pthread_lc_r=no
14038 fi
14039 rm -f conftest*
14040 else
14041   cat > conftest.$ac_ext <<EOF
14042 #line 14043 "configure"
14043 #include "confdefs.h"
14044 /* pthread test headers */
14045 #include <pthread.h>
14046 #if HAVE_PTHREADS < 7
14047 #include <errno.h>
14048 #endif
14049 #ifndef NULL
14050 #define NULL (void*)0
14051 #endif
14052
14053 static void *task(p)
14054         void *p;
14055 {
14056         return (void *) (p == NULL);
14057 }
14058
14059
14060 int main(argc, argv)
14061         int argc;
14062         char **argv;
14063 {
14064
14065         /* pthread test function */
14066 #ifndef PTHREAD_CREATE_DETACHED
14067 #define PTHREAD_CREATE_DETACHED 1
14068 #endif
14069         pthread_t t;
14070         int status;
14071         int detach = PTHREAD_CREATE_DETACHED;
14072
14073 #if HAVE_PTHREADS > 4
14074         /* Final pthreads */
14075         pthread_attr_t attr;
14076
14077         status = pthread_attr_init(&attr);
14078         if( status ) return status;
14079
14080 #if HAVE_PTHREADS < 7
14081         status = pthread_attr_setdetachstate(&attr, &detach);
14082         if( status < 0 ) status = errno;
14083 #else
14084         status = pthread_attr_setdetachstate(&attr, detach);
14085 #endif
14086         if( status ) return status;
14087         status = pthread_create( &t, &attr, task, NULL );
14088 #if HAVE_PTHREADS < 7
14089         if( status < 0 ) status = errno;
14090 #endif
14091         if( status ) return status;
14092 #else
14093         /* Draft 4 pthreads */
14094         status = pthread_create( &t, pthread_attr_default, task, NULL );
14095         if( status ) return errno;
14096
14097         /* give thread a chance to complete */
14098         /* it should remain joinable and hence detachable */
14099         sleep( 1 );
14100
14101         status = pthread_detach( &t );
14102         if( status ) return errno;
14103 #endif
14104
14105 #ifdef HAVE_LINUX_THREADS
14106         pthread_kill_other_threads_np();
14107 #endif
14108
14109         return 0;
14110
14111 }
14112
14113 EOF
14114 if { (eval echo configure:14115: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
14115 then
14116   ol_cv_pthread_lc_r=yes
14117 else
14118   echo "configure: failed program was:" >&5
14119   cat conftest.$ac_ext >&5
14120   rm -fr conftest*
14121   ol_cv_pthread_lc_r=no
14122 fi
14123 rm -fr conftest*
14124 fi
14125
14126
14127                 # restore the LIBS
14128                 LIBS="$ol_LIBS"
14129         
14130 fi
14131
14132 echo "$ac_t""$ol_cv_pthread_lc_r" 1>&6
14133
14134         if test $ol_cv_pthread_lc_r = yes ; then
14135                 ol_link_pthreads="-lc_r"
14136                 ol_link_threads=posix
14137         fi
14138 fi
14139
14140
14141                 # Pthread try link: -threads (ol_cv_pthread_threads)
14142 if test "$ol_link_threads" = no ; then
14143         # try -threads
14144         echo $ac_n "checking for pthread link with -threads""... $ac_c" 1>&6
14145 echo "configure:14146: checking for pthread link with -threads" >&5
14146 if eval "test \"\${ol_cv_pthread_threads+set}\" = set"; then
14147   echo $ac_n "(cached) $ac_c" 1>&6
14148 else
14149   
14150                 # save the flags
14151                 ol_LIBS="$LIBS"
14152                 LIBS="-threads $LIBS"
14153
14154                 if test "$cross_compiling" = yes; then
14155   cat > conftest.$ac_ext <<EOF
14156 #line 14157 "configure"
14157 #include "confdefs.h"
14158 /* pthread test headers */
14159 #include <pthread.h>
14160 #if HAVE_PTHREADS < 7
14161 #include <errno.h>
14162 #endif
14163 #ifndef NULL
14164 #define NULL (void*)0
14165 #endif
14166
14167 static void *task(p)
14168         void *p;
14169 {
14170         return (void *) (p == NULL);
14171 }
14172
14173 int main() {
14174
14175         /* pthread test function */
14176 #ifndef PTHREAD_CREATE_DETACHED
14177 #define PTHREAD_CREATE_DETACHED 1
14178 #endif
14179         pthread_t t;
14180         int status;
14181         int detach = PTHREAD_CREATE_DETACHED;
14182
14183 #if HAVE_PTHREADS > 4
14184         /* Final pthreads */
14185         pthread_attr_t attr;
14186
14187         status = pthread_attr_init(&attr);
14188         if( status ) return status;
14189
14190 #if HAVE_PTHREADS < 7
14191         status = pthread_attr_setdetachstate(&attr, &detach);
14192         if( status < 0 ) status = errno;
14193 #else
14194         status = pthread_attr_setdetachstate(&attr, detach);
14195 #endif
14196         if( status ) return status;
14197         status = pthread_create( &t, &attr, task, NULL );
14198 #if HAVE_PTHREADS < 7
14199         if( status < 0 ) status = errno;
14200 #endif
14201         if( status ) return status;
14202 #else
14203         /* Draft 4 pthreads */
14204         status = pthread_create( &t, pthread_attr_default, task, NULL );
14205         if( status ) return errno;
14206
14207         /* give thread a chance to complete */
14208         /* it should remain joinable and hence detachable */
14209         sleep( 1 );
14210
14211         status = pthread_detach( &t );
14212         if( status ) return errno;
14213 #endif
14214
14215 #ifdef HAVE_LINUX_THREADS
14216         pthread_kill_other_threads_np();
14217 #endif
14218
14219         return 0;
14220
14221 ; return 0; }
14222 EOF
14223 if { (eval echo configure:14224: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14224   rm -rf conftest*
14225   ol_cv_pthread_threads=yes
14226 else
14227   echo "configure: failed program was:" >&5
14228   cat conftest.$ac_ext >&5
14229   rm -rf conftest*
14230   ol_cv_pthread_threads=no
14231 fi
14232 rm -f conftest*
14233 else
14234   cat > conftest.$ac_ext <<EOF
14235 #line 14236 "configure"
14236 #include "confdefs.h"
14237 /* pthread test headers */
14238 #include <pthread.h>
14239 #if HAVE_PTHREADS < 7
14240 #include <errno.h>
14241 #endif
14242 #ifndef NULL
14243 #define NULL (void*)0
14244 #endif
14245
14246 static void *task(p)
14247         void *p;
14248 {
14249         return (void *) (p == NULL);
14250 }
14251
14252
14253 int main(argc, argv)
14254         int argc;
14255         char **argv;
14256 {
14257
14258         /* pthread test function */
14259 #ifndef PTHREAD_CREATE_DETACHED
14260 #define PTHREAD_CREATE_DETACHED 1
14261 #endif
14262         pthread_t t;
14263         int status;
14264         int detach = PTHREAD_CREATE_DETACHED;
14265
14266 #if HAVE_PTHREADS > 4
14267         /* Final pthreads */
14268         pthread_attr_t attr;
14269
14270         status = pthread_attr_init(&attr);
14271         if( status ) return status;
14272
14273 #if HAVE_PTHREADS < 7
14274         status = pthread_attr_setdetachstate(&attr, &detach);
14275         if( status < 0 ) status = errno;
14276 #else
14277         status = pthread_attr_setdetachstate(&attr, detach);
14278 #endif
14279         if( status ) return status;
14280         status = pthread_create( &t, &attr, task, NULL );
14281 #if HAVE_PTHREADS < 7
14282         if( status < 0 ) status = errno;
14283 #endif
14284         if( status ) return status;
14285 #else
14286         /* Draft 4 pthreads */
14287         status = pthread_create( &t, pthread_attr_default, task, NULL );
14288         if( status ) return errno;
14289
14290         /* give thread a chance to complete */
14291         /* it should remain joinable and hence detachable */
14292         sleep( 1 );
14293
14294         status = pthread_detach( &t );
14295         if( status ) return errno;
14296 #endif
14297
14298 #ifdef HAVE_LINUX_THREADS
14299         pthread_kill_other_threads_np();
14300 #endif
14301
14302         return 0;
14303
14304 }
14305
14306 EOF
14307 if { (eval echo configure:14308: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
14308 then
14309   ol_cv_pthread_threads=yes
14310 else
14311   echo "configure: failed program was:" >&5
14312   cat conftest.$ac_ext >&5
14313   rm -fr conftest*
14314   ol_cv_pthread_threads=no
14315 fi
14316 rm -fr conftest*
14317 fi
14318
14319
14320                 # restore the LIBS
14321                 LIBS="$ol_LIBS"
14322         
14323 fi
14324
14325 echo "$ac_t""$ol_cv_pthread_threads" 1>&6
14326
14327         if test $ol_cv_pthread_threads = yes ; then
14328                 ol_link_pthreads="-threads"
14329                 ol_link_threads=posix
14330         fi
14331 fi
14332
14333
14334                 # Pthread try link: -lpthreads -lmach -lexc -lc_r (ol_cv_pthread_lpthreads_lmach_lexc_lc_r)
14335 if test "$ol_link_threads" = no ; then
14336         # try -lpthreads -lmach -lexc -lc_r
14337         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc -lc_r""... $ac_c" 1>&6
14338 echo "configure:14339: checking for pthread link with -lpthreads -lmach -lexc -lc_r" >&5
14339 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc_lc_r+set}\" = set"; then
14340   echo $ac_n "(cached) $ac_c" 1>&6
14341 else
14342   
14343                 # save the flags
14344                 ol_LIBS="$LIBS"
14345                 LIBS="-lpthreads -lmach -lexc -lc_r $LIBS"
14346
14347                 if test "$cross_compiling" = yes; then
14348   cat > conftest.$ac_ext <<EOF
14349 #line 14350 "configure"
14350 #include "confdefs.h"
14351 /* pthread test headers */
14352 #include <pthread.h>
14353 #if HAVE_PTHREADS < 7
14354 #include <errno.h>
14355 #endif
14356 #ifndef NULL
14357 #define NULL (void*)0
14358 #endif
14359
14360 static void *task(p)
14361         void *p;
14362 {
14363         return (void *) (p == NULL);
14364 }
14365
14366 int main() {
14367
14368         /* pthread test function */
14369 #ifndef PTHREAD_CREATE_DETACHED
14370 #define PTHREAD_CREATE_DETACHED 1
14371 #endif
14372         pthread_t t;
14373         int status;
14374         int detach = PTHREAD_CREATE_DETACHED;
14375
14376 #if HAVE_PTHREADS > 4
14377         /* Final pthreads */
14378         pthread_attr_t attr;
14379
14380         status = pthread_attr_init(&attr);
14381         if( status ) return status;
14382
14383 #if HAVE_PTHREADS < 7
14384         status = pthread_attr_setdetachstate(&attr, &detach);
14385         if( status < 0 ) status = errno;
14386 #else
14387         status = pthread_attr_setdetachstate(&attr, detach);
14388 #endif
14389         if( status ) return status;
14390         status = pthread_create( &t, &attr, task, NULL );
14391 #if HAVE_PTHREADS < 7
14392         if( status < 0 ) status = errno;
14393 #endif
14394         if( status ) return status;
14395 #else
14396         /* Draft 4 pthreads */
14397         status = pthread_create( &t, pthread_attr_default, task, NULL );
14398         if( status ) return errno;
14399
14400         /* give thread a chance to complete */
14401         /* it should remain joinable and hence detachable */
14402         sleep( 1 );
14403
14404         status = pthread_detach( &t );
14405         if( status ) return errno;
14406 #endif
14407
14408 #ifdef HAVE_LINUX_THREADS
14409         pthread_kill_other_threads_np();
14410 #endif
14411
14412         return 0;
14413
14414 ; return 0; }
14415 EOF
14416 if { (eval echo configure:14417: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14417   rm -rf conftest*
14418   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
14419 else
14420   echo "configure: failed program was:" >&5
14421   cat conftest.$ac_ext >&5
14422   rm -rf conftest*
14423   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
14424 fi
14425 rm -f conftest*
14426 else
14427   cat > conftest.$ac_ext <<EOF
14428 #line 14429 "configure"
14429 #include "confdefs.h"
14430 /* pthread test headers */
14431 #include <pthread.h>
14432 #if HAVE_PTHREADS < 7
14433 #include <errno.h>
14434 #endif
14435 #ifndef NULL
14436 #define NULL (void*)0
14437 #endif
14438
14439 static void *task(p)
14440         void *p;
14441 {
14442         return (void *) (p == NULL);
14443 }
14444
14445
14446 int main(argc, argv)
14447         int argc;
14448         char **argv;
14449 {
14450
14451         /* pthread test function */
14452 #ifndef PTHREAD_CREATE_DETACHED
14453 #define PTHREAD_CREATE_DETACHED 1
14454 #endif
14455         pthread_t t;
14456         int status;
14457         int detach = PTHREAD_CREATE_DETACHED;
14458
14459 #if HAVE_PTHREADS > 4
14460         /* Final pthreads */
14461         pthread_attr_t attr;
14462
14463         status = pthread_attr_init(&attr);
14464         if( status ) return status;
14465
14466 #if HAVE_PTHREADS < 7
14467         status = pthread_attr_setdetachstate(&attr, &detach);
14468         if( status < 0 ) status = errno;
14469 #else
14470         status = pthread_attr_setdetachstate(&attr, detach);
14471 #endif
14472         if( status ) return status;
14473         status = pthread_create( &t, &attr, task, NULL );
14474 #if HAVE_PTHREADS < 7
14475         if( status < 0 ) status = errno;
14476 #endif
14477         if( status ) return status;
14478 #else
14479         /* Draft 4 pthreads */
14480         status = pthread_create( &t, pthread_attr_default, task, NULL );
14481         if( status ) return errno;
14482
14483         /* give thread a chance to complete */
14484         /* it should remain joinable and hence detachable */
14485         sleep( 1 );
14486
14487         status = pthread_detach( &t );
14488         if( status ) return errno;
14489 #endif
14490
14491 #ifdef HAVE_LINUX_THREADS
14492         pthread_kill_other_threads_np();
14493 #endif
14494
14495         return 0;
14496
14497 }
14498
14499 EOF
14500 if { (eval echo configure:14501: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
14501 then
14502   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
14503 else
14504   echo "configure: failed program was:" >&5
14505   cat conftest.$ac_ext >&5
14506   rm -fr conftest*
14507   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
14508 fi
14509 rm -fr conftest*
14510 fi
14511
14512
14513                 # restore the LIBS
14514                 LIBS="$ol_LIBS"
14515         
14516 fi
14517
14518 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc_lc_r" 1>&6
14519
14520         if test $ol_cv_pthread_lpthreads_lmach_lexc_lc_r = yes ; then
14521                 ol_link_pthreads="-lpthreads -lmach -lexc -lc_r"
14522                 ol_link_threads=posix
14523         fi
14524 fi
14525
14526                 # Pthread try link: -lpthreads -lmach -lexc (ol_cv_pthread_lpthreads_lmach_lexc)
14527 if test "$ol_link_threads" = no ; then
14528         # try -lpthreads -lmach -lexc
14529         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc""... $ac_c" 1>&6
14530 echo "configure:14531: checking for pthread link with -lpthreads -lmach -lexc" >&5
14531 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc+set}\" = set"; then
14532   echo $ac_n "(cached) $ac_c" 1>&6
14533 else
14534   
14535                 # save the flags
14536                 ol_LIBS="$LIBS"
14537                 LIBS="-lpthreads -lmach -lexc $LIBS"
14538
14539                 if test "$cross_compiling" = yes; then
14540   cat > conftest.$ac_ext <<EOF
14541 #line 14542 "configure"
14542 #include "confdefs.h"
14543 /* pthread test headers */
14544 #include <pthread.h>
14545 #if HAVE_PTHREADS < 7
14546 #include <errno.h>
14547 #endif
14548 #ifndef NULL
14549 #define NULL (void*)0
14550 #endif
14551
14552 static void *task(p)
14553         void *p;
14554 {
14555         return (void *) (p == NULL);
14556 }
14557
14558 int main() {
14559
14560         /* pthread test function */
14561 #ifndef PTHREAD_CREATE_DETACHED
14562 #define PTHREAD_CREATE_DETACHED 1
14563 #endif
14564         pthread_t t;
14565         int status;
14566         int detach = PTHREAD_CREATE_DETACHED;
14567
14568 #if HAVE_PTHREADS > 4
14569         /* Final pthreads */
14570         pthread_attr_t attr;
14571
14572         status = pthread_attr_init(&attr);
14573         if( status ) return status;
14574
14575 #if HAVE_PTHREADS < 7
14576         status = pthread_attr_setdetachstate(&attr, &detach);
14577         if( status < 0 ) status = errno;
14578 #else
14579         status = pthread_attr_setdetachstate(&attr, detach);
14580 #endif
14581         if( status ) return status;
14582         status = pthread_create( &t, &attr, task, NULL );
14583 #if HAVE_PTHREADS < 7
14584         if( status < 0 ) status = errno;
14585 #endif
14586         if( status ) return status;
14587 #else
14588         /* Draft 4 pthreads */
14589         status = pthread_create( &t, pthread_attr_default, task, NULL );
14590         if( status ) return errno;
14591
14592         /* give thread a chance to complete */
14593         /* it should remain joinable and hence detachable */
14594         sleep( 1 );
14595
14596         status = pthread_detach( &t );
14597         if( status ) return errno;
14598 #endif
14599
14600 #ifdef HAVE_LINUX_THREADS
14601         pthread_kill_other_threads_np();
14602 #endif
14603
14604         return 0;
14605
14606 ; return 0; }
14607 EOF
14608 if { (eval echo configure:14609: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14609   rm -rf conftest*
14610   ol_cv_pthread_lpthreads_lmach_lexc=yes
14611 else
14612   echo "configure: failed program was:" >&5
14613   cat conftest.$ac_ext >&5
14614   rm -rf conftest*
14615   ol_cv_pthread_lpthreads_lmach_lexc=no
14616 fi
14617 rm -f conftest*
14618 else
14619   cat > conftest.$ac_ext <<EOF
14620 #line 14621 "configure"
14621 #include "confdefs.h"
14622 /* pthread test headers */
14623 #include <pthread.h>
14624 #if HAVE_PTHREADS < 7
14625 #include <errno.h>
14626 #endif
14627 #ifndef NULL
14628 #define NULL (void*)0
14629 #endif
14630
14631 static void *task(p)
14632         void *p;
14633 {
14634         return (void *) (p == NULL);
14635 }
14636
14637
14638 int main(argc, argv)
14639         int argc;
14640         char **argv;
14641 {
14642
14643         /* pthread test function */
14644 #ifndef PTHREAD_CREATE_DETACHED
14645 #define PTHREAD_CREATE_DETACHED 1
14646 #endif
14647         pthread_t t;
14648         int status;
14649         int detach = PTHREAD_CREATE_DETACHED;
14650
14651 #if HAVE_PTHREADS > 4
14652         /* Final pthreads */
14653         pthread_attr_t attr;
14654
14655         status = pthread_attr_init(&attr);
14656         if( status ) return status;
14657
14658 #if HAVE_PTHREADS < 7
14659         status = pthread_attr_setdetachstate(&attr, &detach);
14660         if( status < 0 ) status = errno;
14661 #else
14662         status = pthread_attr_setdetachstate(&attr, detach);
14663 #endif
14664         if( status ) return status;
14665         status = pthread_create( &t, &attr, task, NULL );
14666 #if HAVE_PTHREADS < 7
14667         if( status < 0 ) status = errno;
14668 #endif
14669         if( status ) return status;
14670 #else
14671         /* Draft 4 pthreads */
14672         status = pthread_create( &t, pthread_attr_default, task, NULL );
14673         if( status ) return errno;
14674
14675         /* give thread a chance to complete */
14676         /* it should remain joinable and hence detachable */
14677         sleep( 1 );
14678
14679         status = pthread_detach( &t );
14680         if( status ) return errno;
14681 #endif
14682
14683 #ifdef HAVE_LINUX_THREADS
14684         pthread_kill_other_threads_np();
14685 #endif
14686
14687         return 0;
14688
14689 }
14690
14691 EOF
14692 if { (eval echo configure:14693: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
14693 then
14694   ol_cv_pthread_lpthreads_lmach_lexc=yes
14695 else
14696   echo "configure: failed program was:" >&5
14697   cat conftest.$ac_ext >&5
14698   rm -fr conftest*
14699   ol_cv_pthread_lpthreads_lmach_lexc=no
14700 fi
14701 rm -fr conftest*
14702 fi
14703
14704
14705                 # restore the LIBS
14706                 LIBS="$ol_LIBS"
14707         
14708 fi
14709
14710 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc" 1>&6
14711
14712         if test $ol_cv_pthread_lpthreads_lmach_lexc = yes ; then
14713                 ol_link_pthreads="-lpthreads -lmach -lexc"
14714                 ol_link_threads=posix
14715         fi
14716 fi
14717
14718                 # Pthread try link: -lpthreads -lexc (ol_cv_pthread_lpthreads_lexc)
14719 if test "$ol_link_threads" = no ; then
14720         # try -lpthreads -lexc
14721         echo $ac_n "checking for pthread link with -lpthreads -lexc""... $ac_c" 1>&6
14722 echo "configure:14723: checking for pthread link with -lpthreads -lexc" >&5
14723 if eval "test \"\${ol_cv_pthread_lpthreads_lexc+set}\" = set"; then
14724   echo $ac_n "(cached) $ac_c" 1>&6
14725 else
14726   
14727                 # save the flags
14728                 ol_LIBS="$LIBS"
14729                 LIBS="-lpthreads -lexc $LIBS"
14730
14731                 if test "$cross_compiling" = yes; then
14732   cat > conftest.$ac_ext <<EOF
14733 #line 14734 "configure"
14734 #include "confdefs.h"
14735 /* pthread test headers */
14736 #include <pthread.h>
14737 #if HAVE_PTHREADS < 7
14738 #include <errno.h>
14739 #endif
14740 #ifndef NULL
14741 #define NULL (void*)0
14742 #endif
14743
14744 static void *task(p)
14745         void *p;
14746 {
14747         return (void *) (p == NULL);
14748 }
14749
14750 int main() {
14751
14752         /* pthread test function */
14753 #ifndef PTHREAD_CREATE_DETACHED
14754 #define PTHREAD_CREATE_DETACHED 1
14755 #endif
14756         pthread_t t;
14757         int status;
14758         int detach = PTHREAD_CREATE_DETACHED;
14759
14760 #if HAVE_PTHREADS > 4
14761         /* Final pthreads */
14762         pthread_attr_t attr;
14763
14764         status = pthread_attr_init(&attr);
14765         if( status ) return status;
14766
14767 #if HAVE_PTHREADS < 7
14768         status = pthread_attr_setdetachstate(&attr, &detach);
14769         if( status < 0 ) status = errno;
14770 #else
14771         status = pthread_attr_setdetachstate(&attr, detach);
14772 #endif
14773         if( status ) return status;
14774         status = pthread_create( &t, &attr, task, NULL );
14775 #if HAVE_PTHREADS < 7
14776         if( status < 0 ) status = errno;
14777 #endif
14778         if( status ) return status;
14779 #else
14780         /* Draft 4 pthreads */
14781         status = pthread_create( &t, pthread_attr_default, task, NULL );
14782         if( status ) return errno;
14783
14784         /* give thread a chance to complete */
14785         /* it should remain joinable and hence detachable */
14786         sleep( 1 );
14787
14788         status = pthread_detach( &t );
14789         if( status ) return errno;
14790 #endif
14791
14792 #ifdef HAVE_LINUX_THREADS
14793         pthread_kill_other_threads_np();
14794 #endif
14795
14796         return 0;
14797
14798 ; return 0; }
14799 EOF
14800 if { (eval echo configure:14801: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14801   rm -rf conftest*
14802   ol_cv_pthread_lpthreads_lexc=yes
14803 else
14804   echo "configure: failed program was:" >&5
14805   cat conftest.$ac_ext >&5
14806   rm -rf conftest*
14807   ol_cv_pthread_lpthreads_lexc=no
14808 fi
14809 rm -f conftest*
14810 else
14811   cat > conftest.$ac_ext <<EOF
14812 #line 14813 "configure"
14813 #include "confdefs.h"
14814 /* pthread test headers */
14815 #include <pthread.h>
14816 #if HAVE_PTHREADS < 7
14817 #include <errno.h>
14818 #endif
14819 #ifndef NULL
14820 #define NULL (void*)0
14821 #endif
14822
14823 static void *task(p)
14824         void *p;
14825 {
14826         return (void *) (p == NULL);
14827 }
14828
14829
14830 int main(argc, argv)
14831         int argc;
14832         char **argv;
14833 {
14834
14835         /* pthread test function */
14836 #ifndef PTHREAD_CREATE_DETACHED
14837 #define PTHREAD_CREATE_DETACHED 1
14838 #endif
14839         pthread_t t;
14840         int status;
14841         int detach = PTHREAD_CREATE_DETACHED;
14842
14843 #if HAVE_PTHREADS > 4
14844         /* Final pthreads */
14845         pthread_attr_t attr;
14846
14847         status = pthread_attr_init(&attr);
14848         if( status ) return status;
14849
14850 #if HAVE_PTHREADS < 7
14851         status = pthread_attr_setdetachstate(&attr, &detach);
14852         if( status < 0 ) status = errno;
14853 #else
14854         status = pthread_attr_setdetachstate(&attr, detach);
14855 #endif
14856         if( status ) return status;
14857         status = pthread_create( &t, &attr, task, NULL );
14858 #if HAVE_PTHREADS < 7
14859         if( status < 0 ) status = errno;
14860 #endif
14861         if( status ) return status;
14862 #else
14863         /* Draft 4 pthreads */
14864         status = pthread_create( &t, pthread_attr_default, task, NULL );
14865         if( status ) return errno;
14866
14867         /* give thread a chance to complete */
14868         /* it should remain joinable and hence detachable */
14869         sleep( 1 );
14870
14871         status = pthread_detach( &t );
14872         if( status ) return errno;
14873 #endif
14874
14875 #ifdef HAVE_LINUX_THREADS
14876         pthread_kill_other_threads_np();
14877 #endif
14878
14879         return 0;
14880
14881 }
14882
14883 EOF
14884 if { (eval echo configure:14885: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
14885 then
14886   ol_cv_pthread_lpthreads_lexc=yes
14887 else
14888   echo "configure: failed program was:" >&5
14889   cat conftest.$ac_ext >&5
14890   rm -fr conftest*
14891   ol_cv_pthread_lpthreads_lexc=no
14892 fi
14893 rm -fr conftest*
14894 fi
14895
14896
14897                 # restore the LIBS
14898                 LIBS="$ol_LIBS"
14899         
14900 fi
14901
14902 echo "$ac_t""$ol_cv_pthread_lpthreads_lexc" 1>&6
14903
14904         if test $ol_cv_pthread_lpthreads_lexc = yes ; then
14905                 ol_link_pthreads="-lpthreads -lexc"
14906                 ol_link_threads=posix
14907         fi
14908 fi
14909
14910
14911                 # Pthread try link: -lpthreads (ol_cv_pthread_lib_lpthreads)
14912 if test "$ol_link_threads" = no ; then
14913         # try -lpthreads
14914         echo $ac_n "checking for pthread link with -lpthreads""... $ac_c" 1>&6
14915 echo "configure:14916: checking for pthread link with -lpthreads" >&5
14916 if eval "test \"\${ol_cv_pthread_lib_lpthreads+set}\" = set"; then
14917   echo $ac_n "(cached) $ac_c" 1>&6
14918 else
14919   
14920                 # save the flags
14921                 ol_LIBS="$LIBS"
14922                 LIBS="-lpthreads $LIBS"
14923
14924                 if test "$cross_compiling" = yes; then
14925   cat > conftest.$ac_ext <<EOF
14926 #line 14927 "configure"
14927 #include "confdefs.h"
14928 /* pthread test headers */
14929 #include <pthread.h>
14930 #if HAVE_PTHREADS < 7
14931 #include <errno.h>
14932 #endif
14933 #ifndef NULL
14934 #define NULL (void*)0
14935 #endif
14936
14937 static void *task(p)
14938         void *p;
14939 {
14940         return (void *) (p == NULL);
14941 }
14942
14943 int main() {
14944
14945         /* pthread test function */
14946 #ifndef PTHREAD_CREATE_DETACHED
14947 #define PTHREAD_CREATE_DETACHED 1
14948 #endif
14949         pthread_t t;
14950         int status;
14951         int detach = PTHREAD_CREATE_DETACHED;
14952
14953 #if HAVE_PTHREADS > 4
14954         /* Final pthreads */
14955         pthread_attr_t attr;
14956
14957         status = pthread_attr_init(&attr);
14958         if( status ) return status;
14959
14960 #if HAVE_PTHREADS < 7
14961         status = pthread_attr_setdetachstate(&attr, &detach);
14962         if( status < 0 ) status = errno;
14963 #else
14964         status = pthread_attr_setdetachstate(&attr, detach);
14965 #endif
14966         if( status ) return status;
14967         status = pthread_create( &t, &attr, task, NULL );
14968 #if HAVE_PTHREADS < 7
14969         if( status < 0 ) status = errno;
14970 #endif
14971         if( status ) return status;
14972 #else
14973         /* Draft 4 pthreads */
14974         status = pthread_create( &t, pthread_attr_default, task, NULL );
14975         if( status ) return errno;
14976
14977         /* give thread a chance to complete */
14978         /* it should remain joinable and hence detachable */
14979         sleep( 1 );
14980
14981         status = pthread_detach( &t );
14982         if( status ) return errno;
14983 #endif
14984
14985 #ifdef HAVE_LINUX_THREADS
14986         pthread_kill_other_threads_np();
14987 #endif
14988
14989         return 0;
14990
14991 ; return 0; }
14992 EOF
14993 if { (eval echo configure:14994: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14994   rm -rf conftest*
14995   ol_cv_pthread_lib_lpthreads=yes
14996 else
14997   echo "configure: failed program was:" >&5
14998   cat conftest.$ac_ext >&5
14999   rm -rf conftest*
15000   ol_cv_pthread_lib_lpthreads=no
15001 fi
15002 rm -f conftest*
15003 else
15004   cat > conftest.$ac_ext <<EOF
15005 #line 15006 "configure"
15006 #include "confdefs.h"
15007 /* pthread test headers */
15008 #include <pthread.h>
15009 #if HAVE_PTHREADS < 7
15010 #include <errno.h>
15011 #endif
15012 #ifndef NULL
15013 #define NULL (void*)0
15014 #endif
15015
15016 static void *task(p)
15017         void *p;
15018 {
15019         return (void *) (p == NULL);
15020 }
15021
15022
15023 int main(argc, argv)
15024         int argc;
15025         char **argv;
15026 {
15027
15028         /* pthread test function */
15029 #ifndef PTHREAD_CREATE_DETACHED
15030 #define PTHREAD_CREATE_DETACHED 1
15031 #endif
15032         pthread_t t;
15033         int status;
15034         int detach = PTHREAD_CREATE_DETACHED;
15035
15036 #if HAVE_PTHREADS > 4
15037         /* Final pthreads */
15038         pthread_attr_t attr;
15039
15040         status = pthread_attr_init(&attr);
15041         if( status ) return status;
15042
15043 #if HAVE_PTHREADS < 7
15044         status = pthread_attr_setdetachstate(&attr, &detach);
15045         if( status < 0 ) status = errno;
15046 #else
15047         status = pthread_attr_setdetachstate(&attr, detach);
15048 #endif
15049         if( status ) return status;
15050         status = pthread_create( &t, &attr, task, NULL );
15051 #if HAVE_PTHREADS < 7
15052         if( status < 0 ) status = errno;
15053 #endif
15054         if( status ) return status;
15055 #else
15056         /* Draft 4 pthreads */
15057         status = pthread_create( &t, pthread_attr_default, task, NULL );
15058         if( status ) return errno;
15059
15060         /* give thread a chance to complete */
15061         /* it should remain joinable and hence detachable */
15062         sleep( 1 );
15063
15064         status = pthread_detach( &t );
15065         if( status ) return errno;
15066 #endif
15067
15068 #ifdef HAVE_LINUX_THREADS
15069         pthread_kill_other_threads_np();
15070 #endif
15071
15072         return 0;
15073
15074 }
15075
15076 EOF
15077 if { (eval echo configure:15078: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
15078 then
15079   ol_cv_pthread_lib_lpthreads=yes
15080 else
15081   echo "configure: failed program was:" >&5
15082   cat conftest.$ac_ext >&5
15083   rm -fr conftest*
15084   ol_cv_pthread_lib_lpthreads=no
15085 fi
15086 rm -fr conftest*
15087 fi
15088
15089
15090                 # restore the LIBS
15091                 LIBS="$ol_LIBS"
15092         
15093 fi
15094
15095 echo "$ac_t""$ol_cv_pthread_lib_lpthreads" 1>&6
15096
15097         if test $ol_cv_pthread_lib_lpthreads = yes ; then
15098                 ol_link_pthreads="-lpthreads"
15099                 ol_link_threads=posix
15100         fi
15101 fi
15102
15103
15104                 if test $ol_link_threads != no ; then
15105                         LTHREAD_LIBS="$LTHREAD_LIBS $ol_link_pthreads"
15106
15107                                                 save_CPPFLAGS="$CPPFLAGS"
15108                         save_LIBS="$LIBS"
15109                         LIBS="$LTHREAD_LIBS $LIBS"
15110
15111                                                                                                 for ac_func in sched_yield pthread_yield thr_yield
15112 do
15113 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15114 echo "configure:15115: checking for $ac_func" >&5
15115 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15116   echo $ac_n "(cached) $ac_c" 1>&6
15117 else
15118   cat > conftest.$ac_ext <<EOF
15119 #line 15120 "configure"
15120 #include "confdefs.h"
15121 /* System header to define __stub macros and hopefully few prototypes,
15122     which can conflict with char $ac_func(); below.  */
15123 #include <assert.h>
15124 /* Override any gcc2 internal prototype to avoid an error.  */
15125 /* We use char because int might match the return type of a gcc2
15126     builtin and then its argument prototype would still apply.  */
15127 char $ac_func();
15128 char (*f)();
15129
15130 int main() {
15131
15132 /* The GNU C library defines this for functions which it implements
15133     to always fail with ENOSYS.  Some functions are actually named
15134     something starting with __ and the normal name is an alias.  */
15135 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15136 choke me
15137 #else
15138 f = $ac_func;
15139 #endif
15140
15141 ; return 0; }
15142 EOF
15143 if { (eval echo configure:15144: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15144   rm -rf conftest*
15145   eval "ac_cv_func_$ac_func=yes"
15146 else
15147   echo "configure: failed program was:" >&5
15148   cat conftest.$ac_ext >&5
15149   rm -rf conftest*
15150   eval "ac_cv_func_$ac_func=no"
15151 fi
15152 rm -f conftest*
15153 fi
15154
15155 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15156   echo "$ac_t""yes" 1>&6
15157     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15158   cat >> confdefs.h <<EOF
15159 #define $ac_tr_func 1
15160 EOF
15161  
15162 else
15163   echo "$ac_t""no" 1>&6
15164 fi
15165 done
15166
15167
15168                         if test $ac_cv_func_sched_yield = no -a \
15169                                 $ac_cv_func_pthread_yield = no -a \
15170                                 $ac_cv_func_thr_yield = no ; then
15171                                                                 echo $ac_n "checking for sched_yield in -lrt""... $ac_c" 1>&6
15172 echo "configure:15173: checking for sched_yield in -lrt" >&5
15173 ac_lib_var=`echo rt'_'sched_yield | sed 'y%./+-:%__p__%'`
15174 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
15175   echo $ac_n "(cached) $ac_c" 1>&6
15176 else
15177   ac_save_LIBS="$LIBS"
15178 LIBS="-lrt  $LIBS"
15179 cat > conftest.$ac_ext <<EOF
15180 #line 15181 "configure"
15181 #include "confdefs.h"
15182 /* Override any gcc2 internal prototype to avoid an error.  */
15183 /* We use char because int might match the return type of a gcc2
15184     builtin and then its argument prototype would still apply.  */
15185 char sched_yield();
15186
15187 int main() {
15188 sched_yield()
15189 ; return 0; }
15190 EOF
15191 if { (eval echo configure:15192: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15192   rm -rf conftest*
15193   eval "ac_cv_lib_$ac_lib_var=yes"
15194 else
15195   echo "configure: failed program was:" >&5
15196   cat conftest.$ac_ext >&5
15197   rm -rf conftest*
15198   eval "ac_cv_lib_$ac_lib_var=no"
15199 fi
15200 rm -f conftest*
15201 LIBS="$ac_save_LIBS"
15202
15203 fi
15204 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
15205   echo "$ac_t""yes" 1>&6
15206   LTHREAD_LIBS="$LTHREAD_LIBS -lrt"
15207                                         cat >> confdefs.h <<\EOF
15208 #define HAVE_SCHED_YIELD 1
15209 EOF
15210
15211                                         ac_cv_func_sched_yield=yes
15212 else
15213   echo "$ac_t""no" 1>&6
15214 ac_cv_func_sched_yield=no
15215 fi
15216
15217                         fi
15218                         if test $ac_cv_func_sched_yield = no -a \
15219                                 $ac_cv_func_pthread_yield = no -a \
15220                                 "$ac_cv_func_thr_yield" = no ; then
15221                                 echo "configure: warning: could not locate sched_yield() or pthread_yield()" 1>&2
15222                         fi
15223
15224                                                 for ac_func in pthread_kill pthread_rwlock_destroy
15225 do
15226 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15227 echo "configure:15228: checking for $ac_func" >&5
15228 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15229   echo $ac_n "(cached) $ac_c" 1>&6
15230 else
15231   cat > conftest.$ac_ext <<EOF
15232 #line 15233 "configure"
15233 #include "confdefs.h"
15234 /* System header to define __stub macros and hopefully few prototypes,
15235     which can conflict with char $ac_func(); below.  */
15236 #include <assert.h>
15237 /* Override any gcc2 internal prototype to avoid an error.  */
15238 /* We use char because int might match the return type of a gcc2
15239     builtin and then its argument prototype would still apply.  */
15240 char $ac_func();
15241 char (*f)();
15242
15243 int main() {
15244
15245 /* The GNU C library defines this for functions which it implements
15246     to always fail with ENOSYS.  Some functions are actually named
15247     something starting with __ and the normal name is an alias.  */
15248 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15249 choke me
15250 #else
15251 f = $ac_func;
15252 #endif
15253
15254 ; return 0; }
15255 EOF
15256 if { (eval echo configure:15257: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15257   rm -rf conftest*
15258   eval "ac_cv_func_$ac_func=yes"
15259 else
15260   echo "configure: failed program was:" >&5
15261   cat conftest.$ac_ext >&5
15262   rm -rf conftest*
15263   eval "ac_cv_func_$ac_func=no"
15264 fi
15265 rm -f conftest*
15266 fi
15267
15268 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15269   echo "$ac_t""yes" 1>&6
15270     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15271   cat >> confdefs.h <<EOF
15272 #define $ac_tr_func 1
15273 EOF
15274  
15275 else
15276   echo "$ac_t""no" 1>&6
15277 fi
15278 done
15279
15280
15281                                                                         echo $ac_n "checking for pthread_detach with <pthread.h>""... $ac_c" 1>&6
15282 echo "configure:15283: checking for pthread_detach with <pthread.h>" >&5
15283 if eval "test \"\${ol_cv_func_pthread_detach+set}\" = set"; then
15284   echo $ac_n "(cached) $ac_c" 1>&6
15285 else
15286   
15287                                                                 cat > conftest.$ac_ext <<EOF
15288 #line 15289 "configure"
15289 #include "confdefs.h"
15290
15291 #include <pthread.h>
15292 #ifndef NULL
15293 #define NULL (void*)0
15294 #endif
15295
15296 int main() {
15297 pthread_detach(NULL);
15298 ; return 0; }
15299 EOF
15300 if { (eval echo configure:15301: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15301   rm -rf conftest*
15302   ol_cv_func_pthread_detach=yes
15303 else
15304   echo "configure: failed program was:" >&5
15305   cat conftest.$ac_ext >&5
15306   rm -rf conftest*
15307   ol_cv_func_pthread_detach=no
15308 fi
15309 rm -f conftest*
15310                         
15311 fi
15312
15313 echo "$ac_t""$ol_cv_func_pthread_detach" 1>&6
15314
15315                         if test $ol_cv_func_pthread_detach = no ; then
15316                                 { echo "configure: error: could not locate pthread_detach()" 1>&2; exit 1; }
15317                         fi
15318
15319                         cat >> confdefs.h <<\EOF
15320 #define HAVE_PTHREAD_DETACH 1
15321 EOF
15322
15323
15324                                                 for ac_func in \
15325                                 pthread_setconcurrency \
15326                                 pthread_getconcurrency \
15327                                 thr_setconcurrency \
15328                                 thr_getconcurrency \
15329                         
15330 do
15331 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15332 echo "configure:15333: checking for $ac_func" >&5
15333 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15334   echo $ac_n "(cached) $ac_c" 1>&6
15335 else
15336   cat > conftest.$ac_ext <<EOF
15337 #line 15338 "configure"
15338 #include "confdefs.h"
15339 /* System header to define __stub macros and hopefully few prototypes,
15340     which can conflict with char $ac_func(); below.  */
15341 #include <assert.h>
15342 /* Override any gcc2 internal prototype to avoid an error.  */
15343 /* We use char because int might match the return type of a gcc2
15344     builtin and then its argument prototype would still apply.  */
15345 char $ac_func();
15346 char (*f)();
15347
15348 int main() {
15349
15350 /* The GNU C library defines this for functions which it implements
15351     to always fail with ENOSYS.  Some functions are actually named
15352     something starting with __ and the normal name is an alias.  */
15353 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15354 choke me
15355 #else
15356 f = $ac_func;
15357 #endif
15358
15359 ; return 0; }
15360 EOF
15361 if { (eval echo configure:15362: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15362   rm -rf conftest*
15363   eval "ac_cv_func_$ac_func=yes"
15364 else
15365   echo "configure: failed program was:" >&5
15366   cat conftest.$ac_ext >&5
15367   rm -rf conftest*
15368   eval "ac_cv_func_$ac_func=no"
15369 fi
15370 rm -f conftest*
15371 fi
15372
15373 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15374   echo "$ac_t""yes" 1>&6
15375     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15376   cat >> confdefs.h <<EOF
15377 #define $ac_tr_func 1
15378 EOF
15379  
15380 else
15381   echo "$ac_t""no" 1>&6
15382 fi
15383 done
15384
15385
15386                         
15387         for ac_func in pthread_kill_other_threads_np
15388 do
15389 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15390 echo "configure:15391: checking for $ac_func" >&5
15391 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15392   echo $ac_n "(cached) $ac_c" 1>&6
15393 else
15394   cat > conftest.$ac_ext <<EOF
15395 #line 15396 "configure"
15396 #include "confdefs.h"
15397 /* System header to define __stub macros and hopefully few prototypes,
15398     which can conflict with char $ac_func(); below.  */
15399 #include <assert.h>
15400 /* Override any gcc2 internal prototype to avoid an error.  */
15401 /* We use char because int might match the return type of a gcc2
15402     builtin and then its argument prototype would still apply.  */
15403 char $ac_func();
15404 char (*f)();
15405
15406 int main() {
15407
15408 /* The GNU C library defines this for functions which it implements
15409     to always fail with ENOSYS.  Some functions are actually named
15410     something starting with __ and the normal name is an alias.  */
15411 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15412 choke me
15413 #else
15414 f = $ac_func;
15415 #endif
15416
15417 ; return 0; }
15418 EOF
15419 if { (eval echo configure:15420: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15420   rm -rf conftest*
15421   eval "ac_cv_func_$ac_func=yes"
15422 else
15423   echo "configure: failed program was:" >&5
15424   cat conftest.$ac_ext >&5
15425   rm -rf conftest*
15426   eval "ac_cv_func_$ac_func=no"
15427 fi
15428 rm -f conftest*
15429 fi
15430
15431 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15432   echo "$ac_t""yes" 1>&6
15433     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15434   cat >> confdefs.h <<EOF
15435 #define $ac_tr_func 1
15436 EOF
15437  
15438 else
15439   echo "$ac_t""no" 1>&6
15440 fi
15441 done
15442
15443         echo $ac_n "checking for LinuxThreads implementation""... $ac_c" 1>&6
15444 echo "configure:15445: checking for LinuxThreads implementation" >&5
15445 if eval "test \"\${ol_cv_sys_linux_threads+set}\" = set"; then
15446   echo $ac_n "(cached) $ac_c" 1>&6
15447 else
15448   ol_cv_sys_linux_threads=$ac_cv_func_pthread_kill_other_threads_np
15449 fi
15450
15451 echo "$ac_t""$ol_cv_sys_linux_threads" 1>&6
15452
15453                         
15454         
15455         
15456         echo $ac_n "checking for LinuxThreads consistency""... $ac_c" 1>&6
15457 echo "configure:15458: checking for LinuxThreads consistency" >&5
15458 if eval "test \"\${ol_cv_linux_threads+set}\" = set"; then
15459   echo $ac_n "(cached) $ac_c" 1>&6
15460 else
15461   
15462                 if test $ol_cv_header_linux_threads = yes -a \
15463                         $ol_cv_sys_linux_threads = yes; then
15464                         ol_cv_linux_threads=yes
15465                 elif test $ol_cv_header_linux_threads = no -a \
15466                         $ol_cv_sys_linux_threads = no; then
15467                         ol_cv_linux_threads=no
15468                 else
15469                         ol_cv_linux_threads=error
15470                 fi
15471         
15472 fi
15473
15474 echo "$ac_t""$ol_cv_linux_threads" 1>&6
15475
15476
15477                         if test $ol_cv_linux_threads = error; then
15478                                 { echo "configure: error: LinuxThreads header/library mismatch" 1>&2; exit 1; };
15479                         fi
15480
15481                         echo $ac_n "checking if pthread_create() works""... $ac_c" 1>&6
15482 echo "configure:15483: checking if pthread_create() works" >&5
15483 if eval "test \"\${ol_cv_pthread_create_works+set}\" = set"; then
15484   echo $ac_n "(cached) $ac_c" 1>&6
15485 else
15486   
15487                         if test "$cross_compiling" = yes; then
15488                                 ol_cv_pthread_create_works=yes
15489 else
15490   cat > conftest.$ac_ext <<EOF
15491 #line 15492 "configure"
15492 #include "confdefs.h"
15493 /* pthread test headers */
15494 #include <pthread.h>
15495 #if HAVE_PTHREADS < 7
15496 #include <errno.h>
15497 #endif
15498 #ifndef NULL
15499 #define NULL (void*)0
15500 #endif
15501
15502 static void *task(p)
15503         void *p;
15504 {
15505         return (void *) (p == NULL);
15506 }
15507
15508
15509 int main(argc, argv)
15510         int argc;
15511         char **argv;
15512 {
15513
15514         /* pthread test function */
15515 #ifndef PTHREAD_CREATE_DETACHED
15516 #define PTHREAD_CREATE_DETACHED 1
15517 #endif
15518         pthread_t t;
15519         int status;
15520         int detach = PTHREAD_CREATE_DETACHED;
15521
15522 #if HAVE_PTHREADS > 4
15523         /* Final pthreads */
15524         pthread_attr_t attr;
15525
15526         status = pthread_attr_init(&attr);
15527         if( status ) return status;
15528
15529 #if HAVE_PTHREADS < 7
15530         status = pthread_attr_setdetachstate(&attr, &detach);
15531         if( status < 0 ) status = errno;
15532 #else
15533         status = pthread_attr_setdetachstate(&attr, detach);
15534 #endif
15535         if( status ) return status;
15536         status = pthread_create( &t, &attr, task, NULL );
15537 #if HAVE_PTHREADS < 7
15538         if( status < 0 ) status = errno;
15539 #endif
15540         if( status ) return status;
15541 #else
15542         /* Draft 4 pthreads */
15543         status = pthread_create( &t, pthread_attr_default, task, NULL );
15544         if( status ) return errno;
15545
15546         /* give thread a chance to complete */
15547         /* it should remain joinable and hence detachable */
15548         sleep( 1 );
15549
15550         status = pthread_detach( &t );
15551         if( status ) return errno;
15552 #endif
15553
15554 #ifdef HAVE_LINUX_THREADS
15555         pthread_kill_other_threads_np();
15556 #endif
15557
15558         return 0;
15559
15560 }
15561
15562 EOF
15563 if { (eval echo configure:15564: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
15564 then
15565   ol_cv_pthread_create_works=yes
15566 else
15567   echo "configure: failed program was:" >&5
15568   cat conftest.$ac_ext >&5
15569   rm -fr conftest*
15570   ol_cv_pthread_create_works=no
15571 fi
15572 rm -fr conftest*
15573 fi
15574
15575 fi
15576
15577 echo "$ac_t""$ol_cv_pthread_create_works" 1>&6
15578
15579                         if test $ol_cv_pthread_create_works = no ; then
15580                                 { echo "configure: error: pthread_create is not usable, check environment settings" 1>&2; exit 1; }
15581                         fi
15582
15583                                                 if test $ol_with_yielding_select = auto ; then
15584                                 echo $ac_n "checking if select yields when using pthreads""... $ac_c" 1>&6
15585 echo "configure:15586: checking if select yields when using pthreads" >&5
15586 if eval "test \"\${ol_cv_pthread_select_yields+set}\" = set"; then
15587   echo $ac_n "(cached) $ac_c" 1>&6
15588 else
15589   
15590                                 if test "$cross_compiling" = yes; then
15591   ol_cv_pthread_select_yields=cross
15592 else
15593   cat > conftest.$ac_ext <<EOF
15594 #line 15595 "configure"
15595 #include "confdefs.h"
15596
15597 #include <sys/types.h>
15598 #include <sys/time.h>
15599 #include <unistd.h>
15600 #include <pthread.h>
15601 #ifndef NULL
15602 #define NULL (void*) 0
15603 #endif
15604
15605 static int fildes[2];
15606
15607 static void *task(p)
15608         void *p;
15609 {
15610         int i;
15611         struct timeval tv;
15612
15613         fd_set rfds;
15614
15615         tv.tv_sec=10;
15616         tv.tv_usec=0;
15617
15618         FD_ZERO(&rfds);
15619         FD_SET(fildes[0], &rfds);
15620
15621         /* we're not interested in any fds */
15622         i = select(FD_SETSIZE, &rfds, NULL, NULL, &tv);
15623
15624         if(i < 0) {
15625                 perror("select");
15626                 exit(10);
15627         }
15628
15629         exit(0); /* if we exit here, the select blocked the whole process */
15630 }
15631
15632 int main(argc, argv)
15633         int argc;
15634         char **argv;
15635 {
15636         pthread_t t;
15637
15638         /* create a pipe to select */
15639         if(pipe(&fildes[0])) {
15640                 perror("select");
15641                 exit(1);
15642         }
15643
15644 #ifdef HAVE_PTHREAD_SETCONCURRENCY
15645         (void) pthread_setconcurrency(2);
15646 #else
15647 #ifdef HAVE_THR_SETCONCURRENCY
15648         /* Set Solaris LWP concurrency to 2 */
15649         thr_setconcurrency(2);
15650 #endif
15651 #endif
15652
15653 #if HAVE_PTHREADS < 6
15654         pthread_create(&t, pthread_attr_default, task, NULL);
15655 #else
15656         pthread_create(&t, NULL, task, NULL);
15657 #endif
15658
15659         /* make sure task runs first */
15660 #if HAVE_THR_YIELD
15661         thr_yield();
15662 #elif defined( HAVE_SCHED_YIELD )
15663         sched_yield();
15664 #elif defined( HAVE_PTHREAD_YIELD )
15665         pthread_yield();
15666 #endif
15667
15668         exit(2);
15669 }
15670 EOF
15671 if { (eval echo configure:15672: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
15672 then
15673   ol_cv_pthread_select_yields=no
15674 else
15675   echo "configure: failed program was:" >&5
15676   cat conftest.$ac_ext >&5
15677   rm -fr conftest*
15678   ol_cv_pthread_select_yields=yes
15679 fi
15680 rm -fr conftest*
15681 fi
15682
15683 fi
15684
15685 echo "$ac_t""$ol_cv_pthread_select_yields" 1>&6
15686
15687                                 if test $ol_cv_pthread_select_yields = cross ; then
15688                                         { echo "configure: error: crossing compiling: use --with-yielding_select=yes|no|manual" 1>&2; exit 1; }
15689                                 fi
15690
15691                                 if test $ol_cv_pthread_select_yields = yes ; then
15692                                         ol_with_yielding_select=yes
15693                                 fi
15694                         fi
15695
15696                                                 CPPFLAGS="$save_CPPFLAGS"
15697                         LIBS="$save_LIBS"
15698                 else
15699                         { echo "configure: error: could not locate usable POSIX Threads" 1>&2; exit 1; }
15700                 fi
15701         fi
15702
15703         if test $ol_with_threads = posix ; then
15704                 { echo "configure: error: could not locate POSIX Threads" 1>&2; exit 1; }
15705         fi
15706 fi
15707
15708 if test $ol_with_threads = auto -o $ol_with_threads = yes \
15709         -o $ol_with_threads = mach ; then
15710
15711                 for ac_hdr in mach/cthreads.h cthreads.h
15712 do
15713 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15714 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15715 echo "configure:15716: checking for $ac_hdr" >&5
15716 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15717   echo $ac_n "(cached) $ac_c" 1>&6
15718 else
15719   cat > conftest.$ac_ext <<EOF
15720 #line 15721 "configure"
15721 #include "confdefs.h"
15722 #include <$ac_hdr>
15723 EOF
15724 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15725 { (eval echo configure:15726: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15726 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15727 if test -z "$ac_err"; then
15728   rm -rf conftest*
15729   eval "ac_cv_header_$ac_safe=yes"
15730 else
15731   echo "$ac_err" >&5
15732   echo "configure: failed program was:" >&5
15733   cat conftest.$ac_ext >&5
15734   rm -rf conftest*
15735   eval "ac_cv_header_$ac_safe=no"
15736 fi
15737 rm -f conftest*
15738 fi
15739 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15740   echo "$ac_t""yes" 1>&6
15741     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15742   cat >> confdefs.h <<EOF
15743 #define $ac_tr_hdr 1
15744 EOF
15745  
15746 else
15747   echo "$ac_t""no" 1>&6
15748 fi
15749 done
15750
15751         if test $ac_cv_header_mach_cthreads_h = yes ; then
15752                 ol_with_threads=found
15753
15754                                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
15755 echo "configure:15756: checking for cthread_fork" >&5
15756 if eval "test \"\${ac_cv_func_cthread_fork+set}\" = set"; then
15757   echo $ac_n "(cached) $ac_c" 1>&6
15758 else
15759   cat > conftest.$ac_ext <<EOF
15760 #line 15761 "configure"
15761 #include "confdefs.h"
15762 /* System header to define __stub macros and hopefully few prototypes,
15763     which can conflict with char cthread_fork(); below.  */
15764 #include <assert.h>
15765 /* Override any gcc2 internal prototype to avoid an error.  */
15766 /* We use char because int might match the return type of a gcc2
15767     builtin and then its argument prototype would still apply.  */
15768 char cthread_fork();
15769 char (*f)();
15770
15771 int main() {
15772
15773 /* The GNU C library defines this for functions which it implements
15774     to always fail with ENOSYS.  Some functions are actually named
15775     something starting with __ and the normal name is an alias.  */
15776 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
15777 choke me
15778 #else
15779 f = cthread_fork;
15780 #endif
15781
15782 ; return 0; }
15783 EOF
15784 if { (eval echo configure:15785: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15785   rm -rf conftest*
15786   eval "ac_cv_func_cthread_fork=yes"
15787 else
15788   echo "configure: failed program was:" >&5
15789   cat conftest.$ac_ext >&5
15790   rm -rf conftest*
15791   eval "ac_cv_func_cthread_fork=no"
15792 fi
15793 rm -f conftest*
15794 fi
15795
15796 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
15797   echo "$ac_t""yes" 1>&6
15798   ol_link_threads=yes
15799 else
15800   echo "$ac_t""no" 1>&6
15801 fi
15802
15803
15804                 if test $ol_link_threads = no ; then
15805                                                                         echo $ac_n "checking for cthread_fork with -all_load""... $ac_c" 1>&6
15806 echo "configure:15807: checking for cthread_fork with -all_load" >&5
15807 if eval "test \"\${ol_cv_cthread_all_load+set}\" = set"; then
15808   echo $ac_n "(cached) $ac_c" 1>&6
15809 else
15810   
15811                                                                 save_LIBS="$LIBS"
15812                                 LIBS="-all_load $LIBS"
15813                                 cat > conftest.$ac_ext <<EOF
15814 #line 15815 "configure"
15815 #include "confdefs.h"
15816 #include <mach/cthreads.h>
15817 int main() {
15818
15819                                         cthread_fork((void *)0, (void *)0);
15820                                         
15821 ; return 0; }
15822 EOF
15823 if { (eval echo configure:15824: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15824   rm -rf conftest*
15825   ol_cv_cthread_all_load=yes
15826 else
15827   echo "configure: failed program was:" >&5
15828   cat conftest.$ac_ext >&5
15829   rm -rf conftest*
15830   ol_cv_cthread_all_load=no
15831 fi
15832 rm -f conftest*
15833                                                                 LIBS="$save_LIBS"
15834                         
15835 fi
15836
15837 echo "$ac_t""$ol_cv_cthread_all_load" 1>&6
15838
15839                         if test $ol_cv_cthread_all_load = yes ; then
15840                                 LTHREAD_LIBS="$LTHREAD_LIBS -all_load"
15841                                 ol_link_threads=mach
15842                                 ol_with_threads=found
15843                         fi
15844                 fi
15845
15846         elif test $ac_cv_header_cthreads_h = yes ; then
15847                                 
15848                 ol_with_threads=found
15849  
15850                                 save_LIBS="$LIBS"
15851                 LIBS="$LIBS -lthreads"
15852                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
15853 echo "configure:15854: checking for cthread_fork" >&5
15854 if eval "test \"\${ac_cv_func_cthread_fork+set}\" = set"; then
15855   echo $ac_n "(cached) $ac_c" 1>&6
15856 else
15857   cat > conftest.$ac_ext <<EOF
15858 #line 15859 "configure"
15859 #include "confdefs.h"
15860 /* System header to define __stub macros and hopefully few prototypes,
15861     which can conflict with char cthread_fork(); below.  */
15862 #include <assert.h>
15863 /* Override any gcc2 internal prototype to avoid an error.  */
15864 /* We use char because int might match the return type of a gcc2
15865     builtin and then its argument prototype would still apply.  */
15866 char cthread_fork();
15867 char (*f)();
15868
15869 int main() {
15870
15871 /* The GNU C library defines this for functions which it implements
15872     to always fail with ENOSYS.  Some functions are actually named
15873     something starting with __ and the normal name is an alias.  */
15874 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
15875 choke me
15876 #else
15877 f = cthread_fork;
15878 #endif
15879
15880 ; return 0; }
15881 EOF
15882 if { (eval echo configure:15883: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15883   rm -rf conftest*
15884   eval "ac_cv_func_cthread_fork=yes"
15885 else
15886   echo "configure: failed program was:" >&5
15887   cat conftest.$ac_ext >&5
15888   rm -rf conftest*
15889   eval "ac_cv_func_cthread_fork=no"
15890 fi
15891 rm -f conftest*
15892 fi
15893
15894 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
15895   echo "$ac_t""yes" 1>&6
15896   ol_link_threads=yes
15897 else
15898   echo "$ac_t""no" 1>&6
15899 fi
15900
15901                 LIBS="$save_LIBS"
15902
15903                 if test $ol_link_threads = yes ; then
15904                         LTHREAD_LIBS="-lthreads"
15905                         ol_link_threads=mach
15906                         ol_with_threads=found
15907                 else
15908                         { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
15909                 fi
15910
15911         elif test $ol_with_threads = mach ; then
15912                 { echo "configure: error: could not locate Mach CThreads" 1>&2; exit 1; }
15913         fi
15914
15915         if test $ol_link_threads = mach ; then
15916                 cat >> confdefs.h <<\EOF
15917 #define HAVE_MACH_CTHREADS 1
15918 EOF
15919
15920         elif test $ol_with_threads = found ; then
15921                 { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
15922         fi
15923 fi
15924
15925 if test $ol_with_threads = auto -o $ol_with_threads = yes \
15926         -o $ol_with_threads = pth ; then
15927
15928         for ac_hdr in pth.h
15929 do
15930 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15931 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15932 echo "configure:15933: checking for $ac_hdr" >&5
15933 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15934   echo $ac_n "(cached) $ac_c" 1>&6
15935 else
15936   cat > conftest.$ac_ext <<EOF
15937 #line 15938 "configure"
15938 #include "confdefs.h"
15939 #include <$ac_hdr>
15940 EOF
15941 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15942 { (eval echo configure:15943: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15943 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15944 if test -z "$ac_err"; then
15945   rm -rf conftest*
15946   eval "ac_cv_header_$ac_safe=yes"
15947 else
15948   echo "$ac_err" >&5
15949   echo "configure: failed program was:" >&5
15950   cat conftest.$ac_ext >&5
15951   rm -rf conftest*
15952   eval "ac_cv_header_$ac_safe=no"
15953 fi
15954 rm -f conftest*
15955 fi
15956 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15957   echo "$ac_t""yes" 1>&6
15958     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15959   cat >> confdefs.h <<EOF
15960 #define $ac_tr_hdr 1
15961 EOF
15962  
15963 else
15964   echo "$ac_t""no" 1>&6
15965 fi
15966 done
15967
15968
15969         if test $ac_cv_header_pth_h = yes ; then
15970                 echo $ac_n "checking for pth_version in -lpth""... $ac_c" 1>&6
15971 echo "configure:15972: checking for pth_version in -lpth" >&5
15972 ac_lib_var=`echo pth'_'pth_version | sed 'y%./+-:%__p__%'`
15973 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
15974   echo $ac_n "(cached) $ac_c" 1>&6
15975 else
15976   ac_save_LIBS="$LIBS"
15977 LIBS="-lpth  $LIBS"
15978 cat > conftest.$ac_ext <<EOF
15979 #line 15980 "configure"
15980 #include "confdefs.h"
15981 /* Override any gcc2 internal prototype to avoid an error.  */
15982 /* We use char because int might match the return type of a gcc2
15983     builtin and then its argument prototype would still apply.  */
15984 char pth_version();
15985
15986 int main() {
15987 pth_version()
15988 ; return 0; }
15989 EOF
15990 if { (eval echo configure:15991: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15991   rm -rf conftest*
15992   eval "ac_cv_lib_$ac_lib_var=yes"
15993 else
15994   echo "configure: failed program was:" >&5
15995   cat conftest.$ac_ext >&5
15996   rm -rf conftest*
15997   eval "ac_cv_lib_$ac_lib_var=no"
15998 fi
15999 rm -f conftest*
16000 LIBS="$ac_save_LIBS"
16001
16002 fi
16003 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
16004   echo "$ac_t""yes" 1>&6
16005   have_pth=yes
16006 else
16007   echo "$ac_t""no" 1>&6
16008 have_pth=no
16009 fi
16010
16011
16012                 if test $have_pth = yes ; then
16013                         cat >> confdefs.h <<\EOF
16014 #define HAVE_GNU_PTH 1
16015 EOF
16016
16017                         LTHREAD_LIBS="$LTHREAD_LIBS -lpth"
16018                         ol_link_threads=pth
16019                         ol_with_threads=found
16020
16021                         if test $ol_with_yielding_select = auto ; then
16022                                 ol_with_yielding_select=yes
16023                         fi
16024                 fi
16025         fi
16026 fi
16027
16028 if test $ol_with_threads = auto -o $ol_with_threads = yes \
16029         -o $ol_with_threads = lwp ; then
16030
16031                 for ac_hdr in thread.h synch.h
16032 do
16033 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16034 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16035 echo "configure:16036: checking for $ac_hdr" >&5
16036 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16037   echo $ac_n "(cached) $ac_c" 1>&6
16038 else
16039   cat > conftest.$ac_ext <<EOF
16040 #line 16041 "configure"
16041 #include "confdefs.h"
16042 #include <$ac_hdr>
16043 EOF
16044 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16045 { (eval echo configure:16046: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16046 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16047 if test -z "$ac_err"; then
16048   rm -rf conftest*
16049   eval "ac_cv_header_$ac_safe=yes"
16050 else
16051   echo "$ac_err" >&5
16052   echo "configure: failed program was:" >&5
16053   cat conftest.$ac_ext >&5
16054   rm -rf conftest*
16055   eval "ac_cv_header_$ac_safe=no"
16056 fi
16057 rm -f conftest*
16058 fi
16059 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16060   echo "$ac_t""yes" 1>&6
16061     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16062   cat >> confdefs.h <<EOF
16063 #define $ac_tr_hdr 1
16064 EOF
16065  
16066 else
16067   echo "$ac_t""no" 1>&6
16068 fi
16069 done
16070
16071         if test $ac_cv_header_thread_h = yes -a $ac_cv_header_synch_h = yes ; then
16072                 echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6
16073 echo "configure:16074: checking for thr_create in -lthread" >&5
16074 ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-:%__p__%'`
16075 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
16076   echo $ac_n "(cached) $ac_c" 1>&6
16077 else
16078   ac_save_LIBS="$LIBS"
16079 LIBS="-lthread  $LIBS"
16080 cat > conftest.$ac_ext <<EOF
16081 #line 16082 "configure"
16082 #include "confdefs.h"
16083 /* Override any gcc2 internal prototype to avoid an error.  */
16084 /* We use char because int might match the return type of a gcc2
16085     builtin and then its argument prototype would still apply.  */
16086 char thr_create();
16087
16088 int main() {
16089 thr_create()
16090 ; return 0; }
16091 EOF
16092 if { (eval echo configure:16093: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16093   rm -rf conftest*
16094   eval "ac_cv_lib_$ac_lib_var=yes"
16095 else
16096   echo "configure: failed program was:" >&5
16097   cat conftest.$ac_ext >&5
16098   rm -rf conftest*
16099   eval "ac_cv_lib_$ac_lib_var=no"
16100 fi
16101 rm -f conftest*
16102 LIBS="$ac_save_LIBS"
16103
16104 fi
16105 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
16106   echo "$ac_t""yes" 1>&6
16107   have_thr=yes
16108 else
16109   echo "$ac_t""no" 1>&6
16110 have_thr=no
16111 fi
16112
16113
16114                 if test $have_thr = yes ; then
16115                         cat >> confdefs.h <<\EOF
16116 #define HAVE_THR 1
16117 EOF
16118
16119                         LTHREAD_LIBS="$LTHREAD_LIBS -lthread"
16120                         ol_link_threads=thr
16121
16122                         if test $ol_with_yielding_select = auto ; then
16123                                 ol_with_yielding_select=yes
16124                         fi
16125
16126                                                 for ac_func in \
16127                                 thr_setconcurrency \
16128                                 thr_getconcurrency \
16129                         
16130 do
16131 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
16132 echo "configure:16133: checking for $ac_func" >&5
16133 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
16134   echo $ac_n "(cached) $ac_c" 1>&6
16135 else
16136   cat > conftest.$ac_ext <<EOF
16137 #line 16138 "configure"
16138 #include "confdefs.h"
16139 /* System header to define __stub macros and hopefully few prototypes,
16140     which can conflict with char $ac_func(); below.  */
16141 #include <assert.h>
16142 /* Override any gcc2 internal prototype to avoid an error.  */
16143 /* We use char because int might match the return type of a gcc2
16144     builtin and then its argument prototype would still apply.  */
16145 char $ac_func();
16146 char (*f)();
16147
16148 int main() {
16149
16150 /* The GNU C library defines this for functions which it implements
16151     to always fail with ENOSYS.  Some functions are actually named
16152     something starting with __ and the normal name is an alias.  */
16153 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16154 choke me
16155 #else
16156 f = $ac_func;
16157 #endif
16158
16159 ; return 0; }
16160 EOF
16161 if { (eval echo configure:16162: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16162   rm -rf conftest*
16163   eval "ac_cv_func_$ac_func=yes"
16164 else
16165   echo "configure: failed program was:" >&5
16166   cat conftest.$ac_ext >&5
16167   rm -rf conftest*
16168   eval "ac_cv_func_$ac_func=no"
16169 fi
16170 rm -f conftest*
16171 fi
16172
16173 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
16174   echo "$ac_t""yes" 1>&6
16175     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
16176   cat >> confdefs.h <<EOF
16177 #define $ac_tr_func 1
16178 EOF
16179  
16180 else
16181   echo "$ac_t""no" 1>&6
16182 fi
16183 done
16184
16185                 fi
16186         fi
16187
16188                 for ac_hdr in lwp/lwp.h
16189 do
16190 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16191 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16192 echo "configure:16193: checking for $ac_hdr" >&5
16193 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16194   echo $ac_n "(cached) $ac_c" 1>&6
16195 else
16196   cat > conftest.$ac_ext <<EOF
16197 #line 16198 "configure"
16198 #include "confdefs.h"
16199 #include <$ac_hdr>
16200 EOF
16201 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16202 { (eval echo configure:16203: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16203 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16204 if test -z "$ac_err"; then
16205   rm -rf conftest*
16206   eval "ac_cv_header_$ac_safe=yes"
16207 else
16208   echo "$ac_err" >&5
16209   echo "configure: failed program was:" >&5
16210   cat conftest.$ac_ext >&5
16211   rm -rf conftest*
16212   eval "ac_cv_header_$ac_safe=no"
16213 fi
16214 rm -f conftest*
16215 fi
16216 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16217   echo "$ac_t""yes" 1>&6
16218     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16219   cat >> confdefs.h <<EOF
16220 #define $ac_tr_hdr 1
16221 EOF
16222  
16223 else
16224   echo "$ac_t""no" 1>&6
16225 fi
16226 done
16227
16228         if test $ac_cv_header_lwp_lwp_h = yes ; then
16229                 echo $ac_n "checking for lwp_create in -llwp""... $ac_c" 1>&6
16230 echo "configure:16231: checking for lwp_create in -llwp" >&5
16231 ac_lib_var=`echo lwp'_'lwp_create | sed 'y%./+-:%__p__%'`
16232 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
16233   echo $ac_n "(cached) $ac_c" 1>&6
16234 else
16235   ac_save_LIBS="$LIBS"
16236 LIBS="-llwp  $LIBS"
16237 cat > conftest.$ac_ext <<EOF
16238 #line 16239 "configure"
16239 #include "confdefs.h"
16240 /* Override any gcc2 internal prototype to avoid an error.  */
16241 /* We use char because int might match the return type of a gcc2
16242     builtin and then its argument prototype would still apply.  */
16243 char lwp_create();
16244
16245 int main() {
16246 lwp_create()
16247 ; return 0; }
16248 EOF
16249 if { (eval echo configure:16250: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16250   rm -rf conftest*
16251   eval "ac_cv_lib_$ac_lib_var=yes"
16252 else
16253   echo "configure: failed program was:" >&5
16254   cat conftest.$ac_ext >&5
16255   rm -rf conftest*
16256   eval "ac_cv_lib_$ac_lib_var=no"
16257 fi
16258 rm -f conftest*
16259 LIBS="$ac_save_LIBS"
16260
16261 fi
16262 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
16263   echo "$ac_t""yes" 1>&6
16264   have_lwp=yes
16265 else
16266   echo "$ac_t""no" 1>&6
16267 have_lwp=no
16268 fi
16269
16270
16271                 if test $have_lwp = yes ; then
16272                         cat >> confdefs.h <<\EOF
16273 #define HAVE_LWP 1
16274 EOF
16275
16276                         LTHREAD_LIBS="$LTHREAD_LIBS -llwp"
16277                         ol_link_threads=lwp
16278
16279                         if test $ol_with_yielding_select = auto ; then
16280                                 ol_with_yielding_select=no
16281                         fi
16282                 fi
16283         fi
16284 fi
16285
16286 if test $ol_with_yielding_select = yes ; then
16287         cat >> confdefs.h <<\EOF
16288 #define HAVE_YIELDING_SELECT 1
16289 EOF
16290
16291 fi
16292
16293 if test $ol_with_threads = manual ; then
16294                 ol_link_threads=yes
16295
16296         echo "configure: warning: thread defines and link options must be set manually" 1>&2
16297
16298         for ac_hdr in pthread.h sched.h
16299 do
16300 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16301 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16302 echo "configure:16303: checking for $ac_hdr" >&5
16303 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16304   echo $ac_n "(cached) $ac_c" 1>&6
16305 else
16306   cat > conftest.$ac_ext <<EOF
16307 #line 16308 "configure"
16308 #include "confdefs.h"
16309 #include <$ac_hdr>
16310 EOF
16311 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16312 { (eval echo configure:16313: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16313 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16314 if test -z "$ac_err"; then
16315   rm -rf conftest*
16316   eval "ac_cv_header_$ac_safe=yes"
16317 else
16318   echo "$ac_err" >&5
16319   echo "configure: failed program was:" >&5
16320   cat conftest.$ac_ext >&5
16321   rm -rf conftest*
16322   eval "ac_cv_header_$ac_safe=no"
16323 fi
16324 rm -f conftest*
16325 fi
16326 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16327   echo "$ac_t""yes" 1>&6
16328     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16329   cat >> confdefs.h <<EOF
16330 #define $ac_tr_hdr 1
16331 EOF
16332  
16333 else
16334   echo "$ac_t""no" 1>&6
16335 fi
16336 done
16337
16338         for ac_func in sched_yield pthread_yield
16339 do
16340 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
16341 echo "configure:16342: checking for $ac_func" >&5
16342 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
16343   echo $ac_n "(cached) $ac_c" 1>&6
16344 else
16345   cat > conftest.$ac_ext <<EOF
16346 #line 16347 "configure"
16347 #include "confdefs.h"
16348 /* System header to define __stub macros and hopefully few prototypes,
16349     which can conflict with char $ac_func(); below.  */
16350 #include <assert.h>
16351 /* Override any gcc2 internal prototype to avoid an error.  */
16352 /* We use char because int might match the return type of a gcc2
16353     builtin and then its argument prototype would still apply.  */
16354 char $ac_func();
16355 char (*f)();
16356
16357 int main() {
16358
16359 /* The GNU C library defines this for functions which it implements
16360     to always fail with ENOSYS.  Some functions are actually named
16361     something starting with __ and the normal name is an alias.  */
16362 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16363 choke me
16364 #else
16365 f = $ac_func;
16366 #endif
16367
16368 ; return 0; }
16369 EOF
16370 if { (eval echo configure:16371: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16371   rm -rf conftest*
16372   eval "ac_cv_func_$ac_func=yes"
16373 else
16374   echo "configure: failed program was:" >&5
16375   cat conftest.$ac_ext >&5
16376   rm -rf conftest*
16377   eval "ac_cv_func_$ac_func=no"
16378 fi
16379 rm -f conftest*
16380 fi
16381
16382 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
16383   echo "$ac_t""yes" 1>&6
16384     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
16385   cat >> confdefs.h <<EOF
16386 #define $ac_tr_func 1
16387 EOF
16388  
16389 else
16390   echo "$ac_t""no" 1>&6
16391 fi
16392 done
16393
16394         
16395         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
16396 echo "configure:16397: checking for LinuxThreads pthread.h" >&5
16397 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
16398   echo $ac_n "(cached) $ac_c" 1>&6
16399 else
16400   cat > conftest.$ac_ext <<EOF
16401 #line 16402 "configure"
16402 #include "confdefs.h"
16403 #include <pthread.h>
16404 EOF
16405 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16406   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
16407   rm -rf conftest*
16408   ol_cv_header_linux_threads=yes
16409 else
16410   rm -rf conftest*
16411   ol_cv_header_linux_threads=no
16412 fi
16413 rm -f conftest*
16414
16415                 
16416 fi
16417
16418 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
16419         if test $ol_cv_header_linux_threads = yes; then
16420                 cat >> confdefs.h <<\EOF
16421 #define HAVE_LINUX_THREADS 1
16422 EOF
16423
16424         fi
16425
16426
16427         for ac_hdr in mach/cthreads.h
16428 do
16429 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16430 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16431 echo "configure:16432: checking for $ac_hdr" >&5
16432 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16433   echo $ac_n "(cached) $ac_c" 1>&6
16434 else
16435   cat > conftest.$ac_ext <<EOF
16436 #line 16437 "configure"
16437 #include "confdefs.h"
16438 #include <$ac_hdr>
16439 EOF
16440 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16441 { (eval echo configure:16442: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16442 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16443 if test -z "$ac_err"; then
16444   rm -rf conftest*
16445   eval "ac_cv_header_$ac_safe=yes"
16446 else
16447   echo "$ac_err" >&5
16448   echo "configure: failed program was:" >&5
16449   cat conftest.$ac_ext >&5
16450   rm -rf conftest*
16451   eval "ac_cv_header_$ac_safe=no"
16452 fi
16453 rm -f conftest*
16454 fi
16455 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16456   echo "$ac_t""yes" 1>&6
16457     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16458   cat >> confdefs.h <<EOF
16459 #define $ac_tr_hdr 1
16460 EOF
16461  
16462 else
16463   echo "$ac_t""no" 1>&6
16464 fi
16465 done
16466
16467         for ac_hdr in lwp/lwp.h
16468 do
16469 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16470 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16471 echo "configure:16472: checking for $ac_hdr" >&5
16472 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16473   echo $ac_n "(cached) $ac_c" 1>&6
16474 else
16475   cat > conftest.$ac_ext <<EOF
16476 #line 16477 "configure"
16477 #include "confdefs.h"
16478 #include <$ac_hdr>
16479 EOF
16480 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16481 { (eval echo configure:16482: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16482 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16483 if test -z "$ac_err"; then
16484   rm -rf conftest*
16485   eval "ac_cv_header_$ac_safe=yes"
16486 else
16487   echo "$ac_err" >&5
16488   echo "configure: failed program was:" >&5
16489   cat conftest.$ac_ext >&5
16490   rm -rf conftest*
16491   eval "ac_cv_header_$ac_safe=no"
16492 fi
16493 rm -f conftest*
16494 fi
16495 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16496   echo "$ac_t""yes" 1>&6
16497     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16498   cat >> confdefs.h <<EOF
16499 #define $ac_tr_hdr 1
16500 EOF
16501  
16502 else
16503   echo "$ac_t""no" 1>&6
16504 fi
16505 done
16506
16507         for ac_hdr in thread.h synch.h
16508 do
16509 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16510 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16511 echo "configure:16512: checking for $ac_hdr" >&5
16512 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16513   echo $ac_n "(cached) $ac_c" 1>&6
16514 else
16515   cat > conftest.$ac_ext <<EOF
16516 #line 16517 "configure"
16517 #include "confdefs.h"
16518 #include <$ac_hdr>
16519 EOF
16520 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16521 { (eval echo configure:16522: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16522 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16523 if test -z "$ac_err"; then
16524   rm -rf conftest*
16525   eval "ac_cv_header_$ac_safe=yes"
16526 else
16527   echo "$ac_err" >&5
16528   echo "configure: failed program was:" >&5
16529   cat conftest.$ac_ext >&5
16530   rm -rf conftest*
16531   eval "ac_cv_header_$ac_safe=no"
16532 fi
16533 rm -f conftest*
16534 fi
16535 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16536   echo "$ac_t""yes" 1>&6
16537     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16538   cat >> confdefs.h <<EOF
16539 #define $ac_tr_hdr 1
16540 EOF
16541  
16542 else
16543   echo "$ac_t""no" 1>&6
16544 fi
16545 done
16546
16547 fi
16548
16549 if test $ol_link_threads != no -a $ol_link_threads != nt ; then  
16550                         cat >> confdefs.h <<\EOF
16551 #define REENTRANT 1
16552 EOF
16553
16554         cat >> confdefs.h <<\EOF
16555 #define _REENTRANT 1
16556 EOF
16557
16558         cat >> confdefs.h <<\EOF
16559 #define THREAD_SAFE 1
16560 EOF
16561
16562         cat >> confdefs.h <<\EOF
16563 #define _THREAD_SAFE 1
16564 EOF
16565
16566         cat >> confdefs.h <<\EOF
16567 #define THREADSAFE 1
16568 EOF
16569
16570         cat >> confdefs.h <<\EOF
16571 #define _THREADSAFE 1
16572 EOF
16573
16574         cat >> confdefs.h <<\EOF
16575 #define _SGI_MP_SOURCE 1
16576 EOF
16577
16578
16579                         echo $ac_n "checking for thread specific errno""... $ac_c" 1>&6
16580 echo "configure:16581: checking for thread specific errno" >&5
16581 if eval "test \"\${ol_cv_errno_thread_specific+set}\" = set"; then
16582   echo $ac_n "(cached) $ac_c" 1>&6
16583 else
16584   
16585                 cat > conftest.$ac_ext <<EOF
16586 #line 16587 "configure"
16587 #include "confdefs.h"
16588 #include <errno.h>
16589 int main() {
16590 errno = 0;
16591 ; return 0; }
16592 EOF
16593 if { (eval echo configure:16594: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16594   rm -rf conftest*
16595   ol_cv_errno_thread_specific=yes
16596 else
16597   echo "configure: failed program was:" >&5
16598   cat conftest.$ac_ext >&5
16599   rm -rf conftest*
16600   ol_cv_errno_thread_specific=no
16601 fi
16602 rm -f conftest*
16603         
16604 fi
16605
16606 echo "$ac_t""$ol_cv_errno_thread_specific" 1>&6
16607
16608                         echo $ac_n "checking for thread specific h_errno""... $ac_c" 1>&6
16609 echo "configure:16610: checking for thread specific h_errno" >&5
16610 if eval "test \"\${ol_cv_h_errno_thread_specific+set}\" = set"; then
16611   echo $ac_n "(cached) $ac_c" 1>&6
16612 else
16613   
16614                 cat > conftest.$ac_ext <<EOF
16615 #line 16616 "configure"
16616 #include "confdefs.h"
16617 #include <netdb.h>
16618 int main() {
16619 h_errno = 0;
16620 ; return 0; }
16621 EOF
16622 if { (eval echo configure:16623: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16623   rm -rf conftest*
16624   ol_cv_h_errno_thread_specific=yes
16625 else
16626   echo "configure: failed program was:" >&5
16627   cat conftest.$ac_ext >&5
16628   rm -rf conftest*
16629   ol_cv_h_errno_thread_specific=no
16630 fi
16631 rm -f conftest*
16632         
16633 fi
16634
16635 echo "$ac_t""$ol_cv_h_errno_thread_specific" 1>&6
16636
16637         if test $ol_cv_errno_thread_specific != yes \
16638                 -o $ol_cv_h_errno_thread_specific != yes ; then
16639                 LIBS="$LTHREAD_LIBS $LIBS"
16640                 LTHREAD_LIBS=""
16641         fi
16642
16643 fi  
16644
16645 if test $ol_link_threads = no ; then
16646         if test $ol_with_threads = yes ; then
16647                 { echo "configure: error: no suitable thread support" 1>&2; exit 1; }
16648         fi
16649
16650         if test $ol_with_threads = auto ; then
16651                 echo "configure: warning: no suitable thread support, disabling threads" 1>&2
16652                 ol_with_threads=no
16653         fi
16654
16655         cat >> confdefs.h <<\EOF
16656 #define NO_THREADS 1
16657 EOF
16658
16659         LTHREAD_LIBS=""
16660 fi
16661
16662 if test $ol_link_threads != no ; then
16663         cat >> confdefs.h <<\EOF
16664 #define LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE 1
16665 EOF
16666
16667 fi
16668
16669 for ac_func in \
16670         ctime_r                 \
16671         gethostbyname_r gethostbyaddr_r \
16672
16673 do
16674 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
16675 echo "configure:16676: checking for $ac_func" >&5
16676 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
16677   echo $ac_n "(cached) $ac_c" 1>&6
16678 else
16679   cat > conftest.$ac_ext <<EOF
16680 #line 16681 "configure"
16681 #include "confdefs.h"
16682 /* System header to define __stub macros and hopefully few prototypes,
16683     which can conflict with char $ac_func(); below.  */
16684 #include <assert.h>
16685 /* Override any gcc2 internal prototype to avoid an error.  */
16686 /* We use char because int might match the return type of a gcc2
16687     builtin and then its argument prototype would still apply.  */
16688 char $ac_func();
16689 char (*f)();
16690
16691 int main() {
16692
16693 /* The GNU C library defines this for functions which it implements
16694     to always fail with ENOSYS.  Some functions are actually named
16695     something starting with __ and the normal name is an alias.  */
16696 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16697 choke me
16698 #else
16699 f = $ac_func;
16700 #endif
16701
16702 ; return 0; }
16703 EOF
16704 if { (eval echo configure:16705: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16705   rm -rf conftest*
16706   eval "ac_cv_func_$ac_func=yes"
16707 else
16708   echo "configure: failed program was:" >&5
16709   cat conftest.$ac_ext >&5
16710   rm -rf conftest*
16711   eval "ac_cv_func_$ac_func=no"
16712 fi
16713 rm -f conftest*
16714 fi
16715
16716 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
16717   echo "$ac_t""yes" 1>&6
16718     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
16719   cat >> confdefs.h <<EOF
16720 #define $ac_tr_func 1
16721 EOF
16722  
16723 else
16724   echo "$ac_t""no" 1>&6
16725 fi
16726 done
16727
16728
16729 if test "$ac_cv_func_ctime_r" = no ; then
16730         ol_cv_func_ctime_r_nargs=0
16731 else
16732         echo $ac_n "checking number of arguments of ctime_r""... $ac_c" 1>&6
16733 echo "configure:16734: checking number of arguments of ctime_r" >&5
16734 if eval "test \"\${ol_cv_func_ctime_r_nargs+set}\" = set"; then
16735   echo $ac_n "(cached) $ac_c" 1>&6
16736 else
16737   cat > conftest.$ac_ext <<EOF
16738 #line 16739 "configure"
16739 #include "confdefs.h"
16740 #include <time.h>
16741 int main() {
16742 time_t ti; char *buffer; ctime_r(&ti,buffer,32);
16743 ; return 0; }
16744 EOF
16745 if { (eval echo configure:16746: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16746   rm -rf conftest*
16747   ol_cv_func_ctime_r_nargs3=yes
16748 else
16749   echo "configure: failed program was:" >&5
16750   cat conftest.$ac_ext >&5
16751   rm -rf conftest*
16752   ol_cv_func_ctime_r_nargs3=no
16753 fi
16754 rm -f conftest*
16755
16756         cat > conftest.$ac_ext <<EOF
16757 #line 16758 "configure"
16758 #include "confdefs.h"
16759 #include <time.h>
16760 int main() {
16761 time_t ti; char *buffer; ctime_r(&ti,buffer);
16762 ; return 0; }
16763 EOF
16764 if { (eval echo configure:16765: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16765   rm -rf conftest*
16766   ol_cv_func_ctime_r_nargs2=yes
16767 else
16768   echo "configure: failed program was:" >&5
16769   cat conftest.$ac_ext >&5
16770   rm -rf conftest*
16771   ol_cv_func_ctime_r_nargs2=no
16772 fi
16773 rm -f conftest*
16774
16775         if test $ol_cv_func_ctime_r_nargs3 = yes -a \
16776                 $ol_cv_func_ctime_r_nargs2 = no ; then
16777
16778                 ol_cv_func_ctime_r_nargs=3
16779
16780         elif test $ol_cv_func_ctime_r_nargs3 = no -a \
16781                 $ol_cv_func_ctime_r_nargs2 = yes ; then
16782
16783                 ol_cv_func_ctime_r_nargs=2
16784
16785         else
16786                 ol_cv_func_ctime_r_nargs=0
16787         fi
16788   
16789 fi
16790
16791 echo "$ac_t""$ol_cv_func_ctime_r_nargs" 1>&6
16792
16793   if test $ol_cv_func_ctime_r_nargs -gt 1 ; then
16794         cat >> confdefs.h <<EOF
16795 #define CTIME_R_NARGS $ol_cv_func_ctime_r_nargs
16796 EOF
16797
16798   fi
16799
16800 fi
16801
16802 if test "$ac_cv_func_gethostbyname_r" = yes ; then
16803         echo $ac_n "checking number of arguments of gethostbyname_r""... $ac_c" 1>&6
16804 echo "configure:16805: checking number of arguments of gethostbyname_r" >&5
16805 if eval "test \"\${ol_cv_func_gethostbyname_r_nargs+set}\" = set"; then
16806   echo $ac_n "(cached) $ac_c" 1>&6
16807 else
16808   cat > conftest.$ac_ext <<EOF
16809 #line 16810 "configure"
16810 #include "confdefs.h"
16811 #include <sys/types.h>
16812 #include <sys/socket.h>
16813 #include <netinet/in.h>
16814 #include <netdb.h>
16815 #define BUFSIZE (sizeof(struct hostent)+10)
16816 int main() {
16817 struct hostent hent; char buffer[BUFSIZE];
16818                 int bufsize=BUFSIZE;int h_errno;
16819                 (void)gethostbyname_r("segovia.cs.purdue.edu", &hent,
16820                         buffer, bufsize, &h_errno);
16821 ; return 0; }
16822 EOF
16823 if { (eval echo configure:16824: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16824   rm -rf conftest*
16825   ol_cv_func_gethostbyname_r_nargs5=yes
16826 else
16827   echo "configure: failed program was:" >&5
16828   cat conftest.$ac_ext >&5
16829   rm -rf conftest*
16830   ol_cv_func_gethostbyname_r_nargs5=no
16831 fi
16832 rm -f conftest*
16833
16834         cat > conftest.$ac_ext <<EOF
16835 #line 16836 "configure"
16836 #include "confdefs.h"
16837 #include <sys/types.h>
16838 #include <sys/socket.h>
16839 #include <netinet/in.h>
16840 #include <netdb.h>
16841 #define BUFSIZE (sizeof(struct hostent)+10)
16842 int main() {
16843 struct hostent hent;struct hostent *rhent;
16844                 char buffer[BUFSIZE];
16845                 int bufsize=BUFSIZE;int h_errno;
16846                 (void)gethostbyname_r("localhost", &hent, buffer, bufsize,
16847                         &rhent, &h_errno);
16848 ; return 0; }
16849 EOF
16850 if { (eval echo configure:16851: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16851   rm -rf conftest*
16852   ol_cv_func_gethostbyname_r_nargs6=yes
16853 else
16854   echo "configure: failed program was:" >&5
16855   cat conftest.$ac_ext >&5
16856   rm -rf conftest*
16857   ol_cv_func_gethostbyname_r_nargs6=no
16858 fi
16859 rm -f conftest*
16860
16861         if test $ol_cv_func_gethostbyname_r_nargs5 = yes -a \
16862                 $ol_cv_func_gethostbyname_r_nargs6 = no ; then
16863
16864                 ol_cv_func_gethostbyname_r_nargs=5
16865
16866         elif test $ol_cv_func_gethostbyname_r_nargs5 = no -a \
16867                 $ol_cv_func_gethostbyname_r_nargs6 = yes ; then
16868
16869                 ol_cv_func_gethostbyname_r_nargs=6
16870
16871         else
16872                 ol_cv_func_gethostbyname_r_nargs=0
16873         fi
16874   
16875 fi
16876
16877 echo "$ac_t""$ol_cv_func_gethostbyname_r_nargs" 1>&6
16878   if test $ol_cv_func_gethostbyname_r_nargs -gt 1 ; then
16879         cat >> confdefs.h <<EOF
16880 #define GETHOSTBYNAME_R_NARGS $ol_cv_func_gethostbyname_r_nargs
16881 EOF
16882
16883   fi
16884
16885 else
16886         ol_cv_func_gethostbyname_r_nargs=0
16887 fi
16888  
16889 if test "$ac_cv_func_gethostbyaddr_r" = yes ; then
16890         echo $ac_n "checking number of arguments of gethostbyaddr_r""... $ac_c" 1>&6
16891 echo "configure:16892: checking number of arguments of gethostbyaddr_r" >&5
16892 if eval "test \"\${ol_cv_func_gethostbyaddr_r_nargs+set}\" = set"; then
16893   echo $ac_n "(cached) $ac_c" 1>&6
16894 else
16895   cat > conftest.$ac_ext <<EOF
16896 #line 16897 "configure"
16897 #include "confdefs.h"
16898 #include <sys/types.h>
16899 #include <sys/socket.h>
16900 #include <netinet/in.h>
16901 #include <netdb.h>
16902 #define BUFSIZE (sizeof(struct hostent)+10)
16903 int main() {
16904 struct hostent hent; char buffer[BUFSIZE]; 
16905             struct in_addr add;
16906             size_t alen=sizeof(struct in_addr);
16907             int bufsize=BUFSIZE;int h_errno;
16908                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
16909                         alen, AF_INET, &hent, buffer, bufsize, &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_nargs7=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_nargs7=no
16920 fi
16921 rm -f conftest*
16922
16923         cat > conftest.$ac_ext <<EOF
16924 #line 16925 "configure"
16925 #include "confdefs.h"
16926 #include <sys/types.h>
16927 #include <sys/socket.h>
16928 #include <netinet/in.h>
16929 #include <netdb.h>
16930 #define BUFSIZE (sizeof(struct hostent)+10)
16931 int main() {
16932 struct hostent hent;
16933                 struct hostent *rhent; char buffer[BUFSIZE]; 
16934                 struct in_addr add;
16935                 size_t alen=sizeof(struct in_addr);
16936                 int bufsize=BUFSIZE;int h_errno;
16937                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
16938                         alen, AF_INET, &hent, buffer, bufsize, 
16939                         &rhent, &h_errno);
16940 ; return 0; }
16941 EOF
16942 if { (eval echo configure:16943: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16943   rm -rf conftest*
16944   ol_cv_func_gethostbyaddr_r_nargs8=yes
16945 else
16946   echo "configure: failed program was:" >&5
16947   cat conftest.$ac_ext >&5
16948   rm -rf conftest*
16949   ol_cv_func_gethostbyaddr_r_nargs8=no
16950 fi
16951 rm -f conftest*
16952
16953         if test $ol_cv_func_gethostbyaddr_r_nargs7 = yes -a \
16954                 $ol_cv_func_gethostbyaddr_r_nargs8 = no ; then
16955
16956                 ol_cv_func_gethostbyaddr_r_nargs=7
16957
16958         elif test $ol_cv_func_gethostbyaddr_r_nargs7 = no -a \
16959                 $ol_cv_func_gethostbyaddr_r_nargs8 = yes ; then
16960
16961                 ol_cv_func_gethostbyaddr_r_nargs=8
16962
16963         else
16964                 ol_cv_func_gethostbyaddr_r_nargs=0
16965         fi
16966   
16967 fi
16968
16969 echo "$ac_t""$ol_cv_func_gethostbyaddr_r_nargs" 1>&6
16970   if test $ol_cv_func_gethostbyaddr_r_nargs -gt 1 ; then
16971     cat >> confdefs.h <<EOF
16972 #define GETHOSTBYADDR_R_NARGS $ol_cv_func_gethostbyaddr_r_nargs
16973 EOF
16974
16975   fi
16976
16977 else
16978         ol_cv_func_gethostbyaddr_r_nargs=0
16979 fi
16980
16981 ol_link_ldbm=no 
16982
16983 if test $ol_with_ldbm_api = auto \
16984         -o $ol_with_ldbm_api = berkeley \
16985         -o $ol_with_ldbm_api = bcompat ; then
16986
16987         if test $ol_with_ldbm_api = bcompat; then \
16988                 for ac_hdr in db_185.h db.h
16989 do
16990 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16991 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16992 echo "configure:16993: checking for $ac_hdr" >&5
16993 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16994   echo $ac_n "(cached) $ac_c" 1>&6
16995 else
16996   cat > conftest.$ac_ext <<EOF
16997 #line 16998 "configure"
16998 #include "confdefs.h"
16999 #include <$ac_hdr>
17000 EOF
17001 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
17002 { (eval echo configure:17003: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
17003 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
17004 if test -z "$ac_err"; then
17005   rm -rf conftest*
17006   eval "ac_cv_header_$ac_safe=yes"
17007 else
17008   echo "$ac_err" >&5
17009   echo "configure: failed program was:" >&5
17010   cat conftest.$ac_ext >&5
17011   rm -rf conftest*
17012   eval "ac_cv_header_$ac_safe=no"
17013 fi
17014 rm -f conftest*
17015 fi
17016 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
17017   echo "$ac_t""yes" 1>&6
17018     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
17019   cat >> confdefs.h <<EOF
17020 #define $ac_tr_hdr 1
17021 EOF
17022  
17023 else
17024   echo "$ac_t""no" 1>&6
17025 fi
17026 done
17027
17028 if test $ac_cv_header_db_185_h = yes -o $ac_cv_header_db_h = yes; then
17029         echo $ac_n "checking if Berkeley DB header compatibility""... $ac_c" 1>&6
17030 echo "configure:17031: checking if Berkeley DB header compatibility" >&5
17031 if eval "test \"\${ol_cv_header_db1+set}\" = set"; then
17032   echo $ac_n "(cached) $ac_c" 1>&6
17033 else
17034   
17035                 cat > conftest.$ac_ext <<EOF
17036 #line 17037 "configure"
17037 #include "confdefs.h"
17038
17039 #if HAVE_DB_185_H
17040 #       include <db_185.h>
17041 #else
17042 #       include <db.h>
17043 #endif
17044
17045  /* this check could be improved */
17046 #ifndef DB_VERSION_MAJOR
17047 #       define DB_VERSION_MAJOR 1
17048 #endif
17049
17050 #if DB_VERSION_MAJOR == 1 
17051         __db_version_1
17052 #endif
17053
17054 EOF
17055 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
17056   egrep "__db_version_1" >/dev/null 2>&1; then
17057   rm -rf conftest*
17058   ol_cv_header_db1=yes
17059 else
17060   rm -rf conftest*
17061   ol_cv_header_db1=no
17062 fi
17063 rm -f conftest*
17064
17065 fi
17066
17067 echo "$ac_t""$ol_cv_header_db1" 1>&6
17068
17069         if test $ol_cv_header_db1 = yes ; then
17070                 ol_cv_lib_db=no
17071 if test $ol_cv_lib_db = no ; then
17072         echo $ac_n "checking for Berkeley DB link (default)""... $ac_c" 1>&6
17073 echo "configure:17074: checking for Berkeley DB link (default)" >&5
17074 if eval "test \"\${ol_cv_db_none+set}\" = set"; then
17075   echo $ac_n "(cached) $ac_c" 1>&6
17076 else
17077   
17078         ol_DB_LIB=
17079         ol_LIBS=$LIBS
17080         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17081
17082         cat > conftest.$ac_ext <<EOF
17083 #line 17084 "configure"
17084 #include "confdefs.h"
17085
17086 #ifdef HAVE_DB_185_H
17087 # include <db_185.h>
17088 #else
17089 # include <db.h>
17090 #endif
17091
17092 #ifndef DB_VERSION_MAJOR
17093 # define DB_VERSION_MAJOR 1
17094 #endif
17095
17096 #ifndef NULL
17097 #define NULL ((void*)0)
17098 #endif
17099
17100 int main() {
17101
17102 #if DB_VERSION_MAJOR > 1
17103         {
17104                 char *version;
17105                 int major, minor, patch;
17106
17107                 version = db_version( &major, &minor, &patch );
17108
17109                 if( major != DB_VERSION_MAJOR ||
17110                         minor < DB_VERSION_MINOR )
17111                 {
17112                         printf("Berkeley DB version mismatch\n"
17113                                 "\theader: %s\n\tlibrary: %s\n",
17114                                 DB_VERSION_STRING, version);
17115                         return 1;
17116                 }
17117         }
17118 #endif
17119
17120 #if DB_VERSION_MAJOR > 2
17121         db_env_create( NULL, 0 );
17122 #elif DB_VERSION_MAJOR > 1
17123         db_appexit( NULL );
17124 #else
17125         (void) dbopen( NULL, 0, 0, 0, NULL);
17126 #endif
17127
17128 ; return 0; }
17129 EOF
17130 if { (eval echo configure:17131: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17131   rm -rf conftest*
17132   ol_cv_db_none=yes
17133 else
17134   echo "configure: failed program was:" >&5
17135   cat conftest.$ac_ext >&5
17136   rm -rf conftest*
17137   ol_cv_db_none=no
17138 fi
17139 rm -f conftest*
17140
17141         LIBS="$ol_LIBS"
17142
17143 fi
17144
17145 echo "$ac_t""$ol_cv_db_none" 1>&6
17146
17147         if test $ol_cv_db_none = yes ; then
17148                 ol_cv_lib_db=yes
17149         fi
17150 fi
17151
17152 if test $ol_cv_lib_db = no ; then
17153         echo $ac_n "checking for Berkeley DB link (-ldb43)""... $ac_c" 1>&6
17154 echo "configure:17155: checking for Berkeley DB link (-ldb43)" >&5
17155 if eval "test \"\${ol_cv_db_db43+set}\" = set"; then
17156   echo $ac_n "(cached) $ac_c" 1>&6
17157 else
17158   
17159         ol_DB_LIB=-ldb43
17160         ol_LIBS=$LIBS
17161         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17162
17163         cat > conftest.$ac_ext <<EOF
17164 #line 17165 "configure"
17165 #include "confdefs.h"
17166
17167 #ifdef HAVE_DB_185_H
17168 # include <db_185.h>
17169 #else
17170 # include <db.h>
17171 #endif
17172
17173 #ifndef DB_VERSION_MAJOR
17174 # define DB_VERSION_MAJOR 1
17175 #endif
17176
17177 #ifndef NULL
17178 #define NULL ((void*)0)
17179 #endif
17180
17181 int main() {
17182
17183 #if DB_VERSION_MAJOR > 1
17184         {
17185                 char *version;
17186                 int major, minor, patch;
17187
17188                 version = db_version( &major, &minor, &patch );
17189
17190                 if( major != DB_VERSION_MAJOR ||
17191                         minor < DB_VERSION_MINOR )
17192                 {
17193                         printf("Berkeley DB version mismatch\n"
17194                                 "\theader: %s\n\tlibrary: %s\n",
17195                                 DB_VERSION_STRING, version);
17196                         return 1;
17197                 }
17198         }
17199 #endif
17200
17201 #if DB_VERSION_MAJOR > 2
17202         db_env_create( NULL, 0 );
17203 #elif DB_VERSION_MAJOR > 1
17204         db_appexit( NULL );
17205 #else
17206         (void) dbopen( NULL, 0, 0, 0, NULL);
17207 #endif
17208
17209 ; return 0; }
17210 EOF
17211 if { (eval echo configure:17212: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17212   rm -rf conftest*
17213   ol_cv_db_db43=yes
17214 else
17215   echo "configure: failed program was:" >&5
17216   cat conftest.$ac_ext >&5
17217   rm -rf conftest*
17218   ol_cv_db_db43=no
17219 fi
17220 rm -f conftest*
17221
17222         LIBS="$ol_LIBS"
17223
17224 fi
17225
17226 echo "$ac_t""$ol_cv_db_db43" 1>&6
17227
17228         if test $ol_cv_db_db43 = yes ; then
17229                 ol_cv_lib_db=-ldb43
17230         fi
17231 fi
17232
17233 if test $ol_cv_lib_db = no ; then
17234         echo $ac_n "checking for Berkeley DB link (-ldb-43)""... $ac_c" 1>&6
17235 echo "configure:17236: checking for Berkeley DB link (-ldb-43)" >&5
17236 if eval "test \"\${ol_cv_db_db_43+set}\" = set"; then
17237   echo $ac_n "(cached) $ac_c" 1>&6
17238 else
17239   
17240         ol_DB_LIB=-ldb-43
17241         ol_LIBS=$LIBS
17242         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17243
17244         cat > conftest.$ac_ext <<EOF
17245 #line 17246 "configure"
17246 #include "confdefs.h"
17247
17248 #ifdef HAVE_DB_185_H
17249 # include <db_185.h>
17250 #else
17251 # include <db.h>
17252 #endif
17253
17254 #ifndef DB_VERSION_MAJOR
17255 # define DB_VERSION_MAJOR 1
17256 #endif
17257
17258 #ifndef NULL
17259 #define NULL ((void*)0)
17260 #endif
17261
17262 int main() {
17263
17264 #if DB_VERSION_MAJOR > 1
17265         {
17266                 char *version;
17267                 int major, minor, patch;
17268
17269                 version = db_version( &major, &minor, &patch );
17270
17271                 if( major != DB_VERSION_MAJOR ||
17272                         minor < DB_VERSION_MINOR )
17273                 {
17274                         printf("Berkeley DB version mismatch\n"
17275                                 "\theader: %s\n\tlibrary: %s\n",
17276                                 DB_VERSION_STRING, version);
17277                         return 1;
17278                 }
17279         }
17280 #endif
17281
17282 #if DB_VERSION_MAJOR > 2
17283         db_env_create( NULL, 0 );
17284 #elif DB_VERSION_MAJOR > 1
17285         db_appexit( NULL );
17286 #else
17287         (void) dbopen( NULL, 0, 0, 0, NULL);
17288 #endif
17289
17290 ; return 0; }
17291 EOF
17292 if { (eval echo configure:17293: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17293   rm -rf conftest*
17294   ol_cv_db_db_43=yes
17295 else
17296   echo "configure: failed program was:" >&5
17297   cat conftest.$ac_ext >&5
17298   rm -rf conftest*
17299   ol_cv_db_db_43=no
17300 fi
17301 rm -f conftest*
17302
17303         LIBS="$ol_LIBS"
17304
17305 fi
17306
17307 echo "$ac_t""$ol_cv_db_db_43" 1>&6
17308
17309         if test $ol_cv_db_db_43 = yes ; then
17310                 ol_cv_lib_db=-ldb-43
17311         fi
17312 fi
17313
17314 if test $ol_cv_lib_db = no ; then
17315         echo $ac_n "checking for Berkeley DB link (-ldb-4.3)""... $ac_c" 1>&6
17316 echo "configure:17317: checking for Berkeley DB link (-ldb-4.3)" >&5
17317 if eval "test \"\${ol_cv_db_db_4_dot_3+set}\" = set"; then
17318   echo $ac_n "(cached) $ac_c" 1>&6
17319 else
17320   
17321         ol_DB_LIB=-ldb-4.3
17322         ol_LIBS=$LIBS
17323         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17324
17325         cat > conftest.$ac_ext <<EOF
17326 #line 17327 "configure"
17327 #include "confdefs.h"
17328
17329 #ifdef HAVE_DB_185_H
17330 # include <db_185.h>
17331 #else
17332 # include <db.h>
17333 #endif
17334
17335 #ifndef DB_VERSION_MAJOR
17336 # define DB_VERSION_MAJOR 1
17337 #endif
17338
17339 #ifndef NULL
17340 #define NULL ((void*)0)
17341 #endif
17342
17343 int main() {
17344
17345 #if DB_VERSION_MAJOR > 1
17346         {
17347                 char *version;
17348                 int major, minor, patch;
17349
17350                 version = db_version( &major, &minor, &patch );
17351
17352                 if( major != DB_VERSION_MAJOR ||
17353                         minor < DB_VERSION_MINOR )
17354                 {
17355                         printf("Berkeley DB version mismatch\n"
17356                                 "\theader: %s\n\tlibrary: %s\n",
17357                                 DB_VERSION_STRING, version);
17358                         return 1;
17359                 }
17360         }
17361 #endif
17362
17363 #if DB_VERSION_MAJOR > 2
17364         db_env_create( NULL, 0 );
17365 #elif DB_VERSION_MAJOR > 1
17366         db_appexit( NULL );
17367 #else
17368         (void) dbopen( NULL, 0, 0, 0, NULL);
17369 #endif
17370
17371 ; return 0; }
17372 EOF
17373 if { (eval echo configure:17374: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17374   rm -rf conftest*
17375   ol_cv_db_db_4_dot_3=yes
17376 else
17377   echo "configure: failed program was:" >&5
17378   cat conftest.$ac_ext >&5
17379   rm -rf conftest*
17380   ol_cv_db_db_4_dot_3=no
17381 fi
17382 rm -f conftest*
17383
17384         LIBS="$ol_LIBS"
17385
17386 fi
17387
17388 echo "$ac_t""$ol_cv_db_db_4_dot_3" 1>&6
17389
17390         if test $ol_cv_db_db_4_dot_3 = yes ; then
17391                 ol_cv_lib_db=-ldb-4.3
17392         fi
17393 fi
17394
17395 if test $ol_cv_lib_db = no ; then
17396         echo $ac_n "checking for Berkeley DB link (-ldb-4-3)""... $ac_c" 1>&6
17397 echo "configure:17398: checking for Berkeley DB link (-ldb-4-3)" >&5
17398 if eval "test \"\${ol_cv_db_db_4_3+set}\" = set"; then
17399   echo $ac_n "(cached) $ac_c" 1>&6
17400 else
17401   
17402         ol_DB_LIB=-ldb-4-3
17403         ol_LIBS=$LIBS
17404         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17405
17406         cat > conftest.$ac_ext <<EOF
17407 #line 17408 "configure"
17408 #include "confdefs.h"
17409
17410 #ifdef HAVE_DB_185_H
17411 # include <db_185.h>
17412 #else
17413 # include <db.h>
17414 #endif
17415
17416 #ifndef DB_VERSION_MAJOR
17417 # define DB_VERSION_MAJOR 1
17418 #endif
17419
17420 #ifndef NULL
17421 #define NULL ((void*)0)
17422 #endif
17423
17424 int main() {
17425
17426 #if DB_VERSION_MAJOR > 1
17427         {
17428                 char *version;
17429                 int major, minor, patch;
17430
17431                 version = db_version( &major, &minor, &patch );
17432
17433                 if( major != DB_VERSION_MAJOR ||
17434                         minor < DB_VERSION_MINOR )
17435                 {
17436                         printf("Berkeley DB version mismatch\n"
17437                                 "\theader: %s\n\tlibrary: %s\n",
17438                                 DB_VERSION_STRING, version);
17439                         return 1;
17440                 }
17441         }
17442 #endif
17443
17444 #if DB_VERSION_MAJOR > 2
17445         db_env_create( NULL, 0 );
17446 #elif DB_VERSION_MAJOR > 1
17447         db_appexit( NULL );
17448 #else
17449         (void) dbopen( NULL, 0, 0, 0, NULL);
17450 #endif
17451
17452 ; return 0; }
17453 EOF
17454 if { (eval echo configure:17455: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17455   rm -rf conftest*
17456   ol_cv_db_db_4_3=yes
17457 else
17458   echo "configure: failed program was:" >&5
17459   cat conftest.$ac_ext >&5
17460   rm -rf conftest*
17461   ol_cv_db_db_4_3=no
17462 fi
17463 rm -f conftest*
17464
17465         LIBS="$ol_LIBS"
17466
17467 fi
17468
17469 echo "$ac_t""$ol_cv_db_db_4_3" 1>&6
17470
17471         if test $ol_cv_db_db_4_3 = yes ; then
17472                 ol_cv_lib_db=-ldb-4-3
17473         fi
17474 fi
17475
17476 if test $ol_cv_lib_db = no ; then
17477         echo $ac_n "checking for Berkeley DB link (-ldb42)""... $ac_c" 1>&6
17478 echo "configure:17479: checking for Berkeley DB link (-ldb42)" >&5
17479 if eval "test \"\${ol_cv_db_db42+set}\" = set"; then
17480   echo $ac_n "(cached) $ac_c" 1>&6
17481 else
17482   
17483         ol_DB_LIB=-ldb42
17484         ol_LIBS=$LIBS
17485         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17486
17487         cat > conftest.$ac_ext <<EOF
17488 #line 17489 "configure"
17489 #include "confdefs.h"
17490
17491 #ifdef HAVE_DB_185_H
17492 # include <db_185.h>
17493 #else
17494 # include <db.h>
17495 #endif
17496
17497 #ifndef DB_VERSION_MAJOR
17498 # define DB_VERSION_MAJOR 1
17499 #endif
17500
17501 #ifndef NULL
17502 #define NULL ((void*)0)
17503 #endif
17504
17505 int main() {
17506
17507 #if DB_VERSION_MAJOR > 1
17508         {
17509                 char *version;
17510                 int major, minor, patch;
17511
17512                 version = db_version( &major, &minor, &patch );
17513
17514                 if( major != DB_VERSION_MAJOR ||
17515                         minor < DB_VERSION_MINOR )
17516                 {
17517                         printf("Berkeley DB version mismatch\n"
17518                                 "\theader: %s\n\tlibrary: %s\n",
17519                                 DB_VERSION_STRING, version);
17520                         return 1;
17521                 }
17522         }
17523 #endif
17524
17525 #if DB_VERSION_MAJOR > 2
17526         db_env_create( NULL, 0 );
17527 #elif DB_VERSION_MAJOR > 1
17528         db_appexit( NULL );
17529 #else
17530         (void) dbopen( NULL, 0, 0, 0, NULL);
17531 #endif
17532
17533 ; return 0; }
17534 EOF
17535 if { (eval echo configure:17536: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17536   rm -rf conftest*
17537   ol_cv_db_db42=yes
17538 else
17539   echo "configure: failed program was:" >&5
17540   cat conftest.$ac_ext >&5
17541   rm -rf conftest*
17542   ol_cv_db_db42=no
17543 fi
17544 rm -f conftest*
17545
17546         LIBS="$ol_LIBS"
17547
17548 fi
17549
17550 echo "$ac_t""$ol_cv_db_db42" 1>&6
17551
17552         if test $ol_cv_db_db42 = yes ; then
17553                 ol_cv_lib_db=-ldb42
17554         fi
17555 fi
17556
17557 if test $ol_cv_lib_db = no ; then
17558         echo $ac_n "checking for Berkeley DB link (-ldb-42)""... $ac_c" 1>&6
17559 echo "configure:17560: checking for Berkeley DB link (-ldb-42)" >&5
17560 if eval "test \"\${ol_cv_db_db_42+set}\" = set"; then
17561   echo $ac_n "(cached) $ac_c" 1>&6
17562 else
17563   
17564         ol_DB_LIB=-ldb-42
17565         ol_LIBS=$LIBS
17566         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17567
17568         cat > conftest.$ac_ext <<EOF
17569 #line 17570 "configure"
17570 #include "confdefs.h"
17571
17572 #ifdef HAVE_DB_185_H
17573 # include <db_185.h>
17574 #else
17575 # include <db.h>
17576 #endif
17577
17578 #ifndef DB_VERSION_MAJOR
17579 # define DB_VERSION_MAJOR 1
17580 #endif
17581
17582 #ifndef NULL
17583 #define NULL ((void*)0)
17584 #endif
17585
17586 int main() {
17587
17588 #if DB_VERSION_MAJOR > 1
17589         {
17590                 char *version;
17591                 int major, minor, patch;
17592
17593                 version = db_version( &major, &minor, &patch );
17594
17595                 if( major != DB_VERSION_MAJOR ||
17596                         minor < DB_VERSION_MINOR )
17597                 {
17598                         printf("Berkeley DB version mismatch\n"
17599                                 "\theader: %s\n\tlibrary: %s\n",
17600                                 DB_VERSION_STRING, version);
17601                         return 1;
17602                 }
17603         }
17604 #endif
17605
17606 #if DB_VERSION_MAJOR > 2
17607         db_env_create( NULL, 0 );
17608 #elif DB_VERSION_MAJOR > 1
17609         db_appexit( NULL );
17610 #else
17611         (void) dbopen( NULL, 0, 0, 0, NULL);
17612 #endif
17613
17614 ; return 0; }
17615 EOF
17616 if { (eval echo configure:17617: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17617   rm -rf conftest*
17618   ol_cv_db_db_42=yes
17619 else
17620   echo "configure: failed program was:" >&5
17621   cat conftest.$ac_ext >&5
17622   rm -rf conftest*
17623   ol_cv_db_db_42=no
17624 fi
17625 rm -f conftest*
17626
17627         LIBS="$ol_LIBS"
17628
17629 fi
17630
17631 echo "$ac_t""$ol_cv_db_db_42" 1>&6
17632
17633         if test $ol_cv_db_db_42 = yes ; then
17634                 ol_cv_lib_db=-ldb-42
17635         fi
17636 fi
17637
17638 if test $ol_cv_lib_db = no ; then
17639         echo $ac_n "checking for Berkeley DB link (-ldb-4.2)""... $ac_c" 1>&6
17640 echo "configure:17641: checking for Berkeley DB link (-ldb-4.2)" >&5
17641 if eval "test \"\${ol_cv_db_db_4_dot_2+set}\" = set"; then
17642   echo $ac_n "(cached) $ac_c" 1>&6
17643 else
17644   
17645         ol_DB_LIB=-ldb-4.2
17646         ol_LIBS=$LIBS
17647         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17648
17649         cat > conftest.$ac_ext <<EOF
17650 #line 17651 "configure"
17651 #include "confdefs.h"
17652
17653 #ifdef HAVE_DB_185_H
17654 # include <db_185.h>
17655 #else
17656 # include <db.h>
17657 #endif
17658
17659 #ifndef DB_VERSION_MAJOR
17660 # define DB_VERSION_MAJOR 1
17661 #endif
17662
17663 #ifndef NULL
17664 #define NULL ((void*)0)
17665 #endif
17666
17667 int main() {
17668
17669 #if DB_VERSION_MAJOR > 1
17670         {
17671                 char *version;
17672                 int major, minor, patch;
17673
17674                 version = db_version( &major, &minor, &patch );
17675
17676                 if( major != DB_VERSION_MAJOR ||
17677                         minor < DB_VERSION_MINOR )
17678                 {
17679                         printf("Berkeley DB version mismatch\n"
17680                                 "\theader: %s\n\tlibrary: %s\n",
17681                                 DB_VERSION_STRING, version);
17682                         return 1;
17683                 }
17684         }
17685 #endif
17686
17687 #if DB_VERSION_MAJOR > 2
17688         db_env_create( NULL, 0 );
17689 #elif DB_VERSION_MAJOR > 1
17690         db_appexit( NULL );
17691 #else
17692         (void) dbopen( NULL, 0, 0, 0, NULL);
17693 #endif
17694
17695 ; return 0; }
17696 EOF
17697 if { (eval echo configure:17698: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17698   rm -rf conftest*
17699   ol_cv_db_db_4_dot_2=yes
17700 else
17701   echo "configure: failed program was:" >&5
17702   cat conftest.$ac_ext >&5
17703   rm -rf conftest*
17704   ol_cv_db_db_4_dot_2=no
17705 fi
17706 rm -f conftest*
17707
17708         LIBS="$ol_LIBS"
17709
17710 fi
17711
17712 echo "$ac_t""$ol_cv_db_db_4_dot_2" 1>&6
17713
17714         if test $ol_cv_db_db_4_dot_2 = yes ; then
17715                 ol_cv_lib_db=-ldb-4.2
17716         fi
17717 fi
17718
17719 if test $ol_cv_lib_db = no ; then
17720         echo $ac_n "checking for Berkeley DB link (-ldb-4-2)""... $ac_c" 1>&6
17721 echo "configure:17722: checking for Berkeley DB link (-ldb-4-2)" >&5
17722 if eval "test \"\${ol_cv_db_db_4_2+set}\" = set"; then
17723   echo $ac_n "(cached) $ac_c" 1>&6
17724 else
17725   
17726         ol_DB_LIB=-ldb-4-2
17727         ol_LIBS=$LIBS
17728         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17729
17730         cat > conftest.$ac_ext <<EOF
17731 #line 17732 "configure"
17732 #include "confdefs.h"
17733
17734 #ifdef HAVE_DB_185_H
17735 # include <db_185.h>
17736 #else
17737 # include <db.h>
17738 #endif
17739
17740 #ifndef DB_VERSION_MAJOR
17741 # define DB_VERSION_MAJOR 1
17742 #endif
17743
17744 #ifndef NULL
17745 #define NULL ((void*)0)
17746 #endif
17747
17748 int main() {
17749
17750 #if DB_VERSION_MAJOR > 1
17751         {
17752                 char *version;
17753                 int major, minor, patch;
17754
17755                 version = db_version( &major, &minor, &patch );
17756
17757                 if( major != DB_VERSION_MAJOR ||
17758                         minor < DB_VERSION_MINOR )
17759                 {
17760                         printf("Berkeley DB version mismatch\n"
17761                                 "\theader: %s\n\tlibrary: %s\n",
17762                                 DB_VERSION_STRING, version);
17763                         return 1;
17764                 }
17765         }
17766 #endif
17767
17768 #if DB_VERSION_MAJOR > 2
17769         db_env_create( NULL, 0 );
17770 #elif DB_VERSION_MAJOR > 1
17771         db_appexit( NULL );
17772 #else
17773         (void) dbopen( NULL, 0, 0, 0, NULL);
17774 #endif
17775
17776 ; return 0; }
17777 EOF
17778 if { (eval echo configure:17779: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17779   rm -rf conftest*
17780   ol_cv_db_db_4_2=yes
17781 else
17782   echo "configure: failed program was:" >&5
17783   cat conftest.$ac_ext >&5
17784   rm -rf conftest*
17785   ol_cv_db_db_4_2=no
17786 fi
17787 rm -f conftest*
17788
17789         LIBS="$ol_LIBS"
17790
17791 fi
17792
17793 echo "$ac_t""$ol_cv_db_db_4_2" 1>&6
17794
17795         if test $ol_cv_db_db_4_2 = yes ; then
17796                 ol_cv_lib_db=-ldb-4-2
17797         fi
17798 fi
17799
17800 if test $ol_cv_lib_db = no ; then
17801         echo $ac_n "checking for Berkeley DB link (-ldb-4)""... $ac_c" 1>&6
17802 echo "configure:17803: checking for Berkeley DB link (-ldb-4)" >&5
17803 if eval "test \"\${ol_cv_db_db_4+set}\" = set"; then
17804   echo $ac_n "(cached) $ac_c" 1>&6
17805 else
17806   
17807         ol_DB_LIB=-ldb-4
17808         ol_LIBS=$LIBS
17809         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17810
17811         cat > conftest.$ac_ext <<EOF
17812 #line 17813 "configure"
17813 #include "confdefs.h"
17814
17815 #ifdef HAVE_DB_185_H
17816 # include <db_185.h>
17817 #else
17818 # include <db.h>
17819 #endif
17820
17821 #ifndef DB_VERSION_MAJOR
17822 # define DB_VERSION_MAJOR 1
17823 #endif
17824
17825 #ifndef NULL
17826 #define NULL ((void*)0)
17827 #endif
17828
17829 int main() {
17830
17831 #if DB_VERSION_MAJOR > 1
17832         {
17833                 char *version;
17834                 int major, minor, patch;
17835
17836                 version = db_version( &major, &minor, &patch );
17837
17838                 if( major != DB_VERSION_MAJOR ||
17839                         minor < DB_VERSION_MINOR )
17840                 {
17841                         printf("Berkeley DB version mismatch\n"
17842                                 "\theader: %s\n\tlibrary: %s\n",
17843                                 DB_VERSION_STRING, version);
17844                         return 1;
17845                 }
17846         }
17847 #endif
17848
17849 #if DB_VERSION_MAJOR > 2
17850         db_env_create( NULL, 0 );
17851 #elif DB_VERSION_MAJOR > 1
17852         db_appexit( NULL );
17853 #else
17854         (void) dbopen( NULL, 0, 0, 0, NULL);
17855 #endif
17856
17857 ; return 0; }
17858 EOF
17859 if { (eval echo configure:17860: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17860   rm -rf conftest*
17861   ol_cv_db_db_4=yes
17862 else
17863   echo "configure: failed program was:" >&5
17864   cat conftest.$ac_ext >&5
17865   rm -rf conftest*
17866   ol_cv_db_db_4=no
17867 fi
17868 rm -f conftest*
17869
17870         LIBS="$ol_LIBS"
17871
17872 fi
17873
17874 echo "$ac_t""$ol_cv_db_db_4" 1>&6
17875
17876         if test $ol_cv_db_db_4 = yes ; then
17877                 ol_cv_lib_db=-ldb-4
17878         fi
17879 fi
17880
17881 if test $ol_cv_lib_db = no ; then
17882         echo $ac_n "checking for Berkeley DB link (-ldb4)""... $ac_c" 1>&6
17883 echo "configure:17884: checking for Berkeley DB link (-ldb4)" >&5
17884 if eval "test \"\${ol_cv_db_db4+set}\" = set"; then
17885   echo $ac_n "(cached) $ac_c" 1>&6
17886 else
17887   
17888         ol_DB_LIB=-ldb4
17889         ol_LIBS=$LIBS
17890         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17891
17892         cat > conftest.$ac_ext <<EOF
17893 #line 17894 "configure"
17894 #include "confdefs.h"
17895
17896 #ifdef HAVE_DB_185_H
17897 # include <db_185.h>
17898 #else
17899 # include <db.h>
17900 #endif
17901
17902 #ifndef DB_VERSION_MAJOR
17903 # define DB_VERSION_MAJOR 1
17904 #endif
17905
17906 #ifndef NULL
17907 #define NULL ((void*)0)
17908 #endif
17909
17910 int main() {
17911
17912 #if DB_VERSION_MAJOR > 1
17913         {
17914                 char *version;
17915                 int major, minor, patch;
17916
17917                 version = db_version( &major, &minor, &patch );
17918
17919                 if( major != DB_VERSION_MAJOR ||
17920                         minor < DB_VERSION_MINOR )
17921                 {
17922                         printf("Berkeley DB version mismatch\n"
17923                                 "\theader: %s\n\tlibrary: %s\n",
17924                                 DB_VERSION_STRING, version);
17925                         return 1;
17926                 }
17927         }
17928 #endif
17929
17930 #if DB_VERSION_MAJOR > 2
17931         db_env_create( NULL, 0 );
17932 #elif DB_VERSION_MAJOR > 1
17933         db_appexit( NULL );
17934 #else
17935         (void) dbopen( NULL, 0, 0, 0, NULL);
17936 #endif
17937
17938 ; return 0; }
17939 EOF
17940 if { (eval echo configure:17941: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17941   rm -rf conftest*
17942   ol_cv_db_db4=yes
17943 else
17944   echo "configure: failed program was:" >&5
17945   cat conftest.$ac_ext >&5
17946   rm -rf conftest*
17947   ol_cv_db_db4=no
17948 fi
17949 rm -f conftest*
17950
17951         LIBS="$ol_LIBS"
17952
17953 fi
17954
17955 echo "$ac_t""$ol_cv_db_db4" 1>&6
17956
17957         if test $ol_cv_db_db4 = yes ; then
17958                 ol_cv_lib_db=-ldb4
17959         fi
17960 fi
17961
17962 if test $ol_cv_lib_db = no ; then
17963         echo $ac_n "checking for Berkeley DB link (-ldb)""... $ac_c" 1>&6
17964 echo "configure:17965: checking for Berkeley DB link (-ldb)" >&5
17965 if eval "test \"\${ol_cv_db_db+set}\" = set"; then
17966   echo $ac_n "(cached) $ac_c" 1>&6
17967 else
17968   
17969         ol_DB_LIB=-ldb
17970         ol_LIBS=$LIBS
17971         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17972
17973         cat > conftest.$ac_ext <<EOF
17974 #line 17975 "configure"
17975 #include "confdefs.h"
17976
17977 #ifdef HAVE_DB_185_H
17978 # include <db_185.h>
17979 #else
17980 # include <db.h>
17981 #endif
17982
17983 #ifndef DB_VERSION_MAJOR
17984 # define DB_VERSION_MAJOR 1
17985 #endif
17986
17987 #ifndef NULL
17988 #define NULL ((void*)0)
17989 #endif
17990
17991 int main() {
17992
17993 #if DB_VERSION_MAJOR > 1
17994         {
17995                 char *version;
17996                 int major, minor, patch;
17997
17998                 version = db_version( &major, &minor, &patch );
17999
18000                 if( major != DB_VERSION_MAJOR ||
18001                         minor < DB_VERSION_MINOR )
18002                 {
18003                         printf("Berkeley DB version mismatch\n"
18004                                 "\theader: %s\n\tlibrary: %s\n",
18005                                 DB_VERSION_STRING, version);
18006                         return 1;
18007                 }
18008         }
18009 #endif
18010
18011 #if DB_VERSION_MAJOR > 2
18012         db_env_create( NULL, 0 );
18013 #elif DB_VERSION_MAJOR > 1
18014         db_appexit( NULL );
18015 #else
18016         (void) dbopen( NULL, 0, 0, 0, NULL);
18017 #endif
18018
18019 ; return 0; }
18020 EOF
18021 if { (eval echo configure:18022: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18022   rm -rf conftest*
18023   ol_cv_db_db=yes
18024 else
18025   echo "configure: failed program was:" >&5
18026   cat conftest.$ac_ext >&5
18027   rm -rf conftest*
18028   ol_cv_db_db=no
18029 fi
18030 rm -f conftest*
18031
18032         LIBS="$ol_LIBS"
18033
18034 fi
18035
18036 echo "$ac_t""$ol_cv_db_db" 1>&6
18037
18038         if test $ol_cv_db_db = yes ; then
18039                 ol_cv_lib_db=-ldb
18040         fi
18041 fi
18042
18043 if test $ol_cv_lib_db = no ; then
18044         echo $ac_n "checking for Berkeley DB link (-ldb41)""... $ac_c" 1>&6
18045 echo "configure:18046: checking for Berkeley DB link (-ldb41)" >&5
18046 if eval "test \"\${ol_cv_db_db41+set}\" = set"; then
18047   echo $ac_n "(cached) $ac_c" 1>&6
18048 else
18049   
18050         ol_DB_LIB=-ldb41
18051         ol_LIBS=$LIBS
18052         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18053
18054         cat > conftest.$ac_ext <<EOF
18055 #line 18056 "configure"
18056 #include "confdefs.h"
18057
18058 #ifdef HAVE_DB_185_H
18059 # include <db_185.h>
18060 #else
18061 # include <db.h>
18062 #endif
18063
18064 #ifndef DB_VERSION_MAJOR
18065 # define DB_VERSION_MAJOR 1
18066 #endif
18067
18068 #ifndef NULL
18069 #define NULL ((void*)0)
18070 #endif
18071
18072 int main() {
18073
18074 #if DB_VERSION_MAJOR > 1
18075         {
18076                 char *version;
18077                 int major, minor, patch;
18078
18079                 version = db_version( &major, &minor, &patch );
18080
18081                 if( major != DB_VERSION_MAJOR ||
18082                         minor < DB_VERSION_MINOR )
18083                 {
18084                         printf("Berkeley DB version mismatch\n"
18085                                 "\theader: %s\n\tlibrary: %s\n",
18086                                 DB_VERSION_STRING, version);
18087                         return 1;
18088                 }
18089         }
18090 #endif
18091
18092 #if DB_VERSION_MAJOR > 2
18093         db_env_create( NULL, 0 );
18094 #elif DB_VERSION_MAJOR > 1
18095         db_appexit( NULL );
18096 #else
18097         (void) dbopen( NULL, 0, 0, 0, NULL);
18098 #endif
18099
18100 ; return 0; }
18101 EOF
18102 if { (eval echo configure:18103: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18103   rm -rf conftest*
18104   ol_cv_db_db41=yes
18105 else
18106   echo "configure: failed program was:" >&5
18107   cat conftest.$ac_ext >&5
18108   rm -rf conftest*
18109   ol_cv_db_db41=no
18110 fi
18111 rm -f conftest*
18112
18113         LIBS="$ol_LIBS"
18114
18115 fi
18116
18117 echo "$ac_t""$ol_cv_db_db41" 1>&6
18118
18119         if test $ol_cv_db_db41 = yes ; then
18120                 ol_cv_lib_db=-ldb41
18121         fi
18122 fi
18123
18124 if test $ol_cv_lib_db = no ; then
18125         echo $ac_n "checking for Berkeley DB link (-ldb-41)""... $ac_c" 1>&6
18126 echo "configure:18127: checking for Berkeley DB link (-ldb-41)" >&5
18127 if eval "test \"\${ol_cv_db_db_41+set}\" = set"; then
18128   echo $ac_n "(cached) $ac_c" 1>&6
18129 else
18130   
18131         ol_DB_LIB=-ldb-41
18132         ol_LIBS=$LIBS
18133         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18134
18135         cat > conftest.$ac_ext <<EOF
18136 #line 18137 "configure"
18137 #include "confdefs.h"
18138
18139 #ifdef HAVE_DB_185_H
18140 # include <db_185.h>
18141 #else
18142 # include <db.h>
18143 #endif
18144
18145 #ifndef DB_VERSION_MAJOR
18146 # define DB_VERSION_MAJOR 1
18147 #endif
18148
18149 #ifndef NULL
18150 #define NULL ((void*)0)
18151 #endif
18152
18153 int main() {
18154
18155 #if DB_VERSION_MAJOR > 1
18156         {
18157                 char *version;
18158                 int major, minor, patch;
18159
18160                 version = db_version( &major, &minor, &patch );
18161
18162                 if( major != DB_VERSION_MAJOR ||
18163                         minor < DB_VERSION_MINOR )
18164                 {
18165                         printf("Berkeley DB version mismatch\n"
18166                                 "\theader: %s\n\tlibrary: %s\n",
18167                                 DB_VERSION_STRING, version);
18168                         return 1;
18169                 }
18170         }
18171 #endif
18172
18173 #if DB_VERSION_MAJOR > 2
18174         db_env_create( NULL, 0 );
18175 #elif DB_VERSION_MAJOR > 1
18176         db_appexit( NULL );
18177 #else
18178         (void) dbopen( NULL, 0, 0, 0, NULL);
18179 #endif
18180
18181 ; return 0; }
18182 EOF
18183 if { (eval echo configure:18184: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18184   rm -rf conftest*
18185   ol_cv_db_db_41=yes
18186 else
18187   echo "configure: failed program was:" >&5
18188   cat conftest.$ac_ext >&5
18189   rm -rf conftest*
18190   ol_cv_db_db_41=no
18191 fi
18192 rm -f conftest*
18193
18194         LIBS="$ol_LIBS"
18195
18196 fi
18197
18198 echo "$ac_t""$ol_cv_db_db_41" 1>&6
18199
18200         if test $ol_cv_db_db_41 = yes ; then
18201                 ol_cv_lib_db=-ldb-41
18202         fi
18203 fi
18204
18205 if test $ol_cv_lib_db = no ; then
18206         echo $ac_n "checking for Berkeley DB link (-ldb-4.1)""... $ac_c" 1>&6
18207 echo "configure:18208: checking for Berkeley DB link (-ldb-4.1)" >&5
18208 if eval "test \"\${ol_cv_db_db_4_dot_1+set}\" = set"; then
18209   echo $ac_n "(cached) $ac_c" 1>&6
18210 else
18211   
18212         ol_DB_LIB=-ldb-4.1
18213         ol_LIBS=$LIBS
18214         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18215
18216         cat > conftest.$ac_ext <<EOF
18217 #line 18218 "configure"
18218 #include "confdefs.h"
18219
18220 #ifdef HAVE_DB_185_H
18221 # include <db_185.h>
18222 #else
18223 # include <db.h>
18224 #endif
18225
18226 #ifndef DB_VERSION_MAJOR
18227 # define DB_VERSION_MAJOR 1
18228 #endif
18229
18230 #ifndef NULL
18231 #define NULL ((void*)0)
18232 #endif
18233
18234 int main() {
18235
18236 #if DB_VERSION_MAJOR > 1
18237         {
18238                 char *version;
18239                 int major, minor, patch;
18240
18241                 version = db_version( &major, &minor, &patch );
18242
18243                 if( major != DB_VERSION_MAJOR ||
18244                         minor < DB_VERSION_MINOR )
18245                 {
18246                         printf("Berkeley DB version mismatch\n"
18247                                 "\theader: %s\n\tlibrary: %s\n",
18248                                 DB_VERSION_STRING, version);
18249                         return 1;
18250                 }
18251         }
18252 #endif
18253
18254 #if DB_VERSION_MAJOR > 2
18255         db_env_create( NULL, 0 );
18256 #elif DB_VERSION_MAJOR > 1
18257         db_appexit( NULL );
18258 #else
18259         (void) dbopen( NULL, 0, 0, 0, NULL);
18260 #endif
18261
18262 ; return 0; }
18263 EOF
18264 if { (eval echo configure:18265: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18265   rm -rf conftest*
18266   ol_cv_db_db_4_dot_1=yes
18267 else
18268   echo "configure: failed program was:" >&5
18269   cat conftest.$ac_ext >&5
18270   rm -rf conftest*
18271   ol_cv_db_db_4_dot_1=no
18272 fi
18273 rm -f conftest*
18274
18275         LIBS="$ol_LIBS"
18276
18277 fi
18278
18279 echo "$ac_t""$ol_cv_db_db_4_dot_1" 1>&6
18280
18281         if test $ol_cv_db_db_4_dot_1 = yes ; then
18282                 ol_cv_lib_db=-ldb-4.1
18283         fi
18284 fi
18285
18286 if test $ol_cv_lib_db = no ; then
18287         echo $ac_n "checking for Berkeley DB link (-ldb-4-1)""... $ac_c" 1>&6
18288 echo "configure:18289: checking for Berkeley DB link (-ldb-4-1)" >&5
18289 if eval "test \"\${ol_cv_db_db_4_1+set}\" = set"; then
18290   echo $ac_n "(cached) $ac_c" 1>&6
18291 else
18292   
18293         ol_DB_LIB=-ldb-4-1
18294         ol_LIBS=$LIBS
18295         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18296
18297         cat > conftest.$ac_ext <<EOF
18298 #line 18299 "configure"
18299 #include "confdefs.h"
18300
18301 #ifdef HAVE_DB_185_H
18302 # include <db_185.h>
18303 #else
18304 # include <db.h>
18305 #endif
18306
18307 #ifndef DB_VERSION_MAJOR
18308 # define DB_VERSION_MAJOR 1
18309 #endif
18310
18311 #ifndef NULL
18312 #define NULL ((void*)0)
18313 #endif
18314
18315 int main() {
18316
18317 #if DB_VERSION_MAJOR > 1
18318         {
18319                 char *version;
18320                 int major, minor, patch;
18321
18322                 version = db_version( &major, &minor, &patch );
18323
18324                 if( major != DB_VERSION_MAJOR ||
18325                         minor < DB_VERSION_MINOR )
18326                 {
18327                         printf("Berkeley DB version mismatch\n"
18328                                 "\theader: %s\n\tlibrary: %s\n",
18329                                 DB_VERSION_STRING, version);
18330                         return 1;
18331                 }
18332         }
18333 #endif
18334
18335 #if DB_VERSION_MAJOR > 2
18336         db_env_create( NULL, 0 );
18337 #elif DB_VERSION_MAJOR > 1
18338         db_appexit( NULL );
18339 #else
18340         (void) dbopen( NULL, 0, 0, 0, NULL);
18341 #endif
18342
18343 ; return 0; }
18344 EOF
18345 if { (eval echo configure:18346: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18346   rm -rf conftest*
18347   ol_cv_db_db_4_1=yes
18348 else
18349   echo "configure: failed program was:" >&5
18350   cat conftest.$ac_ext >&5
18351   rm -rf conftest*
18352   ol_cv_db_db_4_1=no
18353 fi
18354 rm -f conftest*
18355
18356         LIBS="$ol_LIBS"
18357
18358 fi
18359
18360 echo "$ac_t""$ol_cv_db_db_4_1" 1>&6
18361
18362         if test $ol_cv_db_db_4_1 = yes ; then
18363                 ol_cv_lib_db=-ldb-4-1
18364         fi
18365 fi
18366
18367 if test $ol_cv_lib_db = no ; then
18368         echo $ac_n "checking for Berkeley DB link (-ldb3)""... $ac_c" 1>&6
18369 echo "configure:18370: checking for Berkeley DB link (-ldb3)" >&5
18370 if eval "test \"\${ol_cv_db_db3+set}\" = set"; then
18371   echo $ac_n "(cached) $ac_c" 1>&6
18372 else
18373   
18374         ol_DB_LIB=-ldb3
18375         ol_LIBS=$LIBS
18376         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18377
18378         cat > conftest.$ac_ext <<EOF
18379 #line 18380 "configure"
18380 #include "confdefs.h"
18381
18382 #ifdef HAVE_DB_185_H
18383 # include <db_185.h>
18384 #else
18385 # include <db.h>
18386 #endif
18387
18388 #ifndef DB_VERSION_MAJOR
18389 # define DB_VERSION_MAJOR 1
18390 #endif
18391
18392 #ifndef NULL
18393 #define NULL ((void*)0)
18394 #endif
18395
18396 int main() {
18397
18398 #if DB_VERSION_MAJOR > 1
18399         {
18400                 char *version;
18401                 int major, minor, patch;
18402
18403                 version = db_version( &major, &minor, &patch );
18404
18405                 if( major != DB_VERSION_MAJOR ||
18406                         minor < DB_VERSION_MINOR )
18407                 {
18408                         printf("Berkeley DB version mismatch\n"
18409                                 "\theader: %s\n\tlibrary: %s\n",
18410                                 DB_VERSION_STRING, version);
18411                         return 1;
18412                 }
18413         }
18414 #endif
18415
18416 #if DB_VERSION_MAJOR > 2
18417         db_env_create( NULL, 0 );
18418 #elif DB_VERSION_MAJOR > 1
18419         db_appexit( NULL );
18420 #else
18421         (void) dbopen( NULL, 0, 0, 0, NULL);
18422 #endif
18423
18424 ; return 0; }
18425 EOF
18426 if { (eval echo configure:18427: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18427   rm -rf conftest*
18428   ol_cv_db_db3=yes
18429 else
18430   echo "configure: failed program was:" >&5
18431   cat conftest.$ac_ext >&5
18432   rm -rf conftest*
18433   ol_cv_db_db3=no
18434 fi
18435 rm -f conftest*
18436
18437         LIBS="$ol_LIBS"
18438
18439 fi
18440
18441 echo "$ac_t""$ol_cv_db_db3" 1>&6
18442
18443         if test $ol_cv_db_db3 = yes ; then
18444                 ol_cv_lib_db=-ldb3
18445         fi
18446 fi
18447
18448 if test $ol_cv_lib_db = no ; then
18449         echo $ac_n "checking for Berkeley DB link (-ldb-3)""... $ac_c" 1>&6
18450 echo "configure:18451: checking for Berkeley DB link (-ldb-3)" >&5
18451 if eval "test \"\${ol_cv_db_db_3+set}\" = set"; then
18452   echo $ac_n "(cached) $ac_c" 1>&6
18453 else
18454   
18455         ol_DB_LIB=-ldb-3
18456         ol_LIBS=$LIBS
18457         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18458
18459         cat > conftest.$ac_ext <<EOF
18460 #line 18461 "configure"
18461 #include "confdefs.h"
18462
18463 #ifdef HAVE_DB_185_H
18464 # include <db_185.h>
18465 #else
18466 # include <db.h>
18467 #endif
18468
18469 #ifndef DB_VERSION_MAJOR
18470 # define DB_VERSION_MAJOR 1
18471 #endif
18472
18473 #ifndef NULL
18474 #define NULL ((void*)0)
18475 #endif
18476
18477 int main() {
18478
18479 #if DB_VERSION_MAJOR > 1
18480         {
18481                 char *version;
18482                 int major, minor, patch;
18483
18484                 version = db_version( &major, &minor, &patch );
18485
18486                 if( major != DB_VERSION_MAJOR ||
18487                         minor < DB_VERSION_MINOR )
18488                 {
18489                         printf("Berkeley DB version mismatch\n"
18490                                 "\theader: %s\n\tlibrary: %s\n",
18491                                 DB_VERSION_STRING, version);
18492                         return 1;
18493                 }
18494         }
18495 #endif
18496
18497 #if DB_VERSION_MAJOR > 2
18498         db_env_create( NULL, 0 );
18499 #elif DB_VERSION_MAJOR > 1
18500         db_appexit( NULL );
18501 #else
18502         (void) dbopen( NULL, 0, 0, 0, NULL);
18503 #endif
18504
18505 ; return 0; }
18506 EOF
18507 if { (eval echo configure:18508: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18508   rm -rf conftest*
18509   ol_cv_db_db_3=yes
18510 else
18511   echo "configure: failed program was:" >&5
18512   cat conftest.$ac_ext >&5
18513   rm -rf conftest*
18514   ol_cv_db_db_3=no
18515 fi
18516 rm -f conftest*
18517
18518         LIBS="$ol_LIBS"
18519
18520 fi
18521
18522 echo "$ac_t""$ol_cv_db_db_3" 1>&6
18523
18524         if test $ol_cv_db_db_3 = yes ; then
18525                 ol_cv_lib_db=-ldb-3
18526         fi
18527 fi
18528
18529 if test $ol_cv_lib_db = no ; then
18530         echo $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6
18531 echo "configure:18532: checking for Berkeley DB link (-ldb2)" >&5
18532 if eval "test \"\${ol_cv_db_db2+set}\" = set"; then
18533   echo $ac_n "(cached) $ac_c" 1>&6
18534 else
18535   
18536         ol_DB_LIB=-ldb2
18537         ol_LIBS=$LIBS
18538         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18539
18540         cat > conftest.$ac_ext <<EOF
18541 #line 18542 "configure"
18542 #include "confdefs.h"
18543
18544 #ifdef HAVE_DB_185_H
18545 # include <db_185.h>
18546 #else
18547 # include <db.h>
18548 #endif
18549
18550 #ifndef DB_VERSION_MAJOR
18551 # define DB_VERSION_MAJOR 1
18552 #endif
18553
18554 #ifndef NULL
18555 #define NULL ((void*)0)
18556 #endif
18557
18558 int main() {
18559
18560 #if DB_VERSION_MAJOR > 1
18561         {
18562                 char *version;
18563                 int major, minor, patch;
18564
18565                 version = db_version( &major, &minor, &patch );
18566
18567                 if( major != DB_VERSION_MAJOR ||
18568                         minor < DB_VERSION_MINOR )
18569                 {
18570                         printf("Berkeley DB version mismatch\n"
18571                                 "\theader: %s\n\tlibrary: %s\n",
18572                                 DB_VERSION_STRING, version);
18573                         return 1;
18574                 }
18575         }
18576 #endif
18577
18578 #if DB_VERSION_MAJOR > 2
18579         db_env_create( NULL, 0 );
18580 #elif DB_VERSION_MAJOR > 1
18581         db_appexit( NULL );
18582 #else
18583         (void) dbopen( NULL, 0, 0, 0, NULL);
18584 #endif
18585
18586 ; return 0; }
18587 EOF
18588 if { (eval echo configure:18589: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18589   rm -rf conftest*
18590   ol_cv_db_db2=yes
18591 else
18592   echo "configure: failed program was:" >&5
18593   cat conftest.$ac_ext >&5
18594   rm -rf conftest*
18595   ol_cv_db_db2=no
18596 fi
18597 rm -f conftest*
18598
18599         LIBS="$ol_LIBS"
18600
18601 fi
18602
18603 echo "$ac_t""$ol_cv_db_db2" 1>&6
18604
18605         if test $ol_cv_db_db2 = yes ; then
18606                 ol_cv_lib_db=-ldb2
18607         fi
18608 fi
18609
18610 if test $ol_cv_lib_db = no ; then
18611         echo $ac_n "checking for Berkeley DB link (-ldb-2)""... $ac_c" 1>&6
18612 echo "configure:18613: checking for Berkeley DB link (-ldb-2)" >&5
18613 if eval "test \"\${ol_cv_db_db_2+set}\" = set"; then
18614   echo $ac_n "(cached) $ac_c" 1>&6
18615 else
18616   
18617         ol_DB_LIB=-ldb-2
18618         ol_LIBS=$LIBS
18619         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18620
18621         cat > conftest.$ac_ext <<EOF
18622 #line 18623 "configure"
18623 #include "confdefs.h"
18624
18625 #ifdef HAVE_DB_185_H
18626 # include <db_185.h>
18627 #else
18628 # include <db.h>
18629 #endif
18630
18631 #ifndef DB_VERSION_MAJOR
18632 # define DB_VERSION_MAJOR 1
18633 #endif
18634
18635 #ifndef NULL
18636 #define NULL ((void*)0)
18637 #endif
18638
18639 int main() {
18640
18641 #if DB_VERSION_MAJOR > 1
18642         {
18643                 char *version;
18644                 int major, minor, patch;
18645
18646                 version = db_version( &major, &minor, &patch );
18647
18648                 if( major != DB_VERSION_MAJOR ||
18649                         minor < DB_VERSION_MINOR )
18650                 {
18651                         printf("Berkeley DB version mismatch\n"
18652                                 "\theader: %s\n\tlibrary: %s\n",
18653                                 DB_VERSION_STRING, version);
18654                         return 1;
18655                 }
18656         }
18657 #endif
18658
18659 #if DB_VERSION_MAJOR > 2
18660         db_env_create( NULL, 0 );
18661 #elif DB_VERSION_MAJOR > 1
18662         db_appexit( NULL );
18663 #else
18664         (void) dbopen( NULL, 0, 0, 0, NULL);
18665 #endif
18666
18667 ; return 0; }
18668 EOF
18669 if { (eval echo configure:18670: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18670   rm -rf conftest*
18671   ol_cv_db_db_2=yes
18672 else
18673   echo "configure: failed program was:" >&5
18674   cat conftest.$ac_ext >&5
18675   rm -rf conftest*
18676   ol_cv_db_db_2=no
18677 fi
18678 rm -f conftest*
18679
18680         LIBS="$ol_LIBS"
18681
18682 fi
18683
18684 echo "$ac_t""$ol_cv_db_db_2" 1>&6
18685
18686         if test $ol_cv_db_db_2 = yes ; then
18687                 ol_cv_lib_db=-ldb-2
18688         fi
18689 fi
18690
18691 if test $ol_cv_lib_db = no ; then
18692         echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6
18693 echo "configure:18694: checking for Berkeley DB link (-ldb1)" >&5
18694 if eval "test \"\${ol_cv_db_db1+set}\" = set"; then
18695   echo $ac_n "(cached) $ac_c" 1>&6
18696 else
18697   
18698         ol_DB_LIB=-ldb1
18699         ol_LIBS=$LIBS
18700         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18701
18702         cat > conftest.$ac_ext <<EOF
18703 #line 18704 "configure"
18704 #include "confdefs.h"
18705
18706 #ifdef HAVE_DB_185_H
18707 # include <db_185.h>
18708 #else
18709 # include <db.h>
18710 #endif
18711
18712 #ifndef DB_VERSION_MAJOR
18713 # define DB_VERSION_MAJOR 1
18714 #endif
18715
18716 #ifndef NULL
18717 #define NULL ((void*)0)
18718 #endif
18719
18720 int main() {
18721
18722 #if DB_VERSION_MAJOR > 1
18723         {
18724                 char *version;
18725                 int major, minor, patch;
18726
18727                 version = db_version( &major, &minor, &patch );
18728
18729                 if( major != DB_VERSION_MAJOR ||
18730                         minor < DB_VERSION_MINOR )
18731                 {
18732                         printf("Berkeley DB version mismatch\n"
18733                                 "\theader: %s\n\tlibrary: %s\n",
18734                                 DB_VERSION_STRING, version);
18735                         return 1;
18736                 }
18737         }
18738 #endif
18739
18740 #if DB_VERSION_MAJOR > 2
18741         db_env_create( NULL, 0 );
18742 #elif DB_VERSION_MAJOR > 1
18743         db_appexit( NULL );
18744 #else
18745         (void) dbopen( NULL, 0, 0, 0, NULL);
18746 #endif
18747
18748 ; return 0; }
18749 EOF
18750 if { (eval echo configure:18751: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18751   rm -rf conftest*
18752   ol_cv_db_db1=yes
18753 else
18754   echo "configure: failed program was:" >&5
18755   cat conftest.$ac_ext >&5
18756   rm -rf conftest*
18757   ol_cv_db_db1=no
18758 fi
18759 rm -f conftest*
18760
18761         LIBS="$ol_LIBS"
18762
18763 fi
18764
18765 echo "$ac_t""$ol_cv_db_db1" 1>&6
18766
18767         if test $ol_cv_db_db1 = yes ; then
18768                 ol_cv_lib_db=-ldb1
18769         fi
18770 fi
18771
18772 if test $ol_cv_lib_db = no ; then
18773         echo $ac_n "checking for Berkeley DB link (-ldb-1)""... $ac_c" 1>&6
18774 echo "configure:18775: checking for Berkeley DB link (-ldb-1)" >&5
18775 if eval "test \"\${ol_cv_db_db_1+set}\" = set"; then
18776   echo $ac_n "(cached) $ac_c" 1>&6
18777 else
18778   
18779         ol_DB_LIB=-ldb-1
18780         ol_LIBS=$LIBS
18781         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18782
18783         cat > conftest.$ac_ext <<EOF
18784 #line 18785 "configure"
18785 #include "confdefs.h"
18786
18787 #ifdef HAVE_DB_185_H
18788 # include <db_185.h>
18789 #else
18790 # include <db.h>
18791 #endif
18792
18793 #ifndef DB_VERSION_MAJOR
18794 # define DB_VERSION_MAJOR 1
18795 #endif
18796
18797 #ifndef NULL
18798 #define NULL ((void*)0)
18799 #endif
18800
18801 int main() {
18802
18803 #if DB_VERSION_MAJOR > 1
18804         {
18805                 char *version;
18806                 int major, minor, patch;
18807
18808                 version = db_version( &major, &minor, &patch );
18809
18810                 if( major != DB_VERSION_MAJOR ||
18811                         minor < DB_VERSION_MINOR )
18812                 {
18813                         printf("Berkeley DB version mismatch\n"
18814                                 "\theader: %s\n\tlibrary: %s\n",
18815                                 DB_VERSION_STRING, version);
18816                         return 1;
18817                 }
18818         }
18819 #endif
18820
18821 #if DB_VERSION_MAJOR > 2
18822         db_env_create( NULL, 0 );
18823 #elif DB_VERSION_MAJOR > 1
18824         db_appexit( NULL );
18825 #else
18826         (void) dbopen( NULL, 0, 0, 0, NULL);
18827 #endif
18828
18829 ; return 0; }
18830 EOF
18831 if { (eval echo configure:18832: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18832   rm -rf conftest*
18833   ol_cv_db_db_1=yes
18834 else
18835   echo "configure: failed program was:" >&5
18836   cat conftest.$ac_ext >&5
18837   rm -rf conftest*
18838   ol_cv_db_db_1=no
18839 fi
18840 rm -f conftest*
18841
18842         LIBS="$ol_LIBS"
18843
18844 fi
18845
18846 echo "$ac_t""$ol_cv_db_db_1" 1>&6
18847
18848         if test $ol_cv_db_db_1 = yes ; then
18849                 ol_cv_lib_db=-ldb-1
18850         fi
18851 fi
18852
18853
18854                 if test "$ol_cv_lib_db" != no ; then
18855                         ol_cv_berkeley_db=yes
18856                 fi
18857         fi
18858 fi
18859
18860         else
18861                 ol_cv_berkeley_db=no
18862 for ac_hdr in db.h
18863 do
18864 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
18865 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
18866 echo "configure:18867: checking for $ac_hdr" >&5
18867 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
18868   echo $ac_n "(cached) $ac_c" 1>&6
18869 else
18870   cat > conftest.$ac_ext <<EOF
18871 #line 18872 "configure"
18872 #include "confdefs.h"
18873 #include <$ac_hdr>
18874 EOF
18875 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
18876 { (eval echo configure:18877: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
18877 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
18878 if test -z "$ac_err"; then
18879   rm -rf conftest*
18880   eval "ac_cv_header_$ac_safe=yes"
18881 else
18882   echo "$ac_err" >&5
18883   echo "configure: failed program was:" >&5
18884   cat conftest.$ac_ext >&5
18885   rm -rf conftest*
18886   eval "ac_cv_header_$ac_safe=no"
18887 fi
18888 rm -f conftest*
18889 fi
18890 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
18891   echo "$ac_t""yes" 1>&6
18892     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
18893   cat >> confdefs.h <<EOF
18894 #define $ac_tr_hdr 1
18895 EOF
18896  
18897 else
18898   echo "$ac_t""no" 1>&6
18899 fi
18900 done
18901
18902 if test $ac_cv_header_db_h = yes; then
18903         ol_cv_lib_db=no
18904 if test $ol_cv_lib_db = no ; then
18905         echo $ac_n "checking for Berkeley DB link (default)""... $ac_c" 1>&6
18906 echo "configure:18907: checking for Berkeley DB link (default)" >&5
18907 if eval "test \"\${ol_cv_db_none+set}\" = set"; then
18908   echo $ac_n "(cached) $ac_c" 1>&6
18909 else
18910   
18911         ol_DB_LIB=
18912         ol_LIBS=$LIBS
18913         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18914
18915         cat > conftest.$ac_ext <<EOF
18916 #line 18917 "configure"
18917 #include "confdefs.h"
18918
18919 #ifdef HAVE_DB_185_H
18920 # include <db_185.h>
18921 #else
18922 # include <db.h>
18923 #endif
18924
18925 #ifndef DB_VERSION_MAJOR
18926 # define DB_VERSION_MAJOR 1
18927 #endif
18928
18929 #ifndef NULL
18930 #define NULL ((void*)0)
18931 #endif
18932
18933 int main() {
18934
18935 #if DB_VERSION_MAJOR > 1
18936         {
18937                 char *version;
18938                 int major, minor, patch;
18939
18940                 version = db_version( &major, &minor, &patch );
18941
18942                 if( major != DB_VERSION_MAJOR ||
18943                         minor < DB_VERSION_MINOR )
18944                 {
18945                         printf("Berkeley DB version mismatch\n"
18946                                 "\theader: %s\n\tlibrary: %s\n",
18947                                 DB_VERSION_STRING, version);
18948                         return 1;
18949                 }
18950         }
18951 #endif
18952
18953 #if DB_VERSION_MAJOR > 2
18954         db_env_create( NULL, 0 );
18955 #elif DB_VERSION_MAJOR > 1
18956         db_appexit( NULL );
18957 #else
18958         (void) dbopen( NULL, 0, 0, 0, NULL);
18959 #endif
18960
18961 ; return 0; }
18962 EOF
18963 if { (eval echo configure:18964: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18964   rm -rf conftest*
18965   ol_cv_db_none=yes
18966 else
18967   echo "configure: failed program was:" >&5
18968   cat conftest.$ac_ext >&5
18969   rm -rf conftest*
18970   ol_cv_db_none=no
18971 fi
18972 rm -f conftest*
18973
18974         LIBS="$ol_LIBS"
18975
18976 fi
18977
18978 echo "$ac_t""$ol_cv_db_none" 1>&6
18979
18980         if test $ol_cv_db_none = yes ; then
18981                 ol_cv_lib_db=yes
18982         fi
18983 fi
18984
18985 if test $ol_cv_lib_db = no ; then
18986         echo $ac_n "checking for Berkeley DB link (-ldb43)""... $ac_c" 1>&6
18987 echo "configure:18988: checking for Berkeley DB link (-ldb43)" >&5
18988 if eval "test \"\${ol_cv_db_db43+set}\" = set"; then
18989   echo $ac_n "(cached) $ac_c" 1>&6
18990 else
18991   
18992         ol_DB_LIB=-ldb43
18993         ol_LIBS=$LIBS
18994         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18995
18996         cat > conftest.$ac_ext <<EOF
18997 #line 18998 "configure"
18998 #include "confdefs.h"
18999
19000 #ifdef HAVE_DB_185_H
19001 # include <db_185.h>
19002 #else
19003 # include <db.h>
19004 #endif
19005
19006 #ifndef DB_VERSION_MAJOR
19007 # define DB_VERSION_MAJOR 1
19008 #endif
19009
19010 #ifndef NULL
19011 #define NULL ((void*)0)
19012 #endif
19013
19014 int main() {
19015
19016 #if DB_VERSION_MAJOR > 1
19017         {
19018                 char *version;
19019                 int major, minor, patch;
19020
19021                 version = db_version( &major, &minor, &patch );
19022
19023                 if( major != DB_VERSION_MAJOR ||
19024                         minor < DB_VERSION_MINOR )
19025                 {
19026                         printf("Berkeley DB version mismatch\n"
19027                                 "\theader: %s\n\tlibrary: %s\n",
19028                                 DB_VERSION_STRING, version);
19029                         return 1;
19030                 }
19031         }
19032 #endif
19033
19034 #if DB_VERSION_MAJOR > 2
19035         db_env_create( NULL, 0 );
19036 #elif DB_VERSION_MAJOR > 1
19037         db_appexit( NULL );
19038 #else
19039         (void) dbopen( NULL, 0, 0, 0, NULL);
19040 #endif
19041
19042 ; return 0; }
19043 EOF
19044 if { (eval echo configure:19045: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19045   rm -rf conftest*
19046   ol_cv_db_db43=yes
19047 else
19048   echo "configure: failed program was:" >&5
19049   cat conftest.$ac_ext >&5
19050   rm -rf conftest*
19051   ol_cv_db_db43=no
19052 fi
19053 rm -f conftest*
19054
19055         LIBS="$ol_LIBS"
19056
19057 fi
19058
19059 echo "$ac_t""$ol_cv_db_db43" 1>&6
19060
19061         if test $ol_cv_db_db43 = yes ; then
19062                 ol_cv_lib_db=-ldb43
19063         fi
19064 fi
19065
19066 if test $ol_cv_lib_db = no ; then
19067         echo $ac_n "checking for Berkeley DB link (-ldb-43)""... $ac_c" 1>&6
19068 echo "configure:19069: checking for Berkeley DB link (-ldb-43)" >&5
19069 if eval "test \"\${ol_cv_db_db_43+set}\" = set"; then
19070   echo $ac_n "(cached) $ac_c" 1>&6
19071 else
19072   
19073         ol_DB_LIB=-ldb-43
19074         ol_LIBS=$LIBS
19075         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19076
19077         cat > conftest.$ac_ext <<EOF
19078 #line 19079 "configure"
19079 #include "confdefs.h"
19080
19081 #ifdef HAVE_DB_185_H
19082 # include <db_185.h>
19083 #else
19084 # include <db.h>
19085 #endif
19086
19087 #ifndef DB_VERSION_MAJOR
19088 # define DB_VERSION_MAJOR 1
19089 #endif
19090
19091 #ifndef NULL
19092 #define NULL ((void*)0)
19093 #endif
19094
19095 int main() {
19096
19097 #if DB_VERSION_MAJOR > 1
19098         {
19099                 char *version;
19100                 int major, minor, patch;
19101
19102                 version = db_version( &major, &minor, &patch );
19103
19104                 if( major != DB_VERSION_MAJOR ||
19105                         minor < DB_VERSION_MINOR )
19106                 {
19107                         printf("Berkeley DB version mismatch\n"
19108                                 "\theader: %s\n\tlibrary: %s\n",
19109                                 DB_VERSION_STRING, version);
19110                         return 1;
19111                 }
19112         }
19113 #endif
19114
19115 #if DB_VERSION_MAJOR > 2
19116         db_env_create( NULL, 0 );
19117 #elif DB_VERSION_MAJOR > 1
19118         db_appexit( NULL );
19119 #else
19120         (void) dbopen( NULL, 0, 0, 0, NULL);
19121 #endif
19122
19123 ; return 0; }
19124 EOF
19125 if { (eval echo configure:19126: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19126   rm -rf conftest*
19127   ol_cv_db_db_43=yes
19128 else
19129   echo "configure: failed program was:" >&5
19130   cat conftest.$ac_ext >&5
19131   rm -rf conftest*
19132   ol_cv_db_db_43=no
19133 fi
19134 rm -f conftest*
19135
19136         LIBS="$ol_LIBS"
19137
19138 fi
19139
19140 echo "$ac_t""$ol_cv_db_db_43" 1>&6
19141
19142         if test $ol_cv_db_db_43 = yes ; then
19143                 ol_cv_lib_db=-ldb-43
19144         fi
19145 fi
19146
19147 if test $ol_cv_lib_db = no ; then
19148         echo $ac_n "checking for Berkeley DB link (-ldb-4.3)""... $ac_c" 1>&6
19149 echo "configure:19150: checking for Berkeley DB link (-ldb-4.3)" >&5
19150 if eval "test \"\${ol_cv_db_db_4_dot_3+set}\" = set"; then
19151   echo $ac_n "(cached) $ac_c" 1>&6
19152 else
19153   
19154         ol_DB_LIB=-ldb-4.3
19155         ol_LIBS=$LIBS
19156         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19157
19158         cat > conftest.$ac_ext <<EOF
19159 #line 19160 "configure"
19160 #include "confdefs.h"
19161
19162 #ifdef HAVE_DB_185_H
19163 # include <db_185.h>
19164 #else
19165 # include <db.h>
19166 #endif
19167
19168 #ifndef DB_VERSION_MAJOR
19169 # define DB_VERSION_MAJOR 1
19170 #endif
19171
19172 #ifndef NULL
19173 #define NULL ((void*)0)
19174 #endif
19175
19176 int main() {
19177
19178 #if DB_VERSION_MAJOR > 1
19179         {
19180                 char *version;
19181                 int major, minor, patch;
19182
19183                 version = db_version( &major, &minor, &patch );
19184
19185                 if( major != DB_VERSION_MAJOR ||
19186                         minor < DB_VERSION_MINOR )
19187                 {
19188                         printf("Berkeley DB version mismatch\n"
19189                                 "\theader: %s\n\tlibrary: %s\n",
19190                                 DB_VERSION_STRING, version);
19191                         return 1;
19192                 }
19193         }
19194 #endif
19195
19196 #if DB_VERSION_MAJOR > 2
19197         db_env_create( NULL, 0 );
19198 #elif DB_VERSION_MAJOR > 1
19199         db_appexit( NULL );
19200 #else
19201         (void) dbopen( NULL, 0, 0, 0, NULL);
19202 #endif
19203
19204 ; return 0; }
19205 EOF
19206 if { (eval echo configure:19207: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19207   rm -rf conftest*
19208   ol_cv_db_db_4_dot_3=yes
19209 else
19210   echo "configure: failed program was:" >&5
19211   cat conftest.$ac_ext >&5
19212   rm -rf conftest*
19213   ol_cv_db_db_4_dot_3=no
19214 fi
19215 rm -f conftest*
19216
19217         LIBS="$ol_LIBS"
19218
19219 fi
19220
19221 echo "$ac_t""$ol_cv_db_db_4_dot_3" 1>&6
19222
19223         if test $ol_cv_db_db_4_dot_3 = yes ; then
19224                 ol_cv_lib_db=-ldb-4.3
19225         fi
19226 fi
19227
19228 if test $ol_cv_lib_db = no ; then
19229         echo $ac_n "checking for Berkeley DB link (-ldb-4-3)""... $ac_c" 1>&6
19230 echo "configure:19231: checking for Berkeley DB link (-ldb-4-3)" >&5
19231 if eval "test \"\${ol_cv_db_db_4_3+set}\" = set"; then
19232   echo $ac_n "(cached) $ac_c" 1>&6
19233 else
19234   
19235         ol_DB_LIB=-ldb-4-3
19236         ol_LIBS=$LIBS
19237         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19238
19239         cat > conftest.$ac_ext <<EOF
19240 #line 19241 "configure"
19241 #include "confdefs.h"
19242
19243 #ifdef HAVE_DB_185_H
19244 # include <db_185.h>
19245 #else
19246 # include <db.h>
19247 #endif
19248
19249 #ifndef DB_VERSION_MAJOR
19250 # define DB_VERSION_MAJOR 1
19251 #endif
19252
19253 #ifndef NULL
19254 #define NULL ((void*)0)
19255 #endif
19256
19257 int main() {
19258
19259 #if DB_VERSION_MAJOR > 1
19260         {
19261                 char *version;
19262                 int major, minor, patch;
19263
19264                 version = db_version( &major, &minor, &patch );
19265
19266                 if( major != DB_VERSION_MAJOR ||
19267                         minor < DB_VERSION_MINOR )
19268                 {
19269                         printf("Berkeley DB version mismatch\n"
19270                                 "\theader: %s\n\tlibrary: %s\n",
19271                                 DB_VERSION_STRING, version);
19272                         return 1;
19273                 }
19274         }
19275 #endif
19276
19277 #if DB_VERSION_MAJOR > 2
19278         db_env_create( NULL, 0 );
19279 #elif DB_VERSION_MAJOR > 1
19280         db_appexit( NULL );
19281 #else
19282         (void) dbopen( NULL, 0, 0, 0, NULL);
19283 #endif
19284
19285 ; return 0; }
19286 EOF
19287 if { (eval echo configure:19288: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19288   rm -rf conftest*
19289   ol_cv_db_db_4_3=yes
19290 else
19291   echo "configure: failed program was:" >&5
19292   cat conftest.$ac_ext >&5
19293   rm -rf conftest*
19294   ol_cv_db_db_4_3=no
19295 fi
19296 rm -f conftest*
19297
19298         LIBS="$ol_LIBS"
19299
19300 fi
19301
19302 echo "$ac_t""$ol_cv_db_db_4_3" 1>&6
19303
19304         if test $ol_cv_db_db_4_3 = yes ; then
19305                 ol_cv_lib_db=-ldb-4-3
19306         fi
19307 fi
19308
19309 if test $ol_cv_lib_db = no ; then
19310         echo $ac_n "checking for Berkeley DB link (-ldb42)""... $ac_c" 1>&6
19311 echo "configure:19312: checking for Berkeley DB link (-ldb42)" >&5
19312 if eval "test \"\${ol_cv_db_db42+set}\" = set"; then
19313   echo $ac_n "(cached) $ac_c" 1>&6
19314 else
19315   
19316         ol_DB_LIB=-ldb42
19317         ol_LIBS=$LIBS
19318         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19319
19320         cat > conftest.$ac_ext <<EOF
19321 #line 19322 "configure"
19322 #include "confdefs.h"
19323
19324 #ifdef HAVE_DB_185_H
19325 # include <db_185.h>
19326 #else
19327 # include <db.h>
19328 #endif
19329
19330 #ifndef DB_VERSION_MAJOR
19331 # define DB_VERSION_MAJOR 1
19332 #endif
19333
19334 #ifndef NULL
19335 #define NULL ((void*)0)
19336 #endif
19337
19338 int main() {
19339
19340 #if DB_VERSION_MAJOR > 1
19341         {
19342                 char *version;
19343                 int major, minor, patch;
19344
19345                 version = db_version( &major, &minor, &patch );
19346
19347                 if( major != DB_VERSION_MAJOR ||
19348                         minor < DB_VERSION_MINOR )
19349                 {
19350                         printf("Berkeley DB version mismatch\n"
19351                                 "\theader: %s\n\tlibrary: %s\n",
19352                                 DB_VERSION_STRING, version);
19353                         return 1;
19354                 }
19355         }
19356 #endif
19357
19358 #if DB_VERSION_MAJOR > 2
19359         db_env_create( NULL, 0 );
19360 #elif DB_VERSION_MAJOR > 1
19361         db_appexit( NULL );
19362 #else
19363         (void) dbopen( NULL, 0, 0, 0, NULL);
19364 #endif
19365
19366 ; return 0; }
19367 EOF
19368 if { (eval echo configure:19369: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19369   rm -rf conftest*
19370   ol_cv_db_db42=yes
19371 else
19372   echo "configure: failed program was:" >&5
19373   cat conftest.$ac_ext >&5
19374   rm -rf conftest*
19375   ol_cv_db_db42=no
19376 fi
19377 rm -f conftest*
19378
19379         LIBS="$ol_LIBS"
19380
19381 fi
19382
19383 echo "$ac_t""$ol_cv_db_db42" 1>&6
19384
19385         if test $ol_cv_db_db42 = yes ; then
19386                 ol_cv_lib_db=-ldb42
19387         fi
19388 fi
19389
19390 if test $ol_cv_lib_db = no ; then
19391         echo $ac_n "checking for Berkeley DB link (-ldb-42)""... $ac_c" 1>&6
19392 echo "configure:19393: checking for Berkeley DB link (-ldb-42)" >&5
19393 if eval "test \"\${ol_cv_db_db_42+set}\" = set"; then
19394   echo $ac_n "(cached) $ac_c" 1>&6
19395 else
19396   
19397         ol_DB_LIB=-ldb-42
19398         ol_LIBS=$LIBS
19399         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19400
19401         cat > conftest.$ac_ext <<EOF
19402 #line 19403 "configure"
19403 #include "confdefs.h"
19404
19405 #ifdef HAVE_DB_185_H
19406 # include <db_185.h>
19407 #else
19408 # include <db.h>
19409 #endif
19410
19411 #ifndef DB_VERSION_MAJOR
19412 # define DB_VERSION_MAJOR 1
19413 #endif
19414
19415 #ifndef NULL
19416 #define NULL ((void*)0)
19417 #endif
19418
19419 int main() {
19420
19421 #if DB_VERSION_MAJOR > 1
19422         {
19423                 char *version;
19424                 int major, minor, patch;
19425
19426                 version = db_version( &major, &minor, &patch );
19427
19428                 if( major != DB_VERSION_MAJOR ||
19429                         minor < DB_VERSION_MINOR )
19430                 {
19431                         printf("Berkeley DB version mismatch\n"
19432                                 "\theader: %s\n\tlibrary: %s\n",
19433                                 DB_VERSION_STRING, version);
19434                         return 1;
19435                 }
19436         }
19437 #endif
19438
19439 #if DB_VERSION_MAJOR > 2
19440         db_env_create( NULL, 0 );
19441 #elif DB_VERSION_MAJOR > 1
19442         db_appexit( NULL );
19443 #else
19444         (void) dbopen( NULL, 0, 0, 0, NULL);
19445 #endif
19446
19447 ; return 0; }
19448 EOF
19449 if { (eval echo configure:19450: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19450   rm -rf conftest*
19451   ol_cv_db_db_42=yes
19452 else
19453   echo "configure: failed program was:" >&5
19454   cat conftest.$ac_ext >&5
19455   rm -rf conftest*
19456   ol_cv_db_db_42=no
19457 fi
19458 rm -f conftest*
19459
19460         LIBS="$ol_LIBS"
19461
19462 fi
19463
19464 echo "$ac_t""$ol_cv_db_db_42" 1>&6
19465
19466         if test $ol_cv_db_db_42 = yes ; then
19467                 ol_cv_lib_db=-ldb-42
19468         fi
19469 fi
19470
19471 if test $ol_cv_lib_db = no ; then
19472         echo $ac_n "checking for Berkeley DB link (-ldb-4.2)""... $ac_c" 1>&6
19473 echo "configure:19474: checking for Berkeley DB link (-ldb-4.2)" >&5
19474 if eval "test \"\${ol_cv_db_db_4_dot_2+set}\" = set"; then
19475   echo $ac_n "(cached) $ac_c" 1>&6
19476 else
19477   
19478         ol_DB_LIB=-ldb-4.2
19479         ol_LIBS=$LIBS
19480         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19481
19482         cat > conftest.$ac_ext <<EOF
19483 #line 19484 "configure"
19484 #include "confdefs.h"
19485
19486 #ifdef HAVE_DB_185_H
19487 # include <db_185.h>
19488 #else
19489 # include <db.h>
19490 #endif
19491
19492 #ifndef DB_VERSION_MAJOR
19493 # define DB_VERSION_MAJOR 1
19494 #endif
19495
19496 #ifndef NULL
19497 #define NULL ((void*)0)
19498 #endif
19499
19500 int main() {
19501
19502 #if DB_VERSION_MAJOR > 1
19503         {
19504                 char *version;
19505                 int major, minor, patch;
19506
19507                 version = db_version( &major, &minor, &patch );
19508
19509                 if( major != DB_VERSION_MAJOR ||
19510                         minor < DB_VERSION_MINOR )
19511                 {
19512                         printf("Berkeley DB version mismatch\n"
19513                                 "\theader: %s\n\tlibrary: %s\n",
19514                                 DB_VERSION_STRING, version);
19515                         return 1;
19516                 }
19517         }
19518 #endif
19519
19520 #if DB_VERSION_MAJOR > 2
19521         db_env_create( NULL, 0 );
19522 #elif DB_VERSION_MAJOR > 1
19523         db_appexit( NULL );
19524 #else
19525         (void) dbopen( NULL, 0, 0, 0, NULL);
19526 #endif
19527
19528 ; return 0; }
19529 EOF
19530 if { (eval echo configure:19531: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19531   rm -rf conftest*
19532   ol_cv_db_db_4_dot_2=yes
19533 else
19534   echo "configure: failed program was:" >&5
19535   cat conftest.$ac_ext >&5
19536   rm -rf conftest*
19537   ol_cv_db_db_4_dot_2=no
19538 fi
19539 rm -f conftest*
19540
19541         LIBS="$ol_LIBS"
19542
19543 fi
19544
19545 echo "$ac_t""$ol_cv_db_db_4_dot_2" 1>&6
19546
19547         if test $ol_cv_db_db_4_dot_2 = yes ; then
19548                 ol_cv_lib_db=-ldb-4.2
19549         fi
19550 fi
19551
19552 if test $ol_cv_lib_db = no ; then
19553         echo $ac_n "checking for Berkeley DB link (-ldb-4-2)""... $ac_c" 1>&6
19554 echo "configure:19555: checking for Berkeley DB link (-ldb-4-2)" >&5
19555 if eval "test \"\${ol_cv_db_db_4_2+set}\" = set"; then
19556   echo $ac_n "(cached) $ac_c" 1>&6
19557 else
19558   
19559         ol_DB_LIB=-ldb-4-2
19560         ol_LIBS=$LIBS
19561         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19562
19563         cat > conftest.$ac_ext <<EOF
19564 #line 19565 "configure"
19565 #include "confdefs.h"
19566
19567 #ifdef HAVE_DB_185_H
19568 # include <db_185.h>
19569 #else
19570 # include <db.h>
19571 #endif
19572
19573 #ifndef DB_VERSION_MAJOR
19574 # define DB_VERSION_MAJOR 1
19575 #endif
19576
19577 #ifndef NULL
19578 #define NULL ((void*)0)
19579 #endif
19580
19581 int main() {
19582
19583 #if DB_VERSION_MAJOR > 1
19584         {
19585                 char *version;
19586                 int major, minor, patch;
19587
19588                 version = db_version( &major, &minor, &patch );
19589
19590                 if( major != DB_VERSION_MAJOR ||
19591                         minor < DB_VERSION_MINOR )
19592                 {
19593                         printf("Berkeley DB version mismatch\n"
19594                                 "\theader: %s\n\tlibrary: %s\n",
19595                                 DB_VERSION_STRING, version);
19596                         return 1;
19597                 }
19598         }
19599 #endif
19600
19601 #if DB_VERSION_MAJOR > 2
19602         db_env_create( NULL, 0 );
19603 #elif DB_VERSION_MAJOR > 1
19604         db_appexit( NULL );
19605 #else
19606         (void) dbopen( NULL, 0, 0, 0, NULL);
19607 #endif
19608
19609 ; return 0; }
19610 EOF
19611 if { (eval echo configure:19612: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19612   rm -rf conftest*
19613   ol_cv_db_db_4_2=yes
19614 else
19615   echo "configure: failed program was:" >&5
19616   cat conftest.$ac_ext >&5
19617   rm -rf conftest*
19618   ol_cv_db_db_4_2=no
19619 fi
19620 rm -f conftest*
19621
19622         LIBS="$ol_LIBS"
19623
19624 fi
19625
19626 echo "$ac_t""$ol_cv_db_db_4_2" 1>&6
19627
19628         if test $ol_cv_db_db_4_2 = yes ; then
19629                 ol_cv_lib_db=-ldb-4-2
19630         fi
19631 fi
19632
19633 if test $ol_cv_lib_db = no ; then
19634         echo $ac_n "checking for Berkeley DB link (-ldb-4)""... $ac_c" 1>&6
19635 echo "configure:19636: checking for Berkeley DB link (-ldb-4)" >&5
19636 if eval "test \"\${ol_cv_db_db_4+set}\" = set"; then
19637   echo $ac_n "(cached) $ac_c" 1>&6
19638 else
19639   
19640         ol_DB_LIB=-ldb-4
19641         ol_LIBS=$LIBS
19642         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19643
19644         cat > conftest.$ac_ext <<EOF
19645 #line 19646 "configure"
19646 #include "confdefs.h"
19647
19648 #ifdef HAVE_DB_185_H
19649 # include <db_185.h>
19650 #else
19651 # include <db.h>
19652 #endif
19653
19654 #ifndef DB_VERSION_MAJOR
19655 # define DB_VERSION_MAJOR 1
19656 #endif
19657
19658 #ifndef NULL
19659 #define NULL ((void*)0)
19660 #endif
19661
19662 int main() {
19663
19664 #if DB_VERSION_MAJOR > 1
19665         {
19666                 char *version;
19667                 int major, minor, patch;
19668
19669                 version = db_version( &major, &minor, &patch );
19670
19671                 if( major != DB_VERSION_MAJOR ||
19672                         minor < DB_VERSION_MINOR )
19673                 {
19674                         printf("Berkeley DB version mismatch\n"
19675                                 "\theader: %s\n\tlibrary: %s\n",
19676                                 DB_VERSION_STRING, version);
19677                         return 1;
19678                 }
19679         }
19680 #endif
19681
19682 #if DB_VERSION_MAJOR > 2
19683         db_env_create( NULL, 0 );
19684 #elif DB_VERSION_MAJOR > 1
19685         db_appexit( NULL );
19686 #else
19687         (void) dbopen( NULL, 0, 0, 0, NULL);
19688 #endif
19689
19690 ; return 0; }
19691 EOF
19692 if { (eval echo configure:19693: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19693   rm -rf conftest*
19694   ol_cv_db_db_4=yes
19695 else
19696   echo "configure: failed program was:" >&5
19697   cat conftest.$ac_ext >&5
19698   rm -rf conftest*
19699   ol_cv_db_db_4=no
19700 fi
19701 rm -f conftest*
19702
19703         LIBS="$ol_LIBS"
19704
19705 fi
19706
19707 echo "$ac_t""$ol_cv_db_db_4" 1>&6
19708
19709         if test $ol_cv_db_db_4 = yes ; then
19710                 ol_cv_lib_db=-ldb-4
19711         fi
19712 fi
19713
19714 if test $ol_cv_lib_db = no ; then
19715         echo $ac_n "checking for Berkeley DB link (-ldb4)""... $ac_c" 1>&6
19716 echo "configure:19717: checking for Berkeley DB link (-ldb4)" >&5
19717 if eval "test \"\${ol_cv_db_db4+set}\" = set"; then
19718   echo $ac_n "(cached) $ac_c" 1>&6
19719 else
19720   
19721         ol_DB_LIB=-ldb4
19722         ol_LIBS=$LIBS
19723         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19724
19725         cat > conftest.$ac_ext <<EOF
19726 #line 19727 "configure"
19727 #include "confdefs.h"
19728
19729 #ifdef HAVE_DB_185_H
19730 # include <db_185.h>
19731 #else
19732 # include <db.h>
19733 #endif
19734
19735 #ifndef DB_VERSION_MAJOR
19736 # define DB_VERSION_MAJOR 1
19737 #endif
19738
19739 #ifndef NULL
19740 #define NULL ((void*)0)
19741 #endif
19742
19743 int main() {
19744
19745 #if DB_VERSION_MAJOR > 1
19746         {
19747                 char *version;
19748                 int major, minor, patch;
19749
19750                 version = db_version( &major, &minor, &patch );
19751
19752                 if( major != DB_VERSION_MAJOR ||
19753                         minor < DB_VERSION_MINOR )
19754                 {
19755                         printf("Berkeley DB version mismatch\n"
19756                                 "\theader: %s\n\tlibrary: %s\n",
19757                                 DB_VERSION_STRING, version);
19758                         return 1;
19759                 }
19760         }
19761 #endif
19762
19763 #if DB_VERSION_MAJOR > 2
19764         db_env_create( NULL, 0 );
19765 #elif DB_VERSION_MAJOR > 1
19766         db_appexit( NULL );
19767 #else
19768         (void) dbopen( NULL, 0, 0, 0, NULL);
19769 #endif
19770
19771 ; return 0; }
19772 EOF
19773 if { (eval echo configure:19774: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19774   rm -rf conftest*
19775   ol_cv_db_db4=yes
19776 else
19777   echo "configure: failed program was:" >&5
19778   cat conftest.$ac_ext >&5
19779   rm -rf conftest*
19780   ol_cv_db_db4=no
19781 fi
19782 rm -f conftest*
19783
19784         LIBS="$ol_LIBS"
19785
19786 fi
19787
19788 echo "$ac_t""$ol_cv_db_db4" 1>&6
19789
19790         if test $ol_cv_db_db4 = yes ; then
19791                 ol_cv_lib_db=-ldb4
19792         fi
19793 fi
19794
19795 if test $ol_cv_lib_db = no ; then
19796         echo $ac_n "checking for Berkeley DB link (-ldb)""... $ac_c" 1>&6
19797 echo "configure:19798: checking for Berkeley DB link (-ldb)" >&5
19798 if eval "test \"\${ol_cv_db_db+set}\" = set"; then
19799   echo $ac_n "(cached) $ac_c" 1>&6
19800 else
19801   
19802         ol_DB_LIB=-ldb
19803         ol_LIBS=$LIBS
19804         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19805
19806         cat > conftest.$ac_ext <<EOF
19807 #line 19808 "configure"
19808 #include "confdefs.h"
19809
19810 #ifdef HAVE_DB_185_H
19811 # include <db_185.h>
19812 #else
19813 # include <db.h>
19814 #endif
19815
19816 #ifndef DB_VERSION_MAJOR
19817 # define DB_VERSION_MAJOR 1
19818 #endif
19819
19820 #ifndef NULL
19821 #define NULL ((void*)0)
19822 #endif
19823
19824 int main() {
19825
19826 #if DB_VERSION_MAJOR > 1
19827         {
19828                 char *version;
19829                 int major, minor, patch;
19830
19831                 version = db_version( &major, &minor, &patch );
19832
19833                 if( major != DB_VERSION_MAJOR ||
19834                         minor < DB_VERSION_MINOR )
19835                 {
19836                         printf("Berkeley DB version mismatch\n"
19837                                 "\theader: %s\n\tlibrary: %s\n",
19838                                 DB_VERSION_STRING, version);
19839                         return 1;
19840                 }
19841         }
19842 #endif
19843
19844 #if DB_VERSION_MAJOR > 2
19845         db_env_create( NULL, 0 );
19846 #elif DB_VERSION_MAJOR > 1
19847         db_appexit( NULL );
19848 #else
19849         (void) dbopen( NULL, 0, 0, 0, NULL);
19850 #endif
19851
19852 ; return 0; }
19853 EOF
19854 if { (eval echo configure:19855: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19855   rm -rf conftest*
19856   ol_cv_db_db=yes
19857 else
19858   echo "configure: failed program was:" >&5
19859   cat conftest.$ac_ext >&5
19860   rm -rf conftest*
19861   ol_cv_db_db=no
19862 fi
19863 rm -f conftest*
19864
19865         LIBS="$ol_LIBS"
19866
19867 fi
19868
19869 echo "$ac_t""$ol_cv_db_db" 1>&6
19870
19871         if test $ol_cv_db_db = yes ; then
19872                 ol_cv_lib_db=-ldb
19873         fi
19874 fi
19875
19876 if test $ol_cv_lib_db = no ; then
19877         echo $ac_n "checking for Berkeley DB link (-ldb41)""... $ac_c" 1>&6
19878 echo "configure:19879: checking for Berkeley DB link (-ldb41)" >&5
19879 if eval "test \"\${ol_cv_db_db41+set}\" = set"; then
19880   echo $ac_n "(cached) $ac_c" 1>&6
19881 else
19882   
19883         ol_DB_LIB=-ldb41
19884         ol_LIBS=$LIBS
19885         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19886
19887         cat > conftest.$ac_ext <<EOF
19888 #line 19889 "configure"
19889 #include "confdefs.h"
19890
19891 #ifdef HAVE_DB_185_H
19892 # include <db_185.h>
19893 #else
19894 # include <db.h>
19895 #endif
19896
19897 #ifndef DB_VERSION_MAJOR
19898 # define DB_VERSION_MAJOR 1
19899 #endif
19900
19901 #ifndef NULL
19902 #define NULL ((void*)0)
19903 #endif
19904
19905 int main() {
19906
19907 #if DB_VERSION_MAJOR > 1
19908         {
19909                 char *version;
19910                 int major, minor, patch;
19911
19912                 version = db_version( &major, &minor, &patch );
19913
19914                 if( major != DB_VERSION_MAJOR ||
19915                         minor < DB_VERSION_MINOR )
19916                 {
19917                         printf("Berkeley DB version mismatch\n"
19918                                 "\theader: %s\n\tlibrary: %s\n",
19919                                 DB_VERSION_STRING, version);
19920                         return 1;
19921                 }
19922         }
19923 #endif
19924
19925 #if DB_VERSION_MAJOR > 2
19926         db_env_create( NULL, 0 );
19927 #elif DB_VERSION_MAJOR > 1
19928         db_appexit( NULL );
19929 #else
19930         (void) dbopen( NULL, 0, 0, 0, NULL);
19931 #endif
19932
19933 ; return 0; }
19934 EOF
19935 if { (eval echo configure:19936: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19936   rm -rf conftest*
19937   ol_cv_db_db41=yes
19938 else
19939   echo "configure: failed program was:" >&5
19940   cat conftest.$ac_ext >&5
19941   rm -rf conftest*
19942   ol_cv_db_db41=no
19943 fi
19944 rm -f conftest*
19945
19946         LIBS="$ol_LIBS"
19947
19948 fi
19949
19950 echo "$ac_t""$ol_cv_db_db41" 1>&6
19951
19952         if test $ol_cv_db_db41 = yes ; then
19953                 ol_cv_lib_db=-ldb41
19954         fi
19955 fi
19956
19957 if test $ol_cv_lib_db = no ; then
19958         echo $ac_n "checking for Berkeley DB link (-ldb-41)""... $ac_c" 1>&6
19959 echo "configure:19960: checking for Berkeley DB link (-ldb-41)" >&5
19960 if eval "test \"\${ol_cv_db_db_41+set}\" = set"; then
19961   echo $ac_n "(cached) $ac_c" 1>&6
19962 else
19963   
19964         ol_DB_LIB=-ldb-41
19965         ol_LIBS=$LIBS
19966         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19967
19968         cat > conftest.$ac_ext <<EOF
19969 #line 19970 "configure"
19970 #include "confdefs.h"
19971
19972 #ifdef HAVE_DB_185_H
19973 # include <db_185.h>
19974 #else
19975 # include <db.h>
19976 #endif
19977
19978 #ifndef DB_VERSION_MAJOR
19979 # define DB_VERSION_MAJOR 1
19980 #endif
19981
19982 #ifndef NULL
19983 #define NULL ((void*)0)
19984 #endif
19985
19986 int main() {
19987
19988 #if DB_VERSION_MAJOR > 1
19989         {
19990                 char *version;
19991                 int major, minor, patch;
19992
19993                 version = db_version( &major, &minor, &patch );
19994
19995                 if( major != DB_VERSION_MAJOR ||
19996                         minor < DB_VERSION_MINOR )
19997                 {
19998                         printf("Berkeley DB version mismatch\n"
19999                                 "\theader: %s\n\tlibrary: %s\n",
20000                                 DB_VERSION_STRING, version);
20001                         return 1;
20002                 }
20003         }
20004 #endif
20005
20006 #if DB_VERSION_MAJOR > 2
20007         db_env_create( NULL, 0 );
20008 #elif DB_VERSION_MAJOR > 1
20009         db_appexit( NULL );
20010 #else
20011         (void) dbopen( NULL, 0, 0, 0, NULL);
20012 #endif
20013
20014 ; return 0; }
20015 EOF
20016 if { (eval echo configure:20017: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20017   rm -rf conftest*
20018   ol_cv_db_db_41=yes
20019 else
20020   echo "configure: failed program was:" >&5
20021   cat conftest.$ac_ext >&5
20022   rm -rf conftest*
20023   ol_cv_db_db_41=no
20024 fi
20025 rm -f conftest*
20026
20027         LIBS="$ol_LIBS"
20028
20029 fi
20030
20031 echo "$ac_t""$ol_cv_db_db_41" 1>&6
20032
20033         if test $ol_cv_db_db_41 = yes ; then
20034                 ol_cv_lib_db=-ldb-41
20035         fi
20036 fi
20037
20038 if test $ol_cv_lib_db = no ; then
20039         echo $ac_n "checking for Berkeley DB link (-ldb-4.1)""... $ac_c" 1>&6
20040 echo "configure:20041: checking for Berkeley DB link (-ldb-4.1)" >&5
20041 if eval "test \"\${ol_cv_db_db_4_dot_1+set}\" = set"; then
20042   echo $ac_n "(cached) $ac_c" 1>&6
20043 else
20044   
20045         ol_DB_LIB=-ldb-4.1
20046         ol_LIBS=$LIBS
20047         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
20048
20049         cat > conftest.$ac_ext <<EOF
20050 #line 20051 "configure"
20051 #include "confdefs.h"
20052
20053 #ifdef HAVE_DB_185_H
20054 # include <db_185.h>
20055 #else
20056 # include <db.h>
20057 #endif
20058
20059 #ifndef DB_VERSION_MAJOR
20060 # define DB_VERSION_MAJOR 1
20061 #endif
20062
20063 #ifndef NULL
20064 #define NULL ((void*)0)
20065 #endif
20066
20067 int main() {
20068
20069 #if DB_VERSION_MAJOR > 1
20070         {
20071                 char *version;
20072                 int major, minor, patch;
20073
20074                 version = db_version( &major, &minor, &patch );
20075
20076                 if( major != DB_VERSION_MAJOR ||
20077                         minor < DB_VERSION_MINOR )
20078                 {
20079                         printf("Berkeley DB version mismatch\n"
20080                                 "\theader: %s\n\tlibrary: %s\n",
20081                                 DB_VERSION_STRING, version);
20082                         return 1;
20083                 }
20084         }
20085 #endif
20086
20087 #if DB_VERSION_MAJOR > 2
20088         db_env_create( NULL, 0 );
20089 #elif DB_VERSION_MAJOR > 1
20090         db_appexit( NULL );
20091 #else
20092         (void) dbopen( NULL, 0, 0, 0, NULL);
20093 #endif
20094
20095 ; return 0; }
20096 EOF
20097 if { (eval echo configure:20098: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20098   rm -rf conftest*
20099   ol_cv_db_db_4_dot_1=yes
20100 else
20101   echo "configure: failed program was:" >&5
20102   cat conftest.$ac_ext >&5
20103   rm -rf conftest*
20104   ol_cv_db_db_4_dot_1=no
20105 fi
20106 rm -f conftest*
20107
20108         LIBS="$ol_LIBS"
20109
20110 fi
20111
20112 echo "$ac_t""$ol_cv_db_db_4_dot_1" 1>&6
20113
20114         if test $ol_cv_db_db_4_dot_1 = yes ; then
20115                 ol_cv_lib_db=-ldb-4.1
20116         fi
20117 fi
20118
20119 if test $ol_cv_lib_db = no ; then
20120         echo $ac_n "checking for Berkeley DB link (-ldb-4-1)""... $ac_c" 1>&6
20121 echo "configure:20122: checking for Berkeley DB link (-ldb-4-1)" >&5
20122 if eval "test \"\${ol_cv_db_db_4_1+set}\" = set"; then
20123   echo $ac_n "(cached) $ac_c" 1>&6
20124 else
20125   
20126         ol_DB_LIB=-ldb-4-1
20127         ol_LIBS=$LIBS
20128         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
20129
20130         cat > conftest.$ac_ext <<EOF
20131 #line 20132 "configure"
20132 #include "confdefs.h"
20133
20134 #ifdef HAVE_DB_185_H
20135 # include <db_185.h>
20136 #else
20137 # include <db.h>
20138 #endif
20139
20140 #ifndef DB_VERSION_MAJOR
20141 # define DB_VERSION_MAJOR 1
20142 #endif
20143
20144 #ifndef NULL
20145 #define NULL ((void*)0)
20146 #endif
20147
20148 int main() {
20149
20150 #if DB_VERSION_MAJOR > 1
20151         {
20152                 char *version;
20153                 int major, minor, patch;
20154
20155                 version = db_version( &major, &minor, &patch );
20156
20157                 if( major != DB_VERSION_MAJOR ||
20158                         minor < DB_VERSION_MINOR )
20159                 {
20160                         printf("Berkeley DB version mismatch\n"
20161                                 "\theader: %s\n\tlibrary: %s\n",
20162                                 DB_VERSION_STRING, version);
20163                         return 1;
20164                 }
20165         }
20166 #endif
20167
20168 #if DB_VERSION_MAJOR > 2
20169         db_env_create( NULL, 0 );
20170 #elif DB_VERSION_MAJOR > 1
20171         db_appexit( NULL );
20172 #else
20173         (void) dbopen( NULL, 0, 0, 0, NULL);
20174 #endif
20175
20176 ; return 0; }
20177 EOF
20178 if { (eval echo configure:20179: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20179   rm -rf conftest*
20180   ol_cv_db_db_4_1=yes
20181 else
20182   echo "configure: failed program was:" >&5
20183   cat conftest.$ac_ext >&5
20184   rm -rf conftest*
20185   ol_cv_db_db_4_1=no
20186 fi
20187 rm -f conftest*
20188
20189         LIBS="$ol_LIBS"
20190
20191 fi
20192
20193 echo "$ac_t""$ol_cv_db_db_4_1" 1>&6
20194
20195         if test $ol_cv_db_db_4_1 = yes ; then
20196                 ol_cv_lib_db=-ldb-4-1
20197         fi
20198 fi
20199
20200 if test $ol_cv_lib_db = no ; then
20201         echo $ac_n "checking for Berkeley DB link (-ldb3)""... $ac_c" 1>&6
20202 echo "configure:20203: checking for Berkeley DB link (-ldb3)" >&5
20203 if eval "test \"\${ol_cv_db_db3+set}\" = set"; then
20204   echo $ac_n "(cached) $ac_c" 1>&6
20205 else
20206   
20207         ol_DB_LIB=-ldb3
20208         ol_LIBS=$LIBS
20209         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
20210
20211         cat > conftest.$ac_ext <<EOF
20212 #line 20213 "configure"
20213 #include "confdefs.h"
20214
20215 #ifdef HAVE_DB_185_H
20216 # include <db_185.h>
20217 #else
20218 # include <db.h>
20219 #endif
20220
20221 #ifndef DB_VERSION_MAJOR
20222 # define DB_VERSION_MAJOR 1
20223 #endif
20224
20225 #ifndef NULL
20226 #define NULL ((void*)0)
20227 #endif
20228
20229 int main() {
20230
20231 #if DB_VERSION_MAJOR > 1
20232         {
20233                 char *version;
20234                 int major, minor, patch;
20235
20236                 version = db_version( &major, &minor, &patch );
20237
20238                 if( major != DB_VERSION_MAJOR ||
20239                         minor < DB_VERSION_MINOR )
20240                 {
20241                         printf("Berkeley DB version mismatch\n"
20242                                 "\theader: %s\n\tlibrary: %s\n",
20243                                 DB_VERSION_STRING, version);
20244                         return 1;
20245                 }
20246         }
20247 #endif
20248
20249 #if DB_VERSION_MAJOR > 2
20250         db_env_create( NULL, 0 );
20251 #elif DB_VERSION_MAJOR > 1
20252         db_appexit( NULL );
20253 #else
20254         (void) dbopen( NULL, 0, 0, 0, NULL);
20255 #endif
20256
20257 ; return 0; }
20258 EOF
20259 if { (eval echo configure:20260: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20260   rm -rf conftest*
20261   ol_cv_db_db3=yes
20262 else
20263   echo "configure: failed program was:" >&5
20264   cat conftest.$ac_ext >&5
20265   rm -rf conftest*
20266   ol_cv_db_db3=no
20267 fi
20268 rm -f conftest*
20269
20270         LIBS="$ol_LIBS"
20271
20272 fi
20273
20274 echo "$ac_t""$ol_cv_db_db3" 1>&6
20275
20276         if test $ol_cv_db_db3 = yes ; then
20277                 ol_cv_lib_db=-ldb3
20278         fi
20279 fi
20280
20281 if test $ol_cv_lib_db = no ; then
20282         echo $ac_n "checking for Berkeley DB link (-ldb-3)""... $ac_c" 1>&6
20283 echo "configure:20284: checking for Berkeley DB link (-ldb-3)" >&5
20284 if eval "test \"\${ol_cv_db_db_3+set}\" = set"; then
20285   echo $ac_n "(cached) $ac_c" 1>&6
20286 else
20287   
20288         ol_DB_LIB=-ldb-3
20289         ol_LIBS=$LIBS
20290         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
20291
20292         cat > conftest.$ac_ext <<EOF
20293 #line 20294 "configure"
20294 #include "confdefs.h"
20295
20296 #ifdef HAVE_DB_185_H
20297 # include <db_185.h>
20298 #else
20299 # include <db.h>
20300 #endif
20301
20302 #ifndef DB_VERSION_MAJOR
20303 # define DB_VERSION_MAJOR 1
20304 #endif
20305
20306 #ifndef NULL
20307 #define NULL ((void*)0)
20308 #endif
20309
20310 int main() {
20311
20312 #if DB_VERSION_MAJOR > 1
20313         {
20314                 char *version;
20315                 int major, minor, patch;
20316
20317                 version = db_version( &major, &minor, &patch );
20318
20319                 if( major != DB_VERSION_MAJOR ||
20320                         minor < DB_VERSION_MINOR )
20321                 {
20322                         printf("Berkeley DB version mismatch\n"
20323                                 "\theader: %s\n\tlibrary: %s\n",
20324                                 DB_VERSION_STRING, version);
20325                         return 1;
20326                 }
20327         }
20328 #endif
20329
20330 #if DB_VERSION_MAJOR > 2
20331         db_env_create( NULL, 0 );
20332 #elif DB_VERSION_MAJOR > 1
20333         db_appexit( NULL );
20334 #else
20335         (void) dbopen( NULL, 0, 0, 0, NULL);
20336 #endif
20337
20338 ; return 0; }
20339 EOF
20340 if { (eval echo configure:20341: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20341   rm -rf conftest*
20342   ol_cv_db_db_3=yes
20343 else
20344   echo "configure: failed program was:" >&5
20345   cat conftest.$ac_ext >&5
20346   rm -rf conftest*
20347   ol_cv_db_db_3=no
20348 fi
20349 rm -f conftest*
20350
20351         LIBS="$ol_LIBS"
20352
20353 fi
20354
20355 echo "$ac_t""$ol_cv_db_db_3" 1>&6
20356
20357         if test $ol_cv_db_db_3 = yes ; then
20358                 ol_cv_lib_db=-ldb-3
20359         fi
20360 fi
20361
20362 if test $ol_cv_lib_db = no ; then
20363         echo $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6
20364 echo "configure:20365: checking for Berkeley DB link (-ldb2)" >&5
20365 if eval "test \"\${ol_cv_db_db2+set}\" = set"; then
20366   echo $ac_n "(cached) $ac_c" 1>&6
20367 else
20368   
20369         ol_DB_LIB=-ldb2
20370         ol_LIBS=$LIBS
20371         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
20372
20373         cat > conftest.$ac_ext <<EOF
20374 #line 20375 "configure"
20375 #include "confdefs.h"
20376
20377 #ifdef HAVE_DB_185_H
20378 # include <db_185.h>
20379 #else
20380 # include <db.h>
20381 #endif
20382
20383 #ifndef DB_VERSION_MAJOR
20384 # define DB_VERSION_MAJOR 1
20385 #endif
20386
20387 #ifndef NULL
20388 #define NULL ((void*)0)
20389 #endif
20390
20391 int main() {
20392
20393 #if DB_VERSION_MAJOR > 1
20394         {
20395                 char *version;
20396                 int major, minor, patch;
20397
20398                 version = db_version( &major, &minor, &patch );
20399
20400                 if( major != DB_VERSION_MAJOR ||
20401                         minor < DB_VERSION_MINOR )
20402                 {
20403                         printf("Berkeley DB version mismatch\n"
20404                                 "\theader: %s\n\tlibrary: %s\n",
20405                                 DB_VERSION_STRING, version);
20406                         return 1;
20407                 }
20408         }
20409 #endif
20410
20411 #if DB_VERSION_MAJOR > 2
20412         db_env_create( NULL, 0 );
20413 #elif DB_VERSION_MAJOR > 1
20414         db_appexit( NULL );
20415 #else
20416         (void) dbopen( NULL, 0, 0, 0, NULL);
20417 #endif
20418
20419 ; return 0; }
20420 EOF
20421 if { (eval echo configure:20422: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20422   rm -rf conftest*
20423   ol_cv_db_db2=yes
20424 else
20425   echo "configure: failed program was:" >&5
20426   cat conftest.$ac_ext >&5
20427   rm -rf conftest*
20428   ol_cv_db_db2=no
20429 fi
20430 rm -f conftest*
20431
20432         LIBS="$ol_LIBS"
20433
20434 fi
20435
20436 echo "$ac_t""$ol_cv_db_db2" 1>&6
20437
20438         if test $ol_cv_db_db2 = yes ; then
20439                 ol_cv_lib_db=-ldb2
20440         fi
20441 fi
20442
20443 if test $ol_cv_lib_db = no ; then
20444         echo $ac_n "checking for Berkeley DB link (-ldb-2)""... $ac_c" 1>&6
20445 echo "configure:20446: checking for Berkeley DB link (-ldb-2)" >&5
20446 if eval "test \"\${ol_cv_db_db_2+set}\" = set"; then
20447   echo $ac_n "(cached) $ac_c" 1>&6
20448 else
20449   
20450         ol_DB_LIB=-ldb-2
20451         ol_LIBS=$LIBS
20452         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
20453
20454         cat > conftest.$ac_ext <<EOF
20455 #line 20456 "configure"
20456 #include "confdefs.h"
20457
20458 #ifdef HAVE_DB_185_H
20459 # include <db_185.h>
20460 #else
20461 # include <db.h>
20462 #endif
20463
20464 #ifndef DB_VERSION_MAJOR
20465 # define DB_VERSION_MAJOR 1
20466 #endif
20467
20468 #ifndef NULL
20469 #define NULL ((void*)0)
20470 #endif
20471
20472 int main() {
20473
20474 #if DB_VERSION_MAJOR > 1
20475         {
20476                 char *version;
20477                 int major, minor, patch;
20478
20479                 version = db_version( &major, &minor, &patch );
20480
20481                 if( major != DB_VERSION_MAJOR ||
20482                         minor < DB_VERSION_MINOR )
20483                 {
20484                         printf("Berkeley DB version mismatch\n"
20485                                 "\theader: %s\n\tlibrary: %s\n",
20486                                 DB_VERSION_STRING, version);
20487                         return 1;
20488                 }
20489         }
20490 #endif
20491
20492 #if DB_VERSION_MAJOR > 2
20493         db_env_create( NULL, 0 );
20494 #elif DB_VERSION_MAJOR > 1
20495         db_appexit( NULL );
20496 #else
20497         (void) dbopen( NULL, 0, 0, 0, NULL);
20498 #endif
20499
20500 ; return 0; }
20501 EOF
20502 if { (eval echo configure:20503: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20503   rm -rf conftest*
20504   ol_cv_db_db_2=yes
20505 else
20506   echo "configure: failed program was:" >&5
20507   cat conftest.$ac_ext >&5
20508   rm -rf conftest*
20509   ol_cv_db_db_2=no
20510 fi
20511 rm -f conftest*
20512
20513         LIBS="$ol_LIBS"
20514
20515 fi
20516
20517 echo "$ac_t""$ol_cv_db_db_2" 1>&6
20518
20519         if test $ol_cv_db_db_2 = yes ; then
20520                 ol_cv_lib_db=-ldb-2
20521         fi
20522 fi
20523
20524 if test $ol_cv_lib_db = no ; then
20525         echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6
20526 echo "configure:20527: checking for Berkeley DB link (-ldb1)" >&5
20527 if eval "test \"\${ol_cv_db_db1+set}\" = set"; then
20528   echo $ac_n "(cached) $ac_c" 1>&6
20529 else
20530   
20531         ol_DB_LIB=-ldb1
20532         ol_LIBS=$LIBS
20533         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
20534
20535         cat > conftest.$ac_ext <<EOF
20536 #line 20537 "configure"
20537 #include "confdefs.h"
20538
20539 #ifdef HAVE_DB_185_H
20540 # include <db_185.h>
20541 #else
20542 # include <db.h>
20543 #endif
20544
20545 #ifndef DB_VERSION_MAJOR
20546 # define DB_VERSION_MAJOR 1
20547 #endif
20548
20549 #ifndef NULL
20550 #define NULL ((void*)0)
20551 #endif
20552
20553 int main() {
20554
20555 #if DB_VERSION_MAJOR > 1
20556         {
20557                 char *version;
20558                 int major, minor, patch;
20559
20560                 version = db_version( &major, &minor, &patch );
20561
20562                 if( major != DB_VERSION_MAJOR ||
20563                         minor < DB_VERSION_MINOR )
20564                 {
20565                         printf("Berkeley DB version mismatch\n"
20566                                 "\theader: %s\n\tlibrary: %s\n",
20567                                 DB_VERSION_STRING, version);
20568                         return 1;
20569                 }
20570         }
20571 #endif
20572
20573 #if DB_VERSION_MAJOR > 2
20574         db_env_create( NULL, 0 );
20575 #elif DB_VERSION_MAJOR > 1
20576         db_appexit( NULL );
20577 #else
20578         (void) dbopen( NULL, 0, 0, 0, NULL);
20579 #endif
20580
20581 ; return 0; }
20582 EOF
20583 if { (eval echo configure:20584: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20584   rm -rf conftest*
20585   ol_cv_db_db1=yes
20586 else
20587   echo "configure: failed program was:" >&5
20588   cat conftest.$ac_ext >&5
20589   rm -rf conftest*
20590   ol_cv_db_db1=no
20591 fi
20592 rm -f conftest*
20593
20594         LIBS="$ol_LIBS"
20595
20596 fi
20597
20598 echo "$ac_t""$ol_cv_db_db1" 1>&6
20599
20600         if test $ol_cv_db_db1 = yes ; then
20601                 ol_cv_lib_db=-ldb1
20602         fi
20603 fi
20604
20605 if test $ol_cv_lib_db = no ; then
20606         echo $ac_n "checking for Berkeley DB link (-ldb-1)""... $ac_c" 1>&6
20607 echo "configure:20608: checking for Berkeley DB link (-ldb-1)" >&5
20608 if eval "test \"\${ol_cv_db_db_1+set}\" = set"; then
20609   echo $ac_n "(cached) $ac_c" 1>&6
20610 else
20611   
20612         ol_DB_LIB=-ldb-1
20613         ol_LIBS=$LIBS
20614         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
20615
20616         cat > conftest.$ac_ext <<EOF
20617 #line 20618 "configure"
20618 #include "confdefs.h"
20619
20620 #ifdef HAVE_DB_185_H
20621 # include <db_185.h>
20622 #else
20623 # include <db.h>
20624 #endif
20625
20626 #ifndef DB_VERSION_MAJOR
20627 # define DB_VERSION_MAJOR 1
20628 #endif
20629
20630 #ifndef NULL
20631 #define NULL ((void*)0)
20632 #endif
20633
20634 int main() {
20635
20636 #if DB_VERSION_MAJOR > 1
20637         {
20638                 char *version;
20639                 int major, minor, patch;
20640
20641                 version = db_version( &major, &minor, &patch );
20642
20643                 if( major != DB_VERSION_MAJOR ||
20644                         minor < DB_VERSION_MINOR )
20645                 {
20646                         printf("Berkeley DB version mismatch\n"
20647                                 "\theader: %s\n\tlibrary: %s\n",
20648                                 DB_VERSION_STRING, version);
20649                         return 1;
20650                 }
20651         }
20652 #endif
20653
20654 #if DB_VERSION_MAJOR > 2
20655         db_env_create( NULL, 0 );
20656 #elif DB_VERSION_MAJOR > 1
20657         db_appexit( NULL );
20658 #else
20659         (void) dbopen( NULL, 0, 0, 0, NULL);
20660 #endif
20661
20662 ; return 0; }
20663 EOF
20664 if { (eval echo configure:20665: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20665   rm -rf conftest*
20666   ol_cv_db_db_1=yes
20667 else
20668   echo "configure: failed program was:" >&5
20669   cat conftest.$ac_ext >&5
20670   rm -rf conftest*
20671   ol_cv_db_db_1=no
20672 fi
20673 rm -f conftest*
20674
20675         LIBS="$ol_LIBS"
20676
20677 fi
20678
20679 echo "$ac_t""$ol_cv_db_db_1" 1>&6
20680
20681         if test $ol_cv_db_db_1 = yes ; then
20682                 ol_cv_lib_db=-ldb-1
20683         fi
20684 fi
20685
20686
20687         if test "$ol_cv_lib_db" != no ; then
20688                 ol_cv_berkeley_db=yes
20689                 echo $ac_n "checking for Berkeley DB version match""... $ac_c" 1>&6
20690 echo "configure:20691: checking for Berkeley DB version match" >&5
20691 if eval "test \"\${ol_cv_berkeley_db_version+set}\" = set"; then
20692   echo $ac_n "(cached) $ac_c" 1>&6
20693 else
20694   
20695         ol_LIBS="$LIBS"
20696         LIBS="$LTHREAD_LIBS $LIBS"
20697         if test $ol_cv_lib_db != yes ; then
20698                 LIBS="$ol_cv_lib_db $LIBS"
20699         fi
20700
20701         if test "$cross_compiling" = yes; then
20702   ol_cv_berkeley_db_version=cross
20703 else
20704   cat > conftest.$ac_ext <<EOF
20705 #line 20706 "configure"
20706 #include "confdefs.h"
20707
20708 #ifdef HAVE_DB_185_H
20709         choke me;
20710 #else
20711 #include <db.h>
20712 #endif
20713 #ifndef DB_VERSION_MAJOR
20714 # define DB_VERSION_MAJOR 1
20715 #endif
20716 #ifndef NULL
20717 #define NULL ((void *)0)
20718 #endif
20719 main()
20720 {
20721 #if DB_VERSION_MAJOR > 1
20722         char *version;
20723         int major, minor, patch;
20724
20725         version = db_version( &major, &minor, &patch );
20726
20727         if( major != DB_VERSION_MAJOR ||
20728                 minor != DB_VERSION_MINOR ||
20729                 patch != DB_VERSION_PATCH )
20730         {
20731                 printf("Berkeley DB version mismatch\n"
20732                         "\theader: %s\n\tlibrary: %s\n",
20733                         DB_VERSION_STRING, version);
20734                 return 1;
20735         }
20736 #endif
20737
20738         return 0;
20739 }
20740 EOF
20741 if { (eval echo configure:20742: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
20742 then
20743   ol_cv_berkeley_db_version=yes
20744 else
20745   echo "configure: failed program was:" >&5
20746   cat conftest.$ac_ext >&5
20747   rm -fr conftest*
20748   ol_cv_berkeley_db_version=no
20749 fi
20750 rm -fr conftest*
20751 fi
20752
20753
20754         LIBS="$ol_LIBS"
20755
20756 fi
20757
20758 echo "$ac_t""$ol_cv_berkeley_db_version" 1>&6
20759
20760         if test $ol_cv_berkeley_db_version = no ; then
20761                 { echo "configure: error: Berkeley DB version mismatch" 1>&2; exit 1; }
20762         fi
20763
20764                 echo $ac_n "checking for Berkeley DB thread support""... $ac_c" 1>&6
20765 echo "configure:20766: checking for Berkeley DB thread support" >&5
20766 if eval "test \"\${ol_cv_berkeley_db_thread+set}\" = set"; then
20767   echo $ac_n "(cached) $ac_c" 1>&6
20768 else
20769   
20770         ol_LIBS="$LIBS"
20771         LIBS="$LTHREAD_LIBS $LIBS"
20772         if test $ol_cv_lib_db != yes ; then
20773                 LIBS="$ol_cv_lib_db $LIBS"
20774         fi
20775
20776         if test "$cross_compiling" = yes; then
20777   ol_cv_berkeley_db_thread=cross
20778 else
20779   cat > conftest.$ac_ext <<EOF
20780 #line 20781 "configure"
20781 #include "confdefs.h"
20782
20783 #ifdef HAVE_DB_185_H
20784         choke me;
20785 #else
20786 #include <db.h>
20787 #endif
20788 #ifndef NULL
20789 #define NULL ((void *)0)
20790 #endif
20791 main()
20792 {
20793         int rc;
20794         u_int32_t flags = DB_CREATE |
20795 #ifdef DB_PRIVATE
20796                 DB_PRIVATE |
20797 #endif
20798                 DB_THREAD;
20799
20800 #if DB_VERSION_MAJOR > 2
20801         DB_ENV *env = NULL;
20802
20803         rc = db_env_create( &env, 0 );
20804
20805         flags |= DB_INIT_MPOOL;
20806 #ifdef DB_MPOOL_PRIVATE
20807         flags |= DB_MPOOL_PRIVATE;
20808 #endif
20809
20810         if( rc ) {
20811                 printf("BerkeleyDB: %s\n", db_strerror(rc) );
20812                 return rc;
20813         }
20814
20815 #if (DB_VERSION_MAJOR > 3) || (DB_VERSION_MINOR >= 1)
20816         rc = env->open( env, NULL, flags, 0 );
20817 #else
20818         rc = env->open( env, NULL, NULL, flags, 0 );
20819 #endif
20820
20821         if ( rc == 0 ) {
20822                 rc = env->close( env, 0 );
20823         }
20824
20825         if( rc ) {
20826                 printf("BerkeleyDB: %s\n", db_strerror(rc) );
20827                 return rc;
20828         }
20829
20830 #else
20831         DB_ENV env;
20832         memset( &env, '\0', sizeof(env) );
20833
20834         rc = db_appinit( NULL, NULL, &env, flags );
20835
20836         if( rc == 0 ) {
20837                 db_appexit( &env );
20838         }
20839
20840         unlink("__db_mpool.share");
20841         unlink("__db_lock.share");
20842 #endif
20843
20844         return rc;
20845 }
20846 EOF
20847 if { (eval echo configure:20848: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
20848 then
20849   ol_cv_berkeley_db_thread=yes
20850 else
20851   echo "configure: failed program was:" >&5
20852   cat conftest.$ac_ext >&5
20853   rm -fr conftest*
20854   ol_cv_berkeley_db_thread=no
20855 fi
20856 rm -fr conftest*
20857 fi
20858
20859
20860         LIBS="$ol_LIBS"
20861
20862 fi
20863
20864 echo "$ac_t""$ol_cv_berkeley_db_thread" 1>&6
20865
20866         if test $ol_cv_berkeley_db_thread != no ; then
20867                 cat >> confdefs.h <<\EOF
20868 #define HAVE_BERKELEY_DB_THREAD 1
20869 EOF
20870
20871         fi
20872
20873         fi
20874 fi
20875
20876         fi
20877
20878         if test $ol_cv_berkeley_db != no ; then
20879                 cat >> confdefs.h <<\EOF
20880 #define HAVE_BERKELEY_DB 1
20881 EOF
20882
20883
20884                 ol_link_ldbm=berkeley
20885                 ol_with_ldbm_api=berkeley
20886
20887                 if test $ol_with_ldbm_type = hash ; then
20888                         cat >> confdefs.h <<\EOF
20889 #define LDBM_USE_DBHASH 1
20890 EOF
20891
20892                 else
20893                         cat >> confdefs.h <<\EOF
20894 #define LDBM_USE_DBBTREE 1
20895 EOF
20896
20897                 fi
20898
20899                                                 if test $ol_cv_lib_db != yes ; then
20900                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db"
20901                 fi
20902         fi
20903 fi
20904
20905 if test $ol_enable_bdb != no -o $ol_enable_hdb != no; then
20906         if test $ol_link_ldbm != berkeley ; then
20907                 { echo "configure: error: BDB/HDB: BerkeleyDB not available" 1>&2; exit 1; }
20908         else
20909                 echo $ac_n "checking Berkeley DB version for BDB backend""... $ac_c" 1>&6
20910 echo "configure:20911: checking Berkeley DB version for BDB backend" >&5
20911 if eval "test \"\${ol_cv_bdb_compat+set}\" = set"; then
20912   echo $ac_n "(cached) $ac_c" 1>&6
20913 else
20914   
20915         cat > conftest.$ac_ext <<EOF
20916 #line 20917 "configure"
20917 #include "confdefs.h"
20918
20919 #include <db.h>
20920
20921  /* this check could be improved */
20922 #ifndef DB_VERSION_MAJOR
20923 #       define DB_VERSION_MAJOR 1
20924 #endif
20925 #ifndef DB_VERSION_MINOR
20926 #       define DB_VERSION_MINOR 0
20927 #endif
20928
20929 /* require 4.2 or later */
20930 #if (DB_VERSION_MAJOR >= 4) && (DB_VERSION_MINOR >= 2)
20931         __db_version_compat
20932 #endif
20933         
20934 EOF
20935 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20936   egrep "__db_version_compat" >/dev/null 2>&1; then
20937   rm -rf conftest*
20938   ol_cv_bdb_compat=yes
20939 else
20940   rm -rf conftest*
20941   ol_cv_bdb_compat=no
20942 fi
20943 rm -f conftest*
20944
20945 fi
20946
20947 echo "$ac_t""$ol_cv_bdb_compat" 1>&6
20948
20949
20950                 if test $ol_cv_bdb_compat != yes ; then
20951                         { echo "configure: error: BDB/HDB: BerkeleyDB version incompatible" 1>&2; exit 1; }
20952                 fi
20953         fi
20954 fi
20955
20956 if test $ol_link_ldbm = no -a $ol_with_ldbm_type = btree ; then
20957         echo "configure: warning: Could not find LDBM with BTREE support" 1>&2
20958         ol_with_ldbm_api=none
20959 fi
20960
20961 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = mdbm ; then
20962         echo $ac_n "checking for MDBM library""... $ac_c" 1>&6
20963 echo "configure:20964: checking for MDBM library" >&5
20964 if eval "test \"\${ol_cv_lib_mdbm+set}\" = set"; then
20965   echo $ac_n "(cached) $ac_c" 1>&6
20966 else
20967         ol_LIBS="$LIBS"
20968         echo $ac_n "checking for mdbm_set_chain""... $ac_c" 1>&6
20969 echo "configure:20970: checking for mdbm_set_chain" >&5
20970 if eval "test \"\${ac_cv_func_mdbm_set_chain+set}\" = set"; then
20971   echo $ac_n "(cached) $ac_c" 1>&6
20972 else
20973   cat > conftest.$ac_ext <<EOF
20974 #line 20975 "configure"
20975 #include "confdefs.h"
20976 /* System header to define __stub macros and hopefully few prototypes,
20977     which can conflict with char mdbm_set_chain(); below.  */
20978 #include <assert.h>
20979 /* Override any gcc2 internal prototype to avoid an error.  */
20980 /* We use char because int might match the return type of a gcc2
20981     builtin and then its argument prototype would still apply.  */
20982 char mdbm_set_chain();
20983 char (*f)();
20984
20985 int main() {
20986
20987 /* The GNU C library defines this for functions which it implements
20988     to always fail with ENOSYS.  Some functions are actually named
20989     something starting with __ and the normal name is an alias.  */
20990 #if defined (__stub_mdbm_set_chain) || defined (__stub___mdbm_set_chain)
20991 choke me
20992 #else
20993 f = mdbm_set_chain;
20994 #endif
20995
20996 ; return 0; }
20997 EOF
20998 if { (eval echo configure:20999: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20999   rm -rf conftest*
21000   eval "ac_cv_func_mdbm_set_chain=yes"
21001 else
21002   echo "configure: failed program was:" >&5
21003   cat conftest.$ac_ext >&5
21004   rm -rf conftest*
21005   eval "ac_cv_func_mdbm_set_chain=no"
21006 fi
21007 rm -f conftest*
21008 fi
21009
21010 if eval "test \"`echo '$ac_cv_func_'mdbm_set_chain`\" = yes"; then
21011   echo "$ac_t""yes" 1>&6
21012   ol_cv_lib_mdbm=yes
21013 else
21014   echo "$ac_t""no" 1>&6
21015
21016                 echo $ac_n "checking for mdbm_set_chain in -lmdbm""... $ac_c" 1>&6
21017 echo "configure:21018: checking for mdbm_set_chain in -lmdbm" >&5
21018 ac_lib_var=`echo mdbm'_'mdbm_set_chain | sed 'y%./+-:%__p__%'`
21019 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
21020   echo $ac_n "(cached) $ac_c" 1>&6
21021 else
21022   ac_save_LIBS="$LIBS"
21023 LIBS="-lmdbm  $LIBS"
21024 cat > conftest.$ac_ext <<EOF
21025 #line 21026 "configure"
21026 #include "confdefs.h"
21027 /* Override any gcc2 internal prototype to avoid an error.  */
21028 /* We use char because int might match the return type of a gcc2
21029     builtin and then its argument prototype would still apply.  */
21030 char mdbm_set_chain();
21031
21032 int main() {
21033 mdbm_set_chain()
21034 ; return 0; }
21035 EOF
21036 if { (eval echo configure:21037: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21037   rm -rf conftest*
21038   eval "ac_cv_lib_$ac_lib_var=yes"
21039 else
21040   echo "configure: failed program was:" >&5
21041   cat conftest.$ac_ext >&5
21042   rm -rf conftest*
21043   eval "ac_cv_lib_$ac_lib_var=no"
21044 fi
21045 rm -f conftest*
21046 LIBS="$ac_save_LIBS"
21047
21048 fi
21049 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
21050   echo "$ac_t""yes" 1>&6
21051   ol_cv_lib_mdbm=-lmdbm
21052 else
21053   echo "$ac_t""no" 1>&6
21054 ol_cv_lib_mdbm=no
21055 fi
21056
21057         
21058 fi
21059
21060         LIBS="$ol_LIBS"
21061
21062 fi
21063
21064 echo "$ac_t""$ol_cv_lib_mdbm" 1>&6
21065
21066
21067  for ac_hdr in mdbm.h
21068 do
21069 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
21070 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
21071 echo "configure:21072: checking for $ac_hdr" >&5
21072 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
21073   echo $ac_n "(cached) $ac_c" 1>&6
21074 else
21075   cat > conftest.$ac_ext <<EOF
21076 #line 21077 "configure"
21077 #include "confdefs.h"
21078 #include <$ac_hdr>
21079 EOF
21080 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
21081 { (eval echo configure:21082: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
21082 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
21083 if test -z "$ac_err"; then
21084   rm -rf conftest*
21085   eval "ac_cv_header_$ac_safe=yes"
21086 else
21087   echo "$ac_err" >&5
21088   echo "configure: failed program was:" >&5
21089   cat conftest.$ac_ext >&5
21090   rm -rf conftest*
21091   eval "ac_cv_header_$ac_safe=no"
21092 fi
21093 rm -f conftest*
21094 fi
21095 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
21096   echo "$ac_t""yes" 1>&6
21097     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
21098   cat >> confdefs.h <<EOF
21099 #define $ac_tr_hdr 1
21100 EOF
21101  
21102 else
21103   echo "$ac_t""no" 1>&6
21104 fi
21105 done
21106
21107  echo $ac_n "checking for db""... $ac_c" 1>&6
21108 echo "configure:21109: checking for db" >&5
21109 if eval "test \"\${ol_cv_mdbm+set}\" = set"; then
21110   echo $ac_n "(cached) $ac_c" 1>&6
21111 else
21112   
21113         if test $ol_cv_lib_mdbm = no -o $ac_cv_header_mdbm_h = no ; then
21114                 ol_cv_mdbm=no
21115         else
21116                 ol_cv_mdbm=yes
21117         fi
21118
21119 fi
21120
21121 echo "$ac_t""$ol_cv_mdbm" 1>&6
21122  if test $ol_cv_mdbm = yes ; then
21123         cat >> confdefs.h <<\EOF
21124 #define HAVE_MDBM 1
21125 EOF
21126
21127  fi
21128
21129
21130         if test $ol_cv_mdbm = yes ; then
21131                 ol_link_ldbm=mdbm
21132                 ol_with_ldbm_api=mdbm
21133                 if test $ol_cv_lib_mdbm != yes ; then
21134                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_mdbm"
21135                 fi
21136         fi
21137 fi
21138
21139 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = gdbm ; then
21140         echo $ac_n "checking for GDBM library""... $ac_c" 1>&6
21141 echo "configure:21142: checking for GDBM library" >&5
21142 if eval "test \"\${ol_cv_lib_gdbm+set}\" = set"; then
21143   echo $ac_n "(cached) $ac_c" 1>&6
21144 else
21145         ol_LIBS="$LIBS"
21146         echo $ac_n "checking for gdbm_open""... $ac_c" 1>&6
21147 echo "configure:21148: checking for gdbm_open" >&5
21148 if eval "test \"\${ac_cv_func_gdbm_open+set}\" = set"; then
21149   echo $ac_n "(cached) $ac_c" 1>&6
21150 else
21151   cat > conftest.$ac_ext <<EOF
21152 #line 21153 "configure"
21153 #include "confdefs.h"
21154 /* System header to define __stub macros and hopefully few prototypes,
21155     which can conflict with char gdbm_open(); below.  */
21156 #include <assert.h>
21157 /* Override any gcc2 internal prototype to avoid an error.  */
21158 /* We use char because int might match the return type of a gcc2
21159     builtin and then its argument prototype would still apply.  */
21160 char gdbm_open();
21161 char (*f)();
21162
21163 int main() {
21164
21165 /* The GNU C library defines this for functions which it implements
21166     to always fail with ENOSYS.  Some functions are actually named
21167     something starting with __ and the normal name is an alias.  */
21168 #if defined (__stub_gdbm_open) || defined (__stub___gdbm_open)
21169 choke me
21170 #else
21171 f = gdbm_open;
21172 #endif
21173
21174 ; return 0; }
21175 EOF
21176 if { (eval echo configure:21177: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21177   rm -rf conftest*
21178   eval "ac_cv_func_gdbm_open=yes"
21179 else
21180   echo "configure: failed program was:" >&5
21181   cat conftest.$ac_ext >&5
21182   rm -rf conftest*
21183   eval "ac_cv_func_gdbm_open=no"
21184 fi
21185 rm -f conftest*
21186 fi
21187
21188 if eval "test \"`echo '$ac_cv_func_'gdbm_open`\" = yes"; then
21189   echo "$ac_t""yes" 1>&6
21190   ol_cv_lib_gdbm=yes
21191 else
21192   echo "$ac_t""no" 1>&6
21193
21194                 echo $ac_n "checking for gdbm_open in -lgdbm""... $ac_c" 1>&6
21195 echo "configure:21196: checking for gdbm_open in -lgdbm" >&5
21196 ac_lib_var=`echo gdbm'_'gdbm_open | sed 'y%./+-:%__p__%'`
21197 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
21198   echo $ac_n "(cached) $ac_c" 1>&6
21199 else
21200   ac_save_LIBS="$LIBS"
21201 LIBS="-lgdbm  $LIBS"
21202 cat > conftest.$ac_ext <<EOF
21203 #line 21204 "configure"
21204 #include "confdefs.h"
21205 /* Override any gcc2 internal prototype to avoid an error.  */
21206 /* We use char because int might match the return type of a gcc2
21207     builtin and then its argument prototype would still apply.  */
21208 char gdbm_open();
21209
21210 int main() {
21211 gdbm_open()
21212 ; return 0; }
21213 EOF
21214 if { (eval echo configure:21215: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21215   rm -rf conftest*
21216   eval "ac_cv_lib_$ac_lib_var=yes"
21217 else
21218   echo "configure: failed program was:" >&5
21219   cat conftest.$ac_ext >&5
21220   rm -rf conftest*
21221   eval "ac_cv_lib_$ac_lib_var=no"
21222 fi
21223 rm -f conftest*
21224 LIBS="$ac_save_LIBS"
21225
21226 fi
21227 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
21228   echo "$ac_t""yes" 1>&6
21229   ol_cv_lib_gdbm=-lgdbm
21230 else
21231   echo "$ac_t""no" 1>&6
21232 ol_cv_lib_gdbm=no
21233 fi
21234
21235         
21236 fi
21237
21238         LIBS="$ol_LIBS"
21239
21240 fi
21241
21242 echo "$ac_t""$ol_cv_lib_gdbm" 1>&6
21243
21244
21245  for ac_hdr in gdbm.h
21246 do
21247 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
21248 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
21249 echo "configure:21250: checking for $ac_hdr" >&5
21250 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
21251   echo $ac_n "(cached) $ac_c" 1>&6
21252 else
21253   cat > conftest.$ac_ext <<EOF
21254 #line 21255 "configure"
21255 #include "confdefs.h"
21256 #include <$ac_hdr>
21257 EOF
21258 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
21259 { (eval echo configure:21260: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
21260 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
21261 if test -z "$ac_err"; then
21262   rm -rf conftest*
21263   eval "ac_cv_header_$ac_safe=yes"
21264 else
21265   echo "$ac_err" >&5
21266   echo "configure: failed program was:" >&5
21267   cat conftest.$ac_ext >&5
21268   rm -rf conftest*
21269   eval "ac_cv_header_$ac_safe=no"
21270 fi
21271 rm -f conftest*
21272 fi
21273 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
21274   echo "$ac_t""yes" 1>&6
21275     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
21276   cat >> confdefs.h <<EOF
21277 #define $ac_tr_hdr 1
21278 EOF
21279  
21280 else
21281   echo "$ac_t""no" 1>&6
21282 fi
21283 done
21284
21285  echo $ac_n "checking for db""... $ac_c" 1>&6
21286 echo "configure:21287: checking for db" >&5
21287 if eval "test \"\${ol_cv_gdbm+set}\" = set"; then
21288   echo $ac_n "(cached) $ac_c" 1>&6
21289 else
21290   
21291         if test $ol_cv_lib_gdbm = no -o $ac_cv_header_gdbm_h = no ; then
21292                 ol_cv_gdbm=no
21293         else
21294                 ol_cv_gdbm=yes
21295         fi
21296
21297 fi
21298
21299 echo "$ac_t""$ol_cv_gdbm" 1>&6
21300  if test $ol_cv_gdbm = yes ; then
21301         cat >> confdefs.h <<\EOF
21302 #define HAVE_GDBM 1
21303 EOF
21304
21305  fi
21306
21307
21308         if test $ol_cv_gdbm = yes ; then
21309                 ol_link_ldbm=gdbm
21310                 ol_with_ldbm_api=gdbm
21311
21312                 if test $ol_cv_lib_gdbm != yes ; then
21313                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_gdbm"
21314                 fi
21315         fi
21316 fi
21317
21318 if test $ol_with_ldbm_api = ndbm ; then
21319         echo $ac_n "checking for NDBM library""... $ac_c" 1>&6
21320 echo "configure:21321: checking for NDBM library" >&5
21321 if eval "test \"\${ol_cv_lib_ndbm+set}\" = set"; then
21322   echo $ac_n "(cached) $ac_c" 1>&6
21323 else
21324         ol_LIBS="$LIBS"
21325         echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
21326 echo "configure:21327: checking for dbm_open" >&5
21327 if eval "test \"\${ac_cv_func_dbm_open+set}\" = set"; then
21328   echo $ac_n "(cached) $ac_c" 1>&6
21329 else
21330   cat > conftest.$ac_ext <<EOF
21331 #line 21332 "configure"
21332 #include "confdefs.h"
21333 /* System header to define __stub macros and hopefully few prototypes,
21334     which can conflict with char dbm_open(); below.  */
21335 #include <assert.h>
21336 /* Override any gcc2 internal prototype to avoid an error.  */
21337 /* We use char because int might match the return type of a gcc2
21338     builtin and then its argument prototype would still apply.  */
21339 char dbm_open();
21340 char (*f)();
21341
21342 int main() {
21343
21344 /* The GNU C library defines this for functions which it implements
21345     to always fail with ENOSYS.  Some functions are actually named
21346     something starting with __ and the normal name is an alias.  */
21347 #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
21348 choke me
21349 #else
21350 f = dbm_open;
21351 #endif
21352
21353 ; return 0; }
21354 EOF
21355 if { (eval echo configure:21356: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21356   rm -rf conftest*
21357   eval "ac_cv_func_dbm_open=yes"
21358 else
21359   echo "configure: failed program was:" >&5
21360   cat conftest.$ac_ext >&5
21361   rm -rf conftest*
21362   eval "ac_cv_func_dbm_open=no"
21363 fi
21364 rm -f conftest*
21365 fi
21366
21367 if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then
21368   echo "$ac_t""yes" 1>&6
21369   ol_cv_lib_ndbm=yes
21370 else
21371   echo "$ac_t""no" 1>&6
21372
21373                 echo $ac_n "checking for dbm_open in -lndbm""... $ac_c" 1>&6
21374 echo "configure:21375: checking for dbm_open in -lndbm" >&5
21375 ac_lib_var=`echo ndbm'_'dbm_open | sed 'y%./+-:%__p__%'`
21376 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
21377   echo $ac_n "(cached) $ac_c" 1>&6
21378 else
21379   ac_save_LIBS="$LIBS"
21380 LIBS="-lndbm  $LIBS"
21381 cat > conftest.$ac_ext <<EOF
21382 #line 21383 "configure"
21383 #include "confdefs.h"
21384 /* Override any gcc2 internal prototype to avoid an error.  */
21385 /* We use char because int might match the return type of a gcc2
21386     builtin and then its argument prototype would still apply.  */
21387 char dbm_open();
21388
21389 int main() {
21390 dbm_open()
21391 ; return 0; }
21392 EOF
21393 if { (eval echo configure:21394: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21394   rm -rf conftest*
21395   eval "ac_cv_lib_$ac_lib_var=yes"
21396 else
21397   echo "configure: failed program was:" >&5
21398   cat conftest.$ac_ext >&5
21399   rm -rf conftest*
21400   eval "ac_cv_lib_$ac_lib_var=no"
21401 fi
21402 rm -f conftest*
21403 LIBS="$ac_save_LIBS"
21404
21405 fi
21406 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
21407   echo "$ac_t""yes" 1>&6
21408   ol_cv_lib_ndbm=-lndbm
21409 else
21410   echo "$ac_t""no" 1>&6
21411
21412                         echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
21413 echo "configure:21414: checking for dbm_open in -ldbm" >&5
21414 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-:%__p__%'`
21415 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
21416   echo $ac_n "(cached) $ac_c" 1>&6
21417 else
21418   ac_save_LIBS="$LIBS"
21419 LIBS="-ldbm  $LIBS"
21420 cat > conftest.$ac_ext <<EOF
21421 #line 21422 "configure"
21422 #include "confdefs.h"
21423 /* Override any gcc2 internal prototype to avoid an error.  */
21424 /* We use char because int might match the return type of a gcc2
21425     builtin and then its argument prototype would still apply.  */
21426 char dbm_open();
21427
21428 int main() {
21429 dbm_open()
21430 ; return 0; }
21431 EOF
21432 if { (eval echo configure:21433: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21433   rm -rf conftest*
21434   eval "ac_cv_lib_$ac_lib_var=yes"
21435 else
21436   echo "configure: failed program was:" >&5
21437   cat conftest.$ac_ext >&5
21438   rm -rf conftest*
21439   eval "ac_cv_lib_$ac_lib_var=no"
21440 fi
21441 rm -f conftest*
21442 LIBS="$ac_save_LIBS"
21443
21444 fi
21445 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
21446   echo "$ac_t""yes" 1>&6
21447   ol_cv_lib_ndbm=-ldbm
21448 else
21449   echo "$ac_t""no" 1>&6
21450 ol_cv_lib_ndbm=no
21451 fi
21452                 
21453 fi
21454
21455         
21456 fi
21457
21458         LIBS="$ol_LIBS"
21459
21460 fi
21461
21462 echo "$ac_t""$ol_cv_lib_ndbm" 1>&6
21463
21464
21465  for ac_hdr in ndbm.h
21466 do
21467 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
21468 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
21469 echo "configure:21470: checking for $ac_hdr" >&5
21470 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
21471   echo $ac_n "(cached) $ac_c" 1>&6
21472 else
21473   cat > conftest.$ac_ext <<EOF
21474 #line 21475 "configure"
21475 #include "confdefs.h"
21476 #include <$ac_hdr>
21477 EOF
21478 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
21479 { (eval echo configure:21480: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
21480 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
21481 if test -z "$ac_err"; then
21482   rm -rf conftest*
21483   eval "ac_cv_header_$ac_safe=yes"
21484 else
21485   echo "$ac_err" >&5
21486   echo "configure: failed program was:" >&5
21487   cat conftest.$ac_ext >&5
21488   rm -rf conftest*
21489   eval "ac_cv_header_$ac_safe=no"
21490 fi
21491 rm -f conftest*
21492 fi
21493 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
21494   echo "$ac_t""yes" 1>&6
21495     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
21496   cat >> confdefs.h <<EOF
21497 #define $ac_tr_hdr 1
21498 EOF
21499  
21500 else
21501   echo "$ac_t""no" 1>&6
21502 fi
21503 done
21504
21505  echo $ac_n "checking for db""... $ac_c" 1>&6
21506 echo "configure:21507: checking for db" >&5
21507 if eval "test \"\${ol_cv_ndbm+set}\" = set"; then
21508   echo $ac_n "(cached) $ac_c" 1>&6
21509 else
21510   
21511         if test $ol_cv_lib_ndbm = no -o $ac_cv_header_ndbm_h = no ; then
21512                 ol_cv_ndbm=no
21513         else
21514                 ol_cv_ndbm=yes
21515         fi
21516
21517 fi
21518
21519 echo "$ac_t""$ol_cv_ndbm" 1>&6
21520  if test $ol_cv_ndbm = yes ; then
21521         cat >> confdefs.h <<\EOF
21522 #define HAVE_NDBM 1
21523 EOF
21524
21525  fi
21526
21527
21528         if test $ol_cv_ndbm = yes ; then
21529                 ol_link_ldbm=ndbm
21530                 ol_with_ldbm_api=ndbm
21531
21532                 if test $ol_cv_lib_ndbm != yes ; then
21533                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_ndbm"
21534                 fi
21535         fi
21536 fi
21537
21538 if test $ol_link_ldbm = no -a $ol_enable_ldbm != no ; then
21539         { echo "configure: error: could not find suitable LDBM backend" 1>&2; exit 1; }
21540 fi
21541
21542 if test $ol_enable_bdb = yes -o \
21543         $ol_enable_hdb = yes -o \
21544         $ol_enable_ldbm = yes ; then
21545         SLAPD_LIBS="$SLAPD_LIBS \$(LDBM_LIBS)"
21546 fi
21547
21548
21549 if test $ol_enable_dynamic = yes -a $enable_shared = yes ; then
21550         BUILD_LIBS_DYNAMIC=shared
21551         cat >> confdefs.h <<\EOF
21552 #define LDAP_LIBS_DYNAMIC 1
21553 EOF
21554
21555         LTSTATIC=""
21556 else
21557         BUILD_LIBS_DYNAMIC=static
21558         LTSTATIC="-static"
21559 fi
21560
21561 if test $ol_enable_wrappers != no ; then
21562         for ac_hdr in tcpd.h
21563 do
21564 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
21565 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
21566 echo "configure:21567: checking for $ac_hdr" >&5
21567 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
21568   echo $ac_n "(cached) $ac_c" 1>&6
21569 else
21570   cat > conftest.$ac_ext <<EOF
21571 #line 21572 "configure"
21572 #include "confdefs.h"
21573 #include <$ac_hdr>
21574 EOF
21575 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
21576 { (eval echo configure:21577: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
21577 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
21578 if test -z "$ac_err"; then
21579   rm -rf conftest*
21580   eval "ac_cv_header_$ac_safe=yes"
21581 else
21582   echo "$ac_err" >&5
21583   echo "configure: failed program was:" >&5
21584   cat conftest.$ac_ext >&5
21585   rm -rf conftest*
21586   eval "ac_cv_header_$ac_safe=no"
21587 fi
21588 rm -f conftest*
21589 fi
21590 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
21591   echo "$ac_t""yes" 1>&6
21592     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
21593   cat >> confdefs.h <<EOF
21594 #define $ac_tr_hdr 1
21595 EOF
21596  
21597                 echo $ac_n "checking for TCP wrappers library""... $ac_c" 1>&6
21598 echo "configure:21599: checking for TCP wrappers library" >&5
21599                 save_LIBS="$LIBS"
21600                 LIBS="$LIBS -lwrap"
21601                 cat > conftest.$ac_ext <<EOF
21602 #line 21603 "configure"
21603 #include "confdefs.h"
21604
21605 #include <tcpd.h>
21606 int allow_severity = 0;
21607 int deny_severity  = 0;
21608
21609 struct request_info *req;
21610                 
21611 int main() {
21612
21613 hosts_access(req)
21614                 
21615 ; return 0; }
21616 EOF
21617 if { (eval echo configure:21618: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21618   rm -rf conftest*
21619   echo "$ac_t""-lwrap" 1>&6
21620                 have_wrappers=yes
21621                 LIBS="$save_LIBS"
21622 else
21623   echo "configure: failed program was:" >&5
21624   cat conftest.$ac_ext >&5
21625   rm -rf conftest*
21626   
21627                                 LIBS="$LIBS -lnsl"
21628                 cat > conftest.$ac_ext <<EOF
21629 #line 21630 "configure"
21630 #include "confdefs.h"
21631
21632 #include <tcpd.h>
21633 int allow_severity = 0;
21634 int deny_severity  = 0;
21635
21636 struct request_info *req;
21637                 
21638 int main() {
21639
21640 hosts_access(req)
21641                 
21642 ; return 0; }
21643 EOF
21644 if { (eval echo configure:21645: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21645   rm -rf conftest*
21646   echo "$ac_t""-lwrap -lnsl" 1>&6
21647                 have_wrappers=yes
21648                 LIBS="$save_LIBS -lnsl"
21649 else
21650   echo "configure: failed program was:" >&5
21651   cat conftest.$ac_ext >&5
21652   rm -rf conftest*
21653   
21654                 echo "$ac_t""no" 1>&6
21655                 have_wrappers=no
21656                 LIBS=$save_LIBS
21657 fi
21658 rm -f conftest*
21659 fi
21660 rm -f conftest*
21661 else
21662   echo "$ac_t""no" 1>&6
21663 have_wrappers=no
21664 fi
21665 done
21666
21667
21668         if test $have_wrappers = yes ; then
21669                 cat >> confdefs.h <<\EOF
21670 #define HAVE_TCPD 1
21671 EOF
21672
21673                 WRAP_LIBS="-lwrap"
21674         elif test $ol_enable_wrappers = yes ; then
21675                 { echo "configure: error: could not find TCP wrappers, select apppropriate options or disable" 1>&2; exit 1; }
21676         else
21677                 echo "configure: warning: could not find TCP wrappers, support disabled" 1>&2
21678                 WRAP_LIBS=""
21679         fi
21680 fi
21681
21682 if test $ol_enable_syslog != no ; then
21683         echo $ac_n "checking for openlog""... $ac_c" 1>&6
21684 echo "configure:21685: checking for openlog" >&5
21685 if eval "test \"\${ac_cv_func_openlog+set}\" = set"; then
21686   echo $ac_n "(cached) $ac_c" 1>&6
21687 else
21688   cat > conftest.$ac_ext <<EOF
21689 #line 21690 "configure"
21690 #include "confdefs.h"
21691 /* System header to define __stub macros and hopefully few prototypes,
21692     which can conflict with char openlog(); below.  */
21693 #include <assert.h>
21694 /* Override any gcc2 internal prototype to avoid an error.  */
21695 /* We use char because int might match the return type of a gcc2
21696     builtin and then its argument prototype would still apply.  */
21697 char openlog();
21698 char (*f)();
21699
21700 int main() {
21701
21702 /* The GNU C library defines this for functions which it implements
21703     to always fail with ENOSYS.  Some functions are actually named
21704     something starting with __ and the normal name is an alias.  */
21705 #if defined (__stub_openlog) || defined (__stub___openlog)
21706 choke me
21707 #else
21708 f = openlog;
21709 #endif
21710
21711 ; return 0; }
21712 EOF
21713 if { (eval echo configure:21714: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21714   rm -rf conftest*
21715   eval "ac_cv_func_openlog=yes"
21716 else
21717   echo "configure: failed program was:" >&5
21718   cat conftest.$ac_ext >&5
21719   rm -rf conftest*
21720   eval "ac_cv_func_openlog=no"
21721 fi
21722 rm -f conftest*
21723 fi
21724
21725 if eval "test \"`echo '$ac_cv_func_'openlog`\" = yes"; then
21726   echo "$ac_t""yes" 1>&6
21727   :
21728 else
21729   echo "$ac_t""no" 1>&6
21730 fi
21731
21732         if test $ac_cv_func_openlog = no -a $ol_enable_syslog = yes; then
21733                 { echo "configure: error: could not find syslog" 1>&2; exit 1; }
21734         fi
21735         ol_enable_syslog=$ac_cv_func_openlog
21736 fi
21737
21738
21739 ol_link_sql=no
21740 if test $ol_enable_sql != no ; then
21741         for ac_hdr in sql.h sqlext.h
21742 do
21743 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
21744 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
21745 echo "configure:21746: checking for $ac_hdr" >&5
21746 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
21747   echo $ac_n "(cached) $ac_c" 1>&6
21748 else
21749   cat > conftest.$ac_ext <<EOF
21750 #line 21751 "configure"
21751 #include "confdefs.h"
21752 #include <$ac_hdr>
21753 EOF
21754 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
21755 { (eval echo configure:21756: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
21756 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
21757 if test -z "$ac_err"; then
21758   rm -rf conftest*
21759   eval "ac_cv_header_$ac_safe=yes"
21760 else
21761   echo "$ac_err" >&5
21762   echo "configure: failed program was:" >&5
21763   cat conftest.$ac_ext >&5
21764   rm -rf conftest*
21765   eval "ac_cv_header_$ac_safe=no"
21766 fi
21767 rm -f conftest*
21768 fi
21769 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
21770   echo "$ac_t""yes" 1>&6
21771     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
21772   cat >> confdefs.h <<EOF
21773 #define $ac_tr_hdr 1
21774 EOF
21775  
21776 else
21777   echo "$ac_t""no" 1>&6
21778 { echo "configure: error: could not locate SQL headers" 1>&2; exit 1; }
21779         
21780 fi
21781 done
21782
21783
21784         sql_LIBS="$LIBS"
21785         LIBS="$LTHREAD_LIBS"
21786
21787         echo $ac_n "checking for SQLDriverConnect in -liodbc""... $ac_c" 1>&6
21788 echo "configure:21789: checking for SQLDriverConnect in -liodbc" >&5
21789 ac_lib_var=`echo iodbc'_'SQLDriverConnect | sed 'y%./+-:%__p__%'`
21790 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
21791   echo $ac_n "(cached) $ac_c" 1>&6
21792 else
21793   ac_save_LIBS="$LIBS"
21794 LIBS="-liodbc  $LIBS"
21795 cat > conftest.$ac_ext <<EOF
21796 #line 21797 "configure"
21797 #include "confdefs.h"
21798 /* Override any gcc2 internal prototype to avoid an error.  */
21799 /* We use char because int might match the return type of a gcc2
21800     builtin and then its argument prototype would still apply.  */
21801 char SQLDriverConnect();
21802
21803 int main() {
21804 SQLDriverConnect()
21805 ; return 0; }
21806 EOF
21807 if { (eval echo configure:21808: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21808   rm -rf conftest*
21809   eval "ac_cv_lib_$ac_lib_var=yes"
21810 else
21811   echo "configure: failed program was:" >&5
21812   cat conftest.$ac_ext >&5
21813   rm -rf conftest*
21814   eval "ac_cv_lib_$ac_lib_var=no"
21815 fi
21816 rm -f conftest*
21817 LIBS="$ac_save_LIBS"
21818
21819 fi
21820 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
21821   echo "$ac_t""yes" 1>&6
21822   have_iodbc=yes
21823 else
21824   echo "$ac_t""no" 1>&6
21825 have_iodbc=no
21826 fi
21827
21828         if test $have_iodbc = yes ; then
21829                 ol_link_sql="-liodbc"
21830         else
21831                 echo $ac_n "checking for SQLDriverConnect in -lodbc""... $ac_c" 1>&6
21832 echo "configure:21833: checking for SQLDriverConnect in -lodbc" >&5
21833 ac_lib_var=`echo odbc'_'SQLDriverConnect | sed 'y%./+-:%__p__%'`
21834 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
21835   echo $ac_n "(cached) $ac_c" 1>&6
21836 else
21837   ac_save_LIBS="$LIBS"
21838 LIBS="-lodbc  $LIBS"
21839 cat > conftest.$ac_ext <<EOF
21840 #line 21841 "configure"
21841 #include "confdefs.h"
21842 /* Override any gcc2 internal prototype to avoid an error.  */
21843 /* We use char because int might match the return type of a gcc2
21844     builtin and then its argument prototype would still apply.  */
21845 char SQLDriverConnect();
21846
21847 int main() {
21848 SQLDriverConnect()
21849 ; return 0; }
21850 EOF
21851 if { (eval echo configure:21852: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21852   rm -rf conftest*
21853   eval "ac_cv_lib_$ac_lib_var=yes"
21854 else
21855   echo "configure: failed program was:" >&5
21856   cat conftest.$ac_ext >&5
21857   rm -rf conftest*
21858   eval "ac_cv_lib_$ac_lib_var=no"
21859 fi
21860 rm -f conftest*
21861 LIBS="$ac_save_LIBS"
21862
21863 fi
21864 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
21865   echo "$ac_t""yes" 1>&6
21866   have_odbc=yes
21867 else
21868   echo "$ac_t""no" 1>&6
21869 have_odbc=no
21870 fi
21871
21872                 if test $have_odbc = yes ; then
21873                         ol_link_sql="-lodbc"
21874                 fi
21875         fi
21876
21877         LIBS="$sql_LIBS"
21878
21879         if test $ol_link_sql != no ; then
21880                 SLAPD_SQL_LIBS="$ol_link_sql"
21881
21882         elif test $ol_enable_sql != auto ; then
21883                 { echo "configure: error: could not locate suitable ODBC library" 1>&2; exit 1; }
21884         fi
21885 fi
21886
21887 WITH_SASL=no
21888 ol_link_sasl=no
21889 ol_link_spasswd=no
21890 if test $ol_with_cyrus_sasl != no ; then
21891         for ac_hdr in sasl/sasl.h sasl.h
21892 do
21893 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
21894 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
21895 echo "configure:21896: checking for $ac_hdr" >&5
21896 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
21897   echo $ac_n "(cached) $ac_c" 1>&6
21898 else
21899   cat > conftest.$ac_ext <<EOF
21900 #line 21901 "configure"
21901 #include "confdefs.h"
21902 #include <$ac_hdr>
21903 EOF
21904 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
21905 { (eval echo configure:21906: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
21906 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
21907 if test -z "$ac_err"; then
21908   rm -rf conftest*
21909   eval "ac_cv_header_$ac_safe=yes"
21910 else
21911   echo "$ac_err" >&5
21912   echo "configure: failed program was:" >&5
21913   cat conftest.$ac_ext >&5
21914   rm -rf conftest*
21915   eval "ac_cv_header_$ac_safe=no"
21916 fi
21917 rm -f conftest*
21918 fi
21919 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
21920   echo "$ac_t""yes" 1>&6
21921     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
21922   cat >> confdefs.h <<EOF
21923 #define $ac_tr_hdr 1
21924 EOF
21925  
21926 else
21927   echo "$ac_t""no" 1>&6
21928 fi
21929 done
21930
21931
21932         if test $ac_cv_header_sasl_sasl_h = yes -o $ac_cv_header_sasl_h = yes; then
21933                 echo $ac_n "checking for sasl_client_init in -lsasl2""... $ac_c" 1>&6
21934 echo "configure:21935: checking for sasl_client_init in -lsasl2" >&5
21935 ac_lib_var=`echo sasl2'_'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="-lsasl2  $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="-lsasl2"
21969 else
21970   echo "$ac_t""no" 1>&6
21971 echo $ac_n "checking for sasl_client_init in -lsasl""... $ac_c" 1>&6
21972 echo "configure:21973: checking for sasl_client_init in -lsasl" >&5
21973 ac_lib_var=`echo sasl'_'sasl_client_init | sed 'y%./+-:%__p__%'`
21974 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
21975   echo $ac_n "(cached) $ac_c" 1>&6
21976 else
21977   ac_save_LIBS="$LIBS"
21978 LIBS="-lsasl  $LIBS"
21979 cat > conftest.$ac_ext <<EOF
21980 #line 21981 "configure"
21981 #include "confdefs.h"
21982 /* Override any gcc2 internal prototype to avoid an error.  */
21983 /* We use char because int might match the return type of a gcc2
21984     builtin and then its argument prototype would still apply.  */
21985 char sasl_client_init();
21986
21987 int main() {
21988 sasl_client_init()
21989 ; return 0; }
21990 EOF
21991 if { (eval echo configure:21992: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21992   rm -rf conftest*
21993   eval "ac_cv_lib_$ac_lib_var=yes"
21994 else
21995   echo "configure: failed program was:" >&5
21996   cat conftest.$ac_ext >&5
21997   rm -rf conftest*
21998   eval "ac_cv_lib_$ac_lib_var=no"
21999 fi
22000 rm -f conftest*
22001 LIBS="$ac_save_LIBS"
22002
22003 fi
22004 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
22005   echo "$ac_t""yes" 1>&6
22006   ol_link_sasl="-lsasl"
22007 else
22008   echo "$ac_t""no" 1>&6
22009 fi
22010
22011 fi
22012
22013         fi
22014
22015         if test $ol_link_sasl = no ; then
22016                 if test $ol_with_cyrus_sasl != auto ; then
22017                         { echo "configure: error: Could not locate Cyrus SASL" 1>&2; exit 1; }
22018                 else
22019                         echo "configure: warning: Could not locate Cyrus SASL" 1>&2
22020                         echo "configure: warning: SASL authentication not supported!" 1>&2
22021                         if test $ol_link_tls = no ; then
22022                                 echo "configure: warning: Strong authentication not supported!" 1>&2
22023                         fi
22024                 fi
22025         else
22026                 echo $ac_n "checking Cyrus SASL library version""... $ac_c" 1>&6
22027 echo "configure:22028: checking Cyrus SASL library version" >&5
22028 if eval "test \"\${ol_cv_sasl_compat+set}\" = set"; then
22029   echo $ac_n "(cached) $ac_c" 1>&6
22030 else
22031   
22032         cat > conftest.$ac_ext <<EOF
22033 #line 22034 "configure"
22034 #include "confdefs.h"
22035
22036 #ifdef HAVE_SASL_SASL_H
22037 #include <sasl/sasl.h>
22038 #else
22039 #include <sasl.h>
22040 #endif
22041
22042 /* Require 2.1.15+ */
22043 #if SASL_VERSION_MAJOR == 2  && SASL_VERSION_MINOR > 1
22044         char *__sasl_compat = "2.2+ or better okay (we guess)";
22045 #elif SASL_VERSION_MAJOR == 2  && SASL_VERSION_MINOR == 1 \
22046         && SASL_VERSION_STEP >=15
22047         char *__sasl_compat = "2.1.15+ or better okay";
22048 #endif
22049         
22050 EOF
22051 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
22052   egrep "__sasl_compat" >/dev/null 2>&1; then
22053   rm -rf conftest*
22054   ol_cv_sasl_compat=yes
22055 else
22056   rm -rf conftest*
22057   ol_cv_sasl_compat=no
22058 fi
22059 rm -f conftest*
22060
22061 fi
22062
22063 echo "$ac_t""$ol_cv_sasl_compat" 1>&6
22064
22065                 if test $ol_cv_sasl_compat = no ; then
22066                         ol_link_sasl=no
22067                         { echo "configure: error: Cyrus SASL library located but is incompatible" 1>&2; exit 1; }
22068                 fi
22069
22070                 cat >> confdefs.h <<\EOF
22071 #define HAVE_CYRUS_SASL 1
22072 EOF
22073
22074                 SASL_LIBS="$ol_link_sasl"
22075                 if test $ol_enable_spasswd != no ; then
22076                         ol_link_spasswd=yes
22077                 fi
22078
22079                 ac_save_LIBS="$LIBS"
22080                 LIBS="$LIBS $ol_link_sasl"
22081                 echo $ac_n "checking for sasl_version""... $ac_c" 1>&6
22082 echo "configure:22083: checking for sasl_version" >&5
22083 if eval "test \"\${ac_cv_func_sasl_version+set}\" = set"; then
22084   echo $ac_n "(cached) $ac_c" 1>&6
22085 else
22086   cat > conftest.$ac_ext <<EOF
22087 #line 22088 "configure"
22088 #include "confdefs.h"
22089 /* System header to define __stub macros and hopefully few prototypes,
22090     which can conflict with char sasl_version(); below.  */
22091 #include <assert.h>
22092 /* Override any gcc2 internal prototype to avoid an error.  */
22093 /* We use char because int might match the return type of a gcc2
22094     builtin and then its argument prototype would still apply.  */
22095 char sasl_version();
22096 char (*f)();
22097
22098 int main() {
22099
22100 /* The GNU C library defines this for functions which it implements
22101     to always fail with ENOSYS.  Some functions are actually named
22102     something starting with __ and the normal name is an alias.  */
22103 #if defined (__stub_sasl_version) || defined (__stub___sasl_version)
22104 choke me
22105 #else
22106 f = sasl_version;
22107 #endif
22108
22109 ; return 0; }
22110 EOF
22111 if { (eval echo configure:22112: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22112   rm -rf conftest*
22113   eval "ac_cv_func_sasl_version=yes"
22114 else
22115   echo "configure: failed program was:" >&5
22116   cat conftest.$ac_ext >&5
22117   rm -rf conftest*
22118   eval "ac_cv_func_sasl_version=no"
22119 fi
22120 rm -f conftest*
22121 fi
22122
22123 if eval "test \"`echo '$ac_cv_func_'sasl_version`\" = yes"; then
22124   echo "$ac_t""yes" 1>&6
22125   cat >> confdefs.h <<\EOF
22126 #define HAVE_SASL_VERSION 1
22127 EOF
22128
22129 else
22130   echo "$ac_t""no" 1>&6
22131 fi
22132
22133                 LIBS="$ac_save_LIBS"
22134
22135                 WITH_SASL=yes
22136         fi
22137
22138 else
22139         echo "configure: warning: SASL authentication not supported!" 1>&2
22140         if test $ol_link_tls = no ; then
22141                 echo "configure: warning: Strong authentication not supported!" 1>&2
22142         fi
22143 fi
22144
22145 if test $cross_compiling != yes -a "$ac_cv_mingw32" != yes ; then
22146         dev=no
22147         if test -r /dev/urandom ; then
22148                 dev="/dev/urandom";
22149         elif test -r /idev/urandom ; then
22150                 dev="/idev/urandom";
22151         elif test -r /dev/srandom ; then
22152                 dev="/dev/srandom";
22153         elif test -r /dev/random ; then
22154                 dev="/dev/random";
22155         elif test -r /idev/random ; then
22156                 dev="/idev/random";
22157         fi
22158
22159         if test $dev != no ; then
22160                 cat >> confdefs.h <<EOF
22161 #define URANDOM_DEVICE "$dev"
22162 EOF
22163
22164         fi
22165 fi
22166
22167 ol_link_fetch=no
22168 if test $ol_with_fetch != no ; then
22169         ol_LIBS=$LIBS
22170 LIBS="-lfetch -lcom_err $LIBS"
22171 echo $ac_n "checking fetch(3) library""... $ac_c" 1>&6
22172 echo "configure:22173: checking fetch(3) library" >&5
22173 if eval "test \"\${ol_cv_lib_fetch+set}\" = set"; then
22174   echo $ac_n "(cached) $ac_c" 1>&6
22175 else
22176   
22177         cat > conftest.$ac_ext <<EOF
22178 #line 22179 "configure"
22179 #include "confdefs.h"
22180
22181 #include <sys/param.h>
22182 #include <stdio.h>
22183 #include <fetch.h>
22184 int main() {
22185 struct url *u = fetchParseURL("file:///"); 
22186 ; return 0; }
22187 EOF
22188 if { (eval echo configure:22189: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22189   rm -rf conftest*
22190   ol_cv_lib_fetch=yes
22191 else
22192   echo "configure: failed program was:" >&5
22193   cat conftest.$ac_ext >&5
22194   rm -rf conftest*
22195   ol_cv_lib_fetch=no
22196 fi
22197 rm -f conftest*
22198 fi
22199
22200 echo "$ac_t""$ol_cv_lib_fetch" 1>&6
22201 LIBS=$ol_LIBS
22202 if test $ol_cv_lib_fetch != no ; then
22203         ol_link_fetch="-lfetch -lcom_err"
22204         cat >> confdefs.h <<\EOF
22205 #define HAVE_FETCH 1
22206 EOF
22207
22208 fi
22209
22210
22211         if test $ol_cv_lib_fetch != no ; then
22212                 LUTIL_LIBS="$LUTIL_LIBS $ol_link_fetch"
22213                 ol_link_fetch=freebsd
22214
22215         elif test $ol_with_fetch != auto ; then
22216                 { echo "configure: error: no suitable API for --with-fetch=$ol_with_fetch" 1>&2; exit 1; }
22217         fi 
22218 fi
22219
22220 if test $ol_enable_crypt != no ; then
22221         save_LIBS="$LIBS"
22222         LIBS="$TLS_LIBS $LIBS"
22223
22224         echo $ac_n "checking for crypt""... $ac_c" 1>&6
22225 echo "configure:22226: checking for crypt" >&5
22226 if eval "test \"\${ac_cv_func_crypt+set}\" = set"; then
22227   echo $ac_n "(cached) $ac_c" 1>&6
22228 else
22229   cat > conftest.$ac_ext <<EOF
22230 #line 22231 "configure"
22231 #include "confdefs.h"
22232 /* System header to define __stub macros and hopefully few prototypes,
22233     which can conflict with char crypt(); below.  */
22234 #include <assert.h>
22235 /* Override any gcc2 internal prototype to avoid an error.  */
22236 /* We use char because int might match the return type of a gcc2
22237     builtin and then its argument prototype would still apply.  */
22238 char crypt();
22239 char (*f)();
22240
22241 int main() {
22242
22243 /* The GNU C library defines this for functions which it implements
22244     to always fail with ENOSYS.  Some functions are actually named
22245     something starting with __ and the normal name is an alias.  */
22246 #if defined (__stub_crypt) || defined (__stub___crypt)
22247 choke me
22248 #else
22249 f = crypt;
22250 #endif
22251
22252 ; return 0; }
22253 EOF
22254 if { (eval echo configure:22255: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22255   rm -rf conftest*
22256   eval "ac_cv_func_crypt=yes"
22257 else
22258   echo "configure: failed program was:" >&5
22259   cat conftest.$ac_ext >&5
22260   rm -rf conftest*
22261   eval "ac_cv_func_crypt=no"
22262 fi
22263 rm -f conftest*
22264 fi
22265
22266 if eval "test \"`echo '$ac_cv_func_'crypt`\" = yes"; then
22267   echo "$ac_t""yes" 1>&6
22268   have_crypt=yes
22269 else
22270   echo "$ac_t""no" 1>&6
22271
22272                 LIBS="$save_LIBS"
22273                 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
22274 echo "configure:22275: checking for crypt in -lcrypt" >&5
22275 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-:%__p__%'`
22276 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
22277   echo $ac_n "(cached) $ac_c" 1>&6
22278 else
22279   ac_save_LIBS="$LIBS"
22280 LIBS="-lcrypt  $LIBS"
22281 cat > conftest.$ac_ext <<EOF
22282 #line 22283 "configure"
22283 #include "confdefs.h"
22284 /* Override any gcc2 internal prototype to avoid an error.  */
22285 /* We use char because int might match the return type of a gcc2
22286     builtin and then its argument prototype would still apply.  */
22287 char crypt();
22288
22289 int main() {
22290 crypt()
22291 ; return 0; }
22292 EOF
22293 if { (eval echo configure:22294: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22294   rm -rf conftest*
22295   eval "ac_cv_lib_$ac_lib_var=yes"
22296 else
22297   echo "configure: failed program was:" >&5
22298   cat conftest.$ac_ext >&5
22299   rm -rf conftest*
22300   eval "ac_cv_lib_$ac_lib_var=no"
22301 fi
22302 rm -f conftest*
22303 LIBS="$ac_save_LIBS"
22304
22305 fi
22306 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
22307   echo "$ac_t""yes" 1>&6
22308   LUTIL_LIBS="$LUTIL_LIBS -lcrypt"
22309                         have_crypt=yes
22310 else
22311   echo "$ac_t""no" 1>&6
22312 have_crypt=no
22313 fi
22314
22315 fi
22316
22317
22318         LIBS="$save_LIBS"
22319
22320         if test $have_crypt = yes ; then
22321                 cat >> confdefs.h <<\EOF
22322 #define HAVE_CRYPT 1
22323 EOF
22324
22325         else
22326                 echo "configure: warning: could not find crypt" 1>&2
22327                 if test $ol_enable_crypt = yes ; then
22328                         { echo "configure: error: could not find crypt, select appropriate options or disable" 1>&2; exit 1; }
22329                 fi
22330
22331                 echo "configure: warning: disabling crypt support" 1>&2
22332                 ol_enable_crypt=no
22333         fi
22334 fi
22335
22336 if test $ol_enable_proctitle != no ; then
22337         echo $ac_n "checking for setproctitle""... $ac_c" 1>&6
22338 echo "configure:22339: checking for setproctitle" >&5
22339 if eval "test \"\${ac_cv_func_setproctitle+set}\" = set"; then
22340   echo $ac_n "(cached) $ac_c" 1>&6
22341 else
22342   cat > conftest.$ac_ext <<EOF
22343 #line 22344 "configure"
22344 #include "confdefs.h"
22345 /* System header to define __stub macros and hopefully few prototypes,
22346     which can conflict with char setproctitle(); below.  */
22347 #include <assert.h>
22348 /* Override any gcc2 internal prototype to avoid an error.  */
22349 /* We use char because int might match the return type of a gcc2
22350     builtin and then its argument prototype would still apply.  */
22351 char setproctitle();
22352 char (*f)();
22353
22354 int main() {
22355
22356 /* The GNU C library defines this for functions which it implements
22357     to always fail with ENOSYS.  Some functions are actually named
22358     something starting with __ and the normal name is an alias.  */
22359 #if defined (__stub_setproctitle) || defined (__stub___setproctitle)
22360 choke me
22361 #else
22362 f = setproctitle;
22363 #endif
22364
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_func_setproctitle=yes"
22370 else
22371   echo "configure: failed program was:" >&5
22372   cat conftest.$ac_ext >&5
22373   rm -rf conftest*
22374   eval "ac_cv_func_setproctitle=no"
22375 fi
22376 rm -f conftest*
22377 fi
22378
22379 if eval "test \"`echo '$ac_cv_func_'setproctitle`\" = yes"; then
22380   echo "$ac_t""yes" 1>&6
22381   have_setproctitle=yes
22382 else
22383   echo "$ac_t""no" 1>&6
22384
22385                 echo $ac_n "checking for setproctitle in -lutil""... $ac_c" 1>&6
22386 echo "configure:22387: checking for setproctitle in -lutil" >&5
22387 ac_lib_var=`echo util'_'setproctitle | sed 'y%./+-:%__p__%'`
22388 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
22389   echo $ac_n "(cached) $ac_c" 1>&6
22390 else
22391   ac_save_LIBS="$LIBS"
22392 LIBS="-lutil  $LIBS"
22393 cat > conftest.$ac_ext <<EOF
22394 #line 22395 "configure"
22395 #include "confdefs.h"
22396 /* Override any gcc2 internal prototype to avoid an error.  */
22397 /* We use char because int might match the return type of a gcc2
22398     builtin and then its argument prototype would still apply.  */
22399 char setproctitle();
22400
22401 int main() {
22402 setproctitle()
22403 ; return 0; }
22404 EOF
22405 if { (eval echo configure:22406: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22406   rm -rf conftest*
22407   eval "ac_cv_lib_$ac_lib_var=yes"
22408 else
22409   echo "configure: failed program was:" >&5
22410   cat conftest.$ac_ext >&5
22411   rm -rf conftest*
22412   eval "ac_cv_lib_$ac_lib_var=no"
22413 fi
22414 rm -f conftest*
22415 LIBS="$ac_save_LIBS"
22416
22417 fi
22418 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
22419   echo "$ac_t""yes" 1>&6
22420   have_setproctitle=yes
22421                         LUTIL_LIBS="$LUTIL_LIBS -lutil"
22422 else
22423   echo "$ac_t""no" 1>&6
22424 have_setproctitle=no
22425                         LIBOBJS="$LIBOBJS setproctitle.o"
22426                         LIBSRCS="$LIBSRCS setproctitle.c"
22427 fi
22428
22429 fi
22430
22431
22432         if test $have_setproctitle = yes ; then
22433                 cat >> confdefs.h <<\EOF
22434 #define HAVE_SETPROCTITLE 1
22435 EOF
22436
22437         fi
22438 fi
22439
22440 if test $ol_enable_slp != no ; then
22441         for ac_hdr in slp.h 
22442 do
22443 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
22444 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
22445 echo "configure:22446: checking for $ac_hdr" >&5
22446 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
22447   echo $ac_n "(cached) $ac_c" 1>&6
22448 else
22449   cat > conftest.$ac_ext <<EOF
22450 #line 22451 "configure"
22451 #include "confdefs.h"
22452 #include <$ac_hdr>
22453 EOF
22454 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
22455 { (eval echo configure:22456: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
22456 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
22457 if test -z "$ac_err"; then
22458   rm -rf conftest*
22459   eval "ac_cv_header_$ac_safe=yes"
22460 else
22461   echo "$ac_err" >&5
22462   echo "configure: failed program was:" >&5
22463   cat conftest.$ac_ext >&5
22464   rm -rf conftest*
22465   eval "ac_cv_header_$ac_safe=no"
22466 fi
22467 rm -f conftest*
22468 fi
22469 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
22470   echo "$ac_t""yes" 1>&6
22471     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
22472   cat >> confdefs.h <<EOF
22473 #define $ac_tr_hdr 1
22474 EOF
22475  
22476 else
22477   echo "$ac_t""no" 1>&6
22478 fi
22479 done
22480
22481
22482         if test $ac_cv_header_slp_h = yes ; then
22483                 echo $ac_n "checking for SLPOpen in -lslp""... $ac_c" 1>&6
22484 echo "configure:22485: checking for SLPOpen in -lslp" >&5
22485 ac_lib_var=`echo slp'_'SLPOpen | sed 'y%./+-:%__p__%'`
22486 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
22487   echo $ac_n "(cached) $ac_c" 1>&6
22488 else
22489   ac_save_LIBS="$LIBS"
22490 LIBS="-lslp  $LIBS"
22491 cat > conftest.$ac_ext <<EOF
22492 #line 22493 "configure"
22493 #include "confdefs.h"
22494 /* Override any gcc2 internal prototype to avoid an error.  */
22495 /* We use char because int might match the return type of a gcc2
22496     builtin and then its argument prototype would still apply.  */
22497 char SLPOpen();
22498
22499 int main() {
22500 SLPOpen()
22501 ; return 0; }
22502 EOF
22503 if { (eval echo configure:22504: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22504   rm -rf conftest*
22505   eval "ac_cv_lib_$ac_lib_var=yes"
22506 else
22507   echo "configure: failed program was:" >&5
22508   cat conftest.$ac_ext >&5
22509   rm -rf conftest*
22510   eval "ac_cv_lib_$ac_lib_var=no"
22511 fi
22512 rm -f conftest*
22513 LIBS="$ac_save_LIBS"
22514
22515 fi
22516 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
22517   echo "$ac_t""yes" 1>&6
22518   have_slp=yes
22519 else
22520   echo "$ac_t""no" 1>&6
22521 have_slp=no
22522 fi
22523
22524                 if test $have_slp = yes ; then
22525                         cat >> confdefs.h <<\EOF
22526 #define HAVE_SLP 1
22527 EOF
22528
22529                         SLAPD_SLP_LIBS=-lslp
22530                 fi
22531
22532         elif test $ol_enable_slp = yes ; then
22533                 { echo "configure: error: SLP not found" 1>&2; exit 1; }
22534         fi
22535 fi
22536
22537 if test "$ol_with_multiple_precision" != "no" ; then
22538         ol_have_bignum=no
22539         ol_have_gmp=no
22540
22541         for ac_hdr in openssl/bn.h bn.h
22542 do
22543 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
22544 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
22545 echo "configure:22546: checking for $ac_hdr" >&5
22546 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
22547   echo $ac_n "(cached) $ac_c" 1>&6
22548 else
22549   cat > conftest.$ac_ext <<EOF
22550 #line 22551 "configure"
22551 #include "confdefs.h"
22552 #include <$ac_hdr>
22553 EOF
22554 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
22555 { (eval echo configure:22556: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
22556 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
22557 if test -z "$ac_err"; then
22558   rm -rf conftest*
22559   eval "ac_cv_header_$ac_safe=yes"
22560 else
22561   echo "$ac_err" >&5
22562   echo "configure: failed program was:" >&5
22563   cat conftest.$ac_ext >&5
22564   rm -rf conftest*
22565   eval "ac_cv_header_$ac_safe=no"
22566 fi
22567 rm -f conftest*
22568 fi
22569 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
22570   echo "$ac_t""yes" 1>&6
22571     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
22572   cat >> confdefs.h <<EOF
22573 #define $ac_tr_hdr 1
22574 EOF
22575  
22576 else
22577   echo "$ac_t""no" 1>&6
22578 fi
22579 done
22580
22581         for ac_hdr in openssl/crypto.h crypto.h
22582 do
22583 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
22584 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
22585 echo "configure:22586: checking for $ac_hdr" >&5
22586 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
22587   echo $ac_n "(cached) $ac_c" 1>&6
22588 else
22589   cat > conftest.$ac_ext <<EOF
22590 #line 22591 "configure"
22591 #include "confdefs.h"
22592 #include <$ac_hdr>
22593 EOF
22594 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
22595 { (eval echo configure:22596: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
22596 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
22597 if test -z "$ac_err"; then
22598   rm -rf conftest*
22599   eval "ac_cv_header_$ac_safe=yes"
22600 else
22601   echo "$ac_err" >&5
22602   echo "configure: failed program was:" >&5
22603   cat conftest.$ac_ext >&5
22604   rm -rf conftest*
22605   eval "ac_cv_header_$ac_safe=no"
22606 fi
22607 rm -f conftest*
22608 fi
22609 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
22610   echo "$ac_t""yes" 1>&6
22611     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
22612   cat >> confdefs.h <<EOF
22613 #define $ac_tr_hdr 1
22614 EOF
22615  
22616 else
22617   echo "$ac_t""no" 1>&6
22618 fi
22619 done
22620
22621         for ac_hdr in gmp.h 
22622 do
22623 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
22624 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
22625 echo "configure:22626: checking for $ac_hdr" >&5
22626 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
22627   echo $ac_n "(cached) $ac_c" 1>&6
22628 else
22629   cat > conftest.$ac_ext <<EOF
22630 #line 22631 "configure"
22631 #include "confdefs.h"
22632 #include <$ac_hdr>
22633 EOF
22634 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
22635 { (eval echo configure:22636: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
22636 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
22637 if test -z "$ac_err"; then
22638   rm -rf conftest*
22639   eval "ac_cv_header_$ac_safe=yes"
22640 else
22641   echo "$ac_err" >&5
22642   echo "configure: failed program was:" >&5
22643   cat conftest.$ac_ext >&5
22644   rm -rf conftest*
22645   eval "ac_cv_header_$ac_safe=no"
22646 fi
22647 rm -f conftest*
22648 fi
22649 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
22650   echo "$ac_t""yes" 1>&6
22651     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
22652   cat >> confdefs.h <<EOF
22653 #define $ac_tr_hdr 1
22654 EOF
22655  
22656 else
22657   echo "$ac_t""no" 1>&6
22658 fi
22659 done
22660
22661
22662         if test "$ol_with_tls" = "found" ; then
22663                 ol_have_bn_h=no
22664                 ol_have_crypto_h=no
22665
22666                 if test "$ac_cv_header_openssl_bn_h" = "yes" \
22667                                 -o "$ac_cv_header_bn_h" = "yes" ; then
22668                         ol_have_bn_h=yes
22669                 fi
22670
22671                 if test "$ac_cv_header_openssl_crypto_h" = "yes" \
22672                                 -o "$ac_cv_header_crypto_h" = "yes" ; then
22673                         ol_have_crypto_h=yes
22674                 fi
22675
22676                 if test "$ol_have_bn_h" = "yes" \
22677                                 -a "$ol_have_crypto_h" = "yes" ; then
22678                         ol_have_bignum=yes
22679                 fi
22680         fi
22681
22682         if test $ac_cv_header_gmp_h = yes ; then
22683                 echo $ac_n "checking for __gmpz_add_ui in -lgmp""... $ac_c" 1>&6
22684 echo "configure:22685: checking for __gmpz_add_ui in -lgmp" >&5
22685 ac_lib_var=`echo gmp'_'__gmpz_add_ui | sed 'y%./+-:%__p__%'`
22686 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
22687   echo $ac_n "(cached) $ac_c" 1>&6
22688 else
22689   ac_save_LIBS="$LIBS"
22690 LIBS="-lgmp  $LIBS"
22691 cat > conftest.$ac_ext <<EOF
22692 #line 22693 "configure"
22693 #include "confdefs.h"
22694 /* Override any gcc2 internal prototype to avoid an error.  */
22695 /* We use char because int might match the return type of a gcc2
22696     builtin and then its argument prototype would still apply.  */
22697 char __gmpz_add_ui();
22698
22699 int main() {
22700 __gmpz_add_ui()
22701 ; return 0; }
22702 EOF
22703 if { (eval echo configure:22704: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22704   rm -rf conftest*
22705   eval "ac_cv_lib_$ac_lib_var=yes"
22706 else
22707   echo "configure: failed program was:" >&5
22708   cat conftest.$ac_ext >&5
22709   rm -rf conftest*
22710   eval "ac_cv_lib_$ac_lib_var=no"
22711 fi
22712 rm -f conftest*
22713 LIBS="$ac_save_LIBS"
22714
22715 fi
22716 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
22717   echo "$ac_t""yes" 1>&6
22718   have_gmp=yes
22719 else
22720   echo "$ac_t""no" 1>&6
22721 have_gmp=no
22722 fi
22723
22724                 if test $have_gmp = yes ; then
22725                         ol_have_gmp=yes
22726                 fi
22727         fi
22728
22729         echo $ac_n "checking for multiple precision support""... $ac_c" 1>&6
22730 echo "configure:22731: checking for multiple precision support" >&5
22731
22732         ol_mp_support="none"
22733         case "$ol_with_multiple_precision" in
22734         auto)
22735                                                                                 if test "$ol_have_bignum" = "yes" ; then
22736                         ol_mp_support="bignum"
22737                 else
22738                         if test "$ol_have_gmp" = "yes" ; then
22739                                 ol_mp_support="gmp"
22740                         fi
22741                 fi
22742                 ;;
22743         bignum)
22744                 if test "$ol_have_bignum" != "yes" ; then
22745                         { echo "configure: error: OpenSSL's BIGNUM not available" 1>&2; exit 1; }
22746                 fi
22747                 ol_mp_support="bignum"
22748                 ;;
22749         gmp)
22750                 if test "$ol_have_gmp" != "yes" ; then
22751                         { echo "configure: error: GMP not available" 1>&2; exit 1; }
22752                 fi
22753                 ol_mp_support="gmp"
22754                 ;;
22755         yes)
22756                 if test "$ol_have_bignum" = "yes" ; then
22757                         ol_mp_support="bignum"
22758                 elif test "$ol_have_gmp" = "yes" ; then
22759                         ol_mp_support="gmp"
22760                 else
22761                         { echo "configure: error: not available" 1>&2; exit 1; }
22762                 fi
22763                 ;;
22764         esac
22765
22766         case "$ol_mp_support" in
22767         bignum)
22768                 cat >> confdefs.h <<\EOF
22769 #define HAVE_BIGNUM 1
22770 EOF
22771
22772                 ;;
22773         gmp)
22774                 cat >> confdefs.h <<\EOF
22775 #define HAVE_GMP 1
22776 EOF
22777
22778                 SLAPD_GMP_LIBS=-lgmp
22779                 ;;
22780         none)
22781                 ;;
22782         esac
22783
22784         echo "$ac_t""$ol_mp_support" 1>&6
22785 fi
22786
22787
22788 echo $ac_n "checking long long""... $ac_c" 1>&6
22789 echo "configure:22790: checking long long" >&5
22790 if eval "test \"\${ol_cv_type_long_long+set}\" = set"; then
22791   echo $ac_n "(cached) $ac_c" 1>&6
22792 else
22793   
22794         cat > conftest.$ac_ext <<EOF
22795 #line 22796 "configure"
22796 #include "confdefs.h"
22797
22798 int main() {
22799 long long x;
22800 ; return 0; }
22801 EOF
22802 if { (eval echo configure:22803: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22803   rm -rf conftest*
22804   ol_cv_type_long_long=yes
22805 else
22806   echo "configure: failed program was:" >&5
22807   cat conftest.$ac_ext >&5
22808   rm -rf conftest*
22809   ol_cv_type_long_long=no
22810 fi
22811 rm -f conftest*
22812 fi
22813
22814 echo "$ac_t""$ol_cv_type_long_long" 1>&6
22815 if test $ol_cv_type_long_long = yes; then
22816         cat >> confdefs.h <<\EOF
22817 #define HAVE_LONG_LONG 1
22818 EOF
22819
22820 fi
22821
22822 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
22823 echo "configure:22824: checking for ANSI C header files" >&5
22824 if eval "test \"\${ac_cv_header_stdc+set}\" = set"; then
22825   echo $ac_n "(cached) $ac_c" 1>&6
22826 else
22827   cat > conftest.$ac_ext <<EOF
22828 #line 22829 "configure"
22829 #include "confdefs.h"
22830 #include <stdlib.h>
22831 #include <stdarg.h>
22832 #include <string.h>
22833 #include <float.h>
22834 EOF
22835 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
22836 { (eval echo configure:22837: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
22837 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
22838 if test -z "$ac_err"; then
22839   rm -rf conftest*
22840   ac_cv_header_stdc=yes
22841 else
22842   echo "$ac_err" >&5
22843   echo "configure: failed program was:" >&5
22844   cat conftest.$ac_ext >&5
22845   rm -rf conftest*
22846   ac_cv_header_stdc=no
22847 fi
22848 rm -f conftest*
22849
22850 if test $ac_cv_header_stdc = yes; then
22851   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
22852 cat > conftest.$ac_ext <<EOF
22853 #line 22854 "configure"
22854 #include "confdefs.h"
22855 #include <string.h>
22856 EOF
22857 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
22858   egrep "memchr" >/dev/null 2>&1; then
22859   :
22860 else
22861   rm -rf conftest*
22862   ac_cv_header_stdc=no
22863 fi
22864 rm -f conftest*
22865
22866 fi
22867
22868 if test $ac_cv_header_stdc = yes; then
22869   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
22870 cat > conftest.$ac_ext <<EOF
22871 #line 22872 "configure"
22872 #include "confdefs.h"
22873 #include <stdlib.h>
22874 EOF
22875 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
22876   egrep "free" >/dev/null 2>&1; then
22877   :
22878 else
22879   rm -rf conftest*
22880   ac_cv_header_stdc=no
22881 fi
22882 rm -f conftest*
22883
22884 fi
22885
22886 if test $ac_cv_header_stdc = yes; then
22887   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
22888 if test "$cross_compiling" = yes; then
22889   :
22890 else
22891   cat > conftest.$ac_ext <<EOF
22892 #line 22893 "configure"
22893 #include "confdefs.h"
22894 #include <ctype.h>
22895 #if ((' ' & 0x0FF) == 0x020)
22896 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
22897 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
22898 #else
22899 #define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
22900  || ('j' <= (c) && (c) <= 'r') \
22901  || ('s' <= (c) && (c) <= 'z'))
22902 #define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
22903 #endif
22904 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
22905 int main () { int i; for (i = 0; i < 256; i++)
22906 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
22907 exit (0); }
22908
22909 EOF
22910 if { (eval echo configure:22911: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
22911 then
22912   :
22913 else
22914   echo "configure: failed program was:" >&5
22915   cat conftest.$ac_ext >&5
22916   rm -fr conftest*
22917   ac_cv_header_stdc=no
22918 fi
22919 rm -fr conftest*
22920 fi
22921
22922 fi
22923 fi
22924
22925 echo "$ac_t""$ac_cv_header_stdc" 1>&6
22926 if test $ac_cv_header_stdc = yes; then
22927   cat >> confdefs.h <<\EOF
22928 #define STDC_HEADERS 1
22929 EOF
22930
22931 fi
22932
22933 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
22934 echo "configure:22935: checking for mode_t" >&5
22935 if eval "test \"\${ac_cv_type_mode_t+set}\" = set"; then
22936   echo $ac_n "(cached) $ac_c" 1>&6
22937 else
22938   cat > conftest.$ac_ext <<EOF
22939 #line 22940 "configure"
22940 #include "confdefs.h"
22941 #include <sys/types.h>
22942 #if STDC_HEADERS
22943 #include <stdlib.h>
22944 #include <stddef.h>
22945 #endif
22946
22947 EOF
22948 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
22949   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
22950   rm -rf conftest*
22951   eval "ac_cv_type_mode_t=yes"
22952 else
22953   rm -rf conftest*
22954   eval "ac_cv_type_mode_t=no"
22955 fi
22956 rm -f conftest*
22957
22958 fi
22959 if eval "test \"`echo '$ac_cv_type_'mode_t`\" = yes"; then
22960   echo "$ac_t""yes" 1>&6
22961 else
22962   echo "$ac_t""no" 1>&6
22963   cat >> confdefs.h <<EOF
22964 #define mode_t int
22965 EOF
22966
22967 fi
22968
22969 echo $ac_n "checking for off_t""... $ac_c" 1>&6
22970 echo "configure:22971: checking for off_t" >&5
22971 if eval "test \"\${ac_cv_type_off_t+set}\" = set"; then
22972   echo $ac_n "(cached) $ac_c" 1>&6
22973 else
22974   cat > conftest.$ac_ext <<EOF
22975 #line 22976 "configure"
22976 #include "confdefs.h"
22977 #include <sys/types.h>
22978 #if STDC_HEADERS
22979 #include <stdlib.h>
22980 #include <stddef.h>
22981 #endif
22982
22983 EOF
22984 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
22985   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
22986   rm -rf conftest*
22987   eval "ac_cv_type_off_t=yes"
22988 else
22989   rm -rf conftest*
22990   eval "ac_cv_type_off_t=no"
22991 fi
22992 rm -f conftest*
22993
22994 fi
22995 if eval "test \"`echo '$ac_cv_type_'off_t`\" = yes"; then
22996   echo "$ac_t""yes" 1>&6
22997 else
22998   echo "$ac_t""no" 1>&6
22999   cat >> confdefs.h <<EOF
23000 #define off_t long
23001 EOF
23002
23003 fi
23004
23005 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
23006 echo "configure:23007: checking for pid_t" >&5
23007 if eval "test \"\${ac_cv_type_pid_t+set}\" = set"; then
23008   echo $ac_n "(cached) $ac_c" 1>&6
23009 else
23010   cat > conftest.$ac_ext <<EOF
23011 #line 23012 "configure"
23012 #include "confdefs.h"
23013 #include <sys/types.h>
23014 #if STDC_HEADERS
23015 #include <stdlib.h>
23016 #include <stddef.h>
23017 #endif
23018
23019 EOF
23020 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
23021   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
23022   rm -rf conftest*
23023   eval "ac_cv_type_pid_t=yes"
23024 else
23025   rm -rf conftest*
23026   eval "ac_cv_type_pid_t=no"
23027 fi
23028 rm -f conftest*
23029
23030 fi
23031 if eval "test \"`echo '$ac_cv_type_'pid_t`\" = yes"; then
23032   echo "$ac_t""yes" 1>&6
23033 else
23034   echo "$ac_t""no" 1>&6
23035   cat >> confdefs.h <<EOF
23036 #define pid_t int
23037 EOF
23038
23039 fi
23040
23041 echo $ac_n "checking for ptrdiff_t""... $ac_c" 1>&6
23042 echo "configure:23043: checking for ptrdiff_t" >&5
23043 if eval "test \"\${am_cv_type_ptrdiff_t+set}\" = set"; then
23044   echo $ac_n "(cached) $ac_c" 1>&6
23045 else
23046   cat > conftest.$ac_ext <<EOF
23047 #line 23048 "configure"
23048 #include "confdefs.h"
23049 #include <stddef.h>
23050 int main() {
23051 ptrdiff_t p
23052 ; return 0; }
23053 EOF
23054 if { (eval echo configure:23055: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23055   rm -rf conftest*
23056   am_cv_type_ptrdiff_t=yes
23057 else
23058   echo "configure: failed program was:" >&5
23059   cat conftest.$ac_ext >&5
23060   rm -rf conftest*
23061   am_cv_type_ptrdiff_t=no
23062 fi
23063 rm -f conftest*
23064 fi
23065
23066 echo "$ac_t""$am_cv_type_ptrdiff_t" 1>&6
23067    if test $am_cv_type_ptrdiff_t = yes; then
23068      cat >> confdefs.h <<\EOF
23069 #define HAVE_PTRDIFF_T 1
23070 EOF
23071
23072    fi
23073
23074 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
23075 echo "configure:23076: checking return type of signal handlers" >&5
23076 if eval "test \"\${ac_cv_type_signal+set}\" = set"; then
23077   echo $ac_n "(cached) $ac_c" 1>&6
23078 else
23079   cat > conftest.$ac_ext <<EOF
23080 #line 23081 "configure"
23081 #include "confdefs.h"
23082 #include <sys/types.h>
23083 #include <signal.h>
23084 #ifdef signal
23085 #undef signal
23086 #endif
23087 #ifdef __cplusplus
23088 extern "C" void (*signal (int, void (*)(int)))(int);
23089 #else
23090 void (*signal ()) ();
23091 #endif
23092
23093 int main() {
23094 int i;
23095 ; return 0; }
23096 EOF
23097 if { (eval echo configure:23098: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23098   rm -rf conftest*
23099   ac_cv_type_signal=void
23100 else
23101   echo "configure: failed program was:" >&5
23102   cat conftest.$ac_ext >&5
23103   rm -rf conftest*
23104   ac_cv_type_signal=int
23105 fi
23106 rm -f conftest*
23107 fi
23108
23109 echo "$ac_t""$ac_cv_type_signal" 1>&6
23110 cat >> confdefs.h <<EOF
23111 #define RETSIGTYPE $ac_cv_type_signal
23112 EOF
23113
23114
23115 echo $ac_n "checking for size_t""... $ac_c" 1>&6
23116 echo "configure:23117: checking for size_t" >&5
23117 if eval "test \"\${ac_cv_type_size_t+set}\" = set"; then
23118   echo $ac_n "(cached) $ac_c" 1>&6
23119 else
23120   cat > conftest.$ac_ext <<EOF
23121 #line 23122 "configure"
23122 #include "confdefs.h"
23123 #include <sys/types.h>
23124 #if STDC_HEADERS
23125 #include <stdlib.h>
23126 #include <stddef.h>
23127 #endif
23128
23129 EOF
23130 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
23131   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
23132   rm -rf conftest*
23133   eval "ac_cv_type_size_t=yes"
23134 else
23135   rm -rf conftest*
23136   eval "ac_cv_type_size_t=no"
23137 fi
23138 rm -f conftest*
23139
23140 fi
23141 if eval "test \"`echo '$ac_cv_type_'size_t`\" = yes"; then
23142   echo "$ac_t""yes" 1>&6
23143 else
23144   echo "$ac_t""no" 1>&6
23145   cat >> confdefs.h <<EOF
23146 #define size_t unsigned
23147 EOF
23148
23149 fi
23150
23151
23152 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
23153 echo "configure:23154: checking for ssize_t" >&5
23154 if eval "test \"\${ac_cv_type_ssize_t+set}\" = set"; then
23155   echo $ac_n "(cached) $ac_c" 1>&6
23156 else
23157   cat > conftest.$ac_ext <<EOF
23158 #line 23159 "configure"
23159 #include "confdefs.h"
23160 #include <sys/types.h>
23161 #if STDC_HEADERS
23162 #include <stdlib.h>
23163 #include <stddef.h>
23164 #endif
23165
23166 EOF
23167 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
23168   egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
23169   rm -rf conftest*
23170   eval "ac_cv_type_ssize_t=yes"
23171 else
23172   rm -rf conftest*
23173   eval "ac_cv_type_ssize_t=no"
23174 fi
23175 rm -f conftest*
23176
23177 fi
23178 if eval "test \"`echo '$ac_cv_type_'ssize_t`\" = yes"; then
23179   echo "$ac_t""yes" 1>&6
23180 else
23181   echo "$ac_t""no" 1>&6
23182   cat >> confdefs.h <<EOF
23183 #define ssize_t signed int
23184 EOF
23185
23186 fi
23187
23188 echo $ac_n "checking for caddr_t""... $ac_c" 1>&6
23189 echo "configure:23190: checking for caddr_t" >&5
23190 if eval "test \"\${ac_cv_type_caddr_t+set}\" = set"; then
23191   echo $ac_n "(cached) $ac_c" 1>&6
23192 else
23193   cat > conftest.$ac_ext <<EOF
23194 #line 23195 "configure"
23195 #include "confdefs.h"
23196 #include <sys/types.h>
23197 #if STDC_HEADERS
23198 #include <stdlib.h>
23199 #include <stddef.h>
23200 #endif
23201
23202 EOF
23203 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
23204   egrep "(^|[^a-zA-Z_0-9])caddr_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
23205   rm -rf conftest*
23206   eval "ac_cv_type_caddr_t=yes"
23207 else
23208   rm -rf conftest*
23209   eval "ac_cv_type_caddr_t=no"
23210 fi
23211 rm -f conftest*
23212
23213 fi
23214 if eval "test \"`echo '$ac_cv_type_'caddr_t`\" = yes"; then
23215   echo "$ac_t""yes" 1>&6
23216 else
23217   echo "$ac_t""no" 1>&6
23218   cat >> confdefs.h <<EOF
23219 #define caddr_t char *
23220 EOF
23221
23222 fi
23223
23224
23225 echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
23226 echo "configure:23227: checking for socklen_t" >&5
23227 if eval "test \"\${ol_cv_type_socklen_t+set}\" = set"; then
23228   echo $ac_n "(cached) $ac_c" 1>&6
23229 else
23230   cat > conftest.$ac_ext <<EOF
23231 #line 23232 "configure"
23232 #include "confdefs.h"
23233
23234 #ifdef HAVE_SYS_TYPES_H
23235 #include <sys/types.h>
23236 #endif
23237 #ifdef HAVE_SYS_SOCKET_H
23238 #include <sys/socket.h>
23239 #endif
23240
23241 int main() {
23242 socklen_t len;
23243 ; return 0; }
23244 EOF
23245 if { (eval echo configure:23246: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23246   rm -rf conftest*
23247   ol_cv_type_socklen_t=yes
23248 else
23249   echo "configure: failed program was:" >&5
23250   cat conftest.$ac_ext >&5
23251   rm -rf conftest*
23252   ol_cv_type_socklen_t=no
23253 fi
23254 rm -f conftest*
23255 fi
23256
23257 echo "$ac_t""$ol_cv_type_socklen_t" 1>&6
23258   if test $ol_cv_type_socklen_t = no; then
23259     cat >> confdefs.h <<\EOF
23260 #define socklen_t int
23261 EOF
23262
23263   fi
23264  
23265 echo $ac_n "checking for member st_blksize in aggregate type struct stat""... $ac_c" 1>&6
23266 echo "configure:23267: checking for member st_blksize in aggregate type struct stat" >&5
23267 if eval "test \"\${ac_cv_c_struct_member_st_blksize+set}\" = set"; then
23268   echo $ac_n "(cached) $ac_c" 1>&6
23269 else
23270   cat > conftest.$ac_ext <<EOF
23271 #line 23272 "configure"
23272 #include "confdefs.h"
23273 #include <sys/types.h>
23274 #include <sys/stat.h>
23275 int main() {
23276 struct stat foo; foo.st_blksize;
23277 ; return 0; }
23278 EOF
23279 if { (eval echo configure:23280: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23280   rm -rf conftest*
23281   ac_cv_c_struct_member_st_blksize=yes
23282 else
23283   echo "configure: failed program was:" >&5
23284   cat conftest.$ac_ext >&5
23285   rm -rf conftest*
23286   ac_cv_c_struct_member_st_blksize=no
23287 fi
23288 rm -f conftest*
23289 fi
23290
23291 echo "$ac_t""$ac_cv_c_struct_member_st_blksize" 1>&6
23292 st_blksize="$ac_cv_c_struct_member_st_blksize"
23293 if test $ac_cv_c_struct_member_st_blksize = yes; then
23294   cat >> confdefs.h <<\EOF
23295 #define HAVE_ST_BLKSIZE 1
23296 EOF
23297
23298 fi
23299
23300 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
23301 echo "configure:23302: checking whether time.h and sys/time.h may both be included" >&5
23302 if eval "test \"\${ac_cv_header_time+set}\" = set"; then
23303   echo $ac_n "(cached) $ac_c" 1>&6
23304 else
23305   cat > conftest.$ac_ext <<EOF
23306 #line 23307 "configure"
23307 #include "confdefs.h"
23308 #include <sys/types.h>
23309 #include <sys/time.h>
23310 #include <time.h>
23311 int main() {
23312 struct tm *tp;
23313 ; return 0; }
23314 EOF
23315 if { (eval echo configure:23316: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23316   rm -rf conftest*
23317   ac_cv_header_time=yes
23318 else
23319   echo "configure: failed program was:" >&5
23320   cat conftest.$ac_ext >&5
23321   rm -rf conftest*
23322   ac_cv_header_time=no
23323 fi
23324 rm -f conftest*
23325 fi
23326
23327 echo "$ac_t""$ac_cv_header_time" 1>&6
23328 if test $ac_cv_header_time = yes; then
23329   cat >> confdefs.h <<\EOF
23330 #define TIME_WITH_SYS_TIME 1
23331 EOF
23332
23333 fi
23334
23335 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
23336 echo "configure:23337: checking whether struct tm is in sys/time.h or time.h" >&5
23337 if eval "test \"\${ac_cv_struct_tm+set}\" = set"; then
23338   echo $ac_n "(cached) $ac_c" 1>&6
23339 else
23340   cat > conftest.$ac_ext <<EOF
23341 #line 23342 "configure"
23342 #include "confdefs.h"
23343 #include <sys/types.h>
23344 #include <time.h>
23345 int main() {
23346 struct tm *tp; tp->tm_sec;
23347 ; return 0; }
23348 EOF
23349 if { (eval echo configure:23350: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23350   rm -rf conftest*
23351   ac_cv_struct_tm=time.h
23352 else
23353   echo "configure: failed program was:" >&5
23354   cat conftest.$ac_ext >&5
23355   rm -rf conftest*
23356   ac_cv_struct_tm=sys/time.h
23357 fi
23358 rm -f conftest*
23359 fi
23360
23361 echo "$ac_t""$ac_cv_struct_tm" 1>&6
23362 if test $ac_cv_struct_tm = sys/time.h; then
23363   cat >> confdefs.h <<\EOF
23364 #define TM_IN_SYS_TIME 1
23365 EOF
23366
23367 fi
23368
23369 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
23370 echo "configure:23371: checking for uid_t in sys/types.h" >&5
23371 if eval "test \"\${ac_cv_type_uid_t+set}\" = set"; then
23372   echo $ac_n "(cached) $ac_c" 1>&6
23373 else
23374   cat > conftest.$ac_ext <<EOF
23375 #line 23376 "configure"
23376 #include "confdefs.h"
23377 #include <sys/types.h>
23378 EOF
23379 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
23380   egrep "uid_t" >/dev/null 2>&1; then
23381   rm -rf conftest*
23382   ac_cv_type_uid_t=yes
23383 else
23384   rm -rf conftest*
23385   ac_cv_type_uid_t=no
23386 fi
23387 rm -f conftest*
23388
23389 fi
23390
23391 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
23392 if test $ac_cv_type_uid_t = no; then
23393   cat >> confdefs.h <<\EOF
23394 #define uid_t int
23395 EOF
23396
23397   cat >> confdefs.h <<\EOF
23398 #define gid_t int
23399 EOF
23400
23401 fi
23402
23403 echo $ac_n "checking for sig_atomic_t""... $ac_c" 1>&6
23404 echo "configure:23405: checking for sig_atomic_t" >&5
23405 if eval "test \"\${ol_cv_type_sig_atomic_t+set}\" = set"; then
23406   echo $ac_n "(cached) $ac_c" 1>&6
23407 else
23408   cat > conftest.$ac_ext <<EOF
23409 #line 23410 "configure"
23410 #include "confdefs.h"
23411 #include <signal.h>
23412 int main() {
23413 sig_atomic_t atomic;
23414 ; return 0; }
23415 EOF
23416 if { (eval echo configure:23417: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23417   rm -rf conftest*
23418   ol_cv_type_sig_atomic_t=yes
23419 else
23420   echo "configure: failed program was:" >&5
23421   cat conftest.$ac_ext >&5
23422   rm -rf conftest*
23423   ol_cv_type_sig_atomic_t=no
23424 fi
23425 rm -f conftest*
23426 fi
23427
23428 echo "$ac_t""$ol_cv_type_sig_atomic_t" 1>&6
23429   if test $ol_cv_type_sig_atomic_t = no; then
23430     cat >> confdefs.h <<\EOF
23431 #define sig_atomic_t int
23432 EOF
23433
23434   fi
23435  
23436
23437
23438 # test for pw_gecos in struct passwd
23439 echo $ac_n "checking struct passwd for pw_gecos""... $ac_c" 1>&6
23440 echo "configure:23441: checking struct passwd for pw_gecos" >&5
23441 if eval "test \"\${ol_cv_struct_passwd_pw_gecos+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_gecos = 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_gecos=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_gecos=no
23464 fi
23465 rm -f conftest*
23466 fi
23467
23468 echo "$ac_t""$ol_cv_struct_passwd_pw_gecos" 1>&6
23469 if test $ol_cv_struct_passwd_pw_gecos = yes ; then
23470         cat >> confdefs.h <<\EOF
23471 #define HAVE_PW_GECOS 1
23472 EOF
23473
23474 fi
23475
23476 # test for pw_passwd in struct passwd
23477 echo $ac_n "checking struct passwd for pw_passwd""... $ac_c" 1>&6
23478 echo "configure:23479: checking struct passwd for pw_passwd" >&5
23479 if eval "test \"\${ol_cv_struct_passwd_pw_passwd+set}\" = set"; then
23480   echo $ac_n "(cached) $ac_c" 1>&6
23481 else
23482   
23483         cat > conftest.$ac_ext <<EOF
23484 #line 23485 "configure"
23485 #include "confdefs.h"
23486 #include <pwd.h>
23487 int main() {
23488
23489         struct passwd pwd;
23490         pwd.pw_passwd = pwd.pw_name;
23491
23492 ; return 0; }
23493 EOF
23494 if { (eval echo configure:23495: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23495   rm -rf conftest*
23496   ol_cv_struct_passwd_pw_passwd=yes
23497 else
23498   echo "configure: failed program was:" >&5
23499   cat conftest.$ac_ext >&5
23500   rm -rf conftest*
23501   ol_cv_struct_passwd_pw_passwd=no
23502 fi
23503 rm -f conftest*
23504 fi
23505
23506 echo "$ac_t""$ol_cv_struct_passwd_pw_passwd" 1>&6
23507 if test $ol_cv_struct_passwd_pw_passwd = yes ; then
23508         cat >> confdefs.h <<\EOF
23509 #define HAVE_PW_PASSWD 1
23510 EOF
23511
23512 fi
23513
23514
23515 echo $ac_n "checking if toupper() requires islower()""... $ac_c" 1>&6
23516 echo "configure:23517: checking if toupper() requires islower()" >&5
23517 if eval "test \"\${ol_cv_c_upper_lower+set}\" = set"; then
23518   echo $ac_n "(cached) $ac_c" 1>&6
23519 else
23520   
23521         if test "$cross_compiling" = yes; then
23522   ol_cv_c_upper_lower=safe
23523 else
23524   cat > conftest.$ac_ext <<EOF
23525 #line 23526 "configure"
23526 #include "confdefs.h"
23527
23528 #include <ctype.h>
23529 main()
23530 {
23531         if ('C' == toupper('C'))
23532                 exit(0);
23533         else
23534                 exit(1);
23535 }
23536 EOF
23537 if { (eval echo configure:23538: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
23538 then
23539   ol_cv_c_upper_lower=no
23540 else
23541   echo "configure: failed program was:" >&5
23542   cat conftest.$ac_ext >&5
23543   rm -fr conftest*
23544   ol_cv_c_upper_lower=yes
23545 fi
23546 rm -fr conftest*
23547 fi
23548
23549 fi
23550
23551 echo "$ac_t""$ol_cv_c_upper_lower" 1>&6
23552 if test $ol_cv_c_upper_lower != no ; then
23553         cat >> confdefs.h <<\EOF
23554 #define C_UPPER_LOWER 1
23555 EOF
23556
23557 fi
23558
23559 echo $ac_n "checking for working const""... $ac_c" 1>&6
23560 echo "configure:23561: checking for working const" >&5
23561 if eval "test \"\${ac_cv_c_const+set}\" = set"; then
23562   echo $ac_n "(cached) $ac_c" 1>&6
23563 else
23564   cat > conftest.$ac_ext <<EOF
23565 #line 23566 "configure"
23566 #include "confdefs.h"
23567
23568 int main() {
23569
23570 /* Ultrix mips cc rejects this.  */
23571 typedef int charset[2]; const charset x;
23572 /* SunOS 4.1.1 cc rejects this.  */
23573 char const *const *ccp;
23574 char **p;
23575 /* NEC SVR4.0.2 mips cc rejects this.  */
23576 struct point {int x, y;};
23577 static struct point const zero = {0,0};
23578 /* AIX XL C 1.02.0.0 rejects this.
23579    It does not let you subtract one const X* pointer from another in an arm
23580    of an if-expression whose if-part is not a constant expression */
23581 const char *g = "string";
23582 ccp = &g + (g ? g-g : 0);
23583 /* HPUX 7.0 cc rejects these. */
23584 ++ccp;
23585 p = (char**) ccp;
23586 ccp = (char const *const *) p;
23587 { /* SCO 3.2v4 cc rejects this.  */
23588   char *t;
23589   char const *s = 0 ? (char *) 0 : (char const *) 0;
23590
23591   *t++ = 0;
23592 }
23593 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
23594   int x[] = {25, 17};
23595   const int *foo = &x[0];
23596   ++foo;
23597 }
23598 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
23599   typedef const int *iptr;
23600   iptr p = 0;
23601   ++p;
23602 }
23603 { /* AIX XL C 1.02.0.0 rejects this saying
23604      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
23605   struct s { int j; const int *ap[3]; };
23606   struct s *b; b->j = 5;
23607 }
23608 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
23609   const int foo = 10;
23610 }
23611
23612 ; return 0; }
23613 EOF
23614 if { (eval echo configure:23615: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23615   rm -rf conftest*
23616   ac_cv_c_const=yes
23617 else
23618   echo "configure: failed program was:" >&5
23619   cat conftest.$ac_ext >&5
23620   rm -rf conftest*
23621   ac_cv_c_const=no
23622 fi
23623 rm -f conftest*
23624 fi
23625
23626 echo "$ac_t""$ac_cv_c_const" 1>&6
23627 if test $ac_cv_c_const = no; then
23628   cat >> confdefs.h <<\EOF
23629 #define const 
23630 EOF
23631
23632 fi
23633
23634 echo $ac_n "checking if compiler understands volatile""... $ac_c" 1>&6
23635 echo "configure:23636: checking if compiler understands volatile" >&5
23636 if eval "test \"\${ol_cv_c_volatile+set}\" = set"; then
23637   echo $ac_n "(cached) $ac_c" 1>&6
23638 else
23639   cat > conftest.$ac_ext <<EOF
23640 #line 23641 "configure"
23641 #include "confdefs.h"
23642 int x, y, z;
23643 int main() {
23644 volatile int a; int * volatile b = x ? &y : &z;
23645       /* Older MIPS compilers (eg., in Ultrix 4.2) don't like *b = 0 */
23646       *b = 0;
23647 ; return 0; }
23648 EOF
23649 if { (eval echo configure:23650: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23650   rm -rf conftest*
23651   ol_cv_c_volatile=yes
23652 else
23653   echo "configure: failed program was:" >&5
23654   cat conftest.$ac_ext >&5
23655   rm -rf conftest*
23656   ol_cv_c_volatile=no
23657 fi
23658 rm -f conftest*
23659 fi
23660
23661 echo "$ac_t""$ol_cv_c_volatile" 1>&6
23662   if test $ol_cv_c_volatile = yes; then
23663     : 
23664   else
23665     cat >> confdefs.h <<\EOF
23666 #define volatile 
23667 EOF
23668
23669   fi
23670  
23671
23672 if test $cross_compiling = yes ; then
23673         echo "configure: warning: Crossing compiling... all bets are off!" 1>&2
23674         cat >> confdefs.h <<\EOF
23675 #define CROSS_COMPILING 1
23676 EOF
23677
23678 else
23679         echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
23680 echo "configure:23681: checking whether byte ordering is bigendian" >&5
23681 if eval "test \"\${ac_cv_c_bigendian+set}\" = set"; then
23682   echo $ac_n "(cached) $ac_c" 1>&6
23683 else
23684   ac_cv_c_bigendian=unknown
23685 # See if sys/param.h defines the BYTE_ORDER macro.
23686 cat > conftest.$ac_ext <<EOF
23687 #line 23688 "configure"
23688 #include "confdefs.h"
23689 #include <sys/types.h>
23690 #include <sys/param.h>
23691 int main() {
23692
23693 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
23694  bogus endian macros
23695 #endif
23696 ; return 0; }
23697 EOF
23698 if { (eval echo configure:23699: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23699   rm -rf conftest*
23700   # It does; now see whether it defined to BIG_ENDIAN or not.
23701 cat > conftest.$ac_ext <<EOF
23702 #line 23703 "configure"
23703 #include "confdefs.h"
23704 #include <sys/types.h>
23705 #include <sys/param.h>
23706 int main() {
23707
23708 #if BYTE_ORDER != BIG_ENDIAN
23709  not big endian
23710 #endif
23711 ; return 0; }
23712 EOF
23713 if { (eval echo configure:23714: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23714   rm -rf conftest*
23715   ac_cv_c_bigendian=yes
23716 else
23717   echo "configure: failed program was:" >&5
23718   cat conftest.$ac_ext >&5
23719   rm -rf conftest*
23720   ac_cv_c_bigendian=no
23721 fi
23722 rm -f conftest*
23723 else
23724   echo "configure: failed program was:" >&5
23725   cat conftest.$ac_ext >&5
23726 fi
23727 rm -f conftest*
23728 if test $ac_cv_c_bigendian = unknown; then
23729 if test "$cross_compiling" = yes; then
23730     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
23731 else
23732   cat > conftest.$ac_ext <<EOF
23733 #line 23734 "configure"
23734 #include "confdefs.h"
23735 main () {
23736   /* Are we little or big endian?  From Harbison&Steele.  */
23737   union
23738   {
23739     long l;
23740     char c[sizeof (long)];
23741   } u;
23742   u.l = 1;
23743   exit (u.c[sizeof (long) - 1] == 1);
23744 }
23745 EOF
23746 if { (eval echo configure:23747: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
23747 then
23748   ac_cv_c_bigendian=no
23749 else
23750   echo "configure: failed program was:" >&5
23751   cat conftest.$ac_ext >&5
23752   rm -fr conftest*
23753   ac_cv_c_bigendian=yes
23754 fi
23755 rm -fr conftest*
23756 fi
23757
23758 fi
23759 fi
23760
23761 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
23762 if test $ac_cv_c_bigendian = yes; then
23763   cat >> confdefs.h <<\EOF
23764 #define WORDS_BIGENDIAN 1
23765 EOF
23766
23767 fi
23768
23769 fi
23770
23771 echo $ac_n "checking size of short""... $ac_c" 1>&6
23772 echo "configure:23773: checking size of short" >&5 
23773 if eval "test \"\${ac_cv_sizeof_short+set}\" = set"; then
23774   echo $ac_n "(cached) $ac_c" 1>&6
23775 else
23776   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
23777   cat > conftest.$ac_ext <<EOF
23778 #line 23779 "configure"
23779 #include "confdefs.h"
23780 #include "confdefs.h" 
23781 #include <stdlib.h>
23782 #include <sys/types.h> 
23783  
23784
23785 int main() {
23786 switch (0) case 0: case (sizeof (short) == $ac_size):;
23787 ; return 0; }
23788 EOF
23789 if { (eval echo configure:23790: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23790   rm -rf conftest*
23791   ac_cv_sizeof_short=$ac_size
23792 else
23793   echo "configure: failed program was:" >&5
23794   cat conftest.$ac_ext >&5
23795 fi
23796 rm -f conftest* 
23797   if test x$ac_cv_sizeof_short != x ; then break; fi 
23798 done 
23799
23800 fi
23801  
23802 if test x$ac_cv_sizeof_short = x ; then 
23803   { echo "configure: error: cannot determine a size for short" 1>&2; exit 1; } 
23804 fi 
23805 echo "$ac_t""$ac_cv_sizeof_short" 1>&6 
23806 cat >> confdefs.h <<EOF
23807 #define SIZEOF_SHORT $ac_cv_sizeof_short
23808 EOF
23809  
23810  
23811 echo $ac_n "checking size of int""... $ac_c" 1>&6
23812 echo "configure:23813: checking size of int" >&5 
23813 if eval "test \"\${ac_cv_sizeof_int+set}\" = set"; then
23814   echo $ac_n "(cached) $ac_c" 1>&6
23815 else
23816   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
23817   cat > conftest.$ac_ext <<EOF
23818 #line 23819 "configure"
23819 #include "confdefs.h"
23820 #include "confdefs.h" 
23821 #include <stdlib.h>
23822 #include <sys/types.h> 
23823  
23824
23825 int main() {
23826 switch (0) case 0: case (sizeof (int) == $ac_size):;
23827 ; return 0; }
23828 EOF
23829 if { (eval echo configure:23830: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23830   rm -rf conftest*
23831   ac_cv_sizeof_int=$ac_size
23832 else
23833   echo "configure: failed program was:" >&5
23834   cat conftest.$ac_ext >&5
23835 fi
23836 rm -f conftest* 
23837   if test x$ac_cv_sizeof_int != x ; then break; fi 
23838 done 
23839
23840 fi
23841  
23842 if test x$ac_cv_sizeof_int = x ; then 
23843   { echo "configure: error: cannot determine a size for int" 1>&2; exit 1; } 
23844 fi 
23845 echo "$ac_t""$ac_cv_sizeof_int" 1>&6 
23846 cat >> confdefs.h <<EOF
23847 #define SIZEOF_INT $ac_cv_sizeof_int
23848 EOF
23849  
23850  
23851 echo $ac_n "checking size of long""... $ac_c" 1>&6
23852 echo "configure:23853: checking size of long" >&5 
23853 if eval "test \"\${ac_cv_sizeof_long+set}\" = set"; then
23854   echo $ac_n "(cached) $ac_c" 1>&6
23855 else
23856   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
23857   cat > conftest.$ac_ext <<EOF
23858 #line 23859 "configure"
23859 #include "confdefs.h"
23860 #include "confdefs.h" 
23861 #include <stdlib.h>
23862 #include <sys/types.h> 
23863  
23864
23865 int main() {
23866 switch (0) case 0: case (sizeof (long) == $ac_size):;
23867 ; return 0; }
23868 EOF
23869 if { (eval echo configure:23870: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23870   rm -rf conftest*
23871   ac_cv_sizeof_long=$ac_size
23872 else
23873   echo "configure: failed program was:" >&5
23874   cat conftest.$ac_ext >&5
23875 fi
23876 rm -f conftest* 
23877   if test x$ac_cv_sizeof_long != x ; then break; fi 
23878 done 
23879
23880 fi
23881  
23882 if test x$ac_cv_sizeof_long = x ; then 
23883   { echo "configure: error: cannot determine a size for long" 1>&2; exit 1; } 
23884 fi 
23885 echo "$ac_t""$ac_cv_sizeof_long" 1>&6 
23886 cat >> confdefs.h <<EOF
23887 #define SIZEOF_LONG $ac_cv_sizeof_long
23888 EOF
23889  
23890
23891 echo $ac_n "checking size of wchar_t""... $ac_c" 1>&6
23892 echo "configure:23893: checking size of wchar_t" >&5 
23893 if eval "test \"\${ac_cv_sizeof_wchar_t+set}\" = set"; then
23894   echo $ac_n "(cached) $ac_c" 1>&6
23895 else
23896   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
23897   cat > conftest.$ac_ext <<EOF
23898 #line 23899 "configure"
23899 #include "confdefs.h"
23900 #include "confdefs.h" 
23901 #include <stdlib.h>
23902 #include <sys/types.h> 
23903  
23904
23905 int main() {
23906 switch (0) case 0: case (sizeof (wchar_t) == $ac_size):;
23907 ; return 0; }
23908 EOF
23909 if { (eval echo configure:23910: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23910   rm -rf conftest*
23911   ac_cv_sizeof_wchar_t=$ac_size
23912 else
23913   echo "configure: failed program was:" >&5
23914   cat conftest.$ac_ext >&5
23915 fi
23916 rm -f conftest* 
23917   if test x$ac_cv_sizeof_wchar_t != x ; then break; fi 
23918 done 
23919
23920 fi
23921  
23922 if test x$ac_cv_sizeof_wchar_t = x ; then 
23923   { echo "configure: error: cannot determine a size for wchar_t" 1>&2; exit 1; } 
23924 fi 
23925 echo "$ac_t""$ac_cv_sizeof_wchar_t" 1>&6 
23926 cat >> confdefs.h <<EOF
23927 #define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
23928 EOF
23929  
23930
23931
23932 if test "$ac_cv_sizeof_int" -lt 4 ; then
23933         echo "configure: warning: OpenLDAP requires 'int' to be 32 bits or greater." 1>&2
23934
23935         cat >> confdefs.h <<\EOF
23936 #define LBER_INT_T long
23937 EOF
23938
23939 else
23940         cat >> confdefs.h <<\EOF
23941 #define LBER_INT_T int
23942 EOF
23943
23944 fi
23945
23946 cat >> confdefs.h <<\EOF
23947 #define LBER_LEN_T long
23948 EOF
23949
23950 cat >> confdefs.h <<\EOF
23951 #define LBER_SOCKET_T int
23952 EOF
23953
23954 cat >> confdefs.h <<\EOF
23955 #define LBER_TAG_T long
23956 EOF
23957
23958
23959 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
23960 echo "configure:23961: checking for 8-bit clean memcmp" >&5
23961 if eval "test \"\${ac_cv_func_memcmp_clean+set}\" = set"; then
23962   echo $ac_n "(cached) $ac_c" 1>&6
23963 else
23964   if test "$cross_compiling" = yes; then
23965   ac_cv_func_memcmp_clean=no
23966 else
23967   cat > conftest.$ac_ext <<EOF
23968 #line 23969 "configure"
23969 #include "confdefs.h"
23970
23971 main()
23972 {
23973   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
23974   exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
23975 }
23976
23977 EOF
23978 if { (eval echo configure:23979: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
23979 then
23980   ac_cv_func_memcmp_clean=yes
23981 else
23982   echo "configure: failed program was:" >&5
23983   cat conftest.$ac_ext >&5
23984   rm -fr conftest*
23985   ac_cv_func_memcmp_clean=no
23986 fi
23987 rm -fr conftest*
23988 fi
23989
23990 fi
23991
23992 echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
23993 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
23994
23995
23996 if test $ac_cv_func_memcmp_clean = no ; then
23997         cat >> confdefs.h <<\EOF
23998 #define NEED_MEMCMP_REPLACEMENT 1
23999 EOF
24000
24001 fi
24002
24003 echo $ac_n "checking for strftime""... $ac_c" 1>&6
24004 echo "configure:24005: checking for strftime" >&5
24005 if eval "test \"\${ac_cv_func_strftime+set}\" = set"; then
24006   echo $ac_n "(cached) $ac_c" 1>&6
24007 else
24008   cat > conftest.$ac_ext <<EOF
24009 #line 24010 "configure"
24010 #include "confdefs.h"
24011 /* System header to define __stub macros and hopefully few prototypes,
24012     which can conflict with char strftime(); below.  */
24013 #include <assert.h>
24014 /* Override any gcc2 internal prototype to avoid an error.  */
24015 /* We use char because int might match the return type of a gcc2
24016     builtin and then its argument prototype would still apply.  */
24017 char strftime();
24018 char (*f)();
24019
24020 int main() {
24021
24022 /* The GNU C library defines this for functions which it implements
24023     to always fail with ENOSYS.  Some functions are actually named
24024     something starting with __ and the normal name is an alias.  */
24025 #if defined (__stub_strftime) || defined (__stub___strftime)
24026 choke me
24027 #else
24028 f = strftime;
24029 #endif
24030
24031 ; return 0; }
24032 EOF
24033 if { (eval echo configure:24034: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
24034   rm -rf conftest*
24035   eval "ac_cv_func_strftime=yes"
24036 else
24037   echo "configure: failed program was:" >&5
24038   cat conftest.$ac_ext >&5
24039   rm -rf conftest*
24040   eval "ac_cv_func_strftime=no"
24041 fi
24042 rm -f conftest*
24043 fi
24044
24045 if eval "test \"`echo '$ac_cv_func_'strftime`\" = yes"; then
24046   echo "$ac_t""yes" 1>&6
24047   cat >> confdefs.h <<\EOF
24048 #define HAVE_STRFTIME 1
24049 EOF
24050
24051 else
24052   echo "$ac_t""no" 1>&6
24053 # strftime is in -lintl on SCO UNIX.
24054 echo $ac_n "checking for strftime in -lintl""... $ac_c" 1>&6
24055 echo "configure:24056: checking for strftime in -lintl" >&5
24056 ac_lib_var=`echo intl'_'strftime | sed 'y%./+-:%__p__%'`
24057 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
24058   echo $ac_n "(cached) $ac_c" 1>&6
24059 else
24060   ac_save_LIBS="$LIBS"
24061 LIBS="-lintl  $LIBS"
24062 cat > conftest.$ac_ext <<EOF
24063 #line 24064 "configure"
24064 #include "confdefs.h"
24065 /* Override any gcc2 internal prototype to avoid an error.  */
24066 /* We use char because int might match the return type of a gcc2
24067     builtin and then its argument prototype would still apply.  */
24068 char strftime();
24069
24070 int main() {
24071 strftime()
24072 ; return 0; }
24073 EOF
24074 if { (eval echo configure:24075: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
24075   rm -rf conftest*
24076   eval "ac_cv_lib_$ac_lib_var=yes"
24077 else
24078   echo "configure: failed program was:" >&5
24079   cat conftest.$ac_ext >&5
24080   rm -rf conftest*
24081   eval "ac_cv_lib_$ac_lib_var=no"
24082 fi
24083 rm -f conftest*
24084 LIBS="$ac_save_LIBS"
24085
24086 fi
24087 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
24088   echo "$ac_t""yes" 1>&6
24089   cat >> confdefs.h <<\EOF
24090 #define HAVE_STRFTIME 1
24091 EOF
24092
24093 LIBS="-lintl $LIBS"
24094 else
24095   echo "$ac_t""no" 1>&6
24096 fi
24097
24098 fi
24099
24100
24101 echo $ac_n "checking for inet_aton()""... $ac_c" 1>&6
24102 echo "configure:24103: checking for inet_aton()" >&5
24103 if eval "test \"\${ol_cv_func_inet_aton+set}\" = set"; then
24104   echo $ac_n "(cached) $ac_c" 1>&6
24105 else
24106   cat > conftest.$ac_ext <<EOF
24107 #line 24108 "configure"
24108 #include "confdefs.h"
24109
24110 #ifdef HAVE_SYS_TYPES_H
24111 #       include <sys/types.h>
24112 #endif
24113 #ifdef HAVE_SYS_SOCKET_H
24114 #       include <sys/socket.h>
24115 #       ifdef HAVE_SYS_SELECT_H
24116 #               include <sys/select.h>
24117 #       endif
24118 #       include <netinet/in.h>
24119 #       ifdef HAVE_ARPA_INET_H
24120 #               include <arpa/inet.h>
24121 #       endif
24122 #endif
24123
24124 int main() {
24125 struct in_addr in;
24126 int rc = inet_aton( "255.255.255.255", &in );
24127 ; return 0; }
24128 EOF
24129 if { (eval echo configure:24130: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
24130   rm -rf conftest*
24131   ol_cv_func_inet_aton=yes
24132 else
24133   echo "configure: failed program was:" >&5
24134   cat conftest.$ac_ext >&5
24135   rm -rf conftest*
24136   ol_cv_func_inet_aton=no
24137 fi
24138 rm -f conftest*
24139 fi
24140
24141 echo "$ac_t""$ol_cv_func_inet_aton" 1>&6
24142   if test $ol_cv_func_inet_aton != no; then
24143     cat >> confdefs.h <<\EOF
24144 #define HAVE_INET_ATON 1
24145 EOF
24146
24147   fi
24148  
24149
24150 echo $ac_n "checking for _spawnlp""... $ac_c" 1>&6
24151 echo "configure:24152: checking for _spawnlp" >&5
24152 if eval "test \"\${ac_cv_func__spawnlp+set}\" = set"; then
24153   echo $ac_n "(cached) $ac_c" 1>&6
24154 else
24155   cat > conftest.$ac_ext <<EOF
24156 #line 24157 "configure"
24157 #include "confdefs.h"
24158 /* System header to define __stub macros and hopefully few prototypes,
24159     which can conflict with char _spawnlp(); below.  */
24160 #include <assert.h>
24161 /* Override any gcc2 internal prototype to avoid an error.  */
24162 /* We use char because int might match the return type of a gcc2
24163     builtin and then its argument prototype would still apply.  */
24164 char _spawnlp();
24165 char (*f)();
24166
24167 int main() {
24168
24169 /* The GNU C library defines this for functions which it implements
24170     to always fail with ENOSYS.  Some functions are actually named
24171     something starting with __ and the normal name is an alias.  */
24172 #if defined (__stub__spawnlp) || defined (__stub____spawnlp)
24173 choke me
24174 #else
24175 f = _spawnlp;
24176 #endif
24177
24178 ; return 0; }
24179 EOF
24180 if { (eval echo configure:24181: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
24181   rm -rf conftest*
24182   eval "ac_cv_func__spawnlp=yes"
24183 else
24184   echo "configure: failed program was:" >&5
24185   cat conftest.$ac_ext >&5
24186   rm -rf conftest*
24187   eval "ac_cv_func__spawnlp=no"
24188 fi
24189 rm -f conftest*
24190 fi
24191
24192 if eval "test \"`echo '$ac_cv_func_'_spawnlp`\" = yes"; then
24193   echo "$ac_t""yes" 1>&6
24194   cat >> confdefs.h <<\EOF
24195 #define HAVE_SPAWNLP 1
24196 EOF
24197
24198 else
24199   echo "$ac_t""no" 1>&6
24200 fi
24201
24202
24203 echo $ac_n "checking for _snprintf""... $ac_c" 1>&6
24204 echo "configure:24205: checking for _snprintf" >&5
24205 if eval "test \"\${ac_cv_func__snprintf+set}\" = set"; then
24206   echo $ac_n "(cached) $ac_c" 1>&6
24207 else
24208   cat > conftest.$ac_ext <<EOF
24209 #line 24210 "configure"
24210 #include "confdefs.h"
24211 /* System header to define __stub macros and hopefully few prototypes,
24212     which can conflict with char _snprintf(); below.  */
24213 #include <assert.h>
24214 /* Override any gcc2 internal prototype to avoid an error.  */
24215 /* We use char because int might match the return type of a gcc2
24216     builtin and then its argument prototype would still apply.  */
24217 char _snprintf();
24218 char (*f)();
24219
24220 int main() {
24221
24222 /* The GNU C library defines this for functions which it implements
24223     to always fail with ENOSYS.  Some functions are actually named
24224     something starting with __ and the normal name is an alias.  */
24225 #if defined (__stub__snprintf) || defined (__stub____snprintf)
24226 choke me
24227 #else
24228 f = _snprintf;
24229 #endif
24230
24231 ; return 0; }
24232 EOF
24233 if { (eval echo configure:24234: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
24234   rm -rf conftest*
24235   eval "ac_cv_func__snprintf=yes"
24236 else
24237   echo "configure: failed program was:" >&5
24238   cat conftest.$ac_ext >&5
24239   rm -rf conftest*
24240   eval "ac_cv_func__snprintf=no"
24241 fi
24242 rm -f conftest*
24243 fi
24244
24245 if eval "test \"`echo '$ac_cv_func_'_snprintf`\" = yes"; then
24246   echo "$ac_t""yes" 1>&6
24247   ac_cv_func_snprintf=yes
24248         cat >> confdefs.h <<\EOF
24249 #define snprintf _snprintf
24250 EOF
24251
24252
24253 else
24254   echo "$ac_t""no" 1>&6
24255 fi
24256
24257
24258 echo $ac_n "checking for _vsnprintf""... $ac_c" 1>&6
24259 echo "configure:24260: checking for _vsnprintf" >&5
24260 if eval "test \"\${ac_cv_func__vsnprintf+set}\" = set"; then
24261   echo $ac_n "(cached) $ac_c" 1>&6
24262 else
24263   cat > conftest.$ac_ext <<EOF
24264 #line 24265 "configure"
24265 #include "confdefs.h"
24266 /* System header to define __stub macros and hopefully few prototypes,
24267     which can conflict with char _vsnprintf(); below.  */
24268 #include <assert.h>
24269 /* Override any gcc2 internal prototype to avoid an error.  */
24270 /* We use char because int might match the return type of a gcc2
24271     builtin and then its argument prototype would still apply.  */
24272 char _vsnprintf();
24273 char (*f)();
24274
24275 int main() {
24276
24277 /* The GNU C library defines this for functions which it implements
24278     to always fail with ENOSYS.  Some functions are actually named
24279     something starting with __ and the normal name is an alias.  */
24280 #if defined (__stub__vsnprintf) || defined (__stub____vsnprintf)
24281 choke me
24282 #else
24283 f = _vsnprintf;
24284 #endif
24285
24286 ; return 0; }
24287 EOF
24288 if { (eval echo configure:24289: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
24289   rm -rf conftest*
24290   eval "ac_cv_func__vsnprintf=yes"
24291 else
24292   echo "configure: failed program was:" >&5
24293   cat conftest.$ac_ext >&5
24294   rm -rf conftest*
24295   eval "ac_cv_func__vsnprintf=no"
24296 fi
24297 rm -f conftest*
24298 fi
24299
24300 if eval "test \"`echo '$ac_cv_func_'_vsnprintf`\" = yes"; then
24301   echo "$ac_t""yes" 1>&6
24302   ac_cv_func_vsnprintf=yes
24303         cat >> confdefs.h <<\EOF
24304 #define vsnprintf _vsnprintf
24305 EOF
24306
24307
24308 else
24309   echo "$ac_t""no" 1>&6
24310 fi
24311
24312
24313 echo $ac_n "checking for vprintf""... $ac_c" 1>&6
24314 echo "configure:24315: checking for vprintf" >&5
24315 if eval "test \"\${ac_cv_func_vprintf+set}\" = set"; then
24316   echo $ac_n "(cached) $ac_c" 1>&6
24317 else
24318   cat > conftest.$ac_ext <<EOF
24319 #line 24320 "configure"
24320 #include "confdefs.h"
24321 /* System header to define __stub macros and hopefully few prototypes,
24322     which can conflict with char vprintf(); below.  */
24323 #include <assert.h>
24324 /* Override any gcc2 internal prototype to avoid an error.  */
24325 /* We use char because int might match the return type of a gcc2
24326     builtin and then its argument prototype would still apply.  */
24327 char vprintf();
24328 char (*f)();
24329
24330 int main() {
24331
24332 /* The GNU C library defines this for functions which it implements
24333     to always fail with ENOSYS.  Some functions are actually named
24334     something starting with __ and the normal name is an alias.  */
24335 #if defined (__stub_vprintf) || defined (__stub___vprintf)
24336 choke me
24337 #else
24338 f = vprintf;
24339 #endif
24340
24341 ; return 0; }
24342 EOF
24343 if { (eval echo configure:24344: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
24344   rm -rf conftest*
24345   eval "ac_cv_func_vprintf=yes"
24346 else
24347   echo "configure: failed program was:" >&5
24348   cat conftest.$ac_ext >&5
24349   rm -rf conftest*
24350   eval "ac_cv_func_vprintf=no"
24351 fi
24352 rm -f conftest*
24353 fi
24354
24355 if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
24356   echo "$ac_t""yes" 1>&6
24357   cat >> confdefs.h <<\EOF
24358 #define HAVE_VPRINTF 1
24359 EOF
24360
24361 else
24362   echo "$ac_t""no" 1>&6
24363 fi
24364
24365 if test "$ac_cv_func_vprintf" != yes; then
24366 echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
24367 echo "configure:24368: checking for _doprnt" >&5
24368 if eval "test \"\${ac_cv_func__doprnt+set}\" = set"; then
24369   echo $ac_n "(cached) $ac_c" 1>&6
24370 else
24371   cat > conftest.$ac_ext <<EOF
24372 #line 24373 "configure"
24373 #include "confdefs.h"
24374 /* System header to define __stub macros and hopefully few prototypes,
24375     which can conflict with char _doprnt(); below.  */
24376 #include <assert.h>
24377 /* Override any gcc2 internal prototype to avoid an error.  */
24378 /* We use char because int might match the return type of a gcc2
24379     builtin and then its argument prototype would still apply.  */
24380 char _doprnt();
24381 char (*f)();
24382
24383 int main() {
24384
24385 /* The GNU C library defines this for functions which it implements
24386     to always fail with ENOSYS.  Some functions are actually named
24387     something starting with __ and the normal name is an alias.  */
24388 #if defined (__stub__doprnt) || defined (__stub____doprnt)
24389 choke me
24390 #else
24391 f = _doprnt;
24392 #endif
24393
24394 ; return 0; }
24395 EOF
24396 if { (eval echo configure:24397: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
24397   rm -rf conftest*
24398   eval "ac_cv_func__doprnt=yes"
24399 else
24400   echo "configure: failed program was:" >&5
24401   cat conftest.$ac_ext >&5
24402   rm -rf conftest*
24403   eval "ac_cv_func__doprnt=no"
24404 fi
24405 rm -f conftest*
24406 fi
24407
24408 if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
24409   echo "$ac_t""yes" 1>&6
24410   cat >> confdefs.h <<\EOF
24411 #define HAVE_DOPRNT 1
24412 EOF
24413
24414 else
24415   echo "$ac_t""no" 1>&6
24416 fi
24417
24418 fi
24419
24420
24421 if test $ac_cv_func_vprintf = yes ; then
24422                 for ac_func in snprintf vsnprintf
24423 do
24424 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
24425 echo "configure:24426: checking for $ac_func" >&5
24426 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
24427   echo $ac_n "(cached) $ac_c" 1>&6
24428 else
24429   cat > conftest.$ac_ext <<EOF
24430 #line 24431 "configure"
24431 #include "confdefs.h"
24432 /* System header to define __stub macros and hopefully few prototypes,
24433     which can conflict with char $ac_func(); below.  */
24434 #include <assert.h>
24435 /* Override any gcc2 internal prototype to avoid an error.  */
24436 /* We use char because int might match the return type of a gcc2
24437     builtin and then its argument prototype would still apply.  */
24438 char $ac_func();
24439 char (*f)();
24440
24441 int main() {
24442
24443 /* The GNU C library defines this for functions which it implements
24444     to always fail with ENOSYS.  Some functions are actually named
24445     something starting with __ and the normal name is an alias.  */
24446 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
24447 choke me
24448 #else
24449 f = $ac_func;
24450 #endif
24451
24452 ; return 0; }
24453 EOF
24454 if { (eval echo configure:24455: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
24455   rm -rf conftest*
24456   eval "ac_cv_func_$ac_func=yes"
24457 else
24458   echo "configure: failed program was:" >&5
24459   cat conftest.$ac_ext >&5
24460   rm -rf conftest*
24461   eval "ac_cv_func_$ac_func=no"
24462 fi
24463 rm -f conftest*
24464 fi
24465
24466 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
24467   echo "$ac_t""yes" 1>&6
24468     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
24469   cat >> confdefs.h <<EOF
24470 #define $ac_tr_func 1
24471 EOF
24472  
24473 else
24474   echo "$ac_t""no" 1>&6
24475 fi
24476 done
24477
24478 fi
24479
24480 for ac_func in \
24481         bcopy                   \
24482         closesocket             \
24483         chroot                  \
24484         endgrent                \
24485         endpwent                \
24486         fcntl                   \
24487         flock                   \
24488         fstat                   \
24489         getdtablesize   \
24490         getgrgid                \
24491         gethostname             \
24492         getpass                 \
24493         getpassphrase   \
24494         getpwuid                \
24495         getpwnam                \
24496         getspnam                \
24497         gettimeofday    \
24498         initgroups              \
24499         lockf                   \
24500         memcpy                  \
24501         memmove                 \
24502         mkstemp                 \
24503         mktemp                  \
24504         pipe                    \
24505         read                    \
24506         recv                    \
24507         recvfrom                \
24508         setpwfile               \
24509         setgid                  \
24510         setegid                 \
24511         setsid                  \
24512         setuid                  \
24513         seteuid                 \
24514         signal                  \
24515         strdup                  \
24516         strpbrk                 \
24517         strrchr                 \
24518         strsep                  \
24519         strstr                  \
24520         strtol                  \
24521         strtoul                 \
24522         strtoq                  \
24523         strtouq                 \
24524         strtoll                 \
24525         strspn                  \
24526         sysconf                 \
24527         usleep                  \
24528         waitpid                 \
24529         wait4                   \
24530         write                   \
24531         send                    \
24532         sendmsg                 \
24533         sendto                  \
24534
24535 do
24536 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
24537 echo "configure:24538: checking for $ac_func" >&5
24538 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
24539   echo $ac_n "(cached) $ac_c" 1>&6
24540 else
24541   cat > conftest.$ac_ext <<EOF
24542 #line 24543 "configure"
24543 #include "confdefs.h"
24544 /* System header to define __stub macros and hopefully few prototypes,
24545     which can conflict with char $ac_func(); below.  */
24546 #include <assert.h>
24547 /* Override any gcc2 internal prototype to avoid an error.  */
24548 /* We use char because int might match the return type of a gcc2
24549     builtin and then its argument prototype would still apply.  */
24550 char $ac_func();
24551 char (*f)();
24552
24553 int main() {
24554
24555 /* The GNU C library defines this for functions which it implements
24556     to always fail with ENOSYS.  Some functions are actually named
24557     something starting with __ and the normal name is an alias.  */
24558 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
24559 choke me
24560 #else
24561 f = $ac_func;
24562 #endif
24563
24564 ; return 0; }
24565 EOF
24566 if { (eval echo configure:24567: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
24567   rm -rf conftest*
24568   eval "ac_cv_func_$ac_func=yes"
24569 else
24570   echo "configure: failed program was:" >&5
24571   cat conftest.$ac_ext >&5
24572   rm -rf conftest*
24573   eval "ac_cv_func_$ac_func=no"
24574 fi
24575 rm -f conftest*
24576 fi
24577
24578 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
24579   echo "$ac_t""yes" 1>&6
24580     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
24581   cat >> confdefs.h <<EOF
24582 #define $ac_tr_func 1
24583 EOF
24584  
24585 else
24586   echo "$ac_t""no" 1>&6
24587 fi
24588 done
24589
24590
24591 for ac_func in getopt getpeereid
24592 do
24593 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
24594 echo "configure:24595: checking for $ac_func" >&5
24595 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
24596   echo $ac_n "(cached) $ac_c" 1>&6
24597 else
24598   cat > conftest.$ac_ext <<EOF
24599 #line 24600 "configure"
24600 #include "confdefs.h"
24601 /* System header to define __stub macros and hopefully few prototypes,
24602     which can conflict with char $ac_func(); below.  */
24603 #include <assert.h>
24604 /* Override any gcc2 internal prototype to avoid an error.  */
24605 /* We use char because int might match the return type of a gcc2
24606     builtin and then its argument prototype would still apply.  */
24607 char $ac_func();
24608 char (*f)();
24609
24610 int main() {
24611
24612 /* The GNU C library defines this for functions which it implements
24613     to always fail with ENOSYS.  Some functions are actually named
24614     something starting with __ and the normal name is an alias.  */
24615 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
24616 choke me
24617 #else
24618 f = $ac_func;
24619 #endif
24620
24621 ; return 0; }
24622 EOF
24623 if { (eval echo configure:24624: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
24624   rm -rf conftest*
24625   eval "ac_cv_func_$ac_func=yes"
24626 else
24627   echo "configure: failed program was:" >&5
24628   cat conftest.$ac_ext >&5
24629   rm -rf conftest*
24630   eval "ac_cv_func_$ac_func=no"
24631 fi
24632 rm -f conftest*
24633 fi
24634
24635 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
24636   echo "$ac_t""yes" 1>&6
24637     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
24638   cat >> confdefs.h <<EOF
24639 #define $ac_tr_func 1
24640 EOF
24641  
24642 else
24643   echo "$ac_t""no" 1>&6
24644 LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
24645 fi
24646 done
24647
24648
24649
24650 if test "$ac_cv_func_getopt" != yes; then
24651         LIBSRCS="$LIBSRCS getopt.c"
24652 fi
24653 if test "$ac_cv_func_getpeereid" != yes; then
24654         echo $ac_n "checking for msg_accrights in msghdr""... $ac_c" 1>&6
24655 echo "configure:24656: checking for msg_accrights in msghdr" >&5
24656 if eval "test \"\${ol_cv_msghdr_msg_accrights+set}\" = set"; then
24657   echo $ac_n "(cached) $ac_c" 1>&6
24658 else
24659   cat > conftest.$ac_ext <<EOF
24660 #line 24661 "configure"
24661 #include "confdefs.h"
24662 #include <sys/socket.h>
24663 int main() {
24664 struct msghdr m; m.msg_accrightslen=0
24665 ; return 0; }
24666 EOF
24667 if { (eval echo configure:24668: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
24668   rm -rf conftest*
24669   ol_cv_msghdr_msg_accrights=yes
24670 else
24671   echo "configure: failed program was:" >&5
24672   cat conftest.$ac_ext >&5
24673   rm -rf conftest*
24674   ol_cv_msghdr_msg_accrights=no
24675 fi
24676 rm -f conftest*
24677         
24678 fi
24679
24680 echo "$ac_t""$ol_cv_msghdr_msg_accrights" 1>&6
24681   if test $ol_cv_msghdr_msg_accrights = "yes" ; then
24682         cat >> confdefs.h <<\EOF
24683 #define HAVE_MSGHDR_MSG_ACCRIGHTS 1
24684 EOF
24685
24686   fi
24687
24688         if test "$ac_cv_func_getpeereid" != yes; then
24689                 echo $ac_n "checking for msg_control in msghdr""... $ac_c" 1>&6
24690 echo "configure:24691: checking for msg_control in msghdr" >&5
24691 if eval "test \"\${ol_cv_msghdr_msg_control+set}\" = set"; then
24692   echo $ac_n "(cached) $ac_c" 1>&6
24693 else
24694   cat > conftest.$ac_ext <<EOF
24695 #line 24696 "configure"
24696 #include "confdefs.h"
24697 #include <sys/socket.h>
24698 int main() {
24699 struct msghdr m; m.msg_control=(struct cmsghdr *)0
24700 ; return 0; }
24701 EOF
24702 if { (eval echo configure:24703: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
24703   rm -rf conftest*
24704   ol_cv_msghdr_msg_control=yes
24705 else
24706   echo "configure: failed program was:" >&5
24707   cat conftest.$ac_ext >&5
24708   rm -rf conftest*
24709   ol_cv_msghdr_msg_control=no
24710 fi
24711 rm -f conftest*
24712         
24713 fi
24714
24715 echo "$ac_t""$ol_cv_msghdr_msg_control" 1>&6
24716   if test $ol_cv_msghdr_msg_control = "yes" ; then
24717         cat >> confdefs.h <<\EOF
24718 #define HAVE_MSGHDR_MSG_CONTROL 1
24719 EOF
24720
24721   fi
24722
24723         fi
24724         LIBSRCS="$LIBSRCS getpeereid.c"
24725 fi
24726 if test "$ac_cv_func_snprintf" != yes -o "$ac_cv_func_vsnprintf" != yes; then
24727         if test "$ac_cv_func_snprintf" != yes; then
24728                 cat >> confdefs.h <<\EOF
24729 #define snprintf ber_pvt_snprintf
24730 EOF
24731
24732         fi
24733         if test "$ac_cv_func_vsnprintf" != yes; then
24734                 cat >> confdefs.h <<\EOF
24735 #define vsnprintf ber_pvt_vsnprintf
24736 EOF
24737
24738         fi
24739 fi
24740
24741
24742 if test "$ol_enable_slapi" != no ; then
24743                         for ac_hdr in ltdl.h
24744 do
24745 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
24746 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
24747 echo "configure:24748: checking for $ac_hdr" >&5
24748 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
24749   echo $ac_n "(cached) $ac_c" 1>&6
24750 else
24751   cat > conftest.$ac_ext <<EOF
24752 #line 24753 "configure"
24753 #include "confdefs.h"
24754 #include <$ac_hdr>
24755 EOF
24756 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
24757 { (eval echo configure:24758: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
24758 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
24759 if test -z "$ac_err"; then
24760   rm -rf conftest*
24761   eval "ac_cv_header_$ac_safe=yes"
24762 else
24763   echo "$ac_err" >&5
24764   echo "configure: failed program was:" >&5
24765   cat conftest.$ac_ext >&5
24766   rm -rf conftest*
24767   eval "ac_cv_header_$ac_safe=no"
24768 fi
24769 rm -f conftest*
24770 fi
24771 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
24772   echo "$ac_t""yes" 1>&6
24773     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
24774   cat >> confdefs.h <<EOF
24775 #define $ac_tr_hdr 1
24776 EOF
24777  
24778 else
24779   echo "$ac_t""no" 1>&6
24780 fi
24781 done
24782
24783
24784         if test $ac_cv_header_ltdl_h != yes ; then
24785                 { echo "configure: error: could not locate <ltdl.h>" 1>&2; exit 1; }
24786         fi
24787         echo $ac_n "checking for lt_dlinit in -lltdl""... $ac_c" 1>&6
24788 echo "configure:24789: checking for lt_dlinit in -lltdl" >&5
24789 ac_lib_var=`echo ltdl'_'lt_dlinit | sed 'y%./+-:%__p__%'`
24790 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
24791   echo $ac_n "(cached) $ac_c" 1>&6
24792 else
24793   ac_save_LIBS="$LIBS"
24794 LIBS="-lltdl  $LIBS"
24795 cat > conftest.$ac_ext <<EOF
24796 #line 24797 "configure"
24797 #include "confdefs.h"
24798 /* Override any gcc2 internal prototype to avoid an error.  */
24799 /* We use char because int might match the return type of a gcc2
24800     builtin and then its argument prototype would still apply.  */
24801 char lt_dlinit();
24802
24803 int main() {
24804 lt_dlinit()
24805 ; return 0; }
24806 EOF
24807 if { (eval echo configure:24808: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
24808   rm -rf conftest*
24809   eval "ac_cv_lib_$ac_lib_var=yes"
24810 else
24811   echo "configure: failed program was:" >&5
24812   cat conftest.$ac_ext >&5
24813   rm -rf conftest*
24814   eval "ac_cv_lib_$ac_lib_var=no"
24815 fi
24816 rm -f conftest*
24817 LIBS="$ac_save_LIBS"
24818
24819 fi
24820 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
24821   echo "$ac_t""yes" 1>&6
24822   
24823                 SLAPI_LIBS=-lltdl
24824                 LIBSLAPI=libslapi.a
24825                 LIBSLAPITOOLS=../libslapi.a
24826                 cat >> confdefs.h <<\EOF
24827 #define HAVE_LIBLTDL 1
24828 EOF
24829
24830         
24831 else
24832   echo "$ac_t""no" 1>&6
24833 { echo "configure: error: could not locate libtool -lltdl" 1>&2; exit 1; }
24834 fi
24835
24836
24837         cat >> confdefs.h <<\EOF
24838 #define LDAP_SLAPI 1
24839 EOF
24840
24841 fi
24842
24843 if test "$ol_enable_debug" != no ; then
24844         cat >> confdefs.h <<\EOF
24845 #define LDAP_DEBUG 1
24846 EOF
24847
24848 fi
24849 if test "$ol_enable_syslog" = yes ; then
24850         cat >> confdefs.h <<\EOF
24851 #define LDAP_SYSLOG 1
24852 EOF
24853
24854 fi
24855 if test "$ol_link_kbind" != no ; then
24856         cat >> confdefs.h <<\EOF
24857 #define LDAP_API_FEATURE_X_OPENLDAP_V2_KBIND LDAP_VENDOR_VERSION
24858 EOF
24859
24860 fi
24861 if test "$ol_enable_proctitle" != no ; then
24862         cat >> confdefs.h <<\EOF
24863 #define LDAP_PROCTITLE 1
24864 EOF
24865
24866 fi
24867 if test "$ol_enable_referrals" != no ; then
24868         cat >> confdefs.h <<\EOF
24869 #define LDAP_API_FEATURE_X_OPENLDAP_V2_REFERRALS LDAP_VENDOR_VERSION
24870 EOF
24871
24872 fi
24873 if test "$ol_enable_local" != no; then
24874         cat >> confdefs.h <<\EOF
24875 #define LDAP_PF_LOCAL 1
24876 EOF
24877
24878 fi
24879 if test "$ol_link_ipv6" != no; then
24880         cat >> confdefs.h <<\EOF
24881 #define LDAP_PF_INET6 1
24882 EOF
24883
24884 fi
24885 if test "$ol_enable_cleartext" != no ; then
24886         cat >> confdefs.h <<\EOF
24887 #define SLAPD_CLEARTEXT 1
24888 EOF
24889
24890 fi
24891 if test "$ol_enable_crypt" != no ; then
24892         cat >> confdefs.h <<\EOF
24893 #define SLAPD_CRYPT 1
24894 EOF
24895
24896 fi
24897 if test "$ol_link_spasswd" != no ; then
24898         cat >> confdefs.h <<\EOF
24899 #define SLAPD_SPASSWD 1
24900 EOF
24901
24902 fi
24903 if test "$ol_enable_multimaster" != no ; then
24904         cat >> confdefs.h <<\EOF
24905 #define SLAPD_MULTIMASTER 1
24906 EOF
24907
24908 fi
24909 if test "$ol_enable_rlookups" != no ; then
24910         cat >> confdefs.h <<\EOF
24911 #define SLAPD_RLOOKUPS 1
24912 EOF
24913
24914 fi
24915 if test "$ol_enable_aci" != no ; then
24916         cat >> confdefs.h <<\EOF
24917 #define SLAPD_ACI_ENABLED 1
24918 EOF
24919
24920 fi
24921
24922 if test "$ol_link_modules" != no ; then
24923         cat >> confdefs.h <<\EOF
24924 #define SLAPD_MODULES 1
24925 EOF
24926
24927         BUILD_SLAPD=yes
24928         SLAPD_MODULES_LDFLAGS="-dlopen self"
24929 fi
24930
24931 cat >> confdefs.h <<\EOF
24932 #define SLAPD_MOD_STATIC 1
24933 EOF
24934
24935 cat >> confdefs.h <<\EOF
24936 #define SLAPD_MOD_DYNAMIC 2
24937 EOF
24938
24939
24940 if test "$ol_enable_bdb" != no ; then
24941         BUILD_SLAPD=yes
24942         BUILD_BDB=$ol_enable_bdb
24943         if test "$ol_enable_bdb" = mod ; then
24944                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-bdb"
24945                 MFLAG=SLAPD_MOD_DYNAMIC
24946         else
24947                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-bdb"
24948                 MFLAG=SLAPD_MOD_STATIC
24949         fi
24950         cat >> confdefs.h <<EOF
24951 #define SLAPD_BDB $MFLAG
24952 EOF
24953
24954 fi
24955
24956 if test "$ol_enable_dnssrv" != no ; then
24957         BUILD_SLAPD=yes
24958         BUILD_DNSSRV=$ol_enable_dnssrv
24959         if test "$ol_enable_dnssrv" = mod ; then
24960                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-dnssrv"
24961                 MFLAG=SLAPD_MOD_DYNAMIC
24962         else
24963                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-dnssrv"
24964                 MFLAG=SLAPD_MOD_STATIC
24965         fi
24966         cat >> confdefs.h <<EOF
24967 #define SLAPD_DNSSRV $MFLAG
24968 EOF
24969
24970 fi
24971
24972 if test "$ol_enable_hdb" != no ; then
24973         BUILD_SLAPD=yes
24974         BUILD_HDB=$ol_enable_hdb
24975         if test "$ol_enable_hdb" = mod ; then
24976                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-hdb"
24977                 MFLAG=SLAPD_MOD_DYNAMIC
24978         else
24979                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-hdb"
24980                 MFLAG=SLAPD_MOD_STATIC
24981         fi
24982         cat >> confdefs.h <<EOF
24983 #define SLAPD_HDB $MFLAG
24984 EOF
24985
24986 fi
24987
24988 if test "$ol_enable_ldap" != no ; then
24989         BUILD_SLAPD=yes
24990         BUILD_LDAP=$ol_enable_ldap
24991         if test "$ol_enable_ldap" = mod ; then
24992                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-ldap"
24993                 MFLAG=SLAPD_MOD_DYNAMIC
24994         else
24995                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-ldap"
24996                 MFLAG=SLAPD_MOD_STATIC
24997         fi
24998         cat >> confdefs.h <<EOF
24999 #define SLAPD_LDAP $MFLAG
25000 EOF
25001
25002 fi
25003
25004 if test "$ol_link_ldbm" != no -a $ol_enable_ldbm != no; then
25005         BUILD_SLAPD=yes
25006         BUILD_LDBM=$ol_enable_ldbm
25007         if test "$ol_enable_ldbm" = mod ; then
25008                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-ldbm"
25009                 MFLAG=SLAPD_MOD_DYNAMIC
25010         else
25011                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-ldbm"
25012                 MFLAG=SLAPD_MOD_STATIC
25013         fi
25014         cat >> confdefs.h <<EOF
25015 #define SLAPD_LDBM $MFLAG
25016 EOF
25017
25018 fi
25019
25020 if test "$ol_enable_meta" != no ; then
25021         BUILD_SLAPD=yes
25022         BUILD_META=$ol_enable_meta
25023         BUILD_REWRITE=yes
25024         if test "$ol_enable_meta" = mod ; then
25025                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-meta"
25026                 MFLAG=SLAPD_MOD_DYNAMIC
25027         else
25028                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-meta"
25029                 MFLAG=SLAPD_MOD_STATIC
25030         fi
25031         cat >> confdefs.h <<EOF
25032 #define SLAPD_META $MFLAG
25033 EOF
25034
25035 fi
25036
25037 if test "$ol_enable_monitor" != no ; then
25038         BUILD_SLAPD=yes
25039         BUILD_MONITOR=$ol_enable_monitor
25040         if test "$ol_enable_monitor" = mod ; then
25041                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-monitor"
25042                 MFLAG=SLAPD_MOD_DYNAMIC
25043         else
25044                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-monitor"
25045                 MFLAG=SLAPD_MOD_STATIC
25046         fi
25047         cat >> confdefs.h <<EOF
25048 #define SLAPD_MONITOR $MFLAG
25049 EOF
25050
25051 fi
25052
25053 if test "$ol_enable_null" != no ; then
25054         BUILD_SLAPD=yes
25055         BUILD_NULL=$ol_enable_null
25056         if test "$ol_enable_null" = mod ; then
25057                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-null"
25058                 MFLAG=SLAPD_MOD_DYNAMIC
25059         else
25060                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-null"
25061                 MFLAG=SLAPD_MOD_STATIC
25062         fi
25063         cat >> confdefs.h <<EOF
25064 #define SLAPD_NULL $MFLAG
25065 EOF
25066
25067 fi
25068
25069 if test "$ol_enable_passwd" != no ; then
25070         BUILD_SLAPD=yes
25071         BUILD_PASSWD=$ol_enable_passwd
25072         if test "$ol_enable_passwd" = mod ; then
25073                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-passwd"
25074                 MFLAG=SLAPD_MOD_DYNAMIC
25075         else
25076                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-passwd"
25077                 MFLAG=SLAPD_MOD_STATIC
25078         fi
25079         cat >> confdefs.h <<EOF
25080 #define SLAPD_PASSWD $MFLAG
25081 EOF
25082
25083 fi
25084
25085 if test "$ol_link_perl" != no ; then
25086         BUILD_SLAPD=yes
25087         BUILD_PERL=$ol_enable_perl
25088         if test "$ol_enable_perl" = mod ; then
25089                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-perl"
25090                 MFLAG=SLAPD_MOD_DYNAMIC
25091         else
25092                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-perl"
25093                 MFLAG=SLAPD_MOD_STATIC
25094         fi
25095         cat >> confdefs.h <<EOF
25096 #define SLAPD_PERL $MFLAG
25097 EOF
25098
25099 fi
25100
25101 if test "$ol_enable_relay" != no ; then
25102         BUILD_SLAPD=yes
25103         BUILD_RELAY=$ol_enable_relay
25104         if test "$ol_enable_relay" = mod ; then
25105                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-relay"
25106                 MFLAG=SLAPD_MOD_DYNAMIC
25107         else
25108                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-relay"
25109                 MFLAG=SLAPD_MOD_STATIC
25110         fi
25111         cat >> confdefs.h <<EOF
25112 #define SLAPD_RELAY $MFLAG
25113 EOF
25114
25115 fi
25116
25117 if test "$ol_enable_shell" != no ; then
25118         if test "$ol_link_thread" != no ; then
25119                 echo "configure: warning: Use of --without-threads is recommended with back-shell" 1>&2
25120         fi
25121         BUILD_SLAPD=yes
25122         BUILD_SHELL=$ol_enable_shell
25123         if test "$ol_enable_shell" = mod ; then
25124                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-shell"
25125                 MFLAG=SLAPD_MOD_DYNAMIC
25126         else
25127                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-shell"
25128                 MFLAG=SLAPD_MOD_STATIC
25129         fi
25130         cat >> confdefs.h <<EOF
25131 #define SLAPD_SHELL $MFLAG
25132 EOF
25133
25134 fi
25135
25136 if test "$ol_link_sql" != no ; then
25137         BUILD_SLAPD=yes
25138         BUILD_SQL=$ol_enable_sql
25139         if test "$ol_enable_sql" = mod; then
25140                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-sql"
25141                 MFLAG=SLAPD_MOD_DYNAMIC
25142         else
25143                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-sql"
25144                 MFLAG=SLAPD_MOD_STATIC
25145         fi
25146         cat >> confdefs.h <<EOF
25147 #define SLAPD_SQL $MFLAG
25148 EOF
25149
25150 fi
25151
25152 if test "$ol_enable_accesslog" != no ; then
25153         BUILD_ACCESSLOG=$ol_enable_accesslog
25154         if test "$ol_enable_accesslog" = mod ; then
25155                 MFLAG=SLAPD_MOD_DYNAMIC
25156                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS accesslog.la"
25157         else
25158                 MFLAG=SLAPD_MOD_STATIC
25159                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS accesslog.o"
25160         fi
25161         cat >> confdefs.h <<EOF
25162 #define SLAPD_OVER_ACCESSLOG $MFLAG
25163 EOF
25164
25165 fi
25166
25167 if test "$ol_enable_denyop" != no ; then
25168         BUILD_DENYOP=$ol_enable_denyop
25169         if test "$ol_enable_denyop" = mod ; then
25170                 MFLAG=SLAPD_MOD_DYNAMIC
25171                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS denyop.la"
25172         else
25173                 MFLAG=SLAPD_MOD_STATIC
25174                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS denyop.o"
25175         fi
25176         cat >> confdefs.h <<EOF
25177 #define SLAPD_OVER_DENYOP $MFLAG
25178 EOF
25179
25180 fi
25181
25182 if test "$ol_enable_dyngroup" != no ; then
25183         BUILD_DYNGROUP=$ol_enable_dyngroup
25184         if test "$ol_enable_dyngroup" = mod ; then
25185                 MFLAG=SLAPD_MOD_DYNAMIC
25186                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS dyngroup.la"
25187         else
25188                 MFLAG=SLAPD_MOD_STATIC
25189                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS dyngroup.o"
25190         fi
25191         cat >> confdefs.h <<EOF
25192 #define SLAPD_OVER_DYNGROUP $MFLAG
25193 EOF
25194
25195 fi
25196
25197 if test "$ol_enable_dynlist" != no ; then
25198         BUILD_DYNLIST=$ol_enable_dynlist
25199         if test "$ol_enable_dynlist" = mod ; then
25200                 MFLAG=SLAPD_MOD_DYNAMIC
25201                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS dynlist.la"
25202         else
25203                 MFLAG=SLAPD_MOD_STATIC
25204                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS dynlist.o"
25205         fi
25206         cat >> confdefs.h <<EOF
25207 #define SLAPD_OVER_DYNLIST $MFLAG
25208 EOF
25209
25210 fi
25211
25212 if test "$ol_enable_glue" != no ; then
25213         BUILD_GLUE=$ol_enable_glue
25214         if test "$ol_enable_glue" = mod ; then
25215                 MFLAG=SLAPD_MOD_DYNAMIC
25216                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS glue.la"
25217         else
25218                 MFLAG=SLAPD_MOD_STATIC
25219                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS glue.o"
25220         fi
25221         cat >> confdefs.h <<EOF
25222 #define SLAPD_OVER_GLUE $MFLAG
25223 EOF
25224
25225 fi
25226
25227 if test "$ol_enable_lastmod" != no ; then
25228         BUILD_LASTMOD=$ol_enable_lastmod
25229         if test "$ol_enable_lastmod" = mod ; then
25230                 MFLAG=SLAPD_MOD_DYNAMIC
25231                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS lastmod.la"
25232         else
25233                 MFLAG=SLAPD_MOD_STATIC
25234                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS lastmod.o"
25235         fi
25236         cat >> confdefs.h <<EOF
25237 #define SLAPD_OVER_LASTMOD $MFLAG
25238 EOF
25239
25240 fi
25241
25242 if test "$ol_enable_ppolicy" != no ; then
25243         BUILD_PPOLICY=$ol_enable_ppolicy
25244         if test "$ol_enable_ppolicy" = mod ; then
25245                 MFLAG=SLAPD_MOD_DYNAMIC
25246                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS ppolicy.la"
25247         else
25248                 MFLAG=SLAPD_MOD_STATIC
25249                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS ppolicy.o"
25250         fi
25251         cat >> confdefs.h <<EOF
25252 #define SLAPD_OVER_PPOLICY $MFLAG
25253 EOF
25254
25255 fi
25256
25257 if test "$ol_enable_proxycache" != no ; then
25258         BUILD_PROXYCACHE=$ol_enable_proxycache
25259         if test "$ol_enable_proxycache" = mod ; then
25260                 MFLAG=SLAPD_MOD_DYNAMIC
25261                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS pcache.la"
25262         else
25263                 MFLAG=SLAPD_MOD_STATIC
25264                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS pcache.o"
25265         fi
25266         cat >> confdefs.h <<EOF
25267 #define SLAPD_OVER_PROXYCACHE $MFLAG
25268 EOF
25269
25270 fi
25271
25272 if test "$ol_enable_refint" != no ; then
25273         BUILD_REFINT=$ol_enable_refint
25274         if test "$ol_enable_refint" = mod ; then
25275                 MFLAG=SLAPD_MOD_DYNAMIC
25276                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS refint.la"
25277         else
25278                 MFLAG=SLAPD_MOD_STATIC
25279                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS refint.o"
25280         fi
25281         cat >> confdefs.h <<EOF
25282 #define SLAPD_OVER_REFINT $MFLAG
25283 EOF
25284
25285 fi
25286
25287 if test "$ol_enable_retcode" != no ; then
25288         BUILD_RETCODE=$ol_enable_retcode
25289         if test "$ol_enable_retcode" = mod ; then
25290                 MFLAG=SLAPD_MOD_DYNAMIC
25291                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS retcode.la"
25292         else
25293                 MFLAG=SLAPD_MOD_STATIC
25294                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS retcode.o"
25295         fi
25296         cat >> confdefs.h <<EOF
25297 #define SLAPD_OVER_RETCODE $MFLAG
25298 EOF
25299
25300 fi
25301
25302 if test "$ol_enable_rwm" != no ; then
25303         BUILD_REWRITE=yes
25304         BUILD_RWM=$ol_enable_rwm
25305         if test "$ol_enable_rwm" = mod ; then
25306                 MFLAG=SLAPD_MOD_DYNAMIC
25307                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS rwm.la"
25308         else
25309                 MFLAG=SLAPD_MOD_STATIC
25310                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS rwm_x.o"
25311         fi
25312         cat >> confdefs.h <<EOF
25313 #define SLAPD_OVER_RWM $MFLAG
25314 EOF
25315
25316 fi
25317
25318 if test "$ol_enable_syncprov" != no ; then
25319         BUILD_SYNCPROV=$ol_enable_syncprov
25320         if test "$ol_enable_syncprov" = mod ; then
25321                 MFLAG=SLAPD_MOD_DYNAMIC
25322                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS syncprov.la"
25323         else
25324                 MFLAG=SLAPD_MOD_STATIC
25325                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS syncprov.o"
25326         fi
25327         cat >> confdefs.h <<EOF
25328 #define SLAPD_OVER_SYNCPROV $MFLAG
25329 EOF
25330
25331 fi
25332
25333 if test "$ol_enable_translucent" != no ; then
25334         BUILD_TRANSLUCENT=$ol_enable_translucent
25335         if test "$ol_enable_translucent" = mod ; then
25336                 MFLAG=SLAPD_MOD_DYNAMIC
25337                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS translucent.la"
25338         else
25339                 MFLAG=SLAPD_MOD_STATIC
25340                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS translucent.o"
25341         fi
25342         cat >> confdefs.h <<EOF
25343 #define SLAPD_OVER_TRANSLUCENT $MFLAG
25344 EOF
25345
25346 fi
25347
25348 if test "$ol_enable_unique" != no ; then
25349         BUILD_UNIQUE=$ol_enable_unique
25350         if test "$ol_enable_unique" = mod ; then
25351                 MFLAG=SLAPD_MOD_DYNAMIC
25352                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS unique.la"
25353         else
25354                 MFLAG=SLAPD_MOD_STATIC
25355                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS unique.o"
25356         fi
25357         cat >> confdefs.h <<EOF
25358 #define SLAPD_OVER_UNIQUE $MFLAG
25359 EOF
25360
25361 fi
25362
25363 if test "$ol_enable_slurpd" != no -a "$ol_link_threads" != no -a \
25364         $BUILD_SLAPD = yes ; then
25365         BUILD_SLURPD=yes
25366 fi
25367
25368 if test "$ol_enable_rewrite" != no ; then
25369         cat >> confdefs.h <<\EOF
25370 #define ENABLE_REWRITE 1
25371 EOF
25372
25373         BUILD_REWRITE=yes
25374 fi
25375
25376 if test "$ol_enable_slapi" != no ; then
25377         cat >> confdefs.h <<\EOF
25378 #define ENABLE_SLAPI 1
25379 EOF
25380
25381         BUILD_SLAPI=yes
25382         SLAPD_SLAPI_DEPEND=libslapi.a
25383 fi
25384
25385
25386
25387 if test "$ac_cv_mingw32" = yes ; then
25388         PLAT=NT
25389         SLAPD_MODULES_LDFLAGS=
25390 else
25391         PLAT=UNIX
25392 fi
25393
25394
25395
25396
25397
25398
25399
25400
25401
25402   
25403   
25404   
25405   
25406   
25407   
25408   
25409   
25410   
25411   
25412   
25413   
25414   
25415   
25416   
25417   
25418   
25419   
25420   
25421   
25422   
25423   
25424   
25425   
25426   
25427   
25428   
25429   
25430   
25431
25432
25433
25434
25435
25436
25437
25438
25439
25440
25441
25442
25443
25444
25445
25446
25447
25448
25449
25450
25451
25452
25453
25454
25455
25456
25457
25458
25459
25460
25461
25462
25463
25464
25465
25466
25467
25468
25469
25470
25471 # Check whether --with-xxinstall or --without-xxinstall was given.
25472 if test "${with_xxinstall+set}" = set; then
25473   withval="$with_xxinstall"
25474   :
25475 fi
25476
25477
25478
25479 trap '' 1 2 15
25480
25481 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
25482
25483 test "x$prefix" = xNONE && prefix=$ac_default_prefix
25484 # Let make expand exec_prefix.
25485 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
25486
25487 # Any assignment to VPATH causes Sun make to only execute
25488 # the first set of double-colon rules, so remove it if not needed.
25489 # If there is a colon in the path, we need to keep it.
25490 if test "x$srcdir" = x.; then
25491   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
25492 fi
25493
25494 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
25495
25496 DEFS=-DHAVE_CONFIG_H
25497
25498 # Without the "./", some shells look in PATH for config.status.
25499 : ${CONFIG_STATUS=./config.status}
25500
25501 echo creating $CONFIG_STATUS
25502 rm -f $CONFIG_STATUS
25503 cat > $CONFIG_STATUS <<EOF
25504 #! /bin/sh
25505 # Generated automatically by configure.
25506 # Run this file to recreate the current configuration.
25507 # This directory was configured as follows,
25508 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
25509 #
25510 # $0 $ac_configure_args
25511 #
25512 # Compiler output produced by configure, useful for debugging
25513 # configure, is in ./config.log if it exists.
25514
25515 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
25516 for ac_option
25517 do
25518   case "\$ac_option" in
25519   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
25520     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
25521     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
25522   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
25523     echo "$CONFIG_STATUS generated by autoconf version 2.13.1"
25524     exit 0 ;;
25525   -help | --help | --hel | --he | --h)
25526     echo "\$ac_cs_usage"; exit 0 ;;
25527   *) echo "\$ac_cs_usage"; exit 1 ;;
25528   esac
25529 done
25530
25531 ac_given_srcdir=$srcdir
25532 ac_given_INSTALL="$INSTALL"
25533
25534 trap 'rm -fr `echo "\
25535 Makefile:build/top.mk:Makefile.in:build/dir.mk \
25536 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
25537 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
25538 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
25539 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
25540 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
25541 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
25542 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
25543 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
25544 include/Makefile:build/top.mk:include/Makefile.in \
25545 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
25546 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
25547 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
25548 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
25549 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk  \
25550 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
25551 libraries/librewrite/Makefile:build/top.mk:libraries/librewrite/Makefile.in:build/lib.mk:build/lib-shared.mk \
25552 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
25553 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
25554 servers/slapd/back-bdb/Makefile:build/top.mk:servers/slapd/back-bdb/Makefile.in:build/mod.mk \
25555 servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
25556 servers/slapd/back-hdb/Makefile:build/top.mk:servers/slapd/back-hdb/Makefile.in:build/mod.mk \
25557 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
25558 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
25559 servers/slapd/back-ldif/Makefile:build/top.mk:servers/slapd/back-ldif/Makefile.in:build/mod.mk \
25560 servers/slapd/back-meta/Makefile:build/top.mk:servers/slapd/back-meta/Makefile.in:build/mod.mk \
25561 servers/slapd/back-monitor/Makefile:build/top.mk:servers/slapd/back-monitor/Makefile.in:build/mod.mk \
25562 servers/slapd/back-null/Makefile:build/top.mk:servers/slapd/back-null/Makefile.in:build/mod.mk \
25563 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
25564 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
25565 servers/slapd/back-relay/Makefile:build/top.mk:servers/slapd/back-relay/Makefile.in:build/mod.mk \
25566 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
25567 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
25568 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
25569 servers/slapd/slapi/Makefile:build/top.mk:servers/slapd/slapi/Makefile.in:build/lib.mk:build/lib-shared.mk  \
25570 servers/slapd/overlays/Makefile:build/top.mk:servers/slapd/overlays/Makefile.in:build/lib.mk \
25571 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
25572 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
25573 tests/run \
25574 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
25575  include/portable.h include/ldap_features.h include/lber_types.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
25576 EOF
25577 cat >> $CONFIG_STATUS <<EOF
25578
25579 # Protect against being on the right side of a sed subst in config.status.
25580 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
25581  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
25582 $ac_vpsub
25583 $extrasub
25584 s%@SHELL@%$SHELL%g
25585 s%@CFLAGS@%$CFLAGS%g
25586 s%@CPPFLAGS@%$CPPFLAGS%g
25587 s%@CXXFLAGS@%$CXXFLAGS%g
25588 s%@FFLAGS@%$FFLAGS%g
25589 s%@DEFS@%$DEFS%g
25590 s%@LDFLAGS@%$LDFLAGS%g
25591 s%@LIBS@%$LIBS%g
25592 s%@exec_prefix@%$exec_prefix%g
25593 s%@prefix@%$prefix%g
25594 s%@program_transform_name@%$program_transform_name%g
25595 s%@bindir@%$bindir%g
25596 s%@sbindir@%$sbindir%g
25597 s%@libexecdir@%$libexecdir%g
25598 s%@datadir@%$datadir%g
25599 s%@sysconfdir@%$sysconfdir%g
25600 s%@sharedstatedir@%$sharedstatedir%g
25601 s%@localstatedir@%$localstatedir%g
25602 s%@libdir@%$libdir%g
25603 s%@includedir@%$includedir%g
25604 s%@oldincludedir@%$oldincludedir%g
25605 s%@infodir@%$infodir%g
25606 s%@mandir@%$mandir%g
25607 s%@host@%$host%g
25608 s%@host_alias@%$host_alias%g
25609 s%@host_cpu@%$host_cpu%g
25610 s%@host_vendor@%$host_vendor%g
25611 s%@host_os@%$host_os%g
25612 s%@target@%$target%g
25613 s%@target_alias@%$target_alias%g
25614 s%@target_cpu@%$target_cpu%g
25615 s%@target_vendor@%$target_vendor%g
25616 s%@target_os@%$target_os%g
25617 s%@build@%$build%g
25618 s%@build_alias@%$build_alias%g
25619 s%@build_cpu@%$build_cpu%g
25620 s%@build_vendor@%$build_vendor%g
25621 s%@build_os@%$build_os%g
25622 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
25623 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
25624 s%@INSTALL_DATA@%$INSTALL_DATA%g
25625 s%@PACKAGE@%$PACKAGE%g
25626 s%@VERSION@%$VERSION%g
25627 s%@ACLOCAL@%$ACLOCAL%g
25628 s%@AUTOCONF@%$AUTOCONF%g
25629 s%@AUTOMAKE@%$AUTOMAKE%g
25630 s%@AUTOHEADER@%$AUTOHEADER%g
25631 s%@MAKEINFO@%$MAKEINFO%g
25632 s%@install_sh@%$install_sh%g
25633 s%@AMTAR@%$AMTAR%g
25634 s%@AWK@%$AWK%g
25635 s%@AMTARFLAGS@%$AMTARFLAGS%g
25636 s%@SET_MAKE@%$SET_MAKE%g
25637 s%@OPENLDAP_LIBRELEASE@%$OPENLDAP_LIBRELEASE%g
25638 s%@OPENLDAP_LIBVERSION@%$OPENLDAP_LIBVERSION%g
25639 s%@OPENLDAP_RELEASE_DATE@%$OPENLDAP_RELEASE_DATE%g
25640 s%@top_builddir@%$top_builddir%g
25641 s%@ldap_subdir@%$ldap_subdir%g
25642 s%@CC@%$CC%g
25643 s%@AR@%$AR%g
25644 s%@LN_S@%$LN_S%g
25645 s%@OBJEXT@%$OBJEXT%g
25646 s%@EXEEXT@%$EXEEXT%g
25647 s%@ECHO@%$ECHO%g
25648 s%@RANLIB@%$RANLIB%g
25649 s%@STRIP@%$STRIP%g
25650 s%@DLLTOOL@%$DLLTOOL%g
25651 s%@AS@%$AS%g
25652 s%@OBJDUMP@%$OBJDUMP%g
25653 s%@CPP@%$CPP%g
25654 s%@LIBTOOL@%$LIBTOOL%g
25655 s%@PERLBIN@%$PERLBIN%g
25656 s%@OL_MKDEP@%$OL_MKDEP%g
25657 s%@OL_MKDEP_FLAGS@%$OL_MKDEP_FLAGS%g
25658 s%@LTSTATIC@%$LTSTATIC%g
25659 s%@LIBOBJS@%$LIBOBJS%g
25660 s%@LIBSRCS@%$LIBSRCS%g
25661 s%@PLAT@%$PLAT%g
25662 s%@WITH_SASL@%$WITH_SASL%g
25663 s%@WITH_TLS@%$WITH_TLS%g
25664 s%@WITH_MODULES_ENABLED@%$WITH_MODULES_ENABLED%g
25665 s%@BUILD_LIBS_DYNAMIC@%$BUILD_LIBS_DYNAMIC%g
25666 s%@BUILD_SLAPD@%$BUILD_SLAPD%g
25667 s%@BUILD_SLAPI@%$BUILD_SLAPI%g
25668 s%@SLAPD_SLAPI_DEPEND@%$SLAPD_SLAPI_DEPEND%g
25669 s%@BUILD_BDB@%$BUILD_BDB%g
25670 s%@BUILD_DNSSRV@%$BUILD_DNSSRV%g
25671 s%@BUILD_HDB@%$BUILD_HDB%g
25672 s%@BUILD_LDAP@%$BUILD_LDAP%g
25673 s%@BUILD_LDBM@%$BUILD_LDBM%g
25674 s%@BUILD_META@%$BUILD_META%g
25675 s%@BUILD_MONITOR@%$BUILD_MONITOR%g
25676 s%@BUILD_NULL@%$BUILD_NULL%g
25677 s%@BUILD_PASSWD@%$BUILD_PASSWD%g
25678 s%@BUILD_RELAY@%$BUILD_RELAY%g
25679 s%@BUILD_PERL@%$BUILD_PERL%g
25680 s%@BUILD_SHELL@%$BUILD_SHELL%g
25681 s%@BUILD_SQL@%$BUILD_SQL%g
25682 s%@BUILD_ACCESSLOG@%$BUILD_ACCESSLOG%g
25683 s%@BUILD_DENYOP@%$BUILD_DENYOP%g
25684 s%@BUILD_DYNGROUP@%$BUILD_DYNGROUP%g
25685 s%@BUILD_DYNLIST@%$BUILD_DYNLIST%g
25686 s%@BUILD_GLUE@%$BUILD_GLUE%g
25687 s%@BUILD_LASTMOD@%$BUILD_LASTMOD%g
25688 s%@BUILD_PPOLICY@%$BUILD_PPOLICY%g
25689 s%@BUILD_PROXYCACHE@%$BUILD_PROXYCACHE%g
25690 s%@BUILD_REFINT@%$BUILD_REFINT%g
25691 s%@BUILD_RETCODE@%$BUILD_RETCODE%g
25692 s%@BUILD_RWM@%$BUILD_RWM%g
25693 s%@BUILD_SYNCPROV@%$BUILD_SYNCPROV%g
25694 s%@BUILD_TRANSLUCENT@%$BUILD_TRANSLUCENT%g
25695 s%@BUILD_UNIQUE@%$BUILD_UNIQUE%g
25696 s%@BUILD_SLURPD@%$BUILD_SLURPD%g
25697 s%@LDAP_LIBS@%$LDAP_LIBS%g
25698 s%@SLAPD_LIBS@%$SLAPD_LIBS%g
25699 s%@SLURPD_LIBS@%$SLURPD_LIBS%g
25700 s%@LDBM_LIBS@%$LDBM_LIBS%g
25701 s%@LTHREAD_LIBS@%$LTHREAD_LIBS%g
25702 s%@LUTIL_LIBS@%$LUTIL_LIBS%g
25703 s%@WRAP_LIBS@%$WRAP_LIBS%g
25704 s%@SLAPD_MODULES_CPPFLAGS@%$SLAPD_MODULES_CPPFLAGS%g
25705 s%@SLAPD_MODULES_LDFLAGS@%$SLAPD_MODULES_LDFLAGS%g
25706 s%@SLAPD_NO_STATIC@%$SLAPD_NO_STATIC%g
25707 s%@SLAPD_STATIC_BACKENDS@%$SLAPD_STATIC_BACKENDS%g
25708 s%@SLAPD_DYNAMIC_BACKENDS@%$SLAPD_DYNAMIC_BACKENDS%g
25709 s%@SLAPD_STATIC_OVERLAYS@%$SLAPD_STATIC_OVERLAYS%g
25710 s%@SLAPD_DYNAMIC_OVERLAYS@%$SLAPD_DYNAMIC_OVERLAYS%g
25711 s%@PERL_CPPFLAGS@%$PERL_CPPFLAGS%g
25712 s%@SLAPD_PERL_LDFLAGS@%$SLAPD_PERL_LDFLAGS%g
25713 s%@MOD_PERL_LDFLAGS@%$MOD_PERL_LDFLAGS%g
25714 s%@KRB4_LIBS@%$KRB4_LIBS%g
25715 s%@KRB5_LIBS@%$KRB5_LIBS%g
25716 s%@SASL_LIBS@%$SASL_LIBS%g
25717 s%@TLS_LIBS@%$TLS_LIBS%g
25718 s%@MODULES_LIBS@%$MODULES_LIBS%g
25719 s%@SLAPI_LIBS@%$SLAPI_LIBS%g
25720 s%@LIBSLAPI@%$LIBSLAPI%g
25721 s%@LIBSLAPITOOLS@%$LIBSLAPITOOLS%g
25722 s%@AUTH_LIBS@%$AUTH_LIBS%g
25723 s%@SLAPD_SLP_LIBS@%$SLAPD_SLP_LIBS%g
25724 s%@SLAPD_GMP_LIBS@%$SLAPD_GMP_LIBS%g
25725 s%@SLAPD_SQL_LDFLAGS@%$SLAPD_SQL_LDFLAGS%g
25726 s%@SLAPD_SQL_LIBS@%$SLAPD_SQL_LIBS%g
25727 s%@SLAPD_SQL_INCLUDES@%$SLAPD_SQL_INCLUDES%g
25728
25729 CEOF
25730 EOF
25731
25732 cat >> $CONFIG_STATUS <<\EOF
25733
25734 # Split the substitutions into bite-sized pieces for seds with
25735 # small command number limits, like on Digital OSF/1 and HP-UX.
25736 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
25737 ac_file=1 # Number of current file.
25738 ac_beg=1 # First line for current file.
25739 ac_end=$ac_max_sed_cmds # Line after last line for current file.
25740 ac_more_lines=:
25741 ac_sed_cmds=""
25742 while $ac_more_lines; do
25743   if test $ac_beg -gt 1; then
25744     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
25745   else
25746     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
25747   fi
25748   if test ! -s conftest.s$ac_file; then
25749     ac_more_lines=false
25750     rm -f conftest.s$ac_file
25751   else
25752     if test -z "$ac_sed_cmds"; then
25753       ac_sed_cmds="sed -f conftest.s$ac_file"
25754     else
25755       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
25756     fi
25757     ac_file=`expr $ac_file + 1`
25758     ac_beg=$ac_end
25759     ac_end=`expr $ac_end + $ac_max_sed_cmds`
25760   fi
25761 done
25762 if test -z "$ac_sed_cmds"; then
25763   ac_sed_cmds=cat
25764 fi
25765 EOF
25766
25767 cat >> $CONFIG_STATUS <<EOF
25768
25769 CONFIG_FILES=\${CONFIG_FILES-"\
25770 Makefile:build/top.mk:Makefile.in:build/dir.mk \
25771 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
25772 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
25773 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
25774 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
25775 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
25776 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
25777 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
25778 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
25779 include/Makefile:build/top.mk:include/Makefile.in \
25780 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
25781 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
25782 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
25783 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
25784 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk  \
25785 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
25786 libraries/librewrite/Makefile:build/top.mk:libraries/librewrite/Makefile.in:build/lib.mk:build/lib-shared.mk \
25787 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
25788 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
25789 servers/slapd/back-bdb/Makefile:build/top.mk:servers/slapd/back-bdb/Makefile.in:build/mod.mk \
25790 servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
25791 servers/slapd/back-hdb/Makefile:build/top.mk:servers/slapd/back-hdb/Makefile.in:build/mod.mk \
25792 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
25793 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
25794 servers/slapd/back-ldif/Makefile:build/top.mk:servers/slapd/back-ldif/Makefile.in:build/mod.mk \
25795 servers/slapd/back-meta/Makefile:build/top.mk:servers/slapd/back-meta/Makefile.in:build/mod.mk \
25796 servers/slapd/back-monitor/Makefile:build/top.mk:servers/slapd/back-monitor/Makefile.in:build/mod.mk \
25797 servers/slapd/back-null/Makefile:build/top.mk:servers/slapd/back-null/Makefile.in:build/mod.mk \
25798 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
25799 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
25800 servers/slapd/back-relay/Makefile:build/top.mk:servers/slapd/back-relay/Makefile.in:build/mod.mk \
25801 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
25802 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
25803 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
25804 servers/slapd/slapi/Makefile:build/top.mk:servers/slapd/slapi/Makefile.in:build/lib.mk:build/lib-shared.mk  \
25805 servers/slapd/overlays/Makefile:build/top.mk:servers/slapd/overlays/Makefile.in:build/lib.mk \
25806 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
25807 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
25808 tests/run \
25809 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
25810 "}
25811 EOF
25812 cat >> $CONFIG_STATUS <<\EOF
25813 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
25814   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
25815   case "$ac_file" in
25816   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
25817        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
25818   *) ac_file_in="${ac_file}.in" ;;
25819   esac
25820
25821   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
25822
25823   # Remove last slash and all that follows it.  Not all systems have dirname.
25824   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
25825   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
25826     # The file is in a subdirectory.
25827     test ! -d "$ac_dir" && mkdir "$ac_dir"
25828     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
25829     # A "../" for each directory in $ac_dir_suffix.
25830     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
25831   else
25832     ac_dir_suffix= ac_dots=
25833   fi
25834
25835   case "$ac_given_srcdir" in
25836   .)  srcdir=.
25837       if test -z "$ac_dots"; then top_srcdir=.
25838       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
25839   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
25840   *) # Relative path.
25841     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
25842     top_srcdir="$ac_dots$ac_given_srcdir" ;;
25843   esac
25844
25845   case "$ac_given_INSTALL" in
25846   [/$]*) INSTALL="$ac_given_INSTALL" ;;
25847   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
25848   esac
25849
25850   echo creating "$ac_file"
25851   rm -f "$ac_file"
25852   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
25853   case "$ac_file" in
25854   *[Mm]akefile*) ac_comsub="1i\\
25855 # $configure_input" ;;
25856   *) ac_comsub= ;;
25857   esac
25858
25859   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
25860   sed -e "$ac_comsub
25861 s%@configure_input@%$configure_input%g
25862 s%@srcdir@%$srcdir%g
25863 s%@top_srcdir@%$top_srcdir%g
25864 s%@INSTALL@%$INSTALL%g
25865 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
25866 fi; done
25867 rm -f conftest.s*
25868
25869 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
25870 # NAME is the cpp macro being defined and VALUE is the value it is being given.
25871 #
25872 # ac_d sets the value in "#define NAME VALUE" lines.
25873 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
25874 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
25875 ac_dC='\3'
25876 ac_dD='%g'
25877 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
25878 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
25879 ac_uB='\([      ]\)%\1#\2define\3'
25880 ac_uC=' '
25881 ac_uD='\4%g'
25882 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
25883 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
25884 ac_eB='$%\1#\2define\3'
25885 ac_eC=' '
25886 ac_eD='%g'
25887
25888 if test "${CONFIG_HEADERS+set}" != set; then
25889 EOF
25890 cat >> $CONFIG_STATUS <<EOF
25891   CONFIG_HEADERS="include/portable.h include/ldap_features.h include/lber_types.h"
25892 EOF
25893 cat >> $CONFIG_STATUS <<\EOF
25894 fi
25895 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
25896   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
25897   case "$ac_file" in
25898   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
25899        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
25900   *) ac_file_in="${ac_file}.in" ;;
25901   esac
25902
25903   echo creating $ac_file
25904
25905   rm -f conftest.frag conftest.in conftest.out
25906   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
25907   cat $ac_file_inputs > conftest.in
25908
25909 EOF
25910
25911 # Transform confdefs.h into a sed script conftest.vals that substitutes
25912 # the proper values into config.h.in to produce config.h.  And first:
25913 # Protect against being on the right side of a sed subst in config.status.
25914 # Protect against being in an unquoted here document in config.status.
25915 rm -f conftest.vals
25916 cat > conftest.hdr <<\EOF
25917 s/[\\&%]/\\&/g
25918 s%[\\$`]%\\&%g
25919 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
25920 s%ac_d%ac_u%gp
25921 s%ac_u%ac_e%gp
25922 EOF
25923 sed -n -f conftest.hdr confdefs.h > conftest.vals
25924 rm -f conftest.hdr
25925
25926 # This sed command replaces #undef with comments.  This is necessary, for
25927 # example, in the case of _POSIX_SOURCE, which is predefined and required
25928 # on some systems where configure will not decide to define it.
25929 cat >> conftest.vals <<\EOF
25930 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
25931 EOF
25932
25933 # Break up conftest.vals because some shells have a limit on
25934 # the size of here documents, and old seds have small limits too.
25935
25936 rm -f conftest.tail
25937 while :
25938 do
25939   ac_lines=`grep -c . conftest.vals`
25940   # grep -c gives empty output for an empty file on some AIX systems.
25941   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
25942   # Write a limited-size here document to conftest.frag.
25943   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
25944   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
25945   echo 'CEOF
25946   sed -f conftest.frag conftest.in > conftest.out
25947   rm -f conftest.in
25948   mv conftest.out conftest.in
25949 ' >> $CONFIG_STATUS
25950   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
25951   rm -f conftest.vals
25952   mv conftest.tail conftest.vals
25953 done
25954 rm -f conftest.vals
25955
25956 cat >> $CONFIG_STATUS <<\EOF
25957   rm -f conftest.frag conftest.h
25958   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
25959   cat conftest.in >> conftest.h
25960   rm -f conftest.in
25961   if cmp -s $ac_file conftest.h 2>/dev/null; then
25962     echo "$ac_file is unchanged"
25963     rm -f conftest.h
25964   else
25965     # Remove last slash and all that follows it.  Not all systems have dirname.
25966       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
25967       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
25968       # The file is in a subdirectory.
25969       test ! -d "$ac_dir" && mkdir "$ac_dir"
25970     fi
25971     rm -f $ac_file
25972     mv conftest.h $ac_file
25973   fi
25974 fi; done
25975
25976 EOF
25977 cat >> $CONFIG_STATUS <<EOF
25978 STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS"
25979 EOF
25980 cat >> $CONFIG_STATUS <<\EOF
25981
25982 chmod +x tests/run
25983 date > stamp-h
25984 BACKENDSC="servers/slapd/backends.c"
25985 echo "Making $BACKENDSC"
25986 rm -f $BACKENDSC
25987 cat > $BACKENDSC << ENDX
25988 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
25989  *
25990  * Copyright 1998-2005 The OpenLDAP Foundation.
25991  * All rights reserved.
25992  *
25993  * Redistribution and use in source and binary forms, with or without
25994  * modification, are permitted only as authorized by the OpenLDAP
25995  * Public License.
25996  *
25997  * A copy of this license is available in the file LICENSE in the
25998  * top-level directory of the distribution or, alternatively, at
25999  * <http://www.OpenLDAP.org/license.html>.
26000  */
26001 /* This file is automatically generated by configure; please do not edit. */
26002
26003 #include "portable.h"
26004 #include "slap.h"
26005
26006 ENDX
26007 if test "${STATIC_BACKENDS}"; then
26008         for b in config ${STATIC_BACKENDS}; do
26009                 bb=`echo "${b}" | sed -e 's/back-//'`
26010                 cat >> $BACKENDSC << ENDX
26011 extern BI_init ${bb}_back_initialize;
26012 ENDX
26013         done
26014
26015         cat >> $BACKENDSC << ENDX
26016
26017 BackendInfo slap_binfo[] = {
26018 ENDX
26019
26020         for b in config ${STATIC_BACKENDS}; do
26021                 bb=`echo "${b}" | sed -e 's/back-//'`
26022                 echo "    Add ${bb} ..."
26023                 cat >> $BACKENDSC << ENDX
26024         { "${bb}", ${bb}_back_initialize },
26025 ENDX
26026         done
26027
26028         cat >> $BACKENDSC << ENDX
26029         { NULL, NULL },
26030 };
26031
26032 /* end of generated file */
26033 ENDX
26034 fi
26035
26036 echo Please run \"make depend\" to build dependencies
26037
26038 exit 0
26039 EOF
26040 chmod +x $CONFIG_STATUS
26041 rm -fr confdefs* $ac_clean_files
26042 test "$no_create" = yes || $SHELL $CONFIG_STATUS || exit 1
26043