]> git.sur5r.net Git - openldap/blob - configure
from HEAD:
[openldap] / configure
1 #! /bin/sh
2 # $OpenLDAP$
3 # from OpenLDAP: pkg/ldap/configure.in,v 1.530 2004/04/10 01:45:25 kurt Exp  
4
5 # This work is part of OpenLDAP Software <http://www.openldap.org/>.
6 #
7 # Copyright 1998-2004 The OpenLDAP Foundation.
8 # All rights reserved.
9 #
10 # Redistribution and use in source and binary forms, with or without
11 # modification, are permitted only as authorized by the OpenLDAP
12 # Public License.
13 #
14 # A copy of this license is available in the file LICENSE in the
15 # top-level directory of the distribution or, alternatively, at
16 # <http://www.OpenLDAP.org/license.html>.
17
18 echo "Copyright 1998-2004 The OpenLDAP Foundation. All rights reserved."
19 echo "  Restrictions apply, see COPYRIGHT and LICENSE files."
20
21 # Guess values for system-dependent variables and create Makefiles.
22 # Generated automatically using autoconf version 2.13.1 
23 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
24 #
25 # This configure script is free software; the Free Software Foundation
26 # gives unlimited permission to copy, distribute and modify it.
27
28 # Defaults:
29 ac_help=
30 ac_default_prefix=/usr/local
31 # Any additions from configure.in:
32 ac_default_prefix=/usr/local
33 ac_help="$ac_help
34   --with-subdir=DIR       change default subdirectory used for installs"
35 ac_help="$ac_help
36   --enable-debug          enable debugging [yes]"
37 ac_help="$ac_help
38   --enable-dynamic        enable linking built binaries with dynamic libs [no]"
39 ac_help="$ac_help
40   --enable-syslog         enable syslog support [auto]"
41 ac_help="$ac_help
42   --enable-proctitle      enable proctitle support [yes]"
43 ac_help="$ac_help
44   --enable-ipv6           enable IPv6 support [auto]"
45 ac_help="$ac_help
46   --enable-local          enable AF_LOCAL (AF_UNIX) socket support [auto]"
47 ac_help="$ac_help
48   --with-cyrus-sasl       with Cyrus SASL support [auto]"
49 ac_help="$ac_help
50   --with-fetch            with fetch(3) URL support [auto]"
51 ac_help="$ac_help
52   --with-threads          with threads [auto]"
53 ac_help="$ac_help
54   --with-tls              with TLS/SSL support [auto]"
55 ac_help="$ac_help
56   --with-yielding-select  with implicitly yielding select [auto]"
57 ac_help="$ac_help
58
59 SLAPD (Standalone LDAP Daemon) Options:"
60 ac_help="$ac_help
61   --enable-slapd          enable building slapd [yes]"
62 ac_help="$ac_help
63     --enable-aci          enable per-object ACIs (experimental) [no]"
64 ac_help="$ac_help
65     --enable-cleartext    enable cleartext passwords [yes]"
66 ac_help="$ac_help
67     --enable-crypt        enable crypt(3) passwords [no]"
68 ac_help="$ac_help
69     --enable-lmpasswd     enable LAN Manager passwords [no]"
70 ac_help="$ac_help
71     --enable-spasswd      enable (Cyrus) SASL password verification [no]"
72 ac_help="$ac_help
73     --enable-modules      enable dynamic module support [no]"
74 ac_help="$ac_help
75     --enable-rewrite      enable DN rewriting in back-ldap and the rwm overlay [auto]"
76 ac_help="$ac_help
77     --enable-rlookups     enable reverse lookups of client hostnames [no]"
78 ac_help="$ac_help
79     --enable-slapi        enable SLAPI support (experimental) [no]"
80 ac_help="$ac_help
81     --enable-slp          enable SLPv2 support [no]"
82 ac_help="$ac_help
83     --enable-wrappers     enable tcp wrapper support [no]"
84 ac_help="$ac_help
85     --enable-bdb          enable Berkeley DB backend no|yes|mod [yes]"
86 ac_help="$ac_help
87     --enable-dnssrv       enable dnssrv backend no|yes|mod [no]"
88 ac_help="$ac_help
89     --enable-hdb          enable Hierarchical DB backend no|yes|mod [no]"
90 ac_help="$ac_help
91     --enable-ldap         enable ldap backend no|yes|mod [no]"
92 ac_help="$ac_help
93     --enable-ldbm         enable ldbm backend no|yes|mod [no]"
94 ac_help="$ac_help
95       --with-ldbm-api     with LDBM API auto|berkeley|bcompat|mdbm|gdbm [auto]"
96 ac_help="$ac_help
97       --with-ldbm-type    use LDBM type auto|btree|hash [auto]"
98 ac_help="$ac_help
99     --enable-meta         enable metadirectory backend no|yes|mod [no]"
100 ac_help="$ac_help
101     --enable-monitor      enable monitor backend no|yes|mod [yes]"
102 ac_help="$ac_help
103     --enable-null         enable null backend no|yes|mod [no]"
104 ac_help="$ac_help
105     --enable-passwd       enable passwd backend no|yes|mod [no]"
106 ac_help="$ac_help
107     --enable-perl         enable perl backend no|yes|mod [no]"
108 ac_help="$ac_help
109     --enable-shell        enable shell backend no|yes|mod [no]"
110 ac_help="$ac_help
111     --enable-sql          enable sql backend no|yes|mod [no]"
112 ac_help="$ac_help
113
114 SLAPD Overlay Options:"
115 ac_help="$ac_help
116     --enable-dyngroup     Dynamic Group overlay no|yes|mod [no]"
117 ac_help="$ac_help
118     --enable-proxycache   Proxy Cache overlay no|yes|mod [no]"
119 ac_help="$ac_help
120
121 SLURPD (Replication Daemon) Options:"
122 ac_help="$ac_help
123   --enable-slurpd         enable building slurpd [auto]"
124 ac_help="$ac_help
125
126 Library Generation & Linking Options"
127 ac_help="$ac_help
128   --enable-static[=PKGS]  build static libraries [default=yes]"
129 ac_help="$ac_help
130   --enable-shared[=PKGS]  build shared libraries [default=yes]"
131 ac_help="$ac_help
132   --enable-fast-install[=PKGS]  optimize for fast installation [default=yes]"
133 ac_help="$ac_help
134   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]"
135
136 # Find the correct PATH separator.  Usually this is `:', but
137 # DJGPP uses `;' like DOS.
138 if test "X${PATH_SEPARATOR+set}" != Xset; then
139   UNAME=${UNAME-`uname 2>/dev/null`}
140   case X$UNAME in
141     *-DOS) lt_cv_sys_path_separator=';' ;;
142     *)     lt_cv_sys_path_separator=':' ;;
143   esac
144   PATH_SEPARATOR=$lt_cv_sys_path_separator
145 fi
146
147
148 # Check that we are running under the correct shell.
149 SHELL=${CONFIG_SHELL-/bin/sh}
150
151 case X$ECHO in
152 X*--fallback-echo)
153   # Remove one level of quotation (which was required for Make).
154   ECHO=`echo "$ECHO" | sed 's,\\\\\$\\$0,'$0','`
155   ;;
156 esac
157
158 echo=${ECHO-echo}
159 if test "X$1" = X--no-reexec; then
160   # Discard the --no-reexec flag, and continue.
161   shift
162 elif test "X$1" = X--fallback-echo; then
163   # Avoid inline document here, it may be left over
164   :
165 elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then
166   # Yippee, $echo works!
167   :
168 else
169   # Restart under the correct shell.
170   exec $SHELL "$0" --no-reexec ${1+"$@"}
171 fi
172
173 if test "X$1" = X--fallback-echo; then
174   # used as fallback echo
175   shift
176   cat <<EOF
177
178 EOF
179   exit 0
180 fi
181
182 # The HP-UX ksh and POSIX shell print the target directory to stdout
183 # if CDPATH is set.
184 if test "X${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
185
186 if test -z "$ECHO"; then
187 if test "X${echo_test_string+set}" != Xset; then
188 # find a string as large as possible, as long as the shell can cope with it
189   for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do
190     # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
191     if (echo_test_string="`eval $cmd`") 2>/dev/null &&
192        echo_test_string="`eval $cmd`" &&
193        (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
194     then
195       break
196     fi
197   done
198 fi
199
200 if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
201    echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
202    test "X$echo_testing_string" = "X$echo_test_string"; then
203   :
204 else
205   # The Solaris, AIX, and Digital Unix default echo programs unquote
206   # backslashes.  This makes it impossible to quote backslashes using
207   #   echo "$something" | sed 's/\\/\\\\/g'
208   #
209   # So, first we look for a working echo in the user's PATH.
210
211   IFS="${IFS=   }"; save_ifs="$IFS"; IFS=$PATH_SEPARATOR
212   for dir in $PATH /usr/ucb; do
213     if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
214        test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
215        echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
216        test "X$echo_testing_string" = "X$echo_test_string"; then
217       echo="$dir/echo"
218       break
219     fi
220   done
221   IFS="$save_ifs"
222
223   if test "X$echo" = Xecho; then
224     # We didn't find a better echo, so look for alternatives.
225     if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
226        echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
227        test "X$echo_testing_string" = "X$echo_test_string"; then
228       # This shell has a builtin print -r that does the trick.
229       echo='print -r'
230     elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
231          test "X$CONFIG_SHELL" != X/bin/ksh; then
232       # If we have ksh, try running configure again with it.
233       ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
234       export ORIGINAL_CONFIG_SHELL
235       CONFIG_SHELL=/bin/ksh
236       export CONFIG_SHELL
237       exec $CONFIG_SHELL "$0" --no-reexec ${1+"$@"}
238     else
239       # Try using printf.
240       echo='printf %s\n'
241       if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
242          echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
243          test "X$echo_testing_string" = "X$echo_test_string"; then
244         # Cool, printf works
245         :
246       elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` &&
247            test "X$echo_testing_string" = 'X\t' &&
248            echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
249            test "X$echo_testing_string" = "X$echo_test_string"; then
250         CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
251         export CONFIG_SHELL
252         SHELL="$CONFIG_SHELL"
253         export SHELL
254         echo="$CONFIG_SHELL $0 --fallback-echo"
255       elif echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` &&
256            test "X$echo_testing_string" = 'X\t' &&
257            echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
258            test "X$echo_testing_string" = "X$echo_test_string"; then
259         echo="$CONFIG_SHELL $0 --fallback-echo"
260       else
261         # maybe with a smaller string...
262         prev=:
263
264         for cmd in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed 50q "$0"'; do
265           if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
266           then
267             break
268           fi
269           prev="$cmd"
270         done
271
272         if test "$prev" != 'sed 50q "$0"'; then
273           echo_test_string=`eval $prev`
274           export echo_test_string
275           exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "$0" ${1+"$@"}
276         else
277           # Oops.  We lost completely, so just stick with echo.
278           echo=echo
279         fi
280       fi
281     fi
282   fi
283 fi
284 fi
285
286 # Copy echo and quote the copy suitably for passing to libtool from
287 # the Makefile, instead of quoting the original, which is used later.
288 ECHO=$echo
289 if test "X$ECHO" = "X$CONFIG_SHELL $0 --fallback-echo"; then
290    ECHO="$CONFIG_SHELL \\\$\$0 --fallback-echo"
291 fi
292
293
294 ac_help="$ac_help
295   --disable-libtool-lock  avoid locking (might break parallel builds)"
296 ac_help="$ac_help
297   --with-pic              try to use only PIC/non-PIC objects [default=use both]"
298 ac_help="$ac_help
299
300 See INSTALL file for further details."
301
302 # Initialize some variables set by options.
303 # The variables have the same names as the options, with
304 # dashes changed to underlines.
305 build=NONE
306 cache_file=./config.cache
307 exec_prefix=NONE
308 host=NONE
309 no_create=
310 nonopt=NONE
311 no_recursion=
312 prefix=NONE
313 program_prefix=NONE
314 program_suffix=NONE
315 program_transform_name=s,x,x,
316 silent=
317 site=
318 srcdir=
319 target=NONE
320 verbose=
321 x_includes=NONE
322 x_libraries=NONE
323 bindir='${exec_prefix}/bin'
324 sbindir='${exec_prefix}/sbin'
325 libexecdir='${exec_prefix}/libexec'
326 datadir='${prefix}/share'
327 sysconfdir='${prefix}/etc'
328 sharedstatedir='${prefix}/com'
329 localstatedir='${prefix}/var'
330 libdir='${exec_prefix}/lib'
331 includedir='${prefix}/include'
332 oldincludedir='/usr/include'
333 infodir='${prefix}/info'
334 mandir='${prefix}/man'
335
336 # Initialize some other variables.
337 subdirs=
338 MFLAGS= MAKEFLAGS=
339 SHELL=${CONFIG_SHELL-/bin/sh}
340 # Maximum number of lines to put in a shell here document.
341 ac_max_here_lines=12
342
343 ac_prev=
344 for ac_option
345 do
346
347   # If the previous option needs an argument, assign it.
348   if test -n "$ac_prev"; then
349     eval "$ac_prev=\$ac_option"
350     ac_prev=
351     continue
352   fi
353
354   case "$ac_option" in
355   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
356   *) ac_optarg= ;;
357   esac
358
359   # Accept the important Cygnus configure options, so we can diagnose typos.
360
361   case "$ac_option" in
362
363   -bindir | --bindir | --bindi | --bind | --bin | --bi)
364     ac_prev=bindir ;;
365   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
366     bindir="$ac_optarg" ;;
367
368   -build | --build | --buil | --bui | --bu)
369     ac_prev=build ;;
370   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
371     build="$ac_optarg" ;;
372
373   -cache-file | --cache-file | --cache-fil | --cache-fi \
374   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
375     ac_prev=cache_file ;;
376   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
377   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
378     cache_file="$ac_optarg" ;;
379
380   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
381     ac_prev=datadir ;;
382   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
383   | --da=*)
384     datadir="$ac_optarg" ;;
385
386   -disable-* | --disable-*)
387     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
388     # Reject names that are not valid shell variable names.
389     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
390       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
391     fi
392     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
393     eval "enable_${ac_feature}=no" ;;
394
395   -enable-* | --enable-*)
396     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
397     # Reject names that are not valid shell variable names.
398     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
399       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
400     fi
401     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
402     case "$ac_option" in
403       *=*) ;;
404       *) ac_optarg=yes ;;
405     esac
406     eval "enable_${ac_feature}='$ac_optarg'" ;;
407
408   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
409   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
410   | --exec | --exe | --ex)
411     ac_prev=exec_prefix ;;
412   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
413   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
414   | --exec=* | --exe=* | --ex=*)
415     exec_prefix="$ac_optarg" ;;
416
417   -gas | --gas | --ga | --g)
418     # Obsolete; use --with-gas.
419     with_gas=yes ;;
420
421   -help | --help | --hel | --he)
422     # Omit some internal or obsolete options to make the list less imposing.
423     # This message is too long to be a string in the A/UX 3.1 sh.
424     cat << EOF
425 Usage: configure [options] [host]
426 Options: [defaults in brackets after descriptions]
427 Configuration:
428   --cache-file=FILE       cache test results in FILE
429   --help                  print this message
430   --no-create             do not create output files
431   --quiet, --silent       do not print \`checking...' messages
432   --version               print the version of autoconf that created configure
433 Directory and file names:
434   --prefix=PREFIX         install architecture-independent files in PREFIX
435                           [$ac_default_prefix]
436   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
437                           [same as prefix]
438   --bindir=DIR            user executables in DIR [EPREFIX/bin]
439   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
440   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
441   --datadir=DIR           read-only architecture-independent data in DIR
442                           [PREFIX/share]
443   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
444   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
445                           [PREFIX/com]
446   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
447   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
448   --includedir=DIR        C header files in DIR [PREFIX/include]
449   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
450   --infodir=DIR           info documentation in DIR [PREFIX/info]
451   --mandir=DIR            man documentation in DIR [PREFIX/man]
452   --srcdir=DIR            find the sources in DIR [configure dir or ..]
453   --program-prefix=PREFIX prepend PREFIX to installed program names
454   --program-suffix=SUFFIX append SUFFIX to installed program names
455   --program-transform-name=PROGRAM
456                           run sed PROGRAM on installed program names
457 EOF
458     cat << EOF
459 Host type:
460   --build=BUILD           configure for building on BUILD [BUILD=HOST]
461   --host=HOST             configure for HOST [guessed]
462   --target=TARGET         configure for TARGET [TARGET=HOST]
463 Features and packages:
464   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
465   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
466   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
467   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
468   --x-includes=DIR        X include files are in DIR
469   --x-libraries=DIR       X library files are in DIR
470 EOF
471     if test -n "$ac_help"; then
472       echo "--enable and --with options recognized:$ac_help"
473     fi
474     exit 0 ;;
475
476   -host | --host | --hos | --ho)
477     ac_prev=host ;;
478   -host=* | --host=* | --hos=* | --ho=*)
479     host="$ac_optarg" ;;
480
481   -includedir | --includedir | --includedi | --included | --include \
482   | --includ | --inclu | --incl | --inc)
483     ac_prev=includedir ;;
484   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
485   | --includ=* | --inclu=* | --incl=* | --inc=*)
486     includedir="$ac_optarg" ;;
487
488   -infodir | --infodir | --infodi | --infod | --info | --inf)
489     ac_prev=infodir ;;
490   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
491     infodir="$ac_optarg" ;;
492
493   -libdir | --libdir | --libdi | --libd)
494     ac_prev=libdir ;;
495   -libdir=* | --libdir=* | --libdi=* | --libd=*)
496     libdir="$ac_optarg" ;;
497
498   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
499   | --libexe | --libex | --libe)
500     ac_prev=libexecdir ;;
501   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
502   | --libexe=* | --libex=* | --libe=*)
503     libexecdir="$ac_optarg" ;;
504
505   -localstatedir | --localstatedir | --localstatedi | --localstated \
506   | --localstate | --localstat | --localsta | --localst \
507   | --locals | --local | --loca | --loc | --lo)
508     ac_prev=localstatedir ;;
509   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
510   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
511   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
512     localstatedir="$ac_optarg" ;;
513
514   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
515     ac_prev=mandir ;;
516   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
517     mandir="$ac_optarg" ;;
518
519   -nfp | --nfp | --nf)
520     # Obsolete; use --without-fp.
521     with_fp=no ;;
522
523   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
524   | --no-cr | --no-c)
525     no_create=yes ;;
526
527   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
528   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
529     no_recursion=yes ;;
530
531   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
532   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
533   | --oldin | --oldi | --old | --ol | --o)
534     ac_prev=oldincludedir ;;
535   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
536   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
537   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
538     oldincludedir="$ac_optarg" ;;
539
540   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
541     ac_prev=prefix ;;
542   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
543     prefix="$ac_optarg" ;;
544
545   -program-prefix | --program-prefix | --program-prefi | --program-pref \
546   | --program-pre | --program-pr | --program-p)
547     ac_prev=program_prefix ;;
548   -program-prefix=* | --program-prefix=* | --program-prefi=* \
549   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
550     program_prefix="$ac_optarg" ;;
551
552   -program-suffix | --program-suffix | --program-suffi | --program-suff \
553   | --program-suf | --program-su | --program-s)
554     ac_prev=program_suffix ;;
555   -program-suffix=* | --program-suffix=* | --program-suffi=* \
556   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
557     program_suffix="$ac_optarg" ;;
558
559   -program-transform-name | --program-transform-name \
560   | --program-transform-nam | --program-transform-na \
561   | --program-transform-n | --program-transform- \
562   | --program-transform | --program-transfor \
563   | --program-transfo | --program-transf \
564   | --program-trans | --program-tran \
565   | --progr-tra | --program-tr | --program-t)
566     ac_prev=program_transform_name ;;
567   -program-transform-name=* | --program-transform-name=* \
568   | --program-transform-nam=* | --program-transform-na=* \
569   | --program-transform-n=* | --program-transform-=* \
570   | --program-transform=* | --program-transfor=* \
571   | --program-transfo=* | --program-transf=* \
572   | --program-trans=* | --program-tran=* \
573   | --progr-tra=* | --program-tr=* | --program-t=*)
574     program_transform_name="$ac_optarg" ;;
575
576   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
577   | -silent | --silent | --silen | --sile | --sil)
578     silent=yes ;;
579
580   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
581     ac_prev=sbindir ;;
582   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
583   | --sbi=* | --sb=*)
584     sbindir="$ac_optarg" ;;
585
586   -sharedstatedir | --sharedstatedir | --sharedstatedi \
587   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
588   | --sharedst | --shareds | --shared | --share | --shar \
589   | --sha | --sh)
590     ac_prev=sharedstatedir ;;
591   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
592   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
593   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
594   | --sha=* | --sh=*)
595     sharedstatedir="$ac_optarg" ;;
596
597   -site | --site | --sit)
598     ac_prev=site ;;
599   -site=* | --site=* | --sit=*)
600     site="$ac_optarg" ;;
601
602   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
603     ac_prev=srcdir ;;
604   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
605     srcdir="$ac_optarg" ;;
606
607   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
608   | --syscon | --sysco | --sysc | --sys | --sy)
609     ac_prev=sysconfdir ;;
610   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
611   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
612     sysconfdir="$ac_optarg" ;;
613
614   -target | --target | --targe | --targ | --tar | --ta | --t)
615     ac_prev=target ;;
616   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
617     target="$ac_optarg" ;;
618
619   -v | -verbose | --verbose | --verbos | --verbo | --verb)
620     verbose=yes ;;
621
622   -version | --version | --versio | --versi | --vers)
623     echo "configure generated by autoconf version 2.13.1"
624     exit 0 ;;
625
626   -with-* | --with-*)
627     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
628     # Reject names that are not valid shell variable names.
629     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
630       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
631     fi
632     ac_package=`echo $ac_package| sed 's/-/_/g'`
633     case "$ac_option" in
634       *=*) ;;
635       *) ac_optarg=yes ;;
636     esac
637     eval "with_${ac_package}='$ac_optarg'" ;;
638
639   -without-* | --without-*)
640     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
641     # Reject names that are not valid shell variable names.
642     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
643       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
644     fi
645     ac_package=`echo $ac_package| sed 's/-/_/g'`
646     eval "with_${ac_package}=no" ;;
647
648   --x)
649     # Obsolete; use --with-x.
650     with_x=yes ;;
651
652   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
653   | --x-incl | --x-inc | --x-in | --x-i)
654     ac_prev=x_includes ;;
655   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
656   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
657     x_includes="$ac_optarg" ;;
658
659   -x-libraries | --x-libraries | --x-librarie | --x-librari \
660   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
661     ac_prev=x_libraries ;;
662   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
663   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
664     x_libraries="$ac_optarg" ;;
665
666   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
667     ;;
668
669   *)
670     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
671       echo "configure: warning: $ac_option: invalid host type" 1>&2
672     fi
673     if test "x$nonopt" != xNONE; then
674       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
675     fi
676     nonopt="$ac_option"
677     ;;
678
679   esac
680 done
681
682 if test -n "$ac_prev"; then
683   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
684 fi
685
686 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
687
688 # File descriptor usage:
689 # 0 standard input
690 # 1 file creation
691 # 2 errors and warnings
692 # 3 some systems may open it to /dev/tty
693 # 4 used on the Kubota Titan
694 # 6 checking for... messages and results
695 # 5 compiler messages saved in config.log
696 if test "$silent" = yes; then
697   exec 6>/dev/null
698 else
699   exec 6>&1
700 fi
701 exec 5>./config.log
702
703 echo "\
704 This file contains any messages produced by compilers while
705 running configure, to aid debugging if configure makes a mistake.
706 " 1>&5
707
708 # Strip out --no-create and --no-recursion so they do not pile up.
709 # Also quote any args containing shell metacharacters.
710 ac_configure_args=
711 for ac_arg
712 do
713   case "$ac_arg" in
714   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
715   | --no-cr | --no-c) ;;
716   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
717   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
718   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
719   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
720   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
721   esac
722 done
723
724 # NLS nuisances.
725 # Only set these to C if already set.  These must not be set unconditionally
726 # because not all systems understand e.g. LANG=C (notably SCO).
727 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
728 # Non-C LC_CTYPE values break the ctype check.
729 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
730 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
731 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
732 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
733
734 # confdefs.h avoids OS command line length limits that DEFS can exceed.
735 rm -rf conftest* confdefs.h
736 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
737 echo > confdefs.h
738
739 # A filename unique to this package, relative to the directory that
740 # configure is in, which we can look for to find out if srcdir is correct.
741 ac_unique_file=build/version.sh
742
743 # Find the source files, if location was not specified.
744 if test -z "$srcdir"; then
745   ac_srcdir_defaulted=yes
746   # Try the directory containing this script, then its parent.
747   ac_prog=$0
748   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
749   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
750   srcdir=$ac_confdir
751   if test ! -r $srcdir/$ac_unique_file; then
752     srcdir=..
753   fi
754 else
755   ac_srcdir_defaulted=no
756 fi
757 if test ! -r $srcdir/$ac_unique_file; then
758   if test "$ac_srcdir_defaulted" = yes; then
759     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
760   else
761     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
762   fi
763 fi
764 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
765
766 # Prefer explicitly selected file to automatically selected ones.
767 if test -z "$CONFIG_SITE"; then
768   if test "x$prefix" != xNONE; then
769     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
770   else
771     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
772   fi
773 fi
774 for ac_site_file in $CONFIG_SITE; do
775   if test -r "$ac_site_file"; then
776     echo "loading site script $ac_site_file"
777     . "$ac_site_file"
778   fi
779 done
780
781
782 ac_ext=c
783 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
784 ac_cpp='$CPP $CPPFLAGS'
785 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
786 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
787 cross_compiling=$ac_cv_prog_cc_cross
788
789 ac_exeext=
790 ac_objext=o
791 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
792   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
793   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
794     ac_n= ac_c='
795 ' ac_t='        '
796   else
797     ac_n=-n ac_c= ac_t=
798   fi
799 else
800   ac_n= ac_c='\c' ac_t=
801 fi
802
803
804 # set unset (borrowed from autoconf 2.49c)
805 if (OL_FOO=OL_FOO; unset OL_FOO) >/dev/null 2>&1; then
806   ol_unset=unset
807 else
808   ol_unset=false
809 fi
810 # unset CDPATH
811 $ol_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
812
813 ac_aux_dir=
814 for ac_dir in build $srcdir/build; do
815   if test -f $ac_dir/install-sh; then
816     ac_aux_dir=$ac_dir
817     ac_install_sh="$ac_aux_dir/install-sh -c"
818     break
819   elif test -f $ac_dir/install.sh; then
820     ac_aux_dir=$ac_dir
821     ac_install_sh="$ac_aux_dir/install.sh -c"
822     break
823   elif test -f $ac_dir/shtool; then
824     ac_aux_dir=$ac_dir
825     ac_install_sh="$ac_aux_dir/shtool install -c"
826     break
827   fi
828 done
829 if test -z "$ac_aux_dir"; then
830   { echo "configure: error: can not find install-sh or install.sh in build $srcdir/build" 1>&2; exit 1; }
831 fi
832 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
833 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
834 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
835
836 eval `$ac_aux_dir/version.sh`
837 if test -z "$OL_STRING"; then
838         { echo "configure: error: could not determine version" 1>&2; exit 1; }
839 fi
840
841 if test -f "$ac_aux_dir/shtool" -a ! -d $ac_aux_dir/shtool; then
842         ac_cv_shtool="$ac_aux_dir/shtool"
843 else
844         { echo "configure: error: no shtool found in $ac_aux_dir" 1>&2; exit 1; }
845 fi
846
847 SHTOOL="$ac_cv_shtool"
848
849 TB="`$SHTOOL echo -e '%B' 2>/dev/null`"
850 TN="`$SHTOOL echo -e '%b' 2>/dev/null`"
851
852 OPENLDAP_CVS=""
853 if test -d $ac_aux_dir/CVS; then
854         OPENLDAP_CVS="(from CVS sources) "
855 fi
856
857 echo "Configuring ${TB}${OL_STRING}${TN} ${OPENLDAP_CVS}..."
858
859
860 echo $ac_n "checking host system type""... $ac_c" 1>&6
861 echo "configure:862: checking host system type" >&5
862 if test "x$ac_cv_host" = "x" || (test "x$host" != "xNONE" && test "x$host" != "x$ac_cv_host_alias"); then
863
864 # Make sure we can run config.sub.
865   if $ac_config_sub sun4 >/dev/null 2>&1; then :
866     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
867   fi
868
869   ac_cv_host_alias=$host
870   case "$ac_cv_host_alias" in
871   NONE)
872     case $nonopt in
873     NONE)
874       if ac_cv_host_alias=`$ac_config_guess`; then :
875       else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
876       fi ;;
877     *) ac_cv_host_alias=$nonopt ;;
878     esac ;;
879   esac
880
881   ac_cv_host=`$ac_config_sub $ac_cv_host_alias`
882   ac_cv_host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
883   ac_cv_host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
884   ac_cv_host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
885 else
886   echo $ac_n "(cached) $ac_c" 1>&6
887 fi
888
889 echo "$ac_t""$ac_cv_host" 1>&6
890
891 host=$ac_cv_host
892 host_alias=$ac_cv_host_alias
893 host_cpu=$ac_cv_host_cpu
894 host_vendor=$ac_cv_host_vendor
895 host_os=$ac_cv_host_os
896
897
898
899
900
901 echo $ac_n "checking target system type""... $ac_c" 1>&6
902 echo "configure:903: checking target system type" >&5
903 if test "x$ac_cv_target" = "x" || (test "x$target" != "xNONE" && test "x$target" != "x$ac_cv_target_alias"); then
904
905 # Make sure we can run config.sub.
906   if $ac_config_sub sun4 >/dev/null 2>&1; then :
907     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
908   fi
909
910   ac_cv_target_alias=$target
911   case "$ac_cv_target_alias" in
912   NONE)
913     case $nonopt in
914     NONE)
915       ac_cv_target_alias=$host_alias ;;
916
917     *) ac_cv_target_alias=$nonopt ;;
918     esac ;;
919   esac
920
921   ac_cv_target=`$ac_config_sub $ac_cv_target_alias`
922   ac_cv_target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
923   ac_cv_target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
924   ac_cv_target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
925 else
926   echo $ac_n "(cached) $ac_c" 1>&6
927 fi
928
929 echo "$ac_t""$ac_cv_target" 1>&6
930
931 target=$ac_cv_target
932 target_alias=$ac_cv_target_alias
933 target_cpu=$ac_cv_target_cpu
934 target_vendor=$ac_cv_target_vendor
935 target_os=$ac_cv_target_os
936
937
938
939
940
941 echo $ac_n "checking build system type""... $ac_c" 1>&6
942 echo "configure:943: checking build system type" >&5
943 if test "x$ac_cv_build" = "x" || (test "x$build" != "xNONE" && test "x$build" != "x$ac_cv_build_alias"); then
944
945 # Make sure we can run config.sub.
946   if $ac_config_sub sun4 >/dev/null 2>&1; then :
947     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
948   fi
949
950   ac_cv_build_alias=$build
951   case "$ac_cv_build_alias" in
952   NONE)
953     case $nonopt in
954     NONE)
955       ac_cv_build_alias=$host_alias ;;
956
957     *) ac_cv_build_alias=$nonopt ;;
958     esac ;;
959   esac
960
961   ac_cv_build=`$ac_config_sub $ac_cv_build_alias`
962   ac_cv_build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
963   ac_cv_build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
964   ac_cv_build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
965 else
966   echo $ac_n "(cached) $ac_c" 1>&6
967 fi
968
969 echo "$ac_t""$ac_cv_build" 1>&6
970
971 build=$ac_cv_build
972 build_alias=$ac_cv_build_alias
973 build_cpu=$ac_cv_build_cpu
974 build_vendor=$ac_cv_build_vendor
975 build_os=$ac_cv_build_os
976
977
978
979
980
981 # Do some error checking and defaulting for the host and target type.
982 # The inputs are:
983 #    configure --host=HOST --target=TARGET --build=BUILD NONOPT
984 #
985 # The rules are:
986 # 1. You are not allowed to specify --host, --target, and nonopt at the
987 #    same time.
988 # 2. Host defaults to nonopt.
989 # 3. If nonopt is not specified, then host defaults to the current host,
990 #    as determined by config.guess.
991 # 4. Target and build default to nonopt.
992 # 5. If nonopt is not specified, then target and build default to host.
993
994 # The aliases save the names the user supplied, while $host etc.
995 # will get canonicalized.
996 case $host---$target---$nonopt in
997 NONE---*---* | *---NONE---* | *---*---NONE) ;;
998 *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
999 esac
1000
1001 test "$host_alias" != "$target_alias" &&
1002   test "$program_prefix$program_suffix$program_transform_name" = \
1003     NONENONEs,x,x, &&
1004   program_prefix=${target_alias}-
1005
1006
1007 # Find a good install program.  We prefer a C program (faster),
1008 # so one script is as good as another.  But avoid the broken or
1009 # incompatible versions:
1010 # SysV /etc/install, /usr/sbin/install
1011 # SunOS /usr/etc/install
1012 # IRIX /sbin/install
1013 # AIX /bin/install
1014 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
1015 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
1016 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
1017 # ./install, which can be erroneously created by make from ./install.sh.
1018 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
1019 echo "configure:1020: checking for a BSD compatible install" >&5
1020 if test -z "$INSTALL"; then
1021 if eval "test \"\${ac_cv_path_install+set}\" = set"; then
1022   echo $ac_n "(cached) $ac_c" 1>&6
1023 else
1024     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
1025   for ac_dir in $PATH; do
1026     # Account for people who put trailing slashes in PATH elements.
1027     case "$ac_dir/" in
1028     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
1029     *)
1030       # OSF1 and SCO ODT 3.0 have their own names for install.
1031       # Don't use installbsd from OSF since it installs stuff as root
1032       # by default.
1033       for ac_prog in ginstall scoinst install; do
1034         if test -f $ac_dir/$ac_prog; then
1035           if test $ac_prog = install &&
1036             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
1037             # AIX install.  It has an incompatible calling convention.
1038             :
1039           elif test $ac_prog = install &&
1040             grep pwplus $ac_dir/$ac_prog >/dev/null 2>&1; then
1041             # program-specific install script used by HP pwplus--don't use.
1042             :
1043           else
1044             ac_cv_path_install="$ac_dir/$ac_prog -c"
1045             break 2
1046           fi
1047         fi
1048       done
1049       ;;
1050     esac
1051   done
1052   IFS="$ac_save_IFS"
1053
1054 fi
1055   if test "${ac_cv_path_install+set}" = set; then
1056     INSTALL="$ac_cv_path_install"
1057   else
1058     # As a last resort, use the slow shell script.  We don't cache a
1059     # path for INSTALL within a source directory, because that will
1060     # break other packages using the cache if that directory is
1061     # removed, or if the path is relative.
1062     INSTALL="$ac_install_sh"
1063   fi
1064 fi
1065 echo "$ac_t""$INSTALL" 1>&6
1066
1067 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
1068 # It thinks the first close brace ends the variable substitution.
1069 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
1070
1071 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
1072
1073 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1074
1075 echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
1076 echo "configure:1077: checking whether build environment is sane" >&5
1077 # Just in case
1078 sleep 1
1079 echo timestamp > conftestfile
1080 # Do `set' in a subshell so we don't clobber the current shell's
1081 # arguments.  Must try -L first in case configure is actually a
1082 # symlink; some systems play weird games with the mod time of symlinks
1083 # (eg FreeBSD returns the mod time of the symlink's containing
1084 # directory).
1085 if (
1086    set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
1087    if test "$*" = "X"; then
1088       # -L didn't work.
1089       set X `ls -t $srcdir/configure conftestfile`
1090    fi
1091    if test "$*" != "X $srcdir/configure conftestfile" \
1092       && test "$*" != "X conftestfile $srcdir/configure"; then
1093
1094       # If neither matched, then we have a broken ls.  This can happen
1095       # if, for instance, CONFIG_SHELL is bash and it inherits a
1096       # broken ls alias from the environment.  This has actually
1097       # happened.  Such a system could not be considered "sane".
1098       { echo "configure: error: ls -t appears to fail.  Make sure there is not a broken
1099 alias in your environment" 1>&2; exit 1; }
1100    fi
1101
1102    test "$2" = conftestfile
1103    )
1104 then
1105    # Ok.
1106    :
1107 else
1108    { echo "configure: error: newly created file is older than distributed files!
1109 Check your system clock" 1>&2; exit 1; }
1110 fi
1111 rm -f conftest*
1112 echo "$ac_t""yes" 1>&6
1113 if test "$program_transform_name" = s,x,x,; then
1114   program_transform_name=
1115 else
1116   # Double any \ or $.  echo might interpret backslashes.
1117   cat <<\EOF_SED > conftestsed
1118 s,\\,\\\\,g; s,\$,$$,g
1119 EOF_SED
1120   program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
1121   rm -f conftestsed
1122 fi
1123 test "$program_prefix" != NONE &&
1124   program_transform_name="s,^,${program_prefix},;$program_transform_name"
1125 # Use a double $ so make ignores it.
1126 test "$program_suffix" != NONE &&
1127   program_transform_name="s,\$\$,${program_suffix},;$program_transform_name"
1128
1129 # sed with no file args requires a program.
1130 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
1131
1132 for ac_prog in mawk gawk nawk awk
1133 do
1134 # Extract the first word of "$ac_prog", so it can be a program name with args.
1135 set dummy $ac_prog; ac_word=$2
1136 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1137 echo "configure:1138: checking for $ac_word" >&5
1138 if eval "test \"\${ac_cv_prog_AWK+set}\" = set"; then
1139   echo $ac_n "(cached) $ac_c" 1>&6
1140 else
1141   if test -n "$AWK"; then
1142   ac_cv_prog_AWK="$AWK" # Let the user override the test.
1143 else
1144   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1145   ac_dummy="$PATH"
1146   for ac_dir in $ac_dummy; do
1147     test -z "$ac_dir" && ac_dir=.
1148     if test -f $ac_dir/$ac_word; then
1149       ac_cv_prog_AWK="$ac_prog"
1150       break
1151     fi
1152   done
1153   IFS="$ac_save_ifs"
1154 fi
1155 fi
1156 AWK="$ac_cv_prog_AWK"
1157 if test -n "$AWK"; then
1158   echo "$ac_t""$AWK" 1>&6
1159 else
1160   echo "$ac_t""no" 1>&6
1161 fi
1162
1163 test -n "$AWK" && break
1164 done
1165
1166 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
1167 echo "configure:1168: checking whether ${MAKE-make} sets \${MAKE}" >&5
1168 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
1169 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
1170   echo $ac_n "(cached) $ac_c" 1>&6
1171 else
1172   cat > conftestmake <<\EOF
1173 all:
1174         @echo 'ac_maketemp="${MAKE}"'
1175 EOF
1176 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
1177 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
1178 if test -n "$ac_maketemp"; then
1179   eval ac_cv_prog_make_${ac_make}_set=yes
1180 else
1181   eval ac_cv_prog_make_${ac_make}_set=no
1182 fi
1183 rm -f conftestmake
1184 fi
1185 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
1186   echo "$ac_t""yes" 1>&6
1187   SET_MAKE=
1188 else
1189   echo "$ac_t""no" 1>&6
1190   SET_MAKE="MAKE=${MAKE-make}"
1191 fi
1192
1193
1194
1195 PACKAGE=$OL_PACKAGE
1196
1197 VERSION=$OL_VERSION
1198
1199 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
1200   { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
1201 fi
1202
1203
1204
1205 missing_dir=`cd $ac_aux_dir && pwd`
1206 echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
1207 echo "configure:1208: checking for working aclocal" >&5
1208 # Run test in a subshell; some versions of sh will print an error if
1209 # an executable is not found, even if stderr is redirected.
1210 # Redirect stdin to placate older versions of autoconf.  Sigh.
1211 if (aclocal --version) < /dev/null > /dev/null 2>&1; then
1212    ACLOCAL=aclocal
1213    echo "$ac_t""found" 1>&6
1214 else
1215    ACLOCAL="$missing_dir/missing aclocal"
1216    echo "$ac_t""missing" 1>&6
1217 fi
1218
1219 echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
1220 echo "configure:1221: checking for working autoconf" >&5
1221 # Run test in a subshell; some versions of sh will print an error if
1222 # an executable is not found, even if stderr is redirected.
1223 # Redirect stdin to placate older versions of autoconf.  Sigh.
1224 if (autoconf --version) < /dev/null > /dev/null 2>&1; then
1225    AUTOCONF=autoconf
1226    echo "$ac_t""found" 1>&6
1227 else
1228    AUTOCONF="$missing_dir/missing autoconf"
1229    echo "$ac_t""missing" 1>&6
1230 fi
1231
1232 echo $ac_n "checking for working automake""... $ac_c" 1>&6
1233 echo "configure:1234: checking for working automake" >&5
1234 # Run test in a subshell; some versions of sh will print an error if
1235 # an executable is not found, even if stderr is redirected.
1236 # Redirect stdin to placate older versions of autoconf.  Sigh.
1237 if (automake --version) < /dev/null > /dev/null 2>&1; then
1238    AUTOMAKE=automake
1239    echo "$ac_t""found" 1>&6
1240 else
1241    AUTOMAKE="$missing_dir/missing automake"
1242    echo "$ac_t""missing" 1>&6
1243 fi
1244
1245 echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
1246 echo "configure:1247: checking for working autoheader" >&5
1247 # Run test in a subshell; some versions of sh will print an error if
1248 # an executable is not found, even if stderr is redirected.
1249 # Redirect stdin to placate older versions of autoconf.  Sigh.
1250 if (autoheader --version) < /dev/null > /dev/null 2>&1; then
1251    AUTOHEADER=autoheader
1252    echo "$ac_t""found" 1>&6
1253 else
1254    AUTOHEADER="$missing_dir/missing autoheader"
1255    echo "$ac_t""missing" 1>&6
1256 fi
1257
1258 echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
1259 echo "configure:1260: checking for working makeinfo" >&5
1260 # Run test in a subshell; some versions of sh will print an error if
1261 # an executable is not found, even if stderr is redirected.
1262 # Redirect stdin to placate older versions of autoconf.  Sigh.
1263 if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
1264    MAKEINFO=makeinfo
1265    echo "$ac_t""found" 1>&6
1266 else
1267    MAKEINFO="$missing_dir/missing makeinfo"
1268    echo "$ac_t""missing" 1>&6
1269 fi
1270
1271 install_sh="$missing_dir/install-sh"
1272 test -f "$install_sh" || install_sh="$missing_dir/install.sh"
1273
1274 for ac_prog in gnutar gtar tar
1275 do
1276 # Extract the first word of "$ac_prog", so it can be a program name with args.
1277 set dummy $ac_prog; ac_word=$2
1278 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1279 echo "configure:1280: checking for $ac_word" >&5
1280 if eval "test \"\${ac_cv_prog_AMTAR+set}\" = set"; then
1281   echo $ac_n "(cached) $ac_c" 1>&6
1282 else
1283   if test -n "$AMTAR"; then
1284   ac_cv_prog_AMTAR="$AMTAR" # Let the user override the test.
1285 else
1286   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1287   ac_dummy="$PATH"
1288   for ac_dir in $ac_dummy; do
1289     test -z "$ac_dir" && ac_dir=.
1290     if test -f $ac_dir/$ac_word; then
1291       ac_cv_prog_AMTAR="$ac_prog"
1292       break
1293     fi
1294   done
1295   IFS="$ac_save_ifs"
1296 fi
1297 fi
1298 AMTAR="$ac_cv_prog_AMTAR"
1299 if test -n "$AMTAR"; then
1300   echo "$ac_t""$AMTAR" 1>&6
1301 else
1302   echo "$ac_t""no" 1>&6
1303 fi
1304
1305 test -n "$AMTAR" && break
1306 done
1307
1308
1309 AMTARFLAGS=
1310 if test -n "$AMTAR"; then
1311   if $SHELL -c "$AMTAR --version" > /dev/null 2>&1; then
1312         AMTARFLAGS=o
1313   fi
1314 fi
1315
1316 cat >> confdefs.h <<EOF
1317 #define OPENLDAP_PACKAGE "$PACKAGE"
1318 EOF
1319
1320 cat >> confdefs.h <<EOF
1321 #define OPENLDAP_VERSION "$VERSION"
1322 EOF
1323
1324
1325 cat >> confdefs.h <<EOF
1326 #define LDAP_VENDOR_VERSION $OL_API_INC
1327 EOF
1328
1329 cat >> confdefs.h <<EOF
1330 #define LDAP_VENDOR_VERSION_MAJOR $OL_MAJOR
1331 EOF
1332
1333 cat >> confdefs.h <<EOF
1334 #define LDAP_VENDOR_VERSION_MINOR $OL_MINOR
1335 EOF
1336
1337 cat >> confdefs.h <<EOF
1338 #define LDAP_VENDOR_VERSION_PATCH $OL_PATCH
1339 EOF
1340
1341
1342 OPENLDAP_LIBRELEASE=$OL_API_LIB_RELEASE
1343
1344 OPENLDAP_LIBVERSION=$OL_API_LIB_VERSION
1345
1346 OPENLDAP_RELEASE_DATE="$OL_RELEASE_DATE"
1347
1348
1349
1350 echo $ac_n "checking configure arguments""... $ac_c" 1>&6
1351 echo "configure:1352: checking configure arguments" >&5
1352
1353
1354 top_builddir=`pwd`
1355
1356 ldap_subdir="/openldap"
1357
1358 # Check whether --with-subdir or --without-subdir was given.
1359 if test "${with_subdir+set}" = set; then
1360   withval="$with_subdir"
1361   case "$withval" in
1362         no) ldap_subdir=""
1363                 ;;
1364         yes)
1365                 ;;
1366         /*|\\*)
1367                 ldap_subdir="$withval"
1368                 ;;
1369         *)
1370                 ldap_subdir="/$withval"
1371                 ;;
1372 esac
1373
1374 fi
1375
1376
1377 # OpenLDAP --enable-debug
1378         # Check whether --enable-debug or --disable-debug was given.
1379 if test "${enable_debug+set}" = set; then
1380   enableval="$enable_debug"
1381   
1382         ol_arg=invalid
1383         for ol_val in auto yes no ; do
1384                 if test "$enableval" = "$ol_val" ; then
1385                         ol_arg="$ol_val"
1386                 fi
1387         done
1388         if test "$ol_arg" = "invalid" ; then
1389                 { echo "configure: error: bad value $enableval for --enable-debug" 1>&2; exit 1; }
1390         fi
1391         ol_enable_debug="$ol_arg"
1392
1393 else
1394         ol_enable_debug="yes"
1395 fi
1396 # end --enable-debug
1397 # OpenLDAP --enable-dynamic
1398         # Check whether --enable-dynamic or --disable-dynamic was given.
1399 if test "${enable_dynamic+set}" = set; then
1400   enableval="$enable_dynamic"
1401   
1402         ol_arg=invalid
1403         for ol_val in auto yes no ; do
1404                 if test "$enableval" = "$ol_val" ; then
1405                         ol_arg="$ol_val"
1406                 fi
1407         done
1408         if test "$ol_arg" = "invalid" ; then
1409                 { echo "configure: error: bad value $enableval for --enable-dynamic" 1>&2; exit 1; }
1410         fi
1411         ol_enable_dynamic="$ol_arg"
1412
1413 else
1414         ol_enable_dynamic="no"
1415 fi
1416 # end --enable-dynamic
1417 # OpenLDAP --enable-syslog
1418         # Check whether --enable-syslog or --disable-syslog was given.
1419 if test "${enable_syslog+set}" = set; then
1420   enableval="$enable_syslog"
1421   
1422         ol_arg=invalid
1423         for ol_val in auto yes no ; do
1424                 if test "$enableval" = "$ol_val" ; then
1425                         ol_arg="$ol_val"
1426                 fi
1427         done
1428         if test "$ol_arg" = "invalid" ; then
1429                 { echo "configure: error: bad value $enableval for --enable-syslog" 1>&2; exit 1; }
1430         fi
1431         ol_enable_syslog="$ol_arg"
1432
1433 else
1434         ol_enable_syslog="auto"
1435 fi
1436 # end --enable-syslog
1437 # OpenLDAP --enable-proctitle
1438         # Check whether --enable-proctitle or --disable-proctitle was given.
1439 if test "${enable_proctitle+set}" = set; then
1440   enableval="$enable_proctitle"
1441   
1442         ol_arg=invalid
1443         for ol_val in auto yes no ; do
1444                 if test "$enableval" = "$ol_val" ; then
1445                         ol_arg="$ol_val"
1446                 fi
1447         done
1448         if test "$ol_arg" = "invalid" ; then
1449                 { echo "configure: error: bad value $enableval for --enable-proctitle" 1>&2; exit 1; }
1450         fi
1451         ol_enable_proctitle="$ol_arg"
1452
1453 else
1454         ol_enable_proctitle="yes"
1455 fi
1456 # end --enable-proctitle
1457 ol_enable_referrals=${ol_enable_referrals-no}
1458 ol_enable_kbind=${ol_enable_kbind-no}
1459 # OpenLDAP --enable-ipv6
1460         # Check whether --enable-ipv6 or --disable-ipv6 was given.
1461 if test "${enable_ipv6+set}" = set; then
1462   enableval="$enable_ipv6"
1463   
1464         ol_arg=invalid
1465         for ol_val in auto yes no ; do
1466                 if test "$enableval" = "$ol_val" ; then
1467                         ol_arg="$ol_val"
1468                 fi
1469         done
1470         if test "$ol_arg" = "invalid" ; then
1471                 { echo "configure: error: bad value $enableval for --enable-ipv6" 1>&2; exit 1; }
1472         fi
1473         ol_enable_ipv6="$ol_arg"
1474
1475 else
1476         ol_enable_ipv6="auto"
1477 fi
1478 # end --enable-ipv6
1479 # OpenLDAP --enable-local
1480         # Check whether --enable-local or --disable-local was given.
1481 if test "${enable_local+set}" = set; then
1482   enableval="$enable_local"
1483   
1484         ol_arg=invalid
1485         for ol_val in auto yes no ; do
1486                 if test "$enableval" = "$ol_val" ; then
1487                         ol_arg="$ol_val"
1488                 fi
1489         done
1490         if test "$ol_arg" = "invalid" ; then
1491                 { echo "configure: error: bad value $enableval for --enable-local" 1>&2; exit 1; }
1492         fi
1493         ol_enable_local="$ol_arg"
1494
1495 else
1496         ol_enable_local="auto"
1497 fi
1498 # end --enable-local
1499
1500
1501 # OpenLDAP --with-cyrus_sasl
1502         # Check whether --with-cyrus_sasl or --without-cyrus_sasl was given.
1503 if test "${with_cyrus_sasl+set}" = set; then
1504   withval="$with_cyrus_sasl"
1505   
1506         ol_arg=invalid
1507         for ol_val in auto yes no  ; do
1508                 if test "$withval" = "$ol_val" ; then
1509                         ol_arg="$ol_val"
1510                 fi
1511         done
1512         if test "$ol_arg" = "invalid" ; then
1513                 { echo "configure: error: bad value $withval for --with-cyrus_sasl" 1>&2; exit 1; }
1514         fi
1515         ol_with_cyrus_sasl="$ol_arg"
1516
1517 else
1518         ol_with_cyrus_sasl="auto"
1519 fi
1520 # end --with-cyrus_sasl
1521
1522 # OpenLDAP --with-fetch
1523         # Check whether --with-fetch or --without-fetch was given.
1524 if test "${with_fetch+set}" = set; then
1525   withval="$with_fetch"
1526   
1527         ol_arg=invalid
1528         for ol_val in auto yes no  ; do
1529                 if test "$withval" = "$ol_val" ; then
1530                         ol_arg="$ol_val"
1531                 fi
1532         done
1533         if test "$ol_arg" = "invalid" ; then
1534                 { echo "configure: error: bad value $withval for --with-fetch" 1>&2; exit 1; }
1535         fi
1536         ol_with_fetch="$ol_arg"
1537
1538 else
1539         ol_with_fetch="auto"
1540 fi
1541 # end --with-fetch
1542
1543 ol_with_kerberos=${ol_with_kerberos-auto}
1544 # OpenLDAP --with-threads
1545         # Check whether --with-threads or --without-threads was given.
1546 if test "${with_threads+set}" = set; then
1547   withval="$with_threads"
1548   
1549         ol_arg=invalid
1550         for ol_val in auto nt posix mach pth lwp yes no manual  ; do
1551                 if test "$withval" = "$ol_val" ; then
1552                         ol_arg="$ol_val"
1553                 fi
1554         done
1555         if test "$ol_arg" = "invalid" ; then
1556                 { echo "configure: error: bad value $withval for --with-threads" 1>&2; exit 1; }
1557         fi
1558         ol_with_threads="$ol_arg"
1559
1560 else
1561         ol_with_threads="auto"
1562 fi
1563 # end --with-threads
1564
1565 # OpenLDAP --with-tls
1566         # Check whether --with-tls or --without-tls was given.
1567 if test "${with_tls+set}" = set; then
1568   withval="$with_tls"
1569   
1570         ol_arg=invalid
1571         for ol_val in auto ssleay openssl yes no  ; do
1572                 if test "$withval" = "$ol_val" ; then
1573                         ol_arg="$ol_val"
1574                 fi
1575         done
1576         if test "$ol_arg" = "invalid" ; then
1577                 { echo "configure: error: bad value $withval for --with-tls" 1>&2; exit 1; }
1578         fi
1579         ol_with_tls="$ol_arg"
1580
1581 else
1582         ol_with_tls="auto"
1583 fi
1584 # end --with-tls
1585
1586 # OpenLDAP --with-yielding_select
1587         # Check whether --with-yielding_select or --without-yielding_select was given.
1588 if test "${with_yielding_select+set}" = set; then
1589   withval="$with_yielding_select"
1590   
1591         ol_arg=invalid
1592         for ol_val in auto yes no manual  ; do
1593                 if test "$withval" = "$ol_val" ; then
1594                         ol_arg="$ol_val"
1595                 fi
1596         done
1597         if test "$ol_arg" = "invalid" ; then
1598                 { echo "configure: error: bad value $withval for --with-yielding_select" 1>&2; exit 1; }
1599         fi
1600         ol_with_yielding_select="$ol_arg"
1601
1602 else
1603         ol_with_yielding_select="auto"
1604 fi
1605 # end --with-yielding_select
1606
1607
1608
1609 # Check whether --with-xxslapdoptions or --without-xxslapdoptions was given.
1610 if test "${with_xxslapdoptions+set}" = set; then
1611   withval="$with_xxslapdoptions"
1612   :
1613 fi
1614
1615 # OpenLDAP --enable-slapd
1616         # Check whether --enable-slapd or --disable-slapd was given.
1617 if test "${enable_slapd+set}" = set; then
1618   enableval="$enable_slapd"
1619   
1620         ol_arg=invalid
1621         for ol_val in auto yes no ; do
1622                 if test "$enableval" = "$ol_val" ; then
1623                         ol_arg="$ol_val"
1624                 fi
1625         done
1626         if test "$ol_arg" = "invalid" ; then
1627                 { echo "configure: error: bad value $enableval for --enable-slapd" 1>&2; exit 1; }
1628         fi
1629         ol_enable_slapd="$ol_arg"
1630
1631 else
1632         ol_enable_slapd="yes"
1633 fi
1634 # end --enable-slapd
1635 # OpenLDAP --enable-aci
1636         # Check whether --enable-aci or --disable-aci was given.
1637 if test "${enable_aci+set}" = set; then
1638   enableval="$enable_aci"
1639   
1640         ol_arg=invalid
1641         for ol_val in auto yes no ; do
1642                 if test "$enableval" = "$ol_val" ; then
1643                         ol_arg="$ol_val"
1644                 fi
1645         done
1646         if test "$ol_arg" = "invalid" ; then
1647                 { echo "configure: error: bad value $enableval for --enable-aci" 1>&2; exit 1; }
1648         fi
1649         ol_enable_aci="$ol_arg"
1650
1651 else
1652         ol_enable_aci="no"
1653 fi
1654 # end --enable-aci
1655 # OpenLDAP --enable-cleartext
1656         # Check whether --enable-cleartext or --disable-cleartext was given.
1657 if test "${enable_cleartext+set}" = set; then
1658   enableval="$enable_cleartext"
1659   
1660         ol_arg=invalid
1661         for ol_val in auto yes no ; do
1662                 if test "$enableval" = "$ol_val" ; then
1663                         ol_arg="$ol_val"
1664                 fi
1665         done
1666         if test "$ol_arg" = "invalid" ; then
1667                 { echo "configure: error: bad value $enableval for --enable-cleartext" 1>&2; exit 1; }
1668         fi
1669         ol_enable_cleartext="$ol_arg"
1670
1671 else
1672         ol_enable_cleartext="yes"
1673 fi
1674 # end --enable-cleartext
1675 # OpenLDAP --enable-crypt
1676         # Check whether --enable-crypt or --disable-crypt was given.
1677 if test "${enable_crypt+set}" = set; then
1678   enableval="$enable_crypt"
1679   
1680         ol_arg=invalid
1681         for ol_val in auto yes no ; do
1682                 if test "$enableval" = "$ol_val" ; then
1683                         ol_arg="$ol_val"
1684                 fi
1685         done
1686         if test "$ol_arg" = "invalid" ; then
1687                 { echo "configure: error: bad value $enableval for --enable-crypt" 1>&2; exit 1; }
1688         fi
1689         ol_enable_crypt="$ol_arg"
1690
1691 else
1692         ol_enable_crypt="no"
1693 fi
1694 # end --enable-crypt
1695 # OpenLDAP --enable-lmpasswd
1696         # Check whether --enable-lmpasswd or --disable-lmpasswd was given.
1697 if test "${enable_lmpasswd+set}" = set; then
1698   enableval="$enable_lmpasswd"
1699   
1700         ol_arg=invalid
1701         for ol_val in auto yes no ; do
1702                 if test "$enableval" = "$ol_val" ; then
1703                         ol_arg="$ol_val"
1704                 fi
1705         done
1706         if test "$ol_arg" = "invalid" ; then
1707                 { echo "configure: error: bad value $enableval for --enable-lmpasswd" 1>&2; exit 1; }
1708         fi
1709         ol_enable_lmpasswd="$ol_arg"
1710
1711 else
1712         ol_enable_lmpasswd="no"
1713 fi
1714 # end --enable-lmpasswd
1715 # OpenLDAP --enable-spasswd
1716         # Check whether --enable-spasswd or --disable-spasswd was given.
1717 if test "${enable_spasswd+set}" = set; then
1718   enableval="$enable_spasswd"
1719   
1720         ol_arg=invalid
1721         for ol_val in auto yes no ; do
1722                 if test "$enableval" = "$ol_val" ; then
1723                         ol_arg="$ol_val"
1724                 fi
1725         done
1726         if test "$ol_arg" = "invalid" ; then
1727                 { echo "configure: error: bad value $enableval for --enable-spasswd" 1>&2; exit 1; }
1728         fi
1729         ol_enable_spasswd="$ol_arg"
1730
1731 else
1732         ol_enable_spasswd="no"
1733 fi
1734 # end --enable-spasswd
1735 # OpenLDAP --enable-modules
1736         # Check whether --enable-modules or --disable-modules was given.
1737 if test "${enable_modules+set}" = set; then
1738   enableval="$enable_modules"
1739   
1740         ol_arg=invalid
1741         for ol_val in auto yes no ; do
1742                 if test "$enableval" = "$ol_val" ; then
1743                         ol_arg="$ol_val"
1744                 fi
1745         done
1746         if test "$ol_arg" = "invalid" ; then
1747                 { echo "configure: error: bad value $enableval for --enable-modules" 1>&2; exit 1; }
1748         fi
1749         ol_enable_modules="$ol_arg"
1750
1751 else
1752         ol_enable_modules="no"
1753 fi
1754 # end --enable-modules
1755 ol_enable_multimaster=${ol_enable_multimaster-no}
1756 # OpenLDAP --enable-rewrite
1757         # Check whether --enable-rewrite or --disable-rewrite was given.
1758 if test "${enable_rewrite+set}" = set; then
1759   enableval="$enable_rewrite"
1760   
1761         ol_arg=invalid
1762         for ol_val in auto yes no ; do
1763                 if test "$enableval" = "$ol_val" ; then
1764                         ol_arg="$ol_val"
1765                 fi
1766         done
1767         if test "$ol_arg" = "invalid" ; then
1768                 { echo "configure: error: bad value $enableval for --enable-rewrite" 1>&2; exit 1; }
1769         fi
1770         ol_enable_rewrite="$ol_arg"
1771
1772 else
1773         ol_enable_rewrite="auto"
1774 fi
1775 # end --enable-rewrite
1776 # OpenLDAP --enable-rlookups
1777         # Check whether --enable-rlookups or --disable-rlookups was given.
1778 if test "${enable_rlookups+set}" = set; then
1779   enableval="$enable_rlookups"
1780   
1781         ol_arg=invalid
1782         for ol_val in auto yes no ; do
1783                 if test "$enableval" = "$ol_val" ; then
1784                         ol_arg="$ol_val"
1785                 fi
1786         done
1787         if test "$ol_arg" = "invalid" ; then
1788                 { echo "configure: error: bad value $enableval for --enable-rlookups" 1>&2; exit 1; }
1789         fi
1790         ol_enable_rlookups="$ol_arg"
1791
1792 else
1793         ol_enable_rlookups="no"
1794 fi
1795 # end --enable-rlookups
1796 # OpenLDAP --enable-slapi
1797         # Check whether --enable-slapi or --disable-slapi was given.
1798 if test "${enable_slapi+set}" = set; then
1799   enableval="$enable_slapi"
1800   
1801         ol_arg=invalid
1802         for ol_val in auto yes no ; do
1803                 if test "$enableval" = "$ol_val" ; then
1804                         ol_arg="$ol_val"
1805                 fi
1806         done
1807         if test "$ol_arg" = "invalid" ; then
1808                 { echo "configure: error: bad value $enableval for --enable-slapi" 1>&2; exit 1; }
1809         fi
1810         ol_enable_slapi="$ol_arg"
1811
1812 else
1813         ol_enable_slapi="no"
1814 fi
1815 # end --enable-slapi
1816 # OpenLDAP --enable-slp
1817         # Check whether --enable-slp or --disable-slp was given.
1818 if test "${enable_slp+set}" = set; then
1819   enableval="$enable_slp"
1820   
1821         ol_arg=invalid
1822         for ol_val in auto yes no ; do
1823                 if test "$enableval" = "$ol_val" ; then
1824                         ol_arg="$ol_val"
1825                 fi
1826         done
1827         if test "$ol_arg" = "invalid" ; then
1828                 { echo "configure: error: bad value $enableval for --enable-slp" 1>&2; exit 1; }
1829         fi
1830         ol_enable_slp="$ol_arg"
1831
1832 else
1833         ol_enable_slp="no"
1834 fi
1835 # end --enable-slp
1836 # OpenLDAP --enable-wrappers
1837         # Check whether --enable-wrappers or --disable-wrappers was given.
1838 if test "${enable_wrappers+set}" = set; then
1839   enableval="$enable_wrappers"
1840   
1841         ol_arg=invalid
1842         for ol_val in auto yes no ; do
1843                 if test "$enableval" = "$ol_val" ; then
1844                         ol_arg="$ol_val"
1845                 fi
1846         done
1847         if test "$ol_arg" = "invalid" ; then
1848                 { echo "configure: error: bad value $enableval for --enable-wrappers" 1>&2; exit 1; }
1849         fi
1850         ol_enable_wrappers="$ol_arg"
1851
1852 else
1853         ol_enable_wrappers="no"
1854 fi
1855 # end --enable-wrappers
1856
1857
1858 Backends="bdb dnssrv hdb ldap ldbm meta monitor null \
1859         passwd perl shell sql"
1860
1861 # OpenLDAP --enable-bdb
1862         # Check whether --enable-bdb or --disable-bdb was given.
1863 if test "${enable_bdb+set}" = set; then
1864   enableval="$enable_bdb"
1865   
1866         ol_arg=invalid
1867         for ol_val in no yes mod ; do
1868                 if test "$enableval" = "$ol_val" ; then
1869                         ol_arg="$ol_val"
1870                 fi
1871         done
1872         if test "$ol_arg" = "invalid" ; then
1873                 { echo "configure: error: bad value $enableval for --enable-bdb" 1>&2; exit 1; }
1874         fi
1875         ol_enable_bdb="$ol_arg"
1876
1877 else
1878         ol_enable_bdb="yes"
1879 fi
1880 # end --enable-bdb
1881 # OpenLDAP --enable-dnssrv
1882         # Check whether --enable-dnssrv or --disable-dnssrv was given.
1883 if test "${enable_dnssrv+set}" = set; then
1884   enableval="$enable_dnssrv"
1885   
1886         ol_arg=invalid
1887         for ol_val in no yes mod ; do
1888                 if test "$enableval" = "$ol_val" ; then
1889                         ol_arg="$ol_val"
1890                 fi
1891         done
1892         if test "$ol_arg" = "invalid" ; then
1893                 { echo "configure: error: bad value $enableval for --enable-dnssrv" 1>&2; exit 1; }
1894         fi
1895         ol_enable_dnssrv="$ol_arg"
1896
1897 else
1898         ol_enable_dnssrv="no"
1899 fi
1900 # end --enable-dnssrv
1901 # OpenLDAP --enable-hdb
1902         # Check whether --enable-hdb or --disable-hdb was given.
1903 if test "${enable_hdb+set}" = set; then
1904   enableval="$enable_hdb"
1905   
1906         ol_arg=invalid
1907         for ol_val in no yes mod ; do
1908                 if test "$enableval" = "$ol_val" ; then
1909                         ol_arg="$ol_val"
1910                 fi
1911         done
1912         if test "$ol_arg" = "invalid" ; then
1913                 { echo "configure: error: bad value $enableval for --enable-hdb" 1>&2; exit 1; }
1914         fi
1915         ol_enable_hdb="$ol_arg"
1916
1917 else
1918         ol_enable_hdb="no"
1919 fi
1920 # end --enable-hdb
1921 # OpenLDAP --enable-ldap
1922         # Check whether --enable-ldap or --disable-ldap was given.
1923 if test "${enable_ldap+set}" = set; then
1924   enableval="$enable_ldap"
1925   
1926         ol_arg=invalid
1927         for ol_val in no yes mod ; do
1928                 if test "$enableval" = "$ol_val" ; then
1929                         ol_arg="$ol_val"
1930                 fi
1931         done
1932         if test "$ol_arg" = "invalid" ; then
1933                 { echo "configure: error: bad value $enableval for --enable-ldap" 1>&2; exit 1; }
1934         fi
1935         ol_enable_ldap="$ol_arg"
1936
1937 else
1938         ol_enable_ldap="no"
1939 fi
1940 # end --enable-ldap
1941 # OpenLDAP --enable-ldbm
1942         # Check whether --enable-ldbm or --disable-ldbm was given.
1943 if test "${enable_ldbm+set}" = set; then
1944   enableval="$enable_ldbm"
1945   
1946         ol_arg=invalid
1947         for ol_val in no yes mod ; do
1948                 if test "$enableval" = "$ol_val" ; then
1949                         ol_arg="$ol_val"
1950                 fi
1951         done
1952         if test "$ol_arg" = "invalid" ; then
1953                 { echo "configure: error: bad value $enableval for --enable-ldbm" 1>&2; exit 1; }
1954         fi
1955         ol_enable_ldbm="$ol_arg"
1956
1957 else
1958         ol_enable_ldbm="no"
1959 fi
1960 # end --enable-ldbm
1961 # OpenLDAP --with-ldbm_api
1962         # Check whether --with-ldbm_api or --without-ldbm_api was given.
1963 if test "${with_ldbm_api+set}" = set; then
1964   withval="$with_ldbm_api"
1965   
1966         ol_arg=invalid
1967         for ol_val in auto berkeley bcompat mdbm gdbm ; do
1968                 if test "$withval" = "$ol_val" ; then
1969                         ol_arg="$ol_val"
1970                 fi
1971         done
1972         if test "$ol_arg" = "invalid" ; then
1973                 { echo "configure: error: bad value $withval for --with-ldbm_api" 1>&2; exit 1; }
1974         fi
1975         ol_with_ldbm_api="$ol_arg"
1976
1977 else
1978         ol_with_ldbm_api="auto"
1979 fi
1980 # end --with-ldbm_api
1981
1982 # OpenLDAP --with-ldbm_type
1983         # Check whether --with-ldbm_type or --without-ldbm_type was given.
1984 if test "${with_ldbm_type+set}" = set; then
1985   withval="$with_ldbm_type"
1986   
1987         ol_arg=invalid
1988         for ol_val in auto btree hash ; do
1989                 if test "$withval" = "$ol_val" ; then
1990                         ol_arg="$ol_val"
1991                 fi
1992         done
1993         if test "$ol_arg" = "invalid" ; then
1994                 { echo "configure: error: bad value $withval for --with-ldbm_type" 1>&2; exit 1; }
1995         fi
1996         ol_with_ldbm_type="$ol_arg"
1997
1998 else
1999         ol_with_ldbm_type="auto"
2000 fi
2001 # end --with-ldbm_type
2002
2003 # OpenLDAP --enable-meta
2004         # Check whether --enable-meta or --disable-meta was given.
2005 if test "${enable_meta+set}" = set; then
2006   enableval="$enable_meta"
2007   
2008         ol_arg=invalid
2009         for ol_val in no yes mod ; do
2010                 if test "$enableval" = "$ol_val" ; then
2011                         ol_arg="$ol_val"
2012                 fi
2013         done
2014         if test "$ol_arg" = "invalid" ; then
2015                 { echo "configure: error: bad value $enableval for --enable-meta" 1>&2; exit 1; }
2016         fi
2017         ol_enable_meta="$ol_arg"
2018
2019 else
2020         ol_enable_meta="no"
2021 fi
2022 # end --enable-meta
2023 # OpenLDAP --enable-monitor
2024         # Check whether --enable-monitor or --disable-monitor was given.
2025 if test "${enable_monitor+set}" = set; then
2026   enableval="$enable_monitor"
2027   
2028         ol_arg=invalid
2029         for ol_val in no yes mod ; do
2030                 if test "$enableval" = "$ol_val" ; then
2031                         ol_arg="$ol_val"
2032                 fi
2033         done
2034         if test "$ol_arg" = "invalid" ; then
2035                 { echo "configure: error: bad value $enableval for --enable-monitor" 1>&2; exit 1; }
2036         fi
2037         ol_enable_monitor="$ol_arg"
2038
2039 else
2040         ol_enable_monitor="yes"
2041 fi
2042 # end --enable-monitor
2043 # OpenLDAP --enable-null
2044         # Check whether --enable-null or --disable-null was given.
2045 if test "${enable_null+set}" = set; then
2046   enableval="$enable_null"
2047   
2048         ol_arg=invalid
2049         for ol_val in no yes mod ; do
2050                 if test "$enableval" = "$ol_val" ; then
2051                         ol_arg="$ol_val"
2052                 fi
2053         done
2054         if test "$ol_arg" = "invalid" ; then
2055                 { echo "configure: error: bad value $enableval for --enable-null" 1>&2; exit 1; }
2056         fi
2057         ol_enable_null="$ol_arg"
2058
2059 else
2060         ol_enable_null="no"
2061 fi
2062 # end --enable-null
2063 # OpenLDAP --enable-passwd
2064         # Check whether --enable-passwd or --disable-passwd was given.
2065 if test "${enable_passwd+set}" = set; then
2066   enableval="$enable_passwd"
2067   
2068         ol_arg=invalid
2069         for ol_val in no yes mod ; do
2070                 if test "$enableval" = "$ol_val" ; then
2071                         ol_arg="$ol_val"
2072                 fi
2073         done
2074         if test "$ol_arg" = "invalid" ; then
2075                 { echo "configure: error: bad value $enableval for --enable-passwd" 1>&2; exit 1; }
2076         fi
2077         ol_enable_passwd="$ol_arg"
2078
2079 else
2080         ol_enable_passwd="no"
2081 fi
2082 # end --enable-passwd
2083 # OpenLDAP --enable-perl
2084         # Check whether --enable-perl or --disable-perl was given.
2085 if test "${enable_perl+set}" = set; then
2086   enableval="$enable_perl"
2087   
2088         ol_arg=invalid
2089         for ol_val in no yes mod ; do
2090                 if test "$enableval" = "$ol_val" ; then
2091                         ol_arg="$ol_val"
2092                 fi
2093         done
2094         if test "$ol_arg" = "invalid" ; then
2095                 { echo "configure: error: bad value $enableval for --enable-perl" 1>&2; exit 1; }
2096         fi
2097         ol_enable_perl="$ol_arg"
2098
2099 else
2100         ol_enable_perl="no"
2101 fi
2102 # end --enable-perl
2103 # OpenLDAP --enable-shell
2104         # Check whether --enable-shell or --disable-shell was given.
2105 if test "${enable_shell+set}" = set; then
2106   enableval="$enable_shell"
2107   
2108         ol_arg=invalid
2109         for ol_val in no yes mod ; do
2110                 if test "$enableval" = "$ol_val" ; then
2111                         ol_arg="$ol_val"
2112                 fi
2113         done
2114         if test "$ol_arg" = "invalid" ; then
2115                 { echo "configure: error: bad value $enableval for --enable-shell" 1>&2; exit 1; }
2116         fi
2117         ol_enable_shell="$ol_arg"
2118
2119 else
2120         ol_enable_shell="no"
2121 fi
2122 # end --enable-shell
2123 # OpenLDAP --enable-sql
2124         # Check whether --enable-sql or --disable-sql was given.
2125 if test "${enable_sql+set}" = set; then
2126   enableval="$enable_sql"
2127   
2128         ol_arg=invalid
2129         for ol_val in no yes mod ; do
2130                 if test "$enableval" = "$ol_val" ; then
2131                         ol_arg="$ol_val"
2132                 fi
2133         done
2134         if test "$ol_arg" = "invalid" ; then
2135                 { echo "configure: error: bad value $enableval for --enable-sql" 1>&2; exit 1; }
2136         fi
2137         ol_enable_sql="$ol_arg"
2138
2139 else
2140         ol_enable_sql="no"
2141 fi
2142 # end --enable-sql
2143
2144 Overlays="dyngroup proxycache"
2145
2146 # Check whether --with-xxslapoverlays or --without-xxslapoverlays was given.
2147 if test "${with_xxslapoverlays+set}" = set; then
2148   withval="$with_xxslapoverlays"
2149   :
2150 fi
2151
2152 # OpenLDAP --enable-dyngroup
2153         # Check whether --enable-dyngroup or --disable-dyngroup was given.
2154 if test "${enable_dyngroup+set}" = set; then
2155   enableval="$enable_dyngroup"
2156   
2157         ol_arg=invalid
2158         for ol_val in no yes mod ; do
2159                 if test "$enableval" = "$ol_val" ; then
2160                         ol_arg="$ol_val"
2161                 fi
2162         done
2163         if test "$ol_arg" = "invalid" ; then
2164                 { echo "configure: error: bad value $enableval for --enable-dyngroup" 1>&2; exit 1; }
2165         fi
2166         ol_enable_dyngroup="$ol_arg"
2167
2168 else
2169         ol_enable_dyngroup="no"
2170 fi
2171 # end --enable-dyngroup
2172
2173 # OpenLDAP --enable-proxycache
2174         # Check whether --enable-proxycache or --disable-proxycache was given.
2175 if test "${enable_proxycache+set}" = set; then
2176   enableval="$enable_proxycache"
2177   
2178         ol_arg=invalid
2179         for ol_val in no yes mod ; do
2180                 if test "$enableval" = "$ol_val" ; then
2181                         ol_arg="$ol_val"
2182                 fi
2183         done
2184         if test "$ol_arg" = "invalid" ; then
2185                 { echo "configure: error: bad value $enableval for --enable-proxycache" 1>&2; exit 1; }
2186         fi
2187         ol_enable_proxycache="$ol_arg"
2188
2189 else
2190         ol_enable_proxycache="no"
2191 fi
2192 # end --enable-proxycache
2193
2194
2195 # Check whether --with-xxslurpdoptions or --without-xxslurpdoptions was given.
2196 if test "${with_xxslurpdoptions+set}" = set; then
2197   withval="$with_xxslurpdoptions"
2198   :
2199 fi
2200
2201 # OpenLDAP --enable-slurpd
2202         # Check whether --enable-slurpd or --disable-slurpd was given.
2203 if test "${enable_slurpd+set}" = set; then
2204   enableval="$enable_slurpd"
2205   
2206         ol_arg=invalid
2207         for ol_val in auto yes no ; do
2208                 if test "$enableval" = "$ol_val" ; then
2209                         ol_arg="$ol_val"
2210                 fi
2211         done
2212         if test "$ol_arg" = "invalid" ; then
2213                 { echo "configure: error: bad value $enableval for --enable-slurpd" 1>&2; exit 1; }
2214         fi
2215         ol_enable_slurpd="$ol_arg"
2216
2217 else
2218         ol_enable_slurpd="auto"
2219 fi
2220 # end --enable-slurpd
2221
2222 # Check whether --with-xxliboptions or --without-xxliboptions was given.
2223 if test "${with_xxliboptions+set}" = set; then
2224   withval="$with_xxliboptions"
2225   :
2226 fi
2227
2228 # Check whether --enable-static or --disable-static was given.
2229 if test "${enable_static+set}" = set; then
2230   enableval="$enable_static"
2231   p=${PACKAGE-default}
2232 case $enableval in
2233 yes) enable_static=yes ;;
2234 no) enable_static=no ;;
2235 *)
2236   enable_static=no
2237   # Look at the argument we got.  We use all the common list separators.
2238   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2239   for pkg in $enableval; do
2240     if test "X$pkg" = "X$p"; then
2241       enable_static=yes
2242     fi
2243   done
2244   IFS="$ac_save_ifs"
2245   ;;
2246 esac
2247 else
2248   enable_static=yes
2249 fi
2250
2251 # Check whether --enable-shared or --disable-shared was given.
2252 if test "${enable_shared+set}" = set; then
2253   enableval="$enable_shared"
2254   p=${PACKAGE-default}
2255 case $enableval in
2256 yes) enable_shared=yes ;;
2257 no) enable_shared=no ;;
2258 *)
2259   enable_shared=no
2260   # Look at the argument we got.  We use all the common list separators.
2261   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2262   for pkg in $enableval; do
2263     if test "X$pkg" = "X$p"; then
2264       enable_shared=yes
2265     fi
2266   done
2267   IFS="$ac_save_ifs"
2268   ;;
2269 esac
2270 else
2271   enable_shared=yes
2272 fi
2273
2274
2275
2276 # validate options
2277 if test $ol_enable_slapd = no ; then
2278                 if test $ol_enable_slapi = yes ; then
2279                 echo "configure: warning: slapd disabled, ignoring --enable-slapi argument" 1>&2
2280         fi
2281         for i in $Backends; do
2282                 eval "ol_tmp=\$ol_enable_$i"
2283                 if test $ol_tmp != no ; then
2284                         echo "configure: warning: slapd disabled, ignoring --enable-$i argument" 1>&2
2285                         eval "ol_enable_$i=no"
2286                 fi
2287         done
2288         if test $ol_enable_modules = yes ; then
2289                 echo "configure: warning: slapd disabled, ignoring --enable-modules argument" 1>&2
2290         fi
2291         if test $ol_enable_multimaster = yes ; then
2292                 echo "configure: warning: slapd disabled, ignoring --enable-multimaster argument" 1>&2
2293         fi
2294         if test $ol_enable_wrappers = yes ; then
2295                 echo "configure: warning: slapd disabled, ignoring --enable-wrappers argument" 1>&2
2296         fi
2297         if test $ol_enable_rlookups = yes ; then
2298                 echo "configure: warning: slapd disabled, ignoring --enable-rlookups argument" 1>&2
2299         fi
2300         if test $ol_enable_aci = yes ; then
2301                 echo "configure: warning: slapd disabled, ignoring --enable-aci argument" 1>&2
2302         fi
2303         if test $ol_with_ldbm_api != auto ; then
2304                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-api argument" 1>&2
2305         fi
2306         if test $ol_with_ldbm_type != auto ; then
2307                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-type argument" 1>&2
2308         fi
2309         if test $ol_enable_slurpd = yes ; then
2310                 { echo "configure: error: slurpd requires slapd" 1>&2; exit 1; }
2311         fi
2312         if test $ol_enable_rewrite = yes ; then
2313                 echo "configure: warning: slapd disabled, ignoring --enable-rewrite argument" 1>&2
2314         fi
2315                 for i in $Overlays; do
2316                 eval "ol_tmp=\$ol_enable_$i"
2317                 if test $ol_tmp != no ; then
2318                         echo "configure: warning: slapd disabled, ignoring --enable-$i argument" 1>&2
2319                         eval "ol_enable_$i=no"
2320                 fi
2321         done
2322
2323         # force settings to no
2324         ol_enable_slapi=no
2325
2326         ol_enable_modules=no
2327         ol_enable_multimaster=no
2328         ol_enable_rlookups=no
2329         ol_enable_aci=no
2330         ol_enable_wrappers=no
2331
2332         ol_with_ldbm_api=no
2333         ol_with_ldbm_type=no
2334
2335         ol_enable_slurpd=no
2336
2337         ol_enable_rewrite=no
2338
2339 elif test $ol_enable_ldbm = no ; then
2340         
2341         if test $ol_with_ldbm_api != auto ; then
2342                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-api argument" 1>&2
2343         fi
2344
2345         if test $ol_with_ldbm_type != auto ; then
2346                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-type argument" 1>&2
2347         fi
2348
2349         if test $ol_enable_modules != yes -a \
2350                 $ol_enable_bdb = no -a \
2351                 $ol_enable_dnssrv = no -a \
2352                 $ol_enable_hdb = no -a \
2353                 $ol_enable_ldap = no -a \
2354                 $ol_enable_meta = no -a \
2355                 $ol_enable_monitor = no -a \
2356                 $ol_enable_null = no -a \
2357                 $ol_enable_passwd = no -a \
2358                 $ol_enable_perl = no -a \
2359                 $ol_enable_shell = no -a \
2360                 $ol_enable_sql = no ; then
2361
2362                 if test $ol_enable_slapd = yes ; then
2363                         { echo "configure: error: slapd requires a backend" 1>&2; exit 1; }
2364                 else
2365                         echo "configure: warning: skipping slapd, no backend specified" 1>&2
2366                         ol_enable_slapd=no
2367                 fi
2368         fi
2369
2370         ol_with_ldbm_api=no
2371         ol_with_ldbm_type=no
2372
2373         if test $ol_enable_bdb != no -o $ol_enable_hdb != no; then
2374                 ol_with_ldbm_api=berkeley
2375         fi
2376
2377 else
2378                 if test $ol_with_ldbm_api = gdbm -a \
2379                 $ol_with_ldbm_type = btree ; then
2380                 { echo "configure: error: GDBM only supports LDBM type hash" 1>&2; exit 1; }
2381         fi
2382         if test $ol_with_ldbm_api = mdbm -a \
2383                 $ol_with_ldbm_type = btree ; then
2384                 { echo "configure: error: MDBM only supports LDBM type hash" 1>&2; exit 1; }
2385         fi
2386         if test $ol_with_ldbm_api = ndbm -a \
2387                 $ol_with_ldbm_type = btree ; then
2388                 { echo "configure: error: NDBM only supports LDBM type hash" 1>&2; exit 1; }
2389         fi
2390
2391         if test $ol_enable_bdb = yes -o $ol_enable_hdb = yes ; then
2392                 if test $ol_with_ldbm_api = auto ; then
2393                         ol_with_ldbm_api=berkeley
2394                 elif test $ol_with_ldbm_api != berkeley ; then
2395                         { echo "configure: error: LDBM API not compatible with BDB/HDB" 1>&2; exit 1; }
2396                 fi
2397
2398         elif test $ol_enable_bdb = auto ; then
2399                 if test $ol_with_ldbm_api != berkeley \
2400                         -o $ol_with_ldbm_api != auto ; then
2401                         echo "configure: warning: LDBM API not compatible with BDB, disabling BDB" 1>&2
2402                         ol_enable_bdb=no
2403                 fi
2404         fi
2405 fi
2406
2407 if test $ol_enable_chain != no -a $ol_enable_ldap = no ; then
2408         { echo "configure: error: --enable-chain requires --enable-ldap" 1>&2; exit 1; }
2409 fi
2410
2411 if test $ol_enable_meta = yes -a $ol_enable_ldap = no ; then
2412         { echo "configure: error: --enable-meta requires --enable-ldap" 1>&2; exit 1; }
2413 fi
2414
2415 if test $ol_enable_slurpd = yes ; then
2416                 if test $ol_with_threads = no ; then
2417                 { echo "configure: error: slurpd requires threads" 1>&2; exit 1; }
2418         fi
2419 fi
2420
2421 if test $ol_enable_lmpasswd = yes ; then
2422         if test $ol_with_tls = no ; then
2423                 { echo "configure: error: LAN Manager passwords require OpenSSL" 1>&2; exit 1; }
2424         fi
2425 fi
2426
2427 if test $ol_enable_kbind = yes ; then
2428         if test $ol_with_kerberos = no ; then
2429                 { echo "configure: error: options require --with-kerberos" 1>&2; exit 1; }
2430         elif test $ol_with_kerberos = auto ; then
2431                 ol_with_kerberos=yes
2432         fi
2433
2434 elif test $ol_enable_kbind = no ; then
2435         if test $ol_with_kerberos = auto ; then
2436                 ol_with_kerberos=no
2437         elif test $ol_with_kerberos != no ; then
2438                 echo "configure: warning: Kerberos detection enabled unnecessarily" 1>&2;
2439                 ol_with_kerberos=no
2440         fi
2441 fi
2442
2443 if test $ol_enable_spasswd = yes ; then
2444         if test $ol_with_cyrus_sasl = no ; then
2445                 { echo "configure: error: options require --with-cyrus-sasl" 1>&2; exit 1; }
2446         fi
2447         ol_with_cyrus_sasl=yes
2448 fi
2449
2450 echo "$ac_t""done" 1>&6
2451
2452 LDAP_LIBS=
2453 LDBM_LIBS=
2454 LTHREAD_LIBS=
2455 LUTIL_LIBS=
2456
2457 SLAPD_LIBS=
2458 SLURPD_LIBS=
2459
2460 BUILD_SLAPD=no
2461 BUILD_SLURPD=no
2462
2463 BUILD_THREAD=no
2464
2465 BUILD_SLAPI=no
2466 SLAPD_SLAPI_DEPEND=
2467
2468 BUILD_BDB=no
2469 BUILD_DNSSRV=no
2470 BUILD_HDB=no
2471 BUILD_LDAP=no
2472 BUILD_LDBM=no
2473 BUILD_META=no
2474 BUILD_MONITOR=no
2475 BUILD_NULL=no
2476 BUILD_PASSWD=no
2477 BUILD_PERL=no
2478 BUILD_SHELL=no
2479 BUILD_SQL=no
2480
2481 BUILD_DYNGROUP=no
2482 BUILD_PROXYCACHE=no
2483
2484 SLAPD_DYNAMIC_OVERLAYS=
2485
2486 SLAPD_MODULES_LDFLAGS=
2487 SLAPD_MODULES_CPPFLAGS=
2488
2489 SLAPD_STATIC_BACKENDS=
2490 SLAPD_DYNAMIC_BACKENDS=
2491
2492 SLAPD_PERL_LDFLAGS=
2493 MOD_PERL_LDFLAGS=
2494 PERL_CPPFLAGS=
2495
2496 SLAPD_SQL_LDFLAGS=
2497 SLAPD_SQL_LIBS=
2498 SLAPD_SQL_INCLUDES=
2499
2500 KRB4_LIBS=
2501 KRB5_LIBS=
2502 SASL_LIBS=
2503 TLS_LIBS=
2504 MODULES_LIBS=
2505 SLAPI_LIBS=
2506 LIBSLAPI=
2507 LIBSLAPITOOLS=
2508 AUTH_LIBS=
2509
2510 SLAPD_SLP_LIBS=
2511
2512
2513 # Find a good install program.  We prefer a C program (faster),
2514 # so one script is as good as another.  But avoid the broken or
2515 # incompatible versions:
2516 # SysV /etc/install, /usr/sbin/install
2517 # SunOS /usr/etc/install
2518 # IRIX /sbin/install
2519 # AIX /bin/install
2520 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
2521 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
2522 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2523 # ./install, which can be erroneously created by make from ./install.sh.
2524 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
2525 echo "configure:2526: checking for a BSD compatible install" >&5
2526 if test -z "$INSTALL"; then
2527 if eval "test \"\${ac_cv_path_install+set}\" = set"; then
2528   echo $ac_n "(cached) $ac_c" 1>&6
2529 else
2530     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
2531   for ac_dir in $PATH; do
2532     # Account for people who put trailing slashes in PATH elements.
2533     case "$ac_dir/" in
2534     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
2535     *)
2536       # OSF1 and SCO ODT 3.0 have their own names for install.
2537       # Don't use installbsd from OSF since it installs stuff as root
2538       # by default.
2539       for ac_prog in ginstall scoinst install; do
2540         if test -f $ac_dir/$ac_prog; then
2541           if test $ac_prog = install &&
2542             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
2543             # AIX install.  It has an incompatible calling convention.
2544             :
2545           elif test $ac_prog = install &&
2546             grep pwplus $ac_dir/$ac_prog >/dev/null 2>&1; then
2547             # program-specific install script used by HP pwplus--don't use.
2548             :
2549           else
2550             ac_cv_path_install="$ac_dir/$ac_prog -c"
2551             break 2
2552           fi
2553         fi
2554       done
2555       ;;
2556     esac
2557   done
2558   IFS="$ac_save_IFS"
2559
2560 fi
2561   if test "${ac_cv_path_install+set}" = set; then
2562     INSTALL="$ac_cv_path_install"
2563   else
2564     # As a last resort, use the slow shell script.  We don't cache a
2565     # path for INSTALL within a source directory, because that will
2566     # break other packages using the cache if that directory is
2567     # removed, or if the path is relative.
2568     INSTALL="$ac_install_sh"
2569   fi
2570 fi
2571 echo "$ac_t""$INSTALL" 1>&6
2572
2573 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2574 # It thinks the first close brace ends the variable substitution.
2575 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2576
2577 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
2578
2579 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
2580
2581
2582 cat >> confdefs.h <<\EOF
2583 #define HAVE_MKVERSION 1
2584 EOF
2585
2586
2587
2588
2589 ol_aix_threads=no
2590 case "$target" in
2591 *-*-aix*)       if test -z "$CC" ; then
2592                 case "$ol_with_threads" in
2593                 auto | yes |  posix) ol_aix_threads=yes ;;
2594                 esac
2595         fi
2596 ;;
2597 esac
2598
2599 if test $ol_aix_threads = yes ; then
2600         if test -z "${CC}" ; then
2601                 for ac_prog in cc_r xlc_r cc
2602 do
2603 # Extract the first word of "$ac_prog", so it can be a program name with args.
2604 set dummy $ac_prog; ac_word=$2
2605 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2606 echo "configure:2607: checking for $ac_word" >&5
2607 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2608   echo $ac_n "(cached) $ac_c" 1>&6
2609 else
2610   if test -n "$CC"; then
2611   ac_cv_prog_CC="$CC" # Let the user override the test.
2612 else
2613   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2614   ac_dummy="$PATH"
2615   for ac_dir in $ac_dummy; do
2616     test -z "$ac_dir" && ac_dir=.
2617     if test -f $ac_dir/$ac_word; then
2618       ac_cv_prog_CC="$ac_prog"
2619       break
2620     fi
2621   done
2622   IFS="$ac_save_ifs"
2623 fi
2624 fi
2625 CC="$ac_cv_prog_CC"
2626 if test -n "$CC"; then
2627   echo "$ac_t""$CC" 1>&6
2628 else
2629   echo "$ac_t""no" 1>&6
2630 fi
2631
2632 test -n "$CC" && break
2633 done
2634
2635
2636                 if test "$CC" = cc ; then
2637                                                 if test $ol_with_threads != auto ; then
2638                                 { echo "configure: error: --with-threads requires cc_r (or other suitable compiler) on AIX" 1>&2; exit 1; }
2639                         else
2640                                 echo "configure: warning: disabling threads, no cc_r on AIX" 1>&2
2641                         fi
2642                         ol_with_threads=no
2643                 fi
2644         fi
2645
2646         if test "${CC}" = "cc_r" -o "${CC}" = "xlc_r" ; then
2647                 ol_with_threads=posix
2648                 ol_cv_pthread_create=yes
2649         fi
2650 fi
2651
2652 if test -z "${CC}"; then
2653         for ac_prog in cc gcc
2654 do
2655 # Extract the first word of "$ac_prog", so it can be a program name with args.
2656 set dummy $ac_prog; ac_word=$2
2657 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2658 echo "configure:2659: checking for $ac_word" >&5
2659 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2660   echo $ac_n "(cached) $ac_c" 1>&6
2661 else
2662   if test -n "$CC"; then
2663   ac_cv_prog_CC="$CC" # Let the user override the test.
2664 else
2665   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2666   ac_dummy="$PATH"
2667   for ac_dir in $ac_dummy; do
2668     test -z "$ac_dir" && ac_dir=.
2669     if test -f $ac_dir/$ac_word; then
2670       ac_cv_prog_CC="$ac_prog"
2671       break
2672     fi
2673   done
2674   IFS="$ac_save_ifs"
2675 fi
2676 fi
2677 CC="$ac_cv_prog_CC"
2678 if test -n "$CC"; then
2679   echo "$ac_t""$CC" 1>&6
2680 else
2681   echo "$ac_t""no" 1>&6
2682 fi
2683
2684 test -n "$CC" && break
2685 done
2686 test -n "$CC" || CC="missing"
2687
2688
2689         if test "${CC}" = "missing" ; then
2690                 { echo "configure: error: Unable to locate cc(1) or suitable replacement.  Check PATH or set CC." 1>&2; exit 1; }
2691         fi
2692 fi
2693
2694 if test -z "${AR}"; then
2695         for ac_prog in ar gar
2696 do
2697 # Extract the first word of "$ac_prog", so it can be a program name with args.
2698 set dummy $ac_prog; ac_word=$2
2699 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2700 echo "configure:2701: checking for $ac_word" >&5
2701 if eval "test \"\${ac_cv_prog_AR+set}\" = set"; then
2702   echo $ac_n "(cached) $ac_c" 1>&6
2703 else
2704   if test -n "$AR"; then
2705   ac_cv_prog_AR="$AR" # Let the user override the test.
2706 else
2707   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2708   ac_dummy="$PATH"
2709   for ac_dir in $ac_dummy; do
2710     test -z "$ac_dir" && ac_dir=.
2711     if test -f $ac_dir/$ac_word; then
2712       ac_cv_prog_AR="$ac_prog"
2713       break
2714     fi
2715   done
2716   IFS="$ac_save_ifs"
2717 fi
2718 fi
2719 AR="$ac_cv_prog_AR"
2720 if test -n "$AR"; then
2721   echo "$ac_t""$AR" 1>&6
2722 else
2723   echo "$ac_t""no" 1>&6
2724 fi
2725
2726 test -n "$AR" && break
2727 done
2728 test -n "$AR" || AR="missing"
2729
2730
2731         if test "${AR}" = "missing" ; then
2732                 { echo "configure: error: Unable to locate ar(1) or suitable replacement.  Check PATH or set AR." 1>&2; exit 1; }
2733         fi
2734 fi
2735
2736
2737
2738 # Find the correct PATH separator.  Usually this is `:', but
2739 # DJGPP uses `;' like DOS.
2740 if test "X${PATH_SEPARATOR+set}" != Xset; then
2741   UNAME=${UNAME-`uname 2>/dev/null`}
2742   case X$UNAME in
2743     *-DOS) lt_cv_sys_path_separator=';' ;;
2744     *)     lt_cv_sys_path_separator=':' ;;
2745   esac
2746   PATH_SEPARATOR=$lt_cv_sys_path_separator
2747 fi
2748
2749 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
2750 echo "configure:2751: checking for Cygwin environment" >&5
2751 if eval "test \"\${ac_cv_cygwin+set}\" = set"; then
2752   echo $ac_n "(cached) $ac_c" 1>&6
2753 else
2754   cat > conftest.$ac_ext <<EOF
2755 #line 2756 "configure"
2756 #include "confdefs.h"
2757
2758 int main() {
2759
2760 #ifndef __CYGWIN__
2761 #define __CYGWIN__ __CYGWIN32__
2762 #endif
2763 return __CYGWIN__;
2764 ; return 0; }
2765 EOF
2766 if { (eval echo configure:2767: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2767   rm -rf conftest*
2768   ac_cv_cygwin=yes
2769 else
2770   echo "configure: failed program was:" >&5
2771   cat conftest.$ac_ext >&5
2772   rm -rf conftest*
2773   ac_cv_cygwin=no
2774 fi
2775 rm -f conftest*
2776 fi
2777
2778 echo "$ac_t""$ac_cv_cygwin" 1>&6
2779 CYGWIN=
2780 test "$ac_cv_cygwin" = yes && CYGWIN=yes
2781 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
2782 echo "configure:2783: checking for mingw32 environment" >&5
2783 if eval "test \"\${ac_cv_mingw32+set}\" = set"; then
2784   echo $ac_n "(cached) $ac_c" 1>&6
2785 else
2786   cat > conftest.$ac_ext <<EOF
2787 #line 2788 "configure"
2788 #include "confdefs.h"
2789
2790 int main() {
2791 return __MINGW32__;
2792 ; return 0; }
2793 EOF
2794 if { (eval echo configure:2795: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2795   rm -rf conftest*
2796   ac_cv_mingw32=yes
2797 else
2798   echo "configure: failed program was:" >&5
2799   cat conftest.$ac_ext >&5
2800   rm -rf conftest*
2801   ac_cv_mingw32=no
2802 fi
2803 rm -f conftest*
2804 fi
2805
2806 echo "$ac_t""$ac_cv_mingw32" 1>&6
2807 MINGW32=
2808 test "$ac_cv_mingw32" = yes && MINGW32=yes
2809 echo $ac_n "checking for EMX OS/2 environment""... $ac_c" 1>&6
2810 echo "configure:2811: checking for EMX OS/2 environment" >&5
2811 if eval "test \"\${ac_cv_emxos2+set}\" = set"; then
2812   echo $ac_n "(cached) $ac_c" 1>&6
2813 else
2814   cat > conftest.$ac_ext <<EOF
2815 #line 2816 "configure"
2816 #include "confdefs.h"
2817
2818 int main() {
2819 return __EMX__;
2820 ; return 0; }
2821 EOF
2822 if { (eval echo configure:2823: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2823   rm -rf conftest*
2824   ac_cv_emxos2=yes
2825 else
2826   echo "configure: failed program was:" >&5
2827   cat conftest.$ac_ext >&5
2828   rm -rf conftest*
2829   ac_cv_emxos2=no
2830 fi
2831 rm -f conftest*
2832 fi
2833
2834 echo "$ac_t""$ac_cv_emxos2" 1>&6
2835 EMXOS2=
2836 test "$ac_cv_emxos2" = yes && EMXOS2=yes
2837 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
2838 echo "configure:2839: checking how to run the C preprocessor" >&5
2839 # On Suns, sometimes $CPP names a directory.
2840 if test -n "$CPP" && test -d "$CPP"; then
2841   CPP=
2842 fi
2843 if test -z "$CPP"; then
2844 if eval "test \"\${ac_cv_prog_CPP+set}\" = set"; then
2845   echo $ac_n "(cached) $ac_c" 1>&6
2846 else
2847     # This must be in double quotes, not single quotes, because CPP may get
2848   # substituted into the Makefile and "${CC-cc}" will confuse make.
2849   CPP="${CC-cc} -E"
2850   # On the NeXT, cc -E runs the code through the compiler's parser,
2851   # not just through cpp.
2852   cat > conftest.$ac_ext <<EOF
2853 #line 2854 "configure"
2854 #include "confdefs.h"
2855 #include <assert.h>
2856 Syntax Error
2857 EOF
2858 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2859 { (eval echo configure:2860: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2860 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2861 if test -z "$ac_err"; then
2862   :
2863 else
2864   echo "$ac_err" >&5
2865   echo "configure: failed program was:" >&5
2866   cat conftest.$ac_ext >&5
2867   rm -rf conftest*
2868   CPP="${CC-cc} -E -traditional-cpp"
2869   cat > conftest.$ac_ext <<EOF
2870 #line 2871 "configure"
2871 #include "confdefs.h"
2872 #include <assert.h>
2873 Syntax Error
2874 EOF
2875 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2876 { (eval echo configure:2877: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2877 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2878 if test -z "$ac_err"; then
2879   :
2880 else
2881   echo "$ac_err" >&5
2882   echo "configure: failed program was:" >&5
2883   cat conftest.$ac_ext >&5
2884   rm -rf conftest*
2885   CPP="${CC-cc} -nologo -E"
2886   cat > conftest.$ac_ext <<EOF
2887 #line 2888 "configure"
2888 #include "confdefs.h"
2889 #include <assert.h>
2890 Syntax Error
2891 EOF
2892 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2893 { (eval echo configure:2894: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2894 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2895 if test -z "$ac_err"; then
2896   :
2897 else
2898   echo "$ac_err" >&5
2899   echo "configure: failed program was:" >&5
2900   cat conftest.$ac_ext >&5
2901   rm -rf conftest*
2902   CPP=/lib/cpp
2903 fi
2904 rm -f conftest*
2905 fi
2906 rm -f conftest*
2907 fi
2908 rm -f conftest*
2909   ac_cv_prog_CPP="$CPP"
2910 fi
2911   CPP="$ac_cv_prog_CPP"
2912 else
2913   ac_cv_prog_CPP="$CPP"
2914 fi
2915 echo "$ac_t""$CPP" 1>&6
2916
2917 # Check whether --enable-fast-install or --disable-fast-install was given.
2918 if test "${enable_fast_install+set}" = set; then
2919   enableval="$enable_fast_install"
2920   p=${PACKAGE-default}
2921 case $enableval in
2922 yes) enable_fast_install=yes ;;
2923 no) enable_fast_install=no ;;
2924 *)
2925   enable_fast_install=no
2926   # Look at the argument we got.  We use all the common list separators.
2927   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2928   for pkg in $enableval; do
2929     if test "X$pkg" = "X$p"; then
2930       enable_fast_install=yes
2931     fi
2932   done
2933   IFS="$ac_save_ifs"
2934   ;;
2935 esac
2936 else
2937   enable_fast_install=yes
2938 fi
2939
2940 # Extract the first word of "gcc", so it can be a program name with args.
2941 set dummy gcc; ac_word=$2
2942 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2943 echo "configure:2944: checking for $ac_word" >&5
2944 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2945   echo $ac_n "(cached) $ac_c" 1>&6
2946 else
2947   if test -n "$CC"; then
2948   ac_cv_prog_CC="$CC" # Let the user override the test.
2949 else
2950   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2951   ac_dummy="$PATH"
2952   for ac_dir in $ac_dummy; do
2953     test -z "$ac_dir" && ac_dir=.
2954     if test -f $ac_dir/$ac_word; then
2955       ac_cv_prog_CC="gcc"
2956       break
2957     fi
2958   done
2959   IFS="$ac_save_ifs"
2960 fi
2961 fi
2962 CC="$ac_cv_prog_CC"
2963 if test -n "$CC"; then
2964   echo "$ac_t""$CC" 1>&6
2965 else
2966   echo "$ac_t""no" 1>&6
2967 fi
2968
2969 if test -z "$CC"; then
2970   # Extract the first word of "cc", so it can be a program name with args.
2971 set dummy cc; ac_word=$2
2972 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2973 echo "configure:2974: checking for $ac_word" >&5
2974 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2975   echo $ac_n "(cached) $ac_c" 1>&6
2976 else
2977   if test -n "$CC"; then
2978   ac_cv_prog_CC="$CC" # Let the user override the test.
2979 else
2980   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2981   ac_prog_rejected=no
2982   ac_dummy="$PATH"
2983   for ac_dir in $ac_dummy; do
2984     test -z "$ac_dir" && ac_dir=.
2985     if test -f $ac_dir/$ac_word; then
2986       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
2987         ac_prog_rejected=yes
2988         continue
2989       fi
2990       ac_cv_prog_CC="cc"
2991       break
2992     fi
2993   done
2994   IFS="$ac_save_ifs"
2995 if test $ac_prog_rejected = yes; then
2996   # We found a bogon in the path, so make sure we never use it.
2997   set dummy $ac_cv_prog_CC
2998   shift
2999   if test $# -gt 0; then
3000     # We chose a different compiler from the bogus one.
3001     # However, it has the same basename, so the bogon will be chosen
3002     # first if we set CC to just the basename; use the full file name.
3003     shift
3004     set dummy "$ac_dir/$ac_word" "$@"
3005     shift
3006     ac_cv_prog_CC="$@"
3007   fi
3008 fi
3009 fi
3010 fi
3011 CC="$ac_cv_prog_CC"
3012 if test -n "$CC"; then
3013   echo "$ac_t""$CC" 1>&6
3014 else
3015   echo "$ac_t""no" 1>&6
3016 fi
3017
3018   if test -z "$CC"; then
3019     case "`uname -s`" in
3020     *win32* | *WIN32* | *CYGWIN*)
3021       # Extract the first word of "cl", so it can be a program name with args.
3022 set dummy cl; ac_word=$2
3023 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3024 echo "configure:3025: checking for $ac_word" >&5
3025 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3026   echo $ac_n "(cached) $ac_c" 1>&6
3027 else
3028   if test -n "$CC"; then
3029   ac_cv_prog_CC="$CC" # Let the user override the test.
3030 else
3031   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3032   ac_dummy="$PATH"
3033   for ac_dir in $ac_dummy; do
3034     test -z "$ac_dir" && ac_dir=.
3035     if test -f $ac_dir/$ac_word; then
3036       ac_cv_prog_CC="cl"
3037       break
3038     fi
3039   done
3040   IFS="$ac_save_ifs"
3041 fi
3042 fi
3043 CC="$ac_cv_prog_CC"
3044 if test -n "$CC"; then
3045   echo "$ac_t""$CC" 1>&6
3046 else
3047   echo "$ac_t""no" 1>&6
3048 fi
3049  ;;
3050     esac
3051   fi
3052   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
3053 fi
3054
3055 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works""... $ac_c" 1>&6
3056 echo "configure:3057: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works" >&5
3057
3058 ac_ext=c
3059 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
3060 ac_cpp='$CPP $CPPFLAGS'
3061 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
3062 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
3063 cross_compiling=$ac_cv_prog_cc_cross
3064
3065 cat > conftest.$ac_ext << EOF
3066
3067 #line 3068 "configure"
3068 #include "confdefs.h"
3069
3070 main(){return(0);}
3071 EOF
3072 if { (eval echo configure:3073: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3073   ac_cv_prog_cc_works=yes
3074   # If we can't run a trivial program, we are probably using a cross compiler.
3075   if (./conftest; exit) 2>/dev/null; then
3076     ac_cv_prog_cc_cross=no
3077   else
3078     ac_cv_prog_cc_cross=yes
3079   fi
3080 else
3081   echo "configure: failed program was:" >&5
3082   cat conftest.$ac_ext >&5
3083   ac_cv_prog_cc_works=no
3084 fi
3085 rm -fr conftest*
3086 ac_ext=c
3087 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
3088 ac_cpp='$CPP $CPPFLAGS'
3089 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
3090 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
3091 cross_compiling=$ac_cv_prog_cc_cross
3092
3093 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
3094 if test $ac_cv_prog_cc_works = no; then
3095   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
3096 fi
3097 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
3098 echo "configure:3099: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler" >&5
3099 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
3100 cross_compiling=$ac_cv_prog_cc_cross
3101
3102 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
3103 echo "configure:3104: checking whether we are using GNU C" >&5
3104 if eval "test \"\${ac_cv_prog_gcc+set}\" = set"; then
3105   echo $ac_n "(cached) $ac_c" 1>&6
3106 else
3107   cat > conftest.c <<EOF
3108 #ifdef __GNUC__
3109   yes;
3110 #endif
3111 EOF
3112 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:3113: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
3113   ac_cv_prog_gcc=yes
3114 else
3115   ac_cv_prog_gcc=no
3116 fi
3117 fi
3118
3119 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
3120
3121 if test $ac_cv_prog_gcc = yes; then
3122   GCC=yes
3123 else
3124   GCC=
3125 fi
3126
3127 ac_test_CFLAGS="${CFLAGS+set}"
3128 ac_save_CFLAGS="$CFLAGS"
3129 CFLAGS=
3130 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
3131 echo "configure:3132: checking whether ${CC-cc} accepts -g" >&5
3132 if eval "test \"\${ac_cv_prog_cc_g+set}\" = set"; then
3133   echo $ac_n "(cached) $ac_c" 1>&6
3134 else
3135   echo 'void f(){}' > conftest.c
3136 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
3137   ac_cv_prog_cc_g=yes
3138 else
3139   ac_cv_prog_cc_g=no
3140 fi
3141 rm -f conftest*
3142
3143 fi
3144
3145 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
3146 if test "$ac_test_CFLAGS" = set; then
3147   CFLAGS="$ac_save_CFLAGS"
3148 elif test $ac_cv_prog_cc_g = yes; then
3149   if test "$GCC" = yes; then
3150     CFLAGS="-g -O2"
3151   else
3152     CFLAGS="-g"
3153   fi
3154 else
3155   if test "$GCC" = yes; then
3156     CFLAGS="-O2"
3157   else
3158     CFLAGS=
3159   fi
3160 fi
3161
3162 # Check whether --with-gnu-ld or --without-gnu-ld was given.
3163 if test "${with_gnu_ld+set}" = set; then
3164   withval="$with_gnu_ld"
3165   test "$withval" = no || with_gnu_ld=yes
3166 else
3167   with_gnu_ld=no
3168 fi
3169
3170 ac_prog=ld
3171 if test "$GCC" = yes; then
3172   # Check if gcc -print-prog-name=ld gives a path.
3173   echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
3174 echo "configure:3175: checking for ld used by GCC" >&5
3175   case $host in
3176   *-*-mingw*)
3177     # gcc leaves a trailing carriage return which upsets mingw
3178     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
3179   *)
3180     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
3181   esac
3182   case $ac_prog in
3183     # Accept absolute paths.
3184     [\\/]* | [A-Za-z]:[\\/]*)
3185       re_direlt='/[^/][^/]*/\.\./'
3186       # Canonicalize the path of ld
3187       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
3188       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
3189         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
3190       done
3191       test -z "$LD" && LD="$ac_prog"
3192       ;;
3193   "")
3194     # If it fails, then pretend we aren't using GCC.
3195     ac_prog=ld
3196     ;;
3197   *)
3198     # If it is relative, then search for the first ld in PATH.
3199     with_gnu_ld=unknown
3200     ;;
3201   esac
3202 elif test "$with_gnu_ld" = yes; then
3203   echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
3204 echo "configure:3205: checking for GNU ld" >&5
3205 else
3206   echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
3207 echo "configure:3208: checking for non-GNU ld" >&5
3208 fi
3209 if eval "test \"\${lt_cv_path_LD+set}\" = set"; then
3210   echo $ac_n "(cached) $ac_c" 1>&6
3211 else
3212   if test -z "$LD"; then
3213   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3214   for ac_dir in $PATH; do
3215     test -z "$ac_dir" && ac_dir=.
3216     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
3217       lt_cv_path_LD="$ac_dir/$ac_prog"
3218       # Check to see if the program is GNU ld.  I'd rather use --version,
3219       # but apparently some GNU ld's only accept -v.
3220       # Break only if it was the GNU/non-GNU ld that we prefer.
3221       if "$lt_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
3222         test "$with_gnu_ld" != no && break
3223       else
3224         test "$with_gnu_ld" != yes && break
3225       fi
3226     fi
3227   done
3228   IFS="$ac_save_ifs"
3229 else
3230   lt_cv_path_LD="$LD" # Let the user override the test with a path.
3231 fi
3232 fi
3233
3234 LD="$lt_cv_path_LD"
3235 if test -n "$LD"; then
3236   echo "$ac_t""$LD" 1>&6
3237 else
3238   echo "$ac_t""no" 1>&6
3239 fi
3240 test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
3241 echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
3242 echo "configure:3243: checking if the linker ($LD) is GNU ld" >&5
3243 if eval "test \"\${lt_cv_prog_gnu_ld+set}\" = set"; then
3244   echo $ac_n "(cached) $ac_c" 1>&6
3245 else
3246   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
3247 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
3248   lt_cv_prog_gnu_ld=yes
3249 else
3250   lt_cv_prog_gnu_ld=no
3251 fi
3252 fi
3253
3254 echo "$ac_t""$lt_cv_prog_gnu_ld" 1>&6
3255 with_gnu_ld=$lt_cv_prog_gnu_ld
3256
3257
3258 echo $ac_n "checking for $LD option to reload object files""... $ac_c" 1>&6
3259 echo "configure:3260: checking for $LD option to reload object files" >&5
3260 if eval "test \"\${lt_cv_ld_reload_flag+set}\" = set"; then
3261   echo $ac_n "(cached) $ac_c" 1>&6
3262 else
3263   lt_cv_ld_reload_flag='-r'
3264 fi
3265
3266 echo "$ac_t""$lt_cv_ld_reload_flag" 1>&6
3267 reload_flag=$lt_cv_ld_reload_flag
3268 test -n "$reload_flag" && reload_flag=" $reload_flag"
3269
3270 echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
3271 echo "configure:3272: checking for BSD-compatible nm" >&5
3272 if eval "test \"\${lt_cv_path_NM+set}\" = set"; then
3273   echo $ac_n "(cached) $ac_c" 1>&6
3274 else
3275   if test -n "$NM"; then
3276   # Let the user override the test.
3277   lt_cv_path_NM="$NM"
3278 else
3279   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3280   for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
3281     test -z "$ac_dir" && ac_dir=.
3282     tmp_nm=$ac_dir/${ac_tool_prefix}nm
3283     if test -f $tmp_nm || test -f $tmp_nm$ac_exeext ; then
3284       # Check to see if the nm accepts a BSD-compat flag.
3285       # Adding the `sed 1q' prevents false positives on HP-UX, which says:
3286       #   nm: unknown option "B" ignored
3287       # Tru64's nm complains that /dev/null is an invalid object file
3288       if ($tmp_nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then
3289         lt_cv_path_NM="$tmp_nm -B"
3290         break
3291       elif ($tmp_nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
3292         lt_cv_path_NM="$tmp_nm -p"
3293         break
3294       else
3295         lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
3296         continue # so that we can try to find one that supports BSD flags
3297       fi
3298     fi
3299   done
3300   IFS="$ac_save_ifs"
3301   test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
3302 fi
3303 fi
3304
3305 NM="$lt_cv_path_NM"
3306 echo "$ac_t""$NM" 1>&6
3307
3308 echo $ac_n "checking for a sed that does not truncate output""... $ac_c" 1>&6
3309 echo "configure:3310: checking for a sed that does not truncate output" >&5
3310 if eval "test \"\${lt_cv_path_SED+set}\" = set"; then
3311   echo $ac_n "(cached) $ac_c" 1>&6
3312 else
3313   # Loop through the user's path and test for sed and gsed.
3314 # Then use that list of sed's as ones to test for truncation.
3315 as_executable_p="test -f"
3316 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3317 for as_dir in $PATH
3318 do
3319   IFS=$as_save_IFS
3320   test -z "$as_dir" && as_dir=.
3321   for ac_prog in sed gsed; do
3322     for ac_exec_ext in '' $ac_executable_extensions; do
3323       if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
3324         _sed_list="$_sed_list $as_dir/$ac_prog$ac_exec_ext"
3325       fi
3326     done
3327   done
3328 done
3329
3330   # Create a temporary directory, and hook for its removal unless debugging.
3331 $debug ||
3332 {
3333   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
3334   trap '{ (exit 1); exit 1; }' 1 2 13 15
3335 }
3336
3337 # Create a (secure) tmp directory for tmp files.
3338 : ${TMPDIR=/tmp}
3339 {
3340   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/sedXXXXXX") 2>/dev/null` &&
3341   test -n "$tmp" && test -d "$tmp"
3342 }  ||
3343 {
3344   tmp=$TMPDIR/sed$$-$RANDOM
3345   (umask 077 && mkdir $tmp)
3346 } ||
3347 {
3348    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
3349    { (exit 1); exit 1; }
3350 }
3351   _max=0
3352   _count=0
3353   # Add /usr/xpg4/bin/sed as it is typically found on Solaris
3354   # along with /bin/sed that truncates output.
3355   for _sed in $_sed_list /usr/xpg4/bin/sed; do
3356     test ! -f ${_sed} && break
3357     cat /dev/null > "$tmp/sed.in"
3358     _count=0
3359     echo ${ECHO_N-$ac_n} "0123456789${ECHO_C-$ac_c}" >"$tmp/sed.in"
3360     # Check for GNU sed and select it if it is found.
3361     if "${_sed}" --version 2>&1 < /dev/null | egrep '(GNU)' > /dev/null; then
3362       lt_cv_path_SED=${_sed}
3363       break
3364     fi
3365     while true; do
3366       cat "$tmp/sed.in" "$tmp/sed.in" >"$tmp/sed.tmp"
3367       mv "$tmp/sed.tmp" "$tmp/sed.in"
3368       cp "$tmp/sed.in" "$tmp/sed.nl"
3369       echo >>"$tmp/sed.nl"
3370       ${_sed} -e 's/a$//' < "$tmp/sed.nl" >"$tmp/sed.out" || break
3371       cmp -s "$tmp/sed.out" "$tmp/sed.nl" || break
3372       # 40000 chars as input seems more than enough
3373       test $_count -gt 10 && break
3374       _count=`expr $_count + 1`
3375       if test $_count -gt $_max; then
3376         _max=$_count
3377         lt_cv_path_SED=$_sed
3378       fi
3379     done
3380   done
3381   rm -rf "$tmp"
3382
3383 fi
3384
3385 if test "X$SED" != "X"; then
3386   lt_cv_path_SED=$SED
3387 else
3388   SED=$lt_cv_path_SED
3389 fi
3390 echo "$ac_t""$SED" 1>&6
3391
3392 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
3393 echo "configure:3394: checking whether ln -s works" >&5
3394 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
3395   echo $ac_n "(cached) $ac_c" 1>&6
3396 else
3397   rm -f conftestdata
3398 if ln -s X conftestdata 2>/dev/null
3399 then
3400   rm -f conftestdata
3401   ac_cv_prog_LN_S="ln -s"
3402 else
3403   ac_cv_prog_LN_S=ln
3404 fi
3405 fi
3406 LN_S="$ac_cv_prog_LN_S"
3407 if test "$ac_cv_prog_LN_S" = "ln -s"; then
3408   echo "$ac_t""yes" 1>&6
3409 else
3410   echo "$ac_t""no" 1>&6
3411 fi
3412
3413 echo $ac_n "checking how to recognise dependent libraries""... $ac_c" 1>&6
3414 echo "configure:3415: checking how to recognise dependent libraries" >&5
3415 if eval "test \"\${lt_cv_deplibs_check_method+set}\" = set"; then
3416   echo $ac_n "(cached) $ac_c" 1>&6
3417 else
3418   lt_cv_file_magic_cmd='$MAGIC_CMD'
3419 lt_cv_file_magic_test_file=
3420 lt_cv_deplibs_check_method='unknown'
3421 # Need to set the preceding variable on all platforms that support
3422 # interlibrary dependencies.
3423 # 'none' -- dependencies not supported.
3424 # `unknown' -- same as none, but documents that we really don't know.
3425 # 'pass_all' -- all dependencies passed with no checks.
3426 # 'test_compile' -- check by making test program.
3427 # 'file_magic [[regex]]' -- check by looking for files in library path
3428 # which responds to the $file_magic_cmd with a given egrep regex.
3429 # If you have `file' or equivalent on your system and you're not sure
3430 # whether `pass_all' will *always* work, you probably want this one.
3431
3432 case $host_os in
3433 aix4* | aix5*)
3434   lt_cv_deplibs_check_method=pass_all
3435   ;;
3436
3437 beos*)
3438   lt_cv_deplibs_check_method=pass_all
3439   ;;
3440
3441 bsdi4*)
3442   lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
3443   lt_cv_file_magic_cmd='/usr/bin/file -L'
3444   lt_cv_file_magic_test_file=/shlib/libc.so
3445   ;;
3446
3447 cygwin* | mingw* | pw32*)
3448   lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
3449   lt_cv_file_magic_cmd='$OBJDUMP -f'
3450   ;;
3451
3452 darwin* | rhapsody*)
3453   lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library'
3454   lt_cv_file_magic_cmd='/usr/bin/file -L'
3455   case "$host_os" in
3456   rhapsody* | darwin1.[012])
3457     lt_cv_file_magic_test_file=`echo /System/Library/Frameworks/System.framework/Versions/*/System | head -1`
3458     ;;
3459   *) # Darwin 1.3 on
3460     lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
3461     ;;
3462   esac
3463   ;;
3464
3465 freebsd*)
3466   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3467     case $host_cpu in
3468     i*86 )
3469       # Not sure whether the presence of OpenBSD here was a mistake.
3470       # Let's accept both of them until this is cleared up.
3471       lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[3-9]86 (compact )?demand paged shared library'
3472       lt_cv_file_magic_cmd=/usr/bin/file
3473       lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3474       ;;
3475     esac
3476   else
3477     lt_cv_deplibs_check_method=pass_all
3478   fi
3479   ;;
3480
3481 gnu*)
3482   lt_cv_deplibs_check_method=pass_all
3483   ;;
3484
3485 hpux10.20*|hpux11*)
3486   lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library'
3487   lt_cv_file_magic_cmd=/usr/bin/file
3488   lt_cv_file_magic_test_file=/usr/lib/libc.sl
3489   ;;
3490
3491 irix5* | irix6* | nonstopux*)
3492   case $host_os in
3493   irix5* | nonstopux*)
3494     # this will be overridden with pass_all, but let us keep it just in case
3495     lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
3496     ;;
3497   *)
3498     case $LD in
3499     *-32|*"-32 ") libmagic=32-bit;;
3500     *-n32|*"-n32 ") libmagic=N32;;
3501     *-64|*"-64 ") libmagic=64-bit;;
3502     *) libmagic=never-match;;
3503     esac
3504     # this will be overridden with pass_all, but let us keep it just in case
3505     lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[1234] dynamic lib MIPS - version 1"
3506     ;;
3507   esac
3508   lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
3509   lt_cv_deplibs_check_method=pass_all
3510   ;;
3511
3512 # This must be Linux ELF.
3513 linux-gnu*)
3514   case $host_cpu in
3515   alpha* | hppa* | i*86 | mips | mipsel | powerpc* | sparc* | ia64*)
3516     lt_cv_deplibs_check_method=pass_all ;;
3517   *)
3518     # glibc up to 2.1.1 does not perform some relocations on ARM
3519     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;;
3520   esac
3521   lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
3522   ;;
3523
3524 netbsd*)
3525   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3526     lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
3527   else
3528     lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so$'
3529   fi
3530   ;;
3531
3532 newos6*)
3533   lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
3534   lt_cv_file_magic_cmd=/usr/bin/file
3535   lt_cv_file_magic_test_file=/usr/lib/libnls.so
3536   ;;
3537
3538 openbsd*)
3539   lt_cv_file_magic_cmd=/usr/bin/file
3540   lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3541   if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
3542     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB shared object'
3543   else
3544     lt_cv_deplibs_check_method='file_magic OpenBSD.* shared library'
3545   fi
3546   ;;
3547
3548 openedition*)
3549   lt_cv_deplibs_check_method=pass_all
3550   ;;
3551
3552 osf3* | osf4* | osf5*)
3553   # this will be overridden with pass_all, but let us keep it just in case
3554   lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
3555   lt_cv_file_magic_test_file=/shlib/libc.so
3556   lt_cv_deplibs_check_method=pass_all
3557   ;;
3558
3559 sco3.2v5*)
3560   lt_cv_deplibs_check_method=pass_all
3561   ;;
3562
3563 solaris*)
3564   lt_cv_deplibs_check_method=pass_all
3565   lt_cv_file_magic_test_file=/lib/libc.so
3566   ;;
3567
3568 sysv5uw[78]* | sysv4*uw2*)
3569   lt_cv_deplibs_check_method=pass_all
3570   ;;
3571
3572 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
3573   case $host_vendor in
3574   motorola)
3575     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]'
3576     lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
3577     ;;
3578   ncr)
3579     lt_cv_deplibs_check_method=pass_all
3580     ;;
3581   sequent)
3582     lt_cv_file_magic_cmd='/bin/file'
3583     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'
3584     ;;
3585   sni)
3586     lt_cv_file_magic_cmd='/bin/file'
3587     lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib"
3588     lt_cv_file_magic_test_file=/lib/libc.so
3589     ;;
3590   siemens)
3591     lt_cv_deplibs_check_method=pass_all
3592     ;;
3593   esac
3594   ;;
3595 esac
3596
3597 fi
3598
3599 echo "$ac_t""$lt_cv_deplibs_check_method" 1>&6
3600 file_magic_cmd=$lt_cv_file_magic_cmd
3601 deplibs_check_method=$lt_cv_deplibs_check_method
3602
3603 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
3604 echo "configure:3605: checking for object suffix" >&5
3605 if eval "test \"\${ac_cv_objext+set}\" = set"; then
3606   echo $ac_n "(cached) $ac_c" 1>&6
3607 else
3608   rm -f conftest*
3609 echo 'int i = 1;' > conftest.$ac_ext
3610 if { (eval echo configure:3611: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3611   for ac_file in conftest.*; do
3612     case $ac_file in
3613     *.c) ;;
3614     *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
3615     esac
3616   done
3617 else
3618   { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
3619 fi
3620 rm -f conftest*
3621 fi
3622
3623 echo "$ac_t""$ac_cv_objext" 1>&6
3624 OBJEXT=$ac_cv_objext
3625 ac_objext=$ac_cv_objext
3626
3627
3628
3629
3630 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
3631 echo "configure:3632: checking for executable suffix" >&5
3632 if eval "test \"\${ac_cv_exeext+set}\" = set"; then
3633   echo $ac_n "(cached) $ac_c" 1>&6
3634 else
3635   if test "$CYGWIN" = yes || test "$MINGW32" = yes || test "$EMXOS2" = yes; then
3636   ac_cv_exeext=.exe
3637 else
3638   rm -f conftest*
3639   echo 'int main () { return 0; }' > conftest.$ac_ext
3640   ac_cv_exeext=
3641   if { (eval echo configure:3642: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
3642     for file in conftest.*; do
3643       case $file in
3644       *.c | *.C | *.o | *.obj | *.xcoff) ;;
3645       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
3646       esac
3647     done
3648   else
3649     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
3650   fi
3651   rm -f conftest*
3652   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
3653 fi
3654 fi
3655
3656 EXEEXT=""
3657 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
3658 echo "$ac_t""${ac_cv_exeext}" 1>&6
3659 ac_exeext=$EXEEXT
3660
3661 if test $host != $build; then
3662   ac_tool_prefix=${host_alias}-
3663 else
3664   ac_tool_prefix=
3665 fi
3666
3667
3668
3669
3670 # Check for command to grab the raw symbol name followed by C symbol from nm.
3671 echo $ac_n "checking command to parse $NM output""... $ac_c" 1>&6
3672 echo "configure:3673: checking command to parse $NM output" >&5
3673 if eval "test \"\${lt_cv_sys_global_symbol_pipe+set}\" = set"; then
3674   echo $ac_n "(cached) $ac_c" 1>&6
3675 else
3676   
3677 # These are sane defaults that work on at least a few old systems.
3678 # [They come from Ultrix.  What could be older than Ultrix?!! ;)]
3679
3680 # Character class describing NM global symbol codes.
3681 symcode='[BCDEGRST]'
3682
3683 # Regexp to match symbols that can be accessed directly from C.
3684 sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
3685
3686 # Transform the above into a raw symbol and a C symbol.
3687 symxfrm='\1 \2\3 \3'
3688
3689 # Transform an extracted symbol line into a proper C declaration
3690 lt_cv_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern char \1;/p'"
3691
3692 # Transform an extracted symbol line into symbol name and symbol address
3693 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'"
3694
3695 # Define system-specific variables.
3696 case $host_os in
3697 aix*)
3698   symcode='[BCDT]'
3699   ;;
3700 cygwin* | mingw* | pw32*)
3701   symcode='[ABCDGISTW]'
3702   ;;
3703 hpux*) # Its linker distinguishes data from code symbols
3704   lt_cv_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern char \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
3705   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'"
3706   ;;
3707 irix* | nonstopux*)
3708   symcode='[BCDEGRST]'
3709   ;;
3710 osf*)
3711   symcode='[BCDEGQRST]'
3712   ;;
3713 solaris* | sysv5*)
3714   symcode='[BDT]'
3715   ;;
3716 sysv4)
3717   symcode='[DFNSTU]'
3718   ;;
3719 esac
3720
3721 # Handle CRLF in mingw tool chain
3722 opt_cr=
3723 case $host_os in
3724 mingw*)
3725   opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
3726   ;;
3727 esac
3728
3729 # If we're using GNU nm, then use its standard symbol codes.
3730 if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then
3731   symcode='[ABCDGISTW]'
3732 fi
3733
3734 # Try without a prefix undercore, then with it.
3735 for ac_symprfx in "" "_"; do
3736
3737   # Write the raw and C identifiers.
3738 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[         ]\($symcode$symcode*\)[         ][      ]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'"
3739
3740   # Check to see that the pipe works correctly.
3741   pipe_works=no
3742   rm -f conftest*
3743   cat > conftest.$ac_ext <<EOF
3744 #ifdef __cplusplus
3745 extern "C" {
3746 #endif
3747 char nm_test_var;
3748 void nm_test_func(){}
3749 #ifdef __cplusplus
3750 }
3751 #endif
3752 int main(){nm_test_var='a';nm_test_func();return(0);}
3753 EOF
3754
3755   if { (eval echo configure:3756: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3756     # Now try to grab the symbols.
3757     nlist=conftest.nm
3758     if { (eval echo configure:3759: \"$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
3759       # Try sorting and uniquifying the output.
3760       if sort "$nlist" | uniq > "$nlist"T; then
3761         mv -f "$nlist"T "$nlist"
3762       else
3763         rm -f "$nlist"T
3764       fi
3765
3766       # Make sure that we snagged all the symbols we need.
3767       if egrep ' nm_test_var$' "$nlist" >/dev/null; then
3768         if egrep ' nm_test_func$' "$nlist" >/dev/null; then
3769           cat <<EOF > conftest.$ac_ext
3770 #ifdef __cplusplus
3771 extern "C" {
3772 #endif
3773
3774 EOF
3775           # Now generate the symbol file.
3776           eval "$lt_cv_global_symbol_to_cdecl"' < "$nlist" >> conftest.$ac_ext'
3777
3778           cat <<EOF >> conftest.$ac_ext
3779 #if defined (__STDC__) && __STDC__
3780 # define lt_ptr void *
3781 #else
3782 # define lt_ptr char *
3783 # define const
3784 #endif
3785
3786 /* The mapping between symbol names and symbols. */
3787 const struct {
3788   const char *name;
3789   lt_ptr address;
3790 }
3791 lt_preloaded_symbols[] =
3792 {
3793 EOF
3794           sed "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (lt_ptr) \&\2},/" < "$nlist" >> conftest.$ac_ext
3795           cat <<\EOF >> conftest.$ac_ext
3796   {0, (lt_ptr) 0}
3797 };
3798
3799 #ifdef __cplusplus
3800 }
3801 #endif
3802 EOF
3803           # Now try linking the two files.
3804           mv conftest.$ac_objext conftstm.$ac_objext
3805           save_LIBS="$LIBS"
3806           save_CFLAGS="$CFLAGS"
3807           LIBS="conftstm.$ac_objext"
3808           CFLAGS="$CFLAGS$no_builtin_flag"
3809           if { (eval echo configure:3810: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest$ac_exeext; then
3810             pipe_works=yes
3811           fi
3812           LIBS="$save_LIBS"
3813           CFLAGS="$save_CFLAGS"
3814         else
3815           echo "cannot find nm_test_func in $nlist" >&5
3816         fi
3817       else
3818         echo "cannot find nm_test_var in $nlist" >&5
3819       fi
3820     else
3821       echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5
3822     fi
3823   else
3824     echo "$progname: failed program was:" >&5
3825     cat conftest.$ac_ext >&5
3826   fi
3827   rm -f conftest* conftst*
3828
3829   # Do not use the global_symbol_pipe unless it works.
3830   if test "$pipe_works" = yes; then
3831     break
3832   else
3833     lt_cv_sys_global_symbol_pipe=
3834   fi
3835 done
3836
3837 fi
3838
3839 global_symbol_pipe="$lt_cv_sys_global_symbol_pipe"
3840 if test -z "$lt_cv_sys_global_symbol_pipe"; then
3841   global_symbol_to_cdecl=
3842   global_symbol_to_c_name_address=
3843 else
3844   global_symbol_to_cdecl="$lt_cv_global_symbol_to_cdecl"
3845   global_symbol_to_c_name_address="$lt_cv_global_symbol_to_c_name_address"
3846 fi
3847 if test -z "$global_symbol_pipe$global_symbol_to_cdec$global_symbol_to_c_name_address";
3848 then
3849   echo "$ac_t""failed" 1>&6
3850 else
3851   echo "$ac_t""ok" 1>&6
3852 fi
3853
3854 for ac_hdr in dlfcn.h
3855 do
3856 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3857 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3858 echo "configure:3859: checking for $ac_hdr" >&5
3859 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
3860   echo $ac_n "(cached) $ac_c" 1>&6
3861 else
3862   cat > conftest.$ac_ext <<EOF
3863 #line 3864 "configure"
3864 #include "confdefs.h"
3865 #include <$ac_hdr>
3866 EOF
3867 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3868 { (eval echo configure:3869: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3869 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3870 if test -z "$ac_err"; then
3871   rm -rf conftest*
3872   eval "ac_cv_header_$ac_safe=yes"
3873 else
3874   echo "$ac_err" >&5
3875   echo "configure: failed program was:" >&5
3876   cat conftest.$ac_ext >&5
3877   rm -rf conftest*
3878   eval "ac_cv_header_$ac_safe=no"
3879 fi
3880 rm -f conftest*
3881 fi
3882 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3883   echo "$ac_t""yes" 1>&6
3884     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3885   cat >> confdefs.h <<EOF
3886 #define $ac_tr_hdr 1
3887 EOF
3888  
3889 else
3890   echo "$ac_t""no" 1>&6
3891 fi
3892 done
3893
3894
3895
3896
3897
3898
3899 # Only perform the check for file, if the check method requires it
3900 case $deplibs_check_method in
3901 file_magic*)
3902   if test "$file_magic_cmd" = '$MAGIC_CMD'; then
3903     echo $ac_n "checking for ${ac_tool_prefix}file""... $ac_c" 1>&6
3904 echo "configure:3905: checking for ${ac_tool_prefix}file" >&5
3905 if eval "test \"\${lt_cv_path_MAGIC_CMD+set}\" = set"; then
3906   echo $ac_n "(cached) $ac_c" 1>&6
3907 else
3908   case $MAGIC_CMD in
3909   /*)
3910   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
3911   ;;
3912   ?:/*)
3913   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
3914   ;;
3915   *)
3916   ac_save_MAGIC_CMD="$MAGIC_CMD"
3917   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3918   ac_dummy="/usr/bin:$PATH"
3919   for ac_dir in $ac_dummy; do
3920     test -z "$ac_dir" && ac_dir=.
3921     if test -f $ac_dir/${ac_tool_prefix}file; then
3922       lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file"
3923       if test -n "$file_magic_test_file"; then
3924         case $deplibs_check_method in
3925         "file_magic "*)
3926           file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
3927           MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
3928           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
3929             egrep "$file_magic_regex" > /dev/null; then
3930             :
3931           else
3932             cat <<EOF 1>&2
3933
3934 *** Warning: the command libtool uses to detect shared libraries,
3935 *** $file_magic_cmd, produces output that libtool cannot recognize.
3936 *** The result is that libtool may fail to recognize shared libraries
3937 *** as such.  This will affect the creation of libtool libraries that
3938 *** depend on shared libraries, but programs linked with such libtool
3939 *** libraries will work regardless of this problem.  Nevertheless, you
3940 *** may want to report the problem to your system manager and/or to
3941 *** bug-libtool@gnu.org
3942
3943 EOF
3944           fi ;;
3945         esac
3946       fi
3947       break
3948     fi
3949   done
3950   IFS="$ac_save_ifs"
3951   MAGIC_CMD="$ac_save_MAGIC_CMD"
3952   ;;
3953 esac
3954 fi
3955
3956 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
3957 if test -n "$MAGIC_CMD"; then
3958   echo "$ac_t""$MAGIC_CMD" 1>&6
3959 else
3960   echo "$ac_t""no" 1>&6
3961 fi
3962
3963 if test -z "$lt_cv_path_MAGIC_CMD"; then
3964   if test -n "$ac_tool_prefix"; then
3965     echo $ac_n "checking for file""... $ac_c" 1>&6
3966 echo "configure:3967: checking for file" >&5
3967 if eval "test \"\${lt_cv_path_MAGIC_CMD+set}\" = set"; then
3968   echo $ac_n "(cached) $ac_c" 1>&6
3969 else
3970   case $MAGIC_CMD in
3971   /*)
3972   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
3973   ;;
3974   ?:/*)
3975   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
3976   ;;
3977   *)
3978   ac_save_MAGIC_CMD="$MAGIC_CMD"
3979   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3980   ac_dummy="/usr/bin:$PATH"
3981   for ac_dir in $ac_dummy; do
3982     test -z "$ac_dir" && ac_dir=.
3983     if test -f $ac_dir/file; then
3984       lt_cv_path_MAGIC_CMD="$ac_dir/file"
3985       if test -n "$file_magic_test_file"; then
3986         case $deplibs_check_method in
3987         "file_magic "*)
3988           file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
3989           MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
3990           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
3991             egrep "$file_magic_regex" > /dev/null; then
3992             :
3993           else
3994             cat <<EOF 1>&2
3995
3996 *** Warning: the command libtool uses to detect shared libraries,
3997 *** $file_magic_cmd, produces output that libtool cannot recognize.
3998 *** The result is that libtool may fail to recognize shared libraries
3999 *** as such.  This will affect the creation of libtool libraries that
4000 *** depend on shared libraries, but programs linked with such libtool
4001 *** libraries will work regardless of this problem.  Nevertheless, you
4002 *** may want to report the problem to your system manager and/or to
4003 *** bug-libtool@gnu.org
4004
4005 EOF
4006           fi ;;
4007         esac
4008       fi
4009       break
4010     fi
4011   done
4012   IFS="$ac_save_ifs"
4013   MAGIC_CMD="$ac_save_MAGIC_CMD"
4014   ;;
4015 esac
4016 fi
4017
4018 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4019 if test -n "$MAGIC_CMD"; then
4020   echo "$ac_t""$MAGIC_CMD" 1>&6
4021 else
4022   echo "$ac_t""no" 1>&6
4023 fi
4024
4025   else
4026     MAGIC_CMD=:
4027   fi
4028 fi
4029
4030   fi
4031   ;;
4032 esac
4033
4034 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4035 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
4036 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4037 echo "configure:4038: checking for $ac_word" >&5
4038 if eval "test \"\${ac_cv_prog_RANLIB+set}\" = set"; then
4039   echo $ac_n "(cached) $ac_c" 1>&6
4040 else
4041   if test -n "$RANLIB"; then
4042   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4043 else
4044   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4045   ac_dummy="$PATH"
4046   for ac_dir in $ac_dummy; do
4047     test -z "$ac_dir" && ac_dir=.
4048     if test -f $ac_dir/$ac_word; then
4049       ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4050       break
4051     fi
4052   done
4053   IFS="$ac_save_ifs"
4054 fi
4055 fi
4056 RANLIB="$ac_cv_prog_RANLIB"
4057 if test -n "$RANLIB"; then
4058   echo "$ac_t""$RANLIB" 1>&6
4059 else
4060   echo "$ac_t""no" 1>&6
4061 fi
4062
4063
4064 if test -z "$ac_cv_prog_RANLIB"; then
4065 if test -n "$ac_tool_prefix"; then
4066   # Extract the first word of "ranlib", so it can be a program name with args.
4067 set dummy ranlib; ac_word=$2
4068 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4069 echo "configure:4070: checking for $ac_word" >&5
4070 if eval "test \"\${ac_cv_prog_RANLIB+set}\" = set"; then
4071   echo $ac_n "(cached) $ac_c" 1>&6
4072 else
4073   if test -n "$RANLIB"; then
4074   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4075 else
4076   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4077   ac_dummy="$PATH"
4078   for ac_dir in $ac_dummy; do
4079     test -z "$ac_dir" && ac_dir=.
4080     if test -f $ac_dir/$ac_word; then
4081       ac_cv_prog_RANLIB="ranlib"
4082       break
4083     fi
4084   done
4085   IFS="$ac_save_ifs"
4086   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
4087 fi
4088 fi
4089 RANLIB="$ac_cv_prog_RANLIB"
4090 if test -n "$RANLIB"; then
4091   echo "$ac_t""$RANLIB" 1>&6
4092 else
4093   echo "$ac_t""no" 1>&6
4094 fi
4095
4096 else
4097   RANLIB=":"
4098 fi
4099 fi
4100
4101 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
4102 set dummy ${ac_tool_prefix}strip; ac_word=$2
4103 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4104 echo "configure:4105: checking for $ac_word" >&5
4105 if eval "test \"\${ac_cv_prog_STRIP+set}\" = set"; then
4106   echo $ac_n "(cached) $ac_c" 1>&6
4107 else
4108   if test -n "$STRIP"; then
4109   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
4110 else
4111   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4112   ac_dummy="$PATH"
4113   for ac_dir in $ac_dummy; do
4114     test -z "$ac_dir" && ac_dir=.
4115     if test -f $ac_dir/$ac_word; then
4116       ac_cv_prog_STRIP="${ac_tool_prefix}strip"
4117       break
4118     fi
4119   done
4120   IFS="$ac_save_ifs"
4121 fi
4122 fi
4123 STRIP="$ac_cv_prog_STRIP"
4124 if test -n "$STRIP"; then
4125   echo "$ac_t""$STRIP" 1>&6
4126 else
4127   echo "$ac_t""no" 1>&6
4128 fi
4129
4130
4131 if test -z "$ac_cv_prog_STRIP"; then
4132 if test -n "$ac_tool_prefix"; then
4133   # Extract the first word of "strip", so it can be a program name with args.
4134 set dummy strip; ac_word=$2
4135 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4136 echo "configure:4137: checking for $ac_word" >&5
4137 if eval "test \"\${ac_cv_prog_STRIP+set}\" = set"; then
4138   echo $ac_n "(cached) $ac_c" 1>&6
4139 else
4140   if test -n "$STRIP"; then
4141   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
4142 else
4143   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4144   ac_dummy="$PATH"
4145   for ac_dir in $ac_dummy; do
4146     test -z "$ac_dir" && ac_dir=.
4147     if test -f $ac_dir/$ac_word; then
4148       ac_cv_prog_STRIP="strip"
4149       break
4150     fi
4151   done
4152   IFS="$ac_save_ifs"
4153   test -z "$ac_cv_prog_STRIP" && ac_cv_prog_STRIP=":"
4154 fi
4155 fi
4156 STRIP="$ac_cv_prog_STRIP"
4157 if test -n "$STRIP"; then
4158   echo "$ac_t""$STRIP" 1>&6
4159 else
4160   echo "$ac_t""no" 1>&6
4161 fi
4162
4163 else
4164   STRIP=":"
4165 fi
4166 fi
4167
4168
4169 enable_dlopen=yes
4170 enable_win32_dll=yes
4171
4172 # Check whether --enable-libtool-lock or --disable-libtool-lock was given.
4173 if test "${enable_libtool_lock+set}" = set; then
4174   enableval="$enable_libtool_lock"
4175   :
4176 fi
4177
4178 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
4179
4180 # Some flags need to be propagated to the compiler or linker for good
4181 # libtool support.
4182 case $host in
4183 *-*-irix6*)
4184   # Find out which ABI we are using.
4185   echo '#line 4186 "configure"' > conftest.$ac_ext
4186   if { (eval echo configure:4187: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4187     case `/usr/bin/file conftest.$ac_objext` in
4188     *32-bit*)
4189       LD="${LD-ld} -32"
4190       ;;
4191     *N32*)
4192       LD="${LD-ld} -n32"
4193       ;;
4194     *64-bit*)
4195       LD="${LD-ld} -64"
4196       ;;
4197     esac
4198   fi
4199   rm -rf conftest*
4200   ;;
4201
4202 *-*-sco3.2v5*)
4203   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
4204   SAVE_CFLAGS="$CFLAGS"
4205   CFLAGS="$CFLAGS -belf"
4206   echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
4207 echo "configure:4208: checking whether the C compiler needs -belf" >&5
4208 if eval "test \"\${lt_cv_cc_needs_belf+set}\" = set"; then
4209   echo $ac_n "(cached) $ac_c" 1>&6
4210 else
4211   
4212      ac_ext=c
4213 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
4214 ac_cpp='$CPP $CPPFLAGS'
4215 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
4216 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
4217 cross_compiling=$ac_cv_prog_cc_cross
4218
4219      cat > conftest.$ac_ext <<EOF
4220 #line 4221 "configure"
4221 #include "confdefs.h"
4222
4223 int main() {
4224
4225 ; return 0; }
4226 EOF
4227 if { (eval echo configure:4228: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4228   rm -rf conftest*
4229   lt_cv_cc_needs_belf=yes
4230 else
4231   echo "configure: failed program was:" >&5
4232   cat conftest.$ac_ext >&5
4233   rm -rf conftest*
4234   lt_cv_cc_needs_belf=no
4235 fi
4236 rm -f conftest*
4237      ac_ext=c
4238 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
4239 ac_cpp='$CPP $CPPFLAGS'
4240 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
4241 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
4242 cross_compiling=$ac_cv_prog_cc_cross
4243
4244 fi
4245
4246 echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6
4247   if test x"$lt_cv_cc_needs_belf" != x"yes"; then
4248     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
4249     CFLAGS="$SAVE_CFLAGS"
4250   fi
4251   ;;
4252
4253 *-*-cygwin* | *-*-mingw* | *-*-pw32*)
4254   # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
4255 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
4256 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4257 echo "configure:4258: checking for $ac_word" >&5
4258 if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then
4259   echo $ac_n "(cached) $ac_c" 1>&6
4260 else
4261   if test -n "$DLLTOOL"; then
4262   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
4263 else
4264   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4265   ac_dummy="$PATH"
4266   for ac_dir in $ac_dummy; do
4267     test -z "$ac_dir" && ac_dir=.
4268     if test -f $ac_dir/$ac_word; then
4269       ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
4270       break
4271     fi
4272   done
4273   IFS="$ac_save_ifs"
4274 fi
4275 fi
4276 DLLTOOL="$ac_cv_prog_DLLTOOL"
4277 if test -n "$DLLTOOL"; then
4278   echo "$ac_t""$DLLTOOL" 1>&6
4279 else
4280   echo "$ac_t""no" 1>&6
4281 fi
4282
4283
4284 if test -z "$ac_cv_prog_DLLTOOL"; then
4285 if test -n "$ac_tool_prefix"; then
4286   # Extract the first word of "dlltool", so it can be a program name with args.
4287 set dummy dlltool; ac_word=$2
4288 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4289 echo "configure:4290: checking for $ac_word" >&5
4290 if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then
4291   echo $ac_n "(cached) $ac_c" 1>&6
4292 else
4293   if test -n "$DLLTOOL"; then
4294   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
4295 else
4296   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4297   ac_dummy="$PATH"
4298   for ac_dir in $ac_dummy; do
4299     test -z "$ac_dir" && ac_dir=.
4300     if test -f $ac_dir/$ac_word; then
4301       ac_cv_prog_DLLTOOL="dlltool"
4302       break
4303     fi
4304   done
4305   IFS="$ac_save_ifs"
4306   test -z "$ac_cv_prog_DLLTOOL" && ac_cv_prog_DLLTOOL="false"
4307 fi
4308 fi
4309 DLLTOOL="$ac_cv_prog_DLLTOOL"
4310 if test -n "$DLLTOOL"; then
4311   echo "$ac_t""$DLLTOOL" 1>&6
4312 else
4313   echo "$ac_t""no" 1>&6
4314 fi
4315
4316 else
4317   DLLTOOL="false"
4318 fi
4319 fi
4320
4321   # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
4322 set dummy ${ac_tool_prefix}as; ac_word=$2
4323 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4324 echo "configure:4325: checking for $ac_word" >&5
4325 if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then
4326   echo $ac_n "(cached) $ac_c" 1>&6
4327 else
4328   if test -n "$AS"; then
4329   ac_cv_prog_AS="$AS" # Let the user override the test.
4330 else
4331   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4332   ac_dummy="$PATH"
4333   for ac_dir in $ac_dummy; do
4334     test -z "$ac_dir" && ac_dir=.
4335     if test -f $ac_dir/$ac_word; then
4336       ac_cv_prog_AS="${ac_tool_prefix}as"
4337       break
4338     fi
4339   done
4340   IFS="$ac_save_ifs"
4341 fi
4342 fi
4343 AS="$ac_cv_prog_AS"
4344 if test -n "$AS"; then
4345   echo "$ac_t""$AS" 1>&6
4346 else
4347   echo "$ac_t""no" 1>&6
4348 fi
4349
4350
4351 if test -z "$ac_cv_prog_AS"; then
4352 if test -n "$ac_tool_prefix"; then
4353   # Extract the first word of "as", so it can be a program name with args.
4354 set dummy as; ac_word=$2
4355 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4356 echo "configure:4357: checking for $ac_word" >&5
4357 if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then
4358   echo $ac_n "(cached) $ac_c" 1>&6
4359 else
4360   if test -n "$AS"; then
4361   ac_cv_prog_AS="$AS" # Let the user override the test.
4362 else
4363   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4364   ac_dummy="$PATH"
4365   for ac_dir in $ac_dummy; do
4366     test -z "$ac_dir" && ac_dir=.
4367     if test -f $ac_dir/$ac_word; then
4368       ac_cv_prog_AS="as"
4369       break
4370     fi
4371   done
4372   IFS="$ac_save_ifs"
4373   test -z "$ac_cv_prog_AS" && ac_cv_prog_AS="false"
4374 fi
4375 fi
4376 AS="$ac_cv_prog_AS"
4377 if test -n "$AS"; then
4378   echo "$ac_t""$AS" 1>&6
4379 else
4380   echo "$ac_t""no" 1>&6
4381 fi
4382
4383 else
4384   AS="false"
4385 fi
4386 fi
4387
4388   # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
4389 set dummy ${ac_tool_prefix}objdump; ac_word=$2
4390 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4391 echo "configure:4392: checking for $ac_word" >&5
4392 if eval "test \"\${ac_cv_prog_OBJDUMP+set}\" = set"; then
4393   echo $ac_n "(cached) $ac_c" 1>&6
4394 else
4395   if test -n "$OBJDUMP"; then
4396   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
4397 else
4398   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4399   ac_dummy="$PATH"
4400   for ac_dir in $ac_dummy; do
4401     test -z "$ac_dir" && ac_dir=.
4402     if test -f $ac_dir/$ac_word; then
4403       ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
4404       break
4405     fi
4406   done
4407   IFS="$ac_save_ifs"
4408 fi
4409 fi
4410 OBJDUMP="$ac_cv_prog_OBJDUMP"
4411 if test -n "$OBJDUMP"; then
4412   echo "$ac_t""$OBJDUMP" 1>&6
4413 else
4414   echo "$ac_t""no" 1>&6
4415 fi
4416
4417
4418 if test -z "$ac_cv_prog_OBJDUMP"; then
4419 if test -n "$ac_tool_prefix"; then
4420   # Extract the first word of "objdump", so it can be a program name with args.
4421 set dummy objdump; ac_word=$2
4422 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4423 echo "configure:4424: checking for $ac_word" >&5
4424 if eval "test \"\${ac_cv_prog_OBJDUMP+set}\" = set"; then
4425   echo $ac_n "(cached) $ac_c" 1>&6
4426 else
4427   if test -n "$OBJDUMP"; then
4428   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
4429 else
4430   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4431   ac_dummy="$PATH"
4432   for ac_dir in $ac_dummy; do
4433     test -z "$ac_dir" && ac_dir=.
4434     if test -f $ac_dir/$ac_word; then
4435       ac_cv_prog_OBJDUMP="objdump"
4436       break
4437     fi
4438   done
4439   IFS="$ac_save_ifs"
4440   test -z "$ac_cv_prog_OBJDUMP" && ac_cv_prog_OBJDUMP="false"
4441 fi
4442 fi
4443 OBJDUMP="$ac_cv_prog_OBJDUMP"
4444 if test -n "$OBJDUMP"; then
4445   echo "$ac_t""$OBJDUMP" 1>&6
4446 else
4447   echo "$ac_t""no" 1>&6
4448 fi
4449
4450 else
4451   OBJDUMP="false"
4452 fi
4453 fi
4454
4455
4456   # recent cygwin and mingw systems supply a stub DllMain which the user
4457   # can override, but on older systems we have to supply one
4458   echo $ac_n "checking if libtool should supply DllMain function""... $ac_c" 1>&6
4459 echo "configure:4460: checking if libtool should supply DllMain function" >&5
4460 if eval "test \"\${lt_cv_need_dllmain+set}\" = set"; then
4461   echo $ac_n "(cached) $ac_c" 1>&6
4462 else
4463   cat > conftest.$ac_ext <<EOF
4464 #line 4465 "configure"
4465 #include "confdefs.h"
4466
4467 int main() {
4468 extern int __attribute__((__stdcall__)) DllMain(void*, int, void*);
4469       DllMain (0, 0, 0);
4470 ; return 0; }
4471 EOF
4472 if { (eval echo configure:4473: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4473   rm -rf conftest*
4474   lt_cv_need_dllmain=no
4475 else
4476   echo "configure: failed program was:" >&5
4477   cat conftest.$ac_ext >&5
4478   rm -rf conftest*
4479   lt_cv_need_dllmain=yes
4480 fi
4481 rm -f conftest*
4482 fi
4483
4484 echo "$ac_t""$lt_cv_need_dllmain" 1>&6
4485
4486   case $host/$CC in
4487   *-*-cygwin*/gcc*-mno-cygwin*|*-*-mingw*)
4488     # old mingw systems require "-dll" to link a DLL, while more recent ones
4489     # require "-mdll"
4490     SAVE_CFLAGS="$CFLAGS"
4491     CFLAGS="$CFLAGS -mdll"
4492     echo $ac_n "checking how to link DLLs""... $ac_c" 1>&6
4493 echo "configure:4494: checking how to link DLLs" >&5
4494 if eval "test \"\${lt_cv_cc_dll_switch+set}\" = set"; then
4495   echo $ac_n "(cached) $ac_c" 1>&6
4496 else
4497   cat > conftest.$ac_ext <<EOF
4498 #line 4499 "configure"
4499 #include "confdefs.h"
4500
4501 int main() {
4502
4503 ; return 0; }
4504 EOF
4505 if { (eval echo configure:4506: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4506   rm -rf conftest*
4507   lt_cv_cc_dll_switch=-mdll
4508 else
4509   echo "configure: failed program was:" >&5
4510   cat conftest.$ac_ext >&5
4511   rm -rf conftest*
4512   lt_cv_cc_dll_switch=-dll
4513 fi
4514 rm -f conftest*
4515 fi
4516
4517 echo "$ac_t""$lt_cv_cc_dll_switch" 1>&6
4518     CFLAGS="$SAVE_CFLAGS" ;;
4519   *-*-cygwin* | *-*-pw32*)
4520     # cygwin systems need to pass --dll to the linker, and not link
4521     # crt.o which will require a WinMain@16 definition.
4522     lt_cv_cc_dll_switch="-Wl,--dll -nostartfiles" ;;
4523   esac
4524   ;;
4525   
4526 esac
4527
4528 # Sed substitution that helps us do robust quoting.  It backslashifies
4529 # metacharacters that are still active within double-quoted strings.
4530 Xsed='sed -e s/^X//'
4531 sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g'
4532
4533 # Same as above, but do not quote variable references.
4534 double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g'
4535
4536 # Sed substitution to delay expansion of an escaped shell variable in a
4537 # double_quote_subst'ed string.
4538 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
4539
4540 # Constants:
4541 rm="rm -f"
4542
4543 # Global variables:
4544 default_ofile=libtool
4545 can_build_shared=yes
4546
4547 # All known linkers require a `.a' archive for static linking (except M$VC,
4548 # which needs '.lib').
4549 libext=a
4550 ltmain="$ac_aux_dir/ltmain.sh"
4551 ofile="$default_ofile"
4552 with_gnu_ld="$lt_cv_prog_gnu_ld"
4553 need_locks="$enable_libtool_lock"
4554
4555 old_CC="$CC"
4556 old_CFLAGS="$CFLAGS"
4557
4558 # Set sane defaults for various variables
4559 test -z "$AR" && AR=ar
4560 test -z "$AR_FLAGS" && AR_FLAGS=cru
4561 test -z "$AS" && AS=as
4562 test -z "$CC" && CC=cc
4563 test -z "$DLLTOOL" && DLLTOOL=dlltool
4564 test -z "$LD" && LD=ld
4565 test -z "$LN_S" && LN_S="ln -s"
4566 test -z "$MAGIC_CMD" && MAGIC_CMD=file
4567 test -z "$NM" && NM=nm
4568 test -z "$OBJDUMP" && OBJDUMP=objdump
4569 test -z "$RANLIB" && RANLIB=:
4570 test -z "$STRIP" && STRIP=:
4571 test -z "$ac_objext" && ac_objext=o
4572
4573 if test x"$host" != x"$build"; then
4574   ac_tool_prefix=${host_alias}-
4575 else
4576   ac_tool_prefix=
4577 fi
4578
4579 # Transform linux* to *-*-linux-gnu*, to support old configure scripts.
4580 case $host_os in
4581 linux-gnu*) ;;
4582 linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
4583 esac
4584
4585 case $host_os in
4586 aix3*)
4587   # AIX sometimes has problems with the GCC collect2 program.  For some
4588   # reason, if we set the COLLECT_NAMES environment variable, the problems
4589   # vanish in a puff of smoke.
4590   if test "X${COLLECT_NAMES+set}" != Xset; then
4591     COLLECT_NAMES=
4592     export COLLECT_NAMES
4593   fi
4594   ;;
4595 esac
4596
4597 # Determine commands to create old-style static archives.
4598 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
4599 old_postinstall_cmds='chmod 644 $oldlib'
4600 old_postuninstall_cmds=
4601
4602 if test -n "$RANLIB"; then
4603   case $host_os in
4604   openbsd*)
4605     old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds"
4606     ;;
4607   *)
4608     old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
4609     ;;
4610   esac
4611   old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
4612 fi
4613
4614 # Allow CC to be a program name with arguments.
4615 set dummy $CC
4616 compiler="$2"
4617
4618 echo $ac_n "checking for objdir""... $ac_c" 1>&6
4619 echo "configure:4620: checking for objdir" >&5
4620 rm -f .libs 2>/dev/null
4621 mkdir .libs 2>/dev/null
4622 if test -d .libs; then
4623   objdir=.libs
4624 else
4625   # MS-DOS does not allow filenames that begin with a dot.
4626   objdir=_libs
4627 fi
4628 rmdir .libs 2>/dev/null
4629 echo "$ac_t""$objdir" 1>&6
4630
4631
4632 # Check whether --with-pic or --without-pic was given.
4633 if test "${with_pic+set}" = set; then
4634   withval="$with_pic"
4635   pic_mode="$withval"
4636 else
4637   pic_mode=default
4638 fi
4639
4640 test -z "$pic_mode" && pic_mode=default
4641
4642 # We assume here that the value for lt_cv_prog_cc_pic will not be cached
4643 # in isolation, and that seeing it set (from the cache) indicates that
4644 # the associated values are set (in the cache) correctly too.
4645 echo $ac_n "checking for $compiler option to produce PIC""... $ac_c" 1>&6
4646 echo "configure:4647: checking for $compiler option to produce PIC" >&5
4647 if eval "test \"\${lt_cv_prog_cc_pic+set}\" = set"; then
4648   echo $ac_n "(cached) $ac_c" 1>&6
4649 else
4650    lt_cv_prog_cc_pic=
4651   lt_cv_prog_cc_shlib=
4652   lt_cv_prog_cc_wl=
4653   lt_cv_prog_cc_static=
4654   lt_cv_prog_cc_no_builtin=
4655   lt_cv_prog_cc_can_build_shared=$can_build_shared
4656
4657   if test "$GCC" = yes; then
4658     lt_cv_prog_cc_wl='-Wl,'
4659     lt_cv_prog_cc_static='-static'
4660
4661     case $host_os in
4662     aix*)
4663       # Below there is a dirty hack to force normal static linking with -ldl
4664       # The problem is because libdl dynamically linked with both libc and
4665       # libC (AIX C++ library), which obviously doesn't included in libraries
4666       # list by gcc. This cause undefined symbols with -static flags.
4667       # This hack allows C programs to be linked with "-static -ldl", but
4668       # not sure about C++ programs.
4669       lt_cv_prog_cc_static="$lt_cv_prog_cc_static ${lt_cv_prog_cc_wl}-lC"
4670       ;;
4671     amigaos*)
4672       # FIXME: we need at least 68020 code to build shared libraries, but
4673       # adding the `-m68020' flag to GCC prevents building anything better,
4674       # like `-m68040'.
4675       lt_cv_prog_cc_pic='-m68020 -resident32 -malways-restore-a4'
4676       ;;
4677     beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
4678       # PIC is the default for these OSes.
4679       ;;
4680     darwin* | rhapsody*)
4681       # PIC is the default on this platform
4682       # Common symbols not allowed in MH_DYLIB files
4683       lt_cv_prog_cc_pic='-fno-common'
4684       ;;
4685     cygwin* | mingw* | pw32* | os2*)
4686       # This hack is so that the source file can tell whether it is being
4687       # built for inclusion in a dll (and should export symbols for example).
4688       lt_cv_prog_cc_pic='-DDLL_EXPORT'
4689       ;;
4690     sysv4*MP*)
4691       if test -d /usr/nec; then
4692          lt_cv_prog_cc_pic=-Kconform_pic
4693       fi
4694       ;;
4695     *)
4696       lt_cv_prog_cc_pic='-fPIC'
4697       ;;
4698     esac
4699   else
4700     # PORTME Check for PIC flags for the system compiler.
4701     case $host_os in
4702     aix3* | aix4* | aix5*)
4703       lt_cv_prog_cc_wl='-Wl,'
4704       # All AIX code is PIC.
4705       if test "$host_cpu" = ia64; then
4706         # AIX 5 now supports IA64 processor
4707         lt_cv_prog_cc_static='-Bstatic'
4708       else
4709         lt_cv_prog_cc_static='-bnso -bI:/lib/syscalls.exp'
4710       fi
4711       ;;
4712
4713     hpux9* | hpux10* | hpux11*)
4714       # Is there a better lt_cv_prog_cc_static that works with the bundled CC?
4715       lt_cv_prog_cc_wl='-Wl,'
4716       lt_cv_prog_cc_static="${lt_cv_prog_cc_wl}-a ${lt_cv_prog_cc_wl}archive"
4717       lt_cv_prog_cc_pic='+Z'
4718       ;;
4719
4720     irix5* | irix6* | nonstopux*)
4721       lt_cv_prog_cc_wl='-Wl,'
4722       lt_cv_prog_cc_static='-non_shared'
4723       # PIC (with -KPIC) is the default.
4724       ;;
4725
4726     cygwin* | mingw* | pw32* | os2*)
4727       # This hack is so that the source file can tell whether it is being
4728       # built for inclusion in a dll (and should export symbols for example).
4729       lt_cv_prog_cc_pic='-DDLL_EXPORT'
4730       ;;
4731
4732     newsos6)
4733       lt_cv_prog_cc_pic='-KPIC'
4734       lt_cv_prog_cc_static='-Bstatic'
4735       ;;
4736     
4737     openedition)
4738       # XPLINK code is PIC by default
4739       ;;
4740
4741     osf3* | osf4* | osf5*)
4742       # All OSF/1 code is PIC.
4743       lt_cv_prog_cc_wl='-Wl,'
4744       lt_cv_prog_cc_static='-non_shared'
4745       ;;
4746
4747     sco3.2v5*)
4748       lt_cv_prog_cc_pic='-Kpic'
4749       lt_cv_prog_cc_static='-dn'
4750       lt_cv_prog_cc_shlib='-belf'
4751       ;;
4752
4753     solaris*)
4754       lt_cv_prog_cc_pic='-KPIC'
4755       lt_cv_prog_cc_static='-Bstatic'
4756       lt_cv_prog_cc_wl='-Wl,'
4757       ;;
4758
4759     sunos4*)
4760       lt_cv_prog_cc_pic='-PIC'
4761       lt_cv_prog_cc_static='-Bstatic'
4762       lt_cv_prog_cc_wl='-Qoption ld '
4763       ;;
4764
4765     sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
4766       lt_cv_prog_cc_pic='-KPIC'
4767       lt_cv_prog_cc_static='-Bstatic'
4768       lt_cv_prog_cc_wl='-Wl,'
4769       ;;
4770
4771     uts4*)
4772       lt_cv_prog_cc_pic='-pic'
4773       lt_cv_prog_cc_static='-Bstatic'
4774       ;;
4775
4776     sysv4*MP*)
4777       if test -d /usr/nec ;then
4778         lt_cv_prog_cc_pic='-Kconform_pic'
4779         lt_cv_prog_cc_static='-Bstatic'
4780       fi
4781       ;;
4782
4783     *)
4784       lt_cv_prog_cc_can_build_shared=no
4785       ;;
4786     esac
4787   fi
4788
4789 fi
4790
4791 if test -z "$lt_cv_prog_cc_pic"; then
4792   echo "$ac_t""none" 1>&6
4793 else
4794   echo "$ac_t""$lt_cv_prog_cc_pic" 1>&6
4795
4796   # Check to make sure the pic_flag actually works.
4797   echo $ac_n "checking if $compiler PIC flag $lt_cv_prog_cc_pic works""... $ac_c" 1>&6
4798 echo "configure:4799: checking if $compiler PIC flag $lt_cv_prog_cc_pic works" >&5
4799   if eval "test \"\${lt_cv_prog_cc_pic_works+set}\" = set"; then
4800   echo $ac_n "(cached) $ac_c" 1>&6
4801 else
4802       save_CFLAGS="$CFLAGS"
4803     CFLAGS="$CFLAGS $lt_cv_prog_cc_pic -DPIC"
4804     cat > conftest.$ac_ext <<EOF
4805 #line 4806 "configure"
4806 #include "confdefs.h"
4807
4808 int main() {
4809
4810 ; return 0; }
4811 EOF
4812 if { (eval echo configure:4813: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4813   rm -rf conftest*
4814         case $host_os in
4815       hpux9* | hpux10* | hpux11*)
4816         # On HP-UX, both CC and GCC only warn that PIC is supported... then
4817         # they create non-PIC objects.  So, if there were any warnings, we
4818         # assume that PIC is not supported.
4819         if test -s conftest.err; then
4820           lt_cv_prog_cc_pic_works=no
4821         else
4822           lt_cv_prog_cc_pic_works=yes
4823         fi
4824         ;;
4825       *)
4826         lt_cv_prog_cc_pic_works=yes
4827         ;;
4828       esac
4829     
4830 else
4831   echo "configure: failed program was:" >&5
4832   cat conftest.$ac_ext >&5
4833   rm -rf conftest*
4834         lt_cv_prog_cc_pic_works=no
4835     
4836 fi
4837 rm -f conftest*
4838     CFLAGS="$save_CFLAGS"
4839   
4840 fi
4841
4842
4843   if test "X$lt_cv_prog_cc_pic_works" = Xno; then
4844     lt_cv_prog_cc_pic=
4845     lt_cv_prog_cc_can_build_shared=no
4846   else
4847     lt_cv_prog_cc_pic=" $lt_cv_prog_cc_pic"
4848   fi
4849
4850   echo "$ac_t""$lt_cv_prog_cc_pic_works" 1>&6
4851 fi
4852
4853 # Check for any special shared library compilation flags.
4854 if test -n "$lt_cv_prog_cc_shlib"; then
4855   echo "configure: warning: \`$CC' requires \`$lt_cv_prog_cc_shlib' to build shared libraries" 1>&2
4856   if echo "$old_CC $old_CFLAGS " | egrep -e "[  ]$lt_cv_prog_cc_shlib[  ]" >/dev/null; then :
4857   else
4858    echo "configure: warning: add \`$lt_cv_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure" 1>&2
4859     lt_cv_prog_cc_can_build_shared=no
4860   fi
4861 fi
4862
4863 echo $ac_n "checking if $compiler static flag $lt_cv_prog_cc_static works""... $ac_c" 1>&6
4864 echo "configure:4865: checking if $compiler static flag $lt_cv_prog_cc_static works" >&5
4865 if eval "test \"\${lt_cv_prog_cc_static_works+set}\" = set"; then
4866   echo $ac_n "(cached) $ac_c" 1>&6
4867 else
4868     lt_cv_prog_cc_static_works=no
4869   save_LDFLAGS="$LDFLAGS"
4870   LDFLAGS="$LDFLAGS $lt_cv_prog_cc_static"
4871   cat > conftest.$ac_ext <<EOF
4872 #line 4873 "configure"
4873 #include "confdefs.h"
4874
4875 int main() {
4876
4877 ; return 0; }
4878 EOF
4879 if { (eval echo configure:4880: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4880   rm -rf conftest*
4881   lt_cv_prog_cc_static_works=yes
4882 else
4883   echo "configure: failed program was:" >&5
4884   cat conftest.$ac_ext >&5
4885 fi
4886 rm -f conftest*
4887   LDFLAGS="$save_LDFLAGS"
4888
4889 fi
4890
4891
4892 # Belt *and* braces to stop my trousers falling down:
4893 test "X$lt_cv_prog_cc_static_works" = Xno && lt_cv_prog_cc_static=
4894 echo "$ac_t""$lt_cv_prog_cc_static_works" 1>&6
4895
4896 pic_flag="$lt_cv_prog_cc_pic"
4897 special_shlib_compile_flags="$lt_cv_prog_cc_shlib"
4898 wl="$lt_cv_prog_cc_wl"
4899 link_static_flag="$lt_cv_prog_cc_static"
4900 no_builtin_flag="$lt_cv_prog_cc_no_builtin"
4901 can_build_shared="$lt_cv_prog_cc_can_build_shared"
4902
4903
4904 # Check to see if options -o and -c are simultaneously supported by compiler
4905 echo $ac_n "checking if $compiler supports -c -o file.$ac_objext""... $ac_c" 1>&6
4906 echo "configure:4907: checking if $compiler supports -c -o file.$ac_objext" >&5
4907 if eval "test \"\${lt_cv_compiler_c_o+set}\" = set"; then
4908   echo $ac_n "(cached) $ac_c" 1>&6
4909 else
4910   
4911 $rm -r conftest 2>/dev/null
4912 mkdir conftest
4913 cd conftest
4914 echo "int some_variable = 0;" > conftest.$ac_ext
4915 mkdir out
4916 # According to Tom Tromey, Ian Lance Taylor reported there are C compilers
4917 # that will create temporary files in the current directory regardless of
4918 # the output directory.  Thus, making CWD read-only will cause this test
4919 # to fail, enabling locking or at least warning the user not to do parallel
4920 # builds.
4921 chmod -w .
4922 save_CFLAGS="$CFLAGS"
4923 CFLAGS="$CFLAGS -o out/conftest2.$ac_objext"
4924 compiler_c_o=no
4925 if { (eval echo configure:4926: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then
4926   # The compiler can only warn and ignore the option if not recognized
4927   # So say no if there are warnings
4928   if test -s out/conftest.err; then
4929     lt_cv_compiler_c_o=no
4930   else
4931     lt_cv_compiler_c_o=yes
4932   fi
4933 else
4934   # Append any errors to the config.log.
4935   cat out/conftest.err 1>&5
4936   lt_cv_compiler_c_o=no
4937 fi
4938 CFLAGS="$save_CFLAGS"
4939 chmod u+w .
4940 $rm conftest* out/*
4941 rmdir out
4942 cd ..
4943 rmdir conftest
4944 $rm -r conftest 2>/dev/null
4945
4946 fi
4947
4948 compiler_c_o=$lt_cv_compiler_c_o
4949 echo "$ac_t""$compiler_c_o" 1>&6
4950
4951 if test x"$compiler_c_o" = x"yes"; then
4952   # Check to see if we can write to a .lo
4953   echo $ac_n "checking if $compiler supports -c -o file.lo""... $ac_c" 1>&6
4954 echo "configure:4955: checking if $compiler supports -c -o file.lo" >&5
4955   if eval "test \"\${lt_cv_compiler_o_lo+set}\" = set"; then
4956   echo $ac_n "(cached) $ac_c" 1>&6
4957 else
4958   
4959   lt_cv_compiler_o_lo=no
4960   save_CFLAGS="$CFLAGS"
4961   CFLAGS="$CFLAGS -c -o conftest.lo"
4962   save_objext="$ac_objext"
4963   ac_objext=lo
4964   cat > conftest.$ac_ext <<EOF
4965 #line 4966 "configure"
4966 #include "confdefs.h"
4967
4968 int main() {
4969 int some_variable = 0;
4970 ; return 0; }
4971 EOF
4972 if { (eval echo configure:4973: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4973   rm -rf conftest*
4974       # The compiler can only warn and ignore the option if not recognized
4975     # So say no if there are warnings
4976     if test -s conftest.err; then
4977       lt_cv_compiler_o_lo=no
4978     else
4979       lt_cv_compiler_o_lo=yes
4980     fi
4981   
4982 else
4983   echo "configure: failed program was:" >&5
4984   cat conftest.$ac_ext >&5
4985 fi
4986 rm -f conftest*
4987   ac_objext="$save_objext"
4988   CFLAGS="$save_CFLAGS"
4989   
4990 fi
4991
4992   compiler_o_lo=$lt_cv_compiler_o_lo
4993   echo "$ac_t""$compiler_o_lo" 1>&6
4994 else
4995   compiler_o_lo=no
4996 fi
4997
4998 # Check to see if we can do hard links to lock some files if needed
4999 hard_links="nottested"
5000 if test "$compiler_c_o" = no && test "$need_locks" != no; then
5001   # do not overwrite the value of need_locks provided by the user
5002   echo $ac_n "checking if we can lock with hard links""... $ac_c" 1>&6
5003 echo "configure:5004: checking if we can lock with hard links" >&5
5004   hard_links=yes
5005   $rm conftest*
5006   ln conftest.a conftest.b 2>/dev/null && hard_links=no
5007   touch conftest.a
5008   ln conftest.a conftest.b 2>&5 || hard_links=no
5009   ln conftest.a conftest.b 2>/dev/null && hard_links=no
5010   echo "$ac_t""$hard_links" 1>&6
5011   if test "$hard_links" = no; then
5012     echo "configure: warning: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" 1>&2
5013     need_locks=warn
5014   fi
5015 else
5016   need_locks=no
5017 fi
5018
5019 if test "$GCC" = yes; then
5020   # Check to see if options -fno-rtti -fno-exceptions are supported by compiler
5021   echo $ac_n "checking if $compiler supports -fno-rtti -fno-exceptions""... $ac_c" 1>&6
5022 echo "configure:5023: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
5023   echo "int some_variable = 0;" > conftest.$ac_ext
5024   save_CFLAGS="$CFLAGS"
5025   CFLAGS="$CFLAGS -fno-rtti -fno-exceptions -c conftest.$ac_ext"
5026   compiler_rtti_exceptions=no
5027   cat > conftest.$ac_ext <<EOF
5028 #line 5029 "configure"
5029 #include "confdefs.h"
5030
5031 int main() {
5032 int some_variable = 0;
5033 ; return 0; }
5034 EOF
5035 if { (eval echo configure:5036: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5036   rm -rf conftest*
5037       # The compiler can only warn and ignore the option if not recognized
5038     # So say no if there are warnings
5039     if test -s conftest.err; then
5040       compiler_rtti_exceptions=no
5041     else
5042       compiler_rtti_exceptions=yes
5043     fi
5044   
5045 else
5046   echo "configure: failed program was:" >&5
5047   cat conftest.$ac_ext >&5
5048 fi
5049 rm -f conftest*
5050   CFLAGS="$save_CFLAGS"
5051   echo "$ac_t""$compiler_rtti_exceptions" 1>&6
5052
5053   if test "$compiler_rtti_exceptions" = "yes"; then
5054     no_builtin_flag=' -fno-builtin -fno-rtti -fno-exceptions'
5055   else
5056     no_builtin_flag=' -fno-builtin'
5057   fi
5058 fi
5059
5060 # See if the linker supports building shared libraries.
5061 echo $ac_n "checking whether the linker ($LD) supports shared libraries""... $ac_c" 1>&6
5062 echo "configure:5063: checking whether the linker ($LD) supports shared libraries" >&5
5063
5064 allow_undefined_flag=
5065 no_undefined_flag=
5066 need_lib_prefix=unknown
5067 need_version=unknown
5068 # when you set need_version to no, make sure it does not cause -set_version
5069 # flags to be left without arguments
5070 archive_cmds=
5071 archive_expsym_cmds=
5072 old_archive_from_new_cmds=
5073 old_archive_from_expsyms_cmds=
5074 export_dynamic_flag_spec=
5075 whole_archive_flag_spec=
5076 thread_safe_flag_spec=
5077 hardcode_into_libs=no
5078 hardcode_libdir_flag_spec=
5079 hardcode_libdir_separator=
5080 hardcode_direct=no
5081 hardcode_minus_L=no
5082 hardcode_shlibpath_var=unsupported
5083 runpath_var=
5084 link_all_deplibs=unknown
5085 always_export_symbols=no
5086 export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols'
5087 # include_expsyms should be a list of space-separated symbols to be *always*
5088 # included in the symbol list
5089 include_expsyms=
5090 # exclude_expsyms can be an egrep regular expression of symbols to exclude
5091 # it will be wrapped by ` (' and `)$', so one must not match beginning or
5092 # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
5093 # as well as any symbol that contains `d'.
5094 exclude_expsyms="_GLOBAL_OFFSET_TABLE_"
5095 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
5096 # platforms (ab)use it in PIC code, but their linkers get confused if
5097 # the symbol is explicitly referenced.  Since portable code cannot
5098 # rely on this symbol name, it's probably fine to never include it in
5099 # preloaded symbol tables.
5100 extract_expsyms_cmds=
5101
5102 case $host_os in
5103 cygwin* | mingw* | pw32*)
5104   # FIXME: the MSVC++ port hasn't been tested in a loooong time
5105   # When not using gcc, we currently assume that we are using
5106   # Microsoft Visual C++.
5107   if test "$GCC" != yes; then
5108     with_gnu_ld=no
5109   fi
5110   ;;
5111 openbsd*)
5112   with_gnu_ld=no
5113   ;;
5114 esac
5115
5116 ld_shlibs=yes
5117 if test "$with_gnu_ld" = yes; then
5118   # If archive_cmds runs LD, not CC, wlarc should be empty
5119   wlarc='${wl}'
5120
5121   # See if GNU ld supports shared libraries.
5122   case $host_os in
5123   aix3* | aix4* | aix5*)
5124     # On AIX, the GNU linker is very broken
5125     # Note:Check GNU linker on AIX 5-IA64 when/if it becomes available.
5126     ld_shlibs=no
5127     cat <<EOF 1>&2
5128
5129 *** Warning: the GNU linker, at least up to release 2.9.1, is reported
5130 *** to be unable to reliably create shared libraries on AIX.
5131 *** Therefore, libtool is disabling shared libraries support.  If you
5132 *** really care for shared libraries, you may want to modify your PATH
5133 *** so that a non-GNU linker is found, and then restart.
5134
5135 EOF
5136     ;;
5137
5138   amigaos*)
5139     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)'
5140     hardcode_libdir_flag_spec='-L$libdir'
5141     hardcode_minus_L=yes
5142
5143     # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
5144     # that the semantics of dynamic libraries on AmigaOS, at least up
5145     # to version 4, is to share data among multiple programs linked
5146     # with the same dynamic library.  Since this doesn't match the
5147     # behavior of shared libraries on other platforms, we can use
5148     # them.
5149     ld_shlibs=no
5150     ;;
5151
5152   beos*)
5153     if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
5154       allow_undefined_flag=unsupported
5155       # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
5156       # support --undefined.  This deserves some investigation.  FIXME
5157       archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5158     else
5159       ld_shlibs=no
5160     fi
5161     ;;
5162
5163   cygwin* | mingw* | pw32*)
5164     # hardcode_libdir_flag_spec is actually meaningless, as there is
5165     # no search path for DLLs.
5166     hardcode_libdir_flag_spec='-L$libdir'
5167     allow_undefined_flag=unsupported
5168     always_export_symbols=yes
5169
5170     extract_expsyms_cmds='test -f $output_objdir/impgen.c || \
5171       sed -e "/^# \/\* impgen\.c starts here \*\//,/^# \/\* impgen.c ends here \*\// { s/^# //;s/^# *$//; p; }" -e d < $''0 > $output_objdir/impgen.c~
5172       test -f $output_objdir/impgen.exe || (cd $output_objdir && \
5173       if test "x$HOST_CC" != "x" ; then $HOST_CC -o impgen impgen.c ; \
5174       else $CC -o impgen impgen.c ; fi)~
5175       $output_objdir/impgen $dir/$soroot > $output_objdir/$soname-def'
5176
5177     old_archive_from_expsyms_cmds='$DLLTOOL --as=$AS --dllname $soname --def $output_objdir/$soname-def --output-lib $output_objdir/$newlib'
5178
5179     # cygwin and mingw dlls have different entry points and sets of symbols
5180     # to exclude.
5181     # FIXME: what about values for MSVC?
5182     dll_entry=__cygwin_dll_entry@12
5183     dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12~
5184     case $host_os in
5185     mingw*)
5186       # mingw values
5187       dll_entry=_DllMainCRTStartup@12
5188       dll_exclude_symbols=DllMain@12,DllMainCRTStartup@12,DllEntryPoint@12~
5189       ;;
5190     esac
5191
5192     # mingw and cygwin differ, and it's simplest to just exclude the union
5193     # of the two symbol sets.
5194     dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12,DllMainCRTStartup@12,DllEntryPoint@12
5195
5196     # recent cygwin and mingw systems supply a stub DllMain which the user
5197     # can override, but on older systems we have to supply one (in ltdll.c)
5198     if test "x$lt_cv_need_dllmain" = "xyes"; then
5199       ltdll_obj='$output_objdir/$soname-ltdll.'"$ac_objext "
5200       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~
5201         test -f $output_objdir/$soname-ltdll.$ac_objext || (cd $output_objdir && $CC -c $soname-ltdll.c)~'
5202     else
5203       ltdll_obj=
5204       ltdll_cmds=
5205     fi
5206
5207     # Extract the symbol export list from an `--export-all' def file,
5208     # then regenerate the def file from the symbol export list, so that
5209     # the compiled dll only exports the symbol export list.
5210     # Be careful not to strip the DATA tag left be newer dlltools.
5211     export_symbols_cmds="$ltdll_cmds"'
5212       $DLLTOOL --export-all --exclude-symbols '$dll_exclude_symbols' --output-def $output_objdir/$soname-def '$ltdll_obj'$libobjs $convenience~
5213       sed -e "1,/EXPORTS/d" -e "s/ @ [0-9]*//" -e "s/ *;.*$//" < $output_objdir/$soname-def > $export_symbols'
5214
5215     # If the export-symbols file already is a .def file (1st line
5216     # is EXPORTS), use it as is.
5217     # If DATA tags from a recent dlltool are present, honour them!
5218     archive_expsym_cmds='if test "x`sed 1q $export_symbols`" = xEXPORTS; then
5219         cp $export_symbols $output_objdir/$soname-def;
5220       else
5221         echo EXPORTS > $output_objdir/$soname-def;
5222         _lt_hint=1;
5223         cat $export_symbols | while read symbol; do
5224          set dummy \$symbol;
5225          case \$# in
5226            2) echo "   \$2 @ \$_lt_hint ; " >> $output_objdir/$soname-def;;
5227            4) echo "   \$2 \$3 \$4 ; " >> $output_objdir/$soname-def; _lt_hint=`expr \$_lt_hint - 1`;;
5228            *) echo "     \$2 @ \$_lt_hint \$3 ; " >> $output_objdir/$soname-def;;
5229          esac;
5230          _lt_hint=`expr 1 + \$_lt_hint`;
5231         done;
5232       fi~
5233       '"$ltdll_cmds"'
5234       $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~
5235       $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~
5236       $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~
5237       $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~
5238       $CC $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags'
5239     ;;
5240
5241   netbsd*)
5242     if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
5243       archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
5244       wlarc=
5245     else
5246       archive_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5247       archive_expsym_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5248     fi
5249     ;;
5250
5251   solaris* | sysv5*)
5252     if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then
5253       ld_shlibs=no
5254       cat <<EOF 1>&2
5255
5256 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
5257 *** create shared libraries on Solaris systems.  Therefore, libtool
5258 *** is disabling shared libraries support.  We urge you to upgrade GNU
5259 *** binutils to release 2.9.1 or newer.  Another option is to modify
5260 *** your PATH or compiler configuration so that the native linker is
5261 *** used, and then restart.
5262
5263 EOF
5264     elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
5265       archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5266       archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5267     else
5268       ld_shlibs=no
5269     fi
5270     ;;
5271
5272   sunos4*)
5273     archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5274     wlarc=
5275     hardcode_direct=yes
5276     hardcode_shlibpath_var=no
5277     ;;
5278
5279   *)
5280     if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
5281       archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5282       archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5283     else
5284       ld_shlibs=no
5285     fi
5286     ;;
5287   esac
5288
5289   if test "$ld_shlibs" = yes; then
5290     runpath_var=LD_RUN_PATH
5291     hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir'
5292     export_dynamic_flag_spec='${wl}--export-dynamic'
5293     case $host_os in
5294     cygwin* | mingw* | pw32*)
5295       # dlltool doesn't understand --whole-archive et. al.
5296       whole_archive_flag_spec=
5297       ;;
5298     *)
5299       # ancient GNU ld didn't support --whole-archive et. al.
5300       if $LD --help 2>&1 | egrep 'no-whole-archive' > /dev/null; then
5301         whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
5302       else
5303         whole_archive_flag_spec=
5304       fi
5305       ;;
5306     esac
5307   fi
5308 else
5309   # PORTME fill in a description of your system's linker (not GNU ld)
5310   case $host_os in
5311   aix3*)
5312     allow_undefined_flag=unsupported
5313     always_export_symbols=yes
5314     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'
5315     # Note: this linker hardcodes the directories in LIBPATH if there
5316     # are no directories specified by -L.
5317     hardcode_minus_L=yes
5318     if test "$GCC" = yes && test -z "$link_static_flag"; then
5319       # Neither direct hardcoding nor static linking is supported with a
5320       # broken collect2.
5321       hardcode_direct=unsupported
5322     fi
5323     ;;
5324
5325   aix4* | aix5*)
5326     if test "$host_cpu" = ia64; then
5327       # On IA64, the linker does run time linking by default, so we don't
5328       # have to do anything special.
5329       aix_use_runtimelinking=no
5330       exp_sym_flag='-Bexport'
5331       no_entry_flag=""
5332     else
5333       aix_use_runtimelinking=no
5334
5335       # Test if we are trying to use run time linking or normal
5336       # AIX style linking. If -brtl is somewhere in LDFLAGS, we
5337       # need to do runtime linking.
5338       case $host_os in aix4.[23]|aix4.[23].*|aix5*)
5339         for ld_flag in $LDFLAGS; do
5340           case $ld_flag in
5341           *-brtl*)
5342             aix_use_runtimelinking=yes
5343             break
5344           ;;
5345           esac
5346         done
5347       esac
5348
5349       exp_sym_flag='-bexport'
5350       no_entry_flag='-bnoentry'
5351     fi
5352
5353     # When large executables or shared objects are built, AIX ld can
5354     # have problems creating the table of contents.  If linking a library
5355     # or program results in "error TOC overflow" add -mminimal-toc to
5356     # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
5357     # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
5358
5359     hardcode_direct=yes
5360     archive_cmds=''
5361     hardcode_libdir_separator=':'
5362     if test "$GCC" = yes; then
5363       case $host_os in aix4.[012]|aix4.[012].*)
5364         collect2name=`${CC} -print-prog-name=collect2`
5365         if test -f "$collect2name" && \
5366           strings "$collect2name" | grep resolve_lib_name >/dev/null
5367         then
5368           # We have reworked collect2
5369           hardcode_direct=yes
5370         else
5371           # We have old collect2
5372           hardcode_direct=unsupported
5373           # It fails to find uninstalled libraries when the uninstalled
5374           # path is not listed in the libpath.  Setting hardcode_minus_L
5375           # to unsupported forces relinking
5376           hardcode_minus_L=yes
5377           hardcode_libdir_flag_spec='-L$libdir'
5378           hardcode_libdir_separator=
5379         fi
5380       esac
5381
5382       shared_flag='-shared'
5383     else
5384       # not using gcc
5385       if test "$host_cpu" = ia64; then
5386         shared_flag='${wl}-G'
5387       else
5388         if test "$aix_use_runtimelinking" = yes; then
5389           shared_flag='${wl}-G'
5390         else
5391           shared_flag='${wl}-bM:SRE'
5392         fi
5393       fi
5394     fi
5395
5396     # It seems that -bexpall can do strange things, so it is better to
5397     # generate a list of symbols to export.
5398     always_export_symbols=yes
5399     if test "$aix_use_runtimelinking" = yes; then
5400       # Warning - without using the other runtime loading flags (-brtl),
5401       # -berok will link without error, but may produce a broken library.
5402       allow_undefined_flag='-berok'
5403       hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:/usr/lib:/lib'
5404       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"
5405     else
5406       if test "$host_cpu" = ia64; then
5407         hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
5408         allow_undefined_flag="-z nodefs"
5409         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"
5410       else
5411         hardcode_libdir_flag_spec='${wl}-bnolibpath ${wl}-blibpath:$libdir:/usr/lib:/lib'
5412         # Warning - without using the other run time loading flags,
5413         # -berok will link without error, but may produce a broken library.
5414         allow_undefined_flag='${wl}-berok'
5415         # This is a bit strange, but is similar to how AIX traditionally builds
5416         # it's shared libraries.
5417         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'
5418       fi
5419     fi
5420     ;;
5421
5422   amigaos*)
5423     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)'
5424     hardcode_libdir_flag_spec='-L$libdir'
5425     hardcode_minus_L=yes
5426     # see comment about different semantics on the GNU ld section
5427     ld_shlibs=no
5428     ;;
5429
5430   cygwin* | mingw* | pw32*)
5431     # When not using gcc, we currently assume that we are using
5432     # Microsoft Visual C++.
5433     # hardcode_libdir_flag_spec is actually meaningless, as there is
5434     # no search path for DLLs.
5435     hardcode_libdir_flag_spec=' '
5436     allow_undefined_flag=unsupported
5437     # Tell ltmain to make .lib files, not .a files.
5438     libext=lib
5439     # FIXME: Setting linknames here is a bad hack.
5440     archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | sed -e '\''s/ -lc$//'\''` -link -dll~linknames='
5441     # The linker will automatically build a .lib file if we build a DLL.
5442     old_archive_from_new_cmds='true'
5443     # FIXME: Should let the user specify the lib program.
5444     old_archive_cmds='lib /OUT:$oldlib$oldobjs$old_deplibs'
5445     fix_srcfile_path='`cygpath -w "$srcfile"`'
5446     ;;
5447
5448   darwin* | rhapsody*)
5449     case "$host_os" in
5450     rhapsody* | darwin1.[012])
5451       allow_undefined_flag='-undefined suppress'
5452       ;;
5453     *) # Darwin 1.3 on
5454       allow_undefined_flag='-flat_namespace -undefined suppress'
5455       ;;
5456     esac
5457     # FIXME: Relying on posixy $() will cause problems for
5458     #        cross-compilation, but unfortunately the echo tests do not
5459     #        yet detect zsh echo's removal of \ escapes.  Also zsh mangles
5460     #        `"' quotes if we put them in here... so don't!
5461     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)'
5462     # We need to add '_' to the symbols in $export_symbols first
5463     #archive_expsym_cmds="$archive_cmds"' && strip -s $export_symbols'
5464     hardcode_direct=yes
5465     hardcode_shlibpath_var=no
5466     whole_archive_flag_spec='-all_load $convenience'
5467     ;;
5468
5469   freebsd1*)
5470     ld_shlibs=no
5471     ;;
5472
5473   # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
5474   # support.  Future versions do this automatically, but an explicit c++rt0.o
5475   # does not break anything, and helps significantly (at the cost of a little
5476   # extra space).
5477   freebsd2.2*)
5478     archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
5479     hardcode_libdir_flag_spec='-R$libdir'
5480     hardcode_direct=yes
5481     hardcode_shlibpath_var=no
5482     ;;
5483
5484   # Unfortunately, older versions of FreeBSD 2 do not have this feature.
5485   freebsd2*)
5486     archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5487     hardcode_direct=yes
5488     hardcode_minus_L=yes
5489     hardcode_shlibpath_var=no
5490     ;;
5491
5492   # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
5493   freebsd*)
5494     archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
5495     hardcode_libdir_flag_spec='-R$libdir'
5496     hardcode_direct=yes
5497     hardcode_shlibpath_var=no
5498     ;;
5499
5500   hpux9* | hpux10* | hpux11*)
5501     case $host_os in
5502     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' ;;
5503     *) archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' ;;
5504     esac
5505     hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
5506     hardcode_libdir_separator=:
5507     hardcode_direct=yes
5508     hardcode_minus_L=yes # Not in the search PATH, but as the default
5509                          # location of the library.
5510     export_dynamic_flag_spec='${wl}-E'
5511     ;;
5512
5513   irix5* | irix6* | nonstopux*)
5514     if test "$GCC" = yes; then
5515       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'
5516       hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5517     else
5518       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'
5519       hardcode_libdir_flag_spec='-rpath $libdir'
5520     fi
5521     hardcode_libdir_separator=:
5522     link_all_deplibs=yes
5523     ;;
5524
5525   netbsd*)
5526     if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
5527       archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
5528     else
5529       archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
5530     fi
5531     hardcode_libdir_flag_spec='-R$libdir'
5532     hardcode_direct=yes
5533     hardcode_shlibpath_var=no
5534     ;;
5535
5536   newsos6)
5537     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5538     hardcode_direct=yes
5539     hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5540     hardcode_libdir_separator=:
5541     hardcode_shlibpath_var=no
5542     ;;
5543
5544   openbsd*)
5545     hardcode_direct=yes
5546     hardcode_shlibpath_var=no
5547     if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
5548       archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5549       hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
5550       export_dynamic_flag_spec='${wl}-E'
5551     else
5552       case "$host_os" in
5553       openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
5554         archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5555         hardcode_libdir_flag_spec='-R$libdir'
5556         ;;
5557       *)
5558         archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5559         hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
5560         ;;
5561       esac
5562     fi
5563     ;;
5564
5565   openedition*)
5566     archive_cmds="\$CC -Wl,DLL \$libobjs \$deplibs \$compiler_flags -o \$lib &&
5567         cp \$linknames \$output_objdir && linknames=''"
5568     export_dynamic_flag_spec="-Wl,DLL"
5569     ;;
5570
5571   os2*)
5572     hardcode_libdir_flag_spec='-L$libdir'
5573     hardcode_minus_L=yes
5574     allow_undefined_flag=unsupported
5575     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'
5576     old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
5577     ;;
5578
5579   osf3*)
5580     if test "$GCC" = yes; then
5581       allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
5582       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'
5583     else
5584       allow_undefined_flag=' -expect_unresolved \*'
5585       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'
5586     fi
5587     hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5588     hardcode_libdir_separator=:
5589     ;;
5590
5591   osf4* | osf5*)        # as osf3* with the addition of -msym flag
5592     if test "$GCC" = yes; then
5593       allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
5594       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'
5595       hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5596     else
5597       allow_undefined_flag=' -expect_unresolved \*'
5598       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'
5599       archive_expsym_cmds='for i in `cat $export_symbols`; do printf "-exported_symbol " >> $lib.exp; echo "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
5600       $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'
5601
5602       #Both c and cxx compiler support -rpath directly
5603       hardcode_libdir_flag_spec='-rpath $libdir'
5604     fi
5605     hardcode_libdir_separator=:
5606     ;;
5607
5608   sco3.2v5*)
5609     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5610     hardcode_shlibpath_var=no
5611     runpath_var=LD_RUN_PATH
5612     hardcode_runpath_var=yes
5613     export_dynamic_flag_spec='${wl}-Bexport'
5614     ;;
5615
5616   solaris*)
5617     # gcc --version < 3.0 without binutils cannot create self contained
5618     # shared libraries reliably, requiring libgcc.a to resolve some of
5619     # the object symbols generated in some cases.  Libraries that use
5620     # assert need libgcc.a to resolve __eprintf, for example.  Linking
5621     # a copy of libgcc.a into every shared library to guarantee resolving
5622     # such symbols causes other problems:  According to Tim Van Holder
5623     # <tim.van.holder@pandora.be>, C++ libraries end up with a separate
5624     # (to the application) exception stack for one thing.
5625     no_undefined_flag=' -z defs'
5626     if test "$GCC" = yes; then
5627       case `$CC --version 2>/dev/null` in
5628       [12].*)
5629         cat <<EOF 1>&2
5630
5631 *** Warning: Releases of GCC earlier than version 3.0 cannot reliably
5632 *** create self contained shared libraries on Solaris systems, without
5633 *** introducing a dependency on libgcc.a.  Therefore, libtool is disabling
5634 *** -no-undefined support, which will at least allow you to build shared
5635 *** libraries.  However, you may find that when you link such libraries
5636 *** into an application without using GCC, you have to manually add
5637 *** \`gcc --print-libgcc-file-name\` to the link command.  We urge you to
5638 *** upgrade to a newer version of GCC.  Another option is to rebuild your
5639 *** current GCC to use the GNU linker from GNU binutils 2.9.1 or newer.
5640
5641 EOF
5642         no_undefined_flag=
5643         ;;
5644       esac
5645     fi
5646     # $CC -shared without GNU ld will not create a library from C++
5647     # object files and a static libstdc++, better avoid it by now
5648     archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
5649     archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
5650                 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
5651     hardcode_libdir_flag_spec='-R$libdir'
5652     hardcode_shlibpath_var=no
5653     case $host_os in
5654     solaris2.[0-5] | solaris2.[0-5].*) ;;
5655     *) # Supported since Solaris 2.6 (maybe 2.5.1?)
5656       whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;;
5657     esac
5658     link_all_deplibs=yes
5659     ;;
5660
5661   sunos4*)
5662     if test "x$host_vendor" = xsequent; then
5663       # Use $CC to link under sequent, because it throws in some extra .o
5664       # files that make .init and .fini sections work.
5665       archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
5666     else
5667       archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
5668     fi
5669     hardcode_libdir_flag_spec='-L$libdir'
5670     hardcode_direct=yes
5671     hardcode_minus_L=yes
5672     hardcode_shlibpath_var=no
5673     ;;
5674
5675   sysv4)
5676     case $host_vendor in
5677       sni)
5678         archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5679         hardcode_direct=yes # is this really true???
5680         ;;
5681       siemens)
5682         ## LD is ld it makes a PLAMLIB
5683         ## CC just makes a GrossModule.
5684         archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
5685         reload_cmds='$CC -r -o $output$reload_objs'
5686         hardcode_direct=no
5687         ;;
5688       motorola)
5689         archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5690         hardcode_direct=no #Motorola manual says yes, but my tests say they lie
5691         ;;
5692     esac
5693     runpath_var='LD_RUN_PATH'
5694     hardcode_shlibpath_var=no
5695     ;;
5696
5697   sysv4.3*)
5698     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5699     hardcode_shlibpath_var=no
5700     export_dynamic_flag_spec='-Bexport'
5701     ;;
5702
5703   sysv5*)
5704     no_undefined_flag=' -z text'
5705     # $CC -shared without GNU ld will not create a library from C++
5706     # object files and a static libstdc++, better avoid it by now
5707     archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
5708     archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
5709                 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
5710     hardcode_libdir_flag_spec=
5711     hardcode_shlibpath_var=no
5712     runpath_var='LD_RUN_PATH'
5713     ;;
5714
5715   uts4*)
5716     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5717     hardcode_libdir_flag_spec='-L$libdir'
5718     hardcode_shlibpath_var=no
5719     ;;
5720
5721   dgux*)
5722     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5723     hardcode_libdir_flag_spec='-L$libdir'
5724     hardcode_shlibpath_var=no
5725     ;;
5726
5727   sysv4*MP*)
5728     if test -d /usr/nec; then
5729       archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5730       hardcode_shlibpath_var=no
5731       runpath_var=LD_RUN_PATH
5732       hardcode_runpath_var=yes
5733       ld_shlibs=yes
5734     fi
5735     ;;
5736
5737   sysv4.2uw2*)
5738     archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
5739     hardcode_direct=yes
5740     hardcode_minus_L=no
5741     hardcode_shlibpath_var=no
5742     hardcode_runpath_var=yes
5743     runpath_var=LD_RUN_PATH
5744     ;;
5745
5746   sysv5uw7* | unixware7*)
5747     no_undefined_flag='${wl}-z ${wl}text'
5748     if test "$GCC" = yes; then
5749       archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
5750     else
5751       archive_cmds='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
5752     fi
5753     runpath_var='LD_RUN_PATH'
5754     hardcode_shlibpath_var=no
5755     ;;
5756
5757   *)
5758     ld_shlibs=no
5759     ;;
5760   esac
5761 fi
5762 echo "$ac_t""$ld_shlibs" 1>&6
5763 test "$ld_shlibs" = no && can_build_shared=no
5764
5765 # Check hardcoding attributes.
5766 echo $ac_n "checking how to hardcode library paths into programs""... $ac_c" 1>&6
5767 echo "configure:5768: checking how to hardcode library paths into programs" >&5
5768 hardcode_action=
5769 if test -n "$hardcode_libdir_flag_spec" || \
5770    test -n "$runpath_var"; then
5771
5772   # We can hardcode non-existant directories.
5773   if test "$hardcode_direct" != no &&
5774      # If the only mechanism to avoid hardcoding is shlibpath_var, we
5775      # have to relink, otherwise we might link with an installed library
5776      # when we should be linking with a yet-to-be-installed one
5777      ## test "$hardcode_shlibpath_var" != no &&
5778      test "$hardcode_minus_L" != no; then
5779     # Linking always hardcodes the temporary library directory.
5780     hardcode_action=relink
5781   else
5782     # We can link without hardcoding, and we can hardcode nonexisting dirs.
5783     hardcode_action=immediate
5784   fi
5785 else
5786   # We cannot hardcode anything, or else we can only hardcode existing
5787   # directories.
5788   hardcode_action=unsupported
5789 fi
5790 echo "$ac_t""$hardcode_action" 1>&6
5791
5792 striplib=
5793 old_striplib=
5794 echo $ac_n "checking whether stripping libraries is possible""... $ac_c" 1>&6
5795 echo "configure:5796: checking whether stripping libraries is possible" >&5
5796 if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
5797   test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
5798   test -z "$striplib" && striplib="$STRIP --strip-unneeded"
5799   echo "$ac_t""yes" 1>&6
5800 else
5801   echo "$ac_t""no" 1>&6
5802 fi
5803
5804 reload_cmds='$LD$reload_flag -o $output$reload_objs'
5805 test -z "$deplibs_check_method" && deplibs_check_method=unknown
5806
5807 # PORTME Fill in your ld.so characteristics
5808 echo $ac_n "checking dynamic linker characteristics""... $ac_c" 1>&6
5809 echo "configure:5810: checking dynamic linker characteristics" >&5
5810 library_names_spec=
5811 libname_spec='lib$name'
5812 soname_spec=
5813 postinstall_cmds=
5814 postuninstall_cmds=
5815 finish_cmds=
5816 finish_eval=
5817 shlibpath_var=
5818 shlibpath_overrides_runpath=unknown
5819 version_type=none
5820 dynamic_linker="$host_os ld.so"
5821 sys_lib_dlsearch_path_spec="/lib /usr/lib"
5822 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
5823
5824 case $host_os in
5825 aix3*)
5826   version_type=linux
5827   library_names_spec='${libname}${release}.so$versuffix $libname.a'
5828   shlibpath_var=LIBPATH
5829
5830   # AIX has no versioning support, so we append a major version to the name.
5831   soname_spec='${libname}${release}.so$major'
5832   ;;
5833
5834 aix4* | aix5*)
5835   version_type=linux
5836   need_lib_prefix=no
5837   need_version=no
5838   hardcode_into_libs=yes
5839   if test "$host_cpu" = ia64; then
5840     # AIX 5 supports IA64
5841     library_names_spec='${libname}${release}.so$major ${libname}${release}.so$versuffix $libname.so'
5842     shlibpath_var=LD_LIBRARY_PATH
5843   else
5844     # With GCC up to 2.95.x, collect2 would create an import file
5845     # for dependence libraries.  The import file would start with
5846     # the line `#! .'.  This would cause the generated library to
5847     # depend on `.', always an invalid library.  This was fixed in
5848     # development snapshots of GCC prior to 3.0.
5849     case $host_os in
5850       aix4 | aix4.[01] | aix4.[01].*)
5851         if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
5852              echo ' yes '
5853              echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
5854           :
5855         else
5856           can_build_shared=no
5857         fi
5858         ;;
5859     esac
5860     # AIX (on Power*) has no versioning support, so currently we can
5861     # not hardcode correct soname into executable. Probably we can
5862     # add versioning support to collect2, so additional links can
5863     # be useful in future.
5864     if test "$aix_use_runtimelinking" = yes; then
5865       # If using run time linking (on AIX 4.2 or later) use lib<name>.so
5866       # instead of lib<name>.a to let people know that these are not
5867       # typical AIX shared libraries.
5868       library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
5869     else
5870       # We preserve .a as extension for shared libraries through AIX4.2
5871       # and later when we are not doing run time linking.
5872       library_names_spec='${libname}${release}.a $libname.a'
5873       soname_spec='${libname}${release}.so$major'
5874     fi
5875     shlibpath_var=LIBPATH
5876   fi
5877   hardcode_into_libs=yes
5878   ;;
5879
5880 amigaos*)
5881   library_names_spec='$libname.ixlibrary $libname.a'
5882   # Create ${libname}_ixlibrary.a entries in /sys/libs.
5883   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'
5884   ;;
5885
5886 beos*)
5887   library_names_spec='${libname}.so'
5888   dynamic_linker="$host_os ld.so"
5889   shlibpath_var=LIBRARY_PATH
5890   ;;
5891
5892 bsdi4*)
5893   version_type=linux
5894   need_version=no
5895   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
5896   soname_spec='${libname}${release}.so$major'
5897   finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
5898   shlibpath_var=LD_LIBRARY_PATH
5899   sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
5900   sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
5901   export_dynamic_flag_spec=-rdynamic
5902   # the default ld.so.conf also contains /usr/contrib/lib and
5903   # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
5904   # libtool to hard-code these into programs
5905   ;;
5906
5907 cygwin* | mingw* | pw32*)
5908   version_type=windows
5909   need_version=no
5910   need_lib_prefix=no
5911   case $GCC,$host_os in
5912   yes,cygwin*)
5913     library_names_spec='$libname.dll.a'
5914     soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
5915     postinstall_cmds='dlpath=`bash 2>&1 -c '\''. $dir/${file}i;echo \$dlname'\''`~
5916       dldir=$destdir/`dirname \$dlpath`~
5917       test -d \$dldir || mkdir -p \$dldir~
5918       $install_prog .libs/$dlname \$dldir/$dlname'
5919     postuninstall_cmds='dldll=`bash 2>&1 -c '\''. $file; echo \$dlname'\''`~
5920       dlpath=$dir/\$dldll~
5921        $rm \$dlpath'
5922     ;;
5923   yes,mingw*)
5924     library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
5925     sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | sed -e "s/^libraries://" -e "s/;/ /g" -e "s,=/,/,g"`
5926     ;;
5927   yes,pw32*)
5928     library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | sed -e 's/./-/g'`${versuffix}.dll'
5929     ;;
5930   *)
5931     library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll $libname.lib'
5932     ;;
5933   esac
5934   dynamic_linker='Win32 ld.exe'
5935   # FIXME: first we should search . and the directory the executable is in
5936   shlibpath_var=PATH
5937   ;;
5938
5939 darwin* | rhapsody*)
5940   dynamic_linker="$host_os dyld"
5941   version_type=darwin
5942   need_lib_prefix=no
5943   need_version=no
5944   # FIXME: Relying on posixy $() will cause problems for
5945   #        cross-compilation, but unfortunately the echo tests do not
5946   #        yet detect zsh echo's removal of \ escapes.
5947   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)'
5948   soname_spec='${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib)'
5949   shlibpath_overrides_runpath=yes
5950   shlibpath_var=DYLD_LIBRARY_PATH
5951   ;;
5952
5953 freebsd1*)
5954   dynamic_linker=no
5955   ;;
5956
5957 freebsd*)
5958   objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
5959   version_type=freebsd-$objformat
5960   case $version_type in
5961     freebsd-elf*)
5962       library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
5963       need_version=no
5964       need_lib_prefix=no
5965       ;;
5966     freebsd-*)
5967       library_names_spec='${libname}${release}.so$versuffix $libname.so$versuffix'
5968       need_version=yes
5969       ;;
5970   esac
5971   shlibpath_var=LD_LIBRARY_PATH
5972   case $host_os in
5973   freebsd2*)
5974     shlibpath_overrides_runpath=yes
5975     ;;
5976   *)
5977     shlibpath_overrides_runpath=no
5978     hardcode_into_libs=yes
5979     ;;
5980   esac
5981   ;;
5982
5983 gnu*)
5984   version_type=linux
5985   need_lib_prefix=no
5986   need_version=no
5987   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so${major} ${libname}.so'
5988   soname_spec='${libname}${release}.so$major'
5989   shlibpath_var=LD_LIBRARY_PATH
5990   hardcode_into_libs=yes
5991   ;;
5992
5993 hpux9* | hpux10* | hpux11*)
5994   # Give a soname corresponding to the major version so that dld.sl refuses to
5995   # link against other versions.
5996   dynamic_linker="$host_os dld.sl"
5997   version_type=sunos
5998   need_lib_prefix=no
5999   need_version=no
6000   shlibpath_var=SHLIB_PATH
6001   shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
6002   library_names_spec='${libname}${release}.sl$versuffix ${libname}${release}.sl$major $libname.sl'
6003   soname_spec='${libname}${release}.sl$major'
6004   # HP-UX runs *really* slowly unless shared libraries are mode 555.
6005   postinstall_cmds='chmod 555 $lib'
6006   ;;
6007
6008 irix5* | irix6* | nonstopux*)
6009   case $host_os in
6010     nonstopux*) version_type=nonstopux ;;
6011     *)          version_type=irix ;;
6012   esac
6013   need_lib_prefix=no
6014   need_version=no
6015   soname_spec='${libname}${release}.so$major'
6016   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so $libname.so'
6017   case $host_os in
6018   irix5* | nonstopux*)
6019     libsuff= shlibsuff=
6020     ;;
6021   *)
6022     case $LD in # libtool.m4 will add one of these switches to LD
6023     *-32|*"-32 ") libsuff= shlibsuff= libmagic=32-bit;;
6024     *-n32|*"-n32 ") libsuff=32 shlibsuff=N32 libmagic=N32;;
6025     *-64|*"-64 ") libsuff=64 shlibsuff=64 libmagic=64-bit;;
6026     *) libsuff= shlibsuff= libmagic=never-match;;
6027     esac
6028     ;;
6029   esac
6030   shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
6031   shlibpath_overrides_runpath=no
6032   sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
6033   sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
6034   ;;
6035
6036 # No shared lib support for Linux oldld, aout, or coff.
6037 linux-gnuoldld* | linux-gnuaout* | linux-gnucoff*)
6038   dynamic_linker=no
6039   ;;
6040
6041 # This must be Linux ELF.
6042 linux-gnu*)
6043   version_type=linux
6044   need_lib_prefix=no
6045   need_version=no
6046   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6047   soname_spec='${libname}${release}.so$major'
6048   finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
6049   shlibpath_var=LD_LIBRARY_PATH
6050   shlibpath_overrides_runpath=no
6051   # This implies no fast_install, which is unacceptable.
6052   # Some rework will be needed to allow for fast_install
6053   # before this can be enabled.
6054   hardcode_into_libs=yes
6055
6056   # We used to test for /lib/ld.so.1 and disable shared libraries on
6057   # powerpc, because MkLinux only supported shared libraries with the
6058   # GNU dynamic linker.  Since this was broken with cross compilers,
6059   # most powerpc-linux boxes support dynamic linking these days and
6060   # people can always --disable-shared, the test was removed, and we
6061   # assume the GNU/Linux dynamic linker is in use.
6062   dynamic_linker='GNU/Linux ld.so'
6063   ;;
6064
6065 netbsd*)
6066   version_type=sunos
6067   need_lib_prefix=no
6068   need_version=no
6069   if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
6070     library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
6071     finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
6072     dynamic_linker='NetBSD (a.out) ld.so'
6073   else
6074     library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so ${libname}.so'
6075     soname_spec='${libname}${release}.so$major'
6076     dynamic_linker='NetBSD ld.elf_so'
6077   fi
6078   shlibpath_var=LD_LIBRARY_PATH
6079   shlibpath_overrides_runpath=yes
6080   hardcode_into_libs=yes
6081   ;;
6082
6083 newsos6)
6084   version_type=linux
6085   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6086   shlibpath_var=LD_LIBRARY_PATH
6087   shlibpath_overrides_runpath=yes
6088   ;;
6089
6090 openbsd*)
6091   version_type=sunos
6092   need_lib_prefix=no
6093   need_version=no
6094   if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
6095     case "$host_os" in
6096     openbsd2.[89] | openbsd2.[89].*)
6097       shlibpath_overrides_runpath=no
6098       ;;
6099     *)
6100       shlibpath_overrides_runpath=yes
6101       ;;
6102     esac
6103   else
6104     shlibpath_overrides_runpath=yes
6105   fi
6106   library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
6107   finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
6108   shlibpath_var=LD_LIBRARY_PATH
6109   ;;
6110
6111 openedition*)
6112   need_lib_prefix=no
6113   need_version=no
6114   shlibpath_overrides_runpath=yes
6115   shlibpath_var=LIBPATH
6116   postinstall_cmds="rm \$destdir/\$linkname; cp \$linkname \$destdir; chmod a+x \$lib"
6117   # the library's exports are in libname.x; this is the file that must
6118   # actually be linked with to use a DLL.
6119   library_names_spec="\${libname}\${release}.so\$versuffix \${libname}.x"
6120   ;;
6121
6122 os2*)
6123   libname_spec='$name'
6124   need_lib_prefix=no
6125   library_names_spec='$libname.dll $libname.a'
6126   dynamic_linker='OS/2 ld.exe'
6127   shlibpath_var=LIBPATH
6128   ;;
6129
6130 osf3* | osf4* | osf5*)
6131   version_type=osf
6132   need_version=no
6133   soname_spec='${libname}${release}.so$major'
6134   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6135   shlibpath_var=LD_LIBRARY_PATH
6136   sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
6137   sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
6138   hardcode_into_libs=yes
6139   ;;
6140
6141 sco3.2v5*)
6142   version_type=osf
6143   soname_spec='${libname}${release}.so$major'
6144   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6145   shlibpath_var=LD_LIBRARY_PATH
6146   ;;
6147
6148 solaris*)
6149   version_type=linux
6150   need_lib_prefix=no
6151   need_version=no
6152   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6153   soname_spec='${libname}${release}.so$major'
6154   shlibpath_var=LD_LIBRARY_PATH
6155   shlibpath_overrides_runpath=yes
6156   hardcode_into_libs=yes
6157   # ldd complains unless libraries are executable
6158   postinstall_cmds='chmod +x $lib'
6159   ;;
6160
6161 sunos4*)
6162   version_type=sunos
6163   library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
6164   finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
6165   shlibpath_var=LD_LIBRARY_PATH
6166   shlibpath_overrides_runpath=yes
6167   if test "$with_gnu_ld" = yes; then
6168     need_lib_prefix=no
6169   fi
6170   need_version=yes
6171   ;;
6172
6173 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
6174   version_type=linux
6175   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6176   soname_spec='${libname}${release}.so$major'
6177   shlibpath_var=LD_LIBRARY_PATH
6178   case $host_vendor in
6179     sni)
6180       shlibpath_overrides_runpath=no
6181       need_lib_prefix=no
6182       export_dynamic_flag_spec='${wl}-Blargedynsym'
6183       runpath_var=LD_RUN_PATH
6184       ;;
6185     siemens)
6186       need_lib_prefix=no
6187       ;;
6188     motorola)
6189       need_lib_prefix=no
6190       need_version=no
6191       shlibpath_overrides_runpath=no
6192       sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
6193       ;;
6194   esac
6195   ;;
6196
6197 uts4*)
6198   version_type=linux
6199   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6200   soname_spec='${libname}${release}.so$major'
6201   shlibpath_var=LD_LIBRARY_PATH
6202   ;;
6203
6204 dgux*)
6205   version_type=linux
6206   need_lib_prefix=no
6207   need_version=no
6208   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6209   soname_spec='${libname}${release}.so$major'
6210   shlibpath_var=LD_LIBRARY_PATH
6211   ;;
6212
6213 sysv4*MP*)
6214   if test -d /usr/nec ;then
6215     version_type=linux
6216     library_names_spec='$libname.so.$versuffix $libname.so.$major $libname.so'
6217     soname_spec='$libname.so.$major'
6218     shlibpath_var=LD_LIBRARY_PATH
6219   fi
6220   ;;
6221
6222 *)
6223   dynamic_linker=no
6224   ;;
6225 esac
6226 echo "$ac_t""$dynamic_linker" 1>&6
6227 test "$dynamic_linker" = no && can_build_shared=no
6228
6229 # Report the final consequences.
6230 echo $ac_n "checking if libtool supports shared libraries""... $ac_c" 1>&6
6231 echo "configure:6232: checking if libtool supports shared libraries" >&5
6232 echo "$ac_t""$can_build_shared" 1>&6
6233
6234 echo $ac_n "checking whether to build shared libraries""... $ac_c" 1>&6
6235 echo "configure:6236: checking whether to build shared libraries" >&5
6236 test "$can_build_shared" = "no" && enable_shared=no
6237
6238 # On AIX, shared libraries and static libraries use the same namespace, and
6239 # are all built from PIC.
6240 case "$host_os" in
6241 aix3*)
6242   test "$enable_shared" = yes && enable_static=no
6243   if test -n "$RANLIB"; then
6244     archive_cmds="$archive_cmds~\$RANLIB \$lib"
6245     postinstall_cmds='$RANLIB $lib'
6246   fi
6247   ;;
6248
6249 aix4*)
6250   if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
6251     test "$enable_shared" = yes && enable_static=no
6252   fi
6253   ;;
6254 esac
6255 echo "$ac_t""$enable_shared" 1>&6
6256
6257 echo $ac_n "checking whether to build static libraries""... $ac_c" 1>&6
6258 echo "configure:6259: checking whether to build static libraries" >&5
6259 # Make sure either enable_shared or enable_static is yes.
6260 test "$enable_shared" = yes || enable_static=yes
6261 echo "$ac_t""$enable_static" 1>&6
6262
6263 if test "$hardcode_action" = relink; then
6264   # Fast installation is not supported
6265   enable_fast_install=no
6266 elif test "$shlibpath_overrides_runpath" = yes ||
6267      test "$enable_shared" = no; then
6268   # Fast installation is not necessary
6269   enable_fast_install=needless
6270 fi
6271
6272 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
6273 if test "$GCC" = yes; then
6274   variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
6275 fi
6276
6277 if test "x$enable_dlopen" != xyes; then
6278   enable_dlopen=unknown
6279   enable_dlopen_self=unknown
6280   enable_dlopen_self_static=unknown
6281 else
6282   lt_cv_dlopen=no
6283   lt_cv_dlopen_libs=
6284
6285   case $host_os in
6286   beos*)
6287     lt_cv_dlopen="load_add_on"
6288     lt_cv_dlopen_libs=
6289     lt_cv_dlopen_self=yes
6290     ;;
6291
6292   cygwin* | mingw* | pw32*)
6293     lt_cv_dlopen="LoadLibrary"
6294     lt_cv_dlopen_libs=
6295    ;;
6296
6297   *)
6298     echo $ac_n "checking for dllload""... $ac_c" 1>&6
6299 echo "configure:6300: checking for dllload" >&5
6300 if eval "test \"\${ac_cv_func_dllload+set}\" = set"; then
6301   echo $ac_n "(cached) $ac_c" 1>&6
6302 else
6303   cat > conftest.$ac_ext <<EOF
6304 #line 6305 "configure"
6305 #include "confdefs.h"
6306 /* System header to define __stub macros and hopefully few prototypes,
6307     which can conflict with char dllload(); below.  */
6308 #include <assert.h>
6309 /* Override any gcc2 internal prototype to avoid an error.  */
6310 /* We use char because int might match the return type of a gcc2
6311     builtin and then its argument prototype would still apply.  */
6312 char dllload();
6313 char (*f)();
6314
6315 int main() {
6316
6317 /* The GNU C library defines this for functions which it implements
6318     to always fail with ENOSYS.  Some functions are actually named
6319     something starting with __ and the normal name is an alias.  */
6320 #if defined (__stub_dllload) || defined (__stub___dllload)
6321 choke me
6322 #else
6323 f = dllload;
6324 #endif
6325
6326 ; return 0; }
6327 EOF
6328 if { (eval echo configure:6329: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6329   rm -rf conftest*
6330   eval "ac_cv_func_dllload=yes"
6331 else
6332   echo "configure: failed program was:" >&5
6333   cat conftest.$ac_ext >&5
6334   rm -rf conftest*
6335   eval "ac_cv_func_dllload=no"
6336 fi
6337 rm -f conftest*
6338 fi
6339
6340 if eval "test \"`echo '$ac_cv_func_'dllload`\" = yes"; then
6341   echo "$ac_t""yes" 1>&6
6342   lt_cv_dlopen="dllload"
6343 else
6344   echo "$ac_t""no" 1>&6
6345 echo $ac_n "checking for shl_load""... $ac_c" 1>&6
6346 echo "configure:6347: checking for shl_load" >&5
6347 if eval "test \"\${ac_cv_func_shl_load+set}\" = set"; then
6348   echo $ac_n "(cached) $ac_c" 1>&6
6349 else
6350   cat > conftest.$ac_ext <<EOF
6351 #line 6352 "configure"
6352 #include "confdefs.h"
6353 /* System header to define __stub macros and hopefully few prototypes,
6354     which can conflict with char shl_load(); below.  */
6355 #include <assert.h>
6356 /* Override any gcc2 internal prototype to avoid an error.  */
6357 /* We use char because int might match the return type of a gcc2
6358     builtin and then its argument prototype would still apply.  */
6359 char shl_load();
6360 char (*f)();
6361
6362 int main() {
6363
6364 /* The GNU C library defines this for functions which it implements
6365     to always fail with ENOSYS.  Some functions are actually named
6366     something starting with __ and the normal name is an alias.  */
6367 #if defined (__stub_shl_load) || defined (__stub___shl_load)
6368 choke me
6369 #else
6370 f = shl_load;
6371 #endif
6372
6373 ; return 0; }
6374 EOF
6375 if { (eval echo configure:6376: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6376   rm -rf conftest*
6377   eval "ac_cv_func_shl_load=yes"
6378 else
6379   echo "configure: failed program was:" >&5
6380   cat conftest.$ac_ext >&5
6381   rm -rf conftest*
6382   eval "ac_cv_func_shl_load=no"
6383 fi
6384 rm -f conftest*
6385 fi
6386
6387 if eval "test \"`echo '$ac_cv_func_'shl_load`\" = yes"; then
6388   echo "$ac_t""yes" 1>&6
6389   lt_cv_dlopen="shl_load"
6390 else
6391   echo "$ac_t""no" 1>&6
6392 echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
6393 echo "configure:6394: checking for shl_load in -ldld" >&5
6394 ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-:%__p__%'`
6395 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6396   echo $ac_n "(cached) $ac_c" 1>&6
6397 else
6398   ac_save_LIBS="$LIBS"
6399 LIBS="-ldld  $LIBS"
6400 cat > conftest.$ac_ext <<EOF
6401 #line 6402 "configure"
6402 #include "confdefs.h"
6403 /* Override any gcc2 internal prototype to avoid an error.  */
6404 /* We use char because int might match the return type of a gcc2
6405     builtin and then its argument prototype would still apply.  */
6406 char shl_load();
6407
6408 int main() {
6409 shl_load()
6410 ; return 0; }
6411 EOF
6412 if { (eval echo configure:6413: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6413   rm -rf conftest*
6414   eval "ac_cv_lib_$ac_lib_var=yes"
6415 else
6416   echo "configure: failed program was:" >&5
6417   cat conftest.$ac_ext >&5
6418   rm -rf conftest*
6419   eval "ac_cv_lib_$ac_lib_var=no"
6420 fi
6421 rm -f conftest*
6422 LIBS="$ac_save_LIBS"
6423
6424 fi
6425 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6426   echo "$ac_t""yes" 1>&6
6427   lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"
6428 else
6429   echo "$ac_t""no" 1>&6
6430 echo $ac_n "checking for dlopen""... $ac_c" 1>&6
6431 echo "configure:6432: checking for dlopen" >&5
6432 if eval "test \"\${ac_cv_func_dlopen+set}\" = set"; then
6433   echo $ac_n "(cached) $ac_c" 1>&6
6434 else
6435   cat > conftest.$ac_ext <<EOF
6436 #line 6437 "configure"
6437 #include "confdefs.h"
6438 /* System header to define __stub macros and hopefully few prototypes,
6439     which can conflict with char dlopen(); below.  */
6440 #include <assert.h>
6441 /* Override any gcc2 internal prototype to avoid an error.  */
6442 /* We use char because int might match the return type of a gcc2
6443     builtin and then its argument prototype would still apply.  */
6444 char dlopen();
6445 char (*f)();
6446
6447 int main() {
6448
6449 /* The GNU C library defines this for functions which it implements
6450     to always fail with ENOSYS.  Some functions are actually named
6451     something starting with __ and the normal name is an alias.  */
6452 #if defined (__stub_dlopen) || defined (__stub___dlopen)
6453 choke me
6454 #else
6455 f = dlopen;
6456 #endif
6457
6458 ; return 0; }
6459 EOF
6460 if { (eval echo configure:6461: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6461   rm -rf conftest*
6462   eval "ac_cv_func_dlopen=yes"
6463 else
6464   echo "configure: failed program was:" >&5
6465   cat conftest.$ac_ext >&5
6466   rm -rf conftest*
6467   eval "ac_cv_func_dlopen=no"
6468 fi
6469 rm -f conftest*
6470 fi
6471
6472 if eval "test \"`echo '$ac_cv_func_'dlopen`\" = yes"; then
6473   echo "$ac_t""yes" 1>&6
6474   lt_cv_dlopen="dlopen"
6475 else
6476   echo "$ac_t""no" 1>&6
6477 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
6478 echo "configure:6479: checking for dlopen in -ldl" >&5
6479 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-:%__p__%'`
6480 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6481   echo $ac_n "(cached) $ac_c" 1>&6
6482 else
6483   ac_save_LIBS="$LIBS"
6484 LIBS="-ldl  $LIBS"
6485 cat > conftest.$ac_ext <<EOF
6486 #line 6487 "configure"
6487 #include "confdefs.h"
6488 /* Override any gcc2 internal prototype to avoid an error.  */
6489 /* We use char because int might match the return type of a gcc2
6490     builtin and then its argument prototype would still apply.  */
6491 char dlopen();
6492
6493 int main() {
6494 dlopen()
6495 ; return 0; }
6496 EOF
6497 if { (eval echo configure:6498: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6498   rm -rf conftest*
6499   eval "ac_cv_lib_$ac_lib_var=yes"
6500 else
6501   echo "configure: failed program was:" >&5
6502   cat conftest.$ac_ext >&5
6503   rm -rf conftest*
6504   eval "ac_cv_lib_$ac_lib_var=no"
6505 fi
6506 rm -f conftest*
6507 LIBS="$ac_save_LIBS"
6508
6509 fi
6510 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6511   echo "$ac_t""yes" 1>&6
6512   lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
6513 else
6514   echo "$ac_t""no" 1>&6
6515 echo $ac_n "checking for dlopen in -lsvld""... $ac_c" 1>&6
6516 echo "configure:6517: checking for dlopen in -lsvld" >&5
6517 ac_lib_var=`echo svld'_'dlopen | sed 'y%./+-:%__p__%'`
6518 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6519   echo $ac_n "(cached) $ac_c" 1>&6
6520 else
6521   ac_save_LIBS="$LIBS"
6522 LIBS="-lsvld  $LIBS"
6523 cat > conftest.$ac_ext <<EOF
6524 #line 6525 "configure"
6525 #include "confdefs.h"
6526 /* Override any gcc2 internal prototype to avoid an error.  */
6527 /* We use char because int might match the return type of a gcc2
6528     builtin and then its argument prototype would still apply.  */
6529 char dlopen();
6530
6531 int main() {
6532 dlopen()
6533 ; return 0; }
6534 EOF
6535 if { (eval echo configure:6536: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6536   rm -rf conftest*
6537   eval "ac_cv_lib_$ac_lib_var=yes"
6538 else
6539   echo "configure: failed program was:" >&5
6540   cat conftest.$ac_ext >&5
6541   rm -rf conftest*
6542   eval "ac_cv_lib_$ac_lib_var=no"
6543 fi
6544 rm -f conftest*
6545 LIBS="$ac_save_LIBS"
6546
6547 fi
6548 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6549   echo "$ac_t""yes" 1>&6
6550   lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"
6551 else
6552   echo "$ac_t""no" 1>&6
6553 echo $ac_n "checking for dld_link in -ldld""... $ac_c" 1>&6
6554 echo "configure:6555: checking for dld_link in -ldld" >&5
6555 ac_lib_var=`echo dld'_'dld_link | sed 'y%./+-:%__p__%'`
6556 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6557   echo $ac_n "(cached) $ac_c" 1>&6
6558 else
6559   ac_save_LIBS="$LIBS"
6560 LIBS="-ldld  $LIBS"
6561 cat > conftest.$ac_ext <<EOF
6562 #line 6563 "configure"
6563 #include "confdefs.h"
6564 /* Override any gcc2 internal prototype to avoid an error.  */
6565 /* We use char because int might match the return type of a gcc2
6566     builtin and then its argument prototype would still apply.  */
6567 char dld_link();
6568
6569 int main() {
6570 dld_link()
6571 ; return 0; }
6572 EOF
6573 if { (eval echo configure:6574: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6574   rm -rf conftest*
6575   eval "ac_cv_lib_$ac_lib_var=yes"
6576 else
6577   echo "configure: failed program was:" >&5
6578   cat conftest.$ac_ext >&5
6579   rm -rf conftest*
6580   eval "ac_cv_lib_$ac_lib_var=no"
6581 fi
6582 rm -f conftest*
6583 LIBS="$ac_save_LIBS"
6584
6585 fi
6586 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6587   echo "$ac_t""yes" 1>&6
6588   lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"
6589 else
6590   echo "$ac_t""no" 1>&6
6591 fi
6592
6593               
6594 fi
6595
6596             
6597 fi
6598
6599           
6600 fi
6601
6602         
6603 fi
6604
6605       
6606 fi
6607
6608     
6609 fi
6610
6611     ;;
6612   esac
6613
6614   if test "x$lt_cv_dlopen" != xno; then
6615     enable_dlopen=yes
6616   else
6617     enable_dlopen=no
6618   fi
6619
6620   case $lt_cv_dlopen in
6621   dlopen)
6622     save_CPPFLAGS="$CPPFLAGS"
6623         test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
6624
6625     save_LDFLAGS="$LDFLAGS"
6626     eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
6627
6628     save_LIBS="$LIBS"
6629     LIBS="$lt_cv_dlopen_libs $LIBS"
6630
6631     echo $ac_n "checking whether a program can dlopen itself""... $ac_c" 1>&6
6632 echo "configure:6633: checking whether a program can dlopen itself" >&5
6633 if eval "test \"\${lt_cv_dlopen_self+set}\" = set"; then
6634   echo $ac_n "(cached) $ac_c" 1>&6
6635 else
6636           if test "$cross_compiling" = yes; then :
6637   lt_cv_dlopen_self=cross
6638 else
6639     lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
6640   lt_status=$lt_dlunknown
6641   cat > conftest.$ac_ext <<EOF
6642 #line 6643 "configure"
6643 #include "confdefs.h"
6644
6645 #if HAVE_DLFCN_H
6646 #include <dlfcn.h>
6647 #endif
6648
6649 #include <stdio.h>
6650
6651 #ifdef RTLD_GLOBAL
6652 #  define LT_DLGLOBAL           RTLD_GLOBAL
6653 #else
6654 #  ifdef DL_GLOBAL
6655 #    define LT_DLGLOBAL         DL_GLOBAL
6656 #  else
6657 #    define LT_DLGLOBAL         0
6658 #  endif
6659 #endif
6660
6661 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
6662    find out it does not work in some platform. */
6663 #ifndef LT_DLLAZY_OR_NOW
6664 #  ifdef RTLD_LAZY
6665 #    define LT_DLLAZY_OR_NOW            RTLD_LAZY
6666 #  else
6667 #    ifdef DL_LAZY
6668 #      define LT_DLLAZY_OR_NOW          DL_LAZY
6669 #    else
6670 #      ifdef RTLD_NOW
6671 #        define LT_DLLAZY_OR_NOW        RTLD_NOW
6672 #      else
6673 #        ifdef DL_NOW
6674 #          define LT_DLLAZY_OR_NOW      DL_NOW
6675 #        else
6676 #          define LT_DLLAZY_OR_NOW      0
6677 #        endif
6678 #      endif
6679 #    endif
6680 #  endif
6681 #endif
6682
6683 #ifdef __cplusplus
6684 extern "C" void exit (int);
6685 #endif
6686
6687 void fnord() { int i=42;}
6688 int main ()
6689 {
6690   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
6691   int status = $lt_dlunknown;
6692
6693   if (self)
6694     {
6695       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
6696       else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
6697       /* dlclose (self); */
6698     }
6699
6700     exit (status);
6701 }
6702 EOF
6703   if { (eval echo configure:6704: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} 2>/dev/null; then
6704     (./conftest; exit; ) 2>/dev/null
6705     lt_status=$?
6706     case x$lt_status in
6707       x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;;
6708       x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;;
6709       x$lt_unknown|x*) lt_cv_dlopen_self=no ;;
6710     esac
6711   else :
6712     # compilation failed
6713     lt_cv_dlopen_self=no
6714   fi
6715 fi
6716 rm -fr conftest*
6717
6718     
6719 fi
6720
6721 echo "$ac_t""$lt_cv_dlopen_self" 1>&6
6722
6723     if test "x$lt_cv_dlopen_self" = xyes; then
6724       LDFLAGS="$LDFLAGS $link_static_flag"
6725       echo $ac_n "checking whether a statically linked program can dlopen itself""... $ac_c" 1>&6
6726 echo "configure:6727: checking whether a statically linked program can dlopen itself" >&5
6727 if eval "test \"\${lt_cv_dlopen_self_static+set}\" = set"; then
6728   echo $ac_n "(cached) $ac_c" 1>&6
6729 else
6730           if test "$cross_compiling" = yes; then :
6731   lt_cv_dlopen_self_static=cross
6732 else
6733     lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
6734   lt_status=$lt_dlunknown
6735   cat > conftest.$ac_ext <<EOF
6736 #line 6737 "configure"
6737 #include "confdefs.h"
6738
6739 #if HAVE_DLFCN_H
6740 #include <dlfcn.h>
6741 #endif
6742
6743 #include <stdio.h>
6744
6745 #ifdef RTLD_GLOBAL
6746 #  define LT_DLGLOBAL           RTLD_GLOBAL
6747 #else
6748 #  ifdef DL_GLOBAL
6749 #    define LT_DLGLOBAL         DL_GLOBAL
6750 #  else
6751 #    define LT_DLGLOBAL         0
6752 #  endif
6753 #endif
6754
6755 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
6756    find out it does not work in some platform. */
6757 #ifndef LT_DLLAZY_OR_NOW
6758 #  ifdef RTLD_LAZY
6759 #    define LT_DLLAZY_OR_NOW            RTLD_LAZY
6760 #  else
6761 #    ifdef DL_LAZY
6762 #      define LT_DLLAZY_OR_NOW          DL_LAZY
6763 #    else
6764 #      ifdef RTLD_NOW
6765 #        define LT_DLLAZY_OR_NOW        RTLD_NOW
6766 #      else
6767 #        ifdef DL_NOW
6768 #          define LT_DLLAZY_OR_NOW      DL_NOW
6769 #        else
6770 #          define LT_DLLAZY_OR_NOW      0
6771 #        endif
6772 #      endif
6773 #    endif
6774 #  endif
6775 #endif
6776
6777 #ifdef __cplusplus
6778 extern "C" void exit (int);
6779 #endif
6780
6781 void fnord() { int i=42;}
6782 int main ()
6783 {
6784   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
6785   int status = $lt_dlunknown;
6786
6787   if (self)
6788     {
6789       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
6790       else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
6791       /* dlclose (self); */
6792     }
6793
6794     exit (status);
6795 }
6796 EOF
6797   if { (eval echo configure:6798: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} 2>/dev/null; then
6798     (./conftest; exit; ) 2>/dev/null
6799     lt_status=$?
6800     case x$lt_status in
6801       x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;;
6802       x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;;
6803       x$lt_unknown|x*) lt_cv_dlopen_self_static=no ;;
6804     esac
6805   else :
6806     # compilation failed
6807     lt_cv_dlopen_self_static=no
6808   fi
6809 fi
6810 rm -fr conftest*
6811
6812       
6813 fi
6814
6815 echo "$ac_t""$lt_cv_dlopen_self_static" 1>&6
6816     fi
6817
6818     CPPFLAGS="$save_CPPFLAGS"
6819     LDFLAGS="$save_LDFLAGS"
6820     LIBS="$save_LIBS"
6821     ;;
6822   esac
6823
6824   case $lt_cv_dlopen_self in
6825   yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
6826   *) enable_dlopen_self=unknown ;;
6827   esac
6828
6829   case $lt_cv_dlopen_self_static in
6830   yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
6831   *) enable_dlopen_self_static=unknown ;;
6832   esac
6833 fi
6834
6835
6836 if test "$enable_shared" = yes && test "$GCC" = yes; then
6837   case $archive_cmds in
6838   *'~'*)
6839     # FIXME: we may have to deal with multi-command sequences.
6840     ;;
6841   '$CC '*)
6842     # Test whether the compiler implicitly links with -lc since on some
6843     # systems, -lgcc has to come before -lc. If gcc already passes -lc
6844     # to ld, don't add -lc before -lgcc.
6845     echo $ac_n "checking whether -lc should be explicitly linked in""... $ac_c" 1>&6
6846 echo "configure:6847: checking whether -lc should be explicitly linked in" >&5
6847     if eval "test \"\${lt_cv_archive_cmds_need_lc+set}\" = set"; then
6848   echo $ac_n "(cached) $ac_c" 1>&6
6849 else
6850   $rm conftest*
6851     echo 'static int dummy;' > conftest.$ac_ext
6852
6853     if { (eval echo configure:6854: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6854       soname=conftest
6855       lib=conftest
6856       libobjs=conftest.$ac_objext
6857       deplibs=
6858       wl=$lt_cv_prog_cc_wl
6859       compiler_flags=-v
6860       linker_flags=-v
6861       verstring=
6862       output_objdir=.
6863       libname=conftest
6864       save_allow_undefined_flag=$allow_undefined_flag
6865       allow_undefined_flag=
6866       if { (eval echo configure:6867: \"$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; }
6867       then
6868         lt_cv_archive_cmds_need_lc=no
6869       else
6870         lt_cv_archive_cmds_need_lc=yes
6871       fi
6872       allow_undefined_flag=$save_allow_undefined_flag
6873     else
6874       cat conftest.err 1>&5
6875     fi
6876 fi
6877
6878     echo "$ac_t""$lt_cv_archive_cmds_need_lc" 1>&6
6879     ;;
6880   esac
6881 fi
6882 need_lc=${lt_cv_archive_cmds_need_lc-yes}
6883
6884 # The second clause should only fire when bootstrapping the
6885 # libtool distribution, otherwise you forgot to ship ltmain.sh
6886 # with your package, and you will get complaints that there are
6887 # no rules to generate ltmain.sh.
6888 if test -f "$ltmain"; then
6889   :
6890 else
6891   # If there is no Makefile yet, we rely on a make rule to execute
6892   # `config.status --recheck' to rerun these tests and create the
6893   # libtool script then.
6894   test -f Makefile && make "$ltmain"
6895 fi
6896
6897 if test -f "$ltmain"; then
6898   trap "$rm \"${ofile}T\"; exit 1" 1 2 15
6899   $rm -f "${ofile}T"
6900
6901   echo creating $ofile
6902
6903   # Now quote all the things that may contain metacharacters while being
6904   # careful not to overquote the AC_SUBSTed values.  We take copies of the
6905   # variables and quote the copies for generation of the libtool script.
6906   for var in echo old_CC old_CFLAGS SED \
6907     AR AR_FLAGS CC LD LN_S NM SHELL \
6908     reload_flag reload_cmds wl \
6909     pic_flag link_static_flag no_builtin_flag export_dynamic_flag_spec \
6910     thread_safe_flag_spec whole_archive_flag_spec libname_spec \
6911     library_names_spec soname_spec \
6912     RANLIB old_archive_cmds old_archive_from_new_cmds old_postinstall_cmds \
6913     old_postuninstall_cmds archive_cmds archive_expsym_cmds postinstall_cmds \
6914     postuninstall_cmds extract_expsyms_cmds old_archive_from_expsyms_cmds \
6915     old_striplib striplib file_magic_cmd export_symbols_cmds \
6916     deplibs_check_method allow_undefined_flag no_undefined_flag \
6917     finish_cmds finish_eval global_symbol_pipe global_symbol_to_cdecl \
6918     global_symbol_to_c_name_address \
6919     hardcode_libdir_flag_spec hardcode_libdir_separator  \
6920     sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
6921     compiler_c_o compiler_o_lo need_locks exclude_expsyms include_expsyms; do
6922
6923     case $var in
6924     reload_cmds | old_archive_cmds | old_archive_from_new_cmds | \
6925     old_postinstall_cmds | old_postuninstall_cmds | \
6926     export_symbols_cmds | archive_cmds | archive_expsym_cmds | \
6927     extract_expsyms_cmds | old_archive_from_expsyms_cmds | \
6928     postinstall_cmds | postuninstall_cmds | \
6929     finish_cmds | sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
6930       # Double-quote double-evaled strings.
6931       eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
6932       ;;
6933     *)
6934       eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
6935       ;;
6936     esac
6937   done
6938
6939   cat <<__EOF__ > "${ofile}T"
6940 #! $SHELL
6941
6942 # `$echo "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
6943 # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
6944 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
6945 #
6946 # Copyright (C) 1996-2000 Free Software Foundation, Inc.
6947 # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
6948 #
6949 # This program is free software; you can redistribute it and/or modify
6950 # it under the terms of the GNU General Public License as published by
6951 # the Free Software Foundation; either version 2 of the License, or
6952 # (at your option) any later version.
6953 #
6954 # This program is distributed in the hope that it will be useful, but
6955 # WITHOUT ANY WARRANTY; without even the implied warranty of
6956 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
6957 # General Public License for more details.
6958 #
6959 # You should have received a copy of the GNU General Public License
6960 # along with this program; if not, write to the Free Software
6961 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
6962 #
6963 # As a special exception to the GNU General Public License, if you
6964 # distribute this file as part of a program that contains a
6965 # configuration script generated by Autoconf, you may include it under
6966 # the same distribution terms that you use for the rest of that program.
6967
6968 # A sed that does not truncate output.
6969 SED=$lt_SED
6970
6971 # Sed that helps us avoid accidentally triggering echo(1) options like -n.
6972 Xsed="${SED} -e s/^X//"
6973
6974 # The HP-UX ksh and POSIX shell print the target directory to stdout
6975 # if CDPATH is set.
6976 if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
6977
6978 # ### BEGIN LIBTOOL CONFIG
6979
6980 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
6981
6982 # Shell to use when invoking shell scripts.
6983 SHELL=$lt_SHELL
6984
6985 # Whether or not to build shared libraries.
6986 build_libtool_libs=$enable_shared
6987
6988 # Whether or not to build static libraries.
6989 build_old_libs=$enable_static
6990
6991 # Whether or not to add -lc for building shared libraries.
6992 build_libtool_need_lc=$need_lc
6993
6994 # Whether or not to optimize for fast installation.
6995 fast_install=$enable_fast_install
6996
6997 # The host system.
6998 host_alias=$host_alias
6999 host=$host
7000
7001 # An echo program that does not interpret backslashes.
7002 echo=$lt_echo
7003
7004 # The archiver.
7005 AR=$lt_AR
7006 AR_FLAGS=$lt_AR_FLAGS
7007
7008 # The default C compiler.
7009 CC=$lt_CC
7010
7011 # Is the compiler the GNU C compiler?
7012 with_gcc=$GCC
7013
7014 # The linker used to build libraries.
7015 LD=$lt_LD
7016
7017 # Whether we need hard or soft links.
7018 LN_S=$lt_LN_S
7019
7020 # A BSD-compatible nm program.
7021 NM=$lt_NM
7022
7023 # A symbol stripping program
7024 STRIP=$STRIP
7025
7026 # Used to examine libraries when file_magic_cmd begins "file"
7027 MAGIC_CMD=$MAGIC_CMD
7028
7029 # Used on cygwin: DLL creation program.
7030 DLLTOOL="$DLLTOOL"
7031
7032 # Used on cygwin: object dumper.
7033 OBJDUMP="$OBJDUMP"
7034
7035 # Used on cygwin: assembler.
7036 AS="$AS"
7037
7038 # The name of the directory that contains temporary libtool files.
7039 objdir=$objdir
7040
7041 # How to create reloadable object files.
7042 reload_flag=$lt_reload_flag
7043 reload_cmds=$lt_reload_cmds
7044
7045 # How to pass a linker flag through the compiler.
7046 wl=$lt_wl
7047
7048 # Object file suffix (normally "o").
7049 objext="$ac_objext"
7050
7051 # Old archive suffix (normally "a").
7052 libext="$libext"
7053
7054 # Executable file suffix (normally "").
7055 exeext="$exeext"
7056
7057 # Additional compiler flags for building library objects.
7058 pic_flag=$lt_pic_flag
7059 pic_mode=$pic_mode
7060
7061 # Does compiler simultaneously support -c and -o options?
7062 compiler_c_o=$lt_compiler_c_o
7063
7064 # Can we write directly to a .lo ?
7065 compiler_o_lo=$lt_compiler_o_lo
7066
7067 # Must we lock files when doing compilation ?
7068 need_locks=$lt_need_locks
7069
7070 # Do we need the lib prefix for modules?
7071 need_lib_prefix=$need_lib_prefix
7072
7073 # Do we need a version for libraries?
7074 need_version=$need_version
7075
7076 # Whether dlopen is supported.
7077 dlopen_support=$enable_dlopen
7078
7079 # Whether dlopen of programs is supported.
7080 dlopen_self=$enable_dlopen_self
7081
7082 # Whether dlopen of statically linked programs is supported.
7083 dlopen_self_static=$enable_dlopen_self_static
7084
7085 # Compiler flag to prevent dynamic linking.
7086 link_static_flag=$lt_link_static_flag
7087
7088 # Compiler flag to turn off builtin functions.
7089 no_builtin_flag=$lt_no_builtin_flag
7090
7091 # Compiler flag to allow reflexive dlopens.
7092 export_dynamic_flag_spec=$lt_export_dynamic_flag_spec
7093
7094 # Compiler flag to generate shared objects directly from archives.
7095 whole_archive_flag_spec=$lt_whole_archive_flag_spec
7096
7097 # Compiler flag to generate thread-safe objects.
7098 thread_safe_flag_spec=$lt_thread_safe_flag_spec
7099
7100 # Library versioning type.
7101 version_type=$version_type
7102
7103 # Format of library name prefix.
7104 libname_spec=$lt_libname_spec
7105
7106 # List of archive names.  First name is the real one, the rest are links.
7107 # The last name is the one that the linker finds with -lNAME.
7108 library_names_spec=$lt_library_names_spec
7109
7110 # The coded name of the library, if different from the real name.
7111 soname_spec=$lt_soname_spec
7112
7113 # Commands used to build and install an old-style archive.
7114 RANLIB=$lt_RANLIB
7115 old_archive_cmds=$lt_old_archive_cmds
7116 old_postinstall_cmds=$lt_old_postinstall_cmds
7117 old_postuninstall_cmds=$lt_old_postuninstall_cmds
7118
7119 # Create an old-style archive from a shared archive.
7120 old_archive_from_new_cmds=$lt_old_archive_from_new_cmds
7121
7122 # Create a temporary old-style archive to link instead of a shared archive.
7123 old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds
7124
7125 # Commands used to build and install a shared archive.
7126 archive_cmds=$lt_archive_cmds
7127 archive_expsym_cmds=$lt_archive_expsym_cmds
7128 postinstall_cmds=$lt_postinstall_cmds
7129 postuninstall_cmds=$lt_postuninstall_cmds
7130
7131 # Commands to strip libraries.
7132 old_striplib=$lt_old_striplib
7133 striplib=$lt_striplib
7134
7135 # Method to check whether dependent libraries are shared objects.
7136 deplibs_check_method=$lt_deplibs_check_method
7137
7138 # Command to use when deplibs_check_method == file_magic.
7139 file_magic_cmd=$lt_file_magic_cmd
7140
7141 # Flag that allows shared libraries with undefined symbols to be built.
7142 allow_undefined_flag=$lt_allow_undefined_flag
7143
7144 # Flag that forces no undefined symbols.
7145 no_undefined_flag=$lt_no_undefined_flag
7146
7147 # Commands used to finish a libtool library installation in a directory.
7148 finish_cmds=$lt_finish_cmds
7149
7150 # Same as above, but a single script fragment to be evaled but not shown.
7151 finish_eval=$lt_finish_eval
7152
7153 # Take the output of nm and produce a listing of raw symbols and C names.
7154 global_symbol_pipe=$lt_global_symbol_pipe
7155
7156 # Transform the output of nm in a proper C declaration
7157 global_symbol_to_cdecl=$lt_global_symbol_to_cdecl
7158
7159 # Transform the output of nm in a C name address pair
7160 global_symbol_to_c_name_address=$lt_global_symbol_to_c_name_address
7161
7162 # This is the shared library runtime path variable.
7163 runpath_var=$runpath_var
7164
7165 # This is the shared library path variable.
7166 shlibpath_var=$shlibpath_var
7167
7168 # Is shlibpath searched before the hard-coded library search path?
7169 shlibpath_overrides_runpath=$shlibpath_overrides_runpath
7170
7171 # How to hardcode a shared library path into an executable.
7172 hardcode_action=$hardcode_action
7173
7174 # Whether we should hardcode library paths into libraries.
7175 hardcode_into_libs=$hardcode_into_libs
7176
7177 # Flag to hardcode \$libdir into a binary during linking.
7178 # This must work even if \$libdir does not exist.
7179 hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
7180
7181 # Whether we need a single -rpath flag with a separated argument.
7182 hardcode_libdir_separator=$lt_hardcode_libdir_separator
7183
7184 # Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
7185 # resulting binary.
7186 hardcode_direct=$hardcode_direct
7187
7188 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
7189 # resulting binary.
7190 hardcode_minus_L=$hardcode_minus_L
7191
7192 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
7193 # the resulting binary.
7194 hardcode_shlibpath_var=$hardcode_shlibpath_var
7195
7196 # Variables whose values should be saved in libtool wrapper scripts and
7197 # restored at relink time.
7198 variables_saved_for_relink="$variables_saved_for_relink"
7199
7200 # Whether libtool must link a program against all its dependency libraries.
7201 link_all_deplibs=$link_all_deplibs
7202
7203 # Compile-time system search path for libraries
7204 sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
7205
7206 # Run-time system search path for libraries
7207 sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
7208
7209 # Fix the shell variable \$srcfile for the compiler.
7210 fix_srcfile_path="$fix_srcfile_path"
7211
7212 # Set to yes if exported symbols are required.
7213 always_export_symbols=$always_export_symbols
7214
7215 # The commands to list exported symbols.
7216 export_symbols_cmds=$lt_export_symbols_cmds
7217
7218 # The commands to extract the exported symbol list from a shared archive.
7219 extract_expsyms_cmds=$lt_extract_expsyms_cmds
7220
7221 # Symbols that should not be listed in the preloaded symbols.
7222 exclude_expsyms=$lt_exclude_expsyms
7223
7224 # Symbols that must always be exported.
7225 include_expsyms=$lt_include_expsyms
7226
7227 # ### END LIBTOOL CONFIG
7228
7229 __EOF__
7230
7231   case $host_os in
7232   aix3*)
7233     cat <<\EOF >> "${ofile}T"
7234
7235 # AIX sometimes has problems with the GCC collect2 program.  For some
7236 # reason, if we set the COLLECT_NAMES environment variable, the problems
7237 # vanish in a puff of smoke.
7238 if test "X${COLLECT_NAMES+set}" != Xset; then
7239   COLLECT_NAMES=
7240   export COLLECT_NAMES
7241 fi
7242 EOF
7243     ;;
7244   esac
7245
7246   case $host_os in
7247   cygwin* | mingw* | pw32* | os2*)
7248     cat <<'EOF' >> "${ofile}T"
7249       # This is a source program that is used to create dlls on Windows
7250       # Don't remove nor modify the starting and closing comments
7251 # /* ltdll.c starts here */
7252 # #define WIN32_LEAN_AND_MEAN
7253 # #include <windows.h>
7254 # #undef WIN32_LEAN_AND_MEAN
7255 # #include <stdio.h>
7256 #
7257 # #ifndef __CYGWIN__
7258 # #  ifdef __CYGWIN32__
7259 # #    define __CYGWIN__ __CYGWIN32__
7260 # #  endif
7261 # #endif
7262 #
7263 # #ifdef __cplusplus
7264 # extern "C" {
7265 # #endif
7266 # BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
7267 # #ifdef __cplusplus
7268 # }
7269 # #endif
7270 #
7271 # #ifdef __CYGWIN__
7272 # #include <cygwin/cygwin_dll.h>
7273 # DECLARE_CYGWIN_DLL( DllMain );
7274 # #endif
7275 # HINSTANCE __hDllInstance_base;
7276 #
7277 # BOOL APIENTRY
7278 # DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
7279 # {
7280 #   __hDllInstance_base = hInst;
7281 #   return TRUE;
7282 # }
7283 # /* ltdll.c ends here */
7284         # This is a source program that is used to create import libraries
7285         # on Windows for dlls which lack them. Don't remove nor modify the
7286         # starting and closing comments
7287 # /* impgen.c starts here */
7288 # /*   Copyright (C) 1999-2000 Free Software Foundation, Inc.
7289 #
7290 #  This file is part of GNU libtool.
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,
7298 #  but WITHOUT ANY WARRANTY; without even the implied warranty of
7299 #  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
7300 #  GNU 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 #
7307 # #include <stdio.h>            /* for printf() */
7308 # #include <unistd.h>           /* for open(), lseek(), read() */
7309 # #include <fcntl.h>            /* for O_RDONLY, O_BINARY */
7310 # #include <string.h>           /* for strdup() */
7311 #
7312 # /* O_BINARY isn't required (or even defined sometimes) under Unix */
7313 # #ifndef O_BINARY
7314 # #define O_BINARY 0
7315 # #endif
7316 #
7317 # static unsigned int
7318 # pe_get16 (fd, offset)
7319 #      int fd;
7320 #      int offset;
7321 # {
7322 #   unsigned char b[2];
7323 #   lseek (fd, offset, SEEK_SET);
7324 #   read (fd, b, 2);
7325 #   return b[0] + (b[1]<<8);
7326 # }
7327 #
7328 # static unsigned int
7329 # pe_get32 (fd, offset)
7330 #     int fd;
7331 #     int offset;
7332 # {
7333 #   unsigned char b[4];
7334 #   lseek (fd, offset, SEEK_SET);
7335 #   read (fd, b, 4);
7336 #   return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
7337 # }
7338 #
7339 # static unsigned int
7340 # pe_as32 (ptr)
7341 #      void *ptr;
7342 # {
7343 #   unsigned char *b = ptr;
7344 #   return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
7345 # }
7346 #
7347 # int
7348 # main (argc, argv)
7349 #     int argc;
7350 #     char *argv[];
7351 # {
7352 #     int dll;
7353 #     unsigned long pe_header_offset, opthdr_ofs, num_entries, i;
7354 #     unsigned long export_rva, export_size, nsections, secptr, expptr;
7355 #     unsigned long name_rvas, nexp;
7356 #     unsigned char *expdata, *erva;
7357 #     char *filename, *dll_name;
7358 #
7359 #     filename = argv[1];
7360 #
7361 #     dll = open(filename, O_RDONLY|O_BINARY);
7362 #     if (dll < 1)
7363 #       return 1;
7364 #
7365 #     dll_name = filename;
7366 #
7367 #     for (i=0; filename[i]; i++)
7368 #       if (filename[i] == '/' || filename[i] == '\\'  || filename[i] == ':')
7369 #           dll_name = filename + i +1;
7370 #
7371 #     pe_header_offset = pe_get32 (dll, 0x3c);
7372 #     opthdr_ofs = pe_header_offset + 4 + 20;
7373 #     num_entries = pe_get32 (dll, opthdr_ofs + 92);
7374 #
7375 #     if (num_entries < 1) /* no exports */
7376 #       return 1;
7377 #
7378 #     export_rva = pe_get32 (dll, opthdr_ofs + 96);
7379 #     export_size = pe_get32 (dll, opthdr_ofs + 100);
7380 #     nsections = pe_get16 (dll, pe_header_offset + 4 +2);
7381 #     secptr = (pe_header_offset + 4 + 20 +
7382 #             pe_get16 (dll, pe_header_offset + 4 + 16));
7383 #
7384 #     expptr = 0;
7385 #     for (i = 0; i < nsections; i++)
7386 #     {
7387 #       char sname[8];
7388 #       unsigned long secptr1 = secptr + 40 * i;
7389 #       unsigned long vaddr = pe_get32 (dll, secptr1 + 12);
7390 #       unsigned long vsize = pe_get32 (dll, secptr1 + 16);
7391 #       unsigned long fptr = pe_get32 (dll, secptr1 + 20);
7392 #       lseek(dll, secptr1, SEEK_SET);
7393 #       read(dll, sname, 8);
7394 #       if (vaddr <= export_rva && vaddr+vsize > export_rva)
7395 #       {
7396 #           expptr = fptr + (export_rva - vaddr);
7397 #           if (export_rva + export_size > vaddr + vsize)
7398 #               export_size = vsize - (export_rva - vaddr);
7399 #           break;
7400 #       }
7401 #     }
7402 #
7403 #     expdata = (unsigned char*)malloc(export_size);
7404 #     lseek (dll, expptr, SEEK_SET);
7405 #     read (dll, expdata, export_size);
7406 #     erva = expdata - export_rva;
7407 #
7408 #     nexp = pe_as32 (expdata+24);
7409 #     name_rvas = pe_as32 (expdata+32);
7410 #
7411 #     printf ("EXPORTS\n");
7412 #     for (i = 0; i<nexp; i++)
7413 #     {
7414 #       unsigned long name_rva = pe_as32 (erva+name_rvas+i*4);
7415 #       printf ("\t%s @ %ld ;\n", erva+name_rva, 1+ i);
7416 #     }
7417 #
7418 #     return 0;
7419 # }
7420 # /* impgen.c ends here */
7421
7422 EOF
7423     ;;
7424   esac
7425
7426   # We use sed instead of cat because bash on DJGPP gets confused if
7427   # if finds mixed CR/LF and LF-only lines.  Since sed operates in
7428   # text mode, it properly converts lines to CR/LF.  This bash problem
7429   # is reportedly fixed, but why not run on old versions too?
7430   sed '$q' "$ltmain" >> "${ofile}T" || (rm -f "${ofile}T"; exit 1)
7431
7432   mv -f "${ofile}T" "$ofile" || \
7433     (rm -f "$ofile" && cp "${ofile}T" "$ofile" && rm -f "${ofile}T")
7434   chmod +x "$ofile"
7435 fi
7436
7437
7438
7439
7440
7441 # This can be used to rebuild libtool when needed
7442 LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
7443
7444 # Always use our own libtool.
7445 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
7446
7447 # Prevent multiple expansion
7448
7449
7450
7451 # test for ln hardlink support
7452 echo $ac_n "checking whether ln works""... $ac_c" 1>&6
7453 echo "configure:7454: checking whether ln works" >&5
7454 if eval "test \"\${ol_cv_prog_LN_H+set}\" = set"; then
7455   echo $ac_n "(cached) $ac_c" 1>&6
7456 else
7457   rm -f conftest.src conftest.dst
7458 echo "conftest" > conftest.src
7459 if ln conftest.src conftest.dst 2>/dev/null
7460 then
7461   ol_cv_prog_LN_H="ln"
7462 else
7463   ol_cv_prog_LN_H="cp"
7464 fi
7465 rm -f conftest.src conftest.dst
7466
7467 fi
7468 LN_H="$ol_cv_prog_LN_H"
7469 if test "$ol_cv_prog_LN_H" = "ln"; then
7470         echo "$ac_t""yes" 1>&6
7471 else
7472         echo "$ac_t""no" 1>&6
7473 fi
7474
7475 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
7476 echo "configure:7477: checking whether ln -s works" >&5
7477 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
7478   echo $ac_n "(cached) $ac_c" 1>&6
7479 else
7480   rm -f conftestdata
7481 if ln -s X conftestdata 2>/dev/null
7482 then
7483   rm -f conftestdata
7484   ac_cv_prog_LN_S="ln -s"
7485 else
7486   ac_cv_prog_LN_S=ln
7487 fi
7488 fi
7489 LN_S="$ac_cv_prog_LN_S"
7490 if test "$ac_cv_prog_LN_S" = "ln -s"; then
7491   echo "$ac_t""yes" 1>&6
7492 else
7493   echo "$ac_t""no" 1>&6
7494 fi
7495
7496
7497 ol_link_perl=no
7498 if test $ol_enable_perl != no ; then
7499         # Extract the first word of "perl", so it can be a program name with args.
7500 set dummy perl; ac_word=$2
7501 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
7502 echo "configure:7503: checking for $ac_word" >&5
7503 if eval "test \"\${ac_cv_path_PERLBIN+set}\" = set"; then
7504   echo $ac_n "(cached) $ac_c" 1>&6
7505 else
7506   case "$PERLBIN" in
7507   /*)
7508   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a path.
7509   ;;
7510   ?:/*)
7511   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a dos path.
7512   ;;
7513   *)
7514   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
7515   ac_dummy="$PATH"
7516   for ac_dir in $ac_dummy; do 
7517     test -z "$ac_dir" && ac_dir=.
7518     if test -f $ac_dir/$ac_word; then
7519       ac_cv_path_PERLBIN="$ac_dir/$ac_word"
7520       break
7521     fi
7522   done
7523   IFS="$ac_save_ifs"
7524   test -z "$ac_cv_path_PERLBIN" && ac_cv_path_PERLBIN="/usr/bin/perl"
7525   ;;
7526 esac
7527 fi
7528 PERLBIN="$ac_cv_path_PERLBIN"
7529 if test -n "$PERLBIN"; then
7530   echo "$ac_t""$PERLBIN" 1>&6
7531 else
7532   echo "$ac_t""no" 1>&6
7533 fi
7534
7535
7536         if test "no$PERLBIN" = "no" ; then
7537                 if test $ol_enable_perl = yes ; then
7538                         { echo "configure: error: could not locate perl" 1>&2; exit 1; }
7539                 fi
7540
7541         else
7542                 PERL_CPPFLAGS="`$PERLBIN -MExtUtils::Embed -e ccopts`"
7543                 PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e 's/ -lc / /' -e 's/ -lc$//'`"
7544
7545                 if test x"$ol_enable_perl" = "xyes" ; then
7546                         SLAPD_PERL_LDFLAGS="$PERL_LDFLAGS"
7547                 else
7548                         MOD_PERL_LDFLAGS="$PERL_LDFLAGS"
7549                 fi
7550                                 ol_link_perl=yes
7551         fi
7552 fi
7553
7554 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
7555 echo "configure:7556: checking how to run the C preprocessor" >&5
7556 # On Suns, sometimes $CPP names a directory.
7557 if test -n "$CPP" && test -d "$CPP"; then
7558   CPP=
7559 fi
7560 if test -z "$CPP"; then
7561 if eval "test \"\${ac_cv_prog_CPP+set}\" = set"; then
7562   echo $ac_n "(cached) $ac_c" 1>&6
7563 else
7564     # This must be in double quotes, not single quotes, because CPP may get
7565   # substituted into the Makefile and "${CC-cc}" will confuse make.
7566   CPP="${CC-cc} -E"
7567   # On the NeXT, cc -E runs the code through the compiler's parser,
7568   # not just through cpp.
7569   cat > conftest.$ac_ext <<EOF
7570 #line 7571 "configure"
7571 #include "confdefs.h"
7572 #include <assert.h>
7573 Syntax Error
7574 EOF
7575 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7576 { (eval echo configure:7577: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7577 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7578 if test -z "$ac_err"; then
7579   :
7580 else
7581   echo "$ac_err" >&5
7582   echo "configure: failed program was:" >&5
7583   cat conftest.$ac_ext >&5
7584   rm -rf conftest*
7585   CPP="${CC-cc} -E -traditional-cpp"
7586   cat > conftest.$ac_ext <<EOF
7587 #line 7588 "configure"
7588 #include "confdefs.h"
7589 #include <assert.h>
7590 Syntax Error
7591 EOF
7592 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7593 { (eval echo configure:7594: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7594 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7595 if test -z "$ac_err"; then
7596   :
7597 else
7598   echo "$ac_err" >&5
7599   echo "configure: failed program was:" >&5
7600   cat conftest.$ac_ext >&5
7601   rm -rf conftest*
7602   CPP="${CC-cc} -nologo -E"
7603   cat > conftest.$ac_ext <<EOF
7604 #line 7605 "configure"
7605 #include "confdefs.h"
7606 #include <assert.h>
7607 Syntax Error
7608 EOF
7609 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7610 { (eval echo configure:7611: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7611 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7612 if test -z "$ac_err"; then
7613   :
7614 else
7615   echo "$ac_err" >&5
7616   echo "configure: failed program was:" >&5
7617   cat conftest.$ac_ext >&5
7618   rm -rf conftest*
7619   CPP=/lib/cpp
7620 fi
7621 rm -f conftest*
7622 fi
7623 rm -f conftest*
7624 fi
7625 rm -f conftest*
7626   ac_cv_prog_CPP="$CPP"
7627 fi
7628   CPP="$ac_cv_prog_CPP"
7629 else
7630   ac_cv_prog_CPP="$CPP"
7631 fi
7632 echo "$ac_t""$CPP" 1>&6
7633
7634
7635
7636 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
7637 echo "configure:7638: checking for Cygwin environment" >&5
7638 if eval "test \"\${ac_cv_cygwin+set}\" = set"; then
7639   echo $ac_n "(cached) $ac_c" 1>&6
7640 else
7641   cat > conftest.$ac_ext <<EOF
7642 #line 7643 "configure"
7643 #include "confdefs.h"
7644
7645 int main() {
7646
7647 #ifndef __CYGWIN__
7648 #define __CYGWIN__ __CYGWIN32__
7649 #endif
7650 return __CYGWIN__;
7651 ; return 0; }
7652 EOF
7653 if { (eval echo configure:7654: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7654   rm -rf conftest*
7655   ac_cv_cygwin=yes
7656 else
7657   echo "configure: failed program was:" >&5
7658   cat conftest.$ac_ext >&5
7659   rm -rf conftest*
7660   ac_cv_cygwin=no
7661 fi
7662 rm -f conftest*
7663 fi
7664
7665 echo "$ac_t""$ac_cv_cygwin" 1>&6
7666 CYGWIN=
7667 test "$ac_cv_cygwin" = yes && CYGWIN=yes
7668 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
7669 echo "configure:7670: checking for mingw32 environment" >&5
7670 if eval "test \"\${ac_cv_mingw32+set}\" = set"; then
7671   echo $ac_n "(cached) $ac_c" 1>&6
7672 else
7673   cat > conftest.$ac_ext <<EOF
7674 #line 7675 "configure"
7675 #include "confdefs.h"
7676
7677 int main() {
7678 return __MINGW32__;
7679 ; return 0; }
7680 EOF
7681 if { (eval echo configure:7682: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7682   rm -rf conftest*
7683   ac_cv_mingw32=yes
7684 else
7685   echo "configure: failed program was:" >&5
7686   cat conftest.$ac_ext >&5
7687   rm -rf conftest*
7688   ac_cv_mingw32=no
7689 fi
7690 rm -f conftest*
7691 fi
7692
7693 echo "$ac_t""$ac_cv_mingw32" 1>&6
7694 MINGW32=
7695 test "$ac_cv_mingw32" = yes && MINGW32=yes
7696
7697
7698
7699 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
7700 echo "configure:7701: checking for executable suffix" >&5
7701 if eval "test \"\${ac_cv_exeext+set}\" = set"; then
7702   echo $ac_n "(cached) $ac_c" 1>&6
7703 else
7704   if test "$CYGWIN" = yes || test "$MINGW32" = yes || test "$EMXOS2" = yes; then
7705   ac_cv_exeext=.exe
7706 else
7707   rm -f conftest*
7708   echo 'int main () { return 0; }' > conftest.$ac_ext
7709   ac_cv_exeext=
7710   if { (eval echo configure:7711: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
7711     for file in conftest.*; do
7712       case $file in
7713       *.c | *.C | *.o | *.obj | *.xcoff) ;;
7714       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
7715       esac
7716     done
7717   else
7718     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
7719   fi
7720   rm -f conftest*
7721   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
7722 fi
7723 fi
7724
7725 EXEEXT=""
7726 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
7727 echo "$ac_t""${ac_cv_exeext}" 1>&6
7728 ac_exeext=$EXEEXT
7729
7730 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
7731 echo "configure:7732: checking for object suffix" >&5
7732 if eval "test \"\${ac_cv_objext+set}\" = set"; then
7733   echo $ac_n "(cached) $ac_c" 1>&6
7734 else
7735   rm -f conftest*
7736 echo 'int i = 1;' > conftest.$ac_ext
7737 if { (eval echo configure:7738: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7738   for ac_file in conftest.*; do
7739     case $ac_file in
7740     *.c) ;;
7741     *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
7742     esac
7743   done
7744 else
7745   { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
7746 fi
7747 rm -f conftest*
7748 fi
7749
7750 echo "$ac_t""$ac_cv_objext" 1>&6
7751 OBJEXT=$ac_cv_objext
7752 ac_objext=$ac_cv_objext
7753
7754
7755 cat >> confdefs.h <<EOF
7756 #define EXEEXT "${EXEEXT}"
7757 EOF
7758
7759
7760 echo $ac_n "checking for be_app in -lbe""... $ac_c" 1>&6
7761 echo "configure:7762: checking for be_app in -lbe" >&5
7762 ac_lib_var=`echo be'_'be_app | sed 'y%./+-:%__p__%'`
7763 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
7764   echo $ac_n "(cached) $ac_c" 1>&6
7765 else
7766   ac_save_LIBS="$LIBS"
7767 LIBS="-lbe -lroot -lnet $LIBS"
7768 cat > conftest.$ac_ext <<EOF
7769 #line 7770 "configure"
7770 #include "confdefs.h"
7771 /* Override any gcc2 internal prototype to avoid an error.  */
7772 /* We use char because int might match the return type of a gcc2
7773     builtin and then its argument prototype would still apply.  */
7774 char be_app();
7775
7776 int main() {
7777 be_app()
7778 ; return 0; }
7779 EOF
7780 if { (eval echo configure:7781: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7781   rm -rf conftest*
7782   eval "ac_cv_lib_$ac_lib_var=yes"
7783 else
7784   echo "configure: failed program was:" >&5
7785   cat conftest.$ac_ext >&5
7786   rm -rf conftest*
7787   eval "ac_cv_lib_$ac_lib_var=no"
7788 fi
7789 rm -f conftest*
7790 LIBS="$ac_save_LIBS"
7791
7792 fi
7793 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7794   echo "$ac_t""yes" 1>&6
7795   LIBS="$LIBS -lbe -lroot -lnet"
7796 else
7797   echo "$ac_t""no" 1>&6
7798 :
7799 fi
7800
7801
7802
7803
7804
7805 echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
7806 echo "configure:7807: checking for ${CC-cc} option to accept ANSI C" >&5
7807 if eval "test \"\${am_cv_prog_cc_stdc+set}\" = set"; then
7808   echo $ac_n "(cached) $ac_c" 1>&6
7809 else
7810   am_cv_prog_cc_stdc=no
7811 ac_save_CC="$CC"
7812 # Don't try gcc -ansi; that turns off useful extensions and
7813 # breaks some systems' header files.
7814 # AIX                   -qlanglvl=ansi
7815 # Ultrix and OSF/1      -std1
7816 # HP-UX 10.20 and later -Ae
7817 # HP-UX older versions  -Aa -D_HPUX_SOURCE
7818 # SVR4                  -Xc -D__EXTENSIONS__
7819 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
7820 do
7821   CC="$ac_save_CC $ac_arg"
7822   cat > conftest.$ac_ext <<EOF
7823 #line 7824 "configure"
7824 #include "confdefs.h"
7825 #include <stdarg.h>
7826 #include <stdio.h>
7827 #include <sys/types.h>
7828 #include <sys/stat.h>
7829 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
7830 struct buf { int x; };
7831 FILE * (*rcsopen) (struct buf *, struct stat *, int);
7832 static char *e (p, i)
7833      char **p;
7834      int i;
7835 {
7836   return p[i];
7837 }
7838 static char *f (char * (*g) (char **, int), char **p, ...)
7839 {
7840   char *s;
7841   va_list v;
7842   va_start (v,p);
7843   s = g (p, va_arg (v,int));
7844   va_end (v);
7845   return s;
7846 }
7847 int test (int i, double x);
7848 struct s1 {int (*f) (int a);};
7849 struct s2 {int (*f) (double a);};
7850 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
7851 int argc;
7852 char **argv;
7853
7854 int main() {
7855
7856 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
7857
7858 ; return 0; }
7859 EOF
7860 if { (eval echo configure:7861: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7861   rm -rf conftest*
7862   am_cv_prog_cc_stdc="$ac_arg"; break
7863 else
7864   echo "configure: failed program was:" >&5
7865   cat conftest.$ac_ext >&5
7866 fi
7867 rm -f conftest*
7868 done
7869 CC="$ac_save_CC"
7870
7871 fi
7872
7873 if test -z "$am_cv_prog_cc_stdc"; then
7874   echo "$ac_t""none needed" 1>&6
7875 else
7876   echo "$ac_t""$am_cv_prog_cc_stdc" 1>&6
7877 fi
7878 case "x$am_cv_prog_cc_stdc" in
7879   x|xno) ;;
7880   *) CC="$CC $am_cv_prog_cc_stdc" ;;
7881 esac
7882
7883 if test "X${am_cv_prog_cc_stdc}" = "Xno" ; then
7884         { echo "configure: error: OpenLDAP requires compiler to support STDC constructs." 1>&2; exit 1; }
7885 fi
7886
7887 # test for make depend flag
7888 OL_MKDEP=
7889 OL_MKDEP_FLAGS=
7890 if test -z "${MKDEP}"; then
7891         OL_MKDEP="${CC-cc}"
7892         if test -z "${MKDEP_FLAGS}"; then
7893                 echo $ac_n "checking for ${OL_MKDEP} depend flag""... $ac_c" 1>&6
7894 echo "configure:7895: checking for ${OL_MKDEP} depend flag" >&5
7895 if eval "test \"\${ol_cv_mkdep+set}\" = set"; then
7896   echo $ac_n "(cached) $ac_c" 1>&6
7897 else
7898   
7899                         ol_cv_mkdep=no
7900                         for flag in "-M" "-xM"; do
7901                                 cat > conftest.c <<EOF
7902  noCode;
7903 EOF
7904                                 if { ac_try='$OL_MKDEP $flag conftest.c'; { (eval echo configure:7905: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } \
7905                                         | egrep '^conftest\.'"${ac_objext}" >/dev/null 2>&1
7906                                 then
7907                                         if test ! -f conftest."${ac_object}" ; then
7908                                                 ol_cv_mkdep=$flag
7909                                                 OL_MKDEP_FLAGS="$flag"
7910                                                 break
7911                                         fi
7912                                 fi
7913                         done
7914                         rm -f conftest*
7915                 
7916 fi
7917
7918 echo "$ac_t""$ol_cv_mkdep" 1>&6
7919         else
7920                 cc_cv_mkdep=yes
7921                 OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
7922         fi
7923 else
7924         cc_cv_mkdep=yes
7925         OL_MKDEP="${MKDEP}"
7926         OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
7927 fi
7928
7929
7930
7931 if test "${ol_cv_mkdep}" = no ; then
7932         # this will soon become an error
7933         echo "configure: warning: do not know how to generate dependencies" 1>&2
7934 fi
7935
7936 echo $ac_n "checking for afopen in -ls""... $ac_c" 1>&6
7937 echo "configure:7938: checking for afopen in -ls" >&5
7938 ac_lib_var=`echo s'_'afopen | sed 'y%./+-:%__p__%'`
7939 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
7940   echo $ac_n "(cached) $ac_c" 1>&6
7941 else
7942   ac_save_LIBS="$LIBS"
7943 LIBS="-ls  $LIBS"
7944 cat > conftest.$ac_ext <<EOF
7945 #line 7946 "configure"
7946 #include "confdefs.h"
7947 /* Override any gcc2 internal prototype to avoid an error.  */
7948 /* We use char because int might match the return type of a gcc2
7949     builtin and then its argument prototype would still apply.  */
7950 char afopen();
7951
7952 int main() {
7953 afopen()
7954 ; return 0; }
7955 EOF
7956 if { (eval echo configure:7957: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7957   rm -rf conftest*
7958   eval "ac_cv_lib_$ac_lib_var=yes"
7959 else
7960   echo "configure: failed program was:" >&5
7961   cat conftest.$ac_ext >&5
7962   rm -rf conftest*
7963   eval "ac_cv_lib_$ac_lib_var=no"
7964 fi
7965 rm -f conftest*
7966 LIBS="$ac_save_LIBS"
7967
7968 fi
7969 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7970   echo "$ac_t""yes" 1>&6
7971   
7972         AUTH_LIBS=-ls
7973         cat >> confdefs.h <<\EOF
7974 #define HAVE_AIX_SECURITY 1
7975 EOF
7976
7977
7978 else
7979   echo "$ac_t""no" 1>&6
7980 fi
7981
7982
7983 case "$target" in
7984 *-ibm-openedition)
7985         ac_cv_func_getopt=no
7986         cat >> confdefs.h <<\EOF
7987 #define BOTH_STRINGS_H 1
7988 EOF
7989
7990         ;;
7991 esac
7992
7993 ol_link_modules=no
7994 if test $ol_enable_modules != no ; then
7995         for ac_hdr in ltdl.h
7996 do
7997 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7998 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7999 echo "configure:8000: checking for $ac_hdr" >&5
8000 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
8001   echo $ac_n "(cached) $ac_c" 1>&6
8002 else
8003   cat > conftest.$ac_ext <<EOF
8004 #line 8005 "configure"
8005 #include "confdefs.h"
8006 #include <$ac_hdr>
8007 EOF
8008 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8009 { (eval echo configure:8010: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8010 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8011 if test -z "$ac_err"; then
8012   rm -rf conftest*
8013   eval "ac_cv_header_$ac_safe=yes"
8014 else
8015   echo "$ac_err" >&5
8016   echo "configure: failed program was:" >&5
8017   cat conftest.$ac_ext >&5
8018   rm -rf conftest*
8019   eval "ac_cv_header_$ac_safe=no"
8020 fi
8021 rm -f conftest*
8022 fi
8023 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8024   echo "$ac_t""yes" 1>&6
8025     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8026   cat >> confdefs.h <<EOF
8027 #define $ac_tr_hdr 1
8028 EOF
8029  
8030 else
8031   echo "$ac_t""no" 1>&6
8032 fi
8033 done
8034
8035
8036         if test $ac_cv_header_ltdl_h = no ; then
8037                 { echo "configure: error: could not locate libtool ltdl.h" 1>&2; exit 1; }
8038         fi
8039
8040         echo $ac_n "checking for lt_dlinit in -lltdl""... $ac_c" 1>&6
8041 echo "configure:8042: checking for lt_dlinit in -lltdl" >&5
8042 ac_lib_var=`echo ltdl'_'lt_dlinit | sed 'y%./+-:%__p__%'`
8043 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8044   echo $ac_n "(cached) $ac_c" 1>&6
8045 else
8046   ac_save_LIBS="$LIBS"
8047 LIBS="-lltdl  $LIBS"
8048 cat > conftest.$ac_ext <<EOF
8049 #line 8050 "configure"
8050 #include "confdefs.h"
8051 /* Override any gcc2 internal prototype to avoid an error.  */
8052 /* We use char because int might match the return type of a gcc2
8053     builtin and then its argument prototype would still apply.  */
8054 char lt_dlinit();
8055
8056 int main() {
8057 lt_dlinit()
8058 ; return 0; }
8059 EOF
8060 if { (eval echo configure:8061: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8061   rm -rf conftest*
8062   eval "ac_cv_lib_$ac_lib_var=yes"
8063 else
8064   echo "configure: failed program was:" >&5
8065   cat conftest.$ac_ext >&5
8066   rm -rf conftest*
8067   eval "ac_cv_lib_$ac_lib_var=no"
8068 fi
8069 rm -f conftest*
8070 LIBS="$ac_save_LIBS"
8071
8072 fi
8073 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8074   echo "$ac_t""yes" 1>&6
8075   
8076                 MODULES_LIBS=-lltdl
8077                 cat >> confdefs.h <<\EOF
8078 #define HAVE_LIBLTDL 1
8079 EOF
8080
8081         
8082 else
8083   echo "$ac_t""no" 1>&6
8084 fi
8085
8086
8087         if test "$ac_cv_lib_ltdl_lt_dlinit" = no ; then
8088                 { echo "configure: error: could not locate libtool -lltdl" 1>&2; exit 1; }
8089         fi
8090         ol_link_modules=yes
8091
8092 else
8093         for i in $Backends; do
8094                 eval "ol_tmp=\$ol_enable_$i"
8095                 if test $ol_tmp = mod ; then
8096                         echo "configure: warning: building static $i backend" 1>&2
8097                         eval "ol_enable_$i=yes"
8098                 fi
8099         done
8100         for i in $Overlays; do
8101                 eval "ol_tmp=\$ol_enable_$i"
8102                 if test $ol_tmp = mod ; then
8103                         echo "configure: warning: building static $i overlay" 1>&2
8104                         eval "ol_enable_$i=yes"
8105                 fi
8106         done
8107 fi
8108
8109 # test for EBCDIC
8110 echo $ac_n "checking for EBCDIC""... $ac_c" 1>&6
8111 echo "configure:8112: checking for EBCDIC" >&5
8112 if eval "test \"\${ol_cv_cpp_ebcdic+set}\" = set"; then
8113   echo $ac_n "(cached) $ac_c" 1>&6
8114 else
8115   
8116         cat > conftest.$ac_ext <<EOF
8117 #line 8118 "configure"
8118 #include "confdefs.h"
8119
8120 #if !('M' == 0xd4)
8121 #include <__ASCII__/generate_error.h>
8122 #endif
8123
8124 EOF
8125 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8126 { (eval echo configure:8127: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8127 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8128 if test -z "$ac_err"; then
8129   rm -rf conftest*
8130   ol_cv_cpp_ebcdic=yes
8131 else
8132   echo "$ac_err" >&5
8133   echo "configure: failed program was:" >&5
8134   cat conftest.$ac_ext >&5
8135   rm -rf conftest*
8136   ol_cv_cpp_ebcdic=no
8137 fi
8138 rm -f conftest*
8139 fi
8140
8141 echo "$ac_t""$ol_cv_cpp_ebcdic" 1>&6
8142 if test $ol_cv_cpp_ebcdic = yes ; then
8143         cat >> confdefs.h <<\EOF
8144 #define HAVE_EBCDIC 1
8145 EOF
8146
8147 fi
8148
8149 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
8150 echo "configure:8151: checking for ANSI C header files" >&5
8151 if eval "test \"\${ol_cv_header_stdc+set}\" = set"; then
8152   echo $ac_n "(cached) $ac_c" 1>&6
8153 else
8154   cat > conftest.$ac_ext <<EOF
8155 #line 8156 "configure"
8156 #include "confdefs.h"
8157 #include <stdlib.h>
8158 #include <stdarg.h>
8159 #include <string.h>
8160 #include <float.h>
8161 EOF
8162 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8163 { (eval echo configure:8164: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8164 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8165 if test -z "$ac_err"; then
8166   rm -rf conftest*
8167   ol_cv_header_stdc=yes
8168 else
8169   echo "$ac_err" >&5
8170   echo "configure: failed program was:" >&5
8171   cat conftest.$ac_ext >&5
8172   rm -rf conftest*
8173   ol_cv_header_stdc=no
8174 fi
8175 rm -f conftest*
8176
8177 if test $ol_cv_header_stdc = yes; then
8178   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
8179 cat > conftest.$ac_ext <<EOF
8180 #line 8181 "configure"
8181 #include "confdefs.h"
8182 #include <string.h>
8183 EOF
8184 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8185   egrep "memchr" >/dev/null 2>&1; then
8186   :
8187 else
8188   rm -rf conftest*
8189   ol_cv_header_stdc=no
8190 fi
8191 rm -f conftest*
8192
8193 fi
8194
8195 if test $ol_cv_header_stdc = yes; then
8196   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
8197 cat > conftest.$ac_ext <<EOF
8198 #line 8199 "configure"
8199 #include "confdefs.h"
8200 #include <stdlib.h>
8201 EOF
8202 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8203   egrep "free" >/dev/null 2>&1; then
8204   :
8205 else
8206   rm -rf conftest*
8207   ol_cv_header_stdc=no
8208 fi
8209 rm -f conftest*
8210
8211 fi
8212
8213 if test $ol_cv_header_stdc = yes; then
8214   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
8215 if test "$cross_compiling" = yes; then
8216   :
8217 else
8218   cat > conftest.$ac_ext <<EOF
8219 #line 8220 "configure"
8220 #include "confdefs.h"
8221 #include <ctype.h>
8222 #ifndef HAVE_EBCDIC
8223 #       define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
8224 #       define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
8225 #else
8226 #       define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
8227                 || ('j' <= (c) && (c) <= 'r') \
8228                 || ('s' <= (c) && (c) <= 'z'))
8229 #       define TOUPPER(c)       (ISLOWER(c) ? ((c) | 0x40) : (c))
8230 #endif
8231 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
8232 int main () { int i; for (i = 0; i < 256; i++)
8233 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
8234 exit (0); }
8235
8236 EOF
8237 if { (eval echo configure:8238: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8238 then
8239   :
8240 else
8241   echo "configure: failed program was:" >&5
8242   cat conftest.$ac_ext >&5
8243   rm -fr conftest*
8244   ol_cv_header_stdc=no
8245 fi
8246 rm -fr conftest*
8247 fi
8248
8249 fi
8250 fi
8251
8252 echo "$ac_t""$ol_cv_header_stdc" 1>&6
8253 if test $ol_cv_header_stdc = yes; then
8254   cat >> confdefs.h <<\EOF
8255 #define STDC_HEADERS 1
8256 EOF
8257
8258 fi
8259 ac_cv_header_stdc=disable
8260
8261
8262 if test $ol_cv_header_stdc != yes; then
8263         echo "configure: warning: could not locate Standard C compliant headers" 1>&2
8264 fi
8265
8266 ac_header_dirent=no
8267 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
8268 do
8269 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8270 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
8271 echo "configure:8272: checking for $ac_hdr that defines DIR" >&5
8272 if eval "test \"\${ac_cv_header_dirent_$ac_safe+set}\" = set"; then
8273   echo $ac_n "(cached) $ac_c" 1>&6
8274 else
8275   cat > conftest.$ac_ext <<EOF
8276 #line 8277 "configure"
8277 #include "confdefs.h"
8278 #include <sys/types.h>
8279 #include <$ac_hdr>
8280 int main() {
8281 DIR *dirp = 0;
8282 ; return 0; }
8283 EOF
8284 if { (eval echo configure:8285: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8285   rm -rf conftest*
8286   eval "ac_cv_header_dirent_$ac_safe=yes"
8287 else
8288   echo "configure: failed program was:" >&5
8289   cat conftest.$ac_ext >&5
8290   rm -rf conftest*
8291   eval "ac_cv_header_dirent_$ac_safe=no"
8292 fi
8293 rm -f conftest*
8294 fi
8295 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
8296   echo "$ac_t""yes" 1>&6
8297     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8298   cat >> confdefs.h <<EOF
8299 #define $ac_tr_hdr 1
8300 EOF
8301  ac_header_dirent=$ac_hdr; break
8302 else
8303   echo "$ac_t""no" 1>&6
8304 fi
8305 done
8306 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
8307 if test $ac_header_dirent = dirent.h; then
8308 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
8309 echo "configure:8310: checking for opendir in -ldir" >&5
8310 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-:%__p__%'`
8311 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8312   echo $ac_n "(cached) $ac_c" 1>&6
8313 else
8314   ac_save_LIBS="$LIBS"
8315 LIBS="-ldir  $LIBS"
8316 cat > conftest.$ac_ext <<EOF
8317 #line 8318 "configure"
8318 #include "confdefs.h"
8319 /* Override any gcc2 internal prototype to avoid an error.  */
8320 /* We use char because int might match the return type of a gcc2
8321     builtin and then its argument prototype would still apply.  */
8322 char opendir();
8323
8324 int main() {
8325 opendir()
8326 ; return 0; }
8327 EOF
8328 if { (eval echo configure:8329: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8329   rm -rf conftest*
8330   eval "ac_cv_lib_$ac_lib_var=yes"
8331 else
8332   echo "configure: failed program was:" >&5
8333   cat conftest.$ac_ext >&5
8334   rm -rf conftest*
8335   eval "ac_cv_lib_$ac_lib_var=no"
8336 fi
8337 rm -f conftest*
8338 LIBS="$ac_save_LIBS"
8339
8340 fi
8341 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8342   echo "$ac_t""yes" 1>&6
8343   LIBS="$LIBS -ldir"
8344 else
8345   echo "$ac_t""no" 1>&6
8346 fi
8347
8348 else
8349 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
8350 echo "configure:8351: checking for opendir in -lx" >&5
8351 ac_lib_var=`echo x'_'opendir | sed 'y%./+-:%__p__%'`
8352 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8353   echo $ac_n "(cached) $ac_c" 1>&6
8354 else
8355   ac_save_LIBS="$LIBS"
8356 LIBS="-lx  $LIBS"
8357 cat > conftest.$ac_ext <<EOF
8358 #line 8359 "configure"
8359 #include "confdefs.h"
8360 /* Override any gcc2 internal prototype to avoid an error.  */
8361 /* We use char because int might match the return type of a gcc2
8362     builtin and then its argument prototype would still apply.  */
8363 char opendir();
8364
8365 int main() {
8366 opendir()
8367 ; return 0; }
8368 EOF
8369 if { (eval echo configure:8370: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8370   rm -rf conftest*
8371   eval "ac_cv_lib_$ac_lib_var=yes"
8372 else
8373   echo "configure: failed program was:" >&5
8374   cat conftest.$ac_ext >&5
8375   rm -rf conftest*
8376   eval "ac_cv_lib_$ac_lib_var=no"
8377 fi
8378 rm -f conftest*
8379 LIBS="$ac_save_LIBS"
8380
8381 fi
8382 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8383   echo "$ac_t""yes" 1>&6
8384   LIBS="$LIBS -lx"
8385 else
8386   echo "$ac_t""no" 1>&6
8387 fi
8388
8389 fi
8390
8391 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
8392 echo "configure:8393: checking for sys/wait.h that is POSIX.1 compatible" >&5
8393 if eval "test \"\${ac_cv_header_sys_wait_h+set}\" = set"; then
8394   echo $ac_n "(cached) $ac_c" 1>&6
8395 else
8396   cat > conftest.$ac_ext <<EOF
8397 #line 8398 "configure"
8398 #include "confdefs.h"
8399 #include <sys/types.h>
8400 #include <sys/wait.h>
8401 #ifndef WEXITSTATUS
8402 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
8403 #endif
8404 #ifndef WIFEXITED
8405 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
8406 #endif
8407 int main() {
8408 int s;
8409 wait (&s);
8410 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
8411 ; return 0; }
8412 EOF
8413 if { (eval echo configure:8414: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8414   rm -rf conftest*
8415   ac_cv_header_sys_wait_h=yes
8416 else
8417   echo "configure: failed program was:" >&5
8418   cat conftest.$ac_ext >&5
8419   rm -rf conftest*
8420   ac_cv_header_sys_wait_h=no
8421 fi
8422 rm -f conftest*
8423 fi
8424
8425 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
8426 if test $ac_cv_header_sys_wait_h = yes; then
8427   cat >> confdefs.h <<\EOF
8428 #define HAVE_SYS_WAIT_H 1
8429 EOF
8430
8431 fi
8432
8433 echo $ac_n "checking POSIX termios""... $ac_c" 1>&6
8434 echo "configure:8435: checking POSIX termios" >&5
8435 if eval "test \"\${am_cv_sys_posix_termios+set}\" = set"; then
8436   echo $ac_n "(cached) $ac_c" 1>&6
8437 else
8438   cat > conftest.$ac_ext <<EOF
8439 #line 8440 "configure"
8440 #include "confdefs.h"
8441 #include <sys/types.h>
8442 #include <unistd.h>
8443 #include <termios.h>
8444 int main() {
8445 /* SunOS 4.0.3 has termios.h but not the library calls.  */
8446    tcgetattr(0, 0);
8447 ; return 0; }
8448 EOF
8449 if { (eval echo configure:8450: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8450   rm -rf conftest*
8451   am_cv_sys_posix_termios=yes
8452 else
8453   echo "configure: failed program was:" >&5
8454   cat conftest.$ac_ext >&5
8455   rm -rf conftest*
8456   am_cv_sys_posix_termios=no
8457 fi
8458 rm -f conftest*
8459 fi
8460
8461 echo "$ac_t""$am_cv_sys_posix_termios" 1>&6
8462
8463
8464  echo $ac_n "checking whether use of TIOCGWINSZ requires sys/ioctl.h""... $ac_c" 1>&6
8465 echo "configure:8466: checking whether use of TIOCGWINSZ requires sys/ioctl.h" >&5
8466 if eval "test \"\${am_cv_sys_tiocgwinsz_needs_sys_ioctl_h+set}\" = set"; then
8467   echo $ac_n "(cached) $ac_c" 1>&6
8468 else
8469   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=no
8470
8471   gwinsz_in_termios_h=no
8472   if test $am_cv_sys_posix_termios = yes; then
8473     cat > conftest.$ac_ext <<EOF
8474 #line 8475 "configure"
8475 #include "confdefs.h"
8476 #include <sys/types.h>
8477 #     include <termios.h>
8478 #     ifdef TIOCGWINSZ
8479         yes
8480 #     endif
8481     
8482 EOF
8483 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8484   egrep "yes" >/dev/null 2>&1; then
8485   rm -rf conftest*
8486   gwinsz_in_termios_h=yes
8487 fi
8488 rm -f conftest*
8489
8490   fi
8491
8492   if test $gwinsz_in_termios_h = no; then
8493     cat > conftest.$ac_ext <<EOF
8494 #line 8495 "configure"
8495 #include "confdefs.h"
8496 #include <sys/types.h>
8497 #     include <sys/ioctl.h>
8498 #     ifdef TIOCGWINSZ
8499         yes
8500 #     endif
8501     
8502 EOF
8503 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8504   egrep "yes" >/dev/null 2>&1; then
8505   rm -rf conftest*
8506   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=yes
8507 fi
8508 rm -f conftest*
8509
8510   fi
8511   
8512 fi
8513
8514 echo "$ac_t""$am_cv_sys_tiocgwinsz_needs_sys_ioctl_h" 1>&6
8515   if test $am_cv_sys_tiocgwinsz_needs_sys_ioctl_h = yes; then
8516     cat >> confdefs.h <<\EOF
8517 #define GWINSZ_IN_SYS_IOCTL 1
8518 EOF
8519
8520   fi
8521
8522 if test $am_cv_sys_posix_termios = yes ; then
8523         cat >> confdefs.h <<\EOF
8524 #define HAVE_POSIX_TERMIOS 1
8525 EOF
8526
8527 fi
8528
8529 for ac_hdr in \
8530         arpa/inet.h             \
8531         arpa/nameser.h  \
8532         assert.h                \
8533         bits/types.h    \
8534         conio.h                 \
8535         crypt.h                 \
8536         direct.h                \
8537         errno.h                 \
8538         fcntl.h                 \
8539         filio.h                 \
8540         getopt.h                \
8541         grp.h                   \
8542         io.h                    \
8543         libutil.h               \
8544         limits.h                \
8545         locale.h                \
8546         netinet/tcp.h   \
8547         malloc.h                \
8548         memory.h                \
8549         psap.h                  \
8550         pwd.h                   \
8551         process.h               \
8552         resolv.h                \
8553         sgtty.h                 \
8554         shadow.h                \
8555         stddef.h                \
8556         string.h                \
8557         strings.h               \
8558         sysexits.h              \
8559         sys/file.h              \
8560         sys/filio.h             \
8561         sys/errno.h             \
8562         sys/ioctl.h             \
8563         sys/param.h             \
8564         sys/resource.h  \
8565         sys/select.h    \
8566         sys/socket.h    \
8567         sys/stat.h              \
8568         sys/syslog.h    \
8569         sys/time.h              \
8570         sys/types.h             \
8571         sys/ucred.h             \
8572         sys/uio.h               \
8573         syslog.h                \
8574         termios.h               \
8575         unistd.h                \
8576         winsock.h               \
8577         winsock2.h              \
8578
8579 do
8580 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8581 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8582 echo "configure:8583: checking for $ac_hdr" >&5
8583 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
8584   echo $ac_n "(cached) $ac_c" 1>&6
8585 else
8586   cat > conftest.$ac_ext <<EOF
8587 #line 8588 "configure"
8588 #include "confdefs.h"
8589 #include <$ac_hdr>
8590 EOF
8591 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8592 { (eval echo configure:8593: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8593 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8594 if test -z "$ac_err"; then
8595   rm -rf conftest*
8596   eval "ac_cv_header_$ac_safe=yes"
8597 else
8598   echo "$ac_err" >&5
8599   echo "configure: failed program was:" >&5
8600   cat conftest.$ac_ext >&5
8601   rm -rf conftest*
8602   eval "ac_cv_header_$ac_safe=no"
8603 fi
8604 rm -f conftest*
8605 fi
8606 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8607   echo "$ac_t""yes" 1>&6
8608     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8609   cat >> confdefs.h <<EOF
8610 #define $ac_tr_hdr 1
8611 EOF
8612  
8613 else
8614   echo "$ac_t""no" 1>&6
8615 fi
8616 done
8617
8618
8619
8620
8621 echo $ac_n "checking for sigset in -lV3""... $ac_c" 1>&6
8622 echo "configure:8623: checking for sigset in -lV3" >&5
8623 ac_lib_var=`echo V3'_'sigset | sed 'y%./+-:%__p__%'`
8624 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8625   echo $ac_n "(cached) $ac_c" 1>&6
8626 else
8627   ac_save_LIBS="$LIBS"
8628 LIBS="-lV3  $LIBS"
8629 cat > conftest.$ac_ext <<EOF
8630 #line 8631 "configure"
8631 #include "confdefs.h"
8632 /* Override any gcc2 internal prototype to avoid an error.  */
8633 /* We use char because int might match the return type of a gcc2
8634     builtin and then its argument prototype would still apply.  */
8635 char sigset();
8636
8637 int main() {
8638 sigset()
8639 ; return 0; }
8640 EOF
8641 if { (eval echo configure:8642: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8642   rm -rf conftest*
8643   eval "ac_cv_lib_$ac_lib_var=yes"
8644 else
8645   echo "configure: failed program was:" >&5
8646   cat conftest.$ac_ext >&5
8647   rm -rf conftest*
8648   eval "ac_cv_lib_$ac_lib_var=no"
8649 fi
8650 rm -f conftest*
8651 LIBS="$ac_save_LIBS"
8652
8653 fi
8654 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8655   echo "$ac_t""yes" 1>&6
8656     ac_tr_lib=HAVE_LIB`echo V3 | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8657     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8658   cat >> confdefs.h <<EOF
8659 #define $ac_tr_lib 1
8660 EOF
8661
8662   LIBS="-lV3 $LIBS"
8663
8664 else
8665   echo "$ac_t""no" 1>&6
8666 fi
8667
8668
8669 if test "$ac_cv_header_winsock_h" = yes; then
8670 echo $ac_n "checking for winsock""... $ac_c" 1>&6
8671 echo "configure:8672: checking for winsock" >&5
8672 if eval "test \"\${ol_cv_winsock+set}\" = set"; then
8673   echo $ac_n "(cached) $ac_c" 1>&6
8674 else
8675   save_LIBS="$LIBS"
8676 for curlib in ws2_32 wsock32; do
8677         LIBS="$LIBS -l$curlib"
8678         cat > conftest.$ac_ext <<EOF
8679 #line 8680 "configure"
8680 #include "confdefs.h"
8681 #include <winsock.h>
8682                         
8683 int main() {
8684
8685                         socket(0,0,0);
8686                         select(0,NULL,NULL,NULL,NULL);
8687                         closesocket(0);
8688                         gethostname(NULL,0);
8689                         
8690 ; return 0; }
8691 EOF
8692 if { (eval echo configure:8693: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8693   rm -rf conftest*
8694   ol_cv_winsock=yes
8695 else
8696   echo "configure: failed program was:" >&5
8697   cat conftest.$ac_ext >&5
8698   rm -rf conftest*
8699   ol_cv_winsock=no
8700 fi
8701 rm -f conftest*
8702
8703         if test $ol_cv_winsock = yes; then
8704                 cat >> confdefs.h <<\EOF
8705 #define HAVE_WINSOCK 1
8706 EOF
8707
8708                 ac_cv_func_socket=yes
8709                 ac_cv_func_select=yes
8710                 ac_cv_func_closesocket=yes
8711                 ac_cv_func_gethostname=yes
8712                 if test $curlib = ws2_32; then
8713                         ol_cv_winsock=winsock2
8714                         cat >> confdefs.h <<\EOF
8715 #define HAVE_WINSOCK2 1
8716 EOF
8717
8718                 fi
8719                 break
8720         fi
8721         LIBS="$save_LIBS"
8722 done
8723 fi
8724
8725 echo "$ac_t""$ol_cv_winsock" 1>&6
8726 fi
8727
8728
8729 echo $ac_n "checking for socket""... $ac_c" 1>&6
8730 echo "configure:8731: checking for socket" >&5
8731 if eval "test \"\${ac_cv_func_socket+set}\" = set"; then
8732   echo $ac_n "(cached) $ac_c" 1>&6
8733 else
8734   cat > conftest.$ac_ext <<EOF
8735 #line 8736 "configure"
8736 #include "confdefs.h"
8737 /* System header to define __stub macros and hopefully few prototypes,
8738     which can conflict with char socket(); below.  */
8739 #include <assert.h>
8740 /* Override any gcc2 internal prototype to avoid an error.  */
8741 /* We use char because int might match the return type of a gcc2
8742     builtin and then its argument prototype would still apply.  */
8743 char socket();
8744 char (*f)();
8745
8746 int main() {
8747
8748 /* The GNU C library defines this for functions which it implements
8749     to always fail with ENOSYS.  Some functions are actually named
8750     something starting with __ and the normal name is an alias.  */
8751 #if defined (__stub_socket) || defined (__stub___socket)
8752 choke me
8753 #else
8754 f = socket;
8755 #endif
8756
8757 ; return 0; }
8758 EOF
8759 if { (eval echo configure:8760: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8760   rm -rf conftest*
8761   eval "ac_cv_func_socket=yes"
8762 else
8763   echo "configure: failed program was:" >&5
8764   cat conftest.$ac_ext >&5
8765   rm -rf conftest*
8766   eval "ac_cv_func_socket=no"
8767 fi
8768 rm -f conftest*
8769 fi
8770
8771 if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
8772   echo "$ac_t""yes" 1>&6
8773   :
8774 else
8775   echo "$ac_t""no" 1>&6
8776         
8777         echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6
8778 echo "configure:8779: checking for main in -lsocket" >&5
8779 ac_lib_var=`echo socket'_'main | sed 'y%./+-:%__p__%'`
8780 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8781   echo $ac_n "(cached) $ac_c" 1>&6
8782 else
8783   ac_save_LIBS="$LIBS"
8784 LIBS="-lsocket  $LIBS"
8785 cat > conftest.$ac_ext <<EOF
8786 #line 8787 "configure"
8787 #include "confdefs.h"
8788
8789 int main() {
8790 main()
8791 ; return 0; }
8792 EOF
8793 if { (eval echo configure:8794: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8794   rm -rf conftest*
8795   eval "ac_cv_lib_$ac_lib_var=yes"
8796 else
8797   echo "configure: failed program was:" >&5
8798   cat conftest.$ac_ext >&5
8799   rm -rf conftest*
8800   eval "ac_cv_lib_$ac_lib_var=no"
8801 fi
8802 rm -f conftest*
8803 LIBS="$ac_save_LIBS"
8804
8805 fi
8806 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8807   echo "$ac_t""yes" 1>&6
8808     ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8809     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8810   cat >> confdefs.h <<EOF
8811 #define $ac_tr_lib 1
8812 EOF
8813
8814   LIBS="-lsocket $LIBS"
8815
8816 else
8817   echo "$ac_t""no" 1>&6
8818 fi
8819
8820         echo $ac_n "checking for main in -lnet""... $ac_c" 1>&6
8821 echo "configure:8822: checking for main in -lnet" >&5
8822 ac_lib_var=`echo net'_'main | sed 'y%./+-:%__p__%'`
8823 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8824   echo $ac_n "(cached) $ac_c" 1>&6
8825 else
8826   ac_save_LIBS="$LIBS"
8827 LIBS="-lnet  $LIBS"
8828 cat > conftest.$ac_ext <<EOF
8829 #line 8830 "configure"
8830 #include "confdefs.h"
8831
8832 int main() {
8833 main()
8834 ; return 0; }
8835 EOF
8836 if { (eval echo configure:8837: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8837   rm -rf conftest*
8838   eval "ac_cv_lib_$ac_lib_var=yes"
8839 else
8840   echo "configure: failed program was:" >&5
8841   cat conftest.$ac_ext >&5
8842   rm -rf conftest*
8843   eval "ac_cv_lib_$ac_lib_var=no"
8844 fi
8845 rm -f conftest*
8846 LIBS="$ac_save_LIBS"
8847
8848 fi
8849 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8850   echo "$ac_t""yes" 1>&6
8851     ac_tr_lib=HAVE_LIB`echo net | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8852     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8853   cat >> confdefs.h <<EOF
8854 #define $ac_tr_lib 1
8855 EOF
8856
8857   LIBS="-lnet $LIBS"
8858
8859 else
8860   echo "$ac_t""no" 1>&6
8861 fi
8862
8863         echo $ac_n "checking for main in -lnsl_s""... $ac_c" 1>&6
8864 echo "configure:8865: checking for main in -lnsl_s" >&5
8865 ac_lib_var=`echo nsl_s'_'main | sed 'y%./+-:%__p__%'`
8866 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8867   echo $ac_n "(cached) $ac_c" 1>&6
8868 else
8869   ac_save_LIBS="$LIBS"
8870 LIBS="-lnsl_s  $LIBS"
8871 cat > conftest.$ac_ext <<EOF
8872 #line 8873 "configure"
8873 #include "confdefs.h"
8874
8875 int main() {
8876 main()
8877 ; return 0; }
8878 EOF
8879 if { (eval echo configure:8880: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8880   rm -rf conftest*
8881   eval "ac_cv_lib_$ac_lib_var=yes"
8882 else
8883   echo "configure: failed program was:" >&5
8884   cat conftest.$ac_ext >&5
8885   rm -rf conftest*
8886   eval "ac_cv_lib_$ac_lib_var=no"
8887 fi
8888 rm -f conftest*
8889 LIBS="$ac_save_LIBS"
8890
8891 fi
8892 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8893   echo "$ac_t""yes" 1>&6
8894     ac_tr_lib=HAVE_LIB`echo nsl_s | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8895     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8896   cat >> confdefs.h <<EOF
8897 #define $ac_tr_lib 1
8898 EOF
8899
8900   LIBS="-lnsl_s $LIBS"
8901
8902 else
8903   echo "$ac_t""no" 1>&6
8904 fi
8905
8906         echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
8907 echo "configure:8908: checking for main in -lnsl" >&5
8908 ac_lib_var=`echo nsl'_'main | sed 'y%./+-:%__p__%'`
8909 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8910   echo $ac_n "(cached) $ac_c" 1>&6
8911 else
8912   ac_save_LIBS="$LIBS"
8913 LIBS="-lnsl  $LIBS"
8914 cat > conftest.$ac_ext <<EOF
8915 #line 8916 "configure"
8916 #include "confdefs.h"
8917
8918 int main() {
8919 main()
8920 ; return 0; }
8921 EOF
8922 if { (eval echo configure:8923: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8923   rm -rf conftest*
8924   eval "ac_cv_lib_$ac_lib_var=yes"
8925 else
8926   echo "configure: failed program was:" >&5
8927   cat conftest.$ac_ext >&5
8928   rm -rf conftest*
8929   eval "ac_cv_lib_$ac_lib_var=no"
8930 fi
8931 rm -f conftest*
8932 LIBS="$ac_save_LIBS"
8933
8934 fi
8935 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8936   echo "$ac_t""yes" 1>&6
8937     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8938     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8939   cat >> confdefs.h <<EOF
8940 #define $ac_tr_lib 1
8941 EOF
8942
8943   LIBS="-lnsl $LIBS"
8944
8945 else
8946   echo "$ac_t""no" 1>&6
8947 fi
8948
8949         echo $ac_n "checking for socket in -linet""... $ac_c" 1>&6
8950 echo "configure:8951: checking for socket in -linet" >&5
8951 ac_lib_var=`echo inet'_'socket | sed 'y%./+-:%__p__%'`
8952 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8953   echo $ac_n "(cached) $ac_c" 1>&6
8954 else
8955   ac_save_LIBS="$LIBS"
8956 LIBS="-linet  $LIBS"
8957 cat > conftest.$ac_ext <<EOF
8958 #line 8959 "configure"
8959 #include "confdefs.h"
8960 /* Override any gcc2 internal prototype to avoid an error.  */
8961 /* We use char because int might match the return type of a gcc2
8962     builtin and then its argument prototype would still apply.  */
8963 char socket();
8964
8965 int main() {
8966 socket()
8967 ; return 0; }
8968 EOF
8969 if { (eval echo configure:8970: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8970   rm -rf conftest*
8971   eval "ac_cv_lib_$ac_lib_var=yes"
8972 else
8973   echo "configure: failed program was:" >&5
8974   cat conftest.$ac_ext >&5
8975   rm -rf conftest*
8976   eval "ac_cv_lib_$ac_lib_var=no"
8977 fi
8978 rm -f conftest*
8979 LIBS="$ac_save_LIBS"
8980
8981 fi
8982 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8983   echo "$ac_t""yes" 1>&6
8984     ac_tr_lib=HAVE_LIB`echo inet | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8985     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8986   cat >> confdefs.h <<EOF
8987 #define $ac_tr_lib 1
8988 EOF
8989
8990   LIBS="-linet $LIBS"
8991
8992 else
8993   echo "$ac_t""no" 1>&6
8994 fi
8995
8996         echo $ac_n "checking for main in -lgen""... $ac_c" 1>&6
8997 echo "configure:8998: checking for main in -lgen" >&5
8998 ac_lib_var=`echo gen'_'main | sed 'y%./+-:%__p__%'`
8999 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9000   echo $ac_n "(cached) $ac_c" 1>&6
9001 else
9002   ac_save_LIBS="$LIBS"
9003 LIBS="-lgen  $LIBS"
9004 cat > conftest.$ac_ext <<EOF
9005 #line 9006 "configure"
9006 #include "confdefs.h"
9007
9008 int main() {
9009 main()
9010 ; return 0; }
9011 EOF
9012 if { (eval echo configure:9013: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9013   rm -rf conftest*
9014   eval "ac_cv_lib_$ac_lib_var=yes"
9015 else
9016   echo "configure: failed program was:" >&5
9017   cat conftest.$ac_ext >&5
9018   rm -rf conftest*
9019   eval "ac_cv_lib_$ac_lib_var=no"
9020 fi
9021 rm -f conftest*
9022 LIBS="$ac_save_LIBS"
9023
9024 fi
9025 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9026   echo "$ac_t""yes" 1>&6
9027     ac_tr_lib=HAVE_LIB`echo gen | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9028     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9029   cat >> confdefs.h <<EOF
9030 #define $ac_tr_lib 1
9031 EOF
9032
9033   LIBS="-lgen $LIBS"
9034
9035 else
9036   echo "$ac_t""no" 1>&6
9037 fi
9038
9039
9040 fi
9041
9042
9043 echo $ac_n "checking for select""... $ac_c" 1>&6
9044 echo "configure:9045: checking for select" >&5
9045 if eval "test \"\${ac_cv_func_select+set}\" = set"; then
9046   echo $ac_n "(cached) $ac_c" 1>&6
9047 else
9048   cat > conftest.$ac_ext <<EOF
9049 #line 9050 "configure"
9050 #include "confdefs.h"
9051 /* System header to define __stub macros and hopefully few prototypes,
9052     which can conflict with char select(); below.  */
9053 #include <assert.h>
9054 /* Override any gcc2 internal prototype to avoid an error.  */
9055 /* We use char because int might match the return type of a gcc2
9056     builtin and then its argument prototype would still apply.  */
9057 char select();
9058 char (*f)();
9059
9060 int main() {
9061
9062 /* The GNU C library defines this for functions which it implements
9063     to always fail with ENOSYS.  Some functions are actually named
9064     something starting with __ and the normal name is an alias.  */
9065 #if defined (__stub_select) || defined (__stub___select)
9066 choke me
9067 #else
9068 f = select;
9069 #endif
9070
9071 ; return 0; }
9072 EOF
9073 if { (eval echo configure:9074: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9074   rm -rf conftest*
9075   eval "ac_cv_func_select=yes"
9076 else
9077   echo "configure: failed program was:" >&5
9078   cat conftest.$ac_ext >&5
9079   rm -rf conftest*
9080   eval "ac_cv_func_select=no"
9081 fi
9082 rm -f conftest*
9083 fi
9084
9085 if eval "test \"`echo '$ac_cv_func_'select`\" = yes"; then
9086   echo "$ac_t""yes" 1>&6
9087   :
9088 else
9089   echo "$ac_t""no" 1>&6
9090 { echo "configure: error: select() required." 1>&2; exit 1; }
9091 fi
9092
9093
9094 if test "${ac_cv_header_winsock_h}" != yes; then
9095                                 echo $ac_n "checking types of arguments for select()""... $ac_c" 1>&6
9096 echo "configure:9097: checking types of arguments for select()" >&5
9097  if eval "test \"\${ac_cv_func_select_arg234+set}\" = set"; then
9098   echo $ac_n "(cached) $ac_c" 1>&6
9099 else
9100    if eval "test \"\${ac_cv_func_select_arg1+set}\" = set"; then
9101   echo $ac_n "(cached) $ac_c" 1>&6
9102 else
9103     if eval "test \"\${ac_cv_func_select_arg5+set}\" = set"; then
9104   echo $ac_n "(cached) $ac_c" 1>&6
9105 else
9106      for ac_cv_func_select_arg234 in 'fd_set *' 'int *' 'void *'; do
9107      for ac_cv_func_select_arg1 in 'int' 'size_t' 'unsigned long' 'unsigned'; do
9108       for ac_cv_func_select_arg5 in 'struct timeval *' 'const struct timeval *'; do
9109        cat > conftest.$ac_ext <<EOF
9110 #line 9111 "configure"
9111 #include "confdefs.h"
9112 #ifdef HAVE_SYS_TYPES_H
9113 #include <sys/types.h>
9114 #endif
9115 #ifdef HAVE_SYS_TIME_H
9116 #include <sys/time.h>
9117 #endif
9118 #ifdef HAVE_SYS_SELECT_H
9119 #include <sys/select.h>
9120 #endif
9121 #ifdef HAVE_SYS_SOCKET_H
9122 #include <sys/socket.h>
9123 #endif
9124 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);
9125 int main() {
9126
9127 ; return 0; }
9128 EOF
9129 if { (eval echo configure:9130: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9130   rm -rf conftest*
9131           ac_not_found=no ; break 3
9132 else
9133   echo "configure: failed program was:" >&5
9134   cat conftest.$ac_ext >&5
9135   rm -rf conftest*
9136   ac_not_found=yes
9137 fi
9138 rm -f conftest*
9139       done
9140      done
9141     done
9142    
9143 fi
9144   
9145 fi
9146  
9147 fi
9148  if test "$ac_not_found" = yes; then
9149   ac_cv_func_select_arg1=int 
9150   ac_cv_func_select_arg234='int *' 
9151   ac_cv_func_select_arg5='struct timeval *'
9152  fi
9153  echo "$ac_t""$ac_cv_func_select_arg1,$ac_cv_func_select_arg234,$ac_cv_func_select_arg5" 1>&6
9154  cat >> confdefs.h <<EOF
9155 #define SELECT_TYPE_ARG1 $ac_cv_func_select_arg1
9156 EOF
9157
9158  cat >> confdefs.h <<EOF
9159 #define SELECT_TYPE_ARG234 ($ac_cv_func_select_arg234)
9160 EOF
9161
9162  cat >> confdefs.h <<EOF
9163 #define SELECT_TYPE_ARG5 ($ac_cv_func_select_arg5)
9164 EOF
9165
9166
9167 fi
9168
9169
9170 for ac_hdr in regex.h 
9171 do
9172 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9173 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9174 echo "configure:9175: checking for $ac_hdr" >&5
9175 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9176   echo $ac_n "(cached) $ac_c" 1>&6
9177 else
9178   cat > conftest.$ac_ext <<EOF
9179 #line 9180 "configure"
9180 #include "confdefs.h"
9181 #include <$ac_hdr>
9182 EOF
9183 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9184 { (eval echo configure:9185: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9185 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9186 if test -z "$ac_err"; then
9187   rm -rf conftest*
9188   eval "ac_cv_header_$ac_safe=yes"
9189 else
9190   echo "$ac_err" >&5
9191   echo "configure: failed program was:" >&5
9192   cat conftest.$ac_ext >&5
9193   rm -rf conftest*
9194   eval "ac_cv_header_$ac_safe=no"
9195 fi
9196 rm -f conftest*
9197 fi
9198 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9199   echo "$ac_t""yes" 1>&6
9200     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9201   cat >> confdefs.h <<EOF
9202 #define $ac_tr_hdr 1
9203 EOF
9204  
9205 else
9206   echo "$ac_t""no" 1>&6
9207 fi
9208 done
9209
9210 if test "$ac_cv_header_regex_h" != yes ; then
9211         { echo "configure: error: POSIX regex.h required." 1>&2; exit 1; }
9212 fi
9213
9214 echo $ac_n "checking for library containing regfree""... $ac_c" 1>&6
9215 echo "configure:9216: checking for library containing regfree" >&5
9216 if eval "test \"\${ac_cv_search_regfree+set}\" = set"; then
9217   echo $ac_n "(cached) $ac_c" 1>&6
9218 else
9219   ac_func_search_save_LIBS="$LIBS"
9220 ac_cv_search_regfree="no"
9221 cat > conftest.$ac_ext <<EOF
9222 #line 9223 "configure"
9223 #include "confdefs.h"
9224 /* Override any gcc2 internal prototype to avoid an error.  */
9225 /* We use char because int might match the return type of a gcc2
9226     builtin and then its argument prototype would still apply.  */
9227 char regfree();
9228
9229 int main() {
9230 regfree()
9231 ; return 0; }
9232 EOF
9233 if { (eval echo configure:9234: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9234   rm -rf conftest*
9235   ac_cv_search_regfree="none required"
9236 else
9237   echo "configure: failed program was:" >&5
9238   cat conftest.$ac_ext >&5
9239 fi
9240 rm -f conftest*
9241 test "$ac_cv_search_regfree" = "no" && for ac_lib in regex gnuregex; do
9242 LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9243 cat > conftest.$ac_ext <<EOF
9244 #line 9245 "configure"
9245 #include "confdefs.h"
9246 /* Override any gcc2 internal prototype to avoid an error.  */
9247 /* We use char because int might match the return type of a gcc2
9248     builtin and then its argument prototype would still apply.  */
9249 char regfree();
9250
9251 int main() {
9252 regfree()
9253 ; return 0; }
9254 EOF
9255 if { (eval echo configure:9256: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9256   rm -rf conftest*
9257   ac_cv_search_regfree="-l$ac_lib"
9258 break
9259 else
9260   echo "configure: failed program was:" >&5
9261   cat conftest.$ac_ext >&5
9262 fi
9263 rm -f conftest*
9264 done
9265 LIBS="$ac_func_search_save_LIBS"
9266 fi
9267
9268 echo "$ac_t""$ac_cv_search_regfree" 1>&6
9269 if test "$ac_cv_search_regfree" != "no"; then
9270   test "$ac_cv_search_regfree" = "none required" || LIBS="$ac_cv_search_regfree $LIBS"
9271   :
9272 else :
9273   { echo "configure: error: POSIX regex required." 1>&2; exit 1; }
9274 fi
9275
9276
9277 echo $ac_n "checking for compatible POSIX regex""... $ac_c" 1>&6
9278 echo "configure:9279: checking for compatible POSIX regex" >&5
9279 if eval "test \"\${ol_cv_c_posix_regex+set}\" = set"; then
9280   echo $ac_n "(cached) $ac_c" 1>&6
9281 else
9282   
9283         if test "$cross_compiling" = yes; then
9284   ol_cv_c_posix_regex=cross
9285 else
9286   cat > conftest.$ac_ext <<EOF
9287 #line 9288 "configure"
9288 #include "confdefs.h"
9289
9290 #include <sys/types.h>
9291 #include <regex.h>
9292 static char *pattern, *string;
9293 main()
9294 {
9295         int rc;
9296         regex_t re;
9297
9298         pattern = "^A";
9299
9300         if(regcomp(&re, pattern, 0)) {
9301                 return -1;
9302         }
9303         
9304         string = "ALL MATCH";
9305         
9306         rc = regexec(&re, string, 0, (void*)0, 0);
9307
9308         regfree(&re);
9309
9310         return rc;
9311 }
9312 EOF
9313 if { (eval echo configure:9314: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9314 then
9315   ol_cv_c_posix_regex=yes
9316 else
9317   echo "configure: failed program was:" >&5
9318   cat conftest.$ac_ext >&5
9319   rm -fr conftest*
9320   ol_cv_c_posix_regex=no
9321 fi
9322 rm -fr conftest*
9323 fi
9324
9325 fi
9326
9327 echo "$ac_t""$ol_cv_c_posix_regex" 1>&6
9328
9329 if test "$ol_cv_c_posix_regex" = no ; then
9330         { echo "configure: error: broken POSIX regex!" 1>&2; exit 1; }
9331 fi
9332
9333
9334 have_uuid=no
9335 for ac_hdr in sys/uuid.h
9336 do
9337 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9338 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9339 echo "configure:9340: checking for $ac_hdr" >&5
9340 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9341   echo $ac_n "(cached) $ac_c" 1>&6
9342 else
9343   cat > conftest.$ac_ext <<EOF
9344 #line 9345 "configure"
9345 #include "confdefs.h"
9346 #include <$ac_hdr>
9347 EOF
9348 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9349 { (eval echo configure:9350: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9350 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9351 if test -z "$ac_err"; then
9352   rm -rf conftest*
9353   eval "ac_cv_header_$ac_safe=yes"
9354 else
9355   echo "$ac_err" >&5
9356   echo "configure: failed program was:" >&5
9357   cat conftest.$ac_ext >&5
9358   rm -rf conftest*
9359   eval "ac_cv_header_$ac_safe=no"
9360 fi
9361 rm -f conftest*
9362 fi
9363 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9364   echo "$ac_t""yes" 1>&6
9365     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9366   cat >> confdefs.h <<EOF
9367 #define $ac_tr_hdr 1
9368 EOF
9369  
9370 else
9371   echo "$ac_t""no" 1>&6
9372 fi
9373 done
9374
9375 if test $ac_cv_header_sys_uuid_h = yes ; then
9376         save_LIBS="$LIBS"
9377         
9378 echo $ac_n "checking for library containing uuid_to_str""... $ac_c" 1>&6
9379 echo "configure:9380: checking for library containing uuid_to_str" >&5
9380 if eval "test \"\${ac_cv_search_uuid_to_str+set}\" = set"; then
9381   echo $ac_n "(cached) $ac_c" 1>&6
9382 else
9383   ac_func_search_save_LIBS="$LIBS"
9384 ac_cv_search_uuid_to_str="no"
9385 cat > conftest.$ac_ext <<EOF
9386 #line 9387 "configure"
9387 #include "confdefs.h"
9388 /* Override any gcc2 internal prototype to avoid an error.  */
9389 /* We use char because int might match the return type of a gcc2
9390     builtin and then its argument prototype would still apply.  */
9391 char uuid_to_str();
9392
9393 int main() {
9394 uuid_to_str()
9395 ; return 0; }
9396 EOF
9397 if { (eval echo configure:9398: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9398   rm -rf conftest*
9399   ac_cv_search_uuid_to_str="none required"
9400 else
9401   echo "configure: failed program was:" >&5
9402   cat conftest.$ac_ext >&5
9403 fi
9404 rm -f conftest*
9405 test "$ac_cv_search_uuid_to_str" = "no" && for ac_lib in uuid; do
9406 LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9407 cat > conftest.$ac_ext <<EOF
9408 #line 9409 "configure"
9409 #include "confdefs.h"
9410 /* Override any gcc2 internal prototype to avoid an error.  */
9411 /* We use char because int might match the return type of a gcc2
9412     builtin and then its argument prototype would still apply.  */
9413 char uuid_to_str();
9414
9415 int main() {
9416 uuid_to_str()
9417 ; return 0; }
9418 EOF
9419 if { (eval echo configure:9420: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9420   rm -rf conftest*
9421   ac_cv_search_uuid_to_str="-l$ac_lib"
9422 break
9423 else
9424   echo "configure: failed program was:" >&5
9425   cat conftest.$ac_ext >&5
9426 fi
9427 rm -f conftest*
9428 done
9429 LIBS="$ac_func_search_save_LIBS"
9430 fi
9431
9432 echo "$ac_t""$ac_cv_search_uuid_to_str" 1>&6
9433 if test "$ac_cv_search_uuid_to_str" != "no"; then
9434   test "$ac_cv_search_uuid_to_str" = "none required" || LIBS="$ac_cv_search_uuid_to_str $LIBS"
9435   have_uuid=yes
9436 else :
9437   :
9438 fi
9439         LIBS="$save_LIBS"
9440
9441         if test have_uuid = yes ; then
9442                 cat >> confdefs.h <<\EOF
9443 #define HAVE_UUID_TO_STR 1
9444 EOF
9445
9446
9447                 test "$ac_cv_search_uuid_to_str" = "none required" || \
9448                         SLAPD_LIBS="$SLAPD_LIBS $ac_cv_search_uuid_to_str"
9449         fi
9450 fi
9451
9452 if test $have_uuid = no ; then
9453         echo $ac_n "checking to see if -lrpcrt4 is needed for win32 UUID support""... $ac_c" 1>&6
9454 echo "configure:9455: checking to see if -lrpcrt4 is needed for win32 UUID support" >&5
9455         save_LIBS="$LIBS"
9456         LIBS="$LIBS -lrpcrt4"
9457         cat > conftest.$ac_ext <<EOF
9458 #line 9459 "configure"
9459 #include "confdefs.h"
9460
9461                 int __stdcall UuidCreate(void *);
9462                 int __stdcall UuidToStringA(void *,void **);
9463                 
9464 int main() {
9465
9466                 UuidCreate(0);
9467                 UuidToStringA(0,0);
9468                 
9469 ; return 0; }
9470 EOF
9471 if { (eval echo configure:9472: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9472   rm -rf conftest*
9473   need_rpcrt=yes
9474 else
9475   echo "configure: failed program was:" >&5
9476   cat conftest.$ac_ext >&5
9477   rm -rf conftest*
9478   need_rpcrt=no
9479 fi
9480 rm -f conftest*
9481         if test $need_rpcrt = yes; then
9482                 SLAPD_LIBS="$SLAPD_LIBS -lrpcrt4"
9483         fi
9484         LIBS="$save_LIBS"
9485         echo "$ac_t""$need_rpcrt" 1>&6
9486 fi
9487
9488 ol_link_dnssrv=no
9489 echo $ac_n "checking for res_query""... $ac_c" 1>&6
9490 echo "configure:9491: checking for res_query" >&5
9491 if eval "test \"\${ac_cv_func_res_query+set}\" = set"; then
9492   echo $ac_n "(cached) $ac_c" 1>&6
9493 else
9494   cat > conftest.$ac_ext <<EOF
9495 #line 9496 "configure"
9496 #include "confdefs.h"
9497 /* System header to define __stub macros and hopefully few prototypes,
9498     which can conflict with char res_query(); below.  */
9499 #include <assert.h>
9500 /* Override any gcc2 internal prototype to avoid an error.  */
9501 /* We use char because int might match the return type of a gcc2
9502     builtin and then its argument prototype would still apply.  */
9503 char res_query();
9504 char (*f)();
9505
9506 int main() {
9507
9508 /* The GNU C library defines this for functions which it implements
9509     to always fail with ENOSYS.  Some functions are actually named
9510     something starting with __ and the normal name is an alias.  */
9511 #if defined (__stub_res_query) || defined (__stub___res_query)
9512 choke me
9513 #else
9514 f = res_query;
9515 #endif
9516
9517 ; return 0; }
9518 EOF
9519 if { (eval echo configure:9520: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9520   rm -rf conftest*
9521   eval "ac_cv_func_res_query=yes"
9522 else
9523   echo "configure: failed program was:" >&5
9524   cat conftest.$ac_ext >&5
9525   rm -rf conftest*
9526   eval "ac_cv_func_res_query=no"
9527 fi
9528 rm -f conftest*
9529 fi
9530
9531 if eval "test \"`echo '$ac_cv_func_'res_query`\" = yes"; then
9532   echo "$ac_t""yes" 1>&6
9533   :
9534 else
9535   echo "$ac_t""no" 1>&6
9536 fi
9537
9538 if test $ac_cv_func_res_query = no ; then 
9539         echo $ac_n "checking for __res_query""... $ac_c" 1>&6
9540 echo "configure:9541: checking for __res_query" >&5
9541 if eval "test \"\${ac_cv_func___res_query+set}\" = set"; then
9542   echo $ac_n "(cached) $ac_c" 1>&6
9543 else
9544   cat > conftest.$ac_ext <<EOF
9545 #line 9546 "configure"
9546 #include "confdefs.h"
9547 /* System header to define __stub macros and hopefully few prototypes,
9548     which can conflict with char __res_query(); below.  */
9549 #include <assert.h>
9550 /* Override any gcc2 internal prototype to avoid an error.  */
9551 /* We use char because int might match the return type of a gcc2
9552     builtin and then its argument prototype would still apply.  */
9553 char __res_query();
9554 char (*f)();
9555
9556 int main() {
9557
9558 /* The GNU C library defines this for functions which it implements
9559     to always fail with ENOSYS.  Some functions are actually named
9560     something starting with __ and the normal name is an alias.  */
9561 #if defined (__stub___res_query) || defined (__stub_____res_query)
9562 choke me
9563 #else
9564 f = __res_query;
9565 #endif
9566
9567 ; return 0; }
9568 EOF
9569 if { (eval echo configure:9570: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9570   rm -rf conftest*
9571   eval "ac_cv_func___res_query=yes"
9572 else
9573   echo "configure: failed program was:" >&5
9574   cat conftest.$ac_ext >&5
9575   rm -rf conftest*
9576   eval "ac_cv_func___res_query=no"
9577 fi
9578 rm -f conftest*
9579 fi
9580
9581 if eval "test \"`echo '$ac_cv_func_'__res_query`\" = yes"; then
9582   echo "$ac_t""yes" 1>&6
9583   :
9584 else
9585   echo "$ac_t""no" 1>&6
9586 fi
9587
9588         ac_cv_func_res_query=$ac_cv_func___res_query
9589 fi
9590
9591 if test $ac_cv_func_res_query = no ; then 
9592         echo $ac_n "checking for res_query in -lbind""... $ac_c" 1>&6
9593 echo "configure:9594: checking for res_query in -lbind" >&5
9594 ac_lib_var=`echo bind'_'res_query | sed 'y%./+-:%__p__%'`
9595 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9596   echo $ac_n "(cached) $ac_c" 1>&6
9597 else
9598   ac_save_LIBS="$LIBS"
9599 LIBS="-lbind  $LIBS"
9600 cat > conftest.$ac_ext <<EOF
9601 #line 9602 "configure"
9602 #include "confdefs.h"
9603 /* Override any gcc2 internal prototype to avoid an error.  */
9604 /* We use char because int might match the return type of a gcc2
9605     builtin and then its argument prototype would still apply.  */
9606 char res_query();
9607
9608 int main() {
9609 res_query()
9610 ; return 0; }
9611 EOF
9612 if { (eval echo configure:9613: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9613   rm -rf conftest*
9614   eval "ac_cv_lib_$ac_lib_var=yes"
9615 else
9616   echo "configure: failed program was:" >&5
9617   cat conftest.$ac_ext >&5
9618   rm -rf conftest*
9619   eval "ac_cv_lib_$ac_lib_var=no"
9620 fi
9621 rm -f conftest*
9622 LIBS="$ac_save_LIBS"
9623
9624 fi
9625 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9626   echo "$ac_t""yes" 1>&6
9627     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9628     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9629   cat >> confdefs.h <<EOF
9630 #define $ac_tr_lib 1
9631 EOF
9632
9633   LIBS="-lbind $LIBS"
9634
9635 else
9636   echo "$ac_t""no" 1>&6
9637 fi
9638
9639         ac_cv_func_res_query=$ac_cv_lib_bind_res_query
9640 fi
9641
9642 if test $ac_cv_func_res_query = no ; then 
9643         echo $ac_n "checking for __res_query in -lbind""... $ac_c" 1>&6
9644 echo "configure:9645: checking for __res_query in -lbind" >&5
9645 ac_lib_var=`echo bind'_'__res_query | sed 'y%./+-:%__p__%'`
9646 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9647   echo $ac_n "(cached) $ac_c" 1>&6
9648 else
9649   ac_save_LIBS="$LIBS"
9650 LIBS="-lbind  $LIBS"
9651 cat > conftest.$ac_ext <<EOF
9652 #line 9653 "configure"
9653 #include "confdefs.h"
9654 /* Override any gcc2 internal prototype to avoid an error.  */
9655 /* We use char because int might match the return type of a gcc2
9656     builtin and then its argument prototype would still apply.  */
9657 char __res_query();
9658
9659 int main() {
9660 __res_query()
9661 ; return 0; }
9662 EOF
9663 if { (eval echo configure:9664: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9664   rm -rf conftest*
9665   eval "ac_cv_lib_$ac_lib_var=yes"
9666 else
9667   echo "configure: failed program was:" >&5
9668   cat conftest.$ac_ext >&5
9669   rm -rf conftest*
9670   eval "ac_cv_lib_$ac_lib_var=no"
9671 fi
9672 rm -f conftest*
9673 LIBS="$ac_save_LIBS"
9674
9675 fi
9676 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9677   echo "$ac_t""yes" 1>&6
9678     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9679     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9680   cat >> confdefs.h <<EOF
9681 #define $ac_tr_lib 1
9682 EOF
9683
9684   LIBS="-lbind $LIBS"
9685
9686 else
9687   echo "$ac_t""no" 1>&6
9688 fi
9689
9690         ac_cv_func_res_query=$ac_cv_lib_bind___res_query
9691 fi
9692
9693 if test $ac_cv_func_res_query = no ; then 
9694         echo $ac_n "checking for res_query in -lresolv""... $ac_c" 1>&6
9695 echo "configure:9696: checking for res_query in -lresolv" >&5
9696 ac_lib_var=`echo resolv'_'res_query | sed 'y%./+-:%__p__%'`
9697 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9698   echo $ac_n "(cached) $ac_c" 1>&6
9699 else
9700   ac_save_LIBS="$LIBS"
9701 LIBS="-lresolv  $LIBS"
9702 cat > conftest.$ac_ext <<EOF
9703 #line 9704 "configure"
9704 #include "confdefs.h"
9705 /* Override any gcc2 internal prototype to avoid an error.  */
9706 /* We use char because int might match the return type of a gcc2
9707     builtin and then its argument prototype would still apply.  */
9708 char res_query();
9709
9710 int main() {
9711 res_query()
9712 ; return 0; }
9713 EOF
9714 if { (eval echo configure:9715: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9715   rm -rf conftest*
9716   eval "ac_cv_lib_$ac_lib_var=yes"
9717 else
9718   echo "configure: failed program was:" >&5
9719   cat conftest.$ac_ext >&5
9720   rm -rf conftest*
9721   eval "ac_cv_lib_$ac_lib_var=no"
9722 fi
9723 rm -f conftest*
9724 LIBS="$ac_save_LIBS"
9725
9726 fi
9727 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9728   echo "$ac_t""yes" 1>&6
9729     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9730     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9731   cat >> confdefs.h <<EOF
9732 #define $ac_tr_lib 1
9733 EOF
9734
9735   LIBS="-lresolv $LIBS"
9736
9737 else
9738   echo "$ac_t""no" 1>&6
9739 fi
9740
9741         ac_cv_func_res_query=$ac_cv_lib_resolv_res_query
9742 fi
9743
9744 if test $ac_cv_func_res_query = no ; then 
9745         echo $ac_n "checking for __res_query in -lresolv""... $ac_c" 1>&6
9746 echo "configure:9747: checking for __res_query in -lresolv" >&5
9747 ac_lib_var=`echo resolv'_'__res_query | sed 'y%./+-:%__p__%'`
9748 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9749   echo $ac_n "(cached) $ac_c" 1>&6
9750 else
9751   ac_save_LIBS="$LIBS"
9752 LIBS="-lresolv  $LIBS"
9753 cat > conftest.$ac_ext <<EOF
9754 #line 9755 "configure"
9755 #include "confdefs.h"
9756 /* Override any gcc2 internal prototype to avoid an error.  */
9757 /* We use char because int might match the return type of a gcc2
9758     builtin and then its argument prototype would still apply.  */
9759 char __res_query();
9760
9761 int main() {
9762 __res_query()
9763 ; return 0; }
9764 EOF
9765 if { (eval echo configure:9766: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9766   rm -rf conftest*
9767   eval "ac_cv_lib_$ac_lib_var=yes"
9768 else
9769   echo "configure: failed program was:" >&5
9770   cat conftest.$ac_ext >&5
9771   rm -rf conftest*
9772   eval "ac_cv_lib_$ac_lib_var=no"
9773 fi
9774 rm -f conftest*
9775 LIBS="$ac_save_LIBS"
9776
9777 fi
9778 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9779   echo "$ac_t""yes" 1>&6
9780     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9781     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9782   cat >> confdefs.h <<EOF
9783 #define $ac_tr_lib 1
9784 EOF
9785
9786   LIBS="-lresolv $LIBS"
9787
9788 else
9789   echo "$ac_t""no" 1>&6
9790 fi
9791
9792         ac_cv_func_res_query=$ac_cv_lib_resolv___res_query
9793 fi
9794
9795 if test "$ac_cv_func_res_query" = yes ; then
9796         cat >> confdefs.h <<\EOF
9797 #define HAVE_RES_QUERY 1
9798 EOF
9799
9800
9801         if test $ol_enable_dnssrv != no ; then
9802                 ol_link_dnssrv=yes
9803         fi
9804 fi
9805
9806 if test "$ol_enable_dnssrv" != no -a "$ol_link_dnssrv" = no ; then
9807         { echo "configure: error: DNSSRV requires res_query()" 1>&2; exit 1; }
9808 fi
9809
9810 for ac_func in getaddrinfo getnameinfo gai_strerror inet_ntop 
9811 do
9812 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9813 echo "configure:9814: checking for $ac_func" >&5
9814 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
9815   echo $ac_n "(cached) $ac_c" 1>&6
9816 else
9817   cat > conftest.$ac_ext <<EOF
9818 #line 9819 "configure"
9819 #include "confdefs.h"
9820 /* System header to define __stub macros and hopefully few prototypes,
9821     which can conflict with char $ac_func(); below.  */
9822 #include <assert.h>
9823 /* Override any gcc2 internal prototype to avoid an error.  */
9824 /* We use char because int might match the return type of a gcc2
9825     builtin and then its argument prototype would still apply.  */
9826 char $ac_func();
9827 char (*f)();
9828
9829 int main() {
9830
9831 /* The GNU C library defines this for functions which it implements
9832     to always fail with ENOSYS.  Some functions are actually named
9833     something starting with __ and the normal name is an alias.  */
9834 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9835 choke me
9836 #else
9837 f = $ac_func;
9838 #endif
9839
9840 ; return 0; }
9841 EOF
9842 if { (eval echo configure:9843: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9843   rm -rf conftest*
9844   eval "ac_cv_func_$ac_func=yes"
9845 else
9846   echo "configure: failed program was:" >&5
9847   cat conftest.$ac_ext >&5
9848   rm -rf conftest*
9849   eval "ac_cv_func_$ac_func=no"
9850 fi
9851 rm -f conftest*
9852 fi
9853
9854 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9855   echo "$ac_t""yes" 1>&6
9856     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9857   cat >> confdefs.h <<EOF
9858 #define $ac_tr_func 1
9859 EOF
9860  
9861 else
9862   echo "$ac_t""no" 1>&6
9863 fi
9864 done
9865
9866
9867 ol_link_ipv6=no
9868 if test $ac_cv_func_getaddrinfo = no -o $ac_cv_func_inet_ntop = no ; then
9869         if test $ol_enable_ipv6 = yes ; then
9870                 { echo "configure: error: IPv6 support requires getaddrinfo() and inet_ntop()" 1>&2; exit 1; }
9871         fi
9872 elif test $ol_enable_ipv6 != no ; then
9873         echo $ac_n "checking INET6_ADDRSTRLEN""... $ac_c" 1>&6
9874 echo "configure:9875: checking INET6_ADDRSTRLEN" >&5
9875 if eval "test \"\${ol_cv_inet6_addrstrlen+set}\" = set"; then
9876   echo $ac_n "(cached) $ac_c" 1>&6
9877 else
9878   
9879                 cat > conftest.$ac_ext <<EOF
9880 #line 9881 "configure"
9881 #include "confdefs.h"
9882
9883 #                       include <netinet/in.h>
9884 #                       ifdef INET6_ADDRSTRLEN
9885                                 __has_inet6_addrstrlen__;
9886 #                       endif
9887                 
9888 EOF
9889 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9890   egrep "__has_inet6_addrstrlen__" >/dev/null 2>&1; then
9891   rm -rf conftest*
9892   ol_cv_inet6_addrstrlen=yes
9893 else
9894   rm -rf conftest*
9895   ol_cv_inet6_addrstrlen=no
9896 fi
9897 rm -f conftest*
9898
9899 fi
9900
9901 echo "$ac_t""$ol_cv_inet6_addrstrlen" 1>&6
9902
9903
9904         echo $ac_n "checking struct sockaddr_storage""... $ac_c" 1>&6
9905 echo "configure:9906: checking struct sockaddr_storage" >&5
9906 if eval "test \"\${ol_cv_struct_sockaddr_storage+set}\" = set"; then
9907   echo $ac_n "(cached) $ac_c" 1>&6
9908 else
9909   
9910                 cat > conftest.$ac_ext <<EOF
9911 #line 9912 "configure"
9912 #include "confdefs.h"
9913
9914 #include <sys/types.h>
9915 #include <sys/socket.h>
9916
9917 int main() {
9918
9919                         struct sockaddr_storage ss;
9920
9921 ; return 0; }
9922 EOF
9923 if { (eval echo configure:9924: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9924   rm -rf conftest*
9925   ol_cv_struct_sockaddr_storage=yes
9926 else
9927   echo "configure: failed program was:" >&5
9928   cat conftest.$ac_ext >&5
9929   rm -rf conftest*
9930   ol_cv_struct_sockaddr_storage=no
9931 fi
9932 rm -f conftest*
9933 fi
9934
9935 echo "$ac_t""$ol_cv_struct_sockaddr_storage" 1>&6
9936
9937         if test $ol_cv_inet6_addrstrlen = yes \
9938                 -a $ol_cv_struct_sockaddr_storage = yes ; then
9939                 ol_link_ipv6=yes
9940         elif test $ol_enable_ipv6 = yes \
9941                         -a $ol_cv_inet6_addrstrlen = no ; then
9942                 { echo "configure: error: IPv6 support requires INET6_ADDRSTRLEN" 1>&2; exit 1; }
9943         elif test $ol_enable_ipv6 = yes \
9944                         -a $ol_cv_struct_sockaddr_storage = no ; then
9945                 { echo "configure: error: IPv6 support requires struct sockaddr_storage" 1>&2; exit 1; }
9946         fi
9947 fi
9948
9949 if test $ol_enable_local != no ; then
9950         for ac_hdr in sys/un.h 
9951 do
9952 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9953 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9954 echo "configure:9955: checking for $ac_hdr" >&5
9955 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9956   echo $ac_n "(cached) $ac_c" 1>&6
9957 else
9958   cat > conftest.$ac_ext <<EOF
9959 #line 9960 "configure"
9960 #include "confdefs.h"
9961 #include <$ac_hdr>
9962 EOF
9963 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9964 { (eval echo configure:9965: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9965 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9966 if test -z "$ac_err"; then
9967   rm -rf conftest*
9968   eval "ac_cv_header_$ac_safe=yes"
9969 else
9970   echo "$ac_err" >&5
9971   echo "configure: failed program was:" >&5
9972   cat conftest.$ac_ext >&5
9973   rm -rf conftest*
9974   eval "ac_cv_header_$ac_safe=no"
9975 fi
9976 rm -f conftest*
9977 fi
9978 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9979   echo "$ac_t""yes" 1>&6
9980     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9981   cat >> confdefs.h <<EOF
9982 #define $ac_tr_hdr 1
9983 EOF
9984  
9985 else
9986   echo "$ac_t""no" 1>&6
9987 fi
9988 done
9989
9990
9991         if test $ol_enable_local = auto ; then
9992                 ol_enable_local=$ac_cv_header_sys_un_h
9993         elif test $ac_cv_header_sys_un_h = no ; then
9994                 { echo "configure: error: AF_LOCAL domain support requires sys/un.h" 1>&2; exit 1; }
9995         fi
9996 fi
9997
9998 ol_link_kbind=no
9999 ol_link_krb5=no
10000 ol_link_krb4=no
10001
10002 if test $ol_with_kerberos = yes -o $ol_with_kerberos = auto \
10003         -o $ol_with_kerberos = k5 -o $ol_with_kerberos = k5only \
10004         -o $ol_with_kerberos = k425 ; then
10005
10006         for ac_hdr in krb5.h
10007 do
10008 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10009 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10010 echo "configure:10011: checking for $ac_hdr" >&5
10011 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10012   echo $ac_n "(cached) $ac_c" 1>&6
10013 else
10014   cat > conftest.$ac_ext <<EOF
10015 #line 10016 "configure"
10016 #include "confdefs.h"
10017 #include <$ac_hdr>
10018 EOF
10019 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10020 { (eval echo configure:10021: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10021 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10022 if test -z "$ac_err"; then
10023   rm -rf conftest*
10024   eval "ac_cv_header_$ac_safe=yes"
10025 else
10026   echo "$ac_err" >&5
10027   echo "configure: failed program was:" >&5
10028   cat conftest.$ac_ext >&5
10029   rm -rf conftest*
10030   eval "ac_cv_header_$ac_safe=no"
10031 fi
10032 rm -f conftest*
10033 fi
10034 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10035   echo "$ac_t""yes" 1>&6
10036     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10037   cat >> confdefs.h <<EOF
10038 #define $ac_tr_hdr 1
10039 EOF
10040  
10041 else
10042   echo "$ac_t""no" 1>&6
10043 fi
10044 done
10045
10046
10047         if test $ac_cv_header_krb5_h = yes ; then
10048                                 for ac_hdr in heim_err.h
10049 do
10050 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10051 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10052 echo "configure:10053: checking for $ac_hdr" >&5
10053 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10054   echo $ac_n "(cached) $ac_c" 1>&6
10055 else
10056   cat > conftest.$ac_ext <<EOF
10057 #line 10058 "configure"
10058 #include "confdefs.h"
10059 #include <$ac_hdr>
10060 EOF
10061 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10062 { (eval echo configure:10063: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10063 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10064 if test -z "$ac_err"; then
10065   rm -rf conftest*
10066   eval "ac_cv_header_$ac_safe=yes"
10067 else
10068   echo "$ac_err" >&5
10069   echo "configure: failed program was:" >&5
10070   cat conftest.$ac_ext >&5
10071   rm -rf conftest*
10072   eval "ac_cv_header_$ac_safe=no"
10073 fi
10074 rm -f conftest*
10075 fi
10076 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10077   echo "$ac_t""yes" 1>&6
10078     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10079   cat >> confdefs.h <<EOF
10080 #define $ac_tr_hdr 1
10081 EOF
10082  
10083 else
10084   echo "$ac_t""no" 1>&6
10085 fi
10086 done
10087
10088                 if test $ac_cv_header_heim_err_h = yes ; then
10089                         krb5_impl=heimdal
10090                 else
10091                         krb5_impl=mit
10092                 fi
10093
10094                 if test $krb5_impl = mit; then
10095                         echo $ac_n "checking for main in -lk5crypto""... $ac_c" 1>&6
10096 echo "configure:10097: checking for main in -lk5crypto" >&5
10097 ac_lib_var=`echo k5crypto'_'main | sed 'y%./+-:%__p__%'`
10098 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10099   echo $ac_n "(cached) $ac_c" 1>&6
10100 else
10101   ac_save_LIBS="$LIBS"
10102 LIBS="-lk5crypto  $LIBS"
10103 cat > conftest.$ac_ext <<EOF
10104 #line 10105 "configure"
10105 #include "confdefs.h"
10106
10107 int main() {
10108 main()
10109 ; return 0; }
10110 EOF
10111 if { (eval echo configure:10112: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10112   rm -rf conftest*
10113   eval "ac_cv_lib_$ac_lib_var=yes"
10114 else
10115   echo "configure: failed program was:" >&5
10116   cat conftest.$ac_ext >&5
10117   rm -rf conftest*
10118   eval "ac_cv_lib_$ac_lib_var=no"
10119 fi
10120 rm -f conftest*
10121 LIBS="$ac_save_LIBS"
10122
10123 fi
10124 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10125   echo "$ac_t""yes" 1>&6
10126   krb5crypto=k5crypto
10127 else
10128   echo "$ac_t""no" 1>&6
10129 krb5crypto=crypto
10130 fi
10131
10132
10133                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
10134 echo "configure:10135: checking for main in -lkrb5" >&5
10135 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
10136 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10137   echo $ac_n "(cached) $ac_c" 1>&6
10138 else
10139   ac_save_LIBS="$LIBS"
10140 LIBS="-lkrb5 -l$krb5crypto -lcom_err $LIBS"
10141 cat > conftest.$ac_ext <<EOF
10142 #line 10143 "configure"
10143 #include "confdefs.h"
10144
10145 int main() {
10146 main()
10147 ; return 0; }
10148 EOF
10149 if { (eval echo configure:10150: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10150   rm -rf conftest*
10151   eval "ac_cv_lib_$ac_lib_var=yes"
10152 else
10153   echo "configure: failed program was:" >&5
10154   cat conftest.$ac_ext >&5
10155   rm -rf conftest*
10156   eval "ac_cv_lib_$ac_lib_var=no"
10157 fi
10158 rm -f conftest*
10159 LIBS="$ac_save_LIBS"
10160
10161 fi
10162 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10163   echo "$ac_t""yes" 1>&6
10164   have_krb5=yes
10165                                 KRB5_LIBS="-lkrb5 -l$krb5crypto -lcom_err"
10166 else
10167   echo "$ac_t""no" 1>&6
10168 have_krb5=no
10169 fi
10170
10171
10172                 elif test $krb5_impl = heimdal; then
10173                         echo $ac_n "checking for main in -ldes""... $ac_c" 1>&6
10174 echo "configure:10175: checking for main in -ldes" >&5
10175 ac_lib_var=`echo des'_'main | sed 'y%./+-:%__p__%'`
10176 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10177   echo $ac_n "(cached) $ac_c" 1>&6
10178 else
10179   ac_save_LIBS="$LIBS"
10180 LIBS="-ldes  $LIBS"
10181 cat > conftest.$ac_ext <<EOF
10182 #line 10183 "configure"
10183 #include "confdefs.h"
10184
10185 int main() {
10186 main()
10187 ; return 0; }
10188 EOF
10189 if { (eval echo configure:10190: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10190   rm -rf conftest*
10191   eval "ac_cv_lib_$ac_lib_var=yes"
10192 else
10193   echo "configure: failed program was:" >&5
10194   cat conftest.$ac_ext >&5
10195   rm -rf conftest*
10196   eval "ac_cv_lib_$ac_lib_var=no"
10197 fi
10198 rm -f conftest*
10199 LIBS="$ac_save_LIBS"
10200
10201 fi
10202 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10203   echo "$ac_t""yes" 1>&6
10204   krb5crypto=des
10205 else
10206   echo "$ac_t""no" 1>&6
10207 krb5crypto=crypto
10208 fi
10209
10210
10211                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
10212 echo "configure:10213: checking for main in -lkrb5" >&5
10213 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
10214 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10215   echo $ac_n "(cached) $ac_c" 1>&6
10216 else
10217   ac_save_LIBS="$LIBS"
10218 LIBS="-lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err $LIBS"
10219 cat > conftest.$ac_ext <<EOF
10220 #line 10221 "configure"
10221 #include "confdefs.h"
10222
10223 int main() {
10224 main()
10225 ; return 0; }
10226 EOF
10227 if { (eval echo configure:10228: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10228   rm -rf conftest*
10229   eval "ac_cv_lib_$ac_lib_var=yes"
10230 else
10231   echo "configure: failed program was:" >&5
10232   cat conftest.$ac_ext >&5
10233   rm -rf conftest*
10234   eval "ac_cv_lib_$ac_lib_var=no"
10235 fi
10236 rm -f conftest*
10237 LIBS="$ac_save_LIBS"
10238
10239 fi
10240 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10241   echo "$ac_t""yes" 1>&6
10242   have_krb5=yes
10243                                 KRB5_LIBS="-lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err"
10244 else
10245   echo "$ac_t""no" 1>&6
10246 have_krb5=no
10247 fi
10248
10249
10250                         cat >> confdefs.h <<\EOF
10251 #define HAVE_HEIMDAL_KERBEROS 1
10252 EOF
10253
10254
10255                 else
10256                         have_krb5=no
10257                         echo "configure: warning: Unrecognized Kerberos5 Implementation" 1>&2
10258                 fi
10259
10260                 if test $have_krb5 = yes ; then
10261                         ol_link_krb5=yes
10262
10263                         cat >> confdefs.h <<\EOF
10264 #define HAVE_KRB5 1
10265 EOF
10266
10267
10268                         if test $ol_with_kerberos = k5only ; then
10269                                 ol_with_kerberos=found
10270                         fi
10271
10272                 elif test $ol_with_kerberos != auto ; then
10273                         { echo "configure: error: Required Kerberos 5 support not available" 1>&2; exit 1; }
10274                 fi
10275
10276         fi
10277 fi
10278
10279 if test $ol_link_krb5 = yes -a \( $ol_with_kerberos = yes -o \
10280         $ol_with_kerberos = auto -o $ol_with_kerberos = k425 \) ; then
10281
10282         for ac_hdr in kerberosIV/krb.h kerberosIV/des.h
10283 do
10284 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10285 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10286 echo "configure:10287: checking for $ac_hdr" >&5
10287 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10288   echo $ac_n "(cached) $ac_c" 1>&6
10289 else
10290   cat > conftest.$ac_ext <<EOF
10291 #line 10292 "configure"
10292 #include "confdefs.h"
10293 #include <$ac_hdr>
10294 EOF
10295 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10296 { (eval echo configure:10297: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10297 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10298 if test -z "$ac_err"; then
10299   rm -rf conftest*
10300   eval "ac_cv_header_$ac_safe=yes"
10301 else
10302   echo "$ac_err" >&5
10303   echo "configure: failed program was:" >&5
10304   cat conftest.$ac_ext >&5
10305   rm -rf conftest*
10306   eval "ac_cv_header_$ac_safe=no"
10307 fi
10308 rm -f conftest*
10309 fi
10310 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10311   echo "$ac_t""yes" 1>&6
10312     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10313   cat >> confdefs.h <<EOF
10314 #define $ac_tr_hdr 1
10315 EOF
10316  
10317 else
10318   echo "$ac_t""no" 1>&6
10319 fi
10320 done
10321
10322
10323         if test $ac_cv_header_kerberosIV_krb_h = yes ; then
10324                 if test $krb5_impl = mit; then
10325                         echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
10326 echo "configure:10327: checking for main in -lkrb4" >&5
10327 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
10328 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10329   echo $ac_n "(cached) $ac_c" 1>&6
10330 else
10331   ac_save_LIBS="$LIBS"
10332 LIBS="-lkrb4 -ldes425 -lkrb5 -l$krb5crypto -lcom_err $LIBS"
10333 cat > conftest.$ac_ext <<EOF
10334 #line 10335 "configure"
10335 #include "confdefs.h"
10336
10337 int main() {
10338 main()
10339 ; return 0; }
10340 EOF
10341 if { (eval echo configure:10342: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10342   rm -rf conftest*
10343   eval "ac_cv_lib_$ac_lib_var=yes"
10344 else
10345   echo "configure: failed program was:" >&5
10346   cat conftest.$ac_ext >&5
10347   rm -rf conftest*
10348   eval "ac_cv_lib_$ac_lib_var=no"
10349 fi
10350 rm -f conftest*
10351 LIBS="$ac_save_LIBS"
10352
10353 fi
10354 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10355   echo "$ac_t""yes" 1>&6
10356   have_k425=yes
10357                                 KRB4_LIBS="-lkrb4 -ldes425"
10358 else
10359   echo "$ac_t""no" 1>&6
10360 have_k425=no
10361 fi
10362
10363
10364                 elif test $krb5_impl = heimdal; then
10365                         echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
10366 echo "configure:10367: checking for main in -lkrb4" >&5
10367 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
10368 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10369   echo $ac_n "(cached) $ac_c" 1>&6
10370 else
10371   ac_save_LIBS="$LIBS"
10372 LIBS="-lkrb4 -lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err $LIBS"
10373 cat > conftest.$ac_ext <<EOF
10374 #line 10375 "configure"
10375 #include "confdefs.h"
10376
10377 int main() {
10378 main()
10379 ; return 0; }
10380 EOF
10381 if { (eval echo configure:10382: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10382   rm -rf conftest*
10383   eval "ac_cv_lib_$ac_lib_var=yes"
10384 else
10385   echo "configure: failed program was:" >&5
10386   cat conftest.$ac_ext >&5
10387   rm -rf conftest*
10388   eval "ac_cv_lib_$ac_lib_var=no"
10389 fi
10390 rm -f conftest*
10391 LIBS="$ac_save_LIBS"
10392
10393 fi
10394 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10395   echo "$ac_t""yes" 1>&6
10396   have_k425=yes
10397                                 KRB4_LIBS="-lkrb4"
10398 else
10399   echo "$ac_t""no" 1>&6
10400 have_k425=no
10401 fi
10402
10403
10404                 else
10405                         have_425=no
10406                         echo "configure: warning: Unrecongized Kerberos V Implementation" 1>&2
10407                 fi
10408
10409                 if test $have_k425 = yes ; then
10410                         ol_with_kerberos=found
10411                         ol_link_krb4=yes
10412
10413                         cat >> confdefs.h <<\EOF
10414 #define HAVE_KRB425 1
10415 EOF
10416
10417                         cat >> confdefs.h <<\EOF
10418 #define HAVE_KRB4 1
10419 EOF
10420
10421
10422                         echo $ac_n "checking for des_debug in Kerberos libraries""... $ac_c" 1>&6
10423 echo "configure:10424: checking for des_debug in Kerberos libraries" >&5
10424 if eval "test \"\${ol_cv_var_des_debug+set}\" = set"; then
10425   echo $ac_n "(cached) $ac_c" 1>&6
10426 else
10427   
10428                                                                 save_LIBS="$LIBS"
10429                                 LIBS="$KRB4_LIBS $KRB5_LIBS $LIBS"
10430                                 cat > conftest.$ac_ext <<EOF
10431 #line 10432 "configure"
10432 #include "confdefs.h"
10433
10434 #include <kerberosIV/krb.h>
10435 #include <kerberosIV/des.h>
10436 extern int des_debug;
10437
10438 int main() {
10439
10440 des_debug = 1;
10441
10442 ; return 0; }
10443 EOF
10444 if { (eval echo configure:10445: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10445   rm -rf conftest*
10446   ol_cv_var_des_debug=yes
10447 else
10448   echo "configure: failed program was:" >&5
10449   cat conftest.$ac_ext >&5
10450   rm -rf conftest*
10451   ol_cv_var_des_debug=no
10452 fi
10453 rm -f conftest*
10454                                                                 LIBS="$save_LIBS"
10455                         
10456 fi
10457
10458 echo "$ac_t""$ol_cv_var_des_debug" 1>&6
10459
10460                         if test $ol_cv_var_des_debug = yes ; then
10461                                 cat >> confdefs.h <<\EOF
10462 #define HAVE_DES_DEBUG 1
10463 EOF
10464
10465                         fi
10466
10467                         LIBS="$save_LIBS"
10468                 fi
10469         fi
10470 fi
10471
10472 if test $ol_link_krb5 = yes ; then
10473         ol_with_kerberos=found
10474 fi
10475
10476 if test $ol_with_kerberos = yes -o $ol_with_kerberos = auto \
10477         -o $ol_with_kerberos = k4 -o $ol_with_kerberos = kth ; then
10478
10479         for ac_hdr in krb.h des.h krb-archaeology.h 
10480 do
10481 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10482 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10483 echo "configure:10484: checking for $ac_hdr" >&5
10484 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10485   echo $ac_n "(cached) $ac_c" 1>&6
10486 else
10487   cat > conftest.$ac_ext <<EOF
10488 #line 10489 "configure"
10489 #include "confdefs.h"
10490 #include <$ac_hdr>
10491 EOF
10492 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10493 { (eval echo configure:10494: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10494 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10495 if test -z "$ac_err"; then
10496   rm -rf conftest*
10497   eval "ac_cv_header_$ac_safe=yes"
10498 else
10499   echo "$ac_err" >&5
10500   echo "configure: failed program was:" >&5
10501   cat conftest.$ac_ext >&5
10502   rm -rf conftest*
10503   eval "ac_cv_header_$ac_safe=no"
10504 fi
10505 rm -f conftest*
10506 fi
10507 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10508   echo "$ac_t""yes" 1>&6
10509     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10510   cat >> confdefs.h <<EOF
10511 #define $ac_tr_hdr 1
10512 EOF
10513  
10514 else
10515   echo "$ac_t""no" 1>&6
10516 fi
10517 done
10518
10519
10520         if test $ac_cv_header_krb_h = yes ; then
10521                 echo $ac_n "checking for main in -lkrb""... $ac_c" 1>&6
10522 echo "configure:10523: checking for main in -lkrb" >&5
10523 ac_lib_var=`echo krb'_'main | sed 'y%./+-:%__p__%'`
10524 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10525   echo $ac_n "(cached) $ac_c" 1>&6
10526 else
10527   ac_save_LIBS="$LIBS"
10528 LIBS="-lkrb -ldes $LIBS"
10529 cat > conftest.$ac_ext <<EOF
10530 #line 10531 "configure"
10531 #include "confdefs.h"
10532
10533 int main() {
10534 main()
10535 ; return 0; }
10536 EOF
10537 if { (eval echo configure:10538: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10538   rm -rf conftest*
10539   eval "ac_cv_lib_$ac_lib_var=yes"
10540 else
10541   echo "configure: failed program was:" >&5
10542   cat conftest.$ac_ext >&5
10543   rm -rf conftest*
10544   eval "ac_cv_lib_$ac_lib_var=no"
10545 fi
10546 rm -f conftest*
10547 LIBS="$ac_save_LIBS"
10548
10549 fi
10550 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10551   echo "$ac_t""yes" 1>&6
10552   have_k4=yes
10553 else
10554   echo "$ac_t""no" 1>&6
10555 have_k4=no
10556 fi
10557
10558
10559                 if test $have_k4 = yes ; then
10560                         ol_with_kerberos=found
10561                         ol_link_krb4=yes
10562
10563                         cat >> confdefs.h <<\EOF
10564 #define HAVE_KRB4 1
10565 EOF
10566
10567
10568                         KRB4_LIBS="-lkrb -ldes"
10569
10570                         if test $ac_cv_header_krb_archaeology_h = yes ; then
10571                                 cat >> confdefs.h <<\EOF
10572 #define HAVE_KTH_KERBEROS 1
10573 EOF
10574
10575                         fi
10576                 fi
10577         fi
10578 fi
10579
10580 if test $ol_link_krb4 = yes -a $ol_enable_kbind != no ; then
10581         ol_link_kbind=yes
10582
10583 elif test $ol_enable_kbind = yes ; then
10584         { echo "configure: error: Kerberos IV detection failed" 1>&2; exit 1; }
10585 fi
10586
10587 if test $ol_link_krb4 = yes -o $ol_link_krb5 = yes ; then
10588         cat >> confdefs.h <<\EOF
10589 #define HAVE_KERBEROS 1
10590 EOF
10591
10592
10593 elif test $ol_with_kerberos != auto -a $ol_with_kerberos != no ; then
10594         { echo "configure: error: Kerberos detection failed" 1>&2; exit 1; }
10595 fi
10596
10597 ol_link_tls=no
10598 if test $ol_with_tls != no ; then
10599         for ac_hdr in openssl/ssl.h ssl.h
10600 do
10601 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10602 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10603 echo "configure:10604: checking for $ac_hdr" >&5
10604 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10605   echo $ac_n "(cached) $ac_c" 1>&6
10606 else
10607   cat > conftest.$ac_ext <<EOF
10608 #line 10609 "configure"
10609 #include "confdefs.h"
10610 #include <$ac_hdr>
10611 EOF
10612 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10613 { (eval echo configure:10614: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10614 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10615 if test -z "$ac_err"; then
10616   rm -rf conftest*
10617   eval "ac_cv_header_$ac_safe=yes"
10618 else
10619   echo "$ac_err" >&5
10620   echo "configure: failed program was:" >&5
10621   cat conftest.$ac_ext >&5
10622   rm -rf conftest*
10623   eval "ac_cv_header_$ac_safe=no"
10624 fi
10625 rm -f conftest*
10626 fi
10627 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10628   echo "$ac_t""yes" 1>&6
10629     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10630   cat >> confdefs.h <<EOF
10631 #define $ac_tr_hdr 1
10632 EOF
10633  
10634 else
10635   echo "$ac_t""no" 1>&6
10636 fi
10637 done
10638
10639         
10640         if test $ac_cv_header_openssl_ssl_h = yes \
10641                 -o $ac_cv_header_ssl_h = yes ; then
10642                 echo $ac_n "checking for SSLeay_add_ssl_algorithms in -lssl""... $ac_c" 1>&6
10643 echo "configure:10644: checking for SSLeay_add_ssl_algorithms in -lssl" >&5
10644 ac_lib_var=`echo ssl'_'SSLeay_add_ssl_algorithms | sed 'y%./+-:%__p__%'`
10645 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10646   echo $ac_n "(cached) $ac_c" 1>&6
10647 else
10648   ac_save_LIBS="$LIBS"
10649 LIBS="-lssl -lcrypto $LIBS"
10650 cat > conftest.$ac_ext <<EOF
10651 #line 10652 "configure"
10652 #include "confdefs.h"
10653 /* Override any gcc2 internal prototype to avoid an error.  */
10654 /* We use char because int might match the return type of a gcc2
10655     builtin and then its argument prototype would still apply.  */
10656 char SSLeay_add_ssl_algorithms();
10657
10658 int main() {
10659 SSLeay_add_ssl_algorithms()
10660 ; return 0; }
10661 EOF
10662 if { (eval echo configure:10663: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10663   rm -rf conftest*
10664   eval "ac_cv_lib_$ac_lib_var=yes"
10665 else
10666   echo "configure: failed program was:" >&5
10667   cat conftest.$ac_ext >&5
10668   rm -rf conftest*
10669   eval "ac_cv_lib_$ac_lib_var=no"
10670 fi
10671 rm -f conftest*
10672 LIBS="$ac_save_LIBS"
10673
10674 fi
10675 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10676   echo "$ac_t""yes" 1>&6
10677   have_ssleay=yes
10678                         need_rsaref=no
10679 else
10680   echo "$ac_t""no" 1>&6
10681 have_ssleay=no
10682 fi
10683
10684                         
10685                 if test $have_ssleay = no ; then
10686                         echo $ac_n "checking for SSL_library_init in -lssl""... $ac_c" 1>&6
10687 echo "configure:10688: checking for SSL_library_init in -lssl" >&5
10688 ac_lib_var=`echo ssl'_'SSL_library_init | sed 'y%./+-:%__p__%'`
10689 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10690   echo $ac_n "(cached) $ac_c" 1>&6
10691 else
10692   ac_save_LIBS="$LIBS"
10693 LIBS="-lssl -lcrypto $LIBS"
10694 cat > conftest.$ac_ext <<EOF
10695 #line 10696 "configure"
10696 #include "confdefs.h"
10697 /* Override any gcc2 internal prototype to avoid an error.  */
10698 /* We use char because int might match the return type of a gcc2
10699     builtin and then its argument prototype would still apply.  */
10700 char SSL_library_init();
10701
10702 int main() {
10703 SSL_library_init()
10704 ; return 0; }
10705 EOF
10706 if { (eval echo configure:10707: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10707   rm -rf conftest*
10708   eval "ac_cv_lib_$ac_lib_var=yes"
10709 else
10710   echo "configure: failed program was:" >&5
10711   cat conftest.$ac_ext >&5
10712   rm -rf conftest*
10713   eval "ac_cv_lib_$ac_lib_var=no"
10714 fi
10715 rm -f conftest*
10716 LIBS="$ac_save_LIBS"
10717
10718 fi
10719 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10720   echo "$ac_t""yes" 1>&6
10721   have_ssleay=yes
10722                                 need_rsaref=no
10723 else
10724   echo "$ac_t""no" 1>&6
10725 have_ssleay=no
10726 fi
10727
10728                 fi
10729
10730                 if test $have_ssleay = no ; then
10731                         echo $ac_n "checking for ssl3_accept in -lssl""... $ac_c" 1>&6
10732 echo "configure:10733: checking for ssl3_accept in -lssl" >&5
10733 ac_lib_var=`echo ssl'_'ssl3_accept | sed 'y%./+-:%__p__%'`
10734 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10735   echo $ac_n "(cached) $ac_c" 1>&6
10736 else
10737   ac_save_LIBS="$LIBS"
10738 LIBS="-lssl -lcrypto -lRSAglue -lrsaref $LIBS"
10739 cat > conftest.$ac_ext <<EOF
10740 #line 10741 "configure"
10741 #include "confdefs.h"
10742 /* Override any gcc2 internal prototype to avoid an error.  */
10743 /* We use char because int might match the return type of a gcc2
10744     builtin and then its argument prototype would still apply.  */
10745 char ssl3_accept();
10746
10747 int main() {
10748 ssl3_accept()
10749 ; return 0; }
10750 EOF
10751 if { (eval echo configure:10752: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10752   rm -rf conftest*
10753   eval "ac_cv_lib_$ac_lib_var=yes"
10754 else
10755   echo "configure: failed program was:" >&5
10756   cat conftest.$ac_ext >&5
10757   rm -rf conftest*
10758   eval "ac_cv_lib_$ac_lib_var=no"
10759 fi
10760 rm -f conftest*
10761 LIBS="$ac_save_LIBS"
10762
10763 fi
10764 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10765   echo "$ac_t""yes" 1>&6
10766   have_ssleay=yes
10767                                 need_rsaref=yes
10768 else
10769   echo "$ac_t""no" 1>&6
10770 have_ssleay=no
10771 fi
10772
10773                 fi
10774
10775                 if test $have_ssleay = yes ; then
10776                         ol_with_tls=found
10777                         ol_link_tls=yes
10778
10779                         cat >> confdefs.h <<\EOF
10780 #define HAVE_SSLEAY 1
10781 EOF
10782
10783
10784                         if test $need_rsaref = yes; then
10785                                 cat >> confdefs.h <<\EOF
10786 #define HAVE_RSAREF 1
10787 EOF
10788
10789
10790                                 TLS_LIBS="-lssl -lcrypto -lRSAglue -lrsaref"
10791                         else
10792                                 TLS_LIBS="-lssl -lcrypto"
10793                         fi
10794                 fi
10795         fi
10796
10797 else
10798         echo "configure: warning: TLS data protection not supported!" 1>&2
10799 fi
10800
10801 WITH_TLS=no
10802 if test $ol_link_tls = yes ; then
10803         cat >> confdefs.h <<\EOF
10804 #define HAVE_TLS 1
10805 EOF
10806
10807         WITH_TLS=yes
10808
10809 elif test $ol_with_tls = auto ; then
10810         echo "configure: warning: Could not locate TLS/SSL package" 1>&2
10811         echo "configure: warning: TLS data protection not supported!" 1>&2
10812
10813 elif test $ol_with_tls != no ; then
10814         { echo "configure: error: Could not locate TLS/SSL package" 1>&2; exit 1; }
10815 fi
10816
10817 if test $ol_enable_lmpasswd != no; then
10818         if test $ol_link_tls != yes ; then
10819                 { echo "configure: error: LAN Manager passwords require OpenSSL" 1>&2; exit 1; }
10820         fi
10821
10822         cat >> confdefs.h <<\EOF
10823 #define SLAPD_LMHASH 1
10824 EOF
10825
10826 fi
10827
10828 ol_link_threads=no
10829
10830 if test $ol_with_threads = auto -o $ol_with_threads = yes \
10831         -o $ol_with_threads = nt ; then
10832
10833         
10834         echo $ac_n "checking for _beginthread""... $ac_c" 1>&6
10835 echo "configure:10836: checking for _beginthread" >&5
10836 if eval "test \"\${ac_cv_func__beginthread+set}\" = set"; then
10837   echo $ac_n "(cached) $ac_c" 1>&6
10838 else
10839   cat > conftest.$ac_ext <<EOF
10840 #line 10841 "configure"
10841 #include "confdefs.h"
10842 /* System header to define __stub macros and hopefully few prototypes,
10843     which can conflict with char _beginthread(); below.  */
10844 #include <assert.h>
10845 /* Override any gcc2 internal prototype to avoid an error.  */
10846 /* We use char because int might match the return type of a gcc2
10847     builtin and then its argument prototype would still apply.  */
10848 char _beginthread();
10849 char (*f)();
10850
10851 int main() {
10852
10853 /* The GNU C library defines this for functions which it implements
10854     to always fail with ENOSYS.  Some functions are actually named
10855     something starting with __ and the normal name is an alias.  */
10856 #if defined (__stub__beginthread) || defined (__stub____beginthread)
10857 choke me
10858 #else
10859 f = _beginthread;
10860 #endif
10861
10862 ; return 0; }
10863 EOF
10864 if { (eval echo configure:10865: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10865   rm -rf conftest*
10866   eval "ac_cv_func__beginthread=yes"
10867 else
10868   echo "configure: failed program was:" >&5
10869   cat conftest.$ac_ext >&5
10870   rm -rf conftest*
10871   eval "ac_cv_func__beginthread=no"
10872 fi
10873 rm -f conftest*
10874 fi
10875
10876 if eval "test \"`echo '$ac_cv_func_'_beginthread`\" = yes"; then
10877   echo "$ac_t""yes" 1>&6
10878   :
10879 else
10880   echo "$ac_t""no" 1>&6
10881 fi
10882
10883
10884         if test $ac_cv_func__beginthread = yes ; then
10885                 cat >> confdefs.h <<\EOF
10886 #define HAVE_NT_THREADS 1
10887 EOF
10888
10889                 ol_cv_nt_threads=yes
10890         fi
10891
10892
10893         if test "$ol_cv_nt_threads" = yes ; then
10894                 ol_link_threads=nt
10895                 ol_with_threads=found
10896                 ol_with_yielding_select=yes
10897
10898                 cat >> confdefs.h <<\EOF
10899 #define HAVE_NT_SERVICE_MANAGER 1
10900 EOF
10901
10902                 cat >> confdefs.h <<\EOF
10903 #define HAVE_NT_EVENT_LOG 1
10904 EOF
10905
10906         fi
10907
10908         if test $ol_with_threads = nt ; then
10909                 { echo "configure: error: could not locate NT Threads" 1>&2; exit 1; }
10910         fi
10911 fi
10912
10913 if test $ol_with_threads = auto -o $ol_with_threads = yes \
10914         -o $ol_with_threads = posix ; then
10915
10916         for ac_hdr in pthread.h
10917 do
10918 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10919 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10920 echo "configure:10921: checking for $ac_hdr" >&5
10921 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10922   echo $ac_n "(cached) $ac_c" 1>&6
10923 else
10924   cat > conftest.$ac_ext <<EOF
10925 #line 10926 "configure"
10926 #include "confdefs.h"
10927 #include <$ac_hdr>
10928 EOF
10929 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10930 { (eval echo configure:10931: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10931 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10932 if test -z "$ac_err"; then
10933   rm -rf conftest*
10934   eval "ac_cv_header_$ac_safe=yes"
10935 else
10936   echo "$ac_err" >&5
10937   echo "configure: failed program was:" >&5
10938   cat conftest.$ac_ext >&5
10939   rm -rf conftest*
10940   eval "ac_cv_header_$ac_safe=no"
10941 fi
10942 rm -f conftest*
10943 fi
10944 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10945   echo "$ac_t""yes" 1>&6
10946     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10947   cat >> confdefs.h <<EOF
10948 #define $ac_tr_hdr 1
10949 EOF
10950  
10951 else
10952   echo "$ac_t""no" 1>&6
10953 fi
10954 done
10955
10956
10957         if test $ac_cv_header_pthread_h = yes ; then
10958                 echo $ac_n "checking POSIX thread version""... $ac_c" 1>&6
10959 echo "configure:10960: checking POSIX thread version" >&5
10960 if eval "test \"\${ol_cv_pthread_version+set}\" = set"; then
10961   echo $ac_n "(cached) $ac_c" 1>&6
10962 else
10963   
10964         cat > conftest.$ac_ext <<EOF
10965 #line 10966 "configure"
10966 #include "confdefs.h"
10967
10968 #               include <pthread.h>
10969         
10970 int main() {
10971
10972                 int i = PTHREAD_CREATE_JOINABLE;
10973         
10974 ; return 0; }
10975 EOF
10976 if { (eval echo configure:10977: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10977   rm -rf conftest*
10978   
10979         cat > conftest.$ac_ext <<EOF
10980 #line 10981 "configure"
10981 #include "confdefs.h"
10982 #include <pthread.h>
10983 EOF
10984 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10985   egrep "pthread_detach" >/dev/null 2>&1; then
10986   rm -rf conftest*
10987   ol_cv_pthread_version=10
10988 else
10989   rm -rf conftest*
10990   ol_cv_pthread_version=8
10991 fi
10992 rm -f conftest*
10993
10994 else
10995   echo "configure: failed program was:" >&5
10996   cat conftest.$ac_ext >&5
10997   rm -rf conftest*
10998   
10999         cat > conftest.$ac_ext <<EOF
11000 #line 11001 "configure"
11001 #include "confdefs.h"
11002
11003 #               include <pthread.h>
11004 #               ifdef PTHREAD_CREATE_UNDETACHED
11005                 draft7
11006 #               endif
11007         
11008 EOF
11009 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11010   egrep "draft7" >/dev/null 2>&1; then
11011   rm -rf conftest*
11012   ol_cv_pthread_version=7
11013 else
11014   rm -rf conftest*
11015   
11016         cat > conftest.$ac_ext <<EOF
11017 #line 11018 "configure"
11018 #include "confdefs.h"
11019 #include <pthread.h>
11020 EOF
11021 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11022   egrep "pthread_attr_init" >/dev/null 2>&1; then
11023   rm -rf conftest*
11024   ol_cv_pthread_version=6
11025 else
11026   rm -rf conftest*
11027   
11028         cat > conftest.$ac_ext <<EOF
11029 #line 11030 "configure"
11030 #include "confdefs.h"
11031
11032 #               include <pthread.h>
11033 #ifdef          PTHREAD_MUTEX_INITIALIZER
11034                 draft5
11035 #endif
11036         
11037 EOF
11038 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11039   egrep "draft5" >/dev/null 2>&1; then
11040   rm -rf conftest*
11041   ol_cv_pthread_version=5
11042 else
11043   rm -rf conftest*
11044   ol_cv_pthread_version=4
11045 fi
11046 rm -f conftest*
11047  
11048 fi
11049 rm -f conftest*
11050  
11051 fi
11052 rm -f conftest*
11053  
11054 fi
11055 rm -f conftest*
11056
11057 fi
11058
11059 echo "$ac_t""$ol_cv_pthread_version" 1>&6
11060
11061
11062                 if test $ol_cv_pthread_version != 0 ; then
11063                         cat >> confdefs.h <<EOF
11064 #define HAVE_PTHREADS $ol_cv_pthread_version
11065 EOF
11066
11067                 else
11068                         { echo "configure: error: unknown pthread version" 1>&2; exit 1; }
11069                 fi
11070
11071                 # consider threads found
11072                 ol_with_threads=found
11073
11074                 
11075         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
11076 echo "configure:11077: checking for LinuxThreads pthread.h" >&5
11077 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
11078   echo $ac_n "(cached) $ac_c" 1>&6
11079 else
11080   cat > conftest.$ac_ext <<EOF
11081 #line 11082 "configure"
11082 #include "confdefs.h"
11083 #include <pthread.h>
11084 EOF
11085 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11086   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
11087   rm -rf conftest*
11088   ol_cv_header_linux_threads=yes
11089 else
11090   rm -rf conftest*
11091   ol_cv_header_linux_threads=no
11092 fi
11093 rm -f conftest*
11094
11095                 
11096 fi
11097
11098 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
11099         if test $ol_cv_header_linux_threads = yes; then
11100                 cat >> confdefs.h <<\EOF
11101 #define HAVE_LINUX_THREADS 1
11102 EOF
11103
11104         fi
11105
11106                 
11107         echo $ac_n "checking for GNU Pth pthread.h""... $ac_c" 1>&6
11108 echo "configure:11109: checking for GNU Pth pthread.h" >&5
11109 if eval "test \"\${ol_cv_header_gnu_pth_pthread_h+set}\" = set"; then
11110   echo $ac_n "(cached) $ac_c" 1>&6
11111 else
11112   cat > conftest.$ac_ext <<EOF
11113 #line 11114 "configure"
11114 #include "confdefs.h"
11115 #include <pthread.h>
11116 #ifdef _POSIX_THREAD_IS_GNU_PTH
11117         __gnu_pth__;
11118 #endif
11119
11120 EOF
11121 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11122   egrep "__gnu_pth__" >/dev/null 2>&1; then
11123   rm -rf conftest*
11124   ol_cv_header_gnu_pth_pthread_h=yes
11125 else
11126   rm -rf conftest*
11127   ol_cv_header_gnu_pth_pthread_h=no
11128 fi
11129 rm -f conftest*
11130
11131                 
11132 fi
11133
11134 echo "$ac_t""$ol_cv_header_gnu_pth_pthread_h" 1>&6
11135
11136
11137                 if test $ol_cv_header_gnu_pth_pthread_h = no ; then
11138                         for ac_hdr in sched.h
11139 do
11140 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11141 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11142 echo "configure:11143: checking for $ac_hdr" >&5
11143 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11144   echo $ac_n "(cached) $ac_c" 1>&6
11145 else
11146   cat > conftest.$ac_ext <<EOF
11147 #line 11148 "configure"
11148 #include "confdefs.h"
11149 #include <$ac_hdr>
11150 EOF
11151 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11152 { (eval echo configure:11153: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11153 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11154 if test -z "$ac_err"; then
11155   rm -rf conftest*
11156   eval "ac_cv_header_$ac_safe=yes"
11157 else
11158   echo "$ac_err" >&5
11159   echo "configure: failed program was:" >&5
11160   cat conftest.$ac_ext >&5
11161   rm -rf conftest*
11162   eval "ac_cv_header_$ac_safe=no"
11163 fi
11164 rm -f conftest*
11165 fi
11166 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11167   echo "$ac_t""yes" 1>&6
11168     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11169   cat >> confdefs.h <<EOF
11170 #define $ac_tr_hdr 1
11171 EOF
11172  
11173 else
11174   echo "$ac_t""no" 1>&6
11175 fi
11176 done
11177
11178                 fi
11179
11180                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
11181                                 echo $ac_n "checking for pthread_create in default libraries""... $ac_c" 1>&6
11182 echo "configure:11183: checking for pthread_create in default libraries" >&5
11183 if eval "test \"\${ol_cv_pthread_create+set}\" = set"; then
11184   echo $ac_n "(cached) $ac_c" 1>&6
11185 else
11186   
11187                 if test "$cross_compiling" = yes; then
11188   cat > conftest.$ac_ext <<EOF
11189 #line 11190 "configure"
11190 #include "confdefs.h"
11191 /* pthread test headers */
11192 #include <pthread.h>
11193 #if HAVE_PTHREADS < 7
11194 #include <errno.h>
11195 #endif
11196 #ifndef NULL
11197 #define NULL (void*)0
11198 #endif
11199
11200 static void *task(p)
11201         void *p;
11202 {
11203         return (void *) (p == NULL);
11204 }
11205
11206 int main() {
11207
11208         /* pthread test function */
11209 #ifndef PTHREAD_CREATE_DETACHED
11210 #define PTHREAD_CREATE_DETACHED 1
11211 #endif
11212         pthread_t t;
11213         int status;
11214         int detach = PTHREAD_CREATE_DETACHED;
11215
11216 #if HAVE_PTHREADS > 4
11217         /* Final pthreads */
11218         pthread_attr_t attr;
11219
11220         status = pthread_attr_init(&attr);
11221         if( status ) return status;
11222
11223 #if HAVE_PTHREADS < 7
11224         status = pthread_attr_setdetachstate(&attr, &detach);
11225         if( status < 0 ) status = errno;
11226 #else
11227         status = pthread_attr_setdetachstate(&attr, detach);
11228 #endif
11229         if( status ) return status;
11230         status = pthread_create( &t, &attr, task, NULL );
11231 #if HAVE_PTHREADS < 7
11232         if( status < 0 ) status = errno;
11233 #endif
11234         if( status ) return status;
11235 #else
11236         /* Draft 4 pthreads */
11237         status = pthread_create( &t, pthread_attr_default, task, NULL );
11238         if( status ) return errno;
11239
11240         /* give thread a chance to complete */
11241         /* it should remain joinable and hence detachable */
11242         sleep( 1 );
11243
11244         status = pthread_detach( &t );
11245         if( status ) return errno;
11246 #endif
11247
11248 #ifdef HAVE_LINUX_THREADS
11249         pthread_kill_other_threads_np();
11250 #endif
11251
11252         return 0;
11253
11254 ; return 0; }
11255 EOF
11256 if { (eval echo configure:11257: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11257   rm -rf conftest*
11258   ol_cv_pthread_create=yes
11259 else
11260   echo "configure: failed program was:" >&5
11261   cat conftest.$ac_ext >&5
11262   rm -rf conftest*
11263   ol_cv_pthread_create=no
11264 fi
11265 rm -f conftest*
11266 else
11267   cat > conftest.$ac_ext <<EOF
11268 #line 11269 "configure"
11269 #include "confdefs.h"
11270 /* pthread test headers */
11271 #include <pthread.h>
11272 #if HAVE_PTHREADS < 7
11273 #include <errno.h>
11274 #endif
11275 #ifndef NULL
11276 #define NULL (void*)0
11277 #endif
11278
11279 static void *task(p)
11280         void *p;
11281 {
11282         return (void *) (p == NULL);
11283 }
11284
11285
11286 int main(argc, argv)
11287         int argc;
11288         char **argv;
11289 {
11290
11291         /* pthread test function */
11292 #ifndef PTHREAD_CREATE_DETACHED
11293 #define PTHREAD_CREATE_DETACHED 1
11294 #endif
11295         pthread_t t;
11296         int status;
11297         int detach = PTHREAD_CREATE_DETACHED;
11298
11299 #if HAVE_PTHREADS > 4
11300         /* Final pthreads */
11301         pthread_attr_t attr;
11302
11303         status = pthread_attr_init(&attr);
11304         if( status ) return status;
11305
11306 #if HAVE_PTHREADS < 7
11307         status = pthread_attr_setdetachstate(&attr, &detach);
11308         if( status < 0 ) status = errno;
11309 #else
11310         status = pthread_attr_setdetachstate(&attr, detach);
11311 #endif
11312         if( status ) return status;
11313         status = pthread_create( &t, &attr, task, NULL );
11314 #if HAVE_PTHREADS < 7
11315         if( status < 0 ) status = errno;
11316 #endif
11317         if( status ) return status;
11318 #else
11319         /* Draft 4 pthreads */
11320         status = pthread_create( &t, pthread_attr_default, task, NULL );
11321         if( status ) return errno;
11322
11323         /* give thread a chance to complete */
11324         /* it should remain joinable and hence detachable */
11325         sleep( 1 );
11326
11327         status = pthread_detach( &t );
11328         if( status ) return errno;
11329 #endif
11330
11331 #ifdef HAVE_LINUX_THREADS
11332         pthread_kill_other_threads_np();
11333 #endif
11334
11335         return 0;
11336
11337 }
11338
11339 EOF
11340 if { (eval echo configure:11341: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11341 then
11342   ol_cv_pthread_create=yes
11343 else
11344   echo "configure: failed program was:" >&5
11345   cat conftest.$ac_ext >&5
11346   rm -fr conftest*
11347   ol_cv_pthread_create=no
11348 fi
11349 rm -fr conftest*
11350 fi
11351
11352 fi
11353
11354 echo "$ac_t""$ol_cv_pthread_create" 1>&6
11355
11356                 if test $ol_cv_pthread_create != no ; then
11357                         ol_link_threads=posix
11358                         ol_link_pthreads=""
11359                 fi
11360                 
11361                 # Pthread try link: -kthread (ol_cv_pthread_kthread)
11362 if test "$ol_link_threads" = no ; then
11363         # try -kthread
11364         echo $ac_n "checking for pthread link with -kthread""... $ac_c" 1>&6
11365 echo "configure:11366: checking for pthread link with -kthread" >&5
11366 if eval "test \"\${ol_cv_pthread_kthread+set}\" = set"; then
11367   echo $ac_n "(cached) $ac_c" 1>&6
11368 else
11369   
11370                 # save the flags
11371                 ol_LIBS="$LIBS"
11372                 LIBS="-kthread $LIBS"
11373
11374                 if test "$cross_compiling" = yes; then
11375   cat > conftest.$ac_ext <<EOF
11376 #line 11377 "configure"
11377 #include "confdefs.h"
11378 /* pthread test headers */
11379 #include <pthread.h>
11380 #if HAVE_PTHREADS < 7
11381 #include <errno.h>
11382 #endif
11383 #ifndef NULL
11384 #define NULL (void*)0
11385 #endif
11386
11387 static void *task(p)
11388         void *p;
11389 {
11390         return (void *) (p == NULL);
11391 }
11392
11393 int main() {
11394
11395         /* pthread test function */
11396 #ifndef PTHREAD_CREATE_DETACHED
11397 #define PTHREAD_CREATE_DETACHED 1
11398 #endif
11399         pthread_t t;
11400         int status;
11401         int detach = PTHREAD_CREATE_DETACHED;
11402
11403 #if HAVE_PTHREADS > 4
11404         /* Final pthreads */
11405         pthread_attr_t attr;
11406
11407         status = pthread_attr_init(&attr);
11408         if( status ) return status;
11409
11410 #if HAVE_PTHREADS < 7
11411         status = pthread_attr_setdetachstate(&attr, &detach);
11412         if( status < 0 ) status = errno;
11413 #else
11414         status = pthread_attr_setdetachstate(&attr, detach);
11415 #endif
11416         if( status ) return status;
11417         status = pthread_create( &t, &attr, task, NULL );
11418 #if HAVE_PTHREADS < 7
11419         if( status < 0 ) status = errno;
11420 #endif
11421         if( status ) return status;
11422 #else
11423         /* Draft 4 pthreads */
11424         status = pthread_create( &t, pthread_attr_default, task, NULL );
11425         if( status ) return errno;
11426
11427         /* give thread a chance to complete */
11428         /* it should remain joinable and hence detachable */
11429         sleep( 1 );
11430
11431         status = pthread_detach( &t );
11432         if( status ) return errno;
11433 #endif
11434
11435 #ifdef HAVE_LINUX_THREADS
11436         pthread_kill_other_threads_np();
11437 #endif
11438
11439         return 0;
11440
11441 ; return 0; }
11442 EOF
11443 if { (eval echo configure:11444: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11444   rm -rf conftest*
11445   ol_cv_pthread_kthread=yes
11446 else
11447   echo "configure: failed program was:" >&5
11448   cat conftest.$ac_ext >&5
11449   rm -rf conftest*
11450   ol_cv_pthread_kthread=no
11451 fi
11452 rm -f conftest*
11453 else
11454   cat > conftest.$ac_ext <<EOF
11455 #line 11456 "configure"
11456 #include "confdefs.h"
11457 /* pthread test headers */
11458 #include <pthread.h>
11459 #if HAVE_PTHREADS < 7
11460 #include <errno.h>
11461 #endif
11462 #ifndef NULL
11463 #define NULL (void*)0
11464 #endif
11465
11466 static void *task(p)
11467         void *p;
11468 {
11469         return (void *) (p == NULL);
11470 }
11471
11472
11473 int main(argc, argv)
11474         int argc;
11475         char **argv;
11476 {
11477
11478         /* pthread test function */
11479 #ifndef PTHREAD_CREATE_DETACHED
11480 #define PTHREAD_CREATE_DETACHED 1
11481 #endif
11482         pthread_t t;
11483         int status;
11484         int detach = PTHREAD_CREATE_DETACHED;
11485
11486 #if HAVE_PTHREADS > 4
11487         /* Final pthreads */
11488         pthread_attr_t attr;
11489
11490         status = pthread_attr_init(&attr);
11491         if( status ) return status;
11492
11493 #if HAVE_PTHREADS < 7
11494         status = pthread_attr_setdetachstate(&attr, &detach);
11495         if( status < 0 ) status = errno;
11496 #else
11497         status = pthread_attr_setdetachstate(&attr, detach);
11498 #endif
11499         if( status ) return status;
11500         status = pthread_create( &t, &attr, task, NULL );
11501 #if HAVE_PTHREADS < 7
11502         if( status < 0 ) status = errno;
11503 #endif
11504         if( status ) return status;
11505 #else
11506         /* Draft 4 pthreads */
11507         status = pthread_create( &t, pthread_attr_default, task, NULL );
11508         if( status ) return errno;
11509
11510         /* give thread a chance to complete */
11511         /* it should remain joinable and hence detachable */
11512         sleep( 1 );
11513
11514         status = pthread_detach( &t );
11515         if( status ) return errno;
11516 #endif
11517
11518 #ifdef HAVE_LINUX_THREADS
11519         pthread_kill_other_threads_np();
11520 #endif
11521
11522         return 0;
11523
11524 }
11525
11526 EOF
11527 if { (eval echo configure:11528: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11528 then
11529   ol_cv_pthread_kthread=yes
11530 else
11531   echo "configure: failed program was:" >&5
11532   cat conftest.$ac_ext >&5
11533   rm -fr conftest*
11534   ol_cv_pthread_kthread=no
11535 fi
11536 rm -fr conftest*
11537 fi
11538
11539
11540                 # restore the LIBS
11541                 LIBS="$ol_LIBS"
11542         
11543 fi
11544
11545 echo "$ac_t""$ol_cv_pthread_kthread" 1>&6
11546
11547         if test $ol_cv_pthread_kthread = yes ; then
11548                 ol_link_pthreads="-kthread"
11549                 ol_link_threads=posix
11550         fi
11551 fi
11552
11553                 # Pthread try link: -pthread (ol_cv_pthread_pthread)
11554 if test "$ol_link_threads" = no ; then
11555         # try -pthread
11556         echo $ac_n "checking for pthread link with -pthread""... $ac_c" 1>&6
11557 echo "configure:11558: checking for pthread link with -pthread" >&5
11558 if eval "test \"\${ol_cv_pthread_pthread+set}\" = set"; then
11559   echo $ac_n "(cached) $ac_c" 1>&6
11560 else
11561   
11562                 # save the flags
11563                 ol_LIBS="$LIBS"
11564                 LIBS="-pthread $LIBS"
11565
11566                 if test "$cross_compiling" = yes; then
11567   cat > conftest.$ac_ext <<EOF
11568 #line 11569 "configure"
11569 #include "confdefs.h"
11570 /* pthread test headers */
11571 #include <pthread.h>
11572 #if HAVE_PTHREADS < 7
11573 #include <errno.h>
11574 #endif
11575 #ifndef NULL
11576 #define NULL (void*)0
11577 #endif
11578
11579 static void *task(p)
11580         void *p;
11581 {
11582         return (void *) (p == NULL);
11583 }
11584
11585 int main() {
11586
11587         /* pthread test function */
11588 #ifndef PTHREAD_CREATE_DETACHED
11589 #define PTHREAD_CREATE_DETACHED 1
11590 #endif
11591         pthread_t t;
11592         int status;
11593         int detach = PTHREAD_CREATE_DETACHED;
11594
11595 #if HAVE_PTHREADS > 4
11596         /* Final pthreads */
11597         pthread_attr_t attr;
11598
11599         status = pthread_attr_init(&attr);
11600         if( status ) return status;
11601
11602 #if HAVE_PTHREADS < 7
11603         status = pthread_attr_setdetachstate(&attr, &detach);
11604         if( status < 0 ) status = errno;
11605 #else
11606         status = pthread_attr_setdetachstate(&attr, detach);
11607 #endif
11608         if( status ) return status;
11609         status = pthread_create( &t, &attr, task, NULL );
11610 #if HAVE_PTHREADS < 7
11611         if( status < 0 ) status = errno;
11612 #endif
11613         if( status ) return status;
11614 #else
11615         /* Draft 4 pthreads */
11616         status = pthread_create( &t, pthread_attr_default, task, NULL );
11617         if( status ) return errno;
11618
11619         /* give thread a chance to complete */
11620         /* it should remain joinable and hence detachable */
11621         sleep( 1 );
11622
11623         status = pthread_detach( &t );
11624         if( status ) return errno;
11625 #endif
11626
11627 #ifdef HAVE_LINUX_THREADS
11628         pthread_kill_other_threads_np();
11629 #endif
11630
11631         return 0;
11632
11633 ; return 0; }
11634 EOF
11635 if { (eval echo configure:11636: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11636   rm -rf conftest*
11637   ol_cv_pthread_pthread=yes
11638 else
11639   echo "configure: failed program was:" >&5
11640   cat conftest.$ac_ext >&5
11641   rm -rf conftest*
11642   ol_cv_pthread_pthread=no
11643 fi
11644 rm -f conftest*
11645 else
11646   cat > conftest.$ac_ext <<EOF
11647 #line 11648 "configure"
11648 #include "confdefs.h"
11649 /* pthread test headers */
11650 #include <pthread.h>
11651 #if HAVE_PTHREADS < 7
11652 #include <errno.h>
11653 #endif
11654 #ifndef NULL
11655 #define NULL (void*)0
11656 #endif
11657
11658 static void *task(p)
11659         void *p;
11660 {
11661         return (void *) (p == NULL);
11662 }
11663
11664
11665 int main(argc, argv)
11666         int argc;
11667         char **argv;
11668 {
11669
11670         /* pthread test function */
11671 #ifndef PTHREAD_CREATE_DETACHED
11672 #define PTHREAD_CREATE_DETACHED 1
11673 #endif
11674         pthread_t t;
11675         int status;
11676         int detach = PTHREAD_CREATE_DETACHED;
11677
11678 #if HAVE_PTHREADS > 4
11679         /* Final pthreads */
11680         pthread_attr_t attr;
11681
11682         status = pthread_attr_init(&attr);
11683         if( status ) return status;
11684
11685 #if HAVE_PTHREADS < 7
11686         status = pthread_attr_setdetachstate(&attr, &detach);
11687         if( status < 0 ) status = errno;
11688 #else
11689         status = pthread_attr_setdetachstate(&attr, detach);
11690 #endif
11691         if( status ) return status;
11692         status = pthread_create( &t, &attr, task, NULL );
11693 #if HAVE_PTHREADS < 7
11694         if( status < 0 ) status = errno;
11695 #endif
11696         if( status ) return status;
11697 #else
11698         /* Draft 4 pthreads */
11699         status = pthread_create( &t, pthread_attr_default, task, NULL );
11700         if( status ) return errno;
11701
11702         /* give thread a chance to complete */
11703         /* it should remain joinable and hence detachable */
11704         sleep( 1 );
11705
11706         status = pthread_detach( &t );
11707         if( status ) return errno;
11708 #endif
11709
11710 #ifdef HAVE_LINUX_THREADS
11711         pthread_kill_other_threads_np();
11712 #endif
11713
11714         return 0;
11715
11716 }
11717
11718 EOF
11719 if { (eval echo configure:11720: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11720 then
11721   ol_cv_pthread_pthread=yes
11722 else
11723   echo "configure: failed program was:" >&5
11724   cat conftest.$ac_ext >&5
11725   rm -fr conftest*
11726   ol_cv_pthread_pthread=no
11727 fi
11728 rm -fr conftest*
11729 fi
11730
11731
11732                 # restore the LIBS
11733                 LIBS="$ol_LIBS"
11734         
11735 fi
11736
11737 echo "$ac_t""$ol_cv_pthread_pthread" 1>&6
11738
11739         if test $ol_cv_pthread_pthread = yes ; then
11740                 ol_link_pthreads="-pthread"
11741                 ol_link_threads=posix
11742         fi
11743 fi
11744
11745                 # Pthread try link: -pthreads (ol_cv_pthread_pthreads)
11746 if test "$ol_link_threads" = no ; then
11747         # try -pthreads
11748         echo $ac_n "checking for pthread link with -pthreads""... $ac_c" 1>&6
11749 echo "configure:11750: checking for pthread link with -pthreads" >&5
11750 if eval "test \"\${ol_cv_pthread_pthreads+set}\" = set"; then
11751   echo $ac_n "(cached) $ac_c" 1>&6
11752 else
11753   
11754                 # save the flags
11755                 ol_LIBS="$LIBS"
11756                 LIBS="-pthreads $LIBS"
11757
11758                 if test "$cross_compiling" = yes; then
11759   cat > conftest.$ac_ext <<EOF
11760 #line 11761 "configure"
11761 #include "confdefs.h"
11762 /* pthread test headers */
11763 #include <pthread.h>
11764 #if HAVE_PTHREADS < 7
11765 #include <errno.h>
11766 #endif
11767 #ifndef NULL
11768 #define NULL (void*)0
11769 #endif
11770
11771 static void *task(p)
11772         void *p;
11773 {
11774         return (void *) (p == NULL);
11775 }
11776
11777 int main() {
11778
11779         /* pthread test function */
11780 #ifndef PTHREAD_CREATE_DETACHED
11781 #define PTHREAD_CREATE_DETACHED 1
11782 #endif
11783         pthread_t t;
11784         int status;
11785         int detach = PTHREAD_CREATE_DETACHED;
11786
11787 #if HAVE_PTHREADS > 4
11788         /* Final pthreads */
11789         pthread_attr_t attr;
11790
11791         status = pthread_attr_init(&attr);
11792         if( status ) return status;
11793
11794 #if HAVE_PTHREADS < 7
11795         status = pthread_attr_setdetachstate(&attr, &detach);
11796         if( status < 0 ) status = errno;
11797 #else
11798         status = pthread_attr_setdetachstate(&attr, detach);
11799 #endif
11800         if( status ) return status;
11801         status = pthread_create( &t, &attr, task, NULL );
11802 #if HAVE_PTHREADS < 7
11803         if( status < 0 ) status = errno;
11804 #endif
11805         if( status ) return status;
11806 #else
11807         /* Draft 4 pthreads */
11808         status = pthread_create( &t, pthread_attr_default, task, NULL );
11809         if( status ) return errno;
11810
11811         /* give thread a chance to complete */
11812         /* it should remain joinable and hence detachable */
11813         sleep( 1 );
11814
11815         status = pthread_detach( &t );
11816         if( status ) return errno;
11817 #endif
11818
11819 #ifdef HAVE_LINUX_THREADS
11820         pthread_kill_other_threads_np();
11821 #endif
11822
11823         return 0;
11824
11825 ; return 0; }
11826 EOF
11827 if { (eval echo configure:11828: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11828   rm -rf conftest*
11829   ol_cv_pthread_pthreads=yes
11830 else
11831   echo "configure: failed program was:" >&5
11832   cat conftest.$ac_ext >&5
11833   rm -rf conftest*
11834   ol_cv_pthread_pthreads=no
11835 fi
11836 rm -f conftest*
11837 else
11838   cat > conftest.$ac_ext <<EOF
11839 #line 11840 "configure"
11840 #include "confdefs.h"
11841 /* pthread test headers */
11842 #include <pthread.h>
11843 #if HAVE_PTHREADS < 7
11844 #include <errno.h>
11845 #endif
11846 #ifndef NULL
11847 #define NULL (void*)0
11848 #endif
11849
11850 static void *task(p)
11851         void *p;
11852 {
11853         return (void *) (p == NULL);
11854 }
11855
11856
11857 int main(argc, argv)
11858         int argc;
11859         char **argv;
11860 {
11861
11862         /* pthread test function */
11863 #ifndef PTHREAD_CREATE_DETACHED
11864 #define PTHREAD_CREATE_DETACHED 1
11865 #endif
11866         pthread_t t;
11867         int status;
11868         int detach = PTHREAD_CREATE_DETACHED;
11869
11870 #if HAVE_PTHREADS > 4
11871         /* Final pthreads */
11872         pthread_attr_t attr;
11873
11874         status = pthread_attr_init(&attr);
11875         if( status ) return status;
11876
11877 #if HAVE_PTHREADS < 7
11878         status = pthread_attr_setdetachstate(&attr, &detach);
11879         if( status < 0 ) status = errno;
11880 #else
11881         status = pthread_attr_setdetachstate(&attr, detach);
11882 #endif
11883         if( status ) return status;
11884         status = pthread_create( &t, &attr, task, NULL );
11885 #if HAVE_PTHREADS < 7
11886         if( status < 0 ) status = errno;
11887 #endif
11888         if( status ) return status;
11889 #else
11890         /* Draft 4 pthreads */
11891         status = pthread_create( &t, pthread_attr_default, task, NULL );
11892         if( status ) return errno;
11893
11894         /* give thread a chance to complete */
11895         /* it should remain joinable and hence detachable */
11896         sleep( 1 );
11897
11898         status = pthread_detach( &t );
11899         if( status ) return errno;
11900 #endif
11901
11902 #ifdef HAVE_LINUX_THREADS
11903         pthread_kill_other_threads_np();
11904 #endif
11905
11906         return 0;
11907
11908 }
11909
11910 EOF
11911 if { (eval echo configure:11912: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11912 then
11913   ol_cv_pthread_pthreads=yes
11914 else
11915   echo "configure: failed program was:" >&5
11916   cat conftest.$ac_ext >&5
11917   rm -fr conftest*
11918   ol_cv_pthread_pthreads=no
11919 fi
11920 rm -fr conftest*
11921 fi
11922
11923
11924                 # restore the LIBS
11925                 LIBS="$ol_LIBS"
11926         
11927 fi
11928
11929 echo "$ac_t""$ol_cv_pthread_pthreads" 1>&6
11930
11931         if test $ol_cv_pthread_pthreads = yes ; then
11932                 ol_link_pthreads="-pthreads"
11933                 ol_link_threads=posix
11934         fi
11935 fi
11936
11937                 # Pthread try link: -mthreads (ol_cv_pthread_mthreads)
11938 if test "$ol_link_threads" = no ; then
11939         # try -mthreads
11940         echo $ac_n "checking for pthread link with -mthreads""... $ac_c" 1>&6
11941 echo "configure:11942: checking for pthread link with -mthreads" >&5
11942 if eval "test \"\${ol_cv_pthread_mthreads+set}\" = set"; then
11943   echo $ac_n "(cached) $ac_c" 1>&6
11944 else
11945   
11946                 # save the flags
11947                 ol_LIBS="$LIBS"
11948                 LIBS="-mthreads $LIBS"
11949
11950                 if test "$cross_compiling" = yes; then
11951   cat > conftest.$ac_ext <<EOF
11952 #line 11953 "configure"
11953 #include "confdefs.h"
11954 /* pthread test headers */
11955 #include <pthread.h>
11956 #if HAVE_PTHREADS < 7
11957 #include <errno.h>
11958 #endif
11959 #ifndef NULL
11960 #define NULL (void*)0
11961 #endif
11962
11963 static void *task(p)
11964         void *p;
11965 {
11966         return (void *) (p == NULL);
11967 }
11968
11969 int main() {
11970
11971         /* pthread test function */
11972 #ifndef PTHREAD_CREATE_DETACHED
11973 #define PTHREAD_CREATE_DETACHED 1
11974 #endif
11975         pthread_t t;
11976         int status;
11977         int detach = PTHREAD_CREATE_DETACHED;
11978
11979 #if HAVE_PTHREADS > 4
11980         /* Final pthreads */
11981         pthread_attr_t attr;
11982
11983         status = pthread_attr_init(&attr);
11984         if( status ) return status;
11985
11986 #if HAVE_PTHREADS < 7
11987         status = pthread_attr_setdetachstate(&attr, &detach);
11988         if( status < 0 ) status = errno;
11989 #else
11990         status = pthread_attr_setdetachstate(&attr, detach);
11991 #endif
11992         if( status ) return status;
11993         status = pthread_create( &t, &attr, task, NULL );
11994 #if HAVE_PTHREADS < 7
11995         if( status < 0 ) status = errno;
11996 #endif
11997         if( status ) return status;
11998 #else
11999         /* Draft 4 pthreads */
12000         status = pthread_create( &t, pthread_attr_default, task, NULL );
12001         if( status ) return errno;
12002
12003         /* give thread a chance to complete */
12004         /* it should remain joinable and hence detachable */
12005         sleep( 1 );
12006
12007         status = pthread_detach( &t );
12008         if( status ) return errno;
12009 #endif
12010
12011 #ifdef HAVE_LINUX_THREADS
12012         pthread_kill_other_threads_np();
12013 #endif
12014
12015         return 0;
12016
12017 ; return 0; }
12018 EOF
12019 if { (eval echo configure:12020: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12020   rm -rf conftest*
12021   ol_cv_pthread_mthreads=yes
12022 else
12023   echo "configure: failed program was:" >&5
12024   cat conftest.$ac_ext >&5
12025   rm -rf conftest*
12026   ol_cv_pthread_mthreads=no
12027 fi
12028 rm -f conftest*
12029 else
12030   cat > conftest.$ac_ext <<EOF
12031 #line 12032 "configure"
12032 #include "confdefs.h"
12033 /* pthread test headers */
12034 #include <pthread.h>
12035 #if HAVE_PTHREADS < 7
12036 #include <errno.h>
12037 #endif
12038 #ifndef NULL
12039 #define NULL (void*)0
12040 #endif
12041
12042 static void *task(p)
12043         void *p;
12044 {
12045         return (void *) (p == NULL);
12046 }
12047
12048
12049 int main(argc, argv)
12050         int argc;
12051         char **argv;
12052 {
12053
12054         /* pthread test function */
12055 #ifndef PTHREAD_CREATE_DETACHED
12056 #define PTHREAD_CREATE_DETACHED 1
12057 #endif
12058         pthread_t t;
12059         int status;
12060         int detach = PTHREAD_CREATE_DETACHED;
12061
12062 #if HAVE_PTHREADS > 4
12063         /* Final pthreads */
12064         pthread_attr_t attr;
12065
12066         status = pthread_attr_init(&attr);
12067         if( status ) return status;
12068
12069 #if HAVE_PTHREADS < 7
12070         status = pthread_attr_setdetachstate(&attr, &detach);
12071         if( status < 0 ) status = errno;
12072 #else
12073         status = pthread_attr_setdetachstate(&attr, detach);
12074 #endif
12075         if( status ) return status;
12076         status = pthread_create( &t, &attr, task, NULL );
12077 #if HAVE_PTHREADS < 7
12078         if( status < 0 ) status = errno;
12079 #endif
12080         if( status ) return status;
12081 #else
12082         /* Draft 4 pthreads */
12083         status = pthread_create( &t, pthread_attr_default, task, NULL );
12084         if( status ) return errno;
12085
12086         /* give thread a chance to complete */
12087         /* it should remain joinable and hence detachable */
12088         sleep( 1 );
12089
12090         status = pthread_detach( &t );
12091         if( status ) return errno;
12092 #endif
12093
12094 #ifdef HAVE_LINUX_THREADS
12095         pthread_kill_other_threads_np();
12096 #endif
12097
12098         return 0;
12099
12100 }
12101
12102 EOF
12103 if { (eval echo configure:12104: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12104 then
12105   ol_cv_pthread_mthreads=yes
12106 else
12107   echo "configure: failed program was:" >&5
12108   cat conftest.$ac_ext >&5
12109   rm -fr conftest*
12110   ol_cv_pthread_mthreads=no
12111 fi
12112 rm -fr conftest*
12113 fi
12114
12115
12116                 # restore the LIBS
12117                 LIBS="$ol_LIBS"
12118         
12119 fi
12120
12121 echo "$ac_t""$ol_cv_pthread_mthreads" 1>&6
12122
12123         if test $ol_cv_pthread_mthreads = yes ; then
12124                 ol_link_pthreads="-mthreads"
12125                 ol_link_threads=posix
12126         fi
12127 fi
12128
12129                 # Pthread try link: -thread (ol_cv_pthread_thread)
12130 if test "$ol_link_threads" = no ; then
12131         # try -thread
12132         echo $ac_n "checking for pthread link with -thread""... $ac_c" 1>&6
12133 echo "configure:12134: checking for pthread link with -thread" >&5
12134 if eval "test \"\${ol_cv_pthread_thread+set}\" = set"; then
12135   echo $ac_n "(cached) $ac_c" 1>&6
12136 else
12137   
12138                 # save the flags
12139                 ol_LIBS="$LIBS"
12140                 LIBS="-thread $LIBS"
12141
12142                 if test "$cross_compiling" = yes; then
12143   cat > conftest.$ac_ext <<EOF
12144 #line 12145 "configure"
12145 #include "confdefs.h"
12146 /* pthread test headers */
12147 #include <pthread.h>
12148 #if HAVE_PTHREADS < 7
12149 #include <errno.h>
12150 #endif
12151 #ifndef NULL
12152 #define NULL (void*)0
12153 #endif
12154
12155 static void *task(p)
12156         void *p;
12157 {
12158         return (void *) (p == NULL);
12159 }
12160
12161 int main() {
12162
12163         /* pthread test function */
12164 #ifndef PTHREAD_CREATE_DETACHED
12165 #define PTHREAD_CREATE_DETACHED 1
12166 #endif
12167         pthread_t t;
12168         int status;
12169         int detach = PTHREAD_CREATE_DETACHED;
12170
12171 #if HAVE_PTHREADS > 4
12172         /* Final pthreads */
12173         pthread_attr_t attr;
12174
12175         status = pthread_attr_init(&attr);
12176         if( status ) return status;
12177
12178 #if HAVE_PTHREADS < 7
12179         status = pthread_attr_setdetachstate(&attr, &detach);
12180         if( status < 0 ) status = errno;
12181 #else
12182         status = pthread_attr_setdetachstate(&attr, detach);
12183 #endif
12184         if( status ) return status;
12185         status = pthread_create( &t, &attr, task, NULL );
12186 #if HAVE_PTHREADS < 7
12187         if( status < 0 ) status = errno;
12188 #endif
12189         if( status ) return status;
12190 #else
12191         /* Draft 4 pthreads */
12192         status = pthread_create( &t, pthread_attr_default, task, NULL );
12193         if( status ) return errno;
12194
12195         /* give thread a chance to complete */
12196         /* it should remain joinable and hence detachable */
12197         sleep( 1 );
12198
12199         status = pthread_detach( &t );
12200         if( status ) return errno;
12201 #endif
12202
12203 #ifdef HAVE_LINUX_THREADS
12204         pthread_kill_other_threads_np();
12205 #endif
12206
12207         return 0;
12208
12209 ; return 0; }
12210 EOF
12211 if { (eval echo configure:12212: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12212   rm -rf conftest*
12213   ol_cv_pthread_thread=yes
12214 else
12215   echo "configure: failed program was:" >&5
12216   cat conftest.$ac_ext >&5
12217   rm -rf conftest*
12218   ol_cv_pthread_thread=no
12219 fi
12220 rm -f conftest*
12221 else
12222   cat > conftest.$ac_ext <<EOF
12223 #line 12224 "configure"
12224 #include "confdefs.h"
12225 /* pthread test headers */
12226 #include <pthread.h>
12227 #if HAVE_PTHREADS < 7
12228 #include <errno.h>
12229 #endif
12230 #ifndef NULL
12231 #define NULL (void*)0
12232 #endif
12233
12234 static void *task(p)
12235         void *p;
12236 {
12237         return (void *) (p == NULL);
12238 }
12239
12240
12241 int main(argc, argv)
12242         int argc;
12243         char **argv;
12244 {
12245
12246         /* pthread test function */
12247 #ifndef PTHREAD_CREATE_DETACHED
12248 #define PTHREAD_CREATE_DETACHED 1
12249 #endif
12250         pthread_t t;
12251         int status;
12252         int detach = PTHREAD_CREATE_DETACHED;
12253
12254 #if HAVE_PTHREADS > 4
12255         /* Final pthreads */
12256         pthread_attr_t attr;
12257
12258         status = pthread_attr_init(&attr);
12259         if( status ) return status;
12260
12261 #if HAVE_PTHREADS < 7
12262         status = pthread_attr_setdetachstate(&attr, &detach);
12263         if( status < 0 ) status = errno;
12264 #else
12265         status = pthread_attr_setdetachstate(&attr, detach);
12266 #endif
12267         if( status ) return status;
12268         status = pthread_create( &t, &attr, task, NULL );
12269 #if HAVE_PTHREADS < 7
12270         if( status < 0 ) status = errno;
12271 #endif
12272         if( status ) return status;
12273 #else
12274         /* Draft 4 pthreads */
12275         status = pthread_create( &t, pthread_attr_default, task, NULL );
12276         if( status ) return errno;
12277
12278         /* give thread a chance to complete */
12279         /* it should remain joinable and hence detachable */
12280         sleep( 1 );
12281
12282         status = pthread_detach( &t );
12283         if( status ) return errno;
12284 #endif
12285
12286 #ifdef HAVE_LINUX_THREADS
12287         pthread_kill_other_threads_np();
12288 #endif
12289
12290         return 0;
12291
12292 }
12293
12294 EOF
12295 if { (eval echo configure:12296: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12296 then
12297   ol_cv_pthread_thread=yes
12298 else
12299   echo "configure: failed program was:" >&5
12300   cat conftest.$ac_ext >&5
12301   rm -fr conftest*
12302   ol_cv_pthread_thread=no
12303 fi
12304 rm -fr conftest*
12305 fi
12306
12307
12308                 # restore the LIBS
12309                 LIBS="$ol_LIBS"
12310         
12311 fi
12312
12313 echo "$ac_t""$ol_cv_pthread_thread" 1>&6
12314
12315         if test $ol_cv_pthread_thread = yes ; then
12316                 ol_link_pthreads="-thread"
12317                 ol_link_threads=posix
12318         fi
12319 fi
12320
12321
12322                 # Pthread try link: -lpthread -lmach -lexc -lc_r (ol_cv_pthread_lpthread_lmach_lexc_lc_r)
12323 if test "$ol_link_threads" = no ; then
12324         # try -lpthread -lmach -lexc -lc_r
12325         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc -lc_r""... $ac_c" 1>&6
12326 echo "configure:12327: checking for pthread link with -lpthread -lmach -lexc -lc_r" >&5
12327 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc_lc_r+set}\" = set"; then
12328   echo $ac_n "(cached) $ac_c" 1>&6
12329 else
12330   
12331                 # save the flags
12332                 ol_LIBS="$LIBS"
12333                 LIBS="-lpthread -lmach -lexc -lc_r $LIBS"
12334
12335                 if test "$cross_compiling" = yes; then
12336   cat > conftest.$ac_ext <<EOF
12337 #line 12338 "configure"
12338 #include "confdefs.h"
12339 /* pthread test headers */
12340 #include <pthread.h>
12341 #if HAVE_PTHREADS < 7
12342 #include <errno.h>
12343 #endif
12344 #ifndef NULL
12345 #define NULL (void*)0
12346 #endif
12347
12348 static void *task(p)
12349         void *p;
12350 {
12351         return (void *) (p == NULL);
12352 }
12353
12354 int main() {
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 ; return 0; }
12403 EOF
12404 if { (eval echo configure:12405: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12405   rm -rf conftest*
12406   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
12407 else
12408   echo "configure: failed program was:" >&5
12409   cat conftest.$ac_ext >&5
12410   rm -rf conftest*
12411   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
12412 fi
12413 rm -f conftest*
12414 else
12415   cat > conftest.$ac_ext <<EOF
12416 #line 12417 "configure"
12417 #include "confdefs.h"
12418 /* pthread test headers */
12419 #include <pthread.h>
12420 #if HAVE_PTHREADS < 7
12421 #include <errno.h>
12422 #endif
12423 #ifndef NULL
12424 #define NULL (void*)0
12425 #endif
12426
12427 static void *task(p)
12428         void *p;
12429 {
12430         return (void *) (p == NULL);
12431 }
12432
12433
12434 int main(argc, argv)
12435         int argc;
12436         char **argv;
12437 {
12438
12439         /* pthread test function */
12440 #ifndef PTHREAD_CREATE_DETACHED
12441 #define PTHREAD_CREATE_DETACHED 1
12442 #endif
12443         pthread_t t;
12444         int status;
12445         int detach = PTHREAD_CREATE_DETACHED;
12446
12447 #if HAVE_PTHREADS > 4
12448         /* Final pthreads */
12449         pthread_attr_t attr;
12450
12451         status = pthread_attr_init(&attr);
12452         if( status ) return status;
12453
12454 #if HAVE_PTHREADS < 7
12455         status = pthread_attr_setdetachstate(&attr, &detach);
12456         if( status < 0 ) status = errno;
12457 #else
12458         status = pthread_attr_setdetachstate(&attr, detach);
12459 #endif
12460         if( status ) return status;
12461         status = pthread_create( &t, &attr, task, NULL );
12462 #if HAVE_PTHREADS < 7
12463         if( status < 0 ) status = errno;
12464 #endif
12465         if( status ) return status;
12466 #else
12467         /* Draft 4 pthreads */
12468         status = pthread_create( &t, pthread_attr_default, task, NULL );
12469         if( status ) return errno;
12470
12471         /* give thread a chance to complete */
12472         /* it should remain joinable and hence detachable */
12473         sleep( 1 );
12474
12475         status = pthread_detach( &t );
12476         if( status ) return errno;
12477 #endif
12478
12479 #ifdef HAVE_LINUX_THREADS
12480         pthread_kill_other_threads_np();
12481 #endif
12482
12483         return 0;
12484
12485 }
12486
12487 EOF
12488 if { (eval echo configure:12489: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12489 then
12490   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
12491 else
12492   echo "configure: failed program was:" >&5
12493   cat conftest.$ac_ext >&5
12494   rm -fr conftest*
12495   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
12496 fi
12497 rm -fr conftest*
12498 fi
12499
12500
12501                 # restore the LIBS
12502                 LIBS="$ol_LIBS"
12503         
12504 fi
12505
12506 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc_lc_r" 1>&6
12507
12508         if test $ol_cv_pthread_lpthread_lmach_lexc_lc_r = yes ; then
12509                 ol_link_pthreads="-lpthread -lmach -lexc -lc_r"
12510                 ol_link_threads=posix
12511         fi
12512 fi
12513
12514                 # Pthread try link: -lpthread -lmach -lexc (ol_cv_pthread_lpthread_lmach_lexc)
12515 if test "$ol_link_threads" = no ; then
12516         # try -lpthread -lmach -lexc
12517         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc""... $ac_c" 1>&6
12518 echo "configure:12519: checking for pthread link with -lpthread -lmach -lexc" >&5
12519 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc+set}\" = set"; then
12520   echo $ac_n "(cached) $ac_c" 1>&6
12521 else
12522   
12523                 # save the flags
12524                 ol_LIBS="$LIBS"
12525                 LIBS="-lpthread -lmach -lexc $LIBS"
12526
12527                 if test "$cross_compiling" = yes; then
12528   cat > conftest.$ac_ext <<EOF
12529 #line 12530 "configure"
12530 #include "confdefs.h"
12531 /* pthread test headers */
12532 #include <pthread.h>
12533 #if HAVE_PTHREADS < 7
12534 #include <errno.h>
12535 #endif
12536 #ifndef NULL
12537 #define NULL (void*)0
12538 #endif
12539
12540 static void *task(p)
12541         void *p;
12542 {
12543         return (void *) (p == NULL);
12544 }
12545
12546 int main() {
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 ; return 0; }
12595 EOF
12596 if { (eval echo configure:12597: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12597   rm -rf conftest*
12598   ol_cv_pthread_lpthread_lmach_lexc=yes
12599 else
12600   echo "configure: failed program was:" >&5
12601   cat conftest.$ac_ext >&5
12602   rm -rf conftest*
12603   ol_cv_pthread_lpthread_lmach_lexc=no
12604 fi
12605 rm -f conftest*
12606 else
12607   cat > conftest.$ac_ext <<EOF
12608 #line 12609 "configure"
12609 #include "confdefs.h"
12610 /* pthread test headers */
12611 #include <pthread.h>
12612 #if HAVE_PTHREADS < 7
12613 #include <errno.h>
12614 #endif
12615 #ifndef NULL
12616 #define NULL (void*)0
12617 #endif
12618
12619 static void *task(p)
12620         void *p;
12621 {
12622         return (void *) (p == NULL);
12623 }
12624
12625
12626 int main(argc, argv)
12627         int argc;
12628         char **argv;
12629 {
12630
12631         /* pthread test function */
12632 #ifndef PTHREAD_CREATE_DETACHED
12633 #define PTHREAD_CREATE_DETACHED 1
12634 #endif
12635         pthread_t t;
12636         int status;
12637         int detach = PTHREAD_CREATE_DETACHED;
12638
12639 #if HAVE_PTHREADS > 4
12640         /* Final pthreads */
12641         pthread_attr_t attr;
12642
12643         status = pthread_attr_init(&attr);
12644         if( status ) return status;
12645
12646 #if HAVE_PTHREADS < 7
12647         status = pthread_attr_setdetachstate(&attr, &detach);
12648         if( status < 0 ) status = errno;
12649 #else
12650         status = pthread_attr_setdetachstate(&attr, detach);
12651 #endif
12652         if( status ) return status;
12653         status = pthread_create( &t, &attr, task, NULL );
12654 #if HAVE_PTHREADS < 7
12655         if( status < 0 ) status = errno;
12656 #endif
12657         if( status ) return status;
12658 #else
12659         /* Draft 4 pthreads */
12660         status = pthread_create( &t, pthread_attr_default, task, NULL );
12661         if( status ) return errno;
12662
12663         /* give thread a chance to complete */
12664         /* it should remain joinable and hence detachable */
12665         sleep( 1 );
12666
12667         status = pthread_detach( &t );
12668         if( status ) return errno;
12669 #endif
12670
12671 #ifdef HAVE_LINUX_THREADS
12672         pthread_kill_other_threads_np();
12673 #endif
12674
12675         return 0;
12676
12677 }
12678
12679 EOF
12680 if { (eval echo configure:12681: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12681 then
12682   ol_cv_pthread_lpthread_lmach_lexc=yes
12683 else
12684   echo "configure: failed program was:" >&5
12685   cat conftest.$ac_ext >&5
12686   rm -fr conftest*
12687   ol_cv_pthread_lpthread_lmach_lexc=no
12688 fi
12689 rm -fr conftest*
12690 fi
12691
12692
12693                 # restore the LIBS
12694                 LIBS="$ol_LIBS"
12695         
12696 fi
12697
12698 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc" 1>&6
12699
12700         if test $ol_cv_pthread_lpthread_lmach_lexc = yes ; then
12701                 ol_link_pthreads="-lpthread -lmach -lexc"
12702                 ol_link_threads=posix
12703         fi
12704 fi
12705
12706
12707                 # Pthread try link: -lpthread -Wl,-woff,85 (ol_cv_pthread_lib_lpthread_woff)
12708 if test "$ol_link_threads" = no ; then
12709         # try -lpthread -Wl,-woff,85
12710         echo $ac_n "checking for pthread link with -lpthread -Wl,-woff,85""... $ac_c" 1>&6
12711 echo "configure:12712: checking for pthread link with -lpthread -Wl,-woff,85" >&5
12712 if eval "test \"\${ol_cv_pthread_lib_lpthread_woff+set}\" = set"; then
12713   echo $ac_n "(cached) $ac_c" 1>&6
12714 else
12715   
12716                 # save the flags
12717                 ol_LIBS="$LIBS"
12718                 LIBS="-lpthread -Wl,-woff,85 $LIBS"
12719
12720                 if test "$cross_compiling" = yes; then
12721   cat > conftest.$ac_ext <<EOF
12722 #line 12723 "configure"
12723 #include "confdefs.h"
12724 /* pthread test headers */
12725 #include <pthread.h>
12726 #if HAVE_PTHREADS < 7
12727 #include <errno.h>
12728 #endif
12729 #ifndef NULL
12730 #define NULL (void*)0
12731 #endif
12732
12733 static void *task(p)
12734         void *p;
12735 {
12736         return (void *) (p == NULL);
12737 }
12738
12739 int main() {
12740
12741         /* pthread test function */
12742 #ifndef PTHREAD_CREATE_DETACHED
12743 #define PTHREAD_CREATE_DETACHED 1
12744 #endif
12745         pthread_t t;
12746         int status;
12747         int detach = PTHREAD_CREATE_DETACHED;
12748
12749 #if HAVE_PTHREADS > 4
12750         /* Final pthreads */
12751         pthread_attr_t attr;
12752
12753         status = pthread_attr_init(&attr);
12754         if( status ) return status;
12755
12756 #if HAVE_PTHREADS < 7
12757         status = pthread_attr_setdetachstate(&attr, &detach);
12758         if( status < 0 ) status = errno;
12759 #else
12760         status = pthread_attr_setdetachstate(&attr, detach);
12761 #endif
12762         if( status ) return status;
12763         status = pthread_create( &t, &attr, task, NULL );
12764 #if HAVE_PTHREADS < 7
12765         if( status < 0 ) status = errno;
12766 #endif
12767         if( status ) return status;
12768 #else
12769         /* Draft 4 pthreads */
12770         status = pthread_create( &t, pthread_attr_default, task, NULL );
12771         if( status ) return errno;
12772
12773         /* give thread a chance to complete */
12774         /* it should remain joinable and hence detachable */
12775         sleep( 1 );
12776
12777         status = pthread_detach( &t );
12778         if( status ) return errno;
12779 #endif
12780
12781 #ifdef HAVE_LINUX_THREADS
12782         pthread_kill_other_threads_np();
12783 #endif
12784
12785         return 0;
12786
12787 ; return 0; }
12788 EOF
12789 if { (eval echo configure:12790: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12790   rm -rf conftest*
12791   ol_cv_pthread_lib_lpthread_woff=yes
12792 else
12793   echo "configure: failed program was:" >&5
12794   cat conftest.$ac_ext >&5
12795   rm -rf conftest*
12796   ol_cv_pthread_lib_lpthread_woff=no
12797 fi
12798 rm -f conftest*
12799 else
12800   cat > conftest.$ac_ext <<EOF
12801 #line 12802 "configure"
12802 #include "confdefs.h"
12803 /* pthread test headers */
12804 #include <pthread.h>
12805 #if HAVE_PTHREADS < 7
12806 #include <errno.h>
12807 #endif
12808 #ifndef NULL
12809 #define NULL (void*)0
12810 #endif
12811
12812 static void *task(p)
12813         void *p;
12814 {
12815         return (void *) (p == NULL);
12816 }
12817
12818
12819 int main(argc, argv)
12820         int argc;
12821         char **argv;
12822 {
12823
12824         /* pthread test function */
12825 #ifndef PTHREAD_CREATE_DETACHED
12826 #define PTHREAD_CREATE_DETACHED 1
12827 #endif
12828         pthread_t t;
12829         int status;
12830         int detach = PTHREAD_CREATE_DETACHED;
12831
12832 #if HAVE_PTHREADS > 4
12833         /* Final pthreads */
12834         pthread_attr_t attr;
12835
12836         status = pthread_attr_init(&attr);
12837         if( status ) return status;
12838
12839 #if HAVE_PTHREADS < 7
12840         status = pthread_attr_setdetachstate(&attr, &detach);
12841         if( status < 0 ) status = errno;
12842 #else
12843         status = pthread_attr_setdetachstate(&attr, detach);
12844 #endif
12845         if( status ) return status;
12846         status = pthread_create( &t, &attr, task, NULL );
12847 #if HAVE_PTHREADS < 7
12848         if( status < 0 ) status = errno;
12849 #endif
12850         if( status ) return status;
12851 #else
12852         /* Draft 4 pthreads */
12853         status = pthread_create( &t, pthread_attr_default, task, NULL );
12854         if( status ) return errno;
12855
12856         /* give thread a chance to complete */
12857         /* it should remain joinable and hence detachable */
12858         sleep( 1 );
12859
12860         status = pthread_detach( &t );
12861         if( status ) return errno;
12862 #endif
12863
12864 #ifdef HAVE_LINUX_THREADS
12865         pthread_kill_other_threads_np();
12866 #endif
12867
12868         return 0;
12869
12870 }
12871
12872 EOF
12873 if { (eval echo configure:12874: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12874 then
12875   ol_cv_pthread_lib_lpthread_woff=yes
12876 else
12877   echo "configure: failed program was:" >&5
12878   cat conftest.$ac_ext >&5
12879   rm -fr conftest*
12880   ol_cv_pthread_lib_lpthread_woff=no
12881 fi
12882 rm -fr conftest*
12883 fi
12884
12885
12886                 # restore the LIBS
12887                 LIBS="$ol_LIBS"
12888         
12889 fi
12890
12891 echo "$ac_t""$ol_cv_pthread_lib_lpthread_woff" 1>&6
12892
12893         if test $ol_cv_pthread_lib_lpthread_woff = yes ; then
12894                 ol_link_pthreads="-lpthread -Wl,-woff,85"
12895                 ol_link_threads=posix
12896         fi
12897 fi
12898
12899
12900                 # Pthread try link: -lpthread (ol_cv_pthread_lpthread)
12901 if test "$ol_link_threads" = no ; then
12902         # try -lpthread
12903         echo $ac_n "checking for pthread link with -lpthread""... $ac_c" 1>&6
12904 echo "configure:12905: checking for pthread link with -lpthread" >&5
12905 if eval "test \"\${ol_cv_pthread_lpthread+set}\" = set"; then
12906   echo $ac_n "(cached) $ac_c" 1>&6
12907 else
12908   
12909                 # save the flags
12910                 ol_LIBS="$LIBS"
12911                 LIBS="-lpthread $LIBS"
12912
12913                 if test "$cross_compiling" = yes; then
12914   cat > conftest.$ac_ext <<EOF
12915 #line 12916 "configure"
12916 #include "confdefs.h"
12917 /* pthread test headers */
12918 #include <pthread.h>
12919 #if HAVE_PTHREADS < 7
12920 #include <errno.h>
12921 #endif
12922 #ifndef NULL
12923 #define NULL (void*)0
12924 #endif
12925
12926 static void *task(p)
12927         void *p;
12928 {
12929         return (void *) (p == NULL);
12930 }
12931
12932 int main() {
12933
12934         /* pthread test function */
12935 #ifndef PTHREAD_CREATE_DETACHED
12936 #define PTHREAD_CREATE_DETACHED 1
12937 #endif
12938         pthread_t t;
12939         int status;
12940         int detach = PTHREAD_CREATE_DETACHED;
12941
12942 #if HAVE_PTHREADS > 4
12943         /* Final pthreads */
12944         pthread_attr_t attr;
12945
12946         status = pthread_attr_init(&attr);
12947         if( status ) return status;
12948
12949 #if HAVE_PTHREADS < 7
12950         status = pthread_attr_setdetachstate(&attr, &detach);
12951         if( status < 0 ) status = errno;
12952 #else
12953         status = pthread_attr_setdetachstate(&attr, detach);
12954 #endif
12955         if( status ) return status;
12956         status = pthread_create( &t, &attr, task, NULL );
12957 #if HAVE_PTHREADS < 7
12958         if( status < 0 ) status = errno;
12959 #endif
12960         if( status ) return status;
12961 #else
12962         /* Draft 4 pthreads */
12963         status = pthread_create( &t, pthread_attr_default, task, NULL );
12964         if( status ) return errno;
12965
12966         /* give thread a chance to complete */
12967         /* it should remain joinable and hence detachable */
12968         sleep( 1 );
12969
12970         status = pthread_detach( &t );
12971         if( status ) return errno;
12972 #endif
12973
12974 #ifdef HAVE_LINUX_THREADS
12975         pthread_kill_other_threads_np();
12976 #endif
12977
12978         return 0;
12979
12980 ; return 0; }
12981 EOF
12982 if { (eval echo configure:12983: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12983   rm -rf conftest*
12984   ol_cv_pthread_lpthread=yes
12985 else
12986   echo "configure: failed program was:" >&5
12987   cat conftest.$ac_ext >&5
12988   rm -rf conftest*
12989   ol_cv_pthread_lpthread=no
12990 fi
12991 rm -f conftest*
12992 else
12993   cat > conftest.$ac_ext <<EOF
12994 #line 12995 "configure"
12995 #include "confdefs.h"
12996 /* pthread test headers */
12997 #include <pthread.h>
12998 #if HAVE_PTHREADS < 7
12999 #include <errno.h>
13000 #endif
13001 #ifndef NULL
13002 #define NULL (void*)0
13003 #endif
13004
13005 static void *task(p)
13006         void *p;
13007 {
13008         return (void *) (p == NULL);
13009 }
13010
13011
13012 int main(argc, argv)
13013         int argc;
13014         char **argv;
13015 {
13016
13017         /* pthread test function */
13018 #ifndef PTHREAD_CREATE_DETACHED
13019 #define PTHREAD_CREATE_DETACHED 1
13020 #endif
13021         pthread_t t;
13022         int status;
13023         int detach = PTHREAD_CREATE_DETACHED;
13024
13025 #if HAVE_PTHREADS > 4
13026         /* Final pthreads */
13027         pthread_attr_t attr;
13028
13029         status = pthread_attr_init(&attr);
13030         if( status ) return status;
13031
13032 #if HAVE_PTHREADS < 7
13033         status = pthread_attr_setdetachstate(&attr, &detach);
13034         if( status < 0 ) status = errno;
13035 #else
13036         status = pthread_attr_setdetachstate(&attr, detach);
13037 #endif
13038         if( status ) return status;
13039         status = pthread_create( &t, &attr, task, NULL );
13040 #if HAVE_PTHREADS < 7
13041         if( status < 0 ) status = errno;
13042 #endif
13043         if( status ) return status;
13044 #else
13045         /* Draft 4 pthreads */
13046         status = pthread_create( &t, pthread_attr_default, task, NULL );
13047         if( status ) return errno;
13048
13049         /* give thread a chance to complete */
13050         /* it should remain joinable and hence detachable */
13051         sleep( 1 );
13052
13053         status = pthread_detach( &t );
13054         if( status ) return errno;
13055 #endif
13056
13057 #ifdef HAVE_LINUX_THREADS
13058         pthread_kill_other_threads_np();
13059 #endif
13060
13061         return 0;
13062
13063 }
13064
13065 EOF
13066 if { (eval echo configure:13067: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13067 then
13068   ol_cv_pthread_lpthread=yes
13069 else
13070   echo "configure: failed program was:" >&5
13071   cat conftest.$ac_ext >&5
13072   rm -fr conftest*
13073   ol_cv_pthread_lpthread=no
13074 fi
13075 rm -fr conftest*
13076 fi
13077
13078
13079                 # restore the LIBS
13080                 LIBS="$ol_LIBS"
13081         
13082 fi
13083
13084 echo "$ac_t""$ol_cv_pthread_lpthread" 1>&6
13085
13086         if test $ol_cv_pthread_lpthread = yes ; then
13087                 ol_link_pthreads="-lpthread"
13088                 ol_link_threads=posix
13089         fi
13090 fi
13091
13092                 # Pthread try link: -lc_r (ol_cv_pthread_lc_r)
13093 if test "$ol_link_threads" = no ; then
13094         # try -lc_r
13095         echo $ac_n "checking for pthread link with -lc_r""... $ac_c" 1>&6
13096 echo "configure:13097: checking for pthread link with -lc_r" >&5
13097 if eval "test \"\${ol_cv_pthread_lc_r+set}\" = set"; then
13098   echo $ac_n "(cached) $ac_c" 1>&6
13099 else
13100   
13101                 # save the flags
13102                 ol_LIBS="$LIBS"
13103                 LIBS="-lc_r $LIBS"
13104
13105                 if test "$cross_compiling" = yes; then
13106   cat > conftest.$ac_ext <<EOF
13107 #line 13108 "configure"
13108 #include "confdefs.h"
13109 /* pthread test headers */
13110 #include <pthread.h>
13111 #if HAVE_PTHREADS < 7
13112 #include <errno.h>
13113 #endif
13114 #ifndef NULL
13115 #define NULL (void*)0
13116 #endif
13117
13118 static void *task(p)
13119         void *p;
13120 {
13121         return (void *) (p == NULL);
13122 }
13123
13124 int main() {
13125
13126         /* pthread test function */
13127 #ifndef PTHREAD_CREATE_DETACHED
13128 #define PTHREAD_CREATE_DETACHED 1
13129 #endif
13130         pthread_t t;
13131         int status;
13132         int detach = PTHREAD_CREATE_DETACHED;
13133
13134 #if HAVE_PTHREADS > 4
13135         /* Final pthreads */
13136         pthread_attr_t attr;
13137
13138         status = pthread_attr_init(&attr);
13139         if( status ) return status;
13140
13141 #if HAVE_PTHREADS < 7
13142         status = pthread_attr_setdetachstate(&attr, &detach);
13143         if( status < 0 ) status = errno;
13144 #else
13145         status = pthread_attr_setdetachstate(&attr, detach);
13146 #endif
13147         if( status ) return status;
13148         status = pthread_create( &t, &attr, task, NULL );
13149 #if HAVE_PTHREADS < 7
13150         if( status < 0 ) status = errno;
13151 #endif
13152         if( status ) return status;
13153 #else
13154         /* Draft 4 pthreads */
13155         status = pthread_create( &t, pthread_attr_default, task, NULL );
13156         if( status ) return errno;
13157
13158         /* give thread a chance to complete */
13159         /* it should remain joinable and hence detachable */
13160         sleep( 1 );
13161
13162         status = pthread_detach( &t );
13163         if( status ) return errno;
13164 #endif
13165
13166 #ifdef HAVE_LINUX_THREADS
13167         pthread_kill_other_threads_np();
13168 #endif
13169
13170         return 0;
13171
13172 ; return 0; }
13173 EOF
13174 if { (eval echo configure:13175: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13175   rm -rf conftest*
13176   ol_cv_pthread_lc_r=yes
13177 else
13178   echo "configure: failed program was:" >&5
13179   cat conftest.$ac_ext >&5
13180   rm -rf conftest*
13181   ol_cv_pthread_lc_r=no
13182 fi
13183 rm -f conftest*
13184 else
13185   cat > conftest.$ac_ext <<EOF
13186 #line 13187 "configure"
13187 #include "confdefs.h"
13188 /* pthread test headers */
13189 #include <pthread.h>
13190 #if HAVE_PTHREADS < 7
13191 #include <errno.h>
13192 #endif
13193 #ifndef NULL
13194 #define NULL (void*)0
13195 #endif
13196
13197 static void *task(p)
13198         void *p;
13199 {
13200         return (void *) (p == NULL);
13201 }
13202
13203
13204 int main(argc, argv)
13205         int argc;
13206         char **argv;
13207 {
13208
13209         /* pthread test function */
13210 #ifndef PTHREAD_CREATE_DETACHED
13211 #define PTHREAD_CREATE_DETACHED 1
13212 #endif
13213         pthread_t t;
13214         int status;
13215         int detach = PTHREAD_CREATE_DETACHED;
13216
13217 #if HAVE_PTHREADS > 4
13218         /* Final pthreads */
13219         pthread_attr_t attr;
13220
13221         status = pthread_attr_init(&attr);
13222         if( status ) return status;
13223
13224 #if HAVE_PTHREADS < 7
13225         status = pthread_attr_setdetachstate(&attr, &detach);
13226         if( status < 0 ) status = errno;
13227 #else
13228         status = pthread_attr_setdetachstate(&attr, detach);
13229 #endif
13230         if( status ) return status;
13231         status = pthread_create( &t, &attr, task, NULL );
13232 #if HAVE_PTHREADS < 7
13233         if( status < 0 ) status = errno;
13234 #endif
13235         if( status ) return status;
13236 #else
13237         /* Draft 4 pthreads */
13238         status = pthread_create( &t, pthread_attr_default, task, NULL );
13239         if( status ) return errno;
13240
13241         /* give thread a chance to complete */
13242         /* it should remain joinable and hence detachable */
13243         sleep( 1 );
13244
13245         status = pthread_detach( &t );
13246         if( status ) return errno;
13247 #endif
13248
13249 #ifdef HAVE_LINUX_THREADS
13250         pthread_kill_other_threads_np();
13251 #endif
13252
13253         return 0;
13254
13255 }
13256
13257 EOF
13258 if { (eval echo configure:13259: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13259 then
13260   ol_cv_pthread_lc_r=yes
13261 else
13262   echo "configure: failed program was:" >&5
13263   cat conftest.$ac_ext >&5
13264   rm -fr conftest*
13265   ol_cv_pthread_lc_r=no
13266 fi
13267 rm -fr conftest*
13268 fi
13269
13270
13271                 # restore the LIBS
13272                 LIBS="$ol_LIBS"
13273         
13274 fi
13275
13276 echo "$ac_t""$ol_cv_pthread_lc_r" 1>&6
13277
13278         if test $ol_cv_pthread_lc_r = yes ; then
13279                 ol_link_pthreads="-lc_r"
13280                 ol_link_threads=posix
13281         fi
13282 fi
13283
13284
13285                 # Pthread try link: -threads (ol_cv_pthread_threads)
13286 if test "$ol_link_threads" = no ; then
13287         # try -threads
13288         echo $ac_n "checking for pthread link with -threads""... $ac_c" 1>&6
13289 echo "configure:13290: checking for pthread link with -threads" >&5
13290 if eval "test \"\${ol_cv_pthread_threads+set}\" = set"; then
13291   echo $ac_n "(cached) $ac_c" 1>&6
13292 else
13293   
13294                 # save the flags
13295                 ol_LIBS="$LIBS"
13296                 LIBS="-threads $LIBS"
13297
13298                 if test "$cross_compiling" = yes; then
13299   cat > conftest.$ac_ext <<EOF
13300 #line 13301 "configure"
13301 #include "confdefs.h"
13302 /* pthread test headers */
13303 #include <pthread.h>
13304 #if HAVE_PTHREADS < 7
13305 #include <errno.h>
13306 #endif
13307 #ifndef NULL
13308 #define NULL (void*)0
13309 #endif
13310
13311 static void *task(p)
13312         void *p;
13313 {
13314         return (void *) (p == NULL);
13315 }
13316
13317 int main() {
13318
13319         /* pthread test function */
13320 #ifndef PTHREAD_CREATE_DETACHED
13321 #define PTHREAD_CREATE_DETACHED 1
13322 #endif
13323         pthread_t t;
13324         int status;
13325         int detach = PTHREAD_CREATE_DETACHED;
13326
13327 #if HAVE_PTHREADS > 4
13328         /* Final pthreads */
13329         pthread_attr_t attr;
13330
13331         status = pthread_attr_init(&attr);
13332         if( status ) return status;
13333
13334 #if HAVE_PTHREADS < 7
13335         status = pthread_attr_setdetachstate(&attr, &detach);
13336         if( status < 0 ) status = errno;
13337 #else
13338         status = pthread_attr_setdetachstate(&attr, detach);
13339 #endif
13340         if( status ) return status;
13341         status = pthread_create( &t, &attr, task, NULL );
13342 #if HAVE_PTHREADS < 7
13343         if( status < 0 ) status = errno;
13344 #endif
13345         if( status ) return status;
13346 #else
13347         /* Draft 4 pthreads */
13348         status = pthread_create( &t, pthread_attr_default, task, NULL );
13349         if( status ) return errno;
13350
13351         /* give thread a chance to complete */
13352         /* it should remain joinable and hence detachable */
13353         sleep( 1 );
13354
13355         status = pthread_detach( &t );
13356         if( status ) return errno;
13357 #endif
13358
13359 #ifdef HAVE_LINUX_THREADS
13360         pthread_kill_other_threads_np();
13361 #endif
13362
13363         return 0;
13364
13365 ; return 0; }
13366 EOF
13367 if { (eval echo configure:13368: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13368   rm -rf conftest*
13369   ol_cv_pthread_threads=yes
13370 else
13371   echo "configure: failed program was:" >&5
13372   cat conftest.$ac_ext >&5
13373   rm -rf conftest*
13374   ol_cv_pthread_threads=no
13375 fi
13376 rm -f conftest*
13377 else
13378   cat > conftest.$ac_ext <<EOF
13379 #line 13380 "configure"
13380 #include "confdefs.h"
13381 /* pthread test headers */
13382 #include <pthread.h>
13383 #if HAVE_PTHREADS < 7
13384 #include <errno.h>
13385 #endif
13386 #ifndef NULL
13387 #define NULL (void*)0
13388 #endif
13389
13390 static void *task(p)
13391         void *p;
13392 {
13393         return (void *) (p == NULL);
13394 }
13395
13396
13397 int main(argc, argv)
13398         int argc;
13399         char **argv;
13400 {
13401
13402         /* pthread test function */
13403 #ifndef PTHREAD_CREATE_DETACHED
13404 #define PTHREAD_CREATE_DETACHED 1
13405 #endif
13406         pthread_t t;
13407         int status;
13408         int detach = PTHREAD_CREATE_DETACHED;
13409
13410 #if HAVE_PTHREADS > 4
13411         /* Final pthreads */
13412         pthread_attr_t attr;
13413
13414         status = pthread_attr_init(&attr);
13415         if( status ) return status;
13416
13417 #if HAVE_PTHREADS < 7
13418         status = pthread_attr_setdetachstate(&attr, &detach);
13419         if( status < 0 ) status = errno;
13420 #else
13421         status = pthread_attr_setdetachstate(&attr, detach);
13422 #endif
13423         if( status ) return status;
13424         status = pthread_create( &t, &attr, task, NULL );
13425 #if HAVE_PTHREADS < 7
13426         if( status < 0 ) status = errno;
13427 #endif
13428         if( status ) return status;
13429 #else
13430         /* Draft 4 pthreads */
13431         status = pthread_create( &t, pthread_attr_default, task, NULL );
13432         if( status ) return errno;
13433
13434         /* give thread a chance to complete */
13435         /* it should remain joinable and hence detachable */
13436         sleep( 1 );
13437
13438         status = pthread_detach( &t );
13439         if( status ) return errno;
13440 #endif
13441
13442 #ifdef HAVE_LINUX_THREADS
13443         pthread_kill_other_threads_np();
13444 #endif
13445
13446         return 0;
13447
13448 }
13449
13450 EOF
13451 if { (eval echo configure:13452: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13452 then
13453   ol_cv_pthread_threads=yes
13454 else
13455   echo "configure: failed program was:" >&5
13456   cat conftest.$ac_ext >&5
13457   rm -fr conftest*
13458   ol_cv_pthread_threads=no
13459 fi
13460 rm -fr conftest*
13461 fi
13462
13463
13464                 # restore the LIBS
13465                 LIBS="$ol_LIBS"
13466         
13467 fi
13468
13469 echo "$ac_t""$ol_cv_pthread_threads" 1>&6
13470
13471         if test $ol_cv_pthread_threads = yes ; then
13472                 ol_link_pthreads="-threads"
13473                 ol_link_threads=posix
13474         fi
13475 fi
13476
13477
13478                 # Pthread try link: -lpthreads -lmach -lexc -lc_r (ol_cv_pthread_lpthreads_lmach_lexc_lc_r)
13479 if test "$ol_link_threads" = no ; then
13480         # try -lpthreads -lmach -lexc -lc_r
13481         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc -lc_r""... $ac_c" 1>&6
13482 echo "configure:13483: checking for pthread link with -lpthreads -lmach -lexc -lc_r" >&5
13483 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc_lc_r+set}\" = set"; then
13484   echo $ac_n "(cached) $ac_c" 1>&6
13485 else
13486   
13487                 # save the flags
13488                 ol_LIBS="$LIBS"
13489                 LIBS="-lpthreads -lmach -lexc -lc_r $LIBS"
13490
13491                 if test "$cross_compiling" = yes; then
13492   cat > conftest.$ac_ext <<EOF
13493 #line 13494 "configure"
13494 #include "confdefs.h"
13495 /* pthread test headers */
13496 #include <pthread.h>
13497 #if HAVE_PTHREADS < 7
13498 #include <errno.h>
13499 #endif
13500 #ifndef NULL
13501 #define NULL (void*)0
13502 #endif
13503
13504 static void *task(p)
13505         void *p;
13506 {
13507         return (void *) (p == NULL);
13508 }
13509
13510 int main() {
13511
13512         /* pthread test function */
13513 #ifndef PTHREAD_CREATE_DETACHED
13514 #define PTHREAD_CREATE_DETACHED 1
13515 #endif
13516         pthread_t t;
13517         int status;
13518         int detach = PTHREAD_CREATE_DETACHED;
13519
13520 #if HAVE_PTHREADS > 4
13521         /* Final pthreads */
13522         pthread_attr_t attr;
13523
13524         status = pthread_attr_init(&attr);
13525         if( status ) return status;
13526
13527 #if HAVE_PTHREADS < 7
13528         status = pthread_attr_setdetachstate(&attr, &detach);
13529         if( status < 0 ) status = errno;
13530 #else
13531         status = pthread_attr_setdetachstate(&attr, detach);
13532 #endif
13533         if( status ) return status;
13534         status = pthread_create( &t, &attr, task, NULL );
13535 #if HAVE_PTHREADS < 7
13536         if( status < 0 ) status = errno;
13537 #endif
13538         if( status ) return status;
13539 #else
13540         /* Draft 4 pthreads */
13541         status = pthread_create( &t, pthread_attr_default, task, NULL );
13542         if( status ) return errno;
13543
13544         /* give thread a chance to complete */
13545         /* it should remain joinable and hence detachable */
13546         sleep( 1 );
13547
13548         status = pthread_detach( &t );
13549         if( status ) return errno;
13550 #endif
13551
13552 #ifdef HAVE_LINUX_THREADS
13553         pthread_kill_other_threads_np();
13554 #endif
13555
13556         return 0;
13557
13558 ; return 0; }
13559 EOF
13560 if { (eval echo configure:13561: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13561   rm -rf conftest*
13562   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
13563 else
13564   echo "configure: failed program was:" >&5
13565   cat conftest.$ac_ext >&5
13566   rm -rf conftest*
13567   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
13568 fi
13569 rm -f conftest*
13570 else
13571   cat > conftest.$ac_ext <<EOF
13572 #line 13573 "configure"
13573 #include "confdefs.h"
13574 /* pthread test headers */
13575 #include <pthread.h>
13576 #if HAVE_PTHREADS < 7
13577 #include <errno.h>
13578 #endif
13579 #ifndef NULL
13580 #define NULL (void*)0
13581 #endif
13582
13583 static void *task(p)
13584         void *p;
13585 {
13586         return (void *) (p == NULL);
13587 }
13588
13589
13590 int main(argc, argv)
13591         int argc;
13592         char **argv;
13593 {
13594
13595         /* pthread test function */
13596 #ifndef PTHREAD_CREATE_DETACHED
13597 #define PTHREAD_CREATE_DETACHED 1
13598 #endif
13599         pthread_t t;
13600         int status;
13601         int detach = PTHREAD_CREATE_DETACHED;
13602
13603 #if HAVE_PTHREADS > 4
13604         /* Final pthreads */
13605         pthread_attr_t attr;
13606
13607         status = pthread_attr_init(&attr);
13608         if( status ) return status;
13609
13610 #if HAVE_PTHREADS < 7
13611         status = pthread_attr_setdetachstate(&attr, &detach);
13612         if( status < 0 ) status = errno;
13613 #else
13614         status = pthread_attr_setdetachstate(&attr, detach);
13615 #endif
13616         if( status ) return status;
13617         status = pthread_create( &t, &attr, task, NULL );
13618 #if HAVE_PTHREADS < 7
13619         if( status < 0 ) status = errno;
13620 #endif
13621         if( status ) return status;
13622 #else
13623         /* Draft 4 pthreads */
13624         status = pthread_create( &t, pthread_attr_default, task, NULL );
13625         if( status ) return errno;
13626
13627         /* give thread a chance to complete */
13628         /* it should remain joinable and hence detachable */
13629         sleep( 1 );
13630
13631         status = pthread_detach( &t );
13632         if( status ) return errno;
13633 #endif
13634
13635 #ifdef HAVE_LINUX_THREADS
13636         pthread_kill_other_threads_np();
13637 #endif
13638
13639         return 0;
13640
13641 }
13642
13643 EOF
13644 if { (eval echo configure:13645: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13645 then
13646   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
13647 else
13648   echo "configure: failed program was:" >&5
13649   cat conftest.$ac_ext >&5
13650   rm -fr conftest*
13651   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
13652 fi
13653 rm -fr conftest*
13654 fi
13655
13656
13657                 # restore the LIBS
13658                 LIBS="$ol_LIBS"
13659         
13660 fi
13661
13662 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc_lc_r" 1>&6
13663
13664         if test $ol_cv_pthread_lpthreads_lmach_lexc_lc_r = yes ; then
13665                 ol_link_pthreads="-lpthreads -lmach -lexc -lc_r"
13666                 ol_link_threads=posix
13667         fi
13668 fi
13669
13670                 # Pthread try link: -lpthreads -lmach -lexc (ol_cv_pthread_lpthreads_lmach_lexc)
13671 if test "$ol_link_threads" = no ; then
13672         # try -lpthreads -lmach -lexc
13673         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc""... $ac_c" 1>&6
13674 echo "configure:13675: checking for pthread link with -lpthreads -lmach -lexc" >&5
13675 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc+set}\" = set"; then
13676   echo $ac_n "(cached) $ac_c" 1>&6
13677 else
13678   
13679                 # save the flags
13680                 ol_LIBS="$LIBS"
13681                 LIBS="-lpthreads -lmach -lexc $LIBS"
13682
13683                 if test "$cross_compiling" = yes; then
13684   cat > conftest.$ac_ext <<EOF
13685 #line 13686 "configure"
13686 #include "confdefs.h"
13687 /* pthread test headers */
13688 #include <pthread.h>
13689 #if HAVE_PTHREADS < 7
13690 #include <errno.h>
13691 #endif
13692 #ifndef NULL
13693 #define NULL (void*)0
13694 #endif
13695
13696 static void *task(p)
13697         void *p;
13698 {
13699         return (void *) (p == NULL);
13700 }
13701
13702 int main() {
13703
13704         /* pthread test function */
13705 #ifndef PTHREAD_CREATE_DETACHED
13706 #define PTHREAD_CREATE_DETACHED 1
13707 #endif
13708         pthread_t t;
13709         int status;
13710         int detach = PTHREAD_CREATE_DETACHED;
13711
13712 #if HAVE_PTHREADS > 4
13713         /* Final pthreads */
13714         pthread_attr_t attr;
13715
13716         status = pthread_attr_init(&attr);
13717         if( status ) return status;
13718
13719 #if HAVE_PTHREADS < 7
13720         status = pthread_attr_setdetachstate(&attr, &detach);
13721         if( status < 0 ) status = errno;
13722 #else
13723         status = pthread_attr_setdetachstate(&attr, detach);
13724 #endif
13725         if( status ) return status;
13726         status = pthread_create( &t, &attr, task, NULL );
13727 #if HAVE_PTHREADS < 7
13728         if( status < 0 ) status = errno;
13729 #endif
13730         if( status ) return status;
13731 #else
13732         /* Draft 4 pthreads */
13733         status = pthread_create( &t, pthread_attr_default, task, NULL );
13734         if( status ) return errno;
13735
13736         /* give thread a chance to complete */
13737         /* it should remain joinable and hence detachable */
13738         sleep( 1 );
13739
13740         status = pthread_detach( &t );
13741         if( status ) return errno;
13742 #endif
13743
13744 #ifdef HAVE_LINUX_THREADS
13745         pthread_kill_other_threads_np();
13746 #endif
13747
13748         return 0;
13749
13750 ; return 0; }
13751 EOF
13752 if { (eval echo configure:13753: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13753   rm -rf conftest*
13754   ol_cv_pthread_lpthreads_lmach_lexc=yes
13755 else
13756   echo "configure: failed program was:" >&5
13757   cat conftest.$ac_ext >&5
13758   rm -rf conftest*
13759   ol_cv_pthread_lpthreads_lmach_lexc=no
13760 fi
13761 rm -f conftest*
13762 else
13763   cat > conftest.$ac_ext <<EOF
13764 #line 13765 "configure"
13765 #include "confdefs.h"
13766 /* pthread test headers */
13767 #include <pthread.h>
13768 #if HAVE_PTHREADS < 7
13769 #include <errno.h>
13770 #endif
13771 #ifndef NULL
13772 #define NULL (void*)0
13773 #endif
13774
13775 static void *task(p)
13776         void *p;
13777 {
13778         return (void *) (p == NULL);
13779 }
13780
13781
13782 int main(argc, argv)
13783         int argc;
13784         char **argv;
13785 {
13786
13787         /* pthread test function */
13788 #ifndef PTHREAD_CREATE_DETACHED
13789 #define PTHREAD_CREATE_DETACHED 1
13790 #endif
13791         pthread_t t;
13792         int status;
13793         int detach = PTHREAD_CREATE_DETACHED;
13794
13795 #if HAVE_PTHREADS > 4
13796         /* Final pthreads */
13797         pthread_attr_t attr;
13798
13799         status = pthread_attr_init(&attr);
13800         if( status ) return status;
13801
13802 #if HAVE_PTHREADS < 7
13803         status = pthread_attr_setdetachstate(&attr, &detach);
13804         if( status < 0 ) status = errno;
13805 #else
13806         status = pthread_attr_setdetachstate(&attr, detach);
13807 #endif
13808         if( status ) return status;
13809         status = pthread_create( &t, &attr, task, NULL );
13810 #if HAVE_PTHREADS < 7
13811         if( status < 0 ) status = errno;
13812 #endif
13813         if( status ) return status;
13814 #else
13815         /* Draft 4 pthreads */
13816         status = pthread_create( &t, pthread_attr_default, task, NULL );
13817         if( status ) return errno;
13818
13819         /* give thread a chance to complete */
13820         /* it should remain joinable and hence detachable */
13821         sleep( 1 );
13822
13823         status = pthread_detach( &t );
13824         if( status ) return errno;
13825 #endif
13826
13827 #ifdef HAVE_LINUX_THREADS
13828         pthread_kill_other_threads_np();
13829 #endif
13830
13831         return 0;
13832
13833 }
13834
13835 EOF
13836 if { (eval echo configure:13837: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13837 then
13838   ol_cv_pthread_lpthreads_lmach_lexc=yes
13839 else
13840   echo "configure: failed program was:" >&5
13841   cat conftest.$ac_ext >&5
13842   rm -fr conftest*
13843   ol_cv_pthread_lpthreads_lmach_lexc=no
13844 fi
13845 rm -fr conftest*
13846 fi
13847
13848
13849                 # restore the LIBS
13850                 LIBS="$ol_LIBS"
13851         
13852 fi
13853
13854 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc" 1>&6
13855
13856         if test $ol_cv_pthread_lpthreads_lmach_lexc = yes ; then
13857                 ol_link_pthreads="-lpthreads -lmach -lexc"
13858                 ol_link_threads=posix
13859         fi
13860 fi
13861
13862                 # Pthread try link: -lpthreads -lexc (ol_cv_pthread_lpthreads_lexc)
13863 if test "$ol_link_threads" = no ; then
13864         # try -lpthreads -lexc
13865         echo $ac_n "checking for pthread link with -lpthreads -lexc""... $ac_c" 1>&6
13866 echo "configure:13867: checking for pthread link with -lpthreads -lexc" >&5
13867 if eval "test \"\${ol_cv_pthread_lpthreads_lexc+set}\" = set"; then
13868   echo $ac_n "(cached) $ac_c" 1>&6
13869 else
13870   
13871                 # save the flags
13872                 ol_LIBS="$LIBS"
13873                 LIBS="-lpthreads -lexc $LIBS"
13874
13875                 if test "$cross_compiling" = yes; then
13876   cat > conftest.$ac_ext <<EOF
13877 #line 13878 "configure"
13878 #include "confdefs.h"
13879 /* pthread test headers */
13880 #include <pthread.h>
13881 #if HAVE_PTHREADS < 7
13882 #include <errno.h>
13883 #endif
13884 #ifndef NULL
13885 #define NULL (void*)0
13886 #endif
13887
13888 static void *task(p)
13889         void *p;
13890 {
13891         return (void *) (p == NULL);
13892 }
13893
13894 int main() {
13895
13896         /* pthread test function */
13897 #ifndef PTHREAD_CREATE_DETACHED
13898 #define PTHREAD_CREATE_DETACHED 1
13899 #endif
13900         pthread_t t;
13901         int status;
13902         int detach = PTHREAD_CREATE_DETACHED;
13903
13904 #if HAVE_PTHREADS > 4
13905         /* Final pthreads */
13906         pthread_attr_t attr;
13907
13908         status = pthread_attr_init(&attr);
13909         if( status ) return status;
13910
13911 #if HAVE_PTHREADS < 7
13912         status = pthread_attr_setdetachstate(&attr, &detach);
13913         if( status < 0 ) status = errno;
13914 #else
13915         status = pthread_attr_setdetachstate(&attr, detach);
13916 #endif
13917         if( status ) return status;
13918         status = pthread_create( &t, &attr, task, NULL );
13919 #if HAVE_PTHREADS < 7
13920         if( status < 0 ) status = errno;
13921 #endif
13922         if( status ) return status;
13923 #else
13924         /* Draft 4 pthreads */
13925         status = pthread_create( &t, pthread_attr_default, task, NULL );
13926         if( status ) return errno;
13927
13928         /* give thread a chance to complete */
13929         /* it should remain joinable and hence detachable */
13930         sleep( 1 );
13931
13932         status = pthread_detach( &t );
13933         if( status ) return errno;
13934 #endif
13935
13936 #ifdef HAVE_LINUX_THREADS
13937         pthread_kill_other_threads_np();
13938 #endif
13939
13940         return 0;
13941
13942 ; return 0; }
13943 EOF
13944 if { (eval echo configure:13945: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13945   rm -rf conftest*
13946   ol_cv_pthread_lpthreads_lexc=yes
13947 else
13948   echo "configure: failed program was:" >&5
13949   cat conftest.$ac_ext >&5
13950   rm -rf conftest*
13951   ol_cv_pthread_lpthreads_lexc=no
13952 fi
13953 rm -f conftest*
13954 else
13955   cat > conftest.$ac_ext <<EOF
13956 #line 13957 "configure"
13957 #include "confdefs.h"
13958 /* pthread test headers */
13959 #include <pthread.h>
13960 #if HAVE_PTHREADS < 7
13961 #include <errno.h>
13962 #endif
13963 #ifndef NULL
13964 #define NULL (void*)0
13965 #endif
13966
13967 static void *task(p)
13968         void *p;
13969 {
13970         return (void *) (p == NULL);
13971 }
13972
13973
13974 int main(argc, argv)
13975         int argc;
13976         char **argv;
13977 {
13978
13979         /* pthread test function */
13980 #ifndef PTHREAD_CREATE_DETACHED
13981 #define PTHREAD_CREATE_DETACHED 1
13982 #endif
13983         pthread_t t;
13984         int status;
13985         int detach = PTHREAD_CREATE_DETACHED;
13986
13987 #if HAVE_PTHREADS > 4
13988         /* Final pthreads */
13989         pthread_attr_t attr;
13990
13991         status = pthread_attr_init(&attr);
13992         if( status ) return status;
13993
13994 #if HAVE_PTHREADS < 7
13995         status = pthread_attr_setdetachstate(&attr, &detach);
13996         if( status < 0 ) status = errno;
13997 #else
13998         status = pthread_attr_setdetachstate(&attr, detach);
13999 #endif
14000         if( status ) return status;
14001         status = pthread_create( &t, &attr, task, NULL );
14002 #if HAVE_PTHREADS < 7
14003         if( status < 0 ) status = errno;
14004 #endif
14005         if( status ) return status;
14006 #else
14007         /* Draft 4 pthreads */
14008         status = pthread_create( &t, pthread_attr_default, task, NULL );
14009         if( status ) return errno;
14010
14011         /* give thread a chance to complete */
14012         /* it should remain joinable and hence detachable */
14013         sleep( 1 );
14014
14015         status = pthread_detach( &t );
14016         if( status ) return errno;
14017 #endif
14018
14019 #ifdef HAVE_LINUX_THREADS
14020         pthread_kill_other_threads_np();
14021 #endif
14022
14023         return 0;
14024
14025 }
14026
14027 EOF
14028 if { (eval echo configure:14029: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14029 then
14030   ol_cv_pthread_lpthreads_lexc=yes
14031 else
14032   echo "configure: failed program was:" >&5
14033   cat conftest.$ac_ext >&5
14034   rm -fr conftest*
14035   ol_cv_pthread_lpthreads_lexc=no
14036 fi
14037 rm -fr conftest*
14038 fi
14039
14040
14041                 # restore the LIBS
14042                 LIBS="$ol_LIBS"
14043         
14044 fi
14045
14046 echo "$ac_t""$ol_cv_pthread_lpthreads_lexc" 1>&6
14047
14048         if test $ol_cv_pthread_lpthreads_lexc = yes ; then
14049                 ol_link_pthreads="-lpthreads -lexc"
14050                 ol_link_threads=posix
14051         fi
14052 fi
14053
14054
14055                 # Pthread try link: -lpthreads (ol_cv_pthread_lib_lpthreads)
14056 if test "$ol_link_threads" = no ; then
14057         # try -lpthreads
14058         echo $ac_n "checking for pthread link with -lpthreads""... $ac_c" 1>&6
14059 echo "configure:14060: checking for pthread link with -lpthreads" >&5
14060 if eval "test \"\${ol_cv_pthread_lib_lpthreads+set}\" = set"; then
14061   echo $ac_n "(cached) $ac_c" 1>&6
14062 else
14063   
14064                 # save the flags
14065                 ol_LIBS="$LIBS"
14066                 LIBS="-lpthreads $LIBS"
14067
14068                 if test "$cross_compiling" = yes; then
14069   cat > conftest.$ac_ext <<EOF
14070 #line 14071 "configure"
14071 #include "confdefs.h"
14072 /* pthread test headers */
14073 #include <pthread.h>
14074 #if HAVE_PTHREADS < 7
14075 #include <errno.h>
14076 #endif
14077 #ifndef NULL
14078 #define NULL (void*)0
14079 #endif
14080
14081 static void *task(p)
14082         void *p;
14083 {
14084         return (void *) (p == NULL);
14085 }
14086
14087 int main() {
14088
14089         /* pthread test function */
14090 #ifndef PTHREAD_CREATE_DETACHED
14091 #define PTHREAD_CREATE_DETACHED 1
14092 #endif
14093         pthread_t t;
14094         int status;
14095         int detach = PTHREAD_CREATE_DETACHED;
14096
14097 #if HAVE_PTHREADS > 4
14098         /* Final pthreads */
14099         pthread_attr_t attr;
14100
14101         status = pthread_attr_init(&attr);
14102         if( status ) return status;
14103
14104 #if HAVE_PTHREADS < 7
14105         status = pthread_attr_setdetachstate(&attr, &detach);
14106         if( status < 0 ) status = errno;
14107 #else
14108         status = pthread_attr_setdetachstate(&attr, detach);
14109 #endif
14110         if( status ) return status;
14111         status = pthread_create( &t, &attr, task, NULL );
14112 #if HAVE_PTHREADS < 7
14113         if( status < 0 ) status = errno;
14114 #endif
14115         if( status ) return status;
14116 #else
14117         /* Draft 4 pthreads */
14118         status = pthread_create( &t, pthread_attr_default, task, NULL );
14119         if( status ) return errno;
14120
14121         /* give thread a chance to complete */
14122         /* it should remain joinable and hence detachable */
14123         sleep( 1 );
14124
14125         status = pthread_detach( &t );
14126         if( status ) return errno;
14127 #endif
14128
14129 #ifdef HAVE_LINUX_THREADS
14130         pthread_kill_other_threads_np();
14131 #endif
14132
14133         return 0;
14134
14135 ; return 0; }
14136 EOF
14137 if { (eval echo configure:14138: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14138   rm -rf conftest*
14139   ol_cv_pthread_lib_lpthreads=yes
14140 else
14141   echo "configure: failed program was:" >&5
14142   cat conftest.$ac_ext >&5
14143   rm -rf conftest*
14144   ol_cv_pthread_lib_lpthreads=no
14145 fi
14146 rm -f conftest*
14147 else
14148   cat > conftest.$ac_ext <<EOF
14149 #line 14150 "configure"
14150 #include "confdefs.h"
14151 /* pthread test headers */
14152 #include <pthread.h>
14153 #if HAVE_PTHREADS < 7
14154 #include <errno.h>
14155 #endif
14156 #ifndef NULL
14157 #define NULL (void*)0
14158 #endif
14159
14160 static void *task(p)
14161         void *p;
14162 {
14163         return (void *) (p == NULL);
14164 }
14165
14166
14167 int main(argc, argv)
14168         int argc;
14169         char **argv;
14170 {
14171
14172         /* pthread test function */
14173 #ifndef PTHREAD_CREATE_DETACHED
14174 #define PTHREAD_CREATE_DETACHED 1
14175 #endif
14176         pthread_t t;
14177         int status;
14178         int detach = PTHREAD_CREATE_DETACHED;
14179
14180 #if HAVE_PTHREADS > 4
14181         /* Final pthreads */
14182         pthread_attr_t attr;
14183
14184         status = pthread_attr_init(&attr);
14185         if( status ) return status;
14186
14187 #if HAVE_PTHREADS < 7
14188         status = pthread_attr_setdetachstate(&attr, &detach);
14189         if( status < 0 ) status = errno;
14190 #else
14191         status = pthread_attr_setdetachstate(&attr, detach);
14192 #endif
14193         if( status ) return status;
14194         status = pthread_create( &t, &attr, task, NULL );
14195 #if HAVE_PTHREADS < 7
14196         if( status < 0 ) status = errno;
14197 #endif
14198         if( status ) return status;
14199 #else
14200         /* Draft 4 pthreads */
14201         status = pthread_create( &t, pthread_attr_default, task, NULL );
14202         if( status ) return errno;
14203
14204         /* give thread a chance to complete */
14205         /* it should remain joinable and hence detachable */
14206         sleep( 1 );
14207
14208         status = pthread_detach( &t );
14209         if( status ) return errno;
14210 #endif
14211
14212 #ifdef HAVE_LINUX_THREADS
14213         pthread_kill_other_threads_np();
14214 #endif
14215
14216         return 0;
14217
14218 }
14219
14220 EOF
14221 if { (eval echo configure:14222: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14222 then
14223   ol_cv_pthread_lib_lpthreads=yes
14224 else
14225   echo "configure: failed program was:" >&5
14226   cat conftest.$ac_ext >&5
14227   rm -fr conftest*
14228   ol_cv_pthread_lib_lpthreads=no
14229 fi
14230 rm -fr conftest*
14231 fi
14232
14233
14234                 # restore the LIBS
14235                 LIBS="$ol_LIBS"
14236         
14237 fi
14238
14239 echo "$ac_t""$ol_cv_pthread_lib_lpthreads" 1>&6
14240
14241         if test $ol_cv_pthread_lib_lpthreads = yes ; then
14242                 ol_link_pthreads="-lpthreads"
14243                 ol_link_threads=posix
14244         fi
14245 fi
14246
14247
14248                 if test $ol_link_threads != no ; then
14249                         LTHREAD_LIBS="$LTHREAD_LIBS $ol_link_pthreads"
14250
14251                                                 save_CPPFLAGS="$CPPFLAGS"
14252                         save_LIBS="$LIBS"
14253                         LIBS="$LTHREAD_LIBS $LIBS"
14254
14255                                                                                                 for ac_func in sched_yield pthread_yield thr_yield
14256 do
14257 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
14258 echo "configure:14259: checking for $ac_func" >&5
14259 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
14260   echo $ac_n "(cached) $ac_c" 1>&6
14261 else
14262   cat > conftest.$ac_ext <<EOF
14263 #line 14264 "configure"
14264 #include "confdefs.h"
14265 /* System header to define __stub macros and hopefully few prototypes,
14266     which can conflict with char $ac_func(); below.  */
14267 #include <assert.h>
14268 /* Override any gcc2 internal prototype to avoid an error.  */
14269 /* We use char because int might match the return type of a gcc2
14270     builtin and then its argument prototype would still apply.  */
14271 char $ac_func();
14272 char (*f)();
14273
14274 int main() {
14275
14276 /* The GNU C library defines this for functions which it implements
14277     to always fail with ENOSYS.  Some functions are actually named
14278     something starting with __ and the normal name is an alias.  */
14279 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14280 choke me
14281 #else
14282 f = $ac_func;
14283 #endif
14284
14285 ; return 0; }
14286 EOF
14287 if { (eval echo configure:14288: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14288   rm -rf conftest*
14289   eval "ac_cv_func_$ac_func=yes"
14290 else
14291   echo "configure: failed program was:" >&5
14292   cat conftest.$ac_ext >&5
14293   rm -rf conftest*
14294   eval "ac_cv_func_$ac_func=no"
14295 fi
14296 rm -f conftest*
14297 fi
14298
14299 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
14300   echo "$ac_t""yes" 1>&6
14301     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
14302   cat >> confdefs.h <<EOF
14303 #define $ac_tr_func 1
14304 EOF
14305  
14306 else
14307   echo "$ac_t""no" 1>&6
14308 fi
14309 done
14310
14311
14312                         if test $ac_cv_func_sched_yield = no -a \
14313                                 $ac_cv_func_pthread_yield = no -a \
14314                                 $ac_cv_func_thr_yield = no ; then
14315                                                                 echo $ac_n "checking for sched_yield in -lrt""... $ac_c" 1>&6
14316 echo "configure:14317: checking for sched_yield in -lrt" >&5
14317 ac_lib_var=`echo rt'_'sched_yield | sed 'y%./+-:%__p__%'`
14318 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
14319   echo $ac_n "(cached) $ac_c" 1>&6
14320 else
14321   ac_save_LIBS="$LIBS"
14322 LIBS="-lrt  $LIBS"
14323 cat > conftest.$ac_ext <<EOF
14324 #line 14325 "configure"
14325 #include "confdefs.h"
14326 /* Override any gcc2 internal prototype to avoid an error.  */
14327 /* We use char because int might match the return type of a gcc2
14328     builtin and then its argument prototype would still apply.  */
14329 char sched_yield();
14330
14331 int main() {
14332 sched_yield()
14333 ; return 0; }
14334 EOF
14335 if { (eval echo configure:14336: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14336   rm -rf conftest*
14337   eval "ac_cv_lib_$ac_lib_var=yes"
14338 else
14339   echo "configure: failed program was:" >&5
14340   cat conftest.$ac_ext >&5
14341   rm -rf conftest*
14342   eval "ac_cv_lib_$ac_lib_var=no"
14343 fi
14344 rm -f conftest*
14345 LIBS="$ac_save_LIBS"
14346
14347 fi
14348 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
14349   echo "$ac_t""yes" 1>&6
14350   LTHREAD_LIBS="$LTHREAD_LIBS -lrt"
14351                                         cat >> confdefs.h <<\EOF
14352 #define HAVE_SCHED_YIELD 1
14353 EOF
14354
14355                                         ac_cv_func_sched_yield=yes
14356 else
14357   echo "$ac_t""no" 1>&6
14358 ac_cv_func_sched_yield=no
14359 fi
14360
14361                         fi
14362                         if test $ac_cv_func_sched_yield = no -a \
14363                                 $ac_cv_func_pthread_yield = no -a \
14364                                 "$ac_cv_func_thr_yield" = no ; then
14365                                 echo "configure: warning: could not locate sched_yield() or pthread_yield()" 1>&2
14366                         fi
14367
14368                                                 for ac_func in pthread_kill pthread_rwlock_destroy
14369 do
14370 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
14371 echo "configure:14372: checking for $ac_func" >&5
14372 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
14373   echo $ac_n "(cached) $ac_c" 1>&6
14374 else
14375   cat > conftest.$ac_ext <<EOF
14376 #line 14377 "configure"
14377 #include "confdefs.h"
14378 /* System header to define __stub macros and hopefully few prototypes,
14379     which can conflict with char $ac_func(); below.  */
14380 #include <assert.h>
14381 /* Override any gcc2 internal prototype to avoid an error.  */
14382 /* We use char because int might match the return type of a gcc2
14383     builtin and then its argument prototype would still apply.  */
14384 char $ac_func();
14385 char (*f)();
14386
14387 int main() {
14388
14389 /* The GNU C library defines this for functions which it implements
14390     to always fail with ENOSYS.  Some functions are actually named
14391     something starting with __ and the normal name is an alias.  */
14392 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14393 choke me
14394 #else
14395 f = $ac_func;
14396 #endif
14397
14398 ; return 0; }
14399 EOF
14400 if { (eval echo configure:14401: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14401   rm -rf conftest*
14402   eval "ac_cv_func_$ac_func=yes"
14403 else
14404   echo "configure: failed program was:" >&5
14405   cat conftest.$ac_ext >&5
14406   rm -rf conftest*
14407   eval "ac_cv_func_$ac_func=no"
14408 fi
14409 rm -f conftest*
14410 fi
14411
14412 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
14413   echo "$ac_t""yes" 1>&6
14414     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
14415   cat >> confdefs.h <<EOF
14416 #define $ac_tr_func 1
14417 EOF
14418  
14419 else
14420   echo "$ac_t""no" 1>&6
14421 fi
14422 done
14423
14424
14425                                                                         echo $ac_n "checking for pthread_detach with <pthread.h>""... $ac_c" 1>&6
14426 echo "configure:14427: checking for pthread_detach with <pthread.h>" >&5
14427 if eval "test \"\${ol_cv_func_pthread_detach+set}\" = set"; then
14428   echo $ac_n "(cached) $ac_c" 1>&6
14429 else
14430   
14431                                                                 cat > conftest.$ac_ext <<EOF
14432 #line 14433 "configure"
14433 #include "confdefs.h"
14434
14435 #include <pthread.h>
14436 #ifndef NULL
14437 #define NULL (void*)0
14438 #endif
14439
14440 int main() {
14441 pthread_detach(NULL);
14442 ; return 0; }
14443 EOF
14444 if { (eval echo configure:14445: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14445   rm -rf conftest*
14446   ol_cv_func_pthread_detach=yes
14447 else
14448   echo "configure: failed program was:" >&5
14449   cat conftest.$ac_ext >&5
14450   rm -rf conftest*
14451   ol_cv_func_pthread_detach=no
14452 fi
14453 rm -f conftest*
14454                         
14455 fi
14456
14457 echo "$ac_t""$ol_cv_func_pthread_detach" 1>&6
14458
14459                         if test $ol_cv_func_pthread_detach = no ; then
14460                                 { echo "configure: error: could not locate pthread_detach()" 1>&2; exit 1; }
14461                         fi
14462
14463                         cat >> confdefs.h <<\EOF
14464 #define HAVE_PTHREAD_DETACH 1
14465 EOF
14466
14467
14468                                                 for ac_func in \
14469                                 pthread_setconcurrency \
14470                                 pthread_getconcurrency \
14471                                 thr_setconcurrency \
14472                                 thr_getconcurrency \
14473                         
14474 do
14475 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
14476 echo "configure:14477: checking for $ac_func" >&5
14477 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
14478   echo $ac_n "(cached) $ac_c" 1>&6
14479 else
14480   cat > conftest.$ac_ext <<EOF
14481 #line 14482 "configure"
14482 #include "confdefs.h"
14483 /* System header to define __stub macros and hopefully few prototypes,
14484     which can conflict with char $ac_func(); below.  */
14485 #include <assert.h>
14486 /* Override any gcc2 internal prototype to avoid an error.  */
14487 /* We use char because int might match the return type of a gcc2
14488     builtin and then its argument prototype would still apply.  */
14489 char $ac_func();
14490 char (*f)();
14491
14492 int main() {
14493
14494 /* The GNU C library defines this for functions which it implements
14495     to always fail with ENOSYS.  Some functions are actually named
14496     something starting with __ and the normal name is an alias.  */
14497 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14498 choke me
14499 #else
14500 f = $ac_func;
14501 #endif
14502
14503 ; return 0; }
14504 EOF
14505 if { (eval echo configure:14506: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14506   rm -rf conftest*
14507   eval "ac_cv_func_$ac_func=yes"
14508 else
14509   echo "configure: failed program was:" >&5
14510   cat conftest.$ac_ext >&5
14511   rm -rf conftest*
14512   eval "ac_cv_func_$ac_func=no"
14513 fi
14514 rm -f conftest*
14515 fi
14516
14517 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
14518   echo "$ac_t""yes" 1>&6
14519     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
14520   cat >> confdefs.h <<EOF
14521 #define $ac_tr_func 1
14522 EOF
14523  
14524 else
14525   echo "$ac_t""no" 1>&6
14526 fi
14527 done
14528
14529
14530                         
14531         for ac_func in pthread_kill_other_threads_np
14532 do
14533 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
14534 echo "configure:14535: checking for $ac_func" >&5
14535 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
14536   echo $ac_n "(cached) $ac_c" 1>&6
14537 else
14538   cat > conftest.$ac_ext <<EOF
14539 #line 14540 "configure"
14540 #include "confdefs.h"
14541 /* System header to define __stub macros and hopefully few prototypes,
14542     which can conflict with char $ac_func(); below.  */
14543 #include <assert.h>
14544 /* Override any gcc2 internal prototype to avoid an error.  */
14545 /* We use char because int might match the return type of a gcc2
14546     builtin and then its argument prototype would still apply.  */
14547 char $ac_func();
14548 char (*f)();
14549
14550 int main() {
14551
14552 /* The GNU C library defines this for functions which it implements
14553     to always fail with ENOSYS.  Some functions are actually named
14554     something starting with __ and the normal name is an alias.  */
14555 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14556 choke me
14557 #else
14558 f = $ac_func;
14559 #endif
14560
14561 ; return 0; }
14562 EOF
14563 if { (eval echo configure:14564: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14564   rm -rf conftest*
14565   eval "ac_cv_func_$ac_func=yes"
14566 else
14567   echo "configure: failed program was:" >&5
14568   cat conftest.$ac_ext >&5
14569   rm -rf conftest*
14570   eval "ac_cv_func_$ac_func=no"
14571 fi
14572 rm -f conftest*
14573 fi
14574
14575 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
14576   echo "$ac_t""yes" 1>&6
14577     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
14578   cat >> confdefs.h <<EOF
14579 #define $ac_tr_func 1
14580 EOF
14581  
14582 else
14583   echo "$ac_t""no" 1>&6
14584 fi
14585 done
14586
14587         echo $ac_n "checking for LinuxThreads implementation""... $ac_c" 1>&6
14588 echo "configure:14589: checking for LinuxThreads implementation" >&5
14589 if eval "test \"\${ol_cv_sys_linux_threads+set}\" = set"; then
14590   echo $ac_n "(cached) $ac_c" 1>&6
14591 else
14592   ol_cv_sys_linux_threads=$ac_cv_func_pthread_kill_other_threads_np
14593 fi
14594
14595 echo "$ac_t""$ol_cv_sys_linux_threads" 1>&6
14596
14597                         
14598         
14599         
14600         echo $ac_n "checking for LinuxThreads consistency""... $ac_c" 1>&6
14601 echo "configure:14602: checking for LinuxThreads consistency" >&5
14602 if eval "test \"\${ol_cv_linux_threads+set}\" = set"; then
14603   echo $ac_n "(cached) $ac_c" 1>&6
14604 else
14605   
14606                 if test $ol_cv_header_linux_threads = yes -a \
14607                         $ol_cv_sys_linux_threads = yes; then
14608                         ol_cv_linux_threads=yes
14609                 elif test $ol_cv_header_linux_threads = no -a \
14610                         $ol_cv_sys_linux_threads = no; then
14611                         ol_cv_linux_threads=no
14612                 else
14613                         ol_cv_linux_threads=error
14614                 fi
14615         
14616 fi
14617
14618 echo "$ac_t""$ol_cv_linux_threads" 1>&6
14619
14620
14621                         if test $ol_cv_linux_threads = error; then
14622                                 { echo "configure: error: LinuxThreads header/library mismatch" 1>&2; exit 1; };
14623                         fi
14624
14625                         echo $ac_n "checking if pthread_create() works""... $ac_c" 1>&6
14626 echo "configure:14627: checking if pthread_create() works" >&5
14627 if eval "test \"\${ol_cv_pthread_create_works+set}\" = set"; then
14628   echo $ac_n "(cached) $ac_c" 1>&6
14629 else
14630   
14631                         if test "$cross_compiling" = yes; then
14632                                 ol_cv_pthread_create_works=yes
14633 else
14634   cat > conftest.$ac_ext <<EOF
14635 #line 14636 "configure"
14636 #include "confdefs.h"
14637 /* pthread test headers */
14638 #include <pthread.h>
14639 #if HAVE_PTHREADS < 7
14640 #include <errno.h>
14641 #endif
14642 #ifndef NULL
14643 #define NULL (void*)0
14644 #endif
14645
14646 static void *task(p)
14647         void *p;
14648 {
14649         return (void *) (p == NULL);
14650 }
14651
14652
14653 int main(argc, argv)
14654         int argc;
14655         char **argv;
14656 {
14657
14658         /* pthread test function */
14659 #ifndef PTHREAD_CREATE_DETACHED
14660 #define PTHREAD_CREATE_DETACHED 1
14661 #endif
14662         pthread_t t;
14663         int status;
14664         int detach = PTHREAD_CREATE_DETACHED;
14665
14666 #if HAVE_PTHREADS > 4
14667         /* Final pthreads */
14668         pthread_attr_t attr;
14669
14670         status = pthread_attr_init(&attr);
14671         if( status ) return status;
14672
14673 #if HAVE_PTHREADS < 7
14674         status = pthread_attr_setdetachstate(&attr, &detach);
14675         if( status < 0 ) status = errno;
14676 #else
14677         status = pthread_attr_setdetachstate(&attr, detach);
14678 #endif
14679         if( status ) return status;
14680         status = pthread_create( &t, &attr, task, NULL );
14681 #if HAVE_PTHREADS < 7
14682         if( status < 0 ) status = errno;
14683 #endif
14684         if( status ) return status;
14685 #else
14686         /* Draft 4 pthreads */
14687         status = pthread_create( &t, pthread_attr_default, task, NULL );
14688         if( status ) return errno;
14689
14690         /* give thread a chance to complete */
14691         /* it should remain joinable and hence detachable */
14692         sleep( 1 );
14693
14694         status = pthread_detach( &t );
14695         if( status ) return errno;
14696 #endif
14697
14698 #ifdef HAVE_LINUX_THREADS
14699         pthread_kill_other_threads_np();
14700 #endif
14701
14702         return 0;
14703
14704 }
14705
14706 EOF
14707 if { (eval echo configure:14708: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14708 then
14709   ol_cv_pthread_create_works=yes
14710 else
14711   echo "configure: failed program was:" >&5
14712   cat conftest.$ac_ext >&5
14713   rm -fr conftest*
14714   ol_cv_pthread_create_works=no
14715 fi
14716 rm -fr conftest*
14717 fi
14718
14719 fi
14720
14721 echo "$ac_t""$ol_cv_pthread_create_works" 1>&6
14722
14723                         if test $ol_cv_pthread_create_works = no ; then
14724                                 { echo "configure: error: pthread_create is not usable, check environment settings" 1>&2; exit 1; }
14725                         fi
14726
14727                                                 if test $ol_with_yielding_select = auto ; then
14728                                 echo $ac_n "checking if select yields when using pthreads""... $ac_c" 1>&6
14729 echo "configure:14730: checking if select yields when using pthreads" >&5
14730 if eval "test \"\${ol_cv_pthread_select_yields+set}\" = set"; then
14731   echo $ac_n "(cached) $ac_c" 1>&6
14732 else
14733   
14734                                 if test "$cross_compiling" = yes; then
14735   ol_cv_pthread_select_yields=cross
14736 else
14737   cat > conftest.$ac_ext <<EOF
14738 #line 14739 "configure"
14739 #include "confdefs.h"
14740
14741 #include <sys/types.h>
14742 #include <sys/time.h>
14743 #include <unistd.h>
14744 #include <pthread.h>
14745 #ifndef NULL
14746 #define NULL (void*) 0
14747 #endif
14748
14749 static int fildes[2];
14750
14751 static void *task(p)
14752         void *p;
14753 {
14754         int i;
14755         struct timeval tv;
14756
14757         fd_set rfds;
14758
14759         tv.tv_sec=10;
14760         tv.tv_usec=0;
14761
14762         FD_ZERO(&rfds);
14763         FD_SET(fildes[0], &rfds);
14764
14765         /* we're not interested in any fds */
14766         i = select(FD_SETSIZE, &rfds, NULL, NULL, &tv);
14767
14768         if(i < 0) {
14769                 perror("select");
14770                 exit(10);
14771         }
14772
14773         exit(0); /* if we exit here, the select blocked the whole process */
14774 }
14775
14776 int main(argc, argv)
14777         int argc;
14778         char **argv;
14779 {
14780         pthread_t t;
14781
14782         /* create a pipe to select */
14783         if(pipe(&fildes[0])) {
14784                 perror("select");
14785                 exit(1);
14786         }
14787
14788 #ifdef HAVE_PTHREAD_SETCONCURRENCY
14789         (void) pthread_setconcurrency(2);
14790 #else
14791 #ifdef HAVE_THR_SETCONCURRENCY
14792         /* Set Solaris LWP concurrency to 2 */
14793         thr_setconcurrency(2);
14794 #endif
14795 #endif
14796
14797 #if HAVE_PTHREADS < 6
14798         pthread_create(&t, pthread_attr_default, task, NULL);
14799 #else
14800         pthread_create(&t, NULL, task, NULL);
14801 #endif
14802
14803         /* make sure task runs first */
14804 #if HAVE_THR_YIELD
14805         thr_yield();
14806 #elif defined( HAVE_SCHED_YIELD )
14807         sched_yield();
14808 #elif defined( HAVE_PTHREAD_YIELD )
14809         pthread_yield();
14810 #endif
14811
14812         exit(2);
14813 }
14814 EOF
14815 if { (eval echo configure:14816: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14816 then
14817   ol_cv_pthread_select_yields=no
14818 else
14819   echo "configure: failed program was:" >&5
14820   cat conftest.$ac_ext >&5
14821   rm -fr conftest*
14822   ol_cv_pthread_select_yields=yes
14823 fi
14824 rm -fr conftest*
14825 fi
14826
14827 fi
14828
14829 echo "$ac_t""$ol_cv_pthread_select_yields" 1>&6
14830
14831                                 if test $ol_cv_pthread_select_yields = cross ; then
14832                                         { echo "configure: error: crossing compiling: use --with-yielding_select=yes|no|manual" 1>&2; exit 1; }
14833                                 fi
14834
14835                                 if test $ol_cv_pthread_select_yields = yes ; then
14836                                         ol_with_yielding_select=yes
14837                                 fi
14838                         fi
14839
14840                                                 CPPFLAGS="$save_CPPFLAGS"
14841                         LIBS="$save_LIBS"
14842                 else
14843                         { echo "configure: error: could not locate usable POSIX Threads" 1>&2; exit 1; }
14844                 fi
14845         fi
14846
14847         if test $ol_with_threads = posix ; then
14848                 { echo "configure: error: could not locate POSIX Threads" 1>&2; exit 1; }
14849         fi
14850 fi
14851
14852 if test $ol_with_threads = auto -o $ol_with_threads = yes \
14853         -o $ol_with_threads = mach ; then
14854
14855                 for ac_hdr in mach/cthreads.h cthreads.h
14856 do
14857 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
14858 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
14859 echo "configure:14860: checking for $ac_hdr" >&5
14860 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
14861   echo $ac_n "(cached) $ac_c" 1>&6
14862 else
14863   cat > conftest.$ac_ext <<EOF
14864 #line 14865 "configure"
14865 #include "confdefs.h"
14866 #include <$ac_hdr>
14867 EOF
14868 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
14869 { (eval echo configure:14870: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
14870 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
14871 if test -z "$ac_err"; then
14872   rm -rf conftest*
14873   eval "ac_cv_header_$ac_safe=yes"
14874 else
14875   echo "$ac_err" >&5
14876   echo "configure: failed program was:" >&5
14877   cat conftest.$ac_ext >&5
14878   rm -rf conftest*
14879   eval "ac_cv_header_$ac_safe=no"
14880 fi
14881 rm -f conftest*
14882 fi
14883 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
14884   echo "$ac_t""yes" 1>&6
14885     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
14886   cat >> confdefs.h <<EOF
14887 #define $ac_tr_hdr 1
14888 EOF
14889  
14890 else
14891   echo "$ac_t""no" 1>&6
14892 fi
14893 done
14894
14895         if test $ac_cv_header_mach_cthreads_h = yes ; then
14896                 ol_with_threads=found
14897
14898                                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
14899 echo "configure:14900: checking for cthread_fork" >&5
14900 if eval "test \"\${ac_cv_func_cthread_fork+set}\" = set"; then
14901   echo $ac_n "(cached) $ac_c" 1>&6
14902 else
14903   cat > conftest.$ac_ext <<EOF
14904 #line 14905 "configure"
14905 #include "confdefs.h"
14906 /* System header to define __stub macros and hopefully few prototypes,
14907     which can conflict with char cthread_fork(); below.  */
14908 #include <assert.h>
14909 /* Override any gcc2 internal prototype to avoid an error.  */
14910 /* We use char because int might match the return type of a gcc2
14911     builtin and then its argument prototype would still apply.  */
14912 char cthread_fork();
14913 char (*f)();
14914
14915 int main() {
14916
14917 /* The GNU C library defines this for functions which it implements
14918     to always fail with ENOSYS.  Some functions are actually named
14919     something starting with __ and the normal name is an alias.  */
14920 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
14921 choke me
14922 #else
14923 f = cthread_fork;
14924 #endif
14925
14926 ; return 0; }
14927 EOF
14928 if { (eval echo configure:14929: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14929   rm -rf conftest*
14930   eval "ac_cv_func_cthread_fork=yes"
14931 else
14932   echo "configure: failed program was:" >&5
14933   cat conftest.$ac_ext >&5
14934   rm -rf conftest*
14935   eval "ac_cv_func_cthread_fork=no"
14936 fi
14937 rm -f conftest*
14938 fi
14939
14940 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
14941   echo "$ac_t""yes" 1>&6
14942   ol_link_threads=yes
14943 else
14944   echo "$ac_t""no" 1>&6
14945 fi
14946
14947
14948                 if test $ol_link_threads = no ; then
14949                                                                         echo $ac_n "checking for cthread_fork with -all_load""... $ac_c" 1>&6
14950 echo "configure:14951: checking for cthread_fork with -all_load" >&5
14951 if eval "test \"\${ol_cv_cthread_all_load+set}\" = set"; then
14952   echo $ac_n "(cached) $ac_c" 1>&6
14953 else
14954   
14955                                                                 save_LIBS="$LIBS"
14956                                 LIBS="-all_load $LIBS"
14957                                 cat > conftest.$ac_ext <<EOF
14958 #line 14959 "configure"
14959 #include "confdefs.h"
14960 #include <mach/cthreads.h>
14961 int main() {
14962
14963                                         cthread_fork((void *)0, (void *)0);
14964                                         
14965 ; return 0; }
14966 EOF
14967 if { (eval echo configure:14968: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14968   rm -rf conftest*
14969   ol_cv_cthread_all_load=yes
14970 else
14971   echo "configure: failed program was:" >&5
14972   cat conftest.$ac_ext >&5
14973   rm -rf conftest*
14974   ol_cv_cthread_all_load=no
14975 fi
14976 rm -f conftest*
14977                                                                 LIBS="$save_LIBS"
14978                         
14979 fi
14980
14981 echo "$ac_t""$ol_cv_cthread_all_load" 1>&6
14982
14983                         if test $ol_cv_cthread_all_load = yes ; then
14984                                 LTHREAD_LIBS="$LTHREAD_LIBS -all_load"
14985                                 ol_link_threads=mach
14986                                 ol_with_threads=found
14987                         fi
14988                 fi
14989
14990         elif test $ac_cv_header_cthreads_h = yes ; then
14991                                 
14992                 ol_with_threads=found
14993  
14994                                 save_LIBS="$LIBS"
14995                 LIBS="$LIBS -lthreads"
14996                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
14997 echo "configure:14998: checking for cthread_fork" >&5
14998 if eval "test \"\${ac_cv_func_cthread_fork+set}\" = set"; then
14999   echo $ac_n "(cached) $ac_c" 1>&6
15000 else
15001   cat > conftest.$ac_ext <<EOF
15002 #line 15003 "configure"
15003 #include "confdefs.h"
15004 /* System header to define __stub macros and hopefully few prototypes,
15005     which can conflict with char cthread_fork(); below.  */
15006 #include <assert.h>
15007 /* Override any gcc2 internal prototype to avoid an error.  */
15008 /* We use char because int might match the return type of a gcc2
15009     builtin and then its argument prototype would still apply.  */
15010 char cthread_fork();
15011 char (*f)();
15012
15013 int main() {
15014
15015 /* The GNU C library defines this for functions which it implements
15016     to always fail with ENOSYS.  Some functions are actually named
15017     something starting with __ and the normal name is an alias.  */
15018 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
15019 choke me
15020 #else
15021 f = cthread_fork;
15022 #endif
15023
15024 ; return 0; }
15025 EOF
15026 if { (eval echo configure:15027: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15027   rm -rf conftest*
15028   eval "ac_cv_func_cthread_fork=yes"
15029 else
15030   echo "configure: failed program was:" >&5
15031   cat conftest.$ac_ext >&5
15032   rm -rf conftest*
15033   eval "ac_cv_func_cthread_fork=no"
15034 fi
15035 rm -f conftest*
15036 fi
15037
15038 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
15039   echo "$ac_t""yes" 1>&6
15040   ol_link_threads=yes
15041 else
15042   echo "$ac_t""no" 1>&6
15043 fi
15044
15045                 LIBS="$save_LIBS"
15046
15047                 if test $ol_link_threads = yes ; then
15048                         LTHREAD_LIBS="-lthreads"
15049                         ol_link_threads=mach
15050                         ol_with_threads=found
15051                 else
15052                         { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
15053                 fi
15054
15055         elif test $ol_with_threads = mach ; then
15056                 { echo "configure: error: could not locate Mach CThreads" 1>&2; exit 1; }
15057         fi
15058
15059         if test $ol_link_threads = mach ; then
15060                 cat >> confdefs.h <<\EOF
15061 #define HAVE_MACH_CTHREADS 1
15062 EOF
15063
15064         elif test $ol_with_threads = found ; then
15065                 { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
15066         fi
15067 fi
15068
15069 if test $ol_with_threads = auto -o $ol_with_threads = yes \
15070         -o $ol_with_threads = pth ; then
15071
15072         for ac_hdr in pth.h
15073 do
15074 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15075 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15076 echo "configure:15077: checking for $ac_hdr" >&5
15077 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15078   echo $ac_n "(cached) $ac_c" 1>&6
15079 else
15080   cat > conftest.$ac_ext <<EOF
15081 #line 15082 "configure"
15082 #include "confdefs.h"
15083 #include <$ac_hdr>
15084 EOF
15085 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15086 { (eval echo configure:15087: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15087 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15088 if test -z "$ac_err"; then
15089   rm -rf conftest*
15090   eval "ac_cv_header_$ac_safe=yes"
15091 else
15092   echo "$ac_err" >&5
15093   echo "configure: failed program was:" >&5
15094   cat conftest.$ac_ext >&5
15095   rm -rf conftest*
15096   eval "ac_cv_header_$ac_safe=no"
15097 fi
15098 rm -f conftest*
15099 fi
15100 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15101   echo "$ac_t""yes" 1>&6
15102     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15103   cat >> confdefs.h <<EOF
15104 #define $ac_tr_hdr 1
15105 EOF
15106  
15107 else
15108   echo "$ac_t""no" 1>&6
15109 fi
15110 done
15111
15112
15113         if test $ac_cv_header_pth_h = yes ; then
15114                 echo $ac_n "checking for pth_version in -lpth""... $ac_c" 1>&6
15115 echo "configure:15116: checking for pth_version in -lpth" >&5
15116 ac_lib_var=`echo pth'_'pth_version | sed 'y%./+-:%__p__%'`
15117 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
15118   echo $ac_n "(cached) $ac_c" 1>&6
15119 else
15120   ac_save_LIBS="$LIBS"
15121 LIBS="-lpth  $LIBS"
15122 cat > conftest.$ac_ext <<EOF
15123 #line 15124 "configure"
15124 #include "confdefs.h"
15125 /* Override any gcc2 internal prototype to avoid an error.  */
15126 /* We use char because int might match the return type of a gcc2
15127     builtin and then its argument prototype would still apply.  */
15128 char pth_version();
15129
15130 int main() {
15131 pth_version()
15132 ; return 0; }
15133 EOF
15134 if { (eval echo configure:15135: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15135   rm -rf conftest*
15136   eval "ac_cv_lib_$ac_lib_var=yes"
15137 else
15138   echo "configure: failed program was:" >&5
15139   cat conftest.$ac_ext >&5
15140   rm -rf conftest*
15141   eval "ac_cv_lib_$ac_lib_var=no"
15142 fi
15143 rm -f conftest*
15144 LIBS="$ac_save_LIBS"
15145
15146 fi
15147 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
15148   echo "$ac_t""yes" 1>&6
15149   have_pth=yes
15150 else
15151   echo "$ac_t""no" 1>&6
15152 have_pth=no
15153 fi
15154
15155
15156                 if test $have_pth = yes ; then
15157                         cat >> confdefs.h <<\EOF
15158 #define HAVE_GNU_PTH 1
15159 EOF
15160
15161                         LTHREAD_LIBS="$LTHREAD_LIBS -lpth"
15162                         ol_link_threads=pth
15163                         ol_with_threads=found
15164
15165                         if test $ol_with_yielding_select = auto ; then
15166                                 ol_with_yielding_select=yes
15167                         fi
15168                 fi
15169         fi
15170 fi
15171
15172 if test $ol_with_threads = auto -o $ol_with_threads = yes \
15173         -o $ol_with_threads = lwp ; then
15174
15175                 for ac_hdr in thread.h synch.h
15176 do
15177 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15178 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15179 echo "configure:15180: checking for $ac_hdr" >&5
15180 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15181   echo $ac_n "(cached) $ac_c" 1>&6
15182 else
15183   cat > conftest.$ac_ext <<EOF
15184 #line 15185 "configure"
15185 #include "confdefs.h"
15186 #include <$ac_hdr>
15187 EOF
15188 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15189 { (eval echo configure:15190: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15190 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15191 if test -z "$ac_err"; then
15192   rm -rf conftest*
15193   eval "ac_cv_header_$ac_safe=yes"
15194 else
15195   echo "$ac_err" >&5
15196   echo "configure: failed program was:" >&5
15197   cat conftest.$ac_ext >&5
15198   rm -rf conftest*
15199   eval "ac_cv_header_$ac_safe=no"
15200 fi
15201 rm -f conftest*
15202 fi
15203 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15204   echo "$ac_t""yes" 1>&6
15205     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15206   cat >> confdefs.h <<EOF
15207 #define $ac_tr_hdr 1
15208 EOF
15209  
15210 else
15211   echo "$ac_t""no" 1>&6
15212 fi
15213 done
15214
15215         if test $ac_cv_header_thread_h = yes -a $ac_cv_header_synch_h = yes ; then
15216                 echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6
15217 echo "configure:15218: checking for thr_create in -lthread" >&5
15218 ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-:%__p__%'`
15219 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
15220   echo $ac_n "(cached) $ac_c" 1>&6
15221 else
15222   ac_save_LIBS="$LIBS"
15223 LIBS="-lthread  $LIBS"
15224 cat > conftest.$ac_ext <<EOF
15225 #line 15226 "configure"
15226 #include "confdefs.h"
15227 /* Override any gcc2 internal prototype to avoid an error.  */
15228 /* We use char because int might match the return type of a gcc2
15229     builtin and then its argument prototype would still apply.  */
15230 char thr_create();
15231
15232 int main() {
15233 thr_create()
15234 ; return 0; }
15235 EOF
15236 if { (eval echo configure:15237: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15237   rm -rf conftest*
15238   eval "ac_cv_lib_$ac_lib_var=yes"
15239 else
15240   echo "configure: failed program was:" >&5
15241   cat conftest.$ac_ext >&5
15242   rm -rf conftest*
15243   eval "ac_cv_lib_$ac_lib_var=no"
15244 fi
15245 rm -f conftest*
15246 LIBS="$ac_save_LIBS"
15247
15248 fi
15249 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
15250   echo "$ac_t""yes" 1>&6
15251   have_thr=yes
15252 else
15253   echo "$ac_t""no" 1>&6
15254 have_thr=no
15255 fi
15256
15257
15258                 if test $have_thr = yes ; then
15259                         cat >> confdefs.h <<\EOF
15260 #define HAVE_THR 1
15261 EOF
15262
15263                         LTHREAD_LIBS="$LTHREAD_LIBS -lthread"
15264                         ol_link_threads=thr
15265
15266                         if test $ol_with_yielding_select = auto ; then
15267                                 ol_with_yielding_select=yes
15268                         fi
15269
15270                                                 for ac_func in \
15271                                 thr_setconcurrency \
15272                                 thr_getconcurrency \
15273                         
15274 do
15275 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15276 echo "configure:15277: checking for $ac_func" >&5
15277 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15278   echo $ac_n "(cached) $ac_c" 1>&6
15279 else
15280   cat > conftest.$ac_ext <<EOF
15281 #line 15282 "configure"
15282 #include "confdefs.h"
15283 /* System header to define __stub macros and hopefully few prototypes,
15284     which can conflict with char $ac_func(); below.  */
15285 #include <assert.h>
15286 /* Override any gcc2 internal prototype to avoid an error.  */
15287 /* We use char because int might match the return type of a gcc2
15288     builtin and then its argument prototype would still apply.  */
15289 char $ac_func();
15290 char (*f)();
15291
15292 int main() {
15293
15294 /* The GNU C library defines this for functions which it implements
15295     to always fail with ENOSYS.  Some functions are actually named
15296     something starting with __ and the normal name is an alias.  */
15297 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15298 choke me
15299 #else
15300 f = $ac_func;
15301 #endif
15302
15303 ; return 0; }
15304 EOF
15305 if { (eval echo configure:15306: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15306   rm -rf conftest*
15307   eval "ac_cv_func_$ac_func=yes"
15308 else
15309   echo "configure: failed program was:" >&5
15310   cat conftest.$ac_ext >&5
15311   rm -rf conftest*
15312   eval "ac_cv_func_$ac_func=no"
15313 fi
15314 rm -f conftest*
15315 fi
15316
15317 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15318   echo "$ac_t""yes" 1>&6
15319     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15320   cat >> confdefs.h <<EOF
15321 #define $ac_tr_func 1
15322 EOF
15323  
15324 else
15325   echo "$ac_t""no" 1>&6
15326 fi
15327 done
15328
15329                 fi
15330         fi
15331
15332                 for ac_hdr in lwp/lwp.h
15333 do
15334 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15335 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15336 echo "configure:15337: checking for $ac_hdr" >&5
15337 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15338   echo $ac_n "(cached) $ac_c" 1>&6
15339 else
15340   cat > conftest.$ac_ext <<EOF
15341 #line 15342 "configure"
15342 #include "confdefs.h"
15343 #include <$ac_hdr>
15344 EOF
15345 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15346 { (eval echo configure:15347: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15347 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15348 if test -z "$ac_err"; then
15349   rm -rf conftest*
15350   eval "ac_cv_header_$ac_safe=yes"
15351 else
15352   echo "$ac_err" >&5
15353   echo "configure: failed program was:" >&5
15354   cat conftest.$ac_ext >&5
15355   rm -rf conftest*
15356   eval "ac_cv_header_$ac_safe=no"
15357 fi
15358 rm -f conftest*
15359 fi
15360 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15361   echo "$ac_t""yes" 1>&6
15362     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15363   cat >> confdefs.h <<EOF
15364 #define $ac_tr_hdr 1
15365 EOF
15366  
15367 else
15368   echo "$ac_t""no" 1>&6
15369 fi
15370 done
15371
15372         if test $ac_cv_header_lwp_lwp_h = yes ; then
15373                 echo $ac_n "checking for lwp_create in -llwp""... $ac_c" 1>&6
15374 echo "configure:15375: checking for lwp_create in -llwp" >&5
15375 ac_lib_var=`echo lwp'_'lwp_create | sed 'y%./+-:%__p__%'`
15376 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
15377   echo $ac_n "(cached) $ac_c" 1>&6
15378 else
15379   ac_save_LIBS="$LIBS"
15380 LIBS="-llwp  $LIBS"
15381 cat > conftest.$ac_ext <<EOF
15382 #line 15383 "configure"
15383 #include "confdefs.h"
15384 /* Override any gcc2 internal prototype to avoid an error.  */
15385 /* We use char because int might match the return type of a gcc2
15386     builtin and then its argument prototype would still apply.  */
15387 char lwp_create();
15388
15389 int main() {
15390 lwp_create()
15391 ; return 0; }
15392 EOF
15393 if { (eval echo configure:15394: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15394   rm -rf conftest*
15395   eval "ac_cv_lib_$ac_lib_var=yes"
15396 else
15397   echo "configure: failed program was:" >&5
15398   cat conftest.$ac_ext >&5
15399   rm -rf conftest*
15400   eval "ac_cv_lib_$ac_lib_var=no"
15401 fi
15402 rm -f conftest*
15403 LIBS="$ac_save_LIBS"
15404
15405 fi
15406 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
15407   echo "$ac_t""yes" 1>&6
15408   have_lwp=yes
15409 else
15410   echo "$ac_t""no" 1>&6
15411 have_lwp=no
15412 fi
15413
15414
15415                 if test $have_lwp = yes ; then
15416                         cat >> confdefs.h <<\EOF
15417 #define HAVE_LWP 1
15418 EOF
15419
15420                         LTHREAD_LIBS="$LTHREAD_LIBS -llwp"
15421                         ol_link_threads=lwp
15422
15423                         if test $ol_with_yielding_select = auto ; then
15424                                 ol_with_yielding_select=no
15425                         fi
15426                 fi
15427         fi
15428 fi
15429
15430 if test $ol_with_yielding_select = yes ; then
15431         cat >> confdefs.h <<\EOF
15432 #define HAVE_YIELDING_SELECT 1
15433 EOF
15434
15435 fi
15436
15437 if test $ol_with_threads = manual ; then
15438                 ol_link_threads=yes
15439
15440         echo "configure: warning: thread defines and link options must be set manually" 1>&2
15441
15442         for ac_hdr in pthread.h sched.h
15443 do
15444 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15445 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15446 echo "configure:15447: checking for $ac_hdr" >&5
15447 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15448   echo $ac_n "(cached) $ac_c" 1>&6
15449 else
15450   cat > conftest.$ac_ext <<EOF
15451 #line 15452 "configure"
15452 #include "confdefs.h"
15453 #include <$ac_hdr>
15454 EOF
15455 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15456 { (eval echo configure:15457: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15457 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15458 if test -z "$ac_err"; then
15459   rm -rf conftest*
15460   eval "ac_cv_header_$ac_safe=yes"
15461 else
15462   echo "$ac_err" >&5
15463   echo "configure: failed program was:" >&5
15464   cat conftest.$ac_ext >&5
15465   rm -rf conftest*
15466   eval "ac_cv_header_$ac_safe=no"
15467 fi
15468 rm -f conftest*
15469 fi
15470 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15471   echo "$ac_t""yes" 1>&6
15472     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15473   cat >> confdefs.h <<EOF
15474 #define $ac_tr_hdr 1
15475 EOF
15476  
15477 else
15478   echo "$ac_t""no" 1>&6
15479 fi
15480 done
15481
15482         for ac_func in sched_yield pthread_yield
15483 do
15484 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15485 echo "configure:15486: checking for $ac_func" >&5
15486 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15487   echo $ac_n "(cached) $ac_c" 1>&6
15488 else
15489   cat > conftest.$ac_ext <<EOF
15490 #line 15491 "configure"
15491 #include "confdefs.h"
15492 /* System header to define __stub macros and hopefully few prototypes,
15493     which can conflict with char $ac_func(); below.  */
15494 #include <assert.h>
15495 /* Override any gcc2 internal prototype to avoid an error.  */
15496 /* We use char because int might match the return type of a gcc2
15497     builtin and then its argument prototype would still apply.  */
15498 char $ac_func();
15499 char (*f)();
15500
15501 int main() {
15502
15503 /* The GNU C library defines this for functions which it implements
15504     to always fail with ENOSYS.  Some functions are actually named
15505     something starting with __ and the normal name is an alias.  */
15506 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15507 choke me
15508 #else
15509 f = $ac_func;
15510 #endif
15511
15512 ; return 0; }
15513 EOF
15514 if { (eval echo configure:15515: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15515   rm -rf conftest*
15516   eval "ac_cv_func_$ac_func=yes"
15517 else
15518   echo "configure: failed program was:" >&5
15519   cat conftest.$ac_ext >&5
15520   rm -rf conftest*
15521   eval "ac_cv_func_$ac_func=no"
15522 fi
15523 rm -f conftest*
15524 fi
15525
15526 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15527   echo "$ac_t""yes" 1>&6
15528     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15529   cat >> confdefs.h <<EOF
15530 #define $ac_tr_func 1
15531 EOF
15532  
15533 else
15534   echo "$ac_t""no" 1>&6
15535 fi
15536 done
15537
15538         
15539         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
15540 echo "configure:15541: checking for LinuxThreads pthread.h" >&5
15541 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
15542   echo $ac_n "(cached) $ac_c" 1>&6
15543 else
15544   cat > conftest.$ac_ext <<EOF
15545 #line 15546 "configure"
15546 #include "confdefs.h"
15547 #include <pthread.h>
15548 EOF
15549 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15550   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
15551   rm -rf conftest*
15552   ol_cv_header_linux_threads=yes
15553 else
15554   rm -rf conftest*
15555   ol_cv_header_linux_threads=no
15556 fi
15557 rm -f conftest*
15558
15559                 
15560 fi
15561
15562 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
15563         if test $ol_cv_header_linux_threads = yes; then
15564                 cat >> confdefs.h <<\EOF
15565 #define HAVE_LINUX_THREADS 1
15566 EOF
15567
15568         fi
15569
15570
15571         for ac_hdr in mach/cthreads.h
15572 do
15573 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15574 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15575 echo "configure:15576: checking for $ac_hdr" >&5
15576 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15577   echo $ac_n "(cached) $ac_c" 1>&6
15578 else
15579   cat > conftest.$ac_ext <<EOF
15580 #line 15581 "configure"
15581 #include "confdefs.h"
15582 #include <$ac_hdr>
15583 EOF
15584 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15585 { (eval echo configure:15586: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15586 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15587 if test -z "$ac_err"; then
15588   rm -rf conftest*
15589   eval "ac_cv_header_$ac_safe=yes"
15590 else
15591   echo "$ac_err" >&5
15592   echo "configure: failed program was:" >&5
15593   cat conftest.$ac_ext >&5
15594   rm -rf conftest*
15595   eval "ac_cv_header_$ac_safe=no"
15596 fi
15597 rm -f conftest*
15598 fi
15599 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15600   echo "$ac_t""yes" 1>&6
15601     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15602   cat >> confdefs.h <<EOF
15603 #define $ac_tr_hdr 1
15604 EOF
15605  
15606 else
15607   echo "$ac_t""no" 1>&6
15608 fi
15609 done
15610
15611         for ac_hdr in lwp/lwp.h
15612 do
15613 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15614 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15615 echo "configure:15616: checking for $ac_hdr" >&5
15616 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15617   echo $ac_n "(cached) $ac_c" 1>&6
15618 else
15619   cat > conftest.$ac_ext <<EOF
15620 #line 15621 "configure"
15621 #include "confdefs.h"
15622 #include <$ac_hdr>
15623 EOF
15624 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15625 { (eval echo configure:15626: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15626 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15627 if test -z "$ac_err"; then
15628   rm -rf conftest*
15629   eval "ac_cv_header_$ac_safe=yes"
15630 else
15631   echo "$ac_err" >&5
15632   echo "configure: failed program was:" >&5
15633   cat conftest.$ac_ext >&5
15634   rm -rf conftest*
15635   eval "ac_cv_header_$ac_safe=no"
15636 fi
15637 rm -f conftest*
15638 fi
15639 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15640   echo "$ac_t""yes" 1>&6
15641     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15642   cat >> confdefs.h <<EOF
15643 #define $ac_tr_hdr 1
15644 EOF
15645  
15646 else
15647   echo "$ac_t""no" 1>&6
15648 fi
15649 done
15650
15651         for ac_hdr in thread.h synch.h
15652 do
15653 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15654 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15655 echo "configure:15656: checking for $ac_hdr" >&5
15656 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15657   echo $ac_n "(cached) $ac_c" 1>&6
15658 else
15659   cat > conftest.$ac_ext <<EOF
15660 #line 15661 "configure"
15661 #include "confdefs.h"
15662 #include <$ac_hdr>
15663 EOF
15664 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15665 { (eval echo configure:15666: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15666 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15667 if test -z "$ac_err"; then
15668   rm -rf conftest*
15669   eval "ac_cv_header_$ac_safe=yes"
15670 else
15671   echo "$ac_err" >&5
15672   echo "configure: failed program was:" >&5
15673   cat conftest.$ac_ext >&5
15674   rm -rf conftest*
15675   eval "ac_cv_header_$ac_safe=no"
15676 fi
15677 rm -f conftest*
15678 fi
15679 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15680   echo "$ac_t""yes" 1>&6
15681     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15682   cat >> confdefs.h <<EOF
15683 #define $ac_tr_hdr 1
15684 EOF
15685  
15686 else
15687   echo "$ac_t""no" 1>&6
15688 fi
15689 done
15690
15691 fi
15692
15693 if test $ol_link_threads != no -a $ol_link_threads != nt ; then  
15694                         cat >> confdefs.h <<\EOF
15695 #define REENTRANT 1
15696 EOF
15697
15698         cat >> confdefs.h <<\EOF
15699 #define _REENTRANT 1
15700 EOF
15701
15702         cat >> confdefs.h <<\EOF
15703 #define THREAD_SAFE 1
15704 EOF
15705
15706         cat >> confdefs.h <<\EOF
15707 #define _THREAD_SAFE 1
15708 EOF
15709
15710         cat >> confdefs.h <<\EOF
15711 #define THREADSAFE 1
15712 EOF
15713
15714         cat >> confdefs.h <<\EOF
15715 #define _THREADSAFE 1
15716 EOF
15717
15718         cat >> confdefs.h <<\EOF
15719 #define _SGI_MP_SOURCE 1
15720 EOF
15721
15722
15723                         echo $ac_n "checking for thread specific errno""... $ac_c" 1>&6
15724 echo "configure:15725: checking for thread specific errno" >&5
15725 if eval "test \"\${ol_cv_errno_thread_specific+set}\" = set"; then
15726   echo $ac_n "(cached) $ac_c" 1>&6
15727 else
15728   
15729                 cat > conftest.$ac_ext <<EOF
15730 #line 15731 "configure"
15731 #include "confdefs.h"
15732 #include <errno.h>
15733 int main() {
15734 errno = 0;
15735 ; return 0; }
15736 EOF
15737 if { (eval echo configure:15738: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15738   rm -rf conftest*
15739   ol_cv_errno_thread_specific=yes
15740 else
15741   echo "configure: failed program was:" >&5
15742   cat conftest.$ac_ext >&5
15743   rm -rf conftest*
15744   ol_cv_errno_thread_specific=no
15745 fi
15746 rm -f conftest*
15747         
15748 fi
15749
15750 echo "$ac_t""$ol_cv_errno_thread_specific" 1>&6
15751
15752                         echo $ac_n "checking for thread specific h_errno""... $ac_c" 1>&6
15753 echo "configure:15754: checking for thread specific h_errno" >&5
15754 if eval "test \"\${ol_cv_h_errno_thread_specific+set}\" = set"; then
15755   echo $ac_n "(cached) $ac_c" 1>&6
15756 else
15757   
15758                 cat > conftest.$ac_ext <<EOF
15759 #line 15760 "configure"
15760 #include "confdefs.h"
15761 #include <netdb.h>
15762 int main() {
15763 h_errno = 0;
15764 ; return 0; }
15765 EOF
15766 if { (eval echo configure:15767: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15767   rm -rf conftest*
15768   ol_cv_h_errno_thread_specific=yes
15769 else
15770   echo "configure: failed program was:" >&5
15771   cat conftest.$ac_ext >&5
15772   rm -rf conftest*
15773   ol_cv_h_errno_thread_specific=no
15774 fi
15775 rm -f conftest*
15776         
15777 fi
15778
15779 echo "$ac_t""$ol_cv_h_errno_thread_specific" 1>&6
15780
15781         if test $ol_cv_errno_thread_specific != yes \
15782                 -o $ol_cv_h_errno_thread_specific != yes ; then
15783                 LIBS="$LTHREAD_LIBS $LIBS"
15784                 LTHREAD_LIBS=""
15785         fi
15786
15787 fi  
15788
15789 if test $ol_link_threads = no ; then
15790         if test $ol_with_threads = yes ; then
15791                 { echo "configure: error: no suitable thread support" 1>&2; exit 1; }
15792         fi
15793
15794         if test $ol_with_threads = auto ; then
15795                 echo "configure: warning: no suitable thread support, disabling threads" 1>&2
15796                 ol_with_threads=no
15797         fi
15798
15799         cat >> confdefs.h <<\EOF
15800 #define NO_THREADS 1
15801 EOF
15802
15803         LTHREAD_LIBS=""
15804 fi
15805
15806 if test $ol_link_threads != no ; then
15807         cat >> confdefs.h <<\EOF
15808 #define LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE 1
15809 EOF
15810
15811 fi
15812
15813 for ac_func in \
15814         ctime_r                 \
15815         gethostbyname_r gethostbyaddr_r \
15816
15817 do
15818 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15819 echo "configure:15820: checking for $ac_func" >&5
15820 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15821   echo $ac_n "(cached) $ac_c" 1>&6
15822 else
15823   cat > conftest.$ac_ext <<EOF
15824 #line 15825 "configure"
15825 #include "confdefs.h"
15826 /* System header to define __stub macros and hopefully few prototypes,
15827     which can conflict with char $ac_func(); below.  */
15828 #include <assert.h>
15829 /* Override any gcc2 internal prototype to avoid an error.  */
15830 /* We use char because int might match the return type of a gcc2
15831     builtin and then its argument prototype would still apply.  */
15832 char $ac_func();
15833 char (*f)();
15834
15835 int main() {
15836
15837 /* The GNU C library defines this for functions which it implements
15838     to always fail with ENOSYS.  Some functions are actually named
15839     something starting with __ and the normal name is an alias.  */
15840 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15841 choke me
15842 #else
15843 f = $ac_func;
15844 #endif
15845
15846 ; return 0; }
15847 EOF
15848 if { (eval echo configure:15849: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15849   rm -rf conftest*
15850   eval "ac_cv_func_$ac_func=yes"
15851 else
15852   echo "configure: failed program was:" >&5
15853   cat conftest.$ac_ext >&5
15854   rm -rf conftest*
15855   eval "ac_cv_func_$ac_func=no"
15856 fi
15857 rm -f conftest*
15858 fi
15859
15860 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15861   echo "$ac_t""yes" 1>&6
15862     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15863   cat >> confdefs.h <<EOF
15864 #define $ac_tr_func 1
15865 EOF
15866  
15867 else
15868   echo "$ac_t""no" 1>&6
15869 fi
15870 done
15871
15872
15873 if test "$ac_cv_func_ctime_r" = no ; then
15874         ol_cv_func_ctime_r_nargs=0
15875 else
15876         echo $ac_n "checking number of arguments of ctime_r""... $ac_c" 1>&6
15877 echo "configure:15878: checking number of arguments of ctime_r" >&5
15878 if eval "test \"\${ol_cv_func_ctime_r_nargs+set}\" = set"; then
15879   echo $ac_n "(cached) $ac_c" 1>&6
15880 else
15881   cat > conftest.$ac_ext <<EOF
15882 #line 15883 "configure"
15883 #include "confdefs.h"
15884 #include <time.h>
15885 int main() {
15886 time_t ti; char *buffer; ctime_r(&ti,buffer,32);
15887 ; return 0; }
15888 EOF
15889 if { (eval echo configure:15890: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
15890   rm -rf conftest*
15891   ol_cv_func_ctime_r_nargs3=yes
15892 else
15893   echo "configure: failed program was:" >&5
15894   cat conftest.$ac_ext >&5
15895   rm -rf conftest*
15896   ol_cv_func_ctime_r_nargs3=no
15897 fi
15898 rm -f conftest*
15899
15900         cat > conftest.$ac_ext <<EOF
15901 #line 15902 "configure"
15902 #include "confdefs.h"
15903 #include <time.h>
15904 int main() {
15905 time_t ti; char *buffer; ctime_r(&ti,buffer);
15906 ; return 0; }
15907 EOF
15908 if { (eval echo configure:15909: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
15909   rm -rf conftest*
15910   ol_cv_func_ctime_r_nargs2=yes
15911 else
15912   echo "configure: failed program was:" >&5
15913   cat conftest.$ac_ext >&5
15914   rm -rf conftest*
15915   ol_cv_func_ctime_r_nargs2=no
15916 fi
15917 rm -f conftest*
15918
15919         if test $ol_cv_func_ctime_r_nargs3 = yes -a \
15920                 $ol_cv_func_ctime_r_nargs2 = no ; then
15921
15922                 ol_cv_func_ctime_r_nargs=3
15923
15924         elif test $ol_cv_func_ctime_r_nargs3 = no -a \
15925                 $ol_cv_func_ctime_r_nargs2 = yes ; then
15926
15927                 ol_cv_func_ctime_r_nargs=2
15928
15929         else
15930                 ol_cv_func_ctime_r_nargs=0
15931         fi
15932   
15933 fi
15934
15935 echo "$ac_t""$ol_cv_func_ctime_r_nargs" 1>&6
15936
15937   if test $ol_cv_func_ctime_r_nargs -gt 1 ; then
15938         cat >> confdefs.h <<EOF
15939 #define CTIME_R_NARGS $ol_cv_func_ctime_r_nargs
15940 EOF
15941
15942   fi
15943
15944 fi
15945
15946 if test "$ac_cv_func_gethostbyname_r" = yes ; then
15947         echo $ac_n "checking number of arguments of gethostbyname_r""... $ac_c" 1>&6
15948 echo "configure:15949: checking number of arguments of gethostbyname_r" >&5
15949 if eval "test \"\${ol_cv_func_gethostbyname_r_nargs+set}\" = set"; then
15950   echo $ac_n "(cached) $ac_c" 1>&6
15951 else
15952   cat > conftest.$ac_ext <<EOF
15953 #line 15954 "configure"
15954 #include "confdefs.h"
15955 #include <sys/types.h>
15956 #include <sys/socket.h>
15957 #include <netinet/in.h>
15958 #include <netdb.h>
15959 #define BUFSIZE (sizeof(struct hostent)+10)
15960 int main() {
15961 struct hostent hent; char buffer[BUFSIZE];
15962                 int bufsize=BUFSIZE;int h_errno;
15963                 (void)gethostbyname_r("segovia.cs.purdue.edu", &hent,
15964                         buffer, bufsize, &h_errno);
15965 ; return 0; }
15966 EOF
15967 if { (eval echo configure:15968: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
15968   rm -rf conftest*
15969   ol_cv_func_gethostbyname_r_nargs5=yes
15970 else
15971   echo "configure: failed program was:" >&5
15972   cat conftest.$ac_ext >&5
15973   rm -rf conftest*
15974   ol_cv_func_gethostbyname_r_nargs5=no
15975 fi
15976 rm -f conftest*
15977
15978         cat > conftest.$ac_ext <<EOF
15979 #line 15980 "configure"
15980 #include "confdefs.h"
15981 #include <sys/types.h>
15982 #include <sys/socket.h>
15983 #include <netinet/in.h>
15984 #include <netdb.h>
15985 #define BUFSIZE (sizeof(struct hostent)+10)
15986 int main() {
15987 struct hostent hent;struct hostent *rhent;
15988                 char buffer[BUFSIZE];
15989                 int bufsize=BUFSIZE;int h_errno;
15990                 (void)gethostbyname_r("localhost", &hent, buffer, bufsize,
15991                         &rhent, &h_errno);
15992 ; return 0; }
15993 EOF
15994 if { (eval echo configure:15995: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
15995   rm -rf conftest*
15996   ol_cv_func_gethostbyname_r_nargs6=yes
15997 else
15998   echo "configure: failed program was:" >&5
15999   cat conftest.$ac_ext >&5
16000   rm -rf conftest*
16001   ol_cv_func_gethostbyname_r_nargs6=no
16002 fi
16003 rm -f conftest*
16004
16005         if test $ol_cv_func_gethostbyname_r_nargs5 = yes -a \
16006                 $ol_cv_func_gethostbyname_r_nargs6 = no ; then
16007
16008                 ol_cv_func_gethostbyname_r_nargs=5
16009
16010         elif test $ol_cv_func_gethostbyname_r_nargs5 = no -a \
16011                 $ol_cv_func_gethostbyname_r_nargs6 = yes ; then
16012
16013                 ol_cv_func_gethostbyname_r_nargs=6
16014
16015         else
16016                 ol_cv_func_gethostbyname_r_nargs=0
16017         fi
16018   
16019 fi
16020
16021 echo "$ac_t""$ol_cv_func_gethostbyname_r_nargs" 1>&6
16022   if test $ol_cv_func_gethostbyname_r_nargs -gt 1 ; then
16023         cat >> confdefs.h <<EOF
16024 #define GETHOSTBYNAME_R_NARGS $ol_cv_func_gethostbyname_r_nargs
16025 EOF
16026
16027   fi
16028
16029 else
16030         ol_cv_func_gethostbyname_r_nargs=0
16031 fi
16032  
16033 if test "$ac_cv_func_gethostbyaddr_r" = yes ; then
16034         echo $ac_n "checking number of arguments of gethostbyaddr_r""... $ac_c" 1>&6
16035 echo "configure:16036: checking number of arguments of gethostbyaddr_r" >&5
16036 if eval "test \"\${ol_cv_func_gethostbyaddr_r_nargs+set}\" = set"; then
16037   echo $ac_n "(cached) $ac_c" 1>&6
16038 else
16039   cat > conftest.$ac_ext <<EOF
16040 #line 16041 "configure"
16041 #include "confdefs.h"
16042 #include <sys/types.h>
16043 #include <sys/socket.h>
16044 #include <netinet/in.h>
16045 #include <netdb.h>
16046 #define BUFSIZE (sizeof(struct hostent)+10)
16047 int main() {
16048 struct hostent hent; char buffer[BUFSIZE]; 
16049             struct in_addr add;
16050             size_t alen=sizeof(struct in_addr);
16051             int bufsize=BUFSIZE;int h_errno;
16052                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
16053                         alen, AF_INET, &hent, buffer, bufsize, &h_errno);
16054 ; return 0; }
16055 EOF
16056 if { (eval echo configure:16057: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16057   rm -rf conftest*
16058   ol_cv_func_gethostbyaddr_r_nargs7=yes
16059 else
16060   echo "configure: failed program was:" >&5
16061   cat conftest.$ac_ext >&5
16062   rm -rf conftest*
16063   ol_cv_func_gethostbyaddr_r_nargs7=no
16064 fi
16065 rm -f conftest*
16066
16067         cat > conftest.$ac_ext <<EOF
16068 #line 16069 "configure"
16069 #include "confdefs.h"
16070 #include <sys/types.h>
16071 #include <sys/socket.h>
16072 #include <netinet/in.h>
16073 #include <netdb.h>
16074 #define BUFSIZE (sizeof(struct hostent)+10)
16075 int main() {
16076 struct hostent hent;
16077                 struct hostent *rhent; char buffer[BUFSIZE]; 
16078                 struct in_addr add;
16079                 size_t alen=sizeof(struct in_addr);
16080                 int bufsize=BUFSIZE;int h_errno;
16081                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
16082                         alen, AF_INET, &hent, buffer, bufsize, 
16083                         &rhent, &h_errno);
16084 ; return 0; }
16085 EOF
16086 if { (eval echo configure:16087: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16087   rm -rf conftest*
16088   ol_cv_func_gethostbyaddr_r_nargs8=yes
16089 else
16090   echo "configure: failed program was:" >&5
16091   cat conftest.$ac_ext >&5
16092   rm -rf conftest*
16093   ol_cv_func_gethostbyaddr_r_nargs8=no
16094 fi
16095 rm -f conftest*
16096
16097         if test $ol_cv_func_gethostbyaddr_r_nargs7 = yes -a \
16098                 $ol_cv_func_gethostbyaddr_r_nargs8 = no ; then
16099
16100                 ol_cv_func_gethostbyaddr_r_nargs=7
16101
16102         elif test $ol_cv_func_gethostbyaddr_r_nargs7 = no -a \
16103                 $ol_cv_func_gethostbyaddr_r_nargs8 = yes ; then
16104
16105                 ol_cv_func_gethostbyaddr_r_nargs=8
16106
16107         else
16108                 ol_cv_func_gethostbyaddr_r_nargs=0
16109         fi
16110   
16111 fi
16112
16113 echo "$ac_t""$ol_cv_func_gethostbyaddr_r_nargs" 1>&6
16114   if test $ol_cv_func_gethostbyaddr_r_nargs -gt 1 ; then
16115     cat >> confdefs.h <<EOF
16116 #define GETHOSTBYADDR_R_NARGS $ol_cv_func_gethostbyaddr_r_nargs
16117 EOF
16118
16119   fi
16120
16121 else
16122         ol_cv_func_gethostbyaddr_r_nargs=0
16123 fi
16124
16125 ol_link_ldbm=no 
16126
16127 if test $ol_with_ldbm_api = auto \
16128         -o $ol_with_ldbm_api = berkeley \
16129         -o $ol_with_ldbm_api = bcompat ; then
16130
16131         if test $ol_with_ldbm_api = bcompat; then \
16132                 for ac_hdr in db_185.h db.h
16133 do
16134 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16135 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16136 echo "configure:16137: checking for $ac_hdr" >&5
16137 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16138   echo $ac_n "(cached) $ac_c" 1>&6
16139 else
16140   cat > conftest.$ac_ext <<EOF
16141 #line 16142 "configure"
16142 #include "confdefs.h"
16143 #include <$ac_hdr>
16144 EOF
16145 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16146 { (eval echo configure:16147: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16147 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16148 if test -z "$ac_err"; then
16149   rm -rf conftest*
16150   eval "ac_cv_header_$ac_safe=yes"
16151 else
16152   echo "$ac_err" >&5
16153   echo "configure: failed program was:" >&5
16154   cat conftest.$ac_ext >&5
16155   rm -rf conftest*
16156   eval "ac_cv_header_$ac_safe=no"
16157 fi
16158 rm -f conftest*
16159 fi
16160 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16161   echo "$ac_t""yes" 1>&6
16162     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16163   cat >> confdefs.h <<EOF
16164 #define $ac_tr_hdr 1
16165 EOF
16166  
16167 else
16168   echo "$ac_t""no" 1>&6
16169 fi
16170 done
16171
16172 if test $ac_cv_header_db_185_h = yes -o $ac_cv_header_db_h = yes; then
16173         echo $ac_n "checking if Berkeley DB header compatibility""... $ac_c" 1>&6
16174 echo "configure:16175: checking if Berkeley DB header compatibility" >&5
16175 if eval "test \"\${ol_cv_header_db1+set}\" = set"; then
16176   echo $ac_n "(cached) $ac_c" 1>&6
16177 else
16178   
16179                 cat > conftest.$ac_ext <<EOF
16180 #line 16181 "configure"
16181 #include "confdefs.h"
16182
16183 #if HAVE_DB_185_H
16184 #       include <db_185.h>
16185 #else
16186 #       include <db.h>
16187 #endif
16188
16189  /* this check could be improved */
16190 #ifndef DB_VERSION_MAJOR
16191 #       define DB_VERSION_MAJOR 1
16192 #endif
16193
16194 #if DB_VERSION_MAJOR == 1 
16195         __db_version_1
16196 #endif
16197
16198 EOF
16199 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16200   egrep "__db_version_1" >/dev/null 2>&1; then
16201   rm -rf conftest*
16202   ol_cv_header_db1=yes
16203 else
16204   rm -rf conftest*
16205   ol_cv_header_db1=no
16206 fi
16207 rm -f conftest*
16208
16209 fi
16210
16211 echo "$ac_t""$ol_cv_header_db1" 1>&6
16212
16213         if test $ol_cv_header_db1 = yes ; then
16214                 ol_cv_lib_db=no
16215 if test $ol_cv_lib_db = no ; then
16216         echo $ac_n "checking for Berkeley DB link (default)""... $ac_c" 1>&6
16217 echo "configure:16218: checking for Berkeley DB link (default)" >&5
16218 if eval "test \"\${ol_cv_db_none+set}\" = set"; then
16219   echo $ac_n "(cached) $ac_c" 1>&6
16220 else
16221   
16222         ol_DB_LIB=
16223         ol_LIBS=$LIBS
16224         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
16225
16226         cat > conftest.$ac_ext <<EOF
16227 #line 16228 "configure"
16228 #include "confdefs.h"
16229
16230 #ifdef HAVE_DB_185_H
16231 # include <db_185.h>
16232 #else
16233 # include <db.h>
16234 #endif
16235
16236 #ifndef DB_VERSION_MAJOR
16237 # define DB_VERSION_MAJOR 1
16238 #endif
16239
16240 #ifndef NULL
16241 #define NULL ((void*)0)
16242 #endif
16243
16244 int main() {
16245
16246 #if DB_VERSION_MAJOR > 1
16247         {
16248                 char *version;
16249                 int major, minor, patch;
16250
16251                 version = db_version( &major, &minor, &patch );
16252
16253                 if( major != DB_VERSION_MAJOR ||
16254                         minor < DB_VERSION_MINOR )
16255                 {
16256                         printf("Berkeley DB version mismatch\n"
16257                                 "\texpected: %s\n\tgot: %s\n",
16258                                 DB_VERSION_STRING, version);
16259                         return 1;
16260                 }
16261         }
16262 #endif
16263
16264 #if DB_VERSION_MAJOR > 2
16265         db_env_create( NULL, 0 );
16266 #elif DB_VERSION_MAJOR > 1
16267         db_appexit( NULL );
16268 #else
16269         (void) dbopen( NULL, 0, 0, 0, NULL);
16270 #endif
16271
16272 ; return 0; }
16273 EOF
16274 if { (eval echo configure:16275: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16275   rm -rf conftest*
16276   ol_cv_db_none=yes
16277 else
16278   echo "configure: failed program was:" >&5
16279   cat conftest.$ac_ext >&5
16280   rm -rf conftest*
16281   ol_cv_db_none=no
16282 fi
16283 rm -f conftest*
16284
16285         LIBS="$ol_LIBS"
16286
16287 fi
16288
16289 echo "$ac_t""$ol_cv_db_none" 1>&6
16290
16291         if test $ol_cv_db_none = yes ; then
16292                 ol_cv_lib_db=yes
16293         fi
16294 fi
16295
16296 if test $ol_cv_lib_db = no ; then
16297         echo $ac_n "checking for Berkeley DB link (-ldb42)""... $ac_c" 1>&6
16298 echo "configure:16299: checking for Berkeley DB link (-ldb42)" >&5
16299 if eval "test \"\${ol_cv_db_db42+set}\" = set"; then
16300   echo $ac_n "(cached) $ac_c" 1>&6
16301 else
16302   
16303         ol_DB_LIB=-ldb42
16304         ol_LIBS=$LIBS
16305         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
16306
16307         cat > conftest.$ac_ext <<EOF
16308 #line 16309 "configure"
16309 #include "confdefs.h"
16310
16311 #ifdef HAVE_DB_185_H
16312 # include <db_185.h>
16313 #else
16314 # include <db.h>
16315 #endif
16316
16317 #ifndef DB_VERSION_MAJOR
16318 # define DB_VERSION_MAJOR 1
16319 #endif
16320
16321 #ifndef NULL
16322 #define NULL ((void*)0)
16323 #endif
16324
16325 int main() {
16326
16327 #if DB_VERSION_MAJOR > 1
16328         {
16329                 char *version;
16330                 int major, minor, patch;
16331
16332                 version = db_version( &major, &minor, &patch );
16333
16334                 if( major != DB_VERSION_MAJOR ||
16335                         minor < DB_VERSION_MINOR )
16336                 {
16337                         printf("Berkeley DB version mismatch\n"
16338                                 "\texpected: %s\n\tgot: %s\n",
16339                                 DB_VERSION_STRING, version);
16340                         return 1;
16341                 }
16342         }
16343 #endif
16344
16345 #if DB_VERSION_MAJOR > 2
16346         db_env_create( NULL, 0 );
16347 #elif DB_VERSION_MAJOR > 1
16348         db_appexit( NULL );
16349 #else
16350         (void) dbopen( NULL, 0, 0, 0, NULL);
16351 #endif
16352
16353 ; return 0; }
16354 EOF
16355 if { (eval echo configure:16356: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16356   rm -rf conftest*
16357   ol_cv_db_db42=yes
16358 else
16359   echo "configure: failed program was:" >&5
16360   cat conftest.$ac_ext >&5
16361   rm -rf conftest*
16362   ol_cv_db_db42=no
16363 fi
16364 rm -f conftest*
16365
16366         LIBS="$ol_LIBS"
16367
16368 fi
16369
16370 echo "$ac_t""$ol_cv_db_db42" 1>&6
16371
16372         if test $ol_cv_db_db42 = yes ; then
16373                 ol_cv_lib_db=-ldb42
16374         fi
16375 fi
16376
16377 if test $ol_cv_lib_db = no ; then
16378         echo $ac_n "checking for Berkeley DB link (-ldb-42)""... $ac_c" 1>&6
16379 echo "configure:16380: checking for Berkeley DB link (-ldb-42)" >&5
16380 if eval "test \"\${ol_cv_db_db_42+set}\" = set"; then
16381   echo $ac_n "(cached) $ac_c" 1>&6
16382 else
16383   
16384         ol_DB_LIB=-ldb-42
16385         ol_LIBS=$LIBS
16386         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
16387
16388         cat > conftest.$ac_ext <<EOF
16389 #line 16390 "configure"
16390 #include "confdefs.h"
16391
16392 #ifdef HAVE_DB_185_H
16393 # include <db_185.h>
16394 #else
16395 # include <db.h>
16396 #endif
16397
16398 #ifndef DB_VERSION_MAJOR
16399 # define DB_VERSION_MAJOR 1
16400 #endif
16401
16402 #ifndef NULL
16403 #define NULL ((void*)0)
16404 #endif
16405
16406 int main() {
16407
16408 #if DB_VERSION_MAJOR > 1
16409         {
16410                 char *version;
16411                 int major, minor, patch;
16412
16413                 version = db_version( &major, &minor, &patch );
16414
16415                 if( major != DB_VERSION_MAJOR ||
16416                         minor < DB_VERSION_MINOR )
16417                 {
16418                         printf("Berkeley DB version mismatch\n"
16419                                 "\texpected: %s\n\tgot: %s\n",
16420                                 DB_VERSION_STRING, version);
16421                         return 1;
16422                 }
16423         }
16424 #endif
16425
16426 #if DB_VERSION_MAJOR > 2
16427         db_env_create( NULL, 0 );
16428 #elif DB_VERSION_MAJOR > 1
16429         db_appexit( NULL );
16430 #else
16431         (void) dbopen( NULL, 0, 0, 0, NULL);
16432 #endif
16433
16434 ; return 0; }
16435 EOF
16436 if { (eval echo configure:16437: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16437   rm -rf conftest*
16438   ol_cv_db_db_42=yes
16439 else
16440   echo "configure: failed program was:" >&5
16441   cat conftest.$ac_ext >&5
16442   rm -rf conftest*
16443   ol_cv_db_db_42=no
16444 fi
16445 rm -f conftest*
16446
16447         LIBS="$ol_LIBS"
16448
16449 fi
16450
16451 echo "$ac_t""$ol_cv_db_db_42" 1>&6
16452
16453         if test $ol_cv_db_db_42 = yes ; then
16454                 ol_cv_lib_db=-ldb-42
16455         fi
16456 fi
16457
16458 if test $ol_cv_lib_db = no ; then
16459         echo $ac_n "checking for Berkeley DB link (-ldb-4.2)""... $ac_c" 1>&6
16460 echo "configure:16461: checking for Berkeley DB link (-ldb-4.2)" >&5
16461 if eval "test \"\${ol_cv_db_db_4_dot_2+set}\" = set"; then
16462   echo $ac_n "(cached) $ac_c" 1>&6
16463 else
16464   
16465         ol_DB_LIB=-ldb-4.2
16466         ol_LIBS=$LIBS
16467         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
16468
16469         cat > conftest.$ac_ext <<EOF
16470 #line 16471 "configure"
16471 #include "confdefs.h"
16472
16473 #ifdef HAVE_DB_185_H
16474 # include <db_185.h>
16475 #else
16476 # include <db.h>
16477 #endif
16478
16479 #ifndef DB_VERSION_MAJOR
16480 # define DB_VERSION_MAJOR 1
16481 #endif
16482
16483 #ifndef NULL
16484 #define NULL ((void*)0)
16485 #endif
16486
16487 int main() {
16488
16489 #if DB_VERSION_MAJOR > 1
16490         {
16491                 char *version;
16492                 int major, minor, patch;
16493
16494                 version = db_version( &major, &minor, &patch );
16495
16496                 if( major != DB_VERSION_MAJOR ||
16497                         minor < DB_VERSION_MINOR )
16498                 {
16499                         printf("Berkeley DB version mismatch\n"
16500                                 "\texpected: %s\n\tgot: %s\n",
16501                                 DB_VERSION_STRING, version);
16502                         return 1;
16503                 }
16504         }
16505 #endif
16506
16507 #if DB_VERSION_MAJOR > 2
16508         db_env_create( NULL, 0 );
16509 #elif DB_VERSION_MAJOR > 1
16510         db_appexit( NULL );
16511 #else
16512         (void) dbopen( NULL, 0, 0, 0, NULL);
16513 #endif
16514
16515 ; return 0; }
16516 EOF
16517 if { (eval echo configure:16518: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16518   rm -rf conftest*
16519   ol_cv_db_db_4_dot_2=yes
16520 else
16521   echo "configure: failed program was:" >&5
16522   cat conftest.$ac_ext >&5
16523   rm -rf conftest*
16524   ol_cv_db_db_4_dot_2=no
16525 fi
16526 rm -f conftest*
16527
16528         LIBS="$ol_LIBS"
16529
16530 fi
16531
16532 echo "$ac_t""$ol_cv_db_db_4_dot_2" 1>&6
16533
16534         if test $ol_cv_db_db_4_dot_2 = yes ; then
16535                 ol_cv_lib_db=-ldb-4.2
16536         fi
16537 fi
16538
16539 if test $ol_cv_lib_db = no ; then
16540         echo $ac_n "checking for Berkeley DB link (-ldb-4-2)""... $ac_c" 1>&6
16541 echo "configure:16542: checking for Berkeley DB link (-ldb-4-2)" >&5
16542 if eval "test \"\${ol_cv_db_db_4_2+set}\" = set"; then
16543   echo $ac_n "(cached) $ac_c" 1>&6
16544 else
16545   
16546         ol_DB_LIB=-ldb-4-2
16547         ol_LIBS=$LIBS
16548         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
16549
16550         cat > conftest.$ac_ext <<EOF
16551 #line 16552 "configure"
16552 #include "confdefs.h"
16553
16554 #ifdef HAVE_DB_185_H
16555 # include <db_185.h>
16556 #else
16557 # include <db.h>
16558 #endif
16559
16560 #ifndef DB_VERSION_MAJOR
16561 # define DB_VERSION_MAJOR 1
16562 #endif
16563
16564 #ifndef NULL
16565 #define NULL ((void*)0)
16566 #endif
16567
16568 int main() {
16569
16570 #if DB_VERSION_MAJOR > 1
16571         {
16572                 char *version;
16573                 int major, minor, patch;
16574
16575                 version = db_version( &major, &minor, &patch );
16576
16577                 if( major != DB_VERSION_MAJOR ||
16578                         minor < DB_VERSION_MINOR )
16579                 {
16580                         printf("Berkeley DB version mismatch\n"
16581                                 "\texpected: %s\n\tgot: %s\n",
16582                                 DB_VERSION_STRING, version);
16583                         return 1;
16584                 }
16585         }
16586 #endif
16587
16588 #if DB_VERSION_MAJOR > 2
16589         db_env_create( NULL, 0 );
16590 #elif DB_VERSION_MAJOR > 1
16591         db_appexit( NULL );
16592 #else
16593         (void) dbopen( NULL, 0, 0, 0, NULL);
16594 #endif
16595
16596 ; return 0; }
16597 EOF
16598 if { (eval echo configure:16599: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16599   rm -rf conftest*
16600   ol_cv_db_db_4_2=yes
16601 else
16602   echo "configure: failed program was:" >&5
16603   cat conftest.$ac_ext >&5
16604   rm -rf conftest*
16605   ol_cv_db_db_4_2=no
16606 fi
16607 rm -f conftest*
16608
16609         LIBS="$ol_LIBS"
16610
16611 fi
16612
16613 echo "$ac_t""$ol_cv_db_db_4_2" 1>&6
16614
16615         if test $ol_cv_db_db_4_2 = yes ; then
16616                 ol_cv_lib_db=-ldb-4-2
16617         fi
16618 fi
16619
16620 if test $ol_cv_lib_db = no ; then
16621         echo $ac_n "checking for Berkeley DB link (-ldb-4)""... $ac_c" 1>&6
16622 echo "configure:16623: checking for Berkeley DB link (-ldb-4)" >&5
16623 if eval "test \"\${ol_cv_db_db_4+set}\" = set"; then
16624   echo $ac_n "(cached) $ac_c" 1>&6
16625 else
16626   
16627         ol_DB_LIB=-ldb-4
16628         ol_LIBS=$LIBS
16629         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
16630
16631         cat > conftest.$ac_ext <<EOF
16632 #line 16633 "configure"
16633 #include "confdefs.h"
16634
16635 #ifdef HAVE_DB_185_H
16636 # include <db_185.h>
16637 #else
16638 # include <db.h>
16639 #endif
16640
16641 #ifndef DB_VERSION_MAJOR
16642 # define DB_VERSION_MAJOR 1
16643 #endif
16644
16645 #ifndef NULL
16646 #define NULL ((void*)0)
16647 #endif
16648
16649 int main() {
16650
16651 #if DB_VERSION_MAJOR > 1
16652         {
16653                 char *version;
16654                 int major, minor, patch;
16655
16656                 version = db_version( &major, &minor, &patch );
16657
16658                 if( major != DB_VERSION_MAJOR ||
16659                         minor < DB_VERSION_MINOR )
16660                 {
16661                         printf("Berkeley DB version mismatch\n"
16662                                 "\texpected: %s\n\tgot: %s\n",
16663                                 DB_VERSION_STRING, version);
16664                         return 1;
16665                 }
16666         }
16667 #endif
16668
16669 #if DB_VERSION_MAJOR > 2
16670         db_env_create( NULL, 0 );
16671 #elif DB_VERSION_MAJOR > 1
16672         db_appexit( NULL );
16673 #else
16674         (void) dbopen( NULL, 0, 0, 0, NULL);
16675 #endif
16676
16677 ; return 0; }
16678 EOF
16679 if { (eval echo configure:16680: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16680   rm -rf conftest*
16681   ol_cv_db_db_4=yes
16682 else
16683   echo "configure: failed program was:" >&5
16684   cat conftest.$ac_ext >&5
16685   rm -rf conftest*
16686   ol_cv_db_db_4=no
16687 fi
16688 rm -f conftest*
16689
16690         LIBS="$ol_LIBS"
16691
16692 fi
16693
16694 echo "$ac_t""$ol_cv_db_db_4" 1>&6
16695
16696         if test $ol_cv_db_db_4 = yes ; then
16697                 ol_cv_lib_db=-ldb-4
16698         fi
16699 fi
16700
16701 if test $ol_cv_lib_db = no ; then
16702         echo $ac_n "checking for Berkeley DB link (-ldb4)""... $ac_c" 1>&6
16703 echo "configure:16704: checking for Berkeley DB link (-ldb4)" >&5
16704 if eval "test \"\${ol_cv_db_db4+set}\" = set"; then
16705   echo $ac_n "(cached) $ac_c" 1>&6
16706 else
16707   
16708         ol_DB_LIB=-ldb4
16709         ol_LIBS=$LIBS
16710         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
16711
16712         cat > conftest.$ac_ext <<EOF
16713 #line 16714 "configure"
16714 #include "confdefs.h"
16715
16716 #ifdef HAVE_DB_185_H
16717 # include <db_185.h>
16718 #else
16719 # include <db.h>
16720 #endif
16721
16722 #ifndef DB_VERSION_MAJOR
16723 # define DB_VERSION_MAJOR 1
16724 #endif
16725
16726 #ifndef NULL
16727 #define NULL ((void*)0)
16728 #endif
16729
16730 int main() {
16731
16732 #if DB_VERSION_MAJOR > 1
16733         {
16734                 char *version;
16735                 int major, minor, patch;
16736
16737                 version = db_version( &major, &minor, &patch );
16738
16739                 if( major != DB_VERSION_MAJOR ||
16740                         minor < DB_VERSION_MINOR )
16741                 {
16742                         printf("Berkeley DB version mismatch\n"
16743                                 "\texpected: %s\n\tgot: %s\n",
16744                                 DB_VERSION_STRING, version);
16745                         return 1;
16746                 }
16747         }
16748 #endif
16749
16750 #if DB_VERSION_MAJOR > 2
16751         db_env_create( NULL, 0 );
16752 #elif DB_VERSION_MAJOR > 1
16753         db_appexit( NULL );
16754 #else
16755         (void) dbopen( NULL, 0, 0, 0, NULL);
16756 #endif
16757
16758 ; return 0; }
16759 EOF
16760 if { (eval echo configure:16761: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16761   rm -rf conftest*
16762   ol_cv_db_db4=yes
16763 else
16764   echo "configure: failed program was:" >&5
16765   cat conftest.$ac_ext >&5
16766   rm -rf conftest*
16767   ol_cv_db_db4=no
16768 fi
16769 rm -f conftest*
16770
16771         LIBS="$ol_LIBS"
16772
16773 fi
16774
16775 echo "$ac_t""$ol_cv_db_db4" 1>&6
16776
16777         if test $ol_cv_db_db4 = yes ; then
16778                 ol_cv_lib_db=-ldb4
16779         fi
16780 fi
16781
16782 if test $ol_cv_lib_db = no ; then
16783         echo $ac_n "checking for Berkeley DB link (-ldb)""... $ac_c" 1>&6
16784 echo "configure:16785: checking for Berkeley DB link (-ldb)" >&5
16785 if eval "test \"\${ol_cv_db_db+set}\" = set"; then
16786   echo $ac_n "(cached) $ac_c" 1>&6
16787 else
16788   
16789         ol_DB_LIB=-ldb
16790         ol_LIBS=$LIBS
16791         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
16792
16793         cat > conftest.$ac_ext <<EOF
16794 #line 16795 "configure"
16795 #include "confdefs.h"
16796
16797 #ifdef HAVE_DB_185_H
16798 # include <db_185.h>
16799 #else
16800 # include <db.h>
16801 #endif
16802
16803 #ifndef DB_VERSION_MAJOR
16804 # define DB_VERSION_MAJOR 1
16805 #endif
16806
16807 #ifndef NULL
16808 #define NULL ((void*)0)
16809 #endif
16810
16811 int main() {
16812
16813 #if DB_VERSION_MAJOR > 1
16814         {
16815                 char *version;
16816                 int major, minor, patch;
16817
16818                 version = db_version( &major, &minor, &patch );
16819
16820                 if( major != DB_VERSION_MAJOR ||
16821                         minor < DB_VERSION_MINOR )
16822                 {
16823                         printf("Berkeley DB version mismatch\n"
16824                                 "\texpected: %s\n\tgot: %s\n",
16825                                 DB_VERSION_STRING, version);
16826                         return 1;
16827                 }
16828         }
16829 #endif
16830
16831 #if DB_VERSION_MAJOR > 2
16832         db_env_create( NULL, 0 );
16833 #elif DB_VERSION_MAJOR > 1
16834         db_appexit( NULL );
16835 #else
16836         (void) dbopen( NULL, 0, 0, 0, NULL);
16837 #endif
16838
16839 ; return 0; }
16840 EOF
16841 if { (eval echo configure:16842: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16842   rm -rf conftest*
16843   ol_cv_db_db=yes
16844 else
16845   echo "configure: failed program was:" >&5
16846   cat conftest.$ac_ext >&5
16847   rm -rf conftest*
16848   ol_cv_db_db=no
16849 fi
16850 rm -f conftest*
16851
16852         LIBS="$ol_LIBS"
16853
16854 fi
16855
16856 echo "$ac_t""$ol_cv_db_db" 1>&6
16857
16858         if test $ol_cv_db_db = yes ; then
16859                 ol_cv_lib_db=-ldb
16860         fi
16861 fi
16862
16863 if test $ol_cv_lib_db = no ; then
16864         echo $ac_n "checking for Berkeley DB link (-ldb41)""... $ac_c" 1>&6
16865 echo "configure:16866: checking for Berkeley DB link (-ldb41)" >&5
16866 if eval "test \"\${ol_cv_db_db41+set}\" = set"; then
16867   echo $ac_n "(cached) $ac_c" 1>&6
16868 else
16869   
16870         ol_DB_LIB=-ldb41
16871         ol_LIBS=$LIBS
16872         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
16873
16874         cat > conftest.$ac_ext <<EOF
16875 #line 16876 "configure"
16876 #include "confdefs.h"
16877
16878 #ifdef HAVE_DB_185_H
16879 # include <db_185.h>
16880 #else
16881 # include <db.h>
16882 #endif
16883
16884 #ifndef DB_VERSION_MAJOR
16885 # define DB_VERSION_MAJOR 1
16886 #endif
16887
16888 #ifndef NULL
16889 #define NULL ((void*)0)
16890 #endif
16891
16892 int main() {
16893
16894 #if DB_VERSION_MAJOR > 1
16895         {
16896                 char *version;
16897                 int major, minor, patch;
16898
16899                 version = db_version( &major, &minor, &patch );
16900
16901                 if( major != DB_VERSION_MAJOR ||
16902                         minor < DB_VERSION_MINOR )
16903                 {
16904                         printf("Berkeley DB version mismatch\n"
16905                                 "\texpected: %s\n\tgot: %s\n",
16906                                 DB_VERSION_STRING, version);
16907                         return 1;
16908                 }
16909         }
16910 #endif
16911
16912 #if DB_VERSION_MAJOR > 2
16913         db_env_create( NULL, 0 );
16914 #elif DB_VERSION_MAJOR > 1
16915         db_appexit( NULL );
16916 #else
16917         (void) dbopen( NULL, 0, 0, 0, NULL);
16918 #endif
16919
16920 ; return 0; }
16921 EOF
16922 if { (eval echo configure:16923: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16923   rm -rf conftest*
16924   ol_cv_db_db41=yes
16925 else
16926   echo "configure: failed program was:" >&5
16927   cat conftest.$ac_ext >&5
16928   rm -rf conftest*
16929   ol_cv_db_db41=no
16930 fi
16931 rm -f conftest*
16932
16933         LIBS="$ol_LIBS"
16934
16935 fi
16936
16937 echo "$ac_t""$ol_cv_db_db41" 1>&6
16938
16939         if test $ol_cv_db_db41 = yes ; then
16940                 ol_cv_lib_db=-ldb41
16941         fi
16942 fi
16943
16944 if test $ol_cv_lib_db = no ; then
16945         echo $ac_n "checking for Berkeley DB link (-ldb-41)""... $ac_c" 1>&6
16946 echo "configure:16947: checking for Berkeley DB link (-ldb-41)" >&5
16947 if eval "test \"\${ol_cv_db_db_41+set}\" = set"; then
16948   echo $ac_n "(cached) $ac_c" 1>&6
16949 else
16950   
16951         ol_DB_LIB=-ldb-41
16952         ol_LIBS=$LIBS
16953         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
16954
16955         cat > conftest.$ac_ext <<EOF
16956 #line 16957 "configure"
16957 #include "confdefs.h"
16958
16959 #ifdef HAVE_DB_185_H
16960 # include <db_185.h>
16961 #else
16962 # include <db.h>
16963 #endif
16964
16965 #ifndef DB_VERSION_MAJOR
16966 # define DB_VERSION_MAJOR 1
16967 #endif
16968
16969 #ifndef NULL
16970 #define NULL ((void*)0)
16971 #endif
16972
16973 int main() {
16974
16975 #if DB_VERSION_MAJOR > 1
16976         {
16977                 char *version;
16978                 int major, minor, patch;
16979
16980                 version = db_version( &major, &minor, &patch );
16981
16982                 if( major != DB_VERSION_MAJOR ||
16983                         minor < DB_VERSION_MINOR )
16984                 {
16985                         printf("Berkeley DB version mismatch\n"
16986                                 "\texpected: %s\n\tgot: %s\n",
16987                                 DB_VERSION_STRING, version);
16988                         return 1;
16989                 }
16990         }
16991 #endif
16992
16993 #if DB_VERSION_MAJOR > 2
16994         db_env_create( NULL, 0 );
16995 #elif DB_VERSION_MAJOR > 1
16996         db_appexit( NULL );
16997 #else
16998         (void) dbopen( NULL, 0, 0, 0, NULL);
16999 #endif
17000
17001 ; return 0; }
17002 EOF
17003 if { (eval echo configure:17004: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17004   rm -rf conftest*
17005   ol_cv_db_db_41=yes
17006 else
17007   echo "configure: failed program was:" >&5
17008   cat conftest.$ac_ext >&5
17009   rm -rf conftest*
17010   ol_cv_db_db_41=no
17011 fi
17012 rm -f conftest*
17013
17014         LIBS="$ol_LIBS"
17015
17016 fi
17017
17018 echo "$ac_t""$ol_cv_db_db_41" 1>&6
17019
17020         if test $ol_cv_db_db_41 = yes ; then
17021                 ol_cv_lib_db=-ldb-41
17022         fi
17023 fi
17024
17025 if test $ol_cv_lib_db = no ; then
17026         echo $ac_n "checking for Berkeley DB link (-ldb-4.1)""... $ac_c" 1>&6
17027 echo "configure:17028: checking for Berkeley DB link (-ldb-4.1)" >&5
17028 if eval "test \"\${ol_cv_db_db_4_dot_1+set}\" = set"; then
17029   echo $ac_n "(cached) $ac_c" 1>&6
17030 else
17031   
17032         ol_DB_LIB=-ldb-4.1
17033         ol_LIBS=$LIBS
17034         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17035
17036         cat > conftest.$ac_ext <<EOF
17037 #line 17038 "configure"
17038 #include "confdefs.h"
17039
17040 #ifdef HAVE_DB_185_H
17041 # include <db_185.h>
17042 #else
17043 # include <db.h>
17044 #endif
17045
17046 #ifndef DB_VERSION_MAJOR
17047 # define DB_VERSION_MAJOR 1
17048 #endif
17049
17050 #ifndef NULL
17051 #define NULL ((void*)0)
17052 #endif
17053
17054 int main() {
17055
17056 #if DB_VERSION_MAJOR > 1
17057         {
17058                 char *version;
17059                 int major, minor, patch;
17060
17061                 version = db_version( &major, &minor, &patch );
17062
17063                 if( major != DB_VERSION_MAJOR ||
17064                         minor < DB_VERSION_MINOR )
17065                 {
17066                         printf("Berkeley DB version mismatch\n"
17067                                 "\texpected: %s\n\tgot: %s\n",
17068                                 DB_VERSION_STRING, version);
17069                         return 1;
17070                 }
17071         }
17072 #endif
17073
17074 #if DB_VERSION_MAJOR > 2
17075         db_env_create( NULL, 0 );
17076 #elif DB_VERSION_MAJOR > 1
17077         db_appexit( NULL );
17078 #else
17079         (void) dbopen( NULL, 0, 0, 0, NULL);
17080 #endif
17081
17082 ; return 0; }
17083 EOF
17084 if { (eval echo configure:17085: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17085   rm -rf conftest*
17086   ol_cv_db_db_4_dot_1=yes
17087 else
17088   echo "configure: failed program was:" >&5
17089   cat conftest.$ac_ext >&5
17090   rm -rf conftest*
17091   ol_cv_db_db_4_dot_1=no
17092 fi
17093 rm -f conftest*
17094
17095         LIBS="$ol_LIBS"
17096
17097 fi
17098
17099 echo "$ac_t""$ol_cv_db_db_4_dot_1" 1>&6
17100
17101         if test $ol_cv_db_db_4_dot_1 = yes ; then
17102                 ol_cv_lib_db=-ldb-4.1
17103         fi
17104 fi
17105
17106 if test $ol_cv_lib_db = no ; then
17107         echo $ac_n "checking for Berkeley DB link (-ldb-4-1)""... $ac_c" 1>&6
17108 echo "configure:17109: checking for Berkeley DB link (-ldb-4-1)" >&5
17109 if eval "test \"\${ol_cv_db_db_4_1+set}\" = set"; then
17110   echo $ac_n "(cached) $ac_c" 1>&6
17111 else
17112   
17113         ol_DB_LIB=-ldb-4-1
17114         ol_LIBS=$LIBS
17115         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17116
17117         cat > conftest.$ac_ext <<EOF
17118 #line 17119 "configure"
17119 #include "confdefs.h"
17120
17121 #ifdef HAVE_DB_185_H
17122 # include <db_185.h>
17123 #else
17124 # include <db.h>
17125 #endif
17126
17127 #ifndef DB_VERSION_MAJOR
17128 # define DB_VERSION_MAJOR 1
17129 #endif
17130
17131 #ifndef NULL
17132 #define NULL ((void*)0)
17133 #endif
17134
17135 int main() {
17136
17137 #if DB_VERSION_MAJOR > 1
17138         {
17139                 char *version;
17140                 int major, minor, patch;
17141
17142                 version = db_version( &major, &minor, &patch );
17143
17144                 if( major != DB_VERSION_MAJOR ||
17145                         minor < DB_VERSION_MINOR )
17146                 {
17147                         printf("Berkeley DB version mismatch\n"
17148                                 "\texpected: %s\n\tgot: %s\n",
17149                                 DB_VERSION_STRING, version);
17150                         return 1;
17151                 }
17152         }
17153 #endif
17154
17155 #if DB_VERSION_MAJOR > 2
17156         db_env_create( NULL, 0 );
17157 #elif DB_VERSION_MAJOR > 1
17158         db_appexit( NULL );
17159 #else
17160         (void) dbopen( NULL, 0, 0, 0, NULL);
17161 #endif
17162
17163 ; return 0; }
17164 EOF
17165 if { (eval echo configure:17166: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17166   rm -rf conftest*
17167   ol_cv_db_db_4_1=yes
17168 else
17169   echo "configure: failed program was:" >&5
17170   cat conftest.$ac_ext >&5
17171   rm -rf conftest*
17172   ol_cv_db_db_4_1=no
17173 fi
17174 rm -f conftest*
17175
17176         LIBS="$ol_LIBS"
17177
17178 fi
17179
17180 echo "$ac_t""$ol_cv_db_db_4_1" 1>&6
17181
17182         if test $ol_cv_db_db_4_1 = yes ; then
17183                 ol_cv_lib_db=-ldb-4-1
17184         fi
17185 fi
17186
17187 if test $ol_cv_lib_db = no ; then
17188         echo $ac_n "checking for Berkeley DB link (-ldb3)""... $ac_c" 1>&6
17189 echo "configure:17190: checking for Berkeley DB link (-ldb3)" >&5
17190 if eval "test \"\${ol_cv_db_db3+set}\" = set"; then
17191   echo $ac_n "(cached) $ac_c" 1>&6
17192 else
17193   
17194         ol_DB_LIB=-ldb3
17195         ol_LIBS=$LIBS
17196         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17197
17198         cat > conftest.$ac_ext <<EOF
17199 #line 17200 "configure"
17200 #include "confdefs.h"
17201
17202 #ifdef HAVE_DB_185_H
17203 # include <db_185.h>
17204 #else
17205 # include <db.h>
17206 #endif
17207
17208 #ifndef DB_VERSION_MAJOR
17209 # define DB_VERSION_MAJOR 1
17210 #endif
17211
17212 #ifndef NULL
17213 #define NULL ((void*)0)
17214 #endif
17215
17216 int main() {
17217
17218 #if DB_VERSION_MAJOR > 1
17219         {
17220                 char *version;
17221                 int major, minor, patch;
17222
17223                 version = db_version( &major, &minor, &patch );
17224
17225                 if( major != DB_VERSION_MAJOR ||
17226                         minor < DB_VERSION_MINOR )
17227                 {
17228                         printf("Berkeley DB version mismatch\n"
17229                                 "\texpected: %s\n\tgot: %s\n",
17230                                 DB_VERSION_STRING, version);
17231                         return 1;
17232                 }
17233         }
17234 #endif
17235
17236 #if DB_VERSION_MAJOR > 2
17237         db_env_create( NULL, 0 );
17238 #elif DB_VERSION_MAJOR > 1
17239         db_appexit( NULL );
17240 #else
17241         (void) dbopen( NULL, 0, 0, 0, NULL);
17242 #endif
17243
17244 ; return 0; }
17245 EOF
17246 if { (eval echo configure:17247: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17247   rm -rf conftest*
17248   ol_cv_db_db3=yes
17249 else
17250   echo "configure: failed program was:" >&5
17251   cat conftest.$ac_ext >&5
17252   rm -rf conftest*
17253   ol_cv_db_db3=no
17254 fi
17255 rm -f conftest*
17256
17257         LIBS="$ol_LIBS"
17258
17259 fi
17260
17261 echo "$ac_t""$ol_cv_db_db3" 1>&6
17262
17263         if test $ol_cv_db_db3 = yes ; then
17264                 ol_cv_lib_db=-ldb3
17265         fi
17266 fi
17267
17268 if test $ol_cv_lib_db = no ; then
17269         echo $ac_n "checking for Berkeley DB link (-ldb-3)""... $ac_c" 1>&6
17270 echo "configure:17271: checking for Berkeley DB link (-ldb-3)" >&5
17271 if eval "test \"\${ol_cv_db_db_3+set}\" = set"; then
17272   echo $ac_n "(cached) $ac_c" 1>&6
17273 else
17274   
17275         ol_DB_LIB=-ldb-3
17276         ol_LIBS=$LIBS
17277         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17278
17279         cat > conftest.$ac_ext <<EOF
17280 #line 17281 "configure"
17281 #include "confdefs.h"
17282
17283 #ifdef HAVE_DB_185_H
17284 # include <db_185.h>
17285 #else
17286 # include <db.h>
17287 #endif
17288
17289 #ifndef DB_VERSION_MAJOR
17290 # define DB_VERSION_MAJOR 1
17291 #endif
17292
17293 #ifndef NULL
17294 #define NULL ((void*)0)
17295 #endif
17296
17297 int main() {
17298
17299 #if DB_VERSION_MAJOR > 1
17300         {
17301                 char *version;
17302                 int major, minor, patch;
17303
17304                 version = db_version( &major, &minor, &patch );
17305
17306                 if( major != DB_VERSION_MAJOR ||
17307                         minor < DB_VERSION_MINOR )
17308                 {
17309                         printf("Berkeley DB version mismatch\n"
17310                                 "\texpected: %s\n\tgot: %s\n",
17311                                 DB_VERSION_STRING, version);
17312                         return 1;
17313                 }
17314         }
17315 #endif
17316
17317 #if DB_VERSION_MAJOR > 2
17318         db_env_create( NULL, 0 );
17319 #elif DB_VERSION_MAJOR > 1
17320         db_appexit( NULL );
17321 #else
17322         (void) dbopen( NULL, 0, 0, 0, NULL);
17323 #endif
17324
17325 ; return 0; }
17326 EOF
17327 if { (eval echo configure:17328: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17328   rm -rf conftest*
17329   ol_cv_db_db_3=yes
17330 else
17331   echo "configure: failed program was:" >&5
17332   cat conftest.$ac_ext >&5
17333   rm -rf conftest*
17334   ol_cv_db_db_3=no
17335 fi
17336 rm -f conftest*
17337
17338         LIBS="$ol_LIBS"
17339
17340 fi
17341
17342 echo "$ac_t""$ol_cv_db_db_3" 1>&6
17343
17344         if test $ol_cv_db_db_3 = yes ; then
17345                 ol_cv_lib_db=-ldb-3
17346         fi
17347 fi
17348
17349 if test $ol_cv_lib_db = no ; then
17350         echo $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6
17351 echo "configure:17352: checking for Berkeley DB link (-ldb2)" >&5
17352 if eval "test \"\${ol_cv_db_db2+set}\" = set"; then
17353   echo $ac_n "(cached) $ac_c" 1>&6
17354 else
17355   
17356         ol_DB_LIB=-ldb2
17357         ol_LIBS=$LIBS
17358         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17359
17360         cat > conftest.$ac_ext <<EOF
17361 #line 17362 "configure"
17362 #include "confdefs.h"
17363
17364 #ifdef HAVE_DB_185_H
17365 # include <db_185.h>
17366 #else
17367 # include <db.h>
17368 #endif
17369
17370 #ifndef DB_VERSION_MAJOR
17371 # define DB_VERSION_MAJOR 1
17372 #endif
17373
17374 #ifndef NULL
17375 #define NULL ((void*)0)
17376 #endif
17377
17378 int main() {
17379
17380 #if DB_VERSION_MAJOR > 1
17381         {
17382                 char *version;
17383                 int major, minor, patch;
17384
17385                 version = db_version( &major, &minor, &patch );
17386
17387                 if( major != DB_VERSION_MAJOR ||
17388                         minor < DB_VERSION_MINOR )
17389                 {
17390                         printf("Berkeley DB version mismatch\n"
17391                                 "\texpected: %s\n\tgot: %s\n",
17392                                 DB_VERSION_STRING, version);
17393                         return 1;
17394                 }
17395         }
17396 #endif
17397
17398 #if DB_VERSION_MAJOR > 2
17399         db_env_create( NULL, 0 );
17400 #elif DB_VERSION_MAJOR > 1
17401         db_appexit( NULL );
17402 #else
17403         (void) dbopen( NULL, 0, 0, 0, NULL);
17404 #endif
17405
17406 ; return 0; }
17407 EOF
17408 if { (eval echo configure:17409: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17409   rm -rf conftest*
17410   ol_cv_db_db2=yes
17411 else
17412   echo "configure: failed program was:" >&5
17413   cat conftest.$ac_ext >&5
17414   rm -rf conftest*
17415   ol_cv_db_db2=no
17416 fi
17417 rm -f conftest*
17418
17419         LIBS="$ol_LIBS"
17420
17421 fi
17422
17423 echo "$ac_t""$ol_cv_db_db2" 1>&6
17424
17425         if test $ol_cv_db_db2 = yes ; then
17426                 ol_cv_lib_db=-ldb2
17427         fi
17428 fi
17429
17430 if test $ol_cv_lib_db = no ; then
17431         echo $ac_n "checking for Berkeley DB link (-ldb-2)""... $ac_c" 1>&6
17432 echo "configure:17433: checking for Berkeley DB link (-ldb-2)" >&5
17433 if eval "test \"\${ol_cv_db_db_2+set}\" = set"; then
17434   echo $ac_n "(cached) $ac_c" 1>&6
17435 else
17436   
17437         ol_DB_LIB=-ldb-2
17438         ol_LIBS=$LIBS
17439         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17440
17441         cat > conftest.$ac_ext <<EOF
17442 #line 17443 "configure"
17443 #include "confdefs.h"
17444
17445 #ifdef HAVE_DB_185_H
17446 # include <db_185.h>
17447 #else
17448 # include <db.h>
17449 #endif
17450
17451 #ifndef DB_VERSION_MAJOR
17452 # define DB_VERSION_MAJOR 1
17453 #endif
17454
17455 #ifndef NULL
17456 #define NULL ((void*)0)
17457 #endif
17458
17459 int main() {
17460
17461 #if DB_VERSION_MAJOR > 1
17462         {
17463                 char *version;
17464                 int major, minor, patch;
17465
17466                 version = db_version( &major, &minor, &patch );
17467
17468                 if( major != DB_VERSION_MAJOR ||
17469                         minor < DB_VERSION_MINOR )
17470                 {
17471                         printf("Berkeley DB version mismatch\n"
17472                                 "\texpected: %s\n\tgot: %s\n",
17473                                 DB_VERSION_STRING, version);
17474                         return 1;
17475                 }
17476         }
17477 #endif
17478
17479 #if DB_VERSION_MAJOR > 2
17480         db_env_create( NULL, 0 );
17481 #elif DB_VERSION_MAJOR > 1
17482         db_appexit( NULL );
17483 #else
17484         (void) dbopen( NULL, 0, 0, 0, NULL);
17485 #endif
17486
17487 ; return 0; }
17488 EOF
17489 if { (eval echo configure:17490: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17490   rm -rf conftest*
17491   ol_cv_db_db_2=yes
17492 else
17493   echo "configure: failed program was:" >&5
17494   cat conftest.$ac_ext >&5
17495   rm -rf conftest*
17496   ol_cv_db_db_2=no
17497 fi
17498 rm -f conftest*
17499
17500         LIBS="$ol_LIBS"
17501
17502 fi
17503
17504 echo "$ac_t""$ol_cv_db_db_2" 1>&6
17505
17506         if test $ol_cv_db_db_2 = yes ; then
17507                 ol_cv_lib_db=-ldb-2
17508         fi
17509 fi
17510
17511 if test $ol_cv_lib_db = no ; then
17512         echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6
17513 echo "configure:17514: checking for Berkeley DB link (-ldb1)" >&5
17514 if eval "test \"\${ol_cv_db_db1+set}\" = set"; then
17515   echo $ac_n "(cached) $ac_c" 1>&6
17516 else
17517   
17518         ol_DB_LIB=-ldb1
17519         ol_LIBS=$LIBS
17520         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17521
17522         cat > conftest.$ac_ext <<EOF
17523 #line 17524 "configure"
17524 #include "confdefs.h"
17525
17526 #ifdef HAVE_DB_185_H
17527 # include <db_185.h>
17528 #else
17529 # include <db.h>
17530 #endif
17531
17532 #ifndef DB_VERSION_MAJOR
17533 # define DB_VERSION_MAJOR 1
17534 #endif
17535
17536 #ifndef NULL
17537 #define NULL ((void*)0)
17538 #endif
17539
17540 int main() {
17541
17542 #if DB_VERSION_MAJOR > 1
17543         {
17544                 char *version;
17545                 int major, minor, patch;
17546
17547                 version = db_version( &major, &minor, &patch );
17548
17549                 if( major != DB_VERSION_MAJOR ||
17550                         minor < DB_VERSION_MINOR )
17551                 {
17552                         printf("Berkeley DB version mismatch\n"
17553                                 "\texpected: %s\n\tgot: %s\n",
17554                                 DB_VERSION_STRING, version);
17555                         return 1;
17556                 }
17557         }
17558 #endif
17559
17560 #if DB_VERSION_MAJOR > 2
17561         db_env_create( NULL, 0 );
17562 #elif DB_VERSION_MAJOR > 1
17563         db_appexit( NULL );
17564 #else
17565         (void) dbopen( NULL, 0, 0, 0, NULL);
17566 #endif
17567
17568 ; return 0; }
17569 EOF
17570 if { (eval echo configure:17571: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17571   rm -rf conftest*
17572   ol_cv_db_db1=yes
17573 else
17574   echo "configure: failed program was:" >&5
17575   cat conftest.$ac_ext >&5
17576   rm -rf conftest*
17577   ol_cv_db_db1=no
17578 fi
17579 rm -f conftest*
17580
17581         LIBS="$ol_LIBS"
17582
17583 fi
17584
17585 echo "$ac_t""$ol_cv_db_db1" 1>&6
17586
17587         if test $ol_cv_db_db1 = yes ; then
17588                 ol_cv_lib_db=-ldb1
17589         fi
17590 fi
17591
17592 if test $ol_cv_lib_db = no ; then
17593         echo $ac_n "checking for Berkeley DB link (-ldb-1)""... $ac_c" 1>&6
17594 echo "configure:17595: checking for Berkeley DB link (-ldb-1)" >&5
17595 if eval "test \"\${ol_cv_db_db_1+set}\" = set"; then
17596   echo $ac_n "(cached) $ac_c" 1>&6
17597 else
17598   
17599         ol_DB_LIB=-ldb-1
17600         ol_LIBS=$LIBS
17601         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17602
17603         cat > conftest.$ac_ext <<EOF
17604 #line 17605 "configure"
17605 #include "confdefs.h"
17606
17607 #ifdef HAVE_DB_185_H
17608 # include <db_185.h>
17609 #else
17610 # include <db.h>
17611 #endif
17612
17613 #ifndef DB_VERSION_MAJOR
17614 # define DB_VERSION_MAJOR 1
17615 #endif
17616
17617 #ifndef NULL
17618 #define NULL ((void*)0)
17619 #endif
17620
17621 int main() {
17622
17623 #if DB_VERSION_MAJOR > 1
17624         {
17625                 char *version;
17626                 int major, minor, patch;
17627
17628                 version = db_version( &major, &minor, &patch );
17629
17630                 if( major != DB_VERSION_MAJOR ||
17631                         minor < DB_VERSION_MINOR )
17632                 {
17633                         printf("Berkeley DB version mismatch\n"
17634                                 "\texpected: %s\n\tgot: %s\n",
17635                                 DB_VERSION_STRING, version);
17636                         return 1;
17637                 }
17638         }
17639 #endif
17640
17641 #if DB_VERSION_MAJOR > 2
17642         db_env_create( NULL, 0 );
17643 #elif DB_VERSION_MAJOR > 1
17644         db_appexit( NULL );
17645 #else
17646         (void) dbopen( NULL, 0, 0, 0, NULL);
17647 #endif
17648
17649 ; return 0; }
17650 EOF
17651 if { (eval echo configure:17652: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17652   rm -rf conftest*
17653   ol_cv_db_db_1=yes
17654 else
17655   echo "configure: failed program was:" >&5
17656   cat conftest.$ac_ext >&5
17657   rm -rf conftest*
17658   ol_cv_db_db_1=no
17659 fi
17660 rm -f conftest*
17661
17662         LIBS="$ol_LIBS"
17663
17664 fi
17665
17666 echo "$ac_t""$ol_cv_db_db_1" 1>&6
17667
17668         if test $ol_cv_db_db_1 = yes ; then
17669                 ol_cv_lib_db=-ldb-1
17670         fi
17671 fi
17672
17673
17674                 if test "$ol_cv_lib_db" != no ; then
17675                         ol_cv_berkeley_db=yes
17676                 fi
17677         fi
17678 fi
17679
17680         else
17681                 ol_cv_berkeley_db=no
17682 for ac_hdr in db.h
17683 do
17684 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
17685 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
17686 echo "configure:17687: checking for $ac_hdr" >&5
17687 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
17688   echo $ac_n "(cached) $ac_c" 1>&6
17689 else
17690   cat > conftest.$ac_ext <<EOF
17691 #line 17692 "configure"
17692 #include "confdefs.h"
17693 #include <$ac_hdr>
17694 EOF
17695 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
17696 { (eval echo configure:17697: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
17697 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
17698 if test -z "$ac_err"; then
17699   rm -rf conftest*
17700   eval "ac_cv_header_$ac_safe=yes"
17701 else
17702   echo "$ac_err" >&5
17703   echo "configure: failed program was:" >&5
17704   cat conftest.$ac_ext >&5
17705   rm -rf conftest*
17706   eval "ac_cv_header_$ac_safe=no"
17707 fi
17708 rm -f conftest*
17709 fi
17710 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
17711   echo "$ac_t""yes" 1>&6
17712     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
17713   cat >> confdefs.h <<EOF
17714 #define $ac_tr_hdr 1
17715 EOF
17716  
17717 else
17718   echo "$ac_t""no" 1>&6
17719 fi
17720 done
17721
17722 if test $ac_cv_header_db_h = yes; then
17723         ol_cv_lib_db=no
17724 if test $ol_cv_lib_db = no ; then
17725         echo $ac_n "checking for Berkeley DB link (default)""... $ac_c" 1>&6
17726 echo "configure:17727: checking for Berkeley DB link (default)" >&5
17727 if eval "test \"\${ol_cv_db_none+set}\" = set"; then
17728   echo $ac_n "(cached) $ac_c" 1>&6
17729 else
17730   
17731         ol_DB_LIB=
17732         ol_LIBS=$LIBS
17733         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17734
17735         cat > conftest.$ac_ext <<EOF
17736 #line 17737 "configure"
17737 #include "confdefs.h"
17738
17739 #ifdef HAVE_DB_185_H
17740 # include <db_185.h>
17741 #else
17742 # include <db.h>
17743 #endif
17744
17745 #ifndef DB_VERSION_MAJOR
17746 # define DB_VERSION_MAJOR 1
17747 #endif
17748
17749 #ifndef NULL
17750 #define NULL ((void*)0)
17751 #endif
17752
17753 int main() {
17754
17755 #if DB_VERSION_MAJOR > 1
17756         {
17757                 char *version;
17758                 int major, minor, patch;
17759
17760                 version = db_version( &major, &minor, &patch );
17761
17762                 if( major != DB_VERSION_MAJOR ||
17763                         minor < DB_VERSION_MINOR )
17764                 {
17765                         printf("Berkeley DB version mismatch\n"
17766                                 "\texpected: %s\n\tgot: %s\n",
17767                                 DB_VERSION_STRING, version);
17768                         return 1;
17769                 }
17770         }
17771 #endif
17772
17773 #if DB_VERSION_MAJOR > 2
17774         db_env_create( NULL, 0 );
17775 #elif DB_VERSION_MAJOR > 1
17776         db_appexit( NULL );
17777 #else
17778         (void) dbopen( NULL, 0, 0, 0, NULL);
17779 #endif
17780
17781 ; return 0; }
17782 EOF
17783 if { (eval echo configure:17784: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17784   rm -rf conftest*
17785   ol_cv_db_none=yes
17786 else
17787   echo "configure: failed program was:" >&5
17788   cat conftest.$ac_ext >&5
17789   rm -rf conftest*
17790   ol_cv_db_none=no
17791 fi
17792 rm -f conftest*
17793
17794         LIBS="$ol_LIBS"
17795
17796 fi
17797
17798 echo "$ac_t""$ol_cv_db_none" 1>&6
17799
17800         if test $ol_cv_db_none = yes ; then
17801                 ol_cv_lib_db=yes
17802         fi
17803 fi
17804
17805 if test $ol_cv_lib_db = no ; then
17806         echo $ac_n "checking for Berkeley DB link (-ldb42)""... $ac_c" 1>&6
17807 echo "configure:17808: checking for Berkeley DB link (-ldb42)" >&5
17808 if eval "test \"\${ol_cv_db_db42+set}\" = set"; then
17809   echo $ac_n "(cached) $ac_c" 1>&6
17810 else
17811   
17812         ol_DB_LIB=-ldb42
17813         ol_LIBS=$LIBS
17814         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17815
17816         cat > conftest.$ac_ext <<EOF
17817 #line 17818 "configure"
17818 #include "confdefs.h"
17819
17820 #ifdef HAVE_DB_185_H
17821 # include <db_185.h>
17822 #else
17823 # include <db.h>
17824 #endif
17825
17826 #ifndef DB_VERSION_MAJOR
17827 # define DB_VERSION_MAJOR 1
17828 #endif
17829
17830 #ifndef NULL
17831 #define NULL ((void*)0)
17832 #endif
17833
17834 int main() {
17835
17836 #if DB_VERSION_MAJOR > 1
17837         {
17838                 char *version;
17839                 int major, minor, patch;
17840
17841                 version = db_version( &major, &minor, &patch );
17842
17843                 if( major != DB_VERSION_MAJOR ||
17844                         minor < DB_VERSION_MINOR )
17845                 {
17846                         printf("Berkeley DB version mismatch\n"
17847                                 "\texpected: %s\n\tgot: %s\n",
17848                                 DB_VERSION_STRING, version);
17849                         return 1;
17850                 }
17851         }
17852 #endif
17853
17854 #if DB_VERSION_MAJOR > 2
17855         db_env_create( NULL, 0 );
17856 #elif DB_VERSION_MAJOR > 1
17857         db_appexit( NULL );
17858 #else
17859         (void) dbopen( NULL, 0, 0, 0, NULL);
17860 #endif
17861
17862 ; return 0; }
17863 EOF
17864 if { (eval echo configure:17865: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17865   rm -rf conftest*
17866   ol_cv_db_db42=yes
17867 else
17868   echo "configure: failed program was:" >&5
17869   cat conftest.$ac_ext >&5
17870   rm -rf conftest*
17871   ol_cv_db_db42=no
17872 fi
17873 rm -f conftest*
17874
17875         LIBS="$ol_LIBS"
17876
17877 fi
17878
17879 echo "$ac_t""$ol_cv_db_db42" 1>&6
17880
17881         if test $ol_cv_db_db42 = yes ; then
17882                 ol_cv_lib_db=-ldb42
17883         fi
17884 fi
17885
17886 if test $ol_cv_lib_db = no ; then
17887         echo $ac_n "checking for Berkeley DB link (-ldb-42)""... $ac_c" 1>&6
17888 echo "configure:17889: checking for Berkeley DB link (-ldb-42)" >&5
17889 if eval "test \"\${ol_cv_db_db_42+set}\" = set"; then
17890   echo $ac_n "(cached) $ac_c" 1>&6
17891 else
17892   
17893         ol_DB_LIB=-ldb-42
17894         ol_LIBS=$LIBS
17895         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17896
17897         cat > conftest.$ac_ext <<EOF
17898 #line 17899 "configure"
17899 #include "confdefs.h"
17900
17901 #ifdef HAVE_DB_185_H
17902 # include <db_185.h>
17903 #else
17904 # include <db.h>
17905 #endif
17906
17907 #ifndef DB_VERSION_MAJOR
17908 # define DB_VERSION_MAJOR 1
17909 #endif
17910
17911 #ifndef NULL
17912 #define NULL ((void*)0)
17913 #endif
17914
17915 int main() {
17916
17917 #if DB_VERSION_MAJOR > 1
17918         {
17919                 char *version;
17920                 int major, minor, patch;
17921
17922                 version = db_version( &major, &minor, &patch );
17923
17924                 if( major != DB_VERSION_MAJOR ||
17925                         minor < DB_VERSION_MINOR )
17926                 {
17927                         printf("Berkeley DB version mismatch\n"
17928                                 "\texpected: %s\n\tgot: %s\n",
17929                                 DB_VERSION_STRING, version);
17930                         return 1;
17931                 }
17932         }
17933 #endif
17934
17935 #if DB_VERSION_MAJOR > 2
17936         db_env_create( NULL, 0 );
17937 #elif DB_VERSION_MAJOR > 1
17938         db_appexit( NULL );
17939 #else
17940         (void) dbopen( NULL, 0, 0, 0, NULL);
17941 #endif
17942
17943 ; return 0; }
17944 EOF
17945 if { (eval echo configure:17946: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17946   rm -rf conftest*
17947   ol_cv_db_db_42=yes
17948 else
17949   echo "configure: failed program was:" >&5
17950   cat conftest.$ac_ext >&5
17951   rm -rf conftest*
17952   ol_cv_db_db_42=no
17953 fi
17954 rm -f conftest*
17955
17956         LIBS="$ol_LIBS"
17957
17958 fi
17959
17960 echo "$ac_t""$ol_cv_db_db_42" 1>&6
17961
17962         if test $ol_cv_db_db_42 = yes ; then
17963                 ol_cv_lib_db=-ldb-42
17964         fi
17965 fi
17966
17967 if test $ol_cv_lib_db = no ; then
17968         echo $ac_n "checking for Berkeley DB link (-ldb-4.2)""... $ac_c" 1>&6
17969 echo "configure:17970: checking for Berkeley DB link (-ldb-4.2)" >&5
17970 if eval "test \"\${ol_cv_db_db_4_dot_2+set}\" = set"; then
17971   echo $ac_n "(cached) $ac_c" 1>&6
17972 else
17973   
17974         ol_DB_LIB=-ldb-4.2
17975         ol_LIBS=$LIBS
17976         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17977
17978         cat > conftest.$ac_ext <<EOF
17979 #line 17980 "configure"
17980 #include "confdefs.h"
17981
17982 #ifdef HAVE_DB_185_H
17983 # include <db_185.h>
17984 #else
17985 # include <db.h>
17986 #endif
17987
17988 #ifndef DB_VERSION_MAJOR
17989 # define DB_VERSION_MAJOR 1
17990 #endif
17991
17992 #ifndef NULL
17993 #define NULL ((void*)0)
17994 #endif
17995
17996 int main() {
17997
17998 #if DB_VERSION_MAJOR > 1
17999         {
18000                 char *version;
18001                 int major, minor, patch;
18002
18003                 version = db_version( &major, &minor, &patch );
18004
18005                 if( major != DB_VERSION_MAJOR ||
18006                         minor < DB_VERSION_MINOR )
18007                 {
18008                         printf("Berkeley DB version mismatch\n"
18009                                 "\texpected: %s\n\tgot: %s\n",
18010                                 DB_VERSION_STRING, version);
18011                         return 1;
18012                 }
18013         }
18014 #endif
18015
18016 #if DB_VERSION_MAJOR > 2
18017         db_env_create( NULL, 0 );
18018 #elif DB_VERSION_MAJOR > 1
18019         db_appexit( NULL );
18020 #else
18021         (void) dbopen( NULL, 0, 0, 0, NULL);
18022 #endif
18023
18024 ; return 0; }
18025 EOF
18026 if { (eval echo configure:18027: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18027   rm -rf conftest*
18028   ol_cv_db_db_4_dot_2=yes
18029 else
18030   echo "configure: failed program was:" >&5
18031   cat conftest.$ac_ext >&5
18032   rm -rf conftest*
18033   ol_cv_db_db_4_dot_2=no
18034 fi
18035 rm -f conftest*
18036
18037         LIBS="$ol_LIBS"
18038
18039 fi
18040
18041 echo "$ac_t""$ol_cv_db_db_4_dot_2" 1>&6
18042
18043         if test $ol_cv_db_db_4_dot_2 = yes ; then
18044                 ol_cv_lib_db=-ldb-4.2
18045         fi
18046 fi
18047
18048 if test $ol_cv_lib_db = no ; then
18049         echo $ac_n "checking for Berkeley DB link (-ldb-4-2)""... $ac_c" 1>&6
18050 echo "configure:18051: checking for Berkeley DB link (-ldb-4-2)" >&5
18051 if eval "test \"\${ol_cv_db_db_4_2+set}\" = set"; then
18052   echo $ac_n "(cached) $ac_c" 1>&6
18053 else
18054   
18055         ol_DB_LIB=-ldb-4-2
18056         ol_LIBS=$LIBS
18057         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18058
18059         cat > conftest.$ac_ext <<EOF
18060 #line 18061 "configure"
18061 #include "confdefs.h"
18062
18063 #ifdef HAVE_DB_185_H
18064 # include <db_185.h>
18065 #else
18066 # include <db.h>
18067 #endif
18068
18069 #ifndef DB_VERSION_MAJOR
18070 # define DB_VERSION_MAJOR 1
18071 #endif
18072
18073 #ifndef NULL
18074 #define NULL ((void*)0)
18075 #endif
18076
18077 int main() {
18078
18079 #if DB_VERSION_MAJOR > 1
18080         {
18081                 char *version;
18082                 int major, minor, patch;
18083
18084                 version = db_version( &major, &minor, &patch );
18085
18086                 if( major != DB_VERSION_MAJOR ||
18087                         minor < DB_VERSION_MINOR )
18088                 {
18089                         printf("Berkeley DB version mismatch\n"
18090                                 "\texpected: %s\n\tgot: %s\n",
18091                                 DB_VERSION_STRING, version);
18092                         return 1;
18093                 }
18094         }
18095 #endif
18096
18097 #if DB_VERSION_MAJOR > 2
18098         db_env_create( NULL, 0 );
18099 #elif DB_VERSION_MAJOR > 1
18100         db_appexit( NULL );
18101 #else
18102         (void) dbopen( NULL, 0, 0, 0, NULL);
18103 #endif
18104
18105 ; return 0; }
18106 EOF
18107 if { (eval echo configure:18108: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18108   rm -rf conftest*
18109   ol_cv_db_db_4_2=yes
18110 else
18111   echo "configure: failed program was:" >&5
18112   cat conftest.$ac_ext >&5
18113   rm -rf conftest*
18114   ol_cv_db_db_4_2=no
18115 fi
18116 rm -f conftest*
18117
18118         LIBS="$ol_LIBS"
18119
18120 fi
18121
18122 echo "$ac_t""$ol_cv_db_db_4_2" 1>&6
18123
18124         if test $ol_cv_db_db_4_2 = yes ; then
18125                 ol_cv_lib_db=-ldb-4-2
18126         fi
18127 fi
18128
18129 if test $ol_cv_lib_db = no ; then
18130         echo $ac_n "checking for Berkeley DB link (-ldb-4)""... $ac_c" 1>&6
18131 echo "configure:18132: checking for Berkeley DB link (-ldb-4)" >&5
18132 if eval "test \"\${ol_cv_db_db_4+set}\" = set"; then
18133   echo $ac_n "(cached) $ac_c" 1>&6
18134 else
18135   
18136         ol_DB_LIB=-ldb-4
18137         ol_LIBS=$LIBS
18138         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18139
18140         cat > conftest.$ac_ext <<EOF
18141 #line 18142 "configure"
18142 #include "confdefs.h"
18143
18144 #ifdef HAVE_DB_185_H
18145 # include <db_185.h>
18146 #else
18147 # include <db.h>
18148 #endif
18149
18150 #ifndef DB_VERSION_MAJOR
18151 # define DB_VERSION_MAJOR 1
18152 #endif
18153
18154 #ifndef NULL
18155 #define NULL ((void*)0)
18156 #endif
18157
18158 int main() {
18159
18160 #if DB_VERSION_MAJOR > 1
18161         {
18162                 char *version;
18163                 int major, minor, patch;
18164
18165                 version = db_version( &major, &minor, &patch );
18166
18167                 if( major != DB_VERSION_MAJOR ||
18168                         minor < DB_VERSION_MINOR )
18169                 {
18170                         printf("Berkeley DB version mismatch\n"
18171                                 "\texpected: %s\n\tgot: %s\n",
18172                                 DB_VERSION_STRING, version);
18173                         return 1;
18174                 }
18175         }
18176 #endif
18177
18178 #if DB_VERSION_MAJOR > 2
18179         db_env_create( NULL, 0 );
18180 #elif DB_VERSION_MAJOR > 1
18181         db_appexit( NULL );
18182 #else
18183         (void) dbopen( NULL, 0, 0, 0, NULL);
18184 #endif
18185
18186 ; return 0; }
18187 EOF
18188 if { (eval echo configure:18189: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18189   rm -rf conftest*
18190   ol_cv_db_db_4=yes
18191 else
18192   echo "configure: failed program was:" >&5
18193   cat conftest.$ac_ext >&5
18194   rm -rf conftest*
18195   ol_cv_db_db_4=no
18196 fi
18197 rm -f conftest*
18198
18199         LIBS="$ol_LIBS"
18200
18201 fi
18202
18203 echo "$ac_t""$ol_cv_db_db_4" 1>&6
18204
18205         if test $ol_cv_db_db_4 = yes ; then
18206                 ol_cv_lib_db=-ldb-4
18207         fi
18208 fi
18209
18210 if test $ol_cv_lib_db = no ; then
18211         echo $ac_n "checking for Berkeley DB link (-ldb4)""... $ac_c" 1>&6
18212 echo "configure:18213: checking for Berkeley DB link (-ldb4)" >&5
18213 if eval "test \"\${ol_cv_db_db4+set}\" = set"; then
18214   echo $ac_n "(cached) $ac_c" 1>&6
18215 else
18216   
18217         ol_DB_LIB=-ldb4
18218         ol_LIBS=$LIBS
18219         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18220
18221         cat > conftest.$ac_ext <<EOF
18222 #line 18223 "configure"
18223 #include "confdefs.h"
18224
18225 #ifdef HAVE_DB_185_H
18226 # include <db_185.h>
18227 #else
18228 # include <db.h>
18229 #endif
18230
18231 #ifndef DB_VERSION_MAJOR
18232 # define DB_VERSION_MAJOR 1
18233 #endif
18234
18235 #ifndef NULL
18236 #define NULL ((void*)0)
18237 #endif
18238
18239 int main() {
18240
18241 #if DB_VERSION_MAJOR > 1
18242         {
18243                 char *version;
18244                 int major, minor, patch;
18245
18246                 version = db_version( &major, &minor, &patch );
18247
18248                 if( major != DB_VERSION_MAJOR ||
18249                         minor < DB_VERSION_MINOR )
18250                 {
18251                         printf("Berkeley DB version mismatch\n"
18252                                 "\texpected: %s\n\tgot: %s\n",
18253                                 DB_VERSION_STRING, version);
18254                         return 1;
18255                 }
18256         }
18257 #endif
18258
18259 #if DB_VERSION_MAJOR > 2
18260         db_env_create( NULL, 0 );
18261 #elif DB_VERSION_MAJOR > 1
18262         db_appexit( NULL );
18263 #else
18264         (void) dbopen( NULL, 0, 0, 0, NULL);
18265 #endif
18266
18267 ; return 0; }
18268 EOF
18269 if { (eval echo configure:18270: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18270   rm -rf conftest*
18271   ol_cv_db_db4=yes
18272 else
18273   echo "configure: failed program was:" >&5
18274   cat conftest.$ac_ext >&5
18275   rm -rf conftest*
18276   ol_cv_db_db4=no
18277 fi
18278 rm -f conftest*
18279
18280         LIBS="$ol_LIBS"
18281
18282 fi
18283
18284 echo "$ac_t""$ol_cv_db_db4" 1>&6
18285
18286         if test $ol_cv_db_db4 = yes ; then
18287                 ol_cv_lib_db=-ldb4
18288         fi
18289 fi
18290
18291 if test $ol_cv_lib_db = no ; then
18292         echo $ac_n "checking for Berkeley DB link (-ldb)""... $ac_c" 1>&6
18293 echo "configure:18294: checking for Berkeley DB link (-ldb)" >&5
18294 if eval "test \"\${ol_cv_db_db+set}\" = set"; then
18295   echo $ac_n "(cached) $ac_c" 1>&6
18296 else
18297   
18298         ol_DB_LIB=-ldb
18299         ol_LIBS=$LIBS
18300         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18301
18302         cat > conftest.$ac_ext <<EOF
18303 #line 18304 "configure"
18304 #include "confdefs.h"
18305
18306 #ifdef HAVE_DB_185_H
18307 # include <db_185.h>
18308 #else
18309 # include <db.h>
18310 #endif
18311
18312 #ifndef DB_VERSION_MAJOR
18313 # define DB_VERSION_MAJOR 1
18314 #endif
18315
18316 #ifndef NULL
18317 #define NULL ((void*)0)
18318 #endif
18319
18320 int main() {
18321
18322 #if DB_VERSION_MAJOR > 1
18323         {
18324                 char *version;
18325                 int major, minor, patch;
18326
18327                 version = db_version( &major, &minor, &patch );
18328
18329                 if( major != DB_VERSION_MAJOR ||
18330                         minor < DB_VERSION_MINOR )
18331                 {
18332                         printf("Berkeley DB version mismatch\n"
18333                                 "\texpected: %s\n\tgot: %s\n",
18334                                 DB_VERSION_STRING, version);
18335                         return 1;
18336                 }
18337         }
18338 #endif
18339
18340 #if DB_VERSION_MAJOR > 2
18341         db_env_create( NULL, 0 );
18342 #elif DB_VERSION_MAJOR > 1
18343         db_appexit( NULL );
18344 #else
18345         (void) dbopen( NULL, 0, 0, 0, NULL);
18346 #endif
18347
18348 ; return 0; }
18349 EOF
18350 if { (eval echo configure:18351: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18351   rm -rf conftest*
18352   ol_cv_db_db=yes
18353 else
18354   echo "configure: failed program was:" >&5
18355   cat conftest.$ac_ext >&5
18356   rm -rf conftest*
18357   ol_cv_db_db=no
18358 fi
18359 rm -f conftest*
18360
18361         LIBS="$ol_LIBS"
18362
18363 fi
18364
18365 echo "$ac_t""$ol_cv_db_db" 1>&6
18366
18367         if test $ol_cv_db_db = yes ; then
18368                 ol_cv_lib_db=-ldb
18369         fi
18370 fi
18371
18372 if test $ol_cv_lib_db = no ; then
18373         echo $ac_n "checking for Berkeley DB link (-ldb41)""... $ac_c" 1>&6
18374 echo "configure:18375: checking for Berkeley DB link (-ldb41)" >&5
18375 if eval "test \"\${ol_cv_db_db41+set}\" = set"; then
18376   echo $ac_n "(cached) $ac_c" 1>&6
18377 else
18378   
18379         ol_DB_LIB=-ldb41
18380         ol_LIBS=$LIBS
18381         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18382
18383         cat > conftest.$ac_ext <<EOF
18384 #line 18385 "configure"
18385 #include "confdefs.h"
18386
18387 #ifdef HAVE_DB_185_H
18388 # include <db_185.h>
18389 #else
18390 # include <db.h>
18391 #endif
18392
18393 #ifndef DB_VERSION_MAJOR
18394 # define DB_VERSION_MAJOR 1
18395 #endif
18396
18397 #ifndef NULL
18398 #define NULL ((void*)0)
18399 #endif
18400
18401 int main() {
18402
18403 #if DB_VERSION_MAJOR > 1
18404         {
18405                 char *version;
18406                 int major, minor, patch;
18407
18408                 version = db_version( &major, &minor, &patch );
18409
18410                 if( major != DB_VERSION_MAJOR ||
18411                         minor < DB_VERSION_MINOR )
18412                 {
18413                         printf("Berkeley DB version mismatch\n"
18414                                 "\texpected: %s\n\tgot: %s\n",
18415                                 DB_VERSION_STRING, version);
18416                         return 1;
18417                 }
18418         }
18419 #endif
18420
18421 #if DB_VERSION_MAJOR > 2
18422         db_env_create( NULL, 0 );
18423 #elif DB_VERSION_MAJOR > 1
18424         db_appexit( NULL );
18425 #else
18426         (void) dbopen( NULL, 0, 0, 0, NULL);
18427 #endif
18428
18429 ; return 0; }
18430 EOF
18431 if { (eval echo configure:18432: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18432   rm -rf conftest*
18433   ol_cv_db_db41=yes
18434 else
18435   echo "configure: failed program was:" >&5
18436   cat conftest.$ac_ext >&5
18437   rm -rf conftest*
18438   ol_cv_db_db41=no
18439 fi
18440 rm -f conftest*
18441
18442         LIBS="$ol_LIBS"
18443
18444 fi
18445
18446 echo "$ac_t""$ol_cv_db_db41" 1>&6
18447
18448         if test $ol_cv_db_db41 = yes ; then
18449                 ol_cv_lib_db=-ldb41
18450         fi
18451 fi
18452
18453 if test $ol_cv_lib_db = no ; then
18454         echo $ac_n "checking for Berkeley DB link (-ldb-41)""... $ac_c" 1>&6
18455 echo "configure:18456: checking for Berkeley DB link (-ldb-41)" >&5
18456 if eval "test \"\${ol_cv_db_db_41+set}\" = set"; then
18457   echo $ac_n "(cached) $ac_c" 1>&6
18458 else
18459   
18460         ol_DB_LIB=-ldb-41
18461         ol_LIBS=$LIBS
18462         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18463
18464         cat > conftest.$ac_ext <<EOF
18465 #line 18466 "configure"
18466 #include "confdefs.h"
18467
18468 #ifdef HAVE_DB_185_H
18469 # include <db_185.h>
18470 #else
18471 # include <db.h>
18472 #endif
18473
18474 #ifndef DB_VERSION_MAJOR
18475 # define DB_VERSION_MAJOR 1
18476 #endif
18477
18478 #ifndef NULL
18479 #define NULL ((void*)0)
18480 #endif
18481
18482 int main() {
18483
18484 #if DB_VERSION_MAJOR > 1
18485         {
18486                 char *version;
18487                 int major, minor, patch;
18488
18489                 version = db_version( &major, &minor, &patch );
18490
18491                 if( major != DB_VERSION_MAJOR ||
18492                         minor < DB_VERSION_MINOR )
18493                 {
18494                         printf("Berkeley DB version mismatch\n"
18495                                 "\texpected: %s\n\tgot: %s\n",
18496                                 DB_VERSION_STRING, version);
18497                         return 1;
18498                 }
18499         }
18500 #endif
18501
18502 #if DB_VERSION_MAJOR > 2
18503         db_env_create( NULL, 0 );
18504 #elif DB_VERSION_MAJOR > 1
18505         db_appexit( NULL );
18506 #else
18507         (void) dbopen( NULL, 0, 0, 0, NULL);
18508 #endif
18509
18510 ; return 0; }
18511 EOF
18512 if { (eval echo configure:18513: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18513   rm -rf conftest*
18514   ol_cv_db_db_41=yes
18515 else
18516   echo "configure: failed program was:" >&5
18517   cat conftest.$ac_ext >&5
18518   rm -rf conftest*
18519   ol_cv_db_db_41=no
18520 fi
18521 rm -f conftest*
18522
18523         LIBS="$ol_LIBS"
18524
18525 fi
18526
18527 echo "$ac_t""$ol_cv_db_db_41" 1>&6
18528
18529         if test $ol_cv_db_db_41 = yes ; then
18530                 ol_cv_lib_db=-ldb-41
18531         fi
18532 fi
18533
18534 if test $ol_cv_lib_db = no ; then
18535         echo $ac_n "checking for Berkeley DB link (-ldb-4.1)""... $ac_c" 1>&6
18536 echo "configure:18537: checking for Berkeley DB link (-ldb-4.1)" >&5
18537 if eval "test \"\${ol_cv_db_db_4_dot_1+set}\" = set"; then
18538   echo $ac_n "(cached) $ac_c" 1>&6
18539 else
18540   
18541         ol_DB_LIB=-ldb-4.1
18542         ol_LIBS=$LIBS
18543         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18544
18545         cat > conftest.$ac_ext <<EOF
18546 #line 18547 "configure"
18547 #include "confdefs.h"
18548
18549 #ifdef HAVE_DB_185_H
18550 # include <db_185.h>
18551 #else
18552 # include <db.h>
18553 #endif
18554
18555 #ifndef DB_VERSION_MAJOR
18556 # define DB_VERSION_MAJOR 1
18557 #endif
18558
18559 #ifndef NULL
18560 #define NULL ((void*)0)
18561 #endif
18562
18563 int main() {
18564
18565 #if DB_VERSION_MAJOR > 1
18566         {
18567                 char *version;
18568                 int major, minor, patch;
18569
18570                 version = db_version( &major, &minor, &patch );
18571
18572                 if( major != DB_VERSION_MAJOR ||
18573                         minor < DB_VERSION_MINOR )
18574                 {
18575                         printf("Berkeley DB version mismatch\n"
18576                                 "\texpected: %s\n\tgot: %s\n",
18577                                 DB_VERSION_STRING, version);
18578                         return 1;
18579                 }
18580         }
18581 #endif
18582
18583 #if DB_VERSION_MAJOR > 2
18584         db_env_create( NULL, 0 );
18585 #elif DB_VERSION_MAJOR > 1
18586         db_appexit( NULL );
18587 #else
18588         (void) dbopen( NULL, 0, 0, 0, NULL);
18589 #endif
18590
18591 ; return 0; }
18592 EOF
18593 if { (eval echo configure:18594: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18594   rm -rf conftest*
18595   ol_cv_db_db_4_dot_1=yes
18596 else
18597   echo "configure: failed program was:" >&5
18598   cat conftest.$ac_ext >&5
18599   rm -rf conftest*
18600   ol_cv_db_db_4_dot_1=no
18601 fi
18602 rm -f conftest*
18603
18604         LIBS="$ol_LIBS"
18605
18606 fi
18607
18608 echo "$ac_t""$ol_cv_db_db_4_dot_1" 1>&6
18609
18610         if test $ol_cv_db_db_4_dot_1 = yes ; then
18611                 ol_cv_lib_db=-ldb-4.1
18612         fi
18613 fi
18614
18615 if test $ol_cv_lib_db = no ; then
18616         echo $ac_n "checking for Berkeley DB link (-ldb-4-1)""... $ac_c" 1>&6
18617 echo "configure:18618: checking for Berkeley DB link (-ldb-4-1)" >&5
18618 if eval "test \"\${ol_cv_db_db_4_1+set}\" = set"; then
18619   echo $ac_n "(cached) $ac_c" 1>&6
18620 else
18621   
18622         ol_DB_LIB=-ldb-4-1
18623         ol_LIBS=$LIBS
18624         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18625
18626         cat > conftest.$ac_ext <<EOF
18627 #line 18628 "configure"
18628 #include "confdefs.h"
18629
18630 #ifdef HAVE_DB_185_H
18631 # include <db_185.h>
18632 #else
18633 # include <db.h>
18634 #endif
18635
18636 #ifndef DB_VERSION_MAJOR
18637 # define DB_VERSION_MAJOR 1
18638 #endif
18639
18640 #ifndef NULL
18641 #define NULL ((void*)0)
18642 #endif
18643
18644 int main() {
18645
18646 #if DB_VERSION_MAJOR > 1
18647         {
18648                 char *version;
18649                 int major, minor, patch;
18650
18651                 version = db_version( &major, &minor, &patch );
18652
18653                 if( major != DB_VERSION_MAJOR ||
18654                         minor < DB_VERSION_MINOR )
18655                 {
18656                         printf("Berkeley DB version mismatch\n"
18657                                 "\texpected: %s\n\tgot: %s\n",
18658                                 DB_VERSION_STRING, version);
18659                         return 1;
18660                 }
18661         }
18662 #endif
18663
18664 #if DB_VERSION_MAJOR > 2
18665         db_env_create( NULL, 0 );
18666 #elif DB_VERSION_MAJOR > 1
18667         db_appexit( NULL );
18668 #else
18669         (void) dbopen( NULL, 0, 0, 0, NULL);
18670 #endif
18671
18672 ; return 0; }
18673 EOF
18674 if { (eval echo configure:18675: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18675   rm -rf conftest*
18676   ol_cv_db_db_4_1=yes
18677 else
18678   echo "configure: failed program was:" >&5
18679   cat conftest.$ac_ext >&5
18680   rm -rf conftest*
18681   ol_cv_db_db_4_1=no
18682 fi
18683 rm -f conftest*
18684
18685         LIBS="$ol_LIBS"
18686
18687 fi
18688
18689 echo "$ac_t""$ol_cv_db_db_4_1" 1>&6
18690
18691         if test $ol_cv_db_db_4_1 = yes ; then
18692                 ol_cv_lib_db=-ldb-4-1
18693         fi
18694 fi
18695
18696 if test $ol_cv_lib_db = no ; then
18697         echo $ac_n "checking for Berkeley DB link (-ldb3)""... $ac_c" 1>&6
18698 echo "configure:18699: checking for Berkeley DB link (-ldb3)" >&5
18699 if eval "test \"\${ol_cv_db_db3+set}\" = set"; then
18700   echo $ac_n "(cached) $ac_c" 1>&6
18701 else
18702   
18703         ol_DB_LIB=-ldb3
18704         ol_LIBS=$LIBS
18705         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18706
18707         cat > conftest.$ac_ext <<EOF
18708 #line 18709 "configure"
18709 #include "confdefs.h"
18710
18711 #ifdef HAVE_DB_185_H
18712 # include <db_185.h>
18713 #else
18714 # include <db.h>
18715 #endif
18716
18717 #ifndef DB_VERSION_MAJOR
18718 # define DB_VERSION_MAJOR 1
18719 #endif
18720
18721 #ifndef NULL
18722 #define NULL ((void*)0)
18723 #endif
18724
18725 int main() {
18726
18727 #if DB_VERSION_MAJOR > 1
18728         {
18729                 char *version;
18730                 int major, minor, patch;
18731
18732                 version = db_version( &major, &minor, &patch );
18733
18734                 if( major != DB_VERSION_MAJOR ||
18735                         minor < DB_VERSION_MINOR )
18736                 {
18737                         printf("Berkeley DB version mismatch\n"
18738                                 "\texpected: %s\n\tgot: %s\n",
18739                                 DB_VERSION_STRING, version);
18740                         return 1;
18741                 }
18742         }
18743 #endif
18744
18745 #if DB_VERSION_MAJOR > 2
18746         db_env_create( NULL, 0 );
18747 #elif DB_VERSION_MAJOR > 1
18748         db_appexit( NULL );
18749 #else
18750         (void) dbopen( NULL, 0, 0, 0, NULL);
18751 #endif
18752
18753 ; return 0; }
18754 EOF
18755 if { (eval echo configure:18756: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18756   rm -rf conftest*
18757   ol_cv_db_db3=yes
18758 else
18759   echo "configure: failed program was:" >&5
18760   cat conftest.$ac_ext >&5
18761   rm -rf conftest*
18762   ol_cv_db_db3=no
18763 fi
18764 rm -f conftest*
18765
18766         LIBS="$ol_LIBS"
18767
18768 fi
18769
18770 echo "$ac_t""$ol_cv_db_db3" 1>&6
18771
18772         if test $ol_cv_db_db3 = yes ; then
18773                 ol_cv_lib_db=-ldb3
18774         fi
18775 fi
18776
18777 if test $ol_cv_lib_db = no ; then
18778         echo $ac_n "checking for Berkeley DB link (-ldb-3)""... $ac_c" 1>&6
18779 echo "configure:18780: checking for Berkeley DB link (-ldb-3)" >&5
18780 if eval "test \"\${ol_cv_db_db_3+set}\" = set"; then
18781   echo $ac_n "(cached) $ac_c" 1>&6
18782 else
18783   
18784         ol_DB_LIB=-ldb-3
18785         ol_LIBS=$LIBS
18786         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18787
18788         cat > conftest.$ac_ext <<EOF
18789 #line 18790 "configure"
18790 #include "confdefs.h"
18791
18792 #ifdef HAVE_DB_185_H
18793 # include <db_185.h>
18794 #else
18795 # include <db.h>
18796 #endif
18797
18798 #ifndef DB_VERSION_MAJOR
18799 # define DB_VERSION_MAJOR 1
18800 #endif
18801
18802 #ifndef NULL
18803 #define NULL ((void*)0)
18804 #endif
18805
18806 int main() {
18807
18808 #if DB_VERSION_MAJOR > 1
18809         {
18810                 char *version;
18811                 int major, minor, patch;
18812
18813                 version = db_version( &major, &minor, &patch );
18814
18815                 if( major != DB_VERSION_MAJOR ||
18816                         minor < DB_VERSION_MINOR )
18817                 {
18818                         printf("Berkeley DB version mismatch\n"
18819                                 "\texpected: %s\n\tgot: %s\n",
18820                                 DB_VERSION_STRING, version);
18821                         return 1;
18822                 }
18823         }
18824 #endif
18825
18826 #if DB_VERSION_MAJOR > 2
18827         db_env_create( NULL, 0 );
18828 #elif DB_VERSION_MAJOR > 1
18829         db_appexit( NULL );
18830 #else
18831         (void) dbopen( NULL, 0, 0, 0, NULL);
18832 #endif
18833
18834 ; return 0; }
18835 EOF
18836 if { (eval echo configure:18837: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18837   rm -rf conftest*
18838   ol_cv_db_db_3=yes
18839 else
18840   echo "configure: failed program was:" >&5
18841   cat conftest.$ac_ext >&5
18842   rm -rf conftest*
18843   ol_cv_db_db_3=no
18844 fi
18845 rm -f conftest*
18846
18847         LIBS="$ol_LIBS"
18848
18849 fi
18850
18851 echo "$ac_t""$ol_cv_db_db_3" 1>&6
18852
18853         if test $ol_cv_db_db_3 = yes ; then
18854                 ol_cv_lib_db=-ldb-3
18855         fi
18856 fi
18857
18858 if test $ol_cv_lib_db = no ; then
18859         echo $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6
18860 echo "configure:18861: checking for Berkeley DB link (-ldb2)" >&5
18861 if eval "test \"\${ol_cv_db_db2+set}\" = set"; then
18862   echo $ac_n "(cached) $ac_c" 1>&6
18863 else
18864   
18865         ol_DB_LIB=-ldb2
18866         ol_LIBS=$LIBS
18867         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18868
18869         cat > conftest.$ac_ext <<EOF
18870 #line 18871 "configure"
18871 #include "confdefs.h"
18872
18873 #ifdef HAVE_DB_185_H
18874 # include <db_185.h>
18875 #else
18876 # include <db.h>
18877 #endif
18878
18879 #ifndef DB_VERSION_MAJOR
18880 # define DB_VERSION_MAJOR 1
18881 #endif
18882
18883 #ifndef NULL
18884 #define NULL ((void*)0)
18885 #endif
18886
18887 int main() {
18888
18889 #if DB_VERSION_MAJOR > 1
18890         {
18891                 char *version;
18892                 int major, minor, patch;
18893
18894                 version = db_version( &major, &minor, &patch );
18895
18896                 if( major != DB_VERSION_MAJOR ||
18897                         minor < DB_VERSION_MINOR )
18898                 {
18899                         printf("Berkeley DB version mismatch\n"
18900                                 "\texpected: %s\n\tgot: %s\n",
18901                                 DB_VERSION_STRING, version);
18902                         return 1;
18903                 }
18904         }
18905 #endif
18906
18907 #if DB_VERSION_MAJOR > 2
18908         db_env_create( NULL, 0 );
18909 #elif DB_VERSION_MAJOR > 1
18910         db_appexit( NULL );
18911 #else
18912         (void) dbopen( NULL, 0, 0, 0, NULL);
18913 #endif
18914
18915 ; return 0; }
18916 EOF
18917 if { (eval echo configure:18918: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18918   rm -rf conftest*
18919   ol_cv_db_db2=yes
18920 else
18921   echo "configure: failed program was:" >&5
18922   cat conftest.$ac_ext >&5
18923   rm -rf conftest*
18924   ol_cv_db_db2=no
18925 fi
18926 rm -f conftest*
18927
18928         LIBS="$ol_LIBS"
18929
18930 fi
18931
18932 echo "$ac_t""$ol_cv_db_db2" 1>&6
18933
18934         if test $ol_cv_db_db2 = yes ; then
18935                 ol_cv_lib_db=-ldb2
18936         fi
18937 fi
18938
18939 if test $ol_cv_lib_db = no ; then
18940         echo $ac_n "checking for Berkeley DB link (-ldb-2)""... $ac_c" 1>&6
18941 echo "configure:18942: checking for Berkeley DB link (-ldb-2)" >&5
18942 if eval "test \"\${ol_cv_db_db_2+set}\" = set"; then
18943   echo $ac_n "(cached) $ac_c" 1>&6
18944 else
18945   
18946         ol_DB_LIB=-ldb-2
18947         ol_LIBS=$LIBS
18948         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18949
18950         cat > conftest.$ac_ext <<EOF
18951 #line 18952 "configure"
18952 #include "confdefs.h"
18953
18954 #ifdef HAVE_DB_185_H
18955 # include <db_185.h>
18956 #else
18957 # include <db.h>
18958 #endif
18959
18960 #ifndef DB_VERSION_MAJOR
18961 # define DB_VERSION_MAJOR 1
18962 #endif
18963
18964 #ifndef NULL
18965 #define NULL ((void*)0)
18966 #endif
18967
18968 int main() {
18969
18970 #if DB_VERSION_MAJOR > 1
18971         {
18972                 char *version;
18973                 int major, minor, patch;
18974
18975                 version = db_version( &major, &minor, &patch );
18976
18977                 if( major != DB_VERSION_MAJOR ||
18978                         minor < DB_VERSION_MINOR )
18979                 {
18980                         printf("Berkeley DB version mismatch\n"
18981                                 "\texpected: %s\n\tgot: %s\n",
18982                                 DB_VERSION_STRING, version);
18983                         return 1;
18984                 }
18985         }
18986 #endif
18987
18988 #if DB_VERSION_MAJOR > 2
18989         db_env_create( NULL, 0 );
18990 #elif DB_VERSION_MAJOR > 1
18991         db_appexit( NULL );
18992 #else
18993         (void) dbopen( NULL, 0, 0, 0, NULL);
18994 #endif
18995
18996 ; return 0; }
18997 EOF
18998 if { (eval echo configure:18999: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18999   rm -rf conftest*
19000   ol_cv_db_db_2=yes
19001 else
19002   echo "configure: failed program was:" >&5
19003   cat conftest.$ac_ext >&5
19004   rm -rf conftest*
19005   ol_cv_db_db_2=no
19006 fi
19007 rm -f conftest*
19008
19009         LIBS="$ol_LIBS"
19010
19011 fi
19012
19013 echo "$ac_t""$ol_cv_db_db_2" 1>&6
19014
19015         if test $ol_cv_db_db_2 = yes ; then
19016                 ol_cv_lib_db=-ldb-2
19017         fi
19018 fi
19019
19020 if test $ol_cv_lib_db = no ; then
19021         echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6
19022 echo "configure:19023: checking for Berkeley DB link (-ldb1)" >&5
19023 if eval "test \"\${ol_cv_db_db1+set}\" = set"; then
19024   echo $ac_n "(cached) $ac_c" 1>&6
19025 else
19026   
19027         ol_DB_LIB=-ldb1
19028         ol_LIBS=$LIBS
19029         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19030
19031         cat > conftest.$ac_ext <<EOF
19032 #line 19033 "configure"
19033 #include "confdefs.h"
19034
19035 #ifdef HAVE_DB_185_H
19036 # include <db_185.h>
19037 #else
19038 # include <db.h>
19039 #endif
19040
19041 #ifndef DB_VERSION_MAJOR
19042 # define DB_VERSION_MAJOR 1
19043 #endif
19044
19045 #ifndef NULL
19046 #define NULL ((void*)0)
19047 #endif
19048
19049 int main() {
19050
19051 #if DB_VERSION_MAJOR > 1
19052         {
19053                 char *version;
19054                 int major, minor, patch;
19055
19056                 version = db_version( &major, &minor, &patch );
19057
19058                 if( major != DB_VERSION_MAJOR ||
19059                         minor < DB_VERSION_MINOR )
19060                 {
19061                         printf("Berkeley DB version mismatch\n"
19062                                 "\texpected: %s\n\tgot: %s\n",
19063                                 DB_VERSION_STRING, version);
19064                         return 1;
19065                 }
19066         }
19067 #endif
19068
19069 #if DB_VERSION_MAJOR > 2
19070         db_env_create( NULL, 0 );
19071 #elif DB_VERSION_MAJOR > 1
19072         db_appexit( NULL );
19073 #else
19074         (void) dbopen( NULL, 0, 0, 0, NULL);
19075 #endif
19076
19077 ; return 0; }
19078 EOF
19079 if { (eval echo configure:19080: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19080   rm -rf conftest*
19081   ol_cv_db_db1=yes
19082 else
19083   echo "configure: failed program was:" >&5
19084   cat conftest.$ac_ext >&5
19085   rm -rf conftest*
19086   ol_cv_db_db1=no
19087 fi
19088 rm -f conftest*
19089
19090         LIBS="$ol_LIBS"
19091
19092 fi
19093
19094 echo "$ac_t""$ol_cv_db_db1" 1>&6
19095
19096         if test $ol_cv_db_db1 = yes ; then
19097                 ol_cv_lib_db=-ldb1
19098         fi
19099 fi
19100
19101 if test $ol_cv_lib_db = no ; then
19102         echo $ac_n "checking for Berkeley DB link (-ldb-1)""... $ac_c" 1>&6
19103 echo "configure:19104: checking for Berkeley DB link (-ldb-1)" >&5
19104 if eval "test \"\${ol_cv_db_db_1+set}\" = set"; then
19105   echo $ac_n "(cached) $ac_c" 1>&6
19106 else
19107   
19108         ol_DB_LIB=-ldb-1
19109         ol_LIBS=$LIBS
19110         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19111
19112         cat > conftest.$ac_ext <<EOF
19113 #line 19114 "configure"
19114 #include "confdefs.h"
19115
19116 #ifdef HAVE_DB_185_H
19117 # include <db_185.h>
19118 #else
19119 # include <db.h>
19120 #endif
19121
19122 #ifndef DB_VERSION_MAJOR
19123 # define DB_VERSION_MAJOR 1
19124 #endif
19125
19126 #ifndef NULL
19127 #define NULL ((void*)0)
19128 #endif
19129
19130 int main() {
19131
19132 #if DB_VERSION_MAJOR > 1
19133         {
19134                 char *version;
19135                 int major, minor, patch;
19136
19137                 version = db_version( &major, &minor, &patch );
19138
19139                 if( major != DB_VERSION_MAJOR ||
19140                         minor < DB_VERSION_MINOR )
19141                 {
19142                         printf("Berkeley DB version mismatch\n"
19143                                 "\texpected: %s\n\tgot: %s\n",
19144                                 DB_VERSION_STRING, version);
19145                         return 1;
19146                 }
19147         }
19148 #endif
19149
19150 #if DB_VERSION_MAJOR > 2
19151         db_env_create( NULL, 0 );
19152 #elif DB_VERSION_MAJOR > 1
19153         db_appexit( NULL );
19154 #else
19155         (void) dbopen( NULL, 0, 0, 0, NULL);
19156 #endif
19157
19158 ; return 0; }
19159 EOF
19160 if { (eval echo configure:19161: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19161   rm -rf conftest*
19162   ol_cv_db_db_1=yes
19163 else
19164   echo "configure: failed program was:" >&5
19165   cat conftest.$ac_ext >&5
19166   rm -rf conftest*
19167   ol_cv_db_db_1=no
19168 fi
19169 rm -f conftest*
19170
19171         LIBS="$ol_LIBS"
19172
19173 fi
19174
19175 echo "$ac_t""$ol_cv_db_db_1" 1>&6
19176
19177         if test $ol_cv_db_db_1 = yes ; then
19178                 ol_cv_lib_db=-ldb-1
19179         fi
19180 fi
19181
19182
19183         if test "$ol_cv_lib_db" != no ; then
19184                 ol_cv_berkeley_db=yes
19185                 echo $ac_n "checking for Berkeley DB thread support""... $ac_c" 1>&6
19186 echo "configure:19187: checking for Berkeley DB thread support" >&5
19187 if eval "test \"\${ol_cv_berkeley_db_thread+set}\" = set"; then
19188   echo $ac_n "(cached) $ac_c" 1>&6
19189 else
19190   
19191         ol_LIBS="$LIBS"
19192         LIBS="$LTHREAD_LIBS $LIBS"
19193         if test $ol_cv_lib_db != yes ; then
19194                 LIBS="$ol_cv_lib_db $LIBS"
19195         fi
19196
19197         if test "$cross_compiling" = yes; then
19198   ol_cv_berkeley_db_thread=cross
19199 else
19200   cat > conftest.$ac_ext <<EOF
19201 #line 19202 "configure"
19202 #include "confdefs.h"
19203
19204 #ifdef HAVE_DB_185_H
19205         choke me;
19206 #else
19207 #include <db.h>
19208 #endif
19209 #ifndef NULL
19210 #define NULL ((void *)0)
19211 #endif
19212 main()
19213 {
19214         int rc;
19215         u_int32_t flags = DB_CREATE |
19216 #ifdef DB_PRIVATE
19217                 DB_PRIVATE |
19218 #endif
19219                 DB_THREAD;
19220
19221 #if DB_VERSION_MAJOR > 2
19222         DB_ENV *env = NULL;
19223
19224         rc = db_env_create( &env, 0 );
19225
19226         flags |= DB_INIT_MPOOL;
19227 #ifdef DB_MPOOL_PRIVATE
19228         flags |= DB_MPOOL_PRIVATE;
19229 #endif
19230
19231         if( rc ) {
19232                 printf("BerkeleyDB: %s\n", db_strerror(rc) );
19233                 return rc;
19234         }
19235
19236 #if (DB_VERSION_MAJOR > 3) || (DB_VERSION_MINOR >= 1)
19237         rc = env->open( env, NULL, flags, 0 );
19238 #else
19239         rc = env->open( env, NULL, NULL, flags, 0 );
19240 #endif
19241
19242         if ( rc == 0 ) {
19243                 rc = env->close( env, 0 );
19244         }
19245
19246         if( rc ) {
19247                 printf("BerkeleyDB: %s\n", db_strerror(rc) );
19248                 return rc;
19249         }
19250
19251 #else
19252         DB_ENV env;
19253         memset( &env, '\0', sizeof(env) );
19254
19255         rc = db_appinit( NULL, NULL, &env, flags );
19256
19257         if( rc == 0 ) {
19258                 db_appexit( &env );
19259         }
19260
19261         unlink("__db_mpool.share");
19262         unlink("__db_lock.share");
19263 #endif
19264
19265         return rc;
19266 }
19267 EOF
19268 if { (eval echo configure:19269: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
19269 then
19270   ol_cv_berkeley_db_thread=yes
19271 else
19272   echo "configure: failed program was:" >&5
19273   cat conftest.$ac_ext >&5
19274   rm -fr conftest*
19275   ol_cv_berkeley_db_thread=no
19276 fi
19277 rm -fr conftest*
19278 fi
19279
19280
19281         LIBS="$ol_LIBS"
19282
19283 fi
19284
19285 echo "$ac_t""$ol_cv_berkeley_db_thread" 1>&6
19286
19287         if test $ol_cv_berkeley_db_thread != no ; then
19288                 cat >> confdefs.h <<\EOF
19289 #define HAVE_BERKELEY_DB_THREAD 1
19290 EOF
19291
19292         fi
19293
19294         fi
19295 fi
19296
19297         fi
19298
19299         if test $ol_cv_berkeley_db != no ; then
19300                 cat >> confdefs.h <<\EOF
19301 #define HAVE_BERKELEY_DB 1
19302 EOF
19303
19304
19305                 ol_link_ldbm=berkeley
19306                 ol_with_ldbm_api=berkeley
19307
19308                 if test $ol_with_ldbm_type = hash ; then
19309                         cat >> confdefs.h <<\EOF
19310 #define LDBM_USE_DBHASH 1
19311 EOF
19312
19313                 else
19314                         cat >> confdefs.h <<\EOF
19315 #define LDBM_USE_DBBTREE 1
19316 EOF
19317
19318                 fi
19319
19320                                                 if test $ol_cv_lib_db != yes ; then
19321                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db"
19322                 fi
19323         fi
19324 fi
19325
19326 if test $ol_enable_bdb = yes -a $ol_link_ldbm != berkeley ; then
19327         { echo "configure: error: BDB: BerkeleyDB not available" 1>&2; exit 1; }
19328 elif test $ol_enable_bdb != no -a $ol_link_ldbm = berkeley ; then
19329         echo $ac_n "checking Berkeley DB version for BDB backend""... $ac_c" 1>&6
19330 echo "configure:19331: checking Berkeley DB version for BDB backend" >&5
19331 if eval "test \"\${ol_cv_bdb_compat+set}\" = set"; then
19332   echo $ac_n "(cached) $ac_c" 1>&6
19333 else
19334   
19335         cat > conftest.$ac_ext <<EOF
19336 #line 19337 "configure"
19337 #include "confdefs.h"
19338
19339 #include <db.h>
19340
19341  /* this check could be improved */
19342 #ifndef DB_VERSION_MAJOR
19343 #       define DB_VERSION_MAJOR 1
19344 #endif
19345 #ifndef DB_VERSION_MINOR
19346 #       define DB_VERSION_MINOR 0
19347 #endif
19348
19349 /* require 4.2 or later */
19350 #if (DB_VERSION_MAJOR >= 4) && (DB_VERSION_MINOR >= 2)
19351         __db_version_compat
19352 #endif
19353         
19354 EOF
19355 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
19356   egrep "__db_version_compat" >/dev/null 2>&1; then
19357   rm -rf conftest*
19358   ol_cv_bdb_compat=yes
19359 else
19360   rm -rf conftest*
19361   ol_cv_bdb_compat=no
19362 fi
19363 rm -f conftest*
19364
19365 fi
19366
19367 echo "$ac_t""$ol_cv_bdb_compat" 1>&6
19368
19369
19370         if test $ol_cv_bdb_compat = yes ; then
19371                 ol_enable_bdb=yes
19372         elif test $ol_enable_bdb = yes ; then
19373                 { echo "configure: error: BDB: BerkeleyDB version incompatible" 1>&2; exit 1; }
19374         else
19375                 ol_enable_bdb=no
19376         fi
19377 fi
19378 if test $ol_enable_hdb = yes -a $ol_link_ldbm != berkeley ; then
19379         { echo "configure: error: HDB: BerkeleyDB not available" 1>&2; exit 1; }
19380 fi
19381
19382 if test $ol_link_ldbm = no -a $ol_with_ldbm_type = btree ; then
19383         echo "configure: warning: Could not find LDBM with BTREE support" 1>&2
19384         ol_with_ldbm_api=none
19385 fi
19386
19387 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = mdbm ; then
19388         echo $ac_n "checking for MDBM library""... $ac_c" 1>&6
19389 echo "configure:19390: checking for MDBM library" >&5
19390 if eval "test \"\${ol_cv_lib_mdbm+set}\" = set"; then
19391   echo $ac_n "(cached) $ac_c" 1>&6
19392 else
19393         ol_LIBS="$LIBS"
19394         echo $ac_n "checking for mdbm_set_chain""... $ac_c" 1>&6
19395 echo "configure:19396: checking for mdbm_set_chain" >&5
19396 if eval "test \"\${ac_cv_func_mdbm_set_chain+set}\" = set"; then
19397   echo $ac_n "(cached) $ac_c" 1>&6
19398 else
19399   cat > conftest.$ac_ext <<EOF
19400 #line 19401 "configure"
19401 #include "confdefs.h"
19402 /* System header to define __stub macros and hopefully few prototypes,
19403     which can conflict with char mdbm_set_chain(); below.  */
19404 #include <assert.h>
19405 /* Override any gcc2 internal prototype to avoid an error.  */
19406 /* We use char because int might match the return type of a gcc2
19407     builtin and then its argument prototype would still apply.  */
19408 char mdbm_set_chain();
19409 char (*f)();
19410
19411 int main() {
19412
19413 /* The GNU C library defines this for functions which it implements
19414     to always fail with ENOSYS.  Some functions are actually named
19415     something starting with __ and the normal name is an alias.  */
19416 #if defined (__stub_mdbm_set_chain) || defined (__stub___mdbm_set_chain)
19417 choke me
19418 #else
19419 f = mdbm_set_chain;
19420 #endif
19421
19422 ; return 0; }
19423 EOF
19424 if { (eval echo configure:19425: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19425   rm -rf conftest*
19426   eval "ac_cv_func_mdbm_set_chain=yes"
19427 else
19428   echo "configure: failed program was:" >&5
19429   cat conftest.$ac_ext >&5
19430   rm -rf conftest*
19431   eval "ac_cv_func_mdbm_set_chain=no"
19432 fi
19433 rm -f conftest*
19434 fi
19435
19436 if eval "test \"`echo '$ac_cv_func_'mdbm_set_chain`\" = yes"; then
19437   echo "$ac_t""yes" 1>&6
19438   ol_cv_lib_mdbm=yes
19439 else
19440   echo "$ac_t""no" 1>&6
19441
19442                 echo $ac_n "checking for mdbm_set_chain in -lmdbm""... $ac_c" 1>&6
19443 echo "configure:19444: checking for mdbm_set_chain in -lmdbm" >&5
19444 ac_lib_var=`echo mdbm'_'mdbm_set_chain | sed 'y%./+-:%__p__%'`
19445 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19446   echo $ac_n "(cached) $ac_c" 1>&6
19447 else
19448   ac_save_LIBS="$LIBS"
19449 LIBS="-lmdbm  $LIBS"
19450 cat > conftest.$ac_ext <<EOF
19451 #line 19452 "configure"
19452 #include "confdefs.h"
19453 /* Override any gcc2 internal prototype to avoid an error.  */
19454 /* We use char because int might match the return type of a gcc2
19455     builtin and then its argument prototype would still apply.  */
19456 char mdbm_set_chain();
19457
19458 int main() {
19459 mdbm_set_chain()
19460 ; return 0; }
19461 EOF
19462 if { (eval echo configure:19463: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19463   rm -rf conftest*
19464   eval "ac_cv_lib_$ac_lib_var=yes"
19465 else
19466   echo "configure: failed program was:" >&5
19467   cat conftest.$ac_ext >&5
19468   rm -rf conftest*
19469   eval "ac_cv_lib_$ac_lib_var=no"
19470 fi
19471 rm -f conftest*
19472 LIBS="$ac_save_LIBS"
19473
19474 fi
19475 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19476   echo "$ac_t""yes" 1>&6
19477   ol_cv_lib_mdbm=-lmdbm
19478 else
19479   echo "$ac_t""no" 1>&6
19480 ol_cv_lib_mdbm=no
19481 fi
19482
19483         
19484 fi
19485
19486         LIBS="$ol_LIBS"
19487
19488 fi
19489
19490 echo "$ac_t""$ol_cv_lib_mdbm" 1>&6
19491
19492
19493  for ac_hdr in mdbm.h
19494 do
19495 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
19496 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
19497 echo "configure:19498: checking for $ac_hdr" >&5
19498 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
19499   echo $ac_n "(cached) $ac_c" 1>&6
19500 else
19501   cat > conftest.$ac_ext <<EOF
19502 #line 19503 "configure"
19503 #include "confdefs.h"
19504 #include <$ac_hdr>
19505 EOF
19506 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
19507 { (eval echo configure:19508: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
19508 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
19509 if test -z "$ac_err"; then
19510   rm -rf conftest*
19511   eval "ac_cv_header_$ac_safe=yes"
19512 else
19513   echo "$ac_err" >&5
19514   echo "configure: failed program was:" >&5
19515   cat conftest.$ac_ext >&5
19516   rm -rf conftest*
19517   eval "ac_cv_header_$ac_safe=no"
19518 fi
19519 rm -f conftest*
19520 fi
19521 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
19522   echo "$ac_t""yes" 1>&6
19523     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
19524   cat >> confdefs.h <<EOF
19525 #define $ac_tr_hdr 1
19526 EOF
19527  
19528 else
19529   echo "$ac_t""no" 1>&6
19530 fi
19531 done
19532
19533  echo $ac_n "checking for db""... $ac_c" 1>&6
19534 echo "configure:19535: checking for db" >&5
19535 if eval "test \"\${ol_cv_mdbm+set}\" = set"; then
19536   echo $ac_n "(cached) $ac_c" 1>&6
19537 else
19538   
19539         if test $ol_cv_lib_mdbm = no -o $ac_cv_header_mdbm_h = no ; then
19540                 ol_cv_mdbm=no
19541         else
19542                 ol_cv_mdbm=yes
19543         fi
19544
19545 fi
19546
19547 echo "$ac_t""$ol_cv_mdbm" 1>&6
19548  if test $ol_cv_mdbm = yes ; then
19549         cat >> confdefs.h <<\EOF
19550 #define HAVE_MDBM 1
19551 EOF
19552
19553  fi
19554
19555
19556         if test $ol_cv_mdbm = yes ; then
19557                 ol_link_ldbm=mdbm
19558                 ol_with_ldbm_api=mdbm
19559                 if test $ol_cv_lib_mdbm != yes ; then
19560                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_mdbm"
19561                 fi
19562         fi
19563 fi
19564
19565 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = gdbm ; then
19566         echo $ac_n "checking for GDBM library""... $ac_c" 1>&6
19567 echo "configure:19568: checking for GDBM library" >&5
19568 if eval "test \"\${ol_cv_lib_gdbm+set}\" = set"; then
19569   echo $ac_n "(cached) $ac_c" 1>&6
19570 else
19571         ol_LIBS="$LIBS"
19572         echo $ac_n "checking for gdbm_open""... $ac_c" 1>&6
19573 echo "configure:19574: checking for gdbm_open" >&5
19574 if eval "test \"\${ac_cv_func_gdbm_open+set}\" = set"; then
19575   echo $ac_n "(cached) $ac_c" 1>&6
19576 else
19577   cat > conftest.$ac_ext <<EOF
19578 #line 19579 "configure"
19579 #include "confdefs.h"
19580 /* System header to define __stub macros and hopefully few prototypes,
19581     which can conflict with char gdbm_open(); below.  */
19582 #include <assert.h>
19583 /* Override any gcc2 internal prototype to avoid an error.  */
19584 /* We use char because int might match the return type of a gcc2
19585     builtin and then its argument prototype would still apply.  */
19586 char gdbm_open();
19587 char (*f)();
19588
19589 int main() {
19590
19591 /* The GNU C library defines this for functions which it implements
19592     to always fail with ENOSYS.  Some functions are actually named
19593     something starting with __ and the normal name is an alias.  */
19594 #if defined (__stub_gdbm_open) || defined (__stub___gdbm_open)
19595 choke me
19596 #else
19597 f = gdbm_open;
19598 #endif
19599
19600 ; return 0; }
19601 EOF
19602 if { (eval echo configure:19603: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19603   rm -rf conftest*
19604   eval "ac_cv_func_gdbm_open=yes"
19605 else
19606   echo "configure: failed program was:" >&5
19607   cat conftest.$ac_ext >&5
19608   rm -rf conftest*
19609   eval "ac_cv_func_gdbm_open=no"
19610 fi
19611 rm -f conftest*
19612 fi
19613
19614 if eval "test \"`echo '$ac_cv_func_'gdbm_open`\" = yes"; then
19615   echo "$ac_t""yes" 1>&6
19616   ol_cv_lib_gdbm=yes
19617 else
19618   echo "$ac_t""no" 1>&6
19619
19620                 echo $ac_n "checking for gdbm_open in -lgdbm""... $ac_c" 1>&6
19621 echo "configure:19622: checking for gdbm_open in -lgdbm" >&5
19622 ac_lib_var=`echo gdbm'_'gdbm_open | sed 'y%./+-:%__p__%'`
19623 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19624   echo $ac_n "(cached) $ac_c" 1>&6
19625 else
19626   ac_save_LIBS="$LIBS"
19627 LIBS="-lgdbm  $LIBS"
19628 cat > conftest.$ac_ext <<EOF
19629 #line 19630 "configure"
19630 #include "confdefs.h"
19631 /* Override any gcc2 internal prototype to avoid an error.  */
19632 /* We use char because int might match the return type of a gcc2
19633     builtin and then its argument prototype would still apply.  */
19634 char gdbm_open();
19635
19636 int main() {
19637 gdbm_open()
19638 ; return 0; }
19639 EOF
19640 if { (eval echo configure:19641: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19641   rm -rf conftest*
19642   eval "ac_cv_lib_$ac_lib_var=yes"
19643 else
19644   echo "configure: failed program was:" >&5
19645   cat conftest.$ac_ext >&5
19646   rm -rf conftest*
19647   eval "ac_cv_lib_$ac_lib_var=no"
19648 fi
19649 rm -f conftest*
19650 LIBS="$ac_save_LIBS"
19651
19652 fi
19653 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19654   echo "$ac_t""yes" 1>&6
19655   ol_cv_lib_gdbm=-lgdbm
19656 else
19657   echo "$ac_t""no" 1>&6
19658 ol_cv_lib_gdbm=no
19659 fi
19660
19661         
19662 fi
19663
19664         LIBS="$ol_LIBS"
19665
19666 fi
19667
19668 echo "$ac_t""$ol_cv_lib_gdbm" 1>&6
19669
19670
19671  for ac_hdr in gdbm.h
19672 do
19673 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
19674 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
19675 echo "configure:19676: checking for $ac_hdr" >&5
19676 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
19677   echo $ac_n "(cached) $ac_c" 1>&6
19678 else
19679   cat > conftest.$ac_ext <<EOF
19680 #line 19681 "configure"
19681 #include "confdefs.h"
19682 #include <$ac_hdr>
19683 EOF
19684 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
19685 { (eval echo configure:19686: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
19686 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
19687 if test -z "$ac_err"; then
19688   rm -rf conftest*
19689   eval "ac_cv_header_$ac_safe=yes"
19690 else
19691   echo "$ac_err" >&5
19692   echo "configure: failed program was:" >&5
19693   cat conftest.$ac_ext >&5
19694   rm -rf conftest*
19695   eval "ac_cv_header_$ac_safe=no"
19696 fi
19697 rm -f conftest*
19698 fi
19699 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
19700   echo "$ac_t""yes" 1>&6
19701     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
19702   cat >> confdefs.h <<EOF
19703 #define $ac_tr_hdr 1
19704 EOF
19705  
19706 else
19707   echo "$ac_t""no" 1>&6
19708 fi
19709 done
19710
19711  echo $ac_n "checking for db""... $ac_c" 1>&6
19712 echo "configure:19713: checking for db" >&5
19713 if eval "test \"\${ol_cv_gdbm+set}\" = set"; then
19714   echo $ac_n "(cached) $ac_c" 1>&6
19715 else
19716   
19717         if test $ol_cv_lib_gdbm = no -o $ac_cv_header_gdbm_h = no ; then
19718                 ol_cv_gdbm=no
19719         else
19720                 ol_cv_gdbm=yes
19721         fi
19722
19723 fi
19724
19725 echo "$ac_t""$ol_cv_gdbm" 1>&6
19726  if test $ol_cv_gdbm = yes ; then
19727         cat >> confdefs.h <<\EOF
19728 #define HAVE_GDBM 1
19729 EOF
19730
19731  fi
19732
19733
19734         if test $ol_cv_gdbm = yes ; then
19735                 ol_link_ldbm=gdbm
19736                 ol_with_ldbm_api=gdbm
19737
19738                 if test $ol_cv_lib_gdbm != yes ; then
19739                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_gdbm"
19740                 fi
19741         fi
19742 fi
19743
19744 if test $ol_with_ldbm_api = ndbm ; then
19745         echo $ac_n "checking for NDBM library""... $ac_c" 1>&6
19746 echo "configure:19747: checking for NDBM library" >&5
19747 if eval "test \"\${ol_cv_lib_ndbm+set}\" = set"; then
19748   echo $ac_n "(cached) $ac_c" 1>&6
19749 else
19750         ol_LIBS="$LIBS"
19751         echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
19752 echo "configure:19753: checking for dbm_open" >&5
19753 if eval "test \"\${ac_cv_func_dbm_open+set}\" = set"; then
19754   echo $ac_n "(cached) $ac_c" 1>&6
19755 else
19756   cat > conftest.$ac_ext <<EOF
19757 #line 19758 "configure"
19758 #include "confdefs.h"
19759 /* System header to define __stub macros and hopefully few prototypes,
19760     which can conflict with char dbm_open(); below.  */
19761 #include <assert.h>
19762 /* Override any gcc2 internal prototype to avoid an error.  */
19763 /* We use char because int might match the return type of a gcc2
19764     builtin and then its argument prototype would still apply.  */
19765 char dbm_open();
19766 char (*f)();
19767
19768 int main() {
19769
19770 /* The GNU C library defines this for functions which it implements
19771     to always fail with ENOSYS.  Some functions are actually named
19772     something starting with __ and the normal name is an alias.  */
19773 #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
19774 choke me
19775 #else
19776 f = dbm_open;
19777 #endif
19778
19779 ; return 0; }
19780 EOF
19781 if { (eval echo configure:19782: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19782   rm -rf conftest*
19783   eval "ac_cv_func_dbm_open=yes"
19784 else
19785   echo "configure: failed program was:" >&5
19786   cat conftest.$ac_ext >&5
19787   rm -rf conftest*
19788   eval "ac_cv_func_dbm_open=no"
19789 fi
19790 rm -f conftest*
19791 fi
19792
19793 if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then
19794   echo "$ac_t""yes" 1>&6
19795   ol_cv_lib_ndbm=yes
19796 else
19797   echo "$ac_t""no" 1>&6
19798
19799                 echo $ac_n "checking for dbm_open in -lndbm""... $ac_c" 1>&6
19800 echo "configure:19801: checking for dbm_open in -lndbm" >&5
19801 ac_lib_var=`echo ndbm'_'dbm_open | sed 'y%./+-:%__p__%'`
19802 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19803   echo $ac_n "(cached) $ac_c" 1>&6
19804 else
19805   ac_save_LIBS="$LIBS"
19806 LIBS="-lndbm  $LIBS"
19807 cat > conftest.$ac_ext <<EOF
19808 #line 19809 "configure"
19809 #include "confdefs.h"
19810 /* Override any gcc2 internal prototype to avoid an error.  */
19811 /* We use char because int might match the return type of a gcc2
19812     builtin and then its argument prototype would still apply.  */
19813 char dbm_open();
19814
19815 int main() {
19816 dbm_open()
19817 ; return 0; }
19818 EOF
19819 if { (eval echo configure:19820: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19820   rm -rf conftest*
19821   eval "ac_cv_lib_$ac_lib_var=yes"
19822 else
19823   echo "configure: failed program was:" >&5
19824   cat conftest.$ac_ext >&5
19825   rm -rf conftest*
19826   eval "ac_cv_lib_$ac_lib_var=no"
19827 fi
19828 rm -f conftest*
19829 LIBS="$ac_save_LIBS"
19830
19831 fi
19832 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19833   echo "$ac_t""yes" 1>&6
19834   ol_cv_lib_ndbm=-lndbm
19835 else
19836   echo "$ac_t""no" 1>&6
19837
19838                         echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
19839 echo "configure:19840: checking for dbm_open in -ldbm" >&5
19840 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-:%__p__%'`
19841 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19842   echo $ac_n "(cached) $ac_c" 1>&6
19843 else
19844   ac_save_LIBS="$LIBS"
19845 LIBS="-ldbm  $LIBS"
19846 cat > conftest.$ac_ext <<EOF
19847 #line 19848 "configure"
19848 #include "confdefs.h"
19849 /* Override any gcc2 internal prototype to avoid an error.  */
19850 /* We use char because int might match the return type of a gcc2
19851     builtin and then its argument prototype would still apply.  */
19852 char dbm_open();
19853
19854 int main() {
19855 dbm_open()
19856 ; return 0; }
19857 EOF
19858 if { (eval echo configure:19859: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19859   rm -rf conftest*
19860   eval "ac_cv_lib_$ac_lib_var=yes"
19861 else
19862   echo "configure: failed program was:" >&5
19863   cat conftest.$ac_ext >&5
19864   rm -rf conftest*
19865   eval "ac_cv_lib_$ac_lib_var=no"
19866 fi
19867 rm -f conftest*
19868 LIBS="$ac_save_LIBS"
19869
19870 fi
19871 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19872   echo "$ac_t""yes" 1>&6
19873   ol_cv_lib_ndbm=-ldbm
19874 else
19875   echo "$ac_t""no" 1>&6
19876 ol_cv_lib_ndbm=no
19877 fi
19878                 
19879 fi
19880
19881         
19882 fi
19883
19884         LIBS="$ol_LIBS"
19885
19886 fi
19887
19888 echo "$ac_t""$ol_cv_lib_ndbm" 1>&6
19889
19890
19891  for ac_hdr in ndbm.h
19892 do
19893 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
19894 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
19895 echo "configure:19896: checking for $ac_hdr" >&5
19896 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
19897   echo $ac_n "(cached) $ac_c" 1>&6
19898 else
19899   cat > conftest.$ac_ext <<EOF
19900 #line 19901 "configure"
19901 #include "confdefs.h"
19902 #include <$ac_hdr>
19903 EOF
19904 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
19905 { (eval echo configure:19906: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
19906 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
19907 if test -z "$ac_err"; then
19908   rm -rf conftest*
19909   eval "ac_cv_header_$ac_safe=yes"
19910 else
19911   echo "$ac_err" >&5
19912   echo "configure: failed program was:" >&5
19913   cat conftest.$ac_ext >&5
19914   rm -rf conftest*
19915   eval "ac_cv_header_$ac_safe=no"
19916 fi
19917 rm -f conftest*
19918 fi
19919 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
19920   echo "$ac_t""yes" 1>&6
19921     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
19922   cat >> confdefs.h <<EOF
19923 #define $ac_tr_hdr 1
19924 EOF
19925  
19926 else
19927   echo "$ac_t""no" 1>&6
19928 fi
19929 done
19930
19931  echo $ac_n "checking for db""... $ac_c" 1>&6
19932 echo "configure:19933: checking for db" >&5
19933 if eval "test \"\${ol_cv_ndbm+set}\" = set"; then
19934   echo $ac_n "(cached) $ac_c" 1>&6
19935 else
19936   
19937         if test $ol_cv_lib_ndbm = no -o $ac_cv_header_ndbm_h = no ; then
19938                 ol_cv_ndbm=no
19939         else
19940                 ol_cv_ndbm=yes
19941         fi
19942
19943 fi
19944
19945 echo "$ac_t""$ol_cv_ndbm" 1>&6
19946  if test $ol_cv_ndbm = yes ; then
19947         cat >> confdefs.h <<\EOF
19948 #define HAVE_NDBM 1
19949 EOF
19950
19951  fi
19952
19953
19954         if test $ol_cv_ndbm = yes ; then
19955                 ol_link_ldbm=ndbm
19956                 ol_with_ldbm_api=ndbm
19957
19958                 if test $ol_cv_lib_ndbm != yes ; then
19959                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_ndbm"
19960                 fi
19961         fi
19962 fi
19963
19964 if test $ol_link_ldbm = no -a $ol_enable_ldbm != no ; then
19965         echo "configure: warning: could not find suitable LDBM backend" 1>&2
19966         if test $ol_enable_ldbm = yes ; then
19967                 { echo "configure: error: select appropriate LDBM options or disable" 1>&2; exit 1; }
19968         fi
19969
19970         echo "configure: warning: disabling LDBM" 1>&2
19971         ol_enable_ldbm=no
19972 fi
19973
19974
19975 if test $ol_enable_dynamic = yes -a $enable_shared = yes ; then
19976         BUILD_LIBS_DYNAMIC=shared
19977         cat >> confdefs.h <<\EOF
19978 #define LDAP_LIBS_DYNAMIC 1
19979 EOF
19980
19981         LTSTATIC=""
19982 else
19983         BUILD_LIBS_DYNAMIC=static
19984         LTSTATIC="-static"
19985 fi
19986
19987 if test $ol_enable_wrappers != no ; then
19988         for ac_hdr in tcpd.h
19989 do
19990 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
19991 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
19992 echo "configure:19993: checking for $ac_hdr" >&5
19993 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
19994   echo $ac_n "(cached) $ac_c" 1>&6
19995 else
19996   cat > conftest.$ac_ext <<EOF
19997 #line 19998 "configure"
19998 #include "confdefs.h"
19999 #include <$ac_hdr>
20000 EOF
20001 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20002 { (eval echo configure:20003: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20003 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20004 if test -z "$ac_err"; then
20005   rm -rf conftest*
20006   eval "ac_cv_header_$ac_safe=yes"
20007 else
20008   echo "$ac_err" >&5
20009   echo "configure: failed program was:" >&5
20010   cat conftest.$ac_ext >&5
20011   rm -rf conftest*
20012   eval "ac_cv_header_$ac_safe=no"
20013 fi
20014 rm -f conftest*
20015 fi
20016 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
20017   echo "$ac_t""yes" 1>&6
20018     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
20019   cat >> confdefs.h <<EOF
20020 #define $ac_tr_hdr 1
20021 EOF
20022  
20023                 echo $ac_n "checking for TCP wrappers library""... $ac_c" 1>&6
20024 echo "configure:20025: checking for TCP wrappers library" >&5
20025                 save_LIBS="$LIBS"
20026                 LIBS="$LIBS -lwrap"
20027                 cat > conftest.$ac_ext <<EOF
20028 #line 20029 "configure"
20029 #include "confdefs.h"
20030
20031 #include <tcpd.h>
20032 int allow_severity = 0;
20033 int deny_severity  = 0;
20034
20035 struct request_info *req;
20036                 
20037 int main() {
20038
20039 hosts_access(req)
20040                 
20041 ; return 0; }
20042 EOF
20043 if { (eval echo configure:20044: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20044   rm -rf conftest*
20045   echo "$ac_t""-lwrap" 1>&6
20046                 have_wrappers=yes
20047                 LIBS="$save_LIBS"
20048 else
20049   echo "configure: failed program was:" >&5
20050   cat conftest.$ac_ext >&5
20051   rm -rf conftest*
20052   
20053                                 LIBS="$LIBS -lnsl"
20054                 cat > conftest.$ac_ext <<EOF
20055 #line 20056 "configure"
20056 #include "confdefs.h"
20057
20058 #include <tcpd.h>
20059 int allow_severity = 0;
20060 int deny_severity  = 0;
20061
20062 struct request_info *req;
20063                 
20064 int main() {
20065
20066 hosts_access(req)
20067                 
20068 ; return 0; }
20069 EOF
20070 if { (eval echo configure:20071: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20071   rm -rf conftest*
20072   echo "$ac_t""-lwrap -lnsl" 1>&6
20073                 have_wrappers=yes
20074                 LIBS="$save_LIBS -lnsl"
20075 else
20076   echo "configure: failed program was:" >&5
20077   cat conftest.$ac_ext >&5
20078   rm -rf conftest*
20079   
20080                 echo "$ac_t""no" 1>&6
20081                 have_wrappers=no
20082                 LIBS=$save_LIBS
20083 fi
20084 rm -f conftest*
20085 fi
20086 rm -f conftest*
20087 else
20088   echo "$ac_t""no" 1>&6
20089 have_wrappers=no
20090 fi
20091 done
20092
20093
20094         if test $have_wrappers = yes ; then
20095                 cat >> confdefs.h <<\EOF
20096 #define HAVE_TCPD 1
20097 EOF
20098
20099                 WRAP_LIBS="-lwrap"
20100         elif test $ol_enable_wrappers = yes ; then
20101                 { echo "configure: error: could not find TCP wrappers, select apppropriate options or disable" 1>&2; exit 1; }
20102         else
20103                 echo "configure: warning: could not find TCP wrappers, support disabled" 1>&2
20104                 WRAP_LIBS=""
20105         fi
20106 fi
20107
20108 if test $ol_enable_syslog != no ; then
20109         echo $ac_n "checking for openlog""... $ac_c" 1>&6
20110 echo "configure:20111: checking for openlog" >&5
20111 if eval "test \"\${ac_cv_func_openlog+set}\" = set"; then
20112   echo $ac_n "(cached) $ac_c" 1>&6
20113 else
20114   cat > conftest.$ac_ext <<EOF
20115 #line 20116 "configure"
20116 #include "confdefs.h"
20117 /* System header to define __stub macros and hopefully few prototypes,
20118     which can conflict with char openlog(); below.  */
20119 #include <assert.h>
20120 /* Override any gcc2 internal prototype to avoid an error.  */
20121 /* We use char because int might match the return type of a gcc2
20122     builtin and then its argument prototype would still apply.  */
20123 char openlog();
20124 char (*f)();
20125
20126 int main() {
20127
20128 /* The GNU C library defines this for functions which it implements
20129     to always fail with ENOSYS.  Some functions are actually named
20130     something starting with __ and the normal name is an alias.  */
20131 #if defined (__stub_openlog) || defined (__stub___openlog)
20132 choke me
20133 #else
20134 f = openlog;
20135 #endif
20136
20137 ; return 0; }
20138 EOF
20139 if { (eval echo configure:20140: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20140   rm -rf conftest*
20141   eval "ac_cv_func_openlog=yes"
20142 else
20143   echo "configure: failed program was:" >&5
20144   cat conftest.$ac_ext >&5
20145   rm -rf conftest*
20146   eval "ac_cv_func_openlog=no"
20147 fi
20148 rm -f conftest*
20149 fi
20150
20151 if eval "test \"`echo '$ac_cv_func_'openlog`\" = yes"; then
20152   echo "$ac_t""yes" 1>&6
20153   :
20154 else
20155   echo "$ac_t""no" 1>&6
20156 fi
20157
20158         if test $ac_cv_func_openlog = no -a $ol_enable_syslog = yes; then
20159                 { echo "configure: error: could not find syslog" 1>&2; exit 1; }
20160         fi
20161         ol_enable_syslog=$ac_cv_func_openlog
20162 fi
20163
20164
20165 ol_link_sql=no
20166 if test $ol_enable_sql != no ; then
20167         for ac_hdr in sql.h sqlext.h
20168 do
20169 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
20170 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
20171 echo "configure:20172: checking for $ac_hdr" >&5
20172 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
20173   echo $ac_n "(cached) $ac_c" 1>&6
20174 else
20175   cat > conftest.$ac_ext <<EOF
20176 #line 20177 "configure"
20177 #include "confdefs.h"
20178 #include <$ac_hdr>
20179 EOF
20180 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20181 { (eval echo configure:20182: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20182 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20183 if test -z "$ac_err"; then
20184   rm -rf conftest*
20185   eval "ac_cv_header_$ac_safe=yes"
20186 else
20187   echo "$ac_err" >&5
20188   echo "configure: failed program was:" >&5
20189   cat conftest.$ac_ext >&5
20190   rm -rf conftest*
20191   eval "ac_cv_header_$ac_safe=no"
20192 fi
20193 rm -f conftest*
20194 fi
20195 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
20196   echo "$ac_t""yes" 1>&6
20197     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
20198   cat >> confdefs.h <<EOF
20199 #define $ac_tr_hdr 1
20200 EOF
20201  
20202 else
20203   echo "$ac_t""no" 1>&6
20204 { echo "configure: error: could not locate SQL headers" 1>&2; exit 1; }
20205         
20206 fi
20207 done
20208
20209
20210         echo $ac_n "checking for SQLDriverConnect in -liodbc""... $ac_c" 1>&6
20211 echo "configure:20212: checking for SQLDriverConnect in -liodbc" >&5
20212 ac_lib_var=`echo iodbc'_'SQLDriverConnect | sed 'y%./+-:%__p__%'`
20213 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20214   echo $ac_n "(cached) $ac_c" 1>&6
20215 else
20216   ac_save_LIBS="$LIBS"
20217 LIBS="-liodbc  $LIBS"
20218 cat > conftest.$ac_ext <<EOF
20219 #line 20220 "configure"
20220 #include "confdefs.h"
20221 /* Override any gcc2 internal prototype to avoid an error.  */
20222 /* We use char because int might match the return type of a gcc2
20223     builtin and then its argument prototype would still apply.  */
20224 char SQLDriverConnect();
20225
20226 int main() {
20227 SQLDriverConnect()
20228 ; return 0; }
20229 EOF
20230 if { (eval echo configure:20231: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20231   rm -rf conftest*
20232   eval "ac_cv_lib_$ac_lib_var=yes"
20233 else
20234   echo "configure: failed program was:" >&5
20235   cat conftest.$ac_ext >&5
20236   rm -rf conftest*
20237   eval "ac_cv_lib_$ac_lib_var=no"
20238 fi
20239 rm -f conftest*
20240 LIBS="$ac_save_LIBS"
20241
20242 fi
20243 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20244   echo "$ac_t""yes" 1>&6
20245   have_iodbc=yes
20246 else
20247   echo "$ac_t""no" 1>&6
20248 have_iodbc=no
20249 fi
20250
20251         if test $have_iodbc = yes ; then
20252                 ol_link_sql="-liodbc"
20253         else
20254                 echo $ac_n "checking for SQLDriverConnect in -lodbc""... $ac_c" 1>&6
20255 echo "configure:20256: checking for SQLDriverConnect in -lodbc" >&5
20256 ac_lib_var=`echo odbc'_'SQLDriverConnect | sed 'y%./+-:%__p__%'`
20257 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20258   echo $ac_n "(cached) $ac_c" 1>&6
20259 else
20260   ac_save_LIBS="$LIBS"
20261 LIBS="-lodbc  $LIBS"
20262 cat > conftest.$ac_ext <<EOF
20263 #line 20264 "configure"
20264 #include "confdefs.h"
20265 /* Override any gcc2 internal prototype to avoid an error.  */
20266 /* We use char because int might match the return type of a gcc2
20267     builtin and then its argument prototype would still apply.  */
20268 char SQLDriverConnect();
20269
20270 int main() {
20271 SQLDriverConnect()
20272 ; return 0; }
20273 EOF
20274 if { (eval echo configure:20275: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20275   rm -rf conftest*
20276   eval "ac_cv_lib_$ac_lib_var=yes"
20277 else
20278   echo "configure: failed program was:" >&5
20279   cat conftest.$ac_ext >&5
20280   rm -rf conftest*
20281   eval "ac_cv_lib_$ac_lib_var=no"
20282 fi
20283 rm -f conftest*
20284 LIBS="$ac_save_LIBS"
20285
20286 fi
20287 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20288   echo "$ac_t""yes" 1>&6
20289   have_odbc=yes
20290 else
20291   echo "$ac_t""no" 1>&6
20292 have_odbc=no
20293 fi
20294
20295                 if test $have_odbc = yes ; then
20296                         ol_link_sql="-lodbc"
20297                 fi
20298         fi
20299
20300         if test $ol_link_sql != no ; then
20301                 SLAPD_SQL_LIBS="$ol_link_sql"
20302
20303         elif test $ol_enable_sql != auto ; then
20304                 { echo "configure: error: could not locate suitable ODBC library" 1>&2; exit 1; }
20305         fi
20306 fi
20307
20308 ol_link_sasl=no
20309 ol_link_spasswd=no
20310 if test $ol_with_cyrus_sasl != no ; then
20311         for ac_hdr in sasl/sasl.h sasl.h
20312 do
20313 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
20314 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
20315 echo "configure:20316: checking for $ac_hdr" >&5
20316 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
20317   echo $ac_n "(cached) $ac_c" 1>&6
20318 else
20319   cat > conftest.$ac_ext <<EOF
20320 #line 20321 "configure"
20321 #include "confdefs.h"
20322 #include <$ac_hdr>
20323 EOF
20324 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20325 { (eval echo configure:20326: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20326 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20327 if test -z "$ac_err"; then
20328   rm -rf conftest*
20329   eval "ac_cv_header_$ac_safe=yes"
20330 else
20331   echo "$ac_err" >&5
20332   echo "configure: failed program was:" >&5
20333   cat conftest.$ac_ext >&5
20334   rm -rf conftest*
20335   eval "ac_cv_header_$ac_safe=no"
20336 fi
20337 rm -f conftest*
20338 fi
20339 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
20340   echo "$ac_t""yes" 1>&6
20341     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
20342   cat >> confdefs.h <<EOF
20343 #define $ac_tr_hdr 1
20344 EOF
20345  
20346 else
20347   echo "$ac_t""no" 1>&6
20348 fi
20349 done
20350
20351
20352         if test $ac_cv_header_sasl_sasl_h = yes -o $ac_cv_header_sasl_h = yes; then
20353                 echo $ac_n "checking for sasl_client_init in -lsasl2""... $ac_c" 1>&6
20354 echo "configure:20355: checking for sasl_client_init in -lsasl2" >&5
20355 ac_lib_var=`echo sasl2'_'sasl_client_init | sed 'y%./+-:%__p__%'`
20356 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20357   echo $ac_n "(cached) $ac_c" 1>&6
20358 else
20359   ac_save_LIBS="$LIBS"
20360 LIBS="-lsasl2  $LIBS"
20361 cat > conftest.$ac_ext <<EOF
20362 #line 20363 "configure"
20363 #include "confdefs.h"
20364 /* Override any gcc2 internal prototype to avoid an error.  */
20365 /* We use char because int might match the return type of a gcc2
20366     builtin and then its argument prototype would still apply.  */
20367 char sasl_client_init();
20368
20369 int main() {
20370 sasl_client_init()
20371 ; return 0; }
20372 EOF
20373 if { (eval echo configure:20374: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20374   rm -rf conftest*
20375   eval "ac_cv_lib_$ac_lib_var=yes"
20376 else
20377   echo "configure: failed program was:" >&5
20378   cat conftest.$ac_ext >&5
20379   rm -rf conftest*
20380   eval "ac_cv_lib_$ac_lib_var=no"
20381 fi
20382 rm -f conftest*
20383 LIBS="$ac_save_LIBS"
20384
20385 fi
20386 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20387   echo "$ac_t""yes" 1>&6
20388   ol_link_sasl="-lsasl2"
20389 else
20390   echo "$ac_t""no" 1>&6
20391 echo $ac_n "checking for sasl_client_init in -lsasl""... $ac_c" 1>&6
20392 echo "configure:20393: checking for sasl_client_init in -lsasl" >&5
20393 ac_lib_var=`echo sasl'_'sasl_client_init | sed 'y%./+-:%__p__%'`
20394 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20395   echo $ac_n "(cached) $ac_c" 1>&6
20396 else
20397   ac_save_LIBS="$LIBS"
20398 LIBS="-lsasl  $LIBS"
20399 cat > conftest.$ac_ext <<EOF
20400 #line 20401 "configure"
20401 #include "confdefs.h"
20402 /* Override any gcc2 internal prototype to avoid an error.  */
20403 /* We use char because int might match the return type of a gcc2
20404     builtin and then its argument prototype would still apply.  */
20405 char sasl_client_init();
20406
20407 int main() {
20408 sasl_client_init()
20409 ; return 0; }
20410 EOF
20411 if { (eval echo configure:20412: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20412   rm -rf conftest*
20413   eval "ac_cv_lib_$ac_lib_var=yes"
20414 else
20415   echo "configure: failed program was:" >&5
20416   cat conftest.$ac_ext >&5
20417   rm -rf conftest*
20418   eval "ac_cv_lib_$ac_lib_var=no"
20419 fi
20420 rm -f conftest*
20421 LIBS="$ac_save_LIBS"
20422
20423 fi
20424 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20425   echo "$ac_t""yes" 1>&6
20426   ol_link_sasl="-lsasl"
20427 else
20428   echo "$ac_t""no" 1>&6
20429 fi
20430
20431 fi
20432
20433         fi
20434
20435         if test $ol_link_sasl = no ; then
20436                 if test $ol_with_cyrus_sasl != auto ; then
20437                         { echo "configure: error: Could not locate Cyrus SASL" 1>&2; exit 1; }
20438                 else
20439                         echo "configure: warning: Could not locate Cyrus SASL" 1>&2
20440                         echo "configure: warning: SASL authentication not supported!" 1>&2
20441                         if test $ol_link_tls = no ; then
20442                                 echo "configure: warning: Strong authentication not supported!" 1>&2
20443                         fi
20444                 fi
20445         else
20446                 echo $ac_n "checking Cyrus SASL library version""... $ac_c" 1>&6
20447 echo "configure:20448: checking Cyrus SASL library version" >&5
20448 if eval "test \"\${ol_cv_sasl_compat+set}\" = set"; then
20449   echo $ac_n "(cached) $ac_c" 1>&6
20450 else
20451   
20452         cat > conftest.$ac_ext <<EOF
20453 #line 20454 "configure"
20454 #include "confdefs.h"
20455
20456 #ifdef HAVE_SASL_SASL_H
20457 #include <sasl/sasl.h>
20458 #else
20459 #include <sasl.h>
20460 #endif
20461
20462 /* Require 2.1.15+ */
20463 #if SASL_VERSION_MAJOR == 2  && SASL_VERSION_MINOR > 1
20464         char *__sasl_compat = "2.2+ or better okay (we guess)";
20465 #elif SASL_VERSION_MAJOR == 2  && SASL_VERSION_MINOR == 1 \
20466         && SASL_VERSION_STEP >=15
20467         char *__sasl_compat = "2.1.15+ or better okay";
20468 #endif
20469         
20470 EOF
20471 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20472   egrep "__sasl_compat" >/dev/null 2>&1; then
20473   rm -rf conftest*
20474   ol_cv_sasl_compat=yes
20475 else
20476   rm -rf conftest*
20477   ol_cv_sasl_compat=no
20478 fi
20479 rm -f conftest*
20480
20481 fi
20482
20483 echo "$ac_t""$ol_cv_sasl_compat" 1>&6
20484
20485                 if test $ol_cv_sasl_compat = no ; then
20486                         ol_link_sasl=no
20487                         { echo "configure: error: Cyrus SASL library located but is incompatible" 1>&2; exit 1; }
20488                 fi
20489
20490                 cat >> confdefs.h <<\EOF
20491 #define HAVE_CYRUS_SASL 1
20492 EOF
20493
20494                 SASL_LIBS="$ol_link_sasl"
20495                 if test $ol_enable_spasswd != no ; then
20496                         ol_link_spasswd=yes
20497                 fi
20498
20499                 ac_save_LIBS="$LIBS"
20500                 LIBS="$LIBS $ol_link_sasl"
20501                 echo $ac_n "checking for sasl_version""... $ac_c" 1>&6
20502 echo "configure:20503: checking for sasl_version" >&5
20503 if eval "test \"\${ac_cv_func_sasl_version+set}\" = set"; then
20504   echo $ac_n "(cached) $ac_c" 1>&6
20505 else
20506   cat > conftest.$ac_ext <<EOF
20507 #line 20508 "configure"
20508 #include "confdefs.h"
20509 /* System header to define __stub macros and hopefully few prototypes,
20510     which can conflict with char sasl_version(); below.  */
20511 #include <assert.h>
20512 /* Override any gcc2 internal prototype to avoid an error.  */
20513 /* We use char because int might match the return type of a gcc2
20514     builtin and then its argument prototype would still apply.  */
20515 char sasl_version();
20516 char (*f)();
20517
20518 int main() {
20519
20520 /* The GNU C library defines this for functions which it implements
20521     to always fail with ENOSYS.  Some functions are actually named
20522     something starting with __ and the normal name is an alias.  */
20523 #if defined (__stub_sasl_version) || defined (__stub___sasl_version)
20524 choke me
20525 #else
20526 f = sasl_version;
20527 #endif
20528
20529 ; return 0; }
20530 EOF
20531 if { (eval echo configure:20532: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20532   rm -rf conftest*
20533   eval "ac_cv_func_sasl_version=yes"
20534 else
20535   echo "configure: failed program was:" >&5
20536   cat conftest.$ac_ext >&5
20537   rm -rf conftest*
20538   eval "ac_cv_func_sasl_version=no"
20539 fi
20540 rm -f conftest*
20541 fi
20542
20543 if eval "test \"`echo '$ac_cv_func_'sasl_version`\" = yes"; then
20544   echo "$ac_t""yes" 1>&6
20545   cat >> confdefs.h <<\EOF
20546 #define HAVE_SASL_VERSION 1
20547 EOF
20548
20549 else
20550   echo "$ac_t""no" 1>&6
20551 fi
20552
20553                 LIBS="$ac_save_LIBS"
20554         fi
20555
20556 else
20557         echo "configure: warning: SASL authentication not supported!" 1>&2
20558         if test $ol_link_tls = no ; then
20559                 echo "configure: warning: Strong authentication not supported!" 1>&2
20560         fi
20561 fi
20562
20563 if test $cross_compiling != yes -a "$ac_cv_mingw32" != yes ; then
20564         dev=no
20565         if test -r /dev/urandom ; then
20566                 dev="/dev/urandom";
20567         elif test -r /idev/urandom ; then
20568                 dev="/idev/urandom";
20569         elif test -r /dev/srandom ; then
20570                 dev="/dev/srandom";
20571         elif test -r /dev/random ; then
20572                 dev="/dev/random";
20573         elif test -r /idev/random ; then
20574                 dev="/idev/random";
20575         fi
20576
20577         if test $dev != no ; then
20578                 cat >> confdefs.h <<EOF
20579 #define URANDOM_DEVICE "$dev"
20580 EOF
20581
20582         fi
20583 fi
20584
20585 ol_link_fetch=no
20586 if test $ol_with_fetch != no ; then
20587         ol_LIBS=$LIBS
20588 LIBS="-lfetch -lcom_err $LIBS"
20589 echo $ac_n "checking fetch(3) library""... $ac_c" 1>&6
20590 echo "configure:20591: checking fetch(3) library" >&5
20591 if eval "test \"\${ol_cv_lib_fetch+set}\" = set"; then
20592   echo $ac_n "(cached) $ac_c" 1>&6
20593 else
20594   
20595         cat > conftest.$ac_ext <<EOF
20596 #line 20597 "configure"
20597 #include "confdefs.h"
20598
20599 #include <sys/param.h>
20600 #include <stdio.h>
20601 #include <fetch.h>
20602 int main() {
20603 struct url *u = fetchParseURL("file:///"); 
20604 ; return 0; }
20605 EOF
20606 if { (eval echo configure:20607: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20607   rm -rf conftest*
20608   ol_cv_lib_fetch=yes
20609 else
20610   echo "configure: failed program was:" >&5
20611   cat conftest.$ac_ext >&5
20612   rm -rf conftest*
20613   ol_cv_lib_fetch=no
20614 fi
20615 rm -f conftest*
20616 fi
20617
20618 echo "$ac_t""$ol_cv_lib_fetch" 1>&6
20619 LIBS=$ol_LIBS
20620 if test $ol_cv_lib_fetch != no ; then
20621         ol_link_fetch="-lfetch -lcom_err"
20622         cat >> confdefs.h <<\EOF
20623 #define HAVE_FETCH 1
20624 EOF
20625
20626 fi
20627
20628
20629         if test $ol_cv_lib_fetch != no ; then
20630                 LUTIL_LIBS="$LUTIL_LIBS $ol_link_fetch"
20631                 ol_link_fetch=freebsd
20632
20633         elif test $ol_with_fetch != auto ; then
20634                 { echo "configure: error: no suitable API for --with-fetch=$ol_with_fetch" 1>&2; exit 1; }
20635         fi 
20636 fi
20637
20638 if test $ol_enable_crypt != no ; then
20639         save_LIBS="$LIBS"
20640         LIBS="$TLS_LIBS $LIBS"
20641
20642         echo $ac_n "checking for crypt""... $ac_c" 1>&6
20643 echo "configure:20644: checking for crypt" >&5
20644 if eval "test \"\${ac_cv_func_crypt+set}\" = set"; then
20645   echo $ac_n "(cached) $ac_c" 1>&6
20646 else
20647   cat > conftest.$ac_ext <<EOF
20648 #line 20649 "configure"
20649 #include "confdefs.h"
20650 /* System header to define __stub macros and hopefully few prototypes,
20651     which can conflict with char crypt(); below.  */
20652 #include <assert.h>
20653 /* Override any gcc2 internal prototype to avoid an error.  */
20654 /* We use char because int might match the return type of a gcc2
20655     builtin and then its argument prototype would still apply.  */
20656 char crypt();
20657 char (*f)();
20658
20659 int main() {
20660
20661 /* The GNU C library defines this for functions which it implements
20662     to always fail with ENOSYS.  Some functions are actually named
20663     something starting with __ and the normal name is an alias.  */
20664 #if defined (__stub_crypt) || defined (__stub___crypt)
20665 choke me
20666 #else
20667 f = crypt;
20668 #endif
20669
20670 ; return 0; }
20671 EOF
20672 if { (eval echo configure:20673: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20673   rm -rf conftest*
20674   eval "ac_cv_func_crypt=yes"
20675 else
20676   echo "configure: failed program was:" >&5
20677   cat conftest.$ac_ext >&5
20678   rm -rf conftest*
20679   eval "ac_cv_func_crypt=no"
20680 fi
20681 rm -f conftest*
20682 fi
20683
20684 if eval "test \"`echo '$ac_cv_func_'crypt`\" = yes"; then
20685   echo "$ac_t""yes" 1>&6
20686   have_crypt=yes
20687 else
20688   echo "$ac_t""no" 1>&6
20689
20690                 LIBS="$save_LIBS"
20691                 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
20692 echo "configure:20693: checking for crypt in -lcrypt" >&5
20693 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-:%__p__%'`
20694 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20695   echo $ac_n "(cached) $ac_c" 1>&6
20696 else
20697   ac_save_LIBS="$LIBS"
20698 LIBS="-lcrypt  $LIBS"
20699 cat > conftest.$ac_ext <<EOF
20700 #line 20701 "configure"
20701 #include "confdefs.h"
20702 /* Override any gcc2 internal prototype to avoid an error.  */
20703 /* We use char because int might match the return type of a gcc2
20704     builtin and then its argument prototype would still apply.  */
20705 char crypt();
20706
20707 int main() {
20708 crypt()
20709 ; return 0; }
20710 EOF
20711 if { (eval echo configure:20712: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20712   rm -rf conftest*
20713   eval "ac_cv_lib_$ac_lib_var=yes"
20714 else
20715   echo "configure: failed program was:" >&5
20716   cat conftest.$ac_ext >&5
20717   rm -rf conftest*
20718   eval "ac_cv_lib_$ac_lib_var=no"
20719 fi
20720 rm -f conftest*
20721 LIBS="$ac_save_LIBS"
20722
20723 fi
20724 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20725   echo "$ac_t""yes" 1>&6
20726   LUTIL_LIBS="$LUTIL_LIBS -lcrypt"
20727                         have_crypt=yes
20728 else
20729   echo "$ac_t""no" 1>&6
20730 have_crypt=no
20731 fi
20732
20733 fi
20734
20735
20736         LIBS="$save_LIBS"
20737
20738         if test $have_crypt = yes ; then
20739                 cat >> confdefs.h <<\EOF
20740 #define HAVE_CRYPT 1
20741 EOF
20742
20743         else
20744                 echo "configure: warning: could not find crypt" 1>&2
20745                 if test $ol_enable_crypt = yes ; then
20746                         { echo "configure: error: could not find crypt, select appropriate options or disable" 1>&2; exit 1; }
20747                 fi
20748
20749                 echo "configure: warning: disabling crypt support" 1>&2
20750                 ol_enable_crypt=no
20751         fi
20752 fi
20753
20754 if test $ol_enable_proctitle != no ; then
20755         echo $ac_n "checking for setproctitle""... $ac_c" 1>&6
20756 echo "configure:20757: checking for setproctitle" >&5
20757 if eval "test \"\${ac_cv_func_setproctitle+set}\" = set"; then
20758   echo $ac_n "(cached) $ac_c" 1>&6
20759 else
20760   cat > conftest.$ac_ext <<EOF
20761 #line 20762 "configure"
20762 #include "confdefs.h"
20763 /* System header to define __stub macros and hopefully few prototypes,
20764     which can conflict with char setproctitle(); below.  */
20765 #include <assert.h>
20766 /* Override any gcc2 internal prototype to avoid an error.  */
20767 /* We use char because int might match the return type of a gcc2
20768     builtin and then its argument prototype would still apply.  */
20769 char setproctitle();
20770 char (*f)();
20771
20772 int main() {
20773
20774 /* The GNU C library defines this for functions which it implements
20775     to always fail with ENOSYS.  Some functions are actually named
20776     something starting with __ and the normal name is an alias.  */
20777 #if defined (__stub_setproctitle) || defined (__stub___setproctitle)
20778 choke me
20779 #else
20780 f = setproctitle;
20781 #endif
20782
20783 ; return 0; }
20784 EOF
20785 if { (eval echo configure:20786: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20786   rm -rf conftest*
20787   eval "ac_cv_func_setproctitle=yes"
20788 else
20789   echo "configure: failed program was:" >&5
20790   cat conftest.$ac_ext >&5
20791   rm -rf conftest*
20792   eval "ac_cv_func_setproctitle=no"
20793 fi
20794 rm -f conftest*
20795 fi
20796
20797 if eval "test \"`echo '$ac_cv_func_'setproctitle`\" = yes"; then
20798   echo "$ac_t""yes" 1>&6
20799   have_setproctitle=yes
20800 else
20801   echo "$ac_t""no" 1>&6
20802
20803                 echo $ac_n "checking for setproctitle in -lutil""... $ac_c" 1>&6
20804 echo "configure:20805: checking for setproctitle in -lutil" >&5
20805 ac_lib_var=`echo util'_'setproctitle | sed 'y%./+-:%__p__%'`
20806 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20807   echo $ac_n "(cached) $ac_c" 1>&6
20808 else
20809   ac_save_LIBS="$LIBS"
20810 LIBS="-lutil  $LIBS"
20811 cat > conftest.$ac_ext <<EOF
20812 #line 20813 "configure"
20813 #include "confdefs.h"
20814 /* Override any gcc2 internal prototype to avoid an error.  */
20815 /* We use char because int might match the return type of a gcc2
20816     builtin and then its argument prototype would still apply.  */
20817 char setproctitle();
20818
20819 int main() {
20820 setproctitle()
20821 ; return 0; }
20822 EOF
20823 if { (eval echo configure:20824: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20824   rm -rf conftest*
20825   eval "ac_cv_lib_$ac_lib_var=yes"
20826 else
20827   echo "configure: failed program was:" >&5
20828   cat conftest.$ac_ext >&5
20829   rm -rf conftest*
20830   eval "ac_cv_lib_$ac_lib_var=no"
20831 fi
20832 rm -f conftest*
20833 LIBS="$ac_save_LIBS"
20834
20835 fi
20836 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20837   echo "$ac_t""yes" 1>&6
20838   have_setproctitle=yes
20839                         LUTIL_LIBS="$LUTIL_LIBS -lutil"
20840 else
20841   echo "$ac_t""no" 1>&6
20842 have_setproctitle=no
20843                         LIBOBJS="$LIBOBJS setproctitle.o"
20844                         LIBSRCS="$LIBSRCS setproctitle.c"
20845 fi
20846
20847 fi
20848
20849
20850         if test $have_setproctitle = yes ; then
20851                 cat >> confdefs.h <<\EOF
20852 #define HAVE_SETPROCTITLE 1
20853 EOF
20854
20855         fi
20856 fi
20857
20858 if test $ol_enable_slp != no ; then
20859         for ac_hdr in slp.h 
20860 do
20861 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
20862 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
20863 echo "configure:20864: checking for $ac_hdr" >&5
20864 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
20865   echo $ac_n "(cached) $ac_c" 1>&6
20866 else
20867   cat > conftest.$ac_ext <<EOF
20868 #line 20869 "configure"
20869 #include "confdefs.h"
20870 #include <$ac_hdr>
20871 EOF
20872 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20873 { (eval echo configure:20874: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20874 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20875 if test -z "$ac_err"; then
20876   rm -rf conftest*
20877   eval "ac_cv_header_$ac_safe=yes"
20878 else
20879   echo "$ac_err" >&5
20880   echo "configure: failed program was:" >&5
20881   cat conftest.$ac_ext >&5
20882   rm -rf conftest*
20883   eval "ac_cv_header_$ac_safe=no"
20884 fi
20885 rm -f conftest*
20886 fi
20887 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
20888   echo "$ac_t""yes" 1>&6
20889     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
20890   cat >> confdefs.h <<EOF
20891 #define $ac_tr_hdr 1
20892 EOF
20893  
20894 else
20895   echo "$ac_t""no" 1>&6
20896 fi
20897 done
20898
20899
20900         if test $ac_cv_header_slp_h = yes ; then
20901                 echo $ac_n "checking for SLPOpen in -lslp""... $ac_c" 1>&6
20902 echo "configure:20903: checking for SLPOpen in -lslp" >&5
20903 ac_lib_var=`echo slp'_'SLPOpen | sed 'y%./+-:%__p__%'`
20904 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20905   echo $ac_n "(cached) $ac_c" 1>&6
20906 else
20907   ac_save_LIBS="$LIBS"
20908 LIBS="-lslp  $LIBS"
20909 cat > conftest.$ac_ext <<EOF
20910 #line 20911 "configure"
20911 #include "confdefs.h"
20912 /* Override any gcc2 internal prototype to avoid an error.  */
20913 /* We use char because int might match the return type of a gcc2
20914     builtin and then its argument prototype would still apply.  */
20915 char SLPOpen();
20916
20917 int main() {
20918 SLPOpen()
20919 ; return 0; }
20920 EOF
20921 if { (eval echo configure:20922: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20922   rm -rf conftest*
20923   eval "ac_cv_lib_$ac_lib_var=yes"
20924 else
20925   echo "configure: failed program was:" >&5
20926   cat conftest.$ac_ext >&5
20927   rm -rf conftest*
20928   eval "ac_cv_lib_$ac_lib_var=no"
20929 fi
20930 rm -f conftest*
20931 LIBS="$ac_save_LIBS"
20932
20933 fi
20934 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20935   echo "$ac_t""yes" 1>&6
20936   have_slp=yes
20937 else
20938   echo "$ac_t""no" 1>&6
20939 have_slp=no
20940 fi
20941
20942                 if test $have_slp = yes ; then
20943                         cat >> confdefs.h <<\EOF
20944 #define HAVE_SLP 1
20945 EOF
20946
20947                         SLAPD_SLP_LIBS=-lslp
20948                 fi
20949
20950         elif test $ol_enable_slp = yes ; then
20951                 { echo "configure: error: SLP not found" 1>&2; exit 1; }
20952         fi
20953 fi
20954
20955
20956 echo $ac_n "checking long long""... $ac_c" 1>&6
20957 echo "configure:20958: checking long long" >&5
20958 if eval "test \"\${ol_cv_type_long_long+set}\" = set"; then
20959   echo $ac_n "(cached) $ac_c" 1>&6
20960 else
20961   
20962         cat > conftest.$ac_ext <<EOF
20963 #line 20964 "configure"
20964 #include "confdefs.h"
20965
20966 int main() {
20967 long long x;
20968 ; return 0; }
20969 EOF
20970 if { (eval echo configure:20971: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
20971   rm -rf conftest*
20972   ol_cv_type_long_long=yes
20973 else
20974   echo "configure: failed program was:" >&5
20975   cat conftest.$ac_ext >&5
20976   rm -rf conftest*
20977   ol_cv_type_long_long=no
20978 fi
20979 rm -f conftest*
20980 fi
20981
20982 echo "$ac_t""$ol_cv_type_long_long" 1>&6
20983 if test $ol_cv_type_long_long = yes; then
20984         cat >> confdefs.h <<\EOF
20985 #define HAVE_LONG_LONG 1
20986 EOF
20987
20988 fi
20989
20990 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
20991 echo "configure:20992: checking for ANSI C header files" >&5
20992 if eval "test \"\${ac_cv_header_stdc+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 #include <stdlib.h>
20999 #include <stdarg.h>
21000 #include <string.h>
21001 #include <float.h>
21002 EOF
21003 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
21004 { (eval echo configure:21005: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
21005 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
21006 if test -z "$ac_err"; then
21007   rm -rf conftest*
21008   ac_cv_header_stdc=yes
21009 else
21010   echo "$ac_err" >&5
21011   echo "configure: failed program was:" >&5
21012   cat conftest.$ac_ext >&5
21013   rm -rf conftest*
21014   ac_cv_header_stdc=no
21015 fi
21016 rm -f conftest*
21017
21018 if test $ac_cv_header_stdc = yes; then
21019   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
21020 cat > conftest.$ac_ext <<EOF
21021 #line 21022 "configure"
21022 #include "confdefs.h"
21023 #include <string.h>
21024 EOF
21025 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21026   egrep "memchr" >/dev/null 2>&1; then
21027   :
21028 else
21029   rm -rf conftest*
21030   ac_cv_header_stdc=no
21031 fi
21032 rm -f conftest*
21033
21034 fi
21035
21036 if test $ac_cv_header_stdc = yes; then
21037   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
21038 cat > conftest.$ac_ext <<EOF
21039 #line 21040 "configure"
21040 #include "confdefs.h"
21041 #include <stdlib.h>
21042 EOF
21043 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21044   egrep "free" >/dev/null 2>&1; then
21045   :
21046 else
21047   rm -rf conftest*
21048   ac_cv_header_stdc=no
21049 fi
21050 rm -f conftest*
21051
21052 fi
21053
21054 if test $ac_cv_header_stdc = yes; then
21055   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
21056 if test "$cross_compiling" = yes; then
21057   :
21058 else
21059   cat > conftest.$ac_ext <<EOF
21060 #line 21061 "configure"
21061 #include "confdefs.h"
21062 #include <ctype.h>
21063 #if ((' ' & 0x0FF) == 0x020)
21064 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
21065 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
21066 #else
21067 #define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
21068  || ('j' <= (c) && (c) <= 'r') \
21069  || ('s' <= (c) && (c) <= 'z'))
21070 #define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
21071 #endif
21072 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
21073 int main () { int i; for (i = 0; i < 256; i++)
21074 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
21075 exit (0); }
21076
21077 EOF
21078 if { (eval echo configure:21079: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
21079 then
21080   :
21081 else
21082   echo "configure: failed program was:" >&5
21083   cat conftest.$ac_ext >&5
21084   rm -fr conftest*
21085   ac_cv_header_stdc=no
21086 fi
21087 rm -fr conftest*
21088 fi
21089
21090 fi
21091 fi
21092
21093 echo "$ac_t""$ac_cv_header_stdc" 1>&6
21094 if test $ac_cv_header_stdc = yes; then
21095   cat >> confdefs.h <<\EOF
21096 #define STDC_HEADERS 1
21097 EOF
21098
21099 fi
21100
21101 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
21102 echo "configure:21103: checking for mode_t" >&5
21103 if eval "test \"\${ac_cv_type_mode_t+set}\" = set"; then
21104   echo $ac_n "(cached) $ac_c" 1>&6
21105 else
21106   cat > conftest.$ac_ext <<EOF
21107 #line 21108 "configure"
21108 #include "confdefs.h"
21109 #include <sys/types.h>
21110 #if STDC_HEADERS
21111 #include <stdlib.h>
21112 #include <stddef.h>
21113 #endif
21114
21115 EOF
21116 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21117   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
21118   rm -rf conftest*
21119   eval "ac_cv_type_mode_t=yes"
21120 else
21121   rm -rf conftest*
21122   eval "ac_cv_type_mode_t=no"
21123 fi
21124 rm -f conftest*
21125
21126 fi
21127 if eval "test \"`echo '$ac_cv_type_'mode_t`\" = yes"; then
21128   echo "$ac_t""yes" 1>&6
21129 else
21130   echo "$ac_t""no" 1>&6
21131   cat >> confdefs.h <<EOF
21132 #define mode_t int
21133 EOF
21134
21135 fi
21136
21137 echo $ac_n "checking for off_t""... $ac_c" 1>&6
21138 echo "configure:21139: checking for off_t" >&5
21139 if eval "test \"\${ac_cv_type_off_t+set}\" = set"; then
21140   echo $ac_n "(cached) $ac_c" 1>&6
21141 else
21142   cat > conftest.$ac_ext <<EOF
21143 #line 21144 "configure"
21144 #include "confdefs.h"
21145 #include <sys/types.h>
21146 #if STDC_HEADERS
21147 #include <stdlib.h>
21148 #include <stddef.h>
21149 #endif
21150
21151 EOF
21152 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21153   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
21154   rm -rf conftest*
21155   eval "ac_cv_type_off_t=yes"
21156 else
21157   rm -rf conftest*
21158   eval "ac_cv_type_off_t=no"
21159 fi
21160 rm -f conftest*
21161
21162 fi
21163 if eval "test \"`echo '$ac_cv_type_'off_t`\" = yes"; then
21164   echo "$ac_t""yes" 1>&6
21165 else
21166   echo "$ac_t""no" 1>&6
21167   cat >> confdefs.h <<EOF
21168 #define off_t long
21169 EOF
21170
21171 fi
21172
21173 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
21174 echo "configure:21175: checking for pid_t" >&5
21175 if eval "test \"\${ac_cv_type_pid_t+set}\" = set"; then
21176   echo $ac_n "(cached) $ac_c" 1>&6
21177 else
21178   cat > conftest.$ac_ext <<EOF
21179 #line 21180 "configure"
21180 #include "confdefs.h"
21181 #include <sys/types.h>
21182 #if STDC_HEADERS
21183 #include <stdlib.h>
21184 #include <stddef.h>
21185 #endif
21186
21187 EOF
21188 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21189   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
21190   rm -rf conftest*
21191   eval "ac_cv_type_pid_t=yes"
21192 else
21193   rm -rf conftest*
21194   eval "ac_cv_type_pid_t=no"
21195 fi
21196 rm -f conftest*
21197
21198 fi
21199 if eval "test \"`echo '$ac_cv_type_'pid_t`\" = yes"; then
21200   echo "$ac_t""yes" 1>&6
21201 else
21202   echo "$ac_t""no" 1>&6
21203   cat >> confdefs.h <<EOF
21204 #define pid_t int
21205 EOF
21206
21207 fi
21208
21209 echo $ac_n "checking for ptrdiff_t""... $ac_c" 1>&6
21210 echo "configure:21211: checking for ptrdiff_t" >&5
21211 if eval "test \"\${am_cv_type_ptrdiff_t+set}\" = set"; then
21212   echo $ac_n "(cached) $ac_c" 1>&6
21213 else
21214   cat > conftest.$ac_ext <<EOF
21215 #line 21216 "configure"
21216 #include "confdefs.h"
21217 #include <stddef.h>
21218 int main() {
21219 ptrdiff_t p
21220 ; return 0; }
21221 EOF
21222 if { (eval echo configure:21223: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21223   rm -rf conftest*
21224   am_cv_type_ptrdiff_t=yes
21225 else
21226   echo "configure: failed program was:" >&5
21227   cat conftest.$ac_ext >&5
21228   rm -rf conftest*
21229   am_cv_type_ptrdiff_t=no
21230 fi
21231 rm -f conftest*
21232 fi
21233
21234 echo "$ac_t""$am_cv_type_ptrdiff_t" 1>&6
21235    if test $am_cv_type_ptrdiff_t = yes; then
21236      cat >> confdefs.h <<\EOF
21237 #define HAVE_PTRDIFF_T 1
21238 EOF
21239
21240    fi
21241
21242 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
21243 echo "configure:21244: checking return type of signal handlers" >&5
21244 if eval "test \"\${ac_cv_type_signal+set}\" = set"; then
21245   echo $ac_n "(cached) $ac_c" 1>&6
21246 else
21247   cat > conftest.$ac_ext <<EOF
21248 #line 21249 "configure"
21249 #include "confdefs.h"
21250 #include <sys/types.h>
21251 #include <signal.h>
21252 #ifdef signal
21253 #undef signal
21254 #endif
21255 #ifdef __cplusplus
21256 extern "C" void (*signal (int, void (*)(int)))(int);
21257 #else
21258 void (*signal ()) ();
21259 #endif
21260
21261 int main() {
21262 int i;
21263 ; return 0; }
21264 EOF
21265 if { (eval echo configure:21266: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21266   rm -rf conftest*
21267   ac_cv_type_signal=void
21268 else
21269   echo "configure: failed program was:" >&5
21270   cat conftest.$ac_ext >&5
21271   rm -rf conftest*
21272   ac_cv_type_signal=int
21273 fi
21274 rm -f conftest*
21275 fi
21276
21277 echo "$ac_t""$ac_cv_type_signal" 1>&6
21278 cat >> confdefs.h <<EOF
21279 #define RETSIGTYPE $ac_cv_type_signal
21280 EOF
21281
21282
21283 echo $ac_n "checking for size_t""... $ac_c" 1>&6
21284 echo "configure:21285: checking for size_t" >&5
21285 if eval "test \"\${ac_cv_type_size_t+set}\" = set"; then
21286   echo $ac_n "(cached) $ac_c" 1>&6
21287 else
21288   cat > conftest.$ac_ext <<EOF
21289 #line 21290 "configure"
21290 #include "confdefs.h"
21291 #include <sys/types.h>
21292 #if STDC_HEADERS
21293 #include <stdlib.h>
21294 #include <stddef.h>
21295 #endif
21296
21297 EOF
21298 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21299   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
21300   rm -rf conftest*
21301   eval "ac_cv_type_size_t=yes"
21302 else
21303   rm -rf conftest*
21304   eval "ac_cv_type_size_t=no"
21305 fi
21306 rm -f conftest*
21307
21308 fi
21309 if eval "test \"`echo '$ac_cv_type_'size_t`\" = yes"; then
21310   echo "$ac_t""yes" 1>&6
21311 else
21312   echo "$ac_t""no" 1>&6
21313   cat >> confdefs.h <<EOF
21314 #define size_t unsigned
21315 EOF
21316
21317 fi
21318
21319
21320 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
21321 echo "configure:21322: checking for ssize_t" >&5
21322 if eval "test \"\${ac_cv_type_ssize_t+set}\" = set"; then
21323   echo $ac_n "(cached) $ac_c" 1>&6
21324 else
21325   cat > conftest.$ac_ext <<EOF
21326 #line 21327 "configure"
21327 #include "confdefs.h"
21328 #include <sys/types.h>
21329 #if STDC_HEADERS
21330 #include <stdlib.h>
21331 #include <stddef.h>
21332 #endif
21333
21334 EOF
21335 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21336   egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
21337   rm -rf conftest*
21338   eval "ac_cv_type_ssize_t=yes"
21339 else
21340   rm -rf conftest*
21341   eval "ac_cv_type_ssize_t=no"
21342 fi
21343 rm -f conftest*
21344
21345 fi
21346 if eval "test \"`echo '$ac_cv_type_'ssize_t`\" = yes"; then
21347   echo "$ac_t""yes" 1>&6
21348 else
21349   echo "$ac_t""no" 1>&6
21350   cat >> confdefs.h <<EOF
21351 #define ssize_t signed int
21352 EOF
21353
21354 fi
21355
21356 echo $ac_n "checking for caddr_t""... $ac_c" 1>&6
21357 echo "configure:21358: checking for caddr_t" >&5
21358 if eval "test \"\${ac_cv_type_caddr_t+set}\" = set"; then
21359   echo $ac_n "(cached) $ac_c" 1>&6
21360 else
21361   cat > conftest.$ac_ext <<EOF
21362 #line 21363 "configure"
21363 #include "confdefs.h"
21364 #include <sys/types.h>
21365 #if STDC_HEADERS
21366 #include <stdlib.h>
21367 #include <stddef.h>
21368 #endif
21369
21370 EOF
21371 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21372   egrep "(^|[^a-zA-Z_0-9])caddr_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
21373   rm -rf conftest*
21374   eval "ac_cv_type_caddr_t=yes"
21375 else
21376   rm -rf conftest*
21377   eval "ac_cv_type_caddr_t=no"
21378 fi
21379 rm -f conftest*
21380
21381 fi
21382 if eval "test \"`echo '$ac_cv_type_'caddr_t`\" = yes"; then
21383   echo "$ac_t""yes" 1>&6
21384 else
21385   echo "$ac_t""no" 1>&6
21386   cat >> confdefs.h <<EOF
21387 #define caddr_t char *
21388 EOF
21389
21390 fi
21391
21392
21393 echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
21394 echo "configure:21395: checking for socklen_t" >&5
21395 if eval "test \"\${ol_cv_type_socklen_t+set}\" = set"; then
21396   echo $ac_n "(cached) $ac_c" 1>&6
21397 else
21398   cat > conftest.$ac_ext <<EOF
21399 #line 21400 "configure"
21400 #include "confdefs.h"
21401
21402 #ifdef HAVE_SYS_TYPES_H
21403 #include <sys/types.h>
21404 #endif
21405 #ifdef HAVE_SYS_SOCKET_H
21406 #include <sys/socket.h>
21407 #endif
21408
21409 int main() {
21410 socklen_t len;
21411 ; return 0; }
21412 EOF
21413 if { (eval echo configure:21414: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21414   rm -rf conftest*
21415   ol_cv_type_socklen_t=yes
21416 else
21417   echo "configure: failed program was:" >&5
21418   cat conftest.$ac_ext >&5
21419   rm -rf conftest*
21420   ol_cv_type_socklen_t=no
21421 fi
21422 rm -f conftest*
21423 fi
21424
21425 echo "$ac_t""$ol_cv_type_socklen_t" 1>&6
21426   if test $ol_cv_type_socklen_t = no; then
21427     cat >> confdefs.h <<\EOF
21428 #define socklen_t int
21429 EOF
21430
21431   fi
21432  
21433 echo $ac_n "checking for member st_blksize in aggregate type struct stat""... $ac_c" 1>&6
21434 echo "configure:21435: checking for member st_blksize in aggregate type struct stat" >&5
21435 if eval "test \"\${ac_cv_c_struct_member_st_blksize+set}\" = set"; then
21436   echo $ac_n "(cached) $ac_c" 1>&6
21437 else
21438   cat > conftest.$ac_ext <<EOF
21439 #line 21440 "configure"
21440 #include "confdefs.h"
21441 #include <sys/types.h>
21442 #include <sys/stat.h>
21443 int main() {
21444 struct stat foo; foo.st_blksize;
21445 ; return 0; }
21446 EOF
21447 if { (eval echo configure:21448: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21448   rm -rf conftest*
21449   ac_cv_c_struct_member_st_blksize=yes
21450 else
21451   echo "configure: failed program was:" >&5
21452   cat conftest.$ac_ext >&5
21453   rm -rf conftest*
21454   ac_cv_c_struct_member_st_blksize=no
21455 fi
21456 rm -f conftest*
21457 fi
21458
21459 echo "$ac_t""$ac_cv_c_struct_member_st_blksize" 1>&6
21460 st_blksize="$ac_cv_c_struct_member_st_blksize"
21461 if test $ac_cv_c_struct_member_st_blksize = yes; then
21462   cat >> confdefs.h <<\EOF
21463 #define HAVE_ST_BLKSIZE 1
21464 EOF
21465
21466 fi
21467
21468 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
21469 echo "configure:21470: checking whether time.h and sys/time.h may both be included" >&5
21470 if eval "test \"\${ac_cv_header_time+set}\" = set"; then
21471   echo $ac_n "(cached) $ac_c" 1>&6
21472 else
21473   cat > conftest.$ac_ext <<EOF
21474 #line 21475 "configure"
21475 #include "confdefs.h"
21476 #include <sys/types.h>
21477 #include <sys/time.h>
21478 #include <time.h>
21479 int main() {
21480 struct tm *tp;
21481 ; return 0; }
21482 EOF
21483 if { (eval echo configure:21484: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21484   rm -rf conftest*
21485   ac_cv_header_time=yes
21486 else
21487   echo "configure: failed program was:" >&5
21488   cat conftest.$ac_ext >&5
21489   rm -rf conftest*
21490   ac_cv_header_time=no
21491 fi
21492 rm -f conftest*
21493 fi
21494
21495 echo "$ac_t""$ac_cv_header_time" 1>&6
21496 if test $ac_cv_header_time = yes; then
21497   cat >> confdefs.h <<\EOF
21498 #define TIME_WITH_SYS_TIME 1
21499 EOF
21500
21501 fi
21502
21503 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
21504 echo "configure:21505: checking whether struct tm is in sys/time.h or time.h" >&5
21505 if eval "test \"\${ac_cv_struct_tm+set}\" = set"; then
21506   echo $ac_n "(cached) $ac_c" 1>&6
21507 else
21508   cat > conftest.$ac_ext <<EOF
21509 #line 21510 "configure"
21510 #include "confdefs.h"
21511 #include <sys/types.h>
21512 #include <time.h>
21513 int main() {
21514 struct tm *tp; tp->tm_sec;
21515 ; return 0; }
21516 EOF
21517 if { (eval echo configure:21518: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21518   rm -rf conftest*
21519   ac_cv_struct_tm=time.h
21520 else
21521   echo "configure: failed program was:" >&5
21522   cat conftest.$ac_ext >&5
21523   rm -rf conftest*
21524   ac_cv_struct_tm=sys/time.h
21525 fi
21526 rm -f conftest*
21527 fi
21528
21529 echo "$ac_t""$ac_cv_struct_tm" 1>&6
21530 if test $ac_cv_struct_tm = sys/time.h; then
21531   cat >> confdefs.h <<\EOF
21532 #define TM_IN_SYS_TIME 1
21533 EOF
21534
21535 fi
21536
21537 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
21538 echo "configure:21539: checking for uid_t in sys/types.h" >&5
21539 if eval "test \"\${ac_cv_type_uid_t+set}\" = set"; then
21540   echo $ac_n "(cached) $ac_c" 1>&6
21541 else
21542   cat > conftest.$ac_ext <<EOF
21543 #line 21544 "configure"
21544 #include "confdefs.h"
21545 #include <sys/types.h>
21546 EOF
21547 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21548   egrep "uid_t" >/dev/null 2>&1; then
21549   rm -rf conftest*
21550   ac_cv_type_uid_t=yes
21551 else
21552   rm -rf conftest*
21553   ac_cv_type_uid_t=no
21554 fi
21555 rm -f conftest*
21556
21557 fi
21558
21559 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
21560 if test $ac_cv_type_uid_t = no; then
21561   cat >> confdefs.h <<\EOF
21562 #define uid_t int
21563 EOF
21564
21565   cat >> confdefs.h <<\EOF
21566 #define gid_t int
21567 EOF
21568
21569 fi
21570
21571 echo $ac_n "checking for sig_atomic_t""... $ac_c" 1>&6
21572 echo "configure:21573: checking for sig_atomic_t" >&5
21573 if eval "test \"\${ol_cv_type_sig_atomic_t+set}\" = set"; then
21574   echo $ac_n "(cached) $ac_c" 1>&6
21575 else
21576   cat > conftest.$ac_ext <<EOF
21577 #line 21578 "configure"
21578 #include "confdefs.h"
21579 #include <signal.h>
21580 int main() {
21581 sig_atomic_t atomic;
21582 ; return 0; }
21583 EOF
21584 if { (eval echo configure:21585: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21585   rm -rf conftest*
21586   ol_cv_type_sig_atomic_t=yes
21587 else
21588   echo "configure: failed program was:" >&5
21589   cat conftest.$ac_ext >&5
21590   rm -rf conftest*
21591   ol_cv_type_sig_atomic_t=no
21592 fi
21593 rm -f conftest*
21594 fi
21595
21596 echo "$ac_t""$ol_cv_type_sig_atomic_t" 1>&6
21597   if test $ol_cv_type_sig_atomic_t = no; then
21598     cat >> confdefs.h <<\EOF
21599 #define sig_atomic_t int
21600 EOF
21601
21602   fi
21603  
21604
21605
21606 # test for pw_gecos in struct passwd
21607 echo $ac_n "checking struct passwd for pw_gecos""... $ac_c" 1>&6
21608 echo "configure:21609: checking struct passwd for pw_gecos" >&5
21609 if eval "test \"\${ol_cv_struct_passwd_pw_gecos+set}\" = set"; then
21610   echo $ac_n "(cached) $ac_c" 1>&6
21611 else
21612   
21613         cat > conftest.$ac_ext <<EOF
21614 #line 21615 "configure"
21615 #include "confdefs.h"
21616 #include <pwd.h>
21617 int main() {
21618
21619         struct passwd pwd;
21620         pwd.pw_gecos = pwd.pw_name;
21621
21622 ; return 0; }
21623 EOF
21624 if { (eval echo configure:21625: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21625   rm -rf conftest*
21626   ol_cv_struct_passwd_pw_gecos=yes
21627 else
21628   echo "configure: failed program was:" >&5
21629   cat conftest.$ac_ext >&5
21630   rm -rf conftest*
21631   ol_cv_struct_passwd_pw_gecos=no
21632 fi
21633 rm -f conftest*
21634 fi
21635
21636 echo "$ac_t""$ol_cv_struct_passwd_pw_gecos" 1>&6
21637 if test $ol_cv_struct_passwd_pw_gecos = yes ; then
21638         cat >> confdefs.h <<\EOF
21639 #define HAVE_PW_GECOS 1
21640 EOF
21641
21642 fi
21643
21644 # test for pw_passwd in struct passwd
21645 echo $ac_n "checking struct passwd for pw_passwd""... $ac_c" 1>&6
21646 echo "configure:21647: checking struct passwd for pw_passwd" >&5
21647 if eval "test \"\${ol_cv_struct_passwd_pw_passwd+set}\" = set"; then
21648   echo $ac_n "(cached) $ac_c" 1>&6
21649 else
21650   
21651         cat > conftest.$ac_ext <<EOF
21652 #line 21653 "configure"
21653 #include "confdefs.h"
21654 #include <pwd.h>
21655 int main() {
21656
21657         struct passwd pwd;
21658         pwd.pw_passwd = pwd.pw_name;
21659
21660 ; return 0; }
21661 EOF
21662 if { (eval echo configure:21663: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21663   rm -rf conftest*
21664   ol_cv_struct_passwd_pw_passwd=yes
21665 else
21666   echo "configure: failed program was:" >&5
21667   cat conftest.$ac_ext >&5
21668   rm -rf conftest*
21669   ol_cv_struct_passwd_pw_passwd=no
21670 fi
21671 rm -f conftest*
21672 fi
21673
21674 echo "$ac_t""$ol_cv_struct_passwd_pw_passwd" 1>&6
21675 if test $ol_cv_struct_passwd_pw_passwd = yes ; then
21676         cat >> confdefs.h <<\EOF
21677 #define HAVE_PW_PASSWD 1
21678 EOF
21679
21680 fi
21681
21682
21683 echo $ac_n "checking if toupper() requires islower()""... $ac_c" 1>&6
21684 echo "configure:21685: checking if toupper() requires islower()" >&5
21685 if eval "test \"\${ol_cv_c_upper_lower+set}\" = set"; then
21686   echo $ac_n "(cached) $ac_c" 1>&6
21687 else
21688   
21689         if test "$cross_compiling" = yes; then
21690   ol_cv_c_upper_lower=safe
21691 else
21692   cat > conftest.$ac_ext <<EOF
21693 #line 21694 "configure"
21694 #include "confdefs.h"
21695
21696 #include <ctype.h>
21697 main()
21698 {
21699         if ('C' == toupper('C'))
21700                 exit(0);
21701         else
21702                 exit(1);
21703 }
21704 EOF
21705 if { (eval echo configure:21706: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
21706 then
21707   ol_cv_c_upper_lower=no
21708 else
21709   echo "configure: failed program was:" >&5
21710   cat conftest.$ac_ext >&5
21711   rm -fr conftest*
21712   ol_cv_c_upper_lower=yes
21713 fi
21714 rm -fr conftest*
21715 fi
21716
21717 fi
21718
21719 echo "$ac_t""$ol_cv_c_upper_lower" 1>&6
21720 if test $ol_cv_c_upper_lower != no ; then
21721         cat >> confdefs.h <<\EOF
21722 #define C_UPPER_LOWER 1
21723 EOF
21724
21725 fi
21726
21727 echo $ac_n "checking for working const""... $ac_c" 1>&6
21728 echo "configure:21729: checking for working const" >&5
21729 if eval "test \"\${ac_cv_c_const+set}\" = set"; then
21730   echo $ac_n "(cached) $ac_c" 1>&6
21731 else
21732   cat > conftest.$ac_ext <<EOF
21733 #line 21734 "configure"
21734 #include "confdefs.h"
21735
21736 int main() {
21737
21738 /* Ultrix mips cc rejects this.  */
21739 typedef int charset[2]; const charset x;
21740 /* SunOS 4.1.1 cc rejects this.  */
21741 char const *const *ccp;
21742 char **p;
21743 /* NEC SVR4.0.2 mips cc rejects this.  */
21744 struct point {int x, y;};
21745 static struct point const zero = {0,0};
21746 /* AIX XL C 1.02.0.0 rejects this.
21747    It does not let you subtract one const X* pointer from another in an arm
21748    of an if-expression whose if-part is not a constant expression */
21749 const char *g = "string";
21750 ccp = &g + (g ? g-g : 0);
21751 /* HPUX 7.0 cc rejects these. */
21752 ++ccp;
21753 p = (char**) ccp;
21754 ccp = (char const *const *) p;
21755 { /* SCO 3.2v4 cc rejects this.  */
21756   char *t;
21757   char const *s = 0 ? (char *) 0 : (char const *) 0;
21758
21759   *t++ = 0;
21760 }
21761 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
21762   int x[] = {25, 17};
21763   const int *foo = &x[0];
21764   ++foo;
21765 }
21766 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
21767   typedef const int *iptr;
21768   iptr p = 0;
21769   ++p;
21770 }
21771 { /* AIX XL C 1.02.0.0 rejects this saying
21772      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
21773   struct s { int j; const int *ap[3]; };
21774   struct s *b; b->j = 5;
21775 }
21776 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
21777   const int foo = 10;
21778 }
21779
21780 ; return 0; }
21781 EOF
21782 if { (eval echo configure:21783: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21783   rm -rf conftest*
21784   ac_cv_c_const=yes
21785 else
21786   echo "configure: failed program was:" >&5
21787   cat conftest.$ac_ext >&5
21788   rm -rf conftest*
21789   ac_cv_c_const=no
21790 fi
21791 rm -f conftest*
21792 fi
21793
21794 echo "$ac_t""$ac_cv_c_const" 1>&6
21795 if test $ac_cv_c_const = no; then
21796   cat >> confdefs.h <<\EOF
21797 #define const 
21798 EOF
21799
21800 fi
21801
21802 echo $ac_n "checking if compiler understands volatile""... $ac_c" 1>&6
21803 echo "configure:21804: checking if compiler understands volatile" >&5
21804 if eval "test \"\${ol_cv_c_volatile+set}\" = set"; then
21805   echo $ac_n "(cached) $ac_c" 1>&6
21806 else
21807   cat > conftest.$ac_ext <<EOF
21808 #line 21809 "configure"
21809 #include "confdefs.h"
21810 int x, y, z;
21811 int main() {
21812 volatile int a; int * volatile b = x ? &y : &z;
21813       /* Older MIPS compilers (eg., in Ultrix 4.2) don't like *b = 0 */
21814       *b = 0;
21815 ; return 0; }
21816 EOF
21817 if { (eval echo configure:21818: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21818   rm -rf conftest*
21819   ol_cv_c_volatile=yes
21820 else
21821   echo "configure: failed program was:" >&5
21822   cat conftest.$ac_ext >&5
21823   rm -rf conftest*
21824   ol_cv_c_volatile=no
21825 fi
21826 rm -f conftest*
21827 fi
21828
21829 echo "$ac_t""$ol_cv_c_volatile" 1>&6
21830   if test $ol_cv_c_volatile = yes; then
21831     : 
21832   else
21833     cat >> confdefs.h <<\EOF
21834 #define volatile 
21835 EOF
21836
21837   fi
21838  
21839
21840 if test $cross_compiling = yes ; then
21841         echo "configure: warning: Crossing compiling... all bets are off!" 1>&2
21842         cat >> confdefs.h <<\EOF
21843 #define CROSS_COMPILING 1
21844 EOF
21845
21846 else
21847         echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
21848 echo "configure:21849: checking whether byte ordering is bigendian" >&5
21849 if eval "test \"\${ac_cv_c_bigendian+set}\" = set"; then
21850   echo $ac_n "(cached) $ac_c" 1>&6
21851 else
21852   ac_cv_c_bigendian=unknown
21853 # See if sys/param.h defines the BYTE_ORDER macro.
21854 cat > conftest.$ac_ext <<EOF
21855 #line 21856 "configure"
21856 #include "confdefs.h"
21857 #include <sys/types.h>
21858 #include <sys/param.h>
21859 int main() {
21860
21861 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
21862  bogus endian macros
21863 #endif
21864 ; return 0; }
21865 EOF
21866 if { (eval echo configure:21867: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21867   rm -rf conftest*
21868   # It does; now see whether it defined to BIG_ENDIAN or not.
21869 cat > conftest.$ac_ext <<EOF
21870 #line 21871 "configure"
21871 #include "confdefs.h"
21872 #include <sys/types.h>
21873 #include <sys/param.h>
21874 int main() {
21875
21876 #if BYTE_ORDER != BIG_ENDIAN
21877  not big endian
21878 #endif
21879 ; return 0; }
21880 EOF
21881 if { (eval echo configure:21882: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21882   rm -rf conftest*
21883   ac_cv_c_bigendian=yes
21884 else
21885   echo "configure: failed program was:" >&5
21886   cat conftest.$ac_ext >&5
21887   rm -rf conftest*
21888   ac_cv_c_bigendian=no
21889 fi
21890 rm -f conftest*
21891 else
21892   echo "configure: failed program was:" >&5
21893   cat conftest.$ac_ext >&5
21894 fi
21895 rm -f conftest*
21896 if test $ac_cv_c_bigendian = unknown; then
21897 if test "$cross_compiling" = yes; then
21898     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
21899 else
21900   cat > conftest.$ac_ext <<EOF
21901 #line 21902 "configure"
21902 #include "confdefs.h"
21903 main () {
21904   /* Are we little or big endian?  From Harbison&Steele.  */
21905   union
21906   {
21907     long l;
21908     char c[sizeof (long)];
21909   } u;
21910   u.l = 1;
21911   exit (u.c[sizeof (long) - 1] == 1);
21912 }
21913 EOF
21914 if { (eval echo configure:21915: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
21915 then
21916   ac_cv_c_bigendian=no
21917 else
21918   echo "configure: failed program was:" >&5
21919   cat conftest.$ac_ext >&5
21920   rm -fr conftest*
21921   ac_cv_c_bigendian=yes
21922 fi
21923 rm -fr conftest*
21924 fi
21925
21926 fi
21927 fi
21928
21929 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
21930 if test $ac_cv_c_bigendian = yes; then
21931   cat >> confdefs.h <<\EOF
21932 #define WORDS_BIGENDIAN 1
21933 EOF
21934
21935 fi
21936
21937 fi
21938
21939 echo $ac_n "checking size of short""... $ac_c" 1>&6
21940 echo "configure:21941: checking size of short" >&5 
21941 if eval "test \"\${ac_cv_sizeof_short+set}\" = set"; then
21942   echo $ac_n "(cached) $ac_c" 1>&6
21943 else
21944   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
21945   cat > conftest.$ac_ext <<EOF
21946 #line 21947 "configure"
21947 #include "confdefs.h"
21948 #include "confdefs.h" 
21949 #include <stdlib.h>
21950 #include <sys/types.h> 
21951  
21952
21953 int main() {
21954 switch (0) case 0: case (sizeof (short) == $ac_size):;
21955 ; return 0; }
21956 EOF
21957 if { (eval echo configure:21958: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21958   rm -rf conftest*
21959   ac_cv_sizeof_short=$ac_size
21960 else
21961   echo "configure: failed program was:" >&5
21962   cat conftest.$ac_ext >&5
21963 fi
21964 rm -f conftest* 
21965   if test x$ac_cv_sizeof_short != x ; then break; fi 
21966 done 
21967
21968 fi
21969  
21970 if test x$ac_cv_sizeof_short = x ; then 
21971   { echo "configure: error: cannot determine a size for short" 1>&2; exit 1; } 
21972 fi 
21973 echo "$ac_t""$ac_cv_sizeof_short" 1>&6 
21974 cat >> confdefs.h <<EOF
21975 #define SIZEOF_SHORT $ac_cv_sizeof_short
21976 EOF
21977  
21978  
21979 echo $ac_n "checking size of int""... $ac_c" 1>&6
21980 echo "configure:21981: checking size of int" >&5 
21981 if eval "test \"\${ac_cv_sizeof_int+set}\" = set"; then
21982   echo $ac_n "(cached) $ac_c" 1>&6
21983 else
21984   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
21985   cat > conftest.$ac_ext <<EOF
21986 #line 21987 "configure"
21987 #include "confdefs.h"
21988 #include "confdefs.h" 
21989 #include <stdlib.h>
21990 #include <sys/types.h> 
21991  
21992
21993 int main() {
21994 switch (0) case 0: case (sizeof (int) == $ac_size):;
21995 ; return 0; }
21996 EOF
21997 if { (eval echo configure:21998: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21998   rm -rf conftest*
21999   ac_cv_sizeof_int=$ac_size
22000 else
22001   echo "configure: failed program was:" >&5
22002   cat conftest.$ac_ext >&5
22003 fi
22004 rm -f conftest* 
22005   if test x$ac_cv_sizeof_int != x ; then break; fi 
22006 done 
22007
22008 fi
22009  
22010 if test x$ac_cv_sizeof_int = x ; then 
22011   { echo "configure: error: cannot determine a size for int" 1>&2; exit 1; } 
22012 fi 
22013 echo "$ac_t""$ac_cv_sizeof_int" 1>&6 
22014 cat >> confdefs.h <<EOF
22015 #define SIZEOF_INT $ac_cv_sizeof_int
22016 EOF
22017  
22018  
22019 echo $ac_n "checking size of long""... $ac_c" 1>&6
22020 echo "configure:22021: checking size of long" >&5 
22021 if eval "test \"\${ac_cv_sizeof_long+set}\" = set"; then
22022   echo $ac_n "(cached) $ac_c" 1>&6
22023 else
22024   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
22025   cat > conftest.$ac_ext <<EOF
22026 #line 22027 "configure"
22027 #include "confdefs.h"
22028 #include "confdefs.h" 
22029 #include <stdlib.h>
22030 #include <sys/types.h> 
22031  
22032
22033 int main() {
22034 switch (0) case 0: case (sizeof (long) == $ac_size):;
22035 ; return 0; }
22036 EOF
22037 if { (eval echo configure:22038: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22038   rm -rf conftest*
22039   ac_cv_sizeof_long=$ac_size
22040 else
22041   echo "configure: failed program was:" >&5
22042   cat conftest.$ac_ext >&5
22043 fi
22044 rm -f conftest* 
22045   if test x$ac_cv_sizeof_long != x ; then break; fi 
22046 done 
22047
22048 fi
22049  
22050 if test x$ac_cv_sizeof_long = x ; then 
22051   { echo "configure: error: cannot determine a size for long" 1>&2; exit 1; } 
22052 fi 
22053 echo "$ac_t""$ac_cv_sizeof_long" 1>&6 
22054 cat >> confdefs.h <<EOF
22055 #define SIZEOF_LONG $ac_cv_sizeof_long
22056 EOF
22057  
22058
22059 echo $ac_n "checking size of wchar_t""... $ac_c" 1>&6
22060 echo "configure:22061: checking size of wchar_t" >&5 
22061 if eval "test \"\${ac_cv_sizeof_wchar_t+set}\" = set"; then
22062   echo $ac_n "(cached) $ac_c" 1>&6
22063 else
22064   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
22065   cat > conftest.$ac_ext <<EOF
22066 #line 22067 "configure"
22067 #include "confdefs.h"
22068 #include "confdefs.h" 
22069 #include <stdlib.h>
22070 #include <sys/types.h> 
22071  
22072
22073 int main() {
22074 switch (0) case 0: case (sizeof (wchar_t) == $ac_size):;
22075 ; return 0; }
22076 EOF
22077 if { (eval echo configure:22078: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22078   rm -rf conftest*
22079   ac_cv_sizeof_wchar_t=$ac_size
22080 else
22081   echo "configure: failed program was:" >&5
22082   cat conftest.$ac_ext >&5
22083 fi
22084 rm -f conftest* 
22085   if test x$ac_cv_sizeof_wchar_t != x ; then break; fi 
22086 done 
22087
22088 fi
22089  
22090 if test x$ac_cv_sizeof_wchar_t = x ; then 
22091   { echo "configure: error: cannot determine a size for wchar_t" 1>&2; exit 1; } 
22092 fi 
22093 echo "$ac_t""$ac_cv_sizeof_wchar_t" 1>&6 
22094 cat >> confdefs.h <<EOF
22095 #define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
22096 EOF
22097  
22098
22099
22100 if test "$ac_cv_sizeof_int" -lt 4 ; then
22101         echo "configure: warning: OpenLDAP requires 'int' to be 32 bits or greater." 1>&2
22102
22103         cat >> confdefs.h <<\EOF
22104 #define LBER_INT_T long
22105 EOF
22106
22107 else
22108         cat >> confdefs.h <<\EOF
22109 #define LBER_INT_T int
22110 EOF
22111
22112 fi
22113
22114 cat >> confdefs.h <<\EOF
22115 #define LBER_LEN_T long
22116 EOF
22117
22118 cat >> confdefs.h <<\EOF
22119 #define LBER_SOCKET_T int
22120 EOF
22121
22122 cat >> confdefs.h <<\EOF
22123 #define LBER_TAG_T long
22124 EOF
22125
22126
22127 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
22128 echo "configure:22129: checking for 8-bit clean memcmp" >&5
22129 if eval "test \"\${ac_cv_func_memcmp_clean+set}\" = set"; then
22130   echo $ac_n "(cached) $ac_c" 1>&6
22131 else
22132   if test "$cross_compiling" = yes; then
22133   ac_cv_func_memcmp_clean=no
22134 else
22135   cat > conftest.$ac_ext <<EOF
22136 #line 22137 "configure"
22137 #include "confdefs.h"
22138
22139 main()
22140 {
22141   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
22142   exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
22143 }
22144
22145 EOF
22146 if { (eval echo configure:22147: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
22147 then
22148   ac_cv_func_memcmp_clean=yes
22149 else
22150   echo "configure: failed program was:" >&5
22151   cat conftest.$ac_ext >&5
22152   rm -fr conftest*
22153   ac_cv_func_memcmp_clean=no
22154 fi
22155 rm -fr conftest*
22156 fi
22157
22158 fi
22159
22160 echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
22161 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
22162
22163 echo $ac_n "checking for strftime""... $ac_c" 1>&6
22164 echo "configure:22165: checking for strftime" >&5
22165 if eval "test \"\${ac_cv_func_strftime+set}\" = set"; then
22166   echo $ac_n "(cached) $ac_c" 1>&6
22167 else
22168   cat > conftest.$ac_ext <<EOF
22169 #line 22170 "configure"
22170 #include "confdefs.h"
22171 /* System header to define __stub macros and hopefully few prototypes,
22172     which can conflict with char strftime(); below.  */
22173 #include <assert.h>
22174 /* Override any gcc2 internal prototype to avoid an error.  */
22175 /* We use char because int might match the return type of a gcc2
22176     builtin and then its argument prototype would still apply.  */
22177 char strftime();
22178 char (*f)();
22179
22180 int main() {
22181
22182 /* The GNU C library defines this for functions which it implements
22183     to always fail with ENOSYS.  Some functions are actually named
22184     something starting with __ and the normal name is an alias.  */
22185 #if defined (__stub_strftime) || defined (__stub___strftime)
22186 choke me
22187 #else
22188 f = strftime;
22189 #endif
22190
22191 ; return 0; }
22192 EOF
22193 if { (eval echo configure:22194: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22194   rm -rf conftest*
22195   eval "ac_cv_func_strftime=yes"
22196 else
22197   echo "configure: failed program was:" >&5
22198   cat conftest.$ac_ext >&5
22199   rm -rf conftest*
22200   eval "ac_cv_func_strftime=no"
22201 fi
22202 rm -f conftest*
22203 fi
22204
22205 if eval "test \"`echo '$ac_cv_func_'strftime`\" = yes"; then
22206   echo "$ac_t""yes" 1>&6
22207   cat >> confdefs.h <<\EOF
22208 #define HAVE_STRFTIME 1
22209 EOF
22210
22211 else
22212   echo "$ac_t""no" 1>&6
22213 # strftime is in -lintl on SCO UNIX.
22214 echo $ac_n "checking for strftime in -lintl""... $ac_c" 1>&6
22215 echo "configure:22216: checking for strftime in -lintl" >&5
22216 ac_lib_var=`echo intl'_'strftime | sed 'y%./+-:%__p__%'`
22217 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
22218   echo $ac_n "(cached) $ac_c" 1>&6
22219 else
22220   ac_save_LIBS="$LIBS"
22221 LIBS="-lintl  $LIBS"
22222 cat > conftest.$ac_ext <<EOF
22223 #line 22224 "configure"
22224 #include "confdefs.h"
22225 /* Override any gcc2 internal prototype to avoid an error.  */
22226 /* We use char because int might match the return type of a gcc2
22227     builtin and then its argument prototype would still apply.  */
22228 char strftime();
22229
22230 int main() {
22231 strftime()
22232 ; return 0; }
22233 EOF
22234 if { (eval echo configure:22235: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22235   rm -rf conftest*
22236   eval "ac_cv_lib_$ac_lib_var=yes"
22237 else
22238   echo "configure: failed program was:" >&5
22239   cat conftest.$ac_ext >&5
22240   rm -rf conftest*
22241   eval "ac_cv_lib_$ac_lib_var=no"
22242 fi
22243 rm -f conftest*
22244 LIBS="$ac_save_LIBS"
22245
22246 fi
22247 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
22248   echo "$ac_t""yes" 1>&6
22249   cat >> confdefs.h <<\EOF
22250 #define HAVE_STRFTIME 1
22251 EOF
22252
22253 LIBS="-lintl $LIBS"
22254 else
22255   echo "$ac_t""no" 1>&6
22256 fi
22257
22258 fi
22259
22260
22261 echo $ac_n "checking for inet_aton()""... $ac_c" 1>&6
22262 echo "configure:22263: checking for inet_aton()" >&5
22263 if eval "test \"\${ol_cv_func_inet_aton+set}\" = set"; then
22264   echo $ac_n "(cached) $ac_c" 1>&6
22265 else
22266   cat > conftest.$ac_ext <<EOF
22267 #line 22268 "configure"
22268 #include "confdefs.h"
22269
22270 #ifdef HAVE_SYS_TYPES_H
22271 #       include <sys/types.h>
22272 #endif
22273 #ifdef HAVE_SYS_SOCKET_H
22274 #       include <sys/socket.h>
22275 #       ifdef HAVE_SYS_SELECT_H
22276 #               include <sys/select.h>
22277 #       endif
22278 #       include <netinet/in.h>
22279 #       ifdef HAVE_ARPA_INET_H
22280 #               include <arpa/inet.h>
22281 #       endif
22282 #endif
22283
22284 int main() {
22285 struct in_addr in;
22286 int rc = inet_aton( "255.255.255.255", &in );
22287 ; return 0; }
22288 EOF
22289 if { (eval echo configure:22290: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22290   rm -rf conftest*
22291   ol_cv_func_inet_aton=yes
22292 else
22293   echo "configure: failed program was:" >&5
22294   cat conftest.$ac_ext >&5
22295   rm -rf conftest*
22296   ol_cv_func_inet_aton=no
22297 fi
22298 rm -f conftest*
22299 fi
22300
22301 echo "$ac_t""$ol_cv_func_inet_aton" 1>&6
22302   if test $ol_cv_func_inet_aton != no; then
22303     cat >> confdefs.h <<\EOF
22304 #define HAVE_INET_ATON 1
22305 EOF
22306
22307   fi
22308  
22309
22310 echo $ac_n "checking for _spawnlp""... $ac_c" 1>&6
22311 echo "configure:22312: checking for _spawnlp" >&5
22312 if eval "test \"\${ac_cv_func__spawnlp+set}\" = set"; then
22313   echo $ac_n "(cached) $ac_c" 1>&6
22314 else
22315   cat > conftest.$ac_ext <<EOF
22316 #line 22317 "configure"
22317 #include "confdefs.h"
22318 /* System header to define __stub macros and hopefully few prototypes,
22319     which can conflict with char _spawnlp(); below.  */
22320 #include <assert.h>
22321 /* Override any gcc2 internal prototype to avoid an error.  */
22322 /* We use char because int might match the return type of a gcc2
22323     builtin and then its argument prototype would still apply.  */
22324 char _spawnlp();
22325 char (*f)();
22326
22327 int main() {
22328
22329 /* The GNU C library defines this for functions which it implements
22330     to always fail with ENOSYS.  Some functions are actually named
22331     something starting with __ and the normal name is an alias.  */
22332 #if defined (__stub__spawnlp) || defined (__stub____spawnlp)
22333 choke me
22334 #else
22335 f = _spawnlp;
22336 #endif
22337
22338 ; return 0; }
22339 EOF
22340 if { (eval echo configure:22341: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22341   rm -rf conftest*
22342   eval "ac_cv_func__spawnlp=yes"
22343 else
22344   echo "configure: failed program was:" >&5
22345   cat conftest.$ac_ext >&5
22346   rm -rf conftest*
22347   eval "ac_cv_func__spawnlp=no"
22348 fi
22349 rm -f conftest*
22350 fi
22351
22352 if eval "test \"`echo '$ac_cv_func_'_spawnlp`\" = yes"; then
22353   echo "$ac_t""yes" 1>&6
22354   cat >> confdefs.h <<\EOF
22355 #define HAVE_SPAWNLP 1
22356 EOF
22357
22358 else
22359   echo "$ac_t""no" 1>&6
22360 fi
22361
22362
22363 echo $ac_n "checking for _snprintf""... $ac_c" 1>&6
22364 echo "configure:22365: checking for _snprintf" >&5
22365 if eval "test \"\${ac_cv_func__snprintf+set}\" = set"; then
22366   echo $ac_n "(cached) $ac_c" 1>&6
22367 else
22368   cat > conftest.$ac_ext <<EOF
22369 #line 22370 "configure"
22370 #include "confdefs.h"
22371 /* System header to define __stub macros and hopefully few prototypes,
22372     which can conflict with char _snprintf(); below.  */
22373 #include <assert.h>
22374 /* Override any gcc2 internal prototype to avoid an error.  */
22375 /* We use char because int might match the return type of a gcc2
22376     builtin and then its argument prototype would still apply.  */
22377 char _snprintf();
22378 char (*f)();
22379
22380 int main() {
22381
22382 /* The GNU C library defines this for functions which it implements
22383     to always fail with ENOSYS.  Some functions are actually named
22384     something starting with __ and the normal name is an alias.  */
22385 #if defined (__stub__snprintf) || defined (__stub____snprintf)
22386 choke me
22387 #else
22388 f = _snprintf;
22389 #endif
22390
22391 ; return 0; }
22392 EOF
22393 if { (eval echo configure:22394: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22394   rm -rf conftest*
22395   eval "ac_cv_func__snprintf=yes"
22396 else
22397   echo "configure: failed program was:" >&5
22398   cat conftest.$ac_ext >&5
22399   rm -rf conftest*
22400   eval "ac_cv_func__snprintf=no"
22401 fi
22402 rm -f conftest*
22403 fi
22404
22405 if eval "test \"`echo '$ac_cv_func_'_snprintf`\" = yes"; then
22406   echo "$ac_t""yes" 1>&6
22407   ac_cv_func_snprintf=yes
22408         cat >> confdefs.h <<\EOF
22409 #define snprintf _snprintf
22410 EOF
22411
22412
22413 else
22414   echo "$ac_t""no" 1>&6
22415 fi
22416
22417
22418 echo $ac_n "checking for _vsnprintf""... $ac_c" 1>&6
22419 echo "configure:22420: checking for _vsnprintf" >&5
22420 if eval "test \"\${ac_cv_func__vsnprintf+set}\" = set"; then
22421   echo $ac_n "(cached) $ac_c" 1>&6
22422 else
22423   cat > conftest.$ac_ext <<EOF
22424 #line 22425 "configure"
22425 #include "confdefs.h"
22426 /* System header to define __stub macros and hopefully few prototypes,
22427     which can conflict with char _vsnprintf(); below.  */
22428 #include <assert.h>
22429 /* Override any gcc2 internal prototype to avoid an error.  */
22430 /* We use char because int might match the return type of a gcc2
22431     builtin and then its argument prototype would still apply.  */
22432 char _vsnprintf();
22433 char (*f)();
22434
22435 int main() {
22436
22437 /* The GNU C library defines this for functions which it implements
22438     to always fail with ENOSYS.  Some functions are actually named
22439     something starting with __ and the normal name is an alias.  */
22440 #if defined (__stub__vsnprintf) || defined (__stub____vsnprintf)
22441 choke me
22442 #else
22443 f = _vsnprintf;
22444 #endif
22445
22446 ; return 0; }
22447 EOF
22448 if { (eval echo configure:22449: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22449   rm -rf conftest*
22450   eval "ac_cv_func__vsnprintf=yes"
22451 else
22452   echo "configure: failed program was:" >&5
22453   cat conftest.$ac_ext >&5
22454   rm -rf conftest*
22455   eval "ac_cv_func__vsnprintf=no"
22456 fi
22457 rm -f conftest*
22458 fi
22459
22460 if eval "test \"`echo '$ac_cv_func_'_vsnprintf`\" = yes"; then
22461   echo "$ac_t""yes" 1>&6
22462   ac_cv_func_vsnprintf=yes
22463         cat >> confdefs.h <<\EOF
22464 #define vsnprintf _vsnprintf
22465 EOF
22466
22467
22468 else
22469   echo "$ac_t""no" 1>&6
22470 fi
22471
22472
22473 echo $ac_n "checking for vprintf""... $ac_c" 1>&6
22474 echo "configure:22475: checking for vprintf" >&5
22475 if eval "test \"\${ac_cv_func_vprintf+set}\" = set"; then
22476   echo $ac_n "(cached) $ac_c" 1>&6
22477 else
22478   cat > conftest.$ac_ext <<EOF
22479 #line 22480 "configure"
22480 #include "confdefs.h"
22481 /* System header to define __stub macros and hopefully few prototypes,
22482     which can conflict with char vprintf(); below.  */
22483 #include <assert.h>
22484 /* Override any gcc2 internal prototype to avoid an error.  */
22485 /* We use char because int might match the return type of a gcc2
22486     builtin and then its argument prototype would still apply.  */
22487 char vprintf();
22488 char (*f)();
22489
22490 int main() {
22491
22492 /* The GNU C library defines this for functions which it implements
22493     to always fail with ENOSYS.  Some functions are actually named
22494     something starting with __ and the normal name is an alias.  */
22495 #if defined (__stub_vprintf) || defined (__stub___vprintf)
22496 choke me
22497 #else
22498 f = vprintf;
22499 #endif
22500
22501 ; return 0; }
22502 EOF
22503 if { (eval echo configure:22504: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22504   rm -rf conftest*
22505   eval "ac_cv_func_vprintf=yes"
22506 else
22507   echo "configure: failed program was:" >&5
22508   cat conftest.$ac_ext >&5
22509   rm -rf conftest*
22510   eval "ac_cv_func_vprintf=no"
22511 fi
22512 rm -f conftest*
22513 fi
22514
22515 if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
22516   echo "$ac_t""yes" 1>&6
22517   cat >> confdefs.h <<\EOF
22518 #define HAVE_VPRINTF 1
22519 EOF
22520
22521 else
22522   echo "$ac_t""no" 1>&6
22523 fi
22524
22525 if test "$ac_cv_func_vprintf" != yes; then
22526 echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
22527 echo "configure:22528: checking for _doprnt" >&5
22528 if eval "test \"\${ac_cv_func__doprnt+set}\" = set"; then
22529   echo $ac_n "(cached) $ac_c" 1>&6
22530 else
22531   cat > conftest.$ac_ext <<EOF
22532 #line 22533 "configure"
22533 #include "confdefs.h"
22534 /* System header to define __stub macros and hopefully few prototypes,
22535     which can conflict with char _doprnt(); below.  */
22536 #include <assert.h>
22537 /* Override any gcc2 internal prototype to avoid an error.  */
22538 /* We use char because int might match the return type of a gcc2
22539     builtin and then its argument prototype would still apply.  */
22540 char _doprnt();
22541 char (*f)();
22542
22543 int main() {
22544
22545 /* The GNU C library defines this for functions which it implements
22546     to always fail with ENOSYS.  Some functions are actually named
22547     something starting with __ and the normal name is an alias.  */
22548 #if defined (__stub__doprnt) || defined (__stub____doprnt)
22549 choke me
22550 #else
22551 f = _doprnt;
22552 #endif
22553
22554 ; return 0; }
22555 EOF
22556 if { (eval echo configure:22557: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22557   rm -rf conftest*
22558   eval "ac_cv_func__doprnt=yes"
22559 else
22560   echo "configure: failed program was:" >&5
22561   cat conftest.$ac_ext >&5
22562   rm -rf conftest*
22563   eval "ac_cv_func__doprnt=no"
22564 fi
22565 rm -f conftest*
22566 fi
22567
22568 if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
22569   echo "$ac_t""yes" 1>&6
22570   cat >> confdefs.h <<\EOF
22571 #define HAVE_DOPRNT 1
22572 EOF
22573
22574 else
22575   echo "$ac_t""no" 1>&6
22576 fi
22577
22578 fi
22579
22580
22581 if test $ac_cv_func_vprintf = yes ; then
22582                 for ac_func in snprintf vsnprintf
22583 do
22584 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
22585 echo "configure:22586: checking for $ac_func" >&5
22586 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
22587   echo $ac_n "(cached) $ac_c" 1>&6
22588 else
22589   cat > conftest.$ac_ext <<EOF
22590 #line 22591 "configure"
22591 #include "confdefs.h"
22592 /* System header to define __stub macros and hopefully few prototypes,
22593     which can conflict with char $ac_func(); below.  */
22594 #include <assert.h>
22595 /* Override any gcc2 internal prototype to avoid an error.  */
22596 /* We use char because int might match the return type of a gcc2
22597     builtin and then its argument prototype would still apply.  */
22598 char $ac_func();
22599 char (*f)();
22600
22601 int main() {
22602
22603 /* The GNU C library defines this for functions which it implements
22604     to always fail with ENOSYS.  Some functions are actually named
22605     something starting with __ and the normal name is an alias.  */
22606 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
22607 choke me
22608 #else
22609 f = $ac_func;
22610 #endif
22611
22612 ; return 0; }
22613 EOF
22614 if { (eval echo configure:22615: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22615   rm -rf conftest*
22616   eval "ac_cv_func_$ac_func=yes"
22617 else
22618   echo "configure: failed program was:" >&5
22619   cat conftest.$ac_ext >&5
22620   rm -rf conftest*
22621   eval "ac_cv_func_$ac_func=no"
22622 fi
22623 rm -f conftest*
22624 fi
22625
22626 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
22627   echo "$ac_t""yes" 1>&6
22628     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
22629   cat >> confdefs.h <<EOF
22630 #define $ac_tr_func 1
22631 EOF
22632  
22633 else
22634   echo "$ac_t""no" 1>&6
22635 fi
22636 done
22637
22638 fi
22639
22640 for ac_func in \
22641         bcopy                   \
22642         closesocket             \
22643         chroot                  \
22644         endgrent                \
22645         endpwent                \
22646         fcntl                   \
22647         flock                   \
22648         fstat                   \
22649         getdtablesize   \
22650         getgrgid                \
22651         gethostname             \
22652         getpass                 \
22653         getpassphrase   \
22654         getpwuid                \
22655         getpwnam                \
22656         getspnam                \
22657         gettimeofday    \
22658         initgroups              \
22659         lockf                   \
22660         memcpy                  \
22661         memmove                 \
22662         mkstemp                 \
22663         mktemp                  \
22664         pipe                    \
22665         read                    \
22666         recv                    \
22667         recvfrom                \
22668         setpwfile               \
22669         setgid                  \
22670         setegid                 \
22671         setsid                  \
22672         setuid                  \
22673         seteuid                 \
22674         sigaction               \
22675         signal                  \
22676         sigset                  \
22677         strdup                  \
22678         strerror                \
22679         strpbrk                 \
22680         strrchr                 \
22681         strsep                  \
22682         strstr                  \
22683         strtol                  \
22684         strtoul                 \
22685         strtoq                  \
22686         strtouq                 \
22687         strtoll                 \
22688         strspn                  \
22689         sysconf                 \
22690         usleep                  \
22691         waitpid                 \
22692         wait4                   \
22693         write                   \
22694         send                    \
22695         sendmsg                 \
22696         sendto                  \
22697
22698 do
22699 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
22700 echo "configure:22701: checking for $ac_func" >&5
22701 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
22702   echo $ac_n "(cached) $ac_c" 1>&6
22703 else
22704   cat > conftest.$ac_ext <<EOF
22705 #line 22706 "configure"
22706 #include "confdefs.h"
22707 /* System header to define __stub macros and hopefully few prototypes,
22708     which can conflict with char $ac_func(); below.  */
22709 #include <assert.h>
22710 /* Override any gcc2 internal prototype to avoid an error.  */
22711 /* We use char because int might match the return type of a gcc2
22712     builtin and then its argument prototype would still apply.  */
22713 char $ac_func();
22714 char (*f)();
22715
22716 int main() {
22717
22718 /* The GNU C library defines this for functions which it implements
22719     to always fail with ENOSYS.  Some functions are actually named
22720     something starting with __ and the normal name is an alias.  */
22721 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
22722 choke me
22723 #else
22724 f = $ac_func;
22725 #endif
22726
22727 ; return 0; }
22728 EOF
22729 if { (eval echo configure:22730: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22730   rm -rf conftest*
22731   eval "ac_cv_func_$ac_func=yes"
22732 else
22733   echo "configure: failed program was:" >&5
22734   cat conftest.$ac_ext >&5
22735   rm -rf conftest*
22736   eval "ac_cv_func_$ac_func=no"
22737 fi
22738 rm -f conftest*
22739 fi
22740
22741 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
22742   echo "$ac_t""yes" 1>&6
22743     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
22744   cat >> confdefs.h <<EOF
22745 #define $ac_tr_func 1
22746 EOF
22747  
22748 else
22749   echo "$ac_t""no" 1>&6
22750 fi
22751 done
22752
22753
22754 for ac_func in getopt getpeereid
22755 do
22756 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
22757 echo "configure:22758: checking for $ac_func" >&5
22758 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
22759   echo $ac_n "(cached) $ac_c" 1>&6
22760 else
22761   cat > conftest.$ac_ext <<EOF
22762 #line 22763 "configure"
22763 #include "confdefs.h"
22764 /* System header to define __stub macros and hopefully few prototypes,
22765     which can conflict with char $ac_func(); below.  */
22766 #include <assert.h>
22767 /* Override any gcc2 internal prototype to avoid an error.  */
22768 /* We use char because int might match the return type of a gcc2
22769     builtin and then its argument prototype would still apply.  */
22770 char $ac_func();
22771 char (*f)();
22772
22773 int main() {
22774
22775 /* The GNU C library defines this for functions which it implements
22776     to always fail with ENOSYS.  Some functions are actually named
22777     something starting with __ and the normal name is an alias.  */
22778 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
22779 choke me
22780 #else
22781 f = $ac_func;
22782 #endif
22783
22784 ; return 0; }
22785 EOF
22786 if { (eval echo configure:22787: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22787   rm -rf conftest*
22788   eval "ac_cv_func_$ac_func=yes"
22789 else
22790   echo "configure: failed program was:" >&5
22791   cat conftest.$ac_ext >&5
22792   rm -rf conftest*
22793   eval "ac_cv_func_$ac_func=no"
22794 fi
22795 rm -f conftest*
22796 fi
22797
22798 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
22799   echo "$ac_t""yes" 1>&6
22800     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
22801   cat >> confdefs.h <<EOF
22802 #define $ac_tr_func 1
22803 EOF
22804  
22805 else
22806   echo "$ac_t""no" 1>&6
22807 LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
22808 fi
22809 done
22810
22811
22812
22813 if test "$ac_cv_func_getopt" != yes; then
22814         LIBSRCS="$LIBSRCS getopt.c"
22815 fi
22816 if test "$ac_cv_func_getpeereid" != yes; then
22817         echo $ac_n "checking for msg_accrights in msghdr""... $ac_c" 1>&6
22818 echo "configure:22819: checking for msg_accrights in msghdr" >&5
22819 if eval "test \"\${ol_cv_msghdr_msg_accrights+set}\" = set"; then
22820   echo $ac_n "(cached) $ac_c" 1>&6
22821 else
22822   cat > conftest.$ac_ext <<EOF
22823 #line 22824 "configure"
22824 #include "confdefs.h"
22825 #include <sys/socket.h>
22826 int main() {
22827 struct msghdr m; m.msg_accrightslen=0
22828 ; return 0; }
22829 EOF
22830 if { (eval echo configure:22831: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22831   rm -rf conftest*
22832   ol_cv_msghdr_msg_accrights=yes
22833 else
22834   echo "configure: failed program was:" >&5
22835   cat conftest.$ac_ext >&5
22836   rm -rf conftest*
22837   ol_cv_msghdr_msg_accrights=no
22838 fi
22839 rm -f conftest*
22840         
22841 fi
22842
22843 echo "$ac_t""$ol_cv_msghdr_msg_accrights" 1>&6
22844   if test $ol_cv_msghdr_msg_accrights = "yes" ; then
22845         cat >> confdefs.h <<\EOF
22846 #define HAVE_MSGHDR_MSG_ACCRIGHTS 1
22847 EOF
22848
22849   fi
22850
22851         LIBSRCS="$LIBSRCS getpeereid.c"
22852 fi
22853 if test "$ac_cv_func_snprintf" != yes -o "$ac_cv_func_vsnprintf" != yes; then
22854         if test "$ac_cv_func_snprintf" != yes; then
22855                 cat >> confdefs.h <<\EOF
22856 #define snprintf ber_pvt_snprintf
22857 EOF
22858
22859         fi
22860         if test "$ac_cv_func_vsnprintf" != yes; then
22861                 cat >> confdefs.h <<\EOF
22862 #define vsnprintf ber_pvt_vsnprintf
22863 EOF
22864
22865         fi
22866 fi
22867
22868 # Check Configuration
22869 echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6
22870 echo "configure:22871: checking declaration of sys_errlist" >&5
22871 if eval "test \"\${ol_cv_dcl_sys_errlist+set}\" = set"; then
22872   echo $ac_n "(cached) $ac_c" 1>&6
22873 else
22874   
22875         cat > conftest.$ac_ext <<EOF
22876 #line 22877 "configure"
22877 #include "confdefs.h"
22878
22879 #include <stdio.h>
22880 #include <sys/types.h>
22881 #include <errno.h>
22882 #ifdef WINNT
22883 #include <stdlib.h>
22884 #endif 
22885 int main() {
22886 char *c = (char *) *sys_errlist
22887 ; return 0; }
22888 EOF
22889 if { (eval echo configure:22890: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22890   rm -rf conftest*
22891   ol_cv_dcl_sys_errlist=yes
22892         ol_cv_have_sys_errlist=yes
22893 else
22894   echo "configure: failed program was:" >&5
22895   cat conftest.$ac_ext >&5
22896   rm -rf conftest*
22897   ol_cv_dcl_sys_errlist=no
22898 fi
22899 rm -f conftest*
22900 fi
22901
22902 echo "$ac_t""$ol_cv_dcl_sys_errlist" 1>&6
22903 #
22904 # It's possible (for near-UNIX clones) that sys_errlist doesn't exist
22905 if test $ol_cv_dcl_sys_errlist = no ; then
22906         cat >> confdefs.h <<\EOF
22907 #define DECL_SYS_ERRLIST 1
22908 EOF
22909
22910
22911         echo $ac_n "checking existence of sys_errlist""... $ac_c" 1>&6
22912 echo "configure:22913: checking existence of sys_errlist" >&5
22913 if eval "test \"\${ol_cv_have_sys_errlist+set}\" = set"; then
22914   echo $ac_n "(cached) $ac_c" 1>&6
22915 else
22916   
22917                 cat > conftest.$ac_ext <<EOF
22918 #line 22919 "configure"
22919 #include "confdefs.h"
22920 #include <errno.h>
22921 int main() {
22922 char *c = (char *) *sys_errlist
22923 ; return 0; }
22924 EOF
22925 if { (eval echo configure:22926: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22926   rm -rf conftest*
22927   ol_cv_have_sys_errlist=yes
22928 else
22929   echo "configure: failed program was:" >&5
22930   cat conftest.$ac_ext >&5
22931   rm -rf conftest*
22932   ol_cv_have_sys_errlist=no
22933 fi
22934 rm -f conftest*
22935 fi
22936
22937 echo "$ac_t""$ol_cv_have_sys_errlist" 1>&6
22938 fi
22939 if test $ol_cv_have_sys_errlist = yes ; then
22940         cat >> confdefs.h <<\EOF
22941 #define HAVE_SYS_ERRLIST 1
22942 EOF
22943
22944 fi
22945
22946
22947
22948 if test "$ol_enable_slapi" != no ; then
22949                         for ac_hdr in ltdl.h
22950 do
22951 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
22952 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
22953 echo "configure:22954: checking for $ac_hdr" >&5
22954 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
22955   echo $ac_n "(cached) $ac_c" 1>&6
22956 else
22957   cat > conftest.$ac_ext <<EOF
22958 #line 22959 "configure"
22959 #include "confdefs.h"
22960 #include <$ac_hdr>
22961 EOF
22962 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
22963 { (eval echo configure:22964: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
22964 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
22965 if test -z "$ac_err"; then
22966   rm -rf conftest*
22967   eval "ac_cv_header_$ac_safe=yes"
22968 else
22969   echo "$ac_err" >&5
22970   echo "configure: failed program was:" >&5
22971   cat conftest.$ac_ext >&5
22972   rm -rf conftest*
22973   eval "ac_cv_header_$ac_safe=no"
22974 fi
22975 rm -f conftest*
22976 fi
22977 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
22978   echo "$ac_t""yes" 1>&6
22979     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
22980   cat >> confdefs.h <<EOF
22981 #define $ac_tr_hdr 1
22982 EOF
22983  
22984 else
22985   echo "$ac_t""no" 1>&6
22986 fi
22987 done
22988
22989
22990         if test $ac_cv_header_ltdl_h != yes ; then
22991                 { echo "configure: error: could not locate <ltdl.h>" 1>&2; exit 1; }
22992         fi
22993         echo $ac_n "checking for lt_dlinit in -lltdl""... $ac_c" 1>&6
22994 echo "configure:22995: checking for lt_dlinit in -lltdl" >&5
22995 ac_lib_var=`echo ltdl'_'lt_dlinit | sed 'y%./+-:%__p__%'`
22996 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
22997   echo $ac_n "(cached) $ac_c" 1>&6
22998 else
22999   ac_save_LIBS="$LIBS"
23000 LIBS="-lltdl  $LIBS"
23001 cat > conftest.$ac_ext <<EOF
23002 #line 23003 "configure"
23003 #include "confdefs.h"
23004 /* Override any gcc2 internal prototype to avoid an error.  */
23005 /* We use char because int might match the return type of a gcc2
23006     builtin and then its argument prototype would still apply.  */
23007 char lt_dlinit();
23008
23009 int main() {
23010 lt_dlinit()
23011 ; return 0; }
23012 EOF
23013 if { (eval echo configure:23014: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
23014   rm -rf conftest*
23015   eval "ac_cv_lib_$ac_lib_var=yes"
23016 else
23017   echo "configure: failed program was:" >&5
23018   cat conftest.$ac_ext >&5
23019   rm -rf conftest*
23020   eval "ac_cv_lib_$ac_lib_var=no"
23021 fi
23022 rm -f conftest*
23023 LIBS="$ac_save_LIBS"
23024
23025 fi
23026 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
23027   echo "$ac_t""yes" 1>&6
23028   
23029                 SLAPI_LIBS=-lltdl
23030                 LIBSLAPI=libslapi.a
23031                 LIBSLAPITOOLS=../libslapi.a
23032                 cat >> confdefs.h <<\EOF
23033 #define HAVE_LIBLTDL 1
23034 EOF
23035
23036         
23037 else
23038   echo "$ac_t""no" 1>&6
23039 { echo "configure: error: could not locate libtool -lltdl" 1>&2; exit 1; }
23040 fi
23041
23042
23043         cat >> confdefs.h <<\EOF
23044 #define LDAP_SLAPI 1
23045 EOF
23046
23047 fi
23048
23049 if test "$ol_enable_debug" != no ; then
23050         cat >> confdefs.h <<\EOF
23051 #define LDAP_DEBUG 1
23052 EOF
23053
23054 fi
23055 if test "$ol_enable_syslog" = yes ; then
23056         cat >> confdefs.h <<\EOF
23057 #define LDAP_SYSLOG 1
23058 EOF
23059
23060 fi
23061 if test "$ol_link_kbind" != no ; then
23062         cat >> confdefs.h <<\EOF
23063 #define LDAP_API_FEATURE_X_OPENLDAP_V2_KBIND LDAP_VENDOR_VERSION
23064 EOF
23065
23066 fi
23067 if test "$ol_enable_proctitle" != no ; then
23068         cat >> confdefs.h <<\EOF
23069 #define LDAP_PROCTITLE 1
23070 EOF
23071
23072 fi
23073 if test "$ol_enable_referrals" != no ; then
23074         cat >> confdefs.h <<\EOF
23075 #define LDAP_API_FEATURE_X_OPENLDAP_V2_REFERRALS LDAP_VENDOR_VERSION
23076 EOF
23077
23078 fi
23079 if test "$ol_enable_local" != no; then
23080         cat >> confdefs.h <<\EOF
23081 #define LDAP_PF_LOCAL 1
23082 EOF
23083
23084 fi
23085 if test "$ol_link_ipv6" != no; then
23086         cat >> confdefs.h <<\EOF
23087 #define LDAP_PF_INET6 1
23088 EOF
23089
23090 fi
23091 if test "$ol_enable_cleartext" != no ; then
23092         cat >> confdefs.h <<\EOF
23093 #define SLAPD_CLEARTEXT 1
23094 EOF
23095
23096 fi
23097 if test "$ol_enable_crypt" != no ; then
23098         cat >> confdefs.h <<\EOF
23099 #define SLAPD_CRYPT 1
23100 EOF
23101
23102 fi
23103 if test "$ol_link_spasswd" != no ; then
23104         cat >> confdefs.h <<\EOF
23105 #define SLAPD_SPASSWD 1
23106 EOF
23107
23108 fi
23109 if test "$ol_enable_multimaster" != no ; then
23110         cat >> confdefs.h <<\EOF
23111 #define SLAPD_MULTIMASTER 1
23112 EOF
23113
23114 fi
23115 if test "$ol_enable_rlookups" != no ; then
23116         cat >> confdefs.h <<\EOF
23117 #define SLAPD_RLOOKUPS 1
23118 EOF
23119
23120 fi
23121 if test "$ol_enable_aci" != no ; then
23122         cat >> confdefs.h <<\EOF
23123 #define SLAPD_ACI_ENABLED 1
23124 EOF
23125
23126 fi
23127
23128 if test "$ol_link_modules" != no ; then
23129         cat >> confdefs.h <<\EOF
23130 #define SLAPD_MODULES 1
23131 EOF
23132
23133         BUILD_SLAPD=yes
23134         SLAPD_MODULES_LDFLAGS="-dlopen self"
23135 fi
23136
23137 cat >> confdefs.h <<\EOF
23138 #define SLAPD_MOD_STATIC 1
23139 EOF
23140
23141 cat >> confdefs.h <<\EOF
23142 #define SLAPD_MOD_DYNAMIC 2
23143 EOF
23144
23145
23146 if test "$ol_enable_bdb" != no ; then
23147         BUILD_SLAPD=yes
23148         BUILD_BDB=$ol_enable_bdb
23149         if test "$ol_enable_bdb" = mod ; then
23150                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-bdb"
23151                 MFLAG=SLAPD_MOD_DYNAMIC
23152         else
23153                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-bdb"
23154                 MFLAG=SLAPD_MOD_STATIC
23155         fi
23156         cat >> confdefs.h <<EOF
23157 #define SLAPD_BDB $MFLAG
23158 EOF
23159
23160 fi
23161
23162 if test "$ol_enable_dnssrv" != no ; then
23163         BUILD_SLAPD=yes
23164         BUILD_DNSSRV=$ol_enable_dnssrv
23165         if test "$ol_enable_dnssrv" = mod ; then
23166                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-dnssrv"
23167                 MFLAG=SLAPD_MOD_DYNAMIC
23168         else
23169                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-dnssrv"
23170                 MFLAG=SLAPD_MOD_STATIC
23171         fi
23172         cat >> confdefs.h <<EOF
23173 #define SLAPD_DNSSRV $MFLAG
23174 EOF
23175
23176 fi
23177
23178 if test "$ol_enable_hdb" != no ; then
23179         BUILD_SLAPD=yes
23180         BUILD_HDB=$ol_enable_hdb
23181         if test "$ol_enable_hdb" = mod ; then
23182                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-hdb"
23183                 MFLAG=SLAPD_MOD_DYNAMIC
23184         else
23185                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-hdb"
23186                 MFLAG=SLAPD_MOD_STATIC
23187         fi
23188         cat >> confdefs.h <<EOF
23189 #define SLAPD_HDB $MFLAG
23190 EOF
23191
23192 fi
23193
23194 if test "$ol_enable_ldap" != no ; then
23195         BUILD_SLAPD=yes
23196         BUILD_LDAP=$ol_enable_ldap
23197         if test "$ol_enable_ldap" = mod ; then
23198                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-ldap"
23199                 MFLAG=SLAPD_MOD_DYNAMIC
23200         else
23201                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-ldap"
23202                 MFLAG=SLAPD_MOD_STATIC
23203         fi
23204         cat >> confdefs.h <<EOF
23205 #define SLAPD_LDAP $MFLAG
23206 EOF
23207
23208 fi
23209
23210 if test "$ol_link_ldbm" != no -a $ol_enable_ldbm != no; then
23211         BUILD_SLAPD=yes
23212         BUILD_LDBM=$ol_enable_ldbm
23213         if test "$ol_enable_ldbm" = mod ; then
23214                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-ldbm"
23215                 MFLAG=SLAPD_MOD_DYNAMIC
23216         else
23217                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-ldbm"
23218                 MFLAG=SLAPD_MOD_STATIC
23219         fi
23220         cat >> confdefs.h <<EOF
23221 #define SLAPD_LDBM $MFLAG
23222 EOF
23223
23224 fi
23225
23226 if test "$ol_enable_meta" != no ; then
23227         BUILD_SLAPD=yes
23228         BUILD_META=$ol_enable_meta
23229         BUILD_REWRITE=yes
23230         if test "$ol_enable_meta" = mod ; then
23231                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-meta"
23232                 MFLAG=SLAPD_MOD_DYNAMIC
23233         else
23234                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-meta"
23235                 MFLAG=SLAPD_MOD_STATIC
23236         fi
23237         cat >> confdefs.h <<EOF
23238 #define SLAPD_META $MFLAG
23239 EOF
23240
23241 fi
23242
23243 if test "$ol_enable_monitor" != no ; then
23244         BUILD_SLAPD=yes
23245         BUILD_MONITOR=$ol_enable_monitor
23246         if test "$ol_enable_monitor" = mod ; then
23247                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-monitor"
23248                 MFLAG=SLAPD_MOD_DYNAMIC
23249         else
23250                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-monitor"
23251                 MFLAG=SLAPD_MOD_STATIC
23252         fi
23253         cat >> confdefs.h <<EOF
23254 #define SLAPD_MONITOR $MFLAG
23255 EOF
23256
23257 fi
23258
23259 if test "$ol_enable_null" != no ; then
23260         BUILD_SLAPD=yes
23261         BUILD_NULL=$ol_enable_null
23262         if test "$ol_enable_null" = mod ; then
23263                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-null"
23264                 MFLAG=SLAPD_MOD_DYNAMIC
23265         else
23266                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-null"
23267                 MFLAG=SLAPD_MOD_STATIC
23268         fi
23269         cat >> confdefs.h <<EOF
23270 #define SLAPD_NULL $MFLAG
23271 EOF
23272
23273 fi
23274
23275 if test "$ol_enable_passwd" != no ; then
23276         BUILD_SLAPD=yes
23277         BUILD_PASSWD=$ol_enable_passwd
23278         if test "$ol_enable_passwd" = mod ; then
23279                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-passwd"
23280                 MFLAG=SLAPD_MOD_DYNAMIC
23281         else
23282                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-passwd"
23283                 MFLAG=SLAPD_MOD_STATIC
23284         fi
23285         cat >> confdefs.h <<EOF
23286 #define SLAPD_PASSWD $MFLAG
23287 EOF
23288
23289 fi
23290
23291 if test "$ol_link_perl" != no ; then
23292         BUILD_SLAPD=yes
23293         BUILD_PERL=$ol_enable_perl
23294         if test "$ol_enable_perl" = mod ; then
23295                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-perl"
23296                 MFLAG=SLAPD_MOD_DYNAMIC
23297         else
23298                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-perl"
23299                 MFLAG=SLAPD_MOD_STATIC
23300         fi
23301         cat >> confdefs.h <<EOF
23302 #define SLAPD_PERL $MFLAG
23303 EOF
23304
23305 fi
23306
23307 if test "$ol_enable_shell" != no ; then
23308         if test "$ol_link_thread" != no ; then
23309                 echo "configure: warning: Use of --without-threads is recommended with back-shell" 1>&2
23310         fi
23311         BUILD_SLAPD=yes
23312         BUILD_SHELL=$ol_enable_shell
23313         if test "$ol_enable_shell" = mod ; then
23314                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-shell"
23315                 MFLAG=SLAPD_MOD_DYNAMIC
23316         else
23317                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-shell"
23318                 MFLAG=SLAPD_MOD_STATIC
23319         fi
23320         cat >> confdefs.h <<EOF
23321 #define SLAPD_SHELL $MFLAG
23322 EOF
23323
23324 fi
23325
23326 if test "$ol_link_sql" != no ; then
23327         BUILD_SLAPD=yes
23328         BUILD_SQL=$ol_enable_sql
23329         if test "$ol_enable_sql" = mod; then
23330                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-sql"
23331                 MFLAG=SLAPD_MOD_DYNAMIC
23332         else
23333                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-sql"
23334                 MFLAG=SLAPD_MOD_STATIC
23335         fi
23336         cat >> confdefs.h <<EOF
23337 #define SLAPD_SQL $MFLAG
23338 EOF
23339
23340 fi
23341
23342 if test "$ol_enable_dyngroup" != no ; then
23343         BUILD_DYNGROUP=$ol_enable_dyngroup
23344         if test "$ol_enable_dyngroup" = mod ; then
23345                 MFLAG=SLAPD_MOD_DYNAMIC
23346                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS dyngroup.la"
23347         else
23348                 MFLAG=SLAPD_MOD_STATIC
23349         fi
23350         cat >> confdefs.h <<EOF
23351 #define SLAPD_OVER_DYNGROUP $MFLAG
23352 EOF
23353
23354 fi
23355
23356 if test "$ol_enable_proxycache" != no ; then
23357         BUILD_PROXYCACHE=$ol_enable_proxycache
23358         if test "$ol_enable_proxycache" = mod ; then
23359                 MFLAG=SLAPD_MOD_DYNAMIC
23360                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS pcache.la"
23361         else
23362                 MFLAG=SLAPD_MOD_STATIC
23363         fi
23364         cat >> confdefs.h <<EOF
23365 #define SLAPD_OVER_PROXYCACHE $MFLAG
23366 EOF
23367
23368 fi
23369
23370 if test "$ol_enable_slurpd" != no -a "$ol_link_threads" != no -a \
23371         $BUILD_SLAPD = yes ; then
23372         BUILD_SLURPD=yes
23373 fi
23374
23375 if test "$ol_enable_rewrite" != no ; then
23376         cat >> confdefs.h <<\EOF
23377 #define ENABLE_REWRITE 1
23378 EOF
23379
23380         BUILD_REWRITE=yes
23381 fi
23382
23383 if test "$ol_enable_slapi" != no ; then
23384         cat >> confdefs.h <<\EOF
23385 #define ENABLE_SLAPI 1
23386 EOF
23387
23388         BUILD_SLAPI=yes
23389         SLAPD_SLAPI_DEPEND=libslapi.a
23390 fi
23391
23392
23393
23394 if test "$ac_cv_mingw32" = yes ; then
23395         PLAT=NT
23396         SLAPD_MODULES_LDFLAGS=
23397 else
23398         PLAT=UNIX
23399 fi
23400
23401 if test -z "$SLAPD_STATIC_BACKENDS"; then
23402         SLAPD_NO_STATIC='#'
23403 else
23404         SLAPD_NO_STATIC=
23405 fi
23406
23407
23408
23409
23410
23411
23412
23413   
23414   
23415   
23416   
23417   
23418   
23419   
23420   
23421   
23422   
23423   
23424   
23425   
23426   
23427   
23428   
23429
23430
23431
23432
23433
23434
23435
23436
23437
23438
23439
23440
23441
23442
23443
23444
23445
23446
23447
23448
23449
23450
23451
23452
23453
23454
23455
23456
23457
23458
23459
23460
23461
23462
23463
23464
23465
23466
23467 # Check whether --with-xxinstall or --without-xxinstall was given.
23468 if test "${with_xxinstall+set}" = set; then
23469   withval="$with_xxinstall"
23470   :
23471 fi
23472
23473
23474
23475 trap '' 1 2 15
23476
23477 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
23478
23479 test "x$prefix" = xNONE && prefix=$ac_default_prefix
23480 # Let make expand exec_prefix.
23481 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
23482
23483 # Any assignment to VPATH causes Sun make to only execute
23484 # the first set of double-colon rules, so remove it if not needed.
23485 # If there is a colon in the path, we need to keep it.
23486 if test "x$srcdir" = x.; then
23487   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
23488 fi
23489
23490 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
23491
23492 DEFS=-DHAVE_CONFIG_H
23493
23494 # Without the "./", some shells look in PATH for config.status.
23495 : ${CONFIG_STATUS=./config.status}
23496
23497 echo creating $CONFIG_STATUS
23498 rm -f $CONFIG_STATUS
23499 cat > $CONFIG_STATUS <<EOF
23500 #! /bin/sh
23501 # Generated automatically by configure.
23502 # Run this file to recreate the current configuration.
23503 # This directory was configured as follows,
23504 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
23505 #
23506 # $0 $ac_configure_args
23507 #
23508 # Compiler output produced by configure, useful for debugging
23509 # configure, is in ./config.log if it exists.
23510
23511 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
23512 for ac_option
23513 do
23514   case "\$ac_option" in
23515   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
23516     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
23517     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
23518   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
23519     echo "$CONFIG_STATUS generated by autoconf version 2.13.1"
23520     exit 0 ;;
23521   -help | --help | --hel | --he | --h)
23522     echo "\$ac_cs_usage"; exit 0 ;;
23523   *) echo "\$ac_cs_usage"; exit 1 ;;
23524   esac
23525 done
23526
23527 ac_given_srcdir=$srcdir
23528 ac_given_INSTALL="$INSTALL"
23529
23530 trap 'rm -fr `echo "\
23531 Makefile:build/top.mk:Makefile.in:build/dir.mk \
23532 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
23533 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
23534 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
23535 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
23536 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
23537 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
23538 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
23539 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
23540 include/Makefile:build/top.mk:include/Makefile.in \
23541 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
23542 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
23543 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
23544 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
23545 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk  \
23546 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
23547 libraries/librewrite/Makefile:build/top.mk:libraries/librewrite/Makefile.in:build/lib.mk:build/lib-static.mk \
23548 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
23549 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
23550 servers/slapd/back-bdb/Makefile:build/top.mk:servers/slapd/back-bdb/Makefile.in:build/mod.mk \
23551 servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
23552 servers/slapd/back-hdb/Makefile:build/top.mk:servers/slapd/back-hdb/Makefile.in:build/mod.mk \
23553 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
23554 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
23555 servers/slapd/back-meta/Makefile:build/top.mk:servers/slapd/back-meta/Makefile.in:build/mod.mk \
23556 servers/slapd/back-monitor/Makefile:build/top.mk:servers/slapd/back-monitor/Makefile.in:build/mod.mk \
23557 servers/slapd/back-null/Makefile:build/top.mk:servers/slapd/back-null/Makefile.in:build/mod.mk \
23558 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
23559 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
23560 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
23561 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
23562 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
23563 servers/slapd/slapi/Makefile:build/top.mk:servers/slapd/slapi/Makefile.in:build/lib.mk:build/lib-shared.mk  \
23564 servers/slapd/overlays/Makefile:build/top.mk:servers/slapd/overlays/Makefile.in:build/lib.mk \
23565 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
23566 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
23567 tests/run \
23568 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
23569  include/portable.h include/ldap_features.h include/lber_types.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
23570 EOF
23571 cat >> $CONFIG_STATUS <<EOF
23572
23573 # Protect against being on the right side of a sed subst in config.status.
23574 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
23575  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
23576 $ac_vpsub
23577 $extrasub
23578 s%@SHELL@%$SHELL%g
23579 s%@CFLAGS@%$CFLAGS%g
23580 s%@CPPFLAGS@%$CPPFLAGS%g
23581 s%@CXXFLAGS@%$CXXFLAGS%g
23582 s%@FFLAGS@%$FFLAGS%g
23583 s%@DEFS@%$DEFS%g
23584 s%@LDFLAGS@%$LDFLAGS%g
23585 s%@LIBS@%$LIBS%g
23586 s%@exec_prefix@%$exec_prefix%g
23587 s%@prefix@%$prefix%g
23588 s%@program_transform_name@%$program_transform_name%g
23589 s%@bindir@%$bindir%g
23590 s%@sbindir@%$sbindir%g
23591 s%@libexecdir@%$libexecdir%g
23592 s%@datadir@%$datadir%g
23593 s%@sysconfdir@%$sysconfdir%g
23594 s%@sharedstatedir@%$sharedstatedir%g
23595 s%@localstatedir@%$localstatedir%g
23596 s%@libdir@%$libdir%g
23597 s%@includedir@%$includedir%g
23598 s%@oldincludedir@%$oldincludedir%g
23599 s%@infodir@%$infodir%g
23600 s%@mandir@%$mandir%g
23601 s%@host@%$host%g
23602 s%@host_alias@%$host_alias%g
23603 s%@host_cpu@%$host_cpu%g
23604 s%@host_vendor@%$host_vendor%g
23605 s%@host_os@%$host_os%g
23606 s%@target@%$target%g
23607 s%@target_alias@%$target_alias%g
23608 s%@target_cpu@%$target_cpu%g
23609 s%@target_vendor@%$target_vendor%g
23610 s%@target_os@%$target_os%g
23611 s%@build@%$build%g
23612 s%@build_alias@%$build_alias%g
23613 s%@build_cpu@%$build_cpu%g
23614 s%@build_vendor@%$build_vendor%g
23615 s%@build_os@%$build_os%g
23616 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
23617 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
23618 s%@INSTALL_DATA@%$INSTALL_DATA%g
23619 s%@PACKAGE@%$PACKAGE%g
23620 s%@VERSION@%$VERSION%g
23621 s%@ACLOCAL@%$ACLOCAL%g
23622 s%@AUTOCONF@%$AUTOCONF%g
23623 s%@AUTOMAKE@%$AUTOMAKE%g
23624 s%@AUTOHEADER@%$AUTOHEADER%g
23625 s%@MAKEINFO@%$MAKEINFO%g
23626 s%@install_sh@%$install_sh%g
23627 s%@AMTAR@%$AMTAR%g
23628 s%@AWK@%$AWK%g
23629 s%@AMTARFLAGS@%$AMTARFLAGS%g
23630 s%@SET_MAKE@%$SET_MAKE%g
23631 s%@OPENLDAP_LIBRELEASE@%$OPENLDAP_LIBRELEASE%g
23632 s%@OPENLDAP_LIBVERSION@%$OPENLDAP_LIBVERSION%g
23633 s%@OPENLDAP_RELEASE_DATE@%$OPENLDAP_RELEASE_DATE%g
23634 s%@top_builddir@%$top_builddir%g
23635 s%@ldap_subdir@%$ldap_subdir%g
23636 s%@CC@%$CC%g
23637 s%@AR@%$AR%g
23638 s%@LN_S@%$LN_S%g
23639 s%@OBJEXT@%$OBJEXT%g
23640 s%@EXEEXT@%$EXEEXT%g
23641 s%@ECHO@%$ECHO%g
23642 s%@RANLIB@%$RANLIB%g
23643 s%@STRIP@%$STRIP%g
23644 s%@DLLTOOL@%$DLLTOOL%g
23645 s%@AS@%$AS%g
23646 s%@OBJDUMP@%$OBJDUMP%g
23647 s%@CPP@%$CPP%g
23648 s%@LIBTOOL@%$LIBTOOL%g
23649 s%@LN_H@%$LN_H%g
23650 s%@PERLBIN@%$PERLBIN%g
23651 s%@OL_MKDEP@%$OL_MKDEP%g
23652 s%@OL_MKDEP_FLAGS@%$OL_MKDEP_FLAGS%g
23653 s%@LTSTATIC@%$LTSTATIC%g
23654 s%@LIBOBJS@%$LIBOBJS%g
23655 s%@LIBSRCS@%$LIBSRCS%g
23656 s%@PLAT@%$PLAT%g
23657 s%@WITH_TLS@%$WITH_TLS%g
23658 s%@BUILD_LIBS_DYNAMIC@%$BUILD_LIBS_DYNAMIC%g
23659 s%@BUILD_SLAPD@%$BUILD_SLAPD%g
23660 s%@BUILD_SLAPI@%$BUILD_SLAPI%g
23661 s%@SLAPD_SLAPI_DEPEND@%$SLAPD_SLAPI_DEPEND%g
23662 s%@BUILD_BDB@%$BUILD_BDB%g
23663 s%@BUILD_DNSSRV@%$BUILD_DNSSRV%g
23664 s%@BUILD_HDB@%$BUILD_HDB%g
23665 s%@BUILD_LDAP@%$BUILD_LDAP%g
23666 s%@BUILD_LDBM@%$BUILD_LDBM%g
23667 s%@BUILD_META@%$BUILD_META%g
23668 s%@BUILD_MONITOR@%$BUILD_MONITOR%g
23669 s%@BUILD_NULL@%$BUILD_NULL%g
23670 s%@BUILD_PASSWD@%$BUILD_PASSWD%g
23671 s%@BUILD_PERL@%$BUILD_PERL%g
23672 s%@BUILD_SHELL@%$BUILD_SHELL%g
23673 s%@BUILD_SQL@%$BUILD_SQL%g
23674 s%@BUILD_DYNGROUP@%$BUILD_DYNGROUP%g
23675 s%@BUILD_PROXYCACHE@%$BUILD_PROXYCACHE%g
23676 s%@BUILD_SLURPD@%$BUILD_SLURPD%g
23677 s%@LDAP_LIBS@%$LDAP_LIBS%g
23678 s%@SLAPD_LIBS@%$SLAPD_LIBS%g
23679 s%@SLURPD_LIBS@%$SLURPD_LIBS%g
23680 s%@LDBM_LIBS@%$LDBM_LIBS%g
23681 s%@LTHREAD_LIBS@%$LTHREAD_LIBS%g
23682 s%@LUTIL_LIBS@%$LUTIL_LIBS%g
23683 s%@WRAP_LIBS@%$WRAP_LIBS%g
23684 s%@SLAPD_MODULES_CPPFLAGS@%$SLAPD_MODULES_CPPFLAGS%g
23685 s%@SLAPD_MODULES_LDFLAGS@%$SLAPD_MODULES_LDFLAGS%g
23686 s%@SLAPD_NO_STATIC@%$SLAPD_NO_STATIC%g
23687 s%@SLAPD_STATIC_BACKENDS@%$SLAPD_STATIC_BACKENDS%g
23688 s%@SLAPD_DYNAMIC_BACKENDS@%$SLAPD_DYNAMIC_BACKENDS%g
23689 s%@SLAPD_DYNAMIC_OVERLAYS@%$SLAPD_DYNAMIC_OVERLAYS%g
23690 s%@PERL_CPPFLAGS@%$PERL_CPPFLAGS%g
23691 s%@SLAPD_PERL_LDFLAGS@%$SLAPD_PERL_LDFLAGS%g
23692 s%@MOD_PERL_LDFLAGS@%$MOD_PERL_LDFLAGS%g
23693 s%@KRB4_LIBS@%$KRB4_LIBS%g
23694 s%@KRB5_LIBS@%$KRB5_LIBS%g
23695 s%@SASL_LIBS@%$SASL_LIBS%g
23696 s%@TLS_LIBS@%$TLS_LIBS%g
23697 s%@MODULES_LIBS@%$MODULES_LIBS%g
23698 s%@SLAPI_LIBS@%$SLAPI_LIBS%g
23699 s%@LIBSLAPI@%$LIBSLAPI%g
23700 s%@LIBSLAPITOOLS@%$LIBSLAPITOOLS%g
23701 s%@AUTH_LIBS@%$AUTH_LIBS%g
23702 s%@SLAPD_SLP_LIBS@%$SLAPD_SLP_LIBS%g
23703 s%@SLAPD_SQL_LDFLAGS@%$SLAPD_SQL_LDFLAGS%g
23704 s%@SLAPD_SQL_LIBS@%$SLAPD_SQL_LIBS%g
23705 s%@SLAPD_SQL_INCLUDES@%$SLAPD_SQL_INCLUDES%g
23706
23707 CEOF
23708 EOF
23709
23710 cat >> $CONFIG_STATUS <<\EOF
23711
23712 # Split the substitutions into bite-sized pieces for seds with
23713 # small command number limits, like on Digital OSF/1 and HP-UX.
23714 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
23715 ac_file=1 # Number of current file.
23716 ac_beg=1 # First line for current file.
23717 ac_end=$ac_max_sed_cmds # Line after last line for current file.
23718 ac_more_lines=:
23719 ac_sed_cmds=""
23720 while $ac_more_lines; do
23721   if test $ac_beg -gt 1; then
23722     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
23723   else
23724     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
23725   fi
23726   if test ! -s conftest.s$ac_file; then
23727     ac_more_lines=false
23728     rm -f conftest.s$ac_file
23729   else
23730     if test -z "$ac_sed_cmds"; then
23731       ac_sed_cmds="sed -f conftest.s$ac_file"
23732     else
23733       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
23734     fi
23735     ac_file=`expr $ac_file + 1`
23736     ac_beg=$ac_end
23737     ac_end=`expr $ac_end + $ac_max_sed_cmds`
23738   fi
23739 done
23740 if test -z "$ac_sed_cmds"; then
23741   ac_sed_cmds=cat
23742 fi
23743 EOF
23744
23745 cat >> $CONFIG_STATUS <<EOF
23746
23747 CONFIG_FILES=\${CONFIG_FILES-"\
23748 Makefile:build/top.mk:Makefile.in:build/dir.mk \
23749 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
23750 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
23751 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
23752 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
23753 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
23754 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
23755 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
23756 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
23757 include/Makefile:build/top.mk:include/Makefile.in \
23758 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
23759 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
23760 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
23761 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
23762 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk  \
23763 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
23764 libraries/librewrite/Makefile:build/top.mk:libraries/librewrite/Makefile.in:build/lib.mk:build/lib-static.mk \
23765 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
23766 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
23767 servers/slapd/back-bdb/Makefile:build/top.mk:servers/slapd/back-bdb/Makefile.in:build/mod.mk \
23768 servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
23769 servers/slapd/back-hdb/Makefile:build/top.mk:servers/slapd/back-hdb/Makefile.in:build/mod.mk \
23770 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
23771 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
23772 servers/slapd/back-meta/Makefile:build/top.mk:servers/slapd/back-meta/Makefile.in:build/mod.mk \
23773 servers/slapd/back-monitor/Makefile:build/top.mk:servers/slapd/back-monitor/Makefile.in:build/mod.mk \
23774 servers/slapd/back-null/Makefile:build/top.mk:servers/slapd/back-null/Makefile.in:build/mod.mk \
23775 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
23776 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
23777 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
23778 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
23779 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
23780 servers/slapd/slapi/Makefile:build/top.mk:servers/slapd/slapi/Makefile.in:build/lib.mk:build/lib-shared.mk  \
23781 servers/slapd/overlays/Makefile:build/top.mk:servers/slapd/overlays/Makefile.in:build/lib.mk \
23782 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
23783 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
23784 tests/run \
23785 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
23786 "}
23787 EOF
23788 cat >> $CONFIG_STATUS <<\EOF
23789 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
23790   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
23791   case "$ac_file" in
23792   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
23793        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
23794   *) ac_file_in="${ac_file}.in" ;;
23795   esac
23796
23797   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
23798
23799   # Remove last slash and all that follows it.  Not all systems have dirname.
23800   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
23801   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
23802     # The file is in a subdirectory.
23803     test ! -d "$ac_dir" && mkdir "$ac_dir"
23804     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
23805     # A "../" for each directory in $ac_dir_suffix.
23806     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
23807   else
23808     ac_dir_suffix= ac_dots=
23809   fi
23810
23811   case "$ac_given_srcdir" in
23812   .)  srcdir=.
23813       if test -z "$ac_dots"; then top_srcdir=.
23814       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
23815   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
23816   *) # Relative path.
23817     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
23818     top_srcdir="$ac_dots$ac_given_srcdir" ;;
23819   esac
23820
23821   case "$ac_given_INSTALL" in
23822   [/$]*) INSTALL="$ac_given_INSTALL" ;;
23823   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
23824   esac
23825
23826   echo creating "$ac_file"
23827   rm -f "$ac_file"
23828   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
23829   case "$ac_file" in
23830   *[Mm]akefile*) ac_comsub="1i\\
23831 # $configure_input" ;;
23832   *) ac_comsub= ;;
23833   esac
23834
23835   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
23836   sed -e "$ac_comsub
23837 s%@configure_input@%$configure_input%g
23838 s%@srcdir@%$srcdir%g
23839 s%@top_srcdir@%$top_srcdir%g
23840 s%@INSTALL@%$INSTALL%g
23841 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
23842 fi; done
23843 rm -f conftest.s*
23844
23845 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
23846 # NAME is the cpp macro being defined and VALUE is the value it is being given.
23847 #
23848 # ac_d sets the value in "#define NAME VALUE" lines.
23849 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
23850 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
23851 ac_dC='\3'
23852 ac_dD='%g'
23853 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
23854 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
23855 ac_uB='\([      ]\)%\1#\2define\3'
23856 ac_uC=' '
23857 ac_uD='\4%g'
23858 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
23859 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
23860 ac_eB='$%\1#\2define\3'
23861 ac_eC=' '
23862 ac_eD='%g'
23863
23864 if test "${CONFIG_HEADERS+set}" != set; then
23865 EOF
23866 cat >> $CONFIG_STATUS <<EOF
23867   CONFIG_HEADERS="include/portable.h include/ldap_features.h include/lber_types.h"
23868 EOF
23869 cat >> $CONFIG_STATUS <<\EOF
23870 fi
23871 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
23872   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
23873   case "$ac_file" in
23874   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
23875        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
23876   *) ac_file_in="${ac_file}.in" ;;
23877   esac
23878
23879   echo creating $ac_file
23880
23881   rm -f conftest.frag conftest.in conftest.out
23882   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
23883   cat $ac_file_inputs > conftest.in
23884
23885 EOF
23886
23887 # Transform confdefs.h into a sed script conftest.vals that substitutes
23888 # the proper values into config.h.in to produce config.h.  And first:
23889 # Protect against being on the right side of a sed subst in config.status.
23890 # Protect against being in an unquoted here document in config.status.
23891 rm -f conftest.vals
23892 cat > conftest.hdr <<\EOF
23893 s/[\\&%]/\\&/g
23894 s%[\\$`]%\\&%g
23895 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
23896 s%ac_d%ac_u%gp
23897 s%ac_u%ac_e%gp
23898 EOF
23899 sed -n -f conftest.hdr confdefs.h > conftest.vals
23900 rm -f conftest.hdr
23901
23902 # This sed command replaces #undef with comments.  This is necessary, for
23903 # example, in the case of _POSIX_SOURCE, which is predefined and required
23904 # on some systems where configure will not decide to define it.
23905 cat >> conftest.vals <<\EOF
23906 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
23907 EOF
23908
23909 # Break up conftest.vals because some shells have a limit on
23910 # the size of here documents, and old seds have small limits too.
23911
23912 rm -f conftest.tail
23913 while :
23914 do
23915   ac_lines=`grep -c . conftest.vals`
23916   # grep -c gives empty output for an empty file on some AIX systems.
23917   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
23918   # Write a limited-size here document to conftest.frag.
23919   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
23920   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
23921   echo 'CEOF
23922   sed -f conftest.frag conftest.in > conftest.out
23923   rm -f conftest.in
23924   mv conftest.out conftest.in
23925 ' >> $CONFIG_STATUS
23926   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
23927   rm -f conftest.vals
23928   mv conftest.tail conftest.vals
23929 done
23930 rm -f conftest.vals
23931
23932 cat >> $CONFIG_STATUS <<\EOF
23933   rm -f conftest.frag conftest.h
23934   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
23935   cat conftest.in >> conftest.h
23936   rm -f conftest.in
23937   if cmp -s $ac_file conftest.h 2>/dev/null; then
23938     echo "$ac_file is unchanged"
23939     rm -f conftest.h
23940   else
23941     # Remove last slash and all that follows it.  Not all systems have dirname.
23942       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
23943       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
23944       # The file is in a subdirectory.
23945       test ! -d "$ac_dir" && mkdir "$ac_dir"
23946     fi
23947     rm -f $ac_file
23948     mv conftest.h $ac_file
23949   fi
23950 fi; done
23951
23952 EOF
23953 cat >> $CONFIG_STATUS <<EOF
23954
23955 EOF
23956 cat >> $CONFIG_STATUS <<\EOF
23957
23958 chmod +x tests/run
23959 date > stamp-h
23960 echo Please run \"make depend\" to build dependencies
23961
23962 exit 0
23963 EOF
23964 chmod +x $CONFIG_STATUS
23965 rm -fr confdefs* $ac_clean_files
23966 test "$no_create" = yes || $SHELL $CONFIG_STATUS || exit 1
23967