]> git.sur5r.net Git - openldap/blob - configure
Silence "unused static function" warning
[openldap] / configure
1 #! /bin/sh
2 # $OpenLDAP$
3 # from OpenLDAP: pkg/ldap/configure.in,v 1.584 2005/06/19 20:43:00 ando Exp  
4
5 # This work is part of OpenLDAP Software <http://www.openldap.org/>.
6 #
7 # Copyright 1998-2005 The OpenLDAP Foundation.
8 # All rights reserved.
9 #
10 # Redistribution and use in source and binary forms, with or without
11 # modification, are permitted only as authorized by the OpenLDAP
12 # Public License.
13 #
14 # A copy of this license is available in the file LICENSE in the
15 # top-level directory of the distribution or, alternatively, at
16 # <http://www.OpenLDAP.org/license.html>.
17
18 echo "Copyright 1998-2005 The OpenLDAP Foundation. All rights reserved."
19 echo "  Restrictions apply, see COPYRIGHT and LICENSE files."
20
21 # Guess values for system-dependent variables and create Makefiles.
22 # Generated automatically using autoconf version 2.13.1 
23 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
24 #
25 # This configure script is free software; the Free Software Foundation
26 # gives unlimited permission to copy, distribute and modify it.
27
28 # Defaults:
29 ac_help=
30 ac_default_prefix=/usr/local
31 # Any additions from configure.in:
32 ac_default_prefix=/usr/local
33 ac_help="$ac_help
34   --with-subdir=DIR       change default subdirectory used for installs"
35 ac_help="$ac_help
36   --enable-debug          enable debugging [yes]"
37 ac_help="$ac_help
38   --enable-dynamic        enable linking built binaries with dynamic libs [no]"
39 ac_help="$ac_help
40   --enable-syslog         enable syslog support [auto]"
41 ac_help="$ac_help
42   --enable-proctitle      enable proctitle support [yes]"
43 ac_help="$ac_help
44   --enable-ipv6           enable IPv6 support [auto]"
45 ac_help="$ac_help
46   --enable-local          enable AF_LOCAL (AF_UNIX) socket support [auto]"
47 ac_help="$ac_help
48   --with-cyrus-sasl       with Cyrus SASL support [auto]"
49 ac_help="$ac_help
50   --with-fetch            with fetch(3) URL support [auto]"
51 ac_help="$ac_help
52   --with-threads          with threads [auto]"
53 ac_help="$ac_help
54   --with-tls              with TLS/SSL support [auto]"
55 ac_help="$ac_help
56   --with-yielding-select  with implicitly yielding select [auto]"
57 ac_help="$ac_help
58   --with-multiple-precision
59                           multiple precision support for statistics
60                           auto|bignum|gmp [auto]"
61 ac_help="$ac_help
62
63 SLAPD (Standalone LDAP Daemon) Options:"
64 ac_help="$ac_help
65   --enable-slapd          enable building slapd [yes]"
66 ac_help="$ac_help
67     --enable-aci          enable per-object ACIs (experimental) [no]"
68 ac_help="$ac_help
69     --enable-cleartext    enable cleartext passwords [yes]"
70 ac_help="$ac_help
71     --enable-crypt        enable crypt(3) passwords [no]"
72 ac_help="$ac_help
73     --enable-lmpasswd     enable LAN Manager passwords [no]"
74 ac_help="$ac_help
75     --enable-spasswd      enable (Cyrus) SASL password verification [no]"
76 ac_help="$ac_help
77     --enable-modules      enable dynamic module support [no]"
78 ac_help="$ac_help
79     --enable-rewrite      enable DN rewriting in back-ldap and the rwm overlay [auto]"
80 ac_help="$ac_help
81     --enable-rlookups     enable reverse lookups of client hostnames [no]"
82 ac_help="$ac_help
83     --enable-slapi        enable SLAPI support (experimental) [no]"
84 ac_help="$ac_help
85     --enable-slp          enable SLPv2 support [no]"
86 ac_help="$ac_help
87     --enable-wrappers     enable tcp wrapper support [no]"
88 ac_help="$ac_help
89
90 SLAPD Backend Options:"
91 ac_help="$ac_help
92     --enable-backends     enable all available backends no|yes|mod [no]"
93 ac_help="$ac_help
94     --enable-bdb          enable Berkeley DB backend no|yes|mod [yes]"
95 ac_help="$ac_help
96     --enable-dnssrv       enable dnssrv backend no|yes|mod [no]"
97 ac_help="$ac_help
98     --enable-hdb          enable Hierarchical DB backend no|yes|mod [yes]"
99 ac_help="$ac_help
100     --enable-ldap         enable ldap backend no|yes|mod [no]"
101 ac_help="$ac_help
102     --enable-ldbm         enable ldbm backend no|yes|mod [no]"
103 ac_help="$ac_help
104       --with-ldbm-api     with LDBM API auto|berkeley|bcompat|mdbm|gdbm [auto]"
105 ac_help="$ac_help
106       --with-ldbm-type    use LDBM type auto|btree|hash [auto]"
107 ac_help="$ac_help
108     --enable-meta         enable metadirectory backend no|yes|mod [no]"
109 ac_help="$ac_help
110     --enable-monitor      enable monitor backend no|yes|mod [yes]"
111 ac_help="$ac_help
112     --enable-null         enable null backend no|yes|mod [no]"
113 ac_help="$ac_help
114     --enable-passwd       enable passwd backend no|yes|mod [no]"
115 ac_help="$ac_help
116     --enable-perl         enable perl backend no|yes|mod [no]"
117 ac_help="$ac_help
118     --enable-relay        enable relay backend no|yes|mod [yes]"
119 ac_help="$ac_help
120     --enable-shell        enable shell backend no|yes|mod [no]"
121 ac_help="$ac_help
122     --enable-sql          enable sql backend no|yes|mod [no]"
123 ac_help="$ac_help
124
125 SLAPD Overlay Options:"
126 ac_help="$ac_help
127     --enable-overlays     enable all available overlays no|yes|mod [no]"
128 ac_help="$ac_help
129     --enable-accesslog            In-Directory Access Logging overlay no|yes|mod [no]"
130 ac_help="$ac_help
131     --enable-denyop       Deny Operation overlay no|yes|mod [no]"
132 ac_help="$ac_help
133     --enable-dyngroup     Dynamic Group overlay no|yes|mod [no]"
134 ac_help="$ac_help
135     --enable-dynlist      Dynamic List overlay no|yes|mod [no]"
136 ac_help="$ac_help
137     --enable-glue         Backend Glue overlay no|yes|mod [yes]"
138 ac_help="$ac_help
139     --enable-lastmod      Last Modification overlay no|yes|mod [no]"
140 ac_help="$ac_help
141     --enable-ppolicy      Password Policy overlay no|yes|mod [no]"
142 ac_help="$ac_help
143     --enable-proxycache   Proxy Cache overlay no|yes|mod [no]"
144 ac_help="$ac_help
145     --enable-refint       Referential Integrity overlay no|yes|mod [no]"
146 ac_help="$ac_help
147     --enable-retcode      Return Code testing overlay no|yes|mod [no]"
148 ac_help="$ac_help
149     --enable-rwm          Rewrite/Remap overlay no|yes|mod [no]"
150 ac_help="$ac_help
151     --enable-syncprov     Syncrepl Provider overlay no|yes|mod [yes]"
152 ac_help="$ac_help
153     --enable-translucent  Translucent Proxy overlay no|yes|mod [no]"
154 ac_help="$ac_help
155     --enable-unique       Attribute Uniqueness overlay no|yes|mod [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 else
1942         ol_enable_backends="no"
1943 fi
1944 # end --enable-backends
1945 # OpenLDAP --enable-bdb
1946         # Check whether --enable-bdb or --disable-bdb was given.
1947 if test "${enable_bdb+set}" = set; then
1948   enableval="$enable_bdb"
1949   
1950         ol_arg=invalid
1951         for ol_val in no yes mod ; do
1952                 if test "$enableval" = "$ol_val" ; then
1953                         ol_arg="$ol_val"
1954                 fi
1955         done
1956         if test "$ol_arg" = "invalid" ; then
1957                 { echo "configure: error: bad value $enableval for --enable-bdb" 1>&2; exit 1; }
1958         fi
1959         ol_enable_bdb="$ol_arg"
1960
1961 else
1962         ol_enable_bdb="yes"
1963 fi
1964 # end --enable-bdb
1965 # OpenLDAP --enable-dnssrv
1966         # Check whether --enable-dnssrv or --disable-dnssrv was given.
1967 if test "${enable_dnssrv+set}" = set; then
1968   enableval="$enable_dnssrv"
1969   
1970         ol_arg=invalid
1971         for ol_val in no yes mod ; do
1972                 if test "$enableval" = "$ol_val" ; then
1973                         ol_arg="$ol_val"
1974                 fi
1975         done
1976         if test "$ol_arg" = "invalid" ; then
1977                 { echo "configure: error: bad value $enableval for --enable-dnssrv" 1>&2; exit 1; }
1978         fi
1979         ol_enable_dnssrv="$ol_arg"
1980
1981 else
1982         ol_enable_dnssrv="no"
1983 fi
1984 # end --enable-dnssrv
1985 # OpenLDAP --enable-hdb
1986         # Check whether --enable-hdb or --disable-hdb was given.
1987 if test "${enable_hdb+set}" = set; then
1988   enableval="$enable_hdb"
1989   
1990         ol_arg=invalid
1991         for ol_val in no yes mod ; do
1992                 if test "$enableval" = "$ol_val" ; then
1993                         ol_arg="$ol_val"
1994                 fi
1995         done
1996         if test "$ol_arg" = "invalid" ; then
1997                 { echo "configure: error: bad value $enableval for --enable-hdb" 1>&2; exit 1; }
1998         fi
1999         ol_enable_hdb="$ol_arg"
2000
2001 else
2002         ol_enable_hdb="yes"
2003 fi
2004 # end --enable-hdb
2005 # OpenLDAP --enable-ldap
2006         # Check whether --enable-ldap or --disable-ldap was given.
2007 if test "${enable_ldap+set}" = set; then
2008   enableval="$enable_ldap"
2009   
2010         ol_arg=invalid
2011         for ol_val in no yes mod ; do
2012                 if test "$enableval" = "$ol_val" ; then
2013                         ol_arg="$ol_val"
2014                 fi
2015         done
2016         if test "$ol_arg" = "invalid" ; then
2017                 { echo "configure: error: bad value $enableval for --enable-ldap" 1>&2; exit 1; }
2018         fi
2019         ol_enable_ldap="$ol_arg"
2020
2021 else
2022         ol_enable_ldap="no"
2023 fi
2024 # end --enable-ldap
2025 # OpenLDAP --enable-ldbm
2026         # Check whether --enable-ldbm or --disable-ldbm was given.
2027 if test "${enable_ldbm+set}" = set; then
2028   enableval="$enable_ldbm"
2029   
2030         ol_arg=invalid
2031         for ol_val in no yes mod ; do
2032                 if test "$enableval" = "$ol_val" ; then
2033                         ol_arg="$ol_val"
2034                 fi
2035         done
2036         if test "$ol_arg" = "invalid" ; then
2037                 { echo "configure: error: bad value $enableval for --enable-ldbm" 1>&2; exit 1; }
2038         fi
2039         ol_enable_ldbm="$ol_arg"
2040
2041 else
2042         ol_enable_ldbm="no"
2043 fi
2044 # end --enable-ldbm
2045 # OpenLDAP --with-ldbm_api
2046         # Check whether --with-ldbm_api or --without-ldbm_api was given.
2047 if test "${with_ldbm_api+set}" = set; then
2048   withval="$with_ldbm_api"
2049   
2050         ol_arg=invalid
2051         for ol_val in auto berkeley bcompat mdbm gdbm ; do
2052                 if test "$withval" = "$ol_val" ; then
2053                         ol_arg="$ol_val"
2054                 fi
2055         done
2056         if test "$ol_arg" = "invalid" ; then
2057                 { echo "configure: error: bad value $withval for --with-ldbm_api" 1>&2; exit 1; }
2058         fi
2059         ol_with_ldbm_api="$ol_arg"
2060
2061 else
2062         ol_with_ldbm_api="auto"
2063 fi
2064 # end --with-ldbm_api
2065
2066 # OpenLDAP --with-ldbm_type
2067         # Check whether --with-ldbm_type or --without-ldbm_type was given.
2068 if test "${with_ldbm_type+set}" = set; then
2069   withval="$with_ldbm_type"
2070   
2071         ol_arg=invalid
2072         for ol_val in auto btree hash ; do
2073                 if test "$withval" = "$ol_val" ; then
2074                         ol_arg="$ol_val"
2075                 fi
2076         done
2077         if test "$ol_arg" = "invalid" ; then
2078                 { echo "configure: error: bad value $withval for --with-ldbm_type" 1>&2; exit 1; }
2079         fi
2080         ol_with_ldbm_type="$ol_arg"
2081
2082 else
2083         ol_with_ldbm_type="auto"
2084 fi
2085 # end --with-ldbm_type
2086
2087 # OpenLDAP --enable-meta
2088         # Check whether --enable-meta or --disable-meta was given.
2089 if test "${enable_meta+set}" = set; then
2090   enableval="$enable_meta"
2091   
2092         ol_arg=invalid
2093         for ol_val in no yes mod ; do
2094                 if test "$enableval" = "$ol_val" ; then
2095                         ol_arg="$ol_val"
2096                 fi
2097         done
2098         if test "$ol_arg" = "invalid" ; then
2099                 { echo "configure: error: bad value $enableval for --enable-meta" 1>&2; exit 1; }
2100         fi
2101         ol_enable_meta="$ol_arg"
2102
2103 else
2104         ol_enable_meta="no"
2105 fi
2106 # end --enable-meta
2107 # OpenLDAP --enable-monitor
2108         # Check whether --enable-monitor or --disable-monitor was given.
2109 if test "${enable_monitor+set}" = set; then
2110   enableval="$enable_monitor"
2111   
2112         ol_arg=invalid
2113         for ol_val in no yes mod ; do
2114                 if test "$enableval" = "$ol_val" ; then
2115                         ol_arg="$ol_val"
2116                 fi
2117         done
2118         if test "$ol_arg" = "invalid" ; then
2119                 { echo "configure: error: bad value $enableval for --enable-monitor" 1>&2; exit 1; }
2120         fi
2121         ol_enable_monitor="$ol_arg"
2122
2123 else
2124         ol_enable_monitor="yes"
2125 fi
2126 # end --enable-monitor
2127 # OpenLDAP --enable-null
2128         # Check whether --enable-null or --disable-null was given.
2129 if test "${enable_null+set}" = set; then
2130   enableval="$enable_null"
2131   
2132         ol_arg=invalid
2133         for ol_val in no yes mod ; do
2134                 if test "$enableval" = "$ol_val" ; then
2135                         ol_arg="$ol_val"
2136                 fi
2137         done
2138         if test "$ol_arg" = "invalid" ; then
2139                 { echo "configure: error: bad value $enableval for --enable-null" 1>&2; exit 1; }
2140         fi
2141         ol_enable_null="$ol_arg"
2142
2143 else
2144         ol_enable_null="no"
2145 fi
2146 # end --enable-null
2147 # OpenLDAP --enable-passwd
2148         # Check whether --enable-passwd or --disable-passwd was given.
2149 if test "${enable_passwd+set}" = set; then
2150   enableval="$enable_passwd"
2151   
2152         ol_arg=invalid
2153         for ol_val in no yes mod ; do
2154                 if test "$enableval" = "$ol_val" ; then
2155                         ol_arg="$ol_val"
2156                 fi
2157         done
2158         if test "$ol_arg" = "invalid" ; then
2159                 { echo "configure: error: bad value $enableval for --enable-passwd" 1>&2; exit 1; }
2160         fi
2161         ol_enable_passwd="$ol_arg"
2162
2163 else
2164         ol_enable_passwd="no"
2165 fi
2166 # end --enable-passwd
2167 # OpenLDAP --enable-perl
2168         # Check whether --enable-perl or --disable-perl was given.
2169 if test "${enable_perl+set}" = set; then
2170   enableval="$enable_perl"
2171   
2172         ol_arg=invalid
2173         for ol_val in no yes mod ; do
2174                 if test "$enableval" = "$ol_val" ; then
2175                         ol_arg="$ol_val"
2176                 fi
2177         done
2178         if test "$ol_arg" = "invalid" ; then
2179                 { echo "configure: error: bad value $enableval for --enable-perl" 1>&2; exit 1; }
2180         fi
2181         ol_enable_perl="$ol_arg"
2182
2183 else
2184         ol_enable_perl="no"
2185 fi
2186 # end --enable-perl
2187 # OpenLDAP --enable-relay
2188         # Check whether --enable-relay or --disable-relay was given.
2189 if test "${enable_relay+set}" = set; then
2190   enableval="$enable_relay"
2191   
2192         ol_arg=invalid
2193         for ol_val in no yes mod ; do
2194                 if test "$enableval" = "$ol_val" ; then
2195                         ol_arg="$ol_val"
2196                 fi
2197         done
2198         if test "$ol_arg" = "invalid" ; then
2199                 { echo "configure: error: bad value $enableval for --enable-relay" 1>&2; exit 1; }
2200         fi
2201         ol_enable_relay="$ol_arg"
2202
2203 else
2204         ol_enable_relay="yes"
2205 fi
2206 # end --enable-relay
2207 # OpenLDAP --enable-shell
2208         # Check whether --enable-shell or --disable-shell was given.
2209 if test "${enable_shell+set}" = set; then
2210   enableval="$enable_shell"
2211   
2212         ol_arg=invalid
2213         for ol_val in no yes mod ; do
2214                 if test "$enableval" = "$ol_val" ; then
2215                         ol_arg="$ol_val"
2216                 fi
2217         done
2218         if test "$ol_arg" = "invalid" ; then
2219                 { echo "configure: error: bad value $enableval for --enable-shell" 1>&2; exit 1; }
2220         fi
2221         ol_enable_shell="$ol_arg"
2222
2223 else
2224         ol_enable_shell="no"
2225 fi
2226 # end --enable-shell
2227 # OpenLDAP --enable-sql
2228         # Check whether --enable-sql or --disable-sql was given.
2229 if test "${enable_sql+set}" = set; then
2230   enableval="$enable_sql"
2231   
2232         ol_arg=invalid
2233         for ol_val in no yes mod ; do
2234                 if test "$enableval" = "$ol_val" ; then
2235                         ol_arg="$ol_val"
2236                 fi
2237         done
2238         if test "$ol_arg" = "invalid" ; then
2239                 { echo "configure: error: bad value $enableval for --enable-sql" 1>&2; exit 1; }
2240         fi
2241         ol_enable_sql="$ol_arg"
2242
2243 else
2244         ol_enable_sql="no"
2245 fi
2246 # end --enable-sql
2247
2248 Overlays="accesslog denyop dyngroup dynlist glue lastmod ppolicy proxycache \
2249         refint retcode rwm syncprov translucent unique"
2250
2251 # Check whether --with-xxslapoverlays or --without-xxslapoverlays was given.
2252 if test "${with_xxslapoverlays+set}" = set; then
2253   withval="$with_xxslapoverlays"
2254   :
2255 fi
2256
2257
2258 # OpenLDAP --enable-overlays
2259         # Check whether --enable-overlays or --disable-overlays was given.
2260 if test "${enable_overlays+set}" = set; then
2261   enableval="$enable_overlays"
2262   
2263         ol_arg=invalid
2264         for ol_val in no yes mod ; do
2265                 if test "$enableval" = "$ol_val" ; then
2266                         ol_arg="$ol_val"
2267                 fi
2268         done
2269         if test "$ol_arg" = "invalid" ; then
2270                 { echo "configure: error: bad value $enableval for --enable-overlays" 1>&2; exit 1; }
2271         fi
2272         ol_enable_overlays="$ol_arg"
2273
2274 else
2275         ol_enable_overlays="no"
2276 fi
2277 # end --enable-overlays
2278 # OpenLDAP --enable-accesslog
2279         # Check whether --enable-accesslog or --disable-accesslog was given.
2280 if test "${enable_accesslog+set}" = set; then
2281   enableval="$enable_accesslog"
2282   
2283         ol_arg=invalid
2284         for ol_val in no yes mod ; do
2285                 if test "$enableval" = "$ol_val" ; then
2286                         ol_arg="$ol_val"
2287                 fi
2288         done
2289         if test "$ol_arg" = "invalid" ; then
2290                 { echo "configure: error: bad value $enableval for --enable-accesslog" 1>&2; exit 1; }
2291         fi
2292         ol_enable_accesslog="$ol_arg"
2293
2294 else
2295         ol_enable_accesslog="no"
2296 fi
2297 # end --enable-accesslog
2298
2299 # OpenLDAP --enable-denyop
2300         # Check whether --enable-denyop or --disable-denyop was given.
2301 if test "${enable_denyop+set}" = set; then
2302   enableval="$enable_denyop"
2303   
2304         ol_arg=invalid
2305         for ol_val in no yes mod ; do
2306                 if test "$enableval" = "$ol_val" ; then
2307                         ol_arg="$ol_val"
2308                 fi
2309         done
2310         if test "$ol_arg" = "invalid" ; then
2311                 { echo "configure: error: bad value $enableval for --enable-denyop" 1>&2; exit 1; }
2312         fi
2313         ol_enable_denyop="$ol_arg"
2314
2315 else
2316         ol_enable_denyop="no"
2317 fi
2318 # end --enable-denyop
2319
2320 # OpenLDAP --enable-dyngroup
2321         # Check whether --enable-dyngroup or --disable-dyngroup was given.
2322 if test "${enable_dyngroup+set}" = set; then
2323   enableval="$enable_dyngroup"
2324   
2325         ol_arg=invalid
2326         for ol_val in no yes mod ; do
2327                 if test "$enableval" = "$ol_val" ; then
2328                         ol_arg="$ol_val"
2329                 fi
2330         done
2331         if test "$ol_arg" = "invalid" ; then
2332                 { echo "configure: error: bad value $enableval for --enable-dyngroup" 1>&2; exit 1; }
2333         fi
2334         ol_enable_dyngroup="$ol_arg"
2335
2336 else
2337         ol_enable_dyngroup="no"
2338 fi
2339 # end --enable-dyngroup
2340
2341 # OpenLDAP --enable-dynlist
2342         # Check whether --enable-dynlist or --disable-dynlist was given.
2343 if test "${enable_dynlist+set}" = set; then
2344   enableval="$enable_dynlist"
2345   
2346         ol_arg=invalid
2347         for ol_val in no yes mod ; do
2348                 if test "$enableval" = "$ol_val" ; then
2349                         ol_arg="$ol_val"
2350                 fi
2351         done
2352         if test "$ol_arg" = "invalid" ; then
2353                 { echo "configure: error: bad value $enableval for --enable-dynlist" 1>&2; exit 1; }
2354         fi
2355         ol_enable_dynlist="$ol_arg"
2356
2357 else
2358         ol_enable_dynlist="no"
2359 fi
2360 # end --enable-dynlist
2361
2362 # OpenLDAP --enable-glue
2363         # Check whether --enable-glue or --disable-glue was given.
2364 if test "${enable_glue+set}" = set; then
2365   enableval="$enable_glue"
2366   
2367         ol_arg=invalid
2368         for ol_val in no yes mod ; do
2369                 if test "$enableval" = "$ol_val" ; then
2370                         ol_arg="$ol_val"
2371                 fi
2372         done
2373         if test "$ol_arg" = "invalid" ; then
2374                 { echo "configure: error: bad value $enableval for --enable-glue" 1>&2; exit 1; }
2375         fi
2376         ol_enable_glue="$ol_arg"
2377
2378 else
2379         ol_enable_glue="yes"
2380 fi
2381 # end --enable-glue
2382
2383 # OpenLDAP --enable-lastmod
2384         # Check whether --enable-lastmod or --disable-lastmod was given.
2385 if test "${enable_lastmod+set}" = set; then
2386   enableval="$enable_lastmod"
2387   
2388         ol_arg=invalid
2389         for ol_val in no yes mod ; do
2390                 if test "$enableval" = "$ol_val" ; then
2391                         ol_arg="$ol_val"
2392                 fi
2393         done
2394         if test "$ol_arg" = "invalid" ; then
2395                 { echo "configure: error: bad value $enableval for --enable-lastmod" 1>&2; exit 1; }
2396         fi
2397         ol_enable_lastmod="$ol_arg"
2398
2399 else
2400         ol_enable_lastmod="no"
2401 fi
2402 # end --enable-lastmod
2403
2404 # OpenLDAP --enable-ppolicy
2405         # Check whether --enable-ppolicy or --disable-ppolicy was given.
2406 if test "${enable_ppolicy+set}" = set; then
2407   enableval="$enable_ppolicy"
2408   
2409         ol_arg=invalid
2410         for ol_val in no yes mod ; do
2411                 if test "$enableval" = "$ol_val" ; then
2412                         ol_arg="$ol_val"
2413                 fi
2414         done
2415         if test "$ol_arg" = "invalid" ; then
2416                 { echo "configure: error: bad value $enableval for --enable-ppolicy" 1>&2; exit 1; }
2417         fi
2418         ol_enable_ppolicy="$ol_arg"
2419
2420 else
2421         ol_enable_ppolicy="no"
2422 fi
2423 # end --enable-ppolicy
2424
2425 # OpenLDAP --enable-proxycache
2426         # Check whether --enable-proxycache or --disable-proxycache was given.
2427 if test "${enable_proxycache+set}" = set; then
2428   enableval="$enable_proxycache"
2429   
2430         ol_arg=invalid
2431         for ol_val in no yes mod ; do
2432                 if test "$enableval" = "$ol_val" ; then
2433                         ol_arg="$ol_val"
2434                 fi
2435         done
2436         if test "$ol_arg" = "invalid" ; then
2437                 { echo "configure: error: bad value $enableval for --enable-proxycache" 1>&2; exit 1; }
2438         fi
2439         ol_enable_proxycache="$ol_arg"
2440
2441 else
2442         ol_enable_proxycache="no"
2443 fi
2444 # end --enable-proxycache
2445
2446 # OpenLDAP --enable-refint
2447         # Check whether --enable-refint or --disable-refint was given.
2448 if test "${enable_refint+set}" = set; then
2449   enableval="$enable_refint"
2450   
2451         ol_arg=invalid
2452         for ol_val in no yes mod ; do
2453                 if test "$enableval" = "$ol_val" ; then
2454                         ol_arg="$ol_val"
2455                 fi
2456         done
2457         if test "$ol_arg" = "invalid" ; then
2458                 { echo "configure: error: bad value $enableval for --enable-refint" 1>&2; exit 1; }
2459         fi
2460         ol_enable_refint="$ol_arg"
2461
2462 else
2463         ol_enable_refint="no"
2464 fi
2465 # end --enable-refint
2466
2467 # OpenLDAP --enable-retcode
2468         # Check whether --enable-retcode or --disable-retcode was given.
2469 if test "${enable_retcode+set}" = set; then
2470   enableval="$enable_retcode"
2471   
2472         ol_arg=invalid
2473         for ol_val in no yes mod ; do
2474                 if test "$enableval" = "$ol_val" ; then
2475                         ol_arg="$ol_val"
2476                 fi
2477         done
2478         if test "$ol_arg" = "invalid" ; then
2479                 { echo "configure: error: bad value $enableval for --enable-retcode" 1>&2; exit 1; }
2480         fi
2481         ol_enable_retcode="$ol_arg"
2482
2483 else
2484         ol_enable_retcode="no"
2485 fi
2486 # end --enable-retcode
2487
2488 # OpenLDAP --enable-rwm
2489         # Check whether --enable-rwm or --disable-rwm was given.
2490 if test "${enable_rwm+set}" = set; then
2491   enableval="$enable_rwm"
2492   
2493         ol_arg=invalid
2494         for ol_val in no yes mod ; do
2495                 if test "$enableval" = "$ol_val" ; then
2496                         ol_arg="$ol_val"
2497                 fi
2498         done
2499         if test "$ol_arg" = "invalid" ; then
2500                 { echo "configure: error: bad value $enableval for --enable-rwm" 1>&2; exit 1; }
2501         fi
2502         ol_enable_rwm="$ol_arg"
2503
2504 else
2505         ol_enable_rwm="no"
2506 fi
2507 # end --enable-rwm
2508
2509 # OpenLDAP --enable-syncprov
2510         # Check whether --enable-syncprov or --disable-syncprov was given.
2511 if test "${enable_syncprov+set}" = set; then
2512   enableval="$enable_syncprov"
2513   
2514         ol_arg=invalid
2515         for ol_val in no yes mod ; do
2516                 if test "$enableval" = "$ol_val" ; then
2517                         ol_arg="$ol_val"
2518                 fi
2519         done
2520         if test "$ol_arg" = "invalid" ; then
2521                 { echo "configure: error: bad value $enableval for --enable-syncprov" 1>&2; exit 1; }
2522         fi
2523         ol_enable_syncprov="$ol_arg"
2524
2525 else
2526         ol_enable_syncprov="yes"
2527 fi
2528 # end --enable-syncprov
2529
2530 # OpenLDAP --enable-translucent
2531         # Check whether --enable-translucent or --disable-translucent was given.
2532 if test "${enable_translucent+set}" = set; then
2533   enableval="$enable_translucent"
2534   
2535         ol_arg=invalid
2536         for ol_val in no yes mod ; do
2537                 if test "$enableval" = "$ol_val" ; then
2538                         ol_arg="$ol_val"
2539                 fi
2540         done
2541         if test "$ol_arg" = "invalid" ; then
2542                 { echo "configure: error: bad value $enableval for --enable-translucent" 1>&2; exit 1; }
2543         fi
2544         ol_enable_translucent="$ol_arg"
2545
2546 else
2547         ol_enable_translucent="no"
2548 fi
2549 # end --enable-translucent
2550
2551 # OpenLDAP --enable-unique
2552         # Check whether --enable-unique or --disable-unique was given.
2553 if test "${enable_unique+set}" = set; then
2554   enableval="$enable_unique"
2555   
2556         ol_arg=invalid
2557         for ol_val in no yes mod ; do
2558                 if test "$enableval" = "$ol_val" ; then
2559                         ol_arg="$ol_val"
2560                 fi
2561         done
2562         if test "$ol_arg" = "invalid" ; then
2563                 { echo "configure: error: bad value $enableval for --enable-unique" 1>&2; exit 1; }
2564         fi
2565         ol_enable_unique="$ol_arg"
2566
2567 else
2568         ol_enable_unique="no"
2569 fi
2570 # end --enable-unique
2571
2572
2573
2574 # Check whether --with-xxslurpdoptions or --without-xxslurpdoptions was given.
2575 if test "${with_xxslurpdoptions+set}" = set; then
2576   withval="$with_xxslurpdoptions"
2577   :
2578 fi
2579
2580 # OpenLDAP --enable-slurpd
2581         # Check whether --enable-slurpd or --disable-slurpd was given.
2582 if test "${enable_slurpd+set}" = set; then
2583   enableval="$enable_slurpd"
2584   
2585         ol_arg=invalid
2586         for ol_val in auto yes no ; do
2587                 if test "$enableval" = "$ol_val" ; then
2588                         ol_arg="$ol_val"
2589                 fi
2590         done
2591         if test "$ol_arg" = "invalid" ; then
2592                 { echo "configure: error: bad value $enableval for --enable-slurpd" 1>&2; exit 1; }
2593         fi
2594         ol_enable_slurpd="$ol_arg"
2595
2596 else
2597         ol_enable_slurpd="auto"
2598 fi
2599 # end --enable-slurpd
2600
2601 # Check whether --with-xxliboptions or --without-xxliboptions was given.
2602 if test "${with_xxliboptions+set}" = set; then
2603   withval="$with_xxliboptions"
2604   :
2605 fi
2606
2607 # Check whether --enable-static or --disable-static was given.
2608 if test "${enable_static+set}" = set; then
2609   enableval="$enable_static"
2610   p=${PACKAGE-default}
2611 case $enableval in
2612 yes) enable_static=yes ;;
2613 no) enable_static=no ;;
2614 *)
2615   enable_static=no
2616   # Look at the argument we got.  We use all the common list separators.
2617   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2618   for pkg in $enableval; do
2619     if test "X$pkg" = "X$p"; then
2620       enable_static=yes
2621     fi
2622   done
2623   IFS="$ac_save_ifs"
2624   ;;
2625 esac
2626 else
2627   enable_static=yes
2628 fi
2629
2630 # Check whether --enable-shared or --disable-shared was given.
2631 if test "${enable_shared+set}" = set; then
2632   enableval="$enable_shared"
2633   p=${PACKAGE-default}
2634 case $enableval in
2635 yes) enable_shared=yes ;;
2636 no) enable_shared=no ;;
2637 *)
2638   enable_shared=no
2639   # Look at the argument we got.  We use all the common list separators.
2640   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2641   for pkg in $enableval; do
2642     if test "X$pkg" = "X$p"; then
2643       enable_shared=yes
2644     fi
2645   done
2646   IFS="$ac_save_ifs"
2647   ;;
2648 esac
2649 else
2650   enable_shared=yes
2651 fi
2652
2653
2654
2655 # Activate any backends that were not explicitly enabled.
2656 # Note that back_bdb defaults to "yes" so this loop won't touch it.
2657 if test $ol_enable_backends != no ; then
2658         for i in $Backends; do
2659                 eval "ol_tmp=\$ol_enable_$i"
2660                 if test $ol_tmp = no ; then
2661                         eval "ol_enable_$i=$ol_enable_backends"
2662                 fi
2663         done
2664 fi
2665 # Activate the overlays
2666 if test $ol_enable_overlays != no ; then
2667         for i in $Overlays; do
2668                 eval "ol_tmp=\$ol_enable_$i"
2669                 if test $ol_tmp = no ; then
2670                         eval "ol_enable_$i=$ol_enable_overlays"
2671                 fi
2672         done
2673 fi
2674
2675 # validate options
2676 if test $ol_enable_slapd = no ; then
2677                 if test $ol_enable_slapi = yes ; then
2678                 echo "configure: warning: slapd disabled, ignoring --enable-slapi argument" 1>&2
2679         fi
2680         if test $ol_enable_backends != no ; then
2681                 echo "configure: warning: slapd disabled, ignoring --enable-backends argument" 1>&2
2682         fi
2683         for i in $Backends; do
2684                 eval "ol_tmp=\$ol_enable_$i"
2685                 if test $ol_tmp != no ; then
2686                         echo "configure: warning: slapd disabled, ignoring --enable-$i argument" 1>&2
2687                         eval "ol_enable_$i=no"
2688                 fi
2689         done
2690         if test $ol_enable_modules = yes ; then
2691                 echo "configure: warning: slapd disabled, ignoring --enable-modules argument" 1>&2
2692         fi
2693         if test $ol_enable_multimaster = yes ; then
2694                 echo "configure: warning: slapd disabled, ignoring --enable-multimaster argument" 1>&2
2695         fi
2696         if test $ol_enable_wrappers = yes ; then
2697                 echo "configure: warning: slapd disabled, ignoring --enable-wrappers argument" 1>&2
2698         fi
2699         if test $ol_enable_rlookups = yes ; then
2700                 echo "configure: warning: slapd disabled, ignoring --enable-rlookups argument" 1>&2
2701         fi
2702         if test $ol_enable_aci = yes ; then
2703                 echo "configure: warning: slapd disabled, ignoring --enable-aci argument" 1>&2
2704         fi
2705         if test $ol_with_ldbm_api != auto ; then
2706                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-api argument" 1>&2
2707         fi
2708         if test $ol_with_ldbm_type != auto ; then
2709                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-type argument" 1>&2
2710         fi
2711         if test $ol_enable_slurpd = yes ; then
2712                 { echo "configure: error: slurpd requires slapd" 1>&2; exit 1; }
2713         fi
2714         if test $ol_enable_rewrite = yes ; then
2715                 echo "configure: warning: slapd disabled, ignoring --enable-rewrite argument" 1>&2
2716         fi
2717                 if test $ol_enable_overlays != no ; then
2718                 echo "configure: warning: slapd disabled, ignoring --enable-overlays argument" 1>&2
2719         fi
2720         for i in $Overlays; do
2721                 eval "ol_tmp=\$ol_enable_$i"
2722                 if test $ol_tmp != no ; then
2723                         echo "configure: warning: slapd disabled, ignoring --enable-$i argument" 1>&2
2724                         eval "ol_enable_$i=no"
2725                 fi
2726         done
2727
2728         # force settings to no
2729         ol_enable_slapi=no
2730
2731         ol_enable_backends=no
2732         ol_enable_overlays=no
2733         ol_enable_modules=no
2734         ol_enable_multimaster=no
2735         ol_enable_rlookups=no
2736         ol_enable_aci=no
2737         ol_enable_wrappers=no
2738
2739         ol_with_ldbm_api=no
2740         ol_with_ldbm_type=no
2741
2742         ol_enable_slurpd=no
2743
2744         ol_enable_rewrite=no
2745
2746 elif test $ol_enable_ldbm = no ; then
2747         
2748         if test $ol_with_ldbm_api != auto ; then
2749                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-api argument" 1>&2
2750         fi
2751
2752         if test $ol_with_ldbm_type != auto ; then
2753                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-type argument" 1>&2
2754         fi
2755
2756         if test $ol_enable_modules != yes -a \
2757                 $ol_enable_bdb = no -a \
2758                 $ol_enable_dnssrv = no -a \
2759                 $ol_enable_hdb = no -a \
2760                 $ol_enable_ldap = no -a \
2761                 $ol_enable_meta = no -a \
2762                 $ol_enable_monitor = no -a \
2763                 $ol_enable_null = no -a \
2764                 $ol_enable_passwd = no -a \
2765                 $ol_enable_perl = no -a \
2766                 $ol_enable_relay = no -a \
2767                 $ol_enable_shell = no -a \
2768                 $ol_enable_sql = no ; then
2769
2770                 if test $ol_enable_slapd = yes ; then
2771                         { echo "configure: error: slapd requires a backend" 1>&2; exit 1; }
2772                 else
2773                         echo "configure: warning: skipping slapd, no backend specified" 1>&2
2774                         ol_enable_slapd=no
2775                 fi
2776         fi
2777
2778         ol_with_ldbm_api=no
2779         ol_with_ldbm_type=no
2780
2781         if test $ol_enable_bdb != no -o $ol_enable_hdb != no; then
2782                 ol_with_ldbm_api=berkeley
2783         fi
2784
2785 else
2786                 if test $ol_with_ldbm_api = gdbm -a \
2787                 $ol_with_ldbm_type = btree ; then
2788                 { echo "configure: error: GDBM only supports LDBM type hash" 1>&2; exit 1; }
2789         fi
2790         if test $ol_with_ldbm_api = mdbm -a \
2791                 $ol_with_ldbm_type = btree ; then
2792                 { echo "configure: error: MDBM only supports LDBM type hash" 1>&2; exit 1; }
2793         fi
2794         if test $ol_with_ldbm_api = ndbm -a \
2795                 $ol_with_ldbm_type = btree ; then
2796                 { echo "configure: error: NDBM only supports LDBM type hash" 1>&2; exit 1; }
2797         fi
2798
2799         if test $ol_enable_bdb != no -o $ol_enable_hdb != no ; then
2800                 if test $ol_with_ldbm_api = auto ; then
2801                         ol_with_ldbm_api=berkeley
2802                 elif test $ol_with_ldbm_api != berkeley ; then
2803                         { echo "configure: error: LDBM API not compatible with BDB/HDB" 1>&2; exit 1; }
2804                 fi
2805         fi
2806 fi
2807
2808 if test $ol_enable_meta = yes -a $ol_enable_ldap = no ; then
2809         { echo "configure: error: --enable-meta requires --enable-ldap" 1>&2; exit 1; }
2810 fi
2811
2812 if test $ol_enable_slurpd = yes ; then
2813                 if test $ol_with_threads = no ; then
2814                 { echo "configure: error: slurpd requires threads" 1>&2; exit 1; }
2815         fi
2816 fi
2817
2818 if test $ol_enable_lmpasswd = yes ; then
2819         if test $ol_with_tls = no ; then
2820                 { echo "configure: error: LAN Manager passwords require OpenSSL" 1>&2; exit 1; }
2821         fi
2822 fi
2823
2824 if test $ol_enable_kbind = yes ; then
2825         if test $ol_with_kerberos = no ; then
2826                 { echo "configure: error: options require --with-kerberos" 1>&2; exit 1; }
2827         elif test $ol_with_kerberos = auto ; then
2828                 ol_with_kerberos=yes
2829         fi
2830
2831 elif test $ol_enable_kbind = no ; then
2832         if test $ol_with_kerberos = auto ; then
2833                 ol_with_kerberos=no
2834         elif test $ol_with_kerberos != no ; then
2835                 echo "configure: warning: Kerberos detection enabled unnecessarily" 1>&2;
2836                 ol_with_kerberos=no
2837         fi
2838 fi
2839
2840 if test $ol_enable_spasswd = yes ; then
2841         if test $ol_with_cyrus_sasl = no ; then
2842                 { echo "configure: error: options require --with-cyrus-sasl" 1>&2; exit 1; }
2843         fi
2844         ol_with_cyrus_sasl=yes
2845 fi
2846
2847 echo "$ac_t""done" 1>&6
2848
2849 LDAP_LIBS=
2850 LDBM_LIBS=
2851 LTHREAD_LIBS=
2852 LUTIL_LIBS=
2853
2854 SLAPD_LIBS=
2855 SLURPD_LIBS=
2856
2857 BUILD_SLAPD=no
2858 BUILD_SLURPD=no
2859
2860 BUILD_THREAD=no
2861
2862 BUILD_SLAPI=no
2863 SLAPD_SLAPI_DEPEND=
2864
2865 BUILD_BDB=no
2866 BUILD_DNSSRV=no
2867 BUILD_HDB=no
2868 BUILD_LDAP=no
2869 BUILD_LDBM=no
2870 BUILD_META=no
2871 BUILD_MONITOR=no
2872 BUILD_NULL=no
2873 BUILD_PASSWD=no
2874 BUILD_PERL=no
2875 BUILD_RELAY=no
2876 BUILD_SHELL=no
2877 BUILD_SQL=no
2878
2879 BUILD_ACCESSLOG=no
2880 BUILD_DENYOP=no
2881 BUILD_DYNGROUP=no
2882 BUILD_DYNLIST=no
2883 BUILD_GLUE=no
2884 BUILD_LASTMOD=no
2885 BUILD_PPOLICY=no
2886 BUILD_PROXYCACHE=no
2887 BUILD_REFINT=no
2888 BUILD_RETCODE=no
2889 BUILD_RWM=no
2890 BUILD_SYNCPROV=no
2891 BUILD_TRANSLUCENT=no
2892 BUILD_UNIQUE=no
2893
2894 SLAPD_STATIC_OVERLAYS=
2895 SLAPD_DYNAMIC_OVERLAYS=
2896
2897 SLAPD_MODULES_LDFLAGS=
2898 SLAPD_MODULES_CPPFLAGS=
2899
2900 SLAPD_STATIC_BACKENDS=back-ldif
2901 SLAPD_DYNAMIC_BACKENDS=
2902
2903 SLAPD_PERL_LDFLAGS=
2904 MOD_PERL_LDFLAGS=
2905 PERL_CPPFLAGS=
2906
2907 SLAPD_SQL_LDFLAGS=
2908 SLAPD_SQL_LIBS=
2909 SLAPD_SQL_INCLUDES=
2910
2911 KRB4_LIBS=
2912 KRB5_LIBS=
2913 SASL_LIBS=
2914 TLS_LIBS=
2915 MODULES_LIBS=
2916 SLAPI_LIBS=
2917 LIBSLAPI=
2918 LIBSLAPITOOLS=
2919 AUTH_LIBS=
2920
2921 SLAPD_SLP_LIBS=
2922 SLAPD_GMP_LIBS=
2923
2924
2925 cat >> confdefs.h <<\EOF
2926 #define HAVE_MKVERSION 1
2927 EOF
2928
2929
2930
2931
2932 ol_aix_threads=no
2933 case "$target" in
2934 *-*-aix*)       if test -z "$CC" ; then
2935                 case "$ol_with_threads" in
2936                 auto | yes |  posix) ol_aix_threads=yes ;;
2937                 esac
2938         fi
2939 ;;
2940 esac
2941
2942 if test $ol_aix_threads = yes ; then
2943         if test -z "${CC}" ; then
2944                 for ac_prog in cc_r xlc_r cc
2945 do
2946 # Extract the first word of "$ac_prog", so it can be a program name with args.
2947 set dummy $ac_prog; ac_word=$2
2948 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2949 echo "configure:2950: checking for $ac_word" >&5
2950 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2951   echo $ac_n "(cached) $ac_c" 1>&6
2952 else
2953   if test -n "$CC"; then
2954   ac_cv_prog_CC="$CC" # Let the user override the test.
2955 else
2956   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2957   ac_dummy="$PATH"
2958   for ac_dir in $ac_dummy; do
2959     test -z "$ac_dir" && ac_dir=.
2960     if test -f $ac_dir/$ac_word; then
2961       ac_cv_prog_CC="$ac_prog"
2962       break
2963     fi
2964   done
2965   IFS="$ac_save_ifs"
2966 fi
2967 fi
2968 CC="$ac_cv_prog_CC"
2969 if test -n "$CC"; then
2970   echo "$ac_t""$CC" 1>&6
2971 else
2972   echo "$ac_t""no" 1>&6
2973 fi
2974
2975 test -n "$CC" && break
2976 done
2977
2978
2979                 if test "$CC" = cc ; then
2980                                                 if test $ol_with_threads != auto ; then
2981                                 { echo "configure: error: --with-threads requires cc_r (or other suitable compiler) on AIX" 1>&2; exit 1; }
2982                         else
2983                                 echo "configure: warning: disabling threads, no cc_r on AIX" 1>&2
2984                         fi
2985                         ol_with_threads=no
2986                 fi
2987         fi
2988
2989         if test "${CC}" = "cc_r" -o "${CC}" = "xlc_r" ; then
2990                 ol_with_threads=posix
2991                 ol_cv_pthread_create=yes
2992         fi
2993 fi
2994
2995 if test -z "${CC}"; then
2996         for ac_prog in cc gcc
2997 do
2998 # Extract the first word of "$ac_prog", so it can be a program name with args.
2999 set dummy $ac_prog; ac_word=$2
3000 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3001 echo "configure:3002: checking for $ac_word" >&5
3002 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3003   echo $ac_n "(cached) $ac_c" 1>&6
3004 else
3005   if test -n "$CC"; then
3006   ac_cv_prog_CC="$CC" # Let the user override the test.
3007 else
3008   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3009   ac_dummy="$PATH"
3010   for ac_dir in $ac_dummy; do
3011     test -z "$ac_dir" && ac_dir=.
3012     if test -f $ac_dir/$ac_word; then
3013       ac_cv_prog_CC="$ac_prog"
3014       break
3015     fi
3016   done
3017   IFS="$ac_save_ifs"
3018 fi
3019 fi
3020 CC="$ac_cv_prog_CC"
3021 if test -n "$CC"; then
3022   echo "$ac_t""$CC" 1>&6
3023 else
3024   echo "$ac_t""no" 1>&6
3025 fi
3026
3027 test -n "$CC" && break
3028 done
3029 test -n "$CC" || CC="missing"
3030
3031
3032         if test "${CC}" = "missing" ; then
3033                 { echo "configure: error: Unable to locate cc(1) or suitable replacement.  Check PATH or set CC." 1>&2; exit 1; }
3034         fi
3035 fi
3036
3037 if test -z "${AR}"; then
3038         for ac_prog in ar gar
3039 do
3040 # Extract the first word of "$ac_prog", so it can be a program name with args.
3041 set dummy $ac_prog; ac_word=$2
3042 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3043 echo "configure:3044: checking for $ac_word" >&5
3044 if eval "test \"\${ac_cv_prog_AR+set}\" = set"; then
3045   echo $ac_n "(cached) $ac_c" 1>&6
3046 else
3047   if test -n "$AR"; then
3048   ac_cv_prog_AR="$AR" # Let the user override the test.
3049 else
3050   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3051   ac_dummy="$PATH"
3052   for ac_dir in $ac_dummy; do
3053     test -z "$ac_dir" && ac_dir=.
3054     if test -f $ac_dir/$ac_word; then
3055       ac_cv_prog_AR="$ac_prog"
3056       break
3057     fi
3058   done
3059   IFS="$ac_save_ifs"
3060 fi
3061 fi
3062 AR="$ac_cv_prog_AR"
3063 if test -n "$AR"; then
3064   echo "$ac_t""$AR" 1>&6
3065 else
3066   echo "$ac_t""no" 1>&6
3067 fi
3068
3069 test -n "$AR" && break
3070 done
3071 test -n "$AR" || AR="missing"
3072
3073
3074         if test "${AR}" = "missing" ; then
3075                 { echo "configure: error: Unable to locate ar(1) or suitable replacement.  Check PATH or set AR." 1>&2; exit 1; }
3076         fi
3077 fi
3078
3079
3080
3081 # Find the correct PATH separator.  Usually this is `:', but
3082 # DJGPP uses `;' like DOS.
3083 if test "X${PATH_SEPARATOR+set}" != Xset; then
3084   UNAME=${UNAME-`uname 2>/dev/null`}
3085   case X$UNAME in
3086     *-DOS) lt_cv_sys_path_separator=';' ;;
3087     *)     lt_cv_sys_path_separator=':' ;;
3088   esac
3089   PATH_SEPARATOR=$lt_cv_sys_path_separator
3090 fi
3091
3092 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
3093 echo "configure:3094: checking for Cygwin environment" >&5
3094 if eval "test \"\${ac_cv_cygwin+set}\" = set"; then
3095   echo $ac_n "(cached) $ac_c" 1>&6
3096 else
3097   cat > conftest.$ac_ext <<EOF
3098 #line 3099 "configure"
3099 #include "confdefs.h"
3100
3101 int main() {
3102
3103 #ifndef __CYGWIN__
3104 #define __CYGWIN__ __CYGWIN32__
3105 #endif
3106 return __CYGWIN__;
3107 ; return 0; }
3108 EOF
3109 if { (eval echo configure:3110: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3110   rm -rf conftest*
3111   ac_cv_cygwin=yes
3112 else
3113   echo "configure: failed program was:" >&5
3114   cat conftest.$ac_ext >&5
3115   rm -rf conftest*
3116   ac_cv_cygwin=no
3117 fi
3118 rm -f conftest*
3119 fi
3120
3121 echo "$ac_t""$ac_cv_cygwin" 1>&6
3122 CYGWIN=
3123 test "$ac_cv_cygwin" = yes && CYGWIN=yes
3124 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
3125 echo "configure:3126: checking for mingw32 environment" >&5
3126 if eval "test \"\${ac_cv_mingw32+set}\" = set"; then
3127   echo $ac_n "(cached) $ac_c" 1>&6
3128 else
3129   cat > conftest.$ac_ext <<EOF
3130 #line 3131 "configure"
3131 #include "confdefs.h"
3132
3133 int main() {
3134 return __MINGW32__;
3135 ; return 0; }
3136 EOF
3137 if { (eval echo configure:3138: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3138   rm -rf conftest*
3139   ac_cv_mingw32=yes
3140 else
3141   echo "configure: failed program was:" >&5
3142   cat conftest.$ac_ext >&5
3143   rm -rf conftest*
3144   ac_cv_mingw32=no
3145 fi
3146 rm -f conftest*
3147 fi
3148
3149 echo "$ac_t""$ac_cv_mingw32" 1>&6
3150 MINGW32=
3151 test "$ac_cv_mingw32" = yes && MINGW32=yes
3152 echo $ac_n "checking for EMX OS/2 environment""... $ac_c" 1>&6
3153 echo "configure:3154: checking for EMX OS/2 environment" >&5
3154 if eval "test \"\${ac_cv_emxos2+set}\" = set"; then
3155   echo $ac_n "(cached) $ac_c" 1>&6
3156 else
3157   cat > conftest.$ac_ext <<EOF
3158 #line 3159 "configure"
3159 #include "confdefs.h"
3160
3161 int main() {
3162 return __EMX__;
3163 ; return 0; }
3164 EOF
3165 if { (eval echo configure:3166: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3166   rm -rf conftest*
3167   ac_cv_emxos2=yes
3168 else
3169   echo "configure: failed program was:" >&5
3170   cat conftest.$ac_ext >&5
3171   rm -rf conftest*
3172   ac_cv_emxos2=no
3173 fi
3174 rm -f conftest*
3175 fi
3176
3177 echo "$ac_t""$ac_cv_emxos2" 1>&6
3178 EMXOS2=
3179 test "$ac_cv_emxos2" = yes && EMXOS2=yes
3180 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
3181 echo "configure:3182: checking how to run the C preprocessor" >&5
3182 # On Suns, sometimes $CPP names a directory.
3183 if test -n "$CPP" && test -d "$CPP"; then
3184   CPP=
3185 fi
3186 if test -z "$CPP"; then
3187 if eval "test \"\${ac_cv_prog_CPP+set}\" = set"; then
3188   echo $ac_n "(cached) $ac_c" 1>&6
3189 else
3190     # This must be in double quotes, not single quotes, because CPP may get
3191   # substituted into the Makefile and "${CC-cc}" will confuse make.
3192   CPP="${CC-cc} -E"
3193   # On the NeXT, cc -E runs the code through the compiler's parser,
3194   # not just through cpp.
3195   cat > conftest.$ac_ext <<EOF
3196 #line 3197 "configure"
3197 #include "confdefs.h"
3198 #include <assert.h>
3199 Syntax Error
3200 EOF
3201 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3202 { (eval echo configure:3203: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3203 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3204 if test -z "$ac_err"; then
3205   :
3206 else
3207   echo "$ac_err" >&5
3208   echo "configure: failed program was:" >&5
3209   cat conftest.$ac_ext >&5
3210   rm -rf conftest*
3211   CPP="${CC-cc} -E -traditional-cpp"
3212   cat > conftest.$ac_ext <<EOF
3213 #line 3214 "configure"
3214 #include "confdefs.h"
3215 #include <assert.h>
3216 Syntax Error
3217 EOF
3218 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3219 { (eval echo configure:3220: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3220 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3221 if test -z "$ac_err"; then
3222   :
3223 else
3224   echo "$ac_err" >&5
3225   echo "configure: failed program was:" >&5
3226   cat conftest.$ac_ext >&5
3227   rm -rf conftest*
3228   CPP="${CC-cc} -nologo -E"
3229   cat > conftest.$ac_ext <<EOF
3230 #line 3231 "configure"
3231 #include "confdefs.h"
3232 #include <assert.h>
3233 Syntax Error
3234 EOF
3235 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3236 { (eval echo configure:3237: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3237 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3238 if test -z "$ac_err"; then
3239   :
3240 else
3241   echo "$ac_err" >&5
3242   echo "configure: failed program was:" >&5
3243   cat conftest.$ac_ext >&5
3244   rm -rf conftest*
3245   CPP=/lib/cpp
3246 fi
3247 rm -f conftest*
3248 fi
3249 rm -f conftest*
3250 fi
3251 rm -f conftest*
3252   ac_cv_prog_CPP="$CPP"
3253 fi
3254   CPP="$ac_cv_prog_CPP"
3255 else
3256   ac_cv_prog_CPP="$CPP"
3257 fi
3258 echo "$ac_t""$CPP" 1>&6
3259
3260 # Check whether --enable-fast-install or --disable-fast-install was given.
3261 if test "${enable_fast_install+set}" = set; then
3262   enableval="$enable_fast_install"
3263   p=${PACKAGE-default}
3264 case $enableval in
3265 yes) enable_fast_install=yes ;;
3266 no) enable_fast_install=no ;;
3267 *)
3268   enable_fast_install=no
3269   # Look at the argument we got.  We use all the common list separators.
3270   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
3271   for pkg in $enableval; do
3272     if test "X$pkg" = "X$p"; then
3273       enable_fast_install=yes
3274     fi
3275   done
3276   IFS="$ac_save_ifs"
3277   ;;
3278 esac
3279 else
3280   enable_fast_install=yes
3281 fi
3282
3283 # Extract the first word of "gcc", so it can be a program name with args.
3284 set dummy gcc; ac_word=$2
3285 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3286 echo "configure:3287: checking for $ac_word" >&5
3287 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3288   echo $ac_n "(cached) $ac_c" 1>&6
3289 else
3290   if test -n "$CC"; then
3291   ac_cv_prog_CC="$CC" # Let the user override the test.
3292 else
3293   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3294   ac_dummy="$PATH"
3295   for ac_dir in $ac_dummy; do
3296     test -z "$ac_dir" && ac_dir=.
3297     if test -f $ac_dir/$ac_word; then
3298       ac_cv_prog_CC="gcc"
3299       break
3300     fi
3301   done
3302   IFS="$ac_save_ifs"
3303 fi
3304 fi
3305 CC="$ac_cv_prog_CC"
3306 if test -n "$CC"; then
3307   echo "$ac_t""$CC" 1>&6
3308 else
3309   echo "$ac_t""no" 1>&6
3310 fi
3311
3312 if test -z "$CC"; then
3313   # Extract the first word of "cc", so it can be a program name with args.
3314 set dummy cc; ac_word=$2
3315 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3316 echo "configure:3317: checking for $ac_word" >&5
3317 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3318   echo $ac_n "(cached) $ac_c" 1>&6
3319 else
3320   if test -n "$CC"; then
3321   ac_cv_prog_CC="$CC" # Let the user override the test.
3322 else
3323   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3324   ac_prog_rejected=no
3325   ac_dummy="$PATH"
3326   for ac_dir in $ac_dummy; do
3327     test -z "$ac_dir" && ac_dir=.
3328     if test -f $ac_dir/$ac_word; then
3329       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
3330         ac_prog_rejected=yes
3331         continue
3332       fi
3333       ac_cv_prog_CC="cc"
3334       break
3335     fi
3336   done
3337   IFS="$ac_save_ifs"
3338 if test $ac_prog_rejected = yes; then
3339   # We found a bogon in the path, so make sure we never use it.
3340   set dummy $ac_cv_prog_CC
3341   shift
3342   if test $# -gt 0; then
3343     # We chose a different compiler from the bogus one.
3344     # However, it has the same basename, so the bogon will be chosen
3345     # first if we set CC to just the basename; use the full file name.
3346     shift
3347     set dummy "$ac_dir/$ac_word" "$@"
3348     shift
3349     ac_cv_prog_CC="$@"
3350   fi
3351 fi
3352 fi
3353 fi
3354 CC="$ac_cv_prog_CC"
3355 if test -n "$CC"; then
3356   echo "$ac_t""$CC" 1>&6
3357 else
3358   echo "$ac_t""no" 1>&6
3359 fi
3360
3361   if test -z "$CC"; then
3362     case "`uname -s`" in
3363     *win32* | *WIN32* | *CYGWIN*)
3364       # Extract the first word of "cl", so it can be a program name with args.
3365 set dummy cl; ac_word=$2
3366 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3367 echo "configure:3368: checking for $ac_word" >&5
3368 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3369   echo $ac_n "(cached) $ac_c" 1>&6
3370 else
3371   if test -n "$CC"; then
3372   ac_cv_prog_CC="$CC" # Let the user override the test.
3373 else
3374   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3375   ac_dummy="$PATH"
3376   for ac_dir in $ac_dummy; do
3377     test -z "$ac_dir" && ac_dir=.
3378     if test -f $ac_dir/$ac_word; then
3379       ac_cv_prog_CC="cl"
3380       break
3381     fi
3382   done
3383   IFS="$ac_save_ifs"
3384 fi
3385 fi
3386 CC="$ac_cv_prog_CC"
3387 if test -n "$CC"; then
3388   echo "$ac_t""$CC" 1>&6
3389 else
3390   echo "$ac_t""no" 1>&6
3391 fi
3392  ;;
3393     esac
3394   fi
3395   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
3396 fi
3397
3398 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works""... $ac_c" 1>&6
3399 echo "configure:3400: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works" >&5
3400
3401 ac_ext=c
3402 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
3403 ac_cpp='$CPP $CPPFLAGS'
3404 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
3405 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
3406 cross_compiling=$ac_cv_prog_cc_cross
3407
3408 cat > conftest.$ac_ext << EOF
3409
3410 #line 3411 "configure"
3411 #include "confdefs.h"
3412
3413 main(){return(0);}
3414 EOF
3415 if { (eval echo configure:3416: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3416   ac_cv_prog_cc_works=yes
3417   # If we can't run a trivial program, we are probably using a cross compiler.
3418   if (./conftest; exit) 2>/dev/null; then
3419     ac_cv_prog_cc_cross=no
3420   else
3421     ac_cv_prog_cc_cross=yes
3422   fi
3423 else
3424   echo "configure: failed program was:" >&5
3425   cat conftest.$ac_ext >&5
3426   ac_cv_prog_cc_works=no
3427 fi
3428 rm -fr conftest*
3429 ac_ext=c
3430 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
3431 ac_cpp='$CPP $CPPFLAGS'
3432 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
3433 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
3434 cross_compiling=$ac_cv_prog_cc_cross
3435
3436 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
3437 if test $ac_cv_prog_cc_works = no; then
3438   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
3439 fi
3440 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
3441 echo "configure:3442: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler" >&5
3442 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
3443 cross_compiling=$ac_cv_prog_cc_cross
3444
3445 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
3446 echo "configure:3447: checking whether we are using GNU C" >&5
3447 if eval "test \"\${ac_cv_prog_gcc+set}\" = set"; then
3448   echo $ac_n "(cached) $ac_c" 1>&6
3449 else
3450   cat > conftest.c <<EOF
3451 #ifdef __GNUC__
3452   yes;
3453 #endif
3454 EOF
3455 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:3456: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
3456   ac_cv_prog_gcc=yes
3457 else
3458   ac_cv_prog_gcc=no
3459 fi
3460 fi
3461
3462 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
3463
3464 if test $ac_cv_prog_gcc = yes; then
3465   GCC=yes
3466 else
3467   GCC=
3468 fi
3469
3470 ac_test_CFLAGS="${CFLAGS+set}"
3471 ac_save_CFLAGS="$CFLAGS"
3472 CFLAGS=
3473 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
3474 echo "configure:3475: checking whether ${CC-cc} accepts -g" >&5
3475 if eval "test \"\${ac_cv_prog_cc_g+set}\" = set"; then
3476   echo $ac_n "(cached) $ac_c" 1>&6
3477 else
3478   echo 'void f(){}' > conftest.c
3479 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
3480   ac_cv_prog_cc_g=yes
3481 else
3482   ac_cv_prog_cc_g=no
3483 fi
3484 rm -f conftest*
3485
3486 fi
3487
3488 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
3489 if test "$ac_test_CFLAGS" = set; then
3490   CFLAGS="$ac_save_CFLAGS"
3491 elif test $ac_cv_prog_cc_g = yes; then
3492   if test "$GCC" = yes; then
3493     CFLAGS="-g -O2"
3494   else
3495     CFLAGS="-g"
3496   fi
3497 else
3498   if test "$GCC" = yes; then
3499     CFLAGS="-O2"
3500   else
3501     CFLAGS=
3502   fi
3503 fi
3504
3505 # Check whether --with-gnu-ld or --without-gnu-ld was given.
3506 if test "${with_gnu_ld+set}" = set; then
3507   withval="$with_gnu_ld"
3508   test "$withval" = no || with_gnu_ld=yes
3509 else
3510   with_gnu_ld=no
3511 fi
3512
3513 ac_prog=ld
3514 if test "$GCC" = yes; then
3515   # Check if gcc -print-prog-name=ld gives a path.
3516   echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
3517 echo "configure:3518: checking for ld used by GCC" >&5
3518   case $host in
3519   *-*-mingw*)
3520     # gcc leaves a trailing carriage return which upsets mingw
3521     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
3522   *)
3523     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
3524   esac
3525   case $ac_prog in
3526     # Accept absolute paths.
3527     [\\/]* | [A-Za-z]:[\\/]*)
3528       re_direlt='/[^/][^/]*/\.\./'
3529       # Canonicalize the path of ld
3530       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
3531       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
3532         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
3533       done
3534       test -z "$LD" && LD="$ac_prog"
3535       ;;
3536   "")
3537     # If it fails, then pretend we aren't using GCC.
3538     ac_prog=ld
3539     ;;
3540   *)
3541     # If it is relative, then search for the first ld in PATH.
3542     with_gnu_ld=unknown
3543     ;;
3544   esac
3545 elif test "$with_gnu_ld" = yes; then
3546   echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
3547 echo "configure:3548: checking for GNU ld" >&5
3548 else
3549   echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
3550 echo "configure:3551: checking for non-GNU ld" >&5
3551 fi
3552 if eval "test \"\${lt_cv_path_LD+set}\" = set"; then
3553   echo $ac_n "(cached) $ac_c" 1>&6
3554 else
3555   if test -z "$LD"; then
3556   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3557   for ac_dir in $PATH; do
3558     test -z "$ac_dir" && ac_dir=.
3559     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
3560       lt_cv_path_LD="$ac_dir/$ac_prog"
3561       # Check to see if the program is GNU ld.  I'd rather use --version,
3562       # but apparently some GNU ld's only accept -v.
3563       # Break only if it was the GNU/non-GNU ld that we prefer.
3564       if "$lt_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
3565         test "$with_gnu_ld" != no && break
3566       else
3567         test "$with_gnu_ld" != yes && break
3568       fi
3569     fi
3570   done
3571   IFS="$ac_save_ifs"
3572 else
3573   lt_cv_path_LD="$LD" # Let the user override the test with a path.
3574 fi
3575 fi
3576
3577 LD="$lt_cv_path_LD"
3578 if test -n "$LD"; then
3579   echo "$ac_t""$LD" 1>&6
3580 else
3581   echo "$ac_t""no" 1>&6
3582 fi
3583 test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
3584 echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
3585 echo "configure:3586: checking if the linker ($LD) is GNU ld" >&5
3586 if eval "test \"\${lt_cv_prog_gnu_ld+set}\" = set"; then
3587   echo $ac_n "(cached) $ac_c" 1>&6
3588 else
3589   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
3590 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
3591   lt_cv_prog_gnu_ld=yes
3592 else
3593   lt_cv_prog_gnu_ld=no
3594 fi
3595 fi
3596
3597 echo "$ac_t""$lt_cv_prog_gnu_ld" 1>&6
3598 with_gnu_ld=$lt_cv_prog_gnu_ld
3599
3600
3601 echo $ac_n "checking for $LD option to reload object files""... $ac_c" 1>&6
3602 echo "configure:3603: checking for $LD option to reload object files" >&5
3603 if eval "test \"\${lt_cv_ld_reload_flag+set}\" = set"; then
3604   echo $ac_n "(cached) $ac_c" 1>&6
3605 else
3606   lt_cv_ld_reload_flag='-r'
3607 fi
3608
3609 echo "$ac_t""$lt_cv_ld_reload_flag" 1>&6
3610 reload_flag=$lt_cv_ld_reload_flag
3611 test -n "$reload_flag" && reload_flag=" $reload_flag"
3612
3613 echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
3614 echo "configure:3615: checking for BSD-compatible nm" >&5
3615 if eval "test \"\${lt_cv_path_NM+set}\" = set"; then
3616   echo $ac_n "(cached) $ac_c" 1>&6
3617 else
3618   if test -n "$NM"; then
3619   # Let the user override the test.
3620   lt_cv_path_NM="$NM"
3621 else
3622   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3623   for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
3624     test -z "$ac_dir" && ac_dir=.
3625     tmp_nm=$ac_dir/${ac_tool_prefix}nm
3626     if test -f $tmp_nm || test -f $tmp_nm$ac_exeext ; then
3627       # Check to see if the nm accepts a BSD-compat flag.
3628       # Adding the `sed 1q' prevents false positives on HP-UX, which says:
3629       #   nm: unknown option "B" ignored
3630       # Tru64's nm complains that /dev/null is an invalid object file
3631       if ($tmp_nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then
3632         lt_cv_path_NM="$tmp_nm -B"
3633         break
3634       elif ($tmp_nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
3635         lt_cv_path_NM="$tmp_nm -p"
3636         break
3637       else
3638         lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
3639         continue # so that we can try to find one that supports BSD flags
3640       fi
3641     fi
3642   done
3643   IFS="$ac_save_ifs"
3644   test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
3645 fi
3646 fi
3647
3648 NM="$lt_cv_path_NM"
3649 echo "$ac_t""$NM" 1>&6
3650
3651 echo $ac_n "checking for a sed that does not truncate output""... $ac_c" 1>&6
3652 echo "configure:3653: checking for a sed that does not truncate output" >&5
3653 if eval "test \"\${lt_cv_path_SED+set}\" = set"; then
3654   echo $ac_n "(cached) $ac_c" 1>&6
3655 else
3656   # Loop through the user's path and test for sed and gsed.
3657 # Then use that list of sed's as ones to test for truncation.
3658 as_executable_p="test -f"
3659 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3660 for as_dir in $PATH
3661 do
3662   IFS=$as_save_IFS
3663   test -z "$as_dir" && as_dir=.
3664   for ac_prog in sed gsed; do
3665     for ac_exec_ext in '' $ac_executable_extensions; do
3666       if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
3667         _sed_list="$_sed_list $as_dir/$ac_prog$ac_exec_ext"
3668       fi
3669     done
3670   done
3671 done
3672
3673   # Create a temporary directory, and hook for its removal unless debugging.
3674 $debug ||
3675 {
3676   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
3677   trap '{ (exit 1); exit 1; }' 1 2 13 15
3678 }
3679
3680 # Create a (secure) tmp directory for tmp files.
3681 : ${TMPDIR=/tmp}
3682 {
3683   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/sedXXXXXX") 2>/dev/null` &&
3684   test -n "$tmp" && test -d "$tmp"
3685 }  ||
3686 {
3687   tmp=$TMPDIR/sed$$-$RANDOM
3688   (umask 077 && mkdir $tmp)
3689 } ||
3690 {
3691    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
3692    { (exit 1); exit 1; }
3693 }
3694   _max=0
3695   _count=0
3696   # Add /usr/xpg4/bin/sed as it is typically found on Solaris
3697   # along with /bin/sed that truncates output.
3698   for _sed in $_sed_list /usr/xpg4/bin/sed; do
3699     test ! -f ${_sed} && break
3700     cat /dev/null > "$tmp/sed.in"
3701     _count=0
3702     echo ${ECHO_N-$ac_n} "0123456789${ECHO_C-$ac_c}" >"$tmp/sed.in"
3703     # Check for GNU sed and select it if it is found.
3704     if "${_sed}" --version 2>&1 < /dev/null | egrep '(GNU)' > /dev/null; then
3705       lt_cv_path_SED=${_sed}
3706       break
3707     fi
3708     while true; do
3709       cat "$tmp/sed.in" "$tmp/sed.in" >"$tmp/sed.tmp"
3710       mv "$tmp/sed.tmp" "$tmp/sed.in"
3711       cp "$tmp/sed.in" "$tmp/sed.nl"
3712       echo >>"$tmp/sed.nl"
3713       ${_sed} -e 's/a$//' < "$tmp/sed.nl" >"$tmp/sed.out" || break
3714       cmp -s "$tmp/sed.out" "$tmp/sed.nl" || break
3715       # 40000 chars as input seems more than enough
3716       test $_count -gt 10 && break
3717       _count=`expr $_count + 1`
3718       if test $_count -gt $_max; then
3719         _max=$_count
3720         lt_cv_path_SED=$_sed
3721       fi
3722     done
3723   done
3724   rm -rf "$tmp"
3725
3726 fi
3727
3728 if test "X$SED" != "X"; then
3729   lt_cv_path_SED=$SED
3730 else
3731   SED=$lt_cv_path_SED
3732 fi
3733 echo "$ac_t""$SED" 1>&6
3734
3735 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
3736 echo "configure:3737: checking whether ln -s works" >&5
3737 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
3738   echo $ac_n "(cached) $ac_c" 1>&6
3739 else
3740   rm -f conftestdata
3741 if ln -s X conftestdata 2>/dev/null
3742 then
3743   rm -f conftestdata
3744   ac_cv_prog_LN_S="ln -s"
3745 else
3746   ac_cv_prog_LN_S=ln
3747 fi
3748 fi
3749 LN_S="$ac_cv_prog_LN_S"
3750 if test "$ac_cv_prog_LN_S" = "ln -s"; then
3751   echo "$ac_t""yes" 1>&6
3752 else
3753   echo "$ac_t""no" 1>&6
3754 fi
3755
3756 echo $ac_n "checking how to recognise dependent libraries""... $ac_c" 1>&6
3757 echo "configure:3758: checking how to recognise dependent libraries" >&5
3758 if eval "test \"\${lt_cv_deplibs_check_method+set}\" = set"; then
3759   echo $ac_n "(cached) $ac_c" 1>&6
3760 else
3761   lt_cv_file_magic_cmd='$MAGIC_CMD'
3762 lt_cv_file_magic_test_file=
3763 lt_cv_deplibs_check_method='unknown'
3764 # Need to set the preceding variable on all platforms that support
3765 # interlibrary dependencies.
3766 # 'none' -- dependencies not supported.
3767 # `unknown' -- same as none, but documents that we really don't know.
3768 # 'pass_all' -- all dependencies passed with no checks.
3769 # 'test_compile' -- check by making test program.
3770 # 'file_magic [[regex]]' -- check by looking for files in library path
3771 # which responds to the $file_magic_cmd with a given egrep regex.
3772 # If you have `file' or equivalent on your system and you're not sure
3773 # whether `pass_all' will *always* work, you probably want this one.
3774
3775 case $host_os in
3776 aix4* | aix5*)
3777   lt_cv_deplibs_check_method=pass_all
3778   ;;
3779
3780 beos*)
3781   lt_cv_deplibs_check_method=pass_all
3782   ;;
3783
3784 bsdi4*)
3785   lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
3786   lt_cv_file_magic_cmd='/usr/bin/file -L'
3787   lt_cv_file_magic_test_file=/shlib/libc.so
3788   ;;
3789
3790 cygwin* | mingw* | pw32*)
3791   lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
3792   lt_cv_file_magic_cmd='$OBJDUMP -f'
3793   ;;
3794
3795 darwin* | rhapsody*)
3796   lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library'
3797   lt_cv_file_magic_cmd='/usr/bin/file -L'
3798   case "$host_os" in
3799   rhapsody* | darwin1.[012])
3800     lt_cv_file_magic_test_file=`echo /System/Library/Frameworks/System.framework/Versions/*/System | head -1`
3801     ;;
3802   *) # Darwin 1.3 on
3803     lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
3804     ;;
3805   esac
3806   ;;
3807
3808 freebsd*)
3809   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3810     case $host_cpu in
3811     i*86 )
3812       # Not sure whether the presence of OpenBSD here was a mistake.
3813       # Let's accept both of them until this is cleared up.
3814       lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[3-9]86 (compact )?demand paged shared library'
3815       lt_cv_file_magic_cmd=/usr/bin/file
3816       lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3817       ;;
3818     esac
3819   else
3820     lt_cv_deplibs_check_method=pass_all
3821   fi
3822   ;;
3823
3824 gnu*)
3825   lt_cv_deplibs_check_method=pass_all
3826   ;;
3827
3828 hpux10.20*|hpux11*)
3829   lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library'
3830   lt_cv_file_magic_cmd=/usr/bin/file
3831   lt_cv_file_magic_test_file=/usr/lib/libc.sl
3832   ;;
3833
3834 irix5* | irix6* | nonstopux*)
3835   case $host_os in
3836   irix5* | nonstopux*)
3837     # this will be overridden with pass_all, but let us keep it just in case
3838     lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
3839     ;;
3840   *)
3841     case $LD in
3842     *-32|*"-32 ") libmagic=32-bit;;
3843     *-n32|*"-n32 ") libmagic=N32;;
3844     *-64|*"-64 ") libmagic=64-bit;;
3845     *) libmagic=never-match;;
3846     esac
3847     # this will be overridden with pass_all, but let us keep it just in case
3848     lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[1234] dynamic lib MIPS - version 1"
3849     ;;
3850   esac
3851   lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
3852   lt_cv_deplibs_check_method=pass_all
3853   ;;
3854
3855 # This must be Linux ELF.
3856 linux-gnu*)
3857   case $host_cpu in
3858   alpha* | hppa* | i*86 | mips | mipsel | powerpc* | sparc* | ia64*)
3859     lt_cv_deplibs_check_method=pass_all ;;
3860   *)
3861     # glibc up to 2.1.1 does not perform some relocations on ARM
3862     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;;
3863   esac
3864   lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
3865   ;;
3866
3867 netbsd*)
3868   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3869     lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
3870   else
3871     lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so$'
3872   fi
3873   ;;
3874
3875 newos6*)
3876   lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
3877   lt_cv_file_magic_cmd=/usr/bin/file
3878   lt_cv_file_magic_test_file=/usr/lib/libnls.so
3879   ;;
3880
3881 openbsd*)
3882   lt_cv_file_magic_cmd=/usr/bin/file
3883   lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3884   if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
3885     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB shared object'
3886   else
3887     lt_cv_deplibs_check_method='file_magic OpenBSD.* shared library'
3888   fi
3889   ;;
3890
3891 openedition*)
3892   lt_cv_deplibs_check_method=pass_all
3893   ;;
3894
3895 osf3* | osf4* | osf5*)
3896   # this will be overridden with pass_all, but let us keep it just in case
3897   lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
3898   lt_cv_file_magic_test_file=/shlib/libc.so
3899   lt_cv_deplibs_check_method=pass_all
3900   ;;
3901
3902 sco3.2v5*)
3903   lt_cv_deplibs_check_method=pass_all
3904   ;;
3905
3906 solaris*)
3907   lt_cv_deplibs_check_method=pass_all
3908   lt_cv_file_magic_test_file=/lib/libc.so
3909   ;;
3910
3911 sysv5uw[78]* | sysv4*uw2*)
3912   lt_cv_deplibs_check_method=pass_all
3913   ;;
3914
3915 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
3916   case $host_vendor in
3917   motorola)
3918     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]'
3919     lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
3920     ;;
3921   ncr)
3922     lt_cv_deplibs_check_method=pass_all
3923     ;;
3924   sequent)
3925     lt_cv_file_magic_cmd='/bin/file'
3926     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'
3927     ;;
3928   sni)
3929     lt_cv_file_magic_cmd='/bin/file'
3930     lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib"
3931     lt_cv_file_magic_test_file=/lib/libc.so
3932     ;;
3933   siemens)
3934     lt_cv_deplibs_check_method=pass_all
3935     ;;
3936   esac
3937   ;;
3938 esac
3939
3940 fi
3941
3942 echo "$ac_t""$lt_cv_deplibs_check_method" 1>&6
3943 file_magic_cmd=$lt_cv_file_magic_cmd
3944 deplibs_check_method=$lt_cv_deplibs_check_method
3945
3946 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
3947 echo "configure:3948: checking for object suffix" >&5
3948 if eval "test \"\${ac_cv_objext+set}\" = set"; then
3949   echo $ac_n "(cached) $ac_c" 1>&6
3950 else
3951   rm -f conftest*
3952 echo 'int i = 1;' > conftest.$ac_ext
3953 if { (eval echo configure:3954: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3954   for ac_file in conftest.*; do
3955     case $ac_file in
3956     *.c) ;;
3957     *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
3958     esac
3959   done
3960 else
3961   { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
3962 fi
3963 rm -f conftest*
3964 fi
3965
3966 echo "$ac_t""$ac_cv_objext" 1>&6
3967 OBJEXT=$ac_cv_objext
3968 ac_objext=$ac_cv_objext
3969
3970
3971
3972
3973 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
3974 echo "configure:3975: checking for executable suffix" >&5
3975 if eval "test \"\${ac_cv_exeext+set}\" = set"; then
3976   echo $ac_n "(cached) $ac_c" 1>&6
3977 else
3978   if test "$CYGWIN" = yes || test "$MINGW32" = yes || test "$EMXOS2" = yes; then
3979   ac_cv_exeext=.exe
3980 else
3981   rm -f conftest*
3982   echo 'int main () { return 0; }' > conftest.$ac_ext
3983   ac_cv_exeext=
3984   if { (eval echo configure:3985: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
3985     for file in conftest.*; do
3986       case $file in
3987       *.c | *.C | *.o | *.obj | *.xcoff) ;;
3988       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
3989       esac
3990     done
3991   else
3992     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
3993   fi
3994   rm -f conftest*
3995   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
3996 fi
3997 fi
3998
3999 EXEEXT=""
4000 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
4001 echo "$ac_t""${ac_cv_exeext}" 1>&6
4002 ac_exeext=$EXEEXT
4003
4004 if test $host != $build; then
4005   ac_tool_prefix=${host_alias}-
4006 else
4007   ac_tool_prefix=
4008 fi
4009
4010
4011
4012
4013 # Check for command to grab the raw symbol name followed by C symbol from nm.
4014 echo $ac_n "checking command to parse $NM output""... $ac_c" 1>&6
4015 echo "configure:4016: checking command to parse $NM output" >&5
4016 if eval "test \"\${lt_cv_sys_global_symbol_pipe+set}\" = set"; then
4017   echo $ac_n "(cached) $ac_c" 1>&6
4018 else
4019   
4020 # These are sane defaults that work on at least a few old systems.
4021 # [They come from Ultrix.  What could be older than Ultrix?!! ;)]
4022
4023 # Character class describing NM global symbol codes.
4024 symcode='[BCDEGRST]'
4025
4026 # Regexp to match symbols that can be accessed directly from C.
4027 sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
4028
4029 # Transform the above into a raw symbol and a C symbol.
4030 symxfrm='\1 \2\3 \3'
4031
4032 # Transform an extracted symbol line into a proper C declaration
4033 lt_cv_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern char \1;/p'"
4034
4035 # Transform an extracted symbol line into symbol name and symbol address
4036 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'"
4037
4038 # Define system-specific variables.
4039 case $host_os in
4040 aix*)
4041   symcode='[BCDT]'
4042   ;;
4043 cygwin* | mingw* | pw32*)
4044   symcode='[ABCDGISTW]'
4045   ;;
4046 hpux*) # Its linker distinguishes data from code symbols
4047   lt_cv_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern char \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
4048   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'"
4049   ;;
4050 irix* | nonstopux*)
4051   symcode='[BCDEGRST]'
4052   ;;
4053 osf*)
4054   symcode='[BCDEGQRST]'
4055   ;;
4056 solaris* | sysv5*)
4057   symcode='[BDT]'
4058   ;;
4059 sysv4)
4060   symcode='[DFNSTU]'
4061   ;;
4062 esac
4063
4064 # Handle CRLF in mingw tool chain
4065 opt_cr=
4066 case $host_os in
4067 mingw*)
4068   opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
4069   ;;
4070 esac
4071
4072 # If we're using GNU nm, then use its standard symbol codes.
4073 if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then
4074   symcode='[ABCDGISTW]'
4075 fi
4076
4077 # Try without a prefix undercore, then with it.
4078 for ac_symprfx in "" "_"; do
4079
4080   # Write the raw and C identifiers.
4081 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[         ]\($symcode$symcode*\)[         ][      ]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'"
4082
4083   # Check to see that the pipe works correctly.
4084   pipe_works=no
4085   rm -f conftest*
4086   cat > conftest.$ac_ext <<EOF
4087 #ifdef __cplusplus
4088 extern "C" {
4089 #endif
4090 char nm_test_var;
4091 void nm_test_func(){}
4092 #ifdef __cplusplus
4093 }
4094 #endif
4095 int main(){nm_test_var='a';nm_test_func();return(0);}
4096 EOF
4097
4098   if { (eval echo configure:4099: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4099     # Now try to grab the symbols.
4100     nlist=conftest.nm
4101     if { (eval echo configure:4102: \"$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
4102       # Try sorting and uniquifying the output.
4103       if sort "$nlist" | uniq > "$nlist"T; then
4104         mv -f "$nlist"T "$nlist"
4105       else
4106         rm -f "$nlist"T
4107       fi
4108
4109       # Make sure that we snagged all the symbols we need.
4110       if egrep ' nm_test_var$' "$nlist" >/dev/null; then
4111         if egrep ' nm_test_func$' "$nlist" >/dev/null; then
4112           cat <<EOF > conftest.$ac_ext
4113 #ifdef __cplusplus
4114 extern "C" {
4115 #endif
4116
4117 EOF
4118           # Now generate the symbol file.
4119           eval "$lt_cv_global_symbol_to_cdecl"' < "$nlist" >> conftest.$ac_ext'
4120
4121           cat <<EOF >> conftest.$ac_ext
4122 #if defined (__STDC__) && __STDC__
4123 # define lt_ptr void *
4124 #else
4125 # define lt_ptr char *
4126 # define const
4127 #endif
4128
4129 /* The mapping between symbol names and symbols. */
4130 const struct {
4131   const char *name;
4132   lt_ptr address;
4133 }
4134 lt_preloaded_symbols[] =
4135 {
4136 EOF
4137           sed "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (lt_ptr) \&\2},/" < "$nlist" >> conftest.$ac_ext
4138           cat <<\EOF >> conftest.$ac_ext
4139   {0, (lt_ptr) 0}
4140 };
4141
4142 #ifdef __cplusplus
4143 }
4144 #endif
4145 EOF
4146           # Now try linking the two files.
4147           mv conftest.$ac_objext conftstm.$ac_objext
4148           save_LIBS="$LIBS"
4149           save_CFLAGS="$CFLAGS"
4150           LIBS="conftstm.$ac_objext"
4151           CFLAGS="$CFLAGS$no_builtin_flag"
4152           if { (eval echo configure:4153: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest$ac_exeext; then
4153             pipe_works=yes
4154           fi
4155           LIBS="$save_LIBS"
4156           CFLAGS="$save_CFLAGS"
4157         else
4158           echo "cannot find nm_test_func in $nlist" >&5
4159         fi
4160       else
4161         echo "cannot find nm_test_var in $nlist" >&5
4162       fi
4163     else
4164       echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5
4165     fi
4166   else
4167     echo "$progname: failed program was:" >&5
4168     cat conftest.$ac_ext >&5
4169   fi
4170   rm -f conftest* conftst*
4171
4172   # Do not use the global_symbol_pipe unless it works.
4173   if test "$pipe_works" = yes; then
4174     break
4175   else
4176     lt_cv_sys_global_symbol_pipe=
4177   fi
4178 done
4179
4180 fi
4181
4182 global_symbol_pipe="$lt_cv_sys_global_symbol_pipe"
4183 if test -z "$lt_cv_sys_global_symbol_pipe"; then
4184   global_symbol_to_cdecl=
4185   global_symbol_to_c_name_address=
4186 else
4187   global_symbol_to_cdecl="$lt_cv_global_symbol_to_cdecl"
4188   global_symbol_to_c_name_address="$lt_cv_global_symbol_to_c_name_address"
4189 fi
4190 if test -z "$global_symbol_pipe$global_symbol_to_cdec$global_symbol_to_c_name_address";
4191 then
4192   echo "$ac_t""failed" 1>&6
4193 else
4194   echo "$ac_t""ok" 1>&6
4195 fi
4196
4197 for ac_hdr in dlfcn.h
4198 do
4199 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4200 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4201 echo "configure:4202: checking for $ac_hdr" >&5
4202 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
4203   echo $ac_n "(cached) $ac_c" 1>&6
4204 else
4205   cat > conftest.$ac_ext <<EOF
4206 #line 4207 "configure"
4207 #include "confdefs.h"
4208 #include <$ac_hdr>
4209 EOF
4210 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4211 { (eval echo configure:4212: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4212 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4213 if test -z "$ac_err"; then
4214   rm -rf conftest*
4215   eval "ac_cv_header_$ac_safe=yes"
4216 else
4217   echo "$ac_err" >&5
4218   echo "configure: failed program was:" >&5
4219   cat conftest.$ac_ext >&5
4220   rm -rf conftest*
4221   eval "ac_cv_header_$ac_safe=no"
4222 fi
4223 rm -f conftest*
4224 fi
4225 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4226   echo "$ac_t""yes" 1>&6
4227     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4228   cat >> confdefs.h <<EOF
4229 #define $ac_tr_hdr 1
4230 EOF
4231  
4232 else
4233   echo "$ac_t""no" 1>&6
4234 fi
4235 done
4236
4237
4238
4239
4240
4241
4242 # Only perform the check for file, if the check method requires it
4243 case $deplibs_check_method in
4244 file_magic*)
4245   if test "$file_magic_cmd" = '$MAGIC_CMD'; then
4246     echo $ac_n "checking for ${ac_tool_prefix}file""... $ac_c" 1>&6
4247 echo "configure:4248: checking for ${ac_tool_prefix}file" >&5
4248 if eval "test \"\${lt_cv_path_MAGIC_CMD+set}\" = set"; then
4249   echo $ac_n "(cached) $ac_c" 1>&6
4250 else
4251   case $MAGIC_CMD in
4252   /*)
4253   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
4254   ;;
4255   ?:/*)
4256   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
4257   ;;
4258   *)
4259   ac_save_MAGIC_CMD="$MAGIC_CMD"
4260   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4261   ac_dummy="/usr/bin:$PATH"
4262   for ac_dir in $ac_dummy; do
4263     test -z "$ac_dir" && ac_dir=.
4264     if test -f $ac_dir/${ac_tool_prefix}file; then
4265       lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file"
4266       if test -n "$file_magic_test_file"; then
4267         case $deplibs_check_method in
4268         "file_magic "*)
4269           file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
4270           MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4271           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
4272             egrep "$file_magic_regex" > /dev/null; then
4273             :
4274           else
4275             cat <<EOF 1>&2
4276
4277 *** Warning: the command libtool uses to detect shared libraries,
4278 *** $file_magic_cmd, produces output that libtool cannot recognize.
4279 *** The result is that libtool may fail to recognize shared libraries
4280 *** as such.  This will affect the creation of libtool libraries that
4281 *** depend on shared libraries, but programs linked with such libtool
4282 *** libraries will work regardless of this problem.  Nevertheless, you
4283 *** may want to report the problem to your system manager and/or to
4284 *** bug-libtool@gnu.org
4285
4286 EOF
4287           fi ;;
4288         esac
4289       fi
4290       break
4291     fi
4292   done
4293   IFS="$ac_save_ifs"
4294   MAGIC_CMD="$ac_save_MAGIC_CMD"
4295   ;;
4296 esac
4297 fi
4298
4299 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4300 if test -n "$MAGIC_CMD"; then
4301   echo "$ac_t""$MAGIC_CMD" 1>&6
4302 else
4303   echo "$ac_t""no" 1>&6
4304 fi
4305
4306 if test -z "$lt_cv_path_MAGIC_CMD"; then
4307   if test -n "$ac_tool_prefix"; then
4308     echo $ac_n "checking for file""... $ac_c" 1>&6
4309 echo "configure:4310: checking for file" >&5
4310 if eval "test \"\${lt_cv_path_MAGIC_CMD+set}\" = set"; then
4311   echo $ac_n "(cached) $ac_c" 1>&6
4312 else
4313   case $MAGIC_CMD in
4314   /*)
4315   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
4316   ;;
4317   ?:/*)
4318   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
4319   ;;
4320   *)
4321   ac_save_MAGIC_CMD="$MAGIC_CMD"
4322   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4323   ac_dummy="/usr/bin:$PATH"
4324   for ac_dir in $ac_dummy; do
4325     test -z "$ac_dir" && ac_dir=.
4326     if test -f $ac_dir/file; then
4327       lt_cv_path_MAGIC_CMD="$ac_dir/file"
4328       if test -n "$file_magic_test_file"; then
4329         case $deplibs_check_method in
4330         "file_magic "*)
4331           file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
4332           MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4333           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
4334             egrep "$file_magic_regex" > /dev/null; then
4335             :
4336           else
4337             cat <<EOF 1>&2
4338
4339 *** Warning: the command libtool uses to detect shared libraries,
4340 *** $file_magic_cmd, produces output that libtool cannot recognize.
4341 *** The result is that libtool may fail to recognize shared libraries
4342 *** as such.  This will affect the creation of libtool libraries that
4343 *** depend on shared libraries, but programs linked with such libtool
4344 *** libraries will work regardless of this problem.  Nevertheless, you
4345 *** may want to report the problem to your system manager and/or to
4346 *** bug-libtool@gnu.org
4347
4348 EOF
4349           fi ;;
4350         esac
4351       fi
4352       break
4353     fi
4354   done
4355   IFS="$ac_save_ifs"
4356   MAGIC_CMD="$ac_save_MAGIC_CMD"
4357   ;;
4358 esac
4359 fi
4360
4361 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4362 if test -n "$MAGIC_CMD"; then
4363   echo "$ac_t""$MAGIC_CMD" 1>&6
4364 else
4365   echo "$ac_t""no" 1>&6
4366 fi
4367
4368   else
4369     MAGIC_CMD=:
4370   fi
4371 fi
4372
4373   fi
4374   ;;
4375 esac
4376
4377 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4378 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
4379 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4380 echo "configure:4381: checking for $ac_word" >&5
4381 if eval "test \"\${ac_cv_prog_RANLIB+set}\" = set"; then
4382   echo $ac_n "(cached) $ac_c" 1>&6
4383 else
4384   if test -n "$RANLIB"; then
4385   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4386 else
4387   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4388   ac_dummy="$PATH"
4389   for ac_dir in $ac_dummy; do
4390     test -z "$ac_dir" && ac_dir=.
4391     if test -f $ac_dir/$ac_word; then
4392       ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4393       break
4394     fi
4395   done
4396   IFS="$ac_save_ifs"
4397 fi
4398 fi
4399 RANLIB="$ac_cv_prog_RANLIB"
4400 if test -n "$RANLIB"; then
4401   echo "$ac_t""$RANLIB" 1>&6
4402 else
4403   echo "$ac_t""no" 1>&6
4404 fi
4405
4406
4407 if test -z "$ac_cv_prog_RANLIB"; then
4408 if test -n "$ac_tool_prefix"; then
4409   # Extract the first word of "ranlib", so it can be a program name with args.
4410 set dummy ranlib; ac_word=$2
4411 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4412 echo "configure:4413: checking for $ac_word" >&5
4413 if eval "test \"\${ac_cv_prog_RANLIB+set}\" = set"; then
4414   echo $ac_n "(cached) $ac_c" 1>&6
4415 else
4416   if test -n "$RANLIB"; then
4417   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4418 else
4419   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4420   ac_dummy="$PATH"
4421   for ac_dir in $ac_dummy; do
4422     test -z "$ac_dir" && ac_dir=.
4423     if test -f $ac_dir/$ac_word; then
4424       ac_cv_prog_RANLIB="ranlib"
4425       break
4426     fi
4427   done
4428   IFS="$ac_save_ifs"
4429   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
4430 fi
4431 fi
4432 RANLIB="$ac_cv_prog_RANLIB"
4433 if test -n "$RANLIB"; then
4434   echo "$ac_t""$RANLIB" 1>&6
4435 else
4436   echo "$ac_t""no" 1>&6
4437 fi
4438
4439 else
4440   RANLIB=":"
4441 fi
4442 fi
4443
4444 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
4445 set dummy ${ac_tool_prefix}strip; ac_word=$2
4446 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4447 echo "configure:4448: checking for $ac_word" >&5
4448 if eval "test \"\${ac_cv_prog_STRIP+set}\" = set"; then
4449   echo $ac_n "(cached) $ac_c" 1>&6
4450 else
4451   if test -n "$STRIP"; then
4452   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
4453 else
4454   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4455   ac_dummy="$PATH"
4456   for ac_dir in $ac_dummy; do
4457     test -z "$ac_dir" && ac_dir=.
4458     if test -f $ac_dir/$ac_word; then
4459       ac_cv_prog_STRIP="${ac_tool_prefix}strip"
4460       break
4461     fi
4462   done
4463   IFS="$ac_save_ifs"
4464 fi
4465 fi
4466 STRIP="$ac_cv_prog_STRIP"
4467 if test -n "$STRIP"; then
4468   echo "$ac_t""$STRIP" 1>&6
4469 else
4470   echo "$ac_t""no" 1>&6
4471 fi
4472
4473
4474 if test -z "$ac_cv_prog_STRIP"; then
4475 if test -n "$ac_tool_prefix"; then
4476   # Extract the first word of "strip", so it can be a program name with args.
4477 set dummy strip; ac_word=$2
4478 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4479 echo "configure:4480: checking for $ac_word" >&5
4480 if eval "test \"\${ac_cv_prog_STRIP+set}\" = set"; then
4481   echo $ac_n "(cached) $ac_c" 1>&6
4482 else
4483   if test -n "$STRIP"; then
4484   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
4485 else
4486   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4487   ac_dummy="$PATH"
4488   for ac_dir in $ac_dummy; do
4489     test -z "$ac_dir" && ac_dir=.
4490     if test -f $ac_dir/$ac_word; then
4491       ac_cv_prog_STRIP="strip"
4492       break
4493     fi
4494   done
4495   IFS="$ac_save_ifs"
4496   test -z "$ac_cv_prog_STRIP" && ac_cv_prog_STRIP=":"
4497 fi
4498 fi
4499 STRIP="$ac_cv_prog_STRIP"
4500 if test -n "$STRIP"; then
4501   echo "$ac_t""$STRIP" 1>&6
4502 else
4503   echo "$ac_t""no" 1>&6
4504 fi
4505
4506 else
4507   STRIP=":"
4508 fi
4509 fi
4510
4511
4512 enable_dlopen=yes
4513 enable_win32_dll=yes
4514
4515 # Check whether --enable-libtool-lock or --disable-libtool-lock was given.
4516 if test "${enable_libtool_lock+set}" = set; then
4517   enableval="$enable_libtool_lock"
4518   :
4519 fi
4520
4521 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
4522
4523 # Some flags need to be propagated to the compiler or linker for good
4524 # libtool support.
4525 case $host in
4526 *-*-irix6*)
4527   # Find out which ABI we are using.
4528   echo '#line 4529 "configure"' > conftest.$ac_ext
4529   if { (eval echo configure:4530: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4530     case `/usr/bin/file conftest.$ac_objext` in
4531     *32-bit*)
4532       LD="${LD-ld} -32"
4533       ;;
4534     *N32*)
4535       LD="${LD-ld} -n32"
4536       ;;
4537     *64-bit*)
4538       LD="${LD-ld} -64"
4539       ;;
4540     esac
4541   fi
4542   rm -rf conftest*
4543   ;;
4544
4545 *-*-sco3.2v5*)
4546   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
4547   SAVE_CFLAGS="$CFLAGS"
4548   CFLAGS="$CFLAGS -belf"
4549   echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
4550 echo "configure:4551: checking whether the C compiler needs -belf" >&5
4551 if eval "test \"\${lt_cv_cc_needs_belf+set}\" = set"; then
4552   echo $ac_n "(cached) $ac_c" 1>&6
4553 else
4554   
4555      ac_ext=c
4556 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
4557 ac_cpp='$CPP $CPPFLAGS'
4558 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
4559 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
4560 cross_compiling=$ac_cv_prog_cc_cross
4561
4562      cat > conftest.$ac_ext <<EOF
4563 #line 4564 "configure"
4564 #include "confdefs.h"
4565
4566 int main() {
4567
4568 ; return 0; }
4569 EOF
4570 if { (eval echo configure:4571: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4571   rm -rf conftest*
4572   lt_cv_cc_needs_belf=yes
4573 else
4574   echo "configure: failed program was:" >&5
4575   cat conftest.$ac_ext >&5
4576   rm -rf conftest*
4577   lt_cv_cc_needs_belf=no
4578 fi
4579 rm -f conftest*
4580      ac_ext=c
4581 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
4582 ac_cpp='$CPP $CPPFLAGS'
4583 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
4584 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
4585 cross_compiling=$ac_cv_prog_cc_cross
4586
4587 fi
4588
4589 echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6
4590   if test x"$lt_cv_cc_needs_belf" != x"yes"; then
4591     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
4592     CFLAGS="$SAVE_CFLAGS"
4593   fi
4594   ;;
4595
4596 *-*-cygwin* | *-*-mingw* | *-*-pw32*)
4597   # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
4598 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
4599 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4600 echo "configure:4601: checking for $ac_word" >&5
4601 if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then
4602   echo $ac_n "(cached) $ac_c" 1>&6
4603 else
4604   if test -n "$DLLTOOL"; then
4605   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
4606 else
4607   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4608   ac_dummy="$PATH"
4609   for ac_dir in $ac_dummy; do
4610     test -z "$ac_dir" && ac_dir=.
4611     if test -f $ac_dir/$ac_word; then
4612       ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
4613       break
4614     fi
4615   done
4616   IFS="$ac_save_ifs"
4617 fi
4618 fi
4619 DLLTOOL="$ac_cv_prog_DLLTOOL"
4620 if test -n "$DLLTOOL"; then
4621   echo "$ac_t""$DLLTOOL" 1>&6
4622 else
4623   echo "$ac_t""no" 1>&6
4624 fi
4625
4626
4627 if test -z "$ac_cv_prog_DLLTOOL"; then
4628 if test -n "$ac_tool_prefix"; then
4629   # Extract the first word of "dlltool", so it can be a program name with args.
4630 set dummy dlltool; ac_word=$2
4631 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4632 echo "configure:4633: checking for $ac_word" >&5
4633 if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then
4634   echo $ac_n "(cached) $ac_c" 1>&6
4635 else
4636   if test -n "$DLLTOOL"; then
4637   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
4638 else
4639   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4640   ac_dummy="$PATH"
4641   for ac_dir in $ac_dummy; do
4642     test -z "$ac_dir" && ac_dir=.
4643     if test -f $ac_dir/$ac_word; then
4644       ac_cv_prog_DLLTOOL="dlltool"
4645       break
4646     fi
4647   done
4648   IFS="$ac_save_ifs"
4649   test -z "$ac_cv_prog_DLLTOOL" && ac_cv_prog_DLLTOOL="false"
4650 fi
4651 fi
4652 DLLTOOL="$ac_cv_prog_DLLTOOL"
4653 if test -n "$DLLTOOL"; then
4654   echo "$ac_t""$DLLTOOL" 1>&6
4655 else
4656   echo "$ac_t""no" 1>&6
4657 fi
4658
4659 else
4660   DLLTOOL="false"
4661 fi
4662 fi
4663
4664   # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
4665 set dummy ${ac_tool_prefix}as; ac_word=$2
4666 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4667 echo "configure:4668: checking for $ac_word" >&5
4668 if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then
4669   echo $ac_n "(cached) $ac_c" 1>&6
4670 else
4671   if test -n "$AS"; then
4672   ac_cv_prog_AS="$AS" # Let the user override the test.
4673 else
4674   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4675   ac_dummy="$PATH"
4676   for ac_dir in $ac_dummy; do
4677     test -z "$ac_dir" && ac_dir=.
4678     if test -f $ac_dir/$ac_word; then
4679       ac_cv_prog_AS="${ac_tool_prefix}as"
4680       break
4681     fi
4682   done
4683   IFS="$ac_save_ifs"
4684 fi
4685 fi
4686 AS="$ac_cv_prog_AS"
4687 if test -n "$AS"; then
4688   echo "$ac_t""$AS" 1>&6
4689 else
4690   echo "$ac_t""no" 1>&6
4691 fi
4692
4693
4694 if test -z "$ac_cv_prog_AS"; then
4695 if test -n "$ac_tool_prefix"; then
4696   # Extract the first word of "as", so it can be a program name with args.
4697 set dummy as; ac_word=$2
4698 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4699 echo "configure:4700: checking for $ac_word" >&5
4700 if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then
4701   echo $ac_n "(cached) $ac_c" 1>&6
4702 else
4703   if test -n "$AS"; then
4704   ac_cv_prog_AS="$AS" # Let the user override the test.
4705 else
4706   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4707   ac_dummy="$PATH"
4708   for ac_dir in $ac_dummy; do
4709     test -z "$ac_dir" && ac_dir=.
4710     if test -f $ac_dir/$ac_word; then
4711       ac_cv_prog_AS="as"
4712       break
4713     fi
4714   done
4715   IFS="$ac_save_ifs"
4716   test -z "$ac_cv_prog_AS" && ac_cv_prog_AS="false"
4717 fi
4718 fi
4719 AS="$ac_cv_prog_AS"
4720 if test -n "$AS"; then
4721   echo "$ac_t""$AS" 1>&6
4722 else
4723   echo "$ac_t""no" 1>&6
4724 fi
4725
4726 else
4727   AS="false"
4728 fi
4729 fi
4730
4731   # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
4732 set dummy ${ac_tool_prefix}objdump; ac_word=$2
4733 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4734 echo "configure:4735: checking for $ac_word" >&5
4735 if eval "test \"\${ac_cv_prog_OBJDUMP+set}\" = set"; then
4736   echo $ac_n "(cached) $ac_c" 1>&6
4737 else
4738   if test -n "$OBJDUMP"; then
4739   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
4740 else
4741   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4742   ac_dummy="$PATH"
4743   for ac_dir in $ac_dummy; do
4744     test -z "$ac_dir" && ac_dir=.
4745     if test -f $ac_dir/$ac_word; then
4746       ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
4747       break
4748     fi
4749   done
4750   IFS="$ac_save_ifs"
4751 fi
4752 fi
4753 OBJDUMP="$ac_cv_prog_OBJDUMP"
4754 if test -n "$OBJDUMP"; then
4755   echo "$ac_t""$OBJDUMP" 1>&6
4756 else
4757   echo "$ac_t""no" 1>&6
4758 fi
4759
4760
4761 if test -z "$ac_cv_prog_OBJDUMP"; then
4762 if test -n "$ac_tool_prefix"; then
4763   # Extract the first word of "objdump", so it can be a program name with args.
4764 set dummy objdump; ac_word=$2
4765 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4766 echo "configure:4767: checking for $ac_word" >&5
4767 if eval "test \"\${ac_cv_prog_OBJDUMP+set}\" = set"; then
4768   echo $ac_n "(cached) $ac_c" 1>&6
4769 else
4770   if test -n "$OBJDUMP"; then
4771   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
4772 else
4773   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4774   ac_dummy="$PATH"
4775   for ac_dir in $ac_dummy; do
4776     test -z "$ac_dir" && ac_dir=.
4777     if test -f $ac_dir/$ac_word; then
4778       ac_cv_prog_OBJDUMP="objdump"
4779       break
4780     fi
4781   done
4782   IFS="$ac_save_ifs"
4783   test -z "$ac_cv_prog_OBJDUMP" && ac_cv_prog_OBJDUMP="false"
4784 fi
4785 fi
4786 OBJDUMP="$ac_cv_prog_OBJDUMP"
4787 if test -n "$OBJDUMP"; then
4788   echo "$ac_t""$OBJDUMP" 1>&6
4789 else
4790   echo "$ac_t""no" 1>&6
4791 fi
4792
4793 else
4794   OBJDUMP="false"
4795 fi
4796 fi
4797
4798
4799   # recent cygwin and mingw systems supply a stub DllMain which the user
4800   # can override, but on older systems we have to supply one
4801   echo $ac_n "checking if libtool should supply DllMain function""... $ac_c" 1>&6
4802 echo "configure:4803: checking if libtool should supply DllMain function" >&5
4803 if eval "test \"\${lt_cv_need_dllmain+set}\" = set"; then
4804   echo $ac_n "(cached) $ac_c" 1>&6
4805 else
4806   cat > conftest.$ac_ext <<EOF
4807 #line 4808 "configure"
4808 #include "confdefs.h"
4809
4810 int main() {
4811 extern int __attribute__((__stdcall__)) DllMain(void*, int, void*);
4812       DllMain (0, 0, 0);
4813 ; return 0; }
4814 EOF
4815 if { (eval echo configure:4816: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4816   rm -rf conftest*
4817   lt_cv_need_dllmain=no
4818 else
4819   echo "configure: failed program was:" >&5
4820   cat conftest.$ac_ext >&5
4821   rm -rf conftest*
4822   lt_cv_need_dllmain=yes
4823 fi
4824 rm -f conftest*
4825 fi
4826
4827 echo "$ac_t""$lt_cv_need_dllmain" 1>&6
4828
4829   case $host/$CC in
4830   *-*-cygwin*/gcc*-mno-cygwin*|*-*-mingw*)
4831     # old mingw systems require "-dll" to link a DLL, while more recent ones
4832     # require "-mdll"
4833     SAVE_CFLAGS="$CFLAGS"
4834     CFLAGS="$CFLAGS -mdll"
4835     echo $ac_n "checking how to link DLLs""... $ac_c" 1>&6
4836 echo "configure:4837: checking how to link DLLs" >&5
4837 if eval "test \"\${lt_cv_cc_dll_switch+set}\" = set"; then
4838   echo $ac_n "(cached) $ac_c" 1>&6
4839 else
4840   cat > conftest.$ac_ext <<EOF
4841 #line 4842 "configure"
4842 #include "confdefs.h"
4843
4844 int main() {
4845
4846 ; return 0; }
4847 EOF
4848 if { (eval echo configure:4849: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4849   rm -rf conftest*
4850   lt_cv_cc_dll_switch=-mdll
4851 else
4852   echo "configure: failed program was:" >&5
4853   cat conftest.$ac_ext >&5
4854   rm -rf conftest*
4855   lt_cv_cc_dll_switch=-dll
4856 fi
4857 rm -f conftest*
4858 fi
4859
4860 echo "$ac_t""$lt_cv_cc_dll_switch" 1>&6
4861     CFLAGS="$SAVE_CFLAGS" ;;
4862   *-*-cygwin* | *-*-pw32*)
4863     # cygwin systems need to pass --dll to the linker, and not link
4864     # crt.o which will require a WinMain@16 definition.
4865     lt_cv_cc_dll_switch="-Wl,--dll -nostartfiles" ;;
4866   esac
4867   ;;
4868   
4869 esac
4870
4871 # Sed substitution that helps us do robust quoting.  It backslashifies
4872 # metacharacters that are still active within double-quoted strings.
4873 Xsed='sed -e s/^X//'
4874 sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g'
4875
4876 # Same as above, but do not quote variable references.
4877 double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g'
4878
4879 # Sed substitution to delay expansion of an escaped shell variable in a
4880 # double_quote_subst'ed string.
4881 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
4882
4883 # Constants:
4884 rm="rm -f"
4885
4886 # Global variables:
4887 default_ofile=libtool
4888 can_build_shared=yes
4889
4890 # All known linkers require a `.a' archive for static linking (except M$VC,
4891 # which needs '.lib').
4892 libext=a
4893 ltmain="$ac_aux_dir/ltmain.sh"
4894 ofile="$default_ofile"
4895 with_gnu_ld="$lt_cv_prog_gnu_ld"
4896 need_locks="$enable_libtool_lock"
4897
4898 old_CC="$CC"
4899 old_CFLAGS="$CFLAGS"
4900
4901 # Set sane defaults for various variables
4902 test -z "$AR" && AR=ar
4903 test -z "$AR_FLAGS" && AR_FLAGS=cru
4904 test -z "$AS" && AS=as
4905 test -z "$CC" && CC=cc
4906 test -z "$DLLTOOL" && DLLTOOL=dlltool
4907 test -z "$LD" && LD=ld
4908 test -z "$LN_S" && LN_S="ln -s"
4909 test -z "$MAGIC_CMD" && MAGIC_CMD=file
4910 test -z "$NM" && NM=nm
4911 test -z "$OBJDUMP" && OBJDUMP=objdump
4912 test -z "$RANLIB" && RANLIB=:
4913 test -z "$STRIP" && STRIP=:
4914 test -z "$ac_objext" && ac_objext=o
4915
4916 if test x"$host" != x"$build"; then
4917   ac_tool_prefix=${host_alias}-
4918 else
4919   ac_tool_prefix=
4920 fi
4921
4922 # Transform linux* to *-*-linux-gnu*, to support old configure scripts.
4923 case $host_os in
4924 linux-gnu*) ;;
4925 linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
4926 esac
4927
4928 case $host_os in
4929 aix3*)
4930   # AIX sometimes has problems with the GCC collect2 program.  For some
4931   # reason, if we set the COLLECT_NAMES environment variable, the problems
4932   # vanish in a puff of smoke.
4933   if test "X${COLLECT_NAMES+set}" != Xset; then
4934     COLLECT_NAMES=
4935     export COLLECT_NAMES
4936   fi
4937   ;;
4938 esac
4939
4940 # Determine commands to create old-style static archives.
4941 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
4942 old_postinstall_cmds='chmod 644 $oldlib'
4943 old_postuninstall_cmds=
4944
4945 if test -n "$RANLIB"; then
4946   case $host_os in
4947   openbsd*)
4948     old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds"
4949     ;;
4950   *)
4951     old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
4952     ;;
4953   esac
4954   old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
4955 fi
4956
4957 # Allow CC to be a program name with arguments.
4958 set dummy $CC
4959 compiler="$2"
4960
4961 echo $ac_n "checking for objdir""... $ac_c" 1>&6
4962 echo "configure:4963: checking for objdir" >&5
4963 rm -f .libs 2>/dev/null
4964 mkdir .libs 2>/dev/null
4965 if test -d .libs; then
4966   objdir=.libs
4967 else
4968   # MS-DOS does not allow filenames that begin with a dot.
4969   objdir=_libs
4970 fi
4971 rmdir .libs 2>/dev/null
4972 echo "$ac_t""$objdir" 1>&6
4973
4974
4975 # Check whether --with-pic or --without-pic was given.
4976 if test "${with_pic+set}" = set; then
4977   withval="$with_pic"
4978   pic_mode="$withval"
4979 else
4980   pic_mode=default
4981 fi
4982
4983 test -z "$pic_mode" && pic_mode=default
4984
4985 # We assume here that the value for lt_cv_prog_cc_pic will not be cached
4986 # in isolation, and that seeing it set (from the cache) indicates that
4987 # the associated values are set (in the cache) correctly too.
4988 echo $ac_n "checking for $compiler option to produce PIC""... $ac_c" 1>&6
4989 echo "configure:4990: checking for $compiler option to produce PIC" >&5
4990 if eval "test \"\${lt_cv_prog_cc_pic+set}\" = set"; then
4991   echo $ac_n "(cached) $ac_c" 1>&6
4992 else
4993    lt_cv_prog_cc_pic=
4994   lt_cv_prog_cc_shlib=
4995   lt_cv_prog_cc_wl=
4996   lt_cv_prog_cc_static=
4997   lt_cv_prog_cc_no_builtin=
4998   lt_cv_prog_cc_can_build_shared=$can_build_shared
4999
5000   if test "$GCC" = yes; then
5001     lt_cv_prog_cc_wl='-Wl,'
5002     lt_cv_prog_cc_static='-static'
5003
5004     case $host_os in
5005     aix*)
5006       # Below there is a dirty hack to force normal static linking with -ldl
5007       # The problem is because libdl dynamically linked with both libc and
5008       # libC (AIX C++ library), which obviously doesn't included in libraries
5009       # list by gcc. This cause undefined symbols with -static flags.
5010       # This hack allows C programs to be linked with "-static -ldl", but
5011       # not sure about C++ programs.
5012       lt_cv_prog_cc_static="$lt_cv_prog_cc_static ${lt_cv_prog_cc_wl}-lC"
5013       ;;
5014     amigaos*)
5015       # FIXME: we need at least 68020 code to build shared libraries, but
5016       # adding the `-m68020' flag to GCC prevents building anything better,
5017       # like `-m68040'.
5018       lt_cv_prog_cc_pic='-m68020 -resident32 -malways-restore-a4'
5019       ;;
5020     beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
5021       # PIC is the default for these OSes.
5022       ;;
5023     darwin* | rhapsody*)
5024       # PIC is the default on this platform
5025       # Common symbols not allowed in MH_DYLIB files
5026       lt_cv_prog_cc_pic='-fno-common'
5027       ;;
5028     cygwin* | mingw* | pw32* | os2*)
5029       # This hack is so that the source file can tell whether it is being
5030       # built for inclusion in a dll (and should export symbols for example).
5031       lt_cv_prog_cc_pic='-DDLL_EXPORT'
5032       ;;
5033     sysv4*MP*)
5034       if test -d /usr/nec; then
5035          lt_cv_prog_cc_pic=-Kconform_pic
5036       fi
5037       ;;
5038     *)
5039       lt_cv_prog_cc_pic='-fPIC'
5040       ;;
5041     esac
5042   else
5043     # PORTME Check for PIC flags for the system compiler.
5044     case $host_os in
5045     aix3* | aix4* | aix5*)
5046       lt_cv_prog_cc_wl='-Wl,'
5047       # All AIX code is PIC.
5048       if test "$host_cpu" = ia64; then
5049         # AIX 5 now supports IA64 processor
5050         lt_cv_prog_cc_static='-Bstatic'
5051       else
5052         lt_cv_prog_cc_static='-bnso -bI:/lib/syscalls.exp'
5053       fi
5054       ;;
5055
5056     hpux9* | hpux10* | hpux11*)
5057       # Is there a better lt_cv_prog_cc_static that works with the bundled CC?
5058       lt_cv_prog_cc_wl='-Wl,'
5059       lt_cv_prog_cc_static="${lt_cv_prog_cc_wl}-a ${lt_cv_prog_cc_wl}archive"
5060       lt_cv_prog_cc_pic='+Z'
5061       ;;
5062
5063     irix5* | irix6* | nonstopux*)
5064       lt_cv_prog_cc_wl='-Wl,'
5065       lt_cv_prog_cc_static='-non_shared'
5066       # PIC (with -KPIC) is the default.
5067       ;;
5068
5069     cygwin* | mingw* | pw32* | os2*)
5070       # This hack is so that the source file can tell whether it is being
5071       # built for inclusion in a dll (and should export symbols for example).
5072       lt_cv_prog_cc_pic='-DDLL_EXPORT'
5073       ;;
5074
5075     newsos6)
5076       lt_cv_prog_cc_pic='-KPIC'
5077       lt_cv_prog_cc_static='-Bstatic'
5078       ;;
5079     
5080     openedition)
5081       # XPLINK code is PIC by default
5082       ;;
5083
5084     osf3* | osf4* | osf5*)
5085       # All OSF/1 code is PIC.
5086       lt_cv_prog_cc_wl='-Wl,'
5087       lt_cv_prog_cc_static='-non_shared'
5088       ;;
5089
5090     sco3.2v5*)
5091       lt_cv_prog_cc_pic='-Kpic'
5092       lt_cv_prog_cc_static='-dn'
5093       lt_cv_prog_cc_shlib='-belf'
5094       ;;
5095
5096     solaris*)
5097       lt_cv_prog_cc_pic='-KPIC'
5098       lt_cv_prog_cc_static='-Bstatic'
5099       lt_cv_prog_cc_wl='-Wl,'
5100       ;;
5101
5102     sunos4*)
5103       lt_cv_prog_cc_pic='-PIC'
5104       lt_cv_prog_cc_static='-Bstatic'
5105       lt_cv_prog_cc_wl='-Qoption ld '
5106       ;;
5107
5108     sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
5109       lt_cv_prog_cc_pic='-KPIC'
5110       lt_cv_prog_cc_static='-Bstatic'
5111       lt_cv_prog_cc_wl='-Wl,'
5112       ;;
5113
5114     uts4*)
5115       lt_cv_prog_cc_pic='-pic'
5116       lt_cv_prog_cc_static='-Bstatic'
5117       ;;
5118
5119     sysv4*MP*)
5120       if test -d /usr/nec ;then
5121         lt_cv_prog_cc_pic='-Kconform_pic'
5122         lt_cv_prog_cc_static='-Bstatic'
5123       fi
5124       ;;
5125
5126     *)
5127       lt_cv_prog_cc_can_build_shared=no
5128       ;;
5129     esac
5130   fi
5131
5132 fi
5133
5134 if test -z "$lt_cv_prog_cc_pic"; then
5135   echo "$ac_t""none" 1>&6
5136 else
5137   echo "$ac_t""$lt_cv_prog_cc_pic" 1>&6
5138
5139   # Check to make sure the pic_flag actually works.
5140   echo $ac_n "checking if $compiler PIC flag $lt_cv_prog_cc_pic works""... $ac_c" 1>&6
5141 echo "configure:5142: checking if $compiler PIC flag $lt_cv_prog_cc_pic works" >&5
5142   if eval "test \"\${lt_cv_prog_cc_pic_works+set}\" = set"; then
5143   echo $ac_n "(cached) $ac_c" 1>&6
5144 else
5145       save_CFLAGS="$CFLAGS"
5146     CFLAGS="$CFLAGS $lt_cv_prog_cc_pic -DPIC"
5147     cat > conftest.$ac_ext <<EOF
5148 #line 5149 "configure"
5149 #include "confdefs.h"
5150
5151 int main() {
5152
5153 ; return 0; }
5154 EOF
5155 if { (eval echo configure:5156: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5156   rm -rf conftest*
5157         case $host_os in
5158       hpux9* | hpux10* | hpux11*)
5159         # On HP-UX, both CC and GCC only warn that PIC is supported... then
5160         # they create non-PIC objects.  So, if there were any warnings, we
5161         # assume that PIC is not supported.
5162         if test -s conftest.err; then
5163           lt_cv_prog_cc_pic_works=no
5164         else
5165           lt_cv_prog_cc_pic_works=yes
5166         fi
5167         ;;
5168       *)
5169         lt_cv_prog_cc_pic_works=yes
5170         ;;
5171       esac
5172     
5173 else
5174   echo "configure: failed program was:" >&5
5175   cat conftest.$ac_ext >&5
5176   rm -rf conftest*
5177         lt_cv_prog_cc_pic_works=no
5178     
5179 fi
5180 rm -f conftest*
5181     CFLAGS="$save_CFLAGS"
5182   
5183 fi
5184
5185
5186   if test "X$lt_cv_prog_cc_pic_works" = Xno; then
5187     lt_cv_prog_cc_pic=
5188     lt_cv_prog_cc_can_build_shared=no
5189   else
5190     lt_cv_prog_cc_pic=" $lt_cv_prog_cc_pic"
5191   fi
5192
5193   echo "$ac_t""$lt_cv_prog_cc_pic_works" 1>&6
5194 fi
5195
5196 # Check for any special shared library compilation flags.
5197 if test -n "$lt_cv_prog_cc_shlib"; then
5198   echo "configure: warning: \`$CC' requires \`$lt_cv_prog_cc_shlib' to build shared libraries" 1>&2
5199   if echo "$old_CC $old_CFLAGS " | egrep -e "[  ]$lt_cv_prog_cc_shlib[  ]" >/dev/null; then :
5200   else
5201    echo "configure: warning: add \`$lt_cv_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure" 1>&2
5202     lt_cv_prog_cc_can_build_shared=no
5203   fi
5204 fi
5205
5206 echo $ac_n "checking if $compiler static flag $lt_cv_prog_cc_static works""... $ac_c" 1>&6
5207 echo "configure:5208: checking if $compiler static flag $lt_cv_prog_cc_static works" >&5
5208 if eval "test \"\${lt_cv_prog_cc_static_works+set}\" = set"; then
5209   echo $ac_n "(cached) $ac_c" 1>&6
5210 else
5211     lt_cv_prog_cc_static_works=no
5212   save_LDFLAGS="$LDFLAGS"
5213   LDFLAGS="$LDFLAGS $lt_cv_prog_cc_static"
5214   cat > conftest.$ac_ext <<EOF
5215 #line 5216 "configure"
5216 #include "confdefs.h"
5217
5218 int main() {
5219
5220 ; return 0; }
5221 EOF
5222 if { (eval echo configure:5223: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5223   rm -rf conftest*
5224   lt_cv_prog_cc_static_works=yes
5225 else
5226   echo "configure: failed program was:" >&5
5227   cat conftest.$ac_ext >&5
5228 fi
5229 rm -f conftest*
5230   LDFLAGS="$save_LDFLAGS"
5231
5232 fi
5233
5234
5235 # Belt *and* braces to stop my trousers falling down:
5236 test "X$lt_cv_prog_cc_static_works" = Xno && lt_cv_prog_cc_static=
5237 echo "$ac_t""$lt_cv_prog_cc_static_works" 1>&6
5238
5239 pic_flag="$lt_cv_prog_cc_pic"
5240 special_shlib_compile_flags="$lt_cv_prog_cc_shlib"
5241 wl="$lt_cv_prog_cc_wl"
5242 link_static_flag="$lt_cv_prog_cc_static"
5243 no_builtin_flag="$lt_cv_prog_cc_no_builtin"
5244 can_build_shared="$lt_cv_prog_cc_can_build_shared"
5245
5246
5247 # Check to see if options -o and -c are simultaneously supported by compiler
5248 echo $ac_n "checking if $compiler supports -c -o file.$ac_objext""... $ac_c" 1>&6
5249 echo "configure:5250: checking if $compiler supports -c -o file.$ac_objext" >&5
5250 if eval "test \"\${lt_cv_compiler_c_o+set}\" = set"; then
5251   echo $ac_n "(cached) $ac_c" 1>&6
5252 else
5253   
5254 $rm -r conftest 2>/dev/null
5255 mkdir conftest
5256 cd conftest
5257 echo "int some_variable = 0;" > conftest.$ac_ext
5258 mkdir out
5259 # According to Tom Tromey, Ian Lance Taylor reported there are C compilers
5260 # that will create temporary files in the current directory regardless of
5261 # the output directory.  Thus, making CWD read-only will cause this test
5262 # to fail, enabling locking or at least warning the user not to do parallel
5263 # builds.
5264 chmod -w .
5265 save_CFLAGS="$CFLAGS"
5266 CFLAGS="$CFLAGS -o out/conftest2.$ac_objext"
5267 compiler_c_o=no
5268 if { (eval echo configure:5269: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then
5269   # The compiler can only warn and ignore the option if not recognized
5270   # So say no if there are warnings
5271   if test -s out/conftest.err; then
5272     lt_cv_compiler_c_o=no
5273   else
5274     lt_cv_compiler_c_o=yes
5275   fi
5276 else
5277   # Append any errors to the config.log.
5278   cat out/conftest.err 1>&5
5279   lt_cv_compiler_c_o=no
5280 fi
5281 CFLAGS="$save_CFLAGS"
5282 chmod u+w .
5283 $rm conftest* out/*
5284 rmdir out
5285 cd ..
5286 rmdir conftest
5287 $rm -r conftest 2>/dev/null
5288
5289 fi
5290
5291 compiler_c_o=$lt_cv_compiler_c_o
5292 echo "$ac_t""$compiler_c_o" 1>&6
5293
5294 if test x"$compiler_c_o" = x"yes"; then
5295   # Check to see if we can write to a .lo
5296   echo $ac_n "checking if $compiler supports -c -o file.lo""... $ac_c" 1>&6
5297 echo "configure:5298: checking if $compiler supports -c -o file.lo" >&5
5298   if eval "test \"\${lt_cv_compiler_o_lo+set}\" = set"; then
5299   echo $ac_n "(cached) $ac_c" 1>&6
5300 else
5301   
5302   lt_cv_compiler_o_lo=no
5303   save_CFLAGS="$CFLAGS"
5304   CFLAGS="$CFLAGS -c -o conftest.lo"
5305   save_objext="$ac_objext"
5306   ac_objext=lo
5307   cat > conftest.$ac_ext <<EOF
5308 #line 5309 "configure"
5309 #include "confdefs.h"
5310
5311 int main() {
5312 int some_variable = 0;
5313 ; return 0; }
5314 EOF
5315 if { (eval echo configure:5316: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5316   rm -rf conftest*
5317       # The compiler can only warn and ignore the option if not recognized
5318     # So say no if there are warnings
5319     if test -s conftest.err; then
5320       lt_cv_compiler_o_lo=no
5321     else
5322       lt_cv_compiler_o_lo=yes
5323     fi
5324   
5325 else
5326   echo "configure: failed program was:" >&5
5327   cat conftest.$ac_ext >&5
5328 fi
5329 rm -f conftest*
5330   ac_objext="$save_objext"
5331   CFLAGS="$save_CFLAGS"
5332   
5333 fi
5334
5335   compiler_o_lo=$lt_cv_compiler_o_lo
5336   echo "$ac_t""$compiler_o_lo" 1>&6
5337 else
5338   compiler_o_lo=no
5339 fi
5340
5341 # Check to see if we can do hard links to lock some files if needed
5342 hard_links="nottested"
5343 if test "$compiler_c_o" = no && test "$need_locks" != no; then
5344   # do not overwrite the value of need_locks provided by the user
5345   echo $ac_n "checking if we can lock with hard links""... $ac_c" 1>&6
5346 echo "configure:5347: checking if we can lock with hard links" >&5
5347   hard_links=yes
5348   $rm conftest*
5349   ln conftest.a conftest.b 2>/dev/null && hard_links=no
5350   touch conftest.a
5351   ln conftest.a conftest.b 2>&5 || hard_links=no
5352   ln conftest.a conftest.b 2>/dev/null && hard_links=no
5353   echo "$ac_t""$hard_links" 1>&6
5354   if test "$hard_links" = no; then
5355     echo "configure: warning: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" 1>&2
5356     need_locks=warn
5357   fi
5358 else
5359   need_locks=no
5360 fi
5361
5362 if test "$GCC" = yes; then
5363   # Check to see if options -fno-rtti -fno-exceptions are supported by compiler
5364   echo $ac_n "checking if $compiler supports -fno-rtti -fno-exceptions""... $ac_c" 1>&6
5365 echo "configure:5366: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
5366   echo "int some_variable = 0;" > conftest.$ac_ext
5367   save_CFLAGS="$CFLAGS"
5368   CFLAGS="$CFLAGS -fno-rtti -fno-exceptions -c conftest.$ac_ext"
5369   compiler_rtti_exceptions=no
5370   cat > conftest.$ac_ext <<EOF
5371 #line 5372 "configure"
5372 #include "confdefs.h"
5373
5374 int main() {
5375 int some_variable = 0;
5376 ; return 0; }
5377 EOF
5378 if { (eval echo configure:5379: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5379   rm -rf conftest*
5380       # The compiler can only warn and ignore the option if not recognized
5381     # So say no if there are warnings
5382     if test -s conftest.err; then
5383       compiler_rtti_exceptions=no
5384     else
5385       compiler_rtti_exceptions=yes
5386     fi
5387   
5388 else
5389   echo "configure: failed program was:" >&5
5390   cat conftest.$ac_ext >&5
5391 fi
5392 rm -f conftest*
5393   CFLAGS="$save_CFLAGS"
5394   echo "$ac_t""$compiler_rtti_exceptions" 1>&6
5395
5396   if test "$compiler_rtti_exceptions" = "yes"; then
5397     no_builtin_flag=' -fno-builtin -fno-rtti -fno-exceptions'
5398   else
5399     no_builtin_flag=' -fno-builtin'
5400   fi
5401 fi
5402
5403 # See if the linker supports building shared libraries.
5404 echo $ac_n "checking whether the linker ($LD) supports shared libraries""... $ac_c" 1>&6
5405 echo "configure:5406: checking whether the linker ($LD) supports shared libraries" >&5
5406
5407 allow_undefined_flag=
5408 no_undefined_flag=
5409 need_lib_prefix=unknown
5410 need_version=unknown
5411 # when you set need_version to no, make sure it does not cause -set_version
5412 # flags to be left without arguments
5413 archive_cmds=
5414 archive_expsym_cmds=
5415 old_archive_from_new_cmds=
5416 old_archive_from_expsyms_cmds=
5417 export_dynamic_flag_spec=
5418 whole_archive_flag_spec=
5419 thread_safe_flag_spec=
5420 hardcode_into_libs=no
5421 hardcode_libdir_flag_spec=
5422 hardcode_libdir_separator=
5423 hardcode_direct=no
5424 hardcode_minus_L=no
5425 hardcode_shlibpath_var=unsupported
5426 runpath_var=
5427 link_all_deplibs=unknown
5428 always_export_symbols=no
5429 export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols'
5430 # include_expsyms should be a list of space-separated symbols to be *always*
5431 # included in the symbol list
5432 include_expsyms=
5433 # exclude_expsyms can be an egrep regular expression of symbols to exclude
5434 # it will be wrapped by ` (' and `)$', so one must not match beginning or
5435 # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
5436 # as well as any symbol that contains `d'.
5437 exclude_expsyms="_GLOBAL_OFFSET_TABLE_"
5438 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
5439 # platforms (ab)use it in PIC code, but their linkers get confused if
5440 # the symbol is explicitly referenced.  Since portable code cannot
5441 # rely on this symbol name, it's probably fine to never include it in
5442 # preloaded symbol tables.
5443 extract_expsyms_cmds=
5444
5445 case $host_os in
5446 cygwin* | mingw* | pw32*)
5447   # FIXME: the MSVC++ port hasn't been tested in a loooong time
5448   # When not using gcc, we currently assume that we are using
5449   # Microsoft Visual C++.
5450   if test "$GCC" != yes; then
5451     with_gnu_ld=no
5452   fi
5453   ;;
5454 openbsd*)
5455   with_gnu_ld=no
5456   ;;
5457 esac
5458
5459 ld_shlibs=yes
5460 if test "$with_gnu_ld" = yes; then
5461   # If archive_cmds runs LD, not CC, wlarc should be empty
5462   wlarc='${wl}'
5463
5464   # See if GNU ld supports shared libraries.
5465   case $host_os in
5466   aix3* | aix4* | aix5*)
5467     # On AIX, the GNU linker is very broken
5468     # Note:Check GNU linker on AIX 5-IA64 when/if it becomes available.
5469     ld_shlibs=no
5470     cat <<EOF 1>&2
5471
5472 *** Warning: the GNU linker, at least up to release 2.9.1, is reported
5473 *** to be unable to reliably create shared libraries on AIX.
5474 *** Therefore, libtool is disabling shared libraries support.  If you
5475 *** really care for shared libraries, you may want to modify your PATH
5476 *** so that a non-GNU linker is found, and then restart.
5477
5478 EOF
5479     ;;
5480
5481   amigaos*)
5482     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)'
5483     hardcode_libdir_flag_spec='-L$libdir'
5484     hardcode_minus_L=yes
5485
5486     # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
5487     # that the semantics of dynamic libraries on AmigaOS, at least up
5488     # to version 4, is to share data among multiple programs linked
5489     # with the same dynamic library.  Since this doesn't match the
5490     # behavior of shared libraries on other platforms, we can use
5491     # them.
5492     ld_shlibs=no
5493     ;;
5494
5495   beos*)
5496     if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
5497       allow_undefined_flag=unsupported
5498       # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
5499       # support --undefined.  This deserves some investigation.  FIXME
5500       archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5501     else
5502       ld_shlibs=no
5503     fi
5504     ;;
5505
5506   cygwin* | mingw* | pw32*)
5507     # hardcode_libdir_flag_spec is actually meaningless, as there is
5508     # no search path for DLLs.
5509     hardcode_libdir_flag_spec='-L$libdir'
5510     allow_undefined_flag=unsupported
5511     always_export_symbols=yes
5512
5513     extract_expsyms_cmds='test -f $output_objdir/impgen.c || \
5514       sed -e "/^# \/\* impgen\.c starts here \*\//,/^# \/\* impgen.c ends here \*\// { s/^# //;s/^# *$//; p; }" -e d < $''0 > $output_objdir/impgen.c~
5515       test -f $output_objdir/impgen.exe || (cd $output_objdir && \
5516       if test "x$HOST_CC" != "x" ; then $HOST_CC -o impgen impgen.c ; \
5517       else $CC -o impgen impgen.c ; fi)~
5518       $output_objdir/impgen $dir/$soroot > $output_objdir/$soname-def'
5519
5520     old_archive_from_expsyms_cmds='$DLLTOOL --as=$AS --dllname $soname --def $output_objdir/$soname-def --output-lib $output_objdir/$newlib'
5521
5522     # cygwin and mingw dlls have different entry points and sets of symbols
5523     # to exclude.
5524     # FIXME: what about values for MSVC?
5525     dll_entry=__cygwin_dll_entry@12
5526     dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12~
5527     case $host_os in
5528     mingw*)
5529       # mingw values
5530       dll_entry=_DllMainCRTStartup@12
5531       dll_exclude_symbols=DllMain@12,DllMainCRTStartup@12,DllEntryPoint@12~
5532       ;;
5533     esac
5534
5535     # mingw and cygwin differ, and it's simplest to just exclude the union
5536     # of the two symbol sets.
5537     dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12,DllMainCRTStartup@12,DllEntryPoint@12
5538
5539     # recent cygwin and mingw systems supply a stub DllMain which the user
5540     # can override, but on older systems we have to supply one (in ltdll.c)
5541     if test "x$lt_cv_need_dllmain" = "xyes"; then
5542       ltdll_obj='$output_objdir/$soname-ltdll.'"$ac_objext "
5543       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~
5544         test -f $output_objdir/$soname-ltdll.$ac_objext || (cd $output_objdir && $CC -c $soname-ltdll.c)~'
5545     else
5546       ltdll_obj=
5547       ltdll_cmds=
5548     fi
5549
5550     # Extract the symbol export list from an `--export-all' def file,
5551     # then regenerate the def file from the symbol export list, so that
5552     # the compiled dll only exports the symbol export list.
5553     # Be careful not to strip the DATA tag left be newer dlltools.
5554     export_symbols_cmds="$ltdll_cmds"'
5555       $DLLTOOL --export-all --exclude-symbols '$dll_exclude_symbols' --output-def $output_objdir/$soname-def '$ltdll_obj'$libobjs $convenience~
5556       sed -e "1,/EXPORTS/d" -e "s/ @ [0-9]*//" -e "s/ *;.*$//" < $output_objdir/$soname-def > $export_symbols'
5557
5558     # If the export-symbols file already is a .def file (1st line
5559     # is EXPORTS), use it as is.
5560     # If DATA tags from a recent dlltool are present, honour them!
5561     archive_expsym_cmds='if test "x`sed 1q $export_symbols`" = xEXPORTS; then
5562         cp $export_symbols $output_objdir/$soname-def;
5563       else
5564         echo EXPORTS > $output_objdir/$soname-def;
5565         _lt_hint=1;
5566         cat $export_symbols | while read symbol; do
5567          set dummy \$symbol;
5568          case \$# in
5569            2) echo "   \$2 @ \$_lt_hint ; " >> $output_objdir/$soname-def;;
5570            4) echo "   \$2 \$3 \$4 ; " >> $output_objdir/$soname-def; _lt_hint=`expr \$_lt_hint - 1`;;
5571            *) echo "     \$2 @ \$_lt_hint \$3 ; " >> $output_objdir/$soname-def;;
5572          esac;
5573          _lt_hint=`expr 1 + \$_lt_hint`;
5574         done;
5575       fi~
5576       '"$ltdll_cmds"'
5577       $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~
5578       $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~
5579       $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~
5580       $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~
5581       $CC $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags'
5582     ;;
5583
5584   netbsd*)
5585     if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
5586       archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
5587       wlarc=
5588     else
5589       archive_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5590       archive_expsym_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5591     fi
5592     ;;
5593
5594   solaris* | sysv5*)
5595     if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then
5596       ld_shlibs=no
5597       cat <<EOF 1>&2
5598
5599 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
5600 *** create shared libraries on Solaris systems.  Therefore, libtool
5601 *** is disabling shared libraries support.  We urge you to upgrade GNU
5602 *** binutils to release 2.9.1 or newer.  Another option is to modify
5603 *** your PATH or compiler configuration so that the native linker is
5604 *** used, and then restart.
5605
5606 EOF
5607     elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
5608       archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5609       archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5610     else
5611       ld_shlibs=no
5612     fi
5613     ;;
5614
5615   sunos4*)
5616     archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5617     wlarc=
5618     hardcode_direct=yes
5619     hardcode_shlibpath_var=no
5620     ;;
5621
5622   *)
5623     if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
5624       archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5625       archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5626     else
5627       ld_shlibs=no
5628     fi
5629     ;;
5630   esac
5631
5632   if test "$ld_shlibs" = yes; then
5633     runpath_var=LD_RUN_PATH
5634     hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir'
5635     export_dynamic_flag_spec='${wl}--export-dynamic'
5636     case $host_os in
5637     cygwin* | mingw* | pw32*)
5638       # dlltool doesn't understand --whole-archive et. al.
5639       whole_archive_flag_spec=
5640       ;;
5641     *)
5642       # ancient GNU ld didn't support --whole-archive et. al.
5643       if $LD --help 2>&1 | egrep 'no-whole-archive' > /dev/null; then
5644         whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
5645       else
5646         whole_archive_flag_spec=
5647       fi
5648       ;;
5649     esac
5650   fi
5651 else
5652   # PORTME fill in a description of your system's linker (not GNU ld)
5653   case $host_os in
5654   aix3*)
5655     allow_undefined_flag=unsupported
5656     always_export_symbols=yes
5657     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'
5658     # Note: this linker hardcodes the directories in LIBPATH if there
5659     # are no directories specified by -L.
5660     hardcode_minus_L=yes
5661     if test "$GCC" = yes && test -z "$link_static_flag"; then
5662       # Neither direct hardcoding nor static linking is supported with a
5663       # broken collect2.
5664       hardcode_direct=unsupported
5665     fi
5666     ;;
5667
5668   aix4* | aix5*)
5669     if test "$host_cpu" = ia64; then
5670       # On IA64, the linker does run time linking by default, so we don't
5671       # have to do anything special.
5672       aix_use_runtimelinking=no
5673       exp_sym_flag='-Bexport'
5674       no_entry_flag=""
5675     else
5676       aix_use_runtimelinking=no
5677
5678       # Test if we are trying to use run time linking or normal
5679       # AIX style linking. If -brtl is somewhere in LDFLAGS, we
5680       # need to do runtime linking.
5681       case $host_os in aix4.[23]|aix4.[23].*|aix5*)
5682         for ld_flag in $LDFLAGS; do
5683           case $ld_flag in
5684           *-brtl*)
5685             aix_use_runtimelinking=yes
5686             break
5687           ;;
5688           esac
5689         done
5690       esac
5691
5692       exp_sym_flag='-bexport'
5693       no_entry_flag='-bnoentry'
5694     fi
5695
5696     # When large executables or shared objects are built, AIX ld can
5697     # have problems creating the table of contents.  If linking a library
5698     # or program results in "error TOC overflow" add -mminimal-toc to
5699     # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
5700     # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
5701
5702     hardcode_direct=yes
5703     archive_cmds=''
5704     hardcode_libdir_separator=':'
5705     if test "$GCC" = yes; then
5706       case $host_os in aix4.[012]|aix4.[012].*)
5707         collect2name=`${CC} -print-prog-name=collect2`
5708         if test -f "$collect2name" && \
5709           strings "$collect2name" | grep resolve_lib_name >/dev/null
5710         then
5711           # We have reworked collect2
5712           hardcode_direct=yes
5713         else
5714           # We have old collect2
5715           hardcode_direct=unsupported
5716           # It fails to find uninstalled libraries when the uninstalled
5717           # path is not listed in the libpath.  Setting hardcode_minus_L
5718           # to unsupported forces relinking
5719           hardcode_minus_L=yes
5720           hardcode_libdir_flag_spec='-L$libdir'
5721           hardcode_libdir_separator=
5722         fi
5723       esac
5724
5725       shared_flag='-shared'
5726     else
5727       # not using gcc
5728       if test "$host_cpu" = ia64; then
5729         shared_flag='${wl}-G'
5730       else
5731         if test "$aix_use_runtimelinking" = yes; then
5732           shared_flag='${wl}-G'
5733         else
5734           shared_flag='${wl}-bM:SRE'
5735         fi
5736       fi
5737     fi
5738
5739     # It seems that -bexpall can do strange things, so it is better to
5740     # generate a list of symbols to export.
5741     always_export_symbols=yes
5742     if test "$aix_use_runtimelinking" = yes; then
5743       # Warning - without using the other runtime loading flags (-brtl),
5744       # -berok will link without error, but may produce a broken library.
5745       allow_undefined_flag='-berok'
5746       hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:/usr/lib:/lib'
5747       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"
5748     else
5749       if test "$host_cpu" = ia64; then
5750         hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
5751         allow_undefined_flag="-z nodefs"
5752         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"
5753       else
5754         hardcode_libdir_flag_spec='${wl}-bnolibpath ${wl}-blibpath:$libdir:/usr/lib:/lib'
5755         # Warning - without using the other run time loading flags,
5756         # -berok will link without error, but may produce a broken library.
5757         allow_undefined_flag='${wl}-berok'
5758         # This is a bit strange, but is similar to how AIX traditionally builds
5759         # it's shared libraries.
5760         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'
5761       fi
5762     fi
5763     ;;
5764
5765   amigaos*)
5766     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)'
5767     hardcode_libdir_flag_spec='-L$libdir'
5768     hardcode_minus_L=yes
5769     # see comment about different semantics on the GNU ld section
5770     ld_shlibs=no
5771     ;;
5772
5773   cygwin* | mingw* | pw32*)
5774     # When not using gcc, we currently assume that we are using
5775     # Microsoft Visual C++.
5776     # hardcode_libdir_flag_spec is actually meaningless, as there is
5777     # no search path for DLLs.
5778     hardcode_libdir_flag_spec=' '
5779     allow_undefined_flag=unsupported
5780     # Tell ltmain to make .lib files, not .a files.
5781     libext=lib
5782     # FIXME: Setting linknames here is a bad hack.
5783     archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | sed -e '\''s/ -lc$//'\''` -link -dll~linknames='
5784     # The linker will automatically build a .lib file if we build a DLL.
5785     old_archive_from_new_cmds='true'
5786     # FIXME: Should let the user specify the lib program.
5787     old_archive_cmds='lib /OUT:$oldlib$oldobjs$old_deplibs'
5788     fix_srcfile_path='`cygpath -w "$srcfile"`'
5789     ;;
5790
5791   darwin* | rhapsody*)
5792     case "$host_os" in
5793     rhapsody* | darwin1.[012])
5794       allow_undefined_flag='-undefined suppress'
5795       ;;
5796     *) # Darwin 1.3 on
5797       allow_undefined_flag='-flat_namespace -undefined suppress'
5798       ;;
5799     esac
5800     # FIXME: Relying on posixy $() will cause problems for
5801     #        cross-compilation, but unfortunately the echo tests do not
5802     #        yet detect zsh echo's removal of \ escapes.  Also zsh mangles
5803     #        `"' quotes if we put them in here... so don't!
5804     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)'
5805     # We need to add '_' to the symbols in $export_symbols first
5806     #archive_expsym_cmds="$archive_cmds"' && strip -s $export_symbols'
5807     hardcode_direct=yes
5808     hardcode_shlibpath_var=no
5809     whole_archive_flag_spec='-all_load $convenience'
5810     ;;
5811
5812   freebsd1*)
5813     ld_shlibs=no
5814     ;;
5815
5816   # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
5817   # support.  Future versions do this automatically, but an explicit c++rt0.o
5818   # does not break anything, and helps significantly (at the cost of a little
5819   # extra space).
5820   freebsd2.2*)
5821     archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
5822     hardcode_libdir_flag_spec='-R$libdir'
5823     hardcode_direct=yes
5824     hardcode_shlibpath_var=no
5825     ;;
5826
5827   # Unfortunately, older versions of FreeBSD 2 do not have this feature.
5828   freebsd2*)
5829     archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5830     hardcode_direct=yes
5831     hardcode_minus_L=yes
5832     hardcode_shlibpath_var=no
5833     ;;
5834
5835   # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
5836   freebsd*)
5837     archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
5838     hardcode_libdir_flag_spec='-R$libdir'
5839     hardcode_direct=yes
5840     hardcode_shlibpath_var=no
5841     ;;
5842
5843   hpux9* | hpux10* | hpux11*)
5844     case $host_os in
5845     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' ;;
5846     *) archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' ;;
5847     esac
5848     hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
5849     hardcode_libdir_separator=:
5850     hardcode_direct=yes
5851     hardcode_minus_L=yes # Not in the search PATH, but as the default
5852                          # location of the library.
5853     export_dynamic_flag_spec='${wl}-E'
5854     ;;
5855
5856   irix5* | irix6* | nonstopux*)
5857     if test "$GCC" = yes; then
5858       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'
5859       hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5860     else
5861       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'
5862       hardcode_libdir_flag_spec='-rpath $libdir'
5863     fi
5864     hardcode_libdir_separator=:
5865     link_all_deplibs=yes
5866     ;;
5867
5868   netbsd*)
5869     if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
5870       archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
5871     else
5872       archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
5873     fi
5874     hardcode_libdir_flag_spec='-R$libdir'
5875     hardcode_direct=yes
5876     hardcode_shlibpath_var=no
5877     ;;
5878
5879   newsos6)
5880     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5881     hardcode_direct=yes
5882     hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5883     hardcode_libdir_separator=:
5884     hardcode_shlibpath_var=no
5885     ;;
5886
5887   openbsd*)
5888     hardcode_direct=yes
5889     hardcode_shlibpath_var=no
5890     if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
5891       archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5892       hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
5893       export_dynamic_flag_spec='${wl}-E'
5894     else
5895       case "$host_os" in
5896       openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
5897         archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5898         hardcode_libdir_flag_spec='-R$libdir'
5899         ;;
5900       *)
5901         archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5902         hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
5903         ;;
5904       esac
5905     fi
5906     ;;
5907
5908   openedition*)
5909     archive_cmds="\$CC -Wl,DLL \$libobjs \$deplibs \$compiler_flags -o \$lib &&
5910         cp \$linknames \$output_objdir && linknames=''"
5911     export_dynamic_flag_spec="-Wl,DLL"
5912     ;;
5913
5914   os2*)
5915     hardcode_libdir_flag_spec='-L$libdir'
5916     hardcode_minus_L=yes
5917     allow_undefined_flag=unsupported
5918     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'
5919     old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
5920     ;;
5921
5922   osf3*)
5923     if test "$GCC" = yes; then
5924       allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
5925       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'
5926     else
5927       allow_undefined_flag=' -expect_unresolved \*'
5928       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'
5929     fi
5930     hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5931     hardcode_libdir_separator=:
5932     ;;
5933
5934   osf4* | osf5*)        # as osf3* with the addition of -msym flag
5935     if test "$GCC" = yes; then
5936       allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
5937       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'
5938       hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5939     else
5940       allow_undefined_flag=' -expect_unresolved \*'
5941       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'
5942       archive_expsym_cmds='for i in `cat $export_symbols`; do printf "-exported_symbol " >> $lib.exp; echo "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
5943       $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'
5944
5945       #Both c and cxx compiler support -rpath directly
5946       hardcode_libdir_flag_spec='-rpath $libdir'
5947     fi
5948     hardcode_libdir_separator=:
5949     ;;
5950
5951   sco3.2v5*)
5952     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5953     hardcode_shlibpath_var=no
5954     runpath_var=LD_RUN_PATH
5955     hardcode_runpath_var=yes
5956     export_dynamic_flag_spec='${wl}-Bexport'
5957     ;;
5958
5959   solaris*)
5960     # gcc --version < 3.0 without binutils cannot create self contained
5961     # shared libraries reliably, requiring libgcc.a to resolve some of
5962     # the object symbols generated in some cases.  Libraries that use
5963     # assert need libgcc.a to resolve __eprintf, for example.  Linking
5964     # a copy of libgcc.a into every shared library to guarantee resolving
5965     # such symbols causes other problems:  According to Tim Van Holder
5966     # <tim.van.holder@pandora.be>, C++ libraries end up with a separate
5967     # (to the application) exception stack for one thing.
5968     no_undefined_flag=' -z defs'
5969     if test "$GCC" = yes; then
5970       case `$CC --version 2>/dev/null` in
5971       [12].*)
5972         cat <<EOF 1>&2
5973
5974 *** Warning: Releases of GCC earlier than version 3.0 cannot reliably
5975 *** create self contained shared libraries on Solaris systems, without
5976 *** introducing a dependency on libgcc.a.  Therefore, libtool is disabling
5977 *** -no-undefined support, which will at least allow you to build shared
5978 *** libraries.  However, you may find that when you link such libraries
5979 *** into an application without using GCC, you have to manually add
5980 *** \`gcc --print-libgcc-file-name\` to the link command.  We urge you to
5981 *** upgrade to a newer version of GCC.  Another option is to rebuild your
5982 *** current GCC to use the GNU linker from GNU binutils 2.9.1 or newer.
5983
5984 EOF
5985         no_undefined_flag=
5986         ;;
5987       esac
5988     fi
5989     # $CC -shared without GNU ld will not create a library from C++
5990     # object files and a static libstdc++, better avoid it by now
5991     archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
5992     archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
5993                 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
5994     hardcode_libdir_flag_spec='-R$libdir'
5995     hardcode_shlibpath_var=no
5996     case $host_os in
5997     solaris2.[0-5] | solaris2.[0-5].*) ;;
5998     *) # Supported since Solaris 2.6 (maybe 2.5.1?)
5999       whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;;
6000     esac
6001     link_all_deplibs=yes
6002     ;;
6003
6004   sunos4*)
6005     if test "x$host_vendor" = xsequent; then
6006       # Use $CC to link under sequent, because it throws in some extra .o
6007       # files that make .init and .fini sections work.
6008       archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
6009     else
6010       archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
6011     fi
6012     hardcode_libdir_flag_spec='-L$libdir'
6013     hardcode_direct=yes
6014     hardcode_minus_L=yes
6015     hardcode_shlibpath_var=no
6016     ;;
6017
6018   sysv4)
6019     case $host_vendor in
6020       sni)
6021         archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6022         hardcode_direct=yes # is this really true???
6023         ;;
6024       siemens)
6025         ## LD is ld it makes a PLAMLIB
6026         ## CC just makes a GrossModule.
6027         archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
6028         reload_cmds='$CC -r -o $output$reload_objs'
6029         hardcode_direct=no
6030         ;;
6031       motorola)
6032         archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6033         hardcode_direct=no #Motorola manual says yes, but my tests say they lie
6034         ;;
6035     esac
6036     runpath_var='LD_RUN_PATH'
6037     hardcode_shlibpath_var=no
6038     ;;
6039
6040   sysv4.3*)
6041     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6042     hardcode_shlibpath_var=no
6043     export_dynamic_flag_spec='-Bexport'
6044     ;;
6045
6046   sysv5*)
6047     no_undefined_flag=' -z text'
6048     # $CC -shared without GNU ld will not create a library from C++
6049     # object files and a static libstdc++, better avoid it by now
6050     archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
6051     archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
6052                 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
6053     hardcode_libdir_flag_spec=
6054     hardcode_shlibpath_var=no
6055     runpath_var='LD_RUN_PATH'
6056     ;;
6057
6058   uts4*)
6059     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6060     hardcode_libdir_flag_spec='-L$libdir'
6061     hardcode_shlibpath_var=no
6062     ;;
6063
6064   dgux*)
6065     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6066     hardcode_libdir_flag_spec='-L$libdir'
6067     hardcode_shlibpath_var=no
6068     ;;
6069
6070   sysv4*MP*)
6071     if test -d /usr/nec; then
6072       archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6073       hardcode_shlibpath_var=no
6074       runpath_var=LD_RUN_PATH
6075       hardcode_runpath_var=yes
6076       ld_shlibs=yes
6077     fi
6078     ;;
6079
6080   sysv4.2uw2*)
6081     archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
6082     hardcode_direct=yes
6083     hardcode_minus_L=no
6084     hardcode_shlibpath_var=no
6085     hardcode_runpath_var=yes
6086     runpath_var=LD_RUN_PATH
6087     ;;
6088
6089   sysv5uw7* | unixware7*)
6090     no_undefined_flag='${wl}-z ${wl}text'
6091     if test "$GCC" = yes; then
6092       archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6093     else
6094       archive_cmds='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6095     fi
6096     runpath_var='LD_RUN_PATH'
6097     hardcode_shlibpath_var=no
6098     ;;
6099
6100   *)
6101     ld_shlibs=no
6102     ;;
6103   esac
6104 fi
6105 echo "$ac_t""$ld_shlibs" 1>&6
6106 test "$ld_shlibs" = no && can_build_shared=no
6107
6108 # Check hardcoding attributes.
6109 echo $ac_n "checking how to hardcode library paths into programs""... $ac_c" 1>&6
6110 echo "configure:6111: checking how to hardcode library paths into programs" >&5
6111 hardcode_action=
6112 if test -n "$hardcode_libdir_flag_spec" || \
6113    test -n "$runpath_var"; then
6114
6115   # We can hardcode non-existant directories.
6116   if test "$hardcode_direct" != no &&
6117      # If the only mechanism to avoid hardcoding is shlibpath_var, we
6118      # have to relink, otherwise we might link with an installed library
6119      # when we should be linking with a yet-to-be-installed one
6120      ## test "$hardcode_shlibpath_var" != no &&
6121      test "$hardcode_minus_L" != no; then
6122     # Linking always hardcodes the temporary library directory.
6123     hardcode_action=relink
6124   else
6125     # We can link without hardcoding, and we can hardcode nonexisting dirs.
6126     hardcode_action=immediate
6127   fi
6128 else
6129   # We cannot hardcode anything, or else we can only hardcode existing
6130   # directories.
6131   hardcode_action=unsupported
6132 fi
6133 echo "$ac_t""$hardcode_action" 1>&6
6134
6135 striplib=
6136 old_striplib=
6137 echo $ac_n "checking whether stripping libraries is possible""... $ac_c" 1>&6
6138 echo "configure:6139: checking whether stripping libraries is possible" >&5
6139 if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
6140   test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
6141   test -z "$striplib" && striplib="$STRIP --strip-unneeded"
6142   echo "$ac_t""yes" 1>&6
6143 else
6144   echo "$ac_t""no" 1>&6
6145 fi
6146
6147 reload_cmds='$LD$reload_flag -o $output$reload_objs'
6148 test -z "$deplibs_check_method" && deplibs_check_method=unknown
6149
6150 # PORTME Fill in your ld.so characteristics
6151 echo $ac_n "checking dynamic linker characteristics""... $ac_c" 1>&6
6152 echo "configure:6153: checking dynamic linker characteristics" >&5
6153 library_names_spec=
6154 libname_spec='lib$name'
6155 soname_spec=
6156 postinstall_cmds=
6157 postuninstall_cmds=
6158 finish_cmds=
6159 finish_eval=
6160 shlibpath_var=
6161 shlibpath_overrides_runpath=unknown
6162 version_type=none
6163 dynamic_linker="$host_os ld.so"
6164 sys_lib_dlsearch_path_spec="/lib /usr/lib"
6165 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
6166
6167 case $host_os in
6168 aix3*)
6169   version_type=linux
6170   library_names_spec='${libname}${release}.so$versuffix $libname.a'
6171   shlibpath_var=LIBPATH
6172
6173   # AIX has no versioning support, so we append a major version to the name.
6174   soname_spec='${libname}${release}.so$major'
6175   ;;
6176
6177 aix4* | aix5*)
6178   version_type=linux
6179   need_lib_prefix=no
6180   need_version=no
6181   hardcode_into_libs=yes
6182   if test "$host_cpu" = ia64; then
6183     # AIX 5 supports IA64
6184     library_names_spec='${libname}${release}.so$major ${libname}${release}.so$versuffix $libname.so'
6185     shlibpath_var=LD_LIBRARY_PATH
6186   else
6187     # With GCC up to 2.95.x, collect2 would create an import file
6188     # for dependence libraries.  The import file would start with
6189     # the line `#! .'.  This would cause the generated library to
6190     # depend on `.', always an invalid library.  This was fixed in
6191     # development snapshots of GCC prior to 3.0.
6192     case $host_os in
6193       aix4 | aix4.[01] | aix4.[01].*)
6194         if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
6195              echo ' yes '
6196              echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
6197           :
6198         else
6199           can_build_shared=no
6200         fi
6201         ;;
6202     esac
6203     # AIX (on Power*) has no versioning support, so currently we can
6204     # not hardcode correct soname into executable. Probably we can
6205     # add versioning support to collect2, so additional links can
6206     # be useful in future.
6207     if test "$aix_use_runtimelinking" = yes; then
6208       # If using run time linking (on AIX 4.2 or later) use lib<name>.so
6209       # instead of lib<name>.a to let people know that these are not
6210       # typical AIX shared libraries.
6211       library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6212     else
6213       # We preserve .a as extension for shared libraries through AIX4.2
6214       # and later when we are not doing run time linking.
6215       library_names_spec='${libname}${release}.a $libname.a'
6216       soname_spec='${libname}${release}.so$major'
6217     fi
6218     shlibpath_var=LIBPATH
6219   fi
6220   hardcode_into_libs=yes
6221   ;;
6222
6223 amigaos*)
6224   library_names_spec='$libname.ixlibrary $libname.a'
6225   # Create ${libname}_ixlibrary.a entries in /sys/libs.
6226   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'
6227   ;;
6228
6229 beos*)
6230   library_names_spec='${libname}.so'
6231   dynamic_linker="$host_os ld.so"
6232   shlibpath_var=LIBRARY_PATH
6233   ;;
6234
6235 bsdi4*)
6236   version_type=linux
6237   need_version=no
6238   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6239   soname_spec='${libname}${release}.so$major'
6240   finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
6241   shlibpath_var=LD_LIBRARY_PATH
6242   sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
6243   sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
6244   export_dynamic_flag_spec=-rdynamic
6245   # the default ld.so.conf also contains /usr/contrib/lib and
6246   # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
6247   # libtool to hard-code these into programs
6248   ;;
6249
6250 cygwin* | mingw* | pw32*)
6251   version_type=windows
6252   need_version=no
6253   need_lib_prefix=no
6254   case $GCC,$host_os in
6255   yes,cygwin*)
6256     library_names_spec='$libname.dll.a'
6257     soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
6258     postinstall_cmds='dlpath=`bash 2>&1 -c '\''. $dir/${file}i;echo \$dlname'\''`~
6259       dldir=$destdir/`dirname \$dlpath`~
6260       test -d \$dldir || mkdir -p \$dldir~
6261       $install_prog .libs/$dlname \$dldir/$dlname'
6262     postuninstall_cmds='dldll=`bash 2>&1 -c '\''. $file; echo \$dlname'\''`~
6263       dlpath=$dir/\$dldll~
6264        $rm \$dlpath'
6265     ;;
6266   yes,mingw*)
6267     library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
6268     sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | sed -e "s/^libraries://" -e "s/;/ /g" -e "s,=/,/,g"`
6269     ;;
6270   yes,pw32*)
6271     library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | sed -e 's/./-/g'`${versuffix}.dll'
6272     ;;
6273   *)
6274     library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll $libname.lib'
6275     ;;
6276   esac
6277   dynamic_linker='Win32 ld.exe'
6278   # FIXME: first we should search . and the directory the executable is in
6279   shlibpath_var=PATH
6280   ;;
6281
6282 darwin* | rhapsody*)
6283   dynamic_linker="$host_os dyld"
6284   version_type=darwin
6285   need_lib_prefix=no
6286   need_version=no
6287   # FIXME: Relying on posixy $() will cause problems for
6288   #        cross-compilation, but unfortunately the echo tests do not
6289   #        yet detect zsh echo's removal of \ escapes.
6290   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)'
6291   soname_spec='${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib)'
6292   shlibpath_overrides_runpath=yes
6293   shlibpath_var=DYLD_LIBRARY_PATH
6294   ;;
6295
6296 freebsd1*)
6297   dynamic_linker=no
6298   ;;
6299
6300 freebsd*)
6301   objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
6302   version_type=freebsd-$objformat
6303   case $version_type in
6304     freebsd-elf*)
6305       library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
6306       need_version=no
6307       need_lib_prefix=no
6308       ;;
6309     freebsd-*)
6310       library_names_spec='${libname}${release}.so$versuffix $libname.so$versuffix'
6311       need_version=yes
6312       ;;
6313   esac
6314   shlibpath_var=LD_LIBRARY_PATH
6315   case $host_os in
6316   freebsd2*)
6317     shlibpath_overrides_runpath=yes
6318     ;;
6319   *)
6320     shlibpath_overrides_runpath=no
6321     hardcode_into_libs=yes
6322     ;;
6323   esac
6324   ;;
6325
6326 gnu*)
6327   version_type=linux
6328   need_lib_prefix=no
6329   need_version=no
6330   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so${major} ${libname}.so'
6331   soname_spec='${libname}${release}.so$major'
6332   shlibpath_var=LD_LIBRARY_PATH
6333   hardcode_into_libs=yes
6334   ;;
6335
6336 hpux9* | hpux10* | hpux11*)
6337   # Give a soname corresponding to the major version so that dld.sl refuses to
6338   # link against other versions.
6339   dynamic_linker="$host_os dld.sl"
6340   version_type=sunos
6341   need_lib_prefix=no
6342   need_version=no
6343   shlibpath_var=SHLIB_PATH
6344   shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
6345   library_names_spec='${libname}${release}.sl$versuffix ${libname}${release}.sl$major $libname.sl'
6346   soname_spec='${libname}${release}.sl$major'
6347   # HP-UX runs *really* slowly unless shared libraries are mode 555.
6348   postinstall_cmds='chmod 555 $lib'
6349   ;;
6350
6351 irix5* | irix6* | nonstopux*)
6352   case $host_os in
6353     nonstopux*) version_type=nonstopux ;;
6354     *)          version_type=irix ;;
6355   esac
6356   need_lib_prefix=no
6357   need_version=no
6358   soname_spec='${libname}${release}.so$major'
6359   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so $libname.so'
6360   case $host_os in
6361   irix5* | nonstopux*)
6362     libsuff= shlibsuff=
6363     ;;
6364   *)
6365     case $LD in # libtool.m4 will add one of these switches to LD
6366     *-32|*"-32 ") libsuff= shlibsuff= libmagic=32-bit;;
6367     *-n32|*"-n32 ") libsuff=32 shlibsuff=N32 libmagic=N32;;
6368     *-64|*"-64 ") libsuff=64 shlibsuff=64 libmagic=64-bit;;
6369     *) libsuff= shlibsuff= libmagic=never-match;;
6370     esac
6371     ;;
6372   esac
6373   shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
6374   shlibpath_overrides_runpath=no
6375   sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
6376   sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
6377   ;;
6378
6379 # No shared lib support for Linux oldld, aout, or coff.
6380 linux-gnuoldld* | linux-gnuaout* | linux-gnucoff*)
6381   dynamic_linker=no
6382   ;;
6383
6384 # This must be Linux ELF.
6385 linux-gnu*)
6386   version_type=linux
6387   need_lib_prefix=no
6388   need_version=no
6389   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6390   soname_spec='${libname}${release}.so$major'
6391   finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
6392   shlibpath_var=LD_LIBRARY_PATH
6393   shlibpath_overrides_runpath=no
6394   # This implies no fast_install, which is unacceptable.
6395   # Some rework will be needed to allow for fast_install
6396   # before this can be enabled.
6397   hardcode_into_libs=yes
6398
6399   # We used to test for /lib/ld.so.1 and disable shared libraries on
6400   # powerpc, because MkLinux only supported shared libraries with the
6401   # GNU dynamic linker.  Since this was broken with cross compilers,
6402   # most powerpc-linux boxes support dynamic linking these days and
6403   # people can always --disable-shared, the test was removed, and we
6404   # assume the GNU/Linux dynamic linker is in use.
6405   dynamic_linker='GNU/Linux ld.so'
6406   ;;
6407
6408 netbsd*)
6409   version_type=sunos
6410   need_lib_prefix=no
6411   need_version=no
6412   if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
6413     library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
6414     finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
6415     dynamic_linker='NetBSD (a.out) ld.so'
6416   else
6417     library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so ${libname}.so'
6418     soname_spec='${libname}${release}.so$major'
6419     dynamic_linker='NetBSD ld.elf_so'
6420   fi
6421   shlibpath_var=LD_LIBRARY_PATH
6422   shlibpath_overrides_runpath=yes
6423   hardcode_into_libs=yes
6424   ;;
6425
6426 newsos6)
6427   version_type=linux
6428   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6429   shlibpath_var=LD_LIBRARY_PATH
6430   shlibpath_overrides_runpath=yes
6431   ;;
6432
6433 openbsd*)
6434   version_type=sunos
6435   need_lib_prefix=no
6436   need_version=no
6437   if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
6438     case "$host_os" in
6439     openbsd2.[89] | openbsd2.[89].*)
6440       shlibpath_overrides_runpath=no
6441       ;;
6442     *)
6443       shlibpath_overrides_runpath=yes
6444       ;;
6445     esac
6446   else
6447     shlibpath_overrides_runpath=yes
6448   fi
6449   library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
6450   finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
6451   shlibpath_var=LD_LIBRARY_PATH
6452   ;;
6453
6454 openedition*)
6455   need_lib_prefix=no
6456   need_version=no
6457   shlibpath_overrides_runpath=yes
6458   shlibpath_var=LIBPATH
6459   postinstall_cmds="rm \$destdir/\$linkname; cp \$linkname \$destdir; chmod a+x \$lib"
6460   # the library's exports are in libname.x; this is the file that must
6461   # actually be linked with to use a DLL.
6462   library_names_spec="\${libname}\${release}.so\$versuffix \${libname}.x"
6463   ;;
6464
6465 os2*)
6466   libname_spec='$name'
6467   need_lib_prefix=no
6468   library_names_spec='$libname.dll $libname.a'
6469   dynamic_linker='OS/2 ld.exe'
6470   shlibpath_var=LIBPATH
6471   ;;
6472
6473 osf3* | osf4* | osf5*)
6474   version_type=osf
6475   need_version=no
6476   soname_spec='${libname}${release}.so$major'
6477   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6478   shlibpath_var=LD_LIBRARY_PATH
6479   sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
6480   sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
6481   hardcode_into_libs=yes
6482   ;;
6483
6484 sco3.2v5*)
6485   version_type=osf
6486   soname_spec='${libname}${release}.so$major'
6487   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6488   shlibpath_var=LD_LIBRARY_PATH
6489   ;;
6490
6491 solaris*)
6492   version_type=linux
6493   need_lib_prefix=no
6494   need_version=no
6495   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6496   soname_spec='${libname}${release}.so$major'
6497   shlibpath_var=LD_LIBRARY_PATH
6498   shlibpath_overrides_runpath=yes
6499   hardcode_into_libs=yes
6500   # ldd complains unless libraries are executable
6501   postinstall_cmds='chmod +x $lib'
6502   ;;
6503
6504 sunos4*)
6505   version_type=sunos
6506   library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
6507   finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
6508   shlibpath_var=LD_LIBRARY_PATH
6509   shlibpath_overrides_runpath=yes
6510   if test "$with_gnu_ld" = yes; then
6511     need_lib_prefix=no
6512   fi
6513   need_version=yes
6514   ;;
6515
6516 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
6517   version_type=linux
6518   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6519   soname_spec='${libname}${release}.so$major'
6520   shlibpath_var=LD_LIBRARY_PATH
6521   case $host_vendor in
6522     sni)
6523       shlibpath_overrides_runpath=no
6524       need_lib_prefix=no
6525       export_dynamic_flag_spec='${wl}-Blargedynsym'
6526       runpath_var=LD_RUN_PATH
6527       ;;
6528     siemens)
6529       need_lib_prefix=no
6530       ;;
6531     motorola)
6532       need_lib_prefix=no
6533       need_version=no
6534       shlibpath_overrides_runpath=no
6535       sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
6536       ;;
6537   esac
6538   ;;
6539
6540 uts4*)
6541   version_type=linux
6542   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6543   soname_spec='${libname}${release}.so$major'
6544   shlibpath_var=LD_LIBRARY_PATH
6545   ;;
6546
6547 dgux*)
6548   version_type=linux
6549   need_lib_prefix=no
6550   need_version=no
6551   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6552   soname_spec='${libname}${release}.so$major'
6553   shlibpath_var=LD_LIBRARY_PATH
6554   ;;
6555
6556 sysv4*MP*)
6557   if test -d /usr/nec ;then
6558     version_type=linux
6559     library_names_spec='$libname.so.$versuffix $libname.so.$major $libname.so'
6560     soname_spec='$libname.so.$major'
6561     shlibpath_var=LD_LIBRARY_PATH
6562   fi
6563   ;;
6564
6565 *)
6566   dynamic_linker=no
6567   ;;
6568 esac
6569 echo "$ac_t""$dynamic_linker" 1>&6
6570 test "$dynamic_linker" = no && can_build_shared=no
6571
6572 # Report the final consequences.
6573 echo $ac_n "checking if libtool supports shared libraries""... $ac_c" 1>&6
6574 echo "configure:6575: checking if libtool supports shared libraries" >&5
6575 echo "$ac_t""$can_build_shared" 1>&6
6576
6577 echo $ac_n "checking whether to build shared libraries""... $ac_c" 1>&6
6578 echo "configure:6579: checking whether to build shared libraries" >&5
6579 test "$can_build_shared" = "no" && enable_shared=no
6580
6581 # On AIX, shared libraries and static libraries use the same namespace, and
6582 # are all built from PIC.
6583 case "$host_os" in
6584 aix3*)
6585   test "$enable_shared" = yes && enable_static=no
6586   if test -n "$RANLIB"; then
6587     archive_cmds="$archive_cmds~\$RANLIB \$lib"
6588     postinstall_cmds='$RANLIB $lib'
6589   fi
6590   ;;
6591
6592 aix4*)
6593   if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
6594     test "$enable_shared" = yes && enable_static=no
6595   fi
6596   ;;
6597 esac
6598 echo "$ac_t""$enable_shared" 1>&6
6599
6600 echo $ac_n "checking whether to build static libraries""... $ac_c" 1>&6
6601 echo "configure:6602: checking whether to build static libraries" >&5
6602 # Make sure either enable_shared or enable_static is yes.
6603 test "$enable_shared" = yes || enable_static=yes
6604 echo "$ac_t""$enable_static" 1>&6
6605
6606 if test "$hardcode_action" = relink; then
6607   # Fast installation is not supported
6608   enable_fast_install=no
6609 elif test "$shlibpath_overrides_runpath" = yes ||
6610      test "$enable_shared" = no; then
6611   # Fast installation is not necessary
6612   enable_fast_install=needless
6613 fi
6614
6615 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
6616 if test "$GCC" = yes; then
6617   variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
6618 fi
6619
6620 if test "x$enable_dlopen" != xyes; then
6621   enable_dlopen=unknown
6622   enable_dlopen_self=unknown
6623   enable_dlopen_self_static=unknown
6624 else
6625   lt_cv_dlopen=no
6626   lt_cv_dlopen_libs=
6627
6628   case $host_os in
6629   beos*)
6630     lt_cv_dlopen="load_add_on"
6631     lt_cv_dlopen_libs=
6632     lt_cv_dlopen_self=yes
6633     ;;
6634
6635   cygwin* | mingw* | pw32*)
6636     lt_cv_dlopen="LoadLibrary"
6637     lt_cv_dlopen_libs=
6638    ;;
6639
6640   *)
6641     echo $ac_n "checking for dllload""... $ac_c" 1>&6
6642 echo "configure:6643: checking for dllload" >&5
6643 if eval "test \"\${ac_cv_func_dllload+set}\" = set"; then
6644   echo $ac_n "(cached) $ac_c" 1>&6
6645 else
6646   cat > conftest.$ac_ext <<EOF
6647 #line 6648 "configure"
6648 #include "confdefs.h"
6649 /* System header to define __stub macros and hopefully few prototypes,
6650     which can conflict with char dllload(); below.  */
6651 #include <assert.h>
6652 /* Override any gcc2 internal prototype to avoid an error.  */
6653 /* We use char because int might match the return type of a gcc2
6654     builtin and then its argument prototype would still apply.  */
6655 char dllload();
6656 char (*f)();
6657
6658 int main() {
6659
6660 /* The GNU C library defines this for functions which it implements
6661     to always fail with ENOSYS.  Some functions are actually named
6662     something starting with __ and the normal name is an alias.  */
6663 #if defined (__stub_dllload) || defined (__stub___dllload)
6664 choke me
6665 #else
6666 f = dllload;
6667 #endif
6668
6669 ; return 0; }
6670 EOF
6671 if { (eval echo configure:6672: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6672   rm -rf conftest*
6673   eval "ac_cv_func_dllload=yes"
6674 else
6675   echo "configure: failed program was:" >&5
6676   cat conftest.$ac_ext >&5
6677   rm -rf conftest*
6678   eval "ac_cv_func_dllload=no"
6679 fi
6680 rm -f conftest*
6681 fi
6682
6683 if eval "test \"`echo '$ac_cv_func_'dllload`\" = yes"; then
6684   echo "$ac_t""yes" 1>&6
6685   lt_cv_dlopen="dllload"
6686 else
6687   echo "$ac_t""no" 1>&6
6688 echo $ac_n "checking for shl_load""... $ac_c" 1>&6
6689 echo "configure:6690: checking for shl_load" >&5
6690 if eval "test \"\${ac_cv_func_shl_load+set}\" = set"; then
6691   echo $ac_n "(cached) $ac_c" 1>&6
6692 else
6693   cat > conftest.$ac_ext <<EOF
6694 #line 6695 "configure"
6695 #include "confdefs.h"
6696 /* System header to define __stub macros and hopefully few prototypes,
6697     which can conflict with char shl_load(); below.  */
6698 #include <assert.h>
6699 /* Override any gcc2 internal prototype to avoid an error.  */
6700 /* We use char because int might match the return type of a gcc2
6701     builtin and then its argument prototype would still apply.  */
6702 char shl_load();
6703 char (*f)();
6704
6705 int main() {
6706
6707 /* The GNU C library defines this for functions which it implements
6708     to always fail with ENOSYS.  Some functions are actually named
6709     something starting with __ and the normal name is an alias.  */
6710 #if defined (__stub_shl_load) || defined (__stub___shl_load)
6711 choke me
6712 #else
6713 f = shl_load;
6714 #endif
6715
6716 ; return 0; }
6717 EOF
6718 if { (eval echo configure:6719: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6719   rm -rf conftest*
6720   eval "ac_cv_func_shl_load=yes"
6721 else
6722   echo "configure: failed program was:" >&5
6723   cat conftest.$ac_ext >&5
6724   rm -rf conftest*
6725   eval "ac_cv_func_shl_load=no"
6726 fi
6727 rm -f conftest*
6728 fi
6729
6730 if eval "test \"`echo '$ac_cv_func_'shl_load`\" = yes"; then
6731   echo "$ac_t""yes" 1>&6
6732   lt_cv_dlopen="shl_load"
6733 else
6734   echo "$ac_t""no" 1>&6
6735 echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
6736 echo "configure:6737: checking for shl_load in -ldld" >&5
6737 ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-:%__p__%'`
6738 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6739   echo $ac_n "(cached) $ac_c" 1>&6
6740 else
6741   ac_save_LIBS="$LIBS"
6742 LIBS="-ldld  $LIBS"
6743 cat > conftest.$ac_ext <<EOF
6744 #line 6745 "configure"
6745 #include "confdefs.h"
6746 /* Override any gcc2 internal prototype to avoid an error.  */
6747 /* We use char because int might match the return type of a gcc2
6748     builtin and then its argument prototype would still apply.  */
6749 char shl_load();
6750
6751 int main() {
6752 shl_load()
6753 ; return 0; }
6754 EOF
6755 if { (eval echo configure:6756: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6756   rm -rf conftest*
6757   eval "ac_cv_lib_$ac_lib_var=yes"
6758 else
6759   echo "configure: failed program was:" >&5
6760   cat conftest.$ac_ext >&5
6761   rm -rf conftest*
6762   eval "ac_cv_lib_$ac_lib_var=no"
6763 fi
6764 rm -f conftest*
6765 LIBS="$ac_save_LIBS"
6766
6767 fi
6768 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6769   echo "$ac_t""yes" 1>&6
6770   lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"
6771 else
6772   echo "$ac_t""no" 1>&6
6773 echo $ac_n "checking for dlopen""... $ac_c" 1>&6
6774 echo "configure:6775: checking for dlopen" >&5
6775 if eval "test \"\${ac_cv_func_dlopen+set}\" = set"; then
6776   echo $ac_n "(cached) $ac_c" 1>&6
6777 else
6778   cat > conftest.$ac_ext <<EOF
6779 #line 6780 "configure"
6780 #include "confdefs.h"
6781 /* System header to define __stub macros and hopefully few prototypes,
6782     which can conflict with char dlopen(); below.  */
6783 #include <assert.h>
6784 /* Override any gcc2 internal prototype to avoid an error.  */
6785 /* We use char because int might match the return type of a gcc2
6786     builtin and then its argument prototype would still apply.  */
6787 char dlopen();
6788 char (*f)();
6789
6790 int main() {
6791
6792 /* The GNU C library defines this for functions which it implements
6793     to always fail with ENOSYS.  Some functions are actually named
6794     something starting with __ and the normal name is an alias.  */
6795 #if defined (__stub_dlopen) || defined (__stub___dlopen)
6796 choke me
6797 #else
6798 f = dlopen;
6799 #endif
6800
6801 ; return 0; }
6802 EOF
6803 if { (eval echo configure:6804: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6804   rm -rf conftest*
6805   eval "ac_cv_func_dlopen=yes"
6806 else
6807   echo "configure: failed program was:" >&5
6808   cat conftest.$ac_ext >&5
6809   rm -rf conftest*
6810   eval "ac_cv_func_dlopen=no"
6811 fi
6812 rm -f conftest*
6813 fi
6814
6815 if eval "test \"`echo '$ac_cv_func_'dlopen`\" = yes"; then
6816   echo "$ac_t""yes" 1>&6
6817   lt_cv_dlopen="dlopen"
6818 else
6819   echo "$ac_t""no" 1>&6
6820 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
6821 echo "configure:6822: checking for dlopen in -ldl" >&5
6822 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-:%__p__%'`
6823 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6824   echo $ac_n "(cached) $ac_c" 1>&6
6825 else
6826   ac_save_LIBS="$LIBS"
6827 LIBS="-ldl  $LIBS"
6828 cat > conftest.$ac_ext <<EOF
6829 #line 6830 "configure"
6830 #include "confdefs.h"
6831 /* Override any gcc2 internal prototype to avoid an error.  */
6832 /* We use char because int might match the return type of a gcc2
6833     builtin and then its argument prototype would still apply.  */
6834 char dlopen();
6835
6836 int main() {
6837 dlopen()
6838 ; return 0; }
6839 EOF
6840 if { (eval echo configure:6841: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6841   rm -rf conftest*
6842   eval "ac_cv_lib_$ac_lib_var=yes"
6843 else
6844   echo "configure: failed program was:" >&5
6845   cat conftest.$ac_ext >&5
6846   rm -rf conftest*
6847   eval "ac_cv_lib_$ac_lib_var=no"
6848 fi
6849 rm -f conftest*
6850 LIBS="$ac_save_LIBS"
6851
6852 fi
6853 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6854   echo "$ac_t""yes" 1>&6
6855   lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
6856 else
6857   echo "$ac_t""no" 1>&6
6858 echo $ac_n "checking for dlopen in -lsvld""... $ac_c" 1>&6
6859 echo "configure:6860: checking for dlopen in -lsvld" >&5
6860 ac_lib_var=`echo svld'_'dlopen | sed 'y%./+-:%__p__%'`
6861 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6862   echo $ac_n "(cached) $ac_c" 1>&6
6863 else
6864   ac_save_LIBS="$LIBS"
6865 LIBS="-lsvld  $LIBS"
6866 cat > conftest.$ac_ext <<EOF
6867 #line 6868 "configure"
6868 #include "confdefs.h"
6869 /* Override any gcc2 internal prototype to avoid an error.  */
6870 /* We use char because int might match the return type of a gcc2
6871     builtin and then its argument prototype would still apply.  */
6872 char dlopen();
6873
6874 int main() {
6875 dlopen()
6876 ; return 0; }
6877 EOF
6878 if { (eval echo configure:6879: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6879   rm -rf conftest*
6880   eval "ac_cv_lib_$ac_lib_var=yes"
6881 else
6882   echo "configure: failed program was:" >&5
6883   cat conftest.$ac_ext >&5
6884   rm -rf conftest*
6885   eval "ac_cv_lib_$ac_lib_var=no"
6886 fi
6887 rm -f conftest*
6888 LIBS="$ac_save_LIBS"
6889
6890 fi
6891 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6892   echo "$ac_t""yes" 1>&6
6893   lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"
6894 else
6895   echo "$ac_t""no" 1>&6
6896 echo $ac_n "checking for dld_link in -ldld""... $ac_c" 1>&6
6897 echo "configure:6898: checking for dld_link in -ldld" >&5
6898 ac_lib_var=`echo dld'_'dld_link | sed 'y%./+-:%__p__%'`
6899 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6900   echo $ac_n "(cached) $ac_c" 1>&6
6901 else
6902   ac_save_LIBS="$LIBS"
6903 LIBS="-ldld  $LIBS"
6904 cat > conftest.$ac_ext <<EOF
6905 #line 6906 "configure"
6906 #include "confdefs.h"
6907 /* Override any gcc2 internal prototype to avoid an error.  */
6908 /* We use char because int might match the return type of a gcc2
6909     builtin and then its argument prototype would still apply.  */
6910 char dld_link();
6911
6912 int main() {
6913 dld_link()
6914 ; return 0; }
6915 EOF
6916 if { (eval echo configure:6917: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6917   rm -rf conftest*
6918   eval "ac_cv_lib_$ac_lib_var=yes"
6919 else
6920   echo "configure: failed program was:" >&5
6921   cat conftest.$ac_ext >&5
6922   rm -rf conftest*
6923   eval "ac_cv_lib_$ac_lib_var=no"
6924 fi
6925 rm -f conftest*
6926 LIBS="$ac_save_LIBS"
6927
6928 fi
6929 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6930   echo "$ac_t""yes" 1>&6
6931   lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"
6932 else
6933   echo "$ac_t""no" 1>&6
6934 fi
6935
6936               
6937 fi
6938
6939             
6940 fi
6941
6942           
6943 fi
6944
6945         
6946 fi
6947
6948       
6949 fi
6950
6951     
6952 fi
6953
6954     ;;
6955   esac
6956
6957   if test "x$lt_cv_dlopen" != xno; then
6958     enable_dlopen=yes
6959   else
6960     enable_dlopen=no
6961   fi
6962
6963   case $lt_cv_dlopen in
6964   dlopen)
6965     save_CPPFLAGS="$CPPFLAGS"
6966         test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
6967
6968     save_LDFLAGS="$LDFLAGS"
6969     eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
6970
6971     save_LIBS="$LIBS"
6972     LIBS="$lt_cv_dlopen_libs $LIBS"
6973
6974     echo $ac_n "checking whether a program can dlopen itself""... $ac_c" 1>&6
6975 echo "configure:6976: checking whether a program can dlopen itself" >&5
6976 if eval "test \"\${lt_cv_dlopen_self+set}\" = set"; then
6977   echo $ac_n "(cached) $ac_c" 1>&6
6978 else
6979           if test "$cross_compiling" = yes; then :
6980   lt_cv_dlopen_self=cross
6981 else
6982     lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
6983   lt_status=$lt_dlunknown
6984   cat > conftest.$ac_ext <<EOF
6985 #line 6986 "configure"
6986 #include "confdefs.h"
6987
6988 #if HAVE_DLFCN_H
6989 #include <dlfcn.h>
6990 #endif
6991
6992 #include <stdio.h>
6993
6994 #ifdef RTLD_GLOBAL
6995 #  define LT_DLGLOBAL           RTLD_GLOBAL
6996 #else
6997 #  ifdef DL_GLOBAL
6998 #    define LT_DLGLOBAL         DL_GLOBAL
6999 #  else
7000 #    define LT_DLGLOBAL         0
7001 #  endif
7002 #endif
7003
7004 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
7005    find out it does not work in some platform. */
7006 #ifndef LT_DLLAZY_OR_NOW
7007 #  ifdef RTLD_LAZY
7008 #    define LT_DLLAZY_OR_NOW            RTLD_LAZY
7009 #  else
7010 #    ifdef DL_LAZY
7011 #      define LT_DLLAZY_OR_NOW          DL_LAZY
7012 #    else
7013 #      ifdef RTLD_NOW
7014 #        define LT_DLLAZY_OR_NOW        RTLD_NOW
7015 #      else
7016 #        ifdef DL_NOW
7017 #          define LT_DLLAZY_OR_NOW      DL_NOW
7018 #        else
7019 #          define LT_DLLAZY_OR_NOW      0
7020 #        endif
7021 #      endif
7022 #    endif
7023 #  endif
7024 #endif
7025
7026 #ifdef __cplusplus
7027 extern "C" void exit (int);
7028 #endif
7029
7030 void fnord() { int i=42;}
7031 int main ()
7032 {
7033   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
7034   int status = $lt_dlunknown;
7035
7036   if (self)
7037     {
7038       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
7039       else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
7040       /* dlclose (self); */
7041     }
7042
7043     exit (status);
7044 }
7045 EOF
7046   if { (eval echo configure:7047: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} 2>/dev/null; then
7047     (./conftest; exit; ) 2>/dev/null
7048     lt_status=$?
7049     case x$lt_status in
7050       x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;;
7051       x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;;
7052       x$lt_unknown|x*) lt_cv_dlopen_self=no ;;
7053     esac
7054   else :
7055     # compilation failed
7056     lt_cv_dlopen_self=no
7057   fi
7058 fi
7059 rm -fr conftest*
7060
7061     
7062 fi
7063
7064 echo "$ac_t""$lt_cv_dlopen_self" 1>&6
7065
7066     if test "x$lt_cv_dlopen_self" = xyes; then
7067       LDFLAGS="$LDFLAGS $link_static_flag"
7068       echo $ac_n "checking whether a statically linked program can dlopen itself""... $ac_c" 1>&6
7069 echo "configure:7070: checking whether a statically linked program can dlopen itself" >&5
7070 if eval "test \"\${lt_cv_dlopen_self_static+set}\" = set"; then
7071   echo $ac_n "(cached) $ac_c" 1>&6
7072 else
7073           if test "$cross_compiling" = yes; then :
7074   lt_cv_dlopen_self_static=cross
7075 else
7076     lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
7077   lt_status=$lt_dlunknown
7078   cat > conftest.$ac_ext <<EOF
7079 #line 7080 "configure"
7080 #include "confdefs.h"
7081
7082 #if HAVE_DLFCN_H
7083 #include <dlfcn.h>
7084 #endif
7085
7086 #include <stdio.h>
7087
7088 #ifdef RTLD_GLOBAL
7089 #  define LT_DLGLOBAL           RTLD_GLOBAL
7090 #else
7091 #  ifdef DL_GLOBAL
7092 #    define LT_DLGLOBAL         DL_GLOBAL
7093 #  else
7094 #    define LT_DLGLOBAL         0
7095 #  endif
7096 #endif
7097
7098 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
7099    find out it does not work in some platform. */
7100 #ifndef LT_DLLAZY_OR_NOW
7101 #  ifdef RTLD_LAZY
7102 #    define LT_DLLAZY_OR_NOW            RTLD_LAZY
7103 #  else
7104 #    ifdef DL_LAZY
7105 #      define LT_DLLAZY_OR_NOW          DL_LAZY
7106 #    else
7107 #      ifdef RTLD_NOW
7108 #        define LT_DLLAZY_OR_NOW        RTLD_NOW
7109 #      else
7110 #        ifdef DL_NOW
7111 #          define LT_DLLAZY_OR_NOW      DL_NOW
7112 #        else
7113 #          define LT_DLLAZY_OR_NOW      0
7114 #        endif
7115 #      endif
7116 #    endif
7117 #  endif
7118 #endif
7119
7120 #ifdef __cplusplus
7121 extern "C" void exit (int);
7122 #endif
7123
7124 void fnord() { int i=42;}
7125 int main ()
7126 {
7127   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
7128   int status = $lt_dlunknown;
7129
7130   if (self)
7131     {
7132       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
7133       else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
7134       /* dlclose (self); */
7135     }
7136
7137     exit (status);
7138 }
7139 EOF
7140   if { (eval echo configure:7141: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} 2>/dev/null; then
7141     (./conftest; exit; ) 2>/dev/null
7142     lt_status=$?
7143     case x$lt_status in
7144       x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;;
7145       x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;;
7146       x$lt_unknown|x*) lt_cv_dlopen_self_static=no ;;
7147     esac
7148   else :
7149     # compilation failed
7150     lt_cv_dlopen_self_static=no
7151   fi
7152 fi
7153 rm -fr conftest*
7154
7155       
7156 fi
7157
7158 echo "$ac_t""$lt_cv_dlopen_self_static" 1>&6
7159     fi
7160
7161     CPPFLAGS="$save_CPPFLAGS"
7162     LDFLAGS="$save_LDFLAGS"
7163     LIBS="$save_LIBS"
7164     ;;
7165   esac
7166
7167   case $lt_cv_dlopen_self in
7168   yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
7169   *) enable_dlopen_self=unknown ;;
7170   esac
7171
7172   case $lt_cv_dlopen_self_static in
7173   yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
7174   *) enable_dlopen_self_static=unknown ;;
7175   esac
7176 fi
7177
7178
7179 if test "$enable_shared" = yes && test "$GCC" = yes; then
7180   case $archive_cmds in
7181   *'~'*)
7182     # FIXME: we may have to deal with multi-command sequences.
7183     ;;
7184   '$CC '*)
7185     # Test whether the compiler implicitly links with -lc since on some
7186     # systems, -lgcc has to come before -lc. If gcc already passes -lc
7187     # to ld, don't add -lc before -lgcc.
7188     echo $ac_n "checking whether -lc should be explicitly linked in""... $ac_c" 1>&6
7189 echo "configure:7190: checking whether -lc should be explicitly linked in" >&5
7190     if eval "test \"\${lt_cv_archive_cmds_need_lc+set}\" = set"; then
7191   echo $ac_n "(cached) $ac_c" 1>&6
7192 else
7193   $rm conftest*
7194     echo 'static int dummy;' > conftest.$ac_ext
7195
7196     if { (eval echo configure:7197: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7197       soname=conftest
7198       lib=conftest
7199       libobjs=conftest.$ac_objext
7200       deplibs=
7201       wl=$lt_cv_prog_cc_wl
7202       compiler_flags=-v
7203       linker_flags=-v
7204       verstring=
7205       output_objdir=.
7206       libname=conftest
7207       save_allow_undefined_flag=$allow_undefined_flag
7208       allow_undefined_flag=
7209       if { (eval echo configure:7210: \"$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; }
7210       then
7211         lt_cv_archive_cmds_need_lc=no
7212       else
7213         lt_cv_archive_cmds_need_lc=yes
7214       fi
7215       allow_undefined_flag=$save_allow_undefined_flag
7216     else
7217       cat conftest.err 1>&5
7218     fi
7219 fi
7220
7221     echo "$ac_t""$lt_cv_archive_cmds_need_lc" 1>&6
7222     ;;
7223   esac
7224 fi
7225 need_lc=${lt_cv_archive_cmds_need_lc-yes}
7226
7227 # The second clause should only fire when bootstrapping the
7228 # libtool distribution, otherwise you forgot to ship ltmain.sh
7229 # with your package, and you will get complaints that there are
7230 # no rules to generate ltmain.sh.
7231 if test -f "$ltmain"; then
7232   :
7233 else
7234   # If there is no Makefile yet, we rely on a make rule to execute
7235   # `config.status --recheck' to rerun these tests and create the
7236   # libtool script then.
7237   test -f Makefile && make "$ltmain"
7238 fi
7239
7240 if test -f "$ltmain"; then
7241   trap "$rm \"${ofile}T\"; exit 1" 1 2 15
7242   $rm -f "${ofile}T"
7243
7244   echo creating $ofile
7245
7246   # Now quote all the things that may contain metacharacters while being
7247   # careful not to overquote the AC_SUBSTed values.  We take copies of the
7248   # variables and quote the copies for generation of the libtool script.
7249   for var in echo old_CC old_CFLAGS SED \
7250     AR AR_FLAGS CC LD LN_S NM SHELL \
7251     reload_flag reload_cmds wl \
7252     pic_flag link_static_flag no_builtin_flag export_dynamic_flag_spec \
7253     thread_safe_flag_spec whole_archive_flag_spec libname_spec \
7254     library_names_spec soname_spec \
7255     RANLIB old_archive_cmds old_archive_from_new_cmds old_postinstall_cmds \
7256     old_postuninstall_cmds archive_cmds archive_expsym_cmds postinstall_cmds \
7257     postuninstall_cmds extract_expsyms_cmds old_archive_from_expsyms_cmds \
7258     old_striplib striplib file_magic_cmd export_symbols_cmds \
7259     deplibs_check_method allow_undefined_flag no_undefined_flag \
7260     finish_cmds finish_eval global_symbol_pipe global_symbol_to_cdecl \
7261     global_symbol_to_c_name_address \
7262     hardcode_libdir_flag_spec hardcode_libdir_separator  \
7263     sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
7264     compiler_c_o compiler_o_lo need_locks exclude_expsyms include_expsyms; do
7265
7266     case $var in
7267     reload_cmds | old_archive_cmds | old_archive_from_new_cmds | \
7268     old_postinstall_cmds | old_postuninstall_cmds | \
7269     export_symbols_cmds | archive_cmds | archive_expsym_cmds | \
7270     extract_expsyms_cmds | old_archive_from_expsyms_cmds | \
7271     postinstall_cmds | postuninstall_cmds | \
7272     finish_cmds | sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
7273       # Double-quote double-evaled strings.
7274       eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
7275       ;;
7276     *)
7277       eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
7278       ;;
7279     esac
7280   done
7281
7282   cat <<__EOF__ > "${ofile}T"
7283 #! $SHELL
7284
7285 # `$echo "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
7286 # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
7287 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
7288 #
7289 # Copyright (C) 1996-2000 Free Software Foundation, Inc.
7290 # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
7291 #
7292 # This program is free software; you can redistribute it and/or modify
7293 # it under the terms of the GNU General Public License as published by
7294 # the Free Software Foundation; either version 2 of the License, or
7295 # (at your option) any later version.
7296 #
7297 # This program is distributed in the hope that it will be useful, but
7298 # WITHOUT ANY WARRANTY; without even the implied warranty of
7299 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
7300 # General Public License for more details.
7301 #
7302 # You should have received a copy of the GNU General Public License
7303 # along with this program; if not, write to the Free Software
7304 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
7305 #
7306 # As a special exception to the GNU General Public License, if you
7307 # distribute this file as part of a program that contains a
7308 # configuration script generated by Autoconf, you may include it under
7309 # the same distribution terms that you use for the rest of that program.
7310
7311 # A sed that does not truncate output.
7312 SED=$lt_SED
7313
7314 # Sed that helps us avoid accidentally triggering echo(1) options like -n.
7315 Xsed="${SED} -e s/^X//"
7316
7317 # The HP-UX ksh and POSIX shell print the target directory to stdout
7318 # if CDPATH is set.
7319 if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
7320
7321 # ### BEGIN LIBTOOL CONFIG
7322
7323 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
7324
7325 # Shell to use when invoking shell scripts.
7326 SHELL=$lt_SHELL
7327
7328 # Whether or not to build shared libraries.
7329 build_libtool_libs=$enable_shared
7330
7331 # Whether or not to build static libraries.
7332 build_old_libs=$enable_static
7333
7334 # Whether or not to add -lc for building shared libraries.
7335 build_libtool_need_lc=$need_lc
7336
7337 # Whether or not to optimize for fast installation.
7338 fast_install=$enable_fast_install
7339
7340 # The host system.
7341 host_alias=$host_alias
7342 host=$host
7343
7344 # An echo program that does not interpret backslashes.
7345 echo=$lt_echo
7346
7347 # The archiver.
7348 AR=$lt_AR
7349 AR_FLAGS=$lt_AR_FLAGS
7350
7351 # The default C compiler.
7352 CC=$lt_CC
7353
7354 # Is the compiler the GNU C compiler?
7355 with_gcc=$GCC
7356
7357 # The linker used to build libraries.
7358 LD=$lt_LD
7359
7360 # Whether we need hard or soft links.
7361 LN_S=$lt_LN_S
7362
7363 # A BSD-compatible nm program.
7364 NM=$lt_NM
7365
7366 # A symbol stripping program
7367 STRIP=$STRIP
7368
7369 # Used to examine libraries when file_magic_cmd begins "file"
7370 MAGIC_CMD=$MAGIC_CMD
7371
7372 # Used on cygwin: DLL creation program.
7373 DLLTOOL="$DLLTOOL"
7374
7375 # Used on cygwin: object dumper.
7376 OBJDUMP="$OBJDUMP"
7377
7378 # Used on cygwin: assembler.
7379 AS="$AS"
7380
7381 # The name of the directory that contains temporary libtool files.
7382 objdir=$objdir
7383
7384 # How to create reloadable object files.
7385 reload_flag=$lt_reload_flag
7386 reload_cmds=$lt_reload_cmds
7387
7388 # How to pass a linker flag through the compiler.
7389 wl=$lt_wl
7390
7391 # Object file suffix (normally "o").
7392 objext="$ac_objext"
7393
7394 # Old archive suffix (normally "a").
7395 libext="$libext"
7396
7397 # Executable file suffix (normally "").
7398 exeext="$exeext"
7399
7400 # Additional compiler flags for building library objects.
7401 pic_flag=$lt_pic_flag
7402 pic_mode=$pic_mode
7403
7404 # Does compiler simultaneously support -c and -o options?
7405 compiler_c_o=$lt_compiler_c_o
7406
7407 # Can we write directly to a .lo ?
7408 compiler_o_lo=$lt_compiler_o_lo
7409
7410 # Must we lock files when doing compilation ?
7411 need_locks=$lt_need_locks
7412
7413 # Do we need the lib prefix for modules?
7414 need_lib_prefix=$need_lib_prefix
7415
7416 # Do we need a version for libraries?
7417 need_version=$need_version
7418
7419 # Whether dlopen is supported.
7420 dlopen_support=$enable_dlopen
7421
7422 # Whether dlopen of programs is supported.
7423 dlopen_self=$enable_dlopen_self
7424
7425 # Whether dlopen of statically linked programs is supported.
7426 dlopen_self_static=$enable_dlopen_self_static
7427
7428 # Compiler flag to prevent dynamic linking.
7429 link_static_flag=$lt_link_static_flag
7430
7431 # Compiler flag to turn off builtin functions.
7432 no_builtin_flag=$lt_no_builtin_flag
7433
7434 # Compiler flag to allow reflexive dlopens.
7435 export_dynamic_flag_spec=$lt_export_dynamic_flag_spec
7436
7437 # Compiler flag to generate shared objects directly from archives.
7438 whole_archive_flag_spec=$lt_whole_archive_flag_spec
7439
7440 # Compiler flag to generate thread-safe objects.
7441 thread_safe_flag_spec=$lt_thread_safe_flag_spec
7442
7443 # Library versioning type.
7444 version_type=$version_type
7445
7446 # Format of library name prefix.
7447 libname_spec=$lt_libname_spec
7448
7449 # List of archive names.  First name is the real one, the rest are links.
7450 # The last name is the one that the linker finds with -lNAME.
7451 library_names_spec=$lt_library_names_spec
7452
7453 # The coded name of the library, if different from the real name.
7454 soname_spec=$lt_soname_spec
7455
7456 # Commands used to build and install an old-style archive.
7457 RANLIB=$lt_RANLIB
7458 old_archive_cmds=$lt_old_archive_cmds
7459 old_postinstall_cmds=$lt_old_postinstall_cmds
7460 old_postuninstall_cmds=$lt_old_postuninstall_cmds
7461
7462 # Create an old-style archive from a shared archive.
7463 old_archive_from_new_cmds=$lt_old_archive_from_new_cmds
7464
7465 # Create a temporary old-style archive to link instead of a shared archive.
7466 old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds
7467
7468 # Commands used to build and install a shared archive.
7469 archive_cmds=$lt_archive_cmds
7470 archive_expsym_cmds=$lt_archive_expsym_cmds
7471 postinstall_cmds=$lt_postinstall_cmds
7472 postuninstall_cmds=$lt_postuninstall_cmds
7473
7474 # Commands to strip libraries.
7475 old_striplib=$lt_old_striplib
7476 striplib=$lt_striplib
7477
7478 # Method to check whether dependent libraries are shared objects.
7479 deplibs_check_method=$lt_deplibs_check_method
7480
7481 # Command to use when deplibs_check_method == file_magic.
7482 file_magic_cmd=$lt_file_magic_cmd
7483
7484 # Flag that allows shared libraries with undefined symbols to be built.
7485 allow_undefined_flag=$lt_allow_undefined_flag
7486
7487 # Flag that forces no undefined symbols.
7488 no_undefined_flag=$lt_no_undefined_flag
7489
7490 # Commands used to finish a libtool library installation in a directory.
7491 finish_cmds=$lt_finish_cmds
7492
7493 # Same as above, but a single script fragment to be evaled but not shown.
7494 finish_eval=$lt_finish_eval
7495
7496 # Take the output of nm and produce a listing of raw symbols and C names.
7497 global_symbol_pipe=$lt_global_symbol_pipe
7498
7499 # Transform the output of nm in a proper C declaration
7500 global_symbol_to_cdecl=$lt_global_symbol_to_cdecl
7501
7502 # Transform the output of nm in a C name address pair
7503 global_symbol_to_c_name_address=$lt_global_symbol_to_c_name_address
7504
7505 # This is the shared library runtime path variable.
7506 runpath_var=$runpath_var
7507
7508 # This is the shared library path variable.
7509 shlibpath_var=$shlibpath_var
7510
7511 # Is shlibpath searched before the hard-coded library search path?
7512 shlibpath_overrides_runpath=$shlibpath_overrides_runpath
7513
7514 # How to hardcode a shared library path into an executable.
7515 hardcode_action=$hardcode_action
7516
7517 # Whether we should hardcode library paths into libraries.
7518 hardcode_into_libs=$hardcode_into_libs
7519
7520 # Flag to hardcode \$libdir into a binary during linking.
7521 # This must work even if \$libdir does not exist.
7522 hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
7523
7524 # Whether we need a single -rpath flag with a separated argument.
7525 hardcode_libdir_separator=$lt_hardcode_libdir_separator
7526
7527 # Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
7528 # resulting binary.
7529 hardcode_direct=$hardcode_direct
7530
7531 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
7532 # resulting binary.
7533 hardcode_minus_L=$hardcode_minus_L
7534
7535 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
7536 # the resulting binary.
7537 hardcode_shlibpath_var=$hardcode_shlibpath_var
7538
7539 # Variables whose values should be saved in libtool wrapper scripts and
7540 # restored at relink time.
7541 variables_saved_for_relink="$variables_saved_for_relink"
7542
7543 # Whether libtool must link a program against all its dependency libraries.
7544 link_all_deplibs=$link_all_deplibs
7545
7546 # Compile-time system search path for libraries
7547 sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
7548
7549 # Run-time system search path for libraries
7550 sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
7551
7552 # Fix the shell variable \$srcfile for the compiler.
7553 fix_srcfile_path="$fix_srcfile_path"
7554
7555 # Set to yes if exported symbols are required.
7556 always_export_symbols=$always_export_symbols
7557
7558 # The commands to list exported symbols.
7559 export_symbols_cmds=$lt_export_symbols_cmds
7560
7561 # The commands to extract the exported symbol list from a shared archive.
7562 extract_expsyms_cmds=$lt_extract_expsyms_cmds
7563
7564 # Symbols that should not be listed in the preloaded symbols.
7565 exclude_expsyms=$lt_exclude_expsyms
7566
7567 # Symbols that must always be exported.
7568 include_expsyms=$lt_include_expsyms
7569
7570 # ### END LIBTOOL CONFIG
7571
7572 __EOF__
7573
7574   case $host_os in
7575   aix3*)
7576     cat <<\EOF >> "${ofile}T"
7577
7578 # AIX sometimes has problems with the GCC collect2 program.  For some
7579 # reason, if we set the COLLECT_NAMES environment variable, the problems
7580 # vanish in a puff of smoke.
7581 if test "X${COLLECT_NAMES+set}" != Xset; then
7582   COLLECT_NAMES=
7583   export COLLECT_NAMES
7584 fi
7585 EOF
7586     ;;
7587   esac
7588
7589   case $host_os in
7590   cygwin* | mingw* | pw32* | os2*)
7591     cat <<'EOF' >> "${ofile}T"
7592       # This is a source program that is used to create dlls on Windows
7593       # Don't remove nor modify the starting and closing comments
7594 # /* ltdll.c starts here */
7595 # #define WIN32_LEAN_AND_MEAN
7596 # #include <windows.h>
7597 # #undef WIN32_LEAN_AND_MEAN
7598 # #include <stdio.h>
7599 #
7600 # #ifndef __CYGWIN__
7601 # #  ifdef __CYGWIN32__
7602 # #    define __CYGWIN__ __CYGWIN32__
7603 # #  endif
7604 # #endif
7605 #
7606 # #ifdef __cplusplus
7607 # extern "C" {
7608 # #endif
7609 # BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
7610 # #ifdef __cplusplus
7611 # }
7612 # #endif
7613 #
7614 # #ifdef __CYGWIN__
7615 # #include <cygwin/cygwin_dll.h>
7616 # DECLARE_CYGWIN_DLL( DllMain );
7617 # #endif
7618 # HINSTANCE __hDllInstance_base;
7619 #
7620 # BOOL APIENTRY
7621 # DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
7622 # {
7623 #   __hDllInstance_base = hInst;
7624 #   return TRUE;
7625 # }
7626 # /* ltdll.c ends here */
7627         # This is a source program that is used to create import libraries
7628         # on Windows for dlls which lack them. Don't remove nor modify the
7629         # starting and closing comments
7630 # /* impgen.c starts here */
7631 # /*   Copyright (C) 1999-2000 Free Software Foundation, Inc.
7632 #
7633 #  This file is part of GNU libtool.
7634 #
7635 #  This program is free software; you can redistribute it and/or modify
7636 #  it under the terms of the GNU General Public License as published by
7637 #  the Free Software Foundation; either version 2 of the License, or
7638 #  (at your option) any later version.
7639 #
7640 #  This program is distributed in the hope that it will be useful,
7641 #  but WITHOUT ANY WARRANTY; without even the implied warranty of
7642 #  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
7643 #  GNU General Public License for more details.
7644 #
7645 #  You should have received a copy of the GNU General Public License
7646 #  along with this program; if not, write to the Free Software
7647 #  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
7648 #  */
7649 #
7650 # #include <stdio.h>            /* for printf() */
7651 # #include <unistd.h>           /* for open(), lseek(), read() */
7652 # #include <fcntl.h>            /* for O_RDONLY, O_BINARY */
7653 # #include <string.h>           /* for strdup() */
7654 #
7655 # /* O_BINARY isn't required (or even defined sometimes) under Unix */
7656 # #ifndef O_BINARY
7657 # #define O_BINARY 0
7658 # #endif
7659 #
7660 # static unsigned int
7661 # pe_get16 (fd, offset)
7662 #      int fd;
7663 #      int offset;
7664 # {
7665 #   unsigned char b[2];
7666 #   lseek (fd, offset, SEEK_SET);
7667 #   read (fd, b, 2);
7668 #   return b[0] + (b[1]<<8);
7669 # }
7670 #
7671 # static unsigned int
7672 # pe_get32 (fd, offset)
7673 #     int fd;
7674 #     int offset;
7675 # {
7676 #   unsigned char b[4];
7677 #   lseek (fd, offset, SEEK_SET);
7678 #   read (fd, b, 4);
7679 #   return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
7680 # }
7681 #
7682 # static unsigned int
7683 # pe_as32 (ptr)
7684 #      void *ptr;
7685 # {
7686 #   unsigned char *b = ptr;
7687 #   return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
7688 # }
7689 #
7690 # int
7691 # main (argc, argv)
7692 #     int argc;
7693 #     char *argv[];
7694 # {
7695 #     int dll;
7696 #     unsigned long pe_header_offset, opthdr_ofs, num_entries, i;
7697 #     unsigned long export_rva, export_size, nsections, secptr, expptr;
7698 #     unsigned long name_rvas, nexp;
7699 #     unsigned char *expdata, *erva;
7700 #     char *filename, *dll_name;
7701 #
7702 #     filename = argv[1];
7703 #
7704 #     dll = open(filename, O_RDONLY|O_BINARY);
7705 #     if (dll < 1)
7706 #       return 1;
7707 #
7708 #     dll_name = filename;
7709 #
7710 #     for (i=0; filename[i]; i++)
7711 #       if (filename[i] == '/' || filename[i] == '\\'  || filename[i] == ':')
7712 #           dll_name = filename + i +1;
7713 #
7714 #     pe_header_offset = pe_get32 (dll, 0x3c);
7715 #     opthdr_ofs = pe_header_offset + 4 + 20;
7716 #     num_entries = pe_get32 (dll, opthdr_ofs + 92);
7717 #
7718 #     if (num_entries < 1) /* no exports */
7719 #       return 1;
7720 #
7721 #     export_rva = pe_get32 (dll, opthdr_ofs + 96);
7722 #     export_size = pe_get32 (dll, opthdr_ofs + 100);
7723 #     nsections = pe_get16 (dll, pe_header_offset + 4 +2);
7724 #     secptr = (pe_header_offset + 4 + 20 +
7725 #             pe_get16 (dll, pe_header_offset + 4 + 16));
7726 #
7727 #     expptr = 0;
7728 #     for (i = 0; i < nsections; i++)
7729 #     {
7730 #       char sname[8];
7731 #       unsigned long secptr1 = secptr + 40 * i;
7732 #       unsigned long vaddr = pe_get32 (dll, secptr1 + 12);
7733 #       unsigned long vsize = pe_get32 (dll, secptr1 + 16);
7734 #       unsigned long fptr = pe_get32 (dll, secptr1 + 20);
7735 #       lseek(dll, secptr1, SEEK_SET);
7736 #       read(dll, sname, 8);
7737 #       if (vaddr <= export_rva && vaddr+vsize > export_rva)
7738 #       {
7739 #           expptr = fptr + (export_rva - vaddr);
7740 #           if (export_rva + export_size > vaddr + vsize)
7741 #               export_size = vsize - (export_rva - vaddr);
7742 #           break;
7743 #       }
7744 #     }
7745 #
7746 #     expdata = (unsigned char*)malloc(export_size);
7747 #     lseek (dll, expptr, SEEK_SET);
7748 #     read (dll, expdata, export_size);
7749 #     erva = expdata - export_rva;
7750 #
7751 #     nexp = pe_as32 (expdata+24);
7752 #     name_rvas = pe_as32 (expdata+32);
7753 #
7754 #     printf ("EXPORTS\n");
7755 #     for (i = 0; i<nexp; i++)
7756 #     {
7757 #       unsigned long name_rva = pe_as32 (erva+name_rvas+i*4);
7758 #       printf ("\t%s @ %ld ;\n", erva+name_rva, 1+ i);
7759 #     }
7760 #
7761 #     return 0;
7762 # }
7763 # /* impgen.c ends here */
7764
7765 EOF
7766     ;;
7767   esac
7768
7769   # We use sed instead of cat because bash on DJGPP gets confused if
7770   # if finds mixed CR/LF and LF-only lines.  Since sed operates in
7771   # text mode, it properly converts lines to CR/LF.  This bash problem
7772   # is reportedly fixed, but why not run on old versions too?
7773   sed '$q' "$ltmain" >> "${ofile}T" || (rm -f "${ofile}T"; exit 1)
7774
7775   mv -f "${ofile}T" "$ofile" || \
7776     (rm -f "$ofile" && cp "${ofile}T" "$ofile" && rm -f "${ofile}T")
7777   chmod +x "$ofile"
7778 fi
7779
7780
7781
7782
7783
7784 # This can be used to rebuild libtool when needed
7785 LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
7786
7787 # Always use our own libtool.
7788 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
7789
7790 # Prevent multiple expansion
7791
7792
7793
7794 ol_link_perl=no
7795 if test $ol_enable_perl != no ; then
7796         # Extract the first word of "perl", so it can be a program name with args.
7797 set dummy perl; ac_word=$2
7798 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
7799 echo "configure:7800: checking for $ac_word" >&5
7800 if eval "test \"\${ac_cv_path_PERLBIN+set}\" = set"; then
7801   echo $ac_n "(cached) $ac_c" 1>&6
7802 else
7803   case "$PERLBIN" in
7804   /*)
7805   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a path.
7806   ;;
7807   ?:/*)
7808   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a dos path.
7809   ;;
7810   *)
7811   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
7812   ac_dummy="$PATH"
7813   for ac_dir in $ac_dummy; do 
7814     test -z "$ac_dir" && ac_dir=.
7815     if test -f $ac_dir/$ac_word; then
7816       ac_cv_path_PERLBIN="$ac_dir/$ac_word"
7817       break
7818     fi
7819   done
7820   IFS="$ac_save_ifs"
7821   test -z "$ac_cv_path_PERLBIN" && ac_cv_path_PERLBIN="/usr/bin/perl"
7822   ;;
7823 esac
7824 fi
7825 PERLBIN="$ac_cv_path_PERLBIN"
7826 if test -n "$PERLBIN"; then
7827   echo "$ac_t""$PERLBIN" 1>&6
7828 else
7829   echo "$ac_t""no" 1>&6
7830 fi
7831
7832
7833         if test "no$PERLBIN" = "no" ; then
7834                 if test $ol_enable_perl = yes ; then
7835                         { echo "configure: error: could not locate perl" 1>&2; exit 1; }
7836                 fi
7837
7838         else
7839                 PERL_CPPFLAGS="`$PERLBIN -MExtUtils::Embed -e ccopts`"
7840                 PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e 's/ -lc / /' -e 's/ -lc$//'`"
7841
7842                 if test x"$ol_enable_perl" = "xyes" ; then
7843                         SLAPD_PERL_LDFLAGS="$PERL_LDFLAGS"
7844                 else
7845                         MOD_PERL_LDFLAGS="$PERL_LDFLAGS"
7846                 fi
7847                                 ol_link_perl=yes
7848         fi
7849 fi
7850
7851 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
7852 echo "configure:7853: checking how to run the C preprocessor" >&5
7853 # On Suns, sometimes $CPP names a directory.
7854 if test -n "$CPP" && test -d "$CPP"; then
7855   CPP=
7856 fi
7857 if test -z "$CPP"; then
7858 if eval "test \"\${ac_cv_prog_CPP+set}\" = set"; then
7859   echo $ac_n "(cached) $ac_c" 1>&6
7860 else
7861     # This must be in double quotes, not single quotes, because CPP may get
7862   # substituted into the Makefile and "${CC-cc}" will confuse make.
7863   CPP="${CC-cc} -E"
7864   # On the NeXT, cc -E runs the code through the compiler's parser,
7865   # not just through cpp.
7866   cat > conftest.$ac_ext <<EOF
7867 #line 7868 "configure"
7868 #include "confdefs.h"
7869 #include <assert.h>
7870 Syntax Error
7871 EOF
7872 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7873 { (eval echo configure:7874: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7874 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7875 if test -z "$ac_err"; then
7876   :
7877 else
7878   echo "$ac_err" >&5
7879   echo "configure: failed program was:" >&5
7880   cat conftest.$ac_ext >&5
7881   rm -rf conftest*
7882   CPP="${CC-cc} -E -traditional-cpp"
7883   cat > conftest.$ac_ext <<EOF
7884 #line 7885 "configure"
7885 #include "confdefs.h"
7886 #include <assert.h>
7887 Syntax Error
7888 EOF
7889 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7890 { (eval echo configure:7891: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7891 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7892 if test -z "$ac_err"; then
7893   :
7894 else
7895   echo "$ac_err" >&5
7896   echo "configure: failed program was:" >&5
7897   cat conftest.$ac_ext >&5
7898   rm -rf conftest*
7899   CPP="${CC-cc} -nologo -E"
7900   cat > conftest.$ac_ext <<EOF
7901 #line 7902 "configure"
7902 #include "confdefs.h"
7903 #include <assert.h>
7904 Syntax Error
7905 EOF
7906 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7907 { (eval echo configure:7908: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7908 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7909 if test -z "$ac_err"; then
7910   :
7911 else
7912   echo "$ac_err" >&5
7913   echo "configure: failed program was:" >&5
7914   cat conftest.$ac_ext >&5
7915   rm -rf conftest*
7916   CPP=/lib/cpp
7917 fi
7918 rm -f conftest*
7919 fi
7920 rm -f conftest*
7921 fi
7922 rm -f conftest*
7923   ac_cv_prog_CPP="$CPP"
7924 fi
7925   CPP="$ac_cv_prog_CPP"
7926 else
7927   ac_cv_prog_CPP="$CPP"
7928 fi
7929 echo "$ac_t""$CPP" 1>&6
7930
7931
7932
7933 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
7934 echo "configure:7935: checking for Cygwin environment" >&5
7935 if eval "test \"\${ac_cv_cygwin+set}\" = set"; then
7936   echo $ac_n "(cached) $ac_c" 1>&6
7937 else
7938   cat > conftest.$ac_ext <<EOF
7939 #line 7940 "configure"
7940 #include "confdefs.h"
7941
7942 int main() {
7943
7944 #ifndef __CYGWIN__
7945 #define __CYGWIN__ __CYGWIN32__
7946 #endif
7947 return __CYGWIN__;
7948 ; return 0; }
7949 EOF
7950 if { (eval echo configure:7951: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7951   rm -rf conftest*
7952   ac_cv_cygwin=yes
7953 else
7954   echo "configure: failed program was:" >&5
7955   cat conftest.$ac_ext >&5
7956   rm -rf conftest*
7957   ac_cv_cygwin=no
7958 fi
7959 rm -f conftest*
7960 fi
7961
7962 echo "$ac_t""$ac_cv_cygwin" 1>&6
7963 CYGWIN=
7964 test "$ac_cv_cygwin" = yes && CYGWIN=yes
7965 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
7966 echo "configure:7967: checking for mingw32 environment" >&5
7967 if eval "test \"\${ac_cv_mingw32+set}\" = set"; then
7968   echo $ac_n "(cached) $ac_c" 1>&6
7969 else
7970   cat > conftest.$ac_ext <<EOF
7971 #line 7972 "configure"
7972 #include "confdefs.h"
7973
7974 int main() {
7975 return __MINGW32__;
7976 ; return 0; }
7977 EOF
7978 if { (eval echo configure:7979: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7979   rm -rf conftest*
7980   ac_cv_mingw32=yes
7981 else
7982   echo "configure: failed program was:" >&5
7983   cat conftest.$ac_ext >&5
7984   rm -rf conftest*
7985   ac_cv_mingw32=no
7986 fi
7987 rm -f conftest*
7988 fi
7989
7990 echo "$ac_t""$ac_cv_mingw32" 1>&6
7991 MINGW32=
7992 test "$ac_cv_mingw32" = yes && MINGW32=yes
7993
7994
7995
7996 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
7997 echo "configure:7998: checking for executable suffix" >&5
7998 if eval "test \"\${ac_cv_exeext+set}\" = set"; then
7999   echo $ac_n "(cached) $ac_c" 1>&6
8000 else
8001   if test "$CYGWIN" = yes || test "$MINGW32" = yes || test "$EMXOS2" = yes; then
8002   ac_cv_exeext=.exe
8003 else
8004   rm -f conftest*
8005   echo 'int main () { return 0; }' > conftest.$ac_ext
8006   ac_cv_exeext=
8007   if { (eval echo configure:8008: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
8008     for file in conftest.*; do
8009       case $file in
8010       *.c | *.C | *.o | *.obj | *.xcoff) ;;
8011       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
8012       esac
8013     done
8014   else
8015     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
8016   fi
8017   rm -f conftest*
8018   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
8019 fi
8020 fi
8021
8022 EXEEXT=""
8023 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
8024 echo "$ac_t""${ac_cv_exeext}" 1>&6
8025 ac_exeext=$EXEEXT
8026
8027 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
8028 echo "configure:8029: checking for object suffix" >&5
8029 if eval "test \"\${ac_cv_objext+set}\" = set"; then
8030   echo $ac_n "(cached) $ac_c" 1>&6
8031 else
8032   rm -f conftest*
8033 echo 'int i = 1;' > conftest.$ac_ext
8034 if { (eval echo configure:8035: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8035   for ac_file in conftest.*; do
8036     case $ac_file in
8037     *.c) ;;
8038     *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
8039     esac
8040   done
8041 else
8042   { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
8043 fi
8044 rm -f conftest*
8045 fi
8046
8047 echo "$ac_t""$ac_cv_objext" 1>&6
8048 OBJEXT=$ac_cv_objext
8049 ac_objext=$ac_cv_objext
8050
8051
8052 cat >> confdefs.h <<EOF
8053 #define EXEEXT "${EXEEXT}"
8054 EOF
8055
8056
8057 echo $ac_n "checking for be_app in -lbe""... $ac_c" 1>&6
8058 echo "configure:8059: checking for be_app in -lbe" >&5
8059 ac_lib_var=`echo be'_'be_app | sed 'y%./+-:%__p__%'`
8060 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8061   echo $ac_n "(cached) $ac_c" 1>&6
8062 else
8063   ac_save_LIBS="$LIBS"
8064 LIBS="-lbe -lroot -lnet $LIBS"
8065 cat > conftest.$ac_ext <<EOF
8066 #line 8067 "configure"
8067 #include "confdefs.h"
8068 /* Override any gcc2 internal prototype to avoid an error.  */
8069 /* We use char because int might match the return type of a gcc2
8070     builtin and then its argument prototype would still apply.  */
8071 char be_app();
8072
8073 int main() {
8074 be_app()
8075 ; return 0; }
8076 EOF
8077 if { (eval echo configure:8078: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8078   rm -rf conftest*
8079   eval "ac_cv_lib_$ac_lib_var=yes"
8080 else
8081   echo "configure: failed program was:" >&5
8082   cat conftest.$ac_ext >&5
8083   rm -rf conftest*
8084   eval "ac_cv_lib_$ac_lib_var=no"
8085 fi
8086 rm -f conftest*
8087 LIBS="$ac_save_LIBS"
8088
8089 fi
8090 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8091   echo "$ac_t""yes" 1>&6
8092   LIBS="$LIBS -lbe -lroot -lnet"
8093 else
8094   echo "$ac_t""no" 1>&6
8095 :
8096 fi
8097
8098
8099
8100
8101
8102 echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
8103 echo "configure:8104: checking for ${CC-cc} option to accept ANSI C" >&5
8104 if eval "test \"\${am_cv_prog_cc_stdc+set}\" = set"; then
8105   echo $ac_n "(cached) $ac_c" 1>&6
8106 else
8107   am_cv_prog_cc_stdc=no
8108 ac_save_CC="$CC"
8109 # Don't try gcc -ansi; that turns off useful extensions and
8110 # breaks some systems' header files.
8111 # AIX                   -qlanglvl=ansi
8112 # Ultrix and OSF/1      -std1
8113 # HP-UX 10.20 and later -Ae
8114 # HP-UX older versions  -Aa -D_HPUX_SOURCE
8115 # SVR4                  -Xc -D__EXTENSIONS__
8116 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
8117 do
8118   CC="$ac_save_CC $ac_arg"
8119   cat > conftest.$ac_ext <<EOF
8120 #line 8121 "configure"
8121 #include "confdefs.h"
8122 #include <stdarg.h>
8123 #include <stdio.h>
8124 #include <sys/types.h>
8125 #include <sys/stat.h>
8126 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
8127 struct buf { int x; };
8128 FILE * (*rcsopen) (struct buf *, struct stat *, int);
8129 static char *e (p, i)
8130      char **p;
8131      int i;
8132 {
8133   return p[i];
8134 }
8135 static char *f (char * (*g) (char **, int), char **p, ...)
8136 {
8137   char *s;
8138   va_list v;
8139   va_start (v,p);
8140   s = g (p, va_arg (v,int));
8141   va_end (v);
8142   return s;
8143 }
8144 int test (int i, double x);
8145 struct s1 {int (*f) (int a);};
8146 struct s2 {int (*f) (double a);};
8147 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
8148 int argc;
8149 char **argv;
8150
8151 int main() {
8152
8153 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
8154
8155 ; return 0; }
8156 EOF
8157 if { (eval echo configure:8158: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8158   rm -rf conftest*
8159   am_cv_prog_cc_stdc="$ac_arg"; break
8160 else
8161   echo "configure: failed program was:" >&5
8162   cat conftest.$ac_ext >&5
8163 fi
8164 rm -f conftest*
8165 done
8166 CC="$ac_save_CC"
8167
8168 fi
8169
8170 if test -z "$am_cv_prog_cc_stdc"; then
8171   echo "$ac_t""none needed" 1>&6
8172 else
8173   echo "$ac_t""$am_cv_prog_cc_stdc" 1>&6
8174 fi
8175 case "x$am_cv_prog_cc_stdc" in
8176   x|xno) ;;
8177   *) CC="$CC $am_cv_prog_cc_stdc" ;;
8178 esac
8179
8180 if test "X${am_cv_prog_cc_stdc}" = "Xno" ; then
8181         { echo "configure: error: OpenLDAP requires compiler to support STDC constructs." 1>&2; exit 1; }
8182 fi
8183
8184 # test for make depend flag
8185 OL_MKDEP=
8186 OL_MKDEP_FLAGS=
8187 if test -z "${MKDEP}"; then
8188         OL_MKDEP="${CC-cc}"
8189         if test -z "${MKDEP_FLAGS}"; then
8190                 echo $ac_n "checking for ${OL_MKDEP} depend flag""... $ac_c" 1>&6
8191 echo "configure:8192: checking for ${OL_MKDEP} depend flag" >&5
8192 if eval "test \"\${ol_cv_mkdep+set}\" = set"; then
8193   echo $ac_n "(cached) $ac_c" 1>&6
8194 else
8195   
8196                         ol_cv_mkdep=no
8197                         for flag in "-M" "-xM"; do
8198                                 cat > conftest.c <<EOF
8199  noCode;
8200 EOF
8201                                 if { ac_try='$OL_MKDEP $flag conftest.c'; { (eval echo configure:8202: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } \
8202                                         | egrep '^conftest\.'"${ac_objext}" >/dev/null 2>&1
8203                                 then
8204                                         if test ! -f conftest."${ac_object}" ; then
8205                                                 ol_cv_mkdep=$flag
8206                                                 OL_MKDEP_FLAGS="$flag"
8207                                                 break
8208                                         fi
8209                                 fi
8210                         done
8211                         rm -f conftest*
8212                 
8213 fi
8214
8215 echo "$ac_t""$ol_cv_mkdep" 1>&6
8216         else
8217                 cc_cv_mkdep=yes
8218                 OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
8219         fi
8220 else
8221         cc_cv_mkdep=yes
8222         OL_MKDEP="${MKDEP}"
8223         OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
8224 fi
8225
8226
8227
8228 if test "${ol_cv_mkdep}" = no ; then
8229         # this will soon become an error
8230         echo "configure: warning: do not know how to generate dependencies" 1>&2
8231 fi
8232
8233 echo $ac_n "checking for afopen in -ls""... $ac_c" 1>&6
8234 echo "configure:8235: checking for afopen in -ls" >&5
8235 ac_lib_var=`echo s'_'afopen | sed 'y%./+-:%__p__%'`
8236 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8237   echo $ac_n "(cached) $ac_c" 1>&6
8238 else
8239   ac_save_LIBS="$LIBS"
8240 LIBS="-ls  $LIBS"
8241 cat > conftest.$ac_ext <<EOF
8242 #line 8243 "configure"
8243 #include "confdefs.h"
8244 /* Override any gcc2 internal prototype to avoid an error.  */
8245 /* We use char because int might match the return type of a gcc2
8246     builtin and then its argument prototype would still apply.  */
8247 char afopen();
8248
8249 int main() {
8250 afopen()
8251 ; return 0; }
8252 EOF
8253 if { (eval echo configure:8254: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8254   rm -rf conftest*
8255   eval "ac_cv_lib_$ac_lib_var=yes"
8256 else
8257   echo "configure: failed program was:" >&5
8258   cat conftest.$ac_ext >&5
8259   rm -rf conftest*
8260   eval "ac_cv_lib_$ac_lib_var=no"
8261 fi
8262 rm -f conftest*
8263 LIBS="$ac_save_LIBS"
8264
8265 fi
8266 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8267   echo "$ac_t""yes" 1>&6
8268   
8269         AUTH_LIBS=-ls
8270         cat >> confdefs.h <<\EOF
8271 #define HAVE_AIX_SECURITY 1
8272 EOF
8273
8274
8275 else
8276   echo "$ac_t""no" 1>&6
8277 fi
8278
8279
8280 case "$target" in
8281 *-ibm-openedition)
8282         ac_cv_func_getopt=no
8283         cat >> confdefs.h <<\EOF
8284 #define BOTH_STRINGS_H 1
8285 EOF
8286
8287         ;;
8288 esac
8289
8290 ol_link_modules=no
8291 WITH_MODULES_ENABLED=no
8292 if test $ol_enable_modules != no ; then
8293         for ac_hdr in ltdl.h
8294 do
8295 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8296 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8297 echo "configure:8298: checking for $ac_hdr" >&5
8298 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
8299   echo $ac_n "(cached) $ac_c" 1>&6
8300 else
8301   cat > conftest.$ac_ext <<EOF
8302 #line 8303 "configure"
8303 #include "confdefs.h"
8304 #include <$ac_hdr>
8305 EOF
8306 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8307 { (eval echo configure:8308: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8308 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8309 if test -z "$ac_err"; then
8310   rm -rf conftest*
8311   eval "ac_cv_header_$ac_safe=yes"
8312 else
8313   echo "$ac_err" >&5
8314   echo "configure: failed program was:" >&5
8315   cat conftest.$ac_ext >&5
8316   rm -rf conftest*
8317   eval "ac_cv_header_$ac_safe=no"
8318 fi
8319 rm -f conftest*
8320 fi
8321 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8322   echo "$ac_t""yes" 1>&6
8323     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8324   cat >> confdefs.h <<EOF
8325 #define $ac_tr_hdr 1
8326 EOF
8327  
8328 else
8329   echo "$ac_t""no" 1>&6
8330 fi
8331 done
8332
8333
8334         if test $ac_cv_header_ltdl_h = no ; then
8335                 { echo "configure: error: could not locate libtool ltdl.h" 1>&2; exit 1; }
8336         fi
8337
8338         echo $ac_n "checking for lt_dlinit in -lltdl""... $ac_c" 1>&6
8339 echo "configure:8340: checking for lt_dlinit in -lltdl" >&5
8340 ac_lib_var=`echo ltdl'_'lt_dlinit | sed 'y%./+-:%__p__%'`
8341 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8342   echo $ac_n "(cached) $ac_c" 1>&6
8343 else
8344   ac_save_LIBS="$LIBS"
8345 LIBS="-lltdl  $LIBS"
8346 cat > conftest.$ac_ext <<EOF
8347 #line 8348 "configure"
8348 #include "confdefs.h"
8349 /* Override any gcc2 internal prototype to avoid an error.  */
8350 /* We use char because int might match the return type of a gcc2
8351     builtin and then its argument prototype would still apply.  */
8352 char lt_dlinit();
8353
8354 int main() {
8355 lt_dlinit()
8356 ; return 0; }
8357 EOF
8358 if { (eval echo configure:8359: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8359   rm -rf conftest*
8360   eval "ac_cv_lib_$ac_lib_var=yes"
8361 else
8362   echo "configure: failed program was:" >&5
8363   cat conftest.$ac_ext >&5
8364   rm -rf conftest*
8365   eval "ac_cv_lib_$ac_lib_var=no"
8366 fi
8367 rm -f conftest*
8368 LIBS="$ac_save_LIBS"
8369
8370 fi
8371 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8372   echo "$ac_t""yes" 1>&6
8373   
8374                 MODULES_LIBS=-lltdl
8375                 cat >> confdefs.h <<\EOF
8376 #define HAVE_LIBLTDL 1
8377 EOF
8378
8379         
8380 else
8381   echo "$ac_t""no" 1>&6
8382 fi
8383
8384
8385         if test "$ac_cv_lib_ltdl_lt_dlinit" = no ; then
8386                 { echo "configure: error: could not locate libtool -lltdl" 1>&2; exit 1; }
8387         fi
8388         ol_link_modules=yes
8389         WITH_MODULES_ENABLED=yes
8390
8391 else
8392         for i in $Backends; do
8393                 eval "ol_tmp=\$ol_enable_$i"
8394                 if test $ol_tmp = mod ; then
8395                         echo "configure: warning: building static $i backend" 1>&2
8396                         eval "ol_enable_$i=yes"
8397                 fi
8398         done
8399         for i in $Overlays; do
8400                 eval "ol_tmp=\$ol_enable_$i"
8401                 if test $ol_tmp = mod ; then
8402                         echo "configure: warning: building static $i overlay" 1>&2
8403                         eval "ol_enable_$i=yes"
8404                 fi
8405         done
8406 fi
8407
8408 # test for EBCDIC
8409 echo $ac_n "checking for EBCDIC""... $ac_c" 1>&6
8410 echo "configure:8411: checking for EBCDIC" >&5
8411 if eval "test \"\${ol_cv_cpp_ebcdic+set}\" = set"; then
8412   echo $ac_n "(cached) $ac_c" 1>&6
8413 else
8414   
8415         cat > conftest.$ac_ext <<EOF
8416 #line 8417 "configure"
8417 #include "confdefs.h"
8418
8419 #if !('M' == 0xd4)
8420 #include <__ASCII__/generate_error.h>
8421 #endif
8422
8423 EOF
8424 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8425 { (eval echo configure:8426: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8426 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8427 if test -z "$ac_err"; then
8428   rm -rf conftest*
8429   ol_cv_cpp_ebcdic=yes
8430 else
8431   echo "$ac_err" >&5
8432   echo "configure: failed program was:" >&5
8433   cat conftest.$ac_ext >&5
8434   rm -rf conftest*
8435   ol_cv_cpp_ebcdic=no
8436 fi
8437 rm -f conftest*
8438 fi
8439
8440 echo "$ac_t""$ol_cv_cpp_ebcdic" 1>&6
8441 if test $ol_cv_cpp_ebcdic = yes ; then
8442         cat >> confdefs.h <<\EOF
8443 #define HAVE_EBCDIC 1
8444 EOF
8445
8446 fi
8447
8448 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
8449 echo "configure:8450: checking for ANSI C header files" >&5
8450 if eval "test \"\${ol_cv_header_stdc+set}\" = set"; then
8451   echo $ac_n "(cached) $ac_c" 1>&6
8452 else
8453   cat > conftest.$ac_ext <<EOF
8454 #line 8455 "configure"
8455 #include "confdefs.h"
8456 #include <stdlib.h>
8457 #include <stdarg.h>
8458 #include <string.h>
8459 #include <float.h>
8460 EOF
8461 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8462 { (eval echo configure:8463: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8463 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8464 if test -z "$ac_err"; then
8465   rm -rf conftest*
8466   ol_cv_header_stdc=yes
8467 else
8468   echo "$ac_err" >&5
8469   echo "configure: failed program was:" >&5
8470   cat conftest.$ac_ext >&5
8471   rm -rf conftest*
8472   ol_cv_header_stdc=no
8473 fi
8474 rm -f conftest*
8475
8476 if test $ol_cv_header_stdc = yes; then
8477   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
8478 cat > conftest.$ac_ext <<EOF
8479 #line 8480 "configure"
8480 #include "confdefs.h"
8481 #include <string.h>
8482 EOF
8483 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8484   egrep "memchr" >/dev/null 2>&1; then
8485   :
8486 else
8487   rm -rf conftest*
8488   ol_cv_header_stdc=no
8489 fi
8490 rm -f conftest*
8491
8492 fi
8493
8494 if test $ol_cv_header_stdc = yes; then
8495   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
8496 cat > conftest.$ac_ext <<EOF
8497 #line 8498 "configure"
8498 #include "confdefs.h"
8499 #include <stdlib.h>
8500 EOF
8501 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8502   egrep "free" >/dev/null 2>&1; then
8503   :
8504 else
8505   rm -rf conftest*
8506   ol_cv_header_stdc=no
8507 fi
8508 rm -f conftest*
8509
8510 fi
8511
8512 if test $ol_cv_header_stdc = yes; then
8513   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
8514 if test "$cross_compiling" = yes; then
8515   :
8516 else
8517   cat > conftest.$ac_ext <<EOF
8518 #line 8519 "configure"
8519 #include "confdefs.h"
8520 #include <ctype.h>
8521 #ifndef HAVE_EBCDIC
8522 #       define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
8523 #       define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
8524 #else
8525 #       define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
8526                 || ('j' <= (c) && (c) <= 'r') \
8527                 || ('s' <= (c) && (c) <= 'z'))
8528 #       define TOUPPER(c)       (ISLOWER(c) ? ((c) | 0x40) : (c))
8529 #endif
8530 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
8531 int main () { int i; for (i = 0; i < 256; i++)
8532 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
8533 exit (0); }
8534
8535 EOF
8536 if { (eval echo configure:8537: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
8537 then
8538   :
8539 else
8540   echo "configure: failed program was:" >&5
8541   cat conftest.$ac_ext >&5
8542   rm -fr conftest*
8543   ol_cv_header_stdc=no
8544 fi
8545 rm -fr conftest*
8546 fi
8547
8548 fi
8549 fi
8550
8551 echo "$ac_t""$ol_cv_header_stdc" 1>&6
8552 if test $ol_cv_header_stdc = yes; then
8553   cat >> confdefs.h <<\EOF
8554 #define STDC_HEADERS 1
8555 EOF
8556
8557 fi
8558 ac_cv_header_stdc=disable
8559
8560
8561 if test $ol_cv_header_stdc != yes; then
8562         echo "configure: warning: could not locate Standard C compliant headers" 1>&2
8563 fi
8564
8565 ac_header_dirent=no
8566 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
8567 do
8568 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8569 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
8570 echo "configure:8571: checking for $ac_hdr that defines DIR" >&5
8571 if eval "test \"\${ac_cv_header_dirent_$ac_safe+set}\" = set"; then
8572   echo $ac_n "(cached) $ac_c" 1>&6
8573 else
8574   cat > conftest.$ac_ext <<EOF
8575 #line 8576 "configure"
8576 #include "confdefs.h"
8577 #include <sys/types.h>
8578 #include <$ac_hdr>
8579 int main() {
8580 DIR *dirp = 0;
8581 ; return 0; }
8582 EOF
8583 if { (eval echo configure:8584: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8584   rm -rf conftest*
8585   eval "ac_cv_header_dirent_$ac_safe=yes"
8586 else
8587   echo "configure: failed program was:" >&5
8588   cat conftest.$ac_ext >&5
8589   rm -rf conftest*
8590   eval "ac_cv_header_dirent_$ac_safe=no"
8591 fi
8592 rm -f conftest*
8593 fi
8594 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
8595   echo "$ac_t""yes" 1>&6
8596     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8597   cat >> confdefs.h <<EOF
8598 #define $ac_tr_hdr 1
8599 EOF
8600  ac_header_dirent=$ac_hdr; break
8601 else
8602   echo "$ac_t""no" 1>&6
8603 fi
8604 done
8605 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
8606 if test $ac_header_dirent = dirent.h; then
8607 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
8608 echo "configure:8609: checking for opendir in -ldir" >&5
8609 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-:%__p__%'`
8610 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8611   echo $ac_n "(cached) $ac_c" 1>&6
8612 else
8613   ac_save_LIBS="$LIBS"
8614 LIBS="-ldir  $LIBS"
8615 cat > conftest.$ac_ext <<EOF
8616 #line 8617 "configure"
8617 #include "confdefs.h"
8618 /* Override any gcc2 internal prototype to avoid an error.  */
8619 /* We use char because int might match the return type of a gcc2
8620     builtin and then its argument prototype would still apply.  */
8621 char opendir();
8622
8623 int main() {
8624 opendir()
8625 ; return 0; }
8626 EOF
8627 if { (eval echo configure:8628: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8628   rm -rf conftest*
8629   eval "ac_cv_lib_$ac_lib_var=yes"
8630 else
8631   echo "configure: failed program was:" >&5
8632   cat conftest.$ac_ext >&5
8633   rm -rf conftest*
8634   eval "ac_cv_lib_$ac_lib_var=no"
8635 fi
8636 rm -f conftest*
8637 LIBS="$ac_save_LIBS"
8638
8639 fi
8640 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8641   echo "$ac_t""yes" 1>&6
8642   LIBS="$LIBS -ldir"
8643 else
8644   echo "$ac_t""no" 1>&6
8645 fi
8646
8647 else
8648 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
8649 echo "configure:8650: checking for opendir in -lx" >&5
8650 ac_lib_var=`echo x'_'opendir | sed 'y%./+-:%__p__%'`
8651 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8652   echo $ac_n "(cached) $ac_c" 1>&6
8653 else
8654   ac_save_LIBS="$LIBS"
8655 LIBS="-lx  $LIBS"
8656 cat > conftest.$ac_ext <<EOF
8657 #line 8658 "configure"
8658 #include "confdefs.h"
8659 /* Override any gcc2 internal prototype to avoid an error.  */
8660 /* We use char because int might match the return type of a gcc2
8661     builtin and then its argument prototype would still apply.  */
8662 char opendir();
8663
8664 int main() {
8665 opendir()
8666 ; return 0; }
8667 EOF
8668 if { (eval echo configure:8669: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8669   rm -rf conftest*
8670   eval "ac_cv_lib_$ac_lib_var=yes"
8671 else
8672   echo "configure: failed program was:" >&5
8673   cat conftest.$ac_ext >&5
8674   rm -rf conftest*
8675   eval "ac_cv_lib_$ac_lib_var=no"
8676 fi
8677 rm -f conftest*
8678 LIBS="$ac_save_LIBS"
8679
8680 fi
8681 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8682   echo "$ac_t""yes" 1>&6
8683   LIBS="$LIBS -lx"
8684 else
8685   echo "$ac_t""no" 1>&6
8686 fi
8687
8688 fi
8689
8690 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
8691 echo "configure:8692: checking for sys/wait.h that is POSIX.1 compatible" >&5
8692 if eval "test \"\${ac_cv_header_sys_wait_h+set}\" = set"; then
8693   echo $ac_n "(cached) $ac_c" 1>&6
8694 else
8695   cat > conftest.$ac_ext <<EOF
8696 #line 8697 "configure"
8697 #include "confdefs.h"
8698 #include <sys/types.h>
8699 #include <sys/wait.h>
8700 #ifndef WEXITSTATUS
8701 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
8702 #endif
8703 #ifndef WIFEXITED
8704 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
8705 #endif
8706 int main() {
8707 int s;
8708 wait (&s);
8709 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
8710 ; return 0; }
8711 EOF
8712 if { (eval echo configure:8713: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8713   rm -rf conftest*
8714   ac_cv_header_sys_wait_h=yes
8715 else
8716   echo "configure: failed program was:" >&5
8717   cat conftest.$ac_ext >&5
8718   rm -rf conftest*
8719   ac_cv_header_sys_wait_h=no
8720 fi
8721 rm -f conftest*
8722 fi
8723
8724 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
8725 if test $ac_cv_header_sys_wait_h = yes; then
8726   cat >> confdefs.h <<\EOF
8727 #define HAVE_SYS_WAIT_H 1
8728 EOF
8729
8730 fi
8731
8732 echo $ac_n "checking POSIX termios""... $ac_c" 1>&6
8733 echo "configure:8734: checking POSIX termios" >&5
8734 if eval "test \"\${am_cv_sys_posix_termios+set}\" = set"; then
8735   echo $ac_n "(cached) $ac_c" 1>&6
8736 else
8737   cat > conftest.$ac_ext <<EOF
8738 #line 8739 "configure"
8739 #include "confdefs.h"
8740 #include <sys/types.h>
8741 #include <unistd.h>
8742 #include <termios.h>
8743 int main() {
8744 /* SunOS 4.0.3 has termios.h but not the library calls.  */
8745    tcgetattr(0, 0);
8746 ; return 0; }
8747 EOF
8748 if { (eval echo configure:8749: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8749   rm -rf conftest*
8750   am_cv_sys_posix_termios=yes
8751 else
8752   echo "configure: failed program was:" >&5
8753   cat conftest.$ac_ext >&5
8754   rm -rf conftest*
8755   am_cv_sys_posix_termios=no
8756 fi
8757 rm -f conftest*
8758 fi
8759
8760 echo "$ac_t""$am_cv_sys_posix_termios" 1>&6
8761
8762
8763  echo $ac_n "checking whether use of TIOCGWINSZ requires sys/ioctl.h""... $ac_c" 1>&6
8764 echo "configure:8765: checking whether use of TIOCGWINSZ requires sys/ioctl.h" >&5
8765 if eval "test \"\${am_cv_sys_tiocgwinsz_needs_sys_ioctl_h+set}\" = set"; then
8766   echo $ac_n "(cached) $ac_c" 1>&6
8767 else
8768   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=no
8769
8770   gwinsz_in_termios_h=no
8771   if test $am_cv_sys_posix_termios = yes; then
8772     cat > conftest.$ac_ext <<EOF
8773 #line 8774 "configure"
8774 #include "confdefs.h"
8775 #include <sys/types.h>
8776 #     include <termios.h>
8777 #     ifdef TIOCGWINSZ
8778         yes
8779 #     endif
8780     
8781 EOF
8782 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8783   egrep "yes" >/dev/null 2>&1; then
8784   rm -rf conftest*
8785   gwinsz_in_termios_h=yes
8786 fi
8787 rm -f conftest*
8788
8789   fi
8790
8791   if test $gwinsz_in_termios_h = no; then
8792     cat > conftest.$ac_ext <<EOF
8793 #line 8794 "configure"
8794 #include "confdefs.h"
8795 #include <sys/types.h>
8796 #     include <sys/ioctl.h>
8797 #     ifdef TIOCGWINSZ
8798         yes
8799 #     endif
8800     
8801 EOF
8802 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8803   egrep "yes" >/dev/null 2>&1; then
8804   rm -rf conftest*
8805   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=yes
8806 fi
8807 rm -f conftest*
8808
8809   fi
8810   
8811 fi
8812
8813 echo "$ac_t""$am_cv_sys_tiocgwinsz_needs_sys_ioctl_h" 1>&6
8814   if test $am_cv_sys_tiocgwinsz_needs_sys_ioctl_h = yes; then
8815     cat >> confdefs.h <<\EOF
8816 #define GWINSZ_IN_SYS_IOCTL 1
8817 EOF
8818
8819   fi
8820
8821 if test $am_cv_sys_posix_termios = yes ; then
8822         cat >> confdefs.h <<\EOF
8823 #define HAVE_POSIX_TERMIOS 1
8824 EOF
8825
8826 fi
8827
8828 for ac_hdr in \
8829         arpa/inet.h             \
8830         arpa/nameser.h  \
8831         assert.h                \
8832         bits/types.h    \
8833         conio.h                 \
8834         crypt.h                 \
8835         direct.h                \
8836         errno.h                 \
8837         fcntl.h                 \
8838         filio.h                 \
8839         getopt.h                \
8840         grp.h                   \
8841         io.h                    \
8842         libutil.h               \
8843         limits.h                \
8844         locale.h                \
8845         netinet/tcp.h   \
8846         malloc.h                \
8847         memory.h                \
8848         psap.h                  \
8849         pwd.h                   \
8850         process.h               \
8851         resolv.h                \
8852         sgtty.h                 \
8853         shadow.h                \
8854         stddef.h                \
8855         string.h                \
8856         strings.h               \
8857         sysexits.h              \
8858         sys/file.h              \
8859         sys/filio.h             \
8860         sys/errno.h             \
8861         sys/ioctl.h             \
8862         sys/param.h             \
8863         sys/resource.h  \
8864         sys/select.h    \
8865         sys/socket.h    \
8866         sys/stat.h              \
8867         sys/syslog.h    \
8868         sys/time.h              \
8869         sys/types.h             \
8870         sys/ucred.h             \
8871         sys/uio.h               \
8872         syslog.h                \
8873         termios.h               \
8874         unistd.h                \
8875         winsock.h               \
8876         winsock2.h              \
8877
8878 do
8879 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8880 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8881 echo "configure:8882: checking for $ac_hdr" >&5
8882 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
8883   echo $ac_n "(cached) $ac_c" 1>&6
8884 else
8885   cat > conftest.$ac_ext <<EOF
8886 #line 8887 "configure"
8887 #include "confdefs.h"
8888 #include <$ac_hdr>
8889 EOF
8890 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8891 { (eval echo configure:8892: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8892 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8893 if test -z "$ac_err"; then
8894   rm -rf conftest*
8895   eval "ac_cv_header_$ac_safe=yes"
8896 else
8897   echo "$ac_err" >&5
8898   echo "configure: failed program was:" >&5
8899   cat conftest.$ac_ext >&5
8900   rm -rf conftest*
8901   eval "ac_cv_header_$ac_safe=no"
8902 fi
8903 rm -f conftest*
8904 fi
8905 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8906   echo "$ac_t""yes" 1>&6
8907     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8908   cat >> confdefs.h <<EOF
8909 #define $ac_tr_hdr 1
8910 EOF
8911  
8912 else
8913   echo "$ac_t""no" 1>&6
8914 fi
8915 done
8916
8917
8918
8919 for ac_func in sigaction sigset 
8920 do
8921 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8922 echo "configure:8923: checking for $ac_func" >&5
8923 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
8924   echo $ac_n "(cached) $ac_c" 1>&6
8925 else
8926   cat > conftest.$ac_ext <<EOF
8927 #line 8928 "configure"
8928 #include "confdefs.h"
8929 /* System header to define __stub macros and hopefully few prototypes,
8930     which can conflict with char $ac_func(); below.  */
8931 #include <assert.h>
8932 /* Override any gcc2 internal prototype to avoid an error.  */
8933 /* We use char because int might match the return type of a gcc2
8934     builtin and then its argument prototype would still apply.  */
8935 char $ac_func();
8936 char (*f)();
8937
8938 int main() {
8939
8940 /* The GNU C library defines this for functions which it implements
8941     to always fail with ENOSYS.  Some functions are actually named
8942     something starting with __ and the normal name is an alias.  */
8943 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8944 choke me
8945 #else
8946 f = $ac_func;
8947 #endif
8948
8949 ; return 0; }
8950 EOF
8951 if { (eval echo configure:8952: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8952   rm -rf conftest*
8953   eval "ac_cv_func_$ac_func=yes"
8954 else
8955   echo "configure: failed program was:" >&5
8956   cat conftest.$ac_ext >&5
8957   rm -rf conftest*
8958   eval "ac_cv_func_$ac_func=no"
8959 fi
8960 rm -f conftest*
8961 fi
8962
8963 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8964   echo "$ac_t""yes" 1>&6
8965     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8966   cat >> confdefs.h <<EOF
8967 #define $ac_tr_func 1
8968 EOF
8969  
8970 else
8971   echo "$ac_t""no" 1>&6
8972 fi
8973 done
8974
8975
8976 if test $ac_cv_func_sigaction = no && test $ac_cv_func_sigaction = no ; then
8977         echo $ac_n "checking for sigset in -lV3""... $ac_c" 1>&6
8978 echo "configure:8979: checking for sigset in -lV3" >&5
8979 ac_lib_var=`echo V3'_'sigset | sed 'y%./+-:%__p__%'`
8980 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8981   echo $ac_n "(cached) $ac_c" 1>&6
8982 else
8983   ac_save_LIBS="$LIBS"
8984 LIBS="-lV3  $LIBS"
8985 cat > conftest.$ac_ext <<EOF
8986 #line 8987 "configure"
8987 #include "confdefs.h"
8988 /* Override any gcc2 internal prototype to avoid an error.  */
8989 /* We use char because int might match the return type of a gcc2
8990     builtin and then its argument prototype would still apply.  */
8991 char sigset();
8992
8993 int main() {
8994 sigset()
8995 ; return 0; }
8996 EOF
8997 if { (eval echo configure:8998: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8998   rm -rf conftest*
8999   eval "ac_cv_lib_$ac_lib_var=yes"
9000 else
9001   echo "configure: failed program was:" >&5
9002   cat conftest.$ac_ext >&5
9003   rm -rf conftest*
9004   eval "ac_cv_lib_$ac_lib_var=no"
9005 fi
9006 rm -f conftest*
9007 LIBS="$ac_save_LIBS"
9008
9009 fi
9010 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9011   echo "$ac_t""yes" 1>&6
9012     ac_tr_lib=HAVE_LIB`echo V3 | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9013     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9014   cat >> confdefs.h <<EOF
9015 #define $ac_tr_lib 1
9016 EOF
9017
9018   LIBS="-lV3 $LIBS"
9019
9020 else
9021   echo "$ac_t""no" 1>&6
9022 fi
9023
9024 fi
9025
9026 if test "$ac_cv_cygwin" != yes && test "$ac_cv_header_winsock_h" = yes; then
9027 echo $ac_n "checking for winsock""... $ac_c" 1>&6
9028 echo "configure:9029: checking for winsock" >&5
9029 if eval "test \"\${ol_cv_winsock+set}\" = set"; then
9030   echo $ac_n "(cached) $ac_c" 1>&6
9031 else
9032   save_LIBS="$LIBS"
9033 for curlib in ws2_32 wsock32; do
9034         LIBS="$LIBS -l$curlib"
9035         cat > conftest.$ac_ext <<EOF
9036 #line 9037 "configure"
9037 #include "confdefs.h"
9038 #include <winsock.h>
9039                         
9040 int main() {
9041
9042                         socket(0,0,0);
9043                         select(0,NULL,NULL,NULL,NULL);
9044                         closesocket(0);
9045                         gethostname(NULL,0);
9046                         
9047 ; return 0; }
9048 EOF
9049 if { (eval echo configure:9050: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9050   rm -rf conftest*
9051   ol_cv_winsock=yes
9052 else
9053   echo "configure: failed program was:" >&5
9054   cat conftest.$ac_ext >&5
9055   rm -rf conftest*
9056   ol_cv_winsock=no
9057 fi
9058 rm -f conftest*
9059
9060         if test $ol_cv_winsock = yes; then
9061                 cat >> confdefs.h <<\EOF
9062 #define HAVE_WINSOCK 1
9063 EOF
9064
9065                 ac_cv_func_socket=yes
9066                 ac_cv_func_select=yes
9067                 ac_cv_func_closesocket=yes
9068                 ac_cv_func_gethostname=yes
9069                 if test $curlib = ws2_32; then
9070                         ol_cv_winsock=winsock2
9071                         cat >> confdefs.h <<\EOF
9072 #define HAVE_WINSOCK2 1
9073 EOF
9074
9075                 fi
9076                 break
9077         fi
9078         LIBS="$save_LIBS"
9079 done
9080 fi
9081
9082 echo "$ac_t""$ol_cv_winsock" 1>&6
9083 fi
9084
9085
9086 echo $ac_n "checking for socket""... $ac_c" 1>&6
9087 echo "configure:9088: checking for socket" >&5
9088 if eval "test \"\${ac_cv_func_socket+set}\" = set"; then
9089   echo $ac_n "(cached) $ac_c" 1>&6
9090 else
9091   cat > conftest.$ac_ext <<EOF
9092 #line 9093 "configure"
9093 #include "confdefs.h"
9094 /* System header to define __stub macros and hopefully few prototypes,
9095     which can conflict with char socket(); below.  */
9096 #include <assert.h>
9097 /* Override any gcc2 internal prototype to avoid an error.  */
9098 /* We use char because int might match the return type of a gcc2
9099     builtin and then its argument prototype would still apply.  */
9100 char socket();
9101 char (*f)();
9102
9103 int main() {
9104
9105 /* The GNU C library defines this for functions which it implements
9106     to always fail with ENOSYS.  Some functions are actually named
9107     something starting with __ and the normal name is an alias.  */
9108 #if defined (__stub_socket) || defined (__stub___socket)
9109 choke me
9110 #else
9111 f = socket;
9112 #endif
9113
9114 ; return 0; }
9115 EOF
9116 if { (eval echo configure:9117: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9117   rm -rf conftest*
9118   eval "ac_cv_func_socket=yes"
9119 else
9120   echo "configure: failed program was:" >&5
9121   cat conftest.$ac_ext >&5
9122   rm -rf conftest*
9123   eval "ac_cv_func_socket=no"
9124 fi
9125 rm -f conftest*
9126 fi
9127
9128 if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
9129   echo "$ac_t""yes" 1>&6
9130   :
9131 else
9132   echo "$ac_t""no" 1>&6
9133         
9134         echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6
9135 echo "configure:9136: checking for main in -lsocket" >&5
9136 ac_lib_var=`echo socket'_'main | sed 'y%./+-:%__p__%'`
9137 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9138   echo $ac_n "(cached) $ac_c" 1>&6
9139 else
9140   ac_save_LIBS="$LIBS"
9141 LIBS="-lsocket  $LIBS"
9142 cat > conftest.$ac_ext <<EOF
9143 #line 9144 "configure"
9144 #include "confdefs.h"
9145
9146 int main() {
9147 main()
9148 ; return 0; }
9149 EOF
9150 if { (eval echo configure:9151: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9151   rm -rf conftest*
9152   eval "ac_cv_lib_$ac_lib_var=yes"
9153 else
9154   echo "configure: failed program was:" >&5
9155   cat conftest.$ac_ext >&5
9156   rm -rf conftest*
9157   eval "ac_cv_lib_$ac_lib_var=no"
9158 fi
9159 rm -f conftest*
9160 LIBS="$ac_save_LIBS"
9161
9162 fi
9163 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9164   echo "$ac_t""yes" 1>&6
9165     ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9166     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9167   cat >> confdefs.h <<EOF
9168 #define $ac_tr_lib 1
9169 EOF
9170
9171   LIBS="-lsocket $LIBS"
9172
9173 else
9174   echo "$ac_t""no" 1>&6
9175 fi
9176
9177         echo $ac_n "checking for main in -lnet""... $ac_c" 1>&6
9178 echo "configure:9179: checking for main in -lnet" >&5
9179 ac_lib_var=`echo net'_'main | sed 'y%./+-:%__p__%'`
9180 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9181   echo $ac_n "(cached) $ac_c" 1>&6
9182 else
9183   ac_save_LIBS="$LIBS"
9184 LIBS="-lnet  $LIBS"
9185 cat > conftest.$ac_ext <<EOF
9186 #line 9187 "configure"
9187 #include "confdefs.h"
9188
9189 int main() {
9190 main()
9191 ; return 0; }
9192 EOF
9193 if { (eval echo configure:9194: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9194   rm -rf conftest*
9195   eval "ac_cv_lib_$ac_lib_var=yes"
9196 else
9197   echo "configure: failed program was:" >&5
9198   cat conftest.$ac_ext >&5
9199   rm -rf conftest*
9200   eval "ac_cv_lib_$ac_lib_var=no"
9201 fi
9202 rm -f conftest*
9203 LIBS="$ac_save_LIBS"
9204
9205 fi
9206 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9207   echo "$ac_t""yes" 1>&6
9208     ac_tr_lib=HAVE_LIB`echo net | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9209     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9210   cat >> confdefs.h <<EOF
9211 #define $ac_tr_lib 1
9212 EOF
9213
9214   LIBS="-lnet $LIBS"
9215
9216 else
9217   echo "$ac_t""no" 1>&6
9218 fi
9219
9220         echo $ac_n "checking for main in -lnsl_s""... $ac_c" 1>&6
9221 echo "configure:9222: checking for main in -lnsl_s" >&5
9222 ac_lib_var=`echo nsl_s'_'main | sed 'y%./+-:%__p__%'`
9223 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9224   echo $ac_n "(cached) $ac_c" 1>&6
9225 else
9226   ac_save_LIBS="$LIBS"
9227 LIBS="-lnsl_s  $LIBS"
9228 cat > conftest.$ac_ext <<EOF
9229 #line 9230 "configure"
9230 #include "confdefs.h"
9231
9232 int main() {
9233 main()
9234 ; return 0; }
9235 EOF
9236 if { (eval echo configure:9237: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9237   rm -rf conftest*
9238   eval "ac_cv_lib_$ac_lib_var=yes"
9239 else
9240   echo "configure: failed program was:" >&5
9241   cat conftest.$ac_ext >&5
9242   rm -rf conftest*
9243   eval "ac_cv_lib_$ac_lib_var=no"
9244 fi
9245 rm -f conftest*
9246 LIBS="$ac_save_LIBS"
9247
9248 fi
9249 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9250   echo "$ac_t""yes" 1>&6
9251     ac_tr_lib=HAVE_LIB`echo nsl_s | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9252     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9253   cat >> confdefs.h <<EOF
9254 #define $ac_tr_lib 1
9255 EOF
9256
9257   LIBS="-lnsl_s $LIBS"
9258
9259 else
9260   echo "$ac_t""no" 1>&6
9261 fi
9262
9263         echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
9264 echo "configure:9265: checking for main in -lnsl" >&5
9265 ac_lib_var=`echo nsl'_'main | sed 'y%./+-:%__p__%'`
9266 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9267   echo $ac_n "(cached) $ac_c" 1>&6
9268 else
9269   ac_save_LIBS="$LIBS"
9270 LIBS="-lnsl  $LIBS"
9271 cat > conftest.$ac_ext <<EOF
9272 #line 9273 "configure"
9273 #include "confdefs.h"
9274
9275 int main() {
9276 main()
9277 ; return 0; }
9278 EOF
9279 if { (eval echo configure:9280: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9280   rm -rf conftest*
9281   eval "ac_cv_lib_$ac_lib_var=yes"
9282 else
9283   echo "configure: failed program was:" >&5
9284   cat conftest.$ac_ext >&5
9285   rm -rf conftest*
9286   eval "ac_cv_lib_$ac_lib_var=no"
9287 fi
9288 rm -f conftest*
9289 LIBS="$ac_save_LIBS"
9290
9291 fi
9292 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9293   echo "$ac_t""yes" 1>&6
9294     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9295     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9296   cat >> confdefs.h <<EOF
9297 #define $ac_tr_lib 1
9298 EOF
9299
9300   LIBS="-lnsl $LIBS"
9301
9302 else
9303   echo "$ac_t""no" 1>&6
9304 fi
9305
9306         echo $ac_n "checking for socket in -linet""... $ac_c" 1>&6
9307 echo "configure:9308: checking for socket in -linet" >&5
9308 ac_lib_var=`echo inet'_'socket | sed 'y%./+-:%__p__%'`
9309 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9310   echo $ac_n "(cached) $ac_c" 1>&6
9311 else
9312   ac_save_LIBS="$LIBS"
9313 LIBS="-linet  $LIBS"
9314 cat > conftest.$ac_ext <<EOF
9315 #line 9316 "configure"
9316 #include "confdefs.h"
9317 /* Override any gcc2 internal prototype to avoid an error.  */
9318 /* We use char because int might match the return type of a gcc2
9319     builtin and then its argument prototype would still apply.  */
9320 char socket();
9321
9322 int main() {
9323 socket()
9324 ; return 0; }
9325 EOF
9326 if { (eval echo configure:9327: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9327   rm -rf conftest*
9328   eval "ac_cv_lib_$ac_lib_var=yes"
9329 else
9330   echo "configure: failed program was:" >&5
9331   cat conftest.$ac_ext >&5
9332   rm -rf conftest*
9333   eval "ac_cv_lib_$ac_lib_var=no"
9334 fi
9335 rm -f conftest*
9336 LIBS="$ac_save_LIBS"
9337
9338 fi
9339 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9340   echo "$ac_t""yes" 1>&6
9341     ac_tr_lib=HAVE_LIB`echo inet | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9342     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9343   cat >> confdefs.h <<EOF
9344 #define $ac_tr_lib 1
9345 EOF
9346
9347   LIBS="-linet $LIBS"
9348
9349 else
9350   echo "$ac_t""no" 1>&6
9351 fi
9352
9353         echo $ac_n "checking for main in -lgen""... $ac_c" 1>&6
9354 echo "configure:9355: checking for main in -lgen" >&5
9355 ac_lib_var=`echo gen'_'main | sed 'y%./+-:%__p__%'`
9356 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9357   echo $ac_n "(cached) $ac_c" 1>&6
9358 else
9359   ac_save_LIBS="$LIBS"
9360 LIBS="-lgen  $LIBS"
9361 cat > conftest.$ac_ext <<EOF
9362 #line 9363 "configure"
9363 #include "confdefs.h"
9364
9365 int main() {
9366 main()
9367 ; return 0; }
9368 EOF
9369 if { (eval echo configure:9370: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9370   rm -rf conftest*
9371   eval "ac_cv_lib_$ac_lib_var=yes"
9372 else
9373   echo "configure: failed program was:" >&5
9374   cat conftest.$ac_ext >&5
9375   rm -rf conftest*
9376   eval "ac_cv_lib_$ac_lib_var=no"
9377 fi
9378 rm -f conftest*
9379 LIBS="$ac_save_LIBS"
9380
9381 fi
9382 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9383   echo "$ac_t""yes" 1>&6
9384     ac_tr_lib=HAVE_LIB`echo gen | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9385     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9386   cat >> confdefs.h <<EOF
9387 #define $ac_tr_lib 1
9388 EOF
9389
9390   LIBS="-lgen $LIBS"
9391
9392 else
9393   echo "$ac_t""no" 1>&6
9394 fi
9395
9396
9397 fi
9398
9399
9400 echo $ac_n "checking for select""... $ac_c" 1>&6
9401 echo "configure:9402: checking for select" >&5
9402 if eval "test \"\${ac_cv_func_select+set}\" = set"; then
9403   echo $ac_n "(cached) $ac_c" 1>&6
9404 else
9405   cat > conftest.$ac_ext <<EOF
9406 #line 9407 "configure"
9407 #include "confdefs.h"
9408 /* System header to define __stub macros and hopefully few prototypes,
9409     which can conflict with char select(); below.  */
9410 #include <assert.h>
9411 /* Override any gcc2 internal prototype to avoid an error.  */
9412 /* We use char because int might match the return type of a gcc2
9413     builtin and then its argument prototype would still apply.  */
9414 char select();
9415 char (*f)();
9416
9417 int main() {
9418
9419 /* The GNU C library defines this for functions which it implements
9420     to always fail with ENOSYS.  Some functions are actually named
9421     something starting with __ and the normal name is an alias.  */
9422 #if defined (__stub_select) || defined (__stub___select)
9423 choke me
9424 #else
9425 f = select;
9426 #endif
9427
9428 ; return 0; }
9429 EOF
9430 if { (eval echo configure:9431: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9431   rm -rf conftest*
9432   eval "ac_cv_func_select=yes"
9433 else
9434   echo "configure: failed program was:" >&5
9435   cat conftest.$ac_ext >&5
9436   rm -rf conftest*
9437   eval "ac_cv_func_select=no"
9438 fi
9439 rm -f conftest*
9440 fi
9441
9442 if eval "test \"`echo '$ac_cv_func_'select`\" = yes"; then
9443   echo "$ac_t""yes" 1>&6
9444   :
9445 else
9446   echo "$ac_t""no" 1>&6
9447 { echo "configure: error: select() required." 1>&2; exit 1; }
9448 fi
9449
9450
9451 if test "${ac_cv_header_winsock_h}" != yes; then
9452                                 echo $ac_n "checking types of arguments for select()""... $ac_c" 1>&6
9453 echo "configure:9454: checking types of arguments for select()" >&5
9454  if eval "test \"\${ac_cv_func_select_arg234+set}\" = set"; then
9455   echo $ac_n "(cached) $ac_c" 1>&6
9456 else
9457    if eval "test \"\${ac_cv_func_select_arg1+set}\" = set"; then
9458   echo $ac_n "(cached) $ac_c" 1>&6
9459 else
9460     if eval "test \"\${ac_cv_func_select_arg5+set}\" = set"; then
9461   echo $ac_n "(cached) $ac_c" 1>&6
9462 else
9463      for ac_cv_func_select_arg234 in 'fd_set *' 'int *' 'void *'; do
9464      for ac_cv_func_select_arg1 in 'int' 'size_t' 'unsigned long' 'unsigned'; do
9465       for ac_cv_func_select_arg5 in 'struct timeval *' 'const struct timeval *'; do
9466        cat > conftest.$ac_ext <<EOF
9467 #line 9468 "configure"
9468 #include "confdefs.h"
9469 #ifdef HAVE_SYS_TYPES_H
9470 #include <sys/types.h>
9471 #endif
9472 #ifdef HAVE_SYS_TIME_H
9473 #include <sys/time.h>
9474 #endif
9475 #ifdef HAVE_SYS_SELECT_H
9476 #include <sys/select.h>
9477 #endif
9478 #ifdef HAVE_SYS_SOCKET_H
9479 #include <sys/socket.h>
9480 #endif
9481 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);
9482 int main() {
9483
9484 ; return 0; }
9485 EOF
9486 if { (eval echo configure:9487: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9487   rm -rf conftest*
9488           ac_not_found=no ; break 3
9489 else
9490   echo "configure: failed program was:" >&5
9491   cat conftest.$ac_ext >&5
9492   rm -rf conftest*
9493   ac_not_found=yes
9494 fi
9495 rm -f conftest*
9496       done
9497      done
9498     done
9499    
9500 fi
9501   
9502 fi
9503  
9504 fi
9505  if test "$ac_not_found" = yes; then
9506   ac_cv_func_select_arg1=int 
9507   ac_cv_func_select_arg234='int *' 
9508   ac_cv_func_select_arg5='struct timeval *'
9509  fi
9510  echo "$ac_t""$ac_cv_func_select_arg1,$ac_cv_func_select_arg234,$ac_cv_func_select_arg5" 1>&6
9511  cat >> confdefs.h <<EOF
9512 #define SELECT_TYPE_ARG1 $ac_cv_func_select_arg1
9513 EOF
9514
9515  cat >> confdefs.h <<EOF
9516 #define SELECT_TYPE_ARG234 ($ac_cv_func_select_arg234)
9517 EOF
9518
9519  cat >> confdefs.h <<EOF
9520 #define SELECT_TYPE_ARG5 ($ac_cv_func_select_arg5)
9521 EOF
9522
9523
9524 fi
9525
9526
9527 for ac_func in poll 
9528 do
9529 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9530 echo "configure:9531: checking for $ac_func" >&5
9531 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
9532   echo $ac_n "(cached) $ac_c" 1>&6
9533 else
9534   cat > conftest.$ac_ext <<EOF
9535 #line 9536 "configure"
9536 #include "confdefs.h"
9537 /* System header to define __stub macros and hopefully few prototypes,
9538     which can conflict with char $ac_func(); below.  */
9539 #include <assert.h>
9540 /* Override any gcc2 internal prototype to avoid an error.  */
9541 /* We use char because int might match the return type of a gcc2
9542     builtin and then its argument prototype would still apply.  */
9543 char $ac_func();
9544 char (*f)();
9545
9546 int main() {
9547
9548 /* The GNU C library defines this for functions which it implements
9549     to always fail with ENOSYS.  Some functions are actually named
9550     something starting with __ and the normal name is an alias.  */
9551 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9552 choke me
9553 #else
9554 f = $ac_func;
9555 #endif
9556
9557 ; return 0; }
9558 EOF
9559 if { (eval echo configure:9560: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9560   rm -rf conftest*
9561   eval "ac_cv_func_$ac_func=yes"
9562 else
9563   echo "configure: failed program was:" >&5
9564   cat conftest.$ac_ext >&5
9565   rm -rf conftest*
9566   eval "ac_cv_func_$ac_func=no"
9567 fi
9568 rm -f conftest*
9569 fi
9570
9571 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9572   echo "$ac_t""yes" 1>&6
9573     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9574   cat >> confdefs.h <<EOF
9575 #define $ac_tr_func 1
9576 EOF
9577  
9578 else
9579   echo "$ac_t""no" 1>&6
9580 fi
9581 done
9582
9583 for ac_hdr in poll.h 
9584 do
9585 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9586 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9587 echo "configure:9588: checking for $ac_hdr" >&5
9588 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9589   echo $ac_n "(cached) $ac_c" 1>&6
9590 else
9591   cat > conftest.$ac_ext <<EOF
9592 #line 9593 "configure"
9593 #include "confdefs.h"
9594 #include <$ac_hdr>
9595 EOF
9596 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9597 { (eval echo configure:9598: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9598 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9599 if test -z "$ac_err"; then
9600   rm -rf conftest*
9601   eval "ac_cv_header_$ac_safe=yes"
9602 else
9603   echo "$ac_err" >&5
9604   echo "configure: failed program was:" >&5
9605   cat conftest.$ac_ext >&5
9606   rm -rf conftest*
9607   eval "ac_cv_header_$ac_safe=no"
9608 fi
9609 rm -f conftest*
9610 fi
9611 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9612   echo "$ac_t""yes" 1>&6
9613     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9614   cat >> confdefs.h <<EOF
9615 #define $ac_tr_hdr 1
9616 EOF
9617  
9618 else
9619   echo "$ac_t""no" 1>&6
9620 fi
9621 done
9622
9623
9624 for ac_hdr in sys/epoll.h 
9625 do
9626 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9627 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9628 echo "configure:9629: checking for $ac_hdr" >&5
9629 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9630   echo $ac_n "(cached) $ac_c" 1>&6
9631 else
9632   cat > conftest.$ac_ext <<EOF
9633 #line 9634 "configure"
9634 #include "confdefs.h"
9635 #include <$ac_hdr>
9636 EOF
9637 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9638 { (eval echo configure:9639: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9639 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9640 if test -z "$ac_err"; then
9641   rm -rf conftest*
9642   eval "ac_cv_header_$ac_safe=yes"
9643 else
9644   echo "$ac_err" >&5
9645   echo "configure: failed program was:" >&5
9646   cat conftest.$ac_ext >&5
9647   rm -rf conftest*
9648   eval "ac_cv_header_$ac_safe=no"
9649 fi
9650 rm -f conftest*
9651 fi
9652 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9653   echo "$ac_t""yes" 1>&6
9654     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9655   cat >> confdefs.h <<EOF
9656 #define $ac_tr_hdr 1
9657 EOF
9658  
9659 else
9660   echo "$ac_t""no" 1>&6
9661 fi
9662 done
9663
9664 if test "${ac_cv_header_sys_epoll_h}" = yes; then
9665 echo $ac_n "checking for epoll system call""... $ac_c" 1>&6
9666 echo "configure:9667: checking for epoll system call" >&5
9667 if test "$cross_compiling" = yes; then
9668   echo "$ac_t""no" 1>&6
9669 else
9670   cat > conftest.$ac_ext <<EOF
9671 #line 9672 "configure"
9672 #include "confdefs.h"
9673 int main(int argc, char *argv)
9674 {
9675         int epfd = epoll_create(256);
9676         exit (epfd == -1 ? 1 : 0);
9677 }
9678 EOF
9679 if { (eval echo configure:9680: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
9680 then
9681   echo "$ac_t""yes" 1>&6
9682 cat >> confdefs.h <<\EOF
9683 #define HAVE_EPOLL 1
9684 EOF
9685
9686 else
9687   echo "configure: failed program was:" >&5
9688   cat conftest.$ac_ext >&5
9689   rm -fr conftest*
9690   echo "$ac_t""no" 1>&6
9691 fi
9692 rm -fr conftest*
9693 fi
9694
9695 fi
9696
9697 # strerror checks
9698 echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6
9699 echo "configure:9700: checking declaration of sys_errlist" >&5
9700 if eval "test \"\${ol_cv_dcl_sys_errlist+set}\" = set"; then
9701   echo $ac_n "(cached) $ac_c" 1>&6
9702 else
9703   
9704         cat > conftest.$ac_ext <<EOF
9705 #line 9706 "configure"
9706 #include "confdefs.h"
9707
9708 #include <stdio.h>
9709 #include <sys/types.h>
9710 #include <errno.h>
9711 #ifdef WINNT
9712 #include <stdlib.h>
9713 #endif 
9714 int main() {
9715 char *c = (char *) *sys_errlist
9716 ; return 0; }
9717 EOF
9718 if { (eval echo configure:9719: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9719   rm -rf conftest*
9720   ol_cv_dcl_sys_errlist=yes
9721         ol_cv_have_sys_errlist=yes
9722 else
9723   echo "configure: failed program was:" >&5
9724   cat conftest.$ac_ext >&5
9725   rm -rf conftest*
9726   ol_cv_dcl_sys_errlist=no
9727 fi
9728 rm -f conftest*
9729 fi
9730
9731 echo "$ac_t""$ol_cv_dcl_sys_errlist" 1>&6
9732 #
9733 # It's possible (for near-UNIX clones) that sys_errlist doesn't exist
9734 if test $ol_cv_dcl_sys_errlist = no ; then
9735         cat >> confdefs.h <<\EOF
9736 #define DECL_SYS_ERRLIST 1
9737 EOF
9738
9739
9740         echo $ac_n "checking existence of sys_errlist""... $ac_c" 1>&6
9741 echo "configure:9742: checking existence of sys_errlist" >&5
9742 if eval "test \"\${ol_cv_have_sys_errlist+set}\" = set"; then
9743   echo $ac_n "(cached) $ac_c" 1>&6
9744 else
9745   
9746                 cat > conftest.$ac_ext <<EOF
9747 #line 9748 "configure"
9748 #include "confdefs.h"
9749 #include <errno.h>
9750 int main() {
9751 char *c = (char *) *sys_errlist
9752 ; return 0; }
9753 EOF
9754 if { (eval echo configure:9755: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9755   rm -rf conftest*
9756   ol_cv_have_sys_errlist=yes
9757 else
9758   echo "configure: failed program was:" >&5
9759   cat conftest.$ac_ext >&5
9760   rm -rf conftest*
9761   ol_cv_have_sys_errlist=no
9762 fi
9763 rm -f conftest*
9764 fi
9765
9766 echo "$ac_t""$ol_cv_have_sys_errlist" 1>&6
9767 fi
9768 if test $ol_cv_have_sys_errlist = yes ; then
9769         cat >> confdefs.h <<\EOF
9770 #define HAVE_SYS_ERRLIST 1
9771 EOF
9772
9773 fi
9774  for ac_func in strerror strerror_r
9775 do
9776 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9777 echo "configure:9778: checking for $ac_func" >&5
9778 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
9779   echo $ac_n "(cached) $ac_c" 1>&6
9780 else
9781   cat > conftest.$ac_ext <<EOF
9782 #line 9783 "configure"
9783 #include "confdefs.h"
9784 /* System header to define __stub macros and hopefully few prototypes,
9785     which can conflict with char $ac_func(); below.  */
9786 #include <assert.h>
9787 /* Override any gcc2 internal prototype to avoid an error.  */
9788 /* We use char because int might match the return type of a gcc2
9789     builtin and then its argument prototype would still apply.  */
9790 char $ac_func();
9791 char (*f)();
9792
9793 int main() {
9794
9795 /* The GNU C library defines this for functions which it implements
9796     to always fail with ENOSYS.  Some functions are actually named
9797     something starting with __ and the normal name is an alias.  */
9798 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9799 choke me
9800 #else
9801 f = $ac_func;
9802 #endif
9803
9804 ; return 0; }
9805 EOF
9806 if { (eval echo configure:9807: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9807   rm -rf conftest*
9808   eval "ac_cv_func_$ac_func=yes"
9809 else
9810   echo "configure: failed program was:" >&5
9811   cat conftest.$ac_ext >&5
9812   rm -rf conftest*
9813   eval "ac_cv_func_$ac_func=no"
9814 fi
9815 rm -f conftest*
9816 fi
9817
9818 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9819   echo "$ac_t""yes" 1>&6
9820     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9821   cat >> confdefs.h <<EOF
9822 #define $ac_tr_func 1
9823 EOF
9824  
9825 else
9826   echo "$ac_t""no" 1>&6
9827 fi
9828 done
9829
9830 ol_cv_func_strerror_r=no
9831 if test "${ac_cv_func_strerror_r}" = yes ; then
9832         echo $ac_n "checking non-posix strerror_r""... $ac_c" 1>&6
9833 echo "configure:9834: checking non-posix strerror_r" >&5
9834 if eval "test \"\${ol_cv_nonposix_strerror_r+set}\" = set"; then
9835   echo $ac_n "(cached) $ac_c" 1>&6
9836 else
9837   
9838         cat > conftest.$ac_ext <<EOF
9839 #line 9840 "configure"
9840 #include "confdefs.h"
9841 #include <string.h>
9842 EOF
9843 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9844   egrep "strerror_r" >/dev/null 2>&1; then
9845   rm -rf conftest*
9846   ol_decl_strerror_r=yes
9847 else
9848   rm -rf conftest*
9849   ol_decl_strerror_r=no
9850 fi
9851 rm -f conftest*
9852
9853         if test $ol_decl_strerror_r = yes ; then
9854                 cat > conftest.$ac_ext <<EOF
9855 #line 9856 "configure"
9856 #include "confdefs.h"
9857 #include <string.h>
9858 int main() {
9859    /* from autoconf 2.59 */
9860                                 char buf[100];
9861                                 char x = *strerror_r (0, buf, sizeof buf);
9862                                 char *p = strerror_r (0, buf, sizeof buf);
9863                         
9864 ; return 0; }
9865 EOF
9866 if { (eval echo configure:9867: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9867   rm -rf conftest*
9868   ol_cv_nonposix_strerror_r=yes
9869 else
9870   echo "configure: failed program was:" >&5
9871   cat conftest.$ac_ext >&5
9872   rm -rf conftest*
9873   ol_cv_nonposix_strerror_r=no
9874 fi
9875 rm -f conftest*
9876         else
9877                 if test "$cross_compiling" = yes; then
9878   ol_cv_nonposix_strerror=no
9879 else
9880   cat > conftest.$ac_ext <<EOF
9881 #line 9882 "configure"
9882 #include "confdefs.h"
9883
9884                         main() {
9885                                 char buf[100];
9886                                 buf[0] = 0;
9887                                 strerror_r( 1, buf, sizeof buf );
9888                                 exit( buf[0] == 0 );
9889                         }
9890                         
9891 EOF
9892 if { (eval echo configure:9893: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
9893 then
9894   ol_cv_nonposix_strerror_r=yes
9895 else
9896   echo "configure: failed program was:" >&5
9897   cat conftest.$ac_ext >&5
9898   rm -fr conftest*
9899   ol_cv_nonposix_strerror=no
9900 fi
9901 rm -fr conftest*
9902 fi
9903
9904         fi
9905         
9906 fi
9907
9908 echo "$ac_t""$ol_cv_nonposix_strerror_r" 1>&6
9909 if test $ol_cv_nonposix_strerror_r = yes ; then
9910         cat >> confdefs.h <<\EOF
9911 #define HAVE_NONPOSIX_STRERROR_R 1
9912 EOF
9913
9914 fi
9915
9916 elif test "${ac_cv_func_strerror}" = no ; then
9917         echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6
9918 echo "configure:9919: checking declaration of sys_errlist" >&5
9919 if eval "test \"\${ol_cv_dcl_sys_errlist+set}\" = set"; then
9920   echo $ac_n "(cached) $ac_c" 1>&6
9921 else
9922   
9923         cat > conftest.$ac_ext <<EOF
9924 #line 9925 "configure"
9925 #include "confdefs.h"
9926
9927 #include <stdio.h>
9928 #include <sys/types.h>
9929 #include <errno.h>
9930 #ifdef WINNT
9931 #include <stdlib.h>
9932 #endif 
9933 int main() {
9934 char *c = (char *) *sys_errlist
9935 ; return 0; }
9936 EOF
9937 if { (eval echo configure:9938: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9938   rm -rf conftest*
9939   ol_cv_dcl_sys_errlist=yes
9940         ol_cv_have_sys_errlist=yes
9941 else
9942   echo "configure: failed program was:" >&5
9943   cat conftest.$ac_ext >&5
9944   rm -rf conftest*
9945   ol_cv_dcl_sys_errlist=no
9946 fi
9947 rm -f conftest*
9948 fi
9949
9950 echo "$ac_t""$ol_cv_dcl_sys_errlist" 1>&6
9951 #
9952 # It's possible (for near-UNIX clones) that sys_errlist doesn't exist
9953 if test $ol_cv_dcl_sys_errlist = no ; then
9954         cat >> confdefs.h <<\EOF
9955 #define DECL_SYS_ERRLIST 1
9956 EOF
9957
9958
9959         echo $ac_n "checking existence of sys_errlist""... $ac_c" 1>&6
9960 echo "configure:9961: checking existence of sys_errlist" >&5
9961 if eval "test \"\${ol_cv_have_sys_errlist+set}\" = set"; then
9962   echo $ac_n "(cached) $ac_c" 1>&6
9963 else
9964   
9965                 cat > conftest.$ac_ext <<EOF
9966 #line 9967 "configure"
9967 #include "confdefs.h"
9968 #include <errno.h>
9969 int main() {
9970 char *c = (char *) *sys_errlist
9971 ; return 0; }
9972 EOF
9973 if { (eval echo configure:9974: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9974   rm -rf conftest*
9975   ol_cv_have_sys_errlist=yes
9976 else
9977   echo "configure: failed program was:" >&5
9978   cat conftest.$ac_ext >&5
9979   rm -rf conftest*
9980   ol_cv_have_sys_errlist=no
9981 fi
9982 rm -f conftest*
9983 fi
9984
9985 echo "$ac_t""$ol_cv_have_sys_errlist" 1>&6
9986 fi
9987 if test $ol_cv_have_sys_errlist = yes ; then
9988         cat >> confdefs.h <<\EOF
9989 #define HAVE_SYS_ERRLIST 1
9990 EOF
9991
9992 fi
9993
9994 fi
9995
9996
9997 for ac_hdr in regex.h 
9998 do
9999 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10000 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10001 echo "configure:10002: checking for $ac_hdr" >&5
10002 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10003   echo $ac_n "(cached) $ac_c" 1>&6
10004 else
10005   cat > conftest.$ac_ext <<EOF
10006 #line 10007 "configure"
10007 #include "confdefs.h"
10008 #include <$ac_hdr>
10009 EOF
10010 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10011 { (eval echo configure:10012: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10012 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10013 if test -z "$ac_err"; then
10014   rm -rf conftest*
10015   eval "ac_cv_header_$ac_safe=yes"
10016 else
10017   echo "$ac_err" >&5
10018   echo "configure: failed program was:" >&5
10019   cat conftest.$ac_ext >&5
10020   rm -rf conftest*
10021   eval "ac_cv_header_$ac_safe=no"
10022 fi
10023 rm -f conftest*
10024 fi
10025 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10026   echo "$ac_t""yes" 1>&6
10027     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10028   cat >> confdefs.h <<EOF
10029 #define $ac_tr_hdr 1
10030 EOF
10031  
10032 else
10033   echo "$ac_t""no" 1>&6
10034 fi
10035 done
10036
10037 if test "$ac_cv_header_regex_h" != yes ; then
10038         { echo "configure: error: POSIX regex.h required." 1>&2; exit 1; }
10039 fi
10040
10041 echo $ac_n "checking for library containing regfree""... $ac_c" 1>&6
10042 echo "configure:10043: checking for library containing regfree" >&5
10043 if eval "test \"\${ac_cv_search_regfree+set}\" = set"; then
10044   echo $ac_n "(cached) $ac_c" 1>&6
10045 else
10046   ac_func_search_save_LIBS="$LIBS"
10047 ac_cv_search_regfree="no"
10048 cat > conftest.$ac_ext <<EOF
10049 #line 10050 "configure"
10050 #include "confdefs.h"
10051 /* Override any gcc2 internal prototype to avoid an error.  */
10052 /* We use char because int might match the return type of a gcc2
10053     builtin and then its argument prototype would still apply.  */
10054 char regfree();
10055
10056 int main() {
10057 regfree()
10058 ; return 0; }
10059 EOF
10060 if { (eval echo configure:10061: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10061   rm -rf conftest*
10062   ac_cv_search_regfree="none required"
10063 else
10064   echo "configure: failed program was:" >&5
10065   cat conftest.$ac_ext >&5
10066 fi
10067 rm -f conftest*
10068 test "$ac_cv_search_regfree" = "no" && for ac_lib in regex gnuregex; do
10069 LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
10070 cat > conftest.$ac_ext <<EOF
10071 #line 10072 "configure"
10072 #include "confdefs.h"
10073 /* Override any gcc2 internal prototype to avoid an error.  */
10074 /* We use char because int might match the return type of a gcc2
10075     builtin and then its argument prototype would still apply.  */
10076 char regfree();
10077
10078 int main() {
10079 regfree()
10080 ; return 0; }
10081 EOF
10082 if { (eval echo configure:10083: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10083   rm -rf conftest*
10084   ac_cv_search_regfree="-l$ac_lib"
10085 break
10086 else
10087   echo "configure: failed program was:" >&5
10088   cat conftest.$ac_ext >&5
10089 fi
10090 rm -f conftest*
10091 done
10092 LIBS="$ac_func_search_save_LIBS"
10093 fi
10094
10095 echo "$ac_t""$ac_cv_search_regfree" 1>&6
10096 if test "$ac_cv_search_regfree" != "no"; then
10097   test "$ac_cv_search_regfree" = "none required" || LIBS="$ac_cv_search_regfree $LIBS"
10098   :
10099 else :
10100   { echo "configure: error: POSIX regex required." 1>&2; exit 1; }
10101 fi
10102
10103
10104 echo $ac_n "checking for compatible POSIX regex""... $ac_c" 1>&6
10105 echo "configure:10106: checking for compatible POSIX regex" >&5
10106 if eval "test \"\${ol_cv_c_posix_regex+set}\" = set"; then
10107   echo $ac_n "(cached) $ac_c" 1>&6
10108 else
10109   
10110         if test "$cross_compiling" = yes; then
10111   ol_cv_c_posix_regex=cross
10112 else
10113   cat > conftest.$ac_ext <<EOF
10114 #line 10115 "configure"
10115 #include "confdefs.h"
10116
10117 #include <sys/types.h>
10118 #include <regex.h>
10119 static char *pattern, *string;
10120 main()
10121 {
10122         int rc;
10123         regex_t re;
10124
10125         pattern = "^A";
10126
10127         if(regcomp(&re, pattern, 0)) {
10128                 return -1;
10129         }
10130         
10131         string = "ALL MATCH";
10132         
10133         rc = regexec(&re, string, 0, (void*)0, 0);
10134
10135         regfree(&re);
10136
10137         return rc;
10138 }
10139 EOF
10140 if { (eval echo configure:10141: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
10141 then
10142   ol_cv_c_posix_regex=yes
10143 else
10144   echo "configure: failed program was:" >&5
10145   cat conftest.$ac_ext >&5
10146   rm -fr conftest*
10147   ol_cv_c_posix_regex=no
10148 fi
10149 rm -fr conftest*
10150 fi
10151
10152 fi
10153
10154 echo "$ac_t""$ol_cv_c_posix_regex" 1>&6
10155
10156 if test "$ol_cv_c_posix_regex" = no ; then
10157         { echo "configure: error: broken POSIX regex!" 1>&2; exit 1; }
10158 fi
10159
10160
10161 have_uuid=no
10162 for ac_hdr in sys/uuid.h
10163 do
10164 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10165 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10166 echo "configure:10167: checking for $ac_hdr" >&5
10167 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10168   echo $ac_n "(cached) $ac_c" 1>&6
10169 else
10170   cat > conftest.$ac_ext <<EOF
10171 #line 10172 "configure"
10172 #include "confdefs.h"
10173 #include <$ac_hdr>
10174 EOF
10175 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10176 { (eval echo configure:10177: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10177 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10178 if test -z "$ac_err"; then
10179   rm -rf conftest*
10180   eval "ac_cv_header_$ac_safe=yes"
10181 else
10182   echo "$ac_err" >&5
10183   echo "configure: failed program was:" >&5
10184   cat conftest.$ac_ext >&5
10185   rm -rf conftest*
10186   eval "ac_cv_header_$ac_safe=no"
10187 fi
10188 rm -f conftest*
10189 fi
10190 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10191   echo "$ac_t""yes" 1>&6
10192     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10193   cat >> confdefs.h <<EOF
10194 #define $ac_tr_hdr 1
10195 EOF
10196  
10197 else
10198   echo "$ac_t""no" 1>&6
10199 fi
10200 done
10201
10202 if test $ac_cv_header_sys_uuid_h = yes ; then
10203         save_LIBS="$LIBS"
10204         
10205 echo $ac_n "checking for library containing uuid_to_str""... $ac_c" 1>&6
10206 echo "configure:10207: checking for library containing uuid_to_str" >&5
10207 if eval "test \"\${ac_cv_search_uuid_to_str+set}\" = set"; then
10208   echo $ac_n "(cached) $ac_c" 1>&6
10209 else
10210   ac_func_search_save_LIBS="$LIBS"
10211 ac_cv_search_uuid_to_str="no"
10212 cat > conftest.$ac_ext <<EOF
10213 #line 10214 "configure"
10214 #include "confdefs.h"
10215 /* Override any gcc2 internal prototype to avoid an error.  */
10216 /* We use char because int might match the return type of a gcc2
10217     builtin and then its argument prototype would still apply.  */
10218 char uuid_to_str();
10219
10220 int main() {
10221 uuid_to_str()
10222 ; return 0; }
10223 EOF
10224 if { (eval echo configure:10225: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10225   rm -rf conftest*
10226   ac_cv_search_uuid_to_str="none required"
10227 else
10228   echo "configure: failed program was:" >&5
10229   cat conftest.$ac_ext >&5
10230 fi
10231 rm -f conftest*
10232 test "$ac_cv_search_uuid_to_str" = "no" && for ac_lib in uuid; do
10233 LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
10234 cat > conftest.$ac_ext <<EOF
10235 #line 10236 "configure"
10236 #include "confdefs.h"
10237 /* Override any gcc2 internal prototype to avoid an error.  */
10238 /* We use char because int might match the return type of a gcc2
10239     builtin and then its argument prototype would still apply.  */
10240 char uuid_to_str();
10241
10242 int main() {
10243 uuid_to_str()
10244 ; return 0; }
10245 EOF
10246 if { (eval echo configure:10247: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10247   rm -rf conftest*
10248   ac_cv_search_uuid_to_str="-l$ac_lib"
10249 break
10250 else
10251   echo "configure: failed program was:" >&5
10252   cat conftest.$ac_ext >&5
10253 fi
10254 rm -f conftest*
10255 done
10256 LIBS="$ac_func_search_save_LIBS"
10257 fi
10258
10259 echo "$ac_t""$ac_cv_search_uuid_to_str" 1>&6
10260 if test "$ac_cv_search_uuid_to_str" != "no"; then
10261   test "$ac_cv_search_uuid_to_str" = "none required" || LIBS="$ac_cv_search_uuid_to_str $LIBS"
10262   have_uuid=yes
10263 else :
10264   :
10265 fi
10266         LIBS="$save_LIBS"
10267
10268         if test have_uuid = yes ; then
10269                 cat >> confdefs.h <<\EOF
10270 #define HAVE_UUID_TO_STR 1
10271 EOF
10272
10273
10274                 test "$ac_cv_search_uuid_to_str" = "none required" || \
10275                         SLAPD_LIBS="$SLAPD_LIBS $ac_cv_search_uuid_to_str"
10276         fi
10277 fi
10278
10279 if test $have_uuid = no ; then
10280         echo $ac_n "checking to see if -lrpcrt4 is needed for win32 UUID support""... $ac_c" 1>&6
10281 echo "configure:10282: checking to see if -lrpcrt4 is needed for win32 UUID support" >&5
10282         save_LIBS="$LIBS"
10283         LIBS="$LIBS -lrpcrt4"
10284         cat > conftest.$ac_ext <<EOF
10285 #line 10286 "configure"
10286 #include "confdefs.h"
10287
10288                 int __stdcall UuidCreate(void *);
10289                 int __stdcall UuidToStringA(void *,void **);
10290                 
10291 int main() {
10292
10293                 UuidCreate(0);
10294                 UuidToStringA(0,0);
10295                 
10296 ; return 0; }
10297 EOF
10298 if { (eval echo configure:10299: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10299   rm -rf conftest*
10300   need_rpcrt=yes
10301 else
10302   echo "configure: failed program was:" >&5
10303   cat conftest.$ac_ext >&5
10304   rm -rf conftest*
10305   need_rpcrt=no
10306 fi
10307 rm -f conftest*
10308         if test $need_rpcrt = yes; then
10309                 SLAPD_LIBS="$SLAPD_LIBS -lrpcrt4"
10310         fi
10311         LIBS="$save_LIBS"
10312         echo "$ac_t""$need_rpcrt" 1>&6
10313 fi
10314
10315 ol_cv_lib_resolver=no
10316 if test $ol_cv_lib_resolver = no ; then
10317         echo $ac_n "checking for resolver link (default)""... $ac_c" 1>&6
10318 echo "configure:10319: checking for resolver link (default)" >&5
10319 if eval "test \"\${ol_cv_resolver_none+set}\" = set"; then
10320   echo $ac_n "(cached) $ac_c" 1>&6
10321 else
10322   
10323         ol_RESOLVER_LIB=
10324         ol_LIBS=$LIBS
10325         LIBS="$ol_RESOLVER_LIB $LIBS"
10326
10327         cat > conftest.$ac_ext <<EOF
10328 #line 10329 "configure"
10329 #include "confdefs.h"
10330
10331 #ifdef HAVE_SYS_TYPES_H
10332 #       include <sys/types.h>
10333 #endif
10334 #include <netinet/in.h>
10335 #ifdef HAVE_ARPA_NAMESER_H
10336 #       include <arpa/nameser.h>
10337 #endif
10338 #ifdef HAVE_RESOLV_H
10339 #       include <resolv.h>
10340 #endif
10341
10342 int main() {
10343 {
10344         int len, status;
10345         char *request = NULL;
10346         unsigned char reply[64*1024];
10347         unsigned char host[64*1024];
10348         unsigned char *p;
10349
10350 #ifdef NS_HFIXEDSZ
10351         /* Bind 8/9 interface */
10352         len = res_query(request, ns_c_in, ns_t_srv, reply, sizeof(reply));
10353 #else
10354         /* Bind 4 interface */
10355 # ifndef T_SRV
10356 #  define T_SRV 33
10357 # endif
10358         len = res_query(request, C_IN, T_SRV, reply, sizeof(reply));
10359 #endif
10360         p = reply;
10361 #ifdef NS_HFIXEDSZ
10362         /* Bind 8/9 interface */
10363         p += NS_HFIXEDSZ;
10364 #elif defined(HFIXEDSZ)
10365         /* Bind 4 interface w/ HFIXEDSZ */
10366         p += HFIXEDSZ;
10367 #else
10368         /* Bind 4 interface w/o HFIXEDSZ */
10369         p += sizeof(HEADER);
10370 #endif
10371         status = dn_expand( reply, reply+len, p, host, sizeof(host));
10372 }
10373 ; return 0; }
10374 EOF
10375 if { (eval echo configure:10376: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10376   rm -rf conftest*
10377   ol_cv_resolver_none=yes
10378 else
10379   echo "configure: failed program was:" >&5
10380   cat conftest.$ac_ext >&5
10381   rm -rf conftest*
10382   ol_cv_resolver_none=no
10383 fi
10384 rm -f conftest*
10385
10386         LIBS="$ol_LIBS"
10387
10388 fi
10389
10390 echo "$ac_t""$ol_cv_resolver_none" 1>&6
10391
10392         if test $ol_cv_resolver_none = yes ; then
10393                 ol_cv_lib_resolver=yes
10394         fi
10395 fi
10396
10397 if test $ol_cv_lib_resolver = no ; then
10398         echo $ac_n "checking for resolver link (-lresolv)""... $ac_c" 1>&6
10399 echo "configure:10400: checking for resolver link (-lresolv)" >&5
10400 if eval "test \"\${ol_cv_resolver_resolv+set}\" = set"; then
10401   echo $ac_n "(cached) $ac_c" 1>&6
10402 else
10403   
10404         ol_RESOLVER_LIB=-lresolv
10405         ol_LIBS=$LIBS
10406         LIBS="$ol_RESOLVER_LIB $LIBS"
10407
10408         cat > conftest.$ac_ext <<EOF
10409 #line 10410 "configure"
10410 #include "confdefs.h"
10411
10412 #ifdef HAVE_SYS_TYPES_H
10413 #       include <sys/types.h>
10414 #endif
10415 #include <netinet/in.h>
10416 #ifdef HAVE_ARPA_NAMESER_H
10417 #       include <arpa/nameser.h>
10418 #endif
10419 #ifdef HAVE_RESOLV_H
10420 #       include <resolv.h>
10421 #endif
10422
10423 int main() {
10424 {
10425         int len, status;
10426         char *request = NULL;
10427         unsigned char reply[64*1024];
10428         unsigned char host[64*1024];
10429         unsigned char *p;
10430
10431 #ifdef NS_HFIXEDSZ
10432         /* Bind 8/9 interface */
10433         len = res_query(request, ns_c_in, ns_t_srv, reply, sizeof(reply));
10434 #else
10435         /* Bind 4 interface */
10436 # ifndef T_SRV
10437 #  define T_SRV 33
10438 # endif
10439         len = res_query(request, C_IN, T_SRV, reply, sizeof(reply));
10440 #endif
10441         p = reply;
10442 #ifdef NS_HFIXEDSZ
10443         /* Bind 8/9 interface */
10444         p += NS_HFIXEDSZ;
10445 #elif defined(HFIXEDSZ)
10446         /* Bind 4 interface w/ HFIXEDSZ */
10447         p += HFIXEDSZ;
10448 #else
10449         /* Bind 4 interface w/o HFIXEDSZ */
10450         p += sizeof(HEADER);
10451 #endif
10452         status = dn_expand( reply, reply+len, p, host, sizeof(host));
10453 }
10454 ; return 0; }
10455 EOF
10456 if { (eval echo configure:10457: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10457   rm -rf conftest*
10458   ol_cv_resolver_resolv=yes
10459 else
10460   echo "configure: failed program was:" >&5
10461   cat conftest.$ac_ext >&5
10462   rm -rf conftest*
10463   ol_cv_resolver_resolv=no
10464 fi
10465 rm -f conftest*
10466
10467         LIBS="$ol_LIBS"
10468
10469 fi
10470
10471 echo "$ac_t""$ol_cv_resolver_resolv" 1>&6
10472
10473         if test $ol_cv_resolver_resolv = yes ; then
10474                 ol_cv_lib_resolver=-lresolv
10475         fi
10476 fi
10477
10478 if test $ol_cv_lib_resolver = no ; then
10479         echo $ac_n "checking for resolver link (-lbind)""... $ac_c" 1>&6
10480 echo "configure:10481: checking for resolver link (-lbind)" >&5
10481 if eval "test \"\${ol_cv_resolver_bind+set}\" = set"; then
10482   echo $ac_n "(cached) $ac_c" 1>&6
10483 else
10484   
10485         ol_RESOLVER_LIB=-lbind
10486         ol_LIBS=$LIBS
10487         LIBS="$ol_RESOLVER_LIB $LIBS"
10488
10489         cat > conftest.$ac_ext <<EOF
10490 #line 10491 "configure"
10491 #include "confdefs.h"
10492
10493 #ifdef HAVE_SYS_TYPES_H
10494 #       include <sys/types.h>
10495 #endif
10496 #include <netinet/in.h>
10497 #ifdef HAVE_ARPA_NAMESER_H
10498 #       include <arpa/nameser.h>
10499 #endif
10500 #ifdef HAVE_RESOLV_H
10501 #       include <resolv.h>
10502 #endif
10503
10504 int main() {
10505 {
10506         int len, status;
10507         char *request = NULL;
10508         unsigned char reply[64*1024];
10509         unsigned char host[64*1024];
10510         unsigned char *p;
10511
10512 #ifdef NS_HFIXEDSZ
10513         /* Bind 8/9 interface */
10514         len = res_query(request, ns_c_in, ns_t_srv, reply, sizeof(reply));
10515 #else
10516         /* Bind 4 interface */
10517 # ifndef T_SRV
10518 #  define T_SRV 33
10519 # endif
10520         len = res_query(request, C_IN, T_SRV, reply, sizeof(reply));
10521 #endif
10522         p = reply;
10523 #ifdef NS_HFIXEDSZ
10524         /* Bind 8/9 interface */
10525         p += NS_HFIXEDSZ;
10526 #elif defined(HFIXEDSZ)
10527         /* Bind 4 interface w/ HFIXEDSZ */
10528         p += HFIXEDSZ;
10529 #else
10530         /* Bind 4 interface w/o HFIXEDSZ */
10531         p += sizeof(HEADER);
10532 #endif
10533         status = dn_expand( reply, reply+len, p, host, sizeof(host));
10534 }
10535 ; return 0; }
10536 EOF
10537 if { (eval echo configure:10538: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10538   rm -rf conftest*
10539   ol_cv_resolver_bind=yes
10540 else
10541   echo "configure: failed program was:" >&5
10542   cat conftest.$ac_ext >&5
10543   rm -rf conftest*
10544   ol_cv_resolver_bind=no
10545 fi
10546 rm -f conftest*
10547
10548         LIBS="$ol_LIBS"
10549
10550 fi
10551
10552 echo "$ac_t""$ol_cv_resolver_bind" 1>&6
10553
10554         if test $ol_cv_resolver_bind = yes ; then
10555                 ol_cv_lib_resolver=-lbind
10556         fi
10557 fi
10558
10559
10560
10561 ol_link_dnssrv=no
10562 if test "$ol_cv_lib_resolver" != no ; then
10563         cat >> confdefs.h <<\EOF
10564 #define HAVE_RES_QUERY 1
10565 EOF
10566
10567
10568         if test "$ol_enable_dnssrv" != no ; then
10569                 ol_link_dnssrv=yes
10570         fi
10571
10572         if test "$ol_cv_lib_resolver" != yes ; then
10573                 LIBS="$ol_cv_lib_resolver $LIBS"
10574         fi
10575 fi
10576
10577 if test "$ol_enable_dnssrv" = yes -o "$ol_enable_dnssrv" = mod ; then
10578         if test "$ol_link_dnssrv" = no ; then
10579                 { echo "configure: error: DNSSRV requires res_query()" 1>&2; exit 1; }
10580         fi
10581 else
10582         ol_enable_dnssrv=no
10583 fi
10584
10585 for ac_func in hstrerror 
10586 do
10587 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10588 echo "configure:10589: checking for $ac_func" >&5
10589 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10590   echo $ac_n "(cached) $ac_c" 1>&6
10591 else
10592   cat > conftest.$ac_ext <<EOF
10593 #line 10594 "configure"
10594 #include "confdefs.h"
10595 /* System header to define __stub macros and hopefully few prototypes,
10596     which can conflict with char $ac_func(); below.  */
10597 #include <assert.h>
10598 /* Override any gcc2 internal prototype to avoid an error.  */
10599 /* We use char because int might match the return type of a gcc2
10600     builtin and then its argument prototype would still apply.  */
10601 char $ac_func();
10602 char (*f)();
10603
10604 int main() {
10605
10606 /* The GNU C library defines this for functions which it implements
10607     to always fail with ENOSYS.  Some functions are actually named
10608     something starting with __ and the normal name is an alias.  */
10609 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10610 choke me
10611 #else
10612 f = $ac_func;
10613 #endif
10614
10615 ; return 0; }
10616 EOF
10617 if { (eval echo configure:10618: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10618   rm -rf conftest*
10619   eval "ac_cv_func_$ac_func=yes"
10620 else
10621   echo "configure: failed program was:" >&5
10622   cat conftest.$ac_ext >&5
10623   rm -rf conftest*
10624   eval "ac_cv_func_$ac_func=no"
10625 fi
10626 rm -f conftest*
10627 fi
10628
10629 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10630   echo "$ac_t""yes" 1>&6
10631     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10632   cat >> confdefs.h <<EOF
10633 #define $ac_tr_func 1
10634 EOF
10635  
10636 else
10637   echo "$ac_t""no" 1>&6
10638 fi
10639 done
10640
10641
10642 for ac_func in getaddrinfo getnameinfo gai_strerror inet_ntop 
10643 do
10644 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10645 echo "configure:10646: checking for $ac_func" >&5
10646 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10647   echo $ac_n "(cached) $ac_c" 1>&6
10648 else
10649   cat > conftest.$ac_ext <<EOF
10650 #line 10651 "configure"
10651 #include "confdefs.h"
10652 /* System header to define __stub macros and hopefully few prototypes,
10653     which can conflict with char $ac_func(); below.  */
10654 #include <assert.h>
10655 /* Override any gcc2 internal prototype to avoid an error.  */
10656 /* We use char because int might match the return type of a gcc2
10657     builtin and then its argument prototype would still apply.  */
10658 char $ac_func();
10659 char (*f)();
10660
10661 int main() {
10662
10663 /* The GNU C library defines this for functions which it implements
10664     to always fail with ENOSYS.  Some functions are actually named
10665     something starting with __ and the normal name is an alias.  */
10666 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10667 choke me
10668 #else
10669 f = $ac_func;
10670 #endif
10671
10672 ; return 0; }
10673 EOF
10674 if { (eval echo configure:10675: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10675   rm -rf conftest*
10676   eval "ac_cv_func_$ac_func=yes"
10677 else
10678   echo "configure: failed program was:" >&5
10679   cat conftest.$ac_ext >&5
10680   rm -rf conftest*
10681   eval "ac_cv_func_$ac_func=no"
10682 fi
10683 rm -f conftest*
10684 fi
10685
10686 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10687   echo "$ac_t""yes" 1>&6
10688     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10689   cat >> confdefs.h <<EOF
10690 #define $ac_tr_func 1
10691 EOF
10692  
10693 else
10694   echo "$ac_t""no" 1>&6
10695 fi
10696 done
10697
10698
10699 ol_link_ipv6=no
10700 if test $ac_cv_func_getaddrinfo = no -o $ac_cv_func_inet_ntop = no ; then
10701         if test $ol_enable_ipv6 = yes ; then
10702                 { echo "configure: error: IPv6 support requires getaddrinfo() and inet_ntop()" 1>&2; exit 1; }
10703         fi
10704 elif test $ol_enable_ipv6 != no ; then
10705         echo $ac_n "checking INET6_ADDRSTRLEN""... $ac_c" 1>&6
10706 echo "configure:10707: checking INET6_ADDRSTRLEN" >&5
10707 if eval "test \"\${ol_cv_inet6_addrstrlen+set}\" = set"; then
10708   echo $ac_n "(cached) $ac_c" 1>&6
10709 else
10710   
10711                 cat > conftest.$ac_ext <<EOF
10712 #line 10713 "configure"
10713 #include "confdefs.h"
10714
10715 #                       include <netinet/in.h>
10716 #                       ifdef INET6_ADDRSTRLEN
10717                                 __has_inet6_addrstrlen__;
10718 #                       endif
10719                 
10720 EOF
10721 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10722   egrep "__has_inet6_addrstrlen__" >/dev/null 2>&1; then
10723   rm -rf conftest*
10724   ol_cv_inet6_addrstrlen=yes
10725 else
10726   rm -rf conftest*
10727   ol_cv_inet6_addrstrlen=no
10728 fi
10729 rm -f conftest*
10730
10731 fi
10732
10733 echo "$ac_t""$ol_cv_inet6_addrstrlen" 1>&6
10734
10735
10736         echo $ac_n "checking struct sockaddr_storage""... $ac_c" 1>&6
10737 echo "configure:10738: checking struct sockaddr_storage" >&5
10738 if eval "test \"\${ol_cv_struct_sockaddr_storage+set}\" = set"; then
10739   echo $ac_n "(cached) $ac_c" 1>&6
10740 else
10741   
10742                 cat > conftest.$ac_ext <<EOF
10743 #line 10744 "configure"
10744 #include "confdefs.h"
10745
10746 #include <sys/types.h>
10747 #include <sys/socket.h>
10748
10749 int main() {
10750
10751                         struct sockaddr_storage ss;
10752
10753 ; return 0; }
10754 EOF
10755 if { (eval echo configure:10756: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10756   rm -rf conftest*
10757   ol_cv_struct_sockaddr_storage=yes
10758 else
10759   echo "configure: failed program was:" >&5
10760   cat conftest.$ac_ext >&5
10761   rm -rf conftest*
10762   ol_cv_struct_sockaddr_storage=no
10763 fi
10764 rm -f conftest*
10765 fi
10766
10767 echo "$ac_t""$ol_cv_struct_sockaddr_storage" 1>&6
10768
10769         if test $ol_cv_inet6_addrstrlen = yes \
10770                 -a $ol_cv_struct_sockaddr_storage = yes ; then
10771                 ol_link_ipv6=yes
10772         elif test $ol_enable_ipv6 = yes \
10773                         -a $ol_cv_inet6_addrstrlen = no ; then
10774                 { echo "configure: error: IPv6 support requires INET6_ADDRSTRLEN" 1>&2; exit 1; }
10775         elif test $ol_enable_ipv6 = yes \
10776                         -a $ol_cv_struct_sockaddr_storage = no ; then
10777                 { echo "configure: error: IPv6 support requires struct sockaddr_storage" 1>&2; exit 1; }
10778         fi
10779 fi
10780
10781 if test $ol_enable_local != no ; then
10782         for ac_hdr in sys/un.h 
10783 do
10784 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10785 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10786 echo "configure:10787: checking for $ac_hdr" >&5
10787 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10788   echo $ac_n "(cached) $ac_c" 1>&6
10789 else
10790   cat > conftest.$ac_ext <<EOF
10791 #line 10792 "configure"
10792 #include "confdefs.h"
10793 #include <$ac_hdr>
10794 EOF
10795 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10796 { (eval echo configure:10797: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10797 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10798 if test -z "$ac_err"; then
10799   rm -rf conftest*
10800   eval "ac_cv_header_$ac_safe=yes"
10801 else
10802   echo "$ac_err" >&5
10803   echo "configure: failed program was:" >&5
10804   cat conftest.$ac_ext >&5
10805   rm -rf conftest*
10806   eval "ac_cv_header_$ac_safe=no"
10807 fi
10808 rm -f conftest*
10809 fi
10810 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10811   echo "$ac_t""yes" 1>&6
10812     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10813   cat >> confdefs.h <<EOF
10814 #define $ac_tr_hdr 1
10815 EOF
10816  
10817 else
10818   echo "$ac_t""no" 1>&6
10819 fi
10820 done
10821
10822
10823         if test $ol_enable_local = auto ; then
10824                 ol_enable_local=$ac_cv_header_sys_un_h
10825         elif test $ac_cv_header_sys_un_h = no ; then
10826                 { echo "configure: error: AF_LOCAL domain support requires sys/un.h" 1>&2; exit 1; }
10827         fi
10828 fi
10829
10830 ol_link_kbind=no
10831 ol_link_krb5=no
10832 ol_link_krb4=no
10833
10834 if test $ol_with_kerberos = yes -o $ol_with_kerberos = auto \
10835         -o $ol_with_kerberos = k5 -o $ol_with_kerberos = k5only \
10836         -o $ol_with_kerberos = k425 ; then
10837
10838         for ac_hdr in krb5.h
10839 do
10840 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10841 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10842 echo "configure:10843: checking for $ac_hdr" >&5
10843 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10844   echo $ac_n "(cached) $ac_c" 1>&6
10845 else
10846   cat > conftest.$ac_ext <<EOF
10847 #line 10848 "configure"
10848 #include "confdefs.h"
10849 #include <$ac_hdr>
10850 EOF
10851 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10852 { (eval echo configure:10853: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10853 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10854 if test -z "$ac_err"; then
10855   rm -rf conftest*
10856   eval "ac_cv_header_$ac_safe=yes"
10857 else
10858   echo "$ac_err" >&5
10859   echo "configure: failed program was:" >&5
10860   cat conftest.$ac_ext >&5
10861   rm -rf conftest*
10862   eval "ac_cv_header_$ac_safe=no"
10863 fi
10864 rm -f conftest*
10865 fi
10866 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10867   echo "$ac_t""yes" 1>&6
10868     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10869   cat >> confdefs.h <<EOF
10870 #define $ac_tr_hdr 1
10871 EOF
10872  
10873 else
10874   echo "$ac_t""no" 1>&6
10875 fi
10876 done
10877
10878
10879         if test $ac_cv_header_krb5_h = yes ; then
10880                                 for ac_hdr in heim_err.h
10881 do
10882 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10883 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10884 echo "configure:10885: checking for $ac_hdr" >&5
10885 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10886   echo $ac_n "(cached) $ac_c" 1>&6
10887 else
10888   cat > conftest.$ac_ext <<EOF
10889 #line 10890 "configure"
10890 #include "confdefs.h"
10891 #include <$ac_hdr>
10892 EOF
10893 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10894 { (eval echo configure:10895: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10895 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10896 if test -z "$ac_err"; then
10897   rm -rf conftest*
10898   eval "ac_cv_header_$ac_safe=yes"
10899 else
10900   echo "$ac_err" >&5
10901   echo "configure: failed program was:" >&5
10902   cat conftest.$ac_ext >&5
10903   rm -rf conftest*
10904   eval "ac_cv_header_$ac_safe=no"
10905 fi
10906 rm -f conftest*
10907 fi
10908 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10909   echo "$ac_t""yes" 1>&6
10910     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10911   cat >> confdefs.h <<EOF
10912 #define $ac_tr_hdr 1
10913 EOF
10914  
10915 else
10916   echo "$ac_t""no" 1>&6
10917 fi
10918 done
10919
10920                 if test $ac_cv_header_heim_err_h = yes ; then
10921                         krb5_impl=heimdal
10922                 else
10923                         krb5_impl=mit
10924                 fi
10925
10926                 if test $krb5_impl = mit; then
10927                         echo $ac_n "checking for main in -lk5crypto""... $ac_c" 1>&6
10928 echo "configure:10929: checking for main in -lk5crypto" >&5
10929 ac_lib_var=`echo k5crypto'_'main | sed 'y%./+-:%__p__%'`
10930 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10931   echo $ac_n "(cached) $ac_c" 1>&6
10932 else
10933   ac_save_LIBS="$LIBS"
10934 LIBS="-lk5crypto  $LIBS"
10935 cat > conftest.$ac_ext <<EOF
10936 #line 10937 "configure"
10937 #include "confdefs.h"
10938
10939 int main() {
10940 main()
10941 ; return 0; }
10942 EOF
10943 if { (eval echo configure:10944: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10944   rm -rf conftest*
10945   eval "ac_cv_lib_$ac_lib_var=yes"
10946 else
10947   echo "configure: failed program was:" >&5
10948   cat conftest.$ac_ext >&5
10949   rm -rf conftest*
10950   eval "ac_cv_lib_$ac_lib_var=no"
10951 fi
10952 rm -f conftest*
10953 LIBS="$ac_save_LIBS"
10954
10955 fi
10956 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10957   echo "$ac_t""yes" 1>&6
10958   krb5crypto=k5crypto
10959 else
10960   echo "$ac_t""no" 1>&6
10961 krb5crypto=crypto
10962 fi
10963
10964
10965                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
10966 echo "configure:10967: checking for main in -lkrb5" >&5
10967 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
10968 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10969   echo $ac_n "(cached) $ac_c" 1>&6
10970 else
10971   ac_save_LIBS="$LIBS"
10972 LIBS="-lkrb5 -l$krb5crypto -lcom_err $LIBS"
10973 cat > conftest.$ac_ext <<EOF
10974 #line 10975 "configure"
10975 #include "confdefs.h"
10976
10977 int main() {
10978 main()
10979 ; return 0; }
10980 EOF
10981 if { (eval echo configure:10982: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10982   rm -rf conftest*
10983   eval "ac_cv_lib_$ac_lib_var=yes"
10984 else
10985   echo "configure: failed program was:" >&5
10986   cat conftest.$ac_ext >&5
10987   rm -rf conftest*
10988   eval "ac_cv_lib_$ac_lib_var=no"
10989 fi
10990 rm -f conftest*
10991 LIBS="$ac_save_LIBS"
10992
10993 fi
10994 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10995   echo "$ac_t""yes" 1>&6
10996   have_krb5=yes
10997                                 KRB5_LIBS="-lkrb5 -l$krb5crypto -lcom_err"
10998 else
10999   echo "$ac_t""no" 1>&6
11000 have_krb5=no
11001 fi
11002
11003
11004                 elif test $krb5_impl = heimdal; then
11005                         echo $ac_n "checking for main in -ldes""... $ac_c" 1>&6
11006 echo "configure:11007: checking for main in -ldes" >&5
11007 ac_lib_var=`echo des'_'main | sed 'y%./+-:%__p__%'`
11008 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11009   echo $ac_n "(cached) $ac_c" 1>&6
11010 else
11011   ac_save_LIBS="$LIBS"
11012 LIBS="-ldes  $LIBS"
11013 cat > conftest.$ac_ext <<EOF
11014 #line 11015 "configure"
11015 #include "confdefs.h"
11016
11017 int main() {
11018 main()
11019 ; return 0; }
11020 EOF
11021 if { (eval echo configure:11022: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11022   rm -rf conftest*
11023   eval "ac_cv_lib_$ac_lib_var=yes"
11024 else
11025   echo "configure: failed program was:" >&5
11026   cat conftest.$ac_ext >&5
11027   rm -rf conftest*
11028   eval "ac_cv_lib_$ac_lib_var=no"
11029 fi
11030 rm -f conftest*
11031 LIBS="$ac_save_LIBS"
11032
11033 fi
11034 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11035   echo "$ac_t""yes" 1>&6
11036   krb5crypto=des
11037 else
11038   echo "$ac_t""no" 1>&6
11039 krb5crypto=crypto
11040 fi
11041
11042
11043                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
11044 echo "configure:11045: checking for main in -lkrb5" >&5
11045 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
11046 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11047   echo $ac_n "(cached) $ac_c" 1>&6
11048 else
11049   ac_save_LIBS="$LIBS"
11050 LIBS="-lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err $LIBS"
11051 cat > conftest.$ac_ext <<EOF
11052 #line 11053 "configure"
11053 #include "confdefs.h"
11054
11055 int main() {
11056 main()
11057 ; return 0; }
11058 EOF
11059 if { (eval echo configure:11060: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11060   rm -rf conftest*
11061   eval "ac_cv_lib_$ac_lib_var=yes"
11062 else
11063   echo "configure: failed program was:" >&5
11064   cat conftest.$ac_ext >&5
11065   rm -rf conftest*
11066   eval "ac_cv_lib_$ac_lib_var=no"
11067 fi
11068 rm -f conftest*
11069 LIBS="$ac_save_LIBS"
11070
11071 fi
11072 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11073   echo "$ac_t""yes" 1>&6
11074   have_krb5=yes
11075                                 KRB5_LIBS="-lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err"
11076 else
11077   echo "$ac_t""no" 1>&6
11078 have_krb5=no
11079 fi
11080
11081
11082                         cat >> confdefs.h <<\EOF
11083 #define HAVE_HEIMDAL_KERBEROS 1
11084 EOF
11085
11086
11087                 else
11088                         have_krb5=no
11089                         echo "configure: warning: Unrecognized Kerberos5 Implementation" 1>&2
11090                 fi
11091
11092                 if test $have_krb5 = yes ; then
11093                         ol_link_krb5=yes
11094
11095                         cat >> confdefs.h <<\EOF
11096 #define HAVE_KRB5 1
11097 EOF
11098
11099
11100                         if test $ol_with_kerberos = k5only ; then
11101                                 ol_with_kerberos=found
11102                         fi
11103
11104                 elif test $ol_with_kerberos != auto ; then
11105                         { echo "configure: error: Required Kerberos 5 support not available" 1>&2; exit 1; }
11106                 fi
11107
11108         fi
11109 fi
11110
11111 if test $ol_link_krb5 = yes -a \( $ol_with_kerberos = yes -o \
11112         $ol_with_kerberos = auto -o $ol_with_kerberos = k425 \) ; then
11113
11114         for ac_hdr in kerberosIV/krb.h kerberosIV/des.h
11115 do
11116 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11117 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11118 echo "configure:11119: checking for $ac_hdr" >&5
11119 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11120   echo $ac_n "(cached) $ac_c" 1>&6
11121 else
11122   cat > conftest.$ac_ext <<EOF
11123 #line 11124 "configure"
11124 #include "confdefs.h"
11125 #include <$ac_hdr>
11126 EOF
11127 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11128 { (eval echo configure:11129: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11129 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11130 if test -z "$ac_err"; then
11131   rm -rf conftest*
11132   eval "ac_cv_header_$ac_safe=yes"
11133 else
11134   echo "$ac_err" >&5
11135   echo "configure: failed program was:" >&5
11136   cat conftest.$ac_ext >&5
11137   rm -rf conftest*
11138   eval "ac_cv_header_$ac_safe=no"
11139 fi
11140 rm -f conftest*
11141 fi
11142 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11143   echo "$ac_t""yes" 1>&6
11144     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11145   cat >> confdefs.h <<EOF
11146 #define $ac_tr_hdr 1
11147 EOF
11148  
11149 else
11150   echo "$ac_t""no" 1>&6
11151 fi
11152 done
11153
11154
11155         if test $ac_cv_header_kerberosIV_krb_h = yes ; then
11156                 if test $krb5_impl = mit; then
11157                         echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
11158 echo "configure:11159: checking for main in -lkrb4" >&5
11159 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
11160 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11161   echo $ac_n "(cached) $ac_c" 1>&6
11162 else
11163   ac_save_LIBS="$LIBS"
11164 LIBS="-lkrb4 -ldes425 -lkrb5 -l$krb5crypto -lcom_err $LIBS"
11165 cat > conftest.$ac_ext <<EOF
11166 #line 11167 "configure"
11167 #include "confdefs.h"
11168
11169 int main() {
11170 main()
11171 ; return 0; }
11172 EOF
11173 if { (eval echo configure:11174: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11174   rm -rf conftest*
11175   eval "ac_cv_lib_$ac_lib_var=yes"
11176 else
11177   echo "configure: failed program was:" >&5
11178   cat conftest.$ac_ext >&5
11179   rm -rf conftest*
11180   eval "ac_cv_lib_$ac_lib_var=no"
11181 fi
11182 rm -f conftest*
11183 LIBS="$ac_save_LIBS"
11184
11185 fi
11186 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11187   echo "$ac_t""yes" 1>&6
11188   have_k425=yes
11189                                 KRB4_LIBS="-lkrb4 -ldes425"
11190 else
11191   echo "$ac_t""no" 1>&6
11192 have_k425=no
11193 fi
11194
11195
11196                 elif test $krb5_impl = heimdal; then
11197                         echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
11198 echo "configure:11199: checking for main in -lkrb4" >&5
11199 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
11200 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11201   echo $ac_n "(cached) $ac_c" 1>&6
11202 else
11203   ac_save_LIBS="$LIBS"
11204 LIBS="-lkrb4 -lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err $LIBS"
11205 cat > conftest.$ac_ext <<EOF
11206 #line 11207 "configure"
11207 #include "confdefs.h"
11208
11209 int main() {
11210 main()
11211 ; return 0; }
11212 EOF
11213 if { (eval echo configure:11214: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11214   rm -rf conftest*
11215   eval "ac_cv_lib_$ac_lib_var=yes"
11216 else
11217   echo "configure: failed program was:" >&5
11218   cat conftest.$ac_ext >&5
11219   rm -rf conftest*
11220   eval "ac_cv_lib_$ac_lib_var=no"
11221 fi
11222 rm -f conftest*
11223 LIBS="$ac_save_LIBS"
11224
11225 fi
11226 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11227   echo "$ac_t""yes" 1>&6
11228   have_k425=yes
11229                                 KRB4_LIBS="-lkrb4"
11230 else
11231   echo "$ac_t""no" 1>&6
11232 have_k425=no
11233 fi
11234
11235
11236                 else
11237                         have_425=no
11238                         echo "configure: warning: Unrecongized Kerberos V Implementation" 1>&2
11239                 fi
11240
11241                 if test $have_k425 = yes ; then
11242                         ol_with_kerberos=found
11243                         ol_link_krb4=yes
11244
11245                         cat >> confdefs.h <<\EOF
11246 #define HAVE_KRB425 1
11247 EOF
11248
11249                         cat >> confdefs.h <<\EOF
11250 #define HAVE_KRB4 1
11251 EOF
11252
11253
11254                         echo $ac_n "checking for des_debug in Kerberos libraries""... $ac_c" 1>&6
11255 echo "configure:11256: checking for des_debug in Kerberos libraries" >&5
11256 if eval "test \"\${ol_cv_var_des_debug+set}\" = set"; then
11257   echo $ac_n "(cached) $ac_c" 1>&6
11258 else
11259   
11260                                                                 save_LIBS="$LIBS"
11261                                 LIBS="$KRB4_LIBS $KRB5_LIBS $LIBS"
11262                                 cat > conftest.$ac_ext <<EOF
11263 #line 11264 "configure"
11264 #include "confdefs.h"
11265
11266 #include <kerberosIV/krb.h>
11267 #include <kerberosIV/des.h>
11268 extern int des_debug;
11269
11270 int main() {
11271
11272 des_debug = 1;
11273
11274 ; return 0; }
11275 EOF
11276 if { (eval echo configure:11277: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11277   rm -rf conftest*
11278   ol_cv_var_des_debug=yes
11279 else
11280   echo "configure: failed program was:" >&5
11281   cat conftest.$ac_ext >&5
11282   rm -rf conftest*
11283   ol_cv_var_des_debug=no
11284 fi
11285 rm -f conftest*
11286                                                                 LIBS="$save_LIBS"
11287                         
11288 fi
11289
11290 echo "$ac_t""$ol_cv_var_des_debug" 1>&6
11291
11292                         if test $ol_cv_var_des_debug = yes ; then
11293                                 cat >> confdefs.h <<\EOF
11294 #define HAVE_DES_DEBUG 1
11295 EOF
11296
11297                         fi
11298
11299                         LIBS="$save_LIBS"
11300                 fi
11301         fi
11302 fi
11303
11304 if test $ol_link_krb5 = yes ; then
11305         ol_with_kerberos=found
11306 fi
11307
11308 if test $ol_with_kerberos = yes -o $ol_with_kerberos = auto \
11309         -o $ol_with_kerberos = k4 -o $ol_with_kerberos = kth ; then
11310
11311         for ac_hdr in krb.h des.h krb-archaeology.h 
11312 do
11313 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11314 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11315 echo "configure:11316: checking for $ac_hdr" >&5
11316 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11317   echo $ac_n "(cached) $ac_c" 1>&6
11318 else
11319   cat > conftest.$ac_ext <<EOF
11320 #line 11321 "configure"
11321 #include "confdefs.h"
11322 #include <$ac_hdr>
11323 EOF
11324 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11325 { (eval echo configure:11326: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11326 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11327 if test -z "$ac_err"; then
11328   rm -rf conftest*
11329   eval "ac_cv_header_$ac_safe=yes"
11330 else
11331   echo "$ac_err" >&5
11332   echo "configure: failed program was:" >&5
11333   cat conftest.$ac_ext >&5
11334   rm -rf conftest*
11335   eval "ac_cv_header_$ac_safe=no"
11336 fi
11337 rm -f conftest*
11338 fi
11339 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11340   echo "$ac_t""yes" 1>&6
11341     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11342   cat >> confdefs.h <<EOF
11343 #define $ac_tr_hdr 1
11344 EOF
11345  
11346 else
11347   echo "$ac_t""no" 1>&6
11348 fi
11349 done
11350
11351
11352         if test $ac_cv_header_krb_h = yes ; then
11353                 echo $ac_n "checking for main in -lkrb""... $ac_c" 1>&6
11354 echo "configure:11355: checking for main in -lkrb" >&5
11355 ac_lib_var=`echo krb'_'main | sed 'y%./+-:%__p__%'`
11356 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11357   echo $ac_n "(cached) $ac_c" 1>&6
11358 else
11359   ac_save_LIBS="$LIBS"
11360 LIBS="-lkrb -ldes $LIBS"
11361 cat > conftest.$ac_ext <<EOF
11362 #line 11363 "configure"
11363 #include "confdefs.h"
11364
11365 int main() {
11366 main()
11367 ; return 0; }
11368 EOF
11369 if { (eval echo configure:11370: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11370   rm -rf conftest*
11371   eval "ac_cv_lib_$ac_lib_var=yes"
11372 else
11373   echo "configure: failed program was:" >&5
11374   cat conftest.$ac_ext >&5
11375   rm -rf conftest*
11376   eval "ac_cv_lib_$ac_lib_var=no"
11377 fi
11378 rm -f conftest*
11379 LIBS="$ac_save_LIBS"
11380
11381 fi
11382 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11383   echo "$ac_t""yes" 1>&6
11384   have_k4=yes
11385 else
11386   echo "$ac_t""no" 1>&6
11387 have_k4=no
11388 fi
11389
11390
11391                 if test $have_k4 = yes ; then
11392                         ol_with_kerberos=found
11393                         ol_link_krb4=yes
11394
11395                         cat >> confdefs.h <<\EOF
11396 #define HAVE_KRB4 1
11397 EOF
11398
11399
11400                         KRB4_LIBS="-lkrb -ldes"
11401
11402                         if test $ac_cv_header_krb_archaeology_h = yes ; then
11403                                 cat >> confdefs.h <<\EOF
11404 #define HAVE_KTH_KERBEROS 1
11405 EOF
11406
11407                         fi
11408                 fi
11409         fi
11410 fi
11411
11412 if test $ol_link_krb4 = yes -a $ol_enable_kbind != no ; then
11413         ol_link_kbind=yes
11414
11415 elif test $ol_enable_kbind = yes ; then
11416         { echo "configure: error: Kerberos IV detection failed" 1>&2; exit 1; }
11417 fi
11418
11419 if test $ol_link_krb4 = yes -o $ol_link_krb5 = yes ; then
11420         cat >> confdefs.h <<\EOF
11421 #define HAVE_KERBEROS 1
11422 EOF
11423
11424
11425 elif test $ol_with_kerberos != auto -a $ol_with_kerberos != no ; then
11426         { echo "configure: error: Kerberos detection failed" 1>&2; exit 1; }
11427 fi
11428
11429         
11430 ol_link_tls=no
11431 if test $ol_with_tls != no ; then
11432         for ac_hdr in openssl/ssl.h ssl.h
11433 do
11434 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11435 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11436 echo "configure:11437: checking for $ac_hdr" >&5
11437 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11438   echo $ac_n "(cached) $ac_c" 1>&6
11439 else
11440   cat > conftest.$ac_ext <<EOF
11441 #line 11442 "configure"
11442 #include "confdefs.h"
11443 #include <$ac_hdr>
11444 EOF
11445 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11446 { (eval echo configure:11447: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11447 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11448 if test -z "$ac_err"; then
11449   rm -rf conftest*
11450   eval "ac_cv_header_$ac_safe=yes"
11451 else
11452   echo "$ac_err" >&5
11453   echo "configure: failed program was:" >&5
11454   cat conftest.$ac_ext >&5
11455   rm -rf conftest*
11456   eval "ac_cv_header_$ac_safe=no"
11457 fi
11458 rm -f conftest*
11459 fi
11460 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11461   echo "$ac_t""yes" 1>&6
11462     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11463   cat >> confdefs.h <<EOF
11464 #define $ac_tr_hdr 1
11465 EOF
11466  
11467 else
11468   echo "$ac_t""no" 1>&6
11469 fi
11470 done
11471
11472
11473         if test $ac_cv_header_openssl_ssl_h = yes \
11474                 -o $ac_cv_header_ssl_h = yes ; then
11475                 echo $ac_n "checking for SSLeay_add_ssl_algorithms in -lssl""... $ac_c" 1>&6
11476 echo "configure:11477: checking for SSLeay_add_ssl_algorithms in -lssl" >&5
11477 ac_lib_var=`echo ssl'_'SSLeay_add_ssl_algorithms | sed 'y%./+-:%__p__%'`
11478 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11479   echo $ac_n "(cached) $ac_c" 1>&6
11480 else
11481   ac_save_LIBS="$LIBS"
11482 LIBS="-lssl -lcrypto $LIBS"
11483 cat > conftest.$ac_ext <<EOF
11484 #line 11485 "configure"
11485 #include "confdefs.h"
11486 /* Override any gcc2 internal prototype to avoid an error.  */
11487 /* We use char because int might match the return type of a gcc2
11488     builtin and then its argument prototype would still apply.  */
11489 char SSLeay_add_ssl_algorithms();
11490
11491 int main() {
11492 SSLeay_add_ssl_algorithms()
11493 ; return 0; }
11494 EOF
11495 if { (eval echo configure:11496: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11496   rm -rf conftest*
11497   eval "ac_cv_lib_$ac_lib_var=yes"
11498 else
11499   echo "configure: failed program was:" >&5
11500   cat conftest.$ac_ext >&5
11501   rm -rf conftest*
11502   eval "ac_cv_lib_$ac_lib_var=no"
11503 fi
11504 rm -f conftest*
11505 LIBS="$ac_save_LIBS"
11506
11507 fi
11508 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11509   echo "$ac_t""yes" 1>&6
11510   have_ssleay=yes
11511                         need_rsaref=no
11512 else
11513   echo "$ac_t""no" 1>&6
11514 have_ssleay=no
11515 fi
11516
11517                         
11518                 if test $have_ssleay = no ; then
11519                         echo $ac_n "checking for SSL_library_init in -lssl""... $ac_c" 1>&6
11520 echo "configure:11521: checking for SSL_library_init in -lssl" >&5
11521 ac_lib_var=`echo ssl'_'SSL_library_init | sed 'y%./+-:%__p__%'`
11522 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11523   echo $ac_n "(cached) $ac_c" 1>&6
11524 else
11525   ac_save_LIBS="$LIBS"
11526 LIBS="-lssl -lcrypto $LIBS"
11527 cat > conftest.$ac_ext <<EOF
11528 #line 11529 "configure"
11529 #include "confdefs.h"
11530 /* Override any gcc2 internal prototype to avoid an error.  */
11531 /* We use char because int might match the return type of a gcc2
11532     builtin and then its argument prototype would still apply.  */
11533 char SSL_library_init();
11534
11535 int main() {
11536 SSL_library_init()
11537 ; return 0; }
11538 EOF
11539 if { (eval echo configure:11540: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11540   rm -rf conftest*
11541   eval "ac_cv_lib_$ac_lib_var=yes"
11542 else
11543   echo "configure: failed program was:" >&5
11544   cat conftest.$ac_ext >&5
11545   rm -rf conftest*
11546   eval "ac_cv_lib_$ac_lib_var=no"
11547 fi
11548 rm -f conftest*
11549 LIBS="$ac_save_LIBS"
11550
11551 fi
11552 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11553   echo "$ac_t""yes" 1>&6
11554   have_ssleay=yes
11555                                 need_rsaref=no
11556 else
11557   echo "$ac_t""no" 1>&6
11558 have_ssleay=no
11559 fi
11560
11561                 fi
11562
11563                 if test $have_ssleay = no ; then
11564                         echo $ac_n "checking for ssl3_accept in -lssl""... $ac_c" 1>&6
11565 echo "configure:11566: checking for ssl3_accept in -lssl" >&5
11566 ac_lib_var=`echo ssl'_'ssl3_accept | sed 'y%./+-:%__p__%'`
11567 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11568   echo $ac_n "(cached) $ac_c" 1>&6
11569 else
11570   ac_save_LIBS="$LIBS"
11571 LIBS="-lssl -lcrypto -lRSAglue -lrsaref $LIBS"
11572 cat > conftest.$ac_ext <<EOF
11573 #line 11574 "configure"
11574 #include "confdefs.h"
11575 /* Override any gcc2 internal prototype to avoid an error.  */
11576 /* We use char because int might match the return type of a gcc2
11577     builtin and then its argument prototype would still apply.  */
11578 char ssl3_accept();
11579
11580 int main() {
11581 ssl3_accept()
11582 ; return 0; }
11583 EOF
11584 if { (eval echo configure:11585: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11585   rm -rf conftest*
11586   eval "ac_cv_lib_$ac_lib_var=yes"
11587 else
11588   echo "configure: failed program was:" >&5
11589   cat conftest.$ac_ext >&5
11590   rm -rf conftest*
11591   eval "ac_cv_lib_$ac_lib_var=no"
11592 fi
11593 rm -f conftest*
11594 LIBS="$ac_save_LIBS"
11595
11596 fi
11597 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11598   echo "$ac_t""yes" 1>&6
11599   have_ssleay=yes
11600                                 need_rsaref=yes
11601 else
11602   echo "$ac_t""no" 1>&6
11603 have_ssleay=no
11604 fi
11605
11606                 fi
11607
11608                 if test $have_ssleay = yes ; then
11609                         ol_with_tls=found
11610                         ol_link_tls=yes
11611
11612                         cat >> confdefs.h <<\EOF
11613 #define HAVE_SSLEAY 1
11614 EOF
11615
11616
11617                         if test $need_rsaref = yes; then
11618                                 cat >> confdefs.h <<\EOF
11619 #define HAVE_RSAREF 1
11620 EOF
11621
11622
11623                                 TLS_LIBS="-lssl -lcrypto -lRSAglue -lrsaref"
11624                         else
11625                                 TLS_LIBS="-lssl -lcrypto"
11626                         fi
11627                 fi
11628                 echo $ac_n "checking OpenSSL library version (CRL checking capability)""... $ac_c" 1>&6
11629 echo "configure:11630: checking OpenSSL library version (CRL checking capability)" >&5
11630 if eval "test \"\${ol_cv_ssl_crl_compat+set}\" = set"; then
11631   echo $ac_n "(cached) $ac_c" 1>&6
11632 else
11633   
11634         cat > conftest.$ac_ext <<EOF
11635 #line 11636 "configure"
11636 #include "confdefs.h"
11637
11638 #ifdef HAVE_OPENSSL_SSL_H
11639 #include <openssl/ssl.h>
11640 #else
11641 #include <ssl.h>
11642 #endif
11643
11644 /* Require 0.9.7d+ */
11645 #if OPENSSL_VERSION_NUMBER >= 0x0090704fL
11646         char *__ssl_compat = "0.9.7d";
11647 #endif
11648         
11649 EOF
11650 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11651   egrep "__ssl_compat" >/dev/null 2>&1; then
11652   rm -rf conftest*
11653   ol_cv_ssl_crl_compat=yes
11654 else
11655   rm -rf conftest*
11656   ol_cv_ssl_crl_compat=no
11657 fi
11658 rm -f conftest*
11659
11660 fi
11661
11662 echo "$ac_t""$ol_cv_ssl_crl_compat" 1>&6
11663
11664                 if test $ol_cv_ssl_crl_compat = no ; then
11665                         ol_link_ssl=no
11666                 else 
11667                         cat >> confdefs.h <<\EOF
11668 #define HAVE_OPENSSL_CRL 1
11669 EOF
11670
11671                 fi
11672         fi
11673
11674 else
11675         echo "configure: warning: TLS data protection not supported!" 1>&2
11676 fi
11677
11678 WITH_TLS=no
11679 if test $ol_link_tls = yes ; then
11680         cat >> confdefs.h <<\EOF
11681 #define HAVE_TLS 1
11682 EOF
11683
11684         WITH_TLS=yes
11685
11686 elif test $ol_with_tls = auto ; then
11687         echo "configure: warning: Could not locate TLS/SSL package" 1>&2
11688         echo "configure: warning: TLS data protection not supported!" 1>&2
11689
11690 elif test $ol_with_tls != no ; then
11691         { echo "configure: error: Could not locate TLS/SSL package" 1>&2; exit 1; }
11692 fi
11693
11694 if test $ol_enable_lmpasswd != no; then
11695         if test $ol_link_tls != yes ; then
11696                 { echo "configure: error: LAN Manager passwords require OpenSSL" 1>&2; exit 1; }
11697         fi
11698
11699         cat >> confdefs.h <<\EOF
11700 #define SLAPD_LMHASH 1
11701 EOF
11702
11703 fi
11704
11705 ol_link_threads=no
11706
11707 if test $ol_with_threads = auto -o $ol_with_threads = yes \
11708         -o $ol_with_threads = nt ; then
11709
11710         
11711         echo $ac_n "checking for _beginthread""... $ac_c" 1>&6
11712 echo "configure:11713: checking for _beginthread" >&5
11713 if eval "test \"\${ac_cv_func__beginthread+set}\" = set"; then
11714   echo $ac_n "(cached) $ac_c" 1>&6
11715 else
11716   cat > conftest.$ac_ext <<EOF
11717 #line 11718 "configure"
11718 #include "confdefs.h"
11719 /* System header to define __stub macros and hopefully few prototypes,
11720     which can conflict with char _beginthread(); below.  */
11721 #include <assert.h>
11722 /* Override any gcc2 internal prototype to avoid an error.  */
11723 /* We use char because int might match the return type of a gcc2
11724     builtin and then its argument prototype would still apply.  */
11725 char _beginthread();
11726 char (*f)();
11727
11728 int main() {
11729
11730 /* The GNU C library defines this for functions which it implements
11731     to always fail with ENOSYS.  Some functions are actually named
11732     something starting with __ and the normal name is an alias.  */
11733 #if defined (__stub__beginthread) || defined (__stub____beginthread)
11734 choke me
11735 #else
11736 f = _beginthread;
11737 #endif
11738
11739 ; return 0; }
11740 EOF
11741 if { (eval echo configure:11742: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11742   rm -rf conftest*
11743   eval "ac_cv_func__beginthread=yes"
11744 else
11745   echo "configure: failed program was:" >&5
11746   cat conftest.$ac_ext >&5
11747   rm -rf conftest*
11748   eval "ac_cv_func__beginthread=no"
11749 fi
11750 rm -f conftest*
11751 fi
11752
11753 if eval "test \"`echo '$ac_cv_func_'_beginthread`\" = yes"; then
11754   echo "$ac_t""yes" 1>&6
11755   :
11756 else
11757   echo "$ac_t""no" 1>&6
11758 fi
11759
11760
11761         if test $ac_cv_func__beginthread = yes ; then
11762                 cat >> confdefs.h <<\EOF
11763 #define HAVE_NT_THREADS 1
11764 EOF
11765
11766                 ol_cv_nt_threads=yes
11767         fi
11768
11769
11770         if test "$ol_cv_nt_threads" = yes ; then
11771                 ol_link_threads=nt
11772                 ol_with_threads=found
11773                 ol_with_yielding_select=yes
11774
11775                 cat >> confdefs.h <<\EOF
11776 #define HAVE_NT_SERVICE_MANAGER 1
11777 EOF
11778
11779                 cat >> confdefs.h <<\EOF
11780 #define HAVE_NT_EVENT_LOG 1
11781 EOF
11782
11783         fi
11784
11785         if test $ol_with_threads = nt ; then
11786                 { echo "configure: error: could not locate NT Threads" 1>&2; exit 1; }
11787         fi
11788 fi
11789
11790 if test $ol_with_threads = auto -o $ol_with_threads = yes \
11791         -o $ol_with_threads = posix ; then
11792
11793         for ac_hdr in pthread.h
11794 do
11795 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11796 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11797 echo "configure:11798: checking for $ac_hdr" >&5
11798 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11799   echo $ac_n "(cached) $ac_c" 1>&6
11800 else
11801   cat > conftest.$ac_ext <<EOF
11802 #line 11803 "configure"
11803 #include "confdefs.h"
11804 #include <$ac_hdr>
11805 EOF
11806 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11807 { (eval echo configure:11808: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11808 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11809 if test -z "$ac_err"; then
11810   rm -rf conftest*
11811   eval "ac_cv_header_$ac_safe=yes"
11812 else
11813   echo "$ac_err" >&5
11814   echo "configure: failed program was:" >&5
11815   cat conftest.$ac_ext >&5
11816   rm -rf conftest*
11817   eval "ac_cv_header_$ac_safe=no"
11818 fi
11819 rm -f conftest*
11820 fi
11821 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11822   echo "$ac_t""yes" 1>&6
11823     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11824   cat >> confdefs.h <<EOF
11825 #define $ac_tr_hdr 1
11826 EOF
11827  
11828 else
11829   echo "$ac_t""no" 1>&6
11830 fi
11831 done
11832
11833
11834         if test $ac_cv_header_pthread_h = yes ; then
11835                 echo $ac_n "checking POSIX thread version""... $ac_c" 1>&6
11836 echo "configure:11837: checking POSIX thread version" >&5
11837 if eval "test \"\${ol_cv_pthread_version+set}\" = set"; then
11838   echo $ac_n "(cached) $ac_c" 1>&6
11839 else
11840   
11841         cat > conftest.$ac_ext <<EOF
11842 #line 11843 "configure"
11843 #include "confdefs.h"
11844
11845 #               include <pthread.h>
11846         
11847 int main() {
11848
11849                 int i = PTHREAD_CREATE_JOINABLE;
11850         
11851 ; return 0; }
11852 EOF
11853 if { (eval echo configure:11854: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11854   rm -rf conftest*
11855   
11856         cat > conftest.$ac_ext <<EOF
11857 #line 11858 "configure"
11858 #include "confdefs.h"
11859 #include <pthread.h>
11860 EOF
11861 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11862   egrep "pthread_detach" >/dev/null 2>&1; then
11863   rm -rf conftest*
11864   ol_cv_pthread_version=10
11865 else
11866   rm -rf conftest*
11867   ol_cv_pthread_version=8
11868 fi
11869 rm -f conftest*
11870
11871 else
11872   echo "configure: failed program was:" >&5
11873   cat conftest.$ac_ext >&5
11874   rm -rf conftest*
11875   
11876         cat > conftest.$ac_ext <<EOF
11877 #line 11878 "configure"
11878 #include "confdefs.h"
11879
11880 #               include <pthread.h>
11881 #               ifdef PTHREAD_CREATE_UNDETACHED
11882                 draft7
11883 #               endif
11884         
11885 EOF
11886 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11887   egrep "draft7" >/dev/null 2>&1; then
11888   rm -rf conftest*
11889   ol_cv_pthread_version=7
11890 else
11891   rm -rf conftest*
11892   
11893         cat > conftest.$ac_ext <<EOF
11894 #line 11895 "configure"
11895 #include "confdefs.h"
11896 #include <pthread.h>
11897 EOF
11898 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11899   egrep "pthread_attr_init" >/dev/null 2>&1; then
11900   rm -rf conftest*
11901   ol_cv_pthread_version=6
11902 else
11903   rm -rf conftest*
11904   
11905         cat > conftest.$ac_ext <<EOF
11906 #line 11907 "configure"
11907 #include "confdefs.h"
11908
11909 #               include <pthread.h>
11910 #ifdef          PTHREAD_MUTEX_INITIALIZER
11911                 draft5
11912 #endif
11913         
11914 EOF
11915 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11916   egrep "draft5" >/dev/null 2>&1; then
11917   rm -rf conftest*
11918   ol_cv_pthread_version=5
11919 else
11920   rm -rf conftest*
11921   ol_cv_pthread_version=4
11922 fi
11923 rm -f conftest*
11924  
11925 fi
11926 rm -f conftest*
11927  
11928 fi
11929 rm -f conftest*
11930  
11931 fi
11932 rm -f conftest*
11933
11934 fi
11935
11936 echo "$ac_t""$ol_cv_pthread_version" 1>&6
11937
11938
11939                 if test $ol_cv_pthread_version != 0 ; then
11940                         cat >> confdefs.h <<EOF
11941 #define HAVE_PTHREADS $ol_cv_pthread_version
11942 EOF
11943
11944                 else
11945                         { echo "configure: error: unknown pthread version" 1>&2; exit 1; }
11946                 fi
11947
11948                 # consider threads found
11949                 ol_with_threads=found
11950
11951                 
11952         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
11953 echo "configure:11954: checking for LinuxThreads pthread.h" >&5
11954 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
11955   echo $ac_n "(cached) $ac_c" 1>&6
11956 else
11957   cat > conftest.$ac_ext <<EOF
11958 #line 11959 "configure"
11959 #include "confdefs.h"
11960 #include <pthread.h>
11961 EOF
11962 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11963   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
11964   rm -rf conftest*
11965   ol_cv_header_linux_threads=yes
11966 else
11967   rm -rf conftest*
11968   ol_cv_header_linux_threads=no
11969 fi
11970 rm -f conftest*
11971
11972                 
11973 fi
11974
11975 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
11976         if test $ol_cv_header_linux_threads = yes; then
11977                 cat >> confdefs.h <<\EOF
11978 #define HAVE_LINUX_THREADS 1
11979 EOF
11980
11981         fi
11982
11983                 
11984         echo $ac_n "checking for GNU Pth pthread.h""... $ac_c" 1>&6
11985 echo "configure:11986: checking for GNU Pth pthread.h" >&5
11986 if eval "test \"\${ol_cv_header_gnu_pth_pthread_h+set}\" = set"; then
11987   echo $ac_n "(cached) $ac_c" 1>&6
11988 else
11989   cat > conftest.$ac_ext <<EOF
11990 #line 11991 "configure"
11991 #include "confdefs.h"
11992 #include <pthread.h>
11993 #ifdef _POSIX_THREAD_IS_GNU_PTH
11994         __gnu_pth__;
11995 #endif
11996
11997 EOF
11998 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11999   egrep "__gnu_pth__" >/dev/null 2>&1; then
12000   rm -rf conftest*
12001   ol_cv_header_gnu_pth_pthread_h=yes
12002 else
12003   rm -rf conftest*
12004   ol_cv_header_gnu_pth_pthread_h=no
12005 fi
12006 rm -f conftest*
12007
12008                 
12009 fi
12010
12011 echo "$ac_t""$ol_cv_header_gnu_pth_pthread_h" 1>&6
12012
12013
12014                 if test $ol_cv_header_gnu_pth_pthread_h = no ; then
12015                         for ac_hdr in sched.h
12016 do
12017 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12018 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12019 echo "configure:12020: checking for $ac_hdr" >&5
12020 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12021   echo $ac_n "(cached) $ac_c" 1>&6
12022 else
12023   cat > conftest.$ac_ext <<EOF
12024 #line 12025 "configure"
12025 #include "confdefs.h"
12026 #include <$ac_hdr>
12027 EOF
12028 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12029 { (eval echo configure:12030: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12030 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12031 if test -z "$ac_err"; then
12032   rm -rf conftest*
12033   eval "ac_cv_header_$ac_safe=yes"
12034 else
12035   echo "$ac_err" >&5
12036   echo "configure: failed program was:" >&5
12037   cat conftest.$ac_ext >&5
12038   rm -rf conftest*
12039   eval "ac_cv_header_$ac_safe=no"
12040 fi
12041 rm -f conftest*
12042 fi
12043 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12044   echo "$ac_t""yes" 1>&6
12045     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12046   cat >> confdefs.h <<EOF
12047 #define $ac_tr_hdr 1
12048 EOF
12049  
12050 else
12051   echo "$ac_t""no" 1>&6
12052 fi
12053 done
12054
12055                 fi
12056
12057                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
12058                                 echo $ac_n "checking for pthread_create in default libraries""... $ac_c" 1>&6
12059 echo "configure:12060: checking for pthread_create in default libraries" >&5
12060 if eval "test \"\${ol_cv_pthread_create+set}\" = set"; then
12061   echo $ac_n "(cached) $ac_c" 1>&6
12062 else
12063   
12064                 if test "$cross_compiling" = yes; then
12065   cat > conftest.$ac_ext <<EOF
12066 #line 12067 "configure"
12067 #include "confdefs.h"
12068 /* pthread test headers */
12069 #include <pthread.h>
12070 #if HAVE_PTHREADS < 7
12071 #include <errno.h>
12072 #endif
12073 #ifndef NULL
12074 #define NULL (void*)0
12075 #endif
12076
12077 static void *task(p)
12078         void *p;
12079 {
12080         return (void *) (p == NULL);
12081 }
12082
12083 int main() {
12084
12085         /* pthread test function */
12086 #ifndef PTHREAD_CREATE_DETACHED
12087 #define PTHREAD_CREATE_DETACHED 1
12088 #endif
12089         pthread_t t;
12090         int status;
12091         int detach = PTHREAD_CREATE_DETACHED;
12092
12093 #if HAVE_PTHREADS > 4
12094         /* Final pthreads */
12095         pthread_attr_t attr;
12096
12097         status = pthread_attr_init(&attr);
12098         if( status ) return status;
12099
12100 #if HAVE_PTHREADS < 7
12101         status = pthread_attr_setdetachstate(&attr, &detach);
12102         if( status < 0 ) status = errno;
12103 #else
12104         status = pthread_attr_setdetachstate(&attr, detach);
12105 #endif
12106         if( status ) return status;
12107         status = pthread_create( &t, &attr, task, NULL );
12108 #if HAVE_PTHREADS < 7
12109         if( status < 0 ) status = errno;
12110 #endif
12111         if( status ) return status;
12112 #else
12113         /* Draft 4 pthreads */
12114         status = pthread_create( &t, pthread_attr_default, task, NULL );
12115         if( status ) return errno;
12116
12117         /* give thread a chance to complete */
12118         /* it should remain joinable and hence detachable */
12119         sleep( 1 );
12120
12121         status = pthread_detach( &t );
12122         if( status ) return errno;
12123 #endif
12124
12125 #ifdef HAVE_LINUX_THREADS
12126         pthread_kill_other_threads_np();
12127 #endif
12128
12129         return 0;
12130
12131 ; return 0; }
12132 EOF
12133 if { (eval echo configure:12134: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12134   rm -rf conftest*
12135   ol_cv_pthread_create=yes
12136 else
12137   echo "configure: failed program was:" >&5
12138   cat conftest.$ac_ext >&5
12139   rm -rf conftest*
12140   ol_cv_pthread_create=no
12141 fi
12142 rm -f conftest*
12143 else
12144   cat > conftest.$ac_ext <<EOF
12145 #line 12146 "configure"
12146 #include "confdefs.h"
12147 /* pthread test headers */
12148 #include <pthread.h>
12149 #if HAVE_PTHREADS < 7
12150 #include <errno.h>
12151 #endif
12152 #ifndef NULL
12153 #define NULL (void*)0
12154 #endif
12155
12156 static void *task(p)
12157         void *p;
12158 {
12159         return (void *) (p == NULL);
12160 }
12161
12162
12163 int main(argc, argv)
12164         int argc;
12165         char **argv;
12166 {
12167
12168         /* pthread test function */
12169 #ifndef PTHREAD_CREATE_DETACHED
12170 #define PTHREAD_CREATE_DETACHED 1
12171 #endif
12172         pthread_t t;
12173         int status;
12174         int detach = PTHREAD_CREATE_DETACHED;
12175
12176 #if HAVE_PTHREADS > 4
12177         /* Final pthreads */
12178         pthread_attr_t attr;
12179
12180         status = pthread_attr_init(&attr);
12181         if( status ) return status;
12182
12183 #if HAVE_PTHREADS < 7
12184         status = pthread_attr_setdetachstate(&attr, &detach);
12185         if( status < 0 ) status = errno;
12186 #else
12187         status = pthread_attr_setdetachstate(&attr, detach);
12188 #endif
12189         if( status ) return status;
12190         status = pthread_create( &t, &attr, task, NULL );
12191 #if HAVE_PTHREADS < 7
12192         if( status < 0 ) status = errno;
12193 #endif
12194         if( status ) return status;
12195 #else
12196         /* Draft 4 pthreads */
12197         status = pthread_create( &t, pthread_attr_default, task, NULL );
12198         if( status ) return errno;
12199
12200         /* give thread a chance to complete */
12201         /* it should remain joinable and hence detachable */
12202         sleep( 1 );
12203
12204         status = pthread_detach( &t );
12205         if( status ) return errno;
12206 #endif
12207
12208 #ifdef HAVE_LINUX_THREADS
12209         pthread_kill_other_threads_np();
12210 #endif
12211
12212         return 0;
12213
12214 }
12215
12216 EOF
12217 if { (eval echo configure:12218: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
12218 then
12219   ol_cv_pthread_create=yes
12220 else
12221   echo "configure: failed program was:" >&5
12222   cat conftest.$ac_ext >&5
12223   rm -fr conftest*
12224   ol_cv_pthread_create=no
12225 fi
12226 rm -fr conftest*
12227 fi
12228
12229 fi
12230
12231 echo "$ac_t""$ol_cv_pthread_create" 1>&6
12232
12233                 if test $ol_cv_pthread_create != no ; then
12234                         ol_link_threads=posix
12235                         ol_link_pthreads=""
12236                 fi
12237                 
12238                 # Pthread try link: -kthread (ol_cv_pthread_kthread)
12239 if test "$ol_link_threads" = no ; then
12240         # try -kthread
12241         echo $ac_n "checking for pthread link with -kthread""... $ac_c" 1>&6
12242 echo "configure:12243: checking for pthread link with -kthread" >&5
12243 if eval "test \"\${ol_cv_pthread_kthread+set}\" = set"; then
12244   echo $ac_n "(cached) $ac_c" 1>&6
12245 else
12246   
12247                 # save the flags
12248                 ol_LIBS="$LIBS"
12249                 LIBS="-kthread $LIBS"
12250
12251                 if test "$cross_compiling" = yes; then
12252   cat > conftest.$ac_ext <<EOF
12253 #line 12254 "configure"
12254 #include "confdefs.h"
12255 /* pthread test headers */
12256 #include <pthread.h>
12257 #if HAVE_PTHREADS < 7
12258 #include <errno.h>
12259 #endif
12260 #ifndef NULL
12261 #define NULL (void*)0
12262 #endif
12263
12264 static void *task(p)
12265         void *p;
12266 {
12267         return (void *) (p == NULL);
12268 }
12269
12270 int main() {
12271
12272         /* pthread test function */
12273 #ifndef PTHREAD_CREATE_DETACHED
12274 #define PTHREAD_CREATE_DETACHED 1
12275 #endif
12276         pthread_t t;
12277         int status;
12278         int detach = PTHREAD_CREATE_DETACHED;
12279
12280 #if HAVE_PTHREADS > 4
12281         /* Final pthreads */
12282         pthread_attr_t attr;
12283
12284         status = pthread_attr_init(&attr);
12285         if( status ) return status;
12286
12287 #if HAVE_PTHREADS < 7
12288         status = pthread_attr_setdetachstate(&attr, &detach);
12289         if( status < 0 ) status = errno;
12290 #else
12291         status = pthread_attr_setdetachstate(&attr, detach);
12292 #endif
12293         if( status ) return status;
12294         status = pthread_create( &t, &attr, task, NULL );
12295 #if HAVE_PTHREADS < 7
12296         if( status < 0 ) status = errno;
12297 #endif
12298         if( status ) return status;
12299 #else
12300         /* Draft 4 pthreads */
12301         status = pthread_create( &t, pthread_attr_default, task, NULL );
12302         if( status ) return errno;
12303
12304         /* give thread a chance to complete */
12305         /* it should remain joinable and hence detachable */
12306         sleep( 1 );
12307
12308         status = pthread_detach( &t );
12309         if( status ) return errno;
12310 #endif
12311
12312 #ifdef HAVE_LINUX_THREADS
12313         pthread_kill_other_threads_np();
12314 #endif
12315
12316         return 0;
12317
12318 ; return 0; }
12319 EOF
12320 if { (eval echo configure:12321: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12321   rm -rf conftest*
12322   ol_cv_pthread_kthread=yes
12323 else
12324   echo "configure: failed program was:" >&5
12325   cat conftest.$ac_ext >&5
12326   rm -rf conftest*
12327   ol_cv_pthread_kthread=no
12328 fi
12329 rm -f conftest*
12330 else
12331   cat > conftest.$ac_ext <<EOF
12332 #line 12333 "configure"
12333 #include "confdefs.h"
12334 /* pthread test headers */
12335 #include <pthread.h>
12336 #if HAVE_PTHREADS < 7
12337 #include <errno.h>
12338 #endif
12339 #ifndef NULL
12340 #define NULL (void*)0
12341 #endif
12342
12343 static void *task(p)
12344         void *p;
12345 {
12346         return (void *) (p == NULL);
12347 }
12348
12349
12350 int main(argc, argv)
12351         int argc;
12352         char **argv;
12353 {
12354
12355         /* pthread test function */
12356 #ifndef PTHREAD_CREATE_DETACHED
12357 #define PTHREAD_CREATE_DETACHED 1
12358 #endif
12359         pthread_t t;
12360         int status;
12361         int detach = PTHREAD_CREATE_DETACHED;
12362
12363 #if HAVE_PTHREADS > 4
12364         /* Final pthreads */
12365         pthread_attr_t attr;
12366
12367         status = pthread_attr_init(&attr);
12368         if( status ) return status;
12369
12370 #if HAVE_PTHREADS < 7
12371         status = pthread_attr_setdetachstate(&attr, &detach);
12372         if( status < 0 ) status = errno;
12373 #else
12374         status = pthread_attr_setdetachstate(&attr, detach);
12375 #endif
12376         if( status ) return status;
12377         status = pthread_create( &t, &attr, task, NULL );
12378 #if HAVE_PTHREADS < 7
12379         if( status < 0 ) status = errno;
12380 #endif
12381         if( status ) return status;
12382 #else
12383         /* Draft 4 pthreads */
12384         status = pthread_create( &t, pthread_attr_default, task, NULL );
12385         if( status ) return errno;
12386
12387         /* give thread a chance to complete */
12388         /* it should remain joinable and hence detachable */
12389         sleep( 1 );
12390
12391         status = pthread_detach( &t );
12392         if( status ) return errno;
12393 #endif
12394
12395 #ifdef HAVE_LINUX_THREADS
12396         pthread_kill_other_threads_np();
12397 #endif
12398
12399         return 0;
12400
12401 }
12402
12403 EOF
12404 if { (eval echo configure:12405: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
12405 then
12406   ol_cv_pthread_kthread=yes
12407 else
12408   echo "configure: failed program was:" >&5
12409   cat conftest.$ac_ext >&5
12410   rm -fr conftest*
12411   ol_cv_pthread_kthread=no
12412 fi
12413 rm -fr conftest*
12414 fi
12415
12416
12417                 # restore the LIBS
12418                 LIBS="$ol_LIBS"
12419         
12420 fi
12421
12422 echo "$ac_t""$ol_cv_pthread_kthread" 1>&6
12423
12424         if test $ol_cv_pthread_kthread = yes ; then
12425                 ol_link_pthreads="-kthread"
12426                 ol_link_threads=posix
12427         fi
12428 fi
12429
12430                 # Pthread try link: -pthread (ol_cv_pthread_pthread)
12431 if test "$ol_link_threads" = no ; then
12432         # try -pthread
12433         echo $ac_n "checking for pthread link with -pthread""... $ac_c" 1>&6
12434 echo "configure:12435: checking for pthread link with -pthread" >&5
12435 if eval "test \"\${ol_cv_pthread_pthread+set}\" = set"; then
12436   echo $ac_n "(cached) $ac_c" 1>&6
12437 else
12438   
12439                 # save the flags
12440                 ol_LIBS="$LIBS"
12441                 LIBS="-pthread $LIBS"
12442
12443                 if test "$cross_compiling" = yes; then
12444   cat > conftest.$ac_ext <<EOF
12445 #line 12446 "configure"
12446 #include "confdefs.h"
12447 /* pthread test headers */
12448 #include <pthread.h>
12449 #if HAVE_PTHREADS < 7
12450 #include <errno.h>
12451 #endif
12452 #ifndef NULL
12453 #define NULL (void*)0
12454 #endif
12455
12456 static void *task(p)
12457         void *p;
12458 {
12459         return (void *) (p == NULL);
12460 }
12461
12462 int main() {
12463
12464         /* pthread test function */
12465 #ifndef PTHREAD_CREATE_DETACHED
12466 #define PTHREAD_CREATE_DETACHED 1
12467 #endif
12468         pthread_t t;
12469         int status;
12470         int detach = PTHREAD_CREATE_DETACHED;
12471
12472 #if HAVE_PTHREADS > 4
12473         /* Final pthreads */
12474         pthread_attr_t attr;
12475
12476         status = pthread_attr_init(&attr);
12477         if( status ) return status;
12478
12479 #if HAVE_PTHREADS < 7
12480         status = pthread_attr_setdetachstate(&attr, &detach);
12481         if( status < 0 ) status = errno;
12482 #else
12483         status = pthread_attr_setdetachstate(&attr, detach);
12484 #endif
12485         if( status ) return status;
12486         status = pthread_create( &t, &attr, task, NULL );
12487 #if HAVE_PTHREADS < 7
12488         if( status < 0 ) status = errno;
12489 #endif
12490         if( status ) return status;
12491 #else
12492         /* Draft 4 pthreads */
12493         status = pthread_create( &t, pthread_attr_default, task, NULL );
12494         if( status ) return errno;
12495
12496         /* give thread a chance to complete */
12497         /* it should remain joinable and hence detachable */
12498         sleep( 1 );
12499
12500         status = pthread_detach( &t );
12501         if( status ) return errno;
12502 #endif
12503
12504 #ifdef HAVE_LINUX_THREADS
12505         pthread_kill_other_threads_np();
12506 #endif
12507
12508         return 0;
12509
12510 ; return 0; }
12511 EOF
12512 if { (eval echo configure:12513: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12513   rm -rf conftest*
12514   ol_cv_pthread_pthread=yes
12515 else
12516   echo "configure: failed program was:" >&5
12517   cat conftest.$ac_ext >&5
12518   rm -rf conftest*
12519   ol_cv_pthread_pthread=no
12520 fi
12521 rm -f conftest*
12522 else
12523   cat > conftest.$ac_ext <<EOF
12524 #line 12525 "configure"
12525 #include "confdefs.h"
12526 /* pthread test headers */
12527 #include <pthread.h>
12528 #if HAVE_PTHREADS < 7
12529 #include <errno.h>
12530 #endif
12531 #ifndef NULL
12532 #define NULL (void*)0
12533 #endif
12534
12535 static void *task(p)
12536         void *p;
12537 {
12538         return (void *) (p == NULL);
12539 }
12540
12541
12542 int main(argc, argv)
12543         int argc;
12544         char **argv;
12545 {
12546
12547         /* pthread test function */
12548 #ifndef PTHREAD_CREATE_DETACHED
12549 #define PTHREAD_CREATE_DETACHED 1
12550 #endif
12551         pthread_t t;
12552         int status;
12553         int detach = PTHREAD_CREATE_DETACHED;
12554
12555 #if HAVE_PTHREADS > 4
12556         /* Final pthreads */
12557         pthread_attr_t attr;
12558
12559         status = pthread_attr_init(&attr);
12560         if( status ) return status;
12561
12562 #if HAVE_PTHREADS < 7
12563         status = pthread_attr_setdetachstate(&attr, &detach);
12564         if( status < 0 ) status = errno;
12565 #else
12566         status = pthread_attr_setdetachstate(&attr, detach);
12567 #endif
12568         if( status ) return status;
12569         status = pthread_create( &t, &attr, task, NULL );
12570 #if HAVE_PTHREADS < 7
12571         if( status < 0 ) status = errno;
12572 #endif
12573         if( status ) return status;
12574 #else
12575         /* Draft 4 pthreads */
12576         status = pthread_create( &t, pthread_attr_default, task, NULL );
12577         if( status ) return errno;
12578
12579         /* give thread a chance to complete */
12580         /* it should remain joinable and hence detachable */
12581         sleep( 1 );
12582
12583         status = pthread_detach( &t );
12584         if( status ) return errno;
12585 #endif
12586
12587 #ifdef HAVE_LINUX_THREADS
12588         pthread_kill_other_threads_np();
12589 #endif
12590
12591         return 0;
12592
12593 }
12594
12595 EOF
12596 if { (eval echo configure:12597: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
12597 then
12598   ol_cv_pthread_pthread=yes
12599 else
12600   echo "configure: failed program was:" >&5
12601   cat conftest.$ac_ext >&5
12602   rm -fr conftest*
12603   ol_cv_pthread_pthread=no
12604 fi
12605 rm -fr conftest*
12606 fi
12607
12608
12609                 # restore the LIBS
12610                 LIBS="$ol_LIBS"
12611         
12612 fi
12613
12614 echo "$ac_t""$ol_cv_pthread_pthread" 1>&6
12615
12616         if test $ol_cv_pthread_pthread = yes ; then
12617                 ol_link_pthreads="-pthread"
12618                 ol_link_threads=posix
12619         fi
12620 fi
12621
12622                 # Pthread try link: -pthreads (ol_cv_pthread_pthreads)
12623 if test "$ol_link_threads" = no ; then
12624         # try -pthreads
12625         echo $ac_n "checking for pthread link with -pthreads""... $ac_c" 1>&6
12626 echo "configure:12627: checking for pthread link with -pthreads" >&5
12627 if eval "test \"\${ol_cv_pthread_pthreads+set}\" = set"; then
12628   echo $ac_n "(cached) $ac_c" 1>&6
12629 else
12630   
12631                 # save the flags
12632                 ol_LIBS="$LIBS"
12633                 LIBS="-pthreads $LIBS"
12634
12635                 if test "$cross_compiling" = yes; then
12636   cat > conftest.$ac_ext <<EOF
12637 #line 12638 "configure"
12638 #include "confdefs.h"
12639 /* pthread test headers */
12640 #include <pthread.h>
12641 #if HAVE_PTHREADS < 7
12642 #include <errno.h>
12643 #endif
12644 #ifndef NULL
12645 #define NULL (void*)0
12646 #endif
12647
12648 static void *task(p)
12649         void *p;
12650 {
12651         return (void *) (p == NULL);
12652 }
12653
12654 int main() {
12655
12656         /* pthread test function */
12657 #ifndef PTHREAD_CREATE_DETACHED
12658 #define PTHREAD_CREATE_DETACHED 1
12659 #endif
12660         pthread_t t;
12661         int status;
12662         int detach = PTHREAD_CREATE_DETACHED;
12663
12664 #if HAVE_PTHREADS > 4
12665         /* Final pthreads */
12666         pthread_attr_t attr;
12667
12668         status = pthread_attr_init(&attr);
12669         if( status ) return status;
12670
12671 #if HAVE_PTHREADS < 7
12672         status = pthread_attr_setdetachstate(&attr, &detach);
12673         if( status < 0 ) status = errno;
12674 #else
12675         status = pthread_attr_setdetachstate(&attr, detach);
12676 #endif
12677         if( status ) return status;
12678         status = pthread_create( &t, &attr, task, NULL );
12679 #if HAVE_PTHREADS < 7
12680         if( status < 0 ) status = errno;
12681 #endif
12682         if( status ) return status;
12683 #else
12684         /* Draft 4 pthreads */
12685         status = pthread_create( &t, pthread_attr_default, task, NULL );
12686         if( status ) return errno;
12687
12688         /* give thread a chance to complete */
12689         /* it should remain joinable and hence detachable */
12690         sleep( 1 );
12691
12692         status = pthread_detach( &t );
12693         if( status ) return errno;
12694 #endif
12695
12696 #ifdef HAVE_LINUX_THREADS
12697         pthread_kill_other_threads_np();
12698 #endif
12699
12700         return 0;
12701
12702 ; return 0; }
12703 EOF
12704 if { (eval echo configure:12705: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12705   rm -rf conftest*
12706   ol_cv_pthread_pthreads=yes
12707 else
12708   echo "configure: failed program was:" >&5
12709   cat conftest.$ac_ext >&5
12710   rm -rf conftest*
12711   ol_cv_pthread_pthreads=no
12712 fi
12713 rm -f conftest*
12714 else
12715   cat > conftest.$ac_ext <<EOF
12716 #line 12717 "configure"
12717 #include "confdefs.h"
12718 /* pthread test headers */
12719 #include <pthread.h>
12720 #if HAVE_PTHREADS < 7
12721 #include <errno.h>
12722 #endif
12723 #ifndef NULL
12724 #define NULL (void*)0
12725 #endif
12726
12727 static void *task(p)
12728         void *p;
12729 {
12730         return (void *) (p == NULL);
12731 }
12732
12733
12734 int main(argc, argv)
12735         int argc;
12736         char **argv;
12737 {
12738
12739         /* pthread test function */
12740 #ifndef PTHREAD_CREATE_DETACHED
12741 #define PTHREAD_CREATE_DETACHED 1
12742 #endif
12743         pthread_t t;
12744         int status;
12745         int detach = PTHREAD_CREATE_DETACHED;
12746
12747 #if HAVE_PTHREADS > 4
12748         /* Final pthreads */
12749         pthread_attr_t attr;
12750
12751         status = pthread_attr_init(&attr);
12752         if( status ) return status;
12753
12754 #if HAVE_PTHREADS < 7
12755         status = pthread_attr_setdetachstate(&attr, &detach);
12756         if( status < 0 ) status = errno;
12757 #else
12758         status = pthread_attr_setdetachstate(&attr, detach);
12759 #endif
12760         if( status ) return status;
12761         status = pthread_create( &t, &attr, task, NULL );
12762 #if HAVE_PTHREADS < 7
12763         if( status < 0 ) status = errno;
12764 #endif
12765         if( status ) return status;
12766 #else
12767         /* Draft 4 pthreads */
12768         status = pthread_create( &t, pthread_attr_default, task, NULL );
12769         if( status ) return errno;
12770
12771         /* give thread a chance to complete */
12772         /* it should remain joinable and hence detachable */
12773         sleep( 1 );
12774
12775         status = pthread_detach( &t );
12776         if( status ) return errno;
12777 #endif
12778
12779 #ifdef HAVE_LINUX_THREADS
12780         pthread_kill_other_threads_np();
12781 #endif
12782
12783         return 0;
12784
12785 }
12786
12787 EOF
12788 if { (eval echo configure:12789: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
12789 then
12790   ol_cv_pthread_pthreads=yes
12791 else
12792   echo "configure: failed program was:" >&5
12793   cat conftest.$ac_ext >&5
12794   rm -fr conftest*
12795   ol_cv_pthread_pthreads=no
12796 fi
12797 rm -fr conftest*
12798 fi
12799
12800
12801                 # restore the LIBS
12802                 LIBS="$ol_LIBS"
12803         
12804 fi
12805
12806 echo "$ac_t""$ol_cv_pthread_pthreads" 1>&6
12807
12808         if test $ol_cv_pthread_pthreads = yes ; then
12809                 ol_link_pthreads="-pthreads"
12810                 ol_link_threads=posix
12811         fi
12812 fi
12813
12814                 # Pthread try link: -mthreads (ol_cv_pthread_mthreads)
12815 if test "$ol_link_threads" = no ; then
12816         # try -mthreads
12817         echo $ac_n "checking for pthread link with -mthreads""... $ac_c" 1>&6
12818 echo "configure:12819: checking for pthread link with -mthreads" >&5
12819 if eval "test \"\${ol_cv_pthread_mthreads+set}\" = set"; then
12820   echo $ac_n "(cached) $ac_c" 1>&6
12821 else
12822   
12823                 # save the flags
12824                 ol_LIBS="$LIBS"
12825                 LIBS="-mthreads $LIBS"
12826
12827                 if test "$cross_compiling" = yes; then
12828   cat > conftest.$ac_ext <<EOF
12829 #line 12830 "configure"
12830 #include "confdefs.h"
12831 /* pthread test headers */
12832 #include <pthread.h>
12833 #if HAVE_PTHREADS < 7
12834 #include <errno.h>
12835 #endif
12836 #ifndef NULL
12837 #define NULL (void*)0
12838 #endif
12839
12840 static void *task(p)
12841         void *p;
12842 {
12843         return (void *) (p == NULL);
12844 }
12845
12846 int main() {
12847
12848         /* pthread test function */
12849 #ifndef PTHREAD_CREATE_DETACHED
12850 #define PTHREAD_CREATE_DETACHED 1
12851 #endif
12852         pthread_t t;
12853         int status;
12854         int detach = PTHREAD_CREATE_DETACHED;
12855
12856 #if HAVE_PTHREADS > 4
12857         /* Final pthreads */
12858         pthread_attr_t attr;
12859
12860         status = pthread_attr_init(&attr);
12861         if( status ) return status;
12862
12863 #if HAVE_PTHREADS < 7
12864         status = pthread_attr_setdetachstate(&attr, &detach);
12865         if( status < 0 ) status = errno;
12866 #else
12867         status = pthread_attr_setdetachstate(&attr, detach);
12868 #endif
12869         if( status ) return status;
12870         status = pthread_create( &t, &attr, task, NULL );
12871 #if HAVE_PTHREADS < 7
12872         if( status < 0 ) status = errno;
12873 #endif
12874         if( status ) return status;
12875 #else
12876         /* Draft 4 pthreads */
12877         status = pthread_create( &t, pthread_attr_default, task, NULL );
12878         if( status ) return errno;
12879
12880         /* give thread a chance to complete */
12881         /* it should remain joinable and hence detachable */
12882         sleep( 1 );
12883
12884         status = pthread_detach( &t );
12885         if( status ) return errno;
12886 #endif
12887
12888 #ifdef HAVE_LINUX_THREADS
12889         pthread_kill_other_threads_np();
12890 #endif
12891
12892         return 0;
12893
12894 ; return 0; }
12895 EOF
12896 if { (eval echo configure:12897: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12897   rm -rf conftest*
12898   ol_cv_pthread_mthreads=yes
12899 else
12900   echo "configure: failed program was:" >&5
12901   cat conftest.$ac_ext >&5
12902   rm -rf conftest*
12903   ol_cv_pthread_mthreads=no
12904 fi
12905 rm -f conftest*
12906 else
12907   cat > conftest.$ac_ext <<EOF
12908 #line 12909 "configure"
12909 #include "confdefs.h"
12910 /* pthread test headers */
12911 #include <pthread.h>
12912 #if HAVE_PTHREADS < 7
12913 #include <errno.h>
12914 #endif
12915 #ifndef NULL
12916 #define NULL (void*)0
12917 #endif
12918
12919 static void *task(p)
12920         void *p;
12921 {
12922         return (void *) (p == NULL);
12923 }
12924
12925
12926 int main(argc, argv)
12927         int argc;
12928         char **argv;
12929 {
12930
12931         /* pthread test function */
12932 #ifndef PTHREAD_CREATE_DETACHED
12933 #define PTHREAD_CREATE_DETACHED 1
12934 #endif
12935         pthread_t t;
12936         int status;
12937         int detach = PTHREAD_CREATE_DETACHED;
12938
12939 #if HAVE_PTHREADS > 4
12940         /* Final pthreads */
12941         pthread_attr_t attr;
12942
12943         status = pthread_attr_init(&attr);
12944         if( status ) return status;
12945
12946 #if HAVE_PTHREADS < 7
12947         status = pthread_attr_setdetachstate(&attr, &detach);
12948         if( status < 0 ) status = errno;
12949 #else
12950         status = pthread_attr_setdetachstate(&attr, detach);
12951 #endif
12952         if( status ) return status;
12953         status = pthread_create( &t, &attr, task, NULL );
12954 #if HAVE_PTHREADS < 7
12955         if( status < 0 ) status = errno;
12956 #endif
12957         if( status ) return status;
12958 #else
12959         /* Draft 4 pthreads */
12960         status = pthread_create( &t, pthread_attr_default, task, NULL );
12961         if( status ) return errno;
12962
12963         /* give thread a chance to complete */
12964         /* it should remain joinable and hence detachable */
12965         sleep( 1 );
12966
12967         status = pthread_detach( &t );
12968         if( status ) return errno;
12969 #endif
12970
12971 #ifdef HAVE_LINUX_THREADS
12972         pthread_kill_other_threads_np();
12973 #endif
12974
12975         return 0;
12976
12977 }
12978
12979 EOF
12980 if { (eval echo configure:12981: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
12981 then
12982   ol_cv_pthread_mthreads=yes
12983 else
12984   echo "configure: failed program was:" >&5
12985   cat conftest.$ac_ext >&5
12986   rm -fr conftest*
12987   ol_cv_pthread_mthreads=no
12988 fi
12989 rm -fr conftest*
12990 fi
12991
12992
12993                 # restore the LIBS
12994                 LIBS="$ol_LIBS"
12995         
12996 fi
12997
12998 echo "$ac_t""$ol_cv_pthread_mthreads" 1>&6
12999
13000         if test $ol_cv_pthread_mthreads = yes ; then
13001                 ol_link_pthreads="-mthreads"
13002                 ol_link_threads=posix
13003         fi
13004 fi
13005
13006                 # Pthread try link: -thread (ol_cv_pthread_thread)
13007 if test "$ol_link_threads" = no ; then
13008         # try -thread
13009         echo $ac_n "checking for pthread link with -thread""... $ac_c" 1>&6
13010 echo "configure:13011: checking for pthread link with -thread" >&5
13011 if eval "test \"\${ol_cv_pthread_thread+set}\" = set"; then
13012   echo $ac_n "(cached) $ac_c" 1>&6
13013 else
13014   
13015                 # save the flags
13016                 ol_LIBS="$LIBS"
13017                 LIBS="-thread $LIBS"
13018
13019                 if test "$cross_compiling" = yes; then
13020   cat > conftest.$ac_ext <<EOF
13021 #line 13022 "configure"
13022 #include "confdefs.h"
13023 /* pthread test headers */
13024 #include <pthread.h>
13025 #if HAVE_PTHREADS < 7
13026 #include <errno.h>
13027 #endif
13028 #ifndef NULL
13029 #define NULL (void*)0
13030 #endif
13031
13032 static void *task(p)
13033         void *p;
13034 {
13035         return (void *) (p == NULL);
13036 }
13037
13038 int main() {
13039
13040         /* pthread test function */
13041 #ifndef PTHREAD_CREATE_DETACHED
13042 #define PTHREAD_CREATE_DETACHED 1
13043 #endif
13044         pthread_t t;
13045         int status;
13046         int detach = PTHREAD_CREATE_DETACHED;
13047
13048 #if HAVE_PTHREADS > 4
13049         /* Final pthreads */
13050         pthread_attr_t attr;
13051
13052         status = pthread_attr_init(&attr);
13053         if( status ) return status;
13054
13055 #if HAVE_PTHREADS < 7
13056         status = pthread_attr_setdetachstate(&attr, &detach);
13057         if( status < 0 ) status = errno;
13058 #else
13059         status = pthread_attr_setdetachstate(&attr, detach);
13060 #endif
13061         if( status ) return status;
13062         status = pthread_create( &t, &attr, task, NULL );
13063 #if HAVE_PTHREADS < 7
13064         if( status < 0 ) status = errno;
13065 #endif
13066         if( status ) return status;
13067 #else
13068         /* Draft 4 pthreads */
13069         status = pthread_create( &t, pthread_attr_default, task, NULL );
13070         if( status ) return errno;
13071
13072         /* give thread a chance to complete */
13073         /* it should remain joinable and hence detachable */
13074         sleep( 1 );
13075
13076         status = pthread_detach( &t );
13077         if( status ) return errno;
13078 #endif
13079
13080 #ifdef HAVE_LINUX_THREADS
13081         pthread_kill_other_threads_np();
13082 #endif
13083
13084         return 0;
13085
13086 ; return 0; }
13087 EOF
13088 if { (eval echo configure:13089: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13089   rm -rf conftest*
13090   ol_cv_pthread_thread=yes
13091 else
13092   echo "configure: failed program was:" >&5
13093   cat conftest.$ac_ext >&5
13094   rm -rf conftest*
13095   ol_cv_pthread_thread=no
13096 fi
13097 rm -f conftest*
13098 else
13099   cat > conftest.$ac_ext <<EOF
13100 #line 13101 "configure"
13101 #include "confdefs.h"
13102 /* pthread test headers */
13103 #include <pthread.h>
13104 #if HAVE_PTHREADS < 7
13105 #include <errno.h>
13106 #endif
13107 #ifndef NULL
13108 #define NULL (void*)0
13109 #endif
13110
13111 static void *task(p)
13112         void *p;
13113 {
13114         return (void *) (p == NULL);
13115 }
13116
13117
13118 int main(argc, argv)
13119         int argc;
13120         char **argv;
13121 {
13122
13123         /* pthread test function */
13124 #ifndef PTHREAD_CREATE_DETACHED
13125 #define PTHREAD_CREATE_DETACHED 1
13126 #endif
13127         pthread_t t;
13128         int status;
13129         int detach = PTHREAD_CREATE_DETACHED;
13130
13131 #if HAVE_PTHREADS > 4
13132         /* Final pthreads */
13133         pthread_attr_t attr;
13134
13135         status = pthread_attr_init(&attr);
13136         if( status ) return status;
13137
13138 #if HAVE_PTHREADS < 7
13139         status = pthread_attr_setdetachstate(&attr, &detach);
13140         if( status < 0 ) status = errno;
13141 #else
13142         status = pthread_attr_setdetachstate(&attr, detach);
13143 #endif
13144         if( status ) return status;
13145         status = pthread_create( &t, &attr, task, NULL );
13146 #if HAVE_PTHREADS < 7
13147         if( status < 0 ) status = errno;
13148 #endif
13149         if( status ) return status;
13150 #else
13151         /* Draft 4 pthreads */
13152         status = pthread_create( &t, pthread_attr_default, task, NULL );
13153         if( status ) return errno;
13154
13155         /* give thread a chance to complete */
13156         /* it should remain joinable and hence detachable */
13157         sleep( 1 );
13158
13159         status = pthread_detach( &t );
13160         if( status ) return errno;
13161 #endif
13162
13163 #ifdef HAVE_LINUX_THREADS
13164         pthread_kill_other_threads_np();
13165 #endif
13166
13167         return 0;
13168
13169 }
13170
13171 EOF
13172 if { (eval echo configure:13173: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
13173 then
13174   ol_cv_pthread_thread=yes
13175 else
13176   echo "configure: failed program was:" >&5
13177   cat conftest.$ac_ext >&5
13178   rm -fr conftest*
13179   ol_cv_pthread_thread=no
13180 fi
13181 rm -fr conftest*
13182 fi
13183
13184
13185                 # restore the LIBS
13186                 LIBS="$ol_LIBS"
13187         
13188 fi
13189
13190 echo "$ac_t""$ol_cv_pthread_thread" 1>&6
13191
13192         if test $ol_cv_pthread_thread = yes ; then
13193                 ol_link_pthreads="-thread"
13194                 ol_link_threads=posix
13195         fi
13196 fi
13197
13198
13199                 # Pthread try link: -lpthread -lmach -lexc -lc_r (ol_cv_pthread_lpthread_lmach_lexc_lc_r)
13200 if test "$ol_link_threads" = no ; then
13201         # try -lpthread -lmach -lexc -lc_r
13202         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc -lc_r""... $ac_c" 1>&6
13203 echo "configure:13204: checking for pthread link with -lpthread -lmach -lexc -lc_r" >&5
13204 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc_lc_r+set}\" = set"; then
13205   echo $ac_n "(cached) $ac_c" 1>&6
13206 else
13207   
13208                 # save the flags
13209                 ol_LIBS="$LIBS"
13210                 LIBS="-lpthread -lmach -lexc -lc_r $LIBS"
13211
13212                 if test "$cross_compiling" = yes; then
13213   cat > conftest.$ac_ext <<EOF
13214 #line 13215 "configure"
13215 #include "confdefs.h"
13216 /* pthread test headers */
13217 #include <pthread.h>
13218 #if HAVE_PTHREADS < 7
13219 #include <errno.h>
13220 #endif
13221 #ifndef NULL
13222 #define NULL (void*)0
13223 #endif
13224
13225 static void *task(p)
13226         void *p;
13227 {
13228         return (void *) (p == NULL);
13229 }
13230
13231 int main() {
13232
13233         /* pthread test function */
13234 #ifndef PTHREAD_CREATE_DETACHED
13235 #define PTHREAD_CREATE_DETACHED 1
13236 #endif
13237         pthread_t t;
13238         int status;
13239         int detach = PTHREAD_CREATE_DETACHED;
13240
13241 #if HAVE_PTHREADS > 4
13242         /* Final pthreads */
13243         pthread_attr_t attr;
13244
13245         status = pthread_attr_init(&attr);
13246         if( status ) return status;
13247
13248 #if HAVE_PTHREADS < 7
13249         status = pthread_attr_setdetachstate(&attr, &detach);
13250         if( status < 0 ) status = errno;
13251 #else
13252         status = pthread_attr_setdetachstate(&attr, detach);
13253 #endif
13254         if( status ) return status;
13255         status = pthread_create( &t, &attr, task, NULL );
13256 #if HAVE_PTHREADS < 7
13257         if( status < 0 ) status = errno;
13258 #endif
13259         if( status ) return status;
13260 #else
13261         /* Draft 4 pthreads */
13262         status = pthread_create( &t, pthread_attr_default, task, NULL );
13263         if( status ) return errno;
13264
13265         /* give thread a chance to complete */
13266         /* it should remain joinable and hence detachable */
13267         sleep( 1 );
13268
13269         status = pthread_detach( &t );
13270         if( status ) return errno;
13271 #endif
13272
13273 #ifdef HAVE_LINUX_THREADS
13274         pthread_kill_other_threads_np();
13275 #endif
13276
13277         return 0;
13278
13279 ; return 0; }
13280 EOF
13281 if { (eval echo configure:13282: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13282   rm -rf conftest*
13283   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
13284 else
13285   echo "configure: failed program was:" >&5
13286   cat conftest.$ac_ext >&5
13287   rm -rf conftest*
13288   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
13289 fi
13290 rm -f conftest*
13291 else
13292   cat > conftest.$ac_ext <<EOF
13293 #line 13294 "configure"
13294 #include "confdefs.h"
13295 /* pthread test headers */
13296 #include <pthread.h>
13297 #if HAVE_PTHREADS < 7
13298 #include <errno.h>
13299 #endif
13300 #ifndef NULL
13301 #define NULL (void*)0
13302 #endif
13303
13304 static void *task(p)
13305         void *p;
13306 {
13307         return (void *) (p == NULL);
13308 }
13309
13310
13311 int main(argc, argv)
13312         int argc;
13313         char **argv;
13314 {
13315
13316         /* pthread test function */
13317 #ifndef PTHREAD_CREATE_DETACHED
13318 #define PTHREAD_CREATE_DETACHED 1
13319 #endif
13320         pthread_t t;
13321         int status;
13322         int detach = PTHREAD_CREATE_DETACHED;
13323
13324 #if HAVE_PTHREADS > 4
13325         /* Final pthreads */
13326         pthread_attr_t attr;
13327
13328         status = pthread_attr_init(&attr);
13329         if( status ) return status;
13330
13331 #if HAVE_PTHREADS < 7
13332         status = pthread_attr_setdetachstate(&attr, &detach);
13333         if( status < 0 ) status = errno;
13334 #else
13335         status = pthread_attr_setdetachstate(&attr, detach);
13336 #endif
13337         if( status ) return status;
13338         status = pthread_create( &t, &attr, task, NULL );
13339 #if HAVE_PTHREADS < 7
13340         if( status < 0 ) status = errno;
13341 #endif
13342         if( status ) return status;
13343 #else
13344         /* Draft 4 pthreads */
13345         status = pthread_create( &t, pthread_attr_default, task, NULL );
13346         if( status ) return errno;
13347
13348         /* give thread a chance to complete */
13349         /* it should remain joinable and hence detachable */
13350         sleep( 1 );
13351
13352         status = pthread_detach( &t );
13353         if( status ) return errno;
13354 #endif
13355
13356 #ifdef HAVE_LINUX_THREADS
13357         pthread_kill_other_threads_np();
13358 #endif
13359
13360         return 0;
13361
13362 }
13363
13364 EOF
13365 if { (eval echo configure:13366: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
13366 then
13367   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
13368 else
13369   echo "configure: failed program was:" >&5
13370   cat conftest.$ac_ext >&5
13371   rm -fr conftest*
13372   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
13373 fi
13374 rm -fr conftest*
13375 fi
13376
13377
13378                 # restore the LIBS
13379                 LIBS="$ol_LIBS"
13380         
13381 fi
13382
13383 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc_lc_r" 1>&6
13384
13385         if test $ol_cv_pthread_lpthread_lmach_lexc_lc_r = yes ; then
13386                 ol_link_pthreads="-lpthread -lmach -lexc -lc_r"
13387                 ol_link_threads=posix
13388         fi
13389 fi
13390
13391                 # Pthread try link: -lpthread -lmach -lexc (ol_cv_pthread_lpthread_lmach_lexc)
13392 if test "$ol_link_threads" = no ; then
13393         # try -lpthread -lmach -lexc
13394         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc""... $ac_c" 1>&6
13395 echo "configure:13396: checking for pthread link with -lpthread -lmach -lexc" >&5
13396 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc+set}\" = set"; then
13397   echo $ac_n "(cached) $ac_c" 1>&6
13398 else
13399   
13400                 # save the flags
13401                 ol_LIBS="$LIBS"
13402                 LIBS="-lpthread -lmach -lexc $LIBS"
13403
13404                 if test "$cross_compiling" = yes; then
13405   cat > conftest.$ac_ext <<EOF
13406 #line 13407 "configure"
13407 #include "confdefs.h"
13408 /* pthread test headers */
13409 #include <pthread.h>
13410 #if HAVE_PTHREADS < 7
13411 #include <errno.h>
13412 #endif
13413 #ifndef NULL
13414 #define NULL (void*)0
13415 #endif
13416
13417 static void *task(p)
13418         void *p;
13419 {
13420         return (void *) (p == NULL);
13421 }
13422
13423 int main() {
13424
13425         /* pthread test function */
13426 #ifndef PTHREAD_CREATE_DETACHED
13427 #define PTHREAD_CREATE_DETACHED 1
13428 #endif
13429         pthread_t t;
13430         int status;
13431         int detach = PTHREAD_CREATE_DETACHED;
13432
13433 #if HAVE_PTHREADS > 4
13434         /* Final pthreads */
13435         pthread_attr_t attr;
13436
13437         status = pthread_attr_init(&attr);
13438         if( status ) return status;
13439
13440 #if HAVE_PTHREADS < 7
13441         status = pthread_attr_setdetachstate(&attr, &detach);
13442         if( status < 0 ) status = errno;
13443 #else
13444         status = pthread_attr_setdetachstate(&attr, detach);
13445 #endif
13446         if( status ) return status;
13447         status = pthread_create( &t, &attr, task, NULL );
13448 #if HAVE_PTHREADS < 7
13449         if( status < 0 ) status = errno;
13450 #endif
13451         if( status ) return status;
13452 #else
13453         /* Draft 4 pthreads */
13454         status = pthread_create( &t, pthread_attr_default, task, NULL );
13455         if( status ) return errno;
13456
13457         /* give thread a chance to complete */
13458         /* it should remain joinable and hence detachable */
13459         sleep( 1 );
13460
13461         status = pthread_detach( &t );
13462         if( status ) return errno;
13463 #endif
13464
13465 #ifdef HAVE_LINUX_THREADS
13466         pthread_kill_other_threads_np();
13467 #endif
13468
13469         return 0;
13470
13471 ; return 0; }
13472 EOF
13473 if { (eval echo configure:13474: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13474   rm -rf conftest*
13475   ol_cv_pthread_lpthread_lmach_lexc=yes
13476 else
13477   echo "configure: failed program was:" >&5
13478   cat conftest.$ac_ext >&5
13479   rm -rf conftest*
13480   ol_cv_pthread_lpthread_lmach_lexc=no
13481 fi
13482 rm -f conftest*
13483 else
13484   cat > conftest.$ac_ext <<EOF
13485 #line 13486 "configure"
13486 #include "confdefs.h"
13487 /* pthread test headers */
13488 #include <pthread.h>
13489 #if HAVE_PTHREADS < 7
13490 #include <errno.h>
13491 #endif
13492 #ifndef NULL
13493 #define NULL (void*)0
13494 #endif
13495
13496 static void *task(p)
13497         void *p;
13498 {
13499         return (void *) (p == NULL);
13500 }
13501
13502
13503 int main(argc, argv)
13504         int argc;
13505         char **argv;
13506 {
13507
13508         /* pthread test function */
13509 #ifndef PTHREAD_CREATE_DETACHED
13510 #define PTHREAD_CREATE_DETACHED 1
13511 #endif
13512         pthread_t t;
13513         int status;
13514         int detach = PTHREAD_CREATE_DETACHED;
13515
13516 #if HAVE_PTHREADS > 4
13517         /* Final pthreads */
13518         pthread_attr_t attr;
13519
13520         status = pthread_attr_init(&attr);
13521         if( status ) return status;
13522
13523 #if HAVE_PTHREADS < 7
13524         status = pthread_attr_setdetachstate(&attr, &detach);
13525         if( status < 0 ) status = errno;
13526 #else
13527         status = pthread_attr_setdetachstate(&attr, detach);
13528 #endif
13529         if( status ) return status;
13530         status = pthread_create( &t, &attr, task, NULL );
13531 #if HAVE_PTHREADS < 7
13532         if( status < 0 ) status = errno;
13533 #endif
13534         if( status ) return status;
13535 #else
13536         /* Draft 4 pthreads */
13537         status = pthread_create( &t, pthread_attr_default, task, NULL );
13538         if( status ) return errno;
13539
13540         /* give thread a chance to complete */
13541         /* it should remain joinable and hence detachable */
13542         sleep( 1 );
13543
13544         status = pthread_detach( &t );
13545         if( status ) return errno;
13546 #endif
13547
13548 #ifdef HAVE_LINUX_THREADS
13549         pthread_kill_other_threads_np();
13550 #endif
13551
13552         return 0;
13553
13554 }
13555
13556 EOF
13557 if { (eval echo configure:13558: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
13558 then
13559   ol_cv_pthread_lpthread_lmach_lexc=yes
13560 else
13561   echo "configure: failed program was:" >&5
13562   cat conftest.$ac_ext >&5
13563   rm -fr conftest*
13564   ol_cv_pthread_lpthread_lmach_lexc=no
13565 fi
13566 rm -fr conftest*
13567 fi
13568
13569
13570                 # restore the LIBS
13571                 LIBS="$ol_LIBS"
13572         
13573 fi
13574
13575 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc" 1>&6
13576
13577         if test $ol_cv_pthread_lpthread_lmach_lexc = yes ; then
13578                 ol_link_pthreads="-lpthread -lmach -lexc"
13579                 ol_link_threads=posix
13580         fi
13581 fi
13582
13583
13584                 # Pthread try link: -lpthread -Wl,-woff,85 (ol_cv_pthread_lib_lpthread_woff)
13585 if test "$ol_link_threads" = no ; then
13586         # try -lpthread -Wl,-woff,85
13587         echo $ac_n "checking for pthread link with -lpthread -Wl,-woff,85""... $ac_c" 1>&6
13588 echo "configure:13589: checking for pthread link with -lpthread -Wl,-woff,85" >&5
13589 if eval "test \"\${ol_cv_pthread_lib_lpthread_woff+set}\" = set"; then
13590   echo $ac_n "(cached) $ac_c" 1>&6
13591 else
13592   
13593                 # save the flags
13594                 ol_LIBS="$LIBS"
13595                 LIBS="-lpthread -Wl,-woff,85 $LIBS"
13596
13597                 if test "$cross_compiling" = yes; then
13598   cat > conftest.$ac_ext <<EOF
13599 #line 13600 "configure"
13600 #include "confdefs.h"
13601 /* pthread test headers */
13602 #include <pthread.h>
13603 #if HAVE_PTHREADS < 7
13604 #include <errno.h>
13605 #endif
13606 #ifndef NULL
13607 #define NULL (void*)0
13608 #endif
13609
13610 static void *task(p)
13611         void *p;
13612 {
13613         return (void *) (p == NULL);
13614 }
13615
13616 int main() {
13617
13618         /* pthread test function */
13619 #ifndef PTHREAD_CREATE_DETACHED
13620 #define PTHREAD_CREATE_DETACHED 1
13621 #endif
13622         pthread_t t;
13623         int status;
13624         int detach = PTHREAD_CREATE_DETACHED;
13625
13626 #if HAVE_PTHREADS > 4
13627         /* Final pthreads */
13628         pthread_attr_t attr;
13629
13630         status = pthread_attr_init(&attr);
13631         if( status ) return status;
13632
13633 #if HAVE_PTHREADS < 7
13634         status = pthread_attr_setdetachstate(&attr, &detach);
13635         if( status < 0 ) status = errno;
13636 #else
13637         status = pthread_attr_setdetachstate(&attr, detach);
13638 #endif
13639         if( status ) return status;
13640         status = pthread_create( &t, &attr, task, NULL );
13641 #if HAVE_PTHREADS < 7
13642         if( status < 0 ) status = errno;
13643 #endif
13644         if( status ) return status;
13645 #else
13646         /* Draft 4 pthreads */
13647         status = pthread_create( &t, pthread_attr_default, task, NULL );
13648         if( status ) return errno;
13649
13650         /* give thread a chance to complete */
13651         /* it should remain joinable and hence detachable */
13652         sleep( 1 );
13653
13654         status = pthread_detach( &t );
13655         if( status ) return errno;
13656 #endif
13657
13658 #ifdef HAVE_LINUX_THREADS
13659         pthread_kill_other_threads_np();
13660 #endif
13661
13662         return 0;
13663
13664 ; return 0; }
13665 EOF
13666 if { (eval echo configure:13667: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13667   rm -rf conftest*
13668   ol_cv_pthread_lib_lpthread_woff=yes
13669 else
13670   echo "configure: failed program was:" >&5
13671   cat conftest.$ac_ext >&5
13672   rm -rf conftest*
13673   ol_cv_pthread_lib_lpthread_woff=no
13674 fi
13675 rm -f conftest*
13676 else
13677   cat > conftest.$ac_ext <<EOF
13678 #line 13679 "configure"
13679 #include "confdefs.h"
13680 /* pthread test headers */
13681 #include <pthread.h>
13682 #if HAVE_PTHREADS < 7
13683 #include <errno.h>
13684 #endif
13685 #ifndef NULL
13686 #define NULL (void*)0
13687 #endif
13688
13689 static void *task(p)
13690         void *p;
13691 {
13692         return (void *) (p == NULL);
13693 }
13694
13695
13696 int main(argc, argv)
13697         int argc;
13698         char **argv;
13699 {
13700
13701         /* pthread test function */
13702 #ifndef PTHREAD_CREATE_DETACHED
13703 #define PTHREAD_CREATE_DETACHED 1
13704 #endif
13705         pthread_t t;
13706         int status;
13707         int detach = PTHREAD_CREATE_DETACHED;
13708
13709 #if HAVE_PTHREADS > 4
13710         /* Final pthreads */
13711         pthread_attr_t attr;
13712
13713         status = pthread_attr_init(&attr);
13714         if( status ) return status;
13715
13716 #if HAVE_PTHREADS < 7
13717         status = pthread_attr_setdetachstate(&attr, &detach);
13718         if( status < 0 ) status = errno;
13719 #else
13720         status = pthread_attr_setdetachstate(&attr, detach);
13721 #endif
13722         if( status ) return status;
13723         status = pthread_create( &t, &attr, task, NULL );
13724 #if HAVE_PTHREADS < 7
13725         if( status < 0 ) status = errno;
13726 #endif
13727         if( status ) return status;
13728 #else
13729         /* Draft 4 pthreads */
13730         status = pthread_create( &t, pthread_attr_default, task, NULL );
13731         if( status ) return errno;
13732
13733         /* give thread a chance to complete */
13734         /* it should remain joinable and hence detachable */
13735         sleep( 1 );
13736
13737         status = pthread_detach( &t );
13738         if( status ) return errno;
13739 #endif
13740
13741 #ifdef HAVE_LINUX_THREADS
13742         pthread_kill_other_threads_np();
13743 #endif
13744
13745         return 0;
13746
13747 }
13748
13749 EOF
13750 if { (eval echo configure:13751: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
13751 then
13752   ol_cv_pthread_lib_lpthread_woff=yes
13753 else
13754   echo "configure: failed program was:" >&5
13755   cat conftest.$ac_ext >&5
13756   rm -fr conftest*
13757   ol_cv_pthread_lib_lpthread_woff=no
13758 fi
13759 rm -fr conftest*
13760 fi
13761
13762
13763                 # restore the LIBS
13764                 LIBS="$ol_LIBS"
13765         
13766 fi
13767
13768 echo "$ac_t""$ol_cv_pthread_lib_lpthread_woff" 1>&6
13769
13770         if test $ol_cv_pthread_lib_lpthread_woff = yes ; then
13771                 ol_link_pthreads="-lpthread -Wl,-woff,85"
13772                 ol_link_threads=posix
13773         fi
13774 fi
13775
13776
13777                 # Pthread try link: -lpthread (ol_cv_pthread_lpthread)
13778 if test "$ol_link_threads" = no ; then
13779         # try -lpthread
13780         echo $ac_n "checking for pthread link with -lpthread""... $ac_c" 1>&6
13781 echo "configure:13782: checking for pthread link with -lpthread" >&5
13782 if eval "test \"\${ol_cv_pthread_lpthread+set}\" = set"; then
13783   echo $ac_n "(cached) $ac_c" 1>&6
13784 else
13785   
13786                 # save the flags
13787                 ol_LIBS="$LIBS"
13788                 LIBS="-lpthread $LIBS"
13789
13790                 if test "$cross_compiling" = yes; then
13791   cat > conftest.$ac_ext <<EOF
13792 #line 13793 "configure"
13793 #include "confdefs.h"
13794 /* pthread test headers */
13795 #include <pthread.h>
13796 #if HAVE_PTHREADS < 7
13797 #include <errno.h>
13798 #endif
13799 #ifndef NULL
13800 #define NULL (void*)0
13801 #endif
13802
13803 static void *task(p)
13804         void *p;
13805 {
13806         return (void *) (p == NULL);
13807 }
13808
13809 int main() {
13810
13811         /* pthread test function */
13812 #ifndef PTHREAD_CREATE_DETACHED
13813 #define PTHREAD_CREATE_DETACHED 1
13814 #endif
13815         pthread_t t;
13816         int status;
13817         int detach = PTHREAD_CREATE_DETACHED;
13818
13819 #if HAVE_PTHREADS > 4
13820         /* Final pthreads */
13821         pthread_attr_t attr;
13822
13823         status = pthread_attr_init(&attr);
13824         if( status ) return status;
13825
13826 #if HAVE_PTHREADS < 7
13827         status = pthread_attr_setdetachstate(&attr, &detach);
13828         if( status < 0 ) status = errno;
13829 #else
13830         status = pthread_attr_setdetachstate(&attr, detach);
13831 #endif
13832         if( status ) return status;
13833         status = pthread_create( &t, &attr, task, NULL );
13834 #if HAVE_PTHREADS < 7
13835         if( status < 0 ) status = errno;
13836 #endif
13837         if( status ) return status;
13838 #else
13839         /* Draft 4 pthreads */
13840         status = pthread_create( &t, pthread_attr_default, task, NULL );
13841         if( status ) return errno;
13842
13843         /* give thread a chance to complete */
13844         /* it should remain joinable and hence detachable */
13845         sleep( 1 );
13846
13847         status = pthread_detach( &t );
13848         if( status ) return errno;
13849 #endif
13850
13851 #ifdef HAVE_LINUX_THREADS
13852         pthread_kill_other_threads_np();
13853 #endif
13854
13855         return 0;
13856
13857 ; return 0; }
13858 EOF
13859 if { (eval echo configure:13860: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13860   rm -rf conftest*
13861   ol_cv_pthread_lpthread=yes
13862 else
13863   echo "configure: failed program was:" >&5
13864   cat conftest.$ac_ext >&5
13865   rm -rf conftest*
13866   ol_cv_pthread_lpthread=no
13867 fi
13868 rm -f conftest*
13869 else
13870   cat > conftest.$ac_ext <<EOF
13871 #line 13872 "configure"
13872 #include "confdefs.h"
13873 /* pthread test headers */
13874 #include <pthread.h>
13875 #if HAVE_PTHREADS < 7
13876 #include <errno.h>
13877 #endif
13878 #ifndef NULL
13879 #define NULL (void*)0
13880 #endif
13881
13882 static void *task(p)
13883         void *p;
13884 {
13885         return (void *) (p == NULL);
13886 }
13887
13888
13889 int main(argc, argv)
13890         int argc;
13891         char **argv;
13892 {
13893
13894         /* pthread test function */
13895 #ifndef PTHREAD_CREATE_DETACHED
13896 #define PTHREAD_CREATE_DETACHED 1
13897 #endif
13898         pthread_t t;
13899         int status;
13900         int detach = PTHREAD_CREATE_DETACHED;
13901
13902 #if HAVE_PTHREADS > 4
13903         /* Final pthreads */
13904         pthread_attr_t attr;
13905
13906         status = pthread_attr_init(&attr);
13907         if( status ) return status;
13908
13909 #if HAVE_PTHREADS < 7
13910         status = pthread_attr_setdetachstate(&attr, &detach);
13911         if( status < 0 ) status = errno;
13912 #else
13913         status = pthread_attr_setdetachstate(&attr, detach);
13914 #endif
13915         if( status ) return status;
13916         status = pthread_create( &t, &attr, task, NULL );
13917 #if HAVE_PTHREADS < 7
13918         if( status < 0 ) status = errno;
13919 #endif
13920         if( status ) return status;
13921 #else
13922         /* Draft 4 pthreads */
13923         status = pthread_create( &t, pthread_attr_default, task, NULL );
13924         if( status ) return errno;
13925
13926         /* give thread a chance to complete */
13927         /* it should remain joinable and hence detachable */
13928         sleep( 1 );
13929
13930         status = pthread_detach( &t );
13931         if( status ) return errno;
13932 #endif
13933
13934 #ifdef HAVE_LINUX_THREADS
13935         pthread_kill_other_threads_np();
13936 #endif
13937
13938         return 0;
13939
13940 }
13941
13942 EOF
13943 if { (eval echo configure:13944: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
13944 then
13945   ol_cv_pthread_lpthread=yes
13946 else
13947   echo "configure: failed program was:" >&5
13948   cat conftest.$ac_ext >&5
13949   rm -fr conftest*
13950   ol_cv_pthread_lpthread=no
13951 fi
13952 rm -fr conftest*
13953 fi
13954
13955
13956                 # restore the LIBS
13957                 LIBS="$ol_LIBS"
13958         
13959 fi
13960
13961 echo "$ac_t""$ol_cv_pthread_lpthread" 1>&6
13962
13963         if test $ol_cv_pthread_lpthread = yes ; then
13964                 ol_link_pthreads="-lpthread"
13965                 ol_link_threads=posix
13966         fi
13967 fi
13968
13969                 # Pthread try link: -lc_r (ol_cv_pthread_lc_r)
13970 if test "$ol_link_threads" = no ; then
13971         # try -lc_r
13972         echo $ac_n "checking for pthread link with -lc_r""... $ac_c" 1>&6
13973 echo "configure:13974: checking for pthread link with -lc_r" >&5
13974 if eval "test \"\${ol_cv_pthread_lc_r+set}\" = set"; then
13975   echo $ac_n "(cached) $ac_c" 1>&6
13976 else
13977   
13978                 # save the flags
13979                 ol_LIBS="$LIBS"
13980                 LIBS="-lc_r $LIBS"
13981
13982                 if test "$cross_compiling" = yes; then
13983   cat > conftest.$ac_ext <<EOF
13984 #line 13985 "configure"
13985 #include "confdefs.h"
13986 /* pthread test headers */
13987 #include <pthread.h>
13988 #if HAVE_PTHREADS < 7
13989 #include <errno.h>
13990 #endif
13991 #ifndef NULL
13992 #define NULL (void*)0
13993 #endif
13994
13995 static void *task(p)
13996         void *p;
13997 {
13998         return (void *) (p == NULL);
13999 }
14000
14001 int main() {
14002
14003         /* pthread test function */
14004 #ifndef PTHREAD_CREATE_DETACHED
14005 #define PTHREAD_CREATE_DETACHED 1
14006 #endif
14007         pthread_t t;
14008         int status;
14009         int detach = PTHREAD_CREATE_DETACHED;
14010
14011 #if HAVE_PTHREADS > 4
14012         /* Final pthreads */
14013         pthread_attr_t attr;
14014
14015         status = pthread_attr_init(&attr);
14016         if( status ) return status;
14017
14018 #if HAVE_PTHREADS < 7
14019         status = pthread_attr_setdetachstate(&attr, &detach);
14020         if( status < 0 ) status = errno;
14021 #else
14022         status = pthread_attr_setdetachstate(&attr, detach);
14023 #endif
14024         if( status ) return status;
14025         status = pthread_create( &t, &attr, task, NULL );
14026 #if HAVE_PTHREADS < 7
14027         if( status < 0 ) status = errno;
14028 #endif
14029         if( status ) return status;
14030 #else
14031         /* Draft 4 pthreads */
14032         status = pthread_create( &t, pthread_attr_default, task, NULL );
14033         if( status ) return errno;
14034
14035         /* give thread a chance to complete */
14036         /* it should remain joinable and hence detachable */
14037         sleep( 1 );
14038
14039         status = pthread_detach( &t );
14040         if( status ) return errno;
14041 #endif
14042
14043 #ifdef HAVE_LINUX_THREADS
14044         pthread_kill_other_threads_np();
14045 #endif
14046
14047         return 0;
14048
14049 ; return 0; }
14050 EOF
14051 if { (eval echo configure:14052: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14052   rm -rf conftest*
14053   ol_cv_pthread_lc_r=yes
14054 else
14055   echo "configure: failed program was:" >&5
14056   cat conftest.$ac_ext >&5
14057   rm -rf conftest*
14058   ol_cv_pthread_lc_r=no
14059 fi
14060 rm -f conftest*
14061 else
14062   cat > conftest.$ac_ext <<EOF
14063 #line 14064 "configure"
14064 #include "confdefs.h"
14065 /* pthread test headers */
14066 #include <pthread.h>
14067 #if HAVE_PTHREADS < 7
14068 #include <errno.h>
14069 #endif
14070 #ifndef NULL
14071 #define NULL (void*)0
14072 #endif
14073
14074 static void *task(p)
14075         void *p;
14076 {
14077         return (void *) (p == NULL);
14078 }
14079
14080
14081 int main(argc, argv)
14082         int argc;
14083         char **argv;
14084 {
14085
14086         /* pthread test function */
14087 #ifndef PTHREAD_CREATE_DETACHED
14088 #define PTHREAD_CREATE_DETACHED 1
14089 #endif
14090         pthread_t t;
14091         int status;
14092         int detach = PTHREAD_CREATE_DETACHED;
14093
14094 #if HAVE_PTHREADS > 4
14095         /* Final pthreads */
14096         pthread_attr_t attr;
14097
14098         status = pthread_attr_init(&attr);
14099         if( status ) return status;
14100
14101 #if HAVE_PTHREADS < 7
14102         status = pthread_attr_setdetachstate(&attr, &detach);
14103         if( status < 0 ) status = errno;
14104 #else
14105         status = pthread_attr_setdetachstate(&attr, detach);
14106 #endif
14107         if( status ) return status;
14108         status = pthread_create( &t, &attr, task, NULL );
14109 #if HAVE_PTHREADS < 7
14110         if( status < 0 ) status = errno;
14111 #endif
14112         if( status ) return status;
14113 #else
14114         /* Draft 4 pthreads */
14115         status = pthread_create( &t, pthread_attr_default, task, NULL );
14116         if( status ) return errno;
14117
14118         /* give thread a chance to complete */
14119         /* it should remain joinable and hence detachable */
14120         sleep( 1 );
14121
14122         status = pthread_detach( &t );
14123         if( status ) return errno;
14124 #endif
14125
14126 #ifdef HAVE_LINUX_THREADS
14127         pthread_kill_other_threads_np();
14128 #endif
14129
14130         return 0;
14131
14132 }
14133
14134 EOF
14135 if { (eval echo configure:14136: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
14136 then
14137   ol_cv_pthread_lc_r=yes
14138 else
14139   echo "configure: failed program was:" >&5
14140   cat conftest.$ac_ext >&5
14141   rm -fr conftest*
14142   ol_cv_pthread_lc_r=no
14143 fi
14144 rm -fr conftest*
14145 fi
14146
14147
14148                 # restore the LIBS
14149                 LIBS="$ol_LIBS"
14150         
14151 fi
14152
14153 echo "$ac_t""$ol_cv_pthread_lc_r" 1>&6
14154
14155         if test $ol_cv_pthread_lc_r = yes ; then
14156                 ol_link_pthreads="-lc_r"
14157                 ol_link_threads=posix
14158         fi
14159 fi
14160
14161
14162                 # Pthread try link: -threads (ol_cv_pthread_threads)
14163 if test "$ol_link_threads" = no ; then
14164         # try -threads
14165         echo $ac_n "checking for pthread link with -threads""... $ac_c" 1>&6
14166 echo "configure:14167: checking for pthread link with -threads" >&5
14167 if eval "test \"\${ol_cv_pthread_threads+set}\" = set"; then
14168   echo $ac_n "(cached) $ac_c" 1>&6
14169 else
14170   
14171                 # save the flags
14172                 ol_LIBS="$LIBS"
14173                 LIBS="-threads $LIBS"
14174
14175                 if test "$cross_compiling" = yes; then
14176   cat > conftest.$ac_ext <<EOF
14177 #line 14178 "configure"
14178 #include "confdefs.h"
14179 /* pthread test headers */
14180 #include <pthread.h>
14181 #if HAVE_PTHREADS < 7
14182 #include <errno.h>
14183 #endif
14184 #ifndef NULL
14185 #define NULL (void*)0
14186 #endif
14187
14188 static void *task(p)
14189         void *p;
14190 {
14191         return (void *) (p == NULL);
14192 }
14193
14194 int main() {
14195
14196         /* pthread test function */
14197 #ifndef PTHREAD_CREATE_DETACHED
14198 #define PTHREAD_CREATE_DETACHED 1
14199 #endif
14200         pthread_t t;
14201         int status;
14202         int detach = PTHREAD_CREATE_DETACHED;
14203
14204 #if HAVE_PTHREADS > 4
14205         /* Final pthreads */
14206         pthread_attr_t attr;
14207
14208         status = pthread_attr_init(&attr);
14209         if( status ) return status;
14210
14211 #if HAVE_PTHREADS < 7
14212         status = pthread_attr_setdetachstate(&attr, &detach);
14213         if( status < 0 ) status = errno;
14214 #else
14215         status = pthread_attr_setdetachstate(&attr, detach);
14216 #endif
14217         if( status ) return status;
14218         status = pthread_create( &t, &attr, task, NULL );
14219 #if HAVE_PTHREADS < 7
14220         if( status < 0 ) status = errno;
14221 #endif
14222         if( status ) return status;
14223 #else
14224         /* Draft 4 pthreads */
14225         status = pthread_create( &t, pthread_attr_default, task, NULL );
14226         if( status ) return errno;
14227
14228         /* give thread a chance to complete */
14229         /* it should remain joinable and hence detachable */
14230         sleep( 1 );
14231
14232         status = pthread_detach( &t );
14233         if( status ) return errno;
14234 #endif
14235
14236 #ifdef HAVE_LINUX_THREADS
14237         pthread_kill_other_threads_np();
14238 #endif
14239
14240         return 0;
14241
14242 ; return 0; }
14243 EOF
14244 if { (eval echo configure:14245: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14245   rm -rf conftest*
14246   ol_cv_pthread_threads=yes
14247 else
14248   echo "configure: failed program was:" >&5
14249   cat conftest.$ac_ext >&5
14250   rm -rf conftest*
14251   ol_cv_pthread_threads=no
14252 fi
14253 rm -f conftest*
14254 else
14255   cat > conftest.$ac_ext <<EOF
14256 #line 14257 "configure"
14257 #include "confdefs.h"
14258 /* pthread test headers */
14259 #include <pthread.h>
14260 #if HAVE_PTHREADS < 7
14261 #include <errno.h>
14262 #endif
14263 #ifndef NULL
14264 #define NULL (void*)0
14265 #endif
14266
14267 static void *task(p)
14268         void *p;
14269 {
14270         return (void *) (p == NULL);
14271 }
14272
14273
14274 int main(argc, argv)
14275         int argc;
14276         char **argv;
14277 {
14278
14279         /* pthread test function */
14280 #ifndef PTHREAD_CREATE_DETACHED
14281 #define PTHREAD_CREATE_DETACHED 1
14282 #endif
14283         pthread_t t;
14284         int status;
14285         int detach = PTHREAD_CREATE_DETACHED;
14286
14287 #if HAVE_PTHREADS > 4
14288         /* Final pthreads */
14289         pthread_attr_t attr;
14290
14291         status = pthread_attr_init(&attr);
14292         if( status ) return status;
14293
14294 #if HAVE_PTHREADS < 7
14295         status = pthread_attr_setdetachstate(&attr, &detach);
14296         if( status < 0 ) status = errno;
14297 #else
14298         status = pthread_attr_setdetachstate(&attr, detach);
14299 #endif
14300         if( status ) return status;
14301         status = pthread_create( &t, &attr, task, NULL );
14302 #if HAVE_PTHREADS < 7
14303         if( status < 0 ) status = errno;
14304 #endif
14305         if( status ) return status;
14306 #else
14307         /* Draft 4 pthreads */
14308         status = pthread_create( &t, pthread_attr_default, task, NULL );
14309         if( status ) return errno;
14310
14311         /* give thread a chance to complete */
14312         /* it should remain joinable and hence detachable */
14313         sleep( 1 );
14314
14315         status = pthread_detach( &t );
14316         if( status ) return errno;
14317 #endif
14318
14319 #ifdef HAVE_LINUX_THREADS
14320         pthread_kill_other_threads_np();
14321 #endif
14322
14323         return 0;
14324
14325 }
14326
14327 EOF
14328 if { (eval echo configure:14329: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
14329 then
14330   ol_cv_pthread_threads=yes
14331 else
14332   echo "configure: failed program was:" >&5
14333   cat conftest.$ac_ext >&5
14334   rm -fr conftest*
14335   ol_cv_pthread_threads=no
14336 fi
14337 rm -fr conftest*
14338 fi
14339
14340
14341                 # restore the LIBS
14342                 LIBS="$ol_LIBS"
14343         
14344 fi
14345
14346 echo "$ac_t""$ol_cv_pthread_threads" 1>&6
14347
14348         if test $ol_cv_pthread_threads = yes ; then
14349                 ol_link_pthreads="-threads"
14350                 ol_link_threads=posix
14351         fi
14352 fi
14353
14354
14355                 # Pthread try link: -lpthreads -lmach -lexc -lc_r (ol_cv_pthread_lpthreads_lmach_lexc_lc_r)
14356 if test "$ol_link_threads" = no ; then
14357         # try -lpthreads -lmach -lexc -lc_r
14358         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc -lc_r""... $ac_c" 1>&6
14359 echo "configure:14360: checking for pthread link with -lpthreads -lmach -lexc -lc_r" >&5
14360 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc_lc_r+set}\" = set"; then
14361   echo $ac_n "(cached) $ac_c" 1>&6
14362 else
14363   
14364                 # save the flags
14365                 ol_LIBS="$LIBS"
14366                 LIBS="-lpthreads -lmach -lexc -lc_r $LIBS"
14367
14368                 if test "$cross_compiling" = yes; then
14369   cat > conftest.$ac_ext <<EOF
14370 #line 14371 "configure"
14371 #include "confdefs.h"
14372 /* pthread test headers */
14373 #include <pthread.h>
14374 #if HAVE_PTHREADS < 7
14375 #include <errno.h>
14376 #endif
14377 #ifndef NULL
14378 #define NULL (void*)0
14379 #endif
14380
14381 static void *task(p)
14382         void *p;
14383 {
14384         return (void *) (p == NULL);
14385 }
14386
14387 int main() {
14388
14389         /* pthread test function */
14390 #ifndef PTHREAD_CREATE_DETACHED
14391 #define PTHREAD_CREATE_DETACHED 1
14392 #endif
14393         pthread_t t;
14394         int status;
14395         int detach = PTHREAD_CREATE_DETACHED;
14396
14397 #if HAVE_PTHREADS > 4
14398         /* Final pthreads */
14399         pthread_attr_t attr;
14400
14401         status = pthread_attr_init(&attr);
14402         if( status ) return status;
14403
14404 #if HAVE_PTHREADS < 7
14405         status = pthread_attr_setdetachstate(&attr, &detach);
14406         if( status < 0 ) status = errno;
14407 #else
14408         status = pthread_attr_setdetachstate(&attr, detach);
14409 #endif
14410         if( status ) return status;
14411         status = pthread_create( &t, &attr, task, NULL );
14412 #if HAVE_PTHREADS < 7
14413         if( status < 0 ) status = errno;
14414 #endif
14415         if( status ) return status;
14416 #else
14417         /* Draft 4 pthreads */
14418         status = pthread_create( &t, pthread_attr_default, task, NULL );
14419         if( status ) return errno;
14420
14421         /* give thread a chance to complete */
14422         /* it should remain joinable and hence detachable */
14423         sleep( 1 );
14424
14425         status = pthread_detach( &t );
14426         if( status ) return errno;
14427 #endif
14428
14429 #ifdef HAVE_LINUX_THREADS
14430         pthread_kill_other_threads_np();
14431 #endif
14432
14433         return 0;
14434
14435 ; return 0; }
14436 EOF
14437 if { (eval echo configure:14438: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14438   rm -rf conftest*
14439   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
14440 else
14441   echo "configure: failed program was:" >&5
14442   cat conftest.$ac_ext >&5
14443   rm -rf conftest*
14444   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
14445 fi
14446 rm -f conftest*
14447 else
14448   cat > conftest.$ac_ext <<EOF
14449 #line 14450 "configure"
14450 #include "confdefs.h"
14451 /* pthread test headers */
14452 #include <pthread.h>
14453 #if HAVE_PTHREADS < 7
14454 #include <errno.h>
14455 #endif
14456 #ifndef NULL
14457 #define NULL (void*)0
14458 #endif
14459
14460 static void *task(p)
14461         void *p;
14462 {
14463         return (void *) (p == NULL);
14464 }
14465
14466
14467 int main(argc, argv)
14468         int argc;
14469         char **argv;
14470 {
14471
14472         /* pthread test function */
14473 #ifndef PTHREAD_CREATE_DETACHED
14474 #define PTHREAD_CREATE_DETACHED 1
14475 #endif
14476         pthread_t t;
14477         int status;
14478         int detach = PTHREAD_CREATE_DETACHED;
14479
14480 #if HAVE_PTHREADS > 4
14481         /* Final pthreads */
14482         pthread_attr_t attr;
14483
14484         status = pthread_attr_init(&attr);
14485         if( status ) return status;
14486
14487 #if HAVE_PTHREADS < 7
14488         status = pthread_attr_setdetachstate(&attr, &detach);
14489         if( status < 0 ) status = errno;
14490 #else
14491         status = pthread_attr_setdetachstate(&attr, detach);
14492 #endif
14493         if( status ) return status;
14494         status = pthread_create( &t, &attr, task, NULL );
14495 #if HAVE_PTHREADS < 7
14496         if( status < 0 ) status = errno;
14497 #endif
14498         if( status ) return status;
14499 #else
14500         /* Draft 4 pthreads */
14501         status = pthread_create( &t, pthread_attr_default, task, NULL );
14502         if( status ) return errno;
14503
14504         /* give thread a chance to complete */
14505         /* it should remain joinable and hence detachable */
14506         sleep( 1 );
14507
14508         status = pthread_detach( &t );
14509         if( status ) return errno;
14510 #endif
14511
14512 #ifdef HAVE_LINUX_THREADS
14513         pthread_kill_other_threads_np();
14514 #endif
14515
14516         return 0;
14517
14518 }
14519
14520 EOF
14521 if { (eval echo configure:14522: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
14522 then
14523   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
14524 else
14525   echo "configure: failed program was:" >&5
14526   cat conftest.$ac_ext >&5
14527   rm -fr conftest*
14528   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
14529 fi
14530 rm -fr conftest*
14531 fi
14532
14533
14534                 # restore the LIBS
14535                 LIBS="$ol_LIBS"
14536         
14537 fi
14538
14539 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc_lc_r" 1>&6
14540
14541         if test $ol_cv_pthread_lpthreads_lmach_lexc_lc_r = yes ; then
14542                 ol_link_pthreads="-lpthreads -lmach -lexc -lc_r"
14543                 ol_link_threads=posix
14544         fi
14545 fi
14546
14547                 # Pthread try link: -lpthreads -lmach -lexc (ol_cv_pthread_lpthreads_lmach_lexc)
14548 if test "$ol_link_threads" = no ; then
14549         # try -lpthreads -lmach -lexc
14550         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc""... $ac_c" 1>&6
14551 echo "configure:14552: checking for pthread link with -lpthreads -lmach -lexc" >&5
14552 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc+set}\" = set"; then
14553   echo $ac_n "(cached) $ac_c" 1>&6
14554 else
14555   
14556                 # save the flags
14557                 ol_LIBS="$LIBS"
14558                 LIBS="-lpthreads -lmach -lexc $LIBS"
14559
14560                 if test "$cross_compiling" = yes; then
14561   cat > conftest.$ac_ext <<EOF
14562 #line 14563 "configure"
14563 #include "confdefs.h"
14564 /* pthread test headers */
14565 #include <pthread.h>
14566 #if HAVE_PTHREADS < 7
14567 #include <errno.h>
14568 #endif
14569 #ifndef NULL
14570 #define NULL (void*)0
14571 #endif
14572
14573 static void *task(p)
14574         void *p;
14575 {
14576         return (void *) (p == NULL);
14577 }
14578
14579 int main() {
14580
14581         /* pthread test function */
14582 #ifndef PTHREAD_CREATE_DETACHED
14583 #define PTHREAD_CREATE_DETACHED 1
14584 #endif
14585         pthread_t t;
14586         int status;
14587         int detach = PTHREAD_CREATE_DETACHED;
14588
14589 #if HAVE_PTHREADS > 4
14590         /* Final pthreads */
14591         pthread_attr_t attr;
14592
14593         status = pthread_attr_init(&attr);
14594         if( status ) return status;
14595
14596 #if HAVE_PTHREADS < 7
14597         status = pthread_attr_setdetachstate(&attr, &detach);
14598         if( status < 0 ) status = errno;
14599 #else
14600         status = pthread_attr_setdetachstate(&attr, detach);
14601 #endif
14602         if( status ) return status;
14603         status = pthread_create( &t, &attr, task, NULL );
14604 #if HAVE_PTHREADS < 7
14605         if( status < 0 ) status = errno;
14606 #endif
14607         if( status ) return status;
14608 #else
14609         /* Draft 4 pthreads */
14610         status = pthread_create( &t, pthread_attr_default, task, NULL );
14611         if( status ) return errno;
14612
14613         /* give thread a chance to complete */
14614         /* it should remain joinable and hence detachable */
14615         sleep( 1 );
14616
14617         status = pthread_detach( &t );
14618         if( status ) return errno;
14619 #endif
14620
14621 #ifdef HAVE_LINUX_THREADS
14622         pthread_kill_other_threads_np();
14623 #endif
14624
14625         return 0;
14626
14627 ; return 0; }
14628 EOF
14629 if { (eval echo configure:14630: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14630   rm -rf conftest*
14631   ol_cv_pthread_lpthreads_lmach_lexc=yes
14632 else
14633   echo "configure: failed program was:" >&5
14634   cat conftest.$ac_ext >&5
14635   rm -rf conftest*
14636   ol_cv_pthread_lpthreads_lmach_lexc=no
14637 fi
14638 rm -f conftest*
14639 else
14640   cat > conftest.$ac_ext <<EOF
14641 #line 14642 "configure"
14642 #include "confdefs.h"
14643 /* pthread test headers */
14644 #include <pthread.h>
14645 #if HAVE_PTHREADS < 7
14646 #include <errno.h>
14647 #endif
14648 #ifndef NULL
14649 #define NULL (void*)0
14650 #endif
14651
14652 static void *task(p)
14653         void *p;
14654 {
14655         return (void *) (p == NULL);
14656 }
14657
14658
14659 int main(argc, argv)
14660         int argc;
14661         char **argv;
14662 {
14663
14664         /* pthread test function */
14665 #ifndef PTHREAD_CREATE_DETACHED
14666 #define PTHREAD_CREATE_DETACHED 1
14667 #endif
14668         pthread_t t;
14669         int status;
14670         int detach = PTHREAD_CREATE_DETACHED;
14671
14672 #if HAVE_PTHREADS > 4
14673         /* Final pthreads */
14674         pthread_attr_t attr;
14675
14676         status = pthread_attr_init(&attr);
14677         if( status ) return status;
14678
14679 #if HAVE_PTHREADS < 7
14680         status = pthread_attr_setdetachstate(&attr, &detach);
14681         if( status < 0 ) status = errno;
14682 #else
14683         status = pthread_attr_setdetachstate(&attr, detach);
14684 #endif
14685         if( status ) return status;
14686         status = pthread_create( &t, &attr, task, NULL );
14687 #if HAVE_PTHREADS < 7
14688         if( status < 0 ) status = errno;
14689 #endif
14690         if( status ) return status;
14691 #else
14692         /* Draft 4 pthreads */
14693         status = pthread_create( &t, pthread_attr_default, task, NULL );
14694         if( status ) return errno;
14695
14696         /* give thread a chance to complete */
14697         /* it should remain joinable and hence detachable */
14698         sleep( 1 );
14699
14700         status = pthread_detach( &t );
14701         if( status ) return errno;
14702 #endif
14703
14704 #ifdef HAVE_LINUX_THREADS
14705         pthread_kill_other_threads_np();
14706 #endif
14707
14708         return 0;
14709
14710 }
14711
14712 EOF
14713 if { (eval echo configure:14714: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
14714 then
14715   ol_cv_pthread_lpthreads_lmach_lexc=yes
14716 else
14717   echo "configure: failed program was:" >&5
14718   cat conftest.$ac_ext >&5
14719   rm -fr conftest*
14720   ol_cv_pthread_lpthreads_lmach_lexc=no
14721 fi
14722 rm -fr conftest*
14723 fi
14724
14725
14726                 # restore the LIBS
14727                 LIBS="$ol_LIBS"
14728         
14729 fi
14730
14731 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc" 1>&6
14732
14733         if test $ol_cv_pthread_lpthreads_lmach_lexc = yes ; then
14734                 ol_link_pthreads="-lpthreads -lmach -lexc"
14735                 ol_link_threads=posix
14736         fi
14737 fi
14738
14739                 # Pthread try link: -lpthreads -lexc (ol_cv_pthread_lpthreads_lexc)
14740 if test "$ol_link_threads" = no ; then
14741         # try -lpthreads -lexc
14742         echo $ac_n "checking for pthread link with -lpthreads -lexc""... $ac_c" 1>&6
14743 echo "configure:14744: checking for pthread link with -lpthreads -lexc" >&5
14744 if eval "test \"\${ol_cv_pthread_lpthreads_lexc+set}\" = set"; then
14745   echo $ac_n "(cached) $ac_c" 1>&6
14746 else
14747   
14748                 # save the flags
14749                 ol_LIBS="$LIBS"
14750                 LIBS="-lpthreads -lexc $LIBS"
14751
14752                 if test "$cross_compiling" = yes; then
14753   cat > conftest.$ac_ext <<EOF
14754 #line 14755 "configure"
14755 #include "confdefs.h"
14756 /* pthread test headers */
14757 #include <pthread.h>
14758 #if HAVE_PTHREADS < 7
14759 #include <errno.h>
14760 #endif
14761 #ifndef NULL
14762 #define NULL (void*)0
14763 #endif
14764
14765 static void *task(p)
14766         void *p;
14767 {
14768         return (void *) (p == NULL);
14769 }
14770
14771 int main() {
14772
14773         /* pthread test function */
14774 #ifndef PTHREAD_CREATE_DETACHED
14775 #define PTHREAD_CREATE_DETACHED 1
14776 #endif
14777         pthread_t t;
14778         int status;
14779         int detach = PTHREAD_CREATE_DETACHED;
14780
14781 #if HAVE_PTHREADS > 4
14782         /* Final pthreads */
14783         pthread_attr_t attr;
14784
14785         status = pthread_attr_init(&attr);
14786         if( status ) return status;
14787
14788 #if HAVE_PTHREADS < 7
14789         status = pthread_attr_setdetachstate(&attr, &detach);
14790         if( status < 0 ) status = errno;
14791 #else
14792         status = pthread_attr_setdetachstate(&attr, detach);
14793 #endif
14794         if( status ) return status;
14795         status = pthread_create( &t, &attr, task, NULL );
14796 #if HAVE_PTHREADS < 7
14797         if( status < 0 ) status = errno;
14798 #endif
14799         if( status ) return status;
14800 #else
14801         /* Draft 4 pthreads */
14802         status = pthread_create( &t, pthread_attr_default, task, NULL );
14803         if( status ) return errno;
14804
14805         /* give thread a chance to complete */
14806         /* it should remain joinable and hence detachable */
14807         sleep( 1 );
14808
14809         status = pthread_detach( &t );
14810         if( status ) return errno;
14811 #endif
14812
14813 #ifdef HAVE_LINUX_THREADS
14814         pthread_kill_other_threads_np();
14815 #endif
14816
14817         return 0;
14818
14819 ; return 0; }
14820 EOF
14821 if { (eval echo configure:14822: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14822   rm -rf conftest*
14823   ol_cv_pthread_lpthreads_lexc=yes
14824 else
14825   echo "configure: failed program was:" >&5
14826   cat conftest.$ac_ext >&5
14827   rm -rf conftest*
14828   ol_cv_pthread_lpthreads_lexc=no
14829 fi
14830 rm -f conftest*
14831 else
14832   cat > conftest.$ac_ext <<EOF
14833 #line 14834 "configure"
14834 #include "confdefs.h"
14835 /* pthread test headers */
14836 #include <pthread.h>
14837 #if HAVE_PTHREADS < 7
14838 #include <errno.h>
14839 #endif
14840 #ifndef NULL
14841 #define NULL (void*)0
14842 #endif
14843
14844 static void *task(p)
14845         void *p;
14846 {
14847         return (void *) (p == NULL);
14848 }
14849
14850
14851 int main(argc, argv)
14852         int argc;
14853         char **argv;
14854 {
14855
14856         /* pthread test function */
14857 #ifndef PTHREAD_CREATE_DETACHED
14858 #define PTHREAD_CREATE_DETACHED 1
14859 #endif
14860         pthread_t t;
14861         int status;
14862         int detach = PTHREAD_CREATE_DETACHED;
14863
14864 #if HAVE_PTHREADS > 4
14865         /* Final pthreads */
14866         pthread_attr_t attr;
14867
14868         status = pthread_attr_init(&attr);
14869         if( status ) return status;
14870
14871 #if HAVE_PTHREADS < 7
14872         status = pthread_attr_setdetachstate(&attr, &detach);
14873         if( status < 0 ) status = errno;
14874 #else
14875         status = pthread_attr_setdetachstate(&attr, detach);
14876 #endif
14877         if( status ) return status;
14878         status = pthread_create( &t, &attr, task, NULL );
14879 #if HAVE_PTHREADS < 7
14880         if( status < 0 ) status = errno;
14881 #endif
14882         if( status ) return status;
14883 #else
14884         /* Draft 4 pthreads */
14885         status = pthread_create( &t, pthread_attr_default, task, NULL );
14886         if( status ) return errno;
14887
14888         /* give thread a chance to complete */
14889         /* it should remain joinable and hence detachable */
14890         sleep( 1 );
14891
14892         status = pthread_detach( &t );
14893         if( status ) return errno;
14894 #endif
14895
14896 #ifdef HAVE_LINUX_THREADS
14897         pthread_kill_other_threads_np();
14898 #endif
14899
14900         return 0;
14901
14902 }
14903
14904 EOF
14905 if { (eval echo configure:14906: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
14906 then
14907   ol_cv_pthread_lpthreads_lexc=yes
14908 else
14909   echo "configure: failed program was:" >&5
14910   cat conftest.$ac_ext >&5
14911   rm -fr conftest*
14912   ol_cv_pthread_lpthreads_lexc=no
14913 fi
14914 rm -fr conftest*
14915 fi
14916
14917
14918                 # restore the LIBS
14919                 LIBS="$ol_LIBS"
14920         
14921 fi
14922
14923 echo "$ac_t""$ol_cv_pthread_lpthreads_lexc" 1>&6
14924
14925         if test $ol_cv_pthread_lpthreads_lexc = yes ; then
14926                 ol_link_pthreads="-lpthreads -lexc"
14927                 ol_link_threads=posix
14928         fi
14929 fi
14930
14931
14932                 # Pthread try link: -lpthreads (ol_cv_pthread_lib_lpthreads)
14933 if test "$ol_link_threads" = no ; then
14934         # try -lpthreads
14935         echo $ac_n "checking for pthread link with -lpthreads""... $ac_c" 1>&6
14936 echo "configure:14937: checking for pthread link with -lpthreads" >&5
14937 if eval "test \"\${ol_cv_pthread_lib_lpthreads+set}\" = set"; then
14938   echo $ac_n "(cached) $ac_c" 1>&6
14939 else
14940   
14941                 # save the flags
14942                 ol_LIBS="$LIBS"
14943                 LIBS="-lpthreads $LIBS"
14944
14945                 if test "$cross_compiling" = yes; then
14946   cat > conftest.$ac_ext <<EOF
14947 #line 14948 "configure"
14948 #include "confdefs.h"
14949 /* pthread test headers */
14950 #include <pthread.h>
14951 #if HAVE_PTHREADS < 7
14952 #include <errno.h>
14953 #endif
14954 #ifndef NULL
14955 #define NULL (void*)0
14956 #endif
14957
14958 static void *task(p)
14959         void *p;
14960 {
14961         return (void *) (p == NULL);
14962 }
14963
14964 int main() {
14965
14966         /* pthread test function */
14967 #ifndef PTHREAD_CREATE_DETACHED
14968 #define PTHREAD_CREATE_DETACHED 1
14969 #endif
14970         pthread_t t;
14971         int status;
14972         int detach = PTHREAD_CREATE_DETACHED;
14973
14974 #if HAVE_PTHREADS > 4
14975         /* Final pthreads */
14976         pthread_attr_t attr;
14977
14978         status = pthread_attr_init(&attr);
14979         if( status ) return status;
14980
14981 #if HAVE_PTHREADS < 7
14982         status = pthread_attr_setdetachstate(&attr, &detach);
14983         if( status < 0 ) status = errno;
14984 #else
14985         status = pthread_attr_setdetachstate(&attr, detach);
14986 #endif
14987         if( status ) return status;
14988         status = pthread_create( &t, &attr, task, NULL );
14989 #if HAVE_PTHREADS < 7
14990         if( status < 0 ) status = errno;
14991 #endif
14992         if( status ) return status;
14993 #else
14994         /* Draft 4 pthreads */
14995         status = pthread_create( &t, pthread_attr_default, task, NULL );
14996         if( status ) return errno;
14997
14998         /* give thread a chance to complete */
14999         /* it should remain joinable and hence detachable */
15000         sleep( 1 );
15001
15002         status = pthread_detach( &t );
15003         if( status ) return errno;
15004 #endif
15005
15006 #ifdef HAVE_LINUX_THREADS
15007         pthread_kill_other_threads_np();
15008 #endif
15009
15010         return 0;
15011
15012 ; return 0; }
15013 EOF
15014 if { (eval echo configure:15015: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15015   rm -rf conftest*
15016   ol_cv_pthread_lib_lpthreads=yes
15017 else
15018   echo "configure: failed program was:" >&5
15019   cat conftest.$ac_ext >&5
15020   rm -rf conftest*
15021   ol_cv_pthread_lib_lpthreads=no
15022 fi
15023 rm -f conftest*
15024 else
15025   cat > conftest.$ac_ext <<EOF
15026 #line 15027 "configure"
15027 #include "confdefs.h"
15028 /* pthread test headers */
15029 #include <pthread.h>
15030 #if HAVE_PTHREADS < 7
15031 #include <errno.h>
15032 #endif
15033 #ifndef NULL
15034 #define NULL (void*)0
15035 #endif
15036
15037 static void *task(p)
15038         void *p;
15039 {
15040         return (void *) (p == NULL);
15041 }
15042
15043
15044 int main(argc, argv)
15045         int argc;
15046         char **argv;
15047 {
15048
15049         /* pthread test function */
15050 #ifndef PTHREAD_CREATE_DETACHED
15051 #define PTHREAD_CREATE_DETACHED 1
15052 #endif
15053         pthread_t t;
15054         int status;
15055         int detach = PTHREAD_CREATE_DETACHED;
15056
15057 #if HAVE_PTHREADS > 4
15058         /* Final pthreads */
15059         pthread_attr_t attr;
15060
15061         status = pthread_attr_init(&attr);
15062         if( status ) return status;
15063
15064 #if HAVE_PTHREADS < 7
15065         status = pthread_attr_setdetachstate(&attr, &detach);
15066         if( status < 0 ) status = errno;
15067 #else
15068         status = pthread_attr_setdetachstate(&attr, detach);
15069 #endif
15070         if( status ) return status;
15071         status = pthread_create( &t, &attr, task, NULL );
15072 #if HAVE_PTHREADS < 7
15073         if( status < 0 ) status = errno;
15074 #endif
15075         if( status ) return status;
15076 #else
15077         /* Draft 4 pthreads */
15078         status = pthread_create( &t, pthread_attr_default, task, NULL );
15079         if( status ) return errno;
15080
15081         /* give thread a chance to complete */
15082         /* it should remain joinable and hence detachable */
15083         sleep( 1 );
15084
15085         status = pthread_detach( &t );
15086         if( status ) return errno;
15087 #endif
15088
15089 #ifdef HAVE_LINUX_THREADS
15090         pthread_kill_other_threads_np();
15091 #endif
15092
15093         return 0;
15094
15095 }
15096
15097 EOF
15098 if { (eval echo configure:15099: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
15099 then
15100   ol_cv_pthread_lib_lpthreads=yes
15101 else
15102   echo "configure: failed program was:" >&5
15103   cat conftest.$ac_ext >&5
15104   rm -fr conftest*
15105   ol_cv_pthread_lib_lpthreads=no
15106 fi
15107 rm -fr conftest*
15108 fi
15109
15110
15111                 # restore the LIBS
15112                 LIBS="$ol_LIBS"
15113         
15114 fi
15115
15116 echo "$ac_t""$ol_cv_pthread_lib_lpthreads" 1>&6
15117
15118         if test $ol_cv_pthread_lib_lpthreads = yes ; then
15119                 ol_link_pthreads="-lpthreads"
15120                 ol_link_threads=posix
15121         fi
15122 fi
15123
15124
15125                 if test $ol_link_threads != no ; then
15126                         LTHREAD_LIBS="$LTHREAD_LIBS $ol_link_pthreads"
15127
15128                                                 save_CPPFLAGS="$CPPFLAGS"
15129                         save_LIBS="$LIBS"
15130                         LIBS="$LTHREAD_LIBS $LIBS"
15131
15132                                                                                                 for ac_func in sched_yield pthread_yield thr_yield
15133 do
15134 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15135 echo "configure:15136: checking for $ac_func" >&5
15136 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15137   echo $ac_n "(cached) $ac_c" 1>&6
15138 else
15139   cat > conftest.$ac_ext <<EOF
15140 #line 15141 "configure"
15141 #include "confdefs.h"
15142 /* System header to define __stub macros and hopefully few prototypes,
15143     which can conflict with char $ac_func(); below.  */
15144 #include <assert.h>
15145 /* Override any gcc2 internal prototype to avoid an error.  */
15146 /* We use char because int might match the return type of a gcc2
15147     builtin and then its argument prototype would still apply.  */
15148 char $ac_func();
15149 char (*f)();
15150
15151 int main() {
15152
15153 /* The GNU C library defines this for functions which it implements
15154     to always fail with ENOSYS.  Some functions are actually named
15155     something starting with __ and the normal name is an alias.  */
15156 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15157 choke me
15158 #else
15159 f = $ac_func;
15160 #endif
15161
15162 ; return 0; }
15163 EOF
15164 if { (eval echo configure:15165: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15165   rm -rf conftest*
15166   eval "ac_cv_func_$ac_func=yes"
15167 else
15168   echo "configure: failed program was:" >&5
15169   cat conftest.$ac_ext >&5
15170   rm -rf conftest*
15171   eval "ac_cv_func_$ac_func=no"
15172 fi
15173 rm -f conftest*
15174 fi
15175
15176 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15177   echo "$ac_t""yes" 1>&6
15178     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15179   cat >> confdefs.h <<EOF
15180 #define $ac_tr_func 1
15181 EOF
15182  
15183 else
15184   echo "$ac_t""no" 1>&6
15185 fi
15186 done
15187
15188
15189                         if test $ac_cv_func_sched_yield = no -a \
15190                                 $ac_cv_func_pthread_yield = no -a \
15191                                 $ac_cv_func_thr_yield = no ; then
15192                                                                 echo $ac_n "checking for sched_yield in -lrt""... $ac_c" 1>&6
15193 echo "configure:15194: checking for sched_yield in -lrt" >&5
15194 ac_lib_var=`echo rt'_'sched_yield | sed 'y%./+-:%__p__%'`
15195 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
15196   echo $ac_n "(cached) $ac_c" 1>&6
15197 else
15198   ac_save_LIBS="$LIBS"
15199 LIBS="-lrt  $LIBS"
15200 cat > conftest.$ac_ext <<EOF
15201 #line 15202 "configure"
15202 #include "confdefs.h"
15203 /* Override any gcc2 internal prototype to avoid an error.  */
15204 /* We use char because int might match the return type of a gcc2
15205     builtin and then its argument prototype would still apply.  */
15206 char sched_yield();
15207
15208 int main() {
15209 sched_yield()
15210 ; return 0; }
15211 EOF
15212 if { (eval echo configure:15213: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15213   rm -rf conftest*
15214   eval "ac_cv_lib_$ac_lib_var=yes"
15215 else
15216   echo "configure: failed program was:" >&5
15217   cat conftest.$ac_ext >&5
15218   rm -rf conftest*
15219   eval "ac_cv_lib_$ac_lib_var=no"
15220 fi
15221 rm -f conftest*
15222 LIBS="$ac_save_LIBS"
15223
15224 fi
15225 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
15226   echo "$ac_t""yes" 1>&6
15227   LTHREAD_LIBS="$LTHREAD_LIBS -lrt"
15228                                         cat >> confdefs.h <<\EOF
15229 #define HAVE_SCHED_YIELD 1
15230 EOF
15231
15232                                         ac_cv_func_sched_yield=yes
15233 else
15234   echo "$ac_t""no" 1>&6
15235 ac_cv_func_sched_yield=no
15236 fi
15237
15238                         fi
15239                         if test $ac_cv_func_sched_yield = no -a \
15240                                 $ac_cv_func_pthread_yield = no -a \
15241                                 "$ac_cv_func_thr_yield" = no ; then
15242                                 echo "configure: warning: could not locate sched_yield() or pthread_yield()" 1>&2
15243                         fi
15244
15245                                                 for ac_func in pthread_kill pthread_rwlock_destroy
15246 do
15247 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15248 echo "configure:15249: checking for $ac_func" >&5
15249 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15250   echo $ac_n "(cached) $ac_c" 1>&6
15251 else
15252   cat > conftest.$ac_ext <<EOF
15253 #line 15254 "configure"
15254 #include "confdefs.h"
15255 /* System header to define __stub macros and hopefully few prototypes,
15256     which can conflict with char $ac_func(); below.  */
15257 #include <assert.h>
15258 /* Override any gcc2 internal prototype to avoid an error.  */
15259 /* We use char because int might match the return type of a gcc2
15260     builtin and then its argument prototype would still apply.  */
15261 char $ac_func();
15262 char (*f)();
15263
15264 int main() {
15265
15266 /* The GNU C library defines this for functions which it implements
15267     to always fail with ENOSYS.  Some functions are actually named
15268     something starting with __ and the normal name is an alias.  */
15269 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15270 choke me
15271 #else
15272 f = $ac_func;
15273 #endif
15274
15275 ; return 0; }
15276 EOF
15277 if { (eval echo configure:15278: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15278   rm -rf conftest*
15279   eval "ac_cv_func_$ac_func=yes"
15280 else
15281   echo "configure: failed program was:" >&5
15282   cat conftest.$ac_ext >&5
15283   rm -rf conftest*
15284   eval "ac_cv_func_$ac_func=no"
15285 fi
15286 rm -f conftest*
15287 fi
15288
15289 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15290   echo "$ac_t""yes" 1>&6
15291     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15292   cat >> confdefs.h <<EOF
15293 #define $ac_tr_func 1
15294 EOF
15295  
15296 else
15297   echo "$ac_t""no" 1>&6
15298 fi
15299 done
15300
15301
15302                                                                         echo $ac_n "checking for pthread_detach with <pthread.h>""... $ac_c" 1>&6
15303 echo "configure:15304: checking for pthread_detach with <pthread.h>" >&5
15304 if eval "test \"\${ol_cv_func_pthread_detach+set}\" = set"; then
15305   echo $ac_n "(cached) $ac_c" 1>&6
15306 else
15307   
15308                                                                 cat > conftest.$ac_ext <<EOF
15309 #line 15310 "configure"
15310 #include "confdefs.h"
15311
15312 #include <pthread.h>
15313 #ifndef NULL
15314 #define NULL (void*)0
15315 #endif
15316
15317 int main() {
15318 pthread_detach(NULL);
15319 ; return 0; }
15320 EOF
15321 if { (eval echo configure:15322: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15322   rm -rf conftest*
15323   ol_cv_func_pthread_detach=yes
15324 else
15325   echo "configure: failed program was:" >&5
15326   cat conftest.$ac_ext >&5
15327   rm -rf conftest*
15328   ol_cv_func_pthread_detach=no
15329 fi
15330 rm -f conftest*
15331                         
15332 fi
15333
15334 echo "$ac_t""$ol_cv_func_pthread_detach" 1>&6
15335
15336                         if test $ol_cv_func_pthread_detach = no ; then
15337                                 { echo "configure: error: could not locate pthread_detach()" 1>&2; exit 1; }
15338                         fi
15339
15340                         cat >> confdefs.h <<\EOF
15341 #define HAVE_PTHREAD_DETACH 1
15342 EOF
15343
15344
15345                                                 for ac_func in \
15346                                 pthread_setconcurrency \
15347                                 pthread_getconcurrency \
15348                                 thr_setconcurrency \
15349                                 thr_getconcurrency \
15350                         
15351 do
15352 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15353 echo "configure:15354: checking for $ac_func" >&5
15354 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15355   echo $ac_n "(cached) $ac_c" 1>&6
15356 else
15357   cat > conftest.$ac_ext <<EOF
15358 #line 15359 "configure"
15359 #include "confdefs.h"
15360 /* System header to define __stub macros and hopefully few prototypes,
15361     which can conflict with char $ac_func(); below.  */
15362 #include <assert.h>
15363 /* Override any gcc2 internal prototype to avoid an error.  */
15364 /* We use char because int might match the return type of a gcc2
15365     builtin and then its argument prototype would still apply.  */
15366 char $ac_func();
15367 char (*f)();
15368
15369 int main() {
15370
15371 /* The GNU C library defines this for functions which it implements
15372     to always fail with ENOSYS.  Some functions are actually named
15373     something starting with __ and the normal name is an alias.  */
15374 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15375 choke me
15376 #else
15377 f = $ac_func;
15378 #endif
15379
15380 ; return 0; }
15381 EOF
15382 if { (eval echo configure:15383: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15383   rm -rf conftest*
15384   eval "ac_cv_func_$ac_func=yes"
15385 else
15386   echo "configure: failed program was:" >&5
15387   cat conftest.$ac_ext >&5
15388   rm -rf conftest*
15389   eval "ac_cv_func_$ac_func=no"
15390 fi
15391 rm -f conftest*
15392 fi
15393
15394 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15395   echo "$ac_t""yes" 1>&6
15396     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15397   cat >> confdefs.h <<EOF
15398 #define $ac_tr_func 1
15399 EOF
15400  
15401 else
15402   echo "$ac_t""no" 1>&6
15403 fi
15404 done
15405
15406
15407                         
15408         for ac_func in pthread_kill_other_threads_np
15409 do
15410 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15411 echo "configure:15412: checking for $ac_func" >&5
15412 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15413   echo $ac_n "(cached) $ac_c" 1>&6
15414 else
15415   cat > conftest.$ac_ext <<EOF
15416 #line 15417 "configure"
15417 #include "confdefs.h"
15418 /* System header to define __stub macros and hopefully few prototypes,
15419     which can conflict with char $ac_func(); below.  */
15420 #include <assert.h>
15421 /* Override any gcc2 internal prototype to avoid an error.  */
15422 /* We use char because int might match the return type of a gcc2
15423     builtin and then its argument prototype would still apply.  */
15424 char $ac_func();
15425 char (*f)();
15426
15427 int main() {
15428
15429 /* The GNU C library defines this for functions which it implements
15430     to always fail with ENOSYS.  Some functions are actually named
15431     something starting with __ and the normal name is an alias.  */
15432 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15433 choke me
15434 #else
15435 f = $ac_func;
15436 #endif
15437
15438 ; return 0; }
15439 EOF
15440 if { (eval echo configure:15441: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15441   rm -rf conftest*
15442   eval "ac_cv_func_$ac_func=yes"
15443 else
15444   echo "configure: failed program was:" >&5
15445   cat conftest.$ac_ext >&5
15446   rm -rf conftest*
15447   eval "ac_cv_func_$ac_func=no"
15448 fi
15449 rm -f conftest*
15450 fi
15451
15452 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15453   echo "$ac_t""yes" 1>&6
15454     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15455   cat >> confdefs.h <<EOF
15456 #define $ac_tr_func 1
15457 EOF
15458  
15459 else
15460   echo "$ac_t""no" 1>&6
15461 fi
15462 done
15463
15464         echo $ac_n "checking for LinuxThreads implementation""... $ac_c" 1>&6
15465 echo "configure:15466: checking for LinuxThreads implementation" >&5
15466 if eval "test \"\${ol_cv_sys_linux_threads+set}\" = set"; then
15467   echo $ac_n "(cached) $ac_c" 1>&6
15468 else
15469   ol_cv_sys_linux_threads=$ac_cv_func_pthread_kill_other_threads_np
15470 fi
15471
15472 echo "$ac_t""$ol_cv_sys_linux_threads" 1>&6
15473
15474                         
15475         
15476         
15477         echo $ac_n "checking for LinuxThreads consistency""... $ac_c" 1>&6
15478 echo "configure:15479: checking for LinuxThreads consistency" >&5
15479 if eval "test \"\${ol_cv_linux_threads+set}\" = set"; then
15480   echo $ac_n "(cached) $ac_c" 1>&6
15481 else
15482   
15483                 if test $ol_cv_header_linux_threads = yes -a \
15484                         $ol_cv_sys_linux_threads = yes; then
15485                         ol_cv_linux_threads=yes
15486                 elif test $ol_cv_header_linux_threads = no -a \
15487                         $ol_cv_sys_linux_threads = no; then
15488                         ol_cv_linux_threads=no
15489                 else
15490                         ol_cv_linux_threads=error
15491                 fi
15492         
15493 fi
15494
15495 echo "$ac_t""$ol_cv_linux_threads" 1>&6
15496
15497
15498                         if test $ol_cv_linux_threads = error; then
15499                                 { echo "configure: error: LinuxThreads header/library mismatch" 1>&2; exit 1; };
15500                         fi
15501
15502                         echo $ac_n "checking if pthread_create() works""... $ac_c" 1>&6
15503 echo "configure:15504: checking if pthread_create() works" >&5
15504 if eval "test \"\${ol_cv_pthread_create_works+set}\" = set"; then
15505   echo $ac_n "(cached) $ac_c" 1>&6
15506 else
15507   
15508                         if test "$cross_compiling" = yes; then
15509                                 ol_cv_pthread_create_works=yes
15510 else
15511   cat > conftest.$ac_ext <<EOF
15512 #line 15513 "configure"
15513 #include "confdefs.h"
15514 /* pthread test headers */
15515 #include <pthread.h>
15516 #if HAVE_PTHREADS < 7
15517 #include <errno.h>
15518 #endif
15519 #ifndef NULL
15520 #define NULL (void*)0
15521 #endif
15522
15523 static void *task(p)
15524         void *p;
15525 {
15526         return (void *) (p == NULL);
15527 }
15528
15529
15530 int main(argc, argv)
15531         int argc;
15532         char **argv;
15533 {
15534
15535         /* pthread test function */
15536 #ifndef PTHREAD_CREATE_DETACHED
15537 #define PTHREAD_CREATE_DETACHED 1
15538 #endif
15539         pthread_t t;
15540         int status;
15541         int detach = PTHREAD_CREATE_DETACHED;
15542
15543 #if HAVE_PTHREADS > 4
15544         /* Final pthreads */
15545         pthread_attr_t attr;
15546
15547         status = pthread_attr_init(&attr);
15548         if( status ) return status;
15549
15550 #if HAVE_PTHREADS < 7
15551         status = pthread_attr_setdetachstate(&attr, &detach);
15552         if( status < 0 ) status = errno;
15553 #else
15554         status = pthread_attr_setdetachstate(&attr, detach);
15555 #endif
15556         if( status ) return status;
15557         status = pthread_create( &t, &attr, task, NULL );
15558 #if HAVE_PTHREADS < 7
15559         if( status < 0 ) status = errno;
15560 #endif
15561         if( status ) return status;
15562 #else
15563         /* Draft 4 pthreads */
15564         status = pthread_create( &t, pthread_attr_default, task, NULL );
15565         if( status ) return errno;
15566
15567         /* give thread a chance to complete */
15568         /* it should remain joinable and hence detachable */
15569         sleep( 1 );
15570
15571         status = pthread_detach( &t );
15572         if( status ) return errno;
15573 #endif
15574
15575 #ifdef HAVE_LINUX_THREADS
15576         pthread_kill_other_threads_np();
15577 #endif
15578
15579         return 0;
15580
15581 }
15582
15583 EOF
15584 if { (eval echo configure:15585: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
15585 then
15586   ol_cv_pthread_create_works=yes
15587 else
15588   echo "configure: failed program was:" >&5
15589   cat conftest.$ac_ext >&5
15590   rm -fr conftest*
15591   ol_cv_pthread_create_works=no
15592 fi
15593 rm -fr conftest*
15594 fi
15595
15596 fi
15597
15598 echo "$ac_t""$ol_cv_pthread_create_works" 1>&6
15599
15600                         if test $ol_cv_pthread_create_works = no ; then
15601                                 { echo "configure: error: pthread_create is not usable, check environment settings" 1>&2; exit 1; }
15602                         fi
15603
15604                                                 if test $ol_with_yielding_select = auto ; then
15605                                 echo $ac_n "checking if select yields when using pthreads""... $ac_c" 1>&6
15606 echo "configure:15607: checking if select yields when using pthreads" >&5
15607 if eval "test \"\${ol_cv_pthread_select_yields+set}\" = set"; then
15608   echo $ac_n "(cached) $ac_c" 1>&6
15609 else
15610   
15611                                 if test "$cross_compiling" = yes; then
15612   ol_cv_pthread_select_yields=cross
15613 else
15614   cat > conftest.$ac_ext <<EOF
15615 #line 15616 "configure"
15616 #include "confdefs.h"
15617
15618 #include <sys/types.h>
15619 #include <sys/time.h>
15620 #include <unistd.h>
15621 #include <pthread.h>
15622 #ifndef NULL
15623 #define NULL (void*) 0
15624 #endif
15625
15626 static int fildes[2];
15627
15628 static void *task(p)
15629         void *p;
15630 {
15631         int i;
15632         struct timeval tv;
15633
15634         fd_set rfds;
15635
15636         tv.tv_sec=10;
15637         tv.tv_usec=0;
15638
15639         FD_ZERO(&rfds);
15640         FD_SET(fildes[0], &rfds);
15641
15642         /* we're not interested in any fds */
15643         i = select(FD_SETSIZE, &rfds, NULL, NULL, &tv);
15644
15645         if(i < 0) {
15646                 perror("select");
15647                 exit(10);
15648         }
15649
15650         exit(0); /* if we exit here, the select blocked the whole process */
15651 }
15652
15653 int main(argc, argv)
15654         int argc;
15655         char **argv;
15656 {
15657         pthread_t t;
15658
15659         /* create a pipe to select */
15660         if(pipe(&fildes[0])) {
15661                 perror("select");
15662                 exit(1);
15663         }
15664
15665 #ifdef HAVE_PTHREAD_SETCONCURRENCY
15666         (void) pthread_setconcurrency(2);
15667 #else
15668 #ifdef HAVE_THR_SETCONCURRENCY
15669         /* Set Solaris LWP concurrency to 2 */
15670         thr_setconcurrency(2);
15671 #endif
15672 #endif
15673
15674 #if HAVE_PTHREADS < 6
15675         pthread_create(&t, pthread_attr_default, task, NULL);
15676 #else
15677         pthread_create(&t, NULL, task, NULL);
15678 #endif
15679
15680         /* make sure task runs first */
15681 #if HAVE_THR_YIELD
15682         thr_yield();
15683 #elif defined( HAVE_SCHED_YIELD )
15684         sched_yield();
15685 #elif defined( HAVE_PTHREAD_YIELD )
15686         pthread_yield();
15687 #endif
15688
15689         exit(2);
15690 }
15691 EOF
15692 if { (eval echo configure:15693: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
15693 then
15694   ol_cv_pthread_select_yields=no
15695 else
15696   echo "configure: failed program was:" >&5
15697   cat conftest.$ac_ext >&5
15698   rm -fr conftest*
15699   ol_cv_pthread_select_yields=yes
15700 fi
15701 rm -fr conftest*
15702 fi
15703
15704 fi
15705
15706 echo "$ac_t""$ol_cv_pthread_select_yields" 1>&6
15707
15708                                 if test $ol_cv_pthread_select_yields = cross ; then
15709                                         { echo "configure: error: crossing compiling: use --with-yielding_select=yes|no|manual" 1>&2; exit 1; }
15710                                 fi
15711
15712                                 if test $ol_cv_pthread_select_yields = yes ; then
15713                                         ol_with_yielding_select=yes
15714                                 fi
15715                         fi
15716
15717                                                 CPPFLAGS="$save_CPPFLAGS"
15718                         LIBS="$save_LIBS"
15719                 else
15720                         { echo "configure: error: could not locate usable POSIX Threads" 1>&2; exit 1; }
15721                 fi
15722         fi
15723
15724         if test $ol_with_threads = posix ; then
15725                 { echo "configure: error: could not locate POSIX Threads" 1>&2; exit 1; }
15726         fi
15727 fi
15728
15729 if test $ol_with_threads = auto -o $ol_with_threads = yes \
15730         -o $ol_with_threads = mach ; then
15731
15732                 for ac_hdr in mach/cthreads.h cthreads.h
15733 do
15734 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15735 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15736 echo "configure:15737: checking for $ac_hdr" >&5
15737 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15738   echo $ac_n "(cached) $ac_c" 1>&6
15739 else
15740   cat > conftest.$ac_ext <<EOF
15741 #line 15742 "configure"
15742 #include "confdefs.h"
15743 #include <$ac_hdr>
15744 EOF
15745 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15746 { (eval echo configure:15747: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15747 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15748 if test -z "$ac_err"; then
15749   rm -rf conftest*
15750   eval "ac_cv_header_$ac_safe=yes"
15751 else
15752   echo "$ac_err" >&5
15753   echo "configure: failed program was:" >&5
15754   cat conftest.$ac_ext >&5
15755   rm -rf conftest*
15756   eval "ac_cv_header_$ac_safe=no"
15757 fi
15758 rm -f conftest*
15759 fi
15760 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15761   echo "$ac_t""yes" 1>&6
15762     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15763   cat >> confdefs.h <<EOF
15764 #define $ac_tr_hdr 1
15765 EOF
15766  
15767 else
15768   echo "$ac_t""no" 1>&6
15769 fi
15770 done
15771
15772         if test $ac_cv_header_mach_cthreads_h = yes ; then
15773                 ol_with_threads=found
15774
15775                                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
15776 echo "configure:15777: checking for cthread_fork" >&5
15777 if eval "test \"\${ac_cv_func_cthread_fork+set}\" = set"; then
15778   echo $ac_n "(cached) $ac_c" 1>&6
15779 else
15780   cat > conftest.$ac_ext <<EOF
15781 #line 15782 "configure"
15782 #include "confdefs.h"
15783 /* System header to define __stub macros and hopefully few prototypes,
15784     which can conflict with char cthread_fork(); below.  */
15785 #include <assert.h>
15786 /* Override any gcc2 internal prototype to avoid an error.  */
15787 /* We use char because int might match the return type of a gcc2
15788     builtin and then its argument prototype would still apply.  */
15789 char cthread_fork();
15790 char (*f)();
15791
15792 int main() {
15793
15794 /* The GNU C library defines this for functions which it implements
15795     to always fail with ENOSYS.  Some functions are actually named
15796     something starting with __ and the normal name is an alias.  */
15797 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
15798 choke me
15799 #else
15800 f = cthread_fork;
15801 #endif
15802
15803 ; return 0; }
15804 EOF
15805 if { (eval echo configure:15806: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15806   rm -rf conftest*
15807   eval "ac_cv_func_cthread_fork=yes"
15808 else
15809   echo "configure: failed program was:" >&5
15810   cat conftest.$ac_ext >&5
15811   rm -rf conftest*
15812   eval "ac_cv_func_cthread_fork=no"
15813 fi
15814 rm -f conftest*
15815 fi
15816
15817 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
15818   echo "$ac_t""yes" 1>&6
15819   ol_link_threads=yes
15820 else
15821   echo "$ac_t""no" 1>&6
15822 fi
15823
15824
15825                 if test $ol_link_threads = no ; then
15826                                                                         echo $ac_n "checking for cthread_fork with -all_load""... $ac_c" 1>&6
15827 echo "configure:15828: checking for cthread_fork with -all_load" >&5
15828 if eval "test \"\${ol_cv_cthread_all_load+set}\" = set"; then
15829   echo $ac_n "(cached) $ac_c" 1>&6
15830 else
15831   
15832                                                                 save_LIBS="$LIBS"
15833                                 LIBS="-all_load $LIBS"
15834                                 cat > conftest.$ac_ext <<EOF
15835 #line 15836 "configure"
15836 #include "confdefs.h"
15837 #include <mach/cthreads.h>
15838 int main() {
15839
15840                                         cthread_fork((void *)0, (void *)0);
15841                                         
15842 ; return 0; }
15843 EOF
15844 if { (eval echo configure:15845: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15845   rm -rf conftest*
15846   ol_cv_cthread_all_load=yes
15847 else
15848   echo "configure: failed program was:" >&5
15849   cat conftest.$ac_ext >&5
15850   rm -rf conftest*
15851   ol_cv_cthread_all_load=no
15852 fi
15853 rm -f conftest*
15854                                                                 LIBS="$save_LIBS"
15855                         
15856 fi
15857
15858 echo "$ac_t""$ol_cv_cthread_all_load" 1>&6
15859
15860                         if test $ol_cv_cthread_all_load = yes ; then
15861                                 LTHREAD_LIBS="$LTHREAD_LIBS -all_load"
15862                                 ol_link_threads=mach
15863                                 ol_with_threads=found
15864                         fi
15865                 fi
15866
15867         elif test $ac_cv_header_cthreads_h = yes ; then
15868                                 
15869                 ol_with_threads=found
15870  
15871                                 save_LIBS="$LIBS"
15872                 LIBS="$LIBS -lthreads"
15873                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
15874 echo "configure:15875: checking for cthread_fork" >&5
15875 if eval "test \"\${ac_cv_func_cthread_fork+set}\" = set"; then
15876   echo $ac_n "(cached) $ac_c" 1>&6
15877 else
15878   cat > conftest.$ac_ext <<EOF
15879 #line 15880 "configure"
15880 #include "confdefs.h"
15881 /* System header to define __stub macros and hopefully few prototypes,
15882     which can conflict with char cthread_fork(); below.  */
15883 #include <assert.h>
15884 /* Override any gcc2 internal prototype to avoid an error.  */
15885 /* We use char because int might match the return type of a gcc2
15886     builtin and then its argument prototype would still apply.  */
15887 char cthread_fork();
15888 char (*f)();
15889
15890 int main() {
15891
15892 /* The GNU C library defines this for functions which it implements
15893     to always fail with ENOSYS.  Some functions are actually named
15894     something starting with __ and the normal name is an alias.  */
15895 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
15896 choke me
15897 #else
15898 f = cthread_fork;
15899 #endif
15900
15901 ; return 0; }
15902 EOF
15903 if { (eval echo configure:15904: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15904   rm -rf conftest*
15905   eval "ac_cv_func_cthread_fork=yes"
15906 else
15907   echo "configure: failed program was:" >&5
15908   cat conftest.$ac_ext >&5
15909   rm -rf conftest*
15910   eval "ac_cv_func_cthread_fork=no"
15911 fi
15912 rm -f conftest*
15913 fi
15914
15915 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
15916   echo "$ac_t""yes" 1>&6
15917   ol_link_threads=yes
15918 else
15919   echo "$ac_t""no" 1>&6
15920 fi
15921
15922                 LIBS="$save_LIBS"
15923
15924                 if test $ol_link_threads = yes ; then
15925                         LTHREAD_LIBS="-lthreads"
15926                         ol_link_threads=mach
15927                         ol_with_threads=found
15928                 else
15929                         { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
15930                 fi
15931
15932         elif test $ol_with_threads = mach ; then
15933                 { echo "configure: error: could not locate Mach CThreads" 1>&2; exit 1; }
15934         fi
15935
15936         if test $ol_link_threads = mach ; then
15937                 cat >> confdefs.h <<\EOF
15938 #define HAVE_MACH_CTHREADS 1
15939 EOF
15940
15941         elif test $ol_with_threads = found ; then
15942                 { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
15943         fi
15944 fi
15945
15946 if test $ol_with_threads = auto -o $ol_with_threads = yes \
15947         -o $ol_with_threads = pth ; then
15948
15949         for ac_hdr in pth.h
15950 do
15951 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15952 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15953 echo "configure:15954: checking for $ac_hdr" >&5
15954 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15955   echo $ac_n "(cached) $ac_c" 1>&6
15956 else
15957   cat > conftest.$ac_ext <<EOF
15958 #line 15959 "configure"
15959 #include "confdefs.h"
15960 #include <$ac_hdr>
15961 EOF
15962 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15963 { (eval echo configure:15964: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15964 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15965 if test -z "$ac_err"; then
15966   rm -rf conftest*
15967   eval "ac_cv_header_$ac_safe=yes"
15968 else
15969   echo "$ac_err" >&5
15970   echo "configure: failed program was:" >&5
15971   cat conftest.$ac_ext >&5
15972   rm -rf conftest*
15973   eval "ac_cv_header_$ac_safe=no"
15974 fi
15975 rm -f conftest*
15976 fi
15977 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15978   echo "$ac_t""yes" 1>&6
15979     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15980   cat >> confdefs.h <<EOF
15981 #define $ac_tr_hdr 1
15982 EOF
15983  
15984 else
15985   echo "$ac_t""no" 1>&6
15986 fi
15987 done
15988
15989
15990         if test $ac_cv_header_pth_h = yes ; then
15991                 echo $ac_n "checking for pth_version in -lpth""... $ac_c" 1>&6
15992 echo "configure:15993: checking for pth_version in -lpth" >&5
15993 ac_lib_var=`echo pth'_'pth_version | sed 'y%./+-:%__p__%'`
15994 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
15995   echo $ac_n "(cached) $ac_c" 1>&6
15996 else
15997   ac_save_LIBS="$LIBS"
15998 LIBS="-lpth  $LIBS"
15999 cat > conftest.$ac_ext <<EOF
16000 #line 16001 "configure"
16001 #include "confdefs.h"
16002 /* Override any gcc2 internal prototype to avoid an error.  */
16003 /* We use char because int might match the return type of a gcc2
16004     builtin and then its argument prototype would still apply.  */
16005 char pth_version();
16006
16007 int main() {
16008 pth_version()
16009 ; return 0; }
16010 EOF
16011 if { (eval echo configure:16012: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16012   rm -rf conftest*
16013   eval "ac_cv_lib_$ac_lib_var=yes"
16014 else
16015   echo "configure: failed program was:" >&5
16016   cat conftest.$ac_ext >&5
16017   rm -rf conftest*
16018   eval "ac_cv_lib_$ac_lib_var=no"
16019 fi
16020 rm -f conftest*
16021 LIBS="$ac_save_LIBS"
16022
16023 fi
16024 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
16025   echo "$ac_t""yes" 1>&6
16026   have_pth=yes
16027 else
16028   echo "$ac_t""no" 1>&6
16029 have_pth=no
16030 fi
16031
16032
16033                 if test $have_pth = yes ; then
16034                         cat >> confdefs.h <<\EOF
16035 #define HAVE_GNU_PTH 1
16036 EOF
16037
16038                         LTHREAD_LIBS="$LTHREAD_LIBS -lpth"
16039                         ol_link_threads=pth
16040                         ol_with_threads=found
16041
16042                         if test $ol_with_yielding_select = auto ; then
16043                                 ol_with_yielding_select=yes
16044                         fi
16045                 fi
16046         fi
16047 fi
16048
16049 if test $ol_with_threads = auto -o $ol_with_threads = yes \
16050         -o $ol_with_threads = lwp ; then
16051
16052                 for ac_hdr in thread.h synch.h
16053 do
16054 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16055 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16056 echo "configure:16057: checking for $ac_hdr" >&5
16057 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16058   echo $ac_n "(cached) $ac_c" 1>&6
16059 else
16060   cat > conftest.$ac_ext <<EOF
16061 #line 16062 "configure"
16062 #include "confdefs.h"
16063 #include <$ac_hdr>
16064 EOF
16065 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16066 { (eval echo configure:16067: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16067 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16068 if test -z "$ac_err"; then
16069   rm -rf conftest*
16070   eval "ac_cv_header_$ac_safe=yes"
16071 else
16072   echo "$ac_err" >&5
16073   echo "configure: failed program was:" >&5
16074   cat conftest.$ac_ext >&5
16075   rm -rf conftest*
16076   eval "ac_cv_header_$ac_safe=no"
16077 fi
16078 rm -f conftest*
16079 fi
16080 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16081   echo "$ac_t""yes" 1>&6
16082     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16083   cat >> confdefs.h <<EOF
16084 #define $ac_tr_hdr 1
16085 EOF
16086  
16087 else
16088   echo "$ac_t""no" 1>&6
16089 fi
16090 done
16091
16092         if test $ac_cv_header_thread_h = yes -a $ac_cv_header_synch_h = yes ; then
16093                 echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6
16094 echo "configure:16095: checking for thr_create in -lthread" >&5
16095 ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-:%__p__%'`
16096 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
16097   echo $ac_n "(cached) $ac_c" 1>&6
16098 else
16099   ac_save_LIBS="$LIBS"
16100 LIBS="-lthread  $LIBS"
16101 cat > conftest.$ac_ext <<EOF
16102 #line 16103 "configure"
16103 #include "confdefs.h"
16104 /* Override any gcc2 internal prototype to avoid an error.  */
16105 /* We use char because int might match the return type of a gcc2
16106     builtin and then its argument prototype would still apply.  */
16107 char thr_create();
16108
16109 int main() {
16110 thr_create()
16111 ; return 0; }
16112 EOF
16113 if { (eval echo configure:16114: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16114   rm -rf conftest*
16115   eval "ac_cv_lib_$ac_lib_var=yes"
16116 else
16117   echo "configure: failed program was:" >&5
16118   cat conftest.$ac_ext >&5
16119   rm -rf conftest*
16120   eval "ac_cv_lib_$ac_lib_var=no"
16121 fi
16122 rm -f conftest*
16123 LIBS="$ac_save_LIBS"
16124
16125 fi
16126 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
16127   echo "$ac_t""yes" 1>&6
16128   have_thr=yes
16129 else
16130   echo "$ac_t""no" 1>&6
16131 have_thr=no
16132 fi
16133
16134
16135                 if test $have_thr = yes ; then
16136                         cat >> confdefs.h <<\EOF
16137 #define HAVE_THR 1
16138 EOF
16139
16140                         LTHREAD_LIBS="$LTHREAD_LIBS -lthread"
16141                         ol_link_threads=thr
16142
16143                         if test $ol_with_yielding_select = auto ; then
16144                                 ol_with_yielding_select=yes
16145                         fi
16146
16147                                                 for ac_func in \
16148                                 thr_setconcurrency \
16149                                 thr_getconcurrency \
16150                         
16151 do
16152 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
16153 echo "configure:16154: checking for $ac_func" >&5
16154 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
16155   echo $ac_n "(cached) $ac_c" 1>&6
16156 else
16157   cat > conftest.$ac_ext <<EOF
16158 #line 16159 "configure"
16159 #include "confdefs.h"
16160 /* System header to define __stub macros and hopefully few prototypes,
16161     which can conflict with char $ac_func(); below.  */
16162 #include <assert.h>
16163 /* Override any gcc2 internal prototype to avoid an error.  */
16164 /* We use char because int might match the return type of a gcc2
16165     builtin and then its argument prototype would still apply.  */
16166 char $ac_func();
16167 char (*f)();
16168
16169 int main() {
16170
16171 /* The GNU C library defines this for functions which it implements
16172     to always fail with ENOSYS.  Some functions are actually named
16173     something starting with __ and the normal name is an alias.  */
16174 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16175 choke me
16176 #else
16177 f = $ac_func;
16178 #endif
16179
16180 ; return 0; }
16181 EOF
16182 if { (eval echo configure:16183: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16183   rm -rf conftest*
16184   eval "ac_cv_func_$ac_func=yes"
16185 else
16186   echo "configure: failed program was:" >&5
16187   cat conftest.$ac_ext >&5
16188   rm -rf conftest*
16189   eval "ac_cv_func_$ac_func=no"
16190 fi
16191 rm -f conftest*
16192 fi
16193
16194 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
16195   echo "$ac_t""yes" 1>&6
16196     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
16197   cat >> confdefs.h <<EOF
16198 #define $ac_tr_func 1
16199 EOF
16200  
16201 else
16202   echo "$ac_t""no" 1>&6
16203 fi
16204 done
16205
16206                 fi
16207         fi
16208
16209                 for ac_hdr in lwp/lwp.h
16210 do
16211 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16212 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16213 echo "configure:16214: checking for $ac_hdr" >&5
16214 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16215   echo $ac_n "(cached) $ac_c" 1>&6
16216 else
16217   cat > conftest.$ac_ext <<EOF
16218 #line 16219 "configure"
16219 #include "confdefs.h"
16220 #include <$ac_hdr>
16221 EOF
16222 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16223 { (eval echo configure:16224: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16224 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16225 if test -z "$ac_err"; then
16226   rm -rf conftest*
16227   eval "ac_cv_header_$ac_safe=yes"
16228 else
16229   echo "$ac_err" >&5
16230   echo "configure: failed program was:" >&5
16231   cat conftest.$ac_ext >&5
16232   rm -rf conftest*
16233   eval "ac_cv_header_$ac_safe=no"
16234 fi
16235 rm -f conftest*
16236 fi
16237 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16238   echo "$ac_t""yes" 1>&6
16239     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16240   cat >> confdefs.h <<EOF
16241 #define $ac_tr_hdr 1
16242 EOF
16243  
16244 else
16245   echo "$ac_t""no" 1>&6
16246 fi
16247 done
16248
16249         if test $ac_cv_header_lwp_lwp_h = yes ; then
16250                 echo $ac_n "checking for lwp_create in -llwp""... $ac_c" 1>&6
16251 echo "configure:16252: checking for lwp_create in -llwp" >&5
16252 ac_lib_var=`echo lwp'_'lwp_create | sed 'y%./+-:%__p__%'`
16253 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
16254   echo $ac_n "(cached) $ac_c" 1>&6
16255 else
16256   ac_save_LIBS="$LIBS"
16257 LIBS="-llwp  $LIBS"
16258 cat > conftest.$ac_ext <<EOF
16259 #line 16260 "configure"
16260 #include "confdefs.h"
16261 /* Override any gcc2 internal prototype to avoid an error.  */
16262 /* We use char because int might match the return type of a gcc2
16263     builtin and then its argument prototype would still apply.  */
16264 char lwp_create();
16265
16266 int main() {
16267 lwp_create()
16268 ; return 0; }
16269 EOF
16270 if { (eval echo configure:16271: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16271   rm -rf conftest*
16272   eval "ac_cv_lib_$ac_lib_var=yes"
16273 else
16274   echo "configure: failed program was:" >&5
16275   cat conftest.$ac_ext >&5
16276   rm -rf conftest*
16277   eval "ac_cv_lib_$ac_lib_var=no"
16278 fi
16279 rm -f conftest*
16280 LIBS="$ac_save_LIBS"
16281
16282 fi
16283 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
16284   echo "$ac_t""yes" 1>&6
16285   have_lwp=yes
16286 else
16287   echo "$ac_t""no" 1>&6
16288 have_lwp=no
16289 fi
16290
16291
16292                 if test $have_lwp = yes ; then
16293                         cat >> confdefs.h <<\EOF
16294 #define HAVE_LWP 1
16295 EOF
16296
16297                         LTHREAD_LIBS="$LTHREAD_LIBS -llwp"
16298                         ol_link_threads=lwp
16299
16300                         if test $ol_with_yielding_select = auto ; then
16301                                 ol_with_yielding_select=no
16302                         fi
16303                 fi
16304         fi
16305 fi
16306
16307 if test $ol_with_yielding_select = yes ; then
16308         cat >> confdefs.h <<\EOF
16309 #define HAVE_YIELDING_SELECT 1
16310 EOF
16311
16312 fi
16313
16314 if test $ol_with_threads = manual ; then
16315                 ol_link_threads=yes
16316
16317         echo "configure: warning: thread defines and link options must be set manually" 1>&2
16318
16319         for ac_hdr in pthread.h sched.h
16320 do
16321 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16322 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16323 echo "configure:16324: checking for $ac_hdr" >&5
16324 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16325   echo $ac_n "(cached) $ac_c" 1>&6
16326 else
16327   cat > conftest.$ac_ext <<EOF
16328 #line 16329 "configure"
16329 #include "confdefs.h"
16330 #include <$ac_hdr>
16331 EOF
16332 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16333 { (eval echo configure:16334: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16334 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16335 if test -z "$ac_err"; then
16336   rm -rf conftest*
16337   eval "ac_cv_header_$ac_safe=yes"
16338 else
16339   echo "$ac_err" >&5
16340   echo "configure: failed program was:" >&5
16341   cat conftest.$ac_ext >&5
16342   rm -rf conftest*
16343   eval "ac_cv_header_$ac_safe=no"
16344 fi
16345 rm -f conftest*
16346 fi
16347 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16348   echo "$ac_t""yes" 1>&6
16349     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16350   cat >> confdefs.h <<EOF
16351 #define $ac_tr_hdr 1
16352 EOF
16353  
16354 else
16355   echo "$ac_t""no" 1>&6
16356 fi
16357 done
16358
16359         for ac_func in sched_yield pthread_yield
16360 do
16361 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
16362 echo "configure:16363: checking for $ac_func" >&5
16363 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
16364   echo $ac_n "(cached) $ac_c" 1>&6
16365 else
16366   cat > conftest.$ac_ext <<EOF
16367 #line 16368 "configure"
16368 #include "confdefs.h"
16369 /* System header to define __stub macros and hopefully few prototypes,
16370     which can conflict with char $ac_func(); below.  */
16371 #include <assert.h>
16372 /* Override any gcc2 internal prototype to avoid an error.  */
16373 /* We use char because int might match the return type of a gcc2
16374     builtin and then its argument prototype would still apply.  */
16375 char $ac_func();
16376 char (*f)();
16377
16378 int main() {
16379
16380 /* The GNU C library defines this for functions which it implements
16381     to always fail with ENOSYS.  Some functions are actually named
16382     something starting with __ and the normal name is an alias.  */
16383 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16384 choke me
16385 #else
16386 f = $ac_func;
16387 #endif
16388
16389 ; return 0; }
16390 EOF
16391 if { (eval echo configure:16392: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16392   rm -rf conftest*
16393   eval "ac_cv_func_$ac_func=yes"
16394 else
16395   echo "configure: failed program was:" >&5
16396   cat conftest.$ac_ext >&5
16397   rm -rf conftest*
16398   eval "ac_cv_func_$ac_func=no"
16399 fi
16400 rm -f conftest*
16401 fi
16402
16403 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
16404   echo "$ac_t""yes" 1>&6
16405     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
16406   cat >> confdefs.h <<EOF
16407 #define $ac_tr_func 1
16408 EOF
16409  
16410 else
16411   echo "$ac_t""no" 1>&6
16412 fi
16413 done
16414
16415         
16416         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
16417 echo "configure:16418: checking for LinuxThreads pthread.h" >&5
16418 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
16419   echo $ac_n "(cached) $ac_c" 1>&6
16420 else
16421   cat > conftest.$ac_ext <<EOF
16422 #line 16423 "configure"
16423 #include "confdefs.h"
16424 #include <pthread.h>
16425 EOF
16426 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16427   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
16428   rm -rf conftest*
16429   ol_cv_header_linux_threads=yes
16430 else
16431   rm -rf conftest*
16432   ol_cv_header_linux_threads=no
16433 fi
16434 rm -f conftest*
16435
16436                 
16437 fi
16438
16439 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
16440         if test $ol_cv_header_linux_threads = yes; then
16441                 cat >> confdefs.h <<\EOF
16442 #define HAVE_LINUX_THREADS 1
16443 EOF
16444
16445         fi
16446
16447
16448         for ac_hdr in mach/cthreads.h
16449 do
16450 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16451 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16452 echo "configure:16453: checking for $ac_hdr" >&5
16453 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16454   echo $ac_n "(cached) $ac_c" 1>&6
16455 else
16456   cat > conftest.$ac_ext <<EOF
16457 #line 16458 "configure"
16458 #include "confdefs.h"
16459 #include <$ac_hdr>
16460 EOF
16461 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16462 { (eval echo configure:16463: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16463 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16464 if test -z "$ac_err"; then
16465   rm -rf conftest*
16466   eval "ac_cv_header_$ac_safe=yes"
16467 else
16468   echo "$ac_err" >&5
16469   echo "configure: failed program was:" >&5
16470   cat conftest.$ac_ext >&5
16471   rm -rf conftest*
16472   eval "ac_cv_header_$ac_safe=no"
16473 fi
16474 rm -f conftest*
16475 fi
16476 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16477   echo "$ac_t""yes" 1>&6
16478     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16479   cat >> confdefs.h <<EOF
16480 #define $ac_tr_hdr 1
16481 EOF
16482  
16483 else
16484   echo "$ac_t""no" 1>&6
16485 fi
16486 done
16487
16488         for ac_hdr in lwp/lwp.h
16489 do
16490 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16491 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16492 echo "configure:16493: checking for $ac_hdr" >&5
16493 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16494   echo $ac_n "(cached) $ac_c" 1>&6
16495 else
16496   cat > conftest.$ac_ext <<EOF
16497 #line 16498 "configure"
16498 #include "confdefs.h"
16499 #include <$ac_hdr>
16500 EOF
16501 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16502 { (eval echo configure:16503: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16503 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16504 if test -z "$ac_err"; then
16505   rm -rf conftest*
16506   eval "ac_cv_header_$ac_safe=yes"
16507 else
16508   echo "$ac_err" >&5
16509   echo "configure: failed program was:" >&5
16510   cat conftest.$ac_ext >&5
16511   rm -rf conftest*
16512   eval "ac_cv_header_$ac_safe=no"
16513 fi
16514 rm -f conftest*
16515 fi
16516 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16517   echo "$ac_t""yes" 1>&6
16518     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16519   cat >> confdefs.h <<EOF
16520 #define $ac_tr_hdr 1
16521 EOF
16522  
16523 else
16524   echo "$ac_t""no" 1>&6
16525 fi
16526 done
16527
16528         for ac_hdr in thread.h synch.h
16529 do
16530 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16531 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16532 echo "configure:16533: checking for $ac_hdr" >&5
16533 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16534   echo $ac_n "(cached) $ac_c" 1>&6
16535 else
16536   cat > conftest.$ac_ext <<EOF
16537 #line 16538 "configure"
16538 #include "confdefs.h"
16539 #include <$ac_hdr>
16540 EOF
16541 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16542 { (eval echo configure:16543: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16543 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16544 if test -z "$ac_err"; then
16545   rm -rf conftest*
16546   eval "ac_cv_header_$ac_safe=yes"
16547 else
16548   echo "$ac_err" >&5
16549   echo "configure: failed program was:" >&5
16550   cat conftest.$ac_ext >&5
16551   rm -rf conftest*
16552   eval "ac_cv_header_$ac_safe=no"
16553 fi
16554 rm -f conftest*
16555 fi
16556 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16557   echo "$ac_t""yes" 1>&6
16558     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16559   cat >> confdefs.h <<EOF
16560 #define $ac_tr_hdr 1
16561 EOF
16562  
16563 else
16564   echo "$ac_t""no" 1>&6
16565 fi
16566 done
16567
16568 fi
16569
16570 if test $ol_link_threads != no -a $ol_link_threads != nt ; then  
16571                         cat >> confdefs.h <<\EOF
16572 #define REENTRANT 1
16573 EOF
16574
16575         cat >> confdefs.h <<\EOF
16576 #define _REENTRANT 1
16577 EOF
16578
16579         cat >> confdefs.h <<\EOF
16580 #define THREAD_SAFE 1
16581 EOF
16582
16583         cat >> confdefs.h <<\EOF
16584 #define _THREAD_SAFE 1
16585 EOF
16586
16587         cat >> confdefs.h <<\EOF
16588 #define THREADSAFE 1
16589 EOF
16590
16591         cat >> confdefs.h <<\EOF
16592 #define _THREADSAFE 1
16593 EOF
16594
16595         cat >> confdefs.h <<\EOF
16596 #define _SGI_MP_SOURCE 1
16597 EOF
16598
16599
16600                         echo $ac_n "checking for thread specific errno""... $ac_c" 1>&6
16601 echo "configure:16602: checking for thread specific errno" >&5
16602 if eval "test \"\${ol_cv_errno_thread_specific+set}\" = set"; then
16603   echo $ac_n "(cached) $ac_c" 1>&6
16604 else
16605   
16606                 cat > conftest.$ac_ext <<EOF
16607 #line 16608 "configure"
16608 #include "confdefs.h"
16609 #include <errno.h>
16610 int main() {
16611 errno = 0;
16612 ; return 0; }
16613 EOF
16614 if { (eval echo configure:16615: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16615   rm -rf conftest*
16616   ol_cv_errno_thread_specific=yes
16617 else
16618   echo "configure: failed program was:" >&5
16619   cat conftest.$ac_ext >&5
16620   rm -rf conftest*
16621   ol_cv_errno_thread_specific=no
16622 fi
16623 rm -f conftest*
16624         
16625 fi
16626
16627 echo "$ac_t""$ol_cv_errno_thread_specific" 1>&6
16628
16629                         echo $ac_n "checking for thread specific h_errno""... $ac_c" 1>&6
16630 echo "configure:16631: checking for thread specific h_errno" >&5
16631 if eval "test \"\${ol_cv_h_errno_thread_specific+set}\" = set"; then
16632   echo $ac_n "(cached) $ac_c" 1>&6
16633 else
16634   
16635                 cat > conftest.$ac_ext <<EOF
16636 #line 16637 "configure"
16637 #include "confdefs.h"
16638 #include <netdb.h>
16639 int main() {
16640 h_errno = 0;
16641 ; return 0; }
16642 EOF
16643 if { (eval echo configure:16644: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16644   rm -rf conftest*
16645   ol_cv_h_errno_thread_specific=yes
16646 else
16647   echo "configure: failed program was:" >&5
16648   cat conftest.$ac_ext >&5
16649   rm -rf conftest*
16650   ol_cv_h_errno_thread_specific=no
16651 fi
16652 rm -f conftest*
16653         
16654 fi
16655
16656 echo "$ac_t""$ol_cv_h_errno_thread_specific" 1>&6
16657
16658         if test $ol_cv_errno_thread_specific != yes \
16659                 -o $ol_cv_h_errno_thread_specific != yes ; then
16660                 LIBS="$LTHREAD_LIBS $LIBS"
16661                 LTHREAD_LIBS=""
16662         fi
16663
16664 fi  
16665
16666 if test $ol_link_threads = no ; then
16667         if test $ol_with_threads = yes ; then
16668                 { echo "configure: error: no suitable thread support" 1>&2; exit 1; }
16669         fi
16670
16671         if test $ol_with_threads = auto ; then
16672                 echo "configure: warning: no suitable thread support, disabling threads" 1>&2
16673                 ol_with_threads=no
16674         fi
16675
16676         cat >> confdefs.h <<\EOF
16677 #define NO_THREADS 1
16678 EOF
16679
16680         LTHREAD_LIBS=""
16681 fi
16682
16683 if test $ol_link_threads != no ; then
16684         cat >> confdefs.h <<\EOF
16685 #define LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE 1
16686 EOF
16687
16688 fi
16689
16690 for ac_func in \
16691         ctime_r                 \
16692         gethostbyname_r gethostbyaddr_r \
16693
16694 do
16695 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
16696 echo "configure:16697: checking for $ac_func" >&5
16697 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
16698   echo $ac_n "(cached) $ac_c" 1>&6
16699 else
16700   cat > conftest.$ac_ext <<EOF
16701 #line 16702 "configure"
16702 #include "confdefs.h"
16703 /* System header to define __stub macros and hopefully few prototypes,
16704     which can conflict with char $ac_func(); below.  */
16705 #include <assert.h>
16706 /* Override any gcc2 internal prototype to avoid an error.  */
16707 /* We use char because int might match the return type of a gcc2
16708     builtin and then its argument prototype would still apply.  */
16709 char $ac_func();
16710 char (*f)();
16711
16712 int main() {
16713
16714 /* The GNU C library defines this for functions which it implements
16715     to always fail with ENOSYS.  Some functions are actually named
16716     something starting with __ and the normal name is an alias.  */
16717 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16718 choke me
16719 #else
16720 f = $ac_func;
16721 #endif
16722
16723 ; return 0; }
16724 EOF
16725 if { (eval echo configure:16726: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16726   rm -rf conftest*
16727   eval "ac_cv_func_$ac_func=yes"
16728 else
16729   echo "configure: failed program was:" >&5
16730   cat conftest.$ac_ext >&5
16731   rm -rf conftest*
16732   eval "ac_cv_func_$ac_func=no"
16733 fi
16734 rm -f conftest*
16735 fi
16736
16737 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
16738   echo "$ac_t""yes" 1>&6
16739     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
16740   cat >> confdefs.h <<EOF
16741 #define $ac_tr_func 1
16742 EOF
16743  
16744 else
16745   echo "$ac_t""no" 1>&6
16746 fi
16747 done
16748
16749
16750 if test "$ac_cv_func_ctime_r" = no ; then
16751         ol_cv_func_ctime_r_nargs=0
16752 else
16753         echo $ac_n "checking number of arguments of ctime_r""... $ac_c" 1>&6
16754 echo "configure:16755: checking number of arguments of ctime_r" >&5
16755 if eval "test \"\${ol_cv_func_ctime_r_nargs+set}\" = set"; then
16756   echo $ac_n "(cached) $ac_c" 1>&6
16757 else
16758   cat > conftest.$ac_ext <<EOF
16759 #line 16760 "configure"
16760 #include "confdefs.h"
16761 #include <time.h>
16762 int main() {
16763 time_t ti; char *buffer; ctime_r(&ti,buffer,32);
16764 ; return 0; }
16765 EOF
16766 if { (eval echo configure:16767: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16767   rm -rf conftest*
16768   ol_cv_func_ctime_r_nargs3=yes
16769 else
16770   echo "configure: failed program was:" >&5
16771   cat conftest.$ac_ext >&5
16772   rm -rf conftest*
16773   ol_cv_func_ctime_r_nargs3=no
16774 fi
16775 rm -f conftest*
16776
16777         cat > conftest.$ac_ext <<EOF
16778 #line 16779 "configure"
16779 #include "confdefs.h"
16780 #include <time.h>
16781 int main() {
16782 time_t ti; char *buffer; ctime_r(&ti,buffer);
16783 ; return 0; }
16784 EOF
16785 if { (eval echo configure:16786: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16786   rm -rf conftest*
16787   ol_cv_func_ctime_r_nargs2=yes
16788 else
16789   echo "configure: failed program was:" >&5
16790   cat conftest.$ac_ext >&5
16791   rm -rf conftest*
16792   ol_cv_func_ctime_r_nargs2=no
16793 fi
16794 rm -f conftest*
16795
16796         if test $ol_cv_func_ctime_r_nargs3 = yes -a \
16797                 $ol_cv_func_ctime_r_nargs2 = no ; then
16798
16799                 ol_cv_func_ctime_r_nargs=3
16800
16801         elif test $ol_cv_func_ctime_r_nargs3 = no -a \
16802                 $ol_cv_func_ctime_r_nargs2 = yes ; then
16803
16804                 ol_cv_func_ctime_r_nargs=2
16805
16806         else
16807                 ol_cv_func_ctime_r_nargs=0
16808         fi
16809   
16810 fi
16811
16812 echo "$ac_t""$ol_cv_func_ctime_r_nargs" 1>&6
16813
16814   if test $ol_cv_func_ctime_r_nargs -gt 1 ; then
16815         cat >> confdefs.h <<EOF
16816 #define CTIME_R_NARGS $ol_cv_func_ctime_r_nargs
16817 EOF
16818
16819   fi
16820
16821 fi
16822
16823 if test "$ac_cv_func_gethostbyname_r" = yes ; then
16824         echo $ac_n "checking number of arguments of gethostbyname_r""... $ac_c" 1>&6
16825 echo "configure:16826: checking number of arguments of gethostbyname_r" >&5
16826 if eval "test \"\${ol_cv_func_gethostbyname_r_nargs+set}\" = set"; then
16827   echo $ac_n "(cached) $ac_c" 1>&6
16828 else
16829   cat > conftest.$ac_ext <<EOF
16830 #line 16831 "configure"
16831 #include "confdefs.h"
16832 #include <sys/types.h>
16833 #include <sys/socket.h>
16834 #include <netinet/in.h>
16835 #include <netdb.h>
16836 #define BUFSIZE (sizeof(struct hostent)+10)
16837 int main() {
16838 struct hostent hent; char buffer[BUFSIZE];
16839                 int bufsize=BUFSIZE;int h_errno;
16840                 (void)gethostbyname_r("segovia.cs.purdue.edu", &hent,
16841                         buffer, bufsize, &h_errno);
16842 ; return 0; }
16843 EOF
16844 if { (eval echo configure:16845: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16845   rm -rf conftest*
16846   ol_cv_func_gethostbyname_r_nargs5=yes
16847 else
16848   echo "configure: failed program was:" >&5
16849   cat conftest.$ac_ext >&5
16850   rm -rf conftest*
16851   ol_cv_func_gethostbyname_r_nargs5=no
16852 fi
16853 rm -f conftest*
16854
16855         cat > conftest.$ac_ext <<EOF
16856 #line 16857 "configure"
16857 #include "confdefs.h"
16858 #include <sys/types.h>
16859 #include <sys/socket.h>
16860 #include <netinet/in.h>
16861 #include <netdb.h>
16862 #define BUFSIZE (sizeof(struct hostent)+10)
16863 int main() {
16864 struct hostent hent;struct hostent *rhent;
16865                 char buffer[BUFSIZE];
16866                 int bufsize=BUFSIZE;int h_errno;
16867                 (void)gethostbyname_r("localhost", &hent, buffer, bufsize,
16868                         &rhent, &h_errno);
16869 ; return 0; }
16870 EOF
16871 if { (eval echo configure:16872: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16872   rm -rf conftest*
16873   ol_cv_func_gethostbyname_r_nargs6=yes
16874 else
16875   echo "configure: failed program was:" >&5
16876   cat conftest.$ac_ext >&5
16877   rm -rf conftest*
16878   ol_cv_func_gethostbyname_r_nargs6=no
16879 fi
16880 rm -f conftest*
16881
16882         if test $ol_cv_func_gethostbyname_r_nargs5 = yes -a \
16883                 $ol_cv_func_gethostbyname_r_nargs6 = no ; then
16884
16885                 ol_cv_func_gethostbyname_r_nargs=5
16886
16887         elif test $ol_cv_func_gethostbyname_r_nargs5 = no -a \
16888                 $ol_cv_func_gethostbyname_r_nargs6 = yes ; then
16889
16890                 ol_cv_func_gethostbyname_r_nargs=6
16891
16892         else
16893                 ol_cv_func_gethostbyname_r_nargs=0
16894         fi
16895   
16896 fi
16897
16898 echo "$ac_t""$ol_cv_func_gethostbyname_r_nargs" 1>&6
16899   if test $ol_cv_func_gethostbyname_r_nargs -gt 1 ; then
16900         cat >> confdefs.h <<EOF
16901 #define GETHOSTBYNAME_R_NARGS $ol_cv_func_gethostbyname_r_nargs
16902 EOF
16903
16904   fi
16905
16906 else
16907         ol_cv_func_gethostbyname_r_nargs=0
16908 fi
16909  
16910 if test "$ac_cv_func_gethostbyaddr_r" = yes ; then
16911         echo $ac_n "checking number of arguments of gethostbyaddr_r""... $ac_c" 1>&6
16912 echo "configure:16913: checking number of arguments of gethostbyaddr_r" >&5
16913 if eval "test \"\${ol_cv_func_gethostbyaddr_r_nargs+set}\" = set"; then
16914   echo $ac_n "(cached) $ac_c" 1>&6
16915 else
16916   cat > conftest.$ac_ext <<EOF
16917 #line 16918 "configure"
16918 #include "confdefs.h"
16919 #include <sys/types.h>
16920 #include <sys/socket.h>
16921 #include <netinet/in.h>
16922 #include <netdb.h>
16923 #define BUFSIZE (sizeof(struct hostent)+10)
16924 int main() {
16925 struct hostent hent; char buffer[BUFSIZE]; 
16926             struct in_addr add;
16927             size_t alen=sizeof(struct in_addr);
16928             int bufsize=BUFSIZE;int h_errno;
16929                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
16930                         alen, AF_INET, &hent, buffer, bufsize, &h_errno);
16931 ; return 0; }
16932 EOF
16933 if { (eval echo configure:16934: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16934   rm -rf conftest*
16935   ol_cv_func_gethostbyaddr_r_nargs7=yes
16936 else
16937   echo "configure: failed program was:" >&5
16938   cat conftest.$ac_ext >&5
16939   rm -rf conftest*
16940   ol_cv_func_gethostbyaddr_r_nargs7=no
16941 fi
16942 rm -f conftest*
16943
16944         cat > conftest.$ac_ext <<EOF
16945 #line 16946 "configure"
16946 #include "confdefs.h"
16947 #include <sys/types.h>
16948 #include <sys/socket.h>
16949 #include <netinet/in.h>
16950 #include <netdb.h>
16951 #define BUFSIZE (sizeof(struct hostent)+10)
16952 int main() {
16953 struct hostent hent;
16954                 struct hostent *rhent; char buffer[BUFSIZE]; 
16955                 struct in_addr add;
16956                 size_t alen=sizeof(struct in_addr);
16957                 int bufsize=BUFSIZE;int h_errno;
16958                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
16959                         alen, AF_INET, &hent, buffer, bufsize, 
16960                         &rhent, &h_errno);
16961 ; return 0; }
16962 EOF
16963 if { (eval echo configure:16964: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16964   rm -rf conftest*
16965   ol_cv_func_gethostbyaddr_r_nargs8=yes
16966 else
16967   echo "configure: failed program was:" >&5
16968   cat conftest.$ac_ext >&5
16969   rm -rf conftest*
16970   ol_cv_func_gethostbyaddr_r_nargs8=no
16971 fi
16972 rm -f conftest*
16973
16974         if test $ol_cv_func_gethostbyaddr_r_nargs7 = yes -a \
16975                 $ol_cv_func_gethostbyaddr_r_nargs8 = no ; then
16976
16977                 ol_cv_func_gethostbyaddr_r_nargs=7
16978
16979         elif test $ol_cv_func_gethostbyaddr_r_nargs7 = no -a \
16980                 $ol_cv_func_gethostbyaddr_r_nargs8 = yes ; then
16981
16982                 ol_cv_func_gethostbyaddr_r_nargs=8
16983
16984         else
16985                 ol_cv_func_gethostbyaddr_r_nargs=0
16986         fi
16987   
16988 fi
16989
16990 echo "$ac_t""$ol_cv_func_gethostbyaddr_r_nargs" 1>&6
16991   if test $ol_cv_func_gethostbyaddr_r_nargs -gt 1 ; then
16992     cat >> confdefs.h <<EOF
16993 #define GETHOSTBYADDR_R_NARGS $ol_cv_func_gethostbyaddr_r_nargs
16994 EOF
16995
16996   fi
16997
16998 else
16999         ol_cv_func_gethostbyaddr_r_nargs=0
17000 fi
17001
17002 ol_link_ldbm=no 
17003
17004 if test $ol_with_ldbm_api = auto \
17005         -o $ol_with_ldbm_api = berkeley \
17006         -o $ol_with_ldbm_api = bcompat ; then
17007
17008         if test $ol_with_ldbm_api = bcompat; then \
17009                 for ac_hdr in db_185.h db.h
17010 do
17011 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
17012 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
17013 echo "configure:17014: checking for $ac_hdr" >&5
17014 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
17015   echo $ac_n "(cached) $ac_c" 1>&6
17016 else
17017   cat > conftest.$ac_ext <<EOF
17018 #line 17019 "configure"
17019 #include "confdefs.h"
17020 #include <$ac_hdr>
17021 EOF
17022 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
17023 { (eval echo configure:17024: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
17024 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
17025 if test -z "$ac_err"; then
17026   rm -rf conftest*
17027   eval "ac_cv_header_$ac_safe=yes"
17028 else
17029   echo "$ac_err" >&5
17030   echo "configure: failed program was:" >&5
17031   cat conftest.$ac_ext >&5
17032   rm -rf conftest*
17033   eval "ac_cv_header_$ac_safe=no"
17034 fi
17035 rm -f conftest*
17036 fi
17037 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
17038   echo "$ac_t""yes" 1>&6
17039     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
17040   cat >> confdefs.h <<EOF
17041 #define $ac_tr_hdr 1
17042 EOF
17043  
17044 else
17045   echo "$ac_t""no" 1>&6
17046 fi
17047 done
17048
17049 if test $ac_cv_header_db_185_h = yes -o $ac_cv_header_db_h = yes; then
17050         echo $ac_n "checking if Berkeley DB header compatibility""... $ac_c" 1>&6
17051 echo "configure:17052: checking if Berkeley DB header compatibility" >&5
17052 if eval "test \"\${ol_cv_header_db1+set}\" = set"; then
17053   echo $ac_n "(cached) $ac_c" 1>&6
17054 else
17055   
17056                 cat > conftest.$ac_ext <<EOF
17057 #line 17058 "configure"
17058 #include "confdefs.h"
17059
17060 #if HAVE_DB_185_H
17061 #       include <db_185.h>
17062 #else
17063 #       include <db.h>
17064 #endif
17065
17066  /* this check could be improved */
17067 #ifndef DB_VERSION_MAJOR
17068 #       define DB_VERSION_MAJOR 1
17069 #endif
17070
17071 #if DB_VERSION_MAJOR == 1 
17072         __db_version_1
17073 #endif
17074
17075 EOF
17076 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
17077   egrep "__db_version_1" >/dev/null 2>&1; then
17078   rm -rf conftest*
17079   ol_cv_header_db1=yes
17080 else
17081   rm -rf conftest*
17082   ol_cv_header_db1=no
17083 fi
17084 rm -f conftest*
17085
17086 fi
17087
17088 echo "$ac_t""$ol_cv_header_db1" 1>&6
17089
17090         if test $ol_cv_header_db1 = yes ; then
17091                 ol_cv_lib_db=no
17092 if test $ol_cv_lib_db = no ; then
17093         echo $ac_n "checking for Berkeley DB link (default)""... $ac_c" 1>&6
17094 echo "configure:17095: checking for Berkeley DB link (default)" >&5
17095 if eval "test \"\${ol_cv_db_none+set}\" = set"; then
17096   echo $ac_n "(cached) $ac_c" 1>&6
17097 else
17098   
17099         ol_DB_LIB=
17100         ol_LIBS=$LIBS
17101         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17102
17103         cat > conftest.$ac_ext <<EOF
17104 #line 17105 "configure"
17105 #include "confdefs.h"
17106
17107 #ifdef HAVE_DB_185_H
17108 # include <db_185.h>
17109 #else
17110 # include <db.h>
17111 #endif
17112
17113 #ifndef DB_VERSION_MAJOR
17114 # define DB_VERSION_MAJOR 1
17115 #endif
17116
17117 #ifndef NULL
17118 #define NULL ((void*)0)
17119 #endif
17120
17121 int main() {
17122
17123 #if DB_VERSION_MAJOR > 1
17124         {
17125                 char *version;
17126                 int major, minor, patch;
17127
17128                 version = db_version( &major, &minor, &patch );
17129
17130                 if( major != DB_VERSION_MAJOR ||
17131                         minor < DB_VERSION_MINOR )
17132                 {
17133                         printf("Berkeley DB version mismatch\n"
17134                                 "\theader: %s\n\tlibrary: %s\n",
17135                                 DB_VERSION_STRING, version);
17136                         return 1;
17137                 }
17138         }
17139 #endif
17140
17141 #if DB_VERSION_MAJOR > 2
17142         db_env_create( NULL, 0 );
17143 #elif DB_VERSION_MAJOR > 1
17144         db_appexit( NULL );
17145 #else
17146         (void) dbopen( NULL, 0, 0, 0, NULL);
17147 #endif
17148
17149 ; return 0; }
17150 EOF
17151 if { (eval echo configure:17152: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17152   rm -rf conftest*
17153   ol_cv_db_none=yes
17154 else
17155   echo "configure: failed program was:" >&5
17156   cat conftest.$ac_ext >&5
17157   rm -rf conftest*
17158   ol_cv_db_none=no
17159 fi
17160 rm -f conftest*
17161
17162         LIBS="$ol_LIBS"
17163
17164 fi
17165
17166 echo "$ac_t""$ol_cv_db_none" 1>&6
17167
17168         if test $ol_cv_db_none = yes ; then
17169                 ol_cv_lib_db=yes
17170         fi
17171 fi
17172
17173 if test $ol_cv_lib_db = no ; then
17174         echo $ac_n "checking for Berkeley DB link (-ldb43)""... $ac_c" 1>&6
17175 echo "configure:17176: checking for Berkeley DB link (-ldb43)" >&5
17176 if eval "test \"\${ol_cv_db_db43+set}\" = set"; then
17177   echo $ac_n "(cached) $ac_c" 1>&6
17178 else
17179   
17180         ol_DB_LIB=-ldb43
17181         ol_LIBS=$LIBS
17182         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17183
17184         cat > conftest.$ac_ext <<EOF
17185 #line 17186 "configure"
17186 #include "confdefs.h"
17187
17188 #ifdef HAVE_DB_185_H
17189 # include <db_185.h>
17190 #else
17191 # include <db.h>
17192 #endif
17193
17194 #ifndef DB_VERSION_MAJOR
17195 # define DB_VERSION_MAJOR 1
17196 #endif
17197
17198 #ifndef NULL
17199 #define NULL ((void*)0)
17200 #endif
17201
17202 int main() {
17203
17204 #if DB_VERSION_MAJOR > 1
17205         {
17206                 char *version;
17207                 int major, minor, patch;
17208
17209                 version = db_version( &major, &minor, &patch );
17210
17211                 if( major != DB_VERSION_MAJOR ||
17212                         minor < DB_VERSION_MINOR )
17213                 {
17214                         printf("Berkeley DB version mismatch\n"
17215                                 "\theader: %s\n\tlibrary: %s\n",
17216                                 DB_VERSION_STRING, version);
17217                         return 1;
17218                 }
17219         }
17220 #endif
17221
17222 #if DB_VERSION_MAJOR > 2
17223         db_env_create( NULL, 0 );
17224 #elif DB_VERSION_MAJOR > 1
17225         db_appexit( NULL );
17226 #else
17227         (void) dbopen( NULL, 0, 0, 0, NULL);
17228 #endif
17229
17230 ; return 0; }
17231 EOF
17232 if { (eval echo configure:17233: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17233   rm -rf conftest*
17234   ol_cv_db_db43=yes
17235 else
17236   echo "configure: failed program was:" >&5
17237   cat conftest.$ac_ext >&5
17238   rm -rf conftest*
17239   ol_cv_db_db43=no
17240 fi
17241 rm -f conftest*
17242
17243         LIBS="$ol_LIBS"
17244
17245 fi
17246
17247 echo "$ac_t""$ol_cv_db_db43" 1>&6
17248
17249         if test $ol_cv_db_db43 = yes ; then
17250                 ol_cv_lib_db=-ldb43
17251         fi
17252 fi
17253
17254 if test $ol_cv_lib_db = no ; then
17255         echo $ac_n "checking for Berkeley DB link (-ldb-43)""... $ac_c" 1>&6
17256 echo "configure:17257: checking for Berkeley DB link (-ldb-43)" >&5
17257 if eval "test \"\${ol_cv_db_db_43+set}\" = set"; then
17258   echo $ac_n "(cached) $ac_c" 1>&6
17259 else
17260   
17261         ol_DB_LIB=-ldb-43
17262         ol_LIBS=$LIBS
17263         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17264
17265         cat > conftest.$ac_ext <<EOF
17266 #line 17267 "configure"
17267 #include "confdefs.h"
17268
17269 #ifdef HAVE_DB_185_H
17270 # include <db_185.h>
17271 #else
17272 # include <db.h>
17273 #endif
17274
17275 #ifndef DB_VERSION_MAJOR
17276 # define DB_VERSION_MAJOR 1
17277 #endif
17278
17279 #ifndef NULL
17280 #define NULL ((void*)0)
17281 #endif
17282
17283 int main() {
17284
17285 #if DB_VERSION_MAJOR > 1
17286         {
17287                 char *version;
17288                 int major, minor, patch;
17289
17290                 version = db_version( &major, &minor, &patch );
17291
17292                 if( major != DB_VERSION_MAJOR ||
17293                         minor < DB_VERSION_MINOR )
17294                 {
17295                         printf("Berkeley DB version mismatch\n"
17296                                 "\theader: %s\n\tlibrary: %s\n",
17297                                 DB_VERSION_STRING, version);
17298                         return 1;
17299                 }
17300         }
17301 #endif
17302
17303 #if DB_VERSION_MAJOR > 2
17304         db_env_create( NULL, 0 );
17305 #elif DB_VERSION_MAJOR > 1
17306         db_appexit( NULL );
17307 #else
17308         (void) dbopen( NULL, 0, 0, 0, NULL);
17309 #endif
17310
17311 ; return 0; }
17312 EOF
17313 if { (eval echo configure:17314: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17314   rm -rf conftest*
17315   ol_cv_db_db_43=yes
17316 else
17317   echo "configure: failed program was:" >&5
17318   cat conftest.$ac_ext >&5
17319   rm -rf conftest*
17320   ol_cv_db_db_43=no
17321 fi
17322 rm -f conftest*
17323
17324         LIBS="$ol_LIBS"
17325
17326 fi
17327
17328 echo "$ac_t""$ol_cv_db_db_43" 1>&6
17329
17330         if test $ol_cv_db_db_43 = yes ; then
17331                 ol_cv_lib_db=-ldb-43
17332         fi
17333 fi
17334
17335 if test $ol_cv_lib_db = no ; then
17336         echo $ac_n "checking for Berkeley DB link (-ldb-4.3)""... $ac_c" 1>&6
17337 echo "configure:17338: checking for Berkeley DB link (-ldb-4.3)" >&5
17338 if eval "test \"\${ol_cv_db_db_4_dot_3+set}\" = set"; then
17339   echo $ac_n "(cached) $ac_c" 1>&6
17340 else
17341   
17342         ol_DB_LIB=-ldb-4.3
17343         ol_LIBS=$LIBS
17344         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17345
17346         cat > conftest.$ac_ext <<EOF
17347 #line 17348 "configure"
17348 #include "confdefs.h"
17349
17350 #ifdef HAVE_DB_185_H
17351 # include <db_185.h>
17352 #else
17353 # include <db.h>
17354 #endif
17355
17356 #ifndef DB_VERSION_MAJOR
17357 # define DB_VERSION_MAJOR 1
17358 #endif
17359
17360 #ifndef NULL
17361 #define NULL ((void*)0)
17362 #endif
17363
17364 int main() {
17365
17366 #if DB_VERSION_MAJOR > 1
17367         {
17368                 char *version;
17369                 int major, minor, patch;
17370
17371                 version = db_version( &major, &minor, &patch );
17372
17373                 if( major != DB_VERSION_MAJOR ||
17374                         minor < DB_VERSION_MINOR )
17375                 {
17376                         printf("Berkeley DB version mismatch\n"
17377                                 "\theader: %s\n\tlibrary: %s\n",
17378                                 DB_VERSION_STRING, version);
17379                         return 1;
17380                 }
17381         }
17382 #endif
17383
17384 #if DB_VERSION_MAJOR > 2
17385         db_env_create( NULL, 0 );
17386 #elif DB_VERSION_MAJOR > 1
17387         db_appexit( NULL );
17388 #else
17389         (void) dbopen( NULL, 0, 0, 0, NULL);
17390 #endif
17391
17392 ; return 0; }
17393 EOF
17394 if { (eval echo configure:17395: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17395   rm -rf conftest*
17396   ol_cv_db_db_4_dot_3=yes
17397 else
17398   echo "configure: failed program was:" >&5
17399   cat conftest.$ac_ext >&5
17400   rm -rf conftest*
17401   ol_cv_db_db_4_dot_3=no
17402 fi
17403 rm -f conftest*
17404
17405         LIBS="$ol_LIBS"
17406
17407 fi
17408
17409 echo "$ac_t""$ol_cv_db_db_4_dot_3" 1>&6
17410
17411         if test $ol_cv_db_db_4_dot_3 = yes ; then
17412                 ol_cv_lib_db=-ldb-4.3
17413         fi
17414 fi
17415
17416 if test $ol_cv_lib_db = no ; then
17417         echo $ac_n "checking for Berkeley DB link (-ldb-4-3)""... $ac_c" 1>&6
17418 echo "configure:17419: checking for Berkeley DB link (-ldb-4-3)" >&5
17419 if eval "test \"\${ol_cv_db_db_4_3+set}\" = set"; then
17420   echo $ac_n "(cached) $ac_c" 1>&6
17421 else
17422   
17423         ol_DB_LIB=-ldb-4-3
17424         ol_LIBS=$LIBS
17425         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17426
17427         cat > conftest.$ac_ext <<EOF
17428 #line 17429 "configure"
17429 #include "confdefs.h"
17430
17431 #ifdef HAVE_DB_185_H
17432 # include <db_185.h>
17433 #else
17434 # include <db.h>
17435 #endif
17436
17437 #ifndef DB_VERSION_MAJOR
17438 # define DB_VERSION_MAJOR 1
17439 #endif
17440
17441 #ifndef NULL
17442 #define NULL ((void*)0)
17443 #endif
17444
17445 int main() {
17446
17447 #if DB_VERSION_MAJOR > 1
17448         {
17449                 char *version;
17450                 int major, minor, patch;
17451
17452                 version = db_version( &major, &minor, &patch );
17453
17454                 if( major != DB_VERSION_MAJOR ||
17455                         minor < DB_VERSION_MINOR )
17456                 {
17457                         printf("Berkeley DB version mismatch\n"
17458                                 "\theader: %s\n\tlibrary: %s\n",
17459                                 DB_VERSION_STRING, version);
17460                         return 1;
17461                 }
17462         }
17463 #endif
17464
17465 #if DB_VERSION_MAJOR > 2
17466         db_env_create( NULL, 0 );
17467 #elif DB_VERSION_MAJOR > 1
17468         db_appexit( NULL );
17469 #else
17470         (void) dbopen( NULL, 0, 0, 0, NULL);
17471 #endif
17472
17473 ; return 0; }
17474 EOF
17475 if { (eval echo configure:17476: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17476   rm -rf conftest*
17477   ol_cv_db_db_4_3=yes
17478 else
17479   echo "configure: failed program was:" >&5
17480   cat conftest.$ac_ext >&5
17481   rm -rf conftest*
17482   ol_cv_db_db_4_3=no
17483 fi
17484 rm -f conftest*
17485
17486         LIBS="$ol_LIBS"
17487
17488 fi
17489
17490 echo "$ac_t""$ol_cv_db_db_4_3" 1>&6
17491
17492         if test $ol_cv_db_db_4_3 = yes ; then
17493                 ol_cv_lib_db=-ldb-4-3
17494         fi
17495 fi
17496
17497 if test $ol_cv_lib_db = no ; then
17498         echo $ac_n "checking for Berkeley DB link (-ldb42)""... $ac_c" 1>&6
17499 echo "configure:17500: checking for Berkeley DB link (-ldb42)" >&5
17500 if eval "test \"\${ol_cv_db_db42+set}\" = set"; then
17501   echo $ac_n "(cached) $ac_c" 1>&6
17502 else
17503   
17504         ol_DB_LIB=-ldb42
17505         ol_LIBS=$LIBS
17506         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17507
17508         cat > conftest.$ac_ext <<EOF
17509 #line 17510 "configure"
17510 #include "confdefs.h"
17511
17512 #ifdef HAVE_DB_185_H
17513 # include <db_185.h>
17514 #else
17515 # include <db.h>
17516 #endif
17517
17518 #ifndef DB_VERSION_MAJOR
17519 # define DB_VERSION_MAJOR 1
17520 #endif
17521
17522 #ifndef NULL
17523 #define NULL ((void*)0)
17524 #endif
17525
17526 int main() {
17527
17528 #if DB_VERSION_MAJOR > 1
17529         {
17530                 char *version;
17531                 int major, minor, patch;
17532
17533                 version = db_version( &major, &minor, &patch );
17534
17535                 if( major != DB_VERSION_MAJOR ||
17536                         minor < DB_VERSION_MINOR )
17537                 {
17538                         printf("Berkeley DB version mismatch\n"
17539                                 "\theader: %s\n\tlibrary: %s\n",
17540                                 DB_VERSION_STRING, version);
17541                         return 1;
17542                 }
17543         }
17544 #endif
17545
17546 #if DB_VERSION_MAJOR > 2
17547         db_env_create( NULL, 0 );
17548 #elif DB_VERSION_MAJOR > 1
17549         db_appexit( NULL );
17550 #else
17551         (void) dbopen( NULL, 0, 0, 0, NULL);
17552 #endif
17553
17554 ; return 0; }
17555 EOF
17556 if { (eval echo configure:17557: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17557   rm -rf conftest*
17558   ol_cv_db_db42=yes
17559 else
17560   echo "configure: failed program was:" >&5
17561   cat conftest.$ac_ext >&5
17562   rm -rf conftest*
17563   ol_cv_db_db42=no
17564 fi
17565 rm -f conftest*
17566
17567         LIBS="$ol_LIBS"
17568
17569 fi
17570
17571 echo "$ac_t""$ol_cv_db_db42" 1>&6
17572
17573         if test $ol_cv_db_db42 = yes ; then
17574                 ol_cv_lib_db=-ldb42
17575         fi
17576 fi
17577
17578 if test $ol_cv_lib_db = no ; then
17579         echo $ac_n "checking for Berkeley DB link (-ldb-42)""... $ac_c" 1>&6
17580 echo "configure:17581: checking for Berkeley DB link (-ldb-42)" >&5
17581 if eval "test \"\${ol_cv_db_db_42+set}\" = set"; then
17582   echo $ac_n "(cached) $ac_c" 1>&6
17583 else
17584   
17585         ol_DB_LIB=-ldb-42
17586         ol_LIBS=$LIBS
17587         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17588
17589         cat > conftest.$ac_ext <<EOF
17590 #line 17591 "configure"
17591 #include "confdefs.h"
17592
17593 #ifdef HAVE_DB_185_H
17594 # include <db_185.h>
17595 #else
17596 # include <db.h>
17597 #endif
17598
17599 #ifndef DB_VERSION_MAJOR
17600 # define DB_VERSION_MAJOR 1
17601 #endif
17602
17603 #ifndef NULL
17604 #define NULL ((void*)0)
17605 #endif
17606
17607 int main() {
17608
17609 #if DB_VERSION_MAJOR > 1
17610         {
17611                 char *version;
17612                 int major, minor, patch;
17613
17614                 version = db_version( &major, &minor, &patch );
17615
17616                 if( major != DB_VERSION_MAJOR ||
17617                         minor < DB_VERSION_MINOR )
17618                 {
17619                         printf("Berkeley DB version mismatch\n"
17620                                 "\theader: %s\n\tlibrary: %s\n",
17621                                 DB_VERSION_STRING, version);
17622                         return 1;
17623                 }
17624         }
17625 #endif
17626
17627 #if DB_VERSION_MAJOR > 2
17628         db_env_create( NULL, 0 );
17629 #elif DB_VERSION_MAJOR > 1
17630         db_appexit( NULL );
17631 #else
17632         (void) dbopen( NULL, 0, 0, 0, NULL);
17633 #endif
17634
17635 ; return 0; }
17636 EOF
17637 if { (eval echo configure:17638: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17638   rm -rf conftest*
17639   ol_cv_db_db_42=yes
17640 else
17641   echo "configure: failed program was:" >&5
17642   cat conftest.$ac_ext >&5
17643   rm -rf conftest*
17644   ol_cv_db_db_42=no
17645 fi
17646 rm -f conftest*
17647
17648         LIBS="$ol_LIBS"
17649
17650 fi
17651
17652 echo "$ac_t""$ol_cv_db_db_42" 1>&6
17653
17654         if test $ol_cv_db_db_42 = yes ; then
17655                 ol_cv_lib_db=-ldb-42
17656         fi
17657 fi
17658
17659 if test $ol_cv_lib_db = no ; then
17660         echo $ac_n "checking for Berkeley DB link (-ldb-4.2)""... $ac_c" 1>&6
17661 echo "configure:17662: checking for Berkeley DB link (-ldb-4.2)" >&5
17662 if eval "test \"\${ol_cv_db_db_4_dot_2+set}\" = set"; then
17663   echo $ac_n "(cached) $ac_c" 1>&6
17664 else
17665   
17666         ol_DB_LIB=-ldb-4.2
17667         ol_LIBS=$LIBS
17668         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17669
17670         cat > conftest.$ac_ext <<EOF
17671 #line 17672 "configure"
17672 #include "confdefs.h"
17673
17674 #ifdef HAVE_DB_185_H
17675 # include <db_185.h>
17676 #else
17677 # include <db.h>
17678 #endif
17679
17680 #ifndef DB_VERSION_MAJOR
17681 # define DB_VERSION_MAJOR 1
17682 #endif
17683
17684 #ifndef NULL
17685 #define NULL ((void*)0)
17686 #endif
17687
17688 int main() {
17689
17690 #if DB_VERSION_MAJOR > 1
17691         {
17692                 char *version;
17693                 int major, minor, patch;
17694
17695                 version = db_version( &major, &minor, &patch );
17696
17697                 if( major != DB_VERSION_MAJOR ||
17698                         minor < DB_VERSION_MINOR )
17699                 {
17700                         printf("Berkeley DB version mismatch\n"
17701                                 "\theader: %s\n\tlibrary: %s\n",
17702                                 DB_VERSION_STRING, version);
17703                         return 1;
17704                 }
17705         }
17706 #endif
17707
17708 #if DB_VERSION_MAJOR > 2
17709         db_env_create( NULL, 0 );
17710 #elif DB_VERSION_MAJOR > 1
17711         db_appexit( NULL );
17712 #else
17713         (void) dbopen( NULL, 0, 0, 0, NULL);
17714 #endif
17715
17716 ; return 0; }
17717 EOF
17718 if { (eval echo configure:17719: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17719   rm -rf conftest*
17720   ol_cv_db_db_4_dot_2=yes
17721 else
17722   echo "configure: failed program was:" >&5
17723   cat conftest.$ac_ext >&5
17724   rm -rf conftest*
17725   ol_cv_db_db_4_dot_2=no
17726 fi
17727 rm -f conftest*
17728
17729         LIBS="$ol_LIBS"
17730
17731 fi
17732
17733 echo "$ac_t""$ol_cv_db_db_4_dot_2" 1>&6
17734
17735         if test $ol_cv_db_db_4_dot_2 = yes ; then
17736                 ol_cv_lib_db=-ldb-4.2
17737         fi
17738 fi
17739
17740 if test $ol_cv_lib_db = no ; then
17741         echo $ac_n "checking for Berkeley DB link (-ldb-4-2)""... $ac_c" 1>&6
17742 echo "configure:17743: checking for Berkeley DB link (-ldb-4-2)" >&5
17743 if eval "test \"\${ol_cv_db_db_4_2+set}\" = set"; then
17744   echo $ac_n "(cached) $ac_c" 1>&6
17745 else
17746   
17747         ol_DB_LIB=-ldb-4-2
17748         ol_LIBS=$LIBS
17749         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17750
17751         cat > conftest.$ac_ext <<EOF
17752 #line 17753 "configure"
17753 #include "confdefs.h"
17754
17755 #ifdef HAVE_DB_185_H
17756 # include <db_185.h>
17757 #else
17758 # include <db.h>
17759 #endif
17760
17761 #ifndef DB_VERSION_MAJOR
17762 # define DB_VERSION_MAJOR 1
17763 #endif
17764
17765 #ifndef NULL
17766 #define NULL ((void*)0)
17767 #endif
17768
17769 int main() {
17770
17771 #if DB_VERSION_MAJOR > 1
17772         {
17773                 char *version;
17774                 int major, minor, patch;
17775
17776                 version = db_version( &major, &minor, &patch );
17777
17778                 if( major != DB_VERSION_MAJOR ||
17779                         minor < DB_VERSION_MINOR )
17780                 {
17781                         printf("Berkeley DB version mismatch\n"
17782                                 "\theader: %s\n\tlibrary: %s\n",
17783                                 DB_VERSION_STRING, version);
17784                         return 1;
17785                 }
17786         }
17787 #endif
17788
17789 #if DB_VERSION_MAJOR > 2
17790         db_env_create( NULL, 0 );
17791 #elif DB_VERSION_MAJOR > 1
17792         db_appexit( NULL );
17793 #else
17794         (void) dbopen( NULL, 0, 0, 0, NULL);
17795 #endif
17796
17797 ; return 0; }
17798 EOF
17799 if { (eval echo configure:17800: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17800   rm -rf conftest*
17801   ol_cv_db_db_4_2=yes
17802 else
17803   echo "configure: failed program was:" >&5
17804   cat conftest.$ac_ext >&5
17805   rm -rf conftest*
17806   ol_cv_db_db_4_2=no
17807 fi
17808 rm -f conftest*
17809
17810         LIBS="$ol_LIBS"
17811
17812 fi
17813
17814 echo "$ac_t""$ol_cv_db_db_4_2" 1>&6
17815
17816         if test $ol_cv_db_db_4_2 = yes ; then
17817                 ol_cv_lib_db=-ldb-4-2
17818         fi
17819 fi
17820
17821 if test $ol_cv_lib_db = no ; then
17822         echo $ac_n "checking for Berkeley DB link (-ldb-4)""... $ac_c" 1>&6
17823 echo "configure:17824: checking for Berkeley DB link (-ldb-4)" >&5
17824 if eval "test \"\${ol_cv_db_db_4+set}\" = set"; then
17825   echo $ac_n "(cached) $ac_c" 1>&6
17826 else
17827   
17828         ol_DB_LIB=-ldb-4
17829         ol_LIBS=$LIBS
17830         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17831
17832         cat > conftest.$ac_ext <<EOF
17833 #line 17834 "configure"
17834 #include "confdefs.h"
17835
17836 #ifdef HAVE_DB_185_H
17837 # include <db_185.h>
17838 #else
17839 # include <db.h>
17840 #endif
17841
17842 #ifndef DB_VERSION_MAJOR
17843 # define DB_VERSION_MAJOR 1
17844 #endif
17845
17846 #ifndef NULL
17847 #define NULL ((void*)0)
17848 #endif
17849
17850 int main() {
17851
17852 #if DB_VERSION_MAJOR > 1
17853         {
17854                 char *version;
17855                 int major, minor, patch;
17856
17857                 version = db_version( &major, &minor, &patch );
17858
17859                 if( major != DB_VERSION_MAJOR ||
17860                         minor < DB_VERSION_MINOR )
17861                 {
17862                         printf("Berkeley DB version mismatch\n"
17863                                 "\theader: %s\n\tlibrary: %s\n",
17864                                 DB_VERSION_STRING, version);
17865                         return 1;
17866                 }
17867         }
17868 #endif
17869
17870 #if DB_VERSION_MAJOR > 2
17871         db_env_create( NULL, 0 );
17872 #elif DB_VERSION_MAJOR > 1
17873         db_appexit( NULL );
17874 #else
17875         (void) dbopen( NULL, 0, 0, 0, NULL);
17876 #endif
17877
17878 ; return 0; }
17879 EOF
17880 if { (eval echo configure:17881: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17881   rm -rf conftest*
17882   ol_cv_db_db_4=yes
17883 else
17884   echo "configure: failed program was:" >&5
17885   cat conftest.$ac_ext >&5
17886   rm -rf conftest*
17887   ol_cv_db_db_4=no
17888 fi
17889 rm -f conftest*
17890
17891         LIBS="$ol_LIBS"
17892
17893 fi
17894
17895 echo "$ac_t""$ol_cv_db_db_4" 1>&6
17896
17897         if test $ol_cv_db_db_4 = yes ; then
17898                 ol_cv_lib_db=-ldb-4
17899         fi
17900 fi
17901
17902 if test $ol_cv_lib_db = no ; then
17903         echo $ac_n "checking for Berkeley DB link (-ldb4)""... $ac_c" 1>&6
17904 echo "configure:17905: checking for Berkeley DB link (-ldb4)" >&5
17905 if eval "test \"\${ol_cv_db_db4+set}\" = set"; then
17906   echo $ac_n "(cached) $ac_c" 1>&6
17907 else
17908   
17909         ol_DB_LIB=-ldb4
17910         ol_LIBS=$LIBS
17911         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17912
17913         cat > conftest.$ac_ext <<EOF
17914 #line 17915 "configure"
17915 #include "confdefs.h"
17916
17917 #ifdef HAVE_DB_185_H
17918 # include <db_185.h>
17919 #else
17920 # include <db.h>
17921 #endif
17922
17923 #ifndef DB_VERSION_MAJOR
17924 # define DB_VERSION_MAJOR 1
17925 #endif
17926
17927 #ifndef NULL
17928 #define NULL ((void*)0)
17929 #endif
17930
17931 int main() {
17932
17933 #if DB_VERSION_MAJOR > 1
17934         {
17935                 char *version;
17936                 int major, minor, patch;
17937
17938                 version = db_version( &major, &minor, &patch );
17939
17940                 if( major != DB_VERSION_MAJOR ||
17941                         minor < DB_VERSION_MINOR )
17942                 {
17943                         printf("Berkeley DB version mismatch\n"
17944                                 "\theader: %s\n\tlibrary: %s\n",
17945                                 DB_VERSION_STRING, version);
17946                         return 1;
17947                 }
17948         }
17949 #endif
17950
17951 #if DB_VERSION_MAJOR > 2
17952         db_env_create( NULL, 0 );
17953 #elif DB_VERSION_MAJOR > 1
17954         db_appexit( NULL );
17955 #else
17956         (void) dbopen( NULL, 0, 0, 0, NULL);
17957 #endif
17958
17959 ; return 0; }
17960 EOF
17961 if { (eval echo configure:17962: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17962   rm -rf conftest*
17963   ol_cv_db_db4=yes
17964 else
17965   echo "configure: failed program was:" >&5
17966   cat conftest.$ac_ext >&5
17967   rm -rf conftest*
17968   ol_cv_db_db4=no
17969 fi
17970 rm -f conftest*
17971
17972         LIBS="$ol_LIBS"
17973
17974 fi
17975
17976 echo "$ac_t""$ol_cv_db_db4" 1>&6
17977
17978         if test $ol_cv_db_db4 = yes ; then
17979                 ol_cv_lib_db=-ldb4
17980         fi
17981 fi
17982
17983 if test $ol_cv_lib_db = no ; then
17984         echo $ac_n "checking for Berkeley DB link (-ldb)""... $ac_c" 1>&6
17985 echo "configure:17986: checking for Berkeley DB link (-ldb)" >&5
17986 if eval "test \"\${ol_cv_db_db+set}\" = set"; then
17987   echo $ac_n "(cached) $ac_c" 1>&6
17988 else
17989   
17990         ol_DB_LIB=-ldb
17991         ol_LIBS=$LIBS
17992         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17993
17994         cat > conftest.$ac_ext <<EOF
17995 #line 17996 "configure"
17996 #include "confdefs.h"
17997
17998 #ifdef HAVE_DB_185_H
17999 # include <db_185.h>
18000 #else
18001 # include <db.h>
18002 #endif
18003
18004 #ifndef DB_VERSION_MAJOR
18005 # define DB_VERSION_MAJOR 1
18006 #endif
18007
18008 #ifndef NULL
18009 #define NULL ((void*)0)
18010 #endif
18011
18012 int main() {
18013
18014 #if DB_VERSION_MAJOR > 1
18015         {
18016                 char *version;
18017                 int major, minor, patch;
18018
18019                 version = db_version( &major, &minor, &patch );
18020
18021                 if( major != DB_VERSION_MAJOR ||
18022                         minor < DB_VERSION_MINOR )
18023                 {
18024                         printf("Berkeley DB version mismatch\n"
18025                                 "\theader: %s\n\tlibrary: %s\n",
18026                                 DB_VERSION_STRING, version);
18027                         return 1;
18028                 }
18029         }
18030 #endif
18031
18032 #if DB_VERSION_MAJOR > 2
18033         db_env_create( NULL, 0 );
18034 #elif DB_VERSION_MAJOR > 1
18035         db_appexit( NULL );
18036 #else
18037         (void) dbopen( NULL, 0, 0, 0, NULL);
18038 #endif
18039
18040 ; return 0; }
18041 EOF
18042 if { (eval echo configure:18043: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18043   rm -rf conftest*
18044   ol_cv_db_db=yes
18045 else
18046   echo "configure: failed program was:" >&5
18047   cat conftest.$ac_ext >&5
18048   rm -rf conftest*
18049   ol_cv_db_db=no
18050 fi
18051 rm -f conftest*
18052
18053         LIBS="$ol_LIBS"
18054
18055 fi
18056
18057 echo "$ac_t""$ol_cv_db_db" 1>&6
18058
18059         if test $ol_cv_db_db = yes ; then
18060                 ol_cv_lib_db=-ldb
18061         fi
18062 fi
18063
18064 if test $ol_cv_lib_db = no ; then
18065         echo $ac_n "checking for Berkeley DB link (-ldb41)""... $ac_c" 1>&6
18066 echo "configure:18067: checking for Berkeley DB link (-ldb41)" >&5
18067 if eval "test \"\${ol_cv_db_db41+set}\" = set"; then
18068   echo $ac_n "(cached) $ac_c" 1>&6
18069 else
18070   
18071         ol_DB_LIB=-ldb41
18072         ol_LIBS=$LIBS
18073         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18074
18075         cat > conftest.$ac_ext <<EOF
18076 #line 18077 "configure"
18077 #include "confdefs.h"
18078
18079 #ifdef HAVE_DB_185_H
18080 # include <db_185.h>
18081 #else
18082 # include <db.h>
18083 #endif
18084
18085 #ifndef DB_VERSION_MAJOR
18086 # define DB_VERSION_MAJOR 1
18087 #endif
18088
18089 #ifndef NULL
18090 #define NULL ((void*)0)
18091 #endif
18092
18093 int main() {
18094
18095 #if DB_VERSION_MAJOR > 1
18096         {
18097                 char *version;
18098                 int major, minor, patch;
18099
18100                 version = db_version( &major, &minor, &patch );
18101
18102                 if( major != DB_VERSION_MAJOR ||
18103                         minor < DB_VERSION_MINOR )
18104                 {
18105                         printf("Berkeley DB version mismatch\n"
18106                                 "\theader: %s\n\tlibrary: %s\n",
18107                                 DB_VERSION_STRING, version);
18108                         return 1;
18109                 }
18110         }
18111 #endif
18112
18113 #if DB_VERSION_MAJOR > 2
18114         db_env_create( NULL, 0 );
18115 #elif DB_VERSION_MAJOR > 1
18116         db_appexit( NULL );
18117 #else
18118         (void) dbopen( NULL, 0, 0, 0, NULL);
18119 #endif
18120
18121 ; return 0; }
18122 EOF
18123 if { (eval echo configure:18124: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18124   rm -rf conftest*
18125   ol_cv_db_db41=yes
18126 else
18127   echo "configure: failed program was:" >&5
18128   cat conftest.$ac_ext >&5
18129   rm -rf conftest*
18130   ol_cv_db_db41=no
18131 fi
18132 rm -f conftest*
18133
18134         LIBS="$ol_LIBS"
18135
18136 fi
18137
18138 echo "$ac_t""$ol_cv_db_db41" 1>&6
18139
18140         if test $ol_cv_db_db41 = yes ; then
18141                 ol_cv_lib_db=-ldb41
18142         fi
18143 fi
18144
18145 if test $ol_cv_lib_db = no ; then
18146         echo $ac_n "checking for Berkeley DB link (-ldb-41)""... $ac_c" 1>&6
18147 echo "configure:18148: checking for Berkeley DB link (-ldb-41)" >&5
18148 if eval "test \"\${ol_cv_db_db_41+set}\" = set"; then
18149   echo $ac_n "(cached) $ac_c" 1>&6
18150 else
18151   
18152         ol_DB_LIB=-ldb-41
18153         ol_LIBS=$LIBS
18154         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18155
18156         cat > conftest.$ac_ext <<EOF
18157 #line 18158 "configure"
18158 #include "confdefs.h"
18159
18160 #ifdef HAVE_DB_185_H
18161 # include <db_185.h>
18162 #else
18163 # include <db.h>
18164 #endif
18165
18166 #ifndef DB_VERSION_MAJOR
18167 # define DB_VERSION_MAJOR 1
18168 #endif
18169
18170 #ifndef NULL
18171 #define NULL ((void*)0)
18172 #endif
18173
18174 int main() {
18175
18176 #if DB_VERSION_MAJOR > 1
18177         {
18178                 char *version;
18179                 int major, minor, patch;
18180
18181                 version = db_version( &major, &minor, &patch );
18182
18183                 if( major != DB_VERSION_MAJOR ||
18184                         minor < DB_VERSION_MINOR )
18185                 {
18186                         printf("Berkeley DB version mismatch\n"
18187                                 "\theader: %s\n\tlibrary: %s\n",
18188                                 DB_VERSION_STRING, version);
18189                         return 1;
18190                 }
18191         }
18192 #endif
18193
18194 #if DB_VERSION_MAJOR > 2
18195         db_env_create( NULL, 0 );
18196 #elif DB_VERSION_MAJOR > 1
18197         db_appexit( NULL );
18198 #else
18199         (void) dbopen( NULL, 0, 0, 0, NULL);
18200 #endif
18201
18202 ; return 0; }
18203 EOF
18204 if { (eval echo configure:18205: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18205   rm -rf conftest*
18206   ol_cv_db_db_41=yes
18207 else
18208   echo "configure: failed program was:" >&5
18209   cat conftest.$ac_ext >&5
18210   rm -rf conftest*
18211   ol_cv_db_db_41=no
18212 fi
18213 rm -f conftest*
18214
18215         LIBS="$ol_LIBS"
18216
18217 fi
18218
18219 echo "$ac_t""$ol_cv_db_db_41" 1>&6
18220
18221         if test $ol_cv_db_db_41 = yes ; then
18222                 ol_cv_lib_db=-ldb-41
18223         fi
18224 fi
18225
18226 if test $ol_cv_lib_db = no ; then
18227         echo $ac_n "checking for Berkeley DB link (-ldb-4.1)""... $ac_c" 1>&6
18228 echo "configure:18229: checking for Berkeley DB link (-ldb-4.1)" >&5
18229 if eval "test \"\${ol_cv_db_db_4_dot_1+set}\" = set"; then
18230   echo $ac_n "(cached) $ac_c" 1>&6
18231 else
18232   
18233         ol_DB_LIB=-ldb-4.1
18234         ol_LIBS=$LIBS
18235         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18236
18237         cat > conftest.$ac_ext <<EOF
18238 #line 18239 "configure"
18239 #include "confdefs.h"
18240
18241 #ifdef HAVE_DB_185_H
18242 # include <db_185.h>
18243 #else
18244 # include <db.h>
18245 #endif
18246
18247 #ifndef DB_VERSION_MAJOR
18248 # define DB_VERSION_MAJOR 1
18249 #endif
18250
18251 #ifndef NULL
18252 #define NULL ((void*)0)
18253 #endif
18254
18255 int main() {
18256
18257 #if DB_VERSION_MAJOR > 1
18258         {
18259                 char *version;
18260                 int major, minor, patch;
18261
18262                 version = db_version( &major, &minor, &patch );
18263
18264                 if( major != DB_VERSION_MAJOR ||
18265                         minor < DB_VERSION_MINOR )
18266                 {
18267                         printf("Berkeley DB version mismatch\n"
18268                                 "\theader: %s\n\tlibrary: %s\n",
18269                                 DB_VERSION_STRING, version);
18270                         return 1;
18271                 }
18272         }
18273 #endif
18274
18275 #if DB_VERSION_MAJOR > 2
18276         db_env_create( NULL, 0 );
18277 #elif DB_VERSION_MAJOR > 1
18278         db_appexit( NULL );
18279 #else
18280         (void) dbopen( NULL, 0, 0, 0, NULL);
18281 #endif
18282
18283 ; return 0; }
18284 EOF
18285 if { (eval echo configure:18286: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18286   rm -rf conftest*
18287   ol_cv_db_db_4_dot_1=yes
18288 else
18289   echo "configure: failed program was:" >&5
18290   cat conftest.$ac_ext >&5
18291   rm -rf conftest*
18292   ol_cv_db_db_4_dot_1=no
18293 fi
18294 rm -f conftest*
18295
18296         LIBS="$ol_LIBS"
18297
18298 fi
18299
18300 echo "$ac_t""$ol_cv_db_db_4_dot_1" 1>&6
18301
18302         if test $ol_cv_db_db_4_dot_1 = yes ; then
18303                 ol_cv_lib_db=-ldb-4.1
18304         fi
18305 fi
18306
18307 if test $ol_cv_lib_db = no ; then
18308         echo $ac_n "checking for Berkeley DB link (-ldb-4-1)""... $ac_c" 1>&6
18309 echo "configure:18310: checking for Berkeley DB link (-ldb-4-1)" >&5
18310 if eval "test \"\${ol_cv_db_db_4_1+set}\" = set"; then
18311   echo $ac_n "(cached) $ac_c" 1>&6
18312 else
18313   
18314         ol_DB_LIB=-ldb-4-1
18315         ol_LIBS=$LIBS
18316         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18317
18318         cat > conftest.$ac_ext <<EOF
18319 #line 18320 "configure"
18320 #include "confdefs.h"
18321
18322 #ifdef HAVE_DB_185_H
18323 # include <db_185.h>
18324 #else
18325 # include <db.h>
18326 #endif
18327
18328 #ifndef DB_VERSION_MAJOR
18329 # define DB_VERSION_MAJOR 1
18330 #endif
18331
18332 #ifndef NULL
18333 #define NULL ((void*)0)
18334 #endif
18335
18336 int main() {
18337
18338 #if DB_VERSION_MAJOR > 1
18339         {
18340                 char *version;
18341                 int major, minor, patch;
18342
18343                 version = db_version( &major, &minor, &patch );
18344
18345                 if( major != DB_VERSION_MAJOR ||
18346                         minor < DB_VERSION_MINOR )
18347                 {
18348                         printf("Berkeley DB version mismatch\n"
18349                                 "\theader: %s\n\tlibrary: %s\n",
18350                                 DB_VERSION_STRING, version);
18351                         return 1;
18352                 }
18353         }
18354 #endif
18355
18356 #if DB_VERSION_MAJOR > 2
18357         db_env_create( NULL, 0 );
18358 #elif DB_VERSION_MAJOR > 1
18359         db_appexit( NULL );
18360 #else
18361         (void) dbopen( NULL, 0, 0, 0, NULL);
18362 #endif
18363
18364 ; return 0; }
18365 EOF
18366 if { (eval echo configure:18367: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18367   rm -rf conftest*
18368   ol_cv_db_db_4_1=yes
18369 else
18370   echo "configure: failed program was:" >&5
18371   cat conftest.$ac_ext >&5
18372   rm -rf conftest*
18373   ol_cv_db_db_4_1=no
18374 fi
18375 rm -f conftest*
18376
18377         LIBS="$ol_LIBS"
18378
18379 fi
18380
18381 echo "$ac_t""$ol_cv_db_db_4_1" 1>&6
18382
18383         if test $ol_cv_db_db_4_1 = yes ; then
18384                 ol_cv_lib_db=-ldb-4-1
18385         fi
18386 fi
18387
18388 if test $ol_cv_lib_db = no ; then
18389         echo $ac_n "checking for Berkeley DB link (-ldb3)""... $ac_c" 1>&6
18390 echo "configure:18391: checking for Berkeley DB link (-ldb3)" >&5
18391 if eval "test \"\${ol_cv_db_db3+set}\" = set"; then
18392   echo $ac_n "(cached) $ac_c" 1>&6
18393 else
18394   
18395         ol_DB_LIB=-ldb3
18396         ol_LIBS=$LIBS
18397         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18398
18399         cat > conftest.$ac_ext <<EOF
18400 #line 18401 "configure"
18401 #include "confdefs.h"
18402
18403 #ifdef HAVE_DB_185_H
18404 # include <db_185.h>
18405 #else
18406 # include <db.h>
18407 #endif
18408
18409 #ifndef DB_VERSION_MAJOR
18410 # define DB_VERSION_MAJOR 1
18411 #endif
18412
18413 #ifndef NULL
18414 #define NULL ((void*)0)
18415 #endif
18416
18417 int main() {
18418
18419 #if DB_VERSION_MAJOR > 1
18420         {
18421                 char *version;
18422                 int major, minor, patch;
18423
18424                 version = db_version( &major, &minor, &patch );
18425
18426                 if( major != DB_VERSION_MAJOR ||
18427                         minor < DB_VERSION_MINOR )
18428                 {
18429                         printf("Berkeley DB version mismatch\n"
18430                                 "\theader: %s\n\tlibrary: %s\n",
18431                                 DB_VERSION_STRING, version);
18432                         return 1;
18433                 }
18434         }
18435 #endif
18436
18437 #if DB_VERSION_MAJOR > 2
18438         db_env_create( NULL, 0 );
18439 #elif DB_VERSION_MAJOR > 1
18440         db_appexit( NULL );
18441 #else
18442         (void) dbopen( NULL, 0, 0, 0, NULL);
18443 #endif
18444
18445 ; return 0; }
18446 EOF
18447 if { (eval echo configure:18448: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18448   rm -rf conftest*
18449   ol_cv_db_db3=yes
18450 else
18451   echo "configure: failed program was:" >&5
18452   cat conftest.$ac_ext >&5
18453   rm -rf conftest*
18454   ol_cv_db_db3=no
18455 fi
18456 rm -f conftest*
18457
18458         LIBS="$ol_LIBS"
18459
18460 fi
18461
18462 echo "$ac_t""$ol_cv_db_db3" 1>&6
18463
18464         if test $ol_cv_db_db3 = yes ; then
18465                 ol_cv_lib_db=-ldb3
18466         fi
18467 fi
18468
18469 if test $ol_cv_lib_db = no ; then
18470         echo $ac_n "checking for Berkeley DB link (-ldb-3)""... $ac_c" 1>&6
18471 echo "configure:18472: checking for Berkeley DB link (-ldb-3)" >&5
18472 if eval "test \"\${ol_cv_db_db_3+set}\" = set"; then
18473   echo $ac_n "(cached) $ac_c" 1>&6
18474 else
18475   
18476         ol_DB_LIB=-ldb-3
18477         ol_LIBS=$LIBS
18478         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18479
18480         cat > conftest.$ac_ext <<EOF
18481 #line 18482 "configure"
18482 #include "confdefs.h"
18483
18484 #ifdef HAVE_DB_185_H
18485 # include <db_185.h>
18486 #else
18487 # include <db.h>
18488 #endif
18489
18490 #ifndef DB_VERSION_MAJOR
18491 # define DB_VERSION_MAJOR 1
18492 #endif
18493
18494 #ifndef NULL
18495 #define NULL ((void*)0)
18496 #endif
18497
18498 int main() {
18499
18500 #if DB_VERSION_MAJOR > 1
18501         {
18502                 char *version;
18503                 int major, minor, patch;
18504
18505                 version = db_version( &major, &minor, &patch );
18506
18507                 if( major != DB_VERSION_MAJOR ||
18508                         minor < DB_VERSION_MINOR )
18509                 {
18510                         printf("Berkeley DB version mismatch\n"
18511                                 "\theader: %s\n\tlibrary: %s\n",
18512                                 DB_VERSION_STRING, version);
18513                         return 1;
18514                 }
18515         }
18516 #endif
18517
18518 #if DB_VERSION_MAJOR > 2
18519         db_env_create( NULL, 0 );
18520 #elif DB_VERSION_MAJOR > 1
18521         db_appexit( NULL );
18522 #else
18523         (void) dbopen( NULL, 0, 0, 0, NULL);
18524 #endif
18525
18526 ; return 0; }
18527 EOF
18528 if { (eval echo configure:18529: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18529   rm -rf conftest*
18530   ol_cv_db_db_3=yes
18531 else
18532   echo "configure: failed program was:" >&5
18533   cat conftest.$ac_ext >&5
18534   rm -rf conftest*
18535   ol_cv_db_db_3=no
18536 fi
18537 rm -f conftest*
18538
18539         LIBS="$ol_LIBS"
18540
18541 fi
18542
18543 echo "$ac_t""$ol_cv_db_db_3" 1>&6
18544
18545         if test $ol_cv_db_db_3 = yes ; then
18546                 ol_cv_lib_db=-ldb-3
18547         fi
18548 fi
18549
18550 if test $ol_cv_lib_db = no ; then
18551         echo $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6
18552 echo "configure:18553: checking for Berkeley DB link (-ldb2)" >&5
18553 if eval "test \"\${ol_cv_db_db2+set}\" = set"; then
18554   echo $ac_n "(cached) $ac_c" 1>&6
18555 else
18556   
18557         ol_DB_LIB=-ldb2
18558         ol_LIBS=$LIBS
18559         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18560
18561         cat > conftest.$ac_ext <<EOF
18562 #line 18563 "configure"
18563 #include "confdefs.h"
18564
18565 #ifdef HAVE_DB_185_H
18566 # include <db_185.h>
18567 #else
18568 # include <db.h>
18569 #endif
18570
18571 #ifndef DB_VERSION_MAJOR
18572 # define DB_VERSION_MAJOR 1
18573 #endif
18574
18575 #ifndef NULL
18576 #define NULL ((void*)0)
18577 #endif
18578
18579 int main() {
18580
18581 #if DB_VERSION_MAJOR > 1
18582         {
18583                 char *version;
18584                 int major, minor, patch;
18585
18586                 version = db_version( &major, &minor, &patch );
18587
18588                 if( major != DB_VERSION_MAJOR ||
18589                         minor < DB_VERSION_MINOR )
18590                 {
18591                         printf("Berkeley DB version mismatch\n"
18592                                 "\theader: %s\n\tlibrary: %s\n",
18593                                 DB_VERSION_STRING, version);
18594                         return 1;
18595                 }
18596         }
18597 #endif
18598
18599 #if DB_VERSION_MAJOR > 2
18600         db_env_create( NULL, 0 );
18601 #elif DB_VERSION_MAJOR > 1
18602         db_appexit( NULL );
18603 #else
18604         (void) dbopen( NULL, 0, 0, 0, NULL);
18605 #endif
18606
18607 ; return 0; }
18608 EOF
18609 if { (eval echo configure:18610: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18610   rm -rf conftest*
18611   ol_cv_db_db2=yes
18612 else
18613   echo "configure: failed program was:" >&5
18614   cat conftest.$ac_ext >&5
18615   rm -rf conftest*
18616   ol_cv_db_db2=no
18617 fi
18618 rm -f conftest*
18619
18620         LIBS="$ol_LIBS"
18621
18622 fi
18623
18624 echo "$ac_t""$ol_cv_db_db2" 1>&6
18625
18626         if test $ol_cv_db_db2 = yes ; then
18627                 ol_cv_lib_db=-ldb2
18628         fi
18629 fi
18630
18631 if test $ol_cv_lib_db = no ; then
18632         echo $ac_n "checking for Berkeley DB link (-ldb-2)""... $ac_c" 1>&6
18633 echo "configure:18634: checking for Berkeley DB link (-ldb-2)" >&5
18634 if eval "test \"\${ol_cv_db_db_2+set}\" = set"; then
18635   echo $ac_n "(cached) $ac_c" 1>&6
18636 else
18637   
18638         ol_DB_LIB=-ldb-2
18639         ol_LIBS=$LIBS
18640         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18641
18642         cat > conftest.$ac_ext <<EOF
18643 #line 18644 "configure"
18644 #include "confdefs.h"
18645
18646 #ifdef HAVE_DB_185_H
18647 # include <db_185.h>
18648 #else
18649 # include <db.h>
18650 #endif
18651
18652 #ifndef DB_VERSION_MAJOR
18653 # define DB_VERSION_MAJOR 1
18654 #endif
18655
18656 #ifndef NULL
18657 #define NULL ((void*)0)
18658 #endif
18659
18660 int main() {
18661
18662 #if DB_VERSION_MAJOR > 1
18663         {
18664                 char *version;
18665                 int major, minor, patch;
18666
18667                 version = db_version( &major, &minor, &patch );
18668
18669                 if( major != DB_VERSION_MAJOR ||
18670                         minor < DB_VERSION_MINOR )
18671                 {
18672                         printf("Berkeley DB version mismatch\n"
18673                                 "\theader: %s\n\tlibrary: %s\n",
18674                                 DB_VERSION_STRING, version);
18675                         return 1;
18676                 }
18677         }
18678 #endif
18679
18680 #if DB_VERSION_MAJOR > 2
18681         db_env_create( NULL, 0 );
18682 #elif DB_VERSION_MAJOR > 1
18683         db_appexit( NULL );
18684 #else
18685         (void) dbopen( NULL, 0, 0, 0, NULL);
18686 #endif
18687
18688 ; return 0; }
18689 EOF
18690 if { (eval echo configure:18691: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18691   rm -rf conftest*
18692   ol_cv_db_db_2=yes
18693 else
18694   echo "configure: failed program was:" >&5
18695   cat conftest.$ac_ext >&5
18696   rm -rf conftest*
18697   ol_cv_db_db_2=no
18698 fi
18699 rm -f conftest*
18700
18701         LIBS="$ol_LIBS"
18702
18703 fi
18704
18705 echo "$ac_t""$ol_cv_db_db_2" 1>&6
18706
18707         if test $ol_cv_db_db_2 = yes ; then
18708                 ol_cv_lib_db=-ldb-2
18709         fi
18710 fi
18711
18712 if test $ol_cv_lib_db = no ; then
18713         echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6
18714 echo "configure:18715: checking for Berkeley DB link (-ldb1)" >&5
18715 if eval "test \"\${ol_cv_db_db1+set}\" = set"; then
18716   echo $ac_n "(cached) $ac_c" 1>&6
18717 else
18718   
18719         ol_DB_LIB=-ldb1
18720         ol_LIBS=$LIBS
18721         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18722
18723         cat > conftest.$ac_ext <<EOF
18724 #line 18725 "configure"
18725 #include "confdefs.h"
18726
18727 #ifdef HAVE_DB_185_H
18728 # include <db_185.h>
18729 #else
18730 # include <db.h>
18731 #endif
18732
18733 #ifndef DB_VERSION_MAJOR
18734 # define DB_VERSION_MAJOR 1
18735 #endif
18736
18737 #ifndef NULL
18738 #define NULL ((void*)0)
18739 #endif
18740
18741 int main() {
18742
18743 #if DB_VERSION_MAJOR > 1
18744         {
18745                 char *version;
18746                 int major, minor, patch;
18747
18748                 version = db_version( &major, &minor, &patch );
18749
18750                 if( major != DB_VERSION_MAJOR ||
18751                         minor < DB_VERSION_MINOR )
18752                 {
18753                         printf("Berkeley DB version mismatch\n"
18754                                 "\theader: %s\n\tlibrary: %s\n",
18755                                 DB_VERSION_STRING, version);
18756                         return 1;
18757                 }
18758         }
18759 #endif
18760
18761 #if DB_VERSION_MAJOR > 2
18762         db_env_create( NULL, 0 );
18763 #elif DB_VERSION_MAJOR > 1
18764         db_appexit( NULL );
18765 #else
18766         (void) dbopen( NULL, 0, 0, 0, NULL);
18767 #endif
18768
18769 ; return 0; }
18770 EOF
18771 if { (eval echo configure:18772: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18772   rm -rf conftest*
18773   ol_cv_db_db1=yes
18774 else
18775   echo "configure: failed program was:" >&5
18776   cat conftest.$ac_ext >&5
18777   rm -rf conftest*
18778   ol_cv_db_db1=no
18779 fi
18780 rm -f conftest*
18781
18782         LIBS="$ol_LIBS"
18783
18784 fi
18785
18786 echo "$ac_t""$ol_cv_db_db1" 1>&6
18787
18788         if test $ol_cv_db_db1 = yes ; then
18789                 ol_cv_lib_db=-ldb1
18790         fi
18791 fi
18792
18793 if test $ol_cv_lib_db = no ; then
18794         echo $ac_n "checking for Berkeley DB link (-ldb-1)""... $ac_c" 1>&6
18795 echo "configure:18796: checking for Berkeley DB link (-ldb-1)" >&5
18796 if eval "test \"\${ol_cv_db_db_1+set}\" = set"; then
18797   echo $ac_n "(cached) $ac_c" 1>&6
18798 else
18799   
18800         ol_DB_LIB=-ldb-1
18801         ol_LIBS=$LIBS
18802         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18803
18804         cat > conftest.$ac_ext <<EOF
18805 #line 18806 "configure"
18806 #include "confdefs.h"
18807
18808 #ifdef HAVE_DB_185_H
18809 # include <db_185.h>
18810 #else
18811 # include <db.h>
18812 #endif
18813
18814 #ifndef DB_VERSION_MAJOR
18815 # define DB_VERSION_MAJOR 1
18816 #endif
18817
18818 #ifndef NULL
18819 #define NULL ((void*)0)
18820 #endif
18821
18822 int main() {
18823
18824 #if DB_VERSION_MAJOR > 1
18825         {
18826                 char *version;
18827                 int major, minor, patch;
18828
18829                 version = db_version( &major, &minor, &patch );
18830
18831                 if( major != DB_VERSION_MAJOR ||
18832                         minor < DB_VERSION_MINOR )
18833                 {
18834                         printf("Berkeley DB version mismatch\n"
18835                                 "\theader: %s\n\tlibrary: %s\n",
18836                                 DB_VERSION_STRING, version);
18837                         return 1;
18838                 }
18839         }
18840 #endif
18841
18842 #if DB_VERSION_MAJOR > 2
18843         db_env_create( NULL, 0 );
18844 #elif DB_VERSION_MAJOR > 1
18845         db_appexit( NULL );
18846 #else
18847         (void) dbopen( NULL, 0, 0, 0, NULL);
18848 #endif
18849
18850 ; return 0; }
18851 EOF
18852 if { (eval echo configure:18853: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18853   rm -rf conftest*
18854   ol_cv_db_db_1=yes
18855 else
18856   echo "configure: failed program was:" >&5
18857   cat conftest.$ac_ext >&5
18858   rm -rf conftest*
18859   ol_cv_db_db_1=no
18860 fi
18861 rm -f conftest*
18862
18863         LIBS="$ol_LIBS"
18864
18865 fi
18866
18867 echo "$ac_t""$ol_cv_db_db_1" 1>&6
18868
18869         if test $ol_cv_db_db_1 = yes ; then
18870                 ol_cv_lib_db=-ldb-1
18871         fi
18872 fi
18873
18874
18875                 if test "$ol_cv_lib_db" != no ; then
18876                         ol_cv_berkeley_db=yes
18877                 fi
18878         fi
18879 fi
18880
18881         else
18882                 ol_cv_berkeley_db=no
18883 for ac_hdr in db.h
18884 do
18885 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
18886 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
18887 echo "configure:18888: checking for $ac_hdr" >&5
18888 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
18889   echo $ac_n "(cached) $ac_c" 1>&6
18890 else
18891   cat > conftest.$ac_ext <<EOF
18892 #line 18893 "configure"
18893 #include "confdefs.h"
18894 #include <$ac_hdr>
18895 EOF
18896 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
18897 { (eval echo configure:18898: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
18898 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
18899 if test -z "$ac_err"; then
18900   rm -rf conftest*
18901   eval "ac_cv_header_$ac_safe=yes"
18902 else
18903   echo "$ac_err" >&5
18904   echo "configure: failed program was:" >&5
18905   cat conftest.$ac_ext >&5
18906   rm -rf conftest*
18907   eval "ac_cv_header_$ac_safe=no"
18908 fi
18909 rm -f conftest*
18910 fi
18911 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
18912   echo "$ac_t""yes" 1>&6
18913     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
18914   cat >> confdefs.h <<EOF
18915 #define $ac_tr_hdr 1
18916 EOF
18917  
18918 else
18919   echo "$ac_t""no" 1>&6
18920 fi
18921 done
18922
18923 if test $ac_cv_header_db_h = yes; then
18924         ol_cv_lib_db=no
18925 if test $ol_cv_lib_db = no ; then
18926         echo $ac_n "checking for Berkeley DB link (default)""... $ac_c" 1>&6
18927 echo "configure:18928: checking for Berkeley DB link (default)" >&5
18928 if eval "test \"\${ol_cv_db_none+set}\" = set"; then
18929   echo $ac_n "(cached) $ac_c" 1>&6
18930 else
18931   
18932         ol_DB_LIB=
18933         ol_LIBS=$LIBS
18934         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18935
18936         cat > conftest.$ac_ext <<EOF
18937 #line 18938 "configure"
18938 #include "confdefs.h"
18939
18940 #ifdef HAVE_DB_185_H
18941 # include <db_185.h>
18942 #else
18943 # include <db.h>
18944 #endif
18945
18946 #ifndef DB_VERSION_MAJOR
18947 # define DB_VERSION_MAJOR 1
18948 #endif
18949
18950 #ifndef NULL
18951 #define NULL ((void*)0)
18952 #endif
18953
18954 int main() {
18955
18956 #if DB_VERSION_MAJOR > 1
18957         {
18958                 char *version;
18959                 int major, minor, patch;
18960
18961                 version = db_version( &major, &minor, &patch );
18962
18963                 if( major != DB_VERSION_MAJOR ||
18964                         minor < DB_VERSION_MINOR )
18965                 {
18966                         printf("Berkeley DB version mismatch\n"
18967                                 "\theader: %s\n\tlibrary: %s\n",
18968                                 DB_VERSION_STRING, version);
18969                         return 1;
18970                 }
18971         }
18972 #endif
18973
18974 #if DB_VERSION_MAJOR > 2
18975         db_env_create( NULL, 0 );
18976 #elif DB_VERSION_MAJOR > 1
18977         db_appexit( NULL );
18978 #else
18979         (void) dbopen( NULL, 0, 0, 0, NULL);
18980 #endif
18981
18982 ; return 0; }
18983 EOF
18984 if { (eval echo configure:18985: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18985   rm -rf conftest*
18986   ol_cv_db_none=yes
18987 else
18988   echo "configure: failed program was:" >&5
18989   cat conftest.$ac_ext >&5
18990   rm -rf conftest*
18991   ol_cv_db_none=no
18992 fi
18993 rm -f conftest*
18994
18995         LIBS="$ol_LIBS"
18996
18997 fi
18998
18999 echo "$ac_t""$ol_cv_db_none" 1>&6
19000
19001         if test $ol_cv_db_none = yes ; then
19002                 ol_cv_lib_db=yes
19003         fi
19004 fi
19005
19006 if test $ol_cv_lib_db = no ; then
19007         echo $ac_n "checking for Berkeley DB link (-ldb43)""... $ac_c" 1>&6
19008 echo "configure:19009: checking for Berkeley DB link (-ldb43)" >&5
19009 if eval "test \"\${ol_cv_db_db43+set}\" = set"; then
19010   echo $ac_n "(cached) $ac_c" 1>&6
19011 else
19012   
19013         ol_DB_LIB=-ldb43
19014         ol_LIBS=$LIBS
19015         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19016
19017         cat > conftest.$ac_ext <<EOF
19018 #line 19019 "configure"
19019 #include "confdefs.h"
19020
19021 #ifdef HAVE_DB_185_H
19022 # include <db_185.h>
19023 #else
19024 # include <db.h>
19025 #endif
19026
19027 #ifndef DB_VERSION_MAJOR
19028 # define DB_VERSION_MAJOR 1
19029 #endif
19030
19031 #ifndef NULL
19032 #define NULL ((void*)0)
19033 #endif
19034
19035 int main() {
19036
19037 #if DB_VERSION_MAJOR > 1
19038         {
19039                 char *version;
19040                 int major, minor, patch;
19041
19042                 version = db_version( &major, &minor, &patch );
19043
19044                 if( major != DB_VERSION_MAJOR ||
19045                         minor < DB_VERSION_MINOR )
19046                 {
19047                         printf("Berkeley DB version mismatch\n"
19048                                 "\theader: %s\n\tlibrary: %s\n",
19049                                 DB_VERSION_STRING, version);
19050                         return 1;
19051                 }
19052         }
19053 #endif
19054
19055 #if DB_VERSION_MAJOR > 2
19056         db_env_create( NULL, 0 );
19057 #elif DB_VERSION_MAJOR > 1
19058         db_appexit( NULL );
19059 #else
19060         (void) dbopen( NULL, 0, 0, 0, NULL);
19061 #endif
19062
19063 ; return 0; }
19064 EOF
19065 if { (eval echo configure:19066: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19066   rm -rf conftest*
19067   ol_cv_db_db43=yes
19068 else
19069   echo "configure: failed program was:" >&5
19070   cat conftest.$ac_ext >&5
19071   rm -rf conftest*
19072   ol_cv_db_db43=no
19073 fi
19074 rm -f conftest*
19075
19076         LIBS="$ol_LIBS"
19077
19078 fi
19079
19080 echo "$ac_t""$ol_cv_db_db43" 1>&6
19081
19082         if test $ol_cv_db_db43 = yes ; then
19083                 ol_cv_lib_db=-ldb43
19084         fi
19085 fi
19086
19087 if test $ol_cv_lib_db = no ; then
19088         echo $ac_n "checking for Berkeley DB link (-ldb-43)""... $ac_c" 1>&6
19089 echo "configure:19090: checking for Berkeley DB link (-ldb-43)" >&5
19090 if eval "test \"\${ol_cv_db_db_43+set}\" = set"; then
19091   echo $ac_n "(cached) $ac_c" 1>&6
19092 else
19093   
19094         ol_DB_LIB=-ldb-43
19095         ol_LIBS=$LIBS
19096         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19097
19098         cat > conftest.$ac_ext <<EOF
19099 #line 19100 "configure"
19100 #include "confdefs.h"
19101
19102 #ifdef HAVE_DB_185_H
19103 # include <db_185.h>
19104 #else
19105 # include <db.h>
19106 #endif
19107
19108 #ifndef DB_VERSION_MAJOR
19109 # define DB_VERSION_MAJOR 1
19110 #endif
19111
19112 #ifndef NULL
19113 #define NULL ((void*)0)
19114 #endif
19115
19116 int main() {
19117
19118 #if DB_VERSION_MAJOR > 1
19119         {
19120                 char *version;
19121                 int major, minor, patch;
19122
19123                 version = db_version( &major, &minor, &patch );
19124
19125                 if( major != DB_VERSION_MAJOR ||
19126                         minor < DB_VERSION_MINOR )
19127                 {
19128                         printf("Berkeley DB version mismatch\n"
19129                                 "\theader: %s\n\tlibrary: %s\n",
19130                                 DB_VERSION_STRING, version);
19131                         return 1;
19132                 }
19133         }
19134 #endif
19135
19136 #if DB_VERSION_MAJOR > 2
19137         db_env_create( NULL, 0 );
19138 #elif DB_VERSION_MAJOR > 1
19139         db_appexit( NULL );
19140 #else
19141         (void) dbopen( NULL, 0, 0, 0, NULL);
19142 #endif
19143
19144 ; return 0; }
19145 EOF
19146 if { (eval echo configure:19147: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19147   rm -rf conftest*
19148   ol_cv_db_db_43=yes
19149 else
19150   echo "configure: failed program was:" >&5
19151   cat conftest.$ac_ext >&5
19152   rm -rf conftest*
19153   ol_cv_db_db_43=no
19154 fi
19155 rm -f conftest*
19156
19157         LIBS="$ol_LIBS"
19158
19159 fi
19160
19161 echo "$ac_t""$ol_cv_db_db_43" 1>&6
19162
19163         if test $ol_cv_db_db_43 = yes ; then
19164                 ol_cv_lib_db=-ldb-43
19165         fi
19166 fi
19167
19168 if test $ol_cv_lib_db = no ; then
19169         echo $ac_n "checking for Berkeley DB link (-ldb-4.3)""... $ac_c" 1>&6
19170 echo "configure:19171: checking for Berkeley DB link (-ldb-4.3)" >&5
19171 if eval "test \"\${ol_cv_db_db_4_dot_3+set}\" = set"; then
19172   echo $ac_n "(cached) $ac_c" 1>&6
19173 else
19174   
19175         ol_DB_LIB=-ldb-4.3
19176         ol_LIBS=$LIBS
19177         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19178
19179         cat > conftest.$ac_ext <<EOF
19180 #line 19181 "configure"
19181 #include "confdefs.h"
19182
19183 #ifdef HAVE_DB_185_H
19184 # include <db_185.h>
19185 #else
19186 # include <db.h>
19187 #endif
19188
19189 #ifndef DB_VERSION_MAJOR
19190 # define DB_VERSION_MAJOR 1
19191 #endif
19192
19193 #ifndef NULL
19194 #define NULL ((void*)0)
19195 #endif
19196
19197 int main() {
19198
19199 #if DB_VERSION_MAJOR > 1
19200         {
19201                 char *version;
19202                 int major, minor, patch;
19203
19204                 version = db_version( &major, &minor, &patch );
19205
19206                 if( major != DB_VERSION_MAJOR ||
19207                         minor < DB_VERSION_MINOR )
19208                 {
19209                         printf("Berkeley DB version mismatch\n"
19210                                 "\theader: %s\n\tlibrary: %s\n",
19211                                 DB_VERSION_STRING, version);
19212                         return 1;
19213                 }
19214         }
19215 #endif
19216
19217 #if DB_VERSION_MAJOR > 2
19218         db_env_create( NULL, 0 );
19219 #elif DB_VERSION_MAJOR > 1
19220         db_appexit( NULL );
19221 #else
19222         (void) dbopen( NULL, 0, 0, 0, NULL);
19223 #endif
19224
19225 ; return 0; }
19226 EOF
19227 if { (eval echo configure:19228: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19228   rm -rf conftest*
19229   ol_cv_db_db_4_dot_3=yes
19230 else
19231   echo "configure: failed program was:" >&5
19232   cat conftest.$ac_ext >&5
19233   rm -rf conftest*
19234   ol_cv_db_db_4_dot_3=no
19235 fi
19236 rm -f conftest*
19237
19238         LIBS="$ol_LIBS"
19239
19240 fi
19241
19242 echo "$ac_t""$ol_cv_db_db_4_dot_3" 1>&6
19243
19244         if test $ol_cv_db_db_4_dot_3 = yes ; then
19245                 ol_cv_lib_db=-ldb-4.3
19246         fi
19247 fi
19248
19249 if test $ol_cv_lib_db = no ; then
19250         echo $ac_n "checking for Berkeley DB link (-ldb-4-3)""... $ac_c" 1>&6
19251 echo "configure:19252: checking for Berkeley DB link (-ldb-4-3)" >&5
19252 if eval "test \"\${ol_cv_db_db_4_3+set}\" = set"; then
19253   echo $ac_n "(cached) $ac_c" 1>&6
19254 else
19255   
19256         ol_DB_LIB=-ldb-4-3
19257         ol_LIBS=$LIBS
19258         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19259
19260         cat > conftest.$ac_ext <<EOF
19261 #line 19262 "configure"
19262 #include "confdefs.h"
19263
19264 #ifdef HAVE_DB_185_H
19265 # include <db_185.h>
19266 #else
19267 # include <db.h>
19268 #endif
19269
19270 #ifndef DB_VERSION_MAJOR
19271 # define DB_VERSION_MAJOR 1
19272 #endif
19273
19274 #ifndef NULL
19275 #define NULL ((void*)0)
19276 #endif
19277
19278 int main() {
19279
19280 #if DB_VERSION_MAJOR > 1
19281         {
19282                 char *version;
19283                 int major, minor, patch;
19284
19285                 version = db_version( &major, &minor, &patch );
19286
19287                 if( major != DB_VERSION_MAJOR ||
19288                         minor < DB_VERSION_MINOR )
19289                 {
19290                         printf("Berkeley DB version mismatch\n"
19291                                 "\theader: %s\n\tlibrary: %s\n",
19292                                 DB_VERSION_STRING, version);
19293                         return 1;
19294                 }
19295         }
19296 #endif
19297
19298 #if DB_VERSION_MAJOR > 2
19299         db_env_create( NULL, 0 );
19300 #elif DB_VERSION_MAJOR > 1
19301         db_appexit( NULL );
19302 #else
19303         (void) dbopen( NULL, 0, 0, 0, NULL);
19304 #endif
19305
19306 ; return 0; }
19307 EOF
19308 if { (eval echo configure:19309: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19309   rm -rf conftest*
19310   ol_cv_db_db_4_3=yes
19311 else
19312   echo "configure: failed program was:" >&5
19313   cat conftest.$ac_ext >&5
19314   rm -rf conftest*
19315   ol_cv_db_db_4_3=no
19316 fi
19317 rm -f conftest*
19318
19319         LIBS="$ol_LIBS"
19320
19321 fi
19322
19323 echo "$ac_t""$ol_cv_db_db_4_3" 1>&6
19324
19325         if test $ol_cv_db_db_4_3 = yes ; then
19326                 ol_cv_lib_db=-ldb-4-3
19327         fi
19328 fi
19329
19330 if test $ol_cv_lib_db = no ; then
19331         echo $ac_n "checking for Berkeley DB link (-ldb42)""... $ac_c" 1>&6
19332 echo "configure:19333: checking for Berkeley DB link (-ldb42)" >&5
19333 if eval "test \"\${ol_cv_db_db42+set}\" = set"; then
19334   echo $ac_n "(cached) $ac_c" 1>&6
19335 else
19336   
19337         ol_DB_LIB=-ldb42
19338         ol_LIBS=$LIBS
19339         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19340
19341         cat > conftest.$ac_ext <<EOF
19342 #line 19343 "configure"
19343 #include "confdefs.h"
19344
19345 #ifdef HAVE_DB_185_H
19346 # include <db_185.h>
19347 #else
19348 # include <db.h>
19349 #endif
19350
19351 #ifndef DB_VERSION_MAJOR
19352 # define DB_VERSION_MAJOR 1
19353 #endif
19354
19355 #ifndef NULL
19356 #define NULL ((void*)0)
19357 #endif
19358
19359 int main() {
19360
19361 #if DB_VERSION_MAJOR > 1
19362         {
19363                 char *version;
19364                 int major, minor, patch;
19365
19366                 version = db_version( &major, &minor, &patch );
19367
19368                 if( major != DB_VERSION_MAJOR ||
19369                         minor < DB_VERSION_MINOR )
19370                 {
19371                         printf("Berkeley DB version mismatch\n"
19372                                 "\theader: %s\n\tlibrary: %s\n",
19373                                 DB_VERSION_STRING, version);
19374                         return 1;
19375                 }
19376         }
19377 #endif
19378
19379 #if DB_VERSION_MAJOR > 2
19380         db_env_create( NULL, 0 );
19381 #elif DB_VERSION_MAJOR > 1
19382         db_appexit( NULL );
19383 #else
19384         (void) dbopen( NULL, 0, 0, 0, NULL);
19385 #endif
19386
19387 ; return 0; }
19388 EOF
19389 if { (eval echo configure:19390: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19390   rm -rf conftest*
19391   ol_cv_db_db42=yes
19392 else
19393   echo "configure: failed program was:" >&5
19394   cat conftest.$ac_ext >&5
19395   rm -rf conftest*
19396   ol_cv_db_db42=no
19397 fi
19398 rm -f conftest*
19399
19400         LIBS="$ol_LIBS"
19401
19402 fi
19403
19404 echo "$ac_t""$ol_cv_db_db42" 1>&6
19405
19406         if test $ol_cv_db_db42 = yes ; then
19407                 ol_cv_lib_db=-ldb42
19408         fi
19409 fi
19410
19411 if test $ol_cv_lib_db = no ; then
19412         echo $ac_n "checking for Berkeley DB link (-ldb-42)""... $ac_c" 1>&6
19413 echo "configure:19414: checking for Berkeley DB link (-ldb-42)" >&5
19414 if eval "test \"\${ol_cv_db_db_42+set}\" = set"; then
19415   echo $ac_n "(cached) $ac_c" 1>&6
19416 else
19417   
19418         ol_DB_LIB=-ldb-42
19419         ol_LIBS=$LIBS
19420         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19421
19422         cat > conftest.$ac_ext <<EOF
19423 #line 19424 "configure"
19424 #include "confdefs.h"
19425
19426 #ifdef HAVE_DB_185_H
19427 # include <db_185.h>
19428 #else
19429 # include <db.h>
19430 #endif
19431
19432 #ifndef DB_VERSION_MAJOR
19433 # define DB_VERSION_MAJOR 1
19434 #endif
19435
19436 #ifndef NULL
19437 #define NULL ((void*)0)
19438 #endif
19439
19440 int main() {
19441
19442 #if DB_VERSION_MAJOR > 1
19443         {
19444                 char *version;
19445                 int major, minor, patch;
19446
19447                 version = db_version( &major, &minor, &patch );
19448
19449                 if( major != DB_VERSION_MAJOR ||
19450                         minor < DB_VERSION_MINOR )
19451                 {
19452                         printf("Berkeley DB version mismatch\n"
19453                                 "\theader: %s\n\tlibrary: %s\n",
19454                                 DB_VERSION_STRING, version);
19455                         return 1;
19456                 }
19457         }
19458 #endif
19459
19460 #if DB_VERSION_MAJOR > 2
19461         db_env_create( NULL, 0 );
19462 #elif DB_VERSION_MAJOR > 1
19463         db_appexit( NULL );
19464 #else
19465         (void) dbopen( NULL, 0, 0, 0, NULL);
19466 #endif
19467
19468 ; return 0; }
19469 EOF
19470 if { (eval echo configure:19471: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19471   rm -rf conftest*
19472   ol_cv_db_db_42=yes
19473 else
19474   echo "configure: failed program was:" >&5
19475   cat conftest.$ac_ext >&5
19476   rm -rf conftest*
19477   ol_cv_db_db_42=no
19478 fi
19479 rm -f conftest*
19480
19481         LIBS="$ol_LIBS"
19482
19483 fi
19484
19485 echo "$ac_t""$ol_cv_db_db_42" 1>&6
19486
19487         if test $ol_cv_db_db_42 = yes ; then
19488                 ol_cv_lib_db=-ldb-42
19489         fi
19490 fi
19491
19492 if test $ol_cv_lib_db = no ; then
19493         echo $ac_n "checking for Berkeley DB link (-ldb-4.2)""... $ac_c" 1>&6
19494 echo "configure:19495: checking for Berkeley DB link (-ldb-4.2)" >&5
19495 if eval "test \"\${ol_cv_db_db_4_dot_2+set}\" = set"; then
19496   echo $ac_n "(cached) $ac_c" 1>&6
19497 else
19498   
19499         ol_DB_LIB=-ldb-4.2
19500         ol_LIBS=$LIBS
19501         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19502
19503         cat > conftest.$ac_ext <<EOF
19504 #line 19505 "configure"
19505 #include "confdefs.h"
19506
19507 #ifdef HAVE_DB_185_H
19508 # include <db_185.h>
19509 #else
19510 # include <db.h>
19511 #endif
19512
19513 #ifndef DB_VERSION_MAJOR
19514 # define DB_VERSION_MAJOR 1
19515 #endif
19516
19517 #ifndef NULL
19518 #define NULL ((void*)0)
19519 #endif
19520
19521 int main() {
19522
19523 #if DB_VERSION_MAJOR > 1
19524         {
19525                 char *version;
19526                 int major, minor, patch;
19527
19528                 version = db_version( &major, &minor, &patch );
19529
19530                 if( major != DB_VERSION_MAJOR ||
19531                         minor < DB_VERSION_MINOR )
19532                 {
19533                         printf("Berkeley DB version mismatch\n"
19534                                 "\theader: %s\n\tlibrary: %s\n",
19535                                 DB_VERSION_STRING, version);
19536                         return 1;
19537                 }
19538         }
19539 #endif
19540
19541 #if DB_VERSION_MAJOR > 2
19542         db_env_create( NULL, 0 );
19543 #elif DB_VERSION_MAJOR > 1
19544         db_appexit( NULL );
19545 #else
19546         (void) dbopen( NULL, 0, 0, 0, NULL);
19547 #endif
19548
19549 ; return 0; }
19550 EOF
19551 if { (eval echo configure:19552: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19552   rm -rf conftest*
19553   ol_cv_db_db_4_dot_2=yes
19554 else
19555   echo "configure: failed program was:" >&5
19556   cat conftest.$ac_ext >&5
19557   rm -rf conftest*
19558   ol_cv_db_db_4_dot_2=no
19559 fi
19560 rm -f conftest*
19561
19562         LIBS="$ol_LIBS"
19563
19564 fi
19565
19566 echo "$ac_t""$ol_cv_db_db_4_dot_2" 1>&6
19567
19568         if test $ol_cv_db_db_4_dot_2 = yes ; then
19569                 ol_cv_lib_db=-ldb-4.2
19570         fi
19571 fi
19572
19573 if test $ol_cv_lib_db = no ; then
19574         echo $ac_n "checking for Berkeley DB link (-ldb-4-2)""... $ac_c" 1>&6
19575 echo "configure:19576: checking for Berkeley DB link (-ldb-4-2)" >&5
19576 if eval "test \"\${ol_cv_db_db_4_2+set}\" = set"; then
19577   echo $ac_n "(cached) $ac_c" 1>&6
19578 else
19579   
19580         ol_DB_LIB=-ldb-4-2
19581         ol_LIBS=$LIBS
19582         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19583
19584         cat > conftest.$ac_ext <<EOF
19585 #line 19586 "configure"
19586 #include "confdefs.h"
19587
19588 #ifdef HAVE_DB_185_H
19589 # include <db_185.h>
19590 #else
19591 # include <db.h>
19592 #endif
19593
19594 #ifndef DB_VERSION_MAJOR
19595 # define DB_VERSION_MAJOR 1
19596 #endif
19597
19598 #ifndef NULL
19599 #define NULL ((void*)0)
19600 #endif
19601
19602 int main() {
19603
19604 #if DB_VERSION_MAJOR > 1
19605         {
19606                 char *version;
19607                 int major, minor, patch;
19608
19609                 version = db_version( &major, &minor, &patch );
19610
19611                 if( major != DB_VERSION_MAJOR ||
19612                         minor < DB_VERSION_MINOR )
19613                 {
19614                         printf("Berkeley DB version mismatch\n"
19615                                 "\theader: %s\n\tlibrary: %s\n",
19616                                 DB_VERSION_STRING, version);
19617                         return 1;
19618                 }
19619         }
19620 #endif
19621
19622 #if DB_VERSION_MAJOR > 2
19623         db_env_create( NULL, 0 );
19624 #elif DB_VERSION_MAJOR > 1
19625         db_appexit( NULL );
19626 #else
19627         (void) dbopen( NULL, 0, 0, 0, NULL);
19628 #endif
19629
19630 ; return 0; }
19631 EOF
19632 if { (eval echo configure:19633: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19633   rm -rf conftest*
19634   ol_cv_db_db_4_2=yes
19635 else
19636   echo "configure: failed program was:" >&5
19637   cat conftest.$ac_ext >&5
19638   rm -rf conftest*
19639   ol_cv_db_db_4_2=no
19640 fi
19641 rm -f conftest*
19642
19643         LIBS="$ol_LIBS"
19644
19645 fi
19646
19647 echo "$ac_t""$ol_cv_db_db_4_2" 1>&6
19648
19649         if test $ol_cv_db_db_4_2 = yes ; then
19650                 ol_cv_lib_db=-ldb-4-2
19651         fi
19652 fi
19653
19654 if test $ol_cv_lib_db = no ; then
19655         echo $ac_n "checking for Berkeley DB link (-ldb-4)""... $ac_c" 1>&6
19656 echo "configure:19657: checking for Berkeley DB link (-ldb-4)" >&5
19657 if eval "test \"\${ol_cv_db_db_4+set}\" = set"; then
19658   echo $ac_n "(cached) $ac_c" 1>&6
19659 else
19660   
19661         ol_DB_LIB=-ldb-4
19662         ol_LIBS=$LIBS
19663         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19664
19665         cat > conftest.$ac_ext <<EOF
19666 #line 19667 "configure"
19667 #include "confdefs.h"
19668
19669 #ifdef HAVE_DB_185_H
19670 # include <db_185.h>
19671 #else
19672 # include <db.h>
19673 #endif
19674
19675 #ifndef DB_VERSION_MAJOR
19676 # define DB_VERSION_MAJOR 1
19677 #endif
19678
19679 #ifndef NULL
19680 #define NULL ((void*)0)
19681 #endif
19682
19683 int main() {
19684
19685 #if DB_VERSION_MAJOR > 1
19686         {
19687                 char *version;
19688                 int major, minor, patch;
19689
19690                 version = db_version( &major, &minor, &patch );
19691
19692                 if( major != DB_VERSION_MAJOR ||
19693                         minor < DB_VERSION_MINOR )
19694                 {
19695                         printf("Berkeley DB version mismatch\n"
19696                                 "\theader: %s\n\tlibrary: %s\n",
19697                                 DB_VERSION_STRING, version);
19698                         return 1;
19699                 }
19700         }
19701 #endif
19702
19703 #if DB_VERSION_MAJOR > 2
19704         db_env_create( NULL, 0 );
19705 #elif DB_VERSION_MAJOR > 1
19706         db_appexit( NULL );
19707 #else
19708         (void) dbopen( NULL, 0, 0, 0, NULL);
19709 #endif
19710
19711 ; return 0; }
19712 EOF
19713 if { (eval echo configure:19714: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19714   rm -rf conftest*
19715   ol_cv_db_db_4=yes
19716 else
19717   echo "configure: failed program was:" >&5
19718   cat conftest.$ac_ext >&5
19719   rm -rf conftest*
19720   ol_cv_db_db_4=no
19721 fi
19722 rm -f conftest*
19723
19724         LIBS="$ol_LIBS"
19725
19726 fi
19727
19728 echo "$ac_t""$ol_cv_db_db_4" 1>&6
19729
19730         if test $ol_cv_db_db_4 = yes ; then
19731                 ol_cv_lib_db=-ldb-4
19732         fi
19733 fi
19734
19735 if test $ol_cv_lib_db = no ; then
19736         echo $ac_n "checking for Berkeley DB link (-ldb4)""... $ac_c" 1>&6
19737 echo "configure:19738: checking for Berkeley DB link (-ldb4)" >&5
19738 if eval "test \"\${ol_cv_db_db4+set}\" = set"; then
19739   echo $ac_n "(cached) $ac_c" 1>&6
19740 else
19741   
19742         ol_DB_LIB=-ldb4
19743         ol_LIBS=$LIBS
19744         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19745
19746         cat > conftest.$ac_ext <<EOF
19747 #line 19748 "configure"
19748 #include "confdefs.h"
19749
19750 #ifdef HAVE_DB_185_H
19751 # include <db_185.h>
19752 #else
19753 # include <db.h>
19754 #endif
19755
19756 #ifndef DB_VERSION_MAJOR
19757 # define DB_VERSION_MAJOR 1
19758 #endif
19759
19760 #ifndef NULL
19761 #define NULL ((void*)0)
19762 #endif
19763
19764 int main() {
19765
19766 #if DB_VERSION_MAJOR > 1
19767         {
19768                 char *version;
19769                 int major, minor, patch;
19770
19771                 version = db_version( &major, &minor, &patch );
19772
19773                 if( major != DB_VERSION_MAJOR ||
19774                         minor < DB_VERSION_MINOR )
19775                 {
19776                         printf("Berkeley DB version mismatch\n"
19777                                 "\theader: %s\n\tlibrary: %s\n",
19778                                 DB_VERSION_STRING, version);
19779                         return 1;
19780                 }
19781         }
19782 #endif
19783
19784 #if DB_VERSION_MAJOR > 2
19785         db_env_create( NULL, 0 );
19786 #elif DB_VERSION_MAJOR > 1
19787         db_appexit( NULL );
19788 #else
19789         (void) dbopen( NULL, 0, 0, 0, NULL);
19790 #endif
19791
19792 ; return 0; }
19793 EOF
19794 if { (eval echo configure:19795: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19795   rm -rf conftest*
19796   ol_cv_db_db4=yes
19797 else
19798   echo "configure: failed program was:" >&5
19799   cat conftest.$ac_ext >&5
19800   rm -rf conftest*
19801   ol_cv_db_db4=no
19802 fi
19803 rm -f conftest*
19804
19805         LIBS="$ol_LIBS"
19806
19807 fi
19808
19809 echo "$ac_t""$ol_cv_db_db4" 1>&6
19810
19811         if test $ol_cv_db_db4 = yes ; then
19812                 ol_cv_lib_db=-ldb4
19813         fi
19814 fi
19815
19816 if test $ol_cv_lib_db = no ; then
19817         echo $ac_n "checking for Berkeley DB link (-ldb)""... $ac_c" 1>&6
19818 echo "configure:19819: checking for Berkeley DB link (-ldb)" >&5
19819 if eval "test \"\${ol_cv_db_db+set}\" = set"; then
19820   echo $ac_n "(cached) $ac_c" 1>&6
19821 else
19822   
19823         ol_DB_LIB=-ldb
19824         ol_LIBS=$LIBS
19825         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19826
19827         cat > conftest.$ac_ext <<EOF
19828 #line 19829 "configure"
19829 #include "confdefs.h"
19830
19831 #ifdef HAVE_DB_185_H
19832 # include <db_185.h>
19833 #else
19834 # include <db.h>
19835 #endif
19836
19837 #ifndef DB_VERSION_MAJOR
19838 # define DB_VERSION_MAJOR 1
19839 #endif
19840
19841 #ifndef NULL
19842 #define NULL ((void*)0)
19843 #endif
19844
19845 int main() {
19846
19847 #if DB_VERSION_MAJOR > 1
19848         {
19849                 char *version;
19850                 int major, minor, patch;
19851
19852                 version = db_version( &major, &minor, &patch );
19853
19854                 if( major != DB_VERSION_MAJOR ||
19855                         minor < DB_VERSION_MINOR )
19856                 {
19857                         printf("Berkeley DB version mismatch\n"
19858                                 "\theader: %s\n\tlibrary: %s\n",
19859                                 DB_VERSION_STRING, version);
19860                         return 1;
19861                 }
19862         }
19863 #endif
19864
19865 #if DB_VERSION_MAJOR > 2
19866         db_env_create( NULL, 0 );
19867 #elif DB_VERSION_MAJOR > 1
19868         db_appexit( NULL );
19869 #else
19870         (void) dbopen( NULL, 0, 0, 0, NULL);
19871 #endif
19872
19873 ; return 0; }
19874 EOF
19875 if { (eval echo configure:19876: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19876   rm -rf conftest*
19877   ol_cv_db_db=yes
19878 else
19879   echo "configure: failed program was:" >&5
19880   cat conftest.$ac_ext >&5
19881   rm -rf conftest*
19882   ol_cv_db_db=no
19883 fi
19884 rm -f conftest*
19885
19886         LIBS="$ol_LIBS"
19887
19888 fi
19889
19890 echo "$ac_t""$ol_cv_db_db" 1>&6
19891
19892         if test $ol_cv_db_db = yes ; then
19893                 ol_cv_lib_db=-ldb
19894         fi
19895 fi
19896
19897 if test $ol_cv_lib_db = no ; then
19898         echo $ac_n "checking for Berkeley DB link (-ldb41)""... $ac_c" 1>&6
19899 echo "configure:19900: checking for Berkeley DB link (-ldb41)" >&5
19900 if eval "test \"\${ol_cv_db_db41+set}\" = set"; then
19901   echo $ac_n "(cached) $ac_c" 1>&6
19902 else
19903   
19904         ol_DB_LIB=-ldb41
19905         ol_LIBS=$LIBS
19906         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19907
19908         cat > conftest.$ac_ext <<EOF
19909 #line 19910 "configure"
19910 #include "confdefs.h"
19911
19912 #ifdef HAVE_DB_185_H
19913 # include <db_185.h>
19914 #else
19915 # include <db.h>
19916 #endif
19917
19918 #ifndef DB_VERSION_MAJOR
19919 # define DB_VERSION_MAJOR 1
19920 #endif
19921
19922 #ifndef NULL
19923 #define NULL ((void*)0)
19924 #endif
19925
19926 int main() {
19927
19928 #if DB_VERSION_MAJOR > 1
19929         {
19930                 char *version;
19931                 int major, minor, patch;
19932
19933                 version = db_version( &major, &minor, &patch );
19934
19935                 if( major != DB_VERSION_MAJOR ||
19936                         minor < DB_VERSION_MINOR )
19937                 {
19938                         printf("Berkeley DB version mismatch\n"
19939                                 "\theader: %s\n\tlibrary: %s\n",
19940                                 DB_VERSION_STRING, version);
19941                         return 1;
19942                 }
19943         }
19944 #endif
19945
19946 #if DB_VERSION_MAJOR > 2
19947         db_env_create( NULL, 0 );
19948 #elif DB_VERSION_MAJOR > 1
19949         db_appexit( NULL );
19950 #else
19951         (void) dbopen( NULL, 0, 0, 0, NULL);
19952 #endif
19953
19954 ; return 0; }
19955 EOF
19956 if { (eval echo configure:19957: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19957   rm -rf conftest*
19958   ol_cv_db_db41=yes
19959 else
19960   echo "configure: failed program was:" >&5
19961   cat conftest.$ac_ext >&5
19962   rm -rf conftest*
19963   ol_cv_db_db41=no
19964 fi
19965 rm -f conftest*
19966
19967         LIBS="$ol_LIBS"
19968
19969 fi
19970
19971 echo "$ac_t""$ol_cv_db_db41" 1>&6
19972
19973         if test $ol_cv_db_db41 = yes ; then
19974                 ol_cv_lib_db=-ldb41
19975         fi
19976 fi
19977
19978 if test $ol_cv_lib_db = no ; then
19979         echo $ac_n "checking for Berkeley DB link (-ldb-41)""... $ac_c" 1>&6
19980 echo "configure:19981: checking for Berkeley DB link (-ldb-41)" >&5
19981 if eval "test \"\${ol_cv_db_db_41+set}\" = set"; then
19982   echo $ac_n "(cached) $ac_c" 1>&6
19983 else
19984   
19985         ol_DB_LIB=-ldb-41
19986         ol_LIBS=$LIBS
19987         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19988
19989         cat > conftest.$ac_ext <<EOF
19990 #line 19991 "configure"
19991 #include "confdefs.h"
19992
19993 #ifdef HAVE_DB_185_H
19994 # include <db_185.h>
19995 #else
19996 # include <db.h>
19997 #endif
19998
19999 #ifndef DB_VERSION_MAJOR
20000 # define DB_VERSION_MAJOR 1
20001 #endif
20002
20003 #ifndef NULL
20004 #define NULL ((void*)0)
20005 #endif
20006
20007 int main() {
20008
20009 #if DB_VERSION_MAJOR > 1
20010         {
20011                 char *version;
20012                 int major, minor, patch;
20013
20014                 version = db_version( &major, &minor, &patch );
20015
20016                 if( major != DB_VERSION_MAJOR ||
20017                         minor < DB_VERSION_MINOR )
20018                 {
20019                         printf("Berkeley DB version mismatch\n"
20020                                 "\theader: %s\n\tlibrary: %s\n",
20021                                 DB_VERSION_STRING, version);
20022                         return 1;
20023                 }
20024         }
20025 #endif
20026
20027 #if DB_VERSION_MAJOR > 2
20028         db_env_create( NULL, 0 );
20029 #elif DB_VERSION_MAJOR > 1
20030         db_appexit( NULL );
20031 #else
20032         (void) dbopen( NULL, 0, 0, 0, NULL);
20033 #endif
20034
20035 ; return 0; }
20036 EOF
20037 if { (eval echo configure:20038: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20038   rm -rf conftest*
20039   ol_cv_db_db_41=yes
20040 else
20041   echo "configure: failed program was:" >&5
20042   cat conftest.$ac_ext >&5
20043   rm -rf conftest*
20044   ol_cv_db_db_41=no
20045 fi
20046 rm -f conftest*
20047
20048         LIBS="$ol_LIBS"
20049
20050 fi
20051
20052 echo "$ac_t""$ol_cv_db_db_41" 1>&6
20053
20054         if test $ol_cv_db_db_41 = yes ; then
20055                 ol_cv_lib_db=-ldb-41
20056         fi
20057 fi
20058
20059 if test $ol_cv_lib_db = no ; then
20060         echo $ac_n "checking for Berkeley DB link (-ldb-4.1)""... $ac_c" 1>&6
20061 echo "configure:20062: checking for Berkeley DB link (-ldb-4.1)" >&5
20062 if eval "test \"\${ol_cv_db_db_4_dot_1+set}\" = set"; then
20063   echo $ac_n "(cached) $ac_c" 1>&6
20064 else
20065   
20066         ol_DB_LIB=-ldb-4.1
20067         ol_LIBS=$LIBS
20068         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
20069
20070         cat > conftest.$ac_ext <<EOF
20071 #line 20072 "configure"
20072 #include "confdefs.h"
20073
20074 #ifdef HAVE_DB_185_H
20075 # include <db_185.h>
20076 #else
20077 # include <db.h>
20078 #endif
20079
20080 #ifndef DB_VERSION_MAJOR
20081 # define DB_VERSION_MAJOR 1
20082 #endif
20083
20084 #ifndef NULL
20085 #define NULL ((void*)0)
20086 #endif
20087
20088 int main() {
20089
20090 #if DB_VERSION_MAJOR > 1
20091         {
20092                 char *version;
20093                 int major, minor, patch;
20094
20095                 version = db_version( &major, &minor, &patch );
20096
20097                 if( major != DB_VERSION_MAJOR ||
20098                         minor < DB_VERSION_MINOR )
20099                 {
20100                         printf("Berkeley DB version mismatch\n"
20101                                 "\theader: %s\n\tlibrary: %s\n",
20102                                 DB_VERSION_STRING, version);
20103                         return 1;
20104                 }
20105         }
20106 #endif
20107
20108 #if DB_VERSION_MAJOR > 2
20109         db_env_create( NULL, 0 );
20110 #elif DB_VERSION_MAJOR > 1
20111         db_appexit( NULL );
20112 #else
20113         (void) dbopen( NULL, 0, 0, 0, NULL);
20114 #endif
20115
20116 ; return 0; }
20117 EOF
20118 if { (eval echo configure:20119: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20119   rm -rf conftest*
20120   ol_cv_db_db_4_dot_1=yes
20121 else
20122   echo "configure: failed program was:" >&5
20123   cat conftest.$ac_ext >&5
20124   rm -rf conftest*
20125   ol_cv_db_db_4_dot_1=no
20126 fi
20127 rm -f conftest*
20128
20129         LIBS="$ol_LIBS"
20130
20131 fi
20132
20133 echo "$ac_t""$ol_cv_db_db_4_dot_1" 1>&6
20134
20135         if test $ol_cv_db_db_4_dot_1 = yes ; then
20136                 ol_cv_lib_db=-ldb-4.1
20137         fi
20138 fi
20139
20140 if test $ol_cv_lib_db = no ; then
20141         echo $ac_n "checking for Berkeley DB link (-ldb-4-1)""... $ac_c" 1>&6
20142 echo "configure:20143: checking for Berkeley DB link (-ldb-4-1)" >&5
20143 if eval "test \"\${ol_cv_db_db_4_1+set}\" = set"; then
20144   echo $ac_n "(cached) $ac_c" 1>&6
20145 else
20146   
20147         ol_DB_LIB=-ldb-4-1
20148         ol_LIBS=$LIBS
20149         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
20150
20151         cat > conftest.$ac_ext <<EOF
20152 #line 20153 "configure"
20153 #include "confdefs.h"
20154
20155 #ifdef HAVE_DB_185_H
20156 # include <db_185.h>
20157 #else
20158 # include <db.h>
20159 #endif
20160
20161 #ifndef DB_VERSION_MAJOR
20162 # define DB_VERSION_MAJOR 1
20163 #endif
20164
20165 #ifndef NULL
20166 #define NULL ((void*)0)
20167 #endif
20168
20169 int main() {
20170
20171 #if DB_VERSION_MAJOR > 1
20172         {
20173                 char *version;
20174                 int major, minor, patch;
20175
20176                 version = db_version( &major, &minor, &patch );
20177
20178                 if( major != DB_VERSION_MAJOR ||
20179                         minor < DB_VERSION_MINOR )
20180                 {
20181                         printf("Berkeley DB version mismatch\n"
20182                                 "\theader: %s\n\tlibrary: %s\n",
20183                                 DB_VERSION_STRING, version);
20184                         return 1;
20185                 }
20186         }
20187 #endif
20188
20189 #if DB_VERSION_MAJOR > 2
20190         db_env_create( NULL, 0 );
20191 #elif DB_VERSION_MAJOR > 1
20192         db_appexit( NULL );
20193 #else
20194         (void) dbopen( NULL, 0, 0, 0, NULL);
20195 #endif
20196
20197 ; return 0; }
20198 EOF
20199 if { (eval echo configure:20200: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20200   rm -rf conftest*
20201   ol_cv_db_db_4_1=yes
20202 else
20203   echo "configure: failed program was:" >&5
20204   cat conftest.$ac_ext >&5
20205   rm -rf conftest*
20206   ol_cv_db_db_4_1=no
20207 fi
20208 rm -f conftest*
20209
20210         LIBS="$ol_LIBS"
20211
20212 fi
20213
20214 echo "$ac_t""$ol_cv_db_db_4_1" 1>&6
20215
20216         if test $ol_cv_db_db_4_1 = yes ; then
20217                 ol_cv_lib_db=-ldb-4-1
20218         fi
20219 fi
20220
20221 if test $ol_cv_lib_db = no ; then
20222         echo $ac_n "checking for Berkeley DB link (-ldb3)""... $ac_c" 1>&6
20223 echo "configure:20224: checking for Berkeley DB link (-ldb3)" >&5
20224 if eval "test \"\${ol_cv_db_db3+set}\" = set"; then
20225   echo $ac_n "(cached) $ac_c" 1>&6
20226 else
20227   
20228         ol_DB_LIB=-ldb3
20229         ol_LIBS=$LIBS
20230         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
20231
20232         cat > conftest.$ac_ext <<EOF
20233 #line 20234 "configure"
20234 #include "confdefs.h"
20235
20236 #ifdef HAVE_DB_185_H
20237 # include <db_185.h>
20238 #else
20239 # include <db.h>
20240 #endif
20241
20242 #ifndef DB_VERSION_MAJOR
20243 # define DB_VERSION_MAJOR 1
20244 #endif
20245
20246 #ifndef NULL
20247 #define NULL ((void*)0)
20248 #endif
20249
20250 int main() {
20251
20252 #if DB_VERSION_MAJOR > 1
20253         {
20254                 char *version;
20255                 int major, minor, patch;
20256
20257                 version = db_version( &major, &minor, &patch );
20258
20259                 if( major != DB_VERSION_MAJOR ||
20260                         minor < DB_VERSION_MINOR )
20261                 {
20262                         printf("Berkeley DB version mismatch\n"
20263                                 "\theader: %s\n\tlibrary: %s\n",
20264                                 DB_VERSION_STRING, version);
20265                         return 1;
20266                 }
20267         }
20268 #endif
20269
20270 #if DB_VERSION_MAJOR > 2
20271         db_env_create( NULL, 0 );
20272 #elif DB_VERSION_MAJOR > 1
20273         db_appexit( NULL );
20274 #else
20275         (void) dbopen( NULL, 0, 0, 0, NULL);
20276 #endif
20277
20278 ; return 0; }
20279 EOF
20280 if { (eval echo configure:20281: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20281   rm -rf conftest*
20282   ol_cv_db_db3=yes
20283 else
20284   echo "configure: failed program was:" >&5
20285   cat conftest.$ac_ext >&5
20286   rm -rf conftest*
20287   ol_cv_db_db3=no
20288 fi
20289 rm -f conftest*
20290
20291         LIBS="$ol_LIBS"
20292
20293 fi
20294
20295 echo "$ac_t""$ol_cv_db_db3" 1>&6
20296
20297         if test $ol_cv_db_db3 = yes ; then
20298                 ol_cv_lib_db=-ldb3
20299         fi
20300 fi
20301
20302 if test $ol_cv_lib_db = no ; then
20303         echo $ac_n "checking for Berkeley DB link (-ldb-3)""... $ac_c" 1>&6
20304 echo "configure:20305: checking for Berkeley DB link (-ldb-3)" >&5
20305 if eval "test \"\${ol_cv_db_db_3+set}\" = set"; then
20306   echo $ac_n "(cached) $ac_c" 1>&6
20307 else
20308   
20309         ol_DB_LIB=-ldb-3
20310         ol_LIBS=$LIBS
20311         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
20312
20313         cat > conftest.$ac_ext <<EOF
20314 #line 20315 "configure"
20315 #include "confdefs.h"
20316
20317 #ifdef HAVE_DB_185_H
20318 # include <db_185.h>
20319 #else
20320 # include <db.h>
20321 #endif
20322
20323 #ifndef DB_VERSION_MAJOR
20324 # define DB_VERSION_MAJOR 1
20325 #endif
20326
20327 #ifndef NULL
20328 #define NULL ((void*)0)
20329 #endif
20330
20331 int main() {
20332
20333 #if DB_VERSION_MAJOR > 1
20334         {
20335                 char *version;
20336                 int major, minor, patch;
20337
20338                 version = db_version( &major, &minor, &patch );
20339
20340                 if( major != DB_VERSION_MAJOR ||
20341                         minor < DB_VERSION_MINOR )
20342                 {
20343                         printf("Berkeley DB version mismatch\n"
20344                                 "\theader: %s\n\tlibrary: %s\n",
20345                                 DB_VERSION_STRING, version);
20346                         return 1;
20347                 }
20348         }
20349 #endif
20350
20351 #if DB_VERSION_MAJOR > 2
20352         db_env_create( NULL, 0 );
20353 #elif DB_VERSION_MAJOR > 1
20354         db_appexit( NULL );
20355 #else
20356         (void) dbopen( NULL, 0, 0, 0, NULL);
20357 #endif
20358
20359 ; return 0; }
20360 EOF
20361 if { (eval echo configure:20362: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20362   rm -rf conftest*
20363   ol_cv_db_db_3=yes
20364 else
20365   echo "configure: failed program was:" >&5
20366   cat conftest.$ac_ext >&5
20367   rm -rf conftest*
20368   ol_cv_db_db_3=no
20369 fi
20370 rm -f conftest*
20371
20372         LIBS="$ol_LIBS"
20373
20374 fi
20375
20376 echo "$ac_t""$ol_cv_db_db_3" 1>&6
20377
20378         if test $ol_cv_db_db_3 = yes ; then
20379                 ol_cv_lib_db=-ldb-3
20380         fi
20381 fi
20382
20383 if test $ol_cv_lib_db = no ; then
20384         echo $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6
20385 echo "configure:20386: checking for Berkeley DB link (-ldb2)" >&5
20386 if eval "test \"\${ol_cv_db_db2+set}\" = set"; then
20387   echo $ac_n "(cached) $ac_c" 1>&6
20388 else
20389   
20390         ol_DB_LIB=-ldb2
20391         ol_LIBS=$LIBS
20392         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
20393
20394         cat > conftest.$ac_ext <<EOF
20395 #line 20396 "configure"
20396 #include "confdefs.h"
20397
20398 #ifdef HAVE_DB_185_H
20399 # include <db_185.h>
20400 #else
20401 # include <db.h>
20402 #endif
20403
20404 #ifndef DB_VERSION_MAJOR
20405 # define DB_VERSION_MAJOR 1
20406 #endif
20407
20408 #ifndef NULL
20409 #define NULL ((void*)0)
20410 #endif
20411
20412 int main() {
20413
20414 #if DB_VERSION_MAJOR > 1
20415         {
20416                 char *version;
20417                 int major, minor, patch;
20418
20419                 version = db_version( &major, &minor, &patch );
20420
20421                 if( major != DB_VERSION_MAJOR ||
20422                         minor < DB_VERSION_MINOR )
20423                 {
20424                         printf("Berkeley DB version mismatch\n"
20425                                 "\theader: %s\n\tlibrary: %s\n",
20426                                 DB_VERSION_STRING, version);
20427                         return 1;
20428                 }
20429         }
20430 #endif
20431
20432 #if DB_VERSION_MAJOR > 2
20433         db_env_create( NULL, 0 );
20434 #elif DB_VERSION_MAJOR > 1
20435         db_appexit( NULL );
20436 #else
20437         (void) dbopen( NULL, 0, 0, 0, NULL);
20438 #endif
20439
20440 ; return 0; }
20441 EOF
20442 if { (eval echo configure:20443: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20443   rm -rf conftest*
20444   ol_cv_db_db2=yes
20445 else
20446   echo "configure: failed program was:" >&5
20447   cat conftest.$ac_ext >&5
20448   rm -rf conftest*
20449   ol_cv_db_db2=no
20450 fi
20451 rm -f conftest*
20452
20453         LIBS="$ol_LIBS"
20454
20455 fi
20456
20457 echo "$ac_t""$ol_cv_db_db2" 1>&6
20458
20459         if test $ol_cv_db_db2 = yes ; then
20460                 ol_cv_lib_db=-ldb2
20461         fi
20462 fi
20463
20464 if test $ol_cv_lib_db = no ; then
20465         echo $ac_n "checking for Berkeley DB link (-ldb-2)""... $ac_c" 1>&6
20466 echo "configure:20467: checking for Berkeley DB link (-ldb-2)" >&5
20467 if eval "test \"\${ol_cv_db_db_2+set}\" = set"; then
20468   echo $ac_n "(cached) $ac_c" 1>&6
20469 else
20470   
20471         ol_DB_LIB=-ldb-2
20472         ol_LIBS=$LIBS
20473         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
20474
20475         cat > conftest.$ac_ext <<EOF
20476 #line 20477 "configure"
20477 #include "confdefs.h"
20478
20479 #ifdef HAVE_DB_185_H
20480 # include <db_185.h>
20481 #else
20482 # include <db.h>
20483 #endif
20484
20485 #ifndef DB_VERSION_MAJOR
20486 # define DB_VERSION_MAJOR 1
20487 #endif
20488
20489 #ifndef NULL
20490 #define NULL ((void*)0)
20491 #endif
20492
20493 int main() {
20494
20495 #if DB_VERSION_MAJOR > 1
20496         {
20497                 char *version;
20498                 int major, minor, patch;
20499
20500                 version = db_version( &major, &minor, &patch );
20501
20502                 if( major != DB_VERSION_MAJOR ||
20503                         minor < DB_VERSION_MINOR )
20504                 {
20505                         printf("Berkeley DB version mismatch\n"
20506                                 "\theader: %s\n\tlibrary: %s\n",
20507                                 DB_VERSION_STRING, version);
20508                         return 1;
20509                 }
20510         }
20511 #endif
20512
20513 #if DB_VERSION_MAJOR > 2
20514         db_env_create( NULL, 0 );
20515 #elif DB_VERSION_MAJOR > 1
20516         db_appexit( NULL );
20517 #else
20518         (void) dbopen( NULL, 0, 0, 0, NULL);
20519 #endif
20520
20521 ; return 0; }
20522 EOF
20523 if { (eval echo configure:20524: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20524   rm -rf conftest*
20525   ol_cv_db_db_2=yes
20526 else
20527   echo "configure: failed program was:" >&5
20528   cat conftest.$ac_ext >&5
20529   rm -rf conftest*
20530   ol_cv_db_db_2=no
20531 fi
20532 rm -f conftest*
20533
20534         LIBS="$ol_LIBS"
20535
20536 fi
20537
20538 echo "$ac_t""$ol_cv_db_db_2" 1>&6
20539
20540         if test $ol_cv_db_db_2 = yes ; then
20541                 ol_cv_lib_db=-ldb-2
20542         fi
20543 fi
20544
20545 if test $ol_cv_lib_db = no ; then
20546         echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6
20547 echo "configure:20548: checking for Berkeley DB link (-ldb1)" >&5
20548 if eval "test \"\${ol_cv_db_db1+set}\" = set"; then
20549   echo $ac_n "(cached) $ac_c" 1>&6
20550 else
20551   
20552         ol_DB_LIB=-ldb1
20553         ol_LIBS=$LIBS
20554         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
20555
20556         cat > conftest.$ac_ext <<EOF
20557 #line 20558 "configure"
20558 #include "confdefs.h"
20559
20560 #ifdef HAVE_DB_185_H
20561 # include <db_185.h>
20562 #else
20563 # include <db.h>
20564 #endif
20565
20566 #ifndef DB_VERSION_MAJOR
20567 # define DB_VERSION_MAJOR 1
20568 #endif
20569
20570 #ifndef NULL
20571 #define NULL ((void*)0)
20572 #endif
20573
20574 int main() {
20575
20576 #if DB_VERSION_MAJOR > 1
20577         {
20578                 char *version;
20579                 int major, minor, patch;
20580
20581                 version = db_version( &major, &minor, &patch );
20582
20583                 if( major != DB_VERSION_MAJOR ||
20584                         minor < DB_VERSION_MINOR )
20585                 {
20586                         printf("Berkeley DB version mismatch\n"
20587                                 "\theader: %s\n\tlibrary: %s\n",
20588                                 DB_VERSION_STRING, version);
20589                         return 1;
20590                 }
20591         }
20592 #endif
20593
20594 #if DB_VERSION_MAJOR > 2
20595         db_env_create( NULL, 0 );
20596 #elif DB_VERSION_MAJOR > 1
20597         db_appexit( NULL );
20598 #else
20599         (void) dbopen( NULL, 0, 0, 0, NULL);
20600 #endif
20601
20602 ; return 0; }
20603 EOF
20604 if { (eval echo configure:20605: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20605   rm -rf conftest*
20606   ol_cv_db_db1=yes
20607 else
20608   echo "configure: failed program was:" >&5
20609   cat conftest.$ac_ext >&5
20610   rm -rf conftest*
20611   ol_cv_db_db1=no
20612 fi
20613 rm -f conftest*
20614
20615         LIBS="$ol_LIBS"
20616
20617 fi
20618
20619 echo "$ac_t""$ol_cv_db_db1" 1>&6
20620
20621         if test $ol_cv_db_db1 = yes ; then
20622                 ol_cv_lib_db=-ldb1
20623         fi
20624 fi
20625
20626 if test $ol_cv_lib_db = no ; then
20627         echo $ac_n "checking for Berkeley DB link (-ldb-1)""... $ac_c" 1>&6
20628 echo "configure:20629: checking for Berkeley DB link (-ldb-1)" >&5
20629 if eval "test \"\${ol_cv_db_db_1+set}\" = set"; then
20630   echo $ac_n "(cached) $ac_c" 1>&6
20631 else
20632   
20633         ol_DB_LIB=-ldb-1
20634         ol_LIBS=$LIBS
20635         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
20636
20637         cat > conftest.$ac_ext <<EOF
20638 #line 20639 "configure"
20639 #include "confdefs.h"
20640
20641 #ifdef HAVE_DB_185_H
20642 # include <db_185.h>
20643 #else
20644 # include <db.h>
20645 #endif
20646
20647 #ifndef DB_VERSION_MAJOR
20648 # define DB_VERSION_MAJOR 1
20649 #endif
20650
20651 #ifndef NULL
20652 #define NULL ((void*)0)
20653 #endif
20654
20655 int main() {
20656
20657 #if DB_VERSION_MAJOR > 1
20658         {
20659                 char *version;
20660                 int major, minor, patch;
20661
20662                 version = db_version( &major, &minor, &patch );
20663
20664                 if( major != DB_VERSION_MAJOR ||
20665                         minor < DB_VERSION_MINOR )
20666                 {
20667                         printf("Berkeley DB version mismatch\n"
20668                                 "\theader: %s\n\tlibrary: %s\n",
20669                                 DB_VERSION_STRING, version);
20670                         return 1;
20671                 }
20672         }
20673 #endif
20674
20675 #if DB_VERSION_MAJOR > 2
20676         db_env_create( NULL, 0 );
20677 #elif DB_VERSION_MAJOR > 1
20678         db_appexit( NULL );
20679 #else
20680         (void) dbopen( NULL, 0, 0, 0, NULL);
20681 #endif
20682
20683 ; return 0; }
20684 EOF
20685 if { (eval echo configure:20686: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20686   rm -rf conftest*
20687   ol_cv_db_db_1=yes
20688 else
20689   echo "configure: failed program was:" >&5
20690   cat conftest.$ac_ext >&5
20691   rm -rf conftest*
20692   ol_cv_db_db_1=no
20693 fi
20694 rm -f conftest*
20695
20696         LIBS="$ol_LIBS"
20697
20698 fi
20699
20700 echo "$ac_t""$ol_cv_db_db_1" 1>&6
20701
20702         if test $ol_cv_db_db_1 = yes ; then
20703                 ol_cv_lib_db=-ldb-1
20704         fi
20705 fi
20706
20707
20708         if test "$ol_cv_lib_db" != no ; then
20709                 ol_cv_berkeley_db=yes
20710                 echo $ac_n "checking for Berkeley DB version match""... $ac_c" 1>&6
20711 echo "configure:20712: checking for Berkeley DB version match" >&5
20712 if eval "test \"\${ol_cv_berkeley_db_version+set}\" = set"; then
20713   echo $ac_n "(cached) $ac_c" 1>&6
20714 else
20715   
20716         ol_LIBS="$LIBS"
20717         LIBS="$LTHREAD_LIBS $LIBS"
20718         if test $ol_cv_lib_db != yes ; then
20719                 LIBS="$ol_cv_lib_db $LIBS"
20720         fi
20721
20722         if test "$cross_compiling" = yes; then
20723   ol_cv_berkeley_db_version=cross
20724 else
20725   cat > conftest.$ac_ext <<EOF
20726 #line 20727 "configure"
20727 #include "confdefs.h"
20728
20729 #ifdef HAVE_DB_185_H
20730         choke me;
20731 #else
20732 #include <db.h>
20733 #endif
20734 #ifndef DB_VERSION_MAJOR
20735 # define DB_VERSION_MAJOR 1
20736 #endif
20737 #ifndef NULL
20738 #define NULL ((void *)0)
20739 #endif
20740 main()
20741 {
20742 #if DB_VERSION_MAJOR > 1
20743         char *version;
20744         int major, minor, patch;
20745
20746         version = db_version( &major, &minor, &patch );
20747
20748         if( major != DB_VERSION_MAJOR ||
20749                 minor != DB_VERSION_MINOR ||
20750                 patch != DB_VERSION_PATCH )
20751         {
20752                 printf("Berkeley DB version mismatch\n"
20753                         "\theader: %s\n\tlibrary: %s\n",
20754                         DB_VERSION_STRING, version);
20755                 return 1;
20756         }
20757 #endif
20758
20759         return 0;
20760 }
20761 EOF
20762 if { (eval echo configure:20763: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
20763 then
20764   ol_cv_berkeley_db_version=yes
20765 else
20766   echo "configure: failed program was:" >&5
20767   cat conftest.$ac_ext >&5
20768   rm -fr conftest*
20769   ol_cv_berkeley_db_version=no
20770 fi
20771 rm -fr conftest*
20772 fi
20773
20774
20775         LIBS="$ol_LIBS"
20776
20777 fi
20778
20779 echo "$ac_t""$ol_cv_berkeley_db_version" 1>&6
20780
20781         if test $ol_cv_berkeley_db_version = no ; then
20782                 { echo "configure: error: Berkeley DB version mismatch" 1>&2; exit 1; }
20783         fi
20784
20785                 echo $ac_n "checking for Berkeley DB thread support""... $ac_c" 1>&6
20786 echo "configure:20787: checking for Berkeley DB thread support" >&5
20787 if eval "test \"\${ol_cv_berkeley_db_thread+set}\" = set"; then
20788   echo $ac_n "(cached) $ac_c" 1>&6
20789 else
20790   
20791         ol_LIBS="$LIBS"
20792         LIBS="$LTHREAD_LIBS $LIBS"
20793         if test $ol_cv_lib_db != yes ; then
20794                 LIBS="$ol_cv_lib_db $LIBS"
20795         fi
20796
20797         if test "$cross_compiling" = yes; then
20798   ol_cv_berkeley_db_thread=cross
20799 else
20800   cat > conftest.$ac_ext <<EOF
20801 #line 20802 "configure"
20802 #include "confdefs.h"
20803
20804 #ifdef HAVE_DB_185_H
20805         choke me;
20806 #else
20807 #include <db.h>
20808 #endif
20809 #ifndef NULL
20810 #define NULL ((void *)0)
20811 #endif
20812 main()
20813 {
20814         int rc;
20815         u_int32_t flags = DB_CREATE |
20816 #ifdef DB_PRIVATE
20817                 DB_PRIVATE |
20818 #endif
20819                 DB_THREAD;
20820
20821 #if DB_VERSION_MAJOR > 2
20822         DB_ENV *env = NULL;
20823
20824         rc = db_env_create( &env, 0 );
20825
20826         flags |= DB_INIT_MPOOL;
20827 #ifdef DB_MPOOL_PRIVATE
20828         flags |= DB_MPOOL_PRIVATE;
20829 #endif
20830
20831         if( rc ) {
20832                 printf("BerkeleyDB: %s\n", db_strerror(rc) );
20833                 return rc;
20834         }
20835
20836 #if (DB_VERSION_MAJOR > 3) || (DB_VERSION_MINOR >= 1)
20837         rc = env->open( env, NULL, flags, 0 );
20838 #else
20839         rc = env->open( env, NULL, NULL, flags, 0 );
20840 #endif
20841
20842         if ( rc == 0 ) {
20843                 rc = env->close( env, 0 );
20844         }
20845
20846         if( rc ) {
20847                 printf("BerkeleyDB: %s\n", db_strerror(rc) );
20848                 return rc;
20849         }
20850
20851 #else
20852         DB_ENV env;
20853         memset( &env, '\0', sizeof(env) );
20854
20855         rc = db_appinit( NULL, NULL, &env, flags );
20856
20857         if( rc == 0 ) {
20858                 db_appexit( &env );
20859         }
20860
20861         unlink("__db_mpool.share");
20862         unlink("__db_lock.share");
20863 #endif
20864
20865         return rc;
20866 }
20867 EOF
20868 if { (eval echo configure:20869: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
20869 then
20870   ol_cv_berkeley_db_thread=yes
20871 else
20872   echo "configure: failed program was:" >&5
20873   cat conftest.$ac_ext >&5
20874   rm -fr conftest*
20875   ol_cv_berkeley_db_thread=no
20876 fi
20877 rm -fr conftest*
20878 fi
20879
20880
20881         LIBS="$ol_LIBS"
20882
20883 fi
20884
20885 echo "$ac_t""$ol_cv_berkeley_db_thread" 1>&6
20886
20887         if test $ol_cv_berkeley_db_thread != no ; then
20888                 cat >> confdefs.h <<\EOF
20889 #define HAVE_BERKELEY_DB_THREAD 1
20890 EOF
20891
20892         fi
20893
20894         fi
20895 fi
20896
20897         fi
20898
20899         if test $ol_cv_berkeley_db != no ; then
20900                 cat >> confdefs.h <<\EOF
20901 #define HAVE_BERKELEY_DB 1
20902 EOF
20903
20904
20905                 ol_link_ldbm=berkeley
20906                 ol_with_ldbm_api=berkeley
20907
20908                 if test $ol_with_ldbm_type = hash ; then
20909                         cat >> confdefs.h <<\EOF
20910 #define LDBM_USE_DBHASH 1
20911 EOF
20912
20913                 else
20914                         cat >> confdefs.h <<\EOF
20915 #define LDBM_USE_DBBTREE 1
20916 EOF
20917
20918                 fi
20919
20920                                                 if test $ol_cv_lib_db != yes ; then
20921                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db"
20922                 fi
20923         fi
20924 fi
20925
20926 if test $ol_enable_bdb != no -o $ol_enable_hdb != no; then
20927         if test $ol_link_ldbm != berkeley ; then
20928                 { echo "configure: error: BDB/HDB: BerkeleyDB not available" 1>&2; exit 1; }
20929         else
20930                 echo $ac_n "checking Berkeley DB version for BDB backend""... $ac_c" 1>&6
20931 echo "configure:20932: checking Berkeley DB version for BDB backend" >&5
20932 if eval "test \"\${ol_cv_bdb_compat+set}\" = set"; then
20933   echo $ac_n "(cached) $ac_c" 1>&6
20934 else
20935   
20936         cat > conftest.$ac_ext <<EOF
20937 #line 20938 "configure"
20938 #include "confdefs.h"
20939
20940 #include <db.h>
20941
20942  /* this check could be improved */
20943 #ifndef DB_VERSION_MAJOR
20944 #       define DB_VERSION_MAJOR 1
20945 #endif
20946 #ifndef DB_VERSION_MINOR
20947 #       define DB_VERSION_MINOR 0
20948 #endif
20949
20950 /* require 4.2 or later */
20951 #if (DB_VERSION_MAJOR >= 4) && (DB_VERSION_MINOR >= 2)
20952         __db_version_compat
20953 #endif
20954         
20955 EOF
20956 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20957   egrep "__db_version_compat" >/dev/null 2>&1; then
20958   rm -rf conftest*
20959   ol_cv_bdb_compat=yes
20960 else
20961   rm -rf conftest*
20962   ol_cv_bdb_compat=no
20963 fi
20964 rm -f conftest*
20965
20966 fi
20967
20968 echo "$ac_t""$ol_cv_bdb_compat" 1>&6
20969
20970
20971                 if test $ol_cv_bdb_compat != yes ; then
20972                         { echo "configure: error: BDB/HDB: BerkeleyDB version incompatible" 1>&2; exit 1; }
20973                 fi
20974         fi
20975 fi
20976
20977 if test $ol_link_ldbm = no -a $ol_with_ldbm_type = btree ; then
20978         echo "configure: warning: Could not find LDBM with BTREE support" 1>&2
20979         ol_with_ldbm_api=none
20980 fi
20981
20982 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = mdbm ; then
20983         echo $ac_n "checking for MDBM library""... $ac_c" 1>&6
20984 echo "configure:20985: checking for MDBM library" >&5
20985 if eval "test \"\${ol_cv_lib_mdbm+set}\" = set"; then
20986   echo $ac_n "(cached) $ac_c" 1>&6
20987 else
20988         ol_LIBS="$LIBS"
20989         echo $ac_n "checking for mdbm_set_chain""... $ac_c" 1>&6
20990 echo "configure:20991: checking for mdbm_set_chain" >&5
20991 if eval "test \"\${ac_cv_func_mdbm_set_chain+set}\" = set"; then
20992   echo $ac_n "(cached) $ac_c" 1>&6
20993 else
20994   cat > conftest.$ac_ext <<EOF
20995 #line 20996 "configure"
20996 #include "confdefs.h"
20997 /* System header to define __stub macros and hopefully few prototypes,
20998     which can conflict with char mdbm_set_chain(); below.  */
20999 #include <assert.h>
21000 /* Override any gcc2 internal prototype to avoid an error.  */
21001 /* We use char because int might match the return type of a gcc2
21002     builtin and then its argument prototype would still apply.  */
21003 char mdbm_set_chain();
21004 char (*f)();
21005
21006 int main() {
21007
21008 /* The GNU C library defines this for functions which it implements
21009     to always fail with ENOSYS.  Some functions are actually named
21010     something starting with __ and the normal name is an alias.  */
21011 #if defined (__stub_mdbm_set_chain) || defined (__stub___mdbm_set_chain)
21012 choke me
21013 #else
21014 f = mdbm_set_chain;
21015 #endif
21016
21017 ; return 0; }
21018 EOF
21019 if { (eval echo configure:21020: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21020   rm -rf conftest*
21021   eval "ac_cv_func_mdbm_set_chain=yes"
21022 else
21023   echo "configure: failed program was:" >&5
21024   cat conftest.$ac_ext >&5
21025   rm -rf conftest*
21026   eval "ac_cv_func_mdbm_set_chain=no"
21027 fi
21028 rm -f conftest*
21029 fi
21030
21031 if eval "test \"`echo '$ac_cv_func_'mdbm_set_chain`\" = yes"; then
21032   echo "$ac_t""yes" 1>&6
21033   ol_cv_lib_mdbm=yes
21034 else
21035   echo "$ac_t""no" 1>&6
21036
21037                 echo $ac_n "checking for mdbm_set_chain in -lmdbm""... $ac_c" 1>&6
21038 echo "configure:21039: checking for mdbm_set_chain in -lmdbm" >&5
21039 ac_lib_var=`echo mdbm'_'mdbm_set_chain | sed 'y%./+-:%__p__%'`
21040 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
21041   echo $ac_n "(cached) $ac_c" 1>&6
21042 else
21043   ac_save_LIBS="$LIBS"
21044 LIBS="-lmdbm  $LIBS"
21045 cat > conftest.$ac_ext <<EOF
21046 #line 21047 "configure"
21047 #include "confdefs.h"
21048 /* Override any gcc2 internal prototype to avoid an error.  */
21049 /* We use char because int might match the return type of a gcc2
21050     builtin and then its argument prototype would still apply.  */
21051 char mdbm_set_chain();
21052
21053 int main() {
21054 mdbm_set_chain()
21055 ; return 0; }
21056 EOF
21057 if { (eval echo configure:21058: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21058   rm -rf conftest*
21059   eval "ac_cv_lib_$ac_lib_var=yes"
21060 else
21061   echo "configure: failed program was:" >&5
21062   cat conftest.$ac_ext >&5
21063   rm -rf conftest*
21064   eval "ac_cv_lib_$ac_lib_var=no"
21065 fi
21066 rm -f conftest*
21067 LIBS="$ac_save_LIBS"
21068
21069 fi
21070 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
21071   echo "$ac_t""yes" 1>&6
21072   ol_cv_lib_mdbm=-lmdbm
21073 else
21074   echo "$ac_t""no" 1>&6
21075 ol_cv_lib_mdbm=no
21076 fi
21077
21078         
21079 fi
21080
21081         LIBS="$ol_LIBS"
21082
21083 fi
21084
21085 echo "$ac_t""$ol_cv_lib_mdbm" 1>&6
21086
21087
21088  for ac_hdr in mdbm.h
21089 do
21090 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
21091 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
21092 echo "configure:21093: checking for $ac_hdr" >&5
21093 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
21094   echo $ac_n "(cached) $ac_c" 1>&6
21095 else
21096   cat > conftest.$ac_ext <<EOF
21097 #line 21098 "configure"
21098 #include "confdefs.h"
21099 #include <$ac_hdr>
21100 EOF
21101 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
21102 { (eval echo configure:21103: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
21103 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
21104 if test -z "$ac_err"; then
21105   rm -rf conftest*
21106   eval "ac_cv_header_$ac_safe=yes"
21107 else
21108   echo "$ac_err" >&5
21109   echo "configure: failed program was:" >&5
21110   cat conftest.$ac_ext >&5
21111   rm -rf conftest*
21112   eval "ac_cv_header_$ac_safe=no"
21113 fi
21114 rm -f conftest*
21115 fi
21116 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
21117   echo "$ac_t""yes" 1>&6
21118     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
21119   cat >> confdefs.h <<EOF
21120 #define $ac_tr_hdr 1
21121 EOF
21122  
21123 else
21124   echo "$ac_t""no" 1>&6
21125 fi
21126 done
21127
21128  echo $ac_n "checking for db""... $ac_c" 1>&6
21129 echo "configure:21130: checking for db" >&5
21130 if eval "test \"\${ol_cv_mdbm+set}\" = set"; then
21131   echo $ac_n "(cached) $ac_c" 1>&6
21132 else
21133   
21134         if test $ol_cv_lib_mdbm = no -o $ac_cv_header_mdbm_h = no ; then
21135                 ol_cv_mdbm=no
21136         else
21137                 ol_cv_mdbm=yes
21138         fi
21139
21140 fi
21141
21142 echo "$ac_t""$ol_cv_mdbm" 1>&6
21143  if test $ol_cv_mdbm = yes ; then
21144         cat >> confdefs.h <<\EOF
21145 #define HAVE_MDBM 1
21146 EOF
21147
21148  fi
21149
21150
21151         if test $ol_cv_mdbm = yes ; then
21152                 ol_link_ldbm=mdbm
21153                 ol_with_ldbm_api=mdbm
21154                 if test $ol_cv_lib_mdbm != yes ; then
21155                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_mdbm"
21156                 fi
21157         fi
21158 fi
21159
21160 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = gdbm ; then
21161         echo $ac_n "checking for GDBM library""... $ac_c" 1>&6
21162 echo "configure:21163: checking for GDBM library" >&5
21163 if eval "test \"\${ol_cv_lib_gdbm+set}\" = set"; then
21164   echo $ac_n "(cached) $ac_c" 1>&6
21165 else
21166         ol_LIBS="$LIBS"
21167         echo $ac_n "checking for gdbm_open""... $ac_c" 1>&6
21168 echo "configure:21169: checking for gdbm_open" >&5
21169 if eval "test \"\${ac_cv_func_gdbm_open+set}\" = set"; then
21170   echo $ac_n "(cached) $ac_c" 1>&6
21171 else
21172   cat > conftest.$ac_ext <<EOF
21173 #line 21174 "configure"
21174 #include "confdefs.h"
21175 /* System header to define __stub macros and hopefully few prototypes,
21176     which can conflict with char gdbm_open(); below.  */
21177 #include <assert.h>
21178 /* Override any gcc2 internal prototype to avoid an error.  */
21179 /* We use char because int might match the return type of a gcc2
21180     builtin and then its argument prototype would still apply.  */
21181 char gdbm_open();
21182 char (*f)();
21183
21184 int main() {
21185
21186 /* The GNU C library defines this for functions which it implements
21187     to always fail with ENOSYS.  Some functions are actually named
21188     something starting with __ and the normal name is an alias.  */
21189 #if defined (__stub_gdbm_open) || defined (__stub___gdbm_open)
21190 choke me
21191 #else
21192 f = gdbm_open;
21193 #endif
21194
21195 ; return 0; }
21196 EOF
21197 if { (eval echo configure:21198: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21198   rm -rf conftest*
21199   eval "ac_cv_func_gdbm_open=yes"
21200 else
21201   echo "configure: failed program was:" >&5
21202   cat conftest.$ac_ext >&5
21203   rm -rf conftest*
21204   eval "ac_cv_func_gdbm_open=no"
21205 fi
21206 rm -f conftest*
21207 fi
21208
21209 if eval "test \"`echo '$ac_cv_func_'gdbm_open`\" = yes"; then
21210   echo "$ac_t""yes" 1>&6
21211   ol_cv_lib_gdbm=yes
21212 else
21213   echo "$ac_t""no" 1>&6
21214
21215                 echo $ac_n "checking for gdbm_open in -lgdbm""... $ac_c" 1>&6
21216 echo "configure:21217: checking for gdbm_open in -lgdbm" >&5
21217 ac_lib_var=`echo gdbm'_'gdbm_open | sed 'y%./+-:%__p__%'`
21218 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
21219   echo $ac_n "(cached) $ac_c" 1>&6
21220 else
21221   ac_save_LIBS="$LIBS"
21222 LIBS="-lgdbm  $LIBS"
21223 cat > conftest.$ac_ext <<EOF
21224 #line 21225 "configure"
21225 #include "confdefs.h"
21226 /* Override any gcc2 internal prototype to avoid an error.  */
21227 /* We use char because int might match the return type of a gcc2
21228     builtin and then its argument prototype would still apply.  */
21229 char gdbm_open();
21230
21231 int main() {
21232 gdbm_open()
21233 ; return 0; }
21234 EOF
21235 if { (eval echo configure:21236: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21236   rm -rf conftest*
21237   eval "ac_cv_lib_$ac_lib_var=yes"
21238 else
21239   echo "configure: failed program was:" >&5
21240   cat conftest.$ac_ext >&5
21241   rm -rf conftest*
21242   eval "ac_cv_lib_$ac_lib_var=no"
21243 fi
21244 rm -f conftest*
21245 LIBS="$ac_save_LIBS"
21246
21247 fi
21248 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
21249   echo "$ac_t""yes" 1>&6
21250   ol_cv_lib_gdbm=-lgdbm
21251 else
21252   echo "$ac_t""no" 1>&6
21253 ol_cv_lib_gdbm=no
21254 fi
21255
21256         
21257 fi
21258
21259         LIBS="$ol_LIBS"
21260
21261 fi
21262
21263 echo "$ac_t""$ol_cv_lib_gdbm" 1>&6
21264
21265
21266  for ac_hdr in gdbm.h
21267 do
21268 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
21269 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
21270 echo "configure:21271: checking for $ac_hdr" >&5
21271 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
21272   echo $ac_n "(cached) $ac_c" 1>&6
21273 else
21274   cat > conftest.$ac_ext <<EOF
21275 #line 21276 "configure"
21276 #include "confdefs.h"
21277 #include <$ac_hdr>
21278 EOF
21279 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
21280 { (eval echo configure:21281: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
21281 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
21282 if test -z "$ac_err"; then
21283   rm -rf conftest*
21284   eval "ac_cv_header_$ac_safe=yes"
21285 else
21286   echo "$ac_err" >&5
21287   echo "configure: failed program was:" >&5
21288   cat conftest.$ac_ext >&5
21289   rm -rf conftest*
21290   eval "ac_cv_header_$ac_safe=no"
21291 fi
21292 rm -f conftest*
21293 fi
21294 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
21295   echo "$ac_t""yes" 1>&6
21296     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
21297   cat >> confdefs.h <<EOF
21298 #define $ac_tr_hdr 1
21299 EOF
21300  
21301 else
21302   echo "$ac_t""no" 1>&6
21303 fi
21304 done
21305
21306  echo $ac_n "checking for db""... $ac_c" 1>&6
21307 echo "configure:21308: checking for db" >&5
21308 if eval "test \"\${ol_cv_gdbm+set}\" = set"; then
21309   echo $ac_n "(cached) $ac_c" 1>&6
21310 else
21311   
21312         if test $ol_cv_lib_gdbm = no -o $ac_cv_header_gdbm_h = no ; then
21313                 ol_cv_gdbm=no
21314         else
21315                 ol_cv_gdbm=yes
21316         fi
21317
21318 fi
21319
21320 echo "$ac_t""$ol_cv_gdbm" 1>&6
21321  if test $ol_cv_gdbm = yes ; then
21322         cat >> confdefs.h <<\EOF
21323 #define HAVE_GDBM 1
21324 EOF
21325
21326  fi
21327
21328
21329         if test $ol_cv_gdbm = yes ; then
21330                 ol_link_ldbm=gdbm
21331                 ol_with_ldbm_api=gdbm
21332
21333                 if test $ol_cv_lib_gdbm != yes ; then
21334                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_gdbm"
21335                 fi
21336         fi
21337 fi
21338
21339 if test $ol_with_ldbm_api = ndbm ; then
21340         echo $ac_n "checking for NDBM library""... $ac_c" 1>&6
21341 echo "configure:21342: checking for NDBM library" >&5
21342 if eval "test \"\${ol_cv_lib_ndbm+set}\" = set"; then
21343   echo $ac_n "(cached) $ac_c" 1>&6
21344 else
21345         ol_LIBS="$LIBS"
21346         echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
21347 echo "configure:21348: checking for dbm_open" >&5
21348 if eval "test \"\${ac_cv_func_dbm_open+set}\" = set"; then
21349   echo $ac_n "(cached) $ac_c" 1>&6
21350 else
21351   cat > conftest.$ac_ext <<EOF
21352 #line 21353 "configure"
21353 #include "confdefs.h"
21354 /* System header to define __stub macros and hopefully few prototypes,
21355     which can conflict with char dbm_open(); below.  */
21356 #include <assert.h>
21357 /* Override any gcc2 internal prototype to avoid an error.  */
21358 /* We use char because int might match the return type of a gcc2
21359     builtin and then its argument prototype would still apply.  */
21360 char dbm_open();
21361 char (*f)();
21362
21363 int main() {
21364
21365 /* The GNU C library defines this for functions which it implements
21366     to always fail with ENOSYS.  Some functions are actually named
21367     something starting with __ and the normal name is an alias.  */
21368 #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
21369 choke me
21370 #else
21371 f = dbm_open;
21372 #endif
21373
21374 ; return 0; }
21375 EOF
21376 if { (eval echo configure:21377: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21377   rm -rf conftest*
21378   eval "ac_cv_func_dbm_open=yes"
21379 else
21380   echo "configure: failed program was:" >&5
21381   cat conftest.$ac_ext >&5
21382   rm -rf conftest*
21383   eval "ac_cv_func_dbm_open=no"
21384 fi
21385 rm -f conftest*
21386 fi
21387
21388 if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then
21389   echo "$ac_t""yes" 1>&6
21390   ol_cv_lib_ndbm=yes
21391 else
21392   echo "$ac_t""no" 1>&6
21393
21394                 echo $ac_n "checking for dbm_open in -lndbm""... $ac_c" 1>&6
21395 echo "configure:21396: checking for dbm_open in -lndbm" >&5
21396 ac_lib_var=`echo ndbm'_'dbm_open | sed 'y%./+-:%__p__%'`
21397 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
21398   echo $ac_n "(cached) $ac_c" 1>&6
21399 else
21400   ac_save_LIBS="$LIBS"
21401 LIBS="-lndbm  $LIBS"
21402 cat > conftest.$ac_ext <<EOF
21403 #line 21404 "configure"
21404 #include "confdefs.h"
21405 /* Override any gcc2 internal prototype to avoid an error.  */
21406 /* We use char because int might match the return type of a gcc2
21407     builtin and then its argument prototype would still apply.  */
21408 char dbm_open();
21409
21410 int main() {
21411 dbm_open()
21412 ; return 0; }
21413 EOF
21414 if { (eval echo configure:21415: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21415   rm -rf conftest*
21416   eval "ac_cv_lib_$ac_lib_var=yes"
21417 else
21418   echo "configure: failed program was:" >&5
21419   cat conftest.$ac_ext >&5
21420   rm -rf conftest*
21421   eval "ac_cv_lib_$ac_lib_var=no"
21422 fi
21423 rm -f conftest*
21424 LIBS="$ac_save_LIBS"
21425
21426 fi
21427 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
21428   echo "$ac_t""yes" 1>&6
21429   ol_cv_lib_ndbm=-lndbm
21430 else
21431   echo "$ac_t""no" 1>&6
21432
21433                         echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
21434 echo "configure:21435: checking for dbm_open in -ldbm" >&5
21435 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-:%__p__%'`
21436 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
21437   echo $ac_n "(cached) $ac_c" 1>&6
21438 else
21439   ac_save_LIBS="$LIBS"
21440 LIBS="-ldbm  $LIBS"
21441 cat > conftest.$ac_ext <<EOF
21442 #line 21443 "configure"
21443 #include "confdefs.h"
21444 /* Override any gcc2 internal prototype to avoid an error.  */
21445 /* We use char because int might match the return type of a gcc2
21446     builtin and then its argument prototype would still apply.  */
21447 char dbm_open();
21448
21449 int main() {
21450 dbm_open()
21451 ; return 0; }
21452 EOF
21453 if { (eval echo configure:21454: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21454   rm -rf conftest*
21455   eval "ac_cv_lib_$ac_lib_var=yes"
21456 else
21457   echo "configure: failed program was:" >&5
21458   cat conftest.$ac_ext >&5
21459   rm -rf conftest*
21460   eval "ac_cv_lib_$ac_lib_var=no"
21461 fi
21462 rm -f conftest*
21463 LIBS="$ac_save_LIBS"
21464
21465 fi
21466 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
21467   echo "$ac_t""yes" 1>&6
21468   ol_cv_lib_ndbm=-ldbm
21469 else
21470   echo "$ac_t""no" 1>&6
21471 ol_cv_lib_ndbm=no
21472 fi
21473                 
21474 fi
21475
21476         
21477 fi
21478
21479         LIBS="$ol_LIBS"
21480
21481 fi
21482
21483 echo "$ac_t""$ol_cv_lib_ndbm" 1>&6
21484
21485
21486  for ac_hdr in ndbm.h
21487 do
21488 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
21489 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
21490 echo "configure:21491: checking for $ac_hdr" >&5
21491 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
21492   echo $ac_n "(cached) $ac_c" 1>&6
21493 else
21494   cat > conftest.$ac_ext <<EOF
21495 #line 21496 "configure"
21496 #include "confdefs.h"
21497 #include <$ac_hdr>
21498 EOF
21499 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
21500 { (eval echo configure:21501: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
21501 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
21502 if test -z "$ac_err"; then
21503   rm -rf conftest*
21504   eval "ac_cv_header_$ac_safe=yes"
21505 else
21506   echo "$ac_err" >&5
21507   echo "configure: failed program was:" >&5
21508   cat conftest.$ac_ext >&5
21509   rm -rf conftest*
21510   eval "ac_cv_header_$ac_safe=no"
21511 fi
21512 rm -f conftest*
21513 fi
21514 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
21515   echo "$ac_t""yes" 1>&6
21516     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
21517   cat >> confdefs.h <<EOF
21518 #define $ac_tr_hdr 1
21519 EOF
21520  
21521 else
21522   echo "$ac_t""no" 1>&6
21523 fi
21524 done
21525
21526  echo $ac_n "checking for db""... $ac_c" 1>&6
21527 echo "configure:21528: checking for db" >&5
21528 if eval "test \"\${ol_cv_ndbm+set}\" = set"; then
21529   echo $ac_n "(cached) $ac_c" 1>&6
21530 else
21531   
21532         if test $ol_cv_lib_ndbm = no -o $ac_cv_header_ndbm_h = no ; then
21533                 ol_cv_ndbm=no
21534         else
21535                 ol_cv_ndbm=yes
21536         fi
21537
21538 fi
21539
21540 echo "$ac_t""$ol_cv_ndbm" 1>&6
21541  if test $ol_cv_ndbm = yes ; then
21542         cat >> confdefs.h <<\EOF
21543 #define HAVE_NDBM 1
21544 EOF
21545
21546  fi
21547
21548
21549         if test $ol_cv_ndbm = yes ; then
21550                 ol_link_ldbm=ndbm
21551                 ol_with_ldbm_api=ndbm
21552
21553                 if test $ol_cv_lib_ndbm != yes ; then
21554                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_ndbm"
21555                 fi
21556         fi
21557 fi
21558
21559 if test $ol_link_ldbm = no -a $ol_enable_ldbm != no ; then
21560         { echo "configure: error: could not find suitable LDBM backend" 1>&2; exit 1; }
21561 fi
21562
21563 if test $ol_enable_bdb = yes -o \
21564         $ol_enable_hdb = yes -o \
21565         $ol_enable_ldbm = yes ; then
21566         SLAPD_LIBS="$SLAPD_LIBS \$(LDBM_LIBS)"
21567 fi
21568
21569
21570 if test $ol_enable_dynamic = yes -a $enable_shared = yes ; then
21571         BUILD_LIBS_DYNAMIC=shared
21572         cat >> confdefs.h <<\EOF
21573 #define LDAP_LIBS_DYNAMIC 1
21574 EOF
21575
21576         LTSTATIC=""
21577 else
21578         BUILD_LIBS_DYNAMIC=static
21579         LTSTATIC="-static"
21580 fi
21581
21582 if test $ol_enable_wrappers != no ; then
21583         for ac_hdr in tcpd.h
21584 do
21585 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
21586 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
21587 echo "configure:21588: checking for $ac_hdr" >&5
21588 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
21589   echo $ac_n "(cached) $ac_c" 1>&6
21590 else
21591   cat > conftest.$ac_ext <<EOF
21592 #line 21593 "configure"
21593 #include "confdefs.h"
21594 #include <$ac_hdr>
21595 EOF
21596 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
21597 { (eval echo configure:21598: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
21598 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
21599 if test -z "$ac_err"; then
21600   rm -rf conftest*
21601   eval "ac_cv_header_$ac_safe=yes"
21602 else
21603   echo "$ac_err" >&5
21604   echo "configure: failed program was:" >&5
21605   cat conftest.$ac_ext >&5
21606   rm -rf conftest*
21607   eval "ac_cv_header_$ac_safe=no"
21608 fi
21609 rm -f conftest*
21610 fi
21611 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
21612   echo "$ac_t""yes" 1>&6
21613     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
21614   cat >> confdefs.h <<EOF
21615 #define $ac_tr_hdr 1
21616 EOF
21617  
21618                 echo $ac_n "checking for TCP wrappers library""... $ac_c" 1>&6
21619 echo "configure:21620: checking for TCP wrappers library" >&5
21620                 save_LIBS="$LIBS"
21621                 LIBS="$LIBS -lwrap"
21622                 cat > conftest.$ac_ext <<EOF
21623 #line 21624 "configure"
21624 #include "confdefs.h"
21625
21626 #include <tcpd.h>
21627 int allow_severity = 0;
21628 int deny_severity  = 0;
21629
21630 struct request_info *req;
21631                 
21632 int main() {
21633
21634 hosts_access(req)
21635                 
21636 ; return 0; }
21637 EOF
21638 if { (eval echo configure:21639: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21639   rm -rf conftest*
21640   echo "$ac_t""-lwrap" 1>&6
21641                 have_wrappers=yes
21642                 LIBS="$save_LIBS"
21643 else
21644   echo "configure: failed program was:" >&5
21645   cat conftest.$ac_ext >&5
21646   rm -rf conftest*
21647   
21648                                 LIBS="$LIBS -lnsl"
21649                 cat > conftest.$ac_ext <<EOF
21650 #line 21651 "configure"
21651 #include "confdefs.h"
21652
21653 #include <tcpd.h>
21654 int allow_severity = 0;
21655 int deny_severity  = 0;
21656
21657 struct request_info *req;
21658                 
21659 int main() {
21660
21661 hosts_access(req)
21662                 
21663 ; return 0; }
21664 EOF
21665 if { (eval echo configure:21666: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21666   rm -rf conftest*
21667   echo "$ac_t""-lwrap -lnsl" 1>&6
21668                 have_wrappers=yes
21669                 LIBS="$save_LIBS -lnsl"
21670 else
21671   echo "configure: failed program was:" >&5
21672   cat conftest.$ac_ext >&5
21673   rm -rf conftest*
21674   
21675                 echo "$ac_t""no" 1>&6
21676                 have_wrappers=no
21677                 LIBS=$save_LIBS
21678 fi
21679 rm -f conftest*
21680 fi
21681 rm -f conftest*
21682 else
21683   echo "$ac_t""no" 1>&6
21684 have_wrappers=no
21685 fi
21686 done
21687
21688
21689         if test $have_wrappers = yes ; then
21690                 cat >> confdefs.h <<\EOF
21691 #define HAVE_TCPD 1
21692 EOF
21693
21694                 WRAP_LIBS="-lwrap"
21695         elif test $ol_enable_wrappers = yes ; then
21696                 { echo "configure: error: could not find TCP wrappers, select apppropriate options or disable" 1>&2; exit 1; }
21697         else
21698                 echo "configure: warning: could not find TCP wrappers, support disabled" 1>&2
21699                 WRAP_LIBS=""
21700         fi
21701 fi
21702
21703 if test $ol_enable_syslog != no ; then
21704         echo $ac_n "checking for openlog""... $ac_c" 1>&6
21705 echo "configure:21706: checking for openlog" >&5
21706 if eval "test \"\${ac_cv_func_openlog+set}\" = set"; then
21707   echo $ac_n "(cached) $ac_c" 1>&6
21708 else
21709   cat > conftest.$ac_ext <<EOF
21710 #line 21711 "configure"
21711 #include "confdefs.h"
21712 /* System header to define __stub macros and hopefully few prototypes,
21713     which can conflict with char openlog(); below.  */
21714 #include <assert.h>
21715 /* Override any gcc2 internal prototype to avoid an error.  */
21716 /* We use char because int might match the return type of a gcc2
21717     builtin and then its argument prototype would still apply.  */
21718 char openlog();
21719 char (*f)();
21720
21721 int main() {
21722
21723 /* The GNU C library defines this for functions which it implements
21724     to always fail with ENOSYS.  Some functions are actually named
21725     something starting with __ and the normal name is an alias.  */
21726 #if defined (__stub_openlog) || defined (__stub___openlog)
21727 choke me
21728 #else
21729 f = openlog;
21730 #endif
21731
21732 ; return 0; }
21733 EOF
21734 if { (eval echo configure:21735: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21735   rm -rf conftest*
21736   eval "ac_cv_func_openlog=yes"
21737 else
21738   echo "configure: failed program was:" >&5
21739   cat conftest.$ac_ext >&5
21740   rm -rf conftest*
21741   eval "ac_cv_func_openlog=no"
21742 fi
21743 rm -f conftest*
21744 fi
21745
21746 if eval "test \"`echo '$ac_cv_func_'openlog`\" = yes"; then
21747   echo "$ac_t""yes" 1>&6
21748   :
21749 else
21750   echo "$ac_t""no" 1>&6
21751 fi
21752
21753         if test $ac_cv_func_openlog = no -a $ol_enable_syslog = yes; then
21754                 { echo "configure: error: could not find syslog" 1>&2; exit 1; }
21755         fi
21756         ol_enable_syslog=$ac_cv_func_openlog
21757 fi
21758
21759
21760 ol_link_sql=no
21761 if test $ol_enable_sql != no ; then
21762         for ac_hdr in sql.h sqlext.h
21763 do
21764 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
21765 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
21766 echo "configure:21767: checking for $ac_hdr" >&5
21767 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
21768   echo $ac_n "(cached) $ac_c" 1>&6
21769 else
21770   cat > conftest.$ac_ext <<EOF
21771 #line 21772 "configure"
21772 #include "confdefs.h"
21773 #include <$ac_hdr>
21774 EOF
21775 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
21776 { (eval echo configure:21777: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
21777 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
21778 if test -z "$ac_err"; then
21779   rm -rf conftest*
21780   eval "ac_cv_header_$ac_safe=yes"
21781 else
21782   echo "$ac_err" >&5
21783   echo "configure: failed program was:" >&5
21784   cat conftest.$ac_ext >&5
21785   rm -rf conftest*
21786   eval "ac_cv_header_$ac_safe=no"
21787 fi
21788 rm -f conftest*
21789 fi
21790 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
21791   echo "$ac_t""yes" 1>&6
21792     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
21793   cat >> confdefs.h <<EOF
21794 #define $ac_tr_hdr 1
21795 EOF
21796  
21797 else
21798   echo "$ac_t""no" 1>&6
21799 { echo "configure: error: could not locate SQL headers" 1>&2; exit 1; }
21800         
21801 fi
21802 done
21803
21804
21805         sql_LIBS="$LIBS"
21806         LIBS="$LTHREAD_LIBS"
21807
21808         echo $ac_n "checking for SQLDriverConnect in -liodbc""... $ac_c" 1>&6
21809 echo "configure:21810: checking for SQLDriverConnect in -liodbc" >&5
21810 ac_lib_var=`echo iodbc'_'SQLDriverConnect | sed 'y%./+-:%__p__%'`
21811 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
21812   echo $ac_n "(cached) $ac_c" 1>&6
21813 else
21814   ac_save_LIBS="$LIBS"
21815 LIBS="-liodbc  $LIBS"
21816 cat > conftest.$ac_ext <<EOF
21817 #line 21818 "configure"
21818 #include "confdefs.h"
21819 /* Override any gcc2 internal prototype to avoid an error.  */
21820 /* We use char because int might match the return type of a gcc2
21821     builtin and then its argument prototype would still apply.  */
21822 char SQLDriverConnect();
21823
21824 int main() {
21825 SQLDriverConnect()
21826 ; return 0; }
21827 EOF
21828 if { (eval echo configure:21829: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21829   rm -rf conftest*
21830   eval "ac_cv_lib_$ac_lib_var=yes"
21831 else
21832   echo "configure: failed program was:" >&5
21833   cat conftest.$ac_ext >&5
21834   rm -rf conftest*
21835   eval "ac_cv_lib_$ac_lib_var=no"
21836 fi
21837 rm -f conftest*
21838 LIBS="$ac_save_LIBS"
21839
21840 fi
21841 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
21842   echo "$ac_t""yes" 1>&6
21843   have_iodbc=yes
21844 else
21845   echo "$ac_t""no" 1>&6
21846 have_iodbc=no
21847 fi
21848
21849         if test $have_iodbc = yes ; then
21850                 ol_link_sql="-liodbc"
21851         else
21852                 echo $ac_n "checking for SQLDriverConnect in -lodbc""... $ac_c" 1>&6
21853 echo "configure:21854: checking for SQLDriverConnect in -lodbc" >&5
21854 ac_lib_var=`echo odbc'_'SQLDriverConnect | sed 'y%./+-:%__p__%'`
21855 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
21856   echo $ac_n "(cached) $ac_c" 1>&6
21857 else
21858   ac_save_LIBS="$LIBS"
21859 LIBS="-lodbc  $LIBS"
21860 cat > conftest.$ac_ext <<EOF
21861 #line 21862 "configure"
21862 #include "confdefs.h"
21863 /* Override any gcc2 internal prototype to avoid an error.  */
21864 /* We use char because int might match the return type of a gcc2
21865     builtin and then its argument prototype would still apply.  */
21866 char SQLDriverConnect();
21867
21868 int main() {
21869 SQLDriverConnect()
21870 ; return 0; }
21871 EOF
21872 if { (eval echo configure:21873: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21873   rm -rf conftest*
21874   eval "ac_cv_lib_$ac_lib_var=yes"
21875 else
21876   echo "configure: failed program was:" >&5
21877   cat conftest.$ac_ext >&5
21878   rm -rf conftest*
21879   eval "ac_cv_lib_$ac_lib_var=no"
21880 fi
21881 rm -f conftest*
21882 LIBS="$ac_save_LIBS"
21883
21884 fi
21885 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
21886   echo "$ac_t""yes" 1>&6
21887   have_odbc=yes
21888 else
21889   echo "$ac_t""no" 1>&6
21890 have_odbc=no
21891 fi
21892
21893                 if test $have_odbc = yes ; then
21894                         ol_link_sql="-lodbc"
21895                 fi
21896         fi
21897
21898         LIBS="$sql_LIBS"
21899
21900         if test $ol_link_sql != no ; then
21901                 SLAPD_SQL_LIBS="$ol_link_sql"
21902
21903         elif test $ol_enable_sql != auto ; then
21904                 { echo "configure: error: could not locate suitable ODBC library" 1>&2; exit 1; }
21905         fi
21906 fi
21907
21908 WITH_SASL=no
21909 ol_link_sasl=no
21910 ol_link_spasswd=no
21911 if test $ol_with_cyrus_sasl != no ; then
21912         for ac_hdr in sasl/sasl.h sasl.h
21913 do
21914 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
21915 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
21916 echo "configure:21917: checking for $ac_hdr" >&5
21917 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
21918   echo $ac_n "(cached) $ac_c" 1>&6
21919 else
21920   cat > conftest.$ac_ext <<EOF
21921 #line 21922 "configure"
21922 #include "confdefs.h"
21923 #include <$ac_hdr>
21924 EOF
21925 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
21926 { (eval echo configure:21927: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
21927 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
21928 if test -z "$ac_err"; then
21929   rm -rf conftest*
21930   eval "ac_cv_header_$ac_safe=yes"
21931 else
21932   echo "$ac_err" >&5
21933   echo "configure: failed program was:" >&5
21934   cat conftest.$ac_ext >&5
21935   rm -rf conftest*
21936   eval "ac_cv_header_$ac_safe=no"
21937 fi
21938 rm -f conftest*
21939 fi
21940 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
21941   echo "$ac_t""yes" 1>&6
21942     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
21943   cat >> confdefs.h <<EOF
21944 #define $ac_tr_hdr 1
21945 EOF
21946  
21947 else
21948   echo "$ac_t""no" 1>&6
21949 fi
21950 done
21951
21952
21953         if test $ac_cv_header_sasl_sasl_h = yes -o $ac_cv_header_sasl_h = yes; then
21954                 echo $ac_n "checking for sasl_client_init in -lsasl2""... $ac_c" 1>&6
21955 echo "configure:21956: checking for sasl_client_init in -lsasl2" >&5
21956 ac_lib_var=`echo sasl2'_'sasl_client_init | sed 'y%./+-:%__p__%'`
21957 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
21958   echo $ac_n "(cached) $ac_c" 1>&6
21959 else
21960   ac_save_LIBS="$LIBS"
21961 LIBS="-lsasl2  $LIBS"
21962 cat > conftest.$ac_ext <<EOF
21963 #line 21964 "configure"
21964 #include "confdefs.h"
21965 /* Override any gcc2 internal prototype to avoid an error.  */
21966 /* We use char because int might match the return type of a gcc2
21967     builtin and then its argument prototype would still apply.  */
21968 char sasl_client_init();
21969
21970 int main() {
21971 sasl_client_init()
21972 ; return 0; }
21973 EOF
21974 if { (eval echo configure:21975: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21975   rm -rf conftest*
21976   eval "ac_cv_lib_$ac_lib_var=yes"
21977 else
21978   echo "configure: failed program was:" >&5
21979   cat conftest.$ac_ext >&5
21980   rm -rf conftest*
21981   eval "ac_cv_lib_$ac_lib_var=no"
21982 fi
21983 rm -f conftest*
21984 LIBS="$ac_save_LIBS"
21985
21986 fi
21987 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
21988   echo "$ac_t""yes" 1>&6
21989   ol_link_sasl="-lsasl2"
21990 else
21991   echo "$ac_t""no" 1>&6
21992 echo $ac_n "checking for sasl_client_init in -lsasl""... $ac_c" 1>&6
21993 echo "configure:21994: checking for sasl_client_init in -lsasl" >&5
21994 ac_lib_var=`echo sasl'_'sasl_client_init | sed 'y%./+-:%__p__%'`
21995 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
21996   echo $ac_n "(cached) $ac_c" 1>&6
21997 else
21998   ac_save_LIBS="$LIBS"
21999 LIBS="-lsasl  $LIBS"
22000 cat > conftest.$ac_ext <<EOF
22001 #line 22002 "configure"
22002 #include "confdefs.h"
22003 /* Override any gcc2 internal prototype to avoid an error.  */
22004 /* We use char because int might match the return type of a gcc2
22005     builtin and then its argument prototype would still apply.  */
22006 char sasl_client_init();
22007
22008 int main() {
22009 sasl_client_init()
22010 ; return 0; }
22011 EOF
22012 if { (eval echo configure:22013: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22013   rm -rf conftest*
22014   eval "ac_cv_lib_$ac_lib_var=yes"
22015 else
22016   echo "configure: failed program was:" >&5
22017   cat conftest.$ac_ext >&5
22018   rm -rf conftest*
22019   eval "ac_cv_lib_$ac_lib_var=no"
22020 fi
22021 rm -f conftest*
22022 LIBS="$ac_save_LIBS"
22023
22024 fi
22025 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
22026   echo "$ac_t""yes" 1>&6
22027   ol_link_sasl="-lsasl"
22028 else
22029   echo "$ac_t""no" 1>&6
22030 fi
22031
22032 fi
22033
22034         fi
22035
22036         if test $ol_link_sasl = no ; then
22037                 if test $ol_with_cyrus_sasl != auto ; then
22038                         { echo "configure: error: Could not locate Cyrus SASL" 1>&2; exit 1; }
22039                 else
22040                         echo "configure: warning: Could not locate Cyrus SASL" 1>&2
22041                         echo "configure: warning: SASL authentication not supported!" 1>&2
22042                         if test $ol_link_tls = no ; then
22043                                 echo "configure: warning: Strong authentication not supported!" 1>&2
22044                         fi
22045                 fi
22046         else
22047                 echo $ac_n "checking Cyrus SASL library version""... $ac_c" 1>&6
22048 echo "configure:22049: checking Cyrus SASL library version" >&5
22049 if eval "test \"\${ol_cv_sasl_compat+set}\" = set"; then
22050   echo $ac_n "(cached) $ac_c" 1>&6
22051 else
22052   
22053         cat > conftest.$ac_ext <<EOF
22054 #line 22055 "configure"
22055 #include "confdefs.h"
22056
22057 #ifdef HAVE_SASL_SASL_H
22058 #include <sasl/sasl.h>
22059 #else
22060 #include <sasl.h>
22061 #endif
22062
22063 /* Require 2.1.15+ */
22064 #if SASL_VERSION_MAJOR == 2  && SASL_VERSION_MINOR > 1
22065         char *__sasl_compat = "2.2+ or better okay (we guess)";
22066 #elif SASL_VERSION_MAJOR == 2  && SASL_VERSION_MINOR == 1 \
22067         && SASL_VERSION_STEP >=15
22068         char *__sasl_compat = "2.1.15+ or better okay";
22069 #endif
22070         
22071 EOF
22072 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
22073   egrep "__sasl_compat" >/dev/null 2>&1; then
22074   rm -rf conftest*
22075   ol_cv_sasl_compat=yes
22076 else
22077   rm -rf conftest*
22078   ol_cv_sasl_compat=no
22079 fi
22080 rm -f conftest*
22081
22082 fi
22083
22084 echo "$ac_t""$ol_cv_sasl_compat" 1>&6
22085
22086                 if test $ol_cv_sasl_compat = no ; then
22087                         ol_link_sasl=no
22088                         { echo "configure: error: Cyrus SASL library located but is incompatible" 1>&2; exit 1; }
22089                 fi
22090
22091                 cat >> confdefs.h <<\EOF
22092 #define HAVE_CYRUS_SASL 1
22093 EOF
22094
22095                 SASL_LIBS="$ol_link_sasl"
22096                 if test $ol_enable_spasswd != no ; then
22097                         ol_link_spasswd=yes
22098                 fi
22099
22100                 ac_save_LIBS="$LIBS"
22101                 LIBS="$LIBS $ol_link_sasl"
22102                 echo $ac_n "checking for sasl_version""... $ac_c" 1>&6
22103 echo "configure:22104: checking for sasl_version" >&5
22104 if eval "test \"\${ac_cv_func_sasl_version+set}\" = set"; then
22105   echo $ac_n "(cached) $ac_c" 1>&6
22106 else
22107   cat > conftest.$ac_ext <<EOF
22108 #line 22109 "configure"
22109 #include "confdefs.h"
22110 /* System header to define __stub macros and hopefully few prototypes,
22111     which can conflict with char sasl_version(); below.  */
22112 #include <assert.h>
22113 /* Override any gcc2 internal prototype to avoid an error.  */
22114 /* We use char because int might match the return type of a gcc2
22115     builtin and then its argument prototype would still apply.  */
22116 char sasl_version();
22117 char (*f)();
22118
22119 int main() {
22120
22121 /* The GNU C library defines this for functions which it implements
22122     to always fail with ENOSYS.  Some functions are actually named
22123     something starting with __ and the normal name is an alias.  */
22124 #if defined (__stub_sasl_version) || defined (__stub___sasl_version)
22125 choke me
22126 #else
22127 f = sasl_version;
22128 #endif
22129
22130 ; return 0; }
22131 EOF
22132 if { (eval echo configure:22133: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22133   rm -rf conftest*
22134   eval "ac_cv_func_sasl_version=yes"
22135 else
22136   echo "configure: failed program was:" >&5
22137   cat conftest.$ac_ext >&5
22138   rm -rf conftest*
22139   eval "ac_cv_func_sasl_version=no"
22140 fi
22141 rm -f conftest*
22142 fi
22143
22144 if eval "test \"`echo '$ac_cv_func_'sasl_version`\" = yes"; then
22145   echo "$ac_t""yes" 1>&6
22146   cat >> confdefs.h <<\EOF
22147 #define HAVE_SASL_VERSION 1
22148 EOF
22149
22150 else
22151   echo "$ac_t""no" 1>&6
22152 fi
22153
22154                 LIBS="$ac_save_LIBS"
22155
22156                 WITH_SASL=yes
22157         fi
22158
22159 else
22160         echo "configure: warning: SASL authentication not supported!" 1>&2
22161         if test $ol_link_tls = no ; then
22162                 echo "configure: warning: Strong authentication not supported!" 1>&2
22163         fi
22164 fi
22165
22166 if test $cross_compiling != yes -a "$ac_cv_mingw32" != yes ; then
22167         dev=no
22168         if test -r /dev/urandom ; then
22169                 dev="/dev/urandom";
22170         elif test -r /idev/urandom ; then
22171                 dev="/idev/urandom";
22172         elif test -r /dev/srandom ; then
22173                 dev="/dev/srandom";
22174         elif test -r /dev/random ; then
22175                 dev="/dev/random";
22176         elif test -r /idev/random ; then
22177                 dev="/idev/random";
22178         fi
22179
22180         if test $dev != no ; then
22181                 cat >> confdefs.h <<EOF
22182 #define URANDOM_DEVICE "$dev"
22183 EOF
22184
22185         fi
22186 fi
22187
22188 ol_link_fetch=no
22189 if test $ol_with_fetch != no ; then
22190         ol_LIBS=$LIBS
22191 LIBS="-lfetch -lcom_err $LIBS"
22192 echo $ac_n "checking fetch(3) library""... $ac_c" 1>&6
22193 echo "configure:22194: checking fetch(3) library" >&5
22194 if eval "test \"\${ol_cv_lib_fetch+set}\" = set"; then
22195   echo $ac_n "(cached) $ac_c" 1>&6
22196 else
22197   
22198         cat > conftest.$ac_ext <<EOF
22199 #line 22200 "configure"
22200 #include "confdefs.h"
22201
22202 #include <sys/param.h>
22203 #include <stdio.h>
22204 #include <fetch.h>
22205 int main() {
22206 struct url *u = fetchParseURL("file:///"); 
22207 ; return 0; }
22208 EOF
22209 if { (eval echo configure:22210: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22210   rm -rf conftest*
22211   ol_cv_lib_fetch=yes
22212 else
22213   echo "configure: failed program was:" >&5
22214   cat conftest.$ac_ext >&5
22215   rm -rf conftest*
22216   ol_cv_lib_fetch=no
22217 fi
22218 rm -f conftest*
22219 fi
22220
22221 echo "$ac_t""$ol_cv_lib_fetch" 1>&6
22222 LIBS=$ol_LIBS
22223 if test $ol_cv_lib_fetch != no ; then
22224         ol_link_fetch="-lfetch -lcom_err"
22225         cat >> confdefs.h <<\EOF
22226 #define HAVE_FETCH 1
22227 EOF
22228
22229 fi
22230
22231
22232         if test $ol_cv_lib_fetch != no ; then
22233                 LUTIL_LIBS="$LUTIL_LIBS $ol_link_fetch"
22234                 ol_link_fetch=freebsd
22235
22236         elif test $ol_with_fetch != auto ; then
22237                 { echo "configure: error: no suitable API for --with-fetch=$ol_with_fetch" 1>&2; exit 1; }
22238         fi 
22239 fi
22240
22241 if test $ol_enable_crypt != no ; then
22242         save_LIBS="$LIBS"
22243         LIBS="$TLS_LIBS $LIBS"
22244
22245         echo $ac_n "checking for crypt""... $ac_c" 1>&6
22246 echo "configure:22247: checking for crypt" >&5
22247 if eval "test \"\${ac_cv_func_crypt+set}\" = set"; then
22248   echo $ac_n "(cached) $ac_c" 1>&6
22249 else
22250   cat > conftest.$ac_ext <<EOF
22251 #line 22252 "configure"
22252 #include "confdefs.h"
22253 /* System header to define __stub macros and hopefully few prototypes,
22254     which can conflict with char crypt(); below.  */
22255 #include <assert.h>
22256 /* Override any gcc2 internal prototype to avoid an error.  */
22257 /* We use char because int might match the return type of a gcc2
22258     builtin and then its argument prototype would still apply.  */
22259 char crypt();
22260 char (*f)();
22261
22262 int main() {
22263
22264 /* The GNU C library defines this for functions which it implements
22265     to always fail with ENOSYS.  Some functions are actually named
22266     something starting with __ and the normal name is an alias.  */
22267 #if defined (__stub_crypt) || defined (__stub___crypt)
22268 choke me
22269 #else
22270 f = crypt;
22271 #endif
22272
22273 ; return 0; }
22274 EOF
22275 if { (eval echo configure:22276: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22276   rm -rf conftest*
22277   eval "ac_cv_func_crypt=yes"
22278 else
22279   echo "configure: failed program was:" >&5
22280   cat conftest.$ac_ext >&5
22281   rm -rf conftest*
22282   eval "ac_cv_func_crypt=no"
22283 fi
22284 rm -f conftest*
22285 fi
22286
22287 if eval "test \"`echo '$ac_cv_func_'crypt`\" = yes"; then
22288   echo "$ac_t""yes" 1>&6
22289   have_crypt=yes
22290 else
22291   echo "$ac_t""no" 1>&6
22292
22293                 LIBS="$save_LIBS"
22294                 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
22295 echo "configure:22296: checking for crypt in -lcrypt" >&5
22296 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-:%__p__%'`
22297 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
22298   echo $ac_n "(cached) $ac_c" 1>&6
22299 else
22300   ac_save_LIBS="$LIBS"
22301 LIBS="-lcrypt  $LIBS"
22302 cat > conftest.$ac_ext <<EOF
22303 #line 22304 "configure"
22304 #include "confdefs.h"
22305 /* Override any gcc2 internal prototype to avoid an error.  */
22306 /* We use char because int might match the return type of a gcc2
22307     builtin and then its argument prototype would still apply.  */
22308 char crypt();
22309
22310 int main() {
22311 crypt()
22312 ; return 0; }
22313 EOF
22314 if { (eval echo configure:22315: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22315   rm -rf conftest*
22316   eval "ac_cv_lib_$ac_lib_var=yes"
22317 else
22318   echo "configure: failed program was:" >&5
22319   cat conftest.$ac_ext >&5
22320   rm -rf conftest*
22321   eval "ac_cv_lib_$ac_lib_var=no"
22322 fi
22323 rm -f conftest*
22324 LIBS="$ac_save_LIBS"
22325
22326 fi
22327 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
22328   echo "$ac_t""yes" 1>&6
22329   LUTIL_LIBS="$LUTIL_LIBS -lcrypt"
22330                         have_crypt=yes
22331 else
22332   echo "$ac_t""no" 1>&6
22333 have_crypt=no
22334 fi
22335
22336 fi
22337
22338
22339         LIBS="$save_LIBS"
22340
22341         if test $have_crypt = yes ; then
22342                 cat >> confdefs.h <<\EOF
22343 #define HAVE_CRYPT 1
22344 EOF
22345
22346         else
22347                 echo "configure: warning: could not find crypt" 1>&2
22348                 if test $ol_enable_crypt = yes ; then
22349                         { echo "configure: error: could not find crypt, select appropriate options or disable" 1>&2; exit 1; }
22350                 fi
22351
22352                 echo "configure: warning: disabling crypt support" 1>&2
22353                 ol_enable_crypt=no
22354         fi
22355 fi
22356
22357 if test $ol_enable_proctitle != no ; then
22358         echo $ac_n "checking for setproctitle""... $ac_c" 1>&6
22359 echo "configure:22360: checking for setproctitle" >&5
22360 if eval "test \"\${ac_cv_func_setproctitle+set}\" = set"; then
22361   echo $ac_n "(cached) $ac_c" 1>&6
22362 else
22363   cat > conftest.$ac_ext <<EOF
22364 #line 22365 "configure"
22365 #include "confdefs.h"
22366 /* System header to define __stub macros and hopefully few prototypes,
22367     which can conflict with char setproctitle(); below.  */
22368 #include <assert.h>
22369 /* Override any gcc2 internal prototype to avoid an error.  */
22370 /* We use char because int might match the return type of a gcc2
22371     builtin and then its argument prototype would still apply.  */
22372 char setproctitle();
22373 char (*f)();
22374
22375 int main() {
22376
22377 /* The GNU C library defines this for functions which it implements
22378     to always fail with ENOSYS.  Some functions are actually named
22379     something starting with __ and the normal name is an alias.  */
22380 #if defined (__stub_setproctitle) || defined (__stub___setproctitle)
22381 choke me
22382 #else
22383 f = setproctitle;
22384 #endif
22385
22386 ; return 0; }
22387 EOF
22388 if { (eval echo configure:22389: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22389   rm -rf conftest*
22390   eval "ac_cv_func_setproctitle=yes"
22391 else
22392   echo "configure: failed program was:" >&5
22393   cat conftest.$ac_ext >&5
22394   rm -rf conftest*
22395   eval "ac_cv_func_setproctitle=no"
22396 fi
22397 rm -f conftest*
22398 fi
22399
22400 if eval "test \"`echo '$ac_cv_func_'setproctitle`\" = yes"; then
22401   echo "$ac_t""yes" 1>&6
22402   have_setproctitle=yes
22403 else
22404   echo "$ac_t""no" 1>&6
22405
22406                 echo $ac_n "checking for setproctitle in -lutil""... $ac_c" 1>&6
22407 echo "configure:22408: checking for setproctitle in -lutil" >&5
22408 ac_lib_var=`echo util'_'setproctitle | sed 'y%./+-:%__p__%'`
22409 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
22410   echo $ac_n "(cached) $ac_c" 1>&6
22411 else
22412   ac_save_LIBS="$LIBS"
22413 LIBS="-lutil  $LIBS"
22414 cat > conftest.$ac_ext <<EOF
22415 #line 22416 "configure"
22416 #include "confdefs.h"
22417 /* Override any gcc2 internal prototype to avoid an error.  */
22418 /* We use char because int might match the return type of a gcc2
22419     builtin and then its argument prototype would still apply.  */
22420 char setproctitle();
22421
22422 int main() {
22423 setproctitle()
22424 ; return 0; }
22425 EOF
22426 if { (eval echo configure:22427: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22427   rm -rf conftest*
22428   eval "ac_cv_lib_$ac_lib_var=yes"
22429 else
22430   echo "configure: failed program was:" >&5
22431   cat conftest.$ac_ext >&5
22432   rm -rf conftest*
22433   eval "ac_cv_lib_$ac_lib_var=no"
22434 fi
22435 rm -f conftest*
22436 LIBS="$ac_save_LIBS"
22437
22438 fi
22439 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
22440   echo "$ac_t""yes" 1>&6
22441   have_setproctitle=yes
22442                         LUTIL_LIBS="$LUTIL_LIBS -lutil"
22443 else
22444   echo "$ac_t""no" 1>&6
22445 have_setproctitle=no
22446                         LIBOBJS="$LIBOBJS setproctitle.o"
22447                         LIBSRCS="$LIBSRCS setproctitle.c"
22448 fi
22449
22450 fi
22451
22452
22453         if test $have_setproctitle = yes ; then
22454                 cat >> confdefs.h <<\EOF
22455 #define HAVE_SETPROCTITLE 1
22456 EOF
22457
22458         fi
22459 fi
22460
22461 if test $ol_enable_slp != no ; then
22462         for ac_hdr in slp.h 
22463 do
22464 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
22465 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
22466 echo "configure:22467: checking for $ac_hdr" >&5
22467 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
22468   echo $ac_n "(cached) $ac_c" 1>&6
22469 else
22470   cat > conftest.$ac_ext <<EOF
22471 #line 22472 "configure"
22472 #include "confdefs.h"
22473 #include <$ac_hdr>
22474 EOF
22475 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
22476 { (eval echo configure:22477: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
22477 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
22478 if test -z "$ac_err"; then
22479   rm -rf conftest*
22480   eval "ac_cv_header_$ac_safe=yes"
22481 else
22482   echo "$ac_err" >&5
22483   echo "configure: failed program was:" >&5
22484   cat conftest.$ac_ext >&5
22485   rm -rf conftest*
22486   eval "ac_cv_header_$ac_safe=no"
22487 fi
22488 rm -f conftest*
22489 fi
22490 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
22491   echo "$ac_t""yes" 1>&6
22492     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
22493   cat >> confdefs.h <<EOF
22494 #define $ac_tr_hdr 1
22495 EOF
22496  
22497 else
22498   echo "$ac_t""no" 1>&6
22499 fi
22500 done
22501
22502
22503         if test $ac_cv_header_slp_h = yes ; then
22504                 echo $ac_n "checking for SLPOpen in -lslp""... $ac_c" 1>&6
22505 echo "configure:22506: checking for SLPOpen in -lslp" >&5
22506 ac_lib_var=`echo slp'_'SLPOpen | sed 'y%./+-:%__p__%'`
22507 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
22508   echo $ac_n "(cached) $ac_c" 1>&6
22509 else
22510   ac_save_LIBS="$LIBS"
22511 LIBS="-lslp  $LIBS"
22512 cat > conftest.$ac_ext <<EOF
22513 #line 22514 "configure"
22514 #include "confdefs.h"
22515 /* Override any gcc2 internal prototype to avoid an error.  */
22516 /* We use char because int might match the return type of a gcc2
22517     builtin and then its argument prototype would still apply.  */
22518 char SLPOpen();
22519
22520 int main() {
22521 SLPOpen()
22522 ; return 0; }
22523 EOF
22524 if { (eval echo configure:22525: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22525   rm -rf conftest*
22526   eval "ac_cv_lib_$ac_lib_var=yes"
22527 else
22528   echo "configure: failed program was:" >&5
22529   cat conftest.$ac_ext >&5
22530   rm -rf conftest*
22531   eval "ac_cv_lib_$ac_lib_var=no"
22532 fi
22533 rm -f conftest*
22534 LIBS="$ac_save_LIBS"
22535
22536 fi
22537 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
22538   echo "$ac_t""yes" 1>&6
22539   have_slp=yes
22540 else
22541   echo "$ac_t""no" 1>&6
22542 have_slp=no
22543 fi
22544
22545                 if test $have_slp = yes ; then
22546                         cat >> confdefs.h <<\EOF
22547 #define HAVE_SLP 1
22548 EOF
22549
22550                         SLAPD_SLP_LIBS=-lslp
22551                 fi
22552
22553         elif test $ol_enable_slp = yes ; then
22554                 { echo "configure: error: SLP not found" 1>&2; exit 1; }
22555         fi
22556 fi
22557
22558 if test "$ol_with_multiple_precision" != "no" ; then
22559         ol_have_bignum=no
22560         ol_have_gmp=no
22561
22562         for ac_hdr in openssl/bn.h bn.h
22563 do
22564 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
22565 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
22566 echo "configure:22567: checking for $ac_hdr" >&5
22567 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
22568   echo $ac_n "(cached) $ac_c" 1>&6
22569 else
22570   cat > conftest.$ac_ext <<EOF
22571 #line 22572 "configure"
22572 #include "confdefs.h"
22573 #include <$ac_hdr>
22574 EOF
22575 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
22576 { (eval echo configure:22577: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
22577 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
22578 if test -z "$ac_err"; then
22579   rm -rf conftest*
22580   eval "ac_cv_header_$ac_safe=yes"
22581 else
22582   echo "$ac_err" >&5
22583   echo "configure: failed program was:" >&5
22584   cat conftest.$ac_ext >&5
22585   rm -rf conftest*
22586   eval "ac_cv_header_$ac_safe=no"
22587 fi
22588 rm -f conftest*
22589 fi
22590 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
22591   echo "$ac_t""yes" 1>&6
22592     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
22593   cat >> confdefs.h <<EOF
22594 #define $ac_tr_hdr 1
22595 EOF
22596  
22597 else
22598   echo "$ac_t""no" 1>&6
22599 fi
22600 done
22601
22602         for ac_hdr in openssl/crypto.h crypto.h
22603 do
22604 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
22605 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
22606 echo "configure:22607: checking for $ac_hdr" >&5
22607 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
22608   echo $ac_n "(cached) $ac_c" 1>&6
22609 else
22610   cat > conftest.$ac_ext <<EOF
22611 #line 22612 "configure"
22612 #include "confdefs.h"
22613 #include <$ac_hdr>
22614 EOF
22615 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
22616 { (eval echo configure:22617: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
22617 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
22618 if test -z "$ac_err"; then
22619   rm -rf conftest*
22620   eval "ac_cv_header_$ac_safe=yes"
22621 else
22622   echo "$ac_err" >&5
22623   echo "configure: failed program was:" >&5
22624   cat conftest.$ac_ext >&5
22625   rm -rf conftest*
22626   eval "ac_cv_header_$ac_safe=no"
22627 fi
22628 rm -f conftest*
22629 fi
22630 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
22631   echo "$ac_t""yes" 1>&6
22632     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
22633   cat >> confdefs.h <<EOF
22634 #define $ac_tr_hdr 1
22635 EOF
22636  
22637 else
22638   echo "$ac_t""no" 1>&6
22639 fi
22640 done
22641
22642         for ac_hdr in gmp.h 
22643 do
22644 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
22645 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
22646 echo "configure:22647: checking for $ac_hdr" >&5
22647 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
22648   echo $ac_n "(cached) $ac_c" 1>&6
22649 else
22650   cat > conftest.$ac_ext <<EOF
22651 #line 22652 "configure"
22652 #include "confdefs.h"
22653 #include <$ac_hdr>
22654 EOF
22655 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
22656 { (eval echo configure:22657: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
22657 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
22658 if test -z "$ac_err"; then
22659   rm -rf conftest*
22660   eval "ac_cv_header_$ac_safe=yes"
22661 else
22662   echo "$ac_err" >&5
22663   echo "configure: failed program was:" >&5
22664   cat conftest.$ac_ext >&5
22665   rm -rf conftest*
22666   eval "ac_cv_header_$ac_safe=no"
22667 fi
22668 rm -f conftest*
22669 fi
22670 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
22671   echo "$ac_t""yes" 1>&6
22672     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
22673   cat >> confdefs.h <<EOF
22674 #define $ac_tr_hdr 1
22675 EOF
22676  
22677 else
22678   echo "$ac_t""no" 1>&6
22679 fi
22680 done
22681
22682
22683         if test "$ol_with_tls" = "found" ; then
22684                 ol_have_bn_h=no
22685                 ol_have_crypto_h=no
22686
22687                 if test "$ac_cv_header_openssl_bn_h" = "yes" \
22688                                 -o "$ac_cv_header_bn_h" = "yes" ; then
22689                         ol_have_bn_h=yes
22690                 fi
22691
22692                 if test "$ac_cv_header_openssl_crypto_h" = "yes" \
22693                                 -o "$ac_cv_header_crypto_h" = "yes" ; then
22694                         ol_have_crypto_h=yes
22695                 fi
22696
22697                 if test "$ol_have_bn_h" = "yes" \
22698                                 -a "$ol_have_crypto_h" = "yes" ; then
22699                         ol_have_bignum=yes
22700                 fi
22701         fi
22702
22703         if test $ac_cv_header_gmp_h = yes ; then
22704                 echo $ac_n "checking for __gmpz_add_ui in -lgmp""... $ac_c" 1>&6
22705 echo "configure:22706: checking for __gmpz_add_ui in -lgmp" >&5
22706 ac_lib_var=`echo gmp'_'__gmpz_add_ui | sed 'y%./+-:%__p__%'`
22707 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
22708   echo $ac_n "(cached) $ac_c" 1>&6
22709 else
22710   ac_save_LIBS="$LIBS"
22711 LIBS="-lgmp  $LIBS"
22712 cat > conftest.$ac_ext <<EOF
22713 #line 22714 "configure"
22714 #include "confdefs.h"
22715 /* Override any gcc2 internal prototype to avoid an error.  */
22716 /* We use char because int might match the return type of a gcc2
22717     builtin and then its argument prototype would still apply.  */
22718 char __gmpz_add_ui();
22719
22720 int main() {
22721 __gmpz_add_ui()
22722 ; return 0; }
22723 EOF
22724 if { (eval echo configure:22725: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22725   rm -rf conftest*
22726   eval "ac_cv_lib_$ac_lib_var=yes"
22727 else
22728   echo "configure: failed program was:" >&5
22729   cat conftest.$ac_ext >&5
22730   rm -rf conftest*
22731   eval "ac_cv_lib_$ac_lib_var=no"
22732 fi
22733 rm -f conftest*
22734 LIBS="$ac_save_LIBS"
22735
22736 fi
22737 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
22738   echo "$ac_t""yes" 1>&6
22739   have_gmp=yes
22740 else
22741   echo "$ac_t""no" 1>&6
22742 have_gmp=no
22743 fi
22744
22745                 if test $have_gmp = yes ; then
22746                         ol_have_gmp=yes
22747                 fi
22748         fi
22749
22750         echo $ac_n "checking for multiple precision support""... $ac_c" 1>&6
22751 echo "configure:22752: checking for multiple precision support" >&5
22752
22753         ol_mp_support="none"
22754         case "$ol_with_multiple_precision" in
22755         auto)
22756                                                                                 if test "$ol_have_bignum" = "yes" ; then
22757                         ol_mp_support="bignum"
22758                 else
22759                         if test "$ol_have_gmp" = "yes" ; then
22760                                 ol_mp_support="gmp"
22761                         fi
22762                 fi
22763                 ;;
22764         bignum)
22765                 if test "$ol_have_bignum" != "yes" ; then
22766                         { echo "configure: error: OpenSSL's BIGNUM not available" 1>&2; exit 1; }
22767                 fi
22768                 ol_mp_support="bignum"
22769                 ;;
22770         gmp)
22771                 if test "$ol_have_gmp" != "yes" ; then
22772                         { echo "configure: error: GMP not available" 1>&2; exit 1; }
22773                 fi
22774                 ol_mp_support="gmp"
22775                 ;;
22776         yes)
22777                 if test "$ol_have_bignum" = "yes" ; then
22778                         ol_mp_support="bignum"
22779                 elif test "$ol_have_gmp" = "yes" ; then
22780                         ol_mp_support="gmp"
22781                 else
22782                         { echo "configure: error: not available" 1>&2; exit 1; }
22783                 fi
22784                 ;;
22785         esac
22786
22787         case "$ol_mp_support" in
22788         bignum)
22789                 cat >> confdefs.h <<\EOF
22790 #define HAVE_BIGNUM 1
22791 EOF
22792
22793                 ;;
22794         gmp)
22795                 cat >> confdefs.h <<\EOF
22796 #define HAVE_GMP 1
22797 EOF
22798
22799                 SLAPD_GMP_LIBS=-lgmp
22800                 ;;
22801         none)
22802                 ;;
22803         esac
22804
22805         echo "$ac_t""$ol_mp_support" 1>&6
22806 fi
22807
22808
22809 echo $ac_n "checking long long""... $ac_c" 1>&6
22810 echo "configure:22811: checking long long" >&5
22811 if eval "test \"\${ol_cv_type_long_long+set}\" = set"; then
22812   echo $ac_n "(cached) $ac_c" 1>&6
22813 else
22814   
22815         cat > conftest.$ac_ext <<EOF
22816 #line 22817 "configure"
22817 #include "confdefs.h"
22818
22819 int main() {
22820 long long x;
22821 ; return 0; }
22822 EOF
22823 if { (eval echo configure:22824: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22824   rm -rf conftest*
22825   ol_cv_type_long_long=yes
22826 else
22827   echo "configure: failed program was:" >&5
22828   cat conftest.$ac_ext >&5
22829   rm -rf conftest*
22830   ol_cv_type_long_long=no
22831 fi
22832 rm -f conftest*
22833 fi
22834
22835 echo "$ac_t""$ol_cv_type_long_long" 1>&6
22836 if test $ol_cv_type_long_long = yes; then
22837         cat >> confdefs.h <<\EOF
22838 #define HAVE_LONG_LONG 1
22839 EOF
22840
22841 fi
22842
22843 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
22844 echo "configure:22845: checking for ANSI C header files" >&5
22845 if eval "test \"\${ac_cv_header_stdc+set}\" = set"; then
22846   echo $ac_n "(cached) $ac_c" 1>&6
22847 else
22848   cat > conftest.$ac_ext <<EOF
22849 #line 22850 "configure"
22850 #include "confdefs.h"
22851 #include <stdlib.h>
22852 #include <stdarg.h>
22853 #include <string.h>
22854 #include <float.h>
22855 EOF
22856 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
22857 { (eval echo configure:22858: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
22858 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
22859 if test -z "$ac_err"; then
22860   rm -rf conftest*
22861   ac_cv_header_stdc=yes
22862 else
22863   echo "$ac_err" >&5
22864   echo "configure: failed program was:" >&5
22865   cat conftest.$ac_ext >&5
22866   rm -rf conftest*
22867   ac_cv_header_stdc=no
22868 fi
22869 rm -f conftest*
22870
22871 if test $ac_cv_header_stdc = yes; then
22872   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
22873 cat > conftest.$ac_ext <<EOF
22874 #line 22875 "configure"
22875 #include "confdefs.h"
22876 #include <string.h>
22877 EOF
22878 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
22879   egrep "memchr" >/dev/null 2>&1; then
22880   :
22881 else
22882   rm -rf conftest*
22883   ac_cv_header_stdc=no
22884 fi
22885 rm -f conftest*
22886
22887 fi
22888
22889 if test $ac_cv_header_stdc = yes; then
22890   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
22891 cat > conftest.$ac_ext <<EOF
22892 #line 22893 "configure"
22893 #include "confdefs.h"
22894 #include <stdlib.h>
22895 EOF
22896 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
22897   egrep "free" >/dev/null 2>&1; then
22898   :
22899 else
22900   rm -rf conftest*
22901   ac_cv_header_stdc=no
22902 fi
22903 rm -f conftest*
22904
22905 fi
22906
22907 if test $ac_cv_header_stdc = yes; then
22908   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
22909 if test "$cross_compiling" = yes; then
22910   :
22911 else
22912   cat > conftest.$ac_ext <<EOF
22913 #line 22914 "configure"
22914 #include "confdefs.h"
22915 #include <ctype.h>
22916 #if ((' ' & 0x0FF) == 0x020)
22917 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
22918 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
22919 #else
22920 #define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
22921  || ('j' <= (c) && (c) <= 'r') \
22922  || ('s' <= (c) && (c) <= 'z'))
22923 #define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
22924 #endif
22925 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
22926 int main () { int i; for (i = 0; i < 256; i++)
22927 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
22928 exit (0); }
22929
22930 EOF
22931 if { (eval echo configure:22932: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
22932 then
22933   :
22934 else
22935   echo "configure: failed program was:" >&5
22936   cat conftest.$ac_ext >&5
22937   rm -fr conftest*
22938   ac_cv_header_stdc=no
22939 fi
22940 rm -fr conftest*
22941 fi
22942
22943 fi
22944 fi
22945
22946 echo "$ac_t""$ac_cv_header_stdc" 1>&6
22947 if test $ac_cv_header_stdc = yes; then
22948   cat >> confdefs.h <<\EOF
22949 #define STDC_HEADERS 1
22950 EOF
22951
22952 fi
22953
22954 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
22955 echo "configure:22956: checking for mode_t" >&5
22956 if eval "test \"\${ac_cv_type_mode_t+set}\" = set"; then
22957   echo $ac_n "(cached) $ac_c" 1>&6
22958 else
22959   cat > conftest.$ac_ext <<EOF
22960 #line 22961 "configure"
22961 #include "confdefs.h"
22962 #include <sys/types.h>
22963 #if STDC_HEADERS
22964 #include <stdlib.h>
22965 #include <stddef.h>
22966 #endif
22967
22968 EOF
22969 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
22970   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
22971   rm -rf conftest*
22972   eval "ac_cv_type_mode_t=yes"
22973 else
22974   rm -rf conftest*
22975   eval "ac_cv_type_mode_t=no"
22976 fi
22977 rm -f conftest*
22978
22979 fi
22980 if eval "test \"`echo '$ac_cv_type_'mode_t`\" = yes"; then
22981   echo "$ac_t""yes" 1>&6
22982 else
22983   echo "$ac_t""no" 1>&6
22984   cat >> confdefs.h <<EOF
22985 #define mode_t int
22986 EOF
22987
22988 fi
22989
22990 echo $ac_n "checking for off_t""... $ac_c" 1>&6
22991 echo "configure:22992: checking for off_t" >&5
22992 if eval "test \"\${ac_cv_type_off_t+set}\" = set"; then
22993   echo $ac_n "(cached) $ac_c" 1>&6
22994 else
22995   cat > conftest.$ac_ext <<EOF
22996 #line 22997 "configure"
22997 #include "confdefs.h"
22998 #include <sys/types.h>
22999 #if STDC_HEADERS
23000 #include <stdlib.h>
23001 #include <stddef.h>
23002 #endif
23003
23004 EOF
23005 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
23006   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
23007   rm -rf conftest*
23008   eval "ac_cv_type_off_t=yes"
23009 else
23010   rm -rf conftest*
23011   eval "ac_cv_type_off_t=no"
23012 fi
23013 rm -f conftest*
23014
23015 fi
23016 if eval "test \"`echo '$ac_cv_type_'off_t`\" = yes"; then
23017   echo "$ac_t""yes" 1>&6
23018 else
23019   echo "$ac_t""no" 1>&6
23020   cat >> confdefs.h <<EOF
23021 #define off_t long
23022 EOF
23023
23024 fi
23025
23026 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
23027 echo "configure:23028: checking for pid_t" >&5
23028 if eval "test \"\${ac_cv_type_pid_t+set}\" = set"; then
23029   echo $ac_n "(cached) $ac_c" 1>&6
23030 else
23031   cat > conftest.$ac_ext <<EOF
23032 #line 23033 "configure"
23033 #include "confdefs.h"
23034 #include <sys/types.h>
23035 #if STDC_HEADERS
23036 #include <stdlib.h>
23037 #include <stddef.h>
23038 #endif
23039
23040 EOF
23041 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
23042   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
23043   rm -rf conftest*
23044   eval "ac_cv_type_pid_t=yes"
23045 else
23046   rm -rf conftest*
23047   eval "ac_cv_type_pid_t=no"
23048 fi
23049 rm -f conftest*
23050
23051 fi
23052 if eval "test \"`echo '$ac_cv_type_'pid_t`\" = yes"; then
23053   echo "$ac_t""yes" 1>&6
23054 else
23055   echo "$ac_t""no" 1>&6
23056   cat >> confdefs.h <<EOF
23057 #define pid_t int
23058 EOF
23059
23060 fi
23061
23062 echo $ac_n "checking for ptrdiff_t""... $ac_c" 1>&6
23063 echo "configure:23064: checking for ptrdiff_t" >&5
23064 if eval "test \"\${am_cv_type_ptrdiff_t+set}\" = set"; then
23065   echo $ac_n "(cached) $ac_c" 1>&6
23066 else
23067   cat > conftest.$ac_ext <<EOF
23068 #line 23069 "configure"
23069 #include "confdefs.h"
23070 #include <stddef.h>
23071 int main() {
23072 ptrdiff_t p
23073 ; return 0; }
23074 EOF
23075 if { (eval echo configure:23076: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23076   rm -rf conftest*
23077   am_cv_type_ptrdiff_t=yes
23078 else
23079   echo "configure: failed program was:" >&5
23080   cat conftest.$ac_ext >&5
23081   rm -rf conftest*
23082   am_cv_type_ptrdiff_t=no
23083 fi
23084 rm -f conftest*
23085 fi
23086
23087 echo "$ac_t""$am_cv_type_ptrdiff_t" 1>&6
23088    if test $am_cv_type_ptrdiff_t = yes; then
23089      cat >> confdefs.h <<\EOF
23090 #define HAVE_PTRDIFF_T 1
23091 EOF
23092
23093    fi
23094
23095 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
23096 echo "configure:23097: checking return type of signal handlers" >&5
23097 if eval "test \"\${ac_cv_type_signal+set}\" = set"; then
23098   echo $ac_n "(cached) $ac_c" 1>&6
23099 else
23100   cat > conftest.$ac_ext <<EOF
23101 #line 23102 "configure"
23102 #include "confdefs.h"
23103 #include <sys/types.h>
23104 #include <signal.h>
23105 #ifdef signal
23106 #undef signal
23107 #endif
23108 #ifdef __cplusplus
23109 extern "C" void (*signal (int, void (*)(int)))(int);
23110 #else
23111 void (*signal ()) ();
23112 #endif
23113
23114 int main() {
23115 int i;
23116 ; return 0; }
23117 EOF
23118 if { (eval echo configure:23119: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23119   rm -rf conftest*
23120   ac_cv_type_signal=void
23121 else
23122   echo "configure: failed program was:" >&5
23123   cat conftest.$ac_ext >&5
23124   rm -rf conftest*
23125   ac_cv_type_signal=int
23126 fi
23127 rm -f conftest*
23128 fi
23129
23130 echo "$ac_t""$ac_cv_type_signal" 1>&6
23131 cat >> confdefs.h <<EOF
23132 #define RETSIGTYPE $ac_cv_type_signal
23133 EOF
23134
23135
23136 echo $ac_n "checking for size_t""... $ac_c" 1>&6
23137 echo "configure:23138: checking for size_t" >&5
23138 if eval "test \"\${ac_cv_type_size_t+set}\" = set"; then
23139   echo $ac_n "(cached) $ac_c" 1>&6
23140 else
23141   cat > conftest.$ac_ext <<EOF
23142 #line 23143 "configure"
23143 #include "confdefs.h"
23144 #include <sys/types.h>
23145 #if STDC_HEADERS
23146 #include <stdlib.h>
23147 #include <stddef.h>
23148 #endif
23149
23150 EOF
23151 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
23152   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
23153   rm -rf conftest*
23154   eval "ac_cv_type_size_t=yes"
23155 else
23156   rm -rf conftest*
23157   eval "ac_cv_type_size_t=no"
23158 fi
23159 rm -f conftest*
23160
23161 fi
23162 if eval "test \"`echo '$ac_cv_type_'size_t`\" = yes"; then
23163   echo "$ac_t""yes" 1>&6
23164 else
23165   echo "$ac_t""no" 1>&6
23166   cat >> confdefs.h <<EOF
23167 #define size_t unsigned
23168 EOF
23169
23170 fi
23171
23172
23173 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
23174 echo "configure:23175: checking for ssize_t" >&5
23175 if eval "test \"\${ac_cv_type_ssize_t+set}\" = set"; then
23176   echo $ac_n "(cached) $ac_c" 1>&6
23177 else
23178   cat > conftest.$ac_ext <<EOF
23179 #line 23180 "configure"
23180 #include "confdefs.h"
23181 #include <sys/types.h>
23182 #if STDC_HEADERS
23183 #include <stdlib.h>
23184 #include <stddef.h>
23185 #endif
23186
23187 EOF
23188 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
23189   egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
23190   rm -rf conftest*
23191   eval "ac_cv_type_ssize_t=yes"
23192 else
23193   rm -rf conftest*
23194   eval "ac_cv_type_ssize_t=no"
23195 fi
23196 rm -f conftest*
23197
23198 fi
23199 if eval "test \"`echo '$ac_cv_type_'ssize_t`\" = yes"; then
23200   echo "$ac_t""yes" 1>&6
23201 else
23202   echo "$ac_t""no" 1>&6
23203   cat >> confdefs.h <<EOF
23204 #define ssize_t signed int
23205 EOF
23206
23207 fi
23208
23209 echo $ac_n "checking for caddr_t""... $ac_c" 1>&6
23210 echo "configure:23211: checking for caddr_t" >&5
23211 if eval "test \"\${ac_cv_type_caddr_t+set}\" = set"; then
23212   echo $ac_n "(cached) $ac_c" 1>&6
23213 else
23214   cat > conftest.$ac_ext <<EOF
23215 #line 23216 "configure"
23216 #include "confdefs.h"
23217 #include <sys/types.h>
23218 #if STDC_HEADERS
23219 #include <stdlib.h>
23220 #include <stddef.h>
23221 #endif
23222
23223 EOF
23224 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
23225   egrep "(^|[^a-zA-Z_0-9])caddr_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
23226   rm -rf conftest*
23227   eval "ac_cv_type_caddr_t=yes"
23228 else
23229   rm -rf conftest*
23230   eval "ac_cv_type_caddr_t=no"
23231 fi
23232 rm -f conftest*
23233
23234 fi
23235 if eval "test \"`echo '$ac_cv_type_'caddr_t`\" = yes"; then
23236   echo "$ac_t""yes" 1>&6
23237 else
23238   echo "$ac_t""no" 1>&6
23239   cat >> confdefs.h <<EOF
23240 #define caddr_t char *
23241 EOF
23242
23243 fi
23244
23245
23246 echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
23247 echo "configure:23248: checking for socklen_t" >&5
23248 if eval "test \"\${ol_cv_type_socklen_t+set}\" = set"; then
23249   echo $ac_n "(cached) $ac_c" 1>&6
23250 else
23251   cat > conftest.$ac_ext <<EOF
23252 #line 23253 "configure"
23253 #include "confdefs.h"
23254
23255 #ifdef HAVE_SYS_TYPES_H
23256 #include <sys/types.h>
23257 #endif
23258 #ifdef HAVE_SYS_SOCKET_H
23259 #include <sys/socket.h>
23260 #endif
23261
23262 int main() {
23263 socklen_t len;
23264 ; return 0; }
23265 EOF
23266 if { (eval echo configure:23267: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23267   rm -rf conftest*
23268   ol_cv_type_socklen_t=yes
23269 else
23270   echo "configure: failed program was:" >&5
23271   cat conftest.$ac_ext >&5
23272   rm -rf conftest*
23273   ol_cv_type_socklen_t=no
23274 fi
23275 rm -f conftest*
23276 fi
23277
23278 echo "$ac_t""$ol_cv_type_socklen_t" 1>&6
23279   if test $ol_cv_type_socklen_t = no; then
23280     cat >> confdefs.h <<\EOF
23281 #define socklen_t int
23282 EOF
23283
23284   fi
23285  
23286 echo $ac_n "checking for member st_blksize in aggregate type struct stat""... $ac_c" 1>&6
23287 echo "configure:23288: checking for member st_blksize in aggregate type struct stat" >&5
23288 if eval "test \"\${ac_cv_c_struct_member_st_blksize+set}\" = set"; then
23289   echo $ac_n "(cached) $ac_c" 1>&6
23290 else
23291   cat > conftest.$ac_ext <<EOF
23292 #line 23293 "configure"
23293 #include "confdefs.h"
23294 #include <sys/types.h>
23295 #include <sys/stat.h>
23296 int main() {
23297 struct stat foo; foo.st_blksize;
23298 ; return 0; }
23299 EOF
23300 if { (eval echo configure:23301: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23301   rm -rf conftest*
23302   ac_cv_c_struct_member_st_blksize=yes
23303 else
23304   echo "configure: failed program was:" >&5
23305   cat conftest.$ac_ext >&5
23306   rm -rf conftest*
23307   ac_cv_c_struct_member_st_blksize=no
23308 fi
23309 rm -f conftest*
23310 fi
23311
23312 echo "$ac_t""$ac_cv_c_struct_member_st_blksize" 1>&6
23313 st_blksize="$ac_cv_c_struct_member_st_blksize"
23314 if test $ac_cv_c_struct_member_st_blksize = yes; then
23315   cat >> confdefs.h <<\EOF
23316 #define HAVE_ST_BLKSIZE 1
23317 EOF
23318
23319 fi
23320
23321 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
23322 echo "configure:23323: checking whether time.h and sys/time.h may both be included" >&5
23323 if eval "test \"\${ac_cv_header_time+set}\" = set"; then
23324   echo $ac_n "(cached) $ac_c" 1>&6
23325 else
23326   cat > conftest.$ac_ext <<EOF
23327 #line 23328 "configure"
23328 #include "confdefs.h"
23329 #include <sys/types.h>
23330 #include <sys/time.h>
23331 #include <time.h>
23332 int main() {
23333 struct tm *tp;
23334 ; return 0; }
23335 EOF
23336 if { (eval echo configure:23337: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23337   rm -rf conftest*
23338   ac_cv_header_time=yes
23339 else
23340   echo "configure: failed program was:" >&5
23341   cat conftest.$ac_ext >&5
23342   rm -rf conftest*
23343   ac_cv_header_time=no
23344 fi
23345 rm -f conftest*
23346 fi
23347
23348 echo "$ac_t""$ac_cv_header_time" 1>&6
23349 if test $ac_cv_header_time = yes; then
23350   cat >> confdefs.h <<\EOF
23351 #define TIME_WITH_SYS_TIME 1
23352 EOF
23353
23354 fi
23355
23356 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
23357 echo "configure:23358: checking whether struct tm is in sys/time.h or time.h" >&5
23358 if eval "test \"\${ac_cv_struct_tm+set}\" = set"; then
23359   echo $ac_n "(cached) $ac_c" 1>&6
23360 else
23361   cat > conftest.$ac_ext <<EOF
23362 #line 23363 "configure"
23363 #include "confdefs.h"
23364 #include <sys/types.h>
23365 #include <time.h>
23366 int main() {
23367 struct tm *tp; tp->tm_sec;
23368 ; return 0; }
23369 EOF
23370 if { (eval echo configure:23371: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23371   rm -rf conftest*
23372   ac_cv_struct_tm=time.h
23373 else
23374   echo "configure: failed program was:" >&5
23375   cat conftest.$ac_ext >&5
23376   rm -rf conftest*
23377   ac_cv_struct_tm=sys/time.h
23378 fi
23379 rm -f conftest*
23380 fi
23381
23382 echo "$ac_t""$ac_cv_struct_tm" 1>&6
23383 if test $ac_cv_struct_tm = sys/time.h; then
23384   cat >> confdefs.h <<\EOF
23385 #define TM_IN_SYS_TIME 1
23386 EOF
23387
23388 fi
23389
23390 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
23391 echo "configure:23392: checking for uid_t in sys/types.h" >&5
23392 if eval "test \"\${ac_cv_type_uid_t+set}\" = set"; then
23393   echo $ac_n "(cached) $ac_c" 1>&6
23394 else
23395   cat > conftest.$ac_ext <<EOF
23396 #line 23397 "configure"
23397 #include "confdefs.h"
23398 #include <sys/types.h>
23399 EOF
23400 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
23401   egrep "uid_t" >/dev/null 2>&1; then
23402   rm -rf conftest*
23403   ac_cv_type_uid_t=yes
23404 else
23405   rm -rf conftest*
23406   ac_cv_type_uid_t=no
23407 fi
23408 rm -f conftest*
23409
23410 fi
23411
23412 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
23413 if test $ac_cv_type_uid_t = no; then
23414   cat >> confdefs.h <<\EOF
23415 #define uid_t int
23416 EOF
23417
23418   cat >> confdefs.h <<\EOF
23419 #define gid_t int
23420 EOF
23421
23422 fi
23423
23424 echo $ac_n "checking for sig_atomic_t""... $ac_c" 1>&6
23425 echo "configure:23426: checking for sig_atomic_t" >&5
23426 if eval "test \"\${ol_cv_type_sig_atomic_t+set}\" = set"; then
23427   echo $ac_n "(cached) $ac_c" 1>&6
23428 else
23429   cat > conftest.$ac_ext <<EOF
23430 #line 23431 "configure"
23431 #include "confdefs.h"
23432 #include <signal.h>
23433 int main() {
23434 sig_atomic_t atomic;
23435 ; return 0; }
23436 EOF
23437 if { (eval echo configure:23438: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23438   rm -rf conftest*
23439   ol_cv_type_sig_atomic_t=yes
23440 else
23441   echo "configure: failed program was:" >&5
23442   cat conftest.$ac_ext >&5
23443   rm -rf conftest*
23444   ol_cv_type_sig_atomic_t=no
23445 fi
23446 rm -f conftest*
23447 fi
23448
23449 echo "$ac_t""$ol_cv_type_sig_atomic_t" 1>&6
23450   if test $ol_cv_type_sig_atomic_t = no; then
23451     cat >> confdefs.h <<\EOF
23452 #define sig_atomic_t int
23453 EOF
23454
23455   fi
23456  
23457
23458
23459 # test for pw_gecos in struct passwd
23460 echo $ac_n "checking struct passwd for pw_gecos""... $ac_c" 1>&6
23461 echo "configure:23462: checking struct passwd for pw_gecos" >&5
23462 if eval "test \"\${ol_cv_struct_passwd_pw_gecos+set}\" = set"; then
23463   echo $ac_n "(cached) $ac_c" 1>&6
23464 else
23465   
23466         cat > conftest.$ac_ext <<EOF
23467 #line 23468 "configure"
23468 #include "confdefs.h"
23469 #include <pwd.h>
23470 int main() {
23471
23472         struct passwd pwd;
23473         pwd.pw_gecos = pwd.pw_name;
23474
23475 ; return 0; }
23476 EOF
23477 if { (eval echo configure:23478: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23478   rm -rf conftest*
23479   ol_cv_struct_passwd_pw_gecos=yes
23480 else
23481   echo "configure: failed program was:" >&5
23482   cat conftest.$ac_ext >&5
23483   rm -rf conftest*
23484   ol_cv_struct_passwd_pw_gecos=no
23485 fi
23486 rm -f conftest*
23487 fi
23488
23489 echo "$ac_t""$ol_cv_struct_passwd_pw_gecos" 1>&6
23490 if test $ol_cv_struct_passwd_pw_gecos = yes ; then
23491         cat >> confdefs.h <<\EOF
23492 #define HAVE_PW_GECOS 1
23493 EOF
23494
23495 fi
23496
23497 # test for pw_passwd in struct passwd
23498 echo $ac_n "checking struct passwd for pw_passwd""... $ac_c" 1>&6
23499 echo "configure:23500: checking struct passwd for pw_passwd" >&5
23500 if eval "test \"\${ol_cv_struct_passwd_pw_passwd+set}\" = set"; then
23501   echo $ac_n "(cached) $ac_c" 1>&6
23502 else
23503   
23504         cat > conftest.$ac_ext <<EOF
23505 #line 23506 "configure"
23506 #include "confdefs.h"
23507 #include <pwd.h>
23508 int main() {
23509
23510         struct passwd pwd;
23511         pwd.pw_passwd = pwd.pw_name;
23512
23513 ; return 0; }
23514 EOF
23515 if { (eval echo configure:23516: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23516   rm -rf conftest*
23517   ol_cv_struct_passwd_pw_passwd=yes
23518 else
23519   echo "configure: failed program was:" >&5
23520   cat conftest.$ac_ext >&5
23521   rm -rf conftest*
23522   ol_cv_struct_passwd_pw_passwd=no
23523 fi
23524 rm -f conftest*
23525 fi
23526
23527 echo "$ac_t""$ol_cv_struct_passwd_pw_passwd" 1>&6
23528 if test $ol_cv_struct_passwd_pw_passwd = yes ; then
23529         cat >> confdefs.h <<\EOF
23530 #define HAVE_PW_PASSWD 1
23531 EOF
23532
23533 fi
23534
23535
23536 echo $ac_n "checking if toupper() requires islower()""... $ac_c" 1>&6
23537 echo "configure:23538: checking if toupper() requires islower()" >&5
23538 if eval "test \"\${ol_cv_c_upper_lower+set}\" = set"; then
23539   echo $ac_n "(cached) $ac_c" 1>&6
23540 else
23541   
23542         if test "$cross_compiling" = yes; then
23543   ol_cv_c_upper_lower=safe
23544 else
23545   cat > conftest.$ac_ext <<EOF
23546 #line 23547 "configure"
23547 #include "confdefs.h"
23548
23549 #include <ctype.h>
23550 main()
23551 {
23552         if ('C' == toupper('C'))
23553                 exit(0);
23554         else
23555                 exit(1);
23556 }
23557 EOF
23558 if { (eval echo configure:23559: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
23559 then
23560   ol_cv_c_upper_lower=no
23561 else
23562   echo "configure: failed program was:" >&5
23563   cat conftest.$ac_ext >&5
23564   rm -fr conftest*
23565   ol_cv_c_upper_lower=yes
23566 fi
23567 rm -fr conftest*
23568 fi
23569
23570 fi
23571
23572 echo "$ac_t""$ol_cv_c_upper_lower" 1>&6
23573 if test $ol_cv_c_upper_lower != no ; then
23574         cat >> confdefs.h <<\EOF
23575 #define C_UPPER_LOWER 1
23576 EOF
23577
23578 fi
23579
23580 echo $ac_n "checking for working const""... $ac_c" 1>&6
23581 echo "configure:23582: checking for working const" >&5
23582 if eval "test \"\${ac_cv_c_const+set}\" = set"; then
23583   echo $ac_n "(cached) $ac_c" 1>&6
23584 else
23585   cat > conftest.$ac_ext <<EOF
23586 #line 23587 "configure"
23587 #include "confdefs.h"
23588
23589 int main() {
23590
23591 /* Ultrix mips cc rejects this.  */
23592 typedef int charset[2]; const charset x;
23593 /* SunOS 4.1.1 cc rejects this.  */
23594 char const *const *ccp;
23595 char **p;
23596 /* NEC SVR4.0.2 mips cc rejects this.  */
23597 struct point {int x, y;};
23598 static struct point const zero = {0,0};
23599 /* AIX XL C 1.02.0.0 rejects this.
23600    It does not let you subtract one const X* pointer from another in an arm
23601    of an if-expression whose if-part is not a constant expression */
23602 const char *g = "string";
23603 ccp = &g + (g ? g-g : 0);
23604 /* HPUX 7.0 cc rejects these. */
23605 ++ccp;
23606 p = (char**) ccp;
23607 ccp = (char const *const *) p;
23608 { /* SCO 3.2v4 cc rejects this.  */
23609   char *t;
23610   char const *s = 0 ? (char *) 0 : (char const *) 0;
23611
23612   *t++ = 0;
23613 }
23614 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
23615   int x[] = {25, 17};
23616   const int *foo = &x[0];
23617   ++foo;
23618 }
23619 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
23620   typedef const int *iptr;
23621   iptr p = 0;
23622   ++p;
23623 }
23624 { /* AIX XL C 1.02.0.0 rejects this saying
23625      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
23626   struct s { int j; const int *ap[3]; };
23627   struct s *b; b->j = 5;
23628 }
23629 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
23630   const int foo = 10;
23631 }
23632
23633 ; return 0; }
23634 EOF
23635 if { (eval echo configure:23636: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23636   rm -rf conftest*
23637   ac_cv_c_const=yes
23638 else
23639   echo "configure: failed program was:" >&5
23640   cat conftest.$ac_ext >&5
23641   rm -rf conftest*
23642   ac_cv_c_const=no
23643 fi
23644 rm -f conftest*
23645 fi
23646
23647 echo "$ac_t""$ac_cv_c_const" 1>&6
23648 if test $ac_cv_c_const = no; then
23649   cat >> confdefs.h <<\EOF
23650 #define const 
23651 EOF
23652
23653 fi
23654
23655 echo $ac_n "checking if compiler understands volatile""... $ac_c" 1>&6
23656 echo "configure:23657: checking if compiler understands volatile" >&5
23657 if eval "test \"\${ol_cv_c_volatile+set}\" = set"; then
23658   echo $ac_n "(cached) $ac_c" 1>&6
23659 else
23660   cat > conftest.$ac_ext <<EOF
23661 #line 23662 "configure"
23662 #include "confdefs.h"
23663 int x, y, z;
23664 int main() {
23665 volatile int a; int * volatile b = x ? &y : &z;
23666       /* Older MIPS compilers (eg., in Ultrix 4.2) don't like *b = 0 */
23667       *b = 0;
23668 ; return 0; }
23669 EOF
23670 if { (eval echo configure:23671: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23671   rm -rf conftest*
23672   ol_cv_c_volatile=yes
23673 else
23674   echo "configure: failed program was:" >&5
23675   cat conftest.$ac_ext >&5
23676   rm -rf conftest*
23677   ol_cv_c_volatile=no
23678 fi
23679 rm -f conftest*
23680 fi
23681
23682 echo "$ac_t""$ol_cv_c_volatile" 1>&6
23683   if test $ol_cv_c_volatile = yes; then
23684     : 
23685   else
23686     cat >> confdefs.h <<\EOF
23687 #define volatile 
23688 EOF
23689
23690   fi
23691  
23692
23693 if test $cross_compiling = yes ; then
23694         echo "configure: warning: Crossing compiling... all bets are off!" 1>&2
23695         cat >> confdefs.h <<\EOF
23696 #define CROSS_COMPILING 1
23697 EOF
23698
23699 else
23700         echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
23701 echo "configure:23702: checking whether byte ordering is bigendian" >&5
23702 if eval "test \"\${ac_cv_c_bigendian+set}\" = set"; then
23703   echo $ac_n "(cached) $ac_c" 1>&6
23704 else
23705   ac_cv_c_bigendian=unknown
23706 # See if sys/param.h defines the BYTE_ORDER macro.
23707 cat > conftest.$ac_ext <<EOF
23708 #line 23709 "configure"
23709 #include "confdefs.h"
23710 #include <sys/types.h>
23711 #include <sys/param.h>
23712 int main() {
23713
23714 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
23715  bogus endian macros
23716 #endif
23717 ; return 0; }
23718 EOF
23719 if { (eval echo configure:23720: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23720   rm -rf conftest*
23721   # It does; now see whether it defined to BIG_ENDIAN or not.
23722 cat > conftest.$ac_ext <<EOF
23723 #line 23724 "configure"
23724 #include "confdefs.h"
23725 #include <sys/types.h>
23726 #include <sys/param.h>
23727 int main() {
23728
23729 #if BYTE_ORDER != BIG_ENDIAN
23730  not big endian
23731 #endif
23732 ; return 0; }
23733 EOF
23734 if { (eval echo configure:23735: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23735   rm -rf conftest*
23736   ac_cv_c_bigendian=yes
23737 else
23738   echo "configure: failed program was:" >&5
23739   cat conftest.$ac_ext >&5
23740   rm -rf conftest*
23741   ac_cv_c_bigendian=no
23742 fi
23743 rm -f conftest*
23744 else
23745   echo "configure: failed program was:" >&5
23746   cat conftest.$ac_ext >&5
23747 fi
23748 rm -f conftest*
23749 if test $ac_cv_c_bigendian = unknown; then
23750 if test "$cross_compiling" = yes; then
23751     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
23752 else
23753   cat > conftest.$ac_ext <<EOF
23754 #line 23755 "configure"
23755 #include "confdefs.h"
23756 main () {
23757   /* Are we little or big endian?  From Harbison&Steele.  */
23758   union
23759   {
23760     long l;
23761     char c[sizeof (long)];
23762   } u;
23763   u.l = 1;
23764   exit (u.c[sizeof (long) - 1] == 1);
23765 }
23766 EOF
23767 if { (eval echo configure:23768: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
23768 then
23769   ac_cv_c_bigendian=no
23770 else
23771   echo "configure: failed program was:" >&5
23772   cat conftest.$ac_ext >&5
23773   rm -fr conftest*
23774   ac_cv_c_bigendian=yes
23775 fi
23776 rm -fr conftest*
23777 fi
23778
23779 fi
23780 fi
23781
23782 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
23783 if test $ac_cv_c_bigendian = yes; then
23784   cat >> confdefs.h <<\EOF
23785 #define WORDS_BIGENDIAN 1
23786 EOF
23787
23788 fi
23789
23790 fi
23791
23792 echo $ac_n "checking size of short""... $ac_c" 1>&6
23793 echo "configure:23794: checking size of short" >&5 
23794 if eval "test \"\${ac_cv_sizeof_short+set}\" = set"; then
23795   echo $ac_n "(cached) $ac_c" 1>&6
23796 else
23797   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
23798   cat > conftest.$ac_ext <<EOF
23799 #line 23800 "configure"
23800 #include "confdefs.h"
23801 #include "confdefs.h" 
23802 #include <stdlib.h>
23803 #include <sys/types.h> 
23804  
23805
23806 int main() {
23807 switch (0) case 0: case (sizeof (short) == $ac_size):;
23808 ; return 0; }
23809 EOF
23810 if { (eval echo configure:23811: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23811   rm -rf conftest*
23812   ac_cv_sizeof_short=$ac_size
23813 else
23814   echo "configure: failed program was:" >&5
23815   cat conftest.$ac_ext >&5
23816 fi
23817 rm -f conftest* 
23818   if test x$ac_cv_sizeof_short != x ; then break; fi 
23819 done 
23820
23821 fi
23822  
23823 if test x$ac_cv_sizeof_short = x ; then 
23824   { echo "configure: error: cannot determine a size for short" 1>&2; exit 1; } 
23825 fi 
23826 echo "$ac_t""$ac_cv_sizeof_short" 1>&6 
23827 cat >> confdefs.h <<EOF
23828 #define SIZEOF_SHORT $ac_cv_sizeof_short
23829 EOF
23830  
23831  
23832 echo $ac_n "checking size of int""... $ac_c" 1>&6
23833 echo "configure:23834: checking size of int" >&5 
23834 if eval "test \"\${ac_cv_sizeof_int+set}\" = set"; then
23835   echo $ac_n "(cached) $ac_c" 1>&6
23836 else
23837   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
23838   cat > conftest.$ac_ext <<EOF
23839 #line 23840 "configure"
23840 #include "confdefs.h"
23841 #include "confdefs.h" 
23842 #include <stdlib.h>
23843 #include <sys/types.h> 
23844  
23845
23846 int main() {
23847 switch (0) case 0: case (sizeof (int) == $ac_size):;
23848 ; return 0; }
23849 EOF
23850 if { (eval echo configure:23851: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23851   rm -rf conftest*
23852   ac_cv_sizeof_int=$ac_size
23853 else
23854   echo "configure: failed program was:" >&5
23855   cat conftest.$ac_ext >&5
23856 fi
23857 rm -f conftest* 
23858   if test x$ac_cv_sizeof_int != x ; then break; fi 
23859 done 
23860
23861 fi
23862  
23863 if test x$ac_cv_sizeof_int = x ; then 
23864   { echo "configure: error: cannot determine a size for int" 1>&2; exit 1; } 
23865 fi 
23866 echo "$ac_t""$ac_cv_sizeof_int" 1>&6 
23867 cat >> confdefs.h <<EOF
23868 #define SIZEOF_INT $ac_cv_sizeof_int
23869 EOF
23870  
23871  
23872 echo $ac_n "checking size of long""... $ac_c" 1>&6
23873 echo "configure:23874: checking size of long" >&5 
23874 if eval "test \"\${ac_cv_sizeof_long+set}\" = set"; then
23875   echo $ac_n "(cached) $ac_c" 1>&6
23876 else
23877   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
23878   cat > conftest.$ac_ext <<EOF
23879 #line 23880 "configure"
23880 #include "confdefs.h"
23881 #include "confdefs.h" 
23882 #include <stdlib.h>
23883 #include <sys/types.h> 
23884  
23885
23886 int main() {
23887 switch (0) case 0: case (sizeof (long) == $ac_size):;
23888 ; return 0; }
23889 EOF
23890 if { (eval echo configure:23891: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23891   rm -rf conftest*
23892   ac_cv_sizeof_long=$ac_size
23893 else
23894   echo "configure: failed program was:" >&5
23895   cat conftest.$ac_ext >&5
23896 fi
23897 rm -f conftest* 
23898   if test x$ac_cv_sizeof_long != x ; then break; fi 
23899 done 
23900
23901 fi
23902  
23903 if test x$ac_cv_sizeof_long = x ; then 
23904   { echo "configure: error: cannot determine a size for long" 1>&2; exit 1; } 
23905 fi 
23906 echo "$ac_t""$ac_cv_sizeof_long" 1>&6 
23907 cat >> confdefs.h <<EOF
23908 #define SIZEOF_LONG $ac_cv_sizeof_long
23909 EOF
23910  
23911
23912 echo $ac_n "checking size of wchar_t""... $ac_c" 1>&6
23913 echo "configure:23914: checking size of wchar_t" >&5 
23914 if eval "test \"\${ac_cv_sizeof_wchar_t+set}\" = set"; then
23915   echo $ac_n "(cached) $ac_c" 1>&6
23916 else
23917   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
23918   cat > conftest.$ac_ext <<EOF
23919 #line 23920 "configure"
23920 #include "confdefs.h"
23921 #include "confdefs.h" 
23922 #include <stdlib.h>
23923 #include <sys/types.h> 
23924  
23925
23926 int main() {
23927 switch (0) case 0: case (sizeof (wchar_t) == $ac_size):;
23928 ; return 0; }
23929 EOF
23930 if { (eval echo configure:23931: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23931   rm -rf conftest*
23932   ac_cv_sizeof_wchar_t=$ac_size
23933 else
23934   echo "configure: failed program was:" >&5
23935   cat conftest.$ac_ext >&5
23936 fi
23937 rm -f conftest* 
23938   if test x$ac_cv_sizeof_wchar_t != x ; then break; fi 
23939 done 
23940
23941 fi
23942  
23943 if test x$ac_cv_sizeof_wchar_t = x ; then 
23944   { echo "configure: error: cannot determine a size for wchar_t" 1>&2; exit 1; } 
23945 fi 
23946 echo "$ac_t""$ac_cv_sizeof_wchar_t" 1>&6 
23947 cat >> confdefs.h <<EOF
23948 #define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
23949 EOF
23950  
23951
23952
23953 if test "$ac_cv_sizeof_int" -lt 4 ; then
23954         echo "configure: warning: OpenLDAP requires 'int' to be 32 bits or greater." 1>&2
23955
23956         cat >> confdefs.h <<\EOF
23957 #define LBER_INT_T long
23958 EOF
23959
23960 else
23961         cat >> confdefs.h <<\EOF
23962 #define LBER_INT_T int
23963 EOF
23964
23965 fi
23966
23967 cat >> confdefs.h <<\EOF
23968 #define LBER_LEN_T long
23969 EOF
23970
23971 cat >> confdefs.h <<\EOF
23972 #define LBER_SOCKET_T int
23973 EOF
23974
23975 cat >> confdefs.h <<\EOF
23976 #define LBER_TAG_T long
23977 EOF
23978
23979
23980 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
23981 echo "configure:23982: checking for 8-bit clean memcmp" >&5
23982 if eval "test \"\${ac_cv_func_memcmp_clean+set}\" = set"; then
23983   echo $ac_n "(cached) $ac_c" 1>&6
23984 else
23985   if test "$cross_compiling" = yes; then
23986   ac_cv_func_memcmp_clean=no
23987 else
23988   cat > conftest.$ac_ext <<EOF
23989 #line 23990 "configure"
23990 #include "confdefs.h"
23991
23992 main()
23993 {
23994   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
23995   exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
23996 }
23997
23998 EOF
23999 if { (eval echo configure:24000: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
24000 then
24001   ac_cv_func_memcmp_clean=yes
24002 else
24003   echo "configure: failed program was:" >&5
24004   cat conftest.$ac_ext >&5
24005   rm -fr conftest*
24006   ac_cv_func_memcmp_clean=no
24007 fi
24008 rm -fr conftest*
24009 fi
24010
24011 fi
24012
24013 echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
24014 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
24015
24016
24017 if test $ac_cv_func_memcmp_clean = no ; then
24018         cat >> confdefs.h <<\EOF
24019 #define NEED_MEMCMP_REPLACEMENT 1
24020 EOF
24021
24022 fi
24023
24024 echo $ac_n "checking for strftime""... $ac_c" 1>&6
24025 echo "configure:24026: checking for strftime" >&5
24026 if eval "test \"\${ac_cv_func_strftime+set}\" = set"; then
24027   echo $ac_n "(cached) $ac_c" 1>&6
24028 else
24029   cat > conftest.$ac_ext <<EOF
24030 #line 24031 "configure"
24031 #include "confdefs.h"
24032 /* System header to define __stub macros and hopefully few prototypes,
24033     which can conflict with char strftime(); below.  */
24034 #include <assert.h>
24035 /* Override any gcc2 internal prototype to avoid an error.  */
24036 /* We use char because int might match the return type of a gcc2
24037     builtin and then its argument prototype would still apply.  */
24038 char strftime();
24039 char (*f)();
24040
24041 int main() {
24042
24043 /* The GNU C library defines this for functions which it implements
24044     to always fail with ENOSYS.  Some functions are actually named
24045     something starting with __ and the normal name is an alias.  */
24046 #if defined (__stub_strftime) || defined (__stub___strftime)
24047 choke me
24048 #else
24049 f = strftime;
24050 #endif
24051
24052 ; return 0; }
24053 EOF
24054 if { (eval echo configure:24055: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
24055   rm -rf conftest*
24056   eval "ac_cv_func_strftime=yes"
24057 else
24058   echo "configure: failed program was:" >&5
24059   cat conftest.$ac_ext >&5
24060   rm -rf conftest*
24061   eval "ac_cv_func_strftime=no"
24062 fi
24063 rm -f conftest*
24064 fi
24065
24066 if eval "test \"`echo '$ac_cv_func_'strftime`\" = yes"; then
24067   echo "$ac_t""yes" 1>&6
24068   cat >> confdefs.h <<\EOF
24069 #define HAVE_STRFTIME 1
24070 EOF
24071
24072 else
24073   echo "$ac_t""no" 1>&6
24074 # strftime is in -lintl on SCO UNIX.
24075 echo $ac_n "checking for strftime in -lintl""... $ac_c" 1>&6
24076 echo "configure:24077: checking for strftime in -lintl" >&5
24077 ac_lib_var=`echo intl'_'strftime | sed 'y%./+-:%__p__%'`
24078 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
24079   echo $ac_n "(cached) $ac_c" 1>&6
24080 else
24081   ac_save_LIBS="$LIBS"
24082 LIBS="-lintl  $LIBS"
24083 cat > conftest.$ac_ext <<EOF
24084 #line 24085 "configure"
24085 #include "confdefs.h"
24086 /* Override any gcc2 internal prototype to avoid an error.  */
24087 /* We use char because int might match the return type of a gcc2
24088     builtin and then its argument prototype would still apply.  */
24089 char strftime();
24090
24091 int main() {
24092 strftime()
24093 ; return 0; }
24094 EOF
24095 if { (eval echo configure:24096: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
24096   rm -rf conftest*
24097   eval "ac_cv_lib_$ac_lib_var=yes"
24098 else
24099   echo "configure: failed program was:" >&5
24100   cat conftest.$ac_ext >&5
24101   rm -rf conftest*
24102   eval "ac_cv_lib_$ac_lib_var=no"
24103 fi
24104 rm -f conftest*
24105 LIBS="$ac_save_LIBS"
24106
24107 fi
24108 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
24109   echo "$ac_t""yes" 1>&6
24110   cat >> confdefs.h <<\EOF
24111 #define HAVE_STRFTIME 1
24112 EOF
24113
24114 LIBS="-lintl $LIBS"
24115 else
24116   echo "$ac_t""no" 1>&6
24117 fi
24118
24119 fi
24120
24121
24122 echo $ac_n "checking for inet_aton()""... $ac_c" 1>&6
24123 echo "configure:24124: checking for inet_aton()" >&5
24124 if eval "test \"\${ol_cv_func_inet_aton+set}\" = set"; then
24125   echo $ac_n "(cached) $ac_c" 1>&6
24126 else
24127   cat > conftest.$ac_ext <<EOF
24128 #line 24129 "configure"
24129 #include "confdefs.h"
24130
24131 #ifdef HAVE_SYS_TYPES_H
24132 #       include <sys/types.h>
24133 #endif
24134 #ifdef HAVE_SYS_SOCKET_H
24135 #       include <sys/socket.h>
24136 #       ifdef HAVE_SYS_SELECT_H
24137 #               include <sys/select.h>
24138 #       endif
24139 #       include <netinet/in.h>
24140 #       ifdef HAVE_ARPA_INET_H
24141 #               include <arpa/inet.h>
24142 #       endif
24143 #endif
24144
24145 int main() {
24146 struct in_addr in;
24147 int rc = inet_aton( "255.255.255.255", &in );
24148 ; return 0; }
24149 EOF
24150 if { (eval echo configure:24151: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
24151   rm -rf conftest*
24152   ol_cv_func_inet_aton=yes
24153 else
24154   echo "configure: failed program was:" >&5
24155   cat conftest.$ac_ext >&5
24156   rm -rf conftest*
24157   ol_cv_func_inet_aton=no
24158 fi
24159 rm -f conftest*
24160 fi
24161
24162 echo "$ac_t""$ol_cv_func_inet_aton" 1>&6
24163   if test $ol_cv_func_inet_aton != no; then
24164     cat >> confdefs.h <<\EOF
24165 #define HAVE_INET_ATON 1
24166 EOF
24167
24168   fi
24169  
24170
24171 echo $ac_n "checking for _spawnlp""... $ac_c" 1>&6
24172 echo "configure:24173: checking for _spawnlp" >&5
24173 if eval "test \"\${ac_cv_func__spawnlp+set}\" = set"; then
24174   echo $ac_n "(cached) $ac_c" 1>&6
24175 else
24176   cat > conftest.$ac_ext <<EOF
24177 #line 24178 "configure"
24178 #include "confdefs.h"
24179 /* System header to define __stub macros and hopefully few prototypes,
24180     which can conflict with char _spawnlp(); below.  */
24181 #include <assert.h>
24182 /* Override any gcc2 internal prototype to avoid an error.  */
24183 /* We use char because int might match the return type of a gcc2
24184     builtin and then its argument prototype would still apply.  */
24185 char _spawnlp();
24186 char (*f)();
24187
24188 int main() {
24189
24190 /* The GNU C library defines this for functions which it implements
24191     to always fail with ENOSYS.  Some functions are actually named
24192     something starting with __ and the normal name is an alias.  */
24193 #if defined (__stub__spawnlp) || defined (__stub____spawnlp)
24194 choke me
24195 #else
24196 f = _spawnlp;
24197 #endif
24198
24199 ; return 0; }
24200 EOF
24201 if { (eval echo configure:24202: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
24202   rm -rf conftest*
24203   eval "ac_cv_func__spawnlp=yes"
24204 else
24205   echo "configure: failed program was:" >&5
24206   cat conftest.$ac_ext >&5
24207   rm -rf conftest*
24208   eval "ac_cv_func__spawnlp=no"
24209 fi
24210 rm -f conftest*
24211 fi
24212
24213 if eval "test \"`echo '$ac_cv_func_'_spawnlp`\" = yes"; then
24214   echo "$ac_t""yes" 1>&6
24215   cat >> confdefs.h <<\EOF
24216 #define HAVE_SPAWNLP 1
24217 EOF
24218
24219 else
24220   echo "$ac_t""no" 1>&6
24221 fi
24222
24223
24224 echo $ac_n "checking for _snprintf""... $ac_c" 1>&6
24225 echo "configure:24226: checking for _snprintf" >&5
24226 if eval "test \"\${ac_cv_func__snprintf+set}\" = set"; then
24227   echo $ac_n "(cached) $ac_c" 1>&6
24228 else
24229   cat > conftest.$ac_ext <<EOF
24230 #line 24231 "configure"
24231 #include "confdefs.h"
24232 /* System header to define __stub macros and hopefully few prototypes,
24233     which can conflict with char _snprintf(); below.  */
24234 #include <assert.h>
24235 /* Override any gcc2 internal prototype to avoid an error.  */
24236 /* We use char because int might match the return type of a gcc2
24237     builtin and then its argument prototype would still apply.  */
24238 char _snprintf();
24239 char (*f)();
24240
24241 int main() {
24242
24243 /* The GNU C library defines this for functions which it implements
24244     to always fail with ENOSYS.  Some functions are actually named
24245     something starting with __ and the normal name is an alias.  */
24246 #if defined (__stub__snprintf) || defined (__stub____snprintf)
24247 choke me
24248 #else
24249 f = _snprintf;
24250 #endif
24251
24252 ; return 0; }
24253 EOF
24254 if { (eval echo configure:24255: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
24255   rm -rf conftest*
24256   eval "ac_cv_func__snprintf=yes"
24257 else
24258   echo "configure: failed program was:" >&5
24259   cat conftest.$ac_ext >&5
24260   rm -rf conftest*
24261   eval "ac_cv_func__snprintf=no"
24262 fi
24263 rm -f conftest*
24264 fi
24265
24266 if eval "test \"`echo '$ac_cv_func_'_snprintf`\" = yes"; then
24267   echo "$ac_t""yes" 1>&6
24268   ac_cv_func_snprintf=yes
24269         cat >> confdefs.h <<\EOF
24270 #define snprintf _snprintf
24271 EOF
24272
24273
24274 else
24275   echo "$ac_t""no" 1>&6
24276 fi
24277
24278
24279 echo $ac_n "checking for _vsnprintf""... $ac_c" 1>&6
24280 echo "configure:24281: checking for _vsnprintf" >&5
24281 if eval "test \"\${ac_cv_func__vsnprintf+set}\" = set"; then
24282   echo $ac_n "(cached) $ac_c" 1>&6
24283 else
24284   cat > conftest.$ac_ext <<EOF
24285 #line 24286 "configure"
24286 #include "confdefs.h"
24287 /* System header to define __stub macros and hopefully few prototypes,
24288     which can conflict with char _vsnprintf(); below.  */
24289 #include <assert.h>
24290 /* Override any gcc2 internal prototype to avoid an error.  */
24291 /* We use char because int might match the return type of a gcc2
24292     builtin and then its argument prototype would still apply.  */
24293 char _vsnprintf();
24294 char (*f)();
24295
24296 int main() {
24297
24298 /* The GNU C library defines this for functions which it implements
24299     to always fail with ENOSYS.  Some functions are actually named
24300     something starting with __ and the normal name is an alias.  */
24301 #if defined (__stub__vsnprintf) || defined (__stub____vsnprintf)
24302 choke me
24303 #else
24304 f = _vsnprintf;
24305 #endif
24306
24307 ; return 0; }
24308 EOF
24309 if { (eval echo configure:24310: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
24310   rm -rf conftest*
24311   eval "ac_cv_func__vsnprintf=yes"
24312 else
24313   echo "configure: failed program was:" >&5
24314   cat conftest.$ac_ext >&5
24315   rm -rf conftest*
24316   eval "ac_cv_func__vsnprintf=no"
24317 fi
24318 rm -f conftest*
24319 fi
24320
24321 if eval "test \"`echo '$ac_cv_func_'_vsnprintf`\" = yes"; then
24322   echo "$ac_t""yes" 1>&6
24323   ac_cv_func_vsnprintf=yes
24324         cat >> confdefs.h <<\EOF
24325 #define vsnprintf _vsnprintf
24326 EOF
24327
24328
24329 else
24330   echo "$ac_t""no" 1>&6
24331 fi
24332
24333
24334 echo $ac_n "checking for vprintf""... $ac_c" 1>&6
24335 echo "configure:24336: checking for vprintf" >&5
24336 if eval "test \"\${ac_cv_func_vprintf+set}\" = set"; then
24337   echo $ac_n "(cached) $ac_c" 1>&6
24338 else
24339   cat > conftest.$ac_ext <<EOF
24340 #line 24341 "configure"
24341 #include "confdefs.h"
24342 /* System header to define __stub macros and hopefully few prototypes,
24343     which can conflict with char vprintf(); below.  */
24344 #include <assert.h>
24345 /* Override any gcc2 internal prototype to avoid an error.  */
24346 /* We use char because int might match the return type of a gcc2
24347     builtin and then its argument prototype would still apply.  */
24348 char vprintf();
24349 char (*f)();
24350
24351 int main() {
24352
24353 /* The GNU C library defines this for functions which it implements
24354     to always fail with ENOSYS.  Some functions are actually named
24355     something starting with __ and the normal name is an alias.  */
24356 #if defined (__stub_vprintf) || defined (__stub___vprintf)
24357 choke me
24358 #else
24359 f = vprintf;
24360 #endif
24361
24362 ; return 0; }
24363 EOF
24364 if { (eval echo configure:24365: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
24365   rm -rf conftest*
24366   eval "ac_cv_func_vprintf=yes"
24367 else
24368   echo "configure: failed program was:" >&5
24369   cat conftest.$ac_ext >&5
24370   rm -rf conftest*
24371   eval "ac_cv_func_vprintf=no"
24372 fi
24373 rm -f conftest*
24374 fi
24375
24376 if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
24377   echo "$ac_t""yes" 1>&6
24378   cat >> confdefs.h <<\EOF
24379 #define HAVE_VPRINTF 1
24380 EOF
24381
24382 else
24383   echo "$ac_t""no" 1>&6
24384 fi
24385
24386 if test "$ac_cv_func_vprintf" != yes; then
24387 echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
24388 echo "configure:24389: checking for _doprnt" >&5
24389 if eval "test \"\${ac_cv_func__doprnt+set}\" = set"; then
24390   echo $ac_n "(cached) $ac_c" 1>&6
24391 else
24392   cat > conftest.$ac_ext <<EOF
24393 #line 24394 "configure"
24394 #include "confdefs.h"
24395 /* System header to define __stub macros and hopefully few prototypes,
24396     which can conflict with char _doprnt(); below.  */
24397 #include <assert.h>
24398 /* Override any gcc2 internal prototype to avoid an error.  */
24399 /* We use char because int might match the return type of a gcc2
24400     builtin and then its argument prototype would still apply.  */
24401 char _doprnt();
24402 char (*f)();
24403
24404 int main() {
24405
24406 /* The GNU C library defines this for functions which it implements
24407     to always fail with ENOSYS.  Some functions are actually named
24408     something starting with __ and the normal name is an alias.  */
24409 #if defined (__stub__doprnt) || defined (__stub____doprnt)
24410 choke me
24411 #else
24412 f = _doprnt;
24413 #endif
24414
24415 ; return 0; }
24416 EOF
24417 if { (eval echo configure:24418: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
24418   rm -rf conftest*
24419   eval "ac_cv_func__doprnt=yes"
24420 else
24421   echo "configure: failed program was:" >&5
24422   cat conftest.$ac_ext >&5
24423   rm -rf conftest*
24424   eval "ac_cv_func__doprnt=no"
24425 fi
24426 rm -f conftest*
24427 fi
24428
24429 if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
24430   echo "$ac_t""yes" 1>&6
24431   cat >> confdefs.h <<\EOF
24432 #define HAVE_DOPRNT 1
24433 EOF
24434
24435 else
24436   echo "$ac_t""no" 1>&6
24437 fi
24438
24439 fi
24440
24441
24442 if test $ac_cv_func_vprintf = yes ; then
24443                 for ac_func in snprintf vsnprintf
24444 do
24445 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
24446 echo "configure:24447: checking for $ac_func" >&5
24447 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
24448   echo $ac_n "(cached) $ac_c" 1>&6
24449 else
24450   cat > conftest.$ac_ext <<EOF
24451 #line 24452 "configure"
24452 #include "confdefs.h"
24453 /* System header to define __stub macros and hopefully few prototypes,
24454     which can conflict with char $ac_func(); below.  */
24455 #include <assert.h>
24456 /* Override any gcc2 internal prototype to avoid an error.  */
24457 /* We use char because int might match the return type of a gcc2
24458     builtin and then its argument prototype would still apply.  */
24459 char $ac_func();
24460 char (*f)();
24461
24462 int main() {
24463
24464 /* The GNU C library defines this for functions which it implements
24465     to always fail with ENOSYS.  Some functions are actually named
24466     something starting with __ and the normal name is an alias.  */
24467 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
24468 choke me
24469 #else
24470 f = $ac_func;
24471 #endif
24472
24473 ; return 0; }
24474 EOF
24475 if { (eval echo configure:24476: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
24476   rm -rf conftest*
24477   eval "ac_cv_func_$ac_func=yes"
24478 else
24479   echo "configure: failed program was:" >&5
24480   cat conftest.$ac_ext >&5
24481   rm -rf conftest*
24482   eval "ac_cv_func_$ac_func=no"
24483 fi
24484 rm -f conftest*
24485 fi
24486
24487 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
24488   echo "$ac_t""yes" 1>&6
24489     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
24490   cat >> confdefs.h <<EOF
24491 #define $ac_tr_func 1
24492 EOF
24493  
24494 else
24495   echo "$ac_t""no" 1>&6
24496 fi
24497 done
24498
24499 fi
24500
24501 for ac_func in \
24502         bcopy                   \
24503         closesocket             \
24504         chroot                  \
24505         endgrent                \
24506         endpwent                \
24507         fcntl                   \
24508         flock                   \
24509         fstat                   \
24510         getdtablesize   \
24511         getgrgid                \
24512         gethostname             \
24513         getpass                 \
24514         getpassphrase   \
24515         getpwuid                \
24516         getpwnam                \
24517         getspnam                \
24518         gettimeofday    \
24519         initgroups              \
24520         lockf                   \
24521         memcpy                  \
24522         memmove                 \
24523         mkstemp                 \
24524         mktemp                  \
24525         pipe                    \
24526         read                    \
24527         recv                    \
24528         recvfrom                \
24529         setpwfile               \
24530         setgid                  \
24531         setegid                 \
24532         setsid                  \
24533         setuid                  \
24534         seteuid                 \
24535         signal                  \
24536         strdup                  \
24537         strpbrk                 \
24538         strrchr                 \
24539         strsep                  \
24540         strstr                  \
24541         strtol                  \
24542         strtoul                 \
24543         strtoq                  \
24544         strtouq                 \
24545         strtoll                 \
24546         strspn                  \
24547         sysconf                 \
24548         usleep                  \
24549         waitpid                 \
24550         wait4                   \
24551         write                   \
24552         send                    \
24553         sendmsg                 \
24554         sendto                  \
24555
24556 do
24557 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
24558 echo "configure:24559: checking for $ac_func" >&5
24559 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
24560   echo $ac_n "(cached) $ac_c" 1>&6
24561 else
24562   cat > conftest.$ac_ext <<EOF
24563 #line 24564 "configure"
24564 #include "confdefs.h"
24565 /* System header to define __stub macros and hopefully few prototypes,
24566     which can conflict with char $ac_func(); below.  */
24567 #include <assert.h>
24568 /* Override any gcc2 internal prototype to avoid an error.  */
24569 /* We use char because int might match the return type of a gcc2
24570     builtin and then its argument prototype would still apply.  */
24571 char $ac_func();
24572 char (*f)();
24573
24574 int main() {
24575
24576 /* The GNU C library defines this for functions which it implements
24577     to always fail with ENOSYS.  Some functions are actually named
24578     something starting with __ and the normal name is an alias.  */
24579 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
24580 choke me
24581 #else
24582 f = $ac_func;
24583 #endif
24584
24585 ; return 0; }
24586 EOF
24587 if { (eval echo configure:24588: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
24588   rm -rf conftest*
24589   eval "ac_cv_func_$ac_func=yes"
24590 else
24591   echo "configure: failed program was:" >&5
24592   cat conftest.$ac_ext >&5
24593   rm -rf conftest*
24594   eval "ac_cv_func_$ac_func=no"
24595 fi
24596 rm -f conftest*
24597 fi
24598
24599 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
24600   echo "$ac_t""yes" 1>&6
24601     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
24602   cat >> confdefs.h <<EOF
24603 #define $ac_tr_func 1
24604 EOF
24605  
24606 else
24607   echo "$ac_t""no" 1>&6
24608 fi
24609 done
24610
24611
24612 for ac_func in getopt getpeereid
24613 do
24614 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
24615 echo "configure:24616: checking for $ac_func" >&5
24616 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
24617   echo $ac_n "(cached) $ac_c" 1>&6
24618 else
24619   cat > conftest.$ac_ext <<EOF
24620 #line 24621 "configure"
24621 #include "confdefs.h"
24622 /* System header to define __stub macros and hopefully few prototypes,
24623     which can conflict with char $ac_func(); below.  */
24624 #include <assert.h>
24625 /* Override any gcc2 internal prototype to avoid an error.  */
24626 /* We use char because int might match the return type of a gcc2
24627     builtin and then its argument prototype would still apply.  */
24628 char $ac_func();
24629 char (*f)();
24630
24631 int main() {
24632
24633 /* The GNU C library defines this for functions which it implements
24634     to always fail with ENOSYS.  Some functions are actually named
24635     something starting with __ and the normal name is an alias.  */
24636 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
24637 choke me
24638 #else
24639 f = $ac_func;
24640 #endif
24641
24642 ; return 0; }
24643 EOF
24644 if { (eval echo configure:24645: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
24645   rm -rf conftest*
24646   eval "ac_cv_func_$ac_func=yes"
24647 else
24648   echo "configure: failed program was:" >&5
24649   cat conftest.$ac_ext >&5
24650   rm -rf conftest*
24651   eval "ac_cv_func_$ac_func=no"
24652 fi
24653 rm -f conftest*
24654 fi
24655
24656 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
24657   echo "$ac_t""yes" 1>&6
24658     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
24659   cat >> confdefs.h <<EOF
24660 #define $ac_tr_func 1
24661 EOF
24662  
24663 else
24664   echo "$ac_t""no" 1>&6
24665 LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
24666 fi
24667 done
24668
24669
24670
24671 if test "$ac_cv_func_getopt" != yes; then
24672         LIBSRCS="$LIBSRCS getopt.c"
24673 fi
24674 if test "$ac_cv_func_getpeereid" != yes; then
24675         echo $ac_n "checking for msg_accrights in msghdr""... $ac_c" 1>&6
24676 echo "configure:24677: checking for msg_accrights in msghdr" >&5
24677 if eval "test \"\${ol_cv_msghdr_msg_accrights+set}\" = set"; then
24678   echo $ac_n "(cached) $ac_c" 1>&6
24679 else
24680   cat > conftest.$ac_ext <<EOF
24681 #line 24682 "configure"
24682 #include "confdefs.h"
24683 #include <sys/socket.h>
24684 int main() {
24685 struct msghdr m; m.msg_accrightslen=0
24686 ; return 0; }
24687 EOF
24688 if { (eval echo configure:24689: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
24689   rm -rf conftest*
24690   ol_cv_msghdr_msg_accrights=yes
24691 else
24692   echo "configure: failed program was:" >&5
24693   cat conftest.$ac_ext >&5
24694   rm -rf conftest*
24695   ol_cv_msghdr_msg_accrights=no
24696 fi
24697 rm -f conftest*
24698         
24699 fi
24700
24701 echo "$ac_t""$ol_cv_msghdr_msg_accrights" 1>&6
24702   if test $ol_cv_msghdr_msg_accrights = "yes" ; then
24703         cat >> confdefs.h <<\EOF
24704 #define HAVE_MSGHDR_MSG_ACCRIGHTS 1
24705 EOF
24706
24707   fi
24708
24709         if test "$ac_cv_func_getpeereid" != yes; then
24710                 echo $ac_n "checking for msg_control in msghdr""... $ac_c" 1>&6
24711 echo "configure:24712: checking for msg_control in msghdr" >&5
24712 if eval "test \"\${ol_cv_msghdr_msg_control+set}\" = set"; then
24713   echo $ac_n "(cached) $ac_c" 1>&6
24714 else
24715   cat > conftest.$ac_ext <<EOF
24716 #line 24717 "configure"
24717 #include "confdefs.h"
24718 #include <sys/socket.h>
24719 int main() {
24720 struct msghdr m; m.msg_control=(struct cmsghdr *)0
24721 ; return 0; }
24722 EOF
24723 if { (eval echo configure:24724: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
24724   rm -rf conftest*
24725   ol_cv_msghdr_msg_control=yes
24726 else
24727   echo "configure: failed program was:" >&5
24728   cat conftest.$ac_ext >&5
24729   rm -rf conftest*
24730   ol_cv_msghdr_msg_control=no
24731 fi
24732 rm -f conftest*
24733         
24734 fi
24735
24736 echo "$ac_t""$ol_cv_msghdr_msg_control" 1>&6
24737   if test $ol_cv_msghdr_msg_control = "yes" ; then
24738         cat >> confdefs.h <<\EOF
24739 #define HAVE_MSGHDR_MSG_CONTROL 1
24740 EOF
24741
24742   fi
24743
24744         fi
24745         LIBSRCS="$LIBSRCS getpeereid.c"
24746 fi
24747 if test "$ac_cv_func_snprintf" != yes -o "$ac_cv_func_vsnprintf" != yes; then
24748         if test "$ac_cv_func_snprintf" != yes; then
24749                 cat >> confdefs.h <<\EOF
24750 #define snprintf ber_pvt_snprintf
24751 EOF
24752
24753         fi
24754         if test "$ac_cv_func_vsnprintf" != yes; then
24755                 cat >> confdefs.h <<\EOF
24756 #define vsnprintf ber_pvt_vsnprintf
24757 EOF
24758
24759         fi
24760 fi
24761
24762
24763 if test "$ol_enable_slapi" != no ; then
24764                         for ac_hdr in ltdl.h
24765 do
24766 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
24767 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
24768 echo "configure:24769: checking for $ac_hdr" >&5
24769 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
24770   echo $ac_n "(cached) $ac_c" 1>&6
24771 else
24772   cat > conftest.$ac_ext <<EOF
24773 #line 24774 "configure"
24774 #include "confdefs.h"
24775 #include <$ac_hdr>
24776 EOF
24777 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
24778 { (eval echo configure:24779: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
24779 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
24780 if test -z "$ac_err"; then
24781   rm -rf conftest*
24782   eval "ac_cv_header_$ac_safe=yes"
24783 else
24784   echo "$ac_err" >&5
24785   echo "configure: failed program was:" >&5
24786   cat conftest.$ac_ext >&5
24787   rm -rf conftest*
24788   eval "ac_cv_header_$ac_safe=no"
24789 fi
24790 rm -f conftest*
24791 fi
24792 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
24793   echo "$ac_t""yes" 1>&6
24794     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
24795   cat >> confdefs.h <<EOF
24796 #define $ac_tr_hdr 1
24797 EOF
24798  
24799 else
24800   echo "$ac_t""no" 1>&6
24801 fi
24802 done
24803
24804
24805         if test $ac_cv_header_ltdl_h != yes ; then
24806                 { echo "configure: error: could not locate <ltdl.h>" 1>&2; exit 1; }
24807         fi
24808         echo $ac_n "checking for lt_dlinit in -lltdl""... $ac_c" 1>&6
24809 echo "configure:24810: checking for lt_dlinit in -lltdl" >&5
24810 ac_lib_var=`echo ltdl'_'lt_dlinit | sed 'y%./+-:%__p__%'`
24811 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
24812   echo $ac_n "(cached) $ac_c" 1>&6
24813 else
24814   ac_save_LIBS="$LIBS"
24815 LIBS="-lltdl  $LIBS"
24816 cat > conftest.$ac_ext <<EOF
24817 #line 24818 "configure"
24818 #include "confdefs.h"
24819 /* Override any gcc2 internal prototype to avoid an error.  */
24820 /* We use char because int might match the return type of a gcc2
24821     builtin and then its argument prototype would still apply.  */
24822 char lt_dlinit();
24823
24824 int main() {
24825 lt_dlinit()
24826 ; return 0; }
24827 EOF
24828 if { (eval echo configure:24829: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
24829   rm -rf conftest*
24830   eval "ac_cv_lib_$ac_lib_var=yes"
24831 else
24832   echo "configure: failed program was:" >&5
24833   cat conftest.$ac_ext >&5
24834   rm -rf conftest*
24835   eval "ac_cv_lib_$ac_lib_var=no"
24836 fi
24837 rm -f conftest*
24838 LIBS="$ac_save_LIBS"
24839
24840 fi
24841 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
24842   echo "$ac_t""yes" 1>&6
24843   
24844                 SLAPI_LIBS=-lltdl
24845                 LIBSLAPI=libslapi.a
24846                 LIBSLAPITOOLS=../libslapi.a
24847                 cat >> confdefs.h <<\EOF
24848 #define HAVE_LIBLTDL 1
24849 EOF
24850
24851         
24852 else
24853   echo "$ac_t""no" 1>&6
24854 { echo "configure: error: could not locate libtool -lltdl" 1>&2; exit 1; }
24855 fi
24856
24857
24858         cat >> confdefs.h <<\EOF
24859 #define LDAP_SLAPI 1
24860 EOF
24861
24862 fi
24863
24864 if test "$ol_enable_debug" != no ; then
24865         cat >> confdefs.h <<\EOF
24866 #define LDAP_DEBUG 1
24867 EOF
24868
24869 fi
24870 if test "$ol_enable_syslog" = yes ; then
24871         cat >> confdefs.h <<\EOF
24872 #define LDAP_SYSLOG 1
24873 EOF
24874
24875 fi
24876 if test "$ol_link_kbind" != no ; then
24877         cat >> confdefs.h <<\EOF
24878 #define LDAP_API_FEATURE_X_OPENLDAP_V2_KBIND LDAP_VENDOR_VERSION
24879 EOF
24880
24881 fi
24882 if test "$ol_enable_proctitle" != no ; then
24883         cat >> confdefs.h <<\EOF
24884 #define LDAP_PROCTITLE 1
24885 EOF
24886
24887 fi
24888 if test "$ol_enable_referrals" != no ; then
24889         cat >> confdefs.h <<\EOF
24890 #define LDAP_API_FEATURE_X_OPENLDAP_V2_REFERRALS LDAP_VENDOR_VERSION
24891 EOF
24892
24893 fi
24894 if test "$ol_enable_local" != no; then
24895         cat >> confdefs.h <<\EOF
24896 #define LDAP_PF_LOCAL 1
24897 EOF
24898
24899 fi
24900 if test "$ol_link_ipv6" != no; then
24901         cat >> confdefs.h <<\EOF
24902 #define LDAP_PF_INET6 1
24903 EOF
24904
24905 fi
24906 if test "$ol_enable_cleartext" != no ; then
24907         cat >> confdefs.h <<\EOF
24908 #define SLAPD_CLEARTEXT 1
24909 EOF
24910
24911 fi
24912 if test "$ol_enable_crypt" != no ; then
24913         cat >> confdefs.h <<\EOF
24914 #define SLAPD_CRYPT 1
24915 EOF
24916
24917 fi
24918 if test "$ol_link_spasswd" != no ; then
24919         cat >> confdefs.h <<\EOF
24920 #define SLAPD_SPASSWD 1
24921 EOF
24922
24923 fi
24924 if test "$ol_enable_multimaster" != no ; then
24925         cat >> confdefs.h <<\EOF
24926 #define SLAPD_MULTIMASTER 1
24927 EOF
24928
24929 fi
24930 if test "$ol_enable_rlookups" != no ; then
24931         cat >> confdefs.h <<\EOF
24932 #define SLAPD_RLOOKUPS 1
24933 EOF
24934
24935 fi
24936 if test "$ol_enable_aci" != no ; then
24937         cat >> confdefs.h <<\EOF
24938 #define SLAPD_ACI_ENABLED 1
24939 EOF
24940
24941 fi
24942
24943 if test "$ol_link_modules" != no ; then
24944         cat >> confdefs.h <<\EOF
24945 #define SLAPD_MODULES 1
24946 EOF
24947
24948         BUILD_SLAPD=yes
24949         SLAPD_MODULES_LDFLAGS="-dlopen self"
24950 fi
24951
24952 cat >> confdefs.h <<\EOF
24953 #define SLAPD_MOD_STATIC 1
24954 EOF
24955
24956 cat >> confdefs.h <<\EOF
24957 #define SLAPD_MOD_DYNAMIC 2
24958 EOF
24959
24960
24961 if test "$ol_enable_bdb" != no ; then
24962         BUILD_SLAPD=yes
24963         BUILD_BDB=$ol_enable_bdb
24964         if test "$ol_enable_bdb" = mod ; then
24965                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-bdb"
24966                 MFLAG=SLAPD_MOD_DYNAMIC
24967         else
24968                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-bdb"
24969                 MFLAG=SLAPD_MOD_STATIC
24970         fi
24971         cat >> confdefs.h <<EOF
24972 #define SLAPD_BDB $MFLAG
24973 EOF
24974
24975 fi
24976
24977 if test "$ol_enable_dnssrv" != no ; then
24978         BUILD_SLAPD=yes
24979         BUILD_DNSSRV=$ol_enable_dnssrv
24980         if test "$ol_enable_dnssrv" = mod ; then
24981                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-dnssrv"
24982                 MFLAG=SLAPD_MOD_DYNAMIC
24983         else
24984                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-dnssrv"
24985                 MFLAG=SLAPD_MOD_STATIC
24986         fi
24987         cat >> confdefs.h <<EOF
24988 #define SLAPD_DNSSRV $MFLAG
24989 EOF
24990
24991 fi
24992
24993 if test "$ol_enable_hdb" != no ; then
24994         BUILD_SLAPD=yes
24995         BUILD_HDB=$ol_enable_hdb
24996         if test "$ol_enable_hdb" = mod ; then
24997                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-hdb"
24998                 MFLAG=SLAPD_MOD_DYNAMIC
24999         else
25000                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-hdb"
25001                 MFLAG=SLAPD_MOD_STATIC
25002         fi
25003         cat >> confdefs.h <<EOF
25004 #define SLAPD_HDB $MFLAG
25005 EOF
25006
25007 fi
25008
25009 if test "$ol_enable_ldap" != no ; then
25010         BUILD_SLAPD=yes
25011         BUILD_LDAP=$ol_enable_ldap
25012         if test "$ol_enable_ldap" = mod ; then
25013                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-ldap"
25014                 MFLAG=SLAPD_MOD_DYNAMIC
25015         else
25016                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-ldap"
25017                 MFLAG=SLAPD_MOD_STATIC
25018         fi
25019         cat >> confdefs.h <<EOF
25020 #define SLAPD_LDAP $MFLAG
25021 EOF
25022
25023 fi
25024
25025 if test "$ol_link_ldbm" != no -a $ol_enable_ldbm != no; then
25026         BUILD_SLAPD=yes
25027         BUILD_LDBM=$ol_enable_ldbm
25028         if test "$ol_enable_ldbm" = mod ; then
25029                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-ldbm"
25030                 MFLAG=SLAPD_MOD_DYNAMIC
25031         else
25032                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-ldbm"
25033                 MFLAG=SLAPD_MOD_STATIC
25034         fi
25035         cat >> confdefs.h <<EOF
25036 #define SLAPD_LDBM $MFLAG
25037 EOF
25038
25039 fi
25040
25041 if test "$ol_enable_meta" != no ; then
25042         BUILD_SLAPD=yes
25043         BUILD_META=$ol_enable_meta
25044         BUILD_REWRITE=yes
25045         if test "$ol_enable_meta" = mod ; then
25046                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-meta"
25047                 MFLAG=SLAPD_MOD_DYNAMIC
25048         else
25049                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-meta"
25050                 MFLAG=SLAPD_MOD_STATIC
25051         fi
25052         cat >> confdefs.h <<EOF
25053 #define SLAPD_META $MFLAG
25054 EOF
25055
25056 fi
25057
25058 if test "$ol_enable_monitor" != no ; then
25059         BUILD_SLAPD=yes
25060         BUILD_MONITOR=$ol_enable_monitor
25061         if test "$ol_enable_monitor" = mod ; then
25062                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-monitor"
25063                 MFLAG=SLAPD_MOD_DYNAMIC
25064         else
25065                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-monitor"
25066                 MFLAG=SLAPD_MOD_STATIC
25067         fi
25068         cat >> confdefs.h <<EOF
25069 #define SLAPD_MONITOR $MFLAG
25070 EOF
25071
25072 fi
25073
25074 if test "$ol_enable_null" != no ; then
25075         BUILD_SLAPD=yes
25076         BUILD_NULL=$ol_enable_null
25077         if test "$ol_enable_null" = mod ; then
25078                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-null"
25079                 MFLAG=SLAPD_MOD_DYNAMIC
25080         else
25081                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-null"
25082                 MFLAG=SLAPD_MOD_STATIC
25083         fi
25084         cat >> confdefs.h <<EOF
25085 #define SLAPD_NULL $MFLAG
25086 EOF
25087
25088 fi
25089
25090 if test "$ol_enable_passwd" != no ; then
25091         BUILD_SLAPD=yes
25092         BUILD_PASSWD=$ol_enable_passwd
25093         if test "$ol_enable_passwd" = mod ; then
25094                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-passwd"
25095                 MFLAG=SLAPD_MOD_DYNAMIC
25096         else
25097                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-passwd"
25098                 MFLAG=SLAPD_MOD_STATIC
25099         fi
25100         cat >> confdefs.h <<EOF
25101 #define SLAPD_PASSWD $MFLAG
25102 EOF
25103
25104 fi
25105
25106 if test "$ol_link_perl" != no ; then
25107         BUILD_SLAPD=yes
25108         BUILD_PERL=$ol_enable_perl
25109         if test "$ol_enable_perl" = mod ; then
25110                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-perl"
25111                 MFLAG=SLAPD_MOD_DYNAMIC
25112         else
25113                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-perl"
25114                 MFLAG=SLAPD_MOD_STATIC
25115         fi
25116         cat >> confdefs.h <<EOF
25117 #define SLAPD_PERL $MFLAG
25118 EOF
25119
25120 fi
25121
25122 if test "$ol_enable_relay" != no ; then
25123         BUILD_SLAPD=yes
25124         BUILD_RELAY=$ol_enable_relay
25125         if test "$ol_enable_relay" = mod ; then
25126                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-relay"
25127                 MFLAG=SLAPD_MOD_DYNAMIC
25128         else
25129                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-relay"
25130                 MFLAG=SLAPD_MOD_STATIC
25131         fi
25132         cat >> confdefs.h <<EOF
25133 #define SLAPD_RELAY $MFLAG
25134 EOF
25135
25136 fi
25137
25138 if test "$ol_enable_shell" != no ; then
25139         if test "$ol_link_thread" != no ; then
25140                 echo "configure: warning: Use of --without-threads is recommended with back-shell" 1>&2
25141         fi
25142         BUILD_SLAPD=yes
25143         BUILD_SHELL=$ol_enable_shell
25144         if test "$ol_enable_shell" = mod ; then
25145                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-shell"
25146                 MFLAG=SLAPD_MOD_DYNAMIC
25147         else
25148                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-shell"
25149                 MFLAG=SLAPD_MOD_STATIC
25150         fi
25151         cat >> confdefs.h <<EOF
25152 #define SLAPD_SHELL $MFLAG
25153 EOF
25154
25155 fi
25156
25157 if test "$ol_link_sql" != no ; then
25158         BUILD_SLAPD=yes
25159         BUILD_SQL=$ol_enable_sql
25160         if test "$ol_enable_sql" = mod; then
25161                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-sql"
25162                 MFLAG=SLAPD_MOD_DYNAMIC
25163         else
25164                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-sql"
25165                 MFLAG=SLAPD_MOD_STATIC
25166         fi
25167         cat >> confdefs.h <<EOF
25168 #define SLAPD_SQL $MFLAG
25169 EOF
25170
25171 fi
25172
25173 if test "$ol_enable_accesslog" != no ; then
25174         BUILD_ACCESSLOG=$ol_enable_accesslog
25175         if test "$ol_enable_accesslog" = mod ; then
25176                 MFLAG=SLAPD_MOD_DYNAMIC
25177                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS accesslog.la"
25178         else
25179                 MFLAG=SLAPD_MOD_STATIC
25180                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS accesslog.o"
25181         fi
25182         cat >> confdefs.h <<EOF
25183 #define SLAPD_OVER_ACCESSLOG $MFLAG
25184 EOF
25185
25186 fi
25187
25188 if test "$ol_enable_denyop" != no ; then
25189         BUILD_DENYOP=$ol_enable_denyop
25190         if test "$ol_enable_denyop" = mod ; then
25191                 MFLAG=SLAPD_MOD_DYNAMIC
25192                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS denyop.la"
25193         else
25194                 MFLAG=SLAPD_MOD_STATIC
25195                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS denyop.o"
25196         fi
25197         cat >> confdefs.h <<EOF
25198 #define SLAPD_OVER_DENYOP $MFLAG
25199 EOF
25200
25201 fi
25202
25203 if test "$ol_enable_dyngroup" != no ; then
25204         BUILD_DYNGROUP=$ol_enable_dyngroup
25205         if test "$ol_enable_dyngroup" = mod ; then
25206                 MFLAG=SLAPD_MOD_DYNAMIC
25207                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS dyngroup.la"
25208         else
25209                 MFLAG=SLAPD_MOD_STATIC
25210                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS dyngroup.o"
25211         fi
25212         cat >> confdefs.h <<EOF
25213 #define SLAPD_OVER_DYNGROUP $MFLAG
25214 EOF
25215
25216 fi
25217
25218 if test "$ol_enable_dynlist" != no ; then
25219         BUILD_DYNLIST=$ol_enable_dynlist
25220         if test "$ol_enable_dynlist" = mod ; then
25221                 MFLAG=SLAPD_MOD_DYNAMIC
25222                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS dynlist.la"
25223         else
25224                 MFLAG=SLAPD_MOD_STATIC
25225                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS dynlist.o"
25226         fi
25227         cat >> confdefs.h <<EOF
25228 #define SLAPD_OVER_DYNLIST $MFLAG
25229 EOF
25230
25231 fi
25232
25233 if test "$ol_enable_glue" != no ; then
25234         BUILD_GLUE=$ol_enable_glue
25235         if test "$ol_enable_glue" = mod ; then
25236                 MFLAG=SLAPD_MOD_DYNAMIC
25237                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS glue.la"
25238         else
25239                 MFLAG=SLAPD_MOD_STATIC
25240                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS glue.o"
25241         fi
25242         cat >> confdefs.h <<EOF
25243 #define SLAPD_OVER_GLUE $MFLAG
25244 EOF
25245
25246 fi
25247
25248 if test "$ol_enable_lastmod" != no ; then
25249         BUILD_LASTMOD=$ol_enable_lastmod
25250         if test "$ol_enable_lastmod" = mod ; then
25251                 MFLAG=SLAPD_MOD_DYNAMIC
25252                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS lastmod.la"
25253         else
25254                 MFLAG=SLAPD_MOD_STATIC
25255                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS lastmod.o"
25256         fi
25257         cat >> confdefs.h <<EOF
25258 #define SLAPD_OVER_LASTMOD $MFLAG
25259 EOF
25260
25261 fi
25262
25263 if test "$ol_enable_ppolicy" != no ; then
25264         BUILD_PPOLICY=$ol_enable_ppolicy
25265         if test "$ol_enable_ppolicy" = mod ; then
25266                 MFLAG=SLAPD_MOD_DYNAMIC
25267                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS ppolicy.la"
25268         else
25269                 MFLAG=SLAPD_MOD_STATIC
25270                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS ppolicy.o"
25271         fi
25272         cat >> confdefs.h <<EOF
25273 #define SLAPD_OVER_PPOLICY $MFLAG
25274 EOF
25275
25276 fi
25277
25278 if test "$ol_enable_proxycache" != no ; then
25279         BUILD_PROXYCACHE=$ol_enable_proxycache
25280         if test "$ol_enable_proxycache" = mod ; then
25281                 MFLAG=SLAPD_MOD_DYNAMIC
25282                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS pcache.la"
25283         else
25284                 MFLAG=SLAPD_MOD_STATIC
25285                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS pcache.o"
25286         fi
25287         cat >> confdefs.h <<EOF
25288 #define SLAPD_OVER_PROXYCACHE $MFLAG
25289 EOF
25290
25291 fi
25292
25293 if test "$ol_enable_refint" != no ; then
25294         BUILD_REFINT=$ol_enable_refint
25295         if test "$ol_enable_refint" = mod ; then
25296                 MFLAG=SLAPD_MOD_DYNAMIC
25297                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS refint.la"
25298         else
25299                 MFLAG=SLAPD_MOD_STATIC
25300                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS refint.o"
25301         fi
25302         cat >> confdefs.h <<EOF
25303 #define SLAPD_OVER_REFINT $MFLAG
25304 EOF
25305
25306 fi
25307
25308 if test "$ol_enable_retcode" != no ; then
25309         BUILD_RETCODE=$ol_enable_retcode
25310         if test "$ol_enable_retcode" = mod ; then
25311                 MFLAG=SLAPD_MOD_DYNAMIC
25312                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS retcode.la"
25313         else
25314                 MFLAG=SLAPD_MOD_STATIC
25315                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS retcode.o"
25316         fi
25317         cat >> confdefs.h <<EOF
25318 #define SLAPD_OVER_RETCODE $MFLAG
25319 EOF
25320
25321 fi
25322
25323 if test "$ol_enable_rwm" != no ; then
25324         BUILD_REWRITE=yes
25325         BUILD_RWM=$ol_enable_rwm
25326         if test "$ol_enable_rwm" = mod ; then
25327                 MFLAG=SLAPD_MOD_DYNAMIC
25328                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS rwm.la"
25329         else
25330                 MFLAG=SLAPD_MOD_STATIC
25331                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS rwm_x.o"
25332         fi
25333         cat >> confdefs.h <<EOF
25334 #define SLAPD_OVER_RWM $MFLAG
25335 EOF
25336
25337 fi
25338
25339 if test "$ol_enable_syncprov" != no ; then
25340         BUILD_SYNCPROV=$ol_enable_syncprov
25341         if test "$ol_enable_syncprov" = mod ; then
25342                 MFLAG=SLAPD_MOD_DYNAMIC
25343                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS syncprov.la"
25344         else
25345                 MFLAG=SLAPD_MOD_STATIC
25346                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS syncprov.o"
25347         fi
25348         cat >> confdefs.h <<EOF
25349 #define SLAPD_OVER_SYNCPROV $MFLAG
25350 EOF
25351
25352 fi
25353
25354 if test "$ol_enable_translucent" != no ; then
25355         BUILD_TRANSLUCENT=$ol_enable_translucent
25356         if test "$ol_enable_translucent" = mod ; then
25357                 MFLAG=SLAPD_MOD_DYNAMIC
25358                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS translucent.la"
25359         else
25360                 MFLAG=SLAPD_MOD_STATIC
25361                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS translucent.o"
25362         fi
25363         cat >> confdefs.h <<EOF
25364 #define SLAPD_OVER_TRANSLUCENT $MFLAG
25365 EOF
25366
25367 fi
25368
25369 if test "$ol_enable_unique" != no ; then
25370         BUILD_UNIQUE=$ol_enable_unique
25371         if test "$ol_enable_unique" = mod ; then
25372                 MFLAG=SLAPD_MOD_DYNAMIC
25373                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS unique.la"
25374         else
25375                 MFLAG=SLAPD_MOD_STATIC
25376                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS unique.o"
25377         fi
25378         cat >> confdefs.h <<EOF
25379 #define SLAPD_OVER_UNIQUE $MFLAG
25380 EOF
25381
25382 fi
25383
25384 if test "$ol_enable_slurpd" != no -a "$ol_link_threads" != no -a \
25385         $BUILD_SLAPD = yes ; then
25386         BUILD_SLURPD=yes
25387 fi
25388
25389 if test "$ol_enable_rewrite" != no ; then
25390         cat >> confdefs.h <<\EOF
25391 #define ENABLE_REWRITE 1
25392 EOF
25393
25394         BUILD_REWRITE=yes
25395 fi
25396
25397 if test "$ol_enable_slapi" != no ; then
25398         cat >> confdefs.h <<\EOF
25399 #define ENABLE_SLAPI 1
25400 EOF
25401
25402         BUILD_SLAPI=yes
25403         SLAPD_SLAPI_DEPEND=libslapi.a
25404 fi
25405
25406
25407
25408 if test "$ac_cv_mingw32" = yes ; then
25409         PLAT=NT
25410         SLAPD_MODULES_LDFLAGS=
25411 else
25412         PLAT=UNIX
25413 fi
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
25472
25473
25474
25475
25476
25477
25478
25479
25480
25481
25482
25483
25484
25485
25486
25487
25488
25489
25490
25491
25492 # Check whether --with-xxinstall or --without-xxinstall was given.
25493 if test "${with_xxinstall+set}" = set; then
25494   withval="$with_xxinstall"
25495   :
25496 fi
25497
25498
25499
25500 trap '' 1 2 15
25501
25502 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
25503
25504 test "x$prefix" = xNONE && prefix=$ac_default_prefix
25505 # Let make expand exec_prefix.
25506 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
25507
25508 # Any assignment to VPATH causes Sun make to only execute
25509 # the first set of double-colon rules, so remove it if not needed.
25510 # If there is a colon in the path, we need to keep it.
25511 if test "x$srcdir" = x.; then
25512   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
25513 fi
25514
25515 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
25516
25517 DEFS=-DHAVE_CONFIG_H
25518
25519 # Without the "./", some shells look in PATH for config.status.
25520 : ${CONFIG_STATUS=./config.status}
25521
25522 echo creating $CONFIG_STATUS
25523 rm -f $CONFIG_STATUS
25524 cat > $CONFIG_STATUS <<EOF
25525 #! /bin/sh
25526 # Generated automatically by configure.
25527 # Run this file to recreate the current configuration.
25528 # This directory was configured as follows,
25529 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
25530 #
25531 # $0 $ac_configure_args
25532 #
25533 # Compiler output produced by configure, useful for debugging
25534 # configure, is in ./config.log if it exists.
25535
25536 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
25537 for ac_option
25538 do
25539   case "\$ac_option" in
25540   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
25541     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
25542     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
25543   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
25544     echo "$CONFIG_STATUS generated by autoconf version 2.13.1"
25545     exit 0 ;;
25546   -help | --help | --hel | --he | --h)
25547     echo "\$ac_cs_usage"; exit 0 ;;
25548   *) echo "\$ac_cs_usage"; exit 1 ;;
25549   esac
25550 done
25551
25552 ac_given_srcdir=$srcdir
25553 ac_given_INSTALL="$INSTALL"
25554
25555 trap 'rm -fr `echo "\
25556 Makefile:build/top.mk:Makefile.in:build/dir.mk \
25557 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
25558 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
25559 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
25560 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
25561 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
25562 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
25563 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
25564 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
25565 include/Makefile:build/top.mk:include/Makefile.in \
25566 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
25567 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
25568 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
25569 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
25570 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk  \
25571 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
25572 libraries/librewrite/Makefile:build/top.mk:libraries/librewrite/Makefile.in:build/lib.mk:build/lib-shared.mk \
25573 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
25574 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
25575 servers/slapd/back-bdb/Makefile:build/top.mk:servers/slapd/back-bdb/Makefile.in:build/mod.mk \
25576 servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
25577 servers/slapd/back-hdb/Makefile:build/top.mk:servers/slapd/back-hdb/Makefile.in:build/mod.mk \
25578 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
25579 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
25580 servers/slapd/back-ldif/Makefile:build/top.mk:servers/slapd/back-ldif/Makefile.in:build/mod.mk \
25581 servers/slapd/back-meta/Makefile:build/top.mk:servers/slapd/back-meta/Makefile.in:build/mod.mk \
25582 servers/slapd/back-monitor/Makefile:build/top.mk:servers/slapd/back-monitor/Makefile.in:build/mod.mk \
25583 servers/slapd/back-null/Makefile:build/top.mk:servers/slapd/back-null/Makefile.in:build/mod.mk \
25584 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
25585 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
25586 servers/slapd/back-relay/Makefile:build/top.mk:servers/slapd/back-relay/Makefile.in:build/mod.mk \
25587 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
25588 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
25589 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
25590 servers/slapd/slapi/Makefile:build/top.mk:servers/slapd/slapi/Makefile.in:build/lib.mk:build/lib-shared.mk  \
25591 servers/slapd/overlays/Makefile:build/top.mk:servers/slapd/overlays/Makefile.in:build/lib.mk \
25592 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
25593 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
25594 tests/run \
25595 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
25596  include/portable.h include/ldap_features.h include/lber_types.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
25597 EOF
25598 cat >> $CONFIG_STATUS <<EOF
25599
25600 # Protect against being on the right side of a sed subst in config.status.
25601 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
25602  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
25603 $ac_vpsub
25604 $extrasub
25605 s%@SHELL@%$SHELL%g
25606 s%@CFLAGS@%$CFLAGS%g
25607 s%@CPPFLAGS@%$CPPFLAGS%g
25608 s%@CXXFLAGS@%$CXXFLAGS%g
25609 s%@FFLAGS@%$FFLAGS%g
25610 s%@DEFS@%$DEFS%g
25611 s%@LDFLAGS@%$LDFLAGS%g
25612 s%@LIBS@%$LIBS%g
25613 s%@exec_prefix@%$exec_prefix%g
25614 s%@prefix@%$prefix%g
25615 s%@program_transform_name@%$program_transform_name%g
25616 s%@bindir@%$bindir%g
25617 s%@sbindir@%$sbindir%g
25618 s%@libexecdir@%$libexecdir%g
25619 s%@datadir@%$datadir%g
25620 s%@sysconfdir@%$sysconfdir%g
25621 s%@sharedstatedir@%$sharedstatedir%g
25622 s%@localstatedir@%$localstatedir%g
25623 s%@libdir@%$libdir%g
25624 s%@includedir@%$includedir%g
25625 s%@oldincludedir@%$oldincludedir%g
25626 s%@infodir@%$infodir%g
25627 s%@mandir@%$mandir%g
25628 s%@host@%$host%g
25629 s%@host_alias@%$host_alias%g
25630 s%@host_cpu@%$host_cpu%g
25631 s%@host_vendor@%$host_vendor%g
25632 s%@host_os@%$host_os%g
25633 s%@target@%$target%g
25634 s%@target_alias@%$target_alias%g
25635 s%@target_cpu@%$target_cpu%g
25636 s%@target_vendor@%$target_vendor%g
25637 s%@target_os@%$target_os%g
25638 s%@build@%$build%g
25639 s%@build_alias@%$build_alias%g
25640 s%@build_cpu@%$build_cpu%g
25641 s%@build_vendor@%$build_vendor%g
25642 s%@build_os@%$build_os%g
25643 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
25644 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
25645 s%@INSTALL_DATA@%$INSTALL_DATA%g
25646 s%@PACKAGE@%$PACKAGE%g
25647 s%@VERSION@%$VERSION%g
25648 s%@ACLOCAL@%$ACLOCAL%g
25649 s%@AUTOCONF@%$AUTOCONF%g
25650 s%@AUTOMAKE@%$AUTOMAKE%g
25651 s%@AUTOHEADER@%$AUTOHEADER%g
25652 s%@MAKEINFO@%$MAKEINFO%g
25653 s%@install_sh@%$install_sh%g
25654 s%@AMTAR@%$AMTAR%g
25655 s%@AWK@%$AWK%g
25656 s%@AMTARFLAGS@%$AMTARFLAGS%g
25657 s%@SET_MAKE@%$SET_MAKE%g
25658 s%@OPENLDAP_LIBRELEASE@%$OPENLDAP_LIBRELEASE%g
25659 s%@OPENLDAP_LIBVERSION@%$OPENLDAP_LIBVERSION%g
25660 s%@OPENLDAP_RELEASE_DATE@%$OPENLDAP_RELEASE_DATE%g
25661 s%@top_builddir@%$top_builddir%g
25662 s%@ldap_subdir@%$ldap_subdir%g
25663 s%@CC@%$CC%g
25664 s%@AR@%$AR%g
25665 s%@LN_S@%$LN_S%g
25666 s%@OBJEXT@%$OBJEXT%g
25667 s%@EXEEXT@%$EXEEXT%g
25668 s%@ECHO@%$ECHO%g
25669 s%@RANLIB@%$RANLIB%g
25670 s%@STRIP@%$STRIP%g
25671 s%@DLLTOOL@%$DLLTOOL%g
25672 s%@AS@%$AS%g
25673 s%@OBJDUMP@%$OBJDUMP%g
25674 s%@CPP@%$CPP%g
25675 s%@LIBTOOL@%$LIBTOOL%g
25676 s%@PERLBIN@%$PERLBIN%g
25677 s%@OL_MKDEP@%$OL_MKDEP%g
25678 s%@OL_MKDEP_FLAGS@%$OL_MKDEP_FLAGS%g
25679 s%@LTSTATIC@%$LTSTATIC%g
25680 s%@LIBOBJS@%$LIBOBJS%g
25681 s%@LIBSRCS@%$LIBSRCS%g
25682 s%@PLAT@%$PLAT%g
25683 s%@WITH_SASL@%$WITH_SASL%g
25684 s%@WITH_TLS@%$WITH_TLS%g
25685 s%@WITH_MODULES_ENABLED@%$WITH_MODULES_ENABLED%g
25686 s%@BUILD_LIBS_DYNAMIC@%$BUILD_LIBS_DYNAMIC%g
25687 s%@BUILD_SLAPD@%$BUILD_SLAPD%g
25688 s%@BUILD_SLAPI@%$BUILD_SLAPI%g
25689 s%@SLAPD_SLAPI_DEPEND@%$SLAPD_SLAPI_DEPEND%g
25690 s%@BUILD_BDB@%$BUILD_BDB%g
25691 s%@BUILD_DNSSRV@%$BUILD_DNSSRV%g
25692 s%@BUILD_HDB@%$BUILD_HDB%g
25693 s%@BUILD_LDAP@%$BUILD_LDAP%g
25694 s%@BUILD_LDBM@%$BUILD_LDBM%g
25695 s%@BUILD_META@%$BUILD_META%g
25696 s%@BUILD_MONITOR@%$BUILD_MONITOR%g
25697 s%@BUILD_NULL@%$BUILD_NULL%g
25698 s%@BUILD_PASSWD@%$BUILD_PASSWD%g
25699 s%@BUILD_RELAY@%$BUILD_RELAY%g
25700 s%@BUILD_PERL@%$BUILD_PERL%g
25701 s%@BUILD_SHELL@%$BUILD_SHELL%g
25702 s%@BUILD_SQL@%$BUILD_SQL%g
25703 s%@BUILD_ACCESSLOG@%$BUILD_ACCESSLOG%g
25704 s%@BUILD_DENYOP@%$BUILD_DENYOP%g
25705 s%@BUILD_DYNGROUP@%$BUILD_DYNGROUP%g
25706 s%@BUILD_DYNLIST@%$BUILD_DYNLIST%g
25707 s%@BUILD_GLUE@%$BUILD_GLUE%g
25708 s%@BUILD_LASTMOD@%$BUILD_LASTMOD%g
25709 s%@BUILD_PPOLICY@%$BUILD_PPOLICY%g
25710 s%@BUILD_PROXYCACHE@%$BUILD_PROXYCACHE%g
25711 s%@BUILD_REFINT@%$BUILD_REFINT%g
25712 s%@BUILD_RETCODE@%$BUILD_RETCODE%g
25713 s%@BUILD_RWM@%$BUILD_RWM%g
25714 s%@BUILD_SYNCPROV@%$BUILD_SYNCPROV%g
25715 s%@BUILD_TRANSLUCENT@%$BUILD_TRANSLUCENT%g
25716 s%@BUILD_UNIQUE@%$BUILD_UNIQUE%g
25717 s%@BUILD_SLURPD@%$BUILD_SLURPD%g
25718 s%@LDAP_LIBS@%$LDAP_LIBS%g
25719 s%@SLAPD_LIBS@%$SLAPD_LIBS%g
25720 s%@SLURPD_LIBS@%$SLURPD_LIBS%g
25721 s%@LDBM_LIBS@%$LDBM_LIBS%g
25722 s%@LTHREAD_LIBS@%$LTHREAD_LIBS%g
25723 s%@LUTIL_LIBS@%$LUTIL_LIBS%g
25724 s%@WRAP_LIBS@%$WRAP_LIBS%g
25725 s%@SLAPD_MODULES_CPPFLAGS@%$SLAPD_MODULES_CPPFLAGS%g
25726 s%@SLAPD_MODULES_LDFLAGS@%$SLAPD_MODULES_LDFLAGS%g
25727 s%@SLAPD_NO_STATIC@%$SLAPD_NO_STATIC%g
25728 s%@SLAPD_STATIC_BACKENDS@%$SLAPD_STATIC_BACKENDS%g
25729 s%@SLAPD_DYNAMIC_BACKENDS@%$SLAPD_DYNAMIC_BACKENDS%g
25730 s%@SLAPD_STATIC_OVERLAYS@%$SLAPD_STATIC_OVERLAYS%g
25731 s%@SLAPD_DYNAMIC_OVERLAYS@%$SLAPD_DYNAMIC_OVERLAYS%g
25732 s%@PERL_CPPFLAGS@%$PERL_CPPFLAGS%g
25733 s%@SLAPD_PERL_LDFLAGS@%$SLAPD_PERL_LDFLAGS%g
25734 s%@MOD_PERL_LDFLAGS@%$MOD_PERL_LDFLAGS%g
25735 s%@KRB4_LIBS@%$KRB4_LIBS%g
25736 s%@KRB5_LIBS@%$KRB5_LIBS%g
25737 s%@SASL_LIBS@%$SASL_LIBS%g
25738 s%@TLS_LIBS@%$TLS_LIBS%g
25739 s%@MODULES_LIBS@%$MODULES_LIBS%g
25740 s%@SLAPI_LIBS@%$SLAPI_LIBS%g
25741 s%@LIBSLAPI@%$LIBSLAPI%g
25742 s%@LIBSLAPITOOLS@%$LIBSLAPITOOLS%g
25743 s%@AUTH_LIBS@%$AUTH_LIBS%g
25744 s%@SLAPD_SLP_LIBS@%$SLAPD_SLP_LIBS%g
25745 s%@SLAPD_GMP_LIBS@%$SLAPD_GMP_LIBS%g
25746 s%@SLAPD_SQL_LDFLAGS@%$SLAPD_SQL_LDFLAGS%g
25747 s%@SLAPD_SQL_LIBS@%$SLAPD_SQL_LIBS%g
25748 s%@SLAPD_SQL_INCLUDES@%$SLAPD_SQL_INCLUDES%g
25749
25750 CEOF
25751 EOF
25752
25753 cat >> $CONFIG_STATUS <<\EOF
25754
25755 # Split the substitutions into bite-sized pieces for seds with
25756 # small command number limits, like on Digital OSF/1 and HP-UX.
25757 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
25758 ac_file=1 # Number of current file.
25759 ac_beg=1 # First line for current file.
25760 ac_end=$ac_max_sed_cmds # Line after last line for current file.
25761 ac_more_lines=:
25762 ac_sed_cmds=""
25763 while $ac_more_lines; do
25764   if test $ac_beg -gt 1; then
25765     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
25766   else
25767     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
25768   fi
25769   if test ! -s conftest.s$ac_file; then
25770     ac_more_lines=false
25771     rm -f conftest.s$ac_file
25772   else
25773     if test -z "$ac_sed_cmds"; then
25774       ac_sed_cmds="sed -f conftest.s$ac_file"
25775     else
25776       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
25777     fi
25778     ac_file=`expr $ac_file + 1`
25779     ac_beg=$ac_end
25780     ac_end=`expr $ac_end + $ac_max_sed_cmds`
25781   fi
25782 done
25783 if test -z "$ac_sed_cmds"; then
25784   ac_sed_cmds=cat
25785 fi
25786 EOF
25787
25788 cat >> $CONFIG_STATUS <<EOF
25789
25790 CONFIG_FILES=\${CONFIG_FILES-"\
25791 Makefile:build/top.mk:Makefile.in:build/dir.mk \
25792 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
25793 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
25794 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
25795 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
25796 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
25797 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
25798 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
25799 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
25800 include/Makefile:build/top.mk:include/Makefile.in \
25801 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
25802 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
25803 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
25804 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
25805 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk  \
25806 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
25807 libraries/librewrite/Makefile:build/top.mk:libraries/librewrite/Makefile.in:build/lib.mk:build/lib-shared.mk \
25808 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
25809 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
25810 servers/slapd/back-bdb/Makefile:build/top.mk:servers/slapd/back-bdb/Makefile.in:build/mod.mk \
25811 servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
25812 servers/slapd/back-hdb/Makefile:build/top.mk:servers/slapd/back-hdb/Makefile.in:build/mod.mk \
25813 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
25814 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
25815 servers/slapd/back-ldif/Makefile:build/top.mk:servers/slapd/back-ldif/Makefile.in:build/mod.mk \
25816 servers/slapd/back-meta/Makefile:build/top.mk:servers/slapd/back-meta/Makefile.in:build/mod.mk \
25817 servers/slapd/back-monitor/Makefile:build/top.mk:servers/slapd/back-monitor/Makefile.in:build/mod.mk \
25818 servers/slapd/back-null/Makefile:build/top.mk:servers/slapd/back-null/Makefile.in:build/mod.mk \
25819 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
25820 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
25821 servers/slapd/back-relay/Makefile:build/top.mk:servers/slapd/back-relay/Makefile.in:build/mod.mk \
25822 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
25823 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
25824 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
25825 servers/slapd/slapi/Makefile:build/top.mk:servers/slapd/slapi/Makefile.in:build/lib.mk:build/lib-shared.mk  \
25826 servers/slapd/overlays/Makefile:build/top.mk:servers/slapd/overlays/Makefile.in:build/lib.mk \
25827 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
25828 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
25829 tests/run \
25830 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
25831 "}
25832 EOF
25833 cat >> $CONFIG_STATUS <<\EOF
25834 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
25835   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
25836   case "$ac_file" in
25837   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
25838        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
25839   *) ac_file_in="${ac_file}.in" ;;
25840   esac
25841
25842   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
25843
25844   # Remove last slash and all that follows it.  Not all systems have dirname.
25845   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
25846   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
25847     # The file is in a subdirectory.
25848     test ! -d "$ac_dir" && mkdir "$ac_dir"
25849     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
25850     # A "../" for each directory in $ac_dir_suffix.
25851     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
25852   else
25853     ac_dir_suffix= ac_dots=
25854   fi
25855
25856   case "$ac_given_srcdir" in
25857   .)  srcdir=.
25858       if test -z "$ac_dots"; then top_srcdir=.
25859       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
25860   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
25861   *) # Relative path.
25862     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
25863     top_srcdir="$ac_dots$ac_given_srcdir" ;;
25864   esac
25865
25866   case "$ac_given_INSTALL" in
25867   [/$]*) INSTALL="$ac_given_INSTALL" ;;
25868   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
25869   esac
25870
25871   echo creating "$ac_file"
25872   rm -f "$ac_file"
25873   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
25874   case "$ac_file" in
25875   *[Mm]akefile*) ac_comsub="1i\\
25876 # $configure_input" ;;
25877   *) ac_comsub= ;;
25878   esac
25879
25880   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
25881   sed -e "$ac_comsub
25882 s%@configure_input@%$configure_input%g
25883 s%@srcdir@%$srcdir%g
25884 s%@top_srcdir@%$top_srcdir%g
25885 s%@INSTALL@%$INSTALL%g
25886 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
25887 fi; done
25888 rm -f conftest.s*
25889
25890 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
25891 # NAME is the cpp macro being defined and VALUE is the value it is being given.
25892 #
25893 # ac_d sets the value in "#define NAME VALUE" lines.
25894 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
25895 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
25896 ac_dC='\3'
25897 ac_dD='%g'
25898 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
25899 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
25900 ac_uB='\([      ]\)%\1#\2define\3'
25901 ac_uC=' '
25902 ac_uD='\4%g'
25903 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
25904 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
25905 ac_eB='$%\1#\2define\3'
25906 ac_eC=' '
25907 ac_eD='%g'
25908
25909 if test "${CONFIG_HEADERS+set}" != set; then
25910 EOF
25911 cat >> $CONFIG_STATUS <<EOF
25912   CONFIG_HEADERS="include/portable.h include/ldap_features.h include/lber_types.h"
25913 EOF
25914 cat >> $CONFIG_STATUS <<\EOF
25915 fi
25916 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
25917   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
25918   case "$ac_file" in
25919   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
25920        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
25921   *) ac_file_in="${ac_file}.in" ;;
25922   esac
25923
25924   echo creating $ac_file
25925
25926   rm -f conftest.frag conftest.in conftest.out
25927   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
25928   cat $ac_file_inputs > conftest.in
25929
25930 EOF
25931
25932 # Transform confdefs.h into a sed script conftest.vals that substitutes
25933 # the proper values into config.h.in to produce config.h.  And first:
25934 # Protect against being on the right side of a sed subst in config.status.
25935 # Protect against being in an unquoted here document in config.status.
25936 rm -f conftest.vals
25937 cat > conftest.hdr <<\EOF
25938 s/[\\&%]/\\&/g
25939 s%[\\$`]%\\&%g
25940 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
25941 s%ac_d%ac_u%gp
25942 s%ac_u%ac_e%gp
25943 EOF
25944 sed -n -f conftest.hdr confdefs.h > conftest.vals
25945 rm -f conftest.hdr
25946
25947 # This sed command replaces #undef with comments.  This is necessary, for
25948 # example, in the case of _POSIX_SOURCE, which is predefined and required
25949 # on some systems where configure will not decide to define it.
25950 cat >> conftest.vals <<\EOF
25951 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
25952 EOF
25953
25954 # Break up conftest.vals because some shells have a limit on
25955 # the size of here documents, and old seds have small limits too.
25956
25957 rm -f conftest.tail
25958 while :
25959 do
25960   ac_lines=`grep -c . conftest.vals`
25961   # grep -c gives empty output for an empty file on some AIX systems.
25962   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
25963   # Write a limited-size here document to conftest.frag.
25964   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
25965   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
25966   echo 'CEOF
25967   sed -f conftest.frag conftest.in > conftest.out
25968   rm -f conftest.in
25969   mv conftest.out conftest.in
25970 ' >> $CONFIG_STATUS
25971   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
25972   rm -f conftest.vals
25973   mv conftest.tail conftest.vals
25974 done
25975 rm -f conftest.vals
25976
25977 cat >> $CONFIG_STATUS <<\EOF
25978   rm -f conftest.frag conftest.h
25979   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
25980   cat conftest.in >> conftest.h
25981   rm -f conftest.in
25982   if cmp -s $ac_file conftest.h 2>/dev/null; then
25983     echo "$ac_file is unchanged"
25984     rm -f conftest.h
25985   else
25986     # Remove last slash and all that follows it.  Not all systems have dirname.
25987       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
25988       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
25989       # The file is in a subdirectory.
25990       test ! -d "$ac_dir" && mkdir "$ac_dir"
25991     fi
25992     rm -f $ac_file
25993     mv conftest.h $ac_file
25994   fi
25995 fi; done
25996
25997 EOF
25998 cat >> $CONFIG_STATUS <<EOF
25999 STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS"
26000 EOF
26001 cat >> $CONFIG_STATUS <<\EOF
26002
26003 chmod +x tests/run
26004 date > stamp-h
26005 BACKENDSC="servers/slapd/backends.c"
26006 echo "Making $BACKENDSC"
26007 rm -f $BACKENDSC
26008 cat > $BACKENDSC << ENDX
26009 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
26010  *
26011  * Copyright 1998-2005 The OpenLDAP Foundation.
26012  * All rights reserved.
26013  *
26014  * Redistribution and use in source and binary forms, with or without
26015  * modification, are permitted only as authorized by the OpenLDAP
26016  * Public License.
26017  *
26018  * A copy of this license is available in the file LICENSE in the
26019  * top-level directory of the distribution or, alternatively, at
26020  * <http://www.OpenLDAP.org/license.html>.
26021  */
26022 /* This file is automatically generated by configure; please do not edit. */
26023
26024 #include "portable.h"
26025 #include "slap.h"
26026
26027 ENDX
26028 if test "${STATIC_BACKENDS}"; then
26029         for b in config ${STATIC_BACKENDS}; do
26030                 bb=`echo "${b}" | sed -e 's/back-//'`
26031                 cat >> $BACKENDSC << ENDX
26032 extern BI_init ${bb}_back_initialize;
26033 ENDX
26034         done
26035
26036         cat >> $BACKENDSC << ENDX
26037
26038 BackendInfo slap_binfo[] = {
26039 ENDX
26040
26041         for b in config ${STATIC_BACKENDS}; do
26042                 bb=`echo "${b}" | sed -e 's/back-//'`
26043                 echo "    Add ${bb} ..."
26044                 cat >> $BACKENDSC << ENDX
26045         { "${bb}", ${bb}_back_initialize },
26046 ENDX
26047         done
26048
26049         cat >> $BACKENDSC << ENDX
26050         { NULL, NULL },
26051 };
26052
26053 /* end of generated file */
26054 ENDX
26055 fi
26056
26057 echo Please run \"make depend\" to build dependencies
26058
26059 exit 0
26060 EOF
26061 chmod +x $CONFIG_STATUS
26062 rm -fr confdefs* $ac_clean_files
26063 test "$no_create" = yes || $SHELL $CONFIG_STATUS || exit 1
26064