]> git.sur5r.net Git - openldap/blob - configure
Notice/Acknowledge updates
[openldap] / configure
1 #! /bin/sh
2 # $OpenLDAP$
3 # from OpenLDAP: pkg/ldap/configure.in,v 1.493 2003/11/25 22:20:44 kurt Exp  
4
5 # Copyright 1998-2003 The OpenLDAP Foundation.
6 # All rights reserved.
7 #
8 # Redistribution and use in source and binary forms, with or without
9 # modification, are permitted only as authorized by the OpenLDAP
10 # Public License.
11 #
12 # A copy of this license is available in the file LICENSE in the
13 # top-level directory of the distribution or, alternatively, at
14 # <http://www.OpenLDAP.org/license.html>.
15
16 echo "Copyright 1998-2003 The OpenLDAP Foundation. All rights reserved."
17 echo "  Restrictions apply, see COPYRIGHT and LICENSE files."
18
19 # Guess values for system-dependent variables and create Makefiles.
20 # Generated automatically using autoconf version 2.13.1 
21 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
22 #
23 # This configure script is free software; the Free Software Foundation
24 # gives unlimited permission to copy, distribute and modify it.
25
26 # Defaults:
27 ac_help=
28 ac_default_prefix=/usr/local
29 # Any additions from configure.in:
30 ac_default_prefix=/usr/local
31 ac_help="$ac_help
32   --with-subdir=DIR       change default subdirectory used for installs"
33 ac_help="$ac_help
34   --enable-debug          enable debugging [yes]"
35 ac_help="$ac_help
36   --enable-dynamic        enable linking built binaries with dynamic libs [no]"
37 ac_help="$ac_help
38   --enable-syslog         enable syslog support [auto]"
39 ac_help="$ac_help
40   --enable-proctitle      enable proctitle support [yes]"
41 ac_help="$ac_help
42   --enable-ipv6           enable IPv6 support [auto]"
43 ac_help="$ac_help
44   --enable-local          enable AF_LOCAL (AF_UNIX) socket support [auto]"
45 ac_help="$ac_help
46   --enable-x-compile      enable cross compiling [no]"
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 back-meta [no]"
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 [yes]"
86 ac_help="$ac_help
87     --with-bdb-module     module type static|dynamic [static]"
88 ac_help="$ac_help
89     --enable-dnssrv       enable dnssrv backend [no]"
90 ac_help="$ac_help
91     --with-dnssrv-module  module type static|dynamic [static]"
92 ac_help="$ac_help
93     --enable-hdb          enable Hierarchical DB backend [no]"
94 ac_help="$ac_help
95     --with-hdb-module     module type static|dynamic [static]"
96 ac_help="$ac_help
97     --enable-ldap         enable ldap backend [no]"
98 ac_help="$ac_help
99     --with-ldap-module    module type static|dynamic [static]"
100 ac_help="$ac_help
101     --enable-ldbm         enable ldbm backend [no]"
102 ac_help="$ac_help
103     --with-ldbm-api       with LDBM API auto|berkeley|bcompat|mdbm|gdbm [auto]"
104 ac_help="$ac_help
105     --with-ldbm-module    module type static|dynamic [static]"
106 ac_help="$ac_help
107     --with-ldbm-type      use LDBM type auto|btree|hash [auto]"
108 ac_help="$ac_help
109     --enable-meta         enable metadirectory backend [no]"
110 ac_help="$ac_help
111     --with-meta-module    module type static|dynamic [static]"
112 ac_help="$ac_help
113     --enable-monitor      enable monitor backend [yes]"
114 ac_help="$ac_help
115     --with-monitor-module module type static|dynamic [static]"
116 ac_help="$ac_help
117     --enable-null         enable null backend [no]"
118 ac_help="$ac_help
119     --with-null-module    module type static|dynamic [static]"
120 ac_help="$ac_help
121     --enable-passwd       enable passwd backend [no]"
122 ac_help="$ac_help
123     --with-passwd-module  module type static|dynamic [static]"
124 ac_help="$ac_help
125     --enable-perl         enable perl backend [no]"
126 ac_help="$ac_help
127     --with-perl-module    module type static|dynamic [static]"
128 ac_help="$ac_help
129     --enable-shell        enable shell backend [no]"
130 ac_help="$ac_help
131     --with-shell-module   module type static|dynamic [static]"
132 ac_help="$ac_help
133     --enable-sql          enable sql backend [no]"
134 ac_help="$ac_help
135     --with-sql-module     module type static|dynamic [static]"
136 ac_help="$ac_help
137     --enable-tcl          enable tcl backend [no]"
138 ac_help="$ac_help
139     --with-tcl-module     module type static|dynamic [static]"
140 ac_help="$ac_help
141
142 SLURPD (Replication Daemon) Options:"
143 ac_help="$ac_help
144   --enable-slurpd         enable building slurpd [auto]"
145 ac_help="$ac_help
146
147 Library Generation & Linking Options"
148 ac_help="$ac_help
149   --enable-static[=PKGS]  build static libraries [default=yes]"
150 ac_help="$ac_help
151   --enable-shared[=PKGS]  build shared libraries [default=yes]"
152 ac_help="$ac_help
153   --enable-fast-install[=PKGS]  optimize for fast installation [default=yes]"
154 ac_help="$ac_help
155   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]"
156
157 # Find the correct PATH separator.  Usually this is `:', but
158 # DJGPP uses `;' like DOS.
159 if test "X${PATH_SEPARATOR+set}" != Xset; then
160   UNAME=${UNAME-`uname 2>/dev/null`}
161   case X$UNAME in
162     *-DOS) lt_cv_sys_path_separator=';' ;;
163     *)     lt_cv_sys_path_separator=':' ;;
164   esac
165   PATH_SEPARATOR=$lt_cv_sys_path_separator
166 fi
167
168
169 # Check that we are running under the correct shell.
170 SHELL=${CONFIG_SHELL-/bin/sh}
171
172 case X$ECHO in
173 X*--fallback-echo)
174   # Remove one level of quotation (which was required for Make).
175   ECHO=`echo "$ECHO" | sed 's,\\\\\$\\$0,'$0','`
176   ;;
177 esac
178
179 echo=${ECHO-echo}
180 if test "X$1" = X--no-reexec; then
181   # Discard the --no-reexec flag, and continue.
182   shift
183 elif test "X$1" = X--fallback-echo; then
184   # Avoid inline document here, it may be left over
185   :
186 elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then
187   # Yippee, $echo works!
188   :
189 else
190   # Restart under the correct shell.
191   exec $SHELL "$0" --no-reexec ${1+"$@"}
192 fi
193
194 if test "X$1" = X--fallback-echo; then
195   # used as fallback echo
196   shift
197   cat <<EOF
198
199 EOF
200   exit 0
201 fi
202
203 # The HP-UX ksh and POSIX shell print the target directory to stdout
204 # if CDPATH is set.
205 if test "X${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
206
207 if test -z "$ECHO"; then
208 if test "X${echo_test_string+set}" != Xset; then
209 # find a string as large as possible, as long as the shell can cope with it
210   for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do
211     # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
212     if (echo_test_string="`eval $cmd`") 2>/dev/null &&
213        echo_test_string="`eval $cmd`" &&
214        (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
215     then
216       break
217     fi
218   done
219 fi
220
221 if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
222    echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
223    test "X$echo_testing_string" = "X$echo_test_string"; then
224   :
225 else
226   # The Solaris, AIX, and Digital Unix default echo programs unquote
227   # backslashes.  This makes it impossible to quote backslashes using
228   #   echo "$something" | sed 's/\\/\\\\/g'
229   #
230   # So, first we look for a working echo in the user's PATH.
231
232   IFS="${IFS=   }"; save_ifs="$IFS"; IFS=$PATH_SEPARATOR
233   for dir in $PATH /usr/ucb; do
234     if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
235        test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
236        echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
237        test "X$echo_testing_string" = "X$echo_test_string"; then
238       echo="$dir/echo"
239       break
240     fi
241   done
242   IFS="$save_ifs"
243
244   if test "X$echo" = Xecho; then
245     # We didn't find a better echo, so look for alternatives.
246     if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
247        echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
248        test "X$echo_testing_string" = "X$echo_test_string"; then
249       # This shell has a builtin print -r that does the trick.
250       echo='print -r'
251     elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
252          test "X$CONFIG_SHELL" != X/bin/ksh; then
253       # If we have ksh, try running configure again with it.
254       ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
255       export ORIGINAL_CONFIG_SHELL
256       CONFIG_SHELL=/bin/ksh
257       export CONFIG_SHELL
258       exec $CONFIG_SHELL "$0" --no-reexec ${1+"$@"}
259     else
260       # Try using printf.
261       echo='printf %s\n'
262       if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
263          echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
264          test "X$echo_testing_string" = "X$echo_test_string"; then
265         # Cool, printf works
266         :
267       elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` &&
268            test "X$echo_testing_string" = 'X\t' &&
269            echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
270            test "X$echo_testing_string" = "X$echo_test_string"; then
271         CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
272         export CONFIG_SHELL
273         SHELL="$CONFIG_SHELL"
274         export SHELL
275         echo="$CONFIG_SHELL $0 --fallback-echo"
276       elif echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` &&
277            test "X$echo_testing_string" = 'X\t' &&
278            echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
279            test "X$echo_testing_string" = "X$echo_test_string"; then
280         echo="$CONFIG_SHELL $0 --fallback-echo"
281       else
282         # maybe with a smaller string...
283         prev=:
284
285         for cmd in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed 50q "$0"'; do
286           if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
287           then
288             break
289           fi
290           prev="$cmd"
291         done
292
293         if test "$prev" != 'sed 50q "$0"'; then
294           echo_test_string=`eval $prev`
295           export echo_test_string
296           exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "$0" ${1+"$@"}
297         else
298           # Oops.  We lost completely, so just stick with echo.
299           echo=echo
300         fi
301       fi
302     fi
303   fi
304 fi
305 fi
306
307 # Copy echo and quote the copy suitably for passing to libtool from
308 # the Makefile, instead of quoting the original, which is used later.
309 ECHO=$echo
310 if test "X$ECHO" = "X$CONFIG_SHELL $0 --fallback-echo"; then
311    ECHO="$CONFIG_SHELL \\\$\$0 --fallback-echo"
312 fi
313
314
315 ac_help="$ac_help
316   --disable-libtool-lock  avoid locking (might break parallel builds)"
317 ac_help="$ac_help
318   --with-pic              try to use only PIC/non-PIC objects [default=use both]"
319 ac_help="$ac_help
320
321 See INSTALL file for further details."
322
323 # Initialize some variables set by options.
324 # The variables have the same names as the options, with
325 # dashes changed to underlines.
326 build=NONE
327 cache_file=./config.cache
328 exec_prefix=NONE
329 host=NONE
330 no_create=
331 nonopt=NONE
332 no_recursion=
333 prefix=NONE
334 program_prefix=NONE
335 program_suffix=NONE
336 program_transform_name=s,x,x,
337 silent=
338 site=
339 srcdir=
340 target=NONE
341 verbose=
342 x_includes=NONE
343 x_libraries=NONE
344 bindir='${exec_prefix}/bin'
345 sbindir='${exec_prefix}/sbin'
346 libexecdir='${exec_prefix}/libexec'
347 datadir='${prefix}/share'
348 sysconfdir='${prefix}/etc'
349 sharedstatedir='${prefix}/com'
350 localstatedir='${prefix}/var'
351 libdir='${exec_prefix}/lib'
352 includedir='${prefix}/include'
353 oldincludedir='/usr/include'
354 infodir='${prefix}/info'
355 mandir='${prefix}/man'
356
357 # Initialize some other variables.
358 subdirs=
359 MFLAGS= MAKEFLAGS=
360 SHELL=${CONFIG_SHELL-/bin/sh}
361 # Maximum number of lines to put in a shell here document.
362 ac_max_here_lines=12
363
364 ac_prev=
365 for ac_option
366 do
367
368   # If the previous option needs an argument, assign it.
369   if test -n "$ac_prev"; then
370     eval "$ac_prev=\$ac_option"
371     ac_prev=
372     continue
373   fi
374
375   case "$ac_option" in
376   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
377   *) ac_optarg= ;;
378   esac
379
380   # Accept the important Cygnus configure options, so we can diagnose typos.
381
382   case "$ac_option" in
383
384   -bindir | --bindir | --bindi | --bind | --bin | --bi)
385     ac_prev=bindir ;;
386   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
387     bindir="$ac_optarg" ;;
388
389   -build | --build | --buil | --bui | --bu)
390     ac_prev=build ;;
391   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
392     build="$ac_optarg" ;;
393
394   -cache-file | --cache-file | --cache-fil | --cache-fi \
395   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
396     ac_prev=cache_file ;;
397   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
398   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
399     cache_file="$ac_optarg" ;;
400
401   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
402     ac_prev=datadir ;;
403   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
404   | --da=*)
405     datadir="$ac_optarg" ;;
406
407   -disable-* | --disable-*)
408     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
409     # Reject names that are not valid shell variable names.
410     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
411       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
412     fi
413     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
414     eval "enable_${ac_feature}=no" ;;
415
416   -enable-* | --enable-*)
417     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
418     # Reject names that are not valid shell variable names.
419     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
420       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
421     fi
422     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
423     case "$ac_option" in
424       *=*) ;;
425       *) ac_optarg=yes ;;
426     esac
427     eval "enable_${ac_feature}='$ac_optarg'" ;;
428
429   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
430   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
431   | --exec | --exe | --ex)
432     ac_prev=exec_prefix ;;
433   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
434   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
435   | --exec=* | --exe=* | --ex=*)
436     exec_prefix="$ac_optarg" ;;
437
438   -gas | --gas | --ga | --g)
439     # Obsolete; use --with-gas.
440     with_gas=yes ;;
441
442   -help | --help | --hel | --he)
443     # Omit some internal or obsolete options to make the list less imposing.
444     # This message is too long to be a string in the A/UX 3.1 sh.
445     cat << EOF
446 Usage: configure [options] [host]
447 Options: [defaults in brackets after descriptions]
448 Configuration:
449   --cache-file=FILE       cache test results in FILE
450   --help                  print this message
451   --no-create             do not create output files
452   --quiet, --silent       do not print \`checking...' messages
453   --version               print the version of autoconf that created configure
454 Directory and file names:
455   --prefix=PREFIX         install architecture-independent files in PREFIX
456                           [$ac_default_prefix]
457   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
458                           [same as prefix]
459   --bindir=DIR            user executables in DIR [EPREFIX/bin]
460   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
461   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
462   --datadir=DIR           read-only architecture-independent data in DIR
463                           [PREFIX/share]
464   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
465   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
466                           [PREFIX/com]
467   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
468   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
469   --includedir=DIR        C header files in DIR [PREFIX/include]
470   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
471   --infodir=DIR           info documentation in DIR [PREFIX/info]
472   --mandir=DIR            man documentation in DIR [PREFIX/man]
473   --srcdir=DIR            find the sources in DIR [configure dir or ..]
474   --program-prefix=PREFIX prepend PREFIX to installed program names
475   --program-suffix=SUFFIX append SUFFIX to installed program names
476   --program-transform-name=PROGRAM
477                           run sed PROGRAM on installed program names
478 EOF
479     cat << EOF
480 Host type:
481   --build=BUILD           configure for building on BUILD [BUILD=HOST]
482   --host=HOST             configure for HOST [guessed]
483   --target=TARGET         configure for TARGET [TARGET=HOST]
484 Features and packages:
485   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
486   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
487   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
488   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
489   --x-includes=DIR        X include files are in DIR
490   --x-libraries=DIR       X library files are in DIR
491 EOF
492     if test -n "$ac_help"; then
493       echo "--enable and --with options recognized:$ac_help"
494     fi
495     exit 0 ;;
496
497   -host | --host | --hos | --ho)
498     ac_prev=host ;;
499   -host=* | --host=* | --hos=* | --ho=*)
500     host="$ac_optarg" ;;
501
502   -includedir | --includedir | --includedi | --included | --include \
503   | --includ | --inclu | --incl | --inc)
504     ac_prev=includedir ;;
505   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
506   | --includ=* | --inclu=* | --incl=* | --inc=*)
507     includedir="$ac_optarg" ;;
508
509   -infodir | --infodir | --infodi | --infod | --info | --inf)
510     ac_prev=infodir ;;
511   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
512     infodir="$ac_optarg" ;;
513
514   -libdir | --libdir | --libdi | --libd)
515     ac_prev=libdir ;;
516   -libdir=* | --libdir=* | --libdi=* | --libd=*)
517     libdir="$ac_optarg" ;;
518
519   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
520   | --libexe | --libex | --libe)
521     ac_prev=libexecdir ;;
522   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
523   | --libexe=* | --libex=* | --libe=*)
524     libexecdir="$ac_optarg" ;;
525
526   -localstatedir | --localstatedir | --localstatedi | --localstated \
527   | --localstate | --localstat | --localsta | --localst \
528   | --locals | --local | --loca | --loc | --lo)
529     ac_prev=localstatedir ;;
530   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
531   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
532   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
533     localstatedir="$ac_optarg" ;;
534
535   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
536     ac_prev=mandir ;;
537   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
538     mandir="$ac_optarg" ;;
539
540   -nfp | --nfp | --nf)
541     # Obsolete; use --without-fp.
542     with_fp=no ;;
543
544   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
545   | --no-cr | --no-c)
546     no_create=yes ;;
547
548   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
549   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
550     no_recursion=yes ;;
551
552   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
553   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
554   | --oldin | --oldi | --old | --ol | --o)
555     ac_prev=oldincludedir ;;
556   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
557   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
558   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
559     oldincludedir="$ac_optarg" ;;
560
561   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
562     ac_prev=prefix ;;
563   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
564     prefix="$ac_optarg" ;;
565
566   -program-prefix | --program-prefix | --program-prefi | --program-pref \
567   | --program-pre | --program-pr | --program-p)
568     ac_prev=program_prefix ;;
569   -program-prefix=* | --program-prefix=* | --program-prefi=* \
570   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
571     program_prefix="$ac_optarg" ;;
572
573   -program-suffix | --program-suffix | --program-suffi | --program-suff \
574   | --program-suf | --program-su | --program-s)
575     ac_prev=program_suffix ;;
576   -program-suffix=* | --program-suffix=* | --program-suffi=* \
577   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
578     program_suffix="$ac_optarg" ;;
579
580   -program-transform-name | --program-transform-name \
581   | --program-transform-nam | --program-transform-na \
582   | --program-transform-n | --program-transform- \
583   | --program-transform | --program-transfor \
584   | --program-transfo | --program-transf \
585   | --program-trans | --program-tran \
586   | --progr-tra | --program-tr | --program-t)
587     ac_prev=program_transform_name ;;
588   -program-transform-name=* | --program-transform-name=* \
589   | --program-transform-nam=* | --program-transform-na=* \
590   | --program-transform-n=* | --program-transform-=* \
591   | --program-transform=* | --program-transfor=* \
592   | --program-transfo=* | --program-transf=* \
593   | --program-trans=* | --program-tran=* \
594   | --progr-tra=* | --program-tr=* | --program-t=*)
595     program_transform_name="$ac_optarg" ;;
596
597   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
598   | -silent | --silent | --silen | --sile | --sil)
599     silent=yes ;;
600
601   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
602     ac_prev=sbindir ;;
603   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
604   | --sbi=* | --sb=*)
605     sbindir="$ac_optarg" ;;
606
607   -sharedstatedir | --sharedstatedir | --sharedstatedi \
608   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
609   | --sharedst | --shareds | --shared | --share | --shar \
610   | --sha | --sh)
611     ac_prev=sharedstatedir ;;
612   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
613   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
614   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
615   | --sha=* | --sh=*)
616     sharedstatedir="$ac_optarg" ;;
617
618   -site | --site | --sit)
619     ac_prev=site ;;
620   -site=* | --site=* | --sit=*)
621     site="$ac_optarg" ;;
622
623   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
624     ac_prev=srcdir ;;
625   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
626     srcdir="$ac_optarg" ;;
627
628   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
629   | --syscon | --sysco | --sysc | --sys | --sy)
630     ac_prev=sysconfdir ;;
631   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
632   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
633     sysconfdir="$ac_optarg" ;;
634
635   -target | --target | --targe | --targ | --tar | --ta | --t)
636     ac_prev=target ;;
637   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
638     target="$ac_optarg" ;;
639
640   -v | -verbose | --verbose | --verbos | --verbo | --verb)
641     verbose=yes ;;
642
643   -version | --version | --versio | --versi | --vers)
644     echo "configure generated by autoconf version 2.13.1"
645     exit 0 ;;
646
647   -with-* | --with-*)
648     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
649     # Reject names that are not valid shell variable names.
650     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
651       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
652     fi
653     ac_package=`echo $ac_package| sed 's/-/_/g'`
654     case "$ac_option" in
655       *=*) ;;
656       *) ac_optarg=yes ;;
657     esac
658     eval "with_${ac_package}='$ac_optarg'" ;;
659
660   -without-* | --without-*)
661     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
662     # Reject names that are not valid shell variable names.
663     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
664       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
665     fi
666     ac_package=`echo $ac_package| sed 's/-/_/g'`
667     eval "with_${ac_package}=no" ;;
668
669   --x)
670     # Obsolete; use --with-x.
671     with_x=yes ;;
672
673   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
674   | --x-incl | --x-inc | --x-in | --x-i)
675     ac_prev=x_includes ;;
676   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
677   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
678     x_includes="$ac_optarg" ;;
679
680   -x-libraries | --x-libraries | --x-librarie | --x-librari \
681   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
682     ac_prev=x_libraries ;;
683   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
684   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
685     x_libraries="$ac_optarg" ;;
686
687   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
688     ;;
689
690   *)
691     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
692       echo "configure: warning: $ac_option: invalid host type" 1>&2
693     fi
694     if test "x$nonopt" != xNONE; then
695       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
696     fi
697     nonopt="$ac_option"
698     ;;
699
700   esac
701 done
702
703 if test -n "$ac_prev"; then
704   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
705 fi
706
707 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
708
709 # File descriptor usage:
710 # 0 standard input
711 # 1 file creation
712 # 2 errors and warnings
713 # 3 some systems may open it to /dev/tty
714 # 4 used on the Kubota Titan
715 # 6 checking for... messages and results
716 # 5 compiler messages saved in config.log
717 if test "$silent" = yes; then
718   exec 6>/dev/null
719 else
720   exec 6>&1
721 fi
722 exec 5>./config.log
723
724 echo "\
725 This file contains any messages produced by compilers while
726 running configure, to aid debugging if configure makes a mistake.
727 " 1>&5
728
729 # Strip out --no-create and --no-recursion so they do not pile up.
730 # Also quote any args containing shell metacharacters.
731 ac_configure_args=
732 for ac_arg
733 do
734   case "$ac_arg" in
735   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
736   | --no-cr | --no-c) ;;
737   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
738   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
739   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
740   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
741   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
742   esac
743 done
744
745 # NLS nuisances.
746 # Only set these to C if already set.  These must not be set unconditionally
747 # because not all systems understand e.g. LANG=C (notably SCO).
748 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
749 # Non-C LC_CTYPE values break the ctype check.
750 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
751 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
752 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
753 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
754
755 # confdefs.h avoids OS command line length limits that DEFS can exceed.
756 rm -rf conftest* confdefs.h
757 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
758 echo > confdefs.h
759
760 # A filename unique to this package, relative to the directory that
761 # configure is in, which we can look for to find out if srcdir is correct.
762 ac_unique_file=build/version.sh
763
764 # Find the source files, if location was not specified.
765 if test -z "$srcdir"; then
766   ac_srcdir_defaulted=yes
767   # Try the directory containing this script, then its parent.
768   ac_prog=$0
769   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
770   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
771   srcdir=$ac_confdir
772   if test ! -r $srcdir/$ac_unique_file; then
773     srcdir=..
774   fi
775 else
776   ac_srcdir_defaulted=no
777 fi
778 if test ! -r $srcdir/$ac_unique_file; then
779   if test "$ac_srcdir_defaulted" = yes; then
780     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
781   else
782     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
783   fi
784 fi
785 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
786
787 # Prefer explicitly selected file to automatically selected ones.
788 if test -z "$CONFIG_SITE"; then
789   if test "x$prefix" != xNONE; then
790     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
791   else
792     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
793   fi
794 fi
795 for ac_site_file in $CONFIG_SITE; do
796   if test -r "$ac_site_file"; then
797     echo "loading site script $ac_site_file"
798     . "$ac_site_file"
799   fi
800 done
801
802
803 ac_ext=c
804 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
805 ac_cpp='$CPP $CPPFLAGS'
806 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
807 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
808 cross_compiling=$ac_cv_prog_cc_cross
809
810 ac_exeext=
811 ac_objext=o
812 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
813   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
814   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
815     ac_n= ac_c='
816 ' ac_t='        '
817   else
818     ac_n=-n ac_c= ac_t=
819   fi
820 else
821   ac_n= ac_c='\c' ac_t=
822 fi
823
824
825 # set unset (borrowed from autoconf 2.49c)
826 if (OL_FOO=OL_FOO; unset OL_FOO) >/dev/null 2>&1; then
827   ol_unset=unset
828 else
829   ol_unset=false
830 fi
831 # unset CDPATH
832 $ol_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
833
834 ac_aux_dir=
835 for ac_dir in build $srcdir/build; do
836   if test -f $ac_dir/install-sh; then
837     ac_aux_dir=$ac_dir
838     ac_install_sh="$ac_aux_dir/install-sh -c"
839     break
840   elif test -f $ac_dir/install.sh; then
841     ac_aux_dir=$ac_dir
842     ac_install_sh="$ac_aux_dir/install.sh -c"
843     break
844   elif test -f $ac_dir/shtool; then
845     ac_aux_dir=$ac_dir
846     ac_install_sh="$ac_aux_dir/shtool install -c"
847     break
848   fi
849 done
850 if test -z "$ac_aux_dir"; then
851   { echo "configure: error: can not find install-sh or install.sh in build $srcdir/build" 1>&2; exit 1; }
852 fi
853 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
854 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
855 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
856
857 eval `$ac_aux_dir/version.sh`
858 if test -z "$OL_STRING"; then
859         { echo "configure: error: could not determine version" 1>&2; exit 1; }
860 fi
861
862 if test -f "$ac_aux_dir/shtool" -a ! -d $ac_aux_dir/shtool; then
863         ac_cv_shtool="$ac_aux_dir/shtool"
864 else
865         { echo "configure: error: no shtool found in $ac_aux_dir" 1>&2; exit 1; }
866 fi
867
868 SHTOOL="$ac_cv_shtool"
869
870 TB="`$SHTOOL echo -e '%B' 2>/dev/null`"
871 TN="`$SHTOOL echo -e '%b' 2>/dev/null`"
872
873 OPENLDAP_CVS=""
874 if test -d $ac_aux_dir/CVS; then
875         OPENLDAP_CVS="(from CVS sources) "
876 fi
877
878 echo "Configuring ${TB}${OL_STRING}${TN} ${OPENLDAP_CVS}..."
879
880
881 echo $ac_n "checking host system type""... $ac_c" 1>&6
882 echo "configure:883: checking host system type" >&5
883 if test "x$ac_cv_host" = "x" || (test "x$host" != "xNONE" && test "x$host" != "x$ac_cv_host_alias"); then
884
885 # Make sure we can run config.sub.
886   if $ac_config_sub sun4 >/dev/null 2>&1; then :
887     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
888   fi
889
890   ac_cv_host_alias=$host
891   case "$ac_cv_host_alias" in
892   NONE)
893     case $nonopt in
894     NONE)
895       if ac_cv_host_alias=`$ac_config_guess`; then :
896       else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
897       fi ;;
898     *) ac_cv_host_alias=$nonopt ;;
899     esac ;;
900   esac
901
902   ac_cv_host=`$ac_config_sub $ac_cv_host_alias`
903   ac_cv_host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
904   ac_cv_host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
905   ac_cv_host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
906 else
907   echo $ac_n "(cached) $ac_c" 1>&6
908 fi
909
910 echo "$ac_t""$ac_cv_host" 1>&6
911
912 host=$ac_cv_host
913 host_alias=$ac_cv_host_alias
914 host_cpu=$ac_cv_host_cpu
915 host_vendor=$ac_cv_host_vendor
916 host_os=$ac_cv_host_os
917
918
919
920
921
922 echo $ac_n "checking target system type""... $ac_c" 1>&6
923 echo "configure:924: checking target system type" >&5
924 if test "x$ac_cv_target" = "x" || (test "x$target" != "xNONE" && test "x$target" != "x$ac_cv_target_alias"); then
925
926 # Make sure we can run config.sub.
927   if $ac_config_sub sun4 >/dev/null 2>&1; then :
928     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
929   fi
930
931   ac_cv_target_alias=$target
932   case "$ac_cv_target_alias" in
933   NONE)
934     case $nonopt in
935     NONE)
936       ac_cv_target_alias=$host_alias ;;
937
938     *) ac_cv_target_alias=$nonopt ;;
939     esac ;;
940   esac
941
942   ac_cv_target=`$ac_config_sub $ac_cv_target_alias`
943   ac_cv_target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
944   ac_cv_target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
945   ac_cv_target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
946 else
947   echo $ac_n "(cached) $ac_c" 1>&6
948 fi
949
950 echo "$ac_t""$ac_cv_target" 1>&6
951
952 target=$ac_cv_target
953 target_alias=$ac_cv_target_alias
954 target_cpu=$ac_cv_target_cpu
955 target_vendor=$ac_cv_target_vendor
956 target_os=$ac_cv_target_os
957
958
959
960
961
962 echo $ac_n "checking build system type""... $ac_c" 1>&6
963 echo "configure:964: checking build system type" >&5
964 if test "x$ac_cv_build" = "x" || (test "x$build" != "xNONE" && test "x$build" != "x$ac_cv_build_alias"); then
965
966 # Make sure we can run config.sub.
967   if $ac_config_sub sun4 >/dev/null 2>&1; then :
968     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
969   fi
970
971   ac_cv_build_alias=$build
972   case "$ac_cv_build_alias" in
973   NONE)
974     case $nonopt in
975     NONE)
976       ac_cv_build_alias=$host_alias ;;
977
978     *) ac_cv_build_alias=$nonopt ;;
979     esac ;;
980   esac
981
982   ac_cv_build=`$ac_config_sub $ac_cv_build_alias`
983   ac_cv_build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
984   ac_cv_build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
985   ac_cv_build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
986 else
987   echo $ac_n "(cached) $ac_c" 1>&6
988 fi
989
990 echo "$ac_t""$ac_cv_build" 1>&6
991
992 build=$ac_cv_build
993 build_alias=$ac_cv_build_alias
994 build_cpu=$ac_cv_build_cpu
995 build_vendor=$ac_cv_build_vendor
996 build_os=$ac_cv_build_os
997
998
999
1000
1001
1002 # Do some error checking and defaulting for the host and target type.
1003 # The inputs are:
1004 #    configure --host=HOST --target=TARGET --build=BUILD NONOPT
1005 #
1006 # The rules are:
1007 # 1. You are not allowed to specify --host, --target, and nonopt at the
1008 #    same time.
1009 # 2. Host defaults to nonopt.
1010 # 3. If nonopt is not specified, then host defaults to the current host,
1011 #    as determined by config.guess.
1012 # 4. Target and build default to nonopt.
1013 # 5. If nonopt is not specified, then target and build default to host.
1014
1015 # The aliases save the names the user supplied, while $host etc.
1016 # will get canonicalized.
1017 case $host---$target---$nonopt in
1018 NONE---*---* | *---NONE---* | *---*---NONE) ;;
1019 *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
1020 esac
1021
1022 test "$host_alias" != "$target_alias" &&
1023   test "$program_prefix$program_suffix$program_transform_name" = \
1024     NONENONEs,x,x, &&
1025   program_prefix=${target_alias}-
1026
1027
1028 # Find a good install program.  We prefer a C program (faster),
1029 # so one script is as good as another.  But avoid the broken or
1030 # incompatible versions:
1031 # SysV /etc/install, /usr/sbin/install
1032 # SunOS /usr/etc/install
1033 # IRIX /sbin/install
1034 # AIX /bin/install
1035 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
1036 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
1037 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
1038 # ./install, which can be erroneously created by make from ./install.sh.
1039 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
1040 echo "configure:1041: checking for a BSD compatible install" >&5
1041 if test -z "$INSTALL"; then
1042 if eval "test \"\${ac_cv_path_install+set}\" = set"; then
1043   echo $ac_n "(cached) $ac_c" 1>&6
1044 else
1045     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
1046   for ac_dir in $PATH; do
1047     # Account for people who put trailing slashes in PATH elements.
1048     case "$ac_dir/" in
1049     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
1050     *)
1051       # OSF1 and SCO ODT 3.0 have their own names for install.
1052       # Don't use installbsd from OSF since it installs stuff as root
1053       # by default.
1054       for ac_prog in ginstall scoinst install; do
1055         if test -f $ac_dir/$ac_prog; then
1056           if test $ac_prog = install &&
1057             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
1058             # AIX install.  It has an incompatible calling convention.
1059             :
1060           elif test $ac_prog = install &&
1061             grep pwplus $ac_dir/$ac_prog >/dev/null 2>&1; then
1062             # program-specific install script used by HP pwplus--don't use.
1063             :
1064           else
1065             ac_cv_path_install="$ac_dir/$ac_prog -c"
1066             break 2
1067           fi
1068         fi
1069       done
1070       ;;
1071     esac
1072   done
1073   IFS="$ac_save_IFS"
1074
1075 fi
1076   if test "${ac_cv_path_install+set}" = set; then
1077     INSTALL="$ac_cv_path_install"
1078   else
1079     # As a last resort, use the slow shell script.  We don't cache a
1080     # path for INSTALL within a source directory, because that will
1081     # break other packages using the cache if that directory is
1082     # removed, or if the path is relative.
1083     INSTALL="$ac_install_sh"
1084   fi
1085 fi
1086 echo "$ac_t""$INSTALL" 1>&6
1087
1088 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
1089 # It thinks the first close brace ends the variable substitution.
1090 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
1091
1092 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
1093
1094 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1095
1096 echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
1097 echo "configure:1098: checking whether build environment is sane" >&5
1098 # Just in case
1099 sleep 1
1100 echo timestamp > conftestfile
1101 # Do `set' in a subshell so we don't clobber the current shell's
1102 # arguments.  Must try -L first in case configure is actually a
1103 # symlink; some systems play weird games with the mod time of symlinks
1104 # (eg FreeBSD returns the mod time of the symlink's containing
1105 # directory).
1106 if (
1107    set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
1108    if test "$*" = "X"; then
1109       # -L didn't work.
1110       set X `ls -t $srcdir/configure conftestfile`
1111    fi
1112    if test "$*" != "X $srcdir/configure conftestfile" \
1113       && test "$*" != "X conftestfile $srcdir/configure"; then
1114
1115       # If neither matched, then we have a broken ls.  This can happen
1116       # if, for instance, CONFIG_SHELL is bash and it inherits a
1117       # broken ls alias from the environment.  This has actually
1118       # happened.  Such a system could not be considered "sane".
1119       { echo "configure: error: ls -t appears to fail.  Make sure there is not a broken
1120 alias in your environment" 1>&2; exit 1; }
1121    fi
1122
1123    test "$2" = conftestfile
1124    )
1125 then
1126    # Ok.
1127    :
1128 else
1129    { echo "configure: error: newly created file is older than distributed files!
1130 Check your system clock" 1>&2; exit 1; }
1131 fi
1132 rm -f conftest*
1133 echo "$ac_t""yes" 1>&6
1134 if test "$program_transform_name" = s,x,x,; then
1135   program_transform_name=
1136 else
1137   # Double any \ or $.  echo might interpret backslashes.
1138   cat <<\EOF_SED > conftestsed
1139 s,\\,\\\\,g; s,\$,$$,g
1140 EOF_SED
1141   program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
1142   rm -f conftestsed
1143 fi
1144 test "$program_prefix" != NONE &&
1145   program_transform_name="s,^,${program_prefix},;$program_transform_name"
1146 # Use a double $ so make ignores it.
1147 test "$program_suffix" != NONE &&
1148   program_transform_name="s,\$\$,${program_suffix},;$program_transform_name"
1149
1150 # sed with no file args requires a program.
1151 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
1152
1153 for ac_prog in mawk gawk nawk awk
1154 do
1155 # Extract the first word of "$ac_prog", so it can be a program name with args.
1156 set dummy $ac_prog; ac_word=$2
1157 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1158 echo "configure:1159: checking for $ac_word" >&5
1159 if eval "test \"\${ac_cv_prog_AWK+set}\" = set"; then
1160   echo $ac_n "(cached) $ac_c" 1>&6
1161 else
1162   if test -n "$AWK"; then
1163   ac_cv_prog_AWK="$AWK" # Let the user override the test.
1164 else
1165   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1166   ac_dummy="$PATH"
1167   for ac_dir in $ac_dummy; do
1168     test -z "$ac_dir" && ac_dir=.
1169     if test -f $ac_dir/$ac_word; then
1170       ac_cv_prog_AWK="$ac_prog"
1171       break
1172     fi
1173   done
1174   IFS="$ac_save_ifs"
1175 fi
1176 fi
1177 AWK="$ac_cv_prog_AWK"
1178 if test -n "$AWK"; then
1179   echo "$ac_t""$AWK" 1>&6
1180 else
1181   echo "$ac_t""no" 1>&6
1182 fi
1183
1184 test -n "$AWK" && break
1185 done
1186
1187 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
1188 echo "configure:1189: checking whether ${MAKE-make} sets \${MAKE}" >&5
1189 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
1190 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
1191   echo $ac_n "(cached) $ac_c" 1>&6
1192 else
1193   cat > conftestmake <<\EOF
1194 all:
1195         @echo 'ac_maketemp="${MAKE}"'
1196 EOF
1197 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
1198 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
1199 if test -n "$ac_maketemp"; then
1200   eval ac_cv_prog_make_${ac_make}_set=yes
1201 else
1202   eval ac_cv_prog_make_${ac_make}_set=no
1203 fi
1204 rm -f conftestmake
1205 fi
1206 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
1207   echo "$ac_t""yes" 1>&6
1208   SET_MAKE=
1209 else
1210   echo "$ac_t""no" 1>&6
1211   SET_MAKE="MAKE=${MAKE-make}"
1212 fi
1213
1214
1215
1216 PACKAGE=$OL_PACKAGE
1217
1218 VERSION=$OL_VERSION
1219
1220 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
1221   { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
1222 fi
1223
1224
1225
1226 missing_dir=`cd $ac_aux_dir && pwd`
1227 echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
1228 echo "configure:1229: checking for working aclocal" >&5
1229 # Run test in a subshell; some versions of sh will print an error if
1230 # an executable is not found, even if stderr is redirected.
1231 # Redirect stdin to placate older versions of autoconf.  Sigh.
1232 if (aclocal --version) < /dev/null > /dev/null 2>&1; then
1233    ACLOCAL=aclocal
1234    echo "$ac_t""found" 1>&6
1235 else
1236    ACLOCAL="$missing_dir/missing aclocal"
1237    echo "$ac_t""missing" 1>&6
1238 fi
1239
1240 echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
1241 echo "configure:1242: checking for working autoconf" >&5
1242 # Run test in a subshell; some versions of sh will print an error if
1243 # an executable is not found, even if stderr is redirected.
1244 # Redirect stdin to placate older versions of autoconf.  Sigh.
1245 if (autoconf --version) < /dev/null > /dev/null 2>&1; then
1246    AUTOCONF=autoconf
1247    echo "$ac_t""found" 1>&6
1248 else
1249    AUTOCONF="$missing_dir/missing autoconf"
1250    echo "$ac_t""missing" 1>&6
1251 fi
1252
1253 echo $ac_n "checking for working automake""... $ac_c" 1>&6
1254 echo "configure:1255: checking for working automake" >&5
1255 # Run test in a subshell; some versions of sh will print an error if
1256 # an executable is not found, even if stderr is redirected.
1257 # Redirect stdin to placate older versions of autoconf.  Sigh.
1258 if (automake --version) < /dev/null > /dev/null 2>&1; then
1259    AUTOMAKE=automake
1260    echo "$ac_t""found" 1>&6
1261 else
1262    AUTOMAKE="$missing_dir/missing automake"
1263    echo "$ac_t""missing" 1>&6
1264 fi
1265
1266 echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
1267 echo "configure:1268: checking for working autoheader" >&5
1268 # Run test in a subshell; some versions of sh will print an error if
1269 # an executable is not found, even if stderr is redirected.
1270 # Redirect stdin to placate older versions of autoconf.  Sigh.
1271 if (autoheader --version) < /dev/null > /dev/null 2>&1; then
1272    AUTOHEADER=autoheader
1273    echo "$ac_t""found" 1>&6
1274 else
1275    AUTOHEADER="$missing_dir/missing autoheader"
1276    echo "$ac_t""missing" 1>&6
1277 fi
1278
1279 echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
1280 echo "configure:1281: checking for working makeinfo" >&5
1281 # Run test in a subshell; some versions of sh will print an error if
1282 # an executable is not found, even if stderr is redirected.
1283 # Redirect stdin to placate older versions of autoconf.  Sigh.
1284 if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
1285    MAKEINFO=makeinfo
1286    echo "$ac_t""found" 1>&6
1287 else
1288    MAKEINFO="$missing_dir/missing makeinfo"
1289    echo "$ac_t""missing" 1>&6
1290 fi
1291
1292 install_sh="$missing_dir/install-sh"
1293 test -f "$install_sh" || install_sh="$missing_dir/install.sh"
1294
1295 for ac_prog in gnutar gtar tar
1296 do
1297 # Extract the first word of "$ac_prog", so it can be a program name with args.
1298 set dummy $ac_prog; ac_word=$2
1299 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1300 echo "configure:1301: checking for $ac_word" >&5
1301 if eval "test \"\${ac_cv_prog_AMTAR+set}\" = set"; then
1302   echo $ac_n "(cached) $ac_c" 1>&6
1303 else
1304   if test -n "$AMTAR"; then
1305   ac_cv_prog_AMTAR="$AMTAR" # Let the user override the test.
1306 else
1307   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1308   ac_dummy="$PATH"
1309   for ac_dir in $ac_dummy; do
1310     test -z "$ac_dir" && ac_dir=.
1311     if test -f $ac_dir/$ac_word; then
1312       ac_cv_prog_AMTAR="$ac_prog"
1313       break
1314     fi
1315   done
1316   IFS="$ac_save_ifs"
1317 fi
1318 fi
1319 AMTAR="$ac_cv_prog_AMTAR"
1320 if test -n "$AMTAR"; then
1321   echo "$ac_t""$AMTAR" 1>&6
1322 else
1323   echo "$ac_t""no" 1>&6
1324 fi
1325
1326 test -n "$AMTAR" && break
1327 done
1328
1329
1330 AMTARFLAGS=
1331 if test -n "$AMTAR"; then
1332   if $SHELL -c "$AMTAR --version" > /dev/null 2>&1; then
1333         AMTARFLAGS=o
1334   fi
1335 fi
1336
1337 cat >> confdefs.h <<EOF
1338 #define OPENLDAP_PACKAGE "$PACKAGE"
1339 EOF
1340
1341 cat >> confdefs.h <<EOF
1342 #define OPENLDAP_VERSION "$VERSION"
1343 EOF
1344
1345
1346 cat >> confdefs.h <<EOF
1347 #define LDAP_VENDOR_VERSION $OL_API_INC
1348 EOF
1349
1350 cat >> confdefs.h <<EOF
1351 #define LDAP_VENDOR_VERSION_MAJOR $OL_MAJOR
1352 EOF
1353
1354 cat >> confdefs.h <<EOF
1355 #define LDAP_VENDOR_VERSION_MINOR $OL_MINOR
1356 EOF
1357
1358 cat >> confdefs.h <<EOF
1359 #define LDAP_VENDOR_VERSION_PATCH $OL_PATCH
1360 EOF
1361
1362
1363 OPENLDAP_LIBVERSION=$OL_API_LIB
1364
1365 OPENLDAP_RELEASE_DATE="$OL_RELEASE_DATE"
1366
1367
1368
1369 echo $ac_n "checking configure arguments""... $ac_c" 1>&6
1370 echo "configure:1371: checking configure arguments" >&5
1371
1372
1373 top_builddir=`pwd`
1374
1375 ldap_subdir="/openldap"
1376
1377 # Check whether --with-subdir or --without-subdir was given.
1378 if test "${with_subdir+set}" = set; then
1379   withval="$with_subdir"
1380   case "$withval" in
1381         no) ldap_subdir=""
1382                 ;;
1383         yes)
1384                 ;;
1385         /*|\\*)
1386                 ldap_subdir="$withval"
1387                 ;;
1388         *)
1389                 ldap_subdir="/$withval"
1390                 ;;
1391 esac
1392
1393 fi
1394
1395
1396 # OpenLDAP --enable-debug
1397         # Check whether --enable-debug or --disable-debug was given.
1398 if test "${enable_debug+set}" = set; then
1399   enableval="$enable_debug"
1400   
1401         ol_arg=invalid
1402         for ol_val in auto yes no ; do
1403                 if test "$enableval" = "$ol_val" ; then
1404                         ol_arg="$ol_val"
1405                 fi
1406         done
1407         if test "$ol_arg" = "invalid" ; then
1408                 { echo "configure: error: bad value $enableval for --enable-debug" 1>&2; exit 1; }
1409         fi
1410         ol_enable_debug="$ol_arg"
1411
1412 else
1413         ol_enable_debug="yes"
1414 fi
1415 # end --enable-debug
1416 # OpenLDAP --enable-dynamic
1417         # Check whether --enable-dynamic or --disable-dynamic was given.
1418 if test "${enable_dynamic+set}" = set; then
1419   enableval="$enable_dynamic"
1420   
1421         ol_arg=invalid
1422         for ol_val in auto yes no ; do
1423                 if test "$enableval" = "$ol_val" ; then
1424                         ol_arg="$ol_val"
1425                 fi
1426         done
1427         if test "$ol_arg" = "invalid" ; then
1428                 { echo "configure: error: bad value $enableval for --enable-dynamic" 1>&2; exit 1; }
1429         fi
1430         ol_enable_dynamic="$ol_arg"
1431
1432 else
1433         ol_enable_dynamic="no"
1434 fi
1435 # end --enable-dynamic
1436 # OpenLDAP --enable-syslog
1437         # Check whether --enable-syslog or --disable-syslog was given.
1438 if test "${enable_syslog+set}" = set; then
1439   enableval="$enable_syslog"
1440   
1441         ol_arg=invalid
1442         for ol_val in auto yes no ; do
1443                 if test "$enableval" = "$ol_val" ; then
1444                         ol_arg="$ol_val"
1445                 fi
1446         done
1447         if test "$ol_arg" = "invalid" ; then
1448                 { echo "configure: error: bad value $enableval for --enable-syslog" 1>&2; exit 1; }
1449         fi
1450         ol_enable_syslog="$ol_arg"
1451
1452 else
1453         ol_enable_syslog="auto"
1454 fi
1455 # end --enable-syslog
1456 # OpenLDAP --enable-proctitle
1457         # Check whether --enable-proctitle or --disable-proctitle was given.
1458 if test "${enable_proctitle+set}" = set; then
1459   enableval="$enable_proctitle"
1460   
1461         ol_arg=invalid
1462         for ol_val in auto yes no ; do
1463                 if test "$enableval" = "$ol_val" ; then
1464                         ol_arg="$ol_val"
1465                 fi
1466         done
1467         if test "$ol_arg" = "invalid" ; then
1468                 { echo "configure: error: bad value $enableval for --enable-proctitle" 1>&2; exit 1; }
1469         fi
1470         ol_enable_proctitle="$ol_arg"
1471
1472 else
1473         ol_enable_proctitle="yes"
1474 fi
1475 # end --enable-proctitle
1476 ol_enable_referrals=${ol_enable_referrals-no}
1477 ol_enable_kbind=${ol_enable_kbind-no}
1478 # OpenLDAP --enable-ipv6
1479         # Check whether --enable-ipv6 or --disable-ipv6 was given.
1480 if test "${enable_ipv6+set}" = set; then
1481   enableval="$enable_ipv6"
1482   
1483         ol_arg=invalid
1484         for ol_val in auto yes no ; do
1485                 if test "$enableval" = "$ol_val" ; then
1486                         ol_arg="$ol_val"
1487                 fi
1488         done
1489         if test "$ol_arg" = "invalid" ; then
1490                 { echo "configure: error: bad value $enableval for --enable-ipv6" 1>&2; exit 1; }
1491         fi
1492         ol_enable_ipv6="$ol_arg"
1493
1494 else
1495         ol_enable_ipv6="auto"
1496 fi
1497 # end --enable-ipv6
1498 # OpenLDAP --enable-local
1499         # Check whether --enable-local or --disable-local was given.
1500 if test "${enable_local+set}" = set; then
1501   enableval="$enable_local"
1502   
1503         ol_arg=invalid
1504         for ol_val in auto yes no ; do
1505                 if test "$enableval" = "$ol_val" ; then
1506                         ol_arg="$ol_val"
1507                 fi
1508         done
1509         if test "$ol_arg" = "invalid" ; then
1510                 { echo "configure: error: bad value $enableval for --enable-local" 1>&2; exit 1; }
1511         fi
1512         ol_enable_local="$ol_arg"
1513
1514 else
1515         ol_enable_local="auto"
1516 fi
1517 # end --enable-local
1518 # OpenLDAP --enable-x_compile
1519         # Check whether --enable-x_compile or --disable-x_compile was given.
1520 if test "${enable_x_compile+set}" = set; then
1521   enableval="$enable_x_compile"
1522   
1523         ol_arg=invalid
1524         for ol_val in yes no ; do
1525                 if test "$enableval" = "$ol_val" ; then
1526                         ol_arg="$ol_val"
1527                 fi
1528         done
1529         if test "$ol_arg" = "invalid" ; then
1530                 { echo "configure: error: bad value $enableval for --enable-x_compile" 1>&2; exit 1; }
1531         fi
1532         ol_enable_x_compile="$ol_arg"
1533
1534 else
1535         ol_enable_x_compile="no"
1536 fi
1537 # end --enable-x_compile
1538
1539
1540 # OpenLDAP --with-cyrus_sasl
1541         # Check whether --with-cyrus_sasl or --without-cyrus_sasl was given.
1542 if test "${with_cyrus_sasl+set}" = set; then
1543   withval="$with_cyrus_sasl"
1544   
1545         ol_arg=invalid
1546         for ol_val in auto yes no  ; do
1547                 if test "$withval" = "$ol_val" ; then
1548                         ol_arg="$ol_val"
1549                 fi
1550         done
1551         if test "$ol_arg" = "invalid" ; then
1552                 { echo "configure: error: bad value $withval for --with-cyrus_sasl" 1>&2; exit 1; }
1553         fi
1554         ol_with_cyrus_sasl="$ol_arg"
1555
1556 else
1557         ol_with_cyrus_sasl="auto"
1558 fi
1559 # end --with-cyrus_sasl
1560
1561 # OpenLDAP --with-fetch
1562         # Check whether --with-fetch or --without-fetch was given.
1563 if test "${with_fetch+set}" = set; then
1564   withval="$with_fetch"
1565   
1566         ol_arg=invalid
1567         for ol_val in auto yes no  ; do
1568                 if test "$withval" = "$ol_val" ; then
1569                         ol_arg="$ol_val"
1570                 fi
1571         done
1572         if test "$ol_arg" = "invalid" ; then
1573                 { echo "configure: error: bad value $withval for --with-fetch" 1>&2; exit 1; }
1574         fi
1575         ol_with_fetch="$ol_arg"
1576
1577 else
1578         ol_with_fetch="auto"
1579 fi
1580 # end --with-fetch
1581
1582 ol_with_kerberos=${ol_with_kerberos-auto}
1583 # OpenLDAP --with-threads
1584         # Check whether --with-threads or --without-threads was given.
1585 if test "${with_threads+set}" = set; then
1586   withval="$with_threads"
1587   
1588         ol_arg=invalid
1589         for ol_val in auto nt posix mach pth lwp yes no manual  ; do
1590                 if test "$withval" = "$ol_val" ; then
1591                         ol_arg="$ol_val"
1592                 fi
1593         done
1594         if test "$ol_arg" = "invalid" ; then
1595                 { echo "configure: error: bad value $withval for --with-threads" 1>&2; exit 1; }
1596         fi
1597         ol_with_threads="$ol_arg"
1598
1599 else
1600         ol_with_threads="auto"
1601 fi
1602 # end --with-threads
1603
1604 # OpenLDAP --with-tls
1605         # Check whether --with-tls or --without-tls was given.
1606 if test "${with_tls+set}" = set; then
1607   withval="$with_tls"
1608   
1609         ol_arg=invalid
1610         for ol_val in auto ssleay openssl yes no  ; do
1611                 if test "$withval" = "$ol_val" ; then
1612                         ol_arg="$ol_val"
1613                 fi
1614         done
1615         if test "$ol_arg" = "invalid" ; then
1616                 { echo "configure: error: bad value $withval for --with-tls" 1>&2; exit 1; }
1617         fi
1618         ol_with_tls="$ol_arg"
1619
1620 else
1621         ol_with_tls="auto"
1622 fi
1623 # end --with-tls
1624
1625 # OpenLDAP --with-yielding_select
1626         # Check whether --with-yielding_select or --without-yielding_select was given.
1627 if test "${with_yielding_select+set}" = set; then
1628   withval="$with_yielding_select"
1629   
1630         ol_arg=invalid
1631         for ol_val in auto yes no manual  ; do
1632                 if test "$withval" = "$ol_val" ; then
1633                         ol_arg="$ol_val"
1634                 fi
1635         done
1636         if test "$ol_arg" = "invalid" ; then
1637                 { echo "configure: error: bad value $withval for --with-yielding_select" 1>&2; exit 1; }
1638         fi
1639         ol_with_yielding_select="$ol_arg"
1640
1641 else
1642         ol_with_yielding_select="auto"
1643 fi
1644 # end --with-yielding_select
1645
1646
1647
1648 # Check whether --with-xxslapdoptions or --without-xxslapdoptions was given.
1649 if test "${with_xxslapdoptions+set}" = set; then
1650   withval="$with_xxslapdoptions"
1651   :
1652 fi
1653
1654 # OpenLDAP --enable-slapd
1655         # Check whether --enable-slapd or --disable-slapd was given.
1656 if test "${enable_slapd+set}" = set; then
1657   enableval="$enable_slapd"
1658   
1659         ol_arg=invalid
1660         for ol_val in auto yes no ; do
1661                 if test "$enableval" = "$ol_val" ; then
1662                         ol_arg="$ol_val"
1663                 fi
1664         done
1665         if test "$ol_arg" = "invalid" ; then
1666                 { echo "configure: error: bad value $enableval for --enable-slapd" 1>&2; exit 1; }
1667         fi
1668         ol_enable_slapd="$ol_arg"
1669
1670 else
1671         ol_enable_slapd="yes"
1672 fi
1673 # end --enable-slapd
1674 # OpenLDAP --enable-aci
1675         # Check whether --enable-aci or --disable-aci was given.
1676 if test "${enable_aci+set}" = set; then
1677   enableval="$enable_aci"
1678   
1679         ol_arg=invalid
1680         for ol_val in auto yes no ; do
1681                 if test "$enableval" = "$ol_val" ; then
1682                         ol_arg="$ol_val"
1683                 fi
1684         done
1685         if test "$ol_arg" = "invalid" ; then
1686                 { echo "configure: error: bad value $enableval for --enable-aci" 1>&2; exit 1; }
1687         fi
1688         ol_enable_aci="$ol_arg"
1689
1690 else
1691         ol_enable_aci="no"
1692 fi
1693 # end --enable-aci
1694 # OpenLDAP --enable-cleartext
1695         # Check whether --enable-cleartext or --disable-cleartext was given.
1696 if test "${enable_cleartext+set}" = set; then
1697   enableval="$enable_cleartext"
1698   
1699         ol_arg=invalid
1700         for ol_val in auto yes no ; do
1701                 if test "$enableval" = "$ol_val" ; then
1702                         ol_arg="$ol_val"
1703                 fi
1704         done
1705         if test "$ol_arg" = "invalid" ; then
1706                 { echo "configure: error: bad value $enableval for --enable-cleartext" 1>&2; exit 1; }
1707         fi
1708         ol_enable_cleartext="$ol_arg"
1709
1710 else
1711         ol_enable_cleartext="yes"
1712 fi
1713 # end --enable-cleartext
1714 # OpenLDAP --enable-crypt
1715         # Check whether --enable-crypt or --disable-crypt was given.
1716 if test "${enable_crypt+set}" = set; then
1717   enableval="$enable_crypt"
1718   
1719         ol_arg=invalid
1720         for ol_val in auto yes no ; do
1721                 if test "$enableval" = "$ol_val" ; then
1722                         ol_arg="$ol_val"
1723                 fi
1724         done
1725         if test "$ol_arg" = "invalid" ; then
1726                 { echo "configure: error: bad value $enableval for --enable-crypt" 1>&2; exit 1; }
1727         fi
1728         ol_enable_crypt="$ol_arg"
1729
1730 else
1731         ol_enable_crypt="no"
1732 fi
1733 # end --enable-crypt
1734 ol_enable_kpasswd=${ol_enable_kpasswd-no}
1735 # OpenLDAP --enable-lmpasswd
1736         # Check whether --enable-lmpasswd or --disable-lmpasswd was given.
1737 if test "${enable_lmpasswd+set}" = set; then
1738   enableval="$enable_lmpasswd"
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-lmpasswd" 1>&2; exit 1; }
1748         fi
1749         ol_enable_lmpasswd="$ol_arg"
1750
1751 else
1752         ol_enable_lmpasswd="no"
1753 fi
1754 # end --enable-lmpasswd
1755 # OpenLDAP --enable-spasswd
1756         # Check whether --enable-spasswd or --disable-spasswd was given.
1757 if test "${enable_spasswd+set}" = set; then
1758   enableval="$enable_spasswd"
1759   
1760         ol_arg=invalid
1761         for ol_val in auto yes no ; do
1762                 if test "$enableval" = "$ol_val" ; then
1763                         ol_arg="$ol_val"
1764                 fi
1765         done
1766         if test "$ol_arg" = "invalid" ; then
1767                 { echo "configure: error: bad value $enableval for --enable-spasswd" 1>&2; exit 1; }
1768         fi
1769         ol_enable_spasswd="$ol_arg"
1770
1771 else
1772         ol_enable_spasswd="no"
1773 fi
1774 # end --enable-spasswd
1775 # OpenLDAP --enable-modules
1776         # Check whether --enable-modules or --disable-modules was given.
1777 if test "${enable_modules+set}" = set; then
1778   enableval="$enable_modules"
1779   
1780         ol_arg=invalid
1781         for ol_val in auto yes no ; do
1782                 if test "$enableval" = "$ol_val" ; then
1783                         ol_arg="$ol_val"
1784                 fi
1785         done
1786         if test "$ol_arg" = "invalid" ; then
1787                 { echo "configure: error: bad value $enableval for --enable-modules" 1>&2; exit 1; }
1788         fi
1789         ol_enable_modules="$ol_arg"
1790
1791 else
1792         ol_enable_modules="no"
1793 fi
1794 # end --enable-modules
1795 ol_enable_multimaster=${ol_enable_multimaster-no}
1796 # OpenLDAP --enable-rewrite
1797         # Check whether --enable-rewrite or --disable-rewrite was given.
1798 if test "${enable_rewrite+set}" = set; then
1799   enableval="$enable_rewrite"
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-rewrite" 1>&2; exit 1; }
1809         fi
1810         ol_enable_rewrite="$ol_arg"
1811
1812 else
1813         ol_enable_rewrite="no"
1814 fi
1815 # end --enable-rewrite
1816 # OpenLDAP --enable-rlookups
1817         # Check whether --enable-rlookups or --disable-rlookups was given.
1818 if test "${enable_rlookups+set}" = set; then
1819   enableval="$enable_rlookups"
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-rlookups" 1>&2; exit 1; }
1829         fi
1830         ol_enable_rlookups="$ol_arg"
1831
1832 else
1833         ol_enable_rlookups="no"
1834 fi
1835 # end --enable-rlookups
1836 # OpenLDAP --enable-slapi
1837         # Check whether --enable-slapi or --disable-slapi was given.
1838 if test "${enable_slapi+set}" = set; then
1839   enableval="$enable_slapi"
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-slapi" 1>&2; exit 1; }
1849         fi
1850         ol_enable_slapi="$ol_arg"
1851
1852 else
1853         ol_enable_slapi="no"
1854 fi
1855 # end --enable-slapi
1856 # OpenLDAP --enable-slp
1857         # Check whether --enable-slp or --disable-slp was given.
1858 if test "${enable_slp+set}" = set; then
1859   enableval="$enable_slp"
1860   
1861         ol_arg=invalid
1862         for ol_val in auto yes no ; do
1863                 if test "$enableval" = "$ol_val" ; then
1864                         ol_arg="$ol_val"
1865                 fi
1866         done
1867         if test "$ol_arg" = "invalid" ; then
1868                 { echo "configure: error: bad value $enableval for --enable-slp" 1>&2; exit 1; }
1869         fi
1870         ol_enable_slp="$ol_arg"
1871
1872 else
1873         ol_enable_slp="no"
1874 fi
1875 # end --enable-slp
1876 # OpenLDAP --enable-wrappers
1877         # Check whether --enable-wrappers or --disable-wrappers was given.
1878 if test "${enable_wrappers+set}" = set; then
1879   enableval="$enable_wrappers"
1880   
1881         ol_arg=invalid
1882         for ol_val in auto yes no ; do
1883                 if test "$enableval" = "$ol_val" ; then
1884                         ol_arg="$ol_val"
1885                 fi
1886         done
1887         if test "$ol_arg" = "invalid" ; then
1888                 { echo "configure: error: bad value $enableval for --enable-wrappers" 1>&2; exit 1; }
1889         fi
1890         ol_enable_wrappers="$ol_arg"
1891
1892 else
1893         ol_enable_wrappers="no"
1894 fi
1895 # end --enable-wrappers
1896
1897
1898 # OpenLDAP --enable-bdb
1899         # Check whether --enable-bdb or --disable-bdb was given.
1900 if test "${enable_bdb+set}" = set; then
1901   enableval="$enable_bdb"
1902   
1903         ol_arg=invalid
1904         for ol_val in auto yes no ; do
1905                 if test "$enableval" = "$ol_val" ; then
1906                         ol_arg="$ol_val"
1907                 fi
1908         done
1909         if test "$ol_arg" = "invalid" ; then
1910                 { echo "configure: error: bad value $enableval for --enable-bdb" 1>&2; exit 1; }
1911         fi
1912         ol_enable_bdb="$ol_arg"
1913
1914 else
1915         ol_enable_bdb="yes"
1916 fi
1917 # end --enable-bdb
1918 # OpenLDAP --with-bdb_module
1919         # Check whether --with-bdb_module or --without-bdb_module was given.
1920 if test "${with_bdb_module+set}" = set; then
1921   withval="$with_bdb_module"
1922   
1923         ol_arg=invalid
1924         for ol_val in static dynamic ; do
1925                 if test "$withval" = "$ol_val" ; then
1926                         ol_arg="$ol_val"
1927                 fi
1928         done
1929         if test "$ol_arg" = "invalid" ; then
1930                 { echo "configure: error: bad value $withval for --with-bdb_module" 1>&2; exit 1; }
1931         fi
1932         ol_with_bdb_module="$ol_arg"
1933
1934 else
1935         ol_with_bdb_module="static"
1936 fi
1937 # end --with-bdb_module
1938
1939 # OpenLDAP --enable-dnssrv
1940         # Check whether --enable-dnssrv or --disable-dnssrv was given.
1941 if test "${enable_dnssrv+set}" = set; then
1942   enableval="$enable_dnssrv"
1943   
1944         ol_arg=invalid
1945         for ol_val in auto yes no ; do
1946                 if test "$enableval" = "$ol_val" ; then
1947                         ol_arg="$ol_val"
1948                 fi
1949         done
1950         if test "$ol_arg" = "invalid" ; then
1951                 { echo "configure: error: bad value $enableval for --enable-dnssrv" 1>&2; exit 1; }
1952         fi
1953         ol_enable_dnssrv="$ol_arg"
1954
1955 else
1956         ol_enable_dnssrv="no"
1957 fi
1958 # end --enable-dnssrv
1959 # OpenLDAP --with-dnssrv_module
1960         # Check whether --with-dnssrv_module or --without-dnssrv_module was given.
1961 if test "${with_dnssrv_module+set}" = set; then
1962   withval="$with_dnssrv_module"
1963   
1964         ol_arg=invalid
1965         for ol_val in static dynamic ; do
1966                 if test "$withval" = "$ol_val" ; then
1967                         ol_arg="$ol_val"
1968                 fi
1969         done
1970         if test "$ol_arg" = "invalid" ; then
1971                 { echo "configure: error: bad value $withval for --with-dnssrv_module" 1>&2; exit 1; }
1972         fi
1973         ol_with_dnssrv_module="$ol_arg"
1974
1975 else
1976         ol_with_dnssrv_module="static"
1977 fi
1978 # end --with-dnssrv_module
1979
1980 # OpenLDAP --enable-hdb
1981         # Check whether --enable-hdb or --disable-hdb was given.
1982 if test "${enable_hdb+set}" = set; then
1983   enableval="$enable_hdb"
1984   
1985         ol_arg=invalid
1986         for ol_val in auto yes no ; do
1987                 if test "$enableval" = "$ol_val" ; then
1988                         ol_arg="$ol_val"
1989                 fi
1990         done
1991         if test "$ol_arg" = "invalid" ; then
1992                 { echo "configure: error: bad value $enableval for --enable-hdb" 1>&2; exit 1; }
1993         fi
1994         ol_enable_hdb="$ol_arg"
1995
1996 else
1997         ol_enable_hdb="no"
1998 fi
1999 # end --enable-hdb
2000 # OpenLDAP --with-hdb_module
2001         # Check whether --with-hdb_module or --without-hdb_module was given.
2002 if test "${with_hdb_module+set}" = set; then
2003   withval="$with_hdb_module"
2004   
2005         ol_arg=invalid
2006         for ol_val in static dynamic ; do
2007                 if test "$withval" = "$ol_val" ; then
2008                         ol_arg="$ol_val"
2009                 fi
2010         done
2011         if test "$ol_arg" = "invalid" ; then
2012                 { echo "configure: error: bad value $withval for --with-hdb_module" 1>&2; exit 1; }
2013         fi
2014         ol_with_hdb_module="$ol_arg"
2015
2016 else
2017         ol_with_hdb_module="static"
2018 fi
2019 # end --with-hdb_module
2020
2021 # OpenLDAP --enable-ldap
2022         # Check whether --enable-ldap or --disable-ldap was given.
2023 if test "${enable_ldap+set}" = set; then
2024   enableval="$enable_ldap"
2025   
2026         ol_arg=invalid
2027         for ol_val in auto yes no ; do
2028                 if test "$enableval" = "$ol_val" ; then
2029                         ol_arg="$ol_val"
2030                 fi
2031         done
2032         if test "$ol_arg" = "invalid" ; then
2033                 { echo "configure: error: bad value $enableval for --enable-ldap" 1>&2; exit 1; }
2034         fi
2035         ol_enable_ldap="$ol_arg"
2036
2037 else
2038         ol_enable_ldap="no"
2039 fi
2040 # end --enable-ldap
2041 # OpenLDAP --with-ldap_module
2042         # Check whether --with-ldap_module or --without-ldap_module was given.
2043 if test "${with_ldap_module+set}" = set; then
2044   withval="$with_ldap_module"
2045   
2046         ol_arg=invalid
2047         for ol_val in static dynamic ; do
2048                 if test "$withval" = "$ol_val" ; then
2049                         ol_arg="$ol_val"
2050                 fi
2051         done
2052         if test "$ol_arg" = "invalid" ; then
2053                 { echo "configure: error: bad value $withval for --with-ldap_module" 1>&2; exit 1; }
2054         fi
2055         ol_with_ldap_module="$ol_arg"
2056
2057 else
2058         ol_with_ldap_module="static"
2059 fi
2060 # end --with-ldap_module
2061
2062 # OpenLDAP --enable-ldbm
2063         # Check whether --enable-ldbm or --disable-ldbm was given.
2064 if test "${enable_ldbm+set}" = set; then
2065   enableval="$enable_ldbm"
2066   
2067         ol_arg=invalid
2068         for ol_val in auto yes no ; do
2069                 if test "$enableval" = "$ol_val" ; then
2070                         ol_arg="$ol_val"
2071                 fi
2072         done
2073         if test "$ol_arg" = "invalid" ; then
2074                 { echo "configure: error: bad value $enableval for --enable-ldbm" 1>&2; exit 1; }
2075         fi
2076         ol_enable_ldbm="$ol_arg"
2077
2078 else
2079         ol_enable_ldbm="no"
2080 fi
2081 # end --enable-ldbm
2082 # OpenLDAP --with-ldbm_api
2083         # Check whether --with-ldbm_api or --without-ldbm_api was given.
2084 if test "${with_ldbm_api+set}" = set; then
2085   withval="$with_ldbm_api"
2086   
2087         ol_arg=invalid
2088         for ol_val in auto berkeley bcompat mdbm gdbm ; do
2089                 if test "$withval" = "$ol_val" ; then
2090                         ol_arg="$ol_val"
2091                 fi
2092         done
2093         if test "$ol_arg" = "invalid" ; then
2094                 { echo "configure: error: bad value $withval for --with-ldbm_api" 1>&2; exit 1; }
2095         fi
2096         ol_with_ldbm_api="$ol_arg"
2097
2098 else
2099         ol_with_ldbm_api="auto"
2100 fi
2101 # end --with-ldbm_api
2102
2103 # OpenLDAP --with-ldbm_module
2104         # Check whether --with-ldbm_module or --without-ldbm_module was given.
2105 if test "${with_ldbm_module+set}" = set; then
2106   withval="$with_ldbm_module"
2107   
2108         ol_arg=invalid
2109         for ol_val in static dynamic ; do
2110                 if test "$withval" = "$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 $withval for --with-ldbm_module" 1>&2; exit 1; }
2116         fi
2117         ol_with_ldbm_module="$ol_arg"
2118
2119 else
2120         ol_with_ldbm_module="static"
2121 fi
2122 # end --with-ldbm_module
2123
2124 # OpenLDAP --with-ldbm_type
2125         # Check whether --with-ldbm_type or --without-ldbm_type was given.
2126 if test "${with_ldbm_type+set}" = set; then
2127   withval="$with_ldbm_type"
2128   
2129         ol_arg=invalid
2130         for ol_val in auto btree hash ; do
2131                 if test "$withval" = "$ol_val" ; then
2132                         ol_arg="$ol_val"
2133                 fi
2134         done
2135         if test "$ol_arg" = "invalid" ; then
2136                 { echo "configure: error: bad value $withval for --with-ldbm_type" 1>&2; exit 1; }
2137         fi
2138         ol_with_ldbm_type="$ol_arg"
2139
2140 else
2141         ol_with_ldbm_type="auto"
2142 fi
2143 # end --with-ldbm_type
2144
2145 # OpenLDAP --enable-meta
2146         # Check whether --enable-meta or --disable-meta was given.
2147 if test "${enable_meta+set}" = set; then
2148   enableval="$enable_meta"
2149   
2150         ol_arg=invalid
2151         for ol_val in auto yes no ; do
2152                 if test "$enableval" = "$ol_val" ; then
2153                         ol_arg="$ol_val"
2154                 fi
2155         done
2156         if test "$ol_arg" = "invalid" ; then
2157                 { echo "configure: error: bad value $enableval for --enable-meta" 1>&2; exit 1; }
2158         fi
2159         ol_enable_meta="$ol_arg"
2160
2161 else
2162         ol_enable_meta="no"
2163 fi
2164 # end --enable-meta
2165 # OpenLDAP --with-meta_module
2166         # Check whether --with-meta_module or --without-meta_module was given.
2167 if test "${with_meta_module+set}" = set; then
2168   withval="$with_meta_module"
2169   
2170         ol_arg=invalid
2171         for ol_val in static dynamic ; do
2172                 if test "$withval" = "$ol_val" ; then
2173                         ol_arg="$ol_val"
2174                 fi
2175         done
2176         if test "$ol_arg" = "invalid" ; then
2177                 { echo "configure: error: bad value $withval for --with-meta_module" 1>&2; exit 1; }
2178         fi
2179         ol_with_meta_module="$ol_arg"
2180
2181 else
2182         ol_with_meta_module="static"
2183 fi
2184 # end --with-meta_module
2185
2186 # OpenLDAP --enable-monitor
2187         # Check whether --enable-monitor or --disable-monitor was given.
2188 if test "${enable_monitor+set}" = set; then
2189   enableval="$enable_monitor"
2190   
2191         ol_arg=invalid
2192         for ol_val in auto yes no ; do
2193                 if test "$enableval" = "$ol_val" ; then
2194                         ol_arg="$ol_val"
2195                 fi
2196         done
2197         if test "$ol_arg" = "invalid" ; then
2198                 { echo "configure: error: bad value $enableval for --enable-monitor" 1>&2; exit 1; }
2199         fi
2200         ol_enable_monitor="$ol_arg"
2201
2202 else
2203         ol_enable_monitor="yes"
2204 fi
2205 # end --enable-monitor
2206 # OpenLDAP --with-monitor_module
2207         # Check whether --with-monitor_module or --without-monitor_module was given.
2208 if test "${with_monitor_module+set}" = set; then
2209   withval="$with_monitor_module"
2210   
2211         ol_arg=invalid
2212         for ol_val in static dynamic ; do
2213                 if test "$withval" = "$ol_val" ; then
2214                         ol_arg="$ol_val"
2215                 fi
2216         done
2217         if test "$ol_arg" = "invalid" ; then
2218                 { echo "configure: error: bad value $withval for --with-monitor_module" 1>&2; exit 1; }
2219         fi
2220         ol_with_monitor_module="$ol_arg"
2221
2222 else
2223         ol_with_monitor_module="static"
2224 fi
2225 # end --with-monitor_module
2226
2227 # OpenLDAP --enable-null
2228         # Check whether --enable-null or --disable-null was given.
2229 if test "${enable_null+set}" = set; then
2230   enableval="$enable_null"
2231   
2232         ol_arg=invalid
2233         for ol_val in auto yes no ; do
2234                 if test "$enableval" = "$ol_val" ; then
2235                         ol_arg="$ol_val"
2236                 fi
2237         done
2238         if test "$ol_arg" = "invalid" ; then
2239                 { echo "configure: error: bad value $enableval for --enable-null" 1>&2; exit 1; }
2240         fi
2241         ol_enable_null="$ol_arg"
2242
2243 else
2244         ol_enable_null="no"
2245 fi
2246 # end --enable-null
2247 # OpenLDAP --with-null_module
2248         # Check whether --with-null_module or --without-null_module was given.
2249 if test "${with_null_module+set}" = set; then
2250   withval="$with_null_module"
2251   
2252         ol_arg=invalid
2253         for ol_val in static dynamic ; do
2254                 if test "$withval" = "$ol_val" ; then
2255                         ol_arg="$ol_val"
2256                 fi
2257         done
2258         if test "$ol_arg" = "invalid" ; then
2259                 { echo "configure: error: bad value $withval for --with-null_module" 1>&2; exit 1; }
2260         fi
2261         ol_with_null_module="$ol_arg"
2262
2263 else
2264         ol_with_null_module="static"
2265 fi
2266 # end --with-null_module
2267
2268 # OpenLDAP --enable-passwd
2269         # Check whether --enable-passwd or --disable-passwd was given.
2270 if test "${enable_passwd+set}" = set; then
2271   enableval="$enable_passwd"
2272   
2273         ol_arg=invalid
2274         for ol_val in auto yes no ; do
2275                 if test "$enableval" = "$ol_val" ; then
2276                         ol_arg="$ol_val"
2277                 fi
2278         done
2279         if test "$ol_arg" = "invalid" ; then
2280                 { echo "configure: error: bad value $enableval for --enable-passwd" 1>&2; exit 1; }
2281         fi
2282         ol_enable_passwd="$ol_arg"
2283
2284 else
2285         ol_enable_passwd="no"
2286 fi
2287 # end --enable-passwd
2288 # OpenLDAP --with-passwd_module
2289         # Check whether --with-passwd_module or --without-passwd_module was given.
2290 if test "${with_passwd_module+set}" = set; then
2291   withval="$with_passwd_module"
2292   
2293         ol_arg=invalid
2294         for ol_val in static dynamic ; do
2295                 if test "$withval" = "$ol_val" ; then
2296                         ol_arg="$ol_val"
2297                 fi
2298         done
2299         if test "$ol_arg" = "invalid" ; then
2300                 { echo "configure: error: bad value $withval for --with-passwd_module" 1>&2; exit 1; }
2301         fi
2302         ol_with_passwd_module="$ol_arg"
2303
2304 else
2305         ol_with_passwd_module="static"
2306 fi
2307 # end --with-passwd_module
2308
2309 # OpenLDAP --enable-perl
2310         # Check whether --enable-perl or --disable-perl was given.
2311 if test "${enable_perl+set}" = set; then
2312   enableval="$enable_perl"
2313   
2314         ol_arg=invalid
2315         for ol_val in auto yes no ; do
2316                 if test "$enableval" = "$ol_val" ; then
2317                         ol_arg="$ol_val"
2318                 fi
2319         done
2320         if test "$ol_arg" = "invalid" ; then
2321                 { echo "configure: error: bad value $enableval for --enable-perl" 1>&2; exit 1; }
2322         fi
2323         ol_enable_perl="$ol_arg"
2324
2325 else
2326         ol_enable_perl="no"
2327 fi
2328 # end --enable-perl
2329 # OpenLDAP --with-perl_module
2330         # Check whether --with-perl_module or --without-perl_module was given.
2331 if test "${with_perl_module+set}" = set; then
2332   withval="$with_perl_module"
2333   
2334         ol_arg=invalid
2335         for ol_val in static dynamic ; do
2336                 if test "$withval" = "$ol_val" ; then
2337                         ol_arg="$ol_val"
2338                 fi
2339         done
2340         if test "$ol_arg" = "invalid" ; then
2341                 { echo "configure: error: bad value $withval for --with-perl_module" 1>&2; exit 1; }
2342         fi
2343         ol_with_perl_module="$ol_arg"
2344
2345 else
2346         ol_with_perl_module="static"
2347 fi
2348 # end --with-perl_module
2349
2350 # OpenLDAP --enable-shell
2351         # Check whether --enable-shell or --disable-shell was given.
2352 if test "${enable_shell+set}" = set; then
2353   enableval="$enable_shell"
2354   
2355         ol_arg=invalid
2356         for ol_val in auto yes no ; do
2357                 if test "$enableval" = "$ol_val" ; then
2358                         ol_arg="$ol_val"
2359                 fi
2360         done
2361         if test "$ol_arg" = "invalid" ; then
2362                 { echo "configure: error: bad value $enableval for --enable-shell" 1>&2; exit 1; }
2363         fi
2364         ol_enable_shell="$ol_arg"
2365
2366 else
2367         ol_enable_shell="no"
2368 fi
2369 # end --enable-shell
2370 # OpenLDAP --with-shell_module
2371         # Check whether --with-shell_module or --without-shell_module was given.
2372 if test "${with_shell_module+set}" = set; then
2373   withval="$with_shell_module"
2374   
2375         ol_arg=invalid
2376         for ol_val in static dynamic ; do
2377                 if test "$withval" = "$ol_val" ; then
2378                         ol_arg="$ol_val"
2379                 fi
2380         done
2381         if test "$ol_arg" = "invalid" ; then
2382                 { echo "configure: error: bad value $withval for --with-shell_module" 1>&2; exit 1; }
2383         fi
2384         ol_with_shell_module="$ol_arg"
2385
2386 else
2387         ol_with_shell_module="static"
2388 fi
2389 # end --with-shell_module
2390
2391 # OpenLDAP --enable-sql
2392         # Check whether --enable-sql or --disable-sql was given.
2393 if test "${enable_sql+set}" = set; then
2394   enableval="$enable_sql"
2395   
2396         ol_arg=invalid
2397         for ol_val in auto yes no ; do
2398                 if test "$enableval" = "$ol_val" ; then
2399                         ol_arg="$ol_val"
2400                 fi
2401         done
2402         if test "$ol_arg" = "invalid" ; then
2403                 { echo "configure: error: bad value $enableval for --enable-sql" 1>&2; exit 1; }
2404         fi
2405         ol_enable_sql="$ol_arg"
2406
2407 else
2408         ol_enable_sql="no"
2409 fi
2410 # end --enable-sql
2411 # OpenLDAP --with-sql_module
2412         # Check whether --with-sql_module or --without-sql_module was given.
2413 if test "${with_sql_module+set}" = set; then
2414   withval="$with_sql_module"
2415   
2416         ol_arg=invalid
2417         for ol_val in static dynamic ; do
2418                 if test "$withval" = "$ol_val" ; then
2419                         ol_arg="$ol_val"
2420                 fi
2421         done
2422         if test "$ol_arg" = "invalid" ; then
2423                 { echo "configure: error: bad value $withval for --with-sql_module" 1>&2; exit 1; }
2424         fi
2425         ol_with_sql_module="$ol_arg"
2426
2427 else
2428         ol_with_sql_module="static"
2429 fi
2430 # end --with-sql_module
2431
2432 # OpenLDAP --enable-tcl
2433         # Check whether --enable-tcl or --disable-tcl was given.
2434 if test "${enable_tcl+set}" = set; then
2435   enableval="$enable_tcl"
2436   
2437         ol_arg=invalid
2438         for ol_val in auto yes no ; do
2439                 if test "$enableval" = "$ol_val" ; then
2440                         ol_arg="$ol_val"
2441                 fi
2442         done
2443         if test "$ol_arg" = "invalid" ; then
2444                 { echo "configure: error: bad value $enableval for --enable-tcl" 1>&2; exit 1; }
2445         fi
2446         ol_enable_tcl="$ol_arg"
2447
2448 else
2449         ol_enable_tcl="no"
2450 fi
2451 # end --enable-tcl
2452 # OpenLDAP --with-tcl_module
2453         # Check whether --with-tcl_module or --without-tcl_module was given.
2454 if test "${with_tcl_module+set}" = set; then
2455   withval="$with_tcl_module"
2456   
2457         ol_arg=invalid
2458         for ol_val in static dynamic ; do
2459                 if test "$withval" = "$ol_val" ; then
2460                         ol_arg="$ol_val"
2461                 fi
2462         done
2463         if test "$ol_arg" = "invalid" ; then
2464                 { echo "configure: error: bad value $withval for --with-tcl_module" 1>&2; exit 1; }
2465         fi
2466         ol_with_tcl_module="$ol_arg"
2467
2468 else
2469         ol_with_tcl_module="static"
2470 fi
2471 # end --with-tcl_module
2472
2473
2474 # Check whether --with-xxslurpdoptions or --without-xxslurpdoptions was given.
2475 if test "${with_xxslurpdoptions+set}" = set; then
2476   withval="$with_xxslurpdoptions"
2477   :
2478 fi
2479
2480 # OpenLDAP --enable-slurpd
2481         # Check whether --enable-slurpd or --disable-slurpd was given.
2482 if test "${enable_slurpd+set}" = set; then
2483   enableval="$enable_slurpd"
2484   
2485         ol_arg=invalid
2486         for ol_val in auto yes no ; do
2487                 if test "$enableval" = "$ol_val" ; then
2488                         ol_arg="$ol_val"
2489                 fi
2490         done
2491         if test "$ol_arg" = "invalid" ; then
2492                 { echo "configure: error: bad value $enableval for --enable-slurpd" 1>&2; exit 1; }
2493         fi
2494         ol_enable_slurpd="$ol_arg"
2495
2496 else
2497         ol_enable_slurpd="auto"
2498 fi
2499 # end --enable-slurpd
2500
2501 # Check whether --with-xxliboptions or --without-xxliboptions was given.
2502 if test "${with_xxliboptions+set}" = set; then
2503   withval="$with_xxliboptions"
2504   :
2505 fi
2506
2507 # Check whether --enable-static or --disable-static was given.
2508 if test "${enable_static+set}" = set; then
2509   enableval="$enable_static"
2510   p=${PACKAGE-default}
2511 case $enableval in
2512 yes) enable_static=yes ;;
2513 no) enable_static=no ;;
2514 *)
2515   enable_static=no
2516   # Look at the argument we got.  We use all the common list separators.
2517   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2518   for pkg in $enableval; do
2519     if test "X$pkg" = "X$p"; then
2520       enable_static=yes
2521     fi
2522   done
2523   IFS="$ac_save_ifs"
2524   ;;
2525 esac
2526 else
2527   enable_static=yes
2528 fi
2529
2530 # Check whether --enable-shared or --disable-shared was given.
2531 if test "${enable_shared+set}" = set; then
2532   enableval="$enable_shared"
2533   p=${PACKAGE-default}
2534 case $enableval in
2535 yes) enable_shared=yes ;;
2536 no) enable_shared=no ;;
2537 *)
2538   enable_shared=no
2539   # Look at the argument we got.  We use all the common list separators.
2540   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2541   for pkg in $enableval; do
2542     if test "X$pkg" = "X$p"; then
2543       enable_shared=yes
2544     fi
2545   done
2546   IFS="$ac_save_ifs"
2547   ;;
2548 esac
2549 else
2550   enable_shared=yes
2551 fi
2552
2553
2554
2555 # validate options
2556 if test $ol_enable_slapd = no ; then
2557                 if test $ol_enable_slapi = yes ; then
2558                 echo "configure: warning: slapd disabled, ignoring --enable-slapi argument" 1>&2
2559         fi
2560         if test $ol_enable_bdb = yes ; then
2561                 echo "configure: warning: slapd disabled, ignoring --enable-bdb argument" 1>&2
2562         fi
2563         if test $ol_enable_dnssrv = yes ; then
2564                 echo "configure: warning: slapd disabled, ignoring --enable-dnssrv argument" 1>&2
2565         fi
2566         if test $ol_enable_hdb = yes ; then
2567                 echo "configure: warning: slapd disabled, ignoring --enable-hdb argument" 1>&2
2568         fi
2569         if test $ol_enable_ldap = yes ; then
2570                 echo "configure: warning: slapd disabled, ignoring --enable-ldap argument" 1>&2
2571         fi
2572         if test $ol_enable_ldbm = yes ; then
2573                 echo "configure: warning: slapd disabled, ignoring --enable-ldbm argument" 1>&2
2574         fi
2575         if test $ol_enable_meta = yes ; then
2576                 echo "configure: warning: slapd disabled, ignoring --enable-meta argument" 1>&2
2577         fi
2578         if test $ol_enable_monitor = yes ; then
2579                 echo "configure: warning: slapd disabled, ignoring --enable-monitor argument" 1>&2
2580         fi
2581         if test $ol_enable_null = yes ; then
2582                 echo "configure: warning: slapd disabled, ignoring --enable-null argument" 1>&2
2583         fi
2584         if test $ol_enable_passwd = yes ; then
2585                 echo "configure: warning: slapd disabled, ignoring --enable-passwd argument" 1>&2
2586         fi
2587         if test $ol_enable_perl = yes ; then
2588                 echo "configure: warning: slapd disabled, ignoring --enable-perl argument" 1>&2
2589         fi
2590         if test $ol_enable_shell = yes ; then
2591                 echo "configure: warning: slapd disabled, ignoring --enable-shell argument" 1>&2
2592         fi
2593         if test $ol_enable_tcl = yes ; then
2594                 echo "configure: warning: slapd disabled, ignoring --enable-tcl argument" 1>&2
2595         fi
2596         if test $ol_enable_sql = yes ; then
2597                 echo "configure: warning: slapd disabled, ignoring --enable-sql argument" 1>&2
2598         fi
2599         if test $ol_enable_modules = yes ; then
2600                 echo "configure: warning: slapd disabled, ignoring --enable-modules argument" 1>&2
2601         fi
2602         if test $ol_enable_multimaster = yes ; then
2603                 echo "configure: warning: slapd disabled, ignoring --enable-multimaster argument" 1>&2
2604         fi
2605         if test $ol_enable_wrappers = yes ; then
2606                 echo "configure: warning: slapd disabled, ignoring --enable-wrappers argument" 1>&2
2607         fi
2608         if test $ol_enable_rlookups = yes ; then
2609                 echo "configure: warning: slapd disabled, ignoring --enable-rlookups argument" 1>&2
2610         fi
2611         if test $ol_enable_aci = yes ; then
2612                 echo "configure: warning: slapd disabled, ignoring --enable-aci argument" 1>&2
2613         fi
2614         if test $ol_with_ldbm_api != auto ; then
2615                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-api argument" 1>&2
2616         fi
2617         if test $ol_with_ldbm_type != auto ; then
2618                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-type argument" 1>&2
2619         fi
2620         if test $ol_with_bdb_module != static ; then
2621                 echo "configure: warning: slapd disabled, ignoring --with-bdb-module argument" 1>&2
2622         fi
2623         if test $ol_with_dnssrv_module != static ; then
2624                 echo "configure: warning: slapd disabled, ignoring --with-dnssrv-module argument" 1>&2
2625         fi
2626         if test $ol_with_hdb_module != static ; then
2627                 echo "configure: warning: slapd disabled, ignoring --with-hdb-module argument" 1>&2
2628         fi
2629         if test $ol_with_ldap_module != static ; then
2630                 echo "configure: warning: slapd disabled, ignoring --with-ldap-module argument" 1>&2
2631         fi
2632         if test $ol_with_ldbm_module != static ; then
2633                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-module argument" 1>&2
2634         fi
2635         if test $ol_with_meta_module != static ; then
2636                 echo "configure: warning: slapd disabled, ignoring --with-meta-module argument" 1>&2
2637         fi
2638         if test $ol_with_monitor_module != static ; then
2639                 echo "configure: warning: slapd disabled, ignoring --with-monitor-module argument" 1>&2
2640         fi
2641         if test $ol_with_null_module != static ; then
2642                 echo "configure: warning: slapd disabled, ignoring --with-null-module argument" 1>&2
2643         fi
2644         if test $ol_with_passwd_module != static ; then
2645                 echo "configure: warning: slapd disabled, ignoring --with-passwd-module argument" 1>&2
2646         fi
2647         if test $ol_with_perl_module != static ; then
2648                 echo "configure: warning: slapd disabled, ignoring --with-perl-module argument" 1>&2
2649         fi
2650         if test $ol_with_shell_module != static ; then
2651                 echo "configure: warning: slapd disabled, ignoring --with-shell-module argument" 1>&2
2652         fi
2653         if test $ol_with_tcl_module != static ; then
2654                 echo "configure: warning: slapd disabled, ignoring --with-tcl-module argument" 1>&2
2655         fi
2656         if test $ol_with_sql_module != static ; then
2657                 echo "configure: warning: slapd disabled, ignoring --with-sql-module argument" 1>&2
2658         fi
2659         if test $ol_enable_slurpd = yes ; then
2660                 { echo "configure: error: slurpd requires slapd" 1>&2; exit 1; }
2661         fi
2662         if test $ol_enable_rewrite = yes ; then
2663                 echo "configure: warning: slapd disabled, ignoring --enable-rewrite argument" 1>&2
2664         fi
2665
2666         # force settings to no
2667         ol_enable_slapi=no
2668         ol_enable_bdb=no
2669         ol_enable_dnssrv=no
2670         ol_enable_hdb=no
2671         ol_enable_ldap=no
2672         ol_enable_ldbm=no
2673         ol_enable_meta=no
2674         ol_enable_monitor=no
2675         ol_enable_null=no
2676         ol_enable_passwd=no
2677         ol_enable_perl=no
2678         ol_enable_shell=no
2679         ol_enable_tcl=no
2680         ol_enable_sql=no
2681
2682         ol_enable_modules=no
2683         ol_enable_multimaster=no
2684         ol_enable_rlookups=no
2685         ol_enable_aci=no
2686         ol_enable_wrappers=no
2687         ol_enable_dynamic=no
2688
2689         ol_with_ldbm_api=no
2690         ol_with_ldbm_type=no
2691
2692         ol_with_bdb_module=static
2693         ol_with_dnssrv_module=static
2694         ol_with_hdb_module=static
2695         ol_with_ldap_module=static
2696         ol_with_ldbm_module=static
2697         ol_with_meta_module=static
2698         ol_with_monitor_module=static
2699         ol_with_null_module=static
2700         ol_with_passwd_module=static
2701         ol_with_perl_module=static
2702         ol_with_shell_module=static
2703         ol_with_tcl_module=static
2704         ol_with_sql_module=static
2705
2706         ol_enable_slurpd=no
2707
2708         ol_enable_rewrite=no
2709
2710 elif test $ol_enable_ldbm = no ; then
2711         
2712         if test $ol_with_ldbm_api != auto ; then
2713                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-api argument" 1>&2
2714         fi
2715
2716         if test $ol_with_ldbm_type != auto ; then
2717                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-type argument" 1>&2
2718         fi
2719
2720         if test $ol_with_ldbm_module != static ; then
2721                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-module argument" 1>&2
2722         fi
2723
2724         if test $ol_enable_modules != yes -a \
2725                 $ol_enable_bdb = no -a \
2726                 $ol_enable_dnssrv = no -a \
2727                 $ol_enable_hdb = no -a \
2728                 $ol_enable_ldap = no -a \
2729                 $ol_enable_meta = no -a \
2730                 $ol_enable_monitor = no -a \
2731                 $ol_enable_null = no -a \
2732                 $ol_enable_passwd = no -a \
2733                 $ol_enable_perl = no -a \
2734                 $ol_enable_shell = no -a \
2735                 $ol_enable_sql = no -a \
2736                 $ol_enable_tcl = no ; then
2737
2738                 if test $ol_enable_slapd = yes ; then
2739                         { echo "configure: error: slapd requires a backend" 1>&2; exit 1; }
2740                 else
2741                         echo "configure: warning: skipping slapd, no backend specified" 1>&2
2742                         ol_enable_slapd=no
2743                 fi
2744         fi
2745
2746         ol_with_ldbm_api=no
2747         ol_with_ldbm_type=no
2748         ol_with_ldbm_module=static
2749
2750         if test $ol_enable_bdb != no -o $ol_enable_hdb != no; then
2751                 ol_with_ldbm_api=berkeley
2752         fi
2753
2754 else
2755                 if test $ol_with_ldbm_api = gdbm -a \
2756                 $ol_with_ldbm_type = btree ; then
2757                 { echo "configure: error: GDBM only supports LDBM type hash" 1>&2; exit 1; }
2758         fi
2759         if test $ol_with_ldbm_api = mdbm -a \
2760                 $ol_with_ldbm_type = btree ; then
2761                 { echo "configure: error: MDBM only supports LDBM type hash" 1>&2; exit 1; }
2762         fi
2763         if test $ol_with_ldbm_api = ndbm -a \
2764                 $ol_with_ldbm_type = btree ; then
2765                 { echo "configure: error: NDBM only supports LDBM type hash" 1>&2; exit 1; }
2766         fi
2767
2768         if test $ol_enable_bdb = yes -o $ol_enable_hdb = yes ; then
2769                 if test $ol_with_ldbm_api = auto ; then
2770                         ol_with_ldbm_api=berkeley
2771                 elif test $ol_with_ldbm_api != berkeley ; then
2772                         { echo "configure: error: LDBM API not compatible with BDB/HDB" 1>&2; exit 1; }
2773                 fi
2774
2775         elif test $ol_enable_bdb = auto ; then
2776                 if test $ol_with_ldbm_api != berkeley \
2777                         -o $ol_with_ldbm_api != auto ; then
2778                         echo "configure: warning: LDBM API not compatible with BDB, disabling BDB" 1>&2
2779                         ol_enable_bdb=no
2780                 fi
2781         fi
2782 fi
2783
2784 if test $ol_enable_slurpd = yes ; then
2785                 if test $ol_with_threads = no ; then
2786                 { echo "configure: error: slurpd requires threads" 1>&2; exit 1; }
2787         fi
2788 fi
2789
2790 if test $ol_enable_lmpasswd = yes ; then
2791         if test $ol_with_tls = no ; then
2792                 { echo "configure: error: LAN Manager passwords require OpenSSL" 1>&2; exit 1; }
2793         fi
2794 fi
2795
2796 if test $ol_enable_kbind = yes -o $ol_enable_kpasswd = yes ; then
2797         if test $ol_with_kerberos = no ; then
2798                 { echo "configure: error: options require --with-kerberos" 1>&2; exit 1; }
2799         elif test $ol_with_kerberos = auto ; then
2800                 ol_with_kerberos=yes
2801         fi
2802
2803 elif test $ol_enable_kbind = no -o $ol_enable_kpasswd = no ; then
2804         if test $ol_with_kerberos = auto ; then
2805                 ol_with_kerberos=no
2806         elif test $ol_with_kerberos != no ; then
2807                 echo "configure: warning: Kerberos detection enabled unnecessarily" 1>&2;
2808                 ol_with_kerberos=no
2809         fi
2810 fi
2811
2812 if test $ol_enable_spasswd = yes ; then
2813         if test $ol_with_cyrus_sasl = no ; then
2814                 { echo "configure: error: options require --with-cyrus-sasl" 1>&2; exit 1; }
2815         fi
2816         ol_with_cyrus_sasl=yes
2817 fi
2818
2819 echo "$ac_t""done" 1>&6
2820
2821 LDAP_LIBS=
2822 LDBM_LIBS=
2823 LTHREAD_LIBS=
2824 LUTIL_LIBS=
2825
2826 SLAPD_LIBS=
2827 SLURPD_LIBS=
2828
2829 BUILD_SLAPD=no
2830 BUILD_SLURPD=no
2831
2832 BUILD_THREAD=no
2833
2834 BUILD_SLAPI=no
2835 SLAPD_SLAPI_DEPEND=
2836
2837 BUILD_BDB=no
2838 BUILD_DNSSRV=no
2839 BUILD_HDB=no
2840 BUILD_LDAP=no
2841 BUILD_LDBM=no
2842 BUILD_META=no
2843 BUILD_MONITOR=no
2844 BUILD_CACHE=no
2845 BUILD_NULL=no
2846 BUILD_PASSWD=no
2847 BUILD_PERL=no
2848 BUILD_SHELL=no
2849 BUILD_SQL=no
2850 BUILD_TCL=no
2851
2852 BUILD_BDB_DYNAMIC=static
2853 BUILD_DNSSRV_DYNAMIC=static
2854 BUILD_HDB_DYNAMIC=static
2855 BUILD_LDAP_DYNAMIC=static
2856 BUILD_LDBM_DYNAMIC=static
2857 BUILD_META_DYNAMIC=static
2858 BUILD_MONITOR_DYNAMIC=static
2859 BUILD_NULL_DYNAMIC=static
2860 BUILD_PASSWD_DYNAMIC=static
2861 BUILD_PERL_DYNAMIC=static
2862 BUILD_SHELL_DYNAMIC=static
2863 BUILD_TCL_DYNAMIC=static
2864 BUILD_SQL_DYNAMIC=static
2865
2866 SLAPD_MODULES_LDFLAGS=
2867 SLAPD_MODULES_CPPFLAGS=
2868
2869 SLAPD_STATIC_BACKENDS=
2870 SLAPD_DYNAMIC_BACKENDS=
2871
2872 SLAPD_PERL_LDFLAGS=
2873 MOD_PERL_LDFLAGS=
2874 PERL_CPPFLAGS=
2875
2876 SLAPD_SQL_LDFLAGS=
2877 SLAPD_SQL_LIBS=
2878 SLAPD_SQL_INCLUDES=
2879
2880 MOD_TCL_LIB=
2881 KRB4_LIBS=
2882 KRB5_LIBS=
2883 SASL_LIBS=
2884 TERMCAP_LIBS=
2885 TLS_LIBS=
2886 MODULES_LIBS=
2887 SLAPI_LIBS=
2888 LIBSLAPI=
2889 LIBSLAPITOOLS=
2890 AUTH_LIBS=
2891
2892 SLAPD_SLP_LIBS=
2893
2894
2895 # Find a good install program.  We prefer a C program (faster),
2896 # so one script is as good as another.  But avoid the broken or
2897 # incompatible versions:
2898 # SysV /etc/install, /usr/sbin/install
2899 # SunOS /usr/etc/install
2900 # IRIX /sbin/install
2901 # AIX /bin/install
2902 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
2903 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
2904 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2905 # ./install, which can be erroneously created by make from ./install.sh.
2906 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
2907 echo "configure:2908: checking for a BSD compatible install" >&5
2908 if test -z "$INSTALL"; then
2909 if eval "test \"\${ac_cv_path_install+set}\" = set"; then
2910   echo $ac_n "(cached) $ac_c" 1>&6
2911 else
2912     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
2913   for ac_dir in $PATH; do
2914     # Account for people who put trailing slashes in PATH elements.
2915     case "$ac_dir/" in
2916     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
2917     *)
2918       # OSF1 and SCO ODT 3.0 have their own names for install.
2919       # Don't use installbsd from OSF since it installs stuff as root
2920       # by default.
2921       for ac_prog in ginstall scoinst install; do
2922         if test -f $ac_dir/$ac_prog; then
2923           if test $ac_prog = install &&
2924             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
2925             # AIX install.  It has an incompatible calling convention.
2926             :
2927           elif test $ac_prog = install &&
2928             grep pwplus $ac_dir/$ac_prog >/dev/null 2>&1; then
2929             # program-specific install script used by HP pwplus--don't use.
2930             :
2931           else
2932             ac_cv_path_install="$ac_dir/$ac_prog -c"
2933             break 2
2934           fi
2935         fi
2936       done
2937       ;;
2938     esac
2939   done
2940   IFS="$ac_save_IFS"
2941
2942 fi
2943   if test "${ac_cv_path_install+set}" = set; then
2944     INSTALL="$ac_cv_path_install"
2945   else
2946     # As a last resort, use the slow shell script.  We don't cache a
2947     # path for INSTALL within a source directory, because that will
2948     # break other packages using the cache if that directory is
2949     # removed, or if the path is relative.
2950     INSTALL="$ac_install_sh"
2951   fi
2952 fi
2953 echo "$ac_t""$INSTALL" 1>&6
2954
2955 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2956 # It thinks the first close brace ends the variable substitution.
2957 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2958
2959 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
2960
2961 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
2962
2963
2964 cat >> confdefs.h <<\EOF
2965 #define HAVE_MKVERSION 1
2966 EOF
2967
2968
2969
2970
2971 ol_aix_threads=no
2972 case "$target" in
2973 *-*-aix*)       if test -z "$CC" ; then
2974                 case "$ol_with_threads" in
2975                 auto | yes |  posix) ol_aix_threads=yes ;;
2976                 esac
2977         fi
2978 ;;
2979 esac
2980
2981 if test $ol_aix_threads = yes ; then
2982         if test -z "${CC}" ; then
2983                 for ac_prog in cc_r xlc_r cc
2984 do
2985 # Extract the first word of "$ac_prog", so it can be a program name with args.
2986 set dummy $ac_prog; ac_word=$2
2987 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2988 echo "configure:2989: checking for $ac_word" >&5
2989 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2990   echo $ac_n "(cached) $ac_c" 1>&6
2991 else
2992   if test -n "$CC"; then
2993   ac_cv_prog_CC="$CC" # Let the user override the test.
2994 else
2995   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2996   ac_dummy="$PATH"
2997   for ac_dir in $ac_dummy; do
2998     test -z "$ac_dir" && ac_dir=.
2999     if test -f $ac_dir/$ac_word; then
3000       ac_cv_prog_CC="$ac_prog"
3001       break
3002     fi
3003   done
3004   IFS="$ac_save_ifs"
3005 fi
3006 fi
3007 CC="$ac_cv_prog_CC"
3008 if test -n "$CC"; then
3009   echo "$ac_t""$CC" 1>&6
3010 else
3011   echo "$ac_t""no" 1>&6
3012 fi
3013
3014 test -n "$CC" && break
3015 done
3016
3017
3018                 if test "$CC" = cc ; then
3019                                                 if test $ol_with_threads != auto ; then
3020                                 { echo "configure: error: --with-threads requires cc_r (or other suitable compiler) on AIX" 1>&2; exit 1; }
3021                         else
3022                                 echo "configure: warning: disabling threads, no cc_r on AIX" 1>&2
3023                         fi
3024                         ol_with_threads=no
3025                 fi
3026         fi
3027
3028         if test "${CC}" = "cc_r" -o "${CC}" = "xlc_r" ; then
3029                 ol_with_threads=posix
3030                 ol_cv_pthread_create=yes
3031         fi
3032 fi
3033
3034 if test -z "${CC}"; then
3035         for ac_prog in cc gcc
3036 do
3037 # Extract the first word of "$ac_prog", so it can be a program name with args.
3038 set dummy $ac_prog; ac_word=$2
3039 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3040 echo "configure:3041: checking for $ac_word" >&5
3041 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3042   echo $ac_n "(cached) $ac_c" 1>&6
3043 else
3044   if test -n "$CC"; then
3045   ac_cv_prog_CC="$CC" # Let the user override the test.
3046 else
3047   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3048   ac_dummy="$PATH"
3049   for ac_dir in $ac_dummy; do
3050     test -z "$ac_dir" && ac_dir=.
3051     if test -f $ac_dir/$ac_word; then
3052       ac_cv_prog_CC="$ac_prog"
3053       break
3054     fi
3055   done
3056   IFS="$ac_save_ifs"
3057 fi
3058 fi
3059 CC="$ac_cv_prog_CC"
3060 if test -n "$CC"; then
3061   echo "$ac_t""$CC" 1>&6
3062 else
3063   echo "$ac_t""no" 1>&6
3064 fi
3065
3066 test -n "$CC" && break
3067 done
3068 test -n "$CC" || CC="missing"
3069
3070
3071         if test "${CC}" = "missing" ; then
3072                 { echo "configure: error: Unable to locate cc(1) or suitable replacement.  Check PATH or set CC." 1>&2; exit 1; }
3073         fi
3074 fi
3075
3076 if test -z "${AR}"; then
3077         for ac_prog in ar gar
3078 do
3079 # Extract the first word of "$ac_prog", so it can be a program name with args.
3080 set dummy $ac_prog; ac_word=$2
3081 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3082 echo "configure:3083: checking for $ac_word" >&5
3083 if eval "test \"\${ac_cv_prog_AR+set}\" = set"; then
3084   echo $ac_n "(cached) $ac_c" 1>&6
3085 else
3086   if test -n "$AR"; then
3087   ac_cv_prog_AR="$AR" # Let the user override the test.
3088 else
3089   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3090   ac_dummy="$PATH"
3091   for ac_dir in $ac_dummy; do
3092     test -z "$ac_dir" && ac_dir=.
3093     if test -f $ac_dir/$ac_word; then
3094       ac_cv_prog_AR="$ac_prog"
3095       break
3096     fi
3097   done
3098   IFS="$ac_save_ifs"
3099 fi
3100 fi
3101 AR="$ac_cv_prog_AR"
3102 if test -n "$AR"; then
3103   echo "$ac_t""$AR" 1>&6
3104 else
3105   echo "$ac_t""no" 1>&6
3106 fi
3107
3108 test -n "$AR" && break
3109 done
3110 test -n "$AR" || AR="missing"
3111
3112
3113         if test "${AR}" = "missing" ; then
3114                 { echo "configure: error: Unable to locate ar(1) or suitable replacement.  Check PATH or set AR." 1>&2; exit 1; }
3115         fi
3116 fi
3117
3118
3119
3120 # Find the correct PATH separator.  Usually this is `:', but
3121 # DJGPP uses `;' like DOS.
3122 if test "X${PATH_SEPARATOR+set}" != Xset; then
3123   UNAME=${UNAME-`uname 2>/dev/null`}
3124   case X$UNAME in
3125     *-DOS) lt_cv_sys_path_separator=';' ;;
3126     *)     lt_cv_sys_path_separator=':' ;;
3127   esac
3128   PATH_SEPARATOR=$lt_cv_sys_path_separator
3129 fi
3130
3131 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
3132 echo "configure:3133: checking for Cygwin environment" >&5
3133 if eval "test \"\${ac_cv_cygwin+set}\" = set"; then
3134   echo $ac_n "(cached) $ac_c" 1>&6
3135 else
3136   cat > conftest.$ac_ext <<EOF
3137 #line 3138 "configure"
3138 #include "confdefs.h"
3139
3140 int main() {
3141
3142 #ifndef __CYGWIN__
3143 #define __CYGWIN__ __CYGWIN32__
3144 #endif
3145 return __CYGWIN__;
3146 ; return 0; }
3147 EOF
3148 if { (eval echo configure:3149: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3149   rm -rf conftest*
3150   ac_cv_cygwin=yes
3151 else
3152   echo "configure: failed program was:" >&5
3153   cat conftest.$ac_ext >&5
3154   rm -rf conftest*
3155   ac_cv_cygwin=no
3156 fi
3157 rm -f conftest*
3158 fi
3159
3160 echo "$ac_t""$ac_cv_cygwin" 1>&6
3161 CYGWIN=
3162 test "$ac_cv_cygwin" = yes && CYGWIN=yes
3163 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
3164 echo "configure:3165: checking for mingw32 environment" >&5
3165 if eval "test \"\${ac_cv_mingw32+set}\" = set"; then
3166   echo $ac_n "(cached) $ac_c" 1>&6
3167 else
3168   cat > conftest.$ac_ext <<EOF
3169 #line 3170 "configure"
3170 #include "confdefs.h"
3171
3172 int main() {
3173 return __MINGW32__;
3174 ; return 0; }
3175 EOF
3176 if { (eval echo configure:3177: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3177   rm -rf conftest*
3178   ac_cv_mingw32=yes
3179 else
3180   echo "configure: failed program was:" >&5
3181   cat conftest.$ac_ext >&5
3182   rm -rf conftest*
3183   ac_cv_mingw32=no
3184 fi
3185 rm -f conftest*
3186 fi
3187
3188 echo "$ac_t""$ac_cv_mingw32" 1>&6
3189 MINGW32=
3190 test "$ac_cv_mingw32" = yes && MINGW32=yes
3191 echo $ac_n "checking for EMX OS/2 environment""... $ac_c" 1>&6
3192 echo "configure:3193: checking for EMX OS/2 environment" >&5
3193 if eval "test \"\${ac_cv_emxos2+set}\" = set"; then
3194   echo $ac_n "(cached) $ac_c" 1>&6
3195 else
3196   cat > conftest.$ac_ext <<EOF
3197 #line 3198 "configure"
3198 #include "confdefs.h"
3199
3200 int main() {
3201 return __EMX__;
3202 ; return 0; }
3203 EOF
3204 if { (eval echo configure:3205: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3205   rm -rf conftest*
3206   ac_cv_emxos2=yes
3207 else
3208   echo "configure: failed program was:" >&5
3209   cat conftest.$ac_ext >&5
3210   rm -rf conftest*
3211   ac_cv_emxos2=no
3212 fi
3213 rm -f conftest*
3214 fi
3215
3216 echo "$ac_t""$ac_cv_emxos2" 1>&6
3217 EMXOS2=
3218 test "$ac_cv_emxos2" = yes && EMXOS2=yes
3219 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
3220 echo "configure:3221: checking how to run the C preprocessor" >&5
3221 # On Suns, sometimes $CPP names a directory.
3222 if test -n "$CPP" && test -d "$CPP"; then
3223   CPP=
3224 fi
3225 if test -z "$CPP"; then
3226 if eval "test \"\${ac_cv_prog_CPP+set}\" = set"; then
3227   echo $ac_n "(cached) $ac_c" 1>&6
3228 else
3229     # This must be in double quotes, not single quotes, because CPP may get
3230   # substituted into the Makefile and "${CC-cc}" will confuse make.
3231   CPP="${CC-cc} -E"
3232   # On the NeXT, cc -E runs the code through the compiler's parser,
3233   # not just through cpp.
3234   cat > conftest.$ac_ext <<EOF
3235 #line 3236 "configure"
3236 #include "confdefs.h"
3237 #include <assert.h>
3238 Syntax Error
3239 EOF
3240 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3241 { (eval echo configure:3242: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3242 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3243 if test -z "$ac_err"; then
3244   :
3245 else
3246   echo "$ac_err" >&5
3247   echo "configure: failed program was:" >&5
3248   cat conftest.$ac_ext >&5
3249   rm -rf conftest*
3250   CPP="${CC-cc} -E -traditional-cpp"
3251   cat > conftest.$ac_ext <<EOF
3252 #line 3253 "configure"
3253 #include "confdefs.h"
3254 #include <assert.h>
3255 Syntax Error
3256 EOF
3257 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3258 { (eval echo configure:3259: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3259 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3260 if test -z "$ac_err"; then
3261   :
3262 else
3263   echo "$ac_err" >&5
3264   echo "configure: failed program was:" >&5
3265   cat conftest.$ac_ext >&5
3266   rm -rf conftest*
3267   CPP="${CC-cc} -nologo -E"
3268   cat > conftest.$ac_ext <<EOF
3269 #line 3270 "configure"
3270 #include "confdefs.h"
3271 #include <assert.h>
3272 Syntax Error
3273 EOF
3274 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3275 { (eval echo configure:3276: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3276 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3277 if test -z "$ac_err"; then
3278   :
3279 else
3280   echo "$ac_err" >&5
3281   echo "configure: failed program was:" >&5
3282   cat conftest.$ac_ext >&5
3283   rm -rf conftest*
3284   CPP=/lib/cpp
3285 fi
3286 rm -f conftest*
3287 fi
3288 rm -f conftest*
3289 fi
3290 rm -f conftest*
3291   ac_cv_prog_CPP="$CPP"
3292 fi
3293   CPP="$ac_cv_prog_CPP"
3294 else
3295   ac_cv_prog_CPP="$CPP"
3296 fi
3297 echo "$ac_t""$CPP" 1>&6
3298
3299 # Check whether --enable-fast-install or --disable-fast-install was given.
3300 if test "${enable_fast_install+set}" = set; then
3301   enableval="$enable_fast_install"
3302   p=${PACKAGE-default}
3303 case $enableval in
3304 yes) enable_fast_install=yes ;;
3305 no) enable_fast_install=no ;;
3306 *)
3307   enable_fast_install=no
3308   # Look at the argument we got.  We use all the common list separators.
3309   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
3310   for pkg in $enableval; do
3311     if test "X$pkg" = "X$p"; then
3312       enable_fast_install=yes
3313     fi
3314   done
3315   IFS="$ac_save_ifs"
3316   ;;
3317 esac
3318 else
3319   enable_fast_install=yes
3320 fi
3321
3322 # Extract the first word of "gcc", so it can be a program name with args.
3323 set dummy gcc; ac_word=$2
3324 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3325 echo "configure:3326: checking for $ac_word" >&5
3326 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3327   echo $ac_n "(cached) $ac_c" 1>&6
3328 else
3329   if test -n "$CC"; then
3330   ac_cv_prog_CC="$CC" # Let the user override the test.
3331 else
3332   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3333   ac_dummy="$PATH"
3334   for ac_dir in $ac_dummy; do
3335     test -z "$ac_dir" && ac_dir=.
3336     if test -f $ac_dir/$ac_word; then
3337       ac_cv_prog_CC="gcc"
3338       break
3339     fi
3340   done
3341   IFS="$ac_save_ifs"
3342 fi
3343 fi
3344 CC="$ac_cv_prog_CC"
3345 if test -n "$CC"; then
3346   echo "$ac_t""$CC" 1>&6
3347 else
3348   echo "$ac_t""no" 1>&6
3349 fi
3350
3351 if test -z "$CC"; then
3352   # Extract the first word of "cc", so it can be a program name with args.
3353 set dummy cc; ac_word=$2
3354 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3355 echo "configure:3356: checking for $ac_word" >&5
3356 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3357   echo $ac_n "(cached) $ac_c" 1>&6
3358 else
3359   if test -n "$CC"; then
3360   ac_cv_prog_CC="$CC" # Let the user override the test.
3361 else
3362   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3363   ac_prog_rejected=no
3364   ac_dummy="$PATH"
3365   for ac_dir in $ac_dummy; do
3366     test -z "$ac_dir" && ac_dir=.
3367     if test -f $ac_dir/$ac_word; then
3368       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
3369         ac_prog_rejected=yes
3370         continue
3371       fi
3372       ac_cv_prog_CC="cc"
3373       break
3374     fi
3375   done
3376   IFS="$ac_save_ifs"
3377 if test $ac_prog_rejected = yes; then
3378   # We found a bogon in the path, so make sure we never use it.
3379   set dummy $ac_cv_prog_CC
3380   shift
3381   if test $# -gt 0; then
3382     # We chose a different compiler from the bogus one.
3383     # However, it has the same basename, so the bogon will be chosen
3384     # first if we set CC to just the basename; use the full file name.
3385     shift
3386     set dummy "$ac_dir/$ac_word" "$@"
3387     shift
3388     ac_cv_prog_CC="$@"
3389   fi
3390 fi
3391 fi
3392 fi
3393 CC="$ac_cv_prog_CC"
3394 if test -n "$CC"; then
3395   echo "$ac_t""$CC" 1>&6
3396 else
3397   echo "$ac_t""no" 1>&6
3398 fi
3399
3400   if test -z "$CC"; then
3401     case "`uname -s`" in
3402     *win32* | *WIN32* | *CYGWIN*)
3403       # Extract the first word of "cl", so it can be a program name with args.
3404 set dummy cl; ac_word=$2
3405 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3406 echo "configure:3407: checking for $ac_word" >&5
3407 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3408   echo $ac_n "(cached) $ac_c" 1>&6
3409 else
3410   if test -n "$CC"; then
3411   ac_cv_prog_CC="$CC" # Let the user override the test.
3412 else
3413   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3414   ac_dummy="$PATH"
3415   for ac_dir in $ac_dummy; do
3416     test -z "$ac_dir" && ac_dir=.
3417     if test -f $ac_dir/$ac_word; then
3418       ac_cv_prog_CC="cl"
3419       break
3420     fi
3421   done
3422   IFS="$ac_save_ifs"
3423 fi
3424 fi
3425 CC="$ac_cv_prog_CC"
3426 if test -n "$CC"; then
3427   echo "$ac_t""$CC" 1>&6
3428 else
3429   echo "$ac_t""no" 1>&6
3430 fi
3431  ;;
3432     esac
3433   fi
3434   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
3435 fi
3436
3437 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works""... $ac_c" 1>&6
3438 echo "configure:3439: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works" >&5
3439
3440 ac_ext=c
3441 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
3442 ac_cpp='$CPP $CPPFLAGS'
3443 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
3444 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
3445 cross_compiling=$ac_cv_prog_cc_cross
3446
3447 cat > conftest.$ac_ext << EOF
3448
3449 #line 3450 "configure"
3450 #include "confdefs.h"
3451
3452 main(){return(0);}
3453 EOF
3454 if { (eval echo configure:3455: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3455   ac_cv_prog_cc_works=yes
3456   # If we can't run a trivial program, we are probably using a cross compiler.
3457   if (./conftest; exit) 2>/dev/null; then
3458     ac_cv_prog_cc_cross=no
3459   else
3460     ac_cv_prog_cc_cross=yes
3461   fi
3462 else
3463   echo "configure: failed program was:" >&5
3464   cat conftest.$ac_ext >&5
3465   ac_cv_prog_cc_works=no
3466 fi
3467 rm -fr conftest*
3468 ac_ext=c
3469 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
3470 ac_cpp='$CPP $CPPFLAGS'
3471 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
3472 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
3473 cross_compiling=$ac_cv_prog_cc_cross
3474
3475 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
3476 if test $ac_cv_prog_cc_works = no; then
3477   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
3478 fi
3479 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
3480 echo "configure:3481: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler" >&5
3481 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
3482 cross_compiling=$ac_cv_prog_cc_cross
3483
3484 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
3485 echo "configure:3486: checking whether we are using GNU C" >&5
3486 if eval "test \"\${ac_cv_prog_gcc+set}\" = set"; then
3487   echo $ac_n "(cached) $ac_c" 1>&6
3488 else
3489   cat > conftest.c <<EOF
3490 #ifdef __GNUC__
3491   yes;
3492 #endif
3493 EOF
3494 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:3495: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
3495   ac_cv_prog_gcc=yes
3496 else
3497   ac_cv_prog_gcc=no
3498 fi
3499 fi
3500
3501 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
3502
3503 if test $ac_cv_prog_gcc = yes; then
3504   GCC=yes
3505 else
3506   GCC=
3507 fi
3508
3509 ac_test_CFLAGS="${CFLAGS+set}"
3510 ac_save_CFLAGS="$CFLAGS"
3511 CFLAGS=
3512 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
3513 echo "configure:3514: checking whether ${CC-cc} accepts -g" >&5
3514 if eval "test \"\${ac_cv_prog_cc_g+set}\" = set"; then
3515   echo $ac_n "(cached) $ac_c" 1>&6
3516 else
3517   echo 'void f(){}' > conftest.c
3518 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
3519   ac_cv_prog_cc_g=yes
3520 else
3521   ac_cv_prog_cc_g=no
3522 fi
3523 rm -f conftest*
3524
3525 fi
3526
3527 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
3528 if test "$ac_test_CFLAGS" = set; then
3529   CFLAGS="$ac_save_CFLAGS"
3530 elif test $ac_cv_prog_cc_g = yes; then
3531   if test "$GCC" = yes; then
3532     CFLAGS="-g -O2"
3533   else
3534     CFLAGS="-g"
3535   fi
3536 else
3537   if test "$GCC" = yes; then
3538     CFLAGS="-O2"
3539   else
3540     CFLAGS=
3541   fi
3542 fi
3543
3544 # Check whether --with-gnu-ld or --without-gnu-ld was given.
3545 if test "${with_gnu_ld+set}" = set; then
3546   withval="$with_gnu_ld"
3547   test "$withval" = no || with_gnu_ld=yes
3548 else
3549   with_gnu_ld=no
3550 fi
3551
3552 ac_prog=ld
3553 if test "$GCC" = yes; then
3554   # Check if gcc -print-prog-name=ld gives a path.
3555   echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
3556 echo "configure:3557: checking for ld used by GCC" >&5
3557   case $host in
3558   *-*-mingw*)
3559     # gcc leaves a trailing carriage return which upsets mingw
3560     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
3561   *)
3562     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
3563   esac
3564   case $ac_prog in
3565     # Accept absolute paths.
3566     [\\/]* | [A-Za-z]:[\\/]*)
3567       re_direlt='/[^/][^/]*/\.\./'
3568       # Canonicalize the path of ld
3569       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
3570       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
3571         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
3572       done
3573       test -z "$LD" && LD="$ac_prog"
3574       ;;
3575   "")
3576     # If it fails, then pretend we aren't using GCC.
3577     ac_prog=ld
3578     ;;
3579   *)
3580     # If it is relative, then search for the first ld in PATH.
3581     with_gnu_ld=unknown
3582     ;;
3583   esac
3584 elif test "$with_gnu_ld" = yes; then
3585   echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
3586 echo "configure:3587: checking for GNU ld" >&5
3587 else
3588   echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
3589 echo "configure:3590: checking for non-GNU ld" >&5
3590 fi
3591 if eval "test \"\${lt_cv_path_LD+set}\" = set"; then
3592   echo $ac_n "(cached) $ac_c" 1>&6
3593 else
3594   if test -z "$LD"; then
3595   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3596   for ac_dir in $PATH; do
3597     test -z "$ac_dir" && ac_dir=.
3598     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
3599       lt_cv_path_LD="$ac_dir/$ac_prog"
3600       # Check to see if the program is GNU ld.  I'd rather use --version,
3601       # but apparently some GNU ld's only accept -v.
3602       # Break only if it was the GNU/non-GNU ld that we prefer.
3603       if "$lt_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
3604         test "$with_gnu_ld" != no && break
3605       else
3606         test "$with_gnu_ld" != yes && break
3607       fi
3608     fi
3609   done
3610   IFS="$ac_save_ifs"
3611 else
3612   lt_cv_path_LD="$LD" # Let the user override the test with a path.
3613 fi
3614 fi
3615
3616 LD="$lt_cv_path_LD"
3617 if test -n "$LD"; then
3618   echo "$ac_t""$LD" 1>&6
3619 else
3620   echo "$ac_t""no" 1>&6
3621 fi
3622 test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
3623 echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
3624 echo "configure:3625: checking if the linker ($LD) is GNU ld" >&5
3625 if eval "test \"\${lt_cv_prog_gnu_ld+set}\" = set"; then
3626   echo $ac_n "(cached) $ac_c" 1>&6
3627 else
3628   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
3629 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
3630   lt_cv_prog_gnu_ld=yes
3631 else
3632   lt_cv_prog_gnu_ld=no
3633 fi
3634 fi
3635
3636 echo "$ac_t""$lt_cv_prog_gnu_ld" 1>&6
3637 with_gnu_ld=$lt_cv_prog_gnu_ld
3638
3639
3640 echo $ac_n "checking for $LD option to reload object files""... $ac_c" 1>&6
3641 echo "configure:3642: checking for $LD option to reload object files" >&5
3642 if eval "test \"\${lt_cv_ld_reload_flag+set}\" = set"; then
3643   echo $ac_n "(cached) $ac_c" 1>&6
3644 else
3645   lt_cv_ld_reload_flag='-r'
3646 fi
3647
3648 echo "$ac_t""$lt_cv_ld_reload_flag" 1>&6
3649 reload_flag=$lt_cv_ld_reload_flag
3650 test -n "$reload_flag" && reload_flag=" $reload_flag"
3651
3652 echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
3653 echo "configure:3654: checking for BSD-compatible nm" >&5
3654 if eval "test \"\${lt_cv_path_NM+set}\" = set"; then
3655   echo $ac_n "(cached) $ac_c" 1>&6
3656 else
3657   if test -n "$NM"; then
3658   # Let the user override the test.
3659   lt_cv_path_NM="$NM"
3660 else
3661   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3662   for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
3663     test -z "$ac_dir" && ac_dir=.
3664     tmp_nm=$ac_dir/${ac_tool_prefix}nm
3665     if test -f $tmp_nm || test -f $tmp_nm$ac_exeext ; then
3666       # Check to see if the nm accepts a BSD-compat flag.
3667       # Adding the `sed 1q' prevents false positives on HP-UX, which says:
3668       #   nm: unknown option "B" ignored
3669       # Tru64's nm complains that /dev/null is an invalid object file
3670       if ($tmp_nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then
3671         lt_cv_path_NM="$tmp_nm -B"
3672         break
3673       elif ($tmp_nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
3674         lt_cv_path_NM="$tmp_nm -p"
3675         break
3676       else
3677         lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
3678         continue # so that we can try to find one that supports BSD flags
3679       fi
3680     fi
3681   done
3682   IFS="$ac_save_ifs"
3683   test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
3684 fi
3685 fi
3686
3687 NM="$lt_cv_path_NM"
3688 echo "$ac_t""$NM" 1>&6
3689
3690 echo $ac_n "checking for a sed that does not truncate output""... $ac_c" 1>&6
3691 echo "configure:3692: checking for a sed that does not truncate output" >&5
3692 if eval "test \"\${lt_cv_path_SED+set}\" = set"; then
3693   echo $ac_n "(cached) $ac_c" 1>&6
3694 else
3695   # Loop through the user's path and test for sed and gsed.
3696 # Then use that list of sed's as ones to test for truncation.
3697 as_executable_p="test -f"
3698 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3699 for as_dir in $PATH
3700 do
3701   IFS=$as_save_IFS
3702   test -z "$as_dir" && as_dir=.
3703   for ac_prog in sed gsed; do
3704     for ac_exec_ext in '' $ac_executable_extensions; do
3705       if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
3706         _sed_list="$_sed_list $as_dir/$ac_prog$ac_exec_ext"
3707       fi
3708     done
3709   done
3710 done
3711
3712   # Create a temporary directory, and hook for its removal unless debugging.
3713 $debug ||
3714 {
3715   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
3716   trap '{ (exit 1); exit 1; }' 1 2 13 15
3717 }
3718
3719 # Create a (secure) tmp directory for tmp files.
3720 : ${TMPDIR=/tmp}
3721 {
3722   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/sedXXXXXX") 2>/dev/null` &&
3723   test -n "$tmp" && test -d "$tmp"
3724 }  ||
3725 {
3726   tmp=$TMPDIR/sed$$-$RANDOM
3727   (umask 077 && mkdir $tmp)
3728 } ||
3729 {
3730    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
3731    { (exit 1); exit 1; }
3732 }
3733   _max=0
3734   _count=0
3735   # Add /usr/xpg4/bin/sed as it is typically found on Solaris
3736   # along with /bin/sed that truncates output.
3737   for _sed in $_sed_list /usr/xpg4/bin/sed; do
3738     test ! -f ${_sed} && break
3739     cat /dev/null > "$tmp/sed.in"
3740     _count=0
3741     echo ${ECHO_N-$ac_n} "0123456789${ECHO_C-$ac_c}" >"$tmp/sed.in"
3742     # Check for GNU sed and select it if it is found.
3743     if "${_sed}" --version 2>&1 < /dev/null | egrep '(GNU)' > /dev/null; then
3744       lt_cv_path_SED=${_sed}
3745       break
3746     fi
3747     while true; do
3748       cat "$tmp/sed.in" "$tmp/sed.in" >"$tmp/sed.tmp"
3749       mv "$tmp/sed.tmp" "$tmp/sed.in"
3750       cp "$tmp/sed.in" "$tmp/sed.nl"
3751       echo >>"$tmp/sed.nl"
3752       ${_sed} -e 's/a$//' < "$tmp/sed.nl" >"$tmp/sed.out" || break
3753       cmp -s "$tmp/sed.out" "$tmp/sed.nl" || break
3754       # 40000 chars as input seems more than enough
3755       test $_count -gt 10 && break
3756       _count=`expr $_count + 1`
3757       if test $_count -gt $_max; then
3758         _max=$_count
3759         lt_cv_path_SED=$_sed
3760       fi
3761     done
3762   done
3763   rm -rf "$tmp"
3764
3765 fi
3766
3767 if test "X$SED" != "X"; then
3768   lt_cv_path_SED=$SED
3769 else
3770   SED=$lt_cv_path_SED
3771 fi
3772 echo "$ac_t""$SED" 1>&6
3773
3774 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
3775 echo "configure:3776: checking whether ln -s works" >&5
3776 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
3777   echo $ac_n "(cached) $ac_c" 1>&6
3778 else
3779   rm -f conftestdata
3780 if ln -s X conftestdata 2>/dev/null
3781 then
3782   rm -f conftestdata
3783   ac_cv_prog_LN_S="ln -s"
3784 else
3785   ac_cv_prog_LN_S=ln
3786 fi
3787 fi
3788 LN_S="$ac_cv_prog_LN_S"
3789 if test "$ac_cv_prog_LN_S" = "ln -s"; then
3790   echo "$ac_t""yes" 1>&6
3791 else
3792   echo "$ac_t""no" 1>&6
3793 fi
3794
3795 echo $ac_n "checking how to recognise dependent libraries""... $ac_c" 1>&6
3796 echo "configure:3797: checking how to recognise dependent libraries" >&5
3797 if eval "test \"\${lt_cv_deplibs_check_method+set}\" = set"; then
3798   echo $ac_n "(cached) $ac_c" 1>&6
3799 else
3800   lt_cv_file_magic_cmd='$MAGIC_CMD'
3801 lt_cv_file_magic_test_file=
3802 lt_cv_deplibs_check_method='unknown'
3803 # Need to set the preceding variable on all platforms that support
3804 # interlibrary dependencies.
3805 # 'none' -- dependencies not supported.
3806 # `unknown' -- same as none, but documents that we really don't know.
3807 # 'pass_all' -- all dependencies passed with no checks.
3808 # 'test_compile' -- check by making test program.
3809 # 'file_magic [[regex]]' -- check by looking for files in library path
3810 # which responds to the $file_magic_cmd with a given egrep regex.
3811 # If you have `file' or equivalent on your system and you're not sure
3812 # whether `pass_all' will *always* work, you probably want this one.
3813
3814 case $host_os in
3815 aix4* | aix5*)
3816   lt_cv_deplibs_check_method=pass_all
3817   ;;
3818
3819 beos*)
3820   lt_cv_deplibs_check_method=pass_all
3821   ;;
3822
3823 bsdi4*)
3824   lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
3825   lt_cv_file_magic_cmd='/usr/bin/file -L'
3826   lt_cv_file_magic_test_file=/shlib/libc.so
3827   ;;
3828
3829 cygwin* | mingw* | pw32*)
3830   lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
3831   lt_cv_file_magic_cmd='$OBJDUMP -f'
3832   ;;
3833
3834 darwin* | rhapsody*)
3835   lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library'
3836   lt_cv_file_magic_cmd='/usr/bin/file -L'
3837   case "$host_os" in
3838   rhapsody* | darwin1.[012])
3839     lt_cv_file_magic_test_file=`echo /System/Library/Frameworks/System.framework/Versions/*/System | head -1`
3840     ;;
3841   *) # Darwin 1.3 on
3842     lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
3843     ;;
3844   esac
3845   ;;
3846
3847 freebsd*)
3848   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3849     case $host_cpu in
3850     i*86 )
3851       # Not sure whether the presence of OpenBSD here was a mistake.
3852       # Let's accept both of them until this is cleared up.
3853       lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[3-9]86 (compact )?demand paged shared library'
3854       lt_cv_file_magic_cmd=/usr/bin/file
3855       lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3856       ;;
3857     esac
3858   else
3859     lt_cv_deplibs_check_method=pass_all
3860   fi
3861   ;;
3862
3863 gnu*)
3864   lt_cv_deplibs_check_method=pass_all
3865   ;;
3866
3867 hpux10.20*|hpux11*)
3868   lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library'
3869   lt_cv_file_magic_cmd=/usr/bin/file
3870   lt_cv_file_magic_test_file=/usr/lib/libc.sl
3871   ;;
3872
3873 irix5* | irix6* | nonstopux*)
3874   case $host_os in
3875   irix5* | nonstopux*)
3876     # this will be overridden with pass_all, but let us keep it just in case
3877     lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
3878     ;;
3879   *)
3880     case $LD in
3881     *-32|*"-32 ") libmagic=32-bit;;
3882     *-n32|*"-n32 ") libmagic=N32;;
3883     *-64|*"-64 ") libmagic=64-bit;;
3884     *) libmagic=never-match;;
3885     esac
3886     # this will be overridden with pass_all, but let us keep it just in case
3887     lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[1234] dynamic lib MIPS - version 1"
3888     ;;
3889   esac
3890   lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
3891   lt_cv_deplibs_check_method=pass_all
3892   ;;
3893
3894 # This must be Linux ELF.
3895 linux-gnu*)
3896   case $host_cpu in
3897   alpha* | hppa* | i*86 | mips | mipsel | powerpc* | sparc* | ia64*)
3898     lt_cv_deplibs_check_method=pass_all ;;
3899   *)
3900     # glibc up to 2.1.1 does not perform some relocations on ARM
3901     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;;
3902   esac
3903   lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
3904   ;;
3905
3906 netbsd*)
3907   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3908     lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
3909   else
3910     lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so$'
3911   fi
3912   ;;
3913
3914 newos6*)
3915   lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
3916   lt_cv_file_magic_cmd=/usr/bin/file
3917   lt_cv_file_magic_test_file=/usr/lib/libnls.so
3918   ;;
3919
3920 openbsd*)
3921   lt_cv_file_magic_cmd=/usr/bin/file
3922   lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3923   if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
3924     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB shared object'
3925   else
3926     lt_cv_deplibs_check_method='file_magic OpenBSD.* shared library'
3927   fi
3928   ;;
3929
3930 osf3* | osf4* | osf5*)
3931   # this will be overridden with pass_all, but let us keep it just in case
3932   lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
3933   lt_cv_file_magic_test_file=/shlib/libc.so
3934   lt_cv_deplibs_check_method=pass_all
3935   ;;
3936
3937 sco3.2v5*)
3938   lt_cv_deplibs_check_method=pass_all
3939   ;;
3940
3941 solaris*)
3942   lt_cv_deplibs_check_method=pass_all
3943   lt_cv_file_magic_test_file=/lib/libc.so
3944   ;;
3945
3946 sysv5uw[78]* | sysv4*uw2*)
3947   lt_cv_deplibs_check_method=pass_all
3948   ;;
3949
3950 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
3951   case $host_vendor in
3952   motorola)
3953     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]'
3954     lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
3955     ;;
3956   ncr)
3957     lt_cv_deplibs_check_method=pass_all
3958     ;;
3959   sequent)
3960     lt_cv_file_magic_cmd='/bin/file'
3961     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'
3962     ;;
3963   sni)
3964     lt_cv_file_magic_cmd='/bin/file'
3965     lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib"
3966     lt_cv_file_magic_test_file=/lib/libc.so
3967     ;;
3968   siemens)
3969     lt_cv_deplibs_check_method=pass_all
3970     ;;
3971   esac
3972   ;;
3973 esac
3974
3975 fi
3976
3977 echo "$ac_t""$lt_cv_deplibs_check_method" 1>&6
3978 file_magic_cmd=$lt_cv_file_magic_cmd
3979 deplibs_check_method=$lt_cv_deplibs_check_method
3980
3981 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
3982 echo "configure:3983: checking for object suffix" >&5
3983 if eval "test \"\${ac_cv_objext+set}\" = set"; then
3984   echo $ac_n "(cached) $ac_c" 1>&6
3985 else
3986   rm -f conftest*
3987 echo 'int i = 1;' > conftest.$ac_ext
3988 if { (eval echo configure:3989: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3989   for ac_file in conftest.*; do
3990     case $ac_file in
3991     *.c) ;;
3992     *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
3993     esac
3994   done
3995 else
3996   { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
3997 fi
3998 rm -f conftest*
3999 fi
4000
4001 echo "$ac_t""$ac_cv_objext" 1>&6
4002 OBJEXT=$ac_cv_objext
4003 ac_objext=$ac_cv_objext
4004
4005
4006
4007
4008 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
4009 echo "configure:4010: checking for executable suffix" >&5
4010 if eval "test \"\${ac_cv_exeext+set}\" = set"; then
4011   echo $ac_n "(cached) $ac_c" 1>&6
4012 else
4013   if test "$CYGWIN" = yes || test "$MINGW32" = yes || test "$EMXOS2" = yes; then
4014   ac_cv_exeext=.exe
4015 else
4016   rm -f conftest*
4017   echo 'int main () { return 0; }' > conftest.$ac_ext
4018   ac_cv_exeext=
4019   if { (eval echo configure:4020: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
4020     for file in conftest.*; do
4021       case $file in
4022       *.c | *.C | *.o | *.obj | *.xcoff) ;;
4023       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
4024       esac
4025     done
4026   else
4027     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
4028   fi
4029   rm -f conftest*
4030   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
4031 fi
4032 fi
4033
4034 EXEEXT=""
4035 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
4036 echo "$ac_t""${ac_cv_exeext}" 1>&6
4037 ac_exeext=$EXEEXT
4038
4039 if test $host != $build; then
4040   ac_tool_prefix=${host_alias}-
4041 else
4042   ac_tool_prefix=
4043 fi
4044
4045
4046
4047
4048 # Check for command to grab the raw symbol name followed by C symbol from nm.
4049 echo $ac_n "checking command to parse $NM output""... $ac_c" 1>&6
4050 echo "configure:4051: checking command to parse $NM output" >&5
4051 if eval "test \"\${lt_cv_sys_global_symbol_pipe+set}\" = set"; then
4052   echo $ac_n "(cached) $ac_c" 1>&6
4053 else
4054   
4055 # These are sane defaults that work on at least a few old systems.
4056 # [They come from Ultrix.  What could be older than Ultrix?!! ;)]
4057
4058 # Character class describing NM global symbol codes.
4059 symcode='[BCDEGRST]'
4060
4061 # Regexp to match symbols that can be accessed directly from C.
4062 sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
4063
4064 # Transform the above into a raw symbol and a C symbol.
4065 symxfrm='\1 \2\3 \3'
4066
4067 # Transform an extracted symbol line into a proper C declaration
4068 lt_cv_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern char \1;/p'"
4069
4070 # Transform an extracted symbol line into symbol name and symbol address
4071 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'"
4072
4073 # Define system-specific variables.
4074 case $host_os in
4075 aix*)
4076   symcode='[BCDT]'
4077   ;;
4078 cygwin* | mingw* | pw32*)
4079   symcode='[ABCDGISTW]'
4080   ;;
4081 hpux*) # Its linker distinguishes data from code symbols
4082   lt_cv_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern char \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
4083   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'"
4084   ;;
4085 irix* | nonstopux*)
4086   symcode='[BCDEGRST]'
4087   ;;
4088 osf*)
4089   symcode='[BCDEGQRST]'
4090   ;;
4091 solaris* | sysv5*)
4092   symcode='[BDT]'
4093   ;;
4094 sysv4)
4095   symcode='[DFNSTU]'
4096   ;;
4097 esac
4098
4099 # Handle CRLF in mingw tool chain
4100 opt_cr=
4101 case $host_os in
4102 mingw*)
4103   opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
4104   ;;
4105 esac
4106
4107 # If we're using GNU nm, then use its standard symbol codes.
4108 if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then
4109   symcode='[ABCDGISTW]'
4110 fi
4111
4112 # Try without a prefix undercore, then with it.
4113 for ac_symprfx in "" "_"; do
4114
4115   # Write the raw and C identifiers.
4116 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[         ]\($symcode$symcode*\)[         ][      ]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'"
4117
4118   # Check to see that the pipe works correctly.
4119   pipe_works=no
4120   rm -f conftest*
4121   cat > conftest.$ac_ext <<EOF
4122 #ifdef __cplusplus
4123 extern "C" {
4124 #endif
4125 char nm_test_var;
4126 void nm_test_func(){}
4127 #ifdef __cplusplus
4128 }
4129 #endif
4130 int main(){nm_test_var='a';nm_test_func();return(0);}
4131 EOF
4132
4133   if { (eval echo configure:4134: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4134     # Now try to grab the symbols.
4135     nlist=conftest.nm
4136     if { (eval echo configure:4137: \"$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
4137       # Try sorting and uniquifying the output.
4138       if sort "$nlist" | uniq > "$nlist"T; then
4139         mv -f "$nlist"T "$nlist"
4140       else
4141         rm -f "$nlist"T
4142       fi
4143
4144       # Make sure that we snagged all the symbols we need.
4145       if egrep ' nm_test_var$' "$nlist" >/dev/null; then
4146         if egrep ' nm_test_func$' "$nlist" >/dev/null; then
4147           cat <<EOF > conftest.$ac_ext
4148 #ifdef __cplusplus
4149 extern "C" {
4150 #endif
4151
4152 EOF
4153           # Now generate the symbol file.
4154           eval "$lt_cv_global_symbol_to_cdecl"' < "$nlist" >> conftest.$ac_ext'
4155
4156           cat <<EOF >> conftest.$ac_ext
4157 #if defined (__STDC__) && __STDC__
4158 # define lt_ptr void *
4159 #else
4160 # define lt_ptr char *
4161 # define const
4162 #endif
4163
4164 /* The mapping between symbol names and symbols. */
4165 const struct {
4166   const char *name;
4167   lt_ptr address;
4168 }
4169 lt_preloaded_symbols[] =
4170 {
4171 EOF
4172           sed "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (lt_ptr) \&\2},/" < "$nlist" >> conftest.$ac_ext
4173           cat <<\EOF >> conftest.$ac_ext
4174   {0, (lt_ptr) 0}
4175 };
4176
4177 #ifdef __cplusplus
4178 }
4179 #endif
4180 EOF
4181           # Now try linking the two files.
4182           mv conftest.$ac_objext conftstm.$ac_objext
4183           save_LIBS="$LIBS"
4184           save_CFLAGS="$CFLAGS"
4185           LIBS="conftstm.$ac_objext"
4186           CFLAGS="$CFLAGS$no_builtin_flag"
4187           if { (eval echo configure:4188: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest$ac_exeext; then
4188             pipe_works=yes
4189           fi
4190           LIBS="$save_LIBS"
4191           CFLAGS="$save_CFLAGS"
4192         else
4193           echo "cannot find nm_test_func in $nlist" >&5
4194         fi
4195       else
4196         echo "cannot find nm_test_var in $nlist" >&5
4197       fi
4198     else
4199       echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5
4200     fi
4201   else
4202     echo "$progname: failed program was:" >&5
4203     cat conftest.$ac_ext >&5
4204   fi
4205   rm -f conftest* conftst*
4206
4207   # Do not use the global_symbol_pipe unless it works.
4208   if test "$pipe_works" = yes; then
4209     break
4210   else
4211     lt_cv_sys_global_symbol_pipe=
4212   fi
4213 done
4214
4215 fi
4216
4217 global_symbol_pipe="$lt_cv_sys_global_symbol_pipe"
4218 if test -z "$lt_cv_sys_global_symbol_pipe"; then
4219   global_symbol_to_cdecl=
4220   global_symbol_to_c_name_address=
4221 else
4222   global_symbol_to_cdecl="$lt_cv_global_symbol_to_cdecl"
4223   global_symbol_to_c_name_address="$lt_cv_global_symbol_to_c_name_address"
4224 fi
4225 if test -z "$global_symbol_pipe$global_symbol_to_cdec$global_symbol_to_c_name_address";
4226 then
4227   echo "$ac_t""failed" 1>&6
4228 else
4229   echo "$ac_t""ok" 1>&6
4230 fi
4231
4232 for ac_hdr in dlfcn.h
4233 do
4234 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4235 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4236 echo "configure:4237: checking for $ac_hdr" >&5
4237 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
4238   echo $ac_n "(cached) $ac_c" 1>&6
4239 else
4240   cat > conftest.$ac_ext <<EOF
4241 #line 4242 "configure"
4242 #include "confdefs.h"
4243 #include <$ac_hdr>
4244 EOF
4245 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4246 { (eval echo configure:4247: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4247 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4248 if test -z "$ac_err"; then
4249   rm -rf conftest*
4250   eval "ac_cv_header_$ac_safe=yes"
4251 else
4252   echo "$ac_err" >&5
4253   echo "configure: failed program was:" >&5
4254   cat conftest.$ac_ext >&5
4255   rm -rf conftest*
4256   eval "ac_cv_header_$ac_safe=no"
4257 fi
4258 rm -f conftest*
4259 fi
4260 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4261   echo "$ac_t""yes" 1>&6
4262     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4263   cat >> confdefs.h <<EOF
4264 #define $ac_tr_hdr 1
4265 EOF
4266  
4267 else
4268   echo "$ac_t""no" 1>&6
4269 fi
4270 done
4271
4272
4273
4274
4275
4276
4277 # Only perform the check for file, if the check method requires it
4278 case $deplibs_check_method in
4279 file_magic*)
4280   if test "$file_magic_cmd" = '$MAGIC_CMD'; then
4281     echo $ac_n "checking for ${ac_tool_prefix}file""... $ac_c" 1>&6
4282 echo "configure:4283: checking for ${ac_tool_prefix}file" >&5
4283 if eval "test \"\${lt_cv_path_MAGIC_CMD+set}\" = set"; then
4284   echo $ac_n "(cached) $ac_c" 1>&6
4285 else
4286   case $MAGIC_CMD in
4287   /*)
4288   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
4289   ;;
4290   ?:/*)
4291   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
4292   ;;
4293   *)
4294   ac_save_MAGIC_CMD="$MAGIC_CMD"
4295   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4296   ac_dummy="/usr/bin:$PATH"
4297   for ac_dir in $ac_dummy; do
4298     test -z "$ac_dir" && ac_dir=.
4299     if test -f $ac_dir/${ac_tool_prefix}file; then
4300       lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file"
4301       if test -n "$file_magic_test_file"; then
4302         case $deplibs_check_method in
4303         "file_magic "*)
4304           file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
4305           MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4306           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
4307             egrep "$file_magic_regex" > /dev/null; then
4308             :
4309           else
4310             cat <<EOF 1>&2
4311
4312 *** Warning: the command libtool uses to detect shared libraries,
4313 *** $file_magic_cmd, produces output that libtool cannot recognize.
4314 *** The result is that libtool may fail to recognize shared libraries
4315 *** as such.  This will affect the creation of libtool libraries that
4316 *** depend on shared libraries, but programs linked with such libtool
4317 *** libraries will work regardless of this problem.  Nevertheless, you
4318 *** may want to report the problem to your system manager and/or to
4319 *** bug-libtool@gnu.org
4320
4321 EOF
4322           fi ;;
4323         esac
4324       fi
4325       break
4326     fi
4327   done
4328   IFS="$ac_save_ifs"
4329   MAGIC_CMD="$ac_save_MAGIC_CMD"
4330   ;;
4331 esac
4332 fi
4333
4334 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4335 if test -n "$MAGIC_CMD"; then
4336   echo "$ac_t""$MAGIC_CMD" 1>&6
4337 else
4338   echo "$ac_t""no" 1>&6
4339 fi
4340
4341 if test -z "$lt_cv_path_MAGIC_CMD"; then
4342   if test -n "$ac_tool_prefix"; then
4343     echo $ac_n "checking for file""... $ac_c" 1>&6
4344 echo "configure:4345: checking for file" >&5
4345 if eval "test \"\${lt_cv_path_MAGIC_CMD+set}\" = set"; then
4346   echo $ac_n "(cached) $ac_c" 1>&6
4347 else
4348   case $MAGIC_CMD in
4349   /*)
4350   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
4351   ;;
4352   ?:/*)
4353   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
4354   ;;
4355   *)
4356   ac_save_MAGIC_CMD="$MAGIC_CMD"
4357   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4358   ac_dummy="/usr/bin:$PATH"
4359   for ac_dir in $ac_dummy; do
4360     test -z "$ac_dir" && ac_dir=.
4361     if test -f $ac_dir/file; then
4362       lt_cv_path_MAGIC_CMD="$ac_dir/file"
4363       if test -n "$file_magic_test_file"; then
4364         case $deplibs_check_method in
4365         "file_magic "*)
4366           file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
4367           MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4368           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
4369             egrep "$file_magic_regex" > /dev/null; then
4370             :
4371           else
4372             cat <<EOF 1>&2
4373
4374 *** Warning: the command libtool uses to detect shared libraries,
4375 *** $file_magic_cmd, produces output that libtool cannot recognize.
4376 *** The result is that libtool may fail to recognize shared libraries
4377 *** as such.  This will affect the creation of libtool libraries that
4378 *** depend on shared libraries, but programs linked with such libtool
4379 *** libraries will work regardless of this problem.  Nevertheless, you
4380 *** may want to report the problem to your system manager and/or to
4381 *** bug-libtool@gnu.org
4382
4383 EOF
4384           fi ;;
4385         esac
4386       fi
4387       break
4388     fi
4389   done
4390   IFS="$ac_save_ifs"
4391   MAGIC_CMD="$ac_save_MAGIC_CMD"
4392   ;;
4393 esac
4394 fi
4395
4396 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4397 if test -n "$MAGIC_CMD"; then
4398   echo "$ac_t""$MAGIC_CMD" 1>&6
4399 else
4400   echo "$ac_t""no" 1>&6
4401 fi
4402
4403   else
4404     MAGIC_CMD=:
4405   fi
4406 fi
4407
4408   fi
4409   ;;
4410 esac
4411
4412 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4413 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
4414 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4415 echo "configure:4416: checking for $ac_word" >&5
4416 if eval "test \"\${ac_cv_prog_RANLIB+set}\" = set"; then
4417   echo $ac_n "(cached) $ac_c" 1>&6
4418 else
4419   if test -n "$RANLIB"; then
4420   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4421 else
4422   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4423   ac_dummy="$PATH"
4424   for ac_dir in $ac_dummy; do
4425     test -z "$ac_dir" && ac_dir=.
4426     if test -f $ac_dir/$ac_word; then
4427       ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4428       break
4429     fi
4430   done
4431   IFS="$ac_save_ifs"
4432 fi
4433 fi
4434 RANLIB="$ac_cv_prog_RANLIB"
4435 if test -n "$RANLIB"; then
4436   echo "$ac_t""$RANLIB" 1>&6
4437 else
4438   echo "$ac_t""no" 1>&6
4439 fi
4440
4441
4442 if test -z "$ac_cv_prog_RANLIB"; then
4443 if test -n "$ac_tool_prefix"; then
4444   # Extract the first word of "ranlib", so it can be a program name with args.
4445 set dummy ranlib; ac_word=$2
4446 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4447 echo "configure:4448: checking for $ac_word" >&5
4448 if eval "test \"\${ac_cv_prog_RANLIB+set}\" = set"; then
4449   echo $ac_n "(cached) $ac_c" 1>&6
4450 else
4451   if test -n "$RANLIB"; then
4452   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4453 else
4454   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4455   ac_dummy="$PATH"
4456   for ac_dir in $ac_dummy; do
4457     test -z "$ac_dir" && ac_dir=.
4458     if test -f $ac_dir/$ac_word; then
4459       ac_cv_prog_RANLIB="ranlib"
4460       break
4461     fi
4462   done
4463   IFS="$ac_save_ifs"
4464   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
4465 fi
4466 fi
4467 RANLIB="$ac_cv_prog_RANLIB"
4468 if test -n "$RANLIB"; then
4469   echo "$ac_t""$RANLIB" 1>&6
4470 else
4471   echo "$ac_t""no" 1>&6
4472 fi
4473
4474 else
4475   RANLIB=":"
4476 fi
4477 fi
4478
4479 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
4480 set dummy ${ac_tool_prefix}strip; ac_word=$2
4481 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4482 echo "configure:4483: checking for $ac_word" >&5
4483 if eval "test \"\${ac_cv_prog_STRIP+set}\" = set"; then
4484   echo $ac_n "(cached) $ac_c" 1>&6
4485 else
4486   if test -n "$STRIP"; then
4487   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
4488 else
4489   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4490   ac_dummy="$PATH"
4491   for ac_dir in $ac_dummy; do
4492     test -z "$ac_dir" && ac_dir=.
4493     if test -f $ac_dir/$ac_word; then
4494       ac_cv_prog_STRIP="${ac_tool_prefix}strip"
4495       break
4496     fi
4497   done
4498   IFS="$ac_save_ifs"
4499 fi
4500 fi
4501 STRIP="$ac_cv_prog_STRIP"
4502 if test -n "$STRIP"; then
4503   echo "$ac_t""$STRIP" 1>&6
4504 else
4505   echo "$ac_t""no" 1>&6
4506 fi
4507
4508
4509 if test -z "$ac_cv_prog_STRIP"; then
4510 if test -n "$ac_tool_prefix"; then
4511   # Extract the first word of "strip", so it can be a program name with args.
4512 set dummy strip; ac_word=$2
4513 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4514 echo "configure:4515: checking for $ac_word" >&5
4515 if eval "test \"\${ac_cv_prog_STRIP+set}\" = set"; then
4516   echo $ac_n "(cached) $ac_c" 1>&6
4517 else
4518   if test -n "$STRIP"; then
4519   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
4520 else
4521   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4522   ac_dummy="$PATH"
4523   for ac_dir in $ac_dummy; do
4524     test -z "$ac_dir" && ac_dir=.
4525     if test -f $ac_dir/$ac_word; then
4526       ac_cv_prog_STRIP="strip"
4527       break
4528     fi
4529   done
4530   IFS="$ac_save_ifs"
4531   test -z "$ac_cv_prog_STRIP" && ac_cv_prog_STRIP=":"
4532 fi
4533 fi
4534 STRIP="$ac_cv_prog_STRIP"
4535 if test -n "$STRIP"; then
4536   echo "$ac_t""$STRIP" 1>&6
4537 else
4538   echo "$ac_t""no" 1>&6
4539 fi
4540
4541 else
4542   STRIP=":"
4543 fi
4544 fi
4545
4546
4547 enable_dlopen=yes
4548 enable_win32_dll=yes
4549
4550 # Check whether --enable-libtool-lock or --disable-libtool-lock was given.
4551 if test "${enable_libtool_lock+set}" = set; then
4552   enableval="$enable_libtool_lock"
4553   :
4554 fi
4555
4556 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
4557
4558 # Some flags need to be propagated to the compiler or linker for good
4559 # libtool support.
4560 case $host in
4561 *-*-irix6*)
4562   # Find out which ABI we are using.
4563   echo '#line 4564 "configure"' > conftest.$ac_ext
4564   if { (eval echo configure:4565: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4565     case `/usr/bin/file conftest.$ac_objext` in
4566     *32-bit*)
4567       LD="${LD-ld} -32"
4568       ;;
4569     *N32*)
4570       LD="${LD-ld} -n32"
4571       ;;
4572     *64-bit*)
4573       LD="${LD-ld} -64"
4574       ;;
4575     esac
4576   fi
4577   rm -rf conftest*
4578   ;;
4579
4580 *-*-sco3.2v5*)
4581   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
4582   SAVE_CFLAGS="$CFLAGS"
4583   CFLAGS="$CFLAGS -belf"
4584   echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
4585 echo "configure:4586: checking whether the C compiler needs -belf" >&5
4586 if eval "test \"\${lt_cv_cc_needs_belf+set}\" = set"; then
4587   echo $ac_n "(cached) $ac_c" 1>&6
4588 else
4589   
4590      ac_ext=c
4591 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
4592 ac_cpp='$CPP $CPPFLAGS'
4593 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
4594 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
4595 cross_compiling=$ac_cv_prog_cc_cross
4596
4597      cat > conftest.$ac_ext <<EOF
4598 #line 4599 "configure"
4599 #include "confdefs.h"
4600
4601 int main() {
4602
4603 ; return 0; }
4604 EOF
4605 if { (eval echo configure:4606: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4606   rm -rf conftest*
4607   lt_cv_cc_needs_belf=yes
4608 else
4609   echo "configure: failed program was:" >&5
4610   cat conftest.$ac_ext >&5
4611   rm -rf conftest*
4612   lt_cv_cc_needs_belf=no
4613 fi
4614 rm -f conftest*
4615      ac_ext=c
4616 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
4617 ac_cpp='$CPP $CPPFLAGS'
4618 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
4619 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
4620 cross_compiling=$ac_cv_prog_cc_cross
4621
4622 fi
4623
4624 echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6
4625   if test x"$lt_cv_cc_needs_belf" != x"yes"; then
4626     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
4627     CFLAGS="$SAVE_CFLAGS"
4628   fi
4629   ;;
4630
4631 *-*-cygwin* | *-*-mingw* | *-*-pw32*)
4632   # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
4633 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
4634 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4635 echo "configure:4636: checking for $ac_word" >&5
4636 if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then
4637   echo $ac_n "(cached) $ac_c" 1>&6
4638 else
4639   if test -n "$DLLTOOL"; then
4640   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
4641 else
4642   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4643   ac_dummy="$PATH"
4644   for ac_dir in $ac_dummy; do
4645     test -z "$ac_dir" && ac_dir=.
4646     if test -f $ac_dir/$ac_word; then
4647       ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
4648       break
4649     fi
4650   done
4651   IFS="$ac_save_ifs"
4652 fi
4653 fi
4654 DLLTOOL="$ac_cv_prog_DLLTOOL"
4655 if test -n "$DLLTOOL"; then
4656   echo "$ac_t""$DLLTOOL" 1>&6
4657 else
4658   echo "$ac_t""no" 1>&6
4659 fi
4660
4661
4662 if test -z "$ac_cv_prog_DLLTOOL"; then
4663 if test -n "$ac_tool_prefix"; then
4664   # Extract the first word of "dlltool", so it can be a program name with args.
4665 set dummy dlltool; ac_word=$2
4666 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4667 echo "configure:4668: checking for $ac_word" >&5
4668 if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then
4669   echo $ac_n "(cached) $ac_c" 1>&6
4670 else
4671   if test -n "$DLLTOOL"; then
4672   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
4673 else
4674   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4675   ac_dummy="$PATH"
4676   for ac_dir in $ac_dummy; do
4677     test -z "$ac_dir" && ac_dir=.
4678     if test -f $ac_dir/$ac_word; then
4679       ac_cv_prog_DLLTOOL="dlltool"
4680       break
4681     fi
4682   done
4683   IFS="$ac_save_ifs"
4684   test -z "$ac_cv_prog_DLLTOOL" && ac_cv_prog_DLLTOOL="false"
4685 fi
4686 fi
4687 DLLTOOL="$ac_cv_prog_DLLTOOL"
4688 if test -n "$DLLTOOL"; then
4689   echo "$ac_t""$DLLTOOL" 1>&6
4690 else
4691   echo "$ac_t""no" 1>&6
4692 fi
4693
4694 else
4695   DLLTOOL="false"
4696 fi
4697 fi
4698
4699   # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
4700 set dummy ${ac_tool_prefix}as; ac_word=$2
4701 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4702 echo "configure:4703: checking for $ac_word" >&5
4703 if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then
4704   echo $ac_n "(cached) $ac_c" 1>&6
4705 else
4706   if test -n "$AS"; then
4707   ac_cv_prog_AS="$AS" # Let the user override the test.
4708 else
4709   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4710   ac_dummy="$PATH"
4711   for ac_dir in $ac_dummy; do
4712     test -z "$ac_dir" && ac_dir=.
4713     if test -f $ac_dir/$ac_word; then
4714       ac_cv_prog_AS="${ac_tool_prefix}as"
4715       break
4716     fi
4717   done
4718   IFS="$ac_save_ifs"
4719 fi
4720 fi
4721 AS="$ac_cv_prog_AS"
4722 if test -n "$AS"; then
4723   echo "$ac_t""$AS" 1>&6
4724 else
4725   echo "$ac_t""no" 1>&6
4726 fi
4727
4728
4729 if test -z "$ac_cv_prog_AS"; then
4730 if test -n "$ac_tool_prefix"; then
4731   # Extract the first word of "as", so it can be a program name with args.
4732 set dummy as; ac_word=$2
4733 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4734 echo "configure:4735: checking for $ac_word" >&5
4735 if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then
4736   echo $ac_n "(cached) $ac_c" 1>&6
4737 else
4738   if test -n "$AS"; then
4739   ac_cv_prog_AS="$AS" # Let the user override the test.
4740 else
4741   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4742   ac_dummy="$PATH"
4743   for ac_dir in $ac_dummy; do
4744     test -z "$ac_dir" && ac_dir=.
4745     if test -f $ac_dir/$ac_word; then
4746       ac_cv_prog_AS="as"
4747       break
4748     fi
4749   done
4750   IFS="$ac_save_ifs"
4751   test -z "$ac_cv_prog_AS" && ac_cv_prog_AS="false"
4752 fi
4753 fi
4754 AS="$ac_cv_prog_AS"
4755 if test -n "$AS"; then
4756   echo "$ac_t""$AS" 1>&6
4757 else
4758   echo "$ac_t""no" 1>&6
4759 fi
4760
4761 else
4762   AS="false"
4763 fi
4764 fi
4765
4766   # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
4767 set dummy ${ac_tool_prefix}objdump; ac_word=$2
4768 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4769 echo "configure:4770: checking for $ac_word" >&5
4770 if eval "test \"\${ac_cv_prog_OBJDUMP+set}\" = set"; then
4771   echo $ac_n "(cached) $ac_c" 1>&6
4772 else
4773   if test -n "$OBJDUMP"; then
4774   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
4775 else
4776   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4777   ac_dummy="$PATH"
4778   for ac_dir in $ac_dummy; do
4779     test -z "$ac_dir" && ac_dir=.
4780     if test -f $ac_dir/$ac_word; then
4781       ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
4782       break
4783     fi
4784   done
4785   IFS="$ac_save_ifs"
4786 fi
4787 fi
4788 OBJDUMP="$ac_cv_prog_OBJDUMP"
4789 if test -n "$OBJDUMP"; then
4790   echo "$ac_t""$OBJDUMP" 1>&6
4791 else
4792   echo "$ac_t""no" 1>&6
4793 fi
4794
4795
4796 if test -z "$ac_cv_prog_OBJDUMP"; then
4797 if test -n "$ac_tool_prefix"; then
4798   # Extract the first word of "objdump", so it can be a program name with args.
4799 set dummy objdump; ac_word=$2
4800 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4801 echo "configure:4802: checking for $ac_word" >&5
4802 if eval "test \"\${ac_cv_prog_OBJDUMP+set}\" = set"; then
4803   echo $ac_n "(cached) $ac_c" 1>&6
4804 else
4805   if test -n "$OBJDUMP"; then
4806   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
4807 else
4808   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4809   ac_dummy="$PATH"
4810   for ac_dir in $ac_dummy; do
4811     test -z "$ac_dir" && ac_dir=.
4812     if test -f $ac_dir/$ac_word; then
4813       ac_cv_prog_OBJDUMP="objdump"
4814       break
4815     fi
4816   done
4817   IFS="$ac_save_ifs"
4818   test -z "$ac_cv_prog_OBJDUMP" && ac_cv_prog_OBJDUMP="false"
4819 fi
4820 fi
4821 OBJDUMP="$ac_cv_prog_OBJDUMP"
4822 if test -n "$OBJDUMP"; then
4823   echo "$ac_t""$OBJDUMP" 1>&6
4824 else
4825   echo "$ac_t""no" 1>&6
4826 fi
4827
4828 else
4829   OBJDUMP="false"
4830 fi
4831 fi
4832
4833
4834   # recent cygwin and mingw systems supply a stub DllMain which the user
4835   # can override, but on older systems we have to supply one
4836   echo $ac_n "checking if libtool should supply DllMain function""... $ac_c" 1>&6
4837 echo "configure:4838: checking if libtool should supply DllMain function" >&5
4838 if eval "test \"\${lt_cv_need_dllmain+set}\" = set"; then
4839   echo $ac_n "(cached) $ac_c" 1>&6
4840 else
4841   cat > conftest.$ac_ext <<EOF
4842 #line 4843 "configure"
4843 #include "confdefs.h"
4844
4845 int main() {
4846 extern int __attribute__((__stdcall__)) DllMain(void*, int, void*);
4847       DllMain (0, 0, 0);
4848 ; return 0; }
4849 EOF
4850 if { (eval echo configure:4851: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4851   rm -rf conftest*
4852   lt_cv_need_dllmain=no
4853 else
4854   echo "configure: failed program was:" >&5
4855   cat conftest.$ac_ext >&5
4856   rm -rf conftest*
4857   lt_cv_need_dllmain=yes
4858 fi
4859 rm -f conftest*
4860 fi
4861
4862 echo "$ac_t""$lt_cv_need_dllmain" 1>&6
4863
4864   case $host/$CC in
4865   *-*-cygwin*/gcc*-mno-cygwin*|*-*-mingw*)
4866     # old mingw systems require "-dll" to link a DLL, while more recent ones
4867     # require "-mdll"
4868     SAVE_CFLAGS="$CFLAGS"
4869     CFLAGS="$CFLAGS -mdll"
4870     echo $ac_n "checking how to link DLLs""... $ac_c" 1>&6
4871 echo "configure:4872: checking how to link DLLs" >&5
4872 if eval "test \"\${lt_cv_cc_dll_switch+set}\" = set"; then
4873   echo $ac_n "(cached) $ac_c" 1>&6
4874 else
4875   cat > conftest.$ac_ext <<EOF
4876 #line 4877 "configure"
4877 #include "confdefs.h"
4878
4879 int main() {
4880
4881 ; return 0; }
4882 EOF
4883 if { (eval echo configure:4884: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4884   rm -rf conftest*
4885   lt_cv_cc_dll_switch=-mdll
4886 else
4887   echo "configure: failed program was:" >&5
4888   cat conftest.$ac_ext >&5
4889   rm -rf conftest*
4890   lt_cv_cc_dll_switch=-dll
4891 fi
4892 rm -f conftest*
4893 fi
4894
4895 echo "$ac_t""$lt_cv_cc_dll_switch" 1>&6
4896     CFLAGS="$SAVE_CFLAGS" ;;
4897   *-*-cygwin* | *-*-pw32*)
4898     # cygwin systems need to pass --dll to the linker, and not link
4899     # crt.o which will require a WinMain@16 definition.
4900     lt_cv_cc_dll_switch="-Wl,--dll -nostartfiles" ;;
4901   esac
4902   ;;
4903   
4904 esac
4905
4906 # Sed substitution that helps us do robust quoting.  It backslashifies
4907 # metacharacters that are still active within double-quoted strings.
4908 Xsed='sed -e s/^X//'
4909 sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g'
4910
4911 # Same as above, but do not quote variable references.
4912 double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g'
4913
4914 # Sed substitution to delay expansion of an escaped shell variable in a
4915 # double_quote_subst'ed string.
4916 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
4917
4918 # Constants:
4919 rm="rm -f"
4920
4921 # Global variables:
4922 default_ofile=libtool
4923 can_build_shared=yes
4924
4925 # All known linkers require a `.a' archive for static linking (except M$VC,
4926 # which needs '.lib').
4927 libext=a
4928 ltmain="$ac_aux_dir/ltmain.sh"
4929 ofile="$default_ofile"
4930 with_gnu_ld="$lt_cv_prog_gnu_ld"
4931 need_locks="$enable_libtool_lock"
4932
4933 old_CC="$CC"
4934 old_CFLAGS="$CFLAGS"
4935
4936 # Set sane defaults for various variables
4937 test -z "$AR" && AR=ar
4938 test -z "$AR_FLAGS" && AR_FLAGS=cru
4939 test -z "$AS" && AS=as
4940 test -z "$CC" && CC=cc
4941 test -z "$DLLTOOL" && DLLTOOL=dlltool
4942 test -z "$LD" && LD=ld
4943 test -z "$LN_S" && LN_S="ln -s"
4944 test -z "$MAGIC_CMD" && MAGIC_CMD=file
4945 test -z "$NM" && NM=nm
4946 test -z "$OBJDUMP" && OBJDUMP=objdump
4947 test -z "$RANLIB" && RANLIB=:
4948 test -z "$STRIP" && STRIP=:
4949 test -z "$ac_objext" && ac_objext=o
4950
4951 if test x"$host" != x"$build"; then
4952   ac_tool_prefix=${host_alias}-
4953 else
4954   ac_tool_prefix=
4955 fi
4956
4957 # Transform linux* to *-*-linux-gnu*, to support old configure scripts.
4958 case $host_os in
4959 linux-gnu*) ;;
4960 linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
4961 esac
4962
4963 case $host_os in
4964 aix3*)
4965   # AIX sometimes has problems with the GCC collect2 program.  For some
4966   # reason, if we set the COLLECT_NAMES environment variable, the problems
4967   # vanish in a puff of smoke.
4968   if test "X${COLLECT_NAMES+set}" != Xset; then
4969     COLLECT_NAMES=
4970     export COLLECT_NAMES
4971   fi
4972   ;;
4973 esac
4974
4975 # Determine commands to create old-style static archives.
4976 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
4977 old_postinstall_cmds='chmod 644 $oldlib'
4978 old_postuninstall_cmds=
4979
4980 if test -n "$RANLIB"; then
4981   case $host_os in
4982   openbsd*)
4983     old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds"
4984     ;;
4985   *)
4986     old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
4987     ;;
4988   esac
4989   old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
4990 fi
4991
4992 # Allow CC to be a program name with arguments.
4993 set dummy $CC
4994 compiler="$2"
4995
4996 echo $ac_n "checking for objdir""... $ac_c" 1>&6
4997 echo "configure:4998: checking for objdir" >&5
4998 rm -f .libs 2>/dev/null
4999 mkdir .libs 2>/dev/null
5000 if test -d .libs; then
5001   objdir=.libs
5002 else
5003   # MS-DOS does not allow filenames that begin with a dot.
5004   objdir=_libs
5005 fi
5006 rmdir .libs 2>/dev/null
5007 echo "$ac_t""$objdir" 1>&6
5008
5009
5010 # Check whether --with-pic or --without-pic was given.
5011 if test "${with_pic+set}" = set; then
5012   withval="$with_pic"
5013   pic_mode="$withval"
5014 else
5015   pic_mode=default
5016 fi
5017
5018 test -z "$pic_mode" && pic_mode=default
5019
5020 # We assume here that the value for lt_cv_prog_cc_pic will not be cached
5021 # in isolation, and that seeing it set (from the cache) indicates that
5022 # the associated values are set (in the cache) correctly too.
5023 echo $ac_n "checking for $compiler option to produce PIC""... $ac_c" 1>&6
5024 echo "configure:5025: checking for $compiler option to produce PIC" >&5
5025 if eval "test \"\${lt_cv_prog_cc_pic+set}\" = set"; then
5026   echo $ac_n "(cached) $ac_c" 1>&6
5027 else
5028    lt_cv_prog_cc_pic=
5029   lt_cv_prog_cc_shlib=
5030   lt_cv_prog_cc_wl=
5031   lt_cv_prog_cc_static=
5032   lt_cv_prog_cc_no_builtin=
5033   lt_cv_prog_cc_can_build_shared=$can_build_shared
5034
5035   if test "$GCC" = yes; then
5036     lt_cv_prog_cc_wl='-Wl,'
5037     lt_cv_prog_cc_static='-static'
5038
5039     case $host_os in
5040     aix*)
5041       # Below there is a dirty hack to force normal static linking with -ldl
5042       # The problem is because libdl dynamically linked with both libc and
5043       # libC (AIX C++ library), which obviously doesn't included in libraries
5044       # list by gcc. This cause undefined symbols with -static flags.
5045       # This hack allows C programs to be linked with "-static -ldl", but
5046       # not sure about C++ programs.
5047       lt_cv_prog_cc_static="$lt_cv_prog_cc_static ${lt_cv_prog_cc_wl}-lC"
5048       ;;
5049     amigaos*)
5050       # FIXME: we need at least 68020 code to build shared libraries, but
5051       # adding the `-m68020' flag to GCC prevents building anything better,
5052       # like `-m68040'.
5053       lt_cv_prog_cc_pic='-m68020 -resident32 -malways-restore-a4'
5054       ;;
5055     beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
5056       # PIC is the default for these OSes.
5057       ;;
5058     darwin* | rhapsody*)
5059       # PIC is the default on this platform
5060       # Common symbols not allowed in MH_DYLIB files
5061       lt_cv_prog_cc_pic='-fno-common'
5062       ;;
5063     cygwin* | mingw* | pw32* | os2*)
5064       # This hack is so that the source file can tell whether it is being
5065       # built for inclusion in a dll (and should export symbols for example).
5066       lt_cv_prog_cc_pic='-DDLL_EXPORT'
5067       ;;
5068     sysv4*MP*)
5069       if test -d /usr/nec; then
5070          lt_cv_prog_cc_pic=-Kconform_pic
5071       fi
5072       ;;
5073     *)
5074       lt_cv_prog_cc_pic='-fPIC'
5075       ;;
5076     esac
5077   else
5078     # PORTME Check for PIC flags for the system compiler.
5079     case $host_os in
5080     aix3* | aix4* | aix5*)
5081       lt_cv_prog_cc_wl='-Wl,'
5082       # All AIX code is PIC.
5083       if test "$host_cpu" = ia64; then
5084         # AIX 5 now supports IA64 processor
5085         lt_cv_prog_cc_static='-Bstatic'
5086       else
5087         lt_cv_prog_cc_static='-bnso -bI:/lib/syscalls.exp'
5088       fi
5089       ;;
5090
5091     hpux9* | hpux10* | hpux11*)
5092       # Is there a better lt_cv_prog_cc_static that works with the bundled CC?
5093       lt_cv_prog_cc_wl='-Wl,'
5094       lt_cv_prog_cc_static="${lt_cv_prog_cc_wl}-a ${lt_cv_prog_cc_wl}archive"
5095       lt_cv_prog_cc_pic='+Z'
5096       ;;
5097
5098     irix5* | irix6* | nonstopux*)
5099       lt_cv_prog_cc_wl='-Wl,'
5100       lt_cv_prog_cc_static='-non_shared'
5101       # PIC (with -KPIC) is the default.
5102       ;;
5103
5104     cygwin* | mingw* | pw32* | os2*)
5105       # This hack is so that the source file can tell whether it is being
5106       # built for inclusion in a dll (and should export symbols for example).
5107       lt_cv_prog_cc_pic='-DDLL_EXPORT'
5108       ;;
5109
5110     newsos6)
5111       lt_cv_prog_cc_pic='-KPIC'
5112       lt_cv_prog_cc_static='-Bstatic'
5113       ;;
5114
5115     osf3* | osf4* | osf5*)
5116       # All OSF/1 code is PIC.
5117       lt_cv_prog_cc_wl='-Wl,'
5118       lt_cv_prog_cc_static='-non_shared'
5119       ;;
5120
5121     sco3.2v5*)
5122       lt_cv_prog_cc_pic='-Kpic'
5123       lt_cv_prog_cc_static='-dn'
5124       lt_cv_prog_cc_shlib='-belf'
5125       ;;
5126
5127     solaris*)
5128       lt_cv_prog_cc_pic='-KPIC'
5129       lt_cv_prog_cc_static='-Bstatic'
5130       lt_cv_prog_cc_wl='-Wl,'
5131       ;;
5132
5133     sunos4*)
5134       lt_cv_prog_cc_pic='-PIC'
5135       lt_cv_prog_cc_static='-Bstatic'
5136       lt_cv_prog_cc_wl='-Qoption ld '
5137       ;;
5138
5139     sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
5140       lt_cv_prog_cc_pic='-KPIC'
5141       lt_cv_prog_cc_static='-Bstatic'
5142       lt_cv_prog_cc_wl='-Wl,'
5143       ;;
5144
5145     uts4*)
5146       lt_cv_prog_cc_pic='-pic'
5147       lt_cv_prog_cc_static='-Bstatic'
5148       ;;
5149
5150     sysv4*MP*)
5151       if test -d /usr/nec ;then
5152         lt_cv_prog_cc_pic='-Kconform_pic'
5153         lt_cv_prog_cc_static='-Bstatic'
5154       fi
5155       ;;
5156
5157     *)
5158       lt_cv_prog_cc_can_build_shared=no
5159       ;;
5160     esac
5161   fi
5162
5163 fi
5164
5165 if test -z "$lt_cv_prog_cc_pic"; then
5166   echo "$ac_t""none" 1>&6
5167 else
5168   echo "$ac_t""$lt_cv_prog_cc_pic" 1>&6
5169
5170   # Check to make sure the pic_flag actually works.
5171   echo $ac_n "checking if $compiler PIC flag $lt_cv_prog_cc_pic works""... $ac_c" 1>&6
5172 echo "configure:5173: checking if $compiler PIC flag $lt_cv_prog_cc_pic works" >&5
5173   if eval "test \"\${lt_cv_prog_cc_pic_works+set}\" = set"; then
5174   echo $ac_n "(cached) $ac_c" 1>&6
5175 else
5176       save_CFLAGS="$CFLAGS"
5177     CFLAGS="$CFLAGS $lt_cv_prog_cc_pic -DPIC"
5178     cat > conftest.$ac_ext <<EOF
5179 #line 5180 "configure"
5180 #include "confdefs.h"
5181
5182 int main() {
5183
5184 ; return 0; }
5185 EOF
5186 if { (eval echo configure:5187: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5187   rm -rf conftest*
5188         case $host_os in
5189       hpux9* | hpux10* | hpux11*)
5190         # On HP-UX, both CC and GCC only warn that PIC is supported... then
5191         # they create non-PIC objects.  So, if there were any warnings, we
5192         # assume that PIC is not supported.
5193         if test -s conftest.err; then
5194           lt_cv_prog_cc_pic_works=no
5195         else
5196           lt_cv_prog_cc_pic_works=yes
5197         fi
5198         ;;
5199       *)
5200         lt_cv_prog_cc_pic_works=yes
5201         ;;
5202       esac
5203     
5204 else
5205   echo "configure: failed program was:" >&5
5206   cat conftest.$ac_ext >&5
5207   rm -rf conftest*
5208         lt_cv_prog_cc_pic_works=no
5209     
5210 fi
5211 rm -f conftest*
5212     CFLAGS="$save_CFLAGS"
5213   
5214 fi
5215
5216
5217   if test "X$lt_cv_prog_cc_pic_works" = Xno; then
5218     lt_cv_prog_cc_pic=
5219     lt_cv_prog_cc_can_build_shared=no
5220   else
5221     lt_cv_prog_cc_pic=" $lt_cv_prog_cc_pic"
5222   fi
5223
5224   echo "$ac_t""$lt_cv_prog_cc_pic_works" 1>&6
5225 fi
5226
5227 # Check for any special shared library compilation flags.
5228 if test -n "$lt_cv_prog_cc_shlib"; then
5229   echo "configure: warning: \`$CC' requires \`$lt_cv_prog_cc_shlib' to build shared libraries" 1>&2
5230   if echo "$old_CC $old_CFLAGS " | egrep -e "[  ]$lt_cv_prog_cc_shlib[  ]" >/dev/null; then :
5231   else
5232    echo "configure: warning: add \`$lt_cv_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure" 1>&2
5233     lt_cv_prog_cc_can_build_shared=no
5234   fi
5235 fi
5236
5237 echo $ac_n "checking if $compiler static flag $lt_cv_prog_cc_static works""... $ac_c" 1>&6
5238 echo "configure:5239: checking if $compiler static flag $lt_cv_prog_cc_static works" >&5
5239 if eval "test \"\${lt_cv_prog_cc_static_works+set}\" = set"; then
5240   echo $ac_n "(cached) $ac_c" 1>&6
5241 else
5242     lt_cv_prog_cc_static_works=no
5243   save_LDFLAGS="$LDFLAGS"
5244   LDFLAGS="$LDFLAGS $lt_cv_prog_cc_static"
5245   cat > conftest.$ac_ext <<EOF
5246 #line 5247 "configure"
5247 #include "confdefs.h"
5248
5249 int main() {
5250
5251 ; return 0; }
5252 EOF
5253 if { (eval echo configure:5254: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5254   rm -rf conftest*
5255   lt_cv_prog_cc_static_works=yes
5256 else
5257   echo "configure: failed program was:" >&5
5258   cat conftest.$ac_ext >&5
5259 fi
5260 rm -f conftest*
5261   LDFLAGS="$save_LDFLAGS"
5262
5263 fi
5264
5265
5266 # Belt *and* braces to stop my trousers falling down:
5267 test "X$lt_cv_prog_cc_static_works" = Xno && lt_cv_prog_cc_static=
5268 echo "$ac_t""$lt_cv_prog_cc_static_works" 1>&6
5269
5270 pic_flag="$lt_cv_prog_cc_pic"
5271 special_shlib_compile_flags="$lt_cv_prog_cc_shlib"
5272 wl="$lt_cv_prog_cc_wl"
5273 link_static_flag="$lt_cv_prog_cc_static"
5274 no_builtin_flag="$lt_cv_prog_cc_no_builtin"
5275 can_build_shared="$lt_cv_prog_cc_can_build_shared"
5276
5277
5278 # Check to see if options -o and -c are simultaneously supported by compiler
5279 echo $ac_n "checking if $compiler supports -c -o file.$ac_objext""... $ac_c" 1>&6
5280 echo "configure:5281: checking if $compiler supports -c -o file.$ac_objext" >&5
5281 if eval "test \"\${lt_cv_compiler_c_o+set}\" = set"; then
5282   echo $ac_n "(cached) $ac_c" 1>&6
5283 else
5284   
5285 $rm -r conftest 2>/dev/null
5286 mkdir conftest
5287 cd conftest
5288 echo "int some_variable = 0;" > conftest.$ac_ext
5289 mkdir out
5290 # According to Tom Tromey, Ian Lance Taylor reported there are C compilers
5291 # that will create temporary files in the current directory regardless of
5292 # the output directory.  Thus, making CWD read-only will cause this test
5293 # to fail, enabling locking or at least warning the user not to do parallel
5294 # builds.
5295 chmod -w .
5296 save_CFLAGS="$CFLAGS"
5297 CFLAGS="$CFLAGS -o out/conftest2.$ac_objext"
5298 compiler_c_o=no
5299 if { (eval echo configure:5300: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then
5300   # The compiler can only warn and ignore the option if not recognized
5301   # So say no if there are warnings
5302   if test -s out/conftest.err; then
5303     lt_cv_compiler_c_o=no
5304   else
5305     lt_cv_compiler_c_o=yes
5306   fi
5307 else
5308   # Append any errors to the config.log.
5309   cat out/conftest.err 1>&5
5310   lt_cv_compiler_c_o=no
5311 fi
5312 CFLAGS="$save_CFLAGS"
5313 chmod u+w .
5314 $rm conftest* out/*
5315 rmdir out
5316 cd ..
5317 rmdir conftest
5318 $rm -r conftest 2>/dev/null
5319
5320 fi
5321
5322 compiler_c_o=$lt_cv_compiler_c_o
5323 echo "$ac_t""$compiler_c_o" 1>&6
5324
5325 if test x"$compiler_c_o" = x"yes"; then
5326   # Check to see if we can write to a .lo
5327   echo $ac_n "checking if $compiler supports -c -o file.lo""... $ac_c" 1>&6
5328 echo "configure:5329: checking if $compiler supports -c -o file.lo" >&5
5329   if eval "test \"\${lt_cv_compiler_o_lo+set}\" = set"; then
5330   echo $ac_n "(cached) $ac_c" 1>&6
5331 else
5332   
5333   lt_cv_compiler_o_lo=no
5334   save_CFLAGS="$CFLAGS"
5335   CFLAGS="$CFLAGS -c -o conftest.lo"
5336   save_objext="$ac_objext"
5337   ac_objext=lo
5338   cat > conftest.$ac_ext <<EOF
5339 #line 5340 "configure"
5340 #include "confdefs.h"
5341
5342 int main() {
5343 int some_variable = 0;
5344 ; return 0; }
5345 EOF
5346 if { (eval echo configure:5347: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5347   rm -rf conftest*
5348       # The compiler can only warn and ignore the option if not recognized
5349     # So say no if there are warnings
5350     if test -s conftest.err; then
5351       lt_cv_compiler_o_lo=no
5352     else
5353       lt_cv_compiler_o_lo=yes
5354     fi
5355   
5356 else
5357   echo "configure: failed program was:" >&5
5358   cat conftest.$ac_ext >&5
5359 fi
5360 rm -f conftest*
5361   ac_objext="$save_objext"
5362   CFLAGS="$save_CFLAGS"
5363   
5364 fi
5365
5366   compiler_o_lo=$lt_cv_compiler_o_lo
5367   echo "$ac_t""$compiler_o_lo" 1>&6
5368 else
5369   compiler_o_lo=no
5370 fi
5371
5372 # Check to see if we can do hard links to lock some files if needed
5373 hard_links="nottested"
5374 if test "$compiler_c_o" = no && test "$need_locks" != no; then
5375   # do not overwrite the value of need_locks provided by the user
5376   echo $ac_n "checking if we can lock with hard links""... $ac_c" 1>&6
5377 echo "configure:5378: checking if we can lock with hard links" >&5
5378   hard_links=yes
5379   $rm conftest*
5380   ln conftest.a conftest.b 2>/dev/null && hard_links=no
5381   touch conftest.a
5382   ln conftest.a conftest.b 2>&5 || hard_links=no
5383   ln conftest.a conftest.b 2>/dev/null && hard_links=no
5384   echo "$ac_t""$hard_links" 1>&6
5385   if test "$hard_links" = no; then
5386     echo "configure: warning: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" 1>&2
5387     need_locks=warn
5388   fi
5389 else
5390   need_locks=no
5391 fi
5392
5393 if test "$GCC" = yes; then
5394   # Check to see if options -fno-rtti -fno-exceptions are supported by compiler
5395   echo $ac_n "checking if $compiler supports -fno-rtti -fno-exceptions""... $ac_c" 1>&6
5396 echo "configure:5397: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
5397   echo "int some_variable = 0;" > conftest.$ac_ext
5398   save_CFLAGS="$CFLAGS"
5399   CFLAGS="$CFLAGS -fno-rtti -fno-exceptions -c conftest.$ac_ext"
5400   compiler_rtti_exceptions=no
5401   cat > conftest.$ac_ext <<EOF
5402 #line 5403 "configure"
5403 #include "confdefs.h"
5404
5405 int main() {
5406 int some_variable = 0;
5407 ; return 0; }
5408 EOF
5409 if { (eval echo configure:5410: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5410   rm -rf conftest*
5411       # The compiler can only warn and ignore the option if not recognized
5412     # So say no if there are warnings
5413     if test -s conftest.err; then
5414       compiler_rtti_exceptions=no
5415     else
5416       compiler_rtti_exceptions=yes
5417     fi
5418   
5419 else
5420   echo "configure: failed program was:" >&5
5421   cat conftest.$ac_ext >&5
5422 fi
5423 rm -f conftest*
5424   CFLAGS="$save_CFLAGS"
5425   echo "$ac_t""$compiler_rtti_exceptions" 1>&6
5426
5427   if test "$compiler_rtti_exceptions" = "yes"; then
5428     no_builtin_flag=' -fno-builtin -fno-rtti -fno-exceptions'
5429   else
5430     no_builtin_flag=' -fno-builtin'
5431   fi
5432 fi
5433
5434 # See if the linker supports building shared libraries.
5435 echo $ac_n "checking whether the linker ($LD) supports shared libraries""... $ac_c" 1>&6
5436 echo "configure:5437: checking whether the linker ($LD) supports shared libraries" >&5
5437
5438 allow_undefined_flag=
5439 no_undefined_flag=
5440 need_lib_prefix=unknown
5441 need_version=unknown
5442 # when you set need_version to no, make sure it does not cause -set_version
5443 # flags to be left without arguments
5444 archive_cmds=
5445 archive_expsym_cmds=
5446 old_archive_from_new_cmds=
5447 old_archive_from_expsyms_cmds=
5448 export_dynamic_flag_spec=
5449 whole_archive_flag_spec=
5450 thread_safe_flag_spec=
5451 hardcode_into_libs=no
5452 hardcode_libdir_flag_spec=
5453 hardcode_libdir_separator=
5454 hardcode_direct=no
5455 hardcode_minus_L=no
5456 hardcode_shlibpath_var=unsupported
5457 runpath_var=
5458 link_all_deplibs=unknown
5459 always_export_symbols=no
5460 export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols'
5461 # include_expsyms should be a list of space-separated symbols to be *always*
5462 # included in the symbol list
5463 include_expsyms=
5464 # exclude_expsyms can be an egrep regular expression of symbols to exclude
5465 # it will be wrapped by ` (' and `)$', so one must not match beginning or
5466 # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
5467 # as well as any symbol that contains `d'.
5468 exclude_expsyms="_GLOBAL_OFFSET_TABLE_"
5469 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
5470 # platforms (ab)use it in PIC code, but their linkers get confused if
5471 # the symbol is explicitly referenced.  Since portable code cannot
5472 # rely on this symbol name, it's probably fine to never include it in
5473 # preloaded symbol tables.
5474 extract_expsyms_cmds=
5475
5476 case $host_os in
5477 cygwin* | mingw* | pw32*)
5478   # FIXME: the MSVC++ port hasn't been tested in a loooong time
5479   # When not using gcc, we currently assume that we are using
5480   # Microsoft Visual C++.
5481   if test "$GCC" != yes; then
5482     with_gnu_ld=no
5483   fi
5484   ;;
5485 openbsd*)
5486   with_gnu_ld=no
5487   ;;
5488 esac
5489
5490 ld_shlibs=yes
5491 if test "$with_gnu_ld" = yes; then
5492   # If archive_cmds runs LD, not CC, wlarc should be empty
5493   wlarc='${wl}'
5494
5495   # See if GNU ld supports shared libraries.
5496   case $host_os in
5497   aix3* | aix4* | aix5*)
5498     # On AIX, the GNU linker is very broken
5499     # Note:Check GNU linker on AIX 5-IA64 when/if it becomes available.
5500     ld_shlibs=no
5501     cat <<EOF 1>&2
5502
5503 *** Warning: the GNU linker, at least up to release 2.9.1, is reported
5504 *** to be unable to reliably create shared libraries on AIX.
5505 *** Therefore, libtool is disabling shared libraries support.  If you
5506 *** really care for shared libraries, you may want to modify your PATH
5507 *** so that a non-GNU linker is found, and then restart.
5508
5509 EOF
5510     ;;
5511
5512   amigaos*)
5513     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)'
5514     hardcode_libdir_flag_spec='-L$libdir'
5515     hardcode_minus_L=yes
5516
5517     # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
5518     # that the semantics of dynamic libraries on AmigaOS, at least up
5519     # to version 4, is to share data among multiple programs linked
5520     # with the same dynamic library.  Since this doesn't match the
5521     # behavior of shared libraries on other platforms, we can use
5522     # them.
5523     ld_shlibs=no
5524     ;;
5525
5526   beos*)
5527     if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
5528       allow_undefined_flag=unsupported
5529       # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
5530       # support --undefined.  This deserves some investigation.  FIXME
5531       archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5532     else
5533       ld_shlibs=no
5534     fi
5535     ;;
5536
5537   cygwin* | mingw* | pw32*)
5538     # hardcode_libdir_flag_spec is actually meaningless, as there is
5539     # no search path for DLLs.
5540     hardcode_libdir_flag_spec='-L$libdir'
5541     allow_undefined_flag=unsupported
5542     always_export_symbols=yes
5543
5544     extract_expsyms_cmds='test -f $output_objdir/impgen.c || \
5545       sed -e "/^# \/\* impgen\.c starts here \*\//,/^# \/\* impgen.c ends here \*\// { s/^# //;s/^# *$//; p; }" -e d < $''0 > $output_objdir/impgen.c~
5546       test -f $output_objdir/impgen.exe || (cd $output_objdir && \
5547       if test "x$HOST_CC" != "x" ; then $HOST_CC -o impgen impgen.c ; \
5548       else $CC -o impgen impgen.c ; fi)~
5549       $output_objdir/impgen $dir/$soroot > $output_objdir/$soname-def'
5550
5551     old_archive_from_expsyms_cmds='$DLLTOOL --as=$AS --dllname $soname --def $output_objdir/$soname-def --output-lib $output_objdir/$newlib'
5552
5553     # cygwin and mingw dlls have different entry points and sets of symbols
5554     # to exclude.
5555     # FIXME: what about values for MSVC?
5556     dll_entry=__cygwin_dll_entry@12
5557     dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12~
5558     case $host_os in
5559     mingw*)
5560       # mingw values
5561       dll_entry=_DllMainCRTStartup@12
5562       dll_exclude_symbols=DllMain@12,DllMainCRTStartup@12,DllEntryPoint@12~
5563       ;;
5564     esac
5565
5566     # mingw and cygwin differ, and it's simplest to just exclude the union
5567     # of the two symbol sets.
5568     dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12,DllMainCRTStartup@12,DllEntryPoint@12
5569
5570     # recent cygwin and mingw systems supply a stub DllMain which the user
5571     # can override, but on older systems we have to supply one (in ltdll.c)
5572     if test "x$lt_cv_need_dllmain" = "xyes"; then
5573       ltdll_obj='$output_objdir/$soname-ltdll.'"$ac_objext "
5574       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~
5575         test -f $output_objdir/$soname-ltdll.$ac_objext || (cd $output_objdir && $CC -c $soname-ltdll.c)~'
5576     else
5577       ltdll_obj=
5578       ltdll_cmds=
5579     fi
5580
5581     # Extract the symbol export list from an `--export-all' def file,
5582     # then regenerate the def file from the symbol export list, so that
5583     # the compiled dll only exports the symbol export list.
5584     # Be careful not to strip the DATA tag left be newer dlltools.
5585     export_symbols_cmds="$ltdll_cmds"'
5586       $DLLTOOL --export-all --exclude-symbols '$dll_exclude_symbols' --output-def $output_objdir/$soname-def '$ltdll_obj'$libobjs $convenience~
5587       sed -e "1,/EXPORTS/d" -e "s/ @ [0-9]*//" -e "s/ *;.*$//" < $output_objdir/$soname-def > $export_symbols'
5588
5589     # If the export-symbols file already is a .def file (1st line
5590     # is EXPORTS), use it as is.
5591     # If DATA tags from a recent dlltool are present, honour them!
5592     archive_expsym_cmds='if test "x`sed 1q $export_symbols`" = xEXPORTS; then
5593         cp $export_symbols $output_objdir/$soname-def;
5594       else
5595         echo EXPORTS > $output_objdir/$soname-def;
5596         _lt_hint=1;
5597         cat $export_symbols | while read symbol; do
5598          set dummy \$symbol;
5599          case \$# in
5600            2) echo "   \$2 @ \$_lt_hint ; " >> $output_objdir/$soname-def;;
5601            4) echo "   \$2 \$3 \$4 ; " >> $output_objdir/$soname-def; _lt_hint=`expr \$_lt_hint - 1`;;
5602            *) echo "     \$2 @ \$_lt_hint \$3 ; " >> $output_objdir/$soname-def;;
5603          esac;
5604          _lt_hint=`expr 1 + \$_lt_hint`;
5605         done;
5606       fi~
5607       '"$ltdll_cmds"'
5608       $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~
5609       $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~
5610       $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~
5611       $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~
5612       $CC $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags'
5613     ;;
5614
5615   netbsd*)
5616     if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
5617       archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
5618       wlarc=
5619     else
5620       archive_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5621       archive_expsym_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5622     fi
5623     ;;
5624
5625   solaris* | sysv5*)
5626     if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then
5627       ld_shlibs=no
5628       cat <<EOF 1>&2
5629
5630 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
5631 *** create shared libraries on Solaris systems.  Therefore, libtool
5632 *** is disabling shared libraries support.  We urge you to upgrade GNU
5633 *** binutils to release 2.9.1 or newer.  Another option is to modify
5634 *** your PATH or compiler configuration so that the native linker is
5635 *** used, and then restart.
5636
5637 EOF
5638     elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
5639       archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5640       archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5641     else
5642       ld_shlibs=no
5643     fi
5644     ;;
5645
5646   sunos4*)
5647     archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5648     wlarc=
5649     hardcode_direct=yes
5650     hardcode_shlibpath_var=no
5651     ;;
5652
5653   *)
5654     if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
5655       archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5656       archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5657     else
5658       ld_shlibs=no
5659     fi
5660     ;;
5661   esac
5662
5663   if test "$ld_shlibs" = yes; then
5664     runpath_var=LD_RUN_PATH
5665     hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir'
5666     export_dynamic_flag_spec='${wl}--export-dynamic'
5667     case $host_os in
5668     cygwin* | mingw* | pw32*)
5669       # dlltool doesn't understand --whole-archive et. al.
5670       whole_archive_flag_spec=
5671       ;;
5672     *)
5673       # ancient GNU ld didn't support --whole-archive et. al.
5674       if $LD --help 2>&1 | egrep 'no-whole-archive' > /dev/null; then
5675         whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
5676       else
5677         whole_archive_flag_spec=
5678       fi
5679       ;;
5680     esac
5681   fi
5682 else
5683   # PORTME fill in a description of your system's linker (not GNU ld)
5684   case $host_os in
5685   aix3*)
5686     allow_undefined_flag=unsupported
5687     always_export_symbols=yes
5688     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'
5689     # Note: this linker hardcodes the directories in LIBPATH if there
5690     # are no directories specified by -L.
5691     hardcode_minus_L=yes
5692     if test "$GCC" = yes && test -z "$link_static_flag"; then
5693       # Neither direct hardcoding nor static linking is supported with a
5694       # broken collect2.
5695       hardcode_direct=unsupported
5696     fi
5697     ;;
5698
5699   aix4* | aix5*)
5700     if test "$host_cpu" = ia64; then
5701       # On IA64, the linker does run time linking by default, so we don't
5702       # have to do anything special.
5703       aix_use_runtimelinking=no
5704       exp_sym_flag='-Bexport'
5705       no_entry_flag=""
5706     else
5707       aix_use_runtimelinking=no
5708
5709       # Test if we are trying to use run time linking or normal
5710       # AIX style linking. If -brtl is somewhere in LDFLAGS, we
5711       # need to do runtime linking.
5712       case $host_os in aix4.[23]|aix4.[23].*|aix5*)
5713         for ld_flag in $LDFLAGS; do
5714           case $ld_flag in
5715           *-brtl*)
5716             aix_use_runtimelinking=yes
5717             break
5718           ;;
5719           esac
5720         done
5721       esac
5722
5723       exp_sym_flag='-bexport'
5724       no_entry_flag='-bnoentry'
5725     fi
5726
5727     # When large executables or shared objects are built, AIX ld can
5728     # have problems creating the table of contents.  If linking a library
5729     # or program results in "error TOC overflow" add -mminimal-toc to
5730     # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
5731     # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
5732
5733     hardcode_direct=yes
5734     archive_cmds=''
5735     hardcode_libdir_separator=':'
5736     if test "$GCC" = yes; then
5737       case $host_os in aix4.[012]|aix4.[012].*)
5738         collect2name=`${CC} -print-prog-name=collect2`
5739         if test -f "$collect2name" && \
5740           strings "$collect2name" | grep resolve_lib_name >/dev/null
5741         then
5742           # We have reworked collect2
5743           hardcode_direct=yes
5744         else
5745           # We have old collect2
5746           hardcode_direct=unsupported
5747           # It fails to find uninstalled libraries when the uninstalled
5748           # path is not listed in the libpath.  Setting hardcode_minus_L
5749           # to unsupported forces relinking
5750           hardcode_minus_L=yes
5751           hardcode_libdir_flag_spec='-L$libdir'
5752           hardcode_libdir_separator=
5753         fi
5754       esac
5755
5756       shared_flag='-shared'
5757     else
5758       # not using gcc
5759       if test "$host_cpu" = ia64; then
5760         shared_flag='${wl}-G'
5761       else
5762         if test "$aix_use_runtimelinking" = yes; then
5763           shared_flag='${wl}-G'
5764         else
5765           shared_flag='${wl}-bM:SRE'
5766         fi
5767       fi
5768     fi
5769
5770     # It seems that -bexpall can do strange things, so it is better to
5771     # generate a list of symbols to export.
5772     always_export_symbols=yes
5773     if test "$aix_use_runtimelinking" = yes; then
5774       # Warning - without using the other runtime loading flags (-brtl),
5775       # -berok will link without error, but may produce a broken library.
5776       allow_undefined_flag='-berok'
5777       hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:/usr/lib:/lib'
5778       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"
5779     else
5780       if test "$host_cpu" = ia64; then
5781         hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
5782         allow_undefined_flag="-z nodefs"
5783         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"
5784       else
5785         hardcode_libdir_flag_spec='${wl}-bnolibpath ${wl}-blibpath:$libdir:/usr/lib:/lib'
5786         # Warning - without using the other run time loading flags,
5787         # -berok will link without error, but may produce a broken library.
5788         allow_undefined_flag='${wl}-berok'
5789         # This is a bit strange, but is similar to how AIX traditionally builds
5790         # it's shared libraries.
5791         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'
5792       fi
5793     fi
5794     ;;
5795
5796   amigaos*)
5797     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)'
5798     hardcode_libdir_flag_spec='-L$libdir'
5799     hardcode_minus_L=yes
5800     # see comment about different semantics on the GNU ld section
5801     ld_shlibs=no
5802     ;;
5803
5804   cygwin* | mingw* | pw32*)
5805     # When not using gcc, we currently assume that we are using
5806     # Microsoft Visual C++.
5807     # hardcode_libdir_flag_spec is actually meaningless, as there is
5808     # no search path for DLLs.
5809     hardcode_libdir_flag_spec=' '
5810     allow_undefined_flag=unsupported
5811     # Tell ltmain to make .lib files, not .a files.
5812     libext=lib
5813     # FIXME: Setting linknames here is a bad hack.
5814     archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | sed -e '\''s/ -lc$//'\''` -link -dll~linknames='
5815     # The linker will automatically build a .lib file if we build a DLL.
5816     old_archive_from_new_cmds='true'
5817     # FIXME: Should let the user specify the lib program.
5818     old_archive_cmds='lib /OUT:$oldlib$oldobjs$old_deplibs'
5819     fix_srcfile_path='`cygpath -w "$srcfile"`'
5820     ;;
5821
5822   darwin* | rhapsody*)
5823     case "$host_os" in
5824     rhapsody* | darwin1.[012])
5825       allow_undefined_flag='-undefined suppress'
5826       ;;
5827     *) # Darwin 1.3 on
5828       allow_undefined_flag='-flat_namespace -undefined suppress'
5829       ;;
5830     esac
5831     # FIXME: Relying on posixy $() will cause problems for
5832     #        cross-compilation, but unfortunately the echo tests do not
5833     #        yet detect zsh echo's removal of \ escapes.  Also zsh mangles
5834     #        `"' quotes if we put them in here... so don't!
5835     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)'
5836     # We need to add '_' to the symbols in $export_symbols first
5837     #archive_expsym_cmds="$archive_cmds"' && strip -s $export_symbols'
5838     hardcode_direct=yes
5839     hardcode_shlibpath_var=no
5840     whole_archive_flag_spec='-all_load $convenience'
5841     ;;
5842
5843   freebsd1*)
5844     ld_shlibs=no
5845     ;;
5846
5847   # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
5848   # support.  Future versions do this automatically, but an explicit c++rt0.o
5849   # does not break anything, and helps significantly (at the cost of a little
5850   # extra space).
5851   freebsd2.2*)
5852     archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
5853     hardcode_libdir_flag_spec='-R$libdir'
5854     hardcode_direct=yes
5855     hardcode_shlibpath_var=no
5856     ;;
5857
5858   # Unfortunately, older versions of FreeBSD 2 do not have this feature.
5859   freebsd2*)
5860     archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5861     hardcode_direct=yes
5862     hardcode_minus_L=yes
5863     hardcode_shlibpath_var=no
5864     ;;
5865
5866   # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
5867   freebsd*)
5868     archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
5869     hardcode_libdir_flag_spec='-R$libdir'
5870     hardcode_direct=yes
5871     hardcode_shlibpath_var=no
5872     ;;
5873
5874   hpux9* | hpux10* | hpux11*)
5875     case $host_os in
5876     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' ;;
5877     *) archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' ;;
5878     esac
5879     hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
5880     hardcode_libdir_separator=:
5881     hardcode_direct=yes
5882     hardcode_minus_L=yes # Not in the search PATH, but as the default
5883                          # location of the library.
5884     export_dynamic_flag_spec='${wl}-E'
5885     ;;
5886
5887   irix5* | irix6* | nonstopux*)
5888     if test "$GCC" = yes; then
5889       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'
5890       hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5891     else
5892       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'
5893       hardcode_libdir_flag_spec='-rpath $libdir'
5894     fi
5895     hardcode_libdir_separator=:
5896     link_all_deplibs=yes
5897     ;;
5898
5899   netbsd*)
5900     if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
5901       archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
5902     else
5903       archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
5904     fi
5905     hardcode_libdir_flag_spec='-R$libdir'
5906     hardcode_direct=yes
5907     hardcode_shlibpath_var=no
5908     ;;
5909
5910   newsos6)
5911     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5912     hardcode_direct=yes
5913     hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5914     hardcode_libdir_separator=:
5915     hardcode_shlibpath_var=no
5916     ;;
5917
5918   openbsd*)
5919     hardcode_direct=yes
5920     hardcode_shlibpath_var=no
5921     if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
5922       archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5923       hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
5924       export_dynamic_flag_spec='${wl}-E'
5925     else
5926       case "$host_os" in
5927       openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
5928         archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5929         hardcode_libdir_flag_spec='-R$libdir'
5930         ;;
5931       *)
5932         archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5933         hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
5934         ;;
5935       esac
5936     fi
5937     ;;
5938
5939   os2*)
5940     hardcode_libdir_flag_spec='-L$libdir'
5941     hardcode_minus_L=yes
5942     allow_undefined_flag=unsupported
5943     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'
5944     old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
5945     ;;
5946
5947   osf3*)
5948     if test "$GCC" = yes; then
5949       allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
5950       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'
5951     else
5952       allow_undefined_flag=' -expect_unresolved \*'
5953       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'
5954     fi
5955     hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5956     hardcode_libdir_separator=:
5957     ;;
5958
5959   osf4* | osf5*)        # as osf3* with the addition of -msym flag
5960     if test "$GCC" = yes; then
5961       allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
5962       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'
5963       hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5964     else
5965       allow_undefined_flag=' -expect_unresolved \*'
5966       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'
5967       archive_expsym_cmds='for i in `cat $export_symbols`; do printf "-exported_symbol " >> $lib.exp; echo "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
5968       $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'
5969
5970       #Both c and cxx compiler support -rpath directly
5971       hardcode_libdir_flag_spec='-rpath $libdir'
5972     fi
5973     hardcode_libdir_separator=:
5974     ;;
5975
5976   sco3.2v5*)
5977     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5978     hardcode_shlibpath_var=no
5979     runpath_var=LD_RUN_PATH
5980     hardcode_runpath_var=yes
5981     export_dynamic_flag_spec='${wl}-Bexport'
5982     ;;
5983
5984   solaris*)
5985     # gcc --version < 3.0 without binutils cannot create self contained
5986     # shared libraries reliably, requiring libgcc.a to resolve some of
5987     # the object symbols generated in some cases.  Libraries that use
5988     # assert need libgcc.a to resolve __eprintf, for example.  Linking
5989     # a copy of libgcc.a into every shared library to guarantee resolving
5990     # such symbols causes other problems:  According to Tim Van Holder
5991     # <tim.van.holder@pandora.be>, C++ libraries end up with a separate
5992     # (to the application) exception stack for one thing.
5993     no_undefined_flag=' -z defs'
5994     if test "$GCC" = yes; then
5995       case `$CC --version 2>/dev/null` in
5996       [12].*)
5997         cat <<EOF 1>&2
5998
5999 *** Warning: Releases of GCC earlier than version 3.0 cannot reliably
6000 *** create self contained shared libraries on Solaris systems, without
6001 *** introducing a dependency on libgcc.a.  Therefore, libtool is disabling
6002 *** -no-undefined support, which will at least allow you to build shared
6003 *** libraries.  However, you may find that when you link such libraries
6004 *** into an application without using GCC, you have to manually add
6005 *** \`gcc --print-libgcc-file-name\` to the link command.  We urge you to
6006 *** upgrade to a newer version of GCC.  Another option is to rebuild your
6007 *** current GCC to use the GNU linker from GNU binutils 2.9.1 or newer.
6008
6009 EOF
6010         no_undefined_flag=
6011         ;;
6012       esac
6013     fi
6014     # $CC -shared without GNU ld will not create a library from C++
6015     # object files and a static libstdc++, better avoid it by now
6016     archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
6017     archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
6018                 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
6019     hardcode_libdir_flag_spec='-R$libdir'
6020     hardcode_shlibpath_var=no
6021     case $host_os in
6022     solaris2.[0-5] | solaris2.[0-5].*) ;;
6023     *) # Supported since Solaris 2.6 (maybe 2.5.1?)
6024       whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;;
6025     esac
6026     link_all_deplibs=yes
6027     ;;
6028
6029   sunos4*)
6030     if test "x$host_vendor" = xsequent; then
6031       # Use $CC to link under sequent, because it throws in some extra .o
6032       # files that make .init and .fini sections work.
6033       archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
6034     else
6035       archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
6036     fi
6037     hardcode_libdir_flag_spec='-L$libdir'
6038     hardcode_direct=yes
6039     hardcode_minus_L=yes
6040     hardcode_shlibpath_var=no
6041     ;;
6042
6043   sysv4)
6044     case $host_vendor in
6045       sni)
6046         archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6047         hardcode_direct=yes # is this really true???
6048         ;;
6049       siemens)
6050         ## LD is ld it makes a PLAMLIB
6051         ## CC just makes a GrossModule.
6052         archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
6053         reload_cmds='$CC -r -o $output$reload_objs'
6054         hardcode_direct=no
6055         ;;
6056       motorola)
6057         archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6058         hardcode_direct=no #Motorola manual says yes, but my tests say they lie
6059         ;;
6060     esac
6061     runpath_var='LD_RUN_PATH'
6062     hardcode_shlibpath_var=no
6063     ;;
6064
6065   sysv4.3*)
6066     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6067     hardcode_shlibpath_var=no
6068     export_dynamic_flag_spec='-Bexport'
6069     ;;
6070
6071   sysv5*)
6072     no_undefined_flag=' -z text'
6073     # $CC -shared without GNU ld will not create a library from C++
6074     # object files and a static libstdc++, better avoid it by now
6075     archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
6076     archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
6077                 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
6078     hardcode_libdir_flag_spec=
6079     hardcode_shlibpath_var=no
6080     runpath_var='LD_RUN_PATH'
6081     ;;
6082
6083   uts4*)
6084     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6085     hardcode_libdir_flag_spec='-L$libdir'
6086     hardcode_shlibpath_var=no
6087     ;;
6088
6089   dgux*)
6090     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6091     hardcode_libdir_flag_spec='-L$libdir'
6092     hardcode_shlibpath_var=no
6093     ;;
6094
6095   sysv4*MP*)
6096     if test -d /usr/nec; then
6097       archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6098       hardcode_shlibpath_var=no
6099       runpath_var=LD_RUN_PATH
6100       hardcode_runpath_var=yes
6101       ld_shlibs=yes
6102     fi
6103     ;;
6104
6105   sysv4.2uw2*)
6106     archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
6107     hardcode_direct=yes
6108     hardcode_minus_L=no
6109     hardcode_shlibpath_var=no
6110     hardcode_runpath_var=yes
6111     runpath_var=LD_RUN_PATH
6112     ;;
6113
6114   sysv5uw7* | unixware7*)
6115     no_undefined_flag='${wl}-z ${wl}text'
6116     if test "$GCC" = yes; then
6117       archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6118     else
6119       archive_cmds='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6120     fi
6121     runpath_var='LD_RUN_PATH'
6122     hardcode_shlibpath_var=no
6123     ;;
6124
6125   *)
6126     ld_shlibs=no
6127     ;;
6128   esac
6129 fi
6130 echo "$ac_t""$ld_shlibs" 1>&6
6131 test "$ld_shlibs" = no && can_build_shared=no
6132
6133 # Check hardcoding attributes.
6134 echo $ac_n "checking how to hardcode library paths into programs""... $ac_c" 1>&6
6135 echo "configure:6136: checking how to hardcode library paths into programs" >&5
6136 hardcode_action=
6137 if test -n "$hardcode_libdir_flag_spec" || \
6138    test -n "$runpath_var"; then
6139
6140   # We can hardcode non-existant directories.
6141   if test "$hardcode_direct" != no &&
6142      # If the only mechanism to avoid hardcoding is shlibpath_var, we
6143      # have to relink, otherwise we might link with an installed library
6144      # when we should be linking with a yet-to-be-installed one
6145      ## test "$hardcode_shlibpath_var" != no &&
6146      test "$hardcode_minus_L" != no; then
6147     # Linking always hardcodes the temporary library directory.
6148     hardcode_action=relink
6149   else
6150     # We can link without hardcoding, and we can hardcode nonexisting dirs.
6151     hardcode_action=immediate
6152   fi
6153 else
6154   # We cannot hardcode anything, or else we can only hardcode existing
6155   # directories.
6156   hardcode_action=unsupported
6157 fi
6158 echo "$ac_t""$hardcode_action" 1>&6
6159
6160 striplib=
6161 old_striplib=
6162 echo $ac_n "checking whether stripping libraries is possible""... $ac_c" 1>&6
6163 echo "configure:6164: checking whether stripping libraries is possible" >&5
6164 if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
6165   test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
6166   test -z "$striplib" && striplib="$STRIP --strip-unneeded"
6167   echo "$ac_t""yes" 1>&6
6168 else
6169   echo "$ac_t""no" 1>&6
6170 fi
6171
6172 reload_cmds='$LD$reload_flag -o $output$reload_objs'
6173 test -z "$deplibs_check_method" && deplibs_check_method=unknown
6174
6175 # PORTME Fill in your ld.so characteristics
6176 echo $ac_n "checking dynamic linker characteristics""... $ac_c" 1>&6
6177 echo "configure:6178: checking dynamic linker characteristics" >&5
6178 library_names_spec=
6179 libname_spec='lib$name'
6180 soname_spec=
6181 postinstall_cmds=
6182 postuninstall_cmds=
6183 finish_cmds=
6184 finish_eval=
6185 shlibpath_var=
6186 shlibpath_overrides_runpath=unknown
6187 version_type=none
6188 dynamic_linker="$host_os ld.so"
6189 sys_lib_dlsearch_path_spec="/lib /usr/lib"
6190 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
6191
6192 case $host_os in
6193 aix3*)
6194   version_type=linux
6195   library_names_spec='${libname}${release}.so$versuffix $libname.a'
6196   shlibpath_var=LIBPATH
6197
6198   # AIX has no versioning support, so we append a major version to the name.
6199   soname_spec='${libname}${release}.so$major'
6200   ;;
6201
6202 aix4* | aix5*)
6203   version_type=linux
6204   need_lib_prefix=no
6205   need_version=no
6206   hardcode_into_libs=yes
6207   if test "$host_cpu" = ia64; then
6208     # AIX 5 supports IA64
6209     library_names_spec='${libname}${release}.so$major ${libname}${release}.so$versuffix $libname.so'
6210     shlibpath_var=LD_LIBRARY_PATH
6211   else
6212     # With GCC up to 2.95.x, collect2 would create an import file
6213     # for dependence libraries.  The import file would start with
6214     # the line `#! .'.  This would cause the generated library to
6215     # depend on `.', always an invalid library.  This was fixed in
6216     # development snapshots of GCC prior to 3.0.
6217     case $host_os in
6218       aix4 | aix4.[01] | aix4.[01].*)
6219         if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
6220              echo ' yes '
6221              echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
6222           :
6223         else
6224           can_build_shared=no
6225         fi
6226         ;;
6227     esac
6228     # AIX (on Power*) has no versioning support, so currently we can
6229     # not hardcode correct soname into executable. Probably we can
6230     # add versioning support to collect2, so additional links can
6231     # be useful in future.
6232     if test "$aix_use_runtimelinking" = yes; then
6233       # If using run time linking (on AIX 4.2 or later) use lib<name>.so
6234       # instead of lib<name>.a to let people know that these are not
6235       # typical AIX shared libraries.
6236       library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6237     else
6238       # We preserve .a as extension for shared libraries through AIX4.2
6239       # and later when we are not doing run time linking.
6240       library_names_spec='${libname}${release}.a $libname.a'
6241       soname_spec='${libname}${release}.so$major'
6242     fi
6243     shlibpath_var=LIBPATH
6244   fi
6245   hardcode_into_libs=yes
6246   ;;
6247
6248 amigaos*)
6249   library_names_spec='$libname.ixlibrary $libname.a'
6250   # Create ${libname}_ixlibrary.a entries in /sys/libs.
6251   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'
6252   ;;
6253
6254 beos*)
6255   library_names_spec='${libname}.so'
6256   dynamic_linker="$host_os ld.so"
6257   shlibpath_var=LIBRARY_PATH
6258   ;;
6259
6260 bsdi4*)
6261   version_type=linux
6262   need_version=no
6263   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6264   soname_spec='${libname}${release}.so$major'
6265   finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
6266   shlibpath_var=LD_LIBRARY_PATH
6267   sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
6268   sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
6269   export_dynamic_flag_spec=-rdynamic
6270   # the default ld.so.conf also contains /usr/contrib/lib and
6271   # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
6272   # libtool to hard-code these into programs
6273   ;;
6274
6275 cygwin* | mingw* | pw32*)
6276   version_type=windows
6277   need_version=no
6278   need_lib_prefix=no
6279   case $GCC,$host_os in
6280   yes,cygwin*)
6281     library_names_spec='$libname.dll.a'
6282     soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
6283     postinstall_cmds='dlpath=`bash 2>&1 -c '\''. $dir/${file}i;echo \$dlname'\''`~
6284       dldir=$destdir/`dirname \$dlpath`~
6285       test -d \$dldir || mkdir -p \$dldir~
6286       $install_prog .libs/$dlname \$dldir/$dlname'
6287     postuninstall_cmds='dldll=`bash 2>&1 -c '\''. $file; echo \$dlname'\''`~
6288       dlpath=$dir/\$dldll~
6289        $rm \$dlpath'
6290     ;;
6291   yes,mingw*)
6292     library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
6293     sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | sed -e "s/^libraries://" -e "s/;/ /g" -e "s,=/,/,g"`
6294     ;;
6295   yes,pw32*)
6296     library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | sed -e 's/./-/g'`${versuffix}.dll'
6297     ;;
6298   *)
6299     library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll $libname.lib'
6300     ;;
6301   esac
6302   dynamic_linker='Win32 ld.exe'
6303   # FIXME: first we should search . and the directory the executable is in
6304   shlibpath_var=PATH
6305   ;;
6306
6307 darwin* | rhapsody*)
6308   dynamic_linker="$host_os dyld"
6309   version_type=darwin
6310   need_lib_prefix=no
6311   need_version=no
6312   # FIXME: Relying on posixy $() will cause problems for
6313   #        cross-compilation, but unfortunately the echo tests do not
6314   #        yet detect zsh echo's removal of \ escapes.
6315   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)'
6316   soname_spec='${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib)'
6317   shlibpath_overrides_runpath=yes
6318   shlibpath_var=DYLD_LIBRARY_PATH
6319   ;;
6320
6321 freebsd1*)
6322   dynamic_linker=no
6323   ;;
6324
6325 freebsd*)
6326   objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
6327   version_type=freebsd-$objformat
6328   case $version_type in
6329     freebsd-elf*)
6330       library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
6331       need_version=no
6332       need_lib_prefix=no
6333       ;;
6334     freebsd-*)
6335       library_names_spec='${libname}${release}.so$versuffix $libname.so$versuffix'
6336       need_version=yes
6337       ;;
6338   esac
6339   shlibpath_var=LD_LIBRARY_PATH
6340   case $host_os in
6341   freebsd2*)
6342     shlibpath_overrides_runpath=yes
6343     ;;
6344   *)
6345     shlibpath_overrides_runpath=no
6346     hardcode_into_libs=yes
6347     ;;
6348   esac
6349   ;;
6350
6351 gnu*)
6352   version_type=linux
6353   need_lib_prefix=no
6354   need_version=no
6355   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so${major} ${libname}.so'
6356   soname_spec='${libname}${release}.so$major'
6357   shlibpath_var=LD_LIBRARY_PATH
6358   hardcode_into_libs=yes
6359   ;;
6360
6361 hpux9* | hpux10* | hpux11*)
6362   # Give a soname corresponding to the major version so that dld.sl refuses to
6363   # link against other versions.
6364   dynamic_linker="$host_os dld.sl"
6365   version_type=sunos
6366   need_lib_prefix=no
6367   need_version=no
6368   shlibpath_var=SHLIB_PATH
6369   shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
6370   library_names_spec='${libname}${release}.sl$versuffix ${libname}${release}.sl$major $libname.sl'
6371   soname_spec='${libname}${release}.sl$major'
6372   # HP-UX runs *really* slowly unless shared libraries are mode 555.
6373   postinstall_cmds='chmod 555 $lib'
6374   ;;
6375
6376 irix5* | irix6* | nonstopux*)
6377   case $host_os in
6378     nonstopux*) version_type=nonstopux ;;
6379     *)          version_type=irix ;;
6380   esac
6381   need_lib_prefix=no
6382   need_version=no
6383   soname_spec='${libname}${release}.so$major'
6384   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so $libname.so'
6385   case $host_os in
6386   irix5* | nonstopux*)
6387     libsuff= shlibsuff=
6388     ;;
6389   *)
6390     case $LD in # libtool.m4 will add one of these switches to LD
6391     *-32|*"-32 ") libsuff= shlibsuff= libmagic=32-bit;;
6392     *-n32|*"-n32 ") libsuff=32 shlibsuff=N32 libmagic=N32;;
6393     *-64|*"-64 ") libsuff=64 shlibsuff=64 libmagic=64-bit;;
6394     *) libsuff= shlibsuff= libmagic=never-match;;
6395     esac
6396     ;;
6397   esac
6398   shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
6399   shlibpath_overrides_runpath=no
6400   sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
6401   sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
6402   ;;
6403
6404 # No shared lib support for Linux oldld, aout, or coff.
6405 linux-gnuoldld* | linux-gnuaout* | linux-gnucoff*)
6406   dynamic_linker=no
6407   ;;
6408
6409 # This must be Linux ELF.
6410 linux-gnu*)
6411   version_type=linux
6412   need_lib_prefix=no
6413   need_version=no
6414   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6415   soname_spec='${libname}${release}.so$major'
6416   finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
6417   shlibpath_var=LD_LIBRARY_PATH
6418   shlibpath_overrides_runpath=no
6419   # This implies no fast_install, which is unacceptable.
6420   # Some rework will be needed to allow for fast_install
6421   # before this can be enabled.
6422   hardcode_into_libs=yes
6423
6424   # We used to test for /lib/ld.so.1 and disable shared libraries on
6425   # powerpc, because MkLinux only supported shared libraries with the
6426   # GNU dynamic linker.  Since this was broken with cross compilers,
6427   # most powerpc-linux boxes support dynamic linking these days and
6428   # people can always --disable-shared, the test was removed, and we
6429   # assume the GNU/Linux dynamic linker is in use.
6430   dynamic_linker='GNU/Linux ld.so'
6431   ;;
6432
6433 netbsd*)
6434   version_type=sunos
6435   need_lib_prefix=no
6436   need_version=no
6437   if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
6438     library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
6439     finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
6440     dynamic_linker='NetBSD (a.out) ld.so'
6441   else
6442     library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so ${libname}.so'
6443     soname_spec='${libname}${release}.so$major'
6444     dynamic_linker='NetBSD ld.elf_so'
6445   fi
6446   shlibpath_var=LD_LIBRARY_PATH
6447   shlibpath_overrides_runpath=yes
6448   hardcode_into_libs=yes
6449   ;;
6450
6451 newsos6)
6452   version_type=linux
6453   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6454   shlibpath_var=LD_LIBRARY_PATH
6455   shlibpath_overrides_runpath=yes
6456   ;;
6457
6458 openbsd*)
6459   version_type=sunos
6460   need_lib_prefix=no
6461   need_version=no
6462   if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
6463     case "$host_os" in
6464     openbsd2.[89] | openbsd2.[89].*)
6465       shlibpath_overrides_runpath=no
6466       ;;
6467     *)
6468       shlibpath_overrides_runpath=yes
6469       ;;
6470     esac
6471   else
6472     shlibpath_overrides_runpath=yes
6473   fi
6474   library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
6475   finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
6476   shlibpath_var=LD_LIBRARY_PATH
6477   ;;
6478
6479 os2*)
6480   libname_spec='$name'
6481   need_lib_prefix=no
6482   library_names_spec='$libname.dll $libname.a'
6483   dynamic_linker='OS/2 ld.exe'
6484   shlibpath_var=LIBPATH
6485   ;;
6486
6487 osf3* | osf4* | osf5*)
6488   version_type=osf
6489   need_version=no
6490   soname_spec='${libname}${release}.so$major'
6491   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6492   shlibpath_var=LD_LIBRARY_PATH
6493   sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
6494   sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
6495   hardcode_into_libs=yes
6496   ;;
6497
6498 sco3.2v5*)
6499   version_type=osf
6500   soname_spec='${libname}${release}.so$major'
6501   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6502   shlibpath_var=LD_LIBRARY_PATH
6503   ;;
6504
6505 solaris*)
6506   version_type=linux
6507   need_lib_prefix=no
6508   need_version=no
6509   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6510   soname_spec='${libname}${release}.so$major'
6511   shlibpath_var=LD_LIBRARY_PATH
6512   shlibpath_overrides_runpath=yes
6513   hardcode_into_libs=yes
6514   # ldd complains unless libraries are executable
6515   postinstall_cmds='chmod +x $lib'
6516   ;;
6517
6518 sunos4*)
6519   version_type=sunos
6520   library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
6521   finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
6522   shlibpath_var=LD_LIBRARY_PATH
6523   shlibpath_overrides_runpath=yes
6524   if test "$with_gnu_ld" = yes; then
6525     need_lib_prefix=no
6526   fi
6527   need_version=yes
6528   ;;
6529
6530 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
6531   version_type=linux
6532   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6533   soname_spec='${libname}${release}.so$major'
6534   shlibpath_var=LD_LIBRARY_PATH
6535   case $host_vendor in
6536     sni)
6537       shlibpath_overrides_runpath=no
6538       need_lib_prefix=no
6539       export_dynamic_flag_spec='${wl}-Blargedynsym'
6540       runpath_var=LD_RUN_PATH
6541       ;;
6542     siemens)
6543       need_lib_prefix=no
6544       ;;
6545     motorola)
6546       need_lib_prefix=no
6547       need_version=no
6548       shlibpath_overrides_runpath=no
6549       sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
6550       ;;
6551   esac
6552   ;;
6553
6554 uts4*)
6555   version_type=linux
6556   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6557   soname_spec='${libname}${release}.so$major'
6558   shlibpath_var=LD_LIBRARY_PATH
6559   ;;
6560
6561 dgux*)
6562   version_type=linux
6563   need_lib_prefix=no
6564   need_version=no
6565   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6566   soname_spec='${libname}${release}.so$major'
6567   shlibpath_var=LD_LIBRARY_PATH
6568   ;;
6569
6570 sysv4*MP*)
6571   if test -d /usr/nec ;then
6572     version_type=linux
6573     library_names_spec='$libname.so.$versuffix $libname.so.$major $libname.so'
6574     soname_spec='$libname.so.$major'
6575     shlibpath_var=LD_LIBRARY_PATH
6576   fi
6577   ;;
6578
6579 *)
6580   dynamic_linker=no
6581   ;;
6582 esac
6583 echo "$ac_t""$dynamic_linker" 1>&6
6584 test "$dynamic_linker" = no && can_build_shared=no
6585
6586 # Report the final consequences.
6587 echo $ac_n "checking if libtool supports shared libraries""... $ac_c" 1>&6
6588 echo "configure:6589: checking if libtool supports shared libraries" >&5
6589 echo "$ac_t""$can_build_shared" 1>&6
6590
6591 echo $ac_n "checking whether to build shared libraries""... $ac_c" 1>&6
6592 echo "configure:6593: checking whether to build shared libraries" >&5
6593 test "$can_build_shared" = "no" && enable_shared=no
6594
6595 # On AIX, shared libraries and static libraries use the same namespace, and
6596 # are all built from PIC.
6597 case "$host_os" in
6598 aix3*)
6599   test "$enable_shared" = yes && enable_static=no
6600   if test -n "$RANLIB"; then
6601     archive_cmds="$archive_cmds~\$RANLIB \$lib"
6602     postinstall_cmds='$RANLIB $lib'
6603   fi
6604   ;;
6605
6606 aix4*)
6607   if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
6608     test "$enable_shared" = yes && enable_static=no
6609   fi
6610   ;;
6611 esac
6612 echo "$ac_t""$enable_shared" 1>&6
6613
6614 echo $ac_n "checking whether to build static libraries""... $ac_c" 1>&6
6615 echo "configure:6616: checking whether to build static libraries" >&5
6616 # Make sure either enable_shared or enable_static is yes.
6617 test "$enable_shared" = yes || enable_static=yes
6618 echo "$ac_t""$enable_static" 1>&6
6619
6620 if test "$hardcode_action" = relink; then
6621   # Fast installation is not supported
6622   enable_fast_install=no
6623 elif test "$shlibpath_overrides_runpath" = yes ||
6624      test "$enable_shared" = no; then
6625   # Fast installation is not necessary
6626   enable_fast_install=needless
6627 fi
6628
6629 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
6630 if test "$GCC" = yes; then
6631   variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
6632 fi
6633
6634 if test "x$enable_dlopen" != xyes; then
6635   enable_dlopen=unknown
6636   enable_dlopen_self=unknown
6637   enable_dlopen_self_static=unknown
6638 else
6639   lt_cv_dlopen=no
6640   lt_cv_dlopen_libs=
6641
6642   case $host_os in
6643   beos*)
6644     lt_cv_dlopen="load_add_on"
6645     lt_cv_dlopen_libs=
6646     lt_cv_dlopen_self=yes
6647     ;;
6648
6649   cygwin* | mingw* | pw32*)
6650     lt_cv_dlopen="LoadLibrary"
6651     lt_cv_dlopen_libs=
6652    ;;
6653
6654   *)
6655     echo $ac_n "checking for shl_load""... $ac_c" 1>&6
6656 echo "configure:6657: checking for shl_load" >&5
6657 if eval "test \"\${ac_cv_func_shl_load+set}\" = set"; then
6658   echo $ac_n "(cached) $ac_c" 1>&6
6659 else
6660   cat > conftest.$ac_ext <<EOF
6661 #line 6662 "configure"
6662 #include "confdefs.h"
6663 /* System header to define __stub macros and hopefully few prototypes,
6664     which can conflict with char shl_load(); below.  */
6665 #include <assert.h>
6666 /* Override any gcc2 internal prototype to avoid an error.  */
6667 /* We use char because int might match the return type of a gcc2
6668     builtin and then its argument prototype would still apply.  */
6669 char shl_load();
6670 char (*f)();
6671
6672 int main() {
6673
6674 /* The GNU C library defines this for functions which it implements
6675     to always fail with ENOSYS.  Some functions are actually named
6676     something starting with __ and the normal name is an alias.  */
6677 #if defined (__stub_shl_load) || defined (__stub___shl_load)
6678 choke me
6679 #else
6680 f = shl_load;
6681 #endif
6682
6683 ; return 0; }
6684 EOF
6685 if { (eval echo configure:6686: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6686   rm -rf conftest*
6687   eval "ac_cv_func_shl_load=yes"
6688 else
6689   echo "configure: failed program was:" >&5
6690   cat conftest.$ac_ext >&5
6691   rm -rf conftest*
6692   eval "ac_cv_func_shl_load=no"
6693 fi
6694 rm -f conftest*
6695 fi
6696
6697 if eval "test \"`echo '$ac_cv_func_'shl_load`\" = yes"; then
6698   echo "$ac_t""yes" 1>&6
6699   lt_cv_dlopen="shl_load"
6700 else
6701   echo "$ac_t""no" 1>&6
6702 echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
6703 echo "configure:6704: checking for shl_load in -ldld" >&5
6704 ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-:%__p__%'`
6705 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6706   echo $ac_n "(cached) $ac_c" 1>&6
6707 else
6708   ac_save_LIBS="$LIBS"
6709 LIBS="-ldld  $LIBS"
6710 cat > conftest.$ac_ext <<EOF
6711 #line 6712 "configure"
6712 #include "confdefs.h"
6713 /* Override any gcc2 internal prototype to avoid an error.  */
6714 /* We use char because int might match the return type of a gcc2
6715     builtin and then its argument prototype would still apply.  */
6716 char shl_load();
6717
6718 int main() {
6719 shl_load()
6720 ; return 0; }
6721 EOF
6722 if { (eval echo configure:6723: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6723   rm -rf conftest*
6724   eval "ac_cv_lib_$ac_lib_var=yes"
6725 else
6726   echo "configure: failed program was:" >&5
6727   cat conftest.$ac_ext >&5
6728   rm -rf conftest*
6729   eval "ac_cv_lib_$ac_lib_var=no"
6730 fi
6731 rm -f conftest*
6732 LIBS="$ac_save_LIBS"
6733
6734 fi
6735 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6736   echo "$ac_t""yes" 1>&6
6737   lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"
6738 else
6739   echo "$ac_t""no" 1>&6
6740 echo $ac_n "checking for dlopen""... $ac_c" 1>&6
6741 echo "configure:6742: checking for dlopen" >&5
6742 if eval "test \"\${ac_cv_func_dlopen+set}\" = set"; then
6743   echo $ac_n "(cached) $ac_c" 1>&6
6744 else
6745   cat > conftest.$ac_ext <<EOF
6746 #line 6747 "configure"
6747 #include "confdefs.h"
6748 /* System header to define __stub macros and hopefully few prototypes,
6749     which can conflict with char dlopen(); below.  */
6750 #include <assert.h>
6751 /* Override any gcc2 internal prototype to avoid an error.  */
6752 /* We use char because int might match the return type of a gcc2
6753     builtin and then its argument prototype would still apply.  */
6754 char dlopen();
6755 char (*f)();
6756
6757 int main() {
6758
6759 /* The GNU C library defines this for functions which it implements
6760     to always fail with ENOSYS.  Some functions are actually named
6761     something starting with __ and the normal name is an alias.  */
6762 #if defined (__stub_dlopen) || defined (__stub___dlopen)
6763 choke me
6764 #else
6765 f = dlopen;
6766 #endif
6767
6768 ; return 0; }
6769 EOF
6770 if { (eval echo configure:6771: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6771   rm -rf conftest*
6772   eval "ac_cv_func_dlopen=yes"
6773 else
6774   echo "configure: failed program was:" >&5
6775   cat conftest.$ac_ext >&5
6776   rm -rf conftest*
6777   eval "ac_cv_func_dlopen=no"
6778 fi
6779 rm -f conftest*
6780 fi
6781
6782 if eval "test \"`echo '$ac_cv_func_'dlopen`\" = yes"; then
6783   echo "$ac_t""yes" 1>&6
6784   lt_cv_dlopen="dlopen"
6785 else
6786   echo "$ac_t""no" 1>&6
6787 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
6788 echo "configure:6789: checking for dlopen in -ldl" >&5
6789 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-:%__p__%'`
6790 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6791   echo $ac_n "(cached) $ac_c" 1>&6
6792 else
6793   ac_save_LIBS="$LIBS"
6794 LIBS="-ldl  $LIBS"
6795 cat > conftest.$ac_ext <<EOF
6796 #line 6797 "configure"
6797 #include "confdefs.h"
6798 /* Override any gcc2 internal prototype to avoid an error.  */
6799 /* We use char because int might match the return type of a gcc2
6800     builtin and then its argument prototype would still apply.  */
6801 char dlopen();
6802
6803 int main() {
6804 dlopen()
6805 ; return 0; }
6806 EOF
6807 if { (eval echo configure:6808: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6808   rm -rf conftest*
6809   eval "ac_cv_lib_$ac_lib_var=yes"
6810 else
6811   echo "configure: failed program was:" >&5
6812   cat conftest.$ac_ext >&5
6813   rm -rf conftest*
6814   eval "ac_cv_lib_$ac_lib_var=no"
6815 fi
6816 rm -f conftest*
6817 LIBS="$ac_save_LIBS"
6818
6819 fi
6820 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6821   echo "$ac_t""yes" 1>&6
6822   lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
6823 else
6824   echo "$ac_t""no" 1>&6
6825 echo $ac_n "checking for dlopen in -lsvld""... $ac_c" 1>&6
6826 echo "configure:6827: checking for dlopen in -lsvld" >&5
6827 ac_lib_var=`echo svld'_'dlopen | sed 'y%./+-:%__p__%'`
6828 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6829   echo $ac_n "(cached) $ac_c" 1>&6
6830 else
6831   ac_save_LIBS="$LIBS"
6832 LIBS="-lsvld  $LIBS"
6833 cat > conftest.$ac_ext <<EOF
6834 #line 6835 "configure"
6835 #include "confdefs.h"
6836 /* Override any gcc2 internal prototype to avoid an error.  */
6837 /* We use char because int might match the return type of a gcc2
6838     builtin and then its argument prototype would still apply.  */
6839 char dlopen();
6840
6841 int main() {
6842 dlopen()
6843 ; return 0; }
6844 EOF
6845 if { (eval echo configure:6846: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6846   rm -rf conftest*
6847   eval "ac_cv_lib_$ac_lib_var=yes"
6848 else
6849   echo "configure: failed program was:" >&5
6850   cat conftest.$ac_ext >&5
6851   rm -rf conftest*
6852   eval "ac_cv_lib_$ac_lib_var=no"
6853 fi
6854 rm -f conftest*
6855 LIBS="$ac_save_LIBS"
6856
6857 fi
6858 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6859   echo "$ac_t""yes" 1>&6
6860   lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"
6861 else
6862   echo "$ac_t""no" 1>&6
6863 echo $ac_n "checking for dld_link in -ldld""... $ac_c" 1>&6
6864 echo "configure:6865: checking for dld_link in -ldld" >&5
6865 ac_lib_var=`echo dld'_'dld_link | sed 'y%./+-:%__p__%'`
6866 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6867   echo $ac_n "(cached) $ac_c" 1>&6
6868 else
6869   ac_save_LIBS="$LIBS"
6870 LIBS="-ldld  $LIBS"
6871 cat > conftest.$ac_ext <<EOF
6872 #line 6873 "configure"
6873 #include "confdefs.h"
6874 /* Override any gcc2 internal prototype to avoid an error.  */
6875 /* We use char because int might match the return type of a gcc2
6876     builtin and then its argument prototype would still apply.  */
6877 char dld_link();
6878
6879 int main() {
6880 dld_link()
6881 ; return 0; }
6882 EOF
6883 if { (eval echo configure:6884: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6884   rm -rf conftest*
6885   eval "ac_cv_lib_$ac_lib_var=yes"
6886 else
6887   echo "configure: failed program was:" >&5
6888   cat conftest.$ac_ext >&5
6889   rm -rf conftest*
6890   eval "ac_cv_lib_$ac_lib_var=no"
6891 fi
6892 rm -f conftest*
6893 LIBS="$ac_save_LIBS"
6894
6895 fi
6896 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6897   echo "$ac_t""yes" 1>&6
6898   lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"
6899 else
6900   echo "$ac_t""no" 1>&6
6901 fi
6902
6903               
6904 fi
6905
6906             
6907 fi
6908
6909           
6910 fi
6911
6912         
6913 fi
6914
6915       
6916 fi
6917
6918     ;;
6919   esac
6920
6921   if test "x$lt_cv_dlopen" != xno; then
6922     enable_dlopen=yes
6923   else
6924     enable_dlopen=no
6925   fi
6926
6927   case $lt_cv_dlopen in
6928   dlopen)
6929     save_CPPFLAGS="$CPPFLAGS"
6930         test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
6931
6932     save_LDFLAGS="$LDFLAGS"
6933     eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
6934
6935     save_LIBS="$LIBS"
6936     LIBS="$lt_cv_dlopen_libs $LIBS"
6937
6938     echo $ac_n "checking whether a program can dlopen itself""... $ac_c" 1>&6
6939 echo "configure:6940: checking whether a program can dlopen itself" >&5
6940 if eval "test \"\${lt_cv_dlopen_self+set}\" = set"; then
6941   echo $ac_n "(cached) $ac_c" 1>&6
6942 else
6943           if test "$cross_compiling" = yes; then :
6944   lt_cv_dlopen_self=cross
6945 else
6946     lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
6947   lt_status=$lt_dlunknown
6948   cat > conftest.$ac_ext <<EOF
6949 #line 6950 "configure"
6950 #include "confdefs.h"
6951
6952 #if HAVE_DLFCN_H
6953 #include <dlfcn.h>
6954 #endif
6955
6956 #include <stdio.h>
6957
6958 #ifdef RTLD_GLOBAL
6959 #  define LT_DLGLOBAL           RTLD_GLOBAL
6960 #else
6961 #  ifdef DL_GLOBAL
6962 #    define LT_DLGLOBAL         DL_GLOBAL
6963 #  else
6964 #    define LT_DLGLOBAL         0
6965 #  endif
6966 #endif
6967
6968 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
6969    find out it does not work in some platform. */
6970 #ifndef LT_DLLAZY_OR_NOW
6971 #  ifdef RTLD_LAZY
6972 #    define LT_DLLAZY_OR_NOW            RTLD_LAZY
6973 #  else
6974 #    ifdef DL_LAZY
6975 #      define LT_DLLAZY_OR_NOW          DL_LAZY
6976 #    else
6977 #      ifdef RTLD_NOW
6978 #        define LT_DLLAZY_OR_NOW        RTLD_NOW
6979 #      else
6980 #        ifdef DL_NOW
6981 #          define LT_DLLAZY_OR_NOW      DL_NOW
6982 #        else
6983 #          define LT_DLLAZY_OR_NOW      0
6984 #        endif
6985 #      endif
6986 #    endif
6987 #  endif
6988 #endif
6989
6990 #ifdef __cplusplus
6991 extern "C" void exit (int);
6992 #endif
6993
6994 void fnord() { int i=42;}
6995 int main ()
6996 {
6997   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
6998   int status = $lt_dlunknown;
6999
7000   if (self)
7001     {
7002       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
7003       else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
7004       /* dlclose (self); */
7005     }
7006
7007     exit (status);
7008 }
7009 EOF
7010   if { (eval echo configure:7011: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} 2>/dev/null; then
7011     (./conftest; exit; ) 2>/dev/null
7012     lt_status=$?
7013     case x$lt_status in
7014       x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;;
7015       x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;;
7016       x$lt_unknown|x*) lt_cv_dlopen_self=no ;;
7017     esac
7018   else :
7019     # compilation failed
7020     lt_cv_dlopen_self=no
7021   fi
7022 fi
7023 rm -fr conftest*
7024
7025     
7026 fi
7027
7028 echo "$ac_t""$lt_cv_dlopen_self" 1>&6
7029
7030     if test "x$lt_cv_dlopen_self" = xyes; then
7031       LDFLAGS="$LDFLAGS $link_static_flag"
7032       echo $ac_n "checking whether a statically linked program can dlopen itself""... $ac_c" 1>&6
7033 echo "configure:7034: checking whether a statically linked program can dlopen itself" >&5
7034 if eval "test \"\${lt_cv_dlopen_self_static+set}\" = set"; then
7035   echo $ac_n "(cached) $ac_c" 1>&6
7036 else
7037           if test "$cross_compiling" = yes; then :
7038   lt_cv_dlopen_self_static=cross
7039 else
7040     lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
7041   lt_status=$lt_dlunknown
7042   cat > conftest.$ac_ext <<EOF
7043 #line 7044 "configure"
7044 #include "confdefs.h"
7045
7046 #if HAVE_DLFCN_H
7047 #include <dlfcn.h>
7048 #endif
7049
7050 #include <stdio.h>
7051
7052 #ifdef RTLD_GLOBAL
7053 #  define LT_DLGLOBAL           RTLD_GLOBAL
7054 #else
7055 #  ifdef DL_GLOBAL
7056 #    define LT_DLGLOBAL         DL_GLOBAL
7057 #  else
7058 #    define LT_DLGLOBAL         0
7059 #  endif
7060 #endif
7061
7062 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
7063    find out it does not work in some platform. */
7064 #ifndef LT_DLLAZY_OR_NOW
7065 #  ifdef RTLD_LAZY
7066 #    define LT_DLLAZY_OR_NOW            RTLD_LAZY
7067 #  else
7068 #    ifdef DL_LAZY
7069 #      define LT_DLLAZY_OR_NOW          DL_LAZY
7070 #    else
7071 #      ifdef RTLD_NOW
7072 #        define LT_DLLAZY_OR_NOW        RTLD_NOW
7073 #      else
7074 #        ifdef DL_NOW
7075 #          define LT_DLLAZY_OR_NOW      DL_NOW
7076 #        else
7077 #          define LT_DLLAZY_OR_NOW      0
7078 #        endif
7079 #      endif
7080 #    endif
7081 #  endif
7082 #endif
7083
7084 #ifdef __cplusplus
7085 extern "C" void exit (int);
7086 #endif
7087
7088 void fnord() { int i=42;}
7089 int main ()
7090 {
7091   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
7092   int status = $lt_dlunknown;
7093
7094   if (self)
7095     {
7096       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
7097       else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
7098       /* dlclose (self); */
7099     }
7100
7101     exit (status);
7102 }
7103 EOF
7104   if { (eval echo configure:7105: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} 2>/dev/null; then
7105     (./conftest; exit; ) 2>/dev/null
7106     lt_status=$?
7107     case x$lt_status in
7108       x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;;
7109       x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;;
7110       x$lt_unknown|x*) lt_cv_dlopen_self_static=no ;;
7111     esac
7112   else :
7113     # compilation failed
7114     lt_cv_dlopen_self_static=no
7115   fi
7116 fi
7117 rm -fr conftest*
7118
7119       
7120 fi
7121
7122 echo "$ac_t""$lt_cv_dlopen_self_static" 1>&6
7123     fi
7124
7125     CPPFLAGS="$save_CPPFLAGS"
7126     LDFLAGS="$save_LDFLAGS"
7127     LIBS="$save_LIBS"
7128     ;;
7129   esac
7130
7131   case $lt_cv_dlopen_self in
7132   yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
7133   *) enable_dlopen_self=unknown ;;
7134   esac
7135
7136   case $lt_cv_dlopen_self_static in
7137   yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
7138   *) enable_dlopen_self_static=unknown ;;
7139   esac
7140 fi
7141
7142
7143 if test "$enable_shared" = yes && test "$GCC" = yes; then
7144   case $archive_cmds in
7145   *'~'*)
7146     # FIXME: we may have to deal with multi-command sequences.
7147     ;;
7148   '$CC '*)
7149     # Test whether the compiler implicitly links with -lc since on some
7150     # systems, -lgcc has to come before -lc. If gcc already passes -lc
7151     # to ld, don't add -lc before -lgcc.
7152     echo $ac_n "checking whether -lc should be explicitly linked in""... $ac_c" 1>&6
7153 echo "configure:7154: checking whether -lc should be explicitly linked in" >&5
7154     if eval "test \"\${lt_cv_archive_cmds_need_lc+set}\" = set"; then
7155   echo $ac_n "(cached) $ac_c" 1>&6
7156 else
7157   $rm conftest*
7158     echo 'static int dummy;' > conftest.$ac_ext
7159
7160     if { (eval echo configure:7161: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7161       soname=conftest
7162       lib=conftest
7163       libobjs=conftest.$ac_objext
7164       deplibs=
7165       wl=$lt_cv_prog_cc_wl
7166       compiler_flags=-v
7167       linker_flags=-v
7168       verstring=
7169       output_objdir=.
7170       libname=conftest
7171       save_allow_undefined_flag=$allow_undefined_flag
7172       allow_undefined_flag=
7173       if { (eval echo configure:7174: \"$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; }
7174       then
7175         lt_cv_archive_cmds_need_lc=no
7176       else
7177         lt_cv_archive_cmds_need_lc=yes
7178       fi
7179       allow_undefined_flag=$save_allow_undefined_flag
7180     else
7181       cat conftest.err 1>&5
7182     fi
7183 fi
7184
7185     echo "$ac_t""$lt_cv_archive_cmds_need_lc" 1>&6
7186     ;;
7187   esac
7188 fi
7189 need_lc=${lt_cv_archive_cmds_need_lc-yes}
7190
7191 # The second clause should only fire when bootstrapping the
7192 # libtool distribution, otherwise you forgot to ship ltmain.sh
7193 # with your package, and you will get complaints that there are
7194 # no rules to generate ltmain.sh.
7195 if test -f "$ltmain"; then
7196   :
7197 else
7198   # If there is no Makefile yet, we rely on a make rule to execute
7199   # `config.status --recheck' to rerun these tests and create the
7200   # libtool script then.
7201   test -f Makefile && make "$ltmain"
7202 fi
7203
7204 if test -f "$ltmain"; then
7205   trap "$rm \"${ofile}T\"; exit 1" 1 2 15
7206   $rm -f "${ofile}T"
7207
7208   echo creating $ofile
7209
7210   # Now quote all the things that may contain metacharacters while being
7211   # careful not to overquote the AC_SUBSTed values.  We take copies of the
7212   # variables and quote the copies for generation of the libtool script.
7213   for var in echo old_CC old_CFLAGS SED \
7214     AR AR_FLAGS CC LD LN_S NM SHELL \
7215     reload_flag reload_cmds wl \
7216     pic_flag link_static_flag no_builtin_flag export_dynamic_flag_spec \
7217     thread_safe_flag_spec whole_archive_flag_spec libname_spec \
7218     library_names_spec soname_spec \
7219     RANLIB old_archive_cmds old_archive_from_new_cmds old_postinstall_cmds \
7220     old_postuninstall_cmds archive_cmds archive_expsym_cmds postinstall_cmds \
7221     postuninstall_cmds extract_expsyms_cmds old_archive_from_expsyms_cmds \
7222     old_striplib striplib file_magic_cmd export_symbols_cmds \
7223     deplibs_check_method allow_undefined_flag no_undefined_flag \
7224     finish_cmds finish_eval global_symbol_pipe global_symbol_to_cdecl \
7225     global_symbol_to_c_name_address \
7226     hardcode_libdir_flag_spec hardcode_libdir_separator  \
7227     sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
7228     compiler_c_o compiler_o_lo need_locks exclude_expsyms include_expsyms; do
7229
7230     case $var in
7231     reload_cmds | old_archive_cmds | old_archive_from_new_cmds | \
7232     old_postinstall_cmds | old_postuninstall_cmds | \
7233     export_symbols_cmds | archive_cmds | archive_expsym_cmds | \
7234     extract_expsyms_cmds | old_archive_from_expsyms_cmds | \
7235     postinstall_cmds | postuninstall_cmds | \
7236     finish_cmds | sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
7237       # Double-quote double-evaled strings.
7238       eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
7239       ;;
7240     *)
7241       eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
7242       ;;
7243     esac
7244   done
7245
7246   cat <<__EOF__ > "${ofile}T"
7247 #! $SHELL
7248
7249 # `$echo "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
7250 # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
7251 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
7252 #
7253 # Copyright (C) 1996-2000 Free Software Foundation, Inc.
7254 # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
7255 #
7256 # This program is free software; you can redistribute it and/or modify
7257 # it under the terms of the GNU General Public License as published by
7258 # the Free Software Foundation; either version 2 of the License, or
7259 # (at your option) any later version.
7260 #
7261 # This program is distributed in the hope that it will be useful, but
7262 # WITHOUT ANY WARRANTY; without even the implied warranty of
7263 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
7264 # General Public License for more details.
7265 #
7266 # You should have received a copy of the GNU General Public License
7267 # along with this program; if not, write to the Free Software
7268 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
7269 #
7270 # As a special exception to the GNU General Public License, if you
7271 # distribute this file as part of a program that contains a
7272 # configuration script generated by Autoconf, you may include it under
7273 # the same distribution terms that you use for the rest of that program.
7274
7275 # A sed that does not truncate output.
7276 SED=$lt_SED
7277
7278 # Sed that helps us avoid accidentally triggering echo(1) options like -n.
7279 Xsed="${SED} -e s/^X//"
7280
7281 # The HP-UX ksh and POSIX shell print the target directory to stdout
7282 # if CDPATH is set.
7283 if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
7284
7285 # ### BEGIN LIBTOOL CONFIG
7286
7287 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
7288
7289 # Shell to use when invoking shell scripts.
7290 SHELL=$lt_SHELL
7291
7292 # Whether or not to build shared libraries.
7293 build_libtool_libs=$enable_shared
7294
7295 # Whether or not to build static libraries.
7296 build_old_libs=$enable_static
7297
7298 # Whether or not to add -lc for building shared libraries.
7299 build_libtool_need_lc=$need_lc
7300
7301 # Whether or not to optimize for fast installation.
7302 fast_install=$enable_fast_install
7303
7304 # The host system.
7305 host_alias=$host_alias
7306 host=$host
7307
7308 # An echo program that does not interpret backslashes.
7309 echo=$lt_echo
7310
7311 # The archiver.
7312 AR=$lt_AR
7313 AR_FLAGS=$lt_AR_FLAGS
7314
7315 # The default C compiler.
7316 CC=$lt_CC
7317
7318 # Is the compiler the GNU C compiler?
7319 with_gcc=$GCC
7320
7321 # The linker used to build libraries.
7322 LD=$lt_LD
7323
7324 # Whether we need hard or soft links.
7325 LN_S=$lt_LN_S
7326
7327 # A BSD-compatible nm program.
7328 NM=$lt_NM
7329
7330 # A symbol stripping program
7331 STRIP=$STRIP
7332
7333 # Used to examine libraries when file_magic_cmd begins "file"
7334 MAGIC_CMD=$MAGIC_CMD
7335
7336 # Used on cygwin: DLL creation program.
7337 DLLTOOL="$DLLTOOL"
7338
7339 # Used on cygwin: object dumper.
7340 OBJDUMP="$OBJDUMP"
7341
7342 # Used on cygwin: assembler.
7343 AS="$AS"
7344
7345 # The name of the directory that contains temporary libtool files.
7346 objdir=$objdir
7347
7348 # How to create reloadable object files.
7349 reload_flag=$lt_reload_flag
7350 reload_cmds=$lt_reload_cmds
7351
7352 # How to pass a linker flag through the compiler.
7353 wl=$lt_wl
7354
7355 # Object file suffix (normally "o").
7356 objext="$ac_objext"
7357
7358 # Old archive suffix (normally "a").
7359 libext="$libext"
7360
7361 # Executable file suffix (normally "").
7362 exeext="$exeext"
7363
7364 # Additional compiler flags for building library objects.
7365 pic_flag=$lt_pic_flag
7366 pic_mode=$pic_mode
7367
7368 # Does compiler simultaneously support -c and -o options?
7369 compiler_c_o=$lt_compiler_c_o
7370
7371 # Can we write directly to a .lo ?
7372 compiler_o_lo=$lt_compiler_o_lo
7373
7374 # Must we lock files when doing compilation ?
7375 need_locks=$lt_need_locks
7376
7377 # Do we need the lib prefix for modules?
7378 need_lib_prefix=$need_lib_prefix
7379
7380 # Do we need a version for libraries?
7381 need_version=$need_version
7382
7383 # Whether dlopen is supported.
7384 dlopen_support=$enable_dlopen
7385
7386 # Whether dlopen of programs is supported.
7387 dlopen_self=$enable_dlopen_self
7388
7389 # Whether dlopen of statically linked programs is supported.
7390 dlopen_self_static=$enable_dlopen_self_static
7391
7392 # Compiler flag to prevent dynamic linking.
7393 link_static_flag=$lt_link_static_flag
7394
7395 # Compiler flag to turn off builtin functions.
7396 no_builtin_flag=$lt_no_builtin_flag
7397
7398 # Compiler flag to allow reflexive dlopens.
7399 export_dynamic_flag_spec=$lt_export_dynamic_flag_spec
7400
7401 # Compiler flag to generate shared objects directly from archives.
7402 whole_archive_flag_spec=$lt_whole_archive_flag_spec
7403
7404 # Compiler flag to generate thread-safe objects.
7405 thread_safe_flag_spec=$lt_thread_safe_flag_spec
7406
7407 # Library versioning type.
7408 version_type=$version_type
7409
7410 # Format of library name prefix.
7411 libname_spec=$lt_libname_spec
7412
7413 # List of archive names.  First name is the real one, the rest are links.
7414 # The last name is the one that the linker finds with -lNAME.
7415 library_names_spec=$lt_library_names_spec
7416
7417 # The coded name of the library, if different from the real name.
7418 soname_spec=$lt_soname_spec
7419
7420 # Commands used to build and install an old-style archive.
7421 RANLIB=$lt_RANLIB
7422 old_archive_cmds=$lt_old_archive_cmds
7423 old_postinstall_cmds=$lt_old_postinstall_cmds
7424 old_postuninstall_cmds=$lt_old_postuninstall_cmds
7425
7426 # Create an old-style archive from a shared archive.
7427 old_archive_from_new_cmds=$lt_old_archive_from_new_cmds
7428
7429 # Create a temporary old-style archive to link instead of a shared archive.
7430 old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds
7431
7432 # Commands used to build and install a shared archive.
7433 archive_cmds=$lt_archive_cmds
7434 archive_expsym_cmds=$lt_archive_expsym_cmds
7435 postinstall_cmds=$lt_postinstall_cmds
7436 postuninstall_cmds=$lt_postuninstall_cmds
7437
7438 # Commands to strip libraries.
7439 old_striplib=$lt_old_striplib
7440 striplib=$lt_striplib
7441
7442 # Method to check whether dependent libraries are shared objects.
7443 deplibs_check_method=$lt_deplibs_check_method
7444
7445 # Command to use when deplibs_check_method == file_magic.
7446 file_magic_cmd=$lt_file_magic_cmd
7447
7448 # Flag that allows shared libraries with undefined symbols to be built.
7449 allow_undefined_flag=$lt_allow_undefined_flag
7450
7451 # Flag that forces no undefined symbols.
7452 no_undefined_flag=$lt_no_undefined_flag
7453
7454 # Commands used to finish a libtool library installation in a directory.
7455 finish_cmds=$lt_finish_cmds
7456
7457 # Same as above, but a single script fragment to be evaled but not shown.
7458 finish_eval=$lt_finish_eval
7459
7460 # Take the output of nm and produce a listing of raw symbols and C names.
7461 global_symbol_pipe=$lt_global_symbol_pipe
7462
7463 # Transform the output of nm in a proper C declaration
7464 global_symbol_to_cdecl=$lt_global_symbol_to_cdecl
7465
7466 # Transform the output of nm in a C name address pair
7467 global_symbol_to_c_name_address=$lt_global_symbol_to_c_name_address
7468
7469 # This is the shared library runtime path variable.
7470 runpath_var=$runpath_var
7471
7472 # This is the shared library path variable.
7473 shlibpath_var=$shlibpath_var
7474
7475 # Is shlibpath searched before the hard-coded library search path?
7476 shlibpath_overrides_runpath=$shlibpath_overrides_runpath
7477
7478 # How to hardcode a shared library path into an executable.
7479 hardcode_action=$hardcode_action
7480
7481 # Whether we should hardcode library paths into libraries.
7482 hardcode_into_libs=$hardcode_into_libs
7483
7484 # Flag to hardcode \$libdir into a binary during linking.
7485 # This must work even if \$libdir does not exist.
7486 hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
7487
7488 # Whether we need a single -rpath flag with a separated argument.
7489 hardcode_libdir_separator=$lt_hardcode_libdir_separator
7490
7491 # Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
7492 # resulting binary.
7493 hardcode_direct=$hardcode_direct
7494
7495 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
7496 # resulting binary.
7497 hardcode_minus_L=$hardcode_minus_L
7498
7499 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
7500 # the resulting binary.
7501 hardcode_shlibpath_var=$hardcode_shlibpath_var
7502
7503 # Variables whose values should be saved in libtool wrapper scripts and
7504 # restored at relink time.
7505 variables_saved_for_relink="$variables_saved_for_relink"
7506
7507 # Whether libtool must link a program against all its dependency libraries.
7508 link_all_deplibs=$link_all_deplibs
7509
7510 # Compile-time system search path for libraries
7511 sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
7512
7513 # Run-time system search path for libraries
7514 sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
7515
7516 # Fix the shell variable \$srcfile for the compiler.
7517 fix_srcfile_path="$fix_srcfile_path"
7518
7519 # Set to yes if exported symbols are required.
7520 always_export_symbols=$always_export_symbols
7521
7522 # The commands to list exported symbols.
7523 export_symbols_cmds=$lt_export_symbols_cmds
7524
7525 # The commands to extract the exported symbol list from a shared archive.
7526 extract_expsyms_cmds=$lt_extract_expsyms_cmds
7527
7528 # Symbols that should not be listed in the preloaded symbols.
7529 exclude_expsyms=$lt_exclude_expsyms
7530
7531 # Symbols that must always be exported.
7532 include_expsyms=$lt_include_expsyms
7533
7534 # ### END LIBTOOL CONFIG
7535
7536 __EOF__
7537
7538   case $host_os in
7539   aix3*)
7540     cat <<\EOF >> "${ofile}T"
7541
7542 # AIX sometimes has problems with the GCC collect2 program.  For some
7543 # reason, if we set the COLLECT_NAMES environment variable, the problems
7544 # vanish in a puff of smoke.
7545 if test "X${COLLECT_NAMES+set}" != Xset; then
7546   COLLECT_NAMES=
7547   export COLLECT_NAMES
7548 fi
7549 EOF
7550     ;;
7551   esac
7552
7553   case $host_os in
7554   cygwin* | mingw* | pw32* | os2*)
7555     cat <<'EOF' >> "${ofile}T"
7556       # This is a source program that is used to create dlls on Windows
7557       # Don't remove nor modify the starting and closing comments
7558 # /* ltdll.c starts here */
7559 # #define WIN32_LEAN_AND_MEAN
7560 # #include <windows.h>
7561 # #undef WIN32_LEAN_AND_MEAN
7562 # #include <stdio.h>
7563 #
7564 # #ifndef __CYGWIN__
7565 # #  ifdef __CYGWIN32__
7566 # #    define __CYGWIN__ __CYGWIN32__
7567 # #  endif
7568 # #endif
7569 #
7570 # #ifdef __cplusplus
7571 # extern "C" {
7572 # #endif
7573 # BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
7574 # #ifdef __cplusplus
7575 # }
7576 # #endif
7577 #
7578 # #ifdef __CYGWIN__
7579 # #include <cygwin/cygwin_dll.h>
7580 # DECLARE_CYGWIN_DLL( DllMain );
7581 # #endif
7582 # HINSTANCE __hDllInstance_base;
7583 #
7584 # BOOL APIENTRY
7585 # DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
7586 # {
7587 #   __hDllInstance_base = hInst;
7588 #   return TRUE;
7589 # }
7590 # /* ltdll.c ends here */
7591         # This is a source program that is used to create import libraries
7592         # on Windows for dlls which lack them. Don't remove nor modify the
7593         # starting and closing comments
7594 # /* impgen.c starts here */
7595 # /*   Copyright (C) 1999-2000 Free Software Foundation, Inc.
7596 #
7597 #  This file is part of GNU libtool.
7598 #
7599 #  This program is free software; you can redistribute it and/or modify
7600 #  it under the terms of the GNU General Public License as published by
7601 #  the Free Software Foundation; either version 2 of the License, or
7602 #  (at your option) any later version.
7603 #
7604 #  This program is distributed in the hope that it will be useful,
7605 #  but WITHOUT ANY WARRANTY; without even the implied warranty of
7606 #  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
7607 #  GNU General Public License for more details.
7608 #
7609 #  You should have received a copy of the GNU General Public License
7610 #  along with this program; if not, write to the Free Software
7611 #  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
7612 #  */
7613 #
7614 # #include <stdio.h>            /* for printf() */
7615 # #include <unistd.h>           /* for open(), lseek(), read() */
7616 # #include <fcntl.h>            /* for O_RDONLY, O_BINARY */
7617 # #include <string.h>           /* for strdup() */
7618 #
7619 # /* O_BINARY isn't required (or even defined sometimes) under Unix */
7620 # #ifndef O_BINARY
7621 # #define O_BINARY 0
7622 # #endif
7623 #
7624 # static unsigned int
7625 # pe_get16 (fd, offset)
7626 #      int fd;
7627 #      int offset;
7628 # {
7629 #   unsigned char b[2];
7630 #   lseek (fd, offset, SEEK_SET);
7631 #   read (fd, b, 2);
7632 #   return b[0] + (b[1]<<8);
7633 # }
7634 #
7635 # static unsigned int
7636 # pe_get32 (fd, offset)
7637 #     int fd;
7638 #     int offset;
7639 # {
7640 #   unsigned char b[4];
7641 #   lseek (fd, offset, SEEK_SET);
7642 #   read (fd, b, 4);
7643 #   return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
7644 # }
7645 #
7646 # static unsigned int
7647 # pe_as32 (ptr)
7648 #      void *ptr;
7649 # {
7650 #   unsigned char *b = ptr;
7651 #   return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
7652 # }
7653 #
7654 # int
7655 # main (argc, argv)
7656 #     int argc;
7657 #     char *argv[];
7658 # {
7659 #     int dll;
7660 #     unsigned long pe_header_offset, opthdr_ofs, num_entries, i;
7661 #     unsigned long export_rva, export_size, nsections, secptr, expptr;
7662 #     unsigned long name_rvas, nexp;
7663 #     unsigned char *expdata, *erva;
7664 #     char *filename, *dll_name;
7665 #
7666 #     filename = argv[1];
7667 #
7668 #     dll = open(filename, O_RDONLY|O_BINARY);
7669 #     if (dll < 1)
7670 #       return 1;
7671 #
7672 #     dll_name = filename;
7673 #
7674 #     for (i=0; filename[i]; i++)
7675 #       if (filename[i] == '/' || filename[i] == '\\'  || filename[i] == ':')
7676 #           dll_name = filename + i +1;
7677 #
7678 #     pe_header_offset = pe_get32 (dll, 0x3c);
7679 #     opthdr_ofs = pe_header_offset + 4 + 20;
7680 #     num_entries = pe_get32 (dll, opthdr_ofs + 92);
7681 #
7682 #     if (num_entries < 1) /* no exports */
7683 #       return 1;
7684 #
7685 #     export_rva = pe_get32 (dll, opthdr_ofs + 96);
7686 #     export_size = pe_get32 (dll, opthdr_ofs + 100);
7687 #     nsections = pe_get16 (dll, pe_header_offset + 4 +2);
7688 #     secptr = (pe_header_offset + 4 + 20 +
7689 #             pe_get16 (dll, pe_header_offset + 4 + 16));
7690 #
7691 #     expptr = 0;
7692 #     for (i = 0; i < nsections; i++)
7693 #     {
7694 #       char sname[8];
7695 #       unsigned long secptr1 = secptr + 40 * i;
7696 #       unsigned long vaddr = pe_get32 (dll, secptr1 + 12);
7697 #       unsigned long vsize = pe_get32 (dll, secptr1 + 16);
7698 #       unsigned long fptr = pe_get32 (dll, secptr1 + 20);
7699 #       lseek(dll, secptr1, SEEK_SET);
7700 #       read(dll, sname, 8);
7701 #       if (vaddr <= export_rva && vaddr+vsize > export_rva)
7702 #       {
7703 #           expptr = fptr + (export_rva - vaddr);
7704 #           if (export_rva + export_size > vaddr + vsize)
7705 #               export_size = vsize - (export_rva - vaddr);
7706 #           break;
7707 #       }
7708 #     }
7709 #
7710 #     expdata = (unsigned char*)malloc(export_size);
7711 #     lseek (dll, expptr, SEEK_SET);
7712 #     read (dll, expdata, export_size);
7713 #     erva = expdata - export_rva;
7714 #
7715 #     nexp = pe_as32 (expdata+24);
7716 #     name_rvas = pe_as32 (expdata+32);
7717 #
7718 #     printf ("EXPORTS\n");
7719 #     for (i = 0; i<nexp; i++)
7720 #     {
7721 #       unsigned long name_rva = pe_as32 (erva+name_rvas+i*4);
7722 #       printf ("\t%s @ %ld ;\n", erva+name_rva, 1+ i);
7723 #     }
7724 #
7725 #     return 0;
7726 # }
7727 # /* impgen.c ends here */
7728
7729 EOF
7730     ;;
7731   esac
7732
7733   # We use sed instead of cat because bash on DJGPP gets confused if
7734   # if finds mixed CR/LF and LF-only lines.  Since sed operates in
7735   # text mode, it properly converts lines to CR/LF.  This bash problem
7736   # is reportedly fixed, but why not run on old versions too?
7737   sed '$q' "$ltmain" >> "${ofile}T" || (rm -f "${ofile}T"; exit 1)
7738
7739   mv -f "${ofile}T" "$ofile" || \
7740     (rm -f "$ofile" && cp "${ofile}T" "$ofile" && rm -f "${ofile}T")
7741   chmod +x "$ofile"
7742 fi
7743
7744
7745
7746
7747
7748 # This can be used to rebuild libtool when needed
7749 LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
7750
7751 # Always use our own libtool.
7752 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
7753
7754 # Prevent multiple expansion
7755
7756
7757
7758 # test for ln hardlink support
7759 echo $ac_n "checking whether ln works""... $ac_c" 1>&6
7760 echo "configure:7761: checking whether ln works" >&5
7761 if eval "test \"\${ol_cv_prog_LN_H+set}\" = set"; then
7762   echo $ac_n "(cached) $ac_c" 1>&6
7763 else
7764   rm -f conftest.src conftest.dst
7765 echo "conftest" > conftest.src
7766 if ln conftest.src conftest.dst 2>/dev/null
7767 then
7768   ol_cv_prog_LN_H="ln"
7769 else
7770   ol_cv_prog_LN_H="cp"
7771 fi
7772 rm -f conftest.src conftest.dst
7773
7774 fi
7775 LN_H="$ol_cv_prog_LN_H"
7776 if test "$ol_cv_prog_LN_H" = "ln"; then
7777         echo "$ac_t""yes" 1>&6
7778 else
7779         echo "$ac_t""no" 1>&6
7780 fi
7781
7782 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
7783 echo "configure:7784: checking whether ln -s works" >&5
7784 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
7785   echo $ac_n "(cached) $ac_c" 1>&6
7786 else
7787   rm -f conftestdata
7788 if ln -s X conftestdata 2>/dev/null
7789 then
7790   rm -f conftestdata
7791   ac_cv_prog_LN_S="ln -s"
7792 else
7793   ac_cv_prog_LN_S=ln
7794 fi
7795 fi
7796 LN_S="$ac_cv_prog_LN_S"
7797 if test "$ac_cv_prog_LN_S" = "ln -s"; then
7798   echo "$ac_t""yes" 1>&6
7799 else
7800   echo "$ac_t""no" 1>&6
7801 fi
7802
7803
7804 ol_link_perl=no
7805 if test $ol_enable_perl != no ; then
7806         # Extract the first word of "perl", so it can be a program name with args.
7807 set dummy perl; ac_word=$2
7808 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
7809 echo "configure:7810: checking for $ac_word" >&5
7810 if eval "test \"\${ac_cv_path_PERLBIN+set}\" = set"; then
7811   echo $ac_n "(cached) $ac_c" 1>&6
7812 else
7813   case "$PERLBIN" in
7814   /*)
7815   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a path.
7816   ;;
7817   ?:/*)
7818   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a dos path.
7819   ;;
7820   *)
7821   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
7822   ac_dummy="$PATH"
7823   for ac_dir in $ac_dummy; do 
7824     test -z "$ac_dir" && ac_dir=.
7825     if test -f $ac_dir/$ac_word; then
7826       ac_cv_path_PERLBIN="$ac_dir/$ac_word"
7827       break
7828     fi
7829   done
7830   IFS="$ac_save_ifs"
7831   test -z "$ac_cv_path_PERLBIN" && ac_cv_path_PERLBIN="/usr/bin/perl"
7832   ;;
7833 esac
7834 fi
7835 PERLBIN="$ac_cv_path_PERLBIN"
7836 if test -n "$PERLBIN"; then
7837   echo "$ac_t""$PERLBIN" 1>&6
7838 else
7839   echo "$ac_t""no" 1>&6
7840 fi
7841
7842
7843         if test "no$PERLBIN" = "no" ; then
7844                 if test $ol_enable_perl = yes ; then
7845                         { echo "configure: error: could not locate perl" 1>&2; exit 1; }
7846                 fi
7847
7848         else
7849                 PERL_CPPFLAGS="`$PERLBIN -MExtUtils::Embed -e ccopts`"
7850                 PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e 's/ -lc / /'`"
7851
7852                 if test x"$ol_with_perl_module" = "xstatic" ; then
7853                         SLAPD_PERL_LDFLAGS="$PERL_LDFLAGS"
7854                 else
7855                         MOD_PERL_LDFLAGS="$PERL_LDFLAGS"
7856                 fi
7857                                 ol_link_perl=yes
7858         fi
7859 fi
7860
7861 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
7862 echo "configure:7863: checking how to run the C preprocessor" >&5
7863 # On Suns, sometimes $CPP names a directory.
7864 if test -n "$CPP" && test -d "$CPP"; then
7865   CPP=
7866 fi
7867 if test -z "$CPP"; then
7868 if eval "test \"\${ac_cv_prog_CPP+set}\" = set"; then
7869   echo $ac_n "(cached) $ac_c" 1>&6
7870 else
7871     # This must be in double quotes, not single quotes, because CPP may get
7872   # substituted into the Makefile and "${CC-cc}" will confuse make.
7873   CPP="${CC-cc} -E"
7874   # On the NeXT, cc -E runs the code through the compiler's parser,
7875   # not just through cpp.
7876   cat > conftest.$ac_ext <<EOF
7877 #line 7878 "configure"
7878 #include "confdefs.h"
7879 #include <assert.h>
7880 Syntax Error
7881 EOF
7882 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7883 { (eval echo configure:7884: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7884 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7885 if test -z "$ac_err"; then
7886   :
7887 else
7888   echo "$ac_err" >&5
7889   echo "configure: failed program was:" >&5
7890   cat conftest.$ac_ext >&5
7891   rm -rf conftest*
7892   CPP="${CC-cc} -E -traditional-cpp"
7893   cat > conftest.$ac_ext <<EOF
7894 #line 7895 "configure"
7895 #include "confdefs.h"
7896 #include <assert.h>
7897 Syntax Error
7898 EOF
7899 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7900 { (eval echo configure:7901: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7901 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7902 if test -z "$ac_err"; then
7903   :
7904 else
7905   echo "$ac_err" >&5
7906   echo "configure: failed program was:" >&5
7907   cat conftest.$ac_ext >&5
7908   rm -rf conftest*
7909   CPP="${CC-cc} -nologo -E"
7910   cat > conftest.$ac_ext <<EOF
7911 #line 7912 "configure"
7912 #include "confdefs.h"
7913 #include <assert.h>
7914 Syntax Error
7915 EOF
7916 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7917 { (eval echo configure:7918: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7918 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7919 if test -z "$ac_err"; then
7920   :
7921 else
7922   echo "$ac_err" >&5
7923   echo "configure: failed program was:" >&5
7924   cat conftest.$ac_ext >&5
7925   rm -rf conftest*
7926   CPP=/lib/cpp
7927 fi
7928 rm -f conftest*
7929 fi
7930 rm -f conftest*
7931 fi
7932 rm -f conftest*
7933   ac_cv_prog_CPP="$CPP"
7934 fi
7935   CPP="$ac_cv_prog_CPP"
7936 else
7937   ac_cv_prog_CPP="$CPP"
7938 fi
7939 echo "$ac_t""$CPP" 1>&6
7940
7941
7942 if test $cross_compiling = yes -a $ol_enable_x_compile = yes; then
7943         echo "configure: warning: cross compiling....  some functionality will be removed." 1>&2
7944
7945 elif test $cross_compiling = no -a $ol_enable_x_compile = yes; then
7946         echo "configure: warning: programs compiled here do run here..." 1>&2
7947         { echo "configure: error:   if not cross compiling, use --disable-x-compile." 1>&2; exit 1; }
7948
7949 elif test $cross_compiling = yes -a $ol_enable_x_compile = no; then
7950         echo "configure: warning: programs compiled here do not run here..." 1>&2
7951         { echo "configure: error:   if cross compiling,  add --enable-x-compile." 1>&2; exit 1; }
7952 fi
7953
7954
7955 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
7956 echo "configure:7957: checking for Cygwin environment" >&5
7957 if eval "test \"\${ac_cv_cygwin+set}\" = set"; then
7958   echo $ac_n "(cached) $ac_c" 1>&6
7959 else
7960   cat > conftest.$ac_ext <<EOF
7961 #line 7962 "configure"
7962 #include "confdefs.h"
7963
7964 int main() {
7965
7966 #ifndef __CYGWIN__
7967 #define __CYGWIN__ __CYGWIN32__
7968 #endif
7969 return __CYGWIN__;
7970 ; return 0; }
7971 EOF
7972 if { (eval echo configure:7973: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7973   rm -rf conftest*
7974   ac_cv_cygwin=yes
7975 else
7976   echo "configure: failed program was:" >&5
7977   cat conftest.$ac_ext >&5
7978   rm -rf conftest*
7979   ac_cv_cygwin=no
7980 fi
7981 rm -f conftest*
7982 fi
7983
7984 echo "$ac_t""$ac_cv_cygwin" 1>&6
7985 CYGWIN=
7986 test "$ac_cv_cygwin" = yes && CYGWIN=yes
7987 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
7988 echo "configure:7989: checking for mingw32 environment" >&5
7989 if eval "test \"\${ac_cv_mingw32+set}\" = set"; then
7990   echo $ac_n "(cached) $ac_c" 1>&6
7991 else
7992   cat > conftest.$ac_ext <<EOF
7993 #line 7994 "configure"
7994 #include "confdefs.h"
7995
7996 int main() {
7997 return __MINGW32__;
7998 ; return 0; }
7999 EOF
8000 if { (eval echo configure:8001: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8001   rm -rf conftest*
8002   ac_cv_mingw32=yes
8003 else
8004   echo "configure: failed program was:" >&5
8005   cat conftest.$ac_ext >&5
8006   rm -rf conftest*
8007   ac_cv_mingw32=no
8008 fi
8009 rm -f conftest*
8010 fi
8011
8012 echo "$ac_t""$ac_cv_mingw32" 1>&6
8013 MINGW32=
8014 test "$ac_cv_mingw32" = yes && MINGW32=yes
8015
8016
8017
8018 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
8019 echo "configure:8020: checking for executable suffix" >&5
8020 if eval "test \"\${ac_cv_exeext+set}\" = set"; then
8021   echo $ac_n "(cached) $ac_c" 1>&6
8022 else
8023   if test "$CYGWIN" = yes || test "$MINGW32" = yes || test "$EMXOS2" = yes; then
8024   ac_cv_exeext=.exe
8025 else
8026   rm -f conftest*
8027   echo 'int main () { return 0; }' > conftest.$ac_ext
8028   ac_cv_exeext=
8029   if { (eval echo configure:8030: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
8030     for file in conftest.*; do
8031       case $file in
8032       *.c | *.C | *.o | *.obj | *.xcoff) ;;
8033       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
8034       esac
8035     done
8036   else
8037     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
8038   fi
8039   rm -f conftest*
8040   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
8041 fi
8042 fi
8043
8044 EXEEXT=""
8045 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
8046 echo "$ac_t""${ac_cv_exeext}" 1>&6
8047 ac_exeext=$EXEEXT
8048
8049 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
8050 echo "configure:8051: checking for object suffix" >&5
8051 if eval "test \"\${ac_cv_objext+set}\" = set"; then
8052   echo $ac_n "(cached) $ac_c" 1>&6
8053 else
8054   rm -f conftest*
8055 echo 'int i = 1;' > conftest.$ac_ext
8056 if { (eval echo configure:8057: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8057   for ac_file in conftest.*; do
8058     case $ac_file in
8059     *.c) ;;
8060     *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
8061     esac
8062   done
8063 else
8064   { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
8065 fi
8066 rm -f conftest*
8067 fi
8068
8069 echo "$ac_t""$ac_cv_objext" 1>&6
8070 OBJEXT=$ac_cv_objext
8071 ac_objext=$ac_cv_objext
8072
8073
8074 cat >> confdefs.h <<EOF
8075 #define EXEEXT "${EXEEXT}"
8076 EOF
8077
8078
8079 echo $ac_n "checking for be_app in -lbe""... $ac_c" 1>&6
8080 echo "configure:8081: checking for be_app in -lbe" >&5
8081 ac_lib_var=`echo be'_'be_app | sed 'y%./+-:%__p__%'`
8082 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8083   echo $ac_n "(cached) $ac_c" 1>&6
8084 else
8085   ac_save_LIBS="$LIBS"
8086 LIBS="-lbe -lroot -lnet $LIBS"
8087 cat > conftest.$ac_ext <<EOF
8088 #line 8089 "configure"
8089 #include "confdefs.h"
8090 /* Override any gcc2 internal prototype to avoid an error.  */
8091 /* We use char because int might match the return type of a gcc2
8092     builtin and then its argument prototype would still apply.  */
8093 char be_app();
8094
8095 int main() {
8096 be_app()
8097 ; return 0; }
8098 EOF
8099 if { (eval echo configure:8100: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8100   rm -rf conftest*
8101   eval "ac_cv_lib_$ac_lib_var=yes"
8102 else
8103   echo "configure: failed program was:" >&5
8104   cat conftest.$ac_ext >&5
8105   rm -rf conftest*
8106   eval "ac_cv_lib_$ac_lib_var=no"
8107 fi
8108 rm -f conftest*
8109 LIBS="$ac_save_LIBS"
8110
8111 fi
8112 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8113   echo "$ac_t""yes" 1>&6
8114   LIBS="$LIBS -lbe -lroot -lnet"
8115 else
8116   echo "$ac_t""no" 1>&6
8117 :
8118 fi
8119
8120
8121
8122
8123
8124 echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
8125 echo "configure:8126: checking for ${CC-cc} option to accept ANSI C" >&5
8126 if eval "test \"\${am_cv_prog_cc_stdc+set}\" = set"; then
8127   echo $ac_n "(cached) $ac_c" 1>&6
8128 else
8129   am_cv_prog_cc_stdc=no
8130 ac_save_CC="$CC"
8131 # Don't try gcc -ansi; that turns off useful extensions and
8132 # breaks some systems' header files.
8133 # AIX                   -qlanglvl=ansi
8134 # Ultrix and OSF/1      -std1
8135 # HP-UX 10.20 and later -Ae
8136 # HP-UX older versions  -Aa -D_HPUX_SOURCE
8137 # SVR4                  -Xc -D__EXTENSIONS__
8138 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
8139 do
8140   CC="$ac_save_CC $ac_arg"
8141   cat > conftest.$ac_ext <<EOF
8142 #line 8143 "configure"
8143 #include "confdefs.h"
8144 #include <stdarg.h>
8145 #include <stdio.h>
8146 #include <sys/types.h>
8147 #include <sys/stat.h>
8148 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
8149 struct buf { int x; };
8150 FILE * (*rcsopen) (struct buf *, struct stat *, int);
8151 static char *e (p, i)
8152      char **p;
8153      int i;
8154 {
8155   return p[i];
8156 }
8157 static char *f (char * (*g) (char **, int), char **p, ...)
8158 {
8159   char *s;
8160   va_list v;
8161   va_start (v,p);
8162   s = g (p, va_arg (v,int));
8163   va_end (v);
8164   return s;
8165 }
8166 int test (int i, double x);
8167 struct s1 {int (*f) (int a);};
8168 struct s2 {int (*f) (double a);};
8169 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
8170 int argc;
8171 char **argv;
8172
8173 int main() {
8174
8175 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
8176
8177 ; return 0; }
8178 EOF
8179 if { (eval echo configure:8180: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8180   rm -rf conftest*
8181   am_cv_prog_cc_stdc="$ac_arg"; break
8182 else
8183   echo "configure: failed program was:" >&5
8184   cat conftest.$ac_ext >&5
8185 fi
8186 rm -f conftest*
8187 done
8188 CC="$ac_save_CC"
8189
8190 fi
8191
8192 if test -z "$am_cv_prog_cc_stdc"; then
8193   echo "$ac_t""none needed" 1>&6
8194 else
8195   echo "$ac_t""$am_cv_prog_cc_stdc" 1>&6
8196 fi
8197 case "x$am_cv_prog_cc_stdc" in
8198   x|xno) ;;
8199   *) CC="$CC $am_cv_prog_cc_stdc" ;;
8200 esac
8201
8202 if test "X${am_cv_prog_cc_stdc}" = "Xno" ; then
8203         { echo "configure: error: OpenLDAP requires compiler to support STDC constructs." 1>&2; exit 1; }
8204 fi
8205
8206 # test for make depend flag
8207 OL_MKDEP=
8208 OL_MKDEP_FLAGS=
8209 if test -z "${MKDEP}"; then
8210         OL_MKDEP="${CC-cc}"
8211         if test -z "${MKDEP_FLAGS}"; then
8212                 echo $ac_n "checking for ${OL_MKDEP} depend flag""... $ac_c" 1>&6
8213 echo "configure:8214: checking for ${OL_MKDEP} depend flag" >&5
8214 if eval "test \"\${ol_cv_mkdep+set}\" = set"; then
8215   echo $ac_n "(cached) $ac_c" 1>&6
8216 else
8217   
8218                         ol_cv_mkdep=no
8219                         for flag in "-M" "-xM"; do
8220                                 cat > conftest.c <<EOF
8221  noCode;
8222 EOF
8223                                 if { ac_try='$OL_MKDEP $flag conftest.c'; { (eval echo configure:8224: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } \
8224                                         | egrep '^conftest\.'"${ac_objext}" >/dev/null 2>&1
8225                                 then
8226                                         if test ! -f conftest."${ac_object}" ; then
8227                                                 ol_cv_mkdep=$flag
8228                                                 OL_MKDEP_FLAGS="$flag"
8229                                                 break
8230                                         fi
8231                                 fi
8232                         done
8233                         rm -f conftest*
8234                 
8235 fi
8236
8237 echo "$ac_t""$ol_cv_mkdep" 1>&6
8238         else
8239                 cc_cv_mkdep=yes
8240                 OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
8241         fi
8242 else
8243         cc_cv_mkdep=yes
8244         OL_MKDEP="${MKDEP}"
8245         OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
8246 fi
8247
8248
8249
8250 if test "${ol_cv_mkdep}" = no ; then
8251         # this will soon become an error
8252         echo "configure: warning: do not know how to generate dependencies" 1>&2
8253 fi
8254
8255 echo $ac_n "checking for afopen in -ls""... $ac_c" 1>&6
8256 echo "configure:8257: checking for afopen in -ls" >&5
8257 ac_lib_var=`echo s'_'afopen | sed 'y%./+-:%__p__%'`
8258 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8259   echo $ac_n "(cached) $ac_c" 1>&6
8260 else
8261   ac_save_LIBS="$LIBS"
8262 LIBS="-ls  $LIBS"
8263 cat > conftest.$ac_ext <<EOF
8264 #line 8265 "configure"
8265 #include "confdefs.h"
8266 /* Override any gcc2 internal prototype to avoid an error.  */
8267 /* We use char because int might match the return type of a gcc2
8268     builtin and then its argument prototype would still apply.  */
8269 char afopen();
8270
8271 int main() {
8272 afopen()
8273 ; return 0; }
8274 EOF
8275 if { (eval echo configure:8276: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8276   rm -rf conftest*
8277   eval "ac_cv_lib_$ac_lib_var=yes"
8278 else
8279   echo "configure: failed program was:" >&5
8280   cat conftest.$ac_ext >&5
8281   rm -rf conftest*
8282   eval "ac_cv_lib_$ac_lib_var=no"
8283 fi
8284 rm -f conftest*
8285 LIBS="$ac_save_LIBS"
8286
8287 fi
8288 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8289   echo "$ac_t""yes" 1>&6
8290   
8291         AUTH_LIBS=-ls
8292         cat >> confdefs.h <<\EOF
8293 #define HAVE_AIX_SECURITY 1
8294 EOF
8295
8296
8297 else
8298   echo "$ac_t""no" 1>&6
8299 fi
8300
8301
8302 case "$target" in
8303 *-ibm-openedition)
8304         ac_cv_func_getopt=no
8305         cat >> confdefs.h <<\EOF
8306 #define BOTH_STRINGS_H 1
8307 EOF
8308
8309         ;;
8310 esac
8311
8312 ol_link_modules=no
8313 if test $ol_enable_modules != no ; then
8314         for ac_hdr in ltdl.h
8315 do
8316 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8317 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8318 echo "configure:8319: checking for $ac_hdr" >&5
8319 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
8320   echo $ac_n "(cached) $ac_c" 1>&6
8321 else
8322   cat > conftest.$ac_ext <<EOF
8323 #line 8324 "configure"
8324 #include "confdefs.h"
8325 #include <$ac_hdr>
8326 EOF
8327 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8328 { (eval echo configure:8329: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8329 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8330 if test -z "$ac_err"; then
8331   rm -rf conftest*
8332   eval "ac_cv_header_$ac_safe=yes"
8333 else
8334   echo "$ac_err" >&5
8335   echo "configure: failed program was:" >&5
8336   cat conftest.$ac_ext >&5
8337   rm -rf conftest*
8338   eval "ac_cv_header_$ac_safe=no"
8339 fi
8340 rm -f conftest*
8341 fi
8342 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8343   echo "$ac_t""yes" 1>&6
8344     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8345   cat >> confdefs.h <<EOF
8346 #define $ac_tr_hdr 1
8347 EOF
8348  
8349 else
8350   echo "$ac_t""no" 1>&6
8351 fi
8352 done
8353
8354
8355         if test $ac_cv_header_ltdl_h = no ; then
8356                 { echo "configure: error: could not locate libtool ltdl.h" 1>&2; exit 1; }
8357         fi
8358
8359         echo $ac_n "checking for lt_dlinit in -lltdl""... $ac_c" 1>&6
8360 echo "configure:8361: checking for lt_dlinit in -lltdl" >&5
8361 ac_lib_var=`echo ltdl'_'lt_dlinit | sed 'y%./+-:%__p__%'`
8362 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8363   echo $ac_n "(cached) $ac_c" 1>&6
8364 else
8365   ac_save_LIBS="$LIBS"
8366 LIBS="-lltdl  $LIBS"
8367 cat > conftest.$ac_ext <<EOF
8368 #line 8369 "configure"
8369 #include "confdefs.h"
8370 /* Override any gcc2 internal prototype to avoid an error.  */
8371 /* We use char because int might match the return type of a gcc2
8372     builtin and then its argument prototype would still apply.  */
8373 char lt_dlinit();
8374
8375 int main() {
8376 lt_dlinit()
8377 ; return 0; }
8378 EOF
8379 if { (eval echo configure:8380: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8380   rm -rf conftest*
8381   eval "ac_cv_lib_$ac_lib_var=yes"
8382 else
8383   echo "configure: failed program was:" >&5
8384   cat conftest.$ac_ext >&5
8385   rm -rf conftest*
8386   eval "ac_cv_lib_$ac_lib_var=no"
8387 fi
8388 rm -f conftest*
8389 LIBS="$ac_save_LIBS"
8390
8391 fi
8392 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8393   echo "$ac_t""yes" 1>&6
8394   
8395                 MODULES_LIBS=-lltdl
8396                 cat >> confdefs.h <<\EOF
8397 #define HAVE_LIBLTDL 1
8398 EOF
8399
8400         
8401 else
8402   echo "$ac_t""no" 1>&6
8403 fi
8404
8405
8406         if test "$ac_cv_lib_ltdl_lt_dlinit" = no ; then
8407                 { echo "configure: error: could not locate libtool -lltdl" 1>&2; exit 1; }
8408         fi
8409         ol_link_modules=yes
8410 else
8411         ol_with_bdb_module=static
8412         ol_with_dnssrv_module=static
8413         ol_with_hdb_module=static
8414         ol_with_ldap_module=static
8415         ol_with_ldbm_module=static
8416         ol_with_meta_module=static
8417         ol_with_monitor_module=static
8418         ol_with_null_module=static
8419         ol_with_passwd_module=static
8420         ol_with_perl_module=static
8421         ol_with_shell_module=static
8422         ol_with_tcl_module=static
8423         ol_with_sql_module=static
8424 fi
8425
8426 # test for EBCDIC
8427 echo $ac_n "checking for EBCDIC""... $ac_c" 1>&6
8428 echo "configure:8429: checking for EBCDIC" >&5
8429 if eval "test \"\${ol_cv_cpp_ebcdic+set}\" = set"; then
8430   echo $ac_n "(cached) $ac_c" 1>&6
8431 else
8432   
8433         cat > conftest.$ac_ext <<EOF
8434 #line 8435 "configure"
8435 #include "confdefs.h"
8436
8437 #if !('M' == 0xd4)
8438 #include <__ASCII__/generate_error.h>
8439 #endif
8440
8441 EOF
8442 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8443 { (eval echo configure:8444: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8444 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8445 if test -z "$ac_err"; then
8446   rm -rf conftest*
8447   ol_cv_cpp_ebcdic=yes
8448 else
8449   echo "$ac_err" >&5
8450   echo "configure: failed program was:" >&5
8451   cat conftest.$ac_ext >&5
8452   rm -rf conftest*
8453   ol_cv_cpp_ebcdic=no
8454 fi
8455 rm -f conftest*
8456 fi
8457
8458 echo "$ac_t""$ol_cv_cpp_ebcdic" 1>&6
8459 if test $ol_cv_cpp_ebcdic = yes ; then
8460         cat >> confdefs.h <<\EOF
8461 #define HAVE_EBCDIC 1
8462 EOF
8463
8464 fi
8465
8466 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
8467 echo "configure:8468: checking for ANSI C header files" >&5
8468 if eval "test \"\${ol_cv_header_stdc+set}\" = set"; then
8469   echo $ac_n "(cached) $ac_c" 1>&6
8470 else
8471   cat > conftest.$ac_ext <<EOF
8472 #line 8473 "configure"
8473 #include "confdefs.h"
8474 #include <stdlib.h>
8475 #include <stdarg.h>
8476 #include <string.h>
8477 #include <float.h>
8478 EOF
8479 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8480 { (eval echo configure:8481: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8481 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8482 if test -z "$ac_err"; then
8483   rm -rf conftest*
8484   ol_cv_header_stdc=yes
8485 else
8486   echo "$ac_err" >&5
8487   echo "configure: failed program was:" >&5
8488   cat conftest.$ac_ext >&5
8489   rm -rf conftest*
8490   ol_cv_header_stdc=no
8491 fi
8492 rm -f conftest*
8493
8494 if test $ol_cv_header_stdc = yes; then
8495   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
8496 cat > conftest.$ac_ext <<EOF
8497 #line 8498 "configure"
8498 #include "confdefs.h"
8499 #include <string.h>
8500 EOF
8501 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8502   egrep "memchr" >/dev/null 2>&1; then
8503   :
8504 else
8505   rm -rf conftest*
8506   ol_cv_header_stdc=no
8507 fi
8508 rm -f conftest*
8509
8510 fi
8511
8512 if test $ol_cv_header_stdc = yes; then
8513   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
8514 cat > conftest.$ac_ext <<EOF
8515 #line 8516 "configure"
8516 #include "confdefs.h"
8517 #include <stdlib.h>
8518 EOF
8519 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8520   egrep "free" >/dev/null 2>&1; then
8521   :
8522 else
8523   rm -rf conftest*
8524   ol_cv_header_stdc=no
8525 fi
8526 rm -f conftest*
8527
8528 fi
8529
8530 if test $ol_cv_header_stdc = yes; then
8531   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
8532 if test "$cross_compiling" = yes; then
8533   :
8534 else
8535   cat > conftest.$ac_ext <<EOF
8536 #line 8537 "configure"
8537 #include "confdefs.h"
8538 #include <ctype.h>
8539 #ifndef HAVE_EBCDIC
8540 #       define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
8541 #       define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
8542 #else
8543 #       define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
8544                 || ('j' <= (c) && (c) <= 'r') \
8545                 || ('s' <= (c) && (c) <= 'z'))
8546 #       define TOUPPER(c)       (ISLOWER(c) ? ((c) | 0x40) : (c))
8547 #endif
8548 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
8549 int main () { int i; for (i = 0; i < 256; i++)
8550 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
8551 exit (0); }
8552
8553 EOF
8554 if { (eval echo configure:8555: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8555 then
8556   :
8557 else
8558   echo "configure: failed program was:" >&5
8559   cat conftest.$ac_ext >&5
8560   rm -fr conftest*
8561   ol_cv_header_stdc=no
8562 fi
8563 rm -fr conftest*
8564 fi
8565
8566 fi
8567 fi
8568
8569 echo "$ac_t""$ol_cv_header_stdc" 1>&6
8570 if test $ol_cv_header_stdc = yes; then
8571   cat >> confdefs.h <<\EOF
8572 #define STDC_HEADERS 1
8573 EOF
8574
8575 fi
8576 ac_cv_header_stdc=disable
8577
8578
8579 if test $ol_cv_header_stdc != yes; then
8580         echo "configure: warning: could not locate Standard C compliant headers" 1>&2
8581 fi
8582
8583 ac_header_dirent=no
8584 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
8585 do
8586 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8587 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
8588 echo "configure:8589: checking for $ac_hdr that defines DIR" >&5
8589 if eval "test \"\${ac_cv_header_dirent_$ac_safe+set}\" = set"; then
8590   echo $ac_n "(cached) $ac_c" 1>&6
8591 else
8592   cat > conftest.$ac_ext <<EOF
8593 #line 8594 "configure"
8594 #include "confdefs.h"
8595 #include <sys/types.h>
8596 #include <$ac_hdr>
8597 int main() {
8598 DIR *dirp = 0;
8599 ; return 0; }
8600 EOF
8601 if { (eval echo configure:8602: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8602   rm -rf conftest*
8603   eval "ac_cv_header_dirent_$ac_safe=yes"
8604 else
8605   echo "configure: failed program was:" >&5
8606   cat conftest.$ac_ext >&5
8607   rm -rf conftest*
8608   eval "ac_cv_header_dirent_$ac_safe=no"
8609 fi
8610 rm -f conftest*
8611 fi
8612 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
8613   echo "$ac_t""yes" 1>&6
8614     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8615   cat >> confdefs.h <<EOF
8616 #define $ac_tr_hdr 1
8617 EOF
8618  ac_header_dirent=$ac_hdr; break
8619 else
8620   echo "$ac_t""no" 1>&6
8621 fi
8622 done
8623 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
8624 if test $ac_header_dirent = dirent.h; then
8625 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
8626 echo "configure:8627: checking for opendir in -ldir" >&5
8627 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-:%__p__%'`
8628 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8629   echo $ac_n "(cached) $ac_c" 1>&6
8630 else
8631   ac_save_LIBS="$LIBS"
8632 LIBS="-ldir  $LIBS"
8633 cat > conftest.$ac_ext <<EOF
8634 #line 8635 "configure"
8635 #include "confdefs.h"
8636 /* Override any gcc2 internal prototype to avoid an error.  */
8637 /* We use char because int might match the return type of a gcc2
8638     builtin and then its argument prototype would still apply.  */
8639 char opendir();
8640
8641 int main() {
8642 opendir()
8643 ; return 0; }
8644 EOF
8645 if { (eval echo configure:8646: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8646   rm -rf conftest*
8647   eval "ac_cv_lib_$ac_lib_var=yes"
8648 else
8649   echo "configure: failed program was:" >&5
8650   cat conftest.$ac_ext >&5
8651   rm -rf conftest*
8652   eval "ac_cv_lib_$ac_lib_var=no"
8653 fi
8654 rm -f conftest*
8655 LIBS="$ac_save_LIBS"
8656
8657 fi
8658 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8659   echo "$ac_t""yes" 1>&6
8660   LIBS="$LIBS -ldir"
8661 else
8662   echo "$ac_t""no" 1>&6
8663 fi
8664
8665 else
8666 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
8667 echo "configure:8668: checking for opendir in -lx" >&5
8668 ac_lib_var=`echo x'_'opendir | sed 'y%./+-:%__p__%'`
8669 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8670   echo $ac_n "(cached) $ac_c" 1>&6
8671 else
8672   ac_save_LIBS="$LIBS"
8673 LIBS="-lx  $LIBS"
8674 cat > conftest.$ac_ext <<EOF
8675 #line 8676 "configure"
8676 #include "confdefs.h"
8677 /* Override any gcc2 internal prototype to avoid an error.  */
8678 /* We use char because int might match the return type of a gcc2
8679     builtin and then its argument prototype would still apply.  */
8680 char opendir();
8681
8682 int main() {
8683 opendir()
8684 ; return 0; }
8685 EOF
8686 if { (eval echo configure:8687: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8687   rm -rf conftest*
8688   eval "ac_cv_lib_$ac_lib_var=yes"
8689 else
8690   echo "configure: failed program was:" >&5
8691   cat conftest.$ac_ext >&5
8692   rm -rf conftest*
8693   eval "ac_cv_lib_$ac_lib_var=no"
8694 fi
8695 rm -f conftest*
8696 LIBS="$ac_save_LIBS"
8697
8698 fi
8699 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8700   echo "$ac_t""yes" 1>&6
8701   LIBS="$LIBS -lx"
8702 else
8703   echo "$ac_t""no" 1>&6
8704 fi
8705
8706 fi
8707
8708 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
8709 echo "configure:8710: checking for sys/wait.h that is POSIX.1 compatible" >&5
8710 if eval "test \"\${ac_cv_header_sys_wait_h+set}\" = set"; then
8711   echo $ac_n "(cached) $ac_c" 1>&6
8712 else
8713   cat > conftest.$ac_ext <<EOF
8714 #line 8715 "configure"
8715 #include "confdefs.h"
8716 #include <sys/types.h>
8717 #include <sys/wait.h>
8718 #ifndef WEXITSTATUS
8719 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
8720 #endif
8721 #ifndef WIFEXITED
8722 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
8723 #endif
8724 int main() {
8725 int s;
8726 wait (&s);
8727 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
8728 ; return 0; }
8729 EOF
8730 if { (eval echo configure:8731: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8731   rm -rf conftest*
8732   ac_cv_header_sys_wait_h=yes
8733 else
8734   echo "configure: failed program was:" >&5
8735   cat conftest.$ac_ext >&5
8736   rm -rf conftest*
8737   ac_cv_header_sys_wait_h=no
8738 fi
8739 rm -f conftest*
8740 fi
8741
8742 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
8743 if test $ac_cv_header_sys_wait_h = yes; then
8744   cat >> confdefs.h <<\EOF
8745 #define HAVE_SYS_WAIT_H 1
8746 EOF
8747
8748 fi
8749
8750 echo $ac_n "checking POSIX termios""... $ac_c" 1>&6
8751 echo "configure:8752: checking POSIX termios" >&5
8752 if eval "test \"\${am_cv_sys_posix_termios+set}\" = set"; then
8753   echo $ac_n "(cached) $ac_c" 1>&6
8754 else
8755   cat > conftest.$ac_ext <<EOF
8756 #line 8757 "configure"
8757 #include "confdefs.h"
8758 #include <sys/types.h>
8759 #include <unistd.h>
8760 #include <termios.h>
8761 int main() {
8762 /* SunOS 4.0.3 has termios.h but not the library calls.  */
8763    tcgetattr(0, 0);
8764 ; return 0; }
8765 EOF
8766 if { (eval echo configure:8767: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8767   rm -rf conftest*
8768   am_cv_sys_posix_termios=yes
8769 else
8770   echo "configure: failed program was:" >&5
8771   cat conftest.$ac_ext >&5
8772   rm -rf conftest*
8773   am_cv_sys_posix_termios=no
8774 fi
8775 rm -f conftest*
8776 fi
8777
8778 echo "$ac_t""$am_cv_sys_posix_termios" 1>&6
8779
8780
8781  echo $ac_n "checking whether use of TIOCGWINSZ requires sys/ioctl.h""... $ac_c" 1>&6
8782 echo "configure:8783: checking whether use of TIOCGWINSZ requires sys/ioctl.h" >&5
8783 if eval "test \"\${am_cv_sys_tiocgwinsz_needs_sys_ioctl_h+set}\" = set"; then
8784   echo $ac_n "(cached) $ac_c" 1>&6
8785 else
8786   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=no
8787
8788   gwinsz_in_termios_h=no
8789   if test $am_cv_sys_posix_termios = yes; then
8790     cat > conftest.$ac_ext <<EOF
8791 #line 8792 "configure"
8792 #include "confdefs.h"
8793 #include <sys/types.h>
8794 #     include <termios.h>
8795 #     ifdef TIOCGWINSZ
8796         yes
8797 #     endif
8798     
8799 EOF
8800 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8801   egrep "yes" >/dev/null 2>&1; then
8802   rm -rf conftest*
8803   gwinsz_in_termios_h=yes
8804 fi
8805 rm -f conftest*
8806
8807   fi
8808
8809   if test $gwinsz_in_termios_h = no; then
8810     cat > conftest.$ac_ext <<EOF
8811 #line 8812 "configure"
8812 #include "confdefs.h"
8813 #include <sys/types.h>
8814 #     include <sys/ioctl.h>
8815 #     ifdef TIOCGWINSZ
8816         yes
8817 #     endif
8818     
8819 EOF
8820 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8821   egrep "yes" >/dev/null 2>&1; then
8822   rm -rf conftest*
8823   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=yes
8824 fi
8825 rm -f conftest*
8826
8827   fi
8828   
8829 fi
8830
8831 echo "$ac_t""$am_cv_sys_tiocgwinsz_needs_sys_ioctl_h" 1>&6
8832   if test $am_cv_sys_tiocgwinsz_needs_sys_ioctl_h = yes; then
8833     cat >> confdefs.h <<\EOF
8834 #define GWINSZ_IN_SYS_IOCTL 1
8835 EOF
8836
8837   fi
8838
8839 if test $am_cv_sys_posix_termios = yes ; then
8840         cat >> confdefs.h <<\EOF
8841 #define HAVE_POSIX_TERMIOS 1
8842 EOF
8843
8844 fi
8845
8846 for ac_hdr in \
8847         arpa/inet.h             \
8848         arpa/nameser.h  \
8849         assert.h                \
8850         conio.h                 \
8851         crypt.h                 \
8852         direct.h                \
8853         errno.h                 \
8854         fcntl.h                 \
8855         filio.h                 \
8856         getopt.h                \
8857         grp.h                   \
8858         io.h                    \
8859         libutil.h               \
8860         limits.h                \
8861         locale.h                \
8862         netinet/tcp.h   \
8863         malloc.h                \
8864         memory.h                \
8865         psap.h                  \
8866         pwd.h                   \
8867         process.h               \
8868         resolv.h                \
8869         sgtty.h                 \
8870         shadow.h                \
8871         stddef.h                \
8872         string.h                \
8873         strings.h               \
8874         sysexits.h              \
8875         sys/file.h              \
8876         sys/filio.h             \
8877         sys/errno.h             \
8878         sys/ioctl.h             \
8879         sys/param.h             \
8880         sys/resource.h  \
8881         sys/select.h    \
8882         sys/socket.h    \
8883         sys/stat.h              \
8884         sys/syslog.h    \
8885         sys/time.h              \
8886         sys/types.h             \
8887         sys/ucred.h             \
8888         sys/uio.h               \
8889         syslog.h                \
8890         termios.h               \
8891         unistd.h                \
8892         winsock.h               \
8893         winsock2.h              \
8894
8895 do
8896 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8897 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8898 echo "configure:8899: checking for $ac_hdr" >&5
8899 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
8900   echo $ac_n "(cached) $ac_c" 1>&6
8901 else
8902   cat > conftest.$ac_ext <<EOF
8903 #line 8904 "configure"
8904 #include "confdefs.h"
8905 #include <$ac_hdr>
8906 EOF
8907 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8908 { (eval echo configure:8909: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8909 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8910 if test -z "$ac_err"; then
8911   rm -rf conftest*
8912   eval "ac_cv_header_$ac_safe=yes"
8913 else
8914   echo "$ac_err" >&5
8915   echo "configure: failed program was:" >&5
8916   cat conftest.$ac_ext >&5
8917   rm -rf conftest*
8918   eval "ac_cv_header_$ac_safe=no"
8919 fi
8920 rm -f conftest*
8921 fi
8922 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8923   echo "$ac_t""yes" 1>&6
8924     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8925   cat >> confdefs.h <<EOF
8926 #define $ac_tr_hdr 1
8927 EOF
8928  
8929 else
8930   echo "$ac_t""no" 1>&6
8931 fi
8932 done
8933
8934
8935
8936
8937 echo $ac_n "checking for dlopen""... $ac_c" 1>&6
8938 echo "configure:8939: checking for dlopen" >&5
8939 if eval "test \"\${ac_cv_func_dlopen+set}\" = set"; then
8940   echo $ac_n "(cached) $ac_c" 1>&6
8941 else
8942   cat > conftest.$ac_ext <<EOF
8943 #line 8944 "configure"
8944 #include "confdefs.h"
8945 /* System header to define __stub macros and hopefully few prototypes,
8946     which can conflict with char dlopen(); below.  */
8947 #include <assert.h>
8948 /* Override any gcc2 internal prototype to avoid an error.  */
8949 /* We use char because int might match the return type of a gcc2
8950     builtin and then its argument prototype would still apply.  */
8951 char dlopen();
8952 char (*f)();
8953
8954 int main() {
8955
8956 /* The GNU C library defines this for functions which it implements
8957     to always fail with ENOSYS.  Some functions are actually named
8958     something starting with __ and the normal name is an alias.  */
8959 #if defined (__stub_dlopen) || defined (__stub___dlopen)
8960 choke me
8961 #else
8962 f = dlopen;
8963 #endif
8964
8965 ; return 0; }
8966 EOF
8967 if { (eval echo configure:8968: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8968   rm -rf conftest*
8969   eval "ac_cv_func_dlopen=yes"
8970 else
8971   echo "configure: failed program was:" >&5
8972   cat conftest.$ac_ext >&5
8973   rm -rf conftest*
8974   eval "ac_cv_func_dlopen=no"
8975 fi
8976 rm -f conftest*
8977 fi
8978
8979 if eval "test \"`echo '$ac_cv_func_'dlopen`\" = yes"; then
8980   echo "$ac_t""yes" 1>&6
8981   :
8982 else
8983   echo "$ac_t""no" 1>&6
8984 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
8985 echo "configure:8986: checking for dlopen in -ldl" >&5
8986 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-:%__p__%'`
8987 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8988   echo $ac_n "(cached) $ac_c" 1>&6
8989 else
8990   ac_save_LIBS="$LIBS"
8991 LIBS="-ldl  $LIBS"
8992 cat > conftest.$ac_ext <<EOF
8993 #line 8994 "configure"
8994 #include "confdefs.h"
8995 /* Override any gcc2 internal prototype to avoid an error.  */
8996 /* We use char because int might match the return type of a gcc2
8997     builtin and then its argument prototype would still apply.  */
8998 char dlopen();
8999
9000 int main() {
9001 dlopen()
9002 ; return 0; }
9003 EOF
9004 if { (eval echo configure:9005: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9005   rm -rf conftest*
9006   eval "ac_cv_lib_$ac_lib_var=yes"
9007 else
9008   echo "configure: failed program was:" >&5
9009   cat conftest.$ac_ext >&5
9010   rm -rf conftest*
9011   eval "ac_cv_lib_$ac_lib_var=no"
9012 fi
9013 rm -f conftest*
9014 LIBS="$ac_save_LIBS"
9015
9016 fi
9017 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9018   echo "$ac_t""yes" 1>&6
9019     ac_tr_lib=HAVE_LIB`echo dl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9020     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9021   cat >> confdefs.h <<EOF
9022 #define $ac_tr_lib 1
9023 EOF
9024
9025   LIBS="-ldl $LIBS"
9026
9027 else
9028   echo "$ac_t""no" 1>&6
9029 fi
9030
9031 fi
9032
9033
9034 echo $ac_n "checking for sigset in -lV3""... $ac_c" 1>&6
9035 echo "configure:9036: checking for sigset in -lV3" >&5
9036 ac_lib_var=`echo V3'_'sigset | sed 'y%./+-:%__p__%'`
9037 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9038   echo $ac_n "(cached) $ac_c" 1>&6
9039 else
9040   ac_save_LIBS="$LIBS"
9041 LIBS="-lV3  $LIBS"
9042 cat > conftest.$ac_ext <<EOF
9043 #line 9044 "configure"
9044 #include "confdefs.h"
9045 /* Override any gcc2 internal prototype to avoid an error.  */
9046 /* We use char because int might match the return type of a gcc2
9047     builtin and then its argument prototype would still apply.  */
9048 char sigset();
9049
9050 int main() {
9051 sigset()
9052 ; return 0; }
9053 EOF
9054 if { (eval echo configure:9055: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9055   rm -rf conftest*
9056   eval "ac_cv_lib_$ac_lib_var=yes"
9057 else
9058   echo "configure: failed program was:" >&5
9059   cat conftest.$ac_ext >&5
9060   rm -rf conftest*
9061   eval "ac_cv_lib_$ac_lib_var=no"
9062 fi
9063 rm -f conftest*
9064 LIBS="$ac_save_LIBS"
9065
9066 fi
9067 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9068   echo "$ac_t""yes" 1>&6
9069     ac_tr_lib=HAVE_LIB`echo V3 | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9070     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9071   cat >> confdefs.h <<EOF
9072 #define $ac_tr_lib 1
9073 EOF
9074
9075   LIBS="-lV3 $LIBS"
9076
9077 else
9078   echo "$ac_t""no" 1>&6
9079 fi
9080
9081
9082 echo $ac_n "checking for winsock""... $ac_c" 1>&6
9083 echo "configure:9084: checking for winsock" >&5
9084 save_LIBS="$LIBS"
9085 for curlib in ws2_32 wsock32; do
9086         LIBS="$LIBS -l$curlib"
9087         cat > conftest.$ac_ext <<EOF
9088 #line 9089 "configure"
9089 #include "confdefs.h"
9090
9091                         char socket@12();
9092                         char select@20();
9093                         char closesocket@4();
9094                         char gethostname@8();
9095                         
9096 int main() {
9097
9098                         socket@12();
9099                         select@20();
9100                         closesocket@4();
9101                         gethostname@8();
9102                         
9103 ; return 0; }
9104 EOF
9105 if { (eval echo configure:9106: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9106   rm -rf conftest*
9107   have_winsock=yes
9108 else
9109   echo "configure: failed program was:" >&5
9110   cat conftest.$ac_ext >&5
9111   rm -rf conftest*
9112   have_winsock=no
9113 fi
9114 rm -f conftest*
9115
9116         if test $have_winsock = yes; then
9117                 cat >> confdefs.h <<\EOF
9118 #define HAVE_WINSOCK 1
9119 EOF
9120
9121                 ac_cv_func_socket=yes
9122                 ac_cv_func_select=yes
9123                 ac_cv_func_closesocket=yes
9124                 ac_cv_func_gethostname=yes
9125                 if test $curlib = ws2_32; then
9126                         have_winsock=winsock2
9127                         cat >> confdefs.h <<\EOF
9128 #define HAVE_WINSOCK2 1
9129 EOF
9130
9131                 fi
9132                 break
9133         fi
9134         LIBS="$save_LIBS"
9135 done
9136 echo "$ac_t""$have_winsock" 1>&6
9137
9138
9139 echo $ac_n "checking for socket""... $ac_c" 1>&6
9140 echo "configure:9141: checking for socket" >&5
9141 if eval "test \"\${ac_cv_func_socket+set}\" = set"; then
9142   echo $ac_n "(cached) $ac_c" 1>&6
9143 else
9144   cat > conftest.$ac_ext <<EOF
9145 #line 9146 "configure"
9146 #include "confdefs.h"
9147 /* System header to define __stub macros and hopefully few prototypes,
9148     which can conflict with char socket(); below.  */
9149 #include <assert.h>
9150 /* Override any gcc2 internal prototype to avoid an error.  */
9151 /* We use char because int might match the return type of a gcc2
9152     builtin and then its argument prototype would still apply.  */
9153 char socket();
9154 char (*f)();
9155
9156 int main() {
9157
9158 /* The GNU C library defines this for functions which it implements
9159     to always fail with ENOSYS.  Some functions are actually named
9160     something starting with __ and the normal name is an alias.  */
9161 #if defined (__stub_socket) || defined (__stub___socket)
9162 choke me
9163 #else
9164 f = socket;
9165 #endif
9166
9167 ; return 0; }
9168 EOF
9169 if { (eval echo configure:9170: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9170   rm -rf conftest*
9171   eval "ac_cv_func_socket=yes"
9172 else
9173   echo "configure: failed program was:" >&5
9174   cat conftest.$ac_ext >&5
9175   rm -rf conftest*
9176   eval "ac_cv_func_socket=no"
9177 fi
9178 rm -f conftest*
9179 fi
9180
9181 if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
9182   echo "$ac_t""yes" 1>&6
9183   :
9184 else
9185   echo "$ac_t""no" 1>&6
9186         
9187         echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6
9188 echo "configure:9189: checking for main in -lsocket" >&5
9189 ac_lib_var=`echo socket'_'main | sed 'y%./+-:%__p__%'`
9190 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9191   echo $ac_n "(cached) $ac_c" 1>&6
9192 else
9193   ac_save_LIBS="$LIBS"
9194 LIBS="-lsocket  $LIBS"
9195 cat > conftest.$ac_ext <<EOF
9196 #line 9197 "configure"
9197 #include "confdefs.h"
9198
9199 int main() {
9200 main()
9201 ; return 0; }
9202 EOF
9203 if { (eval echo configure:9204: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9204   rm -rf conftest*
9205   eval "ac_cv_lib_$ac_lib_var=yes"
9206 else
9207   echo "configure: failed program was:" >&5
9208   cat conftest.$ac_ext >&5
9209   rm -rf conftest*
9210   eval "ac_cv_lib_$ac_lib_var=no"
9211 fi
9212 rm -f conftest*
9213 LIBS="$ac_save_LIBS"
9214
9215 fi
9216 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9217   echo "$ac_t""yes" 1>&6
9218     ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9219     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9220   cat >> confdefs.h <<EOF
9221 #define $ac_tr_lib 1
9222 EOF
9223
9224   LIBS="-lsocket $LIBS"
9225
9226 else
9227   echo "$ac_t""no" 1>&6
9228 fi
9229
9230         echo $ac_n "checking for main in -lnet""... $ac_c" 1>&6
9231 echo "configure:9232: checking for main in -lnet" >&5
9232 ac_lib_var=`echo net'_'main | sed 'y%./+-:%__p__%'`
9233 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9234   echo $ac_n "(cached) $ac_c" 1>&6
9235 else
9236   ac_save_LIBS="$LIBS"
9237 LIBS="-lnet  $LIBS"
9238 cat > conftest.$ac_ext <<EOF
9239 #line 9240 "configure"
9240 #include "confdefs.h"
9241
9242 int main() {
9243 main()
9244 ; return 0; }
9245 EOF
9246 if { (eval echo configure:9247: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9247   rm -rf conftest*
9248   eval "ac_cv_lib_$ac_lib_var=yes"
9249 else
9250   echo "configure: failed program was:" >&5
9251   cat conftest.$ac_ext >&5
9252   rm -rf conftest*
9253   eval "ac_cv_lib_$ac_lib_var=no"
9254 fi
9255 rm -f conftest*
9256 LIBS="$ac_save_LIBS"
9257
9258 fi
9259 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9260   echo "$ac_t""yes" 1>&6
9261     ac_tr_lib=HAVE_LIB`echo net | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9262     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9263   cat >> confdefs.h <<EOF
9264 #define $ac_tr_lib 1
9265 EOF
9266
9267   LIBS="-lnet $LIBS"
9268
9269 else
9270   echo "$ac_t""no" 1>&6
9271 fi
9272
9273         echo $ac_n "checking for main in -lnsl_s""... $ac_c" 1>&6
9274 echo "configure:9275: checking for main in -lnsl_s" >&5
9275 ac_lib_var=`echo nsl_s'_'main | sed 'y%./+-:%__p__%'`
9276 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9277   echo $ac_n "(cached) $ac_c" 1>&6
9278 else
9279   ac_save_LIBS="$LIBS"
9280 LIBS="-lnsl_s  $LIBS"
9281 cat > conftest.$ac_ext <<EOF
9282 #line 9283 "configure"
9283 #include "confdefs.h"
9284
9285 int main() {
9286 main()
9287 ; return 0; }
9288 EOF
9289 if { (eval echo configure:9290: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9290   rm -rf conftest*
9291   eval "ac_cv_lib_$ac_lib_var=yes"
9292 else
9293   echo "configure: failed program was:" >&5
9294   cat conftest.$ac_ext >&5
9295   rm -rf conftest*
9296   eval "ac_cv_lib_$ac_lib_var=no"
9297 fi
9298 rm -f conftest*
9299 LIBS="$ac_save_LIBS"
9300
9301 fi
9302 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9303   echo "$ac_t""yes" 1>&6
9304     ac_tr_lib=HAVE_LIB`echo nsl_s | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9305     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9306   cat >> confdefs.h <<EOF
9307 #define $ac_tr_lib 1
9308 EOF
9309
9310   LIBS="-lnsl_s $LIBS"
9311
9312 else
9313   echo "$ac_t""no" 1>&6
9314 fi
9315
9316         echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
9317 echo "configure:9318: checking for main in -lnsl" >&5
9318 ac_lib_var=`echo nsl'_'main | sed 'y%./+-:%__p__%'`
9319 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9320   echo $ac_n "(cached) $ac_c" 1>&6
9321 else
9322   ac_save_LIBS="$LIBS"
9323 LIBS="-lnsl  $LIBS"
9324 cat > conftest.$ac_ext <<EOF
9325 #line 9326 "configure"
9326 #include "confdefs.h"
9327
9328 int main() {
9329 main()
9330 ; return 0; }
9331 EOF
9332 if { (eval echo configure:9333: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9333   rm -rf conftest*
9334   eval "ac_cv_lib_$ac_lib_var=yes"
9335 else
9336   echo "configure: failed program was:" >&5
9337   cat conftest.$ac_ext >&5
9338   rm -rf conftest*
9339   eval "ac_cv_lib_$ac_lib_var=no"
9340 fi
9341 rm -f conftest*
9342 LIBS="$ac_save_LIBS"
9343
9344 fi
9345 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9346   echo "$ac_t""yes" 1>&6
9347     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9348     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9349   cat >> confdefs.h <<EOF
9350 #define $ac_tr_lib 1
9351 EOF
9352
9353   LIBS="-lnsl $LIBS"
9354
9355 else
9356   echo "$ac_t""no" 1>&6
9357 fi
9358
9359         echo $ac_n "checking for socket in -linet""... $ac_c" 1>&6
9360 echo "configure:9361: checking for socket in -linet" >&5
9361 ac_lib_var=`echo inet'_'socket | sed 'y%./+-:%__p__%'`
9362 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9363   echo $ac_n "(cached) $ac_c" 1>&6
9364 else
9365   ac_save_LIBS="$LIBS"
9366 LIBS="-linet  $LIBS"
9367 cat > conftest.$ac_ext <<EOF
9368 #line 9369 "configure"
9369 #include "confdefs.h"
9370 /* Override any gcc2 internal prototype to avoid an error.  */
9371 /* We use char because int might match the return type of a gcc2
9372     builtin and then its argument prototype would still apply.  */
9373 char socket();
9374
9375 int main() {
9376 socket()
9377 ; return 0; }
9378 EOF
9379 if { (eval echo configure:9380: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9380   rm -rf conftest*
9381   eval "ac_cv_lib_$ac_lib_var=yes"
9382 else
9383   echo "configure: failed program was:" >&5
9384   cat conftest.$ac_ext >&5
9385   rm -rf conftest*
9386   eval "ac_cv_lib_$ac_lib_var=no"
9387 fi
9388 rm -f conftest*
9389 LIBS="$ac_save_LIBS"
9390
9391 fi
9392 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9393   echo "$ac_t""yes" 1>&6
9394     ac_tr_lib=HAVE_LIB`echo inet | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9395     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9396   cat >> confdefs.h <<EOF
9397 #define $ac_tr_lib 1
9398 EOF
9399
9400   LIBS="-linet $LIBS"
9401
9402 else
9403   echo "$ac_t""no" 1>&6
9404 fi
9405
9406         echo $ac_n "checking for main in -lgen""... $ac_c" 1>&6
9407 echo "configure:9408: checking for main in -lgen" >&5
9408 ac_lib_var=`echo gen'_'main | sed 'y%./+-:%__p__%'`
9409 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9410   echo $ac_n "(cached) $ac_c" 1>&6
9411 else
9412   ac_save_LIBS="$LIBS"
9413 LIBS="-lgen  $LIBS"
9414 cat > conftest.$ac_ext <<EOF
9415 #line 9416 "configure"
9416 #include "confdefs.h"
9417
9418 int main() {
9419 main()
9420 ; return 0; }
9421 EOF
9422 if { (eval echo configure:9423: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9423   rm -rf conftest*
9424   eval "ac_cv_lib_$ac_lib_var=yes"
9425 else
9426   echo "configure: failed program was:" >&5
9427   cat conftest.$ac_ext >&5
9428   rm -rf conftest*
9429   eval "ac_cv_lib_$ac_lib_var=no"
9430 fi
9431 rm -f conftest*
9432 LIBS="$ac_save_LIBS"
9433
9434 fi
9435 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9436   echo "$ac_t""yes" 1>&6
9437     ac_tr_lib=HAVE_LIB`echo gen | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9438     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9439   cat >> confdefs.h <<EOF
9440 #define $ac_tr_lib 1
9441 EOF
9442
9443   LIBS="-lgen $LIBS"
9444
9445 else
9446   echo "$ac_t""no" 1>&6
9447 fi
9448
9449
9450 fi
9451
9452
9453 echo $ac_n "checking for select""... $ac_c" 1>&6
9454 echo "configure:9455: checking for select" >&5
9455 if eval "test \"\${ac_cv_func_select+set}\" = set"; then
9456   echo $ac_n "(cached) $ac_c" 1>&6
9457 else
9458   cat > conftest.$ac_ext <<EOF
9459 #line 9460 "configure"
9460 #include "confdefs.h"
9461 /* System header to define __stub macros and hopefully few prototypes,
9462     which can conflict with char select(); below.  */
9463 #include <assert.h>
9464 /* Override any gcc2 internal prototype to avoid an error.  */
9465 /* We use char because int might match the return type of a gcc2
9466     builtin and then its argument prototype would still apply.  */
9467 char select();
9468 char (*f)();
9469
9470 int main() {
9471
9472 /* The GNU C library defines this for functions which it implements
9473     to always fail with ENOSYS.  Some functions are actually named
9474     something starting with __ and the normal name is an alias.  */
9475 #if defined (__stub_select) || defined (__stub___select)
9476 choke me
9477 #else
9478 f = select;
9479 #endif
9480
9481 ; return 0; }
9482 EOF
9483 if { (eval echo configure:9484: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9484   rm -rf conftest*
9485   eval "ac_cv_func_select=yes"
9486 else
9487   echo "configure: failed program was:" >&5
9488   cat conftest.$ac_ext >&5
9489   rm -rf conftest*
9490   eval "ac_cv_func_select=no"
9491 fi
9492 rm -f conftest*
9493 fi
9494
9495 if eval "test \"`echo '$ac_cv_func_'select`\" = yes"; then
9496   echo "$ac_t""yes" 1>&6
9497   :
9498 else
9499   echo "$ac_t""no" 1>&6
9500 { echo "configure: error: select() required." 1>&2; exit 1; }
9501 fi
9502
9503
9504 if test "${ac_cv_header_winsock_h}" != yes; then
9505                                 echo $ac_n "checking types of arguments for select()""... $ac_c" 1>&6
9506 echo "configure:9507: checking types of arguments for select()" >&5
9507  if eval "test \"\${ac_cv_func_select_arg234+set}\" = set"; then
9508   echo $ac_n "(cached) $ac_c" 1>&6
9509 else
9510    if eval "test \"\${ac_cv_func_select_arg1+set}\" = set"; then
9511   echo $ac_n "(cached) $ac_c" 1>&6
9512 else
9513     if eval "test \"\${ac_cv_func_select_arg5+set}\" = set"; then
9514   echo $ac_n "(cached) $ac_c" 1>&6
9515 else
9516      for ac_cv_func_select_arg234 in 'fd_set *' 'int *' 'void *'; do
9517      for ac_cv_func_select_arg1 in 'int' 'size_t' 'unsigned long' 'unsigned'; do
9518       for ac_cv_func_select_arg5 in 'struct timeval *' 'const struct timeval *'; do
9519        cat > conftest.$ac_ext <<EOF
9520 #line 9521 "configure"
9521 #include "confdefs.h"
9522 #ifdef HAVE_SYS_TYPES_H
9523 #include <sys/types.h>
9524 #endif
9525 #ifdef HAVE_SYS_TIME_H
9526 #include <sys/time.h>
9527 #endif
9528 #ifdef HAVE_SYS_SELECT_H
9529 #include <sys/select.h>
9530 #endif
9531 #ifdef HAVE_SYS_SOCKET_H
9532 #include <sys/socket.h>
9533 #endif
9534 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);
9535 int main() {
9536
9537 ; return 0; }
9538 EOF
9539 if { (eval echo configure:9540: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9540   rm -rf conftest*
9541           ac_not_found=no ; break 3
9542 else
9543   echo "configure: failed program was:" >&5
9544   cat conftest.$ac_ext >&5
9545   rm -rf conftest*
9546   ac_not_found=yes
9547 fi
9548 rm -f conftest*
9549       done
9550      done
9551     done
9552    
9553 fi
9554   
9555 fi
9556  
9557 fi
9558  if test "$ac_not_found" = yes; then
9559   ac_cv_func_select_arg1=int 
9560   ac_cv_func_select_arg234='int *' 
9561   ac_cv_func_select_arg5='struct timeval *'
9562  fi
9563  echo "$ac_t""$ac_cv_func_select_arg1,$ac_cv_func_select_arg234,$ac_cv_func_select_arg5" 1>&6
9564  cat >> confdefs.h <<EOF
9565 #define SELECT_TYPE_ARG1 $ac_cv_func_select_arg1
9566 EOF
9567
9568  cat >> confdefs.h <<EOF
9569 #define SELECT_TYPE_ARG234 ($ac_cv_func_select_arg234)
9570 EOF
9571
9572  cat >> confdefs.h <<EOF
9573 #define SELECT_TYPE_ARG5 ($ac_cv_func_select_arg5)
9574 EOF
9575
9576
9577 fi
9578
9579
9580 for ac_hdr in regex.h 
9581 do
9582 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9583 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9584 echo "configure:9585: checking for $ac_hdr" >&5
9585 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9586   echo $ac_n "(cached) $ac_c" 1>&6
9587 else
9588   cat > conftest.$ac_ext <<EOF
9589 #line 9590 "configure"
9590 #include "confdefs.h"
9591 #include <$ac_hdr>
9592 EOF
9593 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9594 { (eval echo configure:9595: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9595 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9596 if test -z "$ac_err"; then
9597   rm -rf conftest*
9598   eval "ac_cv_header_$ac_safe=yes"
9599 else
9600   echo "$ac_err" >&5
9601   echo "configure: failed program was:" >&5
9602   cat conftest.$ac_ext >&5
9603   rm -rf conftest*
9604   eval "ac_cv_header_$ac_safe=no"
9605 fi
9606 rm -f conftest*
9607 fi
9608 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9609   echo "$ac_t""yes" 1>&6
9610     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9611   cat >> confdefs.h <<EOF
9612 #define $ac_tr_hdr 1
9613 EOF
9614  
9615 else
9616   echo "$ac_t""no" 1>&6
9617 fi
9618 done
9619
9620 if test "$ac_cv_header_regex_h" != yes ; then
9621         { echo "configure: error: POSIX regex.h required." 1>&2; exit 1; }
9622 fi
9623
9624 echo $ac_n "checking for library containing regfree""... $ac_c" 1>&6
9625 echo "configure:9626: checking for library containing regfree" >&5
9626 if eval "test \"\${ac_cv_search_regfree+set}\" = set"; then
9627   echo $ac_n "(cached) $ac_c" 1>&6
9628 else
9629   ac_func_search_save_LIBS="$LIBS"
9630 ac_cv_search_regfree="no"
9631 cat > conftest.$ac_ext <<EOF
9632 #line 9633 "configure"
9633 #include "confdefs.h"
9634 /* Override any gcc2 internal prototype to avoid an error.  */
9635 /* We use char because int might match the return type of a gcc2
9636     builtin and then its argument prototype would still apply.  */
9637 char regfree();
9638
9639 int main() {
9640 regfree()
9641 ; return 0; }
9642 EOF
9643 if { (eval echo configure:9644: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9644   rm -rf conftest*
9645   ac_cv_search_regfree="none required"
9646 else
9647   echo "configure: failed program was:" >&5
9648   cat conftest.$ac_ext >&5
9649 fi
9650 rm -f conftest*
9651 test "$ac_cv_search_regfree" = "no" && for ac_lib in regex gnuregex; do
9652 LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9653 cat > conftest.$ac_ext <<EOF
9654 #line 9655 "configure"
9655 #include "confdefs.h"
9656 /* Override any gcc2 internal prototype to avoid an error.  */
9657 /* We use char because int might match the return type of a gcc2
9658     builtin and then its argument prototype would still apply.  */
9659 char regfree();
9660
9661 int main() {
9662 regfree()
9663 ; return 0; }
9664 EOF
9665 if { (eval echo configure:9666: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9666   rm -rf conftest*
9667   ac_cv_search_regfree="-l$ac_lib"
9668 break
9669 else
9670   echo "configure: failed program was:" >&5
9671   cat conftest.$ac_ext >&5
9672 fi
9673 rm -f conftest*
9674 done
9675 LIBS="$ac_func_search_save_LIBS"
9676 fi
9677
9678 echo "$ac_t""$ac_cv_search_regfree" 1>&6
9679 if test "$ac_cv_search_regfree" != "no"; then
9680   test "$ac_cv_search_regfree" = "none required" || LIBS="$ac_cv_search_regfree $LIBS"
9681   :
9682 else :
9683   { echo "configure: error: POSIX regex required." 1>&2; exit 1; }
9684 fi
9685
9686
9687 echo $ac_n "checking for compatible POSIX regex""... $ac_c" 1>&6
9688 echo "configure:9689: checking for compatible POSIX regex" >&5
9689 if eval "test \"\${ol_cv_c_posix_regex+set}\" = set"; then
9690   echo $ac_n "(cached) $ac_c" 1>&6
9691 else
9692   
9693         if test "$cross_compiling" = yes; then
9694   ol_cv_c_posix_regex=cross
9695 else
9696   cat > conftest.$ac_ext <<EOF
9697 #line 9698 "configure"
9698 #include "confdefs.h"
9699
9700 #include <sys/types.h>
9701 #include <regex.h>
9702 static char *pattern, *string;
9703 main()
9704 {
9705         int rc;
9706         regex_t re;
9707
9708         pattern = "^A";
9709
9710         if(regcomp(&re, pattern, 0)) {
9711                 return -1;
9712         }
9713         
9714         string = "ALL MATCH";
9715         
9716         rc = regexec(&re, string, 0, (void*)0, 0);
9717
9718         regfree(&re);
9719
9720         return rc;
9721 }
9722 EOF
9723 if { (eval echo configure:9724: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9724 then
9725   ol_cv_c_posix_regex=yes
9726 else
9727   echo "configure: failed program was:" >&5
9728   cat conftest.$ac_ext >&5
9729   rm -fr conftest*
9730   ol_cv_c_posix_regex=no
9731 fi
9732 rm -fr conftest*
9733 fi
9734
9735 fi
9736
9737 echo "$ac_t""$ol_cv_c_posix_regex" 1>&6
9738
9739 if test "$ol_cv_c_posix_regex" = no ; then
9740         { echo "configure: error: broken POSIX regex!" 1>&2; exit 1; }
9741 fi
9742
9743
9744 have_uuid=no
9745 for ac_hdr in sys/uuid.h
9746 do
9747 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9748 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9749 echo "configure:9750: checking for $ac_hdr" >&5
9750 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9751   echo $ac_n "(cached) $ac_c" 1>&6
9752 else
9753   cat > conftest.$ac_ext <<EOF
9754 #line 9755 "configure"
9755 #include "confdefs.h"
9756 #include <$ac_hdr>
9757 EOF
9758 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9759 { (eval echo configure:9760: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9760 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9761 if test -z "$ac_err"; then
9762   rm -rf conftest*
9763   eval "ac_cv_header_$ac_safe=yes"
9764 else
9765   echo "$ac_err" >&5
9766   echo "configure: failed program was:" >&5
9767   cat conftest.$ac_ext >&5
9768   rm -rf conftest*
9769   eval "ac_cv_header_$ac_safe=no"
9770 fi
9771 rm -f conftest*
9772 fi
9773 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9774   echo "$ac_t""yes" 1>&6
9775     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9776   cat >> confdefs.h <<EOF
9777 #define $ac_tr_hdr 1
9778 EOF
9779  
9780 else
9781   echo "$ac_t""no" 1>&6
9782 fi
9783 done
9784
9785 if test $ac_cv_header_sys_uuid_h = yes ; then
9786         save_LIBS="$LIBS"
9787         
9788 echo $ac_n "checking for library containing uuid_to_str""... $ac_c" 1>&6
9789 echo "configure:9790: checking for library containing uuid_to_str" >&5
9790 if eval "test \"\${ac_cv_search_uuid_to_str+set}\" = set"; then
9791   echo $ac_n "(cached) $ac_c" 1>&6
9792 else
9793   ac_func_search_save_LIBS="$LIBS"
9794 ac_cv_search_uuid_to_str="no"
9795 cat > conftest.$ac_ext <<EOF
9796 #line 9797 "configure"
9797 #include "confdefs.h"
9798 /* Override any gcc2 internal prototype to avoid an error.  */
9799 /* We use char because int might match the return type of a gcc2
9800     builtin and then its argument prototype would still apply.  */
9801 char uuid_to_str();
9802
9803 int main() {
9804 uuid_to_str()
9805 ; return 0; }
9806 EOF
9807 if { (eval echo configure:9808: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9808   rm -rf conftest*
9809   ac_cv_search_uuid_to_str="none required"
9810 else
9811   echo "configure: failed program was:" >&5
9812   cat conftest.$ac_ext >&5
9813 fi
9814 rm -f conftest*
9815 test "$ac_cv_search_uuid_to_str" = "no" && for ac_lib in uuid; do
9816 LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9817 cat > conftest.$ac_ext <<EOF
9818 #line 9819 "configure"
9819 #include "confdefs.h"
9820 /* Override any gcc2 internal prototype to avoid an error.  */
9821 /* We use char because int might match the return type of a gcc2
9822     builtin and then its argument prototype would still apply.  */
9823 char uuid_to_str();
9824
9825 int main() {
9826 uuid_to_str()
9827 ; return 0; }
9828 EOF
9829 if { (eval echo configure:9830: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9830   rm -rf conftest*
9831   ac_cv_search_uuid_to_str="-l$ac_lib"
9832 break
9833 else
9834   echo "configure: failed program was:" >&5
9835   cat conftest.$ac_ext >&5
9836 fi
9837 rm -f conftest*
9838 done
9839 LIBS="$ac_func_search_save_LIBS"
9840 fi
9841
9842 echo "$ac_t""$ac_cv_search_uuid_to_str" 1>&6
9843 if test "$ac_cv_search_uuid_to_str" != "no"; then
9844   test "$ac_cv_search_uuid_to_str" = "none required" || LIBS="$ac_cv_search_uuid_to_str $LIBS"
9845   have_uuid=yes
9846 else :
9847   :
9848 fi
9849         LIBS="$save_LIBS"
9850
9851         if test have_uuid = yes ; then
9852                 cat >> confdefs.h <<\EOF
9853 #define HAVE_UUID_TO_STR 1
9854 EOF
9855
9856
9857                 test "$ac_cv_search_uuid_to_str" = "none required" || \
9858                         SLAPD_LIBS="$SLAPD_LIBS $ac_cv_search_uuid_to_str"
9859         fi
9860 fi
9861
9862 if test $have_uuid = no ; then
9863         echo $ac_n "checking to see if -lrpcrt4 is needed for win32 UUID support""... $ac_c" 1>&6
9864 echo "configure:9865: checking to see if -lrpcrt4 is needed for win32 UUID support" >&5
9865         save_LIBS="$LIBS"
9866         LIBS="$LIBS -lrpcrt4"
9867         cat > conftest.$ac_ext <<EOF
9868 #line 9869 "configure"
9869 #include "confdefs.h"
9870
9871                 char UuidCreate@4();
9872                 char UuidToStringA@8();
9873                 
9874 int main() {
9875
9876                 UuidCreate@4();
9877                 UuidToStringA@8();
9878                 
9879 ; return 0; }
9880 EOF
9881 if { (eval echo configure:9882: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9882   rm -rf conftest*
9883   need_rpcrt=yes
9884 else
9885   echo "configure: failed program was:" >&5
9886   cat conftest.$ac_ext >&5
9887   rm -rf conftest*
9888   need_rpcrt=no
9889 fi
9890 rm -f conftest*
9891         if test $need_rpcrt = yes; then
9892                 SLAPD_LIBS="$SLAPD_LIBS -lrpcrt4"
9893         fi
9894         LIBS="$save_LIBS"
9895         echo "$ac_t""$need_rpcrt" 1>&6
9896 fi
9897
9898 ol_link_dnssrv=no
9899 echo $ac_n "checking for res_query""... $ac_c" 1>&6
9900 echo "configure:9901: checking for res_query" >&5
9901 if eval "test \"\${ac_cv_func_res_query+set}\" = set"; then
9902   echo $ac_n "(cached) $ac_c" 1>&6
9903 else
9904   cat > conftest.$ac_ext <<EOF
9905 #line 9906 "configure"
9906 #include "confdefs.h"
9907 /* System header to define __stub macros and hopefully few prototypes,
9908     which can conflict with char res_query(); below.  */
9909 #include <assert.h>
9910 /* Override any gcc2 internal prototype to avoid an error.  */
9911 /* We use char because int might match the return type of a gcc2
9912     builtin and then its argument prototype would still apply.  */
9913 char res_query();
9914 char (*f)();
9915
9916 int main() {
9917
9918 /* The GNU C library defines this for functions which it implements
9919     to always fail with ENOSYS.  Some functions are actually named
9920     something starting with __ and the normal name is an alias.  */
9921 #if defined (__stub_res_query) || defined (__stub___res_query)
9922 choke me
9923 #else
9924 f = res_query;
9925 #endif
9926
9927 ; return 0; }
9928 EOF
9929 if { (eval echo configure:9930: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9930   rm -rf conftest*
9931   eval "ac_cv_func_res_query=yes"
9932 else
9933   echo "configure: failed program was:" >&5
9934   cat conftest.$ac_ext >&5
9935   rm -rf conftest*
9936   eval "ac_cv_func_res_query=no"
9937 fi
9938 rm -f conftest*
9939 fi
9940
9941 if eval "test \"`echo '$ac_cv_func_'res_query`\" = yes"; then
9942   echo "$ac_t""yes" 1>&6
9943   :
9944 else
9945   echo "$ac_t""no" 1>&6
9946 fi
9947
9948 if test $ac_cv_func_res_query = no ; then 
9949         echo $ac_n "checking for __res_query""... $ac_c" 1>&6
9950 echo "configure:9951: checking for __res_query" >&5
9951 if eval "test \"\${ac_cv_func___res_query+set}\" = set"; then
9952   echo $ac_n "(cached) $ac_c" 1>&6
9953 else
9954   cat > conftest.$ac_ext <<EOF
9955 #line 9956 "configure"
9956 #include "confdefs.h"
9957 /* System header to define __stub macros and hopefully few prototypes,
9958     which can conflict with char __res_query(); below.  */
9959 #include <assert.h>
9960 /* Override any gcc2 internal prototype to avoid an error.  */
9961 /* We use char because int might match the return type of a gcc2
9962     builtin and then its argument prototype would still apply.  */
9963 char __res_query();
9964 char (*f)();
9965
9966 int main() {
9967
9968 /* The GNU C library defines this for functions which it implements
9969     to always fail with ENOSYS.  Some functions are actually named
9970     something starting with __ and the normal name is an alias.  */
9971 #if defined (__stub___res_query) || defined (__stub_____res_query)
9972 choke me
9973 #else
9974 f = __res_query;
9975 #endif
9976
9977 ; return 0; }
9978 EOF
9979 if { (eval echo configure:9980: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9980   rm -rf conftest*
9981   eval "ac_cv_func___res_query=yes"
9982 else
9983   echo "configure: failed program was:" >&5
9984   cat conftest.$ac_ext >&5
9985   rm -rf conftest*
9986   eval "ac_cv_func___res_query=no"
9987 fi
9988 rm -f conftest*
9989 fi
9990
9991 if eval "test \"`echo '$ac_cv_func_'__res_query`\" = yes"; then
9992   echo "$ac_t""yes" 1>&6
9993   :
9994 else
9995   echo "$ac_t""no" 1>&6
9996 fi
9997
9998         ac_cv_func_res_query=$ac_cv_func___res_query
9999 fi
10000
10001 if test $ac_cv_func_res_query = no ; then 
10002         echo $ac_n "checking for res_query in -lbind""... $ac_c" 1>&6
10003 echo "configure:10004: checking for res_query in -lbind" >&5
10004 ac_lib_var=`echo bind'_'res_query | sed 'y%./+-:%__p__%'`
10005 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10006   echo $ac_n "(cached) $ac_c" 1>&6
10007 else
10008   ac_save_LIBS="$LIBS"
10009 LIBS="-lbind  $LIBS"
10010 cat > conftest.$ac_ext <<EOF
10011 #line 10012 "configure"
10012 #include "confdefs.h"
10013 /* Override any gcc2 internal prototype to avoid an error.  */
10014 /* We use char because int might match the return type of a gcc2
10015     builtin and then its argument prototype would still apply.  */
10016 char res_query();
10017
10018 int main() {
10019 res_query()
10020 ; return 0; }
10021 EOF
10022 if { (eval echo configure:10023: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10023   rm -rf conftest*
10024   eval "ac_cv_lib_$ac_lib_var=yes"
10025 else
10026   echo "configure: failed program was:" >&5
10027   cat conftest.$ac_ext >&5
10028   rm -rf conftest*
10029   eval "ac_cv_lib_$ac_lib_var=no"
10030 fi
10031 rm -f conftest*
10032 LIBS="$ac_save_LIBS"
10033
10034 fi
10035 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10036   echo "$ac_t""yes" 1>&6
10037     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10038     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10039   cat >> confdefs.h <<EOF
10040 #define $ac_tr_lib 1
10041 EOF
10042
10043   LIBS="-lbind $LIBS"
10044
10045 else
10046   echo "$ac_t""no" 1>&6
10047 fi
10048
10049         ac_cv_func_res_query=$ac_cv_lib_bind_res_query
10050 fi
10051
10052 if test $ac_cv_func_res_query = no ; then 
10053         echo $ac_n "checking for __res_query in -lbind""... $ac_c" 1>&6
10054 echo "configure:10055: checking for __res_query in -lbind" >&5
10055 ac_lib_var=`echo bind'_'__res_query | sed 'y%./+-:%__p__%'`
10056 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10057   echo $ac_n "(cached) $ac_c" 1>&6
10058 else
10059   ac_save_LIBS="$LIBS"
10060 LIBS="-lbind  $LIBS"
10061 cat > conftest.$ac_ext <<EOF
10062 #line 10063 "configure"
10063 #include "confdefs.h"
10064 /* Override any gcc2 internal prototype to avoid an error.  */
10065 /* We use char because int might match the return type of a gcc2
10066     builtin and then its argument prototype would still apply.  */
10067 char __res_query();
10068
10069 int main() {
10070 __res_query()
10071 ; return 0; }
10072 EOF
10073 if { (eval echo configure:10074: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10074   rm -rf conftest*
10075   eval "ac_cv_lib_$ac_lib_var=yes"
10076 else
10077   echo "configure: failed program was:" >&5
10078   cat conftest.$ac_ext >&5
10079   rm -rf conftest*
10080   eval "ac_cv_lib_$ac_lib_var=no"
10081 fi
10082 rm -f conftest*
10083 LIBS="$ac_save_LIBS"
10084
10085 fi
10086 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10087   echo "$ac_t""yes" 1>&6
10088     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10089     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10090   cat >> confdefs.h <<EOF
10091 #define $ac_tr_lib 1
10092 EOF
10093
10094   LIBS="-lbind $LIBS"
10095
10096 else
10097   echo "$ac_t""no" 1>&6
10098 fi
10099
10100         ac_cv_func_res_query=$ac_cv_lib_bind___res_query
10101 fi
10102
10103 if test $ac_cv_func_res_query = no ; then 
10104         echo $ac_n "checking for res_query in -lresolv""... $ac_c" 1>&6
10105 echo "configure:10106: checking for res_query in -lresolv" >&5
10106 ac_lib_var=`echo resolv'_'res_query | sed 'y%./+-:%__p__%'`
10107 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10108   echo $ac_n "(cached) $ac_c" 1>&6
10109 else
10110   ac_save_LIBS="$LIBS"
10111 LIBS="-lresolv  $LIBS"
10112 cat > conftest.$ac_ext <<EOF
10113 #line 10114 "configure"
10114 #include "confdefs.h"
10115 /* Override any gcc2 internal prototype to avoid an error.  */
10116 /* We use char because int might match the return type of a gcc2
10117     builtin and then its argument prototype would still apply.  */
10118 char res_query();
10119
10120 int main() {
10121 res_query()
10122 ; return 0; }
10123 EOF
10124 if { (eval echo configure:10125: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10125   rm -rf conftest*
10126   eval "ac_cv_lib_$ac_lib_var=yes"
10127 else
10128   echo "configure: failed program was:" >&5
10129   cat conftest.$ac_ext >&5
10130   rm -rf conftest*
10131   eval "ac_cv_lib_$ac_lib_var=no"
10132 fi
10133 rm -f conftest*
10134 LIBS="$ac_save_LIBS"
10135
10136 fi
10137 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10138   echo "$ac_t""yes" 1>&6
10139     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10140     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10141   cat >> confdefs.h <<EOF
10142 #define $ac_tr_lib 1
10143 EOF
10144
10145   LIBS="-lresolv $LIBS"
10146
10147 else
10148   echo "$ac_t""no" 1>&6
10149 fi
10150
10151         ac_cv_func_res_query=$ac_cv_lib_resolv_res_query
10152 fi
10153
10154 if test $ac_cv_func_res_query = no ; then 
10155         echo $ac_n "checking for __res_query in -lresolv""... $ac_c" 1>&6
10156 echo "configure:10157: checking for __res_query in -lresolv" >&5
10157 ac_lib_var=`echo resolv'_'__res_query | sed 'y%./+-:%__p__%'`
10158 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10159   echo $ac_n "(cached) $ac_c" 1>&6
10160 else
10161   ac_save_LIBS="$LIBS"
10162 LIBS="-lresolv  $LIBS"
10163 cat > conftest.$ac_ext <<EOF
10164 #line 10165 "configure"
10165 #include "confdefs.h"
10166 /* Override any gcc2 internal prototype to avoid an error.  */
10167 /* We use char because int might match the return type of a gcc2
10168     builtin and then its argument prototype would still apply.  */
10169 char __res_query();
10170
10171 int main() {
10172 __res_query()
10173 ; return 0; }
10174 EOF
10175 if { (eval echo configure:10176: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10176   rm -rf conftest*
10177   eval "ac_cv_lib_$ac_lib_var=yes"
10178 else
10179   echo "configure: failed program was:" >&5
10180   cat conftest.$ac_ext >&5
10181   rm -rf conftest*
10182   eval "ac_cv_lib_$ac_lib_var=no"
10183 fi
10184 rm -f conftest*
10185 LIBS="$ac_save_LIBS"
10186
10187 fi
10188 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10189   echo "$ac_t""yes" 1>&6
10190     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10191     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10192   cat >> confdefs.h <<EOF
10193 #define $ac_tr_lib 1
10194 EOF
10195
10196   LIBS="-lresolv $LIBS"
10197
10198 else
10199   echo "$ac_t""no" 1>&6
10200 fi
10201
10202         ac_cv_func_res_query=$ac_cv_lib_resolv___res_query
10203 fi
10204
10205 if test "$ac_cv_func_res_query" = yes ; then
10206         cat >> confdefs.h <<\EOF
10207 #define HAVE_RES_QUERY 1
10208 EOF
10209
10210
10211         if test $ol_enable_dnssrv != no ; then
10212                 ol_link_dnssrv=yes
10213         fi
10214 fi
10215
10216 if test "$ol_enable_dnssrv" = yes -a "$ol_link_dnssrv" = no ; then
10217         { echo "configure: error: DNSSRV requires res_query()" 1>&2; exit 1; }
10218 fi
10219
10220 for ac_func in getaddrinfo getnameinfo gai_strerror inet_ntop 
10221 do
10222 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10223 echo "configure:10224: checking for $ac_func" >&5
10224 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10225   echo $ac_n "(cached) $ac_c" 1>&6
10226 else
10227   cat > conftest.$ac_ext <<EOF
10228 #line 10229 "configure"
10229 #include "confdefs.h"
10230 /* System header to define __stub macros and hopefully few prototypes,
10231     which can conflict with char $ac_func(); below.  */
10232 #include <assert.h>
10233 /* Override any gcc2 internal prototype to avoid an error.  */
10234 /* We use char because int might match the return type of a gcc2
10235     builtin and then its argument prototype would still apply.  */
10236 char $ac_func();
10237 char (*f)();
10238
10239 int main() {
10240
10241 /* The GNU C library defines this for functions which it implements
10242     to always fail with ENOSYS.  Some functions are actually named
10243     something starting with __ and the normal name is an alias.  */
10244 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10245 choke me
10246 #else
10247 f = $ac_func;
10248 #endif
10249
10250 ; return 0; }
10251 EOF
10252 if { (eval echo configure:10253: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10253   rm -rf conftest*
10254   eval "ac_cv_func_$ac_func=yes"
10255 else
10256   echo "configure: failed program was:" >&5
10257   cat conftest.$ac_ext >&5
10258   rm -rf conftest*
10259   eval "ac_cv_func_$ac_func=no"
10260 fi
10261 rm -f conftest*
10262 fi
10263
10264 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10265   echo "$ac_t""yes" 1>&6
10266     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10267   cat >> confdefs.h <<EOF
10268 #define $ac_tr_func 1
10269 EOF
10270  
10271 else
10272   echo "$ac_t""no" 1>&6
10273 fi
10274 done
10275
10276
10277 ol_link_ipv6=no
10278 if test $ac_cv_func_getaddrinfo = no -o $ac_cv_func_inet_ntop = no ; then
10279         if test $ol_enable_ipv6 = yes ; then
10280                 { echo "configure: error: IPv6 support requires getaddrinfo() and inet_ntop()" 1>&2; exit 1; }
10281         fi
10282 elif test $ol_enable_ipv6 != no ; then
10283         echo $ac_n "checking INET6_ADDRSTRLEN""... $ac_c" 1>&6
10284 echo "configure:10285: checking INET6_ADDRSTRLEN" >&5
10285 if eval "test \"\${ol_cv_inet6_addrstrlen+set}\" = set"; then
10286   echo $ac_n "(cached) $ac_c" 1>&6
10287 else
10288   
10289                 cat > conftest.$ac_ext <<EOF
10290 #line 10291 "configure"
10291 #include "confdefs.h"
10292
10293 #                       include <netinet/in.h>
10294 #                       ifdef INET6_ADDRSTRLEN
10295                                 __has_inet6_addrstrlen__;
10296 #                       endif
10297                 
10298 EOF
10299 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10300   egrep "__has_inet6_addrstrlen__" >/dev/null 2>&1; then
10301   rm -rf conftest*
10302   ol_cv_inet6_addrstrlen=yes
10303 else
10304   rm -rf conftest*
10305   ol_cv_inet6_addrstrlen=no
10306 fi
10307 rm -f conftest*
10308
10309 fi
10310
10311 echo "$ac_t""$ol_cv_inet6_addrstrlen" 1>&6
10312
10313
10314         echo $ac_n "checking struct sockaddr_storage""... $ac_c" 1>&6
10315 echo "configure:10316: checking struct sockaddr_storage" >&5
10316 if eval "test \"\${ol_cv_struct_sockaddr_storage+set}\" = set"; then
10317   echo $ac_n "(cached) $ac_c" 1>&6
10318 else
10319   
10320                 cat > conftest.$ac_ext <<EOF
10321 #line 10322 "configure"
10322 #include "confdefs.h"
10323
10324 #include <sys/types.h>
10325 #include <sys/socket.h>
10326
10327 int main() {
10328
10329                         struct sockaddr_storage ss;
10330
10331 ; return 0; }
10332 EOF
10333 if { (eval echo configure:10334: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10334   rm -rf conftest*
10335   ol_cv_struct_sockaddr_storage=yes
10336 else
10337   echo "configure: failed program was:" >&5
10338   cat conftest.$ac_ext >&5
10339   rm -rf conftest*
10340   ol_cv_struct_sockaddr_storage=no
10341 fi
10342 rm -f conftest*
10343 fi
10344
10345 echo "$ac_t""$ol_cv_struct_sockaddr_storage" 1>&6
10346
10347         if test $ol_cv_inet6_addrstrlen = yes \
10348                 -a $ol_cv_struct_sockaddr_storage = yes ; then
10349                 ol_link_ipv6=yes
10350         elif test $ol_enable_ipv6 = yes \
10351                         -a $ol_cv_inet6_addrstrlen = no ; then
10352                 { echo "configure: error: IPv6 support requires INET6_ADDRSTRLEN" 1>&2; exit 1; }
10353         elif test $ol_enable_ipv6 = yes \
10354                         -a $ol_cv_struct_sockaddr_storage = no ; then
10355                 { echo "configure: error: IPv6 support requires struct sockaddr_storage" 1>&2; exit 1; }
10356         fi
10357 fi
10358
10359 if test $ol_enable_local != no ; then
10360         for ac_hdr in sys/un.h 
10361 do
10362 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10363 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10364 echo "configure:10365: checking for $ac_hdr" >&5
10365 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10366   echo $ac_n "(cached) $ac_c" 1>&6
10367 else
10368   cat > conftest.$ac_ext <<EOF
10369 #line 10370 "configure"
10370 #include "confdefs.h"
10371 #include <$ac_hdr>
10372 EOF
10373 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10374 { (eval echo configure:10375: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10375 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10376 if test -z "$ac_err"; then
10377   rm -rf conftest*
10378   eval "ac_cv_header_$ac_safe=yes"
10379 else
10380   echo "$ac_err" >&5
10381   echo "configure: failed program was:" >&5
10382   cat conftest.$ac_ext >&5
10383   rm -rf conftest*
10384   eval "ac_cv_header_$ac_safe=no"
10385 fi
10386 rm -f conftest*
10387 fi
10388 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10389   echo "$ac_t""yes" 1>&6
10390     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10391   cat >> confdefs.h <<EOF
10392 #define $ac_tr_hdr 1
10393 EOF
10394  
10395 else
10396   echo "$ac_t""no" 1>&6
10397 fi
10398 done
10399
10400
10401         if test $ol_enable_local = auto ; then
10402                 ol_enable_local=$ac_cv_header_sys_un_h
10403         elif test $ac_cv_header_sys_un_h = no ; then
10404                 { echo "configure: error: AF_LOCAL domain support requires sys/un.h" 1>&2; exit 1; }
10405         fi
10406 fi
10407
10408 ol_link_kbind=no
10409 ol_link_kpasswd=no
10410 ol_link_krb5=no
10411 ol_link_krb4=no
10412
10413 if test $ol_with_kerberos = yes -o $ol_with_kerberos = auto \
10414         -o $ol_with_kerberos = k5 -o $ol_with_kerberos = k5only \
10415         -o $ol_with_kerberos = k425 ; then
10416
10417         for ac_hdr in krb5.h
10418 do
10419 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10420 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10421 echo "configure:10422: checking for $ac_hdr" >&5
10422 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10423   echo $ac_n "(cached) $ac_c" 1>&6
10424 else
10425   cat > conftest.$ac_ext <<EOF
10426 #line 10427 "configure"
10427 #include "confdefs.h"
10428 #include <$ac_hdr>
10429 EOF
10430 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10431 { (eval echo configure:10432: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10432 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10433 if test -z "$ac_err"; then
10434   rm -rf conftest*
10435   eval "ac_cv_header_$ac_safe=yes"
10436 else
10437   echo "$ac_err" >&5
10438   echo "configure: failed program was:" >&5
10439   cat conftest.$ac_ext >&5
10440   rm -rf conftest*
10441   eval "ac_cv_header_$ac_safe=no"
10442 fi
10443 rm -f conftest*
10444 fi
10445 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10446   echo "$ac_t""yes" 1>&6
10447     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10448   cat >> confdefs.h <<EOF
10449 #define $ac_tr_hdr 1
10450 EOF
10451  
10452 else
10453   echo "$ac_t""no" 1>&6
10454 fi
10455 done
10456
10457
10458         if test $ac_cv_header_krb5_h = yes ; then
10459                                 for ac_hdr in heim_err.h
10460 do
10461 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10462 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10463 echo "configure:10464: checking for $ac_hdr" >&5
10464 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10465   echo $ac_n "(cached) $ac_c" 1>&6
10466 else
10467   cat > conftest.$ac_ext <<EOF
10468 #line 10469 "configure"
10469 #include "confdefs.h"
10470 #include <$ac_hdr>
10471 EOF
10472 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10473 { (eval echo configure:10474: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10474 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10475 if test -z "$ac_err"; then
10476   rm -rf conftest*
10477   eval "ac_cv_header_$ac_safe=yes"
10478 else
10479   echo "$ac_err" >&5
10480   echo "configure: failed program was:" >&5
10481   cat conftest.$ac_ext >&5
10482   rm -rf conftest*
10483   eval "ac_cv_header_$ac_safe=no"
10484 fi
10485 rm -f conftest*
10486 fi
10487 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10488   echo "$ac_t""yes" 1>&6
10489     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10490   cat >> confdefs.h <<EOF
10491 #define $ac_tr_hdr 1
10492 EOF
10493  
10494 else
10495   echo "$ac_t""no" 1>&6
10496 fi
10497 done
10498
10499                 if test $ac_cv_header_heim_err_h = yes ; then
10500                         krb5_impl=heimdal
10501                 else
10502                         krb5_impl=mit
10503                 fi
10504
10505                 if test $krb5_impl = mit; then
10506                         echo $ac_n "checking for main in -lk5crypto""... $ac_c" 1>&6
10507 echo "configure:10508: checking for main in -lk5crypto" >&5
10508 ac_lib_var=`echo k5crypto'_'main | sed 'y%./+-:%__p__%'`
10509 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10510   echo $ac_n "(cached) $ac_c" 1>&6
10511 else
10512   ac_save_LIBS="$LIBS"
10513 LIBS="-lk5crypto  $LIBS"
10514 cat > conftest.$ac_ext <<EOF
10515 #line 10516 "configure"
10516 #include "confdefs.h"
10517
10518 int main() {
10519 main()
10520 ; return 0; }
10521 EOF
10522 if { (eval echo configure:10523: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10523   rm -rf conftest*
10524   eval "ac_cv_lib_$ac_lib_var=yes"
10525 else
10526   echo "configure: failed program was:" >&5
10527   cat conftest.$ac_ext >&5
10528   rm -rf conftest*
10529   eval "ac_cv_lib_$ac_lib_var=no"
10530 fi
10531 rm -f conftest*
10532 LIBS="$ac_save_LIBS"
10533
10534 fi
10535 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10536   echo "$ac_t""yes" 1>&6
10537   krb5crypto=k5crypto
10538 else
10539   echo "$ac_t""no" 1>&6
10540 krb5crypto=crypto
10541 fi
10542
10543
10544                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
10545 echo "configure:10546: checking for main in -lkrb5" >&5
10546 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
10547 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10548   echo $ac_n "(cached) $ac_c" 1>&6
10549 else
10550   ac_save_LIBS="$LIBS"
10551 LIBS="-lkrb5 -l$krb5crypto -lcom_err $LIBS"
10552 cat > conftest.$ac_ext <<EOF
10553 #line 10554 "configure"
10554 #include "confdefs.h"
10555
10556 int main() {
10557 main()
10558 ; return 0; }
10559 EOF
10560 if { (eval echo configure:10561: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10561   rm -rf conftest*
10562   eval "ac_cv_lib_$ac_lib_var=yes"
10563 else
10564   echo "configure: failed program was:" >&5
10565   cat conftest.$ac_ext >&5
10566   rm -rf conftest*
10567   eval "ac_cv_lib_$ac_lib_var=no"
10568 fi
10569 rm -f conftest*
10570 LIBS="$ac_save_LIBS"
10571
10572 fi
10573 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10574   echo "$ac_t""yes" 1>&6
10575   have_krb5=yes
10576                                 KRB5_LIBS="-lkrb5 -l$krb5crypto -lcom_err"
10577 else
10578   echo "$ac_t""no" 1>&6
10579 have_krb5=no
10580 fi
10581
10582
10583                 elif test $krb5_impl = heimdal; then
10584                         echo $ac_n "checking for main in -ldes""... $ac_c" 1>&6
10585 echo "configure:10586: checking for main in -ldes" >&5
10586 ac_lib_var=`echo des'_'main | sed 'y%./+-:%__p__%'`
10587 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10588   echo $ac_n "(cached) $ac_c" 1>&6
10589 else
10590   ac_save_LIBS="$LIBS"
10591 LIBS="-ldes  $LIBS"
10592 cat > conftest.$ac_ext <<EOF
10593 #line 10594 "configure"
10594 #include "confdefs.h"
10595
10596 int main() {
10597 main()
10598 ; return 0; }
10599 EOF
10600 if { (eval echo configure:10601: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10601   rm -rf conftest*
10602   eval "ac_cv_lib_$ac_lib_var=yes"
10603 else
10604   echo "configure: failed program was:" >&5
10605   cat conftest.$ac_ext >&5
10606   rm -rf conftest*
10607   eval "ac_cv_lib_$ac_lib_var=no"
10608 fi
10609 rm -f conftest*
10610 LIBS="$ac_save_LIBS"
10611
10612 fi
10613 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10614   echo "$ac_t""yes" 1>&6
10615   krb5crypto=des
10616 else
10617   echo "$ac_t""no" 1>&6
10618 krb5crypto=crypto
10619 fi
10620
10621
10622                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
10623 echo "configure:10624: checking for main in -lkrb5" >&5
10624 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
10625 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10626   echo $ac_n "(cached) $ac_c" 1>&6
10627 else
10628   ac_save_LIBS="$LIBS"
10629 LIBS="-lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err $LIBS"
10630 cat > conftest.$ac_ext <<EOF
10631 #line 10632 "configure"
10632 #include "confdefs.h"
10633
10634 int main() {
10635 main()
10636 ; return 0; }
10637 EOF
10638 if { (eval echo configure:10639: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10639   rm -rf conftest*
10640   eval "ac_cv_lib_$ac_lib_var=yes"
10641 else
10642   echo "configure: failed program was:" >&5
10643   cat conftest.$ac_ext >&5
10644   rm -rf conftest*
10645   eval "ac_cv_lib_$ac_lib_var=no"
10646 fi
10647 rm -f conftest*
10648 LIBS="$ac_save_LIBS"
10649
10650 fi
10651 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10652   echo "$ac_t""yes" 1>&6
10653   have_krb5=yes
10654                                 KRB5_LIBS="-lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err"
10655 else
10656   echo "$ac_t""no" 1>&6
10657 have_krb5=no
10658 fi
10659
10660
10661                         cat >> confdefs.h <<\EOF
10662 #define HAVE_HEIMDAL_KERBEROS 1
10663 EOF
10664
10665
10666                 else
10667                         have_krb5=no
10668                         echo "configure: warning: Unrecognized Kerberos5 Implementation" 1>&2
10669                 fi
10670
10671                 if test $have_krb5 = yes ; then
10672                         ol_link_krb5=yes
10673
10674                         cat >> confdefs.h <<\EOF
10675 #define HAVE_KRB5 1
10676 EOF
10677
10678
10679                         if test $ol_enable_kpasswd != no ; then
10680                                 ol_link_kpasswd=yes;
10681                         fi
10682
10683                         if test $ol_with_kerberos = k5only ; then
10684                                 ol_with_kerberos=found
10685                         fi
10686
10687                 elif test $ol_with_kerberos != auto ; then
10688                         { echo "configure: error: Required Kerberos 5 support not available" 1>&2; exit 1; }
10689                 fi
10690
10691         fi
10692 fi
10693
10694 if test $ol_link_krb5 = yes -a \( $ol_with_kerberos = yes -o \
10695         $ol_with_kerberos = auto -o $ol_with_kerberos = k425 \) ; then
10696
10697         for ac_hdr in kerberosIV/krb.h kerberosIV/des.h
10698 do
10699 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10700 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10701 echo "configure:10702: checking for $ac_hdr" >&5
10702 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10703   echo $ac_n "(cached) $ac_c" 1>&6
10704 else
10705   cat > conftest.$ac_ext <<EOF
10706 #line 10707 "configure"
10707 #include "confdefs.h"
10708 #include <$ac_hdr>
10709 EOF
10710 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10711 { (eval echo configure:10712: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10712 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10713 if test -z "$ac_err"; then
10714   rm -rf conftest*
10715   eval "ac_cv_header_$ac_safe=yes"
10716 else
10717   echo "$ac_err" >&5
10718   echo "configure: failed program was:" >&5
10719   cat conftest.$ac_ext >&5
10720   rm -rf conftest*
10721   eval "ac_cv_header_$ac_safe=no"
10722 fi
10723 rm -f conftest*
10724 fi
10725 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10726   echo "$ac_t""yes" 1>&6
10727     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10728   cat >> confdefs.h <<EOF
10729 #define $ac_tr_hdr 1
10730 EOF
10731  
10732 else
10733   echo "$ac_t""no" 1>&6
10734 fi
10735 done
10736
10737
10738         if test $ac_cv_header_kerberosIV_krb_h = yes ; then
10739                 if test $krb5_impl = mit; then
10740                         echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
10741 echo "configure:10742: checking for main in -lkrb4" >&5
10742 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
10743 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10744   echo $ac_n "(cached) $ac_c" 1>&6
10745 else
10746   ac_save_LIBS="$LIBS"
10747 LIBS="-lkrb4 -ldes425 -lkrb5 -l$krb5crypto -lcom_err $LIBS"
10748 cat > conftest.$ac_ext <<EOF
10749 #line 10750 "configure"
10750 #include "confdefs.h"
10751
10752 int main() {
10753 main()
10754 ; return 0; }
10755 EOF
10756 if { (eval echo configure:10757: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10757   rm -rf conftest*
10758   eval "ac_cv_lib_$ac_lib_var=yes"
10759 else
10760   echo "configure: failed program was:" >&5
10761   cat conftest.$ac_ext >&5
10762   rm -rf conftest*
10763   eval "ac_cv_lib_$ac_lib_var=no"
10764 fi
10765 rm -f conftest*
10766 LIBS="$ac_save_LIBS"
10767
10768 fi
10769 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10770   echo "$ac_t""yes" 1>&6
10771   have_k425=yes
10772                                 KRB4_LIBS="-lkrb4 -ldes425"
10773 else
10774   echo "$ac_t""no" 1>&6
10775 have_k425=no
10776 fi
10777
10778
10779                 elif test $krb5_impl = heimdal; then
10780                         echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
10781 echo "configure:10782: checking for main in -lkrb4" >&5
10782 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
10783 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10784   echo $ac_n "(cached) $ac_c" 1>&6
10785 else
10786   ac_save_LIBS="$LIBS"
10787 LIBS="-lkrb4 -lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err $LIBS"
10788 cat > conftest.$ac_ext <<EOF
10789 #line 10790 "configure"
10790 #include "confdefs.h"
10791
10792 int main() {
10793 main()
10794 ; return 0; }
10795 EOF
10796 if { (eval echo configure:10797: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10797   rm -rf conftest*
10798   eval "ac_cv_lib_$ac_lib_var=yes"
10799 else
10800   echo "configure: failed program was:" >&5
10801   cat conftest.$ac_ext >&5
10802   rm -rf conftest*
10803   eval "ac_cv_lib_$ac_lib_var=no"
10804 fi
10805 rm -f conftest*
10806 LIBS="$ac_save_LIBS"
10807
10808 fi
10809 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10810   echo "$ac_t""yes" 1>&6
10811   have_k425=yes
10812                                 KRB4_LIBS="-lkrb4"
10813 else
10814   echo "$ac_t""no" 1>&6
10815 have_k425=no
10816 fi
10817
10818
10819                 else
10820                         have_425=no
10821                         echo "configure: warning: Unrecongized Kerberos V Implementation" 1>&2
10822                 fi
10823
10824                 if test $have_k425 = yes ; then
10825                         ol_with_kerberos=found
10826                         ol_link_krb4=yes
10827
10828                         cat >> confdefs.h <<\EOF
10829 #define HAVE_KRB425 1
10830 EOF
10831
10832                         cat >> confdefs.h <<\EOF
10833 #define HAVE_KRB4 1
10834 EOF
10835
10836
10837                         echo $ac_n "checking for des_debug in Kerberos libraries""... $ac_c" 1>&6
10838 echo "configure:10839: checking for des_debug in Kerberos libraries" >&5
10839 if eval "test \"\${ol_cv_var_des_debug+set}\" = set"; then
10840   echo $ac_n "(cached) $ac_c" 1>&6
10841 else
10842   
10843                                                                 save_LIBS="$LIBS"
10844                                 LIBS="$KRB4_LIBS $KRB5_LIBS $LIBS"
10845                                 cat > conftest.$ac_ext <<EOF
10846 #line 10847 "configure"
10847 #include "confdefs.h"
10848
10849 #include <kerberosIV/krb.h>
10850 #include <kerberosIV/des.h>
10851 extern int des_debug;
10852
10853 int main() {
10854
10855 des_debug = 1;
10856
10857 ; return 0; }
10858 EOF
10859 if { (eval echo configure:10860: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10860   rm -rf conftest*
10861   ol_cv_var_des_debug=yes
10862 else
10863   echo "configure: failed program was:" >&5
10864   cat conftest.$ac_ext >&5
10865   rm -rf conftest*
10866   ol_cv_var_des_debug=no
10867 fi
10868 rm -f conftest*
10869                                                                 LIBS="$save_LIBS"
10870                         
10871 fi
10872
10873 echo "$ac_t""$ol_cv_var_des_debug" 1>&6
10874
10875                         if test $ol_cv_var_des_debug = yes ; then
10876                                 cat >> confdefs.h <<\EOF
10877 #define HAVE_DES_DEBUG 1
10878 EOF
10879
10880                         fi
10881
10882                         LIBS="$save_LIBS"
10883                 fi
10884         fi
10885 fi
10886
10887 if test $ol_link_krb5 = yes ; then
10888         ol_with_kerberos=found
10889 fi
10890
10891 if test $ol_with_kerberos = yes -o $ol_with_kerberos = auto \
10892         -o $ol_with_kerberos = k4 -o $ol_with_kerberos = kth ; then
10893
10894         for ac_hdr in krb.h des.h krb-archaeology.h 
10895 do
10896 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10897 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10898 echo "configure:10899: checking for $ac_hdr" >&5
10899 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10900   echo $ac_n "(cached) $ac_c" 1>&6
10901 else
10902   cat > conftest.$ac_ext <<EOF
10903 #line 10904 "configure"
10904 #include "confdefs.h"
10905 #include <$ac_hdr>
10906 EOF
10907 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10908 { (eval echo configure:10909: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10909 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10910 if test -z "$ac_err"; then
10911   rm -rf conftest*
10912   eval "ac_cv_header_$ac_safe=yes"
10913 else
10914   echo "$ac_err" >&5
10915   echo "configure: failed program was:" >&5
10916   cat conftest.$ac_ext >&5
10917   rm -rf conftest*
10918   eval "ac_cv_header_$ac_safe=no"
10919 fi
10920 rm -f conftest*
10921 fi
10922 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10923   echo "$ac_t""yes" 1>&6
10924     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10925   cat >> confdefs.h <<EOF
10926 #define $ac_tr_hdr 1
10927 EOF
10928  
10929 else
10930   echo "$ac_t""no" 1>&6
10931 fi
10932 done
10933
10934
10935         if test $ac_cv_header_krb_h = yes ; then
10936                 echo $ac_n "checking for main in -lkrb""... $ac_c" 1>&6
10937 echo "configure:10938: checking for main in -lkrb" >&5
10938 ac_lib_var=`echo krb'_'main | sed 'y%./+-:%__p__%'`
10939 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10940   echo $ac_n "(cached) $ac_c" 1>&6
10941 else
10942   ac_save_LIBS="$LIBS"
10943 LIBS="-lkrb -ldes $LIBS"
10944 cat > conftest.$ac_ext <<EOF
10945 #line 10946 "configure"
10946 #include "confdefs.h"
10947
10948 int main() {
10949 main()
10950 ; return 0; }
10951 EOF
10952 if { (eval echo configure:10953: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10953   rm -rf conftest*
10954   eval "ac_cv_lib_$ac_lib_var=yes"
10955 else
10956   echo "configure: failed program was:" >&5
10957   cat conftest.$ac_ext >&5
10958   rm -rf conftest*
10959   eval "ac_cv_lib_$ac_lib_var=no"
10960 fi
10961 rm -f conftest*
10962 LIBS="$ac_save_LIBS"
10963
10964 fi
10965 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10966   echo "$ac_t""yes" 1>&6
10967   have_k4=yes
10968 else
10969   echo "$ac_t""no" 1>&6
10970 have_k4=no
10971 fi
10972
10973
10974                 if test $have_k4 = yes ; then
10975                         ol_with_kerberos=found
10976                         ol_link_krb4=yes
10977
10978                         cat >> confdefs.h <<\EOF
10979 #define HAVE_KRB4 1
10980 EOF
10981
10982
10983                         KRB4_LIBS="-lkrb -ldes"
10984
10985                         if test $ac_cv_header_krb_archaeology_h = yes ; then
10986                                 cat >> confdefs.h <<\EOF
10987 #define HAVE_KTH_KERBEROS 1
10988 EOF
10989
10990                         fi
10991                 fi
10992         fi
10993 fi
10994
10995 if test $ol_link_krb4 = yes -a $ol_enable_kpasswd != no ; then
10996         ol_link_kpasswd=yes
10997 fi
10998
10999 if test $ol_link_krb4 = yes -a $ol_enable_kbind != no ; then
11000         ol_link_kbind=yes
11001
11002 elif test $ol_enable_kbind = yes ; then
11003         { echo "configure: error: Kerberos IV detection failed" 1>&2; exit 1; }
11004 fi
11005
11006 if test $ol_link_krb4 = yes -o $ol_link_krb5 = yes ; then
11007         cat >> confdefs.h <<\EOF
11008 #define HAVE_KERBEROS 1
11009 EOF
11010
11011
11012 elif test $ol_with_kerberos != auto -a $ol_with_kerberos != no ; then
11013         { echo "configure: error: Kerberos detection failed" 1>&2; exit 1; }
11014 fi
11015
11016 ol_link_tls=no
11017 if test $ol_with_tls != no ; then
11018         for ac_hdr in openssl/ssl.h ssl.h
11019 do
11020 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11021 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11022 echo "configure:11023: checking for $ac_hdr" >&5
11023 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11024   echo $ac_n "(cached) $ac_c" 1>&6
11025 else
11026   cat > conftest.$ac_ext <<EOF
11027 #line 11028 "configure"
11028 #include "confdefs.h"
11029 #include <$ac_hdr>
11030 EOF
11031 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11032 { (eval echo configure:11033: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11033 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11034 if test -z "$ac_err"; then
11035   rm -rf conftest*
11036   eval "ac_cv_header_$ac_safe=yes"
11037 else
11038   echo "$ac_err" >&5
11039   echo "configure: failed program was:" >&5
11040   cat conftest.$ac_ext >&5
11041   rm -rf conftest*
11042   eval "ac_cv_header_$ac_safe=no"
11043 fi
11044 rm -f conftest*
11045 fi
11046 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11047   echo "$ac_t""yes" 1>&6
11048     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11049   cat >> confdefs.h <<EOF
11050 #define $ac_tr_hdr 1
11051 EOF
11052  
11053 else
11054   echo "$ac_t""no" 1>&6
11055 fi
11056 done
11057
11058         
11059         if test $ac_cv_header_openssl_ssl_h = yes \
11060                 -o $ac_cv_header_ssl_h = yes ; then
11061                 echo $ac_n "checking for SSLeay_add_ssl_algorithms in -lssl""... $ac_c" 1>&6
11062 echo "configure:11063: checking for SSLeay_add_ssl_algorithms in -lssl" >&5
11063 ac_lib_var=`echo ssl'_'SSLeay_add_ssl_algorithms | sed 'y%./+-:%__p__%'`
11064 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11065   echo $ac_n "(cached) $ac_c" 1>&6
11066 else
11067   ac_save_LIBS="$LIBS"
11068 LIBS="-lssl -lcrypto $LIBS"
11069 cat > conftest.$ac_ext <<EOF
11070 #line 11071 "configure"
11071 #include "confdefs.h"
11072 /* Override any gcc2 internal prototype to avoid an error.  */
11073 /* We use char because int might match the return type of a gcc2
11074     builtin and then its argument prototype would still apply.  */
11075 char SSLeay_add_ssl_algorithms();
11076
11077 int main() {
11078 SSLeay_add_ssl_algorithms()
11079 ; return 0; }
11080 EOF
11081 if { (eval echo configure:11082: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11082   rm -rf conftest*
11083   eval "ac_cv_lib_$ac_lib_var=yes"
11084 else
11085   echo "configure: failed program was:" >&5
11086   cat conftest.$ac_ext >&5
11087   rm -rf conftest*
11088   eval "ac_cv_lib_$ac_lib_var=no"
11089 fi
11090 rm -f conftest*
11091 LIBS="$ac_save_LIBS"
11092
11093 fi
11094 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11095   echo "$ac_t""yes" 1>&6
11096   have_ssleay=yes
11097                         need_rsaref=no
11098 else
11099   echo "$ac_t""no" 1>&6
11100 have_ssleay=no
11101 fi
11102
11103                         
11104                 if test $have_ssleay = no ; then
11105                         echo $ac_n "checking for SSL_library_init in -lssl""... $ac_c" 1>&6
11106 echo "configure:11107: checking for SSL_library_init in -lssl" >&5
11107 ac_lib_var=`echo ssl'_'SSL_library_init | sed 'y%./+-:%__p__%'`
11108 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11109   echo $ac_n "(cached) $ac_c" 1>&6
11110 else
11111   ac_save_LIBS="$LIBS"
11112 LIBS="-lssl -lcrypto $LIBS"
11113 cat > conftest.$ac_ext <<EOF
11114 #line 11115 "configure"
11115 #include "confdefs.h"
11116 /* Override any gcc2 internal prototype to avoid an error.  */
11117 /* We use char because int might match the return type of a gcc2
11118     builtin and then its argument prototype would still apply.  */
11119 char SSL_library_init();
11120
11121 int main() {
11122 SSL_library_init()
11123 ; return 0; }
11124 EOF
11125 if { (eval echo configure:11126: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11126   rm -rf conftest*
11127   eval "ac_cv_lib_$ac_lib_var=yes"
11128 else
11129   echo "configure: failed program was:" >&5
11130   cat conftest.$ac_ext >&5
11131   rm -rf conftest*
11132   eval "ac_cv_lib_$ac_lib_var=no"
11133 fi
11134 rm -f conftest*
11135 LIBS="$ac_save_LIBS"
11136
11137 fi
11138 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11139   echo "$ac_t""yes" 1>&6
11140   have_ssleay=yes
11141                                 need_rsaref=no
11142 else
11143   echo "$ac_t""no" 1>&6
11144 have_ssleay=no
11145 fi
11146
11147                 fi
11148
11149                 if test $have_ssleay = no ; then
11150                         echo $ac_n "checking for ssl3_accept in -lssl""... $ac_c" 1>&6
11151 echo "configure:11152: checking for ssl3_accept in -lssl" >&5
11152 ac_lib_var=`echo ssl'_'ssl3_accept | sed 'y%./+-:%__p__%'`
11153 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11154   echo $ac_n "(cached) $ac_c" 1>&6
11155 else
11156   ac_save_LIBS="$LIBS"
11157 LIBS="-lssl -lcrypto -lRSAglue -lrsaref $LIBS"
11158 cat > conftest.$ac_ext <<EOF
11159 #line 11160 "configure"
11160 #include "confdefs.h"
11161 /* Override any gcc2 internal prototype to avoid an error.  */
11162 /* We use char because int might match the return type of a gcc2
11163     builtin and then its argument prototype would still apply.  */
11164 char ssl3_accept();
11165
11166 int main() {
11167 ssl3_accept()
11168 ; return 0; }
11169 EOF
11170 if { (eval echo configure:11171: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11171   rm -rf conftest*
11172   eval "ac_cv_lib_$ac_lib_var=yes"
11173 else
11174   echo "configure: failed program was:" >&5
11175   cat conftest.$ac_ext >&5
11176   rm -rf conftest*
11177   eval "ac_cv_lib_$ac_lib_var=no"
11178 fi
11179 rm -f conftest*
11180 LIBS="$ac_save_LIBS"
11181
11182 fi
11183 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11184   echo "$ac_t""yes" 1>&6
11185   have_ssleay=yes
11186                                 need_rsaref=yes
11187 else
11188   echo "$ac_t""no" 1>&6
11189 have_ssleay=no
11190 fi
11191
11192                 fi
11193
11194                 if test $have_ssleay = yes ; then
11195                         ol_with_tls=found
11196                         ol_link_tls=yes
11197
11198                         cat >> confdefs.h <<\EOF
11199 #define HAVE_SSLEAY 1
11200 EOF
11201
11202
11203                         if test $need_rsaref = yes; then
11204                                 cat >> confdefs.h <<\EOF
11205 #define HAVE_RSAREF 1
11206 EOF
11207
11208
11209                                 TLS_LIBS="-lssl -lcrypto -lRSAglue -lrsaref"
11210                         else
11211                                 TLS_LIBS="-lssl -lcrypto"
11212                         fi
11213                 fi
11214         fi
11215
11216 else
11217         echo "configure: warning: TLS data protection not supported!" 1>&2
11218 fi
11219
11220 WITH_TLS=no
11221 if test $ol_link_tls = yes ; then
11222         cat >> confdefs.h <<\EOF
11223 #define HAVE_TLS 1
11224 EOF
11225
11226         WITH_TLS=yes
11227
11228 elif test $ol_with_tls = auto ; then
11229         echo "configure: warning: Could not locate TLS/SSL package" 1>&2
11230         echo "configure: warning: TLS data protection not supported!" 1>&2
11231
11232 elif test $ol_with_tls != no ; then
11233         { echo "configure: error: Could not locate TLS/SSL package" 1>&2; exit 1; }
11234 fi
11235
11236 if test $ol_enable_lmpasswd != no; then
11237         if test $ol_link_tls != yes ; then
11238                 { echo "configure: error: LAN Manager passwords require OpenSSL" 1>&2; exit 1; }
11239         fi
11240
11241         cat >> confdefs.h <<\EOF
11242 #define SLAPD_LMHASH 1
11243 EOF
11244
11245 fi
11246
11247 ol_link_threads=no
11248
11249 if test $ol_with_threads = auto -o $ol_with_threads = yes \
11250         -o $ol_with_threads = nt ; then
11251
11252         
11253         echo $ac_n "checking for _beginthread""... $ac_c" 1>&6
11254 echo "configure:11255: checking for _beginthread" >&5
11255 if eval "test \"\${ac_cv_func__beginthread+set}\" = set"; then
11256   echo $ac_n "(cached) $ac_c" 1>&6
11257 else
11258   cat > conftest.$ac_ext <<EOF
11259 #line 11260 "configure"
11260 #include "confdefs.h"
11261 /* System header to define __stub macros and hopefully few prototypes,
11262     which can conflict with char _beginthread(); below.  */
11263 #include <assert.h>
11264 /* Override any gcc2 internal prototype to avoid an error.  */
11265 /* We use char because int might match the return type of a gcc2
11266     builtin and then its argument prototype would still apply.  */
11267 char _beginthread();
11268 char (*f)();
11269
11270 int main() {
11271
11272 /* The GNU C library defines this for functions which it implements
11273     to always fail with ENOSYS.  Some functions are actually named
11274     something starting with __ and the normal name is an alias.  */
11275 #if defined (__stub__beginthread) || defined (__stub____beginthread)
11276 choke me
11277 #else
11278 f = _beginthread;
11279 #endif
11280
11281 ; return 0; }
11282 EOF
11283 if { (eval echo configure:11284: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11284   rm -rf conftest*
11285   eval "ac_cv_func__beginthread=yes"
11286 else
11287   echo "configure: failed program was:" >&5
11288   cat conftest.$ac_ext >&5
11289   rm -rf conftest*
11290   eval "ac_cv_func__beginthread=no"
11291 fi
11292 rm -f conftest*
11293 fi
11294
11295 if eval "test \"`echo '$ac_cv_func_'_beginthread`\" = yes"; then
11296   echo "$ac_t""yes" 1>&6
11297   :
11298 else
11299   echo "$ac_t""no" 1>&6
11300 fi
11301
11302
11303         if test $ac_cv_func__beginthread = yes ; then
11304                 cat >> confdefs.h <<\EOF
11305 #define HAVE_NT_THREADS 1
11306 EOF
11307
11308                 ol_cv_nt_threads=yes
11309         fi
11310
11311
11312         if test "$ol_cv_nt_threads" = yes ; then
11313                 ol_link_threads=nt
11314                 ol_with_threads=found
11315                 ol_with_yielding_select=yes
11316
11317                 cat >> confdefs.h <<\EOF
11318 #define HAVE_NT_SERVICE_MANAGER 1
11319 EOF
11320
11321                 cat >> confdefs.h <<\EOF
11322 #define HAVE_NT_EVENT_LOG 1
11323 EOF
11324
11325         fi
11326
11327         if test $ol_with_threads = nt ; then
11328                 { echo "configure: error: could not locate NT Threads" 1>&2; exit 1; }
11329         fi
11330 fi
11331
11332 if test $ol_with_threads = auto -o $ol_with_threads = yes \
11333         -o $ol_with_threads = posix ; then
11334
11335         for ac_hdr in pthread.h
11336 do
11337 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11338 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11339 echo "configure:11340: checking for $ac_hdr" >&5
11340 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11341   echo $ac_n "(cached) $ac_c" 1>&6
11342 else
11343   cat > conftest.$ac_ext <<EOF
11344 #line 11345 "configure"
11345 #include "confdefs.h"
11346 #include <$ac_hdr>
11347 EOF
11348 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11349 { (eval echo configure:11350: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11350 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11351 if test -z "$ac_err"; then
11352   rm -rf conftest*
11353   eval "ac_cv_header_$ac_safe=yes"
11354 else
11355   echo "$ac_err" >&5
11356   echo "configure: failed program was:" >&5
11357   cat conftest.$ac_ext >&5
11358   rm -rf conftest*
11359   eval "ac_cv_header_$ac_safe=no"
11360 fi
11361 rm -f conftest*
11362 fi
11363 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11364   echo "$ac_t""yes" 1>&6
11365     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11366   cat >> confdefs.h <<EOF
11367 #define $ac_tr_hdr 1
11368 EOF
11369  
11370 else
11371   echo "$ac_t""no" 1>&6
11372 fi
11373 done
11374
11375
11376         if test $ac_cv_header_pthread_h = yes ; then
11377                 echo $ac_n "checking POSIX thread version""... $ac_c" 1>&6
11378 echo "configure:11379: checking POSIX thread version" >&5
11379 if eval "test \"\${ol_cv_pthread_version+set}\" = set"; then
11380   echo $ac_n "(cached) $ac_c" 1>&6
11381 else
11382   
11383         cat > conftest.$ac_ext <<EOF
11384 #line 11385 "configure"
11385 #include "confdefs.h"
11386
11387 #               include <pthread.h>
11388         
11389 int main() {
11390
11391                 int i = PTHREAD_CREATE_JOINABLE;
11392         
11393 ; return 0; }
11394 EOF
11395 if { (eval echo configure:11396: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11396   rm -rf conftest*
11397   
11398         cat > conftest.$ac_ext <<EOF
11399 #line 11400 "configure"
11400 #include "confdefs.h"
11401 #include <pthread.h>
11402 EOF
11403 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11404   egrep "pthread_detach" >/dev/null 2>&1; then
11405   rm -rf conftest*
11406   ol_cv_pthread_version=10
11407 else
11408   rm -rf conftest*
11409   ol_cv_pthread_version=8
11410 fi
11411 rm -f conftest*
11412
11413 else
11414   echo "configure: failed program was:" >&5
11415   cat conftest.$ac_ext >&5
11416   rm -rf conftest*
11417   
11418         cat > conftest.$ac_ext <<EOF
11419 #line 11420 "configure"
11420 #include "confdefs.h"
11421
11422 #               include <pthread.h>
11423 #               ifdef PTHREAD_CREATE_UNDETACHED
11424                 draft7
11425 #               endif
11426         
11427 EOF
11428 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11429   egrep "draft7" >/dev/null 2>&1; then
11430   rm -rf conftest*
11431   ol_cv_pthread_version=7
11432 else
11433   rm -rf conftest*
11434   
11435         cat > conftest.$ac_ext <<EOF
11436 #line 11437 "configure"
11437 #include "confdefs.h"
11438 #include <pthread.h>
11439 EOF
11440 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11441   egrep "pthread_attr_init" >/dev/null 2>&1; then
11442   rm -rf conftest*
11443   ol_cv_pthread_version=6
11444 else
11445   rm -rf conftest*
11446   
11447         cat > conftest.$ac_ext <<EOF
11448 #line 11449 "configure"
11449 #include "confdefs.h"
11450
11451 #               include <pthread.h>
11452 #ifdef          PTHREAD_MUTEX_INITIALIZER
11453                 draft5
11454 #endif
11455         
11456 EOF
11457 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11458   egrep "draft5" >/dev/null 2>&1; then
11459   rm -rf conftest*
11460   ol_cv_pthread_version=5
11461 else
11462   rm -rf conftest*
11463   ol_cv_pthread_version=4
11464 fi
11465 rm -f conftest*
11466  
11467 fi
11468 rm -f conftest*
11469  
11470 fi
11471 rm -f conftest*
11472  
11473 fi
11474 rm -f conftest*
11475
11476 fi
11477
11478 echo "$ac_t""$ol_cv_pthread_version" 1>&6
11479
11480
11481                 if test $ol_cv_pthread_version != 0 ; then
11482                         cat >> confdefs.h <<EOF
11483 #define HAVE_PTHREADS $ol_cv_pthread_version
11484 EOF
11485
11486                 else
11487                         { echo "configure: error: unknown pthread version" 1>&2; exit 1; }
11488                 fi
11489
11490                 # consider threads found
11491                 ol_with_threads=found
11492
11493                 
11494         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
11495 echo "configure:11496: checking for LinuxThreads pthread.h" >&5
11496 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
11497   echo $ac_n "(cached) $ac_c" 1>&6
11498 else
11499   cat > conftest.$ac_ext <<EOF
11500 #line 11501 "configure"
11501 #include "confdefs.h"
11502 #include <pthread.h>
11503 EOF
11504 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11505   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
11506   rm -rf conftest*
11507   ol_cv_header_linux_threads=yes
11508 else
11509   rm -rf conftest*
11510   ol_cv_header_linux_threads=no
11511 fi
11512 rm -f conftest*
11513
11514                 
11515 fi
11516
11517 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
11518         if test $ol_cv_header_linux_threads = yes; then
11519                 cat >> confdefs.h <<\EOF
11520 #define HAVE_LINUX_THREADS 1
11521 EOF
11522
11523         fi
11524
11525                 
11526         echo $ac_n "checking for GNU Pth pthread.h""... $ac_c" 1>&6
11527 echo "configure:11528: checking for GNU Pth pthread.h" >&5
11528 if eval "test \"\${ol_cv_header_gnu_pth_pthread_h+set}\" = set"; then
11529   echo $ac_n "(cached) $ac_c" 1>&6
11530 else
11531   cat > conftest.$ac_ext <<EOF
11532 #line 11533 "configure"
11533 #include "confdefs.h"
11534 #include <pthread.h>
11535 #ifdef _POSIX_THREAD_IS_GNU_PTH
11536         __gnu_pth__;
11537 #endif
11538
11539 EOF
11540 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11541   egrep "__gnu_pth__" >/dev/null 2>&1; then
11542   rm -rf conftest*
11543   ol_cv_header_gnu_pth_pthread_h=yes
11544 else
11545   rm -rf conftest*
11546   ol_cv_header_gnu_pth_pthread_h=no
11547 fi
11548 rm -f conftest*
11549
11550                 
11551 fi
11552
11553 echo "$ac_t""$ol_cv_header_gnu_pth_pthread_h" 1>&6
11554
11555
11556                 if test $ol_cv_header_gnu_pth_pthread_h = no ; then
11557                         for ac_hdr in sched.h
11558 do
11559 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11560 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11561 echo "configure:11562: checking for $ac_hdr" >&5
11562 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11563   echo $ac_n "(cached) $ac_c" 1>&6
11564 else
11565   cat > conftest.$ac_ext <<EOF
11566 #line 11567 "configure"
11567 #include "confdefs.h"
11568 #include <$ac_hdr>
11569 EOF
11570 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11571 { (eval echo configure:11572: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11572 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11573 if test -z "$ac_err"; then
11574   rm -rf conftest*
11575   eval "ac_cv_header_$ac_safe=yes"
11576 else
11577   echo "$ac_err" >&5
11578   echo "configure: failed program was:" >&5
11579   cat conftest.$ac_ext >&5
11580   rm -rf conftest*
11581   eval "ac_cv_header_$ac_safe=no"
11582 fi
11583 rm -f conftest*
11584 fi
11585 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11586   echo "$ac_t""yes" 1>&6
11587     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11588   cat >> confdefs.h <<EOF
11589 #define $ac_tr_hdr 1
11590 EOF
11591  
11592 else
11593   echo "$ac_t""no" 1>&6
11594 fi
11595 done
11596
11597                 fi
11598
11599                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
11600                                 echo $ac_n "checking for pthread_create in default libraries""... $ac_c" 1>&6
11601 echo "configure:11602: checking for pthread_create in default libraries" >&5
11602 if eval "test \"\${ol_cv_pthread_create+set}\" = set"; then
11603   echo $ac_n "(cached) $ac_c" 1>&6
11604 else
11605   
11606                 if test "$cross_compiling" = yes; then
11607   cat > conftest.$ac_ext <<EOF
11608 #line 11609 "configure"
11609 #include "confdefs.h"
11610 /* pthread test headers */
11611 #include <pthread.h>
11612 #if HAVE_PTHREADS < 7
11613 #include <errno.h>
11614 #endif
11615 #ifndef NULL
11616 #define NULL (void*)0
11617 #endif
11618
11619 static void *task(p)
11620         void *p;
11621 {
11622         return (void *) (p == NULL);
11623 }
11624
11625 int main() {
11626
11627         /* pthread test function */
11628 #ifndef PTHREAD_CREATE_DETACHED
11629 #define PTHREAD_CREATE_DETACHED 1
11630 #endif
11631         pthread_t t;
11632         int status;
11633         int detach = PTHREAD_CREATE_DETACHED;
11634
11635 #if HAVE_PTHREADS > 4
11636         /* Final pthreads */
11637         pthread_attr_t attr;
11638
11639         status = pthread_attr_init(&attr);
11640         if( status ) return status;
11641
11642 #if HAVE_PTHREADS < 7
11643         status = pthread_attr_setdetachstate(&attr, &detach);
11644         if( status < 0 ) status = errno;
11645 #else
11646         status = pthread_attr_setdetachstate(&attr, detach);
11647 #endif
11648         if( status ) return status;
11649         status = pthread_create( &t, &attr, task, NULL );
11650 #if HAVE_PTHREADS < 7
11651         if( status < 0 ) status = errno;
11652 #endif
11653         if( status ) return status;
11654 #else
11655         /* Draft 4 pthreads */
11656         status = pthread_create( &t, pthread_attr_default, task, NULL );
11657         if( status ) return errno;
11658
11659         /* give thread a chance to complete */
11660         /* it should remain joinable and hence detachable */
11661         sleep( 1 );
11662
11663         status = pthread_detach( &t );
11664         if( status ) return errno;
11665 #endif
11666
11667 #ifdef HAVE_LINUX_THREADS
11668         pthread_kill_other_threads_np();
11669 #endif
11670
11671         return 0;
11672
11673 ; return 0; }
11674 EOF
11675 if { (eval echo configure:11676: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11676   rm -rf conftest*
11677   ol_cv_pthread_create=yes
11678 else
11679   echo "configure: failed program was:" >&5
11680   cat conftest.$ac_ext >&5
11681   rm -rf conftest*
11682   ol_cv_pthread_create=no
11683 fi
11684 rm -f conftest*
11685 else
11686   cat > conftest.$ac_ext <<EOF
11687 #line 11688 "configure"
11688 #include "confdefs.h"
11689 /* pthread test headers */
11690 #include <pthread.h>
11691 #if HAVE_PTHREADS < 7
11692 #include <errno.h>
11693 #endif
11694 #ifndef NULL
11695 #define NULL (void*)0
11696 #endif
11697
11698 static void *task(p)
11699         void *p;
11700 {
11701         return (void *) (p == NULL);
11702 }
11703
11704
11705 int main(argc, argv)
11706         int argc;
11707         char **argv;
11708 {
11709
11710         /* pthread test function */
11711 #ifndef PTHREAD_CREATE_DETACHED
11712 #define PTHREAD_CREATE_DETACHED 1
11713 #endif
11714         pthread_t t;
11715         int status;
11716         int detach = PTHREAD_CREATE_DETACHED;
11717
11718 #if HAVE_PTHREADS > 4
11719         /* Final pthreads */
11720         pthread_attr_t attr;
11721
11722         status = pthread_attr_init(&attr);
11723         if( status ) return status;
11724
11725 #if HAVE_PTHREADS < 7
11726         status = pthread_attr_setdetachstate(&attr, &detach);
11727         if( status < 0 ) status = errno;
11728 #else
11729         status = pthread_attr_setdetachstate(&attr, detach);
11730 #endif
11731         if( status ) return status;
11732         status = pthread_create( &t, &attr, task, NULL );
11733 #if HAVE_PTHREADS < 7
11734         if( status < 0 ) status = errno;
11735 #endif
11736         if( status ) return status;
11737 #else
11738         /* Draft 4 pthreads */
11739         status = pthread_create( &t, pthread_attr_default, task, NULL );
11740         if( status ) return errno;
11741
11742         /* give thread a chance to complete */
11743         /* it should remain joinable and hence detachable */
11744         sleep( 1 );
11745
11746         status = pthread_detach( &t );
11747         if( status ) return errno;
11748 #endif
11749
11750 #ifdef HAVE_LINUX_THREADS
11751         pthread_kill_other_threads_np();
11752 #endif
11753
11754         return 0;
11755
11756 }
11757
11758 EOF
11759 if { (eval echo configure:11760: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11760 then
11761   ol_cv_pthread_create=yes
11762 else
11763   echo "configure: failed program was:" >&5
11764   cat conftest.$ac_ext >&5
11765   rm -fr conftest*
11766   ol_cv_pthread_create=no
11767 fi
11768 rm -fr conftest*
11769 fi
11770
11771 fi
11772
11773 echo "$ac_t""$ol_cv_pthread_create" 1>&6
11774
11775                 if test $ol_cv_pthread_create != no ; then
11776                         ol_link_threads=posix
11777                         ol_link_pthreads=""
11778                 fi
11779                 
11780                 # Pthread try link: -kthread (ol_cv_pthread_kthread)
11781 if test "$ol_link_threads" = no ; then
11782         # try -kthread
11783         echo $ac_n "checking for pthread link with -kthread""... $ac_c" 1>&6
11784 echo "configure:11785: checking for pthread link with -kthread" >&5
11785 if eval "test \"\${ol_cv_pthread_kthread+set}\" = set"; then
11786   echo $ac_n "(cached) $ac_c" 1>&6
11787 else
11788   
11789                 # save the flags
11790                 ol_LIBS="$LIBS"
11791                 LIBS="-kthread $LIBS"
11792
11793                 if test "$cross_compiling" = yes; then
11794   cat > conftest.$ac_ext <<EOF
11795 #line 11796 "configure"
11796 #include "confdefs.h"
11797 /* pthread test headers */
11798 #include <pthread.h>
11799 #if HAVE_PTHREADS < 7
11800 #include <errno.h>
11801 #endif
11802 #ifndef NULL
11803 #define NULL (void*)0
11804 #endif
11805
11806 static void *task(p)
11807         void *p;
11808 {
11809         return (void *) (p == NULL);
11810 }
11811
11812 int main() {
11813
11814         /* pthread test function */
11815 #ifndef PTHREAD_CREATE_DETACHED
11816 #define PTHREAD_CREATE_DETACHED 1
11817 #endif
11818         pthread_t t;
11819         int status;
11820         int detach = PTHREAD_CREATE_DETACHED;
11821
11822 #if HAVE_PTHREADS > 4
11823         /* Final pthreads */
11824         pthread_attr_t attr;
11825
11826         status = pthread_attr_init(&attr);
11827         if( status ) return status;
11828
11829 #if HAVE_PTHREADS < 7
11830         status = pthread_attr_setdetachstate(&attr, &detach);
11831         if( status < 0 ) status = errno;
11832 #else
11833         status = pthread_attr_setdetachstate(&attr, detach);
11834 #endif
11835         if( status ) return status;
11836         status = pthread_create( &t, &attr, task, NULL );
11837 #if HAVE_PTHREADS < 7
11838         if( status < 0 ) status = errno;
11839 #endif
11840         if( status ) return status;
11841 #else
11842         /* Draft 4 pthreads */
11843         status = pthread_create( &t, pthread_attr_default, task, NULL );
11844         if( status ) return errno;
11845
11846         /* give thread a chance to complete */
11847         /* it should remain joinable and hence detachable */
11848         sleep( 1 );
11849
11850         status = pthread_detach( &t );
11851         if( status ) return errno;
11852 #endif
11853
11854 #ifdef HAVE_LINUX_THREADS
11855         pthread_kill_other_threads_np();
11856 #endif
11857
11858         return 0;
11859
11860 ; return 0; }
11861 EOF
11862 if { (eval echo configure:11863: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11863   rm -rf conftest*
11864   ol_cv_pthread_kthread=yes
11865 else
11866   echo "configure: failed program was:" >&5
11867   cat conftest.$ac_ext >&5
11868   rm -rf conftest*
11869   ol_cv_pthread_kthread=no
11870 fi
11871 rm -f conftest*
11872 else
11873   cat > conftest.$ac_ext <<EOF
11874 #line 11875 "configure"
11875 #include "confdefs.h"
11876 /* pthread test headers */
11877 #include <pthread.h>
11878 #if HAVE_PTHREADS < 7
11879 #include <errno.h>
11880 #endif
11881 #ifndef NULL
11882 #define NULL (void*)0
11883 #endif
11884
11885 static void *task(p)
11886         void *p;
11887 {
11888         return (void *) (p == NULL);
11889 }
11890
11891
11892 int main(argc, argv)
11893         int argc;
11894         char **argv;
11895 {
11896
11897         /* pthread test function */
11898 #ifndef PTHREAD_CREATE_DETACHED
11899 #define PTHREAD_CREATE_DETACHED 1
11900 #endif
11901         pthread_t t;
11902         int status;
11903         int detach = PTHREAD_CREATE_DETACHED;
11904
11905 #if HAVE_PTHREADS > 4
11906         /* Final pthreads */
11907         pthread_attr_t attr;
11908
11909         status = pthread_attr_init(&attr);
11910         if( status ) return status;
11911
11912 #if HAVE_PTHREADS < 7
11913         status = pthread_attr_setdetachstate(&attr, &detach);
11914         if( status < 0 ) status = errno;
11915 #else
11916         status = pthread_attr_setdetachstate(&attr, detach);
11917 #endif
11918         if( status ) return status;
11919         status = pthread_create( &t, &attr, task, NULL );
11920 #if HAVE_PTHREADS < 7
11921         if( status < 0 ) status = errno;
11922 #endif
11923         if( status ) return status;
11924 #else
11925         /* Draft 4 pthreads */
11926         status = pthread_create( &t, pthread_attr_default, task, NULL );
11927         if( status ) return errno;
11928
11929         /* give thread a chance to complete */
11930         /* it should remain joinable and hence detachable */
11931         sleep( 1 );
11932
11933         status = pthread_detach( &t );
11934         if( status ) return errno;
11935 #endif
11936
11937 #ifdef HAVE_LINUX_THREADS
11938         pthread_kill_other_threads_np();
11939 #endif
11940
11941         return 0;
11942
11943 }
11944
11945 EOF
11946 if { (eval echo configure:11947: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11947 then
11948   ol_cv_pthread_kthread=yes
11949 else
11950   echo "configure: failed program was:" >&5
11951   cat conftest.$ac_ext >&5
11952   rm -fr conftest*
11953   ol_cv_pthread_kthread=no
11954 fi
11955 rm -fr conftest*
11956 fi
11957
11958
11959                 # restore the LIBS
11960                 LIBS="$ol_LIBS"
11961         
11962 fi
11963
11964 echo "$ac_t""$ol_cv_pthread_kthread" 1>&6
11965
11966         if test $ol_cv_pthread_kthread = yes ; then
11967                 ol_link_pthreads="-kthread"
11968                 ol_link_threads=posix
11969         fi
11970 fi
11971
11972                 # Pthread try link: -pthread (ol_cv_pthread_pthread)
11973 if test "$ol_link_threads" = no ; then
11974         # try -pthread
11975         echo $ac_n "checking for pthread link with -pthread""... $ac_c" 1>&6
11976 echo "configure:11977: checking for pthread link with -pthread" >&5
11977 if eval "test \"\${ol_cv_pthread_pthread+set}\" = set"; then
11978   echo $ac_n "(cached) $ac_c" 1>&6
11979 else
11980   
11981                 # save the flags
11982                 ol_LIBS="$LIBS"
11983                 LIBS="-pthread $LIBS"
11984
11985                 if test "$cross_compiling" = yes; then
11986   cat > conftest.$ac_ext <<EOF
11987 #line 11988 "configure"
11988 #include "confdefs.h"
11989 /* pthread test headers */
11990 #include <pthread.h>
11991 #if HAVE_PTHREADS < 7
11992 #include <errno.h>
11993 #endif
11994 #ifndef NULL
11995 #define NULL (void*)0
11996 #endif
11997
11998 static void *task(p)
11999         void *p;
12000 {
12001         return (void *) (p == NULL);
12002 }
12003
12004 int main() {
12005
12006         /* pthread test function */
12007 #ifndef PTHREAD_CREATE_DETACHED
12008 #define PTHREAD_CREATE_DETACHED 1
12009 #endif
12010         pthread_t t;
12011         int status;
12012         int detach = PTHREAD_CREATE_DETACHED;
12013
12014 #if HAVE_PTHREADS > 4
12015         /* Final pthreads */
12016         pthread_attr_t attr;
12017
12018         status = pthread_attr_init(&attr);
12019         if( status ) return status;
12020
12021 #if HAVE_PTHREADS < 7
12022         status = pthread_attr_setdetachstate(&attr, &detach);
12023         if( status < 0 ) status = errno;
12024 #else
12025         status = pthread_attr_setdetachstate(&attr, detach);
12026 #endif
12027         if( status ) return status;
12028         status = pthread_create( &t, &attr, task, NULL );
12029 #if HAVE_PTHREADS < 7
12030         if( status < 0 ) status = errno;
12031 #endif
12032         if( status ) return status;
12033 #else
12034         /* Draft 4 pthreads */
12035         status = pthread_create( &t, pthread_attr_default, task, NULL );
12036         if( status ) return errno;
12037
12038         /* give thread a chance to complete */
12039         /* it should remain joinable and hence detachable */
12040         sleep( 1 );
12041
12042         status = pthread_detach( &t );
12043         if( status ) return errno;
12044 #endif
12045
12046 #ifdef HAVE_LINUX_THREADS
12047         pthread_kill_other_threads_np();
12048 #endif
12049
12050         return 0;
12051
12052 ; return 0; }
12053 EOF
12054 if { (eval echo configure:12055: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12055   rm -rf conftest*
12056   ol_cv_pthread_pthread=yes
12057 else
12058   echo "configure: failed program was:" >&5
12059   cat conftest.$ac_ext >&5
12060   rm -rf conftest*
12061   ol_cv_pthread_pthread=no
12062 fi
12063 rm -f conftest*
12064 else
12065   cat > conftest.$ac_ext <<EOF
12066 #line 12067 "configure"
12067 #include "confdefs.h"
12068 /* pthread test headers */
12069 #include <pthread.h>
12070 #if HAVE_PTHREADS < 7
12071 #include <errno.h>
12072 #endif
12073 #ifndef NULL
12074 #define NULL (void*)0
12075 #endif
12076
12077 static void *task(p)
12078         void *p;
12079 {
12080         return (void *) (p == NULL);
12081 }
12082
12083
12084 int main(argc, argv)
12085         int argc;
12086         char **argv;
12087 {
12088
12089         /* pthread test function */
12090 #ifndef PTHREAD_CREATE_DETACHED
12091 #define PTHREAD_CREATE_DETACHED 1
12092 #endif
12093         pthread_t t;
12094         int status;
12095         int detach = PTHREAD_CREATE_DETACHED;
12096
12097 #if HAVE_PTHREADS > 4
12098         /* Final pthreads */
12099         pthread_attr_t attr;
12100
12101         status = pthread_attr_init(&attr);
12102         if( status ) return status;
12103
12104 #if HAVE_PTHREADS < 7
12105         status = pthread_attr_setdetachstate(&attr, &detach);
12106         if( status < 0 ) status = errno;
12107 #else
12108         status = pthread_attr_setdetachstate(&attr, detach);
12109 #endif
12110         if( status ) return status;
12111         status = pthread_create( &t, &attr, task, NULL );
12112 #if HAVE_PTHREADS < 7
12113         if( status < 0 ) status = errno;
12114 #endif
12115         if( status ) return status;
12116 #else
12117         /* Draft 4 pthreads */
12118         status = pthread_create( &t, pthread_attr_default, task, NULL );
12119         if( status ) return errno;
12120
12121         /* give thread a chance to complete */
12122         /* it should remain joinable and hence detachable */
12123         sleep( 1 );
12124
12125         status = pthread_detach( &t );
12126         if( status ) return errno;
12127 #endif
12128
12129 #ifdef HAVE_LINUX_THREADS
12130         pthread_kill_other_threads_np();
12131 #endif
12132
12133         return 0;
12134
12135 }
12136
12137 EOF
12138 if { (eval echo configure:12139: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12139 then
12140   ol_cv_pthread_pthread=yes
12141 else
12142   echo "configure: failed program was:" >&5
12143   cat conftest.$ac_ext >&5
12144   rm -fr conftest*
12145   ol_cv_pthread_pthread=no
12146 fi
12147 rm -fr conftest*
12148 fi
12149
12150
12151                 # restore the LIBS
12152                 LIBS="$ol_LIBS"
12153         
12154 fi
12155
12156 echo "$ac_t""$ol_cv_pthread_pthread" 1>&6
12157
12158         if test $ol_cv_pthread_pthread = yes ; then
12159                 ol_link_pthreads="-pthread"
12160                 ol_link_threads=posix
12161         fi
12162 fi
12163
12164                 # Pthread try link: -pthreads (ol_cv_pthread_pthreads)
12165 if test "$ol_link_threads" = no ; then
12166         # try -pthreads
12167         echo $ac_n "checking for pthread link with -pthreads""... $ac_c" 1>&6
12168 echo "configure:12169: checking for pthread link with -pthreads" >&5
12169 if eval "test \"\${ol_cv_pthread_pthreads+set}\" = set"; then
12170   echo $ac_n "(cached) $ac_c" 1>&6
12171 else
12172   
12173                 # save the flags
12174                 ol_LIBS="$LIBS"
12175                 LIBS="-pthreads $LIBS"
12176
12177                 if test "$cross_compiling" = yes; then
12178   cat > conftest.$ac_ext <<EOF
12179 #line 12180 "configure"
12180 #include "confdefs.h"
12181 /* pthread test headers */
12182 #include <pthread.h>
12183 #if HAVE_PTHREADS < 7
12184 #include <errno.h>
12185 #endif
12186 #ifndef NULL
12187 #define NULL (void*)0
12188 #endif
12189
12190 static void *task(p)
12191         void *p;
12192 {
12193         return (void *) (p == NULL);
12194 }
12195
12196 int main() {
12197
12198         /* pthread test function */
12199 #ifndef PTHREAD_CREATE_DETACHED
12200 #define PTHREAD_CREATE_DETACHED 1
12201 #endif
12202         pthread_t t;
12203         int status;
12204         int detach = PTHREAD_CREATE_DETACHED;
12205
12206 #if HAVE_PTHREADS > 4
12207         /* Final pthreads */
12208         pthread_attr_t attr;
12209
12210         status = pthread_attr_init(&attr);
12211         if( status ) return status;
12212
12213 #if HAVE_PTHREADS < 7
12214         status = pthread_attr_setdetachstate(&attr, &detach);
12215         if( status < 0 ) status = errno;
12216 #else
12217         status = pthread_attr_setdetachstate(&attr, detach);
12218 #endif
12219         if( status ) return status;
12220         status = pthread_create( &t, &attr, task, NULL );
12221 #if HAVE_PTHREADS < 7
12222         if( status < 0 ) status = errno;
12223 #endif
12224         if( status ) return status;
12225 #else
12226         /* Draft 4 pthreads */
12227         status = pthread_create( &t, pthread_attr_default, task, NULL );
12228         if( status ) return errno;
12229
12230         /* give thread a chance to complete */
12231         /* it should remain joinable and hence detachable */
12232         sleep( 1 );
12233
12234         status = pthread_detach( &t );
12235         if( status ) return errno;
12236 #endif
12237
12238 #ifdef HAVE_LINUX_THREADS
12239         pthread_kill_other_threads_np();
12240 #endif
12241
12242         return 0;
12243
12244 ; return 0; }
12245 EOF
12246 if { (eval echo configure:12247: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12247   rm -rf conftest*
12248   ol_cv_pthread_pthreads=yes
12249 else
12250   echo "configure: failed program was:" >&5
12251   cat conftest.$ac_ext >&5
12252   rm -rf conftest*
12253   ol_cv_pthread_pthreads=no
12254 fi
12255 rm -f conftest*
12256 else
12257   cat > conftest.$ac_ext <<EOF
12258 #line 12259 "configure"
12259 #include "confdefs.h"
12260 /* pthread test headers */
12261 #include <pthread.h>
12262 #if HAVE_PTHREADS < 7
12263 #include <errno.h>
12264 #endif
12265 #ifndef NULL
12266 #define NULL (void*)0
12267 #endif
12268
12269 static void *task(p)
12270         void *p;
12271 {
12272         return (void *) (p == NULL);
12273 }
12274
12275
12276 int main(argc, argv)
12277         int argc;
12278         char **argv;
12279 {
12280
12281         /* pthread test function */
12282 #ifndef PTHREAD_CREATE_DETACHED
12283 #define PTHREAD_CREATE_DETACHED 1
12284 #endif
12285         pthread_t t;
12286         int status;
12287         int detach = PTHREAD_CREATE_DETACHED;
12288
12289 #if HAVE_PTHREADS > 4
12290         /* Final pthreads */
12291         pthread_attr_t attr;
12292
12293         status = pthread_attr_init(&attr);
12294         if( status ) return status;
12295
12296 #if HAVE_PTHREADS < 7
12297         status = pthread_attr_setdetachstate(&attr, &detach);
12298         if( status < 0 ) status = errno;
12299 #else
12300         status = pthread_attr_setdetachstate(&attr, detach);
12301 #endif
12302         if( status ) return status;
12303         status = pthread_create( &t, &attr, task, NULL );
12304 #if HAVE_PTHREADS < 7
12305         if( status < 0 ) status = errno;
12306 #endif
12307         if( status ) return status;
12308 #else
12309         /* Draft 4 pthreads */
12310         status = pthread_create( &t, pthread_attr_default, task, NULL );
12311         if( status ) return errno;
12312
12313         /* give thread a chance to complete */
12314         /* it should remain joinable and hence detachable */
12315         sleep( 1 );
12316
12317         status = pthread_detach( &t );
12318         if( status ) return errno;
12319 #endif
12320
12321 #ifdef HAVE_LINUX_THREADS
12322         pthread_kill_other_threads_np();
12323 #endif
12324
12325         return 0;
12326
12327 }
12328
12329 EOF
12330 if { (eval echo configure:12331: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12331 then
12332   ol_cv_pthread_pthreads=yes
12333 else
12334   echo "configure: failed program was:" >&5
12335   cat conftest.$ac_ext >&5
12336   rm -fr conftest*
12337   ol_cv_pthread_pthreads=no
12338 fi
12339 rm -fr conftest*
12340 fi
12341
12342
12343                 # restore the LIBS
12344                 LIBS="$ol_LIBS"
12345         
12346 fi
12347
12348 echo "$ac_t""$ol_cv_pthread_pthreads" 1>&6
12349
12350         if test $ol_cv_pthread_pthreads = yes ; then
12351                 ol_link_pthreads="-pthreads"
12352                 ol_link_threads=posix
12353         fi
12354 fi
12355
12356                 # Pthread try link: -mthreads (ol_cv_pthread_mthreads)
12357 if test "$ol_link_threads" = no ; then
12358         # try -mthreads
12359         echo $ac_n "checking for pthread link with -mthreads""... $ac_c" 1>&6
12360 echo "configure:12361: checking for pthread link with -mthreads" >&5
12361 if eval "test \"\${ol_cv_pthread_mthreads+set}\" = set"; then
12362   echo $ac_n "(cached) $ac_c" 1>&6
12363 else
12364   
12365                 # save the flags
12366                 ol_LIBS="$LIBS"
12367                 LIBS="-mthreads $LIBS"
12368
12369                 if test "$cross_compiling" = yes; then
12370   cat > conftest.$ac_ext <<EOF
12371 #line 12372 "configure"
12372 #include "confdefs.h"
12373 /* pthread test headers */
12374 #include <pthread.h>
12375 #if HAVE_PTHREADS < 7
12376 #include <errno.h>
12377 #endif
12378 #ifndef NULL
12379 #define NULL (void*)0
12380 #endif
12381
12382 static void *task(p)
12383         void *p;
12384 {
12385         return (void *) (p == NULL);
12386 }
12387
12388 int main() {
12389
12390         /* pthread test function */
12391 #ifndef PTHREAD_CREATE_DETACHED
12392 #define PTHREAD_CREATE_DETACHED 1
12393 #endif
12394         pthread_t t;
12395         int status;
12396         int detach = PTHREAD_CREATE_DETACHED;
12397
12398 #if HAVE_PTHREADS > 4
12399         /* Final pthreads */
12400         pthread_attr_t attr;
12401
12402         status = pthread_attr_init(&attr);
12403         if( status ) return status;
12404
12405 #if HAVE_PTHREADS < 7
12406         status = pthread_attr_setdetachstate(&attr, &detach);
12407         if( status < 0 ) status = errno;
12408 #else
12409         status = pthread_attr_setdetachstate(&attr, detach);
12410 #endif
12411         if( status ) return status;
12412         status = pthread_create( &t, &attr, task, NULL );
12413 #if HAVE_PTHREADS < 7
12414         if( status < 0 ) status = errno;
12415 #endif
12416         if( status ) return status;
12417 #else
12418         /* Draft 4 pthreads */
12419         status = pthread_create( &t, pthread_attr_default, task, NULL );
12420         if( status ) return errno;
12421
12422         /* give thread a chance to complete */
12423         /* it should remain joinable and hence detachable */
12424         sleep( 1 );
12425
12426         status = pthread_detach( &t );
12427         if( status ) return errno;
12428 #endif
12429
12430 #ifdef HAVE_LINUX_THREADS
12431         pthread_kill_other_threads_np();
12432 #endif
12433
12434         return 0;
12435
12436 ; return 0; }
12437 EOF
12438 if { (eval echo configure:12439: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12439   rm -rf conftest*
12440   ol_cv_pthread_mthreads=yes
12441 else
12442   echo "configure: failed program was:" >&5
12443   cat conftest.$ac_ext >&5
12444   rm -rf conftest*
12445   ol_cv_pthread_mthreads=no
12446 fi
12447 rm -f conftest*
12448 else
12449   cat > conftest.$ac_ext <<EOF
12450 #line 12451 "configure"
12451 #include "confdefs.h"
12452 /* pthread test headers */
12453 #include <pthread.h>
12454 #if HAVE_PTHREADS < 7
12455 #include <errno.h>
12456 #endif
12457 #ifndef NULL
12458 #define NULL (void*)0
12459 #endif
12460
12461 static void *task(p)
12462         void *p;
12463 {
12464         return (void *) (p == NULL);
12465 }
12466
12467
12468 int main(argc, argv)
12469         int argc;
12470         char **argv;
12471 {
12472
12473         /* pthread test function */
12474 #ifndef PTHREAD_CREATE_DETACHED
12475 #define PTHREAD_CREATE_DETACHED 1
12476 #endif
12477         pthread_t t;
12478         int status;
12479         int detach = PTHREAD_CREATE_DETACHED;
12480
12481 #if HAVE_PTHREADS > 4
12482         /* Final pthreads */
12483         pthread_attr_t attr;
12484
12485         status = pthread_attr_init(&attr);
12486         if( status ) return status;
12487
12488 #if HAVE_PTHREADS < 7
12489         status = pthread_attr_setdetachstate(&attr, &detach);
12490         if( status < 0 ) status = errno;
12491 #else
12492         status = pthread_attr_setdetachstate(&attr, detach);
12493 #endif
12494         if( status ) return status;
12495         status = pthread_create( &t, &attr, task, NULL );
12496 #if HAVE_PTHREADS < 7
12497         if( status < 0 ) status = errno;
12498 #endif
12499         if( status ) return status;
12500 #else
12501         /* Draft 4 pthreads */
12502         status = pthread_create( &t, pthread_attr_default, task, NULL );
12503         if( status ) return errno;
12504
12505         /* give thread a chance to complete */
12506         /* it should remain joinable and hence detachable */
12507         sleep( 1 );
12508
12509         status = pthread_detach( &t );
12510         if( status ) return errno;
12511 #endif
12512
12513 #ifdef HAVE_LINUX_THREADS
12514         pthread_kill_other_threads_np();
12515 #endif
12516
12517         return 0;
12518
12519 }
12520
12521 EOF
12522 if { (eval echo configure:12523: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12523 then
12524   ol_cv_pthread_mthreads=yes
12525 else
12526   echo "configure: failed program was:" >&5
12527   cat conftest.$ac_ext >&5
12528   rm -fr conftest*
12529   ol_cv_pthread_mthreads=no
12530 fi
12531 rm -fr conftest*
12532 fi
12533
12534
12535                 # restore the LIBS
12536                 LIBS="$ol_LIBS"
12537         
12538 fi
12539
12540 echo "$ac_t""$ol_cv_pthread_mthreads" 1>&6
12541
12542         if test $ol_cv_pthread_mthreads = yes ; then
12543                 ol_link_pthreads="-mthreads"
12544                 ol_link_threads=posix
12545         fi
12546 fi
12547
12548                 # Pthread try link: -thread (ol_cv_pthread_thread)
12549 if test "$ol_link_threads" = no ; then
12550         # try -thread
12551         echo $ac_n "checking for pthread link with -thread""... $ac_c" 1>&6
12552 echo "configure:12553: checking for pthread link with -thread" >&5
12553 if eval "test \"\${ol_cv_pthread_thread+set}\" = set"; then
12554   echo $ac_n "(cached) $ac_c" 1>&6
12555 else
12556   
12557                 # save the flags
12558                 ol_LIBS="$LIBS"
12559                 LIBS="-thread $LIBS"
12560
12561                 if test "$cross_compiling" = yes; then
12562   cat > conftest.$ac_ext <<EOF
12563 #line 12564 "configure"
12564 #include "confdefs.h"
12565 /* pthread test headers */
12566 #include <pthread.h>
12567 #if HAVE_PTHREADS < 7
12568 #include <errno.h>
12569 #endif
12570 #ifndef NULL
12571 #define NULL (void*)0
12572 #endif
12573
12574 static void *task(p)
12575         void *p;
12576 {
12577         return (void *) (p == NULL);
12578 }
12579
12580 int main() {
12581
12582         /* pthread test function */
12583 #ifndef PTHREAD_CREATE_DETACHED
12584 #define PTHREAD_CREATE_DETACHED 1
12585 #endif
12586         pthread_t t;
12587         int status;
12588         int detach = PTHREAD_CREATE_DETACHED;
12589
12590 #if HAVE_PTHREADS > 4
12591         /* Final pthreads */
12592         pthread_attr_t attr;
12593
12594         status = pthread_attr_init(&attr);
12595         if( status ) return status;
12596
12597 #if HAVE_PTHREADS < 7
12598         status = pthread_attr_setdetachstate(&attr, &detach);
12599         if( status < 0 ) status = errno;
12600 #else
12601         status = pthread_attr_setdetachstate(&attr, detach);
12602 #endif
12603         if( status ) return status;
12604         status = pthread_create( &t, &attr, task, NULL );
12605 #if HAVE_PTHREADS < 7
12606         if( status < 0 ) status = errno;
12607 #endif
12608         if( status ) return status;
12609 #else
12610         /* Draft 4 pthreads */
12611         status = pthread_create( &t, pthread_attr_default, task, NULL );
12612         if( status ) return errno;
12613
12614         /* give thread a chance to complete */
12615         /* it should remain joinable and hence detachable */
12616         sleep( 1 );
12617
12618         status = pthread_detach( &t );
12619         if( status ) return errno;
12620 #endif
12621
12622 #ifdef HAVE_LINUX_THREADS
12623         pthread_kill_other_threads_np();
12624 #endif
12625
12626         return 0;
12627
12628 ; return 0; }
12629 EOF
12630 if { (eval echo configure:12631: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12631   rm -rf conftest*
12632   ol_cv_pthread_thread=yes
12633 else
12634   echo "configure: failed program was:" >&5
12635   cat conftest.$ac_ext >&5
12636   rm -rf conftest*
12637   ol_cv_pthread_thread=no
12638 fi
12639 rm -f conftest*
12640 else
12641   cat > conftest.$ac_ext <<EOF
12642 #line 12643 "configure"
12643 #include "confdefs.h"
12644 /* pthread test headers */
12645 #include <pthread.h>
12646 #if HAVE_PTHREADS < 7
12647 #include <errno.h>
12648 #endif
12649 #ifndef NULL
12650 #define NULL (void*)0
12651 #endif
12652
12653 static void *task(p)
12654         void *p;
12655 {
12656         return (void *) (p == NULL);
12657 }
12658
12659
12660 int main(argc, argv)
12661         int argc;
12662         char **argv;
12663 {
12664
12665         /* pthread test function */
12666 #ifndef PTHREAD_CREATE_DETACHED
12667 #define PTHREAD_CREATE_DETACHED 1
12668 #endif
12669         pthread_t t;
12670         int status;
12671         int detach = PTHREAD_CREATE_DETACHED;
12672
12673 #if HAVE_PTHREADS > 4
12674         /* Final pthreads */
12675         pthread_attr_t attr;
12676
12677         status = pthread_attr_init(&attr);
12678         if( status ) return status;
12679
12680 #if HAVE_PTHREADS < 7
12681         status = pthread_attr_setdetachstate(&attr, &detach);
12682         if( status < 0 ) status = errno;
12683 #else
12684         status = pthread_attr_setdetachstate(&attr, detach);
12685 #endif
12686         if( status ) return status;
12687         status = pthread_create( &t, &attr, task, NULL );
12688 #if HAVE_PTHREADS < 7
12689         if( status < 0 ) status = errno;
12690 #endif
12691         if( status ) return status;
12692 #else
12693         /* Draft 4 pthreads */
12694         status = pthread_create( &t, pthread_attr_default, task, NULL );
12695         if( status ) return errno;
12696
12697         /* give thread a chance to complete */
12698         /* it should remain joinable and hence detachable */
12699         sleep( 1 );
12700
12701         status = pthread_detach( &t );
12702         if( status ) return errno;
12703 #endif
12704
12705 #ifdef HAVE_LINUX_THREADS
12706         pthread_kill_other_threads_np();
12707 #endif
12708
12709         return 0;
12710
12711 }
12712
12713 EOF
12714 if { (eval echo configure:12715: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12715 then
12716   ol_cv_pthread_thread=yes
12717 else
12718   echo "configure: failed program was:" >&5
12719   cat conftest.$ac_ext >&5
12720   rm -fr conftest*
12721   ol_cv_pthread_thread=no
12722 fi
12723 rm -fr conftest*
12724 fi
12725
12726
12727                 # restore the LIBS
12728                 LIBS="$ol_LIBS"
12729         
12730 fi
12731
12732 echo "$ac_t""$ol_cv_pthread_thread" 1>&6
12733
12734         if test $ol_cv_pthread_thread = yes ; then
12735                 ol_link_pthreads="-thread"
12736                 ol_link_threads=posix
12737         fi
12738 fi
12739
12740
12741                 # Pthread try link: -lpthread -lmach -lexc -lc_r (ol_cv_pthread_lpthread_lmach_lexc_lc_r)
12742 if test "$ol_link_threads" = no ; then
12743         # try -lpthread -lmach -lexc -lc_r
12744         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc -lc_r""... $ac_c" 1>&6
12745 echo "configure:12746: checking for pthread link with -lpthread -lmach -lexc -lc_r" >&5
12746 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc_lc_r+set}\" = set"; then
12747   echo $ac_n "(cached) $ac_c" 1>&6
12748 else
12749   
12750                 # save the flags
12751                 ol_LIBS="$LIBS"
12752                 LIBS="-lpthread -lmach -lexc -lc_r $LIBS"
12753
12754                 if test "$cross_compiling" = yes; then
12755   cat > conftest.$ac_ext <<EOF
12756 #line 12757 "configure"
12757 #include "confdefs.h"
12758 /* pthread test headers */
12759 #include <pthread.h>
12760 #if HAVE_PTHREADS < 7
12761 #include <errno.h>
12762 #endif
12763 #ifndef NULL
12764 #define NULL (void*)0
12765 #endif
12766
12767 static void *task(p)
12768         void *p;
12769 {
12770         return (void *) (p == NULL);
12771 }
12772
12773 int main() {
12774
12775         /* pthread test function */
12776 #ifndef PTHREAD_CREATE_DETACHED
12777 #define PTHREAD_CREATE_DETACHED 1
12778 #endif
12779         pthread_t t;
12780         int status;
12781         int detach = PTHREAD_CREATE_DETACHED;
12782
12783 #if HAVE_PTHREADS > 4
12784         /* Final pthreads */
12785         pthread_attr_t attr;
12786
12787         status = pthread_attr_init(&attr);
12788         if( status ) return status;
12789
12790 #if HAVE_PTHREADS < 7
12791         status = pthread_attr_setdetachstate(&attr, &detach);
12792         if( status < 0 ) status = errno;
12793 #else
12794         status = pthread_attr_setdetachstate(&attr, detach);
12795 #endif
12796         if( status ) return status;
12797         status = pthread_create( &t, &attr, task, NULL );
12798 #if HAVE_PTHREADS < 7
12799         if( status < 0 ) status = errno;
12800 #endif
12801         if( status ) return status;
12802 #else
12803         /* Draft 4 pthreads */
12804         status = pthread_create( &t, pthread_attr_default, task, NULL );
12805         if( status ) return errno;
12806
12807         /* give thread a chance to complete */
12808         /* it should remain joinable and hence detachable */
12809         sleep( 1 );
12810
12811         status = pthread_detach( &t );
12812         if( status ) return errno;
12813 #endif
12814
12815 #ifdef HAVE_LINUX_THREADS
12816         pthread_kill_other_threads_np();
12817 #endif
12818
12819         return 0;
12820
12821 ; return 0; }
12822 EOF
12823 if { (eval echo configure:12824: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12824   rm -rf conftest*
12825   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
12826 else
12827   echo "configure: failed program was:" >&5
12828   cat conftest.$ac_ext >&5
12829   rm -rf conftest*
12830   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
12831 fi
12832 rm -f conftest*
12833 else
12834   cat > conftest.$ac_ext <<EOF
12835 #line 12836 "configure"
12836 #include "confdefs.h"
12837 /* pthread test headers */
12838 #include <pthread.h>
12839 #if HAVE_PTHREADS < 7
12840 #include <errno.h>
12841 #endif
12842 #ifndef NULL
12843 #define NULL (void*)0
12844 #endif
12845
12846 static void *task(p)
12847         void *p;
12848 {
12849         return (void *) (p == NULL);
12850 }
12851
12852
12853 int main(argc, argv)
12854         int argc;
12855         char **argv;
12856 {
12857
12858         /* pthread test function */
12859 #ifndef PTHREAD_CREATE_DETACHED
12860 #define PTHREAD_CREATE_DETACHED 1
12861 #endif
12862         pthread_t t;
12863         int status;
12864         int detach = PTHREAD_CREATE_DETACHED;
12865
12866 #if HAVE_PTHREADS > 4
12867         /* Final pthreads */
12868         pthread_attr_t attr;
12869
12870         status = pthread_attr_init(&attr);
12871         if( status ) return status;
12872
12873 #if HAVE_PTHREADS < 7
12874         status = pthread_attr_setdetachstate(&attr, &detach);
12875         if( status < 0 ) status = errno;
12876 #else
12877         status = pthread_attr_setdetachstate(&attr, detach);
12878 #endif
12879         if( status ) return status;
12880         status = pthread_create( &t, &attr, task, NULL );
12881 #if HAVE_PTHREADS < 7
12882         if( status < 0 ) status = errno;
12883 #endif
12884         if( status ) return status;
12885 #else
12886         /* Draft 4 pthreads */
12887         status = pthread_create( &t, pthread_attr_default, task, NULL );
12888         if( status ) return errno;
12889
12890         /* give thread a chance to complete */
12891         /* it should remain joinable and hence detachable */
12892         sleep( 1 );
12893
12894         status = pthread_detach( &t );
12895         if( status ) return errno;
12896 #endif
12897
12898 #ifdef HAVE_LINUX_THREADS
12899         pthread_kill_other_threads_np();
12900 #endif
12901
12902         return 0;
12903
12904 }
12905
12906 EOF
12907 if { (eval echo configure:12908: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12908 then
12909   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
12910 else
12911   echo "configure: failed program was:" >&5
12912   cat conftest.$ac_ext >&5
12913   rm -fr conftest*
12914   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
12915 fi
12916 rm -fr conftest*
12917 fi
12918
12919
12920                 # restore the LIBS
12921                 LIBS="$ol_LIBS"
12922         
12923 fi
12924
12925 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc_lc_r" 1>&6
12926
12927         if test $ol_cv_pthread_lpthread_lmach_lexc_lc_r = yes ; then
12928                 ol_link_pthreads="-lpthread -lmach -lexc -lc_r"
12929                 ol_link_threads=posix
12930         fi
12931 fi
12932
12933                 # Pthread try link: -lpthread -lmach -lexc (ol_cv_pthread_lpthread_lmach_lexc)
12934 if test "$ol_link_threads" = no ; then
12935         # try -lpthread -lmach -lexc
12936         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc""... $ac_c" 1>&6
12937 echo "configure:12938: checking for pthread link with -lpthread -lmach -lexc" >&5
12938 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc+set}\" = set"; then
12939   echo $ac_n "(cached) $ac_c" 1>&6
12940 else
12941   
12942                 # save the flags
12943                 ol_LIBS="$LIBS"
12944                 LIBS="-lpthread -lmach -lexc $LIBS"
12945
12946                 if test "$cross_compiling" = yes; then
12947   cat > conftest.$ac_ext <<EOF
12948 #line 12949 "configure"
12949 #include "confdefs.h"
12950 /* pthread test headers */
12951 #include <pthread.h>
12952 #if HAVE_PTHREADS < 7
12953 #include <errno.h>
12954 #endif
12955 #ifndef NULL
12956 #define NULL (void*)0
12957 #endif
12958
12959 static void *task(p)
12960         void *p;
12961 {
12962         return (void *) (p == NULL);
12963 }
12964
12965 int main() {
12966
12967         /* pthread test function */
12968 #ifndef PTHREAD_CREATE_DETACHED
12969 #define PTHREAD_CREATE_DETACHED 1
12970 #endif
12971         pthread_t t;
12972         int status;
12973         int detach = PTHREAD_CREATE_DETACHED;
12974
12975 #if HAVE_PTHREADS > 4
12976         /* Final pthreads */
12977         pthread_attr_t attr;
12978
12979         status = pthread_attr_init(&attr);
12980         if( status ) return status;
12981
12982 #if HAVE_PTHREADS < 7
12983         status = pthread_attr_setdetachstate(&attr, &detach);
12984         if( status < 0 ) status = errno;
12985 #else
12986         status = pthread_attr_setdetachstate(&attr, detach);
12987 #endif
12988         if( status ) return status;
12989         status = pthread_create( &t, &attr, task, NULL );
12990 #if HAVE_PTHREADS < 7
12991         if( status < 0 ) status = errno;
12992 #endif
12993         if( status ) return status;
12994 #else
12995         /* Draft 4 pthreads */
12996         status = pthread_create( &t, pthread_attr_default, task, NULL );
12997         if( status ) return errno;
12998
12999         /* give thread a chance to complete */
13000         /* it should remain joinable and hence detachable */
13001         sleep( 1 );
13002
13003         status = pthread_detach( &t );
13004         if( status ) return errno;
13005 #endif
13006
13007 #ifdef HAVE_LINUX_THREADS
13008         pthread_kill_other_threads_np();
13009 #endif
13010
13011         return 0;
13012
13013 ; return 0; }
13014 EOF
13015 if { (eval echo configure:13016: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13016   rm -rf conftest*
13017   ol_cv_pthread_lpthread_lmach_lexc=yes
13018 else
13019   echo "configure: failed program was:" >&5
13020   cat conftest.$ac_ext >&5
13021   rm -rf conftest*
13022   ol_cv_pthread_lpthread_lmach_lexc=no
13023 fi
13024 rm -f conftest*
13025 else
13026   cat > conftest.$ac_ext <<EOF
13027 #line 13028 "configure"
13028 #include "confdefs.h"
13029 /* pthread test headers */
13030 #include <pthread.h>
13031 #if HAVE_PTHREADS < 7
13032 #include <errno.h>
13033 #endif
13034 #ifndef NULL
13035 #define NULL (void*)0
13036 #endif
13037
13038 static void *task(p)
13039         void *p;
13040 {
13041         return (void *) (p == NULL);
13042 }
13043
13044
13045 int main(argc, argv)
13046         int argc;
13047         char **argv;
13048 {
13049
13050         /* pthread test function */
13051 #ifndef PTHREAD_CREATE_DETACHED
13052 #define PTHREAD_CREATE_DETACHED 1
13053 #endif
13054         pthread_t t;
13055         int status;
13056         int detach = PTHREAD_CREATE_DETACHED;
13057
13058 #if HAVE_PTHREADS > 4
13059         /* Final pthreads */
13060         pthread_attr_t attr;
13061
13062         status = pthread_attr_init(&attr);
13063         if( status ) return status;
13064
13065 #if HAVE_PTHREADS < 7
13066         status = pthread_attr_setdetachstate(&attr, &detach);
13067         if( status < 0 ) status = errno;
13068 #else
13069         status = pthread_attr_setdetachstate(&attr, detach);
13070 #endif
13071         if( status ) return status;
13072         status = pthread_create( &t, &attr, task, NULL );
13073 #if HAVE_PTHREADS < 7
13074         if( status < 0 ) status = errno;
13075 #endif
13076         if( status ) return status;
13077 #else
13078         /* Draft 4 pthreads */
13079         status = pthread_create( &t, pthread_attr_default, task, NULL );
13080         if( status ) return errno;
13081
13082         /* give thread a chance to complete */
13083         /* it should remain joinable and hence detachable */
13084         sleep( 1 );
13085
13086         status = pthread_detach( &t );
13087         if( status ) return errno;
13088 #endif
13089
13090 #ifdef HAVE_LINUX_THREADS
13091         pthread_kill_other_threads_np();
13092 #endif
13093
13094         return 0;
13095
13096 }
13097
13098 EOF
13099 if { (eval echo configure:13100: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13100 then
13101   ol_cv_pthread_lpthread_lmach_lexc=yes
13102 else
13103   echo "configure: failed program was:" >&5
13104   cat conftest.$ac_ext >&5
13105   rm -fr conftest*
13106   ol_cv_pthread_lpthread_lmach_lexc=no
13107 fi
13108 rm -fr conftest*
13109 fi
13110
13111
13112                 # restore the LIBS
13113                 LIBS="$ol_LIBS"
13114         
13115 fi
13116
13117 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc" 1>&6
13118
13119         if test $ol_cv_pthread_lpthread_lmach_lexc = yes ; then
13120                 ol_link_pthreads="-lpthread -lmach -lexc"
13121                 ol_link_threads=posix
13122         fi
13123 fi
13124
13125
13126                 # Pthread try link: -lpthread -Wl,-woff,85 (ol_cv_pthread_lib_lpthread_woff)
13127 if test "$ol_link_threads" = no ; then
13128         # try -lpthread -Wl,-woff,85
13129         echo $ac_n "checking for pthread link with -lpthread -Wl,-woff,85""... $ac_c" 1>&6
13130 echo "configure:13131: checking for pthread link with -lpthread -Wl,-woff,85" >&5
13131 if eval "test \"\${ol_cv_pthread_lib_lpthread_woff+set}\" = set"; then
13132   echo $ac_n "(cached) $ac_c" 1>&6
13133 else
13134   
13135                 # save the flags
13136                 ol_LIBS="$LIBS"
13137                 LIBS="-lpthread -Wl,-woff,85 $LIBS"
13138
13139                 if test "$cross_compiling" = yes; then
13140   cat > conftest.$ac_ext <<EOF
13141 #line 13142 "configure"
13142 #include "confdefs.h"
13143 /* pthread test headers */
13144 #include <pthread.h>
13145 #if HAVE_PTHREADS < 7
13146 #include <errno.h>
13147 #endif
13148 #ifndef NULL
13149 #define NULL (void*)0
13150 #endif
13151
13152 static void *task(p)
13153         void *p;
13154 {
13155         return (void *) (p == NULL);
13156 }
13157
13158 int main() {
13159
13160         /* pthread test function */
13161 #ifndef PTHREAD_CREATE_DETACHED
13162 #define PTHREAD_CREATE_DETACHED 1
13163 #endif
13164         pthread_t t;
13165         int status;
13166         int detach = PTHREAD_CREATE_DETACHED;
13167
13168 #if HAVE_PTHREADS > 4
13169         /* Final pthreads */
13170         pthread_attr_t attr;
13171
13172         status = pthread_attr_init(&attr);
13173         if( status ) return status;
13174
13175 #if HAVE_PTHREADS < 7
13176         status = pthread_attr_setdetachstate(&attr, &detach);
13177         if( status < 0 ) status = errno;
13178 #else
13179         status = pthread_attr_setdetachstate(&attr, detach);
13180 #endif
13181         if( status ) return status;
13182         status = pthread_create( &t, &attr, task, NULL );
13183 #if HAVE_PTHREADS < 7
13184         if( status < 0 ) status = errno;
13185 #endif
13186         if( status ) return status;
13187 #else
13188         /* Draft 4 pthreads */
13189         status = pthread_create( &t, pthread_attr_default, task, NULL );
13190         if( status ) return errno;
13191
13192         /* give thread a chance to complete */
13193         /* it should remain joinable and hence detachable */
13194         sleep( 1 );
13195
13196         status = pthread_detach( &t );
13197         if( status ) return errno;
13198 #endif
13199
13200 #ifdef HAVE_LINUX_THREADS
13201         pthread_kill_other_threads_np();
13202 #endif
13203
13204         return 0;
13205
13206 ; return 0; }
13207 EOF
13208 if { (eval echo configure:13209: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13209   rm -rf conftest*
13210   ol_cv_pthread_lib_lpthread_woff=yes
13211 else
13212   echo "configure: failed program was:" >&5
13213   cat conftest.$ac_ext >&5
13214   rm -rf conftest*
13215   ol_cv_pthread_lib_lpthread_woff=no
13216 fi
13217 rm -f conftest*
13218 else
13219   cat > conftest.$ac_ext <<EOF
13220 #line 13221 "configure"
13221 #include "confdefs.h"
13222 /* pthread test headers */
13223 #include <pthread.h>
13224 #if HAVE_PTHREADS < 7
13225 #include <errno.h>
13226 #endif
13227 #ifndef NULL
13228 #define NULL (void*)0
13229 #endif
13230
13231 static void *task(p)
13232         void *p;
13233 {
13234         return (void *) (p == NULL);
13235 }
13236
13237
13238 int main(argc, argv)
13239         int argc;
13240         char **argv;
13241 {
13242
13243         /* pthread test function */
13244 #ifndef PTHREAD_CREATE_DETACHED
13245 #define PTHREAD_CREATE_DETACHED 1
13246 #endif
13247         pthread_t t;
13248         int status;
13249         int detach = PTHREAD_CREATE_DETACHED;
13250
13251 #if HAVE_PTHREADS > 4
13252         /* Final pthreads */
13253         pthread_attr_t attr;
13254
13255         status = pthread_attr_init(&attr);
13256         if( status ) return status;
13257
13258 #if HAVE_PTHREADS < 7
13259         status = pthread_attr_setdetachstate(&attr, &detach);
13260         if( status < 0 ) status = errno;
13261 #else
13262         status = pthread_attr_setdetachstate(&attr, detach);
13263 #endif
13264         if( status ) return status;
13265         status = pthread_create( &t, &attr, task, NULL );
13266 #if HAVE_PTHREADS < 7
13267         if( status < 0 ) status = errno;
13268 #endif
13269         if( status ) return status;
13270 #else
13271         /* Draft 4 pthreads */
13272         status = pthread_create( &t, pthread_attr_default, task, NULL );
13273         if( status ) return errno;
13274
13275         /* give thread a chance to complete */
13276         /* it should remain joinable and hence detachable */
13277         sleep( 1 );
13278
13279         status = pthread_detach( &t );
13280         if( status ) return errno;
13281 #endif
13282
13283 #ifdef HAVE_LINUX_THREADS
13284         pthread_kill_other_threads_np();
13285 #endif
13286
13287         return 0;
13288
13289 }
13290
13291 EOF
13292 if { (eval echo configure:13293: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13293 then
13294   ol_cv_pthread_lib_lpthread_woff=yes
13295 else
13296   echo "configure: failed program was:" >&5
13297   cat conftest.$ac_ext >&5
13298   rm -fr conftest*
13299   ol_cv_pthread_lib_lpthread_woff=no
13300 fi
13301 rm -fr conftest*
13302 fi
13303
13304
13305                 # restore the LIBS
13306                 LIBS="$ol_LIBS"
13307         
13308 fi
13309
13310 echo "$ac_t""$ol_cv_pthread_lib_lpthread_woff" 1>&6
13311
13312         if test $ol_cv_pthread_lib_lpthread_woff = yes ; then
13313                 ol_link_pthreads="-lpthread -Wl,-woff,85"
13314                 ol_link_threads=posix
13315         fi
13316 fi
13317
13318
13319                 # Pthread try link: -lpthread (ol_cv_pthread_lpthread)
13320 if test "$ol_link_threads" = no ; then
13321         # try -lpthread
13322         echo $ac_n "checking for pthread link with -lpthread""... $ac_c" 1>&6
13323 echo "configure:13324: checking for pthread link with -lpthread" >&5
13324 if eval "test \"\${ol_cv_pthread_lpthread+set}\" = set"; then
13325   echo $ac_n "(cached) $ac_c" 1>&6
13326 else
13327   
13328                 # save the flags
13329                 ol_LIBS="$LIBS"
13330                 LIBS="-lpthread $LIBS"
13331
13332                 if test "$cross_compiling" = yes; then
13333   cat > conftest.$ac_ext <<EOF
13334 #line 13335 "configure"
13335 #include "confdefs.h"
13336 /* pthread test headers */
13337 #include <pthread.h>
13338 #if HAVE_PTHREADS < 7
13339 #include <errno.h>
13340 #endif
13341 #ifndef NULL
13342 #define NULL (void*)0
13343 #endif
13344
13345 static void *task(p)
13346         void *p;
13347 {
13348         return (void *) (p == NULL);
13349 }
13350
13351 int main() {
13352
13353         /* pthread test function */
13354 #ifndef PTHREAD_CREATE_DETACHED
13355 #define PTHREAD_CREATE_DETACHED 1
13356 #endif
13357         pthread_t t;
13358         int status;
13359         int detach = PTHREAD_CREATE_DETACHED;
13360
13361 #if HAVE_PTHREADS > 4
13362         /* Final pthreads */
13363         pthread_attr_t attr;
13364
13365         status = pthread_attr_init(&attr);
13366         if( status ) return status;
13367
13368 #if HAVE_PTHREADS < 7
13369         status = pthread_attr_setdetachstate(&attr, &detach);
13370         if( status < 0 ) status = errno;
13371 #else
13372         status = pthread_attr_setdetachstate(&attr, detach);
13373 #endif
13374         if( status ) return status;
13375         status = pthread_create( &t, &attr, task, NULL );
13376 #if HAVE_PTHREADS < 7
13377         if( status < 0 ) status = errno;
13378 #endif
13379         if( status ) return status;
13380 #else
13381         /* Draft 4 pthreads */
13382         status = pthread_create( &t, pthread_attr_default, task, NULL );
13383         if( status ) return errno;
13384
13385         /* give thread a chance to complete */
13386         /* it should remain joinable and hence detachable */
13387         sleep( 1 );
13388
13389         status = pthread_detach( &t );
13390         if( status ) return errno;
13391 #endif
13392
13393 #ifdef HAVE_LINUX_THREADS
13394         pthread_kill_other_threads_np();
13395 #endif
13396
13397         return 0;
13398
13399 ; return 0; }
13400 EOF
13401 if { (eval echo configure:13402: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13402   rm -rf conftest*
13403   ol_cv_pthread_lpthread=yes
13404 else
13405   echo "configure: failed program was:" >&5
13406   cat conftest.$ac_ext >&5
13407   rm -rf conftest*
13408   ol_cv_pthread_lpthread=no
13409 fi
13410 rm -f conftest*
13411 else
13412   cat > conftest.$ac_ext <<EOF
13413 #line 13414 "configure"
13414 #include "confdefs.h"
13415 /* pthread test headers */
13416 #include <pthread.h>
13417 #if HAVE_PTHREADS < 7
13418 #include <errno.h>
13419 #endif
13420 #ifndef NULL
13421 #define NULL (void*)0
13422 #endif
13423
13424 static void *task(p)
13425         void *p;
13426 {
13427         return (void *) (p == NULL);
13428 }
13429
13430
13431 int main(argc, argv)
13432         int argc;
13433         char **argv;
13434 {
13435
13436         /* pthread test function */
13437 #ifndef PTHREAD_CREATE_DETACHED
13438 #define PTHREAD_CREATE_DETACHED 1
13439 #endif
13440         pthread_t t;
13441         int status;
13442         int detach = PTHREAD_CREATE_DETACHED;
13443
13444 #if HAVE_PTHREADS > 4
13445         /* Final pthreads */
13446         pthread_attr_t attr;
13447
13448         status = pthread_attr_init(&attr);
13449         if( status ) return status;
13450
13451 #if HAVE_PTHREADS < 7
13452         status = pthread_attr_setdetachstate(&attr, &detach);
13453         if( status < 0 ) status = errno;
13454 #else
13455         status = pthread_attr_setdetachstate(&attr, detach);
13456 #endif
13457         if( status ) return status;
13458         status = pthread_create( &t, &attr, task, NULL );
13459 #if HAVE_PTHREADS < 7
13460         if( status < 0 ) status = errno;
13461 #endif
13462         if( status ) return status;
13463 #else
13464         /* Draft 4 pthreads */
13465         status = pthread_create( &t, pthread_attr_default, task, NULL );
13466         if( status ) return errno;
13467
13468         /* give thread a chance to complete */
13469         /* it should remain joinable and hence detachable */
13470         sleep( 1 );
13471
13472         status = pthread_detach( &t );
13473         if( status ) return errno;
13474 #endif
13475
13476 #ifdef HAVE_LINUX_THREADS
13477         pthread_kill_other_threads_np();
13478 #endif
13479
13480         return 0;
13481
13482 }
13483
13484 EOF
13485 if { (eval echo configure:13486: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13486 then
13487   ol_cv_pthread_lpthread=yes
13488 else
13489   echo "configure: failed program was:" >&5
13490   cat conftest.$ac_ext >&5
13491   rm -fr conftest*
13492   ol_cv_pthread_lpthread=no
13493 fi
13494 rm -fr conftest*
13495 fi
13496
13497
13498                 # restore the LIBS
13499                 LIBS="$ol_LIBS"
13500         
13501 fi
13502
13503 echo "$ac_t""$ol_cv_pthread_lpthread" 1>&6
13504
13505         if test $ol_cv_pthread_lpthread = yes ; then
13506                 ol_link_pthreads="-lpthread"
13507                 ol_link_threads=posix
13508         fi
13509 fi
13510
13511                 # Pthread try link: -lc_r (ol_cv_pthread_lc_r)
13512 if test "$ol_link_threads" = no ; then
13513         # try -lc_r
13514         echo $ac_n "checking for pthread link with -lc_r""... $ac_c" 1>&6
13515 echo "configure:13516: checking for pthread link with -lc_r" >&5
13516 if eval "test \"\${ol_cv_pthread_lc_r+set}\" = set"; then
13517   echo $ac_n "(cached) $ac_c" 1>&6
13518 else
13519   
13520                 # save the flags
13521                 ol_LIBS="$LIBS"
13522                 LIBS="-lc_r $LIBS"
13523
13524                 if test "$cross_compiling" = yes; then
13525   cat > conftest.$ac_ext <<EOF
13526 #line 13527 "configure"
13527 #include "confdefs.h"
13528 /* pthread test headers */
13529 #include <pthread.h>
13530 #if HAVE_PTHREADS < 7
13531 #include <errno.h>
13532 #endif
13533 #ifndef NULL
13534 #define NULL (void*)0
13535 #endif
13536
13537 static void *task(p)
13538         void *p;
13539 {
13540         return (void *) (p == NULL);
13541 }
13542
13543 int main() {
13544
13545         /* pthread test function */
13546 #ifndef PTHREAD_CREATE_DETACHED
13547 #define PTHREAD_CREATE_DETACHED 1
13548 #endif
13549         pthread_t t;
13550         int status;
13551         int detach = PTHREAD_CREATE_DETACHED;
13552
13553 #if HAVE_PTHREADS > 4
13554         /* Final pthreads */
13555         pthread_attr_t attr;
13556
13557         status = pthread_attr_init(&attr);
13558         if( status ) return status;
13559
13560 #if HAVE_PTHREADS < 7
13561         status = pthread_attr_setdetachstate(&attr, &detach);
13562         if( status < 0 ) status = errno;
13563 #else
13564         status = pthread_attr_setdetachstate(&attr, detach);
13565 #endif
13566         if( status ) return status;
13567         status = pthread_create( &t, &attr, task, NULL );
13568 #if HAVE_PTHREADS < 7
13569         if( status < 0 ) status = errno;
13570 #endif
13571         if( status ) return status;
13572 #else
13573         /* Draft 4 pthreads */
13574         status = pthread_create( &t, pthread_attr_default, task, NULL );
13575         if( status ) return errno;
13576
13577         /* give thread a chance to complete */
13578         /* it should remain joinable and hence detachable */
13579         sleep( 1 );
13580
13581         status = pthread_detach( &t );
13582         if( status ) return errno;
13583 #endif
13584
13585 #ifdef HAVE_LINUX_THREADS
13586         pthread_kill_other_threads_np();
13587 #endif
13588
13589         return 0;
13590
13591 ; return 0; }
13592 EOF
13593 if { (eval echo configure:13594: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13594   rm -rf conftest*
13595   ol_cv_pthread_lc_r=yes
13596 else
13597   echo "configure: failed program was:" >&5
13598   cat conftest.$ac_ext >&5
13599   rm -rf conftest*
13600   ol_cv_pthread_lc_r=no
13601 fi
13602 rm -f conftest*
13603 else
13604   cat > conftest.$ac_ext <<EOF
13605 #line 13606 "configure"
13606 #include "confdefs.h"
13607 /* pthread test headers */
13608 #include <pthread.h>
13609 #if HAVE_PTHREADS < 7
13610 #include <errno.h>
13611 #endif
13612 #ifndef NULL
13613 #define NULL (void*)0
13614 #endif
13615
13616 static void *task(p)
13617         void *p;
13618 {
13619         return (void *) (p == NULL);
13620 }
13621
13622
13623 int main(argc, argv)
13624         int argc;
13625         char **argv;
13626 {
13627
13628         /* pthread test function */
13629 #ifndef PTHREAD_CREATE_DETACHED
13630 #define PTHREAD_CREATE_DETACHED 1
13631 #endif
13632         pthread_t t;
13633         int status;
13634         int detach = PTHREAD_CREATE_DETACHED;
13635
13636 #if HAVE_PTHREADS > 4
13637         /* Final pthreads */
13638         pthread_attr_t attr;
13639
13640         status = pthread_attr_init(&attr);
13641         if( status ) return status;
13642
13643 #if HAVE_PTHREADS < 7
13644         status = pthread_attr_setdetachstate(&attr, &detach);
13645         if( status < 0 ) status = errno;
13646 #else
13647         status = pthread_attr_setdetachstate(&attr, detach);
13648 #endif
13649         if( status ) return status;
13650         status = pthread_create( &t, &attr, task, NULL );
13651 #if HAVE_PTHREADS < 7
13652         if( status < 0 ) status = errno;
13653 #endif
13654         if( status ) return status;
13655 #else
13656         /* Draft 4 pthreads */
13657         status = pthread_create( &t, pthread_attr_default, task, NULL );
13658         if( status ) return errno;
13659
13660         /* give thread a chance to complete */
13661         /* it should remain joinable and hence detachable */
13662         sleep( 1 );
13663
13664         status = pthread_detach( &t );
13665         if( status ) return errno;
13666 #endif
13667
13668 #ifdef HAVE_LINUX_THREADS
13669         pthread_kill_other_threads_np();
13670 #endif
13671
13672         return 0;
13673
13674 }
13675
13676 EOF
13677 if { (eval echo configure:13678: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13678 then
13679   ol_cv_pthread_lc_r=yes
13680 else
13681   echo "configure: failed program was:" >&5
13682   cat conftest.$ac_ext >&5
13683   rm -fr conftest*
13684   ol_cv_pthread_lc_r=no
13685 fi
13686 rm -fr conftest*
13687 fi
13688
13689
13690                 # restore the LIBS
13691                 LIBS="$ol_LIBS"
13692         
13693 fi
13694
13695 echo "$ac_t""$ol_cv_pthread_lc_r" 1>&6
13696
13697         if test $ol_cv_pthread_lc_r = yes ; then
13698                 ol_link_pthreads="-lc_r"
13699                 ol_link_threads=posix
13700         fi
13701 fi
13702
13703
13704                 # Pthread try link: -threads (ol_cv_pthread_threads)
13705 if test "$ol_link_threads" = no ; then
13706         # try -threads
13707         echo $ac_n "checking for pthread link with -threads""... $ac_c" 1>&6
13708 echo "configure:13709: checking for pthread link with -threads" >&5
13709 if eval "test \"\${ol_cv_pthread_threads+set}\" = set"; then
13710   echo $ac_n "(cached) $ac_c" 1>&6
13711 else
13712   
13713                 # save the flags
13714                 ol_LIBS="$LIBS"
13715                 LIBS="-threads $LIBS"
13716
13717                 if test "$cross_compiling" = yes; then
13718   cat > conftest.$ac_ext <<EOF
13719 #line 13720 "configure"
13720 #include "confdefs.h"
13721 /* pthread test headers */
13722 #include <pthread.h>
13723 #if HAVE_PTHREADS < 7
13724 #include <errno.h>
13725 #endif
13726 #ifndef NULL
13727 #define NULL (void*)0
13728 #endif
13729
13730 static void *task(p)
13731         void *p;
13732 {
13733         return (void *) (p == NULL);
13734 }
13735
13736 int main() {
13737
13738         /* pthread test function */
13739 #ifndef PTHREAD_CREATE_DETACHED
13740 #define PTHREAD_CREATE_DETACHED 1
13741 #endif
13742         pthread_t t;
13743         int status;
13744         int detach = PTHREAD_CREATE_DETACHED;
13745
13746 #if HAVE_PTHREADS > 4
13747         /* Final pthreads */
13748         pthread_attr_t attr;
13749
13750         status = pthread_attr_init(&attr);
13751         if( status ) return status;
13752
13753 #if HAVE_PTHREADS < 7
13754         status = pthread_attr_setdetachstate(&attr, &detach);
13755         if( status < 0 ) status = errno;
13756 #else
13757         status = pthread_attr_setdetachstate(&attr, detach);
13758 #endif
13759         if( status ) return status;
13760         status = pthread_create( &t, &attr, task, NULL );
13761 #if HAVE_PTHREADS < 7
13762         if( status < 0 ) status = errno;
13763 #endif
13764         if( status ) return status;
13765 #else
13766         /* Draft 4 pthreads */
13767         status = pthread_create( &t, pthread_attr_default, task, NULL );
13768         if( status ) return errno;
13769
13770         /* give thread a chance to complete */
13771         /* it should remain joinable and hence detachable */
13772         sleep( 1 );
13773
13774         status = pthread_detach( &t );
13775         if( status ) return errno;
13776 #endif
13777
13778 #ifdef HAVE_LINUX_THREADS
13779         pthread_kill_other_threads_np();
13780 #endif
13781
13782         return 0;
13783
13784 ; return 0; }
13785 EOF
13786 if { (eval echo configure:13787: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13787   rm -rf conftest*
13788   ol_cv_pthread_threads=yes
13789 else
13790   echo "configure: failed program was:" >&5
13791   cat conftest.$ac_ext >&5
13792   rm -rf conftest*
13793   ol_cv_pthread_threads=no
13794 fi
13795 rm -f conftest*
13796 else
13797   cat > conftest.$ac_ext <<EOF
13798 #line 13799 "configure"
13799 #include "confdefs.h"
13800 /* pthread test headers */
13801 #include <pthread.h>
13802 #if HAVE_PTHREADS < 7
13803 #include <errno.h>
13804 #endif
13805 #ifndef NULL
13806 #define NULL (void*)0
13807 #endif
13808
13809 static void *task(p)
13810         void *p;
13811 {
13812         return (void *) (p == NULL);
13813 }
13814
13815
13816 int main(argc, argv)
13817         int argc;
13818         char **argv;
13819 {
13820
13821         /* pthread test function */
13822 #ifndef PTHREAD_CREATE_DETACHED
13823 #define PTHREAD_CREATE_DETACHED 1
13824 #endif
13825         pthread_t t;
13826         int status;
13827         int detach = PTHREAD_CREATE_DETACHED;
13828
13829 #if HAVE_PTHREADS > 4
13830         /* Final pthreads */
13831         pthread_attr_t attr;
13832
13833         status = pthread_attr_init(&attr);
13834         if( status ) return status;
13835
13836 #if HAVE_PTHREADS < 7
13837         status = pthread_attr_setdetachstate(&attr, &detach);
13838         if( status < 0 ) status = errno;
13839 #else
13840         status = pthread_attr_setdetachstate(&attr, detach);
13841 #endif
13842         if( status ) return status;
13843         status = pthread_create( &t, &attr, task, NULL );
13844 #if HAVE_PTHREADS < 7
13845         if( status < 0 ) status = errno;
13846 #endif
13847         if( status ) return status;
13848 #else
13849         /* Draft 4 pthreads */
13850         status = pthread_create( &t, pthread_attr_default, task, NULL );
13851         if( status ) return errno;
13852
13853         /* give thread a chance to complete */
13854         /* it should remain joinable and hence detachable */
13855         sleep( 1 );
13856
13857         status = pthread_detach( &t );
13858         if( status ) return errno;
13859 #endif
13860
13861 #ifdef HAVE_LINUX_THREADS
13862         pthread_kill_other_threads_np();
13863 #endif
13864
13865         return 0;
13866
13867 }
13868
13869 EOF
13870 if { (eval echo configure:13871: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13871 then
13872   ol_cv_pthread_threads=yes
13873 else
13874   echo "configure: failed program was:" >&5
13875   cat conftest.$ac_ext >&5
13876   rm -fr conftest*
13877   ol_cv_pthread_threads=no
13878 fi
13879 rm -fr conftest*
13880 fi
13881
13882
13883                 # restore the LIBS
13884                 LIBS="$ol_LIBS"
13885         
13886 fi
13887
13888 echo "$ac_t""$ol_cv_pthread_threads" 1>&6
13889
13890         if test $ol_cv_pthread_threads = yes ; then
13891                 ol_link_pthreads="-threads"
13892                 ol_link_threads=posix
13893         fi
13894 fi
13895
13896
13897                 # Pthread try link: -lpthreads -lmach -lexc -lc_r (ol_cv_pthread_lpthreads_lmach_lexc_lc_r)
13898 if test "$ol_link_threads" = no ; then
13899         # try -lpthreads -lmach -lexc -lc_r
13900         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc -lc_r""... $ac_c" 1>&6
13901 echo "configure:13902: checking for pthread link with -lpthreads -lmach -lexc -lc_r" >&5
13902 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc_lc_r+set}\" = set"; then
13903   echo $ac_n "(cached) $ac_c" 1>&6
13904 else
13905   
13906                 # save the flags
13907                 ol_LIBS="$LIBS"
13908                 LIBS="-lpthreads -lmach -lexc -lc_r $LIBS"
13909
13910                 if test "$cross_compiling" = yes; then
13911   cat > conftest.$ac_ext <<EOF
13912 #line 13913 "configure"
13913 #include "confdefs.h"
13914 /* pthread test headers */
13915 #include <pthread.h>
13916 #if HAVE_PTHREADS < 7
13917 #include <errno.h>
13918 #endif
13919 #ifndef NULL
13920 #define NULL (void*)0
13921 #endif
13922
13923 static void *task(p)
13924         void *p;
13925 {
13926         return (void *) (p == NULL);
13927 }
13928
13929 int main() {
13930
13931         /* pthread test function */
13932 #ifndef PTHREAD_CREATE_DETACHED
13933 #define PTHREAD_CREATE_DETACHED 1
13934 #endif
13935         pthread_t t;
13936         int status;
13937         int detach = PTHREAD_CREATE_DETACHED;
13938
13939 #if HAVE_PTHREADS > 4
13940         /* Final pthreads */
13941         pthread_attr_t attr;
13942
13943         status = pthread_attr_init(&attr);
13944         if( status ) return status;
13945
13946 #if HAVE_PTHREADS < 7
13947         status = pthread_attr_setdetachstate(&attr, &detach);
13948         if( status < 0 ) status = errno;
13949 #else
13950         status = pthread_attr_setdetachstate(&attr, detach);
13951 #endif
13952         if( status ) return status;
13953         status = pthread_create( &t, &attr, task, NULL );
13954 #if HAVE_PTHREADS < 7
13955         if( status < 0 ) status = errno;
13956 #endif
13957         if( status ) return status;
13958 #else
13959         /* Draft 4 pthreads */
13960         status = pthread_create( &t, pthread_attr_default, task, NULL );
13961         if( status ) return errno;
13962
13963         /* give thread a chance to complete */
13964         /* it should remain joinable and hence detachable */
13965         sleep( 1 );
13966
13967         status = pthread_detach( &t );
13968         if( status ) return errno;
13969 #endif
13970
13971 #ifdef HAVE_LINUX_THREADS
13972         pthread_kill_other_threads_np();
13973 #endif
13974
13975         return 0;
13976
13977 ; return 0; }
13978 EOF
13979 if { (eval echo configure:13980: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13980   rm -rf conftest*
13981   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
13982 else
13983   echo "configure: failed program was:" >&5
13984   cat conftest.$ac_ext >&5
13985   rm -rf conftest*
13986   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
13987 fi
13988 rm -f conftest*
13989 else
13990   cat > conftest.$ac_ext <<EOF
13991 #line 13992 "configure"
13992 #include "confdefs.h"
13993 /* pthread test headers */
13994 #include <pthread.h>
13995 #if HAVE_PTHREADS < 7
13996 #include <errno.h>
13997 #endif
13998 #ifndef NULL
13999 #define NULL (void*)0
14000 #endif
14001
14002 static void *task(p)
14003         void *p;
14004 {
14005         return (void *) (p == NULL);
14006 }
14007
14008
14009 int main(argc, argv)
14010         int argc;
14011         char **argv;
14012 {
14013
14014         /* pthread test function */
14015 #ifndef PTHREAD_CREATE_DETACHED
14016 #define PTHREAD_CREATE_DETACHED 1
14017 #endif
14018         pthread_t t;
14019         int status;
14020         int detach = PTHREAD_CREATE_DETACHED;
14021
14022 #if HAVE_PTHREADS > 4
14023         /* Final pthreads */
14024         pthread_attr_t attr;
14025
14026         status = pthread_attr_init(&attr);
14027         if( status ) return status;
14028
14029 #if HAVE_PTHREADS < 7
14030         status = pthread_attr_setdetachstate(&attr, &detach);
14031         if( status < 0 ) status = errno;
14032 #else
14033         status = pthread_attr_setdetachstate(&attr, detach);
14034 #endif
14035         if( status ) return status;
14036         status = pthread_create( &t, &attr, task, NULL );
14037 #if HAVE_PTHREADS < 7
14038         if( status < 0 ) status = errno;
14039 #endif
14040         if( status ) return status;
14041 #else
14042         /* Draft 4 pthreads */
14043         status = pthread_create( &t, pthread_attr_default, task, NULL );
14044         if( status ) return errno;
14045
14046         /* give thread a chance to complete */
14047         /* it should remain joinable and hence detachable */
14048         sleep( 1 );
14049
14050         status = pthread_detach( &t );
14051         if( status ) return errno;
14052 #endif
14053
14054 #ifdef HAVE_LINUX_THREADS
14055         pthread_kill_other_threads_np();
14056 #endif
14057
14058         return 0;
14059
14060 }
14061
14062 EOF
14063 if { (eval echo configure:14064: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14064 then
14065   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
14066 else
14067   echo "configure: failed program was:" >&5
14068   cat conftest.$ac_ext >&5
14069   rm -fr conftest*
14070   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
14071 fi
14072 rm -fr conftest*
14073 fi
14074
14075
14076                 # restore the LIBS
14077                 LIBS="$ol_LIBS"
14078         
14079 fi
14080
14081 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc_lc_r" 1>&6
14082
14083         if test $ol_cv_pthread_lpthreads_lmach_lexc_lc_r = yes ; then
14084                 ol_link_pthreads="-lpthreads -lmach -lexc -lc_r"
14085                 ol_link_threads=posix
14086         fi
14087 fi
14088
14089                 # Pthread try link: -lpthreads -lmach -lexc (ol_cv_pthread_lpthreads_lmach_lexc)
14090 if test "$ol_link_threads" = no ; then
14091         # try -lpthreads -lmach -lexc
14092         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc""... $ac_c" 1>&6
14093 echo "configure:14094: checking for pthread link with -lpthreads -lmach -lexc" >&5
14094 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc+set}\" = set"; then
14095   echo $ac_n "(cached) $ac_c" 1>&6
14096 else
14097   
14098                 # save the flags
14099                 ol_LIBS="$LIBS"
14100                 LIBS="-lpthreads -lmach -lexc $LIBS"
14101
14102                 if test "$cross_compiling" = yes; then
14103   cat > conftest.$ac_ext <<EOF
14104 #line 14105 "configure"
14105 #include "confdefs.h"
14106 /* pthread test headers */
14107 #include <pthread.h>
14108 #if HAVE_PTHREADS < 7
14109 #include <errno.h>
14110 #endif
14111 #ifndef NULL
14112 #define NULL (void*)0
14113 #endif
14114
14115 static void *task(p)
14116         void *p;
14117 {
14118         return (void *) (p == NULL);
14119 }
14120
14121 int main() {
14122
14123         /* pthread test function */
14124 #ifndef PTHREAD_CREATE_DETACHED
14125 #define PTHREAD_CREATE_DETACHED 1
14126 #endif
14127         pthread_t t;
14128         int status;
14129         int detach = PTHREAD_CREATE_DETACHED;
14130
14131 #if HAVE_PTHREADS > 4
14132         /* Final pthreads */
14133         pthread_attr_t attr;
14134
14135         status = pthread_attr_init(&attr);
14136         if( status ) return status;
14137
14138 #if HAVE_PTHREADS < 7
14139         status = pthread_attr_setdetachstate(&attr, &detach);
14140         if( status < 0 ) status = errno;
14141 #else
14142         status = pthread_attr_setdetachstate(&attr, detach);
14143 #endif
14144         if( status ) return status;
14145         status = pthread_create( &t, &attr, task, NULL );
14146 #if HAVE_PTHREADS < 7
14147         if( status < 0 ) status = errno;
14148 #endif
14149         if( status ) return status;
14150 #else
14151         /* Draft 4 pthreads */
14152         status = pthread_create( &t, pthread_attr_default, task, NULL );
14153         if( status ) return errno;
14154
14155         /* give thread a chance to complete */
14156         /* it should remain joinable and hence detachable */
14157         sleep( 1 );
14158
14159         status = pthread_detach( &t );
14160         if( status ) return errno;
14161 #endif
14162
14163 #ifdef HAVE_LINUX_THREADS
14164         pthread_kill_other_threads_np();
14165 #endif
14166
14167         return 0;
14168
14169 ; return 0; }
14170 EOF
14171 if { (eval echo configure:14172: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14172   rm -rf conftest*
14173   ol_cv_pthread_lpthreads_lmach_lexc=yes
14174 else
14175   echo "configure: failed program was:" >&5
14176   cat conftest.$ac_ext >&5
14177   rm -rf conftest*
14178   ol_cv_pthread_lpthreads_lmach_lexc=no
14179 fi
14180 rm -f conftest*
14181 else
14182   cat > conftest.$ac_ext <<EOF
14183 #line 14184 "configure"
14184 #include "confdefs.h"
14185 /* pthread test headers */
14186 #include <pthread.h>
14187 #if HAVE_PTHREADS < 7
14188 #include <errno.h>
14189 #endif
14190 #ifndef NULL
14191 #define NULL (void*)0
14192 #endif
14193
14194 static void *task(p)
14195         void *p;
14196 {
14197         return (void *) (p == NULL);
14198 }
14199
14200
14201 int main(argc, argv)
14202         int argc;
14203         char **argv;
14204 {
14205
14206         /* pthread test function */
14207 #ifndef PTHREAD_CREATE_DETACHED
14208 #define PTHREAD_CREATE_DETACHED 1
14209 #endif
14210         pthread_t t;
14211         int status;
14212         int detach = PTHREAD_CREATE_DETACHED;
14213
14214 #if HAVE_PTHREADS > 4
14215         /* Final pthreads */
14216         pthread_attr_t attr;
14217
14218         status = pthread_attr_init(&attr);
14219         if( status ) return status;
14220
14221 #if HAVE_PTHREADS < 7
14222         status = pthread_attr_setdetachstate(&attr, &detach);
14223         if( status < 0 ) status = errno;
14224 #else
14225         status = pthread_attr_setdetachstate(&attr, detach);
14226 #endif
14227         if( status ) return status;
14228         status = pthread_create( &t, &attr, task, NULL );
14229 #if HAVE_PTHREADS < 7
14230         if( status < 0 ) status = errno;
14231 #endif
14232         if( status ) return status;
14233 #else
14234         /* Draft 4 pthreads */
14235         status = pthread_create( &t, pthread_attr_default, task, NULL );
14236         if( status ) return errno;
14237
14238         /* give thread a chance to complete */
14239         /* it should remain joinable and hence detachable */
14240         sleep( 1 );
14241
14242         status = pthread_detach( &t );
14243         if( status ) return errno;
14244 #endif
14245
14246 #ifdef HAVE_LINUX_THREADS
14247         pthread_kill_other_threads_np();
14248 #endif
14249
14250         return 0;
14251
14252 }
14253
14254 EOF
14255 if { (eval echo configure:14256: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14256 then
14257   ol_cv_pthread_lpthreads_lmach_lexc=yes
14258 else
14259   echo "configure: failed program was:" >&5
14260   cat conftest.$ac_ext >&5
14261   rm -fr conftest*
14262   ol_cv_pthread_lpthreads_lmach_lexc=no
14263 fi
14264 rm -fr conftest*
14265 fi
14266
14267
14268                 # restore the LIBS
14269                 LIBS="$ol_LIBS"
14270         
14271 fi
14272
14273 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc" 1>&6
14274
14275         if test $ol_cv_pthread_lpthreads_lmach_lexc = yes ; then
14276                 ol_link_pthreads="-lpthreads -lmach -lexc"
14277                 ol_link_threads=posix
14278         fi
14279 fi
14280
14281                 # Pthread try link: -lpthreads -lexc (ol_cv_pthread_lpthreads_lexc)
14282 if test "$ol_link_threads" = no ; then
14283         # try -lpthreads -lexc
14284         echo $ac_n "checking for pthread link with -lpthreads -lexc""... $ac_c" 1>&6
14285 echo "configure:14286: checking for pthread link with -lpthreads -lexc" >&5
14286 if eval "test \"\${ol_cv_pthread_lpthreads_lexc+set}\" = set"; then
14287   echo $ac_n "(cached) $ac_c" 1>&6
14288 else
14289   
14290                 # save the flags
14291                 ol_LIBS="$LIBS"
14292                 LIBS="-lpthreads -lexc $LIBS"
14293
14294                 if test "$cross_compiling" = yes; then
14295   cat > conftest.$ac_ext <<EOF
14296 #line 14297 "configure"
14297 #include "confdefs.h"
14298 /* pthread test headers */
14299 #include <pthread.h>
14300 #if HAVE_PTHREADS < 7
14301 #include <errno.h>
14302 #endif
14303 #ifndef NULL
14304 #define NULL (void*)0
14305 #endif
14306
14307 static void *task(p)
14308         void *p;
14309 {
14310         return (void *) (p == NULL);
14311 }
14312
14313 int main() {
14314
14315         /* pthread test function */
14316 #ifndef PTHREAD_CREATE_DETACHED
14317 #define PTHREAD_CREATE_DETACHED 1
14318 #endif
14319         pthread_t t;
14320         int status;
14321         int detach = PTHREAD_CREATE_DETACHED;
14322
14323 #if HAVE_PTHREADS > 4
14324         /* Final pthreads */
14325         pthread_attr_t attr;
14326
14327         status = pthread_attr_init(&attr);
14328         if( status ) return status;
14329
14330 #if HAVE_PTHREADS < 7
14331         status = pthread_attr_setdetachstate(&attr, &detach);
14332         if( status < 0 ) status = errno;
14333 #else
14334         status = pthread_attr_setdetachstate(&attr, detach);
14335 #endif
14336         if( status ) return status;
14337         status = pthread_create( &t, &attr, task, NULL );
14338 #if HAVE_PTHREADS < 7
14339         if( status < 0 ) status = errno;
14340 #endif
14341         if( status ) return status;
14342 #else
14343         /* Draft 4 pthreads */
14344         status = pthread_create( &t, pthread_attr_default, task, NULL );
14345         if( status ) return errno;
14346
14347         /* give thread a chance to complete */
14348         /* it should remain joinable and hence detachable */
14349         sleep( 1 );
14350
14351         status = pthread_detach( &t );
14352         if( status ) return errno;
14353 #endif
14354
14355 #ifdef HAVE_LINUX_THREADS
14356         pthread_kill_other_threads_np();
14357 #endif
14358
14359         return 0;
14360
14361 ; return 0; }
14362 EOF
14363 if { (eval echo configure:14364: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14364   rm -rf conftest*
14365   ol_cv_pthread_lpthreads_lexc=yes
14366 else
14367   echo "configure: failed program was:" >&5
14368   cat conftest.$ac_ext >&5
14369   rm -rf conftest*
14370   ol_cv_pthread_lpthreads_lexc=no
14371 fi
14372 rm -f conftest*
14373 else
14374   cat > conftest.$ac_ext <<EOF
14375 #line 14376 "configure"
14376 #include "confdefs.h"
14377 /* pthread test headers */
14378 #include <pthread.h>
14379 #if HAVE_PTHREADS < 7
14380 #include <errno.h>
14381 #endif
14382 #ifndef NULL
14383 #define NULL (void*)0
14384 #endif
14385
14386 static void *task(p)
14387         void *p;
14388 {
14389         return (void *) (p == NULL);
14390 }
14391
14392
14393 int main(argc, argv)
14394         int argc;
14395         char **argv;
14396 {
14397
14398         /* pthread test function */
14399 #ifndef PTHREAD_CREATE_DETACHED
14400 #define PTHREAD_CREATE_DETACHED 1
14401 #endif
14402         pthread_t t;
14403         int status;
14404         int detach = PTHREAD_CREATE_DETACHED;
14405
14406 #if HAVE_PTHREADS > 4
14407         /* Final pthreads */
14408         pthread_attr_t attr;
14409
14410         status = pthread_attr_init(&attr);
14411         if( status ) return status;
14412
14413 #if HAVE_PTHREADS < 7
14414         status = pthread_attr_setdetachstate(&attr, &detach);
14415         if( status < 0 ) status = errno;
14416 #else
14417         status = pthread_attr_setdetachstate(&attr, detach);
14418 #endif
14419         if( status ) return status;
14420         status = pthread_create( &t, &attr, task, NULL );
14421 #if HAVE_PTHREADS < 7
14422         if( status < 0 ) status = errno;
14423 #endif
14424         if( status ) return status;
14425 #else
14426         /* Draft 4 pthreads */
14427         status = pthread_create( &t, pthread_attr_default, task, NULL );
14428         if( status ) return errno;
14429
14430         /* give thread a chance to complete */
14431         /* it should remain joinable and hence detachable */
14432         sleep( 1 );
14433
14434         status = pthread_detach( &t );
14435         if( status ) return errno;
14436 #endif
14437
14438 #ifdef HAVE_LINUX_THREADS
14439         pthread_kill_other_threads_np();
14440 #endif
14441
14442         return 0;
14443
14444 }
14445
14446 EOF
14447 if { (eval echo configure:14448: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14448 then
14449   ol_cv_pthread_lpthreads_lexc=yes
14450 else
14451   echo "configure: failed program was:" >&5
14452   cat conftest.$ac_ext >&5
14453   rm -fr conftest*
14454   ol_cv_pthread_lpthreads_lexc=no
14455 fi
14456 rm -fr conftest*
14457 fi
14458
14459
14460                 # restore the LIBS
14461                 LIBS="$ol_LIBS"
14462         
14463 fi
14464
14465 echo "$ac_t""$ol_cv_pthread_lpthreads_lexc" 1>&6
14466
14467         if test $ol_cv_pthread_lpthreads_lexc = yes ; then
14468                 ol_link_pthreads="-lpthreads -lexc"
14469                 ol_link_threads=posix
14470         fi
14471 fi
14472
14473
14474                 # Pthread try link: -lpthreads (ol_cv_pthread_lib_lpthreads)
14475 if test "$ol_link_threads" = no ; then
14476         # try -lpthreads
14477         echo $ac_n "checking for pthread link with -lpthreads""... $ac_c" 1>&6
14478 echo "configure:14479: checking for pthread link with -lpthreads" >&5
14479 if eval "test \"\${ol_cv_pthread_lib_lpthreads+set}\" = set"; then
14480   echo $ac_n "(cached) $ac_c" 1>&6
14481 else
14482   
14483                 # save the flags
14484                 ol_LIBS="$LIBS"
14485                 LIBS="-lpthreads $LIBS"
14486
14487                 if test "$cross_compiling" = yes; then
14488   cat > conftest.$ac_ext <<EOF
14489 #line 14490 "configure"
14490 #include "confdefs.h"
14491 /* pthread test headers */
14492 #include <pthread.h>
14493 #if HAVE_PTHREADS < 7
14494 #include <errno.h>
14495 #endif
14496 #ifndef NULL
14497 #define NULL (void*)0
14498 #endif
14499
14500 static void *task(p)
14501         void *p;
14502 {
14503         return (void *) (p == NULL);
14504 }
14505
14506 int main() {
14507
14508         /* pthread test function */
14509 #ifndef PTHREAD_CREATE_DETACHED
14510 #define PTHREAD_CREATE_DETACHED 1
14511 #endif
14512         pthread_t t;
14513         int status;
14514         int detach = PTHREAD_CREATE_DETACHED;
14515
14516 #if HAVE_PTHREADS > 4
14517         /* Final pthreads */
14518         pthread_attr_t attr;
14519
14520         status = pthread_attr_init(&attr);
14521         if( status ) return status;
14522
14523 #if HAVE_PTHREADS < 7
14524         status = pthread_attr_setdetachstate(&attr, &detach);
14525         if( status < 0 ) status = errno;
14526 #else
14527         status = pthread_attr_setdetachstate(&attr, detach);
14528 #endif
14529         if( status ) return status;
14530         status = pthread_create( &t, &attr, task, NULL );
14531 #if HAVE_PTHREADS < 7
14532         if( status < 0 ) status = errno;
14533 #endif
14534         if( status ) return status;
14535 #else
14536         /* Draft 4 pthreads */
14537         status = pthread_create( &t, pthread_attr_default, task, NULL );
14538         if( status ) return errno;
14539
14540         /* give thread a chance to complete */
14541         /* it should remain joinable and hence detachable */
14542         sleep( 1 );
14543
14544         status = pthread_detach( &t );
14545         if( status ) return errno;
14546 #endif
14547
14548 #ifdef HAVE_LINUX_THREADS
14549         pthread_kill_other_threads_np();
14550 #endif
14551
14552         return 0;
14553
14554 ; return 0; }
14555 EOF
14556 if { (eval echo configure:14557: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14557   rm -rf conftest*
14558   ol_cv_pthread_lib_lpthreads=yes
14559 else
14560   echo "configure: failed program was:" >&5
14561   cat conftest.$ac_ext >&5
14562   rm -rf conftest*
14563   ol_cv_pthread_lib_lpthreads=no
14564 fi
14565 rm -f conftest*
14566 else
14567   cat > conftest.$ac_ext <<EOF
14568 #line 14569 "configure"
14569 #include "confdefs.h"
14570 /* pthread test headers */
14571 #include <pthread.h>
14572 #if HAVE_PTHREADS < 7
14573 #include <errno.h>
14574 #endif
14575 #ifndef NULL
14576 #define NULL (void*)0
14577 #endif
14578
14579 static void *task(p)
14580         void *p;
14581 {
14582         return (void *) (p == NULL);
14583 }
14584
14585
14586 int main(argc, argv)
14587         int argc;
14588         char **argv;
14589 {
14590
14591         /* pthread test function */
14592 #ifndef PTHREAD_CREATE_DETACHED
14593 #define PTHREAD_CREATE_DETACHED 1
14594 #endif
14595         pthread_t t;
14596         int status;
14597         int detach = PTHREAD_CREATE_DETACHED;
14598
14599 #if HAVE_PTHREADS > 4
14600         /* Final pthreads */
14601         pthread_attr_t attr;
14602
14603         status = pthread_attr_init(&attr);
14604         if( status ) return status;
14605
14606 #if HAVE_PTHREADS < 7
14607         status = pthread_attr_setdetachstate(&attr, &detach);
14608         if( status < 0 ) status = errno;
14609 #else
14610         status = pthread_attr_setdetachstate(&attr, detach);
14611 #endif
14612         if( status ) return status;
14613         status = pthread_create( &t, &attr, task, NULL );
14614 #if HAVE_PTHREADS < 7
14615         if( status < 0 ) status = errno;
14616 #endif
14617         if( status ) return status;
14618 #else
14619         /* Draft 4 pthreads */
14620         status = pthread_create( &t, pthread_attr_default, task, NULL );
14621         if( status ) return errno;
14622
14623         /* give thread a chance to complete */
14624         /* it should remain joinable and hence detachable */
14625         sleep( 1 );
14626
14627         status = pthread_detach( &t );
14628         if( status ) return errno;
14629 #endif
14630
14631 #ifdef HAVE_LINUX_THREADS
14632         pthread_kill_other_threads_np();
14633 #endif
14634
14635         return 0;
14636
14637 }
14638
14639 EOF
14640 if { (eval echo configure:14641: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14641 then
14642   ol_cv_pthread_lib_lpthreads=yes
14643 else
14644   echo "configure: failed program was:" >&5
14645   cat conftest.$ac_ext >&5
14646   rm -fr conftest*
14647   ol_cv_pthread_lib_lpthreads=no
14648 fi
14649 rm -fr conftest*
14650 fi
14651
14652
14653                 # restore the LIBS
14654                 LIBS="$ol_LIBS"
14655         
14656 fi
14657
14658 echo "$ac_t""$ol_cv_pthread_lib_lpthreads" 1>&6
14659
14660         if test $ol_cv_pthread_lib_lpthreads = yes ; then
14661                 ol_link_pthreads="-lpthreads"
14662                 ol_link_threads=posix
14663         fi
14664 fi
14665
14666
14667                 if test $ol_link_threads != no ; then
14668                         LTHREAD_LIBS="$LTHREAD_LIBS $ol_link_pthreads"
14669
14670                                                 save_CPPFLAGS="$CPPFLAGS"
14671                         save_LIBS="$LIBS"
14672                         LIBS="$LTHREAD_LIBS $LIBS"
14673
14674                                                                                                 for ac_func in sched_yield pthread_yield thr_yield
14675 do
14676 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
14677 echo "configure:14678: checking for $ac_func" >&5
14678 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
14679   echo $ac_n "(cached) $ac_c" 1>&6
14680 else
14681   cat > conftest.$ac_ext <<EOF
14682 #line 14683 "configure"
14683 #include "confdefs.h"
14684 /* System header to define __stub macros and hopefully few prototypes,
14685     which can conflict with char $ac_func(); below.  */
14686 #include <assert.h>
14687 /* Override any gcc2 internal prototype to avoid an error.  */
14688 /* We use char because int might match the return type of a gcc2
14689     builtin and then its argument prototype would still apply.  */
14690 char $ac_func();
14691 char (*f)();
14692
14693 int main() {
14694
14695 /* The GNU C library defines this for functions which it implements
14696     to always fail with ENOSYS.  Some functions are actually named
14697     something starting with __ and the normal name is an alias.  */
14698 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14699 choke me
14700 #else
14701 f = $ac_func;
14702 #endif
14703
14704 ; return 0; }
14705 EOF
14706 if { (eval echo configure:14707: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14707   rm -rf conftest*
14708   eval "ac_cv_func_$ac_func=yes"
14709 else
14710   echo "configure: failed program was:" >&5
14711   cat conftest.$ac_ext >&5
14712   rm -rf conftest*
14713   eval "ac_cv_func_$ac_func=no"
14714 fi
14715 rm -f conftest*
14716 fi
14717
14718 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
14719   echo "$ac_t""yes" 1>&6
14720     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
14721   cat >> confdefs.h <<EOF
14722 #define $ac_tr_func 1
14723 EOF
14724  
14725 else
14726   echo "$ac_t""no" 1>&6
14727 fi
14728 done
14729
14730
14731                         if test $ac_cv_func_sched_yield = no -a \
14732                                 $ac_cv_func_pthread_yield = no -a \
14733                                 $ac_cv_func_thr_yield = no ; then
14734                                                                 echo $ac_n "checking for sched_yield in -lrt""... $ac_c" 1>&6
14735 echo "configure:14736: checking for sched_yield in -lrt" >&5
14736 ac_lib_var=`echo rt'_'sched_yield | sed 'y%./+-:%__p__%'`
14737 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
14738   echo $ac_n "(cached) $ac_c" 1>&6
14739 else
14740   ac_save_LIBS="$LIBS"
14741 LIBS="-lrt  $LIBS"
14742 cat > conftest.$ac_ext <<EOF
14743 #line 14744 "configure"
14744 #include "confdefs.h"
14745 /* Override any gcc2 internal prototype to avoid an error.  */
14746 /* We use char because int might match the return type of a gcc2
14747     builtin and then its argument prototype would still apply.  */
14748 char sched_yield();
14749
14750 int main() {
14751 sched_yield()
14752 ; return 0; }
14753 EOF
14754 if { (eval echo configure:14755: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14755   rm -rf conftest*
14756   eval "ac_cv_lib_$ac_lib_var=yes"
14757 else
14758   echo "configure: failed program was:" >&5
14759   cat conftest.$ac_ext >&5
14760   rm -rf conftest*
14761   eval "ac_cv_lib_$ac_lib_var=no"
14762 fi
14763 rm -f conftest*
14764 LIBS="$ac_save_LIBS"
14765
14766 fi
14767 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
14768   echo "$ac_t""yes" 1>&6
14769   LTHREAD_LIBS="$LTHREAD_LIBS -lrt"
14770                                         cat >> confdefs.h <<\EOF
14771 #define HAVE_SCHED_YIELD 1
14772 EOF
14773
14774                                         ac_cv_func_sched_yield=yes
14775 else
14776   echo "$ac_t""no" 1>&6
14777 ac_cv_func_sched_yield=no
14778 fi
14779
14780                         fi
14781                         if test $ac_cv_func_sched_yield = no -a \
14782                                 $ac_cv_func_pthread_yield = no -a \
14783                                 "$ac_cv_func_thr_yield" = no ; then
14784                                 echo "configure: warning: could not locate sched_yield() or pthread_yield()" 1>&2
14785                         fi
14786
14787                                                 for ac_func in pthread_kill pthread_rwlock_destroy
14788 do
14789 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
14790 echo "configure:14791: checking for $ac_func" >&5
14791 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
14792   echo $ac_n "(cached) $ac_c" 1>&6
14793 else
14794   cat > conftest.$ac_ext <<EOF
14795 #line 14796 "configure"
14796 #include "confdefs.h"
14797 /* System header to define __stub macros and hopefully few prototypes,
14798     which can conflict with char $ac_func(); below.  */
14799 #include <assert.h>
14800 /* Override any gcc2 internal prototype to avoid an error.  */
14801 /* We use char because int might match the return type of a gcc2
14802     builtin and then its argument prototype would still apply.  */
14803 char $ac_func();
14804 char (*f)();
14805
14806 int main() {
14807
14808 /* The GNU C library defines this for functions which it implements
14809     to always fail with ENOSYS.  Some functions are actually named
14810     something starting with __ and the normal name is an alias.  */
14811 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14812 choke me
14813 #else
14814 f = $ac_func;
14815 #endif
14816
14817 ; return 0; }
14818 EOF
14819 if { (eval echo configure:14820: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14820   rm -rf conftest*
14821   eval "ac_cv_func_$ac_func=yes"
14822 else
14823   echo "configure: failed program was:" >&5
14824   cat conftest.$ac_ext >&5
14825   rm -rf conftest*
14826   eval "ac_cv_func_$ac_func=no"
14827 fi
14828 rm -f conftest*
14829 fi
14830
14831 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
14832   echo "$ac_t""yes" 1>&6
14833     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
14834   cat >> confdefs.h <<EOF
14835 #define $ac_tr_func 1
14836 EOF
14837  
14838 else
14839   echo "$ac_t""no" 1>&6
14840 fi
14841 done
14842
14843
14844                                                                         echo $ac_n "checking for pthread_detach with <pthread.h>""... $ac_c" 1>&6
14845 echo "configure:14846: checking for pthread_detach with <pthread.h>" >&5
14846 if eval "test \"\${ol_cv_func_pthread_detach+set}\" = set"; then
14847   echo $ac_n "(cached) $ac_c" 1>&6
14848 else
14849   
14850                                                                 cat > conftest.$ac_ext <<EOF
14851 #line 14852 "configure"
14852 #include "confdefs.h"
14853
14854 #include <pthread.h>
14855 #ifndef NULL
14856 #define NULL (void*)0
14857 #endif
14858
14859 int main() {
14860 pthread_detach(NULL);
14861 ; return 0; }
14862 EOF
14863 if { (eval echo configure:14864: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14864   rm -rf conftest*
14865   ol_cv_func_pthread_detach=yes
14866 else
14867   echo "configure: failed program was:" >&5
14868   cat conftest.$ac_ext >&5
14869   rm -rf conftest*
14870   ol_cv_func_pthread_detach=no
14871 fi
14872 rm -f conftest*
14873                         
14874 fi
14875
14876 echo "$ac_t""$ol_cv_func_pthread_detach" 1>&6
14877
14878                         if test $ol_cv_func_pthread_detach = no ; then
14879                                 { echo "configure: error: could not locate pthread_detach()" 1>&2; exit 1; }
14880                         fi
14881
14882                         cat >> confdefs.h <<\EOF
14883 #define HAVE_PTHREAD_DETACH 1
14884 EOF
14885
14886
14887                                                 for ac_func in \
14888                                 pthread_setconcurrency \
14889                                 pthread_getconcurrency \
14890                                 thr_setconcurrency \
14891                                 thr_getconcurrency \
14892                         
14893 do
14894 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
14895 echo "configure:14896: checking for $ac_func" >&5
14896 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
14897   echo $ac_n "(cached) $ac_c" 1>&6
14898 else
14899   cat > conftest.$ac_ext <<EOF
14900 #line 14901 "configure"
14901 #include "confdefs.h"
14902 /* System header to define __stub macros and hopefully few prototypes,
14903     which can conflict with char $ac_func(); below.  */
14904 #include <assert.h>
14905 /* Override any gcc2 internal prototype to avoid an error.  */
14906 /* We use char because int might match the return type of a gcc2
14907     builtin and then its argument prototype would still apply.  */
14908 char $ac_func();
14909 char (*f)();
14910
14911 int main() {
14912
14913 /* The GNU C library defines this for functions which it implements
14914     to always fail with ENOSYS.  Some functions are actually named
14915     something starting with __ and the normal name is an alias.  */
14916 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14917 choke me
14918 #else
14919 f = $ac_func;
14920 #endif
14921
14922 ; return 0; }
14923 EOF
14924 if { (eval echo configure:14925: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14925   rm -rf conftest*
14926   eval "ac_cv_func_$ac_func=yes"
14927 else
14928   echo "configure: failed program was:" >&5
14929   cat conftest.$ac_ext >&5
14930   rm -rf conftest*
14931   eval "ac_cv_func_$ac_func=no"
14932 fi
14933 rm -f conftest*
14934 fi
14935
14936 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
14937   echo "$ac_t""yes" 1>&6
14938     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
14939   cat >> confdefs.h <<EOF
14940 #define $ac_tr_func 1
14941 EOF
14942  
14943 else
14944   echo "$ac_t""no" 1>&6
14945 fi
14946 done
14947
14948
14949                         
14950         for ac_func in pthread_kill_other_threads_np
14951 do
14952 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
14953 echo "configure:14954: checking for $ac_func" >&5
14954 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
14955   echo $ac_n "(cached) $ac_c" 1>&6
14956 else
14957   cat > conftest.$ac_ext <<EOF
14958 #line 14959 "configure"
14959 #include "confdefs.h"
14960 /* System header to define __stub macros and hopefully few prototypes,
14961     which can conflict with char $ac_func(); below.  */
14962 #include <assert.h>
14963 /* Override any gcc2 internal prototype to avoid an error.  */
14964 /* We use char because int might match the return type of a gcc2
14965     builtin and then its argument prototype would still apply.  */
14966 char $ac_func();
14967 char (*f)();
14968
14969 int main() {
14970
14971 /* The GNU C library defines this for functions which it implements
14972     to always fail with ENOSYS.  Some functions are actually named
14973     something starting with __ and the normal name is an alias.  */
14974 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14975 choke me
14976 #else
14977 f = $ac_func;
14978 #endif
14979
14980 ; return 0; }
14981 EOF
14982 if { (eval echo configure:14983: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14983   rm -rf conftest*
14984   eval "ac_cv_func_$ac_func=yes"
14985 else
14986   echo "configure: failed program was:" >&5
14987   cat conftest.$ac_ext >&5
14988   rm -rf conftest*
14989   eval "ac_cv_func_$ac_func=no"
14990 fi
14991 rm -f conftest*
14992 fi
14993
14994 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
14995   echo "$ac_t""yes" 1>&6
14996     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
14997   cat >> confdefs.h <<EOF
14998 #define $ac_tr_func 1
14999 EOF
15000  
15001 else
15002   echo "$ac_t""no" 1>&6
15003 fi
15004 done
15005
15006         echo $ac_n "checking for LinuxThreads implementation""... $ac_c" 1>&6
15007 echo "configure:15008: checking for LinuxThreads implementation" >&5
15008 if eval "test \"\${ol_cv_sys_linux_threads+set}\" = set"; then
15009   echo $ac_n "(cached) $ac_c" 1>&6
15010 else
15011   ol_cv_sys_linux_threads=$ac_cv_func_pthread_kill_other_threads_np
15012 fi
15013
15014 echo "$ac_t""$ol_cv_sys_linux_threads" 1>&6
15015
15016                         
15017         
15018         
15019         echo $ac_n "checking for LinuxThreads consistency""... $ac_c" 1>&6
15020 echo "configure:15021: checking for LinuxThreads consistency" >&5
15021 if eval "test \"\${ol_cv_linux_threads+set}\" = set"; then
15022   echo $ac_n "(cached) $ac_c" 1>&6
15023 else
15024   
15025                 if test $ol_cv_header_linux_threads = yes -a \
15026                         $ol_cv_sys_linux_threads = yes; then
15027                         ol_cv_linux_threads=yes
15028                 elif test $ol_cv_header_linux_threads = no -a \
15029                         $ol_cv_sys_linux_threads = no; then
15030                         ol_cv_linux_threads=no
15031                 else
15032                         ol_cv_linux_threads=error
15033                 fi
15034         
15035 fi
15036
15037 echo "$ac_t""$ol_cv_linux_threads" 1>&6
15038
15039
15040                         if test $ol_cv_linux_threads = error; then
15041                                 { echo "configure: error: LinuxThreads header/library mismatch" 1>&2; exit 1; };
15042                         fi
15043
15044                         echo $ac_n "checking if pthread_create() works""... $ac_c" 1>&6
15045 echo "configure:15046: checking if pthread_create() works" >&5
15046 if eval "test \"\${ol_cv_pthread_create_works+set}\" = set"; then
15047   echo $ac_n "(cached) $ac_c" 1>&6
15048 else
15049   
15050                         if test "$cross_compiling" = yes; then
15051                                 ol_cv_pthread_create_works=yes
15052 else
15053   cat > conftest.$ac_ext <<EOF
15054 #line 15055 "configure"
15055 #include "confdefs.h"
15056 /* pthread test headers */
15057 #include <pthread.h>
15058 #if HAVE_PTHREADS < 7
15059 #include <errno.h>
15060 #endif
15061 #ifndef NULL
15062 #define NULL (void*)0
15063 #endif
15064
15065 static void *task(p)
15066         void *p;
15067 {
15068         return (void *) (p == NULL);
15069 }
15070
15071
15072 int main(argc, argv)
15073         int argc;
15074         char **argv;
15075 {
15076
15077         /* pthread test function */
15078 #ifndef PTHREAD_CREATE_DETACHED
15079 #define PTHREAD_CREATE_DETACHED 1
15080 #endif
15081         pthread_t t;
15082         int status;
15083         int detach = PTHREAD_CREATE_DETACHED;
15084
15085 #if HAVE_PTHREADS > 4
15086         /* Final pthreads */
15087         pthread_attr_t attr;
15088
15089         status = pthread_attr_init(&attr);
15090         if( status ) return status;
15091
15092 #if HAVE_PTHREADS < 7
15093         status = pthread_attr_setdetachstate(&attr, &detach);
15094         if( status < 0 ) status = errno;
15095 #else
15096         status = pthread_attr_setdetachstate(&attr, detach);
15097 #endif
15098         if( status ) return status;
15099         status = pthread_create( &t, &attr, task, NULL );
15100 #if HAVE_PTHREADS < 7
15101         if( status < 0 ) status = errno;
15102 #endif
15103         if( status ) return status;
15104 #else
15105         /* Draft 4 pthreads */
15106         status = pthread_create( &t, pthread_attr_default, task, NULL );
15107         if( status ) return errno;
15108
15109         /* give thread a chance to complete */
15110         /* it should remain joinable and hence detachable */
15111         sleep( 1 );
15112
15113         status = pthread_detach( &t );
15114         if( status ) return errno;
15115 #endif
15116
15117 #ifdef HAVE_LINUX_THREADS
15118         pthread_kill_other_threads_np();
15119 #endif
15120
15121         return 0;
15122
15123 }
15124
15125 EOF
15126 if { (eval echo configure:15127: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
15127 then
15128   ol_cv_pthread_create_works=yes
15129 else
15130   echo "configure: failed program was:" >&5
15131   cat conftest.$ac_ext >&5
15132   rm -fr conftest*
15133   ol_cv_pthread_create_works=no
15134 fi
15135 rm -fr conftest*
15136 fi
15137
15138 fi
15139
15140 echo "$ac_t""$ol_cv_pthread_create_works" 1>&6
15141
15142                         if test $ol_cv_pthread_create_works = no ; then
15143                                 { echo "configure: error: pthread_create is not usable, check environment settings" 1>&2; exit 1; }
15144                         fi
15145
15146                                                 if test $ol_with_yielding_select = auto ; then
15147                                 echo $ac_n "checking if select yields when using pthreads""... $ac_c" 1>&6
15148 echo "configure:15149: checking if select yields when using pthreads" >&5
15149 if eval "test \"\${ol_cv_pthread_select_yields+set}\" = set"; then
15150   echo $ac_n "(cached) $ac_c" 1>&6
15151 else
15152   
15153                                 if test "$cross_compiling" = yes; then
15154   ol_cv_pthread_select_yields=cross
15155 else
15156   cat > conftest.$ac_ext <<EOF
15157 #line 15158 "configure"
15158 #include "confdefs.h"
15159
15160 #include <sys/types.h>
15161 #include <sys/time.h>
15162 #include <unistd.h>
15163 #include <pthread.h>
15164 #ifndef NULL
15165 #define NULL (void*) 0
15166 #endif
15167
15168 static int fildes[2];
15169
15170 static void *task(p)
15171         void *p;
15172 {
15173         int i;
15174         struct timeval tv;
15175
15176         fd_set rfds;
15177
15178         tv.tv_sec=10;
15179         tv.tv_usec=0;
15180
15181         FD_ZERO(&rfds);
15182         FD_SET(fildes[0], &rfds);
15183
15184         /* we're not interested in any fds */
15185         i = select(FD_SETSIZE, &rfds, NULL, NULL, &tv);
15186
15187         if(i < 0) {
15188                 perror("select");
15189                 exit(10);
15190         }
15191
15192         exit(0); /* if we exit here, the select blocked the whole process */
15193 }
15194
15195 int main(argc, argv)
15196         int argc;
15197         char **argv;
15198 {
15199         pthread_t t;
15200
15201         /* create a pipe to select */
15202         if(pipe(&fildes[0])) {
15203                 perror("select");
15204                 exit(1);
15205         }
15206
15207 #ifdef HAVE_PTHREAD_SETCONCURRENCY
15208         (void) pthread_setconcurrency(2);
15209 #else
15210 #ifdef HAVE_THR_SETCONCURRENCY
15211         /* Set Solaris LWP concurrency to 2 */
15212         thr_setconcurrency(2);
15213 #endif
15214 #endif
15215
15216 #if HAVE_PTHREADS < 6
15217         pthread_create(&t, pthread_attr_default, task, NULL);
15218 #else
15219         pthread_create(&t, NULL, task, NULL);
15220 #endif
15221
15222         /* make sure task runs first */
15223 #if HAVE_THR_YIELD
15224         thr_yield();
15225 #elif defined( HAVE_SCHED_YIELD )
15226         sched_yield();
15227 #elif defined( HAVE_PTHREAD_YIELD )
15228         pthread_yield();
15229 #endif
15230
15231         exit(2);
15232 }
15233 EOF
15234 if { (eval echo configure:15235: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
15235 then
15236   ol_cv_pthread_select_yields=no
15237 else
15238   echo "configure: failed program was:" >&5
15239   cat conftest.$ac_ext >&5
15240   rm -fr conftest*
15241   ol_cv_pthread_select_yields=yes
15242 fi
15243 rm -fr conftest*
15244 fi
15245
15246 fi
15247
15248 echo "$ac_t""$ol_cv_pthread_select_yields" 1>&6
15249
15250                                 if test $ol_cv_pthread_select_yields = cross ; then
15251                                         { echo "configure: error: crossing compiling: use --with-yielding_select=yes|no|manual" 1>&2; exit 1; }
15252                                 fi
15253
15254                                 if test $ol_cv_pthread_select_yields = yes ; then
15255                                         ol_with_yielding_select=yes
15256                                 fi
15257                         fi
15258
15259                                                 CPPFLAGS="$save_CPPFLAGS"
15260                         LIBS="$save_LIBS"
15261                 else
15262                         { echo "configure: error: could not locate usable POSIX Threads" 1>&2; exit 1; }
15263                 fi
15264         fi
15265
15266         if test $ol_with_threads = posix ; then
15267                 { echo "configure: error: could not locate POSIX Threads" 1>&2; exit 1; }
15268         fi
15269 fi
15270
15271 if test $ol_with_threads = auto -o $ol_with_threads = yes \
15272         -o $ol_with_threads = mach ; then
15273
15274                 for ac_hdr in mach/cthreads.h cthreads.h
15275 do
15276 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15277 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15278 echo "configure:15279: checking for $ac_hdr" >&5
15279 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15280   echo $ac_n "(cached) $ac_c" 1>&6
15281 else
15282   cat > conftest.$ac_ext <<EOF
15283 #line 15284 "configure"
15284 #include "confdefs.h"
15285 #include <$ac_hdr>
15286 EOF
15287 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15288 { (eval echo configure:15289: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15289 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15290 if test -z "$ac_err"; then
15291   rm -rf conftest*
15292   eval "ac_cv_header_$ac_safe=yes"
15293 else
15294   echo "$ac_err" >&5
15295   echo "configure: failed program was:" >&5
15296   cat conftest.$ac_ext >&5
15297   rm -rf conftest*
15298   eval "ac_cv_header_$ac_safe=no"
15299 fi
15300 rm -f conftest*
15301 fi
15302 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15303   echo "$ac_t""yes" 1>&6
15304     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15305   cat >> confdefs.h <<EOF
15306 #define $ac_tr_hdr 1
15307 EOF
15308  
15309 else
15310   echo "$ac_t""no" 1>&6
15311 fi
15312 done
15313
15314         if test $ac_cv_header_mach_cthreads_h = yes ; then
15315                 ol_with_threads=found
15316
15317                                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
15318 echo "configure:15319: checking for cthread_fork" >&5
15319 if eval "test \"\${ac_cv_func_cthread_fork+set}\" = set"; then
15320   echo $ac_n "(cached) $ac_c" 1>&6
15321 else
15322   cat > conftest.$ac_ext <<EOF
15323 #line 15324 "configure"
15324 #include "confdefs.h"
15325 /* System header to define __stub macros and hopefully few prototypes,
15326     which can conflict with char cthread_fork(); below.  */
15327 #include <assert.h>
15328 /* Override any gcc2 internal prototype to avoid an error.  */
15329 /* We use char because int might match the return type of a gcc2
15330     builtin and then its argument prototype would still apply.  */
15331 char cthread_fork();
15332 char (*f)();
15333
15334 int main() {
15335
15336 /* The GNU C library defines this for functions which it implements
15337     to always fail with ENOSYS.  Some functions are actually named
15338     something starting with __ and the normal name is an alias.  */
15339 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
15340 choke me
15341 #else
15342 f = cthread_fork;
15343 #endif
15344
15345 ; return 0; }
15346 EOF
15347 if { (eval echo configure:15348: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15348   rm -rf conftest*
15349   eval "ac_cv_func_cthread_fork=yes"
15350 else
15351   echo "configure: failed program was:" >&5
15352   cat conftest.$ac_ext >&5
15353   rm -rf conftest*
15354   eval "ac_cv_func_cthread_fork=no"
15355 fi
15356 rm -f conftest*
15357 fi
15358
15359 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
15360   echo "$ac_t""yes" 1>&6
15361   ol_link_threads=yes
15362 else
15363   echo "$ac_t""no" 1>&6
15364 fi
15365
15366
15367                 if test $ol_link_threads = no ; then
15368                                                                         echo $ac_n "checking for cthread_fork with -all_load""... $ac_c" 1>&6
15369 echo "configure:15370: checking for cthread_fork with -all_load" >&5
15370 if eval "test \"\${ol_cv_cthread_all_load+set}\" = set"; then
15371   echo $ac_n "(cached) $ac_c" 1>&6
15372 else
15373   
15374                                                                 save_LIBS="$LIBS"
15375                                 LIBS="-all_load $LIBS"
15376                                 cat > conftest.$ac_ext <<EOF
15377 #line 15378 "configure"
15378 #include "confdefs.h"
15379 #include <mach/cthreads.h>
15380 int main() {
15381
15382                                         cthread_fork((void *)0, (void *)0);
15383                                         
15384 ; return 0; }
15385 EOF
15386 if { (eval echo configure:15387: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15387   rm -rf conftest*
15388   ol_cv_cthread_all_load=yes
15389 else
15390   echo "configure: failed program was:" >&5
15391   cat conftest.$ac_ext >&5
15392   rm -rf conftest*
15393   ol_cv_cthread_all_load=no
15394 fi
15395 rm -f conftest*
15396                                                                 LIBS="$save_LIBS"
15397                         
15398 fi
15399
15400 echo "$ac_t""$ol_cv_cthread_all_load" 1>&6
15401
15402                         if test $ol_cv_cthread_all_load = yes ; then
15403                                 LTHREAD_LIBS="$LTHREAD_LIBS -all_load"
15404                                 ol_link_threads=mach
15405                                 ol_with_threads=found
15406                         fi
15407                 fi
15408
15409         elif test $ac_cv_header_cthreads_h = yes ; then
15410                                 
15411                 ol_with_threads=found
15412  
15413                                 save_LIBS="$LIBS"
15414                 LIBS="$LIBS -lthreads"
15415                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
15416 echo "configure:15417: checking for cthread_fork" >&5
15417 if eval "test \"\${ac_cv_func_cthread_fork+set}\" = set"; then
15418   echo $ac_n "(cached) $ac_c" 1>&6
15419 else
15420   cat > conftest.$ac_ext <<EOF
15421 #line 15422 "configure"
15422 #include "confdefs.h"
15423 /* System header to define __stub macros and hopefully few prototypes,
15424     which can conflict with char cthread_fork(); below.  */
15425 #include <assert.h>
15426 /* Override any gcc2 internal prototype to avoid an error.  */
15427 /* We use char because int might match the return type of a gcc2
15428     builtin and then its argument prototype would still apply.  */
15429 char cthread_fork();
15430 char (*f)();
15431
15432 int main() {
15433
15434 /* The GNU C library defines this for functions which it implements
15435     to always fail with ENOSYS.  Some functions are actually named
15436     something starting with __ and the normal name is an alias.  */
15437 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
15438 choke me
15439 #else
15440 f = cthread_fork;
15441 #endif
15442
15443 ; return 0; }
15444 EOF
15445 if { (eval echo configure:15446: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15446   rm -rf conftest*
15447   eval "ac_cv_func_cthread_fork=yes"
15448 else
15449   echo "configure: failed program was:" >&5
15450   cat conftest.$ac_ext >&5
15451   rm -rf conftest*
15452   eval "ac_cv_func_cthread_fork=no"
15453 fi
15454 rm -f conftest*
15455 fi
15456
15457 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
15458   echo "$ac_t""yes" 1>&6
15459   ol_link_threads=yes
15460 else
15461   echo "$ac_t""no" 1>&6
15462 fi
15463
15464                 LIBS="$save_LIBS"
15465
15466                 if test $ol_link_threads = yes ; then
15467                         LTHREAD_LIBS="-lthreads"
15468                         ol_link_threads=mach
15469                         ol_with_threads=found
15470                 else
15471                         { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
15472                 fi
15473
15474         elif test $ol_with_threads = mach ; then
15475                 { echo "configure: error: could not locate Mach CThreads" 1>&2; exit 1; }
15476         fi
15477
15478         if test $ol_link_threads = mach ; then
15479                 cat >> confdefs.h <<\EOF
15480 #define HAVE_MACH_CTHREADS 1
15481 EOF
15482
15483         elif test $ol_with_threads = found ; then
15484                 { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
15485         fi
15486 fi
15487
15488 if test $ol_with_threads = auto -o $ol_with_threads = yes \
15489         -o $ol_with_threads = pth ; then
15490
15491         for ac_hdr in pth.h
15492 do
15493 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15494 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15495 echo "configure:15496: checking for $ac_hdr" >&5
15496 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15497   echo $ac_n "(cached) $ac_c" 1>&6
15498 else
15499   cat > conftest.$ac_ext <<EOF
15500 #line 15501 "configure"
15501 #include "confdefs.h"
15502 #include <$ac_hdr>
15503 EOF
15504 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15505 { (eval echo configure:15506: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15506 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15507 if test -z "$ac_err"; then
15508   rm -rf conftest*
15509   eval "ac_cv_header_$ac_safe=yes"
15510 else
15511   echo "$ac_err" >&5
15512   echo "configure: failed program was:" >&5
15513   cat conftest.$ac_ext >&5
15514   rm -rf conftest*
15515   eval "ac_cv_header_$ac_safe=no"
15516 fi
15517 rm -f conftest*
15518 fi
15519 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15520   echo "$ac_t""yes" 1>&6
15521     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15522   cat >> confdefs.h <<EOF
15523 #define $ac_tr_hdr 1
15524 EOF
15525  
15526 else
15527   echo "$ac_t""no" 1>&6
15528 fi
15529 done
15530
15531
15532         if test $ac_cv_header_pth_h = yes ; then
15533                 echo $ac_n "checking for pth_version in -lpth""... $ac_c" 1>&6
15534 echo "configure:15535: checking for pth_version in -lpth" >&5
15535 ac_lib_var=`echo pth'_'pth_version | sed 'y%./+-:%__p__%'`
15536 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
15537   echo $ac_n "(cached) $ac_c" 1>&6
15538 else
15539   ac_save_LIBS="$LIBS"
15540 LIBS="-lpth  $LIBS"
15541 cat > conftest.$ac_ext <<EOF
15542 #line 15543 "configure"
15543 #include "confdefs.h"
15544 /* Override any gcc2 internal prototype to avoid an error.  */
15545 /* We use char because int might match the return type of a gcc2
15546     builtin and then its argument prototype would still apply.  */
15547 char pth_version();
15548
15549 int main() {
15550 pth_version()
15551 ; return 0; }
15552 EOF
15553 if { (eval echo configure:15554: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15554   rm -rf conftest*
15555   eval "ac_cv_lib_$ac_lib_var=yes"
15556 else
15557   echo "configure: failed program was:" >&5
15558   cat conftest.$ac_ext >&5
15559   rm -rf conftest*
15560   eval "ac_cv_lib_$ac_lib_var=no"
15561 fi
15562 rm -f conftest*
15563 LIBS="$ac_save_LIBS"
15564
15565 fi
15566 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
15567   echo "$ac_t""yes" 1>&6
15568   have_pth=yes
15569 else
15570   echo "$ac_t""no" 1>&6
15571 have_pth=no
15572 fi
15573
15574
15575                 if test $have_pth = yes ; then
15576                         cat >> confdefs.h <<\EOF
15577 #define HAVE_GNU_PTH 1
15578 EOF
15579
15580                         LTHREAD_LIBS="$LTHREAD_LIBS -lpth"
15581                         ol_link_threads=pth
15582                         ol_with_threads=found
15583
15584                         if test $ol_with_yielding_select = auto ; then
15585                                 ol_with_yielding_select=yes
15586                         fi
15587                 fi
15588         fi
15589 fi
15590
15591 if test $ol_with_threads = auto -o $ol_with_threads = yes \
15592         -o $ol_with_threads = lwp ; then
15593
15594                 for ac_hdr in thread.h synch.h
15595 do
15596 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15597 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15598 echo "configure:15599: checking for $ac_hdr" >&5
15599 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15600   echo $ac_n "(cached) $ac_c" 1>&6
15601 else
15602   cat > conftest.$ac_ext <<EOF
15603 #line 15604 "configure"
15604 #include "confdefs.h"
15605 #include <$ac_hdr>
15606 EOF
15607 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15608 { (eval echo configure:15609: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15609 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15610 if test -z "$ac_err"; then
15611   rm -rf conftest*
15612   eval "ac_cv_header_$ac_safe=yes"
15613 else
15614   echo "$ac_err" >&5
15615   echo "configure: failed program was:" >&5
15616   cat conftest.$ac_ext >&5
15617   rm -rf conftest*
15618   eval "ac_cv_header_$ac_safe=no"
15619 fi
15620 rm -f conftest*
15621 fi
15622 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15623   echo "$ac_t""yes" 1>&6
15624     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15625   cat >> confdefs.h <<EOF
15626 #define $ac_tr_hdr 1
15627 EOF
15628  
15629 else
15630   echo "$ac_t""no" 1>&6
15631 fi
15632 done
15633
15634         if test $ac_cv_header_thread_h = yes -a $ac_cv_header_synch_h = yes ; then
15635                 echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6
15636 echo "configure:15637: checking for thr_create in -lthread" >&5
15637 ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-:%__p__%'`
15638 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
15639   echo $ac_n "(cached) $ac_c" 1>&6
15640 else
15641   ac_save_LIBS="$LIBS"
15642 LIBS="-lthread  $LIBS"
15643 cat > conftest.$ac_ext <<EOF
15644 #line 15645 "configure"
15645 #include "confdefs.h"
15646 /* Override any gcc2 internal prototype to avoid an error.  */
15647 /* We use char because int might match the return type of a gcc2
15648     builtin and then its argument prototype would still apply.  */
15649 char thr_create();
15650
15651 int main() {
15652 thr_create()
15653 ; return 0; }
15654 EOF
15655 if { (eval echo configure:15656: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15656   rm -rf conftest*
15657   eval "ac_cv_lib_$ac_lib_var=yes"
15658 else
15659   echo "configure: failed program was:" >&5
15660   cat conftest.$ac_ext >&5
15661   rm -rf conftest*
15662   eval "ac_cv_lib_$ac_lib_var=no"
15663 fi
15664 rm -f conftest*
15665 LIBS="$ac_save_LIBS"
15666
15667 fi
15668 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
15669   echo "$ac_t""yes" 1>&6
15670   have_thr=yes
15671 else
15672   echo "$ac_t""no" 1>&6
15673 have_thr=no
15674 fi
15675
15676
15677                 if test $have_thr = yes ; then
15678                         cat >> confdefs.h <<\EOF
15679 #define HAVE_THR 1
15680 EOF
15681
15682                         LTHREAD_LIBS="$LTHREAD_LIBS -lthread"
15683                         ol_link_threads=thr
15684
15685                         if test $ol_with_yielding_select = auto ; then
15686                                 ol_with_yielding_select=yes
15687                         fi
15688
15689                                                 for ac_func in \
15690                                 thr_setconcurrency \
15691                                 thr_getconcurrency \
15692                         
15693 do
15694 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15695 echo "configure:15696: checking for $ac_func" >&5
15696 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15697   echo $ac_n "(cached) $ac_c" 1>&6
15698 else
15699   cat > conftest.$ac_ext <<EOF
15700 #line 15701 "configure"
15701 #include "confdefs.h"
15702 /* System header to define __stub macros and hopefully few prototypes,
15703     which can conflict with char $ac_func(); below.  */
15704 #include <assert.h>
15705 /* Override any gcc2 internal prototype to avoid an error.  */
15706 /* We use char because int might match the return type of a gcc2
15707     builtin and then its argument prototype would still apply.  */
15708 char $ac_func();
15709 char (*f)();
15710
15711 int main() {
15712
15713 /* The GNU C library defines this for functions which it implements
15714     to always fail with ENOSYS.  Some functions are actually named
15715     something starting with __ and the normal name is an alias.  */
15716 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15717 choke me
15718 #else
15719 f = $ac_func;
15720 #endif
15721
15722 ; return 0; }
15723 EOF
15724 if { (eval echo configure:15725: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15725   rm -rf conftest*
15726   eval "ac_cv_func_$ac_func=yes"
15727 else
15728   echo "configure: failed program was:" >&5
15729   cat conftest.$ac_ext >&5
15730   rm -rf conftest*
15731   eval "ac_cv_func_$ac_func=no"
15732 fi
15733 rm -f conftest*
15734 fi
15735
15736 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15737   echo "$ac_t""yes" 1>&6
15738     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15739   cat >> confdefs.h <<EOF
15740 #define $ac_tr_func 1
15741 EOF
15742  
15743 else
15744   echo "$ac_t""no" 1>&6
15745 fi
15746 done
15747
15748                 fi
15749         fi
15750
15751                 for ac_hdr in lwp/lwp.h
15752 do
15753 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15754 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15755 echo "configure:15756: checking for $ac_hdr" >&5
15756 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15757   echo $ac_n "(cached) $ac_c" 1>&6
15758 else
15759   cat > conftest.$ac_ext <<EOF
15760 #line 15761 "configure"
15761 #include "confdefs.h"
15762 #include <$ac_hdr>
15763 EOF
15764 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15765 { (eval echo configure:15766: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15766 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15767 if test -z "$ac_err"; then
15768   rm -rf conftest*
15769   eval "ac_cv_header_$ac_safe=yes"
15770 else
15771   echo "$ac_err" >&5
15772   echo "configure: failed program was:" >&5
15773   cat conftest.$ac_ext >&5
15774   rm -rf conftest*
15775   eval "ac_cv_header_$ac_safe=no"
15776 fi
15777 rm -f conftest*
15778 fi
15779 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15780   echo "$ac_t""yes" 1>&6
15781     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15782   cat >> confdefs.h <<EOF
15783 #define $ac_tr_hdr 1
15784 EOF
15785  
15786 else
15787   echo "$ac_t""no" 1>&6
15788 fi
15789 done
15790
15791         if test $ac_cv_header_lwp_lwp_h = yes ; then
15792                 echo $ac_n "checking for lwp_create in -llwp""... $ac_c" 1>&6
15793 echo "configure:15794: checking for lwp_create in -llwp" >&5
15794 ac_lib_var=`echo lwp'_'lwp_create | sed 'y%./+-:%__p__%'`
15795 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
15796   echo $ac_n "(cached) $ac_c" 1>&6
15797 else
15798   ac_save_LIBS="$LIBS"
15799 LIBS="-llwp  $LIBS"
15800 cat > conftest.$ac_ext <<EOF
15801 #line 15802 "configure"
15802 #include "confdefs.h"
15803 /* Override any gcc2 internal prototype to avoid an error.  */
15804 /* We use char because int might match the return type of a gcc2
15805     builtin and then its argument prototype would still apply.  */
15806 char lwp_create();
15807
15808 int main() {
15809 lwp_create()
15810 ; return 0; }
15811 EOF
15812 if { (eval echo configure:15813: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15813   rm -rf conftest*
15814   eval "ac_cv_lib_$ac_lib_var=yes"
15815 else
15816   echo "configure: failed program was:" >&5
15817   cat conftest.$ac_ext >&5
15818   rm -rf conftest*
15819   eval "ac_cv_lib_$ac_lib_var=no"
15820 fi
15821 rm -f conftest*
15822 LIBS="$ac_save_LIBS"
15823
15824 fi
15825 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
15826   echo "$ac_t""yes" 1>&6
15827   have_lwp=yes
15828 else
15829   echo "$ac_t""no" 1>&6
15830 have_lwp=no
15831 fi
15832
15833
15834                 if test $have_lwp = yes ; then
15835                         cat >> confdefs.h <<\EOF
15836 #define HAVE_LWP 1
15837 EOF
15838
15839                         LTHREAD_LIBS="$LTHREAD_LIBS -llwp"
15840                         ol_link_threads=lwp
15841
15842                         if test $ol_with_yielding_select = auto ; then
15843                                 ol_with_yielding_select=no
15844                         fi
15845                 fi
15846         fi
15847 fi
15848
15849 if test $ol_with_yielding_select = yes ; then
15850         cat >> confdefs.h <<\EOF
15851 #define HAVE_YIELDING_SELECT 1
15852 EOF
15853
15854 fi
15855
15856 if test $ol_with_threads = manual ; then
15857                 ol_link_threads=yes
15858
15859         echo "configure: warning: thread defines and link options must be set manually" 1>&2
15860
15861         for ac_hdr in pthread.h sched.h
15862 do
15863 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15864 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15865 echo "configure:15866: checking for $ac_hdr" >&5
15866 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15867   echo $ac_n "(cached) $ac_c" 1>&6
15868 else
15869   cat > conftest.$ac_ext <<EOF
15870 #line 15871 "configure"
15871 #include "confdefs.h"
15872 #include <$ac_hdr>
15873 EOF
15874 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15875 { (eval echo configure:15876: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15876 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15877 if test -z "$ac_err"; then
15878   rm -rf conftest*
15879   eval "ac_cv_header_$ac_safe=yes"
15880 else
15881   echo "$ac_err" >&5
15882   echo "configure: failed program was:" >&5
15883   cat conftest.$ac_ext >&5
15884   rm -rf conftest*
15885   eval "ac_cv_header_$ac_safe=no"
15886 fi
15887 rm -f conftest*
15888 fi
15889 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15890   echo "$ac_t""yes" 1>&6
15891     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15892   cat >> confdefs.h <<EOF
15893 #define $ac_tr_hdr 1
15894 EOF
15895  
15896 else
15897   echo "$ac_t""no" 1>&6
15898 fi
15899 done
15900
15901         for ac_func in sched_yield pthread_yield
15902 do
15903 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15904 echo "configure:15905: checking for $ac_func" >&5
15905 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15906   echo $ac_n "(cached) $ac_c" 1>&6
15907 else
15908   cat > conftest.$ac_ext <<EOF
15909 #line 15910 "configure"
15910 #include "confdefs.h"
15911 /* System header to define __stub macros and hopefully few prototypes,
15912     which can conflict with char $ac_func(); below.  */
15913 #include <assert.h>
15914 /* Override any gcc2 internal prototype to avoid an error.  */
15915 /* We use char because int might match the return type of a gcc2
15916     builtin and then its argument prototype would still apply.  */
15917 char $ac_func();
15918 char (*f)();
15919
15920 int main() {
15921
15922 /* The GNU C library defines this for functions which it implements
15923     to always fail with ENOSYS.  Some functions are actually named
15924     something starting with __ and the normal name is an alias.  */
15925 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15926 choke me
15927 #else
15928 f = $ac_func;
15929 #endif
15930
15931 ; return 0; }
15932 EOF
15933 if { (eval echo configure:15934: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15934   rm -rf conftest*
15935   eval "ac_cv_func_$ac_func=yes"
15936 else
15937   echo "configure: failed program was:" >&5
15938   cat conftest.$ac_ext >&5
15939   rm -rf conftest*
15940   eval "ac_cv_func_$ac_func=no"
15941 fi
15942 rm -f conftest*
15943 fi
15944
15945 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15946   echo "$ac_t""yes" 1>&6
15947     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15948   cat >> confdefs.h <<EOF
15949 #define $ac_tr_func 1
15950 EOF
15951  
15952 else
15953   echo "$ac_t""no" 1>&6
15954 fi
15955 done
15956
15957         
15958         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
15959 echo "configure:15960: checking for LinuxThreads pthread.h" >&5
15960 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
15961   echo $ac_n "(cached) $ac_c" 1>&6
15962 else
15963   cat > conftest.$ac_ext <<EOF
15964 #line 15965 "configure"
15965 #include "confdefs.h"
15966 #include <pthread.h>
15967 EOF
15968 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15969   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
15970   rm -rf conftest*
15971   ol_cv_header_linux_threads=yes
15972 else
15973   rm -rf conftest*
15974   ol_cv_header_linux_threads=no
15975 fi
15976 rm -f conftest*
15977
15978                 
15979 fi
15980
15981 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
15982         if test $ol_cv_header_linux_threads = yes; then
15983                 cat >> confdefs.h <<\EOF
15984 #define HAVE_LINUX_THREADS 1
15985 EOF
15986
15987         fi
15988
15989
15990         for ac_hdr in mach/cthreads.h
15991 do
15992 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15993 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15994 echo "configure:15995: checking for $ac_hdr" >&5
15995 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15996   echo $ac_n "(cached) $ac_c" 1>&6
15997 else
15998   cat > conftest.$ac_ext <<EOF
15999 #line 16000 "configure"
16000 #include "confdefs.h"
16001 #include <$ac_hdr>
16002 EOF
16003 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16004 { (eval echo configure:16005: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16005 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16006 if test -z "$ac_err"; then
16007   rm -rf conftest*
16008   eval "ac_cv_header_$ac_safe=yes"
16009 else
16010   echo "$ac_err" >&5
16011   echo "configure: failed program was:" >&5
16012   cat conftest.$ac_ext >&5
16013   rm -rf conftest*
16014   eval "ac_cv_header_$ac_safe=no"
16015 fi
16016 rm -f conftest*
16017 fi
16018 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16019   echo "$ac_t""yes" 1>&6
16020     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16021   cat >> confdefs.h <<EOF
16022 #define $ac_tr_hdr 1
16023 EOF
16024  
16025 else
16026   echo "$ac_t""no" 1>&6
16027 fi
16028 done
16029
16030         for ac_hdr in lwp/lwp.h
16031 do
16032 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16033 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16034 echo "configure:16035: checking for $ac_hdr" >&5
16035 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16036   echo $ac_n "(cached) $ac_c" 1>&6
16037 else
16038   cat > conftest.$ac_ext <<EOF
16039 #line 16040 "configure"
16040 #include "confdefs.h"
16041 #include <$ac_hdr>
16042 EOF
16043 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16044 { (eval echo configure:16045: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16045 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16046 if test -z "$ac_err"; then
16047   rm -rf conftest*
16048   eval "ac_cv_header_$ac_safe=yes"
16049 else
16050   echo "$ac_err" >&5
16051   echo "configure: failed program was:" >&5
16052   cat conftest.$ac_ext >&5
16053   rm -rf conftest*
16054   eval "ac_cv_header_$ac_safe=no"
16055 fi
16056 rm -f conftest*
16057 fi
16058 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16059   echo "$ac_t""yes" 1>&6
16060     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16061   cat >> confdefs.h <<EOF
16062 #define $ac_tr_hdr 1
16063 EOF
16064  
16065 else
16066   echo "$ac_t""no" 1>&6
16067 fi
16068 done
16069
16070         for ac_hdr in thread.h synch.h
16071 do
16072 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16073 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16074 echo "configure:16075: checking for $ac_hdr" >&5
16075 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16076   echo $ac_n "(cached) $ac_c" 1>&6
16077 else
16078   cat > conftest.$ac_ext <<EOF
16079 #line 16080 "configure"
16080 #include "confdefs.h"
16081 #include <$ac_hdr>
16082 EOF
16083 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16084 { (eval echo configure:16085: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16085 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16086 if test -z "$ac_err"; then
16087   rm -rf conftest*
16088   eval "ac_cv_header_$ac_safe=yes"
16089 else
16090   echo "$ac_err" >&5
16091   echo "configure: failed program was:" >&5
16092   cat conftest.$ac_ext >&5
16093   rm -rf conftest*
16094   eval "ac_cv_header_$ac_safe=no"
16095 fi
16096 rm -f conftest*
16097 fi
16098 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16099   echo "$ac_t""yes" 1>&6
16100     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16101   cat >> confdefs.h <<EOF
16102 #define $ac_tr_hdr 1
16103 EOF
16104  
16105 else
16106   echo "$ac_t""no" 1>&6
16107 fi
16108 done
16109
16110 fi
16111
16112 if test $ol_link_threads != no -a $ol_link_threads != nt ; then  
16113                         cat >> confdefs.h <<\EOF
16114 #define REENTRANT 1
16115 EOF
16116
16117         cat >> confdefs.h <<\EOF
16118 #define _REENTRANT 1
16119 EOF
16120
16121         cat >> confdefs.h <<\EOF
16122 #define THREAD_SAFE 1
16123 EOF
16124
16125         cat >> confdefs.h <<\EOF
16126 #define _THREAD_SAFE 1
16127 EOF
16128
16129         cat >> confdefs.h <<\EOF
16130 #define THREADSAFE 1
16131 EOF
16132
16133         cat >> confdefs.h <<\EOF
16134 #define _THREADSAFE 1
16135 EOF
16136
16137         cat >> confdefs.h <<\EOF
16138 #define _SGI_MP_SOURCE 1
16139 EOF
16140
16141
16142                         echo $ac_n "checking for thread specific errno""... $ac_c" 1>&6
16143 echo "configure:16144: checking for thread specific errno" >&5
16144 if eval "test \"\${ol_cv_errno_thread_specific+set}\" = set"; then
16145   echo $ac_n "(cached) $ac_c" 1>&6
16146 else
16147   
16148                 cat > conftest.$ac_ext <<EOF
16149 #line 16150 "configure"
16150 #include "confdefs.h"
16151 #include <errno.h>
16152 int main() {
16153 errno = 0;
16154 ; return 0; }
16155 EOF
16156 if { (eval echo configure:16157: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16157   rm -rf conftest*
16158   ol_cv_errno_thread_specific=yes
16159 else
16160   echo "configure: failed program was:" >&5
16161   cat conftest.$ac_ext >&5
16162   rm -rf conftest*
16163   ol_cv_errno_thread_specific=no
16164 fi
16165 rm -f conftest*
16166         
16167 fi
16168
16169 echo "$ac_t""$ol_cv_errno_thread_specific" 1>&6
16170
16171                         echo $ac_n "checking for thread specific h_errno""... $ac_c" 1>&6
16172 echo "configure:16173: checking for thread specific h_errno" >&5
16173 if eval "test \"\${ol_cv_h_errno_thread_specific+set}\" = set"; then
16174   echo $ac_n "(cached) $ac_c" 1>&6
16175 else
16176   
16177                 cat > conftest.$ac_ext <<EOF
16178 #line 16179 "configure"
16179 #include "confdefs.h"
16180 #include <netdb.h>
16181 int main() {
16182 h_errno = 0;
16183 ; return 0; }
16184 EOF
16185 if { (eval echo configure:16186: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16186   rm -rf conftest*
16187   ol_cv_h_errno_thread_specific=yes
16188 else
16189   echo "configure: failed program was:" >&5
16190   cat conftest.$ac_ext >&5
16191   rm -rf conftest*
16192   ol_cv_h_errno_thread_specific=no
16193 fi
16194 rm -f conftest*
16195         
16196 fi
16197
16198 echo "$ac_t""$ol_cv_h_errno_thread_specific" 1>&6
16199
16200         if test $ol_cv_errno_thread_specific != yes \
16201                 -o $ol_cv_h_errno_thread_specific != yes ; then
16202                 LIBS="$LTHREAD_LIBS $LIBS"
16203                 LTHREAD_LIBS=""
16204         fi
16205
16206 fi  
16207
16208 if test $ol_link_threads = no ; then
16209         if test $ol_with_threads = yes ; then
16210                 { echo "configure: error: no suitable thread support" 1>&2; exit 1; }
16211         fi
16212
16213         if test $ol_with_threads = auto ; then
16214                 echo "configure: warning: no suitable thread support, disabling threads" 1>&2
16215                 ol_with_threads=no
16216         fi
16217
16218         cat >> confdefs.h <<\EOF
16219 #define NO_THREADS 1
16220 EOF
16221
16222         LTHREAD_LIBS=""
16223 fi
16224
16225 if test $ol_link_threads != no ; then
16226         cat >> confdefs.h <<\EOF
16227 #define LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE 1
16228 EOF
16229
16230 fi
16231
16232 for ac_func in \
16233         ctime_r                 \
16234         gethostbyname_r gethostbyaddr_r \
16235
16236 do
16237 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
16238 echo "configure:16239: checking for $ac_func" >&5
16239 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
16240   echo $ac_n "(cached) $ac_c" 1>&6
16241 else
16242   cat > conftest.$ac_ext <<EOF
16243 #line 16244 "configure"
16244 #include "confdefs.h"
16245 /* System header to define __stub macros and hopefully few prototypes,
16246     which can conflict with char $ac_func(); below.  */
16247 #include <assert.h>
16248 /* Override any gcc2 internal prototype to avoid an error.  */
16249 /* We use char because int might match the return type of a gcc2
16250     builtin and then its argument prototype would still apply.  */
16251 char $ac_func();
16252 char (*f)();
16253
16254 int main() {
16255
16256 /* The GNU C library defines this for functions which it implements
16257     to always fail with ENOSYS.  Some functions are actually named
16258     something starting with __ and the normal name is an alias.  */
16259 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16260 choke me
16261 #else
16262 f = $ac_func;
16263 #endif
16264
16265 ; return 0; }
16266 EOF
16267 if { (eval echo configure:16268: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16268   rm -rf conftest*
16269   eval "ac_cv_func_$ac_func=yes"
16270 else
16271   echo "configure: failed program was:" >&5
16272   cat conftest.$ac_ext >&5
16273   rm -rf conftest*
16274   eval "ac_cv_func_$ac_func=no"
16275 fi
16276 rm -f conftest*
16277 fi
16278
16279 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
16280   echo "$ac_t""yes" 1>&6
16281     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
16282   cat >> confdefs.h <<EOF
16283 #define $ac_tr_func 1
16284 EOF
16285  
16286 else
16287   echo "$ac_t""no" 1>&6
16288 fi
16289 done
16290
16291
16292 if test "$ac_cv_func_ctime_r" = no ; then
16293         ol_cv_func_ctime_r_nargs=0
16294 else
16295         echo $ac_n "checking number of arguments of ctime_r""... $ac_c" 1>&6
16296 echo "configure:16297: checking number of arguments of ctime_r" >&5
16297 if eval "test \"\${ol_cv_func_ctime_r_nargs+set}\" = set"; then
16298   echo $ac_n "(cached) $ac_c" 1>&6
16299 else
16300   cat > conftest.$ac_ext <<EOF
16301 #line 16302 "configure"
16302 #include "confdefs.h"
16303 #include <time.h>
16304 int main() {
16305 time_t ti; char *buffer; ctime_r(&ti,buffer,32);
16306 ; return 0; }
16307 EOF
16308 if { (eval echo configure:16309: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16309   rm -rf conftest*
16310   ol_cv_func_ctime_r_nargs3=yes
16311 else
16312   echo "configure: failed program was:" >&5
16313   cat conftest.$ac_ext >&5
16314   rm -rf conftest*
16315   ol_cv_func_ctime_r_nargs3=no
16316 fi
16317 rm -f conftest*
16318
16319         cat > conftest.$ac_ext <<EOF
16320 #line 16321 "configure"
16321 #include "confdefs.h"
16322 #include <time.h>
16323 int main() {
16324 time_t ti; char *buffer; ctime_r(&ti,buffer);
16325 ; return 0; }
16326 EOF
16327 if { (eval echo configure:16328: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16328   rm -rf conftest*
16329   ol_cv_func_ctime_r_nargs2=yes
16330 else
16331   echo "configure: failed program was:" >&5
16332   cat conftest.$ac_ext >&5
16333   rm -rf conftest*
16334   ol_cv_func_ctime_r_nargs2=no
16335 fi
16336 rm -f conftest*
16337
16338         if test $ol_cv_func_ctime_r_nargs3 = yes -a \
16339                 $ol_cv_func_ctime_r_nargs2 = no ; then
16340
16341                 ol_cv_func_ctime_r_nargs=3
16342
16343         elif test $ol_cv_func_ctime_r_nargs3 = no -a \
16344                 $ol_cv_func_ctime_r_nargs2 = yes ; then
16345
16346                 ol_cv_func_ctime_r_nargs=2
16347
16348         else
16349                 ol_cv_func_ctime_r_nargs=0
16350         fi
16351   
16352 fi
16353
16354 echo "$ac_t""$ol_cv_func_ctime_r_nargs" 1>&6
16355
16356   if test $ol_cv_func_ctime_r_nargs -gt 1 ; then
16357         cat >> confdefs.h <<EOF
16358 #define CTIME_R_NARGS $ol_cv_func_ctime_r_nargs
16359 EOF
16360
16361   fi
16362
16363 fi
16364
16365 if test "$ac_cv_func_gethostbyname_r" = yes ; then
16366         echo $ac_n "checking number of arguments of gethostbyname_r""... $ac_c" 1>&6
16367 echo "configure:16368: checking number of arguments of gethostbyname_r" >&5
16368 if eval "test \"\${ol_cv_func_gethostbyname_r_nargs+set}\" = set"; then
16369   echo $ac_n "(cached) $ac_c" 1>&6
16370 else
16371   cat > conftest.$ac_ext <<EOF
16372 #line 16373 "configure"
16373 #include "confdefs.h"
16374 #include <sys/types.h>
16375 #include <sys/socket.h>
16376 #include <netinet/in.h>
16377 #include <netdb.h>
16378 #define BUFSIZE (sizeof(struct hostent)+10)
16379 int main() {
16380 struct hostent hent; char buffer[BUFSIZE];
16381                 int bufsize=BUFSIZE;int h_errno;
16382                 (void)gethostbyname_r("segovia.cs.purdue.edu", &hent,
16383                         buffer, bufsize, &h_errno);
16384 ; return 0; }
16385 EOF
16386 if { (eval echo configure:16387: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16387   rm -rf conftest*
16388   ol_cv_func_gethostbyname_r_nargs5=yes
16389 else
16390   echo "configure: failed program was:" >&5
16391   cat conftest.$ac_ext >&5
16392   rm -rf conftest*
16393   ol_cv_func_gethostbyname_r_nargs5=no
16394 fi
16395 rm -f conftest*
16396
16397         cat > conftest.$ac_ext <<EOF
16398 #line 16399 "configure"
16399 #include "confdefs.h"
16400 #include <sys/types.h>
16401 #include <sys/socket.h>
16402 #include <netinet/in.h>
16403 #include <netdb.h>
16404 #define BUFSIZE (sizeof(struct hostent)+10)
16405 int main() {
16406 struct hostent hent;struct hostent *rhent;
16407                 char buffer[BUFSIZE];
16408                 int bufsize=BUFSIZE;int h_errno;
16409                 (void)gethostbyname_r("localhost", &hent, buffer, bufsize,
16410                         &rhent, &h_errno);
16411 ; return 0; }
16412 EOF
16413 if { (eval echo configure:16414: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16414   rm -rf conftest*
16415   ol_cv_func_gethostbyname_r_nargs6=yes
16416 else
16417   echo "configure: failed program was:" >&5
16418   cat conftest.$ac_ext >&5
16419   rm -rf conftest*
16420   ol_cv_func_gethostbyname_r_nargs6=no
16421 fi
16422 rm -f conftest*
16423
16424         if test $ol_cv_func_gethostbyname_r_nargs5 = yes -a \
16425                 $ol_cv_func_gethostbyname_r_nargs6 = no ; then
16426
16427                 ol_cv_func_gethostbyname_r_nargs=5
16428
16429         elif test $ol_cv_func_gethostbyname_r_nargs5 = no -a \
16430                 $ol_cv_func_gethostbyname_r_nargs6 = yes ; then
16431
16432                 ol_cv_func_gethostbyname_r_nargs=6
16433
16434         else
16435                 ol_cv_func_gethostbyname_r_nargs=0
16436         fi
16437   
16438 fi
16439
16440 echo "$ac_t""$ol_cv_func_gethostbyname_r_nargs" 1>&6
16441   if test $ol_cv_func_gethostbyname_r_nargs -gt 1 ; then
16442         cat >> confdefs.h <<EOF
16443 #define GETHOSTBYNAME_R_NARGS $ol_cv_func_gethostbyname_r_nargs
16444 EOF
16445
16446   fi
16447
16448 else
16449         ol_cv_func_gethostbyname_r_nargs=0
16450 fi
16451  
16452 if test "$ac_cv_func_gethostbyaddr_r" = yes ; then
16453         echo $ac_n "checking number of arguments of gethostbyaddr_r""... $ac_c" 1>&6
16454 echo "configure:16455: checking number of arguments of gethostbyaddr_r" >&5
16455 if eval "test \"\${ol_cv_func_gethostbyaddr_r_nargs+set}\" = set"; then
16456   echo $ac_n "(cached) $ac_c" 1>&6
16457 else
16458   cat > conftest.$ac_ext <<EOF
16459 #line 16460 "configure"
16460 #include "confdefs.h"
16461 #include <sys/types.h>
16462 #include <sys/socket.h>
16463 #include <netinet/in.h>
16464 #include <netdb.h>
16465 #define BUFSIZE (sizeof(struct hostent)+10)
16466 int main() {
16467 struct hostent hent; char buffer[BUFSIZE]; 
16468             struct in_addr add;
16469             size_t alen=sizeof(struct in_addr);
16470             int bufsize=BUFSIZE;int h_errno;
16471                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
16472                         alen, AF_INET, &hent, buffer, bufsize, &h_errno);
16473 ; return 0; }
16474 EOF
16475 if { (eval echo configure:16476: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16476   rm -rf conftest*
16477   ol_cv_func_gethostbyaddr_r_nargs7=yes
16478 else
16479   echo "configure: failed program was:" >&5
16480   cat conftest.$ac_ext >&5
16481   rm -rf conftest*
16482   ol_cv_func_gethostbyaddr_r_nargs7=no
16483 fi
16484 rm -f conftest*
16485
16486         cat > conftest.$ac_ext <<EOF
16487 #line 16488 "configure"
16488 #include "confdefs.h"
16489 #include <sys/types.h>
16490 #include <sys/socket.h>
16491 #include <netinet/in.h>
16492 #include <netdb.h>
16493 #define BUFSIZE (sizeof(struct hostent)+10)
16494 int main() {
16495 struct hostent hent;
16496                 struct hostent *rhent; char buffer[BUFSIZE]; 
16497                 struct in_addr add;
16498                 size_t alen=sizeof(struct in_addr);
16499                 int bufsize=BUFSIZE;int h_errno;
16500                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
16501                         alen, AF_INET, &hent, buffer, bufsize, 
16502                         &rhent, &h_errno);
16503 ; return 0; }
16504 EOF
16505 if { (eval echo configure:16506: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16506   rm -rf conftest*
16507   ol_cv_func_gethostbyaddr_r_nargs8=yes
16508 else
16509   echo "configure: failed program was:" >&5
16510   cat conftest.$ac_ext >&5
16511   rm -rf conftest*
16512   ol_cv_func_gethostbyaddr_r_nargs8=no
16513 fi
16514 rm -f conftest*
16515
16516         if test $ol_cv_func_gethostbyaddr_r_nargs7 = yes -a \
16517                 $ol_cv_func_gethostbyaddr_r_nargs8 = no ; then
16518
16519                 ol_cv_func_gethostbyaddr_r_nargs=7
16520
16521         elif test $ol_cv_func_gethostbyaddr_r_nargs7 = no -a \
16522                 $ol_cv_func_gethostbyaddr_r_nargs8 = yes ; then
16523
16524                 ol_cv_func_gethostbyaddr_r_nargs=8
16525
16526         else
16527                 ol_cv_func_gethostbyaddr_r_nargs=0
16528         fi
16529   
16530 fi
16531
16532 echo "$ac_t""$ol_cv_func_gethostbyaddr_r_nargs" 1>&6
16533   if test $ol_cv_func_gethostbyaddr_r_nargs -gt 1 ; then
16534     cat >> confdefs.h <<EOF
16535 #define GETHOSTBYADDR_R_NARGS $ol_cv_func_gethostbyaddr_r_nargs
16536 EOF
16537
16538   fi
16539
16540 else
16541         ol_cv_func_gethostbyaddr_r_nargs=0
16542 fi
16543
16544 ol_link_ldbm=no 
16545
16546 if test $ol_with_ldbm_api = auto \
16547         -o $ol_with_ldbm_api = berkeley \
16548         -o $ol_with_ldbm_api = bcompat ; then
16549
16550         if test $ol_with_ldbm_api = bcompat; then \
16551                 for ac_hdr in db_185.h db.h
16552 do
16553 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16554 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16555 echo "configure:16556: checking for $ac_hdr" >&5
16556 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16557   echo $ac_n "(cached) $ac_c" 1>&6
16558 else
16559   cat > conftest.$ac_ext <<EOF
16560 #line 16561 "configure"
16561 #include "confdefs.h"
16562 #include <$ac_hdr>
16563 EOF
16564 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16565 { (eval echo configure:16566: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16566 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16567 if test -z "$ac_err"; then
16568   rm -rf conftest*
16569   eval "ac_cv_header_$ac_safe=yes"
16570 else
16571   echo "$ac_err" >&5
16572   echo "configure: failed program was:" >&5
16573   cat conftest.$ac_ext >&5
16574   rm -rf conftest*
16575   eval "ac_cv_header_$ac_safe=no"
16576 fi
16577 rm -f conftest*
16578 fi
16579 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16580   echo "$ac_t""yes" 1>&6
16581     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16582   cat >> confdefs.h <<EOF
16583 #define $ac_tr_hdr 1
16584 EOF
16585  
16586 else
16587   echo "$ac_t""no" 1>&6
16588 fi
16589 done
16590
16591 if test $ac_cv_header_db_185_h = yes -o $ac_cv_header_db_h = yes; then
16592         echo $ac_n "checking if Berkeley DB header compatibility""... $ac_c" 1>&6
16593 echo "configure:16594: checking if Berkeley DB header compatibility" >&5
16594 if eval "test \"\${ol_cv_header_db1+set}\" = set"; then
16595   echo $ac_n "(cached) $ac_c" 1>&6
16596 else
16597   
16598                 cat > conftest.$ac_ext <<EOF
16599 #line 16600 "configure"
16600 #include "confdefs.h"
16601
16602 #if HAVE_DB_185_H
16603 #       include <db_185.h>
16604 #else
16605 #       include <db.h>
16606 #endif
16607
16608  /* this check could be improved */
16609 #ifndef DB_VERSION_MAJOR
16610 #       define DB_VERSION_MAJOR 1
16611 #endif
16612
16613 #if DB_VERSION_MAJOR == 1 
16614         __db_version_1
16615 #endif
16616
16617 EOF
16618 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16619   egrep "__db_version_1" >/dev/null 2>&1; then
16620   rm -rf conftest*
16621   ol_cv_header_db1=yes
16622 else
16623   rm -rf conftest*
16624   ol_cv_header_db1=no
16625 fi
16626 rm -f conftest*
16627
16628 fi
16629
16630 echo "$ac_t""$ol_cv_header_db1" 1>&6
16631
16632         if test $ol_cv_header_db1 = yes ; then
16633                 ol_cv_lib_db=no
16634 if test $ol_cv_lib_db = no ; then
16635         echo $ac_n "checking for Berkeley DB link (default)""... $ac_c" 1>&6
16636 echo "configure:16637: checking for Berkeley DB link (default)" >&5
16637 if eval "test \"\${ol_cv_db_none+set}\" = set"; then
16638   echo $ac_n "(cached) $ac_c" 1>&6
16639 else
16640   
16641         ol_DB_LIB=
16642         ol_LIBS=$LIBS
16643         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
16644
16645         cat > conftest.$ac_ext <<EOF
16646 #line 16647 "configure"
16647 #include "confdefs.h"
16648
16649 #ifdef HAVE_DB_185_H
16650 # include <db_185.h>
16651 #else
16652 # include <db.h>
16653 #endif
16654
16655 #ifndef DB_VERSION_MAJOR
16656 # define DB_VERSION_MAJOR 1
16657 #endif
16658
16659 #ifndef NULL
16660 #define NULL ((void*)0)
16661 #endif
16662
16663 int main() {
16664
16665 #if DB_VERSION_MAJOR > 1
16666         {
16667                 char *version;
16668                 int major, minor, patch;
16669
16670                 version = db_version( &major, &minor, &patch );
16671
16672                 if( major != DB_VERSION_MAJOR ||
16673                         minor < DB_VERSION_MINOR )
16674                 {
16675                         printf("Berkeley DB version mismatch\n"
16676                                 "\texpected: %s\n\tgot: %s\n",
16677                                 DB_VERSION_STRING, version);
16678                         return 1;
16679                 }
16680         }
16681 #endif
16682
16683 #if DB_VERSION_MAJOR > 2
16684         db_env_create( NULL, 0 );
16685 #elif DB_VERSION_MAJOR > 1
16686         db_appexit( NULL );
16687 #else
16688         (void) dbopen( NULL, 0, 0, 0, NULL);
16689 #endif
16690
16691 ; return 0; }
16692 EOF
16693 if { (eval echo configure:16694: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16694   rm -rf conftest*
16695   ol_cv_db_none=yes
16696 else
16697   echo "configure: failed program was:" >&5
16698   cat conftest.$ac_ext >&5
16699   rm -rf conftest*
16700   ol_cv_db_none=no
16701 fi
16702 rm -f conftest*
16703
16704         LIBS="$ol_LIBS"
16705
16706 fi
16707
16708 echo "$ac_t""$ol_cv_db_none" 1>&6
16709
16710         if test $ol_cv_db_none = yes ; then
16711                 ol_cv_lib_db=yes
16712         fi
16713 fi
16714
16715 if test $ol_cv_lib_db = no ; then
16716         echo $ac_n "checking for Berkeley DB link (-ldb42)""... $ac_c" 1>&6
16717 echo "configure:16718: checking for Berkeley DB link (-ldb42)" >&5
16718 if eval "test \"\${ol_cv_db_db42+set}\" = set"; then
16719   echo $ac_n "(cached) $ac_c" 1>&6
16720 else
16721   
16722         ol_DB_LIB=-ldb42
16723         ol_LIBS=$LIBS
16724         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
16725
16726         cat > conftest.$ac_ext <<EOF
16727 #line 16728 "configure"
16728 #include "confdefs.h"
16729
16730 #ifdef HAVE_DB_185_H
16731 # include <db_185.h>
16732 #else
16733 # include <db.h>
16734 #endif
16735
16736 #ifndef DB_VERSION_MAJOR
16737 # define DB_VERSION_MAJOR 1
16738 #endif
16739
16740 #ifndef NULL
16741 #define NULL ((void*)0)
16742 #endif
16743
16744 int main() {
16745
16746 #if DB_VERSION_MAJOR > 1
16747         {
16748                 char *version;
16749                 int major, minor, patch;
16750
16751                 version = db_version( &major, &minor, &patch );
16752
16753                 if( major != DB_VERSION_MAJOR ||
16754                         minor < DB_VERSION_MINOR )
16755                 {
16756                         printf("Berkeley DB version mismatch\n"
16757                                 "\texpected: %s\n\tgot: %s\n",
16758                                 DB_VERSION_STRING, version);
16759                         return 1;
16760                 }
16761         }
16762 #endif
16763
16764 #if DB_VERSION_MAJOR > 2
16765         db_env_create( NULL, 0 );
16766 #elif DB_VERSION_MAJOR > 1
16767         db_appexit( NULL );
16768 #else
16769         (void) dbopen( NULL, 0, 0, 0, NULL);
16770 #endif
16771
16772 ; return 0; }
16773 EOF
16774 if { (eval echo configure:16775: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16775   rm -rf conftest*
16776   ol_cv_db_db42=yes
16777 else
16778   echo "configure: failed program was:" >&5
16779   cat conftest.$ac_ext >&5
16780   rm -rf conftest*
16781   ol_cv_db_db42=no
16782 fi
16783 rm -f conftest*
16784
16785         LIBS="$ol_LIBS"
16786
16787 fi
16788
16789 echo "$ac_t""$ol_cv_db_db42" 1>&6
16790
16791         if test $ol_cv_db_db42 = yes ; then
16792                 ol_cv_lib_db=-ldb42
16793         fi
16794 fi
16795
16796 if test $ol_cv_lib_db = no ; then
16797         echo $ac_n "checking for Berkeley DB link (-ldb-42)""... $ac_c" 1>&6
16798 echo "configure:16799: checking for Berkeley DB link (-ldb-42)" >&5
16799 if eval "test \"\${ol_cv_db_db_42+set}\" = set"; then
16800   echo $ac_n "(cached) $ac_c" 1>&6
16801 else
16802   
16803         ol_DB_LIB=-ldb-42
16804         ol_LIBS=$LIBS
16805         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
16806
16807         cat > conftest.$ac_ext <<EOF
16808 #line 16809 "configure"
16809 #include "confdefs.h"
16810
16811 #ifdef HAVE_DB_185_H
16812 # include <db_185.h>
16813 #else
16814 # include <db.h>
16815 #endif
16816
16817 #ifndef DB_VERSION_MAJOR
16818 # define DB_VERSION_MAJOR 1
16819 #endif
16820
16821 #ifndef NULL
16822 #define NULL ((void*)0)
16823 #endif
16824
16825 int main() {
16826
16827 #if DB_VERSION_MAJOR > 1
16828         {
16829                 char *version;
16830                 int major, minor, patch;
16831
16832                 version = db_version( &major, &minor, &patch );
16833
16834                 if( major != DB_VERSION_MAJOR ||
16835                         minor < DB_VERSION_MINOR )
16836                 {
16837                         printf("Berkeley DB version mismatch\n"
16838                                 "\texpected: %s\n\tgot: %s\n",
16839                                 DB_VERSION_STRING, version);
16840                         return 1;
16841                 }
16842         }
16843 #endif
16844
16845 #if DB_VERSION_MAJOR > 2
16846         db_env_create( NULL, 0 );
16847 #elif DB_VERSION_MAJOR > 1
16848         db_appexit( NULL );
16849 #else
16850         (void) dbopen( NULL, 0, 0, 0, NULL);
16851 #endif
16852
16853 ; return 0; }
16854 EOF
16855 if { (eval echo configure:16856: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16856   rm -rf conftest*
16857   ol_cv_db_db_42=yes
16858 else
16859   echo "configure: failed program was:" >&5
16860   cat conftest.$ac_ext >&5
16861   rm -rf conftest*
16862   ol_cv_db_db_42=no
16863 fi
16864 rm -f conftest*
16865
16866         LIBS="$ol_LIBS"
16867
16868 fi
16869
16870 echo "$ac_t""$ol_cv_db_db_42" 1>&6
16871
16872         if test $ol_cv_db_db_42 = yes ; then
16873                 ol_cv_lib_db=-ldb-42
16874         fi
16875 fi
16876
16877 if test $ol_cv_lib_db = no ; then
16878         echo $ac_n "checking for Berkeley DB link (-ldb-4.2)""... $ac_c" 1>&6
16879 echo "configure:16880: checking for Berkeley DB link (-ldb-4.2)" >&5
16880 if eval "test \"\${ol_cv_db_db_4_dot_2+set}\" = set"; then
16881   echo $ac_n "(cached) $ac_c" 1>&6
16882 else
16883   
16884         ol_DB_LIB=-ldb-4.2
16885         ol_LIBS=$LIBS
16886         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
16887
16888         cat > conftest.$ac_ext <<EOF
16889 #line 16890 "configure"
16890 #include "confdefs.h"
16891
16892 #ifdef HAVE_DB_185_H
16893 # include <db_185.h>
16894 #else
16895 # include <db.h>
16896 #endif
16897
16898 #ifndef DB_VERSION_MAJOR
16899 # define DB_VERSION_MAJOR 1
16900 #endif
16901
16902 #ifndef NULL
16903 #define NULL ((void*)0)
16904 #endif
16905
16906 int main() {
16907
16908 #if DB_VERSION_MAJOR > 1
16909         {
16910                 char *version;
16911                 int major, minor, patch;
16912
16913                 version = db_version( &major, &minor, &patch );
16914
16915                 if( major != DB_VERSION_MAJOR ||
16916                         minor < DB_VERSION_MINOR )
16917                 {
16918                         printf("Berkeley DB version mismatch\n"
16919                                 "\texpected: %s\n\tgot: %s\n",
16920                                 DB_VERSION_STRING, version);
16921                         return 1;
16922                 }
16923         }
16924 #endif
16925
16926 #if DB_VERSION_MAJOR > 2
16927         db_env_create( NULL, 0 );
16928 #elif DB_VERSION_MAJOR > 1
16929         db_appexit( NULL );
16930 #else
16931         (void) dbopen( NULL, 0, 0, 0, NULL);
16932 #endif
16933
16934 ; return 0; }
16935 EOF
16936 if { (eval echo configure:16937: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16937   rm -rf conftest*
16938   ol_cv_db_db_4_dot_2=yes
16939 else
16940   echo "configure: failed program was:" >&5
16941   cat conftest.$ac_ext >&5
16942   rm -rf conftest*
16943   ol_cv_db_db_4_dot_2=no
16944 fi
16945 rm -f conftest*
16946
16947         LIBS="$ol_LIBS"
16948
16949 fi
16950
16951 echo "$ac_t""$ol_cv_db_db_4_dot_2" 1>&6
16952
16953         if test $ol_cv_db_db_4_dot_2 = yes ; then
16954                 ol_cv_lib_db=-ldb-4.2
16955         fi
16956 fi
16957
16958 if test $ol_cv_lib_db = no ; then
16959         echo $ac_n "checking for Berkeley DB link (-ldb-4-2)""... $ac_c" 1>&6
16960 echo "configure:16961: checking for Berkeley DB link (-ldb-4-2)" >&5
16961 if eval "test \"\${ol_cv_db_db_4_2+set}\" = set"; then
16962   echo $ac_n "(cached) $ac_c" 1>&6
16963 else
16964   
16965         ol_DB_LIB=-ldb-4-2
16966         ol_LIBS=$LIBS
16967         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
16968
16969         cat > conftest.$ac_ext <<EOF
16970 #line 16971 "configure"
16971 #include "confdefs.h"
16972
16973 #ifdef HAVE_DB_185_H
16974 # include <db_185.h>
16975 #else
16976 # include <db.h>
16977 #endif
16978
16979 #ifndef DB_VERSION_MAJOR
16980 # define DB_VERSION_MAJOR 1
16981 #endif
16982
16983 #ifndef NULL
16984 #define NULL ((void*)0)
16985 #endif
16986
16987 int main() {
16988
16989 #if DB_VERSION_MAJOR > 1
16990         {
16991                 char *version;
16992                 int major, minor, patch;
16993
16994                 version = db_version( &major, &minor, &patch );
16995
16996                 if( major != DB_VERSION_MAJOR ||
16997                         minor < DB_VERSION_MINOR )
16998                 {
16999                         printf("Berkeley DB version mismatch\n"
17000                                 "\texpected: %s\n\tgot: %s\n",
17001                                 DB_VERSION_STRING, version);
17002                         return 1;
17003                 }
17004         }
17005 #endif
17006
17007 #if DB_VERSION_MAJOR > 2
17008         db_env_create( NULL, 0 );
17009 #elif DB_VERSION_MAJOR > 1
17010         db_appexit( NULL );
17011 #else
17012         (void) dbopen( NULL, 0, 0, 0, NULL);
17013 #endif
17014
17015 ; return 0; }
17016 EOF
17017 if { (eval echo configure:17018: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17018   rm -rf conftest*
17019   ol_cv_db_db_4_2=yes
17020 else
17021   echo "configure: failed program was:" >&5
17022   cat conftest.$ac_ext >&5
17023   rm -rf conftest*
17024   ol_cv_db_db_4_2=no
17025 fi
17026 rm -f conftest*
17027
17028         LIBS="$ol_LIBS"
17029
17030 fi
17031
17032 echo "$ac_t""$ol_cv_db_db_4_2" 1>&6
17033
17034         if test $ol_cv_db_db_4_2 = yes ; then
17035                 ol_cv_lib_db=-ldb-4-2
17036         fi
17037 fi
17038
17039 if test $ol_cv_lib_db = no ; then
17040         echo $ac_n "checking for Berkeley DB link (-ldb-4)""... $ac_c" 1>&6
17041 echo "configure:17042: checking for Berkeley DB link (-ldb-4)" >&5
17042 if eval "test \"\${ol_cv_db_db_4+set}\" = set"; then
17043   echo $ac_n "(cached) $ac_c" 1>&6
17044 else
17045   
17046         ol_DB_LIB=-ldb-4
17047         ol_LIBS=$LIBS
17048         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17049
17050         cat > conftest.$ac_ext <<EOF
17051 #line 17052 "configure"
17052 #include "confdefs.h"
17053
17054 #ifdef HAVE_DB_185_H
17055 # include <db_185.h>
17056 #else
17057 # include <db.h>
17058 #endif
17059
17060 #ifndef DB_VERSION_MAJOR
17061 # define DB_VERSION_MAJOR 1
17062 #endif
17063
17064 #ifndef NULL
17065 #define NULL ((void*)0)
17066 #endif
17067
17068 int main() {
17069
17070 #if DB_VERSION_MAJOR > 1
17071         {
17072                 char *version;
17073                 int major, minor, patch;
17074
17075                 version = db_version( &major, &minor, &patch );
17076
17077                 if( major != DB_VERSION_MAJOR ||
17078                         minor < DB_VERSION_MINOR )
17079                 {
17080                         printf("Berkeley DB version mismatch\n"
17081                                 "\texpected: %s\n\tgot: %s\n",
17082                                 DB_VERSION_STRING, version);
17083                         return 1;
17084                 }
17085         }
17086 #endif
17087
17088 #if DB_VERSION_MAJOR > 2
17089         db_env_create( NULL, 0 );
17090 #elif DB_VERSION_MAJOR > 1
17091         db_appexit( NULL );
17092 #else
17093         (void) dbopen( NULL, 0, 0, 0, NULL);
17094 #endif
17095
17096 ; return 0; }
17097 EOF
17098 if { (eval echo configure:17099: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17099   rm -rf conftest*
17100   ol_cv_db_db_4=yes
17101 else
17102   echo "configure: failed program was:" >&5
17103   cat conftest.$ac_ext >&5
17104   rm -rf conftest*
17105   ol_cv_db_db_4=no
17106 fi
17107 rm -f conftest*
17108
17109         LIBS="$ol_LIBS"
17110
17111 fi
17112
17113 echo "$ac_t""$ol_cv_db_db_4" 1>&6
17114
17115         if test $ol_cv_db_db_4 = yes ; then
17116                 ol_cv_lib_db=-ldb-4
17117         fi
17118 fi
17119
17120 if test $ol_cv_lib_db = no ; then
17121         echo $ac_n "checking for Berkeley DB link (-ldb4)""... $ac_c" 1>&6
17122 echo "configure:17123: checking for Berkeley DB link (-ldb4)" >&5
17123 if eval "test \"\${ol_cv_db_db4+set}\" = set"; then
17124   echo $ac_n "(cached) $ac_c" 1>&6
17125 else
17126   
17127         ol_DB_LIB=-ldb4
17128         ol_LIBS=$LIBS
17129         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17130
17131         cat > conftest.$ac_ext <<EOF
17132 #line 17133 "configure"
17133 #include "confdefs.h"
17134
17135 #ifdef HAVE_DB_185_H
17136 # include <db_185.h>
17137 #else
17138 # include <db.h>
17139 #endif
17140
17141 #ifndef DB_VERSION_MAJOR
17142 # define DB_VERSION_MAJOR 1
17143 #endif
17144
17145 #ifndef NULL
17146 #define NULL ((void*)0)
17147 #endif
17148
17149 int main() {
17150
17151 #if DB_VERSION_MAJOR > 1
17152         {
17153                 char *version;
17154                 int major, minor, patch;
17155
17156                 version = db_version( &major, &minor, &patch );
17157
17158                 if( major != DB_VERSION_MAJOR ||
17159                         minor < DB_VERSION_MINOR )
17160                 {
17161                         printf("Berkeley DB version mismatch\n"
17162                                 "\texpected: %s\n\tgot: %s\n",
17163                                 DB_VERSION_STRING, version);
17164                         return 1;
17165                 }
17166         }
17167 #endif
17168
17169 #if DB_VERSION_MAJOR > 2
17170         db_env_create( NULL, 0 );
17171 #elif DB_VERSION_MAJOR > 1
17172         db_appexit( NULL );
17173 #else
17174         (void) dbopen( NULL, 0, 0, 0, NULL);
17175 #endif
17176
17177 ; return 0; }
17178 EOF
17179 if { (eval echo configure:17180: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17180   rm -rf conftest*
17181   ol_cv_db_db4=yes
17182 else
17183   echo "configure: failed program was:" >&5
17184   cat conftest.$ac_ext >&5
17185   rm -rf conftest*
17186   ol_cv_db_db4=no
17187 fi
17188 rm -f conftest*
17189
17190         LIBS="$ol_LIBS"
17191
17192 fi
17193
17194 echo "$ac_t""$ol_cv_db_db4" 1>&6
17195
17196         if test $ol_cv_db_db4 = yes ; then
17197                 ol_cv_lib_db=-ldb4
17198         fi
17199 fi
17200
17201 if test $ol_cv_lib_db = no ; then
17202         echo $ac_n "checking for Berkeley DB link (-ldb41)""... $ac_c" 1>&6
17203 echo "configure:17204: checking for Berkeley DB link (-ldb41)" >&5
17204 if eval "test \"\${ol_cv_db_db41+set}\" = set"; then
17205   echo $ac_n "(cached) $ac_c" 1>&6
17206 else
17207   
17208         ol_DB_LIB=-ldb41
17209         ol_LIBS=$LIBS
17210         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17211
17212         cat > conftest.$ac_ext <<EOF
17213 #line 17214 "configure"
17214 #include "confdefs.h"
17215
17216 #ifdef HAVE_DB_185_H
17217 # include <db_185.h>
17218 #else
17219 # include <db.h>
17220 #endif
17221
17222 #ifndef DB_VERSION_MAJOR
17223 # define DB_VERSION_MAJOR 1
17224 #endif
17225
17226 #ifndef NULL
17227 #define NULL ((void*)0)
17228 #endif
17229
17230 int main() {
17231
17232 #if DB_VERSION_MAJOR > 1
17233         {
17234                 char *version;
17235                 int major, minor, patch;
17236
17237                 version = db_version( &major, &minor, &patch );
17238
17239                 if( major != DB_VERSION_MAJOR ||
17240                         minor < DB_VERSION_MINOR )
17241                 {
17242                         printf("Berkeley DB version mismatch\n"
17243                                 "\texpected: %s\n\tgot: %s\n",
17244                                 DB_VERSION_STRING, version);
17245                         return 1;
17246                 }
17247         }
17248 #endif
17249
17250 #if DB_VERSION_MAJOR > 2
17251         db_env_create( NULL, 0 );
17252 #elif DB_VERSION_MAJOR > 1
17253         db_appexit( NULL );
17254 #else
17255         (void) dbopen( NULL, 0, 0, 0, NULL);
17256 #endif
17257
17258 ; return 0; }
17259 EOF
17260 if { (eval echo configure:17261: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17261   rm -rf conftest*
17262   ol_cv_db_db41=yes
17263 else
17264   echo "configure: failed program was:" >&5
17265   cat conftest.$ac_ext >&5
17266   rm -rf conftest*
17267   ol_cv_db_db41=no
17268 fi
17269 rm -f conftest*
17270
17271         LIBS="$ol_LIBS"
17272
17273 fi
17274
17275 echo "$ac_t""$ol_cv_db_db41" 1>&6
17276
17277         if test $ol_cv_db_db41 = yes ; then
17278                 ol_cv_lib_db=-ldb41
17279         fi
17280 fi
17281
17282 if test $ol_cv_lib_db = no ; then
17283         echo $ac_n "checking for Berkeley DB link (-ldb-41)""... $ac_c" 1>&6
17284 echo "configure:17285: checking for Berkeley DB link (-ldb-41)" >&5
17285 if eval "test \"\${ol_cv_db_db_41+set}\" = set"; then
17286   echo $ac_n "(cached) $ac_c" 1>&6
17287 else
17288   
17289         ol_DB_LIB=-ldb-41
17290         ol_LIBS=$LIBS
17291         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17292
17293         cat > conftest.$ac_ext <<EOF
17294 #line 17295 "configure"
17295 #include "confdefs.h"
17296
17297 #ifdef HAVE_DB_185_H
17298 # include <db_185.h>
17299 #else
17300 # include <db.h>
17301 #endif
17302
17303 #ifndef DB_VERSION_MAJOR
17304 # define DB_VERSION_MAJOR 1
17305 #endif
17306
17307 #ifndef NULL
17308 #define NULL ((void*)0)
17309 #endif
17310
17311 int main() {
17312
17313 #if DB_VERSION_MAJOR > 1
17314         {
17315                 char *version;
17316                 int major, minor, patch;
17317
17318                 version = db_version( &major, &minor, &patch );
17319
17320                 if( major != DB_VERSION_MAJOR ||
17321                         minor < DB_VERSION_MINOR )
17322                 {
17323                         printf("Berkeley DB version mismatch\n"
17324                                 "\texpected: %s\n\tgot: %s\n",
17325                                 DB_VERSION_STRING, version);
17326                         return 1;
17327                 }
17328         }
17329 #endif
17330
17331 #if DB_VERSION_MAJOR > 2
17332         db_env_create( NULL, 0 );
17333 #elif DB_VERSION_MAJOR > 1
17334         db_appexit( NULL );
17335 #else
17336         (void) dbopen( NULL, 0, 0, 0, NULL);
17337 #endif
17338
17339 ; return 0; }
17340 EOF
17341 if { (eval echo configure:17342: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17342   rm -rf conftest*
17343   ol_cv_db_db_41=yes
17344 else
17345   echo "configure: failed program was:" >&5
17346   cat conftest.$ac_ext >&5
17347   rm -rf conftest*
17348   ol_cv_db_db_41=no
17349 fi
17350 rm -f conftest*
17351
17352         LIBS="$ol_LIBS"
17353
17354 fi
17355
17356 echo "$ac_t""$ol_cv_db_db_41" 1>&6
17357
17358         if test $ol_cv_db_db_41 = yes ; then
17359                 ol_cv_lib_db=-ldb-41
17360         fi
17361 fi
17362
17363 if test $ol_cv_lib_db = no ; then
17364         echo $ac_n "checking for Berkeley DB link (-ldb-4.1)""... $ac_c" 1>&6
17365 echo "configure:17366: checking for Berkeley DB link (-ldb-4.1)" >&5
17366 if eval "test \"\${ol_cv_db_db_4_dot_1+set}\" = set"; then
17367   echo $ac_n "(cached) $ac_c" 1>&6
17368 else
17369   
17370         ol_DB_LIB=-ldb-4.1
17371         ol_LIBS=$LIBS
17372         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17373
17374         cat > conftest.$ac_ext <<EOF
17375 #line 17376 "configure"
17376 #include "confdefs.h"
17377
17378 #ifdef HAVE_DB_185_H
17379 # include <db_185.h>
17380 #else
17381 # include <db.h>
17382 #endif
17383
17384 #ifndef DB_VERSION_MAJOR
17385 # define DB_VERSION_MAJOR 1
17386 #endif
17387
17388 #ifndef NULL
17389 #define NULL ((void*)0)
17390 #endif
17391
17392 int main() {
17393
17394 #if DB_VERSION_MAJOR > 1
17395         {
17396                 char *version;
17397                 int major, minor, patch;
17398
17399                 version = db_version( &major, &minor, &patch );
17400
17401                 if( major != DB_VERSION_MAJOR ||
17402                         minor < DB_VERSION_MINOR )
17403                 {
17404                         printf("Berkeley DB version mismatch\n"
17405                                 "\texpected: %s\n\tgot: %s\n",
17406                                 DB_VERSION_STRING, version);
17407                         return 1;
17408                 }
17409         }
17410 #endif
17411
17412 #if DB_VERSION_MAJOR > 2
17413         db_env_create( NULL, 0 );
17414 #elif DB_VERSION_MAJOR > 1
17415         db_appexit( NULL );
17416 #else
17417         (void) dbopen( NULL, 0, 0, 0, NULL);
17418 #endif
17419
17420 ; return 0; }
17421 EOF
17422 if { (eval echo configure:17423: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17423   rm -rf conftest*
17424   ol_cv_db_db_4_dot_1=yes
17425 else
17426   echo "configure: failed program was:" >&5
17427   cat conftest.$ac_ext >&5
17428   rm -rf conftest*
17429   ol_cv_db_db_4_dot_1=no
17430 fi
17431 rm -f conftest*
17432
17433         LIBS="$ol_LIBS"
17434
17435 fi
17436
17437 echo "$ac_t""$ol_cv_db_db_4_dot_1" 1>&6
17438
17439         if test $ol_cv_db_db_4_dot_1 = yes ; then
17440                 ol_cv_lib_db=-ldb-4.1
17441         fi
17442 fi
17443
17444 if test $ol_cv_lib_db = no ; then
17445         echo $ac_n "checking for Berkeley DB link (-ldb-4-1)""... $ac_c" 1>&6
17446 echo "configure:17447: checking for Berkeley DB link (-ldb-4-1)" >&5
17447 if eval "test \"\${ol_cv_db_db_4_1+set}\" = set"; then
17448   echo $ac_n "(cached) $ac_c" 1>&6
17449 else
17450   
17451         ol_DB_LIB=-ldb-4-1
17452         ol_LIBS=$LIBS
17453         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17454
17455         cat > conftest.$ac_ext <<EOF
17456 #line 17457 "configure"
17457 #include "confdefs.h"
17458
17459 #ifdef HAVE_DB_185_H
17460 # include <db_185.h>
17461 #else
17462 # include <db.h>
17463 #endif
17464
17465 #ifndef DB_VERSION_MAJOR
17466 # define DB_VERSION_MAJOR 1
17467 #endif
17468
17469 #ifndef NULL
17470 #define NULL ((void*)0)
17471 #endif
17472
17473 int main() {
17474
17475 #if DB_VERSION_MAJOR > 1
17476         {
17477                 char *version;
17478                 int major, minor, patch;
17479
17480                 version = db_version( &major, &minor, &patch );
17481
17482                 if( major != DB_VERSION_MAJOR ||
17483                         minor < DB_VERSION_MINOR )
17484                 {
17485                         printf("Berkeley DB version mismatch\n"
17486                                 "\texpected: %s\n\tgot: %s\n",
17487                                 DB_VERSION_STRING, version);
17488                         return 1;
17489                 }
17490         }
17491 #endif
17492
17493 #if DB_VERSION_MAJOR > 2
17494         db_env_create( NULL, 0 );
17495 #elif DB_VERSION_MAJOR > 1
17496         db_appexit( NULL );
17497 #else
17498         (void) dbopen( NULL, 0, 0, 0, NULL);
17499 #endif
17500
17501 ; return 0; }
17502 EOF
17503 if { (eval echo configure:17504: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17504   rm -rf conftest*
17505   ol_cv_db_db_4_1=yes
17506 else
17507   echo "configure: failed program was:" >&5
17508   cat conftest.$ac_ext >&5
17509   rm -rf conftest*
17510   ol_cv_db_db_4_1=no
17511 fi
17512 rm -f conftest*
17513
17514         LIBS="$ol_LIBS"
17515
17516 fi
17517
17518 echo "$ac_t""$ol_cv_db_db_4_1" 1>&6
17519
17520         if test $ol_cv_db_db_4_1 = yes ; then
17521                 ol_cv_lib_db=-ldb-4-1
17522         fi
17523 fi
17524
17525 if test $ol_cv_lib_db = no ; then
17526         echo $ac_n "checking for Berkeley DB link (-ldb-4)""... $ac_c" 1>&6
17527 echo "configure:17528: checking for Berkeley DB link (-ldb-4)" >&5
17528 if eval "test \"\${ol_cv_db_db_4+set}\" = set"; then
17529   echo $ac_n "(cached) $ac_c" 1>&6
17530 else
17531   
17532         ol_DB_LIB=-ldb-4
17533         ol_LIBS=$LIBS
17534         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17535
17536         cat > conftest.$ac_ext <<EOF
17537 #line 17538 "configure"
17538 #include "confdefs.h"
17539
17540 #ifdef HAVE_DB_185_H
17541 # include <db_185.h>
17542 #else
17543 # include <db.h>
17544 #endif
17545
17546 #ifndef DB_VERSION_MAJOR
17547 # define DB_VERSION_MAJOR 1
17548 #endif
17549
17550 #ifndef NULL
17551 #define NULL ((void*)0)
17552 #endif
17553
17554 int main() {
17555
17556 #if DB_VERSION_MAJOR > 1
17557         {
17558                 char *version;
17559                 int major, minor, patch;
17560
17561                 version = db_version( &major, &minor, &patch );
17562
17563                 if( major != DB_VERSION_MAJOR ||
17564                         minor < DB_VERSION_MINOR )
17565                 {
17566                         printf("Berkeley DB version mismatch\n"
17567                                 "\texpected: %s\n\tgot: %s\n",
17568                                 DB_VERSION_STRING, version);
17569                         return 1;
17570                 }
17571         }
17572 #endif
17573
17574 #if DB_VERSION_MAJOR > 2
17575         db_env_create( NULL, 0 );
17576 #elif DB_VERSION_MAJOR > 1
17577         db_appexit( NULL );
17578 #else
17579         (void) dbopen( NULL, 0, 0, 0, NULL);
17580 #endif
17581
17582 ; return 0; }
17583 EOF
17584 if { (eval echo configure:17585: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17585   rm -rf conftest*
17586   ol_cv_db_db_4=yes
17587 else
17588   echo "configure: failed program was:" >&5
17589   cat conftest.$ac_ext >&5
17590   rm -rf conftest*
17591   ol_cv_db_db_4=no
17592 fi
17593 rm -f conftest*
17594
17595         LIBS="$ol_LIBS"
17596
17597 fi
17598
17599 echo "$ac_t""$ol_cv_db_db_4" 1>&6
17600
17601         if test $ol_cv_db_db_4 = yes ; then
17602                 ol_cv_lib_db=-ldb-4
17603         fi
17604 fi
17605
17606 if test $ol_cv_lib_db = no ; then
17607         echo $ac_n "checking for Berkeley DB link (-ldb)""... $ac_c" 1>&6
17608 echo "configure:17609: checking for Berkeley DB link (-ldb)" >&5
17609 if eval "test \"\${ol_cv_db_db+set}\" = set"; then
17610   echo $ac_n "(cached) $ac_c" 1>&6
17611 else
17612   
17613         ol_DB_LIB=-ldb
17614         ol_LIBS=$LIBS
17615         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17616
17617         cat > conftest.$ac_ext <<EOF
17618 #line 17619 "configure"
17619 #include "confdefs.h"
17620
17621 #ifdef HAVE_DB_185_H
17622 # include <db_185.h>
17623 #else
17624 # include <db.h>
17625 #endif
17626
17627 #ifndef DB_VERSION_MAJOR
17628 # define DB_VERSION_MAJOR 1
17629 #endif
17630
17631 #ifndef NULL
17632 #define NULL ((void*)0)
17633 #endif
17634
17635 int main() {
17636
17637 #if DB_VERSION_MAJOR > 1
17638         {
17639                 char *version;
17640                 int major, minor, patch;
17641
17642                 version = db_version( &major, &minor, &patch );
17643
17644                 if( major != DB_VERSION_MAJOR ||
17645                         minor < DB_VERSION_MINOR )
17646                 {
17647                         printf("Berkeley DB version mismatch\n"
17648                                 "\texpected: %s\n\tgot: %s\n",
17649                                 DB_VERSION_STRING, version);
17650                         return 1;
17651                 }
17652         }
17653 #endif
17654
17655 #if DB_VERSION_MAJOR > 2
17656         db_env_create( NULL, 0 );
17657 #elif DB_VERSION_MAJOR > 1
17658         db_appexit( NULL );
17659 #else
17660         (void) dbopen( NULL, 0, 0, 0, NULL);
17661 #endif
17662
17663 ; return 0; }
17664 EOF
17665 if { (eval echo configure:17666: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17666   rm -rf conftest*
17667   ol_cv_db_db=yes
17668 else
17669   echo "configure: failed program was:" >&5
17670   cat conftest.$ac_ext >&5
17671   rm -rf conftest*
17672   ol_cv_db_db=no
17673 fi
17674 rm -f conftest*
17675
17676         LIBS="$ol_LIBS"
17677
17678 fi
17679
17680 echo "$ac_t""$ol_cv_db_db" 1>&6
17681
17682         if test $ol_cv_db_db = yes ; then
17683                 ol_cv_lib_db=-ldb
17684         fi
17685 fi
17686
17687 if test $ol_cv_lib_db = no ; then
17688         echo $ac_n "checking for Berkeley DB link (-ldb3)""... $ac_c" 1>&6
17689 echo "configure:17690: checking for Berkeley DB link (-ldb3)" >&5
17690 if eval "test \"\${ol_cv_db_db3+set}\" = set"; then
17691   echo $ac_n "(cached) $ac_c" 1>&6
17692 else
17693   
17694         ol_DB_LIB=-ldb3
17695         ol_LIBS=$LIBS
17696         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17697
17698         cat > conftest.$ac_ext <<EOF
17699 #line 17700 "configure"
17700 #include "confdefs.h"
17701
17702 #ifdef HAVE_DB_185_H
17703 # include <db_185.h>
17704 #else
17705 # include <db.h>
17706 #endif
17707
17708 #ifndef DB_VERSION_MAJOR
17709 # define DB_VERSION_MAJOR 1
17710 #endif
17711
17712 #ifndef NULL
17713 #define NULL ((void*)0)
17714 #endif
17715
17716 int main() {
17717
17718 #if DB_VERSION_MAJOR > 1
17719         {
17720                 char *version;
17721                 int major, minor, patch;
17722
17723                 version = db_version( &major, &minor, &patch );
17724
17725                 if( major != DB_VERSION_MAJOR ||
17726                         minor < DB_VERSION_MINOR )
17727                 {
17728                         printf("Berkeley DB version mismatch\n"
17729                                 "\texpected: %s\n\tgot: %s\n",
17730                                 DB_VERSION_STRING, version);
17731                         return 1;
17732                 }
17733         }
17734 #endif
17735
17736 #if DB_VERSION_MAJOR > 2
17737         db_env_create( NULL, 0 );
17738 #elif DB_VERSION_MAJOR > 1
17739         db_appexit( NULL );
17740 #else
17741         (void) dbopen( NULL, 0, 0, 0, NULL);
17742 #endif
17743
17744 ; return 0; }
17745 EOF
17746 if { (eval echo configure:17747: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17747   rm -rf conftest*
17748   ol_cv_db_db3=yes
17749 else
17750   echo "configure: failed program was:" >&5
17751   cat conftest.$ac_ext >&5
17752   rm -rf conftest*
17753   ol_cv_db_db3=no
17754 fi
17755 rm -f conftest*
17756
17757         LIBS="$ol_LIBS"
17758
17759 fi
17760
17761 echo "$ac_t""$ol_cv_db_db3" 1>&6
17762
17763         if test $ol_cv_db_db3 = yes ; then
17764                 ol_cv_lib_db=-ldb3
17765         fi
17766 fi
17767
17768 if test $ol_cv_lib_db = no ; then
17769         echo $ac_n "checking for Berkeley DB link (-ldb-3)""... $ac_c" 1>&6
17770 echo "configure:17771: checking for Berkeley DB link (-ldb-3)" >&5
17771 if eval "test \"\${ol_cv_db_db_3+set}\" = set"; then
17772   echo $ac_n "(cached) $ac_c" 1>&6
17773 else
17774   
17775         ol_DB_LIB=-ldb-3
17776         ol_LIBS=$LIBS
17777         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17778
17779         cat > conftest.$ac_ext <<EOF
17780 #line 17781 "configure"
17781 #include "confdefs.h"
17782
17783 #ifdef HAVE_DB_185_H
17784 # include <db_185.h>
17785 #else
17786 # include <db.h>
17787 #endif
17788
17789 #ifndef DB_VERSION_MAJOR
17790 # define DB_VERSION_MAJOR 1
17791 #endif
17792
17793 #ifndef NULL
17794 #define NULL ((void*)0)
17795 #endif
17796
17797 int main() {
17798
17799 #if DB_VERSION_MAJOR > 1
17800         {
17801                 char *version;
17802                 int major, minor, patch;
17803
17804                 version = db_version( &major, &minor, &patch );
17805
17806                 if( major != DB_VERSION_MAJOR ||
17807                         minor < DB_VERSION_MINOR )
17808                 {
17809                         printf("Berkeley DB version mismatch\n"
17810                                 "\texpected: %s\n\tgot: %s\n",
17811                                 DB_VERSION_STRING, version);
17812                         return 1;
17813                 }
17814         }
17815 #endif
17816
17817 #if DB_VERSION_MAJOR > 2
17818         db_env_create( NULL, 0 );
17819 #elif DB_VERSION_MAJOR > 1
17820         db_appexit( NULL );
17821 #else
17822         (void) dbopen( NULL, 0, 0, 0, NULL);
17823 #endif
17824
17825 ; return 0; }
17826 EOF
17827 if { (eval echo configure:17828: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17828   rm -rf conftest*
17829   ol_cv_db_db_3=yes
17830 else
17831   echo "configure: failed program was:" >&5
17832   cat conftest.$ac_ext >&5
17833   rm -rf conftest*
17834   ol_cv_db_db_3=no
17835 fi
17836 rm -f conftest*
17837
17838         LIBS="$ol_LIBS"
17839
17840 fi
17841
17842 echo "$ac_t""$ol_cv_db_db_3" 1>&6
17843
17844         if test $ol_cv_db_db_3 = yes ; then
17845                 ol_cv_lib_db=-ldb-3
17846         fi
17847 fi
17848
17849 if test $ol_cv_lib_db = no ; then
17850         echo $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6
17851 echo "configure:17852: checking for Berkeley DB link (-ldb2)" >&5
17852 if eval "test \"\${ol_cv_db_db2+set}\" = set"; then
17853   echo $ac_n "(cached) $ac_c" 1>&6
17854 else
17855   
17856         ol_DB_LIB=-ldb2
17857         ol_LIBS=$LIBS
17858         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17859
17860         cat > conftest.$ac_ext <<EOF
17861 #line 17862 "configure"
17862 #include "confdefs.h"
17863
17864 #ifdef HAVE_DB_185_H
17865 # include <db_185.h>
17866 #else
17867 # include <db.h>
17868 #endif
17869
17870 #ifndef DB_VERSION_MAJOR
17871 # define DB_VERSION_MAJOR 1
17872 #endif
17873
17874 #ifndef NULL
17875 #define NULL ((void*)0)
17876 #endif
17877
17878 int main() {
17879
17880 #if DB_VERSION_MAJOR > 1
17881         {
17882                 char *version;
17883                 int major, minor, patch;
17884
17885                 version = db_version( &major, &minor, &patch );
17886
17887                 if( major != DB_VERSION_MAJOR ||
17888                         minor < DB_VERSION_MINOR )
17889                 {
17890                         printf("Berkeley DB version mismatch\n"
17891                                 "\texpected: %s\n\tgot: %s\n",
17892                                 DB_VERSION_STRING, version);
17893                         return 1;
17894                 }
17895         }
17896 #endif
17897
17898 #if DB_VERSION_MAJOR > 2
17899         db_env_create( NULL, 0 );
17900 #elif DB_VERSION_MAJOR > 1
17901         db_appexit( NULL );
17902 #else
17903         (void) dbopen( NULL, 0, 0, 0, NULL);
17904 #endif
17905
17906 ; return 0; }
17907 EOF
17908 if { (eval echo configure:17909: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17909   rm -rf conftest*
17910   ol_cv_db_db2=yes
17911 else
17912   echo "configure: failed program was:" >&5
17913   cat conftest.$ac_ext >&5
17914   rm -rf conftest*
17915   ol_cv_db_db2=no
17916 fi
17917 rm -f conftest*
17918
17919         LIBS="$ol_LIBS"
17920
17921 fi
17922
17923 echo "$ac_t""$ol_cv_db_db2" 1>&6
17924
17925         if test $ol_cv_db_db2 = yes ; then
17926                 ol_cv_lib_db=-ldb2
17927         fi
17928 fi
17929
17930 if test $ol_cv_lib_db = no ; then
17931         echo $ac_n "checking for Berkeley DB link (-ldb-2)""... $ac_c" 1>&6
17932 echo "configure:17933: checking for Berkeley DB link (-ldb-2)" >&5
17933 if eval "test \"\${ol_cv_db_db_2+set}\" = set"; then
17934   echo $ac_n "(cached) $ac_c" 1>&6
17935 else
17936   
17937         ol_DB_LIB=-ldb-2
17938         ol_LIBS=$LIBS
17939         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17940
17941         cat > conftest.$ac_ext <<EOF
17942 #line 17943 "configure"
17943 #include "confdefs.h"
17944
17945 #ifdef HAVE_DB_185_H
17946 # include <db_185.h>
17947 #else
17948 # include <db.h>
17949 #endif
17950
17951 #ifndef DB_VERSION_MAJOR
17952 # define DB_VERSION_MAJOR 1
17953 #endif
17954
17955 #ifndef NULL
17956 #define NULL ((void*)0)
17957 #endif
17958
17959 int main() {
17960
17961 #if DB_VERSION_MAJOR > 1
17962         {
17963                 char *version;
17964                 int major, minor, patch;
17965
17966                 version = db_version( &major, &minor, &patch );
17967
17968                 if( major != DB_VERSION_MAJOR ||
17969                         minor < DB_VERSION_MINOR )
17970                 {
17971                         printf("Berkeley DB version mismatch\n"
17972                                 "\texpected: %s\n\tgot: %s\n",
17973                                 DB_VERSION_STRING, version);
17974                         return 1;
17975                 }
17976         }
17977 #endif
17978
17979 #if DB_VERSION_MAJOR > 2
17980         db_env_create( NULL, 0 );
17981 #elif DB_VERSION_MAJOR > 1
17982         db_appexit( NULL );
17983 #else
17984         (void) dbopen( NULL, 0, 0, 0, NULL);
17985 #endif
17986
17987 ; return 0; }
17988 EOF
17989 if { (eval echo configure:17990: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17990   rm -rf conftest*
17991   ol_cv_db_db_2=yes
17992 else
17993   echo "configure: failed program was:" >&5
17994   cat conftest.$ac_ext >&5
17995   rm -rf conftest*
17996   ol_cv_db_db_2=no
17997 fi
17998 rm -f conftest*
17999
18000         LIBS="$ol_LIBS"
18001
18002 fi
18003
18004 echo "$ac_t""$ol_cv_db_db_2" 1>&6
18005
18006         if test $ol_cv_db_db_2 = yes ; then
18007                 ol_cv_lib_db=-ldb-2
18008         fi
18009 fi
18010
18011 if test $ol_cv_lib_db = no ; then
18012         echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6
18013 echo "configure:18014: checking for Berkeley DB link (-ldb1)" >&5
18014 if eval "test \"\${ol_cv_db_db1+set}\" = set"; then
18015   echo $ac_n "(cached) $ac_c" 1>&6
18016 else
18017   
18018         ol_DB_LIB=-ldb1
18019         ol_LIBS=$LIBS
18020         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18021
18022         cat > conftest.$ac_ext <<EOF
18023 #line 18024 "configure"
18024 #include "confdefs.h"
18025
18026 #ifdef HAVE_DB_185_H
18027 # include <db_185.h>
18028 #else
18029 # include <db.h>
18030 #endif
18031
18032 #ifndef DB_VERSION_MAJOR
18033 # define DB_VERSION_MAJOR 1
18034 #endif
18035
18036 #ifndef NULL
18037 #define NULL ((void*)0)
18038 #endif
18039
18040 int main() {
18041
18042 #if DB_VERSION_MAJOR > 1
18043         {
18044                 char *version;
18045                 int major, minor, patch;
18046
18047                 version = db_version( &major, &minor, &patch );
18048
18049                 if( major != DB_VERSION_MAJOR ||
18050                         minor < DB_VERSION_MINOR )
18051                 {
18052                         printf("Berkeley DB version mismatch\n"
18053                                 "\texpected: %s\n\tgot: %s\n",
18054                                 DB_VERSION_STRING, version);
18055                         return 1;
18056                 }
18057         }
18058 #endif
18059
18060 #if DB_VERSION_MAJOR > 2
18061         db_env_create( NULL, 0 );
18062 #elif DB_VERSION_MAJOR > 1
18063         db_appexit( NULL );
18064 #else
18065         (void) dbopen( NULL, 0, 0, 0, NULL);
18066 #endif
18067
18068 ; return 0; }
18069 EOF
18070 if { (eval echo configure:18071: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18071   rm -rf conftest*
18072   ol_cv_db_db1=yes
18073 else
18074   echo "configure: failed program was:" >&5
18075   cat conftest.$ac_ext >&5
18076   rm -rf conftest*
18077   ol_cv_db_db1=no
18078 fi
18079 rm -f conftest*
18080
18081         LIBS="$ol_LIBS"
18082
18083 fi
18084
18085 echo "$ac_t""$ol_cv_db_db1" 1>&6
18086
18087         if test $ol_cv_db_db1 = yes ; then
18088                 ol_cv_lib_db=-ldb1
18089         fi
18090 fi
18091
18092 if test $ol_cv_lib_db = no ; then
18093         echo $ac_n "checking for Berkeley DB link (-ldb-1)""... $ac_c" 1>&6
18094 echo "configure:18095: checking for Berkeley DB link (-ldb-1)" >&5
18095 if eval "test \"\${ol_cv_db_db_1+set}\" = set"; then
18096   echo $ac_n "(cached) $ac_c" 1>&6
18097 else
18098   
18099         ol_DB_LIB=-ldb-1
18100         ol_LIBS=$LIBS
18101         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18102
18103         cat > conftest.$ac_ext <<EOF
18104 #line 18105 "configure"
18105 #include "confdefs.h"
18106
18107 #ifdef HAVE_DB_185_H
18108 # include <db_185.h>
18109 #else
18110 # include <db.h>
18111 #endif
18112
18113 #ifndef DB_VERSION_MAJOR
18114 # define DB_VERSION_MAJOR 1
18115 #endif
18116
18117 #ifndef NULL
18118 #define NULL ((void*)0)
18119 #endif
18120
18121 int main() {
18122
18123 #if DB_VERSION_MAJOR > 1
18124         {
18125                 char *version;
18126                 int major, minor, patch;
18127
18128                 version = db_version( &major, &minor, &patch );
18129
18130                 if( major != DB_VERSION_MAJOR ||
18131                         minor < DB_VERSION_MINOR )
18132                 {
18133                         printf("Berkeley DB version mismatch\n"
18134                                 "\texpected: %s\n\tgot: %s\n",
18135                                 DB_VERSION_STRING, version);
18136                         return 1;
18137                 }
18138         }
18139 #endif
18140
18141 #if DB_VERSION_MAJOR > 2
18142         db_env_create( NULL, 0 );
18143 #elif DB_VERSION_MAJOR > 1
18144         db_appexit( NULL );
18145 #else
18146         (void) dbopen( NULL, 0, 0, 0, NULL);
18147 #endif
18148
18149 ; return 0; }
18150 EOF
18151 if { (eval echo configure:18152: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18152   rm -rf conftest*
18153   ol_cv_db_db_1=yes
18154 else
18155   echo "configure: failed program was:" >&5
18156   cat conftest.$ac_ext >&5
18157   rm -rf conftest*
18158   ol_cv_db_db_1=no
18159 fi
18160 rm -f conftest*
18161
18162         LIBS="$ol_LIBS"
18163
18164 fi
18165
18166 echo "$ac_t""$ol_cv_db_db_1" 1>&6
18167
18168         if test $ol_cv_db_db_1 = yes ; then
18169                 ol_cv_lib_db=-ldb-1
18170         fi
18171 fi
18172
18173
18174                 if test "$ol_cv_lib_db" != no ; then
18175                         ol_cv_berkeley_db=yes
18176                 fi
18177         fi
18178 fi
18179
18180         else
18181                 ol_cv_berkeley_db=no
18182 for ac_hdr in db.h
18183 do
18184 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
18185 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
18186 echo "configure:18187: checking for $ac_hdr" >&5
18187 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
18188   echo $ac_n "(cached) $ac_c" 1>&6
18189 else
18190   cat > conftest.$ac_ext <<EOF
18191 #line 18192 "configure"
18192 #include "confdefs.h"
18193 #include <$ac_hdr>
18194 EOF
18195 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
18196 { (eval echo configure:18197: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
18197 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
18198 if test -z "$ac_err"; then
18199   rm -rf conftest*
18200   eval "ac_cv_header_$ac_safe=yes"
18201 else
18202   echo "$ac_err" >&5
18203   echo "configure: failed program was:" >&5
18204   cat conftest.$ac_ext >&5
18205   rm -rf conftest*
18206   eval "ac_cv_header_$ac_safe=no"
18207 fi
18208 rm -f conftest*
18209 fi
18210 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
18211   echo "$ac_t""yes" 1>&6
18212     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
18213   cat >> confdefs.h <<EOF
18214 #define $ac_tr_hdr 1
18215 EOF
18216  
18217 else
18218   echo "$ac_t""no" 1>&6
18219 fi
18220 done
18221
18222 if test $ac_cv_header_db_h = yes; then
18223         ol_cv_lib_db=no
18224 if test $ol_cv_lib_db = no ; then
18225         echo $ac_n "checking for Berkeley DB link (default)""... $ac_c" 1>&6
18226 echo "configure:18227: checking for Berkeley DB link (default)" >&5
18227 if eval "test \"\${ol_cv_db_none+set}\" = set"; then
18228   echo $ac_n "(cached) $ac_c" 1>&6
18229 else
18230   
18231         ol_DB_LIB=
18232         ol_LIBS=$LIBS
18233         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18234
18235         cat > conftest.$ac_ext <<EOF
18236 #line 18237 "configure"
18237 #include "confdefs.h"
18238
18239 #ifdef HAVE_DB_185_H
18240 # include <db_185.h>
18241 #else
18242 # include <db.h>
18243 #endif
18244
18245 #ifndef DB_VERSION_MAJOR
18246 # define DB_VERSION_MAJOR 1
18247 #endif
18248
18249 #ifndef NULL
18250 #define NULL ((void*)0)
18251 #endif
18252
18253 int main() {
18254
18255 #if DB_VERSION_MAJOR > 1
18256         {
18257                 char *version;
18258                 int major, minor, patch;
18259
18260                 version = db_version( &major, &minor, &patch );
18261
18262                 if( major != DB_VERSION_MAJOR ||
18263                         minor < DB_VERSION_MINOR )
18264                 {
18265                         printf("Berkeley DB version mismatch\n"
18266                                 "\texpected: %s\n\tgot: %s\n",
18267                                 DB_VERSION_STRING, version);
18268                         return 1;
18269                 }
18270         }
18271 #endif
18272
18273 #if DB_VERSION_MAJOR > 2
18274         db_env_create( NULL, 0 );
18275 #elif DB_VERSION_MAJOR > 1
18276         db_appexit( NULL );
18277 #else
18278         (void) dbopen( NULL, 0, 0, 0, NULL);
18279 #endif
18280
18281 ; return 0; }
18282 EOF
18283 if { (eval echo configure:18284: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18284   rm -rf conftest*
18285   ol_cv_db_none=yes
18286 else
18287   echo "configure: failed program was:" >&5
18288   cat conftest.$ac_ext >&5
18289   rm -rf conftest*
18290   ol_cv_db_none=no
18291 fi
18292 rm -f conftest*
18293
18294         LIBS="$ol_LIBS"
18295
18296 fi
18297
18298 echo "$ac_t""$ol_cv_db_none" 1>&6
18299
18300         if test $ol_cv_db_none = yes ; then
18301                 ol_cv_lib_db=yes
18302         fi
18303 fi
18304
18305 if test $ol_cv_lib_db = no ; then
18306         echo $ac_n "checking for Berkeley DB link (-ldb42)""... $ac_c" 1>&6
18307 echo "configure:18308: checking for Berkeley DB link (-ldb42)" >&5
18308 if eval "test \"\${ol_cv_db_db42+set}\" = set"; then
18309   echo $ac_n "(cached) $ac_c" 1>&6
18310 else
18311   
18312         ol_DB_LIB=-ldb42
18313         ol_LIBS=$LIBS
18314         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18315
18316         cat > conftest.$ac_ext <<EOF
18317 #line 18318 "configure"
18318 #include "confdefs.h"
18319
18320 #ifdef HAVE_DB_185_H
18321 # include <db_185.h>
18322 #else
18323 # include <db.h>
18324 #endif
18325
18326 #ifndef DB_VERSION_MAJOR
18327 # define DB_VERSION_MAJOR 1
18328 #endif
18329
18330 #ifndef NULL
18331 #define NULL ((void*)0)
18332 #endif
18333
18334 int main() {
18335
18336 #if DB_VERSION_MAJOR > 1
18337         {
18338                 char *version;
18339                 int major, minor, patch;
18340
18341                 version = db_version( &major, &minor, &patch );
18342
18343                 if( major != DB_VERSION_MAJOR ||
18344                         minor < DB_VERSION_MINOR )
18345                 {
18346                         printf("Berkeley DB version mismatch\n"
18347                                 "\texpected: %s\n\tgot: %s\n",
18348                                 DB_VERSION_STRING, version);
18349                         return 1;
18350                 }
18351         }
18352 #endif
18353
18354 #if DB_VERSION_MAJOR > 2
18355         db_env_create( NULL, 0 );
18356 #elif DB_VERSION_MAJOR > 1
18357         db_appexit( NULL );
18358 #else
18359         (void) dbopen( NULL, 0, 0, 0, NULL);
18360 #endif
18361
18362 ; return 0; }
18363 EOF
18364 if { (eval echo configure:18365: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18365   rm -rf conftest*
18366   ol_cv_db_db42=yes
18367 else
18368   echo "configure: failed program was:" >&5
18369   cat conftest.$ac_ext >&5
18370   rm -rf conftest*
18371   ol_cv_db_db42=no
18372 fi
18373 rm -f conftest*
18374
18375         LIBS="$ol_LIBS"
18376
18377 fi
18378
18379 echo "$ac_t""$ol_cv_db_db42" 1>&6
18380
18381         if test $ol_cv_db_db42 = yes ; then
18382                 ol_cv_lib_db=-ldb42
18383         fi
18384 fi
18385
18386 if test $ol_cv_lib_db = no ; then
18387         echo $ac_n "checking for Berkeley DB link (-ldb-42)""... $ac_c" 1>&6
18388 echo "configure:18389: checking for Berkeley DB link (-ldb-42)" >&5
18389 if eval "test \"\${ol_cv_db_db_42+set}\" = set"; then
18390   echo $ac_n "(cached) $ac_c" 1>&6
18391 else
18392   
18393         ol_DB_LIB=-ldb-42
18394         ol_LIBS=$LIBS
18395         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18396
18397         cat > conftest.$ac_ext <<EOF
18398 #line 18399 "configure"
18399 #include "confdefs.h"
18400
18401 #ifdef HAVE_DB_185_H
18402 # include <db_185.h>
18403 #else
18404 # include <db.h>
18405 #endif
18406
18407 #ifndef DB_VERSION_MAJOR
18408 # define DB_VERSION_MAJOR 1
18409 #endif
18410
18411 #ifndef NULL
18412 #define NULL ((void*)0)
18413 #endif
18414
18415 int main() {
18416
18417 #if DB_VERSION_MAJOR > 1
18418         {
18419                 char *version;
18420                 int major, minor, patch;
18421
18422                 version = db_version( &major, &minor, &patch );
18423
18424                 if( major != DB_VERSION_MAJOR ||
18425                         minor < DB_VERSION_MINOR )
18426                 {
18427                         printf("Berkeley DB version mismatch\n"
18428                                 "\texpected: %s\n\tgot: %s\n",
18429                                 DB_VERSION_STRING, version);
18430                         return 1;
18431                 }
18432         }
18433 #endif
18434
18435 #if DB_VERSION_MAJOR > 2
18436         db_env_create( NULL, 0 );
18437 #elif DB_VERSION_MAJOR > 1
18438         db_appexit( NULL );
18439 #else
18440         (void) dbopen( NULL, 0, 0, 0, NULL);
18441 #endif
18442
18443 ; return 0; }
18444 EOF
18445 if { (eval echo configure:18446: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18446   rm -rf conftest*
18447   ol_cv_db_db_42=yes
18448 else
18449   echo "configure: failed program was:" >&5
18450   cat conftest.$ac_ext >&5
18451   rm -rf conftest*
18452   ol_cv_db_db_42=no
18453 fi
18454 rm -f conftest*
18455
18456         LIBS="$ol_LIBS"
18457
18458 fi
18459
18460 echo "$ac_t""$ol_cv_db_db_42" 1>&6
18461
18462         if test $ol_cv_db_db_42 = yes ; then
18463                 ol_cv_lib_db=-ldb-42
18464         fi
18465 fi
18466
18467 if test $ol_cv_lib_db = no ; then
18468         echo $ac_n "checking for Berkeley DB link (-ldb-4.2)""... $ac_c" 1>&6
18469 echo "configure:18470: checking for Berkeley DB link (-ldb-4.2)" >&5
18470 if eval "test \"\${ol_cv_db_db_4_dot_2+set}\" = set"; then
18471   echo $ac_n "(cached) $ac_c" 1>&6
18472 else
18473   
18474         ol_DB_LIB=-ldb-4.2
18475         ol_LIBS=$LIBS
18476         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18477
18478         cat > conftest.$ac_ext <<EOF
18479 #line 18480 "configure"
18480 #include "confdefs.h"
18481
18482 #ifdef HAVE_DB_185_H
18483 # include <db_185.h>
18484 #else
18485 # include <db.h>
18486 #endif
18487
18488 #ifndef DB_VERSION_MAJOR
18489 # define DB_VERSION_MAJOR 1
18490 #endif
18491
18492 #ifndef NULL
18493 #define NULL ((void*)0)
18494 #endif
18495
18496 int main() {
18497
18498 #if DB_VERSION_MAJOR > 1
18499         {
18500                 char *version;
18501                 int major, minor, patch;
18502
18503                 version = db_version( &major, &minor, &patch );
18504
18505                 if( major != DB_VERSION_MAJOR ||
18506                         minor < DB_VERSION_MINOR )
18507                 {
18508                         printf("Berkeley DB version mismatch\n"
18509                                 "\texpected: %s\n\tgot: %s\n",
18510                                 DB_VERSION_STRING, version);
18511                         return 1;
18512                 }
18513         }
18514 #endif
18515
18516 #if DB_VERSION_MAJOR > 2
18517         db_env_create( NULL, 0 );
18518 #elif DB_VERSION_MAJOR > 1
18519         db_appexit( NULL );
18520 #else
18521         (void) dbopen( NULL, 0, 0, 0, NULL);
18522 #endif
18523
18524 ; return 0; }
18525 EOF
18526 if { (eval echo configure:18527: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18527   rm -rf conftest*
18528   ol_cv_db_db_4_dot_2=yes
18529 else
18530   echo "configure: failed program was:" >&5
18531   cat conftest.$ac_ext >&5
18532   rm -rf conftest*
18533   ol_cv_db_db_4_dot_2=no
18534 fi
18535 rm -f conftest*
18536
18537         LIBS="$ol_LIBS"
18538
18539 fi
18540
18541 echo "$ac_t""$ol_cv_db_db_4_dot_2" 1>&6
18542
18543         if test $ol_cv_db_db_4_dot_2 = yes ; then
18544                 ol_cv_lib_db=-ldb-4.2
18545         fi
18546 fi
18547
18548 if test $ol_cv_lib_db = no ; then
18549         echo $ac_n "checking for Berkeley DB link (-ldb-4-2)""... $ac_c" 1>&6
18550 echo "configure:18551: checking for Berkeley DB link (-ldb-4-2)" >&5
18551 if eval "test \"\${ol_cv_db_db_4_2+set}\" = set"; then
18552   echo $ac_n "(cached) $ac_c" 1>&6
18553 else
18554   
18555         ol_DB_LIB=-ldb-4-2
18556         ol_LIBS=$LIBS
18557         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18558
18559         cat > conftest.$ac_ext <<EOF
18560 #line 18561 "configure"
18561 #include "confdefs.h"
18562
18563 #ifdef HAVE_DB_185_H
18564 # include <db_185.h>
18565 #else
18566 # include <db.h>
18567 #endif
18568
18569 #ifndef DB_VERSION_MAJOR
18570 # define DB_VERSION_MAJOR 1
18571 #endif
18572
18573 #ifndef NULL
18574 #define NULL ((void*)0)
18575 #endif
18576
18577 int main() {
18578
18579 #if DB_VERSION_MAJOR > 1
18580         {
18581                 char *version;
18582                 int major, minor, patch;
18583
18584                 version = db_version( &major, &minor, &patch );
18585
18586                 if( major != DB_VERSION_MAJOR ||
18587                         minor < DB_VERSION_MINOR )
18588                 {
18589                         printf("Berkeley DB version mismatch\n"
18590                                 "\texpected: %s\n\tgot: %s\n",
18591                                 DB_VERSION_STRING, version);
18592                         return 1;
18593                 }
18594         }
18595 #endif
18596
18597 #if DB_VERSION_MAJOR > 2
18598         db_env_create( NULL, 0 );
18599 #elif DB_VERSION_MAJOR > 1
18600         db_appexit( NULL );
18601 #else
18602         (void) dbopen( NULL, 0, 0, 0, NULL);
18603 #endif
18604
18605 ; return 0; }
18606 EOF
18607 if { (eval echo configure:18608: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18608   rm -rf conftest*
18609   ol_cv_db_db_4_2=yes
18610 else
18611   echo "configure: failed program was:" >&5
18612   cat conftest.$ac_ext >&5
18613   rm -rf conftest*
18614   ol_cv_db_db_4_2=no
18615 fi
18616 rm -f conftest*
18617
18618         LIBS="$ol_LIBS"
18619
18620 fi
18621
18622 echo "$ac_t""$ol_cv_db_db_4_2" 1>&6
18623
18624         if test $ol_cv_db_db_4_2 = yes ; then
18625                 ol_cv_lib_db=-ldb-4-2
18626         fi
18627 fi
18628
18629 if test $ol_cv_lib_db = no ; then
18630         echo $ac_n "checking for Berkeley DB link (-ldb-4)""... $ac_c" 1>&6
18631 echo "configure:18632: checking for Berkeley DB link (-ldb-4)" >&5
18632 if eval "test \"\${ol_cv_db_db_4+set}\" = set"; then
18633   echo $ac_n "(cached) $ac_c" 1>&6
18634 else
18635   
18636         ol_DB_LIB=-ldb-4
18637         ol_LIBS=$LIBS
18638         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18639
18640         cat > conftest.$ac_ext <<EOF
18641 #line 18642 "configure"
18642 #include "confdefs.h"
18643
18644 #ifdef HAVE_DB_185_H
18645 # include <db_185.h>
18646 #else
18647 # include <db.h>
18648 #endif
18649
18650 #ifndef DB_VERSION_MAJOR
18651 # define DB_VERSION_MAJOR 1
18652 #endif
18653
18654 #ifndef NULL
18655 #define NULL ((void*)0)
18656 #endif
18657
18658 int main() {
18659
18660 #if DB_VERSION_MAJOR > 1
18661         {
18662                 char *version;
18663                 int major, minor, patch;
18664
18665                 version = db_version( &major, &minor, &patch );
18666
18667                 if( major != DB_VERSION_MAJOR ||
18668                         minor < DB_VERSION_MINOR )
18669                 {
18670                         printf("Berkeley DB version mismatch\n"
18671                                 "\texpected: %s\n\tgot: %s\n",
18672                                 DB_VERSION_STRING, version);
18673                         return 1;
18674                 }
18675         }
18676 #endif
18677
18678 #if DB_VERSION_MAJOR > 2
18679         db_env_create( NULL, 0 );
18680 #elif DB_VERSION_MAJOR > 1
18681         db_appexit( NULL );
18682 #else
18683         (void) dbopen( NULL, 0, 0, 0, NULL);
18684 #endif
18685
18686 ; return 0; }
18687 EOF
18688 if { (eval echo configure:18689: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18689   rm -rf conftest*
18690   ol_cv_db_db_4=yes
18691 else
18692   echo "configure: failed program was:" >&5
18693   cat conftest.$ac_ext >&5
18694   rm -rf conftest*
18695   ol_cv_db_db_4=no
18696 fi
18697 rm -f conftest*
18698
18699         LIBS="$ol_LIBS"
18700
18701 fi
18702
18703 echo "$ac_t""$ol_cv_db_db_4" 1>&6
18704
18705         if test $ol_cv_db_db_4 = yes ; then
18706                 ol_cv_lib_db=-ldb-4
18707         fi
18708 fi
18709
18710 if test $ol_cv_lib_db = no ; then
18711         echo $ac_n "checking for Berkeley DB link (-ldb4)""... $ac_c" 1>&6
18712 echo "configure:18713: checking for Berkeley DB link (-ldb4)" >&5
18713 if eval "test \"\${ol_cv_db_db4+set}\" = set"; then
18714   echo $ac_n "(cached) $ac_c" 1>&6
18715 else
18716   
18717         ol_DB_LIB=-ldb4
18718         ol_LIBS=$LIBS
18719         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18720
18721         cat > conftest.$ac_ext <<EOF
18722 #line 18723 "configure"
18723 #include "confdefs.h"
18724
18725 #ifdef HAVE_DB_185_H
18726 # include <db_185.h>
18727 #else
18728 # include <db.h>
18729 #endif
18730
18731 #ifndef DB_VERSION_MAJOR
18732 # define DB_VERSION_MAJOR 1
18733 #endif
18734
18735 #ifndef NULL
18736 #define NULL ((void*)0)
18737 #endif
18738
18739 int main() {
18740
18741 #if DB_VERSION_MAJOR > 1
18742         {
18743                 char *version;
18744                 int major, minor, patch;
18745
18746                 version = db_version( &major, &minor, &patch );
18747
18748                 if( major != DB_VERSION_MAJOR ||
18749                         minor < DB_VERSION_MINOR )
18750                 {
18751                         printf("Berkeley DB version mismatch\n"
18752                                 "\texpected: %s\n\tgot: %s\n",
18753                                 DB_VERSION_STRING, version);
18754                         return 1;
18755                 }
18756         }
18757 #endif
18758
18759 #if DB_VERSION_MAJOR > 2
18760         db_env_create( NULL, 0 );
18761 #elif DB_VERSION_MAJOR > 1
18762         db_appexit( NULL );
18763 #else
18764         (void) dbopen( NULL, 0, 0, 0, NULL);
18765 #endif
18766
18767 ; return 0; }
18768 EOF
18769 if { (eval echo configure:18770: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18770   rm -rf conftest*
18771   ol_cv_db_db4=yes
18772 else
18773   echo "configure: failed program was:" >&5
18774   cat conftest.$ac_ext >&5
18775   rm -rf conftest*
18776   ol_cv_db_db4=no
18777 fi
18778 rm -f conftest*
18779
18780         LIBS="$ol_LIBS"
18781
18782 fi
18783
18784 echo "$ac_t""$ol_cv_db_db4" 1>&6
18785
18786         if test $ol_cv_db_db4 = yes ; then
18787                 ol_cv_lib_db=-ldb4
18788         fi
18789 fi
18790
18791 if test $ol_cv_lib_db = no ; then
18792         echo $ac_n "checking for Berkeley DB link (-ldb41)""... $ac_c" 1>&6
18793 echo "configure:18794: checking for Berkeley DB link (-ldb41)" >&5
18794 if eval "test \"\${ol_cv_db_db41+set}\" = set"; then
18795   echo $ac_n "(cached) $ac_c" 1>&6
18796 else
18797   
18798         ol_DB_LIB=-ldb41
18799         ol_LIBS=$LIBS
18800         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18801
18802         cat > conftest.$ac_ext <<EOF
18803 #line 18804 "configure"
18804 #include "confdefs.h"
18805
18806 #ifdef HAVE_DB_185_H
18807 # include <db_185.h>
18808 #else
18809 # include <db.h>
18810 #endif
18811
18812 #ifndef DB_VERSION_MAJOR
18813 # define DB_VERSION_MAJOR 1
18814 #endif
18815
18816 #ifndef NULL
18817 #define NULL ((void*)0)
18818 #endif
18819
18820 int main() {
18821
18822 #if DB_VERSION_MAJOR > 1
18823         {
18824                 char *version;
18825                 int major, minor, patch;
18826
18827                 version = db_version( &major, &minor, &patch );
18828
18829                 if( major != DB_VERSION_MAJOR ||
18830                         minor < DB_VERSION_MINOR )
18831                 {
18832                         printf("Berkeley DB version mismatch\n"
18833                                 "\texpected: %s\n\tgot: %s\n",
18834                                 DB_VERSION_STRING, version);
18835                         return 1;
18836                 }
18837         }
18838 #endif
18839
18840 #if DB_VERSION_MAJOR > 2
18841         db_env_create( NULL, 0 );
18842 #elif DB_VERSION_MAJOR > 1
18843         db_appexit( NULL );
18844 #else
18845         (void) dbopen( NULL, 0, 0, 0, NULL);
18846 #endif
18847
18848 ; return 0; }
18849 EOF
18850 if { (eval echo configure:18851: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18851   rm -rf conftest*
18852   ol_cv_db_db41=yes
18853 else
18854   echo "configure: failed program was:" >&5
18855   cat conftest.$ac_ext >&5
18856   rm -rf conftest*
18857   ol_cv_db_db41=no
18858 fi
18859 rm -f conftest*
18860
18861         LIBS="$ol_LIBS"
18862
18863 fi
18864
18865 echo "$ac_t""$ol_cv_db_db41" 1>&6
18866
18867         if test $ol_cv_db_db41 = yes ; then
18868                 ol_cv_lib_db=-ldb41
18869         fi
18870 fi
18871
18872 if test $ol_cv_lib_db = no ; then
18873         echo $ac_n "checking for Berkeley DB link (-ldb-41)""... $ac_c" 1>&6
18874 echo "configure:18875: checking for Berkeley DB link (-ldb-41)" >&5
18875 if eval "test \"\${ol_cv_db_db_41+set}\" = set"; then
18876   echo $ac_n "(cached) $ac_c" 1>&6
18877 else
18878   
18879         ol_DB_LIB=-ldb-41
18880         ol_LIBS=$LIBS
18881         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18882
18883         cat > conftest.$ac_ext <<EOF
18884 #line 18885 "configure"
18885 #include "confdefs.h"
18886
18887 #ifdef HAVE_DB_185_H
18888 # include <db_185.h>
18889 #else
18890 # include <db.h>
18891 #endif
18892
18893 #ifndef DB_VERSION_MAJOR
18894 # define DB_VERSION_MAJOR 1
18895 #endif
18896
18897 #ifndef NULL
18898 #define NULL ((void*)0)
18899 #endif
18900
18901 int main() {
18902
18903 #if DB_VERSION_MAJOR > 1
18904         {
18905                 char *version;
18906                 int major, minor, patch;
18907
18908                 version = db_version( &major, &minor, &patch );
18909
18910                 if( major != DB_VERSION_MAJOR ||
18911                         minor < DB_VERSION_MINOR )
18912                 {
18913                         printf("Berkeley DB version mismatch\n"
18914                                 "\texpected: %s\n\tgot: %s\n",
18915                                 DB_VERSION_STRING, version);
18916                         return 1;
18917                 }
18918         }
18919 #endif
18920
18921 #if DB_VERSION_MAJOR > 2
18922         db_env_create( NULL, 0 );
18923 #elif DB_VERSION_MAJOR > 1
18924         db_appexit( NULL );
18925 #else
18926         (void) dbopen( NULL, 0, 0, 0, NULL);
18927 #endif
18928
18929 ; return 0; }
18930 EOF
18931 if { (eval echo configure:18932: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18932   rm -rf conftest*
18933   ol_cv_db_db_41=yes
18934 else
18935   echo "configure: failed program was:" >&5
18936   cat conftest.$ac_ext >&5
18937   rm -rf conftest*
18938   ol_cv_db_db_41=no
18939 fi
18940 rm -f conftest*
18941
18942         LIBS="$ol_LIBS"
18943
18944 fi
18945
18946 echo "$ac_t""$ol_cv_db_db_41" 1>&6
18947
18948         if test $ol_cv_db_db_41 = yes ; then
18949                 ol_cv_lib_db=-ldb-41
18950         fi
18951 fi
18952
18953 if test $ol_cv_lib_db = no ; then
18954         echo $ac_n "checking for Berkeley DB link (-ldb-4.1)""... $ac_c" 1>&6
18955 echo "configure:18956: checking for Berkeley DB link (-ldb-4.1)" >&5
18956 if eval "test \"\${ol_cv_db_db_4_dot_1+set}\" = set"; then
18957   echo $ac_n "(cached) $ac_c" 1>&6
18958 else
18959   
18960         ol_DB_LIB=-ldb-4.1
18961         ol_LIBS=$LIBS
18962         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18963
18964         cat > conftest.$ac_ext <<EOF
18965 #line 18966 "configure"
18966 #include "confdefs.h"
18967
18968 #ifdef HAVE_DB_185_H
18969 # include <db_185.h>
18970 #else
18971 # include <db.h>
18972 #endif
18973
18974 #ifndef DB_VERSION_MAJOR
18975 # define DB_VERSION_MAJOR 1
18976 #endif
18977
18978 #ifndef NULL
18979 #define NULL ((void*)0)
18980 #endif
18981
18982 int main() {
18983
18984 #if DB_VERSION_MAJOR > 1
18985         {
18986                 char *version;
18987                 int major, minor, patch;
18988
18989                 version = db_version( &major, &minor, &patch );
18990
18991                 if( major != DB_VERSION_MAJOR ||
18992                         minor < DB_VERSION_MINOR )
18993                 {
18994                         printf("Berkeley DB version mismatch\n"
18995                                 "\texpected: %s\n\tgot: %s\n",
18996                                 DB_VERSION_STRING, version);
18997                         return 1;
18998                 }
18999         }
19000 #endif
19001
19002 #if DB_VERSION_MAJOR > 2
19003         db_env_create( NULL, 0 );
19004 #elif DB_VERSION_MAJOR > 1
19005         db_appexit( NULL );
19006 #else
19007         (void) dbopen( NULL, 0, 0, 0, NULL);
19008 #endif
19009
19010 ; return 0; }
19011 EOF
19012 if { (eval echo configure:19013: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19013   rm -rf conftest*
19014   ol_cv_db_db_4_dot_1=yes
19015 else
19016   echo "configure: failed program was:" >&5
19017   cat conftest.$ac_ext >&5
19018   rm -rf conftest*
19019   ol_cv_db_db_4_dot_1=no
19020 fi
19021 rm -f conftest*
19022
19023         LIBS="$ol_LIBS"
19024
19025 fi
19026
19027 echo "$ac_t""$ol_cv_db_db_4_dot_1" 1>&6
19028
19029         if test $ol_cv_db_db_4_dot_1 = yes ; then
19030                 ol_cv_lib_db=-ldb-4.1
19031         fi
19032 fi
19033
19034 if test $ol_cv_lib_db = no ; then
19035         echo $ac_n "checking for Berkeley DB link (-ldb-4-1)""... $ac_c" 1>&6
19036 echo "configure:19037: checking for Berkeley DB link (-ldb-4-1)" >&5
19037 if eval "test \"\${ol_cv_db_db_4_1+set}\" = set"; then
19038   echo $ac_n "(cached) $ac_c" 1>&6
19039 else
19040   
19041         ol_DB_LIB=-ldb-4-1
19042         ol_LIBS=$LIBS
19043         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19044
19045         cat > conftest.$ac_ext <<EOF
19046 #line 19047 "configure"
19047 #include "confdefs.h"
19048
19049 #ifdef HAVE_DB_185_H
19050 # include <db_185.h>
19051 #else
19052 # include <db.h>
19053 #endif
19054
19055 #ifndef DB_VERSION_MAJOR
19056 # define DB_VERSION_MAJOR 1
19057 #endif
19058
19059 #ifndef NULL
19060 #define NULL ((void*)0)
19061 #endif
19062
19063 int main() {
19064
19065 #if DB_VERSION_MAJOR > 1
19066         {
19067                 char *version;
19068                 int major, minor, patch;
19069
19070                 version = db_version( &major, &minor, &patch );
19071
19072                 if( major != DB_VERSION_MAJOR ||
19073                         minor < DB_VERSION_MINOR )
19074                 {
19075                         printf("Berkeley DB version mismatch\n"
19076                                 "\texpected: %s\n\tgot: %s\n",
19077                                 DB_VERSION_STRING, version);
19078                         return 1;
19079                 }
19080         }
19081 #endif
19082
19083 #if DB_VERSION_MAJOR > 2
19084         db_env_create( NULL, 0 );
19085 #elif DB_VERSION_MAJOR > 1
19086         db_appexit( NULL );
19087 #else
19088         (void) dbopen( NULL, 0, 0, 0, NULL);
19089 #endif
19090
19091 ; return 0; }
19092 EOF
19093 if { (eval echo configure:19094: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19094   rm -rf conftest*
19095   ol_cv_db_db_4_1=yes
19096 else
19097   echo "configure: failed program was:" >&5
19098   cat conftest.$ac_ext >&5
19099   rm -rf conftest*
19100   ol_cv_db_db_4_1=no
19101 fi
19102 rm -f conftest*
19103
19104         LIBS="$ol_LIBS"
19105
19106 fi
19107
19108 echo "$ac_t""$ol_cv_db_db_4_1" 1>&6
19109
19110         if test $ol_cv_db_db_4_1 = yes ; then
19111                 ol_cv_lib_db=-ldb-4-1
19112         fi
19113 fi
19114
19115 if test $ol_cv_lib_db = no ; then
19116         echo $ac_n "checking for Berkeley DB link (-ldb-4)""... $ac_c" 1>&6
19117 echo "configure:19118: checking for Berkeley DB link (-ldb-4)" >&5
19118 if eval "test \"\${ol_cv_db_db_4+set}\" = set"; then
19119   echo $ac_n "(cached) $ac_c" 1>&6
19120 else
19121   
19122         ol_DB_LIB=-ldb-4
19123         ol_LIBS=$LIBS
19124         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19125
19126         cat > conftest.$ac_ext <<EOF
19127 #line 19128 "configure"
19128 #include "confdefs.h"
19129
19130 #ifdef HAVE_DB_185_H
19131 # include <db_185.h>
19132 #else
19133 # include <db.h>
19134 #endif
19135
19136 #ifndef DB_VERSION_MAJOR
19137 # define DB_VERSION_MAJOR 1
19138 #endif
19139
19140 #ifndef NULL
19141 #define NULL ((void*)0)
19142 #endif
19143
19144 int main() {
19145
19146 #if DB_VERSION_MAJOR > 1
19147         {
19148                 char *version;
19149                 int major, minor, patch;
19150
19151                 version = db_version( &major, &minor, &patch );
19152
19153                 if( major != DB_VERSION_MAJOR ||
19154                         minor < DB_VERSION_MINOR )
19155                 {
19156                         printf("Berkeley DB version mismatch\n"
19157                                 "\texpected: %s\n\tgot: %s\n",
19158                                 DB_VERSION_STRING, version);
19159                         return 1;
19160                 }
19161         }
19162 #endif
19163
19164 #if DB_VERSION_MAJOR > 2
19165         db_env_create( NULL, 0 );
19166 #elif DB_VERSION_MAJOR > 1
19167         db_appexit( NULL );
19168 #else
19169         (void) dbopen( NULL, 0, 0, 0, NULL);
19170 #endif
19171
19172 ; return 0; }
19173 EOF
19174 if { (eval echo configure:19175: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19175   rm -rf conftest*
19176   ol_cv_db_db_4=yes
19177 else
19178   echo "configure: failed program was:" >&5
19179   cat conftest.$ac_ext >&5
19180   rm -rf conftest*
19181   ol_cv_db_db_4=no
19182 fi
19183 rm -f conftest*
19184
19185         LIBS="$ol_LIBS"
19186
19187 fi
19188
19189 echo "$ac_t""$ol_cv_db_db_4" 1>&6
19190
19191         if test $ol_cv_db_db_4 = yes ; then
19192                 ol_cv_lib_db=-ldb-4
19193         fi
19194 fi
19195
19196 if test $ol_cv_lib_db = no ; then
19197         echo $ac_n "checking for Berkeley DB link (-ldb)""... $ac_c" 1>&6
19198 echo "configure:19199: checking for Berkeley DB link (-ldb)" >&5
19199 if eval "test \"\${ol_cv_db_db+set}\" = set"; then
19200   echo $ac_n "(cached) $ac_c" 1>&6
19201 else
19202   
19203         ol_DB_LIB=-ldb
19204         ol_LIBS=$LIBS
19205         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19206
19207         cat > conftest.$ac_ext <<EOF
19208 #line 19209 "configure"
19209 #include "confdefs.h"
19210
19211 #ifdef HAVE_DB_185_H
19212 # include <db_185.h>
19213 #else
19214 # include <db.h>
19215 #endif
19216
19217 #ifndef DB_VERSION_MAJOR
19218 # define DB_VERSION_MAJOR 1
19219 #endif
19220
19221 #ifndef NULL
19222 #define NULL ((void*)0)
19223 #endif
19224
19225 int main() {
19226
19227 #if DB_VERSION_MAJOR > 1
19228         {
19229                 char *version;
19230                 int major, minor, patch;
19231
19232                 version = db_version( &major, &minor, &patch );
19233
19234                 if( major != DB_VERSION_MAJOR ||
19235                         minor < DB_VERSION_MINOR )
19236                 {
19237                         printf("Berkeley DB version mismatch\n"
19238                                 "\texpected: %s\n\tgot: %s\n",
19239                                 DB_VERSION_STRING, version);
19240                         return 1;
19241                 }
19242         }
19243 #endif
19244
19245 #if DB_VERSION_MAJOR > 2
19246         db_env_create( NULL, 0 );
19247 #elif DB_VERSION_MAJOR > 1
19248         db_appexit( NULL );
19249 #else
19250         (void) dbopen( NULL, 0, 0, 0, NULL);
19251 #endif
19252
19253 ; return 0; }
19254 EOF
19255 if { (eval echo configure:19256: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19256   rm -rf conftest*
19257   ol_cv_db_db=yes
19258 else
19259   echo "configure: failed program was:" >&5
19260   cat conftest.$ac_ext >&5
19261   rm -rf conftest*
19262   ol_cv_db_db=no
19263 fi
19264 rm -f conftest*
19265
19266         LIBS="$ol_LIBS"
19267
19268 fi
19269
19270 echo "$ac_t""$ol_cv_db_db" 1>&6
19271
19272         if test $ol_cv_db_db = yes ; then
19273                 ol_cv_lib_db=-ldb
19274         fi
19275 fi
19276
19277 if test $ol_cv_lib_db = no ; then
19278         echo $ac_n "checking for Berkeley DB link (-ldb3)""... $ac_c" 1>&6
19279 echo "configure:19280: checking for Berkeley DB link (-ldb3)" >&5
19280 if eval "test \"\${ol_cv_db_db3+set}\" = set"; then
19281   echo $ac_n "(cached) $ac_c" 1>&6
19282 else
19283   
19284         ol_DB_LIB=-ldb3
19285         ol_LIBS=$LIBS
19286         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19287
19288         cat > conftest.$ac_ext <<EOF
19289 #line 19290 "configure"
19290 #include "confdefs.h"
19291
19292 #ifdef HAVE_DB_185_H
19293 # include <db_185.h>
19294 #else
19295 # include <db.h>
19296 #endif
19297
19298 #ifndef DB_VERSION_MAJOR
19299 # define DB_VERSION_MAJOR 1
19300 #endif
19301
19302 #ifndef NULL
19303 #define NULL ((void*)0)
19304 #endif
19305
19306 int main() {
19307
19308 #if DB_VERSION_MAJOR > 1
19309         {
19310                 char *version;
19311                 int major, minor, patch;
19312
19313                 version = db_version( &major, &minor, &patch );
19314
19315                 if( major != DB_VERSION_MAJOR ||
19316                         minor < DB_VERSION_MINOR )
19317                 {
19318                         printf("Berkeley DB version mismatch\n"
19319                                 "\texpected: %s\n\tgot: %s\n",
19320                                 DB_VERSION_STRING, version);
19321                         return 1;
19322                 }
19323         }
19324 #endif
19325
19326 #if DB_VERSION_MAJOR > 2
19327         db_env_create( NULL, 0 );
19328 #elif DB_VERSION_MAJOR > 1
19329         db_appexit( NULL );
19330 #else
19331         (void) dbopen( NULL, 0, 0, 0, NULL);
19332 #endif
19333
19334 ; return 0; }
19335 EOF
19336 if { (eval echo configure:19337: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19337   rm -rf conftest*
19338   ol_cv_db_db3=yes
19339 else
19340   echo "configure: failed program was:" >&5
19341   cat conftest.$ac_ext >&5
19342   rm -rf conftest*
19343   ol_cv_db_db3=no
19344 fi
19345 rm -f conftest*
19346
19347         LIBS="$ol_LIBS"
19348
19349 fi
19350
19351 echo "$ac_t""$ol_cv_db_db3" 1>&6
19352
19353         if test $ol_cv_db_db3 = yes ; then
19354                 ol_cv_lib_db=-ldb3
19355         fi
19356 fi
19357
19358 if test $ol_cv_lib_db = no ; then
19359         echo $ac_n "checking for Berkeley DB link (-ldb-3)""... $ac_c" 1>&6
19360 echo "configure:19361: checking for Berkeley DB link (-ldb-3)" >&5
19361 if eval "test \"\${ol_cv_db_db_3+set}\" = set"; then
19362   echo $ac_n "(cached) $ac_c" 1>&6
19363 else
19364   
19365         ol_DB_LIB=-ldb-3
19366         ol_LIBS=$LIBS
19367         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19368
19369         cat > conftest.$ac_ext <<EOF
19370 #line 19371 "configure"
19371 #include "confdefs.h"
19372
19373 #ifdef HAVE_DB_185_H
19374 # include <db_185.h>
19375 #else
19376 # include <db.h>
19377 #endif
19378
19379 #ifndef DB_VERSION_MAJOR
19380 # define DB_VERSION_MAJOR 1
19381 #endif
19382
19383 #ifndef NULL
19384 #define NULL ((void*)0)
19385 #endif
19386
19387 int main() {
19388
19389 #if DB_VERSION_MAJOR > 1
19390         {
19391                 char *version;
19392                 int major, minor, patch;
19393
19394                 version = db_version( &major, &minor, &patch );
19395
19396                 if( major != DB_VERSION_MAJOR ||
19397                         minor < DB_VERSION_MINOR )
19398                 {
19399                         printf("Berkeley DB version mismatch\n"
19400                                 "\texpected: %s\n\tgot: %s\n",
19401                                 DB_VERSION_STRING, version);
19402                         return 1;
19403                 }
19404         }
19405 #endif
19406
19407 #if DB_VERSION_MAJOR > 2
19408         db_env_create( NULL, 0 );
19409 #elif DB_VERSION_MAJOR > 1
19410         db_appexit( NULL );
19411 #else
19412         (void) dbopen( NULL, 0, 0, 0, NULL);
19413 #endif
19414
19415 ; return 0; }
19416 EOF
19417 if { (eval echo configure:19418: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19418   rm -rf conftest*
19419   ol_cv_db_db_3=yes
19420 else
19421   echo "configure: failed program was:" >&5
19422   cat conftest.$ac_ext >&5
19423   rm -rf conftest*
19424   ol_cv_db_db_3=no
19425 fi
19426 rm -f conftest*
19427
19428         LIBS="$ol_LIBS"
19429
19430 fi
19431
19432 echo "$ac_t""$ol_cv_db_db_3" 1>&6
19433
19434         if test $ol_cv_db_db_3 = yes ; then
19435                 ol_cv_lib_db=-ldb-3
19436         fi
19437 fi
19438
19439 if test $ol_cv_lib_db = no ; then
19440         echo $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6
19441 echo "configure:19442: checking for Berkeley DB link (-ldb2)" >&5
19442 if eval "test \"\${ol_cv_db_db2+set}\" = set"; then
19443   echo $ac_n "(cached) $ac_c" 1>&6
19444 else
19445   
19446         ol_DB_LIB=-ldb2
19447         ol_LIBS=$LIBS
19448         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19449
19450         cat > conftest.$ac_ext <<EOF
19451 #line 19452 "configure"
19452 #include "confdefs.h"
19453
19454 #ifdef HAVE_DB_185_H
19455 # include <db_185.h>
19456 #else
19457 # include <db.h>
19458 #endif
19459
19460 #ifndef DB_VERSION_MAJOR
19461 # define DB_VERSION_MAJOR 1
19462 #endif
19463
19464 #ifndef NULL
19465 #define NULL ((void*)0)
19466 #endif
19467
19468 int main() {
19469
19470 #if DB_VERSION_MAJOR > 1
19471         {
19472                 char *version;
19473                 int major, minor, patch;
19474
19475                 version = db_version( &major, &minor, &patch );
19476
19477                 if( major != DB_VERSION_MAJOR ||
19478                         minor < DB_VERSION_MINOR )
19479                 {
19480                         printf("Berkeley DB version mismatch\n"
19481                                 "\texpected: %s\n\tgot: %s\n",
19482                                 DB_VERSION_STRING, version);
19483                         return 1;
19484                 }
19485         }
19486 #endif
19487
19488 #if DB_VERSION_MAJOR > 2
19489         db_env_create( NULL, 0 );
19490 #elif DB_VERSION_MAJOR > 1
19491         db_appexit( NULL );
19492 #else
19493         (void) dbopen( NULL, 0, 0, 0, NULL);
19494 #endif
19495
19496 ; return 0; }
19497 EOF
19498 if { (eval echo configure:19499: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19499   rm -rf conftest*
19500   ol_cv_db_db2=yes
19501 else
19502   echo "configure: failed program was:" >&5
19503   cat conftest.$ac_ext >&5
19504   rm -rf conftest*
19505   ol_cv_db_db2=no
19506 fi
19507 rm -f conftest*
19508
19509         LIBS="$ol_LIBS"
19510
19511 fi
19512
19513 echo "$ac_t""$ol_cv_db_db2" 1>&6
19514
19515         if test $ol_cv_db_db2 = yes ; then
19516                 ol_cv_lib_db=-ldb2
19517         fi
19518 fi
19519
19520 if test $ol_cv_lib_db = no ; then
19521         echo $ac_n "checking for Berkeley DB link (-ldb-2)""... $ac_c" 1>&6
19522 echo "configure:19523: checking for Berkeley DB link (-ldb-2)" >&5
19523 if eval "test \"\${ol_cv_db_db_2+set}\" = set"; then
19524   echo $ac_n "(cached) $ac_c" 1>&6
19525 else
19526   
19527         ol_DB_LIB=-ldb-2
19528         ol_LIBS=$LIBS
19529         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19530
19531         cat > conftest.$ac_ext <<EOF
19532 #line 19533 "configure"
19533 #include "confdefs.h"
19534
19535 #ifdef HAVE_DB_185_H
19536 # include <db_185.h>
19537 #else
19538 # include <db.h>
19539 #endif
19540
19541 #ifndef DB_VERSION_MAJOR
19542 # define DB_VERSION_MAJOR 1
19543 #endif
19544
19545 #ifndef NULL
19546 #define NULL ((void*)0)
19547 #endif
19548
19549 int main() {
19550
19551 #if DB_VERSION_MAJOR > 1
19552         {
19553                 char *version;
19554                 int major, minor, patch;
19555
19556                 version = db_version( &major, &minor, &patch );
19557
19558                 if( major != DB_VERSION_MAJOR ||
19559                         minor < DB_VERSION_MINOR )
19560                 {
19561                         printf("Berkeley DB version mismatch\n"
19562                                 "\texpected: %s\n\tgot: %s\n",
19563                                 DB_VERSION_STRING, version);
19564                         return 1;
19565                 }
19566         }
19567 #endif
19568
19569 #if DB_VERSION_MAJOR > 2
19570         db_env_create( NULL, 0 );
19571 #elif DB_VERSION_MAJOR > 1
19572         db_appexit( NULL );
19573 #else
19574         (void) dbopen( NULL, 0, 0, 0, NULL);
19575 #endif
19576
19577 ; return 0; }
19578 EOF
19579 if { (eval echo configure:19580: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19580   rm -rf conftest*
19581   ol_cv_db_db_2=yes
19582 else
19583   echo "configure: failed program was:" >&5
19584   cat conftest.$ac_ext >&5
19585   rm -rf conftest*
19586   ol_cv_db_db_2=no
19587 fi
19588 rm -f conftest*
19589
19590         LIBS="$ol_LIBS"
19591
19592 fi
19593
19594 echo "$ac_t""$ol_cv_db_db_2" 1>&6
19595
19596         if test $ol_cv_db_db_2 = yes ; then
19597                 ol_cv_lib_db=-ldb-2
19598         fi
19599 fi
19600
19601 if test $ol_cv_lib_db = no ; then
19602         echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6
19603 echo "configure:19604: checking for Berkeley DB link (-ldb1)" >&5
19604 if eval "test \"\${ol_cv_db_db1+set}\" = set"; then
19605   echo $ac_n "(cached) $ac_c" 1>&6
19606 else
19607   
19608         ol_DB_LIB=-ldb1
19609         ol_LIBS=$LIBS
19610         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19611
19612         cat > conftest.$ac_ext <<EOF
19613 #line 19614 "configure"
19614 #include "confdefs.h"
19615
19616 #ifdef HAVE_DB_185_H
19617 # include <db_185.h>
19618 #else
19619 # include <db.h>
19620 #endif
19621
19622 #ifndef DB_VERSION_MAJOR
19623 # define DB_VERSION_MAJOR 1
19624 #endif
19625
19626 #ifndef NULL
19627 #define NULL ((void*)0)
19628 #endif
19629
19630 int main() {
19631
19632 #if DB_VERSION_MAJOR > 1
19633         {
19634                 char *version;
19635                 int major, minor, patch;
19636
19637                 version = db_version( &major, &minor, &patch );
19638
19639                 if( major != DB_VERSION_MAJOR ||
19640                         minor < DB_VERSION_MINOR )
19641                 {
19642                         printf("Berkeley DB version mismatch\n"
19643                                 "\texpected: %s\n\tgot: %s\n",
19644                                 DB_VERSION_STRING, version);
19645                         return 1;
19646                 }
19647         }
19648 #endif
19649
19650 #if DB_VERSION_MAJOR > 2
19651         db_env_create( NULL, 0 );
19652 #elif DB_VERSION_MAJOR > 1
19653         db_appexit( NULL );
19654 #else
19655         (void) dbopen( NULL, 0, 0, 0, NULL);
19656 #endif
19657
19658 ; return 0; }
19659 EOF
19660 if { (eval echo configure:19661: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19661   rm -rf conftest*
19662   ol_cv_db_db1=yes
19663 else
19664   echo "configure: failed program was:" >&5
19665   cat conftest.$ac_ext >&5
19666   rm -rf conftest*
19667   ol_cv_db_db1=no
19668 fi
19669 rm -f conftest*
19670
19671         LIBS="$ol_LIBS"
19672
19673 fi
19674
19675 echo "$ac_t""$ol_cv_db_db1" 1>&6
19676
19677         if test $ol_cv_db_db1 = yes ; then
19678                 ol_cv_lib_db=-ldb1
19679         fi
19680 fi
19681
19682 if test $ol_cv_lib_db = no ; then
19683         echo $ac_n "checking for Berkeley DB link (-ldb-1)""... $ac_c" 1>&6
19684 echo "configure:19685: checking for Berkeley DB link (-ldb-1)" >&5
19685 if eval "test \"\${ol_cv_db_db_1+set}\" = set"; then
19686   echo $ac_n "(cached) $ac_c" 1>&6
19687 else
19688   
19689         ol_DB_LIB=-ldb-1
19690         ol_LIBS=$LIBS
19691         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19692
19693         cat > conftest.$ac_ext <<EOF
19694 #line 19695 "configure"
19695 #include "confdefs.h"
19696
19697 #ifdef HAVE_DB_185_H
19698 # include <db_185.h>
19699 #else
19700 # include <db.h>
19701 #endif
19702
19703 #ifndef DB_VERSION_MAJOR
19704 # define DB_VERSION_MAJOR 1
19705 #endif
19706
19707 #ifndef NULL
19708 #define NULL ((void*)0)
19709 #endif
19710
19711 int main() {
19712
19713 #if DB_VERSION_MAJOR > 1
19714         {
19715                 char *version;
19716                 int major, minor, patch;
19717
19718                 version = db_version( &major, &minor, &patch );
19719
19720                 if( major != DB_VERSION_MAJOR ||
19721                         minor < DB_VERSION_MINOR )
19722                 {
19723                         printf("Berkeley DB version mismatch\n"
19724                                 "\texpected: %s\n\tgot: %s\n",
19725                                 DB_VERSION_STRING, version);
19726                         return 1;
19727                 }
19728         }
19729 #endif
19730
19731 #if DB_VERSION_MAJOR > 2
19732         db_env_create( NULL, 0 );
19733 #elif DB_VERSION_MAJOR > 1
19734         db_appexit( NULL );
19735 #else
19736         (void) dbopen( NULL, 0, 0, 0, NULL);
19737 #endif
19738
19739 ; return 0; }
19740 EOF
19741 if { (eval echo configure:19742: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19742   rm -rf conftest*
19743   ol_cv_db_db_1=yes
19744 else
19745   echo "configure: failed program was:" >&5
19746   cat conftest.$ac_ext >&5
19747   rm -rf conftest*
19748   ol_cv_db_db_1=no
19749 fi
19750 rm -f conftest*
19751
19752         LIBS="$ol_LIBS"
19753
19754 fi
19755
19756 echo "$ac_t""$ol_cv_db_db_1" 1>&6
19757
19758         if test $ol_cv_db_db_1 = yes ; then
19759                 ol_cv_lib_db=-ldb-1
19760         fi
19761 fi
19762
19763
19764         if test "$ol_cv_lib_db" != no ; then
19765                 ol_cv_berkeley_db=yes
19766                 echo $ac_n "checking for Berkeley DB thread support""... $ac_c" 1>&6
19767 echo "configure:19768: checking for Berkeley DB thread support" >&5
19768 if eval "test \"\${ol_cv_berkeley_db_thread+set}\" = set"; then
19769   echo $ac_n "(cached) $ac_c" 1>&6
19770 else
19771   
19772         ol_LIBS="$LIBS"
19773         LIBS="$LTHREAD_LIBS $LIBS"
19774         if test $ol_cv_lib_db != yes ; then
19775                 LIBS="$ol_cv_lib_db $LIBS"
19776         fi
19777
19778         if test "$cross_compiling" = yes; then
19779   ol_cv_berkeley_db_thread=cross
19780 else
19781   cat > conftest.$ac_ext <<EOF
19782 #line 19783 "configure"
19783 #include "confdefs.h"
19784
19785 #ifdef HAVE_DB_185_H
19786         choke me;
19787 #else
19788 #include <db.h>
19789 #endif
19790 #ifndef NULL
19791 #define NULL ((void *)0)
19792 #endif
19793 main()
19794 {
19795         int rc;
19796         u_int32_t flags = DB_CREATE |
19797 #ifdef DB_PRIVATE
19798                 DB_PRIVATE |
19799 #endif
19800                 DB_THREAD;
19801
19802 #if DB_VERSION_MAJOR > 2
19803         DB_ENV *env = NULL;
19804
19805         rc = db_env_create( &env, 0 );
19806
19807         flags |= DB_INIT_MPOOL;
19808 #ifdef DB_MPOOL_PRIVATE
19809         flags |= DB_MPOOL_PRIVATE;
19810 #endif
19811
19812         if( rc ) {
19813                 printf("BerkeleyDB: %s\n", db_strerror(rc) );
19814                 return rc;
19815         }
19816
19817 #if (DB_VERSION_MAJOR > 3) || (DB_VERSION_MINOR >= 1)
19818         rc = env->open( env, NULL, flags, 0 );
19819 #else
19820         rc = env->open( env, NULL, NULL, flags, 0 );
19821 #endif
19822
19823         if ( rc == 0 ) {
19824                 rc = env->close( env, 0 );
19825         }
19826
19827         if( rc ) {
19828                 printf("BerkeleyDB: %s\n", db_strerror(rc) );
19829                 return rc;
19830         }
19831
19832 #else
19833         DB_ENV env;
19834         memset( &env, '\0', sizeof(env) );
19835
19836         rc = db_appinit( NULL, NULL, &env, flags );
19837
19838         if( rc == 0 ) {
19839                 db_appexit( &env );
19840         }
19841
19842         unlink("__db_mpool.share");
19843         unlink("__db_lock.share");
19844 #endif
19845
19846         return rc;
19847 }
19848 EOF
19849 if { (eval echo configure:19850: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
19850 then
19851   ol_cv_berkeley_db_thread=yes
19852 else
19853   echo "configure: failed program was:" >&5
19854   cat conftest.$ac_ext >&5
19855   rm -fr conftest*
19856   ol_cv_berkeley_db_thread=no
19857 fi
19858 rm -fr conftest*
19859 fi
19860
19861
19862         LIBS="$ol_LIBS"
19863
19864 fi
19865
19866 echo "$ac_t""$ol_cv_berkeley_db_thread" 1>&6
19867
19868         if test $ol_cv_berkeley_db_thread != no ; then
19869                 cat >> confdefs.h <<\EOF
19870 #define HAVE_BERKELEY_DB_THREAD 1
19871 EOF
19872
19873         fi
19874
19875         fi
19876 fi
19877
19878         fi
19879
19880         if test $ol_cv_berkeley_db != no ; then
19881                 cat >> confdefs.h <<\EOF
19882 #define HAVE_BERKELEY_DB 1
19883 EOF
19884
19885
19886                 ol_link_ldbm=berkeley
19887                 ol_with_ldbm_api=berkeley
19888
19889                 if test $ol_with_ldbm_type = hash ; then
19890                         cat >> confdefs.h <<\EOF
19891 #define LDBM_USE_DBHASH 1
19892 EOF
19893
19894                 else
19895                         cat >> confdefs.h <<\EOF
19896 #define LDBM_USE_DBBTREE 1
19897 EOF
19898
19899                 fi
19900
19901                                                 if test $ol_cv_lib_db != yes ; then
19902                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db"
19903                 fi
19904         fi
19905 fi
19906
19907 if test $ol_enable_bdb = yes -a $ol_link_ldbm != berkeley ; then
19908         { echo "configure: error: BDB: BerkeleyDB not available" 1>&2; exit 1; }
19909 elif test $ol_enable_bdb != no -a $ol_link_ldbm = berkeley ; then
19910         echo $ac_n "checking Berkeley DB version for BDB backend""... $ac_c" 1>&6
19911 echo "configure:19912: checking Berkeley DB version for BDB backend" >&5
19912 if eval "test \"\${ol_cv_bdb_compat+set}\" = set"; then
19913   echo $ac_n "(cached) $ac_c" 1>&6
19914 else
19915   
19916         cat > conftest.$ac_ext <<EOF
19917 #line 19918 "configure"
19918 #include "confdefs.h"
19919
19920 #include <db.h>
19921
19922  /* this check could be improved */
19923 #ifndef DB_VERSION_MAJOR
19924 #       define DB_VERSION_MAJOR 1
19925 #endif
19926 #ifndef DB_VERSION_MINOR
19927 #       define DB_VERSION_MINOR 0
19928 #endif
19929
19930 /* require 4.2 or later */
19931 #if (DB_VERSION_MAJOR >= 4) && (DB_VERSION_MINOR >= 2)
19932         __db_version_compat
19933 #endif
19934         
19935 EOF
19936 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
19937   egrep "__db_version_compat" >/dev/null 2>&1; then
19938   rm -rf conftest*
19939   ol_cv_bdb_compat=yes
19940 else
19941   rm -rf conftest*
19942   ol_cv_bdb_compat=no
19943 fi
19944 rm -f conftest*
19945
19946 fi
19947
19948 echo "$ac_t""$ol_cv_bdb_compat" 1>&6
19949
19950
19951         if test $ol_cv_bdb_compat = yes ; then
19952                 ol_enable_bdb=yes
19953         elif test $ol_enable_bdb = yes ; then
19954                 { echo "configure: error: BDB: BerkeleyDB version incompatible" 1>&2; exit 1; }
19955         else
19956                 ol_enable_bdb=no
19957         fi
19958 fi
19959 if test $ol_enable_hdb = yes -a $ol_link_ldbm != berkeley ; then
19960         { echo "configure: error: HDB: BerkeleyDB not available" 1>&2; exit 1; }
19961 fi
19962
19963 if test $ol_link_ldbm = no -a $ol_with_ldbm_type = btree ; then
19964         echo "configure: warning: Could not find LDBM with BTREE support" 1>&2
19965         ol_with_ldbm_api=none
19966 fi
19967
19968 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = mdbm ; then
19969         echo $ac_n "checking for MDBM library""... $ac_c" 1>&6
19970 echo "configure:19971: checking for MDBM library" >&5
19971 if eval "test \"\${ol_cv_lib_mdbm+set}\" = set"; then
19972   echo $ac_n "(cached) $ac_c" 1>&6
19973 else
19974         ol_LIBS="$LIBS"
19975         echo $ac_n "checking for mdbm_set_chain""... $ac_c" 1>&6
19976 echo "configure:19977: checking for mdbm_set_chain" >&5
19977 if eval "test \"\${ac_cv_func_mdbm_set_chain+set}\" = set"; then
19978   echo $ac_n "(cached) $ac_c" 1>&6
19979 else
19980   cat > conftest.$ac_ext <<EOF
19981 #line 19982 "configure"
19982 #include "confdefs.h"
19983 /* System header to define __stub macros and hopefully few prototypes,
19984     which can conflict with char mdbm_set_chain(); below.  */
19985 #include <assert.h>
19986 /* Override any gcc2 internal prototype to avoid an error.  */
19987 /* We use char because int might match the return type of a gcc2
19988     builtin and then its argument prototype would still apply.  */
19989 char mdbm_set_chain();
19990 char (*f)();
19991
19992 int main() {
19993
19994 /* The GNU C library defines this for functions which it implements
19995     to always fail with ENOSYS.  Some functions are actually named
19996     something starting with __ and the normal name is an alias.  */
19997 #if defined (__stub_mdbm_set_chain) || defined (__stub___mdbm_set_chain)
19998 choke me
19999 #else
20000 f = mdbm_set_chain;
20001 #endif
20002
20003 ; return 0; }
20004 EOF
20005 if { (eval echo configure:20006: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20006   rm -rf conftest*
20007   eval "ac_cv_func_mdbm_set_chain=yes"
20008 else
20009   echo "configure: failed program was:" >&5
20010   cat conftest.$ac_ext >&5
20011   rm -rf conftest*
20012   eval "ac_cv_func_mdbm_set_chain=no"
20013 fi
20014 rm -f conftest*
20015 fi
20016
20017 if eval "test \"`echo '$ac_cv_func_'mdbm_set_chain`\" = yes"; then
20018   echo "$ac_t""yes" 1>&6
20019   ol_cv_lib_mdbm=yes
20020 else
20021   echo "$ac_t""no" 1>&6
20022
20023                 echo $ac_n "checking for mdbm_set_chain in -lmdbm""... $ac_c" 1>&6
20024 echo "configure:20025: checking for mdbm_set_chain in -lmdbm" >&5
20025 ac_lib_var=`echo mdbm'_'mdbm_set_chain | sed 'y%./+-:%__p__%'`
20026 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20027   echo $ac_n "(cached) $ac_c" 1>&6
20028 else
20029   ac_save_LIBS="$LIBS"
20030 LIBS="-lmdbm  $LIBS"
20031 cat > conftest.$ac_ext <<EOF
20032 #line 20033 "configure"
20033 #include "confdefs.h"
20034 /* Override any gcc2 internal prototype to avoid an error.  */
20035 /* We use char because int might match the return type of a gcc2
20036     builtin and then its argument prototype would still apply.  */
20037 char mdbm_set_chain();
20038
20039 int main() {
20040 mdbm_set_chain()
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   eval "ac_cv_lib_$ac_lib_var=yes"
20046 else
20047   echo "configure: failed program was:" >&5
20048   cat conftest.$ac_ext >&5
20049   rm -rf conftest*
20050   eval "ac_cv_lib_$ac_lib_var=no"
20051 fi
20052 rm -f conftest*
20053 LIBS="$ac_save_LIBS"
20054
20055 fi
20056 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20057   echo "$ac_t""yes" 1>&6
20058   ol_cv_lib_mdbm=-lmdbm
20059 else
20060   echo "$ac_t""no" 1>&6
20061 ol_cv_lib_mdbm=no
20062 fi
20063
20064         
20065 fi
20066
20067         LIBS="$ol_LIBS"
20068
20069 fi
20070
20071 echo "$ac_t""$ol_cv_lib_mdbm" 1>&6
20072
20073
20074  for ac_hdr in mdbm.h
20075 do
20076 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
20077 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
20078 echo "configure:20079: checking for $ac_hdr" >&5
20079 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
20080   echo $ac_n "(cached) $ac_c" 1>&6
20081 else
20082   cat > conftest.$ac_ext <<EOF
20083 #line 20084 "configure"
20084 #include "confdefs.h"
20085 #include <$ac_hdr>
20086 EOF
20087 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20088 { (eval echo configure:20089: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20089 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20090 if test -z "$ac_err"; then
20091   rm -rf conftest*
20092   eval "ac_cv_header_$ac_safe=yes"
20093 else
20094   echo "$ac_err" >&5
20095   echo "configure: failed program was:" >&5
20096   cat conftest.$ac_ext >&5
20097   rm -rf conftest*
20098   eval "ac_cv_header_$ac_safe=no"
20099 fi
20100 rm -f conftest*
20101 fi
20102 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
20103   echo "$ac_t""yes" 1>&6
20104     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
20105   cat >> confdefs.h <<EOF
20106 #define $ac_tr_hdr 1
20107 EOF
20108  
20109 else
20110   echo "$ac_t""no" 1>&6
20111 fi
20112 done
20113
20114  echo $ac_n "checking for db""... $ac_c" 1>&6
20115 echo "configure:20116: checking for db" >&5
20116 if eval "test \"\${ol_cv_mdbm+set}\" = set"; then
20117   echo $ac_n "(cached) $ac_c" 1>&6
20118 else
20119   
20120         if test $ol_cv_lib_mdbm = no -o $ac_cv_header_mdbm_h = no ; then
20121                 ol_cv_mdbm=no
20122         else
20123                 ol_cv_mdbm=yes
20124         fi
20125
20126 fi
20127
20128 echo "$ac_t""$ol_cv_mdbm" 1>&6
20129  if test $ol_cv_mdbm = yes ; then
20130         cat >> confdefs.h <<\EOF
20131 #define HAVE_MDBM 1
20132 EOF
20133
20134  fi
20135
20136
20137         if test $ol_cv_mdbm = yes ; then
20138                 ol_link_ldbm=mdbm
20139                 ol_with_ldbm_api=mdbm
20140                 if test $ol_cv_lib_mdbm != yes ; then
20141                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_mdbm"
20142                 fi
20143         fi
20144 fi
20145
20146 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = gdbm ; then
20147         echo $ac_n "checking for GDBM library""... $ac_c" 1>&6
20148 echo "configure:20149: checking for GDBM library" >&5
20149 if eval "test \"\${ol_cv_lib_gdbm+set}\" = set"; then
20150   echo $ac_n "(cached) $ac_c" 1>&6
20151 else
20152         ol_LIBS="$LIBS"
20153         echo $ac_n "checking for gdbm_open""... $ac_c" 1>&6
20154 echo "configure:20155: checking for gdbm_open" >&5
20155 if eval "test \"\${ac_cv_func_gdbm_open+set}\" = set"; then
20156   echo $ac_n "(cached) $ac_c" 1>&6
20157 else
20158   cat > conftest.$ac_ext <<EOF
20159 #line 20160 "configure"
20160 #include "confdefs.h"
20161 /* System header to define __stub macros and hopefully few prototypes,
20162     which can conflict with char gdbm_open(); below.  */
20163 #include <assert.h>
20164 /* Override any gcc2 internal prototype to avoid an error.  */
20165 /* We use char because int might match the return type of a gcc2
20166     builtin and then its argument prototype would still apply.  */
20167 char gdbm_open();
20168 char (*f)();
20169
20170 int main() {
20171
20172 /* The GNU C library defines this for functions which it implements
20173     to always fail with ENOSYS.  Some functions are actually named
20174     something starting with __ and the normal name is an alias.  */
20175 #if defined (__stub_gdbm_open) || defined (__stub___gdbm_open)
20176 choke me
20177 #else
20178 f = gdbm_open;
20179 #endif
20180
20181 ; return 0; }
20182 EOF
20183 if { (eval echo configure:20184: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20184   rm -rf conftest*
20185   eval "ac_cv_func_gdbm_open=yes"
20186 else
20187   echo "configure: failed program was:" >&5
20188   cat conftest.$ac_ext >&5
20189   rm -rf conftest*
20190   eval "ac_cv_func_gdbm_open=no"
20191 fi
20192 rm -f conftest*
20193 fi
20194
20195 if eval "test \"`echo '$ac_cv_func_'gdbm_open`\" = yes"; then
20196   echo "$ac_t""yes" 1>&6
20197   ol_cv_lib_gdbm=yes
20198 else
20199   echo "$ac_t""no" 1>&6
20200
20201                 echo $ac_n "checking for gdbm_open in -lgdbm""... $ac_c" 1>&6
20202 echo "configure:20203: checking for gdbm_open in -lgdbm" >&5
20203 ac_lib_var=`echo gdbm'_'gdbm_open | sed 'y%./+-:%__p__%'`
20204 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20205   echo $ac_n "(cached) $ac_c" 1>&6
20206 else
20207   ac_save_LIBS="$LIBS"
20208 LIBS="-lgdbm  $LIBS"
20209 cat > conftest.$ac_ext <<EOF
20210 #line 20211 "configure"
20211 #include "confdefs.h"
20212 /* Override any gcc2 internal prototype to avoid an error.  */
20213 /* We use char because int might match the return type of a gcc2
20214     builtin and then its argument prototype would still apply.  */
20215 char gdbm_open();
20216
20217 int main() {
20218 gdbm_open()
20219 ; return 0; }
20220 EOF
20221 if { (eval echo configure:20222: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20222   rm -rf conftest*
20223   eval "ac_cv_lib_$ac_lib_var=yes"
20224 else
20225   echo "configure: failed program was:" >&5
20226   cat conftest.$ac_ext >&5
20227   rm -rf conftest*
20228   eval "ac_cv_lib_$ac_lib_var=no"
20229 fi
20230 rm -f conftest*
20231 LIBS="$ac_save_LIBS"
20232
20233 fi
20234 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20235   echo "$ac_t""yes" 1>&6
20236   ol_cv_lib_gdbm=-lgdbm
20237 else
20238   echo "$ac_t""no" 1>&6
20239 ol_cv_lib_gdbm=no
20240 fi
20241
20242         
20243 fi
20244
20245         LIBS="$ol_LIBS"
20246
20247 fi
20248
20249 echo "$ac_t""$ol_cv_lib_gdbm" 1>&6
20250
20251
20252  for ac_hdr in gdbm.h
20253 do
20254 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
20255 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
20256 echo "configure:20257: checking for $ac_hdr" >&5
20257 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
20258   echo $ac_n "(cached) $ac_c" 1>&6
20259 else
20260   cat > conftest.$ac_ext <<EOF
20261 #line 20262 "configure"
20262 #include "confdefs.h"
20263 #include <$ac_hdr>
20264 EOF
20265 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20266 { (eval echo configure:20267: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20267 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20268 if test -z "$ac_err"; then
20269   rm -rf conftest*
20270   eval "ac_cv_header_$ac_safe=yes"
20271 else
20272   echo "$ac_err" >&5
20273   echo "configure: failed program was:" >&5
20274   cat conftest.$ac_ext >&5
20275   rm -rf conftest*
20276   eval "ac_cv_header_$ac_safe=no"
20277 fi
20278 rm -f conftest*
20279 fi
20280 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
20281   echo "$ac_t""yes" 1>&6
20282     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
20283   cat >> confdefs.h <<EOF
20284 #define $ac_tr_hdr 1
20285 EOF
20286  
20287 else
20288   echo "$ac_t""no" 1>&6
20289 fi
20290 done
20291
20292  echo $ac_n "checking for db""... $ac_c" 1>&6
20293 echo "configure:20294: checking for db" >&5
20294 if eval "test \"\${ol_cv_gdbm+set}\" = set"; then
20295   echo $ac_n "(cached) $ac_c" 1>&6
20296 else
20297   
20298         if test $ol_cv_lib_gdbm = no -o $ac_cv_header_gdbm_h = no ; then
20299                 ol_cv_gdbm=no
20300         else
20301                 ol_cv_gdbm=yes
20302         fi
20303
20304 fi
20305
20306 echo "$ac_t""$ol_cv_gdbm" 1>&6
20307  if test $ol_cv_gdbm = yes ; then
20308         cat >> confdefs.h <<\EOF
20309 #define HAVE_GDBM 1
20310 EOF
20311
20312  fi
20313
20314
20315         if test $ol_cv_gdbm = yes ; then
20316                 ol_link_ldbm=gdbm
20317                 ol_with_ldbm_api=gdbm
20318
20319                 if test $ol_cv_lib_gdbm != yes ; then
20320                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_gdbm"
20321                 fi
20322         fi
20323 fi
20324
20325 if test $ol_with_ldbm_api = ndbm ; then
20326         echo $ac_n "checking for NDBM library""... $ac_c" 1>&6
20327 echo "configure:20328: checking for NDBM library" >&5
20328 if eval "test \"\${ol_cv_lib_ndbm+set}\" = set"; then
20329   echo $ac_n "(cached) $ac_c" 1>&6
20330 else
20331         ol_LIBS="$LIBS"
20332         echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
20333 echo "configure:20334: checking for dbm_open" >&5
20334 if eval "test \"\${ac_cv_func_dbm_open+set}\" = set"; then
20335   echo $ac_n "(cached) $ac_c" 1>&6
20336 else
20337   cat > conftest.$ac_ext <<EOF
20338 #line 20339 "configure"
20339 #include "confdefs.h"
20340 /* System header to define __stub macros and hopefully few prototypes,
20341     which can conflict with char dbm_open(); below.  */
20342 #include <assert.h>
20343 /* Override any gcc2 internal prototype to avoid an error.  */
20344 /* We use char because int might match the return type of a gcc2
20345     builtin and then its argument prototype would still apply.  */
20346 char dbm_open();
20347 char (*f)();
20348
20349 int main() {
20350
20351 /* The GNU C library defines this for functions which it implements
20352     to always fail with ENOSYS.  Some functions are actually named
20353     something starting with __ and the normal name is an alias.  */
20354 #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
20355 choke me
20356 #else
20357 f = dbm_open;
20358 #endif
20359
20360 ; return 0; }
20361 EOF
20362 if { (eval echo configure:20363: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20363   rm -rf conftest*
20364   eval "ac_cv_func_dbm_open=yes"
20365 else
20366   echo "configure: failed program was:" >&5
20367   cat conftest.$ac_ext >&5
20368   rm -rf conftest*
20369   eval "ac_cv_func_dbm_open=no"
20370 fi
20371 rm -f conftest*
20372 fi
20373
20374 if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then
20375   echo "$ac_t""yes" 1>&6
20376   ol_cv_lib_ndbm=yes
20377 else
20378   echo "$ac_t""no" 1>&6
20379
20380                 echo $ac_n "checking for dbm_open in -lndbm""... $ac_c" 1>&6
20381 echo "configure:20382: checking for dbm_open in -lndbm" >&5
20382 ac_lib_var=`echo ndbm'_'dbm_open | sed 'y%./+-:%__p__%'`
20383 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20384   echo $ac_n "(cached) $ac_c" 1>&6
20385 else
20386   ac_save_LIBS="$LIBS"
20387 LIBS="-lndbm  $LIBS"
20388 cat > conftest.$ac_ext <<EOF
20389 #line 20390 "configure"
20390 #include "confdefs.h"
20391 /* Override any gcc2 internal prototype to avoid an error.  */
20392 /* We use char because int might match the return type of a gcc2
20393     builtin and then its argument prototype would still apply.  */
20394 char dbm_open();
20395
20396 int main() {
20397 dbm_open()
20398 ; return 0; }
20399 EOF
20400 if { (eval echo configure:20401: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20401   rm -rf conftest*
20402   eval "ac_cv_lib_$ac_lib_var=yes"
20403 else
20404   echo "configure: failed program was:" >&5
20405   cat conftest.$ac_ext >&5
20406   rm -rf conftest*
20407   eval "ac_cv_lib_$ac_lib_var=no"
20408 fi
20409 rm -f conftest*
20410 LIBS="$ac_save_LIBS"
20411
20412 fi
20413 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20414   echo "$ac_t""yes" 1>&6
20415   ol_cv_lib_ndbm=-lndbm
20416 else
20417   echo "$ac_t""no" 1>&6
20418
20419                         echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
20420 echo "configure:20421: checking for dbm_open in -ldbm" >&5
20421 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-:%__p__%'`
20422 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20423   echo $ac_n "(cached) $ac_c" 1>&6
20424 else
20425   ac_save_LIBS="$LIBS"
20426 LIBS="-ldbm  $LIBS"
20427 cat > conftest.$ac_ext <<EOF
20428 #line 20429 "configure"
20429 #include "confdefs.h"
20430 /* Override any gcc2 internal prototype to avoid an error.  */
20431 /* We use char because int might match the return type of a gcc2
20432     builtin and then its argument prototype would still apply.  */
20433 char dbm_open();
20434
20435 int main() {
20436 dbm_open()
20437 ; return 0; }
20438 EOF
20439 if { (eval echo configure:20440: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20440   rm -rf conftest*
20441   eval "ac_cv_lib_$ac_lib_var=yes"
20442 else
20443   echo "configure: failed program was:" >&5
20444   cat conftest.$ac_ext >&5
20445   rm -rf conftest*
20446   eval "ac_cv_lib_$ac_lib_var=no"
20447 fi
20448 rm -f conftest*
20449 LIBS="$ac_save_LIBS"
20450
20451 fi
20452 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20453   echo "$ac_t""yes" 1>&6
20454   ol_cv_lib_ndbm=-ldbm
20455 else
20456   echo "$ac_t""no" 1>&6
20457 ol_cv_lib_ndbm=no
20458 fi
20459                 
20460 fi
20461
20462         
20463 fi
20464
20465         LIBS="$ol_LIBS"
20466
20467 fi
20468
20469 echo "$ac_t""$ol_cv_lib_ndbm" 1>&6
20470
20471
20472  for ac_hdr in ndbm.h
20473 do
20474 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
20475 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
20476 echo "configure:20477: checking for $ac_hdr" >&5
20477 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
20478   echo $ac_n "(cached) $ac_c" 1>&6
20479 else
20480   cat > conftest.$ac_ext <<EOF
20481 #line 20482 "configure"
20482 #include "confdefs.h"
20483 #include <$ac_hdr>
20484 EOF
20485 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20486 { (eval echo configure:20487: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20487 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20488 if test -z "$ac_err"; then
20489   rm -rf conftest*
20490   eval "ac_cv_header_$ac_safe=yes"
20491 else
20492   echo "$ac_err" >&5
20493   echo "configure: failed program was:" >&5
20494   cat conftest.$ac_ext >&5
20495   rm -rf conftest*
20496   eval "ac_cv_header_$ac_safe=no"
20497 fi
20498 rm -f conftest*
20499 fi
20500 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
20501   echo "$ac_t""yes" 1>&6
20502     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
20503   cat >> confdefs.h <<EOF
20504 #define $ac_tr_hdr 1
20505 EOF
20506  
20507 else
20508   echo "$ac_t""no" 1>&6
20509 fi
20510 done
20511
20512  echo $ac_n "checking for db""... $ac_c" 1>&6
20513 echo "configure:20514: checking for db" >&5
20514 if eval "test \"\${ol_cv_ndbm+set}\" = set"; then
20515   echo $ac_n "(cached) $ac_c" 1>&6
20516 else
20517   
20518         if test $ol_cv_lib_ndbm = no -o $ac_cv_header_ndbm_h = no ; then
20519                 ol_cv_ndbm=no
20520         else
20521                 ol_cv_ndbm=yes
20522         fi
20523
20524 fi
20525
20526 echo "$ac_t""$ol_cv_ndbm" 1>&6
20527  if test $ol_cv_ndbm = yes ; then
20528         cat >> confdefs.h <<\EOF
20529 #define HAVE_NDBM 1
20530 EOF
20531
20532  fi
20533
20534
20535         if test $ol_cv_ndbm = yes ; then
20536                 ol_link_ldbm=ndbm
20537                 ol_with_ldbm_api=ndbm
20538
20539                 if test $ol_cv_lib_ndbm != yes ; then
20540                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_ndbm"
20541                 fi
20542         fi
20543 fi
20544
20545 if test $ol_link_ldbm = no -a $ol_enable_ldbm != no ; then
20546         echo "configure: warning: could not find suitable LDBM backend" 1>&2
20547         if test $ol_enable_ldbm = yes ; then
20548                 { echo "configure: error: select appropriate LDBM options or disable" 1>&2; exit 1; }
20549         fi
20550
20551         echo "configure: warning: disabling LDBM" 1>&2
20552         ol_enable_ldbm=no
20553 fi
20554
20555
20556 if test $ol_enable_dynamic = yes -a $enable_shared = yes ; then
20557         BUILD_LIBS_DYNAMIC=shared
20558         cat >> confdefs.h <<\EOF
20559 #define LDAP_LIBS_DYNAMIC 1
20560 EOF
20561
20562         LTSTATIC=""
20563 else
20564         BUILD_LIBS_DYNAMIC=static
20565         LTSTATIC="-static"
20566 fi
20567
20568 if test $ol_enable_wrappers != no ; then
20569         for ac_hdr in tcpd.h
20570 do
20571 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
20572 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
20573 echo "configure:20574: checking for $ac_hdr" >&5
20574 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
20575   echo $ac_n "(cached) $ac_c" 1>&6
20576 else
20577   cat > conftest.$ac_ext <<EOF
20578 #line 20579 "configure"
20579 #include "confdefs.h"
20580 #include <$ac_hdr>
20581 EOF
20582 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20583 { (eval echo configure:20584: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20584 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20585 if test -z "$ac_err"; then
20586   rm -rf conftest*
20587   eval "ac_cv_header_$ac_safe=yes"
20588 else
20589   echo "$ac_err" >&5
20590   echo "configure: failed program was:" >&5
20591   cat conftest.$ac_ext >&5
20592   rm -rf conftest*
20593   eval "ac_cv_header_$ac_safe=no"
20594 fi
20595 rm -f conftest*
20596 fi
20597 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
20598   echo "$ac_t""yes" 1>&6
20599     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
20600   cat >> confdefs.h <<EOF
20601 #define $ac_tr_hdr 1
20602 EOF
20603  
20604                 echo $ac_n "checking for TCP wrappers library""... $ac_c" 1>&6
20605 echo "configure:20606: checking for TCP wrappers library" >&5
20606                 save_LIBS="$LIBS"
20607                 LIBS="$LIBS -lwrap"
20608                 cat > conftest.$ac_ext <<EOF
20609 #line 20610 "configure"
20610 #include "confdefs.h"
20611
20612 #include <tcpd.h>
20613 int allow_severity = 0;
20614 int deny_severity  = 0;
20615
20616 struct request_info *req;
20617                 
20618 int main() {
20619
20620 hosts_access(req)
20621                 
20622 ; return 0; }
20623 EOF
20624 if { (eval echo configure:20625: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20625   rm -rf conftest*
20626   echo "$ac_t""-lwrap" 1>&6
20627                 have_wrappers=yes
20628                 LIBS="$save_LIBS"
20629 else
20630   echo "configure: failed program was:" >&5
20631   cat conftest.$ac_ext >&5
20632   rm -rf conftest*
20633   
20634                                 LIBS="$LIBS -lnsl"
20635                 cat > conftest.$ac_ext <<EOF
20636 #line 20637 "configure"
20637 #include "confdefs.h"
20638
20639 #include <tcpd.h>
20640 int allow_severity = 0;
20641 int deny_severity  = 0;
20642
20643 struct request_info *req;
20644                 
20645 int main() {
20646
20647 hosts_access(req)
20648                 
20649 ; return 0; }
20650 EOF
20651 if { (eval echo configure:20652: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20652   rm -rf conftest*
20653   echo "$ac_t""-lwrap -lnsl" 1>&6
20654                 have_wrappers=yes
20655                 LIBS="$save_LIBS -lnsl"
20656 else
20657   echo "configure: failed program was:" >&5
20658   cat conftest.$ac_ext >&5
20659   rm -rf conftest*
20660   
20661                 echo "$ac_t""no" 1>&6
20662                 have_wrappers=no
20663                 LIBS=$save_LIBS
20664 fi
20665 rm -f conftest*
20666 fi
20667 rm -f conftest*
20668 else
20669   echo "$ac_t""no" 1>&6
20670 have_wrappers=no
20671 fi
20672 done
20673
20674
20675         if test $have_wrappers = yes ; then
20676                 cat >> confdefs.h <<\EOF
20677 #define HAVE_TCPD 1
20678 EOF
20679
20680                 WRAP_LIBS="-lwrap"
20681         elif test $ol_enable_wrappers = yes ; then
20682                 { echo "configure: error: could not find TCP wrappers, select apppropriate options ore disable" 1>&2; exit 1; }
20683         else
20684                 echo "configure: warning: could not find TCP wrappers, support disabled" 1>&2
20685                 WRAP_LIBS=""
20686         fi
20687 fi
20688
20689 if test $ol_enable_syslog != no ; then
20690         echo $ac_n "checking for openlog""... $ac_c" 1>&6
20691 echo "configure:20692: checking for openlog" >&5
20692 if eval "test \"\${ac_cv_func_openlog+set}\" = set"; then
20693   echo $ac_n "(cached) $ac_c" 1>&6
20694 else
20695   cat > conftest.$ac_ext <<EOF
20696 #line 20697 "configure"
20697 #include "confdefs.h"
20698 /* System header to define __stub macros and hopefully few prototypes,
20699     which can conflict with char openlog(); below.  */
20700 #include <assert.h>
20701 /* Override any gcc2 internal prototype to avoid an error.  */
20702 /* We use char because int might match the return type of a gcc2
20703     builtin and then its argument prototype would still apply.  */
20704 char openlog();
20705 char (*f)();
20706
20707 int main() {
20708
20709 /* The GNU C library defines this for functions which it implements
20710     to always fail with ENOSYS.  Some functions are actually named
20711     something starting with __ and the normal name is an alias.  */
20712 #if defined (__stub_openlog) || defined (__stub___openlog)
20713 choke me
20714 #else
20715 f = openlog;
20716 #endif
20717
20718 ; return 0; }
20719 EOF
20720 if { (eval echo configure:20721: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20721   rm -rf conftest*
20722   eval "ac_cv_func_openlog=yes"
20723 else
20724   echo "configure: failed program was:" >&5
20725   cat conftest.$ac_ext >&5
20726   rm -rf conftest*
20727   eval "ac_cv_func_openlog=no"
20728 fi
20729 rm -f conftest*
20730 fi
20731
20732 if eval "test \"`echo '$ac_cv_func_'openlog`\" = yes"; then
20733   echo "$ac_t""yes" 1>&6
20734   :
20735 else
20736   echo "$ac_t""no" 1>&6
20737 fi
20738
20739         if test $ac_cv_func_openlog = no -a $ol_enable_syslog = yes; then
20740                 { echo "configure: error: could not find syslog" 1>&2; exit 1; }
20741         fi
20742         ol_enable_syslog=$ac_cv_func_openlog
20743 fi
20744
20745
20746 ol_link_sql=no
20747 if test $ol_enable_sql != no ; then
20748         for ac_hdr in sql.h sqlext.h
20749 do
20750 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
20751 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
20752 echo "configure:20753: checking for $ac_hdr" >&5
20753 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
20754   echo $ac_n "(cached) $ac_c" 1>&6
20755 else
20756   cat > conftest.$ac_ext <<EOF
20757 #line 20758 "configure"
20758 #include "confdefs.h"
20759 #include <$ac_hdr>
20760 EOF
20761 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20762 { (eval echo configure:20763: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20763 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20764 if test -z "$ac_err"; then
20765   rm -rf conftest*
20766   eval "ac_cv_header_$ac_safe=yes"
20767 else
20768   echo "$ac_err" >&5
20769   echo "configure: failed program was:" >&5
20770   cat conftest.$ac_ext >&5
20771   rm -rf conftest*
20772   eval "ac_cv_header_$ac_safe=no"
20773 fi
20774 rm -f conftest*
20775 fi
20776 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
20777   echo "$ac_t""yes" 1>&6
20778     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
20779   cat >> confdefs.h <<EOF
20780 #define $ac_tr_hdr 1
20781 EOF
20782  
20783 else
20784   echo "$ac_t""no" 1>&6
20785 { echo "configure: error: could not locate SQL headers" 1>&2; exit 1; }
20786         
20787 fi
20788 done
20789
20790
20791         echo $ac_n "checking for SQLDriverConnect in -liodbc""... $ac_c" 1>&6
20792 echo "configure:20793: checking for SQLDriverConnect in -liodbc" >&5
20793 ac_lib_var=`echo iodbc'_'SQLDriverConnect | sed 'y%./+-:%__p__%'`
20794 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20795   echo $ac_n "(cached) $ac_c" 1>&6
20796 else
20797   ac_save_LIBS="$LIBS"
20798 LIBS="-liodbc  $LIBS"
20799 cat > conftest.$ac_ext <<EOF
20800 #line 20801 "configure"
20801 #include "confdefs.h"
20802 /* Override any gcc2 internal prototype to avoid an error.  */
20803 /* We use char because int might match the return type of a gcc2
20804     builtin and then its argument prototype would still apply.  */
20805 char SQLDriverConnect();
20806
20807 int main() {
20808 SQLDriverConnect()
20809 ; return 0; }
20810 EOF
20811 if { (eval echo configure:20812: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20812   rm -rf conftest*
20813   eval "ac_cv_lib_$ac_lib_var=yes"
20814 else
20815   echo "configure: failed program was:" >&5
20816   cat conftest.$ac_ext >&5
20817   rm -rf conftest*
20818   eval "ac_cv_lib_$ac_lib_var=no"
20819 fi
20820 rm -f conftest*
20821 LIBS="$ac_save_LIBS"
20822
20823 fi
20824 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20825   echo "$ac_t""yes" 1>&6
20826   have_iodbc=yes
20827 else
20828   echo "$ac_t""no" 1>&6
20829 have_iodbc=no
20830 fi
20831
20832         if test $have_iodbc = yes ; then
20833                 ol_link_sql="-liodbc"
20834         else
20835                 echo $ac_n "checking for SQLDriverConnect in -lodbc""... $ac_c" 1>&6
20836 echo "configure:20837: checking for SQLDriverConnect in -lodbc" >&5
20837 ac_lib_var=`echo odbc'_'SQLDriverConnect | sed 'y%./+-:%__p__%'`
20838 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20839   echo $ac_n "(cached) $ac_c" 1>&6
20840 else
20841   ac_save_LIBS="$LIBS"
20842 LIBS="-lodbc  $LIBS"
20843 cat > conftest.$ac_ext <<EOF
20844 #line 20845 "configure"
20845 #include "confdefs.h"
20846 /* Override any gcc2 internal prototype to avoid an error.  */
20847 /* We use char because int might match the return type of a gcc2
20848     builtin and then its argument prototype would still apply.  */
20849 char SQLDriverConnect();
20850
20851 int main() {
20852 SQLDriverConnect()
20853 ; return 0; }
20854 EOF
20855 if { (eval echo configure:20856: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20856   rm -rf conftest*
20857   eval "ac_cv_lib_$ac_lib_var=yes"
20858 else
20859   echo "configure: failed program was:" >&5
20860   cat conftest.$ac_ext >&5
20861   rm -rf conftest*
20862   eval "ac_cv_lib_$ac_lib_var=no"
20863 fi
20864 rm -f conftest*
20865 LIBS="$ac_save_LIBS"
20866
20867 fi
20868 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20869   echo "$ac_t""yes" 1>&6
20870   have_odbc=yes
20871 else
20872   echo "$ac_t""no" 1>&6
20873 have_odbc=no
20874 fi
20875
20876                 if test $have_odbc = yes ; then
20877                         ol_link_sql="-lodbc"
20878                 fi
20879         fi
20880
20881         if test $ol_link_sql != no ; then
20882                 SLAPD_SQL_LIBS="$ol_link_sql"
20883
20884         elif test $ol_enable_sql != auto ; then
20885                 { echo "configure: error: could not locate suitable ODBC library" 1>&2; exit 1; }
20886         fi
20887 fi
20888
20889 if test $ol_enable_tcl != no ; then
20890         for ac_hdr in tcl.h
20891 do
20892 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
20893 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
20894 echo "configure:20895: checking for $ac_hdr" >&5
20895 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
20896   echo $ac_n "(cached) $ac_c" 1>&6
20897 else
20898   cat > conftest.$ac_ext <<EOF
20899 #line 20900 "configure"
20900 #include "confdefs.h"
20901 #include <$ac_hdr>
20902 EOF
20903 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20904 { (eval echo configure:20905: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20905 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20906 if test -z "$ac_err"; then
20907   rm -rf conftest*
20908   eval "ac_cv_header_$ac_safe=yes"
20909 else
20910   echo "$ac_err" >&5
20911   echo "configure: failed program was:" >&5
20912   cat conftest.$ac_ext >&5
20913   rm -rf conftest*
20914   eval "ac_cv_header_$ac_safe=no"
20915 fi
20916 rm -f conftest*
20917 fi
20918 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
20919   echo "$ac_t""yes" 1>&6
20920     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
20921   cat >> confdefs.h <<EOF
20922 #define $ac_tr_hdr 1
20923 EOF
20924  
20925 else
20926   echo "$ac_t""no" 1>&6
20927 fi
20928 done
20929
20930
20931         if test $ac_cv_header_tcl_h != yes ; then
20932                 have_tcl=no
20933         else
20934                 for lib in tcl tcl7.6 tcl8.0 tcl8.2 ; do
20935                         echo $ac_n "checking for main in -l$lib""... $ac_c" 1>&6
20936 echo "configure:20937: checking for main in -l$lib" >&5
20937 ac_lib_var=`echo $lib'_'main | sed 'y%./+-:%__p__%'`
20938 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20939   echo $ac_n "(cached) $ac_c" 1>&6
20940 else
20941   ac_save_LIBS="$LIBS"
20942 LIBS="-l$lib  $LIBS"
20943 cat > conftest.$ac_ext <<EOF
20944 #line 20945 "configure"
20945 #include "confdefs.h"
20946
20947 int main() {
20948 main()
20949 ; return 0; }
20950 EOF
20951 if { (eval echo configure:20952: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20952   rm -rf conftest*
20953   eval "ac_cv_lib_$ac_lib_var=yes"
20954 else
20955   echo "configure: failed program was:" >&5
20956   cat conftest.$ac_ext >&5
20957   rm -rf conftest*
20958   eval "ac_cv_lib_$ac_lib_var=no"
20959 fi
20960 rm -f conftest*
20961 LIBS="$ac_save_LIBS"
20962
20963 fi
20964 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20965   echo "$ac_t""yes" 1>&6
20966   have_tcl=yes
20967                            if test x"$ol_with_tcl_module" = "xstatic" ; then
20968                                         SLAPD_LIBS="$SLAPD_LIBS -l${lib}"
20969                            else
20970                                         MOD_TCL_LIB="-l${lib}"
20971                            fi;break
20972 else
20973   echo "$ac_t""no" 1>&6
20974 have_tcl=no
20975 fi
20976
20977                 done
20978         fi
20979
20980         if test $have_tcl != yes ; then
20981                 echo "configure: warning: could not find -ltcl" 1>&2
20982                 if test $ol_enable_tcl = yes ; then
20983                         { echo "configure: error: could not find tcl, select appropriate options or disable" 1>&2; exit 1; }
20984                 fi
20985
20986                 ol_enable_tcl=no
20987         fi
20988 fi
20989
20990 ol_link_termcap=no
20991 for ac_hdr in termcap.h ncurses.h
20992 do
20993 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
20994 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
20995 echo "configure:20996: checking for $ac_hdr" >&5
20996 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
20997   echo $ac_n "(cached) $ac_c" 1>&6
20998 else
20999   cat > conftest.$ac_ext <<EOF
21000 #line 21001 "configure"
21001 #include "confdefs.h"
21002 #include <$ac_hdr>
21003 EOF
21004 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
21005 { (eval echo configure:21006: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
21006 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
21007 if test -z "$ac_err"; then
21008   rm -rf conftest*
21009   eval "ac_cv_header_$ac_safe=yes"
21010 else
21011   echo "$ac_err" >&5
21012   echo "configure: failed program was:" >&5
21013   cat conftest.$ac_ext >&5
21014   rm -rf conftest*
21015   eval "ac_cv_header_$ac_safe=no"
21016 fi
21017 rm -f conftest*
21018 fi
21019 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
21020   echo "$ac_t""yes" 1>&6
21021     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
21022   cat >> confdefs.h <<EOF
21023 #define $ac_tr_hdr 1
21024 EOF
21025  
21026 else
21027   echo "$ac_t""no" 1>&6
21028 fi
21029 done
21030
21031
21032 if test $ol_link_termcap = no ; then
21033         echo $ac_n "checking for tputs in -ltermcap""... $ac_c" 1>&6
21034 echo "configure:21035: checking for tputs in -ltermcap" >&5
21035 ac_lib_var=`echo termcap'_'tputs | sed 'y%./+-:%__p__%'`
21036 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
21037   echo $ac_n "(cached) $ac_c" 1>&6
21038 else
21039   ac_save_LIBS="$LIBS"
21040 LIBS="-ltermcap  $LIBS"
21041 cat > conftest.$ac_ext <<EOF
21042 #line 21043 "configure"
21043 #include "confdefs.h"
21044 /* Override any gcc2 internal prototype to avoid an error.  */
21045 /* We use char because int might match the return type of a gcc2
21046     builtin and then its argument prototype would still apply.  */
21047 char tputs();
21048
21049 int main() {
21050 tputs()
21051 ; return 0; }
21052 EOF
21053 if { (eval echo configure:21054: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21054   rm -rf conftest*
21055   eval "ac_cv_lib_$ac_lib_var=yes"
21056 else
21057   echo "configure: failed program was:" >&5
21058   cat conftest.$ac_ext >&5
21059   rm -rf conftest*
21060   eval "ac_cv_lib_$ac_lib_var=no"
21061 fi
21062 rm -f conftest*
21063 LIBS="$ac_save_LIBS"
21064
21065 fi
21066 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
21067   echo "$ac_t""yes" 1>&6
21068   have_termcap=yes
21069 else
21070   echo "$ac_t""no" 1>&6
21071 have_termcap=no
21072 fi
21073
21074         if test $have_termcap = yes ; then
21075                 cat >> confdefs.h <<\EOF
21076 #define HAVE_TERMCAP 1
21077 EOF
21078
21079                 ol_link_termcap=yes
21080                 TERMCAP_LIBS=-ltermcap
21081         fi
21082 fi
21083
21084 if test $ol_link_termcap = no ; then
21085         echo $ac_n "checking for initscr in -lncurses""... $ac_c" 1>&6
21086 echo "configure:21087: checking for initscr in -lncurses" >&5
21087 ac_lib_var=`echo ncurses'_'initscr | sed 'y%./+-:%__p__%'`
21088 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
21089   echo $ac_n "(cached) $ac_c" 1>&6
21090 else
21091   ac_save_LIBS="$LIBS"
21092 LIBS="-lncurses  $LIBS"
21093 cat > conftest.$ac_ext <<EOF
21094 #line 21095 "configure"
21095 #include "confdefs.h"
21096 /* Override any gcc2 internal prototype to avoid an error.  */
21097 /* We use char because int might match the return type of a gcc2
21098     builtin and then its argument prototype would still apply.  */
21099 char initscr();
21100
21101 int main() {
21102 initscr()
21103 ; return 0; }
21104 EOF
21105 if { (eval echo configure:21106: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21106   rm -rf conftest*
21107   eval "ac_cv_lib_$ac_lib_var=yes"
21108 else
21109   echo "configure: failed program was:" >&5
21110   cat conftest.$ac_ext >&5
21111   rm -rf conftest*
21112   eval "ac_cv_lib_$ac_lib_var=no"
21113 fi
21114 rm -f conftest*
21115 LIBS="$ac_save_LIBS"
21116
21117 fi
21118 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
21119   echo "$ac_t""yes" 1>&6
21120   have_ncurses=yes
21121 else
21122   echo "$ac_t""no" 1>&6
21123 have_ncurses=no
21124 fi
21125
21126         if test $have_ncurses = yes ; then
21127                 cat >> confdefs.h <<\EOF
21128 #define HAVE_NCURSES 1
21129 EOF
21130
21131                 ol_link_termcap=yes
21132                 TERMCAP_LIBS=-lncurses
21133         fi
21134 fi
21135
21136 if test $ol_link_termcap = no ; then
21137         cat >> confdefs.h <<\EOF
21138 #define NO_TERMCAP 1
21139 EOF
21140
21141         TERMCAP_LIBS=
21142 fi
21143
21144 ol_link_sasl=no
21145 ol_link_spasswd=no
21146 if test $ol_with_cyrus_sasl != no ; then
21147         for ac_hdr in sasl/sasl.h sasl.h
21148 do
21149 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
21150 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
21151 echo "configure:21152: checking for $ac_hdr" >&5
21152 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
21153   echo $ac_n "(cached) $ac_c" 1>&6
21154 else
21155   cat > conftest.$ac_ext <<EOF
21156 #line 21157 "configure"
21157 #include "confdefs.h"
21158 #include <$ac_hdr>
21159 EOF
21160 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
21161 { (eval echo configure:21162: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
21162 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
21163 if test -z "$ac_err"; then
21164   rm -rf conftest*
21165   eval "ac_cv_header_$ac_safe=yes"
21166 else
21167   echo "$ac_err" >&5
21168   echo "configure: failed program was:" >&5
21169   cat conftest.$ac_ext >&5
21170   rm -rf conftest*
21171   eval "ac_cv_header_$ac_safe=no"
21172 fi
21173 rm -f conftest*
21174 fi
21175 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
21176   echo "$ac_t""yes" 1>&6
21177     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
21178   cat >> confdefs.h <<EOF
21179 #define $ac_tr_hdr 1
21180 EOF
21181  
21182 else
21183   echo "$ac_t""no" 1>&6
21184 fi
21185 done
21186
21187
21188         if test $ac_cv_header_sasl_sasl_h = yes -o $ac_cv_header_sasl_h = yes; then
21189                 echo $ac_n "checking for sasl_client_init in -lsasl2""... $ac_c" 1>&6
21190 echo "configure:21191: checking for sasl_client_init in -lsasl2" >&5
21191 ac_lib_var=`echo sasl2'_'sasl_client_init | sed 'y%./+-:%__p__%'`
21192 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
21193   echo $ac_n "(cached) $ac_c" 1>&6
21194 else
21195   ac_save_LIBS="$LIBS"
21196 LIBS="-lsasl2  $LIBS"
21197 cat > conftest.$ac_ext <<EOF
21198 #line 21199 "configure"
21199 #include "confdefs.h"
21200 /* Override any gcc2 internal prototype to avoid an error.  */
21201 /* We use char because int might match the return type of a gcc2
21202     builtin and then its argument prototype would still apply.  */
21203 char sasl_client_init();
21204
21205 int main() {
21206 sasl_client_init()
21207 ; return 0; }
21208 EOF
21209 if { (eval echo configure:21210: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21210   rm -rf conftest*
21211   eval "ac_cv_lib_$ac_lib_var=yes"
21212 else
21213   echo "configure: failed program was:" >&5
21214   cat conftest.$ac_ext >&5
21215   rm -rf conftest*
21216   eval "ac_cv_lib_$ac_lib_var=no"
21217 fi
21218 rm -f conftest*
21219 LIBS="$ac_save_LIBS"
21220
21221 fi
21222 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
21223   echo "$ac_t""yes" 1>&6
21224   ol_link_sasl="-lsasl2"
21225 else
21226   echo "$ac_t""no" 1>&6
21227 echo $ac_n "checking for sasl_client_init in -lsasl""... $ac_c" 1>&6
21228 echo "configure:21229: checking for sasl_client_init in -lsasl" >&5
21229 ac_lib_var=`echo sasl'_'sasl_client_init | sed 'y%./+-:%__p__%'`
21230 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
21231   echo $ac_n "(cached) $ac_c" 1>&6
21232 else
21233   ac_save_LIBS="$LIBS"
21234 LIBS="-lsasl  $LIBS"
21235 cat > conftest.$ac_ext <<EOF
21236 #line 21237 "configure"
21237 #include "confdefs.h"
21238 /* Override any gcc2 internal prototype to avoid an error.  */
21239 /* We use char because int might match the return type of a gcc2
21240     builtin and then its argument prototype would still apply.  */
21241 char sasl_client_init();
21242
21243 int main() {
21244 sasl_client_init()
21245 ; return 0; }
21246 EOF
21247 if { (eval echo configure:21248: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21248   rm -rf conftest*
21249   eval "ac_cv_lib_$ac_lib_var=yes"
21250 else
21251   echo "configure: failed program was:" >&5
21252   cat conftest.$ac_ext >&5
21253   rm -rf conftest*
21254   eval "ac_cv_lib_$ac_lib_var=no"
21255 fi
21256 rm -f conftest*
21257 LIBS="$ac_save_LIBS"
21258
21259 fi
21260 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
21261   echo "$ac_t""yes" 1>&6
21262   ol_link_sasl="-lsasl"
21263 else
21264   echo "$ac_t""no" 1>&6
21265 fi
21266
21267 fi
21268
21269         fi
21270
21271         if test $ol_link_sasl = no ; then
21272                 if test $ol_with_cyrus_sasl != auto ; then
21273                         { echo "configure: error: Could not locate Cyrus SASL" 1>&2; exit 1; }
21274                 else
21275                         echo "configure: warning: Could not locate Cyrus SASL" 1>&2
21276                         echo "configure: warning: SASL authentication not supported!" 1>&2
21277                         if test $ol_link_tls = no ; then
21278                                 echo "configure: warning: Strong authentication not supported!" 1>&2
21279                         fi
21280                 fi
21281         else
21282                 echo $ac_n "checking Cyrus SASL library version""... $ac_c" 1>&6
21283 echo "configure:21284: checking Cyrus SASL library version" >&5
21284 if eval "test \"\${ol_cv_sasl_compat+set}\" = set"; then
21285   echo $ac_n "(cached) $ac_c" 1>&6
21286 else
21287   
21288         cat > conftest.$ac_ext <<EOF
21289 #line 21290 "configure"
21290 #include "confdefs.h"
21291
21292 #ifdef HAVE_SASL_SASL_H
21293 #include <sasl/sasl.h>
21294 #else
21295 #include <sasl.h>
21296 #endif
21297
21298 /* require 2.1.3 or later */
21299 #if SASL_VERSION_MAJOR == 2  && SASL_VERSION_MINOR > 1
21300         char *__sasl_compat = "2.2+ or better okay (we guess)";
21301 #elif SASL_VERSION_MAJOR == 2  && SASL_VERSION_MINOR == 1 \
21302         && SASL_VERSION_STEP >=3
21303         char *__sasl_compat = "2.1.3+ or better okay";
21304 #endif
21305         
21306 EOF
21307 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21308   egrep "__sasl_compat" >/dev/null 2>&1; then
21309   rm -rf conftest*
21310   ol_cv_sasl_compat=yes
21311 else
21312   rm -rf conftest*
21313   ol_cv_sasl_compat=no
21314 fi
21315 rm -f conftest*
21316
21317 fi
21318
21319 echo "$ac_t""$ol_cv_sasl_compat" 1>&6
21320
21321                 if test $ol_cv_sasl_compat = no ; then
21322                         ol_link_sasl=no
21323                         { echo "configure: error: Cyrus SASL library located but incompatible" 1>&2; exit 1; }
21324                 fi
21325
21326                 cat >> confdefs.h <<\EOF
21327 #define HAVE_CYRUS_SASL 1
21328 EOF
21329
21330                 SASL_LIBS="$ol_link_sasl"
21331                 if test $ol_enable_spasswd != no ; then
21332                         ol_link_spasswd=yes
21333                 fi
21334
21335                 ac_save_LIBS="$LIBS"
21336                 LIBS="$LIBS $ol_link_sasl"
21337                 echo $ac_n "checking for sasl_version""... $ac_c" 1>&6
21338 echo "configure:21339: checking for sasl_version" >&5
21339 if eval "test \"\${ac_cv_func_sasl_version+set}\" = set"; then
21340   echo $ac_n "(cached) $ac_c" 1>&6
21341 else
21342   cat > conftest.$ac_ext <<EOF
21343 #line 21344 "configure"
21344 #include "confdefs.h"
21345 /* System header to define __stub macros and hopefully few prototypes,
21346     which can conflict with char sasl_version(); below.  */
21347 #include <assert.h>
21348 /* Override any gcc2 internal prototype to avoid an error.  */
21349 /* We use char because int might match the return type of a gcc2
21350     builtin and then its argument prototype would still apply.  */
21351 char sasl_version();
21352 char (*f)();
21353
21354 int main() {
21355
21356 /* The GNU C library defines this for functions which it implements
21357     to always fail with ENOSYS.  Some functions are actually named
21358     something starting with __ and the normal name is an alias.  */
21359 #if defined (__stub_sasl_version) || defined (__stub___sasl_version)
21360 choke me
21361 #else
21362 f = sasl_version;
21363 #endif
21364
21365 ; return 0; }
21366 EOF
21367 if { (eval echo configure:21368: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21368   rm -rf conftest*
21369   eval "ac_cv_func_sasl_version=yes"
21370 else
21371   echo "configure: failed program was:" >&5
21372   cat conftest.$ac_ext >&5
21373   rm -rf conftest*
21374   eval "ac_cv_func_sasl_version=no"
21375 fi
21376 rm -f conftest*
21377 fi
21378
21379 if eval "test \"`echo '$ac_cv_func_'sasl_version`\" = yes"; then
21380   echo "$ac_t""yes" 1>&6
21381   cat >> confdefs.h <<\EOF
21382 #define HAVE_SASL_VERSION 1
21383 EOF
21384
21385 else
21386   echo "$ac_t""no" 1>&6
21387 fi
21388
21389                 LIBS="$ac_save_LIBS"
21390         fi
21391
21392 else
21393         echo "configure: warning: SASL authentication not supported!" 1>&2
21394         if test $ol_link_tls = no ; then
21395                 echo "configure: warning: Strong authentication not supported!" 1>&2
21396         fi
21397 fi
21398
21399 if test $cross_compiling != yes -a "$ac_cv_mingw32" != yes ; then
21400         dev=no
21401         if test -r /dev/urandom ; then
21402                 dev="/dev/urandom";
21403         elif test -r /idev/urandom ; then
21404                 dev="/idev/urandom";
21405         elif test -r /dev/srandom ; then
21406                 dev="/dev/srandom";
21407         elif test -r /dev/random ; then
21408                 dev="/dev/random";
21409         elif test -r /idev/random ; then
21410                 dev="/idev/random";
21411         fi
21412
21413         if test $dev != no ; then
21414                 cat >> confdefs.h <<EOF
21415 #define URANDOM_DEVICE "$dev"
21416 EOF
21417
21418         fi
21419 fi
21420
21421 ol_link_fetch=no
21422 if test $ol_with_fetch != no ; then
21423         ol_LIBS=$LIBS
21424 LIBS="-lfetch -lcom_err $LIBS"
21425 echo $ac_n "checking fetch(3) library""... $ac_c" 1>&6
21426 echo "configure:21427: checking fetch(3) library" >&5
21427 if eval "test \"\${ol_cv_lib_fetch+set}\" = set"; then
21428   echo $ac_n "(cached) $ac_c" 1>&6
21429 else
21430   
21431         cat > conftest.$ac_ext <<EOF
21432 #line 21433 "configure"
21433 #include "confdefs.h"
21434
21435 #include <sys/param.h>
21436 #include <stdio.h>
21437 #include <fetch.h>
21438 int main() {
21439 struct url *u = fetchParseURL("file:///"); 
21440 ; return 0; }
21441 EOF
21442 if { (eval echo configure:21443: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21443   rm -rf conftest*
21444   ol_cv_lib_fetch=yes
21445 else
21446   echo "configure: failed program was:" >&5
21447   cat conftest.$ac_ext >&5
21448   rm -rf conftest*
21449   ol_cv_lib_fetch=no
21450 fi
21451 rm -f conftest*
21452 fi
21453
21454 echo "$ac_t""$ol_cv_lib_fetch" 1>&6
21455 LIBS=$ol_LIBS
21456 if test $ol_cv_lib_fetch != no ; then
21457         ol_link_fetch="-lfetch -lcom_err"
21458         cat >> confdefs.h <<\EOF
21459 #define HAVE_FETCH 1
21460 EOF
21461
21462 fi
21463
21464
21465         if test $ol_cv_lib_fetch != no ; then
21466                 LUTIL_LIBS="$LUTIL_LIBS $ol_link_fetch"
21467                 ol_link_fetch=freebsd
21468
21469         elif test $ol_with_fetch != auto ; then
21470                 { echo "configure: error: no suitable API for --with-fetch=$ol_with_fetch" 1>&2; exit 1; }
21471         fi 
21472 fi
21473
21474 if test $ol_enable_crypt != no ; then
21475         save_LIBS="$LIBS"
21476         LIBS="$TLS_LIBS $LIBS"
21477
21478         echo $ac_n "checking for crypt""... $ac_c" 1>&6
21479 echo "configure:21480: checking for crypt" >&5
21480 if eval "test \"\${ac_cv_func_crypt+set}\" = set"; then
21481   echo $ac_n "(cached) $ac_c" 1>&6
21482 else
21483   cat > conftest.$ac_ext <<EOF
21484 #line 21485 "configure"
21485 #include "confdefs.h"
21486 /* System header to define __stub macros and hopefully few prototypes,
21487     which can conflict with char crypt(); below.  */
21488 #include <assert.h>
21489 /* Override any gcc2 internal prototype to avoid an error.  */
21490 /* We use char because int might match the return type of a gcc2
21491     builtin and then its argument prototype would still apply.  */
21492 char crypt();
21493 char (*f)();
21494
21495 int main() {
21496
21497 /* The GNU C library defines this for functions which it implements
21498     to always fail with ENOSYS.  Some functions are actually named
21499     something starting with __ and the normal name is an alias.  */
21500 #if defined (__stub_crypt) || defined (__stub___crypt)
21501 choke me
21502 #else
21503 f = crypt;
21504 #endif
21505
21506 ; return 0; }
21507 EOF
21508 if { (eval echo configure:21509: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21509   rm -rf conftest*
21510   eval "ac_cv_func_crypt=yes"
21511 else
21512   echo "configure: failed program was:" >&5
21513   cat conftest.$ac_ext >&5
21514   rm -rf conftest*
21515   eval "ac_cv_func_crypt=no"
21516 fi
21517 rm -f conftest*
21518 fi
21519
21520 if eval "test \"`echo '$ac_cv_func_'crypt`\" = yes"; then
21521   echo "$ac_t""yes" 1>&6
21522   have_crypt=yes
21523 else
21524   echo "$ac_t""no" 1>&6
21525
21526                 LIBS="$save_LIBS"
21527                 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
21528 echo "configure:21529: checking for crypt in -lcrypt" >&5
21529 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-:%__p__%'`
21530 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
21531   echo $ac_n "(cached) $ac_c" 1>&6
21532 else
21533   ac_save_LIBS="$LIBS"
21534 LIBS="-lcrypt  $LIBS"
21535 cat > conftest.$ac_ext <<EOF
21536 #line 21537 "configure"
21537 #include "confdefs.h"
21538 /* Override any gcc2 internal prototype to avoid an error.  */
21539 /* We use char because int might match the return type of a gcc2
21540     builtin and then its argument prototype would still apply.  */
21541 char crypt();
21542
21543 int main() {
21544 crypt()
21545 ; return 0; }
21546 EOF
21547 if { (eval echo configure:21548: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21548   rm -rf conftest*
21549   eval "ac_cv_lib_$ac_lib_var=yes"
21550 else
21551   echo "configure: failed program was:" >&5
21552   cat conftest.$ac_ext >&5
21553   rm -rf conftest*
21554   eval "ac_cv_lib_$ac_lib_var=no"
21555 fi
21556 rm -f conftest*
21557 LIBS="$ac_save_LIBS"
21558
21559 fi
21560 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
21561   echo "$ac_t""yes" 1>&6
21562   LUTIL_LIBS="$LUTIL_LIBS -lcrypt"
21563                         have_crypt=yes
21564 else
21565   echo "$ac_t""no" 1>&6
21566 have_crypt=no
21567 fi
21568
21569 fi
21570
21571
21572         LIBS="$save_LIBS"
21573
21574         if test $have_crypt = yes ; then
21575                 cat >> confdefs.h <<\EOF
21576 #define HAVE_CRYPT 1
21577 EOF
21578
21579         else
21580                 echo "configure: warning: could not find crypt" 1>&2
21581                 if test $ol_enable_crypt = yes ; then
21582                         { echo "configure: error: could not find crypt" 1>&2; exit 1; }
21583                 fi
21584
21585                 echo "configure: warning: disabling crypt support" 1>&2
21586                 ol_enable_crypt=no
21587         fi
21588 fi
21589
21590 if test $ol_enable_proctitle != no ; then
21591         echo $ac_n "checking for setproctitle""... $ac_c" 1>&6
21592 echo "configure:21593: checking for setproctitle" >&5
21593 if eval "test \"\${ac_cv_func_setproctitle+set}\" = set"; then
21594   echo $ac_n "(cached) $ac_c" 1>&6
21595 else
21596   cat > conftest.$ac_ext <<EOF
21597 #line 21598 "configure"
21598 #include "confdefs.h"
21599 /* System header to define __stub macros and hopefully few prototypes,
21600     which can conflict with char setproctitle(); below.  */
21601 #include <assert.h>
21602 /* Override any gcc2 internal prototype to avoid an error.  */
21603 /* We use char because int might match the return type of a gcc2
21604     builtin and then its argument prototype would still apply.  */
21605 char setproctitle();
21606 char (*f)();
21607
21608 int main() {
21609
21610 /* The GNU C library defines this for functions which it implements
21611     to always fail with ENOSYS.  Some functions are actually named
21612     something starting with __ and the normal name is an alias.  */
21613 #if defined (__stub_setproctitle) || defined (__stub___setproctitle)
21614 choke me
21615 #else
21616 f = setproctitle;
21617 #endif
21618
21619 ; return 0; }
21620 EOF
21621 if { (eval echo configure:21622: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21622   rm -rf conftest*
21623   eval "ac_cv_func_setproctitle=yes"
21624 else
21625   echo "configure: failed program was:" >&5
21626   cat conftest.$ac_ext >&5
21627   rm -rf conftest*
21628   eval "ac_cv_func_setproctitle=no"
21629 fi
21630 rm -f conftest*
21631 fi
21632
21633 if eval "test \"`echo '$ac_cv_func_'setproctitle`\" = yes"; then
21634   echo "$ac_t""yes" 1>&6
21635   have_setproctitle=yes
21636 else
21637   echo "$ac_t""no" 1>&6
21638
21639                 echo $ac_n "checking for setproctitle in -lutil""... $ac_c" 1>&6
21640 echo "configure:21641: checking for setproctitle in -lutil" >&5
21641 ac_lib_var=`echo util'_'setproctitle | sed 'y%./+-:%__p__%'`
21642 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
21643   echo $ac_n "(cached) $ac_c" 1>&6
21644 else
21645   ac_save_LIBS="$LIBS"
21646 LIBS="-lutil  $LIBS"
21647 cat > conftest.$ac_ext <<EOF
21648 #line 21649 "configure"
21649 #include "confdefs.h"
21650 /* Override any gcc2 internal prototype to avoid an error.  */
21651 /* We use char because int might match the return type of a gcc2
21652     builtin and then its argument prototype would still apply.  */
21653 char setproctitle();
21654
21655 int main() {
21656 setproctitle()
21657 ; return 0; }
21658 EOF
21659 if { (eval echo configure:21660: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21660   rm -rf conftest*
21661   eval "ac_cv_lib_$ac_lib_var=yes"
21662 else
21663   echo "configure: failed program was:" >&5
21664   cat conftest.$ac_ext >&5
21665   rm -rf conftest*
21666   eval "ac_cv_lib_$ac_lib_var=no"
21667 fi
21668 rm -f conftest*
21669 LIBS="$ac_save_LIBS"
21670
21671 fi
21672 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
21673   echo "$ac_t""yes" 1>&6
21674   have_setproctitle=yes
21675                         LUTIL_LIBS="$LUTIL_LIBS -lutil"
21676 else
21677   echo "$ac_t""no" 1>&6
21678 have_setproctitle=no
21679                         LIBOBJS="$LIBOBJS setproctitle.o"
21680                         LIBSRCS="$LIBSRCS setproctitle.c"
21681 fi
21682
21683 fi
21684
21685
21686         if test $have_setproctitle = yes ; then
21687                 cat >> confdefs.h <<\EOF
21688 #define HAVE_SETPROCTITLE 1
21689 EOF
21690
21691         fi
21692 fi
21693
21694 if test $ol_enable_slp != no ; then
21695         for ac_hdr in slp.h 
21696 do
21697 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
21698 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
21699 echo "configure:21700: checking for $ac_hdr" >&5
21700 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
21701   echo $ac_n "(cached) $ac_c" 1>&6
21702 else
21703   cat > conftest.$ac_ext <<EOF
21704 #line 21705 "configure"
21705 #include "confdefs.h"
21706 #include <$ac_hdr>
21707 EOF
21708 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
21709 { (eval echo configure:21710: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
21710 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
21711 if test -z "$ac_err"; then
21712   rm -rf conftest*
21713   eval "ac_cv_header_$ac_safe=yes"
21714 else
21715   echo "$ac_err" >&5
21716   echo "configure: failed program was:" >&5
21717   cat conftest.$ac_ext >&5
21718   rm -rf conftest*
21719   eval "ac_cv_header_$ac_safe=no"
21720 fi
21721 rm -f conftest*
21722 fi
21723 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
21724   echo "$ac_t""yes" 1>&6
21725     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
21726   cat >> confdefs.h <<EOF
21727 #define $ac_tr_hdr 1
21728 EOF
21729  
21730 else
21731   echo "$ac_t""no" 1>&6
21732 fi
21733 done
21734
21735
21736         if test $ac_cv_header_slp_h = yes ; then
21737                 echo $ac_n "checking for SLPOpen in -lslp""... $ac_c" 1>&6
21738 echo "configure:21739: checking for SLPOpen in -lslp" >&5
21739 ac_lib_var=`echo slp'_'SLPOpen | sed 'y%./+-:%__p__%'`
21740 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
21741   echo $ac_n "(cached) $ac_c" 1>&6
21742 else
21743   ac_save_LIBS="$LIBS"
21744 LIBS="-lslp  $LIBS"
21745 cat > conftest.$ac_ext <<EOF
21746 #line 21747 "configure"
21747 #include "confdefs.h"
21748 /* Override any gcc2 internal prototype to avoid an error.  */
21749 /* We use char because int might match the return type of a gcc2
21750     builtin and then its argument prototype would still apply.  */
21751 char SLPOpen();
21752
21753 int main() {
21754 SLPOpen()
21755 ; return 0; }
21756 EOF
21757 if { (eval echo configure:21758: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21758   rm -rf conftest*
21759   eval "ac_cv_lib_$ac_lib_var=yes"
21760 else
21761   echo "configure: failed program was:" >&5
21762   cat conftest.$ac_ext >&5
21763   rm -rf conftest*
21764   eval "ac_cv_lib_$ac_lib_var=no"
21765 fi
21766 rm -f conftest*
21767 LIBS="$ac_save_LIBS"
21768
21769 fi
21770 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
21771   echo "$ac_t""yes" 1>&6
21772   have_slp=yes
21773 else
21774   echo "$ac_t""no" 1>&6
21775 have_slp=no
21776 fi
21777
21778                 if test $have_slp = yes ; then
21779                         cat >> confdefs.h <<\EOF
21780 #define HAVE_SLP 1
21781 EOF
21782
21783                         SLAPD_SLP_LIBS=-lslp
21784                 fi
21785
21786         elif test $ol_enable_slp = yes ; then
21787                 { echo "configure: error: SLP not found" 1>&2; exit 1; }
21788         fi
21789 fi
21790
21791
21792 echo $ac_n "checking long long""... $ac_c" 1>&6
21793 echo "configure:21794: checking long long" >&5
21794 if eval "test \"\${ol_cv_type_long_long+set}\" = set"; then
21795   echo $ac_n "(cached) $ac_c" 1>&6
21796 else
21797   
21798         cat > conftest.$ac_ext <<EOF
21799 #line 21800 "configure"
21800 #include "confdefs.h"
21801
21802 int main() {
21803 long long x;
21804 ; return 0; }
21805 EOF
21806 if { (eval echo configure:21807: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21807   rm -rf conftest*
21808   ol_cv_type_long_long=yes
21809 else
21810   echo "configure: failed program was:" >&5
21811   cat conftest.$ac_ext >&5
21812   rm -rf conftest*
21813   ol_cv_type_long_long=no
21814 fi
21815 rm -f conftest*
21816 fi
21817
21818 echo "$ac_t""$ol_cv_type_long_long" 1>&6
21819 if test $ol_cv_type_long_long = yes; then
21820         cat >> confdefs.h <<\EOF
21821 #define HAVE_LONG_LONG 1
21822 EOF
21823
21824 fi
21825
21826 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
21827 echo "configure:21828: checking for ANSI C header files" >&5
21828 if eval "test \"\${ac_cv_header_stdc+set}\" = set"; then
21829   echo $ac_n "(cached) $ac_c" 1>&6
21830 else
21831   cat > conftest.$ac_ext <<EOF
21832 #line 21833 "configure"
21833 #include "confdefs.h"
21834 #include <stdlib.h>
21835 #include <stdarg.h>
21836 #include <string.h>
21837 #include <float.h>
21838 EOF
21839 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
21840 { (eval echo configure:21841: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
21841 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
21842 if test -z "$ac_err"; then
21843   rm -rf conftest*
21844   ac_cv_header_stdc=yes
21845 else
21846   echo "$ac_err" >&5
21847   echo "configure: failed program was:" >&5
21848   cat conftest.$ac_ext >&5
21849   rm -rf conftest*
21850   ac_cv_header_stdc=no
21851 fi
21852 rm -f conftest*
21853
21854 if test $ac_cv_header_stdc = yes; then
21855   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
21856 cat > conftest.$ac_ext <<EOF
21857 #line 21858 "configure"
21858 #include "confdefs.h"
21859 #include <string.h>
21860 EOF
21861 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21862   egrep "memchr" >/dev/null 2>&1; then
21863   :
21864 else
21865   rm -rf conftest*
21866   ac_cv_header_stdc=no
21867 fi
21868 rm -f conftest*
21869
21870 fi
21871
21872 if test $ac_cv_header_stdc = yes; then
21873   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
21874 cat > conftest.$ac_ext <<EOF
21875 #line 21876 "configure"
21876 #include "confdefs.h"
21877 #include <stdlib.h>
21878 EOF
21879 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21880   egrep "free" >/dev/null 2>&1; then
21881   :
21882 else
21883   rm -rf conftest*
21884   ac_cv_header_stdc=no
21885 fi
21886 rm -f conftest*
21887
21888 fi
21889
21890 if test $ac_cv_header_stdc = yes; then
21891   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
21892 if test "$cross_compiling" = yes; then
21893   :
21894 else
21895   cat > conftest.$ac_ext <<EOF
21896 #line 21897 "configure"
21897 #include "confdefs.h"
21898 #include <ctype.h>
21899 #if ((' ' & 0x0FF) == 0x020)
21900 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
21901 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
21902 #else
21903 #define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
21904  || ('j' <= (c) && (c) <= 'r') \
21905  || ('s' <= (c) && (c) <= 'z'))
21906 #define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
21907 #endif
21908 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
21909 int main () { int i; for (i = 0; i < 256; i++)
21910 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
21911 exit (0); }
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   :
21917 else
21918   echo "configure: failed program was:" >&5
21919   cat conftest.$ac_ext >&5
21920   rm -fr conftest*
21921   ac_cv_header_stdc=no
21922 fi
21923 rm -fr conftest*
21924 fi
21925
21926 fi
21927 fi
21928
21929 echo "$ac_t""$ac_cv_header_stdc" 1>&6
21930 if test $ac_cv_header_stdc = yes; then
21931   cat >> confdefs.h <<\EOF
21932 #define STDC_HEADERS 1
21933 EOF
21934
21935 fi
21936
21937 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
21938 echo "configure:21939: checking for mode_t" >&5
21939 if eval "test \"\${ac_cv_type_mode_t+set}\" = set"; then
21940   echo $ac_n "(cached) $ac_c" 1>&6
21941 else
21942   cat > conftest.$ac_ext <<EOF
21943 #line 21944 "configure"
21944 #include "confdefs.h"
21945 #include <sys/types.h>
21946 #if STDC_HEADERS
21947 #include <stdlib.h>
21948 #include <stddef.h>
21949 #endif
21950
21951 EOF
21952 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21953   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
21954   rm -rf conftest*
21955   eval "ac_cv_type_mode_t=yes"
21956 else
21957   rm -rf conftest*
21958   eval "ac_cv_type_mode_t=no"
21959 fi
21960 rm -f conftest*
21961
21962 fi
21963 if eval "test \"`echo '$ac_cv_type_'mode_t`\" = yes"; then
21964   echo "$ac_t""yes" 1>&6
21965 else
21966   echo "$ac_t""no" 1>&6
21967   cat >> confdefs.h <<EOF
21968 #define mode_t int
21969 EOF
21970
21971 fi
21972
21973 echo $ac_n "checking for off_t""... $ac_c" 1>&6
21974 echo "configure:21975: checking for off_t" >&5
21975 if eval "test \"\${ac_cv_type_off_t+set}\" = set"; then
21976   echo $ac_n "(cached) $ac_c" 1>&6
21977 else
21978   cat > conftest.$ac_ext <<EOF
21979 #line 21980 "configure"
21980 #include "confdefs.h"
21981 #include <sys/types.h>
21982 #if STDC_HEADERS
21983 #include <stdlib.h>
21984 #include <stddef.h>
21985 #endif
21986
21987 EOF
21988 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21989   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
21990   rm -rf conftest*
21991   eval "ac_cv_type_off_t=yes"
21992 else
21993   rm -rf conftest*
21994   eval "ac_cv_type_off_t=no"
21995 fi
21996 rm -f conftest*
21997
21998 fi
21999 if eval "test \"`echo '$ac_cv_type_'off_t`\" = yes"; then
22000   echo "$ac_t""yes" 1>&6
22001 else
22002   echo "$ac_t""no" 1>&6
22003   cat >> confdefs.h <<EOF
22004 #define off_t long
22005 EOF
22006
22007 fi
22008
22009 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
22010 echo "configure:22011: checking for pid_t" >&5
22011 if eval "test \"\${ac_cv_type_pid_t+set}\" = set"; then
22012   echo $ac_n "(cached) $ac_c" 1>&6
22013 else
22014   cat > conftest.$ac_ext <<EOF
22015 #line 22016 "configure"
22016 #include "confdefs.h"
22017 #include <sys/types.h>
22018 #if STDC_HEADERS
22019 #include <stdlib.h>
22020 #include <stddef.h>
22021 #endif
22022
22023 EOF
22024 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
22025   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
22026   rm -rf conftest*
22027   eval "ac_cv_type_pid_t=yes"
22028 else
22029   rm -rf conftest*
22030   eval "ac_cv_type_pid_t=no"
22031 fi
22032 rm -f conftest*
22033
22034 fi
22035 if eval "test \"`echo '$ac_cv_type_'pid_t`\" = yes"; then
22036   echo "$ac_t""yes" 1>&6
22037 else
22038   echo "$ac_t""no" 1>&6
22039   cat >> confdefs.h <<EOF
22040 #define pid_t int
22041 EOF
22042
22043 fi
22044
22045 echo $ac_n "checking for ptrdiff_t""... $ac_c" 1>&6
22046 echo "configure:22047: checking for ptrdiff_t" >&5
22047 if eval "test \"\${am_cv_type_ptrdiff_t+set}\" = set"; then
22048   echo $ac_n "(cached) $ac_c" 1>&6
22049 else
22050   cat > conftest.$ac_ext <<EOF
22051 #line 22052 "configure"
22052 #include "confdefs.h"
22053 #include <stddef.h>
22054 int main() {
22055 ptrdiff_t p
22056 ; return 0; }
22057 EOF
22058 if { (eval echo configure:22059: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22059   rm -rf conftest*
22060   am_cv_type_ptrdiff_t=yes
22061 else
22062   echo "configure: failed program was:" >&5
22063   cat conftest.$ac_ext >&5
22064   rm -rf conftest*
22065   am_cv_type_ptrdiff_t=no
22066 fi
22067 rm -f conftest*
22068 fi
22069
22070 echo "$ac_t""$am_cv_type_ptrdiff_t" 1>&6
22071    if test $am_cv_type_ptrdiff_t = yes; then
22072      cat >> confdefs.h <<\EOF
22073 #define HAVE_PTRDIFF_T 1
22074 EOF
22075
22076    fi
22077
22078 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
22079 echo "configure:22080: checking return type of signal handlers" >&5
22080 if eval "test \"\${ac_cv_type_signal+set}\" = set"; then
22081   echo $ac_n "(cached) $ac_c" 1>&6
22082 else
22083   cat > conftest.$ac_ext <<EOF
22084 #line 22085 "configure"
22085 #include "confdefs.h"
22086 #include <sys/types.h>
22087 #include <signal.h>
22088 #ifdef signal
22089 #undef signal
22090 #endif
22091 #ifdef __cplusplus
22092 extern "C" void (*signal (int, void (*)(int)))(int);
22093 #else
22094 void (*signal ()) ();
22095 #endif
22096
22097 int main() {
22098 int i;
22099 ; return 0; }
22100 EOF
22101 if { (eval echo configure:22102: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22102   rm -rf conftest*
22103   ac_cv_type_signal=void
22104 else
22105   echo "configure: failed program was:" >&5
22106   cat conftest.$ac_ext >&5
22107   rm -rf conftest*
22108   ac_cv_type_signal=int
22109 fi
22110 rm -f conftest*
22111 fi
22112
22113 echo "$ac_t""$ac_cv_type_signal" 1>&6
22114 cat >> confdefs.h <<EOF
22115 #define RETSIGTYPE $ac_cv_type_signal
22116 EOF
22117
22118
22119 echo $ac_n "checking for size_t""... $ac_c" 1>&6
22120 echo "configure:22121: checking for size_t" >&5
22121 if eval "test \"\${ac_cv_type_size_t+set}\" = set"; then
22122   echo $ac_n "(cached) $ac_c" 1>&6
22123 else
22124   cat > conftest.$ac_ext <<EOF
22125 #line 22126 "configure"
22126 #include "confdefs.h"
22127 #include <sys/types.h>
22128 #if STDC_HEADERS
22129 #include <stdlib.h>
22130 #include <stddef.h>
22131 #endif
22132
22133 EOF
22134 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
22135   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
22136   rm -rf conftest*
22137   eval "ac_cv_type_size_t=yes"
22138 else
22139   rm -rf conftest*
22140   eval "ac_cv_type_size_t=no"
22141 fi
22142 rm -f conftest*
22143
22144 fi
22145 if eval "test \"`echo '$ac_cv_type_'size_t`\" = yes"; then
22146   echo "$ac_t""yes" 1>&6
22147 else
22148   echo "$ac_t""no" 1>&6
22149   cat >> confdefs.h <<EOF
22150 #define size_t unsigned
22151 EOF
22152
22153 fi
22154
22155
22156 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
22157 echo "configure:22158: checking for ssize_t" >&5
22158 if eval "test \"\${ac_cv_type_ssize_t+set}\" = set"; then
22159   echo $ac_n "(cached) $ac_c" 1>&6
22160 else
22161   cat > conftest.$ac_ext <<EOF
22162 #line 22163 "configure"
22163 #include "confdefs.h"
22164 #include <sys/types.h>
22165 #if STDC_HEADERS
22166 #include <stdlib.h>
22167 #include <stddef.h>
22168 #endif
22169
22170 EOF
22171 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
22172   egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
22173   rm -rf conftest*
22174   eval "ac_cv_type_ssize_t=yes"
22175 else
22176   rm -rf conftest*
22177   eval "ac_cv_type_ssize_t=no"
22178 fi
22179 rm -f conftest*
22180
22181 fi
22182 if eval "test \"`echo '$ac_cv_type_'ssize_t`\" = yes"; then
22183   echo "$ac_t""yes" 1>&6
22184 else
22185   echo "$ac_t""no" 1>&6
22186   cat >> confdefs.h <<EOF
22187 #define ssize_t signed int
22188 EOF
22189
22190 fi
22191
22192 echo $ac_n "checking for caddr_t""... $ac_c" 1>&6
22193 echo "configure:22194: checking for caddr_t" >&5
22194 if eval "test \"\${ac_cv_type_caddr_t+set}\" = set"; then
22195   echo $ac_n "(cached) $ac_c" 1>&6
22196 else
22197   cat > conftest.$ac_ext <<EOF
22198 #line 22199 "configure"
22199 #include "confdefs.h"
22200 #include <sys/types.h>
22201 #if STDC_HEADERS
22202 #include <stdlib.h>
22203 #include <stddef.h>
22204 #endif
22205
22206 EOF
22207 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
22208   egrep "(^|[^a-zA-Z_0-9])caddr_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
22209   rm -rf conftest*
22210   eval "ac_cv_type_caddr_t=yes"
22211 else
22212   rm -rf conftest*
22213   eval "ac_cv_type_caddr_t=no"
22214 fi
22215 rm -f conftest*
22216
22217 fi
22218 if eval "test \"`echo '$ac_cv_type_'caddr_t`\" = yes"; then
22219   echo "$ac_t""yes" 1>&6
22220 else
22221   echo "$ac_t""no" 1>&6
22222   cat >> confdefs.h <<EOF
22223 #define caddr_t char *
22224 EOF
22225
22226 fi
22227
22228
22229 echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
22230 echo "configure:22231: checking for socklen_t" >&5
22231 if eval "test \"\${ol_cv_type_socklen_t+set}\" = set"; then
22232   echo $ac_n "(cached) $ac_c" 1>&6
22233 else
22234   cat > conftest.$ac_ext <<EOF
22235 #line 22236 "configure"
22236 #include "confdefs.h"
22237
22238 #ifdef HAVE_SYS_TYPES_H
22239 #include <sys/types.h>
22240 #endif
22241 #ifdef HAVE_SYS_SOCKET_H
22242 #include <sys/socket.h>
22243 #endif
22244
22245 int main() {
22246 socklen_t len;
22247 ; return 0; }
22248 EOF
22249 if { (eval echo configure:22250: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22250   rm -rf conftest*
22251   ol_cv_type_socklen_t=yes
22252 else
22253   echo "configure: failed program was:" >&5
22254   cat conftest.$ac_ext >&5
22255   rm -rf conftest*
22256   ol_cv_type_socklen_t=no
22257 fi
22258 rm -f conftest*
22259 fi
22260
22261 echo "$ac_t""$ol_cv_type_socklen_t" 1>&6
22262   if test $ol_cv_type_socklen_t = no; then
22263     cat >> confdefs.h <<\EOF
22264 #define socklen_t int
22265 EOF
22266
22267   fi
22268  
22269 echo $ac_n "checking for member st_blksize in aggregate type struct stat""... $ac_c" 1>&6
22270 echo "configure:22271: checking for member st_blksize in aggregate type struct stat" >&5
22271 if eval "test \"\${ac_cv_c_struct_member_st_blksize+set}\" = set"; then
22272   echo $ac_n "(cached) $ac_c" 1>&6
22273 else
22274   cat > conftest.$ac_ext <<EOF
22275 #line 22276 "configure"
22276 #include "confdefs.h"
22277 #include <sys/types.h>
22278 #include <sys/stat.h>
22279 int main() {
22280 struct stat foo; foo.st_blksize;
22281 ; return 0; }
22282 EOF
22283 if { (eval echo configure:22284: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22284   rm -rf conftest*
22285   ac_cv_c_struct_member_st_blksize=yes
22286 else
22287   echo "configure: failed program was:" >&5
22288   cat conftest.$ac_ext >&5
22289   rm -rf conftest*
22290   ac_cv_c_struct_member_st_blksize=no
22291 fi
22292 rm -f conftest*
22293 fi
22294
22295 echo "$ac_t""$ac_cv_c_struct_member_st_blksize" 1>&6
22296 st_blksize="$ac_cv_c_struct_member_st_blksize"
22297 if test $ac_cv_c_struct_member_st_blksize = yes; then
22298   cat >> confdefs.h <<\EOF
22299 #define HAVE_ST_BLKSIZE 1
22300 EOF
22301
22302 fi
22303
22304 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
22305 echo "configure:22306: checking whether time.h and sys/time.h may both be included" >&5
22306 if eval "test \"\${ac_cv_header_time+set}\" = set"; then
22307   echo $ac_n "(cached) $ac_c" 1>&6
22308 else
22309   cat > conftest.$ac_ext <<EOF
22310 #line 22311 "configure"
22311 #include "confdefs.h"
22312 #include <sys/types.h>
22313 #include <sys/time.h>
22314 #include <time.h>
22315 int main() {
22316 struct tm *tp;
22317 ; return 0; }
22318 EOF
22319 if { (eval echo configure:22320: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22320   rm -rf conftest*
22321   ac_cv_header_time=yes
22322 else
22323   echo "configure: failed program was:" >&5
22324   cat conftest.$ac_ext >&5
22325   rm -rf conftest*
22326   ac_cv_header_time=no
22327 fi
22328 rm -f conftest*
22329 fi
22330
22331 echo "$ac_t""$ac_cv_header_time" 1>&6
22332 if test $ac_cv_header_time = yes; then
22333   cat >> confdefs.h <<\EOF
22334 #define TIME_WITH_SYS_TIME 1
22335 EOF
22336
22337 fi
22338
22339 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
22340 echo "configure:22341: checking whether struct tm is in sys/time.h or time.h" >&5
22341 if eval "test \"\${ac_cv_struct_tm+set}\" = set"; then
22342   echo $ac_n "(cached) $ac_c" 1>&6
22343 else
22344   cat > conftest.$ac_ext <<EOF
22345 #line 22346 "configure"
22346 #include "confdefs.h"
22347 #include <sys/types.h>
22348 #include <time.h>
22349 int main() {
22350 struct tm *tp; tp->tm_sec;
22351 ; return 0; }
22352 EOF
22353 if { (eval echo configure:22354: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22354   rm -rf conftest*
22355   ac_cv_struct_tm=time.h
22356 else
22357   echo "configure: failed program was:" >&5
22358   cat conftest.$ac_ext >&5
22359   rm -rf conftest*
22360   ac_cv_struct_tm=sys/time.h
22361 fi
22362 rm -f conftest*
22363 fi
22364
22365 echo "$ac_t""$ac_cv_struct_tm" 1>&6
22366 if test $ac_cv_struct_tm = sys/time.h; then
22367   cat >> confdefs.h <<\EOF
22368 #define TM_IN_SYS_TIME 1
22369 EOF
22370
22371 fi
22372
22373 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
22374 echo "configure:22375: checking for uid_t in sys/types.h" >&5
22375 if eval "test \"\${ac_cv_type_uid_t+set}\" = set"; then
22376   echo $ac_n "(cached) $ac_c" 1>&6
22377 else
22378   cat > conftest.$ac_ext <<EOF
22379 #line 22380 "configure"
22380 #include "confdefs.h"
22381 #include <sys/types.h>
22382 EOF
22383 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
22384   egrep "uid_t" >/dev/null 2>&1; then
22385   rm -rf conftest*
22386   ac_cv_type_uid_t=yes
22387 else
22388   rm -rf conftest*
22389   ac_cv_type_uid_t=no
22390 fi
22391 rm -f conftest*
22392
22393 fi
22394
22395 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
22396 if test $ac_cv_type_uid_t = no; then
22397   cat >> confdefs.h <<\EOF
22398 #define uid_t int
22399 EOF
22400
22401   cat >> confdefs.h <<\EOF
22402 #define gid_t int
22403 EOF
22404
22405 fi
22406
22407 echo $ac_n "checking for sig_atomic_t""... $ac_c" 1>&6
22408 echo "configure:22409: checking for sig_atomic_t" >&5
22409 if eval "test \"\${ol_cv_type_sig_atomic_t+set}\" = set"; then
22410   echo $ac_n "(cached) $ac_c" 1>&6
22411 else
22412   cat > conftest.$ac_ext <<EOF
22413 #line 22414 "configure"
22414 #include "confdefs.h"
22415 #include <signal.h>
22416 int main() {
22417 sig_atomic_t atomic;
22418 ; return 0; }
22419 EOF
22420 if { (eval echo configure:22421: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22421   rm -rf conftest*
22422   ol_cv_type_sig_atomic_t=yes
22423 else
22424   echo "configure: failed program was:" >&5
22425   cat conftest.$ac_ext >&5
22426   rm -rf conftest*
22427   ol_cv_type_sig_atomic_t=no
22428 fi
22429 rm -f conftest*
22430 fi
22431
22432 echo "$ac_t""$ol_cv_type_sig_atomic_t" 1>&6
22433   if test $ol_cv_type_sig_atomic_t = no; then
22434     cat >> confdefs.h <<\EOF
22435 #define sig_atomic_t int
22436 EOF
22437
22438   fi
22439  
22440
22441
22442 # test for pw_gecos in struct passwd
22443 echo $ac_n "checking struct passwd for pw_gecos""... $ac_c" 1>&6
22444 echo "configure:22445: checking struct passwd for pw_gecos" >&5
22445 if eval "test \"\${ol_cv_struct_passwd_pw_gecos+set}\" = set"; then
22446   echo $ac_n "(cached) $ac_c" 1>&6
22447 else
22448   
22449         cat > conftest.$ac_ext <<EOF
22450 #line 22451 "configure"
22451 #include "confdefs.h"
22452 #include <pwd.h>
22453 int main() {
22454
22455         struct passwd pwd;
22456         pwd.pw_gecos = pwd.pw_name;
22457
22458 ; return 0; }
22459 EOF
22460 if { (eval echo configure:22461: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22461   rm -rf conftest*
22462   ol_cv_struct_passwd_pw_gecos=yes
22463 else
22464   echo "configure: failed program was:" >&5
22465   cat conftest.$ac_ext >&5
22466   rm -rf conftest*
22467   ol_cv_struct_passwd_pw_gecos=no
22468 fi
22469 rm -f conftest*
22470 fi
22471
22472 echo "$ac_t""$ol_cv_struct_passwd_pw_gecos" 1>&6
22473 if test $ol_cv_struct_passwd_pw_gecos = yes ; then
22474         cat >> confdefs.h <<\EOF
22475 #define HAVE_PW_GECOS 1
22476 EOF
22477
22478 fi
22479
22480 # test for pw_passwd in struct passwd
22481 echo $ac_n "checking struct passwd for pw_passwd""... $ac_c" 1>&6
22482 echo "configure:22483: checking struct passwd for pw_passwd" >&5
22483 if eval "test \"\${ol_cv_struct_passwd_pw_passwd+set}\" = set"; then
22484   echo $ac_n "(cached) $ac_c" 1>&6
22485 else
22486   
22487         cat > conftest.$ac_ext <<EOF
22488 #line 22489 "configure"
22489 #include "confdefs.h"
22490 #include <pwd.h>
22491 int main() {
22492
22493         struct passwd pwd;
22494         pwd.pw_passwd = pwd.pw_name;
22495
22496 ; return 0; }
22497 EOF
22498 if { (eval echo configure:22499: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22499   rm -rf conftest*
22500   ol_cv_struct_passwd_pw_passwd=yes
22501 else
22502   echo "configure: failed program was:" >&5
22503   cat conftest.$ac_ext >&5
22504   rm -rf conftest*
22505   ol_cv_struct_passwd_pw_passwd=no
22506 fi
22507 rm -f conftest*
22508 fi
22509
22510 echo "$ac_t""$ol_cv_struct_passwd_pw_passwd" 1>&6
22511 if test $ol_cv_struct_passwd_pw_passwd = yes ; then
22512         cat >> confdefs.h <<\EOF
22513 #define HAVE_PW_PASSWD 1
22514 EOF
22515
22516 fi
22517
22518
22519 echo $ac_n "checking if toupper() requires islower()""... $ac_c" 1>&6
22520 echo "configure:22521: checking if toupper() requires islower()" >&5
22521 if eval "test \"\${ol_cv_c_upper_lower+set}\" = set"; then
22522   echo $ac_n "(cached) $ac_c" 1>&6
22523 else
22524   
22525         if test "$cross_compiling" = yes; then
22526   ol_cv_c_upper_lower=safe
22527 else
22528   cat > conftest.$ac_ext <<EOF
22529 #line 22530 "configure"
22530 #include "confdefs.h"
22531
22532 #include <ctype.h>
22533 main()
22534 {
22535         if ('C' == toupper('C'))
22536                 exit(0);
22537         else
22538                 exit(1);
22539 }
22540 EOF
22541 if { (eval echo configure:22542: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
22542 then
22543   ol_cv_c_upper_lower=no
22544 else
22545   echo "configure: failed program was:" >&5
22546   cat conftest.$ac_ext >&5
22547   rm -fr conftest*
22548   ol_cv_c_upper_lower=yes
22549 fi
22550 rm -fr conftest*
22551 fi
22552
22553 fi
22554
22555 echo "$ac_t""$ol_cv_c_upper_lower" 1>&6
22556 if test $ol_cv_c_upper_lower != no ; then
22557         cat >> confdefs.h <<\EOF
22558 #define C_UPPER_LOWER 1
22559 EOF
22560
22561 fi
22562
22563 echo $ac_n "checking for working const""... $ac_c" 1>&6
22564 echo "configure:22565: checking for working const" >&5
22565 if eval "test \"\${ac_cv_c_const+set}\" = set"; then
22566   echo $ac_n "(cached) $ac_c" 1>&6
22567 else
22568   cat > conftest.$ac_ext <<EOF
22569 #line 22570 "configure"
22570 #include "confdefs.h"
22571
22572 int main() {
22573
22574 /* Ultrix mips cc rejects this.  */
22575 typedef int charset[2]; const charset x;
22576 /* SunOS 4.1.1 cc rejects this.  */
22577 char const *const *ccp;
22578 char **p;
22579 /* NEC SVR4.0.2 mips cc rejects this.  */
22580 struct point {int x, y;};
22581 static struct point const zero = {0,0};
22582 /* AIX XL C 1.02.0.0 rejects this.
22583    It does not let you subtract one const X* pointer from another in an arm
22584    of an if-expression whose if-part is not a constant expression */
22585 const char *g = "string";
22586 ccp = &g + (g ? g-g : 0);
22587 /* HPUX 7.0 cc rejects these. */
22588 ++ccp;
22589 p = (char**) ccp;
22590 ccp = (char const *const *) p;
22591 { /* SCO 3.2v4 cc rejects this.  */
22592   char *t;
22593   char const *s = 0 ? (char *) 0 : (char const *) 0;
22594
22595   *t++ = 0;
22596 }
22597 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
22598   int x[] = {25, 17};
22599   const int *foo = &x[0];
22600   ++foo;
22601 }
22602 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
22603   typedef const int *iptr;
22604   iptr p = 0;
22605   ++p;
22606 }
22607 { /* AIX XL C 1.02.0.0 rejects this saying
22608      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
22609   struct s { int j; const int *ap[3]; };
22610   struct s *b; b->j = 5;
22611 }
22612 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
22613   const int foo = 10;
22614 }
22615
22616 ; return 0; }
22617 EOF
22618 if { (eval echo configure:22619: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22619   rm -rf conftest*
22620   ac_cv_c_const=yes
22621 else
22622   echo "configure: failed program was:" >&5
22623   cat conftest.$ac_ext >&5
22624   rm -rf conftest*
22625   ac_cv_c_const=no
22626 fi
22627 rm -f conftest*
22628 fi
22629
22630 echo "$ac_t""$ac_cv_c_const" 1>&6
22631 if test $ac_cv_c_const = no; then
22632   cat >> confdefs.h <<\EOF
22633 #define const 
22634 EOF
22635
22636 fi
22637
22638 echo $ac_n "checking if compiler understands volatile""... $ac_c" 1>&6
22639 echo "configure:22640: checking if compiler understands volatile" >&5
22640 if eval "test \"\${ol_cv_c_volatile+set}\" = set"; then
22641   echo $ac_n "(cached) $ac_c" 1>&6
22642 else
22643   cat > conftest.$ac_ext <<EOF
22644 #line 22645 "configure"
22645 #include "confdefs.h"
22646 int x, y, z;
22647 int main() {
22648 volatile int a; int * volatile b = x ? &y : &z;
22649       /* Older MIPS compilers (eg., in Ultrix 4.2) don't like *b = 0 */
22650       *b = 0;
22651 ; return 0; }
22652 EOF
22653 if { (eval echo configure:22654: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22654   rm -rf conftest*
22655   ol_cv_c_volatile=yes
22656 else
22657   echo "configure: failed program was:" >&5
22658   cat conftest.$ac_ext >&5
22659   rm -rf conftest*
22660   ol_cv_c_volatile=no
22661 fi
22662 rm -f conftest*
22663 fi
22664
22665 echo "$ac_t""$ol_cv_c_volatile" 1>&6
22666   if test $ol_cv_c_volatile = yes; then
22667     : 
22668   else
22669     cat >> confdefs.h <<\EOF
22670 #define volatile 
22671 EOF
22672
22673   fi
22674  
22675
22676 if test $cross_compiling = yes ; then
22677         cat >> confdefs.h <<\EOF
22678 #define CROSS_COMPILING 1
22679 EOF
22680
22681 else
22682         echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
22683 echo "configure:22684: checking whether byte ordering is bigendian" >&5
22684 if eval "test \"\${ac_cv_c_bigendian+set}\" = set"; then
22685   echo $ac_n "(cached) $ac_c" 1>&6
22686 else
22687   ac_cv_c_bigendian=unknown
22688 # See if sys/param.h defines the BYTE_ORDER macro.
22689 cat > conftest.$ac_ext <<EOF
22690 #line 22691 "configure"
22691 #include "confdefs.h"
22692 #include <sys/types.h>
22693 #include <sys/param.h>
22694 int main() {
22695
22696 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
22697  bogus endian macros
22698 #endif
22699 ; return 0; }
22700 EOF
22701 if { (eval echo configure:22702: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22702   rm -rf conftest*
22703   # It does; now see whether it defined to BIG_ENDIAN or not.
22704 cat > conftest.$ac_ext <<EOF
22705 #line 22706 "configure"
22706 #include "confdefs.h"
22707 #include <sys/types.h>
22708 #include <sys/param.h>
22709 int main() {
22710
22711 #if BYTE_ORDER != BIG_ENDIAN
22712  not big endian
22713 #endif
22714 ; return 0; }
22715 EOF
22716 if { (eval echo configure:22717: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22717   rm -rf conftest*
22718   ac_cv_c_bigendian=yes
22719 else
22720   echo "configure: failed program was:" >&5
22721   cat conftest.$ac_ext >&5
22722   rm -rf conftest*
22723   ac_cv_c_bigendian=no
22724 fi
22725 rm -f conftest*
22726 else
22727   echo "configure: failed program was:" >&5
22728   cat conftest.$ac_ext >&5
22729 fi
22730 rm -f conftest*
22731 if test $ac_cv_c_bigendian = unknown; then
22732 if test "$cross_compiling" = yes; then
22733     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
22734 else
22735   cat > conftest.$ac_ext <<EOF
22736 #line 22737 "configure"
22737 #include "confdefs.h"
22738 main () {
22739   /* Are we little or big endian?  From Harbison&Steele.  */
22740   union
22741   {
22742     long l;
22743     char c[sizeof (long)];
22744   } u;
22745   u.l = 1;
22746   exit (u.c[sizeof (long) - 1] == 1);
22747 }
22748 EOF
22749 if { (eval echo configure:22750: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
22750 then
22751   ac_cv_c_bigendian=no
22752 else
22753   echo "configure: failed program was:" >&5
22754   cat conftest.$ac_ext >&5
22755   rm -fr conftest*
22756   ac_cv_c_bigendian=yes
22757 fi
22758 rm -fr conftest*
22759 fi
22760
22761 fi
22762 fi
22763
22764 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
22765 if test $ac_cv_c_bigendian = yes; then
22766   cat >> confdefs.h <<\EOF
22767 #define WORDS_BIGENDIAN 1
22768 EOF
22769
22770 fi
22771
22772 fi
22773
22774 echo $ac_n "checking size of short""... $ac_c" 1>&6
22775 echo "configure:22776: checking size of short" >&5 
22776 if eval "test \"\${ac_cv_sizeof_short+set}\" = set"; then
22777   echo $ac_n "(cached) $ac_c" 1>&6
22778 else
22779   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
22780   cat > conftest.$ac_ext <<EOF
22781 #line 22782 "configure"
22782 #include "confdefs.h"
22783 #include "confdefs.h" 
22784 #include <sys/types.h> 
22785  
22786
22787 int main() {
22788 switch (0) case 0: case (sizeof (short) == $ac_size):;
22789 ; return 0; }
22790 EOF
22791 if { (eval echo configure:22792: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22792   rm -rf conftest*
22793   ac_cv_sizeof_short=$ac_size
22794 else
22795   echo "configure: failed program was:" >&5
22796   cat conftest.$ac_ext >&5
22797 fi
22798 rm -f conftest* 
22799   if test x$ac_cv_sizeof_short != x ; then break; fi 
22800 done 
22801
22802 fi
22803  
22804 if test x$ac_cv_sizeof_short = x ; then 
22805   { echo "configure: error: cannot determine a size for short" 1>&2; exit 1; } 
22806 fi 
22807 echo "$ac_t""$ac_cv_sizeof_short" 1>&6 
22808 cat >> confdefs.h <<EOF
22809 #define SIZEOF_SHORT $ac_cv_sizeof_short
22810 EOF
22811  
22812  
22813 echo $ac_n "checking size of int""... $ac_c" 1>&6
22814 echo "configure:22815: checking size of int" >&5 
22815 if eval "test \"\${ac_cv_sizeof_int+set}\" = set"; then
22816   echo $ac_n "(cached) $ac_c" 1>&6
22817 else
22818   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
22819   cat > conftest.$ac_ext <<EOF
22820 #line 22821 "configure"
22821 #include "confdefs.h"
22822 #include "confdefs.h" 
22823 #include <sys/types.h> 
22824  
22825
22826 int main() {
22827 switch (0) case 0: case (sizeof (int) == $ac_size):;
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   ac_cv_sizeof_int=$ac_size
22833 else
22834   echo "configure: failed program was:" >&5
22835   cat conftest.$ac_ext >&5
22836 fi
22837 rm -f conftest* 
22838   if test x$ac_cv_sizeof_int != x ; then break; fi 
22839 done 
22840
22841 fi
22842  
22843 if test x$ac_cv_sizeof_int = x ; then 
22844   { echo "configure: error: cannot determine a size for int" 1>&2; exit 1; } 
22845 fi 
22846 echo "$ac_t""$ac_cv_sizeof_int" 1>&6 
22847 cat >> confdefs.h <<EOF
22848 #define SIZEOF_INT $ac_cv_sizeof_int
22849 EOF
22850  
22851  
22852 echo $ac_n "checking size of long""... $ac_c" 1>&6
22853 echo "configure:22854: checking size of long" >&5 
22854 if eval "test \"\${ac_cv_sizeof_long+set}\" = set"; then
22855   echo $ac_n "(cached) $ac_c" 1>&6
22856 else
22857   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
22858   cat > conftest.$ac_ext <<EOF
22859 #line 22860 "configure"
22860 #include "confdefs.h"
22861 #include "confdefs.h" 
22862 #include <sys/types.h> 
22863  
22864
22865 int main() {
22866 switch (0) case 0: case (sizeof (long) == $ac_size):;
22867 ; return 0; }
22868 EOF
22869 if { (eval echo configure:22870: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22870   rm -rf conftest*
22871   ac_cv_sizeof_long=$ac_size
22872 else
22873   echo "configure: failed program was:" >&5
22874   cat conftest.$ac_ext >&5
22875 fi
22876 rm -f conftest* 
22877   if test x$ac_cv_sizeof_long != x ; then break; fi 
22878 done 
22879
22880 fi
22881  
22882 if test x$ac_cv_sizeof_long = x ; then 
22883   { echo "configure: error: cannot determine a size for long" 1>&2; exit 1; } 
22884 fi 
22885 echo "$ac_t""$ac_cv_sizeof_long" 1>&6 
22886 cat >> confdefs.h <<EOF
22887 #define SIZEOF_LONG $ac_cv_sizeof_long
22888 EOF
22889  
22890
22891
22892 if test "$ac_cv_sizeof_int" -lt 4 ; then
22893         echo "configure: warning: OpenLDAP requires 'int' to be 32 bits or greater." 1>&2
22894
22895         cat >> confdefs.h <<\EOF
22896 #define LBER_INT_T long
22897 EOF
22898
22899 else
22900         cat >> confdefs.h <<\EOF
22901 #define LBER_INT_T int
22902 EOF
22903
22904 fi
22905
22906 cat >> confdefs.h <<\EOF
22907 #define LBER_LEN_T long
22908 EOF
22909
22910 cat >> confdefs.h <<\EOF
22911 #define LBER_SOCKET_T int
22912 EOF
22913
22914 cat >> confdefs.h <<\EOF
22915 #define LBER_TAG_T long
22916 EOF
22917
22918
22919 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
22920 echo "configure:22921: checking for 8-bit clean memcmp" >&5
22921 if eval "test \"\${ac_cv_func_memcmp_clean+set}\" = set"; then
22922   echo $ac_n "(cached) $ac_c" 1>&6
22923 else
22924   if test "$cross_compiling" = yes; then
22925   ac_cv_func_memcmp_clean=no
22926 else
22927   cat > conftest.$ac_ext <<EOF
22928 #line 22929 "configure"
22929 #include "confdefs.h"
22930
22931 main()
22932 {
22933   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
22934   exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
22935 }
22936
22937 EOF
22938 if { (eval echo configure:22939: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
22939 then
22940   ac_cv_func_memcmp_clean=yes
22941 else
22942   echo "configure: failed program was:" >&5
22943   cat conftest.$ac_ext >&5
22944   rm -fr conftest*
22945   ac_cv_func_memcmp_clean=no
22946 fi
22947 rm -fr conftest*
22948 fi
22949
22950 fi
22951
22952 echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
22953 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
22954
22955 echo $ac_n "checking for strftime""... $ac_c" 1>&6
22956 echo "configure:22957: checking for strftime" >&5
22957 if eval "test \"\${ac_cv_func_strftime+set}\" = set"; then
22958   echo $ac_n "(cached) $ac_c" 1>&6
22959 else
22960   cat > conftest.$ac_ext <<EOF
22961 #line 22962 "configure"
22962 #include "confdefs.h"
22963 /* System header to define __stub macros and hopefully few prototypes,
22964     which can conflict with char strftime(); below.  */
22965 #include <assert.h>
22966 /* Override any gcc2 internal prototype to avoid an error.  */
22967 /* We use char because int might match the return type of a gcc2
22968     builtin and then its argument prototype would still apply.  */
22969 char strftime();
22970 char (*f)();
22971
22972 int main() {
22973
22974 /* The GNU C library defines this for functions which it implements
22975     to always fail with ENOSYS.  Some functions are actually named
22976     something starting with __ and the normal name is an alias.  */
22977 #if defined (__stub_strftime) || defined (__stub___strftime)
22978 choke me
22979 #else
22980 f = strftime;
22981 #endif
22982
22983 ; return 0; }
22984 EOF
22985 if { (eval echo configure:22986: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22986   rm -rf conftest*
22987   eval "ac_cv_func_strftime=yes"
22988 else
22989   echo "configure: failed program was:" >&5
22990   cat conftest.$ac_ext >&5
22991   rm -rf conftest*
22992   eval "ac_cv_func_strftime=no"
22993 fi
22994 rm -f conftest*
22995 fi
22996
22997 if eval "test \"`echo '$ac_cv_func_'strftime`\" = yes"; then
22998   echo "$ac_t""yes" 1>&6
22999   cat >> confdefs.h <<\EOF
23000 #define HAVE_STRFTIME 1
23001 EOF
23002
23003 else
23004   echo "$ac_t""no" 1>&6
23005 # strftime is in -lintl on SCO UNIX.
23006 echo $ac_n "checking for strftime in -lintl""... $ac_c" 1>&6
23007 echo "configure:23008: checking for strftime in -lintl" >&5
23008 ac_lib_var=`echo intl'_'strftime | sed 'y%./+-:%__p__%'`
23009 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
23010   echo $ac_n "(cached) $ac_c" 1>&6
23011 else
23012   ac_save_LIBS="$LIBS"
23013 LIBS="-lintl  $LIBS"
23014 cat > conftest.$ac_ext <<EOF
23015 #line 23016 "configure"
23016 #include "confdefs.h"
23017 /* Override any gcc2 internal prototype to avoid an error.  */
23018 /* We use char because int might match the return type of a gcc2
23019     builtin and then its argument prototype would still apply.  */
23020 char strftime();
23021
23022 int main() {
23023 strftime()
23024 ; return 0; }
23025 EOF
23026 if { (eval echo configure:23027: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
23027   rm -rf conftest*
23028   eval "ac_cv_lib_$ac_lib_var=yes"
23029 else
23030   echo "configure: failed program was:" >&5
23031   cat conftest.$ac_ext >&5
23032   rm -rf conftest*
23033   eval "ac_cv_lib_$ac_lib_var=no"
23034 fi
23035 rm -f conftest*
23036 LIBS="$ac_save_LIBS"
23037
23038 fi
23039 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
23040   echo "$ac_t""yes" 1>&6
23041   cat >> confdefs.h <<\EOF
23042 #define HAVE_STRFTIME 1
23043 EOF
23044
23045 LIBS="-lintl $LIBS"
23046 else
23047   echo "$ac_t""no" 1>&6
23048 fi
23049
23050 fi
23051
23052
23053 echo $ac_n "checking for inet_aton()""... $ac_c" 1>&6
23054 echo "configure:23055: checking for inet_aton()" >&5
23055 if eval "test \"\${ol_cv_func_inet_aton+set}\" = set"; then
23056   echo $ac_n "(cached) $ac_c" 1>&6
23057 else
23058   cat > conftest.$ac_ext <<EOF
23059 #line 23060 "configure"
23060 #include "confdefs.h"
23061
23062 #ifdef HAVE_SYS_TYPES_H
23063 #       include <sys/types.h>
23064 #endif
23065 #ifdef HAVE_SYS_SOCKET_H
23066 #       include <sys/socket.h>
23067 #       ifdef HAVE_SYS_SELECT_H
23068 #               include <sys/select.h>
23069 #       endif
23070 #       include <netinet/in.h>
23071 #       ifdef HAVE_ARPA_INET_H
23072 #               include <arpa/inet.h>
23073 #       endif
23074 #endif
23075
23076 int main() {
23077 struct in_addr in;
23078 int rc = inet_aton( "255.255.255.255", &in );
23079 ; return 0; }
23080 EOF
23081 if { (eval echo configure:23082: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
23082   rm -rf conftest*
23083   ol_cv_func_inet_aton=yes
23084 else
23085   echo "configure: failed program was:" >&5
23086   cat conftest.$ac_ext >&5
23087   rm -rf conftest*
23088   ol_cv_func_inet_aton=no
23089 fi
23090 rm -f conftest*
23091 fi
23092
23093 echo "$ac_t""$ol_cv_func_inet_aton" 1>&6
23094   if test $ol_cv_func_inet_aton != no; then
23095     cat >> confdefs.h <<\EOF
23096 #define HAVE_INET_ATON 1
23097 EOF
23098
23099   fi
23100  
23101
23102 echo $ac_n "checking for _spawnlp""... $ac_c" 1>&6
23103 echo "configure:23104: checking for _spawnlp" >&5
23104 if eval "test \"\${ac_cv_func__spawnlp+set}\" = set"; then
23105   echo $ac_n "(cached) $ac_c" 1>&6
23106 else
23107   cat > conftest.$ac_ext <<EOF
23108 #line 23109 "configure"
23109 #include "confdefs.h"
23110 /* System header to define __stub macros and hopefully few prototypes,
23111     which can conflict with char _spawnlp(); below.  */
23112 #include <assert.h>
23113 /* Override any gcc2 internal prototype to avoid an error.  */
23114 /* We use char because int might match the return type of a gcc2
23115     builtin and then its argument prototype would still apply.  */
23116 char _spawnlp();
23117 char (*f)();
23118
23119 int main() {
23120
23121 /* The GNU C library defines this for functions which it implements
23122     to always fail with ENOSYS.  Some functions are actually named
23123     something starting with __ and the normal name is an alias.  */
23124 #if defined (__stub__spawnlp) || defined (__stub____spawnlp)
23125 choke me
23126 #else
23127 f = _spawnlp;
23128 #endif
23129
23130 ; return 0; }
23131 EOF
23132 if { (eval echo configure:23133: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
23133   rm -rf conftest*
23134   eval "ac_cv_func__spawnlp=yes"
23135 else
23136   echo "configure: failed program was:" >&5
23137   cat conftest.$ac_ext >&5
23138   rm -rf conftest*
23139   eval "ac_cv_func__spawnlp=no"
23140 fi
23141 rm -f conftest*
23142 fi
23143
23144 if eval "test \"`echo '$ac_cv_func_'_spawnlp`\" = yes"; then
23145   echo "$ac_t""yes" 1>&6
23146   cat >> confdefs.h <<\EOF
23147 #define HAVE_SPAWNLP 1
23148 EOF
23149
23150 else
23151   echo "$ac_t""no" 1>&6
23152 fi
23153
23154
23155 echo $ac_n "checking for _snprintf""... $ac_c" 1>&6
23156 echo "configure:23157: checking for _snprintf" >&5
23157 if eval "test \"\${ac_cv_func__snprintf+set}\" = set"; then
23158   echo $ac_n "(cached) $ac_c" 1>&6
23159 else
23160   cat > conftest.$ac_ext <<EOF
23161 #line 23162 "configure"
23162 #include "confdefs.h"
23163 /* System header to define __stub macros and hopefully few prototypes,
23164     which can conflict with char _snprintf(); below.  */
23165 #include <assert.h>
23166 /* Override any gcc2 internal prototype to avoid an error.  */
23167 /* We use char because int might match the return type of a gcc2
23168     builtin and then its argument prototype would still apply.  */
23169 char _snprintf();
23170 char (*f)();
23171
23172 int main() {
23173
23174 /* The GNU C library defines this for functions which it implements
23175     to always fail with ENOSYS.  Some functions are actually named
23176     something starting with __ and the normal name is an alias.  */
23177 #if defined (__stub__snprintf) || defined (__stub____snprintf)
23178 choke me
23179 #else
23180 f = _snprintf;
23181 #endif
23182
23183 ; return 0; }
23184 EOF
23185 if { (eval echo configure:23186: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
23186   rm -rf conftest*
23187   eval "ac_cv_func__snprintf=yes"
23188 else
23189   echo "configure: failed program was:" >&5
23190   cat conftest.$ac_ext >&5
23191   rm -rf conftest*
23192   eval "ac_cv_func__snprintf=no"
23193 fi
23194 rm -f conftest*
23195 fi
23196
23197 if eval "test \"`echo '$ac_cv_func_'_snprintf`\" = yes"; then
23198   echo "$ac_t""yes" 1>&6
23199   ac_cv_func_snprintf=yes
23200         cat >> confdefs.h <<\EOF
23201 #define snprintf _snprintf
23202 EOF
23203
23204
23205 else
23206   echo "$ac_t""no" 1>&6
23207 fi
23208
23209
23210 echo $ac_n "checking for _vsnprintf""... $ac_c" 1>&6
23211 echo "configure:23212: checking for _vsnprintf" >&5
23212 if eval "test \"\${ac_cv_func__vsnprintf+set}\" = set"; then
23213   echo $ac_n "(cached) $ac_c" 1>&6
23214 else
23215   cat > conftest.$ac_ext <<EOF
23216 #line 23217 "configure"
23217 #include "confdefs.h"
23218 /* System header to define __stub macros and hopefully few prototypes,
23219     which can conflict with char _vsnprintf(); below.  */
23220 #include <assert.h>
23221 /* Override any gcc2 internal prototype to avoid an error.  */
23222 /* We use char because int might match the return type of a gcc2
23223     builtin and then its argument prototype would still apply.  */
23224 char _vsnprintf();
23225 char (*f)();
23226
23227 int main() {
23228
23229 /* The GNU C library defines this for functions which it implements
23230     to always fail with ENOSYS.  Some functions are actually named
23231     something starting with __ and the normal name is an alias.  */
23232 #if defined (__stub__vsnprintf) || defined (__stub____vsnprintf)
23233 choke me
23234 #else
23235 f = _vsnprintf;
23236 #endif
23237
23238 ; return 0; }
23239 EOF
23240 if { (eval echo configure:23241: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
23241   rm -rf conftest*
23242   eval "ac_cv_func__vsnprintf=yes"
23243 else
23244   echo "configure: failed program was:" >&5
23245   cat conftest.$ac_ext >&5
23246   rm -rf conftest*
23247   eval "ac_cv_func__vsnprintf=no"
23248 fi
23249 rm -f conftest*
23250 fi
23251
23252 if eval "test \"`echo '$ac_cv_func_'_vsnprintf`\" = yes"; then
23253   echo "$ac_t""yes" 1>&6
23254   ac_cv_func_vsnprintf=yes
23255         cat >> confdefs.h <<\EOF
23256 #define vsnprintf _vsnprintf
23257 EOF
23258
23259
23260 else
23261   echo "$ac_t""no" 1>&6
23262 fi
23263
23264
23265 echo $ac_n "checking for vprintf""... $ac_c" 1>&6
23266 echo "configure:23267: checking for vprintf" >&5
23267 if eval "test \"\${ac_cv_func_vprintf+set}\" = set"; then
23268   echo $ac_n "(cached) $ac_c" 1>&6
23269 else
23270   cat > conftest.$ac_ext <<EOF
23271 #line 23272 "configure"
23272 #include "confdefs.h"
23273 /* System header to define __stub macros and hopefully few prototypes,
23274     which can conflict with char vprintf(); below.  */
23275 #include <assert.h>
23276 /* Override any gcc2 internal prototype to avoid an error.  */
23277 /* We use char because int might match the return type of a gcc2
23278     builtin and then its argument prototype would still apply.  */
23279 char vprintf();
23280 char (*f)();
23281
23282 int main() {
23283
23284 /* The GNU C library defines this for functions which it implements
23285     to always fail with ENOSYS.  Some functions are actually named
23286     something starting with __ and the normal name is an alias.  */
23287 #if defined (__stub_vprintf) || defined (__stub___vprintf)
23288 choke me
23289 #else
23290 f = vprintf;
23291 #endif
23292
23293 ; return 0; }
23294 EOF
23295 if { (eval echo configure:23296: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
23296   rm -rf conftest*
23297   eval "ac_cv_func_vprintf=yes"
23298 else
23299   echo "configure: failed program was:" >&5
23300   cat conftest.$ac_ext >&5
23301   rm -rf conftest*
23302   eval "ac_cv_func_vprintf=no"
23303 fi
23304 rm -f conftest*
23305 fi
23306
23307 if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
23308   echo "$ac_t""yes" 1>&6
23309   cat >> confdefs.h <<\EOF
23310 #define HAVE_VPRINTF 1
23311 EOF
23312
23313 else
23314   echo "$ac_t""no" 1>&6
23315 fi
23316
23317 if test "$ac_cv_func_vprintf" != yes; then
23318 echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
23319 echo "configure:23320: checking for _doprnt" >&5
23320 if eval "test \"\${ac_cv_func__doprnt+set}\" = set"; then
23321   echo $ac_n "(cached) $ac_c" 1>&6
23322 else
23323   cat > conftest.$ac_ext <<EOF
23324 #line 23325 "configure"
23325 #include "confdefs.h"
23326 /* System header to define __stub macros and hopefully few prototypes,
23327     which can conflict with char _doprnt(); below.  */
23328 #include <assert.h>
23329 /* Override any gcc2 internal prototype to avoid an error.  */
23330 /* We use char because int might match the return type of a gcc2
23331     builtin and then its argument prototype would still apply.  */
23332 char _doprnt();
23333 char (*f)();
23334
23335 int main() {
23336
23337 /* The GNU C library defines this for functions which it implements
23338     to always fail with ENOSYS.  Some functions are actually named
23339     something starting with __ and the normal name is an alias.  */
23340 #if defined (__stub__doprnt) || defined (__stub____doprnt)
23341 choke me
23342 #else
23343 f = _doprnt;
23344 #endif
23345
23346 ; return 0; }
23347 EOF
23348 if { (eval echo configure:23349: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
23349   rm -rf conftest*
23350   eval "ac_cv_func__doprnt=yes"
23351 else
23352   echo "configure: failed program was:" >&5
23353   cat conftest.$ac_ext >&5
23354   rm -rf conftest*
23355   eval "ac_cv_func__doprnt=no"
23356 fi
23357 rm -f conftest*
23358 fi
23359
23360 if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
23361   echo "$ac_t""yes" 1>&6
23362   cat >> confdefs.h <<\EOF
23363 #define HAVE_DOPRNT 1
23364 EOF
23365
23366 else
23367   echo "$ac_t""no" 1>&6
23368 fi
23369
23370 fi
23371
23372
23373 if test $ac_cv_func_vprintf = yes ; then
23374                 for ac_func in snprintf vsnprintf
23375 do
23376 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
23377 echo "configure:23378: checking for $ac_func" >&5
23378 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
23379   echo $ac_n "(cached) $ac_c" 1>&6
23380 else
23381   cat > conftest.$ac_ext <<EOF
23382 #line 23383 "configure"
23383 #include "confdefs.h"
23384 /* System header to define __stub macros and hopefully few prototypes,
23385     which can conflict with char $ac_func(); below.  */
23386 #include <assert.h>
23387 /* Override any gcc2 internal prototype to avoid an error.  */
23388 /* We use char because int might match the return type of a gcc2
23389     builtin and then its argument prototype would still apply.  */
23390 char $ac_func();
23391 char (*f)();
23392
23393 int main() {
23394
23395 /* The GNU C library defines this for functions which it implements
23396     to always fail with ENOSYS.  Some functions are actually named
23397     something starting with __ and the normal name is an alias.  */
23398 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
23399 choke me
23400 #else
23401 f = $ac_func;
23402 #endif
23403
23404 ; return 0; }
23405 EOF
23406 if { (eval echo configure:23407: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
23407   rm -rf conftest*
23408   eval "ac_cv_func_$ac_func=yes"
23409 else
23410   echo "configure: failed program was:" >&5
23411   cat conftest.$ac_ext >&5
23412   rm -rf conftest*
23413   eval "ac_cv_func_$ac_func=no"
23414 fi
23415 rm -f conftest*
23416 fi
23417
23418 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
23419   echo "$ac_t""yes" 1>&6
23420     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
23421   cat >> confdefs.h <<EOF
23422 #define $ac_tr_func 1
23423 EOF
23424  
23425 else
23426   echo "$ac_t""no" 1>&6
23427 fi
23428 done
23429
23430 fi
23431
23432 for ac_func in \
23433         bcopy                   \
23434         closesocket             \
23435         chroot                  \
23436         endgrent                \
23437         endpwent                \
23438         fcntl                   \
23439         flock                   \
23440         fstat                   \
23441         getdtablesize   \
23442         getgrgid                \
23443         gethostname             \
23444         getpass                 \
23445         getpassphrase   \
23446         getpwuid                \
23447         getpwnam                \
23448         getspnam                \
23449         gettimeofday    \
23450         initgroups              \
23451         lockf                   \
23452         memcpy                  \
23453         memmove                 \
23454         mkstemp                 \
23455         mktemp                  \
23456         pipe                    \
23457         read                    \
23458         recv                    \
23459         recvfrom                \
23460         setpwfile               \
23461         setgid                  \
23462         setegid                 \
23463         setsid                  \
23464         setuid                  \
23465         seteuid                 \
23466         sigaction               \
23467         signal                  \
23468         sigset                  \
23469         strdup                  \
23470         strerror                \
23471         strpbrk                 \
23472         strrchr                 \
23473         strsep                  \
23474         strstr                  \
23475         strtol                  \
23476         strtoul                 \
23477         strtoq                  \
23478         strtouq                 \
23479         strtoll                 \
23480         strspn                  \
23481         sysconf                 \
23482         usleep                  \
23483         waitpid                 \
23484         wait4                   \
23485         write                   \
23486         send                    \
23487         sendmsg                 \
23488         sendto                  \
23489
23490 do
23491 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
23492 echo "configure:23493: checking for $ac_func" >&5
23493 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
23494   echo $ac_n "(cached) $ac_c" 1>&6
23495 else
23496   cat > conftest.$ac_ext <<EOF
23497 #line 23498 "configure"
23498 #include "confdefs.h"
23499 /* System header to define __stub macros and hopefully few prototypes,
23500     which can conflict with char $ac_func(); below.  */
23501 #include <assert.h>
23502 /* Override any gcc2 internal prototype to avoid an error.  */
23503 /* We use char because int might match the return type of a gcc2
23504     builtin and then its argument prototype would still apply.  */
23505 char $ac_func();
23506 char (*f)();
23507
23508 int main() {
23509
23510 /* The GNU C library defines this for functions which it implements
23511     to always fail with ENOSYS.  Some functions are actually named
23512     something starting with __ and the normal name is an alias.  */
23513 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
23514 choke me
23515 #else
23516 f = $ac_func;
23517 #endif
23518
23519 ; return 0; }
23520 EOF
23521 if { (eval echo configure:23522: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
23522   rm -rf conftest*
23523   eval "ac_cv_func_$ac_func=yes"
23524 else
23525   echo "configure: failed program was:" >&5
23526   cat conftest.$ac_ext >&5
23527   rm -rf conftest*
23528   eval "ac_cv_func_$ac_func=no"
23529 fi
23530 rm -f conftest*
23531 fi
23532
23533 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
23534   echo "$ac_t""yes" 1>&6
23535     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
23536   cat >> confdefs.h <<EOF
23537 #define $ac_tr_func 1
23538 EOF
23539  
23540 else
23541   echo "$ac_t""no" 1>&6
23542 fi
23543 done
23544
23545
23546 for ac_func in getopt getpeereid
23547 do
23548 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
23549 echo "configure:23550: checking for $ac_func" >&5
23550 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
23551   echo $ac_n "(cached) $ac_c" 1>&6
23552 else
23553   cat > conftest.$ac_ext <<EOF
23554 #line 23555 "configure"
23555 #include "confdefs.h"
23556 /* System header to define __stub macros and hopefully few prototypes,
23557     which can conflict with char $ac_func(); below.  */
23558 #include <assert.h>
23559 /* Override any gcc2 internal prototype to avoid an error.  */
23560 /* We use char because int might match the return type of a gcc2
23561     builtin and then its argument prototype would still apply.  */
23562 char $ac_func();
23563 char (*f)();
23564
23565 int main() {
23566
23567 /* The GNU C library defines this for functions which it implements
23568     to always fail with ENOSYS.  Some functions are actually named
23569     something starting with __ and the normal name is an alias.  */
23570 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
23571 choke me
23572 #else
23573 f = $ac_func;
23574 #endif
23575
23576 ; return 0; }
23577 EOF
23578 if { (eval echo configure:23579: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
23579   rm -rf conftest*
23580   eval "ac_cv_func_$ac_func=yes"
23581 else
23582   echo "configure: failed program was:" >&5
23583   cat conftest.$ac_ext >&5
23584   rm -rf conftest*
23585   eval "ac_cv_func_$ac_func=no"
23586 fi
23587 rm -f conftest*
23588 fi
23589
23590 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
23591   echo "$ac_t""yes" 1>&6
23592     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
23593   cat >> confdefs.h <<EOF
23594 #define $ac_tr_func 1
23595 EOF
23596  
23597 else
23598   echo "$ac_t""no" 1>&6
23599 LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
23600 fi
23601 done
23602
23603
23604
23605 if test "$ac_cv_func_getopt" != yes; then
23606         LIBSRCS="$LIBSRCS getopt.c"
23607 fi
23608 if test "$ac_cv_func_getpeereid" != yes; then
23609         echo $ac_n "checking for msg_accrights in msghdr""... $ac_c" 1>&6
23610 echo "configure:23611: checking for msg_accrights in msghdr" >&5
23611 if eval "test \"\${ol_cv_msghdr_msg_accrights+set}\" = set"; then
23612   echo $ac_n "(cached) $ac_c" 1>&6
23613 else
23614   cat > conftest.$ac_ext <<EOF
23615 #line 23616 "configure"
23616 #include "confdefs.h"
23617 #include <sys/socket.h>
23618 int main() {
23619 struct msghdr m; m.msg_accrightslen=0
23620 ; return 0; }
23621 EOF
23622 if { (eval echo configure:23623: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23623   rm -rf conftest*
23624   ol_cv_msghdr_msg_accrights=yes
23625 else
23626   echo "configure: failed program was:" >&5
23627   cat conftest.$ac_ext >&5
23628   rm -rf conftest*
23629   ol_cv_msghdr_msg_accrights=no
23630 fi
23631 rm -f conftest*
23632         
23633 fi
23634
23635 echo "$ac_t""$ol_cv_msghdr_msg_accrights" 1>&6
23636   if test $ol_cv_msghdr_msg_accrights = "yes" ; then
23637         cat >> confdefs.h <<\EOF
23638 #define HAVE_MSGHDR_MSG_ACCRIGHTS 1
23639 EOF
23640
23641   fi
23642
23643         LIBSRCS="$LIBSRCS getpeereid.c"
23644 fi
23645 if test "$ac_cv_func_snprintf" != yes -o "$ac_cv_func_vsnprintf" != yes; then
23646         if test "$ac_cv_func_snprintf" != yes; then
23647                 cat >> confdefs.h <<\EOF
23648 #define snprintf ber_pvt_snprintf
23649 EOF
23650
23651         fi
23652         if test "$ac_cv_func_vsnprintf" != yes; then
23653                 cat >> confdefs.h <<\EOF
23654 #define vsnprintf ber_pvt_vsnprintf
23655 EOF
23656
23657         fi
23658 fi
23659
23660 # Check Configuration
23661 echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6
23662 echo "configure:23663: checking declaration of sys_errlist" >&5
23663 if eval "test \"\${ol_cv_dcl_sys_errlist+set}\" = set"; then
23664   echo $ac_n "(cached) $ac_c" 1>&6
23665 else
23666   
23667         cat > conftest.$ac_ext <<EOF
23668 #line 23669 "configure"
23669 #include "confdefs.h"
23670
23671 #include <stdio.h>
23672 #include <sys/types.h>
23673 #include <errno.h>
23674 #ifdef WINNT
23675 #include <stdlib.h>
23676 #endif 
23677 int main() {
23678 char *c = (char *) *sys_errlist
23679 ; return 0; }
23680 EOF
23681 if { (eval echo configure:23682: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23682   rm -rf conftest*
23683   ol_cv_dcl_sys_errlist=yes
23684         ol_cv_have_sys_errlist=yes
23685 else
23686   echo "configure: failed program was:" >&5
23687   cat conftest.$ac_ext >&5
23688   rm -rf conftest*
23689   ol_cv_dcl_sys_errlist=no
23690 fi
23691 rm -f conftest*
23692 fi
23693
23694 echo "$ac_t""$ol_cv_dcl_sys_errlist" 1>&6
23695 #
23696 # It's possible (for near-UNIX clones) that sys_errlist doesn't exist
23697 if test $ol_cv_dcl_sys_errlist = no ; then
23698         cat >> confdefs.h <<\EOF
23699 #define DECL_SYS_ERRLIST 1
23700 EOF
23701
23702
23703         echo $ac_n "checking existence of sys_errlist""... $ac_c" 1>&6
23704 echo "configure:23705: checking existence of sys_errlist" >&5
23705 if eval "test \"\${ol_cv_have_sys_errlist+set}\" = set"; then
23706   echo $ac_n "(cached) $ac_c" 1>&6
23707 else
23708   
23709                 cat > conftest.$ac_ext <<EOF
23710 #line 23711 "configure"
23711 #include "confdefs.h"
23712 #include <errno.h>
23713 int main() {
23714 char *c = (char *) *sys_errlist
23715 ; return 0; }
23716 EOF
23717 if { (eval echo configure:23718: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
23718   rm -rf conftest*
23719   ol_cv_have_sys_errlist=yes
23720 else
23721   echo "configure: failed program was:" >&5
23722   cat conftest.$ac_ext >&5
23723   rm -rf conftest*
23724   ol_cv_have_sys_errlist=no
23725 fi
23726 rm -f conftest*
23727 fi
23728
23729 echo "$ac_t""$ol_cv_have_sys_errlist" 1>&6
23730 fi
23731 if test $ol_cv_have_sys_errlist = yes ; then
23732         cat >> confdefs.h <<\EOF
23733 #define HAVE_SYS_ERRLIST 1
23734 EOF
23735
23736 fi
23737
23738
23739
23740 if test "$ol_enable_slapi" != no ; then
23741                         for ac_hdr in ltdl.h
23742 do
23743 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
23744 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
23745 echo "configure:23746: checking for $ac_hdr" >&5
23746 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
23747   echo $ac_n "(cached) $ac_c" 1>&6
23748 else
23749   cat > conftest.$ac_ext <<EOF
23750 #line 23751 "configure"
23751 #include "confdefs.h"
23752 #include <$ac_hdr>
23753 EOF
23754 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
23755 { (eval echo configure:23756: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
23756 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
23757 if test -z "$ac_err"; then
23758   rm -rf conftest*
23759   eval "ac_cv_header_$ac_safe=yes"
23760 else
23761   echo "$ac_err" >&5
23762   echo "configure: failed program was:" >&5
23763   cat conftest.$ac_ext >&5
23764   rm -rf conftest*
23765   eval "ac_cv_header_$ac_safe=no"
23766 fi
23767 rm -f conftest*
23768 fi
23769 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
23770   echo "$ac_t""yes" 1>&6
23771     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
23772   cat >> confdefs.h <<EOF
23773 #define $ac_tr_hdr 1
23774 EOF
23775  
23776 else
23777   echo "$ac_t""no" 1>&6
23778 fi
23779 done
23780
23781
23782         if test $ac_cv_header_ltdl_h != yes ; then
23783                 { echo "configure: error: could not locate <ltdl.h>" 1>&2; exit 1; }
23784         fi
23785         echo $ac_n "checking for lt_dlinit in -lltdl""... $ac_c" 1>&6
23786 echo "configure:23787: checking for lt_dlinit in -lltdl" >&5
23787 ac_lib_var=`echo ltdl'_'lt_dlinit | sed 'y%./+-:%__p__%'`
23788 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
23789   echo $ac_n "(cached) $ac_c" 1>&6
23790 else
23791   ac_save_LIBS="$LIBS"
23792 LIBS="-lltdl  $LIBS"
23793 cat > conftest.$ac_ext <<EOF
23794 #line 23795 "configure"
23795 #include "confdefs.h"
23796 /* Override any gcc2 internal prototype to avoid an error.  */
23797 /* We use char because int might match the return type of a gcc2
23798     builtin and then its argument prototype would still apply.  */
23799 char lt_dlinit();
23800
23801 int main() {
23802 lt_dlinit()
23803 ; return 0; }
23804 EOF
23805 if { (eval echo configure:23806: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
23806   rm -rf conftest*
23807   eval "ac_cv_lib_$ac_lib_var=yes"
23808 else
23809   echo "configure: failed program was:" >&5
23810   cat conftest.$ac_ext >&5
23811   rm -rf conftest*
23812   eval "ac_cv_lib_$ac_lib_var=no"
23813 fi
23814 rm -f conftest*
23815 LIBS="$ac_save_LIBS"
23816
23817 fi
23818 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
23819   echo "$ac_t""yes" 1>&6
23820   
23821                 SLAPI_LIBS=-lltdl
23822                 LIBSLAPI=libslapi.a
23823                 LIBSLAPITOOLS=../libslapi.a
23824                 cat >> confdefs.h <<\EOF
23825 #define HAVE_LIBLTDL 1
23826 EOF
23827
23828         
23829 else
23830   echo "$ac_t""no" 1>&6
23831 { echo "configure: error: could not locate libtool -lltdl" 1>&2; exit 1; }
23832 fi
23833
23834
23835         cat >> confdefs.h <<\EOF
23836 #define LDAP_SLAPI 1
23837 EOF
23838
23839 fi
23840
23841 if test "$ol_enable_debug" != no ; then
23842         cat >> confdefs.h <<\EOF
23843 #define LDAP_DEBUG 1
23844 EOF
23845
23846 fi
23847 if test "$ol_enable_syslog" = yes ; then
23848         cat >> confdefs.h <<\EOF
23849 #define LDAP_SYSLOG 1
23850 EOF
23851
23852 fi
23853 if test "$ol_link_kbind" != no ; then
23854         cat >> confdefs.h <<\EOF
23855 #define LDAP_API_FEATURE_X_OPENLDAP_V2_KBIND LDAP_VENDOR_VERSION
23856 EOF
23857
23858 fi
23859 if test "$ol_enable_proctitle" != no ; then
23860         cat >> confdefs.h <<\EOF
23861 #define LDAP_PROCTITLE 1
23862 EOF
23863
23864 fi
23865 if test "$ol_enable_referrals" != no ; then
23866         cat >> confdefs.h <<\EOF
23867 #define LDAP_API_FEATURE_X_OPENLDAP_V2_REFERRALS LDAP_VENDOR_VERSION
23868 EOF
23869
23870 fi
23871 if test "$ol_enable_local" != no; then
23872         cat >> confdefs.h <<\EOF
23873 #define LDAP_PF_LOCAL 1
23874 EOF
23875
23876 fi
23877 if test "$ol_link_ipv6" != no; then
23878         cat >> confdefs.h <<\EOF
23879 #define LDAP_PF_INET6 1
23880 EOF
23881
23882 fi
23883 if test "$ol_enable_cleartext" != no ; then
23884         cat >> confdefs.h <<\EOF
23885 #define SLAPD_CLEARTEXT 1
23886 EOF
23887
23888 fi
23889 if test "$ol_enable_crypt" != no ; then
23890         cat >> confdefs.h <<\EOF
23891 #define SLAPD_CRYPT 1
23892 EOF
23893
23894 fi
23895 if test "$ol_link_kpasswd" != no ; then
23896         cat >> confdefs.h <<\EOF
23897 #define SLAPD_KPASSWD 1
23898 EOF
23899
23900 fi
23901 if test "$ol_link_spasswd" != no ; then
23902         cat >> confdefs.h <<\EOF
23903 #define SLAPD_SPASSWD 1
23904 EOF
23905
23906 fi
23907 if test "$ol_enable_multimaster" != no ; then
23908         cat >> confdefs.h <<\EOF
23909 #define SLAPD_MULTIMASTER 1
23910 EOF
23911
23912 fi
23913 if test "$ol_enable_rlookups" != no ; then
23914         cat >> confdefs.h <<\EOF
23915 #define SLAPD_RLOOKUPS 1
23916 EOF
23917
23918 fi
23919 if test "$ol_enable_aci" != no ; then
23920         cat >> confdefs.h <<\EOF
23921 #define SLAPD_ACI_ENABLED 1
23922 EOF
23923
23924 fi
23925
23926 if test "$ol_link_modules" != no ; then
23927         cat >> confdefs.h <<\EOF
23928 #define SLAPD_MODULES 1
23929 EOF
23930
23931         BUILD_SLAPD=yes
23932         SLAPD_MODULES_LDFLAGS="-dlopen self"
23933 fi
23934
23935 if test "$ol_enable_bdb" != no ; then
23936         cat >> confdefs.h <<\EOF
23937 #define SLAPD_BDB 1
23938 EOF
23939
23940         BUILD_SLAPD=yes
23941         BUILD_BDB=yes
23942         if test "$ol_with_bdb_module" != static ; then
23943                 cat >> confdefs.h <<\EOF
23944 #define SLAPD_BDB_DYNAMIC 1
23945 EOF
23946
23947                 BUILD_BDB=mod
23948                 BUILD_BDB_DYNAMIC=shared
23949                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-bdb"
23950         else
23951                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-bdb"
23952         fi
23953 fi
23954
23955 if test "$ol_link_dnssrv" != no ; then
23956         cat >> confdefs.h <<\EOF
23957 #define SLAPD_DNSSRV 1
23958 EOF
23959
23960         BUILD_SLAPD=yes
23961         BUILD_DNSSRV=yes
23962         if test "$ol_with_dnssrv_module" != static ; then
23963                 cat >> confdefs.h <<\EOF
23964 #define SLAPD_DNSSRV_DYNAMIC 1
23965 EOF
23966
23967                 BUILD_DNSSRV=mod
23968                 BUILD_DNSSRV_DYNAMIC=shared
23969                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-dnssrv"
23970         else
23971                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-dnssrv"
23972         fi
23973 fi
23974
23975 if test "$ol_enable_hdb" != no ; then
23976         cat >> confdefs.h <<\EOF
23977 #define SLAPD_HDB 1
23978 EOF
23979
23980         BUILD_SLAPD=yes
23981         BUILD_HDB=yes
23982         if test "$ol_with_hdb_module" != static ; then
23983                 cat >> confdefs.h <<\EOF
23984 #define SLAPD_HDB_DYNAMIC 1
23985 EOF
23986
23987                 BUILD_HDB=mod
23988                 BUILD_HDB_DYNAMIC=shared
23989                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-hdb"
23990         else
23991                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-hdb"
23992         fi
23993 fi
23994
23995 if test "$ol_enable_ldap" != no ; then
23996         cat >> confdefs.h <<\EOF
23997 #define SLAPD_LDAP 1
23998 EOF
23999
24000         BUILD_SLAPD=yes
24001         BUILD_LDAP=yes
24002         if test "$ol_with_ldap_module" != static ; then
24003                 cat >> confdefs.h <<\EOF
24004 #define SLAPD_LDAP_DYNAMIC 1
24005 EOF
24006
24007                 BUILD_LDAP=mod
24008                 BUILD_LDAP_DYNAMIC=shared
24009                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-ldap"
24010         else
24011                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-ldap"
24012         fi
24013 fi
24014
24015 if test "$ol_link_ldbm" != no -a $ol_enable_ldbm != no; then
24016         cat >> confdefs.h <<\EOF
24017 #define SLAPD_LDBM 1
24018 EOF
24019
24020         BUILD_SLAPD=yes
24021         BUILD_LDBM=yes
24022         if test "$ol_with_ldbm_module" != static ; then
24023                 cat >> confdefs.h <<\EOF
24024 #define SLAPD_LDBM_DYNAMIC 1
24025 EOF
24026
24027                 BUILD_LDBM=mod
24028                 BUILD_LDBM_DYNAMIC=shared
24029                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-ldbm"
24030         else
24031                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-ldbm"
24032         fi
24033 fi
24034
24035 if test "$ol_enable_meta" != no ; then
24036         if test "$ol_enable_ldap" = no ; then
24037                 { echo "configure: error: need --enable-ldap to use --enable-meta" 1>&2; exit 1; }
24038         fi
24039         if test "$ol_enable_rewrite" = no ; then
24040                 { echo "configure: error: need --enable-rewrite to use --enable-meta" 1>&2; exit 1; }
24041         fi
24042         cat >> confdefs.h <<\EOF
24043 #define SLAPD_META 1
24044 EOF
24045
24046         BUILD_SLAPD=yes
24047         BUILD_META=yes
24048         BUILD_REWRITE=yes
24049         if test $ol_enable_ldbm = yes -o \
24050                 $ol_enable_bdb = yes ; then 
24051                 BUILD_CACHE=yes
24052         fi
24053         if test "$ol_with_meta_module" != static ; then
24054                 cat >> confdefs.h <<\EOF
24055 #define SLAPD_META_DYNAMIC 1
24056 EOF
24057
24058                 BUILD_META=mod
24059                 BUILD_META_DYNAMIC=shared
24060                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-meta"
24061         else
24062                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-meta"
24063         fi
24064 fi
24065
24066 if test "$ol_enable_monitor" != no ; then
24067         cat >> confdefs.h <<\EOF
24068 #define SLAPD_MONITOR 1
24069 EOF
24070
24071         BUILD_SLAPD=yes
24072         BUILD_MONITOR=yes
24073         if test "$ol_with_monitor_module" != static ; then
24074                 cat >> confdefs.h <<\EOF
24075 #define SLAPD_MONITOR_DYNAMIC 1
24076 EOF
24077
24078                 BUILD_MONITOR=mod
24079                 BUILD_MONITOR_DYNAMIC=shared
24080                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-monitor"
24081         else
24082                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-monitor"
24083         fi
24084 fi
24085
24086 if test "$ol_enable_null" != no ; then
24087         cat >> confdefs.h <<\EOF
24088 #define SLAPD_NULL 1
24089 EOF
24090
24091         BUILD_SLAPD=yes
24092         BUILD_NULL=yes
24093         if test "$ol_with_null_module" != static ; then
24094                 cat >> confdefs.h <<\EOF
24095 #define SLAPD_NULL_DYNAMIC 1
24096 EOF
24097
24098                 BUILD_NULL=mod
24099                 BUILD_NULL_DYNAMIC=shared
24100                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-null"
24101         else
24102                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-null"
24103         fi
24104 fi
24105
24106 if test "$ol_enable_passwd" != no ; then
24107         cat >> confdefs.h <<\EOF
24108 #define SLAPD_PASSWD 1
24109 EOF
24110
24111         BUILD_SLAPD=yes
24112         BUILD_PASSWD=yes
24113         if test "$ol_with_passwd_module" != static ; then
24114                 cat >> confdefs.h <<\EOF
24115 #define SLAPD_PASSWD_DYNAMIC 1
24116 EOF
24117
24118                 BUILD_PASSWD=mod
24119                 BUILD_PASSWD_DYNAMIC=shared
24120                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-passwd"
24121         else
24122                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-passwd"
24123         fi
24124 fi
24125
24126 if test "$ol_link_perl" != no ; then
24127         cat >> confdefs.h <<\EOF
24128 #define SLAPD_PERL 1
24129 EOF
24130
24131         BUILD_SLAPD=yes
24132         BUILD_PERL=yes
24133         if test "$ol_with_perl_module" != static ; then
24134                 cat >> confdefs.h <<\EOF
24135 #define SLAPD_PERL_DYNAMIC 1
24136 EOF
24137
24138                 BUILD_PERL=mod
24139                 BUILD_PERL_DYNAMIC=shared
24140                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-perl"
24141         else
24142                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-perl"
24143         fi
24144 fi
24145
24146 if test "$ol_enable_shell" != no ; then
24147         if test "$ol_link_thread" != no ; then
24148                 echo "configure: warning: Use of --without-threads is recommended with back-shell" 1>&2
24149         fi
24150         cat >> confdefs.h <<\EOF
24151 #define SLAPD_SHELL 1
24152 EOF
24153
24154         BUILD_SLAPD=yes
24155         BUILD_SHELL=yes
24156         if test "$ol_with_shell_module" != static ; then
24157                 cat >> confdefs.h <<\EOF
24158 #define SLAPD_SHELL_DYNAMIC 1
24159 EOF
24160
24161                 BUILD_SHELL=mod
24162                 BUILD_SHELL_DYNAMIC=shared
24163                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-shell"
24164         else
24165                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-shell"
24166         fi
24167 fi
24168
24169 if test "$ol_enable_tcl" != no ; then
24170         cat >> confdefs.h <<\EOF
24171 #define SLAPD_TCL 1
24172 EOF
24173
24174         BUILD_SLAPD=yes
24175         BUILD_TCL=yes
24176         if test "$ol_with_tcl_module" != static; then
24177                 cat >> confdefs.h <<\EOF
24178 #define SLAPD_TCL_DYNAMIC 1
24179 EOF
24180
24181                 BUILD_TCL=mod
24182                 BUILD_TCL_DYNAMIC=shared
24183                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-tcl"
24184         else
24185                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-tcl"
24186         fi
24187 fi
24188
24189 if test "$ol_link_sql" != no ; then
24190         cat >> confdefs.h <<\EOF
24191 #define SLAPD_SQL 1
24192 EOF
24193
24194         BUILD_SLAPD=yes
24195         BUILD_SQL=yes
24196         if test "$ol_with_sql_module" != static; then
24197                 cat >> confdefs.h <<\EOF
24198 #define SLAPD_SQL_DYNAMIC 1
24199 EOF
24200
24201                 BUILD_SQL=mod
24202                 BUILD_SQL_DYNAMIC=shared
24203                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-sql"
24204         else
24205                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-sql"
24206         fi
24207 fi
24208
24209 if test "$ol_enable_slurpd" != no -a "$ol_link_threads" != no -a \
24210         $BUILD_SLAPD = yes ; then
24211         BUILD_SLURPD=yes
24212 fi
24213
24214 if test "$ol_enable_rewrite" != no ; then
24215         cat >> confdefs.h <<\EOF
24216 #define ENABLE_REWRITE 1
24217 EOF
24218
24219         BUILD_REWRITE=yes
24220 fi
24221
24222 if test "$ol_enable_slapi" != no ; then
24223         cat >> confdefs.h <<\EOF
24224 #define ENABLE_SLAPI 1
24225 EOF
24226
24227         BUILD_SLAPI=yes
24228         SLAPD_SLAPI_DEPEND=libslapi.a
24229 fi
24230
24231
24232
24233 if test "$ac_cv_mingw32" = yes ; then
24234         PLAT=NT
24235         SLAPD_MODULES_LDFLAGS=
24236 else
24237         PLAT=UNIX
24238 fi
24239
24240 if test -z "$SLAPD_STATIC_BACKENDS"; then
24241         SLAPD_NO_STATIC='#'
24242 else
24243         SLAPD_NO_STATIC=
24244 fi
24245
24246
24247
24248
24249
24250
24251
24252   
24253   
24254   
24255   
24256   
24257   
24258   
24259   
24260   
24261   
24262   
24263   
24264   
24265   
24266   
24267   
24268   
24269   
24270   
24271   
24272   
24273   
24274   
24275   
24276   
24277   
24278   
24279   
24280   
24281
24282
24283
24284
24285
24286
24287
24288
24289
24290
24291
24292
24293
24294
24295
24296
24297
24298
24299
24300
24301
24302
24303
24304
24305
24306
24307
24308
24309
24310
24311
24312
24313
24314
24315
24316
24317
24318
24319
24320 # Check whether --with-xxinstall or --without-xxinstall was given.
24321 if test "${with_xxinstall+set}" = set; then
24322   withval="$with_xxinstall"
24323   :
24324 fi
24325
24326
24327
24328 trap '' 1 2 15
24329
24330 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
24331
24332 test "x$prefix" = xNONE && prefix=$ac_default_prefix
24333 # Let make expand exec_prefix.
24334 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
24335
24336 # Any assignment to VPATH causes Sun make to only execute
24337 # the first set of double-colon rules, so remove it if not needed.
24338 # If there is a colon in the path, we need to keep it.
24339 if test "x$srcdir" = x.; then
24340   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
24341 fi
24342
24343 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
24344
24345 DEFS=-DHAVE_CONFIG_H
24346
24347 # Without the "./", some shells look in PATH for config.status.
24348 : ${CONFIG_STATUS=./config.status}
24349
24350 echo creating $CONFIG_STATUS
24351 rm -f $CONFIG_STATUS
24352 cat > $CONFIG_STATUS <<EOF
24353 #! /bin/sh
24354 # Generated automatically by configure.
24355 # Run this file to recreate the current configuration.
24356 # This directory was configured as follows,
24357 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
24358 #
24359 # $0 $ac_configure_args
24360 #
24361 # Compiler output produced by configure, useful for debugging
24362 # configure, is in ./config.log if it exists.
24363
24364 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
24365 for ac_option
24366 do
24367   case "\$ac_option" in
24368   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
24369     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
24370     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
24371   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
24372     echo "$CONFIG_STATUS generated by autoconf version 2.13.1"
24373     exit 0 ;;
24374   -help | --help | --hel | --he | --h)
24375     echo "\$ac_cs_usage"; exit 0 ;;
24376   *) echo "\$ac_cs_usage"; exit 1 ;;
24377   esac
24378 done
24379
24380 ac_given_srcdir=$srcdir
24381 ac_given_INSTALL="$INSTALL"
24382
24383 trap 'rm -fr `echo "\
24384 Makefile:build/top.mk:Makefile.in:build/dir.mk \
24385 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
24386 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
24387 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
24388 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
24389 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
24390 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
24391 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
24392 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
24393 include/Makefile:build/top.mk:include/Makefile.in \
24394 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
24395 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
24396 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
24397 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
24398 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
24399 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
24400 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk  \
24401 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
24402 libraries/librewrite/Makefile:build/top.mk:libraries/librewrite/Makefile.in:build/lib.mk:build/lib-static.mk \
24403 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
24404 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
24405 servers/slapd/back-bdb/Makefile:build/top.mk:servers/slapd/back-bdb/Makefile.in:build/mod.mk \
24406 servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
24407 servers/slapd/back-hdb/Makefile:build/top.mk:servers/slapd/back-hdb/Makefile.in:build/mod.mk \
24408 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
24409 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
24410 servers/slapd/back-meta/Makefile:build/top.mk:servers/slapd/back-meta/Makefile.in:build/mod.mk \
24411 servers/slapd/back-monitor/Makefile:build/top.mk:servers/slapd/back-monitor/Makefile.in:build/mod.mk \
24412 servers/slapd/back-null/Makefile:build/top.mk:servers/slapd/back-null/Makefile.in:build/mod.mk \
24413 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
24414 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
24415 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
24416 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
24417 servers/slapd/back-tcl/Makefile:build/top.mk:servers/slapd/back-tcl/Makefile.in:build/mod.mk \
24418 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
24419 servers/slapd/slapi/Makefile:build/top.mk:servers/slapd/slapi/Makefile.in:build/lib.mk:build/lib-shared.mk  \
24420 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
24421 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
24422 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
24423 tests/run \
24424 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
24425  include/portable.h include/ldap_features.h include/lber_types.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
24426 EOF
24427 cat >> $CONFIG_STATUS <<EOF
24428
24429 # Protect against being on the right side of a sed subst in config.status.
24430 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
24431  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
24432 $ac_vpsub
24433 $extrasub
24434 s%@SHELL@%$SHELL%g
24435 s%@CFLAGS@%$CFLAGS%g
24436 s%@CPPFLAGS@%$CPPFLAGS%g
24437 s%@CXXFLAGS@%$CXXFLAGS%g
24438 s%@FFLAGS@%$FFLAGS%g
24439 s%@DEFS@%$DEFS%g
24440 s%@LDFLAGS@%$LDFLAGS%g
24441 s%@LIBS@%$LIBS%g
24442 s%@exec_prefix@%$exec_prefix%g
24443 s%@prefix@%$prefix%g
24444 s%@program_transform_name@%$program_transform_name%g
24445 s%@bindir@%$bindir%g
24446 s%@sbindir@%$sbindir%g
24447 s%@libexecdir@%$libexecdir%g
24448 s%@datadir@%$datadir%g
24449 s%@sysconfdir@%$sysconfdir%g
24450 s%@sharedstatedir@%$sharedstatedir%g
24451 s%@localstatedir@%$localstatedir%g
24452 s%@libdir@%$libdir%g
24453 s%@includedir@%$includedir%g
24454 s%@oldincludedir@%$oldincludedir%g
24455 s%@infodir@%$infodir%g
24456 s%@mandir@%$mandir%g
24457 s%@host@%$host%g
24458 s%@host_alias@%$host_alias%g
24459 s%@host_cpu@%$host_cpu%g
24460 s%@host_vendor@%$host_vendor%g
24461 s%@host_os@%$host_os%g
24462 s%@target@%$target%g
24463 s%@target_alias@%$target_alias%g
24464 s%@target_cpu@%$target_cpu%g
24465 s%@target_vendor@%$target_vendor%g
24466 s%@target_os@%$target_os%g
24467 s%@build@%$build%g
24468 s%@build_alias@%$build_alias%g
24469 s%@build_cpu@%$build_cpu%g
24470 s%@build_vendor@%$build_vendor%g
24471 s%@build_os@%$build_os%g
24472 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
24473 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
24474 s%@INSTALL_DATA@%$INSTALL_DATA%g
24475 s%@PACKAGE@%$PACKAGE%g
24476 s%@VERSION@%$VERSION%g
24477 s%@ACLOCAL@%$ACLOCAL%g
24478 s%@AUTOCONF@%$AUTOCONF%g
24479 s%@AUTOMAKE@%$AUTOMAKE%g
24480 s%@AUTOHEADER@%$AUTOHEADER%g
24481 s%@MAKEINFO@%$MAKEINFO%g
24482 s%@install_sh@%$install_sh%g
24483 s%@AMTAR@%$AMTAR%g
24484 s%@AWK@%$AWK%g
24485 s%@AMTARFLAGS@%$AMTARFLAGS%g
24486 s%@SET_MAKE@%$SET_MAKE%g
24487 s%@OPENLDAP_LIBVERSION@%$OPENLDAP_LIBVERSION%g
24488 s%@OPENLDAP_RELEASE_DATE@%$OPENLDAP_RELEASE_DATE%g
24489 s%@top_builddir@%$top_builddir%g
24490 s%@ldap_subdir@%$ldap_subdir%g
24491 s%@CC@%$CC%g
24492 s%@AR@%$AR%g
24493 s%@LN_S@%$LN_S%g
24494 s%@OBJEXT@%$OBJEXT%g
24495 s%@EXEEXT@%$EXEEXT%g
24496 s%@ECHO@%$ECHO%g
24497 s%@RANLIB@%$RANLIB%g
24498 s%@STRIP@%$STRIP%g
24499 s%@DLLTOOL@%$DLLTOOL%g
24500 s%@AS@%$AS%g
24501 s%@OBJDUMP@%$OBJDUMP%g
24502 s%@CPP@%$CPP%g
24503 s%@LIBTOOL@%$LIBTOOL%g
24504 s%@LN_H@%$LN_H%g
24505 s%@PERLBIN@%$PERLBIN%g
24506 s%@OL_MKDEP@%$OL_MKDEP%g
24507 s%@OL_MKDEP_FLAGS@%$OL_MKDEP_FLAGS%g
24508 s%@LTSTATIC@%$LTSTATIC%g
24509 s%@LIBOBJS@%$LIBOBJS%g
24510 s%@LIBSRCS@%$LIBSRCS%g
24511 s%@PLAT@%$PLAT%g
24512 s%@WITH_TLS@%$WITH_TLS%g
24513 s%@BUILD_LIBS_DYNAMIC@%$BUILD_LIBS_DYNAMIC%g
24514 s%@BUILD_SLAPD@%$BUILD_SLAPD%g
24515 s%@BUILD_SLAPI@%$BUILD_SLAPI%g
24516 s%@SLAPD_SLAPI_DEPEND@%$SLAPD_SLAPI_DEPEND%g
24517 s%@BUILD_BDB@%$BUILD_BDB%g
24518 s%@BUILD_DNSSRV@%$BUILD_DNSSRV%g
24519 s%@BUILD_HDB@%$BUILD_HDB%g
24520 s%@BUILD_LDAP@%$BUILD_LDAP%g
24521 s%@BUILD_LDBM@%$BUILD_LDBM%g
24522 s%@BUILD_META@%$BUILD_META%g
24523 s%@BUILD_MONITOR@%$BUILD_MONITOR%g
24524 s%@BUILD_CACHE@%$BUILD_CACHE%g
24525 s%@BUILD_NULL@%$BUILD_NULL%g
24526 s%@BUILD_PASSWD@%$BUILD_PASSWD%g
24527 s%@BUILD_PERL@%$BUILD_PERL%g
24528 s%@BUILD_SHELL@%$BUILD_SHELL%g
24529 s%@BUILD_SQL@%$BUILD_SQL%g
24530 s%@BUILD_TCL@%$BUILD_TCL%g
24531 s%@BUILD_BDB_DYNAMIC@%$BUILD_BDB_DYNAMIC%g
24532 s%@BUILD_DNSSRV_DYNAMIC@%$BUILD_DNSSRV_DYNAMIC%g
24533 s%@BUILD_HDB_DYNAMIC@%$BUILD_HDB_DYNAMIC%g
24534 s%@BUILD_LDAP_DYNAMIC@%$BUILD_LDAP_DYNAMIC%g
24535 s%@BUILD_LDBM_DYNAMIC@%$BUILD_LDBM_DYNAMIC%g
24536 s%@BUILD_META_DYNAMIC@%$BUILD_META_DYNAMIC%g
24537 s%@BUILD_MONITOR_DYNAMIC@%$BUILD_MONITOR_DYNAMIC%g
24538 s%@BUILD_NULL_DYNAMIC@%$BUILD_NULL_DYNAMIC%g
24539 s%@BUILD_PASSWD_DYNAMIC@%$BUILD_PASSWD_DYNAMIC%g
24540 s%@BUILD_PERL_DYNAMIC@%$BUILD_PERL_DYNAMIC%g
24541 s%@BUILD_SHELL_DYNAMIC@%$BUILD_SHELL_DYNAMIC%g
24542 s%@BUILD_SQL_DYNAMIC@%$BUILD_SQL_DYNAMIC%g
24543 s%@BUILD_TCL_DYNAMIC@%$BUILD_TCL_DYNAMIC%g
24544 s%@BUILD_SLURPD@%$BUILD_SLURPD%g
24545 s%@LDAP_LIBS@%$LDAP_LIBS%g
24546 s%@SLAPD_LIBS@%$SLAPD_LIBS%g
24547 s%@SLURPD_LIBS@%$SLURPD_LIBS%g
24548 s%@LDBM_LIBS@%$LDBM_LIBS%g
24549 s%@LTHREAD_LIBS@%$LTHREAD_LIBS%g
24550 s%@LUTIL_LIBS@%$LUTIL_LIBS%g
24551 s%@WRAP_LIBS@%$WRAP_LIBS%g
24552 s%@MOD_TCL_LIB@%$MOD_TCL_LIB%g
24553 s%@SLAPD_MODULES_CPPFLAGS@%$SLAPD_MODULES_CPPFLAGS%g
24554 s%@SLAPD_MODULES_LDFLAGS@%$SLAPD_MODULES_LDFLAGS%g
24555 s%@SLAPD_NO_STATIC@%$SLAPD_NO_STATIC%g
24556 s%@SLAPD_STATIC_BACKENDS@%$SLAPD_STATIC_BACKENDS%g
24557 s%@SLAPD_DYNAMIC_BACKENDS@%$SLAPD_DYNAMIC_BACKENDS%g
24558 s%@PERL_CPPFLAGS@%$PERL_CPPFLAGS%g
24559 s%@SLAPD_PERL_LDFLAGS@%$SLAPD_PERL_LDFLAGS%g
24560 s%@MOD_PERL_LDFLAGS@%$MOD_PERL_LDFLAGS%g
24561 s%@KRB4_LIBS@%$KRB4_LIBS%g
24562 s%@KRB5_LIBS@%$KRB5_LIBS%g
24563 s%@SASL_LIBS@%$SASL_LIBS%g
24564 s%@TERMCAP_LIBS@%$TERMCAP_LIBS%g
24565 s%@TLS_LIBS@%$TLS_LIBS%g
24566 s%@MODULES_LIBS@%$MODULES_LIBS%g
24567 s%@SLAPI_LIBS@%$SLAPI_LIBS%g
24568 s%@LIBSLAPI@%$LIBSLAPI%g
24569 s%@LIBSLAPITOOLS@%$LIBSLAPITOOLS%g
24570 s%@AUTH_LIBS@%$AUTH_LIBS%g
24571 s%@SLAPD_SLP_LIBS@%$SLAPD_SLP_LIBS%g
24572 s%@SLAPD_SQL_LDFLAGS@%$SLAPD_SQL_LDFLAGS%g
24573 s%@SLAPD_SQL_LIBS@%$SLAPD_SQL_LIBS%g
24574 s%@SLAPD_SQL_INCLUDES@%$SLAPD_SQL_INCLUDES%g
24575
24576 CEOF
24577 EOF
24578
24579 cat >> $CONFIG_STATUS <<\EOF
24580
24581 # Split the substitutions into bite-sized pieces for seds with
24582 # small command number limits, like on Digital OSF/1 and HP-UX.
24583 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
24584 ac_file=1 # Number of current file.
24585 ac_beg=1 # First line for current file.
24586 ac_end=$ac_max_sed_cmds # Line after last line for current file.
24587 ac_more_lines=:
24588 ac_sed_cmds=""
24589 while $ac_more_lines; do
24590   if test $ac_beg -gt 1; then
24591     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
24592   else
24593     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
24594   fi
24595   if test ! -s conftest.s$ac_file; then
24596     ac_more_lines=false
24597     rm -f conftest.s$ac_file
24598   else
24599     if test -z "$ac_sed_cmds"; then
24600       ac_sed_cmds="sed -f conftest.s$ac_file"
24601     else
24602       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
24603     fi
24604     ac_file=`expr $ac_file + 1`
24605     ac_beg=$ac_end
24606     ac_end=`expr $ac_end + $ac_max_sed_cmds`
24607   fi
24608 done
24609 if test -z "$ac_sed_cmds"; then
24610   ac_sed_cmds=cat
24611 fi
24612 EOF
24613
24614 cat >> $CONFIG_STATUS <<EOF
24615
24616 CONFIG_FILES=\${CONFIG_FILES-"\
24617 Makefile:build/top.mk:Makefile.in:build/dir.mk \
24618 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
24619 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
24620 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
24621 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
24622 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
24623 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
24624 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
24625 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
24626 include/Makefile:build/top.mk:include/Makefile.in \
24627 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
24628 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
24629 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
24630 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
24631 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
24632 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
24633 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk  \
24634 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
24635 libraries/librewrite/Makefile:build/top.mk:libraries/librewrite/Makefile.in:build/lib.mk:build/lib-static.mk \
24636 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
24637 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
24638 servers/slapd/back-bdb/Makefile:build/top.mk:servers/slapd/back-bdb/Makefile.in:build/mod.mk \
24639 servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
24640 servers/slapd/back-hdb/Makefile:build/top.mk:servers/slapd/back-hdb/Makefile.in:build/mod.mk \
24641 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
24642 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
24643 servers/slapd/back-meta/Makefile:build/top.mk:servers/slapd/back-meta/Makefile.in:build/mod.mk \
24644 servers/slapd/back-monitor/Makefile:build/top.mk:servers/slapd/back-monitor/Makefile.in:build/mod.mk \
24645 servers/slapd/back-null/Makefile:build/top.mk:servers/slapd/back-null/Makefile.in:build/mod.mk \
24646 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
24647 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
24648 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
24649 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
24650 servers/slapd/back-tcl/Makefile:build/top.mk:servers/slapd/back-tcl/Makefile.in:build/mod.mk \
24651 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
24652 servers/slapd/slapi/Makefile:build/top.mk:servers/slapd/slapi/Makefile.in:build/lib.mk:build/lib-shared.mk  \
24653 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
24654 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
24655 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
24656 tests/run \
24657 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
24658 "}
24659 EOF
24660 cat >> $CONFIG_STATUS <<\EOF
24661 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
24662   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
24663   case "$ac_file" in
24664   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
24665        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
24666   *) ac_file_in="${ac_file}.in" ;;
24667   esac
24668
24669   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
24670
24671   # Remove last slash and all that follows it.  Not all systems have dirname.
24672   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
24673   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
24674     # The file is in a subdirectory.
24675     test ! -d "$ac_dir" && mkdir "$ac_dir"
24676     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
24677     # A "../" for each directory in $ac_dir_suffix.
24678     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
24679   else
24680     ac_dir_suffix= ac_dots=
24681   fi
24682
24683   case "$ac_given_srcdir" in
24684   .)  srcdir=.
24685       if test -z "$ac_dots"; then top_srcdir=.
24686       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
24687   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
24688   *) # Relative path.
24689     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
24690     top_srcdir="$ac_dots$ac_given_srcdir" ;;
24691   esac
24692
24693   case "$ac_given_INSTALL" in
24694   [/$]*) INSTALL="$ac_given_INSTALL" ;;
24695   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
24696   esac
24697
24698   echo creating "$ac_file"
24699   rm -f "$ac_file"
24700   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
24701   case "$ac_file" in
24702   *[Mm]akefile*) ac_comsub="1i\\
24703 # $configure_input" ;;
24704   *) ac_comsub= ;;
24705   esac
24706
24707   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
24708   sed -e "$ac_comsub
24709 s%@configure_input@%$configure_input%g
24710 s%@srcdir@%$srcdir%g
24711 s%@top_srcdir@%$top_srcdir%g
24712 s%@INSTALL@%$INSTALL%g
24713 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
24714 fi; done
24715 rm -f conftest.s*
24716
24717 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
24718 # NAME is the cpp macro being defined and VALUE is the value it is being given.
24719 #
24720 # ac_d sets the value in "#define NAME VALUE" lines.
24721 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
24722 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
24723 ac_dC='\3'
24724 ac_dD='%g'
24725 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
24726 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
24727 ac_uB='\([      ]\)%\1#\2define\3'
24728 ac_uC=' '
24729 ac_uD='\4%g'
24730 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
24731 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
24732 ac_eB='$%\1#\2define\3'
24733 ac_eC=' '
24734 ac_eD='%g'
24735
24736 if test "${CONFIG_HEADERS+set}" != set; then
24737 EOF
24738 cat >> $CONFIG_STATUS <<EOF
24739   CONFIG_HEADERS="include/portable.h include/ldap_features.h include/lber_types.h"
24740 EOF
24741 cat >> $CONFIG_STATUS <<\EOF
24742 fi
24743 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
24744   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
24745   case "$ac_file" in
24746   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
24747        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
24748   *) ac_file_in="${ac_file}.in" ;;
24749   esac
24750
24751   echo creating $ac_file
24752
24753   rm -f conftest.frag conftest.in conftest.out
24754   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
24755   cat $ac_file_inputs > conftest.in
24756
24757 EOF
24758
24759 # Transform confdefs.h into a sed script conftest.vals that substitutes
24760 # the proper values into config.h.in to produce config.h.  And first:
24761 # Protect against being on the right side of a sed subst in config.status.
24762 # Protect against being in an unquoted here document in config.status.
24763 rm -f conftest.vals
24764 cat > conftest.hdr <<\EOF
24765 s/[\\&%]/\\&/g
24766 s%[\\$`]%\\&%g
24767 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
24768 s%ac_d%ac_u%gp
24769 s%ac_u%ac_e%gp
24770 EOF
24771 sed -n -f conftest.hdr confdefs.h > conftest.vals
24772 rm -f conftest.hdr
24773
24774 # This sed command replaces #undef with comments.  This is necessary, for
24775 # example, in the case of _POSIX_SOURCE, which is predefined and required
24776 # on some systems where configure will not decide to define it.
24777 cat >> conftest.vals <<\EOF
24778 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
24779 EOF
24780
24781 # Break up conftest.vals because some shells have a limit on
24782 # the size of here documents, and old seds have small limits too.
24783
24784 rm -f conftest.tail
24785 while :
24786 do
24787   ac_lines=`grep -c . conftest.vals`
24788   # grep -c gives empty output for an empty file on some AIX systems.
24789   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
24790   # Write a limited-size here document to conftest.frag.
24791   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
24792   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
24793   echo 'CEOF
24794   sed -f conftest.frag conftest.in > conftest.out
24795   rm -f conftest.in
24796   mv conftest.out conftest.in
24797 ' >> $CONFIG_STATUS
24798   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
24799   rm -f conftest.vals
24800   mv conftest.tail conftest.vals
24801 done
24802 rm -f conftest.vals
24803
24804 cat >> $CONFIG_STATUS <<\EOF
24805   rm -f conftest.frag conftest.h
24806   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
24807   cat conftest.in >> conftest.h
24808   rm -f conftest.in
24809   if cmp -s $ac_file conftest.h 2>/dev/null; then
24810     echo "$ac_file is unchanged"
24811     rm -f conftest.h
24812   else
24813     # Remove last slash and all that follows it.  Not all systems have dirname.
24814       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
24815       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
24816       # The file is in a subdirectory.
24817       test ! -d "$ac_dir" && mkdir "$ac_dir"
24818     fi
24819     rm -f $ac_file
24820     mv conftest.h $ac_file
24821   fi
24822 fi; done
24823
24824 EOF
24825 cat >> $CONFIG_STATUS <<EOF
24826
24827 EOF
24828 cat >> $CONFIG_STATUS <<\EOF
24829
24830 chmod +x tests/run
24831 date > stamp-h
24832 echo Please run \"make depend\" to build dependencies
24833
24834 exit 0
24835 EOF
24836 chmod +x $CONFIG_STATUS
24837 rm -fr confdefs* $ac_clean_files
24838 test "$no_create" = yes || $SHELL $CONFIG_STATUS || exit 1
24839