]> git.sur5r.net Git - openldap/blob - configure
ITS#2918 fix winsock detection syntax
[openldap] / configure
1 #! /bin/sh
2 # $OpenLDAP$
3 # from OpenLDAP: pkg/ldap/configure.in,v 1.508 2004/01/01 18:15:21 kurt Exp  
4
5 # This work is part of OpenLDAP Software <http://www.openldap.org/>.
6 #
7 # Copyright 1998-2004 The OpenLDAP Foundation.
8 # All rights reserved.
9 #
10 # Redistribution and use in source and binary forms, with or without
11 # modification, are permitted only as authorized by the OpenLDAP
12 # Public License.
13 #
14 # A copy of this license is available in the file LICENSE in the
15 # top-level directory of the distribution or, alternatively, at
16 # <http://www.OpenLDAP.org/license.html>.
17
18 echo "Copyright 1998-2004 The OpenLDAP Foundation. All rights reserved."
19 echo "  Restrictions apply, see COPYRIGHT and LICENSE files."
20
21 # Guess values for system-dependent variables and create Makefiles.
22 # Generated automatically using autoconf version 2.13.1 
23 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
24 #
25 # This configure script is free software; the Free Software Foundation
26 # gives unlimited permission to copy, distribute and modify it.
27
28 # Defaults:
29 ac_help=
30 ac_default_prefix=/usr/local
31 # Any additions from configure.in:
32 ac_default_prefix=/usr/local
33 ac_help="$ac_help
34   --with-subdir=DIR       change default subdirectory used for installs"
35 ac_help="$ac_help
36   --enable-debug          enable debugging [yes]"
37 ac_help="$ac_help
38   --enable-dynamic        enable linking built binaries with dynamic libs [no]"
39 ac_help="$ac_help
40   --enable-syslog         enable syslog support [auto]"
41 ac_help="$ac_help
42   --enable-proctitle      enable proctitle support [yes]"
43 ac_help="$ac_help
44   --enable-ipv6           enable IPv6 support [auto]"
45 ac_help="$ac_help
46   --enable-local          enable AF_LOCAL (AF_UNIX) socket support [auto]"
47 ac_help="$ac_help
48   --enable-x-compile      enable cross compiling [no]"
49 ac_help="$ac_help
50   --with-cyrus-sasl       with Cyrus SASL support [auto]"
51 ac_help="$ac_help
52   --with-fetch            with fetch(3) URL support [auto]"
53 ac_help="$ac_help
54   --with-threads          with threads [auto]"
55 ac_help="$ac_help
56   --with-tls              with TLS/SSL support [auto]"
57 ac_help="$ac_help
58   --with-yielding-select  with implicitly yielding select [auto]"
59 ac_help="$ac_help
60
61 SLAPD (Standalone LDAP Daemon) Options:"
62 ac_help="$ac_help
63   --enable-slapd          enable building slapd [yes]"
64 ac_help="$ac_help
65     --enable-aci          enable per-object ACIs (experimental) [no]"
66 ac_help="$ac_help
67     --enable-cleartext    enable cleartext passwords [yes]"
68 ac_help="$ac_help
69     --enable-crypt        enable crypt(3) passwords [no]"
70 ac_help="$ac_help
71     --enable-lmpasswd     enable LAN Manager passwords [no]"
72 ac_help="$ac_help
73     --enable-spasswd      enable (Cyrus) SASL password verification [no]"
74 ac_help="$ac_help
75     --enable-modules      enable dynamic module support [no]"
76 ac_help="$ac_help
77     --enable-rewrite      enable DN rewriting in back-ldap and back-meta [no]"
78 ac_help="$ac_help
79     --enable-rlookups     enable reverse lookups of client hostnames [no]"
80 ac_help="$ac_help
81     --enable-slapi        enable SLAPI support (experimental) [no]"
82 ac_help="$ac_help
83     --enable-slp          enable SLPv2 support [no]"
84 ac_help="$ac_help
85     --enable-wrappers     enable tcp wrapper support [no]"
86 ac_help="$ac_help
87     --enable-bdb          enable Berkeley DB backend [yes]"
88 ac_help="$ac_help
89     --with-bdb-module     module type static|dynamic [static]"
90 ac_help="$ac_help
91     --enable-dnssrv       enable dnssrv backend [no]"
92 ac_help="$ac_help
93     --with-dnssrv-module  module type static|dynamic [static]"
94 ac_help="$ac_help
95     --enable-hdb          enable Hierarchical DB backend [no]"
96 ac_help="$ac_help
97     --with-hdb-module     module type static|dynamic [static]"
98 ac_help="$ac_help
99     --enable-ldap         enable ldap backend [no]"
100 ac_help="$ac_help
101     --with-ldap-module    module type static|dynamic [static]"
102 ac_help="$ac_help
103     --enable-ldbm         enable ldbm backend [no]"
104 ac_help="$ac_help
105     --with-ldbm-api       with LDBM API auto|berkeley|bcompat|mdbm|gdbm [auto]"
106 ac_help="$ac_help
107     --with-ldbm-module    module type static|dynamic [static]"
108 ac_help="$ac_help
109     --with-ldbm-type      use LDBM type auto|btree|hash [auto]"
110 ac_help="$ac_help
111     --enable-meta         enable metadirectory backend [no]"
112 ac_help="$ac_help
113     --with-meta-module    module type static|dynamic [static]"
114 ac_help="$ac_help
115     --enable-monitor      enable monitor backend [yes]"
116 ac_help="$ac_help
117     --with-monitor-module module type static|dynamic [static]"
118 ac_help="$ac_help
119     --enable-null         enable null backend [no]"
120 ac_help="$ac_help
121     --with-null-module    module type static|dynamic [static]"
122 ac_help="$ac_help
123     --enable-passwd       enable passwd backend [no]"
124 ac_help="$ac_help
125     --with-passwd-module  module type static|dynamic [static]"
126 ac_help="$ac_help
127     --enable-perl         enable perl backend [no]"
128 ac_help="$ac_help
129     --with-perl-module    module type static|dynamic [static]"
130 ac_help="$ac_help
131     --enable-shell        enable shell backend [no]"
132 ac_help="$ac_help
133     --with-shell-module   module type static|dynamic [static]"
134 ac_help="$ac_help
135     --enable-sql          enable sql backend [no]"
136 ac_help="$ac_help
137     --with-sql-module     module type static|dynamic [static]"
138 ac_help="$ac_help
139
140 SLAPD Overlay Options:"
141 ac_help="$ac_help
142     --with-dyngroup       Dynamic Group overlay no|yes|mod [no]"
143 ac_help="$ac_help
144     --with-proxycache     Proxy Cache overlay no|yes|mod [no]"
145 ac_help="$ac_help
146     --with-rwm            Rewrite/Remap overlay no|yes|mod [no]"
147 ac_help="$ac_help
148
149 SLURPD (Replication Daemon) Options:"
150 ac_help="$ac_help
151   --enable-slurpd         enable building slurpd [auto]"
152 ac_help="$ac_help
153
154 Library Generation & Linking Options"
155 ac_help="$ac_help
156   --enable-static[=PKGS]  build static libraries [default=yes]"
157 ac_help="$ac_help
158   --enable-shared[=PKGS]  build shared libraries [default=yes]"
159 ac_help="$ac_help
160   --enable-fast-install[=PKGS]  optimize for fast installation [default=yes]"
161 ac_help="$ac_help
162   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]"
163
164 # Find the correct PATH separator.  Usually this is `:', but
165 # DJGPP uses `;' like DOS.
166 if test "X${PATH_SEPARATOR+set}" != Xset; then
167   UNAME=${UNAME-`uname 2>/dev/null`}
168   case X$UNAME in
169     *-DOS) lt_cv_sys_path_separator=';' ;;
170     *)     lt_cv_sys_path_separator=':' ;;
171   esac
172   PATH_SEPARATOR=$lt_cv_sys_path_separator
173 fi
174
175
176 # Check that we are running under the correct shell.
177 SHELL=${CONFIG_SHELL-/bin/sh}
178
179 case X$ECHO in
180 X*--fallback-echo)
181   # Remove one level of quotation (which was required for Make).
182   ECHO=`echo "$ECHO" | sed 's,\\\\\$\\$0,'$0','`
183   ;;
184 esac
185
186 echo=${ECHO-echo}
187 if test "X$1" = X--no-reexec; then
188   # Discard the --no-reexec flag, and continue.
189   shift
190 elif test "X$1" = X--fallback-echo; then
191   # Avoid inline document here, it may be left over
192   :
193 elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then
194   # Yippee, $echo works!
195   :
196 else
197   # Restart under the correct shell.
198   exec $SHELL "$0" --no-reexec ${1+"$@"}
199 fi
200
201 if test "X$1" = X--fallback-echo; then
202   # used as fallback echo
203   shift
204   cat <<EOF
205
206 EOF
207   exit 0
208 fi
209
210 # The HP-UX ksh and POSIX shell print the target directory to stdout
211 # if CDPATH is set.
212 if test "X${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
213
214 if test -z "$ECHO"; then
215 if test "X${echo_test_string+set}" != Xset; then
216 # find a string as large as possible, as long as the shell can cope with it
217   for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do
218     # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
219     if (echo_test_string="`eval $cmd`") 2>/dev/null &&
220        echo_test_string="`eval $cmd`" &&
221        (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
222     then
223       break
224     fi
225   done
226 fi
227
228 if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
229    echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
230    test "X$echo_testing_string" = "X$echo_test_string"; then
231   :
232 else
233   # The Solaris, AIX, and Digital Unix default echo programs unquote
234   # backslashes.  This makes it impossible to quote backslashes using
235   #   echo "$something" | sed 's/\\/\\\\/g'
236   #
237   # So, first we look for a working echo in the user's PATH.
238
239   IFS="${IFS=   }"; save_ifs="$IFS"; IFS=$PATH_SEPARATOR
240   for dir in $PATH /usr/ucb; do
241     if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
242        test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
243        echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
244        test "X$echo_testing_string" = "X$echo_test_string"; then
245       echo="$dir/echo"
246       break
247     fi
248   done
249   IFS="$save_ifs"
250
251   if test "X$echo" = Xecho; then
252     # We didn't find a better echo, so look for alternatives.
253     if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
254        echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
255        test "X$echo_testing_string" = "X$echo_test_string"; then
256       # This shell has a builtin print -r that does the trick.
257       echo='print -r'
258     elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
259          test "X$CONFIG_SHELL" != X/bin/ksh; then
260       # If we have ksh, try running configure again with it.
261       ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
262       export ORIGINAL_CONFIG_SHELL
263       CONFIG_SHELL=/bin/ksh
264       export CONFIG_SHELL
265       exec $CONFIG_SHELL "$0" --no-reexec ${1+"$@"}
266     else
267       # Try using printf.
268       echo='printf %s\n'
269       if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
270          echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
271          test "X$echo_testing_string" = "X$echo_test_string"; then
272         # Cool, printf works
273         :
274       elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` &&
275            test "X$echo_testing_string" = 'X\t' &&
276            echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
277            test "X$echo_testing_string" = "X$echo_test_string"; then
278         CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
279         export CONFIG_SHELL
280         SHELL="$CONFIG_SHELL"
281         export SHELL
282         echo="$CONFIG_SHELL $0 --fallback-echo"
283       elif echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` &&
284            test "X$echo_testing_string" = 'X\t' &&
285            echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
286            test "X$echo_testing_string" = "X$echo_test_string"; then
287         echo="$CONFIG_SHELL $0 --fallback-echo"
288       else
289         # maybe with a smaller string...
290         prev=:
291
292         for cmd in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed 50q "$0"'; do
293           if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
294           then
295             break
296           fi
297           prev="$cmd"
298         done
299
300         if test "$prev" != 'sed 50q "$0"'; then
301           echo_test_string=`eval $prev`
302           export echo_test_string
303           exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "$0" ${1+"$@"}
304         else
305           # Oops.  We lost completely, so just stick with echo.
306           echo=echo
307         fi
308       fi
309     fi
310   fi
311 fi
312 fi
313
314 # Copy echo and quote the copy suitably for passing to libtool from
315 # the Makefile, instead of quoting the original, which is used later.
316 ECHO=$echo
317 if test "X$ECHO" = "X$CONFIG_SHELL $0 --fallback-echo"; then
318    ECHO="$CONFIG_SHELL \\\$\$0 --fallback-echo"
319 fi
320
321
322 ac_help="$ac_help
323   --disable-libtool-lock  avoid locking (might break parallel builds)"
324 ac_help="$ac_help
325   --with-pic              try to use only PIC/non-PIC objects [default=use both]"
326 ac_help="$ac_help
327
328 See INSTALL file for further details."
329
330 # Initialize some variables set by options.
331 # The variables have the same names as the options, with
332 # dashes changed to underlines.
333 build=NONE
334 cache_file=./config.cache
335 exec_prefix=NONE
336 host=NONE
337 no_create=
338 nonopt=NONE
339 no_recursion=
340 prefix=NONE
341 program_prefix=NONE
342 program_suffix=NONE
343 program_transform_name=s,x,x,
344 silent=
345 site=
346 srcdir=
347 target=NONE
348 verbose=
349 x_includes=NONE
350 x_libraries=NONE
351 bindir='${exec_prefix}/bin'
352 sbindir='${exec_prefix}/sbin'
353 libexecdir='${exec_prefix}/libexec'
354 datadir='${prefix}/share'
355 sysconfdir='${prefix}/etc'
356 sharedstatedir='${prefix}/com'
357 localstatedir='${prefix}/var'
358 libdir='${exec_prefix}/lib'
359 includedir='${prefix}/include'
360 oldincludedir='/usr/include'
361 infodir='${prefix}/info'
362 mandir='${prefix}/man'
363
364 # Initialize some other variables.
365 subdirs=
366 MFLAGS= MAKEFLAGS=
367 SHELL=${CONFIG_SHELL-/bin/sh}
368 # Maximum number of lines to put in a shell here document.
369 ac_max_here_lines=12
370
371 ac_prev=
372 for ac_option
373 do
374
375   # If the previous option needs an argument, assign it.
376   if test -n "$ac_prev"; then
377     eval "$ac_prev=\$ac_option"
378     ac_prev=
379     continue
380   fi
381
382   case "$ac_option" in
383   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
384   *) ac_optarg= ;;
385   esac
386
387   # Accept the important Cygnus configure options, so we can diagnose typos.
388
389   case "$ac_option" in
390
391   -bindir | --bindir | --bindi | --bind | --bin | --bi)
392     ac_prev=bindir ;;
393   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
394     bindir="$ac_optarg" ;;
395
396   -build | --build | --buil | --bui | --bu)
397     ac_prev=build ;;
398   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
399     build="$ac_optarg" ;;
400
401   -cache-file | --cache-file | --cache-fil | --cache-fi \
402   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
403     ac_prev=cache_file ;;
404   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
405   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
406     cache_file="$ac_optarg" ;;
407
408   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
409     ac_prev=datadir ;;
410   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
411   | --da=*)
412     datadir="$ac_optarg" ;;
413
414   -disable-* | --disable-*)
415     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
416     # Reject names that are not valid shell variable names.
417     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
418       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
419     fi
420     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
421     eval "enable_${ac_feature}=no" ;;
422
423   -enable-* | --enable-*)
424     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
425     # Reject names that are not valid shell variable names.
426     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
427       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
428     fi
429     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
430     case "$ac_option" in
431       *=*) ;;
432       *) ac_optarg=yes ;;
433     esac
434     eval "enable_${ac_feature}='$ac_optarg'" ;;
435
436   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
437   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
438   | --exec | --exe | --ex)
439     ac_prev=exec_prefix ;;
440   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
441   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
442   | --exec=* | --exe=* | --ex=*)
443     exec_prefix="$ac_optarg" ;;
444
445   -gas | --gas | --ga | --g)
446     # Obsolete; use --with-gas.
447     with_gas=yes ;;
448
449   -help | --help | --hel | --he)
450     # Omit some internal or obsolete options to make the list less imposing.
451     # This message is too long to be a string in the A/UX 3.1 sh.
452     cat << EOF
453 Usage: configure [options] [host]
454 Options: [defaults in brackets after descriptions]
455 Configuration:
456   --cache-file=FILE       cache test results in FILE
457   --help                  print this message
458   --no-create             do not create output files
459   --quiet, --silent       do not print \`checking...' messages
460   --version               print the version of autoconf that created configure
461 Directory and file names:
462   --prefix=PREFIX         install architecture-independent files in PREFIX
463                           [$ac_default_prefix]
464   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
465                           [same as prefix]
466   --bindir=DIR            user executables in DIR [EPREFIX/bin]
467   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
468   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
469   --datadir=DIR           read-only architecture-independent data in DIR
470                           [PREFIX/share]
471   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
472   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
473                           [PREFIX/com]
474   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
475   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
476   --includedir=DIR        C header files in DIR [PREFIX/include]
477   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
478   --infodir=DIR           info documentation in DIR [PREFIX/info]
479   --mandir=DIR            man documentation in DIR [PREFIX/man]
480   --srcdir=DIR            find the sources in DIR [configure dir or ..]
481   --program-prefix=PREFIX prepend PREFIX to installed program names
482   --program-suffix=SUFFIX append SUFFIX to installed program names
483   --program-transform-name=PROGRAM
484                           run sed PROGRAM on installed program names
485 EOF
486     cat << EOF
487 Host type:
488   --build=BUILD           configure for building on BUILD [BUILD=HOST]
489   --host=HOST             configure for HOST [guessed]
490   --target=TARGET         configure for TARGET [TARGET=HOST]
491 Features and packages:
492   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
493   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
494   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
495   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
496   --x-includes=DIR        X include files are in DIR
497   --x-libraries=DIR       X library files are in DIR
498 EOF
499     if test -n "$ac_help"; then
500       echo "--enable and --with options recognized:$ac_help"
501     fi
502     exit 0 ;;
503
504   -host | --host | --hos | --ho)
505     ac_prev=host ;;
506   -host=* | --host=* | --hos=* | --ho=*)
507     host="$ac_optarg" ;;
508
509   -includedir | --includedir | --includedi | --included | --include \
510   | --includ | --inclu | --incl | --inc)
511     ac_prev=includedir ;;
512   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
513   | --includ=* | --inclu=* | --incl=* | --inc=*)
514     includedir="$ac_optarg" ;;
515
516   -infodir | --infodir | --infodi | --infod | --info | --inf)
517     ac_prev=infodir ;;
518   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
519     infodir="$ac_optarg" ;;
520
521   -libdir | --libdir | --libdi | --libd)
522     ac_prev=libdir ;;
523   -libdir=* | --libdir=* | --libdi=* | --libd=*)
524     libdir="$ac_optarg" ;;
525
526   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
527   | --libexe | --libex | --libe)
528     ac_prev=libexecdir ;;
529   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
530   | --libexe=* | --libex=* | --libe=*)
531     libexecdir="$ac_optarg" ;;
532
533   -localstatedir | --localstatedir | --localstatedi | --localstated \
534   | --localstate | --localstat | --localsta | --localst \
535   | --locals | --local | --loca | --loc | --lo)
536     ac_prev=localstatedir ;;
537   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
538   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
539   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
540     localstatedir="$ac_optarg" ;;
541
542   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
543     ac_prev=mandir ;;
544   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
545     mandir="$ac_optarg" ;;
546
547   -nfp | --nfp | --nf)
548     # Obsolete; use --without-fp.
549     with_fp=no ;;
550
551   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
552   | --no-cr | --no-c)
553     no_create=yes ;;
554
555   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
556   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
557     no_recursion=yes ;;
558
559   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
560   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
561   | --oldin | --oldi | --old | --ol | --o)
562     ac_prev=oldincludedir ;;
563   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
564   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
565   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
566     oldincludedir="$ac_optarg" ;;
567
568   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
569     ac_prev=prefix ;;
570   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
571     prefix="$ac_optarg" ;;
572
573   -program-prefix | --program-prefix | --program-prefi | --program-pref \
574   | --program-pre | --program-pr | --program-p)
575     ac_prev=program_prefix ;;
576   -program-prefix=* | --program-prefix=* | --program-prefi=* \
577   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
578     program_prefix="$ac_optarg" ;;
579
580   -program-suffix | --program-suffix | --program-suffi | --program-suff \
581   | --program-suf | --program-su | --program-s)
582     ac_prev=program_suffix ;;
583   -program-suffix=* | --program-suffix=* | --program-suffi=* \
584   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
585     program_suffix="$ac_optarg" ;;
586
587   -program-transform-name | --program-transform-name \
588   | --program-transform-nam | --program-transform-na \
589   | --program-transform-n | --program-transform- \
590   | --program-transform | --program-transfor \
591   | --program-transfo | --program-transf \
592   | --program-trans | --program-tran \
593   | --progr-tra | --program-tr | --program-t)
594     ac_prev=program_transform_name ;;
595   -program-transform-name=* | --program-transform-name=* \
596   | --program-transform-nam=* | --program-transform-na=* \
597   | --program-transform-n=* | --program-transform-=* \
598   | --program-transform=* | --program-transfor=* \
599   | --program-transfo=* | --program-transf=* \
600   | --program-trans=* | --program-tran=* \
601   | --progr-tra=* | --program-tr=* | --program-t=*)
602     program_transform_name="$ac_optarg" ;;
603
604   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
605   | -silent | --silent | --silen | --sile | --sil)
606     silent=yes ;;
607
608   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
609     ac_prev=sbindir ;;
610   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
611   | --sbi=* | --sb=*)
612     sbindir="$ac_optarg" ;;
613
614   -sharedstatedir | --sharedstatedir | --sharedstatedi \
615   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
616   | --sharedst | --shareds | --shared | --share | --shar \
617   | --sha | --sh)
618     ac_prev=sharedstatedir ;;
619   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
620   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
621   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
622   | --sha=* | --sh=*)
623     sharedstatedir="$ac_optarg" ;;
624
625   -site | --site | --sit)
626     ac_prev=site ;;
627   -site=* | --site=* | --sit=*)
628     site="$ac_optarg" ;;
629
630   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
631     ac_prev=srcdir ;;
632   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
633     srcdir="$ac_optarg" ;;
634
635   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
636   | --syscon | --sysco | --sysc | --sys | --sy)
637     ac_prev=sysconfdir ;;
638   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
639   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
640     sysconfdir="$ac_optarg" ;;
641
642   -target | --target | --targe | --targ | --tar | --ta | --t)
643     ac_prev=target ;;
644   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
645     target="$ac_optarg" ;;
646
647   -v | -verbose | --verbose | --verbos | --verbo | --verb)
648     verbose=yes ;;
649
650   -version | --version | --versio | --versi | --vers)
651     echo "configure generated by autoconf version 2.13.1"
652     exit 0 ;;
653
654   -with-* | --with-*)
655     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
656     # Reject names that are not valid shell variable names.
657     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
658       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
659     fi
660     ac_package=`echo $ac_package| sed 's/-/_/g'`
661     case "$ac_option" in
662       *=*) ;;
663       *) ac_optarg=yes ;;
664     esac
665     eval "with_${ac_package}='$ac_optarg'" ;;
666
667   -without-* | --without-*)
668     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
669     # Reject names that are not valid shell variable names.
670     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
671       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
672     fi
673     ac_package=`echo $ac_package| sed 's/-/_/g'`
674     eval "with_${ac_package}=no" ;;
675
676   --x)
677     # Obsolete; use --with-x.
678     with_x=yes ;;
679
680   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
681   | --x-incl | --x-inc | --x-in | --x-i)
682     ac_prev=x_includes ;;
683   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
684   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
685     x_includes="$ac_optarg" ;;
686
687   -x-libraries | --x-libraries | --x-librarie | --x-librari \
688   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
689     ac_prev=x_libraries ;;
690   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
691   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
692     x_libraries="$ac_optarg" ;;
693
694   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
695     ;;
696
697   *)
698     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
699       echo "configure: warning: $ac_option: invalid host type" 1>&2
700     fi
701     if test "x$nonopt" != xNONE; then
702       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
703     fi
704     nonopt="$ac_option"
705     ;;
706
707   esac
708 done
709
710 if test -n "$ac_prev"; then
711   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
712 fi
713
714 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
715
716 # File descriptor usage:
717 # 0 standard input
718 # 1 file creation
719 # 2 errors and warnings
720 # 3 some systems may open it to /dev/tty
721 # 4 used on the Kubota Titan
722 # 6 checking for... messages and results
723 # 5 compiler messages saved in config.log
724 if test "$silent" = yes; then
725   exec 6>/dev/null
726 else
727   exec 6>&1
728 fi
729 exec 5>./config.log
730
731 echo "\
732 This file contains any messages produced by compilers while
733 running configure, to aid debugging if configure makes a mistake.
734 " 1>&5
735
736 # Strip out --no-create and --no-recursion so they do not pile up.
737 # Also quote any args containing shell metacharacters.
738 ac_configure_args=
739 for ac_arg
740 do
741   case "$ac_arg" in
742   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
743   | --no-cr | --no-c) ;;
744   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
745   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
746   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
747   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
748   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
749   esac
750 done
751
752 # NLS nuisances.
753 # Only set these to C if already set.  These must not be set unconditionally
754 # because not all systems understand e.g. LANG=C (notably SCO).
755 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
756 # Non-C LC_CTYPE values break the ctype check.
757 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
758 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
759 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
760 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
761
762 # confdefs.h avoids OS command line length limits that DEFS can exceed.
763 rm -rf conftest* confdefs.h
764 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
765 echo > confdefs.h
766
767 # A filename unique to this package, relative to the directory that
768 # configure is in, which we can look for to find out if srcdir is correct.
769 ac_unique_file=build/version.sh
770
771 # Find the source files, if location was not specified.
772 if test -z "$srcdir"; then
773   ac_srcdir_defaulted=yes
774   # Try the directory containing this script, then its parent.
775   ac_prog=$0
776   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
777   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
778   srcdir=$ac_confdir
779   if test ! -r $srcdir/$ac_unique_file; then
780     srcdir=..
781   fi
782 else
783   ac_srcdir_defaulted=no
784 fi
785 if test ! -r $srcdir/$ac_unique_file; then
786   if test "$ac_srcdir_defaulted" = yes; then
787     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
788   else
789     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
790   fi
791 fi
792 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
793
794 # Prefer explicitly selected file to automatically selected ones.
795 if test -z "$CONFIG_SITE"; then
796   if test "x$prefix" != xNONE; then
797     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
798   else
799     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
800   fi
801 fi
802 for ac_site_file in $CONFIG_SITE; do
803   if test -r "$ac_site_file"; then
804     echo "loading site script $ac_site_file"
805     . "$ac_site_file"
806   fi
807 done
808
809
810 ac_ext=c
811 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
812 ac_cpp='$CPP $CPPFLAGS'
813 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
814 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
815 cross_compiling=$ac_cv_prog_cc_cross
816
817 ac_exeext=
818 ac_objext=o
819 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
820   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
821   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
822     ac_n= ac_c='
823 ' ac_t='        '
824   else
825     ac_n=-n ac_c= ac_t=
826   fi
827 else
828   ac_n= ac_c='\c' ac_t=
829 fi
830
831
832 # set unset (borrowed from autoconf 2.49c)
833 if (OL_FOO=OL_FOO; unset OL_FOO) >/dev/null 2>&1; then
834   ol_unset=unset
835 else
836   ol_unset=false
837 fi
838 # unset CDPATH
839 $ol_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
840
841 ac_aux_dir=
842 for ac_dir in build $srcdir/build; do
843   if test -f $ac_dir/install-sh; then
844     ac_aux_dir=$ac_dir
845     ac_install_sh="$ac_aux_dir/install-sh -c"
846     break
847   elif test -f $ac_dir/install.sh; then
848     ac_aux_dir=$ac_dir
849     ac_install_sh="$ac_aux_dir/install.sh -c"
850     break
851   elif test -f $ac_dir/shtool; then
852     ac_aux_dir=$ac_dir
853     ac_install_sh="$ac_aux_dir/shtool install -c"
854     break
855   fi
856 done
857 if test -z "$ac_aux_dir"; then
858   { echo "configure: error: can not find install-sh or install.sh in build $srcdir/build" 1>&2; exit 1; }
859 fi
860 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
861 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
862 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
863
864 eval `$ac_aux_dir/version.sh`
865 if test -z "$OL_STRING"; then
866         { echo "configure: error: could not determine version" 1>&2; exit 1; }
867 fi
868
869 if test -f "$ac_aux_dir/shtool" -a ! -d $ac_aux_dir/shtool; then
870         ac_cv_shtool="$ac_aux_dir/shtool"
871 else
872         { echo "configure: error: no shtool found in $ac_aux_dir" 1>&2; exit 1; }
873 fi
874
875 SHTOOL="$ac_cv_shtool"
876
877 TB="`$SHTOOL echo -e '%B' 2>/dev/null`"
878 TN="`$SHTOOL echo -e '%b' 2>/dev/null`"
879
880 OPENLDAP_CVS=""
881 if test -d $ac_aux_dir/CVS; then
882         OPENLDAP_CVS="(from CVS sources) "
883 fi
884
885 echo "Configuring ${TB}${OL_STRING}${TN} ${OPENLDAP_CVS}..."
886
887
888 echo $ac_n "checking host system type""... $ac_c" 1>&6
889 echo "configure:890: checking host system type" >&5
890 if test "x$ac_cv_host" = "x" || (test "x$host" != "xNONE" && test "x$host" != "x$ac_cv_host_alias"); then
891
892 # Make sure we can run config.sub.
893   if $ac_config_sub sun4 >/dev/null 2>&1; then :
894     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
895   fi
896
897   ac_cv_host_alias=$host
898   case "$ac_cv_host_alias" in
899   NONE)
900     case $nonopt in
901     NONE)
902       if ac_cv_host_alias=`$ac_config_guess`; then :
903       else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
904       fi ;;
905     *) ac_cv_host_alias=$nonopt ;;
906     esac ;;
907   esac
908
909   ac_cv_host=`$ac_config_sub $ac_cv_host_alias`
910   ac_cv_host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
911   ac_cv_host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
912   ac_cv_host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
913 else
914   echo $ac_n "(cached) $ac_c" 1>&6
915 fi
916
917 echo "$ac_t""$ac_cv_host" 1>&6
918
919 host=$ac_cv_host
920 host_alias=$ac_cv_host_alias
921 host_cpu=$ac_cv_host_cpu
922 host_vendor=$ac_cv_host_vendor
923 host_os=$ac_cv_host_os
924
925
926
927
928
929 echo $ac_n "checking target system type""... $ac_c" 1>&6
930 echo "configure:931: checking target system type" >&5
931 if test "x$ac_cv_target" = "x" || (test "x$target" != "xNONE" && test "x$target" != "x$ac_cv_target_alias"); then
932
933 # Make sure we can run config.sub.
934   if $ac_config_sub sun4 >/dev/null 2>&1; then :
935     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
936   fi
937
938   ac_cv_target_alias=$target
939   case "$ac_cv_target_alias" in
940   NONE)
941     case $nonopt in
942     NONE)
943       ac_cv_target_alias=$host_alias ;;
944
945     *) ac_cv_target_alias=$nonopt ;;
946     esac ;;
947   esac
948
949   ac_cv_target=`$ac_config_sub $ac_cv_target_alias`
950   ac_cv_target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
951   ac_cv_target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
952   ac_cv_target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
953 else
954   echo $ac_n "(cached) $ac_c" 1>&6
955 fi
956
957 echo "$ac_t""$ac_cv_target" 1>&6
958
959 target=$ac_cv_target
960 target_alias=$ac_cv_target_alias
961 target_cpu=$ac_cv_target_cpu
962 target_vendor=$ac_cv_target_vendor
963 target_os=$ac_cv_target_os
964
965
966
967
968
969 echo $ac_n "checking build system type""... $ac_c" 1>&6
970 echo "configure:971: checking build system type" >&5
971 if test "x$ac_cv_build" = "x" || (test "x$build" != "xNONE" && test "x$build" != "x$ac_cv_build_alias"); then
972
973 # Make sure we can run config.sub.
974   if $ac_config_sub sun4 >/dev/null 2>&1; then :
975     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
976   fi
977
978   ac_cv_build_alias=$build
979   case "$ac_cv_build_alias" in
980   NONE)
981     case $nonopt in
982     NONE)
983       ac_cv_build_alias=$host_alias ;;
984
985     *) ac_cv_build_alias=$nonopt ;;
986     esac ;;
987   esac
988
989   ac_cv_build=`$ac_config_sub $ac_cv_build_alias`
990   ac_cv_build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
991   ac_cv_build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
992   ac_cv_build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
993 else
994   echo $ac_n "(cached) $ac_c" 1>&6
995 fi
996
997 echo "$ac_t""$ac_cv_build" 1>&6
998
999 build=$ac_cv_build
1000 build_alias=$ac_cv_build_alias
1001 build_cpu=$ac_cv_build_cpu
1002 build_vendor=$ac_cv_build_vendor
1003 build_os=$ac_cv_build_os
1004
1005
1006
1007
1008
1009 # Do some error checking and defaulting for the host and target type.
1010 # The inputs are:
1011 #    configure --host=HOST --target=TARGET --build=BUILD NONOPT
1012 #
1013 # The rules are:
1014 # 1. You are not allowed to specify --host, --target, and nonopt at the
1015 #    same time.
1016 # 2. Host defaults to nonopt.
1017 # 3. If nonopt is not specified, then host defaults to the current host,
1018 #    as determined by config.guess.
1019 # 4. Target and build default to nonopt.
1020 # 5. If nonopt is not specified, then target and build default to host.
1021
1022 # The aliases save the names the user supplied, while $host etc.
1023 # will get canonicalized.
1024 case $host---$target---$nonopt in
1025 NONE---*---* | *---NONE---* | *---*---NONE) ;;
1026 *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
1027 esac
1028
1029 test "$host_alias" != "$target_alias" &&
1030   test "$program_prefix$program_suffix$program_transform_name" = \
1031     NONENONEs,x,x, &&
1032   program_prefix=${target_alias}-
1033
1034
1035 # Find a good install program.  We prefer a C program (faster),
1036 # so one script is as good as another.  But avoid the broken or
1037 # incompatible versions:
1038 # SysV /etc/install, /usr/sbin/install
1039 # SunOS /usr/etc/install
1040 # IRIX /sbin/install
1041 # AIX /bin/install
1042 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
1043 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
1044 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
1045 # ./install, which can be erroneously created by make from ./install.sh.
1046 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
1047 echo "configure:1048: checking for a BSD compatible install" >&5
1048 if test -z "$INSTALL"; then
1049 if eval "test \"\${ac_cv_path_install+set}\" = set"; then
1050   echo $ac_n "(cached) $ac_c" 1>&6
1051 else
1052     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
1053   for ac_dir in $PATH; do
1054     # Account for people who put trailing slashes in PATH elements.
1055     case "$ac_dir/" in
1056     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
1057     *)
1058       # OSF1 and SCO ODT 3.0 have their own names for install.
1059       # Don't use installbsd from OSF since it installs stuff as root
1060       # by default.
1061       for ac_prog in ginstall scoinst install; do
1062         if test -f $ac_dir/$ac_prog; then
1063           if test $ac_prog = install &&
1064             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
1065             # AIX install.  It has an incompatible calling convention.
1066             :
1067           elif test $ac_prog = install &&
1068             grep pwplus $ac_dir/$ac_prog >/dev/null 2>&1; then
1069             # program-specific install script used by HP pwplus--don't use.
1070             :
1071           else
1072             ac_cv_path_install="$ac_dir/$ac_prog -c"
1073             break 2
1074           fi
1075         fi
1076       done
1077       ;;
1078     esac
1079   done
1080   IFS="$ac_save_IFS"
1081
1082 fi
1083   if test "${ac_cv_path_install+set}" = set; then
1084     INSTALL="$ac_cv_path_install"
1085   else
1086     # As a last resort, use the slow shell script.  We don't cache a
1087     # path for INSTALL within a source directory, because that will
1088     # break other packages using the cache if that directory is
1089     # removed, or if the path is relative.
1090     INSTALL="$ac_install_sh"
1091   fi
1092 fi
1093 echo "$ac_t""$INSTALL" 1>&6
1094
1095 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
1096 # It thinks the first close brace ends the variable substitution.
1097 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
1098
1099 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
1100
1101 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1102
1103 echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
1104 echo "configure:1105: checking whether build environment is sane" >&5
1105 # Just in case
1106 sleep 1
1107 echo timestamp > conftestfile
1108 # Do `set' in a subshell so we don't clobber the current shell's
1109 # arguments.  Must try -L first in case configure is actually a
1110 # symlink; some systems play weird games with the mod time of symlinks
1111 # (eg FreeBSD returns the mod time of the symlink's containing
1112 # directory).
1113 if (
1114    set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
1115    if test "$*" = "X"; then
1116       # -L didn't work.
1117       set X `ls -t $srcdir/configure conftestfile`
1118    fi
1119    if test "$*" != "X $srcdir/configure conftestfile" \
1120       && test "$*" != "X conftestfile $srcdir/configure"; then
1121
1122       # If neither matched, then we have a broken ls.  This can happen
1123       # if, for instance, CONFIG_SHELL is bash and it inherits a
1124       # broken ls alias from the environment.  This has actually
1125       # happened.  Such a system could not be considered "sane".
1126       { echo "configure: error: ls -t appears to fail.  Make sure there is not a broken
1127 alias in your environment" 1>&2; exit 1; }
1128    fi
1129
1130    test "$2" = conftestfile
1131    )
1132 then
1133    # Ok.
1134    :
1135 else
1136    { echo "configure: error: newly created file is older than distributed files!
1137 Check your system clock" 1>&2; exit 1; }
1138 fi
1139 rm -f conftest*
1140 echo "$ac_t""yes" 1>&6
1141 if test "$program_transform_name" = s,x,x,; then
1142   program_transform_name=
1143 else
1144   # Double any \ or $.  echo might interpret backslashes.
1145   cat <<\EOF_SED > conftestsed
1146 s,\\,\\\\,g; s,\$,$$,g
1147 EOF_SED
1148   program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
1149   rm -f conftestsed
1150 fi
1151 test "$program_prefix" != NONE &&
1152   program_transform_name="s,^,${program_prefix},;$program_transform_name"
1153 # Use a double $ so make ignores it.
1154 test "$program_suffix" != NONE &&
1155   program_transform_name="s,\$\$,${program_suffix},;$program_transform_name"
1156
1157 # sed with no file args requires a program.
1158 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
1159
1160 for ac_prog in mawk gawk nawk awk
1161 do
1162 # Extract the first word of "$ac_prog", so it can be a program name with args.
1163 set dummy $ac_prog; ac_word=$2
1164 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1165 echo "configure:1166: checking for $ac_word" >&5
1166 if eval "test \"\${ac_cv_prog_AWK+set}\" = set"; then
1167   echo $ac_n "(cached) $ac_c" 1>&6
1168 else
1169   if test -n "$AWK"; then
1170   ac_cv_prog_AWK="$AWK" # Let the user override the test.
1171 else
1172   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1173   ac_dummy="$PATH"
1174   for ac_dir in $ac_dummy; do
1175     test -z "$ac_dir" && ac_dir=.
1176     if test -f $ac_dir/$ac_word; then
1177       ac_cv_prog_AWK="$ac_prog"
1178       break
1179     fi
1180   done
1181   IFS="$ac_save_ifs"
1182 fi
1183 fi
1184 AWK="$ac_cv_prog_AWK"
1185 if test -n "$AWK"; then
1186   echo "$ac_t""$AWK" 1>&6
1187 else
1188   echo "$ac_t""no" 1>&6
1189 fi
1190
1191 test -n "$AWK" && break
1192 done
1193
1194 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
1195 echo "configure:1196: checking whether ${MAKE-make} sets \${MAKE}" >&5
1196 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
1197 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
1198   echo $ac_n "(cached) $ac_c" 1>&6
1199 else
1200   cat > conftestmake <<\EOF
1201 all:
1202         @echo 'ac_maketemp="${MAKE}"'
1203 EOF
1204 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
1205 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
1206 if test -n "$ac_maketemp"; then
1207   eval ac_cv_prog_make_${ac_make}_set=yes
1208 else
1209   eval ac_cv_prog_make_${ac_make}_set=no
1210 fi
1211 rm -f conftestmake
1212 fi
1213 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
1214   echo "$ac_t""yes" 1>&6
1215   SET_MAKE=
1216 else
1217   echo "$ac_t""no" 1>&6
1218   SET_MAKE="MAKE=${MAKE-make}"
1219 fi
1220
1221
1222
1223 PACKAGE=$OL_PACKAGE
1224
1225 VERSION=$OL_VERSION
1226
1227 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
1228   { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
1229 fi
1230
1231
1232
1233 missing_dir=`cd $ac_aux_dir && pwd`
1234 echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
1235 echo "configure:1236: checking for working aclocal" >&5
1236 # Run test in a subshell; some versions of sh will print an error if
1237 # an executable is not found, even if stderr is redirected.
1238 # Redirect stdin to placate older versions of autoconf.  Sigh.
1239 if (aclocal --version) < /dev/null > /dev/null 2>&1; then
1240    ACLOCAL=aclocal
1241    echo "$ac_t""found" 1>&6
1242 else
1243    ACLOCAL="$missing_dir/missing aclocal"
1244    echo "$ac_t""missing" 1>&6
1245 fi
1246
1247 echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
1248 echo "configure:1249: checking for working autoconf" >&5
1249 # Run test in a subshell; some versions of sh will print an error if
1250 # an executable is not found, even if stderr is redirected.
1251 # Redirect stdin to placate older versions of autoconf.  Sigh.
1252 if (autoconf --version) < /dev/null > /dev/null 2>&1; then
1253    AUTOCONF=autoconf
1254    echo "$ac_t""found" 1>&6
1255 else
1256    AUTOCONF="$missing_dir/missing autoconf"
1257    echo "$ac_t""missing" 1>&6
1258 fi
1259
1260 echo $ac_n "checking for working automake""... $ac_c" 1>&6
1261 echo "configure:1262: checking for working automake" >&5
1262 # Run test in a subshell; some versions of sh will print an error if
1263 # an executable is not found, even if stderr is redirected.
1264 # Redirect stdin to placate older versions of autoconf.  Sigh.
1265 if (automake --version) < /dev/null > /dev/null 2>&1; then
1266    AUTOMAKE=automake
1267    echo "$ac_t""found" 1>&6
1268 else
1269    AUTOMAKE="$missing_dir/missing automake"
1270    echo "$ac_t""missing" 1>&6
1271 fi
1272
1273 echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
1274 echo "configure:1275: checking for working autoheader" >&5
1275 # Run test in a subshell; some versions of sh will print an error if
1276 # an executable is not found, even if stderr is redirected.
1277 # Redirect stdin to placate older versions of autoconf.  Sigh.
1278 if (autoheader --version) < /dev/null > /dev/null 2>&1; then
1279    AUTOHEADER=autoheader
1280    echo "$ac_t""found" 1>&6
1281 else
1282    AUTOHEADER="$missing_dir/missing autoheader"
1283    echo "$ac_t""missing" 1>&6
1284 fi
1285
1286 echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
1287 echo "configure:1288: checking for working makeinfo" >&5
1288 # Run test in a subshell; some versions of sh will print an error if
1289 # an executable is not found, even if stderr is redirected.
1290 # Redirect stdin to placate older versions of autoconf.  Sigh.
1291 if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
1292    MAKEINFO=makeinfo
1293    echo "$ac_t""found" 1>&6
1294 else
1295    MAKEINFO="$missing_dir/missing makeinfo"
1296    echo "$ac_t""missing" 1>&6
1297 fi
1298
1299 install_sh="$missing_dir/install-sh"
1300 test -f "$install_sh" || install_sh="$missing_dir/install.sh"
1301
1302 for ac_prog in gnutar gtar tar
1303 do
1304 # Extract the first word of "$ac_prog", so it can be a program name with args.
1305 set dummy $ac_prog; ac_word=$2
1306 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1307 echo "configure:1308: checking for $ac_word" >&5
1308 if eval "test \"\${ac_cv_prog_AMTAR+set}\" = set"; then
1309   echo $ac_n "(cached) $ac_c" 1>&6
1310 else
1311   if test -n "$AMTAR"; then
1312   ac_cv_prog_AMTAR="$AMTAR" # Let the user override the test.
1313 else
1314   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1315   ac_dummy="$PATH"
1316   for ac_dir in $ac_dummy; do
1317     test -z "$ac_dir" && ac_dir=.
1318     if test -f $ac_dir/$ac_word; then
1319       ac_cv_prog_AMTAR="$ac_prog"
1320       break
1321     fi
1322   done
1323   IFS="$ac_save_ifs"
1324 fi
1325 fi
1326 AMTAR="$ac_cv_prog_AMTAR"
1327 if test -n "$AMTAR"; then
1328   echo "$ac_t""$AMTAR" 1>&6
1329 else
1330   echo "$ac_t""no" 1>&6
1331 fi
1332
1333 test -n "$AMTAR" && break
1334 done
1335
1336
1337 AMTARFLAGS=
1338 if test -n "$AMTAR"; then
1339   if $SHELL -c "$AMTAR --version" > /dev/null 2>&1; then
1340         AMTARFLAGS=o
1341   fi
1342 fi
1343
1344 cat >> confdefs.h <<EOF
1345 #define OPENLDAP_PACKAGE "$PACKAGE"
1346 EOF
1347
1348 cat >> confdefs.h <<EOF
1349 #define OPENLDAP_VERSION "$VERSION"
1350 EOF
1351
1352
1353 cat >> confdefs.h <<EOF
1354 #define LDAP_VENDOR_VERSION $OL_API_INC
1355 EOF
1356
1357 cat >> confdefs.h <<EOF
1358 #define LDAP_VENDOR_VERSION_MAJOR $OL_MAJOR
1359 EOF
1360
1361 cat >> confdefs.h <<EOF
1362 #define LDAP_VENDOR_VERSION_MINOR $OL_MINOR
1363 EOF
1364
1365 cat >> confdefs.h <<EOF
1366 #define LDAP_VENDOR_VERSION_PATCH $OL_PATCH
1367 EOF
1368
1369
1370 OPENLDAP_LIBVERSION=$OL_API_LIB
1371
1372 OPENLDAP_RELEASE_DATE="$OL_RELEASE_DATE"
1373
1374
1375
1376 echo $ac_n "checking configure arguments""... $ac_c" 1>&6
1377 echo "configure:1378: checking configure arguments" >&5
1378
1379
1380 top_builddir=`pwd`
1381
1382 ldap_subdir="/openldap"
1383
1384 # Check whether --with-subdir or --without-subdir was given.
1385 if test "${with_subdir+set}" = set; then
1386   withval="$with_subdir"
1387   case "$withval" in
1388         no) ldap_subdir=""
1389                 ;;
1390         yes)
1391                 ;;
1392         /*|\\*)
1393                 ldap_subdir="$withval"
1394                 ;;
1395         *)
1396                 ldap_subdir="/$withval"
1397                 ;;
1398 esac
1399
1400 fi
1401
1402
1403 # OpenLDAP --enable-debug
1404         # Check whether --enable-debug or --disable-debug was given.
1405 if test "${enable_debug+set}" = set; then
1406   enableval="$enable_debug"
1407   
1408         ol_arg=invalid
1409         for ol_val in auto yes no ; do
1410                 if test "$enableval" = "$ol_val" ; then
1411                         ol_arg="$ol_val"
1412                 fi
1413         done
1414         if test "$ol_arg" = "invalid" ; then
1415                 { echo "configure: error: bad value $enableval for --enable-debug" 1>&2; exit 1; }
1416         fi
1417         ol_enable_debug="$ol_arg"
1418
1419 else
1420         ol_enable_debug="yes"
1421 fi
1422 # end --enable-debug
1423 # OpenLDAP --enable-dynamic
1424         # Check whether --enable-dynamic or --disable-dynamic was given.
1425 if test "${enable_dynamic+set}" = set; then
1426   enableval="$enable_dynamic"
1427   
1428         ol_arg=invalid
1429         for ol_val in auto yes no ; do
1430                 if test "$enableval" = "$ol_val" ; then
1431                         ol_arg="$ol_val"
1432                 fi
1433         done
1434         if test "$ol_arg" = "invalid" ; then
1435                 { echo "configure: error: bad value $enableval for --enable-dynamic" 1>&2; exit 1; }
1436         fi
1437         ol_enable_dynamic="$ol_arg"
1438
1439 else
1440         ol_enable_dynamic="no"
1441 fi
1442 # end --enable-dynamic
1443 # OpenLDAP --enable-syslog
1444         # Check whether --enable-syslog or --disable-syslog was given.
1445 if test "${enable_syslog+set}" = set; then
1446   enableval="$enable_syslog"
1447   
1448         ol_arg=invalid
1449         for ol_val in auto yes no ; do
1450                 if test "$enableval" = "$ol_val" ; then
1451                         ol_arg="$ol_val"
1452                 fi
1453         done
1454         if test "$ol_arg" = "invalid" ; then
1455                 { echo "configure: error: bad value $enableval for --enable-syslog" 1>&2; exit 1; }
1456         fi
1457         ol_enable_syslog="$ol_arg"
1458
1459 else
1460         ol_enable_syslog="auto"
1461 fi
1462 # end --enable-syslog
1463 # OpenLDAP --enable-proctitle
1464         # Check whether --enable-proctitle or --disable-proctitle was given.
1465 if test "${enable_proctitle+set}" = set; then
1466   enableval="$enable_proctitle"
1467   
1468         ol_arg=invalid
1469         for ol_val in auto yes no ; do
1470                 if test "$enableval" = "$ol_val" ; then
1471                         ol_arg="$ol_val"
1472                 fi
1473         done
1474         if test "$ol_arg" = "invalid" ; then
1475                 { echo "configure: error: bad value $enableval for --enable-proctitle" 1>&2; exit 1; }
1476         fi
1477         ol_enable_proctitle="$ol_arg"
1478
1479 else
1480         ol_enable_proctitle="yes"
1481 fi
1482 # end --enable-proctitle
1483 ol_enable_referrals=${ol_enable_referrals-no}
1484 ol_enable_kbind=${ol_enable_kbind-no}
1485 # OpenLDAP --enable-ipv6
1486         # Check whether --enable-ipv6 or --disable-ipv6 was given.
1487 if test "${enable_ipv6+set}" = set; then
1488   enableval="$enable_ipv6"
1489   
1490         ol_arg=invalid
1491         for ol_val in auto yes no ; do
1492                 if test "$enableval" = "$ol_val" ; then
1493                         ol_arg="$ol_val"
1494                 fi
1495         done
1496         if test "$ol_arg" = "invalid" ; then
1497                 { echo "configure: error: bad value $enableval for --enable-ipv6" 1>&2; exit 1; }
1498         fi
1499         ol_enable_ipv6="$ol_arg"
1500
1501 else
1502         ol_enable_ipv6="auto"
1503 fi
1504 # end --enable-ipv6
1505 # OpenLDAP --enable-local
1506         # Check whether --enable-local or --disable-local was given.
1507 if test "${enable_local+set}" = set; then
1508   enableval="$enable_local"
1509   
1510         ol_arg=invalid
1511         for ol_val in auto yes no ; do
1512                 if test "$enableval" = "$ol_val" ; then
1513                         ol_arg="$ol_val"
1514                 fi
1515         done
1516         if test "$ol_arg" = "invalid" ; then
1517                 { echo "configure: error: bad value $enableval for --enable-local" 1>&2; exit 1; }
1518         fi
1519         ol_enable_local="$ol_arg"
1520
1521 else
1522         ol_enable_local="auto"
1523 fi
1524 # end --enable-local
1525 # OpenLDAP --enable-x_compile
1526         # Check whether --enable-x_compile or --disable-x_compile was given.
1527 if test "${enable_x_compile+set}" = set; then
1528   enableval="$enable_x_compile"
1529   
1530         ol_arg=invalid
1531         for ol_val in yes no ; do
1532                 if test "$enableval" = "$ol_val" ; then
1533                         ol_arg="$ol_val"
1534                 fi
1535         done
1536         if test "$ol_arg" = "invalid" ; then
1537                 { echo "configure: error: bad value $enableval for --enable-x_compile" 1>&2; exit 1; }
1538         fi
1539         ol_enable_x_compile="$ol_arg"
1540
1541 else
1542         ol_enable_x_compile="no"
1543 fi
1544 # end --enable-x_compile
1545
1546
1547 # OpenLDAP --with-cyrus_sasl
1548         # Check whether --with-cyrus_sasl or --without-cyrus_sasl was given.
1549 if test "${with_cyrus_sasl+set}" = set; then
1550   withval="$with_cyrus_sasl"
1551   
1552         ol_arg=invalid
1553         for ol_val in auto yes no  ; do
1554                 if test "$withval" = "$ol_val" ; then
1555                         ol_arg="$ol_val"
1556                 fi
1557         done
1558         if test "$ol_arg" = "invalid" ; then
1559                 { echo "configure: error: bad value $withval for --with-cyrus_sasl" 1>&2; exit 1; }
1560         fi
1561         ol_with_cyrus_sasl="$ol_arg"
1562
1563 else
1564         ol_with_cyrus_sasl="auto"
1565 fi
1566 # end --with-cyrus_sasl
1567
1568 # OpenLDAP --with-fetch
1569         # Check whether --with-fetch or --without-fetch was given.
1570 if test "${with_fetch+set}" = set; then
1571   withval="$with_fetch"
1572   
1573         ol_arg=invalid
1574         for ol_val in auto yes no  ; do
1575                 if test "$withval" = "$ol_val" ; then
1576                         ol_arg="$ol_val"
1577                 fi
1578         done
1579         if test "$ol_arg" = "invalid" ; then
1580                 { echo "configure: error: bad value $withval for --with-fetch" 1>&2; exit 1; }
1581         fi
1582         ol_with_fetch="$ol_arg"
1583
1584 else
1585         ol_with_fetch="auto"
1586 fi
1587 # end --with-fetch
1588
1589 ol_with_kerberos=${ol_with_kerberos-auto}
1590 # OpenLDAP --with-threads
1591         # Check whether --with-threads or --without-threads was given.
1592 if test "${with_threads+set}" = set; then
1593   withval="$with_threads"
1594   
1595         ol_arg=invalid
1596         for ol_val in auto nt posix mach pth lwp yes no manual  ; do
1597                 if test "$withval" = "$ol_val" ; then
1598                         ol_arg="$ol_val"
1599                 fi
1600         done
1601         if test "$ol_arg" = "invalid" ; then
1602                 { echo "configure: error: bad value $withval for --with-threads" 1>&2; exit 1; }
1603         fi
1604         ol_with_threads="$ol_arg"
1605
1606 else
1607         ol_with_threads="auto"
1608 fi
1609 # end --with-threads
1610
1611 # OpenLDAP --with-tls
1612         # Check whether --with-tls or --without-tls was given.
1613 if test "${with_tls+set}" = set; then
1614   withval="$with_tls"
1615   
1616         ol_arg=invalid
1617         for ol_val in auto ssleay openssl yes no  ; do
1618                 if test "$withval" = "$ol_val" ; then
1619                         ol_arg="$ol_val"
1620                 fi
1621         done
1622         if test "$ol_arg" = "invalid" ; then
1623                 { echo "configure: error: bad value $withval for --with-tls" 1>&2; exit 1; }
1624         fi
1625         ol_with_tls="$ol_arg"
1626
1627 else
1628         ol_with_tls="auto"
1629 fi
1630 # end --with-tls
1631
1632 # OpenLDAP --with-yielding_select
1633         # Check whether --with-yielding_select or --without-yielding_select was given.
1634 if test "${with_yielding_select+set}" = set; then
1635   withval="$with_yielding_select"
1636   
1637         ol_arg=invalid
1638         for ol_val in auto yes no manual  ; do
1639                 if test "$withval" = "$ol_val" ; then
1640                         ol_arg="$ol_val"
1641                 fi
1642         done
1643         if test "$ol_arg" = "invalid" ; then
1644                 { echo "configure: error: bad value $withval for --with-yielding_select" 1>&2; exit 1; }
1645         fi
1646         ol_with_yielding_select="$ol_arg"
1647
1648 else
1649         ol_with_yielding_select="auto"
1650 fi
1651 # end --with-yielding_select
1652
1653
1654
1655 # Check whether --with-xxslapdoptions or --without-xxslapdoptions was given.
1656 if test "${with_xxslapdoptions+set}" = set; then
1657   withval="$with_xxslapdoptions"
1658   :
1659 fi
1660
1661 # OpenLDAP --enable-slapd
1662         # Check whether --enable-slapd or --disable-slapd was given.
1663 if test "${enable_slapd+set}" = set; then
1664   enableval="$enable_slapd"
1665   
1666         ol_arg=invalid
1667         for ol_val in auto yes no ; do
1668                 if test "$enableval" = "$ol_val" ; then
1669                         ol_arg="$ol_val"
1670                 fi
1671         done
1672         if test "$ol_arg" = "invalid" ; then
1673                 { echo "configure: error: bad value $enableval for --enable-slapd" 1>&2; exit 1; }
1674         fi
1675         ol_enable_slapd="$ol_arg"
1676
1677 else
1678         ol_enable_slapd="yes"
1679 fi
1680 # end --enable-slapd
1681 # OpenLDAP --enable-aci
1682         # Check whether --enable-aci or --disable-aci was given.
1683 if test "${enable_aci+set}" = set; then
1684   enableval="$enable_aci"
1685   
1686         ol_arg=invalid
1687         for ol_val in auto yes no ; do
1688                 if test "$enableval" = "$ol_val" ; then
1689                         ol_arg="$ol_val"
1690                 fi
1691         done
1692         if test "$ol_arg" = "invalid" ; then
1693                 { echo "configure: error: bad value $enableval for --enable-aci" 1>&2; exit 1; }
1694         fi
1695         ol_enable_aci="$ol_arg"
1696
1697 else
1698         ol_enable_aci="no"
1699 fi
1700 # end --enable-aci
1701 # OpenLDAP --enable-cleartext
1702         # Check whether --enable-cleartext or --disable-cleartext was given.
1703 if test "${enable_cleartext+set}" = set; then
1704   enableval="$enable_cleartext"
1705   
1706         ol_arg=invalid
1707         for ol_val in auto yes no ; do
1708                 if test "$enableval" = "$ol_val" ; then
1709                         ol_arg="$ol_val"
1710                 fi
1711         done
1712         if test "$ol_arg" = "invalid" ; then
1713                 { echo "configure: error: bad value $enableval for --enable-cleartext" 1>&2; exit 1; }
1714         fi
1715         ol_enable_cleartext="$ol_arg"
1716
1717 else
1718         ol_enable_cleartext="yes"
1719 fi
1720 # end --enable-cleartext
1721 # OpenLDAP --enable-crypt
1722         # Check whether --enable-crypt or --disable-crypt was given.
1723 if test "${enable_crypt+set}" = set; then
1724   enableval="$enable_crypt"
1725   
1726         ol_arg=invalid
1727         for ol_val in auto yes no ; do
1728                 if test "$enableval" = "$ol_val" ; then
1729                         ol_arg="$ol_val"
1730                 fi
1731         done
1732         if test "$ol_arg" = "invalid" ; then
1733                 { echo "configure: error: bad value $enableval for --enable-crypt" 1>&2; exit 1; }
1734         fi
1735         ol_enable_crypt="$ol_arg"
1736
1737 else
1738         ol_enable_crypt="no"
1739 fi
1740 # end --enable-crypt
1741 ol_enable_kpasswd=${ol_enable_kpasswd-no}
1742 # OpenLDAP --enable-lmpasswd
1743         # Check whether --enable-lmpasswd or --disable-lmpasswd was given.
1744 if test "${enable_lmpasswd+set}" = set; then
1745   enableval="$enable_lmpasswd"
1746   
1747         ol_arg=invalid
1748         for ol_val in auto yes no ; do
1749                 if test "$enableval" = "$ol_val" ; then
1750                         ol_arg="$ol_val"
1751                 fi
1752         done
1753         if test "$ol_arg" = "invalid" ; then
1754                 { echo "configure: error: bad value $enableval for --enable-lmpasswd" 1>&2; exit 1; }
1755         fi
1756         ol_enable_lmpasswd="$ol_arg"
1757
1758 else
1759         ol_enable_lmpasswd="no"
1760 fi
1761 # end --enable-lmpasswd
1762 # OpenLDAP --enable-spasswd
1763         # Check whether --enable-spasswd or --disable-spasswd was given.
1764 if test "${enable_spasswd+set}" = set; then
1765   enableval="$enable_spasswd"
1766   
1767         ol_arg=invalid
1768         for ol_val in auto yes no ; do
1769                 if test "$enableval" = "$ol_val" ; then
1770                         ol_arg="$ol_val"
1771                 fi
1772         done
1773         if test "$ol_arg" = "invalid" ; then
1774                 { echo "configure: error: bad value $enableval for --enable-spasswd" 1>&2; exit 1; }
1775         fi
1776         ol_enable_spasswd="$ol_arg"
1777
1778 else
1779         ol_enable_spasswd="no"
1780 fi
1781 # end --enable-spasswd
1782 # OpenLDAP --enable-modules
1783         # Check whether --enable-modules or --disable-modules was given.
1784 if test "${enable_modules+set}" = set; then
1785   enableval="$enable_modules"
1786   
1787         ol_arg=invalid
1788         for ol_val in auto yes no ; do
1789                 if test "$enableval" = "$ol_val" ; then
1790                         ol_arg="$ol_val"
1791                 fi
1792         done
1793         if test "$ol_arg" = "invalid" ; then
1794                 { echo "configure: error: bad value $enableval for --enable-modules" 1>&2; exit 1; }
1795         fi
1796         ol_enable_modules="$ol_arg"
1797
1798 else
1799         ol_enable_modules="no"
1800 fi
1801 # end --enable-modules
1802 ol_enable_multimaster=${ol_enable_multimaster-no}
1803 # OpenLDAP --enable-rewrite
1804         # Check whether --enable-rewrite or --disable-rewrite was given.
1805 if test "${enable_rewrite+set}" = set; then
1806   enableval="$enable_rewrite"
1807   
1808         ol_arg=invalid
1809         for ol_val in auto yes no ; do
1810                 if test "$enableval" = "$ol_val" ; then
1811                         ol_arg="$ol_val"
1812                 fi
1813         done
1814         if test "$ol_arg" = "invalid" ; then
1815                 { echo "configure: error: bad value $enableval for --enable-rewrite" 1>&2; exit 1; }
1816         fi
1817         ol_enable_rewrite="$ol_arg"
1818
1819 else
1820         ol_enable_rewrite="no"
1821 fi
1822 # end --enable-rewrite
1823 # OpenLDAP --enable-rlookups
1824         # Check whether --enable-rlookups or --disable-rlookups was given.
1825 if test "${enable_rlookups+set}" = set; then
1826   enableval="$enable_rlookups"
1827   
1828         ol_arg=invalid
1829         for ol_val in auto yes no ; do
1830                 if test "$enableval" = "$ol_val" ; then
1831                         ol_arg="$ol_val"
1832                 fi
1833         done
1834         if test "$ol_arg" = "invalid" ; then
1835                 { echo "configure: error: bad value $enableval for --enable-rlookups" 1>&2; exit 1; }
1836         fi
1837         ol_enable_rlookups="$ol_arg"
1838
1839 else
1840         ol_enable_rlookups="no"
1841 fi
1842 # end --enable-rlookups
1843 # OpenLDAP --enable-slapi
1844         # Check whether --enable-slapi or --disable-slapi was given.
1845 if test "${enable_slapi+set}" = set; then
1846   enableval="$enable_slapi"
1847   
1848         ol_arg=invalid
1849         for ol_val in auto yes no ; do
1850                 if test "$enableval" = "$ol_val" ; then
1851                         ol_arg="$ol_val"
1852                 fi
1853         done
1854         if test "$ol_arg" = "invalid" ; then
1855                 { echo "configure: error: bad value $enableval for --enable-slapi" 1>&2; exit 1; }
1856         fi
1857         ol_enable_slapi="$ol_arg"
1858
1859 else
1860         ol_enable_slapi="no"
1861 fi
1862 # end --enable-slapi
1863 # OpenLDAP --enable-slp
1864         # Check whether --enable-slp or --disable-slp was given.
1865 if test "${enable_slp+set}" = set; then
1866   enableval="$enable_slp"
1867   
1868         ol_arg=invalid
1869         for ol_val in auto yes no ; do
1870                 if test "$enableval" = "$ol_val" ; then
1871                         ol_arg="$ol_val"
1872                 fi
1873         done
1874         if test "$ol_arg" = "invalid" ; then
1875                 { echo "configure: error: bad value $enableval for --enable-slp" 1>&2; exit 1; }
1876         fi
1877         ol_enable_slp="$ol_arg"
1878
1879 else
1880         ol_enable_slp="no"
1881 fi
1882 # end --enable-slp
1883 # OpenLDAP --enable-wrappers
1884         # Check whether --enable-wrappers or --disable-wrappers was given.
1885 if test "${enable_wrappers+set}" = set; then
1886   enableval="$enable_wrappers"
1887   
1888         ol_arg=invalid
1889         for ol_val in auto yes no ; do
1890                 if test "$enableval" = "$ol_val" ; then
1891                         ol_arg="$ol_val"
1892                 fi
1893         done
1894         if test "$ol_arg" = "invalid" ; then
1895                 { echo "configure: error: bad value $enableval for --enable-wrappers" 1>&2; exit 1; }
1896         fi
1897         ol_enable_wrappers="$ol_arg"
1898
1899 else
1900         ol_enable_wrappers="no"
1901 fi
1902 # end --enable-wrappers
1903
1904
1905 # OpenLDAP --enable-bdb
1906         # Check whether --enable-bdb or --disable-bdb was given.
1907 if test "${enable_bdb+set}" = set; then
1908   enableval="$enable_bdb"
1909   
1910         ol_arg=invalid
1911         for ol_val in auto yes no ; do
1912                 if test "$enableval" = "$ol_val" ; then
1913                         ol_arg="$ol_val"
1914                 fi
1915         done
1916         if test "$ol_arg" = "invalid" ; then
1917                 { echo "configure: error: bad value $enableval for --enable-bdb" 1>&2; exit 1; }
1918         fi
1919         ol_enable_bdb="$ol_arg"
1920
1921 else
1922         ol_enable_bdb="yes"
1923 fi
1924 # end --enable-bdb
1925 # OpenLDAP --with-bdb_module
1926         # Check whether --with-bdb_module or --without-bdb_module was given.
1927 if test "${with_bdb_module+set}" = set; then
1928   withval="$with_bdb_module"
1929   
1930         ol_arg=invalid
1931         for ol_val in static dynamic ; do
1932                 if test "$withval" = "$ol_val" ; then
1933                         ol_arg="$ol_val"
1934                 fi
1935         done
1936         if test "$ol_arg" = "invalid" ; then
1937                 { echo "configure: error: bad value $withval for --with-bdb_module" 1>&2; exit 1; }
1938         fi
1939         ol_with_bdb_module="$ol_arg"
1940
1941 else
1942         ol_with_bdb_module="static"
1943 fi
1944 # end --with-bdb_module
1945
1946 # OpenLDAP --enable-dnssrv
1947         # Check whether --enable-dnssrv or --disable-dnssrv was given.
1948 if test "${enable_dnssrv+set}" = set; then
1949   enableval="$enable_dnssrv"
1950   
1951         ol_arg=invalid
1952         for ol_val in auto yes no ; do
1953                 if test "$enableval" = "$ol_val" ; then
1954                         ol_arg="$ol_val"
1955                 fi
1956         done
1957         if test "$ol_arg" = "invalid" ; then
1958                 { echo "configure: error: bad value $enableval for --enable-dnssrv" 1>&2; exit 1; }
1959         fi
1960         ol_enable_dnssrv="$ol_arg"
1961
1962 else
1963         ol_enable_dnssrv="no"
1964 fi
1965 # end --enable-dnssrv
1966 # OpenLDAP --with-dnssrv_module
1967         # Check whether --with-dnssrv_module or --without-dnssrv_module was given.
1968 if test "${with_dnssrv_module+set}" = set; then
1969   withval="$with_dnssrv_module"
1970   
1971         ol_arg=invalid
1972         for ol_val in static dynamic ; do
1973                 if test "$withval" = "$ol_val" ; then
1974                         ol_arg="$ol_val"
1975                 fi
1976         done
1977         if test "$ol_arg" = "invalid" ; then
1978                 { echo "configure: error: bad value $withval for --with-dnssrv_module" 1>&2; exit 1; }
1979         fi
1980         ol_with_dnssrv_module="$ol_arg"
1981
1982 else
1983         ol_with_dnssrv_module="static"
1984 fi
1985 # end --with-dnssrv_module
1986
1987 # OpenLDAP --enable-hdb
1988         # Check whether --enable-hdb or --disable-hdb was given.
1989 if test "${enable_hdb+set}" = set; then
1990   enableval="$enable_hdb"
1991   
1992         ol_arg=invalid
1993         for ol_val in auto yes no ; do
1994                 if test "$enableval" = "$ol_val" ; then
1995                         ol_arg="$ol_val"
1996                 fi
1997         done
1998         if test "$ol_arg" = "invalid" ; then
1999                 { echo "configure: error: bad value $enableval for --enable-hdb" 1>&2; exit 1; }
2000         fi
2001         ol_enable_hdb="$ol_arg"
2002
2003 else
2004         ol_enable_hdb="no"
2005 fi
2006 # end --enable-hdb
2007 # OpenLDAP --with-hdb_module
2008         # Check whether --with-hdb_module or --without-hdb_module was given.
2009 if test "${with_hdb_module+set}" = set; then
2010   withval="$with_hdb_module"
2011   
2012         ol_arg=invalid
2013         for ol_val in static dynamic ; do
2014                 if test "$withval" = "$ol_val" ; then
2015                         ol_arg="$ol_val"
2016                 fi
2017         done
2018         if test "$ol_arg" = "invalid" ; then
2019                 { echo "configure: error: bad value $withval for --with-hdb_module" 1>&2; exit 1; }
2020         fi
2021         ol_with_hdb_module="$ol_arg"
2022
2023 else
2024         ol_with_hdb_module="static"
2025 fi
2026 # end --with-hdb_module
2027
2028 # OpenLDAP --enable-ldap
2029         # Check whether --enable-ldap or --disable-ldap was given.
2030 if test "${enable_ldap+set}" = set; then
2031   enableval="$enable_ldap"
2032   
2033         ol_arg=invalid
2034         for ol_val in auto yes no ; do
2035                 if test "$enableval" = "$ol_val" ; then
2036                         ol_arg="$ol_val"
2037                 fi
2038         done
2039         if test "$ol_arg" = "invalid" ; then
2040                 { echo "configure: error: bad value $enableval for --enable-ldap" 1>&2; exit 1; }
2041         fi
2042         ol_enable_ldap="$ol_arg"
2043
2044 else
2045         ol_enable_ldap="no"
2046 fi
2047 # end --enable-ldap
2048 # OpenLDAP --with-ldap_module
2049         # Check whether --with-ldap_module or --without-ldap_module was given.
2050 if test "${with_ldap_module+set}" = set; then
2051   withval="$with_ldap_module"
2052   
2053         ol_arg=invalid
2054         for ol_val in static dynamic ; do
2055                 if test "$withval" = "$ol_val" ; then
2056                         ol_arg="$ol_val"
2057                 fi
2058         done
2059         if test "$ol_arg" = "invalid" ; then
2060                 { echo "configure: error: bad value $withval for --with-ldap_module" 1>&2; exit 1; }
2061         fi
2062         ol_with_ldap_module="$ol_arg"
2063
2064 else
2065         ol_with_ldap_module="static"
2066 fi
2067 # end --with-ldap_module
2068
2069 # OpenLDAP --enable-ldbm
2070         # Check whether --enable-ldbm or --disable-ldbm was given.
2071 if test "${enable_ldbm+set}" = set; then
2072   enableval="$enable_ldbm"
2073   
2074         ol_arg=invalid
2075         for ol_val in auto yes no ; do
2076                 if test "$enableval" = "$ol_val" ; then
2077                         ol_arg="$ol_val"
2078                 fi
2079         done
2080         if test "$ol_arg" = "invalid" ; then
2081                 { echo "configure: error: bad value $enableval for --enable-ldbm" 1>&2; exit 1; }
2082         fi
2083         ol_enable_ldbm="$ol_arg"
2084
2085 else
2086         ol_enable_ldbm="no"
2087 fi
2088 # end --enable-ldbm
2089 # OpenLDAP --with-ldbm_api
2090         # Check whether --with-ldbm_api or --without-ldbm_api was given.
2091 if test "${with_ldbm_api+set}" = set; then
2092   withval="$with_ldbm_api"
2093   
2094         ol_arg=invalid
2095         for ol_val in auto berkeley bcompat mdbm gdbm ; do
2096                 if test "$withval" = "$ol_val" ; then
2097                         ol_arg="$ol_val"
2098                 fi
2099         done
2100         if test "$ol_arg" = "invalid" ; then
2101                 { echo "configure: error: bad value $withval for --with-ldbm_api" 1>&2; exit 1; }
2102         fi
2103         ol_with_ldbm_api="$ol_arg"
2104
2105 else
2106         ol_with_ldbm_api="auto"
2107 fi
2108 # end --with-ldbm_api
2109
2110 # OpenLDAP --with-ldbm_module
2111         # Check whether --with-ldbm_module or --without-ldbm_module was given.
2112 if test "${with_ldbm_module+set}" = set; then
2113   withval="$with_ldbm_module"
2114   
2115         ol_arg=invalid
2116         for ol_val in static dynamic ; do
2117                 if test "$withval" = "$ol_val" ; then
2118                         ol_arg="$ol_val"
2119                 fi
2120         done
2121         if test "$ol_arg" = "invalid" ; then
2122                 { echo "configure: error: bad value $withval for --with-ldbm_module" 1>&2; exit 1; }
2123         fi
2124         ol_with_ldbm_module="$ol_arg"
2125
2126 else
2127         ol_with_ldbm_module="static"
2128 fi
2129 # end --with-ldbm_module
2130
2131 # OpenLDAP --with-ldbm_type
2132         # Check whether --with-ldbm_type or --without-ldbm_type was given.
2133 if test "${with_ldbm_type+set}" = set; then
2134   withval="$with_ldbm_type"
2135   
2136         ol_arg=invalid
2137         for ol_val in auto btree hash ; do
2138                 if test "$withval" = "$ol_val" ; then
2139                         ol_arg="$ol_val"
2140                 fi
2141         done
2142         if test "$ol_arg" = "invalid" ; then
2143                 { echo "configure: error: bad value $withval for --with-ldbm_type" 1>&2; exit 1; }
2144         fi
2145         ol_with_ldbm_type="$ol_arg"
2146
2147 else
2148         ol_with_ldbm_type="auto"
2149 fi
2150 # end --with-ldbm_type
2151
2152 # OpenLDAP --enable-meta
2153         # Check whether --enable-meta or --disable-meta was given.
2154 if test "${enable_meta+set}" = set; then
2155   enableval="$enable_meta"
2156   
2157         ol_arg=invalid
2158         for ol_val in auto yes no ; do
2159                 if test "$enableval" = "$ol_val" ; then
2160                         ol_arg="$ol_val"
2161                 fi
2162         done
2163         if test "$ol_arg" = "invalid" ; then
2164                 { echo "configure: error: bad value $enableval for --enable-meta" 1>&2; exit 1; }
2165         fi
2166         ol_enable_meta="$ol_arg"
2167
2168 else
2169         ol_enable_meta="no"
2170 fi
2171 # end --enable-meta
2172 # OpenLDAP --with-meta_module
2173         # Check whether --with-meta_module or --without-meta_module was given.
2174 if test "${with_meta_module+set}" = set; then
2175   withval="$with_meta_module"
2176   
2177         ol_arg=invalid
2178         for ol_val in static dynamic ; do
2179                 if test "$withval" = "$ol_val" ; then
2180                         ol_arg="$ol_val"
2181                 fi
2182         done
2183         if test "$ol_arg" = "invalid" ; then
2184                 { echo "configure: error: bad value $withval for --with-meta_module" 1>&2; exit 1; }
2185         fi
2186         ol_with_meta_module="$ol_arg"
2187
2188 else
2189         ol_with_meta_module="static"
2190 fi
2191 # end --with-meta_module
2192
2193 # OpenLDAP --enable-monitor
2194         # Check whether --enable-monitor or --disable-monitor was given.
2195 if test "${enable_monitor+set}" = set; then
2196   enableval="$enable_monitor"
2197   
2198         ol_arg=invalid
2199         for ol_val in auto yes no ; do
2200                 if test "$enableval" = "$ol_val" ; then
2201                         ol_arg="$ol_val"
2202                 fi
2203         done
2204         if test "$ol_arg" = "invalid" ; then
2205                 { echo "configure: error: bad value $enableval for --enable-monitor" 1>&2; exit 1; }
2206         fi
2207         ol_enable_monitor="$ol_arg"
2208
2209 else
2210         ol_enable_monitor="yes"
2211 fi
2212 # end --enable-monitor
2213 # OpenLDAP --with-monitor_module
2214         # Check whether --with-monitor_module or --without-monitor_module was given.
2215 if test "${with_monitor_module+set}" = set; then
2216   withval="$with_monitor_module"
2217   
2218         ol_arg=invalid
2219         for ol_val in static dynamic ; do
2220                 if test "$withval" = "$ol_val" ; then
2221                         ol_arg="$ol_val"
2222                 fi
2223         done
2224         if test "$ol_arg" = "invalid" ; then
2225                 { echo "configure: error: bad value $withval for --with-monitor_module" 1>&2; exit 1; }
2226         fi
2227         ol_with_monitor_module="$ol_arg"
2228
2229 else
2230         ol_with_monitor_module="static"
2231 fi
2232 # end --with-monitor_module
2233
2234 # OpenLDAP --enable-null
2235         # Check whether --enable-null or --disable-null was given.
2236 if test "${enable_null+set}" = set; then
2237   enableval="$enable_null"
2238   
2239         ol_arg=invalid
2240         for ol_val in auto yes no ; do
2241                 if test "$enableval" = "$ol_val" ; then
2242                         ol_arg="$ol_val"
2243                 fi
2244         done
2245         if test "$ol_arg" = "invalid" ; then
2246                 { echo "configure: error: bad value $enableval for --enable-null" 1>&2; exit 1; }
2247         fi
2248         ol_enable_null="$ol_arg"
2249
2250 else
2251         ol_enable_null="no"
2252 fi
2253 # end --enable-null
2254 # OpenLDAP --with-null_module
2255         # Check whether --with-null_module or --without-null_module was given.
2256 if test "${with_null_module+set}" = set; then
2257   withval="$with_null_module"
2258   
2259         ol_arg=invalid
2260         for ol_val in static dynamic ; do
2261                 if test "$withval" = "$ol_val" ; then
2262                         ol_arg="$ol_val"
2263                 fi
2264         done
2265         if test "$ol_arg" = "invalid" ; then
2266                 { echo "configure: error: bad value $withval for --with-null_module" 1>&2; exit 1; }
2267         fi
2268         ol_with_null_module="$ol_arg"
2269
2270 else
2271         ol_with_null_module="static"
2272 fi
2273 # end --with-null_module
2274
2275 # OpenLDAP --enable-passwd
2276         # Check whether --enable-passwd or --disable-passwd was given.
2277 if test "${enable_passwd+set}" = set; then
2278   enableval="$enable_passwd"
2279   
2280         ol_arg=invalid
2281         for ol_val in auto yes no ; do
2282                 if test "$enableval" = "$ol_val" ; then
2283                         ol_arg="$ol_val"
2284                 fi
2285         done
2286         if test "$ol_arg" = "invalid" ; then
2287                 { echo "configure: error: bad value $enableval for --enable-passwd" 1>&2; exit 1; }
2288         fi
2289         ol_enable_passwd="$ol_arg"
2290
2291 else
2292         ol_enable_passwd="no"
2293 fi
2294 # end --enable-passwd
2295 # OpenLDAP --with-passwd_module
2296         # Check whether --with-passwd_module or --without-passwd_module was given.
2297 if test "${with_passwd_module+set}" = set; then
2298   withval="$with_passwd_module"
2299   
2300         ol_arg=invalid
2301         for ol_val in static dynamic ; do
2302                 if test "$withval" = "$ol_val" ; then
2303                         ol_arg="$ol_val"
2304                 fi
2305         done
2306         if test "$ol_arg" = "invalid" ; then
2307                 { echo "configure: error: bad value $withval for --with-passwd_module" 1>&2; exit 1; }
2308         fi
2309         ol_with_passwd_module="$ol_arg"
2310
2311 else
2312         ol_with_passwd_module="static"
2313 fi
2314 # end --with-passwd_module
2315
2316 # OpenLDAP --enable-perl
2317         # Check whether --enable-perl or --disable-perl was given.
2318 if test "${enable_perl+set}" = set; then
2319   enableval="$enable_perl"
2320   
2321         ol_arg=invalid
2322         for ol_val in auto yes no ; do
2323                 if test "$enableval" = "$ol_val" ; then
2324                         ol_arg="$ol_val"
2325                 fi
2326         done
2327         if test "$ol_arg" = "invalid" ; then
2328                 { echo "configure: error: bad value $enableval for --enable-perl" 1>&2; exit 1; }
2329         fi
2330         ol_enable_perl="$ol_arg"
2331
2332 else
2333         ol_enable_perl="no"
2334 fi
2335 # end --enable-perl
2336 # OpenLDAP --with-perl_module
2337         # Check whether --with-perl_module or --without-perl_module was given.
2338 if test "${with_perl_module+set}" = set; then
2339   withval="$with_perl_module"
2340   
2341         ol_arg=invalid
2342         for ol_val in static dynamic ; do
2343                 if test "$withval" = "$ol_val" ; then
2344                         ol_arg="$ol_val"
2345                 fi
2346         done
2347         if test "$ol_arg" = "invalid" ; then
2348                 { echo "configure: error: bad value $withval for --with-perl_module" 1>&2; exit 1; }
2349         fi
2350         ol_with_perl_module="$ol_arg"
2351
2352 else
2353         ol_with_perl_module="static"
2354 fi
2355 # end --with-perl_module
2356
2357 # OpenLDAP --enable-shell
2358         # Check whether --enable-shell or --disable-shell was given.
2359 if test "${enable_shell+set}" = set; then
2360   enableval="$enable_shell"
2361   
2362         ol_arg=invalid
2363         for ol_val in auto yes no ; do
2364                 if test "$enableval" = "$ol_val" ; then
2365                         ol_arg="$ol_val"
2366                 fi
2367         done
2368         if test "$ol_arg" = "invalid" ; then
2369                 { echo "configure: error: bad value $enableval for --enable-shell" 1>&2; exit 1; }
2370         fi
2371         ol_enable_shell="$ol_arg"
2372
2373 else
2374         ol_enable_shell="no"
2375 fi
2376 # end --enable-shell
2377 # OpenLDAP --with-shell_module
2378         # Check whether --with-shell_module or --without-shell_module was given.
2379 if test "${with_shell_module+set}" = set; then
2380   withval="$with_shell_module"
2381   
2382         ol_arg=invalid
2383         for ol_val in static dynamic ; do
2384                 if test "$withval" = "$ol_val" ; then
2385                         ol_arg="$ol_val"
2386                 fi
2387         done
2388         if test "$ol_arg" = "invalid" ; then
2389                 { echo "configure: error: bad value $withval for --with-shell_module" 1>&2; exit 1; }
2390         fi
2391         ol_with_shell_module="$ol_arg"
2392
2393 else
2394         ol_with_shell_module="static"
2395 fi
2396 # end --with-shell_module
2397
2398 # OpenLDAP --enable-sql
2399         # Check whether --enable-sql or --disable-sql was given.
2400 if test "${enable_sql+set}" = set; then
2401   enableval="$enable_sql"
2402   
2403         ol_arg=invalid
2404         for ol_val in auto yes no ; do
2405                 if test "$enableval" = "$ol_val" ; then
2406                         ol_arg="$ol_val"
2407                 fi
2408         done
2409         if test "$ol_arg" = "invalid" ; then
2410                 { echo "configure: error: bad value $enableval for --enable-sql" 1>&2; exit 1; }
2411         fi
2412         ol_enable_sql="$ol_arg"
2413
2414 else
2415         ol_enable_sql="no"
2416 fi
2417 # end --enable-sql
2418 # OpenLDAP --with-sql_module
2419         # Check whether --with-sql_module or --without-sql_module was given.
2420 if test "${with_sql_module+set}" = set; then
2421   withval="$with_sql_module"
2422   
2423         ol_arg=invalid
2424         for ol_val in static dynamic ; do
2425                 if test "$withval" = "$ol_val" ; then
2426                         ol_arg="$ol_val"
2427                 fi
2428         done
2429         if test "$ol_arg" = "invalid" ; then
2430                 { echo "configure: error: bad value $withval for --with-sql_module" 1>&2; exit 1; }
2431         fi
2432         ol_with_sql_module="$ol_arg"
2433
2434 else
2435         ol_with_sql_module="static"
2436 fi
2437 # end --with-sql_module
2438
2439
2440 # Check whether --with-xxslapoverlays or --without-xxslapoverlays was given.
2441 if test "${with_xxslapoverlays+set}" = set; then
2442   withval="$with_xxslapoverlays"
2443   :
2444 fi
2445
2446 # OpenLDAP --with-dyngroup
2447         # Check whether --with-dyngroup or --without-dyngroup was given.
2448 if test "${with_dyngroup+set}" = set; then
2449   withval="$with_dyngroup"
2450   
2451         ol_arg=invalid
2452         for ol_val in no yes mod ; do
2453                 if test "$withval" = "$ol_val" ; then
2454                         ol_arg="$ol_val"
2455                 fi
2456         done
2457         if test "$ol_arg" = "invalid" ; then
2458                 { echo "configure: error: bad value $withval for --with-dyngroup" 1>&2; exit 1; }
2459         fi
2460         ol_with_dyngroup="$ol_arg"
2461
2462 else
2463         ol_with_dyngroup="no"
2464 fi
2465 # end --with-dyngroup
2466
2467 # OpenLDAP --with-proxycache
2468         # Check whether --with-proxycache or --without-proxycache was given.
2469 if test "${with_proxycache+set}" = set; then
2470   withval="$with_proxycache"
2471   
2472         ol_arg=invalid
2473         for ol_val in no yes mod ; do
2474                 if test "$withval" = "$ol_val" ; then
2475                         ol_arg="$ol_val"
2476                 fi
2477         done
2478         if test "$ol_arg" = "invalid" ; then
2479                 { echo "configure: error: bad value $withval for --with-proxycache" 1>&2; exit 1; }
2480         fi
2481         ol_with_proxycache="$ol_arg"
2482
2483 else
2484         ol_with_proxycache="no"
2485 fi
2486 # end --with-proxycache
2487
2488 # OpenLDAP --with-rwm
2489         # Check whether --with-rwm or --without-rwm was given.
2490 if test "${with_rwm+set}" = set; then
2491   withval="$with_rwm"
2492   
2493         ol_arg=invalid
2494         for ol_val in no yes mod ; do
2495                 if test "$withval" = "$ol_val" ; then
2496                         ol_arg="$ol_val"
2497                 fi
2498         done
2499         if test "$ol_arg" = "invalid" ; then
2500                 { echo "configure: error: bad value $withval for --with-rwm" 1>&2; exit 1; }
2501         fi
2502         ol_with_rwm="$ol_arg"
2503
2504 else
2505         ol_with_rwm="no"
2506 fi
2507 # end --with-rwm
2508
2509
2510 # Check whether --with-xxslurpdoptions or --without-xxslurpdoptions was given.
2511 if test "${with_xxslurpdoptions+set}" = set; then
2512   withval="$with_xxslurpdoptions"
2513   :
2514 fi
2515
2516 # OpenLDAP --enable-slurpd
2517         # Check whether --enable-slurpd or --disable-slurpd was given.
2518 if test "${enable_slurpd+set}" = set; then
2519   enableval="$enable_slurpd"
2520   
2521         ol_arg=invalid
2522         for ol_val in auto yes no ; do
2523                 if test "$enableval" = "$ol_val" ; then
2524                         ol_arg="$ol_val"
2525                 fi
2526         done
2527         if test "$ol_arg" = "invalid" ; then
2528                 { echo "configure: error: bad value $enableval for --enable-slurpd" 1>&2; exit 1; }
2529         fi
2530         ol_enable_slurpd="$ol_arg"
2531
2532 else
2533         ol_enable_slurpd="auto"
2534 fi
2535 # end --enable-slurpd
2536
2537 # Check whether --with-xxliboptions or --without-xxliboptions was given.
2538 if test "${with_xxliboptions+set}" = set; then
2539   withval="$with_xxliboptions"
2540   :
2541 fi
2542
2543 # Check whether --enable-static or --disable-static was given.
2544 if test "${enable_static+set}" = set; then
2545   enableval="$enable_static"
2546   p=${PACKAGE-default}
2547 case $enableval in
2548 yes) enable_static=yes ;;
2549 no) enable_static=no ;;
2550 *)
2551   enable_static=no
2552   # Look at the argument we got.  We use all the common list separators.
2553   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2554   for pkg in $enableval; do
2555     if test "X$pkg" = "X$p"; then
2556       enable_static=yes
2557     fi
2558   done
2559   IFS="$ac_save_ifs"
2560   ;;
2561 esac
2562 else
2563   enable_static=yes
2564 fi
2565
2566 # Check whether --enable-shared or --disable-shared was given.
2567 if test "${enable_shared+set}" = set; then
2568   enableval="$enable_shared"
2569   p=${PACKAGE-default}
2570 case $enableval in
2571 yes) enable_shared=yes ;;
2572 no) enable_shared=no ;;
2573 *)
2574   enable_shared=no
2575   # Look at the argument we got.  We use all the common list separators.
2576   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2577   for pkg in $enableval; do
2578     if test "X$pkg" = "X$p"; then
2579       enable_shared=yes
2580     fi
2581   done
2582   IFS="$ac_save_ifs"
2583   ;;
2584 esac
2585 else
2586   enable_shared=yes
2587 fi
2588
2589
2590
2591 # validate options
2592 if test $ol_enable_slapd = no ; then
2593                 if test $ol_enable_slapi = yes ; then
2594                 echo "configure: warning: slapd disabled, ignoring --enable-slapi argument" 1>&2
2595         fi
2596         if test $ol_enable_bdb = yes ; then
2597                 echo "configure: warning: slapd disabled, ignoring --enable-bdb argument" 1>&2
2598         fi
2599         if test $ol_enable_dnssrv = yes ; then
2600                 echo "configure: warning: slapd disabled, ignoring --enable-dnssrv argument" 1>&2
2601         fi
2602         if test $ol_enable_hdb = yes ; then
2603                 echo "configure: warning: slapd disabled, ignoring --enable-hdb argument" 1>&2
2604         fi
2605         if test $ol_enable_ldap = yes ; then
2606                 echo "configure: warning: slapd disabled, ignoring --enable-ldap argument" 1>&2
2607         fi
2608         if test $ol_enable_ldbm = yes ; then
2609                 echo "configure: warning: slapd disabled, ignoring --enable-ldbm argument" 1>&2
2610         fi
2611         if test $ol_enable_meta = yes ; then
2612                 echo "configure: warning: slapd disabled, ignoring --enable-meta argument" 1>&2
2613         fi
2614         if test $ol_enable_monitor = yes ; then
2615                 echo "configure: warning: slapd disabled, ignoring --enable-monitor argument" 1>&2
2616         fi
2617         if test $ol_enable_null = yes ; then
2618                 echo "configure: warning: slapd disabled, ignoring --enable-null argument" 1>&2
2619         fi
2620         if test $ol_enable_passwd = yes ; then
2621                 echo "configure: warning: slapd disabled, ignoring --enable-passwd argument" 1>&2
2622         fi
2623         if test $ol_enable_perl = yes ; then
2624                 echo "configure: warning: slapd disabled, ignoring --enable-perl argument" 1>&2
2625         fi
2626         if test $ol_enable_shell = yes ; then
2627                 echo "configure: warning: slapd disabled, ignoring --enable-shell argument" 1>&2
2628         fi
2629         if test $ol_enable_sql = yes ; then
2630                 echo "configure: warning: slapd disabled, ignoring --enable-sql argument" 1>&2
2631         fi
2632         if test $ol_enable_modules = yes ; then
2633                 echo "configure: warning: slapd disabled, ignoring --enable-modules argument" 1>&2
2634         fi
2635         if test $ol_enable_multimaster = yes ; then
2636                 echo "configure: warning: slapd disabled, ignoring --enable-multimaster argument" 1>&2
2637         fi
2638         if test $ol_enable_wrappers = yes ; then
2639                 echo "configure: warning: slapd disabled, ignoring --enable-wrappers argument" 1>&2
2640         fi
2641         if test $ol_enable_rlookups = yes ; then
2642                 echo "configure: warning: slapd disabled, ignoring --enable-rlookups argument" 1>&2
2643         fi
2644         if test $ol_enable_aci = yes ; then
2645                 echo "configure: warning: slapd disabled, ignoring --enable-aci argument" 1>&2
2646         fi
2647         if test $ol_with_ldbm_api != auto ; then
2648                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-api argument" 1>&2
2649         fi
2650         if test $ol_with_ldbm_type != auto ; then
2651                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-type argument" 1>&2
2652         fi
2653         if test $ol_with_bdb_module != static ; then
2654                 echo "configure: warning: slapd disabled, ignoring --with-bdb-module argument" 1>&2
2655         fi
2656         if test $ol_with_dnssrv_module != static ; then
2657                 echo "configure: warning: slapd disabled, ignoring --with-dnssrv-module argument" 1>&2
2658         fi
2659         if test $ol_with_hdb_module != static ; then
2660                 echo "configure: warning: slapd disabled, ignoring --with-hdb-module argument" 1>&2
2661         fi
2662         if test $ol_with_ldap_module != static ; then
2663                 echo "configure: warning: slapd disabled, ignoring --with-ldap-module argument" 1>&2
2664         fi
2665         if test $ol_with_ldbm_module != static ; then
2666                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-module argument" 1>&2
2667         fi
2668         if test $ol_with_meta_module != static ; then
2669                 echo "configure: warning: slapd disabled, ignoring --with-meta-module argument" 1>&2
2670         fi
2671         if test $ol_with_monitor_module != static ; then
2672                 echo "configure: warning: slapd disabled, ignoring --with-monitor-module argument" 1>&2
2673         fi
2674         if test $ol_with_null_module != static ; then
2675                 echo "configure: warning: slapd disabled, ignoring --with-null-module argument" 1>&2
2676         fi
2677         if test $ol_with_passwd_module != static ; then
2678                 echo "configure: warning: slapd disabled, ignoring --with-passwd-module argument" 1>&2
2679         fi
2680         if test $ol_with_perl_module != static ; then
2681                 echo "configure: warning: slapd disabled, ignoring --with-perl-module argument" 1>&2
2682         fi
2683         if test $ol_with_shell_module != static ; then
2684                 echo "configure: warning: slapd disabled, ignoring --with-shell-module argument" 1>&2
2685         fi
2686         if test $ol_with_sql_module != static ; then
2687                 echo "configure: warning: slapd disabled, ignoring --with-sql-module argument" 1>&2
2688         fi
2689         if test $ol_enable_slurpd = yes ; then
2690                 { echo "configure: error: slurpd requires slapd" 1>&2; exit 1; }
2691         fi
2692         if test $ol_enable_rewrite = yes ; then
2693                 echo "configure: warning: slapd disabled, ignoring --enable-rewrite argument" 1>&2
2694         fi
2695         if test $ol_with_dyngroup != no ; then
2696                 echo "configure: warning: slapd disabled, ignoring --with-dyngroup argument" 1>&2
2697         fi
2698         if test $ol_with_proxycache != no ; then
2699                 echo "configure: warning: slapd disabled, ignoring --with-proxycache argument" 1>&2
2700         fi
2701         if test $ol_with_rwm != no ; then
2702                 echo "configure: warning: slapd disabled, ignoring --with-rwm argument" 1>&2
2703         fi
2704
2705         # force settings to no
2706         ol_enable_slapi=no
2707         ol_enable_bdb=no
2708         ol_enable_dnssrv=no
2709         ol_enable_hdb=no
2710         ol_enable_ldap=no
2711         ol_enable_ldbm=no
2712         ol_enable_meta=no
2713         ol_enable_monitor=no
2714         ol_enable_null=no
2715         ol_enable_passwd=no
2716         ol_enable_perl=no
2717         ol_enable_shell=no
2718         ol_enable_sql=no
2719
2720         ol_enable_modules=no
2721         ol_enable_multimaster=no
2722         ol_enable_rlookups=no
2723         ol_enable_aci=no
2724         ol_enable_wrappers=no
2725
2726         ol_with_ldbm_api=no
2727         ol_with_ldbm_type=no
2728
2729         ol_with_bdb_module=static
2730         ol_with_dnssrv_module=static
2731         ol_with_hdb_module=static
2732         ol_with_ldap_module=static
2733         ol_with_ldbm_module=static
2734         ol_with_meta_module=static
2735         ol_with_monitor_module=static
2736         ol_with_null_module=static
2737         ol_with_passwd_module=static
2738         ol_with_perl_module=static
2739         ol_with_shell_module=static
2740         ol_with_sql_module=static
2741
2742         ol_enable_slurpd=no
2743
2744         ol_enable_rewrite=no
2745
2746         ol_with_dyngroup=no
2747         ol_with_proxycache=no
2748         ol_with_rwm=no
2749
2750 elif test $ol_enable_ldbm = no ; then
2751         
2752         if test $ol_with_ldbm_api != auto ; then
2753                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-api argument" 1>&2
2754         fi
2755
2756         if test $ol_with_ldbm_type != auto ; then
2757                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-type argument" 1>&2
2758         fi
2759
2760         if test $ol_with_ldbm_module != static ; then
2761                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-module argument" 1>&2
2762         fi
2763
2764         if test $ol_enable_modules != yes -a \
2765                 $ol_enable_bdb = no -a \
2766                 $ol_enable_dnssrv = no -a \
2767                 $ol_enable_hdb = no -a \
2768                 $ol_enable_ldap = no -a \
2769                 $ol_enable_meta = no -a \
2770                 $ol_enable_monitor = no -a \
2771                 $ol_enable_null = no -a \
2772                 $ol_enable_passwd = no -a \
2773                 $ol_enable_perl = no -a \
2774                 $ol_enable_shell = no -a \
2775                 $ol_enable_sql = no ; then
2776
2777                 if test $ol_enable_slapd = yes ; then
2778                         { echo "configure: error: slapd requires a backend" 1>&2; exit 1; }
2779                 else
2780                         echo "configure: warning: skipping slapd, no backend specified" 1>&2
2781                         ol_enable_slapd=no
2782                 fi
2783         fi
2784
2785         ol_with_ldbm_api=no
2786         ol_with_ldbm_type=no
2787         ol_with_ldbm_module=static
2788
2789         if test $ol_enable_bdb != no -o $ol_enable_hdb != no; then
2790                 ol_with_ldbm_api=berkeley
2791         fi
2792
2793 else
2794                 if test $ol_with_ldbm_api = gdbm -a \
2795                 $ol_with_ldbm_type = btree ; then
2796                 { echo "configure: error: GDBM only supports LDBM type hash" 1>&2; exit 1; }
2797         fi
2798         if test $ol_with_ldbm_api = mdbm -a \
2799                 $ol_with_ldbm_type = btree ; then
2800                 { echo "configure: error: MDBM only supports LDBM type hash" 1>&2; exit 1; }
2801         fi
2802         if test $ol_with_ldbm_api = ndbm -a \
2803                 $ol_with_ldbm_type = btree ; then
2804                 { echo "configure: error: NDBM only supports LDBM type hash" 1>&2; exit 1; }
2805         fi
2806
2807         if test $ol_enable_bdb = yes -o $ol_enable_hdb = yes ; then
2808                 if test $ol_with_ldbm_api = auto ; then
2809                         ol_with_ldbm_api=berkeley
2810                 elif test $ol_with_ldbm_api != berkeley ; then
2811                         { echo "configure: error: LDBM API not compatible with BDB/HDB" 1>&2; exit 1; }
2812                 fi
2813
2814         elif test $ol_enable_bdb = auto ; then
2815                 if test $ol_with_ldbm_api != berkeley \
2816                         -o $ol_with_ldbm_api != auto ; then
2817                         echo "configure: warning: LDBM API not compatible with BDB, disabling BDB" 1>&2
2818                         ol_enable_bdb=no
2819                 fi
2820         fi
2821 fi
2822
2823 if test $ol_enable_slurpd = yes ; then
2824                 if test $ol_with_threads = no ; then
2825                 { echo "configure: error: slurpd requires threads" 1>&2; exit 1; }
2826         fi
2827 fi
2828
2829 if test $ol_enable_lmpasswd = yes ; then
2830         if test $ol_with_tls = no ; then
2831                 { echo "configure: error: LAN Manager passwords require OpenSSL" 1>&2; exit 1; }
2832         fi
2833 fi
2834
2835 if test $ol_enable_kbind = yes -o $ol_enable_kpasswd = yes ; then
2836         if test $ol_with_kerberos = no ; then
2837                 { echo "configure: error: options require --with-kerberos" 1>&2; exit 1; }
2838         elif test $ol_with_kerberos = auto ; then
2839                 ol_with_kerberos=yes
2840         fi
2841
2842 elif test $ol_enable_kbind = no -o $ol_enable_kpasswd = no ; then
2843         if test $ol_with_kerberos = auto ; then
2844                 ol_with_kerberos=no
2845         elif test $ol_with_kerberos != no ; then
2846                 echo "configure: warning: Kerberos detection enabled unnecessarily" 1>&2;
2847                 ol_with_kerberos=no
2848         fi
2849 fi
2850
2851 if test $ol_enable_spasswd = yes ; then
2852         if test $ol_with_cyrus_sasl = no ; then
2853                 { echo "configure: error: options require --with-cyrus-sasl" 1>&2; exit 1; }
2854         fi
2855         ol_with_cyrus_sasl=yes
2856 fi
2857
2858 echo "$ac_t""done" 1>&6
2859
2860 LDAP_LIBS=
2861 LDBM_LIBS=
2862 LTHREAD_LIBS=
2863 LUTIL_LIBS=
2864
2865 SLAPD_LIBS=
2866 SLURPD_LIBS=
2867
2868 BUILD_SLAPD=no
2869 BUILD_SLURPD=no
2870
2871 BUILD_THREAD=no
2872
2873 BUILD_SLAPI=no
2874 SLAPD_SLAPI_DEPEND=
2875
2876 BUILD_BDB=no
2877 BUILD_DNSSRV=no
2878 BUILD_HDB=no
2879 BUILD_LDAP=no
2880 BUILD_LDBM=no
2881 BUILD_META=no
2882 BUILD_MONITOR=no
2883 BUILD_NULL=no
2884 BUILD_PASSWD=no
2885 BUILD_PERL=no
2886 BUILD_SHELL=no
2887 BUILD_SQL=no
2888
2889 BUILD_BDB_DYNAMIC=static
2890 BUILD_DNSSRV_DYNAMIC=static
2891 BUILD_HDB_DYNAMIC=static
2892 BUILD_LDAP_DYNAMIC=static
2893 BUILD_LDBM_DYNAMIC=static
2894 BUILD_META_DYNAMIC=static
2895 BUILD_MONITOR_DYNAMIC=static
2896 BUILD_NULL_DYNAMIC=static
2897 BUILD_PASSWD_DYNAMIC=static
2898 BUILD_PERL_DYNAMIC=static
2899 BUILD_SHELL_DYNAMIC=static
2900 BUILD_SQL_DYNAMIC=static
2901
2902 BUILD_DYNGROUP=no
2903 BUILD_PROXYCACHE=no
2904 BUILD_RWM=no
2905
2906 SLAPD_DYNAMIC_OVERLAYS=
2907
2908 SLAPD_MODULES_LDFLAGS=
2909 SLAPD_MODULES_CPPFLAGS=
2910
2911 SLAPD_STATIC_BACKENDS=
2912 SLAPD_DYNAMIC_BACKENDS=
2913
2914 SLAPD_PERL_LDFLAGS=
2915 MOD_PERL_LDFLAGS=
2916 PERL_CPPFLAGS=
2917
2918 SLAPD_SQL_LDFLAGS=
2919 SLAPD_SQL_LIBS=
2920 SLAPD_SQL_INCLUDES=
2921
2922 KRB4_LIBS=
2923 KRB5_LIBS=
2924 SASL_LIBS=
2925 TLS_LIBS=
2926 MODULES_LIBS=
2927 SLAPI_LIBS=
2928 LIBSLAPI=
2929 LIBSLAPITOOLS=
2930 AUTH_LIBS=
2931
2932 SLAPD_SLP_LIBS=
2933
2934
2935 # Find a good install program.  We prefer a C program (faster),
2936 # so one script is as good as another.  But avoid the broken or
2937 # incompatible versions:
2938 # SysV /etc/install, /usr/sbin/install
2939 # SunOS /usr/etc/install
2940 # IRIX /sbin/install
2941 # AIX /bin/install
2942 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
2943 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
2944 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2945 # ./install, which can be erroneously created by make from ./install.sh.
2946 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
2947 echo "configure:2948: checking for a BSD compatible install" >&5
2948 if test -z "$INSTALL"; then
2949 if eval "test \"\${ac_cv_path_install+set}\" = set"; then
2950   echo $ac_n "(cached) $ac_c" 1>&6
2951 else
2952     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
2953   for ac_dir in $PATH; do
2954     # Account for people who put trailing slashes in PATH elements.
2955     case "$ac_dir/" in
2956     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
2957     *)
2958       # OSF1 and SCO ODT 3.0 have their own names for install.
2959       # Don't use installbsd from OSF since it installs stuff as root
2960       # by default.
2961       for ac_prog in ginstall scoinst install; do
2962         if test -f $ac_dir/$ac_prog; then
2963           if test $ac_prog = install &&
2964             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
2965             # AIX install.  It has an incompatible calling convention.
2966             :
2967           elif test $ac_prog = install &&
2968             grep pwplus $ac_dir/$ac_prog >/dev/null 2>&1; then
2969             # program-specific install script used by HP pwplus--don't use.
2970             :
2971           else
2972             ac_cv_path_install="$ac_dir/$ac_prog -c"
2973             break 2
2974           fi
2975         fi
2976       done
2977       ;;
2978     esac
2979   done
2980   IFS="$ac_save_IFS"
2981
2982 fi
2983   if test "${ac_cv_path_install+set}" = set; then
2984     INSTALL="$ac_cv_path_install"
2985   else
2986     # As a last resort, use the slow shell script.  We don't cache a
2987     # path for INSTALL within a source directory, because that will
2988     # break other packages using the cache if that directory is
2989     # removed, or if the path is relative.
2990     INSTALL="$ac_install_sh"
2991   fi
2992 fi
2993 echo "$ac_t""$INSTALL" 1>&6
2994
2995 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2996 # It thinks the first close brace ends the variable substitution.
2997 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2998
2999 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3000
3001 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3002
3003
3004 cat >> confdefs.h <<\EOF
3005 #define HAVE_MKVERSION 1
3006 EOF
3007
3008
3009
3010
3011 ol_aix_threads=no
3012 case "$target" in
3013 *-*-aix*)       if test -z "$CC" ; then
3014                 case "$ol_with_threads" in
3015                 auto | yes |  posix) ol_aix_threads=yes ;;
3016                 esac
3017         fi
3018 ;;
3019 esac
3020
3021 if test $ol_aix_threads = yes ; then
3022         if test -z "${CC}" ; then
3023                 for ac_prog in cc_r xlc_r cc
3024 do
3025 # Extract the first word of "$ac_prog", so it can be a program name with args.
3026 set dummy $ac_prog; ac_word=$2
3027 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3028 echo "configure:3029: checking for $ac_word" >&5
3029 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3030   echo $ac_n "(cached) $ac_c" 1>&6
3031 else
3032   if test -n "$CC"; then
3033   ac_cv_prog_CC="$CC" # Let the user override the test.
3034 else
3035   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3036   ac_dummy="$PATH"
3037   for ac_dir in $ac_dummy; do
3038     test -z "$ac_dir" && ac_dir=.
3039     if test -f $ac_dir/$ac_word; then
3040       ac_cv_prog_CC="$ac_prog"
3041       break
3042     fi
3043   done
3044   IFS="$ac_save_ifs"
3045 fi
3046 fi
3047 CC="$ac_cv_prog_CC"
3048 if test -n "$CC"; then
3049   echo "$ac_t""$CC" 1>&6
3050 else
3051   echo "$ac_t""no" 1>&6
3052 fi
3053
3054 test -n "$CC" && break
3055 done
3056
3057
3058                 if test "$CC" = cc ; then
3059                                                 if test $ol_with_threads != auto ; then
3060                                 { echo "configure: error: --with-threads requires cc_r (or other suitable compiler) on AIX" 1>&2; exit 1; }
3061                         else
3062                                 echo "configure: warning: disabling threads, no cc_r on AIX" 1>&2
3063                         fi
3064                         ol_with_threads=no
3065                 fi
3066         fi
3067
3068         if test "${CC}" = "cc_r" -o "${CC}" = "xlc_r" ; then
3069                 ol_with_threads=posix
3070                 ol_cv_pthread_create=yes
3071         fi
3072 fi
3073
3074 if test -z "${CC}"; then
3075         for ac_prog in cc gcc
3076 do
3077 # Extract the first word of "$ac_prog", so it can be a program name with args.
3078 set dummy $ac_prog; ac_word=$2
3079 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3080 echo "configure:3081: checking for $ac_word" >&5
3081 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3082   echo $ac_n "(cached) $ac_c" 1>&6
3083 else
3084   if test -n "$CC"; then
3085   ac_cv_prog_CC="$CC" # Let the user override the test.
3086 else
3087   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3088   ac_dummy="$PATH"
3089   for ac_dir in $ac_dummy; do
3090     test -z "$ac_dir" && ac_dir=.
3091     if test -f $ac_dir/$ac_word; then
3092       ac_cv_prog_CC="$ac_prog"
3093       break
3094     fi
3095   done
3096   IFS="$ac_save_ifs"
3097 fi
3098 fi
3099 CC="$ac_cv_prog_CC"
3100 if test -n "$CC"; then
3101   echo "$ac_t""$CC" 1>&6
3102 else
3103   echo "$ac_t""no" 1>&6
3104 fi
3105
3106 test -n "$CC" && break
3107 done
3108 test -n "$CC" || CC="missing"
3109
3110
3111         if test "${CC}" = "missing" ; then
3112                 { echo "configure: error: Unable to locate cc(1) or suitable replacement.  Check PATH or set CC." 1>&2; exit 1; }
3113         fi
3114 fi
3115
3116 if test -z "${AR}"; then
3117         for ac_prog in ar gar
3118 do
3119 # Extract the first word of "$ac_prog", so it can be a program name with args.
3120 set dummy $ac_prog; ac_word=$2
3121 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3122 echo "configure:3123: checking for $ac_word" >&5
3123 if eval "test \"\${ac_cv_prog_AR+set}\" = set"; then
3124   echo $ac_n "(cached) $ac_c" 1>&6
3125 else
3126   if test -n "$AR"; then
3127   ac_cv_prog_AR="$AR" # Let the user override the test.
3128 else
3129   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3130   ac_dummy="$PATH"
3131   for ac_dir in $ac_dummy; do
3132     test -z "$ac_dir" && ac_dir=.
3133     if test -f $ac_dir/$ac_word; then
3134       ac_cv_prog_AR="$ac_prog"
3135       break
3136     fi
3137   done
3138   IFS="$ac_save_ifs"
3139 fi
3140 fi
3141 AR="$ac_cv_prog_AR"
3142 if test -n "$AR"; then
3143   echo "$ac_t""$AR" 1>&6
3144 else
3145   echo "$ac_t""no" 1>&6
3146 fi
3147
3148 test -n "$AR" && break
3149 done
3150 test -n "$AR" || AR="missing"
3151
3152
3153         if test "${AR}" = "missing" ; then
3154                 { echo "configure: error: Unable to locate ar(1) or suitable replacement.  Check PATH or set AR." 1>&2; exit 1; }
3155         fi
3156 fi
3157
3158
3159
3160 # Find the correct PATH separator.  Usually this is `:', but
3161 # DJGPP uses `;' like DOS.
3162 if test "X${PATH_SEPARATOR+set}" != Xset; then
3163   UNAME=${UNAME-`uname 2>/dev/null`}
3164   case X$UNAME in
3165     *-DOS) lt_cv_sys_path_separator=';' ;;
3166     *)     lt_cv_sys_path_separator=':' ;;
3167   esac
3168   PATH_SEPARATOR=$lt_cv_sys_path_separator
3169 fi
3170
3171 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
3172 echo "configure:3173: checking for Cygwin environment" >&5
3173 if eval "test \"\${ac_cv_cygwin+set}\" = set"; then
3174   echo $ac_n "(cached) $ac_c" 1>&6
3175 else
3176   cat > conftest.$ac_ext <<EOF
3177 #line 3178 "configure"
3178 #include "confdefs.h"
3179
3180 int main() {
3181
3182 #ifndef __CYGWIN__
3183 #define __CYGWIN__ __CYGWIN32__
3184 #endif
3185 return __CYGWIN__;
3186 ; return 0; }
3187 EOF
3188 if { (eval echo configure:3189: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3189   rm -rf conftest*
3190   ac_cv_cygwin=yes
3191 else
3192   echo "configure: failed program was:" >&5
3193   cat conftest.$ac_ext >&5
3194   rm -rf conftest*
3195   ac_cv_cygwin=no
3196 fi
3197 rm -f conftest*
3198 fi
3199
3200 echo "$ac_t""$ac_cv_cygwin" 1>&6
3201 CYGWIN=
3202 test "$ac_cv_cygwin" = yes && CYGWIN=yes
3203 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
3204 echo "configure:3205: checking for mingw32 environment" >&5
3205 if eval "test \"\${ac_cv_mingw32+set}\" = set"; then
3206   echo $ac_n "(cached) $ac_c" 1>&6
3207 else
3208   cat > conftest.$ac_ext <<EOF
3209 #line 3210 "configure"
3210 #include "confdefs.h"
3211
3212 int main() {
3213 return __MINGW32__;
3214 ; return 0; }
3215 EOF
3216 if { (eval echo configure:3217: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3217   rm -rf conftest*
3218   ac_cv_mingw32=yes
3219 else
3220   echo "configure: failed program was:" >&5
3221   cat conftest.$ac_ext >&5
3222   rm -rf conftest*
3223   ac_cv_mingw32=no
3224 fi
3225 rm -f conftest*
3226 fi
3227
3228 echo "$ac_t""$ac_cv_mingw32" 1>&6
3229 MINGW32=
3230 test "$ac_cv_mingw32" = yes && MINGW32=yes
3231 echo $ac_n "checking for EMX OS/2 environment""... $ac_c" 1>&6
3232 echo "configure:3233: checking for EMX OS/2 environment" >&5
3233 if eval "test \"\${ac_cv_emxos2+set}\" = set"; then
3234   echo $ac_n "(cached) $ac_c" 1>&6
3235 else
3236   cat > conftest.$ac_ext <<EOF
3237 #line 3238 "configure"
3238 #include "confdefs.h"
3239
3240 int main() {
3241 return __EMX__;
3242 ; return 0; }
3243 EOF
3244 if { (eval echo configure:3245: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3245   rm -rf conftest*
3246   ac_cv_emxos2=yes
3247 else
3248   echo "configure: failed program was:" >&5
3249   cat conftest.$ac_ext >&5
3250   rm -rf conftest*
3251   ac_cv_emxos2=no
3252 fi
3253 rm -f conftest*
3254 fi
3255
3256 echo "$ac_t""$ac_cv_emxos2" 1>&6
3257 EMXOS2=
3258 test "$ac_cv_emxos2" = yes && EMXOS2=yes
3259 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
3260 echo "configure:3261: checking how to run the C preprocessor" >&5
3261 # On Suns, sometimes $CPP names a directory.
3262 if test -n "$CPP" && test -d "$CPP"; then
3263   CPP=
3264 fi
3265 if test -z "$CPP"; then
3266 if eval "test \"\${ac_cv_prog_CPP+set}\" = set"; then
3267   echo $ac_n "(cached) $ac_c" 1>&6
3268 else
3269     # This must be in double quotes, not single quotes, because CPP may get
3270   # substituted into the Makefile and "${CC-cc}" will confuse make.
3271   CPP="${CC-cc} -E"
3272   # On the NeXT, cc -E runs the code through the compiler's parser,
3273   # not just through cpp.
3274   cat > conftest.$ac_ext <<EOF
3275 #line 3276 "configure"
3276 #include "confdefs.h"
3277 #include <assert.h>
3278 Syntax Error
3279 EOF
3280 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3281 { (eval echo configure:3282: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3282 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3283 if test -z "$ac_err"; then
3284   :
3285 else
3286   echo "$ac_err" >&5
3287   echo "configure: failed program was:" >&5
3288   cat conftest.$ac_ext >&5
3289   rm -rf conftest*
3290   CPP="${CC-cc} -E -traditional-cpp"
3291   cat > conftest.$ac_ext <<EOF
3292 #line 3293 "configure"
3293 #include "confdefs.h"
3294 #include <assert.h>
3295 Syntax Error
3296 EOF
3297 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3298 { (eval echo configure:3299: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3299 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3300 if test -z "$ac_err"; then
3301   :
3302 else
3303   echo "$ac_err" >&5
3304   echo "configure: failed program was:" >&5
3305   cat conftest.$ac_ext >&5
3306   rm -rf conftest*
3307   CPP="${CC-cc} -nologo -E"
3308   cat > conftest.$ac_ext <<EOF
3309 #line 3310 "configure"
3310 #include "confdefs.h"
3311 #include <assert.h>
3312 Syntax Error
3313 EOF
3314 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3315 { (eval echo configure:3316: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3316 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3317 if test -z "$ac_err"; then
3318   :
3319 else
3320   echo "$ac_err" >&5
3321   echo "configure: failed program was:" >&5
3322   cat conftest.$ac_ext >&5
3323   rm -rf conftest*
3324   CPP=/lib/cpp
3325 fi
3326 rm -f conftest*
3327 fi
3328 rm -f conftest*
3329 fi
3330 rm -f conftest*
3331   ac_cv_prog_CPP="$CPP"
3332 fi
3333   CPP="$ac_cv_prog_CPP"
3334 else
3335   ac_cv_prog_CPP="$CPP"
3336 fi
3337 echo "$ac_t""$CPP" 1>&6
3338
3339 # Check whether --enable-fast-install or --disable-fast-install was given.
3340 if test "${enable_fast_install+set}" = set; then
3341   enableval="$enable_fast_install"
3342   p=${PACKAGE-default}
3343 case $enableval in
3344 yes) enable_fast_install=yes ;;
3345 no) enable_fast_install=no ;;
3346 *)
3347   enable_fast_install=no
3348   # Look at the argument we got.  We use all the common list separators.
3349   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
3350   for pkg in $enableval; do
3351     if test "X$pkg" = "X$p"; then
3352       enable_fast_install=yes
3353     fi
3354   done
3355   IFS="$ac_save_ifs"
3356   ;;
3357 esac
3358 else
3359   enable_fast_install=yes
3360 fi
3361
3362 # Extract the first word of "gcc", so it can be a program name with args.
3363 set dummy gcc; ac_word=$2
3364 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3365 echo "configure:3366: checking for $ac_word" >&5
3366 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3367   echo $ac_n "(cached) $ac_c" 1>&6
3368 else
3369   if test -n "$CC"; then
3370   ac_cv_prog_CC="$CC" # Let the user override the test.
3371 else
3372   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3373   ac_dummy="$PATH"
3374   for ac_dir in $ac_dummy; do
3375     test -z "$ac_dir" && ac_dir=.
3376     if test -f $ac_dir/$ac_word; then
3377       ac_cv_prog_CC="gcc"
3378       break
3379     fi
3380   done
3381   IFS="$ac_save_ifs"
3382 fi
3383 fi
3384 CC="$ac_cv_prog_CC"
3385 if test -n "$CC"; then
3386   echo "$ac_t""$CC" 1>&6
3387 else
3388   echo "$ac_t""no" 1>&6
3389 fi
3390
3391 if test -z "$CC"; then
3392   # Extract the first word of "cc", so it can be a program name with args.
3393 set dummy cc; ac_word=$2
3394 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3395 echo "configure:3396: checking for $ac_word" >&5
3396 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3397   echo $ac_n "(cached) $ac_c" 1>&6
3398 else
3399   if test -n "$CC"; then
3400   ac_cv_prog_CC="$CC" # Let the user override the test.
3401 else
3402   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3403   ac_prog_rejected=no
3404   ac_dummy="$PATH"
3405   for ac_dir in $ac_dummy; do
3406     test -z "$ac_dir" && ac_dir=.
3407     if test -f $ac_dir/$ac_word; then
3408       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
3409         ac_prog_rejected=yes
3410         continue
3411       fi
3412       ac_cv_prog_CC="cc"
3413       break
3414     fi
3415   done
3416   IFS="$ac_save_ifs"
3417 if test $ac_prog_rejected = yes; then
3418   # We found a bogon in the path, so make sure we never use it.
3419   set dummy $ac_cv_prog_CC
3420   shift
3421   if test $# -gt 0; then
3422     # We chose a different compiler from the bogus one.
3423     # However, it has the same basename, so the bogon will be chosen
3424     # first if we set CC to just the basename; use the full file name.
3425     shift
3426     set dummy "$ac_dir/$ac_word" "$@"
3427     shift
3428     ac_cv_prog_CC="$@"
3429   fi
3430 fi
3431 fi
3432 fi
3433 CC="$ac_cv_prog_CC"
3434 if test -n "$CC"; then
3435   echo "$ac_t""$CC" 1>&6
3436 else
3437   echo "$ac_t""no" 1>&6
3438 fi
3439
3440   if test -z "$CC"; then
3441     case "`uname -s`" in
3442     *win32* | *WIN32* | *CYGWIN*)
3443       # Extract the first word of "cl", so it can be a program name with args.
3444 set dummy cl; ac_word=$2
3445 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3446 echo "configure:3447: checking for $ac_word" >&5
3447 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3448   echo $ac_n "(cached) $ac_c" 1>&6
3449 else
3450   if test -n "$CC"; then
3451   ac_cv_prog_CC="$CC" # Let the user override the test.
3452 else
3453   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3454   ac_dummy="$PATH"
3455   for ac_dir in $ac_dummy; do
3456     test -z "$ac_dir" && ac_dir=.
3457     if test -f $ac_dir/$ac_word; then
3458       ac_cv_prog_CC="cl"
3459       break
3460     fi
3461   done
3462   IFS="$ac_save_ifs"
3463 fi
3464 fi
3465 CC="$ac_cv_prog_CC"
3466 if test -n "$CC"; then
3467   echo "$ac_t""$CC" 1>&6
3468 else
3469   echo "$ac_t""no" 1>&6
3470 fi
3471  ;;
3472     esac
3473   fi
3474   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
3475 fi
3476
3477 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works""... $ac_c" 1>&6
3478 echo "configure:3479: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works" >&5
3479
3480 ac_ext=c
3481 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
3482 ac_cpp='$CPP $CPPFLAGS'
3483 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
3484 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
3485 cross_compiling=$ac_cv_prog_cc_cross
3486
3487 cat > conftest.$ac_ext << EOF
3488
3489 #line 3490 "configure"
3490 #include "confdefs.h"
3491
3492 main(){return(0);}
3493 EOF
3494 if { (eval echo configure:3495: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3495   ac_cv_prog_cc_works=yes
3496   # If we can't run a trivial program, we are probably using a cross compiler.
3497   if (./conftest; exit) 2>/dev/null; then
3498     ac_cv_prog_cc_cross=no
3499   else
3500     ac_cv_prog_cc_cross=yes
3501   fi
3502 else
3503   echo "configure: failed program was:" >&5
3504   cat conftest.$ac_ext >&5
3505   ac_cv_prog_cc_works=no
3506 fi
3507 rm -fr conftest*
3508 ac_ext=c
3509 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
3510 ac_cpp='$CPP $CPPFLAGS'
3511 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
3512 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
3513 cross_compiling=$ac_cv_prog_cc_cross
3514
3515 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
3516 if test $ac_cv_prog_cc_works = no; then
3517   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
3518 fi
3519 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
3520 echo "configure:3521: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler" >&5
3521 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
3522 cross_compiling=$ac_cv_prog_cc_cross
3523
3524 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
3525 echo "configure:3526: checking whether we are using GNU C" >&5
3526 if eval "test \"\${ac_cv_prog_gcc+set}\" = set"; then
3527   echo $ac_n "(cached) $ac_c" 1>&6
3528 else
3529   cat > conftest.c <<EOF
3530 #ifdef __GNUC__
3531   yes;
3532 #endif
3533 EOF
3534 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:3535: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
3535   ac_cv_prog_gcc=yes
3536 else
3537   ac_cv_prog_gcc=no
3538 fi
3539 fi
3540
3541 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
3542
3543 if test $ac_cv_prog_gcc = yes; then
3544   GCC=yes
3545 else
3546   GCC=
3547 fi
3548
3549 ac_test_CFLAGS="${CFLAGS+set}"
3550 ac_save_CFLAGS="$CFLAGS"
3551 CFLAGS=
3552 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
3553 echo "configure:3554: checking whether ${CC-cc} accepts -g" >&5
3554 if eval "test \"\${ac_cv_prog_cc_g+set}\" = set"; then
3555   echo $ac_n "(cached) $ac_c" 1>&6
3556 else
3557   echo 'void f(){}' > conftest.c
3558 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
3559   ac_cv_prog_cc_g=yes
3560 else
3561   ac_cv_prog_cc_g=no
3562 fi
3563 rm -f conftest*
3564
3565 fi
3566
3567 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
3568 if test "$ac_test_CFLAGS" = set; then
3569   CFLAGS="$ac_save_CFLAGS"
3570 elif test $ac_cv_prog_cc_g = yes; then
3571   if test "$GCC" = yes; then
3572     CFLAGS="-g -O2"
3573   else
3574     CFLAGS="-g"
3575   fi
3576 else
3577   if test "$GCC" = yes; then
3578     CFLAGS="-O2"
3579   else
3580     CFLAGS=
3581   fi
3582 fi
3583
3584 # Check whether --with-gnu-ld or --without-gnu-ld was given.
3585 if test "${with_gnu_ld+set}" = set; then
3586   withval="$with_gnu_ld"
3587   test "$withval" = no || with_gnu_ld=yes
3588 else
3589   with_gnu_ld=no
3590 fi
3591
3592 ac_prog=ld
3593 if test "$GCC" = yes; then
3594   # Check if gcc -print-prog-name=ld gives a path.
3595   echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
3596 echo "configure:3597: checking for ld used by GCC" >&5
3597   case $host in
3598   *-*-mingw*)
3599     # gcc leaves a trailing carriage return which upsets mingw
3600     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
3601   *)
3602     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
3603   esac
3604   case $ac_prog in
3605     # Accept absolute paths.
3606     [\\/]* | [A-Za-z]:[\\/]*)
3607       re_direlt='/[^/][^/]*/\.\./'
3608       # Canonicalize the path of ld
3609       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
3610       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
3611         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
3612       done
3613       test -z "$LD" && LD="$ac_prog"
3614       ;;
3615   "")
3616     # If it fails, then pretend we aren't using GCC.
3617     ac_prog=ld
3618     ;;
3619   *)
3620     # If it is relative, then search for the first ld in PATH.
3621     with_gnu_ld=unknown
3622     ;;
3623   esac
3624 elif test "$with_gnu_ld" = yes; then
3625   echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
3626 echo "configure:3627: checking for GNU ld" >&5
3627 else
3628   echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
3629 echo "configure:3630: checking for non-GNU ld" >&5
3630 fi
3631 if eval "test \"\${lt_cv_path_LD+set}\" = set"; then
3632   echo $ac_n "(cached) $ac_c" 1>&6
3633 else
3634   if test -z "$LD"; then
3635   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3636   for ac_dir in $PATH; do
3637     test -z "$ac_dir" && ac_dir=.
3638     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
3639       lt_cv_path_LD="$ac_dir/$ac_prog"
3640       # Check to see if the program is GNU ld.  I'd rather use --version,
3641       # but apparently some GNU ld's only accept -v.
3642       # Break only if it was the GNU/non-GNU ld that we prefer.
3643       if "$lt_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
3644         test "$with_gnu_ld" != no && break
3645       else
3646         test "$with_gnu_ld" != yes && break
3647       fi
3648     fi
3649   done
3650   IFS="$ac_save_ifs"
3651 else
3652   lt_cv_path_LD="$LD" # Let the user override the test with a path.
3653 fi
3654 fi
3655
3656 LD="$lt_cv_path_LD"
3657 if test -n "$LD"; then
3658   echo "$ac_t""$LD" 1>&6
3659 else
3660   echo "$ac_t""no" 1>&6
3661 fi
3662 test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
3663 echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
3664 echo "configure:3665: checking if the linker ($LD) is GNU ld" >&5
3665 if eval "test \"\${lt_cv_prog_gnu_ld+set}\" = set"; then
3666   echo $ac_n "(cached) $ac_c" 1>&6
3667 else
3668   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
3669 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
3670   lt_cv_prog_gnu_ld=yes
3671 else
3672   lt_cv_prog_gnu_ld=no
3673 fi
3674 fi
3675
3676 echo "$ac_t""$lt_cv_prog_gnu_ld" 1>&6
3677 with_gnu_ld=$lt_cv_prog_gnu_ld
3678
3679
3680 echo $ac_n "checking for $LD option to reload object files""... $ac_c" 1>&6
3681 echo "configure:3682: checking for $LD option to reload object files" >&5
3682 if eval "test \"\${lt_cv_ld_reload_flag+set}\" = set"; then
3683   echo $ac_n "(cached) $ac_c" 1>&6
3684 else
3685   lt_cv_ld_reload_flag='-r'
3686 fi
3687
3688 echo "$ac_t""$lt_cv_ld_reload_flag" 1>&6
3689 reload_flag=$lt_cv_ld_reload_flag
3690 test -n "$reload_flag" && reload_flag=" $reload_flag"
3691
3692 echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
3693 echo "configure:3694: checking for BSD-compatible nm" >&5
3694 if eval "test \"\${lt_cv_path_NM+set}\" = set"; then
3695   echo $ac_n "(cached) $ac_c" 1>&6
3696 else
3697   if test -n "$NM"; then
3698   # Let the user override the test.
3699   lt_cv_path_NM="$NM"
3700 else
3701   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3702   for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
3703     test -z "$ac_dir" && ac_dir=.
3704     tmp_nm=$ac_dir/${ac_tool_prefix}nm
3705     if test -f $tmp_nm || test -f $tmp_nm$ac_exeext ; then
3706       # Check to see if the nm accepts a BSD-compat flag.
3707       # Adding the `sed 1q' prevents false positives on HP-UX, which says:
3708       #   nm: unknown option "B" ignored
3709       # Tru64's nm complains that /dev/null is an invalid object file
3710       if ($tmp_nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then
3711         lt_cv_path_NM="$tmp_nm -B"
3712         break
3713       elif ($tmp_nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
3714         lt_cv_path_NM="$tmp_nm -p"
3715         break
3716       else
3717         lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
3718         continue # so that we can try to find one that supports BSD flags
3719       fi
3720     fi
3721   done
3722   IFS="$ac_save_ifs"
3723   test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
3724 fi
3725 fi
3726
3727 NM="$lt_cv_path_NM"
3728 echo "$ac_t""$NM" 1>&6
3729
3730 echo $ac_n "checking for a sed that does not truncate output""... $ac_c" 1>&6
3731 echo "configure:3732: checking for a sed that does not truncate output" >&5
3732 if eval "test \"\${lt_cv_path_SED+set}\" = set"; then
3733   echo $ac_n "(cached) $ac_c" 1>&6
3734 else
3735   # Loop through the user's path and test for sed and gsed.
3736 # Then use that list of sed's as ones to test for truncation.
3737 as_executable_p="test -f"
3738 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3739 for as_dir in $PATH
3740 do
3741   IFS=$as_save_IFS
3742   test -z "$as_dir" && as_dir=.
3743   for ac_prog in sed gsed; do
3744     for ac_exec_ext in '' $ac_executable_extensions; do
3745       if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
3746         _sed_list="$_sed_list $as_dir/$ac_prog$ac_exec_ext"
3747       fi
3748     done
3749   done
3750 done
3751
3752   # Create a temporary directory, and hook for its removal unless debugging.
3753 $debug ||
3754 {
3755   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
3756   trap '{ (exit 1); exit 1; }' 1 2 13 15
3757 }
3758
3759 # Create a (secure) tmp directory for tmp files.
3760 : ${TMPDIR=/tmp}
3761 {
3762   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/sedXXXXXX") 2>/dev/null` &&
3763   test -n "$tmp" && test -d "$tmp"
3764 }  ||
3765 {
3766   tmp=$TMPDIR/sed$$-$RANDOM
3767   (umask 077 && mkdir $tmp)
3768 } ||
3769 {
3770    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
3771    { (exit 1); exit 1; }
3772 }
3773   _max=0
3774   _count=0
3775   # Add /usr/xpg4/bin/sed as it is typically found on Solaris
3776   # along with /bin/sed that truncates output.
3777   for _sed in $_sed_list /usr/xpg4/bin/sed; do
3778     test ! -f ${_sed} && break
3779     cat /dev/null > "$tmp/sed.in"
3780     _count=0
3781     echo ${ECHO_N-$ac_n} "0123456789${ECHO_C-$ac_c}" >"$tmp/sed.in"
3782     # Check for GNU sed and select it if it is found.
3783     if "${_sed}" --version 2>&1 < /dev/null | egrep '(GNU)' > /dev/null; then
3784       lt_cv_path_SED=${_sed}
3785       break
3786     fi
3787     while true; do
3788       cat "$tmp/sed.in" "$tmp/sed.in" >"$tmp/sed.tmp"
3789       mv "$tmp/sed.tmp" "$tmp/sed.in"
3790       cp "$tmp/sed.in" "$tmp/sed.nl"
3791       echo >>"$tmp/sed.nl"
3792       ${_sed} -e 's/a$//' < "$tmp/sed.nl" >"$tmp/sed.out" || break
3793       cmp -s "$tmp/sed.out" "$tmp/sed.nl" || break
3794       # 40000 chars as input seems more than enough
3795       test $_count -gt 10 && break
3796       _count=`expr $_count + 1`
3797       if test $_count -gt $_max; then
3798         _max=$_count
3799         lt_cv_path_SED=$_sed
3800       fi
3801     done
3802   done
3803   rm -rf "$tmp"
3804
3805 fi
3806
3807 if test "X$SED" != "X"; then
3808   lt_cv_path_SED=$SED
3809 else
3810   SED=$lt_cv_path_SED
3811 fi
3812 echo "$ac_t""$SED" 1>&6
3813
3814 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
3815 echo "configure:3816: checking whether ln -s works" >&5
3816 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
3817   echo $ac_n "(cached) $ac_c" 1>&6
3818 else
3819   rm -f conftestdata
3820 if ln -s X conftestdata 2>/dev/null
3821 then
3822   rm -f conftestdata
3823   ac_cv_prog_LN_S="ln -s"
3824 else
3825   ac_cv_prog_LN_S=ln
3826 fi
3827 fi
3828 LN_S="$ac_cv_prog_LN_S"
3829 if test "$ac_cv_prog_LN_S" = "ln -s"; then
3830   echo "$ac_t""yes" 1>&6
3831 else
3832   echo "$ac_t""no" 1>&6
3833 fi
3834
3835 echo $ac_n "checking how to recognise dependent libraries""... $ac_c" 1>&6
3836 echo "configure:3837: checking how to recognise dependent libraries" >&5
3837 if eval "test \"\${lt_cv_deplibs_check_method+set}\" = set"; then
3838   echo $ac_n "(cached) $ac_c" 1>&6
3839 else
3840   lt_cv_file_magic_cmd='$MAGIC_CMD'
3841 lt_cv_file_magic_test_file=
3842 lt_cv_deplibs_check_method='unknown'
3843 # Need to set the preceding variable on all platforms that support
3844 # interlibrary dependencies.
3845 # 'none' -- dependencies not supported.
3846 # `unknown' -- same as none, but documents that we really don't know.
3847 # 'pass_all' -- all dependencies passed with no checks.
3848 # 'test_compile' -- check by making test program.
3849 # 'file_magic [[regex]]' -- check by looking for files in library path
3850 # which responds to the $file_magic_cmd with a given egrep regex.
3851 # If you have `file' or equivalent on your system and you're not sure
3852 # whether `pass_all' will *always* work, you probably want this one.
3853
3854 case $host_os in
3855 aix4* | aix5*)
3856   lt_cv_deplibs_check_method=pass_all
3857   ;;
3858
3859 beos*)
3860   lt_cv_deplibs_check_method=pass_all
3861   ;;
3862
3863 bsdi4*)
3864   lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
3865   lt_cv_file_magic_cmd='/usr/bin/file -L'
3866   lt_cv_file_magic_test_file=/shlib/libc.so
3867   ;;
3868
3869 cygwin* | mingw* | pw32*)
3870   lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
3871   lt_cv_file_magic_cmd='$OBJDUMP -f'
3872   ;;
3873
3874 darwin* | rhapsody*)
3875   lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library'
3876   lt_cv_file_magic_cmd='/usr/bin/file -L'
3877   case "$host_os" in
3878   rhapsody* | darwin1.[012])
3879     lt_cv_file_magic_test_file=`echo /System/Library/Frameworks/System.framework/Versions/*/System | head -1`
3880     ;;
3881   *) # Darwin 1.3 on
3882     lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
3883     ;;
3884   esac
3885   ;;
3886
3887 freebsd*)
3888   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3889     case $host_cpu in
3890     i*86 )
3891       # Not sure whether the presence of OpenBSD here was a mistake.
3892       # Let's accept both of them until this is cleared up.
3893       lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[3-9]86 (compact )?demand paged shared library'
3894       lt_cv_file_magic_cmd=/usr/bin/file
3895       lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3896       ;;
3897     esac
3898   else
3899     lt_cv_deplibs_check_method=pass_all
3900   fi
3901   ;;
3902
3903 gnu*)
3904   lt_cv_deplibs_check_method=pass_all
3905   ;;
3906
3907 hpux10.20*|hpux11*)
3908   lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library'
3909   lt_cv_file_magic_cmd=/usr/bin/file
3910   lt_cv_file_magic_test_file=/usr/lib/libc.sl
3911   ;;
3912
3913 irix5* | irix6* | nonstopux*)
3914   case $host_os in
3915   irix5* | nonstopux*)
3916     # this will be overridden with pass_all, but let us keep it just in case
3917     lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
3918     ;;
3919   *)
3920     case $LD in
3921     *-32|*"-32 ") libmagic=32-bit;;
3922     *-n32|*"-n32 ") libmagic=N32;;
3923     *-64|*"-64 ") libmagic=64-bit;;
3924     *) libmagic=never-match;;
3925     esac
3926     # this will be overridden with pass_all, but let us keep it just in case
3927     lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[1234] dynamic lib MIPS - version 1"
3928     ;;
3929   esac
3930   lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
3931   lt_cv_deplibs_check_method=pass_all
3932   ;;
3933
3934 # This must be Linux ELF.
3935 linux-gnu*)
3936   case $host_cpu in
3937   alpha* | hppa* | i*86 | mips | mipsel | powerpc* | sparc* | ia64*)
3938     lt_cv_deplibs_check_method=pass_all ;;
3939   *)
3940     # glibc up to 2.1.1 does not perform some relocations on ARM
3941     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;;
3942   esac
3943   lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
3944   ;;
3945
3946 netbsd*)
3947   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3948     lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
3949   else
3950     lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so$'
3951   fi
3952   ;;
3953
3954 newos6*)
3955   lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
3956   lt_cv_file_magic_cmd=/usr/bin/file
3957   lt_cv_file_magic_test_file=/usr/lib/libnls.so
3958   ;;
3959
3960 openbsd*)
3961   lt_cv_file_magic_cmd=/usr/bin/file
3962   lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3963   if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
3964     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB shared object'
3965   else
3966     lt_cv_deplibs_check_method='file_magic OpenBSD.* shared library'
3967   fi
3968   ;;
3969
3970 osf3* | osf4* | osf5*)
3971   # this will be overridden with pass_all, but let us keep it just in case
3972   lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
3973   lt_cv_file_magic_test_file=/shlib/libc.so
3974   lt_cv_deplibs_check_method=pass_all
3975   ;;
3976
3977 sco3.2v5*)
3978   lt_cv_deplibs_check_method=pass_all
3979   ;;
3980
3981 solaris*)
3982   lt_cv_deplibs_check_method=pass_all
3983   lt_cv_file_magic_test_file=/lib/libc.so
3984   ;;
3985
3986 sysv5uw[78]* | sysv4*uw2*)
3987   lt_cv_deplibs_check_method=pass_all
3988   ;;
3989
3990 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
3991   case $host_vendor in
3992   motorola)
3993     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]'
3994     lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
3995     ;;
3996   ncr)
3997     lt_cv_deplibs_check_method=pass_all
3998     ;;
3999   sequent)
4000     lt_cv_file_magic_cmd='/bin/file'
4001     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'
4002     ;;
4003   sni)
4004     lt_cv_file_magic_cmd='/bin/file'
4005     lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib"
4006     lt_cv_file_magic_test_file=/lib/libc.so
4007     ;;
4008   siemens)
4009     lt_cv_deplibs_check_method=pass_all
4010     ;;
4011   esac
4012   ;;
4013 esac
4014
4015 fi
4016
4017 echo "$ac_t""$lt_cv_deplibs_check_method" 1>&6
4018 file_magic_cmd=$lt_cv_file_magic_cmd
4019 deplibs_check_method=$lt_cv_deplibs_check_method
4020
4021 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
4022 echo "configure:4023: checking for object suffix" >&5
4023 if eval "test \"\${ac_cv_objext+set}\" = set"; then
4024   echo $ac_n "(cached) $ac_c" 1>&6
4025 else
4026   rm -f conftest*
4027 echo 'int i = 1;' > conftest.$ac_ext
4028 if { (eval echo configure:4029: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4029   for ac_file in conftest.*; do
4030     case $ac_file in
4031     *.c) ;;
4032     *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
4033     esac
4034   done
4035 else
4036   { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
4037 fi
4038 rm -f conftest*
4039 fi
4040
4041 echo "$ac_t""$ac_cv_objext" 1>&6
4042 OBJEXT=$ac_cv_objext
4043 ac_objext=$ac_cv_objext
4044
4045
4046
4047
4048 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
4049 echo "configure:4050: checking for executable suffix" >&5
4050 if eval "test \"\${ac_cv_exeext+set}\" = set"; then
4051   echo $ac_n "(cached) $ac_c" 1>&6
4052 else
4053   if test "$CYGWIN" = yes || test "$MINGW32" = yes || test "$EMXOS2" = yes; then
4054   ac_cv_exeext=.exe
4055 else
4056   rm -f conftest*
4057   echo 'int main () { return 0; }' > conftest.$ac_ext
4058   ac_cv_exeext=
4059   if { (eval echo configure:4060: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
4060     for file in conftest.*; do
4061       case $file in
4062       *.c | *.C | *.o | *.obj | *.xcoff) ;;
4063       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
4064       esac
4065     done
4066   else
4067     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
4068   fi
4069   rm -f conftest*
4070   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
4071 fi
4072 fi
4073
4074 EXEEXT=""
4075 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
4076 echo "$ac_t""${ac_cv_exeext}" 1>&6
4077 ac_exeext=$EXEEXT
4078
4079 if test $host != $build; then
4080   ac_tool_prefix=${host_alias}-
4081 else
4082   ac_tool_prefix=
4083 fi
4084
4085
4086
4087
4088 # Check for command to grab the raw symbol name followed by C symbol from nm.
4089 echo $ac_n "checking command to parse $NM output""... $ac_c" 1>&6
4090 echo "configure:4091: checking command to parse $NM output" >&5
4091 if eval "test \"\${lt_cv_sys_global_symbol_pipe+set}\" = set"; then
4092   echo $ac_n "(cached) $ac_c" 1>&6
4093 else
4094   
4095 # These are sane defaults that work on at least a few old systems.
4096 # [They come from Ultrix.  What could be older than Ultrix?!! ;)]
4097
4098 # Character class describing NM global symbol codes.
4099 symcode='[BCDEGRST]'
4100
4101 # Regexp to match symbols that can be accessed directly from C.
4102 sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
4103
4104 # Transform the above into a raw symbol and a C symbol.
4105 symxfrm='\1 \2\3 \3'
4106
4107 # Transform an extracted symbol line into a proper C declaration
4108 lt_cv_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern char \1;/p'"
4109
4110 # Transform an extracted symbol line into symbol name and symbol address
4111 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'"
4112
4113 # Define system-specific variables.
4114 case $host_os in
4115 aix*)
4116   symcode='[BCDT]'
4117   ;;
4118 cygwin* | mingw* | pw32*)
4119   symcode='[ABCDGISTW]'
4120   ;;
4121 hpux*) # Its linker distinguishes data from code symbols
4122   lt_cv_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern char \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
4123   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'"
4124   ;;
4125 irix* | nonstopux*)
4126   symcode='[BCDEGRST]'
4127   ;;
4128 osf*)
4129   symcode='[BCDEGQRST]'
4130   ;;
4131 solaris* | sysv5*)
4132   symcode='[BDT]'
4133   ;;
4134 sysv4)
4135   symcode='[DFNSTU]'
4136   ;;
4137 esac
4138
4139 # Handle CRLF in mingw tool chain
4140 opt_cr=
4141 case $host_os in
4142 mingw*)
4143   opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
4144   ;;
4145 esac
4146
4147 # If we're using GNU nm, then use its standard symbol codes.
4148 if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then
4149   symcode='[ABCDGISTW]'
4150 fi
4151
4152 # Try without a prefix undercore, then with it.
4153 for ac_symprfx in "" "_"; do
4154
4155   # Write the raw and C identifiers.
4156 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[         ]\($symcode$symcode*\)[         ][      ]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'"
4157
4158   # Check to see that the pipe works correctly.
4159   pipe_works=no
4160   rm -f conftest*
4161   cat > conftest.$ac_ext <<EOF
4162 #ifdef __cplusplus
4163 extern "C" {
4164 #endif
4165 char nm_test_var;
4166 void nm_test_func(){}
4167 #ifdef __cplusplus
4168 }
4169 #endif
4170 int main(){nm_test_var='a';nm_test_func();return(0);}
4171 EOF
4172
4173   if { (eval echo configure:4174: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4174     # Now try to grab the symbols.
4175     nlist=conftest.nm
4176     if { (eval echo configure:4177: \"$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
4177       # Try sorting and uniquifying the output.
4178       if sort "$nlist" | uniq > "$nlist"T; then
4179         mv -f "$nlist"T "$nlist"
4180       else
4181         rm -f "$nlist"T
4182       fi
4183
4184       # Make sure that we snagged all the symbols we need.
4185       if egrep ' nm_test_var$' "$nlist" >/dev/null; then
4186         if egrep ' nm_test_func$' "$nlist" >/dev/null; then
4187           cat <<EOF > conftest.$ac_ext
4188 #ifdef __cplusplus
4189 extern "C" {
4190 #endif
4191
4192 EOF
4193           # Now generate the symbol file.
4194           eval "$lt_cv_global_symbol_to_cdecl"' < "$nlist" >> conftest.$ac_ext'
4195
4196           cat <<EOF >> conftest.$ac_ext
4197 #if defined (__STDC__) && __STDC__
4198 # define lt_ptr void *
4199 #else
4200 # define lt_ptr char *
4201 # define const
4202 #endif
4203
4204 /* The mapping between symbol names and symbols. */
4205 const struct {
4206   const char *name;
4207   lt_ptr address;
4208 }
4209 lt_preloaded_symbols[] =
4210 {
4211 EOF
4212           sed "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (lt_ptr) \&\2},/" < "$nlist" >> conftest.$ac_ext
4213           cat <<\EOF >> conftest.$ac_ext
4214   {0, (lt_ptr) 0}
4215 };
4216
4217 #ifdef __cplusplus
4218 }
4219 #endif
4220 EOF
4221           # Now try linking the two files.
4222           mv conftest.$ac_objext conftstm.$ac_objext
4223           save_LIBS="$LIBS"
4224           save_CFLAGS="$CFLAGS"
4225           LIBS="conftstm.$ac_objext"
4226           CFLAGS="$CFLAGS$no_builtin_flag"
4227           if { (eval echo configure:4228: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest$ac_exeext; then
4228             pipe_works=yes
4229           fi
4230           LIBS="$save_LIBS"
4231           CFLAGS="$save_CFLAGS"
4232         else
4233           echo "cannot find nm_test_func in $nlist" >&5
4234         fi
4235       else
4236         echo "cannot find nm_test_var in $nlist" >&5
4237       fi
4238     else
4239       echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5
4240     fi
4241   else
4242     echo "$progname: failed program was:" >&5
4243     cat conftest.$ac_ext >&5
4244   fi
4245   rm -f conftest* conftst*
4246
4247   # Do not use the global_symbol_pipe unless it works.
4248   if test "$pipe_works" = yes; then
4249     break
4250   else
4251     lt_cv_sys_global_symbol_pipe=
4252   fi
4253 done
4254
4255 fi
4256
4257 global_symbol_pipe="$lt_cv_sys_global_symbol_pipe"
4258 if test -z "$lt_cv_sys_global_symbol_pipe"; then
4259   global_symbol_to_cdecl=
4260   global_symbol_to_c_name_address=
4261 else
4262   global_symbol_to_cdecl="$lt_cv_global_symbol_to_cdecl"
4263   global_symbol_to_c_name_address="$lt_cv_global_symbol_to_c_name_address"
4264 fi
4265 if test -z "$global_symbol_pipe$global_symbol_to_cdec$global_symbol_to_c_name_address";
4266 then
4267   echo "$ac_t""failed" 1>&6
4268 else
4269   echo "$ac_t""ok" 1>&6
4270 fi
4271
4272 for ac_hdr in dlfcn.h
4273 do
4274 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4275 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4276 echo "configure:4277: checking for $ac_hdr" >&5
4277 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
4278   echo $ac_n "(cached) $ac_c" 1>&6
4279 else
4280   cat > conftest.$ac_ext <<EOF
4281 #line 4282 "configure"
4282 #include "confdefs.h"
4283 #include <$ac_hdr>
4284 EOF
4285 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4286 { (eval echo configure:4287: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4287 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4288 if test -z "$ac_err"; then
4289   rm -rf conftest*
4290   eval "ac_cv_header_$ac_safe=yes"
4291 else
4292   echo "$ac_err" >&5
4293   echo "configure: failed program was:" >&5
4294   cat conftest.$ac_ext >&5
4295   rm -rf conftest*
4296   eval "ac_cv_header_$ac_safe=no"
4297 fi
4298 rm -f conftest*
4299 fi
4300 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4301   echo "$ac_t""yes" 1>&6
4302     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4303   cat >> confdefs.h <<EOF
4304 #define $ac_tr_hdr 1
4305 EOF
4306  
4307 else
4308   echo "$ac_t""no" 1>&6
4309 fi
4310 done
4311
4312
4313
4314
4315
4316
4317 # Only perform the check for file, if the check method requires it
4318 case $deplibs_check_method in
4319 file_magic*)
4320   if test "$file_magic_cmd" = '$MAGIC_CMD'; then
4321     echo $ac_n "checking for ${ac_tool_prefix}file""... $ac_c" 1>&6
4322 echo "configure:4323: checking for ${ac_tool_prefix}file" >&5
4323 if eval "test \"\${lt_cv_path_MAGIC_CMD+set}\" = set"; then
4324   echo $ac_n "(cached) $ac_c" 1>&6
4325 else
4326   case $MAGIC_CMD in
4327   /*)
4328   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
4329   ;;
4330   ?:/*)
4331   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
4332   ;;
4333   *)
4334   ac_save_MAGIC_CMD="$MAGIC_CMD"
4335   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4336   ac_dummy="/usr/bin:$PATH"
4337   for ac_dir in $ac_dummy; do
4338     test -z "$ac_dir" && ac_dir=.
4339     if test -f $ac_dir/${ac_tool_prefix}file; then
4340       lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file"
4341       if test -n "$file_magic_test_file"; then
4342         case $deplibs_check_method in
4343         "file_magic "*)
4344           file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
4345           MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4346           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
4347             egrep "$file_magic_regex" > /dev/null; then
4348             :
4349           else
4350             cat <<EOF 1>&2
4351
4352 *** Warning: the command libtool uses to detect shared libraries,
4353 *** $file_magic_cmd, produces output that libtool cannot recognize.
4354 *** The result is that libtool may fail to recognize shared libraries
4355 *** as such.  This will affect the creation of libtool libraries that
4356 *** depend on shared libraries, but programs linked with such libtool
4357 *** libraries will work regardless of this problem.  Nevertheless, you
4358 *** may want to report the problem to your system manager and/or to
4359 *** bug-libtool@gnu.org
4360
4361 EOF
4362           fi ;;
4363         esac
4364       fi
4365       break
4366     fi
4367   done
4368   IFS="$ac_save_ifs"
4369   MAGIC_CMD="$ac_save_MAGIC_CMD"
4370   ;;
4371 esac
4372 fi
4373
4374 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4375 if test -n "$MAGIC_CMD"; then
4376   echo "$ac_t""$MAGIC_CMD" 1>&6
4377 else
4378   echo "$ac_t""no" 1>&6
4379 fi
4380
4381 if test -z "$lt_cv_path_MAGIC_CMD"; then
4382   if test -n "$ac_tool_prefix"; then
4383     echo $ac_n "checking for file""... $ac_c" 1>&6
4384 echo "configure:4385: checking for file" >&5
4385 if eval "test \"\${lt_cv_path_MAGIC_CMD+set}\" = set"; then
4386   echo $ac_n "(cached) $ac_c" 1>&6
4387 else
4388   case $MAGIC_CMD in
4389   /*)
4390   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
4391   ;;
4392   ?:/*)
4393   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
4394   ;;
4395   *)
4396   ac_save_MAGIC_CMD="$MAGIC_CMD"
4397   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4398   ac_dummy="/usr/bin:$PATH"
4399   for ac_dir in $ac_dummy; do
4400     test -z "$ac_dir" && ac_dir=.
4401     if test -f $ac_dir/file; then
4402       lt_cv_path_MAGIC_CMD="$ac_dir/file"
4403       if test -n "$file_magic_test_file"; then
4404         case $deplibs_check_method in
4405         "file_magic "*)
4406           file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
4407           MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4408           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
4409             egrep "$file_magic_regex" > /dev/null; then
4410             :
4411           else
4412             cat <<EOF 1>&2
4413
4414 *** Warning: the command libtool uses to detect shared libraries,
4415 *** $file_magic_cmd, produces output that libtool cannot recognize.
4416 *** The result is that libtool may fail to recognize shared libraries
4417 *** as such.  This will affect the creation of libtool libraries that
4418 *** depend on shared libraries, but programs linked with such libtool
4419 *** libraries will work regardless of this problem.  Nevertheless, you
4420 *** may want to report the problem to your system manager and/or to
4421 *** bug-libtool@gnu.org
4422
4423 EOF
4424           fi ;;
4425         esac
4426       fi
4427       break
4428     fi
4429   done
4430   IFS="$ac_save_ifs"
4431   MAGIC_CMD="$ac_save_MAGIC_CMD"
4432   ;;
4433 esac
4434 fi
4435
4436 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4437 if test -n "$MAGIC_CMD"; then
4438   echo "$ac_t""$MAGIC_CMD" 1>&6
4439 else
4440   echo "$ac_t""no" 1>&6
4441 fi
4442
4443   else
4444     MAGIC_CMD=:
4445   fi
4446 fi
4447
4448   fi
4449   ;;
4450 esac
4451
4452 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4453 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
4454 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4455 echo "configure:4456: checking for $ac_word" >&5
4456 if eval "test \"\${ac_cv_prog_RANLIB+set}\" = set"; then
4457   echo $ac_n "(cached) $ac_c" 1>&6
4458 else
4459   if test -n "$RANLIB"; then
4460   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4461 else
4462   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4463   ac_dummy="$PATH"
4464   for ac_dir in $ac_dummy; do
4465     test -z "$ac_dir" && ac_dir=.
4466     if test -f $ac_dir/$ac_word; then
4467       ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4468       break
4469     fi
4470   done
4471   IFS="$ac_save_ifs"
4472 fi
4473 fi
4474 RANLIB="$ac_cv_prog_RANLIB"
4475 if test -n "$RANLIB"; then
4476   echo "$ac_t""$RANLIB" 1>&6
4477 else
4478   echo "$ac_t""no" 1>&6
4479 fi
4480
4481
4482 if test -z "$ac_cv_prog_RANLIB"; then
4483 if test -n "$ac_tool_prefix"; then
4484   # Extract the first word of "ranlib", so it can be a program name with args.
4485 set dummy ranlib; ac_word=$2
4486 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4487 echo "configure:4488: checking for $ac_word" >&5
4488 if eval "test \"\${ac_cv_prog_RANLIB+set}\" = set"; then
4489   echo $ac_n "(cached) $ac_c" 1>&6
4490 else
4491   if test -n "$RANLIB"; then
4492   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4493 else
4494   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4495   ac_dummy="$PATH"
4496   for ac_dir in $ac_dummy; do
4497     test -z "$ac_dir" && ac_dir=.
4498     if test -f $ac_dir/$ac_word; then
4499       ac_cv_prog_RANLIB="ranlib"
4500       break
4501     fi
4502   done
4503   IFS="$ac_save_ifs"
4504   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
4505 fi
4506 fi
4507 RANLIB="$ac_cv_prog_RANLIB"
4508 if test -n "$RANLIB"; then
4509   echo "$ac_t""$RANLIB" 1>&6
4510 else
4511   echo "$ac_t""no" 1>&6
4512 fi
4513
4514 else
4515   RANLIB=":"
4516 fi
4517 fi
4518
4519 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
4520 set dummy ${ac_tool_prefix}strip; ac_word=$2
4521 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4522 echo "configure:4523: checking for $ac_word" >&5
4523 if eval "test \"\${ac_cv_prog_STRIP+set}\" = set"; then
4524   echo $ac_n "(cached) $ac_c" 1>&6
4525 else
4526   if test -n "$STRIP"; then
4527   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
4528 else
4529   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4530   ac_dummy="$PATH"
4531   for ac_dir in $ac_dummy; do
4532     test -z "$ac_dir" && ac_dir=.
4533     if test -f $ac_dir/$ac_word; then
4534       ac_cv_prog_STRIP="${ac_tool_prefix}strip"
4535       break
4536     fi
4537   done
4538   IFS="$ac_save_ifs"
4539 fi
4540 fi
4541 STRIP="$ac_cv_prog_STRIP"
4542 if test -n "$STRIP"; then
4543   echo "$ac_t""$STRIP" 1>&6
4544 else
4545   echo "$ac_t""no" 1>&6
4546 fi
4547
4548
4549 if test -z "$ac_cv_prog_STRIP"; then
4550 if test -n "$ac_tool_prefix"; then
4551   # Extract the first word of "strip", so it can be a program name with args.
4552 set dummy strip; ac_word=$2
4553 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4554 echo "configure:4555: checking for $ac_word" >&5
4555 if eval "test \"\${ac_cv_prog_STRIP+set}\" = set"; then
4556   echo $ac_n "(cached) $ac_c" 1>&6
4557 else
4558   if test -n "$STRIP"; then
4559   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
4560 else
4561   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4562   ac_dummy="$PATH"
4563   for ac_dir in $ac_dummy; do
4564     test -z "$ac_dir" && ac_dir=.
4565     if test -f $ac_dir/$ac_word; then
4566       ac_cv_prog_STRIP="strip"
4567       break
4568     fi
4569   done
4570   IFS="$ac_save_ifs"
4571   test -z "$ac_cv_prog_STRIP" && ac_cv_prog_STRIP=":"
4572 fi
4573 fi
4574 STRIP="$ac_cv_prog_STRIP"
4575 if test -n "$STRIP"; then
4576   echo "$ac_t""$STRIP" 1>&6
4577 else
4578   echo "$ac_t""no" 1>&6
4579 fi
4580
4581 else
4582   STRIP=":"
4583 fi
4584 fi
4585
4586
4587 enable_dlopen=yes
4588 enable_win32_dll=yes
4589
4590 # Check whether --enable-libtool-lock or --disable-libtool-lock was given.
4591 if test "${enable_libtool_lock+set}" = set; then
4592   enableval="$enable_libtool_lock"
4593   :
4594 fi
4595
4596 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
4597
4598 # Some flags need to be propagated to the compiler or linker for good
4599 # libtool support.
4600 case $host in
4601 *-*-irix6*)
4602   # Find out which ABI we are using.
4603   echo '#line 4604 "configure"' > conftest.$ac_ext
4604   if { (eval echo configure:4605: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4605     case `/usr/bin/file conftest.$ac_objext` in
4606     *32-bit*)
4607       LD="${LD-ld} -32"
4608       ;;
4609     *N32*)
4610       LD="${LD-ld} -n32"
4611       ;;
4612     *64-bit*)
4613       LD="${LD-ld} -64"
4614       ;;
4615     esac
4616   fi
4617   rm -rf conftest*
4618   ;;
4619
4620 *-*-sco3.2v5*)
4621   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
4622   SAVE_CFLAGS="$CFLAGS"
4623   CFLAGS="$CFLAGS -belf"
4624   echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
4625 echo "configure:4626: checking whether the C compiler needs -belf" >&5
4626 if eval "test \"\${lt_cv_cc_needs_belf+set}\" = set"; then
4627   echo $ac_n "(cached) $ac_c" 1>&6
4628 else
4629   
4630      ac_ext=c
4631 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
4632 ac_cpp='$CPP $CPPFLAGS'
4633 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
4634 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
4635 cross_compiling=$ac_cv_prog_cc_cross
4636
4637      cat > conftest.$ac_ext <<EOF
4638 #line 4639 "configure"
4639 #include "confdefs.h"
4640
4641 int main() {
4642
4643 ; return 0; }
4644 EOF
4645 if { (eval echo configure:4646: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4646   rm -rf conftest*
4647   lt_cv_cc_needs_belf=yes
4648 else
4649   echo "configure: failed program was:" >&5
4650   cat conftest.$ac_ext >&5
4651   rm -rf conftest*
4652   lt_cv_cc_needs_belf=no
4653 fi
4654 rm -f conftest*
4655      ac_ext=c
4656 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
4657 ac_cpp='$CPP $CPPFLAGS'
4658 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
4659 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
4660 cross_compiling=$ac_cv_prog_cc_cross
4661
4662 fi
4663
4664 echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6
4665   if test x"$lt_cv_cc_needs_belf" != x"yes"; then
4666     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
4667     CFLAGS="$SAVE_CFLAGS"
4668   fi
4669   ;;
4670
4671 *-*-cygwin* | *-*-mingw* | *-*-pw32*)
4672   # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
4673 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
4674 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4675 echo "configure:4676: checking for $ac_word" >&5
4676 if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then
4677   echo $ac_n "(cached) $ac_c" 1>&6
4678 else
4679   if test -n "$DLLTOOL"; then
4680   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
4681 else
4682   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4683   ac_dummy="$PATH"
4684   for ac_dir in $ac_dummy; do
4685     test -z "$ac_dir" && ac_dir=.
4686     if test -f $ac_dir/$ac_word; then
4687       ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
4688       break
4689     fi
4690   done
4691   IFS="$ac_save_ifs"
4692 fi
4693 fi
4694 DLLTOOL="$ac_cv_prog_DLLTOOL"
4695 if test -n "$DLLTOOL"; then
4696   echo "$ac_t""$DLLTOOL" 1>&6
4697 else
4698   echo "$ac_t""no" 1>&6
4699 fi
4700
4701
4702 if test -z "$ac_cv_prog_DLLTOOL"; then
4703 if test -n "$ac_tool_prefix"; then
4704   # Extract the first word of "dlltool", so it can be a program name with args.
4705 set dummy dlltool; ac_word=$2
4706 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4707 echo "configure:4708: checking for $ac_word" >&5
4708 if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then
4709   echo $ac_n "(cached) $ac_c" 1>&6
4710 else
4711   if test -n "$DLLTOOL"; then
4712   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
4713 else
4714   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4715   ac_dummy="$PATH"
4716   for ac_dir in $ac_dummy; do
4717     test -z "$ac_dir" && ac_dir=.
4718     if test -f $ac_dir/$ac_word; then
4719       ac_cv_prog_DLLTOOL="dlltool"
4720       break
4721     fi
4722   done
4723   IFS="$ac_save_ifs"
4724   test -z "$ac_cv_prog_DLLTOOL" && ac_cv_prog_DLLTOOL="false"
4725 fi
4726 fi
4727 DLLTOOL="$ac_cv_prog_DLLTOOL"
4728 if test -n "$DLLTOOL"; then
4729   echo "$ac_t""$DLLTOOL" 1>&6
4730 else
4731   echo "$ac_t""no" 1>&6
4732 fi
4733
4734 else
4735   DLLTOOL="false"
4736 fi
4737 fi
4738
4739   # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
4740 set dummy ${ac_tool_prefix}as; ac_word=$2
4741 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4742 echo "configure:4743: checking for $ac_word" >&5
4743 if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then
4744   echo $ac_n "(cached) $ac_c" 1>&6
4745 else
4746   if test -n "$AS"; then
4747   ac_cv_prog_AS="$AS" # Let the user override the test.
4748 else
4749   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4750   ac_dummy="$PATH"
4751   for ac_dir in $ac_dummy; do
4752     test -z "$ac_dir" && ac_dir=.
4753     if test -f $ac_dir/$ac_word; then
4754       ac_cv_prog_AS="${ac_tool_prefix}as"
4755       break
4756     fi
4757   done
4758   IFS="$ac_save_ifs"
4759 fi
4760 fi
4761 AS="$ac_cv_prog_AS"
4762 if test -n "$AS"; then
4763   echo "$ac_t""$AS" 1>&6
4764 else
4765   echo "$ac_t""no" 1>&6
4766 fi
4767
4768
4769 if test -z "$ac_cv_prog_AS"; then
4770 if test -n "$ac_tool_prefix"; then
4771   # Extract the first word of "as", so it can be a program name with args.
4772 set dummy as; ac_word=$2
4773 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4774 echo "configure:4775: checking for $ac_word" >&5
4775 if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then
4776   echo $ac_n "(cached) $ac_c" 1>&6
4777 else
4778   if test -n "$AS"; then
4779   ac_cv_prog_AS="$AS" # Let the user override the test.
4780 else
4781   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4782   ac_dummy="$PATH"
4783   for ac_dir in $ac_dummy; do
4784     test -z "$ac_dir" && ac_dir=.
4785     if test -f $ac_dir/$ac_word; then
4786       ac_cv_prog_AS="as"
4787       break
4788     fi
4789   done
4790   IFS="$ac_save_ifs"
4791   test -z "$ac_cv_prog_AS" && ac_cv_prog_AS="false"
4792 fi
4793 fi
4794 AS="$ac_cv_prog_AS"
4795 if test -n "$AS"; then
4796   echo "$ac_t""$AS" 1>&6
4797 else
4798   echo "$ac_t""no" 1>&6
4799 fi
4800
4801 else
4802   AS="false"
4803 fi
4804 fi
4805
4806   # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
4807 set dummy ${ac_tool_prefix}objdump; ac_word=$2
4808 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4809 echo "configure:4810: checking for $ac_word" >&5
4810 if eval "test \"\${ac_cv_prog_OBJDUMP+set}\" = set"; then
4811   echo $ac_n "(cached) $ac_c" 1>&6
4812 else
4813   if test -n "$OBJDUMP"; then
4814   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
4815 else
4816   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4817   ac_dummy="$PATH"
4818   for ac_dir in $ac_dummy; do
4819     test -z "$ac_dir" && ac_dir=.
4820     if test -f $ac_dir/$ac_word; then
4821       ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
4822       break
4823     fi
4824   done
4825   IFS="$ac_save_ifs"
4826 fi
4827 fi
4828 OBJDUMP="$ac_cv_prog_OBJDUMP"
4829 if test -n "$OBJDUMP"; then
4830   echo "$ac_t""$OBJDUMP" 1>&6
4831 else
4832   echo "$ac_t""no" 1>&6
4833 fi
4834
4835
4836 if test -z "$ac_cv_prog_OBJDUMP"; then
4837 if test -n "$ac_tool_prefix"; then
4838   # Extract the first word of "objdump", so it can be a program name with args.
4839 set dummy objdump; ac_word=$2
4840 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4841 echo "configure:4842: checking for $ac_word" >&5
4842 if eval "test \"\${ac_cv_prog_OBJDUMP+set}\" = set"; then
4843   echo $ac_n "(cached) $ac_c" 1>&6
4844 else
4845   if test -n "$OBJDUMP"; then
4846   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
4847 else
4848   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4849   ac_dummy="$PATH"
4850   for ac_dir in $ac_dummy; do
4851     test -z "$ac_dir" && ac_dir=.
4852     if test -f $ac_dir/$ac_word; then
4853       ac_cv_prog_OBJDUMP="objdump"
4854       break
4855     fi
4856   done
4857   IFS="$ac_save_ifs"
4858   test -z "$ac_cv_prog_OBJDUMP" && ac_cv_prog_OBJDUMP="false"
4859 fi
4860 fi
4861 OBJDUMP="$ac_cv_prog_OBJDUMP"
4862 if test -n "$OBJDUMP"; then
4863   echo "$ac_t""$OBJDUMP" 1>&6
4864 else
4865   echo "$ac_t""no" 1>&6
4866 fi
4867
4868 else
4869   OBJDUMP="false"
4870 fi
4871 fi
4872
4873
4874   # recent cygwin and mingw systems supply a stub DllMain which the user
4875   # can override, but on older systems we have to supply one
4876   echo $ac_n "checking if libtool should supply DllMain function""... $ac_c" 1>&6
4877 echo "configure:4878: checking if libtool should supply DllMain function" >&5
4878 if eval "test \"\${lt_cv_need_dllmain+set}\" = set"; then
4879   echo $ac_n "(cached) $ac_c" 1>&6
4880 else
4881   cat > conftest.$ac_ext <<EOF
4882 #line 4883 "configure"
4883 #include "confdefs.h"
4884
4885 int main() {
4886 extern int __attribute__((__stdcall__)) DllMain(void*, int, void*);
4887       DllMain (0, 0, 0);
4888 ; return 0; }
4889 EOF
4890 if { (eval echo configure:4891: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4891   rm -rf conftest*
4892   lt_cv_need_dllmain=no
4893 else
4894   echo "configure: failed program was:" >&5
4895   cat conftest.$ac_ext >&5
4896   rm -rf conftest*
4897   lt_cv_need_dllmain=yes
4898 fi
4899 rm -f conftest*
4900 fi
4901
4902 echo "$ac_t""$lt_cv_need_dllmain" 1>&6
4903
4904   case $host/$CC in
4905   *-*-cygwin*/gcc*-mno-cygwin*|*-*-mingw*)
4906     # old mingw systems require "-dll" to link a DLL, while more recent ones
4907     # require "-mdll"
4908     SAVE_CFLAGS="$CFLAGS"
4909     CFLAGS="$CFLAGS -mdll"
4910     echo $ac_n "checking how to link DLLs""... $ac_c" 1>&6
4911 echo "configure:4912: checking how to link DLLs" >&5
4912 if eval "test \"\${lt_cv_cc_dll_switch+set}\" = set"; then
4913   echo $ac_n "(cached) $ac_c" 1>&6
4914 else
4915   cat > conftest.$ac_ext <<EOF
4916 #line 4917 "configure"
4917 #include "confdefs.h"
4918
4919 int main() {
4920
4921 ; return 0; }
4922 EOF
4923 if { (eval echo configure:4924: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4924   rm -rf conftest*
4925   lt_cv_cc_dll_switch=-mdll
4926 else
4927   echo "configure: failed program was:" >&5
4928   cat conftest.$ac_ext >&5
4929   rm -rf conftest*
4930   lt_cv_cc_dll_switch=-dll
4931 fi
4932 rm -f conftest*
4933 fi
4934
4935 echo "$ac_t""$lt_cv_cc_dll_switch" 1>&6
4936     CFLAGS="$SAVE_CFLAGS" ;;
4937   *-*-cygwin* | *-*-pw32*)
4938     # cygwin systems need to pass --dll to the linker, and not link
4939     # crt.o which will require a WinMain@16 definition.
4940     lt_cv_cc_dll_switch="-Wl,--dll -nostartfiles" ;;
4941   esac
4942   ;;
4943   
4944 esac
4945
4946 # Sed substitution that helps us do robust quoting.  It backslashifies
4947 # metacharacters that are still active within double-quoted strings.
4948 Xsed='sed -e s/^X//'
4949 sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g'
4950
4951 # Same as above, but do not quote variable references.
4952 double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g'
4953
4954 # Sed substitution to delay expansion of an escaped shell variable in a
4955 # double_quote_subst'ed string.
4956 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
4957
4958 # Constants:
4959 rm="rm -f"
4960
4961 # Global variables:
4962 default_ofile=libtool
4963 can_build_shared=yes
4964
4965 # All known linkers require a `.a' archive for static linking (except M$VC,
4966 # which needs '.lib').
4967 libext=a
4968 ltmain="$ac_aux_dir/ltmain.sh"
4969 ofile="$default_ofile"
4970 with_gnu_ld="$lt_cv_prog_gnu_ld"
4971 need_locks="$enable_libtool_lock"
4972
4973 old_CC="$CC"
4974 old_CFLAGS="$CFLAGS"
4975
4976 # Set sane defaults for various variables
4977 test -z "$AR" && AR=ar
4978 test -z "$AR_FLAGS" && AR_FLAGS=cru
4979 test -z "$AS" && AS=as
4980 test -z "$CC" && CC=cc
4981 test -z "$DLLTOOL" && DLLTOOL=dlltool
4982 test -z "$LD" && LD=ld
4983 test -z "$LN_S" && LN_S="ln -s"
4984 test -z "$MAGIC_CMD" && MAGIC_CMD=file
4985 test -z "$NM" && NM=nm
4986 test -z "$OBJDUMP" && OBJDUMP=objdump
4987 test -z "$RANLIB" && RANLIB=:
4988 test -z "$STRIP" && STRIP=:
4989 test -z "$ac_objext" && ac_objext=o
4990
4991 if test x"$host" != x"$build"; then
4992   ac_tool_prefix=${host_alias}-
4993 else
4994   ac_tool_prefix=
4995 fi
4996
4997 # Transform linux* to *-*-linux-gnu*, to support old configure scripts.
4998 case $host_os in
4999 linux-gnu*) ;;
5000 linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
5001 esac
5002
5003 case $host_os in
5004 aix3*)
5005   # AIX sometimes has problems with the GCC collect2 program.  For some
5006   # reason, if we set the COLLECT_NAMES environment variable, the problems
5007   # vanish in a puff of smoke.
5008   if test "X${COLLECT_NAMES+set}" != Xset; then
5009     COLLECT_NAMES=
5010     export COLLECT_NAMES
5011   fi
5012   ;;
5013 esac
5014
5015 # Determine commands to create old-style static archives.
5016 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
5017 old_postinstall_cmds='chmod 644 $oldlib'
5018 old_postuninstall_cmds=
5019
5020 if test -n "$RANLIB"; then
5021   case $host_os in
5022   openbsd*)
5023     old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds"
5024     ;;
5025   *)
5026     old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
5027     ;;
5028   esac
5029   old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
5030 fi
5031
5032 # Allow CC to be a program name with arguments.
5033 set dummy $CC
5034 compiler="$2"
5035
5036 echo $ac_n "checking for objdir""... $ac_c" 1>&6
5037 echo "configure:5038: checking for objdir" >&5
5038 rm -f .libs 2>/dev/null
5039 mkdir .libs 2>/dev/null
5040 if test -d .libs; then
5041   objdir=.libs
5042 else
5043   # MS-DOS does not allow filenames that begin with a dot.
5044   objdir=_libs
5045 fi
5046 rmdir .libs 2>/dev/null
5047 echo "$ac_t""$objdir" 1>&6
5048
5049
5050 # Check whether --with-pic or --without-pic was given.
5051 if test "${with_pic+set}" = set; then
5052   withval="$with_pic"
5053   pic_mode="$withval"
5054 else
5055   pic_mode=default
5056 fi
5057
5058 test -z "$pic_mode" && pic_mode=default
5059
5060 # We assume here that the value for lt_cv_prog_cc_pic will not be cached
5061 # in isolation, and that seeing it set (from the cache) indicates that
5062 # the associated values are set (in the cache) correctly too.
5063 echo $ac_n "checking for $compiler option to produce PIC""... $ac_c" 1>&6
5064 echo "configure:5065: checking for $compiler option to produce PIC" >&5
5065 if eval "test \"\${lt_cv_prog_cc_pic+set}\" = set"; then
5066   echo $ac_n "(cached) $ac_c" 1>&6
5067 else
5068    lt_cv_prog_cc_pic=
5069   lt_cv_prog_cc_shlib=
5070   lt_cv_prog_cc_wl=
5071   lt_cv_prog_cc_static=
5072   lt_cv_prog_cc_no_builtin=
5073   lt_cv_prog_cc_can_build_shared=$can_build_shared
5074
5075   if test "$GCC" = yes; then
5076     lt_cv_prog_cc_wl='-Wl,'
5077     lt_cv_prog_cc_static='-static'
5078
5079     case $host_os in
5080     aix*)
5081       # Below there is a dirty hack to force normal static linking with -ldl
5082       # The problem is because libdl dynamically linked with both libc and
5083       # libC (AIX C++ library), which obviously doesn't included in libraries
5084       # list by gcc. This cause undefined symbols with -static flags.
5085       # This hack allows C programs to be linked with "-static -ldl", but
5086       # not sure about C++ programs.
5087       lt_cv_prog_cc_static="$lt_cv_prog_cc_static ${lt_cv_prog_cc_wl}-lC"
5088       ;;
5089     amigaos*)
5090       # FIXME: we need at least 68020 code to build shared libraries, but
5091       # adding the `-m68020' flag to GCC prevents building anything better,
5092       # like `-m68040'.
5093       lt_cv_prog_cc_pic='-m68020 -resident32 -malways-restore-a4'
5094       ;;
5095     beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
5096       # PIC is the default for these OSes.
5097       ;;
5098     darwin* | rhapsody*)
5099       # PIC is the default on this platform
5100       # Common symbols not allowed in MH_DYLIB files
5101       lt_cv_prog_cc_pic='-fno-common'
5102       ;;
5103     cygwin* | mingw* | pw32* | os2*)
5104       # This hack is so that the source file can tell whether it is being
5105       # built for inclusion in a dll (and should export symbols for example).
5106       lt_cv_prog_cc_pic='-DDLL_EXPORT'
5107       ;;
5108     sysv4*MP*)
5109       if test -d /usr/nec; then
5110          lt_cv_prog_cc_pic=-Kconform_pic
5111       fi
5112       ;;
5113     *)
5114       lt_cv_prog_cc_pic='-fPIC'
5115       ;;
5116     esac
5117   else
5118     # PORTME Check for PIC flags for the system compiler.
5119     case $host_os in
5120     aix3* | aix4* | aix5*)
5121       lt_cv_prog_cc_wl='-Wl,'
5122       # All AIX code is PIC.
5123       if test "$host_cpu" = ia64; then
5124         # AIX 5 now supports IA64 processor
5125         lt_cv_prog_cc_static='-Bstatic'
5126       else
5127         lt_cv_prog_cc_static='-bnso -bI:/lib/syscalls.exp'
5128       fi
5129       ;;
5130
5131     hpux9* | hpux10* | hpux11*)
5132       # Is there a better lt_cv_prog_cc_static that works with the bundled CC?
5133       lt_cv_prog_cc_wl='-Wl,'
5134       lt_cv_prog_cc_static="${lt_cv_prog_cc_wl}-a ${lt_cv_prog_cc_wl}archive"
5135       lt_cv_prog_cc_pic='+Z'
5136       ;;
5137
5138     irix5* | irix6* | nonstopux*)
5139       lt_cv_prog_cc_wl='-Wl,'
5140       lt_cv_prog_cc_static='-non_shared'
5141       # PIC (with -KPIC) is the default.
5142       ;;
5143
5144     cygwin* | mingw* | pw32* | os2*)
5145       # This hack is so that the source file can tell whether it is being
5146       # built for inclusion in a dll (and should export symbols for example).
5147       lt_cv_prog_cc_pic='-DDLL_EXPORT'
5148       ;;
5149
5150     newsos6)
5151       lt_cv_prog_cc_pic='-KPIC'
5152       lt_cv_prog_cc_static='-Bstatic'
5153       ;;
5154
5155     osf3* | osf4* | osf5*)
5156       # All OSF/1 code is PIC.
5157       lt_cv_prog_cc_wl='-Wl,'
5158       lt_cv_prog_cc_static='-non_shared'
5159       ;;
5160
5161     sco3.2v5*)
5162       lt_cv_prog_cc_pic='-Kpic'
5163       lt_cv_prog_cc_static='-dn'
5164       lt_cv_prog_cc_shlib='-belf'
5165       ;;
5166
5167     solaris*)
5168       lt_cv_prog_cc_pic='-KPIC'
5169       lt_cv_prog_cc_static='-Bstatic'
5170       lt_cv_prog_cc_wl='-Wl,'
5171       ;;
5172
5173     sunos4*)
5174       lt_cv_prog_cc_pic='-PIC'
5175       lt_cv_prog_cc_static='-Bstatic'
5176       lt_cv_prog_cc_wl='-Qoption ld '
5177       ;;
5178
5179     sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
5180       lt_cv_prog_cc_pic='-KPIC'
5181       lt_cv_prog_cc_static='-Bstatic'
5182       lt_cv_prog_cc_wl='-Wl,'
5183       ;;
5184
5185     uts4*)
5186       lt_cv_prog_cc_pic='-pic'
5187       lt_cv_prog_cc_static='-Bstatic'
5188       ;;
5189
5190     sysv4*MP*)
5191       if test -d /usr/nec ;then
5192         lt_cv_prog_cc_pic='-Kconform_pic'
5193         lt_cv_prog_cc_static='-Bstatic'
5194       fi
5195       ;;
5196
5197     *)
5198       lt_cv_prog_cc_can_build_shared=no
5199       ;;
5200     esac
5201   fi
5202
5203 fi
5204
5205 if test -z "$lt_cv_prog_cc_pic"; then
5206   echo "$ac_t""none" 1>&6
5207 else
5208   echo "$ac_t""$lt_cv_prog_cc_pic" 1>&6
5209
5210   # Check to make sure the pic_flag actually works.
5211   echo $ac_n "checking if $compiler PIC flag $lt_cv_prog_cc_pic works""... $ac_c" 1>&6
5212 echo "configure:5213: checking if $compiler PIC flag $lt_cv_prog_cc_pic works" >&5
5213   if eval "test \"\${lt_cv_prog_cc_pic_works+set}\" = set"; then
5214   echo $ac_n "(cached) $ac_c" 1>&6
5215 else
5216       save_CFLAGS="$CFLAGS"
5217     CFLAGS="$CFLAGS $lt_cv_prog_cc_pic -DPIC"
5218     cat > conftest.$ac_ext <<EOF
5219 #line 5220 "configure"
5220 #include "confdefs.h"
5221
5222 int main() {
5223
5224 ; return 0; }
5225 EOF
5226 if { (eval echo configure:5227: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5227   rm -rf conftest*
5228         case $host_os in
5229       hpux9* | hpux10* | hpux11*)
5230         # On HP-UX, both CC and GCC only warn that PIC is supported... then
5231         # they create non-PIC objects.  So, if there were any warnings, we
5232         # assume that PIC is not supported.
5233         if test -s conftest.err; then
5234           lt_cv_prog_cc_pic_works=no
5235         else
5236           lt_cv_prog_cc_pic_works=yes
5237         fi
5238         ;;
5239       *)
5240         lt_cv_prog_cc_pic_works=yes
5241         ;;
5242       esac
5243     
5244 else
5245   echo "configure: failed program was:" >&5
5246   cat conftest.$ac_ext >&5
5247   rm -rf conftest*
5248         lt_cv_prog_cc_pic_works=no
5249     
5250 fi
5251 rm -f conftest*
5252     CFLAGS="$save_CFLAGS"
5253   
5254 fi
5255
5256
5257   if test "X$lt_cv_prog_cc_pic_works" = Xno; then
5258     lt_cv_prog_cc_pic=
5259     lt_cv_prog_cc_can_build_shared=no
5260   else
5261     lt_cv_prog_cc_pic=" $lt_cv_prog_cc_pic"
5262   fi
5263
5264   echo "$ac_t""$lt_cv_prog_cc_pic_works" 1>&6
5265 fi
5266
5267 # Check for any special shared library compilation flags.
5268 if test -n "$lt_cv_prog_cc_shlib"; then
5269   echo "configure: warning: \`$CC' requires \`$lt_cv_prog_cc_shlib' to build shared libraries" 1>&2
5270   if echo "$old_CC $old_CFLAGS " | egrep -e "[  ]$lt_cv_prog_cc_shlib[  ]" >/dev/null; then :
5271   else
5272    echo "configure: warning: add \`$lt_cv_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure" 1>&2
5273     lt_cv_prog_cc_can_build_shared=no
5274   fi
5275 fi
5276
5277 echo $ac_n "checking if $compiler static flag $lt_cv_prog_cc_static works""... $ac_c" 1>&6
5278 echo "configure:5279: checking if $compiler static flag $lt_cv_prog_cc_static works" >&5
5279 if eval "test \"\${lt_cv_prog_cc_static_works+set}\" = set"; then
5280   echo $ac_n "(cached) $ac_c" 1>&6
5281 else
5282     lt_cv_prog_cc_static_works=no
5283   save_LDFLAGS="$LDFLAGS"
5284   LDFLAGS="$LDFLAGS $lt_cv_prog_cc_static"
5285   cat > conftest.$ac_ext <<EOF
5286 #line 5287 "configure"
5287 #include "confdefs.h"
5288
5289 int main() {
5290
5291 ; return 0; }
5292 EOF
5293 if { (eval echo configure:5294: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5294   rm -rf conftest*
5295   lt_cv_prog_cc_static_works=yes
5296 else
5297   echo "configure: failed program was:" >&5
5298   cat conftest.$ac_ext >&5
5299 fi
5300 rm -f conftest*
5301   LDFLAGS="$save_LDFLAGS"
5302
5303 fi
5304
5305
5306 # Belt *and* braces to stop my trousers falling down:
5307 test "X$lt_cv_prog_cc_static_works" = Xno && lt_cv_prog_cc_static=
5308 echo "$ac_t""$lt_cv_prog_cc_static_works" 1>&6
5309
5310 pic_flag="$lt_cv_prog_cc_pic"
5311 special_shlib_compile_flags="$lt_cv_prog_cc_shlib"
5312 wl="$lt_cv_prog_cc_wl"
5313 link_static_flag="$lt_cv_prog_cc_static"
5314 no_builtin_flag="$lt_cv_prog_cc_no_builtin"
5315 can_build_shared="$lt_cv_prog_cc_can_build_shared"
5316
5317
5318 # Check to see if options -o and -c are simultaneously supported by compiler
5319 echo $ac_n "checking if $compiler supports -c -o file.$ac_objext""... $ac_c" 1>&6
5320 echo "configure:5321: checking if $compiler supports -c -o file.$ac_objext" >&5
5321 if eval "test \"\${lt_cv_compiler_c_o+set}\" = set"; then
5322   echo $ac_n "(cached) $ac_c" 1>&6
5323 else
5324   
5325 $rm -r conftest 2>/dev/null
5326 mkdir conftest
5327 cd conftest
5328 echo "int some_variable = 0;" > conftest.$ac_ext
5329 mkdir out
5330 # According to Tom Tromey, Ian Lance Taylor reported there are C compilers
5331 # that will create temporary files in the current directory regardless of
5332 # the output directory.  Thus, making CWD read-only will cause this test
5333 # to fail, enabling locking or at least warning the user not to do parallel
5334 # builds.
5335 chmod -w .
5336 save_CFLAGS="$CFLAGS"
5337 CFLAGS="$CFLAGS -o out/conftest2.$ac_objext"
5338 compiler_c_o=no
5339 if { (eval echo configure:5340: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then
5340   # The compiler can only warn and ignore the option if not recognized
5341   # So say no if there are warnings
5342   if test -s out/conftest.err; then
5343     lt_cv_compiler_c_o=no
5344   else
5345     lt_cv_compiler_c_o=yes
5346   fi
5347 else
5348   # Append any errors to the config.log.
5349   cat out/conftest.err 1>&5
5350   lt_cv_compiler_c_o=no
5351 fi
5352 CFLAGS="$save_CFLAGS"
5353 chmod u+w .
5354 $rm conftest* out/*
5355 rmdir out
5356 cd ..
5357 rmdir conftest
5358 $rm -r conftest 2>/dev/null
5359
5360 fi
5361
5362 compiler_c_o=$lt_cv_compiler_c_o
5363 echo "$ac_t""$compiler_c_o" 1>&6
5364
5365 if test x"$compiler_c_o" = x"yes"; then
5366   # Check to see if we can write to a .lo
5367   echo $ac_n "checking if $compiler supports -c -o file.lo""... $ac_c" 1>&6
5368 echo "configure:5369: checking if $compiler supports -c -o file.lo" >&5
5369   if eval "test \"\${lt_cv_compiler_o_lo+set}\" = set"; then
5370   echo $ac_n "(cached) $ac_c" 1>&6
5371 else
5372   
5373   lt_cv_compiler_o_lo=no
5374   save_CFLAGS="$CFLAGS"
5375   CFLAGS="$CFLAGS -c -o conftest.lo"
5376   save_objext="$ac_objext"
5377   ac_objext=lo
5378   cat > conftest.$ac_ext <<EOF
5379 #line 5380 "configure"
5380 #include "confdefs.h"
5381
5382 int main() {
5383 int some_variable = 0;
5384 ; return 0; }
5385 EOF
5386 if { (eval echo configure:5387: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5387   rm -rf conftest*
5388       # The compiler can only warn and ignore the option if not recognized
5389     # So say no if there are warnings
5390     if test -s conftest.err; then
5391       lt_cv_compiler_o_lo=no
5392     else
5393       lt_cv_compiler_o_lo=yes
5394     fi
5395   
5396 else
5397   echo "configure: failed program was:" >&5
5398   cat conftest.$ac_ext >&5
5399 fi
5400 rm -f conftest*
5401   ac_objext="$save_objext"
5402   CFLAGS="$save_CFLAGS"
5403   
5404 fi
5405
5406   compiler_o_lo=$lt_cv_compiler_o_lo
5407   echo "$ac_t""$compiler_o_lo" 1>&6
5408 else
5409   compiler_o_lo=no
5410 fi
5411
5412 # Check to see if we can do hard links to lock some files if needed
5413 hard_links="nottested"
5414 if test "$compiler_c_o" = no && test "$need_locks" != no; then
5415   # do not overwrite the value of need_locks provided by the user
5416   echo $ac_n "checking if we can lock with hard links""... $ac_c" 1>&6
5417 echo "configure:5418: checking if we can lock with hard links" >&5
5418   hard_links=yes
5419   $rm conftest*
5420   ln conftest.a conftest.b 2>/dev/null && hard_links=no
5421   touch conftest.a
5422   ln conftest.a conftest.b 2>&5 || hard_links=no
5423   ln conftest.a conftest.b 2>/dev/null && hard_links=no
5424   echo "$ac_t""$hard_links" 1>&6
5425   if test "$hard_links" = no; then
5426     echo "configure: warning: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" 1>&2
5427     need_locks=warn
5428   fi
5429 else
5430   need_locks=no
5431 fi
5432
5433 if test "$GCC" = yes; then
5434   # Check to see if options -fno-rtti -fno-exceptions are supported by compiler
5435   echo $ac_n "checking if $compiler supports -fno-rtti -fno-exceptions""... $ac_c" 1>&6
5436 echo "configure:5437: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
5437   echo "int some_variable = 0;" > conftest.$ac_ext
5438   save_CFLAGS="$CFLAGS"
5439   CFLAGS="$CFLAGS -fno-rtti -fno-exceptions -c conftest.$ac_ext"
5440   compiler_rtti_exceptions=no
5441   cat > conftest.$ac_ext <<EOF
5442 #line 5443 "configure"
5443 #include "confdefs.h"
5444
5445 int main() {
5446 int some_variable = 0;
5447 ; return 0; }
5448 EOF
5449 if { (eval echo configure:5450: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5450   rm -rf conftest*
5451       # The compiler can only warn and ignore the option if not recognized
5452     # So say no if there are warnings
5453     if test -s conftest.err; then
5454       compiler_rtti_exceptions=no
5455     else
5456       compiler_rtti_exceptions=yes
5457     fi
5458   
5459 else
5460   echo "configure: failed program was:" >&5
5461   cat conftest.$ac_ext >&5
5462 fi
5463 rm -f conftest*
5464   CFLAGS="$save_CFLAGS"
5465   echo "$ac_t""$compiler_rtti_exceptions" 1>&6
5466
5467   if test "$compiler_rtti_exceptions" = "yes"; then
5468     no_builtin_flag=' -fno-builtin -fno-rtti -fno-exceptions'
5469   else
5470     no_builtin_flag=' -fno-builtin'
5471   fi
5472 fi
5473
5474 # See if the linker supports building shared libraries.
5475 echo $ac_n "checking whether the linker ($LD) supports shared libraries""... $ac_c" 1>&6
5476 echo "configure:5477: checking whether the linker ($LD) supports shared libraries" >&5
5477
5478 allow_undefined_flag=
5479 no_undefined_flag=
5480 need_lib_prefix=unknown
5481 need_version=unknown
5482 # when you set need_version to no, make sure it does not cause -set_version
5483 # flags to be left without arguments
5484 archive_cmds=
5485 archive_expsym_cmds=
5486 old_archive_from_new_cmds=
5487 old_archive_from_expsyms_cmds=
5488 export_dynamic_flag_spec=
5489 whole_archive_flag_spec=
5490 thread_safe_flag_spec=
5491 hardcode_into_libs=no
5492 hardcode_libdir_flag_spec=
5493 hardcode_libdir_separator=
5494 hardcode_direct=no
5495 hardcode_minus_L=no
5496 hardcode_shlibpath_var=unsupported
5497 runpath_var=
5498 link_all_deplibs=unknown
5499 always_export_symbols=no
5500 export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols'
5501 # include_expsyms should be a list of space-separated symbols to be *always*
5502 # included in the symbol list
5503 include_expsyms=
5504 # exclude_expsyms can be an egrep regular expression of symbols to exclude
5505 # it will be wrapped by ` (' and `)$', so one must not match beginning or
5506 # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
5507 # as well as any symbol that contains `d'.
5508 exclude_expsyms="_GLOBAL_OFFSET_TABLE_"
5509 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
5510 # platforms (ab)use it in PIC code, but their linkers get confused if
5511 # the symbol is explicitly referenced.  Since portable code cannot
5512 # rely on this symbol name, it's probably fine to never include it in
5513 # preloaded symbol tables.
5514 extract_expsyms_cmds=
5515
5516 case $host_os in
5517 cygwin* | mingw* | pw32*)
5518   # FIXME: the MSVC++ port hasn't been tested in a loooong time
5519   # When not using gcc, we currently assume that we are using
5520   # Microsoft Visual C++.
5521   if test "$GCC" != yes; then
5522     with_gnu_ld=no
5523   fi
5524   ;;
5525 openbsd*)
5526   with_gnu_ld=no
5527   ;;
5528 esac
5529
5530 ld_shlibs=yes
5531 if test "$with_gnu_ld" = yes; then
5532   # If archive_cmds runs LD, not CC, wlarc should be empty
5533   wlarc='${wl}'
5534
5535   # See if GNU ld supports shared libraries.
5536   case $host_os in
5537   aix3* | aix4* | aix5*)
5538     # On AIX, the GNU linker is very broken
5539     # Note:Check GNU linker on AIX 5-IA64 when/if it becomes available.
5540     ld_shlibs=no
5541     cat <<EOF 1>&2
5542
5543 *** Warning: the GNU linker, at least up to release 2.9.1, is reported
5544 *** to be unable to reliably create shared libraries on AIX.
5545 *** Therefore, libtool is disabling shared libraries support.  If you
5546 *** really care for shared libraries, you may want to modify your PATH
5547 *** so that a non-GNU linker is found, and then restart.
5548
5549 EOF
5550     ;;
5551
5552   amigaos*)
5553     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)'
5554     hardcode_libdir_flag_spec='-L$libdir'
5555     hardcode_minus_L=yes
5556
5557     # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
5558     # that the semantics of dynamic libraries on AmigaOS, at least up
5559     # to version 4, is to share data among multiple programs linked
5560     # with the same dynamic library.  Since this doesn't match the
5561     # behavior of shared libraries on other platforms, we can use
5562     # them.
5563     ld_shlibs=no
5564     ;;
5565
5566   beos*)
5567     if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
5568       allow_undefined_flag=unsupported
5569       # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
5570       # support --undefined.  This deserves some investigation.  FIXME
5571       archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5572     else
5573       ld_shlibs=no
5574     fi
5575     ;;
5576
5577   cygwin* | mingw* | pw32*)
5578     # hardcode_libdir_flag_spec is actually meaningless, as there is
5579     # no search path for DLLs.
5580     hardcode_libdir_flag_spec='-L$libdir'
5581     allow_undefined_flag=unsupported
5582     always_export_symbols=yes
5583
5584     extract_expsyms_cmds='test -f $output_objdir/impgen.c || \
5585       sed -e "/^# \/\* impgen\.c starts here \*\//,/^# \/\* impgen.c ends here \*\// { s/^# //;s/^# *$//; p; }" -e d < $''0 > $output_objdir/impgen.c~
5586       test -f $output_objdir/impgen.exe || (cd $output_objdir && \
5587       if test "x$HOST_CC" != "x" ; then $HOST_CC -o impgen impgen.c ; \
5588       else $CC -o impgen impgen.c ; fi)~
5589       $output_objdir/impgen $dir/$soroot > $output_objdir/$soname-def'
5590
5591     old_archive_from_expsyms_cmds='$DLLTOOL --as=$AS --dllname $soname --def $output_objdir/$soname-def --output-lib $output_objdir/$newlib'
5592
5593     # cygwin and mingw dlls have different entry points and sets of symbols
5594     # to exclude.
5595     # FIXME: what about values for MSVC?
5596     dll_entry=__cygwin_dll_entry@12
5597     dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12~
5598     case $host_os in
5599     mingw*)
5600       # mingw values
5601       dll_entry=_DllMainCRTStartup@12
5602       dll_exclude_symbols=DllMain@12,DllMainCRTStartup@12,DllEntryPoint@12~
5603       ;;
5604     esac
5605
5606     # mingw and cygwin differ, and it's simplest to just exclude the union
5607     # of the two symbol sets.
5608     dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12,DllMainCRTStartup@12,DllEntryPoint@12
5609
5610     # recent cygwin and mingw systems supply a stub DllMain which the user
5611     # can override, but on older systems we have to supply one (in ltdll.c)
5612     if test "x$lt_cv_need_dllmain" = "xyes"; then
5613       ltdll_obj='$output_objdir/$soname-ltdll.'"$ac_objext "
5614       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~
5615         test -f $output_objdir/$soname-ltdll.$ac_objext || (cd $output_objdir && $CC -c $soname-ltdll.c)~'
5616     else
5617       ltdll_obj=
5618       ltdll_cmds=
5619     fi
5620
5621     # Extract the symbol export list from an `--export-all' def file,
5622     # then regenerate the def file from the symbol export list, so that
5623     # the compiled dll only exports the symbol export list.
5624     # Be careful not to strip the DATA tag left be newer dlltools.
5625     export_symbols_cmds="$ltdll_cmds"'
5626       $DLLTOOL --export-all --exclude-symbols '$dll_exclude_symbols' --output-def $output_objdir/$soname-def '$ltdll_obj'$libobjs $convenience~
5627       sed -e "1,/EXPORTS/d" -e "s/ @ [0-9]*//" -e "s/ *;.*$//" < $output_objdir/$soname-def > $export_symbols'
5628
5629     # If the export-symbols file already is a .def file (1st line
5630     # is EXPORTS), use it as is.
5631     # If DATA tags from a recent dlltool are present, honour them!
5632     archive_expsym_cmds='if test "x`sed 1q $export_symbols`" = xEXPORTS; then
5633         cp $export_symbols $output_objdir/$soname-def;
5634       else
5635         echo EXPORTS > $output_objdir/$soname-def;
5636         _lt_hint=1;
5637         cat $export_symbols | while read symbol; do
5638          set dummy \$symbol;
5639          case \$# in
5640            2) echo "   \$2 @ \$_lt_hint ; " >> $output_objdir/$soname-def;;
5641            4) echo "   \$2 \$3 \$4 ; " >> $output_objdir/$soname-def; _lt_hint=`expr \$_lt_hint - 1`;;
5642            *) echo "     \$2 @ \$_lt_hint \$3 ; " >> $output_objdir/$soname-def;;
5643          esac;
5644          _lt_hint=`expr 1 + \$_lt_hint`;
5645         done;
5646       fi~
5647       '"$ltdll_cmds"'
5648       $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~
5649       $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~
5650       $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~
5651       $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~
5652       $CC $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags'
5653     ;;
5654
5655   netbsd*)
5656     if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
5657       archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
5658       wlarc=
5659     else
5660       archive_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5661       archive_expsym_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5662     fi
5663     ;;
5664
5665   solaris* | sysv5*)
5666     if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then
5667       ld_shlibs=no
5668       cat <<EOF 1>&2
5669
5670 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
5671 *** create shared libraries on Solaris systems.  Therefore, libtool
5672 *** is disabling shared libraries support.  We urge you to upgrade GNU
5673 *** binutils to release 2.9.1 or newer.  Another option is to modify
5674 *** your PATH or compiler configuration so that the native linker is
5675 *** used, and then restart.
5676
5677 EOF
5678     elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
5679       archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5680       archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5681     else
5682       ld_shlibs=no
5683     fi
5684     ;;
5685
5686   sunos4*)
5687     archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5688     wlarc=
5689     hardcode_direct=yes
5690     hardcode_shlibpath_var=no
5691     ;;
5692
5693   *)
5694     if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
5695       archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5696       archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5697     else
5698       ld_shlibs=no
5699     fi
5700     ;;
5701   esac
5702
5703   if test "$ld_shlibs" = yes; then
5704     runpath_var=LD_RUN_PATH
5705     hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir'
5706     export_dynamic_flag_spec='${wl}--export-dynamic'
5707     case $host_os in
5708     cygwin* | mingw* | pw32*)
5709       # dlltool doesn't understand --whole-archive et. al.
5710       whole_archive_flag_spec=
5711       ;;
5712     *)
5713       # ancient GNU ld didn't support --whole-archive et. al.
5714       if $LD --help 2>&1 | egrep 'no-whole-archive' > /dev/null; then
5715         whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
5716       else
5717         whole_archive_flag_spec=
5718       fi
5719       ;;
5720     esac
5721   fi
5722 else
5723   # PORTME fill in a description of your system's linker (not GNU ld)
5724   case $host_os in
5725   aix3*)
5726     allow_undefined_flag=unsupported
5727     always_export_symbols=yes
5728     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'
5729     # Note: this linker hardcodes the directories in LIBPATH if there
5730     # are no directories specified by -L.
5731     hardcode_minus_L=yes
5732     if test "$GCC" = yes && test -z "$link_static_flag"; then
5733       # Neither direct hardcoding nor static linking is supported with a
5734       # broken collect2.
5735       hardcode_direct=unsupported
5736     fi
5737     ;;
5738
5739   aix4* | aix5*)
5740     if test "$host_cpu" = ia64; then
5741       # On IA64, the linker does run time linking by default, so we don't
5742       # have to do anything special.
5743       aix_use_runtimelinking=no
5744       exp_sym_flag='-Bexport'
5745       no_entry_flag=""
5746     else
5747       aix_use_runtimelinking=no
5748
5749       # Test if we are trying to use run time linking or normal
5750       # AIX style linking. If -brtl is somewhere in LDFLAGS, we
5751       # need to do runtime linking.
5752       case $host_os in aix4.[23]|aix4.[23].*|aix5*)
5753         for ld_flag in $LDFLAGS; do
5754           case $ld_flag in
5755           *-brtl*)
5756             aix_use_runtimelinking=yes
5757             break
5758           ;;
5759           esac
5760         done
5761       esac
5762
5763       exp_sym_flag='-bexport'
5764       no_entry_flag='-bnoentry'
5765     fi
5766
5767     # When large executables or shared objects are built, AIX ld can
5768     # have problems creating the table of contents.  If linking a library
5769     # or program results in "error TOC overflow" add -mminimal-toc to
5770     # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
5771     # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
5772
5773     hardcode_direct=yes
5774     archive_cmds=''
5775     hardcode_libdir_separator=':'
5776     if test "$GCC" = yes; then
5777       case $host_os in aix4.[012]|aix4.[012].*)
5778         collect2name=`${CC} -print-prog-name=collect2`
5779         if test -f "$collect2name" && \
5780           strings "$collect2name" | grep resolve_lib_name >/dev/null
5781         then
5782           # We have reworked collect2
5783           hardcode_direct=yes
5784         else
5785           # We have old collect2
5786           hardcode_direct=unsupported
5787           # It fails to find uninstalled libraries when the uninstalled
5788           # path is not listed in the libpath.  Setting hardcode_minus_L
5789           # to unsupported forces relinking
5790           hardcode_minus_L=yes
5791           hardcode_libdir_flag_spec='-L$libdir'
5792           hardcode_libdir_separator=
5793         fi
5794       esac
5795
5796       shared_flag='-shared'
5797     else
5798       # not using gcc
5799       if test "$host_cpu" = ia64; then
5800         shared_flag='${wl}-G'
5801       else
5802         if test "$aix_use_runtimelinking" = yes; then
5803           shared_flag='${wl}-G'
5804         else
5805           shared_flag='${wl}-bM:SRE'
5806         fi
5807       fi
5808     fi
5809
5810     # It seems that -bexpall can do strange things, so it is better to
5811     # generate a list of symbols to export.
5812     always_export_symbols=yes
5813     if test "$aix_use_runtimelinking" = yes; then
5814       # Warning - without using the other runtime loading flags (-brtl),
5815       # -berok will link without error, but may produce a broken library.
5816       allow_undefined_flag='-berok'
5817       hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:/usr/lib:/lib'
5818       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"
5819     else
5820       if test "$host_cpu" = ia64; then
5821         hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
5822         allow_undefined_flag="-z nodefs"
5823         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"
5824       else
5825         hardcode_libdir_flag_spec='${wl}-bnolibpath ${wl}-blibpath:$libdir:/usr/lib:/lib'
5826         # Warning - without using the other run time loading flags,
5827         # -berok will link without error, but may produce a broken library.
5828         allow_undefined_flag='${wl}-berok'
5829         # This is a bit strange, but is similar to how AIX traditionally builds
5830         # it's shared libraries.
5831         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'
5832       fi
5833     fi
5834     ;;
5835
5836   amigaos*)
5837     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)'
5838     hardcode_libdir_flag_spec='-L$libdir'
5839     hardcode_minus_L=yes
5840     # see comment about different semantics on the GNU ld section
5841     ld_shlibs=no
5842     ;;
5843
5844   cygwin* | mingw* | pw32*)
5845     # When not using gcc, we currently assume that we are using
5846     # Microsoft Visual C++.
5847     # hardcode_libdir_flag_spec is actually meaningless, as there is
5848     # no search path for DLLs.
5849     hardcode_libdir_flag_spec=' '
5850     allow_undefined_flag=unsupported
5851     # Tell ltmain to make .lib files, not .a files.
5852     libext=lib
5853     # FIXME: Setting linknames here is a bad hack.
5854     archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | sed -e '\''s/ -lc$//'\''` -link -dll~linknames='
5855     # The linker will automatically build a .lib file if we build a DLL.
5856     old_archive_from_new_cmds='true'
5857     # FIXME: Should let the user specify the lib program.
5858     old_archive_cmds='lib /OUT:$oldlib$oldobjs$old_deplibs'
5859     fix_srcfile_path='`cygpath -w "$srcfile"`'
5860     ;;
5861
5862   darwin* | rhapsody*)
5863     case "$host_os" in
5864     rhapsody* | darwin1.[012])
5865       allow_undefined_flag='-undefined suppress'
5866       ;;
5867     *) # Darwin 1.3 on
5868       allow_undefined_flag='-flat_namespace -undefined suppress'
5869       ;;
5870     esac
5871     # FIXME: Relying on posixy $() will cause problems for
5872     #        cross-compilation, but unfortunately the echo tests do not
5873     #        yet detect zsh echo's removal of \ escapes.  Also zsh mangles
5874     #        `"' quotes if we put them in here... so don't!
5875     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)'
5876     # We need to add '_' to the symbols in $export_symbols first
5877     #archive_expsym_cmds="$archive_cmds"' && strip -s $export_symbols'
5878     hardcode_direct=yes
5879     hardcode_shlibpath_var=no
5880     whole_archive_flag_spec='-all_load $convenience'
5881     ;;
5882
5883   freebsd1*)
5884     ld_shlibs=no
5885     ;;
5886
5887   # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
5888   # support.  Future versions do this automatically, but an explicit c++rt0.o
5889   # does not break anything, and helps significantly (at the cost of a little
5890   # extra space).
5891   freebsd2.2*)
5892     archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
5893     hardcode_libdir_flag_spec='-R$libdir'
5894     hardcode_direct=yes
5895     hardcode_shlibpath_var=no
5896     ;;
5897
5898   # Unfortunately, older versions of FreeBSD 2 do not have this feature.
5899   freebsd2*)
5900     archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5901     hardcode_direct=yes
5902     hardcode_minus_L=yes
5903     hardcode_shlibpath_var=no
5904     ;;
5905
5906   # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
5907   freebsd*)
5908     archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
5909     hardcode_libdir_flag_spec='-R$libdir'
5910     hardcode_direct=yes
5911     hardcode_shlibpath_var=no
5912     ;;
5913
5914   hpux9* | hpux10* | hpux11*)
5915     case $host_os in
5916     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' ;;
5917     *) archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' ;;
5918     esac
5919     hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
5920     hardcode_libdir_separator=:
5921     hardcode_direct=yes
5922     hardcode_minus_L=yes # Not in the search PATH, but as the default
5923                          # location of the library.
5924     export_dynamic_flag_spec='${wl}-E'
5925     ;;
5926
5927   irix5* | irix6* | nonstopux*)
5928     if test "$GCC" = yes; then
5929       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'
5930       hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5931     else
5932       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'
5933       hardcode_libdir_flag_spec='-rpath $libdir'
5934     fi
5935     hardcode_libdir_separator=:
5936     link_all_deplibs=yes
5937     ;;
5938
5939   netbsd*)
5940     if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
5941       archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
5942     else
5943       archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
5944     fi
5945     hardcode_libdir_flag_spec='-R$libdir'
5946     hardcode_direct=yes
5947     hardcode_shlibpath_var=no
5948     ;;
5949
5950   newsos6)
5951     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5952     hardcode_direct=yes
5953     hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5954     hardcode_libdir_separator=:
5955     hardcode_shlibpath_var=no
5956     ;;
5957
5958   openbsd*)
5959     hardcode_direct=yes
5960     hardcode_shlibpath_var=no
5961     if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
5962       archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5963       hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
5964       export_dynamic_flag_spec='${wl}-E'
5965     else
5966       case "$host_os" in
5967       openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
5968         archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5969         hardcode_libdir_flag_spec='-R$libdir'
5970         ;;
5971       *)
5972         archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5973         hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
5974         ;;
5975       esac
5976     fi
5977     ;;
5978
5979   os2*)
5980     hardcode_libdir_flag_spec='-L$libdir'
5981     hardcode_minus_L=yes
5982     allow_undefined_flag=unsupported
5983     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'
5984     old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
5985     ;;
5986
5987   osf3*)
5988     if test "$GCC" = yes; then
5989       allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
5990       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'
5991     else
5992       allow_undefined_flag=' -expect_unresolved \*'
5993       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'
5994     fi
5995     hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5996     hardcode_libdir_separator=:
5997     ;;
5998
5999   osf4* | osf5*)        # as osf3* with the addition of -msym flag
6000     if test "$GCC" = yes; then
6001       allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
6002       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'
6003       hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
6004     else
6005       allow_undefined_flag=' -expect_unresolved \*'
6006       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'
6007       archive_expsym_cmds='for i in `cat $export_symbols`; do printf "-exported_symbol " >> $lib.exp; echo "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
6008       $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'
6009
6010       #Both c and cxx compiler support -rpath directly
6011       hardcode_libdir_flag_spec='-rpath $libdir'
6012     fi
6013     hardcode_libdir_separator=:
6014     ;;
6015
6016   sco3.2v5*)
6017     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6018     hardcode_shlibpath_var=no
6019     runpath_var=LD_RUN_PATH
6020     hardcode_runpath_var=yes
6021     export_dynamic_flag_spec='${wl}-Bexport'
6022     ;;
6023
6024   solaris*)
6025     # gcc --version < 3.0 without binutils cannot create self contained
6026     # shared libraries reliably, requiring libgcc.a to resolve some of
6027     # the object symbols generated in some cases.  Libraries that use
6028     # assert need libgcc.a to resolve __eprintf, for example.  Linking
6029     # a copy of libgcc.a into every shared library to guarantee resolving
6030     # such symbols causes other problems:  According to Tim Van Holder
6031     # <tim.van.holder@pandora.be>, C++ libraries end up with a separate
6032     # (to the application) exception stack for one thing.
6033     no_undefined_flag=' -z defs'
6034     if test "$GCC" = yes; then
6035       case `$CC --version 2>/dev/null` in
6036       [12].*)
6037         cat <<EOF 1>&2
6038
6039 *** Warning: Releases of GCC earlier than version 3.0 cannot reliably
6040 *** create self contained shared libraries on Solaris systems, without
6041 *** introducing a dependency on libgcc.a.  Therefore, libtool is disabling
6042 *** -no-undefined support, which will at least allow you to build shared
6043 *** libraries.  However, you may find that when you link such libraries
6044 *** into an application without using GCC, you have to manually add
6045 *** \`gcc --print-libgcc-file-name\` to the link command.  We urge you to
6046 *** upgrade to a newer version of GCC.  Another option is to rebuild your
6047 *** current GCC to use the GNU linker from GNU binutils 2.9.1 or newer.
6048
6049 EOF
6050         no_undefined_flag=
6051         ;;
6052       esac
6053     fi
6054     # $CC -shared without GNU ld will not create a library from C++
6055     # object files and a static libstdc++, better avoid it by now
6056     archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
6057     archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
6058                 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
6059     hardcode_libdir_flag_spec='-R$libdir'
6060     hardcode_shlibpath_var=no
6061     case $host_os in
6062     solaris2.[0-5] | solaris2.[0-5].*) ;;
6063     *) # Supported since Solaris 2.6 (maybe 2.5.1?)
6064       whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;;
6065     esac
6066     link_all_deplibs=yes
6067     ;;
6068
6069   sunos4*)
6070     if test "x$host_vendor" = xsequent; then
6071       # Use $CC to link under sequent, because it throws in some extra .o
6072       # files that make .init and .fini sections work.
6073       archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
6074     else
6075       archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
6076     fi
6077     hardcode_libdir_flag_spec='-L$libdir'
6078     hardcode_direct=yes
6079     hardcode_minus_L=yes
6080     hardcode_shlibpath_var=no
6081     ;;
6082
6083   sysv4)
6084     case $host_vendor in
6085       sni)
6086         archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6087         hardcode_direct=yes # is this really true???
6088         ;;
6089       siemens)
6090         ## LD is ld it makes a PLAMLIB
6091         ## CC just makes a GrossModule.
6092         archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
6093         reload_cmds='$CC -r -o $output$reload_objs'
6094         hardcode_direct=no
6095         ;;
6096       motorola)
6097         archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6098         hardcode_direct=no #Motorola manual says yes, but my tests say they lie
6099         ;;
6100     esac
6101     runpath_var='LD_RUN_PATH'
6102     hardcode_shlibpath_var=no
6103     ;;
6104
6105   sysv4.3*)
6106     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6107     hardcode_shlibpath_var=no
6108     export_dynamic_flag_spec='-Bexport'
6109     ;;
6110
6111   sysv5*)
6112     no_undefined_flag=' -z text'
6113     # $CC -shared without GNU ld will not create a library from C++
6114     # object files and a static libstdc++, better avoid it by now
6115     archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
6116     archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
6117                 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
6118     hardcode_libdir_flag_spec=
6119     hardcode_shlibpath_var=no
6120     runpath_var='LD_RUN_PATH'
6121     ;;
6122
6123   uts4*)
6124     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6125     hardcode_libdir_flag_spec='-L$libdir'
6126     hardcode_shlibpath_var=no
6127     ;;
6128
6129   dgux*)
6130     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6131     hardcode_libdir_flag_spec='-L$libdir'
6132     hardcode_shlibpath_var=no
6133     ;;
6134
6135   sysv4*MP*)
6136     if test -d /usr/nec; then
6137       archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6138       hardcode_shlibpath_var=no
6139       runpath_var=LD_RUN_PATH
6140       hardcode_runpath_var=yes
6141       ld_shlibs=yes
6142     fi
6143     ;;
6144
6145   sysv4.2uw2*)
6146     archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
6147     hardcode_direct=yes
6148     hardcode_minus_L=no
6149     hardcode_shlibpath_var=no
6150     hardcode_runpath_var=yes
6151     runpath_var=LD_RUN_PATH
6152     ;;
6153
6154   sysv5uw7* | unixware7*)
6155     no_undefined_flag='${wl}-z ${wl}text'
6156     if test "$GCC" = yes; then
6157       archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6158     else
6159       archive_cmds='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6160     fi
6161     runpath_var='LD_RUN_PATH'
6162     hardcode_shlibpath_var=no
6163     ;;
6164
6165   *)
6166     ld_shlibs=no
6167     ;;
6168   esac
6169 fi
6170 echo "$ac_t""$ld_shlibs" 1>&6
6171 test "$ld_shlibs" = no && can_build_shared=no
6172
6173 # Check hardcoding attributes.
6174 echo $ac_n "checking how to hardcode library paths into programs""... $ac_c" 1>&6
6175 echo "configure:6176: checking how to hardcode library paths into programs" >&5
6176 hardcode_action=
6177 if test -n "$hardcode_libdir_flag_spec" || \
6178    test -n "$runpath_var"; then
6179
6180   # We can hardcode non-existant directories.
6181   if test "$hardcode_direct" != no &&
6182      # If the only mechanism to avoid hardcoding is shlibpath_var, we
6183      # have to relink, otherwise we might link with an installed library
6184      # when we should be linking with a yet-to-be-installed one
6185      ## test "$hardcode_shlibpath_var" != no &&
6186      test "$hardcode_minus_L" != no; then
6187     # Linking always hardcodes the temporary library directory.
6188     hardcode_action=relink
6189   else
6190     # We can link without hardcoding, and we can hardcode nonexisting dirs.
6191     hardcode_action=immediate
6192   fi
6193 else
6194   # We cannot hardcode anything, or else we can only hardcode existing
6195   # directories.
6196   hardcode_action=unsupported
6197 fi
6198 echo "$ac_t""$hardcode_action" 1>&6
6199
6200 striplib=
6201 old_striplib=
6202 echo $ac_n "checking whether stripping libraries is possible""... $ac_c" 1>&6
6203 echo "configure:6204: checking whether stripping libraries is possible" >&5
6204 if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
6205   test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
6206   test -z "$striplib" && striplib="$STRIP --strip-unneeded"
6207   echo "$ac_t""yes" 1>&6
6208 else
6209   echo "$ac_t""no" 1>&6
6210 fi
6211
6212 reload_cmds='$LD$reload_flag -o $output$reload_objs'
6213 test -z "$deplibs_check_method" && deplibs_check_method=unknown
6214
6215 # PORTME Fill in your ld.so characteristics
6216 echo $ac_n "checking dynamic linker characteristics""... $ac_c" 1>&6
6217 echo "configure:6218: checking dynamic linker characteristics" >&5
6218 library_names_spec=
6219 libname_spec='lib$name'
6220 soname_spec=
6221 postinstall_cmds=
6222 postuninstall_cmds=
6223 finish_cmds=
6224 finish_eval=
6225 shlibpath_var=
6226 shlibpath_overrides_runpath=unknown
6227 version_type=none
6228 dynamic_linker="$host_os ld.so"
6229 sys_lib_dlsearch_path_spec="/lib /usr/lib"
6230 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
6231
6232 case $host_os in
6233 aix3*)
6234   version_type=linux
6235   library_names_spec='${libname}${release}.so$versuffix $libname.a'
6236   shlibpath_var=LIBPATH
6237
6238   # AIX has no versioning support, so we append a major version to the name.
6239   soname_spec='${libname}${release}.so$major'
6240   ;;
6241
6242 aix4* | aix5*)
6243   version_type=linux
6244   need_lib_prefix=no
6245   need_version=no
6246   hardcode_into_libs=yes
6247   if test "$host_cpu" = ia64; then
6248     # AIX 5 supports IA64
6249     library_names_spec='${libname}${release}.so$major ${libname}${release}.so$versuffix $libname.so'
6250     shlibpath_var=LD_LIBRARY_PATH
6251   else
6252     # With GCC up to 2.95.x, collect2 would create an import file
6253     # for dependence libraries.  The import file would start with
6254     # the line `#! .'.  This would cause the generated library to
6255     # depend on `.', always an invalid library.  This was fixed in
6256     # development snapshots of GCC prior to 3.0.
6257     case $host_os in
6258       aix4 | aix4.[01] | aix4.[01].*)
6259         if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
6260              echo ' yes '
6261              echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
6262           :
6263         else
6264           can_build_shared=no
6265         fi
6266         ;;
6267     esac
6268     # AIX (on Power*) has no versioning support, so currently we can
6269     # not hardcode correct soname into executable. Probably we can
6270     # add versioning support to collect2, so additional links can
6271     # be useful in future.
6272     if test "$aix_use_runtimelinking" = yes; then
6273       # If using run time linking (on AIX 4.2 or later) use lib<name>.so
6274       # instead of lib<name>.a to let people know that these are not
6275       # typical AIX shared libraries.
6276       library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6277     else
6278       # We preserve .a as extension for shared libraries through AIX4.2
6279       # and later when we are not doing run time linking.
6280       library_names_spec='${libname}${release}.a $libname.a'
6281       soname_spec='${libname}${release}.so$major'
6282     fi
6283     shlibpath_var=LIBPATH
6284   fi
6285   hardcode_into_libs=yes
6286   ;;
6287
6288 amigaos*)
6289   library_names_spec='$libname.ixlibrary $libname.a'
6290   # Create ${libname}_ixlibrary.a entries in /sys/libs.
6291   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'
6292   ;;
6293
6294 beos*)
6295   library_names_spec='${libname}.so'
6296   dynamic_linker="$host_os ld.so"
6297   shlibpath_var=LIBRARY_PATH
6298   ;;
6299
6300 bsdi4*)
6301   version_type=linux
6302   need_version=no
6303   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6304   soname_spec='${libname}${release}.so$major'
6305   finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
6306   shlibpath_var=LD_LIBRARY_PATH
6307   sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
6308   sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
6309   export_dynamic_flag_spec=-rdynamic
6310   # the default ld.so.conf also contains /usr/contrib/lib and
6311   # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
6312   # libtool to hard-code these into programs
6313   ;;
6314
6315 cygwin* | mingw* | pw32*)
6316   version_type=windows
6317   need_version=no
6318   need_lib_prefix=no
6319   case $GCC,$host_os in
6320   yes,cygwin*)
6321     library_names_spec='$libname.dll.a'
6322     soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
6323     postinstall_cmds='dlpath=`bash 2>&1 -c '\''. $dir/${file}i;echo \$dlname'\''`~
6324       dldir=$destdir/`dirname \$dlpath`~
6325       test -d \$dldir || mkdir -p \$dldir~
6326       $install_prog .libs/$dlname \$dldir/$dlname'
6327     postuninstall_cmds='dldll=`bash 2>&1 -c '\''. $file; echo \$dlname'\''`~
6328       dlpath=$dir/\$dldll~
6329        $rm \$dlpath'
6330     ;;
6331   yes,mingw*)
6332     library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
6333     sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | sed -e "s/^libraries://" -e "s/;/ /g" -e "s,=/,/,g"`
6334     ;;
6335   yes,pw32*)
6336     library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | sed -e 's/./-/g'`${versuffix}.dll'
6337     ;;
6338   *)
6339     library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll $libname.lib'
6340     ;;
6341   esac
6342   dynamic_linker='Win32 ld.exe'
6343   # FIXME: first we should search . and the directory the executable is in
6344   shlibpath_var=PATH
6345   ;;
6346
6347 darwin* | rhapsody*)
6348   dynamic_linker="$host_os dyld"
6349   version_type=darwin
6350   need_lib_prefix=no
6351   need_version=no
6352   # FIXME: Relying on posixy $() will cause problems for
6353   #        cross-compilation, but unfortunately the echo tests do not
6354   #        yet detect zsh echo's removal of \ escapes.
6355   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)'
6356   soname_spec='${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib)'
6357   shlibpath_overrides_runpath=yes
6358   shlibpath_var=DYLD_LIBRARY_PATH
6359   ;;
6360
6361 freebsd1*)
6362   dynamic_linker=no
6363   ;;
6364
6365 freebsd*)
6366   objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
6367   version_type=freebsd-$objformat
6368   case $version_type in
6369     freebsd-elf*)
6370       library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
6371       need_version=no
6372       need_lib_prefix=no
6373       ;;
6374     freebsd-*)
6375       library_names_spec='${libname}${release}.so$versuffix $libname.so$versuffix'
6376       need_version=yes
6377       ;;
6378   esac
6379   shlibpath_var=LD_LIBRARY_PATH
6380   case $host_os in
6381   freebsd2*)
6382     shlibpath_overrides_runpath=yes
6383     ;;
6384   *)
6385     shlibpath_overrides_runpath=no
6386     hardcode_into_libs=yes
6387     ;;
6388   esac
6389   ;;
6390
6391 gnu*)
6392   version_type=linux
6393   need_lib_prefix=no
6394   need_version=no
6395   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so${major} ${libname}.so'
6396   soname_spec='${libname}${release}.so$major'
6397   shlibpath_var=LD_LIBRARY_PATH
6398   hardcode_into_libs=yes
6399   ;;
6400
6401 hpux9* | hpux10* | hpux11*)
6402   # Give a soname corresponding to the major version so that dld.sl refuses to
6403   # link against other versions.
6404   dynamic_linker="$host_os dld.sl"
6405   version_type=sunos
6406   need_lib_prefix=no
6407   need_version=no
6408   shlibpath_var=SHLIB_PATH
6409   shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
6410   library_names_spec='${libname}${release}.sl$versuffix ${libname}${release}.sl$major $libname.sl'
6411   soname_spec='${libname}${release}.sl$major'
6412   # HP-UX runs *really* slowly unless shared libraries are mode 555.
6413   postinstall_cmds='chmod 555 $lib'
6414   ;;
6415
6416 irix5* | irix6* | nonstopux*)
6417   case $host_os in
6418     nonstopux*) version_type=nonstopux ;;
6419     *)          version_type=irix ;;
6420   esac
6421   need_lib_prefix=no
6422   need_version=no
6423   soname_spec='${libname}${release}.so$major'
6424   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so $libname.so'
6425   case $host_os in
6426   irix5* | nonstopux*)
6427     libsuff= shlibsuff=
6428     ;;
6429   *)
6430     case $LD in # libtool.m4 will add one of these switches to LD
6431     *-32|*"-32 ") libsuff= shlibsuff= libmagic=32-bit;;
6432     *-n32|*"-n32 ") libsuff=32 shlibsuff=N32 libmagic=N32;;
6433     *-64|*"-64 ") libsuff=64 shlibsuff=64 libmagic=64-bit;;
6434     *) libsuff= shlibsuff= libmagic=never-match;;
6435     esac
6436     ;;
6437   esac
6438   shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
6439   shlibpath_overrides_runpath=no
6440   sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
6441   sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
6442   ;;
6443
6444 # No shared lib support for Linux oldld, aout, or coff.
6445 linux-gnuoldld* | linux-gnuaout* | linux-gnucoff*)
6446   dynamic_linker=no
6447   ;;
6448
6449 # This must be Linux ELF.
6450 linux-gnu*)
6451   version_type=linux
6452   need_lib_prefix=no
6453   need_version=no
6454   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6455   soname_spec='${libname}${release}.so$major'
6456   finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
6457   shlibpath_var=LD_LIBRARY_PATH
6458   shlibpath_overrides_runpath=no
6459   # This implies no fast_install, which is unacceptable.
6460   # Some rework will be needed to allow for fast_install
6461   # before this can be enabled.
6462   hardcode_into_libs=yes
6463
6464   # We used to test for /lib/ld.so.1 and disable shared libraries on
6465   # powerpc, because MkLinux only supported shared libraries with the
6466   # GNU dynamic linker.  Since this was broken with cross compilers,
6467   # most powerpc-linux boxes support dynamic linking these days and
6468   # people can always --disable-shared, the test was removed, and we
6469   # assume the GNU/Linux dynamic linker is in use.
6470   dynamic_linker='GNU/Linux ld.so'
6471   ;;
6472
6473 netbsd*)
6474   version_type=sunos
6475   need_lib_prefix=no
6476   need_version=no
6477   if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
6478     library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
6479     finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
6480     dynamic_linker='NetBSD (a.out) ld.so'
6481   else
6482     library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so ${libname}.so'
6483     soname_spec='${libname}${release}.so$major'
6484     dynamic_linker='NetBSD ld.elf_so'
6485   fi
6486   shlibpath_var=LD_LIBRARY_PATH
6487   shlibpath_overrides_runpath=yes
6488   hardcode_into_libs=yes
6489   ;;
6490
6491 newsos6)
6492   version_type=linux
6493   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6494   shlibpath_var=LD_LIBRARY_PATH
6495   shlibpath_overrides_runpath=yes
6496   ;;
6497
6498 openbsd*)
6499   version_type=sunos
6500   need_lib_prefix=no
6501   need_version=no
6502   if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
6503     case "$host_os" in
6504     openbsd2.[89] | openbsd2.[89].*)
6505       shlibpath_overrides_runpath=no
6506       ;;
6507     *)
6508       shlibpath_overrides_runpath=yes
6509       ;;
6510     esac
6511   else
6512     shlibpath_overrides_runpath=yes
6513   fi
6514   library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
6515   finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
6516   shlibpath_var=LD_LIBRARY_PATH
6517   ;;
6518
6519 os2*)
6520   libname_spec='$name'
6521   need_lib_prefix=no
6522   library_names_spec='$libname.dll $libname.a'
6523   dynamic_linker='OS/2 ld.exe'
6524   shlibpath_var=LIBPATH
6525   ;;
6526
6527 osf3* | osf4* | osf5*)
6528   version_type=osf
6529   need_version=no
6530   soname_spec='${libname}${release}.so$major'
6531   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6532   shlibpath_var=LD_LIBRARY_PATH
6533   sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
6534   sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
6535   hardcode_into_libs=yes
6536   ;;
6537
6538 sco3.2v5*)
6539   version_type=osf
6540   soname_spec='${libname}${release}.so$major'
6541   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6542   shlibpath_var=LD_LIBRARY_PATH
6543   ;;
6544
6545 solaris*)
6546   version_type=linux
6547   need_lib_prefix=no
6548   need_version=no
6549   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6550   soname_spec='${libname}${release}.so$major'
6551   shlibpath_var=LD_LIBRARY_PATH
6552   shlibpath_overrides_runpath=yes
6553   hardcode_into_libs=yes
6554   # ldd complains unless libraries are executable
6555   postinstall_cmds='chmod +x $lib'
6556   ;;
6557
6558 sunos4*)
6559   version_type=sunos
6560   library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
6561   finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
6562   shlibpath_var=LD_LIBRARY_PATH
6563   shlibpath_overrides_runpath=yes
6564   if test "$with_gnu_ld" = yes; then
6565     need_lib_prefix=no
6566   fi
6567   need_version=yes
6568   ;;
6569
6570 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
6571   version_type=linux
6572   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6573   soname_spec='${libname}${release}.so$major'
6574   shlibpath_var=LD_LIBRARY_PATH
6575   case $host_vendor in
6576     sni)
6577       shlibpath_overrides_runpath=no
6578       need_lib_prefix=no
6579       export_dynamic_flag_spec='${wl}-Blargedynsym'
6580       runpath_var=LD_RUN_PATH
6581       ;;
6582     siemens)
6583       need_lib_prefix=no
6584       ;;
6585     motorola)
6586       need_lib_prefix=no
6587       need_version=no
6588       shlibpath_overrides_runpath=no
6589       sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
6590       ;;
6591   esac
6592   ;;
6593
6594 uts4*)
6595   version_type=linux
6596   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6597   soname_spec='${libname}${release}.so$major'
6598   shlibpath_var=LD_LIBRARY_PATH
6599   ;;
6600
6601 dgux*)
6602   version_type=linux
6603   need_lib_prefix=no
6604   need_version=no
6605   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6606   soname_spec='${libname}${release}.so$major'
6607   shlibpath_var=LD_LIBRARY_PATH
6608   ;;
6609
6610 sysv4*MP*)
6611   if test -d /usr/nec ;then
6612     version_type=linux
6613     library_names_spec='$libname.so.$versuffix $libname.so.$major $libname.so'
6614     soname_spec='$libname.so.$major'
6615     shlibpath_var=LD_LIBRARY_PATH
6616   fi
6617   ;;
6618
6619 *)
6620   dynamic_linker=no
6621   ;;
6622 esac
6623 echo "$ac_t""$dynamic_linker" 1>&6
6624 test "$dynamic_linker" = no && can_build_shared=no
6625
6626 # Report the final consequences.
6627 echo $ac_n "checking if libtool supports shared libraries""... $ac_c" 1>&6
6628 echo "configure:6629: checking if libtool supports shared libraries" >&5
6629 echo "$ac_t""$can_build_shared" 1>&6
6630
6631 echo $ac_n "checking whether to build shared libraries""... $ac_c" 1>&6
6632 echo "configure:6633: checking whether to build shared libraries" >&5
6633 test "$can_build_shared" = "no" && enable_shared=no
6634
6635 # On AIX, shared libraries and static libraries use the same namespace, and
6636 # are all built from PIC.
6637 case "$host_os" in
6638 aix3*)
6639   test "$enable_shared" = yes && enable_static=no
6640   if test -n "$RANLIB"; then
6641     archive_cmds="$archive_cmds~\$RANLIB \$lib"
6642     postinstall_cmds='$RANLIB $lib'
6643   fi
6644   ;;
6645
6646 aix4*)
6647   if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
6648     test "$enable_shared" = yes && enable_static=no
6649   fi
6650   ;;
6651 esac
6652 echo "$ac_t""$enable_shared" 1>&6
6653
6654 echo $ac_n "checking whether to build static libraries""... $ac_c" 1>&6
6655 echo "configure:6656: checking whether to build static libraries" >&5
6656 # Make sure either enable_shared or enable_static is yes.
6657 test "$enable_shared" = yes || enable_static=yes
6658 echo "$ac_t""$enable_static" 1>&6
6659
6660 if test "$hardcode_action" = relink; then
6661   # Fast installation is not supported
6662   enable_fast_install=no
6663 elif test "$shlibpath_overrides_runpath" = yes ||
6664      test "$enable_shared" = no; then
6665   # Fast installation is not necessary
6666   enable_fast_install=needless
6667 fi
6668
6669 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
6670 if test "$GCC" = yes; then
6671   variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
6672 fi
6673
6674 if test "x$enable_dlopen" != xyes; then
6675   enable_dlopen=unknown
6676   enable_dlopen_self=unknown
6677   enable_dlopen_self_static=unknown
6678 else
6679   lt_cv_dlopen=no
6680   lt_cv_dlopen_libs=
6681
6682   case $host_os in
6683   beos*)
6684     lt_cv_dlopen="load_add_on"
6685     lt_cv_dlopen_libs=
6686     lt_cv_dlopen_self=yes
6687     ;;
6688
6689   cygwin* | mingw* | pw32*)
6690     lt_cv_dlopen="LoadLibrary"
6691     lt_cv_dlopen_libs=
6692    ;;
6693
6694   *)
6695     echo $ac_n "checking for shl_load""... $ac_c" 1>&6
6696 echo "configure:6697: checking for shl_load" >&5
6697 if eval "test \"\${ac_cv_func_shl_load+set}\" = set"; then
6698   echo $ac_n "(cached) $ac_c" 1>&6
6699 else
6700   cat > conftest.$ac_ext <<EOF
6701 #line 6702 "configure"
6702 #include "confdefs.h"
6703 /* System header to define __stub macros and hopefully few prototypes,
6704     which can conflict with char shl_load(); below.  */
6705 #include <assert.h>
6706 /* Override any gcc2 internal prototype to avoid an error.  */
6707 /* We use char because int might match the return type of a gcc2
6708     builtin and then its argument prototype would still apply.  */
6709 char shl_load();
6710 char (*f)();
6711
6712 int main() {
6713
6714 /* The GNU C library defines this for functions which it implements
6715     to always fail with ENOSYS.  Some functions are actually named
6716     something starting with __ and the normal name is an alias.  */
6717 #if defined (__stub_shl_load) || defined (__stub___shl_load)
6718 choke me
6719 #else
6720 f = shl_load;
6721 #endif
6722
6723 ; return 0; }
6724 EOF
6725 if { (eval echo configure:6726: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6726   rm -rf conftest*
6727   eval "ac_cv_func_shl_load=yes"
6728 else
6729   echo "configure: failed program was:" >&5
6730   cat conftest.$ac_ext >&5
6731   rm -rf conftest*
6732   eval "ac_cv_func_shl_load=no"
6733 fi
6734 rm -f conftest*
6735 fi
6736
6737 if eval "test \"`echo '$ac_cv_func_'shl_load`\" = yes"; then
6738   echo "$ac_t""yes" 1>&6
6739   lt_cv_dlopen="shl_load"
6740 else
6741   echo "$ac_t""no" 1>&6
6742 echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
6743 echo "configure:6744: checking for shl_load in -ldld" >&5
6744 ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-:%__p__%'`
6745 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6746   echo $ac_n "(cached) $ac_c" 1>&6
6747 else
6748   ac_save_LIBS="$LIBS"
6749 LIBS="-ldld  $LIBS"
6750 cat > conftest.$ac_ext <<EOF
6751 #line 6752 "configure"
6752 #include "confdefs.h"
6753 /* Override any gcc2 internal prototype to avoid an error.  */
6754 /* We use char because int might match the return type of a gcc2
6755     builtin and then its argument prototype would still apply.  */
6756 char shl_load();
6757
6758 int main() {
6759 shl_load()
6760 ; return 0; }
6761 EOF
6762 if { (eval echo configure:6763: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6763   rm -rf conftest*
6764   eval "ac_cv_lib_$ac_lib_var=yes"
6765 else
6766   echo "configure: failed program was:" >&5
6767   cat conftest.$ac_ext >&5
6768   rm -rf conftest*
6769   eval "ac_cv_lib_$ac_lib_var=no"
6770 fi
6771 rm -f conftest*
6772 LIBS="$ac_save_LIBS"
6773
6774 fi
6775 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6776   echo "$ac_t""yes" 1>&6
6777   lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"
6778 else
6779   echo "$ac_t""no" 1>&6
6780 echo $ac_n "checking for dlopen""... $ac_c" 1>&6
6781 echo "configure:6782: checking for dlopen" >&5
6782 if eval "test \"\${ac_cv_func_dlopen+set}\" = set"; then
6783   echo $ac_n "(cached) $ac_c" 1>&6
6784 else
6785   cat > conftest.$ac_ext <<EOF
6786 #line 6787 "configure"
6787 #include "confdefs.h"
6788 /* System header to define __stub macros and hopefully few prototypes,
6789     which can conflict with char dlopen(); below.  */
6790 #include <assert.h>
6791 /* Override any gcc2 internal prototype to avoid an error.  */
6792 /* We use char because int might match the return type of a gcc2
6793     builtin and then its argument prototype would still apply.  */
6794 char dlopen();
6795 char (*f)();
6796
6797 int main() {
6798
6799 /* The GNU C library defines this for functions which it implements
6800     to always fail with ENOSYS.  Some functions are actually named
6801     something starting with __ and the normal name is an alias.  */
6802 #if defined (__stub_dlopen) || defined (__stub___dlopen)
6803 choke me
6804 #else
6805 f = dlopen;
6806 #endif
6807
6808 ; return 0; }
6809 EOF
6810 if { (eval echo configure:6811: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6811   rm -rf conftest*
6812   eval "ac_cv_func_dlopen=yes"
6813 else
6814   echo "configure: failed program was:" >&5
6815   cat conftest.$ac_ext >&5
6816   rm -rf conftest*
6817   eval "ac_cv_func_dlopen=no"
6818 fi
6819 rm -f conftest*
6820 fi
6821
6822 if eval "test \"`echo '$ac_cv_func_'dlopen`\" = yes"; then
6823   echo "$ac_t""yes" 1>&6
6824   lt_cv_dlopen="dlopen"
6825 else
6826   echo "$ac_t""no" 1>&6
6827 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
6828 echo "configure:6829: checking for dlopen in -ldl" >&5
6829 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-:%__p__%'`
6830 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6831   echo $ac_n "(cached) $ac_c" 1>&6
6832 else
6833   ac_save_LIBS="$LIBS"
6834 LIBS="-ldl  $LIBS"
6835 cat > conftest.$ac_ext <<EOF
6836 #line 6837 "configure"
6837 #include "confdefs.h"
6838 /* Override any gcc2 internal prototype to avoid an error.  */
6839 /* We use char because int might match the return type of a gcc2
6840     builtin and then its argument prototype would still apply.  */
6841 char dlopen();
6842
6843 int main() {
6844 dlopen()
6845 ; return 0; }
6846 EOF
6847 if { (eval echo configure:6848: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6848   rm -rf conftest*
6849   eval "ac_cv_lib_$ac_lib_var=yes"
6850 else
6851   echo "configure: failed program was:" >&5
6852   cat conftest.$ac_ext >&5
6853   rm -rf conftest*
6854   eval "ac_cv_lib_$ac_lib_var=no"
6855 fi
6856 rm -f conftest*
6857 LIBS="$ac_save_LIBS"
6858
6859 fi
6860 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6861   echo "$ac_t""yes" 1>&6
6862   lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
6863 else
6864   echo "$ac_t""no" 1>&6
6865 echo $ac_n "checking for dlopen in -lsvld""... $ac_c" 1>&6
6866 echo "configure:6867: checking for dlopen in -lsvld" >&5
6867 ac_lib_var=`echo svld'_'dlopen | sed 'y%./+-:%__p__%'`
6868 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6869   echo $ac_n "(cached) $ac_c" 1>&6
6870 else
6871   ac_save_LIBS="$LIBS"
6872 LIBS="-lsvld  $LIBS"
6873 cat > conftest.$ac_ext <<EOF
6874 #line 6875 "configure"
6875 #include "confdefs.h"
6876 /* Override any gcc2 internal prototype to avoid an error.  */
6877 /* We use char because int might match the return type of a gcc2
6878     builtin and then its argument prototype would still apply.  */
6879 char dlopen();
6880
6881 int main() {
6882 dlopen()
6883 ; return 0; }
6884 EOF
6885 if { (eval echo configure:6886: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6886   rm -rf conftest*
6887   eval "ac_cv_lib_$ac_lib_var=yes"
6888 else
6889   echo "configure: failed program was:" >&5
6890   cat conftest.$ac_ext >&5
6891   rm -rf conftest*
6892   eval "ac_cv_lib_$ac_lib_var=no"
6893 fi
6894 rm -f conftest*
6895 LIBS="$ac_save_LIBS"
6896
6897 fi
6898 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6899   echo "$ac_t""yes" 1>&6
6900   lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"
6901 else
6902   echo "$ac_t""no" 1>&6
6903 echo $ac_n "checking for dld_link in -ldld""... $ac_c" 1>&6
6904 echo "configure:6905: checking for dld_link in -ldld" >&5
6905 ac_lib_var=`echo dld'_'dld_link | sed 'y%./+-:%__p__%'`
6906 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6907   echo $ac_n "(cached) $ac_c" 1>&6
6908 else
6909   ac_save_LIBS="$LIBS"
6910 LIBS="-ldld  $LIBS"
6911 cat > conftest.$ac_ext <<EOF
6912 #line 6913 "configure"
6913 #include "confdefs.h"
6914 /* Override any gcc2 internal prototype to avoid an error.  */
6915 /* We use char because int might match the return type of a gcc2
6916     builtin and then its argument prototype would still apply.  */
6917 char dld_link();
6918
6919 int main() {
6920 dld_link()
6921 ; return 0; }
6922 EOF
6923 if { (eval echo configure:6924: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6924   rm -rf conftest*
6925   eval "ac_cv_lib_$ac_lib_var=yes"
6926 else
6927   echo "configure: failed program was:" >&5
6928   cat conftest.$ac_ext >&5
6929   rm -rf conftest*
6930   eval "ac_cv_lib_$ac_lib_var=no"
6931 fi
6932 rm -f conftest*
6933 LIBS="$ac_save_LIBS"
6934
6935 fi
6936 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6937   echo "$ac_t""yes" 1>&6
6938   lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"
6939 else
6940   echo "$ac_t""no" 1>&6
6941 fi
6942
6943               
6944 fi
6945
6946             
6947 fi
6948
6949           
6950 fi
6951
6952         
6953 fi
6954
6955       
6956 fi
6957
6958     ;;
6959   esac
6960
6961   if test "x$lt_cv_dlopen" != xno; then
6962     enable_dlopen=yes
6963   else
6964     enable_dlopen=no
6965   fi
6966
6967   case $lt_cv_dlopen in
6968   dlopen)
6969     save_CPPFLAGS="$CPPFLAGS"
6970         test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
6971
6972     save_LDFLAGS="$LDFLAGS"
6973     eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
6974
6975     save_LIBS="$LIBS"
6976     LIBS="$lt_cv_dlopen_libs $LIBS"
6977
6978     echo $ac_n "checking whether a program can dlopen itself""... $ac_c" 1>&6
6979 echo "configure:6980: checking whether a program can dlopen itself" >&5
6980 if eval "test \"\${lt_cv_dlopen_self+set}\" = set"; then
6981   echo $ac_n "(cached) $ac_c" 1>&6
6982 else
6983           if test "$cross_compiling" = yes; then :
6984   lt_cv_dlopen_self=cross
6985 else
6986     lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
6987   lt_status=$lt_dlunknown
6988   cat > conftest.$ac_ext <<EOF
6989 #line 6990 "configure"
6990 #include "confdefs.h"
6991
6992 #if HAVE_DLFCN_H
6993 #include <dlfcn.h>
6994 #endif
6995
6996 #include <stdio.h>
6997
6998 #ifdef RTLD_GLOBAL
6999 #  define LT_DLGLOBAL           RTLD_GLOBAL
7000 #else
7001 #  ifdef DL_GLOBAL
7002 #    define LT_DLGLOBAL         DL_GLOBAL
7003 #  else
7004 #    define LT_DLGLOBAL         0
7005 #  endif
7006 #endif
7007
7008 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
7009    find out it does not work in some platform. */
7010 #ifndef LT_DLLAZY_OR_NOW
7011 #  ifdef RTLD_LAZY
7012 #    define LT_DLLAZY_OR_NOW            RTLD_LAZY
7013 #  else
7014 #    ifdef DL_LAZY
7015 #      define LT_DLLAZY_OR_NOW          DL_LAZY
7016 #    else
7017 #      ifdef RTLD_NOW
7018 #        define LT_DLLAZY_OR_NOW        RTLD_NOW
7019 #      else
7020 #        ifdef DL_NOW
7021 #          define LT_DLLAZY_OR_NOW      DL_NOW
7022 #        else
7023 #          define LT_DLLAZY_OR_NOW      0
7024 #        endif
7025 #      endif
7026 #    endif
7027 #  endif
7028 #endif
7029
7030 #ifdef __cplusplus
7031 extern "C" void exit (int);
7032 #endif
7033
7034 void fnord() { int i=42;}
7035 int main ()
7036 {
7037   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
7038   int status = $lt_dlunknown;
7039
7040   if (self)
7041     {
7042       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
7043       else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
7044       /* dlclose (self); */
7045     }
7046
7047     exit (status);
7048 }
7049 EOF
7050   if { (eval echo configure:7051: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} 2>/dev/null; then
7051     (./conftest; exit; ) 2>/dev/null
7052     lt_status=$?
7053     case x$lt_status in
7054       x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;;
7055       x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;;
7056       x$lt_unknown|x*) lt_cv_dlopen_self=no ;;
7057     esac
7058   else :
7059     # compilation failed
7060     lt_cv_dlopen_self=no
7061   fi
7062 fi
7063 rm -fr conftest*
7064
7065     
7066 fi
7067
7068 echo "$ac_t""$lt_cv_dlopen_self" 1>&6
7069
7070     if test "x$lt_cv_dlopen_self" = xyes; then
7071       LDFLAGS="$LDFLAGS $link_static_flag"
7072       echo $ac_n "checking whether a statically linked program can dlopen itself""... $ac_c" 1>&6
7073 echo "configure:7074: checking whether a statically linked program can dlopen itself" >&5
7074 if eval "test \"\${lt_cv_dlopen_self_static+set}\" = set"; then
7075   echo $ac_n "(cached) $ac_c" 1>&6
7076 else
7077           if test "$cross_compiling" = yes; then :
7078   lt_cv_dlopen_self_static=cross
7079 else
7080     lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
7081   lt_status=$lt_dlunknown
7082   cat > conftest.$ac_ext <<EOF
7083 #line 7084 "configure"
7084 #include "confdefs.h"
7085
7086 #if HAVE_DLFCN_H
7087 #include <dlfcn.h>
7088 #endif
7089
7090 #include <stdio.h>
7091
7092 #ifdef RTLD_GLOBAL
7093 #  define LT_DLGLOBAL           RTLD_GLOBAL
7094 #else
7095 #  ifdef DL_GLOBAL
7096 #    define LT_DLGLOBAL         DL_GLOBAL
7097 #  else
7098 #    define LT_DLGLOBAL         0
7099 #  endif
7100 #endif
7101
7102 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
7103    find out it does not work in some platform. */
7104 #ifndef LT_DLLAZY_OR_NOW
7105 #  ifdef RTLD_LAZY
7106 #    define LT_DLLAZY_OR_NOW            RTLD_LAZY
7107 #  else
7108 #    ifdef DL_LAZY
7109 #      define LT_DLLAZY_OR_NOW          DL_LAZY
7110 #    else
7111 #      ifdef RTLD_NOW
7112 #        define LT_DLLAZY_OR_NOW        RTLD_NOW
7113 #      else
7114 #        ifdef DL_NOW
7115 #          define LT_DLLAZY_OR_NOW      DL_NOW
7116 #        else
7117 #          define LT_DLLAZY_OR_NOW      0
7118 #        endif
7119 #      endif
7120 #    endif
7121 #  endif
7122 #endif
7123
7124 #ifdef __cplusplus
7125 extern "C" void exit (int);
7126 #endif
7127
7128 void fnord() { int i=42;}
7129 int main ()
7130 {
7131   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
7132   int status = $lt_dlunknown;
7133
7134   if (self)
7135     {
7136       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
7137       else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
7138       /* dlclose (self); */
7139     }
7140
7141     exit (status);
7142 }
7143 EOF
7144   if { (eval echo configure:7145: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} 2>/dev/null; then
7145     (./conftest; exit; ) 2>/dev/null
7146     lt_status=$?
7147     case x$lt_status in
7148       x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;;
7149       x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;;
7150       x$lt_unknown|x*) lt_cv_dlopen_self_static=no ;;
7151     esac
7152   else :
7153     # compilation failed
7154     lt_cv_dlopen_self_static=no
7155   fi
7156 fi
7157 rm -fr conftest*
7158
7159       
7160 fi
7161
7162 echo "$ac_t""$lt_cv_dlopen_self_static" 1>&6
7163     fi
7164
7165     CPPFLAGS="$save_CPPFLAGS"
7166     LDFLAGS="$save_LDFLAGS"
7167     LIBS="$save_LIBS"
7168     ;;
7169   esac
7170
7171   case $lt_cv_dlopen_self in
7172   yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
7173   *) enable_dlopen_self=unknown ;;
7174   esac
7175
7176   case $lt_cv_dlopen_self_static in
7177   yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
7178   *) enable_dlopen_self_static=unknown ;;
7179   esac
7180 fi
7181
7182
7183 if test "$enable_shared" = yes && test "$GCC" = yes; then
7184   case $archive_cmds in
7185   *'~'*)
7186     # FIXME: we may have to deal with multi-command sequences.
7187     ;;
7188   '$CC '*)
7189     # Test whether the compiler implicitly links with -lc since on some
7190     # systems, -lgcc has to come before -lc. If gcc already passes -lc
7191     # to ld, don't add -lc before -lgcc.
7192     echo $ac_n "checking whether -lc should be explicitly linked in""... $ac_c" 1>&6
7193 echo "configure:7194: checking whether -lc should be explicitly linked in" >&5
7194     if eval "test \"\${lt_cv_archive_cmds_need_lc+set}\" = set"; then
7195   echo $ac_n "(cached) $ac_c" 1>&6
7196 else
7197   $rm conftest*
7198     echo 'static int dummy;' > conftest.$ac_ext
7199
7200     if { (eval echo configure:7201: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7201       soname=conftest
7202       lib=conftest
7203       libobjs=conftest.$ac_objext
7204       deplibs=
7205       wl=$lt_cv_prog_cc_wl
7206       compiler_flags=-v
7207       linker_flags=-v
7208       verstring=
7209       output_objdir=.
7210       libname=conftest
7211       save_allow_undefined_flag=$allow_undefined_flag
7212       allow_undefined_flag=
7213       if { (eval echo configure:7214: \"$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; }
7214       then
7215         lt_cv_archive_cmds_need_lc=no
7216       else
7217         lt_cv_archive_cmds_need_lc=yes
7218       fi
7219       allow_undefined_flag=$save_allow_undefined_flag
7220     else
7221       cat conftest.err 1>&5
7222     fi
7223 fi
7224
7225     echo "$ac_t""$lt_cv_archive_cmds_need_lc" 1>&6
7226     ;;
7227   esac
7228 fi
7229 need_lc=${lt_cv_archive_cmds_need_lc-yes}
7230
7231 # The second clause should only fire when bootstrapping the
7232 # libtool distribution, otherwise you forgot to ship ltmain.sh
7233 # with your package, and you will get complaints that there are
7234 # no rules to generate ltmain.sh.
7235 if test -f "$ltmain"; then
7236   :
7237 else
7238   # If there is no Makefile yet, we rely on a make rule to execute
7239   # `config.status --recheck' to rerun these tests and create the
7240   # libtool script then.
7241   test -f Makefile && make "$ltmain"
7242 fi
7243
7244 if test -f "$ltmain"; then
7245   trap "$rm \"${ofile}T\"; exit 1" 1 2 15
7246   $rm -f "${ofile}T"
7247
7248   echo creating $ofile
7249
7250   # Now quote all the things that may contain metacharacters while being
7251   # careful not to overquote the AC_SUBSTed values.  We take copies of the
7252   # variables and quote the copies for generation of the libtool script.
7253   for var in echo old_CC old_CFLAGS SED \
7254     AR AR_FLAGS CC LD LN_S NM SHELL \
7255     reload_flag reload_cmds wl \
7256     pic_flag link_static_flag no_builtin_flag export_dynamic_flag_spec \
7257     thread_safe_flag_spec whole_archive_flag_spec libname_spec \
7258     library_names_spec soname_spec \
7259     RANLIB old_archive_cmds old_archive_from_new_cmds old_postinstall_cmds \
7260     old_postuninstall_cmds archive_cmds archive_expsym_cmds postinstall_cmds \
7261     postuninstall_cmds extract_expsyms_cmds old_archive_from_expsyms_cmds \
7262     old_striplib striplib file_magic_cmd export_symbols_cmds \
7263     deplibs_check_method allow_undefined_flag no_undefined_flag \
7264     finish_cmds finish_eval global_symbol_pipe global_symbol_to_cdecl \
7265     global_symbol_to_c_name_address \
7266     hardcode_libdir_flag_spec hardcode_libdir_separator  \
7267     sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
7268     compiler_c_o compiler_o_lo need_locks exclude_expsyms include_expsyms; do
7269
7270     case $var in
7271     reload_cmds | old_archive_cmds | old_archive_from_new_cmds | \
7272     old_postinstall_cmds | old_postuninstall_cmds | \
7273     export_symbols_cmds | archive_cmds | archive_expsym_cmds | \
7274     extract_expsyms_cmds | old_archive_from_expsyms_cmds | \
7275     postinstall_cmds | postuninstall_cmds | \
7276     finish_cmds | sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
7277       # Double-quote double-evaled strings.
7278       eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
7279       ;;
7280     *)
7281       eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
7282       ;;
7283     esac
7284   done
7285
7286   cat <<__EOF__ > "${ofile}T"
7287 #! $SHELL
7288
7289 # `$echo "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
7290 # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
7291 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
7292 #
7293 # Copyright (C) 1996-2000 Free Software Foundation, Inc.
7294 # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
7295 #
7296 # This program is free software; you can redistribute it and/or modify
7297 # it under the terms of the GNU General Public License as published by
7298 # the Free Software Foundation; either version 2 of the License, or
7299 # (at your option) any later version.
7300 #
7301 # This program is distributed in the hope that it will be useful, but
7302 # WITHOUT ANY WARRANTY; without even the implied warranty of
7303 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
7304 # General Public License for more details.
7305 #
7306 # You should have received a copy of the GNU General Public License
7307 # along with this program; if not, write to the Free Software
7308 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
7309 #
7310 # As a special exception to the GNU General Public License, if you
7311 # distribute this file as part of a program that contains a
7312 # configuration script generated by Autoconf, you may include it under
7313 # the same distribution terms that you use for the rest of that program.
7314
7315 # A sed that does not truncate output.
7316 SED=$lt_SED
7317
7318 # Sed that helps us avoid accidentally triggering echo(1) options like -n.
7319 Xsed="${SED} -e s/^X//"
7320
7321 # The HP-UX ksh and POSIX shell print the target directory to stdout
7322 # if CDPATH is set.
7323 if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
7324
7325 # ### BEGIN LIBTOOL CONFIG
7326
7327 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
7328
7329 # Shell to use when invoking shell scripts.
7330 SHELL=$lt_SHELL
7331
7332 # Whether or not to build shared libraries.
7333 build_libtool_libs=$enable_shared
7334
7335 # Whether or not to build static libraries.
7336 build_old_libs=$enable_static
7337
7338 # Whether or not to add -lc for building shared libraries.
7339 build_libtool_need_lc=$need_lc
7340
7341 # Whether or not to optimize for fast installation.
7342 fast_install=$enable_fast_install
7343
7344 # The host system.
7345 host_alias=$host_alias
7346 host=$host
7347
7348 # An echo program that does not interpret backslashes.
7349 echo=$lt_echo
7350
7351 # The archiver.
7352 AR=$lt_AR
7353 AR_FLAGS=$lt_AR_FLAGS
7354
7355 # The default C compiler.
7356 CC=$lt_CC
7357
7358 # Is the compiler the GNU C compiler?
7359 with_gcc=$GCC
7360
7361 # The linker used to build libraries.
7362 LD=$lt_LD
7363
7364 # Whether we need hard or soft links.
7365 LN_S=$lt_LN_S
7366
7367 # A BSD-compatible nm program.
7368 NM=$lt_NM
7369
7370 # A symbol stripping program
7371 STRIP=$STRIP
7372
7373 # Used to examine libraries when file_magic_cmd begins "file"
7374 MAGIC_CMD=$MAGIC_CMD
7375
7376 # Used on cygwin: DLL creation program.
7377 DLLTOOL="$DLLTOOL"
7378
7379 # Used on cygwin: object dumper.
7380 OBJDUMP="$OBJDUMP"
7381
7382 # Used on cygwin: assembler.
7383 AS="$AS"
7384
7385 # The name of the directory that contains temporary libtool files.
7386 objdir=$objdir
7387
7388 # How to create reloadable object files.
7389 reload_flag=$lt_reload_flag
7390 reload_cmds=$lt_reload_cmds
7391
7392 # How to pass a linker flag through the compiler.
7393 wl=$lt_wl
7394
7395 # Object file suffix (normally "o").
7396 objext="$ac_objext"
7397
7398 # Old archive suffix (normally "a").
7399 libext="$libext"
7400
7401 # Executable file suffix (normally "").
7402 exeext="$exeext"
7403
7404 # Additional compiler flags for building library objects.
7405 pic_flag=$lt_pic_flag
7406 pic_mode=$pic_mode
7407
7408 # Does compiler simultaneously support -c and -o options?
7409 compiler_c_o=$lt_compiler_c_o
7410
7411 # Can we write directly to a .lo ?
7412 compiler_o_lo=$lt_compiler_o_lo
7413
7414 # Must we lock files when doing compilation ?
7415 need_locks=$lt_need_locks
7416
7417 # Do we need the lib prefix for modules?
7418 need_lib_prefix=$need_lib_prefix
7419
7420 # Do we need a version for libraries?
7421 need_version=$need_version
7422
7423 # Whether dlopen is supported.
7424 dlopen_support=$enable_dlopen
7425
7426 # Whether dlopen of programs is supported.
7427 dlopen_self=$enable_dlopen_self
7428
7429 # Whether dlopen of statically linked programs is supported.
7430 dlopen_self_static=$enable_dlopen_self_static
7431
7432 # Compiler flag to prevent dynamic linking.
7433 link_static_flag=$lt_link_static_flag
7434
7435 # Compiler flag to turn off builtin functions.
7436 no_builtin_flag=$lt_no_builtin_flag
7437
7438 # Compiler flag to allow reflexive dlopens.
7439 export_dynamic_flag_spec=$lt_export_dynamic_flag_spec
7440
7441 # Compiler flag to generate shared objects directly from archives.
7442 whole_archive_flag_spec=$lt_whole_archive_flag_spec
7443
7444 # Compiler flag to generate thread-safe objects.
7445 thread_safe_flag_spec=$lt_thread_safe_flag_spec
7446
7447 # Library versioning type.
7448 version_type=$version_type
7449
7450 # Format of library name prefix.
7451 libname_spec=$lt_libname_spec
7452
7453 # List of archive names.  First name is the real one, the rest are links.
7454 # The last name is the one that the linker finds with -lNAME.
7455 library_names_spec=$lt_library_names_spec
7456
7457 # The coded name of the library, if different from the real name.
7458 soname_spec=$lt_soname_spec
7459
7460 # Commands used to build and install an old-style archive.
7461 RANLIB=$lt_RANLIB
7462 old_archive_cmds=$lt_old_archive_cmds
7463 old_postinstall_cmds=$lt_old_postinstall_cmds
7464 old_postuninstall_cmds=$lt_old_postuninstall_cmds
7465
7466 # Create an old-style archive from a shared archive.
7467 old_archive_from_new_cmds=$lt_old_archive_from_new_cmds
7468
7469 # Create a temporary old-style archive to link instead of a shared archive.
7470 old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds
7471
7472 # Commands used to build and install a shared archive.
7473 archive_cmds=$lt_archive_cmds
7474 archive_expsym_cmds=$lt_archive_expsym_cmds
7475 postinstall_cmds=$lt_postinstall_cmds
7476 postuninstall_cmds=$lt_postuninstall_cmds
7477
7478 # Commands to strip libraries.
7479 old_striplib=$lt_old_striplib
7480 striplib=$lt_striplib
7481
7482 # Method to check whether dependent libraries are shared objects.
7483 deplibs_check_method=$lt_deplibs_check_method
7484
7485 # Command to use when deplibs_check_method == file_magic.
7486 file_magic_cmd=$lt_file_magic_cmd
7487
7488 # Flag that allows shared libraries with undefined symbols to be built.
7489 allow_undefined_flag=$lt_allow_undefined_flag
7490
7491 # Flag that forces no undefined symbols.
7492 no_undefined_flag=$lt_no_undefined_flag
7493
7494 # Commands used to finish a libtool library installation in a directory.
7495 finish_cmds=$lt_finish_cmds
7496
7497 # Same as above, but a single script fragment to be evaled but not shown.
7498 finish_eval=$lt_finish_eval
7499
7500 # Take the output of nm and produce a listing of raw symbols and C names.
7501 global_symbol_pipe=$lt_global_symbol_pipe
7502
7503 # Transform the output of nm in a proper C declaration
7504 global_symbol_to_cdecl=$lt_global_symbol_to_cdecl
7505
7506 # Transform the output of nm in a C name address pair
7507 global_symbol_to_c_name_address=$lt_global_symbol_to_c_name_address
7508
7509 # This is the shared library runtime path variable.
7510 runpath_var=$runpath_var
7511
7512 # This is the shared library path variable.
7513 shlibpath_var=$shlibpath_var
7514
7515 # Is shlibpath searched before the hard-coded library search path?
7516 shlibpath_overrides_runpath=$shlibpath_overrides_runpath
7517
7518 # How to hardcode a shared library path into an executable.
7519 hardcode_action=$hardcode_action
7520
7521 # Whether we should hardcode library paths into libraries.
7522 hardcode_into_libs=$hardcode_into_libs
7523
7524 # Flag to hardcode \$libdir into a binary during linking.
7525 # This must work even if \$libdir does not exist.
7526 hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
7527
7528 # Whether we need a single -rpath flag with a separated argument.
7529 hardcode_libdir_separator=$lt_hardcode_libdir_separator
7530
7531 # Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
7532 # resulting binary.
7533 hardcode_direct=$hardcode_direct
7534
7535 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
7536 # resulting binary.
7537 hardcode_minus_L=$hardcode_minus_L
7538
7539 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
7540 # the resulting binary.
7541 hardcode_shlibpath_var=$hardcode_shlibpath_var
7542
7543 # Variables whose values should be saved in libtool wrapper scripts and
7544 # restored at relink time.
7545 variables_saved_for_relink="$variables_saved_for_relink"
7546
7547 # Whether libtool must link a program against all its dependency libraries.
7548 link_all_deplibs=$link_all_deplibs
7549
7550 # Compile-time system search path for libraries
7551 sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
7552
7553 # Run-time system search path for libraries
7554 sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
7555
7556 # Fix the shell variable \$srcfile for the compiler.
7557 fix_srcfile_path="$fix_srcfile_path"
7558
7559 # Set to yes if exported symbols are required.
7560 always_export_symbols=$always_export_symbols
7561
7562 # The commands to list exported symbols.
7563 export_symbols_cmds=$lt_export_symbols_cmds
7564
7565 # The commands to extract the exported symbol list from a shared archive.
7566 extract_expsyms_cmds=$lt_extract_expsyms_cmds
7567
7568 # Symbols that should not be listed in the preloaded symbols.
7569 exclude_expsyms=$lt_exclude_expsyms
7570
7571 # Symbols that must always be exported.
7572 include_expsyms=$lt_include_expsyms
7573
7574 # ### END LIBTOOL CONFIG
7575
7576 __EOF__
7577
7578   case $host_os in
7579   aix3*)
7580     cat <<\EOF >> "${ofile}T"
7581
7582 # AIX sometimes has problems with the GCC collect2 program.  For some
7583 # reason, if we set the COLLECT_NAMES environment variable, the problems
7584 # vanish in a puff of smoke.
7585 if test "X${COLLECT_NAMES+set}" != Xset; then
7586   COLLECT_NAMES=
7587   export COLLECT_NAMES
7588 fi
7589 EOF
7590     ;;
7591   esac
7592
7593   case $host_os in
7594   cygwin* | mingw* | pw32* | os2*)
7595     cat <<'EOF' >> "${ofile}T"
7596       # This is a source program that is used to create dlls on Windows
7597       # Don't remove nor modify the starting and closing comments
7598 # /* ltdll.c starts here */
7599 # #define WIN32_LEAN_AND_MEAN
7600 # #include <windows.h>
7601 # #undef WIN32_LEAN_AND_MEAN
7602 # #include <stdio.h>
7603 #
7604 # #ifndef __CYGWIN__
7605 # #  ifdef __CYGWIN32__
7606 # #    define __CYGWIN__ __CYGWIN32__
7607 # #  endif
7608 # #endif
7609 #
7610 # #ifdef __cplusplus
7611 # extern "C" {
7612 # #endif
7613 # BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
7614 # #ifdef __cplusplus
7615 # }
7616 # #endif
7617 #
7618 # #ifdef __CYGWIN__
7619 # #include <cygwin/cygwin_dll.h>
7620 # DECLARE_CYGWIN_DLL( DllMain );
7621 # #endif
7622 # HINSTANCE __hDllInstance_base;
7623 #
7624 # BOOL APIENTRY
7625 # DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
7626 # {
7627 #   __hDllInstance_base = hInst;
7628 #   return TRUE;
7629 # }
7630 # /* ltdll.c ends here */
7631         # This is a source program that is used to create import libraries
7632         # on Windows for dlls which lack them. Don't remove nor modify the
7633         # starting and closing comments
7634 # /* impgen.c starts here */
7635 # /*   Copyright (C) 1999-2000 Free Software Foundation, Inc.
7636 #
7637 #  This file is part of GNU libtool.
7638 #
7639 #  This program is free software; you can redistribute it and/or modify
7640 #  it under the terms of the GNU General Public License as published by
7641 #  the Free Software Foundation; either version 2 of the License, or
7642 #  (at your option) any later version.
7643 #
7644 #  This program is distributed in the hope that it will be useful,
7645 #  but WITHOUT ANY WARRANTY; without even the implied warranty of
7646 #  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
7647 #  GNU General Public License for more details.
7648 #
7649 #  You should have received a copy of the GNU General Public License
7650 #  along with this program; if not, write to the Free Software
7651 #  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
7652 #  */
7653 #
7654 # #include <stdio.h>            /* for printf() */
7655 # #include <unistd.h>           /* for open(), lseek(), read() */
7656 # #include <fcntl.h>            /* for O_RDONLY, O_BINARY */
7657 # #include <string.h>           /* for strdup() */
7658 #
7659 # /* O_BINARY isn't required (or even defined sometimes) under Unix */
7660 # #ifndef O_BINARY
7661 # #define O_BINARY 0
7662 # #endif
7663 #
7664 # static unsigned int
7665 # pe_get16 (fd, offset)
7666 #      int fd;
7667 #      int offset;
7668 # {
7669 #   unsigned char b[2];
7670 #   lseek (fd, offset, SEEK_SET);
7671 #   read (fd, b, 2);
7672 #   return b[0] + (b[1]<<8);
7673 # }
7674 #
7675 # static unsigned int
7676 # pe_get32 (fd, offset)
7677 #     int fd;
7678 #     int offset;
7679 # {
7680 #   unsigned char b[4];
7681 #   lseek (fd, offset, SEEK_SET);
7682 #   read (fd, b, 4);
7683 #   return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
7684 # }
7685 #
7686 # static unsigned int
7687 # pe_as32 (ptr)
7688 #      void *ptr;
7689 # {
7690 #   unsigned char *b = ptr;
7691 #   return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
7692 # }
7693 #
7694 # int
7695 # main (argc, argv)
7696 #     int argc;
7697 #     char *argv[];
7698 # {
7699 #     int dll;
7700 #     unsigned long pe_header_offset, opthdr_ofs, num_entries, i;
7701 #     unsigned long export_rva, export_size, nsections, secptr, expptr;
7702 #     unsigned long name_rvas, nexp;
7703 #     unsigned char *expdata, *erva;
7704 #     char *filename, *dll_name;
7705 #
7706 #     filename = argv[1];
7707 #
7708 #     dll = open(filename, O_RDONLY|O_BINARY);
7709 #     if (dll < 1)
7710 #       return 1;
7711 #
7712 #     dll_name = filename;
7713 #
7714 #     for (i=0; filename[i]; i++)
7715 #       if (filename[i] == '/' || filename[i] == '\\'  || filename[i] == ':')
7716 #           dll_name = filename + i +1;
7717 #
7718 #     pe_header_offset = pe_get32 (dll, 0x3c);
7719 #     opthdr_ofs = pe_header_offset + 4 + 20;
7720 #     num_entries = pe_get32 (dll, opthdr_ofs + 92);
7721 #
7722 #     if (num_entries < 1) /* no exports */
7723 #       return 1;
7724 #
7725 #     export_rva = pe_get32 (dll, opthdr_ofs + 96);
7726 #     export_size = pe_get32 (dll, opthdr_ofs + 100);
7727 #     nsections = pe_get16 (dll, pe_header_offset + 4 +2);
7728 #     secptr = (pe_header_offset + 4 + 20 +
7729 #             pe_get16 (dll, pe_header_offset + 4 + 16));
7730 #
7731 #     expptr = 0;
7732 #     for (i = 0; i < nsections; i++)
7733 #     {
7734 #       char sname[8];
7735 #       unsigned long secptr1 = secptr + 40 * i;
7736 #       unsigned long vaddr = pe_get32 (dll, secptr1 + 12);
7737 #       unsigned long vsize = pe_get32 (dll, secptr1 + 16);
7738 #       unsigned long fptr = pe_get32 (dll, secptr1 + 20);
7739 #       lseek(dll, secptr1, SEEK_SET);
7740 #       read(dll, sname, 8);
7741 #       if (vaddr <= export_rva && vaddr+vsize > export_rva)
7742 #       {
7743 #           expptr = fptr + (export_rva - vaddr);
7744 #           if (export_rva + export_size > vaddr + vsize)
7745 #               export_size = vsize - (export_rva - vaddr);
7746 #           break;
7747 #       }
7748 #     }
7749 #
7750 #     expdata = (unsigned char*)malloc(export_size);
7751 #     lseek (dll, expptr, SEEK_SET);
7752 #     read (dll, expdata, export_size);
7753 #     erva = expdata - export_rva;
7754 #
7755 #     nexp = pe_as32 (expdata+24);
7756 #     name_rvas = pe_as32 (expdata+32);
7757 #
7758 #     printf ("EXPORTS\n");
7759 #     for (i = 0; i<nexp; i++)
7760 #     {
7761 #       unsigned long name_rva = pe_as32 (erva+name_rvas+i*4);
7762 #       printf ("\t%s @ %ld ;\n", erva+name_rva, 1+ i);
7763 #     }
7764 #
7765 #     return 0;
7766 # }
7767 # /* impgen.c ends here */
7768
7769 EOF
7770     ;;
7771   esac
7772
7773   # We use sed instead of cat because bash on DJGPP gets confused if
7774   # if finds mixed CR/LF and LF-only lines.  Since sed operates in
7775   # text mode, it properly converts lines to CR/LF.  This bash problem
7776   # is reportedly fixed, but why not run on old versions too?
7777   sed '$q' "$ltmain" >> "${ofile}T" || (rm -f "${ofile}T"; exit 1)
7778
7779   mv -f "${ofile}T" "$ofile" || \
7780     (rm -f "$ofile" && cp "${ofile}T" "$ofile" && rm -f "${ofile}T")
7781   chmod +x "$ofile"
7782 fi
7783
7784
7785
7786
7787
7788 # This can be used to rebuild libtool when needed
7789 LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
7790
7791 # Always use our own libtool.
7792 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
7793
7794 # Prevent multiple expansion
7795
7796
7797
7798 # test for ln hardlink support
7799 echo $ac_n "checking whether ln works""... $ac_c" 1>&6
7800 echo "configure:7801: checking whether ln works" >&5
7801 if eval "test \"\${ol_cv_prog_LN_H+set}\" = set"; then
7802   echo $ac_n "(cached) $ac_c" 1>&6
7803 else
7804   rm -f conftest.src conftest.dst
7805 echo "conftest" > conftest.src
7806 if ln conftest.src conftest.dst 2>/dev/null
7807 then
7808   ol_cv_prog_LN_H="ln"
7809 else
7810   ol_cv_prog_LN_H="cp"
7811 fi
7812 rm -f conftest.src conftest.dst
7813
7814 fi
7815 LN_H="$ol_cv_prog_LN_H"
7816 if test "$ol_cv_prog_LN_H" = "ln"; then
7817         echo "$ac_t""yes" 1>&6
7818 else
7819         echo "$ac_t""no" 1>&6
7820 fi
7821
7822 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
7823 echo "configure:7824: checking whether ln -s works" >&5
7824 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
7825   echo $ac_n "(cached) $ac_c" 1>&6
7826 else
7827   rm -f conftestdata
7828 if ln -s X conftestdata 2>/dev/null
7829 then
7830   rm -f conftestdata
7831   ac_cv_prog_LN_S="ln -s"
7832 else
7833   ac_cv_prog_LN_S=ln
7834 fi
7835 fi
7836 LN_S="$ac_cv_prog_LN_S"
7837 if test "$ac_cv_prog_LN_S" = "ln -s"; then
7838   echo "$ac_t""yes" 1>&6
7839 else
7840   echo "$ac_t""no" 1>&6
7841 fi
7842
7843
7844 ol_link_perl=no
7845 if test $ol_enable_perl != no ; then
7846         # Extract the first word of "perl", so it can be a program name with args.
7847 set dummy perl; ac_word=$2
7848 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
7849 echo "configure:7850: checking for $ac_word" >&5
7850 if eval "test \"\${ac_cv_path_PERLBIN+set}\" = set"; then
7851   echo $ac_n "(cached) $ac_c" 1>&6
7852 else
7853   case "$PERLBIN" in
7854   /*)
7855   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a path.
7856   ;;
7857   ?:/*)
7858   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a dos path.
7859   ;;
7860   *)
7861   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
7862   ac_dummy="$PATH"
7863   for ac_dir in $ac_dummy; do 
7864     test -z "$ac_dir" && ac_dir=.
7865     if test -f $ac_dir/$ac_word; then
7866       ac_cv_path_PERLBIN="$ac_dir/$ac_word"
7867       break
7868     fi
7869   done
7870   IFS="$ac_save_ifs"
7871   test -z "$ac_cv_path_PERLBIN" && ac_cv_path_PERLBIN="/usr/bin/perl"
7872   ;;
7873 esac
7874 fi
7875 PERLBIN="$ac_cv_path_PERLBIN"
7876 if test -n "$PERLBIN"; then
7877   echo "$ac_t""$PERLBIN" 1>&6
7878 else
7879   echo "$ac_t""no" 1>&6
7880 fi
7881
7882
7883         if test "no$PERLBIN" = "no" ; then
7884                 if test $ol_enable_perl = yes ; then
7885                         { echo "configure: error: could not locate perl" 1>&2; exit 1; }
7886                 fi
7887
7888         else
7889                 PERL_CPPFLAGS="`$PERLBIN -MExtUtils::Embed -e ccopts`"
7890                 PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e 's/ -lc / /' -e 's/ -lc$//'`"
7891
7892                 if test x"$ol_with_perl_module" = "xstatic" ; then
7893                         SLAPD_PERL_LDFLAGS="$PERL_LDFLAGS"
7894                 else
7895                         MOD_PERL_LDFLAGS="$PERL_LDFLAGS"
7896                 fi
7897                                 ol_link_perl=yes
7898         fi
7899 fi
7900
7901 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
7902 echo "configure:7903: checking how to run the C preprocessor" >&5
7903 # On Suns, sometimes $CPP names a directory.
7904 if test -n "$CPP" && test -d "$CPP"; then
7905   CPP=
7906 fi
7907 if test -z "$CPP"; then
7908 if eval "test \"\${ac_cv_prog_CPP+set}\" = set"; then
7909   echo $ac_n "(cached) $ac_c" 1>&6
7910 else
7911     # This must be in double quotes, not single quotes, because CPP may get
7912   # substituted into the Makefile and "${CC-cc}" will confuse make.
7913   CPP="${CC-cc} -E"
7914   # On the NeXT, cc -E runs the code through the compiler's parser,
7915   # not just through cpp.
7916   cat > conftest.$ac_ext <<EOF
7917 #line 7918 "configure"
7918 #include "confdefs.h"
7919 #include <assert.h>
7920 Syntax Error
7921 EOF
7922 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7923 { (eval echo configure:7924: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7924 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7925 if test -z "$ac_err"; then
7926   :
7927 else
7928   echo "$ac_err" >&5
7929   echo "configure: failed program was:" >&5
7930   cat conftest.$ac_ext >&5
7931   rm -rf conftest*
7932   CPP="${CC-cc} -E -traditional-cpp"
7933   cat > conftest.$ac_ext <<EOF
7934 #line 7935 "configure"
7935 #include "confdefs.h"
7936 #include <assert.h>
7937 Syntax Error
7938 EOF
7939 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7940 { (eval echo configure:7941: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7941 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7942 if test -z "$ac_err"; then
7943   :
7944 else
7945   echo "$ac_err" >&5
7946   echo "configure: failed program was:" >&5
7947   cat conftest.$ac_ext >&5
7948   rm -rf conftest*
7949   CPP="${CC-cc} -nologo -E"
7950   cat > conftest.$ac_ext <<EOF
7951 #line 7952 "configure"
7952 #include "confdefs.h"
7953 #include <assert.h>
7954 Syntax Error
7955 EOF
7956 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7957 { (eval echo configure:7958: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7958 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7959 if test -z "$ac_err"; then
7960   :
7961 else
7962   echo "$ac_err" >&5
7963   echo "configure: failed program was:" >&5
7964   cat conftest.$ac_ext >&5
7965   rm -rf conftest*
7966   CPP=/lib/cpp
7967 fi
7968 rm -f conftest*
7969 fi
7970 rm -f conftest*
7971 fi
7972 rm -f conftest*
7973   ac_cv_prog_CPP="$CPP"
7974 fi
7975   CPP="$ac_cv_prog_CPP"
7976 else
7977   ac_cv_prog_CPP="$CPP"
7978 fi
7979 echo "$ac_t""$CPP" 1>&6
7980
7981
7982 if test $cross_compiling = yes -a $ol_enable_x_compile = yes; then
7983         echo "configure: warning: cross compiling....  some functionality will be removed." 1>&2
7984
7985 elif test $cross_compiling = no -a $ol_enable_x_compile = yes; then
7986         echo "configure: warning: programs compiled here do run here..." 1>&2
7987         { echo "configure: error:   if not cross compiling, use --disable-x-compile." 1>&2; exit 1; }
7988
7989 elif test $cross_compiling = yes -a $ol_enable_x_compile = no; then
7990         echo "configure: warning: programs compiled here do not run here..." 1>&2
7991         { echo "configure: error:   if cross compiling,  add --enable-x-compile." 1>&2; exit 1; }
7992 fi
7993
7994
7995 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
7996 echo "configure:7997: checking for Cygwin environment" >&5
7997 if eval "test \"\${ac_cv_cygwin+set}\" = set"; then
7998   echo $ac_n "(cached) $ac_c" 1>&6
7999 else
8000   cat > conftest.$ac_ext <<EOF
8001 #line 8002 "configure"
8002 #include "confdefs.h"
8003
8004 int main() {
8005
8006 #ifndef __CYGWIN__
8007 #define __CYGWIN__ __CYGWIN32__
8008 #endif
8009 return __CYGWIN__;
8010 ; return 0; }
8011 EOF
8012 if { (eval echo configure:8013: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8013   rm -rf conftest*
8014   ac_cv_cygwin=yes
8015 else
8016   echo "configure: failed program was:" >&5
8017   cat conftest.$ac_ext >&5
8018   rm -rf conftest*
8019   ac_cv_cygwin=no
8020 fi
8021 rm -f conftest*
8022 fi
8023
8024 echo "$ac_t""$ac_cv_cygwin" 1>&6
8025 CYGWIN=
8026 test "$ac_cv_cygwin" = yes && CYGWIN=yes
8027 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
8028 echo "configure:8029: checking for mingw32 environment" >&5
8029 if eval "test \"\${ac_cv_mingw32+set}\" = set"; then
8030   echo $ac_n "(cached) $ac_c" 1>&6
8031 else
8032   cat > conftest.$ac_ext <<EOF
8033 #line 8034 "configure"
8034 #include "confdefs.h"
8035
8036 int main() {
8037 return __MINGW32__;
8038 ; return 0; }
8039 EOF
8040 if { (eval echo configure:8041: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8041   rm -rf conftest*
8042   ac_cv_mingw32=yes
8043 else
8044   echo "configure: failed program was:" >&5
8045   cat conftest.$ac_ext >&5
8046   rm -rf conftest*
8047   ac_cv_mingw32=no
8048 fi
8049 rm -f conftest*
8050 fi
8051
8052 echo "$ac_t""$ac_cv_mingw32" 1>&6
8053 MINGW32=
8054 test "$ac_cv_mingw32" = yes && MINGW32=yes
8055
8056
8057
8058 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
8059 echo "configure:8060: checking for executable suffix" >&5
8060 if eval "test \"\${ac_cv_exeext+set}\" = set"; then
8061   echo $ac_n "(cached) $ac_c" 1>&6
8062 else
8063   if test "$CYGWIN" = yes || test "$MINGW32" = yes || test "$EMXOS2" = yes; then
8064   ac_cv_exeext=.exe
8065 else
8066   rm -f conftest*
8067   echo 'int main () { return 0; }' > conftest.$ac_ext
8068   ac_cv_exeext=
8069   if { (eval echo configure:8070: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
8070     for file in conftest.*; do
8071       case $file in
8072       *.c | *.C | *.o | *.obj | *.xcoff) ;;
8073       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
8074       esac
8075     done
8076   else
8077     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
8078   fi
8079   rm -f conftest*
8080   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
8081 fi
8082 fi
8083
8084 EXEEXT=""
8085 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
8086 echo "$ac_t""${ac_cv_exeext}" 1>&6
8087 ac_exeext=$EXEEXT
8088
8089 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
8090 echo "configure:8091: checking for object suffix" >&5
8091 if eval "test \"\${ac_cv_objext+set}\" = set"; then
8092   echo $ac_n "(cached) $ac_c" 1>&6
8093 else
8094   rm -f conftest*
8095 echo 'int i = 1;' > conftest.$ac_ext
8096 if { (eval echo configure:8097: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8097   for ac_file in conftest.*; do
8098     case $ac_file in
8099     *.c) ;;
8100     *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
8101     esac
8102   done
8103 else
8104   { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
8105 fi
8106 rm -f conftest*
8107 fi
8108
8109 echo "$ac_t""$ac_cv_objext" 1>&6
8110 OBJEXT=$ac_cv_objext
8111 ac_objext=$ac_cv_objext
8112
8113
8114 cat >> confdefs.h <<EOF
8115 #define EXEEXT "${EXEEXT}"
8116 EOF
8117
8118
8119 echo $ac_n "checking for be_app in -lbe""... $ac_c" 1>&6
8120 echo "configure:8121: checking for be_app in -lbe" >&5
8121 ac_lib_var=`echo be'_'be_app | sed 'y%./+-:%__p__%'`
8122 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8123   echo $ac_n "(cached) $ac_c" 1>&6
8124 else
8125   ac_save_LIBS="$LIBS"
8126 LIBS="-lbe -lroot -lnet $LIBS"
8127 cat > conftest.$ac_ext <<EOF
8128 #line 8129 "configure"
8129 #include "confdefs.h"
8130 /* Override any gcc2 internal prototype to avoid an error.  */
8131 /* We use char because int might match the return type of a gcc2
8132     builtin and then its argument prototype would still apply.  */
8133 char be_app();
8134
8135 int main() {
8136 be_app()
8137 ; return 0; }
8138 EOF
8139 if { (eval echo configure:8140: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8140   rm -rf conftest*
8141   eval "ac_cv_lib_$ac_lib_var=yes"
8142 else
8143   echo "configure: failed program was:" >&5
8144   cat conftest.$ac_ext >&5
8145   rm -rf conftest*
8146   eval "ac_cv_lib_$ac_lib_var=no"
8147 fi
8148 rm -f conftest*
8149 LIBS="$ac_save_LIBS"
8150
8151 fi
8152 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8153   echo "$ac_t""yes" 1>&6
8154   LIBS="$LIBS -lbe -lroot -lnet"
8155 else
8156   echo "$ac_t""no" 1>&6
8157 :
8158 fi
8159
8160
8161
8162
8163
8164 echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
8165 echo "configure:8166: checking for ${CC-cc} option to accept ANSI C" >&5
8166 if eval "test \"\${am_cv_prog_cc_stdc+set}\" = set"; then
8167   echo $ac_n "(cached) $ac_c" 1>&6
8168 else
8169   am_cv_prog_cc_stdc=no
8170 ac_save_CC="$CC"
8171 # Don't try gcc -ansi; that turns off useful extensions and
8172 # breaks some systems' header files.
8173 # AIX                   -qlanglvl=ansi
8174 # Ultrix and OSF/1      -std1
8175 # HP-UX 10.20 and later -Ae
8176 # HP-UX older versions  -Aa -D_HPUX_SOURCE
8177 # SVR4                  -Xc -D__EXTENSIONS__
8178 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
8179 do
8180   CC="$ac_save_CC $ac_arg"
8181   cat > conftest.$ac_ext <<EOF
8182 #line 8183 "configure"
8183 #include "confdefs.h"
8184 #include <stdarg.h>
8185 #include <stdio.h>
8186 #include <sys/types.h>
8187 #include <sys/stat.h>
8188 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
8189 struct buf { int x; };
8190 FILE * (*rcsopen) (struct buf *, struct stat *, int);
8191 static char *e (p, i)
8192      char **p;
8193      int i;
8194 {
8195   return p[i];
8196 }
8197 static char *f (char * (*g) (char **, int), char **p, ...)
8198 {
8199   char *s;
8200   va_list v;
8201   va_start (v,p);
8202   s = g (p, va_arg (v,int));
8203   va_end (v);
8204   return s;
8205 }
8206 int test (int i, double x);
8207 struct s1 {int (*f) (int a);};
8208 struct s2 {int (*f) (double a);};
8209 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
8210 int argc;
8211 char **argv;
8212
8213 int main() {
8214
8215 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
8216
8217 ; return 0; }
8218 EOF
8219 if { (eval echo configure:8220: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8220   rm -rf conftest*
8221   am_cv_prog_cc_stdc="$ac_arg"; break
8222 else
8223   echo "configure: failed program was:" >&5
8224   cat conftest.$ac_ext >&5
8225 fi
8226 rm -f conftest*
8227 done
8228 CC="$ac_save_CC"
8229
8230 fi
8231
8232 if test -z "$am_cv_prog_cc_stdc"; then
8233   echo "$ac_t""none needed" 1>&6
8234 else
8235   echo "$ac_t""$am_cv_prog_cc_stdc" 1>&6
8236 fi
8237 case "x$am_cv_prog_cc_stdc" in
8238   x|xno) ;;
8239   *) CC="$CC $am_cv_prog_cc_stdc" ;;
8240 esac
8241
8242 if test "X${am_cv_prog_cc_stdc}" = "Xno" ; then
8243         { echo "configure: error: OpenLDAP requires compiler to support STDC constructs." 1>&2; exit 1; }
8244 fi
8245
8246 # test for make depend flag
8247 OL_MKDEP=
8248 OL_MKDEP_FLAGS=
8249 if test -z "${MKDEP}"; then
8250         OL_MKDEP="${CC-cc}"
8251         if test -z "${MKDEP_FLAGS}"; then
8252                 echo $ac_n "checking for ${OL_MKDEP} depend flag""... $ac_c" 1>&6
8253 echo "configure:8254: checking for ${OL_MKDEP} depend flag" >&5
8254 if eval "test \"\${ol_cv_mkdep+set}\" = set"; then
8255   echo $ac_n "(cached) $ac_c" 1>&6
8256 else
8257   
8258                         ol_cv_mkdep=no
8259                         for flag in "-M" "-xM"; do
8260                                 cat > conftest.c <<EOF
8261  noCode;
8262 EOF
8263                                 if { ac_try='$OL_MKDEP $flag conftest.c'; { (eval echo configure:8264: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } \
8264                                         | egrep '^conftest\.'"${ac_objext}" >/dev/null 2>&1
8265                                 then
8266                                         if test ! -f conftest."${ac_object}" ; then
8267                                                 ol_cv_mkdep=$flag
8268                                                 OL_MKDEP_FLAGS="$flag"
8269                                                 break
8270                                         fi
8271                                 fi
8272                         done
8273                         rm -f conftest*
8274                 
8275 fi
8276
8277 echo "$ac_t""$ol_cv_mkdep" 1>&6
8278         else
8279                 cc_cv_mkdep=yes
8280                 OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
8281         fi
8282 else
8283         cc_cv_mkdep=yes
8284         OL_MKDEP="${MKDEP}"
8285         OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
8286 fi
8287
8288
8289
8290 if test "${ol_cv_mkdep}" = no ; then
8291         # this will soon become an error
8292         echo "configure: warning: do not know how to generate dependencies" 1>&2
8293 fi
8294
8295 echo $ac_n "checking for afopen in -ls""... $ac_c" 1>&6
8296 echo "configure:8297: checking for afopen in -ls" >&5
8297 ac_lib_var=`echo s'_'afopen | sed 'y%./+-:%__p__%'`
8298 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8299   echo $ac_n "(cached) $ac_c" 1>&6
8300 else
8301   ac_save_LIBS="$LIBS"
8302 LIBS="-ls  $LIBS"
8303 cat > conftest.$ac_ext <<EOF
8304 #line 8305 "configure"
8305 #include "confdefs.h"
8306 /* Override any gcc2 internal prototype to avoid an error.  */
8307 /* We use char because int might match the return type of a gcc2
8308     builtin and then its argument prototype would still apply.  */
8309 char afopen();
8310
8311 int main() {
8312 afopen()
8313 ; return 0; }
8314 EOF
8315 if { (eval echo configure:8316: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8316   rm -rf conftest*
8317   eval "ac_cv_lib_$ac_lib_var=yes"
8318 else
8319   echo "configure: failed program was:" >&5
8320   cat conftest.$ac_ext >&5
8321   rm -rf conftest*
8322   eval "ac_cv_lib_$ac_lib_var=no"
8323 fi
8324 rm -f conftest*
8325 LIBS="$ac_save_LIBS"
8326
8327 fi
8328 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8329   echo "$ac_t""yes" 1>&6
8330   
8331         AUTH_LIBS=-ls
8332         cat >> confdefs.h <<\EOF
8333 #define HAVE_AIX_SECURITY 1
8334 EOF
8335
8336
8337 else
8338   echo "$ac_t""no" 1>&6
8339 fi
8340
8341
8342 case "$target" in
8343 *-ibm-openedition)
8344         ac_cv_func_getopt=no
8345         cat >> confdefs.h <<\EOF
8346 #define BOTH_STRINGS_H 1
8347 EOF
8348
8349         ;;
8350 esac
8351
8352 ol_link_modules=no
8353 if test $ol_enable_modules != no ; then
8354         for ac_hdr in ltdl.h
8355 do
8356 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8357 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8358 echo "configure:8359: checking for $ac_hdr" >&5
8359 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
8360   echo $ac_n "(cached) $ac_c" 1>&6
8361 else
8362   cat > conftest.$ac_ext <<EOF
8363 #line 8364 "configure"
8364 #include "confdefs.h"
8365 #include <$ac_hdr>
8366 EOF
8367 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8368 { (eval echo configure:8369: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8369 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8370 if test -z "$ac_err"; then
8371   rm -rf conftest*
8372   eval "ac_cv_header_$ac_safe=yes"
8373 else
8374   echo "$ac_err" >&5
8375   echo "configure: failed program was:" >&5
8376   cat conftest.$ac_ext >&5
8377   rm -rf conftest*
8378   eval "ac_cv_header_$ac_safe=no"
8379 fi
8380 rm -f conftest*
8381 fi
8382 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8383   echo "$ac_t""yes" 1>&6
8384     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8385   cat >> confdefs.h <<EOF
8386 #define $ac_tr_hdr 1
8387 EOF
8388  
8389 else
8390   echo "$ac_t""no" 1>&6
8391 fi
8392 done
8393
8394
8395         if test $ac_cv_header_ltdl_h = no ; then
8396                 { echo "configure: error: could not locate libtool ltdl.h" 1>&2; exit 1; }
8397         fi
8398
8399         echo $ac_n "checking for lt_dlinit in -lltdl""... $ac_c" 1>&6
8400 echo "configure:8401: checking for lt_dlinit in -lltdl" >&5
8401 ac_lib_var=`echo ltdl'_'lt_dlinit | sed 'y%./+-:%__p__%'`
8402 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8403   echo $ac_n "(cached) $ac_c" 1>&6
8404 else
8405   ac_save_LIBS="$LIBS"
8406 LIBS="-lltdl  $LIBS"
8407 cat > conftest.$ac_ext <<EOF
8408 #line 8409 "configure"
8409 #include "confdefs.h"
8410 /* Override any gcc2 internal prototype to avoid an error.  */
8411 /* We use char because int might match the return type of a gcc2
8412     builtin and then its argument prototype would still apply.  */
8413 char lt_dlinit();
8414
8415 int main() {
8416 lt_dlinit()
8417 ; return 0; }
8418 EOF
8419 if { (eval echo configure:8420: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8420   rm -rf conftest*
8421   eval "ac_cv_lib_$ac_lib_var=yes"
8422 else
8423   echo "configure: failed program was:" >&5
8424   cat conftest.$ac_ext >&5
8425   rm -rf conftest*
8426   eval "ac_cv_lib_$ac_lib_var=no"
8427 fi
8428 rm -f conftest*
8429 LIBS="$ac_save_LIBS"
8430
8431 fi
8432 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8433   echo "$ac_t""yes" 1>&6
8434   
8435                 MODULES_LIBS=-lltdl
8436                 cat >> confdefs.h <<\EOF
8437 #define HAVE_LIBLTDL 1
8438 EOF
8439
8440         
8441 else
8442   echo "$ac_t""no" 1>&6
8443 fi
8444
8445
8446         if test "$ac_cv_lib_ltdl_lt_dlinit" = no ; then
8447                 { echo "configure: error: could not locate libtool -lltdl" 1>&2; exit 1; }
8448         fi
8449         ol_link_modules=yes
8450 else
8451         ol_with_bdb_module=static
8452         ol_with_dnssrv_module=static
8453         ol_with_hdb_module=static
8454         ol_with_ldap_module=static
8455         ol_with_ldbm_module=static
8456         ol_with_meta_module=static
8457         ol_with_monitor_module=static
8458         ol_with_null_module=static
8459         ol_with_passwd_module=static
8460         ol_with_perl_module=static
8461         ol_with_shell_module=static
8462         ol_with_sql_module=static
8463         if test $ol_with_dyngroup = mod ; then
8464                 echo "configure: warning: building static dyngroup overlay" 1>&2
8465                 ol_with_dyngroup = yes
8466         fi
8467         if test $ol_with_proxycache = mod ; then
8468                 echo "configure: warning: building static proxycache overlay" 1>&2
8469                 ol_with_proxycache = yes
8470         fi
8471         if test $ol_with_rwm = mod ; then
8472                 echo "configure: warning: building static rwm overlay" 1>&2
8473                 ol_with_rwm = yes
8474         fi
8475 fi
8476
8477 # test for EBCDIC
8478 echo $ac_n "checking for EBCDIC""... $ac_c" 1>&6
8479 echo "configure:8480: checking for EBCDIC" >&5
8480 if eval "test \"\${ol_cv_cpp_ebcdic+set}\" = set"; then
8481   echo $ac_n "(cached) $ac_c" 1>&6
8482 else
8483   
8484         cat > conftest.$ac_ext <<EOF
8485 #line 8486 "configure"
8486 #include "confdefs.h"
8487
8488 #if !('M' == 0xd4)
8489 #include <__ASCII__/generate_error.h>
8490 #endif
8491
8492 EOF
8493 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8494 { (eval echo configure:8495: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8495 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8496 if test -z "$ac_err"; then
8497   rm -rf conftest*
8498   ol_cv_cpp_ebcdic=yes
8499 else
8500   echo "$ac_err" >&5
8501   echo "configure: failed program was:" >&5
8502   cat conftest.$ac_ext >&5
8503   rm -rf conftest*
8504   ol_cv_cpp_ebcdic=no
8505 fi
8506 rm -f conftest*
8507 fi
8508
8509 echo "$ac_t""$ol_cv_cpp_ebcdic" 1>&6
8510 if test $ol_cv_cpp_ebcdic = yes ; then
8511         cat >> confdefs.h <<\EOF
8512 #define HAVE_EBCDIC 1
8513 EOF
8514
8515 fi
8516
8517 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
8518 echo "configure:8519: checking for ANSI C header files" >&5
8519 if eval "test \"\${ol_cv_header_stdc+set}\" = set"; then
8520   echo $ac_n "(cached) $ac_c" 1>&6
8521 else
8522   cat > conftest.$ac_ext <<EOF
8523 #line 8524 "configure"
8524 #include "confdefs.h"
8525 #include <stdlib.h>
8526 #include <stdarg.h>
8527 #include <string.h>
8528 #include <float.h>
8529 EOF
8530 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8531 { (eval echo configure:8532: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8532 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8533 if test -z "$ac_err"; then
8534   rm -rf conftest*
8535   ol_cv_header_stdc=yes
8536 else
8537   echo "$ac_err" >&5
8538   echo "configure: failed program was:" >&5
8539   cat conftest.$ac_ext >&5
8540   rm -rf conftest*
8541   ol_cv_header_stdc=no
8542 fi
8543 rm -f conftest*
8544
8545 if test $ol_cv_header_stdc = yes; then
8546   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
8547 cat > conftest.$ac_ext <<EOF
8548 #line 8549 "configure"
8549 #include "confdefs.h"
8550 #include <string.h>
8551 EOF
8552 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8553   egrep "memchr" >/dev/null 2>&1; then
8554   :
8555 else
8556   rm -rf conftest*
8557   ol_cv_header_stdc=no
8558 fi
8559 rm -f conftest*
8560
8561 fi
8562
8563 if test $ol_cv_header_stdc = yes; then
8564   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
8565 cat > conftest.$ac_ext <<EOF
8566 #line 8567 "configure"
8567 #include "confdefs.h"
8568 #include <stdlib.h>
8569 EOF
8570 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8571   egrep "free" >/dev/null 2>&1; then
8572   :
8573 else
8574   rm -rf conftest*
8575   ol_cv_header_stdc=no
8576 fi
8577 rm -f conftest*
8578
8579 fi
8580
8581 if test $ol_cv_header_stdc = yes; then
8582   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
8583 if test "$cross_compiling" = yes; then
8584   :
8585 else
8586   cat > conftest.$ac_ext <<EOF
8587 #line 8588 "configure"
8588 #include "confdefs.h"
8589 #include <ctype.h>
8590 #ifndef HAVE_EBCDIC
8591 #       define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
8592 #       define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
8593 #else
8594 #       define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
8595                 || ('j' <= (c) && (c) <= 'r') \
8596                 || ('s' <= (c) && (c) <= 'z'))
8597 #       define TOUPPER(c)       (ISLOWER(c) ? ((c) | 0x40) : (c))
8598 #endif
8599 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
8600 int main () { int i; for (i = 0; i < 256; i++)
8601 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
8602 exit (0); }
8603
8604 EOF
8605 if { (eval echo configure:8606: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8606 then
8607   :
8608 else
8609   echo "configure: failed program was:" >&5
8610   cat conftest.$ac_ext >&5
8611   rm -fr conftest*
8612   ol_cv_header_stdc=no
8613 fi
8614 rm -fr conftest*
8615 fi
8616
8617 fi
8618 fi
8619
8620 echo "$ac_t""$ol_cv_header_stdc" 1>&6
8621 if test $ol_cv_header_stdc = yes; then
8622   cat >> confdefs.h <<\EOF
8623 #define STDC_HEADERS 1
8624 EOF
8625
8626 fi
8627 ac_cv_header_stdc=disable
8628
8629
8630 if test $ol_cv_header_stdc != yes; then
8631         echo "configure: warning: could not locate Standard C compliant headers" 1>&2
8632 fi
8633
8634 ac_header_dirent=no
8635 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
8636 do
8637 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8638 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
8639 echo "configure:8640: checking for $ac_hdr that defines DIR" >&5
8640 if eval "test \"\${ac_cv_header_dirent_$ac_safe+set}\" = set"; then
8641   echo $ac_n "(cached) $ac_c" 1>&6
8642 else
8643   cat > conftest.$ac_ext <<EOF
8644 #line 8645 "configure"
8645 #include "confdefs.h"
8646 #include <sys/types.h>
8647 #include <$ac_hdr>
8648 int main() {
8649 DIR *dirp = 0;
8650 ; return 0; }
8651 EOF
8652 if { (eval echo configure:8653: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8653   rm -rf conftest*
8654   eval "ac_cv_header_dirent_$ac_safe=yes"
8655 else
8656   echo "configure: failed program was:" >&5
8657   cat conftest.$ac_ext >&5
8658   rm -rf conftest*
8659   eval "ac_cv_header_dirent_$ac_safe=no"
8660 fi
8661 rm -f conftest*
8662 fi
8663 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
8664   echo "$ac_t""yes" 1>&6
8665     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8666   cat >> confdefs.h <<EOF
8667 #define $ac_tr_hdr 1
8668 EOF
8669  ac_header_dirent=$ac_hdr; break
8670 else
8671   echo "$ac_t""no" 1>&6
8672 fi
8673 done
8674 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
8675 if test $ac_header_dirent = dirent.h; then
8676 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
8677 echo "configure:8678: checking for opendir in -ldir" >&5
8678 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-:%__p__%'`
8679 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8680   echo $ac_n "(cached) $ac_c" 1>&6
8681 else
8682   ac_save_LIBS="$LIBS"
8683 LIBS="-ldir  $LIBS"
8684 cat > conftest.$ac_ext <<EOF
8685 #line 8686 "configure"
8686 #include "confdefs.h"
8687 /* Override any gcc2 internal prototype to avoid an error.  */
8688 /* We use char because int might match the return type of a gcc2
8689     builtin and then its argument prototype would still apply.  */
8690 char opendir();
8691
8692 int main() {
8693 opendir()
8694 ; return 0; }
8695 EOF
8696 if { (eval echo configure:8697: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8697   rm -rf conftest*
8698   eval "ac_cv_lib_$ac_lib_var=yes"
8699 else
8700   echo "configure: failed program was:" >&5
8701   cat conftest.$ac_ext >&5
8702   rm -rf conftest*
8703   eval "ac_cv_lib_$ac_lib_var=no"
8704 fi
8705 rm -f conftest*
8706 LIBS="$ac_save_LIBS"
8707
8708 fi
8709 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8710   echo "$ac_t""yes" 1>&6
8711   LIBS="$LIBS -ldir"
8712 else
8713   echo "$ac_t""no" 1>&6
8714 fi
8715
8716 else
8717 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
8718 echo "configure:8719: checking for opendir in -lx" >&5
8719 ac_lib_var=`echo x'_'opendir | sed 'y%./+-:%__p__%'`
8720 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8721   echo $ac_n "(cached) $ac_c" 1>&6
8722 else
8723   ac_save_LIBS="$LIBS"
8724 LIBS="-lx  $LIBS"
8725 cat > conftest.$ac_ext <<EOF
8726 #line 8727 "configure"
8727 #include "confdefs.h"
8728 /* Override any gcc2 internal prototype to avoid an error.  */
8729 /* We use char because int might match the return type of a gcc2
8730     builtin and then its argument prototype would still apply.  */
8731 char opendir();
8732
8733 int main() {
8734 opendir()
8735 ; return 0; }
8736 EOF
8737 if { (eval echo configure:8738: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8738   rm -rf conftest*
8739   eval "ac_cv_lib_$ac_lib_var=yes"
8740 else
8741   echo "configure: failed program was:" >&5
8742   cat conftest.$ac_ext >&5
8743   rm -rf conftest*
8744   eval "ac_cv_lib_$ac_lib_var=no"
8745 fi
8746 rm -f conftest*
8747 LIBS="$ac_save_LIBS"
8748
8749 fi
8750 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8751   echo "$ac_t""yes" 1>&6
8752   LIBS="$LIBS -lx"
8753 else
8754   echo "$ac_t""no" 1>&6
8755 fi
8756
8757 fi
8758
8759 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
8760 echo "configure:8761: checking for sys/wait.h that is POSIX.1 compatible" >&5
8761 if eval "test \"\${ac_cv_header_sys_wait_h+set}\" = set"; then
8762   echo $ac_n "(cached) $ac_c" 1>&6
8763 else
8764   cat > conftest.$ac_ext <<EOF
8765 #line 8766 "configure"
8766 #include "confdefs.h"
8767 #include <sys/types.h>
8768 #include <sys/wait.h>
8769 #ifndef WEXITSTATUS
8770 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
8771 #endif
8772 #ifndef WIFEXITED
8773 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
8774 #endif
8775 int main() {
8776 int s;
8777 wait (&s);
8778 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
8779 ; return 0; }
8780 EOF
8781 if { (eval echo configure:8782: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8782   rm -rf conftest*
8783   ac_cv_header_sys_wait_h=yes
8784 else
8785   echo "configure: failed program was:" >&5
8786   cat conftest.$ac_ext >&5
8787   rm -rf conftest*
8788   ac_cv_header_sys_wait_h=no
8789 fi
8790 rm -f conftest*
8791 fi
8792
8793 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
8794 if test $ac_cv_header_sys_wait_h = yes; then
8795   cat >> confdefs.h <<\EOF
8796 #define HAVE_SYS_WAIT_H 1
8797 EOF
8798
8799 fi
8800
8801 echo $ac_n "checking POSIX termios""... $ac_c" 1>&6
8802 echo "configure:8803: checking POSIX termios" >&5
8803 if eval "test \"\${am_cv_sys_posix_termios+set}\" = set"; then
8804   echo $ac_n "(cached) $ac_c" 1>&6
8805 else
8806   cat > conftest.$ac_ext <<EOF
8807 #line 8808 "configure"
8808 #include "confdefs.h"
8809 #include <sys/types.h>
8810 #include <unistd.h>
8811 #include <termios.h>
8812 int main() {
8813 /* SunOS 4.0.3 has termios.h but not the library calls.  */
8814    tcgetattr(0, 0);
8815 ; return 0; }
8816 EOF
8817 if { (eval echo configure:8818: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8818   rm -rf conftest*
8819   am_cv_sys_posix_termios=yes
8820 else
8821   echo "configure: failed program was:" >&5
8822   cat conftest.$ac_ext >&5
8823   rm -rf conftest*
8824   am_cv_sys_posix_termios=no
8825 fi
8826 rm -f conftest*
8827 fi
8828
8829 echo "$ac_t""$am_cv_sys_posix_termios" 1>&6
8830
8831
8832  echo $ac_n "checking whether use of TIOCGWINSZ requires sys/ioctl.h""... $ac_c" 1>&6
8833 echo "configure:8834: checking whether use of TIOCGWINSZ requires sys/ioctl.h" >&5
8834 if eval "test \"\${am_cv_sys_tiocgwinsz_needs_sys_ioctl_h+set}\" = set"; then
8835   echo $ac_n "(cached) $ac_c" 1>&6
8836 else
8837   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=no
8838
8839   gwinsz_in_termios_h=no
8840   if test $am_cv_sys_posix_termios = yes; then
8841     cat > conftest.$ac_ext <<EOF
8842 #line 8843 "configure"
8843 #include "confdefs.h"
8844 #include <sys/types.h>
8845 #     include <termios.h>
8846 #     ifdef TIOCGWINSZ
8847         yes
8848 #     endif
8849     
8850 EOF
8851 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8852   egrep "yes" >/dev/null 2>&1; then
8853   rm -rf conftest*
8854   gwinsz_in_termios_h=yes
8855 fi
8856 rm -f conftest*
8857
8858   fi
8859
8860   if test $gwinsz_in_termios_h = no; then
8861     cat > conftest.$ac_ext <<EOF
8862 #line 8863 "configure"
8863 #include "confdefs.h"
8864 #include <sys/types.h>
8865 #     include <sys/ioctl.h>
8866 #     ifdef TIOCGWINSZ
8867         yes
8868 #     endif
8869     
8870 EOF
8871 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8872   egrep "yes" >/dev/null 2>&1; then
8873   rm -rf conftest*
8874   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=yes
8875 fi
8876 rm -f conftest*
8877
8878   fi
8879   
8880 fi
8881
8882 echo "$ac_t""$am_cv_sys_tiocgwinsz_needs_sys_ioctl_h" 1>&6
8883   if test $am_cv_sys_tiocgwinsz_needs_sys_ioctl_h = yes; then
8884     cat >> confdefs.h <<\EOF
8885 #define GWINSZ_IN_SYS_IOCTL 1
8886 EOF
8887
8888   fi
8889
8890 if test $am_cv_sys_posix_termios = yes ; then
8891         cat >> confdefs.h <<\EOF
8892 #define HAVE_POSIX_TERMIOS 1
8893 EOF
8894
8895 fi
8896
8897 for ac_hdr in \
8898         arpa/inet.h             \
8899         arpa/nameser.h  \
8900         assert.h                \
8901         bits/types.h    \
8902         conio.h                 \
8903         crypt.h                 \
8904         direct.h                \
8905         errno.h                 \
8906         fcntl.h                 \
8907         filio.h                 \
8908         getopt.h                \
8909         grp.h                   \
8910         io.h                    \
8911         libutil.h               \
8912         limits.h                \
8913         locale.h                \
8914         netinet/tcp.h   \
8915         malloc.h                \
8916         memory.h                \
8917         psap.h                  \
8918         pwd.h                   \
8919         process.h               \
8920         resolv.h                \
8921         sgtty.h                 \
8922         shadow.h                \
8923         stddef.h                \
8924         string.h                \
8925         strings.h               \
8926         sysexits.h              \
8927         sys/file.h              \
8928         sys/filio.h             \
8929         sys/errno.h             \
8930         sys/ioctl.h             \
8931         sys/param.h             \
8932         sys/resource.h  \
8933         sys/select.h    \
8934         sys/socket.h    \
8935         sys/stat.h              \
8936         sys/syslog.h    \
8937         sys/time.h              \
8938         sys/types.h             \
8939         sys/ucred.h             \
8940         sys/uio.h               \
8941         syslog.h                \
8942         termios.h               \
8943         unistd.h                \
8944         winsock.h               \
8945         winsock2.h              \
8946
8947 do
8948 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8949 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8950 echo "configure:8951: checking for $ac_hdr" >&5
8951 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
8952   echo $ac_n "(cached) $ac_c" 1>&6
8953 else
8954   cat > conftest.$ac_ext <<EOF
8955 #line 8956 "configure"
8956 #include "confdefs.h"
8957 #include <$ac_hdr>
8958 EOF
8959 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8960 { (eval echo configure:8961: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8961 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8962 if test -z "$ac_err"; then
8963   rm -rf conftest*
8964   eval "ac_cv_header_$ac_safe=yes"
8965 else
8966   echo "$ac_err" >&5
8967   echo "configure: failed program was:" >&5
8968   cat conftest.$ac_ext >&5
8969   rm -rf conftest*
8970   eval "ac_cv_header_$ac_safe=no"
8971 fi
8972 rm -f conftest*
8973 fi
8974 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8975   echo "$ac_t""yes" 1>&6
8976     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8977   cat >> confdefs.h <<EOF
8978 #define $ac_tr_hdr 1
8979 EOF
8980  
8981 else
8982   echo "$ac_t""no" 1>&6
8983 fi
8984 done
8985
8986
8987
8988
8989 echo $ac_n "checking for dlopen""... $ac_c" 1>&6
8990 echo "configure:8991: checking for dlopen" >&5
8991 if eval "test \"\${ac_cv_func_dlopen+set}\" = set"; then
8992   echo $ac_n "(cached) $ac_c" 1>&6
8993 else
8994   cat > conftest.$ac_ext <<EOF
8995 #line 8996 "configure"
8996 #include "confdefs.h"
8997 /* System header to define __stub macros and hopefully few prototypes,
8998     which can conflict with char dlopen(); below.  */
8999 #include <assert.h>
9000 /* Override any gcc2 internal prototype to avoid an error.  */
9001 /* We use char because int might match the return type of a gcc2
9002     builtin and then its argument prototype would still apply.  */
9003 char dlopen();
9004 char (*f)();
9005
9006 int main() {
9007
9008 /* The GNU C library defines this for functions which it implements
9009     to always fail with ENOSYS.  Some functions are actually named
9010     something starting with __ and the normal name is an alias.  */
9011 #if defined (__stub_dlopen) || defined (__stub___dlopen)
9012 choke me
9013 #else
9014 f = dlopen;
9015 #endif
9016
9017 ; return 0; }
9018 EOF
9019 if { (eval echo configure:9020: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9020   rm -rf conftest*
9021   eval "ac_cv_func_dlopen=yes"
9022 else
9023   echo "configure: failed program was:" >&5
9024   cat conftest.$ac_ext >&5
9025   rm -rf conftest*
9026   eval "ac_cv_func_dlopen=no"
9027 fi
9028 rm -f conftest*
9029 fi
9030
9031 if eval "test \"`echo '$ac_cv_func_'dlopen`\" = yes"; then
9032   echo "$ac_t""yes" 1>&6
9033   :
9034 else
9035   echo "$ac_t""no" 1>&6
9036 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
9037 echo "configure:9038: checking for dlopen in -ldl" >&5
9038 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-:%__p__%'`
9039 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9040   echo $ac_n "(cached) $ac_c" 1>&6
9041 else
9042   ac_save_LIBS="$LIBS"
9043 LIBS="-ldl  $LIBS"
9044 cat > conftest.$ac_ext <<EOF
9045 #line 9046 "configure"
9046 #include "confdefs.h"
9047 /* Override any gcc2 internal prototype to avoid an error.  */
9048 /* We use char because int might match the return type of a gcc2
9049     builtin and then its argument prototype would still apply.  */
9050 char dlopen();
9051
9052 int main() {
9053 dlopen()
9054 ; return 0; }
9055 EOF
9056 if { (eval echo configure:9057: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9057   rm -rf conftest*
9058   eval "ac_cv_lib_$ac_lib_var=yes"
9059 else
9060   echo "configure: failed program was:" >&5
9061   cat conftest.$ac_ext >&5
9062   rm -rf conftest*
9063   eval "ac_cv_lib_$ac_lib_var=no"
9064 fi
9065 rm -f conftest*
9066 LIBS="$ac_save_LIBS"
9067
9068 fi
9069 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9070   echo "$ac_t""yes" 1>&6
9071     ac_tr_lib=HAVE_LIB`echo dl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9072     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9073   cat >> confdefs.h <<EOF
9074 #define $ac_tr_lib 1
9075 EOF
9076
9077   LIBS="-ldl $LIBS"
9078
9079 else
9080   echo "$ac_t""no" 1>&6
9081 fi
9082
9083 fi
9084
9085
9086 echo $ac_n "checking for sigset in -lV3""... $ac_c" 1>&6
9087 echo "configure:9088: checking for sigset in -lV3" >&5
9088 ac_lib_var=`echo V3'_'sigset | sed 'y%./+-:%__p__%'`
9089 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9090   echo $ac_n "(cached) $ac_c" 1>&6
9091 else
9092   ac_save_LIBS="$LIBS"
9093 LIBS="-lV3  $LIBS"
9094 cat > conftest.$ac_ext <<EOF
9095 #line 9096 "configure"
9096 #include "confdefs.h"
9097 /* Override any gcc2 internal prototype to avoid an error.  */
9098 /* We use char because int might match the return type of a gcc2
9099     builtin and then its argument prototype would still apply.  */
9100 char sigset();
9101
9102 int main() {
9103 sigset()
9104 ; return 0; }
9105 EOF
9106 if { (eval echo configure:9107: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9107   rm -rf conftest*
9108   eval "ac_cv_lib_$ac_lib_var=yes"
9109 else
9110   echo "configure: failed program was:" >&5
9111   cat conftest.$ac_ext >&5
9112   rm -rf conftest*
9113   eval "ac_cv_lib_$ac_lib_var=no"
9114 fi
9115 rm -f conftest*
9116 LIBS="$ac_save_LIBS"
9117
9118 fi
9119 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9120   echo "$ac_t""yes" 1>&6
9121     ac_tr_lib=HAVE_LIB`echo V3 | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9122     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9123   cat >> confdefs.h <<EOF
9124 #define $ac_tr_lib 1
9125 EOF
9126
9127   LIBS="-lV3 $LIBS"
9128
9129 else
9130   echo "$ac_t""no" 1>&6
9131 fi
9132
9133
9134 if test "$ac_cv_header_winsock_h" = yes; then
9135 echo $ac_n "checking for winsock""... $ac_c" 1>&6
9136 echo "configure:9137: checking for winsock" >&5
9137 if eval "test \"\${ol_cv_winsock+set}\" = set"; then
9138   echo $ac_n "(cached) $ac_c" 1>&6
9139 else
9140   save_LIBS="$LIBS"
9141 for curlib in ws2_32 wsock32; do
9142         LIBS="$LIBS -l$curlib"
9143         cat > conftest.$ac_ext <<EOF
9144 #line 9145 "configure"
9145 #include "confdefs.h"
9146 #include <winsock.h>
9147                         
9148 int main() {
9149
9150                         socket(0,0,0);
9151                         select(0,NULL,NULL,NULL,NULL);
9152                         closesocket(0);
9153                         gethostname(NULL,0);
9154                         
9155 ; return 0; }
9156 EOF
9157 if { (eval echo configure:9158: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9158   rm -rf conftest*
9159   ol_cv_winsock=yes
9160 else
9161   echo "configure: failed program was:" >&5
9162   cat conftest.$ac_ext >&5
9163   rm -rf conftest*
9164   ol_cv_winsock=no
9165 fi
9166 rm -f conftest*
9167
9168         if test $ol_cv_winsock = yes; then
9169                 cat >> confdefs.h <<\EOF
9170 #define HAVE_WINSOCK 1
9171 EOF
9172
9173                 ac_cv_func_socket=yes
9174                 ac_cv_func_select=yes
9175                 ac_cv_func_closesocket=yes
9176                 ac_cv_func_gethostname=yes
9177                 if test $curlib = ws2_32; then
9178                         ol_cv_winsock=winsock2
9179                         cat >> confdefs.h <<\EOF
9180 #define HAVE_WINSOCK2 1
9181 EOF
9182
9183                 fi
9184                 break
9185         fi
9186         LIBS="$save_LIBS"
9187 done
9188 fi
9189
9190 echo "$ac_t""$ol_cv_winsock" 1>&6
9191 fi
9192
9193
9194 echo $ac_n "checking for socket""... $ac_c" 1>&6
9195 echo "configure:9196: checking for socket" >&5
9196 if eval "test \"\${ac_cv_func_socket+set}\" = set"; then
9197   echo $ac_n "(cached) $ac_c" 1>&6
9198 else
9199   cat > conftest.$ac_ext <<EOF
9200 #line 9201 "configure"
9201 #include "confdefs.h"
9202 /* System header to define __stub macros and hopefully few prototypes,
9203     which can conflict with char socket(); below.  */
9204 #include <assert.h>
9205 /* Override any gcc2 internal prototype to avoid an error.  */
9206 /* We use char because int might match the return type of a gcc2
9207     builtin and then its argument prototype would still apply.  */
9208 char socket();
9209 char (*f)();
9210
9211 int main() {
9212
9213 /* The GNU C library defines this for functions which it implements
9214     to always fail with ENOSYS.  Some functions are actually named
9215     something starting with __ and the normal name is an alias.  */
9216 #if defined (__stub_socket) || defined (__stub___socket)
9217 choke me
9218 #else
9219 f = socket;
9220 #endif
9221
9222 ; return 0; }
9223 EOF
9224 if { (eval echo configure:9225: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9225   rm -rf conftest*
9226   eval "ac_cv_func_socket=yes"
9227 else
9228   echo "configure: failed program was:" >&5
9229   cat conftest.$ac_ext >&5
9230   rm -rf conftest*
9231   eval "ac_cv_func_socket=no"
9232 fi
9233 rm -f conftest*
9234 fi
9235
9236 if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
9237   echo "$ac_t""yes" 1>&6
9238   :
9239 else
9240   echo "$ac_t""no" 1>&6
9241         
9242         echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6
9243 echo "configure:9244: checking for main in -lsocket" >&5
9244 ac_lib_var=`echo socket'_'main | sed 'y%./+-:%__p__%'`
9245 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9246   echo $ac_n "(cached) $ac_c" 1>&6
9247 else
9248   ac_save_LIBS="$LIBS"
9249 LIBS="-lsocket  $LIBS"
9250 cat > conftest.$ac_ext <<EOF
9251 #line 9252 "configure"
9252 #include "confdefs.h"
9253
9254 int main() {
9255 main()
9256 ; return 0; }
9257 EOF
9258 if { (eval echo configure:9259: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9259   rm -rf conftest*
9260   eval "ac_cv_lib_$ac_lib_var=yes"
9261 else
9262   echo "configure: failed program was:" >&5
9263   cat conftest.$ac_ext >&5
9264   rm -rf conftest*
9265   eval "ac_cv_lib_$ac_lib_var=no"
9266 fi
9267 rm -f conftest*
9268 LIBS="$ac_save_LIBS"
9269
9270 fi
9271 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9272   echo "$ac_t""yes" 1>&6
9273     ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9274     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9275   cat >> confdefs.h <<EOF
9276 #define $ac_tr_lib 1
9277 EOF
9278
9279   LIBS="-lsocket $LIBS"
9280
9281 else
9282   echo "$ac_t""no" 1>&6
9283 fi
9284
9285         echo $ac_n "checking for main in -lnet""... $ac_c" 1>&6
9286 echo "configure:9287: checking for main in -lnet" >&5
9287 ac_lib_var=`echo net'_'main | sed 'y%./+-:%__p__%'`
9288 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9289   echo $ac_n "(cached) $ac_c" 1>&6
9290 else
9291   ac_save_LIBS="$LIBS"
9292 LIBS="-lnet  $LIBS"
9293 cat > conftest.$ac_ext <<EOF
9294 #line 9295 "configure"
9295 #include "confdefs.h"
9296
9297 int main() {
9298 main()
9299 ; return 0; }
9300 EOF
9301 if { (eval echo configure:9302: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9302   rm -rf conftest*
9303   eval "ac_cv_lib_$ac_lib_var=yes"
9304 else
9305   echo "configure: failed program was:" >&5
9306   cat conftest.$ac_ext >&5
9307   rm -rf conftest*
9308   eval "ac_cv_lib_$ac_lib_var=no"
9309 fi
9310 rm -f conftest*
9311 LIBS="$ac_save_LIBS"
9312
9313 fi
9314 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9315   echo "$ac_t""yes" 1>&6
9316     ac_tr_lib=HAVE_LIB`echo net | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9317     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9318   cat >> confdefs.h <<EOF
9319 #define $ac_tr_lib 1
9320 EOF
9321
9322   LIBS="-lnet $LIBS"
9323
9324 else
9325   echo "$ac_t""no" 1>&6
9326 fi
9327
9328         echo $ac_n "checking for main in -lnsl_s""... $ac_c" 1>&6
9329 echo "configure:9330: checking for main in -lnsl_s" >&5
9330 ac_lib_var=`echo nsl_s'_'main | sed 'y%./+-:%__p__%'`
9331 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9332   echo $ac_n "(cached) $ac_c" 1>&6
9333 else
9334   ac_save_LIBS="$LIBS"
9335 LIBS="-lnsl_s  $LIBS"
9336 cat > conftest.$ac_ext <<EOF
9337 #line 9338 "configure"
9338 #include "confdefs.h"
9339
9340 int main() {
9341 main()
9342 ; return 0; }
9343 EOF
9344 if { (eval echo configure:9345: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9345   rm -rf conftest*
9346   eval "ac_cv_lib_$ac_lib_var=yes"
9347 else
9348   echo "configure: failed program was:" >&5
9349   cat conftest.$ac_ext >&5
9350   rm -rf conftest*
9351   eval "ac_cv_lib_$ac_lib_var=no"
9352 fi
9353 rm -f conftest*
9354 LIBS="$ac_save_LIBS"
9355
9356 fi
9357 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9358   echo "$ac_t""yes" 1>&6
9359     ac_tr_lib=HAVE_LIB`echo nsl_s | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9360     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9361   cat >> confdefs.h <<EOF
9362 #define $ac_tr_lib 1
9363 EOF
9364
9365   LIBS="-lnsl_s $LIBS"
9366
9367 else
9368   echo "$ac_t""no" 1>&6
9369 fi
9370
9371         echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
9372 echo "configure:9373: checking for main in -lnsl" >&5
9373 ac_lib_var=`echo nsl'_'main | sed 'y%./+-:%__p__%'`
9374 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9375   echo $ac_n "(cached) $ac_c" 1>&6
9376 else
9377   ac_save_LIBS="$LIBS"
9378 LIBS="-lnsl  $LIBS"
9379 cat > conftest.$ac_ext <<EOF
9380 #line 9381 "configure"
9381 #include "confdefs.h"
9382
9383 int main() {
9384 main()
9385 ; return 0; }
9386 EOF
9387 if { (eval echo configure:9388: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9388   rm -rf conftest*
9389   eval "ac_cv_lib_$ac_lib_var=yes"
9390 else
9391   echo "configure: failed program was:" >&5
9392   cat conftest.$ac_ext >&5
9393   rm -rf conftest*
9394   eval "ac_cv_lib_$ac_lib_var=no"
9395 fi
9396 rm -f conftest*
9397 LIBS="$ac_save_LIBS"
9398
9399 fi
9400 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9401   echo "$ac_t""yes" 1>&6
9402     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9403     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9404   cat >> confdefs.h <<EOF
9405 #define $ac_tr_lib 1
9406 EOF
9407
9408   LIBS="-lnsl $LIBS"
9409
9410 else
9411   echo "$ac_t""no" 1>&6
9412 fi
9413
9414         echo $ac_n "checking for socket in -linet""... $ac_c" 1>&6
9415 echo "configure:9416: checking for socket in -linet" >&5
9416 ac_lib_var=`echo inet'_'socket | sed 'y%./+-:%__p__%'`
9417 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9418   echo $ac_n "(cached) $ac_c" 1>&6
9419 else
9420   ac_save_LIBS="$LIBS"
9421 LIBS="-linet  $LIBS"
9422 cat > conftest.$ac_ext <<EOF
9423 #line 9424 "configure"
9424 #include "confdefs.h"
9425 /* Override any gcc2 internal prototype to avoid an error.  */
9426 /* We use char because int might match the return type of a gcc2
9427     builtin and then its argument prototype would still apply.  */
9428 char socket();
9429
9430 int main() {
9431 socket()
9432 ; return 0; }
9433 EOF
9434 if { (eval echo configure:9435: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9435   rm -rf conftest*
9436   eval "ac_cv_lib_$ac_lib_var=yes"
9437 else
9438   echo "configure: failed program was:" >&5
9439   cat conftest.$ac_ext >&5
9440   rm -rf conftest*
9441   eval "ac_cv_lib_$ac_lib_var=no"
9442 fi
9443 rm -f conftest*
9444 LIBS="$ac_save_LIBS"
9445
9446 fi
9447 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9448   echo "$ac_t""yes" 1>&6
9449     ac_tr_lib=HAVE_LIB`echo inet | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9450     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9451   cat >> confdefs.h <<EOF
9452 #define $ac_tr_lib 1
9453 EOF
9454
9455   LIBS="-linet $LIBS"
9456
9457 else
9458   echo "$ac_t""no" 1>&6
9459 fi
9460
9461         echo $ac_n "checking for main in -lgen""... $ac_c" 1>&6
9462 echo "configure:9463: checking for main in -lgen" >&5
9463 ac_lib_var=`echo gen'_'main | sed 'y%./+-:%__p__%'`
9464 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9465   echo $ac_n "(cached) $ac_c" 1>&6
9466 else
9467   ac_save_LIBS="$LIBS"
9468 LIBS="-lgen  $LIBS"
9469 cat > conftest.$ac_ext <<EOF
9470 #line 9471 "configure"
9471 #include "confdefs.h"
9472
9473 int main() {
9474 main()
9475 ; return 0; }
9476 EOF
9477 if { (eval echo configure:9478: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9478   rm -rf conftest*
9479   eval "ac_cv_lib_$ac_lib_var=yes"
9480 else
9481   echo "configure: failed program was:" >&5
9482   cat conftest.$ac_ext >&5
9483   rm -rf conftest*
9484   eval "ac_cv_lib_$ac_lib_var=no"
9485 fi
9486 rm -f conftest*
9487 LIBS="$ac_save_LIBS"
9488
9489 fi
9490 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9491   echo "$ac_t""yes" 1>&6
9492     ac_tr_lib=HAVE_LIB`echo gen | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9493     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9494   cat >> confdefs.h <<EOF
9495 #define $ac_tr_lib 1
9496 EOF
9497
9498   LIBS="-lgen $LIBS"
9499
9500 else
9501   echo "$ac_t""no" 1>&6
9502 fi
9503
9504
9505 fi
9506
9507
9508 echo $ac_n "checking for select""... $ac_c" 1>&6
9509 echo "configure:9510: checking for select" >&5
9510 if eval "test \"\${ac_cv_func_select+set}\" = set"; then
9511   echo $ac_n "(cached) $ac_c" 1>&6
9512 else
9513   cat > conftest.$ac_ext <<EOF
9514 #line 9515 "configure"
9515 #include "confdefs.h"
9516 /* System header to define __stub macros and hopefully few prototypes,
9517     which can conflict with char select(); below.  */
9518 #include <assert.h>
9519 /* Override any gcc2 internal prototype to avoid an error.  */
9520 /* We use char because int might match the return type of a gcc2
9521     builtin and then its argument prototype would still apply.  */
9522 char select();
9523 char (*f)();
9524
9525 int main() {
9526
9527 /* The GNU C library defines this for functions which it implements
9528     to always fail with ENOSYS.  Some functions are actually named
9529     something starting with __ and the normal name is an alias.  */
9530 #if defined (__stub_select) || defined (__stub___select)
9531 choke me
9532 #else
9533 f = select;
9534 #endif
9535
9536 ; return 0; }
9537 EOF
9538 if { (eval echo configure:9539: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9539   rm -rf conftest*
9540   eval "ac_cv_func_select=yes"
9541 else
9542   echo "configure: failed program was:" >&5
9543   cat conftest.$ac_ext >&5
9544   rm -rf conftest*
9545   eval "ac_cv_func_select=no"
9546 fi
9547 rm -f conftest*
9548 fi
9549
9550 if eval "test \"`echo '$ac_cv_func_'select`\" = yes"; then
9551   echo "$ac_t""yes" 1>&6
9552   :
9553 else
9554   echo "$ac_t""no" 1>&6
9555 { echo "configure: error: select() required." 1>&2; exit 1; }
9556 fi
9557
9558
9559 if test "${ac_cv_header_winsock_h}" != yes; then
9560                                 echo $ac_n "checking types of arguments for select()""... $ac_c" 1>&6
9561 echo "configure:9562: checking types of arguments for select()" >&5
9562  if eval "test \"\${ac_cv_func_select_arg234+set}\" = set"; then
9563   echo $ac_n "(cached) $ac_c" 1>&6
9564 else
9565    if eval "test \"\${ac_cv_func_select_arg1+set}\" = set"; then
9566   echo $ac_n "(cached) $ac_c" 1>&6
9567 else
9568     if eval "test \"\${ac_cv_func_select_arg5+set}\" = set"; then
9569   echo $ac_n "(cached) $ac_c" 1>&6
9570 else
9571      for ac_cv_func_select_arg234 in 'fd_set *' 'int *' 'void *'; do
9572      for ac_cv_func_select_arg1 in 'int' 'size_t' 'unsigned long' 'unsigned'; do
9573       for ac_cv_func_select_arg5 in 'struct timeval *' 'const struct timeval *'; do
9574        cat > conftest.$ac_ext <<EOF
9575 #line 9576 "configure"
9576 #include "confdefs.h"
9577 #ifdef HAVE_SYS_TYPES_H
9578 #include <sys/types.h>
9579 #endif
9580 #ifdef HAVE_SYS_TIME_H
9581 #include <sys/time.h>
9582 #endif
9583 #ifdef HAVE_SYS_SELECT_H
9584 #include <sys/select.h>
9585 #endif
9586 #ifdef HAVE_SYS_SOCKET_H
9587 #include <sys/socket.h>
9588 #endif
9589 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);
9590 int main() {
9591
9592 ; return 0; }
9593 EOF
9594 if { (eval echo configure:9595: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9595   rm -rf conftest*
9596           ac_not_found=no ; break 3
9597 else
9598   echo "configure: failed program was:" >&5
9599   cat conftest.$ac_ext >&5
9600   rm -rf conftest*
9601   ac_not_found=yes
9602 fi
9603 rm -f conftest*
9604       done
9605      done
9606     done
9607    
9608 fi
9609   
9610 fi
9611  
9612 fi
9613  if test "$ac_not_found" = yes; then
9614   ac_cv_func_select_arg1=int 
9615   ac_cv_func_select_arg234='int *' 
9616   ac_cv_func_select_arg5='struct timeval *'
9617  fi
9618  echo "$ac_t""$ac_cv_func_select_arg1,$ac_cv_func_select_arg234,$ac_cv_func_select_arg5" 1>&6
9619  cat >> confdefs.h <<EOF
9620 #define SELECT_TYPE_ARG1 $ac_cv_func_select_arg1
9621 EOF
9622
9623  cat >> confdefs.h <<EOF
9624 #define SELECT_TYPE_ARG234 ($ac_cv_func_select_arg234)
9625 EOF
9626
9627  cat >> confdefs.h <<EOF
9628 #define SELECT_TYPE_ARG5 ($ac_cv_func_select_arg5)
9629 EOF
9630
9631
9632 fi
9633
9634
9635 for ac_hdr in regex.h 
9636 do
9637 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9638 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9639 echo "configure:9640: checking for $ac_hdr" >&5
9640 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9641   echo $ac_n "(cached) $ac_c" 1>&6
9642 else
9643   cat > conftest.$ac_ext <<EOF
9644 #line 9645 "configure"
9645 #include "confdefs.h"
9646 #include <$ac_hdr>
9647 EOF
9648 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9649 { (eval echo configure:9650: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9650 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9651 if test -z "$ac_err"; then
9652   rm -rf conftest*
9653   eval "ac_cv_header_$ac_safe=yes"
9654 else
9655   echo "$ac_err" >&5
9656   echo "configure: failed program was:" >&5
9657   cat conftest.$ac_ext >&5
9658   rm -rf conftest*
9659   eval "ac_cv_header_$ac_safe=no"
9660 fi
9661 rm -f conftest*
9662 fi
9663 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9664   echo "$ac_t""yes" 1>&6
9665     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9666   cat >> confdefs.h <<EOF
9667 #define $ac_tr_hdr 1
9668 EOF
9669  
9670 else
9671   echo "$ac_t""no" 1>&6
9672 fi
9673 done
9674
9675 if test "$ac_cv_header_regex_h" != yes ; then
9676         { echo "configure: error: POSIX regex.h required." 1>&2; exit 1; }
9677 fi
9678
9679 echo $ac_n "checking for library containing regfree""... $ac_c" 1>&6
9680 echo "configure:9681: checking for library containing regfree" >&5
9681 if eval "test \"\${ac_cv_search_regfree+set}\" = set"; then
9682   echo $ac_n "(cached) $ac_c" 1>&6
9683 else
9684   ac_func_search_save_LIBS="$LIBS"
9685 ac_cv_search_regfree="no"
9686 cat > conftest.$ac_ext <<EOF
9687 #line 9688 "configure"
9688 #include "confdefs.h"
9689 /* Override any gcc2 internal prototype to avoid an error.  */
9690 /* We use char because int might match the return type of a gcc2
9691     builtin and then its argument prototype would still apply.  */
9692 char regfree();
9693
9694 int main() {
9695 regfree()
9696 ; return 0; }
9697 EOF
9698 if { (eval echo configure:9699: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9699   rm -rf conftest*
9700   ac_cv_search_regfree="none required"
9701 else
9702   echo "configure: failed program was:" >&5
9703   cat conftest.$ac_ext >&5
9704 fi
9705 rm -f conftest*
9706 test "$ac_cv_search_regfree" = "no" && for ac_lib in regex gnuregex; do
9707 LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9708 cat > conftest.$ac_ext <<EOF
9709 #line 9710 "configure"
9710 #include "confdefs.h"
9711 /* Override any gcc2 internal prototype to avoid an error.  */
9712 /* We use char because int might match the return type of a gcc2
9713     builtin and then its argument prototype would still apply.  */
9714 char regfree();
9715
9716 int main() {
9717 regfree()
9718 ; return 0; }
9719 EOF
9720 if { (eval echo configure:9721: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9721   rm -rf conftest*
9722   ac_cv_search_regfree="-l$ac_lib"
9723 break
9724 else
9725   echo "configure: failed program was:" >&5
9726   cat conftest.$ac_ext >&5
9727 fi
9728 rm -f conftest*
9729 done
9730 LIBS="$ac_func_search_save_LIBS"
9731 fi
9732
9733 echo "$ac_t""$ac_cv_search_regfree" 1>&6
9734 if test "$ac_cv_search_regfree" != "no"; then
9735   test "$ac_cv_search_regfree" = "none required" || LIBS="$ac_cv_search_regfree $LIBS"
9736   :
9737 else :
9738   { echo "configure: error: POSIX regex required." 1>&2; exit 1; }
9739 fi
9740
9741
9742 echo $ac_n "checking for compatible POSIX regex""... $ac_c" 1>&6
9743 echo "configure:9744: checking for compatible POSIX regex" >&5
9744 if eval "test \"\${ol_cv_c_posix_regex+set}\" = set"; then
9745   echo $ac_n "(cached) $ac_c" 1>&6
9746 else
9747   
9748         if test "$cross_compiling" = yes; then
9749   ol_cv_c_posix_regex=cross
9750 else
9751   cat > conftest.$ac_ext <<EOF
9752 #line 9753 "configure"
9753 #include "confdefs.h"
9754
9755 #include <sys/types.h>
9756 #include <regex.h>
9757 static char *pattern, *string;
9758 main()
9759 {
9760         int rc;
9761         regex_t re;
9762
9763         pattern = "^A";
9764
9765         if(regcomp(&re, pattern, 0)) {
9766                 return -1;
9767         }
9768         
9769         string = "ALL MATCH";
9770         
9771         rc = regexec(&re, string, 0, (void*)0, 0);
9772
9773         regfree(&re);
9774
9775         return rc;
9776 }
9777 EOF
9778 if { (eval echo configure:9779: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9779 then
9780   ol_cv_c_posix_regex=yes
9781 else
9782   echo "configure: failed program was:" >&5
9783   cat conftest.$ac_ext >&5
9784   rm -fr conftest*
9785   ol_cv_c_posix_regex=no
9786 fi
9787 rm -fr conftest*
9788 fi
9789
9790 fi
9791
9792 echo "$ac_t""$ol_cv_c_posix_regex" 1>&6
9793
9794 if test "$ol_cv_c_posix_regex" = no ; then
9795         { echo "configure: error: broken POSIX regex!" 1>&2; exit 1; }
9796 fi
9797
9798
9799 have_uuid=no
9800 for ac_hdr in sys/uuid.h
9801 do
9802 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9803 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9804 echo "configure:9805: checking for $ac_hdr" >&5
9805 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9806   echo $ac_n "(cached) $ac_c" 1>&6
9807 else
9808   cat > conftest.$ac_ext <<EOF
9809 #line 9810 "configure"
9810 #include "confdefs.h"
9811 #include <$ac_hdr>
9812 EOF
9813 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9814 { (eval echo configure:9815: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9815 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9816 if test -z "$ac_err"; then
9817   rm -rf conftest*
9818   eval "ac_cv_header_$ac_safe=yes"
9819 else
9820   echo "$ac_err" >&5
9821   echo "configure: failed program was:" >&5
9822   cat conftest.$ac_ext >&5
9823   rm -rf conftest*
9824   eval "ac_cv_header_$ac_safe=no"
9825 fi
9826 rm -f conftest*
9827 fi
9828 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9829   echo "$ac_t""yes" 1>&6
9830     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9831   cat >> confdefs.h <<EOF
9832 #define $ac_tr_hdr 1
9833 EOF
9834  
9835 else
9836   echo "$ac_t""no" 1>&6
9837 fi
9838 done
9839
9840 if test $ac_cv_header_sys_uuid_h = yes ; then
9841         save_LIBS="$LIBS"
9842         
9843 echo $ac_n "checking for library containing uuid_to_str""... $ac_c" 1>&6
9844 echo "configure:9845: checking for library containing uuid_to_str" >&5
9845 if eval "test \"\${ac_cv_search_uuid_to_str+set}\" = set"; then
9846   echo $ac_n "(cached) $ac_c" 1>&6
9847 else
9848   ac_func_search_save_LIBS="$LIBS"
9849 ac_cv_search_uuid_to_str="no"
9850 cat > conftest.$ac_ext <<EOF
9851 #line 9852 "configure"
9852 #include "confdefs.h"
9853 /* Override any gcc2 internal prototype to avoid an error.  */
9854 /* We use char because int might match the return type of a gcc2
9855     builtin and then its argument prototype would still apply.  */
9856 char uuid_to_str();
9857
9858 int main() {
9859 uuid_to_str()
9860 ; return 0; }
9861 EOF
9862 if { (eval echo configure:9863: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9863   rm -rf conftest*
9864   ac_cv_search_uuid_to_str="none required"
9865 else
9866   echo "configure: failed program was:" >&5
9867   cat conftest.$ac_ext >&5
9868 fi
9869 rm -f conftest*
9870 test "$ac_cv_search_uuid_to_str" = "no" && for ac_lib in uuid; do
9871 LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9872 cat > conftest.$ac_ext <<EOF
9873 #line 9874 "configure"
9874 #include "confdefs.h"
9875 /* Override any gcc2 internal prototype to avoid an error.  */
9876 /* We use char because int might match the return type of a gcc2
9877     builtin and then its argument prototype would still apply.  */
9878 char uuid_to_str();
9879
9880 int main() {
9881 uuid_to_str()
9882 ; return 0; }
9883 EOF
9884 if { (eval echo configure:9885: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9885   rm -rf conftest*
9886   ac_cv_search_uuid_to_str="-l$ac_lib"
9887 break
9888 else
9889   echo "configure: failed program was:" >&5
9890   cat conftest.$ac_ext >&5
9891 fi
9892 rm -f conftest*
9893 done
9894 LIBS="$ac_func_search_save_LIBS"
9895 fi
9896
9897 echo "$ac_t""$ac_cv_search_uuid_to_str" 1>&6
9898 if test "$ac_cv_search_uuid_to_str" != "no"; then
9899   test "$ac_cv_search_uuid_to_str" = "none required" || LIBS="$ac_cv_search_uuid_to_str $LIBS"
9900   have_uuid=yes
9901 else :
9902   :
9903 fi
9904         LIBS="$save_LIBS"
9905
9906         if test have_uuid = yes ; then
9907                 cat >> confdefs.h <<\EOF
9908 #define HAVE_UUID_TO_STR 1
9909 EOF
9910
9911
9912                 test "$ac_cv_search_uuid_to_str" = "none required" || \
9913                         SLAPD_LIBS="$SLAPD_LIBS $ac_cv_search_uuid_to_str"
9914         fi
9915 fi
9916
9917 if test $have_uuid = no ; then
9918         echo $ac_n "checking to see if -lrpcrt4 is needed for win32 UUID support""... $ac_c" 1>&6
9919 echo "configure:9920: checking to see if -lrpcrt4 is needed for win32 UUID support" >&5
9920         save_LIBS="$LIBS"
9921         LIBS="$LIBS -lrpcrt4"
9922         cat > conftest.$ac_ext <<EOF
9923 #line 9924 "configure"
9924 #include "confdefs.h"
9925
9926                 char UuidCreate@4();
9927                 char UuidToStringA@8();
9928                 
9929 int main() {
9930
9931                 UuidCreate@4();
9932                 UuidToStringA@8();
9933                 
9934 ; return 0; }
9935 EOF
9936 if { (eval echo configure:9937: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9937   rm -rf conftest*
9938   need_rpcrt=yes
9939 else
9940   echo "configure: failed program was:" >&5
9941   cat conftest.$ac_ext >&5
9942   rm -rf conftest*
9943   need_rpcrt=no
9944 fi
9945 rm -f conftest*
9946         if test $need_rpcrt = yes; then
9947                 SLAPD_LIBS="$SLAPD_LIBS -lrpcrt4"
9948         fi
9949         LIBS="$save_LIBS"
9950         echo "$ac_t""$need_rpcrt" 1>&6
9951 fi
9952
9953 ol_link_dnssrv=no
9954 echo $ac_n "checking for res_query""... $ac_c" 1>&6
9955 echo "configure:9956: checking for res_query" >&5
9956 if eval "test \"\${ac_cv_func_res_query+set}\" = set"; then
9957   echo $ac_n "(cached) $ac_c" 1>&6
9958 else
9959   cat > conftest.$ac_ext <<EOF
9960 #line 9961 "configure"
9961 #include "confdefs.h"
9962 /* System header to define __stub macros and hopefully few prototypes,
9963     which can conflict with char res_query(); below.  */
9964 #include <assert.h>
9965 /* Override any gcc2 internal prototype to avoid an error.  */
9966 /* We use char because int might match the return type of a gcc2
9967     builtin and then its argument prototype would still apply.  */
9968 char res_query();
9969 char (*f)();
9970
9971 int main() {
9972
9973 /* The GNU C library defines this for functions which it implements
9974     to always fail with ENOSYS.  Some functions are actually named
9975     something starting with __ and the normal name is an alias.  */
9976 #if defined (__stub_res_query) || defined (__stub___res_query)
9977 choke me
9978 #else
9979 f = res_query;
9980 #endif
9981
9982 ; return 0; }
9983 EOF
9984 if { (eval echo configure:9985: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9985   rm -rf conftest*
9986   eval "ac_cv_func_res_query=yes"
9987 else
9988   echo "configure: failed program was:" >&5
9989   cat conftest.$ac_ext >&5
9990   rm -rf conftest*
9991   eval "ac_cv_func_res_query=no"
9992 fi
9993 rm -f conftest*
9994 fi
9995
9996 if eval "test \"`echo '$ac_cv_func_'res_query`\" = yes"; then
9997   echo "$ac_t""yes" 1>&6
9998   :
9999 else
10000   echo "$ac_t""no" 1>&6
10001 fi
10002
10003 if test $ac_cv_func_res_query = no ; then 
10004         echo $ac_n "checking for __res_query""... $ac_c" 1>&6
10005 echo "configure:10006: checking for __res_query" >&5
10006 if eval "test \"\${ac_cv_func___res_query+set}\" = set"; then
10007   echo $ac_n "(cached) $ac_c" 1>&6
10008 else
10009   cat > conftest.$ac_ext <<EOF
10010 #line 10011 "configure"
10011 #include "confdefs.h"
10012 /* System header to define __stub macros and hopefully few prototypes,
10013     which can conflict with char __res_query(); below.  */
10014 #include <assert.h>
10015 /* Override any gcc2 internal prototype to avoid an error.  */
10016 /* We use char because int might match the return type of a gcc2
10017     builtin and then its argument prototype would still apply.  */
10018 char __res_query();
10019 char (*f)();
10020
10021 int main() {
10022
10023 /* The GNU C library defines this for functions which it implements
10024     to always fail with ENOSYS.  Some functions are actually named
10025     something starting with __ and the normal name is an alias.  */
10026 #if defined (__stub___res_query) || defined (__stub_____res_query)
10027 choke me
10028 #else
10029 f = __res_query;
10030 #endif
10031
10032 ; return 0; }
10033 EOF
10034 if { (eval echo configure:10035: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10035   rm -rf conftest*
10036   eval "ac_cv_func___res_query=yes"
10037 else
10038   echo "configure: failed program was:" >&5
10039   cat conftest.$ac_ext >&5
10040   rm -rf conftest*
10041   eval "ac_cv_func___res_query=no"
10042 fi
10043 rm -f conftest*
10044 fi
10045
10046 if eval "test \"`echo '$ac_cv_func_'__res_query`\" = yes"; then
10047   echo "$ac_t""yes" 1>&6
10048   :
10049 else
10050   echo "$ac_t""no" 1>&6
10051 fi
10052
10053         ac_cv_func_res_query=$ac_cv_func___res_query
10054 fi
10055
10056 if test $ac_cv_func_res_query = no ; then 
10057         echo $ac_n "checking for res_query in -lbind""... $ac_c" 1>&6
10058 echo "configure:10059: checking for res_query in -lbind" >&5
10059 ac_lib_var=`echo bind'_'res_query | sed 'y%./+-:%__p__%'`
10060 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10061   echo $ac_n "(cached) $ac_c" 1>&6
10062 else
10063   ac_save_LIBS="$LIBS"
10064 LIBS="-lbind  $LIBS"
10065 cat > conftest.$ac_ext <<EOF
10066 #line 10067 "configure"
10067 #include "confdefs.h"
10068 /* Override any gcc2 internal prototype to avoid an error.  */
10069 /* We use char because int might match the return type of a gcc2
10070     builtin and then its argument prototype would still apply.  */
10071 char res_query();
10072
10073 int main() {
10074 res_query()
10075 ; return 0; }
10076 EOF
10077 if { (eval echo configure:10078: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10078   rm -rf conftest*
10079   eval "ac_cv_lib_$ac_lib_var=yes"
10080 else
10081   echo "configure: failed program was:" >&5
10082   cat conftest.$ac_ext >&5
10083   rm -rf conftest*
10084   eval "ac_cv_lib_$ac_lib_var=no"
10085 fi
10086 rm -f conftest*
10087 LIBS="$ac_save_LIBS"
10088
10089 fi
10090 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10091   echo "$ac_t""yes" 1>&6
10092     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10093     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10094   cat >> confdefs.h <<EOF
10095 #define $ac_tr_lib 1
10096 EOF
10097
10098   LIBS="-lbind $LIBS"
10099
10100 else
10101   echo "$ac_t""no" 1>&6
10102 fi
10103
10104         ac_cv_func_res_query=$ac_cv_lib_bind_res_query
10105 fi
10106
10107 if test $ac_cv_func_res_query = no ; then 
10108         echo $ac_n "checking for __res_query in -lbind""... $ac_c" 1>&6
10109 echo "configure:10110: checking for __res_query in -lbind" >&5
10110 ac_lib_var=`echo bind'_'__res_query | sed 'y%./+-:%__p__%'`
10111 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10112   echo $ac_n "(cached) $ac_c" 1>&6
10113 else
10114   ac_save_LIBS="$LIBS"
10115 LIBS="-lbind  $LIBS"
10116 cat > conftest.$ac_ext <<EOF
10117 #line 10118 "configure"
10118 #include "confdefs.h"
10119 /* Override any gcc2 internal prototype to avoid an error.  */
10120 /* We use char because int might match the return type of a gcc2
10121     builtin and then its argument prototype would still apply.  */
10122 char __res_query();
10123
10124 int main() {
10125 __res_query()
10126 ; return 0; }
10127 EOF
10128 if { (eval echo configure:10129: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10129   rm -rf conftest*
10130   eval "ac_cv_lib_$ac_lib_var=yes"
10131 else
10132   echo "configure: failed program was:" >&5
10133   cat conftest.$ac_ext >&5
10134   rm -rf conftest*
10135   eval "ac_cv_lib_$ac_lib_var=no"
10136 fi
10137 rm -f conftest*
10138 LIBS="$ac_save_LIBS"
10139
10140 fi
10141 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10142   echo "$ac_t""yes" 1>&6
10143     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10144     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10145   cat >> confdefs.h <<EOF
10146 #define $ac_tr_lib 1
10147 EOF
10148
10149   LIBS="-lbind $LIBS"
10150
10151 else
10152   echo "$ac_t""no" 1>&6
10153 fi
10154
10155         ac_cv_func_res_query=$ac_cv_lib_bind___res_query
10156 fi
10157
10158 if test $ac_cv_func_res_query = no ; then 
10159         echo $ac_n "checking for res_query in -lresolv""... $ac_c" 1>&6
10160 echo "configure:10161: checking for res_query in -lresolv" >&5
10161 ac_lib_var=`echo resolv'_'res_query | sed 'y%./+-:%__p__%'`
10162 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10163   echo $ac_n "(cached) $ac_c" 1>&6
10164 else
10165   ac_save_LIBS="$LIBS"
10166 LIBS="-lresolv  $LIBS"
10167 cat > conftest.$ac_ext <<EOF
10168 #line 10169 "configure"
10169 #include "confdefs.h"
10170 /* Override any gcc2 internal prototype to avoid an error.  */
10171 /* We use char because int might match the return type of a gcc2
10172     builtin and then its argument prototype would still apply.  */
10173 char res_query();
10174
10175 int main() {
10176 res_query()
10177 ; return 0; }
10178 EOF
10179 if { (eval echo configure:10180: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10180   rm -rf conftest*
10181   eval "ac_cv_lib_$ac_lib_var=yes"
10182 else
10183   echo "configure: failed program was:" >&5
10184   cat conftest.$ac_ext >&5
10185   rm -rf conftest*
10186   eval "ac_cv_lib_$ac_lib_var=no"
10187 fi
10188 rm -f conftest*
10189 LIBS="$ac_save_LIBS"
10190
10191 fi
10192 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10193   echo "$ac_t""yes" 1>&6
10194     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10195     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10196   cat >> confdefs.h <<EOF
10197 #define $ac_tr_lib 1
10198 EOF
10199
10200   LIBS="-lresolv $LIBS"
10201
10202 else
10203   echo "$ac_t""no" 1>&6
10204 fi
10205
10206         ac_cv_func_res_query=$ac_cv_lib_resolv_res_query
10207 fi
10208
10209 if test $ac_cv_func_res_query = no ; then 
10210         echo $ac_n "checking for __res_query in -lresolv""... $ac_c" 1>&6
10211 echo "configure:10212: checking for __res_query in -lresolv" >&5
10212 ac_lib_var=`echo resolv'_'__res_query | sed 'y%./+-:%__p__%'`
10213 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10214   echo $ac_n "(cached) $ac_c" 1>&6
10215 else
10216   ac_save_LIBS="$LIBS"
10217 LIBS="-lresolv  $LIBS"
10218 cat > conftest.$ac_ext <<EOF
10219 #line 10220 "configure"
10220 #include "confdefs.h"
10221 /* Override any gcc2 internal prototype to avoid an error.  */
10222 /* We use char because int might match the return type of a gcc2
10223     builtin and then its argument prototype would still apply.  */
10224 char __res_query();
10225
10226 int main() {
10227 __res_query()
10228 ; return 0; }
10229 EOF
10230 if { (eval echo configure:10231: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10231   rm -rf conftest*
10232   eval "ac_cv_lib_$ac_lib_var=yes"
10233 else
10234   echo "configure: failed program was:" >&5
10235   cat conftest.$ac_ext >&5
10236   rm -rf conftest*
10237   eval "ac_cv_lib_$ac_lib_var=no"
10238 fi
10239 rm -f conftest*
10240 LIBS="$ac_save_LIBS"
10241
10242 fi
10243 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10244   echo "$ac_t""yes" 1>&6
10245     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10246     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10247   cat >> confdefs.h <<EOF
10248 #define $ac_tr_lib 1
10249 EOF
10250
10251   LIBS="-lresolv $LIBS"
10252
10253 else
10254   echo "$ac_t""no" 1>&6
10255 fi
10256
10257         ac_cv_func_res_query=$ac_cv_lib_resolv___res_query
10258 fi
10259
10260 if test "$ac_cv_func_res_query" = yes ; then
10261         cat >> confdefs.h <<\EOF
10262 #define HAVE_RES_QUERY 1
10263 EOF
10264
10265
10266         if test $ol_enable_dnssrv != no ; then
10267                 ol_link_dnssrv=yes
10268         fi
10269 fi
10270
10271 if test "$ol_enable_dnssrv" = yes -a "$ol_link_dnssrv" = no ; then
10272         { echo "configure: error: DNSSRV requires res_query()" 1>&2; exit 1; }
10273 fi
10274
10275 for ac_func in getaddrinfo getnameinfo gai_strerror inet_ntop 
10276 do
10277 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10278 echo "configure:10279: checking for $ac_func" >&5
10279 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10280   echo $ac_n "(cached) $ac_c" 1>&6
10281 else
10282   cat > conftest.$ac_ext <<EOF
10283 #line 10284 "configure"
10284 #include "confdefs.h"
10285 /* System header to define __stub macros and hopefully few prototypes,
10286     which can conflict with char $ac_func(); below.  */
10287 #include <assert.h>
10288 /* Override any gcc2 internal prototype to avoid an error.  */
10289 /* We use char because int might match the return type of a gcc2
10290     builtin and then its argument prototype would still apply.  */
10291 char $ac_func();
10292 char (*f)();
10293
10294 int main() {
10295
10296 /* The GNU C library defines this for functions which it implements
10297     to always fail with ENOSYS.  Some functions are actually named
10298     something starting with __ and the normal name is an alias.  */
10299 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10300 choke me
10301 #else
10302 f = $ac_func;
10303 #endif
10304
10305 ; return 0; }
10306 EOF
10307 if { (eval echo configure:10308: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10308   rm -rf conftest*
10309   eval "ac_cv_func_$ac_func=yes"
10310 else
10311   echo "configure: failed program was:" >&5
10312   cat conftest.$ac_ext >&5
10313   rm -rf conftest*
10314   eval "ac_cv_func_$ac_func=no"
10315 fi
10316 rm -f conftest*
10317 fi
10318
10319 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10320   echo "$ac_t""yes" 1>&6
10321     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10322   cat >> confdefs.h <<EOF
10323 #define $ac_tr_func 1
10324 EOF
10325  
10326 else
10327   echo "$ac_t""no" 1>&6
10328 fi
10329 done
10330
10331
10332 ol_link_ipv6=no
10333 if test $ac_cv_func_getaddrinfo = no -o $ac_cv_func_inet_ntop = no ; then
10334         if test $ol_enable_ipv6 = yes ; then
10335                 { echo "configure: error: IPv6 support requires getaddrinfo() and inet_ntop()" 1>&2; exit 1; }
10336         fi
10337 elif test $ol_enable_ipv6 != no ; then
10338         echo $ac_n "checking INET6_ADDRSTRLEN""... $ac_c" 1>&6
10339 echo "configure:10340: checking INET6_ADDRSTRLEN" >&5
10340 if eval "test \"\${ol_cv_inet6_addrstrlen+set}\" = set"; then
10341   echo $ac_n "(cached) $ac_c" 1>&6
10342 else
10343   
10344                 cat > conftest.$ac_ext <<EOF
10345 #line 10346 "configure"
10346 #include "confdefs.h"
10347
10348 #                       include <netinet/in.h>
10349 #                       ifdef INET6_ADDRSTRLEN
10350                                 __has_inet6_addrstrlen__;
10351 #                       endif
10352                 
10353 EOF
10354 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10355   egrep "__has_inet6_addrstrlen__" >/dev/null 2>&1; then
10356   rm -rf conftest*
10357   ol_cv_inet6_addrstrlen=yes
10358 else
10359   rm -rf conftest*
10360   ol_cv_inet6_addrstrlen=no
10361 fi
10362 rm -f conftest*
10363
10364 fi
10365
10366 echo "$ac_t""$ol_cv_inet6_addrstrlen" 1>&6
10367
10368
10369         echo $ac_n "checking struct sockaddr_storage""... $ac_c" 1>&6
10370 echo "configure:10371: checking struct sockaddr_storage" >&5
10371 if eval "test \"\${ol_cv_struct_sockaddr_storage+set}\" = set"; then
10372   echo $ac_n "(cached) $ac_c" 1>&6
10373 else
10374   
10375                 cat > conftest.$ac_ext <<EOF
10376 #line 10377 "configure"
10377 #include "confdefs.h"
10378
10379 #include <sys/types.h>
10380 #include <sys/socket.h>
10381
10382 int main() {
10383
10384                         struct sockaddr_storage ss;
10385
10386 ; return 0; }
10387 EOF
10388 if { (eval echo configure:10389: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10389   rm -rf conftest*
10390   ol_cv_struct_sockaddr_storage=yes
10391 else
10392   echo "configure: failed program was:" >&5
10393   cat conftest.$ac_ext >&5
10394   rm -rf conftest*
10395   ol_cv_struct_sockaddr_storage=no
10396 fi
10397 rm -f conftest*
10398 fi
10399
10400 echo "$ac_t""$ol_cv_struct_sockaddr_storage" 1>&6
10401
10402         if test $ol_cv_inet6_addrstrlen = yes \
10403                 -a $ol_cv_struct_sockaddr_storage = yes ; then
10404                 ol_link_ipv6=yes
10405         elif test $ol_enable_ipv6 = yes \
10406                         -a $ol_cv_inet6_addrstrlen = no ; then
10407                 { echo "configure: error: IPv6 support requires INET6_ADDRSTRLEN" 1>&2; exit 1; }
10408         elif test $ol_enable_ipv6 = yes \
10409                         -a $ol_cv_struct_sockaddr_storage = no ; then
10410                 { echo "configure: error: IPv6 support requires struct sockaddr_storage" 1>&2; exit 1; }
10411         fi
10412 fi
10413
10414 if test $ol_enable_local != no ; then
10415         for ac_hdr in sys/un.h 
10416 do
10417 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10418 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10419 echo "configure:10420: checking for $ac_hdr" >&5
10420 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10421   echo $ac_n "(cached) $ac_c" 1>&6
10422 else
10423   cat > conftest.$ac_ext <<EOF
10424 #line 10425 "configure"
10425 #include "confdefs.h"
10426 #include <$ac_hdr>
10427 EOF
10428 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10429 { (eval echo configure:10430: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10430 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10431 if test -z "$ac_err"; then
10432   rm -rf conftest*
10433   eval "ac_cv_header_$ac_safe=yes"
10434 else
10435   echo "$ac_err" >&5
10436   echo "configure: failed program was:" >&5
10437   cat conftest.$ac_ext >&5
10438   rm -rf conftest*
10439   eval "ac_cv_header_$ac_safe=no"
10440 fi
10441 rm -f conftest*
10442 fi
10443 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10444   echo "$ac_t""yes" 1>&6
10445     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10446   cat >> confdefs.h <<EOF
10447 #define $ac_tr_hdr 1
10448 EOF
10449  
10450 else
10451   echo "$ac_t""no" 1>&6
10452 fi
10453 done
10454
10455
10456         if test $ol_enable_local = auto ; then
10457                 ol_enable_local=$ac_cv_header_sys_un_h
10458         elif test $ac_cv_header_sys_un_h = no ; then
10459                 { echo "configure: error: AF_LOCAL domain support requires sys/un.h" 1>&2; exit 1; }
10460         fi
10461 fi
10462
10463 ol_link_kbind=no
10464 ol_link_kpasswd=no
10465 ol_link_krb5=no
10466 ol_link_krb4=no
10467
10468 if test $ol_with_kerberos = yes -o $ol_with_kerberos = auto \
10469         -o $ol_with_kerberos = k5 -o $ol_with_kerberos = k5only \
10470         -o $ol_with_kerberos = k425 ; then
10471
10472         for ac_hdr in krb5.h
10473 do
10474 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10475 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10476 echo "configure:10477: checking for $ac_hdr" >&5
10477 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10478   echo $ac_n "(cached) $ac_c" 1>&6
10479 else
10480   cat > conftest.$ac_ext <<EOF
10481 #line 10482 "configure"
10482 #include "confdefs.h"
10483 #include <$ac_hdr>
10484 EOF
10485 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10486 { (eval echo configure:10487: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10487 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10488 if test -z "$ac_err"; then
10489   rm -rf conftest*
10490   eval "ac_cv_header_$ac_safe=yes"
10491 else
10492   echo "$ac_err" >&5
10493   echo "configure: failed program was:" >&5
10494   cat conftest.$ac_ext >&5
10495   rm -rf conftest*
10496   eval "ac_cv_header_$ac_safe=no"
10497 fi
10498 rm -f conftest*
10499 fi
10500 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10501   echo "$ac_t""yes" 1>&6
10502     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10503   cat >> confdefs.h <<EOF
10504 #define $ac_tr_hdr 1
10505 EOF
10506  
10507 else
10508   echo "$ac_t""no" 1>&6
10509 fi
10510 done
10511
10512
10513         if test $ac_cv_header_krb5_h = yes ; then
10514                                 for ac_hdr in heim_err.h
10515 do
10516 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10517 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10518 echo "configure:10519: checking for $ac_hdr" >&5
10519 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10520   echo $ac_n "(cached) $ac_c" 1>&6
10521 else
10522   cat > conftest.$ac_ext <<EOF
10523 #line 10524 "configure"
10524 #include "confdefs.h"
10525 #include <$ac_hdr>
10526 EOF
10527 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10528 { (eval echo configure:10529: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10529 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10530 if test -z "$ac_err"; then
10531   rm -rf conftest*
10532   eval "ac_cv_header_$ac_safe=yes"
10533 else
10534   echo "$ac_err" >&5
10535   echo "configure: failed program was:" >&5
10536   cat conftest.$ac_ext >&5
10537   rm -rf conftest*
10538   eval "ac_cv_header_$ac_safe=no"
10539 fi
10540 rm -f conftest*
10541 fi
10542 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10543   echo "$ac_t""yes" 1>&6
10544     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10545   cat >> confdefs.h <<EOF
10546 #define $ac_tr_hdr 1
10547 EOF
10548  
10549 else
10550   echo "$ac_t""no" 1>&6
10551 fi
10552 done
10553
10554                 if test $ac_cv_header_heim_err_h = yes ; then
10555                         krb5_impl=heimdal
10556                 else
10557                         krb5_impl=mit
10558                 fi
10559
10560                 if test $krb5_impl = mit; then
10561                         echo $ac_n "checking for main in -lk5crypto""... $ac_c" 1>&6
10562 echo "configure:10563: checking for main in -lk5crypto" >&5
10563 ac_lib_var=`echo k5crypto'_'main | sed 'y%./+-:%__p__%'`
10564 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10565   echo $ac_n "(cached) $ac_c" 1>&6
10566 else
10567   ac_save_LIBS="$LIBS"
10568 LIBS="-lk5crypto  $LIBS"
10569 cat > conftest.$ac_ext <<EOF
10570 #line 10571 "configure"
10571 #include "confdefs.h"
10572
10573 int main() {
10574 main()
10575 ; return 0; }
10576 EOF
10577 if { (eval echo configure:10578: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10578   rm -rf conftest*
10579   eval "ac_cv_lib_$ac_lib_var=yes"
10580 else
10581   echo "configure: failed program was:" >&5
10582   cat conftest.$ac_ext >&5
10583   rm -rf conftest*
10584   eval "ac_cv_lib_$ac_lib_var=no"
10585 fi
10586 rm -f conftest*
10587 LIBS="$ac_save_LIBS"
10588
10589 fi
10590 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10591   echo "$ac_t""yes" 1>&6
10592   krb5crypto=k5crypto
10593 else
10594   echo "$ac_t""no" 1>&6
10595 krb5crypto=crypto
10596 fi
10597
10598
10599                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
10600 echo "configure:10601: checking for main in -lkrb5" >&5
10601 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
10602 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10603   echo $ac_n "(cached) $ac_c" 1>&6
10604 else
10605   ac_save_LIBS="$LIBS"
10606 LIBS="-lkrb5 -l$krb5crypto -lcom_err $LIBS"
10607 cat > conftest.$ac_ext <<EOF
10608 #line 10609 "configure"
10609 #include "confdefs.h"
10610
10611 int main() {
10612 main()
10613 ; return 0; }
10614 EOF
10615 if { (eval echo configure:10616: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10616   rm -rf conftest*
10617   eval "ac_cv_lib_$ac_lib_var=yes"
10618 else
10619   echo "configure: failed program was:" >&5
10620   cat conftest.$ac_ext >&5
10621   rm -rf conftest*
10622   eval "ac_cv_lib_$ac_lib_var=no"
10623 fi
10624 rm -f conftest*
10625 LIBS="$ac_save_LIBS"
10626
10627 fi
10628 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10629   echo "$ac_t""yes" 1>&6
10630   have_krb5=yes
10631                                 KRB5_LIBS="-lkrb5 -l$krb5crypto -lcom_err"
10632 else
10633   echo "$ac_t""no" 1>&6
10634 have_krb5=no
10635 fi
10636
10637
10638                 elif test $krb5_impl = heimdal; then
10639                         echo $ac_n "checking for main in -ldes""... $ac_c" 1>&6
10640 echo "configure:10641: checking for main in -ldes" >&5
10641 ac_lib_var=`echo des'_'main | sed 'y%./+-:%__p__%'`
10642 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10643   echo $ac_n "(cached) $ac_c" 1>&6
10644 else
10645   ac_save_LIBS="$LIBS"
10646 LIBS="-ldes  $LIBS"
10647 cat > conftest.$ac_ext <<EOF
10648 #line 10649 "configure"
10649 #include "confdefs.h"
10650
10651 int main() {
10652 main()
10653 ; return 0; }
10654 EOF
10655 if { (eval echo configure:10656: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10656   rm -rf conftest*
10657   eval "ac_cv_lib_$ac_lib_var=yes"
10658 else
10659   echo "configure: failed program was:" >&5
10660   cat conftest.$ac_ext >&5
10661   rm -rf conftest*
10662   eval "ac_cv_lib_$ac_lib_var=no"
10663 fi
10664 rm -f conftest*
10665 LIBS="$ac_save_LIBS"
10666
10667 fi
10668 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10669   echo "$ac_t""yes" 1>&6
10670   krb5crypto=des
10671 else
10672   echo "$ac_t""no" 1>&6
10673 krb5crypto=crypto
10674 fi
10675
10676
10677                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
10678 echo "configure:10679: checking for main in -lkrb5" >&5
10679 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
10680 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10681   echo $ac_n "(cached) $ac_c" 1>&6
10682 else
10683   ac_save_LIBS="$LIBS"
10684 LIBS="-lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err $LIBS"
10685 cat > conftest.$ac_ext <<EOF
10686 #line 10687 "configure"
10687 #include "confdefs.h"
10688
10689 int main() {
10690 main()
10691 ; return 0; }
10692 EOF
10693 if { (eval echo configure:10694: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10694   rm -rf conftest*
10695   eval "ac_cv_lib_$ac_lib_var=yes"
10696 else
10697   echo "configure: failed program was:" >&5
10698   cat conftest.$ac_ext >&5
10699   rm -rf conftest*
10700   eval "ac_cv_lib_$ac_lib_var=no"
10701 fi
10702 rm -f conftest*
10703 LIBS="$ac_save_LIBS"
10704
10705 fi
10706 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10707   echo "$ac_t""yes" 1>&6
10708   have_krb5=yes
10709                                 KRB5_LIBS="-lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err"
10710 else
10711   echo "$ac_t""no" 1>&6
10712 have_krb5=no
10713 fi
10714
10715
10716                         cat >> confdefs.h <<\EOF
10717 #define HAVE_HEIMDAL_KERBEROS 1
10718 EOF
10719
10720
10721                 else
10722                         have_krb5=no
10723                         echo "configure: warning: Unrecognized Kerberos5 Implementation" 1>&2
10724                 fi
10725
10726                 if test $have_krb5 = yes ; then
10727                         ol_link_krb5=yes
10728
10729                         cat >> confdefs.h <<\EOF
10730 #define HAVE_KRB5 1
10731 EOF
10732
10733
10734                         if test $ol_enable_kpasswd != no ; then
10735                                 ol_link_kpasswd=yes;
10736                         fi
10737
10738                         if test $ol_with_kerberos = k5only ; then
10739                                 ol_with_kerberos=found
10740                         fi
10741
10742                 elif test $ol_with_kerberos != auto ; then
10743                         { echo "configure: error: Required Kerberos 5 support not available" 1>&2; exit 1; }
10744                 fi
10745
10746         fi
10747 fi
10748
10749 if test $ol_link_krb5 = yes -a \( $ol_with_kerberos = yes -o \
10750         $ol_with_kerberos = auto -o $ol_with_kerberos = k425 \) ; then
10751
10752         for ac_hdr in kerberosIV/krb.h kerberosIV/des.h
10753 do
10754 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10755 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10756 echo "configure:10757: checking for $ac_hdr" >&5
10757 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10758   echo $ac_n "(cached) $ac_c" 1>&6
10759 else
10760   cat > conftest.$ac_ext <<EOF
10761 #line 10762 "configure"
10762 #include "confdefs.h"
10763 #include <$ac_hdr>
10764 EOF
10765 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10766 { (eval echo configure:10767: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10767 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10768 if test -z "$ac_err"; then
10769   rm -rf conftest*
10770   eval "ac_cv_header_$ac_safe=yes"
10771 else
10772   echo "$ac_err" >&5
10773   echo "configure: failed program was:" >&5
10774   cat conftest.$ac_ext >&5
10775   rm -rf conftest*
10776   eval "ac_cv_header_$ac_safe=no"
10777 fi
10778 rm -f conftest*
10779 fi
10780 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10781   echo "$ac_t""yes" 1>&6
10782     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10783   cat >> confdefs.h <<EOF
10784 #define $ac_tr_hdr 1
10785 EOF
10786  
10787 else
10788   echo "$ac_t""no" 1>&6
10789 fi
10790 done
10791
10792
10793         if test $ac_cv_header_kerberosIV_krb_h = yes ; then
10794                 if test $krb5_impl = mit; then
10795                         echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
10796 echo "configure:10797: checking for main in -lkrb4" >&5
10797 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
10798 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10799   echo $ac_n "(cached) $ac_c" 1>&6
10800 else
10801   ac_save_LIBS="$LIBS"
10802 LIBS="-lkrb4 -ldes425 -lkrb5 -l$krb5crypto -lcom_err $LIBS"
10803 cat > conftest.$ac_ext <<EOF
10804 #line 10805 "configure"
10805 #include "confdefs.h"
10806
10807 int main() {
10808 main()
10809 ; return 0; }
10810 EOF
10811 if { (eval echo configure:10812: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10812   rm -rf conftest*
10813   eval "ac_cv_lib_$ac_lib_var=yes"
10814 else
10815   echo "configure: failed program was:" >&5
10816   cat conftest.$ac_ext >&5
10817   rm -rf conftest*
10818   eval "ac_cv_lib_$ac_lib_var=no"
10819 fi
10820 rm -f conftest*
10821 LIBS="$ac_save_LIBS"
10822
10823 fi
10824 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10825   echo "$ac_t""yes" 1>&6
10826   have_k425=yes
10827                                 KRB4_LIBS="-lkrb4 -ldes425"
10828 else
10829   echo "$ac_t""no" 1>&6
10830 have_k425=no
10831 fi
10832
10833
10834                 elif test $krb5_impl = heimdal; then
10835                         echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
10836 echo "configure:10837: checking for main in -lkrb4" >&5
10837 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
10838 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10839   echo $ac_n "(cached) $ac_c" 1>&6
10840 else
10841   ac_save_LIBS="$LIBS"
10842 LIBS="-lkrb4 -lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err $LIBS"
10843 cat > conftest.$ac_ext <<EOF
10844 #line 10845 "configure"
10845 #include "confdefs.h"
10846
10847 int main() {
10848 main()
10849 ; return 0; }
10850 EOF
10851 if { (eval echo configure:10852: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10852   rm -rf conftest*
10853   eval "ac_cv_lib_$ac_lib_var=yes"
10854 else
10855   echo "configure: failed program was:" >&5
10856   cat conftest.$ac_ext >&5
10857   rm -rf conftest*
10858   eval "ac_cv_lib_$ac_lib_var=no"
10859 fi
10860 rm -f conftest*
10861 LIBS="$ac_save_LIBS"
10862
10863 fi
10864 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10865   echo "$ac_t""yes" 1>&6
10866   have_k425=yes
10867                                 KRB4_LIBS="-lkrb4"
10868 else
10869   echo "$ac_t""no" 1>&6
10870 have_k425=no
10871 fi
10872
10873
10874                 else
10875                         have_425=no
10876                         echo "configure: warning: Unrecongized Kerberos V Implementation" 1>&2
10877                 fi
10878
10879                 if test $have_k425 = yes ; then
10880                         ol_with_kerberos=found
10881                         ol_link_krb4=yes
10882
10883                         cat >> confdefs.h <<\EOF
10884 #define HAVE_KRB425 1
10885 EOF
10886
10887                         cat >> confdefs.h <<\EOF
10888 #define HAVE_KRB4 1
10889 EOF
10890
10891
10892                         echo $ac_n "checking for des_debug in Kerberos libraries""... $ac_c" 1>&6
10893 echo "configure:10894: checking for des_debug in Kerberos libraries" >&5
10894 if eval "test \"\${ol_cv_var_des_debug+set}\" = set"; then
10895   echo $ac_n "(cached) $ac_c" 1>&6
10896 else
10897   
10898                                                                 save_LIBS="$LIBS"
10899                                 LIBS="$KRB4_LIBS $KRB5_LIBS $LIBS"
10900                                 cat > conftest.$ac_ext <<EOF
10901 #line 10902 "configure"
10902 #include "confdefs.h"
10903
10904 #include <kerberosIV/krb.h>
10905 #include <kerberosIV/des.h>
10906 extern int des_debug;
10907
10908 int main() {
10909
10910 des_debug = 1;
10911
10912 ; return 0; }
10913 EOF
10914 if { (eval echo configure:10915: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10915   rm -rf conftest*
10916   ol_cv_var_des_debug=yes
10917 else
10918   echo "configure: failed program was:" >&5
10919   cat conftest.$ac_ext >&5
10920   rm -rf conftest*
10921   ol_cv_var_des_debug=no
10922 fi
10923 rm -f conftest*
10924                                                                 LIBS="$save_LIBS"
10925                         
10926 fi
10927
10928 echo "$ac_t""$ol_cv_var_des_debug" 1>&6
10929
10930                         if test $ol_cv_var_des_debug = yes ; then
10931                                 cat >> confdefs.h <<\EOF
10932 #define HAVE_DES_DEBUG 1
10933 EOF
10934
10935                         fi
10936
10937                         LIBS="$save_LIBS"
10938                 fi
10939         fi
10940 fi
10941
10942 if test $ol_link_krb5 = yes ; then
10943         ol_with_kerberos=found
10944 fi
10945
10946 if test $ol_with_kerberos = yes -o $ol_with_kerberos = auto \
10947         -o $ol_with_kerberos = k4 -o $ol_with_kerberos = kth ; then
10948
10949         for ac_hdr in krb.h des.h krb-archaeology.h 
10950 do
10951 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10952 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10953 echo "configure:10954: checking for $ac_hdr" >&5
10954 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10955   echo $ac_n "(cached) $ac_c" 1>&6
10956 else
10957   cat > conftest.$ac_ext <<EOF
10958 #line 10959 "configure"
10959 #include "confdefs.h"
10960 #include <$ac_hdr>
10961 EOF
10962 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10963 { (eval echo configure:10964: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10964 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10965 if test -z "$ac_err"; then
10966   rm -rf conftest*
10967   eval "ac_cv_header_$ac_safe=yes"
10968 else
10969   echo "$ac_err" >&5
10970   echo "configure: failed program was:" >&5
10971   cat conftest.$ac_ext >&5
10972   rm -rf conftest*
10973   eval "ac_cv_header_$ac_safe=no"
10974 fi
10975 rm -f conftest*
10976 fi
10977 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10978   echo "$ac_t""yes" 1>&6
10979     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10980   cat >> confdefs.h <<EOF
10981 #define $ac_tr_hdr 1
10982 EOF
10983  
10984 else
10985   echo "$ac_t""no" 1>&6
10986 fi
10987 done
10988
10989
10990         if test $ac_cv_header_krb_h = yes ; then
10991                 echo $ac_n "checking for main in -lkrb""... $ac_c" 1>&6
10992 echo "configure:10993: checking for main in -lkrb" >&5
10993 ac_lib_var=`echo krb'_'main | sed 'y%./+-:%__p__%'`
10994 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10995   echo $ac_n "(cached) $ac_c" 1>&6
10996 else
10997   ac_save_LIBS="$LIBS"
10998 LIBS="-lkrb -ldes $LIBS"
10999 cat > conftest.$ac_ext <<EOF
11000 #line 11001 "configure"
11001 #include "confdefs.h"
11002
11003 int main() {
11004 main()
11005 ; return 0; }
11006 EOF
11007 if { (eval echo configure:11008: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11008   rm -rf conftest*
11009   eval "ac_cv_lib_$ac_lib_var=yes"
11010 else
11011   echo "configure: failed program was:" >&5
11012   cat conftest.$ac_ext >&5
11013   rm -rf conftest*
11014   eval "ac_cv_lib_$ac_lib_var=no"
11015 fi
11016 rm -f conftest*
11017 LIBS="$ac_save_LIBS"
11018
11019 fi
11020 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11021   echo "$ac_t""yes" 1>&6
11022   have_k4=yes
11023 else
11024   echo "$ac_t""no" 1>&6
11025 have_k4=no
11026 fi
11027
11028
11029                 if test $have_k4 = yes ; then
11030                         ol_with_kerberos=found
11031                         ol_link_krb4=yes
11032
11033                         cat >> confdefs.h <<\EOF
11034 #define HAVE_KRB4 1
11035 EOF
11036
11037
11038                         KRB4_LIBS="-lkrb -ldes"
11039
11040                         if test $ac_cv_header_krb_archaeology_h = yes ; then
11041                                 cat >> confdefs.h <<\EOF
11042 #define HAVE_KTH_KERBEROS 1
11043 EOF
11044
11045                         fi
11046                 fi
11047         fi
11048 fi
11049
11050 if test $ol_link_krb4 = yes -a $ol_enable_kpasswd != no ; then
11051         ol_link_kpasswd=yes
11052 fi
11053
11054 if test $ol_link_krb4 = yes -a $ol_enable_kbind != no ; then
11055         ol_link_kbind=yes
11056
11057 elif test $ol_enable_kbind = yes ; then
11058         { echo "configure: error: Kerberos IV detection failed" 1>&2; exit 1; }
11059 fi
11060
11061 if test $ol_link_krb4 = yes -o $ol_link_krb5 = yes ; then
11062         cat >> confdefs.h <<\EOF
11063 #define HAVE_KERBEROS 1
11064 EOF
11065
11066
11067 elif test $ol_with_kerberos != auto -a $ol_with_kerberos != no ; then
11068         { echo "configure: error: Kerberos detection failed" 1>&2; exit 1; }
11069 fi
11070
11071 ol_link_tls=no
11072 if test $ol_with_tls != no ; then
11073         for ac_hdr in openssl/ssl.h ssl.h
11074 do
11075 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11076 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11077 echo "configure:11078: checking for $ac_hdr" >&5
11078 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11079   echo $ac_n "(cached) $ac_c" 1>&6
11080 else
11081   cat > conftest.$ac_ext <<EOF
11082 #line 11083 "configure"
11083 #include "confdefs.h"
11084 #include <$ac_hdr>
11085 EOF
11086 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11087 { (eval echo configure:11088: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11088 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11089 if test -z "$ac_err"; then
11090   rm -rf conftest*
11091   eval "ac_cv_header_$ac_safe=yes"
11092 else
11093   echo "$ac_err" >&5
11094   echo "configure: failed program was:" >&5
11095   cat conftest.$ac_ext >&5
11096   rm -rf conftest*
11097   eval "ac_cv_header_$ac_safe=no"
11098 fi
11099 rm -f conftest*
11100 fi
11101 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11102   echo "$ac_t""yes" 1>&6
11103     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11104   cat >> confdefs.h <<EOF
11105 #define $ac_tr_hdr 1
11106 EOF
11107  
11108 else
11109   echo "$ac_t""no" 1>&6
11110 fi
11111 done
11112
11113         
11114         if test $ac_cv_header_openssl_ssl_h = yes \
11115                 -o $ac_cv_header_ssl_h = yes ; then
11116                 echo $ac_n "checking for SSLeay_add_ssl_algorithms in -lssl""... $ac_c" 1>&6
11117 echo "configure:11118: checking for SSLeay_add_ssl_algorithms in -lssl" >&5
11118 ac_lib_var=`echo ssl'_'SSLeay_add_ssl_algorithms | sed 'y%./+-:%__p__%'`
11119 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11120   echo $ac_n "(cached) $ac_c" 1>&6
11121 else
11122   ac_save_LIBS="$LIBS"
11123 LIBS="-lssl -lcrypto $LIBS"
11124 cat > conftest.$ac_ext <<EOF
11125 #line 11126 "configure"
11126 #include "confdefs.h"
11127 /* Override any gcc2 internal prototype to avoid an error.  */
11128 /* We use char because int might match the return type of a gcc2
11129     builtin and then its argument prototype would still apply.  */
11130 char SSLeay_add_ssl_algorithms();
11131
11132 int main() {
11133 SSLeay_add_ssl_algorithms()
11134 ; return 0; }
11135 EOF
11136 if { (eval echo configure:11137: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11137   rm -rf conftest*
11138   eval "ac_cv_lib_$ac_lib_var=yes"
11139 else
11140   echo "configure: failed program was:" >&5
11141   cat conftest.$ac_ext >&5
11142   rm -rf conftest*
11143   eval "ac_cv_lib_$ac_lib_var=no"
11144 fi
11145 rm -f conftest*
11146 LIBS="$ac_save_LIBS"
11147
11148 fi
11149 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11150   echo "$ac_t""yes" 1>&6
11151   have_ssleay=yes
11152                         need_rsaref=no
11153 else
11154   echo "$ac_t""no" 1>&6
11155 have_ssleay=no
11156 fi
11157
11158                         
11159                 if test $have_ssleay = no ; then
11160                         echo $ac_n "checking for SSL_library_init in -lssl""... $ac_c" 1>&6
11161 echo "configure:11162: checking for SSL_library_init in -lssl" >&5
11162 ac_lib_var=`echo ssl'_'SSL_library_init | sed 'y%./+-:%__p__%'`
11163 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11164   echo $ac_n "(cached) $ac_c" 1>&6
11165 else
11166   ac_save_LIBS="$LIBS"
11167 LIBS="-lssl -lcrypto $LIBS"
11168 cat > conftest.$ac_ext <<EOF
11169 #line 11170 "configure"
11170 #include "confdefs.h"
11171 /* Override any gcc2 internal prototype to avoid an error.  */
11172 /* We use char because int might match the return type of a gcc2
11173     builtin and then its argument prototype would still apply.  */
11174 char SSL_library_init();
11175
11176 int main() {
11177 SSL_library_init()
11178 ; return 0; }
11179 EOF
11180 if { (eval echo configure:11181: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11181   rm -rf conftest*
11182   eval "ac_cv_lib_$ac_lib_var=yes"
11183 else
11184   echo "configure: failed program was:" >&5
11185   cat conftest.$ac_ext >&5
11186   rm -rf conftest*
11187   eval "ac_cv_lib_$ac_lib_var=no"
11188 fi
11189 rm -f conftest*
11190 LIBS="$ac_save_LIBS"
11191
11192 fi
11193 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11194   echo "$ac_t""yes" 1>&6
11195   have_ssleay=yes
11196                                 need_rsaref=no
11197 else
11198   echo "$ac_t""no" 1>&6
11199 have_ssleay=no
11200 fi
11201
11202                 fi
11203
11204                 if test $have_ssleay = no ; then
11205                         echo $ac_n "checking for ssl3_accept in -lssl""... $ac_c" 1>&6
11206 echo "configure:11207: checking for ssl3_accept in -lssl" >&5
11207 ac_lib_var=`echo ssl'_'ssl3_accept | sed 'y%./+-:%__p__%'`
11208 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11209   echo $ac_n "(cached) $ac_c" 1>&6
11210 else
11211   ac_save_LIBS="$LIBS"
11212 LIBS="-lssl -lcrypto -lRSAglue -lrsaref $LIBS"
11213 cat > conftest.$ac_ext <<EOF
11214 #line 11215 "configure"
11215 #include "confdefs.h"
11216 /* Override any gcc2 internal prototype to avoid an error.  */
11217 /* We use char because int might match the return type of a gcc2
11218     builtin and then its argument prototype would still apply.  */
11219 char ssl3_accept();
11220
11221 int main() {
11222 ssl3_accept()
11223 ; return 0; }
11224 EOF
11225 if { (eval echo configure:11226: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11226   rm -rf conftest*
11227   eval "ac_cv_lib_$ac_lib_var=yes"
11228 else
11229   echo "configure: failed program was:" >&5
11230   cat conftest.$ac_ext >&5
11231   rm -rf conftest*
11232   eval "ac_cv_lib_$ac_lib_var=no"
11233 fi
11234 rm -f conftest*
11235 LIBS="$ac_save_LIBS"
11236
11237 fi
11238 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11239   echo "$ac_t""yes" 1>&6
11240   have_ssleay=yes
11241                                 need_rsaref=yes
11242 else
11243   echo "$ac_t""no" 1>&6
11244 have_ssleay=no
11245 fi
11246
11247                 fi
11248
11249                 if test $have_ssleay = yes ; then
11250                         ol_with_tls=found
11251                         ol_link_tls=yes
11252
11253                         cat >> confdefs.h <<\EOF
11254 #define HAVE_SSLEAY 1
11255 EOF
11256
11257
11258                         if test $need_rsaref = yes; then
11259                                 cat >> confdefs.h <<\EOF
11260 #define HAVE_RSAREF 1
11261 EOF
11262
11263
11264                                 TLS_LIBS="-lssl -lcrypto -lRSAglue -lrsaref"
11265                         else
11266                                 TLS_LIBS="-lssl -lcrypto"
11267                         fi
11268                 fi
11269         fi
11270
11271 else
11272         echo "configure: warning: TLS data protection not supported!" 1>&2
11273 fi
11274
11275 WITH_TLS=no
11276 if test $ol_link_tls = yes ; then
11277         cat >> confdefs.h <<\EOF
11278 #define HAVE_TLS 1
11279 EOF
11280
11281         WITH_TLS=yes
11282
11283 elif test $ol_with_tls = auto ; then
11284         echo "configure: warning: Could not locate TLS/SSL package" 1>&2
11285         echo "configure: warning: TLS data protection not supported!" 1>&2
11286
11287 elif test $ol_with_tls != no ; then
11288         { echo "configure: error: Could not locate TLS/SSL package" 1>&2; exit 1; }
11289 fi
11290
11291 if test $ol_enable_lmpasswd != no; then
11292         if test $ol_link_tls != yes ; then
11293                 { echo "configure: error: LAN Manager passwords require OpenSSL" 1>&2; exit 1; }
11294         fi
11295
11296         cat >> confdefs.h <<\EOF
11297 #define SLAPD_LMHASH 1
11298 EOF
11299
11300 fi
11301
11302 ol_link_threads=no
11303
11304 if test $ol_with_threads = auto -o $ol_with_threads = yes \
11305         -o $ol_with_threads = nt ; then
11306
11307         
11308         echo $ac_n "checking for _beginthread""... $ac_c" 1>&6
11309 echo "configure:11310: checking for _beginthread" >&5
11310 if eval "test \"\${ac_cv_func__beginthread+set}\" = set"; then
11311   echo $ac_n "(cached) $ac_c" 1>&6
11312 else
11313   cat > conftest.$ac_ext <<EOF
11314 #line 11315 "configure"
11315 #include "confdefs.h"
11316 /* System header to define __stub macros and hopefully few prototypes,
11317     which can conflict with char _beginthread(); below.  */
11318 #include <assert.h>
11319 /* Override any gcc2 internal prototype to avoid an error.  */
11320 /* We use char because int might match the return type of a gcc2
11321     builtin and then its argument prototype would still apply.  */
11322 char _beginthread();
11323 char (*f)();
11324
11325 int main() {
11326
11327 /* The GNU C library defines this for functions which it implements
11328     to always fail with ENOSYS.  Some functions are actually named
11329     something starting with __ and the normal name is an alias.  */
11330 #if defined (__stub__beginthread) || defined (__stub____beginthread)
11331 choke me
11332 #else
11333 f = _beginthread;
11334 #endif
11335
11336 ; return 0; }
11337 EOF
11338 if { (eval echo configure:11339: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11339   rm -rf conftest*
11340   eval "ac_cv_func__beginthread=yes"
11341 else
11342   echo "configure: failed program was:" >&5
11343   cat conftest.$ac_ext >&5
11344   rm -rf conftest*
11345   eval "ac_cv_func__beginthread=no"
11346 fi
11347 rm -f conftest*
11348 fi
11349
11350 if eval "test \"`echo '$ac_cv_func_'_beginthread`\" = yes"; then
11351   echo "$ac_t""yes" 1>&6
11352   :
11353 else
11354   echo "$ac_t""no" 1>&6
11355 fi
11356
11357
11358         if test $ac_cv_func__beginthread = yes ; then
11359                 cat >> confdefs.h <<\EOF
11360 #define HAVE_NT_THREADS 1
11361 EOF
11362
11363                 ol_cv_nt_threads=yes
11364         fi
11365
11366
11367         if test "$ol_cv_nt_threads" = yes ; then
11368                 ol_link_threads=nt
11369                 ol_with_threads=found
11370                 ol_with_yielding_select=yes
11371
11372                 cat >> confdefs.h <<\EOF
11373 #define HAVE_NT_SERVICE_MANAGER 1
11374 EOF
11375
11376                 cat >> confdefs.h <<\EOF
11377 #define HAVE_NT_EVENT_LOG 1
11378 EOF
11379
11380         fi
11381
11382         if test $ol_with_threads = nt ; then
11383                 { echo "configure: error: could not locate NT Threads" 1>&2; exit 1; }
11384         fi
11385 fi
11386
11387 if test $ol_with_threads = auto -o $ol_with_threads = yes \
11388         -o $ol_with_threads = posix ; then
11389
11390         for ac_hdr in pthread.h
11391 do
11392 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11393 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11394 echo "configure:11395: checking for $ac_hdr" >&5
11395 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11396   echo $ac_n "(cached) $ac_c" 1>&6
11397 else
11398   cat > conftest.$ac_ext <<EOF
11399 #line 11400 "configure"
11400 #include "confdefs.h"
11401 #include <$ac_hdr>
11402 EOF
11403 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11404 { (eval echo configure:11405: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11405 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11406 if test -z "$ac_err"; then
11407   rm -rf conftest*
11408   eval "ac_cv_header_$ac_safe=yes"
11409 else
11410   echo "$ac_err" >&5
11411   echo "configure: failed program was:" >&5
11412   cat conftest.$ac_ext >&5
11413   rm -rf conftest*
11414   eval "ac_cv_header_$ac_safe=no"
11415 fi
11416 rm -f conftest*
11417 fi
11418 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11419   echo "$ac_t""yes" 1>&6
11420     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11421   cat >> confdefs.h <<EOF
11422 #define $ac_tr_hdr 1
11423 EOF
11424  
11425 else
11426   echo "$ac_t""no" 1>&6
11427 fi
11428 done
11429
11430
11431         if test $ac_cv_header_pthread_h = yes ; then
11432                 echo $ac_n "checking POSIX thread version""... $ac_c" 1>&6
11433 echo "configure:11434: checking POSIX thread version" >&5
11434 if eval "test \"\${ol_cv_pthread_version+set}\" = set"; then
11435   echo $ac_n "(cached) $ac_c" 1>&6
11436 else
11437   
11438         cat > conftest.$ac_ext <<EOF
11439 #line 11440 "configure"
11440 #include "confdefs.h"
11441
11442 #               include <pthread.h>
11443         
11444 int main() {
11445
11446                 int i = PTHREAD_CREATE_JOINABLE;
11447         
11448 ; return 0; }
11449 EOF
11450 if { (eval echo configure:11451: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11451   rm -rf conftest*
11452   
11453         cat > conftest.$ac_ext <<EOF
11454 #line 11455 "configure"
11455 #include "confdefs.h"
11456 #include <pthread.h>
11457 EOF
11458 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11459   egrep "pthread_detach" >/dev/null 2>&1; then
11460   rm -rf conftest*
11461   ol_cv_pthread_version=10
11462 else
11463   rm -rf conftest*
11464   ol_cv_pthread_version=8
11465 fi
11466 rm -f conftest*
11467
11468 else
11469   echo "configure: failed program was:" >&5
11470   cat conftest.$ac_ext >&5
11471   rm -rf conftest*
11472   
11473         cat > conftest.$ac_ext <<EOF
11474 #line 11475 "configure"
11475 #include "confdefs.h"
11476
11477 #               include <pthread.h>
11478 #               ifdef PTHREAD_CREATE_UNDETACHED
11479                 draft7
11480 #               endif
11481         
11482 EOF
11483 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11484   egrep "draft7" >/dev/null 2>&1; then
11485   rm -rf conftest*
11486   ol_cv_pthread_version=7
11487 else
11488   rm -rf conftest*
11489   
11490         cat > conftest.$ac_ext <<EOF
11491 #line 11492 "configure"
11492 #include "confdefs.h"
11493 #include <pthread.h>
11494 EOF
11495 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11496   egrep "pthread_attr_init" >/dev/null 2>&1; then
11497   rm -rf conftest*
11498   ol_cv_pthread_version=6
11499 else
11500   rm -rf conftest*
11501   
11502         cat > conftest.$ac_ext <<EOF
11503 #line 11504 "configure"
11504 #include "confdefs.h"
11505
11506 #               include <pthread.h>
11507 #ifdef          PTHREAD_MUTEX_INITIALIZER
11508                 draft5
11509 #endif
11510         
11511 EOF
11512 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11513   egrep "draft5" >/dev/null 2>&1; then
11514   rm -rf conftest*
11515   ol_cv_pthread_version=5
11516 else
11517   rm -rf conftest*
11518   ol_cv_pthread_version=4
11519 fi
11520 rm -f conftest*
11521  
11522 fi
11523 rm -f conftest*
11524  
11525 fi
11526 rm -f conftest*
11527  
11528 fi
11529 rm -f conftest*
11530
11531 fi
11532
11533 echo "$ac_t""$ol_cv_pthread_version" 1>&6
11534
11535
11536                 if test $ol_cv_pthread_version != 0 ; then
11537                         cat >> confdefs.h <<EOF
11538 #define HAVE_PTHREADS $ol_cv_pthread_version
11539 EOF
11540
11541                 else
11542                         { echo "configure: error: unknown pthread version" 1>&2; exit 1; }
11543                 fi
11544
11545                 # consider threads found
11546                 ol_with_threads=found
11547
11548                 
11549         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
11550 echo "configure:11551: checking for LinuxThreads pthread.h" >&5
11551 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
11552   echo $ac_n "(cached) $ac_c" 1>&6
11553 else
11554   cat > conftest.$ac_ext <<EOF
11555 #line 11556 "configure"
11556 #include "confdefs.h"
11557 #include <pthread.h>
11558 EOF
11559 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11560   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
11561   rm -rf conftest*
11562   ol_cv_header_linux_threads=yes
11563 else
11564   rm -rf conftest*
11565   ol_cv_header_linux_threads=no
11566 fi
11567 rm -f conftest*
11568
11569                 
11570 fi
11571
11572 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
11573         if test $ol_cv_header_linux_threads = yes; then
11574                 cat >> confdefs.h <<\EOF
11575 #define HAVE_LINUX_THREADS 1
11576 EOF
11577
11578         fi
11579
11580                 
11581         echo $ac_n "checking for GNU Pth pthread.h""... $ac_c" 1>&6
11582 echo "configure:11583: checking for GNU Pth pthread.h" >&5
11583 if eval "test \"\${ol_cv_header_gnu_pth_pthread_h+set}\" = set"; then
11584   echo $ac_n "(cached) $ac_c" 1>&6
11585 else
11586   cat > conftest.$ac_ext <<EOF
11587 #line 11588 "configure"
11588 #include "confdefs.h"
11589 #include <pthread.h>
11590 #ifdef _POSIX_THREAD_IS_GNU_PTH
11591         __gnu_pth__;
11592 #endif
11593
11594 EOF
11595 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11596   egrep "__gnu_pth__" >/dev/null 2>&1; then
11597   rm -rf conftest*
11598   ol_cv_header_gnu_pth_pthread_h=yes
11599 else
11600   rm -rf conftest*
11601   ol_cv_header_gnu_pth_pthread_h=no
11602 fi
11603 rm -f conftest*
11604
11605                 
11606 fi
11607
11608 echo "$ac_t""$ol_cv_header_gnu_pth_pthread_h" 1>&6
11609
11610
11611                 if test $ol_cv_header_gnu_pth_pthread_h = no ; then
11612                         for ac_hdr in sched.h
11613 do
11614 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11615 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11616 echo "configure:11617: checking for $ac_hdr" >&5
11617 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11618   echo $ac_n "(cached) $ac_c" 1>&6
11619 else
11620   cat > conftest.$ac_ext <<EOF
11621 #line 11622 "configure"
11622 #include "confdefs.h"
11623 #include <$ac_hdr>
11624 EOF
11625 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11626 { (eval echo configure:11627: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11627 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11628 if test -z "$ac_err"; then
11629   rm -rf conftest*
11630   eval "ac_cv_header_$ac_safe=yes"
11631 else
11632   echo "$ac_err" >&5
11633   echo "configure: failed program was:" >&5
11634   cat conftest.$ac_ext >&5
11635   rm -rf conftest*
11636   eval "ac_cv_header_$ac_safe=no"
11637 fi
11638 rm -f conftest*
11639 fi
11640 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11641   echo "$ac_t""yes" 1>&6
11642     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11643   cat >> confdefs.h <<EOF
11644 #define $ac_tr_hdr 1
11645 EOF
11646  
11647 else
11648   echo "$ac_t""no" 1>&6
11649 fi
11650 done
11651
11652                 fi
11653
11654                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
11655                                 echo $ac_n "checking for pthread_create in default libraries""... $ac_c" 1>&6
11656 echo "configure:11657: checking for pthread_create in default libraries" >&5
11657 if eval "test \"\${ol_cv_pthread_create+set}\" = set"; then
11658   echo $ac_n "(cached) $ac_c" 1>&6
11659 else
11660   
11661                 if test "$cross_compiling" = yes; then
11662   cat > conftest.$ac_ext <<EOF
11663 #line 11664 "configure"
11664 #include "confdefs.h"
11665 /* pthread test headers */
11666 #include <pthread.h>
11667 #if HAVE_PTHREADS < 7
11668 #include <errno.h>
11669 #endif
11670 #ifndef NULL
11671 #define NULL (void*)0
11672 #endif
11673
11674 static void *task(p)
11675         void *p;
11676 {
11677         return (void *) (p == NULL);
11678 }
11679
11680 int main() {
11681
11682         /* pthread test function */
11683 #ifndef PTHREAD_CREATE_DETACHED
11684 #define PTHREAD_CREATE_DETACHED 1
11685 #endif
11686         pthread_t t;
11687         int status;
11688         int detach = PTHREAD_CREATE_DETACHED;
11689
11690 #if HAVE_PTHREADS > 4
11691         /* Final pthreads */
11692         pthread_attr_t attr;
11693
11694         status = pthread_attr_init(&attr);
11695         if( status ) return status;
11696
11697 #if HAVE_PTHREADS < 7
11698         status = pthread_attr_setdetachstate(&attr, &detach);
11699         if( status < 0 ) status = errno;
11700 #else
11701         status = pthread_attr_setdetachstate(&attr, detach);
11702 #endif
11703         if( status ) return status;
11704         status = pthread_create( &t, &attr, task, NULL );
11705 #if HAVE_PTHREADS < 7
11706         if( status < 0 ) status = errno;
11707 #endif
11708         if( status ) return status;
11709 #else
11710         /* Draft 4 pthreads */
11711         status = pthread_create( &t, pthread_attr_default, task, NULL );
11712         if( status ) return errno;
11713
11714         /* give thread a chance to complete */
11715         /* it should remain joinable and hence detachable */
11716         sleep( 1 );
11717
11718         status = pthread_detach( &t );
11719         if( status ) return errno;
11720 #endif
11721
11722 #ifdef HAVE_LINUX_THREADS
11723         pthread_kill_other_threads_np();
11724 #endif
11725
11726         return 0;
11727
11728 ; return 0; }
11729 EOF
11730 if { (eval echo configure:11731: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11731   rm -rf conftest*
11732   ol_cv_pthread_create=yes
11733 else
11734   echo "configure: failed program was:" >&5
11735   cat conftest.$ac_ext >&5
11736   rm -rf conftest*
11737   ol_cv_pthread_create=no
11738 fi
11739 rm -f conftest*
11740 else
11741   cat > conftest.$ac_ext <<EOF
11742 #line 11743 "configure"
11743 #include "confdefs.h"
11744 /* pthread test headers */
11745 #include <pthread.h>
11746 #if HAVE_PTHREADS < 7
11747 #include <errno.h>
11748 #endif
11749 #ifndef NULL
11750 #define NULL (void*)0
11751 #endif
11752
11753 static void *task(p)
11754         void *p;
11755 {
11756         return (void *) (p == NULL);
11757 }
11758
11759
11760 int main(argc, argv)
11761         int argc;
11762         char **argv;
11763 {
11764
11765         /* pthread test function */
11766 #ifndef PTHREAD_CREATE_DETACHED
11767 #define PTHREAD_CREATE_DETACHED 1
11768 #endif
11769         pthread_t t;
11770         int status;
11771         int detach = PTHREAD_CREATE_DETACHED;
11772
11773 #if HAVE_PTHREADS > 4
11774         /* Final pthreads */
11775         pthread_attr_t attr;
11776
11777         status = pthread_attr_init(&attr);
11778         if( status ) return status;
11779
11780 #if HAVE_PTHREADS < 7
11781         status = pthread_attr_setdetachstate(&attr, &detach);
11782         if( status < 0 ) status = errno;
11783 #else
11784         status = pthread_attr_setdetachstate(&attr, detach);
11785 #endif
11786         if( status ) return status;
11787         status = pthread_create( &t, &attr, task, NULL );
11788 #if HAVE_PTHREADS < 7
11789         if( status < 0 ) status = errno;
11790 #endif
11791         if( status ) return status;
11792 #else
11793         /* Draft 4 pthreads */
11794         status = pthread_create( &t, pthread_attr_default, task, NULL );
11795         if( status ) return errno;
11796
11797         /* give thread a chance to complete */
11798         /* it should remain joinable and hence detachable */
11799         sleep( 1 );
11800
11801         status = pthread_detach( &t );
11802         if( status ) return errno;
11803 #endif
11804
11805 #ifdef HAVE_LINUX_THREADS
11806         pthread_kill_other_threads_np();
11807 #endif
11808
11809         return 0;
11810
11811 }
11812
11813 EOF
11814 if { (eval echo configure:11815: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11815 then
11816   ol_cv_pthread_create=yes
11817 else
11818   echo "configure: failed program was:" >&5
11819   cat conftest.$ac_ext >&5
11820   rm -fr conftest*
11821   ol_cv_pthread_create=no
11822 fi
11823 rm -fr conftest*
11824 fi
11825
11826 fi
11827
11828 echo "$ac_t""$ol_cv_pthread_create" 1>&6
11829
11830                 if test $ol_cv_pthread_create != no ; then
11831                         ol_link_threads=posix
11832                         ol_link_pthreads=""
11833                 fi
11834                 
11835                 # Pthread try link: -kthread (ol_cv_pthread_kthread)
11836 if test "$ol_link_threads" = no ; then
11837         # try -kthread
11838         echo $ac_n "checking for pthread link with -kthread""... $ac_c" 1>&6
11839 echo "configure:11840: checking for pthread link with -kthread" >&5
11840 if eval "test \"\${ol_cv_pthread_kthread+set}\" = set"; then
11841   echo $ac_n "(cached) $ac_c" 1>&6
11842 else
11843   
11844                 # save the flags
11845                 ol_LIBS="$LIBS"
11846                 LIBS="-kthread $LIBS"
11847
11848                 if test "$cross_compiling" = yes; then
11849   cat > conftest.$ac_ext <<EOF
11850 #line 11851 "configure"
11851 #include "confdefs.h"
11852 /* pthread test headers */
11853 #include <pthread.h>
11854 #if HAVE_PTHREADS < 7
11855 #include <errno.h>
11856 #endif
11857 #ifndef NULL
11858 #define NULL (void*)0
11859 #endif
11860
11861 static void *task(p)
11862         void *p;
11863 {
11864         return (void *) (p == NULL);
11865 }
11866
11867 int main() {
11868
11869         /* pthread test function */
11870 #ifndef PTHREAD_CREATE_DETACHED
11871 #define PTHREAD_CREATE_DETACHED 1
11872 #endif
11873         pthread_t t;
11874         int status;
11875         int detach = PTHREAD_CREATE_DETACHED;
11876
11877 #if HAVE_PTHREADS > 4
11878         /* Final pthreads */
11879         pthread_attr_t attr;
11880
11881         status = pthread_attr_init(&attr);
11882         if( status ) return status;
11883
11884 #if HAVE_PTHREADS < 7
11885         status = pthread_attr_setdetachstate(&attr, &detach);
11886         if( status < 0 ) status = errno;
11887 #else
11888         status = pthread_attr_setdetachstate(&attr, detach);
11889 #endif
11890         if( status ) return status;
11891         status = pthread_create( &t, &attr, task, NULL );
11892 #if HAVE_PTHREADS < 7
11893         if( status < 0 ) status = errno;
11894 #endif
11895         if( status ) return status;
11896 #else
11897         /* Draft 4 pthreads */
11898         status = pthread_create( &t, pthread_attr_default, task, NULL );
11899         if( status ) return errno;
11900
11901         /* give thread a chance to complete */
11902         /* it should remain joinable and hence detachable */
11903         sleep( 1 );
11904
11905         status = pthread_detach( &t );
11906         if( status ) return errno;
11907 #endif
11908
11909 #ifdef HAVE_LINUX_THREADS
11910         pthread_kill_other_threads_np();
11911 #endif
11912
11913         return 0;
11914
11915 ; return 0; }
11916 EOF
11917 if { (eval echo configure:11918: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11918   rm -rf conftest*
11919   ol_cv_pthread_kthread=yes
11920 else
11921   echo "configure: failed program was:" >&5
11922   cat conftest.$ac_ext >&5
11923   rm -rf conftest*
11924   ol_cv_pthread_kthread=no
11925 fi
11926 rm -f conftest*
11927 else
11928   cat > conftest.$ac_ext <<EOF
11929 #line 11930 "configure"
11930 #include "confdefs.h"
11931 /* pthread test headers */
11932 #include <pthread.h>
11933 #if HAVE_PTHREADS < 7
11934 #include <errno.h>
11935 #endif
11936 #ifndef NULL
11937 #define NULL (void*)0
11938 #endif
11939
11940 static void *task(p)
11941         void *p;
11942 {
11943         return (void *) (p == NULL);
11944 }
11945
11946
11947 int main(argc, argv)
11948         int argc;
11949         char **argv;
11950 {
11951
11952         /* pthread test function */
11953 #ifndef PTHREAD_CREATE_DETACHED
11954 #define PTHREAD_CREATE_DETACHED 1
11955 #endif
11956         pthread_t t;
11957         int status;
11958         int detach = PTHREAD_CREATE_DETACHED;
11959
11960 #if HAVE_PTHREADS > 4
11961         /* Final pthreads */
11962         pthread_attr_t attr;
11963
11964         status = pthread_attr_init(&attr);
11965         if( status ) return status;
11966
11967 #if HAVE_PTHREADS < 7
11968         status = pthread_attr_setdetachstate(&attr, &detach);
11969         if( status < 0 ) status = errno;
11970 #else
11971         status = pthread_attr_setdetachstate(&attr, detach);
11972 #endif
11973         if( status ) return status;
11974         status = pthread_create( &t, &attr, task, NULL );
11975 #if HAVE_PTHREADS < 7
11976         if( status < 0 ) status = errno;
11977 #endif
11978         if( status ) return status;
11979 #else
11980         /* Draft 4 pthreads */
11981         status = pthread_create( &t, pthread_attr_default, task, NULL );
11982         if( status ) return errno;
11983
11984         /* give thread a chance to complete */
11985         /* it should remain joinable and hence detachable */
11986         sleep( 1 );
11987
11988         status = pthread_detach( &t );
11989         if( status ) return errno;
11990 #endif
11991
11992 #ifdef HAVE_LINUX_THREADS
11993         pthread_kill_other_threads_np();
11994 #endif
11995
11996         return 0;
11997
11998 }
11999
12000 EOF
12001 if { (eval echo configure:12002: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12002 then
12003   ol_cv_pthread_kthread=yes
12004 else
12005   echo "configure: failed program was:" >&5
12006   cat conftest.$ac_ext >&5
12007   rm -fr conftest*
12008   ol_cv_pthread_kthread=no
12009 fi
12010 rm -fr conftest*
12011 fi
12012
12013
12014                 # restore the LIBS
12015                 LIBS="$ol_LIBS"
12016         
12017 fi
12018
12019 echo "$ac_t""$ol_cv_pthread_kthread" 1>&6
12020
12021         if test $ol_cv_pthread_kthread = yes ; then
12022                 ol_link_pthreads="-kthread"
12023                 ol_link_threads=posix
12024         fi
12025 fi
12026
12027                 # Pthread try link: -pthread (ol_cv_pthread_pthread)
12028 if test "$ol_link_threads" = no ; then
12029         # try -pthread
12030         echo $ac_n "checking for pthread link with -pthread""... $ac_c" 1>&6
12031 echo "configure:12032: checking for pthread link with -pthread" >&5
12032 if eval "test \"\${ol_cv_pthread_pthread+set}\" = set"; then
12033   echo $ac_n "(cached) $ac_c" 1>&6
12034 else
12035   
12036                 # save the flags
12037                 ol_LIBS="$LIBS"
12038                 LIBS="-pthread $LIBS"
12039
12040                 if test "$cross_compiling" = yes; then
12041   cat > conftest.$ac_ext <<EOF
12042 #line 12043 "configure"
12043 #include "confdefs.h"
12044 /* pthread test headers */
12045 #include <pthread.h>
12046 #if HAVE_PTHREADS < 7
12047 #include <errno.h>
12048 #endif
12049 #ifndef NULL
12050 #define NULL (void*)0
12051 #endif
12052
12053 static void *task(p)
12054         void *p;
12055 {
12056         return (void *) (p == NULL);
12057 }
12058
12059 int main() {
12060
12061         /* pthread test function */
12062 #ifndef PTHREAD_CREATE_DETACHED
12063 #define PTHREAD_CREATE_DETACHED 1
12064 #endif
12065         pthread_t t;
12066         int status;
12067         int detach = PTHREAD_CREATE_DETACHED;
12068
12069 #if HAVE_PTHREADS > 4
12070         /* Final pthreads */
12071         pthread_attr_t attr;
12072
12073         status = pthread_attr_init(&attr);
12074         if( status ) return status;
12075
12076 #if HAVE_PTHREADS < 7
12077         status = pthread_attr_setdetachstate(&attr, &detach);
12078         if( status < 0 ) status = errno;
12079 #else
12080         status = pthread_attr_setdetachstate(&attr, detach);
12081 #endif
12082         if( status ) return status;
12083         status = pthread_create( &t, &attr, task, NULL );
12084 #if HAVE_PTHREADS < 7
12085         if( status < 0 ) status = errno;
12086 #endif
12087         if( status ) return status;
12088 #else
12089         /* Draft 4 pthreads */
12090         status = pthread_create( &t, pthread_attr_default, task, NULL );
12091         if( status ) return errno;
12092
12093         /* give thread a chance to complete */
12094         /* it should remain joinable and hence detachable */
12095         sleep( 1 );
12096
12097         status = pthread_detach( &t );
12098         if( status ) return errno;
12099 #endif
12100
12101 #ifdef HAVE_LINUX_THREADS
12102         pthread_kill_other_threads_np();
12103 #endif
12104
12105         return 0;
12106
12107 ; return 0; }
12108 EOF
12109 if { (eval echo configure:12110: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12110   rm -rf conftest*
12111   ol_cv_pthread_pthread=yes
12112 else
12113   echo "configure: failed program was:" >&5
12114   cat conftest.$ac_ext >&5
12115   rm -rf conftest*
12116   ol_cv_pthread_pthread=no
12117 fi
12118 rm -f conftest*
12119 else
12120   cat > conftest.$ac_ext <<EOF
12121 #line 12122 "configure"
12122 #include "confdefs.h"
12123 /* pthread test headers */
12124 #include <pthread.h>
12125 #if HAVE_PTHREADS < 7
12126 #include <errno.h>
12127 #endif
12128 #ifndef NULL
12129 #define NULL (void*)0
12130 #endif
12131
12132 static void *task(p)
12133         void *p;
12134 {
12135         return (void *) (p == NULL);
12136 }
12137
12138
12139 int main(argc, argv)
12140         int argc;
12141         char **argv;
12142 {
12143
12144         /* pthread test function */
12145 #ifndef PTHREAD_CREATE_DETACHED
12146 #define PTHREAD_CREATE_DETACHED 1
12147 #endif
12148         pthread_t t;
12149         int status;
12150         int detach = PTHREAD_CREATE_DETACHED;
12151
12152 #if HAVE_PTHREADS > 4
12153         /* Final pthreads */
12154         pthread_attr_t attr;
12155
12156         status = pthread_attr_init(&attr);
12157         if( status ) return status;
12158
12159 #if HAVE_PTHREADS < 7
12160         status = pthread_attr_setdetachstate(&attr, &detach);
12161         if( status < 0 ) status = errno;
12162 #else
12163         status = pthread_attr_setdetachstate(&attr, detach);
12164 #endif
12165         if( status ) return status;
12166         status = pthread_create( &t, &attr, task, NULL );
12167 #if HAVE_PTHREADS < 7
12168         if( status < 0 ) status = errno;
12169 #endif
12170         if( status ) return status;
12171 #else
12172         /* Draft 4 pthreads */
12173         status = pthread_create( &t, pthread_attr_default, task, NULL );
12174         if( status ) return errno;
12175
12176         /* give thread a chance to complete */
12177         /* it should remain joinable and hence detachable */
12178         sleep( 1 );
12179
12180         status = pthread_detach( &t );
12181         if( status ) return errno;
12182 #endif
12183
12184 #ifdef HAVE_LINUX_THREADS
12185         pthread_kill_other_threads_np();
12186 #endif
12187
12188         return 0;
12189
12190 }
12191
12192 EOF
12193 if { (eval echo configure:12194: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12194 then
12195   ol_cv_pthread_pthread=yes
12196 else
12197   echo "configure: failed program was:" >&5
12198   cat conftest.$ac_ext >&5
12199   rm -fr conftest*
12200   ol_cv_pthread_pthread=no
12201 fi
12202 rm -fr conftest*
12203 fi
12204
12205
12206                 # restore the LIBS
12207                 LIBS="$ol_LIBS"
12208         
12209 fi
12210
12211 echo "$ac_t""$ol_cv_pthread_pthread" 1>&6
12212
12213         if test $ol_cv_pthread_pthread = yes ; then
12214                 ol_link_pthreads="-pthread"
12215                 ol_link_threads=posix
12216         fi
12217 fi
12218
12219                 # Pthread try link: -pthreads (ol_cv_pthread_pthreads)
12220 if test "$ol_link_threads" = no ; then
12221         # try -pthreads
12222         echo $ac_n "checking for pthread link with -pthreads""... $ac_c" 1>&6
12223 echo "configure:12224: checking for pthread link with -pthreads" >&5
12224 if eval "test \"\${ol_cv_pthread_pthreads+set}\" = set"; then
12225   echo $ac_n "(cached) $ac_c" 1>&6
12226 else
12227   
12228                 # save the flags
12229                 ol_LIBS="$LIBS"
12230                 LIBS="-pthreads $LIBS"
12231
12232                 if test "$cross_compiling" = yes; then
12233   cat > conftest.$ac_ext <<EOF
12234 #line 12235 "configure"
12235 #include "confdefs.h"
12236 /* pthread test headers */
12237 #include <pthread.h>
12238 #if HAVE_PTHREADS < 7
12239 #include <errno.h>
12240 #endif
12241 #ifndef NULL
12242 #define NULL (void*)0
12243 #endif
12244
12245 static void *task(p)
12246         void *p;
12247 {
12248         return (void *) (p == NULL);
12249 }
12250
12251 int main() {
12252
12253         /* pthread test function */
12254 #ifndef PTHREAD_CREATE_DETACHED
12255 #define PTHREAD_CREATE_DETACHED 1
12256 #endif
12257         pthread_t t;
12258         int status;
12259         int detach = PTHREAD_CREATE_DETACHED;
12260
12261 #if HAVE_PTHREADS > 4
12262         /* Final pthreads */
12263         pthread_attr_t attr;
12264
12265         status = pthread_attr_init(&attr);
12266         if( status ) return status;
12267
12268 #if HAVE_PTHREADS < 7
12269         status = pthread_attr_setdetachstate(&attr, &detach);
12270         if( status < 0 ) status = errno;
12271 #else
12272         status = pthread_attr_setdetachstate(&attr, detach);
12273 #endif
12274         if( status ) return status;
12275         status = pthread_create( &t, &attr, task, NULL );
12276 #if HAVE_PTHREADS < 7
12277         if( status < 0 ) status = errno;
12278 #endif
12279         if( status ) return status;
12280 #else
12281         /* Draft 4 pthreads */
12282         status = pthread_create( &t, pthread_attr_default, task, NULL );
12283         if( status ) return errno;
12284
12285         /* give thread a chance to complete */
12286         /* it should remain joinable and hence detachable */
12287         sleep( 1 );
12288
12289         status = pthread_detach( &t );
12290         if( status ) return errno;
12291 #endif
12292
12293 #ifdef HAVE_LINUX_THREADS
12294         pthread_kill_other_threads_np();
12295 #endif
12296
12297         return 0;
12298
12299 ; return 0; }
12300 EOF
12301 if { (eval echo configure:12302: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12302   rm -rf conftest*
12303   ol_cv_pthread_pthreads=yes
12304 else
12305   echo "configure: failed program was:" >&5
12306   cat conftest.$ac_ext >&5
12307   rm -rf conftest*
12308   ol_cv_pthread_pthreads=no
12309 fi
12310 rm -f conftest*
12311 else
12312   cat > conftest.$ac_ext <<EOF
12313 #line 12314 "configure"
12314 #include "confdefs.h"
12315 /* pthread test headers */
12316 #include <pthread.h>
12317 #if HAVE_PTHREADS < 7
12318 #include <errno.h>
12319 #endif
12320 #ifndef NULL
12321 #define NULL (void*)0
12322 #endif
12323
12324 static void *task(p)
12325         void *p;
12326 {
12327         return (void *) (p == NULL);
12328 }
12329
12330
12331 int main(argc, argv)
12332         int argc;
12333         char **argv;
12334 {
12335
12336         /* pthread test function */
12337 #ifndef PTHREAD_CREATE_DETACHED
12338 #define PTHREAD_CREATE_DETACHED 1
12339 #endif
12340         pthread_t t;
12341         int status;
12342         int detach = PTHREAD_CREATE_DETACHED;
12343
12344 #if HAVE_PTHREADS > 4
12345         /* Final pthreads */
12346         pthread_attr_t attr;
12347
12348         status = pthread_attr_init(&attr);
12349         if( status ) return status;
12350
12351 #if HAVE_PTHREADS < 7
12352         status = pthread_attr_setdetachstate(&attr, &detach);
12353         if( status < 0 ) status = errno;
12354 #else
12355         status = pthread_attr_setdetachstate(&attr, detach);
12356 #endif
12357         if( status ) return status;
12358         status = pthread_create( &t, &attr, task, NULL );
12359 #if HAVE_PTHREADS < 7
12360         if( status < 0 ) status = errno;
12361 #endif
12362         if( status ) return status;
12363 #else
12364         /* Draft 4 pthreads */
12365         status = pthread_create( &t, pthread_attr_default, task, NULL );
12366         if( status ) return errno;
12367
12368         /* give thread a chance to complete */
12369         /* it should remain joinable and hence detachable */
12370         sleep( 1 );
12371
12372         status = pthread_detach( &t );
12373         if( status ) return errno;
12374 #endif
12375
12376 #ifdef HAVE_LINUX_THREADS
12377         pthread_kill_other_threads_np();
12378 #endif
12379
12380         return 0;
12381
12382 }
12383
12384 EOF
12385 if { (eval echo configure:12386: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12386 then
12387   ol_cv_pthread_pthreads=yes
12388 else
12389   echo "configure: failed program was:" >&5
12390   cat conftest.$ac_ext >&5
12391   rm -fr conftest*
12392   ol_cv_pthread_pthreads=no
12393 fi
12394 rm -fr conftest*
12395 fi
12396
12397
12398                 # restore the LIBS
12399                 LIBS="$ol_LIBS"
12400         
12401 fi
12402
12403 echo "$ac_t""$ol_cv_pthread_pthreads" 1>&6
12404
12405         if test $ol_cv_pthread_pthreads = yes ; then
12406                 ol_link_pthreads="-pthreads"
12407                 ol_link_threads=posix
12408         fi
12409 fi
12410
12411                 # Pthread try link: -mthreads (ol_cv_pthread_mthreads)
12412 if test "$ol_link_threads" = no ; then
12413         # try -mthreads
12414         echo $ac_n "checking for pthread link with -mthreads""... $ac_c" 1>&6
12415 echo "configure:12416: checking for pthread link with -mthreads" >&5
12416 if eval "test \"\${ol_cv_pthread_mthreads+set}\" = set"; then
12417   echo $ac_n "(cached) $ac_c" 1>&6
12418 else
12419   
12420                 # save the flags
12421                 ol_LIBS="$LIBS"
12422                 LIBS="-mthreads $LIBS"
12423
12424                 if test "$cross_compiling" = yes; then
12425   cat > conftest.$ac_ext <<EOF
12426 #line 12427 "configure"
12427 #include "confdefs.h"
12428 /* pthread test headers */
12429 #include <pthread.h>
12430 #if HAVE_PTHREADS < 7
12431 #include <errno.h>
12432 #endif
12433 #ifndef NULL
12434 #define NULL (void*)0
12435 #endif
12436
12437 static void *task(p)
12438         void *p;
12439 {
12440         return (void *) (p == NULL);
12441 }
12442
12443 int main() {
12444
12445         /* pthread test function */
12446 #ifndef PTHREAD_CREATE_DETACHED
12447 #define PTHREAD_CREATE_DETACHED 1
12448 #endif
12449         pthread_t t;
12450         int status;
12451         int detach = PTHREAD_CREATE_DETACHED;
12452
12453 #if HAVE_PTHREADS > 4
12454         /* Final pthreads */
12455         pthread_attr_t attr;
12456
12457         status = pthread_attr_init(&attr);
12458         if( status ) return status;
12459
12460 #if HAVE_PTHREADS < 7
12461         status = pthread_attr_setdetachstate(&attr, &detach);
12462         if( status < 0 ) status = errno;
12463 #else
12464         status = pthread_attr_setdetachstate(&attr, detach);
12465 #endif
12466         if( status ) return status;
12467         status = pthread_create( &t, &attr, task, NULL );
12468 #if HAVE_PTHREADS < 7
12469         if( status < 0 ) status = errno;
12470 #endif
12471         if( status ) return status;
12472 #else
12473         /* Draft 4 pthreads */
12474         status = pthread_create( &t, pthread_attr_default, task, NULL );
12475         if( status ) return errno;
12476
12477         /* give thread a chance to complete */
12478         /* it should remain joinable and hence detachable */
12479         sleep( 1 );
12480
12481         status = pthread_detach( &t );
12482         if( status ) return errno;
12483 #endif
12484
12485 #ifdef HAVE_LINUX_THREADS
12486         pthread_kill_other_threads_np();
12487 #endif
12488
12489         return 0;
12490
12491 ; return 0; }
12492 EOF
12493 if { (eval echo configure:12494: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12494   rm -rf conftest*
12495   ol_cv_pthread_mthreads=yes
12496 else
12497   echo "configure: failed program was:" >&5
12498   cat conftest.$ac_ext >&5
12499   rm -rf conftest*
12500   ol_cv_pthread_mthreads=no
12501 fi
12502 rm -f conftest*
12503 else
12504   cat > conftest.$ac_ext <<EOF
12505 #line 12506 "configure"
12506 #include "confdefs.h"
12507 /* pthread test headers */
12508 #include <pthread.h>
12509 #if HAVE_PTHREADS < 7
12510 #include <errno.h>
12511 #endif
12512 #ifndef NULL
12513 #define NULL (void*)0
12514 #endif
12515
12516 static void *task(p)
12517         void *p;
12518 {
12519         return (void *) (p == NULL);
12520 }
12521
12522
12523 int main(argc, argv)
12524         int argc;
12525         char **argv;
12526 {
12527
12528         /* pthread test function */
12529 #ifndef PTHREAD_CREATE_DETACHED
12530 #define PTHREAD_CREATE_DETACHED 1
12531 #endif
12532         pthread_t t;
12533         int status;
12534         int detach = PTHREAD_CREATE_DETACHED;
12535
12536 #if HAVE_PTHREADS > 4
12537         /* Final pthreads */
12538         pthread_attr_t attr;
12539
12540         status = pthread_attr_init(&attr);
12541         if( status ) return status;
12542
12543 #if HAVE_PTHREADS < 7
12544         status = pthread_attr_setdetachstate(&attr, &detach);
12545         if( status < 0 ) status = errno;
12546 #else
12547         status = pthread_attr_setdetachstate(&attr, detach);
12548 #endif
12549         if( status ) return status;
12550         status = pthread_create( &t, &attr, task, NULL );
12551 #if HAVE_PTHREADS < 7
12552         if( status < 0 ) status = errno;
12553 #endif
12554         if( status ) return status;
12555 #else
12556         /* Draft 4 pthreads */
12557         status = pthread_create( &t, pthread_attr_default, task, NULL );
12558         if( status ) return errno;
12559
12560         /* give thread a chance to complete */
12561         /* it should remain joinable and hence detachable */
12562         sleep( 1 );
12563
12564         status = pthread_detach( &t );
12565         if( status ) return errno;
12566 #endif
12567
12568 #ifdef HAVE_LINUX_THREADS
12569         pthread_kill_other_threads_np();
12570 #endif
12571
12572         return 0;
12573
12574 }
12575
12576 EOF
12577 if { (eval echo configure:12578: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12578 then
12579   ol_cv_pthread_mthreads=yes
12580 else
12581   echo "configure: failed program was:" >&5
12582   cat conftest.$ac_ext >&5
12583   rm -fr conftest*
12584   ol_cv_pthread_mthreads=no
12585 fi
12586 rm -fr conftest*
12587 fi
12588
12589
12590                 # restore the LIBS
12591                 LIBS="$ol_LIBS"
12592         
12593 fi
12594
12595 echo "$ac_t""$ol_cv_pthread_mthreads" 1>&6
12596
12597         if test $ol_cv_pthread_mthreads = yes ; then
12598                 ol_link_pthreads="-mthreads"
12599                 ol_link_threads=posix
12600         fi
12601 fi
12602
12603                 # Pthread try link: -thread (ol_cv_pthread_thread)
12604 if test "$ol_link_threads" = no ; then
12605         # try -thread
12606         echo $ac_n "checking for pthread link with -thread""... $ac_c" 1>&6
12607 echo "configure:12608: checking for pthread link with -thread" >&5
12608 if eval "test \"\${ol_cv_pthread_thread+set}\" = set"; then
12609   echo $ac_n "(cached) $ac_c" 1>&6
12610 else
12611   
12612                 # save the flags
12613                 ol_LIBS="$LIBS"
12614                 LIBS="-thread $LIBS"
12615
12616                 if test "$cross_compiling" = yes; then
12617   cat > conftest.$ac_ext <<EOF
12618 #line 12619 "configure"
12619 #include "confdefs.h"
12620 /* pthread test headers */
12621 #include <pthread.h>
12622 #if HAVE_PTHREADS < 7
12623 #include <errno.h>
12624 #endif
12625 #ifndef NULL
12626 #define NULL (void*)0
12627 #endif
12628
12629 static void *task(p)
12630         void *p;
12631 {
12632         return (void *) (p == NULL);
12633 }
12634
12635 int main() {
12636
12637         /* pthread test function */
12638 #ifndef PTHREAD_CREATE_DETACHED
12639 #define PTHREAD_CREATE_DETACHED 1
12640 #endif
12641         pthread_t t;
12642         int status;
12643         int detach = PTHREAD_CREATE_DETACHED;
12644
12645 #if HAVE_PTHREADS > 4
12646         /* Final pthreads */
12647         pthread_attr_t attr;
12648
12649         status = pthread_attr_init(&attr);
12650         if( status ) return status;
12651
12652 #if HAVE_PTHREADS < 7
12653         status = pthread_attr_setdetachstate(&attr, &detach);
12654         if( status < 0 ) status = errno;
12655 #else
12656         status = pthread_attr_setdetachstate(&attr, detach);
12657 #endif
12658         if( status ) return status;
12659         status = pthread_create( &t, &attr, task, NULL );
12660 #if HAVE_PTHREADS < 7
12661         if( status < 0 ) status = errno;
12662 #endif
12663         if( status ) return status;
12664 #else
12665         /* Draft 4 pthreads */
12666         status = pthread_create( &t, pthread_attr_default, task, NULL );
12667         if( status ) return errno;
12668
12669         /* give thread a chance to complete */
12670         /* it should remain joinable and hence detachable */
12671         sleep( 1 );
12672
12673         status = pthread_detach( &t );
12674         if( status ) return errno;
12675 #endif
12676
12677 #ifdef HAVE_LINUX_THREADS
12678         pthread_kill_other_threads_np();
12679 #endif
12680
12681         return 0;
12682
12683 ; return 0; }
12684 EOF
12685 if { (eval echo configure:12686: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12686   rm -rf conftest*
12687   ol_cv_pthread_thread=yes
12688 else
12689   echo "configure: failed program was:" >&5
12690   cat conftest.$ac_ext >&5
12691   rm -rf conftest*
12692   ol_cv_pthread_thread=no
12693 fi
12694 rm -f conftest*
12695 else
12696   cat > conftest.$ac_ext <<EOF
12697 #line 12698 "configure"
12698 #include "confdefs.h"
12699 /* pthread test headers */
12700 #include <pthread.h>
12701 #if HAVE_PTHREADS < 7
12702 #include <errno.h>
12703 #endif
12704 #ifndef NULL
12705 #define NULL (void*)0
12706 #endif
12707
12708 static void *task(p)
12709         void *p;
12710 {
12711         return (void *) (p == NULL);
12712 }
12713
12714
12715 int main(argc, argv)
12716         int argc;
12717         char **argv;
12718 {
12719
12720         /* pthread test function */
12721 #ifndef PTHREAD_CREATE_DETACHED
12722 #define PTHREAD_CREATE_DETACHED 1
12723 #endif
12724         pthread_t t;
12725         int status;
12726         int detach = PTHREAD_CREATE_DETACHED;
12727
12728 #if HAVE_PTHREADS > 4
12729         /* Final pthreads */
12730         pthread_attr_t attr;
12731
12732         status = pthread_attr_init(&attr);
12733         if( status ) return status;
12734
12735 #if HAVE_PTHREADS < 7
12736         status = pthread_attr_setdetachstate(&attr, &detach);
12737         if( status < 0 ) status = errno;
12738 #else
12739         status = pthread_attr_setdetachstate(&attr, detach);
12740 #endif
12741         if( status ) return status;
12742         status = pthread_create( &t, &attr, task, NULL );
12743 #if HAVE_PTHREADS < 7
12744         if( status < 0 ) status = errno;
12745 #endif
12746         if( status ) return status;
12747 #else
12748         /* Draft 4 pthreads */
12749         status = pthread_create( &t, pthread_attr_default, task, NULL );
12750         if( status ) return errno;
12751
12752         /* give thread a chance to complete */
12753         /* it should remain joinable and hence detachable */
12754         sleep( 1 );
12755
12756         status = pthread_detach( &t );
12757         if( status ) return errno;
12758 #endif
12759
12760 #ifdef HAVE_LINUX_THREADS
12761         pthread_kill_other_threads_np();
12762 #endif
12763
12764         return 0;
12765
12766 }
12767
12768 EOF
12769 if { (eval echo configure:12770: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12770 then
12771   ol_cv_pthread_thread=yes
12772 else
12773   echo "configure: failed program was:" >&5
12774   cat conftest.$ac_ext >&5
12775   rm -fr conftest*
12776   ol_cv_pthread_thread=no
12777 fi
12778 rm -fr conftest*
12779 fi
12780
12781
12782                 # restore the LIBS
12783                 LIBS="$ol_LIBS"
12784         
12785 fi
12786
12787 echo "$ac_t""$ol_cv_pthread_thread" 1>&6
12788
12789         if test $ol_cv_pthread_thread = yes ; then
12790                 ol_link_pthreads="-thread"
12791                 ol_link_threads=posix
12792         fi
12793 fi
12794
12795
12796                 # Pthread try link: -lpthread -lmach -lexc -lc_r (ol_cv_pthread_lpthread_lmach_lexc_lc_r)
12797 if test "$ol_link_threads" = no ; then
12798         # try -lpthread -lmach -lexc -lc_r
12799         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc -lc_r""... $ac_c" 1>&6
12800 echo "configure:12801: checking for pthread link with -lpthread -lmach -lexc -lc_r" >&5
12801 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc_lc_r+set}\" = set"; then
12802   echo $ac_n "(cached) $ac_c" 1>&6
12803 else
12804   
12805                 # save the flags
12806                 ol_LIBS="$LIBS"
12807                 LIBS="-lpthread -lmach -lexc -lc_r $LIBS"
12808
12809                 if test "$cross_compiling" = yes; then
12810   cat > conftest.$ac_ext <<EOF
12811 #line 12812 "configure"
12812 #include "confdefs.h"
12813 /* pthread test headers */
12814 #include <pthread.h>
12815 #if HAVE_PTHREADS < 7
12816 #include <errno.h>
12817 #endif
12818 #ifndef NULL
12819 #define NULL (void*)0
12820 #endif
12821
12822 static void *task(p)
12823         void *p;
12824 {
12825         return (void *) (p == NULL);
12826 }
12827
12828 int main() {
12829
12830         /* pthread test function */
12831 #ifndef PTHREAD_CREATE_DETACHED
12832 #define PTHREAD_CREATE_DETACHED 1
12833 #endif
12834         pthread_t t;
12835         int status;
12836         int detach = PTHREAD_CREATE_DETACHED;
12837
12838 #if HAVE_PTHREADS > 4
12839         /* Final pthreads */
12840         pthread_attr_t attr;
12841
12842         status = pthread_attr_init(&attr);
12843         if( status ) return status;
12844
12845 #if HAVE_PTHREADS < 7
12846         status = pthread_attr_setdetachstate(&attr, &detach);
12847         if( status < 0 ) status = errno;
12848 #else
12849         status = pthread_attr_setdetachstate(&attr, detach);
12850 #endif
12851         if( status ) return status;
12852         status = pthread_create( &t, &attr, task, NULL );
12853 #if HAVE_PTHREADS < 7
12854         if( status < 0 ) status = errno;
12855 #endif
12856         if( status ) return status;
12857 #else
12858         /* Draft 4 pthreads */
12859         status = pthread_create( &t, pthread_attr_default, task, NULL );
12860         if( status ) return errno;
12861
12862         /* give thread a chance to complete */
12863         /* it should remain joinable and hence detachable */
12864         sleep( 1 );
12865
12866         status = pthread_detach( &t );
12867         if( status ) return errno;
12868 #endif
12869
12870 #ifdef HAVE_LINUX_THREADS
12871         pthread_kill_other_threads_np();
12872 #endif
12873
12874         return 0;
12875
12876 ; return 0; }
12877 EOF
12878 if { (eval echo configure:12879: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12879   rm -rf conftest*
12880   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
12881 else
12882   echo "configure: failed program was:" >&5
12883   cat conftest.$ac_ext >&5
12884   rm -rf conftest*
12885   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
12886 fi
12887 rm -f conftest*
12888 else
12889   cat > conftest.$ac_ext <<EOF
12890 #line 12891 "configure"
12891 #include "confdefs.h"
12892 /* pthread test headers */
12893 #include <pthread.h>
12894 #if HAVE_PTHREADS < 7
12895 #include <errno.h>
12896 #endif
12897 #ifndef NULL
12898 #define NULL (void*)0
12899 #endif
12900
12901 static void *task(p)
12902         void *p;
12903 {
12904         return (void *) (p == NULL);
12905 }
12906
12907
12908 int main(argc, argv)
12909         int argc;
12910         char **argv;
12911 {
12912
12913         /* pthread test function */
12914 #ifndef PTHREAD_CREATE_DETACHED
12915 #define PTHREAD_CREATE_DETACHED 1
12916 #endif
12917         pthread_t t;
12918         int status;
12919         int detach = PTHREAD_CREATE_DETACHED;
12920
12921 #if HAVE_PTHREADS > 4
12922         /* Final pthreads */
12923         pthread_attr_t attr;
12924
12925         status = pthread_attr_init(&attr);
12926         if( status ) return status;
12927
12928 #if HAVE_PTHREADS < 7
12929         status = pthread_attr_setdetachstate(&attr, &detach);
12930         if( status < 0 ) status = errno;
12931 #else
12932         status = pthread_attr_setdetachstate(&attr, detach);
12933 #endif
12934         if( status ) return status;
12935         status = pthread_create( &t, &attr, task, NULL );
12936 #if HAVE_PTHREADS < 7
12937         if( status < 0 ) status = errno;
12938 #endif
12939         if( status ) return status;
12940 #else
12941         /* Draft 4 pthreads */
12942         status = pthread_create( &t, pthread_attr_default, task, NULL );
12943         if( status ) return errno;
12944
12945         /* give thread a chance to complete */
12946         /* it should remain joinable and hence detachable */
12947         sleep( 1 );
12948
12949         status = pthread_detach( &t );
12950         if( status ) return errno;
12951 #endif
12952
12953 #ifdef HAVE_LINUX_THREADS
12954         pthread_kill_other_threads_np();
12955 #endif
12956
12957         return 0;
12958
12959 }
12960
12961 EOF
12962 if { (eval echo configure:12963: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12963 then
12964   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
12965 else
12966   echo "configure: failed program was:" >&5
12967   cat conftest.$ac_ext >&5
12968   rm -fr conftest*
12969   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
12970 fi
12971 rm -fr conftest*
12972 fi
12973
12974
12975                 # restore the LIBS
12976                 LIBS="$ol_LIBS"
12977         
12978 fi
12979
12980 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc_lc_r" 1>&6
12981
12982         if test $ol_cv_pthread_lpthread_lmach_lexc_lc_r = yes ; then
12983                 ol_link_pthreads="-lpthread -lmach -lexc -lc_r"
12984                 ol_link_threads=posix
12985         fi
12986 fi
12987
12988                 # Pthread try link: -lpthread -lmach -lexc (ol_cv_pthread_lpthread_lmach_lexc)
12989 if test "$ol_link_threads" = no ; then
12990         # try -lpthread -lmach -lexc
12991         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc""... $ac_c" 1>&6
12992 echo "configure:12993: checking for pthread link with -lpthread -lmach -lexc" >&5
12993 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc+set}\" = set"; then
12994   echo $ac_n "(cached) $ac_c" 1>&6
12995 else
12996   
12997                 # save the flags
12998                 ol_LIBS="$LIBS"
12999                 LIBS="-lpthread -lmach -lexc $LIBS"
13000
13001                 if test "$cross_compiling" = yes; then
13002   cat > conftest.$ac_ext <<EOF
13003 #line 13004 "configure"
13004 #include "confdefs.h"
13005 /* pthread test headers */
13006 #include <pthread.h>
13007 #if HAVE_PTHREADS < 7
13008 #include <errno.h>
13009 #endif
13010 #ifndef NULL
13011 #define NULL (void*)0
13012 #endif
13013
13014 static void *task(p)
13015         void *p;
13016 {
13017         return (void *) (p == NULL);
13018 }
13019
13020 int main() {
13021
13022         /* pthread test function */
13023 #ifndef PTHREAD_CREATE_DETACHED
13024 #define PTHREAD_CREATE_DETACHED 1
13025 #endif
13026         pthread_t t;
13027         int status;
13028         int detach = PTHREAD_CREATE_DETACHED;
13029
13030 #if HAVE_PTHREADS > 4
13031         /* Final pthreads */
13032         pthread_attr_t attr;
13033
13034         status = pthread_attr_init(&attr);
13035         if( status ) return status;
13036
13037 #if HAVE_PTHREADS < 7
13038         status = pthread_attr_setdetachstate(&attr, &detach);
13039         if( status < 0 ) status = errno;
13040 #else
13041         status = pthread_attr_setdetachstate(&attr, detach);
13042 #endif
13043         if( status ) return status;
13044         status = pthread_create( &t, &attr, task, NULL );
13045 #if HAVE_PTHREADS < 7
13046         if( status < 0 ) status = errno;
13047 #endif
13048         if( status ) return status;
13049 #else
13050         /* Draft 4 pthreads */
13051         status = pthread_create( &t, pthread_attr_default, task, NULL );
13052         if( status ) return errno;
13053
13054         /* give thread a chance to complete */
13055         /* it should remain joinable and hence detachable */
13056         sleep( 1 );
13057
13058         status = pthread_detach( &t );
13059         if( status ) return errno;
13060 #endif
13061
13062 #ifdef HAVE_LINUX_THREADS
13063         pthread_kill_other_threads_np();
13064 #endif
13065
13066         return 0;
13067
13068 ; return 0; }
13069 EOF
13070 if { (eval echo configure:13071: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13071   rm -rf conftest*
13072   ol_cv_pthread_lpthread_lmach_lexc=yes
13073 else
13074   echo "configure: failed program was:" >&5
13075   cat conftest.$ac_ext >&5
13076   rm -rf conftest*
13077   ol_cv_pthread_lpthread_lmach_lexc=no
13078 fi
13079 rm -f conftest*
13080 else
13081   cat > conftest.$ac_ext <<EOF
13082 #line 13083 "configure"
13083 #include "confdefs.h"
13084 /* pthread test headers */
13085 #include <pthread.h>
13086 #if HAVE_PTHREADS < 7
13087 #include <errno.h>
13088 #endif
13089 #ifndef NULL
13090 #define NULL (void*)0
13091 #endif
13092
13093 static void *task(p)
13094         void *p;
13095 {
13096         return (void *) (p == NULL);
13097 }
13098
13099
13100 int main(argc, argv)
13101         int argc;
13102         char **argv;
13103 {
13104
13105         /* pthread test function */
13106 #ifndef PTHREAD_CREATE_DETACHED
13107 #define PTHREAD_CREATE_DETACHED 1
13108 #endif
13109         pthread_t t;
13110         int status;
13111         int detach = PTHREAD_CREATE_DETACHED;
13112
13113 #if HAVE_PTHREADS > 4
13114         /* Final pthreads */
13115         pthread_attr_t attr;
13116
13117         status = pthread_attr_init(&attr);
13118         if( status ) return status;
13119
13120 #if HAVE_PTHREADS < 7
13121         status = pthread_attr_setdetachstate(&attr, &detach);
13122         if( status < 0 ) status = errno;
13123 #else
13124         status = pthread_attr_setdetachstate(&attr, detach);
13125 #endif
13126         if( status ) return status;
13127         status = pthread_create( &t, &attr, task, NULL );
13128 #if HAVE_PTHREADS < 7
13129         if( status < 0 ) status = errno;
13130 #endif
13131         if( status ) return status;
13132 #else
13133         /* Draft 4 pthreads */
13134         status = pthread_create( &t, pthread_attr_default, task, NULL );
13135         if( status ) return errno;
13136
13137         /* give thread a chance to complete */
13138         /* it should remain joinable and hence detachable */
13139         sleep( 1 );
13140
13141         status = pthread_detach( &t );
13142         if( status ) return errno;
13143 #endif
13144
13145 #ifdef HAVE_LINUX_THREADS
13146         pthread_kill_other_threads_np();
13147 #endif
13148
13149         return 0;
13150
13151 }
13152
13153 EOF
13154 if { (eval echo configure:13155: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13155 then
13156   ol_cv_pthread_lpthread_lmach_lexc=yes
13157 else
13158   echo "configure: failed program was:" >&5
13159   cat conftest.$ac_ext >&5
13160   rm -fr conftest*
13161   ol_cv_pthread_lpthread_lmach_lexc=no
13162 fi
13163 rm -fr conftest*
13164 fi
13165
13166
13167                 # restore the LIBS
13168                 LIBS="$ol_LIBS"
13169         
13170 fi
13171
13172 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc" 1>&6
13173
13174         if test $ol_cv_pthread_lpthread_lmach_lexc = yes ; then
13175                 ol_link_pthreads="-lpthread -lmach -lexc"
13176                 ol_link_threads=posix
13177         fi
13178 fi
13179
13180
13181                 # Pthread try link: -lpthread -Wl,-woff,85 (ol_cv_pthread_lib_lpthread_woff)
13182 if test "$ol_link_threads" = no ; then
13183         # try -lpthread -Wl,-woff,85
13184         echo $ac_n "checking for pthread link with -lpthread -Wl,-woff,85""... $ac_c" 1>&6
13185 echo "configure:13186: checking for pthread link with -lpthread -Wl,-woff,85" >&5
13186 if eval "test \"\${ol_cv_pthread_lib_lpthread_woff+set}\" = set"; then
13187   echo $ac_n "(cached) $ac_c" 1>&6
13188 else
13189   
13190                 # save the flags
13191                 ol_LIBS="$LIBS"
13192                 LIBS="-lpthread -Wl,-woff,85 $LIBS"
13193
13194                 if test "$cross_compiling" = yes; then
13195   cat > conftest.$ac_ext <<EOF
13196 #line 13197 "configure"
13197 #include "confdefs.h"
13198 /* pthread test headers */
13199 #include <pthread.h>
13200 #if HAVE_PTHREADS < 7
13201 #include <errno.h>
13202 #endif
13203 #ifndef NULL
13204 #define NULL (void*)0
13205 #endif
13206
13207 static void *task(p)
13208         void *p;
13209 {
13210         return (void *) (p == NULL);
13211 }
13212
13213 int main() {
13214
13215         /* pthread test function */
13216 #ifndef PTHREAD_CREATE_DETACHED
13217 #define PTHREAD_CREATE_DETACHED 1
13218 #endif
13219         pthread_t t;
13220         int status;
13221         int detach = PTHREAD_CREATE_DETACHED;
13222
13223 #if HAVE_PTHREADS > 4
13224         /* Final pthreads */
13225         pthread_attr_t attr;
13226
13227         status = pthread_attr_init(&attr);
13228         if( status ) return status;
13229
13230 #if HAVE_PTHREADS < 7
13231         status = pthread_attr_setdetachstate(&attr, &detach);
13232         if( status < 0 ) status = errno;
13233 #else
13234         status = pthread_attr_setdetachstate(&attr, detach);
13235 #endif
13236         if( status ) return status;
13237         status = pthread_create( &t, &attr, task, NULL );
13238 #if HAVE_PTHREADS < 7
13239         if( status < 0 ) status = errno;
13240 #endif
13241         if( status ) return status;
13242 #else
13243         /* Draft 4 pthreads */
13244         status = pthread_create( &t, pthread_attr_default, task, NULL );
13245         if( status ) return errno;
13246
13247         /* give thread a chance to complete */
13248         /* it should remain joinable and hence detachable */
13249         sleep( 1 );
13250
13251         status = pthread_detach( &t );
13252         if( status ) return errno;
13253 #endif
13254
13255 #ifdef HAVE_LINUX_THREADS
13256         pthread_kill_other_threads_np();
13257 #endif
13258
13259         return 0;
13260
13261 ; return 0; }
13262 EOF
13263 if { (eval echo configure:13264: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13264   rm -rf conftest*
13265   ol_cv_pthread_lib_lpthread_woff=yes
13266 else
13267   echo "configure: failed program was:" >&5
13268   cat conftest.$ac_ext >&5
13269   rm -rf conftest*
13270   ol_cv_pthread_lib_lpthread_woff=no
13271 fi
13272 rm -f conftest*
13273 else
13274   cat > conftest.$ac_ext <<EOF
13275 #line 13276 "configure"
13276 #include "confdefs.h"
13277 /* pthread test headers */
13278 #include <pthread.h>
13279 #if HAVE_PTHREADS < 7
13280 #include <errno.h>
13281 #endif
13282 #ifndef NULL
13283 #define NULL (void*)0
13284 #endif
13285
13286 static void *task(p)
13287         void *p;
13288 {
13289         return (void *) (p == NULL);
13290 }
13291
13292
13293 int main(argc, argv)
13294         int argc;
13295         char **argv;
13296 {
13297
13298         /* pthread test function */
13299 #ifndef PTHREAD_CREATE_DETACHED
13300 #define PTHREAD_CREATE_DETACHED 1
13301 #endif
13302         pthread_t t;
13303         int status;
13304         int detach = PTHREAD_CREATE_DETACHED;
13305
13306 #if HAVE_PTHREADS > 4
13307         /* Final pthreads */
13308         pthread_attr_t attr;
13309
13310         status = pthread_attr_init(&attr);
13311         if( status ) return status;
13312
13313 #if HAVE_PTHREADS < 7
13314         status = pthread_attr_setdetachstate(&attr, &detach);
13315         if( status < 0 ) status = errno;
13316 #else
13317         status = pthread_attr_setdetachstate(&attr, detach);
13318 #endif
13319         if( status ) return status;
13320         status = pthread_create( &t, &attr, task, NULL );
13321 #if HAVE_PTHREADS < 7
13322         if( status < 0 ) status = errno;
13323 #endif
13324         if( status ) return status;
13325 #else
13326         /* Draft 4 pthreads */
13327         status = pthread_create( &t, pthread_attr_default, task, NULL );
13328         if( status ) return errno;
13329
13330         /* give thread a chance to complete */
13331         /* it should remain joinable and hence detachable */
13332         sleep( 1 );
13333
13334         status = pthread_detach( &t );
13335         if( status ) return errno;
13336 #endif
13337
13338 #ifdef HAVE_LINUX_THREADS
13339         pthread_kill_other_threads_np();
13340 #endif
13341
13342         return 0;
13343
13344 }
13345
13346 EOF
13347 if { (eval echo configure:13348: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13348 then
13349   ol_cv_pthread_lib_lpthread_woff=yes
13350 else
13351   echo "configure: failed program was:" >&5
13352   cat conftest.$ac_ext >&5
13353   rm -fr conftest*
13354   ol_cv_pthread_lib_lpthread_woff=no
13355 fi
13356 rm -fr conftest*
13357 fi
13358
13359
13360                 # restore the LIBS
13361                 LIBS="$ol_LIBS"
13362         
13363 fi
13364
13365 echo "$ac_t""$ol_cv_pthread_lib_lpthread_woff" 1>&6
13366
13367         if test $ol_cv_pthread_lib_lpthread_woff = yes ; then
13368                 ol_link_pthreads="-lpthread -Wl,-woff,85"
13369                 ol_link_threads=posix
13370         fi
13371 fi
13372
13373
13374                 # Pthread try link: -lpthread (ol_cv_pthread_lpthread)
13375 if test "$ol_link_threads" = no ; then
13376         # try -lpthread
13377         echo $ac_n "checking for pthread link with -lpthread""... $ac_c" 1>&6
13378 echo "configure:13379: checking for pthread link with -lpthread" >&5
13379 if eval "test \"\${ol_cv_pthread_lpthread+set}\" = set"; then
13380   echo $ac_n "(cached) $ac_c" 1>&6
13381 else
13382   
13383                 # save the flags
13384                 ol_LIBS="$LIBS"
13385                 LIBS="-lpthread $LIBS"
13386
13387                 if test "$cross_compiling" = yes; then
13388   cat > conftest.$ac_ext <<EOF
13389 #line 13390 "configure"
13390 #include "confdefs.h"
13391 /* pthread test headers */
13392 #include <pthread.h>
13393 #if HAVE_PTHREADS < 7
13394 #include <errno.h>
13395 #endif
13396 #ifndef NULL
13397 #define NULL (void*)0
13398 #endif
13399
13400 static void *task(p)
13401         void *p;
13402 {
13403         return (void *) (p == NULL);
13404 }
13405
13406 int main() {
13407
13408         /* pthread test function */
13409 #ifndef PTHREAD_CREATE_DETACHED
13410 #define PTHREAD_CREATE_DETACHED 1
13411 #endif
13412         pthread_t t;
13413         int status;
13414         int detach = PTHREAD_CREATE_DETACHED;
13415
13416 #if HAVE_PTHREADS > 4
13417         /* Final pthreads */
13418         pthread_attr_t attr;
13419
13420         status = pthread_attr_init(&attr);
13421         if( status ) return status;
13422
13423 #if HAVE_PTHREADS < 7
13424         status = pthread_attr_setdetachstate(&attr, &detach);
13425         if( status < 0 ) status = errno;
13426 #else
13427         status = pthread_attr_setdetachstate(&attr, detach);
13428 #endif
13429         if( status ) return status;
13430         status = pthread_create( &t, &attr, task, NULL );
13431 #if HAVE_PTHREADS < 7
13432         if( status < 0 ) status = errno;
13433 #endif
13434         if( status ) return status;
13435 #else
13436         /* Draft 4 pthreads */
13437         status = pthread_create( &t, pthread_attr_default, task, NULL );
13438         if( status ) return errno;
13439
13440         /* give thread a chance to complete */
13441         /* it should remain joinable and hence detachable */
13442         sleep( 1 );
13443
13444         status = pthread_detach( &t );
13445         if( status ) return errno;
13446 #endif
13447
13448 #ifdef HAVE_LINUX_THREADS
13449         pthread_kill_other_threads_np();
13450 #endif
13451
13452         return 0;
13453
13454 ; return 0; }
13455 EOF
13456 if { (eval echo configure:13457: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13457   rm -rf conftest*
13458   ol_cv_pthread_lpthread=yes
13459 else
13460   echo "configure: failed program was:" >&5
13461   cat conftest.$ac_ext >&5
13462   rm -rf conftest*
13463   ol_cv_pthread_lpthread=no
13464 fi
13465 rm -f conftest*
13466 else
13467   cat > conftest.$ac_ext <<EOF
13468 #line 13469 "configure"
13469 #include "confdefs.h"
13470 /* pthread test headers */
13471 #include <pthread.h>
13472 #if HAVE_PTHREADS < 7
13473 #include <errno.h>
13474 #endif
13475 #ifndef NULL
13476 #define NULL (void*)0
13477 #endif
13478
13479 static void *task(p)
13480         void *p;
13481 {
13482         return (void *) (p == NULL);
13483 }
13484
13485
13486 int main(argc, argv)
13487         int argc;
13488         char **argv;
13489 {
13490
13491         /* pthread test function */
13492 #ifndef PTHREAD_CREATE_DETACHED
13493 #define PTHREAD_CREATE_DETACHED 1
13494 #endif
13495         pthread_t t;
13496         int status;
13497         int detach = PTHREAD_CREATE_DETACHED;
13498
13499 #if HAVE_PTHREADS > 4
13500         /* Final pthreads */
13501         pthread_attr_t attr;
13502
13503         status = pthread_attr_init(&attr);
13504         if( status ) return status;
13505
13506 #if HAVE_PTHREADS < 7
13507         status = pthread_attr_setdetachstate(&attr, &detach);
13508         if( status < 0 ) status = errno;
13509 #else
13510         status = pthread_attr_setdetachstate(&attr, detach);
13511 #endif
13512         if( status ) return status;
13513         status = pthread_create( &t, &attr, task, NULL );
13514 #if HAVE_PTHREADS < 7
13515         if( status < 0 ) status = errno;
13516 #endif
13517         if( status ) return status;
13518 #else
13519         /* Draft 4 pthreads */
13520         status = pthread_create( &t, pthread_attr_default, task, NULL );
13521         if( status ) return errno;
13522
13523         /* give thread a chance to complete */
13524         /* it should remain joinable and hence detachable */
13525         sleep( 1 );
13526
13527         status = pthread_detach( &t );
13528         if( status ) return errno;
13529 #endif
13530
13531 #ifdef HAVE_LINUX_THREADS
13532         pthread_kill_other_threads_np();
13533 #endif
13534
13535         return 0;
13536
13537 }
13538
13539 EOF
13540 if { (eval echo configure:13541: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13541 then
13542   ol_cv_pthread_lpthread=yes
13543 else
13544   echo "configure: failed program was:" >&5
13545   cat conftest.$ac_ext >&5
13546   rm -fr conftest*
13547   ol_cv_pthread_lpthread=no
13548 fi
13549 rm -fr conftest*
13550 fi
13551
13552
13553                 # restore the LIBS
13554                 LIBS="$ol_LIBS"
13555         
13556 fi
13557
13558 echo "$ac_t""$ol_cv_pthread_lpthread" 1>&6
13559
13560         if test $ol_cv_pthread_lpthread = yes ; then
13561                 ol_link_pthreads="-lpthread"
13562                 ol_link_threads=posix
13563         fi
13564 fi
13565
13566                 # Pthread try link: -lc_r (ol_cv_pthread_lc_r)
13567 if test "$ol_link_threads" = no ; then
13568         # try -lc_r
13569         echo $ac_n "checking for pthread link with -lc_r""... $ac_c" 1>&6
13570 echo "configure:13571: checking for pthread link with -lc_r" >&5
13571 if eval "test \"\${ol_cv_pthread_lc_r+set}\" = set"; then
13572   echo $ac_n "(cached) $ac_c" 1>&6
13573 else
13574   
13575                 # save the flags
13576                 ol_LIBS="$LIBS"
13577                 LIBS="-lc_r $LIBS"
13578
13579                 if test "$cross_compiling" = yes; then
13580   cat > conftest.$ac_ext <<EOF
13581 #line 13582 "configure"
13582 #include "confdefs.h"
13583 /* pthread test headers */
13584 #include <pthread.h>
13585 #if HAVE_PTHREADS < 7
13586 #include <errno.h>
13587 #endif
13588 #ifndef NULL
13589 #define NULL (void*)0
13590 #endif
13591
13592 static void *task(p)
13593         void *p;
13594 {
13595         return (void *) (p == NULL);
13596 }
13597
13598 int main() {
13599
13600         /* pthread test function */
13601 #ifndef PTHREAD_CREATE_DETACHED
13602 #define PTHREAD_CREATE_DETACHED 1
13603 #endif
13604         pthread_t t;
13605         int status;
13606         int detach = PTHREAD_CREATE_DETACHED;
13607
13608 #if HAVE_PTHREADS > 4
13609         /* Final pthreads */
13610         pthread_attr_t attr;
13611
13612         status = pthread_attr_init(&attr);
13613         if( status ) return status;
13614
13615 #if HAVE_PTHREADS < 7
13616         status = pthread_attr_setdetachstate(&attr, &detach);
13617         if( status < 0 ) status = errno;
13618 #else
13619         status = pthread_attr_setdetachstate(&attr, detach);
13620 #endif
13621         if( status ) return status;
13622         status = pthread_create( &t, &attr, task, NULL );
13623 #if HAVE_PTHREADS < 7
13624         if( status < 0 ) status = errno;
13625 #endif
13626         if( status ) return status;
13627 #else
13628         /* Draft 4 pthreads */
13629         status = pthread_create( &t, pthread_attr_default, task, NULL );
13630         if( status ) return errno;
13631
13632         /* give thread a chance to complete */
13633         /* it should remain joinable and hence detachable */
13634         sleep( 1 );
13635
13636         status = pthread_detach( &t );
13637         if( status ) return errno;
13638 #endif
13639
13640 #ifdef HAVE_LINUX_THREADS
13641         pthread_kill_other_threads_np();
13642 #endif
13643
13644         return 0;
13645
13646 ; return 0; }
13647 EOF
13648 if { (eval echo configure:13649: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13649   rm -rf conftest*
13650   ol_cv_pthread_lc_r=yes
13651 else
13652   echo "configure: failed program was:" >&5
13653   cat conftest.$ac_ext >&5
13654   rm -rf conftest*
13655   ol_cv_pthread_lc_r=no
13656 fi
13657 rm -f conftest*
13658 else
13659   cat > conftest.$ac_ext <<EOF
13660 #line 13661 "configure"
13661 #include "confdefs.h"
13662 /* pthread test headers */
13663 #include <pthread.h>
13664 #if HAVE_PTHREADS < 7
13665 #include <errno.h>
13666 #endif
13667 #ifndef NULL
13668 #define NULL (void*)0
13669 #endif
13670
13671 static void *task(p)
13672         void *p;
13673 {
13674         return (void *) (p == NULL);
13675 }
13676
13677
13678 int main(argc, argv)
13679         int argc;
13680         char **argv;
13681 {
13682
13683         /* pthread test function */
13684 #ifndef PTHREAD_CREATE_DETACHED
13685 #define PTHREAD_CREATE_DETACHED 1
13686 #endif
13687         pthread_t t;
13688         int status;
13689         int detach = PTHREAD_CREATE_DETACHED;
13690
13691 #if HAVE_PTHREADS > 4
13692         /* Final pthreads */
13693         pthread_attr_t attr;
13694
13695         status = pthread_attr_init(&attr);
13696         if( status ) return status;
13697
13698 #if HAVE_PTHREADS < 7
13699         status = pthread_attr_setdetachstate(&attr, &detach);
13700         if( status < 0 ) status = errno;
13701 #else
13702         status = pthread_attr_setdetachstate(&attr, detach);
13703 #endif
13704         if( status ) return status;
13705         status = pthread_create( &t, &attr, task, NULL );
13706 #if HAVE_PTHREADS < 7
13707         if( status < 0 ) status = errno;
13708 #endif
13709         if( status ) return status;
13710 #else
13711         /* Draft 4 pthreads */
13712         status = pthread_create( &t, pthread_attr_default, task, NULL );
13713         if( status ) return errno;
13714
13715         /* give thread a chance to complete */
13716         /* it should remain joinable and hence detachable */
13717         sleep( 1 );
13718
13719         status = pthread_detach( &t );
13720         if( status ) return errno;
13721 #endif
13722
13723 #ifdef HAVE_LINUX_THREADS
13724         pthread_kill_other_threads_np();
13725 #endif
13726
13727         return 0;
13728
13729 }
13730
13731 EOF
13732 if { (eval echo configure:13733: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13733 then
13734   ol_cv_pthread_lc_r=yes
13735 else
13736   echo "configure: failed program was:" >&5
13737   cat conftest.$ac_ext >&5
13738   rm -fr conftest*
13739   ol_cv_pthread_lc_r=no
13740 fi
13741 rm -fr conftest*
13742 fi
13743
13744
13745                 # restore the LIBS
13746                 LIBS="$ol_LIBS"
13747         
13748 fi
13749
13750 echo "$ac_t""$ol_cv_pthread_lc_r" 1>&6
13751
13752         if test $ol_cv_pthread_lc_r = yes ; then
13753                 ol_link_pthreads="-lc_r"
13754                 ol_link_threads=posix
13755         fi
13756 fi
13757
13758
13759                 # Pthread try link: -threads (ol_cv_pthread_threads)
13760 if test "$ol_link_threads" = no ; then
13761         # try -threads
13762         echo $ac_n "checking for pthread link with -threads""... $ac_c" 1>&6
13763 echo "configure:13764: checking for pthread link with -threads" >&5
13764 if eval "test \"\${ol_cv_pthread_threads+set}\" = set"; then
13765   echo $ac_n "(cached) $ac_c" 1>&6
13766 else
13767   
13768                 # save the flags
13769                 ol_LIBS="$LIBS"
13770                 LIBS="-threads $LIBS"
13771
13772                 if test "$cross_compiling" = yes; then
13773   cat > conftest.$ac_ext <<EOF
13774 #line 13775 "configure"
13775 #include "confdefs.h"
13776 /* pthread test headers */
13777 #include <pthread.h>
13778 #if HAVE_PTHREADS < 7
13779 #include <errno.h>
13780 #endif
13781 #ifndef NULL
13782 #define NULL (void*)0
13783 #endif
13784
13785 static void *task(p)
13786         void *p;
13787 {
13788         return (void *) (p == NULL);
13789 }
13790
13791 int main() {
13792
13793         /* pthread test function */
13794 #ifndef PTHREAD_CREATE_DETACHED
13795 #define PTHREAD_CREATE_DETACHED 1
13796 #endif
13797         pthread_t t;
13798         int status;
13799         int detach = PTHREAD_CREATE_DETACHED;
13800
13801 #if HAVE_PTHREADS > 4
13802         /* Final pthreads */
13803         pthread_attr_t attr;
13804
13805         status = pthread_attr_init(&attr);
13806         if( status ) return status;
13807
13808 #if HAVE_PTHREADS < 7
13809         status = pthread_attr_setdetachstate(&attr, &detach);
13810         if( status < 0 ) status = errno;
13811 #else
13812         status = pthread_attr_setdetachstate(&attr, detach);
13813 #endif
13814         if( status ) return status;
13815         status = pthread_create( &t, &attr, task, NULL );
13816 #if HAVE_PTHREADS < 7
13817         if( status < 0 ) status = errno;
13818 #endif
13819         if( status ) return status;
13820 #else
13821         /* Draft 4 pthreads */
13822         status = pthread_create( &t, pthread_attr_default, task, NULL );
13823         if( status ) return errno;
13824
13825         /* give thread a chance to complete */
13826         /* it should remain joinable and hence detachable */
13827         sleep( 1 );
13828
13829         status = pthread_detach( &t );
13830         if( status ) return errno;
13831 #endif
13832
13833 #ifdef HAVE_LINUX_THREADS
13834         pthread_kill_other_threads_np();
13835 #endif
13836
13837         return 0;
13838
13839 ; return 0; }
13840 EOF
13841 if { (eval echo configure:13842: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13842   rm -rf conftest*
13843   ol_cv_pthread_threads=yes
13844 else
13845   echo "configure: failed program was:" >&5
13846   cat conftest.$ac_ext >&5
13847   rm -rf conftest*
13848   ol_cv_pthread_threads=no
13849 fi
13850 rm -f conftest*
13851 else
13852   cat > conftest.$ac_ext <<EOF
13853 #line 13854 "configure"
13854 #include "confdefs.h"
13855 /* pthread test headers */
13856 #include <pthread.h>
13857 #if HAVE_PTHREADS < 7
13858 #include <errno.h>
13859 #endif
13860 #ifndef NULL
13861 #define NULL (void*)0
13862 #endif
13863
13864 static void *task(p)
13865         void *p;
13866 {
13867         return (void *) (p == NULL);
13868 }
13869
13870
13871 int main(argc, argv)
13872         int argc;
13873         char **argv;
13874 {
13875
13876         /* pthread test function */
13877 #ifndef PTHREAD_CREATE_DETACHED
13878 #define PTHREAD_CREATE_DETACHED 1
13879 #endif
13880         pthread_t t;
13881         int status;
13882         int detach = PTHREAD_CREATE_DETACHED;
13883
13884 #if HAVE_PTHREADS > 4
13885         /* Final pthreads */
13886         pthread_attr_t attr;
13887
13888         status = pthread_attr_init(&attr);
13889         if( status ) return status;
13890
13891 #if HAVE_PTHREADS < 7
13892         status = pthread_attr_setdetachstate(&attr, &detach);
13893         if( status < 0 ) status = errno;
13894 #else
13895         status = pthread_attr_setdetachstate(&attr, detach);
13896 #endif
13897         if( status ) return status;
13898         status = pthread_create( &t, &attr, task, NULL );
13899 #if HAVE_PTHREADS < 7
13900         if( status < 0 ) status = errno;
13901 #endif
13902         if( status ) return status;
13903 #else
13904         /* Draft 4 pthreads */
13905         status = pthread_create( &t, pthread_attr_default, task, NULL );
13906         if( status ) return errno;
13907
13908         /* give thread a chance to complete */
13909         /* it should remain joinable and hence detachable */
13910         sleep( 1 );
13911
13912         status = pthread_detach( &t );
13913         if( status ) return errno;
13914 #endif
13915
13916 #ifdef HAVE_LINUX_THREADS
13917         pthread_kill_other_threads_np();
13918 #endif
13919
13920         return 0;
13921
13922 }
13923
13924 EOF
13925 if { (eval echo configure:13926: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13926 then
13927   ol_cv_pthread_threads=yes
13928 else
13929   echo "configure: failed program was:" >&5
13930   cat conftest.$ac_ext >&5
13931   rm -fr conftest*
13932   ol_cv_pthread_threads=no
13933 fi
13934 rm -fr conftest*
13935 fi
13936
13937
13938                 # restore the LIBS
13939                 LIBS="$ol_LIBS"
13940         
13941 fi
13942
13943 echo "$ac_t""$ol_cv_pthread_threads" 1>&6
13944
13945         if test $ol_cv_pthread_threads = yes ; then
13946                 ol_link_pthreads="-threads"
13947                 ol_link_threads=posix
13948         fi
13949 fi
13950
13951
13952                 # Pthread try link: -lpthreads -lmach -lexc -lc_r (ol_cv_pthread_lpthreads_lmach_lexc_lc_r)
13953 if test "$ol_link_threads" = no ; then
13954         # try -lpthreads -lmach -lexc -lc_r
13955         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc -lc_r""... $ac_c" 1>&6
13956 echo "configure:13957: checking for pthread link with -lpthreads -lmach -lexc -lc_r" >&5
13957 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc_lc_r+set}\" = set"; then
13958   echo $ac_n "(cached) $ac_c" 1>&6
13959 else
13960   
13961                 # save the flags
13962                 ol_LIBS="$LIBS"
13963                 LIBS="-lpthreads -lmach -lexc -lc_r $LIBS"
13964
13965                 if test "$cross_compiling" = yes; then
13966   cat > conftest.$ac_ext <<EOF
13967 #line 13968 "configure"
13968 #include "confdefs.h"
13969 /* pthread test headers */
13970 #include <pthread.h>
13971 #if HAVE_PTHREADS < 7
13972 #include <errno.h>
13973 #endif
13974 #ifndef NULL
13975 #define NULL (void*)0
13976 #endif
13977
13978 static void *task(p)
13979         void *p;
13980 {
13981         return (void *) (p == NULL);
13982 }
13983
13984 int main() {
13985
13986         /* pthread test function */
13987 #ifndef PTHREAD_CREATE_DETACHED
13988 #define PTHREAD_CREATE_DETACHED 1
13989 #endif
13990         pthread_t t;
13991         int status;
13992         int detach = PTHREAD_CREATE_DETACHED;
13993
13994 #if HAVE_PTHREADS > 4
13995         /* Final pthreads */
13996         pthread_attr_t attr;
13997
13998         status = pthread_attr_init(&attr);
13999         if( status ) return status;
14000
14001 #if HAVE_PTHREADS < 7
14002         status = pthread_attr_setdetachstate(&attr, &detach);
14003         if( status < 0 ) status = errno;
14004 #else
14005         status = pthread_attr_setdetachstate(&attr, detach);
14006 #endif
14007         if( status ) return status;
14008         status = pthread_create( &t, &attr, task, NULL );
14009 #if HAVE_PTHREADS < 7
14010         if( status < 0 ) status = errno;
14011 #endif
14012         if( status ) return status;
14013 #else
14014         /* Draft 4 pthreads */
14015         status = pthread_create( &t, pthread_attr_default, task, NULL );
14016         if( status ) return errno;
14017
14018         /* give thread a chance to complete */
14019         /* it should remain joinable and hence detachable */
14020         sleep( 1 );
14021
14022         status = pthread_detach( &t );
14023         if( status ) return errno;
14024 #endif
14025
14026 #ifdef HAVE_LINUX_THREADS
14027         pthread_kill_other_threads_np();
14028 #endif
14029
14030         return 0;
14031
14032 ; return 0; }
14033 EOF
14034 if { (eval echo configure:14035: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14035   rm -rf conftest*
14036   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
14037 else
14038   echo "configure: failed program was:" >&5
14039   cat conftest.$ac_ext >&5
14040   rm -rf conftest*
14041   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
14042 fi
14043 rm -f conftest*
14044 else
14045   cat > conftest.$ac_ext <<EOF
14046 #line 14047 "configure"
14047 #include "confdefs.h"
14048 /* pthread test headers */
14049 #include <pthread.h>
14050 #if HAVE_PTHREADS < 7
14051 #include <errno.h>
14052 #endif
14053 #ifndef NULL
14054 #define NULL (void*)0
14055 #endif
14056
14057 static void *task(p)
14058         void *p;
14059 {
14060         return (void *) (p == NULL);
14061 }
14062
14063
14064 int main(argc, argv)
14065         int argc;
14066         char **argv;
14067 {
14068
14069         /* pthread test function */
14070 #ifndef PTHREAD_CREATE_DETACHED
14071 #define PTHREAD_CREATE_DETACHED 1
14072 #endif
14073         pthread_t t;
14074         int status;
14075         int detach = PTHREAD_CREATE_DETACHED;
14076
14077 #if HAVE_PTHREADS > 4
14078         /* Final pthreads */
14079         pthread_attr_t attr;
14080
14081         status = pthread_attr_init(&attr);
14082         if( status ) return status;
14083
14084 #if HAVE_PTHREADS < 7
14085         status = pthread_attr_setdetachstate(&attr, &detach);
14086         if( status < 0 ) status = errno;
14087 #else
14088         status = pthread_attr_setdetachstate(&attr, detach);
14089 #endif
14090         if( status ) return status;
14091         status = pthread_create( &t, &attr, task, NULL );
14092 #if HAVE_PTHREADS < 7
14093         if( status < 0 ) status = errno;
14094 #endif
14095         if( status ) return status;
14096 #else
14097         /* Draft 4 pthreads */
14098         status = pthread_create( &t, pthread_attr_default, task, NULL );
14099         if( status ) return errno;
14100
14101         /* give thread a chance to complete */
14102         /* it should remain joinable and hence detachable */
14103         sleep( 1 );
14104
14105         status = pthread_detach( &t );
14106         if( status ) return errno;
14107 #endif
14108
14109 #ifdef HAVE_LINUX_THREADS
14110         pthread_kill_other_threads_np();
14111 #endif
14112
14113         return 0;
14114
14115 }
14116
14117 EOF
14118 if { (eval echo configure:14119: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14119 then
14120   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
14121 else
14122   echo "configure: failed program was:" >&5
14123   cat conftest.$ac_ext >&5
14124   rm -fr conftest*
14125   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
14126 fi
14127 rm -fr conftest*
14128 fi
14129
14130
14131                 # restore the LIBS
14132                 LIBS="$ol_LIBS"
14133         
14134 fi
14135
14136 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc_lc_r" 1>&6
14137
14138         if test $ol_cv_pthread_lpthreads_lmach_lexc_lc_r = yes ; then
14139                 ol_link_pthreads="-lpthreads -lmach -lexc -lc_r"
14140                 ol_link_threads=posix
14141         fi
14142 fi
14143
14144                 # Pthread try link: -lpthreads -lmach -lexc (ol_cv_pthread_lpthreads_lmach_lexc)
14145 if test "$ol_link_threads" = no ; then
14146         # try -lpthreads -lmach -lexc
14147         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc""... $ac_c" 1>&6
14148 echo "configure:14149: checking for pthread link with -lpthreads -lmach -lexc" >&5
14149 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc+set}\" = set"; then
14150   echo $ac_n "(cached) $ac_c" 1>&6
14151 else
14152   
14153                 # save the flags
14154                 ol_LIBS="$LIBS"
14155                 LIBS="-lpthreads -lmach -lexc $LIBS"
14156
14157                 if test "$cross_compiling" = yes; then
14158   cat > conftest.$ac_ext <<EOF
14159 #line 14160 "configure"
14160 #include "confdefs.h"
14161 /* pthread test headers */
14162 #include <pthread.h>
14163 #if HAVE_PTHREADS < 7
14164 #include <errno.h>
14165 #endif
14166 #ifndef NULL
14167 #define NULL (void*)0
14168 #endif
14169
14170 static void *task(p)
14171         void *p;
14172 {
14173         return (void *) (p == NULL);
14174 }
14175
14176 int main() {
14177
14178         /* pthread test function */
14179 #ifndef PTHREAD_CREATE_DETACHED
14180 #define PTHREAD_CREATE_DETACHED 1
14181 #endif
14182         pthread_t t;
14183         int status;
14184         int detach = PTHREAD_CREATE_DETACHED;
14185
14186 #if HAVE_PTHREADS > 4
14187         /* Final pthreads */
14188         pthread_attr_t attr;
14189
14190         status = pthread_attr_init(&attr);
14191         if( status ) return status;
14192
14193 #if HAVE_PTHREADS < 7
14194         status = pthread_attr_setdetachstate(&attr, &detach);
14195         if( status < 0 ) status = errno;
14196 #else
14197         status = pthread_attr_setdetachstate(&attr, detach);
14198 #endif
14199         if( status ) return status;
14200         status = pthread_create( &t, &attr, task, NULL );
14201 #if HAVE_PTHREADS < 7
14202         if( status < 0 ) status = errno;
14203 #endif
14204         if( status ) return status;
14205 #else
14206         /* Draft 4 pthreads */
14207         status = pthread_create( &t, pthread_attr_default, task, NULL );
14208         if( status ) return errno;
14209
14210         /* give thread a chance to complete */
14211         /* it should remain joinable and hence detachable */
14212         sleep( 1 );
14213
14214         status = pthread_detach( &t );
14215         if( status ) return errno;
14216 #endif
14217
14218 #ifdef HAVE_LINUX_THREADS
14219         pthread_kill_other_threads_np();
14220 #endif
14221
14222         return 0;
14223
14224 ; return 0; }
14225 EOF
14226 if { (eval echo configure:14227: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14227   rm -rf conftest*
14228   ol_cv_pthread_lpthreads_lmach_lexc=yes
14229 else
14230   echo "configure: failed program was:" >&5
14231   cat conftest.$ac_ext >&5
14232   rm -rf conftest*
14233   ol_cv_pthread_lpthreads_lmach_lexc=no
14234 fi
14235 rm -f conftest*
14236 else
14237   cat > conftest.$ac_ext <<EOF
14238 #line 14239 "configure"
14239 #include "confdefs.h"
14240 /* pthread test headers */
14241 #include <pthread.h>
14242 #if HAVE_PTHREADS < 7
14243 #include <errno.h>
14244 #endif
14245 #ifndef NULL
14246 #define NULL (void*)0
14247 #endif
14248
14249 static void *task(p)
14250         void *p;
14251 {
14252         return (void *) (p == NULL);
14253 }
14254
14255
14256 int main(argc, argv)
14257         int argc;
14258         char **argv;
14259 {
14260
14261         /* pthread test function */
14262 #ifndef PTHREAD_CREATE_DETACHED
14263 #define PTHREAD_CREATE_DETACHED 1
14264 #endif
14265         pthread_t t;
14266         int status;
14267         int detach = PTHREAD_CREATE_DETACHED;
14268
14269 #if HAVE_PTHREADS > 4
14270         /* Final pthreads */
14271         pthread_attr_t attr;
14272
14273         status = pthread_attr_init(&attr);
14274         if( status ) return status;
14275
14276 #if HAVE_PTHREADS < 7
14277         status = pthread_attr_setdetachstate(&attr, &detach);
14278         if( status < 0 ) status = errno;
14279 #else
14280         status = pthread_attr_setdetachstate(&attr, detach);
14281 #endif
14282         if( status ) return status;
14283         status = pthread_create( &t, &attr, task, NULL );
14284 #if HAVE_PTHREADS < 7
14285         if( status < 0 ) status = errno;
14286 #endif
14287         if( status ) return status;
14288 #else
14289         /* Draft 4 pthreads */
14290         status = pthread_create( &t, pthread_attr_default, task, NULL );
14291         if( status ) return errno;
14292
14293         /* give thread a chance to complete */
14294         /* it should remain joinable and hence detachable */
14295         sleep( 1 );
14296
14297         status = pthread_detach( &t );
14298         if( status ) return errno;
14299 #endif
14300
14301 #ifdef HAVE_LINUX_THREADS
14302         pthread_kill_other_threads_np();
14303 #endif
14304
14305         return 0;
14306
14307 }
14308
14309 EOF
14310 if { (eval echo configure:14311: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14311 then
14312   ol_cv_pthread_lpthreads_lmach_lexc=yes
14313 else
14314   echo "configure: failed program was:" >&5
14315   cat conftest.$ac_ext >&5
14316   rm -fr conftest*
14317   ol_cv_pthread_lpthreads_lmach_lexc=no
14318 fi
14319 rm -fr conftest*
14320 fi
14321
14322
14323                 # restore the LIBS
14324                 LIBS="$ol_LIBS"
14325         
14326 fi
14327
14328 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc" 1>&6
14329
14330         if test $ol_cv_pthread_lpthreads_lmach_lexc = yes ; then
14331                 ol_link_pthreads="-lpthreads -lmach -lexc"
14332                 ol_link_threads=posix
14333         fi
14334 fi
14335
14336                 # Pthread try link: -lpthreads -lexc (ol_cv_pthread_lpthreads_lexc)
14337 if test "$ol_link_threads" = no ; then
14338         # try -lpthreads -lexc
14339         echo $ac_n "checking for pthread link with -lpthreads -lexc""... $ac_c" 1>&6
14340 echo "configure:14341: checking for pthread link with -lpthreads -lexc" >&5
14341 if eval "test \"\${ol_cv_pthread_lpthreads_lexc+set}\" = set"; then
14342   echo $ac_n "(cached) $ac_c" 1>&6
14343 else
14344   
14345                 # save the flags
14346                 ol_LIBS="$LIBS"
14347                 LIBS="-lpthreads -lexc $LIBS"
14348
14349                 if test "$cross_compiling" = yes; then
14350   cat > conftest.$ac_ext <<EOF
14351 #line 14352 "configure"
14352 #include "confdefs.h"
14353 /* pthread test headers */
14354 #include <pthread.h>
14355 #if HAVE_PTHREADS < 7
14356 #include <errno.h>
14357 #endif
14358 #ifndef NULL
14359 #define NULL (void*)0
14360 #endif
14361
14362 static void *task(p)
14363         void *p;
14364 {
14365         return (void *) (p == NULL);
14366 }
14367
14368 int main() {
14369
14370         /* pthread test function */
14371 #ifndef PTHREAD_CREATE_DETACHED
14372 #define PTHREAD_CREATE_DETACHED 1
14373 #endif
14374         pthread_t t;
14375         int status;
14376         int detach = PTHREAD_CREATE_DETACHED;
14377
14378 #if HAVE_PTHREADS > 4
14379         /* Final pthreads */
14380         pthread_attr_t attr;
14381
14382         status = pthread_attr_init(&attr);
14383         if( status ) return status;
14384
14385 #if HAVE_PTHREADS < 7
14386         status = pthread_attr_setdetachstate(&attr, &detach);
14387         if( status < 0 ) status = errno;
14388 #else
14389         status = pthread_attr_setdetachstate(&attr, detach);
14390 #endif
14391         if( status ) return status;
14392         status = pthread_create( &t, &attr, task, NULL );
14393 #if HAVE_PTHREADS < 7
14394         if( status < 0 ) status = errno;
14395 #endif
14396         if( status ) return status;
14397 #else
14398         /* Draft 4 pthreads */
14399         status = pthread_create( &t, pthread_attr_default, task, NULL );
14400         if( status ) return errno;
14401
14402         /* give thread a chance to complete */
14403         /* it should remain joinable and hence detachable */
14404         sleep( 1 );
14405
14406         status = pthread_detach( &t );
14407         if( status ) return errno;
14408 #endif
14409
14410 #ifdef HAVE_LINUX_THREADS
14411         pthread_kill_other_threads_np();
14412 #endif
14413
14414         return 0;
14415
14416 ; return 0; }
14417 EOF
14418 if { (eval echo configure:14419: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14419   rm -rf conftest*
14420   ol_cv_pthread_lpthreads_lexc=yes
14421 else
14422   echo "configure: failed program was:" >&5
14423   cat conftest.$ac_ext >&5
14424   rm -rf conftest*
14425   ol_cv_pthread_lpthreads_lexc=no
14426 fi
14427 rm -f conftest*
14428 else
14429   cat > conftest.$ac_ext <<EOF
14430 #line 14431 "configure"
14431 #include "confdefs.h"
14432 /* pthread test headers */
14433 #include <pthread.h>
14434 #if HAVE_PTHREADS < 7
14435 #include <errno.h>
14436 #endif
14437 #ifndef NULL
14438 #define NULL (void*)0
14439 #endif
14440
14441 static void *task(p)
14442         void *p;
14443 {
14444         return (void *) (p == NULL);
14445 }
14446
14447
14448 int main(argc, argv)
14449         int argc;
14450         char **argv;
14451 {
14452
14453         /* pthread test function */
14454 #ifndef PTHREAD_CREATE_DETACHED
14455 #define PTHREAD_CREATE_DETACHED 1
14456 #endif
14457         pthread_t t;
14458         int status;
14459         int detach = PTHREAD_CREATE_DETACHED;
14460
14461 #if HAVE_PTHREADS > 4
14462         /* Final pthreads */
14463         pthread_attr_t attr;
14464
14465         status = pthread_attr_init(&attr);
14466         if( status ) return status;
14467
14468 #if HAVE_PTHREADS < 7
14469         status = pthread_attr_setdetachstate(&attr, &detach);
14470         if( status < 0 ) status = errno;
14471 #else
14472         status = pthread_attr_setdetachstate(&attr, detach);
14473 #endif
14474         if( status ) return status;
14475         status = pthread_create( &t, &attr, task, NULL );
14476 #if HAVE_PTHREADS < 7
14477         if( status < 0 ) status = errno;
14478 #endif
14479         if( status ) return status;
14480 #else
14481         /* Draft 4 pthreads */
14482         status = pthread_create( &t, pthread_attr_default, task, NULL );
14483         if( status ) return errno;
14484
14485         /* give thread a chance to complete */
14486         /* it should remain joinable and hence detachable */
14487         sleep( 1 );
14488
14489         status = pthread_detach( &t );
14490         if( status ) return errno;
14491 #endif
14492
14493 #ifdef HAVE_LINUX_THREADS
14494         pthread_kill_other_threads_np();
14495 #endif
14496
14497         return 0;
14498
14499 }
14500
14501 EOF
14502 if { (eval echo configure:14503: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14503 then
14504   ol_cv_pthread_lpthreads_lexc=yes
14505 else
14506   echo "configure: failed program was:" >&5
14507   cat conftest.$ac_ext >&5
14508   rm -fr conftest*
14509   ol_cv_pthread_lpthreads_lexc=no
14510 fi
14511 rm -fr conftest*
14512 fi
14513
14514
14515                 # restore the LIBS
14516                 LIBS="$ol_LIBS"
14517         
14518 fi
14519
14520 echo "$ac_t""$ol_cv_pthread_lpthreads_lexc" 1>&6
14521
14522         if test $ol_cv_pthread_lpthreads_lexc = yes ; then
14523                 ol_link_pthreads="-lpthreads -lexc"
14524                 ol_link_threads=posix
14525         fi
14526 fi
14527
14528
14529                 # Pthread try link: -lpthreads (ol_cv_pthread_lib_lpthreads)
14530 if test "$ol_link_threads" = no ; then
14531         # try -lpthreads
14532         echo $ac_n "checking for pthread link with -lpthreads""... $ac_c" 1>&6
14533 echo "configure:14534: checking for pthread link with -lpthreads" >&5
14534 if eval "test \"\${ol_cv_pthread_lib_lpthreads+set}\" = set"; then
14535   echo $ac_n "(cached) $ac_c" 1>&6
14536 else
14537   
14538                 # save the flags
14539                 ol_LIBS="$LIBS"
14540                 LIBS="-lpthreads $LIBS"
14541
14542                 if test "$cross_compiling" = yes; then
14543   cat > conftest.$ac_ext <<EOF
14544 #line 14545 "configure"
14545 #include "confdefs.h"
14546 /* pthread test headers */
14547 #include <pthread.h>
14548 #if HAVE_PTHREADS < 7
14549 #include <errno.h>
14550 #endif
14551 #ifndef NULL
14552 #define NULL (void*)0
14553 #endif
14554
14555 static void *task(p)
14556         void *p;
14557 {
14558         return (void *) (p == NULL);
14559 }
14560
14561 int main() {
14562
14563         /* pthread test function */
14564 #ifndef PTHREAD_CREATE_DETACHED
14565 #define PTHREAD_CREATE_DETACHED 1
14566 #endif
14567         pthread_t t;
14568         int status;
14569         int detach = PTHREAD_CREATE_DETACHED;
14570
14571 #if HAVE_PTHREADS > 4
14572         /* Final pthreads */
14573         pthread_attr_t attr;
14574
14575         status = pthread_attr_init(&attr);
14576         if( status ) return status;
14577
14578 #if HAVE_PTHREADS < 7
14579         status = pthread_attr_setdetachstate(&attr, &detach);
14580         if( status < 0 ) status = errno;
14581 #else
14582         status = pthread_attr_setdetachstate(&attr, detach);
14583 #endif
14584         if( status ) return status;
14585         status = pthread_create( &t, &attr, task, NULL );
14586 #if HAVE_PTHREADS < 7
14587         if( status < 0 ) status = errno;
14588 #endif
14589         if( status ) return status;
14590 #else
14591         /* Draft 4 pthreads */
14592         status = pthread_create( &t, pthread_attr_default, task, NULL );
14593         if( status ) return errno;
14594
14595         /* give thread a chance to complete */
14596         /* it should remain joinable and hence detachable */
14597         sleep( 1 );
14598
14599         status = pthread_detach( &t );
14600         if( status ) return errno;
14601 #endif
14602
14603 #ifdef HAVE_LINUX_THREADS
14604         pthread_kill_other_threads_np();
14605 #endif
14606
14607         return 0;
14608
14609 ; return 0; }
14610 EOF
14611 if { (eval echo configure:14612: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14612   rm -rf conftest*
14613   ol_cv_pthread_lib_lpthreads=yes
14614 else
14615   echo "configure: failed program was:" >&5
14616   cat conftest.$ac_ext >&5
14617   rm -rf conftest*
14618   ol_cv_pthread_lib_lpthreads=no
14619 fi
14620 rm -f conftest*
14621 else
14622   cat > conftest.$ac_ext <<EOF
14623 #line 14624 "configure"
14624 #include "confdefs.h"
14625 /* pthread test headers */
14626 #include <pthread.h>
14627 #if HAVE_PTHREADS < 7
14628 #include <errno.h>
14629 #endif
14630 #ifndef NULL
14631 #define NULL (void*)0
14632 #endif
14633
14634 static void *task(p)
14635         void *p;
14636 {
14637         return (void *) (p == NULL);
14638 }
14639
14640
14641 int main(argc, argv)
14642         int argc;
14643         char **argv;
14644 {
14645
14646         /* pthread test function */
14647 #ifndef PTHREAD_CREATE_DETACHED
14648 #define PTHREAD_CREATE_DETACHED 1
14649 #endif
14650         pthread_t t;
14651         int status;
14652         int detach = PTHREAD_CREATE_DETACHED;
14653
14654 #if HAVE_PTHREADS > 4
14655         /* Final pthreads */
14656         pthread_attr_t attr;
14657
14658         status = pthread_attr_init(&attr);
14659         if( status ) return status;
14660
14661 #if HAVE_PTHREADS < 7
14662         status = pthread_attr_setdetachstate(&attr, &detach);
14663         if( status < 0 ) status = errno;
14664 #else
14665         status = pthread_attr_setdetachstate(&attr, detach);
14666 #endif
14667         if( status ) return status;
14668         status = pthread_create( &t, &attr, task, NULL );
14669 #if HAVE_PTHREADS < 7
14670         if( status < 0 ) status = errno;
14671 #endif
14672         if( status ) return status;
14673 #else
14674         /* Draft 4 pthreads */
14675         status = pthread_create( &t, pthread_attr_default, task, NULL );
14676         if( status ) return errno;
14677
14678         /* give thread a chance to complete */
14679         /* it should remain joinable and hence detachable */
14680         sleep( 1 );
14681
14682         status = pthread_detach( &t );
14683         if( status ) return errno;
14684 #endif
14685
14686 #ifdef HAVE_LINUX_THREADS
14687         pthread_kill_other_threads_np();
14688 #endif
14689
14690         return 0;
14691
14692 }
14693
14694 EOF
14695 if { (eval echo configure:14696: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14696 then
14697   ol_cv_pthread_lib_lpthreads=yes
14698 else
14699   echo "configure: failed program was:" >&5
14700   cat conftest.$ac_ext >&5
14701   rm -fr conftest*
14702   ol_cv_pthread_lib_lpthreads=no
14703 fi
14704 rm -fr conftest*
14705 fi
14706
14707
14708                 # restore the LIBS
14709                 LIBS="$ol_LIBS"
14710         
14711 fi
14712
14713 echo "$ac_t""$ol_cv_pthread_lib_lpthreads" 1>&6
14714
14715         if test $ol_cv_pthread_lib_lpthreads = yes ; then
14716                 ol_link_pthreads="-lpthreads"
14717                 ol_link_threads=posix
14718         fi
14719 fi
14720
14721
14722                 if test $ol_link_threads != no ; then
14723                         LTHREAD_LIBS="$LTHREAD_LIBS $ol_link_pthreads"
14724
14725                                                 save_CPPFLAGS="$CPPFLAGS"
14726                         save_LIBS="$LIBS"
14727                         LIBS="$LTHREAD_LIBS $LIBS"
14728
14729                                                                                                 for ac_func in sched_yield pthread_yield thr_yield
14730 do
14731 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
14732 echo "configure:14733: checking for $ac_func" >&5
14733 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
14734   echo $ac_n "(cached) $ac_c" 1>&6
14735 else
14736   cat > conftest.$ac_ext <<EOF
14737 #line 14738 "configure"
14738 #include "confdefs.h"
14739 /* System header to define __stub macros and hopefully few prototypes,
14740     which can conflict with char $ac_func(); below.  */
14741 #include <assert.h>
14742 /* Override any gcc2 internal prototype to avoid an error.  */
14743 /* We use char because int might match the return type of a gcc2
14744     builtin and then its argument prototype would still apply.  */
14745 char $ac_func();
14746 char (*f)();
14747
14748 int main() {
14749
14750 /* The GNU C library defines this for functions which it implements
14751     to always fail with ENOSYS.  Some functions are actually named
14752     something starting with __ and the normal name is an alias.  */
14753 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14754 choke me
14755 #else
14756 f = $ac_func;
14757 #endif
14758
14759 ; return 0; }
14760 EOF
14761 if { (eval echo configure:14762: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14762   rm -rf conftest*
14763   eval "ac_cv_func_$ac_func=yes"
14764 else
14765   echo "configure: failed program was:" >&5
14766   cat conftest.$ac_ext >&5
14767   rm -rf conftest*
14768   eval "ac_cv_func_$ac_func=no"
14769 fi
14770 rm -f conftest*
14771 fi
14772
14773 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
14774   echo "$ac_t""yes" 1>&6
14775     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
14776   cat >> confdefs.h <<EOF
14777 #define $ac_tr_func 1
14778 EOF
14779  
14780 else
14781   echo "$ac_t""no" 1>&6
14782 fi
14783 done
14784
14785
14786                         if test $ac_cv_func_sched_yield = no -a \
14787                                 $ac_cv_func_pthread_yield = no -a \
14788                                 $ac_cv_func_thr_yield = no ; then
14789                                                                 echo $ac_n "checking for sched_yield in -lrt""... $ac_c" 1>&6
14790 echo "configure:14791: checking for sched_yield in -lrt" >&5
14791 ac_lib_var=`echo rt'_'sched_yield | sed 'y%./+-:%__p__%'`
14792 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
14793   echo $ac_n "(cached) $ac_c" 1>&6
14794 else
14795   ac_save_LIBS="$LIBS"
14796 LIBS="-lrt  $LIBS"
14797 cat > conftest.$ac_ext <<EOF
14798 #line 14799 "configure"
14799 #include "confdefs.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 sched_yield();
14804
14805 int main() {
14806 sched_yield()
14807 ; return 0; }
14808 EOF
14809 if { (eval echo configure:14810: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14810   rm -rf conftest*
14811   eval "ac_cv_lib_$ac_lib_var=yes"
14812 else
14813   echo "configure: failed program was:" >&5
14814   cat conftest.$ac_ext >&5
14815   rm -rf conftest*
14816   eval "ac_cv_lib_$ac_lib_var=no"
14817 fi
14818 rm -f conftest*
14819 LIBS="$ac_save_LIBS"
14820
14821 fi
14822 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
14823   echo "$ac_t""yes" 1>&6
14824   LTHREAD_LIBS="$LTHREAD_LIBS -lrt"
14825                                         cat >> confdefs.h <<\EOF
14826 #define HAVE_SCHED_YIELD 1
14827 EOF
14828
14829                                         ac_cv_func_sched_yield=yes
14830 else
14831   echo "$ac_t""no" 1>&6
14832 ac_cv_func_sched_yield=no
14833 fi
14834
14835                         fi
14836                         if test $ac_cv_func_sched_yield = no -a \
14837                                 $ac_cv_func_pthread_yield = no -a \
14838                                 "$ac_cv_func_thr_yield" = no ; then
14839                                 echo "configure: warning: could not locate sched_yield() or pthread_yield()" 1>&2
14840                         fi
14841
14842                                                 for ac_func in pthread_kill pthread_rwlock_destroy
14843 do
14844 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
14845 echo "configure:14846: checking for $ac_func" >&5
14846 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
14847   echo $ac_n "(cached) $ac_c" 1>&6
14848 else
14849   cat > conftest.$ac_ext <<EOF
14850 #line 14851 "configure"
14851 #include "confdefs.h"
14852 /* System header to define __stub macros and hopefully few prototypes,
14853     which can conflict with char $ac_func(); below.  */
14854 #include <assert.h>
14855 /* Override any gcc2 internal prototype to avoid an error.  */
14856 /* We use char because int might match the return type of a gcc2
14857     builtin and then its argument prototype would still apply.  */
14858 char $ac_func();
14859 char (*f)();
14860
14861 int main() {
14862
14863 /* The GNU C library defines this for functions which it implements
14864     to always fail with ENOSYS.  Some functions are actually named
14865     something starting with __ and the normal name is an alias.  */
14866 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14867 choke me
14868 #else
14869 f = $ac_func;
14870 #endif
14871
14872 ; return 0; }
14873 EOF
14874 if { (eval echo configure:14875: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14875   rm -rf conftest*
14876   eval "ac_cv_func_$ac_func=yes"
14877 else
14878   echo "configure: failed program was:" >&5
14879   cat conftest.$ac_ext >&5
14880   rm -rf conftest*
14881   eval "ac_cv_func_$ac_func=no"
14882 fi
14883 rm -f conftest*
14884 fi
14885
14886 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
14887   echo "$ac_t""yes" 1>&6
14888     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
14889   cat >> confdefs.h <<EOF
14890 #define $ac_tr_func 1
14891 EOF
14892  
14893 else
14894   echo "$ac_t""no" 1>&6
14895 fi
14896 done
14897
14898
14899                                                                         echo $ac_n "checking for pthread_detach with <pthread.h>""... $ac_c" 1>&6
14900 echo "configure:14901: checking for pthread_detach with <pthread.h>" >&5
14901 if eval "test \"\${ol_cv_func_pthread_detach+set}\" = set"; then
14902   echo $ac_n "(cached) $ac_c" 1>&6
14903 else
14904   
14905                                                                 cat > conftest.$ac_ext <<EOF
14906 #line 14907 "configure"
14907 #include "confdefs.h"
14908
14909 #include <pthread.h>
14910 #ifndef NULL
14911 #define NULL (void*)0
14912 #endif
14913
14914 int main() {
14915 pthread_detach(NULL);
14916 ; return 0; }
14917 EOF
14918 if { (eval echo configure:14919: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14919   rm -rf conftest*
14920   ol_cv_func_pthread_detach=yes
14921 else
14922   echo "configure: failed program was:" >&5
14923   cat conftest.$ac_ext >&5
14924   rm -rf conftest*
14925   ol_cv_func_pthread_detach=no
14926 fi
14927 rm -f conftest*
14928                         
14929 fi
14930
14931 echo "$ac_t""$ol_cv_func_pthread_detach" 1>&6
14932
14933                         if test $ol_cv_func_pthread_detach = no ; then
14934                                 { echo "configure: error: could not locate pthread_detach()" 1>&2; exit 1; }
14935                         fi
14936
14937                         cat >> confdefs.h <<\EOF
14938 #define HAVE_PTHREAD_DETACH 1
14939 EOF
14940
14941
14942                                                 for ac_func in \
14943                                 pthread_setconcurrency \
14944                                 pthread_getconcurrency \
14945                                 thr_setconcurrency \
14946                                 thr_getconcurrency \
14947                         
14948 do
14949 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
14950 echo "configure:14951: checking for $ac_func" >&5
14951 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
14952   echo $ac_n "(cached) $ac_c" 1>&6
14953 else
14954   cat > conftest.$ac_ext <<EOF
14955 #line 14956 "configure"
14956 #include "confdefs.h"
14957 /* System header to define __stub macros and hopefully few prototypes,
14958     which can conflict with char $ac_func(); below.  */
14959 #include <assert.h>
14960 /* Override any gcc2 internal prototype to avoid an error.  */
14961 /* We use char because int might match the return type of a gcc2
14962     builtin and then its argument prototype would still apply.  */
14963 char $ac_func();
14964 char (*f)();
14965
14966 int main() {
14967
14968 /* The GNU C library defines this for functions which it implements
14969     to always fail with ENOSYS.  Some functions are actually named
14970     something starting with __ and the normal name is an alias.  */
14971 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14972 choke me
14973 #else
14974 f = $ac_func;
14975 #endif
14976
14977 ; return 0; }
14978 EOF
14979 if { (eval echo configure:14980: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14980   rm -rf conftest*
14981   eval "ac_cv_func_$ac_func=yes"
14982 else
14983   echo "configure: failed program was:" >&5
14984   cat conftest.$ac_ext >&5
14985   rm -rf conftest*
14986   eval "ac_cv_func_$ac_func=no"
14987 fi
14988 rm -f conftest*
14989 fi
14990
14991 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
14992   echo "$ac_t""yes" 1>&6
14993     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
14994   cat >> confdefs.h <<EOF
14995 #define $ac_tr_func 1
14996 EOF
14997  
14998 else
14999   echo "$ac_t""no" 1>&6
15000 fi
15001 done
15002
15003
15004                         
15005         for ac_func in pthread_kill_other_threads_np
15006 do
15007 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15008 echo "configure:15009: checking for $ac_func" >&5
15009 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15010   echo $ac_n "(cached) $ac_c" 1>&6
15011 else
15012   cat > conftest.$ac_ext <<EOF
15013 #line 15014 "configure"
15014 #include "confdefs.h"
15015 /* System header to define __stub macros and hopefully few prototypes,
15016     which can conflict with char $ac_func(); below.  */
15017 #include <assert.h>
15018 /* Override any gcc2 internal prototype to avoid an error.  */
15019 /* We use char because int might match the return type of a gcc2
15020     builtin and then its argument prototype would still apply.  */
15021 char $ac_func();
15022 char (*f)();
15023
15024 int main() {
15025
15026 /* The GNU C library defines this for functions which it implements
15027     to always fail with ENOSYS.  Some functions are actually named
15028     something starting with __ and the normal name is an alias.  */
15029 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15030 choke me
15031 #else
15032 f = $ac_func;
15033 #endif
15034
15035 ; return 0; }
15036 EOF
15037 if { (eval echo configure:15038: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15038   rm -rf conftest*
15039   eval "ac_cv_func_$ac_func=yes"
15040 else
15041   echo "configure: failed program was:" >&5
15042   cat conftest.$ac_ext >&5
15043   rm -rf conftest*
15044   eval "ac_cv_func_$ac_func=no"
15045 fi
15046 rm -f conftest*
15047 fi
15048
15049 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15050   echo "$ac_t""yes" 1>&6
15051     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15052   cat >> confdefs.h <<EOF
15053 #define $ac_tr_func 1
15054 EOF
15055  
15056 else
15057   echo "$ac_t""no" 1>&6
15058 fi
15059 done
15060
15061         echo $ac_n "checking for LinuxThreads implementation""... $ac_c" 1>&6
15062 echo "configure:15063: checking for LinuxThreads implementation" >&5
15063 if eval "test \"\${ol_cv_sys_linux_threads+set}\" = set"; then
15064   echo $ac_n "(cached) $ac_c" 1>&6
15065 else
15066   ol_cv_sys_linux_threads=$ac_cv_func_pthread_kill_other_threads_np
15067 fi
15068
15069 echo "$ac_t""$ol_cv_sys_linux_threads" 1>&6
15070
15071                         
15072         
15073         
15074         echo $ac_n "checking for LinuxThreads consistency""... $ac_c" 1>&6
15075 echo "configure:15076: checking for LinuxThreads consistency" >&5
15076 if eval "test \"\${ol_cv_linux_threads+set}\" = set"; then
15077   echo $ac_n "(cached) $ac_c" 1>&6
15078 else
15079   
15080                 if test $ol_cv_header_linux_threads = yes -a \
15081                         $ol_cv_sys_linux_threads = yes; then
15082                         ol_cv_linux_threads=yes
15083                 elif test $ol_cv_header_linux_threads = no -a \
15084                         $ol_cv_sys_linux_threads = no; then
15085                         ol_cv_linux_threads=no
15086                 else
15087                         ol_cv_linux_threads=error
15088                 fi
15089         
15090 fi
15091
15092 echo "$ac_t""$ol_cv_linux_threads" 1>&6
15093
15094
15095                         if test $ol_cv_linux_threads = error; then
15096                                 { echo "configure: error: LinuxThreads header/library mismatch" 1>&2; exit 1; };
15097                         fi
15098
15099                         echo $ac_n "checking if pthread_create() works""... $ac_c" 1>&6
15100 echo "configure:15101: checking if pthread_create() works" >&5
15101 if eval "test \"\${ol_cv_pthread_create_works+set}\" = set"; then
15102   echo $ac_n "(cached) $ac_c" 1>&6
15103 else
15104   
15105                         if test "$cross_compiling" = yes; then
15106                                 ol_cv_pthread_create_works=yes
15107 else
15108   cat > conftest.$ac_ext <<EOF
15109 #line 15110 "configure"
15110 #include "confdefs.h"
15111 /* pthread test headers */
15112 #include <pthread.h>
15113 #if HAVE_PTHREADS < 7
15114 #include <errno.h>
15115 #endif
15116 #ifndef NULL
15117 #define NULL (void*)0
15118 #endif
15119
15120 static void *task(p)
15121         void *p;
15122 {
15123         return (void *) (p == NULL);
15124 }
15125
15126
15127 int main(argc, argv)
15128         int argc;
15129         char **argv;
15130 {
15131
15132         /* pthread test function */
15133 #ifndef PTHREAD_CREATE_DETACHED
15134 #define PTHREAD_CREATE_DETACHED 1
15135 #endif
15136         pthread_t t;
15137         int status;
15138         int detach = PTHREAD_CREATE_DETACHED;
15139
15140 #if HAVE_PTHREADS > 4
15141         /* Final pthreads */
15142         pthread_attr_t attr;
15143
15144         status = pthread_attr_init(&attr);
15145         if( status ) return status;
15146
15147 #if HAVE_PTHREADS < 7
15148         status = pthread_attr_setdetachstate(&attr, &detach);
15149         if( status < 0 ) status = errno;
15150 #else
15151         status = pthread_attr_setdetachstate(&attr, detach);
15152 #endif
15153         if( status ) return status;
15154         status = pthread_create( &t, &attr, task, NULL );
15155 #if HAVE_PTHREADS < 7
15156         if( status < 0 ) status = errno;
15157 #endif
15158         if( status ) return status;
15159 #else
15160         /* Draft 4 pthreads */
15161         status = pthread_create( &t, pthread_attr_default, task, NULL );
15162         if( status ) return errno;
15163
15164         /* give thread a chance to complete */
15165         /* it should remain joinable and hence detachable */
15166         sleep( 1 );
15167
15168         status = pthread_detach( &t );
15169         if( status ) return errno;
15170 #endif
15171
15172 #ifdef HAVE_LINUX_THREADS
15173         pthread_kill_other_threads_np();
15174 #endif
15175
15176         return 0;
15177
15178 }
15179
15180 EOF
15181 if { (eval echo configure:15182: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
15182 then
15183   ol_cv_pthread_create_works=yes
15184 else
15185   echo "configure: failed program was:" >&5
15186   cat conftest.$ac_ext >&5
15187   rm -fr conftest*
15188   ol_cv_pthread_create_works=no
15189 fi
15190 rm -fr conftest*
15191 fi
15192
15193 fi
15194
15195 echo "$ac_t""$ol_cv_pthread_create_works" 1>&6
15196
15197                         if test $ol_cv_pthread_create_works = no ; then
15198                                 { echo "configure: error: pthread_create is not usable, check environment settings" 1>&2; exit 1; }
15199                         fi
15200
15201                                                 if test $ol_with_yielding_select = auto ; then
15202                                 echo $ac_n "checking if select yields when using pthreads""... $ac_c" 1>&6
15203 echo "configure:15204: checking if select yields when using pthreads" >&5
15204 if eval "test \"\${ol_cv_pthread_select_yields+set}\" = set"; then
15205   echo $ac_n "(cached) $ac_c" 1>&6
15206 else
15207   
15208                                 if test "$cross_compiling" = yes; then
15209   ol_cv_pthread_select_yields=cross
15210 else
15211   cat > conftest.$ac_ext <<EOF
15212 #line 15213 "configure"
15213 #include "confdefs.h"
15214
15215 #include <sys/types.h>
15216 #include <sys/time.h>
15217 #include <unistd.h>
15218 #include <pthread.h>
15219 #ifndef NULL
15220 #define NULL (void*) 0
15221 #endif
15222
15223 static int fildes[2];
15224
15225 static void *task(p)
15226         void *p;
15227 {
15228         int i;
15229         struct timeval tv;
15230
15231         fd_set rfds;
15232
15233         tv.tv_sec=10;
15234         tv.tv_usec=0;
15235
15236         FD_ZERO(&rfds);
15237         FD_SET(fildes[0], &rfds);
15238
15239         /* we're not interested in any fds */
15240         i = select(FD_SETSIZE, &rfds, NULL, NULL, &tv);
15241
15242         if(i < 0) {
15243                 perror("select");
15244                 exit(10);
15245         }
15246
15247         exit(0); /* if we exit here, the select blocked the whole process */
15248 }
15249
15250 int main(argc, argv)
15251         int argc;
15252         char **argv;
15253 {
15254         pthread_t t;
15255
15256         /* create a pipe to select */
15257         if(pipe(&fildes[0])) {
15258                 perror("select");
15259                 exit(1);
15260         }
15261
15262 #ifdef HAVE_PTHREAD_SETCONCURRENCY
15263         (void) pthread_setconcurrency(2);
15264 #else
15265 #ifdef HAVE_THR_SETCONCURRENCY
15266         /* Set Solaris LWP concurrency to 2 */
15267         thr_setconcurrency(2);
15268 #endif
15269 #endif
15270
15271 #if HAVE_PTHREADS < 6
15272         pthread_create(&t, pthread_attr_default, task, NULL);
15273 #else
15274         pthread_create(&t, NULL, task, NULL);
15275 #endif
15276
15277         /* make sure task runs first */
15278 #if HAVE_THR_YIELD
15279         thr_yield();
15280 #elif defined( HAVE_SCHED_YIELD )
15281         sched_yield();
15282 #elif defined( HAVE_PTHREAD_YIELD )
15283         pthread_yield();
15284 #endif
15285
15286         exit(2);
15287 }
15288 EOF
15289 if { (eval echo configure:15290: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
15290 then
15291   ol_cv_pthread_select_yields=no
15292 else
15293   echo "configure: failed program was:" >&5
15294   cat conftest.$ac_ext >&5
15295   rm -fr conftest*
15296   ol_cv_pthread_select_yields=yes
15297 fi
15298 rm -fr conftest*
15299 fi
15300
15301 fi
15302
15303 echo "$ac_t""$ol_cv_pthread_select_yields" 1>&6
15304
15305                                 if test $ol_cv_pthread_select_yields = cross ; then
15306                                         { echo "configure: error: crossing compiling: use --with-yielding_select=yes|no|manual" 1>&2; exit 1; }
15307                                 fi
15308
15309                                 if test $ol_cv_pthread_select_yields = yes ; then
15310                                         ol_with_yielding_select=yes
15311                                 fi
15312                         fi
15313
15314                                                 CPPFLAGS="$save_CPPFLAGS"
15315                         LIBS="$save_LIBS"
15316                 else
15317                         { echo "configure: error: could not locate usable POSIX Threads" 1>&2; exit 1; }
15318                 fi
15319         fi
15320
15321         if test $ol_with_threads = posix ; then
15322                 { echo "configure: error: could not locate POSIX Threads" 1>&2; exit 1; }
15323         fi
15324 fi
15325
15326 if test $ol_with_threads = auto -o $ol_with_threads = yes \
15327         -o $ol_with_threads = mach ; then
15328
15329                 for ac_hdr in mach/cthreads.h cthreads.h
15330 do
15331 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15332 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15333 echo "configure:15334: checking for $ac_hdr" >&5
15334 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15335   echo $ac_n "(cached) $ac_c" 1>&6
15336 else
15337   cat > conftest.$ac_ext <<EOF
15338 #line 15339 "configure"
15339 #include "confdefs.h"
15340 #include <$ac_hdr>
15341 EOF
15342 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15343 { (eval echo configure:15344: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15344 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15345 if test -z "$ac_err"; then
15346   rm -rf conftest*
15347   eval "ac_cv_header_$ac_safe=yes"
15348 else
15349   echo "$ac_err" >&5
15350   echo "configure: failed program was:" >&5
15351   cat conftest.$ac_ext >&5
15352   rm -rf conftest*
15353   eval "ac_cv_header_$ac_safe=no"
15354 fi
15355 rm -f conftest*
15356 fi
15357 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15358   echo "$ac_t""yes" 1>&6
15359     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15360   cat >> confdefs.h <<EOF
15361 #define $ac_tr_hdr 1
15362 EOF
15363  
15364 else
15365   echo "$ac_t""no" 1>&6
15366 fi
15367 done
15368
15369         if test $ac_cv_header_mach_cthreads_h = yes ; then
15370                 ol_with_threads=found
15371
15372                                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
15373 echo "configure:15374: checking for cthread_fork" >&5
15374 if eval "test \"\${ac_cv_func_cthread_fork+set}\" = set"; then
15375   echo $ac_n "(cached) $ac_c" 1>&6
15376 else
15377   cat > conftest.$ac_ext <<EOF
15378 #line 15379 "configure"
15379 #include "confdefs.h"
15380 /* System header to define __stub macros and hopefully few prototypes,
15381     which can conflict with char cthread_fork(); below.  */
15382 #include <assert.h>
15383 /* Override any gcc2 internal prototype to avoid an error.  */
15384 /* We use char because int might match the return type of a gcc2
15385     builtin and then its argument prototype would still apply.  */
15386 char cthread_fork();
15387 char (*f)();
15388
15389 int main() {
15390
15391 /* The GNU C library defines this for functions which it implements
15392     to always fail with ENOSYS.  Some functions are actually named
15393     something starting with __ and the normal name is an alias.  */
15394 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
15395 choke me
15396 #else
15397 f = cthread_fork;
15398 #endif
15399
15400 ; return 0; }
15401 EOF
15402 if { (eval echo configure:15403: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15403   rm -rf conftest*
15404   eval "ac_cv_func_cthread_fork=yes"
15405 else
15406   echo "configure: failed program was:" >&5
15407   cat conftest.$ac_ext >&5
15408   rm -rf conftest*
15409   eval "ac_cv_func_cthread_fork=no"
15410 fi
15411 rm -f conftest*
15412 fi
15413
15414 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
15415   echo "$ac_t""yes" 1>&6
15416   ol_link_threads=yes
15417 else
15418   echo "$ac_t""no" 1>&6
15419 fi
15420
15421
15422                 if test $ol_link_threads = no ; then
15423                                                                         echo $ac_n "checking for cthread_fork with -all_load""... $ac_c" 1>&6
15424 echo "configure:15425: checking for cthread_fork with -all_load" >&5
15425 if eval "test \"\${ol_cv_cthread_all_load+set}\" = set"; then
15426   echo $ac_n "(cached) $ac_c" 1>&6
15427 else
15428   
15429                                                                 save_LIBS="$LIBS"
15430                                 LIBS="-all_load $LIBS"
15431                                 cat > conftest.$ac_ext <<EOF
15432 #line 15433 "configure"
15433 #include "confdefs.h"
15434 #include <mach/cthreads.h>
15435 int main() {
15436
15437                                         cthread_fork((void *)0, (void *)0);
15438                                         
15439 ; return 0; }
15440 EOF
15441 if { (eval echo configure:15442: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15442   rm -rf conftest*
15443   ol_cv_cthread_all_load=yes
15444 else
15445   echo "configure: failed program was:" >&5
15446   cat conftest.$ac_ext >&5
15447   rm -rf conftest*
15448   ol_cv_cthread_all_load=no
15449 fi
15450 rm -f conftest*
15451                                                                 LIBS="$save_LIBS"
15452                         
15453 fi
15454
15455 echo "$ac_t""$ol_cv_cthread_all_load" 1>&6
15456
15457                         if test $ol_cv_cthread_all_load = yes ; then
15458                                 LTHREAD_LIBS="$LTHREAD_LIBS -all_load"
15459                                 ol_link_threads=mach
15460                                 ol_with_threads=found
15461                         fi
15462                 fi
15463
15464         elif test $ac_cv_header_cthreads_h = yes ; then
15465                                 
15466                 ol_with_threads=found
15467  
15468                                 save_LIBS="$LIBS"
15469                 LIBS="$LIBS -lthreads"
15470                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
15471 echo "configure:15472: checking for cthread_fork" >&5
15472 if eval "test \"\${ac_cv_func_cthread_fork+set}\" = set"; then
15473   echo $ac_n "(cached) $ac_c" 1>&6
15474 else
15475   cat > conftest.$ac_ext <<EOF
15476 #line 15477 "configure"
15477 #include "confdefs.h"
15478 /* System header to define __stub macros and hopefully few prototypes,
15479     which can conflict with char cthread_fork(); below.  */
15480 #include <assert.h>
15481 /* Override any gcc2 internal prototype to avoid an error.  */
15482 /* We use char because int might match the return type of a gcc2
15483     builtin and then its argument prototype would still apply.  */
15484 char cthread_fork();
15485 char (*f)();
15486
15487 int main() {
15488
15489 /* The GNU C library defines this for functions which it implements
15490     to always fail with ENOSYS.  Some functions are actually named
15491     something starting with __ and the normal name is an alias.  */
15492 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
15493 choke me
15494 #else
15495 f = cthread_fork;
15496 #endif
15497
15498 ; return 0; }
15499 EOF
15500 if { (eval echo configure:15501: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15501   rm -rf conftest*
15502   eval "ac_cv_func_cthread_fork=yes"
15503 else
15504   echo "configure: failed program was:" >&5
15505   cat conftest.$ac_ext >&5
15506   rm -rf conftest*
15507   eval "ac_cv_func_cthread_fork=no"
15508 fi
15509 rm -f conftest*
15510 fi
15511
15512 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
15513   echo "$ac_t""yes" 1>&6
15514   ol_link_threads=yes
15515 else
15516   echo "$ac_t""no" 1>&6
15517 fi
15518
15519                 LIBS="$save_LIBS"
15520
15521                 if test $ol_link_threads = yes ; then
15522                         LTHREAD_LIBS="-lthreads"
15523                         ol_link_threads=mach
15524                         ol_with_threads=found
15525                 else
15526                         { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
15527                 fi
15528
15529         elif test $ol_with_threads = mach ; then
15530                 { echo "configure: error: could not locate Mach CThreads" 1>&2; exit 1; }
15531         fi
15532
15533         if test $ol_link_threads = mach ; then
15534                 cat >> confdefs.h <<\EOF
15535 #define HAVE_MACH_CTHREADS 1
15536 EOF
15537
15538         elif test $ol_with_threads = found ; then
15539                 { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
15540         fi
15541 fi
15542
15543 if test $ol_with_threads = auto -o $ol_with_threads = yes \
15544         -o $ol_with_threads = pth ; then
15545
15546         for ac_hdr in pth.h
15547 do
15548 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15549 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15550 echo "configure:15551: checking for $ac_hdr" >&5
15551 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15552   echo $ac_n "(cached) $ac_c" 1>&6
15553 else
15554   cat > conftest.$ac_ext <<EOF
15555 #line 15556 "configure"
15556 #include "confdefs.h"
15557 #include <$ac_hdr>
15558 EOF
15559 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15560 { (eval echo configure:15561: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15561 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15562 if test -z "$ac_err"; then
15563   rm -rf conftest*
15564   eval "ac_cv_header_$ac_safe=yes"
15565 else
15566   echo "$ac_err" >&5
15567   echo "configure: failed program was:" >&5
15568   cat conftest.$ac_ext >&5
15569   rm -rf conftest*
15570   eval "ac_cv_header_$ac_safe=no"
15571 fi
15572 rm -f conftest*
15573 fi
15574 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15575   echo "$ac_t""yes" 1>&6
15576     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15577   cat >> confdefs.h <<EOF
15578 #define $ac_tr_hdr 1
15579 EOF
15580  
15581 else
15582   echo "$ac_t""no" 1>&6
15583 fi
15584 done
15585
15586
15587         if test $ac_cv_header_pth_h = yes ; then
15588                 echo $ac_n "checking for pth_version in -lpth""... $ac_c" 1>&6
15589 echo "configure:15590: checking for pth_version in -lpth" >&5
15590 ac_lib_var=`echo pth'_'pth_version | sed 'y%./+-:%__p__%'`
15591 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
15592   echo $ac_n "(cached) $ac_c" 1>&6
15593 else
15594   ac_save_LIBS="$LIBS"
15595 LIBS="-lpth  $LIBS"
15596 cat > conftest.$ac_ext <<EOF
15597 #line 15598 "configure"
15598 #include "confdefs.h"
15599 /* Override any gcc2 internal prototype to avoid an error.  */
15600 /* We use char because int might match the return type of a gcc2
15601     builtin and then its argument prototype would still apply.  */
15602 char pth_version();
15603
15604 int main() {
15605 pth_version()
15606 ; return 0; }
15607 EOF
15608 if { (eval echo configure:15609: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15609   rm -rf conftest*
15610   eval "ac_cv_lib_$ac_lib_var=yes"
15611 else
15612   echo "configure: failed program was:" >&5
15613   cat conftest.$ac_ext >&5
15614   rm -rf conftest*
15615   eval "ac_cv_lib_$ac_lib_var=no"
15616 fi
15617 rm -f conftest*
15618 LIBS="$ac_save_LIBS"
15619
15620 fi
15621 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
15622   echo "$ac_t""yes" 1>&6
15623   have_pth=yes
15624 else
15625   echo "$ac_t""no" 1>&6
15626 have_pth=no
15627 fi
15628
15629
15630                 if test $have_pth = yes ; then
15631                         cat >> confdefs.h <<\EOF
15632 #define HAVE_GNU_PTH 1
15633 EOF
15634
15635                         LTHREAD_LIBS="$LTHREAD_LIBS -lpth"
15636                         ol_link_threads=pth
15637                         ol_with_threads=found
15638
15639                         if test $ol_with_yielding_select = auto ; then
15640                                 ol_with_yielding_select=yes
15641                         fi
15642                 fi
15643         fi
15644 fi
15645
15646 if test $ol_with_threads = auto -o $ol_with_threads = yes \
15647         -o $ol_with_threads = lwp ; then
15648
15649                 for ac_hdr in thread.h synch.h
15650 do
15651 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15652 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15653 echo "configure:15654: checking for $ac_hdr" >&5
15654 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15655   echo $ac_n "(cached) $ac_c" 1>&6
15656 else
15657   cat > conftest.$ac_ext <<EOF
15658 #line 15659 "configure"
15659 #include "confdefs.h"
15660 #include <$ac_hdr>
15661 EOF
15662 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15663 { (eval echo configure:15664: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15664 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15665 if test -z "$ac_err"; then
15666   rm -rf conftest*
15667   eval "ac_cv_header_$ac_safe=yes"
15668 else
15669   echo "$ac_err" >&5
15670   echo "configure: failed program was:" >&5
15671   cat conftest.$ac_ext >&5
15672   rm -rf conftest*
15673   eval "ac_cv_header_$ac_safe=no"
15674 fi
15675 rm -f conftest*
15676 fi
15677 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15678   echo "$ac_t""yes" 1>&6
15679     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15680   cat >> confdefs.h <<EOF
15681 #define $ac_tr_hdr 1
15682 EOF
15683  
15684 else
15685   echo "$ac_t""no" 1>&6
15686 fi
15687 done
15688
15689         if test $ac_cv_header_thread_h = yes -a $ac_cv_header_synch_h = yes ; then
15690                 echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6
15691 echo "configure:15692: checking for thr_create in -lthread" >&5
15692 ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-:%__p__%'`
15693 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
15694   echo $ac_n "(cached) $ac_c" 1>&6
15695 else
15696   ac_save_LIBS="$LIBS"
15697 LIBS="-lthread  $LIBS"
15698 cat > conftest.$ac_ext <<EOF
15699 #line 15700 "configure"
15700 #include "confdefs.h"
15701 /* Override any gcc2 internal prototype to avoid an error.  */
15702 /* We use char because int might match the return type of a gcc2
15703     builtin and then its argument prototype would still apply.  */
15704 char thr_create();
15705
15706 int main() {
15707 thr_create()
15708 ; return 0; }
15709 EOF
15710 if { (eval echo configure:15711: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15711   rm -rf conftest*
15712   eval "ac_cv_lib_$ac_lib_var=yes"
15713 else
15714   echo "configure: failed program was:" >&5
15715   cat conftest.$ac_ext >&5
15716   rm -rf conftest*
15717   eval "ac_cv_lib_$ac_lib_var=no"
15718 fi
15719 rm -f conftest*
15720 LIBS="$ac_save_LIBS"
15721
15722 fi
15723 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
15724   echo "$ac_t""yes" 1>&6
15725   have_thr=yes
15726 else
15727   echo "$ac_t""no" 1>&6
15728 have_thr=no
15729 fi
15730
15731
15732                 if test $have_thr = yes ; then
15733                         cat >> confdefs.h <<\EOF
15734 #define HAVE_THR 1
15735 EOF
15736
15737                         LTHREAD_LIBS="$LTHREAD_LIBS -lthread"
15738                         ol_link_threads=thr
15739
15740                         if test $ol_with_yielding_select = auto ; then
15741                                 ol_with_yielding_select=yes
15742                         fi
15743
15744                                                 for ac_func in \
15745                                 thr_setconcurrency \
15746                                 thr_getconcurrency \
15747                         
15748 do
15749 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15750 echo "configure:15751: checking for $ac_func" >&5
15751 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15752   echo $ac_n "(cached) $ac_c" 1>&6
15753 else
15754   cat > conftest.$ac_ext <<EOF
15755 #line 15756 "configure"
15756 #include "confdefs.h"
15757 /* System header to define __stub macros and hopefully few prototypes,
15758     which can conflict with char $ac_func(); below.  */
15759 #include <assert.h>
15760 /* Override any gcc2 internal prototype to avoid an error.  */
15761 /* We use char because int might match the return type of a gcc2
15762     builtin and then its argument prototype would still apply.  */
15763 char $ac_func();
15764 char (*f)();
15765
15766 int main() {
15767
15768 /* The GNU C library defines this for functions which it implements
15769     to always fail with ENOSYS.  Some functions are actually named
15770     something starting with __ and the normal name is an alias.  */
15771 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15772 choke me
15773 #else
15774 f = $ac_func;
15775 #endif
15776
15777 ; return 0; }
15778 EOF
15779 if { (eval echo configure:15780: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15780   rm -rf conftest*
15781   eval "ac_cv_func_$ac_func=yes"
15782 else
15783   echo "configure: failed program was:" >&5
15784   cat conftest.$ac_ext >&5
15785   rm -rf conftest*
15786   eval "ac_cv_func_$ac_func=no"
15787 fi
15788 rm -f conftest*
15789 fi
15790
15791 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15792   echo "$ac_t""yes" 1>&6
15793     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15794   cat >> confdefs.h <<EOF
15795 #define $ac_tr_func 1
15796 EOF
15797  
15798 else
15799   echo "$ac_t""no" 1>&6
15800 fi
15801 done
15802
15803                 fi
15804         fi
15805
15806                 for ac_hdr in lwp/lwp.h
15807 do
15808 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15809 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15810 echo "configure:15811: checking for $ac_hdr" >&5
15811 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15812   echo $ac_n "(cached) $ac_c" 1>&6
15813 else
15814   cat > conftest.$ac_ext <<EOF
15815 #line 15816 "configure"
15816 #include "confdefs.h"
15817 #include <$ac_hdr>
15818 EOF
15819 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15820 { (eval echo configure:15821: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15821 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15822 if test -z "$ac_err"; then
15823   rm -rf conftest*
15824   eval "ac_cv_header_$ac_safe=yes"
15825 else
15826   echo "$ac_err" >&5
15827   echo "configure: failed program was:" >&5
15828   cat conftest.$ac_ext >&5
15829   rm -rf conftest*
15830   eval "ac_cv_header_$ac_safe=no"
15831 fi
15832 rm -f conftest*
15833 fi
15834 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15835   echo "$ac_t""yes" 1>&6
15836     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15837   cat >> confdefs.h <<EOF
15838 #define $ac_tr_hdr 1
15839 EOF
15840  
15841 else
15842   echo "$ac_t""no" 1>&6
15843 fi
15844 done
15845
15846         if test $ac_cv_header_lwp_lwp_h = yes ; then
15847                 echo $ac_n "checking for lwp_create in -llwp""... $ac_c" 1>&6
15848 echo "configure:15849: checking for lwp_create in -llwp" >&5
15849 ac_lib_var=`echo lwp'_'lwp_create | sed 'y%./+-:%__p__%'`
15850 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
15851   echo $ac_n "(cached) $ac_c" 1>&6
15852 else
15853   ac_save_LIBS="$LIBS"
15854 LIBS="-llwp  $LIBS"
15855 cat > conftest.$ac_ext <<EOF
15856 #line 15857 "configure"
15857 #include "confdefs.h"
15858 /* Override any gcc2 internal prototype to avoid an error.  */
15859 /* We use char because int might match the return type of a gcc2
15860     builtin and then its argument prototype would still apply.  */
15861 char lwp_create();
15862
15863 int main() {
15864 lwp_create()
15865 ; return 0; }
15866 EOF
15867 if { (eval echo configure:15868: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15868   rm -rf conftest*
15869   eval "ac_cv_lib_$ac_lib_var=yes"
15870 else
15871   echo "configure: failed program was:" >&5
15872   cat conftest.$ac_ext >&5
15873   rm -rf conftest*
15874   eval "ac_cv_lib_$ac_lib_var=no"
15875 fi
15876 rm -f conftest*
15877 LIBS="$ac_save_LIBS"
15878
15879 fi
15880 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
15881   echo "$ac_t""yes" 1>&6
15882   have_lwp=yes
15883 else
15884   echo "$ac_t""no" 1>&6
15885 have_lwp=no
15886 fi
15887
15888
15889                 if test $have_lwp = yes ; then
15890                         cat >> confdefs.h <<\EOF
15891 #define HAVE_LWP 1
15892 EOF
15893
15894                         LTHREAD_LIBS="$LTHREAD_LIBS -llwp"
15895                         ol_link_threads=lwp
15896
15897                         if test $ol_with_yielding_select = auto ; then
15898                                 ol_with_yielding_select=no
15899                         fi
15900                 fi
15901         fi
15902 fi
15903
15904 if test $ol_with_yielding_select = yes ; then
15905         cat >> confdefs.h <<\EOF
15906 #define HAVE_YIELDING_SELECT 1
15907 EOF
15908
15909 fi
15910
15911 if test $ol_with_threads = manual ; then
15912                 ol_link_threads=yes
15913
15914         echo "configure: warning: thread defines and link options must be set manually" 1>&2
15915
15916         for ac_hdr in pthread.h sched.h
15917 do
15918 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15919 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15920 echo "configure:15921: checking for $ac_hdr" >&5
15921 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15922   echo $ac_n "(cached) $ac_c" 1>&6
15923 else
15924   cat > conftest.$ac_ext <<EOF
15925 #line 15926 "configure"
15926 #include "confdefs.h"
15927 #include <$ac_hdr>
15928 EOF
15929 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15930 { (eval echo configure:15931: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15931 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15932 if test -z "$ac_err"; then
15933   rm -rf conftest*
15934   eval "ac_cv_header_$ac_safe=yes"
15935 else
15936   echo "$ac_err" >&5
15937   echo "configure: failed program was:" >&5
15938   cat conftest.$ac_ext >&5
15939   rm -rf conftest*
15940   eval "ac_cv_header_$ac_safe=no"
15941 fi
15942 rm -f conftest*
15943 fi
15944 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15945   echo "$ac_t""yes" 1>&6
15946     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15947   cat >> confdefs.h <<EOF
15948 #define $ac_tr_hdr 1
15949 EOF
15950  
15951 else
15952   echo "$ac_t""no" 1>&6
15953 fi
15954 done
15955
15956         for ac_func in sched_yield pthread_yield
15957 do
15958 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15959 echo "configure:15960: checking for $ac_func" >&5
15960 if eval "test \"\${ac_cv_func_$ac_func+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 /* System header to define __stub macros and hopefully few prototypes,
15967     which can conflict with char $ac_func(); below.  */
15968 #include <assert.h>
15969 /* Override any gcc2 internal prototype to avoid an error.  */
15970 /* We use char because int might match the return type of a gcc2
15971     builtin and then its argument prototype would still apply.  */
15972 char $ac_func();
15973 char (*f)();
15974
15975 int main() {
15976
15977 /* The GNU C library defines this for functions which it implements
15978     to always fail with ENOSYS.  Some functions are actually named
15979     something starting with __ and the normal name is an alias.  */
15980 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15981 choke me
15982 #else
15983 f = $ac_func;
15984 #endif
15985
15986 ; return 0; }
15987 EOF
15988 if { (eval echo configure:15989: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15989   rm -rf conftest*
15990   eval "ac_cv_func_$ac_func=yes"
15991 else
15992   echo "configure: failed program was:" >&5
15993   cat conftest.$ac_ext >&5
15994   rm -rf conftest*
15995   eval "ac_cv_func_$ac_func=no"
15996 fi
15997 rm -f conftest*
15998 fi
15999
16000 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
16001   echo "$ac_t""yes" 1>&6
16002     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
16003   cat >> confdefs.h <<EOF
16004 #define $ac_tr_func 1
16005 EOF
16006  
16007 else
16008   echo "$ac_t""no" 1>&6
16009 fi
16010 done
16011
16012         
16013         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
16014 echo "configure:16015: checking for LinuxThreads pthread.h" >&5
16015 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
16016   echo $ac_n "(cached) $ac_c" 1>&6
16017 else
16018   cat > conftest.$ac_ext <<EOF
16019 #line 16020 "configure"
16020 #include "confdefs.h"
16021 #include <pthread.h>
16022 EOF
16023 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16024   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
16025   rm -rf conftest*
16026   ol_cv_header_linux_threads=yes
16027 else
16028   rm -rf conftest*
16029   ol_cv_header_linux_threads=no
16030 fi
16031 rm -f conftest*
16032
16033                 
16034 fi
16035
16036 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
16037         if test $ol_cv_header_linux_threads = yes; then
16038                 cat >> confdefs.h <<\EOF
16039 #define HAVE_LINUX_THREADS 1
16040 EOF
16041
16042         fi
16043
16044
16045         for ac_hdr in mach/cthreads.h
16046 do
16047 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16048 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16049 echo "configure:16050: checking for $ac_hdr" >&5
16050 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16051   echo $ac_n "(cached) $ac_c" 1>&6
16052 else
16053   cat > conftest.$ac_ext <<EOF
16054 #line 16055 "configure"
16055 #include "confdefs.h"
16056 #include <$ac_hdr>
16057 EOF
16058 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16059 { (eval echo configure:16060: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16060 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16061 if test -z "$ac_err"; then
16062   rm -rf conftest*
16063   eval "ac_cv_header_$ac_safe=yes"
16064 else
16065   echo "$ac_err" >&5
16066   echo "configure: failed program was:" >&5
16067   cat conftest.$ac_ext >&5
16068   rm -rf conftest*
16069   eval "ac_cv_header_$ac_safe=no"
16070 fi
16071 rm -f conftest*
16072 fi
16073 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16074   echo "$ac_t""yes" 1>&6
16075     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16076   cat >> confdefs.h <<EOF
16077 #define $ac_tr_hdr 1
16078 EOF
16079  
16080 else
16081   echo "$ac_t""no" 1>&6
16082 fi
16083 done
16084
16085         for ac_hdr in lwp/lwp.h
16086 do
16087 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16088 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16089 echo "configure:16090: checking for $ac_hdr" >&5
16090 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16091   echo $ac_n "(cached) $ac_c" 1>&6
16092 else
16093   cat > conftest.$ac_ext <<EOF
16094 #line 16095 "configure"
16095 #include "confdefs.h"
16096 #include <$ac_hdr>
16097 EOF
16098 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16099 { (eval echo configure:16100: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16100 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16101 if test -z "$ac_err"; then
16102   rm -rf conftest*
16103   eval "ac_cv_header_$ac_safe=yes"
16104 else
16105   echo "$ac_err" >&5
16106   echo "configure: failed program was:" >&5
16107   cat conftest.$ac_ext >&5
16108   rm -rf conftest*
16109   eval "ac_cv_header_$ac_safe=no"
16110 fi
16111 rm -f conftest*
16112 fi
16113 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16114   echo "$ac_t""yes" 1>&6
16115     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16116   cat >> confdefs.h <<EOF
16117 #define $ac_tr_hdr 1
16118 EOF
16119  
16120 else
16121   echo "$ac_t""no" 1>&6
16122 fi
16123 done
16124
16125         for ac_hdr in thread.h synch.h
16126 do
16127 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16128 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16129 echo "configure:16130: checking for $ac_hdr" >&5
16130 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16131   echo $ac_n "(cached) $ac_c" 1>&6
16132 else
16133   cat > conftest.$ac_ext <<EOF
16134 #line 16135 "configure"
16135 #include "confdefs.h"
16136 #include <$ac_hdr>
16137 EOF
16138 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16139 { (eval echo configure:16140: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16140 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16141 if test -z "$ac_err"; then
16142   rm -rf conftest*
16143   eval "ac_cv_header_$ac_safe=yes"
16144 else
16145   echo "$ac_err" >&5
16146   echo "configure: failed program was:" >&5
16147   cat conftest.$ac_ext >&5
16148   rm -rf conftest*
16149   eval "ac_cv_header_$ac_safe=no"
16150 fi
16151 rm -f conftest*
16152 fi
16153 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16154   echo "$ac_t""yes" 1>&6
16155     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16156   cat >> confdefs.h <<EOF
16157 #define $ac_tr_hdr 1
16158 EOF
16159  
16160 else
16161   echo "$ac_t""no" 1>&6
16162 fi
16163 done
16164
16165 fi
16166
16167 if test $ol_link_threads != no -a $ol_link_threads != nt ; then  
16168                         cat >> confdefs.h <<\EOF
16169 #define REENTRANT 1
16170 EOF
16171
16172         cat >> confdefs.h <<\EOF
16173 #define _REENTRANT 1
16174 EOF
16175
16176         cat >> confdefs.h <<\EOF
16177 #define THREAD_SAFE 1
16178 EOF
16179
16180         cat >> confdefs.h <<\EOF
16181 #define _THREAD_SAFE 1
16182 EOF
16183
16184         cat >> confdefs.h <<\EOF
16185 #define THREADSAFE 1
16186 EOF
16187
16188         cat >> confdefs.h <<\EOF
16189 #define _THREADSAFE 1
16190 EOF
16191
16192         cat >> confdefs.h <<\EOF
16193 #define _SGI_MP_SOURCE 1
16194 EOF
16195
16196
16197                         echo $ac_n "checking for thread specific errno""... $ac_c" 1>&6
16198 echo "configure:16199: checking for thread specific errno" >&5
16199 if eval "test \"\${ol_cv_errno_thread_specific+set}\" = set"; then
16200   echo $ac_n "(cached) $ac_c" 1>&6
16201 else
16202   
16203                 cat > conftest.$ac_ext <<EOF
16204 #line 16205 "configure"
16205 #include "confdefs.h"
16206 #include <errno.h>
16207 int main() {
16208 errno = 0;
16209 ; return 0; }
16210 EOF
16211 if { (eval echo configure:16212: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16212   rm -rf conftest*
16213   ol_cv_errno_thread_specific=yes
16214 else
16215   echo "configure: failed program was:" >&5
16216   cat conftest.$ac_ext >&5
16217   rm -rf conftest*
16218   ol_cv_errno_thread_specific=no
16219 fi
16220 rm -f conftest*
16221         
16222 fi
16223
16224 echo "$ac_t""$ol_cv_errno_thread_specific" 1>&6
16225
16226                         echo $ac_n "checking for thread specific h_errno""... $ac_c" 1>&6
16227 echo "configure:16228: checking for thread specific h_errno" >&5
16228 if eval "test \"\${ol_cv_h_errno_thread_specific+set}\" = set"; then
16229   echo $ac_n "(cached) $ac_c" 1>&6
16230 else
16231   
16232                 cat > conftest.$ac_ext <<EOF
16233 #line 16234 "configure"
16234 #include "confdefs.h"
16235 #include <netdb.h>
16236 int main() {
16237 h_errno = 0;
16238 ; return 0; }
16239 EOF
16240 if { (eval echo configure:16241: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16241   rm -rf conftest*
16242   ol_cv_h_errno_thread_specific=yes
16243 else
16244   echo "configure: failed program was:" >&5
16245   cat conftest.$ac_ext >&5
16246   rm -rf conftest*
16247   ol_cv_h_errno_thread_specific=no
16248 fi
16249 rm -f conftest*
16250         
16251 fi
16252
16253 echo "$ac_t""$ol_cv_h_errno_thread_specific" 1>&6
16254
16255         if test $ol_cv_errno_thread_specific != yes \
16256                 -o $ol_cv_h_errno_thread_specific != yes ; then
16257                 LIBS="$LTHREAD_LIBS $LIBS"
16258                 LTHREAD_LIBS=""
16259         fi
16260
16261 fi  
16262
16263 if test $ol_link_threads = no ; then
16264         if test $ol_with_threads = yes ; then
16265                 { echo "configure: error: no suitable thread support" 1>&2; exit 1; }
16266         fi
16267
16268         if test $ol_with_threads = auto ; then
16269                 echo "configure: warning: no suitable thread support, disabling threads" 1>&2
16270                 ol_with_threads=no
16271         fi
16272
16273         cat >> confdefs.h <<\EOF
16274 #define NO_THREADS 1
16275 EOF
16276
16277         LTHREAD_LIBS=""
16278 fi
16279
16280 if test $ol_link_threads != no ; then
16281         cat >> confdefs.h <<\EOF
16282 #define LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE 1
16283 EOF
16284
16285 fi
16286
16287 for ac_func in \
16288         ctime_r                 \
16289         gethostbyname_r gethostbyaddr_r \
16290
16291 do
16292 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
16293 echo "configure:16294: checking for $ac_func" >&5
16294 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
16295   echo $ac_n "(cached) $ac_c" 1>&6
16296 else
16297   cat > conftest.$ac_ext <<EOF
16298 #line 16299 "configure"
16299 #include "confdefs.h"
16300 /* System header to define __stub macros and hopefully few prototypes,
16301     which can conflict with char $ac_func(); below.  */
16302 #include <assert.h>
16303 /* Override any gcc2 internal prototype to avoid an error.  */
16304 /* We use char because int might match the return type of a gcc2
16305     builtin and then its argument prototype would still apply.  */
16306 char $ac_func();
16307 char (*f)();
16308
16309 int main() {
16310
16311 /* The GNU C library defines this for functions which it implements
16312     to always fail with ENOSYS.  Some functions are actually named
16313     something starting with __ and the normal name is an alias.  */
16314 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16315 choke me
16316 #else
16317 f = $ac_func;
16318 #endif
16319
16320 ; return 0; }
16321 EOF
16322 if { (eval echo configure:16323: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16323   rm -rf conftest*
16324   eval "ac_cv_func_$ac_func=yes"
16325 else
16326   echo "configure: failed program was:" >&5
16327   cat conftest.$ac_ext >&5
16328   rm -rf conftest*
16329   eval "ac_cv_func_$ac_func=no"
16330 fi
16331 rm -f conftest*
16332 fi
16333
16334 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
16335   echo "$ac_t""yes" 1>&6
16336     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
16337   cat >> confdefs.h <<EOF
16338 #define $ac_tr_func 1
16339 EOF
16340  
16341 else
16342   echo "$ac_t""no" 1>&6
16343 fi
16344 done
16345
16346
16347 if test "$ac_cv_func_ctime_r" = no ; then
16348         ol_cv_func_ctime_r_nargs=0
16349 else
16350         echo $ac_n "checking number of arguments of ctime_r""... $ac_c" 1>&6
16351 echo "configure:16352: checking number of arguments of ctime_r" >&5
16352 if eval "test \"\${ol_cv_func_ctime_r_nargs+set}\" = set"; then
16353   echo $ac_n "(cached) $ac_c" 1>&6
16354 else
16355   cat > conftest.$ac_ext <<EOF
16356 #line 16357 "configure"
16357 #include "confdefs.h"
16358 #include <time.h>
16359 int main() {
16360 time_t ti; char *buffer; ctime_r(&ti,buffer,32);
16361 ; return 0; }
16362 EOF
16363 if { (eval echo configure:16364: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16364   rm -rf conftest*
16365   ol_cv_func_ctime_r_nargs3=yes
16366 else
16367   echo "configure: failed program was:" >&5
16368   cat conftest.$ac_ext >&5
16369   rm -rf conftest*
16370   ol_cv_func_ctime_r_nargs3=no
16371 fi
16372 rm -f conftest*
16373
16374         cat > conftest.$ac_ext <<EOF
16375 #line 16376 "configure"
16376 #include "confdefs.h"
16377 #include <time.h>
16378 int main() {
16379 time_t ti; char *buffer; ctime_r(&ti,buffer);
16380 ; return 0; }
16381 EOF
16382 if { (eval echo configure:16383: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16383   rm -rf conftest*
16384   ol_cv_func_ctime_r_nargs2=yes
16385 else
16386   echo "configure: failed program was:" >&5
16387   cat conftest.$ac_ext >&5
16388   rm -rf conftest*
16389   ol_cv_func_ctime_r_nargs2=no
16390 fi
16391 rm -f conftest*
16392
16393         if test $ol_cv_func_ctime_r_nargs3 = yes -a \
16394                 $ol_cv_func_ctime_r_nargs2 = no ; then
16395
16396                 ol_cv_func_ctime_r_nargs=3
16397
16398         elif test $ol_cv_func_ctime_r_nargs3 = no -a \
16399                 $ol_cv_func_ctime_r_nargs2 = yes ; then
16400
16401                 ol_cv_func_ctime_r_nargs=2
16402
16403         else
16404                 ol_cv_func_ctime_r_nargs=0
16405         fi
16406   
16407 fi
16408
16409 echo "$ac_t""$ol_cv_func_ctime_r_nargs" 1>&6
16410
16411   if test $ol_cv_func_ctime_r_nargs -gt 1 ; then
16412         cat >> confdefs.h <<EOF
16413 #define CTIME_R_NARGS $ol_cv_func_ctime_r_nargs
16414 EOF
16415
16416   fi
16417
16418 fi
16419
16420 if test "$ac_cv_func_gethostbyname_r" = yes ; then
16421         echo $ac_n "checking number of arguments of gethostbyname_r""... $ac_c" 1>&6
16422 echo "configure:16423: checking number of arguments of gethostbyname_r" >&5
16423 if eval "test \"\${ol_cv_func_gethostbyname_r_nargs+set}\" = set"; then
16424   echo $ac_n "(cached) $ac_c" 1>&6
16425 else
16426   cat > conftest.$ac_ext <<EOF
16427 #line 16428 "configure"
16428 #include "confdefs.h"
16429 #include <sys/types.h>
16430 #include <sys/socket.h>
16431 #include <netinet/in.h>
16432 #include <netdb.h>
16433 #define BUFSIZE (sizeof(struct hostent)+10)
16434 int main() {
16435 struct hostent hent; char buffer[BUFSIZE];
16436                 int bufsize=BUFSIZE;int h_errno;
16437                 (void)gethostbyname_r("segovia.cs.purdue.edu", &hent,
16438                         buffer, bufsize, &h_errno);
16439 ; return 0; }
16440 EOF
16441 if { (eval echo configure:16442: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16442   rm -rf conftest*
16443   ol_cv_func_gethostbyname_r_nargs5=yes
16444 else
16445   echo "configure: failed program was:" >&5
16446   cat conftest.$ac_ext >&5
16447   rm -rf conftest*
16448   ol_cv_func_gethostbyname_r_nargs5=no
16449 fi
16450 rm -f conftest*
16451
16452         cat > conftest.$ac_ext <<EOF
16453 #line 16454 "configure"
16454 #include "confdefs.h"
16455 #include <sys/types.h>
16456 #include <sys/socket.h>
16457 #include <netinet/in.h>
16458 #include <netdb.h>
16459 #define BUFSIZE (sizeof(struct hostent)+10)
16460 int main() {
16461 struct hostent hent;struct hostent *rhent;
16462                 char buffer[BUFSIZE];
16463                 int bufsize=BUFSIZE;int h_errno;
16464                 (void)gethostbyname_r("localhost", &hent, buffer, bufsize,
16465                         &rhent, &h_errno);
16466 ; return 0; }
16467 EOF
16468 if { (eval echo configure:16469: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16469   rm -rf conftest*
16470   ol_cv_func_gethostbyname_r_nargs6=yes
16471 else
16472   echo "configure: failed program was:" >&5
16473   cat conftest.$ac_ext >&5
16474   rm -rf conftest*
16475   ol_cv_func_gethostbyname_r_nargs6=no
16476 fi
16477 rm -f conftest*
16478
16479         if test $ol_cv_func_gethostbyname_r_nargs5 = yes -a \
16480                 $ol_cv_func_gethostbyname_r_nargs6 = no ; then
16481
16482                 ol_cv_func_gethostbyname_r_nargs=5
16483
16484         elif test $ol_cv_func_gethostbyname_r_nargs5 = no -a \
16485                 $ol_cv_func_gethostbyname_r_nargs6 = yes ; then
16486
16487                 ol_cv_func_gethostbyname_r_nargs=6
16488
16489         else
16490                 ol_cv_func_gethostbyname_r_nargs=0
16491         fi
16492   
16493 fi
16494
16495 echo "$ac_t""$ol_cv_func_gethostbyname_r_nargs" 1>&6
16496   if test $ol_cv_func_gethostbyname_r_nargs -gt 1 ; then
16497         cat >> confdefs.h <<EOF
16498 #define GETHOSTBYNAME_R_NARGS $ol_cv_func_gethostbyname_r_nargs
16499 EOF
16500
16501   fi
16502
16503 else
16504         ol_cv_func_gethostbyname_r_nargs=0
16505 fi
16506  
16507 if test "$ac_cv_func_gethostbyaddr_r" = yes ; then
16508         echo $ac_n "checking number of arguments of gethostbyaddr_r""... $ac_c" 1>&6
16509 echo "configure:16510: checking number of arguments of gethostbyaddr_r" >&5
16510 if eval "test \"\${ol_cv_func_gethostbyaddr_r_nargs+set}\" = set"; then
16511   echo $ac_n "(cached) $ac_c" 1>&6
16512 else
16513   cat > conftest.$ac_ext <<EOF
16514 #line 16515 "configure"
16515 #include "confdefs.h"
16516 #include <sys/types.h>
16517 #include <sys/socket.h>
16518 #include <netinet/in.h>
16519 #include <netdb.h>
16520 #define BUFSIZE (sizeof(struct hostent)+10)
16521 int main() {
16522 struct hostent hent; char buffer[BUFSIZE]; 
16523             struct in_addr add;
16524             size_t alen=sizeof(struct in_addr);
16525             int bufsize=BUFSIZE;int h_errno;
16526                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
16527                         alen, AF_INET, &hent, buffer, bufsize, &h_errno);
16528 ; return 0; }
16529 EOF
16530 if { (eval echo configure:16531: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16531   rm -rf conftest*
16532   ol_cv_func_gethostbyaddr_r_nargs7=yes
16533 else
16534   echo "configure: failed program was:" >&5
16535   cat conftest.$ac_ext >&5
16536   rm -rf conftest*
16537   ol_cv_func_gethostbyaddr_r_nargs7=no
16538 fi
16539 rm -f conftest*
16540
16541         cat > conftest.$ac_ext <<EOF
16542 #line 16543 "configure"
16543 #include "confdefs.h"
16544 #include <sys/types.h>
16545 #include <sys/socket.h>
16546 #include <netinet/in.h>
16547 #include <netdb.h>
16548 #define BUFSIZE (sizeof(struct hostent)+10)
16549 int main() {
16550 struct hostent hent;
16551                 struct hostent *rhent; char buffer[BUFSIZE]; 
16552                 struct in_addr add;
16553                 size_t alen=sizeof(struct in_addr);
16554                 int bufsize=BUFSIZE;int h_errno;
16555                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
16556                         alen, AF_INET, &hent, buffer, bufsize, 
16557                         &rhent, &h_errno);
16558 ; return 0; }
16559 EOF
16560 if { (eval echo configure:16561: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16561   rm -rf conftest*
16562   ol_cv_func_gethostbyaddr_r_nargs8=yes
16563 else
16564   echo "configure: failed program was:" >&5
16565   cat conftest.$ac_ext >&5
16566   rm -rf conftest*
16567   ol_cv_func_gethostbyaddr_r_nargs8=no
16568 fi
16569 rm -f conftest*
16570
16571         if test $ol_cv_func_gethostbyaddr_r_nargs7 = yes -a \
16572                 $ol_cv_func_gethostbyaddr_r_nargs8 = no ; then
16573
16574                 ol_cv_func_gethostbyaddr_r_nargs=7
16575
16576         elif test $ol_cv_func_gethostbyaddr_r_nargs7 = no -a \
16577                 $ol_cv_func_gethostbyaddr_r_nargs8 = yes ; then
16578
16579                 ol_cv_func_gethostbyaddr_r_nargs=8
16580
16581         else
16582                 ol_cv_func_gethostbyaddr_r_nargs=0
16583         fi
16584   
16585 fi
16586
16587 echo "$ac_t""$ol_cv_func_gethostbyaddr_r_nargs" 1>&6
16588   if test $ol_cv_func_gethostbyaddr_r_nargs -gt 1 ; then
16589     cat >> confdefs.h <<EOF
16590 #define GETHOSTBYADDR_R_NARGS $ol_cv_func_gethostbyaddr_r_nargs
16591 EOF
16592
16593   fi
16594
16595 else
16596         ol_cv_func_gethostbyaddr_r_nargs=0
16597 fi
16598
16599 ol_link_ldbm=no 
16600
16601 if test $ol_with_ldbm_api = auto \
16602         -o $ol_with_ldbm_api = berkeley \
16603         -o $ol_with_ldbm_api = bcompat ; then
16604
16605         if test $ol_with_ldbm_api = bcompat; then \
16606                 for ac_hdr in db_185.h db.h
16607 do
16608 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16609 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16610 echo "configure:16611: checking for $ac_hdr" >&5
16611 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16612   echo $ac_n "(cached) $ac_c" 1>&6
16613 else
16614   cat > conftest.$ac_ext <<EOF
16615 #line 16616 "configure"
16616 #include "confdefs.h"
16617 #include <$ac_hdr>
16618 EOF
16619 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16620 { (eval echo configure:16621: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16621 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16622 if test -z "$ac_err"; then
16623   rm -rf conftest*
16624   eval "ac_cv_header_$ac_safe=yes"
16625 else
16626   echo "$ac_err" >&5
16627   echo "configure: failed program was:" >&5
16628   cat conftest.$ac_ext >&5
16629   rm -rf conftest*
16630   eval "ac_cv_header_$ac_safe=no"
16631 fi
16632 rm -f conftest*
16633 fi
16634 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16635   echo "$ac_t""yes" 1>&6
16636     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16637   cat >> confdefs.h <<EOF
16638 #define $ac_tr_hdr 1
16639 EOF
16640  
16641 else
16642   echo "$ac_t""no" 1>&6
16643 fi
16644 done
16645
16646 if test $ac_cv_header_db_185_h = yes -o $ac_cv_header_db_h = yes; then
16647         echo $ac_n "checking if Berkeley DB header compatibility""... $ac_c" 1>&6
16648 echo "configure:16649: checking if Berkeley DB header compatibility" >&5
16649 if eval "test \"\${ol_cv_header_db1+set}\" = set"; then
16650   echo $ac_n "(cached) $ac_c" 1>&6
16651 else
16652   
16653                 cat > conftest.$ac_ext <<EOF
16654 #line 16655 "configure"
16655 #include "confdefs.h"
16656
16657 #if HAVE_DB_185_H
16658 #       include <db_185.h>
16659 #else
16660 #       include <db.h>
16661 #endif
16662
16663  /* this check could be improved */
16664 #ifndef DB_VERSION_MAJOR
16665 #       define DB_VERSION_MAJOR 1
16666 #endif
16667
16668 #if DB_VERSION_MAJOR == 1 
16669         __db_version_1
16670 #endif
16671
16672 EOF
16673 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16674   egrep "__db_version_1" >/dev/null 2>&1; then
16675   rm -rf conftest*
16676   ol_cv_header_db1=yes
16677 else
16678   rm -rf conftest*
16679   ol_cv_header_db1=no
16680 fi
16681 rm -f conftest*
16682
16683 fi
16684
16685 echo "$ac_t""$ol_cv_header_db1" 1>&6
16686
16687         if test $ol_cv_header_db1 = yes ; then
16688                 ol_cv_lib_db=no
16689 if test $ol_cv_lib_db = no ; then
16690         echo $ac_n "checking for Berkeley DB link (default)""... $ac_c" 1>&6
16691 echo "configure:16692: checking for Berkeley DB link (default)" >&5
16692 if eval "test \"\${ol_cv_db_none+set}\" = set"; then
16693   echo $ac_n "(cached) $ac_c" 1>&6
16694 else
16695   
16696         ol_DB_LIB=
16697         ol_LIBS=$LIBS
16698         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
16699
16700         cat > conftest.$ac_ext <<EOF
16701 #line 16702 "configure"
16702 #include "confdefs.h"
16703
16704 #ifdef HAVE_DB_185_H
16705 # include <db_185.h>
16706 #else
16707 # include <db.h>
16708 #endif
16709
16710 #ifndef DB_VERSION_MAJOR
16711 # define DB_VERSION_MAJOR 1
16712 #endif
16713
16714 #ifndef NULL
16715 #define NULL ((void*)0)
16716 #endif
16717
16718 int main() {
16719
16720 #if DB_VERSION_MAJOR > 1
16721         {
16722                 char *version;
16723                 int major, minor, patch;
16724
16725                 version = db_version( &major, &minor, &patch );
16726
16727                 if( major != DB_VERSION_MAJOR ||
16728                         minor < DB_VERSION_MINOR )
16729                 {
16730                         printf("Berkeley DB version mismatch\n"
16731                                 "\texpected: %s\n\tgot: %s\n",
16732                                 DB_VERSION_STRING, version);
16733                         return 1;
16734                 }
16735         }
16736 #endif
16737
16738 #if DB_VERSION_MAJOR > 2
16739         db_env_create( NULL, 0 );
16740 #elif DB_VERSION_MAJOR > 1
16741         db_appexit( NULL );
16742 #else
16743         (void) dbopen( NULL, 0, 0, 0, NULL);
16744 #endif
16745
16746 ; return 0; }
16747 EOF
16748 if { (eval echo configure:16749: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16749   rm -rf conftest*
16750   ol_cv_db_none=yes
16751 else
16752   echo "configure: failed program was:" >&5
16753   cat conftest.$ac_ext >&5
16754   rm -rf conftest*
16755   ol_cv_db_none=no
16756 fi
16757 rm -f conftest*
16758
16759         LIBS="$ol_LIBS"
16760
16761 fi
16762
16763 echo "$ac_t""$ol_cv_db_none" 1>&6
16764
16765         if test $ol_cv_db_none = yes ; then
16766                 ol_cv_lib_db=yes
16767         fi
16768 fi
16769
16770 if test $ol_cv_lib_db = no ; then
16771         echo $ac_n "checking for Berkeley DB link (-ldb42)""... $ac_c" 1>&6
16772 echo "configure:16773: checking for Berkeley DB link (-ldb42)" >&5
16773 if eval "test \"\${ol_cv_db_db42+set}\" = set"; then
16774   echo $ac_n "(cached) $ac_c" 1>&6
16775 else
16776   
16777         ol_DB_LIB=-ldb42
16778         ol_LIBS=$LIBS
16779         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
16780
16781         cat > conftest.$ac_ext <<EOF
16782 #line 16783 "configure"
16783 #include "confdefs.h"
16784
16785 #ifdef HAVE_DB_185_H
16786 # include <db_185.h>
16787 #else
16788 # include <db.h>
16789 #endif
16790
16791 #ifndef DB_VERSION_MAJOR
16792 # define DB_VERSION_MAJOR 1
16793 #endif
16794
16795 #ifndef NULL
16796 #define NULL ((void*)0)
16797 #endif
16798
16799 int main() {
16800
16801 #if DB_VERSION_MAJOR > 1
16802         {
16803                 char *version;
16804                 int major, minor, patch;
16805
16806                 version = db_version( &major, &minor, &patch );
16807
16808                 if( major != DB_VERSION_MAJOR ||
16809                         minor < DB_VERSION_MINOR )
16810                 {
16811                         printf("Berkeley DB version mismatch\n"
16812                                 "\texpected: %s\n\tgot: %s\n",
16813                                 DB_VERSION_STRING, version);
16814                         return 1;
16815                 }
16816         }
16817 #endif
16818
16819 #if DB_VERSION_MAJOR > 2
16820         db_env_create( NULL, 0 );
16821 #elif DB_VERSION_MAJOR > 1
16822         db_appexit( NULL );
16823 #else
16824         (void) dbopen( NULL, 0, 0, 0, NULL);
16825 #endif
16826
16827 ; return 0; }
16828 EOF
16829 if { (eval echo configure:16830: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16830   rm -rf conftest*
16831   ol_cv_db_db42=yes
16832 else
16833   echo "configure: failed program was:" >&5
16834   cat conftest.$ac_ext >&5
16835   rm -rf conftest*
16836   ol_cv_db_db42=no
16837 fi
16838 rm -f conftest*
16839
16840         LIBS="$ol_LIBS"
16841
16842 fi
16843
16844 echo "$ac_t""$ol_cv_db_db42" 1>&6
16845
16846         if test $ol_cv_db_db42 = yes ; then
16847                 ol_cv_lib_db=-ldb42
16848         fi
16849 fi
16850
16851 if test $ol_cv_lib_db = no ; then
16852         echo $ac_n "checking for Berkeley DB link (-ldb-42)""... $ac_c" 1>&6
16853 echo "configure:16854: checking for Berkeley DB link (-ldb-42)" >&5
16854 if eval "test \"\${ol_cv_db_db_42+set}\" = set"; then
16855   echo $ac_n "(cached) $ac_c" 1>&6
16856 else
16857   
16858         ol_DB_LIB=-ldb-42
16859         ol_LIBS=$LIBS
16860         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
16861
16862         cat > conftest.$ac_ext <<EOF
16863 #line 16864 "configure"
16864 #include "confdefs.h"
16865
16866 #ifdef HAVE_DB_185_H
16867 # include <db_185.h>
16868 #else
16869 # include <db.h>
16870 #endif
16871
16872 #ifndef DB_VERSION_MAJOR
16873 # define DB_VERSION_MAJOR 1
16874 #endif
16875
16876 #ifndef NULL
16877 #define NULL ((void*)0)
16878 #endif
16879
16880 int main() {
16881
16882 #if DB_VERSION_MAJOR > 1
16883         {
16884                 char *version;
16885                 int major, minor, patch;
16886
16887                 version = db_version( &major, &minor, &patch );
16888
16889                 if( major != DB_VERSION_MAJOR ||
16890                         minor < DB_VERSION_MINOR )
16891                 {
16892                         printf("Berkeley DB version mismatch\n"
16893                                 "\texpected: %s\n\tgot: %s\n",
16894                                 DB_VERSION_STRING, version);
16895                         return 1;
16896                 }
16897         }
16898 #endif
16899
16900 #if DB_VERSION_MAJOR > 2
16901         db_env_create( NULL, 0 );
16902 #elif DB_VERSION_MAJOR > 1
16903         db_appexit( NULL );
16904 #else
16905         (void) dbopen( NULL, 0, 0, 0, NULL);
16906 #endif
16907
16908 ; return 0; }
16909 EOF
16910 if { (eval echo configure:16911: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16911   rm -rf conftest*
16912   ol_cv_db_db_42=yes
16913 else
16914   echo "configure: failed program was:" >&5
16915   cat conftest.$ac_ext >&5
16916   rm -rf conftest*
16917   ol_cv_db_db_42=no
16918 fi
16919 rm -f conftest*
16920
16921         LIBS="$ol_LIBS"
16922
16923 fi
16924
16925 echo "$ac_t""$ol_cv_db_db_42" 1>&6
16926
16927         if test $ol_cv_db_db_42 = yes ; then
16928                 ol_cv_lib_db=-ldb-42
16929         fi
16930 fi
16931
16932 if test $ol_cv_lib_db = no ; then
16933         echo $ac_n "checking for Berkeley DB link (-ldb-4.2)""... $ac_c" 1>&6
16934 echo "configure:16935: checking for Berkeley DB link (-ldb-4.2)" >&5
16935 if eval "test \"\${ol_cv_db_db_4_dot_2+set}\" = set"; then
16936   echo $ac_n "(cached) $ac_c" 1>&6
16937 else
16938   
16939         ol_DB_LIB=-ldb-4.2
16940         ol_LIBS=$LIBS
16941         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
16942
16943         cat > conftest.$ac_ext <<EOF
16944 #line 16945 "configure"
16945 #include "confdefs.h"
16946
16947 #ifdef HAVE_DB_185_H
16948 # include <db_185.h>
16949 #else
16950 # include <db.h>
16951 #endif
16952
16953 #ifndef DB_VERSION_MAJOR
16954 # define DB_VERSION_MAJOR 1
16955 #endif
16956
16957 #ifndef NULL
16958 #define NULL ((void*)0)
16959 #endif
16960
16961 int main() {
16962
16963 #if DB_VERSION_MAJOR > 1
16964         {
16965                 char *version;
16966                 int major, minor, patch;
16967
16968                 version = db_version( &major, &minor, &patch );
16969
16970                 if( major != DB_VERSION_MAJOR ||
16971                         minor < DB_VERSION_MINOR )
16972                 {
16973                         printf("Berkeley DB version mismatch\n"
16974                                 "\texpected: %s\n\tgot: %s\n",
16975                                 DB_VERSION_STRING, version);
16976                         return 1;
16977                 }
16978         }
16979 #endif
16980
16981 #if DB_VERSION_MAJOR > 2
16982         db_env_create( NULL, 0 );
16983 #elif DB_VERSION_MAJOR > 1
16984         db_appexit( NULL );
16985 #else
16986         (void) dbopen( NULL, 0, 0, 0, NULL);
16987 #endif
16988
16989 ; return 0; }
16990 EOF
16991 if { (eval echo configure:16992: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16992   rm -rf conftest*
16993   ol_cv_db_db_4_dot_2=yes
16994 else
16995   echo "configure: failed program was:" >&5
16996   cat conftest.$ac_ext >&5
16997   rm -rf conftest*
16998   ol_cv_db_db_4_dot_2=no
16999 fi
17000 rm -f conftest*
17001
17002         LIBS="$ol_LIBS"
17003
17004 fi
17005
17006 echo "$ac_t""$ol_cv_db_db_4_dot_2" 1>&6
17007
17008         if test $ol_cv_db_db_4_dot_2 = yes ; then
17009                 ol_cv_lib_db=-ldb-4.2
17010         fi
17011 fi
17012
17013 if test $ol_cv_lib_db = no ; then
17014         echo $ac_n "checking for Berkeley DB link (-ldb-4-2)""... $ac_c" 1>&6
17015 echo "configure:17016: checking for Berkeley DB link (-ldb-4-2)" >&5
17016 if eval "test \"\${ol_cv_db_db_4_2+set}\" = set"; then
17017   echo $ac_n "(cached) $ac_c" 1>&6
17018 else
17019   
17020         ol_DB_LIB=-ldb-4-2
17021         ol_LIBS=$LIBS
17022         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17023
17024         cat > conftest.$ac_ext <<EOF
17025 #line 17026 "configure"
17026 #include "confdefs.h"
17027
17028 #ifdef HAVE_DB_185_H
17029 # include <db_185.h>
17030 #else
17031 # include <db.h>
17032 #endif
17033
17034 #ifndef DB_VERSION_MAJOR
17035 # define DB_VERSION_MAJOR 1
17036 #endif
17037
17038 #ifndef NULL
17039 #define NULL ((void*)0)
17040 #endif
17041
17042 int main() {
17043
17044 #if DB_VERSION_MAJOR > 1
17045         {
17046                 char *version;
17047                 int major, minor, patch;
17048
17049                 version = db_version( &major, &minor, &patch );
17050
17051                 if( major != DB_VERSION_MAJOR ||
17052                         minor < DB_VERSION_MINOR )
17053                 {
17054                         printf("Berkeley DB version mismatch\n"
17055                                 "\texpected: %s\n\tgot: %s\n",
17056                                 DB_VERSION_STRING, version);
17057                         return 1;
17058                 }
17059         }
17060 #endif
17061
17062 #if DB_VERSION_MAJOR > 2
17063         db_env_create( NULL, 0 );
17064 #elif DB_VERSION_MAJOR > 1
17065         db_appexit( NULL );
17066 #else
17067         (void) dbopen( NULL, 0, 0, 0, NULL);
17068 #endif
17069
17070 ; return 0; }
17071 EOF
17072 if { (eval echo configure:17073: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17073   rm -rf conftest*
17074   ol_cv_db_db_4_2=yes
17075 else
17076   echo "configure: failed program was:" >&5
17077   cat conftest.$ac_ext >&5
17078   rm -rf conftest*
17079   ol_cv_db_db_4_2=no
17080 fi
17081 rm -f conftest*
17082
17083         LIBS="$ol_LIBS"
17084
17085 fi
17086
17087 echo "$ac_t""$ol_cv_db_db_4_2" 1>&6
17088
17089         if test $ol_cv_db_db_4_2 = yes ; then
17090                 ol_cv_lib_db=-ldb-4-2
17091         fi
17092 fi
17093
17094 if test $ol_cv_lib_db = no ; then
17095         echo $ac_n "checking for Berkeley DB link (-ldb-4)""... $ac_c" 1>&6
17096 echo "configure:17097: checking for Berkeley DB link (-ldb-4)" >&5
17097 if eval "test \"\${ol_cv_db_db_4+set}\" = set"; then
17098   echo $ac_n "(cached) $ac_c" 1>&6
17099 else
17100   
17101         ol_DB_LIB=-ldb-4
17102         ol_LIBS=$LIBS
17103         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17104
17105         cat > conftest.$ac_ext <<EOF
17106 #line 17107 "configure"
17107 #include "confdefs.h"
17108
17109 #ifdef HAVE_DB_185_H
17110 # include <db_185.h>
17111 #else
17112 # include <db.h>
17113 #endif
17114
17115 #ifndef DB_VERSION_MAJOR
17116 # define DB_VERSION_MAJOR 1
17117 #endif
17118
17119 #ifndef NULL
17120 #define NULL ((void*)0)
17121 #endif
17122
17123 int main() {
17124
17125 #if DB_VERSION_MAJOR > 1
17126         {
17127                 char *version;
17128                 int major, minor, patch;
17129
17130                 version = db_version( &major, &minor, &patch );
17131
17132                 if( major != DB_VERSION_MAJOR ||
17133                         minor < DB_VERSION_MINOR )
17134                 {
17135                         printf("Berkeley DB version mismatch\n"
17136                                 "\texpected: %s\n\tgot: %s\n",
17137                                 DB_VERSION_STRING, version);
17138                         return 1;
17139                 }
17140         }
17141 #endif
17142
17143 #if DB_VERSION_MAJOR > 2
17144         db_env_create( NULL, 0 );
17145 #elif DB_VERSION_MAJOR > 1
17146         db_appexit( NULL );
17147 #else
17148         (void) dbopen( NULL, 0, 0, 0, NULL);
17149 #endif
17150
17151 ; return 0; }
17152 EOF
17153 if { (eval echo configure:17154: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17154   rm -rf conftest*
17155   ol_cv_db_db_4=yes
17156 else
17157   echo "configure: failed program was:" >&5
17158   cat conftest.$ac_ext >&5
17159   rm -rf conftest*
17160   ol_cv_db_db_4=no
17161 fi
17162 rm -f conftest*
17163
17164         LIBS="$ol_LIBS"
17165
17166 fi
17167
17168 echo "$ac_t""$ol_cv_db_db_4" 1>&6
17169
17170         if test $ol_cv_db_db_4 = yes ; then
17171                 ol_cv_lib_db=-ldb-4
17172         fi
17173 fi
17174
17175 if test $ol_cv_lib_db = no ; then
17176         echo $ac_n "checking for Berkeley DB link (-ldb4)""... $ac_c" 1>&6
17177 echo "configure:17178: checking for Berkeley DB link (-ldb4)" >&5
17178 if eval "test \"\${ol_cv_db_db4+set}\" = set"; then
17179   echo $ac_n "(cached) $ac_c" 1>&6
17180 else
17181   
17182         ol_DB_LIB=-ldb4
17183         ol_LIBS=$LIBS
17184         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17185
17186         cat > conftest.$ac_ext <<EOF
17187 #line 17188 "configure"
17188 #include "confdefs.h"
17189
17190 #ifdef HAVE_DB_185_H
17191 # include <db_185.h>
17192 #else
17193 # include <db.h>
17194 #endif
17195
17196 #ifndef DB_VERSION_MAJOR
17197 # define DB_VERSION_MAJOR 1
17198 #endif
17199
17200 #ifndef NULL
17201 #define NULL ((void*)0)
17202 #endif
17203
17204 int main() {
17205
17206 #if DB_VERSION_MAJOR > 1
17207         {
17208                 char *version;
17209                 int major, minor, patch;
17210
17211                 version = db_version( &major, &minor, &patch );
17212
17213                 if( major != DB_VERSION_MAJOR ||
17214                         minor < DB_VERSION_MINOR )
17215                 {
17216                         printf("Berkeley DB version mismatch\n"
17217                                 "\texpected: %s\n\tgot: %s\n",
17218                                 DB_VERSION_STRING, version);
17219                         return 1;
17220                 }
17221         }
17222 #endif
17223
17224 #if DB_VERSION_MAJOR > 2
17225         db_env_create( NULL, 0 );
17226 #elif DB_VERSION_MAJOR > 1
17227         db_appexit( NULL );
17228 #else
17229         (void) dbopen( NULL, 0, 0, 0, NULL);
17230 #endif
17231
17232 ; return 0; }
17233 EOF
17234 if { (eval echo configure:17235: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17235   rm -rf conftest*
17236   ol_cv_db_db4=yes
17237 else
17238   echo "configure: failed program was:" >&5
17239   cat conftest.$ac_ext >&5
17240   rm -rf conftest*
17241   ol_cv_db_db4=no
17242 fi
17243 rm -f conftest*
17244
17245         LIBS="$ol_LIBS"
17246
17247 fi
17248
17249 echo "$ac_t""$ol_cv_db_db4" 1>&6
17250
17251         if test $ol_cv_db_db4 = yes ; then
17252                 ol_cv_lib_db=-ldb4
17253         fi
17254 fi
17255
17256 if test $ol_cv_lib_db = no ; then
17257         echo $ac_n "checking for Berkeley DB link (-ldb)""... $ac_c" 1>&6
17258 echo "configure:17259: checking for Berkeley DB link (-ldb)" >&5
17259 if eval "test \"\${ol_cv_db_db+set}\" = set"; then
17260   echo $ac_n "(cached) $ac_c" 1>&6
17261 else
17262   
17263         ol_DB_LIB=-ldb
17264         ol_LIBS=$LIBS
17265         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17266
17267         cat > conftest.$ac_ext <<EOF
17268 #line 17269 "configure"
17269 #include "confdefs.h"
17270
17271 #ifdef HAVE_DB_185_H
17272 # include <db_185.h>
17273 #else
17274 # include <db.h>
17275 #endif
17276
17277 #ifndef DB_VERSION_MAJOR
17278 # define DB_VERSION_MAJOR 1
17279 #endif
17280
17281 #ifndef NULL
17282 #define NULL ((void*)0)
17283 #endif
17284
17285 int main() {
17286
17287 #if DB_VERSION_MAJOR > 1
17288         {
17289                 char *version;
17290                 int major, minor, patch;
17291
17292                 version = db_version( &major, &minor, &patch );
17293
17294                 if( major != DB_VERSION_MAJOR ||
17295                         minor < DB_VERSION_MINOR )
17296                 {
17297                         printf("Berkeley DB version mismatch\n"
17298                                 "\texpected: %s\n\tgot: %s\n",
17299                                 DB_VERSION_STRING, version);
17300                         return 1;
17301                 }
17302         }
17303 #endif
17304
17305 #if DB_VERSION_MAJOR > 2
17306         db_env_create( NULL, 0 );
17307 #elif DB_VERSION_MAJOR > 1
17308         db_appexit( NULL );
17309 #else
17310         (void) dbopen( NULL, 0, 0, 0, NULL);
17311 #endif
17312
17313 ; return 0; }
17314 EOF
17315 if { (eval echo configure:17316: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17316   rm -rf conftest*
17317   ol_cv_db_db=yes
17318 else
17319   echo "configure: failed program was:" >&5
17320   cat conftest.$ac_ext >&5
17321   rm -rf conftest*
17322   ol_cv_db_db=no
17323 fi
17324 rm -f conftest*
17325
17326         LIBS="$ol_LIBS"
17327
17328 fi
17329
17330 echo "$ac_t""$ol_cv_db_db" 1>&6
17331
17332         if test $ol_cv_db_db = yes ; then
17333                 ol_cv_lib_db=-ldb
17334         fi
17335 fi
17336
17337 if test $ol_cv_lib_db = no ; then
17338         echo $ac_n "checking for Berkeley DB link (-ldb41)""... $ac_c" 1>&6
17339 echo "configure:17340: checking for Berkeley DB link (-ldb41)" >&5
17340 if eval "test \"\${ol_cv_db_db41+set}\" = set"; then
17341   echo $ac_n "(cached) $ac_c" 1>&6
17342 else
17343   
17344         ol_DB_LIB=-ldb41
17345         ol_LIBS=$LIBS
17346         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17347
17348         cat > conftest.$ac_ext <<EOF
17349 #line 17350 "configure"
17350 #include "confdefs.h"
17351
17352 #ifdef HAVE_DB_185_H
17353 # include <db_185.h>
17354 #else
17355 # include <db.h>
17356 #endif
17357
17358 #ifndef DB_VERSION_MAJOR
17359 # define DB_VERSION_MAJOR 1
17360 #endif
17361
17362 #ifndef NULL
17363 #define NULL ((void*)0)
17364 #endif
17365
17366 int main() {
17367
17368 #if DB_VERSION_MAJOR > 1
17369         {
17370                 char *version;
17371                 int major, minor, patch;
17372
17373                 version = db_version( &major, &minor, &patch );
17374
17375                 if( major != DB_VERSION_MAJOR ||
17376                         minor < DB_VERSION_MINOR )
17377                 {
17378                         printf("Berkeley DB version mismatch\n"
17379                                 "\texpected: %s\n\tgot: %s\n",
17380                                 DB_VERSION_STRING, version);
17381                         return 1;
17382                 }
17383         }
17384 #endif
17385
17386 #if DB_VERSION_MAJOR > 2
17387         db_env_create( NULL, 0 );
17388 #elif DB_VERSION_MAJOR > 1
17389         db_appexit( NULL );
17390 #else
17391         (void) dbopen( NULL, 0, 0, 0, NULL);
17392 #endif
17393
17394 ; return 0; }
17395 EOF
17396 if { (eval echo configure:17397: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17397   rm -rf conftest*
17398   ol_cv_db_db41=yes
17399 else
17400   echo "configure: failed program was:" >&5
17401   cat conftest.$ac_ext >&5
17402   rm -rf conftest*
17403   ol_cv_db_db41=no
17404 fi
17405 rm -f conftest*
17406
17407         LIBS="$ol_LIBS"
17408
17409 fi
17410
17411 echo "$ac_t""$ol_cv_db_db41" 1>&6
17412
17413         if test $ol_cv_db_db41 = yes ; then
17414                 ol_cv_lib_db=-ldb41
17415         fi
17416 fi
17417
17418 if test $ol_cv_lib_db = no ; then
17419         echo $ac_n "checking for Berkeley DB link (-ldb-41)""... $ac_c" 1>&6
17420 echo "configure:17421: checking for Berkeley DB link (-ldb-41)" >&5
17421 if eval "test \"\${ol_cv_db_db_41+set}\" = set"; then
17422   echo $ac_n "(cached) $ac_c" 1>&6
17423 else
17424   
17425         ol_DB_LIB=-ldb-41
17426         ol_LIBS=$LIBS
17427         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17428
17429         cat > conftest.$ac_ext <<EOF
17430 #line 17431 "configure"
17431 #include "confdefs.h"
17432
17433 #ifdef HAVE_DB_185_H
17434 # include <db_185.h>
17435 #else
17436 # include <db.h>
17437 #endif
17438
17439 #ifndef DB_VERSION_MAJOR
17440 # define DB_VERSION_MAJOR 1
17441 #endif
17442
17443 #ifndef NULL
17444 #define NULL ((void*)0)
17445 #endif
17446
17447 int main() {
17448
17449 #if DB_VERSION_MAJOR > 1
17450         {
17451                 char *version;
17452                 int major, minor, patch;
17453
17454                 version = db_version( &major, &minor, &patch );
17455
17456                 if( major != DB_VERSION_MAJOR ||
17457                         minor < DB_VERSION_MINOR )
17458                 {
17459                         printf("Berkeley DB version mismatch\n"
17460                                 "\texpected: %s\n\tgot: %s\n",
17461                                 DB_VERSION_STRING, version);
17462                         return 1;
17463                 }
17464         }
17465 #endif
17466
17467 #if DB_VERSION_MAJOR > 2
17468         db_env_create( NULL, 0 );
17469 #elif DB_VERSION_MAJOR > 1
17470         db_appexit( NULL );
17471 #else
17472         (void) dbopen( NULL, 0, 0, 0, NULL);
17473 #endif
17474
17475 ; return 0; }
17476 EOF
17477 if { (eval echo configure:17478: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17478   rm -rf conftest*
17479   ol_cv_db_db_41=yes
17480 else
17481   echo "configure: failed program was:" >&5
17482   cat conftest.$ac_ext >&5
17483   rm -rf conftest*
17484   ol_cv_db_db_41=no
17485 fi
17486 rm -f conftest*
17487
17488         LIBS="$ol_LIBS"
17489
17490 fi
17491
17492 echo "$ac_t""$ol_cv_db_db_41" 1>&6
17493
17494         if test $ol_cv_db_db_41 = yes ; then
17495                 ol_cv_lib_db=-ldb-41
17496         fi
17497 fi
17498
17499 if test $ol_cv_lib_db = no ; then
17500         echo $ac_n "checking for Berkeley DB link (-ldb-4.1)""... $ac_c" 1>&6
17501 echo "configure:17502: checking for Berkeley DB link (-ldb-4.1)" >&5
17502 if eval "test \"\${ol_cv_db_db_4_dot_1+set}\" = set"; then
17503   echo $ac_n "(cached) $ac_c" 1>&6
17504 else
17505   
17506         ol_DB_LIB=-ldb-4.1
17507         ol_LIBS=$LIBS
17508         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17509
17510         cat > conftest.$ac_ext <<EOF
17511 #line 17512 "configure"
17512 #include "confdefs.h"
17513
17514 #ifdef HAVE_DB_185_H
17515 # include <db_185.h>
17516 #else
17517 # include <db.h>
17518 #endif
17519
17520 #ifndef DB_VERSION_MAJOR
17521 # define DB_VERSION_MAJOR 1
17522 #endif
17523
17524 #ifndef NULL
17525 #define NULL ((void*)0)
17526 #endif
17527
17528 int main() {
17529
17530 #if DB_VERSION_MAJOR > 1
17531         {
17532                 char *version;
17533                 int major, minor, patch;
17534
17535                 version = db_version( &major, &minor, &patch );
17536
17537                 if( major != DB_VERSION_MAJOR ||
17538                         minor < DB_VERSION_MINOR )
17539                 {
17540                         printf("Berkeley DB version mismatch\n"
17541                                 "\texpected: %s\n\tgot: %s\n",
17542                                 DB_VERSION_STRING, version);
17543                         return 1;
17544                 }
17545         }
17546 #endif
17547
17548 #if DB_VERSION_MAJOR > 2
17549         db_env_create( NULL, 0 );
17550 #elif DB_VERSION_MAJOR > 1
17551         db_appexit( NULL );
17552 #else
17553         (void) dbopen( NULL, 0, 0, 0, NULL);
17554 #endif
17555
17556 ; return 0; }
17557 EOF
17558 if { (eval echo configure:17559: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17559   rm -rf conftest*
17560   ol_cv_db_db_4_dot_1=yes
17561 else
17562   echo "configure: failed program was:" >&5
17563   cat conftest.$ac_ext >&5
17564   rm -rf conftest*
17565   ol_cv_db_db_4_dot_1=no
17566 fi
17567 rm -f conftest*
17568
17569         LIBS="$ol_LIBS"
17570
17571 fi
17572
17573 echo "$ac_t""$ol_cv_db_db_4_dot_1" 1>&6
17574
17575         if test $ol_cv_db_db_4_dot_1 = yes ; then
17576                 ol_cv_lib_db=-ldb-4.1
17577         fi
17578 fi
17579
17580 if test $ol_cv_lib_db = no ; then
17581         echo $ac_n "checking for Berkeley DB link (-ldb-4-1)""... $ac_c" 1>&6
17582 echo "configure:17583: checking for Berkeley DB link (-ldb-4-1)" >&5
17583 if eval "test \"\${ol_cv_db_db_4_1+set}\" = set"; then
17584   echo $ac_n "(cached) $ac_c" 1>&6
17585 else
17586   
17587         ol_DB_LIB=-ldb-4-1
17588         ol_LIBS=$LIBS
17589         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17590
17591         cat > conftest.$ac_ext <<EOF
17592 #line 17593 "configure"
17593 #include "confdefs.h"
17594
17595 #ifdef HAVE_DB_185_H
17596 # include <db_185.h>
17597 #else
17598 # include <db.h>
17599 #endif
17600
17601 #ifndef DB_VERSION_MAJOR
17602 # define DB_VERSION_MAJOR 1
17603 #endif
17604
17605 #ifndef NULL
17606 #define NULL ((void*)0)
17607 #endif
17608
17609 int main() {
17610
17611 #if DB_VERSION_MAJOR > 1
17612         {
17613                 char *version;
17614                 int major, minor, patch;
17615
17616                 version = db_version( &major, &minor, &patch );
17617
17618                 if( major != DB_VERSION_MAJOR ||
17619                         minor < DB_VERSION_MINOR )
17620                 {
17621                         printf("Berkeley DB version mismatch\n"
17622                                 "\texpected: %s\n\tgot: %s\n",
17623                                 DB_VERSION_STRING, version);
17624                         return 1;
17625                 }
17626         }
17627 #endif
17628
17629 #if DB_VERSION_MAJOR > 2
17630         db_env_create( NULL, 0 );
17631 #elif DB_VERSION_MAJOR > 1
17632         db_appexit( NULL );
17633 #else
17634         (void) dbopen( NULL, 0, 0, 0, NULL);
17635 #endif
17636
17637 ; return 0; }
17638 EOF
17639 if { (eval echo configure:17640: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17640   rm -rf conftest*
17641   ol_cv_db_db_4_1=yes
17642 else
17643   echo "configure: failed program was:" >&5
17644   cat conftest.$ac_ext >&5
17645   rm -rf conftest*
17646   ol_cv_db_db_4_1=no
17647 fi
17648 rm -f conftest*
17649
17650         LIBS="$ol_LIBS"
17651
17652 fi
17653
17654 echo "$ac_t""$ol_cv_db_db_4_1" 1>&6
17655
17656         if test $ol_cv_db_db_4_1 = yes ; then
17657                 ol_cv_lib_db=-ldb-4-1
17658         fi
17659 fi
17660
17661 if test $ol_cv_lib_db = no ; then
17662         echo $ac_n "checking for Berkeley DB link (-ldb3)""... $ac_c" 1>&6
17663 echo "configure:17664: checking for Berkeley DB link (-ldb3)" >&5
17664 if eval "test \"\${ol_cv_db_db3+set}\" = set"; then
17665   echo $ac_n "(cached) $ac_c" 1>&6
17666 else
17667   
17668         ol_DB_LIB=-ldb3
17669         ol_LIBS=$LIBS
17670         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17671
17672         cat > conftest.$ac_ext <<EOF
17673 #line 17674 "configure"
17674 #include "confdefs.h"
17675
17676 #ifdef HAVE_DB_185_H
17677 # include <db_185.h>
17678 #else
17679 # include <db.h>
17680 #endif
17681
17682 #ifndef DB_VERSION_MAJOR
17683 # define DB_VERSION_MAJOR 1
17684 #endif
17685
17686 #ifndef NULL
17687 #define NULL ((void*)0)
17688 #endif
17689
17690 int main() {
17691
17692 #if DB_VERSION_MAJOR > 1
17693         {
17694                 char *version;
17695                 int major, minor, patch;
17696
17697                 version = db_version( &major, &minor, &patch );
17698
17699                 if( major != DB_VERSION_MAJOR ||
17700                         minor < DB_VERSION_MINOR )
17701                 {
17702                         printf("Berkeley DB version mismatch\n"
17703                                 "\texpected: %s\n\tgot: %s\n",
17704                                 DB_VERSION_STRING, version);
17705                         return 1;
17706                 }
17707         }
17708 #endif
17709
17710 #if DB_VERSION_MAJOR > 2
17711         db_env_create( NULL, 0 );
17712 #elif DB_VERSION_MAJOR > 1
17713         db_appexit( NULL );
17714 #else
17715         (void) dbopen( NULL, 0, 0, 0, NULL);
17716 #endif
17717
17718 ; return 0; }
17719 EOF
17720 if { (eval echo configure:17721: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17721   rm -rf conftest*
17722   ol_cv_db_db3=yes
17723 else
17724   echo "configure: failed program was:" >&5
17725   cat conftest.$ac_ext >&5
17726   rm -rf conftest*
17727   ol_cv_db_db3=no
17728 fi
17729 rm -f conftest*
17730
17731         LIBS="$ol_LIBS"
17732
17733 fi
17734
17735 echo "$ac_t""$ol_cv_db_db3" 1>&6
17736
17737         if test $ol_cv_db_db3 = yes ; then
17738                 ol_cv_lib_db=-ldb3
17739         fi
17740 fi
17741
17742 if test $ol_cv_lib_db = no ; then
17743         echo $ac_n "checking for Berkeley DB link (-ldb-3)""... $ac_c" 1>&6
17744 echo "configure:17745: checking for Berkeley DB link (-ldb-3)" >&5
17745 if eval "test \"\${ol_cv_db_db_3+set}\" = set"; then
17746   echo $ac_n "(cached) $ac_c" 1>&6
17747 else
17748   
17749         ol_DB_LIB=-ldb-3
17750         ol_LIBS=$LIBS
17751         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17752
17753         cat > conftest.$ac_ext <<EOF
17754 #line 17755 "configure"
17755 #include "confdefs.h"
17756
17757 #ifdef HAVE_DB_185_H
17758 # include <db_185.h>
17759 #else
17760 # include <db.h>
17761 #endif
17762
17763 #ifndef DB_VERSION_MAJOR
17764 # define DB_VERSION_MAJOR 1
17765 #endif
17766
17767 #ifndef NULL
17768 #define NULL ((void*)0)
17769 #endif
17770
17771 int main() {
17772
17773 #if DB_VERSION_MAJOR > 1
17774         {
17775                 char *version;
17776                 int major, minor, patch;
17777
17778                 version = db_version( &major, &minor, &patch );
17779
17780                 if( major != DB_VERSION_MAJOR ||
17781                         minor < DB_VERSION_MINOR )
17782                 {
17783                         printf("Berkeley DB version mismatch\n"
17784                                 "\texpected: %s\n\tgot: %s\n",
17785                                 DB_VERSION_STRING, version);
17786                         return 1;
17787                 }
17788         }
17789 #endif
17790
17791 #if DB_VERSION_MAJOR > 2
17792         db_env_create( NULL, 0 );
17793 #elif DB_VERSION_MAJOR > 1
17794         db_appexit( NULL );
17795 #else
17796         (void) dbopen( NULL, 0, 0, 0, NULL);
17797 #endif
17798
17799 ; return 0; }
17800 EOF
17801 if { (eval echo configure:17802: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17802   rm -rf conftest*
17803   ol_cv_db_db_3=yes
17804 else
17805   echo "configure: failed program was:" >&5
17806   cat conftest.$ac_ext >&5
17807   rm -rf conftest*
17808   ol_cv_db_db_3=no
17809 fi
17810 rm -f conftest*
17811
17812         LIBS="$ol_LIBS"
17813
17814 fi
17815
17816 echo "$ac_t""$ol_cv_db_db_3" 1>&6
17817
17818         if test $ol_cv_db_db_3 = yes ; then
17819                 ol_cv_lib_db=-ldb-3
17820         fi
17821 fi
17822
17823 if test $ol_cv_lib_db = no ; then
17824         echo $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6
17825 echo "configure:17826: checking for Berkeley DB link (-ldb2)" >&5
17826 if eval "test \"\${ol_cv_db_db2+set}\" = set"; then
17827   echo $ac_n "(cached) $ac_c" 1>&6
17828 else
17829   
17830         ol_DB_LIB=-ldb2
17831         ol_LIBS=$LIBS
17832         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17833
17834         cat > conftest.$ac_ext <<EOF
17835 #line 17836 "configure"
17836 #include "confdefs.h"
17837
17838 #ifdef HAVE_DB_185_H
17839 # include <db_185.h>
17840 #else
17841 # include <db.h>
17842 #endif
17843
17844 #ifndef DB_VERSION_MAJOR
17845 # define DB_VERSION_MAJOR 1
17846 #endif
17847
17848 #ifndef NULL
17849 #define NULL ((void*)0)
17850 #endif
17851
17852 int main() {
17853
17854 #if DB_VERSION_MAJOR > 1
17855         {
17856                 char *version;
17857                 int major, minor, patch;
17858
17859                 version = db_version( &major, &minor, &patch );
17860
17861                 if( major != DB_VERSION_MAJOR ||
17862                         minor < DB_VERSION_MINOR )
17863                 {
17864                         printf("Berkeley DB version mismatch\n"
17865                                 "\texpected: %s\n\tgot: %s\n",
17866                                 DB_VERSION_STRING, version);
17867                         return 1;
17868                 }
17869         }
17870 #endif
17871
17872 #if DB_VERSION_MAJOR > 2
17873         db_env_create( NULL, 0 );
17874 #elif DB_VERSION_MAJOR > 1
17875         db_appexit( NULL );
17876 #else
17877         (void) dbopen( NULL, 0, 0, 0, NULL);
17878 #endif
17879
17880 ; return 0; }
17881 EOF
17882 if { (eval echo configure:17883: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17883   rm -rf conftest*
17884   ol_cv_db_db2=yes
17885 else
17886   echo "configure: failed program was:" >&5
17887   cat conftest.$ac_ext >&5
17888   rm -rf conftest*
17889   ol_cv_db_db2=no
17890 fi
17891 rm -f conftest*
17892
17893         LIBS="$ol_LIBS"
17894
17895 fi
17896
17897 echo "$ac_t""$ol_cv_db_db2" 1>&6
17898
17899         if test $ol_cv_db_db2 = yes ; then
17900                 ol_cv_lib_db=-ldb2
17901         fi
17902 fi
17903
17904 if test $ol_cv_lib_db = no ; then
17905         echo $ac_n "checking for Berkeley DB link (-ldb-2)""... $ac_c" 1>&6
17906 echo "configure:17907: checking for Berkeley DB link (-ldb-2)" >&5
17907 if eval "test \"\${ol_cv_db_db_2+set}\" = set"; then
17908   echo $ac_n "(cached) $ac_c" 1>&6
17909 else
17910   
17911         ol_DB_LIB=-ldb-2
17912         ol_LIBS=$LIBS
17913         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17914
17915         cat > conftest.$ac_ext <<EOF
17916 #line 17917 "configure"
17917 #include "confdefs.h"
17918
17919 #ifdef HAVE_DB_185_H
17920 # include <db_185.h>
17921 #else
17922 # include <db.h>
17923 #endif
17924
17925 #ifndef DB_VERSION_MAJOR
17926 # define DB_VERSION_MAJOR 1
17927 #endif
17928
17929 #ifndef NULL
17930 #define NULL ((void*)0)
17931 #endif
17932
17933 int main() {
17934
17935 #if DB_VERSION_MAJOR > 1
17936         {
17937                 char *version;
17938                 int major, minor, patch;
17939
17940                 version = db_version( &major, &minor, &patch );
17941
17942                 if( major != DB_VERSION_MAJOR ||
17943                         minor < DB_VERSION_MINOR )
17944                 {
17945                         printf("Berkeley DB version mismatch\n"
17946                                 "\texpected: %s\n\tgot: %s\n",
17947                                 DB_VERSION_STRING, version);
17948                         return 1;
17949                 }
17950         }
17951 #endif
17952
17953 #if DB_VERSION_MAJOR > 2
17954         db_env_create( NULL, 0 );
17955 #elif DB_VERSION_MAJOR > 1
17956         db_appexit( NULL );
17957 #else
17958         (void) dbopen( NULL, 0, 0, 0, NULL);
17959 #endif
17960
17961 ; return 0; }
17962 EOF
17963 if { (eval echo configure:17964: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17964   rm -rf conftest*
17965   ol_cv_db_db_2=yes
17966 else
17967   echo "configure: failed program was:" >&5
17968   cat conftest.$ac_ext >&5
17969   rm -rf conftest*
17970   ol_cv_db_db_2=no
17971 fi
17972 rm -f conftest*
17973
17974         LIBS="$ol_LIBS"
17975
17976 fi
17977
17978 echo "$ac_t""$ol_cv_db_db_2" 1>&6
17979
17980         if test $ol_cv_db_db_2 = yes ; then
17981                 ol_cv_lib_db=-ldb-2
17982         fi
17983 fi
17984
17985 if test $ol_cv_lib_db = no ; then
17986         echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6
17987 echo "configure:17988: checking for Berkeley DB link (-ldb1)" >&5
17988 if eval "test \"\${ol_cv_db_db1+set}\" = set"; then
17989   echo $ac_n "(cached) $ac_c" 1>&6
17990 else
17991   
17992         ol_DB_LIB=-ldb1
17993         ol_LIBS=$LIBS
17994         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17995
17996         cat > conftest.$ac_ext <<EOF
17997 #line 17998 "configure"
17998 #include "confdefs.h"
17999
18000 #ifdef HAVE_DB_185_H
18001 # include <db_185.h>
18002 #else
18003 # include <db.h>
18004 #endif
18005
18006 #ifndef DB_VERSION_MAJOR
18007 # define DB_VERSION_MAJOR 1
18008 #endif
18009
18010 #ifndef NULL
18011 #define NULL ((void*)0)
18012 #endif
18013
18014 int main() {
18015
18016 #if DB_VERSION_MAJOR > 1
18017         {
18018                 char *version;
18019                 int major, minor, patch;
18020
18021                 version = db_version( &major, &minor, &patch );
18022
18023                 if( major != DB_VERSION_MAJOR ||
18024                         minor < DB_VERSION_MINOR )
18025                 {
18026                         printf("Berkeley DB version mismatch\n"
18027                                 "\texpected: %s\n\tgot: %s\n",
18028                                 DB_VERSION_STRING, version);
18029                         return 1;
18030                 }
18031         }
18032 #endif
18033
18034 #if DB_VERSION_MAJOR > 2
18035         db_env_create( NULL, 0 );
18036 #elif DB_VERSION_MAJOR > 1
18037         db_appexit( NULL );
18038 #else
18039         (void) dbopen( NULL, 0, 0, 0, NULL);
18040 #endif
18041
18042 ; return 0; }
18043 EOF
18044 if { (eval echo configure:18045: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18045   rm -rf conftest*
18046   ol_cv_db_db1=yes
18047 else
18048   echo "configure: failed program was:" >&5
18049   cat conftest.$ac_ext >&5
18050   rm -rf conftest*
18051   ol_cv_db_db1=no
18052 fi
18053 rm -f conftest*
18054
18055         LIBS="$ol_LIBS"
18056
18057 fi
18058
18059 echo "$ac_t""$ol_cv_db_db1" 1>&6
18060
18061         if test $ol_cv_db_db1 = yes ; then
18062                 ol_cv_lib_db=-ldb1
18063         fi
18064 fi
18065
18066 if test $ol_cv_lib_db = no ; then
18067         echo $ac_n "checking for Berkeley DB link (-ldb-1)""... $ac_c" 1>&6
18068 echo "configure:18069: checking for Berkeley DB link (-ldb-1)" >&5
18069 if eval "test \"\${ol_cv_db_db_1+set}\" = set"; then
18070   echo $ac_n "(cached) $ac_c" 1>&6
18071 else
18072   
18073         ol_DB_LIB=-ldb-1
18074         ol_LIBS=$LIBS
18075         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18076
18077         cat > conftest.$ac_ext <<EOF
18078 #line 18079 "configure"
18079 #include "confdefs.h"
18080
18081 #ifdef HAVE_DB_185_H
18082 # include <db_185.h>
18083 #else
18084 # include <db.h>
18085 #endif
18086
18087 #ifndef DB_VERSION_MAJOR
18088 # define DB_VERSION_MAJOR 1
18089 #endif
18090
18091 #ifndef NULL
18092 #define NULL ((void*)0)
18093 #endif
18094
18095 int main() {
18096
18097 #if DB_VERSION_MAJOR > 1
18098         {
18099                 char *version;
18100                 int major, minor, patch;
18101
18102                 version = db_version( &major, &minor, &patch );
18103
18104                 if( major != DB_VERSION_MAJOR ||
18105                         minor < DB_VERSION_MINOR )
18106                 {
18107                         printf("Berkeley DB version mismatch\n"
18108                                 "\texpected: %s\n\tgot: %s\n",
18109                                 DB_VERSION_STRING, version);
18110                         return 1;
18111                 }
18112         }
18113 #endif
18114
18115 #if DB_VERSION_MAJOR > 2
18116         db_env_create( NULL, 0 );
18117 #elif DB_VERSION_MAJOR > 1
18118         db_appexit( NULL );
18119 #else
18120         (void) dbopen( NULL, 0, 0, 0, NULL);
18121 #endif
18122
18123 ; return 0; }
18124 EOF
18125 if { (eval echo configure:18126: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18126   rm -rf conftest*
18127   ol_cv_db_db_1=yes
18128 else
18129   echo "configure: failed program was:" >&5
18130   cat conftest.$ac_ext >&5
18131   rm -rf conftest*
18132   ol_cv_db_db_1=no
18133 fi
18134 rm -f conftest*
18135
18136         LIBS="$ol_LIBS"
18137
18138 fi
18139
18140 echo "$ac_t""$ol_cv_db_db_1" 1>&6
18141
18142         if test $ol_cv_db_db_1 = yes ; then
18143                 ol_cv_lib_db=-ldb-1
18144         fi
18145 fi
18146
18147
18148                 if test "$ol_cv_lib_db" != no ; then
18149                         ol_cv_berkeley_db=yes
18150                 fi
18151         fi
18152 fi
18153
18154         else
18155                 ol_cv_berkeley_db=no
18156 for ac_hdr in db.h
18157 do
18158 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
18159 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
18160 echo "configure:18161: checking for $ac_hdr" >&5
18161 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
18162   echo $ac_n "(cached) $ac_c" 1>&6
18163 else
18164   cat > conftest.$ac_ext <<EOF
18165 #line 18166 "configure"
18166 #include "confdefs.h"
18167 #include <$ac_hdr>
18168 EOF
18169 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
18170 { (eval echo configure:18171: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
18171 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
18172 if test -z "$ac_err"; then
18173   rm -rf conftest*
18174   eval "ac_cv_header_$ac_safe=yes"
18175 else
18176   echo "$ac_err" >&5
18177   echo "configure: failed program was:" >&5
18178   cat conftest.$ac_ext >&5
18179   rm -rf conftest*
18180   eval "ac_cv_header_$ac_safe=no"
18181 fi
18182 rm -f conftest*
18183 fi
18184 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
18185   echo "$ac_t""yes" 1>&6
18186     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
18187   cat >> confdefs.h <<EOF
18188 #define $ac_tr_hdr 1
18189 EOF
18190  
18191 else
18192   echo "$ac_t""no" 1>&6
18193 fi
18194 done
18195
18196 if test $ac_cv_header_db_h = yes; then
18197         ol_cv_lib_db=no
18198 if test $ol_cv_lib_db = no ; then
18199         echo $ac_n "checking for Berkeley DB link (default)""... $ac_c" 1>&6
18200 echo "configure:18201: checking for Berkeley DB link (default)" >&5
18201 if eval "test \"\${ol_cv_db_none+set}\" = set"; then
18202   echo $ac_n "(cached) $ac_c" 1>&6
18203 else
18204   
18205         ol_DB_LIB=
18206         ol_LIBS=$LIBS
18207         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18208
18209         cat > conftest.$ac_ext <<EOF
18210 #line 18211 "configure"
18211 #include "confdefs.h"
18212
18213 #ifdef HAVE_DB_185_H
18214 # include <db_185.h>
18215 #else
18216 # include <db.h>
18217 #endif
18218
18219 #ifndef DB_VERSION_MAJOR
18220 # define DB_VERSION_MAJOR 1
18221 #endif
18222
18223 #ifndef NULL
18224 #define NULL ((void*)0)
18225 #endif
18226
18227 int main() {
18228
18229 #if DB_VERSION_MAJOR > 1
18230         {
18231                 char *version;
18232                 int major, minor, patch;
18233
18234                 version = db_version( &major, &minor, &patch );
18235
18236                 if( major != DB_VERSION_MAJOR ||
18237                         minor < DB_VERSION_MINOR )
18238                 {
18239                         printf("Berkeley DB version mismatch\n"
18240                                 "\texpected: %s\n\tgot: %s\n",
18241                                 DB_VERSION_STRING, version);
18242                         return 1;
18243                 }
18244         }
18245 #endif
18246
18247 #if DB_VERSION_MAJOR > 2
18248         db_env_create( NULL, 0 );
18249 #elif DB_VERSION_MAJOR > 1
18250         db_appexit( NULL );
18251 #else
18252         (void) dbopen( NULL, 0, 0, 0, NULL);
18253 #endif
18254
18255 ; return 0; }
18256 EOF
18257 if { (eval echo configure:18258: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18258   rm -rf conftest*
18259   ol_cv_db_none=yes
18260 else
18261   echo "configure: failed program was:" >&5
18262   cat conftest.$ac_ext >&5
18263   rm -rf conftest*
18264   ol_cv_db_none=no
18265 fi
18266 rm -f conftest*
18267
18268         LIBS="$ol_LIBS"
18269
18270 fi
18271
18272 echo "$ac_t""$ol_cv_db_none" 1>&6
18273
18274         if test $ol_cv_db_none = yes ; then
18275                 ol_cv_lib_db=yes
18276         fi
18277 fi
18278
18279 if test $ol_cv_lib_db = no ; then
18280         echo $ac_n "checking for Berkeley DB link (-ldb42)""... $ac_c" 1>&6
18281 echo "configure:18282: checking for Berkeley DB link (-ldb42)" >&5
18282 if eval "test \"\${ol_cv_db_db42+set}\" = set"; then
18283   echo $ac_n "(cached) $ac_c" 1>&6
18284 else
18285   
18286         ol_DB_LIB=-ldb42
18287         ol_LIBS=$LIBS
18288         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18289
18290         cat > conftest.$ac_ext <<EOF
18291 #line 18292 "configure"
18292 #include "confdefs.h"
18293
18294 #ifdef HAVE_DB_185_H
18295 # include <db_185.h>
18296 #else
18297 # include <db.h>
18298 #endif
18299
18300 #ifndef DB_VERSION_MAJOR
18301 # define DB_VERSION_MAJOR 1
18302 #endif
18303
18304 #ifndef NULL
18305 #define NULL ((void*)0)
18306 #endif
18307
18308 int main() {
18309
18310 #if DB_VERSION_MAJOR > 1
18311         {
18312                 char *version;
18313                 int major, minor, patch;
18314
18315                 version = db_version( &major, &minor, &patch );
18316
18317                 if( major != DB_VERSION_MAJOR ||
18318                         minor < DB_VERSION_MINOR )
18319                 {
18320                         printf("Berkeley DB version mismatch\n"
18321                                 "\texpected: %s\n\tgot: %s\n",
18322                                 DB_VERSION_STRING, version);
18323                         return 1;
18324                 }
18325         }
18326 #endif
18327
18328 #if DB_VERSION_MAJOR > 2
18329         db_env_create( NULL, 0 );
18330 #elif DB_VERSION_MAJOR > 1
18331         db_appexit( NULL );
18332 #else
18333         (void) dbopen( NULL, 0, 0, 0, NULL);
18334 #endif
18335
18336 ; return 0; }
18337 EOF
18338 if { (eval echo configure:18339: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18339   rm -rf conftest*
18340   ol_cv_db_db42=yes
18341 else
18342   echo "configure: failed program was:" >&5
18343   cat conftest.$ac_ext >&5
18344   rm -rf conftest*
18345   ol_cv_db_db42=no
18346 fi
18347 rm -f conftest*
18348
18349         LIBS="$ol_LIBS"
18350
18351 fi
18352
18353 echo "$ac_t""$ol_cv_db_db42" 1>&6
18354
18355         if test $ol_cv_db_db42 = yes ; then
18356                 ol_cv_lib_db=-ldb42
18357         fi
18358 fi
18359
18360 if test $ol_cv_lib_db = no ; then
18361         echo $ac_n "checking for Berkeley DB link (-ldb-42)""... $ac_c" 1>&6
18362 echo "configure:18363: checking for Berkeley DB link (-ldb-42)" >&5
18363 if eval "test \"\${ol_cv_db_db_42+set}\" = set"; then
18364   echo $ac_n "(cached) $ac_c" 1>&6
18365 else
18366   
18367         ol_DB_LIB=-ldb-42
18368         ol_LIBS=$LIBS
18369         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18370
18371         cat > conftest.$ac_ext <<EOF
18372 #line 18373 "configure"
18373 #include "confdefs.h"
18374
18375 #ifdef HAVE_DB_185_H
18376 # include <db_185.h>
18377 #else
18378 # include <db.h>
18379 #endif
18380
18381 #ifndef DB_VERSION_MAJOR
18382 # define DB_VERSION_MAJOR 1
18383 #endif
18384
18385 #ifndef NULL
18386 #define NULL ((void*)0)
18387 #endif
18388
18389 int main() {
18390
18391 #if DB_VERSION_MAJOR > 1
18392         {
18393                 char *version;
18394                 int major, minor, patch;
18395
18396                 version = db_version( &major, &minor, &patch );
18397
18398                 if( major != DB_VERSION_MAJOR ||
18399                         minor < DB_VERSION_MINOR )
18400                 {
18401                         printf("Berkeley DB version mismatch\n"
18402                                 "\texpected: %s\n\tgot: %s\n",
18403                                 DB_VERSION_STRING, version);
18404                         return 1;
18405                 }
18406         }
18407 #endif
18408
18409 #if DB_VERSION_MAJOR > 2
18410         db_env_create( NULL, 0 );
18411 #elif DB_VERSION_MAJOR > 1
18412         db_appexit( NULL );
18413 #else
18414         (void) dbopen( NULL, 0, 0, 0, NULL);
18415 #endif
18416
18417 ; return 0; }
18418 EOF
18419 if { (eval echo configure:18420: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18420   rm -rf conftest*
18421   ol_cv_db_db_42=yes
18422 else
18423   echo "configure: failed program was:" >&5
18424   cat conftest.$ac_ext >&5
18425   rm -rf conftest*
18426   ol_cv_db_db_42=no
18427 fi
18428 rm -f conftest*
18429
18430         LIBS="$ol_LIBS"
18431
18432 fi
18433
18434 echo "$ac_t""$ol_cv_db_db_42" 1>&6
18435
18436         if test $ol_cv_db_db_42 = yes ; then
18437                 ol_cv_lib_db=-ldb-42
18438         fi
18439 fi
18440
18441 if test $ol_cv_lib_db = no ; then
18442         echo $ac_n "checking for Berkeley DB link (-ldb-4.2)""... $ac_c" 1>&6
18443 echo "configure:18444: checking for Berkeley DB link (-ldb-4.2)" >&5
18444 if eval "test \"\${ol_cv_db_db_4_dot_2+set}\" = set"; then
18445   echo $ac_n "(cached) $ac_c" 1>&6
18446 else
18447   
18448         ol_DB_LIB=-ldb-4.2
18449         ol_LIBS=$LIBS
18450         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18451
18452         cat > conftest.$ac_ext <<EOF
18453 #line 18454 "configure"
18454 #include "confdefs.h"
18455
18456 #ifdef HAVE_DB_185_H
18457 # include <db_185.h>
18458 #else
18459 # include <db.h>
18460 #endif
18461
18462 #ifndef DB_VERSION_MAJOR
18463 # define DB_VERSION_MAJOR 1
18464 #endif
18465
18466 #ifndef NULL
18467 #define NULL ((void*)0)
18468 #endif
18469
18470 int main() {
18471
18472 #if DB_VERSION_MAJOR > 1
18473         {
18474                 char *version;
18475                 int major, minor, patch;
18476
18477                 version = db_version( &major, &minor, &patch );
18478
18479                 if( major != DB_VERSION_MAJOR ||
18480                         minor < DB_VERSION_MINOR )
18481                 {
18482                         printf("Berkeley DB version mismatch\n"
18483                                 "\texpected: %s\n\tgot: %s\n",
18484                                 DB_VERSION_STRING, version);
18485                         return 1;
18486                 }
18487         }
18488 #endif
18489
18490 #if DB_VERSION_MAJOR > 2
18491         db_env_create( NULL, 0 );
18492 #elif DB_VERSION_MAJOR > 1
18493         db_appexit( NULL );
18494 #else
18495         (void) dbopen( NULL, 0, 0, 0, NULL);
18496 #endif
18497
18498 ; return 0; }
18499 EOF
18500 if { (eval echo configure:18501: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18501   rm -rf conftest*
18502   ol_cv_db_db_4_dot_2=yes
18503 else
18504   echo "configure: failed program was:" >&5
18505   cat conftest.$ac_ext >&5
18506   rm -rf conftest*
18507   ol_cv_db_db_4_dot_2=no
18508 fi
18509 rm -f conftest*
18510
18511         LIBS="$ol_LIBS"
18512
18513 fi
18514
18515 echo "$ac_t""$ol_cv_db_db_4_dot_2" 1>&6
18516
18517         if test $ol_cv_db_db_4_dot_2 = yes ; then
18518                 ol_cv_lib_db=-ldb-4.2
18519         fi
18520 fi
18521
18522 if test $ol_cv_lib_db = no ; then
18523         echo $ac_n "checking for Berkeley DB link (-ldb-4-2)""... $ac_c" 1>&6
18524 echo "configure:18525: checking for Berkeley DB link (-ldb-4-2)" >&5
18525 if eval "test \"\${ol_cv_db_db_4_2+set}\" = set"; then
18526   echo $ac_n "(cached) $ac_c" 1>&6
18527 else
18528   
18529         ol_DB_LIB=-ldb-4-2
18530         ol_LIBS=$LIBS
18531         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18532
18533         cat > conftest.$ac_ext <<EOF
18534 #line 18535 "configure"
18535 #include "confdefs.h"
18536
18537 #ifdef HAVE_DB_185_H
18538 # include <db_185.h>
18539 #else
18540 # include <db.h>
18541 #endif
18542
18543 #ifndef DB_VERSION_MAJOR
18544 # define DB_VERSION_MAJOR 1
18545 #endif
18546
18547 #ifndef NULL
18548 #define NULL ((void*)0)
18549 #endif
18550
18551 int main() {
18552
18553 #if DB_VERSION_MAJOR > 1
18554         {
18555                 char *version;
18556                 int major, minor, patch;
18557
18558                 version = db_version( &major, &minor, &patch );
18559
18560                 if( major != DB_VERSION_MAJOR ||
18561                         minor < DB_VERSION_MINOR )
18562                 {
18563                         printf("Berkeley DB version mismatch\n"
18564                                 "\texpected: %s\n\tgot: %s\n",
18565                                 DB_VERSION_STRING, version);
18566                         return 1;
18567                 }
18568         }
18569 #endif
18570
18571 #if DB_VERSION_MAJOR > 2
18572         db_env_create( NULL, 0 );
18573 #elif DB_VERSION_MAJOR > 1
18574         db_appexit( NULL );
18575 #else
18576         (void) dbopen( NULL, 0, 0, 0, NULL);
18577 #endif
18578
18579 ; return 0; }
18580 EOF
18581 if { (eval echo configure:18582: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18582   rm -rf conftest*
18583   ol_cv_db_db_4_2=yes
18584 else
18585   echo "configure: failed program was:" >&5
18586   cat conftest.$ac_ext >&5
18587   rm -rf conftest*
18588   ol_cv_db_db_4_2=no
18589 fi
18590 rm -f conftest*
18591
18592         LIBS="$ol_LIBS"
18593
18594 fi
18595
18596 echo "$ac_t""$ol_cv_db_db_4_2" 1>&6
18597
18598         if test $ol_cv_db_db_4_2 = yes ; then
18599                 ol_cv_lib_db=-ldb-4-2
18600         fi
18601 fi
18602
18603 if test $ol_cv_lib_db = no ; then
18604         echo $ac_n "checking for Berkeley DB link (-ldb-4)""... $ac_c" 1>&6
18605 echo "configure:18606: checking for Berkeley DB link (-ldb-4)" >&5
18606 if eval "test \"\${ol_cv_db_db_4+set}\" = set"; then
18607   echo $ac_n "(cached) $ac_c" 1>&6
18608 else
18609   
18610         ol_DB_LIB=-ldb-4
18611         ol_LIBS=$LIBS
18612         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18613
18614         cat > conftest.$ac_ext <<EOF
18615 #line 18616 "configure"
18616 #include "confdefs.h"
18617
18618 #ifdef HAVE_DB_185_H
18619 # include <db_185.h>
18620 #else
18621 # include <db.h>
18622 #endif
18623
18624 #ifndef DB_VERSION_MAJOR
18625 # define DB_VERSION_MAJOR 1
18626 #endif
18627
18628 #ifndef NULL
18629 #define NULL ((void*)0)
18630 #endif
18631
18632 int main() {
18633
18634 #if DB_VERSION_MAJOR > 1
18635         {
18636                 char *version;
18637                 int major, minor, patch;
18638
18639                 version = db_version( &major, &minor, &patch );
18640
18641                 if( major != DB_VERSION_MAJOR ||
18642                         minor < DB_VERSION_MINOR )
18643                 {
18644                         printf("Berkeley DB version mismatch\n"
18645                                 "\texpected: %s\n\tgot: %s\n",
18646                                 DB_VERSION_STRING, version);
18647                         return 1;
18648                 }
18649         }
18650 #endif
18651
18652 #if DB_VERSION_MAJOR > 2
18653         db_env_create( NULL, 0 );
18654 #elif DB_VERSION_MAJOR > 1
18655         db_appexit( NULL );
18656 #else
18657         (void) dbopen( NULL, 0, 0, 0, NULL);
18658 #endif
18659
18660 ; return 0; }
18661 EOF
18662 if { (eval echo configure:18663: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18663   rm -rf conftest*
18664   ol_cv_db_db_4=yes
18665 else
18666   echo "configure: failed program was:" >&5
18667   cat conftest.$ac_ext >&5
18668   rm -rf conftest*
18669   ol_cv_db_db_4=no
18670 fi
18671 rm -f conftest*
18672
18673         LIBS="$ol_LIBS"
18674
18675 fi
18676
18677 echo "$ac_t""$ol_cv_db_db_4" 1>&6
18678
18679         if test $ol_cv_db_db_4 = yes ; then
18680                 ol_cv_lib_db=-ldb-4
18681         fi
18682 fi
18683
18684 if test $ol_cv_lib_db = no ; then
18685         echo $ac_n "checking for Berkeley DB link (-ldb4)""... $ac_c" 1>&6
18686 echo "configure:18687: checking for Berkeley DB link (-ldb4)" >&5
18687 if eval "test \"\${ol_cv_db_db4+set}\" = set"; then
18688   echo $ac_n "(cached) $ac_c" 1>&6
18689 else
18690   
18691         ol_DB_LIB=-ldb4
18692         ol_LIBS=$LIBS
18693         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18694
18695         cat > conftest.$ac_ext <<EOF
18696 #line 18697 "configure"
18697 #include "confdefs.h"
18698
18699 #ifdef HAVE_DB_185_H
18700 # include <db_185.h>
18701 #else
18702 # include <db.h>
18703 #endif
18704
18705 #ifndef DB_VERSION_MAJOR
18706 # define DB_VERSION_MAJOR 1
18707 #endif
18708
18709 #ifndef NULL
18710 #define NULL ((void*)0)
18711 #endif
18712
18713 int main() {
18714
18715 #if DB_VERSION_MAJOR > 1
18716         {
18717                 char *version;
18718                 int major, minor, patch;
18719
18720                 version = db_version( &major, &minor, &patch );
18721
18722                 if( major != DB_VERSION_MAJOR ||
18723                         minor < DB_VERSION_MINOR )
18724                 {
18725                         printf("Berkeley DB version mismatch\n"
18726                                 "\texpected: %s\n\tgot: %s\n",
18727                                 DB_VERSION_STRING, version);
18728                         return 1;
18729                 }
18730         }
18731 #endif
18732
18733 #if DB_VERSION_MAJOR > 2
18734         db_env_create( NULL, 0 );
18735 #elif DB_VERSION_MAJOR > 1
18736         db_appexit( NULL );
18737 #else
18738         (void) dbopen( NULL, 0, 0, 0, NULL);
18739 #endif
18740
18741 ; return 0; }
18742 EOF
18743 if { (eval echo configure:18744: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18744   rm -rf conftest*
18745   ol_cv_db_db4=yes
18746 else
18747   echo "configure: failed program was:" >&5
18748   cat conftest.$ac_ext >&5
18749   rm -rf conftest*
18750   ol_cv_db_db4=no
18751 fi
18752 rm -f conftest*
18753
18754         LIBS="$ol_LIBS"
18755
18756 fi
18757
18758 echo "$ac_t""$ol_cv_db_db4" 1>&6
18759
18760         if test $ol_cv_db_db4 = yes ; then
18761                 ol_cv_lib_db=-ldb4
18762         fi
18763 fi
18764
18765 if test $ol_cv_lib_db = no ; then
18766         echo $ac_n "checking for Berkeley DB link (-ldb)""... $ac_c" 1>&6
18767 echo "configure:18768: checking for Berkeley DB link (-ldb)" >&5
18768 if eval "test \"\${ol_cv_db_db+set}\" = set"; then
18769   echo $ac_n "(cached) $ac_c" 1>&6
18770 else
18771   
18772         ol_DB_LIB=-ldb
18773         ol_LIBS=$LIBS
18774         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18775
18776         cat > conftest.$ac_ext <<EOF
18777 #line 18778 "configure"
18778 #include "confdefs.h"
18779
18780 #ifdef HAVE_DB_185_H
18781 # include <db_185.h>
18782 #else
18783 # include <db.h>
18784 #endif
18785
18786 #ifndef DB_VERSION_MAJOR
18787 # define DB_VERSION_MAJOR 1
18788 #endif
18789
18790 #ifndef NULL
18791 #define NULL ((void*)0)
18792 #endif
18793
18794 int main() {
18795
18796 #if DB_VERSION_MAJOR > 1
18797         {
18798                 char *version;
18799                 int major, minor, patch;
18800
18801                 version = db_version( &major, &minor, &patch );
18802
18803                 if( major != DB_VERSION_MAJOR ||
18804                         minor < DB_VERSION_MINOR )
18805                 {
18806                         printf("Berkeley DB version mismatch\n"
18807                                 "\texpected: %s\n\tgot: %s\n",
18808                                 DB_VERSION_STRING, version);
18809                         return 1;
18810                 }
18811         }
18812 #endif
18813
18814 #if DB_VERSION_MAJOR > 2
18815         db_env_create( NULL, 0 );
18816 #elif DB_VERSION_MAJOR > 1
18817         db_appexit( NULL );
18818 #else
18819         (void) dbopen( NULL, 0, 0, 0, NULL);
18820 #endif
18821
18822 ; return 0; }
18823 EOF
18824 if { (eval echo configure:18825: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18825   rm -rf conftest*
18826   ol_cv_db_db=yes
18827 else
18828   echo "configure: failed program was:" >&5
18829   cat conftest.$ac_ext >&5
18830   rm -rf conftest*
18831   ol_cv_db_db=no
18832 fi
18833 rm -f conftest*
18834
18835         LIBS="$ol_LIBS"
18836
18837 fi
18838
18839 echo "$ac_t""$ol_cv_db_db" 1>&6
18840
18841         if test $ol_cv_db_db = yes ; then
18842                 ol_cv_lib_db=-ldb
18843         fi
18844 fi
18845
18846 if test $ol_cv_lib_db = no ; then
18847         echo $ac_n "checking for Berkeley DB link (-ldb41)""... $ac_c" 1>&6
18848 echo "configure:18849: checking for Berkeley DB link (-ldb41)" >&5
18849 if eval "test \"\${ol_cv_db_db41+set}\" = set"; then
18850   echo $ac_n "(cached) $ac_c" 1>&6
18851 else
18852   
18853         ol_DB_LIB=-ldb41
18854         ol_LIBS=$LIBS
18855         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18856
18857         cat > conftest.$ac_ext <<EOF
18858 #line 18859 "configure"
18859 #include "confdefs.h"
18860
18861 #ifdef HAVE_DB_185_H
18862 # include <db_185.h>
18863 #else
18864 # include <db.h>
18865 #endif
18866
18867 #ifndef DB_VERSION_MAJOR
18868 # define DB_VERSION_MAJOR 1
18869 #endif
18870
18871 #ifndef NULL
18872 #define NULL ((void*)0)
18873 #endif
18874
18875 int main() {
18876
18877 #if DB_VERSION_MAJOR > 1
18878         {
18879                 char *version;
18880                 int major, minor, patch;
18881
18882                 version = db_version( &major, &minor, &patch );
18883
18884                 if( major != DB_VERSION_MAJOR ||
18885                         minor < DB_VERSION_MINOR )
18886                 {
18887                         printf("Berkeley DB version mismatch\n"
18888                                 "\texpected: %s\n\tgot: %s\n",
18889                                 DB_VERSION_STRING, version);
18890                         return 1;
18891                 }
18892         }
18893 #endif
18894
18895 #if DB_VERSION_MAJOR > 2
18896         db_env_create( NULL, 0 );
18897 #elif DB_VERSION_MAJOR > 1
18898         db_appexit( NULL );
18899 #else
18900         (void) dbopen( NULL, 0, 0, 0, NULL);
18901 #endif
18902
18903 ; return 0; }
18904 EOF
18905 if { (eval echo configure:18906: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18906   rm -rf conftest*
18907   ol_cv_db_db41=yes
18908 else
18909   echo "configure: failed program was:" >&5
18910   cat conftest.$ac_ext >&5
18911   rm -rf conftest*
18912   ol_cv_db_db41=no
18913 fi
18914 rm -f conftest*
18915
18916         LIBS="$ol_LIBS"
18917
18918 fi
18919
18920 echo "$ac_t""$ol_cv_db_db41" 1>&6
18921
18922         if test $ol_cv_db_db41 = yes ; then
18923                 ol_cv_lib_db=-ldb41
18924         fi
18925 fi
18926
18927 if test $ol_cv_lib_db = no ; then
18928         echo $ac_n "checking for Berkeley DB link (-ldb-41)""... $ac_c" 1>&6
18929 echo "configure:18930: checking for Berkeley DB link (-ldb-41)" >&5
18930 if eval "test \"\${ol_cv_db_db_41+set}\" = set"; then
18931   echo $ac_n "(cached) $ac_c" 1>&6
18932 else
18933   
18934         ol_DB_LIB=-ldb-41
18935         ol_LIBS=$LIBS
18936         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18937
18938         cat > conftest.$ac_ext <<EOF
18939 #line 18940 "configure"
18940 #include "confdefs.h"
18941
18942 #ifdef HAVE_DB_185_H
18943 # include <db_185.h>
18944 #else
18945 # include <db.h>
18946 #endif
18947
18948 #ifndef DB_VERSION_MAJOR
18949 # define DB_VERSION_MAJOR 1
18950 #endif
18951
18952 #ifndef NULL
18953 #define NULL ((void*)0)
18954 #endif
18955
18956 int main() {
18957
18958 #if DB_VERSION_MAJOR > 1
18959         {
18960                 char *version;
18961                 int major, minor, patch;
18962
18963                 version = db_version( &major, &minor, &patch );
18964
18965                 if( major != DB_VERSION_MAJOR ||
18966                         minor < DB_VERSION_MINOR )
18967                 {
18968                         printf("Berkeley DB version mismatch\n"
18969                                 "\texpected: %s\n\tgot: %s\n",
18970                                 DB_VERSION_STRING, version);
18971                         return 1;
18972                 }
18973         }
18974 #endif
18975
18976 #if DB_VERSION_MAJOR > 2
18977         db_env_create( NULL, 0 );
18978 #elif DB_VERSION_MAJOR > 1
18979         db_appexit( NULL );
18980 #else
18981         (void) dbopen( NULL, 0, 0, 0, NULL);
18982 #endif
18983
18984 ; return 0; }
18985 EOF
18986 if { (eval echo configure:18987: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18987   rm -rf conftest*
18988   ol_cv_db_db_41=yes
18989 else
18990   echo "configure: failed program was:" >&5
18991   cat conftest.$ac_ext >&5
18992   rm -rf conftest*
18993   ol_cv_db_db_41=no
18994 fi
18995 rm -f conftest*
18996
18997         LIBS="$ol_LIBS"
18998
18999 fi
19000
19001 echo "$ac_t""$ol_cv_db_db_41" 1>&6
19002
19003         if test $ol_cv_db_db_41 = yes ; then
19004                 ol_cv_lib_db=-ldb-41
19005         fi
19006 fi
19007
19008 if test $ol_cv_lib_db = no ; then
19009         echo $ac_n "checking for Berkeley DB link (-ldb-4.1)""... $ac_c" 1>&6
19010 echo "configure:19011: checking for Berkeley DB link (-ldb-4.1)" >&5
19011 if eval "test \"\${ol_cv_db_db_4_dot_1+set}\" = set"; then
19012   echo $ac_n "(cached) $ac_c" 1>&6
19013 else
19014   
19015         ol_DB_LIB=-ldb-4.1
19016         ol_LIBS=$LIBS
19017         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19018
19019         cat > conftest.$ac_ext <<EOF
19020 #line 19021 "configure"
19021 #include "confdefs.h"
19022
19023 #ifdef HAVE_DB_185_H
19024 # include <db_185.h>
19025 #else
19026 # include <db.h>
19027 #endif
19028
19029 #ifndef DB_VERSION_MAJOR
19030 # define DB_VERSION_MAJOR 1
19031 #endif
19032
19033 #ifndef NULL
19034 #define NULL ((void*)0)
19035 #endif
19036
19037 int main() {
19038
19039 #if DB_VERSION_MAJOR > 1
19040         {
19041                 char *version;
19042                 int major, minor, patch;
19043
19044                 version = db_version( &major, &minor, &patch );
19045
19046                 if( major != DB_VERSION_MAJOR ||
19047                         minor < DB_VERSION_MINOR )
19048                 {
19049                         printf("Berkeley DB version mismatch\n"
19050                                 "\texpected: %s\n\tgot: %s\n",
19051                                 DB_VERSION_STRING, version);
19052                         return 1;
19053                 }
19054         }
19055 #endif
19056
19057 #if DB_VERSION_MAJOR > 2
19058         db_env_create( NULL, 0 );
19059 #elif DB_VERSION_MAJOR > 1
19060         db_appexit( NULL );
19061 #else
19062         (void) dbopen( NULL, 0, 0, 0, NULL);
19063 #endif
19064
19065 ; return 0; }
19066 EOF
19067 if { (eval echo configure:19068: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19068   rm -rf conftest*
19069   ol_cv_db_db_4_dot_1=yes
19070 else
19071   echo "configure: failed program was:" >&5
19072   cat conftest.$ac_ext >&5
19073   rm -rf conftest*
19074   ol_cv_db_db_4_dot_1=no
19075 fi
19076 rm -f conftest*
19077
19078         LIBS="$ol_LIBS"
19079
19080 fi
19081
19082 echo "$ac_t""$ol_cv_db_db_4_dot_1" 1>&6
19083
19084         if test $ol_cv_db_db_4_dot_1 = yes ; then
19085                 ol_cv_lib_db=-ldb-4.1
19086         fi
19087 fi
19088
19089 if test $ol_cv_lib_db = no ; then
19090         echo $ac_n "checking for Berkeley DB link (-ldb-4-1)""... $ac_c" 1>&6
19091 echo "configure:19092: checking for Berkeley DB link (-ldb-4-1)" >&5
19092 if eval "test \"\${ol_cv_db_db_4_1+set}\" = set"; then
19093   echo $ac_n "(cached) $ac_c" 1>&6
19094 else
19095   
19096         ol_DB_LIB=-ldb-4-1
19097         ol_LIBS=$LIBS
19098         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19099
19100         cat > conftest.$ac_ext <<EOF
19101 #line 19102 "configure"
19102 #include "confdefs.h"
19103
19104 #ifdef HAVE_DB_185_H
19105 # include <db_185.h>
19106 #else
19107 # include <db.h>
19108 #endif
19109
19110 #ifndef DB_VERSION_MAJOR
19111 # define DB_VERSION_MAJOR 1
19112 #endif
19113
19114 #ifndef NULL
19115 #define NULL ((void*)0)
19116 #endif
19117
19118 int main() {
19119
19120 #if DB_VERSION_MAJOR > 1
19121         {
19122                 char *version;
19123                 int major, minor, patch;
19124
19125                 version = db_version( &major, &minor, &patch );
19126
19127                 if( major != DB_VERSION_MAJOR ||
19128                         minor < DB_VERSION_MINOR )
19129                 {
19130                         printf("Berkeley DB version mismatch\n"
19131                                 "\texpected: %s\n\tgot: %s\n",
19132                                 DB_VERSION_STRING, version);
19133                         return 1;
19134                 }
19135         }
19136 #endif
19137
19138 #if DB_VERSION_MAJOR > 2
19139         db_env_create( NULL, 0 );
19140 #elif DB_VERSION_MAJOR > 1
19141         db_appexit( NULL );
19142 #else
19143         (void) dbopen( NULL, 0, 0, 0, NULL);
19144 #endif
19145
19146 ; return 0; }
19147 EOF
19148 if { (eval echo configure:19149: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19149   rm -rf conftest*
19150   ol_cv_db_db_4_1=yes
19151 else
19152   echo "configure: failed program was:" >&5
19153   cat conftest.$ac_ext >&5
19154   rm -rf conftest*
19155   ol_cv_db_db_4_1=no
19156 fi
19157 rm -f conftest*
19158
19159         LIBS="$ol_LIBS"
19160
19161 fi
19162
19163 echo "$ac_t""$ol_cv_db_db_4_1" 1>&6
19164
19165         if test $ol_cv_db_db_4_1 = yes ; then
19166                 ol_cv_lib_db=-ldb-4-1
19167         fi
19168 fi
19169
19170 if test $ol_cv_lib_db = no ; then
19171         echo $ac_n "checking for Berkeley DB link (-ldb3)""... $ac_c" 1>&6
19172 echo "configure:19173: checking for Berkeley DB link (-ldb3)" >&5
19173 if eval "test \"\${ol_cv_db_db3+set}\" = set"; then
19174   echo $ac_n "(cached) $ac_c" 1>&6
19175 else
19176   
19177         ol_DB_LIB=-ldb3
19178         ol_LIBS=$LIBS
19179         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19180
19181         cat > conftest.$ac_ext <<EOF
19182 #line 19183 "configure"
19183 #include "confdefs.h"
19184
19185 #ifdef HAVE_DB_185_H
19186 # include <db_185.h>
19187 #else
19188 # include <db.h>
19189 #endif
19190
19191 #ifndef DB_VERSION_MAJOR
19192 # define DB_VERSION_MAJOR 1
19193 #endif
19194
19195 #ifndef NULL
19196 #define NULL ((void*)0)
19197 #endif
19198
19199 int main() {
19200
19201 #if DB_VERSION_MAJOR > 1
19202         {
19203                 char *version;
19204                 int major, minor, patch;
19205
19206                 version = db_version( &major, &minor, &patch );
19207
19208                 if( major != DB_VERSION_MAJOR ||
19209                         minor < DB_VERSION_MINOR )
19210                 {
19211                         printf("Berkeley DB version mismatch\n"
19212                                 "\texpected: %s\n\tgot: %s\n",
19213                                 DB_VERSION_STRING, version);
19214                         return 1;
19215                 }
19216         }
19217 #endif
19218
19219 #if DB_VERSION_MAJOR > 2
19220         db_env_create( NULL, 0 );
19221 #elif DB_VERSION_MAJOR > 1
19222         db_appexit( NULL );
19223 #else
19224         (void) dbopen( NULL, 0, 0, 0, NULL);
19225 #endif
19226
19227 ; return 0; }
19228 EOF
19229 if { (eval echo configure:19230: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19230   rm -rf conftest*
19231   ol_cv_db_db3=yes
19232 else
19233   echo "configure: failed program was:" >&5
19234   cat conftest.$ac_ext >&5
19235   rm -rf conftest*
19236   ol_cv_db_db3=no
19237 fi
19238 rm -f conftest*
19239
19240         LIBS="$ol_LIBS"
19241
19242 fi
19243
19244 echo "$ac_t""$ol_cv_db_db3" 1>&6
19245
19246         if test $ol_cv_db_db3 = yes ; then
19247                 ol_cv_lib_db=-ldb3
19248         fi
19249 fi
19250
19251 if test $ol_cv_lib_db = no ; then
19252         echo $ac_n "checking for Berkeley DB link (-ldb-3)""... $ac_c" 1>&6
19253 echo "configure:19254: checking for Berkeley DB link (-ldb-3)" >&5
19254 if eval "test \"\${ol_cv_db_db_3+set}\" = set"; then
19255   echo $ac_n "(cached) $ac_c" 1>&6
19256 else
19257   
19258         ol_DB_LIB=-ldb-3
19259         ol_LIBS=$LIBS
19260         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19261
19262         cat > conftest.$ac_ext <<EOF
19263 #line 19264 "configure"
19264 #include "confdefs.h"
19265
19266 #ifdef HAVE_DB_185_H
19267 # include <db_185.h>
19268 #else
19269 # include <db.h>
19270 #endif
19271
19272 #ifndef DB_VERSION_MAJOR
19273 # define DB_VERSION_MAJOR 1
19274 #endif
19275
19276 #ifndef NULL
19277 #define NULL ((void*)0)
19278 #endif
19279
19280 int main() {
19281
19282 #if DB_VERSION_MAJOR > 1
19283         {
19284                 char *version;
19285                 int major, minor, patch;
19286
19287                 version = db_version( &major, &minor, &patch );
19288
19289                 if( major != DB_VERSION_MAJOR ||
19290                         minor < DB_VERSION_MINOR )
19291                 {
19292                         printf("Berkeley DB version mismatch\n"
19293                                 "\texpected: %s\n\tgot: %s\n",
19294                                 DB_VERSION_STRING, version);
19295                         return 1;
19296                 }
19297         }
19298 #endif
19299
19300 #if DB_VERSION_MAJOR > 2
19301         db_env_create( NULL, 0 );
19302 #elif DB_VERSION_MAJOR > 1
19303         db_appexit( NULL );
19304 #else
19305         (void) dbopen( NULL, 0, 0, 0, NULL);
19306 #endif
19307
19308 ; return 0; }
19309 EOF
19310 if { (eval echo configure:19311: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19311   rm -rf conftest*
19312   ol_cv_db_db_3=yes
19313 else
19314   echo "configure: failed program was:" >&5
19315   cat conftest.$ac_ext >&5
19316   rm -rf conftest*
19317   ol_cv_db_db_3=no
19318 fi
19319 rm -f conftest*
19320
19321         LIBS="$ol_LIBS"
19322
19323 fi
19324
19325 echo "$ac_t""$ol_cv_db_db_3" 1>&6
19326
19327         if test $ol_cv_db_db_3 = yes ; then
19328                 ol_cv_lib_db=-ldb-3
19329         fi
19330 fi
19331
19332 if test $ol_cv_lib_db = no ; then
19333         echo $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6
19334 echo "configure:19335: checking for Berkeley DB link (-ldb2)" >&5
19335 if eval "test \"\${ol_cv_db_db2+set}\" = set"; then
19336   echo $ac_n "(cached) $ac_c" 1>&6
19337 else
19338   
19339         ol_DB_LIB=-ldb2
19340         ol_LIBS=$LIBS
19341         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19342
19343         cat > conftest.$ac_ext <<EOF
19344 #line 19345 "configure"
19345 #include "confdefs.h"
19346
19347 #ifdef HAVE_DB_185_H
19348 # include <db_185.h>
19349 #else
19350 # include <db.h>
19351 #endif
19352
19353 #ifndef DB_VERSION_MAJOR
19354 # define DB_VERSION_MAJOR 1
19355 #endif
19356
19357 #ifndef NULL
19358 #define NULL ((void*)0)
19359 #endif
19360
19361 int main() {
19362
19363 #if DB_VERSION_MAJOR > 1
19364         {
19365                 char *version;
19366                 int major, minor, patch;
19367
19368                 version = db_version( &major, &minor, &patch );
19369
19370                 if( major != DB_VERSION_MAJOR ||
19371                         minor < DB_VERSION_MINOR )
19372                 {
19373                         printf("Berkeley DB version mismatch\n"
19374                                 "\texpected: %s\n\tgot: %s\n",
19375                                 DB_VERSION_STRING, version);
19376                         return 1;
19377                 }
19378         }
19379 #endif
19380
19381 #if DB_VERSION_MAJOR > 2
19382         db_env_create( NULL, 0 );
19383 #elif DB_VERSION_MAJOR > 1
19384         db_appexit( NULL );
19385 #else
19386         (void) dbopen( NULL, 0, 0, 0, NULL);
19387 #endif
19388
19389 ; return 0; }
19390 EOF
19391 if { (eval echo configure:19392: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19392   rm -rf conftest*
19393   ol_cv_db_db2=yes
19394 else
19395   echo "configure: failed program was:" >&5
19396   cat conftest.$ac_ext >&5
19397   rm -rf conftest*
19398   ol_cv_db_db2=no
19399 fi
19400 rm -f conftest*
19401
19402         LIBS="$ol_LIBS"
19403
19404 fi
19405
19406 echo "$ac_t""$ol_cv_db_db2" 1>&6
19407
19408         if test $ol_cv_db_db2 = yes ; then
19409                 ol_cv_lib_db=-ldb2
19410         fi
19411 fi
19412
19413 if test $ol_cv_lib_db = no ; then
19414         echo $ac_n "checking for Berkeley DB link (-ldb-2)""... $ac_c" 1>&6
19415 echo "configure:19416: checking for Berkeley DB link (-ldb-2)" >&5
19416 if eval "test \"\${ol_cv_db_db_2+set}\" = set"; then
19417   echo $ac_n "(cached) $ac_c" 1>&6
19418 else
19419   
19420         ol_DB_LIB=-ldb-2
19421         ol_LIBS=$LIBS
19422         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19423
19424         cat > conftest.$ac_ext <<EOF
19425 #line 19426 "configure"
19426 #include "confdefs.h"
19427
19428 #ifdef HAVE_DB_185_H
19429 # include <db_185.h>
19430 #else
19431 # include <db.h>
19432 #endif
19433
19434 #ifndef DB_VERSION_MAJOR
19435 # define DB_VERSION_MAJOR 1
19436 #endif
19437
19438 #ifndef NULL
19439 #define NULL ((void*)0)
19440 #endif
19441
19442 int main() {
19443
19444 #if DB_VERSION_MAJOR > 1
19445         {
19446                 char *version;
19447                 int major, minor, patch;
19448
19449                 version = db_version( &major, &minor, &patch );
19450
19451                 if( major != DB_VERSION_MAJOR ||
19452                         minor < DB_VERSION_MINOR )
19453                 {
19454                         printf("Berkeley DB version mismatch\n"
19455                                 "\texpected: %s\n\tgot: %s\n",
19456                                 DB_VERSION_STRING, version);
19457                         return 1;
19458                 }
19459         }
19460 #endif
19461
19462 #if DB_VERSION_MAJOR > 2
19463         db_env_create( NULL, 0 );
19464 #elif DB_VERSION_MAJOR > 1
19465         db_appexit( NULL );
19466 #else
19467         (void) dbopen( NULL, 0, 0, 0, NULL);
19468 #endif
19469
19470 ; return 0; }
19471 EOF
19472 if { (eval echo configure:19473: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19473   rm -rf conftest*
19474   ol_cv_db_db_2=yes
19475 else
19476   echo "configure: failed program was:" >&5
19477   cat conftest.$ac_ext >&5
19478   rm -rf conftest*
19479   ol_cv_db_db_2=no
19480 fi
19481 rm -f conftest*
19482
19483         LIBS="$ol_LIBS"
19484
19485 fi
19486
19487 echo "$ac_t""$ol_cv_db_db_2" 1>&6
19488
19489         if test $ol_cv_db_db_2 = yes ; then
19490                 ol_cv_lib_db=-ldb-2
19491         fi
19492 fi
19493
19494 if test $ol_cv_lib_db = no ; then
19495         echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6
19496 echo "configure:19497: checking for Berkeley DB link (-ldb1)" >&5
19497 if eval "test \"\${ol_cv_db_db1+set}\" = set"; then
19498   echo $ac_n "(cached) $ac_c" 1>&6
19499 else
19500   
19501         ol_DB_LIB=-ldb1
19502         ol_LIBS=$LIBS
19503         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19504
19505         cat > conftest.$ac_ext <<EOF
19506 #line 19507 "configure"
19507 #include "confdefs.h"
19508
19509 #ifdef HAVE_DB_185_H
19510 # include <db_185.h>
19511 #else
19512 # include <db.h>
19513 #endif
19514
19515 #ifndef DB_VERSION_MAJOR
19516 # define DB_VERSION_MAJOR 1
19517 #endif
19518
19519 #ifndef NULL
19520 #define NULL ((void*)0)
19521 #endif
19522
19523 int main() {
19524
19525 #if DB_VERSION_MAJOR > 1
19526         {
19527                 char *version;
19528                 int major, minor, patch;
19529
19530                 version = db_version( &major, &minor, &patch );
19531
19532                 if( major != DB_VERSION_MAJOR ||
19533                         minor < DB_VERSION_MINOR )
19534                 {
19535                         printf("Berkeley DB version mismatch\n"
19536                                 "\texpected: %s\n\tgot: %s\n",
19537                                 DB_VERSION_STRING, version);
19538                         return 1;
19539                 }
19540         }
19541 #endif
19542
19543 #if DB_VERSION_MAJOR > 2
19544         db_env_create( NULL, 0 );
19545 #elif DB_VERSION_MAJOR > 1
19546         db_appexit( NULL );
19547 #else
19548         (void) dbopen( NULL, 0, 0, 0, NULL);
19549 #endif
19550
19551 ; return 0; }
19552 EOF
19553 if { (eval echo configure:19554: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19554   rm -rf conftest*
19555   ol_cv_db_db1=yes
19556 else
19557   echo "configure: failed program was:" >&5
19558   cat conftest.$ac_ext >&5
19559   rm -rf conftest*
19560   ol_cv_db_db1=no
19561 fi
19562 rm -f conftest*
19563
19564         LIBS="$ol_LIBS"
19565
19566 fi
19567
19568 echo "$ac_t""$ol_cv_db_db1" 1>&6
19569
19570         if test $ol_cv_db_db1 = yes ; then
19571                 ol_cv_lib_db=-ldb1
19572         fi
19573 fi
19574
19575 if test $ol_cv_lib_db = no ; then
19576         echo $ac_n "checking for Berkeley DB link (-ldb-1)""... $ac_c" 1>&6
19577 echo "configure:19578: checking for Berkeley DB link (-ldb-1)" >&5
19578 if eval "test \"\${ol_cv_db_db_1+set}\" = set"; then
19579   echo $ac_n "(cached) $ac_c" 1>&6
19580 else
19581   
19582         ol_DB_LIB=-ldb-1
19583         ol_LIBS=$LIBS
19584         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19585
19586         cat > conftest.$ac_ext <<EOF
19587 #line 19588 "configure"
19588 #include "confdefs.h"
19589
19590 #ifdef HAVE_DB_185_H
19591 # include <db_185.h>
19592 #else
19593 # include <db.h>
19594 #endif
19595
19596 #ifndef DB_VERSION_MAJOR
19597 # define DB_VERSION_MAJOR 1
19598 #endif
19599
19600 #ifndef NULL
19601 #define NULL ((void*)0)
19602 #endif
19603
19604 int main() {
19605
19606 #if DB_VERSION_MAJOR > 1
19607         {
19608                 char *version;
19609                 int major, minor, patch;
19610
19611                 version = db_version( &major, &minor, &patch );
19612
19613                 if( major != DB_VERSION_MAJOR ||
19614                         minor < DB_VERSION_MINOR )
19615                 {
19616                         printf("Berkeley DB version mismatch\n"
19617                                 "\texpected: %s\n\tgot: %s\n",
19618                                 DB_VERSION_STRING, version);
19619                         return 1;
19620                 }
19621         }
19622 #endif
19623
19624 #if DB_VERSION_MAJOR > 2
19625         db_env_create( NULL, 0 );
19626 #elif DB_VERSION_MAJOR > 1
19627         db_appexit( NULL );
19628 #else
19629         (void) dbopen( NULL, 0, 0, 0, NULL);
19630 #endif
19631
19632 ; return 0; }
19633 EOF
19634 if { (eval echo configure:19635: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19635   rm -rf conftest*
19636   ol_cv_db_db_1=yes
19637 else
19638   echo "configure: failed program was:" >&5
19639   cat conftest.$ac_ext >&5
19640   rm -rf conftest*
19641   ol_cv_db_db_1=no
19642 fi
19643 rm -f conftest*
19644
19645         LIBS="$ol_LIBS"
19646
19647 fi
19648
19649 echo "$ac_t""$ol_cv_db_db_1" 1>&6
19650
19651         if test $ol_cv_db_db_1 = yes ; then
19652                 ol_cv_lib_db=-ldb-1
19653         fi
19654 fi
19655
19656
19657         if test "$ol_cv_lib_db" != no ; then
19658                 ol_cv_berkeley_db=yes
19659                 echo $ac_n "checking for Berkeley DB thread support""... $ac_c" 1>&6
19660 echo "configure:19661: checking for Berkeley DB thread support" >&5
19661 if eval "test \"\${ol_cv_berkeley_db_thread+set}\" = set"; then
19662   echo $ac_n "(cached) $ac_c" 1>&6
19663 else
19664   
19665         ol_LIBS="$LIBS"
19666         LIBS="$LTHREAD_LIBS $LIBS"
19667         if test $ol_cv_lib_db != yes ; then
19668                 LIBS="$ol_cv_lib_db $LIBS"
19669         fi
19670
19671         if test "$cross_compiling" = yes; then
19672   ol_cv_berkeley_db_thread=cross
19673 else
19674   cat > conftest.$ac_ext <<EOF
19675 #line 19676 "configure"
19676 #include "confdefs.h"
19677
19678 #ifdef HAVE_DB_185_H
19679         choke me;
19680 #else
19681 #include <db.h>
19682 #endif
19683 #ifndef NULL
19684 #define NULL ((void *)0)
19685 #endif
19686 main()
19687 {
19688         int rc;
19689         u_int32_t flags = DB_CREATE |
19690 #ifdef DB_PRIVATE
19691                 DB_PRIVATE |
19692 #endif
19693                 DB_THREAD;
19694
19695 #if DB_VERSION_MAJOR > 2
19696         DB_ENV *env = NULL;
19697
19698         rc = db_env_create( &env, 0 );
19699
19700         flags |= DB_INIT_MPOOL;
19701 #ifdef DB_MPOOL_PRIVATE
19702         flags |= DB_MPOOL_PRIVATE;
19703 #endif
19704
19705         if( rc ) {
19706                 printf("BerkeleyDB: %s\n", db_strerror(rc) );
19707                 return rc;
19708         }
19709
19710 #if (DB_VERSION_MAJOR > 3) || (DB_VERSION_MINOR >= 1)
19711         rc = env->open( env, NULL, flags, 0 );
19712 #else
19713         rc = env->open( env, NULL, NULL, flags, 0 );
19714 #endif
19715
19716         if ( rc == 0 ) {
19717                 rc = env->close( env, 0 );
19718         }
19719
19720         if( rc ) {
19721                 printf("BerkeleyDB: %s\n", db_strerror(rc) );
19722                 return rc;
19723         }
19724
19725 #else
19726         DB_ENV env;
19727         memset( &env, '\0', sizeof(env) );
19728
19729         rc = db_appinit( NULL, NULL, &env, flags );
19730
19731         if( rc == 0 ) {
19732                 db_appexit( &env );
19733         }
19734
19735         unlink("__db_mpool.share");
19736         unlink("__db_lock.share");
19737 #endif
19738
19739         return rc;
19740 }
19741 EOF
19742 if { (eval echo configure:19743: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
19743 then
19744   ol_cv_berkeley_db_thread=yes
19745 else
19746   echo "configure: failed program was:" >&5
19747   cat conftest.$ac_ext >&5
19748   rm -fr conftest*
19749   ol_cv_berkeley_db_thread=no
19750 fi
19751 rm -fr conftest*
19752 fi
19753
19754
19755         LIBS="$ol_LIBS"
19756
19757 fi
19758
19759 echo "$ac_t""$ol_cv_berkeley_db_thread" 1>&6
19760
19761         if test $ol_cv_berkeley_db_thread != no ; then
19762                 cat >> confdefs.h <<\EOF
19763 #define HAVE_BERKELEY_DB_THREAD 1
19764 EOF
19765
19766         fi
19767
19768         fi
19769 fi
19770
19771         fi
19772
19773         if test $ol_cv_berkeley_db != no ; then
19774                 cat >> confdefs.h <<\EOF
19775 #define HAVE_BERKELEY_DB 1
19776 EOF
19777
19778
19779                 ol_link_ldbm=berkeley
19780                 ol_with_ldbm_api=berkeley
19781
19782                 if test $ol_with_ldbm_type = hash ; then
19783                         cat >> confdefs.h <<\EOF
19784 #define LDBM_USE_DBHASH 1
19785 EOF
19786
19787                 else
19788                         cat >> confdefs.h <<\EOF
19789 #define LDBM_USE_DBBTREE 1
19790 EOF
19791
19792                 fi
19793
19794                                                 if test $ol_cv_lib_db != yes ; then
19795                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db"
19796                 fi
19797         fi
19798 fi
19799
19800 if test $ol_enable_bdb = yes -a $ol_link_ldbm != berkeley ; then
19801         { echo "configure: error: BDB: BerkeleyDB not available" 1>&2; exit 1; }
19802 elif test $ol_enable_bdb != no -a $ol_link_ldbm = berkeley ; then
19803         echo $ac_n "checking Berkeley DB version for BDB backend""... $ac_c" 1>&6
19804 echo "configure:19805: checking Berkeley DB version for BDB backend" >&5
19805 if eval "test \"\${ol_cv_bdb_compat+set}\" = set"; then
19806   echo $ac_n "(cached) $ac_c" 1>&6
19807 else
19808   
19809         cat > conftest.$ac_ext <<EOF
19810 #line 19811 "configure"
19811 #include "confdefs.h"
19812
19813 #include <db.h>
19814
19815  /* this check could be improved */
19816 #ifndef DB_VERSION_MAJOR
19817 #       define DB_VERSION_MAJOR 1
19818 #endif
19819 #ifndef DB_VERSION_MINOR
19820 #       define DB_VERSION_MINOR 0
19821 #endif
19822
19823 /* require 4.2 or later */
19824 #if (DB_VERSION_MAJOR >= 4) && (DB_VERSION_MINOR >= 2)
19825         __db_version_compat
19826 #endif
19827         
19828 EOF
19829 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
19830   egrep "__db_version_compat" >/dev/null 2>&1; then
19831   rm -rf conftest*
19832   ol_cv_bdb_compat=yes
19833 else
19834   rm -rf conftest*
19835   ol_cv_bdb_compat=no
19836 fi
19837 rm -f conftest*
19838
19839 fi
19840
19841 echo "$ac_t""$ol_cv_bdb_compat" 1>&6
19842
19843
19844         if test $ol_cv_bdb_compat = yes ; then
19845                 ol_enable_bdb=yes
19846         elif test $ol_enable_bdb = yes ; then
19847                 { echo "configure: error: BDB: BerkeleyDB version incompatible" 1>&2; exit 1; }
19848         else
19849                 ol_enable_bdb=no
19850         fi
19851 fi
19852 if test $ol_enable_hdb = yes -a $ol_link_ldbm != berkeley ; then
19853         { echo "configure: error: HDB: BerkeleyDB not available" 1>&2; exit 1; }
19854 fi
19855
19856 if test $ol_link_ldbm = no -a $ol_with_ldbm_type = btree ; then
19857         echo "configure: warning: Could not find LDBM with BTREE support" 1>&2
19858         ol_with_ldbm_api=none
19859 fi
19860
19861 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = mdbm ; then
19862         echo $ac_n "checking for MDBM library""... $ac_c" 1>&6
19863 echo "configure:19864: checking for MDBM library" >&5
19864 if eval "test \"\${ol_cv_lib_mdbm+set}\" = set"; then
19865   echo $ac_n "(cached) $ac_c" 1>&6
19866 else
19867         ol_LIBS="$LIBS"
19868         echo $ac_n "checking for mdbm_set_chain""... $ac_c" 1>&6
19869 echo "configure:19870: checking for mdbm_set_chain" >&5
19870 if eval "test \"\${ac_cv_func_mdbm_set_chain+set}\" = set"; then
19871   echo $ac_n "(cached) $ac_c" 1>&6
19872 else
19873   cat > conftest.$ac_ext <<EOF
19874 #line 19875 "configure"
19875 #include "confdefs.h"
19876 /* System header to define __stub macros and hopefully few prototypes,
19877     which can conflict with char mdbm_set_chain(); below.  */
19878 #include <assert.h>
19879 /* Override any gcc2 internal prototype to avoid an error.  */
19880 /* We use char because int might match the return type of a gcc2
19881     builtin and then its argument prototype would still apply.  */
19882 char mdbm_set_chain();
19883 char (*f)();
19884
19885 int main() {
19886
19887 /* The GNU C library defines this for functions which it implements
19888     to always fail with ENOSYS.  Some functions are actually named
19889     something starting with __ and the normal name is an alias.  */
19890 #if defined (__stub_mdbm_set_chain) || defined (__stub___mdbm_set_chain)
19891 choke me
19892 #else
19893 f = mdbm_set_chain;
19894 #endif
19895
19896 ; return 0; }
19897 EOF
19898 if { (eval echo configure:19899: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19899   rm -rf conftest*
19900   eval "ac_cv_func_mdbm_set_chain=yes"
19901 else
19902   echo "configure: failed program was:" >&5
19903   cat conftest.$ac_ext >&5
19904   rm -rf conftest*
19905   eval "ac_cv_func_mdbm_set_chain=no"
19906 fi
19907 rm -f conftest*
19908 fi
19909
19910 if eval "test \"`echo '$ac_cv_func_'mdbm_set_chain`\" = yes"; then
19911   echo "$ac_t""yes" 1>&6
19912   ol_cv_lib_mdbm=yes
19913 else
19914   echo "$ac_t""no" 1>&6
19915
19916                 echo $ac_n "checking for mdbm_set_chain in -lmdbm""... $ac_c" 1>&6
19917 echo "configure:19918: checking for mdbm_set_chain in -lmdbm" >&5
19918 ac_lib_var=`echo mdbm'_'mdbm_set_chain | sed 'y%./+-:%__p__%'`
19919 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19920   echo $ac_n "(cached) $ac_c" 1>&6
19921 else
19922   ac_save_LIBS="$LIBS"
19923 LIBS="-lmdbm  $LIBS"
19924 cat > conftest.$ac_ext <<EOF
19925 #line 19926 "configure"
19926 #include "confdefs.h"
19927 /* Override any gcc2 internal prototype to avoid an error.  */
19928 /* We use char because int might match the return type of a gcc2
19929     builtin and then its argument prototype would still apply.  */
19930 char mdbm_set_chain();
19931
19932 int main() {
19933 mdbm_set_chain()
19934 ; return 0; }
19935 EOF
19936 if { (eval echo configure:19937: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19937   rm -rf conftest*
19938   eval "ac_cv_lib_$ac_lib_var=yes"
19939 else
19940   echo "configure: failed program was:" >&5
19941   cat conftest.$ac_ext >&5
19942   rm -rf conftest*
19943   eval "ac_cv_lib_$ac_lib_var=no"
19944 fi
19945 rm -f conftest*
19946 LIBS="$ac_save_LIBS"
19947
19948 fi
19949 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19950   echo "$ac_t""yes" 1>&6
19951   ol_cv_lib_mdbm=-lmdbm
19952 else
19953   echo "$ac_t""no" 1>&6
19954 ol_cv_lib_mdbm=no
19955 fi
19956
19957         
19958 fi
19959
19960         LIBS="$ol_LIBS"
19961
19962 fi
19963
19964 echo "$ac_t""$ol_cv_lib_mdbm" 1>&6
19965
19966
19967  for ac_hdr in mdbm.h
19968 do
19969 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
19970 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
19971 echo "configure:19972: checking for $ac_hdr" >&5
19972 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
19973   echo $ac_n "(cached) $ac_c" 1>&6
19974 else
19975   cat > conftest.$ac_ext <<EOF
19976 #line 19977 "configure"
19977 #include "confdefs.h"
19978 #include <$ac_hdr>
19979 EOF
19980 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
19981 { (eval echo configure:19982: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
19982 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
19983 if test -z "$ac_err"; then
19984   rm -rf conftest*
19985   eval "ac_cv_header_$ac_safe=yes"
19986 else
19987   echo "$ac_err" >&5
19988   echo "configure: failed program was:" >&5
19989   cat conftest.$ac_ext >&5
19990   rm -rf conftest*
19991   eval "ac_cv_header_$ac_safe=no"
19992 fi
19993 rm -f conftest*
19994 fi
19995 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
19996   echo "$ac_t""yes" 1>&6
19997     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
19998   cat >> confdefs.h <<EOF
19999 #define $ac_tr_hdr 1
20000 EOF
20001  
20002 else
20003   echo "$ac_t""no" 1>&6
20004 fi
20005 done
20006
20007  echo $ac_n "checking for db""... $ac_c" 1>&6
20008 echo "configure:20009: checking for db" >&5
20009 if eval "test \"\${ol_cv_mdbm+set}\" = set"; then
20010   echo $ac_n "(cached) $ac_c" 1>&6
20011 else
20012   
20013         if test $ol_cv_lib_mdbm = no -o $ac_cv_header_mdbm_h = no ; then
20014                 ol_cv_mdbm=no
20015         else
20016                 ol_cv_mdbm=yes
20017         fi
20018
20019 fi
20020
20021 echo "$ac_t""$ol_cv_mdbm" 1>&6
20022  if test $ol_cv_mdbm = yes ; then
20023         cat >> confdefs.h <<\EOF
20024 #define HAVE_MDBM 1
20025 EOF
20026
20027  fi
20028
20029
20030         if test $ol_cv_mdbm = yes ; then
20031                 ol_link_ldbm=mdbm
20032                 ol_with_ldbm_api=mdbm
20033                 if test $ol_cv_lib_mdbm != yes ; then
20034                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_mdbm"
20035                 fi
20036         fi
20037 fi
20038
20039 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = gdbm ; then
20040         echo $ac_n "checking for GDBM library""... $ac_c" 1>&6
20041 echo "configure:20042: checking for GDBM library" >&5
20042 if eval "test \"\${ol_cv_lib_gdbm+set}\" = set"; then
20043   echo $ac_n "(cached) $ac_c" 1>&6
20044 else
20045         ol_LIBS="$LIBS"
20046         echo $ac_n "checking for gdbm_open""... $ac_c" 1>&6
20047 echo "configure:20048: checking for gdbm_open" >&5
20048 if eval "test \"\${ac_cv_func_gdbm_open+set}\" = set"; then
20049   echo $ac_n "(cached) $ac_c" 1>&6
20050 else
20051   cat > conftest.$ac_ext <<EOF
20052 #line 20053 "configure"
20053 #include "confdefs.h"
20054 /* System header to define __stub macros and hopefully few prototypes,
20055     which can conflict with char gdbm_open(); below.  */
20056 #include <assert.h>
20057 /* Override any gcc2 internal prototype to avoid an error.  */
20058 /* We use char because int might match the return type of a gcc2
20059     builtin and then its argument prototype would still apply.  */
20060 char gdbm_open();
20061 char (*f)();
20062
20063 int main() {
20064
20065 /* The GNU C library defines this for functions which it implements
20066     to always fail with ENOSYS.  Some functions are actually named
20067     something starting with __ and the normal name is an alias.  */
20068 #if defined (__stub_gdbm_open) || defined (__stub___gdbm_open)
20069 choke me
20070 #else
20071 f = gdbm_open;
20072 #endif
20073
20074 ; return 0; }
20075 EOF
20076 if { (eval echo configure:20077: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20077   rm -rf conftest*
20078   eval "ac_cv_func_gdbm_open=yes"
20079 else
20080   echo "configure: failed program was:" >&5
20081   cat conftest.$ac_ext >&5
20082   rm -rf conftest*
20083   eval "ac_cv_func_gdbm_open=no"
20084 fi
20085 rm -f conftest*
20086 fi
20087
20088 if eval "test \"`echo '$ac_cv_func_'gdbm_open`\" = yes"; then
20089   echo "$ac_t""yes" 1>&6
20090   ol_cv_lib_gdbm=yes
20091 else
20092   echo "$ac_t""no" 1>&6
20093
20094                 echo $ac_n "checking for gdbm_open in -lgdbm""... $ac_c" 1>&6
20095 echo "configure:20096: checking for gdbm_open in -lgdbm" >&5
20096 ac_lib_var=`echo gdbm'_'gdbm_open | sed 'y%./+-:%__p__%'`
20097 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20098   echo $ac_n "(cached) $ac_c" 1>&6
20099 else
20100   ac_save_LIBS="$LIBS"
20101 LIBS="-lgdbm  $LIBS"
20102 cat > conftest.$ac_ext <<EOF
20103 #line 20104 "configure"
20104 #include "confdefs.h"
20105 /* Override any gcc2 internal prototype to avoid an error.  */
20106 /* We use char because int might match the return type of a gcc2
20107     builtin and then its argument prototype would still apply.  */
20108 char gdbm_open();
20109
20110 int main() {
20111 gdbm_open()
20112 ; return 0; }
20113 EOF
20114 if { (eval echo configure:20115: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20115   rm -rf conftest*
20116   eval "ac_cv_lib_$ac_lib_var=yes"
20117 else
20118   echo "configure: failed program was:" >&5
20119   cat conftest.$ac_ext >&5
20120   rm -rf conftest*
20121   eval "ac_cv_lib_$ac_lib_var=no"
20122 fi
20123 rm -f conftest*
20124 LIBS="$ac_save_LIBS"
20125
20126 fi
20127 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20128   echo "$ac_t""yes" 1>&6
20129   ol_cv_lib_gdbm=-lgdbm
20130 else
20131   echo "$ac_t""no" 1>&6
20132 ol_cv_lib_gdbm=no
20133 fi
20134
20135         
20136 fi
20137
20138         LIBS="$ol_LIBS"
20139
20140 fi
20141
20142 echo "$ac_t""$ol_cv_lib_gdbm" 1>&6
20143
20144
20145  for ac_hdr in gdbm.h
20146 do
20147 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
20148 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
20149 echo "configure:20150: checking for $ac_hdr" >&5
20150 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
20151   echo $ac_n "(cached) $ac_c" 1>&6
20152 else
20153   cat > conftest.$ac_ext <<EOF
20154 #line 20155 "configure"
20155 #include "confdefs.h"
20156 #include <$ac_hdr>
20157 EOF
20158 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20159 { (eval echo configure:20160: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20160 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20161 if test -z "$ac_err"; then
20162   rm -rf conftest*
20163   eval "ac_cv_header_$ac_safe=yes"
20164 else
20165   echo "$ac_err" >&5
20166   echo "configure: failed program was:" >&5
20167   cat conftest.$ac_ext >&5
20168   rm -rf conftest*
20169   eval "ac_cv_header_$ac_safe=no"
20170 fi
20171 rm -f conftest*
20172 fi
20173 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
20174   echo "$ac_t""yes" 1>&6
20175     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
20176   cat >> confdefs.h <<EOF
20177 #define $ac_tr_hdr 1
20178 EOF
20179  
20180 else
20181   echo "$ac_t""no" 1>&6
20182 fi
20183 done
20184
20185  echo $ac_n "checking for db""... $ac_c" 1>&6
20186 echo "configure:20187: checking for db" >&5
20187 if eval "test \"\${ol_cv_gdbm+set}\" = set"; then
20188   echo $ac_n "(cached) $ac_c" 1>&6
20189 else
20190   
20191         if test $ol_cv_lib_gdbm = no -o $ac_cv_header_gdbm_h = no ; then
20192                 ol_cv_gdbm=no
20193         else
20194                 ol_cv_gdbm=yes
20195         fi
20196
20197 fi
20198
20199 echo "$ac_t""$ol_cv_gdbm" 1>&6
20200  if test $ol_cv_gdbm = yes ; then
20201         cat >> confdefs.h <<\EOF
20202 #define HAVE_GDBM 1
20203 EOF
20204
20205  fi
20206
20207
20208         if test $ol_cv_gdbm = yes ; then
20209                 ol_link_ldbm=gdbm
20210                 ol_with_ldbm_api=gdbm
20211
20212                 if test $ol_cv_lib_gdbm != yes ; then
20213                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_gdbm"
20214                 fi
20215         fi
20216 fi
20217
20218 if test $ol_with_ldbm_api = ndbm ; then
20219         echo $ac_n "checking for NDBM library""... $ac_c" 1>&6
20220 echo "configure:20221: checking for NDBM library" >&5
20221 if eval "test \"\${ol_cv_lib_ndbm+set}\" = set"; then
20222   echo $ac_n "(cached) $ac_c" 1>&6
20223 else
20224         ol_LIBS="$LIBS"
20225         echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
20226 echo "configure:20227: checking for dbm_open" >&5
20227 if eval "test \"\${ac_cv_func_dbm_open+set}\" = set"; then
20228   echo $ac_n "(cached) $ac_c" 1>&6
20229 else
20230   cat > conftest.$ac_ext <<EOF
20231 #line 20232 "configure"
20232 #include "confdefs.h"
20233 /* System header to define __stub macros and hopefully few prototypes,
20234     which can conflict with char dbm_open(); below.  */
20235 #include <assert.h>
20236 /* Override any gcc2 internal prototype to avoid an error.  */
20237 /* We use char because int might match the return type of a gcc2
20238     builtin and then its argument prototype would still apply.  */
20239 char dbm_open();
20240 char (*f)();
20241
20242 int main() {
20243
20244 /* The GNU C library defines this for functions which it implements
20245     to always fail with ENOSYS.  Some functions are actually named
20246     something starting with __ and the normal name is an alias.  */
20247 #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
20248 choke me
20249 #else
20250 f = dbm_open;
20251 #endif
20252
20253 ; return 0; }
20254 EOF
20255 if { (eval echo configure:20256: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20256   rm -rf conftest*
20257   eval "ac_cv_func_dbm_open=yes"
20258 else
20259   echo "configure: failed program was:" >&5
20260   cat conftest.$ac_ext >&5
20261   rm -rf conftest*
20262   eval "ac_cv_func_dbm_open=no"
20263 fi
20264 rm -f conftest*
20265 fi
20266
20267 if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then
20268   echo "$ac_t""yes" 1>&6
20269   ol_cv_lib_ndbm=yes
20270 else
20271   echo "$ac_t""no" 1>&6
20272
20273                 echo $ac_n "checking for dbm_open in -lndbm""... $ac_c" 1>&6
20274 echo "configure:20275: checking for dbm_open in -lndbm" >&5
20275 ac_lib_var=`echo ndbm'_'dbm_open | sed 'y%./+-:%__p__%'`
20276 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20277   echo $ac_n "(cached) $ac_c" 1>&6
20278 else
20279   ac_save_LIBS="$LIBS"
20280 LIBS="-lndbm  $LIBS"
20281 cat > conftest.$ac_ext <<EOF
20282 #line 20283 "configure"
20283 #include "confdefs.h"
20284 /* Override any gcc2 internal prototype to avoid an error.  */
20285 /* We use char because int might match the return type of a gcc2
20286     builtin and then its argument prototype would still apply.  */
20287 char dbm_open();
20288
20289 int main() {
20290 dbm_open()
20291 ; return 0; }
20292 EOF
20293 if { (eval echo configure:20294: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20294   rm -rf conftest*
20295   eval "ac_cv_lib_$ac_lib_var=yes"
20296 else
20297   echo "configure: failed program was:" >&5
20298   cat conftest.$ac_ext >&5
20299   rm -rf conftest*
20300   eval "ac_cv_lib_$ac_lib_var=no"
20301 fi
20302 rm -f conftest*
20303 LIBS="$ac_save_LIBS"
20304
20305 fi
20306 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20307   echo "$ac_t""yes" 1>&6
20308   ol_cv_lib_ndbm=-lndbm
20309 else
20310   echo "$ac_t""no" 1>&6
20311
20312                         echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
20313 echo "configure:20314: checking for dbm_open in -ldbm" >&5
20314 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-:%__p__%'`
20315 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20316   echo $ac_n "(cached) $ac_c" 1>&6
20317 else
20318   ac_save_LIBS="$LIBS"
20319 LIBS="-ldbm  $LIBS"
20320 cat > conftest.$ac_ext <<EOF
20321 #line 20322 "configure"
20322 #include "confdefs.h"
20323 /* Override any gcc2 internal prototype to avoid an error.  */
20324 /* We use char because int might match the return type of a gcc2
20325     builtin and then its argument prototype would still apply.  */
20326 char dbm_open();
20327
20328 int main() {
20329 dbm_open()
20330 ; return 0; }
20331 EOF
20332 if { (eval echo configure:20333: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20333   rm -rf conftest*
20334   eval "ac_cv_lib_$ac_lib_var=yes"
20335 else
20336   echo "configure: failed program was:" >&5
20337   cat conftest.$ac_ext >&5
20338   rm -rf conftest*
20339   eval "ac_cv_lib_$ac_lib_var=no"
20340 fi
20341 rm -f conftest*
20342 LIBS="$ac_save_LIBS"
20343
20344 fi
20345 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20346   echo "$ac_t""yes" 1>&6
20347   ol_cv_lib_ndbm=-ldbm
20348 else
20349   echo "$ac_t""no" 1>&6
20350 ol_cv_lib_ndbm=no
20351 fi
20352                 
20353 fi
20354
20355         
20356 fi
20357
20358         LIBS="$ol_LIBS"
20359
20360 fi
20361
20362 echo "$ac_t""$ol_cv_lib_ndbm" 1>&6
20363
20364
20365  for ac_hdr in ndbm.h
20366 do
20367 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
20368 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
20369 echo "configure:20370: checking for $ac_hdr" >&5
20370 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
20371   echo $ac_n "(cached) $ac_c" 1>&6
20372 else
20373   cat > conftest.$ac_ext <<EOF
20374 #line 20375 "configure"
20375 #include "confdefs.h"
20376 #include <$ac_hdr>
20377 EOF
20378 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20379 { (eval echo configure:20380: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20380 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20381 if test -z "$ac_err"; then
20382   rm -rf conftest*
20383   eval "ac_cv_header_$ac_safe=yes"
20384 else
20385   echo "$ac_err" >&5
20386   echo "configure: failed program was:" >&5
20387   cat conftest.$ac_ext >&5
20388   rm -rf conftest*
20389   eval "ac_cv_header_$ac_safe=no"
20390 fi
20391 rm -f conftest*
20392 fi
20393 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
20394   echo "$ac_t""yes" 1>&6
20395     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
20396   cat >> confdefs.h <<EOF
20397 #define $ac_tr_hdr 1
20398 EOF
20399  
20400 else
20401   echo "$ac_t""no" 1>&6
20402 fi
20403 done
20404
20405  echo $ac_n "checking for db""... $ac_c" 1>&6
20406 echo "configure:20407: checking for db" >&5
20407 if eval "test \"\${ol_cv_ndbm+set}\" = set"; then
20408   echo $ac_n "(cached) $ac_c" 1>&6
20409 else
20410   
20411         if test $ol_cv_lib_ndbm = no -o $ac_cv_header_ndbm_h = no ; then
20412                 ol_cv_ndbm=no
20413         else
20414                 ol_cv_ndbm=yes
20415         fi
20416
20417 fi
20418
20419 echo "$ac_t""$ol_cv_ndbm" 1>&6
20420  if test $ol_cv_ndbm = yes ; then
20421         cat >> confdefs.h <<\EOF
20422 #define HAVE_NDBM 1
20423 EOF
20424
20425  fi
20426
20427
20428         if test $ol_cv_ndbm = yes ; then
20429                 ol_link_ldbm=ndbm
20430                 ol_with_ldbm_api=ndbm
20431
20432                 if test $ol_cv_lib_ndbm != yes ; then
20433                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_ndbm"
20434                 fi
20435         fi
20436 fi
20437
20438 if test $ol_link_ldbm = no -a $ol_enable_ldbm != no ; then
20439         echo "configure: warning: could not find suitable LDBM backend" 1>&2
20440         if test $ol_enable_ldbm = yes ; then
20441                 { echo "configure: error: select appropriate LDBM options or disable" 1>&2; exit 1; }
20442         fi
20443
20444         echo "configure: warning: disabling LDBM" 1>&2
20445         ol_enable_ldbm=no
20446 fi
20447
20448
20449 if test $ol_enable_dynamic = yes -a $enable_shared = yes ; then
20450         BUILD_LIBS_DYNAMIC=shared
20451         cat >> confdefs.h <<\EOF
20452 #define LDAP_LIBS_DYNAMIC 1
20453 EOF
20454
20455         LTSTATIC=""
20456 else
20457         BUILD_LIBS_DYNAMIC=static
20458         LTSTATIC="-static"
20459 fi
20460
20461 if test $ol_enable_wrappers != no ; then
20462         for ac_hdr in tcpd.h
20463 do
20464 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
20465 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
20466 echo "configure:20467: checking for $ac_hdr" >&5
20467 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
20468   echo $ac_n "(cached) $ac_c" 1>&6
20469 else
20470   cat > conftest.$ac_ext <<EOF
20471 #line 20472 "configure"
20472 #include "confdefs.h"
20473 #include <$ac_hdr>
20474 EOF
20475 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20476 { (eval echo configure:20477: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20477 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20478 if test -z "$ac_err"; then
20479   rm -rf conftest*
20480   eval "ac_cv_header_$ac_safe=yes"
20481 else
20482   echo "$ac_err" >&5
20483   echo "configure: failed program was:" >&5
20484   cat conftest.$ac_ext >&5
20485   rm -rf conftest*
20486   eval "ac_cv_header_$ac_safe=no"
20487 fi
20488 rm -f conftest*
20489 fi
20490 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
20491   echo "$ac_t""yes" 1>&6
20492     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
20493   cat >> confdefs.h <<EOF
20494 #define $ac_tr_hdr 1
20495 EOF
20496  
20497                 echo $ac_n "checking for TCP wrappers library""... $ac_c" 1>&6
20498 echo "configure:20499: checking for TCP wrappers library" >&5
20499                 save_LIBS="$LIBS"
20500                 LIBS="$LIBS -lwrap"
20501                 cat > conftest.$ac_ext <<EOF
20502 #line 20503 "configure"
20503 #include "confdefs.h"
20504
20505 #include <tcpd.h>
20506 int allow_severity = 0;
20507 int deny_severity  = 0;
20508
20509 struct request_info *req;
20510                 
20511 int main() {
20512
20513 hosts_access(req)
20514                 
20515 ; return 0; }
20516 EOF
20517 if { (eval echo configure:20518: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20518   rm -rf conftest*
20519   echo "$ac_t""-lwrap" 1>&6
20520                 have_wrappers=yes
20521                 LIBS="$save_LIBS"
20522 else
20523   echo "configure: failed program was:" >&5
20524   cat conftest.$ac_ext >&5
20525   rm -rf conftest*
20526   
20527                                 LIBS="$LIBS -lnsl"
20528                 cat > conftest.$ac_ext <<EOF
20529 #line 20530 "configure"
20530 #include "confdefs.h"
20531
20532 #include <tcpd.h>
20533 int allow_severity = 0;
20534 int deny_severity  = 0;
20535
20536 struct request_info *req;
20537                 
20538 int main() {
20539
20540 hosts_access(req)
20541                 
20542 ; return 0; }
20543 EOF
20544 if { (eval echo configure:20545: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20545   rm -rf conftest*
20546   echo "$ac_t""-lwrap -lnsl" 1>&6
20547                 have_wrappers=yes
20548                 LIBS="$save_LIBS -lnsl"
20549 else
20550   echo "configure: failed program was:" >&5
20551   cat conftest.$ac_ext >&5
20552   rm -rf conftest*
20553   
20554                 echo "$ac_t""no" 1>&6
20555                 have_wrappers=no
20556                 LIBS=$save_LIBS
20557 fi
20558 rm -f conftest*
20559 fi
20560 rm -f conftest*
20561 else
20562   echo "$ac_t""no" 1>&6
20563 have_wrappers=no
20564 fi
20565 done
20566
20567
20568         if test $have_wrappers = yes ; then
20569                 cat >> confdefs.h <<\EOF
20570 #define HAVE_TCPD 1
20571 EOF
20572
20573                 WRAP_LIBS="-lwrap"
20574         elif test $ol_enable_wrappers = yes ; then
20575                 { echo "configure: error: could not find TCP wrappers, select apppropriate options or disable" 1>&2; exit 1; }
20576         else
20577                 echo "configure: warning: could not find TCP wrappers, support disabled" 1>&2
20578                 WRAP_LIBS=""
20579         fi
20580 fi
20581
20582 if test $ol_enable_syslog != no ; then
20583         echo $ac_n "checking for openlog""... $ac_c" 1>&6
20584 echo "configure:20585: checking for openlog" >&5
20585 if eval "test \"\${ac_cv_func_openlog+set}\" = set"; then
20586   echo $ac_n "(cached) $ac_c" 1>&6
20587 else
20588   cat > conftest.$ac_ext <<EOF
20589 #line 20590 "configure"
20590 #include "confdefs.h"
20591 /* System header to define __stub macros and hopefully few prototypes,
20592     which can conflict with char openlog(); below.  */
20593 #include <assert.h>
20594 /* Override any gcc2 internal prototype to avoid an error.  */
20595 /* We use char because int might match the return type of a gcc2
20596     builtin and then its argument prototype would still apply.  */
20597 char openlog();
20598 char (*f)();
20599
20600 int main() {
20601
20602 /* The GNU C library defines this for functions which it implements
20603     to always fail with ENOSYS.  Some functions are actually named
20604     something starting with __ and the normal name is an alias.  */
20605 #if defined (__stub_openlog) || defined (__stub___openlog)
20606 choke me
20607 #else
20608 f = openlog;
20609 #endif
20610
20611 ; return 0; }
20612 EOF
20613 if { (eval echo configure:20614: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20614   rm -rf conftest*
20615   eval "ac_cv_func_openlog=yes"
20616 else
20617   echo "configure: failed program was:" >&5
20618   cat conftest.$ac_ext >&5
20619   rm -rf conftest*
20620   eval "ac_cv_func_openlog=no"
20621 fi
20622 rm -f conftest*
20623 fi
20624
20625 if eval "test \"`echo '$ac_cv_func_'openlog`\" = yes"; then
20626   echo "$ac_t""yes" 1>&6
20627   :
20628 else
20629   echo "$ac_t""no" 1>&6
20630 fi
20631
20632         if test $ac_cv_func_openlog = no -a $ol_enable_syslog = yes; then
20633                 { echo "configure: error: could not find syslog" 1>&2; exit 1; }
20634         fi
20635         ol_enable_syslog=$ac_cv_func_openlog
20636 fi
20637
20638
20639 ol_link_sql=no
20640 if test $ol_enable_sql != no ; then
20641         for ac_hdr in sql.h sqlext.h
20642 do
20643 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
20644 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
20645 echo "configure:20646: checking for $ac_hdr" >&5
20646 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
20647   echo $ac_n "(cached) $ac_c" 1>&6
20648 else
20649   cat > conftest.$ac_ext <<EOF
20650 #line 20651 "configure"
20651 #include "confdefs.h"
20652 #include <$ac_hdr>
20653 EOF
20654 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20655 { (eval echo configure:20656: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20656 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20657 if test -z "$ac_err"; then
20658   rm -rf conftest*
20659   eval "ac_cv_header_$ac_safe=yes"
20660 else
20661   echo "$ac_err" >&5
20662   echo "configure: failed program was:" >&5
20663   cat conftest.$ac_ext >&5
20664   rm -rf conftest*
20665   eval "ac_cv_header_$ac_safe=no"
20666 fi
20667 rm -f conftest*
20668 fi
20669 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
20670   echo "$ac_t""yes" 1>&6
20671     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
20672   cat >> confdefs.h <<EOF
20673 #define $ac_tr_hdr 1
20674 EOF
20675  
20676 else
20677   echo "$ac_t""no" 1>&6
20678 { echo "configure: error: could not locate SQL headers" 1>&2; exit 1; }
20679         
20680 fi
20681 done
20682
20683
20684         echo $ac_n "checking for SQLDriverConnect in -liodbc""... $ac_c" 1>&6
20685 echo "configure:20686: checking for SQLDriverConnect in -liodbc" >&5
20686 ac_lib_var=`echo iodbc'_'SQLDriverConnect | sed 'y%./+-:%__p__%'`
20687 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20688   echo $ac_n "(cached) $ac_c" 1>&6
20689 else
20690   ac_save_LIBS="$LIBS"
20691 LIBS="-liodbc  $LIBS"
20692 cat > conftest.$ac_ext <<EOF
20693 #line 20694 "configure"
20694 #include "confdefs.h"
20695 /* Override any gcc2 internal prototype to avoid an error.  */
20696 /* We use char because int might match the return type of a gcc2
20697     builtin and then its argument prototype would still apply.  */
20698 char SQLDriverConnect();
20699
20700 int main() {
20701 SQLDriverConnect()
20702 ; return 0; }
20703 EOF
20704 if { (eval echo configure:20705: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20705   rm -rf conftest*
20706   eval "ac_cv_lib_$ac_lib_var=yes"
20707 else
20708   echo "configure: failed program was:" >&5
20709   cat conftest.$ac_ext >&5
20710   rm -rf conftest*
20711   eval "ac_cv_lib_$ac_lib_var=no"
20712 fi
20713 rm -f conftest*
20714 LIBS="$ac_save_LIBS"
20715
20716 fi
20717 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20718   echo "$ac_t""yes" 1>&6
20719   have_iodbc=yes
20720 else
20721   echo "$ac_t""no" 1>&6
20722 have_iodbc=no
20723 fi
20724
20725         if test $have_iodbc = yes ; then
20726                 ol_link_sql="-liodbc"
20727         else
20728                 echo $ac_n "checking for SQLDriverConnect in -lodbc""... $ac_c" 1>&6
20729 echo "configure:20730: checking for SQLDriverConnect in -lodbc" >&5
20730 ac_lib_var=`echo odbc'_'SQLDriverConnect | sed 'y%./+-:%__p__%'`
20731 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20732   echo $ac_n "(cached) $ac_c" 1>&6
20733 else
20734   ac_save_LIBS="$LIBS"
20735 LIBS="-lodbc  $LIBS"
20736 cat > conftest.$ac_ext <<EOF
20737 #line 20738 "configure"
20738 #include "confdefs.h"
20739 /* Override any gcc2 internal prototype to avoid an error.  */
20740 /* We use char because int might match the return type of a gcc2
20741     builtin and then its argument prototype would still apply.  */
20742 char SQLDriverConnect();
20743
20744 int main() {
20745 SQLDriverConnect()
20746 ; return 0; }
20747 EOF
20748 if { (eval echo configure:20749: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20749   rm -rf conftest*
20750   eval "ac_cv_lib_$ac_lib_var=yes"
20751 else
20752   echo "configure: failed program was:" >&5
20753   cat conftest.$ac_ext >&5
20754   rm -rf conftest*
20755   eval "ac_cv_lib_$ac_lib_var=no"
20756 fi
20757 rm -f conftest*
20758 LIBS="$ac_save_LIBS"
20759
20760 fi
20761 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20762   echo "$ac_t""yes" 1>&6
20763   have_odbc=yes
20764 else
20765   echo "$ac_t""no" 1>&6
20766 have_odbc=no
20767 fi
20768
20769                 if test $have_odbc = yes ; then
20770                         ol_link_sql="-lodbc"
20771                 fi
20772         fi
20773
20774         if test $ol_link_sql != no ; then
20775                 SLAPD_SQL_LIBS="$ol_link_sql"
20776
20777         elif test $ol_enable_sql != auto ; then
20778                 { echo "configure: error: could not locate suitable ODBC library" 1>&2; exit 1; }
20779         fi
20780 fi
20781
20782 ol_link_sasl=no
20783 ol_link_spasswd=no
20784 if test $ol_with_cyrus_sasl != no ; then
20785         for ac_hdr in sasl/sasl.h sasl.h
20786 do
20787 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
20788 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
20789 echo "configure:20790: checking for $ac_hdr" >&5
20790 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
20791   echo $ac_n "(cached) $ac_c" 1>&6
20792 else
20793   cat > conftest.$ac_ext <<EOF
20794 #line 20795 "configure"
20795 #include "confdefs.h"
20796 #include <$ac_hdr>
20797 EOF
20798 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20799 { (eval echo configure:20800: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20800 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20801 if test -z "$ac_err"; then
20802   rm -rf conftest*
20803   eval "ac_cv_header_$ac_safe=yes"
20804 else
20805   echo "$ac_err" >&5
20806   echo "configure: failed program was:" >&5
20807   cat conftest.$ac_ext >&5
20808   rm -rf conftest*
20809   eval "ac_cv_header_$ac_safe=no"
20810 fi
20811 rm -f conftest*
20812 fi
20813 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
20814   echo "$ac_t""yes" 1>&6
20815     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
20816   cat >> confdefs.h <<EOF
20817 #define $ac_tr_hdr 1
20818 EOF
20819  
20820 else
20821   echo "$ac_t""no" 1>&6
20822 fi
20823 done
20824
20825
20826         if test $ac_cv_header_sasl_sasl_h = yes -o $ac_cv_header_sasl_h = yes; then
20827                 echo $ac_n "checking for sasl_client_init in -lsasl2""... $ac_c" 1>&6
20828 echo "configure:20829: checking for sasl_client_init in -lsasl2" >&5
20829 ac_lib_var=`echo sasl2'_'sasl_client_init | sed 'y%./+-:%__p__%'`
20830 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20831   echo $ac_n "(cached) $ac_c" 1>&6
20832 else
20833   ac_save_LIBS="$LIBS"
20834 LIBS="-lsasl2  $LIBS"
20835 cat > conftest.$ac_ext <<EOF
20836 #line 20837 "configure"
20837 #include "confdefs.h"
20838 /* Override any gcc2 internal prototype to avoid an error.  */
20839 /* We use char because int might match the return type of a gcc2
20840     builtin and then its argument prototype would still apply.  */
20841 char sasl_client_init();
20842
20843 int main() {
20844 sasl_client_init()
20845 ; return 0; }
20846 EOF
20847 if { (eval echo configure:20848: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20848   rm -rf conftest*
20849   eval "ac_cv_lib_$ac_lib_var=yes"
20850 else
20851   echo "configure: failed program was:" >&5
20852   cat conftest.$ac_ext >&5
20853   rm -rf conftest*
20854   eval "ac_cv_lib_$ac_lib_var=no"
20855 fi
20856 rm -f conftest*
20857 LIBS="$ac_save_LIBS"
20858
20859 fi
20860 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20861   echo "$ac_t""yes" 1>&6
20862   ol_link_sasl="-lsasl2"
20863 else
20864   echo "$ac_t""no" 1>&6
20865 echo $ac_n "checking for sasl_client_init in -lsasl""... $ac_c" 1>&6
20866 echo "configure:20867: checking for sasl_client_init in -lsasl" >&5
20867 ac_lib_var=`echo sasl'_'sasl_client_init | sed 'y%./+-:%__p__%'`
20868 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20869   echo $ac_n "(cached) $ac_c" 1>&6
20870 else
20871   ac_save_LIBS="$LIBS"
20872 LIBS="-lsasl  $LIBS"
20873 cat > conftest.$ac_ext <<EOF
20874 #line 20875 "configure"
20875 #include "confdefs.h"
20876 /* Override any gcc2 internal prototype to avoid an error.  */
20877 /* We use char because int might match the return type of a gcc2
20878     builtin and then its argument prototype would still apply.  */
20879 char sasl_client_init();
20880
20881 int main() {
20882 sasl_client_init()
20883 ; return 0; }
20884 EOF
20885 if { (eval echo configure:20886: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20886   rm -rf conftest*
20887   eval "ac_cv_lib_$ac_lib_var=yes"
20888 else
20889   echo "configure: failed program was:" >&5
20890   cat conftest.$ac_ext >&5
20891   rm -rf conftest*
20892   eval "ac_cv_lib_$ac_lib_var=no"
20893 fi
20894 rm -f conftest*
20895 LIBS="$ac_save_LIBS"
20896
20897 fi
20898 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20899   echo "$ac_t""yes" 1>&6
20900   ol_link_sasl="-lsasl"
20901 else
20902   echo "$ac_t""no" 1>&6
20903 fi
20904
20905 fi
20906
20907         fi
20908
20909         if test $ol_link_sasl = no ; then
20910                 if test $ol_with_cyrus_sasl != auto ; then
20911                         { echo "configure: error: Could not locate Cyrus SASL" 1>&2; exit 1; }
20912                 else
20913                         echo "configure: warning: Could not locate Cyrus SASL" 1>&2
20914                         echo "configure: warning: SASL authentication not supported!" 1>&2
20915                         if test $ol_link_tls = no ; then
20916                                 echo "configure: warning: Strong authentication not supported!" 1>&2
20917                         fi
20918                 fi
20919         else
20920                 echo $ac_n "checking Cyrus SASL library version""... $ac_c" 1>&6
20921 echo "configure:20922: checking Cyrus SASL library version" >&5
20922 if eval "test \"\${ol_cv_sasl_compat+set}\" = set"; then
20923   echo $ac_n "(cached) $ac_c" 1>&6
20924 else
20925   
20926         cat > conftest.$ac_ext <<EOF
20927 #line 20928 "configure"
20928 #include "confdefs.h"
20929
20930 #ifdef HAVE_SASL_SASL_H
20931 #include <sasl/sasl.h>
20932 #else
20933 #include <sasl.h>
20934 #endif
20935
20936 /* Require 2.1.15+ */
20937 #if SASL_VERSION_MAJOR == 2  && SASL_VERSION_MINOR > 1
20938         char *__sasl_compat = "2.2+ or better okay (we guess)";
20939 #elif SASL_VERSION_MAJOR == 2  && SASL_VERSION_MINOR == 1 \
20940         && SASL_VERSION_STEP >=15
20941         char *__sasl_compat = "2.1.15+ or better okay";
20942 #endif
20943         
20944 EOF
20945 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20946   egrep "__sasl_compat" >/dev/null 2>&1; then
20947   rm -rf conftest*
20948   ol_cv_sasl_compat=yes
20949 else
20950   rm -rf conftest*
20951   ol_cv_sasl_compat=no
20952 fi
20953 rm -f conftest*
20954
20955 fi
20956
20957 echo "$ac_t""$ol_cv_sasl_compat" 1>&6
20958
20959                 if test $ol_cv_sasl_compat = no ; then
20960                         ol_link_sasl=no
20961                         { echo "configure: error: Cyrus SASL library located but incompatible" 1>&2; exit 1; }
20962                 fi
20963
20964                 cat >> confdefs.h <<\EOF
20965 #define HAVE_CYRUS_SASL 1
20966 EOF
20967
20968                 SASL_LIBS="$ol_link_sasl"
20969                 if test $ol_enable_spasswd != no ; then
20970                         ol_link_spasswd=yes
20971                 fi
20972
20973                 ac_save_LIBS="$LIBS"
20974                 LIBS="$LIBS $ol_link_sasl"
20975                 echo $ac_n "checking for sasl_version""... $ac_c" 1>&6
20976 echo "configure:20977: checking for sasl_version" >&5
20977 if eval "test \"\${ac_cv_func_sasl_version+set}\" = set"; then
20978   echo $ac_n "(cached) $ac_c" 1>&6
20979 else
20980   cat > conftest.$ac_ext <<EOF
20981 #line 20982 "configure"
20982 #include "confdefs.h"
20983 /* System header to define __stub macros and hopefully few prototypes,
20984     which can conflict with char sasl_version(); below.  */
20985 #include <assert.h>
20986 /* Override any gcc2 internal prototype to avoid an error.  */
20987 /* We use char because int might match the return type of a gcc2
20988     builtin and then its argument prototype would still apply.  */
20989 char sasl_version();
20990 char (*f)();
20991
20992 int main() {
20993
20994 /* The GNU C library defines this for functions which it implements
20995     to always fail with ENOSYS.  Some functions are actually named
20996     something starting with __ and the normal name is an alias.  */
20997 #if defined (__stub_sasl_version) || defined (__stub___sasl_version)
20998 choke me
20999 #else
21000 f = sasl_version;
21001 #endif
21002
21003 ; return 0; }
21004 EOF
21005 if { (eval echo configure:21006: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21006   rm -rf conftest*
21007   eval "ac_cv_func_sasl_version=yes"
21008 else
21009   echo "configure: failed program was:" >&5
21010   cat conftest.$ac_ext >&5
21011   rm -rf conftest*
21012   eval "ac_cv_func_sasl_version=no"
21013 fi
21014 rm -f conftest*
21015 fi
21016
21017 if eval "test \"`echo '$ac_cv_func_'sasl_version`\" = yes"; then
21018   echo "$ac_t""yes" 1>&6
21019   cat >> confdefs.h <<\EOF
21020 #define HAVE_SASL_VERSION 1
21021 EOF
21022
21023 else
21024   echo "$ac_t""no" 1>&6
21025 fi
21026
21027                 LIBS="$ac_save_LIBS"
21028         fi
21029
21030 else
21031         echo "configure: warning: SASL authentication not supported!" 1>&2
21032         if test $ol_link_tls = no ; then
21033                 echo "configure: warning: Strong authentication not supported!" 1>&2
21034         fi
21035 fi
21036
21037 if test $cross_compiling != yes -a "$ac_cv_mingw32" != yes ; then
21038         dev=no
21039         if test -r /dev/urandom ; then
21040                 dev="/dev/urandom";
21041         elif test -r /idev/urandom ; then
21042                 dev="/idev/urandom";
21043         elif test -r /dev/srandom ; then
21044                 dev="/dev/srandom";
21045         elif test -r /dev/random ; then
21046                 dev="/dev/random";
21047         elif test -r /idev/random ; then
21048                 dev="/idev/random";
21049         fi
21050
21051         if test $dev != no ; then
21052                 cat >> confdefs.h <<EOF
21053 #define URANDOM_DEVICE "$dev"
21054 EOF
21055
21056         fi
21057 fi
21058
21059 ol_link_fetch=no
21060 if test $ol_with_fetch != no ; then
21061         ol_LIBS=$LIBS
21062 LIBS="-lfetch -lcom_err $LIBS"
21063 echo $ac_n "checking fetch(3) library""... $ac_c" 1>&6
21064 echo "configure:21065: checking fetch(3) library" >&5
21065 if eval "test \"\${ol_cv_lib_fetch+set}\" = set"; then
21066   echo $ac_n "(cached) $ac_c" 1>&6
21067 else
21068   
21069         cat > conftest.$ac_ext <<EOF
21070 #line 21071 "configure"
21071 #include "confdefs.h"
21072
21073 #include <sys/param.h>
21074 #include <stdio.h>
21075 #include <fetch.h>
21076 int main() {
21077 struct url *u = fetchParseURL("file:///"); 
21078 ; return 0; }
21079 EOF
21080 if { (eval echo configure:21081: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21081   rm -rf conftest*
21082   ol_cv_lib_fetch=yes
21083 else
21084   echo "configure: failed program was:" >&5
21085   cat conftest.$ac_ext >&5
21086   rm -rf conftest*
21087   ol_cv_lib_fetch=no
21088 fi
21089 rm -f conftest*
21090 fi
21091
21092 echo "$ac_t""$ol_cv_lib_fetch" 1>&6
21093 LIBS=$ol_LIBS
21094 if test $ol_cv_lib_fetch != no ; then
21095         ol_link_fetch="-lfetch -lcom_err"
21096         cat >> confdefs.h <<\EOF
21097 #define HAVE_FETCH 1
21098 EOF
21099
21100 fi
21101
21102
21103         if test $ol_cv_lib_fetch != no ; then
21104                 LUTIL_LIBS="$LUTIL_LIBS $ol_link_fetch"
21105                 ol_link_fetch=freebsd
21106
21107         elif test $ol_with_fetch != auto ; then
21108                 { echo "configure: error: no suitable API for --with-fetch=$ol_with_fetch" 1>&2; exit 1; }
21109         fi 
21110 fi
21111
21112 if test $ol_enable_crypt != no ; then
21113         save_LIBS="$LIBS"
21114         LIBS="$TLS_LIBS $LIBS"
21115
21116         echo $ac_n "checking for crypt""... $ac_c" 1>&6
21117 echo "configure:21118: checking for crypt" >&5
21118 if eval "test \"\${ac_cv_func_crypt+set}\" = set"; then
21119   echo $ac_n "(cached) $ac_c" 1>&6
21120 else
21121   cat > conftest.$ac_ext <<EOF
21122 #line 21123 "configure"
21123 #include "confdefs.h"
21124 /* System header to define __stub macros and hopefully few prototypes,
21125     which can conflict with char crypt(); below.  */
21126 #include <assert.h>
21127 /* Override any gcc2 internal prototype to avoid an error.  */
21128 /* We use char because int might match the return type of a gcc2
21129     builtin and then its argument prototype would still apply.  */
21130 char crypt();
21131 char (*f)();
21132
21133 int main() {
21134
21135 /* The GNU C library defines this for functions which it implements
21136     to always fail with ENOSYS.  Some functions are actually named
21137     something starting with __ and the normal name is an alias.  */
21138 #if defined (__stub_crypt) || defined (__stub___crypt)
21139 choke me
21140 #else
21141 f = crypt;
21142 #endif
21143
21144 ; return 0; }
21145 EOF
21146 if { (eval echo configure:21147: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21147   rm -rf conftest*
21148   eval "ac_cv_func_crypt=yes"
21149 else
21150   echo "configure: failed program was:" >&5
21151   cat conftest.$ac_ext >&5
21152   rm -rf conftest*
21153   eval "ac_cv_func_crypt=no"
21154 fi
21155 rm -f conftest*
21156 fi
21157
21158 if eval "test \"`echo '$ac_cv_func_'crypt`\" = yes"; then
21159   echo "$ac_t""yes" 1>&6
21160   have_crypt=yes
21161 else
21162   echo "$ac_t""no" 1>&6
21163
21164                 LIBS="$save_LIBS"
21165                 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
21166 echo "configure:21167: checking for crypt in -lcrypt" >&5
21167 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-:%__p__%'`
21168 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
21169   echo $ac_n "(cached) $ac_c" 1>&6
21170 else
21171   ac_save_LIBS="$LIBS"
21172 LIBS="-lcrypt  $LIBS"
21173 cat > conftest.$ac_ext <<EOF
21174 #line 21175 "configure"
21175 #include "confdefs.h"
21176 /* Override any gcc2 internal prototype to avoid an error.  */
21177 /* We use char because int might match the return type of a gcc2
21178     builtin and then its argument prototype would still apply.  */
21179 char crypt();
21180
21181 int main() {
21182 crypt()
21183 ; return 0; }
21184 EOF
21185 if { (eval echo configure:21186: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21186   rm -rf conftest*
21187   eval "ac_cv_lib_$ac_lib_var=yes"
21188 else
21189   echo "configure: failed program was:" >&5
21190   cat conftest.$ac_ext >&5
21191   rm -rf conftest*
21192   eval "ac_cv_lib_$ac_lib_var=no"
21193 fi
21194 rm -f conftest*
21195 LIBS="$ac_save_LIBS"
21196
21197 fi
21198 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
21199   echo "$ac_t""yes" 1>&6
21200   LUTIL_LIBS="$LUTIL_LIBS -lcrypt"
21201                         have_crypt=yes
21202 else
21203   echo "$ac_t""no" 1>&6
21204 have_crypt=no
21205 fi
21206
21207 fi
21208
21209
21210         LIBS="$save_LIBS"
21211
21212         if test $have_crypt = yes ; then
21213                 cat >> confdefs.h <<\EOF
21214 #define HAVE_CRYPT 1
21215 EOF
21216
21217         else
21218                 echo "configure: warning: could not find crypt" 1>&2
21219                 if test $ol_enable_crypt = yes ; then
21220                         { echo "configure: error: could not find crypt" 1>&2; exit 1; }
21221                 fi
21222
21223                 echo "configure: warning: disabling crypt support" 1>&2
21224                 ol_enable_crypt=no
21225         fi
21226 fi
21227
21228 if test $ol_enable_proctitle != no ; then
21229         echo $ac_n "checking for setproctitle""... $ac_c" 1>&6
21230 echo "configure:21231: checking for setproctitle" >&5
21231 if eval "test \"\${ac_cv_func_setproctitle+set}\" = set"; then
21232   echo $ac_n "(cached) $ac_c" 1>&6
21233 else
21234   cat > conftest.$ac_ext <<EOF
21235 #line 21236 "configure"
21236 #include "confdefs.h"
21237 /* System header to define __stub macros and hopefully few prototypes,
21238     which can conflict with char setproctitle(); below.  */
21239 #include <assert.h>
21240 /* Override any gcc2 internal prototype to avoid an error.  */
21241 /* We use char because int might match the return type of a gcc2
21242     builtin and then its argument prototype would still apply.  */
21243 char setproctitle();
21244 char (*f)();
21245
21246 int main() {
21247
21248 /* The GNU C library defines this for functions which it implements
21249     to always fail with ENOSYS.  Some functions are actually named
21250     something starting with __ and the normal name is an alias.  */
21251 #if defined (__stub_setproctitle) || defined (__stub___setproctitle)
21252 choke me
21253 #else
21254 f = setproctitle;
21255 #endif
21256
21257 ; return 0; }
21258 EOF
21259 if { (eval echo configure:21260: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21260   rm -rf conftest*
21261   eval "ac_cv_func_setproctitle=yes"
21262 else
21263   echo "configure: failed program was:" >&5
21264   cat conftest.$ac_ext >&5
21265   rm -rf conftest*
21266   eval "ac_cv_func_setproctitle=no"
21267 fi
21268 rm -f conftest*
21269 fi
21270
21271 if eval "test \"`echo '$ac_cv_func_'setproctitle`\" = yes"; then
21272   echo "$ac_t""yes" 1>&6
21273   have_setproctitle=yes
21274 else
21275   echo "$ac_t""no" 1>&6
21276
21277                 echo $ac_n "checking for setproctitle in -lutil""... $ac_c" 1>&6
21278 echo "configure:21279: checking for setproctitle in -lutil" >&5
21279 ac_lib_var=`echo util'_'setproctitle | sed 'y%./+-:%__p__%'`
21280 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
21281   echo $ac_n "(cached) $ac_c" 1>&6
21282 else
21283   ac_save_LIBS="$LIBS"
21284 LIBS="-lutil  $LIBS"
21285 cat > conftest.$ac_ext <<EOF
21286 #line 21287 "configure"
21287 #include "confdefs.h"
21288 /* Override any gcc2 internal prototype to avoid an error.  */
21289 /* We use char because int might match the return type of a gcc2
21290     builtin and then its argument prototype would still apply.  */
21291 char setproctitle();
21292
21293 int main() {
21294 setproctitle()
21295 ; return 0; }
21296 EOF
21297 if { (eval echo configure:21298: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21298   rm -rf conftest*
21299   eval "ac_cv_lib_$ac_lib_var=yes"
21300 else
21301   echo "configure: failed program was:" >&5
21302   cat conftest.$ac_ext >&5
21303   rm -rf conftest*
21304   eval "ac_cv_lib_$ac_lib_var=no"
21305 fi
21306 rm -f conftest*
21307 LIBS="$ac_save_LIBS"
21308
21309 fi
21310 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
21311   echo "$ac_t""yes" 1>&6
21312   have_setproctitle=yes
21313                         LUTIL_LIBS="$LUTIL_LIBS -lutil"
21314 else
21315   echo "$ac_t""no" 1>&6
21316 have_setproctitle=no
21317                         LIBOBJS="$LIBOBJS setproctitle.o"
21318                         LIBSRCS="$LIBSRCS setproctitle.c"
21319 fi
21320
21321 fi
21322
21323
21324         if test $have_setproctitle = yes ; then
21325                 cat >> confdefs.h <<\EOF
21326 #define HAVE_SETPROCTITLE 1
21327 EOF
21328
21329         fi
21330 fi
21331
21332 if test $ol_enable_slp != no ; then
21333         for ac_hdr in slp.h 
21334 do
21335 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
21336 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
21337 echo "configure:21338: checking for $ac_hdr" >&5
21338 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
21339   echo $ac_n "(cached) $ac_c" 1>&6
21340 else
21341   cat > conftest.$ac_ext <<EOF
21342 #line 21343 "configure"
21343 #include "confdefs.h"
21344 #include <$ac_hdr>
21345 EOF
21346 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
21347 { (eval echo configure:21348: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
21348 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
21349 if test -z "$ac_err"; then
21350   rm -rf conftest*
21351   eval "ac_cv_header_$ac_safe=yes"
21352 else
21353   echo "$ac_err" >&5
21354   echo "configure: failed program was:" >&5
21355   cat conftest.$ac_ext >&5
21356   rm -rf conftest*
21357   eval "ac_cv_header_$ac_safe=no"
21358 fi
21359 rm -f conftest*
21360 fi
21361 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
21362   echo "$ac_t""yes" 1>&6
21363     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
21364   cat >> confdefs.h <<EOF
21365 #define $ac_tr_hdr 1
21366 EOF
21367  
21368 else
21369   echo "$ac_t""no" 1>&6
21370 fi
21371 done
21372
21373
21374         if test $ac_cv_header_slp_h = yes ; then
21375                 echo $ac_n "checking for SLPOpen in -lslp""... $ac_c" 1>&6
21376 echo "configure:21377: checking for SLPOpen in -lslp" >&5
21377 ac_lib_var=`echo slp'_'SLPOpen | sed 'y%./+-:%__p__%'`
21378 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
21379   echo $ac_n "(cached) $ac_c" 1>&6
21380 else
21381   ac_save_LIBS="$LIBS"
21382 LIBS="-lslp  $LIBS"
21383 cat > conftest.$ac_ext <<EOF
21384 #line 21385 "configure"
21385 #include "confdefs.h"
21386 /* Override any gcc2 internal prototype to avoid an error.  */
21387 /* We use char because int might match the return type of a gcc2
21388     builtin and then its argument prototype would still apply.  */
21389 char SLPOpen();
21390
21391 int main() {
21392 SLPOpen()
21393 ; return 0; }
21394 EOF
21395 if { (eval echo configure:21396: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21396   rm -rf conftest*
21397   eval "ac_cv_lib_$ac_lib_var=yes"
21398 else
21399   echo "configure: failed program was:" >&5
21400   cat conftest.$ac_ext >&5
21401   rm -rf conftest*
21402   eval "ac_cv_lib_$ac_lib_var=no"
21403 fi
21404 rm -f conftest*
21405 LIBS="$ac_save_LIBS"
21406
21407 fi
21408 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
21409   echo "$ac_t""yes" 1>&6
21410   have_slp=yes
21411 else
21412   echo "$ac_t""no" 1>&6
21413 have_slp=no
21414 fi
21415
21416                 if test $have_slp = yes ; then
21417                         cat >> confdefs.h <<\EOF
21418 #define HAVE_SLP 1
21419 EOF
21420
21421                         SLAPD_SLP_LIBS=-lslp
21422                 fi
21423
21424         elif test $ol_enable_slp = yes ; then
21425                 { echo "configure: error: SLP not found" 1>&2; exit 1; }
21426         fi
21427 fi
21428
21429
21430 echo $ac_n "checking long long""... $ac_c" 1>&6
21431 echo "configure:21432: checking long long" >&5
21432 if eval "test \"\${ol_cv_type_long_long+set}\" = set"; then
21433   echo $ac_n "(cached) $ac_c" 1>&6
21434 else
21435   
21436         cat > conftest.$ac_ext <<EOF
21437 #line 21438 "configure"
21438 #include "confdefs.h"
21439
21440 int main() {
21441 long long x;
21442 ; return 0; }
21443 EOF
21444 if { (eval echo configure:21445: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21445   rm -rf conftest*
21446   ol_cv_type_long_long=yes
21447 else
21448   echo "configure: failed program was:" >&5
21449   cat conftest.$ac_ext >&5
21450   rm -rf conftest*
21451   ol_cv_type_long_long=no
21452 fi
21453 rm -f conftest*
21454 fi
21455
21456 echo "$ac_t""$ol_cv_type_long_long" 1>&6
21457 if test $ol_cv_type_long_long = yes; then
21458         cat >> confdefs.h <<\EOF
21459 #define HAVE_LONG_LONG 1
21460 EOF
21461
21462 fi
21463
21464 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
21465 echo "configure:21466: checking for ANSI C header files" >&5
21466 if eval "test \"\${ac_cv_header_stdc+set}\" = set"; then
21467   echo $ac_n "(cached) $ac_c" 1>&6
21468 else
21469   cat > conftest.$ac_ext <<EOF
21470 #line 21471 "configure"
21471 #include "confdefs.h"
21472 #include <stdlib.h>
21473 #include <stdarg.h>
21474 #include <string.h>
21475 #include <float.h>
21476 EOF
21477 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
21478 { (eval echo configure:21479: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
21479 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
21480 if test -z "$ac_err"; then
21481   rm -rf conftest*
21482   ac_cv_header_stdc=yes
21483 else
21484   echo "$ac_err" >&5
21485   echo "configure: failed program was:" >&5
21486   cat conftest.$ac_ext >&5
21487   rm -rf conftest*
21488   ac_cv_header_stdc=no
21489 fi
21490 rm -f conftest*
21491
21492 if test $ac_cv_header_stdc = yes; then
21493   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
21494 cat > conftest.$ac_ext <<EOF
21495 #line 21496 "configure"
21496 #include "confdefs.h"
21497 #include <string.h>
21498 EOF
21499 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21500   egrep "memchr" >/dev/null 2>&1; then
21501   :
21502 else
21503   rm -rf conftest*
21504   ac_cv_header_stdc=no
21505 fi
21506 rm -f conftest*
21507
21508 fi
21509
21510 if test $ac_cv_header_stdc = yes; then
21511   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
21512 cat > conftest.$ac_ext <<EOF
21513 #line 21514 "configure"
21514 #include "confdefs.h"
21515 #include <stdlib.h>
21516 EOF
21517 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21518   egrep "free" >/dev/null 2>&1; then
21519   :
21520 else
21521   rm -rf conftest*
21522   ac_cv_header_stdc=no
21523 fi
21524 rm -f conftest*
21525
21526 fi
21527
21528 if test $ac_cv_header_stdc = yes; then
21529   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
21530 if test "$cross_compiling" = yes; then
21531   :
21532 else
21533   cat > conftest.$ac_ext <<EOF
21534 #line 21535 "configure"
21535 #include "confdefs.h"
21536 #include <ctype.h>
21537 #if ((' ' & 0x0FF) == 0x020)
21538 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
21539 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
21540 #else
21541 #define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
21542  || ('j' <= (c) && (c) <= 'r') \
21543  || ('s' <= (c) && (c) <= 'z'))
21544 #define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
21545 #endif
21546 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
21547 int main () { int i; for (i = 0; i < 256; i++)
21548 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
21549 exit (0); }
21550
21551 EOF
21552 if { (eval echo configure:21553: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
21553 then
21554   :
21555 else
21556   echo "configure: failed program was:" >&5
21557   cat conftest.$ac_ext >&5
21558   rm -fr conftest*
21559   ac_cv_header_stdc=no
21560 fi
21561 rm -fr conftest*
21562 fi
21563
21564 fi
21565 fi
21566
21567 echo "$ac_t""$ac_cv_header_stdc" 1>&6
21568 if test $ac_cv_header_stdc = yes; then
21569   cat >> confdefs.h <<\EOF
21570 #define STDC_HEADERS 1
21571 EOF
21572
21573 fi
21574
21575 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
21576 echo "configure:21577: checking for mode_t" >&5
21577 if eval "test \"\${ac_cv_type_mode_t+set}\" = set"; then
21578   echo $ac_n "(cached) $ac_c" 1>&6
21579 else
21580   cat > conftest.$ac_ext <<EOF
21581 #line 21582 "configure"
21582 #include "confdefs.h"
21583 #include <sys/types.h>
21584 #if STDC_HEADERS
21585 #include <stdlib.h>
21586 #include <stddef.h>
21587 #endif
21588
21589 EOF
21590 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21591   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
21592   rm -rf conftest*
21593   eval "ac_cv_type_mode_t=yes"
21594 else
21595   rm -rf conftest*
21596   eval "ac_cv_type_mode_t=no"
21597 fi
21598 rm -f conftest*
21599
21600 fi
21601 if eval "test \"`echo '$ac_cv_type_'mode_t`\" = yes"; then
21602   echo "$ac_t""yes" 1>&6
21603 else
21604   echo "$ac_t""no" 1>&6
21605   cat >> confdefs.h <<EOF
21606 #define mode_t int
21607 EOF
21608
21609 fi
21610
21611 echo $ac_n "checking for off_t""... $ac_c" 1>&6
21612 echo "configure:21613: checking for off_t" >&5
21613 if eval "test \"\${ac_cv_type_off_t+set}\" = set"; then
21614   echo $ac_n "(cached) $ac_c" 1>&6
21615 else
21616   cat > conftest.$ac_ext <<EOF
21617 #line 21618 "configure"
21618 #include "confdefs.h"
21619 #include <sys/types.h>
21620 #if STDC_HEADERS
21621 #include <stdlib.h>
21622 #include <stddef.h>
21623 #endif
21624
21625 EOF
21626 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21627   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
21628   rm -rf conftest*
21629   eval "ac_cv_type_off_t=yes"
21630 else
21631   rm -rf conftest*
21632   eval "ac_cv_type_off_t=no"
21633 fi
21634 rm -f conftest*
21635
21636 fi
21637 if eval "test \"`echo '$ac_cv_type_'off_t`\" = yes"; then
21638   echo "$ac_t""yes" 1>&6
21639 else
21640   echo "$ac_t""no" 1>&6
21641   cat >> confdefs.h <<EOF
21642 #define off_t long
21643 EOF
21644
21645 fi
21646
21647 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
21648 echo "configure:21649: checking for pid_t" >&5
21649 if eval "test \"\${ac_cv_type_pid_t+set}\" = set"; then
21650   echo $ac_n "(cached) $ac_c" 1>&6
21651 else
21652   cat > conftest.$ac_ext <<EOF
21653 #line 21654 "configure"
21654 #include "confdefs.h"
21655 #include <sys/types.h>
21656 #if STDC_HEADERS
21657 #include <stdlib.h>
21658 #include <stddef.h>
21659 #endif
21660
21661 EOF
21662 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21663   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
21664   rm -rf conftest*
21665   eval "ac_cv_type_pid_t=yes"
21666 else
21667   rm -rf conftest*
21668   eval "ac_cv_type_pid_t=no"
21669 fi
21670 rm -f conftest*
21671
21672 fi
21673 if eval "test \"`echo '$ac_cv_type_'pid_t`\" = yes"; then
21674   echo "$ac_t""yes" 1>&6
21675 else
21676   echo "$ac_t""no" 1>&6
21677   cat >> confdefs.h <<EOF
21678 #define pid_t int
21679 EOF
21680
21681 fi
21682
21683 echo $ac_n "checking for ptrdiff_t""... $ac_c" 1>&6
21684 echo "configure:21685: checking for ptrdiff_t" >&5
21685 if eval "test \"\${am_cv_type_ptrdiff_t+set}\" = set"; then
21686   echo $ac_n "(cached) $ac_c" 1>&6
21687 else
21688   cat > conftest.$ac_ext <<EOF
21689 #line 21690 "configure"
21690 #include "confdefs.h"
21691 #include <stddef.h>
21692 int main() {
21693 ptrdiff_t p
21694 ; return 0; }
21695 EOF
21696 if { (eval echo configure:21697: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21697   rm -rf conftest*
21698   am_cv_type_ptrdiff_t=yes
21699 else
21700   echo "configure: failed program was:" >&5
21701   cat conftest.$ac_ext >&5
21702   rm -rf conftest*
21703   am_cv_type_ptrdiff_t=no
21704 fi
21705 rm -f conftest*
21706 fi
21707
21708 echo "$ac_t""$am_cv_type_ptrdiff_t" 1>&6
21709    if test $am_cv_type_ptrdiff_t = yes; then
21710      cat >> confdefs.h <<\EOF
21711 #define HAVE_PTRDIFF_T 1
21712 EOF
21713
21714    fi
21715
21716 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
21717 echo "configure:21718: checking return type of signal handlers" >&5
21718 if eval "test \"\${ac_cv_type_signal+set}\" = set"; then
21719   echo $ac_n "(cached) $ac_c" 1>&6
21720 else
21721   cat > conftest.$ac_ext <<EOF
21722 #line 21723 "configure"
21723 #include "confdefs.h"
21724 #include <sys/types.h>
21725 #include <signal.h>
21726 #ifdef signal
21727 #undef signal
21728 #endif
21729 #ifdef __cplusplus
21730 extern "C" void (*signal (int, void (*)(int)))(int);
21731 #else
21732 void (*signal ()) ();
21733 #endif
21734
21735 int main() {
21736 int i;
21737 ; return 0; }
21738 EOF
21739 if { (eval echo configure:21740: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21740   rm -rf conftest*
21741   ac_cv_type_signal=void
21742 else
21743   echo "configure: failed program was:" >&5
21744   cat conftest.$ac_ext >&5
21745   rm -rf conftest*
21746   ac_cv_type_signal=int
21747 fi
21748 rm -f conftest*
21749 fi
21750
21751 echo "$ac_t""$ac_cv_type_signal" 1>&6
21752 cat >> confdefs.h <<EOF
21753 #define RETSIGTYPE $ac_cv_type_signal
21754 EOF
21755
21756
21757 echo $ac_n "checking for size_t""... $ac_c" 1>&6
21758 echo "configure:21759: checking for size_t" >&5
21759 if eval "test \"\${ac_cv_type_size_t+set}\" = set"; then
21760   echo $ac_n "(cached) $ac_c" 1>&6
21761 else
21762   cat > conftest.$ac_ext <<EOF
21763 #line 21764 "configure"
21764 #include "confdefs.h"
21765 #include <sys/types.h>
21766 #if STDC_HEADERS
21767 #include <stdlib.h>
21768 #include <stddef.h>
21769 #endif
21770
21771 EOF
21772 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21773   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
21774   rm -rf conftest*
21775   eval "ac_cv_type_size_t=yes"
21776 else
21777   rm -rf conftest*
21778   eval "ac_cv_type_size_t=no"
21779 fi
21780 rm -f conftest*
21781
21782 fi
21783 if eval "test \"`echo '$ac_cv_type_'size_t`\" = yes"; then
21784   echo "$ac_t""yes" 1>&6
21785 else
21786   echo "$ac_t""no" 1>&6
21787   cat >> confdefs.h <<EOF
21788 #define size_t unsigned
21789 EOF
21790
21791 fi
21792
21793
21794 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
21795 echo "configure:21796: checking for ssize_t" >&5
21796 if eval "test \"\${ac_cv_type_ssize_t+set}\" = set"; then
21797   echo $ac_n "(cached) $ac_c" 1>&6
21798 else
21799   cat > conftest.$ac_ext <<EOF
21800 #line 21801 "configure"
21801 #include "confdefs.h"
21802 #include <sys/types.h>
21803 #if STDC_HEADERS
21804 #include <stdlib.h>
21805 #include <stddef.h>
21806 #endif
21807
21808 EOF
21809 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21810   egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
21811   rm -rf conftest*
21812   eval "ac_cv_type_ssize_t=yes"
21813 else
21814   rm -rf conftest*
21815   eval "ac_cv_type_ssize_t=no"
21816 fi
21817 rm -f conftest*
21818
21819 fi
21820 if eval "test \"`echo '$ac_cv_type_'ssize_t`\" = yes"; then
21821   echo "$ac_t""yes" 1>&6
21822 else
21823   echo "$ac_t""no" 1>&6
21824   cat >> confdefs.h <<EOF
21825 #define ssize_t signed int
21826 EOF
21827
21828 fi
21829
21830 echo $ac_n "checking for caddr_t""... $ac_c" 1>&6
21831 echo "configure:21832: checking for caddr_t" >&5
21832 if eval "test \"\${ac_cv_type_caddr_t+set}\" = set"; then
21833   echo $ac_n "(cached) $ac_c" 1>&6
21834 else
21835   cat > conftest.$ac_ext <<EOF
21836 #line 21837 "configure"
21837 #include "confdefs.h"
21838 #include <sys/types.h>
21839 #if STDC_HEADERS
21840 #include <stdlib.h>
21841 #include <stddef.h>
21842 #endif
21843
21844 EOF
21845 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21846   egrep "(^|[^a-zA-Z_0-9])caddr_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
21847   rm -rf conftest*
21848   eval "ac_cv_type_caddr_t=yes"
21849 else
21850   rm -rf conftest*
21851   eval "ac_cv_type_caddr_t=no"
21852 fi
21853 rm -f conftest*
21854
21855 fi
21856 if eval "test \"`echo '$ac_cv_type_'caddr_t`\" = yes"; then
21857   echo "$ac_t""yes" 1>&6
21858 else
21859   echo "$ac_t""no" 1>&6
21860   cat >> confdefs.h <<EOF
21861 #define caddr_t char *
21862 EOF
21863
21864 fi
21865
21866
21867 echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
21868 echo "configure:21869: checking for socklen_t" >&5
21869 if eval "test \"\${ol_cv_type_socklen_t+set}\" = set"; then
21870   echo $ac_n "(cached) $ac_c" 1>&6
21871 else
21872   cat > conftest.$ac_ext <<EOF
21873 #line 21874 "configure"
21874 #include "confdefs.h"
21875
21876 #ifdef HAVE_SYS_TYPES_H
21877 #include <sys/types.h>
21878 #endif
21879 #ifdef HAVE_SYS_SOCKET_H
21880 #include <sys/socket.h>
21881 #endif
21882
21883 int main() {
21884 socklen_t len;
21885 ; return 0; }
21886 EOF
21887 if { (eval echo configure:21888: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21888   rm -rf conftest*
21889   ol_cv_type_socklen_t=yes
21890 else
21891   echo "configure: failed program was:" >&5
21892   cat conftest.$ac_ext >&5
21893   rm -rf conftest*
21894   ol_cv_type_socklen_t=no
21895 fi
21896 rm -f conftest*
21897 fi
21898
21899 echo "$ac_t""$ol_cv_type_socklen_t" 1>&6
21900   if test $ol_cv_type_socklen_t = no; then
21901     cat >> confdefs.h <<\EOF
21902 #define socklen_t int
21903 EOF
21904
21905   fi
21906  
21907 echo $ac_n "checking for member st_blksize in aggregate type struct stat""... $ac_c" 1>&6
21908 echo "configure:21909: checking for member st_blksize in aggregate type struct stat" >&5
21909 if eval "test \"\${ac_cv_c_struct_member_st_blksize+set}\" = set"; then
21910   echo $ac_n "(cached) $ac_c" 1>&6
21911 else
21912   cat > conftest.$ac_ext <<EOF
21913 #line 21914 "configure"
21914 #include "confdefs.h"
21915 #include <sys/types.h>
21916 #include <sys/stat.h>
21917 int main() {
21918 struct stat foo; foo.st_blksize;
21919 ; return 0; }
21920 EOF
21921 if { (eval echo configure:21922: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21922   rm -rf conftest*
21923   ac_cv_c_struct_member_st_blksize=yes
21924 else
21925   echo "configure: failed program was:" >&5
21926   cat conftest.$ac_ext >&5
21927   rm -rf conftest*
21928   ac_cv_c_struct_member_st_blksize=no
21929 fi
21930 rm -f conftest*
21931 fi
21932
21933 echo "$ac_t""$ac_cv_c_struct_member_st_blksize" 1>&6
21934 st_blksize="$ac_cv_c_struct_member_st_blksize"
21935 if test $ac_cv_c_struct_member_st_blksize = yes; then
21936   cat >> confdefs.h <<\EOF
21937 #define HAVE_ST_BLKSIZE 1
21938 EOF
21939
21940 fi
21941
21942 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
21943 echo "configure:21944: checking whether time.h and sys/time.h may both be included" >&5
21944 if eval "test \"\${ac_cv_header_time+set}\" = set"; then
21945   echo $ac_n "(cached) $ac_c" 1>&6
21946 else
21947   cat > conftest.$ac_ext <<EOF
21948 #line 21949 "configure"
21949 #include "confdefs.h"
21950 #include <sys/types.h>
21951 #include <sys/time.h>
21952 #include <time.h>
21953 int main() {
21954 struct tm *tp;
21955 ; return 0; }
21956 EOF
21957 if { (eval echo configure:21958: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21958   rm -rf conftest*
21959   ac_cv_header_time=yes
21960 else
21961   echo "configure: failed program was:" >&5
21962   cat conftest.$ac_ext >&5
21963   rm -rf conftest*
21964   ac_cv_header_time=no
21965 fi
21966 rm -f conftest*
21967 fi
21968
21969 echo "$ac_t""$ac_cv_header_time" 1>&6
21970 if test $ac_cv_header_time = yes; then
21971   cat >> confdefs.h <<\EOF
21972 #define TIME_WITH_SYS_TIME 1
21973 EOF
21974
21975 fi
21976
21977 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
21978 echo "configure:21979: checking whether struct tm is in sys/time.h or time.h" >&5
21979 if eval "test \"\${ac_cv_struct_tm+set}\" = set"; then
21980   echo $ac_n "(cached) $ac_c" 1>&6
21981 else
21982   cat > conftest.$ac_ext <<EOF
21983 #line 21984 "configure"
21984 #include "confdefs.h"
21985 #include <sys/types.h>
21986 #include <time.h>
21987 int main() {
21988 struct tm *tp; tp->tm_sec;
21989 ; return 0; }
21990 EOF
21991 if { (eval echo configure:21992: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21992   rm -rf conftest*
21993   ac_cv_struct_tm=time.h
21994 else
21995   echo "configure: failed program was:" >&5
21996   cat conftest.$ac_ext >&5
21997   rm -rf conftest*
21998   ac_cv_struct_tm=sys/time.h
21999 fi
22000 rm -f conftest*
22001 fi
22002
22003 echo "$ac_t""$ac_cv_struct_tm" 1>&6
22004 if test $ac_cv_struct_tm = sys/time.h; then
22005   cat >> confdefs.h <<\EOF
22006 #define TM_IN_SYS_TIME 1
22007 EOF
22008
22009 fi
22010
22011 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
22012 echo "configure:22013: checking for uid_t in sys/types.h" >&5
22013 if eval "test \"\${ac_cv_type_uid_t+set}\" = set"; then
22014   echo $ac_n "(cached) $ac_c" 1>&6
22015 else
22016   cat > conftest.$ac_ext <<EOF
22017 #line 22018 "configure"
22018 #include "confdefs.h"
22019 #include <sys/types.h>
22020 EOF
22021 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
22022   egrep "uid_t" >/dev/null 2>&1; then
22023   rm -rf conftest*
22024   ac_cv_type_uid_t=yes
22025 else
22026   rm -rf conftest*
22027   ac_cv_type_uid_t=no
22028 fi
22029 rm -f conftest*
22030
22031 fi
22032
22033 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
22034 if test $ac_cv_type_uid_t = no; then
22035   cat >> confdefs.h <<\EOF
22036 #define uid_t int
22037 EOF
22038
22039   cat >> confdefs.h <<\EOF
22040 #define gid_t int
22041 EOF
22042
22043 fi
22044
22045 echo $ac_n "checking for sig_atomic_t""... $ac_c" 1>&6
22046 echo "configure:22047: checking for sig_atomic_t" >&5
22047 if eval "test \"\${ol_cv_type_sig_atomic_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 <signal.h>
22054 int main() {
22055 sig_atomic_t atomic;
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   ol_cv_type_sig_atomic_t=yes
22061 else
22062   echo "configure: failed program was:" >&5
22063   cat conftest.$ac_ext >&5
22064   rm -rf conftest*
22065   ol_cv_type_sig_atomic_t=no
22066 fi
22067 rm -f conftest*
22068 fi
22069
22070 echo "$ac_t""$ol_cv_type_sig_atomic_t" 1>&6
22071   if test $ol_cv_type_sig_atomic_t = no; then
22072     cat >> confdefs.h <<\EOF
22073 #define sig_atomic_t int
22074 EOF
22075
22076   fi
22077  
22078
22079
22080 # test for pw_gecos in struct passwd
22081 echo $ac_n "checking struct passwd for pw_gecos""... $ac_c" 1>&6
22082 echo "configure:22083: checking struct passwd for pw_gecos" >&5
22083 if eval "test \"\${ol_cv_struct_passwd_pw_gecos+set}\" = set"; then
22084   echo $ac_n "(cached) $ac_c" 1>&6
22085 else
22086   
22087         cat > conftest.$ac_ext <<EOF
22088 #line 22089 "configure"
22089 #include "confdefs.h"
22090 #include <pwd.h>
22091 int main() {
22092
22093         struct passwd pwd;
22094         pwd.pw_gecos = pwd.pw_name;
22095
22096 ; return 0; }
22097 EOF
22098 if { (eval echo configure:22099: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22099   rm -rf conftest*
22100   ol_cv_struct_passwd_pw_gecos=yes
22101 else
22102   echo "configure: failed program was:" >&5
22103   cat conftest.$ac_ext >&5
22104   rm -rf conftest*
22105   ol_cv_struct_passwd_pw_gecos=no
22106 fi
22107 rm -f conftest*
22108 fi
22109
22110 echo "$ac_t""$ol_cv_struct_passwd_pw_gecos" 1>&6
22111 if test $ol_cv_struct_passwd_pw_gecos = yes ; then
22112         cat >> confdefs.h <<\EOF
22113 #define HAVE_PW_GECOS 1
22114 EOF
22115
22116 fi
22117
22118 # test for pw_passwd in struct passwd
22119 echo $ac_n "checking struct passwd for pw_passwd""... $ac_c" 1>&6
22120 echo "configure:22121: checking struct passwd for pw_passwd" >&5
22121 if eval "test \"\${ol_cv_struct_passwd_pw_passwd+set}\" = set"; then
22122   echo $ac_n "(cached) $ac_c" 1>&6
22123 else
22124   
22125         cat > conftest.$ac_ext <<EOF
22126 #line 22127 "configure"
22127 #include "confdefs.h"
22128 #include <pwd.h>
22129 int main() {
22130
22131         struct passwd pwd;
22132         pwd.pw_passwd = pwd.pw_name;
22133
22134 ; return 0; }
22135 EOF
22136 if { (eval echo configure:22137: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22137   rm -rf conftest*
22138   ol_cv_struct_passwd_pw_passwd=yes
22139 else
22140   echo "configure: failed program was:" >&5
22141   cat conftest.$ac_ext >&5
22142   rm -rf conftest*
22143   ol_cv_struct_passwd_pw_passwd=no
22144 fi
22145 rm -f conftest*
22146 fi
22147
22148 echo "$ac_t""$ol_cv_struct_passwd_pw_passwd" 1>&6
22149 if test $ol_cv_struct_passwd_pw_passwd = yes ; then
22150         cat >> confdefs.h <<\EOF
22151 #define HAVE_PW_PASSWD 1
22152 EOF
22153
22154 fi
22155
22156
22157 echo $ac_n "checking if toupper() requires islower()""... $ac_c" 1>&6
22158 echo "configure:22159: checking if toupper() requires islower()" >&5
22159 if eval "test \"\${ol_cv_c_upper_lower+set}\" = set"; then
22160   echo $ac_n "(cached) $ac_c" 1>&6
22161 else
22162   
22163         if test "$cross_compiling" = yes; then
22164   ol_cv_c_upper_lower=safe
22165 else
22166   cat > conftest.$ac_ext <<EOF
22167 #line 22168 "configure"
22168 #include "confdefs.h"
22169
22170 #include <ctype.h>
22171 main()
22172 {
22173         if ('C' == toupper('C'))
22174                 exit(0);
22175         else
22176                 exit(1);
22177 }
22178 EOF
22179 if { (eval echo configure:22180: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
22180 then
22181   ol_cv_c_upper_lower=no
22182 else
22183   echo "configure: failed program was:" >&5
22184   cat conftest.$ac_ext >&5
22185   rm -fr conftest*
22186   ol_cv_c_upper_lower=yes
22187 fi
22188 rm -fr conftest*
22189 fi
22190
22191 fi
22192
22193 echo "$ac_t""$ol_cv_c_upper_lower" 1>&6
22194 if test $ol_cv_c_upper_lower != no ; then
22195         cat >> confdefs.h <<\EOF
22196 #define C_UPPER_LOWER 1
22197 EOF
22198
22199 fi
22200
22201 echo $ac_n "checking for working const""... $ac_c" 1>&6
22202 echo "configure:22203: checking for working const" >&5
22203 if eval "test \"\${ac_cv_c_const+set}\" = set"; then
22204   echo $ac_n "(cached) $ac_c" 1>&6
22205 else
22206   cat > conftest.$ac_ext <<EOF
22207 #line 22208 "configure"
22208 #include "confdefs.h"
22209
22210 int main() {
22211
22212 /* Ultrix mips cc rejects this.  */
22213 typedef int charset[2]; const charset x;
22214 /* SunOS 4.1.1 cc rejects this.  */
22215 char const *const *ccp;
22216 char **p;
22217 /* NEC SVR4.0.2 mips cc rejects this.  */
22218 struct point {int x, y;};
22219 static struct point const zero = {0,0};
22220 /* AIX XL C 1.02.0.0 rejects this.
22221    It does not let you subtract one const X* pointer from another in an arm
22222    of an if-expression whose if-part is not a constant expression */
22223 const char *g = "string";
22224 ccp = &g + (g ? g-g : 0);
22225 /* HPUX 7.0 cc rejects these. */
22226 ++ccp;
22227 p = (char**) ccp;
22228 ccp = (char const *const *) p;
22229 { /* SCO 3.2v4 cc rejects this.  */
22230   char *t;
22231   char const *s = 0 ? (char *) 0 : (char const *) 0;
22232
22233   *t++ = 0;
22234 }
22235 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
22236   int x[] = {25, 17};
22237   const int *foo = &x[0];
22238   ++foo;
22239 }
22240 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
22241   typedef const int *iptr;
22242   iptr p = 0;
22243   ++p;
22244 }
22245 { /* AIX XL C 1.02.0.0 rejects this saying
22246      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
22247   struct s { int j; const int *ap[3]; };
22248   struct s *b; b->j = 5;
22249 }
22250 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
22251   const int foo = 10;
22252 }
22253
22254 ; return 0; }
22255 EOF
22256 if { (eval echo configure:22257: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22257   rm -rf conftest*
22258   ac_cv_c_const=yes
22259 else
22260   echo "configure: failed program was:" >&5
22261   cat conftest.$ac_ext >&5
22262   rm -rf conftest*
22263   ac_cv_c_const=no
22264 fi
22265 rm -f conftest*
22266 fi
22267
22268 echo "$ac_t""$ac_cv_c_const" 1>&6
22269 if test $ac_cv_c_const = no; then
22270   cat >> confdefs.h <<\EOF
22271 #define const 
22272 EOF
22273
22274 fi
22275
22276 echo $ac_n "checking if compiler understands volatile""... $ac_c" 1>&6
22277 echo "configure:22278: checking if compiler understands volatile" >&5
22278 if eval "test \"\${ol_cv_c_volatile+set}\" = set"; then
22279   echo $ac_n "(cached) $ac_c" 1>&6
22280 else
22281   cat > conftest.$ac_ext <<EOF
22282 #line 22283 "configure"
22283 #include "confdefs.h"
22284 int x, y, z;
22285 int main() {
22286 volatile int a; int * volatile b = x ? &y : &z;
22287       /* Older MIPS compilers (eg., in Ultrix 4.2) don't like *b = 0 */
22288       *b = 0;
22289 ; return 0; }
22290 EOF
22291 if { (eval echo configure:22292: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22292   rm -rf conftest*
22293   ol_cv_c_volatile=yes
22294 else
22295   echo "configure: failed program was:" >&5
22296   cat conftest.$ac_ext >&5
22297   rm -rf conftest*
22298   ol_cv_c_volatile=no
22299 fi
22300 rm -f conftest*
22301 fi
22302
22303 echo "$ac_t""$ol_cv_c_volatile" 1>&6
22304   if test $ol_cv_c_volatile = yes; then
22305     : 
22306   else
22307     cat >> confdefs.h <<\EOF
22308 #define volatile 
22309 EOF
22310
22311   fi
22312  
22313
22314 if test $cross_compiling = yes ; then
22315         cat >> confdefs.h <<\EOF
22316 #define CROSS_COMPILING 1
22317 EOF
22318
22319 else
22320         echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
22321 echo "configure:22322: checking whether byte ordering is bigendian" >&5
22322 if eval "test \"\${ac_cv_c_bigendian+set}\" = set"; then
22323   echo $ac_n "(cached) $ac_c" 1>&6
22324 else
22325   ac_cv_c_bigendian=unknown
22326 # See if sys/param.h defines the BYTE_ORDER macro.
22327 cat > conftest.$ac_ext <<EOF
22328 #line 22329 "configure"
22329 #include "confdefs.h"
22330 #include <sys/types.h>
22331 #include <sys/param.h>
22332 int main() {
22333
22334 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
22335  bogus endian macros
22336 #endif
22337 ; return 0; }
22338 EOF
22339 if { (eval echo configure:22340: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22340   rm -rf conftest*
22341   # It does; now see whether it defined to BIG_ENDIAN or not.
22342 cat > conftest.$ac_ext <<EOF
22343 #line 22344 "configure"
22344 #include "confdefs.h"
22345 #include <sys/types.h>
22346 #include <sys/param.h>
22347 int main() {
22348
22349 #if BYTE_ORDER != BIG_ENDIAN
22350  not big endian
22351 #endif
22352 ; return 0; }
22353 EOF
22354 if { (eval echo configure:22355: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22355   rm -rf conftest*
22356   ac_cv_c_bigendian=yes
22357 else
22358   echo "configure: failed program was:" >&5
22359   cat conftest.$ac_ext >&5
22360   rm -rf conftest*
22361   ac_cv_c_bigendian=no
22362 fi
22363 rm -f conftest*
22364 else
22365   echo "configure: failed program was:" >&5
22366   cat conftest.$ac_ext >&5
22367 fi
22368 rm -f conftest*
22369 if test $ac_cv_c_bigendian = unknown; then
22370 if test "$cross_compiling" = yes; then
22371     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
22372 else
22373   cat > conftest.$ac_ext <<EOF
22374 #line 22375 "configure"
22375 #include "confdefs.h"
22376 main () {
22377   /* Are we little or big endian?  From Harbison&Steele.  */
22378   union
22379   {
22380     long l;
22381     char c[sizeof (long)];
22382   } u;
22383   u.l = 1;
22384   exit (u.c[sizeof (long) - 1] == 1);
22385 }
22386 EOF
22387 if { (eval echo configure:22388: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
22388 then
22389   ac_cv_c_bigendian=no
22390 else
22391   echo "configure: failed program was:" >&5
22392   cat conftest.$ac_ext >&5
22393   rm -fr conftest*
22394   ac_cv_c_bigendian=yes
22395 fi
22396 rm -fr conftest*
22397 fi
22398
22399 fi
22400 fi
22401
22402 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
22403 if test $ac_cv_c_bigendian = yes; then
22404   cat >> confdefs.h <<\EOF
22405 #define WORDS_BIGENDIAN 1
22406 EOF
22407
22408 fi
22409
22410 fi
22411
22412 echo $ac_n "checking size of short""... $ac_c" 1>&6
22413 echo "configure:22414: checking size of short" >&5 
22414 if eval "test \"\${ac_cv_sizeof_short+set}\" = set"; then
22415   echo $ac_n "(cached) $ac_c" 1>&6
22416 else
22417   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
22418   cat > conftest.$ac_ext <<EOF
22419 #line 22420 "configure"
22420 #include "confdefs.h"
22421 #include "confdefs.h" 
22422 #include <sys/types.h> 
22423  
22424
22425 int main() {
22426 switch (0) case 0: case (sizeof (short) == $ac_size):;
22427 ; return 0; }
22428 EOF
22429 if { (eval echo configure:22430: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22430   rm -rf conftest*
22431   ac_cv_sizeof_short=$ac_size
22432 else
22433   echo "configure: failed program was:" >&5
22434   cat conftest.$ac_ext >&5
22435 fi
22436 rm -f conftest* 
22437   if test x$ac_cv_sizeof_short != x ; then break; fi 
22438 done 
22439
22440 fi
22441  
22442 if test x$ac_cv_sizeof_short = x ; then 
22443   { echo "configure: error: cannot determine a size for short" 1>&2; exit 1; } 
22444 fi 
22445 echo "$ac_t""$ac_cv_sizeof_short" 1>&6 
22446 cat >> confdefs.h <<EOF
22447 #define SIZEOF_SHORT $ac_cv_sizeof_short
22448 EOF
22449  
22450  
22451 echo $ac_n "checking size of int""... $ac_c" 1>&6
22452 echo "configure:22453: checking size of int" >&5 
22453 if eval "test \"\${ac_cv_sizeof_int+set}\" = set"; then
22454   echo $ac_n "(cached) $ac_c" 1>&6
22455 else
22456   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
22457   cat > conftest.$ac_ext <<EOF
22458 #line 22459 "configure"
22459 #include "confdefs.h"
22460 #include "confdefs.h" 
22461 #include <sys/types.h> 
22462  
22463
22464 int main() {
22465 switch (0) case 0: case (sizeof (int) == $ac_size):;
22466 ; return 0; }
22467 EOF
22468 if { (eval echo configure:22469: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22469   rm -rf conftest*
22470   ac_cv_sizeof_int=$ac_size
22471 else
22472   echo "configure: failed program was:" >&5
22473   cat conftest.$ac_ext >&5
22474 fi
22475 rm -f conftest* 
22476   if test x$ac_cv_sizeof_int != x ; then break; fi 
22477 done 
22478
22479 fi
22480  
22481 if test x$ac_cv_sizeof_int = x ; then 
22482   { echo "configure: error: cannot determine a size for int" 1>&2; exit 1; } 
22483 fi 
22484 echo "$ac_t""$ac_cv_sizeof_int" 1>&6 
22485 cat >> confdefs.h <<EOF
22486 #define SIZEOF_INT $ac_cv_sizeof_int
22487 EOF
22488  
22489  
22490 echo $ac_n "checking size of long""... $ac_c" 1>&6
22491 echo "configure:22492: checking size of long" >&5 
22492 if eval "test \"\${ac_cv_sizeof_long+set}\" = set"; then
22493   echo $ac_n "(cached) $ac_c" 1>&6
22494 else
22495   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
22496   cat > conftest.$ac_ext <<EOF
22497 #line 22498 "configure"
22498 #include "confdefs.h"
22499 #include "confdefs.h" 
22500 #include <sys/types.h> 
22501  
22502
22503 int main() {
22504 switch (0) case 0: case (sizeof (long) == $ac_size):;
22505 ; return 0; }
22506 EOF
22507 if { (eval echo configure:22508: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22508   rm -rf conftest*
22509   ac_cv_sizeof_long=$ac_size
22510 else
22511   echo "configure: failed program was:" >&5
22512   cat conftest.$ac_ext >&5
22513 fi
22514 rm -f conftest* 
22515   if test x$ac_cv_sizeof_long != x ; then break; fi 
22516 done 
22517
22518 fi
22519  
22520 if test x$ac_cv_sizeof_long = x ; then 
22521   { echo "configure: error: cannot determine a size for long" 1>&2; exit 1; } 
22522 fi 
22523 echo "$ac_t""$ac_cv_sizeof_long" 1>&6 
22524 cat >> confdefs.h <<EOF
22525 #define SIZEOF_LONG $ac_cv_sizeof_long
22526 EOF
22527  
22528
22529
22530 if test "$ac_cv_sizeof_int" -lt 4 ; then
22531         echo "configure: warning: OpenLDAP requires 'int' to be 32 bits or greater." 1>&2
22532
22533         cat >> confdefs.h <<\EOF
22534 #define LBER_INT_T long
22535 EOF
22536
22537 else
22538         cat >> confdefs.h <<\EOF
22539 #define LBER_INT_T int
22540 EOF
22541
22542 fi
22543
22544 cat >> confdefs.h <<\EOF
22545 #define LBER_LEN_T long
22546 EOF
22547
22548 cat >> confdefs.h <<\EOF
22549 #define LBER_SOCKET_T int
22550 EOF
22551
22552 cat >> confdefs.h <<\EOF
22553 #define LBER_TAG_T long
22554 EOF
22555
22556
22557 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
22558 echo "configure:22559: checking for 8-bit clean memcmp" >&5
22559 if eval "test \"\${ac_cv_func_memcmp_clean+set}\" = set"; then
22560   echo $ac_n "(cached) $ac_c" 1>&6
22561 else
22562   if test "$cross_compiling" = yes; then
22563   ac_cv_func_memcmp_clean=no
22564 else
22565   cat > conftest.$ac_ext <<EOF
22566 #line 22567 "configure"
22567 #include "confdefs.h"
22568
22569 main()
22570 {
22571   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
22572   exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
22573 }
22574
22575 EOF
22576 if { (eval echo configure:22577: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
22577 then
22578   ac_cv_func_memcmp_clean=yes
22579 else
22580   echo "configure: failed program was:" >&5
22581   cat conftest.$ac_ext >&5
22582   rm -fr conftest*
22583   ac_cv_func_memcmp_clean=no
22584 fi
22585 rm -fr conftest*
22586 fi
22587
22588 fi
22589
22590 echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
22591 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
22592
22593 echo $ac_n "checking for strftime""... $ac_c" 1>&6
22594 echo "configure:22595: checking for strftime" >&5
22595 if eval "test \"\${ac_cv_func_strftime+set}\" = set"; then
22596   echo $ac_n "(cached) $ac_c" 1>&6
22597 else
22598   cat > conftest.$ac_ext <<EOF
22599 #line 22600 "configure"
22600 #include "confdefs.h"
22601 /* System header to define __stub macros and hopefully few prototypes,
22602     which can conflict with char strftime(); below.  */
22603 #include <assert.h>
22604 /* Override any gcc2 internal prototype to avoid an error.  */
22605 /* We use char because int might match the return type of a gcc2
22606     builtin and then its argument prototype would still apply.  */
22607 char strftime();
22608 char (*f)();
22609
22610 int main() {
22611
22612 /* The GNU C library defines this for functions which it implements
22613     to always fail with ENOSYS.  Some functions are actually named
22614     something starting with __ and the normal name is an alias.  */
22615 #if defined (__stub_strftime) || defined (__stub___strftime)
22616 choke me
22617 #else
22618 f = strftime;
22619 #endif
22620
22621 ; return 0; }
22622 EOF
22623 if { (eval echo configure:22624: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22624   rm -rf conftest*
22625   eval "ac_cv_func_strftime=yes"
22626 else
22627   echo "configure: failed program was:" >&5
22628   cat conftest.$ac_ext >&5
22629   rm -rf conftest*
22630   eval "ac_cv_func_strftime=no"
22631 fi
22632 rm -f conftest*
22633 fi
22634
22635 if eval "test \"`echo '$ac_cv_func_'strftime`\" = yes"; then
22636   echo "$ac_t""yes" 1>&6
22637   cat >> confdefs.h <<\EOF
22638 #define HAVE_STRFTIME 1
22639 EOF
22640
22641 else
22642   echo "$ac_t""no" 1>&6
22643 # strftime is in -lintl on SCO UNIX.
22644 echo $ac_n "checking for strftime in -lintl""... $ac_c" 1>&6
22645 echo "configure:22646: checking for strftime in -lintl" >&5
22646 ac_lib_var=`echo intl'_'strftime | sed 'y%./+-:%__p__%'`
22647 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
22648   echo $ac_n "(cached) $ac_c" 1>&6
22649 else
22650   ac_save_LIBS="$LIBS"
22651 LIBS="-lintl  $LIBS"
22652 cat > conftest.$ac_ext <<EOF
22653 #line 22654 "configure"
22654 #include "confdefs.h"
22655 /* Override any gcc2 internal prototype to avoid an error.  */
22656 /* We use char because int might match the return type of a gcc2
22657     builtin and then its argument prototype would still apply.  */
22658 char strftime();
22659
22660 int main() {
22661 strftime()
22662 ; return 0; }
22663 EOF
22664 if { (eval echo configure:22665: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22665   rm -rf conftest*
22666   eval "ac_cv_lib_$ac_lib_var=yes"
22667 else
22668   echo "configure: failed program was:" >&5
22669   cat conftest.$ac_ext >&5
22670   rm -rf conftest*
22671   eval "ac_cv_lib_$ac_lib_var=no"
22672 fi
22673 rm -f conftest*
22674 LIBS="$ac_save_LIBS"
22675
22676 fi
22677 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
22678   echo "$ac_t""yes" 1>&6
22679   cat >> confdefs.h <<\EOF
22680 #define HAVE_STRFTIME 1
22681 EOF
22682
22683 LIBS="-lintl $LIBS"
22684 else
22685   echo "$ac_t""no" 1>&6
22686 fi
22687
22688 fi
22689
22690
22691 echo $ac_n "checking for inet_aton()""... $ac_c" 1>&6
22692 echo "configure:22693: checking for inet_aton()" >&5
22693 if eval "test \"\${ol_cv_func_inet_aton+set}\" = set"; then
22694   echo $ac_n "(cached) $ac_c" 1>&6
22695 else
22696   cat > conftest.$ac_ext <<EOF
22697 #line 22698 "configure"
22698 #include "confdefs.h"
22699
22700 #ifdef HAVE_SYS_TYPES_H
22701 #       include <sys/types.h>
22702 #endif
22703 #ifdef HAVE_SYS_SOCKET_H
22704 #       include <sys/socket.h>
22705 #       ifdef HAVE_SYS_SELECT_H
22706 #               include <sys/select.h>
22707 #       endif
22708 #       include <netinet/in.h>
22709 #       ifdef HAVE_ARPA_INET_H
22710 #               include <arpa/inet.h>
22711 #       endif
22712 #endif
22713
22714 int main() {
22715 struct in_addr in;
22716 int rc = inet_aton( "255.255.255.255", &in );
22717 ; return 0; }
22718 EOF
22719 if { (eval echo configure:22720: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22720   rm -rf conftest*
22721   ol_cv_func_inet_aton=yes
22722 else
22723   echo "configure: failed program was:" >&5
22724   cat conftest.$ac_ext >&5
22725   rm -rf conftest*
22726   ol_cv_func_inet_aton=no
22727 fi
22728 rm -f conftest*
22729 fi
22730
22731 echo "$ac_t""$ol_cv_func_inet_aton" 1>&6
22732   if test $ol_cv_func_inet_aton != no; then
22733     cat >> confdefs.h <<\EOF
22734 #define HAVE_INET_ATON 1
22735 EOF
22736
22737   fi
22738  
22739
22740 echo $ac_n "checking for _spawnlp""... $ac_c" 1>&6
22741 echo "configure:22742: checking for _spawnlp" >&5
22742 if eval "test \"\${ac_cv_func__spawnlp+set}\" = set"; then
22743   echo $ac_n "(cached) $ac_c" 1>&6
22744 else
22745   cat > conftest.$ac_ext <<EOF
22746 #line 22747 "configure"
22747 #include "confdefs.h"
22748 /* System header to define __stub macros and hopefully few prototypes,
22749     which can conflict with char _spawnlp(); below.  */
22750 #include <assert.h>
22751 /* Override any gcc2 internal prototype to avoid an error.  */
22752 /* We use char because int might match the return type of a gcc2
22753     builtin and then its argument prototype would still apply.  */
22754 char _spawnlp();
22755 char (*f)();
22756
22757 int main() {
22758
22759 /* The GNU C library defines this for functions which it implements
22760     to always fail with ENOSYS.  Some functions are actually named
22761     something starting with __ and the normal name is an alias.  */
22762 #if defined (__stub__spawnlp) || defined (__stub____spawnlp)
22763 choke me
22764 #else
22765 f = _spawnlp;
22766 #endif
22767
22768 ; return 0; }
22769 EOF
22770 if { (eval echo configure:22771: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22771   rm -rf conftest*
22772   eval "ac_cv_func__spawnlp=yes"
22773 else
22774   echo "configure: failed program was:" >&5
22775   cat conftest.$ac_ext >&5
22776   rm -rf conftest*
22777   eval "ac_cv_func__spawnlp=no"
22778 fi
22779 rm -f conftest*
22780 fi
22781
22782 if eval "test \"`echo '$ac_cv_func_'_spawnlp`\" = yes"; then
22783   echo "$ac_t""yes" 1>&6
22784   cat >> confdefs.h <<\EOF
22785 #define HAVE_SPAWNLP 1
22786 EOF
22787
22788 else
22789   echo "$ac_t""no" 1>&6
22790 fi
22791
22792
22793 echo $ac_n "checking for _snprintf""... $ac_c" 1>&6
22794 echo "configure:22795: checking for _snprintf" >&5
22795 if eval "test \"\${ac_cv_func__snprintf+set}\" = set"; then
22796   echo $ac_n "(cached) $ac_c" 1>&6
22797 else
22798   cat > conftest.$ac_ext <<EOF
22799 #line 22800 "configure"
22800 #include "confdefs.h"
22801 /* System header to define __stub macros and hopefully few prototypes,
22802     which can conflict with char _snprintf(); below.  */
22803 #include <assert.h>
22804 /* Override any gcc2 internal prototype to avoid an error.  */
22805 /* We use char because int might match the return type of a gcc2
22806     builtin and then its argument prototype would still apply.  */
22807 char _snprintf();
22808 char (*f)();
22809
22810 int main() {
22811
22812 /* The GNU C library defines this for functions which it implements
22813     to always fail with ENOSYS.  Some functions are actually named
22814     something starting with __ and the normal name is an alias.  */
22815 #if defined (__stub__snprintf) || defined (__stub____snprintf)
22816 choke me
22817 #else
22818 f = _snprintf;
22819 #endif
22820
22821 ; return 0; }
22822 EOF
22823 if { (eval echo configure:22824: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22824   rm -rf conftest*
22825   eval "ac_cv_func__snprintf=yes"
22826 else
22827   echo "configure: failed program was:" >&5
22828   cat conftest.$ac_ext >&5
22829   rm -rf conftest*
22830   eval "ac_cv_func__snprintf=no"
22831 fi
22832 rm -f conftest*
22833 fi
22834
22835 if eval "test \"`echo '$ac_cv_func_'_snprintf`\" = yes"; then
22836   echo "$ac_t""yes" 1>&6
22837   ac_cv_func_snprintf=yes
22838         cat >> confdefs.h <<\EOF
22839 #define snprintf _snprintf
22840 EOF
22841
22842
22843 else
22844   echo "$ac_t""no" 1>&6
22845 fi
22846
22847
22848 echo $ac_n "checking for _vsnprintf""... $ac_c" 1>&6
22849 echo "configure:22850: checking for _vsnprintf" >&5
22850 if eval "test \"\${ac_cv_func__vsnprintf+set}\" = set"; then
22851   echo $ac_n "(cached) $ac_c" 1>&6
22852 else
22853   cat > conftest.$ac_ext <<EOF
22854 #line 22855 "configure"
22855 #include "confdefs.h"
22856 /* System header to define __stub macros and hopefully few prototypes,
22857     which can conflict with char _vsnprintf(); below.  */
22858 #include <assert.h>
22859 /* Override any gcc2 internal prototype to avoid an error.  */
22860 /* We use char because int might match the return type of a gcc2
22861     builtin and then its argument prototype would still apply.  */
22862 char _vsnprintf();
22863 char (*f)();
22864
22865 int main() {
22866
22867 /* The GNU C library defines this for functions which it implements
22868     to always fail with ENOSYS.  Some functions are actually named
22869     something starting with __ and the normal name is an alias.  */
22870 #if defined (__stub__vsnprintf) || defined (__stub____vsnprintf)
22871 choke me
22872 #else
22873 f = _vsnprintf;
22874 #endif
22875
22876 ; return 0; }
22877 EOF
22878 if { (eval echo configure:22879: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22879   rm -rf conftest*
22880   eval "ac_cv_func__vsnprintf=yes"
22881 else
22882   echo "configure: failed program was:" >&5
22883   cat conftest.$ac_ext >&5
22884   rm -rf conftest*
22885   eval "ac_cv_func__vsnprintf=no"
22886 fi
22887 rm -f conftest*
22888 fi
22889
22890 if eval "test \"`echo '$ac_cv_func_'_vsnprintf`\" = yes"; then
22891   echo "$ac_t""yes" 1>&6
22892   ac_cv_func_vsnprintf=yes
22893         cat >> confdefs.h <<\EOF
22894 #define vsnprintf _vsnprintf
22895 EOF
22896
22897
22898 else
22899   echo "$ac_t""no" 1>&6
22900 fi
22901
22902
22903 echo $ac_n "checking for vprintf""... $ac_c" 1>&6
22904 echo "configure:22905: checking for vprintf" >&5
22905 if eval "test \"\${ac_cv_func_vprintf+set}\" = set"; then
22906   echo $ac_n "(cached) $ac_c" 1>&6
22907 else
22908   cat > conftest.$ac_ext <<EOF
22909 #line 22910 "configure"
22910 #include "confdefs.h"
22911 /* System header to define __stub macros and hopefully few prototypes,
22912     which can conflict with char vprintf(); below.  */
22913 #include <assert.h>
22914 /* Override any gcc2 internal prototype to avoid an error.  */
22915 /* We use char because int might match the return type of a gcc2
22916     builtin and then its argument prototype would still apply.  */
22917 char vprintf();
22918 char (*f)();
22919
22920 int main() {
22921
22922 /* The GNU C library defines this for functions which it implements
22923     to always fail with ENOSYS.  Some functions are actually named
22924     something starting with __ and the normal name is an alias.  */
22925 #if defined (__stub_vprintf) || defined (__stub___vprintf)
22926 choke me
22927 #else
22928 f = vprintf;
22929 #endif
22930
22931 ; return 0; }
22932 EOF
22933 if { (eval echo configure:22934: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22934   rm -rf conftest*
22935   eval "ac_cv_func_vprintf=yes"
22936 else
22937   echo "configure: failed program was:" >&5
22938   cat conftest.$ac_ext >&5
22939   rm -rf conftest*
22940   eval "ac_cv_func_vprintf=no"
22941 fi
22942 rm -f conftest*
22943 fi
22944
22945 if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
22946   echo "$ac_t""yes" 1>&6
22947   cat >> confdefs.h <<\EOF
22948 #define HAVE_VPRINTF 1
22949 EOF
22950
22951 else
22952   echo "$ac_t""no" 1>&6
22953 fi
22954
22955 if test "$ac_cv_func_vprintf" != yes; then
22956 echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
22957 echo "configure:22958: checking for _doprnt" >&5
22958 if eval "test \"\${ac_cv_func__doprnt+set}\" = set"; then
22959   echo $ac_n "(cached) $ac_c" 1>&6
22960 else
22961   cat > conftest.$ac_ext <<EOF
22962 #line 22963 "configure"
22963 #include "confdefs.h"
22964 /* System header to define __stub macros and hopefully few prototypes,
22965     which can conflict with char _doprnt(); below.  */
22966 #include <assert.h>
22967 /* Override any gcc2 internal prototype to avoid an error.  */
22968 /* We use char because int might match the return type of a gcc2
22969     builtin and then its argument prototype would still apply.  */
22970 char _doprnt();
22971 char (*f)();
22972
22973 int main() {
22974
22975 /* The GNU C library defines this for functions which it implements
22976     to always fail with ENOSYS.  Some functions are actually named
22977     something starting with __ and the normal name is an alias.  */
22978 #if defined (__stub__doprnt) || defined (__stub____doprnt)
22979 choke me
22980 #else
22981 f = _doprnt;
22982 #endif
22983
22984 ; return 0; }
22985 EOF
22986 if { (eval echo configure:22987: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22987   rm -rf conftest*
22988   eval "ac_cv_func__doprnt=yes"
22989 else
22990   echo "configure: failed program was:" >&5
22991   cat conftest.$ac_ext >&5
22992   rm -rf conftest*
22993   eval "ac_cv_func__doprnt=no"
22994 fi
22995 rm -f conftest*
22996 fi
22997
22998 if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
22999   echo "$ac_t""yes" 1>&6
23000   cat >> confdefs.h <<\EOF
23001 #define HAVE_DOPRNT 1
23002 EOF
23003
23004 else
23005   echo "$ac_t""no" 1>&6
23006 fi
23007
23008 fi
23009
23010
23011 if test $ac_cv_func_vprintf = yes ; then
23012                 for ac_func in snprintf vsnprintf
23013 do
23014 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
23015 echo "configure:23016: checking for $ac_func" >&5
23016 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
23017   echo $ac_n "(cached) $ac_c" 1>&6
23018 else
23019   cat > conftest.$ac_ext <<EOF
23020 #line 23021 "configure"
23021 #include "confdefs.h"
23022 /* System header to define __stub macros and hopefully few prototypes,
23023     which can conflict with char $ac_func(); below.  */
23024 #include <assert.h>
23025 /* Override any gcc2 internal prototype to avoid an error.  */
23026 /* We use char because int might match the return type of a gcc2
23027     builtin and then its argument prototype would still apply.  */
23028 char $ac_func();
23029 char (*f)();
23030
23031 int main() {
23032
23033 /* The GNU C library defines this for functions which it implements
23034     to always fail with ENOSYS.  Some functions are actually named
23035     something starting with __ and the normal name is an alias.  */
23036 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
23037 choke me
23038 #else
23039 f = $ac_func;
23040 #endif
23041
23042 ; return 0; }
23043 EOF
23044 if { (eval echo configure:23045: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
23045   rm -rf conftest*
23046   eval "ac_cv_func_$ac_func=yes"
23047 else
23048   echo "configure: failed program was:" >&5
23049   cat conftest.$ac_ext >&5
23050   rm -rf conftest*
23051   eval "ac_cv_func_$ac_func=no"
23052 fi
23053 rm -f conftest*
23054 fi
23055
23056 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
23057   echo "$ac_t""yes" 1>&6
23058     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
23059   cat >> confdefs.h <<EOF
23060 #define $ac_tr_func 1
23061 EOF
23062  
23063 else
23064   echo "$ac_t""no" 1>&6
23065 fi
23066 done
23067
23068 fi
23069
23070 for ac_func in \
23071         bcopy                   \
23072         closesocket             \
23073         chroot                  \
23074         endgrent                \
23075         endpwent                \
23076         fcntl                   \
23077         flock                   \
23078         fstat                   \
23079         getdtablesize   \
23080         getgrgid                \
23081         gethostname             \
23082         getpass                 \
23083         getpassphrase   \
23084         getpwuid                \
23085         getpwnam                \
23086         getspnam                \
23087         gettimeofday    \
23088         initgroups              \
23089         lockf                   \
23090         memcpy                  \
23091         memmove                 \
23092         mkstemp                 \
23093         mktemp                  \
23094         pipe                    \
23095         read                    \
23096         recv                    \
23097         recvfrom                \
23098         setpwfile               \
23099         setgid                  \
23100         setegid                 \
23101         setsid                  \
23102         setuid                  \
23103         seteuid                 \
23104         sigaction               \
23105         signal                  \
23106         sigset                  \
23107         strdup                  \
23108         strerror                \
23109         strpbrk                 \
23110         strrchr                 \
23111         strsep                  \
23112         strstr                  \
23113         strtol                  \
23114         strtoul                 \
23115         strtoq                  \
23116         strtouq                 \
23117         strtoll                 \
23118         strspn                  \
23119         sysconf                 \
23120         usleep                  \
23121         waitpid                 \
23122         wait4                   \
23123         write                   \
23124         send                    \
23125         sendmsg                 \
23126         sendto                  \
23127
23128 do
23129 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
23130 echo "configure:23131: checking for $ac_func" >&5
23131 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
23132   echo $ac_n "(cached) $ac_c" 1>&6
23133 else
23134   cat > conftest.$ac_ext <<EOF
23135 #line 23136 "configure"
23136 #include "confdefs.h"
23137 /* System header to define __stub macros and hopefully few prototypes,
23138     which can conflict with char $ac_func(); below.  */
23139 #include <assert.h>
23140 /* Override any gcc2 internal prototype to avoid an error.  */
23141 /* We use char because int might match the return type of a gcc2
23142     builtin and then its argument prototype would still apply.  */
23143 char $ac_func();
23144 char (*f)();
23145
23146 int main() {
23147
23148 /* The GNU C library defines this for functions which it implements
23149     to always fail with ENOSYS.  Some functions are actually named
23150     something starting with __ and the normal name is an alias.  */
23151 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
23152 choke me
23153 #else
23154 f = $ac_func;
23155 #endif
23156
23157 ; return 0; }
23158 EOF
23159 if { (eval echo configure:23160: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
23160   rm -rf conftest*
23161   eval "ac_cv_func_$ac_func=yes"
23162 else
23163   echo "configure: failed program was:" >&5
23164   cat conftest.$ac_ext >&5
23165   rm -rf conftest*
23166   eval "ac_cv_func_$ac_func=no"
23167 fi
23168 rm -f conftest*
23169 fi
23170
23171 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
23172   echo "$ac_t""yes" 1>&6
23173     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
23174   cat >> confdefs.h <<EOF
23175 #define $ac_tr_func 1
23176 EOF
23177  
23178 else
23179   echo "$ac_t""no" 1>&6
23180 fi
23181 done
23182
23183
23184 for ac_func in getopt getpeereid
23185 do
23186 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
23187 echo "configure:23188: checking for $ac_func" >&5
23188 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
23189   echo $ac_n "(cached) $ac_c" 1>&6
23190 else
23191   cat > conftest.$ac_ext <<EOF
23192 #line 23193 "configure"
23193 #include "confdefs.h"
23194 /* System header to define __stub macros and hopefully few prototypes,
23195     which can conflict with char $ac_func(); below.  */
23196 #include <assert.h>
23197 /* Override any gcc2 internal prototype to avoid an error.  */
23198 /* We use char because int might match the return type of a gcc2
23199     builtin and then its argument prototype would still apply.  */
23200 char $ac_func();
23201 char (*f)();
23202
23203 int main() {
23204
23205 /* The GNU C library defines this for functions which it implements
23206     to always fail with ENOSYS.  Some functions are actually named
23207     something starting with __ and the normal name is an alias.  */
23208 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
23209 choke me
23210 #else
23211 f = $ac_func;
23212 #endif
23213
23214 ; return 0; }
23215 EOF
23216 if { (eval echo configure:23217: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
23217   rm -rf conftest*
23218   eval "ac_cv_func_$ac_func=yes"
23219 else
23220   echo "configure: failed program was:" >&5
23221   cat conftest.$ac_ext >&5
23222   rm -rf conftest*
23223   eval "ac_cv_func_$ac_func=no"
23224 fi
23225 rm -f conftest*
23226 fi
23227
23228 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
23229   echo "$ac_t""yes" 1>&6
23230     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
23231   cat >> confdefs.h <<EOF
23232 #define $ac_tr_func 1
23233 EOF
23234  
23235 else
23236   echo "$ac_t""no" 1>&6
23237 LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
23238 fi
23239 done
23240
23241
23242
23243 if test "$ac_cv_func_getopt" != yes; then
23244         LIBSRCS="$LIBSRCS getopt.c"
23245 fi
23246 if test "$ac_cv_func_getpeereid" != yes; then
23247         echo $ac_n "checking for msg_accrights in msghdr""... $ac_c" 1>&6
23248 echo "configure:23249: checking for msg_accrights in msghdr" >&5
23249 if eval "test \"\${ol_cv_msghdr_msg_accrights+set}\" = set"; then
23250   echo $ac_n "(cached) $ac_c" 1>&6
23251 else
23252   cat > conftest.$ac_ext <<EOF
23253 #line 23254 "configure"
23254 #include "confdefs.h"
23255 #include <sys/socket.h>
23256 int main() {
23257 struct msghdr m; m.msg_accrightslen=0
23258 ; return 0; }
23259 EOF
23260 if { (eval echo configure:23261: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23261   rm -rf conftest*
23262   ol_cv_msghdr_msg_accrights=yes
23263 else
23264   echo "configure: failed program was:" >&5
23265   cat conftest.$ac_ext >&5
23266   rm -rf conftest*
23267   ol_cv_msghdr_msg_accrights=no
23268 fi
23269 rm -f conftest*
23270         
23271 fi
23272
23273 echo "$ac_t""$ol_cv_msghdr_msg_accrights" 1>&6
23274   if test $ol_cv_msghdr_msg_accrights = "yes" ; then
23275         cat >> confdefs.h <<\EOF
23276 #define HAVE_MSGHDR_MSG_ACCRIGHTS 1
23277 EOF
23278
23279   fi
23280
23281         LIBSRCS="$LIBSRCS getpeereid.c"
23282 fi
23283 if test "$ac_cv_func_snprintf" != yes -o "$ac_cv_func_vsnprintf" != yes; then
23284         if test "$ac_cv_func_snprintf" != yes; then
23285                 cat >> confdefs.h <<\EOF
23286 #define snprintf ber_pvt_snprintf
23287 EOF
23288
23289         fi
23290         if test "$ac_cv_func_vsnprintf" != yes; then
23291                 cat >> confdefs.h <<\EOF
23292 #define vsnprintf ber_pvt_vsnprintf
23293 EOF
23294
23295         fi
23296 fi
23297
23298 # Check Configuration
23299 echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6
23300 echo "configure:23301: checking declaration of sys_errlist" >&5
23301 if eval "test \"\${ol_cv_dcl_sys_errlist+set}\" = set"; then
23302   echo $ac_n "(cached) $ac_c" 1>&6
23303 else
23304   
23305         cat > conftest.$ac_ext <<EOF
23306 #line 23307 "configure"
23307 #include "confdefs.h"
23308
23309 #include <stdio.h>
23310 #include <sys/types.h>
23311 #include <errno.h>
23312 #ifdef WINNT
23313 #include <stdlib.h>
23314 #endif 
23315 int main() {
23316 char *c = (char *) *sys_errlist
23317 ; return 0; }
23318 EOF
23319 if { (eval echo configure:23320: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23320   rm -rf conftest*
23321   ol_cv_dcl_sys_errlist=yes
23322         ol_cv_have_sys_errlist=yes
23323 else
23324   echo "configure: failed program was:" >&5
23325   cat conftest.$ac_ext >&5
23326   rm -rf conftest*
23327   ol_cv_dcl_sys_errlist=no
23328 fi
23329 rm -f conftest*
23330 fi
23331
23332 echo "$ac_t""$ol_cv_dcl_sys_errlist" 1>&6
23333 #
23334 # It's possible (for near-UNIX clones) that sys_errlist doesn't exist
23335 if test $ol_cv_dcl_sys_errlist = no ; then
23336         cat >> confdefs.h <<\EOF
23337 #define DECL_SYS_ERRLIST 1
23338 EOF
23339
23340
23341         echo $ac_n "checking existence of sys_errlist""... $ac_c" 1>&6
23342 echo "configure:23343: checking existence of sys_errlist" >&5
23343 if eval "test \"\${ol_cv_have_sys_errlist+set}\" = set"; then
23344   echo $ac_n "(cached) $ac_c" 1>&6
23345 else
23346   
23347                 cat > conftest.$ac_ext <<EOF
23348 #line 23349 "configure"
23349 #include "confdefs.h"
23350 #include <errno.h>
23351 int main() {
23352 char *c = (char *) *sys_errlist
23353 ; return 0; }
23354 EOF
23355 if { (eval echo configure:23356: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
23356   rm -rf conftest*
23357   ol_cv_have_sys_errlist=yes
23358 else
23359   echo "configure: failed program was:" >&5
23360   cat conftest.$ac_ext >&5
23361   rm -rf conftest*
23362   ol_cv_have_sys_errlist=no
23363 fi
23364 rm -f conftest*
23365 fi
23366
23367 echo "$ac_t""$ol_cv_have_sys_errlist" 1>&6
23368 fi
23369 if test $ol_cv_have_sys_errlist = yes ; then
23370         cat >> confdefs.h <<\EOF
23371 #define HAVE_SYS_ERRLIST 1
23372 EOF
23373
23374 fi
23375
23376
23377
23378 if test "$ol_enable_slapi" != no ; then
23379                         for ac_hdr in ltdl.h
23380 do
23381 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
23382 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
23383 echo "configure:23384: checking for $ac_hdr" >&5
23384 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
23385   echo $ac_n "(cached) $ac_c" 1>&6
23386 else
23387   cat > conftest.$ac_ext <<EOF
23388 #line 23389 "configure"
23389 #include "confdefs.h"
23390 #include <$ac_hdr>
23391 EOF
23392 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
23393 { (eval echo configure:23394: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
23394 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
23395 if test -z "$ac_err"; then
23396   rm -rf conftest*
23397   eval "ac_cv_header_$ac_safe=yes"
23398 else
23399   echo "$ac_err" >&5
23400   echo "configure: failed program was:" >&5
23401   cat conftest.$ac_ext >&5
23402   rm -rf conftest*
23403   eval "ac_cv_header_$ac_safe=no"
23404 fi
23405 rm -f conftest*
23406 fi
23407 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
23408   echo "$ac_t""yes" 1>&6
23409     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
23410   cat >> confdefs.h <<EOF
23411 #define $ac_tr_hdr 1
23412 EOF
23413  
23414 else
23415   echo "$ac_t""no" 1>&6
23416 fi
23417 done
23418
23419
23420         if test $ac_cv_header_ltdl_h != yes ; then
23421                 { echo "configure: error: could not locate <ltdl.h>" 1>&2; exit 1; }
23422         fi
23423         echo $ac_n "checking for lt_dlinit in -lltdl""... $ac_c" 1>&6
23424 echo "configure:23425: checking for lt_dlinit in -lltdl" >&5
23425 ac_lib_var=`echo ltdl'_'lt_dlinit | sed 'y%./+-:%__p__%'`
23426 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
23427   echo $ac_n "(cached) $ac_c" 1>&6
23428 else
23429   ac_save_LIBS="$LIBS"
23430 LIBS="-lltdl  $LIBS"
23431 cat > conftest.$ac_ext <<EOF
23432 #line 23433 "configure"
23433 #include "confdefs.h"
23434 /* Override any gcc2 internal prototype to avoid an error.  */
23435 /* We use char because int might match the return type of a gcc2
23436     builtin and then its argument prototype would still apply.  */
23437 char lt_dlinit();
23438
23439 int main() {
23440 lt_dlinit()
23441 ; return 0; }
23442 EOF
23443 if { (eval echo configure:23444: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
23444   rm -rf conftest*
23445   eval "ac_cv_lib_$ac_lib_var=yes"
23446 else
23447   echo "configure: failed program was:" >&5
23448   cat conftest.$ac_ext >&5
23449   rm -rf conftest*
23450   eval "ac_cv_lib_$ac_lib_var=no"
23451 fi
23452 rm -f conftest*
23453 LIBS="$ac_save_LIBS"
23454
23455 fi
23456 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
23457   echo "$ac_t""yes" 1>&6
23458   
23459                 SLAPI_LIBS=-lltdl
23460                 LIBSLAPI=libslapi.a
23461                 LIBSLAPITOOLS=../libslapi.a
23462                 cat >> confdefs.h <<\EOF
23463 #define HAVE_LIBLTDL 1
23464 EOF
23465
23466         
23467 else
23468   echo "$ac_t""no" 1>&6
23469 { echo "configure: error: could not locate libtool -lltdl" 1>&2; exit 1; }
23470 fi
23471
23472
23473         cat >> confdefs.h <<\EOF
23474 #define LDAP_SLAPI 1
23475 EOF
23476
23477 fi
23478
23479 if test "$ol_enable_debug" != no ; then
23480         cat >> confdefs.h <<\EOF
23481 #define LDAP_DEBUG 1
23482 EOF
23483
23484 fi
23485 if test "$ol_enable_syslog" = yes ; then
23486         cat >> confdefs.h <<\EOF
23487 #define LDAP_SYSLOG 1
23488 EOF
23489
23490 fi
23491 if test "$ol_link_kbind" != no ; then
23492         cat >> confdefs.h <<\EOF
23493 #define LDAP_API_FEATURE_X_OPENLDAP_V2_KBIND LDAP_VENDOR_VERSION
23494 EOF
23495
23496 fi
23497 if test "$ol_enable_proctitle" != no ; then
23498         cat >> confdefs.h <<\EOF
23499 #define LDAP_PROCTITLE 1
23500 EOF
23501
23502 fi
23503 if test "$ol_enable_referrals" != no ; then
23504         cat >> confdefs.h <<\EOF
23505 #define LDAP_API_FEATURE_X_OPENLDAP_V2_REFERRALS LDAP_VENDOR_VERSION
23506 EOF
23507
23508 fi
23509 if test "$ol_enable_local" != no; then
23510         cat >> confdefs.h <<\EOF
23511 #define LDAP_PF_LOCAL 1
23512 EOF
23513
23514 fi
23515 if test "$ol_link_ipv6" != no; then
23516         cat >> confdefs.h <<\EOF
23517 #define LDAP_PF_INET6 1
23518 EOF
23519
23520 fi
23521 if test "$ol_enable_cleartext" != no ; then
23522         cat >> confdefs.h <<\EOF
23523 #define SLAPD_CLEARTEXT 1
23524 EOF
23525
23526 fi
23527 if test "$ol_enable_crypt" != no ; then
23528         cat >> confdefs.h <<\EOF
23529 #define SLAPD_CRYPT 1
23530 EOF
23531
23532 fi
23533 if test "$ol_link_kpasswd" != no ; then
23534         cat >> confdefs.h <<\EOF
23535 #define SLAPD_KPASSWD 1
23536 EOF
23537
23538 fi
23539 if test "$ol_link_spasswd" != no ; then
23540         cat >> confdefs.h <<\EOF
23541 #define SLAPD_SPASSWD 1
23542 EOF
23543
23544 fi
23545 if test "$ol_enable_multimaster" != no ; then
23546         cat >> confdefs.h <<\EOF
23547 #define SLAPD_MULTIMASTER 1
23548 EOF
23549
23550 fi
23551 if test "$ol_enable_rlookups" != no ; then
23552         cat >> confdefs.h <<\EOF
23553 #define SLAPD_RLOOKUPS 1
23554 EOF
23555
23556 fi
23557 if test "$ol_enable_aci" != no ; then
23558         cat >> confdefs.h <<\EOF
23559 #define SLAPD_ACI_ENABLED 1
23560 EOF
23561
23562 fi
23563
23564 if test "$ol_link_modules" != no ; then
23565         cat >> confdefs.h <<\EOF
23566 #define SLAPD_MODULES 1
23567 EOF
23568
23569         BUILD_SLAPD=yes
23570         SLAPD_MODULES_LDFLAGS="-dlopen self"
23571 fi
23572
23573 cat >> confdefs.h <<\EOF
23574 #define SLAPD_MOD_STATIC 1
23575 EOF
23576
23577 cat >> confdefs.h <<\EOF
23578 #define SLAPD_MOD_DYNAMIC 2
23579 EOF
23580
23581
23582 if test "$ol_enable_bdb" != no ; then
23583         cat >> confdefs.h <<\EOF
23584 #define SLAPD_BDB 1
23585 EOF
23586
23587         BUILD_SLAPD=yes
23588         BUILD_BDB=yes
23589         if test "$ol_with_bdb_module" != static ; then
23590                 cat >> confdefs.h <<\EOF
23591 #define SLAPD_BDB_DYNAMIC 1
23592 EOF
23593
23594                 BUILD_BDB=mod
23595                 BUILD_BDB_DYNAMIC=shared
23596                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-bdb"
23597         else
23598                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-bdb"
23599         fi
23600 fi
23601
23602 if test "$ol_link_dnssrv" != no ; then
23603         cat >> confdefs.h <<\EOF
23604 #define SLAPD_DNSSRV 1
23605 EOF
23606
23607         BUILD_SLAPD=yes
23608         BUILD_DNSSRV=yes
23609         if test "$ol_with_dnssrv_module" != static ; then
23610                 cat >> confdefs.h <<\EOF
23611 #define SLAPD_DNSSRV_DYNAMIC 1
23612 EOF
23613
23614                 BUILD_DNSSRV=mod
23615                 BUILD_DNSSRV_DYNAMIC=shared
23616                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-dnssrv"
23617         else
23618                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-dnssrv"
23619         fi
23620 fi
23621
23622 if test "$ol_enable_hdb" != no ; then
23623         cat >> confdefs.h <<\EOF
23624 #define SLAPD_HDB 1
23625 EOF
23626
23627         BUILD_SLAPD=yes
23628         BUILD_HDB=yes
23629         if test "$ol_with_hdb_module" != static ; then
23630                 cat >> confdefs.h <<\EOF
23631 #define SLAPD_HDB_DYNAMIC 1
23632 EOF
23633
23634                 BUILD_HDB=mod
23635                 BUILD_HDB_DYNAMIC=shared
23636                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-hdb"
23637         else
23638                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-hdb"
23639         fi
23640 fi
23641
23642 if test "$ol_enable_ldap" != no ; then
23643         cat >> confdefs.h <<\EOF
23644 #define SLAPD_LDAP 1
23645 EOF
23646
23647         BUILD_SLAPD=yes
23648         BUILD_LDAP=yes
23649         if test "$ol_with_ldap_module" != static ; then
23650                 cat >> confdefs.h <<\EOF
23651 #define SLAPD_LDAP_DYNAMIC 1
23652 EOF
23653
23654                 BUILD_LDAP=mod
23655                 BUILD_LDAP_DYNAMIC=shared
23656                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-ldap"
23657         else
23658                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-ldap"
23659         fi
23660 fi
23661
23662 if test "$ol_link_ldbm" != no -a $ol_enable_ldbm != no; then
23663         cat >> confdefs.h <<\EOF
23664 #define SLAPD_LDBM 1
23665 EOF
23666
23667         BUILD_SLAPD=yes
23668         BUILD_LDBM=yes
23669         if test "$ol_with_ldbm_module" != static ; then
23670                 cat >> confdefs.h <<\EOF
23671 #define SLAPD_LDBM_DYNAMIC 1
23672 EOF
23673
23674                 BUILD_LDBM=mod
23675                 BUILD_LDBM_DYNAMIC=shared
23676                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-ldbm"
23677         else
23678                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-ldbm"
23679         fi
23680 fi
23681
23682 if test "$ol_enable_meta" != no ; then
23683         if test "$ol_enable_ldap" = no ; then
23684                 { echo "configure: error: need --enable-ldap to use --enable-meta" 1>&2; exit 1; }
23685         fi
23686         if test "$ol_enable_rewrite" = no ; then
23687                 { echo "configure: error: need --enable-rewrite to use --enable-meta" 1>&2; exit 1; }
23688         fi
23689         cat >> confdefs.h <<\EOF
23690 #define SLAPD_META 1
23691 EOF
23692
23693         BUILD_SLAPD=yes
23694         BUILD_META=yes
23695         BUILD_REWRITE=yes
23696         if test "$ol_with_meta_module" != static ; then
23697                 cat >> confdefs.h <<\EOF
23698 #define SLAPD_META_DYNAMIC 1
23699 EOF
23700
23701                 BUILD_META=mod
23702                 BUILD_META_DYNAMIC=shared
23703                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-meta"
23704         else
23705                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-meta"
23706         fi
23707 fi
23708
23709 if test "$ol_enable_monitor" != no ; then
23710         cat >> confdefs.h <<\EOF
23711 #define SLAPD_MONITOR 1
23712 EOF
23713
23714         BUILD_SLAPD=yes
23715         BUILD_MONITOR=yes
23716         if test "$ol_with_monitor_module" != static ; then
23717                 cat >> confdefs.h <<\EOF
23718 #define SLAPD_MONITOR_DYNAMIC 1
23719 EOF
23720
23721                 BUILD_MONITOR=mod
23722                 BUILD_MONITOR_DYNAMIC=shared
23723                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-monitor"
23724         else
23725                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-monitor"
23726         fi
23727 fi
23728
23729 if test "$ol_enable_null" != no ; then
23730         cat >> confdefs.h <<\EOF
23731 #define SLAPD_NULL 1
23732 EOF
23733
23734         BUILD_SLAPD=yes
23735         BUILD_NULL=yes
23736         if test "$ol_with_null_module" != static ; then
23737                 cat >> confdefs.h <<\EOF
23738 #define SLAPD_NULL_DYNAMIC 1
23739 EOF
23740
23741                 BUILD_NULL=mod
23742                 BUILD_NULL_DYNAMIC=shared
23743                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-null"
23744         else
23745                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-null"
23746         fi
23747 fi
23748
23749 if test "$ol_enable_passwd" != no ; then
23750         cat >> confdefs.h <<\EOF
23751 #define SLAPD_PASSWD 1
23752 EOF
23753
23754         BUILD_SLAPD=yes
23755         BUILD_PASSWD=yes
23756         if test "$ol_with_passwd_module" != static ; then
23757                 cat >> confdefs.h <<\EOF
23758 #define SLAPD_PASSWD_DYNAMIC 1
23759 EOF
23760
23761                 BUILD_PASSWD=mod
23762                 BUILD_PASSWD_DYNAMIC=shared
23763                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-passwd"
23764         else
23765                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-passwd"
23766         fi
23767 fi
23768
23769 if test "$ol_link_perl" != no ; then
23770         cat >> confdefs.h <<\EOF
23771 #define SLAPD_PERL 1
23772 EOF
23773
23774         BUILD_SLAPD=yes
23775         BUILD_PERL=yes
23776         if test "$ol_with_perl_module" != static ; then
23777                 cat >> confdefs.h <<\EOF
23778 #define SLAPD_PERL_DYNAMIC 1
23779 EOF
23780
23781                 BUILD_PERL=mod
23782                 BUILD_PERL_DYNAMIC=shared
23783                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-perl"
23784         else
23785                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-perl"
23786         fi
23787 fi
23788
23789 if test "$ol_enable_shell" != no ; then
23790         if test "$ol_link_thread" != no ; then
23791                 echo "configure: warning: Use of --without-threads is recommended with back-shell" 1>&2
23792         fi
23793         cat >> confdefs.h <<\EOF
23794 #define SLAPD_SHELL 1
23795 EOF
23796
23797         BUILD_SLAPD=yes
23798         BUILD_SHELL=yes
23799         if test "$ol_with_shell_module" != static ; then
23800                 cat >> confdefs.h <<\EOF
23801 #define SLAPD_SHELL_DYNAMIC 1
23802 EOF
23803
23804                 BUILD_SHELL=mod
23805                 BUILD_SHELL_DYNAMIC=shared
23806                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-shell"
23807         else
23808                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-shell"
23809         fi
23810 fi
23811
23812 if test "$ol_link_sql" != no ; then
23813         cat >> confdefs.h <<\EOF
23814 #define SLAPD_SQL 1
23815 EOF
23816
23817         BUILD_SLAPD=yes
23818         BUILD_SQL=yes
23819         if test "$ol_with_sql_module" != static; then
23820                 cat >> confdefs.h <<\EOF
23821 #define SLAPD_SQL_DYNAMIC 1
23822 EOF
23823
23824                 BUILD_SQL=mod
23825                 BUILD_SQL_DYNAMIC=shared
23826                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-sql"
23827         else
23828                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-sql"
23829         fi
23830 fi
23831
23832 if test "$ol_with_dyngroup" != no ; then
23833         BUILD_DYNGROUP=$ol_with_dyngroup
23834         if test "$ol_with_dyngroup" = mod ; then
23835                 MFLAG=SLAPD_MOD_DYNAMIC
23836                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS dyngroup.la"
23837         else
23838                 MFLAG=SLAPD_MOD_STATIC
23839         fi
23840         cat >> confdefs.h <<EOF
23841 #define SLAPD_OVER_DYNGROUP $MFLAG
23842 EOF
23843
23844 fi
23845
23846 if test "$ol_with_proxycache" != no ; then
23847         BUILD_PROXYCACHE=$ol_with_proxycache
23848         if test "$ol_with_proxycache" = mod ; then
23849                 MFLAG=SLAPD_MOD_DYNAMIC
23850                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS pcache.la"
23851         else
23852                 MFLAG=SLAPD_MOD_STATIC
23853         fi
23854         cat >> confdefs.h <<EOF
23855 #define SLAPD_OVER_PROXYCACHE $MFLAG
23856 EOF
23857
23858 fi
23859
23860 if test "$ol_with_rwm " != no ; then
23861         BUILD_REWRITE=yes
23862         BUILD_RWM=$ol_with_rwm
23863         if test "$ol_with_rwm" = mod ; then
23864                 MFLAG=SLAPD_MOD_DYNAMIC
23865                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS rwm.la"
23866         else
23867                 MFLAG=SLAPD_MOD_STATIC
23868         fi
23869         cat >> confdefs.h <<EOF
23870 #define SLAPD_OVER_RWM $MFLAG
23871 EOF
23872
23873 fi
23874
23875 if test "$ol_enable_slurpd" != no -a "$ol_link_threads" != no -a \
23876         $BUILD_SLAPD = yes ; then
23877         BUILD_SLURPD=yes
23878 fi
23879
23880 if test "$ol_enable_rewrite" != no ; then
23881         cat >> confdefs.h <<\EOF
23882 #define ENABLE_REWRITE 1
23883 EOF
23884
23885         BUILD_REWRITE=yes
23886 fi
23887
23888 if test "$ol_enable_slapi" != no ; then
23889         cat >> confdefs.h <<\EOF
23890 #define ENABLE_SLAPI 1
23891 EOF
23892
23893         BUILD_SLAPI=yes
23894         SLAPD_SLAPI_DEPEND=libslapi.a
23895 fi
23896
23897
23898
23899 if test "$ac_cv_mingw32" = yes ; then
23900         PLAT=NT
23901         SLAPD_MODULES_LDFLAGS=
23902 else
23903         PLAT=UNIX
23904 fi
23905
23906 if test -z "$SLAPD_STATIC_BACKENDS"; then
23907         SLAPD_NO_STATIC='#'
23908 else
23909         SLAPD_NO_STATIC=
23910 fi
23911
23912
23913
23914
23915
23916
23917
23918   
23919   
23920   
23921   
23922   
23923   
23924   
23925   
23926   
23927   
23928   
23929   
23930   
23931   
23932   
23933   
23934   
23935   
23936   
23937   
23938   
23939   
23940   
23941   
23942   
23943   
23944   
23945   
23946   
23947
23948
23949
23950
23951
23952
23953
23954
23955
23956
23957
23958
23959
23960
23961
23962
23963
23964
23965
23966
23967
23968
23969
23970
23971
23972
23973
23974
23975
23976
23977
23978
23979
23980
23981
23982
23983
23984
23985 # Check whether --with-xxinstall or --without-xxinstall was given.
23986 if test "${with_xxinstall+set}" = set; then
23987   withval="$with_xxinstall"
23988   :
23989 fi
23990
23991
23992
23993 trap '' 1 2 15
23994
23995 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
23996
23997 test "x$prefix" = xNONE && prefix=$ac_default_prefix
23998 # Let make expand exec_prefix.
23999 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
24000
24001 # Any assignment to VPATH causes Sun make to only execute
24002 # the first set of double-colon rules, so remove it if not needed.
24003 # If there is a colon in the path, we need to keep it.
24004 if test "x$srcdir" = x.; then
24005   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
24006 fi
24007
24008 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
24009
24010 DEFS=-DHAVE_CONFIG_H
24011
24012 # Without the "./", some shells look in PATH for config.status.
24013 : ${CONFIG_STATUS=./config.status}
24014
24015 echo creating $CONFIG_STATUS
24016 rm -f $CONFIG_STATUS
24017 cat > $CONFIG_STATUS <<EOF
24018 #! /bin/sh
24019 # Generated automatically by configure.
24020 # Run this file to recreate the current configuration.
24021 # This directory was configured as follows,
24022 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
24023 #
24024 # $0 $ac_configure_args
24025 #
24026 # Compiler output produced by configure, useful for debugging
24027 # configure, is in ./config.log if it exists.
24028
24029 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
24030 for ac_option
24031 do
24032   case "\$ac_option" in
24033   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
24034     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
24035     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
24036   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
24037     echo "$CONFIG_STATUS generated by autoconf version 2.13.1"
24038     exit 0 ;;
24039   -help | --help | --hel | --he | --h)
24040     echo "\$ac_cs_usage"; exit 0 ;;
24041   *) echo "\$ac_cs_usage"; exit 1 ;;
24042   esac
24043 done
24044
24045 ac_given_srcdir=$srcdir
24046 ac_given_INSTALL="$INSTALL"
24047
24048 trap 'rm -fr `echo "\
24049 Makefile:build/top.mk:Makefile.in:build/dir.mk \
24050 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
24051 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
24052 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
24053 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
24054 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
24055 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
24056 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
24057 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
24058 include/Makefile:build/top.mk:include/Makefile.in \
24059 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
24060 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
24061 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
24062 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
24063 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk  \
24064 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
24065 libraries/librewrite/Makefile:build/top.mk:libraries/librewrite/Makefile.in:build/lib.mk:build/lib-static.mk \
24066 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
24067 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
24068 servers/slapd/back-bdb/Makefile:build/top.mk:servers/slapd/back-bdb/Makefile.in:build/mod.mk \
24069 servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
24070 servers/slapd/back-hdb/Makefile:build/top.mk:servers/slapd/back-hdb/Makefile.in:build/mod.mk \
24071 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
24072 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
24073 servers/slapd/back-meta/Makefile:build/top.mk:servers/slapd/back-meta/Makefile.in:build/mod.mk \
24074 servers/slapd/back-monitor/Makefile:build/top.mk:servers/slapd/back-monitor/Makefile.in:build/mod.mk \
24075 servers/slapd/back-null/Makefile:build/top.mk:servers/slapd/back-null/Makefile.in:build/mod.mk \
24076 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
24077 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
24078 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
24079 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
24080 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
24081 servers/slapd/slapi/Makefile:build/top.mk:servers/slapd/slapi/Makefile.in:build/lib.mk:build/lib-shared.mk  \
24082 servers/slapd/overlays/Makefile:build/top.mk:servers/slapd/overlays/Makefile.in:build/lib.mk \
24083 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
24084 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
24085 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
24086 tests/run \
24087 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
24088  include/portable.h include/ldap_features.h include/lber_types.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
24089 EOF
24090 cat >> $CONFIG_STATUS <<EOF
24091
24092 # Protect against being on the right side of a sed subst in config.status.
24093 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
24094  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
24095 $ac_vpsub
24096 $extrasub
24097 s%@SHELL@%$SHELL%g
24098 s%@CFLAGS@%$CFLAGS%g
24099 s%@CPPFLAGS@%$CPPFLAGS%g
24100 s%@CXXFLAGS@%$CXXFLAGS%g
24101 s%@FFLAGS@%$FFLAGS%g
24102 s%@DEFS@%$DEFS%g
24103 s%@LDFLAGS@%$LDFLAGS%g
24104 s%@LIBS@%$LIBS%g
24105 s%@exec_prefix@%$exec_prefix%g
24106 s%@prefix@%$prefix%g
24107 s%@program_transform_name@%$program_transform_name%g
24108 s%@bindir@%$bindir%g
24109 s%@sbindir@%$sbindir%g
24110 s%@libexecdir@%$libexecdir%g
24111 s%@datadir@%$datadir%g
24112 s%@sysconfdir@%$sysconfdir%g
24113 s%@sharedstatedir@%$sharedstatedir%g
24114 s%@localstatedir@%$localstatedir%g
24115 s%@libdir@%$libdir%g
24116 s%@includedir@%$includedir%g
24117 s%@oldincludedir@%$oldincludedir%g
24118 s%@infodir@%$infodir%g
24119 s%@mandir@%$mandir%g
24120 s%@host@%$host%g
24121 s%@host_alias@%$host_alias%g
24122 s%@host_cpu@%$host_cpu%g
24123 s%@host_vendor@%$host_vendor%g
24124 s%@host_os@%$host_os%g
24125 s%@target@%$target%g
24126 s%@target_alias@%$target_alias%g
24127 s%@target_cpu@%$target_cpu%g
24128 s%@target_vendor@%$target_vendor%g
24129 s%@target_os@%$target_os%g
24130 s%@build@%$build%g
24131 s%@build_alias@%$build_alias%g
24132 s%@build_cpu@%$build_cpu%g
24133 s%@build_vendor@%$build_vendor%g
24134 s%@build_os@%$build_os%g
24135 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
24136 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
24137 s%@INSTALL_DATA@%$INSTALL_DATA%g
24138 s%@PACKAGE@%$PACKAGE%g
24139 s%@VERSION@%$VERSION%g
24140 s%@ACLOCAL@%$ACLOCAL%g
24141 s%@AUTOCONF@%$AUTOCONF%g
24142 s%@AUTOMAKE@%$AUTOMAKE%g
24143 s%@AUTOHEADER@%$AUTOHEADER%g
24144 s%@MAKEINFO@%$MAKEINFO%g
24145 s%@install_sh@%$install_sh%g
24146 s%@AMTAR@%$AMTAR%g
24147 s%@AWK@%$AWK%g
24148 s%@AMTARFLAGS@%$AMTARFLAGS%g
24149 s%@SET_MAKE@%$SET_MAKE%g
24150 s%@OPENLDAP_LIBVERSION@%$OPENLDAP_LIBVERSION%g
24151 s%@OPENLDAP_RELEASE_DATE@%$OPENLDAP_RELEASE_DATE%g
24152 s%@top_builddir@%$top_builddir%g
24153 s%@ldap_subdir@%$ldap_subdir%g
24154 s%@CC@%$CC%g
24155 s%@AR@%$AR%g
24156 s%@LN_S@%$LN_S%g
24157 s%@OBJEXT@%$OBJEXT%g
24158 s%@EXEEXT@%$EXEEXT%g
24159 s%@ECHO@%$ECHO%g
24160 s%@RANLIB@%$RANLIB%g
24161 s%@STRIP@%$STRIP%g
24162 s%@DLLTOOL@%$DLLTOOL%g
24163 s%@AS@%$AS%g
24164 s%@OBJDUMP@%$OBJDUMP%g
24165 s%@CPP@%$CPP%g
24166 s%@LIBTOOL@%$LIBTOOL%g
24167 s%@LN_H@%$LN_H%g
24168 s%@PERLBIN@%$PERLBIN%g
24169 s%@OL_MKDEP@%$OL_MKDEP%g
24170 s%@OL_MKDEP_FLAGS@%$OL_MKDEP_FLAGS%g
24171 s%@LTSTATIC@%$LTSTATIC%g
24172 s%@LIBOBJS@%$LIBOBJS%g
24173 s%@LIBSRCS@%$LIBSRCS%g
24174 s%@PLAT@%$PLAT%g
24175 s%@WITH_TLS@%$WITH_TLS%g
24176 s%@BUILD_LIBS_DYNAMIC@%$BUILD_LIBS_DYNAMIC%g
24177 s%@BUILD_SLAPD@%$BUILD_SLAPD%g
24178 s%@BUILD_SLAPI@%$BUILD_SLAPI%g
24179 s%@SLAPD_SLAPI_DEPEND@%$SLAPD_SLAPI_DEPEND%g
24180 s%@BUILD_BDB@%$BUILD_BDB%g
24181 s%@BUILD_DNSSRV@%$BUILD_DNSSRV%g
24182 s%@BUILD_HDB@%$BUILD_HDB%g
24183 s%@BUILD_LDAP@%$BUILD_LDAP%g
24184 s%@BUILD_LDBM@%$BUILD_LDBM%g
24185 s%@BUILD_META@%$BUILD_META%g
24186 s%@BUILD_MONITOR@%$BUILD_MONITOR%g
24187 s%@BUILD_NULL@%$BUILD_NULL%g
24188 s%@BUILD_PASSWD@%$BUILD_PASSWD%g
24189 s%@BUILD_PERL@%$BUILD_PERL%g
24190 s%@BUILD_SHELL@%$BUILD_SHELL%g
24191 s%@BUILD_SQL@%$BUILD_SQL%g
24192 s%@BUILD_BDB_DYNAMIC@%$BUILD_BDB_DYNAMIC%g
24193 s%@BUILD_DNSSRV_DYNAMIC@%$BUILD_DNSSRV_DYNAMIC%g
24194 s%@BUILD_HDB_DYNAMIC@%$BUILD_HDB_DYNAMIC%g
24195 s%@BUILD_LDAP_DYNAMIC@%$BUILD_LDAP_DYNAMIC%g
24196 s%@BUILD_LDBM_DYNAMIC@%$BUILD_LDBM_DYNAMIC%g
24197 s%@BUILD_META_DYNAMIC@%$BUILD_META_DYNAMIC%g
24198 s%@BUILD_MONITOR_DYNAMIC@%$BUILD_MONITOR_DYNAMIC%g
24199 s%@BUILD_NULL_DYNAMIC@%$BUILD_NULL_DYNAMIC%g
24200 s%@BUILD_PASSWD_DYNAMIC@%$BUILD_PASSWD_DYNAMIC%g
24201 s%@BUILD_PERL_DYNAMIC@%$BUILD_PERL_DYNAMIC%g
24202 s%@BUILD_SHELL_DYNAMIC@%$BUILD_SHELL_DYNAMIC%g
24203 s%@BUILD_SQL_DYNAMIC@%$BUILD_SQL_DYNAMIC%g
24204 s%@BUILD_DYNGROUP@%$BUILD_DYNGROUP%g
24205 s%@BUILD_PROXYCACHE@%$BUILD_PROXYCACHE%g
24206 s%@BUILD_RWM@%$BUILD_RWM%g
24207 s%@BUILD_SLURPD@%$BUILD_SLURPD%g
24208 s%@LDAP_LIBS@%$LDAP_LIBS%g
24209 s%@SLAPD_LIBS@%$SLAPD_LIBS%g
24210 s%@SLURPD_LIBS@%$SLURPD_LIBS%g
24211 s%@LDBM_LIBS@%$LDBM_LIBS%g
24212 s%@LTHREAD_LIBS@%$LTHREAD_LIBS%g
24213 s%@LUTIL_LIBS@%$LUTIL_LIBS%g
24214 s%@WRAP_LIBS@%$WRAP_LIBS%g
24215 s%@SLAPD_MODULES_CPPFLAGS@%$SLAPD_MODULES_CPPFLAGS%g
24216 s%@SLAPD_MODULES_LDFLAGS@%$SLAPD_MODULES_LDFLAGS%g
24217 s%@SLAPD_NO_STATIC@%$SLAPD_NO_STATIC%g
24218 s%@SLAPD_STATIC_BACKENDS@%$SLAPD_STATIC_BACKENDS%g
24219 s%@SLAPD_DYNAMIC_BACKENDS@%$SLAPD_DYNAMIC_BACKENDS%g
24220 s%@SLAPD_DYNAMIC_OVERLAYS@%$SLAPD_DYNAMIC_OVERLAYS%g
24221 s%@PERL_CPPFLAGS@%$PERL_CPPFLAGS%g
24222 s%@SLAPD_PERL_LDFLAGS@%$SLAPD_PERL_LDFLAGS%g
24223 s%@MOD_PERL_LDFLAGS@%$MOD_PERL_LDFLAGS%g
24224 s%@KRB4_LIBS@%$KRB4_LIBS%g
24225 s%@KRB5_LIBS@%$KRB5_LIBS%g
24226 s%@SASL_LIBS@%$SASL_LIBS%g
24227 s%@TLS_LIBS@%$TLS_LIBS%g
24228 s%@MODULES_LIBS@%$MODULES_LIBS%g
24229 s%@SLAPI_LIBS@%$SLAPI_LIBS%g
24230 s%@LIBSLAPI@%$LIBSLAPI%g
24231 s%@LIBSLAPITOOLS@%$LIBSLAPITOOLS%g
24232 s%@AUTH_LIBS@%$AUTH_LIBS%g
24233 s%@SLAPD_SLP_LIBS@%$SLAPD_SLP_LIBS%g
24234 s%@SLAPD_SQL_LDFLAGS@%$SLAPD_SQL_LDFLAGS%g
24235 s%@SLAPD_SQL_LIBS@%$SLAPD_SQL_LIBS%g
24236 s%@SLAPD_SQL_INCLUDES@%$SLAPD_SQL_INCLUDES%g
24237
24238 CEOF
24239 EOF
24240
24241 cat >> $CONFIG_STATUS <<\EOF
24242
24243 # Split the substitutions into bite-sized pieces for seds with
24244 # small command number limits, like on Digital OSF/1 and HP-UX.
24245 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
24246 ac_file=1 # Number of current file.
24247 ac_beg=1 # First line for current file.
24248 ac_end=$ac_max_sed_cmds # Line after last line for current file.
24249 ac_more_lines=:
24250 ac_sed_cmds=""
24251 while $ac_more_lines; do
24252   if test $ac_beg -gt 1; then
24253     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
24254   else
24255     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
24256   fi
24257   if test ! -s conftest.s$ac_file; then
24258     ac_more_lines=false
24259     rm -f conftest.s$ac_file
24260   else
24261     if test -z "$ac_sed_cmds"; then
24262       ac_sed_cmds="sed -f conftest.s$ac_file"
24263     else
24264       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
24265     fi
24266     ac_file=`expr $ac_file + 1`
24267     ac_beg=$ac_end
24268     ac_end=`expr $ac_end + $ac_max_sed_cmds`
24269   fi
24270 done
24271 if test -z "$ac_sed_cmds"; then
24272   ac_sed_cmds=cat
24273 fi
24274 EOF
24275
24276 cat >> $CONFIG_STATUS <<EOF
24277
24278 CONFIG_FILES=\${CONFIG_FILES-"\
24279 Makefile:build/top.mk:Makefile.in:build/dir.mk \
24280 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
24281 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
24282 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
24283 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
24284 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
24285 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
24286 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
24287 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
24288 include/Makefile:build/top.mk:include/Makefile.in \
24289 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
24290 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
24291 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
24292 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
24293 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk  \
24294 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
24295 libraries/librewrite/Makefile:build/top.mk:libraries/librewrite/Makefile.in:build/lib.mk:build/lib-static.mk \
24296 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
24297 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
24298 servers/slapd/back-bdb/Makefile:build/top.mk:servers/slapd/back-bdb/Makefile.in:build/mod.mk \
24299 servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
24300 servers/slapd/back-hdb/Makefile:build/top.mk:servers/slapd/back-hdb/Makefile.in:build/mod.mk \
24301 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
24302 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
24303 servers/slapd/back-meta/Makefile:build/top.mk:servers/slapd/back-meta/Makefile.in:build/mod.mk \
24304 servers/slapd/back-monitor/Makefile:build/top.mk:servers/slapd/back-monitor/Makefile.in:build/mod.mk \
24305 servers/slapd/back-null/Makefile:build/top.mk:servers/slapd/back-null/Makefile.in:build/mod.mk \
24306 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
24307 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
24308 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
24309 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
24310 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
24311 servers/slapd/slapi/Makefile:build/top.mk:servers/slapd/slapi/Makefile.in:build/lib.mk:build/lib-shared.mk  \
24312 servers/slapd/overlays/Makefile:build/top.mk:servers/slapd/overlays/Makefile.in:build/lib.mk \
24313 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
24314 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
24315 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
24316 tests/run \
24317 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
24318 "}
24319 EOF
24320 cat >> $CONFIG_STATUS <<\EOF
24321 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
24322   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
24323   case "$ac_file" in
24324   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
24325        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
24326   *) ac_file_in="${ac_file}.in" ;;
24327   esac
24328
24329   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
24330
24331   # Remove last slash and all that follows it.  Not all systems have dirname.
24332   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
24333   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
24334     # The file is in a subdirectory.
24335     test ! -d "$ac_dir" && mkdir "$ac_dir"
24336     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
24337     # A "../" for each directory in $ac_dir_suffix.
24338     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
24339   else
24340     ac_dir_suffix= ac_dots=
24341   fi
24342
24343   case "$ac_given_srcdir" in
24344   .)  srcdir=.
24345       if test -z "$ac_dots"; then top_srcdir=.
24346       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
24347   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
24348   *) # Relative path.
24349     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
24350     top_srcdir="$ac_dots$ac_given_srcdir" ;;
24351   esac
24352
24353   case "$ac_given_INSTALL" in
24354   [/$]*) INSTALL="$ac_given_INSTALL" ;;
24355   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
24356   esac
24357
24358   echo creating "$ac_file"
24359   rm -f "$ac_file"
24360   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
24361   case "$ac_file" in
24362   *[Mm]akefile*) ac_comsub="1i\\
24363 # $configure_input" ;;
24364   *) ac_comsub= ;;
24365   esac
24366
24367   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
24368   sed -e "$ac_comsub
24369 s%@configure_input@%$configure_input%g
24370 s%@srcdir@%$srcdir%g
24371 s%@top_srcdir@%$top_srcdir%g
24372 s%@INSTALL@%$INSTALL%g
24373 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
24374 fi; done
24375 rm -f conftest.s*
24376
24377 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
24378 # NAME is the cpp macro being defined and VALUE is the value it is being given.
24379 #
24380 # ac_d sets the value in "#define NAME VALUE" lines.
24381 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
24382 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
24383 ac_dC='\3'
24384 ac_dD='%g'
24385 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
24386 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
24387 ac_uB='\([      ]\)%\1#\2define\3'
24388 ac_uC=' '
24389 ac_uD='\4%g'
24390 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
24391 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
24392 ac_eB='$%\1#\2define\3'
24393 ac_eC=' '
24394 ac_eD='%g'
24395
24396 if test "${CONFIG_HEADERS+set}" != set; then
24397 EOF
24398 cat >> $CONFIG_STATUS <<EOF
24399   CONFIG_HEADERS="include/portable.h include/ldap_features.h include/lber_types.h"
24400 EOF
24401 cat >> $CONFIG_STATUS <<\EOF
24402 fi
24403 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
24404   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
24405   case "$ac_file" in
24406   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
24407        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
24408   *) ac_file_in="${ac_file}.in" ;;
24409   esac
24410
24411   echo creating $ac_file
24412
24413   rm -f conftest.frag conftest.in conftest.out
24414   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
24415   cat $ac_file_inputs > conftest.in
24416
24417 EOF
24418
24419 # Transform confdefs.h into a sed script conftest.vals that substitutes
24420 # the proper values into config.h.in to produce config.h.  And first:
24421 # Protect against being on the right side of a sed subst in config.status.
24422 # Protect against being in an unquoted here document in config.status.
24423 rm -f conftest.vals
24424 cat > conftest.hdr <<\EOF
24425 s/[\\&%]/\\&/g
24426 s%[\\$`]%\\&%g
24427 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
24428 s%ac_d%ac_u%gp
24429 s%ac_u%ac_e%gp
24430 EOF
24431 sed -n -f conftest.hdr confdefs.h > conftest.vals
24432 rm -f conftest.hdr
24433
24434 # This sed command replaces #undef with comments.  This is necessary, for
24435 # example, in the case of _POSIX_SOURCE, which is predefined and required
24436 # on some systems where configure will not decide to define it.
24437 cat >> conftest.vals <<\EOF
24438 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
24439 EOF
24440
24441 # Break up conftest.vals because some shells have a limit on
24442 # the size of here documents, and old seds have small limits too.
24443
24444 rm -f conftest.tail
24445 while :
24446 do
24447   ac_lines=`grep -c . conftest.vals`
24448   # grep -c gives empty output for an empty file on some AIX systems.
24449   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
24450   # Write a limited-size here document to conftest.frag.
24451   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
24452   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
24453   echo 'CEOF
24454   sed -f conftest.frag conftest.in > conftest.out
24455   rm -f conftest.in
24456   mv conftest.out conftest.in
24457 ' >> $CONFIG_STATUS
24458   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
24459   rm -f conftest.vals
24460   mv conftest.tail conftest.vals
24461 done
24462 rm -f conftest.vals
24463
24464 cat >> $CONFIG_STATUS <<\EOF
24465   rm -f conftest.frag conftest.h
24466   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
24467   cat conftest.in >> conftest.h
24468   rm -f conftest.in
24469   if cmp -s $ac_file conftest.h 2>/dev/null; then
24470     echo "$ac_file is unchanged"
24471     rm -f conftest.h
24472   else
24473     # Remove last slash and all that follows it.  Not all systems have dirname.
24474       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
24475       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
24476       # The file is in a subdirectory.
24477       test ! -d "$ac_dir" && mkdir "$ac_dir"
24478     fi
24479     rm -f $ac_file
24480     mv conftest.h $ac_file
24481   fi
24482 fi; done
24483
24484 EOF
24485 cat >> $CONFIG_STATUS <<EOF
24486
24487 EOF
24488 cat >> $CONFIG_STATUS <<\EOF
24489
24490 chmod +x tests/run
24491 date > stamp-h
24492 echo Please run \"make depend\" to build dependencies
24493
24494 exit 0
24495 EOF
24496 chmod +x $CONFIG_STATUS
24497 rm -fr confdefs* $ac_clean_files
24498 test "$no_create" = yes || $SHELL $CONFIG_STATUS || exit 1
24499