]> git.sur5r.net Git - openldap/blob - configure
plug yet another one-time leak
[openldap] / configure
1 #! /bin/sh
2 # $OpenLDAP$
3 # from OpenLDAP: pkg/ldap/configure.in,v 1.585 2005/07/25 18:51: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         utime.h                 \
8876         winsock.h               \
8877         winsock2.h              \
8878
8879 do
8880 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8881 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8882 echo "configure:8883: checking for $ac_hdr" >&5
8883 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
8884   echo $ac_n "(cached) $ac_c" 1>&6
8885 else
8886   cat > conftest.$ac_ext <<EOF
8887 #line 8888 "configure"
8888 #include "confdefs.h"
8889 #include <$ac_hdr>
8890 EOF
8891 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8892 { (eval echo configure:8893: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8893 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8894 if test -z "$ac_err"; then
8895   rm -rf conftest*
8896   eval "ac_cv_header_$ac_safe=yes"
8897 else
8898   echo "$ac_err" >&5
8899   echo "configure: failed program was:" >&5
8900   cat conftest.$ac_ext >&5
8901   rm -rf conftest*
8902   eval "ac_cv_header_$ac_safe=no"
8903 fi
8904 rm -f conftest*
8905 fi
8906 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8907   echo "$ac_t""yes" 1>&6
8908     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8909   cat >> confdefs.h <<EOF
8910 #define $ac_tr_hdr 1
8911 EOF
8912  
8913 else
8914   echo "$ac_t""no" 1>&6
8915 fi
8916 done
8917
8918
8919
8920 for ac_func in sigaction sigset 
8921 do
8922 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8923 echo "configure:8924: checking for $ac_func" >&5
8924 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
8925   echo $ac_n "(cached) $ac_c" 1>&6
8926 else
8927   cat > conftest.$ac_ext <<EOF
8928 #line 8929 "configure"
8929 #include "confdefs.h"
8930 /* System header to define __stub macros and hopefully few prototypes,
8931     which can conflict with char $ac_func(); below.  */
8932 #include <assert.h>
8933 /* Override any gcc2 internal prototype to avoid an error.  */
8934 /* We use char because int might match the return type of a gcc2
8935     builtin and then its argument prototype would still apply.  */
8936 char $ac_func();
8937 char (*f)();
8938
8939 int main() {
8940
8941 /* The GNU C library defines this for functions which it implements
8942     to always fail with ENOSYS.  Some functions are actually named
8943     something starting with __ and the normal name is an alias.  */
8944 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8945 choke me
8946 #else
8947 f = $ac_func;
8948 #endif
8949
8950 ; return 0; }
8951 EOF
8952 if { (eval echo configure:8953: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8953   rm -rf conftest*
8954   eval "ac_cv_func_$ac_func=yes"
8955 else
8956   echo "configure: failed program was:" >&5
8957   cat conftest.$ac_ext >&5
8958   rm -rf conftest*
8959   eval "ac_cv_func_$ac_func=no"
8960 fi
8961 rm -f conftest*
8962 fi
8963
8964 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8965   echo "$ac_t""yes" 1>&6
8966     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8967   cat >> confdefs.h <<EOF
8968 #define $ac_tr_func 1
8969 EOF
8970  
8971 else
8972   echo "$ac_t""no" 1>&6
8973 fi
8974 done
8975
8976
8977 if test $ac_cv_func_sigaction = no && test $ac_cv_func_sigaction = no ; then
8978         echo $ac_n "checking for sigset in -lV3""... $ac_c" 1>&6
8979 echo "configure:8980: checking for sigset in -lV3" >&5
8980 ac_lib_var=`echo V3'_'sigset | sed 'y%./+-:%__p__%'`
8981 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8982   echo $ac_n "(cached) $ac_c" 1>&6
8983 else
8984   ac_save_LIBS="$LIBS"
8985 LIBS="-lV3  $LIBS"
8986 cat > conftest.$ac_ext <<EOF
8987 #line 8988 "configure"
8988 #include "confdefs.h"
8989 /* Override any gcc2 internal prototype to avoid an error.  */
8990 /* We use char because int might match the return type of a gcc2
8991     builtin and then its argument prototype would still apply.  */
8992 char sigset();
8993
8994 int main() {
8995 sigset()
8996 ; return 0; }
8997 EOF
8998 if { (eval echo configure:8999: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8999   rm -rf conftest*
9000   eval "ac_cv_lib_$ac_lib_var=yes"
9001 else
9002   echo "configure: failed program was:" >&5
9003   cat conftest.$ac_ext >&5
9004   rm -rf conftest*
9005   eval "ac_cv_lib_$ac_lib_var=no"
9006 fi
9007 rm -f conftest*
9008 LIBS="$ac_save_LIBS"
9009
9010 fi
9011 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9012   echo "$ac_t""yes" 1>&6
9013     ac_tr_lib=HAVE_LIB`echo V3 | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9014     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9015   cat >> confdefs.h <<EOF
9016 #define $ac_tr_lib 1
9017 EOF
9018
9019   LIBS="-lV3 $LIBS"
9020
9021 else
9022   echo "$ac_t""no" 1>&6
9023 fi
9024
9025 fi
9026
9027 if test "$ac_cv_cygwin" != yes && test "$ac_cv_header_winsock_h" = yes; then
9028 echo $ac_n "checking for winsock""... $ac_c" 1>&6
9029 echo "configure:9030: checking for winsock" >&5
9030 if eval "test \"\${ol_cv_winsock+set}\" = set"; then
9031   echo $ac_n "(cached) $ac_c" 1>&6
9032 else
9033   save_LIBS="$LIBS"
9034 for curlib in ws2_32 wsock32; do
9035         LIBS="$LIBS -l$curlib"
9036         cat > conftest.$ac_ext <<EOF
9037 #line 9038 "configure"
9038 #include "confdefs.h"
9039 #include <winsock.h>
9040                         
9041 int main() {
9042
9043                         socket(0,0,0);
9044                         select(0,NULL,NULL,NULL,NULL);
9045                         closesocket(0);
9046                         gethostname(NULL,0);
9047                         
9048 ; return 0; }
9049 EOF
9050 if { (eval echo configure:9051: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9051   rm -rf conftest*
9052   ol_cv_winsock=yes
9053 else
9054   echo "configure: failed program was:" >&5
9055   cat conftest.$ac_ext >&5
9056   rm -rf conftest*
9057   ol_cv_winsock=no
9058 fi
9059 rm -f conftest*
9060
9061         if test $ol_cv_winsock = yes; then
9062                 cat >> confdefs.h <<\EOF
9063 #define HAVE_WINSOCK 1
9064 EOF
9065
9066                 ac_cv_func_socket=yes
9067                 ac_cv_func_select=yes
9068                 ac_cv_func_closesocket=yes
9069                 ac_cv_func_gethostname=yes
9070                 if test $curlib = ws2_32; then
9071                         ol_cv_winsock=winsock2
9072                         cat >> confdefs.h <<\EOF
9073 #define HAVE_WINSOCK2 1
9074 EOF
9075
9076                 fi
9077                 break
9078         fi
9079         LIBS="$save_LIBS"
9080 done
9081 fi
9082
9083 echo "$ac_t""$ol_cv_winsock" 1>&6
9084 fi
9085
9086
9087 echo $ac_n "checking for socket""... $ac_c" 1>&6
9088 echo "configure:9089: checking for socket" >&5
9089 if eval "test \"\${ac_cv_func_socket+set}\" = set"; then
9090   echo $ac_n "(cached) $ac_c" 1>&6
9091 else
9092   cat > conftest.$ac_ext <<EOF
9093 #line 9094 "configure"
9094 #include "confdefs.h"
9095 /* System header to define __stub macros and hopefully few prototypes,
9096     which can conflict with char socket(); below.  */
9097 #include <assert.h>
9098 /* Override any gcc2 internal prototype to avoid an error.  */
9099 /* We use char because int might match the return type of a gcc2
9100     builtin and then its argument prototype would still apply.  */
9101 char socket();
9102 char (*f)();
9103
9104 int main() {
9105
9106 /* The GNU C library defines this for functions which it implements
9107     to always fail with ENOSYS.  Some functions are actually named
9108     something starting with __ and the normal name is an alias.  */
9109 #if defined (__stub_socket) || defined (__stub___socket)
9110 choke me
9111 #else
9112 f = socket;
9113 #endif
9114
9115 ; return 0; }
9116 EOF
9117 if { (eval echo configure:9118: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9118   rm -rf conftest*
9119   eval "ac_cv_func_socket=yes"
9120 else
9121   echo "configure: failed program was:" >&5
9122   cat conftest.$ac_ext >&5
9123   rm -rf conftest*
9124   eval "ac_cv_func_socket=no"
9125 fi
9126 rm -f conftest*
9127 fi
9128
9129 if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
9130   echo "$ac_t""yes" 1>&6
9131   :
9132 else
9133   echo "$ac_t""no" 1>&6
9134         
9135         echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6
9136 echo "configure:9137: checking for main in -lsocket" >&5
9137 ac_lib_var=`echo socket'_'main | sed 'y%./+-:%__p__%'`
9138 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9139   echo $ac_n "(cached) $ac_c" 1>&6
9140 else
9141   ac_save_LIBS="$LIBS"
9142 LIBS="-lsocket  $LIBS"
9143 cat > conftest.$ac_ext <<EOF
9144 #line 9145 "configure"
9145 #include "confdefs.h"
9146
9147 int main() {
9148 main()
9149 ; return 0; }
9150 EOF
9151 if { (eval echo configure:9152: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9152   rm -rf conftest*
9153   eval "ac_cv_lib_$ac_lib_var=yes"
9154 else
9155   echo "configure: failed program was:" >&5
9156   cat conftest.$ac_ext >&5
9157   rm -rf conftest*
9158   eval "ac_cv_lib_$ac_lib_var=no"
9159 fi
9160 rm -f conftest*
9161 LIBS="$ac_save_LIBS"
9162
9163 fi
9164 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9165   echo "$ac_t""yes" 1>&6
9166     ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9167     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9168   cat >> confdefs.h <<EOF
9169 #define $ac_tr_lib 1
9170 EOF
9171
9172   LIBS="-lsocket $LIBS"
9173
9174 else
9175   echo "$ac_t""no" 1>&6
9176 fi
9177
9178         echo $ac_n "checking for main in -lnet""... $ac_c" 1>&6
9179 echo "configure:9180: checking for main in -lnet" >&5
9180 ac_lib_var=`echo net'_'main | sed 'y%./+-:%__p__%'`
9181 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9182   echo $ac_n "(cached) $ac_c" 1>&6
9183 else
9184   ac_save_LIBS="$LIBS"
9185 LIBS="-lnet  $LIBS"
9186 cat > conftest.$ac_ext <<EOF
9187 #line 9188 "configure"
9188 #include "confdefs.h"
9189
9190 int main() {
9191 main()
9192 ; return 0; }
9193 EOF
9194 if { (eval echo configure:9195: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9195   rm -rf conftest*
9196   eval "ac_cv_lib_$ac_lib_var=yes"
9197 else
9198   echo "configure: failed program was:" >&5
9199   cat conftest.$ac_ext >&5
9200   rm -rf conftest*
9201   eval "ac_cv_lib_$ac_lib_var=no"
9202 fi
9203 rm -f conftest*
9204 LIBS="$ac_save_LIBS"
9205
9206 fi
9207 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9208   echo "$ac_t""yes" 1>&6
9209     ac_tr_lib=HAVE_LIB`echo net | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9210     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9211   cat >> confdefs.h <<EOF
9212 #define $ac_tr_lib 1
9213 EOF
9214
9215   LIBS="-lnet $LIBS"
9216
9217 else
9218   echo "$ac_t""no" 1>&6
9219 fi
9220
9221         echo $ac_n "checking for main in -lnsl_s""... $ac_c" 1>&6
9222 echo "configure:9223: checking for main in -lnsl_s" >&5
9223 ac_lib_var=`echo nsl_s'_'main | sed 'y%./+-:%__p__%'`
9224 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9225   echo $ac_n "(cached) $ac_c" 1>&6
9226 else
9227   ac_save_LIBS="$LIBS"
9228 LIBS="-lnsl_s  $LIBS"
9229 cat > conftest.$ac_ext <<EOF
9230 #line 9231 "configure"
9231 #include "confdefs.h"
9232
9233 int main() {
9234 main()
9235 ; return 0; }
9236 EOF
9237 if { (eval echo configure:9238: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9238   rm -rf conftest*
9239   eval "ac_cv_lib_$ac_lib_var=yes"
9240 else
9241   echo "configure: failed program was:" >&5
9242   cat conftest.$ac_ext >&5
9243   rm -rf conftest*
9244   eval "ac_cv_lib_$ac_lib_var=no"
9245 fi
9246 rm -f conftest*
9247 LIBS="$ac_save_LIBS"
9248
9249 fi
9250 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9251   echo "$ac_t""yes" 1>&6
9252     ac_tr_lib=HAVE_LIB`echo nsl_s | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9253     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9254   cat >> confdefs.h <<EOF
9255 #define $ac_tr_lib 1
9256 EOF
9257
9258   LIBS="-lnsl_s $LIBS"
9259
9260 else
9261   echo "$ac_t""no" 1>&6
9262 fi
9263
9264         echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
9265 echo "configure:9266: checking for main in -lnsl" >&5
9266 ac_lib_var=`echo nsl'_'main | sed 'y%./+-:%__p__%'`
9267 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9268   echo $ac_n "(cached) $ac_c" 1>&6
9269 else
9270   ac_save_LIBS="$LIBS"
9271 LIBS="-lnsl  $LIBS"
9272 cat > conftest.$ac_ext <<EOF
9273 #line 9274 "configure"
9274 #include "confdefs.h"
9275
9276 int main() {
9277 main()
9278 ; return 0; }
9279 EOF
9280 if { (eval echo configure:9281: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9281   rm -rf conftest*
9282   eval "ac_cv_lib_$ac_lib_var=yes"
9283 else
9284   echo "configure: failed program was:" >&5
9285   cat conftest.$ac_ext >&5
9286   rm -rf conftest*
9287   eval "ac_cv_lib_$ac_lib_var=no"
9288 fi
9289 rm -f conftest*
9290 LIBS="$ac_save_LIBS"
9291
9292 fi
9293 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9294   echo "$ac_t""yes" 1>&6
9295     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9296     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9297   cat >> confdefs.h <<EOF
9298 #define $ac_tr_lib 1
9299 EOF
9300
9301   LIBS="-lnsl $LIBS"
9302
9303 else
9304   echo "$ac_t""no" 1>&6
9305 fi
9306
9307         echo $ac_n "checking for socket in -linet""... $ac_c" 1>&6
9308 echo "configure:9309: checking for socket in -linet" >&5
9309 ac_lib_var=`echo inet'_'socket | sed 'y%./+-:%__p__%'`
9310 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9311   echo $ac_n "(cached) $ac_c" 1>&6
9312 else
9313   ac_save_LIBS="$LIBS"
9314 LIBS="-linet  $LIBS"
9315 cat > conftest.$ac_ext <<EOF
9316 #line 9317 "configure"
9317 #include "confdefs.h"
9318 /* Override any gcc2 internal prototype to avoid an error.  */
9319 /* We use char because int might match the return type of a gcc2
9320     builtin and then its argument prototype would still apply.  */
9321 char socket();
9322
9323 int main() {
9324 socket()
9325 ; return 0; }
9326 EOF
9327 if { (eval echo configure:9328: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9328   rm -rf conftest*
9329   eval "ac_cv_lib_$ac_lib_var=yes"
9330 else
9331   echo "configure: failed program was:" >&5
9332   cat conftest.$ac_ext >&5
9333   rm -rf conftest*
9334   eval "ac_cv_lib_$ac_lib_var=no"
9335 fi
9336 rm -f conftest*
9337 LIBS="$ac_save_LIBS"
9338
9339 fi
9340 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9341   echo "$ac_t""yes" 1>&6
9342     ac_tr_lib=HAVE_LIB`echo inet | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9343     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9344   cat >> confdefs.h <<EOF
9345 #define $ac_tr_lib 1
9346 EOF
9347
9348   LIBS="-linet $LIBS"
9349
9350 else
9351   echo "$ac_t""no" 1>&6
9352 fi
9353
9354         echo $ac_n "checking for main in -lgen""... $ac_c" 1>&6
9355 echo "configure:9356: checking for main in -lgen" >&5
9356 ac_lib_var=`echo gen'_'main | sed 'y%./+-:%__p__%'`
9357 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9358   echo $ac_n "(cached) $ac_c" 1>&6
9359 else
9360   ac_save_LIBS="$LIBS"
9361 LIBS="-lgen  $LIBS"
9362 cat > conftest.$ac_ext <<EOF
9363 #line 9364 "configure"
9364 #include "confdefs.h"
9365
9366 int main() {
9367 main()
9368 ; return 0; }
9369 EOF
9370 if { (eval echo configure:9371: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9371   rm -rf conftest*
9372   eval "ac_cv_lib_$ac_lib_var=yes"
9373 else
9374   echo "configure: failed program was:" >&5
9375   cat conftest.$ac_ext >&5
9376   rm -rf conftest*
9377   eval "ac_cv_lib_$ac_lib_var=no"
9378 fi
9379 rm -f conftest*
9380 LIBS="$ac_save_LIBS"
9381
9382 fi
9383 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9384   echo "$ac_t""yes" 1>&6
9385     ac_tr_lib=HAVE_LIB`echo gen | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9386     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9387   cat >> confdefs.h <<EOF
9388 #define $ac_tr_lib 1
9389 EOF
9390
9391   LIBS="-lgen $LIBS"
9392
9393 else
9394   echo "$ac_t""no" 1>&6
9395 fi
9396
9397
9398 fi
9399
9400
9401 echo $ac_n "checking for select""... $ac_c" 1>&6
9402 echo "configure:9403: checking for select" >&5
9403 if eval "test \"\${ac_cv_func_select+set}\" = set"; then
9404   echo $ac_n "(cached) $ac_c" 1>&6
9405 else
9406   cat > conftest.$ac_ext <<EOF
9407 #line 9408 "configure"
9408 #include "confdefs.h"
9409 /* System header to define __stub macros and hopefully few prototypes,
9410     which can conflict with char select(); below.  */
9411 #include <assert.h>
9412 /* Override any gcc2 internal prototype to avoid an error.  */
9413 /* We use char because int might match the return type of a gcc2
9414     builtin and then its argument prototype would still apply.  */
9415 char select();
9416 char (*f)();
9417
9418 int main() {
9419
9420 /* The GNU C library defines this for functions which it implements
9421     to always fail with ENOSYS.  Some functions are actually named
9422     something starting with __ and the normal name is an alias.  */
9423 #if defined (__stub_select) || defined (__stub___select)
9424 choke me
9425 #else
9426 f = select;
9427 #endif
9428
9429 ; return 0; }
9430 EOF
9431 if { (eval echo configure:9432: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9432   rm -rf conftest*
9433   eval "ac_cv_func_select=yes"
9434 else
9435   echo "configure: failed program was:" >&5
9436   cat conftest.$ac_ext >&5
9437   rm -rf conftest*
9438   eval "ac_cv_func_select=no"
9439 fi
9440 rm -f conftest*
9441 fi
9442
9443 if eval "test \"`echo '$ac_cv_func_'select`\" = yes"; then
9444   echo "$ac_t""yes" 1>&6
9445   :
9446 else
9447   echo "$ac_t""no" 1>&6
9448 { echo "configure: error: select() required." 1>&2; exit 1; }
9449 fi
9450
9451
9452 if test "${ac_cv_header_winsock_h}" != yes; then
9453                                 echo $ac_n "checking types of arguments for select()""... $ac_c" 1>&6
9454 echo "configure:9455: checking types of arguments for select()" >&5
9455  if eval "test \"\${ac_cv_func_select_arg234+set}\" = set"; then
9456   echo $ac_n "(cached) $ac_c" 1>&6
9457 else
9458    if eval "test \"\${ac_cv_func_select_arg1+set}\" = set"; then
9459   echo $ac_n "(cached) $ac_c" 1>&6
9460 else
9461     if eval "test \"\${ac_cv_func_select_arg5+set}\" = set"; then
9462   echo $ac_n "(cached) $ac_c" 1>&6
9463 else
9464      for ac_cv_func_select_arg234 in 'fd_set *' 'int *' 'void *'; do
9465      for ac_cv_func_select_arg1 in 'int' 'size_t' 'unsigned long' 'unsigned'; do
9466       for ac_cv_func_select_arg5 in 'struct timeval *' 'const struct timeval *'; do
9467        cat > conftest.$ac_ext <<EOF
9468 #line 9469 "configure"
9469 #include "confdefs.h"
9470 #ifdef HAVE_SYS_TYPES_H
9471 #include <sys/types.h>
9472 #endif
9473 #ifdef HAVE_SYS_TIME_H
9474 #include <sys/time.h>
9475 #endif
9476 #ifdef HAVE_SYS_SELECT_H
9477 #include <sys/select.h>
9478 #endif
9479 #ifdef HAVE_SYS_SOCKET_H
9480 #include <sys/socket.h>
9481 #endif
9482 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);
9483 int main() {
9484
9485 ; return 0; }
9486 EOF
9487 if { (eval echo configure:9488: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9488   rm -rf conftest*
9489           ac_not_found=no ; break 3
9490 else
9491   echo "configure: failed program was:" >&5
9492   cat conftest.$ac_ext >&5
9493   rm -rf conftest*
9494   ac_not_found=yes
9495 fi
9496 rm -f conftest*
9497       done
9498      done
9499     done
9500    
9501 fi
9502   
9503 fi
9504  
9505 fi
9506  if test "$ac_not_found" = yes; then
9507   ac_cv_func_select_arg1=int 
9508   ac_cv_func_select_arg234='int *' 
9509   ac_cv_func_select_arg5='struct timeval *'
9510  fi
9511  echo "$ac_t""$ac_cv_func_select_arg1,$ac_cv_func_select_arg234,$ac_cv_func_select_arg5" 1>&6
9512  cat >> confdefs.h <<EOF
9513 #define SELECT_TYPE_ARG1 $ac_cv_func_select_arg1
9514 EOF
9515
9516  cat >> confdefs.h <<EOF
9517 #define SELECT_TYPE_ARG234 ($ac_cv_func_select_arg234)
9518 EOF
9519
9520  cat >> confdefs.h <<EOF
9521 #define SELECT_TYPE_ARG5 ($ac_cv_func_select_arg5)
9522 EOF
9523
9524
9525 fi
9526
9527
9528 for ac_func in poll 
9529 do
9530 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9531 echo "configure:9532: checking for $ac_func" >&5
9532 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
9533   echo $ac_n "(cached) $ac_c" 1>&6
9534 else
9535   cat > conftest.$ac_ext <<EOF
9536 #line 9537 "configure"
9537 #include "confdefs.h"
9538 /* System header to define __stub macros and hopefully few prototypes,
9539     which can conflict with char $ac_func(); below.  */
9540 #include <assert.h>
9541 /* Override any gcc2 internal prototype to avoid an error.  */
9542 /* We use char because int might match the return type of a gcc2
9543     builtin and then its argument prototype would still apply.  */
9544 char $ac_func();
9545 char (*f)();
9546
9547 int main() {
9548
9549 /* The GNU C library defines this for functions which it implements
9550     to always fail with ENOSYS.  Some functions are actually named
9551     something starting with __ and the normal name is an alias.  */
9552 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9553 choke me
9554 #else
9555 f = $ac_func;
9556 #endif
9557
9558 ; return 0; }
9559 EOF
9560 if { (eval echo configure:9561: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9561   rm -rf conftest*
9562   eval "ac_cv_func_$ac_func=yes"
9563 else
9564   echo "configure: failed program was:" >&5
9565   cat conftest.$ac_ext >&5
9566   rm -rf conftest*
9567   eval "ac_cv_func_$ac_func=no"
9568 fi
9569 rm -f conftest*
9570 fi
9571
9572 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9573   echo "$ac_t""yes" 1>&6
9574     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9575   cat >> confdefs.h <<EOF
9576 #define $ac_tr_func 1
9577 EOF
9578  
9579 else
9580   echo "$ac_t""no" 1>&6
9581 fi
9582 done
9583
9584 for ac_hdr in poll.h 
9585 do
9586 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9587 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9588 echo "configure:9589: checking for $ac_hdr" >&5
9589 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9590   echo $ac_n "(cached) $ac_c" 1>&6
9591 else
9592   cat > conftest.$ac_ext <<EOF
9593 #line 9594 "configure"
9594 #include "confdefs.h"
9595 #include <$ac_hdr>
9596 EOF
9597 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9598 { (eval echo configure:9599: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9599 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9600 if test -z "$ac_err"; then
9601   rm -rf conftest*
9602   eval "ac_cv_header_$ac_safe=yes"
9603 else
9604   echo "$ac_err" >&5
9605   echo "configure: failed program was:" >&5
9606   cat conftest.$ac_ext >&5
9607   rm -rf conftest*
9608   eval "ac_cv_header_$ac_safe=no"
9609 fi
9610 rm -f conftest*
9611 fi
9612 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9613   echo "$ac_t""yes" 1>&6
9614     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9615   cat >> confdefs.h <<EOF
9616 #define $ac_tr_hdr 1
9617 EOF
9618  
9619 else
9620   echo "$ac_t""no" 1>&6
9621 fi
9622 done
9623
9624
9625 for ac_hdr in sys/epoll.h 
9626 do
9627 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9628 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9629 echo "configure:9630: checking for $ac_hdr" >&5
9630 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9631   echo $ac_n "(cached) $ac_c" 1>&6
9632 else
9633   cat > conftest.$ac_ext <<EOF
9634 #line 9635 "configure"
9635 #include "confdefs.h"
9636 #include <$ac_hdr>
9637 EOF
9638 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9639 { (eval echo configure:9640: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9640 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9641 if test -z "$ac_err"; then
9642   rm -rf conftest*
9643   eval "ac_cv_header_$ac_safe=yes"
9644 else
9645   echo "$ac_err" >&5
9646   echo "configure: failed program was:" >&5
9647   cat conftest.$ac_ext >&5
9648   rm -rf conftest*
9649   eval "ac_cv_header_$ac_safe=no"
9650 fi
9651 rm -f conftest*
9652 fi
9653 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9654   echo "$ac_t""yes" 1>&6
9655     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9656   cat >> confdefs.h <<EOF
9657 #define $ac_tr_hdr 1
9658 EOF
9659  
9660 else
9661   echo "$ac_t""no" 1>&6
9662 fi
9663 done
9664
9665 if test "${ac_cv_header_sys_epoll_h}" = yes; then
9666 echo $ac_n "checking for epoll system call""... $ac_c" 1>&6
9667 echo "configure:9668: checking for epoll system call" >&5
9668 if test "$cross_compiling" = yes; then
9669   echo "$ac_t""no" 1>&6
9670 else
9671   cat > conftest.$ac_ext <<EOF
9672 #line 9673 "configure"
9673 #include "confdefs.h"
9674 int main(int argc, char *argv)
9675 {
9676         int epfd = epoll_create(256);
9677         exit (epfd == -1 ? 1 : 0);
9678 }
9679 EOF
9680 if { (eval echo configure:9681: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
9681 then
9682   echo "$ac_t""yes" 1>&6
9683 cat >> confdefs.h <<\EOF
9684 #define HAVE_EPOLL 1
9685 EOF
9686
9687 else
9688   echo "configure: failed program was:" >&5
9689   cat conftest.$ac_ext >&5
9690   rm -fr conftest*
9691   echo "$ac_t""no" 1>&6
9692 fi
9693 rm -fr conftest*
9694 fi
9695
9696 fi
9697
9698 # strerror checks
9699 echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6
9700 echo "configure:9701: checking declaration of sys_errlist" >&5
9701 if eval "test \"\${ol_cv_dcl_sys_errlist+set}\" = set"; then
9702   echo $ac_n "(cached) $ac_c" 1>&6
9703 else
9704   
9705         cat > conftest.$ac_ext <<EOF
9706 #line 9707 "configure"
9707 #include "confdefs.h"
9708
9709 #include <stdio.h>
9710 #include <sys/types.h>
9711 #include <errno.h>
9712 #ifdef WINNT
9713 #include <stdlib.h>
9714 #endif 
9715 int main() {
9716 char *c = (char *) *sys_errlist
9717 ; return 0; }
9718 EOF
9719 if { (eval echo configure:9720: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9720   rm -rf conftest*
9721   ol_cv_dcl_sys_errlist=yes
9722         ol_cv_have_sys_errlist=yes
9723 else
9724   echo "configure: failed program was:" >&5
9725   cat conftest.$ac_ext >&5
9726   rm -rf conftest*
9727   ol_cv_dcl_sys_errlist=no
9728 fi
9729 rm -f conftest*
9730 fi
9731
9732 echo "$ac_t""$ol_cv_dcl_sys_errlist" 1>&6
9733 #
9734 # It's possible (for near-UNIX clones) that sys_errlist doesn't exist
9735 if test $ol_cv_dcl_sys_errlist = no ; then
9736         cat >> confdefs.h <<\EOF
9737 #define DECL_SYS_ERRLIST 1
9738 EOF
9739
9740
9741         echo $ac_n "checking existence of sys_errlist""... $ac_c" 1>&6
9742 echo "configure:9743: checking existence of sys_errlist" >&5
9743 if eval "test \"\${ol_cv_have_sys_errlist+set}\" = set"; then
9744   echo $ac_n "(cached) $ac_c" 1>&6
9745 else
9746   
9747                 cat > conftest.$ac_ext <<EOF
9748 #line 9749 "configure"
9749 #include "confdefs.h"
9750 #include <errno.h>
9751 int main() {
9752 char *c = (char *) *sys_errlist
9753 ; return 0; }
9754 EOF
9755 if { (eval echo configure:9756: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9756   rm -rf conftest*
9757   ol_cv_have_sys_errlist=yes
9758 else
9759   echo "configure: failed program was:" >&5
9760   cat conftest.$ac_ext >&5
9761   rm -rf conftest*
9762   ol_cv_have_sys_errlist=no
9763 fi
9764 rm -f conftest*
9765 fi
9766
9767 echo "$ac_t""$ol_cv_have_sys_errlist" 1>&6
9768 fi
9769 if test $ol_cv_have_sys_errlist = yes ; then
9770         cat >> confdefs.h <<\EOF
9771 #define HAVE_SYS_ERRLIST 1
9772 EOF
9773
9774 fi
9775  for ac_func in strerror strerror_r
9776 do
9777 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9778 echo "configure:9779: checking for $ac_func" >&5
9779 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
9780   echo $ac_n "(cached) $ac_c" 1>&6
9781 else
9782   cat > conftest.$ac_ext <<EOF
9783 #line 9784 "configure"
9784 #include "confdefs.h"
9785 /* System header to define __stub macros and hopefully few prototypes,
9786     which can conflict with char $ac_func(); below.  */
9787 #include <assert.h>
9788 /* Override any gcc2 internal prototype to avoid an error.  */
9789 /* We use char because int might match the return type of a gcc2
9790     builtin and then its argument prototype would still apply.  */
9791 char $ac_func();
9792 char (*f)();
9793
9794 int main() {
9795
9796 /* The GNU C library defines this for functions which it implements
9797     to always fail with ENOSYS.  Some functions are actually named
9798     something starting with __ and the normal name is an alias.  */
9799 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9800 choke me
9801 #else
9802 f = $ac_func;
9803 #endif
9804
9805 ; return 0; }
9806 EOF
9807 if { (eval echo configure:9808: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9808   rm -rf conftest*
9809   eval "ac_cv_func_$ac_func=yes"
9810 else
9811   echo "configure: failed program was:" >&5
9812   cat conftest.$ac_ext >&5
9813   rm -rf conftest*
9814   eval "ac_cv_func_$ac_func=no"
9815 fi
9816 rm -f conftest*
9817 fi
9818
9819 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9820   echo "$ac_t""yes" 1>&6
9821     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9822   cat >> confdefs.h <<EOF
9823 #define $ac_tr_func 1
9824 EOF
9825  
9826 else
9827   echo "$ac_t""no" 1>&6
9828 fi
9829 done
9830
9831 ol_cv_func_strerror_r=no
9832 if test "${ac_cv_func_strerror_r}" = yes ; then
9833         echo $ac_n "checking non-posix strerror_r""... $ac_c" 1>&6
9834 echo "configure:9835: checking non-posix strerror_r" >&5
9835 if eval "test \"\${ol_cv_nonposix_strerror_r+set}\" = set"; then
9836   echo $ac_n "(cached) $ac_c" 1>&6
9837 else
9838   
9839         cat > conftest.$ac_ext <<EOF
9840 #line 9841 "configure"
9841 #include "confdefs.h"
9842 #include <string.h>
9843 EOF
9844 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9845   egrep "strerror_r" >/dev/null 2>&1; then
9846   rm -rf conftest*
9847   ol_decl_strerror_r=yes
9848 else
9849   rm -rf conftest*
9850   ol_decl_strerror_r=no
9851 fi
9852 rm -f conftest*
9853
9854         if test $ol_decl_strerror_r = yes ; then
9855                 cat > conftest.$ac_ext <<EOF
9856 #line 9857 "configure"
9857 #include "confdefs.h"
9858 #include <string.h>
9859 int main() {
9860    /* from autoconf 2.59 */
9861                                 char buf[100];
9862                                 char x = *strerror_r (0, buf, sizeof buf);
9863                                 char *p = strerror_r (0, buf, sizeof buf);
9864                         
9865 ; return 0; }
9866 EOF
9867 if { (eval echo configure:9868: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9868   rm -rf conftest*
9869   ol_cv_nonposix_strerror_r=yes
9870 else
9871   echo "configure: failed program was:" >&5
9872   cat conftest.$ac_ext >&5
9873   rm -rf conftest*
9874   ol_cv_nonposix_strerror_r=no
9875 fi
9876 rm -f conftest*
9877         else
9878                 if test "$cross_compiling" = yes; then
9879   ol_cv_nonposix_strerror=no
9880 else
9881   cat > conftest.$ac_ext <<EOF
9882 #line 9883 "configure"
9883 #include "confdefs.h"
9884
9885                         main() {
9886                                 char buf[100];
9887                                 buf[0] = 0;
9888                                 strerror_r( 1, buf, sizeof buf );
9889                                 exit( buf[0] == 0 );
9890                         }
9891                         
9892 EOF
9893 if { (eval echo configure:9894: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
9894 then
9895   ol_cv_nonposix_strerror_r=yes
9896 else
9897   echo "configure: failed program was:" >&5
9898   cat conftest.$ac_ext >&5
9899   rm -fr conftest*
9900   ol_cv_nonposix_strerror=no
9901 fi
9902 rm -fr conftest*
9903 fi
9904
9905         fi
9906         
9907 fi
9908
9909 echo "$ac_t""$ol_cv_nonposix_strerror_r" 1>&6
9910 if test $ol_cv_nonposix_strerror_r = yes ; then
9911         cat >> confdefs.h <<\EOF
9912 #define HAVE_NONPOSIX_STRERROR_R 1
9913 EOF
9914
9915 fi
9916
9917 elif test "${ac_cv_func_strerror}" = no ; then
9918         echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6
9919 echo "configure:9920: checking declaration of sys_errlist" >&5
9920 if eval "test \"\${ol_cv_dcl_sys_errlist+set}\" = set"; then
9921   echo $ac_n "(cached) $ac_c" 1>&6
9922 else
9923   
9924         cat > conftest.$ac_ext <<EOF
9925 #line 9926 "configure"
9926 #include "confdefs.h"
9927
9928 #include <stdio.h>
9929 #include <sys/types.h>
9930 #include <errno.h>
9931 #ifdef WINNT
9932 #include <stdlib.h>
9933 #endif 
9934 int main() {
9935 char *c = (char *) *sys_errlist
9936 ; return 0; }
9937 EOF
9938 if { (eval echo configure:9939: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9939   rm -rf conftest*
9940   ol_cv_dcl_sys_errlist=yes
9941         ol_cv_have_sys_errlist=yes
9942 else
9943   echo "configure: failed program was:" >&5
9944   cat conftest.$ac_ext >&5
9945   rm -rf conftest*
9946   ol_cv_dcl_sys_errlist=no
9947 fi
9948 rm -f conftest*
9949 fi
9950
9951 echo "$ac_t""$ol_cv_dcl_sys_errlist" 1>&6
9952 #
9953 # It's possible (for near-UNIX clones) that sys_errlist doesn't exist
9954 if test $ol_cv_dcl_sys_errlist = no ; then
9955         cat >> confdefs.h <<\EOF
9956 #define DECL_SYS_ERRLIST 1
9957 EOF
9958
9959
9960         echo $ac_n "checking existence of sys_errlist""... $ac_c" 1>&6
9961 echo "configure:9962: checking existence of sys_errlist" >&5
9962 if eval "test \"\${ol_cv_have_sys_errlist+set}\" = set"; then
9963   echo $ac_n "(cached) $ac_c" 1>&6
9964 else
9965   
9966                 cat > conftest.$ac_ext <<EOF
9967 #line 9968 "configure"
9968 #include "confdefs.h"
9969 #include <errno.h>
9970 int main() {
9971 char *c = (char *) *sys_errlist
9972 ; return 0; }
9973 EOF
9974 if { (eval echo configure:9975: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9975   rm -rf conftest*
9976   ol_cv_have_sys_errlist=yes
9977 else
9978   echo "configure: failed program was:" >&5
9979   cat conftest.$ac_ext >&5
9980   rm -rf conftest*
9981   ol_cv_have_sys_errlist=no
9982 fi
9983 rm -f conftest*
9984 fi
9985
9986 echo "$ac_t""$ol_cv_have_sys_errlist" 1>&6
9987 fi
9988 if test $ol_cv_have_sys_errlist = yes ; then
9989         cat >> confdefs.h <<\EOF
9990 #define HAVE_SYS_ERRLIST 1
9991 EOF
9992
9993 fi
9994
9995 fi
9996
9997
9998 for ac_hdr in regex.h 
9999 do
10000 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10001 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10002 echo "configure:10003: checking for $ac_hdr" >&5
10003 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10004   echo $ac_n "(cached) $ac_c" 1>&6
10005 else
10006   cat > conftest.$ac_ext <<EOF
10007 #line 10008 "configure"
10008 #include "confdefs.h"
10009 #include <$ac_hdr>
10010 EOF
10011 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10012 { (eval echo configure:10013: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10013 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10014 if test -z "$ac_err"; then
10015   rm -rf conftest*
10016   eval "ac_cv_header_$ac_safe=yes"
10017 else
10018   echo "$ac_err" >&5
10019   echo "configure: failed program was:" >&5
10020   cat conftest.$ac_ext >&5
10021   rm -rf conftest*
10022   eval "ac_cv_header_$ac_safe=no"
10023 fi
10024 rm -f conftest*
10025 fi
10026 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10027   echo "$ac_t""yes" 1>&6
10028     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10029   cat >> confdefs.h <<EOF
10030 #define $ac_tr_hdr 1
10031 EOF
10032  
10033 else
10034   echo "$ac_t""no" 1>&6
10035 fi
10036 done
10037
10038 if test "$ac_cv_header_regex_h" != yes ; then
10039         { echo "configure: error: POSIX regex.h required." 1>&2; exit 1; }
10040 fi
10041
10042 echo $ac_n "checking for library containing regfree""... $ac_c" 1>&6
10043 echo "configure:10044: checking for library containing regfree" >&5
10044 if eval "test \"\${ac_cv_search_regfree+set}\" = set"; then
10045   echo $ac_n "(cached) $ac_c" 1>&6
10046 else
10047   ac_func_search_save_LIBS="$LIBS"
10048 ac_cv_search_regfree="no"
10049 cat > conftest.$ac_ext <<EOF
10050 #line 10051 "configure"
10051 #include "confdefs.h"
10052 /* Override any gcc2 internal prototype to avoid an error.  */
10053 /* We use char because int might match the return type of a gcc2
10054     builtin and then its argument prototype would still apply.  */
10055 char regfree();
10056
10057 int main() {
10058 regfree()
10059 ; return 0; }
10060 EOF
10061 if { (eval echo configure:10062: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10062   rm -rf conftest*
10063   ac_cv_search_regfree="none required"
10064 else
10065   echo "configure: failed program was:" >&5
10066   cat conftest.$ac_ext >&5
10067 fi
10068 rm -f conftest*
10069 test "$ac_cv_search_regfree" = "no" && for ac_lib in regex gnuregex; do
10070 LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
10071 cat > conftest.$ac_ext <<EOF
10072 #line 10073 "configure"
10073 #include "confdefs.h"
10074 /* Override any gcc2 internal prototype to avoid an error.  */
10075 /* We use char because int might match the return type of a gcc2
10076     builtin and then its argument prototype would still apply.  */
10077 char regfree();
10078
10079 int main() {
10080 regfree()
10081 ; return 0; }
10082 EOF
10083 if { (eval echo configure:10084: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10084   rm -rf conftest*
10085   ac_cv_search_regfree="-l$ac_lib"
10086 break
10087 else
10088   echo "configure: failed program was:" >&5
10089   cat conftest.$ac_ext >&5
10090 fi
10091 rm -f conftest*
10092 done
10093 LIBS="$ac_func_search_save_LIBS"
10094 fi
10095
10096 echo "$ac_t""$ac_cv_search_regfree" 1>&6
10097 if test "$ac_cv_search_regfree" != "no"; then
10098   test "$ac_cv_search_regfree" = "none required" || LIBS="$ac_cv_search_regfree $LIBS"
10099   :
10100 else :
10101   { echo "configure: error: POSIX regex required." 1>&2; exit 1; }
10102 fi
10103
10104
10105 echo $ac_n "checking for compatible POSIX regex""... $ac_c" 1>&6
10106 echo "configure:10107: checking for compatible POSIX regex" >&5
10107 if eval "test \"\${ol_cv_c_posix_regex+set}\" = set"; then
10108   echo $ac_n "(cached) $ac_c" 1>&6
10109 else
10110   
10111         if test "$cross_compiling" = yes; then
10112   ol_cv_c_posix_regex=cross
10113 else
10114   cat > conftest.$ac_ext <<EOF
10115 #line 10116 "configure"
10116 #include "confdefs.h"
10117
10118 #include <sys/types.h>
10119 #include <regex.h>
10120 static char *pattern, *string;
10121 main()
10122 {
10123         int rc;
10124         regex_t re;
10125
10126         pattern = "^A";
10127
10128         if(regcomp(&re, pattern, 0)) {
10129                 return -1;
10130         }
10131         
10132         string = "ALL MATCH";
10133         
10134         rc = regexec(&re, string, 0, (void*)0, 0);
10135
10136         regfree(&re);
10137
10138         return rc;
10139 }
10140 EOF
10141 if { (eval echo configure:10142: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
10142 then
10143   ol_cv_c_posix_regex=yes
10144 else
10145   echo "configure: failed program was:" >&5
10146   cat conftest.$ac_ext >&5
10147   rm -fr conftest*
10148   ol_cv_c_posix_regex=no
10149 fi
10150 rm -fr conftest*
10151 fi
10152
10153 fi
10154
10155 echo "$ac_t""$ol_cv_c_posix_regex" 1>&6
10156
10157 if test "$ol_cv_c_posix_regex" = no ; then
10158         { echo "configure: error: broken POSIX regex!" 1>&2; exit 1; }
10159 fi
10160
10161
10162 have_uuid=no
10163 for ac_hdr in sys/uuid.h
10164 do
10165 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10166 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10167 echo "configure:10168: checking for $ac_hdr" >&5
10168 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10169   echo $ac_n "(cached) $ac_c" 1>&6
10170 else
10171   cat > conftest.$ac_ext <<EOF
10172 #line 10173 "configure"
10173 #include "confdefs.h"
10174 #include <$ac_hdr>
10175 EOF
10176 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10177 { (eval echo configure:10178: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10178 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10179 if test -z "$ac_err"; then
10180   rm -rf conftest*
10181   eval "ac_cv_header_$ac_safe=yes"
10182 else
10183   echo "$ac_err" >&5
10184   echo "configure: failed program was:" >&5
10185   cat conftest.$ac_ext >&5
10186   rm -rf conftest*
10187   eval "ac_cv_header_$ac_safe=no"
10188 fi
10189 rm -f conftest*
10190 fi
10191 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10192   echo "$ac_t""yes" 1>&6
10193     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10194   cat >> confdefs.h <<EOF
10195 #define $ac_tr_hdr 1
10196 EOF
10197  
10198 else
10199   echo "$ac_t""no" 1>&6
10200 fi
10201 done
10202
10203 if test $ac_cv_header_sys_uuid_h = yes ; then
10204         save_LIBS="$LIBS"
10205         
10206 echo $ac_n "checking for library containing uuid_to_str""... $ac_c" 1>&6
10207 echo "configure:10208: checking for library containing uuid_to_str" >&5
10208 if eval "test \"\${ac_cv_search_uuid_to_str+set}\" = set"; then
10209   echo $ac_n "(cached) $ac_c" 1>&6
10210 else
10211   ac_func_search_save_LIBS="$LIBS"
10212 ac_cv_search_uuid_to_str="no"
10213 cat > conftest.$ac_ext <<EOF
10214 #line 10215 "configure"
10215 #include "confdefs.h"
10216 /* Override any gcc2 internal prototype to avoid an error.  */
10217 /* We use char because int might match the return type of a gcc2
10218     builtin and then its argument prototype would still apply.  */
10219 char uuid_to_str();
10220
10221 int main() {
10222 uuid_to_str()
10223 ; return 0; }
10224 EOF
10225 if { (eval echo configure:10226: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10226   rm -rf conftest*
10227   ac_cv_search_uuid_to_str="none required"
10228 else
10229   echo "configure: failed program was:" >&5
10230   cat conftest.$ac_ext >&5
10231 fi
10232 rm -f conftest*
10233 test "$ac_cv_search_uuid_to_str" = "no" && for ac_lib in uuid; do
10234 LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
10235 cat > conftest.$ac_ext <<EOF
10236 #line 10237 "configure"
10237 #include "confdefs.h"
10238 /* Override any gcc2 internal prototype to avoid an error.  */
10239 /* We use char because int might match the return type of a gcc2
10240     builtin and then its argument prototype would still apply.  */
10241 char uuid_to_str();
10242
10243 int main() {
10244 uuid_to_str()
10245 ; return 0; }
10246 EOF
10247 if { (eval echo configure:10248: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10248   rm -rf conftest*
10249   ac_cv_search_uuid_to_str="-l$ac_lib"
10250 break
10251 else
10252   echo "configure: failed program was:" >&5
10253   cat conftest.$ac_ext >&5
10254 fi
10255 rm -f conftest*
10256 done
10257 LIBS="$ac_func_search_save_LIBS"
10258 fi
10259
10260 echo "$ac_t""$ac_cv_search_uuid_to_str" 1>&6
10261 if test "$ac_cv_search_uuid_to_str" != "no"; then
10262   test "$ac_cv_search_uuid_to_str" = "none required" || LIBS="$ac_cv_search_uuid_to_str $LIBS"
10263   have_uuid=yes
10264 else :
10265   :
10266 fi
10267         LIBS="$save_LIBS"
10268
10269         if test have_uuid = yes ; then
10270                 cat >> confdefs.h <<\EOF
10271 #define HAVE_UUID_TO_STR 1
10272 EOF
10273
10274
10275                 test "$ac_cv_search_uuid_to_str" = "none required" || \
10276                         SLAPD_LIBS="$SLAPD_LIBS $ac_cv_search_uuid_to_str"
10277         fi
10278 fi
10279
10280 if test $have_uuid = no ; then
10281         echo $ac_n "checking to see if -lrpcrt4 is needed for win32 UUID support""... $ac_c" 1>&6
10282 echo "configure:10283: checking to see if -lrpcrt4 is needed for win32 UUID support" >&5
10283         save_LIBS="$LIBS"
10284         LIBS="$LIBS -lrpcrt4"
10285         cat > conftest.$ac_ext <<EOF
10286 #line 10287 "configure"
10287 #include "confdefs.h"
10288
10289                 int __stdcall UuidCreate(void *);
10290                 int __stdcall UuidToStringA(void *,void **);
10291                 
10292 int main() {
10293
10294                 UuidCreate(0);
10295                 UuidToStringA(0,0);
10296                 
10297 ; return 0; }
10298 EOF
10299 if { (eval echo configure:10300: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10300   rm -rf conftest*
10301   need_rpcrt=yes
10302 else
10303   echo "configure: failed program was:" >&5
10304   cat conftest.$ac_ext >&5
10305   rm -rf conftest*
10306   need_rpcrt=no
10307 fi
10308 rm -f conftest*
10309         if test $need_rpcrt = yes; then
10310                 SLAPD_LIBS="$SLAPD_LIBS -lrpcrt4"
10311         fi
10312         LIBS="$save_LIBS"
10313         echo "$ac_t""$need_rpcrt" 1>&6
10314 fi
10315
10316 ol_cv_lib_resolver=no
10317 if test $ol_cv_lib_resolver = no ; then
10318         echo $ac_n "checking for resolver link (default)""... $ac_c" 1>&6
10319 echo "configure:10320: checking for resolver link (default)" >&5
10320 if eval "test \"\${ol_cv_resolver_none+set}\" = set"; then
10321   echo $ac_n "(cached) $ac_c" 1>&6
10322 else
10323   
10324         ol_RESOLVER_LIB=
10325         ol_LIBS=$LIBS
10326         LIBS="$ol_RESOLVER_LIB $LIBS"
10327
10328         cat > conftest.$ac_ext <<EOF
10329 #line 10330 "configure"
10330 #include "confdefs.h"
10331
10332 #ifdef HAVE_SYS_TYPES_H
10333 #       include <sys/types.h>
10334 #endif
10335 #include <netinet/in.h>
10336 #ifdef HAVE_ARPA_NAMESER_H
10337 #       include <arpa/nameser.h>
10338 #endif
10339 #ifdef HAVE_RESOLV_H
10340 #       include <resolv.h>
10341 #endif
10342
10343 int main() {
10344 {
10345         int len, status;
10346         char *request = NULL;
10347         unsigned char reply[64*1024];
10348         unsigned char host[64*1024];
10349         unsigned char *p;
10350
10351 #ifdef NS_HFIXEDSZ
10352         /* Bind 8/9 interface */
10353         len = res_query(request, ns_c_in, ns_t_srv, reply, sizeof(reply));
10354 #else
10355         /* Bind 4 interface */
10356 # ifndef T_SRV
10357 #  define T_SRV 33
10358 # endif
10359         len = res_query(request, C_IN, T_SRV, reply, sizeof(reply));
10360 #endif
10361         p = reply;
10362 #ifdef NS_HFIXEDSZ
10363         /* Bind 8/9 interface */
10364         p += NS_HFIXEDSZ;
10365 #elif defined(HFIXEDSZ)
10366         /* Bind 4 interface w/ HFIXEDSZ */
10367         p += HFIXEDSZ;
10368 #else
10369         /* Bind 4 interface w/o HFIXEDSZ */
10370         p += sizeof(HEADER);
10371 #endif
10372         status = dn_expand( reply, reply+len, p, host, sizeof(host));
10373 }
10374 ; return 0; }
10375 EOF
10376 if { (eval echo configure:10377: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10377   rm -rf conftest*
10378   ol_cv_resolver_none=yes
10379 else
10380   echo "configure: failed program was:" >&5
10381   cat conftest.$ac_ext >&5
10382   rm -rf conftest*
10383   ol_cv_resolver_none=no
10384 fi
10385 rm -f conftest*
10386
10387         LIBS="$ol_LIBS"
10388
10389 fi
10390
10391 echo "$ac_t""$ol_cv_resolver_none" 1>&6
10392
10393         if test $ol_cv_resolver_none = yes ; then
10394                 ol_cv_lib_resolver=yes
10395         fi
10396 fi
10397
10398 if test $ol_cv_lib_resolver = no ; then
10399         echo $ac_n "checking for resolver link (-lresolv)""... $ac_c" 1>&6
10400 echo "configure:10401: checking for resolver link (-lresolv)" >&5
10401 if eval "test \"\${ol_cv_resolver_resolv+set}\" = set"; then
10402   echo $ac_n "(cached) $ac_c" 1>&6
10403 else
10404   
10405         ol_RESOLVER_LIB=-lresolv
10406         ol_LIBS=$LIBS
10407         LIBS="$ol_RESOLVER_LIB $LIBS"
10408
10409         cat > conftest.$ac_ext <<EOF
10410 #line 10411 "configure"
10411 #include "confdefs.h"
10412
10413 #ifdef HAVE_SYS_TYPES_H
10414 #       include <sys/types.h>
10415 #endif
10416 #include <netinet/in.h>
10417 #ifdef HAVE_ARPA_NAMESER_H
10418 #       include <arpa/nameser.h>
10419 #endif
10420 #ifdef HAVE_RESOLV_H
10421 #       include <resolv.h>
10422 #endif
10423
10424 int main() {
10425 {
10426         int len, status;
10427         char *request = NULL;
10428         unsigned char reply[64*1024];
10429         unsigned char host[64*1024];
10430         unsigned char *p;
10431
10432 #ifdef NS_HFIXEDSZ
10433         /* Bind 8/9 interface */
10434         len = res_query(request, ns_c_in, ns_t_srv, reply, sizeof(reply));
10435 #else
10436         /* Bind 4 interface */
10437 # ifndef T_SRV
10438 #  define T_SRV 33
10439 # endif
10440         len = res_query(request, C_IN, T_SRV, reply, sizeof(reply));
10441 #endif
10442         p = reply;
10443 #ifdef NS_HFIXEDSZ
10444         /* Bind 8/9 interface */
10445         p += NS_HFIXEDSZ;
10446 #elif defined(HFIXEDSZ)
10447         /* Bind 4 interface w/ HFIXEDSZ */
10448         p += HFIXEDSZ;
10449 #else
10450         /* Bind 4 interface w/o HFIXEDSZ */
10451         p += sizeof(HEADER);
10452 #endif
10453         status = dn_expand( reply, reply+len, p, host, sizeof(host));
10454 }
10455 ; return 0; }
10456 EOF
10457 if { (eval echo configure:10458: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10458   rm -rf conftest*
10459   ol_cv_resolver_resolv=yes
10460 else
10461   echo "configure: failed program was:" >&5
10462   cat conftest.$ac_ext >&5
10463   rm -rf conftest*
10464   ol_cv_resolver_resolv=no
10465 fi
10466 rm -f conftest*
10467
10468         LIBS="$ol_LIBS"
10469
10470 fi
10471
10472 echo "$ac_t""$ol_cv_resolver_resolv" 1>&6
10473
10474         if test $ol_cv_resolver_resolv = yes ; then
10475                 ol_cv_lib_resolver=-lresolv
10476         fi
10477 fi
10478
10479 if test $ol_cv_lib_resolver = no ; then
10480         echo $ac_n "checking for resolver link (-lbind)""... $ac_c" 1>&6
10481 echo "configure:10482: checking for resolver link (-lbind)" >&5
10482 if eval "test \"\${ol_cv_resolver_bind+set}\" = set"; then
10483   echo $ac_n "(cached) $ac_c" 1>&6
10484 else
10485   
10486         ol_RESOLVER_LIB=-lbind
10487         ol_LIBS=$LIBS
10488         LIBS="$ol_RESOLVER_LIB $LIBS"
10489
10490         cat > conftest.$ac_ext <<EOF
10491 #line 10492 "configure"
10492 #include "confdefs.h"
10493
10494 #ifdef HAVE_SYS_TYPES_H
10495 #       include <sys/types.h>
10496 #endif
10497 #include <netinet/in.h>
10498 #ifdef HAVE_ARPA_NAMESER_H
10499 #       include <arpa/nameser.h>
10500 #endif
10501 #ifdef HAVE_RESOLV_H
10502 #       include <resolv.h>
10503 #endif
10504
10505 int main() {
10506 {
10507         int len, status;
10508         char *request = NULL;
10509         unsigned char reply[64*1024];
10510         unsigned char host[64*1024];
10511         unsigned char *p;
10512
10513 #ifdef NS_HFIXEDSZ
10514         /* Bind 8/9 interface */
10515         len = res_query(request, ns_c_in, ns_t_srv, reply, sizeof(reply));
10516 #else
10517         /* Bind 4 interface */
10518 # ifndef T_SRV
10519 #  define T_SRV 33
10520 # endif
10521         len = res_query(request, C_IN, T_SRV, reply, sizeof(reply));
10522 #endif
10523         p = reply;
10524 #ifdef NS_HFIXEDSZ
10525         /* Bind 8/9 interface */
10526         p += NS_HFIXEDSZ;
10527 #elif defined(HFIXEDSZ)
10528         /* Bind 4 interface w/ HFIXEDSZ */
10529         p += HFIXEDSZ;
10530 #else
10531         /* Bind 4 interface w/o HFIXEDSZ */
10532         p += sizeof(HEADER);
10533 #endif
10534         status = dn_expand( reply, reply+len, p, host, sizeof(host));
10535 }
10536 ; return 0; }
10537 EOF
10538 if { (eval echo configure:10539: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10539   rm -rf conftest*
10540   ol_cv_resolver_bind=yes
10541 else
10542   echo "configure: failed program was:" >&5
10543   cat conftest.$ac_ext >&5
10544   rm -rf conftest*
10545   ol_cv_resolver_bind=no
10546 fi
10547 rm -f conftest*
10548
10549         LIBS="$ol_LIBS"
10550
10551 fi
10552
10553 echo "$ac_t""$ol_cv_resolver_bind" 1>&6
10554
10555         if test $ol_cv_resolver_bind = yes ; then
10556                 ol_cv_lib_resolver=-lbind
10557         fi
10558 fi
10559
10560
10561
10562 ol_link_dnssrv=no
10563 if test "$ol_cv_lib_resolver" != no ; then
10564         cat >> confdefs.h <<\EOF
10565 #define HAVE_RES_QUERY 1
10566 EOF
10567
10568
10569         if test "$ol_enable_dnssrv" != no ; then
10570                 ol_link_dnssrv=yes
10571         fi
10572
10573         if test "$ol_cv_lib_resolver" != yes ; then
10574                 LIBS="$ol_cv_lib_resolver $LIBS"
10575         fi
10576 fi
10577
10578 if test "$ol_enable_dnssrv" = yes -o "$ol_enable_dnssrv" = mod ; then
10579         if test "$ol_link_dnssrv" = no ; then
10580                 { echo "configure: error: DNSSRV requires res_query()" 1>&2; exit 1; }
10581         fi
10582 else
10583         ol_enable_dnssrv=no
10584 fi
10585
10586 for ac_func in hstrerror 
10587 do
10588 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10589 echo "configure:10590: checking for $ac_func" >&5
10590 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10591   echo $ac_n "(cached) $ac_c" 1>&6
10592 else
10593   cat > conftest.$ac_ext <<EOF
10594 #line 10595 "configure"
10595 #include "confdefs.h"
10596 /* System header to define __stub macros and hopefully few prototypes,
10597     which can conflict with char $ac_func(); below.  */
10598 #include <assert.h>
10599 /* Override any gcc2 internal prototype to avoid an error.  */
10600 /* We use char because int might match the return type of a gcc2
10601     builtin and then its argument prototype would still apply.  */
10602 char $ac_func();
10603 char (*f)();
10604
10605 int main() {
10606
10607 /* The GNU C library defines this for functions which it implements
10608     to always fail with ENOSYS.  Some functions are actually named
10609     something starting with __ and the normal name is an alias.  */
10610 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10611 choke me
10612 #else
10613 f = $ac_func;
10614 #endif
10615
10616 ; return 0; }
10617 EOF
10618 if { (eval echo configure:10619: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10619   rm -rf conftest*
10620   eval "ac_cv_func_$ac_func=yes"
10621 else
10622   echo "configure: failed program was:" >&5
10623   cat conftest.$ac_ext >&5
10624   rm -rf conftest*
10625   eval "ac_cv_func_$ac_func=no"
10626 fi
10627 rm -f conftest*
10628 fi
10629
10630 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10631   echo "$ac_t""yes" 1>&6
10632     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10633   cat >> confdefs.h <<EOF
10634 #define $ac_tr_func 1
10635 EOF
10636  
10637 else
10638   echo "$ac_t""no" 1>&6
10639 fi
10640 done
10641
10642
10643 for ac_func in getaddrinfo getnameinfo gai_strerror inet_ntop 
10644 do
10645 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10646 echo "configure:10647: checking for $ac_func" >&5
10647 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10648   echo $ac_n "(cached) $ac_c" 1>&6
10649 else
10650   cat > conftest.$ac_ext <<EOF
10651 #line 10652 "configure"
10652 #include "confdefs.h"
10653 /* System header to define __stub macros and hopefully few prototypes,
10654     which can conflict with char $ac_func(); below.  */
10655 #include <assert.h>
10656 /* Override any gcc2 internal prototype to avoid an error.  */
10657 /* We use char because int might match the return type of a gcc2
10658     builtin and then its argument prototype would still apply.  */
10659 char $ac_func();
10660 char (*f)();
10661
10662 int main() {
10663
10664 /* The GNU C library defines this for functions which it implements
10665     to always fail with ENOSYS.  Some functions are actually named
10666     something starting with __ and the normal name is an alias.  */
10667 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10668 choke me
10669 #else
10670 f = $ac_func;
10671 #endif
10672
10673 ; return 0; }
10674 EOF
10675 if { (eval echo configure:10676: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10676   rm -rf conftest*
10677   eval "ac_cv_func_$ac_func=yes"
10678 else
10679   echo "configure: failed program was:" >&5
10680   cat conftest.$ac_ext >&5
10681   rm -rf conftest*
10682   eval "ac_cv_func_$ac_func=no"
10683 fi
10684 rm -f conftest*
10685 fi
10686
10687 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10688   echo "$ac_t""yes" 1>&6
10689     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10690   cat >> confdefs.h <<EOF
10691 #define $ac_tr_func 1
10692 EOF
10693  
10694 else
10695   echo "$ac_t""no" 1>&6
10696 fi
10697 done
10698
10699
10700 ol_link_ipv6=no
10701 if test $ac_cv_func_getaddrinfo = no -o $ac_cv_func_inet_ntop = no ; then
10702         if test $ol_enable_ipv6 = yes ; then
10703                 { echo "configure: error: IPv6 support requires getaddrinfo() and inet_ntop()" 1>&2; exit 1; }
10704         fi
10705 elif test $ol_enable_ipv6 != no ; then
10706         echo $ac_n "checking INET6_ADDRSTRLEN""... $ac_c" 1>&6
10707 echo "configure:10708: checking INET6_ADDRSTRLEN" >&5
10708 if eval "test \"\${ol_cv_inet6_addrstrlen+set}\" = set"; then
10709   echo $ac_n "(cached) $ac_c" 1>&6
10710 else
10711   
10712                 cat > conftest.$ac_ext <<EOF
10713 #line 10714 "configure"
10714 #include "confdefs.h"
10715
10716 #                       include <netinet/in.h>
10717 #                       ifdef INET6_ADDRSTRLEN
10718                                 __has_inet6_addrstrlen__;
10719 #                       endif
10720                 
10721 EOF
10722 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10723   egrep "__has_inet6_addrstrlen__" >/dev/null 2>&1; then
10724   rm -rf conftest*
10725   ol_cv_inet6_addrstrlen=yes
10726 else
10727   rm -rf conftest*
10728   ol_cv_inet6_addrstrlen=no
10729 fi
10730 rm -f conftest*
10731
10732 fi
10733
10734 echo "$ac_t""$ol_cv_inet6_addrstrlen" 1>&6
10735
10736
10737         echo $ac_n "checking struct sockaddr_storage""... $ac_c" 1>&6
10738 echo "configure:10739: checking struct sockaddr_storage" >&5
10739 if eval "test \"\${ol_cv_struct_sockaddr_storage+set}\" = set"; then
10740   echo $ac_n "(cached) $ac_c" 1>&6
10741 else
10742   
10743                 cat > conftest.$ac_ext <<EOF
10744 #line 10745 "configure"
10745 #include "confdefs.h"
10746
10747 #include <sys/types.h>
10748 #include <sys/socket.h>
10749
10750 int main() {
10751
10752                         struct sockaddr_storage ss;
10753
10754 ; return 0; }
10755 EOF
10756 if { (eval echo configure:10757: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10757   rm -rf conftest*
10758   ol_cv_struct_sockaddr_storage=yes
10759 else
10760   echo "configure: failed program was:" >&5
10761   cat conftest.$ac_ext >&5
10762   rm -rf conftest*
10763   ol_cv_struct_sockaddr_storage=no
10764 fi
10765 rm -f conftest*
10766 fi
10767
10768 echo "$ac_t""$ol_cv_struct_sockaddr_storage" 1>&6
10769
10770         if test $ol_cv_inet6_addrstrlen = yes \
10771                 -a $ol_cv_struct_sockaddr_storage = yes ; then
10772                 ol_link_ipv6=yes
10773         elif test $ol_enable_ipv6 = yes \
10774                         -a $ol_cv_inet6_addrstrlen = no ; then
10775                 { echo "configure: error: IPv6 support requires INET6_ADDRSTRLEN" 1>&2; exit 1; }
10776         elif test $ol_enable_ipv6 = yes \
10777                         -a $ol_cv_struct_sockaddr_storage = no ; then
10778                 { echo "configure: error: IPv6 support requires struct sockaddr_storage" 1>&2; exit 1; }
10779         fi
10780 fi
10781
10782 if test $ol_enable_local != no ; then
10783         for ac_hdr in sys/un.h 
10784 do
10785 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10786 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10787 echo "configure:10788: checking for $ac_hdr" >&5
10788 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10789   echo $ac_n "(cached) $ac_c" 1>&6
10790 else
10791   cat > conftest.$ac_ext <<EOF
10792 #line 10793 "configure"
10793 #include "confdefs.h"
10794 #include <$ac_hdr>
10795 EOF
10796 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10797 { (eval echo configure:10798: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10798 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10799 if test -z "$ac_err"; then
10800   rm -rf conftest*
10801   eval "ac_cv_header_$ac_safe=yes"
10802 else
10803   echo "$ac_err" >&5
10804   echo "configure: failed program was:" >&5
10805   cat conftest.$ac_ext >&5
10806   rm -rf conftest*
10807   eval "ac_cv_header_$ac_safe=no"
10808 fi
10809 rm -f conftest*
10810 fi
10811 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10812   echo "$ac_t""yes" 1>&6
10813     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10814   cat >> confdefs.h <<EOF
10815 #define $ac_tr_hdr 1
10816 EOF
10817  
10818 else
10819   echo "$ac_t""no" 1>&6
10820 fi
10821 done
10822
10823
10824         if test $ol_enable_local = auto ; then
10825                 ol_enable_local=$ac_cv_header_sys_un_h
10826         elif test $ac_cv_header_sys_un_h = no ; then
10827                 { echo "configure: error: AF_LOCAL domain support requires sys/un.h" 1>&2; exit 1; }
10828         fi
10829 fi
10830
10831 ol_link_kbind=no
10832 ol_link_krb5=no
10833 ol_link_krb4=no
10834
10835 if test $ol_with_kerberos = yes -o $ol_with_kerberos = auto \
10836         -o $ol_with_kerberos = k5 -o $ol_with_kerberos = k5only \
10837         -o $ol_with_kerberos = k425 ; then
10838
10839         for ac_hdr in krb5.h
10840 do
10841 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10842 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10843 echo "configure:10844: checking for $ac_hdr" >&5
10844 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10845   echo $ac_n "(cached) $ac_c" 1>&6
10846 else
10847   cat > conftest.$ac_ext <<EOF
10848 #line 10849 "configure"
10849 #include "confdefs.h"
10850 #include <$ac_hdr>
10851 EOF
10852 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10853 { (eval echo configure:10854: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10854 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10855 if test -z "$ac_err"; then
10856   rm -rf conftest*
10857   eval "ac_cv_header_$ac_safe=yes"
10858 else
10859   echo "$ac_err" >&5
10860   echo "configure: failed program was:" >&5
10861   cat conftest.$ac_ext >&5
10862   rm -rf conftest*
10863   eval "ac_cv_header_$ac_safe=no"
10864 fi
10865 rm -f conftest*
10866 fi
10867 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10868   echo "$ac_t""yes" 1>&6
10869     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10870   cat >> confdefs.h <<EOF
10871 #define $ac_tr_hdr 1
10872 EOF
10873  
10874 else
10875   echo "$ac_t""no" 1>&6
10876 fi
10877 done
10878
10879
10880         if test $ac_cv_header_krb5_h = yes ; then
10881                                 for ac_hdr in heim_err.h
10882 do
10883 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10884 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10885 echo "configure:10886: checking for $ac_hdr" >&5
10886 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10887   echo $ac_n "(cached) $ac_c" 1>&6
10888 else
10889   cat > conftest.$ac_ext <<EOF
10890 #line 10891 "configure"
10891 #include "confdefs.h"
10892 #include <$ac_hdr>
10893 EOF
10894 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10895 { (eval echo configure:10896: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10896 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10897 if test -z "$ac_err"; then
10898   rm -rf conftest*
10899   eval "ac_cv_header_$ac_safe=yes"
10900 else
10901   echo "$ac_err" >&5
10902   echo "configure: failed program was:" >&5
10903   cat conftest.$ac_ext >&5
10904   rm -rf conftest*
10905   eval "ac_cv_header_$ac_safe=no"
10906 fi
10907 rm -f conftest*
10908 fi
10909 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10910   echo "$ac_t""yes" 1>&6
10911     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10912   cat >> confdefs.h <<EOF
10913 #define $ac_tr_hdr 1
10914 EOF
10915  
10916 else
10917   echo "$ac_t""no" 1>&6
10918 fi
10919 done
10920
10921                 if test $ac_cv_header_heim_err_h = yes ; then
10922                         krb5_impl=heimdal
10923                 else
10924                         krb5_impl=mit
10925                 fi
10926
10927                 if test $krb5_impl = mit; then
10928                         echo $ac_n "checking for main in -lk5crypto""... $ac_c" 1>&6
10929 echo "configure:10930: checking for main in -lk5crypto" >&5
10930 ac_lib_var=`echo k5crypto'_'main | sed 'y%./+-:%__p__%'`
10931 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10932   echo $ac_n "(cached) $ac_c" 1>&6
10933 else
10934   ac_save_LIBS="$LIBS"
10935 LIBS="-lk5crypto  $LIBS"
10936 cat > conftest.$ac_ext <<EOF
10937 #line 10938 "configure"
10938 #include "confdefs.h"
10939
10940 int main() {
10941 main()
10942 ; return 0; }
10943 EOF
10944 if { (eval echo configure:10945: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10945   rm -rf conftest*
10946   eval "ac_cv_lib_$ac_lib_var=yes"
10947 else
10948   echo "configure: failed program was:" >&5
10949   cat conftest.$ac_ext >&5
10950   rm -rf conftest*
10951   eval "ac_cv_lib_$ac_lib_var=no"
10952 fi
10953 rm -f conftest*
10954 LIBS="$ac_save_LIBS"
10955
10956 fi
10957 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10958   echo "$ac_t""yes" 1>&6
10959   krb5crypto=k5crypto
10960 else
10961   echo "$ac_t""no" 1>&6
10962 krb5crypto=crypto
10963 fi
10964
10965
10966                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
10967 echo "configure:10968: checking for main in -lkrb5" >&5
10968 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
10969 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10970   echo $ac_n "(cached) $ac_c" 1>&6
10971 else
10972   ac_save_LIBS="$LIBS"
10973 LIBS="-lkrb5 -l$krb5crypto -lcom_err $LIBS"
10974 cat > conftest.$ac_ext <<EOF
10975 #line 10976 "configure"
10976 #include "confdefs.h"
10977
10978 int main() {
10979 main()
10980 ; return 0; }
10981 EOF
10982 if { (eval echo configure:10983: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10983   rm -rf conftest*
10984   eval "ac_cv_lib_$ac_lib_var=yes"
10985 else
10986   echo "configure: failed program was:" >&5
10987   cat conftest.$ac_ext >&5
10988   rm -rf conftest*
10989   eval "ac_cv_lib_$ac_lib_var=no"
10990 fi
10991 rm -f conftest*
10992 LIBS="$ac_save_LIBS"
10993
10994 fi
10995 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10996   echo "$ac_t""yes" 1>&6
10997   have_krb5=yes
10998                                 KRB5_LIBS="-lkrb5 -l$krb5crypto -lcom_err"
10999 else
11000   echo "$ac_t""no" 1>&6
11001 have_krb5=no
11002 fi
11003
11004
11005                 elif test $krb5_impl = heimdal; then
11006                         echo $ac_n "checking for main in -ldes""... $ac_c" 1>&6
11007 echo "configure:11008: checking for main in -ldes" >&5
11008 ac_lib_var=`echo des'_'main | sed 'y%./+-:%__p__%'`
11009 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11010   echo $ac_n "(cached) $ac_c" 1>&6
11011 else
11012   ac_save_LIBS="$LIBS"
11013 LIBS="-ldes  $LIBS"
11014 cat > conftest.$ac_ext <<EOF
11015 #line 11016 "configure"
11016 #include "confdefs.h"
11017
11018 int main() {
11019 main()
11020 ; return 0; }
11021 EOF
11022 if { (eval echo configure:11023: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11023   rm -rf conftest*
11024   eval "ac_cv_lib_$ac_lib_var=yes"
11025 else
11026   echo "configure: failed program was:" >&5
11027   cat conftest.$ac_ext >&5
11028   rm -rf conftest*
11029   eval "ac_cv_lib_$ac_lib_var=no"
11030 fi
11031 rm -f conftest*
11032 LIBS="$ac_save_LIBS"
11033
11034 fi
11035 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11036   echo "$ac_t""yes" 1>&6
11037   krb5crypto=des
11038 else
11039   echo "$ac_t""no" 1>&6
11040 krb5crypto=crypto
11041 fi
11042
11043
11044                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
11045 echo "configure:11046: checking for main in -lkrb5" >&5
11046 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
11047 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11048   echo $ac_n "(cached) $ac_c" 1>&6
11049 else
11050   ac_save_LIBS="$LIBS"
11051 LIBS="-lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err $LIBS"
11052 cat > conftest.$ac_ext <<EOF
11053 #line 11054 "configure"
11054 #include "confdefs.h"
11055
11056 int main() {
11057 main()
11058 ; return 0; }
11059 EOF
11060 if { (eval echo configure:11061: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11061   rm -rf conftest*
11062   eval "ac_cv_lib_$ac_lib_var=yes"
11063 else
11064   echo "configure: failed program was:" >&5
11065   cat conftest.$ac_ext >&5
11066   rm -rf conftest*
11067   eval "ac_cv_lib_$ac_lib_var=no"
11068 fi
11069 rm -f conftest*
11070 LIBS="$ac_save_LIBS"
11071
11072 fi
11073 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11074   echo "$ac_t""yes" 1>&6
11075   have_krb5=yes
11076                                 KRB5_LIBS="-lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err"
11077 else
11078   echo "$ac_t""no" 1>&6
11079 have_krb5=no
11080 fi
11081
11082
11083                         cat >> confdefs.h <<\EOF
11084 #define HAVE_HEIMDAL_KERBEROS 1
11085 EOF
11086
11087
11088                 else
11089                         have_krb5=no
11090                         echo "configure: warning: Unrecognized Kerberos5 Implementation" 1>&2
11091                 fi
11092
11093                 if test $have_krb5 = yes ; then
11094                         ol_link_krb5=yes
11095
11096                         cat >> confdefs.h <<\EOF
11097 #define HAVE_KRB5 1
11098 EOF
11099
11100
11101                         if test $ol_with_kerberos = k5only ; then
11102                                 ol_with_kerberos=found
11103                         fi
11104
11105                 elif test $ol_with_kerberos != auto ; then
11106                         { echo "configure: error: Required Kerberos 5 support not available" 1>&2; exit 1; }
11107                 fi
11108
11109         fi
11110 fi
11111
11112 if test $ol_link_krb5 = yes -a \( $ol_with_kerberos = yes -o \
11113         $ol_with_kerberos = auto -o $ol_with_kerberos = k425 \) ; then
11114
11115         for ac_hdr in kerberosIV/krb.h kerberosIV/des.h
11116 do
11117 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11118 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11119 echo "configure:11120: checking for $ac_hdr" >&5
11120 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11121   echo $ac_n "(cached) $ac_c" 1>&6
11122 else
11123   cat > conftest.$ac_ext <<EOF
11124 #line 11125 "configure"
11125 #include "confdefs.h"
11126 #include <$ac_hdr>
11127 EOF
11128 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11129 { (eval echo configure:11130: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11130 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11131 if test -z "$ac_err"; then
11132   rm -rf conftest*
11133   eval "ac_cv_header_$ac_safe=yes"
11134 else
11135   echo "$ac_err" >&5
11136   echo "configure: failed program was:" >&5
11137   cat conftest.$ac_ext >&5
11138   rm -rf conftest*
11139   eval "ac_cv_header_$ac_safe=no"
11140 fi
11141 rm -f conftest*
11142 fi
11143 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11144   echo "$ac_t""yes" 1>&6
11145     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11146   cat >> confdefs.h <<EOF
11147 #define $ac_tr_hdr 1
11148 EOF
11149  
11150 else
11151   echo "$ac_t""no" 1>&6
11152 fi
11153 done
11154
11155
11156         if test $ac_cv_header_kerberosIV_krb_h = yes ; then
11157                 if test $krb5_impl = mit; then
11158                         echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
11159 echo "configure:11160: checking for main in -lkrb4" >&5
11160 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
11161 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11162   echo $ac_n "(cached) $ac_c" 1>&6
11163 else
11164   ac_save_LIBS="$LIBS"
11165 LIBS="-lkrb4 -ldes425 -lkrb5 -l$krb5crypto -lcom_err $LIBS"
11166 cat > conftest.$ac_ext <<EOF
11167 #line 11168 "configure"
11168 #include "confdefs.h"
11169
11170 int main() {
11171 main()
11172 ; return 0; }
11173 EOF
11174 if { (eval echo configure:11175: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11175   rm -rf conftest*
11176   eval "ac_cv_lib_$ac_lib_var=yes"
11177 else
11178   echo "configure: failed program was:" >&5
11179   cat conftest.$ac_ext >&5
11180   rm -rf conftest*
11181   eval "ac_cv_lib_$ac_lib_var=no"
11182 fi
11183 rm -f conftest*
11184 LIBS="$ac_save_LIBS"
11185
11186 fi
11187 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11188   echo "$ac_t""yes" 1>&6
11189   have_k425=yes
11190                                 KRB4_LIBS="-lkrb4 -ldes425"
11191 else
11192   echo "$ac_t""no" 1>&6
11193 have_k425=no
11194 fi
11195
11196
11197                 elif test $krb5_impl = heimdal; then
11198                         echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
11199 echo "configure:11200: checking for main in -lkrb4" >&5
11200 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
11201 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11202   echo $ac_n "(cached) $ac_c" 1>&6
11203 else
11204   ac_save_LIBS="$LIBS"
11205 LIBS="-lkrb4 -lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err $LIBS"
11206 cat > conftest.$ac_ext <<EOF
11207 #line 11208 "configure"
11208 #include "confdefs.h"
11209
11210 int main() {
11211 main()
11212 ; return 0; }
11213 EOF
11214 if { (eval echo configure:11215: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11215   rm -rf conftest*
11216   eval "ac_cv_lib_$ac_lib_var=yes"
11217 else
11218   echo "configure: failed program was:" >&5
11219   cat conftest.$ac_ext >&5
11220   rm -rf conftest*
11221   eval "ac_cv_lib_$ac_lib_var=no"
11222 fi
11223 rm -f conftest*
11224 LIBS="$ac_save_LIBS"
11225
11226 fi
11227 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11228   echo "$ac_t""yes" 1>&6
11229   have_k425=yes
11230                                 KRB4_LIBS="-lkrb4"
11231 else
11232   echo "$ac_t""no" 1>&6
11233 have_k425=no
11234 fi
11235
11236
11237                 else
11238                         have_425=no
11239                         echo "configure: warning: Unrecongized Kerberos V Implementation" 1>&2
11240                 fi
11241
11242                 if test $have_k425 = yes ; then
11243                         ol_with_kerberos=found
11244                         ol_link_krb4=yes
11245
11246                         cat >> confdefs.h <<\EOF
11247 #define HAVE_KRB425 1
11248 EOF
11249
11250                         cat >> confdefs.h <<\EOF
11251 #define HAVE_KRB4 1
11252 EOF
11253
11254
11255                         echo $ac_n "checking for des_debug in Kerberos libraries""... $ac_c" 1>&6
11256 echo "configure:11257: checking for des_debug in Kerberos libraries" >&5
11257 if eval "test \"\${ol_cv_var_des_debug+set}\" = set"; then
11258   echo $ac_n "(cached) $ac_c" 1>&6
11259 else
11260   
11261                                                                 save_LIBS="$LIBS"
11262                                 LIBS="$KRB4_LIBS $KRB5_LIBS $LIBS"
11263                                 cat > conftest.$ac_ext <<EOF
11264 #line 11265 "configure"
11265 #include "confdefs.h"
11266
11267 #include <kerberosIV/krb.h>
11268 #include <kerberosIV/des.h>
11269 extern int des_debug;
11270
11271 int main() {
11272
11273 des_debug = 1;
11274
11275 ; return 0; }
11276 EOF
11277 if { (eval echo configure:11278: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11278   rm -rf conftest*
11279   ol_cv_var_des_debug=yes
11280 else
11281   echo "configure: failed program was:" >&5
11282   cat conftest.$ac_ext >&5
11283   rm -rf conftest*
11284   ol_cv_var_des_debug=no
11285 fi
11286 rm -f conftest*
11287                                                                 LIBS="$save_LIBS"
11288                         
11289 fi
11290
11291 echo "$ac_t""$ol_cv_var_des_debug" 1>&6
11292
11293                         if test $ol_cv_var_des_debug = yes ; then
11294                                 cat >> confdefs.h <<\EOF
11295 #define HAVE_DES_DEBUG 1
11296 EOF
11297
11298                         fi
11299
11300                         LIBS="$save_LIBS"
11301                 fi
11302         fi
11303 fi
11304
11305 if test $ol_link_krb5 = yes ; then
11306         ol_with_kerberos=found
11307 fi
11308
11309 if test $ol_with_kerberos = yes -o $ol_with_kerberos = auto \
11310         -o $ol_with_kerberos = k4 -o $ol_with_kerberos = kth ; then
11311
11312         for ac_hdr in krb.h des.h krb-archaeology.h 
11313 do
11314 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11315 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11316 echo "configure:11317: checking for $ac_hdr" >&5
11317 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11318   echo $ac_n "(cached) $ac_c" 1>&6
11319 else
11320   cat > conftest.$ac_ext <<EOF
11321 #line 11322 "configure"
11322 #include "confdefs.h"
11323 #include <$ac_hdr>
11324 EOF
11325 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11326 { (eval echo configure:11327: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11327 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11328 if test -z "$ac_err"; then
11329   rm -rf conftest*
11330   eval "ac_cv_header_$ac_safe=yes"
11331 else
11332   echo "$ac_err" >&5
11333   echo "configure: failed program was:" >&5
11334   cat conftest.$ac_ext >&5
11335   rm -rf conftest*
11336   eval "ac_cv_header_$ac_safe=no"
11337 fi
11338 rm -f conftest*
11339 fi
11340 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11341   echo "$ac_t""yes" 1>&6
11342     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11343   cat >> confdefs.h <<EOF
11344 #define $ac_tr_hdr 1
11345 EOF
11346  
11347 else
11348   echo "$ac_t""no" 1>&6
11349 fi
11350 done
11351
11352
11353         if test $ac_cv_header_krb_h = yes ; then
11354                 echo $ac_n "checking for main in -lkrb""... $ac_c" 1>&6
11355 echo "configure:11356: checking for main in -lkrb" >&5
11356 ac_lib_var=`echo krb'_'main | sed 'y%./+-:%__p__%'`
11357 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11358   echo $ac_n "(cached) $ac_c" 1>&6
11359 else
11360   ac_save_LIBS="$LIBS"
11361 LIBS="-lkrb -ldes $LIBS"
11362 cat > conftest.$ac_ext <<EOF
11363 #line 11364 "configure"
11364 #include "confdefs.h"
11365
11366 int main() {
11367 main()
11368 ; return 0; }
11369 EOF
11370 if { (eval echo configure:11371: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11371   rm -rf conftest*
11372   eval "ac_cv_lib_$ac_lib_var=yes"
11373 else
11374   echo "configure: failed program was:" >&5
11375   cat conftest.$ac_ext >&5
11376   rm -rf conftest*
11377   eval "ac_cv_lib_$ac_lib_var=no"
11378 fi
11379 rm -f conftest*
11380 LIBS="$ac_save_LIBS"
11381
11382 fi
11383 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11384   echo "$ac_t""yes" 1>&6
11385   have_k4=yes
11386 else
11387   echo "$ac_t""no" 1>&6
11388 have_k4=no
11389 fi
11390
11391
11392                 if test $have_k4 = yes ; then
11393                         ol_with_kerberos=found
11394                         ol_link_krb4=yes
11395
11396                         cat >> confdefs.h <<\EOF
11397 #define HAVE_KRB4 1
11398 EOF
11399
11400
11401                         KRB4_LIBS="-lkrb -ldes"
11402
11403                         if test $ac_cv_header_krb_archaeology_h = yes ; then
11404                                 cat >> confdefs.h <<\EOF
11405 #define HAVE_KTH_KERBEROS 1
11406 EOF
11407
11408                         fi
11409                 fi
11410         fi
11411 fi
11412
11413 if test $ol_link_krb4 = yes -a $ol_enable_kbind != no ; then
11414         ol_link_kbind=yes
11415
11416 elif test $ol_enable_kbind = yes ; then
11417         { echo "configure: error: Kerberos IV detection failed" 1>&2; exit 1; }
11418 fi
11419
11420 if test $ol_link_krb4 = yes -o $ol_link_krb5 = yes ; then
11421         cat >> confdefs.h <<\EOF
11422 #define HAVE_KERBEROS 1
11423 EOF
11424
11425
11426 elif test $ol_with_kerberos != auto -a $ol_with_kerberos != no ; then
11427         { echo "configure: error: Kerberos detection failed" 1>&2; exit 1; }
11428 fi
11429
11430         
11431 ol_link_tls=no
11432 if test $ol_with_tls != no ; then
11433         for ac_hdr in openssl/ssl.h ssl.h
11434 do
11435 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11436 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11437 echo "configure:11438: checking for $ac_hdr" >&5
11438 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11439   echo $ac_n "(cached) $ac_c" 1>&6
11440 else
11441   cat > conftest.$ac_ext <<EOF
11442 #line 11443 "configure"
11443 #include "confdefs.h"
11444 #include <$ac_hdr>
11445 EOF
11446 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11447 { (eval echo configure:11448: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11448 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11449 if test -z "$ac_err"; then
11450   rm -rf conftest*
11451   eval "ac_cv_header_$ac_safe=yes"
11452 else
11453   echo "$ac_err" >&5
11454   echo "configure: failed program was:" >&5
11455   cat conftest.$ac_ext >&5
11456   rm -rf conftest*
11457   eval "ac_cv_header_$ac_safe=no"
11458 fi
11459 rm -f conftest*
11460 fi
11461 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11462   echo "$ac_t""yes" 1>&6
11463     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11464   cat >> confdefs.h <<EOF
11465 #define $ac_tr_hdr 1
11466 EOF
11467  
11468 else
11469   echo "$ac_t""no" 1>&6
11470 fi
11471 done
11472
11473
11474         if test $ac_cv_header_openssl_ssl_h = yes \
11475                 -o $ac_cv_header_ssl_h = yes ; then
11476                 echo $ac_n "checking for SSLeay_add_ssl_algorithms in -lssl""... $ac_c" 1>&6
11477 echo "configure:11478: checking for SSLeay_add_ssl_algorithms in -lssl" >&5
11478 ac_lib_var=`echo ssl'_'SSLeay_add_ssl_algorithms | sed 'y%./+-:%__p__%'`
11479 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11480   echo $ac_n "(cached) $ac_c" 1>&6
11481 else
11482   ac_save_LIBS="$LIBS"
11483 LIBS="-lssl -lcrypto $LIBS"
11484 cat > conftest.$ac_ext <<EOF
11485 #line 11486 "configure"
11486 #include "confdefs.h"
11487 /* Override any gcc2 internal prototype to avoid an error.  */
11488 /* We use char because int might match the return type of a gcc2
11489     builtin and then its argument prototype would still apply.  */
11490 char SSLeay_add_ssl_algorithms();
11491
11492 int main() {
11493 SSLeay_add_ssl_algorithms()
11494 ; return 0; }
11495 EOF
11496 if { (eval echo configure:11497: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11497   rm -rf conftest*
11498   eval "ac_cv_lib_$ac_lib_var=yes"
11499 else
11500   echo "configure: failed program was:" >&5
11501   cat conftest.$ac_ext >&5
11502   rm -rf conftest*
11503   eval "ac_cv_lib_$ac_lib_var=no"
11504 fi
11505 rm -f conftest*
11506 LIBS="$ac_save_LIBS"
11507
11508 fi
11509 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11510   echo "$ac_t""yes" 1>&6
11511   have_ssleay=yes
11512                         need_rsaref=no
11513 else
11514   echo "$ac_t""no" 1>&6
11515 have_ssleay=no
11516 fi
11517
11518                         
11519                 if test $have_ssleay = no ; then
11520                         echo $ac_n "checking for SSL_library_init in -lssl""... $ac_c" 1>&6
11521 echo "configure:11522: checking for SSL_library_init in -lssl" >&5
11522 ac_lib_var=`echo ssl'_'SSL_library_init | sed 'y%./+-:%__p__%'`
11523 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11524   echo $ac_n "(cached) $ac_c" 1>&6
11525 else
11526   ac_save_LIBS="$LIBS"
11527 LIBS="-lssl -lcrypto $LIBS"
11528 cat > conftest.$ac_ext <<EOF
11529 #line 11530 "configure"
11530 #include "confdefs.h"
11531 /* Override any gcc2 internal prototype to avoid an error.  */
11532 /* We use char because int might match the return type of a gcc2
11533     builtin and then its argument prototype would still apply.  */
11534 char SSL_library_init();
11535
11536 int main() {
11537 SSL_library_init()
11538 ; return 0; }
11539 EOF
11540 if { (eval echo configure:11541: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11541   rm -rf conftest*
11542   eval "ac_cv_lib_$ac_lib_var=yes"
11543 else
11544   echo "configure: failed program was:" >&5
11545   cat conftest.$ac_ext >&5
11546   rm -rf conftest*
11547   eval "ac_cv_lib_$ac_lib_var=no"
11548 fi
11549 rm -f conftest*
11550 LIBS="$ac_save_LIBS"
11551
11552 fi
11553 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11554   echo "$ac_t""yes" 1>&6
11555   have_ssleay=yes
11556                                 need_rsaref=no
11557 else
11558   echo "$ac_t""no" 1>&6
11559 have_ssleay=no
11560 fi
11561
11562                 fi
11563
11564                 if test $have_ssleay = no ; then
11565                         echo $ac_n "checking for ssl3_accept in -lssl""... $ac_c" 1>&6
11566 echo "configure:11567: checking for ssl3_accept in -lssl" >&5
11567 ac_lib_var=`echo ssl'_'ssl3_accept | sed 'y%./+-:%__p__%'`
11568 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11569   echo $ac_n "(cached) $ac_c" 1>&6
11570 else
11571   ac_save_LIBS="$LIBS"
11572 LIBS="-lssl -lcrypto -lRSAglue -lrsaref $LIBS"
11573 cat > conftest.$ac_ext <<EOF
11574 #line 11575 "configure"
11575 #include "confdefs.h"
11576 /* Override any gcc2 internal prototype to avoid an error.  */
11577 /* We use char because int might match the return type of a gcc2
11578     builtin and then its argument prototype would still apply.  */
11579 char ssl3_accept();
11580
11581 int main() {
11582 ssl3_accept()
11583 ; return 0; }
11584 EOF
11585 if { (eval echo configure:11586: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11586   rm -rf conftest*
11587   eval "ac_cv_lib_$ac_lib_var=yes"
11588 else
11589   echo "configure: failed program was:" >&5
11590   cat conftest.$ac_ext >&5
11591   rm -rf conftest*
11592   eval "ac_cv_lib_$ac_lib_var=no"
11593 fi
11594 rm -f conftest*
11595 LIBS="$ac_save_LIBS"
11596
11597 fi
11598 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11599   echo "$ac_t""yes" 1>&6
11600   have_ssleay=yes
11601                                 need_rsaref=yes
11602 else
11603   echo "$ac_t""no" 1>&6
11604 have_ssleay=no
11605 fi
11606
11607                 fi
11608
11609                 if test $have_ssleay = yes ; then
11610                         ol_with_tls=found
11611                         ol_link_tls=yes
11612
11613                         cat >> confdefs.h <<\EOF
11614 #define HAVE_SSLEAY 1
11615 EOF
11616
11617
11618                         if test $need_rsaref = yes; then
11619                                 cat >> confdefs.h <<\EOF
11620 #define HAVE_RSAREF 1
11621 EOF
11622
11623
11624                                 TLS_LIBS="-lssl -lcrypto -lRSAglue -lrsaref"
11625                         else
11626                                 TLS_LIBS="-lssl -lcrypto"
11627                         fi
11628                 fi
11629                 echo $ac_n "checking OpenSSL library version (CRL checking capability)""... $ac_c" 1>&6
11630 echo "configure:11631: checking OpenSSL library version (CRL checking capability)" >&5
11631 if eval "test \"\${ol_cv_ssl_crl_compat+set}\" = set"; then
11632   echo $ac_n "(cached) $ac_c" 1>&6
11633 else
11634   
11635         cat > conftest.$ac_ext <<EOF
11636 #line 11637 "configure"
11637 #include "confdefs.h"
11638
11639 #ifdef HAVE_OPENSSL_SSL_H
11640 #include <openssl/ssl.h>
11641 #else
11642 #include <ssl.h>
11643 #endif
11644
11645 /* Require 0.9.7d+ */
11646 #if OPENSSL_VERSION_NUMBER >= 0x0090704fL
11647         char *__ssl_compat = "0.9.7d";
11648 #endif
11649         
11650 EOF
11651 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11652   egrep "__ssl_compat" >/dev/null 2>&1; then
11653   rm -rf conftest*
11654   ol_cv_ssl_crl_compat=yes
11655 else
11656   rm -rf conftest*
11657   ol_cv_ssl_crl_compat=no
11658 fi
11659 rm -f conftest*
11660
11661 fi
11662
11663 echo "$ac_t""$ol_cv_ssl_crl_compat" 1>&6
11664
11665                 if test $ol_cv_ssl_crl_compat = no ; then
11666                         ol_link_ssl=no
11667                 else 
11668                         cat >> confdefs.h <<\EOF
11669 #define HAVE_OPENSSL_CRL 1
11670 EOF
11671
11672                 fi
11673         fi
11674
11675 else
11676         echo "configure: warning: TLS data protection not supported!" 1>&2
11677 fi
11678
11679 WITH_TLS=no
11680 if test $ol_link_tls = yes ; then
11681         cat >> confdefs.h <<\EOF
11682 #define HAVE_TLS 1
11683 EOF
11684
11685         WITH_TLS=yes
11686
11687 elif test $ol_with_tls = auto ; then
11688         echo "configure: warning: Could not locate TLS/SSL package" 1>&2
11689         echo "configure: warning: TLS data protection not supported!" 1>&2
11690
11691 elif test $ol_with_tls != no ; then
11692         { echo "configure: error: Could not locate TLS/SSL package" 1>&2; exit 1; }
11693 fi
11694
11695 if test $ol_enable_lmpasswd != no; then
11696         if test $ol_link_tls != yes ; then
11697                 { echo "configure: error: LAN Manager passwords require OpenSSL" 1>&2; exit 1; }
11698         fi
11699
11700         cat >> confdefs.h <<\EOF
11701 #define SLAPD_LMHASH 1
11702 EOF
11703
11704 fi
11705
11706 ol_link_threads=no
11707
11708 if test $ol_with_threads = auto -o $ol_with_threads = yes \
11709         -o $ol_with_threads = nt ; then
11710
11711         
11712         echo $ac_n "checking for _beginthread""... $ac_c" 1>&6
11713 echo "configure:11714: checking for _beginthread" >&5
11714 if eval "test \"\${ac_cv_func__beginthread+set}\" = set"; then
11715   echo $ac_n "(cached) $ac_c" 1>&6
11716 else
11717   cat > conftest.$ac_ext <<EOF
11718 #line 11719 "configure"
11719 #include "confdefs.h"
11720 /* System header to define __stub macros and hopefully few prototypes,
11721     which can conflict with char _beginthread(); below.  */
11722 #include <assert.h>
11723 /* Override any gcc2 internal prototype to avoid an error.  */
11724 /* We use char because int might match the return type of a gcc2
11725     builtin and then its argument prototype would still apply.  */
11726 char _beginthread();
11727 char (*f)();
11728
11729 int main() {
11730
11731 /* The GNU C library defines this for functions which it implements
11732     to always fail with ENOSYS.  Some functions are actually named
11733     something starting with __ and the normal name is an alias.  */
11734 #if defined (__stub__beginthread) || defined (__stub____beginthread)
11735 choke me
11736 #else
11737 f = _beginthread;
11738 #endif
11739
11740 ; return 0; }
11741 EOF
11742 if { (eval echo configure:11743: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11743   rm -rf conftest*
11744   eval "ac_cv_func__beginthread=yes"
11745 else
11746   echo "configure: failed program was:" >&5
11747   cat conftest.$ac_ext >&5
11748   rm -rf conftest*
11749   eval "ac_cv_func__beginthread=no"
11750 fi
11751 rm -f conftest*
11752 fi
11753
11754 if eval "test \"`echo '$ac_cv_func_'_beginthread`\" = yes"; then
11755   echo "$ac_t""yes" 1>&6
11756   :
11757 else
11758   echo "$ac_t""no" 1>&6
11759 fi
11760
11761
11762         if test $ac_cv_func__beginthread = yes ; then
11763                 cat >> confdefs.h <<\EOF
11764 #define HAVE_NT_THREADS 1
11765 EOF
11766
11767                 ol_cv_nt_threads=yes
11768         fi
11769
11770
11771         if test "$ol_cv_nt_threads" = yes ; then
11772                 ol_link_threads=nt
11773                 ol_with_threads=found
11774                 ol_with_yielding_select=yes
11775
11776                 cat >> confdefs.h <<\EOF
11777 #define HAVE_NT_SERVICE_MANAGER 1
11778 EOF
11779
11780                 cat >> confdefs.h <<\EOF
11781 #define HAVE_NT_EVENT_LOG 1
11782 EOF
11783
11784         fi
11785
11786         if test $ol_with_threads = nt ; then
11787                 { echo "configure: error: could not locate NT Threads" 1>&2; exit 1; }
11788         fi
11789 fi
11790
11791 if test $ol_with_threads = auto -o $ol_with_threads = yes \
11792         -o $ol_with_threads = posix ; then
11793
11794         for ac_hdr in pthread.h
11795 do
11796 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11797 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11798 echo "configure:11799: checking for $ac_hdr" >&5
11799 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11800   echo $ac_n "(cached) $ac_c" 1>&6
11801 else
11802   cat > conftest.$ac_ext <<EOF
11803 #line 11804 "configure"
11804 #include "confdefs.h"
11805 #include <$ac_hdr>
11806 EOF
11807 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11808 { (eval echo configure:11809: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11809 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11810 if test -z "$ac_err"; then
11811   rm -rf conftest*
11812   eval "ac_cv_header_$ac_safe=yes"
11813 else
11814   echo "$ac_err" >&5
11815   echo "configure: failed program was:" >&5
11816   cat conftest.$ac_ext >&5
11817   rm -rf conftest*
11818   eval "ac_cv_header_$ac_safe=no"
11819 fi
11820 rm -f conftest*
11821 fi
11822 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11823   echo "$ac_t""yes" 1>&6
11824     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11825   cat >> confdefs.h <<EOF
11826 #define $ac_tr_hdr 1
11827 EOF
11828  
11829 else
11830   echo "$ac_t""no" 1>&6
11831 fi
11832 done
11833
11834
11835         if test $ac_cv_header_pthread_h = yes ; then
11836                 echo $ac_n "checking POSIX thread version""... $ac_c" 1>&6
11837 echo "configure:11838: checking POSIX thread version" >&5
11838 if eval "test \"\${ol_cv_pthread_version+set}\" = set"; then
11839   echo $ac_n "(cached) $ac_c" 1>&6
11840 else
11841   
11842         cat > conftest.$ac_ext <<EOF
11843 #line 11844 "configure"
11844 #include "confdefs.h"
11845
11846 #               include <pthread.h>
11847         
11848 int main() {
11849
11850                 int i = PTHREAD_CREATE_JOINABLE;
11851         
11852 ; return 0; }
11853 EOF
11854 if { (eval echo configure:11855: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11855   rm -rf conftest*
11856   
11857         cat > conftest.$ac_ext <<EOF
11858 #line 11859 "configure"
11859 #include "confdefs.h"
11860 #include <pthread.h>
11861 EOF
11862 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11863   egrep "pthread_detach" >/dev/null 2>&1; then
11864   rm -rf conftest*
11865   ol_cv_pthread_version=10
11866 else
11867   rm -rf conftest*
11868   ol_cv_pthread_version=8
11869 fi
11870 rm -f conftest*
11871
11872 else
11873   echo "configure: failed program was:" >&5
11874   cat conftest.$ac_ext >&5
11875   rm -rf conftest*
11876   
11877         cat > conftest.$ac_ext <<EOF
11878 #line 11879 "configure"
11879 #include "confdefs.h"
11880
11881 #               include <pthread.h>
11882 #               ifdef PTHREAD_CREATE_UNDETACHED
11883                 draft7
11884 #               endif
11885         
11886 EOF
11887 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11888   egrep "draft7" >/dev/null 2>&1; then
11889   rm -rf conftest*
11890   ol_cv_pthread_version=7
11891 else
11892   rm -rf conftest*
11893   
11894         cat > conftest.$ac_ext <<EOF
11895 #line 11896 "configure"
11896 #include "confdefs.h"
11897 #include <pthread.h>
11898 EOF
11899 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11900   egrep "pthread_attr_init" >/dev/null 2>&1; then
11901   rm -rf conftest*
11902   ol_cv_pthread_version=6
11903 else
11904   rm -rf conftest*
11905   
11906         cat > conftest.$ac_ext <<EOF
11907 #line 11908 "configure"
11908 #include "confdefs.h"
11909
11910 #               include <pthread.h>
11911 #ifdef          PTHREAD_MUTEX_INITIALIZER
11912                 draft5
11913 #endif
11914         
11915 EOF
11916 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11917   egrep "draft5" >/dev/null 2>&1; then
11918   rm -rf conftest*
11919   ol_cv_pthread_version=5
11920 else
11921   rm -rf conftest*
11922   ol_cv_pthread_version=4
11923 fi
11924 rm -f conftest*
11925  
11926 fi
11927 rm -f conftest*
11928  
11929 fi
11930 rm -f conftest*
11931  
11932 fi
11933 rm -f conftest*
11934
11935 fi
11936
11937 echo "$ac_t""$ol_cv_pthread_version" 1>&6
11938
11939
11940                 if test $ol_cv_pthread_version != 0 ; then
11941                         cat >> confdefs.h <<EOF
11942 #define HAVE_PTHREADS $ol_cv_pthread_version
11943 EOF
11944
11945                 else
11946                         { echo "configure: error: unknown pthread version" 1>&2; exit 1; }
11947                 fi
11948
11949                 # consider threads found
11950                 ol_with_threads=found
11951
11952                 
11953         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
11954 echo "configure:11955: checking for LinuxThreads pthread.h" >&5
11955 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
11956   echo $ac_n "(cached) $ac_c" 1>&6
11957 else
11958   cat > conftest.$ac_ext <<EOF
11959 #line 11960 "configure"
11960 #include "confdefs.h"
11961 #include <pthread.h>
11962 EOF
11963 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11964   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
11965   rm -rf conftest*
11966   ol_cv_header_linux_threads=yes
11967 else
11968   rm -rf conftest*
11969   ol_cv_header_linux_threads=no
11970 fi
11971 rm -f conftest*
11972
11973                 
11974 fi
11975
11976 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
11977         if test $ol_cv_header_linux_threads = yes; then
11978                 cat >> confdefs.h <<\EOF
11979 #define HAVE_LINUX_THREADS 1
11980 EOF
11981
11982         fi
11983
11984                 
11985         echo $ac_n "checking for GNU Pth pthread.h""... $ac_c" 1>&6
11986 echo "configure:11987: checking for GNU Pth pthread.h" >&5
11987 if eval "test \"\${ol_cv_header_gnu_pth_pthread_h+set}\" = set"; then
11988   echo $ac_n "(cached) $ac_c" 1>&6
11989 else
11990   cat > conftest.$ac_ext <<EOF
11991 #line 11992 "configure"
11992 #include "confdefs.h"
11993 #include <pthread.h>
11994 #ifdef _POSIX_THREAD_IS_GNU_PTH
11995         __gnu_pth__;
11996 #endif
11997
11998 EOF
11999 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12000   egrep "__gnu_pth__" >/dev/null 2>&1; then
12001   rm -rf conftest*
12002   ol_cv_header_gnu_pth_pthread_h=yes
12003 else
12004   rm -rf conftest*
12005   ol_cv_header_gnu_pth_pthread_h=no
12006 fi
12007 rm -f conftest*
12008
12009                 
12010 fi
12011
12012 echo "$ac_t""$ol_cv_header_gnu_pth_pthread_h" 1>&6
12013
12014
12015                 if test $ol_cv_header_gnu_pth_pthread_h = no ; then
12016                         for ac_hdr in sched.h
12017 do
12018 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12019 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12020 echo "configure:12021: checking for $ac_hdr" >&5
12021 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12022   echo $ac_n "(cached) $ac_c" 1>&6
12023 else
12024   cat > conftest.$ac_ext <<EOF
12025 #line 12026 "configure"
12026 #include "confdefs.h"
12027 #include <$ac_hdr>
12028 EOF
12029 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12030 { (eval echo configure:12031: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12031 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12032 if test -z "$ac_err"; then
12033   rm -rf conftest*
12034   eval "ac_cv_header_$ac_safe=yes"
12035 else
12036   echo "$ac_err" >&5
12037   echo "configure: failed program was:" >&5
12038   cat conftest.$ac_ext >&5
12039   rm -rf conftest*
12040   eval "ac_cv_header_$ac_safe=no"
12041 fi
12042 rm -f conftest*
12043 fi
12044 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12045   echo "$ac_t""yes" 1>&6
12046     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12047   cat >> confdefs.h <<EOF
12048 #define $ac_tr_hdr 1
12049 EOF
12050  
12051 else
12052   echo "$ac_t""no" 1>&6
12053 fi
12054 done
12055
12056                 fi
12057
12058                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
12059                                 echo $ac_n "checking for pthread_create in default libraries""... $ac_c" 1>&6
12060 echo "configure:12061: checking for pthread_create in default libraries" >&5
12061 if eval "test \"\${ol_cv_pthread_create+set}\" = set"; then
12062   echo $ac_n "(cached) $ac_c" 1>&6
12063 else
12064   
12065                 if test "$cross_compiling" = yes; then
12066   cat > conftest.$ac_ext <<EOF
12067 #line 12068 "configure"
12068 #include "confdefs.h"
12069 /* pthread test headers */
12070 #include <pthread.h>
12071 #if HAVE_PTHREADS < 7
12072 #include <errno.h>
12073 #endif
12074 #ifndef NULL
12075 #define NULL (void*)0
12076 #endif
12077
12078 static void *task(p)
12079         void *p;
12080 {
12081         return (void *) (p == NULL);
12082 }
12083
12084 int main() {
12085
12086         /* pthread test function */
12087 #ifndef PTHREAD_CREATE_DETACHED
12088 #define PTHREAD_CREATE_DETACHED 1
12089 #endif
12090         pthread_t t;
12091         int status;
12092         int detach = PTHREAD_CREATE_DETACHED;
12093
12094 #if HAVE_PTHREADS > 4
12095         /* Final pthreads */
12096         pthread_attr_t attr;
12097
12098         status = pthread_attr_init(&attr);
12099         if( status ) return status;
12100
12101 #if HAVE_PTHREADS < 7
12102         status = pthread_attr_setdetachstate(&attr, &detach);
12103         if( status < 0 ) status = errno;
12104 #else
12105         status = pthread_attr_setdetachstate(&attr, detach);
12106 #endif
12107         if( status ) return status;
12108         status = pthread_create( &t, &attr, task, NULL );
12109 #if HAVE_PTHREADS < 7
12110         if( status < 0 ) status = errno;
12111 #endif
12112         if( status ) return status;
12113 #else
12114         /* Draft 4 pthreads */
12115         status = pthread_create( &t, pthread_attr_default, task, NULL );
12116         if( status ) return errno;
12117
12118         /* give thread a chance to complete */
12119         /* it should remain joinable and hence detachable */
12120         sleep( 1 );
12121
12122         status = pthread_detach( &t );
12123         if( status ) return errno;
12124 #endif
12125
12126 #ifdef HAVE_LINUX_THREADS
12127         pthread_kill_other_threads_np();
12128 #endif
12129
12130         return 0;
12131
12132 ; return 0; }
12133 EOF
12134 if { (eval echo configure:12135: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12135   rm -rf conftest*
12136   ol_cv_pthread_create=yes
12137 else
12138   echo "configure: failed program was:" >&5
12139   cat conftest.$ac_ext >&5
12140   rm -rf conftest*
12141   ol_cv_pthread_create=no
12142 fi
12143 rm -f conftest*
12144 else
12145   cat > conftest.$ac_ext <<EOF
12146 #line 12147 "configure"
12147 #include "confdefs.h"
12148 /* pthread test headers */
12149 #include <pthread.h>
12150 #if HAVE_PTHREADS < 7
12151 #include <errno.h>
12152 #endif
12153 #ifndef NULL
12154 #define NULL (void*)0
12155 #endif
12156
12157 static void *task(p)
12158         void *p;
12159 {
12160         return (void *) (p == NULL);
12161 }
12162
12163
12164 int main(argc, argv)
12165         int argc;
12166         char **argv;
12167 {
12168
12169         /* pthread test function */
12170 #ifndef PTHREAD_CREATE_DETACHED
12171 #define PTHREAD_CREATE_DETACHED 1
12172 #endif
12173         pthread_t t;
12174         int status;
12175         int detach = PTHREAD_CREATE_DETACHED;
12176
12177 #if HAVE_PTHREADS > 4
12178         /* Final pthreads */
12179         pthread_attr_t attr;
12180
12181         status = pthread_attr_init(&attr);
12182         if( status ) return status;
12183
12184 #if HAVE_PTHREADS < 7
12185         status = pthread_attr_setdetachstate(&attr, &detach);
12186         if( status < 0 ) status = errno;
12187 #else
12188         status = pthread_attr_setdetachstate(&attr, detach);
12189 #endif
12190         if( status ) return status;
12191         status = pthread_create( &t, &attr, task, NULL );
12192 #if HAVE_PTHREADS < 7
12193         if( status < 0 ) status = errno;
12194 #endif
12195         if( status ) return status;
12196 #else
12197         /* Draft 4 pthreads */
12198         status = pthread_create( &t, pthread_attr_default, task, NULL );
12199         if( status ) return errno;
12200
12201         /* give thread a chance to complete */
12202         /* it should remain joinable and hence detachable */
12203         sleep( 1 );
12204
12205         status = pthread_detach( &t );
12206         if( status ) return errno;
12207 #endif
12208
12209 #ifdef HAVE_LINUX_THREADS
12210         pthread_kill_other_threads_np();
12211 #endif
12212
12213         return 0;
12214
12215 }
12216
12217 EOF
12218 if { (eval echo configure:12219: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
12219 then
12220   ol_cv_pthread_create=yes
12221 else
12222   echo "configure: failed program was:" >&5
12223   cat conftest.$ac_ext >&5
12224   rm -fr conftest*
12225   ol_cv_pthread_create=no
12226 fi
12227 rm -fr conftest*
12228 fi
12229
12230 fi
12231
12232 echo "$ac_t""$ol_cv_pthread_create" 1>&6
12233
12234                 if test $ol_cv_pthread_create != no ; then
12235                         ol_link_threads=posix
12236                         ol_link_pthreads=""
12237                 fi
12238                 
12239                 # Pthread try link: -kthread (ol_cv_pthread_kthread)
12240 if test "$ol_link_threads" = no ; then
12241         # try -kthread
12242         echo $ac_n "checking for pthread link with -kthread""... $ac_c" 1>&6
12243 echo "configure:12244: checking for pthread link with -kthread" >&5
12244 if eval "test \"\${ol_cv_pthread_kthread+set}\" = set"; then
12245   echo $ac_n "(cached) $ac_c" 1>&6
12246 else
12247   
12248                 # save the flags
12249                 ol_LIBS="$LIBS"
12250                 LIBS="-kthread $LIBS"
12251
12252                 if test "$cross_compiling" = yes; then
12253   cat > conftest.$ac_ext <<EOF
12254 #line 12255 "configure"
12255 #include "confdefs.h"
12256 /* pthread test headers */
12257 #include <pthread.h>
12258 #if HAVE_PTHREADS < 7
12259 #include <errno.h>
12260 #endif
12261 #ifndef NULL
12262 #define NULL (void*)0
12263 #endif
12264
12265 static void *task(p)
12266         void *p;
12267 {
12268         return (void *) (p == NULL);
12269 }
12270
12271 int main() {
12272
12273         /* pthread test function */
12274 #ifndef PTHREAD_CREATE_DETACHED
12275 #define PTHREAD_CREATE_DETACHED 1
12276 #endif
12277         pthread_t t;
12278         int status;
12279         int detach = PTHREAD_CREATE_DETACHED;
12280
12281 #if HAVE_PTHREADS > 4
12282         /* Final pthreads */
12283         pthread_attr_t attr;
12284
12285         status = pthread_attr_init(&attr);
12286         if( status ) return status;
12287
12288 #if HAVE_PTHREADS < 7
12289         status = pthread_attr_setdetachstate(&attr, &detach);
12290         if( status < 0 ) status = errno;
12291 #else
12292         status = pthread_attr_setdetachstate(&attr, detach);
12293 #endif
12294         if( status ) return status;
12295         status = pthread_create( &t, &attr, task, NULL );
12296 #if HAVE_PTHREADS < 7
12297         if( status < 0 ) status = errno;
12298 #endif
12299         if( status ) return status;
12300 #else
12301         /* Draft 4 pthreads */
12302         status = pthread_create( &t, pthread_attr_default, task, NULL );
12303         if( status ) return errno;
12304
12305         /* give thread a chance to complete */
12306         /* it should remain joinable and hence detachable */
12307         sleep( 1 );
12308
12309         status = pthread_detach( &t );
12310         if( status ) return errno;
12311 #endif
12312
12313 #ifdef HAVE_LINUX_THREADS
12314         pthread_kill_other_threads_np();
12315 #endif
12316
12317         return 0;
12318
12319 ; return 0; }
12320 EOF
12321 if { (eval echo configure:12322: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12322   rm -rf conftest*
12323   ol_cv_pthread_kthread=yes
12324 else
12325   echo "configure: failed program was:" >&5
12326   cat conftest.$ac_ext >&5
12327   rm -rf conftest*
12328   ol_cv_pthread_kthread=no
12329 fi
12330 rm -f conftest*
12331 else
12332   cat > conftest.$ac_ext <<EOF
12333 #line 12334 "configure"
12334 #include "confdefs.h"
12335 /* pthread test headers */
12336 #include <pthread.h>
12337 #if HAVE_PTHREADS < 7
12338 #include <errno.h>
12339 #endif
12340 #ifndef NULL
12341 #define NULL (void*)0
12342 #endif
12343
12344 static void *task(p)
12345         void *p;
12346 {
12347         return (void *) (p == NULL);
12348 }
12349
12350
12351 int main(argc, argv)
12352         int argc;
12353         char **argv;
12354 {
12355
12356         /* pthread test function */
12357 #ifndef PTHREAD_CREATE_DETACHED
12358 #define PTHREAD_CREATE_DETACHED 1
12359 #endif
12360         pthread_t t;
12361         int status;
12362         int detach = PTHREAD_CREATE_DETACHED;
12363
12364 #if HAVE_PTHREADS > 4
12365         /* Final pthreads */
12366         pthread_attr_t attr;
12367
12368         status = pthread_attr_init(&attr);
12369         if( status ) return status;
12370
12371 #if HAVE_PTHREADS < 7
12372         status = pthread_attr_setdetachstate(&attr, &detach);
12373         if( status < 0 ) status = errno;
12374 #else
12375         status = pthread_attr_setdetachstate(&attr, detach);
12376 #endif
12377         if( status ) return status;
12378         status = pthread_create( &t, &attr, task, NULL );
12379 #if HAVE_PTHREADS < 7
12380         if( status < 0 ) status = errno;
12381 #endif
12382         if( status ) return status;
12383 #else
12384         /* Draft 4 pthreads */
12385         status = pthread_create( &t, pthread_attr_default, task, NULL );
12386         if( status ) return errno;
12387
12388         /* give thread a chance to complete */
12389         /* it should remain joinable and hence detachable */
12390         sleep( 1 );
12391
12392         status = pthread_detach( &t );
12393         if( status ) return errno;
12394 #endif
12395
12396 #ifdef HAVE_LINUX_THREADS
12397         pthread_kill_other_threads_np();
12398 #endif
12399
12400         return 0;
12401
12402 }
12403
12404 EOF
12405 if { (eval echo configure:12406: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
12406 then
12407   ol_cv_pthread_kthread=yes
12408 else
12409   echo "configure: failed program was:" >&5
12410   cat conftest.$ac_ext >&5
12411   rm -fr conftest*
12412   ol_cv_pthread_kthread=no
12413 fi
12414 rm -fr conftest*
12415 fi
12416
12417
12418                 # restore the LIBS
12419                 LIBS="$ol_LIBS"
12420         
12421 fi
12422
12423 echo "$ac_t""$ol_cv_pthread_kthread" 1>&6
12424
12425         if test $ol_cv_pthread_kthread = yes ; then
12426                 ol_link_pthreads="-kthread"
12427                 ol_link_threads=posix
12428         fi
12429 fi
12430
12431                 # Pthread try link: -pthread (ol_cv_pthread_pthread)
12432 if test "$ol_link_threads" = no ; then
12433         # try -pthread
12434         echo $ac_n "checking for pthread link with -pthread""... $ac_c" 1>&6
12435 echo "configure:12436: checking for pthread link with -pthread" >&5
12436 if eval "test \"\${ol_cv_pthread_pthread+set}\" = set"; then
12437   echo $ac_n "(cached) $ac_c" 1>&6
12438 else
12439   
12440                 # save the flags
12441                 ol_LIBS="$LIBS"
12442                 LIBS="-pthread $LIBS"
12443
12444                 if test "$cross_compiling" = yes; then
12445   cat > conftest.$ac_ext <<EOF
12446 #line 12447 "configure"
12447 #include "confdefs.h"
12448 /* pthread test headers */
12449 #include <pthread.h>
12450 #if HAVE_PTHREADS < 7
12451 #include <errno.h>
12452 #endif
12453 #ifndef NULL
12454 #define NULL (void*)0
12455 #endif
12456
12457 static void *task(p)
12458         void *p;
12459 {
12460         return (void *) (p == NULL);
12461 }
12462
12463 int main() {
12464
12465         /* pthread test function */
12466 #ifndef PTHREAD_CREATE_DETACHED
12467 #define PTHREAD_CREATE_DETACHED 1
12468 #endif
12469         pthread_t t;
12470         int status;
12471         int detach = PTHREAD_CREATE_DETACHED;
12472
12473 #if HAVE_PTHREADS > 4
12474         /* Final pthreads */
12475         pthread_attr_t attr;
12476
12477         status = pthread_attr_init(&attr);
12478         if( status ) return status;
12479
12480 #if HAVE_PTHREADS < 7
12481         status = pthread_attr_setdetachstate(&attr, &detach);
12482         if( status < 0 ) status = errno;
12483 #else
12484         status = pthread_attr_setdetachstate(&attr, detach);
12485 #endif
12486         if( status ) return status;
12487         status = pthread_create( &t, &attr, task, NULL );
12488 #if HAVE_PTHREADS < 7
12489         if( status < 0 ) status = errno;
12490 #endif
12491         if( status ) return status;
12492 #else
12493         /* Draft 4 pthreads */
12494         status = pthread_create( &t, pthread_attr_default, task, NULL );
12495         if( status ) return errno;
12496
12497         /* give thread a chance to complete */
12498         /* it should remain joinable and hence detachable */
12499         sleep( 1 );
12500
12501         status = pthread_detach( &t );
12502         if( status ) return errno;
12503 #endif
12504
12505 #ifdef HAVE_LINUX_THREADS
12506         pthread_kill_other_threads_np();
12507 #endif
12508
12509         return 0;
12510
12511 ; return 0; }
12512 EOF
12513 if { (eval echo configure:12514: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12514   rm -rf conftest*
12515   ol_cv_pthread_pthread=yes
12516 else
12517   echo "configure: failed program was:" >&5
12518   cat conftest.$ac_ext >&5
12519   rm -rf conftest*
12520   ol_cv_pthread_pthread=no
12521 fi
12522 rm -f conftest*
12523 else
12524   cat > conftest.$ac_ext <<EOF
12525 #line 12526 "configure"
12526 #include "confdefs.h"
12527 /* pthread test headers */
12528 #include <pthread.h>
12529 #if HAVE_PTHREADS < 7
12530 #include <errno.h>
12531 #endif
12532 #ifndef NULL
12533 #define NULL (void*)0
12534 #endif
12535
12536 static void *task(p)
12537         void *p;
12538 {
12539         return (void *) (p == NULL);
12540 }
12541
12542
12543 int main(argc, argv)
12544         int argc;
12545         char **argv;
12546 {
12547
12548         /* pthread test function */
12549 #ifndef PTHREAD_CREATE_DETACHED
12550 #define PTHREAD_CREATE_DETACHED 1
12551 #endif
12552         pthread_t t;
12553         int status;
12554         int detach = PTHREAD_CREATE_DETACHED;
12555
12556 #if HAVE_PTHREADS > 4
12557         /* Final pthreads */
12558         pthread_attr_t attr;
12559
12560         status = pthread_attr_init(&attr);
12561         if( status ) return status;
12562
12563 #if HAVE_PTHREADS < 7
12564         status = pthread_attr_setdetachstate(&attr, &detach);
12565         if( status < 0 ) status = errno;
12566 #else
12567         status = pthread_attr_setdetachstate(&attr, detach);
12568 #endif
12569         if( status ) return status;
12570         status = pthread_create( &t, &attr, task, NULL );
12571 #if HAVE_PTHREADS < 7
12572         if( status < 0 ) status = errno;
12573 #endif
12574         if( status ) return status;
12575 #else
12576         /* Draft 4 pthreads */
12577         status = pthread_create( &t, pthread_attr_default, task, NULL );
12578         if( status ) return errno;
12579
12580         /* give thread a chance to complete */
12581         /* it should remain joinable and hence detachable */
12582         sleep( 1 );
12583
12584         status = pthread_detach( &t );
12585         if( status ) return errno;
12586 #endif
12587
12588 #ifdef HAVE_LINUX_THREADS
12589         pthread_kill_other_threads_np();
12590 #endif
12591
12592         return 0;
12593
12594 }
12595
12596 EOF
12597 if { (eval echo configure:12598: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
12598 then
12599   ol_cv_pthread_pthread=yes
12600 else
12601   echo "configure: failed program was:" >&5
12602   cat conftest.$ac_ext >&5
12603   rm -fr conftest*
12604   ol_cv_pthread_pthread=no
12605 fi
12606 rm -fr conftest*
12607 fi
12608
12609
12610                 # restore the LIBS
12611                 LIBS="$ol_LIBS"
12612         
12613 fi
12614
12615 echo "$ac_t""$ol_cv_pthread_pthread" 1>&6
12616
12617         if test $ol_cv_pthread_pthread = yes ; then
12618                 ol_link_pthreads="-pthread"
12619                 ol_link_threads=posix
12620         fi
12621 fi
12622
12623                 # Pthread try link: -pthreads (ol_cv_pthread_pthreads)
12624 if test "$ol_link_threads" = no ; then
12625         # try -pthreads
12626         echo $ac_n "checking for pthread link with -pthreads""... $ac_c" 1>&6
12627 echo "configure:12628: checking for pthread link with -pthreads" >&5
12628 if eval "test \"\${ol_cv_pthread_pthreads+set}\" = set"; then
12629   echo $ac_n "(cached) $ac_c" 1>&6
12630 else
12631   
12632                 # save the flags
12633                 ol_LIBS="$LIBS"
12634                 LIBS="-pthreads $LIBS"
12635
12636                 if test "$cross_compiling" = yes; then
12637   cat > conftest.$ac_ext <<EOF
12638 #line 12639 "configure"
12639 #include "confdefs.h"
12640 /* pthread test headers */
12641 #include <pthread.h>
12642 #if HAVE_PTHREADS < 7
12643 #include <errno.h>
12644 #endif
12645 #ifndef NULL
12646 #define NULL (void*)0
12647 #endif
12648
12649 static void *task(p)
12650         void *p;
12651 {
12652         return (void *) (p == NULL);
12653 }
12654
12655 int main() {
12656
12657         /* pthread test function */
12658 #ifndef PTHREAD_CREATE_DETACHED
12659 #define PTHREAD_CREATE_DETACHED 1
12660 #endif
12661         pthread_t t;
12662         int status;
12663         int detach = PTHREAD_CREATE_DETACHED;
12664
12665 #if HAVE_PTHREADS > 4
12666         /* Final pthreads */
12667         pthread_attr_t attr;
12668
12669         status = pthread_attr_init(&attr);
12670         if( status ) return status;
12671
12672 #if HAVE_PTHREADS < 7
12673         status = pthread_attr_setdetachstate(&attr, &detach);
12674         if( status < 0 ) status = errno;
12675 #else
12676         status = pthread_attr_setdetachstate(&attr, detach);
12677 #endif
12678         if( status ) return status;
12679         status = pthread_create( &t, &attr, task, NULL );
12680 #if HAVE_PTHREADS < 7
12681         if( status < 0 ) status = errno;
12682 #endif
12683         if( status ) return status;
12684 #else
12685         /* Draft 4 pthreads */
12686         status = pthread_create( &t, pthread_attr_default, task, NULL );
12687         if( status ) return errno;
12688
12689         /* give thread a chance to complete */
12690         /* it should remain joinable and hence detachable */
12691         sleep( 1 );
12692
12693         status = pthread_detach( &t );
12694         if( status ) return errno;
12695 #endif
12696
12697 #ifdef HAVE_LINUX_THREADS
12698         pthread_kill_other_threads_np();
12699 #endif
12700
12701         return 0;
12702
12703 ; return 0; }
12704 EOF
12705 if { (eval echo configure:12706: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12706   rm -rf conftest*
12707   ol_cv_pthread_pthreads=yes
12708 else
12709   echo "configure: failed program was:" >&5
12710   cat conftest.$ac_ext >&5
12711   rm -rf conftest*
12712   ol_cv_pthread_pthreads=no
12713 fi
12714 rm -f conftest*
12715 else
12716   cat > conftest.$ac_ext <<EOF
12717 #line 12718 "configure"
12718 #include "confdefs.h"
12719 /* pthread test headers */
12720 #include <pthread.h>
12721 #if HAVE_PTHREADS < 7
12722 #include <errno.h>
12723 #endif
12724 #ifndef NULL
12725 #define NULL (void*)0
12726 #endif
12727
12728 static void *task(p)
12729         void *p;
12730 {
12731         return (void *) (p == NULL);
12732 }
12733
12734
12735 int main(argc, argv)
12736         int argc;
12737         char **argv;
12738 {
12739
12740         /* pthread test function */
12741 #ifndef PTHREAD_CREATE_DETACHED
12742 #define PTHREAD_CREATE_DETACHED 1
12743 #endif
12744         pthread_t t;
12745         int status;
12746         int detach = PTHREAD_CREATE_DETACHED;
12747
12748 #if HAVE_PTHREADS > 4
12749         /* Final pthreads */
12750         pthread_attr_t attr;
12751
12752         status = pthread_attr_init(&attr);
12753         if( status ) return status;
12754
12755 #if HAVE_PTHREADS < 7
12756         status = pthread_attr_setdetachstate(&attr, &detach);
12757         if( status < 0 ) status = errno;
12758 #else
12759         status = pthread_attr_setdetachstate(&attr, detach);
12760 #endif
12761         if( status ) return status;
12762         status = pthread_create( &t, &attr, task, NULL );
12763 #if HAVE_PTHREADS < 7
12764         if( status < 0 ) status = errno;
12765 #endif
12766         if( status ) return status;
12767 #else
12768         /* Draft 4 pthreads */
12769         status = pthread_create( &t, pthread_attr_default, task, NULL );
12770         if( status ) return errno;
12771
12772         /* give thread a chance to complete */
12773         /* it should remain joinable and hence detachable */
12774         sleep( 1 );
12775
12776         status = pthread_detach( &t );
12777         if( status ) return errno;
12778 #endif
12779
12780 #ifdef HAVE_LINUX_THREADS
12781         pthread_kill_other_threads_np();
12782 #endif
12783
12784         return 0;
12785
12786 }
12787
12788 EOF
12789 if { (eval echo configure:12790: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
12790 then
12791   ol_cv_pthread_pthreads=yes
12792 else
12793   echo "configure: failed program was:" >&5
12794   cat conftest.$ac_ext >&5
12795   rm -fr conftest*
12796   ol_cv_pthread_pthreads=no
12797 fi
12798 rm -fr conftest*
12799 fi
12800
12801
12802                 # restore the LIBS
12803                 LIBS="$ol_LIBS"
12804         
12805 fi
12806
12807 echo "$ac_t""$ol_cv_pthread_pthreads" 1>&6
12808
12809         if test $ol_cv_pthread_pthreads = yes ; then
12810                 ol_link_pthreads="-pthreads"
12811                 ol_link_threads=posix
12812         fi
12813 fi
12814
12815                 # Pthread try link: -mthreads (ol_cv_pthread_mthreads)
12816 if test "$ol_link_threads" = no ; then
12817         # try -mthreads
12818         echo $ac_n "checking for pthread link with -mthreads""... $ac_c" 1>&6
12819 echo "configure:12820: checking for pthread link with -mthreads" >&5
12820 if eval "test \"\${ol_cv_pthread_mthreads+set}\" = set"; then
12821   echo $ac_n "(cached) $ac_c" 1>&6
12822 else
12823   
12824                 # save the flags
12825                 ol_LIBS="$LIBS"
12826                 LIBS="-mthreads $LIBS"
12827
12828                 if test "$cross_compiling" = yes; then
12829   cat > conftest.$ac_ext <<EOF
12830 #line 12831 "configure"
12831 #include "confdefs.h"
12832 /* pthread test headers */
12833 #include <pthread.h>
12834 #if HAVE_PTHREADS < 7
12835 #include <errno.h>
12836 #endif
12837 #ifndef NULL
12838 #define NULL (void*)0
12839 #endif
12840
12841 static void *task(p)
12842         void *p;
12843 {
12844         return (void *) (p == NULL);
12845 }
12846
12847 int main() {
12848
12849         /* pthread test function */
12850 #ifndef PTHREAD_CREATE_DETACHED
12851 #define PTHREAD_CREATE_DETACHED 1
12852 #endif
12853         pthread_t t;
12854         int status;
12855         int detach = PTHREAD_CREATE_DETACHED;
12856
12857 #if HAVE_PTHREADS > 4
12858         /* Final pthreads */
12859         pthread_attr_t attr;
12860
12861         status = pthread_attr_init(&attr);
12862         if( status ) return status;
12863
12864 #if HAVE_PTHREADS < 7
12865         status = pthread_attr_setdetachstate(&attr, &detach);
12866         if( status < 0 ) status = errno;
12867 #else
12868         status = pthread_attr_setdetachstate(&attr, detach);
12869 #endif
12870         if( status ) return status;
12871         status = pthread_create( &t, &attr, task, NULL );
12872 #if HAVE_PTHREADS < 7
12873         if( status < 0 ) status = errno;
12874 #endif
12875         if( status ) return status;
12876 #else
12877         /* Draft 4 pthreads */
12878         status = pthread_create( &t, pthread_attr_default, task, NULL );
12879         if( status ) return errno;
12880
12881         /* give thread a chance to complete */
12882         /* it should remain joinable and hence detachable */
12883         sleep( 1 );
12884
12885         status = pthread_detach( &t );
12886         if( status ) return errno;
12887 #endif
12888
12889 #ifdef HAVE_LINUX_THREADS
12890         pthread_kill_other_threads_np();
12891 #endif
12892
12893         return 0;
12894
12895 ; return 0; }
12896 EOF
12897 if { (eval echo configure:12898: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12898   rm -rf conftest*
12899   ol_cv_pthread_mthreads=yes
12900 else
12901   echo "configure: failed program was:" >&5
12902   cat conftest.$ac_ext >&5
12903   rm -rf conftest*
12904   ol_cv_pthread_mthreads=no
12905 fi
12906 rm -f conftest*
12907 else
12908   cat > conftest.$ac_ext <<EOF
12909 #line 12910 "configure"
12910 #include "confdefs.h"
12911 /* pthread test headers */
12912 #include <pthread.h>
12913 #if HAVE_PTHREADS < 7
12914 #include <errno.h>
12915 #endif
12916 #ifndef NULL
12917 #define NULL (void*)0
12918 #endif
12919
12920 static void *task(p)
12921         void *p;
12922 {
12923         return (void *) (p == NULL);
12924 }
12925
12926
12927 int main(argc, argv)
12928         int argc;
12929         char **argv;
12930 {
12931
12932         /* pthread test function */
12933 #ifndef PTHREAD_CREATE_DETACHED
12934 #define PTHREAD_CREATE_DETACHED 1
12935 #endif
12936         pthread_t t;
12937         int status;
12938         int detach = PTHREAD_CREATE_DETACHED;
12939
12940 #if HAVE_PTHREADS > 4
12941         /* Final pthreads */
12942         pthread_attr_t attr;
12943
12944         status = pthread_attr_init(&attr);
12945         if( status ) return status;
12946
12947 #if HAVE_PTHREADS < 7
12948         status = pthread_attr_setdetachstate(&attr, &detach);
12949         if( status < 0 ) status = errno;
12950 #else
12951         status = pthread_attr_setdetachstate(&attr, detach);
12952 #endif
12953         if( status ) return status;
12954         status = pthread_create( &t, &attr, task, NULL );
12955 #if HAVE_PTHREADS < 7
12956         if( status < 0 ) status = errno;
12957 #endif
12958         if( status ) return status;
12959 #else
12960         /* Draft 4 pthreads */
12961         status = pthread_create( &t, pthread_attr_default, task, NULL );
12962         if( status ) return errno;
12963
12964         /* give thread a chance to complete */
12965         /* it should remain joinable and hence detachable */
12966         sleep( 1 );
12967
12968         status = pthread_detach( &t );
12969         if( status ) return errno;
12970 #endif
12971
12972 #ifdef HAVE_LINUX_THREADS
12973         pthread_kill_other_threads_np();
12974 #endif
12975
12976         return 0;
12977
12978 }
12979
12980 EOF
12981 if { (eval echo configure:12982: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
12982 then
12983   ol_cv_pthread_mthreads=yes
12984 else
12985   echo "configure: failed program was:" >&5
12986   cat conftest.$ac_ext >&5
12987   rm -fr conftest*
12988   ol_cv_pthread_mthreads=no
12989 fi
12990 rm -fr conftest*
12991 fi
12992
12993
12994                 # restore the LIBS
12995                 LIBS="$ol_LIBS"
12996         
12997 fi
12998
12999 echo "$ac_t""$ol_cv_pthread_mthreads" 1>&6
13000
13001         if test $ol_cv_pthread_mthreads = yes ; then
13002                 ol_link_pthreads="-mthreads"
13003                 ol_link_threads=posix
13004         fi
13005 fi
13006
13007                 # Pthread try link: -thread (ol_cv_pthread_thread)
13008 if test "$ol_link_threads" = no ; then
13009         # try -thread
13010         echo $ac_n "checking for pthread link with -thread""... $ac_c" 1>&6
13011 echo "configure:13012: checking for pthread link with -thread" >&5
13012 if eval "test \"\${ol_cv_pthread_thread+set}\" = set"; then
13013   echo $ac_n "(cached) $ac_c" 1>&6
13014 else
13015   
13016                 # save the flags
13017                 ol_LIBS="$LIBS"
13018                 LIBS="-thread $LIBS"
13019
13020                 if test "$cross_compiling" = yes; then
13021   cat > conftest.$ac_ext <<EOF
13022 #line 13023 "configure"
13023 #include "confdefs.h"
13024 /* pthread test headers */
13025 #include <pthread.h>
13026 #if HAVE_PTHREADS < 7
13027 #include <errno.h>
13028 #endif
13029 #ifndef NULL
13030 #define NULL (void*)0
13031 #endif
13032
13033 static void *task(p)
13034         void *p;
13035 {
13036         return (void *) (p == NULL);
13037 }
13038
13039 int main() {
13040
13041         /* pthread test function */
13042 #ifndef PTHREAD_CREATE_DETACHED
13043 #define PTHREAD_CREATE_DETACHED 1
13044 #endif
13045         pthread_t t;
13046         int status;
13047         int detach = PTHREAD_CREATE_DETACHED;
13048
13049 #if HAVE_PTHREADS > 4
13050         /* Final pthreads */
13051         pthread_attr_t attr;
13052
13053         status = pthread_attr_init(&attr);
13054         if( status ) return status;
13055
13056 #if HAVE_PTHREADS < 7
13057         status = pthread_attr_setdetachstate(&attr, &detach);
13058         if( status < 0 ) status = errno;
13059 #else
13060         status = pthread_attr_setdetachstate(&attr, detach);
13061 #endif
13062         if( status ) return status;
13063         status = pthread_create( &t, &attr, task, NULL );
13064 #if HAVE_PTHREADS < 7
13065         if( status < 0 ) status = errno;
13066 #endif
13067         if( status ) return status;
13068 #else
13069         /* Draft 4 pthreads */
13070         status = pthread_create( &t, pthread_attr_default, task, NULL );
13071         if( status ) return errno;
13072
13073         /* give thread a chance to complete */
13074         /* it should remain joinable and hence detachable */
13075         sleep( 1 );
13076
13077         status = pthread_detach( &t );
13078         if( status ) return errno;
13079 #endif
13080
13081 #ifdef HAVE_LINUX_THREADS
13082         pthread_kill_other_threads_np();
13083 #endif
13084
13085         return 0;
13086
13087 ; return 0; }
13088 EOF
13089 if { (eval echo configure:13090: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13090   rm -rf conftest*
13091   ol_cv_pthread_thread=yes
13092 else
13093   echo "configure: failed program was:" >&5
13094   cat conftest.$ac_ext >&5
13095   rm -rf conftest*
13096   ol_cv_pthread_thread=no
13097 fi
13098 rm -f conftest*
13099 else
13100   cat > conftest.$ac_ext <<EOF
13101 #line 13102 "configure"
13102 #include "confdefs.h"
13103 /* pthread test headers */
13104 #include <pthread.h>
13105 #if HAVE_PTHREADS < 7
13106 #include <errno.h>
13107 #endif
13108 #ifndef NULL
13109 #define NULL (void*)0
13110 #endif
13111
13112 static void *task(p)
13113         void *p;
13114 {
13115         return (void *) (p == NULL);
13116 }
13117
13118
13119 int main(argc, argv)
13120         int argc;
13121         char **argv;
13122 {
13123
13124         /* pthread test function */
13125 #ifndef PTHREAD_CREATE_DETACHED
13126 #define PTHREAD_CREATE_DETACHED 1
13127 #endif
13128         pthread_t t;
13129         int status;
13130         int detach = PTHREAD_CREATE_DETACHED;
13131
13132 #if HAVE_PTHREADS > 4
13133         /* Final pthreads */
13134         pthread_attr_t attr;
13135
13136         status = pthread_attr_init(&attr);
13137         if( status ) return status;
13138
13139 #if HAVE_PTHREADS < 7
13140         status = pthread_attr_setdetachstate(&attr, &detach);
13141         if( status < 0 ) status = errno;
13142 #else
13143         status = pthread_attr_setdetachstate(&attr, detach);
13144 #endif
13145         if( status ) return status;
13146         status = pthread_create( &t, &attr, task, NULL );
13147 #if HAVE_PTHREADS < 7
13148         if( status < 0 ) status = errno;
13149 #endif
13150         if( status ) return status;
13151 #else
13152         /* Draft 4 pthreads */
13153         status = pthread_create( &t, pthread_attr_default, task, NULL );
13154         if( status ) return errno;
13155
13156         /* give thread a chance to complete */
13157         /* it should remain joinable and hence detachable */
13158         sleep( 1 );
13159
13160         status = pthread_detach( &t );
13161         if( status ) return errno;
13162 #endif
13163
13164 #ifdef HAVE_LINUX_THREADS
13165         pthread_kill_other_threads_np();
13166 #endif
13167
13168         return 0;
13169
13170 }
13171
13172 EOF
13173 if { (eval echo configure:13174: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
13174 then
13175   ol_cv_pthread_thread=yes
13176 else
13177   echo "configure: failed program was:" >&5
13178   cat conftest.$ac_ext >&5
13179   rm -fr conftest*
13180   ol_cv_pthread_thread=no
13181 fi
13182 rm -fr conftest*
13183 fi
13184
13185
13186                 # restore the LIBS
13187                 LIBS="$ol_LIBS"
13188         
13189 fi
13190
13191 echo "$ac_t""$ol_cv_pthread_thread" 1>&6
13192
13193         if test $ol_cv_pthread_thread = yes ; then
13194                 ol_link_pthreads="-thread"
13195                 ol_link_threads=posix
13196         fi
13197 fi
13198
13199
13200                 # Pthread try link: -lpthread -lmach -lexc -lc_r (ol_cv_pthread_lpthread_lmach_lexc_lc_r)
13201 if test "$ol_link_threads" = no ; then
13202         # try -lpthread -lmach -lexc -lc_r
13203         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc -lc_r""... $ac_c" 1>&6
13204 echo "configure:13205: checking for pthread link with -lpthread -lmach -lexc -lc_r" >&5
13205 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc_lc_r+set}\" = set"; then
13206   echo $ac_n "(cached) $ac_c" 1>&6
13207 else
13208   
13209                 # save the flags
13210                 ol_LIBS="$LIBS"
13211                 LIBS="-lpthread -lmach -lexc -lc_r $LIBS"
13212
13213                 if test "$cross_compiling" = yes; then
13214   cat > conftest.$ac_ext <<EOF
13215 #line 13216 "configure"
13216 #include "confdefs.h"
13217 /* pthread test headers */
13218 #include <pthread.h>
13219 #if HAVE_PTHREADS < 7
13220 #include <errno.h>
13221 #endif
13222 #ifndef NULL
13223 #define NULL (void*)0
13224 #endif
13225
13226 static void *task(p)
13227         void *p;
13228 {
13229         return (void *) (p == NULL);
13230 }
13231
13232 int main() {
13233
13234         /* pthread test function */
13235 #ifndef PTHREAD_CREATE_DETACHED
13236 #define PTHREAD_CREATE_DETACHED 1
13237 #endif
13238         pthread_t t;
13239         int status;
13240         int detach = PTHREAD_CREATE_DETACHED;
13241
13242 #if HAVE_PTHREADS > 4
13243         /* Final pthreads */
13244         pthread_attr_t attr;
13245
13246         status = pthread_attr_init(&attr);
13247         if( status ) return status;
13248
13249 #if HAVE_PTHREADS < 7
13250         status = pthread_attr_setdetachstate(&attr, &detach);
13251         if( status < 0 ) status = errno;
13252 #else
13253         status = pthread_attr_setdetachstate(&attr, detach);
13254 #endif
13255         if( status ) return status;
13256         status = pthread_create( &t, &attr, task, NULL );
13257 #if HAVE_PTHREADS < 7
13258         if( status < 0 ) status = errno;
13259 #endif
13260         if( status ) return status;
13261 #else
13262         /* Draft 4 pthreads */
13263         status = pthread_create( &t, pthread_attr_default, task, NULL );
13264         if( status ) return errno;
13265
13266         /* give thread a chance to complete */
13267         /* it should remain joinable and hence detachable */
13268         sleep( 1 );
13269
13270         status = pthread_detach( &t );
13271         if( status ) return errno;
13272 #endif
13273
13274 #ifdef HAVE_LINUX_THREADS
13275         pthread_kill_other_threads_np();
13276 #endif
13277
13278         return 0;
13279
13280 ; return 0; }
13281 EOF
13282 if { (eval echo configure:13283: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13283   rm -rf conftest*
13284   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
13285 else
13286   echo "configure: failed program was:" >&5
13287   cat conftest.$ac_ext >&5
13288   rm -rf conftest*
13289   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
13290 fi
13291 rm -f conftest*
13292 else
13293   cat > conftest.$ac_ext <<EOF
13294 #line 13295 "configure"
13295 #include "confdefs.h"
13296 /* pthread test headers */
13297 #include <pthread.h>
13298 #if HAVE_PTHREADS < 7
13299 #include <errno.h>
13300 #endif
13301 #ifndef NULL
13302 #define NULL (void*)0
13303 #endif
13304
13305 static void *task(p)
13306         void *p;
13307 {
13308         return (void *) (p == NULL);
13309 }
13310
13311
13312 int main(argc, argv)
13313         int argc;
13314         char **argv;
13315 {
13316
13317         /* pthread test function */
13318 #ifndef PTHREAD_CREATE_DETACHED
13319 #define PTHREAD_CREATE_DETACHED 1
13320 #endif
13321         pthread_t t;
13322         int status;
13323         int detach = PTHREAD_CREATE_DETACHED;
13324
13325 #if HAVE_PTHREADS > 4
13326         /* Final pthreads */
13327         pthread_attr_t attr;
13328
13329         status = pthread_attr_init(&attr);
13330         if( status ) return status;
13331
13332 #if HAVE_PTHREADS < 7
13333         status = pthread_attr_setdetachstate(&attr, &detach);
13334         if( status < 0 ) status = errno;
13335 #else
13336         status = pthread_attr_setdetachstate(&attr, detach);
13337 #endif
13338         if( status ) return status;
13339         status = pthread_create( &t, &attr, task, NULL );
13340 #if HAVE_PTHREADS < 7
13341         if( status < 0 ) status = errno;
13342 #endif
13343         if( status ) return status;
13344 #else
13345         /* Draft 4 pthreads */
13346         status = pthread_create( &t, pthread_attr_default, task, NULL );
13347         if( status ) return errno;
13348
13349         /* give thread a chance to complete */
13350         /* it should remain joinable and hence detachable */
13351         sleep( 1 );
13352
13353         status = pthread_detach( &t );
13354         if( status ) return errno;
13355 #endif
13356
13357 #ifdef HAVE_LINUX_THREADS
13358         pthread_kill_other_threads_np();
13359 #endif
13360
13361         return 0;
13362
13363 }
13364
13365 EOF
13366 if { (eval echo configure:13367: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
13367 then
13368   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
13369 else
13370   echo "configure: failed program was:" >&5
13371   cat conftest.$ac_ext >&5
13372   rm -fr conftest*
13373   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
13374 fi
13375 rm -fr conftest*
13376 fi
13377
13378
13379                 # restore the LIBS
13380                 LIBS="$ol_LIBS"
13381         
13382 fi
13383
13384 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc_lc_r" 1>&6
13385
13386         if test $ol_cv_pthread_lpthread_lmach_lexc_lc_r = yes ; then
13387                 ol_link_pthreads="-lpthread -lmach -lexc -lc_r"
13388                 ol_link_threads=posix
13389         fi
13390 fi
13391
13392                 # Pthread try link: -lpthread -lmach -lexc (ol_cv_pthread_lpthread_lmach_lexc)
13393 if test "$ol_link_threads" = no ; then
13394         # try -lpthread -lmach -lexc
13395         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc""... $ac_c" 1>&6
13396 echo "configure:13397: checking for pthread link with -lpthread -lmach -lexc" >&5
13397 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc+set}\" = set"; then
13398   echo $ac_n "(cached) $ac_c" 1>&6
13399 else
13400   
13401                 # save the flags
13402                 ol_LIBS="$LIBS"
13403                 LIBS="-lpthread -lmach -lexc $LIBS"
13404
13405                 if test "$cross_compiling" = yes; then
13406   cat > conftest.$ac_ext <<EOF
13407 #line 13408 "configure"
13408 #include "confdefs.h"
13409 /* pthread test headers */
13410 #include <pthread.h>
13411 #if HAVE_PTHREADS < 7
13412 #include <errno.h>
13413 #endif
13414 #ifndef NULL
13415 #define NULL (void*)0
13416 #endif
13417
13418 static void *task(p)
13419         void *p;
13420 {
13421         return (void *) (p == NULL);
13422 }
13423
13424 int main() {
13425
13426         /* pthread test function */
13427 #ifndef PTHREAD_CREATE_DETACHED
13428 #define PTHREAD_CREATE_DETACHED 1
13429 #endif
13430         pthread_t t;
13431         int status;
13432         int detach = PTHREAD_CREATE_DETACHED;
13433
13434 #if HAVE_PTHREADS > 4
13435         /* Final pthreads */
13436         pthread_attr_t attr;
13437
13438         status = pthread_attr_init(&attr);
13439         if( status ) return status;
13440
13441 #if HAVE_PTHREADS < 7
13442         status = pthread_attr_setdetachstate(&attr, &detach);
13443         if( status < 0 ) status = errno;
13444 #else
13445         status = pthread_attr_setdetachstate(&attr, detach);
13446 #endif
13447         if( status ) return status;
13448         status = pthread_create( &t, &attr, task, NULL );
13449 #if HAVE_PTHREADS < 7
13450         if( status < 0 ) status = errno;
13451 #endif
13452         if( status ) return status;
13453 #else
13454         /* Draft 4 pthreads */
13455         status = pthread_create( &t, pthread_attr_default, task, NULL );
13456         if( status ) return errno;
13457
13458         /* give thread a chance to complete */
13459         /* it should remain joinable and hence detachable */
13460         sleep( 1 );
13461
13462         status = pthread_detach( &t );
13463         if( status ) return errno;
13464 #endif
13465
13466 #ifdef HAVE_LINUX_THREADS
13467         pthread_kill_other_threads_np();
13468 #endif
13469
13470         return 0;
13471
13472 ; return 0; }
13473 EOF
13474 if { (eval echo configure:13475: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13475   rm -rf conftest*
13476   ol_cv_pthread_lpthread_lmach_lexc=yes
13477 else
13478   echo "configure: failed program was:" >&5
13479   cat conftest.$ac_ext >&5
13480   rm -rf conftest*
13481   ol_cv_pthread_lpthread_lmach_lexc=no
13482 fi
13483 rm -f conftest*
13484 else
13485   cat > conftest.$ac_ext <<EOF
13486 #line 13487 "configure"
13487 #include "confdefs.h"
13488 /* pthread test headers */
13489 #include <pthread.h>
13490 #if HAVE_PTHREADS < 7
13491 #include <errno.h>
13492 #endif
13493 #ifndef NULL
13494 #define NULL (void*)0
13495 #endif
13496
13497 static void *task(p)
13498         void *p;
13499 {
13500         return (void *) (p == NULL);
13501 }
13502
13503
13504 int main(argc, argv)
13505         int argc;
13506         char **argv;
13507 {
13508
13509         /* pthread test function */
13510 #ifndef PTHREAD_CREATE_DETACHED
13511 #define PTHREAD_CREATE_DETACHED 1
13512 #endif
13513         pthread_t t;
13514         int status;
13515         int detach = PTHREAD_CREATE_DETACHED;
13516
13517 #if HAVE_PTHREADS > 4
13518         /* Final pthreads */
13519         pthread_attr_t attr;
13520
13521         status = pthread_attr_init(&attr);
13522         if( status ) return status;
13523
13524 #if HAVE_PTHREADS < 7
13525         status = pthread_attr_setdetachstate(&attr, &detach);
13526         if( status < 0 ) status = errno;
13527 #else
13528         status = pthread_attr_setdetachstate(&attr, detach);
13529 #endif
13530         if( status ) return status;
13531         status = pthread_create( &t, &attr, task, NULL );
13532 #if HAVE_PTHREADS < 7
13533         if( status < 0 ) status = errno;
13534 #endif
13535         if( status ) return status;
13536 #else
13537         /* Draft 4 pthreads */
13538         status = pthread_create( &t, pthread_attr_default, task, NULL );
13539         if( status ) return errno;
13540
13541         /* give thread a chance to complete */
13542         /* it should remain joinable and hence detachable */
13543         sleep( 1 );
13544
13545         status = pthread_detach( &t );
13546         if( status ) return errno;
13547 #endif
13548
13549 #ifdef HAVE_LINUX_THREADS
13550         pthread_kill_other_threads_np();
13551 #endif
13552
13553         return 0;
13554
13555 }
13556
13557 EOF
13558 if { (eval echo configure:13559: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
13559 then
13560   ol_cv_pthread_lpthread_lmach_lexc=yes
13561 else
13562   echo "configure: failed program was:" >&5
13563   cat conftest.$ac_ext >&5
13564   rm -fr conftest*
13565   ol_cv_pthread_lpthread_lmach_lexc=no
13566 fi
13567 rm -fr conftest*
13568 fi
13569
13570
13571                 # restore the LIBS
13572                 LIBS="$ol_LIBS"
13573         
13574 fi
13575
13576 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc" 1>&6
13577
13578         if test $ol_cv_pthread_lpthread_lmach_lexc = yes ; then
13579                 ol_link_pthreads="-lpthread -lmach -lexc"
13580                 ol_link_threads=posix
13581         fi
13582 fi
13583
13584
13585                 # Pthread try link: -lpthread -Wl,-woff,85 (ol_cv_pthread_lib_lpthread_woff)
13586 if test "$ol_link_threads" = no ; then
13587         # try -lpthread -Wl,-woff,85
13588         echo $ac_n "checking for pthread link with -lpthread -Wl,-woff,85""... $ac_c" 1>&6
13589 echo "configure:13590: checking for pthread link with -lpthread -Wl,-woff,85" >&5
13590 if eval "test \"\${ol_cv_pthread_lib_lpthread_woff+set}\" = set"; then
13591   echo $ac_n "(cached) $ac_c" 1>&6
13592 else
13593   
13594                 # save the flags
13595                 ol_LIBS="$LIBS"
13596                 LIBS="-lpthread -Wl,-woff,85 $LIBS"
13597
13598                 if test "$cross_compiling" = yes; then
13599   cat > conftest.$ac_ext <<EOF
13600 #line 13601 "configure"
13601 #include "confdefs.h"
13602 /* pthread test headers */
13603 #include <pthread.h>
13604 #if HAVE_PTHREADS < 7
13605 #include <errno.h>
13606 #endif
13607 #ifndef NULL
13608 #define NULL (void*)0
13609 #endif
13610
13611 static void *task(p)
13612         void *p;
13613 {
13614         return (void *) (p == NULL);
13615 }
13616
13617 int main() {
13618
13619         /* pthread test function */
13620 #ifndef PTHREAD_CREATE_DETACHED
13621 #define PTHREAD_CREATE_DETACHED 1
13622 #endif
13623         pthread_t t;
13624         int status;
13625         int detach = PTHREAD_CREATE_DETACHED;
13626
13627 #if HAVE_PTHREADS > 4
13628         /* Final pthreads */
13629         pthread_attr_t attr;
13630
13631         status = pthread_attr_init(&attr);
13632         if( status ) return status;
13633
13634 #if HAVE_PTHREADS < 7
13635         status = pthread_attr_setdetachstate(&attr, &detach);
13636         if( status < 0 ) status = errno;
13637 #else
13638         status = pthread_attr_setdetachstate(&attr, detach);
13639 #endif
13640         if( status ) return status;
13641         status = pthread_create( &t, &attr, task, NULL );
13642 #if HAVE_PTHREADS < 7
13643         if( status < 0 ) status = errno;
13644 #endif
13645         if( status ) return status;
13646 #else
13647         /* Draft 4 pthreads */
13648         status = pthread_create( &t, pthread_attr_default, task, NULL );
13649         if( status ) return errno;
13650
13651         /* give thread a chance to complete */
13652         /* it should remain joinable and hence detachable */
13653         sleep( 1 );
13654
13655         status = pthread_detach( &t );
13656         if( status ) return errno;
13657 #endif
13658
13659 #ifdef HAVE_LINUX_THREADS
13660         pthread_kill_other_threads_np();
13661 #endif
13662
13663         return 0;
13664
13665 ; return 0; }
13666 EOF
13667 if { (eval echo configure:13668: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13668   rm -rf conftest*
13669   ol_cv_pthread_lib_lpthread_woff=yes
13670 else
13671   echo "configure: failed program was:" >&5
13672   cat conftest.$ac_ext >&5
13673   rm -rf conftest*
13674   ol_cv_pthread_lib_lpthread_woff=no
13675 fi
13676 rm -f conftest*
13677 else
13678   cat > conftest.$ac_ext <<EOF
13679 #line 13680 "configure"
13680 #include "confdefs.h"
13681 /* pthread test headers */
13682 #include <pthread.h>
13683 #if HAVE_PTHREADS < 7
13684 #include <errno.h>
13685 #endif
13686 #ifndef NULL
13687 #define NULL (void*)0
13688 #endif
13689
13690 static void *task(p)
13691         void *p;
13692 {
13693         return (void *) (p == NULL);
13694 }
13695
13696
13697 int main(argc, argv)
13698         int argc;
13699         char **argv;
13700 {
13701
13702         /* pthread test function */
13703 #ifndef PTHREAD_CREATE_DETACHED
13704 #define PTHREAD_CREATE_DETACHED 1
13705 #endif
13706         pthread_t t;
13707         int status;
13708         int detach = PTHREAD_CREATE_DETACHED;
13709
13710 #if HAVE_PTHREADS > 4
13711         /* Final pthreads */
13712         pthread_attr_t attr;
13713
13714         status = pthread_attr_init(&attr);
13715         if( status ) return status;
13716
13717 #if HAVE_PTHREADS < 7
13718         status = pthread_attr_setdetachstate(&attr, &detach);
13719         if( status < 0 ) status = errno;
13720 #else
13721         status = pthread_attr_setdetachstate(&attr, detach);
13722 #endif
13723         if( status ) return status;
13724         status = pthread_create( &t, &attr, task, NULL );
13725 #if HAVE_PTHREADS < 7
13726         if( status < 0 ) status = errno;
13727 #endif
13728         if( status ) return status;
13729 #else
13730         /* Draft 4 pthreads */
13731         status = pthread_create( &t, pthread_attr_default, task, NULL );
13732         if( status ) return errno;
13733
13734         /* give thread a chance to complete */
13735         /* it should remain joinable and hence detachable */
13736         sleep( 1 );
13737
13738         status = pthread_detach( &t );
13739         if( status ) return errno;
13740 #endif
13741
13742 #ifdef HAVE_LINUX_THREADS
13743         pthread_kill_other_threads_np();
13744 #endif
13745
13746         return 0;
13747
13748 }
13749
13750 EOF
13751 if { (eval echo configure:13752: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
13752 then
13753   ol_cv_pthread_lib_lpthread_woff=yes
13754 else
13755   echo "configure: failed program was:" >&5
13756   cat conftest.$ac_ext >&5
13757   rm -fr conftest*
13758   ol_cv_pthread_lib_lpthread_woff=no
13759 fi
13760 rm -fr conftest*
13761 fi
13762
13763
13764                 # restore the LIBS
13765                 LIBS="$ol_LIBS"
13766         
13767 fi
13768
13769 echo "$ac_t""$ol_cv_pthread_lib_lpthread_woff" 1>&6
13770
13771         if test $ol_cv_pthread_lib_lpthread_woff = yes ; then
13772                 ol_link_pthreads="-lpthread -Wl,-woff,85"
13773                 ol_link_threads=posix
13774         fi
13775 fi
13776
13777
13778                 # Pthread try link: -lpthread (ol_cv_pthread_lpthread)
13779 if test "$ol_link_threads" = no ; then
13780         # try -lpthread
13781         echo $ac_n "checking for pthread link with -lpthread""... $ac_c" 1>&6
13782 echo "configure:13783: checking for pthread link with -lpthread" >&5
13783 if eval "test \"\${ol_cv_pthread_lpthread+set}\" = set"; then
13784   echo $ac_n "(cached) $ac_c" 1>&6
13785 else
13786   
13787                 # save the flags
13788                 ol_LIBS="$LIBS"
13789                 LIBS="-lpthread $LIBS"
13790
13791                 if test "$cross_compiling" = yes; then
13792   cat > conftest.$ac_ext <<EOF
13793 #line 13794 "configure"
13794 #include "confdefs.h"
13795 /* pthread test headers */
13796 #include <pthread.h>
13797 #if HAVE_PTHREADS < 7
13798 #include <errno.h>
13799 #endif
13800 #ifndef NULL
13801 #define NULL (void*)0
13802 #endif
13803
13804 static void *task(p)
13805         void *p;
13806 {
13807         return (void *) (p == NULL);
13808 }
13809
13810 int main() {
13811
13812         /* pthread test function */
13813 #ifndef PTHREAD_CREATE_DETACHED
13814 #define PTHREAD_CREATE_DETACHED 1
13815 #endif
13816         pthread_t t;
13817         int status;
13818         int detach = PTHREAD_CREATE_DETACHED;
13819
13820 #if HAVE_PTHREADS > 4
13821         /* Final pthreads */
13822         pthread_attr_t attr;
13823
13824         status = pthread_attr_init(&attr);
13825         if( status ) return status;
13826
13827 #if HAVE_PTHREADS < 7
13828         status = pthread_attr_setdetachstate(&attr, &detach);
13829         if( status < 0 ) status = errno;
13830 #else
13831         status = pthread_attr_setdetachstate(&attr, detach);
13832 #endif
13833         if( status ) return status;
13834         status = pthread_create( &t, &attr, task, NULL );
13835 #if HAVE_PTHREADS < 7
13836         if( status < 0 ) status = errno;
13837 #endif
13838         if( status ) return status;
13839 #else
13840         /* Draft 4 pthreads */
13841         status = pthread_create( &t, pthread_attr_default, task, NULL );
13842         if( status ) return errno;
13843
13844         /* give thread a chance to complete */
13845         /* it should remain joinable and hence detachable */
13846         sleep( 1 );
13847
13848         status = pthread_detach( &t );
13849         if( status ) return errno;
13850 #endif
13851
13852 #ifdef HAVE_LINUX_THREADS
13853         pthread_kill_other_threads_np();
13854 #endif
13855
13856         return 0;
13857
13858 ; return 0; }
13859 EOF
13860 if { (eval echo configure:13861: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13861   rm -rf conftest*
13862   ol_cv_pthread_lpthread=yes
13863 else
13864   echo "configure: failed program was:" >&5
13865   cat conftest.$ac_ext >&5
13866   rm -rf conftest*
13867   ol_cv_pthread_lpthread=no
13868 fi
13869 rm -f conftest*
13870 else
13871   cat > conftest.$ac_ext <<EOF
13872 #line 13873 "configure"
13873 #include "confdefs.h"
13874 /* pthread test headers */
13875 #include <pthread.h>
13876 #if HAVE_PTHREADS < 7
13877 #include <errno.h>
13878 #endif
13879 #ifndef NULL
13880 #define NULL (void*)0
13881 #endif
13882
13883 static void *task(p)
13884         void *p;
13885 {
13886         return (void *) (p == NULL);
13887 }
13888
13889
13890 int main(argc, argv)
13891         int argc;
13892         char **argv;
13893 {
13894
13895         /* pthread test function */
13896 #ifndef PTHREAD_CREATE_DETACHED
13897 #define PTHREAD_CREATE_DETACHED 1
13898 #endif
13899         pthread_t t;
13900         int status;
13901         int detach = PTHREAD_CREATE_DETACHED;
13902
13903 #if HAVE_PTHREADS > 4
13904         /* Final pthreads */
13905         pthread_attr_t attr;
13906
13907         status = pthread_attr_init(&attr);
13908         if( status ) return status;
13909
13910 #if HAVE_PTHREADS < 7
13911         status = pthread_attr_setdetachstate(&attr, &detach);
13912         if( status < 0 ) status = errno;
13913 #else
13914         status = pthread_attr_setdetachstate(&attr, detach);
13915 #endif
13916         if( status ) return status;
13917         status = pthread_create( &t, &attr, task, NULL );
13918 #if HAVE_PTHREADS < 7
13919         if( status < 0 ) status = errno;
13920 #endif
13921         if( status ) return status;
13922 #else
13923         /* Draft 4 pthreads */
13924         status = pthread_create( &t, pthread_attr_default, task, NULL );
13925         if( status ) return errno;
13926
13927         /* give thread a chance to complete */
13928         /* it should remain joinable and hence detachable */
13929         sleep( 1 );
13930
13931         status = pthread_detach( &t );
13932         if( status ) return errno;
13933 #endif
13934
13935 #ifdef HAVE_LINUX_THREADS
13936         pthread_kill_other_threads_np();
13937 #endif
13938
13939         return 0;
13940
13941 }
13942
13943 EOF
13944 if { (eval echo configure:13945: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
13945 then
13946   ol_cv_pthread_lpthread=yes
13947 else
13948   echo "configure: failed program was:" >&5
13949   cat conftest.$ac_ext >&5
13950   rm -fr conftest*
13951   ol_cv_pthread_lpthread=no
13952 fi
13953 rm -fr conftest*
13954 fi
13955
13956
13957                 # restore the LIBS
13958                 LIBS="$ol_LIBS"
13959         
13960 fi
13961
13962 echo "$ac_t""$ol_cv_pthread_lpthread" 1>&6
13963
13964         if test $ol_cv_pthread_lpthread = yes ; then
13965                 ol_link_pthreads="-lpthread"
13966                 ol_link_threads=posix
13967         fi
13968 fi
13969
13970                 # Pthread try link: -lc_r (ol_cv_pthread_lc_r)
13971 if test "$ol_link_threads" = no ; then
13972         # try -lc_r
13973         echo $ac_n "checking for pthread link with -lc_r""... $ac_c" 1>&6
13974 echo "configure:13975: checking for pthread link with -lc_r" >&5
13975 if eval "test \"\${ol_cv_pthread_lc_r+set}\" = set"; then
13976   echo $ac_n "(cached) $ac_c" 1>&6
13977 else
13978   
13979                 # save the flags
13980                 ol_LIBS="$LIBS"
13981                 LIBS="-lc_r $LIBS"
13982
13983                 if test "$cross_compiling" = yes; then
13984   cat > conftest.$ac_ext <<EOF
13985 #line 13986 "configure"
13986 #include "confdefs.h"
13987 /* pthread test headers */
13988 #include <pthread.h>
13989 #if HAVE_PTHREADS < 7
13990 #include <errno.h>
13991 #endif
13992 #ifndef NULL
13993 #define NULL (void*)0
13994 #endif
13995
13996 static void *task(p)
13997         void *p;
13998 {
13999         return (void *) (p == NULL);
14000 }
14001
14002 int main() {
14003
14004         /* pthread test function */
14005 #ifndef PTHREAD_CREATE_DETACHED
14006 #define PTHREAD_CREATE_DETACHED 1
14007 #endif
14008         pthread_t t;
14009         int status;
14010         int detach = PTHREAD_CREATE_DETACHED;
14011
14012 #if HAVE_PTHREADS > 4
14013         /* Final pthreads */
14014         pthread_attr_t attr;
14015
14016         status = pthread_attr_init(&attr);
14017         if( status ) return status;
14018
14019 #if HAVE_PTHREADS < 7
14020         status = pthread_attr_setdetachstate(&attr, &detach);
14021         if( status < 0 ) status = errno;
14022 #else
14023         status = pthread_attr_setdetachstate(&attr, detach);
14024 #endif
14025         if( status ) return status;
14026         status = pthread_create( &t, &attr, task, NULL );
14027 #if HAVE_PTHREADS < 7
14028         if( status < 0 ) status = errno;
14029 #endif
14030         if( status ) return status;
14031 #else
14032         /* Draft 4 pthreads */
14033         status = pthread_create( &t, pthread_attr_default, task, NULL );
14034         if( status ) return errno;
14035
14036         /* give thread a chance to complete */
14037         /* it should remain joinable and hence detachable */
14038         sleep( 1 );
14039
14040         status = pthread_detach( &t );
14041         if( status ) return errno;
14042 #endif
14043
14044 #ifdef HAVE_LINUX_THREADS
14045         pthread_kill_other_threads_np();
14046 #endif
14047
14048         return 0;
14049
14050 ; return 0; }
14051 EOF
14052 if { (eval echo configure:14053: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14053   rm -rf conftest*
14054   ol_cv_pthread_lc_r=yes
14055 else
14056   echo "configure: failed program was:" >&5
14057   cat conftest.$ac_ext >&5
14058   rm -rf conftest*
14059   ol_cv_pthread_lc_r=no
14060 fi
14061 rm -f conftest*
14062 else
14063   cat > conftest.$ac_ext <<EOF
14064 #line 14065 "configure"
14065 #include "confdefs.h"
14066 /* pthread test headers */
14067 #include <pthread.h>
14068 #if HAVE_PTHREADS < 7
14069 #include <errno.h>
14070 #endif
14071 #ifndef NULL
14072 #define NULL (void*)0
14073 #endif
14074
14075 static void *task(p)
14076         void *p;
14077 {
14078         return (void *) (p == NULL);
14079 }
14080
14081
14082 int main(argc, argv)
14083         int argc;
14084         char **argv;
14085 {
14086
14087         /* pthread test function */
14088 #ifndef PTHREAD_CREATE_DETACHED
14089 #define PTHREAD_CREATE_DETACHED 1
14090 #endif
14091         pthread_t t;
14092         int status;
14093         int detach = PTHREAD_CREATE_DETACHED;
14094
14095 #if HAVE_PTHREADS > 4
14096         /* Final pthreads */
14097         pthread_attr_t attr;
14098
14099         status = pthread_attr_init(&attr);
14100         if( status ) return status;
14101
14102 #if HAVE_PTHREADS < 7
14103         status = pthread_attr_setdetachstate(&attr, &detach);
14104         if( status < 0 ) status = errno;
14105 #else
14106         status = pthread_attr_setdetachstate(&attr, detach);
14107 #endif
14108         if( status ) return status;
14109         status = pthread_create( &t, &attr, task, NULL );
14110 #if HAVE_PTHREADS < 7
14111         if( status < 0 ) status = errno;
14112 #endif
14113         if( status ) return status;
14114 #else
14115         /* Draft 4 pthreads */
14116         status = pthread_create( &t, pthread_attr_default, task, NULL );
14117         if( status ) return errno;
14118
14119         /* give thread a chance to complete */
14120         /* it should remain joinable and hence detachable */
14121         sleep( 1 );
14122
14123         status = pthread_detach( &t );
14124         if( status ) return errno;
14125 #endif
14126
14127 #ifdef HAVE_LINUX_THREADS
14128         pthread_kill_other_threads_np();
14129 #endif
14130
14131         return 0;
14132
14133 }
14134
14135 EOF
14136 if { (eval echo configure:14137: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
14137 then
14138   ol_cv_pthread_lc_r=yes
14139 else
14140   echo "configure: failed program was:" >&5
14141   cat conftest.$ac_ext >&5
14142   rm -fr conftest*
14143   ol_cv_pthread_lc_r=no
14144 fi
14145 rm -fr conftest*
14146 fi
14147
14148
14149                 # restore the LIBS
14150                 LIBS="$ol_LIBS"
14151         
14152 fi
14153
14154 echo "$ac_t""$ol_cv_pthread_lc_r" 1>&6
14155
14156         if test $ol_cv_pthread_lc_r = yes ; then
14157                 ol_link_pthreads="-lc_r"
14158                 ol_link_threads=posix
14159         fi
14160 fi
14161
14162
14163                 # Pthread try link: -threads (ol_cv_pthread_threads)
14164 if test "$ol_link_threads" = no ; then
14165         # try -threads
14166         echo $ac_n "checking for pthread link with -threads""... $ac_c" 1>&6
14167 echo "configure:14168: checking for pthread link with -threads" >&5
14168 if eval "test \"\${ol_cv_pthread_threads+set}\" = set"; then
14169   echo $ac_n "(cached) $ac_c" 1>&6
14170 else
14171   
14172                 # save the flags
14173                 ol_LIBS="$LIBS"
14174                 LIBS="-threads $LIBS"
14175
14176                 if test "$cross_compiling" = yes; then
14177   cat > conftest.$ac_ext <<EOF
14178 #line 14179 "configure"
14179 #include "confdefs.h"
14180 /* pthread test headers */
14181 #include <pthread.h>
14182 #if HAVE_PTHREADS < 7
14183 #include <errno.h>
14184 #endif
14185 #ifndef NULL
14186 #define NULL (void*)0
14187 #endif
14188
14189 static void *task(p)
14190         void *p;
14191 {
14192         return (void *) (p == NULL);
14193 }
14194
14195 int main() {
14196
14197         /* pthread test function */
14198 #ifndef PTHREAD_CREATE_DETACHED
14199 #define PTHREAD_CREATE_DETACHED 1
14200 #endif
14201         pthread_t t;
14202         int status;
14203         int detach = PTHREAD_CREATE_DETACHED;
14204
14205 #if HAVE_PTHREADS > 4
14206         /* Final pthreads */
14207         pthread_attr_t attr;
14208
14209         status = pthread_attr_init(&attr);
14210         if( status ) return status;
14211
14212 #if HAVE_PTHREADS < 7
14213         status = pthread_attr_setdetachstate(&attr, &detach);
14214         if( status < 0 ) status = errno;
14215 #else
14216         status = pthread_attr_setdetachstate(&attr, detach);
14217 #endif
14218         if( status ) return status;
14219         status = pthread_create( &t, &attr, task, NULL );
14220 #if HAVE_PTHREADS < 7
14221         if( status < 0 ) status = errno;
14222 #endif
14223         if( status ) return status;
14224 #else
14225         /* Draft 4 pthreads */
14226         status = pthread_create( &t, pthread_attr_default, task, NULL );
14227         if( status ) return errno;
14228
14229         /* give thread a chance to complete */
14230         /* it should remain joinable and hence detachable */
14231         sleep( 1 );
14232
14233         status = pthread_detach( &t );
14234         if( status ) return errno;
14235 #endif
14236
14237 #ifdef HAVE_LINUX_THREADS
14238         pthread_kill_other_threads_np();
14239 #endif
14240
14241         return 0;
14242
14243 ; return 0; }
14244 EOF
14245 if { (eval echo configure:14246: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14246   rm -rf conftest*
14247   ol_cv_pthread_threads=yes
14248 else
14249   echo "configure: failed program was:" >&5
14250   cat conftest.$ac_ext >&5
14251   rm -rf conftest*
14252   ol_cv_pthread_threads=no
14253 fi
14254 rm -f conftest*
14255 else
14256   cat > conftest.$ac_ext <<EOF
14257 #line 14258 "configure"
14258 #include "confdefs.h"
14259 /* pthread test headers */
14260 #include <pthread.h>
14261 #if HAVE_PTHREADS < 7
14262 #include <errno.h>
14263 #endif
14264 #ifndef NULL
14265 #define NULL (void*)0
14266 #endif
14267
14268 static void *task(p)
14269         void *p;
14270 {
14271         return (void *) (p == NULL);
14272 }
14273
14274
14275 int main(argc, argv)
14276         int argc;
14277         char **argv;
14278 {
14279
14280         /* pthread test function */
14281 #ifndef PTHREAD_CREATE_DETACHED
14282 #define PTHREAD_CREATE_DETACHED 1
14283 #endif
14284         pthread_t t;
14285         int status;
14286         int detach = PTHREAD_CREATE_DETACHED;
14287
14288 #if HAVE_PTHREADS > 4
14289         /* Final pthreads */
14290         pthread_attr_t attr;
14291
14292         status = pthread_attr_init(&attr);
14293         if( status ) return status;
14294
14295 #if HAVE_PTHREADS < 7
14296         status = pthread_attr_setdetachstate(&attr, &detach);
14297         if( status < 0 ) status = errno;
14298 #else
14299         status = pthread_attr_setdetachstate(&attr, detach);
14300 #endif
14301         if( status ) return status;
14302         status = pthread_create( &t, &attr, task, NULL );
14303 #if HAVE_PTHREADS < 7
14304         if( status < 0 ) status = errno;
14305 #endif
14306         if( status ) return status;
14307 #else
14308         /* Draft 4 pthreads */
14309         status = pthread_create( &t, pthread_attr_default, task, NULL );
14310         if( status ) return errno;
14311
14312         /* give thread a chance to complete */
14313         /* it should remain joinable and hence detachable */
14314         sleep( 1 );
14315
14316         status = pthread_detach( &t );
14317         if( status ) return errno;
14318 #endif
14319
14320 #ifdef HAVE_LINUX_THREADS
14321         pthread_kill_other_threads_np();
14322 #endif
14323
14324         return 0;
14325
14326 }
14327
14328 EOF
14329 if { (eval echo configure:14330: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
14330 then
14331   ol_cv_pthread_threads=yes
14332 else
14333   echo "configure: failed program was:" >&5
14334   cat conftest.$ac_ext >&5
14335   rm -fr conftest*
14336   ol_cv_pthread_threads=no
14337 fi
14338 rm -fr conftest*
14339 fi
14340
14341
14342                 # restore the LIBS
14343                 LIBS="$ol_LIBS"
14344         
14345 fi
14346
14347 echo "$ac_t""$ol_cv_pthread_threads" 1>&6
14348
14349         if test $ol_cv_pthread_threads = yes ; then
14350                 ol_link_pthreads="-threads"
14351                 ol_link_threads=posix
14352         fi
14353 fi
14354
14355
14356                 # Pthread try link: -lpthreads -lmach -lexc -lc_r (ol_cv_pthread_lpthreads_lmach_lexc_lc_r)
14357 if test "$ol_link_threads" = no ; then
14358         # try -lpthreads -lmach -lexc -lc_r
14359         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc -lc_r""... $ac_c" 1>&6
14360 echo "configure:14361: checking for pthread link with -lpthreads -lmach -lexc -lc_r" >&5
14361 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc_lc_r+set}\" = set"; then
14362   echo $ac_n "(cached) $ac_c" 1>&6
14363 else
14364   
14365                 # save the flags
14366                 ol_LIBS="$LIBS"
14367                 LIBS="-lpthreads -lmach -lexc -lc_r $LIBS"
14368
14369                 if test "$cross_compiling" = yes; then
14370   cat > conftest.$ac_ext <<EOF
14371 #line 14372 "configure"
14372 #include "confdefs.h"
14373 /* pthread test headers */
14374 #include <pthread.h>
14375 #if HAVE_PTHREADS < 7
14376 #include <errno.h>
14377 #endif
14378 #ifndef NULL
14379 #define NULL (void*)0
14380 #endif
14381
14382 static void *task(p)
14383         void *p;
14384 {
14385         return (void *) (p == NULL);
14386 }
14387
14388 int main() {
14389
14390         /* pthread test function */
14391 #ifndef PTHREAD_CREATE_DETACHED
14392 #define PTHREAD_CREATE_DETACHED 1
14393 #endif
14394         pthread_t t;
14395         int status;
14396         int detach = PTHREAD_CREATE_DETACHED;
14397
14398 #if HAVE_PTHREADS > 4
14399         /* Final pthreads */
14400         pthread_attr_t attr;
14401
14402         status = pthread_attr_init(&attr);
14403         if( status ) return status;
14404
14405 #if HAVE_PTHREADS < 7
14406         status = pthread_attr_setdetachstate(&attr, &detach);
14407         if( status < 0 ) status = errno;
14408 #else
14409         status = pthread_attr_setdetachstate(&attr, detach);
14410 #endif
14411         if( status ) return status;
14412         status = pthread_create( &t, &attr, task, NULL );
14413 #if HAVE_PTHREADS < 7
14414         if( status < 0 ) status = errno;
14415 #endif
14416         if( status ) return status;
14417 #else
14418         /* Draft 4 pthreads */
14419         status = pthread_create( &t, pthread_attr_default, task, NULL );
14420         if( status ) return errno;
14421
14422         /* give thread a chance to complete */
14423         /* it should remain joinable and hence detachable */
14424         sleep( 1 );
14425
14426         status = pthread_detach( &t );
14427         if( status ) return errno;
14428 #endif
14429
14430 #ifdef HAVE_LINUX_THREADS
14431         pthread_kill_other_threads_np();
14432 #endif
14433
14434         return 0;
14435
14436 ; return 0; }
14437 EOF
14438 if { (eval echo configure:14439: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14439   rm -rf conftest*
14440   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
14441 else
14442   echo "configure: failed program was:" >&5
14443   cat conftest.$ac_ext >&5
14444   rm -rf conftest*
14445   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
14446 fi
14447 rm -f conftest*
14448 else
14449   cat > conftest.$ac_ext <<EOF
14450 #line 14451 "configure"
14451 #include "confdefs.h"
14452 /* pthread test headers */
14453 #include <pthread.h>
14454 #if HAVE_PTHREADS < 7
14455 #include <errno.h>
14456 #endif
14457 #ifndef NULL
14458 #define NULL (void*)0
14459 #endif
14460
14461 static void *task(p)
14462         void *p;
14463 {
14464         return (void *) (p == NULL);
14465 }
14466
14467
14468 int main(argc, argv)
14469         int argc;
14470         char **argv;
14471 {
14472
14473         /* pthread test function */
14474 #ifndef PTHREAD_CREATE_DETACHED
14475 #define PTHREAD_CREATE_DETACHED 1
14476 #endif
14477         pthread_t t;
14478         int status;
14479         int detach = PTHREAD_CREATE_DETACHED;
14480
14481 #if HAVE_PTHREADS > 4
14482         /* Final pthreads */
14483         pthread_attr_t attr;
14484
14485         status = pthread_attr_init(&attr);
14486         if( status ) return status;
14487
14488 #if HAVE_PTHREADS < 7
14489         status = pthread_attr_setdetachstate(&attr, &detach);
14490         if( status < 0 ) status = errno;
14491 #else
14492         status = pthread_attr_setdetachstate(&attr, detach);
14493 #endif
14494         if( status ) return status;
14495         status = pthread_create( &t, &attr, task, NULL );
14496 #if HAVE_PTHREADS < 7
14497         if( status < 0 ) status = errno;
14498 #endif
14499         if( status ) return status;
14500 #else
14501         /* Draft 4 pthreads */
14502         status = pthread_create( &t, pthread_attr_default, task, NULL );
14503         if( status ) return errno;
14504
14505         /* give thread a chance to complete */
14506         /* it should remain joinable and hence detachable */
14507         sleep( 1 );
14508
14509         status = pthread_detach( &t );
14510         if( status ) return errno;
14511 #endif
14512
14513 #ifdef HAVE_LINUX_THREADS
14514         pthread_kill_other_threads_np();
14515 #endif
14516
14517         return 0;
14518
14519 }
14520
14521 EOF
14522 if { (eval echo configure:14523: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
14523 then
14524   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
14525 else
14526   echo "configure: failed program was:" >&5
14527   cat conftest.$ac_ext >&5
14528   rm -fr conftest*
14529   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
14530 fi
14531 rm -fr conftest*
14532 fi
14533
14534
14535                 # restore the LIBS
14536                 LIBS="$ol_LIBS"
14537         
14538 fi
14539
14540 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc_lc_r" 1>&6
14541
14542         if test $ol_cv_pthread_lpthreads_lmach_lexc_lc_r = yes ; then
14543                 ol_link_pthreads="-lpthreads -lmach -lexc -lc_r"
14544                 ol_link_threads=posix
14545         fi
14546 fi
14547
14548                 # Pthread try link: -lpthreads -lmach -lexc (ol_cv_pthread_lpthreads_lmach_lexc)
14549 if test "$ol_link_threads" = no ; then
14550         # try -lpthreads -lmach -lexc
14551         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc""... $ac_c" 1>&6
14552 echo "configure:14553: checking for pthread link with -lpthreads -lmach -lexc" >&5
14553 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc+set}\" = set"; then
14554   echo $ac_n "(cached) $ac_c" 1>&6
14555 else
14556   
14557                 # save the flags
14558                 ol_LIBS="$LIBS"
14559                 LIBS="-lpthreads -lmach -lexc $LIBS"
14560
14561                 if test "$cross_compiling" = yes; then
14562   cat > conftest.$ac_ext <<EOF
14563 #line 14564 "configure"
14564 #include "confdefs.h"
14565 /* pthread test headers */
14566 #include <pthread.h>
14567 #if HAVE_PTHREADS < 7
14568 #include <errno.h>
14569 #endif
14570 #ifndef NULL
14571 #define NULL (void*)0
14572 #endif
14573
14574 static void *task(p)
14575         void *p;
14576 {
14577         return (void *) (p == NULL);
14578 }
14579
14580 int main() {
14581
14582         /* pthread test function */
14583 #ifndef PTHREAD_CREATE_DETACHED
14584 #define PTHREAD_CREATE_DETACHED 1
14585 #endif
14586         pthread_t t;
14587         int status;
14588         int detach = PTHREAD_CREATE_DETACHED;
14589
14590 #if HAVE_PTHREADS > 4
14591         /* Final pthreads */
14592         pthread_attr_t attr;
14593
14594         status = pthread_attr_init(&attr);
14595         if( status ) return status;
14596
14597 #if HAVE_PTHREADS < 7
14598         status = pthread_attr_setdetachstate(&attr, &detach);
14599         if( status < 0 ) status = errno;
14600 #else
14601         status = pthread_attr_setdetachstate(&attr, detach);
14602 #endif
14603         if( status ) return status;
14604         status = pthread_create( &t, &attr, task, NULL );
14605 #if HAVE_PTHREADS < 7
14606         if( status < 0 ) status = errno;
14607 #endif
14608         if( status ) return status;
14609 #else
14610         /* Draft 4 pthreads */
14611         status = pthread_create( &t, pthread_attr_default, task, NULL );
14612         if( status ) return errno;
14613
14614         /* give thread a chance to complete */
14615         /* it should remain joinable and hence detachable */
14616         sleep( 1 );
14617
14618         status = pthread_detach( &t );
14619         if( status ) return errno;
14620 #endif
14621
14622 #ifdef HAVE_LINUX_THREADS
14623         pthread_kill_other_threads_np();
14624 #endif
14625
14626         return 0;
14627
14628 ; return 0; }
14629 EOF
14630 if { (eval echo configure:14631: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14631   rm -rf conftest*
14632   ol_cv_pthread_lpthreads_lmach_lexc=yes
14633 else
14634   echo "configure: failed program was:" >&5
14635   cat conftest.$ac_ext >&5
14636   rm -rf conftest*
14637   ol_cv_pthread_lpthreads_lmach_lexc=no
14638 fi
14639 rm -f conftest*
14640 else
14641   cat > conftest.$ac_ext <<EOF
14642 #line 14643 "configure"
14643 #include "confdefs.h"
14644 /* pthread test headers */
14645 #include <pthread.h>
14646 #if HAVE_PTHREADS < 7
14647 #include <errno.h>
14648 #endif
14649 #ifndef NULL
14650 #define NULL (void*)0
14651 #endif
14652
14653 static void *task(p)
14654         void *p;
14655 {
14656         return (void *) (p == NULL);
14657 }
14658
14659
14660 int main(argc, argv)
14661         int argc;
14662         char **argv;
14663 {
14664
14665         /* pthread test function */
14666 #ifndef PTHREAD_CREATE_DETACHED
14667 #define PTHREAD_CREATE_DETACHED 1
14668 #endif
14669         pthread_t t;
14670         int status;
14671         int detach = PTHREAD_CREATE_DETACHED;
14672
14673 #if HAVE_PTHREADS > 4
14674         /* Final pthreads */
14675         pthread_attr_t attr;
14676
14677         status = pthread_attr_init(&attr);
14678         if( status ) return status;
14679
14680 #if HAVE_PTHREADS < 7
14681         status = pthread_attr_setdetachstate(&attr, &detach);
14682         if( status < 0 ) status = errno;
14683 #else
14684         status = pthread_attr_setdetachstate(&attr, detach);
14685 #endif
14686         if( status ) return status;
14687         status = pthread_create( &t, &attr, task, NULL );
14688 #if HAVE_PTHREADS < 7
14689         if( status < 0 ) status = errno;
14690 #endif
14691         if( status ) return status;
14692 #else
14693         /* Draft 4 pthreads */
14694         status = pthread_create( &t, pthread_attr_default, task, NULL );
14695         if( status ) return errno;
14696
14697         /* give thread a chance to complete */
14698         /* it should remain joinable and hence detachable */
14699         sleep( 1 );
14700
14701         status = pthread_detach( &t );
14702         if( status ) return errno;
14703 #endif
14704
14705 #ifdef HAVE_LINUX_THREADS
14706         pthread_kill_other_threads_np();
14707 #endif
14708
14709         return 0;
14710
14711 }
14712
14713 EOF
14714 if { (eval echo configure:14715: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
14715 then
14716   ol_cv_pthread_lpthreads_lmach_lexc=yes
14717 else
14718   echo "configure: failed program was:" >&5
14719   cat conftest.$ac_ext >&5
14720   rm -fr conftest*
14721   ol_cv_pthread_lpthreads_lmach_lexc=no
14722 fi
14723 rm -fr conftest*
14724 fi
14725
14726
14727                 # restore the LIBS
14728                 LIBS="$ol_LIBS"
14729         
14730 fi
14731
14732 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc" 1>&6
14733
14734         if test $ol_cv_pthread_lpthreads_lmach_lexc = yes ; then
14735                 ol_link_pthreads="-lpthreads -lmach -lexc"
14736                 ol_link_threads=posix
14737         fi
14738 fi
14739
14740                 # Pthread try link: -lpthreads -lexc (ol_cv_pthread_lpthreads_lexc)
14741 if test "$ol_link_threads" = no ; then
14742         # try -lpthreads -lexc
14743         echo $ac_n "checking for pthread link with -lpthreads -lexc""... $ac_c" 1>&6
14744 echo "configure:14745: checking for pthread link with -lpthreads -lexc" >&5
14745 if eval "test \"\${ol_cv_pthread_lpthreads_lexc+set}\" = set"; then
14746   echo $ac_n "(cached) $ac_c" 1>&6
14747 else
14748   
14749                 # save the flags
14750                 ol_LIBS="$LIBS"
14751                 LIBS="-lpthreads -lexc $LIBS"
14752
14753                 if test "$cross_compiling" = yes; then
14754   cat > conftest.$ac_ext <<EOF
14755 #line 14756 "configure"
14756 #include "confdefs.h"
14757 /* pthread test headers */
14758 #include <pthread.h>
14759 #if HAVE_PTHREADS < 7
14760 #include <errno.h>
14761 #endif
14762 #ifndef NULL
14763 #define NULL (void*)0
14764 #endif
14765
14766 static void *task(p)
14767         void *p;
14768 {
14769         return (void *) (p == NULL);
14770 }
14771
14772 int main() {
14773
14774         /* pthread test function */
14775 #ifndef PTHREAD_CREATE_DETACHED
14776 #define PTHREAD_CREATE_DETACHED 1
14777 #endif
14778         pthread_t t;
14779         int status;
14780         int detach = PTHREAD_CREATE_DETACHED;
14781
14782 #if HAVE_PTHREADS > 4
14783         /* Final pthreads */
14784         pthread_attr_t attr;
14785
14786         status = pthread_attr_init(&attr);
14787         if( status ) return status;
14788
14789 #if HAVE_PTHREADS < 7
14790         status = pthread_attr_setdetachstate(&attr, &detach);
14791         if( status < 0 ) status = errno;
14792 #else
14793         status = pthread_attr_setdetachstate(&attr, detach);
14794 #endif
14795         if( status ) return status;
14796         status = pthread_create( &t, &attr, task, NULL );
14797 #if HAVE_PTHREADS < 7
14798         if( status < 0 ) status = errno;
14799 #endif
14800         if( status ) return status;
14801 #else
14802         /* Draft 4 pthreads */
14803         status = pthread_create( &t, pthread_attr_default, task, NULL );
14804         if( status ) return errno;
14805
14806         /* give thread a chance to complete */
14807         /* it should remain joinable and hence detachable */
14808         sleep( 1 );
14809
14810         status = pthread_detach( &t );
14811         if( status ) return errno;
14812 #endif
14813
14814 #ifdef HAVE_LINUX_THREADS
14815         pthread_kill_other_threads_np();
14816 #endif
14817
14818         return 0;
14819
14820 ; return 0; }
14821 EOF
14822 if { (eval echo configure:14823: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14823   rm -rf conftest*
14824   ol_cv_pthread_lpthreads_lexc=yes
14825 else
14826   echo "configure: failed program was:" >&5
14827   cat conftest.$ac_ext >&5
14828   rm -rf conftest*
14829   ol_cv_pthread_lpthreads_lexc=no
14830 fi
14831 rm -f conftest*
14832 else
14833   cat > conftest.$ac_ext <<EOF
14834 #line 14835 "configure"
14835 #include "confdefs.h"
14836 /* pthread test headers */
14837 #include <pthread.h>
14838 #if HAVE_PTHREADS < 7
14839 #include <errno.h>
14840 #endif
14841 #ifndef NULL
14842 #define NULL (void*)0
14843 #endif
14844
14845 static void *task(p)
14846         void *p;
14847 {
14848         return (void *) (p == NULL);
14849 }
14850
14851
14852 int main(argc, argv)
14853         int argc;
14854         char **argv;
14855 {
14856
14857         /* pthread test function */
14858 #ifndef PTHREAD_CREATE_DETACHED
14859 #define PTHREAD_CREATE_DETACHED 1
14860 #endif
14861         pthread_t t;
14862         int status;
14863         int detach = PTHREAD_CREATE_DETACHED;
14864
14865 #if HAVE_PTHREADS > 4
14866         /* Final pthreads */
14867         pthread_attr_t attr;
14868
14869         status = pthread_attr_init(&attr);
14870         if( status ) return status;
14871
14872 #if HAVE_PTHREADS < 7
14873         status = pthread_attr_setdetachstate(&attr, &detach);
14874         if( status < 0 ) status = errno;
14875 #else
14876         status = pthread_attr_setdetachstate(&attr, detach);
14877 #endif
14878         if( status ) return status;
14879         status = pthread_create( &t, &attr, task, NULL );
14880 #if HAVE_PTHREADS < 7
14881         if( status < 0 ) status = errno;
14882 #endif
14883         if( status ) return status;
14884 #else
14885         /* Draft 4 pthreads */
14886         status = pthread_create( &t, pthread_attr_default, task, NULL );
14887         if( status ) return errno;
14888
14889         /* give thread a chance to complete */
14890         /* it should remain joinable and hence detachable */
14891         sleep( 1 );
14892
14893         status = pthread_detach( &t );
14894         if( status ) return errno;
14895 #endif
14896
14897 #ifdef HAVE_LINUX_THREADS
14898         pthread_kill_other_threads_np();
14899 #endif
14900
14901         return 0;
14902
14903 }
14904
14905 EOF
14906 if { (eval echo configure:14907: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
14907 then
14908   ol_cv_pthread_lpthreads_lexc=yes
14909 else
14910   echo "configure: failed program was:" >&5
14911   cat conftest.$ac_ext >&5
14912   rm -fr conftest*
14913   ol_cv_pthread_lpthreads_lexc=no
14914 fi
14915 rm -fr conftest*
14916 fi
14917
14918
14919                 # restore the LIBS
14920                 LIBS="$ol_LIBS"
14921         
14922 fi
14923
14924 echo "$ac_t""$ol_cv_pthread_lpthreads_lexc" 1>&6
14925
14926         if test $ol_cv_pthread_lpthreads_lexc = yes ; then
14927                 ol_link_pthreads="-lpthreads -lexc"
14928                 ol_link_threads=posix
14929         fi
14930 fi
14931
14932
14933                 # Pthread try link: -lpthreads (ol_cv_pthread_lib_lpthreads)
14934 if test "$ol_link_threads" = no ; then
14935         # try -lpthreads
14936         echo $ac_n "checking for pthread link with -lpthreads""... $ac_c" 1>&6
14937 echo "configure:14938: checking for pthread link with -lpthreads" >&5
14938 if eval "test \"\${ol_cv_pthread_lib_lpthreads+set}\" = set"; then
14939   echo $ac_n "(cached) $ac_c" 1>&6
14940 else
14941   
14942                 # save the flags
14943                 ol_LIBS="$LIBS"
14944                 LIBS="-lpthreads $LIBS"
14945
14946                 if test "$cross_compiling" = yes; then
14947   cat > conftest.$ac_ext <<EOF
14948 #line 14949 "configure"
14949 #include "confdefs.h"
14950 /* pthread test headers */
14951 #include <pthread.h>
14952 #if HAVE_PTHREADS < 7
14953 #include <errno.h>
14954 #endif
14955 #ifndef NULL
14956 #define NULL (void*)0
14957 #endif
14958
14959 static void *task(p)
14960         void *p;
14961 {
14962         return (void *) (p == NULL);
14963 }
14964
14965 int main() {
14966
14967         /* pthread test function */
14968 #ifndef PTHREAD_CREATE_DETACHED
14969 #define PTHREAD_CREATE_DETACHED 1
14970 #endif
14971         pthread_t t;
14972         int status;
14973         int detach = PTHREAD_CREATE_DETACHED;
14974
14975 #if HAVE_PTHREADS > 4
14976         /* Final pthreads */
14977         pthread_attr_t attr;
14978
14979         status = pthread_attr_init(&attr);
14980         if( status ) return status;
14981
14982 #if HAVE_PTHREADS < 7
14983         status = pthread_attr_setdetachstate(&attr, &detach);
14984         if( status < 0 ) status = errno;
14985 #else
14986         status = pthread_attr_setdetachstate(&attr, detach);
14987 #endif
14988         if( status ) return status;
14989         status = pthread_create( &t, &attr, task, NULL );
14990 #if HAVE_PTHREADS < 7
14991         if( status < 0 ) status = errno;
14992 #endif
14993         if( status ) return status;
14994 #else
14995         /* Draft 4 pthreads */
14996         status = pthread_create( &t, pthread_attr_default, task, NULL );
14997         if( status ) return errno;
14998
14999         /* give thread a chance to complete */
15000         /* it should remain joinable and hence detachable */
15001         sleep( 1 );
15002
15003         status = pthread_detach( &t );
15004         if( status ) return errno;
15005 #endif
15006
15007 #ifdef HAVE_LINUX_THREADS
15008         pthread_kill_other_threads_np();
15009 #endif
15010
15011         return 0;
15012
15013 ; return 0; }
15014 EOF
15015 if { (eval echo configure:15016: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15016   rm -rf conftest*
15017   ol_cv_pthread_lib_lpthreads=yes
15018 else
15019   echo "configure: failed program was:" >&5
15020   cat conftest.$ac_ext >&5
15021   rm -rf conftest*
15022   ol_cv_pthread_lib_lpthreads=no
15023 fi
15024 rm -f conftest*
15025 else
15026   cat > conftest.$ac_ext <<EOF
15027 #line 15028 "configure"
15028 #include "confdefs.h"
15029 /* pthread test headers */
15030 #include <pthread.h>
15031 #if HAVE_PTHREADS < 7
15032 #include <errno.h>
15033 #endif
15034 #ifndef NULL
15035 #define NULL (void*)0
15036 #endif
15037
15038 static void *task(p)
15039         void *p;
15040 {
15041         return (void *) (p == NULL);
15042 }
15043
15044
15045 int main(argc, argv)
15046         int argc;
15047         char **argv;
15048 {
15049
15050         /* pthread test function */
15051 #ifndef PTHREAD_CREATE_DETACHED
15052 #define PTHREAD_CREATE_DETACHED 1
15053 #endif
15054         pthread_t t;
15055         int status;
15056         int detach = PTHREAD_CREATE_DETACHED;
15057
15058 #if HAVE_PTHREADS > 4
15059         /* Final pthreads */
15060         pthread_attr_t attr;
15061
15062         status = pthread_attr_init(&attr);
15063         if( status ) return status;
15064
15065 #if HAVE_PTHREADS < 7
15066         status = pthread_attr_setdetachstate(&attr, &detach);
15067         if( status < 0 ) status = errno;
15068 #else
15069         status = pthread_attr_setdetachstate(&attr, detach);
15070 #endif
15071         if( status ) return status;
15072         status = pthread_create( &t, &attr, task, NULL );
15073 #if HAVE_PTHREADS < 7
15074         if( status < 0 ) status = errno;
15075 #endif
15076         if( status ) return status;
15077 #else
15078         /* Draft 4 pthreads */
15079         status = pthread_create( &t, pthread_attr_default, task, NULL );
15080         if( status ) return errno;
15081
15082         /* give thread a chance to complete */
15083         /* it should remain joinable and hence detachable */
15084         sleep( 1 );
15085
15086         status = pthread_detach( &t );
15087         if( status ) return errno;
15088 #endif
15089
15090 #ifdef HAVE_LINUX_THREADS
15091         pthread_kill_other_threads_np();
15092 #endif
15093
15094         return 0;
15095
15096 }
15097
15098 EOF
15099 if { (eval echo configure:15100: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
15100 then
15101   ol_cv_pthread_lib_lpthreads=yes
15102 else
15103   echo "configure: failed program was:" >&5
15104   cat conftest.$ac_ext >&5
15105   rm -fr conftest*
15106   ol_cv_pthread_lib_lpthreads=no
15107 fi
15108 rm -fr conftest*
15109 fi
15110
15111
15112                 # restore the LIBS
15113                 LIBS="$ol_LIBS"
15114         
15115 fi
15116
15117 echo "$ac_t""$ol_cv_pthread_lib_lpthreads" 1>&6
15118
15119         if test $ol_cv_pthread_lib_lpthreads = yes ; then
15120                 ol_link_pthreads="-lpthreads"
15121                 ol_link_threads=posix
15122         fi
15123 fi
15124
15125
15126                 if test $ol_link_threads != no ; then
15127                         LTHREAD_LIBS="$LTHREAD_LIBS $ol_link_pthreads"
15128
15129                                                 save_CPPFLAGS="$CPPFLAGS"
15130                         save_LIBS="$LIBS"
15131                         LIBS="$LTHREAD_LIBS $LIBS"
15132
15133                                                                                                 for ac_func in sched_yield pthread_yield thr_yield
15134 do
15135 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15136 echo "configure:15137: checking for $ac_func" >&5
15137 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15138   echo $ac_n "(cached) $ac_c" 1>&6
15139 else
15140   cat > conftest.$ac_ext <<EOF
15141 #line 15142 "configure"
15142 #include "confdefs.h"
15143 /* System header to define __stub macros and hopefully few prototypes,
15144     which can conflict with char $ac_func(); below.  */
15145 #include <assert.h>
15146 /* Override any gcc2 internal prototype to avoid an error.  */
15147 /* We use char because int might match the return type of a gcc2
15148     builtin and then its argument prototype would still apply.  */
15149 char $ac_func();
15150 char (*f)();
15151
15152 int main() {
15153
15154 /* The GNU C library defines this for functions which it implements
15155     to always fail with ENOSYS.  Some functions are actually named
15156     something starting with __ and the normal name is an alias.  */
15157 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15158 choke me
15159 #else
15160 f = $ac_func;
15161 #endif
15162
15163 ; return 0; }
15164 EOF
15165 if { (eval echo configure:15166: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15166   rm -rf conftest*
15167   eval "ac_cv_func_$ac_func=yes"
15168 else
15169   echo "configure: failed program was:" >&5
15170   cat conftest.$ac_ext >&5
15171   rm -rf conftest*
15172   eval "ac_cv_func_$ac_func=no"
15173 fi
15174 rm -f conftest*
15175 fi
15176
15177 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15178   echo "$ac_t""yes" 1>&6
15179     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15180   cat >> confdefs.h <<EOF
15181 #define $ac_tr_func 1
15182 EOF
15183  
15184 else
15185   echo "$ac_t""no" 1>&6
15186 fi
15187 done
15188
15189
15190                         if test $ac_cv_func_sched_yield = no -a \
15191                                 $ac_cv_func_pthread_yield = no -a \
15192                                 $ac_cv_func_thr_yield = no ; then
15193                                                                 echo $ac_n "checking for sched_yield in -lrt""... $ac_c" 1>&6
15194 echo "configure:15195: checking for sched_yield in -lrt" >&5
15195 ac_lib_var=`echo rt'_'sched_yield | sed 'y%./+-:%__p__%'`
15196 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
15197   echo $ac_n "(cached) $ac_c" 1>&6
15198 else
15199   ac_save_LIBS="$LIBS"
15200 LIBS="-lrt  $LIBS"
15201 cat > conftest.$ac_ext <<EOF
15202 #line 15203 "configure"
15203 #include "confdefs.h"
15204 /* Override any gcc2 internal prototype to avoid an error.  */
15205 /* We use char because int might match the return type of a gcc2
15206     builtin and then its argument prototype would still apply.  */
15207 char sched_yield();
15208
15209 int main() {
15210 sched_yield()
15211 ; return 0; }
15212 EOF
15213 if { (eval echo configure:15214: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15214   rm -rf conftest*
15215   eval "ac_cv_lib_$ac_lib_var=yes"
15216 else
15217   echo "configure: failed program was:" >&5
15218   cat conftest.$ac_ext >&5
15219   rm -rf conftest*
15220   eval "ac_cv_lib_$ac_lib_var=no"
15221 fi
15222 rm -f conftest*
15223 LIBS="$ac_save_LIBS"
15224
15225 fi
15226 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
15227   echo "$ac_t""yes" 1>&6
15228   LTHREAD_LIBS="$LTHREAD_LIBS -lrt"
15229                                         cat >> confdefs.h <<\EOF
15230 #define HAVE_SCHED_YIELD 1
15231 EOF
15232
15233                                         ac_cv_func_sched_yield=yes
15234 else
15235   echo "$ac_t""no" 1>&6
15236 ac_cv_func_sched_yield=no
15237 fi
15238
15239                         fi
15240                         if test $ac_cv_func_sched_yield = no -a \
15241                                 $ac_cv_func_pthread_yield = no -a \
15242                                 "$ac_cv_func_thr_yield" = no ; then
15243                                 echo "configure: warning: could not locate sched_yield() or pthread_yield()" 1>&2
15244                         fi
15245
15246                                                 for ac_func in pthread_kill pthread_rwlock_destroy
15247 do
15248 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15249 echo "configure:15250: checking for $ac_func" >&5
15250 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15251   echo $ac_n "(cached) $ac_c" 1>&6
15252 else
15253   cat > conftest.$ac_ext <<EOF
15254 #line 15255 "configure"
15255 #include "confdefs.h"
15256 /* System header to define __stub macros and hopefully few prototypes,
15257     which can conflict with char $ac_func(); below.  */
15258 #include <assert.h>
15259 /* Override any gcc2 internal prototype to avoid an error.  */
15260 /* We use char because int might match the return type of a gcc2
15261     builtin and then its argument prototype would still apply.  */
15262 char $ac_func();
15263 char (*f)();
15264
15265 int main() {
15266
15267 /* The GNU C library defines this for functions which it implements
15268     to always fail with ENOSYS.  Some functions are actually named
15269     something starting with __ and the normal name is an alias.  */
15270 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15271 choke me
15272 #else
15273 f = $ac_func;
15274 #endif
15275
15276 ; return 0; }
15277 EOF
15278 if { (eval echo configure:15279: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15279   rm -rf conftest*
15280   eval "ac_cv_func_$ac_func=yes"
15281 else
15282   echo "configure: failed program was:" >&5
15283   cat conftest.$ac_ext >&5
15284   rm -rf conftest*
15285   eval "ac_cv_func_$ac_func=no"
15286 fi
15287 rm -f conftest*
15288 fi
15289
15290 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15291   echo "$ac_t""yes" 1>&6
15292     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15293   cat >> confdefs.h <<EOF
15294 #define $ac_tr_func 1
15295 EOF
15296  
15297 else
15298   echo "$ac_t""no" 1>&6
15299 fi
15300 done
15301
15302
15303                                                                         echo $ac_n "checking for pthread_detach with <pthread.h>""... $ac_c" 1>&6
15304 echo "configure:15305: checking for pthread_detach with <pthread.h>" >&5
15305 if eval "test \"\${ol_cv_func_pthread_detach+set}\" = set"; then
15306   echo $ac_n "(cached) $ac_c" 1>&6
15307 else
15308   
15309                                                                 cat > conftest.$ac_ext <<EOF
15310 #line 15311 "configure"
15311 #include "confdefs.h"
15312
15313 #include <pthread.h>
15314 #ifndef NULL
15315 #define NULL (void*)0
15316 #endif
15317
15318 int main() {
15319 pthread_detach(NULL);
15320 ; return 0; }
15321 EOF
15322 if { (eval echo configure:15323: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15323   rm -rf conftest*
15324   ol_cv_func_pthread_detach=yes
15325 else
15326   echo "configure: failed program was:" >&5
15327   cat conftest.$ac_ext >&5
15328   rm -rf conftest*
15329   ol_cv_func_pthread_detach=no
15330 fi
15331 rm -f conftest*
15332                         
15333 fi
15334
15335 echo "$ac_t""$ol_cv_func_pthread_detach" 1>&6
15336
15337                         if test $ol_cv_func_pthread_detach = no ; then
15338                                 { echo "configure: error: could not locate pthread_detach()" 1>&2; exit 1; }
15339                         fi
15340
15341                         cat >> confdefs.h <<\EOF
15342 #define HAVE_PTHREAD_DETACH 1
15343 EOF
15344
15345
15346                                                 for ac_func in \
15347                                 pthread_setconcurrency \
15348                                 pthread_getconcurrency \
15349                                 thr_setconcurrency \
15350                                 thr_getconcurrency \
15351                         
15352 do
15353 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15354 echo "configure:15355: checking for $ac_func" >&5
15355 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15356   echo $ac_n "(cached) $ac_c" 1>&6
15357 else
15358   cat > conftest.$ac_ext <<EOF
15359 #line 15360 "configure"
15360 #include "confdefs.h"
15361 /* System header to define __stub macros and hopefully few prototypes,
15362     which can conflict with char $ac_func(); below.  */
15363 #include <assert.h>
15364 /* Override any gcc2 internal prototype to avoid an error.  */
15365 /* We use char because int might match the return type of a gcc2
15366     builtin and then its argument prototype would still apply.  */
15367 char $ac_func();
15368 char (*f)();
15369
15370 int main() {
15371
15372 /* The GNU C library defines this for functions which it implements
15373     to always fail with ENOSYS.  Some functions are actually named
15374     something starting with __ and the normal name is an alias.  */
15375 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15376 choke me
15377 #else
15378 f = $ac_func;
15379 #endif
15380
15381 ; return 0; }
15382 EOF
15383 if { (eval echo configure:15384: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15384   rm -rf conftest*
15385   eval "ac_cv_func_$ac_func=yes"
15386 else
15387   echo "configure: failed program was:" >&5
15388   cat conftest.$ac_ext >&5
15389   rm -rf conftest*
15390   eval "ac_cv_func_$ac_func=no"
15391 fi
15392 rm -f conftest*
15393 fi
15394
15395 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15396   echo "$ac_t""yes" 1>&6
15397     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15398   cat >> confdefs.h <<EOF
15399 #define $ac_tr_func 1
15400 EOF
15401  
15402 else
15403   echo "$ac_t""no" 1>&6
15404 fi
15405 done
15406
15407
15408                         
15409         for ac_func in pthread_kill_other_threads_np
15410 do
15411 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15412 echo "configure:15413: checking for $ac_func" >&5
15413 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15414   echo $ac_n "(cached) $ac_c" 1>&6
15415 else
15416   cat > conftest.$ac_ext <<EOF
15417 #line 15418 "configure"
15418 #include "confdefs.h"
15419 /* System header to define __stub macros and hopefully few prototypes,
15420     which can conflict with char $ac_func(); below.  */
15421 #include <assert.h>
15422 /* Override any gcc2 internal prototype to avoid an error.  */
15423 /* We use char because int might match the return type of a gcc2
15424     builtin and then its argument prototype would still apply.  */
15425 char $ac_func();
15426 char (*f)();
15427
15428 int main() {
15429
15430 /* The GNU C library defines this for functions which it implements
15431     to always fail with ENOSYS.  Some functions are actually named
15432     something starting with __ and the normal name is an alias.  */
15433 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15434 choke me
15435 #else
15436 f = $ac_func;
15437 #endif
15438
15439 ; return 0; }
15440 EOF
15441 if { (eval echo configure:15442: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15442   rm -rf conftest*
15443   eval "ac_cv_func_$ac_func=yes"
15444 else
15445   echo "configure: failed program was:" >&5
15446   cat conftest.$ac_ext >&5
15447   rm -rf conftest*
15448   eval "ac_cv_func_$ac_func=no"
15449 fi
15450 rm -f conftest*
15451 fi
15452
15453 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15454   echo "$ac_t""yes" 1>&6
15455     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15456   cat >> confdefs.h <<EOF
15457 #define $ac_tr_func 1
15458 EOF
15459  
15460 else
15461   echo "$ac_t""no" 1>&6
15462 fi
15463 done
15464
15465         echo $ac_n "checking for LinuxThreads implementation""... $ac_c" 1>&6
15466 echo "configure:15467: checking for LinuxThreads implementation" >&5
15467 if eval "test \"\${ol_cv_sys_linux_threads+set}\" = set"; then
15468   echo $ac_n "(cached) $ac_c" 1>&6
15469 else
15470   ol_cv_sys_linux_threads=$ac_cv_func_pthread_kill_other_threads_np
15471 fi
15472
15473 echo "$ac_t""$ol_cv_sys_linux_threads" 1>&6
15474
15475                         
15476         
15477         
15478         echo $ac_n "checking for LinuxThreads consistency""... $ac_c" 1>&6
15479 echo "configure:15480: checking for LinuxThreads consistency" >&5
15480 if eval "test \"\${ol_cv_linux_threads+set}\" = set"; then
15481   echo $ac_n "(cached) $ac_c" 1>&6
15482 else
15483   
15484                 if test $ol_cv_header_linux_threads = yes -a \
15485                         $ol_cv_sys_linux_threads = yes; then
15486                         ol_cv_linux_threads=yes
15487                 elif test $ol_cv_header_linux_threads = no -a \
15488                         $ol_cv_sys_linux_threads = no; then
15489                         ol_cv_linux_threads=no
15490                 else
15491                         ol_cv_linux_threads=error
15492                 fi
15493         
15494 fi
15495
15496 echo "$ac_t""$ol_cv_linux_threads" 1>&6
15497
15498
15499                         if test $ol_cv_linux_threads = error; then
15500                                 { echo "configure: error: LinuxThreads header/library mismatch" 1>&2; exit 1; };
15501                         fi
15502
15503                         echo $ac_n "checking if pthread_create() works""... $ac_c" 1>&6
15504 echo "configure:15505: checking if pthread_create() works" >&5
15505 if eval "test \"\${ol_cv_pthread_create_works+set}\" = set"; then
15506   echo $ac_n "(cached) $ac_c" 1>&6
15507 else
15508   
15509                         if test "$cross_compiling" = yes; then
15510                                 ol_cv_pthread_create_works=yes
15511 else
15512   cat > conftest.$ac_ext <<EOF
15513 #line 15514 "configure"
15514 #include "confdefs.h"
15515 /* pthread test headers */
15516 #include <pthread.h>
15517 #if HAVE_PTHREADS < 7
15518 #include <errno.h>
15519 #endif
15520 #ifndef NULL
15521 #define NULL (void*)0
15522 #endif
15523
15524 static void *task(p)
15525         void *p;
15526 {
15527         return (void *) (p == NULL);
15528 }
15529
15530
15531 int main(argc, argv)
15532         int argc;
15533         char **argv;
15534 {
15535
15536         /* pthread test function */
15537 #ifndef PTHREAD_CREATE_DETACHED
15538 #define PTHREAD_CREATE_DETACHED 1
15539 #endif
15540         pthread_t t;
15541         int status;
15542         int detach = PTHREAD_CREATE_DETACHED;
15543
15544 #if HAVE_PTHREADS > 4
15545         /* Final pthreads */
15546         pthread_attr_t attr;
15547
15548         status = pthread_attr_init(&attr);
15549         if( status ) return status;
15550
15551 #if HAVE_PTHREADS < 7
15552         status = pthread_attr_setdetachstate(&attr, &detach);
15553         if( status < 0 ) status = errno;
15554 #else
15555         status = pthread_attr_setdetachstate(&attr, detach);
15556 #endif
15557         if( status ) return status;
15558         status = pthread_create( &t, &attr, task, NULL );
15559 #if HAVE_PTHREADS < 7
15560         if( status < 0 ) status = errno;
15561 #endif
15562         if( status ) return status;
15563 #else
15564         /* Draft 4 pthreads */
15565         status = pthread_create( &t, pthread_attr_default, task, NULL );
15566         if( status ) return errno;
15567
15568         /* give thread a chance to complete */
15569         /* it should remain joinable and hence detachable */
15570         sleep( 1 );
15571
15572         status = pthread_detach( &t );
15573         if( status ) return errno;
15574 #endif
15575
15576 #ifdef HAVE_LINUX_THREADS
15577         pthread_kill_other_threads_np();
15578 #endif
15579
15580         return 0;
15581
15582 }
15583
15584 EOF
15585 if { (eval echo configure:15586: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
15586 then
15587   ol_cv_pthread_create_works=yes
15588 else
15589   echo "configure: failed program was:" >&5
15590   cat conftest.$ac_ext >&5
15591   rm -fr conftest*
15592   ol_cv_pthread_create_works=no
15593 fi
15594 rm -fr conftest*
15595 fi
15596
15597 fi
15598
15599 echo "$ac_t""$ol_cv_pthread_create_works" 1>&6
15600
15601                         if test $ol_cv_pthread_create_works = no ; then
15602                                 { echo "configure: error: pthread_create is not usable, check environment settings" 1>&2; exit 1; }
15603                         fi
15604
15605                                                 if test $ol_with_yielding_select = auto ; then
15606                                 echo $ac_n "checking if select yields when using pthreads""... $ac_c" 1>&6
15607 echo "configure:15608: checking if select yields when using pthreads" >&5
15608 if eval "test \"\${ol_cv_pthread_select_yields+set}\" = set"; then
15609   echo $ac_n "(cached) $ac_c" 1>&6
15610 else
15611   
15612                                 if test "$cross_compiling" = yes; then
15613   ol_cv_pthread_select_yields=cross
15614 else
15615   cat > conftest.$ac_ext <<EOF
15616 #line 15617 "configure"
15617 #include "confdefs.h"
15618
15619 #include <sys/types.h>
15620 #include <sys/time.h>
15621 #include <unistd.h>
15622 #include <pthread.h>
15623 #ifndef NULL
15624 #define NULL (void*) 0
15625 #endif
15626
15627 static int fildes[2];
15628
15629 static void *task(p)
15630         void *p;
15631 {
15632         int i;
15633         struct timeval tv;
15634
15635         fd_set rfds;
15636
15637         tv.tv_sec=10;
15638         tv.tv_usec=0;
15639
15640         FD_ZERO(&rfds);
15641         FD_SET(fildes[0], &rfds);
15642
15643         /* we're not interested in any fds */
15644         i = select(FD_SETSIZE, &rfds, NULL, NULL, &tv);
15645
15646         if(i < 0) {
15647                 perror("select");
15648                 exit(10);
15649         }
15650
15651         exit(0); /* if we exit here, the select blocked the whole process */
15652 }
15653
15654 int main(argc, argv)
15655         int argc;
15656         char **argv;
15657 {
15658         pthread_t t;
15659
15660         /* create a pipe to select */
15661         if(pipe(&fildes[0])) {
15662                 perror("select");
15663                 exit(1);
15664         }
15665
15666 #ifdef HAVE_PTHREAD_SETCONCURRENCY
15667         (void) pthread_setconcurrency(2);
15668 #else
15669 #ifdef HAVE_THR_SETCONCURRENCY
15670         /* Set Solaris LWP concurrency to 2 */
15671         thr_setconcurrency(2);
15672 #endif
15673 #endif
15674
15675 #if HAVE_PTHREADS < 6
15676         pthread_create(&t, pthread_attr_default, task, NULL);
15677 #else
15678         pthread_create(&t, NULL, task, NULL);
15679 #endif
15680
15681         /* make sure task runs first */
15682 #if HAVE_THR_YIELD
15683         thr_yield();
15684 #elif defined( HAVE_SCHED_YIELD )
15685         sched_yield();
15686 #elif defined( HAVE_PTHREAD_YIELD )
15687         pthread_yield();
15688 #endif
15689
15690         exit(2);
15691 }
15692 EOF
15693 if { (eval echo configure:15694: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
15694 then
15695   ol_cv_pthread_select_yields=no
15696 else
15697   echo "configure: failed program was:" >&5
15698   cat conftest.$ac_ext >&5
15699   rm -fr conftest*
15700   ol_cv_pthread_select_yields=yes
15701 fi
15702 rm -fr conftest*
15703 fi
15704
15705 fi
15706
15707 echo "$ac_t""$ol_cv_pthread_select_yields" 1>&6
15708
15709                                 if test $ol_cv_pthread_select_yields = cross ; then
15710                                         { echo "configure: error: crossing compiling: use --with-yielding_select=yes|no|manual" 1>&2; exit 1; }
15711                                 fi
15712
15713                                 if test $ol_cv_pthread_select_yields = yes ; then
15714                                         ol_with_yielding_select=yes
15715                                 fi
15716                         fi
15717
15718                                                 CPPFLAGS="$save_CPPFLAGS"
15719                         LIBS="$save_LIBS"
15720                 else
15721                         { echo "configure: error: could not locate usable POSIX Threads" 1>&2; exit 1; }
15722                 fi
15723         fi
15724
15725         if test $ol_with_threads = posix ; then
15726                 { echo "configure: error: could not locate POSIX Threads" 1>&2; exit 1; }
15727         fi
15728 fi
15729
15730 if test $ol_with_threads = auto -o $ol_with_threads = yes \
15731         -o $ol_with_threads = mach ; then
15732
15733                 for ac_hdr in mach/cthreads.h cthreads.h
15734 do
15735 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15736 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15737 echo "configure:15738: checking for $ac_hdr" >&5
15738 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15739   echo $ac_n "(cached) $ac_c" 1>&6
15740 else
15741   cat > conftest.$ac_ext <<EOF
15742 #line 15743 "configure"
15743 #include "confdefs.h"
15744 #include <$ac_hdr>
15745 EOF
15746 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15747 { (eval echo configure:15748: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15748 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15749 if test -z "$ac_err"; then
15750   rm -rf conftest*
15751   eval "ac_cv_header_$ac_safe=yes"
15752 else
15753   echo "$ac_err" >&5
15754   echo "configure: failed program was:" >&5
15755   cat conftest.$ac_ext >&5
15756   rm -rf conftest*
15757   eval "ac_cv_header_$ac_safe=no"
15758 fi
15759 rm -f conftest*
15760 fi
15761 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15762   echo "$ac_t""yes" 1>&6
15763     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15764   cat >> confdefs.h <<EOF
15765 #define $ac_tr_hdr 1
15766 EOF
15767  
15768 else
15769   echo "$ac_t""no" 1>&6
15770 fi
15771 done
15772
15773         if test $ac_cv_header_mach_cthreads_h = yes ; then
15774                 ol_with_threads=found
15775
15776                                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
15777 echo "configure:15778: checking for cthread_fork" >&5
15778 if eval "test \"\${ac_cv_func_cthread_fork+set}\" = set"; then
15779   echo $ac_n "(cached) $ac_c" 1>&6
15780 else
15781   cat > conftest.$ac_ext <<EOF
15782 #line 15783 "configure"
15783 #include "confdefs.h"
15784 /* System header to define __stub macros and hopefully few prototypes,
15785     which can conflict with char cthread_fork(); below.  */
15786 #include <assert.h>
15787 /* Override any gcc2 internal prototype to avoid an error.  */
15788 /* We use char because int might match the return type of a gcc2
15789     builtin and then its argument prototype would still apply.  */
15790 char cthread_fork();
15791 char (*f)();
15792
15793 int main() {
15794
15795 /* The GNU C library defines this for functions which it implements
15796     to always fail with ENOSYS.  Some functions are actually named
15797     something starting with __ and the normal name is an alias.  */
15798 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
15799 choke me
15800 #else
15801 f = cthread_fork;
15802 #endif
15803
15804 ; return 0; }
15805 EOF
15806 if { (eval echo configure:15807: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15807   rm -rf conftest*
15808   eval "ac_cv_func_cthread_fork=yes"
15809 else
15810   echo "configure: failed program was:" >&5
15811   cat conftest.$ac_ext >&5
15812   rm -rf conftest*
15813   eval "ac_cv_func_cthread_fork=no"
15814 fi
15815 rm -f conftest*
15816 fi
15817
15818 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
15819   echo "$ac_t""yes" 1>&6
15820   ol_link_threads=yes
15821 else
15822   echo "$ac_t""no" 1>&6
15823 fi
15824
15825
15826                 if test $ol_link_threads = no ; then
15827                                                                         echo $ac_n "checking for cthread_fork with -all_load""... $ac_c" 1>&6
15828 echo "configure:15829: checking for cthread_fork with -all_load" >&5
15829 if eval "test \"\${ol_cv_cthread_all_load+set}\" = set"; then
15830   echo $ac_n "(cached) $ac_c" 1>&6
15831 else
15832   
15833                                                                 save_LIBS="$LIBS"
15834                                 LIBS="-all_load $LIBS"
15835                                 cat > conftest.$ac_ext <<EOF
15836 #line 15837 "configure"
15837 #include "confdefs.h"
15838 #include <mach/cthreads.h>
15839 int main() {
15840
15841                                         cthread_fork((void *)0, (void *)0);
15842                                         
15843 ; return 0; }
15844 EOF
15845 if { (eval echo configure:15846: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15846   rm -rf conftest*
15847   ol_cv_cthread_all_load=yes
15848 else
15849   echo "configure: failed program was:" >&5
15850   cat conftest.$ac_ext >&5
15851   rm -rf conftest*
15852   ol_cv_cthread_all_load=no
15853 fi
15854 rm -f conftest*
15855                                                                 LIBS="$save_LIBS"
15856                         
15857 fi
15858
15859 echo "$ac_t""$ol_cv_cthread_all_load" 1>&6
15860
15861                         if test $ol_cv_cthread_all_load = yes ; then
15862                                 LTHREAD_LIBS="$LTHREAD_LIBS -all_load"
15863                                 ol_link_threads=mach
15864                                 ol_with_threads=found
15865                         fi
15866                 fi
15867
15868         elif test $ac_cv_header_cthreads_h = yes ; then
15869                                 
15870                 ol_with_threads=found
15871  
15872                                 save_LIBS="$LIBS"
15873                 LIBS="$LIBS -lthreads"
15874                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
15875 echo "configure:15876: checking for cthread_fork" >&5
15876 if eval "test \"\${ac_cv_func_cthread_fork+set}\" = set"; then
15877   echo $ac_n "(cached) $ac_c" 1>&6
15878 else
15879   cat > conftest.$ac_ext <<EOF
15880 #line 15881 "configure"
15881 #include "confdefs.h"
15882 /* System header to define __stub macros and hopefully few prototypes,
15883     which can conflict with char cthread_fork(); below.  */
15884 #include <assert.h>
15885 /* Override any gcc2 internal prototype to avoid an error.  */
15886 /* We use char because int might match the return type of a gcc2
15887     builtin and then its argument prototype would still apply.  */
15888 char cthread_fork();
15889 char (*f)();
15890
15891 int main() {
15892
15893 /* The GNU C library defines this for functions which it implements
15894     to always fail with ENOSYS.  Some functions are actually named
15895     something starting with __ and the normal name is an alias.  */
15896 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
15897 choke me
15898 #else
15899 f = cthread_fork;
15900 #endif
15901
15902 ; return 0; }
15903 EOF
15904 if { (eval echo configure:15905: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15905   rm -rf conftest*
15906   eval "ac_cv_func_cthread_fork=yes"
15907 else
15908   echo "configure: failed program was:" >&5
15909   cat conftest.$ac_ext >&5
15910   rm -rf conftest*
15911   eval "ac_cv_func_cthread_fork=no"
15912 fi
15913 rm -f conftest*
15914 fi
15915
15916 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
15917   echo "$ac_t""yes" 1>&6
15918   ol_link_threads=yes
15919 else
15920   echo "$ac_t""no" 1>&6
15921 fi
15922
15923                 LIBS="$save_LIBS"
15924
15925                 if test $ol_link_threads = yes ; then
15926                         LTHREAD_LIBS="-lthreads"
15927                         ol_link_threads=mach
15928                         ol_with_threads=found
15929                 else
15930                         { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
15931                 fi
15932
15933         elif test $ol_with_threads = mach ; then
15934                 { echo "configure: error: could not locate Mach CThreads" 1>&2; exit 1; }
15935         fi
15936
15937         if test $ol_link_threads = mach ; then
15938                 cat >> confdefs.h <<\EOF
15939 #define HAVE_MACH_CTHREADS 1
15940 EOF
15941
15942         elif test $ol_with_threads = found ; then
15943                 { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
15944         fi
15945 fi
15946
15947 if test $ol_with_threads = auto -o $ol_with_threads = yes \
15948         -o $ol_with_threads = pth ; then
15949
15950         for ac_hdr in pth.h
15951 do
15952 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15953 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15954 echo "configure:15955: checking for $ac_hdr" >&5
15955 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15956   echo $ac_n "(cached) $ac_c" 1>&6
15957 else
15958   cat > conftest.$ac_ext <<EOF
15959 #line 15960 "configure"
15960 #include "confdefs.h"
15961 #include <$ac_hdr>
15962 EOF
15963 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15964 { (eval echo configure:15965: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15965 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15966 if test -z "$ac_err"; then
15967   rm -rf conftest*
15968   eval "ac_cv_header_$ac_safe=yes"
15969 else
15970   echo "$ac_err" >&5
15971   echo "configure: failed program was:" >&5
15972   cat conftest.$ac_ext >&5
15973   rm -rf conftest*
15974   eval "ac_cv_header_$ac_safe=no"
15975 fi
15976 rm -f conftest*
15977 fi
15978 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15979   echo "$ac_t""yes" 1>&6
15980     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15981   cat >> confdefs.h <<EOF
15982 #define $ac_tr_hdr 1
15983 EOF
15984  
15985 else
15986   echo "$ac_t""no" 1>&6
15987 fi
15988 done
15989
15990
15991         if test $ac_cv_header_pth_h = yes ; then
15992                 echo $ac_n "checking for pth_version in -lpth""... $ac_c" 1>&6
15993 echo "configure:15994: checking for pth_version in -lpth" >&5
15994 ac_lib_var=`echo pth'_'pth_version | sed 'y%./+-:%__p__%'`
15995 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
15996   echo $ac_n "(cached) $ac_c" 1>&6
15997 else
15998   ac_save_LIBS="$LIBS"
15999 LIBS="-lpth  $LIBS"
16000 cat > conftest.$ac_ext <<EOF
16001 #line 16002 "configure"
16002 #include "confdefs.h"
16003 /* Override any gcc2 internal prototype to avoid an error.  */
16004 /* We use char because int might match the return type of a gcc2
16005     builtin and then its argument prototype would still apply.  */
16006 char pth_version();
16007
16008 int main() {
16009 pth_version()
16010 ; return 0; }
16011 EOF
16012 if { (eval echo configure:16013: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16013   rm -rf conftest*
16014   eval "ac_cv_lib_$ac_lib_var=yes"
16015 else
16016   echo "configure: failed program was:" >&5
16017   cat conftest.$ac_ext >&5
16018   rm -rf conftest*
16019   eval "ac_cv_lib_$ac_lib_var=no"
16020 fi
16021 rm -f conftest*
16022 LIBS="$ac_save_LIBS"
16023
16024 fi
16025 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
16026   echo "$ac_t""yes" 1>&6
16027   have_pth=yes
16028 else
16029   echo "$ac_t""no" 1>&6
16030 have_pth=no
16031 fi
16032
16033
16034                 if test $have_pth = yes ; then
16035                         cat >> confdefs.h <<\EOF
16036 #define HAVE_GNU_PTH 1
16037 EOF
16038
16039                         LTHREAD_LIBS="$LTHREAD_LIBS -lpth"
16040                         ol_link_threads=pth
16041                         ol_with_threads=found
16042
16043                         if test $ol_with_yielding_select = auto ; then
16044                                 ol_with_yielding_select=yes
16045                         fi
16046                 fi
16047         fi
16048 fi
16049
16050 if test $ol_with_threads = auto -o $ol_with_threads = yes \
16051         -o $ol_with_threads = lwp ; then
16052
16053                 for ac_hdr in thread.h synch.h
16054 do
16055 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16056 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16057 echo "configure:16058: checking for $ac_hdr" >&5
16058 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16059   echo $ac_n "(cached) $ac_c" 1>&6
16060 else
16061   cat > conftest.$ac_ext <<EOF
16062 #line 16063 "configure"
16063 #include "confdefs.h"
16064 #include <$ac_hdr>
16065 EOF
16066 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16067 { (eval echo configure:16068: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16068 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16069 if test -z "$ac_err"; then
16070   rm -rf conftest*
16071   eval "ac_cv_header_$ac_safe=yes"
16072 else
16073   echo "$ac_err" >&5
16074   echo "configure: failed program was:" >&5
16075   cat conftest.$ac_ext >&5
16076   rm -rf conftest*
16077   eval "ac_cv_header_$ac_safe=no"
16078 fi
16079 rm -f conftest*
16080 fi
16081 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16082   echo "$ac_t""yes" 1>&6
16083     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16084   cat >> confdefs.h <<EOF
16085 #define $ac_tr_hdr 1
16086 EOF
16087  
16088 else
16089   echo "$ac_t""no" 1>&6
16090 fi
16091 done
16092
16093         if test $ac_cv_header_thread_h = yes -a $ac_cv_header_synch_h = yes ; then
16094                 echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6
16095 echo "configure:16096: checking for thr_create in -lthread" >&5
16096 ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-:%__p__%'`
16097 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
16098   echo $ac_n "(cached) $ac_c" 1>&6
16099 else
16100   ac_save_LIBS="$LIBS"
16101 LIBS="-lthread  $LIBS"
16102 cat > conftest.$ac_ext <<EOF
16103 #line 16104 "configure"
16104 #include "confdefs.h"
16105 /* Override any gcc2 internal prototype to avoid an error.  */
16106 /* We use char because int might match the return type of a gcc2
16107     builtin and then its argument prototype would still apply.  */
16108 char thr_create();
16109
16110 int main() {
16111 thr_create()
16112 ; return 0; }
16113 EOF
16114 if { (eval echo configure:16115: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16115   rm -rf conftest*
16116   eval "ac_cv_lib_$ac_lib_var=yes"
16117 else
16118   echo "configure: failed program was:" >&5
16119   cat conftest.$ac_ext >&5
16120   rm -rf conftest*
16121   eval "ac_cv_lib_$ac_lib_var=no"
16122 fi
16123 rm -f conftest*
16124 LIBS="$ac_save_LIBS"
16125
16126 fi
16127 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
16128   echo "$ac_t""yes" 1>&6
16129   have_thr=yes
16130 else
16131   echo "$ac_t""no" 1>&6
16132 have_thr=no
16133 fi
16134
16135
16136                 if test $have_thr = yes ; then
16137                         cat >> confdefs.h <<\EOF
16138 #define HAVE_THR 1
16139 EOF
16140
16141                         LTHREAD_LIBS="$LTHREAD_LIBS -lthread"
16142                         ol_link_threads=thr
16143
16144                         if test $ol_with_yielding_select = auto ; then
16145                                 ol_with_yielding_select=yes
16146                         fi
16147
16148                                                 for ac_func in \
16149                                 thr_setconcurrency \
16150                                 thr_getconcurrency \
16151                         
16152 do
16153 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
16154 echo "configure:16155: checking for $ac_func" >&5
16155 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
16156   echo $ac_n "(cached) $ac_c" 1>&6
16157 else
16158   cat > conftest.$ac_ext <<EOF
16159 #line 16160 "configure"
16160 #include "confdefs.h"
16161 /* System header to define __stub macros and hopefully few prototypes,
16162     which can conflict with char $ac_func(); below.  */
16163 #include <assert.h>
16164 /* Override any gcc2 internal prototype to avoid an error.  */
16165 /* We use char because int might match the return type of a gcc2
16166     builtin and then its argument prototype would still apply.  */
16167 char $ac_func();
16168 char (*f)();
16169
16170 int main() {
16171
16172 /* The GNU C library defines this for functions which it implements
16173     to always fail with ENOSYS.  Some functions are actually named
16174     something starting with __ and the normal name is an alias.  */
16175 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16176 choke me
16177 #else
16178 f = $ac_func;
16179 #endif
16180
16181 ; return 0; }
16182 EOF
16183 if { (eval echo configure:16184: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16184   rm -rf conftest*
16185   eval "ac_cv_func_$ac_func=yes"
16186 else
16187   echo "configure: failed program was:" >&5
16188   cat conftest.$ac_ext >&5
16189   rm -rf conftest*
16190   eval "ac_cv_func_$ac_func=no"
16191 fi
16192 rm -f conftest*
16193 fi
16194
16195 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
16196   echo "$ac_t""yes" 1>&6
16197     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
16198   cat >> confdefs.h <<EOF
16199 #define $ac_tr_func 1
16200 EOF
16201  
16202 else
16203   echo "$ac_t""no" 1>&6
16204 fi
16205 done
16206
16207                 fi
16208         fi
16209
16210                 for ac_hdr in lwp/lwp.h
16211 do
16212 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16213 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16214 echo "configure:16215: checking for $ac_hdr" >&5
16215 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16216   echo $ac_n "(cached) $ac_c" 1>&6
16217 else
16218   cat > conftest.$ac_ext <<EOF
16219 #line 16220 "configure"
16220 #include "confdefs.h"
16221 #include <$ac_hdr>
16222 EOF
16223 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16224 { (eval echo configure:16225: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16225 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16226 if test -z "$ac_err"; then
16227   rm -rf conftest*
16228   eval "ac_cv_header_$ac_safe=yes"
16229 else
16230   echo "$ac_err" >&5
16231   echo "configure: failed program was:" >&5
16232   cat conftest.$ac_ext >&5
16233   rm -rf conftest*
16234   eval "ac_cv_header_$ac_safe=no"
16235 fi
16236 rm -f conftest*
16237 fi
16238 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16239   echo "$ac_t""yes" 1>&6
16240     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16241   cat >> confdefs.h <<EOF
16242 #define $ac_tr_hdr 1
16243 EOF
16244  
16245 else
16246   echo "$ac_t""no" 1>&6
16247 fi
16248 done
16249
16250         if test $ac_cv_header_lwp_lwp_h = yes ; then
16251                 echo $ac_n "checking for lwp_create in -llwp""... $ac_c" 1>&6
16252 echo "configure:16253: checking for lwp_create in -llwp" >&5
16253 ac_lib_var=`echo lwp'_'lwp_create | sed 'y%./+-:%__p__%'`
16254 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
16255   echo $ac_n "(cached) $ac_c" 1>&6
16256 else
16257   ac_save_LIBS="$LIBS"
16258 LIBS="-llwp  $LIBS"
16259 cat > conftest.$ac_ext <<EOF
16260 #line 16261 "configure"
16261 #include "confdefs.h"
16262 /* Override any gcc2 internal prototype to avoid an error.  */
16263 /* We use char because int might match the return type of a gcc2
16264     builtin and then its argument prototype would still apply.  */
16265 char lwp_create();
16266
16267 int main() {
16268 lwp_create()
16269 ; return 0; }
16270 EOF
16271 if { (eval echo configure:16272: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16272   rm -rf conftest*
16273   eval "ac_cv_lib_$ac_lib_var=yes"
16274 else
16275   echo "configure: failed program was:" >&5
16276   cat conftest.$ac_ext >&5
16277   rm -rf conftest*
16278   eval "ac_cv_lib_$ac_lib_var=no"
16279 fi
16280 rm -f conftest*
16281 LIBS="$ac_save_LIBS"
16282
16283 fi
16284 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
16285   echo "$ac_t""yes" 1>&6
16286   have_lwp=yes
16287 else
16288   echo "$ac_t""no" 1>&6
16289 have_lwp=no
16290 fi
16291
16292
16293                 if test $have_lwp = yes ; then
16294                         cat >> confdefs.h <<\EOF
16295 #define HAVE_LWP 1
16296 EOF
16297
16298                         LTHREAD_LIBS="$LTHREAD_LIBS -llwp"
16299                         ol_link_threads=lwp
16300
16301                         if test $ol_with_yielding_select = auto ; then
16302                                 ol_with_yielding_select=no
16303                         fi
16304                 fi
16305         fi
16306 fi
16307
16308 if test $ol_with_yielding_select = yes ; then
16309         cat >> confdefs.h <<\EOF
16310 #define HAVE_YIELDING_SELECT 1
16311 EOF
16312
16313 fi
16314
16315 if test $ol_with_threads = manual ; then
16316                 ol_link_threads=yes
16317
16318         echo "configure: warning: thread defines and link options must be set manually" 1>&2
16319
16320         for ac_hdr in pthread.h sched.h
16321 do
16322 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16323 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16324 echo "configure:16325: checking for $ac_hdr" >&5
16325 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16326   echo $ac_n "(cached) $ac_c" 1>&6
16327 else
16328   cat > conftest.$ac_ext <<EOF
16329 #line 16330 "configure"
16330 #include "confdefs.h"
16331 #include <$ac_hdr>
16332 EOF
16333 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16334 { (eval echo configure:16335: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16335 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16336 if test -z "$ac_err"; then
16337   rm -rf conftest*
16338   eval "ac_cv_header_$ac_safe=yes"
16339 else
16340   echo "$ac_err" >&5
16341   echo "configure: failed program was:" >&5
16342   cat conftest.$ac_ext >&5
16343   rm -rf conftest*
16344   eval "ac_cv_header_$ac_safe=no"
16345 fi
16346 rm -f conftest*
16347 fi
16348 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16349   echo "$ac_t""yes" 1>&6
16350     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16351   cat >> confdefs.h <<EOF
16352 #define $ac_tr_hdr 1
16353 EOF
16354  
16355 else
16356   echo "$ac_t""no" 1>&6
16357 fi
16358 done
16359
16360         for ac_func in sched_yield pthread_yield
16361 do
16362 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
16363 echo "configure:16364: checking for $ac_func" >&5
16364 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
16365   echo $ac_n "(cached) $ac_c" 1>&6
16366 else
16367   cat > conftest.$ac_ext <<EOF
16368 #line 16369 "configure"
16369 #include "confdefs.h"
16370 /* System header to define __stub macros and hopefully few prototypes,
16371     which can conflict with char $ac_func(); below.  */
16372 #include <assert.h>
16373 /* Override any gcc2 internal prototype to avoid an error.  */
16374 /* We use char because int might match the return type of a gcc2
16375     builtin and then its argument prototype would still apply.  */
16376 char $ac_func();
16377 char (*f)();
16378
16379 int main() {
16380
16381 /* The GNU C library defines this for functions which it implements
16382     to always fail with ENOSYS.  Some functions are actually named
16383     something starting with __ and the normal name is an alias.  */
16384 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16385 choke me
16386 #else
16387 f = $ac_func;
16388 #endif
16389
16390 ; return 0; }
16391 EOF
16392 if { (eval echo configure:16393: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16393   rm -rf conftest*
16394   eval "ac_cv_func_$ac_func=yes"
16395 else
16396   echo "configure: failed program was:" >&5
16397   cat conftest.$ac_ext >&5
16398   rm -rf conftest*
16399   eval "ac_cv_func_$ac_func=no"
16400 fi
16401 rm -f conftest*
16402 fi
16403
16404 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
16405   echo "$ac_t""yes" 1>&6
16406     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
16407   cat >> confdefs.h <<EOF
16408 #define $ac_tr_func 1
16409 EOF
16410  
16411 else
16412   echo "$ac_t""no" 1>&6
16413 fi
16414 done
16415
16416         
16417         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
16418 echo "configure:16419: checking for LinuxThreads pthread.h" >&5
16419 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
16420   echo $ac_n "(cached) $ac_c" 1>&6
16421 else
16422   cat > conftest.$ac_ext <<EOF
16423 #line 16424 "configure"
16424 #include "confdefs.h"
16425 #include <pthread.h>
16426 EOF
16427 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16428   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
16429   rm -rf conftest*
16430   ol_cv_header_linux_threads=yes
16431 else
16432   rm -rf conftest*
16433   ol_cv_header_linux_threads=no
16434 fi
16435 rm -f conftest*
16436
16437                 
16438 fi
16439
16440 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
16441         if test $ol_cv_header_linux_threads = yes; then
16442                 cat >> confdefs.h <<\EOF
16443 #define HAVE_LINUX_THREADS 1
16444 EOF
16445
16446         fi
16447
16448
16449         for ac_hdr in mach/cthreads.h
16450 do
16451 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16452 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16453 echo "configure:16454: checking for $ac_hdr" >&5
16454 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16455   echo $ac_n "(cached) $ac_c" 1>&6
16456 else
16457   cat > conftest.$ac_ext <<EOF
16458 #line 16459 "configure"
16459 #include "confdefs.h"
16460 #include <$ac_hdr>
16461 EOF
16462 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16463 { (eval echo configure:16464: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16464 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16465 if test -z "$ac_err"; then
16466   rm -rf conftest*
16467   eval "ac_cv_header_$ac_safe=yes"
16468 else
16469   echo "$ac_err" >&5
16470   echo "configure: failed program was:" >&5
16471   cat conftest.$ac_ext >&5
16472   rm -rf conftest*
16473   eval "ac_cv_header_$ac_safe=no"
16474 fi
16475 rm -f conftest*
16476 fi
16477 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16478   echo "$ac_t""yes" 1>&6
16479     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16480   cat >> confdefs.h <<EOF
16481 #define $ac_tr_hdr 1
16482 EOF
16483  
16484 else
16485   echo "$ac_t""no" 1>&6
16486 fi
16487 done
16488
16489         for ac_hdr in lwp/lwp.h
16490 do
16491 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16492 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16493 echo "configure:16494: checking for $ac_hdr" >&5
16494 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16495   echo $ac_n "(cached) $ac_c" 1>&6
16496 else
16497   cat > conftest.$ac_ext <<EOF
16498 #line 16499 "configure"
16499 #include "confdefs.h"
16500 #include <$ac_hdr>
16501 EOF
16502 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16503 { (eval echo configure:16504: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16504 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16505 if test -z "$ac_err"; then
16506   rm -rf conftest*
16507   eval "ac_cv_header_$ac_safe=yes"
16508 else
16509   echo "$ac_err" >&5
16510   echo "configure: failed program was:" >&5
16511   cat conftest.$ac_ext >&5
16512   rm -rf conftest*
16513   eval "ac_cv_header_$ac_safe=no"
16514 fi
16515 rm -f conftest*
16516 fi
16517 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16518   echo "$ac_t""yes" 1>&6
16519     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16520   cat >> confdefs.h <<EOF
16521 #define $ac_tr_hdr 1
16522 EOF
16523  
16524 else
16525   echo "$ac_t""no" 1>&6
16526 fi
16527 done
16528
16529         for ac_hdr in thread.h synch.h
16530 do
16531 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16532 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16533 echo "configure:16534: checking for $ac_hdr" >&5
16534 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16535   echo $ac_n "(cached) $ac_c" 1>&6
16536 else
16537   cat > conftest.$ac_ext <<EOF
16538 #line 16539 "configure"
16539 #include "confdefs.h"
16540 #include <$ac_hdr>
16541 EOF
16542 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16543 { (eval echo configure:16544: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16544 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16545 if test -z "$ac_err"; then
16546   rm -rf conftest*
16547   eval "ac_cv_header_$ac_safe=yes"
16548 else
16549   echo "$ac_err" >&5
16550   echo "configure: failed program was:" >&5
16551   cat conftest.$ac_ext >&5
16552   rm -rf conftest*
16553   eval "ac_cv_header_$ac_safe=no"
16554 fi
16555 rm -f conftest*
16556 fi
16557 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16558   echo "$ac_t""yes" 1>&6
16559     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16560   cat >> confdefs.h <<EOF
16561 #define $ac_tr_hdr 1
16562 EOF
16563  
16564 else
16565   echo "$ac_t""no" 1>&6
16566 fi
16567 done
16568
16569 fi
16570
16571 if test $ol_link_threads != no -a $ol_link_threads != nt ; then  
16572                         cat >> confdefs.h <<\EOF
16573 #define REENTRANT 1
16574 EOF
16575
16576         cat >> confdefs.h <<\EOF
16577 #define _REENTRANT 1
16578 EOF
16579
16580         cat >> confdefs.h <<\EOF
16581 #define THREAD_SAFE 1
16582 EOF
16583
16584         cat >> confdefs.h <<\EOF
16585 #define _THREAD_SAFE 1
16586 EOF
16587
16588         cat >> confdefs.h <<\EOF
16589 #define THREADSAFE 1
16590 EOF
16591
16592         cat >> confdefs.h <<\EOF
16593 #define _THREADSAFE 1
16594 EOF
16595
16596         cat >> confdefs.h <<\EOF
16597 #define _SGI_MP_SOURCE 1
16598 EOF
16599
16600
16601                         echo $ac_n "checking for thread specific errno""... $ac_c" 1>&6
16602 echo "configure:16603: checking for thread specific errno" >&5
16603 if eval "test \"\${ol_cv_errno_thread_specific+set}\" = set"; then
16604   echo $ac_n "(cached) $ac_c" 1>&6
16605 else
16606   
16607                 cat > conftest.$ac_ext <<EOF
16608 #line 16609 "configure"
16609 #include "confdefs.h"
16610 #include <errno.h>
16611 int main() {
16612 errno = 0;
16613 ; return 0; }
16614 EOF
16615 if { (eval echo configure:16616: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16616   rm -rf conftest*
16617   ol_cv_errno_thread_specific=yes
16618 else
16619   echo "configure: failed program was:" >&5
16620   cat conftest.$ac_ext >&5
16621   rm -rf conftest*
16622   ol_cv_errno_thread_specific=no
16623 fi
16624 rm -f conftest*
16625         
16626 fi
16627
16628 echo "$ac_t""$ol_cv_errno_thread_specific" 1>&6
16629
16630                         echo $ac_n "checking for thread specific h_errno""... $ac_c" 1>&6
16631 echo "configure:16632: checking for thread specific h_errno" >&5
16632 if eval "test \"\${ol_cv_h_errno_thread_specific+set}\" = set"; then
16633   echo $ac_n "(cached) $ac_c" 1>&6
16634 else
16635   
16636                 cat > conftest.$ac_ext <<EOF
16637 #line 16638 "configure"
16638 #include "confdefs.h"
16639 #include <netdb.h>
16640 int main() {
16641 h_errno = 0;
16642 ; return 0; }
16643 EOF
16644 if { (eval echo configure:16645: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16645   rm -rf conftest*
16646   ol_cv_h_errno_thread_specific=yes
16647 else
16648   echo "configure: failed program was:" >&5
16649   cat conftest.$ac_ext >&5
16650   rm -rf conftest*
16651   ol_cv_h_errno_thread_specific=no
16652 fi
16653 rm -f conftest*
16654         
16655 fi
16656
16657 echo "$ac_t""$ol_cv_h_errno_thread_specific" 1>&6
16658
16659         if test $ol_cv_errno_thread_specific != yes \
16660                 -o $ol_cv_h_errno_thread_specific != yes ; then
16661                 LIBS="$LTHREAD_LIBS $LIBS"
16662                 LTHREAD_LIBS=""
16663         fi
16664
16665 fi  
16666
16667 if test $ol_link_threads = no ; then
16668         if test $ol_with_threads = yes ; then
16669                 { echo "configure: error: no suitable thread support" 1>&2; exit 1; }
16670         fi
16671
16672         if test $ol_with_threads = auto ; then
16673                 echo "configure: warning: no suitable thread support, disabling threads" 1>&2
16674                 ol_with_threads=no
16675         fi
16676
16677         cat >> confdefs.h <<\EOF
16678 #define NO_THREADS 1
16679 EOF
16680
16681         LTHREAD_LIBS=""
16682 fi
16683
16684 if test $ol_link_threads != no ; then
16685         cat >> confdefs.h <<\EOF
16686 #define LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE 1
16687 EOF
16688
16689 fi
16690
16691 for ac_func in \
16692         ctime_r                 \
16693         gethostbyname_r gethostbyaddr_r \
16694
16695 do
16696 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
16697 echo "configure:16698: checking for $ac_func" >&5
16698 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
16699   echo $ac_n "(cached) $ac_c" 1>&6
16700 else
16701   cat > conftest.$ac_ext <<EOF
16702 #line 16703 "configure"
16703 #include "confdefs.h"
16704 /* System header to define __stub macros and hopefully few prototypes,
16705     which can conflict with char $ac_func(); below.  */
16706 #include <assert.h>
16707 /* Override any gcc2 internal prototype to avoid an error.  */
16708 /* We use char because int might match the return type of a gcc2
16709     builtin and then its argument prototype would still apply.  */
16710 char $ac_func();
16711 char (*f)();
16712
16713 int main() {
16714
16715 /* The GNU C library defines this for functions which it implements
16716     to always fail with ENOSYS.  Some functions are actually named
16717     something starting with __ and the normal name is an alias.  */
16718 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16719 choke me
16720 #else
16721 f = $ac_func;
16722 #endif
16723
16724 ; return 0; }
16725 EOF
16726 if { (eval echo configure:16727: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16727   rm -rf conftest*
16728   eval "ac_cv_func_$ac_func=yes"
16729 else
16730   echo "configure: failed program was:" >&5
16731   cat conftest.$ac_ext >&5
16732   rm -rf conftest*
16733   eval "ac_cv_func_$ac_func=no"
16734 fi
16735 rm -f conftest*
16736 fi
16737
16738 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
16739   echo "$ac_t""yes" 1>&6
16740     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
16741   cat >> confdefs.h <<EOF
16742 #define $ac_tr_func 1
16743 EOF
16744  
16745 else
16746   echo "$ac_t""no" 1>&6
16747 fi
16748 done
16749
16750
16751 if test "$ac_cv_func_ctime_r" = no ; then
16752         ol_cv_func_ctime_r_nargs=0
16753 else
16754         echo $ac_n "checking number of arguments of ctime_r""... $ac_c" 1>&6
16755 echo "configure:16756: checking number of arguments of ctime_r" >&5
16756 if eval "test \"\${ol_cv_func_ctime_r_nargs+set}\" = set"; then
16757   echo $ac_n "(cached) $ac_c" 1>&6
16758 else
16759   cat > conftest.$ac_ext <<EOF
16760 #line 16761 "configure"
16761 #include "confdefs.h"
16762 #include <time.h>
16763 int main() {
16764 time_t ti; char *buffer; ctime_r(&ti,buffer,32);
16765 ; return 0; }
16766 EOF
16767 if { (eval echo configure:16768: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16768   rm -rf conftest*
16769   ol_cv_func_ctime_r_nargs3=yes
16770 else
16771   echo "configure: failed program was:" >&5
16772   cat conftest.$ac_ext >&5
16773   rm -rf conftest*
16774   ol_cv_func_ctime_r_nargs3=no
16775 fi
16776 rm -f conftest*
16777
16778         cat > conftest.$ac_ext <<EOF
16779 #line 16780 "configure"
16780 #include "confdefs.h"
16781 #include <time.h>
16782 int main() {
16783 time_t ti; char *buffer; ctime_r(&ti,buffer);
16784 ; return 0; }
16785 EOF
16786 if { (eval echo configure:16787: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16787   rm -rf conftest*
16788   ol_cv_func_ctime_r_nargs2=yes
16789 else
16790   echo "configure: failed program was:" >&5
16791   cat conftest.$ac_ext >&5
16792   rm -rf conftest*
16793   ol_cv_func_ctime_r_nargs2=no
16794 fi
16795 rm -f conftest*
16796
16797         if test $ol_cv_func_ctime_r_nargs3 = yes -a \
16798                 $ol_cv_func_ctime_r_nargs2 = no ; then
16799
16800                 ol_cv_func_ctime_r_nargs=3
16801
16802         elif test $ol_cv_func_ctime_r_nargs3 = no -a \
16803                 $ol_cv_func_ctime_r_nargs2 = yes ; then
16804
16805                 ol_cv_func_ctime_r_nargs=2
16806
16807         else
16808                 ol_cv_func_ctime_r_nargs=0
16809         fi
16810   
16811 fi
16812
16813 echo "$ac_t""$ol_cv_func_ctime_r_nargs" 1>&6
16814
16815   if test $ol_cv_func_ctime_r_nargs -gt 1 ; then
16816         cat >> confdefs.h <<EOF
16817 #define CTIME_R_NARGS $ol_cv_func_ctime_r_nargs
16818 EOF
16819
16820   fi
16821
16822 fi
16823
16824 if test "$ac_cv_func_gethostbyname_r" = yes ; then
16825         echo $ac_n "checking number of arguments of gethostbyname_r""... $ac_c" 1>&6
16826 echo "configure:16827: checking number of arguments of gethostbyname_r" >&5
16827 if eval "test \"\${ol_cv_func_gethostbyname_r_nargs+set}\" = set"; then
16828   echo $ac_n "(cached) $ac_c" 1>&6
16829 else
16830   cat > conftest.$ac_ext <<EOF
16831 #line 16832 "configure"
16832 #include "confdefs.h"
16833 #include <sys/types.h>
16834 #include <sys/socket.h>
16835 #include <netinet/in.h>
16836 #include <netdb.h>
16837 #define BUFSIZE (sizeof(struct hostent)+10)
16838 int main() {
16839 struct hostent hent; char buffer[BUFSIZE];
16840                 int bufsize=BUFSIZE;int h_errno;
16841                 (void)gethostbyname_r("segovia.cs.purdue.edu", &hent,
16842                         buffer, bufsize, &h_errno);
16843 ; return 0; }
16844 EOF
16845 if { (eval echo configure:16846: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16846   rm -rf conftest*
16847   ol_cv_func_gethostbyname_r_nargs5=yes
16848 else
16849   echo "configure: failed program was:" >&5
16850   cat conftest.$ac_ext >&5
16851   rm -rf conftest*
16852   ol_cv_func_gethostbyname_r_nargs5=no
16853 fi
16854 rm -f conftest*
16855
16856         cat > conftest.$ac_ext <<EOF
16857 #line 16858 "configure"
16858 #include "confdefs.h"
16859 #include <sys/types.h>
16860 #include <sys/socket.h>
16861 #include <netinet/in.h>
16862 #include <netdb.h>
16863 #define BUFSIZE (sizeof(struct hostent)+10)
16864 int main() {
16865 struct hostent hent;struct hostent *rhent;
16866                 char buffer[BUFSIZE];
16867                 int bufsize=BUFSIZE;int h_errno;
16868                 (void)gethostbyname_r("localhost", &hent, buffer, bufsize,
16869                         &rhent, &h_errno);
16870 ; return 0; }
16871 EOF
16872 if { (eval echo configure:16873: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16873   rm -rf conftest*
16874   ol_cv_func_gethostbyname_r_nargs6=yes
16875 else
16876   echo "configure: failed program was:" >&5
16877   cat conftest.$ac_ext >&5
16878   rm -rf conftest*
16879   ol_cv_func_gethostbyname_r_nargs6=no
16880 fi
16881 rm -f conftest*
16882
16883         if test $ol_cv_func_gethostbyname_r_nargs5 = yes -a \
16884                 $ol_cv_func_gethostbyname_r_nargs6 = no ; then
16885
16886                 ol_cv_func_gethostbyname_r_nargs=5
16887
16888         elif test $ol_cv_func_gethostbyname_r_nargs5 = no -a \
16889                 $ol_cv_func_gethostbyname_r_nargs6 = yes ; then
16890
16891                 ol_cv_func_gethostbyname_r_nargs=6
16892
16893         else
16894                 ol_cv_func_gethostbyname_r_nargs=0
16895         fi
16896   
16897 fi
16898
16899 echo "$ac_t""$ol_cv_func_gethostbyname_r_nargs" 1>&6
16900   if test $ol_cv_func_gethostbyname_r_nargs -gt 1 ; then
16901         cat >> confdefs.h <<EOF
16902 #define GETHOSTBYNAME_R_NARGS $ol_cv_func_gethostbyname_r_nargs
16903 EOF
16904
16905   fi
16906
16907 else
16908         ol_cv_func_gethostbyname_r_nargs=0
16909 fi
16910  
16911 if test "$ac_cv_func_gethostbyaddr_r" = yes ; then
16912         echo $ac_n "checking number of arguments of gethostbyaddr_r""... $ac_c" 1>&6
16913 echo "configure:16914: checking number of arguments of gethostbyaddr_r" >&5
16914 if eval "test \"\${ol_cv_func_gethostbyaddr_r_nargs+set}\" = set"; then
16915   echo $ac_n "(cached) $ac_c" 1>&6
16916 else
16917   cat > conftest.$ac_ext <<EOF
16918 #line 16919 "configure"
16919 #include "confdefs.h"
16920 #include <sys/types.h>
16921 #include <sys/socket.h>
16922 #include <netinet/in.h>
16923 #include <netdb.h>
16924 #define BUFSIZE (sizeof(struct hostent)+10)
16925 int main() {
16926 struct hostent hent; char buffer[BUFSIZE]; 
16927             struct in_addr add;
16928             size_t alen=sizeof(struct in_addr);
16929             int bufsize=BUFSIZE;int h_errno;
16930                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
16931                         alen, AF_INET, &hent, buffer, bufsize, &h_errno);
16932 ; return 0; }
16933 EOF
16934 if { (eval echo configure:16935: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16935   rm -rf conftest*
16936   ol_cv_func_gethostbyaddr_r_nargs7=yes
16937 else
16938   echo "configure: failed program was:" >&5
16939   cat conftest.$ac_ext >&5
16940   rm -rf conftest*
16941   ol_cv_func_gethostbyaddr_r_nargs7=no
16942 fi
16943 rm -f conftest*
16944
16945         cat > conftest.$ac_ext <<EOF
16946 #line 16947 "configure"
16947 #include "confdefs.h"
16948 #include <sys/types.h>
16949 #include <sys/socket.h>
16950 #include <netinet/in.h>
16951 #include <netdb.h>
16952 #define BUFSIZE (sizeof(struct hostent)+10)
16953 int main() {
16954 struct hostent hent;
16955                 struct hostent *rhent; char buffer[BUFSIZE]; 
16956                 struct in_addr add;
16957                 size_t alen=sizeof(struct in_addr);
16958                 int bufsize=BUFSIZE;int h_errno;
16959                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
16960                         alen, AF_INET, &hent, buffer, bufsize, 
16961                         &rhent, &h_errno);
16962 ; return 0; }
16963 EOF
16964 if { (eval echo configure:16965: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16965   rm -rf conftest*
16966   ol_cv_func_gethostbyaddr_r_nargs8=yes
16967 else
16968   echo "configure: failed program was:" >&5
16969   cat conftest.$ac_ext >&5
16970   rm -rf conftest*
16971   ol_cv_func_gethostbyaddr_r_nargs8=no
16972 fi
16973 rm -f conftest*
16974
16975         if test $ol_cv_func_gethostbyaddr_r_nargs7 = yes -a \
16976                 $ol_cv_func_gethostbyaddr_r_nargs8 = no ; then
16977
16978                 ol_cv_func_gethostbyaddr_r_nargs=7
16979
16980         elif test $ol_cv_func_gethostbyaddr_r_nargs7 = no -a \
16981                 $ol_cv_func_gethostbyaddr_r_nargs8 = yes ; then
16982
16983                 ol_cv_func_gethostbyaddr_r_nargs=8
16984
16985         else
16986                 ol_cv_func_gethostbyaddr_r_nargs=0
16987         fi
16988   
16989 fi
16990
16991 echo "$ac_t""$ol_cv_func_gethostbyaddr_r_nargs" 1>&6
16992   if test $ol_cv_func_gethostbyaddr_r_nargs -gt 1 ; then
16993     cat >> confdefs.h <<EOF
16994 #define GETHOSTBYADDR_R_NARGS $ol_cv_func_gethostbyaddr_r_nargs
16995 EOF
16996
16997   fi
16998
16999 else
17000         ol_cv_func_gethostbyaddr_r_nargs=0
17001 fi
17002
17003 ol_link_ldbm=no 
17004
17005 if test $ol_with_ldbm_api = auto \
17006         -o $ol_with_ldbm_api = berkeley \
17007         -o $ol_with_ldbm_api = bcompat ; then
17008
17009         if test $ol_with_ldbm_api = bcompat; then \
17010                 for ac_hdr in db_185.h db.h
17011 do
17012 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
17013 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
17014 echo "configure:17015: checking for $ac_hdr" >&5
17015 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
17016   echo $ac_n "(cached) $ac_c" 1>&6
17017 else
17018   cat > conftest.$ac_ext <<EOF
17019 #line 17020 "configure"
17020 #include "confdefs.h"
17021 #include <$ac_hdr>
17022 EOF
17023 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
17024 { (eval echo configure:17025: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
17025 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
17026 if test -z "$ac_err"; then
17027   rm -rf conftest*
17028   eval "ac_cv_header_$ac_safe=yes"
17029 else
17030   echo "$ac_err" >&5
17031   echo "configure: failed program was:" >&5
17032   cat conftest.$ac_ext >&5
17033   rm -rf conftest*
17034   eval "ac_cv_header_$ac_safe=no"
17035 fi
17036 rm -f conftest*
17037 fi
17038 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
17039   echo "$ac_t""yes" 1>&6
17040     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
17041   cat >> confdefs.h <<EOF
17042 #define $ac_tr_hdr 1
17043 EOF
17044  
17045 else
17046   echo "$ac_t""no" 1>&6
17047 fi
17048 done
17049
17050 if test $ac_cv_header_db_185_h = yes -o $ac_cv_header_db_h = yes; then
17051         echo $ac_n "checking if Berkeley DB header compatibility""... $ac_c" 1>&6
17052 echo "configure:17053: checking if Berkeley DB header compatibility" >&5
17053 if eval "test \"\${ol_cv_header_db1+set}\" = set"; then
17054   echo $ac_n "(cached) $ac_c" 1>&6
17055 else
17056   
17057                 cat > conftest.$ac_ext <<EOF
17058 #line 17059 "configure"
17059 #include "confdefs.h"
17060
17061 #if HAVE_DB_185_H
17062 #       include <db_185.h>
17063 #else
17064 #       include <db.h>
17065 #endif
17066
17067  /* this check could be improved */
17068 #ifndef DB_VERSION_MAJOR
17069 #       define DB_VERSION_MAJOR 1
17070 #endif
17071
17072 #if DB_VERSION_MAJOR == 1 
17073         __db_version_1
17074 #endif
17075
17076 EOF
17077 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
17078   egrep "__db_version_1" >/dev/null 2>&1; then
17079   rm -rf conftest*
17080   ol_cv_header_db1=yes
17081 else
17082   rm -rf conftest*
17083   ol_cv_header_db1=no
17084 fi
17085 rm -f conftest*
17086
17087 fi
17088
17089 echo "$ac_t""$ol_cv_header_db1" 1>&6
17090
17091         if test $ol_cv_header_db1 = yes ; then
17092                 ol_cv_lib_db=no
17093 if test $ol_cv_lib_db = no ; then
17094         echo $ac_n "checking for Berkeley DB link (default)""... $ac_c" 1>&6
17095 echo "configure:17096: checking for Berkeley DB link (default)" >&5
17096 if eval "test \"\${ol_cv_db_none+set}\" = set"; then
17097   echo $ac_n "(cached) $ac_c" 1>&6
17098 else
17099   
17100         ol_DB_LIB=
17101         ol_LIBS=$LIBS
17102         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17103
17104         cat > conftest.$ac_ext <<EOF
17105 #line 17106 "configure"
17106 #include "confdefs.h"
17107
17108 #ifdef HAVE_DB_185_H
17109 # include <db_185.h>
17110 #else
17111 # include <db.h>
17112 #endif
17113
17114 #ifndef DB_VERSION_MAJOR
17115 # define DB_VERSION_MAJOR 1
17116 #endif
17117
17118 #ifndef NULL
17119 #define NULL ((void*)0)
17120 #endif
17121
17122 int main() {
17123
17124 #if DB_VERSION_MAJOR > 1
17125         {
17126                 char *version;
17127                 int major, minor, patch;
17128
17129                 version = db_version( &major, &minor, &patch );
17130
17131                 if( major != DB_VERSION_MAJOR ||
17132                         minor < DB_VERSION_MINOR )
17133                 {
17134                         printf("Berkeley DB version mismatch\n"
17135                                 "\theader: %s\n\tlibrary: %s\n",
17136                                 DB_VERSION_STRING, version);
17137                         return 1;
17138                 }
17139         }
17140 #endif
17141
17142 #if DB_VERSION_MAJOR > 2
17143         db_env_create( NULL, 0 );
17144 #elif DB_VERSION_MAJOR > 1
17145         db_appexit( NULL );
17146 #else
17147         (void) dbopen( NULL, 0, 0, 0, NULL);
17148 #endif
17149
17150 ; return 0; }
17151 EOF
17152 if { (eval echo configure:17153: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17153   rm -rf conftest*
17154   ol_cv_db_none=yes
17155 else
17156   echo "configure: failed program was:" >&5
17157   cat conftest.$ac_ext >&5
17158   rm -rf conftest*
17159   ol_cv_db_none=no
17160 fi
17161 rm -f conftest*
17162
17163         LIBS="$ol_LIBS"
17164
17165 fi
17166
17167 echo "$ac_t""$ol_cv_db_none" 1>&6
17168
17169         if test $ol_cv_db_none = yes ; then
17170                 ol_cv_lib_db=yes
17171         fi
17172 fi
17173
17174 if test $ol_cv_lib_db = no ; then
17175         echo $ac_n "checking for Berkeley DB link (-ldb43)""... $ac_c" 1>&6
17176 echo "configure:17177: checking for Berkeley DB link (-ldb43)" >&5
17177 if eval "test \"\${ol_cv_db_db43+set}\" = set"; then
17178   echo $ac_n "(cached) $ac_c" 1>&6
17179 else
17180   
17181         ol_DB_LIB=-ldb43
17182         ol_LIBS=$LIBS
17183         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17184
17185         cat > conftest.$ac_ext <<EOF
17186 #line 17187 "configure"
17187 #include "confdefs.h"
17188
17189 #ifdef HAVE_DB_185_H
17190 # include <db_185.h>
17191 #else
17192 # include <db.h>
17193 #endif
17194
17195 #ifndef DB_VERSION_MAJOR
17196 # define DB_VERSION_MAJOR 1
17197 #endif
17198
17199 #ifndef NULL
17200 #define NULL ((void*)0)
17201 #endif
17202
17203 int main() {
17204
17205 #if DB_VERSION_MAJOR > 1
17206         {
17207                 char *version;
17208                 int major, minor, patch;
17209
17210                 version = db_version( &major, &minor, &patch );
17211
17212                 if( major != DB_VERSION_MAJOR ||
17213                         minor < DB_VERSION_MINOR )
17214                 {
17215                         printf("Berkeley DB version mismatch\n"
17216                                 "\theader: %s\n\tlibrary: %s\n",
17217                                 DB_VERSION_STRING, version);
17218                         return 1;
17219                 }
17220         }
17221 #endif
17222
17223 #if DB_VERSION_MAJOR > 2
17224         db_env_create( NULL, 0 );
17225 #elif DB_VERSION_MAJOR > 1
17226         db_appexit( NULL );
17227 #else
17228         (void) dbopen( NULL, 0, 0, 0, NULL);
17229 #endif
17230
17231 ; return 0; }
17232 EOF
17233 if { (eval echo configure:17234: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17234   rm -rf conftest*
17235   ol_cv_db_db43=yes
17236 else
17237   echo "configure: failed program was:" >&5
17238   cat conftest.$ac_ext >&5
17239   rm -rf conftest*
17240   ol_cv_db_db43=no
17241 fi
17242 rm -f conftest*
17243
17244         LIBS="$ol_LIBS"
17245
17246 fi
17247
17248 echo "$ac_t""$ol_cv_db_db43" 1>&6
17249
17250         if test $ol_cv_db_db43 = yes ; then
17251                 ol_cv_lib_db=-ldb43
17252         fi
17253 fi
17254
17255 if test $ol_cv_lib_db = no ; then
17256         echo $ac_n "checking for Berkeley DB link (-ldb-43)""... $ac_c" 1>&6
17257 echo "configure:17258: checking for Berkeley DB link (-ldb-43)" >&5
17258 if eval "test \"\${ol_cv_db_db_43+set}\" = set"; then
17259   echo $ac_n "(cached) $ac_c" 1>&6
17260 else
17261   
17262         ol_DB_LIB=-ldb-43
17263         ol_LIBS=$LIBS
17264         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17265
17266         cat > conftest.$ac_ext <<EOF
17267 #line 17268 "configure"
17268 #include "confdefs.h"
17269
17270 #ifdef HAVE_DB_185_H
17271 # include <db_185.h>
17272 #else
17273 # include <db.h>
17274 #endif
17275
17276 #ifndef DB_VERSION_MAJOR
17277 # define DB_VERSION_MAJOR 1
17278 #endif
17279
17280 #ifndef NULL
17281 #define NULL ((void*)0)
17282 #endif
17283
17284 int main() {
17285
17286 #if DB_VERSION_MAJOR > 1
17287         {
17288                 char *version;
17289                 int major, minor, patch;
17290
17291                 version = db_version( &major, &minor, &patch );
17292
17293                 if( major != DB_VERSION_MAJOR ||
17294                         minor < DB_VERSION_MINOR )
17295                 {
17296                         printf("Berkeley DB version mismatch\n"
17297                                 "\theader: %s\n\tlibrary: %s\n",
17298                                 DB_VERSION_STRING, version);
17299                         return 1;
17300                 }
17301         }
17302 #endif
17303
17304 #if DB_VERSION_MAJOR > 2
17305         db_env_create( NULL, 0 );
17306 #elif DB_VERSION_MAJOR > 1
17307         db_appexit( NULL );
17308 #else
17309         (void) dbopen( NULL, 0, 0, 0, NULL);
17310 #endif
17311
17312 ; return 0; }
17313 EOF
17314 if { (eval echo configure:17315: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17315   rm -rf conftest*
17316   ol_cv_db_db_43=yes
17317 else
17318   echo "configure: failed program was:" >&5
17319   cat conftest.$ac_ext >&5
17320   rm -rf conftest*
17321   ol_cv_db_db_43=no
17322 fi
17323 rm -f conftest*
17324
17325         LIBS="$ol_LIBS"
17326
17327 fi
17328
17329 echo "$ac_t""$ol_cv_db_db_43" 1>&6
17330
17331         if test $ol_cv_db_db_43 = yes ; then
17332                 ol_cv_lib_db=-ldb-43
17333         fi
17334 fi
17335
17336 if test $ol_cv_lib_db = no ; then
17337         echo $ac_n "checking for Berkeley DB link (-ldb-4.3)""... $ac_c" 1>&6
17338 echo "configure:17339: checking for Berkeley DB link (-ldb-4.3)" >&5
17339 if eval "test \"\${ol_cv_db_db_4_dot_3+set}\" = set"; then
17340   echo $ac_n "(cached) $ac_c" 1>&6
17341 else
17342   
17343         ol_DB_LIB=-ldb-4.3
17344         ol_LIBS=$LIBS
17345         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17346
17347         cat > conftest.$ac_ext <<EOF
17348 #line 17349 "configure"
17349 #include "confdefs.h"
17350
17351 #ifdef HAVE_DB_185_H
17352 # include <db_185.h>
17353 #else
17354 # include <db.h>
17355 #endif
17356
17357 #ifndef DB_VERSION_MAJOR
17358 # define DB_VERSION_MAJOR 1
17359 #endif
17360
17361 #ifndef NULL
17362 #define NULL ((void*)0)
17363 #endif
17364
17365 int main() {
17366
17367 #if DB_VERSION_MAJOR > 1
17368         {
17369                 char *version;
17370                 int major, minor, patch;
17371
17372                 version = db_version( &major, &minor, &patch );
17373
17374                 if( major != DB_VERSION_MAJOR ||
17375                         minor < DB_VERSION_MINOR )
17376                 {
17377                         printf("Berkeley DB version mismatch\n"
17378                                 "\theader: %s\n\tlibrary: %s\n",
17379                                 DB_VERSION_STRING, version);
17380                         return 1;
17381                 }
17382         }
17383 #endif
17384
17385 #if DB_VERSION_MAJOR > 2
17386         db_env_create( NULL, 0 );
17387 #elif DB_VERSION_MAJOR > 1
17388         db_appexit( NULL );
17389 #else
17390         (void) dbopen( NULL, 0, 0, 0, NULL);
17391 #endif
17392
17393 ; return 0; }
17394 EOF
17395 if { (eval echo configure:17396: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17396   rm -rf conftest*
17397   ol_cv_db_db_4_dot_3=yes
17398 else
17399   echo "configure: failed program was:" >&5
17400   cat conftest.$ac_ext >&5
17401   rm -rf conftest*
17402   ol_cv_db_db_4_dot_3=no
17403 fi
17404 rm -f conftest*
17405
17406         LIBS="$ol_LIBS"
17407
17408 fi
17409
17410 echo "$ac_t""$ol_cv_db_db_4_dot_3" 1>&6
17411
17412         if test $ol_cv_db_db_4_dot_3 = yes ; then
17413                 ol_cv_lib_db=-ldb-4.3
17414         fi
17415 fi
17416
17417 if test $ol_cv_lib_db = no ; then
17418         echo $ac_n "checking for Berkeley DB link (-ldb-4-3)""... $ac_c" 1>&6
17419 echo "configure:17420: checking for Berkeley DB link (-ldb-4-3)" >&5
17420 if eval "test \"\${ol_cv_db_db_4_3+set}\" = set"; then
17421   echo $ac_n "(cached) $ac_c" 1>&6
17422 else
17423   
17424         ol_DB_LIB=-ldb-4-3
17425         ol_LIBS=$LIBS
17426         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17427
17428         cat > conftest.$ac_ext <<EOF
17429 #line 17430 "configure"
17430 #include "confdefs.h"
17431
17432 #ifdef HAVE_DB_185_H
17433 # include <db_185.h>
17434 #else
17435 # include <db.h>
17436 #endif
17437
17438 #ifndef DB_VERSION_MAJOR
17439 # define DB_VERSION_MAJOR 1
17440 #endif
17441
17442 #ifndef NULL
17443 #define NULL ((void*)0)
17444 #endif
17445
17446 int main() {
17447
17448 #if DB_VERSION_MAJOR > 1
17449         {
17450                 char *version;
17451                 int major, minor, patch;
17452
17453                 version = db_version( &major, &minor, &patch );
17454
17455                 if( major != DB_VERSION_MAJOR ||
17456                         minor < DB_VERSION_MINOR )
17457                 {
17458                         printf("Berkeley DB version mismatch\n"
17459                                 "\theader: %s\n\tlibrary: %s\n",
17460                                 DB_VERSION_STRING, version);
17461                         return 1;
17462                 }
17463         }
17464 #endif
17465
17466 #if DB_VERSION_MAJOR > 2
17467         db_env_create( NULL, 0 );
17468 #elif DB_VERSION_MAJOR > 1
17469         db_appexit( NULL );
17470 #else
17471         (void) dbopen( NULL, 0, 0, 0, NULL);
17472 #endif
17473
17474 ; return 0; }
17475 EOF
17476 if { (eval echo configure:17477: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17477   rm -rf conftest*
17478   ol_cv_db_db_4_3=yes
17479 else
17480   echo "configure: failed program was:" >&5
17481   cat conftest.$ac_ext >&5
17482   rm -rf conftest*
17483   ol_cv_db_db_4_3=no
17484 fi
17485 rm -f conftest*
17486
17487         LIBS="$ol_LIBS"
17488
17489 fi
17490
17491 echo "$ac_t""$ol_cv_db_db_4_3" 1>&6
17492
17493         if test $ol_cv_db_db_4_3 = yes ; then
17494                 ol_cv_lib_db=-ldb-4-3
17495         fi
17496 fi
17497
17498 if test $ol_cv_lib_db = no ; then
17499         echo $ac_n "checking for Berkeley DB link (-ldb42)""... $ac_c" 1>&6
17500 echo "configure:17501: checking for Berkeley DB link (-ldb42)" >&5
17501 if eval "test \"\${ol_cv_db_db42+set}\" = set"; then
17502   echo $ac_n "(cached) $ac_c" 1>&6
17503 else
17504   
17505         ol_DB_LIB=-ldb42
17506         ol_LIBS=$LIBS
17507         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17508
17509         cat > conftest.$ac_ext <<EOF
17510 #line 17511 "configure"
17511 #include "confdefs.h"
17512
17513 #ifdef HAVE_DB_185_H
17514 # include <db_185.h>
17515 #else
17516 # include <db.h>
17517 #endif
17518
17519 #ifndef DB_VERSION_MAJOR
17520 # define DB_VERSION_MAJOR 1
17521 #endif
17522
17523 #ifndef NULL
17524 #define NULL ((void*)0)
17525 #endif
17526
17527 int main() {
17528
17529 #if DB_VERSION_MAJOR > 1
17530         {
17531                 char *version;
17532                 int major, minor, patch;
17533
17534                 version = db_version( &major, &minor, &patch );
17535
17536                 if( major != DB_VERSION_MAJOR ||
17537                         minor < DB_VERSION_MINOR )
17538                 {
17539                         printf("Berkeley DB version mismatch\n"
17540                                 "\theader: %s\n\tlibrary: %s\n",
17541                                 DB_VERSION_STRING, version);
17542                         return 1;
17543                 }
17544         }
17545 #endif
17546
17547 #if DB_VERSION_MAJOR > 2
17548         db_env_create( NULL, 0 );
17549 #elif DB_VERSION_MAJOR > 1
17550         db_appexit( NULL );
17551 #else
17552         (void) dbopen( NULL, 0, 0, 0, NULL);
17553 #endif
17554
17555 ; return 0; }
17556 EOF
17557 if { (eval echo configure:17558: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17558   rm -rf conftest*
17559   ol_cv_db_db42=yes
17560 else
17561   echo "configure: failed program was:" >&5
17562   cat conftest.$ac_ext >&5
17563   rm -rf conftest*
17564   ol_cv_db_db42=no
17565 fi
17566 rm -f conftest*
17567
17568         LIBS="$ol_LIBS"
17569
17570 fi
17571
17572 echo "$ac_t""$ol_cv_db_db42" 1>&6
17573
17574         if test $ol_cv_db_db42 = yes ; then
17575                 ol_cv_lib_db=-ldb42
17576         fi
17577 fi
17578
17579 if test $ol_cv_lib_db = no ; then
17580         echo $ac_n "checking for Berkeley DB link (-ldb-42)""... $ac_c" 1>&6
17581 echo "configure:17582: checking for Berkeley DB link (-ldb-42)" >&5
17582 if eval "test \"\${ol_cv_db_db_42+set}\" = set"; then
17583   echo $ac_n "(cached) $ac_c" 1>&6
17584 else
17585   
17586         ol_DB_LIB=-ldb-42
17587         ol_LIBS=$LIBS
17588         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17589
17590         cat > conftest.$ac_ext <<EOF
17591 #line 17592 "configure"
17592 #include "confdefs.h"
17593
17594 #ifdef HAVE_DB_185_H
17595 # include <db_185.h>
17596 #else
17597 # include <db.h>
17598 #endif
17599
17600 #ifndef DB_VERSION_MAJOR
17601 # define DB_VERSION_MAJOR 1
17602 #endif
17603
17604 #ifndef NULL
17605 #define NULL ((void*)0)
17606 #endif
17607
17608 int main() {
17609
17610 #if DB_VERSION_MAJOR > 1
17611         {
17612                 char *version;
17613                 int major, minor, patch;
17614
17615                 version = db_version( &major, &minor, &patch );
17616
17617                 if( major != DB_VERSION_MAJOR ||
17618                         minor < DB_VERSION_MINOR )
17619                 {
17620                         printf("Berkeley DB version mismatch\n"
17621                                 "\theader: %s\n\tlibrary: %s\n",
17622                                 DB_VERSION_STRING, version);
17623                         return 1;
17624                 }
17625         }
17626 #endif
17627
17628 #if DB_VERSION_MAJOR > 2
17629         db_env_create( NULL, 0 );
17630 #elif DB_VERSION_MAJOR > 1
17631         db_appexit( NULL );
17632 #else
17633         (void) dbopen( NULL, 0, 0, 0, NULL);
17634 #endif
17635
17636 ; return 0; }
17637 EOF
17638 if { (eval echo configure:17639: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17639   rm -rf conftest*
17640   ol_cv_db_db_42=yes
17641 else
17642   echo "configure: failed program was:" >&5
17643   cat conftest.$ac_ext >&5
17644   rm -rf conftest*
17645   ol_cv_db_db_42=no
17646 fi
17647 rm -f conftest*
17648
17649         LIBS="$ol_LIBS"
17650
17651 fi
17652
17653 echo "$ac_t""$ol_cv_db_db_42" 1>&6
17654
17655         if test $ol_cv_db_db_42 = yes ; then
17656                 ol_cv_lib_db=-ldb-42
17657         fi
17658 fi
17659
17660 if test $ol_cv_lib_db = no ; then
17661         echo $ac_n "checking for Berkeley DB link (-ldb-4.2)""... $ac_c" 1>&6
17662 echo "configure:17663: checking for Berkeley DB link (-ldb-4.2)" >&5
17663 if eval "test \"\${ol_cv_db_db_4_dot_2+set}\" = set"; then
17664   echo $ac_n "(cached) $ac_c" 1>&6
17665 else
17666   
17667         ol_DB_LIB=-ldb-4.2
17668         ol_LIBS=$LIBS
17669         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17670
17671         cat > conftest.$ac_ext <<EOF
17672 #line 17673 "configure"
17673 #include "confdefs.h"
17674
17675 #ifdef HAVE_DB_185_H
17676 # include <db_185.h>
17677 #else
17678 # include <db.h>
17679 #endif
17680
17681 #ifndef DB_VERSION_MAJOR
17682 # define DB_VERSION_MAJOR 1
17683 #endif
17684
17685 #ifndef NULL
17686 #define NULL ((void*)0)
17687 #endif
17688
17689 int main() {
17690
17691 #if DB_VERSION_MAJOR > 1
17692         {
17693                 char *version;
17694                 int major, minor, patch;
17695
17696                 version = db_version( &major, &minor, &patch );
17697
17698                 if( major != DB_VERSION_MAJOR ||
17699                         minor < DB_VERSION_MINOR )
17700                 {
17701                         printf("Berkeley DB version mismatch\n"
17702                                 "\theader: %s\n\tlibrary: %s\n",
17703                                 DB_VERSION_STRING, version);
17704                         return 1;
17705                 }
17706         }
17707 #endif
17708
17709 #if DB_VERSION_MAJOR > 2
17710         db_env_create( NULL, 0 );
17711 #elif DB_VERSION_MAJOR > 1
17712         db_appexit( NULL );
17713 #else
17714         (void) dbopen( NULL, 0, 0, 0, NULL);
17715 #endif
17716
17717 ; return 0; }
17718 EOF
17719 if { (eval echo configure:17720: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17720   rm -rf conftest*
17721   ol_cv_db_db_4_dot_2=yes
17722 else
17723   echo "configure: failed program was:" >&5
17724   cat conftest.$ac_ext >&5
17725   rm -rf conftest*
17726   ol_cv_db_db_4_dot_2=no
17727 fi
17728 rm -f conftest*
17729
17730         LIBS="$ol_LIBS"
17731
17732 fi
17733
17734 echo "$ac_t""$ol_cv_db_db_4_dot_2" 1>&6
17735
17736         if test $ol_cv_db_db_4_dot_2 = yes ; then
17737                 ol_cv_lib_db=-ldb-4.2
17738         fi
17739 fi
17740
17741 if test $ol_cv_lib_db = no ; then
17742         echo $ac_n "checking for Berkeley DB link (-ldb-4-2)""... $ac_c" 1>&6
17743 echo "configure:17744: checking for Berkeley DB link (-ldb-4-2)" >&5
17744 if eval "test \"\${ol_cv_db_db_4_2+set}\" = set"; then
17745   echo $ac_n "(cached) $ac_c" 1>&6
17746 else
17747   
17748         ol_DB_LIB=-ldb-4-2
17749         ol_LIBS=$LIBS
17750         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17751
17752         cat > conftest.$ac_ext <<EOF
17753 #line 17754 "configure"
17754 #include "confdefs.h"
17755
17756 #ifdef HAVE_DB_185_H
17757 # include <db_185.h>
17758 #else
17759 # include <db.h>
17760 #endif
17761
17762 #ifndef DB_VERSION_MAJOR
17763 # define DB_VERSION_MAJOR 1
17764 #endif
17765
17766 #ifndef NULL
17767 #define NULL ((void*)0)
17768 #endif
17769
17770 int main() {
17771
17772 #if DB_VERSION_MAJOR > 1
17773         {
17774                 char *version;
17775                 int major, minor, patch;
17776
17777                 version = db_version( &major, &minor, &patch );
17778
17779                 if( major != DB_VERSION_MAJOR ||
17780                         minor < DB_VERSION_MINOR )
17781                 {
17782                         printf("Berkeley DB version mismatch\n"
17783                                 "\theader: %s\n\tlibrary: %s\n",
17784                                 DB_VERSION_STRING, version);
17785                         return 1;
17786                 }
17787         }
17788 #endif
17789
17790 #if DB_VERSION_MAJOR > 2
17791         db_env_create( NULL, 0 );
17792 #elif DB_VERSION_MAJOR > 1
17793         db_appexit( NULL );
17794 #else
17795         (void) dbopen( NULL, 0, 0, 0, NULL);
17796 #endif
17797
17798 ; return 0; }
17799 EOF
17800 if { (eval echo configure:17801: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17801   rm -rf conftest*
17802   ol_cv_db_db_4_2=yes
17803 else
17804   echo "configure: failed program was:" >&5
17805   cat conftest.$ac_ext >&5
17806   rm -rf conftest*
17807   ol_cv_db_db_4_2=no
17808 fi
17809 rm -f conftest*
17810
17811         LIBS="$ol_LIBS"
17812
17813 fi
17814
17815 echo "$ac_t""$ol_cv_db_db_4_2" 1>&6
17816
17817         if test $ol_cv_db_db_4_2 = yes ; then
17818                 ol_cv_lib_db=-ldb-4-2
17819         fi
17820 fi
17821
17822 if test $ol_cv_lib_db = no ; then
17823         echo $ac_n "checking for Berkeley DB link (-ldb-4)""... $ac_c" 1>&6
17824 echo "configure:17825: checking for Berkeley DB link (-ldb-4)" >&5
17825 if eval "test \"\${ol_cv_db_db_4+set}\" = set"; then
17826   echo $ac_n "(cached) $ac_c" 1>&6
17827 else
17828   
17829         ol_DB_LIB=-ldb-4
17830         ol_LIBS=$LIBS
17831         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17832
17833         cat > conftest.$ac_ext <<EOF
17834 #line 17835 "configure"
17835 #include "confdefs.h"
17836
17837 #ifdef HAVE_DB_185_H
17838 # include <db_185.h>
17839 #else
17840 # include <db.h>
17841 #endif
17842
17843 #ifndef DB_VERSION_MAJOR
17844 # define DB_VERSION_MAJOR 1
17845 #endif
17846
17847 #ifndef NULL
17848 #define NULL ((void*)0)
17849 #endif
17850
17851 int main() {
17852
17853 #if DB_VERSION_MAJOR > 1
17854         {
17855                 char *version;
17856                 int major, minor, patch;
17857
17858                 version = db_version( &major, &minor, &patch );
17859
17860                 if( major != DB_VERSION_MAJOR ||
17861                         minor < DB_VERSION_MINOR )
17862                 {
17863                         printf("Berkeley DB version mismatch\n"
17864                                 "\theader: %s\n\tlibrary: %s\n",
17865                                 DB_VERSION_STRING, version);
17866                         return 1;
17867                 }
17868         }
17869 #endif
17870
17871 #if DB_VERSION_MAJOR > 2
17872         db_env_create( NULL, 0 );
17873 #elif DB_VERSION_MAJOR > 1
17874         db_appexit( NULL );
17875 #else
17876         (void) dbopen( NULL, 0, 0, 0, NULL);
17877 #endif
17878
17879 ; return 0; }
17880 EOF
17881 if { (eval echo configure:17882: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17882   rm -rf conftest*
17883   ol_cv_db_db_4=yes
17884 else
17885   echo "configure: failed program was:" >&5
17886   cat conftest.$ac_ext >&5
17887   rm -rf conftest*
17888   ol_cv_db_db_4=no
17889 fi
17890 rm -f conftest*
17891
17892         LIBS="$ol_LIBS"
17893
17894 fi
17895
17896 echo "$ac_t""$ol_cv_db_db_4" 1>&6
17897
17898         if test $ol_cv_db_db_4 = yes ; then
17899                 ol_cv_lib_db=-ldb-4
17900         fi
17901 fi
17902
17903 if test $ol_cv_lib_db = no ; then
17904         echo $ac_n "checking for Berkeley DB link (-ldb4)""... $ac_c" 1>&6
17905 echo "configure:17906: checking for Berkeley DB link (-ldb4)" >&5
17906 if eval "test \"\${ol_cv_db_db4+set}\" = set"; then
17907   echo $ac_n "(cached) $ac_c" 1>&6
17908 else
17909   
17910         ol_DB_LIB=-ldb4
17911         ol_LIBS=$LIBS
17912         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17913
17914         cat > conftest.$ac_ext <<EOF
17915 #line 17916 "configure"
17916 #include "confdefs.h"
17917
17918 #ifdef HAVE_DB_185_H
17919 # include <db_185.h>
17920 #else
17921 # include <db.h>
17922 #endif
17923
17924 #ifndef DB_VERSION_MAJOR
17925 # define DB_VERSION_MAJOR 1
17926 #endif
17927
17928 #ifndef NULL
17929 #define NULL ((void*)0)
17930 #endif
17931
17932 int main() {
17933
17934 #if DB_VERSION_MAJOR > 1
17935         {
17936                 char *version;
17937                 int major, minor, patch;
17938
17939                 version = db_version( &major, &minor, &patch );
17940
17941                 if( major != DB_VERSION_MAJOR ||
17942                         minor < DB_VERSION_MINOR )
17943                 {
17944                         printf("Berkeley DB version mismatch\n"
17945                                 "\theader: %s\n\tlibrary: %s\n",
17946                                 DB_VERSION_STRING, version);
17947                         return 1;
17948                 }
17949         }
17950 #endif
17951
17952 #if DB_VERSION_MAJOR > 2
17953         db_env_create( NULL, 0 );
17954 #elif DB_VERSION_MAJOR > 1
17955         db_appexit( NULL );
17956 #else
17957         (void) dbopen( NULL, 0, 0, 0, NULL);
17958 #endif
17959
17960 ; return 0; }
17961 EOF
17962 if { (eval echo configure:17963: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17963   rm -rf conftest*
17964   ol_cv_db_db4=yes
17965 else
17966   echo "configure: failed program was:" >&5
17967   cat conftest.$ac_ext >&5
17968   rm -rf conftest*
17969   ol_cv_db_db4=no
17970 fi
17971 rm -f conftest*
17972
17973         LIBS="$ol_LIBS"
17974
17975 fi
17976
17977 echo "$ac_t""$ol_cv_db_db4" 1>&6
17978
17979         if test $ol_cv_db_db4 = yes ; then
17980                 ol_cv_lib_db=-ldb4
17981         fi
17982 fi
17983
17984 if test $ol_cv_lib_db = no ; then
17985         echo $ac_n "checking for Berkeley DB link (-ldb)""... $ac_c" 1>&6
17986 echo "configure:17987: checking for Berkeley DB link (-ldb)" >&5
17987 if eval "test \"\${ol_cv_db_db+set}\" = set"; then
17988   echo $ac_n "(cached) $ac_c" 1>&6
17989 else
17990   
17991         ol_DB_LIB=-ldb
17992         ol_LIBS=$LIBS
17993         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17994
17995         cat > conftest.$ac_ext <<EOF
17996 #line 17997 "configure"
17997 #include "confdefs.h"
17998
17999 #ifdef HAVE_DB_185_H
18000 # include <db_185.h>
18001 #else
18002 # include <db.h>
18003 #endif
18004
18005 #ifndef DB_VERSION_MAJOR
18006 # define DB_VERSION_MAJOR 1
18007 #endif
18008
18009 #ifndef NULL
18010 #define NULL ((void*)0)
18011 #endif
18012
18013 int main() {
18014
18015 #if DB_VERSION_MAJOR > 1
18016         {
18017                 char *version;
18018                 int major, minor, patch;
18019
18020                 version = db_version( &major, &minor, &patch );
18021
18022                 if( major != DB_VERSION_MAJOR ||
18023                         minor < DB_VERSION_MINOR )
18024                 {
18025                         printf("Berkeley DB version mismatch\n"
18026                                 "\theader: %s\n\tlibrary: %s\n",
18027                                 DB_VERSION_STRING, version);
18028                         return 1;
18029                 }
18030         }
18031 #endif
18032
18033 #if DB_VERSION_MAJOR > 2
18034         db_env_create( NULL, 0 );
18035 #elif DB_VERSION_MAJOR > 1
18036         db_appexit( NULL );
18037 #else
18038         (void) dbopen( NULL, 0, 0, 0, NULL);
18039 #endif
18040
18041 ; return 0; }
18042 EOF
18043 if { (eval echo configure:18044: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18044   rm -rf conftest*
18045   ol_cv_db_db=yes
18046 else
18047   echo "configure: failed program was:" >&5
18048   cat conftest.$ac_ext >&5
18049   rm -rf conftest*
18050   ol_cv_db_db=no
18051 fi
18052 rm -f conftest*
18053
18054         LIBS="$ol_LIBS"
18055
18056 fi
18057
18058 echo "$ac_t""$ol_cv_db_db" 1>&6
18059
18060         if test $ol_cv_db_db = yes ; then
18061                 ol_cv_lib_db=-ldb
18062         fi
18063 fi
18064
18065 if test $ol_cv_lib_db = no ; then
18066         echo $ac_n "checking for Berkeley DB link (-ldb41)""... $ac_c" 1>&6
18067 echo "configure:18068: checking for Berkeley DB link (-ldb41)" >&5
18068 if eval "test \"\${ol_cv_db_db41+set}\" = set"; then
18069   echo $ac_n "(cached) $ac_c" 1>&6
18070 else
18071   
18072         ol_DB_LIB=-ldb41
18073         ol_LIBS=$LIBS
18074         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18075
18076         cat > conftest.$ac_ext <<EOF
18077 #line 18078 "configure"
18078 #include "confdefs.h"
18079
18080 #ifdef HAVE_DB_185_H
18081 # include <db_185.h>
18082 #else
18083 # include <db.h>
18084 #endif
18085
18086 #ifndef DB_VERSION_MAJOR
18087 # define DB_VERSION_MAJOR 1
18088 #endif
18089
18090 #ifndef NULL
18091 #define NULL ((void*)0)
18092 #endif
18093
18094 int main() {
18095
18096 #if DB_VERSION_MAJOR > 1
18097         {
18098                 char *version;
18099                 int major, minor, patch;
18100
18101                 version = db_version( &major, &minor, &patch );
18102
18103                 if( major != DB_VERSION_MAJOR ||
18104                         minor < DB_VERSION_MINOR )
18105                 {
18106                         printf("Berkeley DB version mismatch\n"
18107                                 "\theader: %s\n\tlibrary: %s\n",
18108                                 DB_VERSION_STRING, version);
18109                         return 1;
18110                 }
18111         }
18112 #endif
18113
18114 #if DB_VERSION_MAJOR > 2
18115         db_env_create( NULL, 0 );
18116 #elif DB_VERSION_MAJOR > 1
18117         db_appexit( NULL );
18118 #else
18119         (void) dbopen( NULL, 0, 0, 0, NULL);
18120 #endif
18121
18122 ; return 0; }
18123 EOF
18124 if { (eval echo configure:18125: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18125   rm -rf conftest*
18126   ol_cv_db_db41=yes
18127 else
18128   echo "configure: failed program was:" >&5
18129   cat conftest.$ac_ext >&5
18130   rm -rf conftest*
18131   ol_cv_db_db41=no
18132 fi
18133 rm -f conftest*
18134
18135         LIBS="$ol_LIBS"
18136
18137 fi
18138
18139 echo "$ac_t""$ol_cv_db_db41" 1>&6
18140
18141         if test $ol_cv_db_db41 = yes ; then
18142                 ol_cv_lib_db=-ldb41
18143         fi
18144 fi
18145
18146 if test $ol_cv_lib_db = no ; then
18147         echo $ac_n "checking for Berkeley DB link (-ldb-41)""... $ac_c" 1>&6
18148 echo "configure:18149: checking for Berkeley DB link (-ldb-41)" >&5
18149 if eval "test \"\${ol_cv_db_db_41+set}\" = set"; then
18150   echo $ac_n "(cached) $ac_c" 1>&6
18151 else
18152   
18153         ol_DB_LIB=-ldb-41
18154         ol_LIBS=$LIBS
18155         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18156
18157         cat > conftest.$ac_ext <<EOF
18158 #line 18159 "configure"
18159 #include "confdefs.h"
18160
18161 #ifdef HAVE_DB_185_H
18162 # include <db_185.h>
18163 #else
18164 # include <db.h>
18165 #endif
18166
18167 #ifndef DB_VERSION_MAJOR
18168 # define DB_VERSION_MAJOR 1
18169 #endif
18170
18171 #ifndef NULL
18172 #define NULL ((void*)0)
18173 #endif
18174
18175 int main() {
18176
18177 #if DB_VERSION_MAJOR > 1
18178         {
18179                 char *version;
18180                 int major, minor, patch;
18181
18182                 version = db_version( &major, &minor, &patch );
18183
18184                 if( major != DB_VERSION_MAJOR ||
18185                         minor < DB_VERSION_MINOR )
18186                 {
18187                         printf("Berkeley DB version mismatch\n"
18188                                 "\theader: %s\n\tlibrary: %s\n",
18189                                 DB_VERSION_STRING, version);
18190                         return 1;
18191                 }
18192         }
18193 #endif
18194
18195 #if DB_VERSION_MAJOR > 2
18196         db_env_create( NULL, 0 );
18197 #elif DB_VERSION_MAJOR > 1
18198         db_appexit( NULL );
18199 #else
18200         (void) dbopen( NULL, 0, 0, 0, NULL);
18201 #endif
18202
18203 ; return 0; }
18204 EOF
18205 if { (eval echo configure:18206: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18206   rm -rf conftest*
18207   ol_cv_db_db_41=yes
18208 else
18209   echo "configure: failed program was:" >&5
18210   cat conftest.$ac_ext >&5
18211   rm -rf conftest*
18212   ol_cv_db_db_41=no
18213 fi
18214 rm -f conftest*
18215
18216         LIBS="$ol_LIBS"
18217
18218 fi
18219
18220 echo "$ac_t""$ol_cv_db_db_41" 1>&6
18221
18222         if test $ol_cv_db_db_41 = yes ; then
18223                 ol_cv_lib_db=-ldb-41
18224         fi
18225 fi
18226
18227 if test $ol_cv_lib_db = no ; then
18228         echo $ac_n "checking for Berkeley DB link (-ldb-4.1)""... $ac_c" 1>&6
18229 echo "configure:18230: checking for Berkeley DB link (-ldb-4.1)" >&5
18230 if eval "test \"\${ol_cv_db_db_4_dot_1+set}\" = set"; then
18231   echo $ac_n "(cached) $ac_c" 1>&6
18232 else
18233   
18234         ol_DB_LIB=-ldb-4.1
18235         ol_LIBS=$LIBS
18236         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18237
18238         cat > conftest.$ac_ext <<EOF
18239 #line 18240 "configure"
18240 #include "confdefs.h"
18241
18242 #ifdef HAVE_DB_185_H
18243 # include <db_185.h>
18244 #else
18245 # include <db.h>
18246 #endif
18247
18248 #ifndef DB_VERSION_MAJOR
18249 # define DB_VERSION_MAJOR 1
18250 #endif
18251
18252 #ifndef NULL
18253 #define NULL ((void*)0)
18254 #endif
18255
18256 int main() {
18257
18258 #if DB_VERSION_MAJOR > 1
18259         {
18260                 char *version;
18261                 int major, minor, patch;
18262
18263                 version = db_version( &major, &minor, &patch );
18264
18265                 if( major != DB_VERSION_MAJOR ||
18266                         minor < DB_VERSION_MINOR )
18267                 {
18268                         printf("Berkeley DB version mismatch\n"
18269                                 "\theader: %s\n\tlibrary: %s\n",
18270                                 DB_VERSION_STRING, version);
18271                         return 1;
18272                 }
18273         }
18274 #endif
18275
18276 #if DB_VERSION_MAJOR > 2
18277         db_env_create( NULL, 0 );
18278 #elif DB_VERSION_MAJOR > 1
18279         db_appexit( NULL );
18280 #else
18281         (void) dbopen( NULL, 0, 0, 0, NULL);
18282 #endif
18283
18284 ; return 0; }
18285 EOF
18286 if { (eval echo configure:18287: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18287   rm -rf conftest*
18288   ol_cv_db_db_4_dot_1=yes
18289 else
18290   echo "configure: failed program was:" >&5
18291   cat conftest.$ac_ext >&5
18292   rm -rf conftest*
18293   ol_cv_db_db_4_dot_1=no
18294 fi
18295 rm -f conftest*
18296
18297         LIBS="$ol_LIBS"
18298
18299 fi
18300
18301 echo "$ac_t""$ol_cv_db_db_4_dot_1" 1>&6
18302
18303         if test $ol_cv_db_db_4_dot_1 = yes ; then
18304                 ol_cv_lib_db=-ldb-4.1
18305         fi
18306 fi
18307
18308 if test $ol_cv_lib_db = no ; then
18309         echo $ac_n "checking for Berkeley DB link (-ldb-4-1)""... $ac_c" 1>&6
18310 echo "configure:18311: checking for Berkeley DB link (-ldb-4-1)" >&5
18311 if eval "test \"\${ol_cv_db_db_4_1+set}\" = set"; then
18312   echo $ac_n "(cached) $ac_c" 1>&6
18313 else
18314   
18315         ol_DB_LIB=-ldb-4-1
18316         ol_LIBS=$LIBS
18317         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18318
18319         cat > conftest.$ac_ext <<EOF
18320 #line 18321 "configure"
18321 #include "confdefs.h"
18322
18323 #ifdef HAVE_DB_185_H
18324 # include <db_185.h>
18325 #else
18326 # include <db.h>
18327 #endif
18328
18329 #ifndef DB_VERSION_MAJOR
18330 # define DB_VERSION_MAJOR 1
18331 #endif
18332
18333 #ifndef NULL
18334 #define NULL ((void*)0)
18335 #endif
18336
18337 int main() {
18338
18339 #if DB_VERSION_MAJOR > 1
18340         {
18341                 char *version;
18342                 int major, minor, patch;
18343
18344                 version = db_version( &major, &minor, &patch );
18345
18346                 if( major != DB_VERSION_MAJOR ||
18347                         minor < DB_VERSION_MINOR )
18348                 {
18349                         printf("Berkeley DB version mismatch\n"
18350                                 "\theader: %s\n\tlibrary: %s\n",
18351                                 DB_VERSION_STRING, version);
18352                         return 1;
18353                 }
18354         }
18355 #endif
18356
18357 #if DB_VERSION_MAJOR > 2
18358         db_env_create( NULL, 0 );
18359 #elif DB_VERSION_MAJOR > 1
18360         db_appexit( NULL );
18361 #else
18362         (void) dbopen( NULL, 0, 0, 0, NULL);
18363 #endif
18364
18365 ; return 0; }
18366 EOF
18367 if { (eval echo configure:18368: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18368   rm -rf conftest*
18369   ol_cv_db_db_4_1=yes
18370 else
18371   echo "configure: failed program was:" >&5
18372   cat conftest.$ac_ext >&5
18373   rm -rf conftest*
18374   ol_cv_db_db_4_1=no
18375 fi
18376 rm -f conftest*
18377
18378         LIBS="$ol_LIBS"
18379
18380 fi
18381
18382 echo "$ac_t""$ol_cv_db_db_4_1" 1>&6
18383
18384         if test $ol_cv_db_db_4_1 = yes ; then
18385                 ol_cv_lib_db=-ldb-4-1
18386         fi
18387 fi
18388
18389 if test $ol_cv_lib_db = no ; then
18390         echo $ac_n "checking for Berkeley DB link (-ldb3)""... $ac_c" 1>&6
18391 echo "configure:18392: checking for Berkeley DB link (-ldb3)" >&5
18392 if eval "test \"\${ol_cv_db_db3+set}\" = set"; then
18393   echo $ac_n "(cached) $ac_c" 1>&6
18394 else
18395   
18396         ol_DB_LIB=-ldb3
18397         ol_LIBS=$LIBS
18398         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18399
18400         cat > conftest.$ac_ext <<EOF
18401 #line 18402 "configure"
18402 #include "confdefs.h"
18403
18404 #ifdef HAVE_DB_185_H
18405 # include <db_185.h>
18406 #else
18407 # include <db.h>
18408 #endif
18409
18410 #ifndef DB_VERSION_MAJOR
18411 # define DB_VERSION_MAJOR 1
18412 #endif
18413
18414 #ifndef NULL
18415 #define NULL ((void*)0)
18416 #endif
18417
18418 int main() {
18419
18420 #if DB_VERSION_MAJOR > 1
18421         {
18422                 char *version;
18423                 int major, minor, patch;
18424
18425                 version = db_version( &major, &minor, &patch );
18426
18427                 if( major != DB_VERSION_MAJOR ||
18428                         minor < DB_VERSION_MINOR )
18429                 {
18430                         printf("Berkeley DB version mismatch\n"
18431                                 "\theader: %s\n\tlibrary: %s\n",
18432                                 DB_VERSION_STRING, version);
18433                         return 1;
18434                 }
18435         }
18436 #endif
18437
18438 #if DB_VERSION_MAJOR > 2
18439         db_env_create( NULL, 0 );
18440 #elif DB_VERSION_MAJOR > 1
18441         db_appexit( NULL );
18442 #else
18443         (void) dbopen( NULL, 0, 0, 0, NULL);
18444 #endif
18445
18446 ; return 0; }
18447 EOF
18448 if { (eval echo configure:18449: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18449   rm -rf conftest*
18450   ol_cv_db_db3=yes
18451 else
18452   echo "configure: failed program was:" >&5
18453   cat conftest.$ac_ext >&5
18454   rm -rf conftest*
18455   ol_cv_db_db3=no
18456 fi
18457 rm -f conftest*
18458
18459         LIBS="$ol_LIBS"
18460
18461 fi
18462
18463 echo "$ac_t""$ol_cv_db_db3" 1>&6
18464
18465         if test $ol_cv_db_db3 = yes ; then
18466                 ol_cv_lib_db=-ldb3
18467         fi
18468 fi
18469
18470 if test $ol_cv_lib_db = no ; then
18471         echo $ac_n "checking for Berkeley DB link (-ldb-3)""... $ac_c" 1>&6
18472 echo "configure:18473: checking for Berkeley DB link (-ldb-3)" >&5
18473 if eval "test \"\${ol_cv_db_db_3+set}\" = set"; then
18474   echo $ac_n "(cached) $ac_c" 1>&6
18475 else
18476   
18477         ol_DB_LIB=-ldb-3
18478         ol_LIBS=$LIBS
18479         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18480
18481         cat > conftest.$ac_ext <<EOF
18482 #line 18483 "configure"
18483 #include "confdefs.h"
18484
18485 #ifdef HAVE_DB_185_H
18486 # include <db_185.h>
18487 #else
18488 # include <db.h>
18489 #endif
18490
18491 #ifndef DB_VERSION_MAJOR
18492 # define DB_VERSION_MAJOR 1
18493 #endif
18494
18495 #ifndef NULL
18496 #define NULL ((void*)0)
18497 #endif
18498
18499 int main() {
18500
18501 #if DB_VERSION_MAJOR > 1
18502         {
18503                 char *version;
18504                 int major, minor, patch;
18505
18506                 version = db_version( &major, &minor, &patch );
18507
18508                 if( major != DB_VERSION_MAJOR ||
18509                         minor < DB_VERSION_MINOR )
18510                 {
18511                         printf("Berkeley DB version mismatch\n"
18512                                 "\theader: %s\n\tlibrary: %s\n",
18513                                 DB_VERSION_STRING, version);
18514                         return 1;
18515                 }
18516         }
18517 #endif
18518
18519 #if DB_VERSION_MAJOR > 2
18520         db_env_create( NULL, 0 );
18521 #elif DB_VERSION_MAJOR > 1
18522         db_appexit( NULL );
18523 #else
18524         (void) dbopen( NULL, 0, 0, 0, NULL);
18525 #endif
18526
18527 ; return 0; }
18528 EOF
18529 if { (eval echo configure:18530: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18530   rm -rf conftest*
18531   ol_cv_db_db_3=yes
18532 else
18533   echo "configure: failed program was:" >&5
18534   cat conftest.$ac_ext >&5
18535   rm -rf conftest*
18536   ol_cv_db_db_3=no
18537 fi
18538 rm -f conftest*
18539
18540         LIBS="$ol_LIBS"
18541
18542 fi
18543
18544 echo "$ac_t""$ol_cv_db_db_3" 1>&6
18545
18546         if test $ol_cv_db_db_3 = yes ; then
18547                 ol_cv_lib_db=-ldb-3
18548         fi
18549 fi
18550
18551 if test $ol_cv_lib_db = no ; then
18552         echo $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6
18553 echo "configure:18554: checking for Berkeley DB link (-ldb2)" >&5
18554 if eval "test \"\${ol_cv_db_db2+set}\" = set"; then
18555   echo $ac_n "(cached) $ac_c" 1>&6
18556 else
18557   
18558         ol_DB_LIB=-ldb2
18559         ol_LIBS=$LIBS
18560         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18561
18562         cat > conftest.$ac_ext <<EOF
18563 #line 18564 "configure"
18564 #include "confdefs.h"
18565
18566 #ifdef HAVE_DB_185_H
18567 # include <db_185.h>
18568 #else
18569 # include <db.h>
18570 #endif
18571
18572 #ifndef DB_VERSION_MAJOR
18573 # define DB_VERSION_MAJOR 1
18574 #endif
18575
18576 #ifndef NULL
18577 #define NULL ((void*)0)
18578 #endif
18579
18580 int main() {
18581
18582 #if DB_VERSION_MAJOR > 1
18583         {
18584                 char *version;
18585                 int major, minor, patch;
18586
18587                 version = db_version( &major, &minor, &patch );
18588
18589                 if( major != DB_VERSION_MAJOR ||
18590                         minor < DB_VERSION_MINOR )
18591                 {
18592                         printf("Berkeley DB version mismatch\n"
18593                                 "\theader: %s\n\tlibrary: %s\n",
18594                                 DB_VERSION_STRING, version);
18595                         return 1;
18596                 }
18597         }
18598 #endif
18599
18600 #if DB_VERSION_MAJOR > 2
18601         db_env_create( NULL, 0 );
18602 #elif DB_VERSION_MAJOR > 1
18603         db_appexit( NULL );
18604 #else
18605         (void) dbopen( NULL, 0, 0, 0, NULL);
18606 #endif
18607
18608 ; return 0; }
18609 EOF
18610 if { (eval echo configure:18611: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18611   rm -rf conftest*
18612   ol_cv_db_db2=yes
18613 else
18614   echo "configure: failed program was:" >&5
18615   cat conftest.$ac_ext >&5
18616   rm -rf conftest*
18617   ol_cv_db_db2=no
18618 fi
18619 rm -f conftest*
18620
18621         LIBS="$ol_LIBS"
18622
18623 fi
18624
18625 echo "$ac_t""$ol_cv_db_db2" 1>&6
18626
18627         if test $ol_cv_db_db2 = yes ; then
18628                 ol_cv_lib_db=-ldb2
18629         fi
18630 fi
18631
18632 if test $ol_cv_lib_db = no ; then
18633         echo $ac_n "checking for Berkeley DB link (-ldb-2)""... $ac_c" 1>&6
18634 echo "configure:18635: checking for Berkeley DB link (-ldb-2)" >&5
18635 if eval "test \"\${ol_cv_db_db_2+set}\" = set"; then
18636   echo $ac_n "(cached) $ac_c" 1>&6
18637 else
18638   
18639         ol_DB_LIB=-ldb-2
18640         ol_LIBS=$LIBS
18641         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18642
18643         cat > conftest.$ac_ext <<EOF
18644 #line 18645 "configure"
18645 #include "confdefs.h"
18646
18647 #ifdef HAVE_DB_185_H
18648 # include <db_185.h>
18649 #else
18650 # include <db.h>
18651 #endif
18652
18653 #ifndef DB_VERSION_MAJOR
18654 # define DB_VERSION_MAJOR 1
18655 #endif
18656
18657 #ifndef NULL
18658 #define NULL ((void*)0)
18659 #endif
18660
18661 int main() {
18662
18663 #if DB_VERSION_MAJOR > 1
18664         {
18665                 char *version;
18666                 int major, minor, patch;
18667
18668                 version = db_version( &major, &minor, &patch );
18669
18670                 if( major != DB_VERSION_MAJOR ||
18671                         minor < DB_VERSION_MINOR )
18672                 {
18673                         printf("Berkeley DB version mismatch\n"
18674                                 "\theader: %s\n\tlibrary: %s\n",
18675                                 DB_VERSION_STRING, version);
18676                         return 1;
18677                 }
18678         }
18679 #endif
18680
18681 #if DB_VERSION_MAJOR > 2
18682         db_env_create( NULL, 0 );
18683 #elif DB_VERSION_MAJOR > 1
18684         db_appexit( NULL );
18685 #else
18686         (void) dbopen( NULL, 0, 0, 0, NULL);
18687 #endif
18688
18689 ; return 0; }
18690 EOF
18691 if { (eval echo configure:18692: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18692   rm -rf conftest*
18693   ol_cv_db_db_2=yes
18694 else
18695   echo "configure: failed program was:" >&5
18696   cat conftest.$ac_ext >&5
18697   rm -rf conftest*
18698   ol_cv_db_db_2=no
18699 fi
18700 rm -f conftest*
18701
18702         LIBS="$ol_LIBS"
18703
18704 fi
18705
18706 echo "$ac_t""$ol_cv_db_db_2" 1>&6
18707
18708         if test $ol_cv_db_db_2 = yes ; then
18709                 ol_cv_lib_db=-ldb-2
18710         fi
18711 fi
18712
18713 if test $ol_cv_lib_db = no ; then
18714         echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6
18715 echo "configure:18716: checking for Berkeley DB link (-ldb1)" >&5
18716 if eval "test \"\${ol_cv_db_db1+set}\" = set"; then
18717   echo $ac_n "(cached) $ac_c" 1>&6
18718 else
18719   
18720         ol_DB_LIB=-ldb1
18721         ol_LIBS=$LIBS
18722         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18723
18724         cat > conftest.$ac_ext <<EOF
18725 #line 18726 "configure"
18726 #include "confdefs.h"
18727
18728 #ifdef HAVE_DB_185_H
18729 # include <db_185.h>
18730 #else
18731 # include <db.h>
18732 #endif
18733
18734 #ifndef DB_VERSION_MAJOR
18735 # define DB_VERSION_MAJOR 1
18736 #endif
18737
18738 #ifndef NULL
18739 #define NULL ((void*)0)
18740 #endif
18741
18742 int main() {
18743
18744 #if DB_VERSION_MAJOR > 1
18745         {
18746                 char *version;
18747                 int major, minor, patch;
18748
18749                 version = db_version( &major, &minor, &patch );
18750
18751                 if( major != DB_VERSION_MAJOR ||
18752                         minor < DB_VERSION_MINOR )
18753                 {
18754                         printf("Berkeley DB version mismatch\n"
18755                                 "\theader: %s\n\tlibrary: %s\n",
18756                                 DB_VERSION_STRING, version);
18757                         return 1;
18758                 }
18759         }
18760 #endif
18761
18762 #if DB_VERSION_MAJOR > 2
18763         db_env_create( NULL, 0 );
18764 #elif DB_VERSION_MAJOR > 1
18765         db_appexit( NULL );
18766 #else
18767         (void) dbopen( NULL, 0, 0, 0, NULL);
18768 #endif
18769
18770 ; return 0; }
18771 EOF
18772 if { (eval echo configure:18773: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18773   rm -rf conftest*
18774   ol_cv_db_db1=yes
18775 else
18776   echo "configure: failed program was:" >&5
18777   cat conftest.$ac_ext >&5
18778   rm -rf conftest*
18779   ol_cv_db_db1=no
18780 fi
18781 rm -f conftest*
18782
18783         LIBS="$ol_LIBS"
18784
18785 fi
18786
18787 echo "$ac_t""$ol_cv_db_db1" 1>&6
18788
18789         if test $ol_cv_db_db1 = yes ; then
18790                 ol_cv_lib_db=-ldb1
18791         fi
18792 fi
18793
18794 if test $ol_cv_lib_db = no ; then
18795         echo $ac_n "checking for Berkeley DB link (-ldb-1)""... $ac_c" 1>&6
18796 echo "configure:18797: checking for Berkeley DB link (-ldb-1)" >&5
18797 if eval "test \"\${ol_cv_db_db_1+set}\" = set"; then
18798   echo $ac_n "(cached) $ac_c" 1>&6
18799 else
18800   
18801         ol_DB_LIB=-ldb-1
18802         ol_LIBS=$LIBS
18803         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18804
18805         cat > conftest.$ac_ext <<EOF
18806 #line 18807 "configure"
18807 #include "confdefs.h"
18808
18809 #ifdef HAVE_DB_185_H
18810 # include <db_185.h>
18811 #else
18812 # include <db.h>
18813 #endif
18814
18815 #ifndef DB_VERSION_MAJOR
18816 # define DB_VERSION_MAJOR 1
18817 #endif
18818
18819 #ifndef NULL
18820 #define NULL ((void*)0)
18821 #endif
18822
18823 int main() {
18824
18825 #if DB_VERSION_MAJOR > 1
18826         {
18827                 char *version;
18828                 int major, minor, patch;
18829
18830                 version = db_version( &major, &minor, &patch );
18831
18832                 if( major != DB_VERSION_MAJOR ||
18833                         minor < DB_VERSION_MINOR )
18834                 {
18835                         printf("Berkeley DB version mismatch\n"
18836                                 "\theader: %s\n\tlibrary: %s\n",
18837                                 DB_VERSION_STRING, version);
18838                         return 1;
18839                 }
18840         }
18841 #endif
18842
18843 #if DB_VERSION_MAJOR > 2
18844         db_env_create( NULL, 0 );
18845 #elif DB_VERSION_MAJOR > 1
18846         db_appexit( NULL );
18847 #else
18848         (void) dbopen( NULL, 0, 0, 0, NULL);
18849 #endif
18850
18851 ; return 0; }
18852 EOF
18853 if { (eval echo configure:18854: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18854   rm -rf conftest*
18855   ol_cv_db_db_1=yes
18856 else
18857   echo "configure: failed program was:" >&5
18858   cat conftest.$ac_ext >&5
18859   rm -rf conftest*
18860   ol_cv_db_db_1=no
18861 fi
18862 rm -f conftest*
18863
18864         LIBS="$ol_LIBS"
18865
18866 fi
18867
18868 echo "$ac_t""$ol_cv_db_db_1" 1>&6
18869
18870         if test $ol_cv_db_db_1 = yes ; then
18871                 ol_cv_lib_db=-ldb-1
18872         fi
18873 fi
18874
18875
18876                 if test "$ol_cv_lib_db" != no ; then
18877                         ol_cv_berkeley_db=yes
18878                 fi
18879         fi
18880 fi
18881
18882         else
18883                 ol_cv_berkeley_db=no
18884 for ac_hdr in db.h
18885 do
18886 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
18887 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
18888 echo "configure:18889: checking for $ac_hdr" >&5
18889 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
18890   echo $ac_n "(cached) $ac_c" 1>&6
18891 else
18892   cat > conftest.$ac_ext <<EOF
18893 #line 18894 "configure"
18894 #include "confdefs.h"
18895 #include <$ac_hdr>
18896 EOF
18897 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
18898 { (eval echo configure:18899: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
18899 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
18900 if test -z "$ac_err"; then
18901   rm -rf conftest*
18902   eval "ac_cv_header_$ac_safe=yes"
18903 else
18904   echo "$ac_err" >&5
18905   echo "configure: failed program was:" >&5
18906   cat conftest.$ac_ext >&5
18907   rm -rf conftest*
18908   eval "ac_cv_header_$ac_safe=no"
18909 fi
18910 rm -f conftest*
18911 fi
18912 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
18913   echo "$ac_t""yes" 1>&6
18914     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
18915   cat >> confdefs.h <<EOF
18916 #define $ac_tr_hdr 1
18917 EOF
18918  
18919 else
18920   echo "$ac_t""no" 1>&6
18921 fi
18922 done
18923
18924 if test $ac_cv_header_db_h = yes; then
18925         ol_cv_lib_db=no
18926 if test $ol_cv_lib_db = no ; then
18927         echo $ac_n "checking for Berkeley DB link (default)""... $ac_c" 1>&6
18928 echo "configure:18929: checking for Berkeley DB link (default)" >&5
18929 if eval "test \"\${ol_cv_db_none+set}\" = set"; then
18930   echo $ac_n "(cached) $ac_c" 1>&6
18931 else
18932   
18933         ol_DB_LIB=
18934         ol_LIBS=$LIBS
18935         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18936
18937         cat > conftest.$ac_ext <<EOF
18938 #line 18939 "configure"
18939 #include "confdefs.h"
18940
18941 #ifdef HAVE_DB_185_H
18942 # include <db_185.h>
18943 #else
18944 # include <db.h>
18945 #endif
18946
18947 #ifndef DB_VERSION_MAJOR
18948 # define DB_VERSION_MAJOR 1
18949 #endif
18950
18951 #ifndef NULL
18952 #define NULL ((void*)0)
18953 #endif
18954
18955 int main() {
18956
18957 #if DB_VERSION_MAJOR > 1
18958         {
18959                 char *version;
18960                 int major, minor, patch;
18961
18962                 version = db_version( &major, &minor, &patch );
18963
18964                 if( major != DB_VERSION_MAJOR ||
18965                         minor < DB_VERSION_MINOR )
18966                 {
18967                         printf("Berkeley DB version mismatch\n"
18968                                 "\theader: %s\n\tlibrary: %s\n",
18969                                 DB_VERSION_STRING, version);
18970                         return 1;
18971                 }
18972         }
18973 #endif
18974
18975 #if DB_VERSION_MAJOR > 2
18976         db_env_create( NULL, 0 );
18977 #elif DB_VERSION_MAJOR > 1
18978         db_appexit( NULL );
18979 #else
18980         (void) dbopen( NULL, 0, 0, 0, NULL);
18981 #endif
18982
18983 ; return 0; }
18984 EOF
18985 if { (eval echo configure:18986: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18986   rm -rf conftest*
18987   ol_cv_db_none=yes
18988 else
18989   echo "configure: failed program was:" >&5
18990   cat conftest.$ac_ext >&5
18991   rm -rf conftest*
18992   ol_cv_db_none=no
18993 fi
18994 rm -f conftest*
18995
18996         LIBS="$ol_LIBS"
18997
18998 fi
18999
19000 echo "$ac_t""$ol_cv_db_none" 1>&6
19001
19002         if test $ol_cv_db_none = yes ; then
19003                 ol_cv_lib_db=yes
19004         fi
19005 fi
19006
19007 if test $ol_cv_lib_db = no ; then
19008         echo $ac_n "checking for Berkeley DB link (-ldb43)""... $ac_c" 1>&6
19009 echo "configure:19010: checking for Berkeley DB link (-ldb43)" >&5
19010 if eval "test \"\${ol_cv_db_db43+set}\" = set"; then
19011   echo $ac_n "(cached) $ac_c" 1>&6
19012 else
19013   
19014         ol_DB_LIB=-ldb43
19015         ol_LIBS=$LIBS
19016         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19017
19018         cat > conftest.$ac_ext <<EOF
19019 #line 19020 "configure"
19020 #include "confdefs.h"
19021
19022 #ifdef HAVE_DB_185_H
19023 # include <db_185.h>
19024 #else
19025 # include <db.h>
19026 #endif
19027
19028 #ifndef DB_VERSION_MAJOR
19029 # define DB_VERSION_MAJOR 1
19030 #endif
19031
19032 #ifndef NULL
19033 #define NULL ((void*)0)
19034 #endif
19035
19036 int main() {
19037
19038 #if DB_VERSION_MAJOR > 1
19039         {
19040                 char *version;
19041                 int major, minor, patch;
19042
19043                 version = db_version( &major, &minor, &patch );
19044
19045                 if( major != DB_VERSION_MAJOR ||
19046                         minor < DB_VERSION_MINOR )
19047                 {
19048                         printf("Berkeley DB version mismatch\n"
19049                                 "\theader: %s\n\tlibrary: %s\n",
19050                                 DB_VERSION_STRING, version);
19051                         return 1;
19052                 }
19053         }
19054 #endif
19055
19056 #if DB_VERSION_MAJOR > 2
19057         db_env_create( NULL, 0 );
19058 #elif DB_VERSION_MAJOR > 1
19059         db_appexit( NULL );
19060 #else
19061         (void) dbopen( NULL, 0, 0, 0, NULL);
19062 #endif
19063
19064 ; return 0; }
19065 EOF
19066 if { (eval echo configure:19067: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19067   rm -rf conftest*
19068   ol_cv_db_db43=yes
19069 else
19070   echo "configure: failed program was:" >&5
19071   cat conftest.$ac_ext >&5
19072   rm -rf conftest*
19073   ol_cv_db_db43=no
19074 fi
19075 rm -f conftest*
19076
19077         LIBS="$ol_LIBS"
19078
19079 fi
19080
19081 echo "$ac_t""$ol_cv_db_db43" 1>&6
19082
19083         if test $ol_cv_db_db43 = yes ; then
19084                 ol_cv_lib_db=-ldb43
19085         fi
19086 fi
19087
19088 if test $ol_cv_lib_db = no ; then
19089         echo $ac_n "checking for Berkeley DB link (-ldb-43)""... $ac_c" 1>&6
19090 echo "configure:19091: checking for Berkeley DB link (-ldb-43)" >&5
19091 if eval "test \"\${ol_cv_db_db_43+set}\" = set"; then
19092   echo $ac_n "(cached) $ac_c" 1>&6
19093 else
19094   
19095         ol_DB_LIB=-ldb-43
19096         ol_LIBS=$LIBS
19097         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19098
19099         cat > conftest.$ac_ext <<EOF
19100 #line 19101 "configure"
19101 #include "confdefs.h"
19102
19103 #ifdef HAVE_DB_185_H
19104 # include <db_185.h>
19105 #else
19106 # include <db.h>
19107 #endif
19108
19109 #ifndef DB_VERSION_MAJOR
19110 # define DB_VERSION_MAJOR 1
19111 #endif
19112
19113 #ifndef NULL
19114 #define NULL ((void*)0)
19115 #endif
19116
19117 int main() {
19118
19119 #if DB_VERSION_MAJOR > 1
19120         {
19121                 char *version;
19122                 int major, minor, patch;
19123
19124                 version = db_version( &major, &minor, &patch );
19125
19126                 if( major != DB_VERSION_MAJOR ||
19127                         minor < DB_VERSION_MINOR )
19128                 {
19129                         printf("Berkeley DB version mismatch\n"
19130                                 "\theader: %s\n\tlibrary: %s\n",
19131                                 DB_VERSION_STRING, version);
19132                         return 1;
19133                 }
19134         }
19135 #endif
19136
19137 #if DB_VERSION_MAJOR > 2
19138         db_env_create( NULL, 0 );
19139 #elif DB_VERSION_MAJOR > 1
19140         db_appexit( NULL );
19141 #else
19142         (void) dbopen( NULL, 0, 0, 0, NULL);
19143 #endif
19144
19145 ; return 0; }
19146 EOF
19147 if { (eval echo configure:19148: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19148   rm -rf conftest*
19149   ol_cv_db_db_43=yes
19150 else
19151   echo "configure: failed program was:" >&5
19152   cat conftest.$ac_ext >&5
19153   rm -rf conftest*
19154   ol_cv_db_db_43=no
19155 fi
19156 rm -f conftest*
19157
19158         LIBS="$ol_LIBS"
19159
19160 fi
19161
19162 echo "$ac_t""$ol_cv_db_db_43" 1>&6
19163
19164         if test $ol_cv_db_db_43 = yes ; then
19165                 ol_cv_lib_db=-ldb-43
19166         fi
19167 fi
19168
19169 if test $ol_cv_lib_db = no ; then
19170         echo $ac_n "checking for Berkeley DB link (-ldb-4.3)""... $ac_c" 1>&6
19171 echo "configure:19172: checking for Berkeley DB link (-ldb-4.3)" >&5
19172 if eval "test \"\${ol_cv_db_db_4_dot_3+set}\" = set"; then
19173   echo $ac_n "(cached) $ac_c" 1>&6
19174 else
19175   
19176         ol_DB_LIB=-ldb-4.3
19177         ol_LIBS=$LIBS
19178         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19179
19180         cat > conftest.$ac_ext <<EOF
19181 #line 19182 "configure"
19182 #include "confdefs.h"
19183
19184 #ifdef HAVE_DB_185_H
19185 # include <db_185.h>
19186 #else
19187 # include <db.h>
19188 #endif
19189
19190 #ifndef DB_VERSION_MAJOR
19191 # define DB_VERSION_MAJOR 1
19192 #endif
19193
19194 #ifndef NULL
19195 #define NULL ((void*)0)
19196 #endif
19197
19198 int main() {
19199
19200 #if DB_VERSION_MAJOR > 1
19201         {
19202                 char *version;
19203                 int major, minor, patch;
19204
19205                 version = db_version( &major, &minor, &patch );
19206
19207                 if( major != DB_VERSION_MAJOR ||
19208                         minor < DB_VERSION_MINOR )
19209                 {
19210                         printf("Berkeley DB version mismatch\n"
19211                                 "\theader: %s\n\tlibrary: %s\n",
19212                                 DB_VERSION_STRING, version);
19213                         return 1;
19214                 }
19215         }
19216 #endif
19217
19218 #if DB_VERSION_MAJOR > 2
19219         db_env_create( NULL, 0 );
19220 #elif DB_VERSION_MAJOR > 1
19221         db_appexit( NULL );
19222 #else
19223         (void) dbopen( NULL, 0, 0, 0, NULL);
19224 #endif
19225
19226 ; return 0; }
19227 EOF
19228 if { (eval echo configure:19229: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19229   rm -rf conftest*
19230   ol_cv_db_db_4_dot_3=yes
19231 else
19232   echo "configure: failed program was:" >&5
19233   cat conftest.$ac_ext >&5
19234   rm -rf conftest*
19235   ol_cv_db_db_4_dot_3=no
19236 fi
19237 rm -f conftest*
19238
19239         LIBS="$ol_LIBS"
19240
19241 fi
19242
19243 echo "$ac_t""$ol_cv_db_db_4_dot_3" 1>&6
19244
19245         if test $ol_cv_db_db_4_dot_3 = yes ; then
19246                 ol_cv_lib_db=-ldb-4.3
19247         fi
19248 fi
19249
19250 if test $ol_cv_lib_db = no ; then
19251         echo $ac_n "checking for Berkeley DB link (-ldb-4-3)""... $ac_c" 1>&6
19252 echo "configure:19253: checking for Berkeley DB link (-ldb-4-3)" >&5
19253 if eval "test \"\${ol_cv_db_db_4_3+set}\" = set"; then
19254   echo $ac_n "(cached) $ac_c" 1>&6
19255 else
19256   
19257         ol_DB_LIB=-ldb-4-3
19258         ol_LIBS=$LIBS
19259         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19260
19261         cat > conftest.$ac_ext <<EOF
19262 #line 19263 "configure"
19263 #include "confdefs.h"
19264
19265 #ifdef HAVE_DB_185_H
19266 # include <db_185.h>
19267 #else
19268 # include <db.h>
19269 #endif
19270
19271 #ifndef DB_VERSION_MAJOR
19272 # define DB_VERSION_MAJOR 1
19273 #endif
19274
19275 #ifndef NULL
19276 #define NULL ((void*)0)
19277 #endif
19278
19279 int main() {
19280
19281 #if DB_VERSION_MAJOR > 1
19282         {
19283                 char *version;
19284                 int major, minor, patch;
19285
19286                 version = db_version( &major, &minor, &patch );
19287
19288                 if( major != DB_VERSION_MAJOR ||
19289                         minor < DB_VERSION_MINOR )
19290                 {
19291                         printf("Berkeley DB version mismatch\n"
19292                                 "\theader: %s\n\tlibrary: %s\n",
19293                                 DB_VERSION_STRING, version);
19294                         return 1;
19295                 }
19296         }
19297 #endif
19298
19299 #if DB_VERSION_MAJOR > 2
19300         db_env_create( NULL, 0 );
19301 #elif DB_VERSION_MAJOR > 1
19302         db_appexit( NULL );
19303 #else
19304         (void) dbopen( NULL, 0, 0, 0, NULL);
19305 #endif
19306
19307 ; return 0; }
19308 EOF
19309 if { (eval echo configure:19310: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19310   rm -rf conftest*
19311   ol_cv_db_db_4_3=yes
19312 else
19313   echo "configure: failed program was:" >&5
19314   cat conftest.$ac_ext >&5
19315   rm -rf conftest*
19316   ol_cv_db_db_4_3=no
19317 fi
19318 rm -f conftest*
19319
19320         LIBS="$ol_LIBS"
19321
19322 fi
19323
19324 echo "$ac_t""$ol_cv_db_db_4_3" 1>&6
19325
19326         if test $ol_cv_db_db_4_3 = yes ; then
19327                 ol_cv_lib_db=-ldb-4-3
19328         fi
19329 fi
19330
19331 if test $ol_cv_lib_db = no ; then
19332         echo $ac_n "checking for Berkeley DB link (-ldb42)""... $ac_c" 1>&6
19333 echo "configure:19334: checking for Berkeley DB link (-ldb42)" >&5
19334 if eval "test \"\${ol_cv_db_db42+set}\" = set"; then
19335   echo $ac_n "(cached) $ac_c" 1>&6
19336 else
19337   
19338         ol_DB_LIB=-ldb42
19339         ol_LIBS=$LIBS
19340         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19341
19342         cat > conftest.$ac_ext <<EOF
19343 #line 19344 "configure"
19344 #include "confdefs.h"
19345
19346 #ifdef HAVE_DB_185_H
19347 # include <db_185.h>
19348 #else
19349 # include <db.h>
19350 #endif
19351
19352 #ifndef DB_VERSION_MAJOR
19353 # define DB_VERSION_MAJOR 1
19354 #endif
19355
19356 #ifndef NULL
19357 #define NULL ((void*)0)
19358 #endif
19359
19360 int main() {
19361
19362 #if DB_VERSION_MAJOR > 1
19363         {
19364                 char *version;
19365                 int major, minor, patch;
19366
19367                 version = db_version( &major, &minor, &patch );
19368
19369                 if( major != DB_VERSION_MAJOR ||
19370                         minor < DB_VERSION_MINOR )
19371                 {
19372                         printf("Berkeley DB version mismatch\n"
19373                                 "\theader: %s\n\tlibrary: %s\n",
19374                                 DB_VERSION_STRING, version);
19375                         return 1;
19376                 }
19377         }
19378 #endif
19379
19380 #if DB_VERSION_MAJOR > 2
19381         db_env_create( NULL, 0 );
19382 #elif DB_VERSION_MAJOR > 1
19383         db_appexit( NULL );
19384 #else
19385         (void) dbopen( NULL, 0, 0, 0, NULL);
19386 #endif
19387
19388 ; return 0; }
19389 EOF
19390 if { (eval echo configure:19391: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19391   rm -rf conftest*
19392   ol_cv_db_db42=yes
19393 else
19394   echo "configure: failed program was:" >&5
19395   cat conftest.$ac_ext >&5
19396   rm -rf conftest*
19397   ol_cv_db_db42=no
19398 fi
19399 rm -f conftest*
19400
19401         LIBS="$ol_LIBS"
19402
19403 fi
19404
19405 echo "$ac_t""$ol_cv_db_db42" 1>&6
19406
19407         if test $ol_cv_db_db42 = yes ; then
19408                 ol_cv_lib_db=-ldb42
19409         fi
19410 fi
19411
19412 if test $ol_cv_lib_db = no ; then
19413         echo $ac_n "checking for Berkeley DB link (-ldb-42)""... $ac_c" 1>&6
19414 echo "configure:19415: checking for Berkeley DB link (-ldb-42)" >&5
19415 if eval "test \"\${ol_cv_db_db_42+set}\" = set"; then
19416   echo $ac_n "(cached) $ac_c" 1>&6
19417 else
19418   
19419         ol_DB_LIB=-ldb-42
19420         ol_LIBS=$LIBS
19421         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19422
19423         cat > conftest.$ac_ext <<EOF
19424 #line 19425 "configure"
19425 #include "confdefs.h"
19426
19427 #ifdef HAVE_DB_185_H
19428 # include <db_185.h>
19429 #else
19430 # include <db.h>
19431 #endif
19432
19433 #ifndef DB_VERSION_MAJOR
19434 # define DB_VERSION_MAJOR 1
19435 #endif
19436
19437 #ifndef NULL
19438 #define NULL ((void*)0)
19439 #endif
19440
19441 int main() {
19442
19443 #if DB_VERSION_MAJOR > 1
19444         {
19445                 char *version;
19446                 int major, minor, patch;
19447
19448                 version = db_version( &major, &minor, &patch );
19449
19450                 if( major != DB_VERSION_MAJOR ||
19451                         minor < DB_VERSION_MINOR )
19452                 {
19453                         printf("Berkeley DB version mismatch\n"
19454                                 "\theader: %s\n\tlibrary: %s\n",
19455                                 DB_VERSION_STRING, version);
19456                         return 1;
19457                 }
19458         }
19459 #endif
19460
19461 #if DB_VERSION_MAJOR > 2
19462         db_env_create( NULL, 0 );
19463 #elif DB_VERSION_MAJOR > 1
19464         db_appexit( NULL );
19465 #else
19466         (void) dbopen( NULL, 0, 0, 0, NULL);
19467 #endif
19468
19469 ; return 0; }
19470 EOF
19471 if { (eval echo configure:19472: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19472   rm -rf conftest*
19473   ol_cv_db_db_42=yes
19474 else
19475   echo "configure: failed program was:" >&5
19476   cat conftest.$ac_ext >&5
19477   rm -rf conftest*
19478   ol_cv_db_db_42=no
19479 fi
19480 rm -f conftest*
19481
19482         LIBS="$ol_LIBS"
19483
19484 fi
19485
19486 echo "$ac_t""$ol_cv_db_db_42" 1>&6
19487
19488         if test $ol_cv_db_db_42 = yes ; then
19489                 ol_cv_lib_db=-ldb-42
19490         fi
19491 fi
19492
19493 if test $ol_cv_lib_db = no ; then
19494         echo $ac_n "checking for Berkeley DB link (-ldb-4.2)""... $ac_c" 1>&6
19495 echo "configure:19496: checking for Berkeley DB link (-ldb-4.2)" >&5
19496 if eval "test \"\${ol_cv_db_db_4_dot_2+set}\" = set"; then
19497   echo $ac_n "(cached) $ac_c" 1>&6
19498 else
19499   
19500         ol_DB_LIB=-ldb-4.2
19501         ol_LIBS=$LIBS
19502         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19503
19504         cat > conftest.$ac_ext <<EOF
19505 #line 19506 "configure"
19506 #include "confdefs.h"
19507
19508 #ifdef HAVE_DB_185_H
19509 # include <db_185.h>
19510 #else
19511 # include <db.h>
19512 #endif
19513
19514 #ifndef DB_VERSION_MAJOR
19515 # define DB_VERSION_MAJOR 1
19516 #endif
19517
19518 #ifndef NULL
19519 #define NULL ((void*)0)
19520 #endif
19521
19522 int main() {
19523
19524 #if DB_VERSION_MAJOR > 1
19525         {
19526                 char *version;
19527                 int major, minor, patch;
19528
19529                 version = db_version( &major, &minor, &patch );
19530
19531                 if( major != DB_VERSION_MAJOR ||
19532                         minor < DB_VERSION_MINOR )
19533                 {
19534                         printf("Berkeley DB version mismatch\n"
19535                                 "\theader: %s\n\tlibrary: %s\n",
19536                                 DB_VERSION_STRING, version);
19537                         return 1;
19538                 }
19539         }
19540 #endif
19541
19542 #if DB_VERSION_MAJOR > 2
19543         db_env_create( NULL, 0 );
19544 #elif DB_VERSION_MAJOR > 1
19545         db_appexit( NULL );
19546 #else
19547         (void) dbopen( NULL, 0, 0, 0, NULL);
19548 #endif
19549
19550 ; return 0; }
19551 EOF
19552 if { (eval echo configure:19553: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19553   rm -rf conftest*
19554   ol_cv_db_db_4_dot_2=yes
19555 else
19556   echo "configure: failed program was:" >&5
19557   cat conftest.$ac_ext >&5
19558   rm -rf conftest*
19559   ol_cv_db_db_4_dot_2=no
19560 fi
19561 rm -f conftest*
19562
19563         LIBS="$ol_LIBS"
19564
19565 fi
19566
19567 echo "$ac_t""$ol_cv_db_db_4_dot_2" 1>&6
19568
19569         if test $ol_cv_db_db_4_dot_2 = yes ; then
19570                 ol_cv_lib_db=-ldb-4.2
19571         fi
19572 fi
19573
19574 if test $ol_cv_lib_db = no ; then
19575         echo $ac_n "checking for Berkeley DB link (-ldb-4-2)""... $ac_c" 1>&6
19576 echo "configure:19577: checking for Berkeley DB link (-ldb-4-2)" >&5
19577 if eval "test \"\${ol_cv_db_db_4_2+set}\" = set"; then
19578   echo $ac_n "(cached) $ac_c" 1>&6
19579 else
19580   
19581         ol_DB_LIB=-ldb-4-2
19582         ol_LIBS=$LIBS
19583         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19584
19585         cat > conftest.$ac_ext <<EOF
19586 #line 19587 "configure"
19587 #include "confdefs.h"
19588
19589 #ifdef HAVE_DB_185_H
19590 # include <db_185.h>
19591 #else
19592 # include <db.h>
19593 #endif
19594
19595 #ifndef DB_VERSION_MAJOR
19596 # define DB_VERSION_MAJOR 1
19597 #endif
19598
19599 #ifndef NULL
19600 #define NULL ((void*)0)
19601 #endif
19602
19603 int main() {
19604
19605 #if DB_VERSION_MAJOR > 1
19606         {
19607                 char *version;
19608                 int major, minor, patch;
19609
19610                 version = db_version( &major, &minor, &patch );
19611
19612                 if( major != DB_VERSION_MAJOR ||
19613                         minor < DB_VERSION_MINOR )
19614                 {
19615                         printf("Berkeley DB version mismatch\n"
19616                                 "\theader: %s\n\tlibrary: %s\n",
19617                                 DB_VERSION_STRING, version);
19618                         return 1;
19619                 }
19620         }
19621 #endif
19622
19623 #if DB_VERSION_MAJOR > 2
19624         db_env_create( NULL, 0 );
19625 #elif DB_VERSION_MAJOR > 1
19626         db_appexit( NULL );
19627 #else
19628         (void) dbopen( NULL, 0, 0, 0, NULL);
19629 #endif
19630
19631 ; return 0; }
19632 EOF
19633 if { (eval echo configure:19634: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19634   rm -rf conftest*
19635   ol_cv_db_db_4_2=yes
19636 else
19637   echo "configure: failed program was:" >&5
19638   cat conftest.$ac_ext >&5
19639   rm -rf conftest*
19640   ol_cv_db_db_4_2=no
19641 fi
19642 rm -f conftest*
19643
19644         LIBS="$ol_LIBS"
19645
19646 fi
19647
19648 echo "$ac_t""$ol_cv_db_db_4_2" 1>&6
19649
19650         if test $ol_cv_db_db_4_2 = yes ; then
19651                 ol_cv_lib_db=-ldb-4-2
19652         fi
19653 fi
19654
19655 if test $ol_cv_lib_db = no ; then
19656         echo $ac_n "checking for Berkeley DB link (-ldb-4)""... $ac_c" 1>&6
19657 echo "configure:19658: checking for Berkeley DB link (-ldb-4)" >&5
19658 if eval "test \"\${ol_cv_db_db_4+set}\" = set"; then
19659   echo $ac_n "(cached) $ac_c" 1>&6
19660 else
19661   
19662         ol_DB_LIB=-ldb-4
19663         ol_LIBS=$LIBS
19664         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19665
19666         cat > conftest.$ac_ext <<EOF
19667 #line 19668 "configure"
19668 #include "confdefs.h"
19669
19670 #ifdef HAVE_DB_185_H
19671 # include <db_185.h>
19672 #else
19673 # include <db.h>
19674 #endif
19675
19676 #ifndef DB_VERSION_MAJOR
19677 # define DB_VERSION_MAJOR 1
19678 #endif
19679
19680 #ifndef NULL
19681 #define NULL ((void*)0)
19682 #endif
19683
19684 int main() {
19685
19686 #if DB_VERSION_MAJOR > 1
19687         {
19688                 char *version;
19689                 int major, minor, patch;
19690
19691                 version = db_version( &major, &minor, &patch );
19692
19693                 if( major != DB_VERSION_MAJOR ||
19694                         minor < DB_VERSION_MINOR )
19695                 {
19696                         printf("Berkeley DB version mismatch\n"
19697                                 "\theader: %s\n\tlibrary: %s\n",
19698                                 DB_VERSION_STRING, version);
19699                         return 1;
19700                 }
19701         }
19702 #endif
19703
19704 #if DB_VERSION_MAJOR > 2
19705         db_env_create( NULL, 0 );
19706 #elif DB_VERSION_MAJOR > 1
19707         db_appexit( NULL );
19708 #else
19709         (void) dbopen( NULL, 0, 0, 0, NULL);
19710 #endif
19711
19712 ; return 0; }
19713 EOF
19714 if { (eval echo configure:19715: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19715   rm -rf conftest*
19716   ol_cv_db_db_4=yes
19717 else
19718   echo "configure: failed program was:" >&5
19719   cat conftest.$ac_ext >&5
19720   rm -rf conftest*
19721   ol_cv_db_db_4=no
19722 fi
19723 rm -f conftest*
19724
19725         LIBS="$ol_LIBS"
19726
19727 fi
19728
19729 echo "$ac_t""$ol_cv_db_db_4" 1>&6
19730
19731         if test $ol_cv_db_db_4 = yes ; then
19732                 ol_cv_lib_db=-ldb-4
19733         fi
19734 fi
19735
19736 if test $ol_cv_lib_db = no ; then
19737         echo $ac_n "checking for Berkeley DB link (-ldb4)""... $ac_c" 1>&6
19738 echo "configure:19739: checking for Berkeley DB link (-ldb4)" >&5
19739 if eval "test \"\${ol_cv_db_db4+set}\" = set"; then
19740   echo $ac_n "(cached) $ac_c" 1>&6
19741 else
19742   
19743         ol_DB_LIB=-ldb4
19744         ol_LIBS=$LIBS
19745         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19746
19747         cat > conftest.$ac_ext <<EOF
19748 #line 19749 "configure"
19749 #include "confdefs.h"
19750
19751 #ifdef HAVE_DB_185_H
19752 # include <db_185.h>
19753 #else
19754 # include <db.h>
19755 #endif
19756
19757 #ifndef DB_VERSION_MAJOR
19758 # define DB_VERSION_MAJOR 1
19759 #endif
19760
19761 #ifndef NULL
19762 #define NULL ((void*)0)
19763 #endif
19764
19765 int main() {
19766
19767 #if DB_VERSION_MAJOR > 1
19768         {
19769                 char *version;
19770                 int major, minor, patch;
19771
19772                 version = db_version( &major, &minor, &patch );
19773
19774                 if( major != DB_VERSION_MAJOR ||
19775                         minor < DB_VERSION_MINOR )
19776                 {
19777                         printf("Berkeley DB version mismatch\n"
19778                                 "\theader: %s\n\tlibrary: %s\n",
19779                                 DB_VERSION_STRING, version);
19780                         return 1;
19781                 }
19782         }
19783 #endif
19784
19785 #if DB_VERSION_MAJOR > 2
19786         db_env_create( NULL, 0 );
19787 #elif DB_VERSION_MAJOR > 1
19788         db_appexit( NULL );
19789 #else
19790         (void) dbopen( NULL, 0, 0, 0, NULL);
19791 #endif
19792
19793 ; return 0; }
19794 EOF
19795 if { (eval echo configure:19796: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19796   rm -rf conftest*
19797   ol_cv_db_db4=yes
19798 else
19799   echo "configure: failed program was:" >&5
19800   cat conftest.$ac_ext >&5
19801   rm -rf conftest*
19802   ol_cv_db_db4=no
19803 fi
19804 rm -f conftest*
19805
19806         LIBS="$ol_LIBS"
19807
19808 fi
19809
19810 echo "$ac_t""$ol_cv_db_db4" 1>&6
19811
19812         if test $ol_cv_db_db4 = yes ; then
19813                 ol_cv_lib_db=-ldb4
19814         fi
19815 fi
19816
19817 if test $ol_cv_lib_db = no ; then
19818         echo $ac_n "checking for Berkeley DB link (-ldb)""... $ac_c" 1>&6
19819 echo "configure:19820: checking for Berkeley DB link (-ldb)" >&5
19820 if eval "test \"\${ol_cv_db_db+set}\" = set"; then
19821   echo $ac_n "(cached) $ac_c" 1>&6
19822 else
19823   
19824         ol_DB_LIB=-ldb
19825         ol_LIBS=$LIBS
19826         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19827
19828         cat > conftest.$ac_ext <<EOF
19829 #line 19830 "configure"
19830 #include "confdefs.h"
19831
19832 #ifdef HAVE_DB_185_H
19833 # include <db_185.h>
19834 #else
19835 # include <db.h>
19836 #endif
19837
19838 #ifndef DB_VERSION_MAJOR
19839 # define DB_VERSION_MAJOR 1
19840 #endif
19841
19842 #ifndef NULL
19843 #define NULL ((void*)0)
19844 #endif
19845
19846 int main() {
19847
19848 #if DB_VERSION_MAJOR > 1
19849         {
19850                 char *version;
19851                 int major, minor, patch;
19852
19853                 version = db_version( &major, &minor, &patch );
19854
19855                 if( major != DB_VERSION_MAJOR ||
19856                         minor < DB_VERSION_MINOR )
19857                 {
19858                         printf("Berkeley DB version mismatch\n"
19859                                 "\theader: %s\n\tlibrary: %s\n",
19860                                 DB_VERSION_STRING, version);
19861                         return 1;
19862                 }
19863         }
19864 #endif
19865
19866 #if DB_VERSION_MAJOR > 2
19867         db_env_create( NULL, 0 );
19868 #elif DB_VERSION_MAJOR > 1
19869         db_appexit( NULL );
19870 #else
19871         (void) dbopen( NULL, 0, 0, 0, NULL);
19872 #endif
19873
19874 ; return 0; }
19875 EOF
19876 if { (eval echo configure:19877: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19877   rm -rf conftest*
19878   ol_cv_db_db=yes
19879 else
19880   echo "configure: failed program was:" >&5
19881   cat conftest.$ac_ext >&5
19882   rm -rf conftest*
19883   ol_cv_db_db=no
19884 fi
19885 rm -f conftest*
19886
19887         LIBS="$ol_LIBS"
19888
19889 fi
19890
19891 echo "$ac_t""$ol_cv_db_db" 1>&6
19892
19893         if test $ol_cv_db_db = yes ; then
19894                 ol_cv_lib_db=-ldb
19895         fi
19896 fi
19897
19898 if test $ol_cv_lib_db = no ; then
19899         echo $ac_n "checking for Berkeley DB link (-ldb41)""... $ac_c" 1>&6
19900 echo "configure:19901: checking for Berkeley DB link (-ldb41)" >&5
19901 if eval "test \"\${ol_cv_db_db41+set}\" = set"; then
19902   echo $ac_n "(cached) $ac_c" 1>&6
19903 else
19904   
19905         ol_DB_LIB=-ldb41
19906         ol_LIBS=$LIBS
19907         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19908
19909         cat > conftest.$ac_ext <<EOF
19910 #line 19911 "configure"
19911 #include "confdefs.h"
19912
19913 #ifdef HAVE_DB_185_H
19914 # include <db_185.h>
19915 #else
19916 # include <db.h>
19917 #endif
19918
19919 #ifndef DB_VERSION_MAJOR
19920 # define DB_VERSION_MAJOR 1
19921 #endif
19922
19923 #ifndef NULL
19924 #define NULL ((void*)0)
19925 #endif
19926
19927 int main() {
19928
19929 #if DB_VERSION_MAJOR > 1
19930         {
19931                 char *version;
19932                 int major, minor, patch;
19933
19934                 version = db_version( &major, &minor, &patch );
19935
19936                 if( major != DB_VERSION_MAJOR ||
19937                         minor < DB_VERSION_MINOR )
19938                 {
19939                         printf("Berkeley DB version mismatch\n"
19940                                 "\theader: %s\n\tlibrary: %s\n",
19941                                 DB_VERSION_STRING, version);
19942                         return 1;
19943                 }
19944         }
19945 #endif
19946
19947 #if DB_VERSION_MAJOR > 2
19948         db_env_create( NULL, 0 );
19949 #elif DB_VERSION_MAJOR > 1
19950         db_appexit( NULL );
19951 #else
19952         (void) dbopen( NULL, 0, 0, 0, NULL);
19953 #endif
19954
19955 ; return 0; }
19956 EOF
19957 if { (eval echo configure:19958: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19958   rm -rf conftest*
19959   ol_cv_db_db41=yes
19960 else
19961   echo "configure: failed program was:" >&5
19962   cat conftest.$ac_ext >&5
19963   rm -rf conftest*
19964   ol_cv_db_db41=no
19965 fi
19966 rm -f conftest*
19967
19968         LIBS="$ol_LIBS"
19969
19970 fi
19971
19972 echo "$ac_t""$ol_cv_db_db41" 1>&6
19973
19974         if test $ol_cv_db_db41 = yes ; then
19975                 ol_cv_lib_db=-ldb41
19976         fi
19977 fi
19978
19979 if test $ol_cv_lib_db = no ; then
19980         echo $ac_n "checking for Berkeley DB link (-ldb-41)""... $ac_c" 1>&6
19981 echo "configure:19982: checking for Berkeley DB link (-ldb-41)" >&5
19982 if eval "test \"\${ol_cv_db_db_41+set}\" = set"; then
19983   echo $ac_n "(cached) $ac_c" 1>&6
19984 else
19985   
19986         ol_DB_LIB=-ldb-41
19987         ol_LIBS=$LIBS
19988         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19989
19990         cat > conftest.$ac_ext <<EOF
19991 #line 19992 "configure"
19992 #include "confdefs.h"
19993
19994 #ifdef HAVE_DB_185_H
19995 # include <db_185.h>
19996 #else
19997 # include <db.h>
19998 #endif
19999
20000 #ifndef DB_VERSION_MAJOR
20001 # define DB_VERSION_MAJOR 1
20002 #endif
20003
20004 #ifndef NULL
20005 #define NULL ((void*)0)
20006 #endif
20007
20008 int main() {
20009
20010 #if DB_VERSION_MAJOR > 1
20011         {
20012                 char *version;
20013                 int major, minor, patch;
20014
20015                 version = db_version( &major, &minor, &patch );
20016
20017                 if( major != DB_VERSION_MAJOR ||
20018                         minor < DB_VERSION_MINOR )
20019                 {
20020                         printf("Berkeley DB version mismatch\n"
20021                                 "\theader: %s\n\tlibrary: %s\n",
20022                                 DB_VERSION_STRING, version);
20023                         return 1;
20024                 }
20025         }
20026 #endif
20027
20028 #if DB_VERSION_MAJOR > 2
20029         db_env_create( NULL, 0 );
20030 #elif DB_VERSION_MAJOR > 1
20031         db_appexit( NULL );
20032 #else
20033         (void) dbopen( NULL, 0, 0, 0, NULL);
20034 #endif
20035
20036 ; return 0; }
20037 EOF
20038 if { (eval echo configure:20039: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20039   rm -rf conftest*
20040   ol_cv_db_db_41=yes
20041 else
20042   echo "configure: failed program was:" >&5
20043   cat conftest.$ac_ext >&5
20044   rm -rf conftest*
20045   ol_cv_db_db_41=no
20046 fi
20047 rm -f conftest*
20048
20049         LIBS="$ol_LIBS"
20050
20051 fi
20052
20053 echo "$ac_t""$ol_cv_db_db_41" 1>&6
20054
20055         if test $ol_cv_db_db_41 = yes ; then
20056                 ol_cv_lib_db=-ldb-41
20057         fi
20058 fi
20059
20060 if test $ol_cv_lib_db = no ; then
20061         echo $ac_n "checking for Berkeley DB link (-ldb-4.1)""... $ac_c" 1>&6
20062 echo "configure:20063: checking for Berkeley DB link (-ldb-4.1)" >&5
20063 if eval "test \"\${ol_cv_db_db_4_dot_1+set}\" = set"; then
20064   echo $ac_n "(cached) $ac_c" 1>&6
20065 else
20066   
20067         ol_DB_LIB=-ldb-4.1
20068         ol_LIBS=$LIBS
20069         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
20070
20071         cat > conftest.$ac_ext <<EOF
20072 #line 20073 "configure"
20073 #include "confdefs.h"
20074
20075 #ifdef HAVE_DB_185_H
20076 # include <db_185.h>
20077 #else
20078 # include <db.h>
20079 #endif
20080
20081 #ifndef DB_VERSION_MAJOR
20082 # define DB_VERSION_MAJOR 1
20083 #endif
20084
20085 #ifndef NULL
20086 #define NULL ((void*)0)
20087 #endif
20088
20089 int main() {
20090
20091 #if DB_VERSION_MAJOR > 1
20092         {
20093                 char *version;
20094                 int major, minor, patch;
20095
20096                 version = db_version( &major, &minor, &patch );
20097
20098                 if( major != DB_VERSION_MAJOR ||
20099                         minor < DB_VERSION_MINOR )
20100                 {
20101                         printf("Berkeley DB version mismatch\n"
20102                                 "\theader: %s\n\tlibrary: %s\n",
20103                                 DB_VERSION_STRING, version);
20104                         return 1;
20105                 }
20106         }
20107 #endif
20108
20109 #if DB_VERSION_MAJOR > 2
20110         db_env_create( NULL, 0 );
20111 #elif DB_VERSION_MAJOR > 1
20112         db_appexit( NULL );
20113 #else
20114         (void) dbopen( NULL, 0, 0, 0, NULL);
20115 #endif
20116
20117 ; return 0; }
20118 EOF
20119 if { (eval echo configure:20120: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20120   rm -rf conftest*
20121   ol_cv_db_db_4_dot_1=yes
20122 else
20123   echo "configure: failed program was:" >&5
20124   cat conftest.$ac_ext >&5
20125   rm -rf conftest*
20126   ol_cv_db_db_4_dot_1=no
20127 fi
20128 rm -f conftest*
20129
20130         LIBS="$ol_LIBS"
20131
20132 fi
20133
20134 echo "$ac_t""$ol_cv_db_db_4_dot_1" 1>&6
20135
20136         if test $ol_cv_db_db_4_dot_1 = yes ; then
20137                 ol_cv_lib_db=-ldb-4.1
20138         fi
20139 fi
20140
20141 if test $ol_cv_lib_db = no ; then
20142         echo $ac_n "checking for Berkeley DB link (-ldb-4-1)""... $ac_c" 1>&6
20143 echo "configure:20144: checking for Berkeley DB link (-ldb-4-1)" >&5
20144 if eval "test \"\${ol_cv_db_db_4_1+set}\" = set"; then
20145   echo $ac_n "(cached) $ac_c" 1>&6
20146 else
20147   
20148         ol_DB_LIB=-ldb-4-1
20149         ol_LIBS=$LIBS
20150         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
20151
20152         cat > conftest.$ac_ext <<EOF
20153 #line 20154 "configure"
20154 #include "confdefs.h"
20155
20156 #ifdef HAVE_DB_185_H
20157 # include <db_185.h>
20158 #else
20159 # include <db.h>
20160 #endif
20161
20162 #ifndef DB_VERSION_MAJOR
20163 # define DB_VERSION_MAJOR 1
20164 #endif
20165
20166 #ifndef NULL
20167 #define NULL ((void*)0)
20168 #endif
20169
20170 int main() {
20171
20172 #if DB_VERSION_MAJOR > 1
20173         {
20174                 char *version;
20175                 int major, minor, patch;
20176
20177                 version = db_version( &major, &minor, &patch );
20178
20179                 if( major != DB_VERSION_MAJOR ||
20180                         minor < DB_VERSION_MINOR )
20181                 {
20182                         printf("Berkeley DB version mismatch\n"
20183                                 "\theader: %s\n\tlibrary: %s\n",
20184                                 DB_VERSION_STRING, version);
20185                         return 1;
20186                 }
20187         }
20188 #endif
20189
20190 #if DB_VERSION_MAJOR > 2
20191         db_env_create( NULL, 0 );
20192 #elif DB_VERSION_MAJOR > 1
20193         db_appexit( NULL );
20194 #else
20195         (void) dbopen( NULL, 0, 0, 0, NULL);
20196 #endif
20197
20198 ; return 0; }
20199 EOF
20200 if { (eval echo configure:20201: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20201   rm -rf conftest*
20202   ol_cv_db_db_4_1=yes
20203 else
20204   echo "configure: failed program was:" >&5
20205   cat conftest.$ac_ext >&5
20206   rm -rf conftest*
20207   ol_cv_db_db_4_1=no
20208 fi
20209 rm -f conftest*
20210
20211         LIBS="$ol_LIBS"
20212
20213 fi
20214
20215 echo "$ac_t""$ol_cv_db_db_4_1" 1>&6
20216
20217         if test $ol_cv_db_db_4_1 = yes ; then
20218                 ol_cv_lib_db=-ldb-4-1
20219         fi
20220 fi
20221
20222 if test $ol_cv_lib_db = no ; then
20223         echo $ac_n "checking for Berkeley DB link (-ldb3)""... $ac_c" 1>&6
20224 echo "configure:20225: checking for Berkeley DB link (-ldb3)" >&5
20225 if eval "test \"\${ol_cv_db_db3+set}\" = set"; then
20226   echo $ac_n "(cached) $ac_c" 1>&6
20227 else
20228   
20229         ol_DB_LIB=-ldb3
20230         ol_LIBS=$LIBS
20231         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
20232
20233         cat > conftest.$ac_ext <<EOF
20234 #line 20235 "configure"
20235 #include "confdefs.h"
20236
20237 #ifdef HAVE_DB_185_H
20238 # include <db_185.h>
20239 #else
20240 # include <db.h>
20241 #endif
20242
20243 #ifndef DB_VERSION_MAJOR
20244 # define DB_VERSION_MAJOR 1
20245 #endif
20246
20247 #ifndef NULL
20248 #define NULL ((void*)0)
20249 #endif
20250
20251 int main() {
20252
20253 #if DB_VERSION_MAJOR > 1
20254         {
20255                 char *version;
20256                 int major, minor, patch;
20257
20258                 version = db_version( &major, &minor, &patch );
20259
20260                 if( major != DB_VERSION_MAJOR ||
20261                         minor < DB_VERSION_MINOR )
20262                 {
20263                         printf("Berkeley DB version mismatch\n"
20264                                 "\theader: %s\n\tlibrary: %s\n",
20265                                 DB_VERSION_STRING, version);
20266                         return 1;
20267                 }
20268         }
20269 #endif
20270
20271 #if DB_VERSION_MAJOR > 2
20272         db_env_create( NULL, 0 );
20273 #elif DB_VERSION_MAJOR > 1
20274         db_appexit( NULL );
20275 #else
20276         (void) dbopen( NULL, 0, 0, 0, NULL);
20277 #endif
20278
20279 ; return 0; }
20280 EOF
20281 if { (eval echo configure:20282: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20282   rm -rf conftest*
20283   ol_cv_db_db3=yes
20284 else
20285   echo "configure: failed program was:" >&5
20286   cat conftest.$ac_ext >&5
20287   rm -rf conftest*
20288   ol_cv_db_db3=no
20289 fi
20290 rm -f conftest*
20291
20292         LIBS="$ol_LIBS"
20293
20294 fi
20295
20296 echo "$ac_t""$ol_cv_db_db3" 1>&6
20297
20298         if test $ol_cv_db_db3 = yes ; then
20299                 ol_cv_lib_db=-ldb3
20300         fi
20301 fi
20302
20303 if test $ol_cv_lib_db = no ; then
20304         echo $ac_n "checking for Berkeley DB link (-ldb-3)""... $ac_c" 1>&6
20305 echo "configure:20306: checking for Berkeley DB link (-ldb-3)" >&5
20306 if eval "test \"\${ol_cv_db_db_3+set}\" = set"; then
20307   echo $ac_n "(cached) $ac_c" 1>&6
20308 else
20309   
20310         ol_DB_LIB=-ldb-3
20311         ol_LIBS=$LIBS
20312         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
20313
20314         cat > conftest.$ac_ext <<EOF
20315 #line 20316 "configure"
20316 #include "confdefs.h"
20317
20318 #ifdef HAVE_DB_185_H
20319 # include <db_185.h>
20320 #else
20321 # include <db.h>
20322 #endif
20323
20324 #ifndef DB_VERSION_MAJOR
20325 # define DB_VERSION_MAJOR 1
20326 #endif
20327
20328 #ifndef NULL
20329 #define NULL ((void*)0)
20330 #endif
20331
20332 int main() {
20333
20334 #if DB_VERSION_MAJOR > 1
20335         {
20336                 char *version;
20337                 int major, minor, patch;
20338
20339                 version = db_version( &major, &minor, &patch );
20340
20341                 if( major != DB_VERSION_MAJOR ||
20342                         minor < DB_VERSION_MINOR )
20343                 {
20344                         printf("Berkeley DB version mismatch\n"
20345                                 "\theader: %s\n\tlibrary: %s\n",
20346                                 DB_VERSION_STRING, version);
20347                         return 1;
20348                 }
20349         }
20350 #endif
20351
20352 #if DB_VERSION_MAJOR > 2
20353         db_env_create( NULL, 0 );
20354 #elif DB_VERSION_MAJOR > 1
20355         db_appexit( NULL );
20356 #else
20357         (void) dbopen( NULL, 0, 0, 0, NULL);
20358 #endif
20359
20360 ; return 0; }
20361 EOF
20362 if { (eval echo configure:20363: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20363   rm -rf conftest*
20364   ol_cv_db_db_3=yes
20365 else
20366   echo "configure: failed program was:" >&5
20367   cat conftest.$ac_ext >&5
20368   rm -rf conftest*
20369   ol_cv_db_db_3=no
20370 fi
20371 rm -f conftest*
20372
20373         LIBS="$ol_LIBS"
20374
20375 fi
20376
20377 echo "$ac_t""$ol_cv_db_db_3" 1>&6
20378
20379         if test $ol_cv_db_db_3 = yes ; then
20380                 ol_cv_lib_db=-ldb-3
20381         fi
20382 fi
20383
20384 if test $ol_cv_lib_db = no ; then
20385         echo $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6
20386 echo "configure:20387: checking for Berkeley DB link (-ldb2)" >&5
20387 if eval "test \"\${ol_cv_db_db2+set}\" = set"; then
20388   echo $ac_n "(cached) $ac_c" 1>&6
20389 else
20390   
20391         ol_DB_LIB=-ldb2
20392         ol_LIBS=$LIBS
20393         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
20394
20395         cat > conftest.$ac_ext <<EOF
20396 #line 20397 "configure"
20397 #include "confdefs.h"
20398
20399 #ifdef HAVE_DB_185_H
20400 # include <db_185.h>
20401 #else
20402 # include <db.h>
20403 #endif
20404
20405 #ifndef DB_VERSION_MAJOR
20406 # define DB_VERSION_MAJOR 1
20407 #endif
20408
20409 #ifndef NULL
20410 #define NULL ((void*)0)
20411 #endif
20412
20413 int main() {
20414
20415 #if DB_VERSION_MAJOR > 1
20416         {
20417                 char *version;
20418                 int major, minor, patch;
20419
20420                 version = db_version( &major, &minor, &patch );
20421
20422                 if( major != DB_VERSION_MAJOR ||
20423                         minor < DB_VERSION_MINOR )
20424                 {
20425                         printf("Berkeley DB version mismatch\n"
20426                                 "\theader: %s\n\tlibrary: %s\n",
20427                                 DB_VERSION_STRING, version);
20428                         return 1;
20429                 }
20430         }
20431 #endif
20432
20433 #if DB_VERSION_MAJOR > 2
20434         db_env_create( NULL, 0 );
20435 #elif DB_VERSION_MAJOR > 1
20436         db_appexit( NULL );
20437 #else
20438         (void) dbopen( NULL, 0, 0, 0, NULL);
20439 #endif
20440
20441 ; return 0; }
20442 EOF
20443 if { (eval echo configure:20444: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20444   rm -rf conftest*
20445   ol_cv_db_db2=yes
20446 else
20447   echo "configure: failed program was:" >&5
20448   cat conftest.$ac_ext >&5
20449   rm -rf conftest*
20450   ol_cv_db_db2=no
20451 fi
20452 rm -f conftest*
20453
20454         LIBS="$ol_LIBS"
20455
20456 fi
20457
20458 echo "$ac_t""$ol_cv_db_db2" 1>&6
20459
20460         if test $ol_cv_db_db2 = yes ; then
20461                 ol_cv_lib_db=-ldb2
20462         fi
20463 fi
20464
20465 if test $ol_cv_lib_db = no ; then
20466         echo $ac_n "checking for Berkeley DB link (-ldb-2)""... $ac_c" 1>&6
20467 echo "configure:20468: checking for Berkeley DB link (-ldb-2)" >&5
20468 if eval "test \"\${ol_cv_db_db_2+set}\" = set"; then
20469   echo $ac_n "(cached) $ac_c" 1>&6
20470 else
20471   
20472         ol_DB_LIB=-ldb-2
20473         ol_LIBS=$LIBS
20474         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
20475
20476         cat > conftest.$ac_ext <<EOF
20477 #line 20478 "configure"
20478 #include "confdefs.h"
20479
20480 #ifdef HAVE_DB_185_H
20481 # include <db_185.h>
20482 #else
20483 # include <db.h>
20484 #endif
20485
20486 #ifndef DB_VERSION_MAJOR
20487 # define DB_VERSION_MAJOR 1
20488 #endif
20489
20490 #ifndef NULL
20491 #define NULL ((void*)0)
20492 #endif
20493
20494 int main() {
20495
20496 #if DB_VERSION_MAJOR > 1
20497         {
20498                 char *version;
20499                 int major, minor, patch;
20500
20501                 version = db_version( &major, &minor, &patch );
20502
20503                 if( major != DB_VERSION_MAJOR ||
20504                         minor < DB_VERSION_MINOR )
20505                 {
20506                         printf("Berkeley DB version mismatch\n"
20507                                 "\theader: %s\n\tlibrary: %s\n",
20508                                 DB_VERSION_STRING, version);
20509                         return 1;
20510                 }
20511         }
20512 #endif
20513
20514 #if DB_VERSION_MAJOR > 2
20515         db_env_create( NULL, 0 );
20516 #elif DB_VERSION_MAJOR > 1
20517         db_appexit( NULL );
20518 #else
20519         (void) dbopen( NULL, 0, 0, 0, NULL);
20520 #endif
20521
20522 ; return 0; }
20523 EOF
20524 if { (eval echo configure:20525: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20525   rm -rf conftest*
20526   ol_cv_db_db_2=yes
20527 else
20528   echo "configure: failed program was:" >&5
20529   cat conftest.$ac_ext >&5
20530   rm -rf conftest*
20531   ol_cv_db_db_2=no
20532 fi
20533 rm -f conftest*
20534
20535         LIBS="$ol_LIBS"
20536
20537 fi
20538
20539 echo "$ac_t""$ol_cv_db_db_2" 1>&6
20540
20541         if test $ol_cv_db_db_2 = yes ; then
20542                 ol_cv_lib_db=-ldb-2
20543         fi
20544 fi
20545
20546 if test $ol_cv_lib_db = no ; then
20547         echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6
20548 echo "configure:20549: checking for Berkeley DB link (-ldb1)" >&5
20549 if eval "test \"\${ol_cv_db_db1+set}\" = set"; then
20550   echo $ac_n "(cached) $ac_c" 1>&6
20551 else
20552   
20553         ol_DB_LIB=-ldb1
20554         ol_LIBS=$LIBS
20555         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
20556
20557         cat > conftest.$ac_ext <<EOF
20558 #line 20559 "configure"
20559 #include "confdefs.h"
20560
20561 #ifdef HAVE_DB_185_H
20562 # include <db_185.h>
20563 #else
20564 # include <db.h>
20565 #endif
20566
20567 #ifndef DB_VERSION_MAJOR
20568 # define DB_VERSION_MAJOR 1
20569 #endif
20570
20571 #ifndef NULL
20572 #define NULL ((void*)0)
20573 #endif
20574
20575 int main() {
20576
20577 #if DB_VERSION_MAJOR > 1
20578         {
20579                 char *version;
20580                 int major, minor, patch;
20581
20582                 version = db_version( &major, &minor, &patch );
20583
20584                 if( major != DB_VERSION_MAJOR ||
20585                         minor < DB_VERSION_MINOR )
20586                 {
20587                         printf("Berkeley DB version mismatch\n"
20588                                 "\theader: %s\n\tlibrary: %s\n",
20589                                 DB_VERSION_STRING, version);
20590                         return 1;
20591                 }
20592         }
20593 #endif
20594
20595 #if DB_VERSION_MAJOR > 2
20596         db_env_create( NULL, 0 );
20597 #elif DB_VERSION_MAJOR > 1
20598         db_appexit( NULL );
20599 #else
20600         (void) dbopen( NULL, 0, 0, 0, NULL);
20601 #endif
20602
20603 ; return 0; }
20604 EOF
20605 if { (eval echo configure:20606: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20606   rm -rf conftest*
20607   ol_cv_db_db1=yes
20608 else
20609   echo "configure: failed program was:" >&5
20610   cat conftest.$ac_ext >&5
20611   rm -rf conftest*
20612   ol_cv_db_db1=no
20613 fi
20614 rm -f conftest*
20615
20616         LIBS="$ol_LIBS"
20617
20618 fi
20619
20620 echo "$ac_t""$ol_cv_db_db1" 1>&6
20621
20622         if test $ol_cv_db_db1 = yes ; then
20623                 ol_cv_lib_db=-ldb1
20624         fi
20625 fi
20626
20627 if test $ol_cv_lib_db = no ; then
20628         echo $ac_n "checking for Berkeley DB link (-ldb-1)""... $ac_c" 1>&6
20629 echo "configure:20630: checking for Berkeley DB link (-ldb-1)" >&5
20630 if eval "test \"\${ol_cv_db_db_1+set}\" = set"; then
20631   echo $ac_n "(cached) $ac_c" 1>&6
20632 else
20633   
20634         ol_DB_LIB=-ldb-1
20635         ol_LIBS=$LIBS
20636         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
20637
20638         cat > conftest.$ac_ext <<EOF
20639 #line 20640 "configure"
20640 #include "confdefs.h"
20641
20642 #ifdef HAVE_DB_185_H
20643 # include <db_185.h>
20644 #else
20645 # include <db.h>
20646 #endif
20647
20648 #ifndef DB_VERSION_MAJOR
20649 # define DB_VERSION_MAJOR 1
20650 #endif
20651
20652 #ifndef NULL
20653 #define NULL ((void*)0)
20654 #endif
20655
20656 int main() {
20657
20658 #if DB_VERSION_MAJOR > 1
20659         {
20660                 char *version;
20661                 int major, minor, patch;
20662
20663                 version = db_version( &major, &minor, &patch );
20664
20665                 if( major != DB_VERSION_MAJOR ||
20666                         minor < DB_VERSION_MINOR )
20667                 {
20668                         printf("Berkeley DB version mismatch\n"
20669                                 "\theader: %s\n\tlibrary: %s\n",
20670                                 DB_VERSION_STRING, version);
20671                         return 1;
20672                 }
20673         }
20674 #endif
20675
20676 #if DB_VERSION_MAJOR > 2
20677         db_env_create( NULL, 0 );
20678 #elif DB_VERSION_MAJOR > 1
20679         db_appexit( NULL );
20680 #else
20681         (void) dbopen( NULL, 0, 0, 0, NULL);
20682 #endif
20683
20684 ; return 0; }
20685 EOF
20686 if { (eval echo configure:20687: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20687   rm -rf conftest*
20688   ol_cv_db_db_1=yes
20689 else
20690   echo "configure: failed program was:" >&5
20691   cat conftest.$ac_ext >&5
20692   rm -rf conftest*
20693   ol_cv_db_db_1=no
20694 fi
20695 rm -f conftest*
20696
20697         LIBS="$ol_LIBS"
20698
20699 fi
20700
20701 echo "$ac_t""$ol_cv_db_db_1" 1>&6
20702
20703         if test $ol_cv_db_db_1 = yes ; then
20704                 ol_cv_lib_db=-ldb-1
20705         fi
20706 fi
20707
20708
20709         if test "$ol_cv_lib_db" != no ; then
20710                 ol_cv_berkeley_db=yes
20711                 echo $ac_n "checking for Berkeley DB version match""... $ac_c" 1>&6
20712 echo "configure:20713: checking for Berkeley DB version match" >&5
20713 if eval "test \"\${ol_cv_berkeley_db_version+set}\" = set"; then
20714   echo $ac_n "(cached) $ac_c" 1>&6
20715 else
20716   
20717         ol_LIBS="$LIBS"
20718         LIBS="$LTHREAD_LIBS $LIBS"
20719         if test $ol_cv_lib_db != yes ; then
20720                 LIBS="$ol_cv_lib_db $LIBS"
20721         fi
20722
20723         if test "$cross_compiling" = yes; then
20724   ol_cv_berkeley_db_version=cross
20725 else
20726   cat > conftest.$ac_ext <<EOF
20727 #line 20728 "configure"
20728 #include "confdefs.h"
20729
20730 #ifdef HAVE_DB_185_H
20731         choke me;
20732 #else
20733 #include <db.h>
20734 #endif
20735 #ifndef DB_VERSION_MAJOR
20736 # define DB_VERSION_MAJOR 1
20737 #endif
20738 #ifndef NULL
20739 #define NULL ((void *)0)
20740 #endif
20741 main()
20742 {
20743 #if DB_VERSION_MAJOR > 1
20744         char *version;
20745         int major, minor, patch;
20746
20747         version = db_version( &major, &minor, &patch );
20748
20749         if( major != DB_VERSION_MAJOR ||
20750                 minor != DB_VERSION_MINOR ||
20751                 patch != DB_VERSION_PATCH )
20752         {
20753                 printf("Berkeley DB version mismatch\n"
20754                         "\theader: %s\n\tlibrary: %s\n",
20755                         DB_VERSION_STRING, version);
20756                 return 1;
20757         }
20758 #endif
20759
20760         return 0;
20761 }
20762 EOF
20763 if { (eval echo configure:20764: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
20764 then
20765   ol_cv_berkeley_db_version=yes
20766 else
20767   echo "configure: failed program was:" >&5
20768   cat conftest.$ac_ext >&5
20769   rm -fr conftest*
20770   ol_cv_berkeley_db_version=no
20771 fi
20772 rm -fr conftest*
20773 fi
20774
20775
20776         LIBS="$ol_LIBS"
20777
20778 fi
20779
20780 echo "$ac_t""$ol_cv_berkeley_db_version" 1>&6
20781
20782         if test $ol_cv_berkeley_db_version = no ; then
20783                 { echo "configure: error: Berkeley DB version mismatch" 1>&2; exit 1; }
20784         fi
20785
20786                 echo $ac_n "checking for Berkeley DB thread support""... $ac_c" 1>&6
20787 echo "configure:20788: checking for Berkeley DB thread support" >&5
20788 if eval "test \"\${ol_cv_berkeley_db_thread+set}\" = set"; then
20789   echo $ac_n "(cached) $ac_c" 1>&6
20790 else
20791   
20792         ol_LIBS="$LIBS"
20793         LIBS="$LTHREAD_LIBS $LIBS"
20794         if test $ol_cv_lib_db != yes ; then
20795                 LIBS="$ol_cv_lib_db $LIBS"
20796         fi
20797
20798         if test "$cross_compiling" = yes; then
20799   ol_cv_berkeley_db_thread=cross
20800 else
20801   cat > conftest.$ac_ext <<EOF
20802 #line 20803 "configure"
20803 #include "confdefs.h"
20804
20805 #ifdef HAVE_DB_185_H
20806         choke me;
20807 #else
20808 #include <db.h>
20809 #endif
20810 #ifndef NULL
20811 #define NULL ((void *)0)
20812 #endif
20813 main()
20814 {
20815         int rc;
20816         u_int32_t flags = DB_CREATE |
20817 #ifdef DB_PRIVATE
20818                 DB_PRIVATE |
20819 #endif
20820                 DB_THREAD;
20821
20822 #if DB_VERSION_MAJOR > 2
20823         DB_ENV *env = NULL;
20824
20825         rc = db_env_create( &env, 0 );
20826
20827         flags |= DB_INIT_MPOOL;
20828 #ifdef DB_MPOOL_PRIVATE
20829         flags |= DB_MPOOL_PRIVATE;
20830 #endif
20831
20832         if( rc ) {
20833                 printf("BerkeleyDB: %s\n", db_strerror(rc) );
20834                 return rc;
20835         }
20836
20837 #if (DB_VERSION_MAJOR > 3) || (DB_VERSION_MINOR >= 1)
20838         rc = env->open( env, NULL, flags, 0 );
20839 #else
20840         rc = env->open( env, NULL, NULL, flags, 0 );
20841 #endif
20842
20843         if ( rc == 0 ) {
20844                 rc = env->close( env, 0 );
20845         }
20846
20847         if( rc ) {
20848                 printf("BerkeleyDB: %s\n", db_strerror(rc) );
20849                 return rc;
20850         }
20851
20852 #else
20853         DB_ENV env;
20854         memset( &env, '\0', sizeof(env) );
20855
20856         rc = db_appinit( NULL, NULL, &env, flags );
20857
20858         if( rc == 0 ) {
20859                 db_appexit( &env );
20860         }
20861
20862         unlink("__db_mpool.share");
20863         unlink("__db_lock.share");
20864 #endif
20865
20866         return rc;
20867 }
20868 EOF
20869 if { (eval echo configure:20870: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
20870 then
20871   ol_cv_berkeley_db_thread=yes
20872 else
20873   echo "configure: failed program was:" >&5
20874   cat conftest.$ac_ext >&5
20875   rm -fr conftest*
20876   ol_cv_berkeley_db_thread=no
20877 fi
20878 rm -fr conftest*
20879 fi
20880
20881
20882         LIBS="$ol_LIBS"
20883
20884 fi
20885
20886 echo "$ac_t""$ol_cv_berkeley_db_thread" 1>&6
20887
20888         if test $ol_cv_berkeley_db_thread != no ; then
20889                 cat >> confdefs.h <<\EOF
20890 #define HAVE_BERKELEY_DB_THREAD 1
20891 EOF
20892
20893         fi
20894
20895         fi
20896 fi
20897
20898         fi
20899
20900         if test $ol_cv_berkeley_db != no ; then
20901                 cat >> confdefs.h <<\EOF
20902 #define HAVE_BERKELEY_DB 1
20903 EOF
20904
20905
20906                 ol_link_ldbm=berkeley
20907                 ol_with_ldbm_api=berkeley
20908
20909                 if test $ol_with_ldbm_type = hash ; then
20910                         cat >> confdefs.h <<\EOF
20911 #define LDBM_USE_DBHASH 1
20912 EOF
20913
20914                 else
20915                         cat >> confdefs.h <<\EOF
20916 #define LDBM_USE_DBBTREE 1
20917 EOF
20918
20919                 fi
20920
20921                                                 if test $ol_cv_lib_db != yes ; then
20922                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db"
20923                 fi
20924         fi
20925 fi
20926
20927 if test $ol_enable_bdb != no -o $ol_enable_hdb != no; then
20928         if test $ol_link_ldbm != berkeley ; then
20929                 { echo "configure: error: BDB/HDB: BerkeleyDB not available" 1>&2; exit 1; }
20930         else
20931                 echo $ac_n "checking Berkeley DB version for BDB backend""... $ac_c" 1>&6
20932 echo "configure:20933: checking Berkeley DB version for BDB backend" >&5
20933 if eval "test \"\${ol_cv_bdb_compat+set}\" = set"; then
20934   echo $ac_n "(cached) $ac_c" 1>&6
20935 else
20936   
20937         cat > conftest.$ac_ext <<EOF
20938 #line 20939 "configure"
20939 #include "confdefs.h"
20940
20941 #include <db.h>
20942
20943  /* this check could be improved */
20944 #ifndef DB_VERSION_MAJOR
20945 #       define DB_VERSION_MAJOR 1
20946 #endif
20947 #ifndef DB_VERSION_MINOR
20948 #       define DB_VERSION_MINOR 0
20949 #endif
20950
20951 /* require 4.2 or later */
20952 #if (DB_VERSION_MAJOR >= 4) && (DB_VERSION_MINOR >= 2)
20953         __db_version_compat
20954 #endif
20955         
20956 EOF
20957 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20958   egrep "__db_version_compat" >/dev/null 2>&1; then
20959   rm -rf conftest*
20960   ol_cv_bdb_compat=yes
20961 else
20962   rm -rf conftest*
20963   ol_cv_bdb_compat=no
20964 fi
20965 rm -f conftest*
20966
20967 fi
20968
20969 echo "$ac_t""$ol_cv_bdb_compat" 1>&6
20970
20971
20972                 if test $ol_cv_bdb_compat != yes ; then
20973                         { echo "configure: error: BDB/HDB: BerkeleyDB version incompatible" 1>&2; exit 1; }
20974                 fi
20975         fi
20976 fi
20977
20978 if test $ol_link_ldbm = no -a $ol_with_ldbm_type = btree ; then
20979         echo "configure: warning: Could not find LDBM with BTREE support" 1>&2
20980         ol_with_ldbm_api=none
20981 fi
20982
20983 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = mdbm ; then
20984         echo $ac_n "checking for MDBM library""... $ac_c" 1>&6
20985 echo "configure:20986: checking for MDBM library" >&5
20986 if eval "test \"\${ol_cv_lib_mdbm+set}\" = set"; then
20987   echo $ac_n "(cached) $ac_c" 1>&6
20988 else
20989         ol_LIBS="$LIBS"
20990         echo $ac_n "checking for mdbm_set_chain""... $ac_c" 1>&6
20991 echo "configure:20992: checking for mdbm_set_chain" >&5
20992 if eval "test \"\${ac_cv_func_mdbm_set_chain+set}\" = set"; then
20993   echo $ac_n "(cached) $ac_c" 1>&6
20994 else
20995   cat > conftest.$ac_ext <<EOF
20996 #line 20997 "configure"
20997 #include "confdefs.h"
20998 /* System header to define __stub macros and hopefully few prototypes,
20999     which can conflict with char mdbm_set_chain(); below.  */
21000 #include <assert.h>
21001 /* Override any gcc2 internal prototype to avoid an error.  */
21002 /* We use char because int might match the return type of a gcc2
21003     builtin and then its argument prototype would still apply.  */
21004 char mdbm_set_chain();
21005 char (*f)();
21006
21007 int main() {
21008
21009 /* The GNU C library defines this for functions which it implements
21010     to always fail with ENOSYS.  Some functions are actually named
21011     something starting with __ and the normal name is an alias.  */
21012 #if defined (__stub_mdbm_set_chain) || defined (__stub___mdbm_set_chain)
21013 choke me
21014 #else
21015 f = mdbm_set_chain;
21016 #endif
21017
21018 ; return 0; }
21019 EOF
21020 if { (eval echo configure:21021: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21021   rm -rf conftest*
21022   eval "ac_cv_func_mdbm_set_chain=yes"
21023 else
21024   echo "configure: failed program was:" >&5
21025   cat conftest.$ac_ext >&5
21026   rm -rf conftest*
21027   eval "ac_cv_func_mdbm_set_chain=no"
21028 fi
21029 rm -f conftest*
21030 fi
21031
21032 if eval "test \"`echo '$ac_cv_func_'mdbm_set_chain`\" = yes"; then
21033   echo "$ac_t""yes" 1>&6
21034   ol_cv_lib_mdbm=yes
21035 else
21036   echo "$ac_t""no" 1>&6
21037
21038                 echo $ac_n "checking for mdbm_set_chain in -lmdbm""... $ac_c" 1>&6
21039 echo "configure:21040: checking for mdbm_set_chain in -lmdbm" >&5
21040 ac_lib_var=`echo mdbm'_'mdbm_set_chain | sed 'y%./+-:%__p__%'`
21041 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
21042   echo $ac_n "(cached) $ac_c" 1>&6
21043 else
21044   ac_save_LIBS="$LIBS"
21045 LIBS="-lmdbm  $LIBS"
21046 cat > conftest.$ac_ext <<EOF
21047 #line 21048 "configure"
21048 #include "confdefs.h"
21049 /* Override any gcc2 internal prototype to avoid an error.  */
21050 /* We use char because int might match the return type of a gcc2
21051     builtin and then its argument prototype would still apply.  */
21052 char mdbm_set_chain();
21053
21054 int main() {
21055 mdbm_set_chain()
21056 ; return 0; }
21057 EOF
21058 if { (eval echo configure:21059: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21059   rm -rf conftest*
21060   eval "ac_cv_lib_$ac_lib_var=yes"
21061 else
21062   echo "configure: failed program was:" >&5
21063   cat conftest.$ac_ext >&5
21064   rm -rf conftest*
21065   eval "ac_cv_lib_$ac_lib_var=no"
21066 fi
21067 rm -f conftest*
21068 LIBS="$ac_save_LIBS"
21069
21070 fi
21071 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
21072   echo "$ac_t""yes" 1>&6
21073   ol_cv_lib_mdbm=-lmdbm
21074 else
21075   echo "$ac_t""no" 1>&6
21076 ol_cv_lib_mdbm=no
21077 fi
21078
21079         
21080 fi
21081
21082         LIBS="$ol_LIBS"
21083
21084 fi
21085
21086 echo "$ac_t""$ol_cv_lib_mdbm" 1>&6
21087
21088
21089  for ac_hdr in mdbm.h
21090 do
21091 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
21092 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
21093 echo "configure:21094: checking for $ac_hdr" >&5
21094 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
21095   echo $ac_n "(cached) $ac_c" 1>&6
21096 else
21097   cat > conftest.$ac_ext <<EOF
21098 #line 21099 "configure"
21099 #include "confdefs.h"
21100 #include <$ac_hdr>
21101 EOF
21102 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
21103 { (eval echo configure:21104: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
21104 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
21105 if test -z "$ac_err"; then
21106   rm -rf conftest*
21107   eval "ac_cv_header_$ac_safe=yes"
21108 else
21109   echo "$ac_err" >&5
21110   echo "configure: failed program was:" >&5
21111   cat conftest.$ac_ext >&5
21112   rm -rf conftest*
21113   eval "ac_cv_header_$ac_safe=no"
21114 fi
21115 rm -f conftest*
21116 fi
21117 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
21118   echo "$ac_t""yes" 1>&6
21119     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
21120   cat >> confdefs.h <<EOF
21121 #define $ac_tr_hdr 1
21122 EOF
21123  
21124 else
21125   echo "$ac_t""no" 1>&6
21126 fi
21127 done
21128
21129  echo $ac_n "checking for db""... $ac_c" 1>&6
21130 echo "configure:21131: checking for db" >&5
21131 if eval "test \"\${ol_cv_mdbm+set}\" = set"; then
21132   echo $ac_n "(cached) $ac_c" 1>&6
21133 else
21134   
21135         if test $ol_cv_lib_mdbm = no -o $ac_cv_header_mdbm_h = no ; then
21136                 ol_cv_mdbm=no
21137         else
21138                 ol_cv_mdbm=yes
21139         fi
21140
21141 fi
21142
21143 echo "$ac_t""$ol_cv_mdbm" 1>&6
21144  if test $ol_cv_mdbm = yes ; then
21145         cat >> confdefs.h <<\EOF
21146 #define HAVE_MDBM 1
21147 EOF
21148
21149  fi
21150
21151
21152         if test $ol_cv_mdbm = yes ; then
21153                 ol_link_ldbm=mdbm
21154                 ol_with_ldbm_api=mdbm
21155                 if test $ol_cv_lib_mdbm != yes ; then
21156                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_mdbm"
21157                 fi
21158         fi
21159 fi
21160
21161 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = gdbm ; then
21162         echo $ac_n "checking for GDBM library""... $ac_c" 1>&6
21163 echo "configure:21164: checking for GDBM library" >&5
21164 if eval "test \"\${ol_cv_lib_gdbm+set}\" = set"; then
21165   echo $ac_n "(cached) $ac_c" 1>&6
21166 else
21167         ol_LIBS="$LIBS"
21168         echo $ac_n "checking for gdbm_open""... $ac_c" 1>&6
21169 echo "configure:21170: checking for gdbm_open" >&5
21170 if eval "test \"\${ac_cv_func_gdbm_open+set}\" = set"; then
21171   echo $ac_n "(cached) $ac_c" 1>&6
21172 else
21173   cat > conftest.$ac_ext <<EOF
21174 #line 21175 "configure"
21175 #include "confdefs.h"
21176 /* System header to define __stub macros and hopefully few prototypes,
21177     which can conflict with char gdbm_open(); below.  */
21178 #include <assert.h>
21179 /* Override any gcc2 internal prototype to avoid an error.  */
21180 /* We use char because int might match the return type of a gcc2
21181     builtin and then its argument prototype would still apply.  */
21182 char gdbm_open();
21183 char (*f)();
21184
21185 int main() {
21186
21187 /* The GNU C library defines this for functions which it implements
21188     to always fail with ENOSYS.  Some functions are actually named
21189     something starting with __ and the normal name is an alias.  */
21190 #if defined (__stub_gdbm_open) || defined (__stub___gdbm_open)
21191 choke me
21192 #else
21193 f = gdbm_open;
21194 #endif
21195
21196 ; return 0; }
21197 EOF
21198 if { (eval echo configure:21199: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21199   rm -rf conftest*
21200   eval "ac_cv_func_gdbm_open=yes"
21201 else
21202   echo "configure: failed program was:" >&5
21203   cat conftest.$ac_ext >&5
21204   rm -rf conftest*
21205   eval "ac_cv_func_gdbm_open=no"
21206 fi
21207 rm -f conftest*
21208 fi
21209
21210 if eval "test \"`echo '$ac_cv_func_'gdbm_open`\" = yes"; then
21211   echo "$ac_t""yes" 1>&6
21212   ol_cv_lib_gdbm=yes
21213 else
21214   echo "$ac_t""no" 1>&6
21215
21216                 echo $ac_n "checking for gdbm_open in -lgdbm""... $ac_c" 1>&6
21217 echo "configure:21218: checking for gdbm_open in -lgdbm" >&5
21218 ac_lib_var=`echo gdbm'_'gdbm_open | sed 'y%./+-:%__p__%'`
21219 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
21220   echo $ac_n "(cached) $ac_c" 1>&6
21221 else
21222   ac_save_LIBS="$LIBS"
21223 LIBS="-lgdbm  $LIBS"
21224 cat > conftest.$ac_ext <<EOF
21225 #line 21226 "configure"
21226 #include "confdefs.h"
21227 /* Override any gcc2 internal prototype to avoid an error.  */
21228 /* We use char because int might match the return type of a gcc2
21229     builtin and then its argument prototype would still apply.  */
21230 char gdbm_open();
21231
21232 int main() {
21233 gdbm_open()
21234 ; return 0; }
21235 EOF
21236 if { (eval echo configure:21237: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21237   rm -rf conftest*
21238   eval "ac_cv_lib_$ac_lib_var=yes"
21239 else
21240   echo "configure: failed program was:" >&5
21241   cat conftest.$ac_ext >&5
21242   rm -rf conftest*
21243   eval "ac_cv_lib_$ac_lib_var=no"
21244 fi
21245 rm -f conftest*
21246 LIBS="$ac_save_LIBS"
21247
21248 fi
21249 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
21250   echo "$ac_t""yes" 1>&6
21251   ol_cv_lib_gdbm=-lgdbm
21252 else
21253   echo "$ac_t""no" 1>&6
21254 ol_cv_lib_gdbm=no
21255 fi
21256
21257         
21258 fi
21259
21260         LIBS="$ol_LIBS"
21261
21262 fi
21263
21264 echo "$ac_t""$ol_cv_lib_gdbm" 1>&6
21265
21266
21267  for ac_hdr in gdbm.h
21268 do
21269 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
21270 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
21271 echo "configure:21272: checking for $ac_hdr" >&5
21272 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
21273   echo $ac_n "(cached) $ac_c" 1>&6
21274 else
21275   cat > conftest.$ac_ext <<EOF
21276 #line 21277 "configure"
21277 #include "confdefs.h"
21278 #include <$ac_hdr>
21279 EOF
21280 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
21281 { (eval echo configure:21282: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
21282 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
21283 if test -z "$ac_err"; then
21284   rm -rf conftest*
21285   eval "ac_cv_header_$ac_safe=yes"
21286 else
21287   echo "$ac_err" >&5
21288   echo "configure: failed program was:" >&5
21289   cat conftest.$ac_ext >&5
21290   rm -rf conftest*
21291   eval "ac_cv_header_$ac_safe=no"
21292 fi
21293 rm -f conftest*
21294 fi
21295 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
21296   echo "$ac_t""yes" 1>&6
21297     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
21298   cat >> confdefs.h <<EOF
21299 #define $ac_tr_hdr 1
21300 EOF
21301  
21302 else
21303   echo "$ac_t""no" 1>&6
21304 fi
21305 done
21306
21307  echo $ac_n "checking for db""... $ac_c" 1>&6
21308 echo "configure:21309: checking for db" >&5
21309 if eval "test \"\${ol_cv_gdbm+set}\" = set"; then
21310   echo $ac_n "(cached) $ac_c" 1>&6
21311 else
21312   
21313         if test $ol_cv_lib_gdbm = no -o $ac_cv_header_gdbm_h = no ; then
21314                 ol_cv_gdbm=no
21315         else
21316                 ol_cv_gdbm=yes
21317         fi
21318
21319 fi
21320
21321 echo "$ac_t""$ol_cv_gdbm" 1>&6
21322  if test $ol_cv_gdbm = yes ; then
21323         cat >> confdefs.h <<\EOF
21324 #define HAVE_GDBM 1
21325 EOF
21326
21327  fi
21328
21329
21330         if test $ol_cv_gdbm = yes ; then
21331                 ol_link_ldbm=gdbm
21332                 ol_with_ldbm_api=gdbm
21333
21334                 if test $ol_cv_lib_gdbm != yes ; then
21335                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_gdbm"
21336                 fi
21337         fi
21338 fi
21339
21340 if test $ol_with_ldbm_api = ndbm ; then
21341         echo $ac_n "checking for NDBM library""... $ac_c" 1>&6
21342 echo "configure:21343: checking for NDBM library" >&5
21343 if eval "test \"\${ol_cv_lib_ndbm+set}\" = set"; then
21344   echo $ac_n "(cached) $ac_c" 1>&6
21345 else
21346         ol_LIBS="$LIBS"
21347         echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
21348 echo "configure:21349: checking for dbm_open" >&5
21349 if eval "test \"\${ac_cv_func_dbm_open+set}\" = set"; then
21350   echo $ac_n "(cached) $ac_c" 1>&6
21351 else
21352   cat > conftest.$ac_ext <<EOF
21353 #line 21354 "configure"
21354 #include "confdefs.h"
21355 /* System header to define __stub macros and hopefully few prototypes,
21356     which can conflict with char dbm_open(); below.  */
21357 #include <assert.h>
21358 /* Override any gcc2 internal prototype to avoid an error.  */
21359 /* We use char because int might match the return type of a gcc2
21360     builtin and then its argument prototype would still apply.  */
21361 char dbm_open();
21362 char (*f)();
21363
21364 int main() {
21365
21366 /* The GNU C library defines this for functions which it implements
21367     to always fail with ENOSYS.  Some functions are actually named
21368     something starting with __ and the normal name is an alias.  */
21369 #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
21370 choke me
21371 #else
21372 f = dbm_open;
21373 #endif
21374
21375 ; return 0; }
21376 EOF
21377 if { (eval echo configure:21378: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21378   rm -rf conftest*
21379   eval "ac_cv_func_dbm_open=yes"
21380 else
21381   echo "configure: failed program was:" >&5
21382   cat conftest.$ac_ext >&5
21383   rm -rf conftest*
21384   eval "ac_cv_func_dbm_open=no"
21385 fi
21386 rm -f conftest*
21387 fi
21388
21389 if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then
21390   echo "$ac_t""yes" 1>&6
21391   ol_cv_lib_ndbm=yes
21392 else
21393   echo "$ac_t""no" 1>&6
21394
21395                 echo $ac_n "checking for dbm_open in -lndbm""... $ac_c" 1>&6
21396 echo "configure:21397: checking for dbm_open in -lndbm" >&5
21397 ac_lib_var=`echo ndbm'_'dbm_open | sed 'y%./+-:%__p__%'`
21398 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
21399   echo $ac_n "(cached) $ac_c" 1>&6
21400 else
21401   ac_save_LIBS="$LIBS"
21402 LIBS="-lndbm  $LIBS"
21403 cat > conftest.$ac_ext <<EOF
21404 #line 21405 "configure"
21405 #include "confdefs.h"
21406 /* Override any gcc2 internal prototype to avoid an error.  */
21407 /* We use char because int might match the return type of a gcc2
21408     builtin and then its argument prototype would still apply.  */
21409 char dbm_open();
21410
21411 int main() {
21412 dbm_open()
21413 ; return 0; }
21414 EOF
21415 if { (eval echo configure:21416: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21416   rm -rf conftest*
21417   eval "ac_cv_lib_$ac_lib_var=yes"
21418 else
21419   echo "configure: failed program was:" >&5
21420   cat conftest.$ac_ext >&5
21421   rm -rf conftest*
21422   eval "ac_cv_lib_$ac_lib_var=no"
21423 fi
21424 rm -f conftest*
21425 LIBS="$ac_save_LIBS"
21426
21427 fi
21428 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
21429   echo "$ac_t""yes" 1>&6
21430   ol_cv_lib_ndbm=-lndbm
21431 else
21432   echo "$ac_t""no" 1>&6
21433
21434                         echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
21435 echo "configure:21436: checking for dbm_open in -ldbm" >&5
21436 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-:%__p__%'`
21437 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
21438   echo $ac_n "(cached) $ac_c" 1>&6
21439 else
21440   ac_save_LIBS="$LIBS"
21441 LIBS="-ldbm  $LIBS"
21442 cat > conftest.$ac_ext <<EOF
21443 #line 21444 "configure"
21444 #include "confdefs.h"
21445 /* Override any gcc2 internal prototype to avoid an error.  */
21446 /* We use char because int might match the return type of a gcc2
21447     builtin and then its argument prototype would still apply.  */
21448 char dbm_open();
21449
21450 int main() {
21451 dbm_open()
21452 ; return 0; }
21453 EOF
21454 if { (eval echo configure:21455: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21455   rm -rf conftest*
21456   eval "ac_cv_lib_$ac_lib_var=yes"
21457 else
21458   echo "configure: failed program was:" >&5
21459   cat conftest.$ac_ext >&5
21460   rm -rf conftest*
21461   eval "ac_cv_lib_$ac_lib_var=no"
21462 fi
21463 rm -f conftest*
21464 LIBS="$ac_save_LIBS"
21465
21466 fi
21467 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
21468   echo "$ac_t""yes" 1>&6
21469   ol_cv_lib_ndbm=-ldbm
21470 else
21471   echo "$ac_t""no" 1>&6
21472 ol_cv_lib_ndbm=no
21473 fi
21474                 
21475 fi
21476
21477         
21478 fi
21479
21480         LIBS="$ol_LIBS"
21481
21482 fi
21483
21484 echo "$ac_t""$ol_cv_lib_ndbm" 1>&6
21485
21486
21487  for ac_hdr in ndbm.h
21488 do
21489 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
21490 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
21491 echo "configure:21492: checking for $ac_hdr" >&5
21492 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
21493   echo $ac_n "(cached) $ac_c" 1>&6
21494 else
21495   cat > conftest.$ac_ext <<EOF
21496 #line 21497 "configure"
21497 #include "confdefs.h"
21498 #include <$ac_hdr>
21499 EOF
21500 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
21501 { (eval echo configure:21502: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
21502 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
21503 if test -z "$ac_err"; then
21504   rm -rf conftest*
21505   eval "ac_cv_header_$ac_safe=yes"
21506 else
21507   echo "$ac_err" >&5
21508   echo "configure: failed program was:" >&5
21509   cat conftest.$ac_ext >&5
21510   rm -rf conftest*
21511   eval "ac_cv_header_$ac_safe=no"
21512 fi
21513 rm -f conftest*
21514 fi
21515 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
21516   echo "$ac_t""yes" 1>&6
21517     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
21518   cat >> confdefs.h <<EOF
21519 #define $ac_tr_hdr 1
21520 EOF
21521  
21522 else
21523   echo "$ac_t""no" 1>&6
21524 fi
21525 done
21526
21527  echo $ac_n "checking for db""... $ac_c" 1>&6
21528 echo "configure:21529: checking for db" >&5
21529 if eval "test \"\${ol_cv_ndbm+set}\" = set"; then
21530   echo $ac_n "(cached) $ac_c" 1>&6
21531 else
21532   
21533         if test $ol_cv_lib_ndbm = no -o $ac_cv_header_ndbm_h = no ; then
21534                 ol_cv_ndbm=no
21535         else
21536                 ol_cv_ndbm=yes
21537         fi
21538
21539 fi
21540
21541 echo "$ac_t""$ol_cv_ndbm" 1>&6
21542  if test $ol_cv_ndbm = yes ; then
21543         cat >> confdefs.h <<\EOF
21544 #define HAVE_NDBM 1
21545 EOF
21546
21547  fi
21548
21549
21550         if test $ol_cv_ndbm = yes ; then
21551                 ol_link_ldbm=ndbm
21552                 ol_with_ldbm_api=ndbm
21553
21554                 if test $ol_cv_lib_ndbm != yes ; then
21555                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_ndbm"
21556                 fi
21557         fi
21558 fi
21559
21560 if test $ol_link_ldbm = no -a $ol_enable_ldbm != no ; then
21561         { echo "configure: error: could not find suitable LDBM backend" 1>&2; exit 1; }
21562 fi
21563
21564 if test $ol_enable_bdb = yes -o \
21565         $ol_enable_hdb = yes -o \
21566         $ol_enable_ldbm = yes ; then
21567         SLAPD_LIBS="$SLAPD_LIBS \$(LDBM_LIBS)"
21568 fi
21569
21570
21571 if test $ol_enable_dynamic = yes -a $enable_shared = yes ; then
21572         BUILD_LIBS_DYNAMIC=shared
21573         cat >> confdefs.h <<\EOF
21574 #define LDAP_LIBS_DYNAMIC 1
21575 EOF
21576
21577         LTSTATIC=""
21578 else
21579         BUILD_LIBS_DYNAMIC=static
21580         LTSTATIC="-static"
21581 fi
21582
21583 if test $ol_enable_wrappers != no ; then
21584         for ac_hdr in tcpd.h
21585 do
21586 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
21587 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
21588 echo "configure:21589: checking for $ac_hdr" >&5
21589 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
21590   echo $ac_n "(cached) $ac_c" 1>&6
21591 else
21592   cat > conftest.$ac_ext <<EOF
21593 #line 21594 "configure"
21594 #include "confdefs.h"
21595 #include <$ac_hdr>
21596 EOF
21597 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
21598 { (eval echo configure:21599: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
21599 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
21600 if test -z "$ac_err"; then
21601   rm -rf conftest*
21602   eval "ac_cv_header_$ac_safe=yes"
21603 else
21604   echo "$ac_err" >&5
21605   echo "configure: failed program was:" >&5
21606   cat conftest.$ac_ext >&5
21607   rm -rf conftest*
21608   eval "ac_cv_header_$ac_safe=no"
21609 fi
21610 rm -f conftest*
21611 fi
21612 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
21613   echo "$ac_t""yes" 1>&6
21614     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
21615   cat >> confdefs.h <<EOF
21616 #define $ac_tr_hdr 1
21617 EOF
21618  
21619                 echo $ac_n "checking for TCP wrappers library""... $ac_c" 1>&6
21620 echo "configure:21621: checking for TCP wrappers library" >&5
21621                 save_LIBS="$LIBS"
21622                 LIBS="$LIBS -lwrap"
21623                 cat > conftest.$ac_ext <<EOF
21624 #line 21625 "configure"
21625 #include "confdefs.h"
21626
21627 #include <tcpd.h>
21628 int allow_severity = 0;
21629 int deny_severity  = 0;
21630
21631 struct request_info *req;
21632                 
21633 int main() {
21634
21635 hosts_access(req)
21636                 
21637 ; return 0; }
21638 EOF
21639 if { (eval echo configure:21640: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21640   rm -rf conftest*
21641   echo "$ac_t""-lwrap" 1>&6
21642                 have_wrappers=yes
21643                 LIBS="$save_LIBS"
21644 else
21645   echo "configure: failed program was:" >&5
21646   cat conftest.$ac_ext >&5
21647   rm -rf conftest*
21648   
21649                                 LIBS="$LIBS -lnsl"
21650                 cat > conftest.$ac_ext <<EOF
21651 #line 21652 "configure"
21652 #include "confdefs.h"
21653
21654 #include <tcpd.h>
21655 int allow_severity = 0;
21656 int deny_severity  = 0;
21657
21658 struct request_info *req;
21659                 
21660 int main() {
21661
21662 hosts_access(req)
21663                 
21664 ; return 0; }
21665 EOF
21666 if { (eval echo configure:21667: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21667   rm -rf conftest*
21668   echo "$ac_t""-lwrap -lnsl" 1>&6
21669                 have_wrappers=yes
21670                 LIBS="$save_LIBS -lnsl"
21671 else
21672   echo "configure: failed program was:" >&5
21673   cat conftest.$ac_ext >&5
21674   rm -rf conftest*
21675   
21676                 echo "$ac_t""no" 1>&6
21677                 have_wrappers=no
21678                 LIBS=$save_LIBS
21679 fi
21680 rm -f conftest*
21681 fi
21682 rm -f conftest*
21683 else
21684   echo "$ac_t""no" 1>&6
21685 have_wrappers=no
21686 fi
21687 done
21688
21689
21690         if test $have_wrappers = yes ; then
21691                 cat >> confdefs.h <<\EOF
21692 #define HAVE_TCPD 1
21693 EOF
21694
21695                 WRAP_LIBS="-lwrap"
21696         elif test $ol_enable_wrappers = yes ; then
21697                 { echo "configure: error: could not find TCP wrappers, select apppropriate options or disable" 1>&2; exit 1; }
21698         else
21699                 echo "configure: warning: could not find TCP wrappers, support disabled" 1>&2
21700                 WRAP_LIBS=""
21701         fi
21702 fi
21703
21704 if test $ol_enable_syslog != no ; then
21705         echo $ac_n "checking for openlog""... $ac_c" 1>&6
21706 echo "configure:21707: checking for openlog" >&5
21707 if eval "test \"\${ac_cv_func_openlog+set}\" = set"; then
21708   echo $ac_n "(cached) $ac_c" 1>&6
21709 else
21710   cat > conftest.$ac_ext <<EOF
21711 #line 21712 "configure"
21712 #include "confdefs.h"
21713 /* System header to define __stub macros and hopefully few prototypes,
21714     which can conflict with char openlog(); below.  */
21715 #include <assert.h>
21716 /* Override any gcc2 internal prototype to avoid an error.  */
21717 /* We use char because int might match the return type of a gcc2
21718     builtin and then its argument prototype would still apply.  */
21719 char openlog();
21720 char (*f)();
21721
21722 int main() {
21723
21724 /* The GNU C library defines this for functions which it implements
21725     to always fail with ENOSYS.  Some functions are actually named
21726     something starting with __ and the normal name is an alias.  */
21727 #if defined (__stub_openlog) || defined (__stub___openlog)
21728 choke me
21729 #else
21730 f = openlog;
21731 #endif
21732
21733 ; return 0; }
21734 EOF
21735 if { (eval echo configure:21736: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21736   rm -rf conftest*
21737   eval "ac_cv_func_openlog=yes"
21738 else
21739   echo "configure: failed program was:" >&5
21740   cat conftest.$ac_ext >&5
21741   rm -rf conftest*
21742   eval "ac_cv_func_openlog=no"
21743 fi
21744 rm -f conftest*
21745 fi
21746
21747 if eval "test \"`echo '$ac_cv_func_'openlog`\" = yes"; then
21748   echo "$ac_t""yes" 1>&6
21749   :
21750 else
21751   echo "$ac_t""no" 1>&6
21752 fi
21753
21754         if test $ac_cv_func_openlog = no -a $ol_enable_syslog = yes; then
21755                 { echo "configure: error: could not find syslog" 1>&2; exit 1; }
21756         fi
21757         ol_enable_syslog=$ac_cv_func_openlog
21758 fi
21759
21760
21761 ol_link_sql=no
21762 if test $ol_enable_sql != no ; then
21763         for ac_hdr in sql.h sqlext.h
21764 do
21765 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
21766 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
21767 echo "configure:21768: checking for $ac_hdr" >&5
21768 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
21769   echo $ac_n "(cached) $ac_c" 1>&6
21770 else
21771   cat > conftest.$ac_ext <<EOF
21772 #line 21773 "configure"
21773 #include "confdefs.h"
21774 #include <$ac_hdr>
21775 EOF
21776 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
21777 { (eval echo configure:21778: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
21778 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
21779 if test -z "$ac_err"; then
21780   rm -rf conftest*
21781   eval "ac_cv_header_$ac_safe=yes"
21782 else
21783   echo "$ac_err" >&5
21784   echo "configure: failed program was:" >&5
21785   cat conftest.$ac_ext >&5
21786   rm -rf conftest*
21787   eval "ac_cv_header_$ac_safe=no"
21788 fi
21789 rm -f conftest*
21790 fi
21791 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
21792   echo "$ac_t""yes" 1>&6
21793     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
21794   cat >> confdefs.h <<EOF
21795 #define $ac_tr_hdr 1
21796 EOF
21797  
21798 else
21799   echo "$ac_t""no" 1>&6
21800 { echo "configure: error: could not locate SQL headers" 1>&2; exit 1; }
21801         
21802 fi
21803 done
21804
21805
21806         sql_LIBS="$LIBS"
21807         LIBS="$LTHREAD_LIBS"
21808
21809         echo $ac_n "checking for SQLDriverConnect in -liodbc""... $ac_c" 1>&6
21810 echo "configure:21811: checking for SQLDriverConnect in -liodbc" >&5
21811 ac_lib_var=`echo iodbc'_'SQLDriverConnect | sed 'y%./+-:%__p__%'`
21812 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
21813   echo $ac_n "(cached) $ac_c" 1>&6
21814 else
21815   ac_save_LIBS="$LIBS"
21816 LIBS="-liodbc  $LIBS"
21817 cat > conftest.$ac_ext <<EOF
21818 #line 21819 "configure"
21819 #include "confdefs.h"
21820 /* Override any gcc2 internal prototype to avoid an error.  */
21821 /* We use char because int might match the return type of a gcc2
21822     builtin and then its argument prototype would still apply.  */
21823 char SQLDriverConnect();
21824
21825 int main() {
21826 SQLDriverConnect()
21827 ; return 0; }
21828 EOF
21829 if { (eval echo configure:21830: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21830   rm -rf conftest*
21831   eval "ac_cv_lib_$ac_lib_var=yes"
21832 else
21833   echo "configure: failed program was:" >&5
21834   cat conftest.$ac_ext >&5
21835   rm -rf conftest*
21836   eval "ac_cv_lib_$ac_lib_var=no"
21837 fi
21838 rm -f conftest*
21839 LIBS="$ac_save_LIBS"
21840
21841 fi
21842 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
21843   echo "$ac_t""yes" 1>&6
21844   have_iodbc=yes
21845 else
21846   echo "$ac_t""no" 1>&6
21847 have_iodbc=no
21848 fi
21849
21850         if test $have_iodbc = yes ; then
21851                 ol_link_sql="-liodbc"
21852         else
21853                 echo $ac_n "checking for SQLDriverConnect in -lodbc""... $ac_c" 1>&6
21854 echo "configure:21855: checking for SQLDriverConnect in -lodbc" >&5
21855 ac_lib_var=`echo odbc'_'SQLDriverConnect | sed 'y%./+-:%__p__%'`
21856 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
21857   echo $ac_n "(cached) $ac_c" 1>&6
21858 else
21859   ac_save_LIBS="$LIBS"
21860 LIBS="-lodbc  $LIBS"
21861 cat > conftest.$ac_ext <<EOF
21862 #line 21863 "configure"
21863 #include "confdefs.h"
21864 /* Override any gcc2 internal prototype to avoid an error.  */
21865 /* We use char because int might match the return type of a gcc2
21866     builtin and then its argument prototype would still apply.  */
21867 char SQLDriverConnect();
21868
21869 int main() {
21870 SQLDriverConnect()
21871 ; return 0; }
21872 EOF
21873 if { (eval echo configure:21874: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21874   rm -rf conftest*
21875   eval "ac_cv_lib_$ac_lib_var=yes"
21876 else
21877   echo "configure: failed program was:" >&5
21878   cat conftest.$ac_ext >&5
21879   rm -rf conftest*
21880   eval "ac_cv_lib_$ac_lib_var=no"
21881 fi
21882 rm -f conftest*
21883 LIBS="$ac_save_LIBS"
21884
21885 fi
21886 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
21887   echo "$ac_t""yes" 1>&6
21888   have_odbc=yes
21889 else
21890   echo "$ac_t""no" 1>&6
21891 have_odbc=no
21892 fi
21893
21894                 if test $have_odbc = yes ; then
21895                         ol_link_sql="-lodbc"
21896                 fi
21897         fi
21898
21899         LIBS="$sql_LIBS"
21900
21901         if test $ol_link_sql != no ; then
21902                 SLAPD_SQL_LIBS="$ol_link_sql"
21903
21904         elif test $ol_enable_sql != auto ; then
21905                 { echo "configure: error: could not locate suitable ODBC library" 1>&2; exit 1; }
21906         fi
21907 fi
21908
21909 WITH_SASL=no
21910 ol_link_sasl=no
21911 ol_link_spasswd=no
21912 if test $ol_with_cyrus_sasl != no ; then
21913         for ac_hdr in sasl/sasl.h sasl.h
21914 do
21915 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
21916 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
21917 echo "configure:21918: checking for $ac_hdr" >&5
21918 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
21919   echo $ac_n "(cached) $ac_c" 1>&6
21920 else
21921   cat > conftest.$ac_ext <<EOF
21922 #line 21923 "configure"
21923 #include "confdefs.h"
21924 #include <$ac_hdr>
21925 EOF
21926 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
21927 { (eval echo configure:21928: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
21928 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
21929 if test -z "$ac_err"; then
21930   rm -rf conftest*
21931   eval "ac_cv_header_$ac_safe=yes"
21932 else
21933   echo "$ac_err" >&5
21934   echo "configure: failed program was:" >&5
21935   cat conftest.$ac_ext >&5
21936   rm -rf conftest*
21937   eval "ac_cv_header_$ac_safe=no"
21938 fi
21939 rm -f conftest*
21940 fi
21941 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
21942   echo "$ac_t""yes" 1>&6
21943     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
21944   cat >> confdefs.h <<EOF
21945 #define $ac_tr_hdr 1
21946 EOF
21947  
21948 else
21949   echo "$ac_t""no" 1>&6
21950 fi
21951 done
21952
21953
21954         if test $ac_cv_header_sasl_sasl_h = yes -o $ac_cv_header_sasl_h = yes; then
21955                 echo $ac_n "checking for sasl_client_init in -lsasl2""... $ac_c" 1>&6
21956 echo "configure:21957: checking for sasl_client_init in -lsasl2" >&5
21957 ac_lib_var=`echo sasl2'_'sasl_client_init | sed 'y%./+-:%__p__%'`
21958 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
21959   echo $ac_n "(cached) $ac_c" 1>&6
21960 else
21961   ac_save_LIBS="$LIBS"
21962 LIBS="-lsasl2  $LIBS"
21963 cat > conftest.$ac_ext <<EOF
21964 #line 21965 "configure"
21965 #include "confdefs.h"
21966 /* Override any gcc2 internal prototype to avoid an error.  */
21967 /* We use char because int might match the return type of a gcc2
21968     builtin and then its argument prototype would still apply.  */
21969 char sasl_client_init();
21970
21971 int main() {
21972 sasl_client_init()
21973 ; return 0; }
21974 EOF
21975 if { (eval echo configure:21976: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21976   rm -rf conftest*
21977   eval "ac_cv_lib_$ac_lib_var=yes"
21978 else
21979   echo "configure: failed program was:" >&5
21980   cat conftest.$ac_ext >&5
21981   rm -rf conftest*
21982   eval "ac_cv_lib_$ac_lib_var=no"
21983 fi
21984 rm -f conftest*
21985 LIBS="$ac_save_LIBS"
21986
21987 fi
21988 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
21989   echo "$ac_t""yes" 1>&6
21990   ol_link_sasl="-lsasl2"
21991 else
21992   echo "$ac_t""no" 1>&6
21993 echo $ac_n "checking for sasl_client_init in -lsasl""... $ac_c" 1>&6
21994 echo "configure:21995: checking for sasl_client_init in -lsasl" >&5
21995 ac_lib_var=`echo sasl'_'sasl_client_init | sed 'y%./+-:%__p__%'`
21996 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
21997   echo $ac_n "(cached) $ac_c" 1>&6
21998 else
21999   ac_save_LIBS="$LIBS"
22000 LIBS="-lsasl  $LIBS"
22001 cat > conftest.$ac_ext <<EOF
22002 #line 22003 "configure"
22003 #include "confdefs.h"
22004 /* Override any gcc2 internal prototype to avoid an error.  */
22005 /* We use char because int might match the return type of a gcc2
22006     builtin and then its argument prototype would still apply.  */
22007 char sasl_client_init();
22008
22009 int main() {
22010 sasl_client_init()
22011 ; return 0; }
22012 EOF
22013 if { (eval echo configure:22014: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22014   rm -rf conftest*
22015   eval "ac_cv_lib_$ac_lib_var=yes"
22016 else
22017   echo "configure: failed program was:" >&5
22018   cat conftest.$ac_ext >&5
22019   rm -rf conftest*
22020   eval "ac_cv_lib_$ac_lib_var=no"
22021 fi
22022 rm -f conftest*
22023 LIBS="$ac_save_LIBS"
22024
22025 fi
22026 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
22027   echo "$ac_t""yes" 1>&6
22028   ol_link_sasl="-lsasl"
22029 else
22030   echo "$ac_t""no" 1>&6
22031 fi
22032
22033 fi
22034
22035         fi
22036
22037         if test $ol_link_sasl = no ; then
22038                 if test $ol_with_cyrus_sasl != auto ; then
22039                         { echo "configure: error: Could not locate Cyrus SASL" 1>&2; exit 1; }
22040                 else
22041                         echo "configure: warning: Could not locate Cyrus SASL" 1>&2
22042                         echo "configure: warning: SASL authentication not supported!" 1>&2
22043                         if test $ol_link_tls = no ; then
22044                                 echo "configure: warning: Strong authentication not supported!" 1>&2
22045                         fi
22046                 fi
22047         else
22048                 echo $ac_n "checking Cyrus SASL library version""... $ac_c" 1>&6
22049 echo "configure:22050: checking Cyrus SASL library version" >&5
22050 if eval "test \"\${ol_cv_sasl_compat+set}\" = set"; then
22051   echo $ac_n "(cached) $ac_c" 1>&6
22052 else
22053   
22054         cat > conftest.$ac_ext <<EOF
22055 #line 22056 "configure"
22056 #include "confdefs.h"
22057
22058 #ifdef HAVE_SASL_SASL_H
22059 #include <sasl/sasl.h>
22060 #else
22061 #include <sasl.h>
22062 #endif
22063
22064 /* Require 2.1.15+ */
22065 #if SASL_VERSION_MAJOR == 2  && SASL_VERSION_MINOR > 1
22066         char *__sasl_compat = "2.2+ or better okay (we guess)";
22067 #elif SASL_VERSION_MAJOR == 2  && SASL_VERSION_MINOR == 1 \
22068         && SASL_VERSION_STEP >=15
22069         char *__sasl_compat = "2.1.15+ or better okay";
22070 #endif
22071         
22072 EOF
22073 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
22074   egrep "__sasl_compat" >/dev/null 2>&1; then
22075   rm -rf conftest*
22076   ol_cv_sasl_compat=yes
22077 else
22078   rm -rf conftest*
22079   ol_cv_sasl_compat=no
22080 fi
22081 rm -f conftest*
22082
22083 fi
22084
22085 echo "$ac_t""$ol_cv_sasl_compat" 1>&6
22086
22087                 if test $ol_cv_sasl_compat = no ; then
22088                         ol_link_sasl=no
22089                         { echo "configure: error: Cyrus SASL library located but is incompatible" 1>&2; exit 1; }
22090                 fi
22091
22092                 cat >> confdefs.h <<\EOF
22093 #define HAVE_CYRUS_SASL 1
22094 EOF
22095
22096                 SASL_LIBS="$ol_link_sasl"
22097                 if test $ol_enable_spasswd != no ; then
22098                         ol_link_spasswd=yes
22099                 fi
22100
22101                 ac_save_LIBS="$LIBS"
22102                 LIBS="$LIBS $ol_link_sasl"
22103                 echo $ac_n "checking for sasl_version""... $ac_c" 1>&6
22104 echo "configure:22105: checking for sasl_version" >&5
22105 if eval "test \"\${ac_cv_func_sasl_version+set}\" = set"; then
22106   echo $ac_n "(cached) $ac_c" 1>&6
22107 else
22108   cat > conftest.$ac_ext <<EOF
22109 #line 22110 "configure"
22110 #include "confdefs.h"
22111 /* System header to define __stub macros and hopefully few prototypes,
22112     which can conflict with char sasl_version(); below.  */
22113 #include <assert.h>
22114 /* Override any gcc2 internal prototype to avoid an error.  */
22115 /* We use char because int might match the return type of a gcc2
22116     builtin and then its argument prototype would still apply.  */
22117 char sasl_version();
22118 char (*f)();
22119
22120 int main() {
22121
22122 /* The GNU C library defines this for functions which it implements
22123     to always fail with ENOSYS.  Some functions are actually named
22124     something starting with __ and the normal name is an alias.  */
22125 #if defined (__stub_sasl_version) || defined (__stub___sasl_version)
22126 choke me
22127 #else
22128 f = sasl_version;
22129 #endif
22130
22131 ; return 0; }
22132 EOF
22133 if { (eval echo configure:22134: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22134   rm -rf conftest*
22135   eval "ac_cv_func_sasl_version=yes"
22136 else
22137   echo "configure: failed program was:" >&5
22138   cat conftest.$ac_ext >&5
22139   rm -rf conftest*
22140   eval "ac_cv_func_sasl_version=no"
22141 fi
22142 rm -f conftest*
22143 fi
22144
22145 if eval "test \"`echo '$ac_cv_func_'sasl_version`\" = yes"; then
22146   echo "$ac_t""yes" 1>&6
22147   cat >> confdefs.h <<\EOF
22148 #define HAVE_SASL_VERSION 1
22149 EOF
22150
22151 else
22152   echo "$ac_t""no" 1>&6
22153 fi
22154
22155                 LIBS="$ac_save_LIBS"
22156
22157                 WITH_SASL=yes
22158         fi
22159
22160 else
22161         echo "configure: warning: SASL authentication not supported!" 1>&2
22162         if test $ol_link_tls = no ; then
22163                 echo "configure: warning: Strong authentication not supported!" 1>&2
22164         fi
22165 fi
22166
22167 if test $cross_compiling != yes -a "$ac_cv_mingw32" != yes ; then
22168         dev=no
22169         if test -r /dev/urandom ; then
22170                 dev="/dev/urandom";
22171         elif test -r /idev/urandom ; then
22172                 dev="/idev/urandom";
22173         elif test -r /dev/srandom ; then
22174                 dev="/dev/srandom";
22175         elif test -r /dev/random ; then
22176                 dev="/dev/random";
22177         elif test -r /idev/random ; then
22178                 dev="/idev/random";
22179         fi
22180
22181         if test $dev != no ; then
22182                 cat >> confdefs.h <<EOF
22183 #define URANDOM_DEVICE "$dev"
22184 EOF
22185
22186         fi
22187 fi
22188
22189 ol_link_fetch=no
22190 if test $ol_with_fetch != no ; then
22191         ol_LIBS=$LIBS
22192 LIBS="-lfetch -lcom_err $LIBS"
22193 echo $ac_n "checking fetch(3) library""... $ac_c" 1>&6
22194 echo "configure:22195: checking fetch(3) library" >&5
22195 if eval "test \"\${ol_cv_lib_fetch+set}\" = set"; then
22196   echo $ac_n "(cached) $ac_c" 1>&6
22197 else
22198   
22199         cat > conftest.$ac_ext <<EOF
22200 #line 22201 "configure"
22201 #include "confdefs.h"
22202
22203 #include <sys/param.h>
22204 #include <stdio.h>
22205 #include <fetch.h>
22206 int main() {
22207 struct url *u = fetchParseURL("file:///"); 
22208 ; return 0; }
22209 EOF
22210 if { (eval echo configure:22211: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22211   rm -rf conftest*
22212   ol_cv_lib_fetch=yes
22213 else
22214   echo "configure: failed program was:" >&5
22215   cat conftest.$ac_ext >&5
22216   rm -rf conftest*
22217   ol_cv_lib_fetch=no
22218 fi
22219 rm -f conftest*
22220 fi
22221
22222 echo "$ac_t""$ol_cv_lib_fetch" 1>&6
22223 LIBS=$ol_LIBS
22224 if test $ol_cv_lib_fetch != no ; then
22225         ol_link_fetch="-lfetch -lcom_err"
22226         cat >> confdefs.h <<\EOF
22227 #define HAVE_FETCH 1
22228 EOF
22229
22230 fi
22231
22232
22233         if test $ol_cv_lib_fetch != no ; then
22234                 LUTIL_LIBS="$LUTIL_LIBS $ol_link_fetch"
22235                 ol_link_fetch=freebsd
22236
22237         elif test $ol_with_fetch != auto ; then
22238                 { echo "configure: error: no suitable API for --with-fetch=$ol_with_fetch" 1>&2; exit 1; }
22239         fi 
22240 fi
22241
22242 if test $ol_enable_crypt != no ; then
22243         save_LIBS="$LIBS"
22244         LIBS="$TLS_LIBS $LIBS"
22245
22246         echo $ac_n "checking for crypt""... $ac_c" 1>&6
22247 echo "configure:22248: checking for crypt" >&5
22248 if eval "test \"\${ac_cv_func_crypt+set}\" = set"; then
22249   echo $ac_n "(cached) $ac_c" 1>&6
22250 else
22251   cat > conftest.$ac_ext <<EOF
22252 #line 22253 "configure"
22253 #include "confdefs.h"
22254 /* System header to define __stub macros and hopefully few prototypes,
22255     which can conflict with char crypt(); below.  */
22256 #include <assert.h>
22257 /* Override any gcc2 internal prototype to avoid an error.  */
22258 /* We use char because int might match the return type of a gcc2
22259     builtin and then its argument prototype would still apply.  */
22260 char crypt();
22261 char (*f)();
22262
22263 int main() {
22264
22265 /* The GNU C library defines this for functions which it implements
22266     to always fail with ENOSYS.  Some functions are actually named
22267     something starting with __ and the normal name is an alias.  */
22268 #if defined (__stub_crypt) || defined (__stub___crypt)
22269 choke me
22270 #else
22271 f = crypt;
22272 #endif
22273
22274 ; return 0; }
22275 EOF
22276 if { (eval echo configure:22277: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22277   rm -rf conftest*
22278   eval "ac_cv_func_crypt=yes"
22279 else
22280   echo "configure: failed program was:" >&5
22281   cat conftest.$ac_ext >&5
22282   rm -rf conftest*
22283   eval "ac_cv_func_crypt=no"
22284 fi
22285 rm -f conftest*
22286 fi
22287
22288 if eval "test \"`echo '$ac_cv_func_'crypt`\" = yes"; then
22289   echo "$ac_t""yes" 1>&6
22290   have_crypt=yes
22291 else
22292   echo "$ac_t""no" 1>&6
22293
22294                 LIBS="$save_LIBS"
22295                 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
22296 echo "configure:22297: checking for crypt in -lcrypt" >&5
22297 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-:%__p__%'`
22298 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
22299   echo $ac_n "(cached) $ac_c" 1>&6
22300 else
22301   ac_save_LIBS="$LIBS"
22302 LIBS="-lcrypt  $LIBS"
22303 cat > conftest.$ac_ext <<EOF
22304 #line 22305 "configure"
22305 #include "confdefs.h"
22306 /* Override any gcc2 internal prototype to avoid an error.  */
22307 /* We use char because int might match the return type of a gcc2
22308     builtin and then its argument prototype would still apply.  */
22309 char crypt();
22310
22311 int main() {
22312 crypt()
22313 ; return 0; }
22314 EOF
22315 if { (eval echo configure:22316: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22316   rm -rf conftest*
22317   eval "ac_cv_lib_$ac_lib_var=yes"
22318 else
22319   echo "configure: failed program was:" >&5
22320   cat conftest.$ac_ext >&5
22321   rm -rf conftest*
22322   eval "ac_cv_lib_$ac_lib_var=no"
22323 fi
22324 rm -f conftest*
22325 LIBS="$ac_save_LIBS"
22326
22327 fi
22328 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
22329   echo "$ac_t""yes" 1>&6
22330   LUTIL_LIBS="$LUTIL_LIBS -lcrypt"
22331                         have_crypt=yes
22332 else
22333   echo "$ac_t""no" 1>&6
22334 have_crypt=no
22335 fi
22336
22337 fi
22338
22339
22340         LIBS="$save_LIBS"
22341
22342         if test $have_crypt = yes ; then
22343                 cat >> confdefs.h <<\EOF
22344 #define HAVE_CRYPT 1
22345 EOF
22346
22347         else
22348                 echo "configure: warning: could not find crypt" 1>&2
22349                 if test $ol_enable_crypt = yes ; then
22350                         { echo "configure: error: could not find crypt, select appropriate options or disable" 1>&2; exit 1; }
22351                 fi
22352
22353                 echo "configure: warning: disabling crypt support" 1>&2
22354                 ol_enable_crypt=no
22355         fi
22356 fi
22357
22358 if test $ol_enable_proctitle != no ; then
22359         echo $ac_n "checking for setproctitle""... $ac_c" 1>&6
22360 echo "configure:22361: checking for setproctitle" >&5
22361 if eval "test \"\${ac_cv_func_setproctitle+set}\" = set"; then
22362   echo $ac_n "(cached) $ac_c" 1>&6
22363 else
22364   cat > conftest.$ac_ext <<EOF
22365 #line 22366 "configure"
22366 #include "confdefs.h"
22367 /* System header to define __stub macros and hopefully few prototypes,
22368     which can conflict with char setproctitle(); below.  */
22369 #include <assert.h>
22370 /* Override any gcc2 internal prototype to avoid an error.  */
22371 /* We use char because int might match the return type of a gcc2
22372     builtin and then its argument prototype would still apply.  */
22373 char setproctitle();
22374 char (*f)();
22375
22376 int main() {
22377
22378 /* The GNU C library defines this for functions which it implements
22379     to always fail with ENOSYS.  Some functions are actually named
22380     something starting with __ and the normal name is an alias.  */
22381 #if defined (__stub_setproctitle) || defined (__stub___setproctitle)
22382 choke me
22383 #else
22384 f = setproctitle;
22385 #endif
22386
22387 ; return 0; }
22388 EOF
22389 if { (eval echo configure:22390: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22390   rm -rf conftest*
22391   eval "ac_cv_func_setproctitle=yes"
22392 else
22393   echo "configure: failed program was:" >&5
22394   cat conftest.$ac_ext >&5
22395   rm -rf conftest*
22396   eval "ac_cv_func_setproctitle=no"
22397 fi
22398 rm -f conftest*
22399 fi
22400
22401 if eval "test \"`echo '$ac_cv_func_'setproctitle`\" = yes"; then
22402   echo "$ac_t""yes" 1>&6
22403   have_setproctitle=yes
22404 else
22405   echo "$ac_t""no" 1>&6
22406
22407                 echo $ac_n "checking for setproctitle in -lutil""... $ac_c" 1>&6
22408 echo "configure:22409: checking for setproctitle in -lutil" >&5
22409 ac_lib_var=`echo util'_'setproctitle | sed 'y%./+-:%__p__%'`
22410 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
22411   echo $ac_n "(cached) $ac_c" 1>&6
22412 else
22413   ac_save_LIBS="$LIBS"
22414 LIBS="-lutil  $LIBS"
22415 cat > conftest.$ac_ext <<EOF
22416 #line 22417 "configure"
22417 #include "confdefs.h"
22418 /* Override any gcc2 internal prototype to avoid an error.  */
22419 /* We use char because int might match the return type of a gcc2
22420     builtin and then its argument prototype would still apply.  */
22421 char setproctitle();
22422
22423 int main() {
22424 setproctitle()
22425 ; return 0; }
22426 EOF
22427 if { (eval echo configure:22428: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22428   rm -rf conftest*
22429   eval "ac_cv_lib_$ac_lib_var=yes"
22430 else
22431   echo "configure: failed program was:" >&5
22432   cat conftest.$ac_ext >&5
22433   rm -rf conftest*
22434   eval "ac_cv_lib_$ac_lib_var=no"
22435 fi
22436 rm -f conftest*
22437 LIBS="$ac_save_LIBS"
22438
22439 fi
22440 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
22441   echo "$ac_t""yes" 1>&6
22442   have_setproctitle=yes
22443                         LUTIL_LIBS="$LUTIL_LIBS -lutil"
22444 else
22445   echo "$ac_t""no" 1>&6
22446 have_setproctitle=no
22447                         LIBOBJS="$LIBOBJS setproctitle.o"
22448                         LIBSRCS="$LIBSRCS setproctitle.c"
22449 fi
22450
22451 fi
22452
22453
22454         if test $have_setproctitle = yes ; then
22455                 cat >> confdefs.h <<\EOF
22456 #define HAVE_SETPROCTITLE 1
22457 EOF
22458
22459         fi
22460 fi
22461
22462 if test $ol_enable_slp != no ; then
22463         for ac_hdr in slp.h 
22464 do
22465 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
22466 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
22467 echo "configure:22468: checking for $ac_hdr" >&5
22468 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
22469   echo $ac_n "(cached) $ac_c" 1>&6
22470 else
22471   cat > conftest.$ac_ext <<EOF
22472 #line 22473 "configure"
22473 #include "confdefs.h"
22474 #include <$ac_hdr>
22475 EOF
22476 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
22477 { (eval echo configure:22478: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
22478 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
22479 if test -z "$ac_err"; then
22480   rm -rf conftest*
22481   eval "ac_cv_header_$ac_safe=yes"
22482 else
22483   echo "$ac_err" >&5
22484   echo "configure: failed program was:" >&5
22485   cat conftest.$ac_ext >&5
22486   rm -rf conftest*
22487   eval "ac_cv_header_$ac_safe=no"
22488 fi
22489 rm -f conftest*
22490 fi
22491 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
22492   echo "$ac_t""yes" 1>&6
22493     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
22494   cat >> confdefs.h <<EOF
22495 #define $ac_tr_hdr 1
22496 EOF
22497  
22498 else
22499   echo "$ac_t""no" 1>&6
22500 fi
22501 done
22502
22503
22504         if test $ac_cv_header_slp_h = yes ; then
22505                 echo $ac_n "checking for SLPOpen in -lslp""... $ac_c" 1>&6
22506 echo "configure:22507: checking for SLPOpen in -lslp" >&5
22507 ac_lib_var=`echo slp'_'SLPOpen | sed 'y%./+-:%__p__%'`
22508 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
22509   echo $ac_n "(cached) $ac_c" 1>&6
22510 else
22511   ac_save_LIBS="$LIBS"
22512 LIBS="-lslp  $LIBS"
22513 cat > conftest.$ac_ext <<EOF
22514 #line 22515 "configure"
22515 #include "confdefs.h"
22516 /* Override any gcc2 internal prototype to avoid an error.  */
22517 /* We use char because int might match the return type of a gcc2
22518     builtin and then its argument prototype would still apply.  */
22519 char SLPOpen();
22520
22521 int main() {
22522 SLPOpen()
22523 ; return 0; }
22524 EOF
22525 if { (eval echo configure:22526: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22526   rm -rf conftest*
22527   eval "ac_cv_lib_$ac_lib_var=yes"
22528 else
22529   echo "configure: failed program was:" >&5
22530   cat conftest.$ac_ext >&5
22531   rm -rf conftest*
22532   eval "ac_cv_lib_$ac_lib_var=no"
22533 fi
22534 rm -f conftest*
22535 LIBS="$ac_save_LIBS"
22536
22537 fi
22538 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
22539   echo "$ac_t""yes" 1>&6
22540   have_slp=yes
22541 else
22542   echo "$ac_t""no" 1>&6
22543 have_slp=no
22544 fi
22545
22546                 if test $have_slp = yes ; then
22547                         cat >> confdefs.h <<\EOF
22548 #define HAVE_SLP 1
22549 EOF
22550
22551                         SLAPD_SLP_LIBS=-lslp
22552                 fi
22553
22554         elif test $ol_enable_slp = yes ; then
22555                 { echo "configure: error: SLP not found" 1>&2; exit 1; }
22556         fi
22557 fi
22558
22559 if test "$ol_with_multiple_precision" != "no" ; then
22560         ol_have_bignum=no
22561         ol_have_gmp=no
22562
22563         for ac_hdr in openssl/bn.h bn.h
22564 do
22565 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
22566 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
22567 echo "configure:22568: checking for $ac_hdr" >&5
22568 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
22569   echo $ac_n "(cached) $ac_c" 1>&6
22570 else
22571   cat > conftest.$ac_ext <<EOF
22572 #line 22573 "configure"
22573 #include "confdefs.h"
22574 #include <$ac_hdr>
22575 EOF
22576 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
22577 { (eval echo configure:22578: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
22578 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
22579 if test -z "$ac_err"; then
22580   rm -rf conftest*
22581   eval "ac_cv_header_$ac_safe=yes"
22582 else
22583   echo "$ac_err" >&5
22584   echo "configure: failed program was:" >&5
22585   cat conftest.$ac_ext >&5
22586   rm -rf conftest*
22587   eval "ac_cv_header_$ac_safe=no"
22588 fi
22589 rm -f conftest*
22590 fi
22591 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
22592   echo "$ac_t""yes" 1>&6
22593     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
22594   cat >> confdefs.h <<EOF
22595 #define $ac_tr_hdr 1
22596 EOF
22597  
22598 else
22599   echo "$ac_t""no" 1>&6
22600 fi
22601 done
22602
22603         for ac_hdr in openssl/crypto.h crypto.h
22604 do
22605 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
22606 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
22607 echo "configure:22608: checking for $ac_hdr" >&5
22608 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
22609   echo $ac_n "(cached) $ac_c" 1>&6
22610 else
22611   cat > conftest.$ac_ext <<EOF
22612 #line 22613 "configure"
22613 #include "confdefs.h"
22614 #include <$ac_hdr>
22615 EOF
22616 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
22617 { (eval echo configure:22618: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
22618 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
22619 if test -z "$ac_err"; then
22620   rm -rf conftest*
22621   eval "ac_cv_header_$ac_safe=yes"
22622 else
22623   echo "$ac_err" >&5
22624   echo "configure: failed program was:" >&5
22625   cat conftest.$ac_ext >&5
22626   rm -rf conftest*
22627   eval "ac_cv_header_$ac_safe=no"
22628 fi
22629 rm -f conftest*
22630 fi
22631 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
22632   echo "$ac_t""yes" 1>&6
22633     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
22634   cat >> confdefs.h <<EOF
22635 #define $ac_tr_hdr 1
22636 EOF
22637  
22638 else
22639   echo "$ac_t""no" 1>&6
22640 fi
22641 done
22642
22643         for ac_hdr in gmp.h 
22644 do
22645 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
22646 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
22647 echo "configure:22648: checking for $ac_hdr" >&5
22648 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
22649   echo $ac_n "(cached) $ac_c" 1>&6
22650 else
22651   cat > conftest.$ac_ext <<EOF
22652 #line 22653 "configure"
22653 #include "confdefs.h"
22654 #include <$ac_hdr>
22655 EOF
22656 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
22657 { (eval echo configure:22658: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
22658 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
22659 if test -z "$ac_err"; then
22660   rm -rf conftest*
22661   eval "ac_cv_header_$ac_safe=yes"
22662 else
22663   echo "$ac_err" >&5
22664   echo "configure: failed program was:" >&5
22665   cat conftest.$ac_ext >&5
22666   rm -rf conftest*
22667   eval "ac_cv_header_$ac_safe=no"
22668 fi
22669 rm -f conftest*
22670 fi
22671 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
22672   echo "$ac_t""yes" 1>&6
22673     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
22674   cat >> confdefs.h <<EOF
22675 #define $ac_tr_hdr 1
22676 EOF
22677  
22678 else
22679   echo "$ac_t""no" 1>&6
22680 fi
22681 done
22682
22683
22684         if test "$ol_with_tls" = "found" ; then
22685                 ol_have_bn_h=no
22686                 ol_have_crypto_h=no
22687
22688                 if test "$ac_cv_header_openssl_bn_h" = "yes" \
22689                                 -o "$ac_cv_header_bn_h" = "yes" ; then
22690                         ol_have_bn_h=yes
22691                 fi
22692
22693                 if test "$ac_cv_header_openssl_crypto_h" = "yes" \
22694                                 -o "$ac_cv_header_crypto_h" = "yes" ; then
22695                         ol_have_crypto_h=yes
22696                 fi
22697
22698                 if test "$ol_have_bn_h" = "yes" \
22699                                 -a "$ol_have_crypto_h" = "yes" ; then
22700                         ol_have_bignum=yes
22701                 fi
22702         fi
22703
22704         if test $ac_cv_header_gmp_h = yes ; then
22705                 echo $ac_n "checking for __gmpz_add_ui in -lgmp""... $ac_c" 1>&6
22706 echo "configure:22707: checking for __gmpz_add_ui in -lgmp" >&5
22707 ac_lib_var=`echo gmp'_'__gmpz_add_ui | sed 'y%./+-:%__p__%'`
22708 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
22709   echo $ac_n "(cached) $ac_c" 1>&6
22710 else
22711   ac_save_LIBS="$LIBS"
22712 LIBS="-lgmp  $LIBS"
22713 cat > conftest.$ac_ext <<EOF
22714 #line 22715 "configure"
22715 #include "confdefs.h"
22716 /* Override any gcc2 internal prototype to avoid an error.  */
22717 /* We use char because int might match the return type of a gcc2
22718     builtin and then its argument prototype would still apply.  */
22719 char __gmpz_add_ui();
22720
22721 int main() {
22722 __gmpz_add_ui()
22723 ; return 0; }
22724 EOF
22725 if { (eval echo configure:22726: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22726   rm -rf conftest*
22727   eval "ac_cv_lib_$ac_lib_var=yes"
22728 else
22729   echo "configure: failed program was:" >&5
22730   cat conftest.$ac_ext >&5
22731   rm -rf conftest*
22732   eval "ac_cv_lib_$ac_lib_var=no"
22733 fi
22734 rm -f conftest*
22735 LIBS="$ac_save_LIBS"
22736
22737 fi
22738 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
22739   echo "$ac_t""yes" 1>&6
22740   have_gmp=yes
22741 else
22742   echo "$ac_t""no" 1>&6
22743 have_gmp=no
22744 fi
22745
22746                 if test $have_gmp = yes ; then
22747                         ol_have_gmp=yes
22748                 fi
22749         fi
22750
22751         echo $ac_n "checking for multiple precision support""... $ac_c" 1>&6
22752 echo "configure:22753: checking for multiple precision support" >&5
22753
22754         ol_mp_support="none"
22755         case "$ol_with_multiple_precision" in
22756         auto)
22757                                                                                 if test "$ol_have_bignum" = "yes" ; then
22758                         ol_mp_support="bignum"
22759                 else
22760                         if test "$ol_have_gmp" = "yes" ; then
22761                                 ol_mp_support="gmp"
22762                         fi
22763                 fi
22764                 ;;
22765         bignum)
22766                 if test "$ol_have_bignum" != "yes" ; then
22767                         { echo "configure: error: OpenSSL's BIGNUM not available" 1>&2; exit 1; }
22768                 fi
22769                 ol_mp_support="bignum"
22770                 ;;
22771         gmp)
22772                 if test "$ol_have_gmp" != "yes" ; then
22773                         { echo "configure: error: GMP not available" 1>&2; exit 1; }
22774                 fi
22775                 ol_mp_support="gmp"
22776                 ;;
22777         yes)
22778                 if test "$ol_have_bignum" = "yes" ; then
22779                         ol_mp_support="bignum"
22780                 elif test "$ol_have_gmp" = "yes" ; then
22781                         ol_mp_support="gmp"
22782                 else
22783                         { echo "configure: error: not available" 1>&2; exit 1; }
22784                 fi
22785                 ;;
22786         esac
22787
22788         case "$ol_mp_support" in
22789         bignum)
22790                 cat >> confdefs.h <<\EOF
22791 #define HAVE_BIGNUM 1
22792 EOF
22793
22794                 ;;
22795         gmp)
22796                 cat >> confdefs.h <<\EOF
22797 #define HAVE_GMP 1
22798 EOF
22799
22800                 SLAPD_GMP_LIBS=-lgmp
22801                 ;;
22802         none)
22803                 ;;
22804         esac
22805
22806         echo "$ac_t""$ol_mp_support" 1>&6
22807 fi
22808
22809
22810 echo $ac_n "checking long long""... $ac_c" 1>&6
22811 echo "configure:22812: checking long long" >&5
22812 if eval "test \"\${ol_cv_type_long_long+set}\" = set"; then
22813   echo $ac_n "(cached) $ac_c" 1>&6
22814 else
22815   
22816         cat > conftest.$ac_ext <<EOF
22817 #line 22818 "configure"
22818 #include "confdefs.h"
22819
22820 int main() {
22821 long long x;
22822 ; return 0; }
22823 EOF
22824 if { (eval echo configure:22825: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22825   rm -rf conftest*
22826   ol_cv_type_long_long=yes
22827 else
22828   echo "configure: failed program was:" >&5
22829   cat conftest.$ac_ext >&5
22830   rm -rf conftest*
22831   ol_cv_type_long_long=no
22832 fi
22833 rm -f conftest*
22834 fi
22835
22836 echo "$ac_t""$ol_cv_type_long_long" 1>&6
22837 if test $ol_cv_type_long_long = yes; then
22838         cat >> confdefs.h <<\EOF
22839 #define HAVE_LONG_LONG 1
22840 EOF
22841
22842 fi
22843
22844 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
22845 echo "configure:22846: checking for ANSI C header files" >&5
22846 if eval "test \"\${ac_cv_header_stdc+set}\" = set"; then
22847   echo $ac_n "(cached) $ac_c" 1>&6
22848 else
22849   cat > conftest.$ac_ext <<EOF
22850 #line 22851 "configure"
22851 #include "confdefs.h"
22852 #include <stdlib.h>
22853 #include <stdarg.h>
22854 #include <string.h>
22855 #include <float.h>
22856 EOF
22857 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
22858 { (eval echo configure:22859: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
22859 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
22860 if test -z "$ac_err"; then
22861   rm -rf conftest*
22862   ac_cv_header_stdc=yes
22863 else
22864   echo "$ac_err" >&5
22865   echo "configure: failed program was:" >&5
22866   cat conftest.$ac_ext >&5
22867   rm -rf conftest*
22868   ac_cv_header_stdc=no
22869 fi
22870 rm -f conftest*
22871
22872 if test $ac_cv_header_stdc = yes; then
22873   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
22874 cat > conftest.$ac_ext <<EOF
22875 #line 22876 "configure"
22876 #include "confdefs.h"
22877 #include <string.h>
22878 EOF
22879 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
22880   egrep "memchr" >/dev/null 2>&1; then
22881   :
22882 else
22883   rm -rf conftest*
22884   ac_cv_header_stdc=no
22885 fi
22886 rm -f conftest*
22887
22888 fi
22889
22890 if test $ac_cv_header_stdc = yes; then
22891   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
22892 cat > conftest.$ac_ext <<EOF
22893 #line 22894 "configure"
22894 #include "confdefs.h"
22895 #include <stdlib.h>
22896 EOF
22897 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
22898   egrep "free" >/dev/null 2>&1; then
22899   :
22900 else
22901   rm -rf conftest*
22902   ac_cv_header_stdc=no
22903 fi
22904 rm -f conftest*
22905
22906 fi
22907
22908 if test $ac_cv_header_stdc = yes; then
22909   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
22910 if test "$cross_compiling" = yes; then
22911   :
22912 else
22913   cat > conftest.$ac_ext <<EOF
22914 #line 22915 "configure"
22915 #include "confdefs.h"
22916 #include <ctype.h>
22917 #if ((' ' & 0x0FF) == 0x020)
22918 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
22919 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
22920 #else
22921 #define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
22922  || ('j' <= (c) && (c) <= 'r') \
22923  || ('s' <= (c) && (c) <= 'z'))
22924 #define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
22925 #endif
22926 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
22927 int main () { int i; for (i = 0; i < 256; i++)
22928 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
22929 exit (0); }
22930
22931 EOF
22932 if { (eval echo configure:22933: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
22933 then
22934   :
22935 else
22936   echo "configure: failed program was:" >&5
22937   cat conftest.$ac_ext >&5
22938   rm -fr conftest*
22939   ac_cv_header_stdc=no
22940 fi
22941 rm -fr conftest*
22942 fi
22943
22944 fi
22945 fi
22946
22947 echo "$ac_t""$ac_cv_header_stdc" 1>&6
22948 if test $ac_cv_header_stdc = yes; then
22949   cat >> confdefs.h <<\EOF
22950 #define STDC_HEADERS 1
22951 EOF
22952
22953 fi
22954
22955 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
22956 echo "configure:22957: checking for mode_t" >&5
22957 if eval "test \"\${ac_cv_type_mode_t+set}\" = set"; then
22958   echo $ac_n "(cached) $ac_c" 1>&6
22959 else
22960   cat > conftest.$ac_ext <<EOF
22961 #line 22962 "configure"
22962 #include "confdefs.h"
22963 #include <sys/types.h>
22964 #if STDC_HEADERS
22965 #include <stdlib.h>
22966 #include <stddef.h>
22967 #endif
22968
22969 EOF
22970 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
22971   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
22972   rm -rf conftest*
22973   eval "ac_cv_type_mode_t=yes"
22974 else
22975   rm -rf conftest*
22976   eval "ac_cv_type_mode_t=no"
22977 fi
22978 rm -f conftest*
22979
22980 fi
22981 if eval "test \"`echo '$ac_cv_type_'mode_t`\" = yes"; then
22982   echo "$ac_t""yes" 1>&6
22983 else
22984   echo "$ac_t""no" 1>&6
22985   cat >> confdefs.h <<EOF
22986 #define mode_t int
22987 EOF
22988
22989 fi
22990
22991 echo $ac_n "checking for off_t""... $ac_c" 1>&6
22992 echo "configure:22993: checking for off_t" >&5
22993 if eval "test \"\${ac_cv_type_off_t+set}\" = set"; then
22994   echo $ac_n "(cached) $ac_c" 1>&6
22995 else
22996   cat > conftest.$ac_ext <<EOF
22997 #line 22998 "configure"
22998 #include "confdefs.h"
22999 #include <sys/types.h>
23000 #if STDC_HEADERS
23001 #include <stdlib.h>
23002 #include <stddef.h>
23003 #endif
23004
23005 EOF
23006 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
23007   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
23008   rm -rf conftest*
23009   eval "ac_cv_type_off_t=yes"
23010 else
23011   rm -rf conftest*
23012   eval "ac_cv_type_off_t=no"
23013 fi
23014 rm -f conftest*
23015
23016 fi
23017 if eval "test \"`echo '$ac_cv_type_'off_t`\" = yes"; then
23018   echo "$ac_t""yes" 1>&6
23019 else
23020   echo "$ac_t""no" 1>&6
23021   cat >> confdefs.h <<EOF
23022 #define off_t long
23023 EOF
23024
23025 fi
23026
23027 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
23028 echo "configure:23029: checking for pid_t" >&5
23029 if eval "test \"\${ac_cv_type_pid_t+set}\" = set"; then
23030   echo $ac_n "(cached) $ac_c" 1>&6
23031 else
23032   cat > conftest.$ac_ext <<EOF
23033 #line 23034 "configure"
23034 #include "confdefs.h"
23035 #include <sys/types.h>
23036 #if STDC_HEADERS
23037 #include <stdlib.h>
23038 #include <stddef.h>
23039 #endif
23040
23041 EOF
23042 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
23043   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
23044   rm -rf conftest*
23045   eval "ac_cv_type_pid_t=yes"
23046 else
23047   rm -rf conftest*
23048   eval "ac_cv_type_pid_t=no"
23049 fi
23050 rm -f conftest*
23051
23052 fi
23053 if eval "test \"`echo '$ac_cv_type_'pid_t`\" = yes"; then
23054   echo "$ac_t""yes" 1>&6
23055 else
23056   echo "$ac_t""no" 1>&6
23057   cat >> confdefs.h <<EOF
23058 #define pid_t int
23059 EOF
23060
23061 fi
23062
23063 echo $ac_n "checking for ptrdiff_t""... $ac_c" 1>&6
23064 echo "configure:23065: checking for ptrdiff_t" >&5
23065 if eval "test \"\${am_cv_type_ptrdiff_t+set}\" = set"; then
23066   echo $ac_n "(cached) $ac_c" 1>&6
23067 else
23068   cat > conftest.$ac_ext <<EOF
23069 #line 23070 "configure"
23070 #include "confdefs.h"
23071 #include <stddef.h>
23072 int main() {
23073 ptrdiff_t p
23074 ; return 0; }
23075 EOF
23076 if { (eval echo configure:23077: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23077   rm -rf conftest*
23078   am_cv_type_ptrdiff_t=yes
23079 else
23080   echo "configure: failed program was:" >&5
23081   cat conftest.$ac_ext >&5
23082   rm -rf conftest*
23083   am_cv_type_ptrdiff_t=no
23084 fi
23085 rm -f conftest*
23086 fi
23087
23088 echo "$ac_t""$am_cv_type_ptrdiff_t" 1>&6
23089    if test $am_cv_type_ptrdiff_t = yes; then
23090      cat >> confdefs.h <<\EOF
23091 #define HAVE_PTRDIFF_T 1
23092 EOF
23093
23094    fi
23095
23096 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
23097 echo "configure:23098: checking return type of signal handlers" >&5
23098 if eval "test \"\${ac_cv_type_signal+set}\" = set"; then
23099   echo $ac_n "(cached) $ac_c" 1>&6
23100 else
23101   cat > conftest.$ac_ext <<EOF
23102 #line 23103 "configure"
23103 #include "confdefs.h"
23104 #include <sys/types.h>
23105 #include <signal.h>
23106 #ifdef signal
23107 #undef signal
23108 #endif
23109 #ifdef __cplusplus
23110 extern "C" void (*signal (int, void (*)(int)))(int);
23111 #else
23112 void (*signal ()) ();
23113 #endif
23114
23115 int main() {
23116 int i;
23117 ; return 0; }
23118 EOF
23119 if { (eval echo configure:23120: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23120   rm -rf conftest*
23121   ac_cv_type_signal=void
23122 else
23123   echo "configure: failed program was:" >&5
23124   cat conftest.$ac_ext >&5
23125   rm -rf conftest*
23126   ac_cv_type_signal=int
23127 fi
23128 rm -f conftest*
23129 fi
23130
23131 echo "$ac_t""$ac_cv_type_signal" 1>&6
23132 cat >> confdefs.h <<EOF
23133 #define RETSIGTYPE $ac_cv_type_signal
23134 EOF
23135
23136
23137 echo $ac_n "checking for size_t""... $ac_c" 1>&6
23138 echo "configure:23139: checking for size_t" >&5
23139 if eval "test \"\${ac_cv_type_size_t+set}\" = set"; then
23140   echo $ac_n "(cached) $ac_c" 1>&6
23141 else
23142   cat > conftest.$ac_ext <<EOF
23143 #line 23144 "configure"
23144 #include "confdefs.h"
23145 #include <sys/types.h>
23146 #if STDC_HEADERS
23147 #include <stdlib.h>
23148 #include <stddef.h>
23149 #endif
23150
23151 EOF
23152 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
23153   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
23154   rm -rf conftest*
23155   eval "ac_cv_type_size_t=yes"
23156 else
23157   rm -rf conftest*
23158   eval "ac_cv_type_size_t=no"
23159 fi
23160 rm -f conftest*
23161
23162 fi
23163 if eval "test \"`echo '$ac_cv_type_'size_t`\" = yes"; then
23164   echo "$ac_t""yes" 1>&6
23165 else
23166   echo "$ac_t""no" 1>&6
23167   cat >> confdefs.h <<EOF
23168 #define size_t unsigned
23169 EOF
23170
23171 fi
23172
23173
23174 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
23175 echo "configure:23176: checking for ssize_t" >&5
23176 if eval "test \"\${ac_cv_type_ssize_t+set}\" = set"; then
23177   echo $ac_n "(cached) $ac_c" 1>&6
23178 else
23179   cat > conftest.$ac_ext <<EOF
23180 #line 23181 "configure"
23181 #include "confdefs.h"
23182 #include <sys/types.h>
23183 #if STDC_HEADERS
23184 #include <stdlib.h>
23185 #include <stddef.h>
23186 #endif
23187
23188 EOF
23189 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
23190   egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
23191   rm -rf conftest*
23192   eval "ac_cv_type_ssize_t=yes"
23193 else
23194   rm -rf conftest*
23195   eval "ac_cv_type_ssize_t=no"
23196 fi
23197 rm -f conftest*
23198
23199 fi
23200 if eval "test \"`echo '$ac_cv_type_'ssize_t`\" = yes"; then
23201   echo "$ac_t""yes" 1>&6
23202 else
23203   echo "$ac_t""no" 1>&6
23204   cat >> confdefs.h <<EOF
23205 #define ssize_t signed int
23206 EOF
23207
23208 fi
23209
23210 echo $ac_n "checking for caddr_t""... $ac_c" 1>&6
23211 echo "configure:23212: checking for caddr_t" >&5
23212 if eval "test \"\${ac_cv_type_caddr_t+set}\" = set"; then
23213   echo $ac_n "(cached) $ac_c" 1>&6
23214 else
23215   cat > conftest.$ac_ext <<EOF
23216 #line 23217 "configure"
23217 #include "confdefs.h"
23218 #include <sys/types.h>
23219 #if STDC_HEADERS
23220 #include <stdlib.h>
23221 #include <stddef.h>
23222 #endif
23223
23224 EOF
23225 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
23226   egrep "(^|[^a-zA-Z_0-9])caddr_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
23227   rm -rf conftest*
23228   eval "ac_cv_type_caddr_t=yes"
23229 else
23230   rm -rf conftest*
23231   eval "ac_cv_type_caddr_t=no"
23232 fi
23233 rm -f conftest*
23234
23235 fi
23236 if eval "test \"`echo '$ac_cv_type_'caddr_t`\" = yes"; then
23237   echo "$ac_t""yes" 1>&6
23238 else
23239   echo "$ac_t""no" 1>&6
23240   cat >> confdefs.h <<EOF
23241 #define caddr_t char *
23242 EOF
23243
23244 fi
23245
23246
23247 echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
23248 echo "configure:23249: checking for socklen_t" >&5
23249 if eval "test \"\${ol_cv_type_socklen_t+set}\" = set"; then
23250   echo $ac_n "(cached) $ac_c" 1>&6
23251 else
23252   cat > conftest.$ac_ext <<EOF
23253 #line 23254 "configure"
23254 #include "confdefs.h"
23255
23256 #ifdef HAVE_SYS_TYPES_H
23257 #include <sys/types.h>
23258 #endif
23259 #ifdef HAVE_SYS_SOCKET_H
23260 #include <sys/socket.h>
23261 #endif
23262
23263 int main() {
23264 socklen_t len;
23265 ; return 0; }
23266 EOF
23267 if { (eval echo configure:23268: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23268   rm -rf conftest*
23269   ol_cv_type_socklen_t=yes
23270 else
23271   echo "configure: failed program was:" >&5
23272   cat conftest.$ac_ext >&5
23273   rm -rf conftest*
23274   ol_cv_type_socklen_t=no
23275 fi
23276 rm -f conftest*
23277 fi
23278
23279 echo "$ac_t""$ol_cv_type_socklen_t" 1>&6
23280   if test $ol_cv_type_socklen_t = no; then
23281     cat >> confdefs.h <<\EOF
23282 #define socklen_t int
23283 EOF
23284
23285   fi
23286  
23287 echo $ac_n "checking for member st_blksize in aggregate type struct stat""... $ac_c" 1>&6
23288 echo "configure:23289: checking for member st_blksize in aggregate type struct stat" >&5
23289 if eval "test \"\${ac_cv_c_struct_member_st_blksize+set}\" = set"; then
23290   echo $ac_n "(cached) $ac_c" 1>&6
23291 else
23292   cat > conftest.$ac_ext <<EOF
23293 #line 23294 "configure"
23294 #include "confdefs.h"
23295 #include <sys/types.h>
23296 #include <sys/stat.h>
23297 int main() {
23298 struct stat foo; foo.st_blksize;
23299 ; return 0; }
23300 EOF
23301 if { (eval echo configure:23302: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23302   rm -rf conftest*
23303   ac_cv_c_struct_member_st_blksize=yes
23304 else
23305   echo "configure: failed program was:" >&5
23306   cat conftest.$ac_ext >&5
23307   rm -rf conftest*
23308   ac_cv_c_struct_member_st_blksize=no
23309 fi
23310 rm -f conftest*
23311 fi
23312
23313 echo "$ac_t""$ac_cv_c_struct_member_st_blksize" 1>&6
23314 st_blksize="$ac_cv_c_struct_member_st_blksize"
23315 if test $ac_cv_c_struct_member_st_blksize = yes; then
23316   cat >> confdefs.h <<\EOF
23317 #define HAVE_ST_BLKSIZE 1
23318 EOF
23319
23320 fi
23321
23322 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
23323 echo "configure:23324: checking whether time.h and sys/time.h may both be included" >&5
23324 if eval "test \"\${ac_cv_header_time+set}\" = set"; then
23325   echo $ac_n "(cached) $ac_c" 1>&6
23326 else
23327   cat > conftest.$ac_ext <<EOF
23328 #line 23329 "configure"
23329 #include "confdefs.h"
23330 #include <sys/types.h>
23331 #include <sys/time.h>
23332 #include <time.h>
23333 int main() {
23334 struct tm *tp;
23335 ; return 0; }
23336 EOF
23337 if { (eval echo configure:23338: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23338   rm -rf conftest*
23339   ac_cv_header_time=yes
23340 else
23341   echo "configure: failed program was:" >&5
23342   cat conftest.$ac_ext >&5
23343   rm -rf conftest*
23344   ac_cv_header_time=no
23345 fi
23346 rm -f conftest*
23347 fi
23348
23349 echo "$ac_t""$ac_cv_header_time" 1>&6
23350 if test $ac_cv_header_time = yes; then
23351   cat >> confdefs.h <<\EOF
23352 #define TIME_WITH_SYS_TIME 1
23353 EOF
23354
23355 fi
23356
23357 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
23358 echo "configure:23359: checking whether struct tm is in sys/time.h or time.h" >&5
23359 if eval "test \"\${ac_cv_struct_tm+set}\" = set"; then
23360   echo $ac_n "(cached) $ac_c" 1>&6
23361 else
23362   cat > conftest.$ac_ext <<EOF
23363 #line 23364 "configure"
23364 #include "confdefs.h"
23365 #include <sys/types.h>
23366 #include <time.h>
23367 int main() {
23368 struct tm *tp; tp->tm_sec;
23369 ; return 0; }
23370 EOF
23371 if { (eval echo configure:23372: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23372   rm -rf conftest*
23373   ac_cv_struct_tm=time.h
23374 else
23375   echo "configure: failed program was:" >&5
23376   cat conftest.$ac_ext >&5
23377   rm -rf conftest*
23378   ac_cv_struct_tm=sys/time.h
23379 fi
23380 rm -f conftest*
23381 fi
23382
23383 echo "$ac_t""$ac_cv_struct_tm" 1>&6
23384 if test $ac_cv_struct_tm = sys/time.h; then
23385   cat >> confdefs.h <<\EOF
23386 #define TM_IN_SYS_TIME 1
23387 EOF
23388
23389 fi
23390
23391 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
23392 echo "configure:23393: checking for uid_t in sys/types.h" >&5
23393 if eval "test \"\${ac_cv_type_uid_t+set}\" = set"; then
23394   echo $ac_n "(cached) $ac_c" 1>&6
23395 else
23396   cat > conftest.$ac_ext <<EOF
23397 #line 23398 "configure"
23398 #include "confdefs.h"
23399 #include <sys/types.h>
23400 EOF
23401 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
23402   egrep "uid_t" >/dev/null 2>&1; then
23403   rm -rf conftest*
23404   ac_cv_type_uid_t=yes
23405 else
23406   rm -rf conftest*
23407   ac_cv_type_uid_t=no
23408 fi
23409 rm -f conftest*
23410
23411 fi
23412
23413 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
23414 if test $ac_cv_type_uid_t = no; then
23415   cat >> confdefs.h <<\EOF
23416 #define uid_t int
23417 EOF
23418
23419   cat >> confdefs.h <<\EOF
23420 #define gid_t int
23421 EOF
23422
23423 fi
23424
23425 echo $ac_n "checking for sig_atomic_t""... $ac_c" 1>&6
23426 echo "configure:23427: checking for sig_atomic_t" >&5
23427 if eval "test \"\${ol_cv_type_sig_atomic_t+set}\" = set"; then
23428   echo $ac_n "(cached) $ac_c" 1>&6
23429 else
23430   cat > conftest.$ac_ext <<EOF
23431 #line 23432 "configure"
23432 #include "confdefs.h"
23433 #include <signal.h>
23434 int main() {
23435 sig_atomic_t atomic;
23436 ; return 0; }
23437 EOF
23438 if { (eval echo configure:23439: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23439   rm -rf conftest*
23440   ol_cv_type_sig_atomic_t=yes
23441 else
23442   echo "configure: failed program was:" >&5
23443   cat conftest.$ac_ext >&5
23444   rm -rf conftest*
23445   ol_cv_type_sig_atomic_t=no
23446 fi
23447 rm -f conftest*
23448 fi
23449
23450 echo "$ac_t""$ol_cv_type_sig_atomic_t" 1>&6
23451   if test $ol_cv_type_sig_atomic_t = no; then
23452     cat >> confdefs.h <<\EOF
23453 #define sig_atomic_t int
23454 EOF
23455
23456   fi
23457  
23458
23459
23460 # test for pw_gecos in struct passwd
23461 echo $ac_n "checking struct passwd for pw_gecos""... $ac_c" 1>&6
23462 echo "configure:23463: checking struct passwd for pw_gecos" >&5
23463 if eval "test \"\${ol_cv_struct_passwd_pw_gecos+set}\" = set"; then
23464   echo $ac_n "(cached) $ac_c" 1>&6
23465 else
23466   
23467         cat > conftest.$ac_ext <<EOF
23468 #line 23469 "configure"
23469 #include "confdefs.h"
23470 #include <pwd.h>
23471 int main() {
23472
23473         struct passwd pwd;
23474         pwd.pw_gecos = pwd.pw_name;
23475
23476 ; return 0; }
23477 EOF
23478 if { (eval echo configure:23479: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23479   rm -rf conftest*
23480   ol_cv_struct_passwd_pw_gecos=yes
23481 else
23482   echo "configure: failed program was:" >&5
23483   cat conftest.$ac_ext >&5
23484   rm -rf conftest*
23485   ol_cv_struct_passwd_pw_gecos=no
23486 fi
23487 rm -f conftest*
23488 fi
23489
23490 echo "$ac_t""$ol_cv_struct_passwd_pw_gecos" 1>&6
23491 if test $ol_cv_struct_passwd_pw_gecos = yes ; then
23492         cat >> confdefs.h <<\EOF
23493 #define HAVE_PW_GECOS 1
23494 EOF
23495
23496 fi
23497
23498 # test for pw_passwd in struct passwd
23499 echo $ac_n "checking struct passwd for pw_passwd""... $ac_c" 1>&6
23500 echo "configure:23501: checking struct passwd for pw_passwd" >&5
23501 if eval "test \"\${ol_cv_struct_passwd_pw_passwd+set}\" = set"; then
23502   echo $ac_n "(cached) $ac_c" 1>&6
23503 else
23504   
23505         cat > conftest.$ac_ext <<EOF
23506 #line 23507 "configure"
23507 #include "confdefs.h"
23508 #include <pwd.h>
23509 int main() {
23510
23511         struct passwd pwd;
23512         pwd.pw_passwd = pwd.pw_name;
23513
23514 ; return 0; }
23515 EOF
23516 if { (eval echo configure:23517: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23517   rm -rf conftest*
23518   ol_cv_struct_passwd_pw_passwd=yes
23519 else
23520   echo "configure: failed program was:" >&5
23521   cat conftest.$ac_ext >&5
23522   rm -rf conftest*
23523   ol_cv_struct_passwd_pw_passwd=no
23524 fi
23525 rm -f conftest*
23526 fi
23527
23528 echo "$ac_t""$ol_cv_struct_passwd_pw_passwd" 1>&6
23529 if test $ol_cv_struct_passwd_pw_passwd = yes ; then
23530         cat >> confdefs.h <<\EOF
23531 #define HAVE_PW_PASSWD 1
23532 EOF
23533
23534 fi
23535
23536
23537 echo $ac_n "checking if toupper() requires islower()""... $ac_c" 1>&6
23538 echo "configure:23539: checking if toupper() requires islower()" >&5
23539 if eval "test \"\${ol_cv_c_upper_lower+set}\" = set"; then
23540   echo $ac_n "(cached) $ac_c" 1>&6
23541 else
23542   
23543         if test "$cross_compiling" = yes; then
23544   ol_cv_c_upper_lower=safe
23545 else
23546   cat > conftest.$ac_ext <<EOF
23547 #line 23548 "configure"
23548 #include "confdefs.h"
23549
23550 #include <ctype.h>
23551 main()
23552 {
23553         if ('C' == toupper('C'))
23554                 exit(0);
23555         else
23556                 exit(1);
23557 }
23558 EOF
23559 if { (eval echo configure:23560: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
23560 then
23561   ol_cv_c_upper_lower=no
23562 else
23563   echo "configure: failed program was:" >&5
23564   cat conftest.$ac_ext >&5
23565   rm -fr conftest*
23566   ol_cv_c_upper_lower=yes
23567 fi
23568 rm -fr conftest*
23569 fi
23570
23571 fi
23572
23573 echo "$ac_t""$ol_cv_c_upper_lower" 1>&6
23574 if test $ol_cv_c_upper_lower != no ; then
23575         cat >> confdefs.h <<\EOF
23576 #define C_UPPER_LOWER 1
23577 EOF
23578
23579 fi
23580
23581 echo $ac_n "checking for working const""... $ac_c" 1>&6
23582 echo "configure:23583: checking for working const" >&5
23583 if eval "test \"\${ac_cv_c_const+set}\" = set"; then
23584   echo $ac_n "(cached) $ac_c" 1>&6
23585 else
23586   cat > conftest.$ac_ext <<EOF
23587 #line 23588 "configure"
23588 #include "confdefs.h"
23589
23590 int main() {
23591
23592 /* Ultrix mips cc rejects this.  */
23593 typedef int charset[2]; const charset x;
23594 /* SunOS 4.1.1 cc rejects this.  */
23595 char const *const *ccp;
23596 char **p;
23597 /* NEC SVR4.0.2 mips cc rejects this.  */
23598 struct point {int x, y;};
23599 static struct point const zero = {0,0};
23600 /* AIX XL C 1.02.0.0 rejects this.
23601    It does not let you subtract one const X* pointer from another in an arm
23602    of an if-expression whose if-part is not a constant expression */
23603 const char *g = "string";
23604 ccp = &g + (g ? g-g : 0);
23605 /* HPUX 7.0 cc rejects these. */
23606 ++ccp;
23607 p = (char**) ccp;
23608 ccp = (char const *const *) p;
23609 { /* SCO 3.2v4 cc rejects this.  */
23610   char *t;
23611   char const *s = 0 ? (char *) 0 : (char const *) 0;
23612
23613   *t++ = 0;
23614 }
23615 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
23616   int x[] = {25, 17};
23617   const int *foo = &x[0];
23618   ++foo;
23619 }
23620 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
23621   typedef const int *iptr;
23622   iptr p = 0;
23623   ++p;
23624 }
23625 { /* AIX XL C 1.02.0.0 rejects this saying
23626      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
23627   struct s { int j; const int *ap[3]; };
23628   struct s *b; b->j = 5;
23629 }
23630 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
23631   const int foo = 10;
23632 }
23633
23634 ; return 0; }
23635 EOF
23636 if { (eval echo configure:23637: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23637   rm -rf conftest*
23638   ac_cv_c_const=yes
23639 else
23640   echo "configure: failed program was:" >&5
23641   cat conftest.$ac_ext >&5
23642   rm -rf conftest*
23643   ac_cv_c_const=no
23644 fi
23645 rm -f conftest*
23646 fi
23647
23648 echo "$ac_t""$ac_cv_c_const" 1>&6
23649 if test $ac_cv_c_const = no; then
23650   cat >> confdefs.h <<\EOF
23651 #define const 
23652 EOF
23653
23654 fi
23655
23656 echo $ac_n "checking if compiler understands volatile""... $ac_c" 1>&6
23657 echo "configure:23658: checking if compiler understands volatile" >&5
23658 if eval "test \"\${ol_cv_c_volatile+set}\" = set"; then
23659   echo $ac_n "(cached) $ac_c" 1>&6
23660 else
23661   cat > conftest.$ac_ext <<EOF
23662 #line 23663 "configure"
23663 #include "confdefs.h"
23664 int x, y, z;
23665 int main() {
23666 volatile int a; int * volatile b = x ? &y : &z;
23667       /* Older MIPS compilers (eg., in Ultrix 4.2) don't like *b = 0 */
23668       *b = 0;
23669 ; return 0; }
23670 EOF
23671 if { (eval echo configure:23672: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23672   rm -rf conftest*
23673   ol_cv_c_volatile=yes
23674 else
23675   echo "configure: failed program was:" >&5
23676   cat conftest.$ac_ext >&5
23677   rm -rf conftest*
23678   ol_cv_c_volatile=no
23679 fi
23680 rm -f conftest*
23681 fi
23682
23683 echo "$ac_t""$ol_cv_c_volatile" 1>&6
23684   if test $ol_cv_c_volatile = yes; then
23685     : 
23686   else
23687     cat >> confdefs.h <<\EOF
23688 #define volatile 
23689 EOF
23690
23691   fi
23692  
23693
23694 if test $cross_compiling = yes ; then
23695         echo "configure: warning: Crossing compiling... all bets are off!" 1>&2
23696         cat >> confdefs.h <<\EOF
23697 #define CROSS_COMPILING 1
23698 EOF
23699
23700 else
23701         echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
23702 echo "configure:23703: checking whether byte ordering is bigendian" >&5
23703 if eval "test \"\${ac_cv_c_bigendian+set}\" = set"; then
23704   echo $ac_n "(cached) $ac_c" 1>&6
23705 else
23706   ac_cv_c_bigendian=unknown
23707 # See if sys/param.h defines the BYTE_ORDER macro.
23708 cat > conftest.$ac_ext <<EOF
23709 #line 23710 "configure"
23710 #include "confdefs.h"
23711 #include <sys/types.h>
23712 #include <sys/param.h>
23713 int main() {
23714
23715 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
23716  bogus endian macros
23717 #endif
23718 ; return 0; }
23719 EOF
23720 if { (eval echo configure:23721: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23721   rm -rf conftest*
23722   # It does; now see whether it defined to BIG_ENDIAN or not.
23723 cat > conftest.$ac_ext <<EOF
23724 #line 23725 "configure"
23725 #include "confdefs.h"
23726 #include <sys/types.h>
23727 #include <sys/param.h>
23728 int main() {
23729
23730 #if BYTE_ORDER != BIG_ENDIAN
23731  not big endian
23732 #endif
23733 ; return 0; }
23734 EOF
23735 if { (eval echo configure:23736: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23736   rm -rf conftest*
23737   ac_cv_c_bigendian=yes
23738 else
23739   echo "configure: failed program was:" >&5
23740   cat conftest.$ac_ext >&5
23741   rm -rf conftest*
23742   ac_cv_c_bigendian=no
23743 fi
23744 rm -f conftest*
23745 else
23746   echo "configure: failed program was:" >&5
23747   cat conftest.$ac_ext >&5
23748 fi
23749 rm -f conftest*
23750 if test $ac_cv_c_bigendian = unknown; then
23751 if test "$cross_compiling" = yes; then
23752     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
23753 else
23754   cat > conftest.$ac_ext <<EOF
23755 #line 23756 "configure"
23756 #include "confdefs.h"
23757 main () {
23758   /* Are we little or big endian?  From Harbison&Steele.  */
23759   union
23760   {
23761     long l;
23762     char c[sizeof (long)];
23763   } u;
23764   u.l = 1;
23765   exit (u.c[sizeof (long) - 1] == 1);
23766 }
23767 EOF
23768 if { (eval echo configure:23769: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
23769 then
23770   ac_cv_c_bigendian=no
23771 else
23772   echo "configure: failed program was:" >&5
23773   cat conftest.$ac_ext >&5
23774   rm -fr conftest*
23775   ac_cv_c_bigendian=yes
23776 fi
23777 rm -fr conftest*
23778 fi
23779
23780 fi
23781 fi
23782
23783 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
23784 if test $ac_cv_c_bigendian = yes; then
23785   cat >> confdefs.h <<\EOF
23786 #define WORDS_BIGENDIAN 1
23787 EOF
23788
23789 fi
23790
23791 fi
23792
23793 echo $ac_n "checking size of short""... $ac_c" 1>&6
23794 echo "configure:23795: checking size of short" >&5 
23795 if eval "test \"\${ac_cv_sizeof_short+set}\" = set"; then
23796   echo $ac_n "(cached) $ac_c" 1>&6
23797 else
23798   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
23799   cat > conftest.$ac_ext <<EOF
23800 #line 23801 "configure"
23801 #include "confdefs.h"
23802 #include "confdefs.h" 
23803 #include <stdlib.h>
23804 #include <sys/types.h> 
23805  
23806
23807 int main() {
23808 switch (0) case 0: case (sizeof (short) == $ac_size):;
23809 ; return 0; }
23810 EOF
23811 if { (eval echo configure:23812: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23812   rm -rf conftest*
23813   ac_cv_sizeof_short=$ac_size
23814 else
23815   echo "configure: failed program was:" >&5
23816   cat conftest.$ac_ext >&5
23817 fi
23818 rm -f conftest* 
23819   if test x$ac_cv_sizeof_short != x ; then break; fi 
23820 done 
23821
23822 fi
23823  
23824 if test x$ac_cv_sizeof_short = x ; then 
23825   { echo "configure: error: cannot determine a size for short" 1>&2; exit 1; } 
23826 fi 
23827 echo "$ac_t""$ac_cv_sizeof_short" 1>&6 
23828 cat >> confdefs.h <<EOF
23829 #define SIZEOF_SHORT $ac_cv_sizeof_short
23830 EOF
23831  
23832  
23833 echo $ac_n "checking size of int""... $ac_c" 1>&6
23834 echo "configure:23835: checking size of int" >&5 
23835 if eval "test \"\${ac_cv_sizeof_int+set}\" = set"; then
23836   echo $ac_n "(cached) $ac_c" 1>&6
23837 else
23838   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
23839   cat > conftest.$ac_ext <<EOF
23840 #line 23841 "configure"
23841 #include "confdefs.h"
23842 #include "confdefs.h" 
23843 #include <stdlib.h>
23844 #include <sys/types.h> 
23845  
23846
23847 int main() {
23848 switch (0) case 0: case (sizeof (int) == $ac_size):;
23849 ; return 0; }
23850 EOF
23851 if { (eval echo configure:23852: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23852   rm -rf conftest*
23853   ac_cv_sizeof_int=$ac_size
23854 else
23855   echo "configure: failed program was:" >&5
23856   cat conftest.$ac_ext >&5
23857 fi
23858 rm -f conftest* 
23859   if test x$ac_cv_sizeof_int != x ; then break; fi 
23860 done 
23861
23862 fi
23863  
23864 if test x$ac_cv_sizeof_int = x ; then 
23865   { echo "configure: error: cannot determine a size for int" 1>&2; exit 1; } 
23866 fi 
23867 echo "$ac_t""$ac_cv_sizeof_int" 1>&6 
23868 cat >> confdefs.h <<EOF
23869 #define SIZEOF_INT $ac_cv_sizeof_int
23870 EOF
23871  
23872  
23873 echo $ac_n "checking size of long""... $ac_c" 1>&6
23874 echo "configure:23875: checking size of long" >&5 
23875 if eval "test \"\${ac_cv_sizeof_long+set}\" = set"; then
23876   echo $ac_n "(cached) $ac_c" 1>&6
23877 else
23878   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
23879   cat > conftest.$ac_ext <<EOF
23880 #line 23881 "configure"
23881 #include "confdefs.h"
23882 #include "confdefs.h" 
23883 #include <stdlib.h>
23884 #include <sys/types.h> 
23885  
23886
23887 int main() {
23888 switch (0) case 0: case (sizeof (long) == $ac_size):;
23889 ; return 0; }
23890 EOF
23891 if { (eval echo configure:23892: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23892   rm -rf conftest*
23893   ac_cv_sizeof_long=$ac_size
23894 else
23895   echo "configure: failed program was:" >&5
23896   cat conftest.$ac_ext >&5
23897 fi
23898 rm -f conftest* 
23899   if test x$ac_cv_sizeof_long != x ; then break; fi 
23900 done 
23901
23902 fi
23903  
23904 if test x$ac_cv_sizeof_long = x ; then 
23905   { echo "configure: error: cannot determine a size for long" 1>&2; exit 1; } 
23906 fi 
23907 echo "$ac_t""$ac_cv_sizeof_long" 1>&6 
23908 cat >> confdefs.h <<EOF
23909 #define SIZEOF_LONG $ac_cv_sizeof_long
23910 EOF
23911  
23912
23913 echo $ac_n "checking size of wchar_t""... $ac_c" 1>&6
23914 echo "configure:23915: checking size of wchar_t" >&5 
23915 if eval "test \"\${ac_cv_sizeof_wchar_t+set}\" = set"; then
23916   echo $ac_n "(cached) $ac_c" 1>&6
23917 else
23918   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
23919   cat > conftest.$ac_ext <<EOF
23920 #line 23921 "configure"
23921 #include "confdefs.h"
23922 #include "confdefs.h" 
23923 #include <stdlib.h>
23924 #include <sys/types.h> 
23925  
23926
23927 int main() {
23928 switch (0) case 0: case (sizeof (wchar_t) == $ac_size):;
23929 ; return 0; }
23930 EOF
23931 if { (eval echo configure:23932: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23932   rm -rf conftest*
23933   ac_cv_sizeof_wchar_t=$ac_size
23934 else
23935   echo "configure: failed program was:" >&5
23936   cat conftest.$ac_ext >&5
23937 fi
23938 rm -f conftest* 
23939   if test x$ac_cv_sizeof_wchar_t != x ; then break; fi 
23940 done 
23941
23942 fi
23943  
23944 if test x$ac_cv_sizeof_wchar_t = x ; then 
23945   { echo "configure: error: cannot determine a size for wchar_t" 1>&2; exit 1; } 
23946 fi 
23947 echo "$ac_t""$ac_cv_sizeof_wchar_t" 1>&6 
23948 cat >> confdefs.h <<EOF
23949 #define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
23950 EOF
23951  
23952
23953
23954 if test "$ac_cv_sizeof_int" -lt 4 ; then
23955         echo "configure: warning: OpenLDAP requires 'int' to be 32 bits or greater." 1>&2
23956
23957         cat >> confdefs.h <<\EOF
23958 #define LBER_INT_T long
23959 EOF
23960
23961 else
23962         cat >> confdefs.h <<\EOF
23963 #define LBER_INT_T int
23964 EOF
23965
23966 fi
23967
23968 cat >> confdefs.h <<\EOF
23969 #define LBER_LEN_T long
23970 EOF
23971
23972 cat >> confdefs.h <<\EOF
23973 #define LBER_SOCKET_T int
23974 EOF
23975
23976 cat >> confdefs.h <<\EOF
23977 #define LBER_TAG_T long
23978 EOF
23979
23980
23981 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
23982 echo "configure:23983: checking for 8-bit clean memcmp" >&5
23983 if eval "test \"\${ac_cv_func_memcmp_clean+set}\" = set"; then
23984   echo $ac_n "(cached) $ac_c" 1>&6
23985 else
23986   if test "$cross_compiling" = yes; then
23987   ac_cv_func_memcmp_clean=no
23988 else
23989   cat > conftest.$ac_ext <<EOF
23990 #line 23991 "configure"
23991 #include "confdefs.h"
23992
23993 main()
23994 {
23995   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
23996   exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
23997 }
23998
23999 EOF
24000 if { (eval echo configure:24001: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
24001 then
24002   ac_cv_func_memcmp_clean=yes
24003 else
24004   echo "configure: failed program was:" >&5
24005   cat conftest.$ac_ext >&5
24006   rm -fr conftest*
24007   ac_cv_func_memcmp_clean=no
24008 fi
24009 rm -fr conftest*
24010 fi
24011
24012 fi
24013
24014 echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
24015 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
24016
24017
24018 if test $ac_cv_func_memcmp_clean = no ; then
24019         cat >> confdefs.h <<\EOF
24020 #define NEED_MEMCMP_REPLACEMENT 1
24021 EOF
24022
24023 fi
24024
24025 echo $ac_n "checking for strftime""... $ac_c" 1>&6
24026 echo "configure:24027: checking for strftime" >&5
24027 if eval "test \"\${ac_cv_func_strftime+set}\" = set"; then
24028   echo $ac_n "(cached) $ac_c" 1>&6
24029 else
24030   cat > conftest.$ac_ext <<EOF
24031 #line 24032 "configure"
24032 #include "confdefs.h"
24033 /* System header to define __stub macros and hopefully few prototypes,
24034     which can conflict with char strftime(); below.  */
24035 #include <assert.h>
24036 /* Override any gcc2 internal prototype to avoid an error.  */
24037 /* We use char because int might match the return type of a gcc2
24038     builtin and then its argument prototype would still apply.  */
24039 char strftime();
24040 char (*f)();
24041
24042 int main() {
24043
24044 /* The GNU C library defines this for functions which it implements
24045     to always fail with ENOSYS.  Some functions are actually named
24046     something starting with __ and the normal name is an alias.  */
24047 #if defined (__stub_strftime) || defined (__stub___strftime)
24048 choke me
24049 #else
24050 f = strftime;
24051 #endif
24052
24053 ; return 0; }
24054 EOF
24055 if { (eval echo configure:24056: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
24056   rm -rf conftest*
24057   eval "ac_cv_func_strftime=yes"
24058 else
24059   echo "configure: failed program was:" >&5
24060   cat conftest.$ac_ext >&5
24061   rm -rf conftest*
24062   eval "ac_cv_func_strftime=no"
24063 fi
24064 rm -f conftest*
24065 fi
24066
24067 if eval "test \"`echo '$ac_cv_func_'strftime`\" = yes"; then
24068   echo "$ac_t""yes" 1>&6
24069   cat >> confdefs.h <<\EOF
24070 #define HAVE_STRFTIME 1
24071 EOF
24072
24073 else
24074   echo "$ac_t""no" 1>&6
24075 # strftime is in -lintl on SCO UNIX.
24076 echo $ac_n "checking for strftime in -lintl""... $ac_c" 1>&6
24077 echo "configure:24078: checking for strftime in -lintl" >&5
24078 ac_lib_var=`echo intl'_'strftime | sed 'y%./+-:%__p__%'`
24079 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
24080   echo $ac_n "(cached) $ac_c" 1>&6
24081 else
24082   ac_save_LIBS="$LIBS"
24083 LIBS="-lintl  $LIBS"
24084 cat > conftest.$ac_ext <<EOF
24085 #line 24086 "configure"
24086 #include "confdefs.h"
24087 /* Override any gcc2 internal prototype to avoid an error.  */
24088 /* We use char because int might match the return type of a gcc2
24089     builtin and then its argument prototype would still apply.  */
24090 char strftime();
24091
24092 int main() {
24093 strftime()
24094 ; return 0; }
24095 EOF
24096 if { (eval echo configure:24097: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
24097   rm -rf conftest*
24098   eval "ac_cv_lib_$ac_lib_var=yes"
24099 else
24100   echo "configure: failed program was:" >&5
24101   cat conftest.$ac_ext >&5
24102   rm -rf conftest*
24103   eval "ac_cv_lib_$ac_lib_var=no"
24104 fi
24105 rm -f conftest*
24106 LIBS="$ac_save_LIBS"
24107
24108 fi
24109 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
24110   echo "$ac_t""yes" 1>&6
24111   cat >> confdefs.h <<\EOF
24112 #define HAVE_STRFTIME 1
24113 EOF
24114
24115 LIBS="-lintl $LIBS"
24116 else
24117   echo "$ac_t""no" 1>&6
24118 fi
24119
24120 fi
24121
24122
24123 echo $ac_n "checking for inet_aton()""... $ac_c" 1>&6
24124 echo "configure:24125: checking for inet_aton()" >&5
24125 if eval "test \"\${ol_cv_func_inet_aton+set}\" = set"; then
24126   echo $ac_n "(cached) $ac_c" 1>&6
24127 else
24128   cat > conftest.$ac_ext <<EOF
24129 #line 24130 "configure"
24130 #include "confdefs.h"
24131
24132 #ifdef HAVE_SYS_TYPES_H
24133 #       include <sys/types.h>
24134 #endif
24135 #ifdef HAVE_SYS_SOCKET_H
24136 #       include <sys/socket.h>
24137 #       ifdef HAVE_SYS_SELECT_H
24138 #               include <sys/select.h>
24139 #       endif
24140 #       include <netinet/in.h>
24141 #       ifdef HAVE_ARPA_INET_H
24142 #               include <arpa/inet.h>
24143 #       endif
24144 #endif
24145
24146 int main() {
24147 struct in_addr in;
24148 int rc = inet_aton( "255.255.255.255", &in );
24149 ; return 0; }
24150 EOF
24151 if { (eval echo configure:24152: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
24152   rm -rf conftest*
24153   ol_cv_func_inet_aton=yes
24154 else
24155   echo "configure: failed program was:" >&5
24156   cat conftest.$ac_ext >&5
24157   rm -rf conftest*
24158   ol_cv_func_inet_aton=no
24159 fi
24160 rm -f conftest*
24161 fi
24162
24163 echo "$ac_t""$ol_cv_func_inet_aton" 1>&6
24164   if test $ol_cv_func_inet_aton != no; then
24165     cat >> confdefs.h <<\EOF
24166 #define HAVE_INET_ATON 1
24167 EOF
24168
24169   fi
24170  
24171
24172 echo $ac_n "checking for _spawnlp""... $ac_c" 1>&6
24173 echo "configure:24174: checking for _spawnlp" >&5
24174 if eval "test \"\${ac_cv_func__spawnlp+set}\" = set"; then
24175   echo $ac_n "(cached) $ac_c" 1>&6
24176 else
24177   cat > conftest.$ac_ext <<EOF
24178 #line 24179 "configure"
24179 #include "confdefs.h"
24180 /* System header to define __stub macros and hopefully few prototypes,
24181     which can conflict with char _spawnlp(); below.  */
24182 #include <assert.h>
24183 /* Override any gcc2 internal prototype to avoid an error.  */
24184 /* We use char because int might match the return type of a gcc2
24185     builtin and then its argument prototype would still apply.  */
24186 char _spawnlp();
24187 char (*f)();
24188
24189 int main() {
24190
24191 /* The GNU C library defines this for functions which it implements
24192     to always fail with ENOSYS.  Some functions are actually named
24193     something starting with __ and the normal name is an alias.  */
24194 #if defined (__stub__spawnlp) || defined (__stub____spawnlp)
24195 choke me
24196 #else
24197 f = _spawnlp;
24198 #endif
24199
24200 ; return 0; }
24201 EOF
24202 if { (eval echo configure:24203: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
24203   rm -rf conftest*
24204   eval "ac_cv_func__spawnlp=yes"
24205 else
24206   echo "configure: failed program was:" >&5
24207   cat conftest.$ac_ext >&5
24208   rm -rf conftest*
24209   eval "ac_cv_func__spawnlp=no"
24210 fi
24211 rm -f conftest*
24212 fi
24213
24214 if eval "test \"`echo '$ac_cv_func_'_spawnlp`\" = yes"; then
24215   echo "$ac_t""yes" 1>&6
24216   cat >> confdefs.h <<\EOF
24217 #define HAVE_SPAWNLP 1
24218 EOF
24219
24220 else
24221   echo "$ac_t""no" 1>&6
24222 fi
24223
24224
24225 echo $ac_n "checking for _snprintf""... $ac_c" 1>&6
24226 echo "configure:24227: checking for _snprintf" >&5
24227 if eval "test \"\${ac_cv_func__snprintf+set}\" = set"; then
24228   echo $ac_n "(cached) $ac_c" 1>&6
24229 else
24230   cat > conftest.$ac_ext <<EOF
24231 #line 24232 "configure"
24232 #include "confdefs.h"
24233 /* System header to define __stub macros and hopefully few prototypes,
24234     which can conflict with char _snprintf(); below.  */
24235 #include <assert.h>
24236 /* Override any gcc2 internal prototype to avoid an error.  */
24237 /* We use char because int might match the return type of a gcc2
24238     builtin and then its argument prototype would still apply.  */
24239 char _snprintf();
24240 char (*f)();
24241
24242 int main() {
24243
24244 /* The GNU C library defines this for functions which it implements
24245     to always fail with ENOSYS.  Some functions are actually named
24246     something starting with __ and the normal name is an alias.  */
24247 #if defined (__stub__snprintf) || defined (__stub____snprintf)
24248 choke me
24249 #else
24250 f = _snprintf;
24251 #endif
24252
24253 ; return 0; }
24254 EOF
24255 if { (eval echo configure:24256: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
24256   rm -rf conftest*
24257   eval "ac_cv_func__snprintf=yes"
24258 else
24259   echo "configure: failed program was:" >&5
24260   cat conftest.$ac_ext >&5
24261   rm -rf conftest*
24262   eval "ac_cv_func__snprintf=no"
24263 fi
24264 rm -f conftest*
24265 fi
24266
24267 if eval "test \"`echo '$ac_cv_func_'_snprintf`\" = yes"; then
24268   echo "$ac_t""yes" 1>&6
24269   ac_cv_func_snprintf=yes
24270         cat >> confdefs.h <<\EOF
24271 #define snprintf _snprintf
24272 EOF
24273
24274
24275 else
24276   echo "$ac_t""no" 1>&6
24277 fi
24278
24279
24280 echo $ac_n "checking for _vsnprintf""... $ac_c" 1>&6
24281 echo "configure:24282: checking for _vsnprintf" >&5
24282 if eval "test \"\${ac_cv_func__vsnprintf+set}\" = set"; then
24283   echo $ac_n "(cached) $ac_c" 1>&6
24284 else
24285   cat > conftest.$ac_ext <<EOF
24286 #line 24287 "configure"
24287 #include "confdefs.h"
24288 /* System header to define __stub macros and hopefully few prototypes,
24289     which can conflict with char _vsnprintf(); below.  */
24290 #include <assert.h>
24291 /* Override any gcc2 internal prototype to avoid an error.  */
24292 /* We use char because int might match the return type of a gcc2
24293     builtin and then its argument prototype would still apply.  */
24294 char _vsnprintf();
24295 char (*f)();
24296
24297 int main() {
24298
24299 /* The GNU C library defines this for functions which it implements
24300     to always fail with ENOSYS.  Some functions are actually named
24301     something starting with __ and the normal name is an alias.  */
24302 #if defined (__stub__vsnprintf) || defined (__stub____vsnprintf)
24303 choke me
24304 #else
24305 f = _vsnprintf;
24306 #endif
24307
24308 ; return 0; }
24309 EOF
24310 if { (eval echo configure:24311: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
24311   rm -rf conftest*
24312   eval "ac_cv_func__vsnprintf=yes"
24313 else
24314   echo "configure: failed program was:" >&5
24315   cat conftest.$ac_ext >&5
24316   rm -rf conftest*
24317   eval "ac_cv_func__vsnprintf=no"
24318 fi
24319 rm -f conftest*
24320 fi
24321
24322 if eval "test \"`echo '$ac_cv_func_'_vsnprintf`\" = yes"; then
24323   echo "$ac_t""yes" 1>&6
24324   ac_cv_func_vsnprintf=yes
24325         cat >> confdefs.h <<\EOF
24326 #define vsnprintf _vsnprintf
24327 EOF
24328
24329
24330 else
24331   echo "$ac_t""no" 1>&6
24332 fi
24333
24334
24335 echo $ac_n "checking for vprintf""... $ac_c" 1>&6
24336 echo "configure:24337: checking for vprintf" >&5
24337 if eval "test \"\${ac_cv_func_vprintf+set}\" = set"; then
24338   echo $ac_n "(cached) $ac_c" 1>&6
24339 else
24340   cat > conftest.$ac_ext <<EOF
24341 #line 24342 "configure"
24342 #include "confdefs.h"
24343 /* System header to define __stub macros and hopefully few prototypes,
24344     which can conflict with char vprintf(); below.  */
24345 #include <assert.h>
24346 /* Override any gcc2 internal prototype to avoid an error.  */
24347 /* We use char because int might match the return type of a gcc2
24348     builtin and then its argument prototype would still apply.  */
24349 char vprintf();
24350 char (*f)();
24351
24352 int main() {
24353
24354 /* The GNU C library defines this for functions which it implements
24355     to always fail with ENOSYS.  Some functions are actually named
24356     something starting with __ and the normal name is an alias.  */
24357 #if defined (__stub_vprintf) || defined (__stub___vprintf)
24358 choke me
24359 #else
24360 f = vprintf;
24361 #endif
24362
24363 ; return 0; }
24364 EOF
24365 if { (eval echo configure:24366: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
24366   rm -rf conftest*
24367   eval "ac_cv_func_vprintf=yes"
24368 else
24369   echo "configure: failed program was:" >&5
24370   cat conftest.$ac_ext >&5
24371   rm -rf conftest*
24372   eval "ac_cv_func_vprintf=no"
24373 fi
24374 rm -f conftest*
24375 fi
24376
24377 if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
24378   echo "$ac_t""yes" 1>&6
24379   cat >> confdefs.h <<\EOF
24380 #define HAVE_VPRINTF 1
24381 EOF
24382
24383 else
24384   echo "$ac_t""no" 1>&6
24385 fi
24386
24387 if test "$ac_cv_func_vprintf" != yes; then
24388 echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
24389 echo "configure:24390: checking for _doprnt" >&5
24390 if eval "test \"\${ac_cv_func__doprnt+set}\" = set"; then
24391   echo $ac_n "(cached) $ac_c" 1>&6
24392 else
24393   cat > conftest.$ac_ext <<EOF
24394 #line 24395 "configure"
24395 #include "confdefs.h"
24396 /* System header to define __stub macros and hopefully few prototypes,
24397     which can conflict with char _doprnt(); below.  */
24398 #include <assert.h>
24399 /* Override any gcc2 internal prototype to avoid an error.  */
24400 /* We use char because int might match the return type of a gcc2
24401     builtin and then its argument prototype would still apply.  */
24402 char _doprnt();
24403 char (*f)();
24404
24405 int main() {
24406
24407 /* The GNU C library defines this for functions which it implements
24408     to always fail with ENOSYS.  Some functions are actually named
24409     something starting with __ and the normal name is an alias.  */
24410 #if defined (__stub__doprnt) || defined (__stub____doprnt)
24411 choke me
24412 #else
24413 f = _doprnt;
24414 #endif
24415
24416 ; return 0; }
24417 EOF
24418 if { (eval echo configure:24419: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
24419   rm -rf conftest*
24420   eval "ac_cv_func__doprnt=yes"
24421 else
24422   echo "configure: failed program was:" >&5
24423   cat conftest.$ac_ext >&5
24424   rm -rf conftest*
24425   eval "ac_cv_func__doprnt=no"
24426 fi
24427 rm -f conftest*
24428 fi
24429
24430 if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
24431   echo "$ac_t""yes" 1>&6
24432   cat >> confdefs.h <<\EOF
24433 #define HAVE_DOPRNT 1
24434 EOF
24435
24436 else
24437   echo "$ac_t""no" 1>&6
24438 fi
24439
24440 fi
24441
24442
24443 if test $ac_cv_func_vprintf = yes ; then
24444                 for ac_func in snprintf vsnprintf
24445 do
24446 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
24447 echo "configure:24448: checking for $ac_func" >&5
24448 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
24449   echo $ac_n "(cached) $ac_c" 1>&6
24450 else
24451   cat > conftest.$ac_ext <<EOF
24452 #line 24453 "configure"
24453 #include "confdefs.h"
24454 /* System header to define __stub macros and hopefully few prototypes,
24455     which can conflict with char $ac_func(); below.  */
24456 #include <assert.h>
24457 /* Override any gcc2 internal prototype to avoid an error.  */
24458 /* We use char because int might match the return type of a gcc2
24459     builtin and then its argument prototype would still apply.  */
24460 char $ac_func();
24461 char (*f)();
24462
24463 int main() {
24464
24465 /* The GNU C library defines this for functions which it implements
24466     to always fail with ENOSYS.  Some functions are actually named
24467     something starting with __ and the normal name is an alias.  */
24468 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
24469 choke me
24470 #else
24471 f = $ac_func;
24472 #endif
24473
24474 ; return 0; }
24475 EOF
24476 if { (eval echo configure:24477: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
24477   rm -rf conftest*
24478   eval "ac_cv_func_$ac_func=yes"
24479 else
24480   echo "configure: failed program was:" >&5
24481   cat conftest.$ac_ext >&5
24482   rm -rf conftest*
24483   eval "ac_cv_func_$ac_func=no"
24484 fi
24485 rm -f conftest*
24486 fi
24487
24488 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
24489   echo "$ac_t""yes" 1>&6
24490     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
24491   cat >> confdefs.h <<EOF
24492 #define $ac_tr_func 1
24493 EOF
24494  
24495 else
24496   echo "$ac_t""no" 1>&6
24497 fi
24498 done
24499
24500 fi
24501
24502 for ac_func in \
24503         bcopy                   \
24504         closesocket             \
24505         chroot                  \
24506         endgrent                \
24507         endpwent                \
24508         fcntl                   \
24509         flock                   \
24510         fstat                   \
24511         getdtablesize   \
24512         getgrgid                \
24513         gethostname             \
24514         getpass                 \
24515         getpassphrase   \
24516         getpwuid                \
24517         getpwnam                \
24518         getspnam                \
24519         gettimeofday    \
24520         initgroups              \
24521         lockf                   \
24522         memcpy                  \
24523         memmove                 \
24524         mkstemp                 \
24525         mktemp                  \
24526         pipe                    \
24527         read                    \
24528         recv                    \
24529         recvfrom                \
24530         setpwfile               \
24531         setgid                  \
24532         setegid                 \
24533         setsid                  \
24534         setuid                  \
24535         seteuid                 \
24536         signal                  \
24537         strdup                  \
24538         strpbrk                 \
24539         strrchr                 \
24540         strsep                  \
24541         strstr                  \
24542         strtol                  \
24543         strtoul                 \
24544         strtoq                  \
24545         strtouq                 \
24546         strtoll                 \
24547         strspn                  \
24548         sysconf                 \
24549         usleep                  \
24550         waitpid                 \
24551         wait4                   \
24552         write                   \
24553         send                    \
24554         sendmsg                 \
24555         sendto                  \
24556
24557 do
24558 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
24559 echo "configure:24560: checking for $ac_func" >&5
24560 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
24561   echo $ac_n "(cached) $ac_c" 1>&6
24562 else
24563   cat > conftest.$ac_ext <<EOF
24564 #line 24565 "configure"
24565 #include "confdefs.h"
24566 /* System header to define __stub macros and hopefully few prototypes,
24567     which can conflict with char $ac_func(); below.  */
24568 #include <assert.h>
24569 /* Override any gcc2 internal prototype to avoid an error.  */
24570 /* We use char because int might match the return type of a gcc2
24571     builtin and then its argument prototype would still apply.  */
24572 char $ac_func();
24573 char (*f)();
24574
24575 int main() {
24576
24577 /* The GNU C library defines this for functions which it implements
24578     to always fail with ENOSYS.  Some functions are actually named
24579     something starting with __ and the normal name is an alias.  */
24580 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
24581 choke me
24582 #else
24583 f = $ac_func;
24584 #endif
24585
24586 ; return 0; }
24587 EOF
24588 if { (eval echo configure:24589: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
24589   rm -rf conftest*
24590   eval "ac_cv_func_$ac_func=yes"
24591 else
24592   echo "configure: failed program was:" >&5
24593   cat conftest.$ac_ext >&5
24594   rm -rf conftest*
24595   eval "ac_cv_func_$ac_func=no"
24596 fi
24597 rm -f conftest*
24598 fi
24599
24600 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
24601   echo "$ac_t""yes" 1>&6
24602     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
24603   cat >> confdefs.h <<EOF
24604 #define $ac_tr_func 1
24605 EOF
24606  
24607 else
24608   echo "$ac_t""no" 1>&6
24609 fi
24610 done
24611
24612
24613 for ac_func in getopt getpeereid
24614 do
24615 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
24616 echo "configure:24617: checking for $ac_func" >&5
24617 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
24618   echo $ac_n "(cached) $ac_c" 1>&6
24619 else
24620   cat > conftest.$ac_ext <<EOF
24621 #line 24622 "configure"
24622 #include "confdefs.h"
24623 /* System header to define __stub macros and hopefully few prototypes,
24624     which can conflict with char $ac_func(); below.  */
24625 #include <assert.h>
24626 /* Override any gcc2 internal prototype to avoid an error.  */
24627 /* We use char because int might match the return type of a gcc2
24628     builtin and then its argument prototype would still apply.  */
24629 char $ac_func();
24630 char (*f)();
24631
24632 int main() {
24633
24634 /* The GNU C library defines this for functions which it implements
24635     to always fail with ENOSYS.  Some functions are actually named
24636     something starting with __ and the normal name is an alias.  */
24637 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
24638 choke me
24639 #else
24640 f = $ac_func;
24641 #endif
24642
24643 ; return 0; }
24644 EOF
24645 if { (eval echo configure:24646: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
24646   rm -rf conftest*
24647   eval "ac_cv_func_$ac_func=yes"
24648 else
24649   echo "configure: failed program was:" >&5
24650   cat conftest.$ac_ext >&5
24651   rm -rf conftest*
24652   eval "ac_cv_func_$ac_func=no"
24653 fi
24654 rm -f conftest*
24655 fi
24656
24657 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
24658   echo "$ac_t""yes" 1>&6
24659     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
24660   cat >> confdefs.h <<EOF
24661 #define $ac_tr_func 1
24662 EOF
24663  
24664 else
24665   echo "$ac_t""no" 1>&6
24666 LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
24667 fi
24668 done
24669
24670
24671
24672 if test "$ac_cv_func_getopt" != yes; then
24673         LIBSRCS="$LIBSRCS getopt.c"
24674 fi
24675 if test "$ac_cv_func_getpeereid" != yes; then
24676         echo $ac_n "checking for msg_accrights in msghdr""... $ac_c" 1>&6
24677 echo "configure:24678: checking for msg_accrights in msghdr" >&5
24678 if eval "test \"\${ol_cv_msghdr_msg_accrights+set}\" = set"; then
24679   echo $ac_n "(cached) $ac_c" 1>&6
24680 else
24681   cat > conftest.$ac_ext <<EOF
24682 #line 24683 "configure"
24683 #include "confdefs.h"
24684 #include <sys/socket.h>
24685 int main() {
24686 struct msghdr m; m.msg_accrightslen=0
24687 ; return 0; }
24688 EOF
24689 if { (eval echo configure:24690: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
24690   rm -rf conftest*
24691   ol_cv_msghdr_msg_accrights=yes
24692 else
24693   echo "configure: failed program was:" >&5
24694   cat conftest.$ac_ext >&5
24695   rm -rf conftest*
24696   ol_cv_msghdr_msg_accrights=no
24697 fi
24698 rm -f conftest*
24699         
24700 fi
24701
24702 echo "$ac_t""$ol_cv_msghdr_msg_accrights" 1>&6
24703   if test $ol_cv_msghdr_msg_accrights = "yes" ; then
24704         cat >> confdefs.h <<\EOF
24705 #define HAVE_MSGHDR_MSG_ACCRIGHTS 1
24706 EOF
24707
24708   fi
24709
24710         if test "$ac_cv_func_getpeereid" != yes; then
24711                 echo $ac_n "checking for msg_control in msghdr""... $ac_c" 1>&6
24712 echo "configure:24713: checking for msg_control in msghdr" >&5
24713 if eval "test \"\${ol_cv_msghdr_msg_control+set}\" = set"; then
24714   echo $ac_n "(cached) $ac_c" 1>&6
24715 else
24716   cat > conftest.$ac_ext <<EOF
24717 #line 24718 "configure"
24718 #include "confdefs.h"
24719 #include <sys/socket.h>
24720 int main() {
24721 struct msghdr m; m.msg_control=(struct cmsghdr *)0
24722 ; return 0; }
24723 EOF
24724 if { (eval echo configure:24725: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
24725   rm -rf conftest*
24726   ol_cv_msghdr_msg_control=yes
24727 else
24728   echo "configure: failed program was:" >&5
24729   cat conftest.$ac_ext >&5
24730   rm -rf conftest*
24731   ol_cv_msghdr_msg_control=no
24732 fi
24733 rm -f conftest*
24734         
24735 fi
24736
24737 echo "$ac_t""$ol_cv_msghdr_msg_control" 1>&6
24738   if test $ol_cv_msghdr_msg_control = "yes" ; then
24739         cat >> confdefs.h <<\EOF
24740 #define HAVE_MSGHDR_MSG_CONTROL 1
24741 EOF
24742
24743   fi
24744
24745         fi
24746         LIBSRCS="$LIBSRCS getpeereid.c"
24747 fi
24748 if test "$ac_cv_func_snprintf" != yes -o "$ac_cv_func_vsnprintf" != yes; then
24749         if test "$ac_cv_func_snprintf" != yes; then
24750                 cat >> confdefs.h <<\EOF
24751 #define snprintf ber_pvt_snprintf
24752 EOF
24753
24754         fi
24755         if test "$ac_cv_func_vsnprintf" != yes; then
24756                 cat >> confdefs.h <<\EOF
24757 #define vsnprintf ber_pvt_vsnprintf
24758 EOF
24759
24760         fi
24761 fi
24762
24763
24764 if test "$ol_enable_slapi" != no ; then
24765                         for ac_hdr in ltdl.h
24766 do
24767 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
24768 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
24769 echo "configure:24770: checking for $ac_hdr" >&5
24770 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
24771   echo $ac_n "(cached) $ac_c" 1>&6
24772 else
24773   cat > conftest.$ac_ext <<EOF
24774 #line 24775 "configure"
24775 #include "confdefs.h"
24776 #include <$ac_hdr>
24777 EOF
24778 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
24779 { (eval echo configure:24780: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
24780 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
24781 if test -z "$ac_err"; then
24782   rm -rf conftest*
24783   eval "ac_cv_header_$ac_safe=yes"
24784 else
24785   echo "$ac_err" >&5
24786   echo "configure: failed program was:" >&5
24787   cat conftest.$ac_ext >&5
24788   rm -rf conftest*
24789   eval "ac_cv_header_$ac_safe=no"
24790 fi
24791 rm -f conftest*
24792 fi
24793 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
24794   echo "$ac_t""yes" 1>&6
24795     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
24796   cat >> confdefs.h <<EOF
24797 #define $ac_tr_hdr 1
24798 EOF
24799  
24800 else
24801   echo "$ac_t""no" 1>&6
24802 fi
24803 done
24804
24805
24806         if test $ac_cv_header_ltdl_h != yes ; then
24807                 { echo "configure: error: could not locate <ltdl.h>" 1>&2; exit 1; }
24808         fi
24809         echo $ac_n "checking for lt_dlinit in -lltdl""... $ac_c" 1>&6
24810 echo "configure:24811: checking for lt_dlinit in -lltdl" >&5
24811 ac_lib_var=`echo ltdl'_'lt_dlinit | sed 'y%./+-:%__p__%'`
24812 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
24813   echo $ac_n "(cached) $ac_c" 1>&6
24814 else
24815   ac_save_LIBS="$LIBS"
24816 LIBS="-lltdl  $LIBS"
24817 cat > conftest.$ac_ext <<EOF
24818 #line 24819 "configure"
24819 #include "confdefs.h"
24820 /* Override any gcc2 internal prototype to avoid an error.  */
24821 /* We use char because int might match the return type of a gcc2
24822     builtin and then its argument prototype would still apply.  */
24823 char lt_dlinit();
24824
24825 int main() {
24826 lt_dlinit()
24827 ; return 0; }
24828 EOF
24829 if { (eval echo configure:24830: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
24830   rm -rf conftest*
24831   eval "ac_cv_lib_$ac_lib_var=yes"
24832 else
24833   echo "configure: failed program was:" >&5
24834   cat conftest.$ac_ext >&5
24835   rm -rf conftest*
24836   eval "ac_cv_lib_$ac_lib_var=no"
24837 fi
24838 rm -f conftest*
24839 LIBS="$ac_save_LIBS"
24840
24841 fi
24842 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
24843   echo "$ac_t""yes" 1>&6
24844   
24845                 SLAPI_LIBS=-lltdl
24846                 LIBSLAPI=libslapi.a
24847                 LIBSLAPITOOLS=../libslapi.a
24848                 cat >> confdefs.h <<\EOF
24849 #define HAVE_LIBLTDL 1
24850 EOF
24851
24852         
24853 else
24854   echo "$ac_t""no" 1>&6
24855 { echo "configure: error: could not locate libtool -lltdl" 1>&2; exit 1; }
24856 fi
24857
24858
24859         cat >> confdefs.h <<\EOF
24860 #define LDAP_SLAPI 1
24861 EOF
24862
24863 fi
24864
24865 if test "$ol_enable_debug" != no ; then
24866         cat >> confdefs.h <<\EOF
24867 #define LDAP_DEBUG 1
24868 EOF
24869
24870 fi
24871 if test "$ol_enable_syslog" = yes ; then
24872         cat >> confdefs.h <<\EOF
24873 #define LDAP_SYSLOG 1
24874 EOF
24875
24876 fi
24877 if test "$ol_link_kbind" != no ; then
24878         cat >> confdefs.h <<\EOF
24879 #define LDAP_API_FEATURE_X_OPENLDAP_V2_KBIND LDAP_VENDOR_VERSION
24880 EOF
24881
24882 fi
24883 if test "$ol_enable_proctitle" != no ; then
24884         cat >> confdefs.h <<\EOF
24885 #define LDAP_PROCTITLE 1
24886 EOF
24887
24888 fi
24889 if test "$ol_enable_referrals" != no ; then
24890         cat >> confdefs.h <<\EOF
24891 #define LDAP_API_FEATURE_X_OPENLDAP_V2_REFERRALS LDAP_VENDOR_VERSION
24892 EOF
24893
24894 fi
24895 if test "$ol_enable_local" != no; then
24896         cat >> confdefs.h <<\EOF
24897 #define LDAP_PF_LOCAL 1
24898 EOF
24899
24900 fi
24901 if test "$ol_link_ipv6" != no; then
24902         cat >> confdefs.h <<\EOF
24903 #define LDAP_PF_INET6 1
24904 EOF
24905
24906 fi
24907 if test "$ol_enable_cleartext" != no ; then
24908         cat >> confdefs.h <<\EOF
24909 #define SLAPD_CLEARTEXT 1
24910 EOF
24911
24912 fi
24913 if test "$ol_enable_crypt" != no ; then
24914         cat >> confdefs.h <<\EOF
24915 #define SLAPD_CRYPT 1
24916 EOF
24917
24918 fi
24919 if test "$ol_link_spasswd" != no ; then
24920         cat >> confdefs.h <<\EOF
24921 #define SLAPD_SPASSWD 1
24922 EOF
24923
24924 fi
24925 if test "$ol_enable_multimaster" != no ; then
24926         cat >> confdefs.h <<\EOF
24927 #define SLAPD_MULTIMASTER 1
24928 EOF
24929
24930 fi
24931 if test "$ol_enable_rlookups" != no ; then
24932         cat >> confdefs.h <<\EOF
24933 #define SLAPD_RLOOKUPS 1
24934 EOF
24935
24936 fi
24937 if test "$ol_enable_aci" != no ; then
24938         cat >> confdefs.h <<\EOF
24939 #define SLAPD_ACI_ENABLED 1
24940 EOF
24941
24942 fi
24943
24944 if test "$ol_link_modules" != no ; then
24945         cat >> confdefs.h <<\EOF
24946 #define SLAPD_MODULES 1
24947 EOF
24948
24949         BUILD_SLAPD=yes
24950         SLAPD_MODULES_LDFLAGS="-dlopen self"
24951 fi
24952
24953 cat >> confdefs.h <<\EOF
24954 #define SLAPD_MOD_STATIC 1
24955 EOF
24956
24957 cat >> confdefs.h <<\EOF
24958 #define SLAPD_MOD_DYNAMIC 2
24959 EOF
24960
24961
24962 if test "$ol_enable_bdb" != no ; then
24963         BUILD_SLAPD=yes
24964         BUILD_BDB=$ol_enable_bdb
24965         if test "$ol_enable_bdb" = mod ; then
24966                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-bdb"
24967                 MFLAG=SLAPD_MOD_DYNAMIC
24968         else
24969                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-bdb"
24970                 MFLAG=SLAPD_MOD_STATIC
24971         fi
24972         cat >> confdefs.h <<EOF
24973 #define SLAPD_BDB $MFLAG
24974 EOF
24975
24976 fi
24977
24978 if test "$ol_enable_dnssrv" != no ; then
24979         BUILD_SLAPD=yes
24980         BUILD_DNSSRV=$ol_enable_dnssrv
24981         if test "$ol_enable_dnssrv" = mod ; then
24982                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-dnssrv"
24983                 MFLAG=SLAPD_MOD_DYNAMIC
24984         else
24985                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-dnssrv"
24986                 MFLAG=SLAPD_MOD_STATIC
24987         fi
24988         cat >> confdefs.h <<EOF
24989 #define SLAPD_DNSSRV $MFLAG
24990 EOF
24991
24992 fi
24993
24994 if test "$ol_enable_hdb" != no ; then
24995         BUILD_SLAPD=yes
24996         BUILD_HDB=$ol_enable_hdb
24997         if test "$ol_enable_hdb" = mod ; then
24998                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-hdb"
24999                 MFLAG=SLAPD_MOD_DYNAMIC
25000         else
25001                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-hdb"
25002                 MFLAG=SLAPD_MOD_STATIC
25003         fi
25004         cat >> confdefs.h <<EOF
25005 #define SLAPD_HDB $MFLAG
25006 EOF
25007
25008 fi
25009
25010 if test "$ol_enable_ldap" != no ; then
25011         BUILD_SLAPD=yes
25012         BUILD_LDAP=$ol_enable_ldap
25013         if test "$ol_enable_ldap" = mod ; then
25014                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-ldap"
25015                 MFLAG=SLAPD_MOD_DYNAMIC
25016         else
25017                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-ldap"
25018                 MFLAG=SLAPD_MOD_STATIC
25019         fi
25020         cat >> confdefs.h <<EOF
25021 #define SLAPD_LDAP $MFLAG
25022 EOF
25023
25024 fi
25025
25026 if test "$ol_link_ldbm" != no -a $ol_enable_ldbm != no; then
25027         BUILD_SLAPD=yes
25028         BUILD_LDBM=$ol_enable_ldbm
25029         if test "$ol_enable_ldbm" = mod ; then
25030                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-ldbm"
25031                 MFLAG=SLAPD_MOD_DYNAMIC
25032         else
25033                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-ldbm"
25034                 MFLAG=SLAPD_MOD_STATIC
25035         fi
25036         cat >> confdefs.h <<EOF
25037 #define SLAPD_LDBM $MFLAG
25038 EOF
25039
25040 fi
25041
25042 if test "$ol_enable_meta" != no ; then
25043         BUILD_SLAPD=yes
25044         BUILD_META=$ol_enable_meta
25045         BUILD_REWRITE=yes
25046         if test "$ol_enable_meta" = mod ; then
25047                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-meta"
25048                 MFLAG=SLAPD_MOD_DYNAMIC
25049         else
25050                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-meta"
25051                 MFLAG=SLAPD_MOD_STATIC
25052         fi
25053         cat >> confdefs.h <<EOF
25054 #define SLAPD_META $MFLAG
25055 EOF
25056
25057 fi
25058
25059 if test "$ol_enable_monitor" != no ; then
25060         BUILD_SLAPD=yes
25061         BUILD_MONITOR=$ol_enable_monitor
25062         if test "$ol_enable_monitor" = mod ; then
25063                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-monitor"
25064                 MFLAG=SLAPD_MOD_DYNAMIC
25065         else
25066                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-monitor"
25067                 MFLAG=SLAPD_MOD_STATIC
25068         fi
25069         cat >> confdefs.h <<EOF
25070 #define SLAPD_MONITOR $MFLAG
25071 EOF
25072
25073 fi
25074
25075 if test "$ol_enable_null" != no ; then
25076         BUILD_SLAPD=yes
25077         BUILD_NULL=$ol_enable_null
25078         if test "$ol_enable_null" = mod ; then
25079                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-null"
25080                 MFLAG=SLAPD_MOD_DYNAMIC
25081         else
25082                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-null"
25083                 MFLAG=SLAPD_MOD_STATIC
25084         fi
25085         cat >> confdefs.h <<EOF
25086 #define SLAPD_NULL $MFLAG
25087 EOF
25088
25089 fi
25090
25091 if test "$ol_enable_passwd" != no ; then
25092         BUILD_SLAPD=yes
25093         BUILD_PASSWD=$ol_enable_passwd
25094         if test "$ol_enable_passwd" = mod ; then
25095                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-passwd"
25096                 MFLAG=SLAPD_MOD_DYNAMIC
25097         else
25098                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-passwd"
25099                 MFLAG=SLAPD_MOD_STATIC
25100         fi
25101         cat >> confdefs.h <<EOF
25102 #define SLAPD_PASSWD $MFLAG
25103 EOF
25104
25105 fi
25106
25107 if test "$ol_link_perl" != no ; then
25108         BUILD_SLAPD=yes
25109         BUILD_PERL=$ol_enable_perl
25110         if test "$ol_enable_perl" = mod ; then
25111                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-perl"
25112                 MFLAG=SLAPD_MOD_DYNAMIC
25113         else
25114                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-perl"
25115                 MFLAG=SLAPD_MOD_STATIC
25116         fi
25117         cat >> confdefs.h <<EOF
25118 #define SLAPD_PERL $MFLAG
25119 EOF
25120
25121 fi
25122
25123 if test "$ol_enable_relay" != no ; then
25124         BUILD_SLAPD=yes
25125         BUILD_RELAY=$ol_enable_relay
25126         if test "$ol_enable_relay" = mod ; then
25127                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-relay"
25128                 MFLAG=SLAPD_MOD_DYNAMIC
25129         else
25130                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-relay"
25131                 MFLAG=SLAPD_MOD_STATIC
25132         fi
25133         cat >> confdefs.h <<EOF
25134 #define SLAPD_RELAY $MFLAG
25135 EOF
25136
25137 fi
25138
25139 if test "$ol_enable_shell" != no ; then
25140         if test "$ol_link_thread" != no ; then
25141                 echo "configure: warning: Use of --without-threads is recommended with back-shell" 1>&2
25142         fi
25143         BUILD_SLAPD=yes
25144         BUILD_SHELL=$ol_enable_shell
25145         if test "$ol_enable_shell" = mod ; then
25146                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-shell"
25147                 MFLAG=SLAPD_MOD_DYNAMIC
25148         else
25149                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-shell"
25150                 MFLAG=SLAPD_MOD_STATIC
25151         fi
25152         cat >> confdefs.h <<EOF
25153 #define SLAPD_SHELL $MFLAG
25154 EOF
25155
25156 fi
25157
25158 if test "$ol_link_sql" != no ; then
25159         BUILD_SLAPD=yes
25160         BUILD_SQL=$ol_enable_sql
25161         if test "$ol_enable_sql" = mod; then
25162                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-sql"
25163                 MFLAG=SLAPD_MOD_DYNAMIC
25164         else
25165                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-sql"
25166                 MFLAG=SLAPD_MOD_STATIC
25167         fi
25168         cat >> confdefs.h <<EOF
25169 #define SLAPD_SQL $MFLAG
25170 EOF
25171
25172 fi
25173
25174 if test "$ol_enable_accesslog" != no ; then
25175         BUILD_ACCESSLOG=$ol_enable_accesslog
25176         if test "$ol_enable_accesslog" = mod ; then
25177                 MFLAG=SLAPD_MOD_DYNAMIC
25178                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS accesslog.la"
25179         else
25180                 MFLAG=SLAPD_MOD_STATIC
25181                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS accesslog.o"
25182         fi
25183         cat >> confdefs.h <<EOF
25184 #define SLAPD_OVER_ACCESSLOG $MFLAG
25185 EOF
25186
25187 fi
25188
25189 if test "$ol_enable_denyop" != no ; then
25190         BUILD_DENYOP=$ol_enable_denyop
25191         if test "$ol_enable_denyop" = mod ; then
25192                 MFLAG=SLAPD_MOD_DYNAMIC
25193                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS denyop.la"
25194         else
25195                 MFLAG=SLAPD_MOD_STATIC
25196                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS denyop.o"
25197         fi
25198         cat >> confdefs.h <<EOF
25199 #define SLAPD_OVER_DENYOP $MFLAG
25200 EOF
25201
25202 fi
25203
25204 if test "$ol_enable_dyngroup" != no ; then
25205         BUILD_DYNGROUP=$ol_enable_dyngroup
25206         if test "$ol_enable_dyngroup" = mod ; then
25207                 MFLAG=SLAPD_MOD_DYNAMIC
25208                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS dyngroup.la"
25209         else
25210                 MFLAG=SLAPD_MOD_STATIC
25211                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS dyngroup.o"
25212         fi
25213         cat >> confdefs.h <<EOF
25214 #define SLAPD_OVER_DYNGROUP $MFLAG
25215 EOF
25216
25217 fi
25218
25219 if test "$ol_enable_dynlist" != no ; then
25220         BUILD_DYNLIST=$ol_enable_dynlist
25221         if test "$ol_enable_dynlist" = mod ; then
25222                 MFLAG=SLAPD_MOD_DYNAMIC
25223                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS dynlist.la"
25224         else
25225                 MFLAG=SLAPD_MOD_STATIC
25226                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS dynlist.o"
25227         fi
25228         cat >> confdefs.h <<EOF
25229 #define SLAPD_OVER_DYNLIST $MFLAG
25230 EOF
25231
25232 fi
25233
25234 if test "$ol_enable_glue" != no ; then
25235         BUILD_GLUE=$ol_enable_glue
25236         if test "$ol_enable_glue" = mod ; then
25237                 MFLAG=SLAPD_MOD_DYNAMIC
25238                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS glue.la"
25239         else
25240                 MFLAG=SLAPD_MOD_STATIC
25241                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS glue.o"
25242         fi
25243         cat >> confdefs.h <<EOF
25244 #define SLAPD_OVER_GLUE $MFLAG
25245 EOF
25246
25247 fi
25248
25249 if test "$ol_enable_lastmod" != no ; then
25250         BUILD_LASTMOD=$ol_enable_lastmod
25251         if test "$ol_enable_lastmod" = mod ; then
25252                 MFLAG=SLAPD_MOD_DYNAMIC
25253                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS lastmod.la"
25254         else
25255                 MFLAG=SLAPD_MOD_STATIC
25256                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS lastmod.o"
25257         fi
25258         cat >> confdefs.h <<EOF
25259 #define SLAPD_OVER_LASTMOD $MFLAG
25260 EOF
25261
25262 fi
25263
25264 if test "$ol_enable_ppolicy" != no ; then
25265         BUILD_PPOLICY=$ol_enable_ppolicy
25266         if test "$ol_enable_ppolicy" = mod ; then
25267                 MFLAG=SLAPD_MOD_DYNAMIC
25268                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS ppolicy.la"
25269         else
25270                 MFLAG=SLAPD_MOD_STATIC
25271                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS ppolicy.o"
25272         fi
25273         cat >> confdefs.h <<EOF
25274 #define SLAPD_OVER_PPOLICY $MFLAG
25275 EOF
25276
25277 fi
25278
25279 if test "$ol_enable_proxycache" != no ; then
25280         BUILD_PROXYCACHE=$ol_enable_proxycache
25281         if test "$ol_enable_proxycache" = mod ; then
25282                 MFLAG=SLAPD_MOD_DYNAMIC
25283                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS pcache.la"
25284         else
25285                 MFLAG=SLAPD_MOD_STATIC
25286                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS pcache.o"
25287         fi
25288         cat >> confdefs.h <<EOF
25289 #define SLAPD_OVER_PROXYCACHE $MFLAG
25290 EOF
25291
25292 fi
25293
25294 if test "$ol_enable_refint" != no ; then
25295         BUILD_REFINT=$ol_enable_refint
25296         if test "$ol_enable_refint" = mod ; then
25297                 MFLAG=SLAPD_MOD_DYNAMIC
25298                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS refint.la"
25299         else
25300                 MFLAG=SLAPD_MOD_STATIC
25301                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS refint.o"
25302         fi
25303         cat >> confdefs.h <<EOF
25304 #define SLAPD_OVER_REFINT $MFLAG
25305 EOF
25306
25307 fi
25308
25309 if test "$ol_enable_retcode" != no ; then
25310         BUILD_RETCODE=$ol_enable_retcode
25311         if test "$ol_enable_retcode" = mod ; then
25312                 MFLAG=SLAPD_MOD_DYNAMIC
25313                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS retcode.la"
25314         else
25315                 MFLAG=SLAPD_MOD_STATIC
25316                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS retcode.o"
25317         fi
25318         cat >> confdefs.h <<EOF
25319 #define SLAPD_OVER_RETCODE $MFLAG
25320 EOF
25321
25322 fi
25323
25324 if test "$ol_enable_rwm" != no ; then
25325         BUILD_REWRITE=yes
25326         BUILD_RWM=$ol_enable_rwm
25327         if test "$ol_enable_rwm" = mod ; then
25328                 MFLAG=SLAPD_MOD_DYNAMIC
25329                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS rwm.la"
25330         else
25331                 MFLAG=SLAPD_MOD_STATIC
25332                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS rwm_x.o"
25333         fi
25334         cat >> confdefs.h <<EOF
25335 #define SLAPD_OVER_RWM $MFLAG
25336 EOF
25337
25338 fi
25339
25340 if test "$ol_enable_syncprov" != no ; then
25341         BUILD_SYNCPROV=$ol_enable_syncprov
25342         if test "$ol_enable_syncprov" = mod ; then
25343                 MFLAG=SLAPD_MOD_DYNAMIC
25344                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS syncprov.la"
25345         else
25346                 MFLAG=SLAPD_MOD_STATIC
25347                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS syncprov.o"
25348         fi
25349         cat >> confdefs.h <<EOF
25350 #define SLAPD_OVER_SYNCPROV $MFLAG
25351 EOF
25352
25353 fi
25354
25355 if test "$ol_enable_translucent" != no ; then
25356         BUILD_TRANSLUCENT=$ol_enable_translucent
25357         if test "$ol_enable_translucent" = mod ; then
25358                 MFLAG=SLAPD_MOD_DYNAMIC
25359                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS translucent.la"
25360         else
25361                 MFLAG=SLAPD_MOD_STATIC
25362                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS translucent.o"
25363         fi
25364         cat >> confdefs.h <<EOF
25365 #define SLAPD_OVER_TRANSLUCENT $MFLAG
25366 EOF
25367
25368 fi
25369
25370 if test "$ol_enable_unique" != no ; then
25371         BUILD_UNIQUE=$ol_enable_unique
25372         if test "$ol_enable_unique" = mod ; then
25373                 MFLAG=SLAPD_MOD_DYNAMIC
25374                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS unique.la"
25375         else
25376                 MFLAG=SLAPD_MOD_STATIC
25377                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS unique.o"
25378         fi
25379         cat >> confdefs.h <<EOF
25380 #define SLAPD_OVER_UNIQUE $MFLAG
25381 EOF
25382
25383 fi
25384
25385 if test "$ol_enable_slurpd" != no -a "$ol_link_threads" != no -a \
25386         $BUILD_SLAPD = yes ; then
25387         BUILD_SLURPD=yes
25388 fi
25389
25390 if test "$ol_enable_rewrite" != no ; then
25391         cat >> confdefs.h <<\EOF
25392 #define ENABLE_REWRITE 1
25393 EOF
25394
25395         BUILD_REWRITE=yes
25396 fi
25397
25398 if test "$ol_enable_slapi" != no ; then
25399         cat >> confdefs.h <<\EOF
25400 #define ENABLE_SLAPI 1
25401 EOF
25402
25403         BUILD_SLAPI=yes
25404         SLAPD_SLAPI_DEPEND=libslapi.a
25405 fi
25406
25407
25408
25409 if test "$ac_cv_mingw32" = yes ; then
25410         PLAT=NT
25411         SLAPD_MODULES_LDFLAGS=
25412 else
25413         PLAT=UNIX
25414 fi
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
25493 # Check whether --with-xxinstall or --without-xxinstall was given.
25494 if test "${with_xxinstall+set}" = set; then
25495   withval="$with_xxinstall"
25496   :
25497 fi
25498
25499
25500
25501 trap '' 1 2 15
25502
25503 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
25504
25505 test "x$prefix" = xNONE && prefix=$ac_default_prefix
25506 # Let make expand exec_prefix.
25507 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
25508
25509 # Any assignment to VPATH causes Sun make to only execute
25510 # the first set of double-colon rules, so remove it if not needed.
25511 # If there is a colon in the path, we need to keep it.
25512 if test "x$srcdir" = x.; then
25513   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
25514 fi
25515
25516 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
25517
25518 DEFS=-DHAVE_CONFIG_H
25519
25520 # Without the "./", some shells look in PATH for config.status.
25521 : ${CONFIG_STATUS=./config.status}
25522
25523 echo creating $CONFIG_STATUS
25524 rm -f $CONFIG_STATUS
25525 cat > $CONFIG_STATUS <<EOF
25526 #! /bin/sh
25527 # Generated automatically by configure.
25528 # Run this file to recreate the current configuration.
25529 # This directory was configured as follows,
25530 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
25531 #
25532 # $0 $ac_configure_args
25533 #
25534 # Compiler output produced by configure, useful for debugging
25535 # configure, is in ./config.log if it exists.
25536
25537 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
25538 for ac_option
25539 do
25540   case "\$ac_option" in
25541   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
25542     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
25543     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
25544   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
25545     echo "$CONFIG_STATUS generated by autoconf version 2.13.1"
25546     exit 0 ;;
25547   -help | --help | --hel | --he | --h)
25548     echo "\$ac_cs_usage"; exit 0 ;;
25549   *) echo "\$ac_cs_usage"; exit 1 ;;
25550   esac
25551 done
25552
25553 ac_given_srcdir=$srcdir
25554 ac_given_INSTALL="$INSTALL"
25555
25556 trap 'rm -fr `echo "\
25557 Makefile:build/top.mk:Makefile.in:build/dir.mk \
25558 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
25559 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
25560 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
25561 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
25562 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
25563 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
25564 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
25565 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
25566 include/Makefile:build/top.mk:include/Makefile.in \
25567 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
25568 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
25569 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
25570 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
25571 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk  \
25572 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
25573 libraries/librewrite/Makefile:build/top.mk:libraries/librewrite/Makefile.in:build/lib.mk:build/lib-shared.mk \
25574 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
25575 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
25576 servers/slapd/back-bdb/Makefile:build/top.mk:servers/slapd/back-bdb/Makefile.in:build/mod.mk \
25577 servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
25578 servers/slapd/back-hdb/Makefile:build/top.mk:servers/slapd/back-hdb/Makefile.in:build/mod.mk \
25579 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
25580 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
25581 servers/slapd/back-ldif/Makefile:build/top.mk:servers/slapd/back-ldif/Makefile.in:build/mod.mk \
25582 servers/slapd/back-meta/Makefile:build/top.mk:servers/slapd/back-meta/Makefile.in:build/mod.mk \
25583 servers/slapd/back-monitor/Makefile:build/top.mk:servers/slapd/back-monitor/Makefile.in:build/mod.mk \
25584 servers/slapd/back-null/Makefile:build/top.mk:servers/slapd/back-null/Makefile.in:build/mod.mk \
25585 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
25586 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
25587 servers/slapd/back-relay/Makefile:build/top.mk:servers/slapd/back-relay/Makefile.in:build/mod.mk \
25588 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
25589 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
25590 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
25591 servers/slapd/slapi/Makefile:build/top.mk:servers/slapd/slapi/Makefile.in:build/lib.mk:build/lib-shared.mk  \
25592 servers/slapd/overlays/Makefile:build/top.mk:servers/slapd/overlays/Makefile.in:build/lib.mk \
25593 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
25594 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
25595 tests/run \
25596 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
25597  include/portable.h include/ldap_features.h include/lber_types.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
25598 EOF
25599 cat >> $CONFIG_STATUS <<EOF
25600
25601 # Protect against being on the right side of a sed subst in config.status.
25602 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
25603  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
25604 $ac_vpsub
25605 $extrasub
25606 s%@SHELL@%$SHELL%g
25607 s%@CFLAGS@%$CFLAGS%g
25608 s%@CPPFLAGS@%$CPPFLAGS%g
25609 s%@CXXFLAGS@%$CXXFLAGS%g
25610 s%@FFLAGS@%$FFLAGS%g
25611 s%@DEFS@%$DEFS%g
25612 s%@LDFLAGS@%$LDFLAGS%g
25613 s%@LIBS@%$LIBS%g
25614 s%@exec_prefix@%$exec_prefix%g
25615 s%@prefix@%$prefix%g
25616 s%@program_transform_name@%$program_transform_name%g
25617 s%@bindir@%$bindir%g
25618 s%@sbindir@%$sbindir%g
25619 s%@libexecdir@%$libexecdir%g
25620 s%@datadir@%$datadir%g
25621 s%@sysconfdir@%$sysconfdir%g
25622 s%@sharedstatedir@%$sharedstatedir%g
25623 s%@localstatedir@%$localstatedir%g
25624 s%@libdir@%$libdir%g
25625 s%@includedir@%$includedir%g
25626 s%@oldincludedir@%$oldincludedir%g
25627 s%@infodir@%$infodir%g
25628 s%@mandir@%$mandir%g
25629 s%@host@%$host%g
25630 s%@host_alias@%$host_alias%g
25631 s%@host_cpu@%$host_cpu%g
25632 s%@host_vendor@%$host_vendor%g
25633 s%@host_os@%$host_os%g
25634 s%@target@%$target%g
25635 s%@target_alias@%$target_alias%g
25636 s%@target_cpu@%$target_cpu%g
25637 s%@target_vendor@%$target_vendor%g
25638 s%@target_os@%$target_os%g
25639 s%@build@%$build%g
25640 s%@build_alias@%$build_alias%g
25641 s%@build_cpu@%$build_cpu%g
25642 s%@build_vendor@%$build_vendor%g
25643 s%@build_os@%$build_os%g
25644 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
25645 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
25646 s%@INSTALL_DATA@%$INSTALL_DATA%g
25647 s%@PACKAGE@%$PACKAGE%g
25648 s%@VERSION@%$VERSION%g
25649 s%@ACLOCAL@%$ACLOCAL%g
25650 s%@AUTOCONF@%$AUTOCONF%g
25651 s%@AUTOMAKE@%$AUTOMAKE%g
25652 s%@AUTOHEADER@%$AUTOHEADER%g
25653 s%@MAKEINFO@%$MAKEINFO%g
25654 s%@install_sh@%$install_sh%g
25655 s%@AMTAR@%$AMTAR%g
25656 s%@AWK@%$AWK%g
25657 s%@AMTARFLAGS@%$AMTARFLAGS%g
25658 s%@SET_MAKE@%$SET_MAKE%g
25659 s%@OPENLDAP_LIBRELEASE@%$OPENLDAP_LIBRELEASE%g
25660 s%@OPENLDAP_LIBVERSION@%$OPENLDAP_LIBVERSION%g
25661 s%@OPENLDAP_RELEASE_DATE@%$OPENLDAP_RELEASE_DATE%g
25662 s%@top_builddir@%$top_builddir%g
25663 s%@ldap_subdir@%$ldap_subdir%g
25664 s%@CC@%$CC%g
25665 s%@AR@%$AR%g
25666 s%@LN_S@%$LN_S%g
25667 s%@OBJEXT@%$OBJEXT%g
25668 s%@EXEEXT@%$EXEEXT%g
25669 s%@ECHO@%$ECHO%g
25670 s%@RANLIB@%$RANLIB%g
25671 s%@STRIP@%$STRIP%g
25672 s%@DLLTOOL@%$DLLTOOL%g
25673 s%@AS@%$AS%g
25674 s%@OBJDUMP@%$OBJDUMP%g
25675 s%@CPP@%$CPP%g
25676 s%@LIBTOOL@%$LIBTOOL%g
25677 s%@PERLBIN@%$PERLBIN%g
25678 s%@OL_MKDEP@%$OL_MKDEP%g
25679 s%@OL_MKDEP_FLAGS@%$OL_MKDEP_FLAGS%g
25680 s%@LTSTATIC@%$LTSTATIC%g
25681 s%@LIBOBJS@%$LIBOBJS%g
25682 s%@LIBSRCS@%$LIBSRCS%g
25683 s%@PLAT@%$PLAT%g
25684 s%@WITH_SASL@%$WITH_SASL%g
25685 s%@WITH_TLS@%$WITH_TLS%g
25686 s%@WITH_MODULES_ENABLED@%$WITH_MODULES_ENABLED%g
25687 s%@BUILD_LIBS_DYNAMIC@%$BUILD_LIBS_DYNAMIC%g
25688 s%@BUILD_SLAPD@%$BUILD_SLAPD%g
25689 s%@BUILD_SLAPI@%$BUILD_SLAPI%g
25690 s%@SLAPD_SLAPI_DEPEND@%$SLAPD_SLAPI_DEPEND%g
25691 s%@BUILD_BDB@%$BUILD_BDB%g
25692 s%@BUILD_DNSSRV@%$BUILD_DNSSRV%g
25693 s%@BUILD_HDB@%$BUILD_HDB%g
25694 s%@BUILD_LDAP@%$BUILD_LDAP%g
25695 s%@BUILD_LDBM@%$BUILD_LDBM%g
25696 s%@BUILD_META@%$BUILD_META%g
25697 s%@BUILD_MONITOR@%$BUILD_MONITOR%g
25698 s%@BUILD_NULL@%$BUILD_NULL%g
25699 s%@BUILD_PASSWD@%$BUILD_PASSWD%g
25700 s%@BUILD_RELAY@%$BUILD_RELAY%g
25701 s%@BUILD_PERL@%$BUILD_PERL%g
25702 s%@BUILD_SHELL@%$BUILD_SHELL%g
25703 s%@BUILD_SQL@%$BUILD_SQL%g
25704 s%@BUILD_ACCESSLOG@%$BUILD_ACCESSLOG%g
25705 s%@BUILD_DENYOP@%$BUILD_DENYOP%g
25706 s%@BUILD_DYNGROUP@%$BUILD_DYNGROUP%g
25707 s%@BUILD_DYNLIST@%$BUILD_DYNLIST%g
25708 s%@BUILD_GLUE@%$BUILD_GLUE%g
25709 s%@BUILD_LASTMOD@%$BUILD_LASTMOD%g
25710 s%@BUILD_PPOLICY@%$BUILD_PPOLICY%g
25711 s%@BUILD_PROXYCACHE@%$BUILD_PROXYCACHE%g
25712 s%@BUILD_REFINT@%$BUILD_REFINT%g
25713 s%@BUILD_RETCODE@%$BUILD_RETCODE%g
25714 s%@BUILD_RWM@%$BUILD_RWM%g
25715 s%@BUILD_SYNCPROV@%$BUILD_SYNCPROV%g
25716 s%@BUILD_TRANSLUCENT@%$BUILD_TRANSLUCENT%g
25717 s%@BUILD_UNIQUE@%$BUILD_UNIQUE%g
25718 s%@BUILD_SLURPD@%$BUILD_SLURPD%g
25719 s%@LDAP_LIBS@%$LDAP_LIBS%g
25720 s%@SLAPD_LIBS@%$SLAPD_LIBS%g
25721 s%@SLURPD_LIBS@%$SLURPD_LIBS%g
25722 s%@LDBM_LIBS@%$LDBM_LIBS%g
25723 s%@LTHREAD_LIBS@%$LTHREAD_LIBS%g
25724 s%@LUTIL_LIBS@%$LUTIL_LIBS%g
25725 s%@WRAP_LIBS@%$WRAP_LIBS%g
25726 s%@SLAPD_MODULES_CPPFLAGS@%$SLAPD_MODULES_CPPFLAGS%g
25727 s%@SLAPD_MODULES_LDFLAGS@%$SLAPD_MODULES_LDFLAGS%g
25728 s%@SLAPD_NO_STATIC@%$SLAPD_NO_STATIC%g
25729 s%@SLAPD_STATIC_BACKENDS@%$SLAPD_STATIC_BACKENDS%g
25730 s%@SLAPD_DYNAMIC_BACKENDS@%$SLAPD_DYNAMIC_BACKENDS%g
25731 s%@SLAPD_STATIC_OVERLAYS@%$SLAPD_STATIC_OVERLAYS%g
25732 s%@SLAPD_DYNAMIC_OVERLAYS@%$SLAPD_DYNAMIC_OVERLAYS%g
25733 s%@PERL_CPPFLAGS@%$PERL_CPPFLAGS%g
25734 s%@SLAPD_PERL_LDFLAGS@%$SLAPD_PERL_LDFLAGS%g
25735 s%@MOD_PERL_LDFLAGS@%$MOD_PERL_LDFLAGS%g
25736 s%@KRB4_LIBS@%$KRB4_LIBS%g
25737 s%@KRB5_LIBS@%$KRB5_LIBS%g
25738 s%@SASL_LIBS@%$SASL_LIBS%g
25739 s%@TLS_LIBS@%$TLS_LIBS%g
25740 s%@MODULES_LIBS@%$MODULES_LIBS%g
25741 s%@SLAPI_LIBS@%$SLAPI_LIBS%g
25742 s%@LIBSLAPI@%$LIBSLAPI%g
25743 s%@LIBSLAPITOOLS@%$LIBSLAPITOOLS%g
25744 s%@AUTH_LIBS@%$AUTH_LIBS%g
25745 s%@SLAPD_SLP_LIBS@%$SLAPD_SLP_LIBS%g
25746 s%@SLAPD_GMP_LIBS@%$SLAPD_GMP_LIBS%g
25747 s%@SLAPD_SQL_LDFLAGS@%$SLAPD_SQL_LDFLAGS%g
25748 s%@SLAPD_SQL_LIBS@%$SLAPD_SQL_LIBS%g
25749 s%@SLAPD_SQL_INCLUDES@%$SLAPD_SQL_INCLUDES%g
25750
25751 CEOF
25752 EOF
25753
25754 cat >> $CONFIG_STATUS <<\EOF
25755
25756 # Split the substitutions into bite-sized pieces for seds with
25757 # small command number limits, like on Digital OSF/1 and HP-UX.
25758 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
25759 ac_file=1 # Number of current file.
25760 ac_beg=1 # First line for current file.
25761 ac_end=$ac_max_sed_cmds # Line after last line for current file.
25762 ac_more_lines=:
25763 ac_sed_cmds=""
25764 while $ac_more_lines; do
25765   if test $ac_beg -gt 1; then
25766     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
25767   else
25768     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
25769   fi
25770   if test ! -s conftest.s$ac_file; then
25771     ac_more_lines=false
25772     rm -f conftest.s$ac_file
25773   else
25774     if test -z "$ac_sed_cmds"; then
25775       ac_sed_cmds="sed -f conftest.s$ac_file"
25776     else
25777       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
25778     fi
25779     ac_file=`expr $ac_file + 1`
25780     ac_beg=$ac_end
25781     ac_end=`expr $ac_end + $ac_max_sed_cmds`
25782   fi
25783 done
25784 if test -z "$ac_sed_cmds"; then
25785   ac_sed_cmds=cat
25786 fi
25787 EOF
25788
25789 cat >> $CONFIG_STATUS <<EOF
25790
25791 CONFIG_FILES=\${CONFIG_FILES-"\
25792 Makefile:build/top.mk:Makefile.in:build/dir.mk \
25793 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
25794 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
25795 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
25796 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
25797 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
25798 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
25799 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
25800 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
25801 include/Makefile:build/top.mk:include/Makefile.in \
25802 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
25803 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
25804 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
25805 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
25806 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk  \
25807 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
25808 libraries/librewrite/Makefile:build/top.mk:libraries/librewrite/Makefile.in:build/lib.mk:build/lib-shared.mk \
25809 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
25810 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
25811 servers/slapd/back-bdb/Makefile:build/top.mk:servers/slapd/back-bdb/Makefile.in:build/mod.mk \
25812 servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
25813 servers/slapd/back-hdb/Makefile:build/top.mk:servers/slapd/back-hdb/Makefile.in:build/mod.mk \
25814 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
25815 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
25816 servers/slapd/back-ldif/Makefile:build/top.mk:servers/slapd/back-ldif/Makefile.in:build/mod.mk \
25817 servers/slapd/back-meta/Makefile:build/top.mk:servers/slapd/back-meta/Makefile.in:build/mod.mk \
25818 servers/slapd/back-monitor/Makefile:build/top.mk:servers/slapd/back-monitor/Makefile.in:build/mod.mk \
25819 servers/slapd/back-null/Makefile:build/top.mk:servers/slapd/back-null/Makefile.in:build/mod.mk \
25820 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
25821 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
25822 servers/slapd/back-relay/Makefile:build/top.mk:servers/slapd/back-relay/Makefile.in:build/mod.mk \
25823 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
25824 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
25825 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
25826 servers/slapd/slapi/Makefile:build/top.mk:servers/slapd/slapi/Makefile.in:build/lib.mk:build/lib-shared.mk  \
25827 servers/slapd/overlays/Makefile:build/top.mk:servers/slapd/overlays/Makefile.in:build/lib.mk \
25828 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
25829 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
25830 tests/run \
25831 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
25832 "}
25833 EOF
25834 cat >> $CONFIG_STATUS <<\EOF
25835 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
25836   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
25837   case "$ac_file" in
25838   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
25839        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
25840   *) ac_file_in="${ac_file}.in" ;;
25841   esac
25842
25843   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
25844
25845   # Remove last slash and all that follows it.  Not all systems have dirname.
25846   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
25847   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
25848     # The file is in a subdirectory.
25849     test ! -d "$ac_dir" && mkdir "$ac_dir"
25850     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
25851     # A "../" for each directory in $ac_dir_suffix.
25852     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
25853   else
25854     ac_dir_suffix= ac_dots=
25855   fi
25856
25857   case "$ac_given_srcdir" in
25858   .)  srcdir=.
25859       if test -z "$ac_dots"; then top_srcdir=.
25860       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
25861   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
25862   *) # Relative path.
25863     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
25864     top_srcdir="$ac_dots$ac_given_srcdir" ;;
25865   esac
25866
25867   case "$ac_given_INSTALL" in
25868   [/$]*) INSTALL="$ac_given_INSTALL" ;;
25869   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
25870   esac
25871
25872   echo creating "$ac_file"
25873   rm -f "$ac_file"
25874   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
25875   case "$ac_file" in
25876   *[Mm]akefile*) ac_comsub="1i\\
25877 # $configure_input" ;;
25878   *) ac_comsub= ;;
25879   esac
25880
25881   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
25882   sed -e "$ac_comsub
25883 s%@configure_input@%$configure_input%g
25884 s%@srcdir@%$srcdir%g
25885 s%@top_srcdir@%$top_srcdir%g
25886 s%@INSTALL@%$INSTALL%g
25887 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
25888 fi; done
25889 rm -f conftest.s*
25890
25891 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
25892 # NAME is the cpp macro being defined and VALUE is the value it is being given.
25893 #
25894 # ac_d sets the value in "#define NAME VALUE" lines.
25895 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
25896 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
25897 ac_dC='\3'
25898 ac_dD='%g'
25899 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
25900 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
25901 ac_uB='\([      ]\)%\1#\2define\3'
25902 ac_uC=' '
25903 ac_uD='\4%g'
25904 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
25905 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
25906 ac_eB='$%\1#\2define\3'
25907 ac_eC=' '
25908 ac_eD='%g'
25909
25910 if test "${CONFIG_HEADERS+set}" != set; then
25911 EOF
25912 cat >> $CONFIG_STATUS <<EOF
25913   CONFIG_HEADERS="include/portable.h include/ldap_features.h include/lber_types.h"
25914 EOF
25915 cat >> $CONFIG_STATUS <<\EOF
25916 fi
25917 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
25918   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
25919   case "$ac_file" in
25920   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
25921        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
25922   *) ac_file_in="${ac_file}.in" ;;
25923   esac
25924
25925   echo creating $ac_file
25926
25927   rm -f conftest.frag conftest.in conftest.out
25928   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
25929   cat $ac_file_inputs > conftest.in
25930
25931 EOF
25932
25933 # Transform confdefs.h into a sed script conftest.vals that substitutes
25934 # the proper values into config.h.in to produce config.h.  And first:
25935 # Protect against being on the right side of a sed subst in config.status.
25936 # Protect against being in an unquoted here document in config.status.
25937 rm -f conftest.vals
25938 cat > conftest.hdr <<\EOF
25939 s/[\\&%]/\\&/g
25940 s%[\\$`]%\\&%g
25941 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
25942 s%ac_d%ac_u%gp
25943 s%ac_u%ac_e%gp
25944 EOF
25945 sed -n -f conftest.hdr confdefs.h > conftest.vals
25946 rm -f conftest.hdr
25947
25948 # This sed command replaces #undef with comments.  This is necessary, for
25949 # example, in the case of _POSIX_SOURCE, which is predefined and required
25950 # on some systems where configure will not decide to define it.
25951 cat >> conftest.vals <<\EOF
25952 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
25953 EOF
25954
25955 # Break up conftest.vals because some shells have a limit on
25956 # the size of here documents, and old seds have small limits too.
25957
25958 rm -f conftest.tail
25959 while :
25960 do
25961   ac_lines=`grep -c . conftest.vals`
25962   # grep -c gives empty output for an empty file on some AIX systems.
25963   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
25964   # Write a limited-size here document to conftest.frag.
25965   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
25966   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
25967   echo 'CEOF
25968   sed -f conftest.frag conftest.in > conftest.out
25969   rm -f conftest.in
25970   mv conftest.out conftest.in
25971 ' >> $CONFIG_STATUS
25972   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
25973   rm -f conftest.vals
25974   mv conftest.tail conftest.vals
25975 done
25976 rm -f conftest.vals
25977
25978 cat >> $CONFIG_STATUS <<\EOF
25979   rm -f conftest.frag conftest.h
25980   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
25981   cat conftest.in >> conftest.h
25982   rm -f conftest.in
25983   if cmp -s $ac_file conftest.h 2>/dev/null; then
25984     echo "$ac_file is unchanged"
25985     rm -f conftest.h
25986   else
25987     # Remove last slash and all that follows it.  Not all systems have dirname.
25988       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
25989       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
25990       # The file is in a subdirectory.
25991       test ! -d "$ac_dir" && mkdir "$ac_dir"
25992     fi
25993     rm -f $ac_file
25994     mv conftest.h $ac_file
25995   fi
25996 fi; done
25997
25998 EOF
25999 cat >> $CONFIG_STATUS <<EOF
26000 STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS"
26001 EOF
26002 cat >> $CONFIG_STATUS <<\EOF
26003
26004 chmod +x tests/run
26005 date > stamp-h
26006 BACKENDSC="servers/slapd/backends.c"
26007 echo "Making $BACKENDSC"
26008 rm -f $BACKENDSC
26009 cat > $BACKENDSC << ENDX
26010 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
26011  *
26012  * Copyright 1998-2005 The OpenLDAP Foundation.
26013  * All rights reserved.
26014  *
26015  * Redistribution and use in source and binary forms, with or without
26016  * modification, are permitted only as authorized by the OpenLDAP
26017  * Public License.
26018  *
26019  * A copy of this license is available in the file LICENSE in the
26020  * top-level directory of the distribution or, alternatively, at
26021  * <http://www.OpenLDAP.org/license.html>.
26022  */
26023 /* This file is automatically generated by configure; please do not edit. */
26024
26025 #include "portable.h"
26026 #include "slap.h"
26027
26028 ENDX
26029 if test "${STATIC_BACKENDS}"; then
26030         for b in config ${STATIC_BACKENDS}; do
26031                 bb=`echo "${b}" | sed -e 's/back-//'`
26032                 cat >> $BACKENDSC << ENDX
26033 extern BI_init ${bb}_back_initialize;
26034 ENDX
26035         done
26036
26037         cat >> $BACKENDSC << ENDX
26038
26039 BackendInfo slap_binfo[] = {
26040 ENDX
26041
26042         for b in config ${STATIC_BACKENDS}; do
26043                 bb=`echo "${b}" | sed -e 's/back-//'`
26044                 echo "    Add ${bb} ..."
26045                 cat >> $BACKENDSC << ENDX
26046         { "${bb}", ${bb}_back_initialize },
26047 ENDX
26048         done
26049
26050         cat >> $BACKENDSC << ENDX
26051         { NULL, NULL },
26052 };
26053
26054 /* end of generated file */
26055 ENDX
26056 fi
26057
26058 echo Please run \"make depend\" to build dependencies
26059
26060 exit 0
26061 EOF
26062 chmod +x $CONFIG_STATUS
26063 rm -fr confdefs* $ac_clean_files
26064 test "$no_create" = yes || $SHELL $CONFIG_STATUS || exit 1
26065