]> git.sur5r.net Git - openldap/blob - configure
cleanup
[openldap] / configure
1 #! /bin/sh
2 # $OpenLDAP$
3 # from OpenLDAP: pkg/ldap/configure.in,v 1.531 2004/04/14 15:48:26 ando Exp  
4
5 # This work is part of OpenLDAP Software <http://www.openldap.org/>.
6 #
7 # Copyright 1998-2004 The OpenLDAP Foundation.
8 # All rights reserved.
9 #
10 # Redistribution and use in source and binary forms, with or without
11 # modification, are permitted only as authorized by the OpenLDAP
12 # Public License.
13 #
14 # A copy of this license is available in the file LICENSE in the
15 # top-level directory of the distribution or, alternatively, at
16 # <http://www.OpenLDAP.org/license.html>.
17
18 echo "Copyright 1998-2004 The OpenLDAP Foundation. All rights reserved."
19 echo "  Restrictions apply, see COPYRIGHT and LICENSE files."
20
21 # Guess values for system-dependent variables and create Makefiles.
22 # Generated automatically using autoconf version 2.13.1 
23 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
24 #
25 # This configure script is free software; the Free Software Foundation
26 # gives unlimited permission to copy, distribute and modify it.
27
28 # Defaults:
29 ac_help=
30 ac_default_prefix=/usr/local
31 # Any additions from configure.in:
32 ac_default_prefix=/usr/local
33 ac_help="$ac_help
34   --with-subdir=DIR       change default subdirectory used for installs"
35 ac_help="$ac_help
36   --enable-debug          enable debugging [yes]"
37 ac_help="$ac_help
38   --enable-dynamic        enable linking built binaries with dynamic libs [no]"
39 ac_help="$ac_help
40   --enable-syslog         enable syslog support [auto]"
41 ac_help="$ac_help
42   --enable-proctitle      enable proctitle support [yes]"
43 ac_help="$ac_help
44   --enable-ipv6           enable IPv6 support [auto]"
45 ac_help="$ac_help
46   --enable-local          enable AF_LOCAL (AF_UNIX) socket support [auto]"
47 ac_help="$ac_help
48   --with-cyrus-sasl       with Cyrus SASL support [auto]"
49 ac_help="$ac_help
50   --with-fetch            with fetch(3) URL support [auto]"
51 ac_help="$ac_help
52   --with-threads          with threads [auto]"
53 ac_help="$ac_help
54   --with-tls              with TLS/SSL support [auto]"
55 ac_help="$ac_help
56   --with-yielding-select  with implicitly yielding select [auto]"
57 ac_help="$ac_help
58
59 SLAPD (Standalone LDAP Daemon) Options:"
60 ac_help="$ac_help
61   --enable-slapd          enable building slapd [yes]"
62 ac_help="$ac_help
63     --enable-aci          enable per-object ACIs (experimental) [no]"
64 ac_help="$ac_help
65     --enable-cleartext    enable cleartext passwords [yes]"
66 ac_help="$ac_help
67     --enable-crypt        enable crypt(3) passwords [no]"
68 ac_help="$ac_help
69     --enable-lmpasswd     enable LAN Manager passwords [no]"
70 ac_help="$ac_help
71     --enable-spasswd      enable (Cyrus) SASL password verification [no]"
72 ac_help="$ac_help
73     --enable-modules      enable dynamic module support [no]"
74 ac_help="$ac_help
75     --enable-rewrite      enable DN rewriting in back-ldap and the rwm overlay [auto]"
76 ac_help="$ac_help
77     --enable-rlookups     enable reverse lookups of client hostnames [no]"
78 ac_help="$ac_help
79     --enable-slapi        enable SLAPI support (experimental) [no]"
80 ac_help="$ac_help
81     --enable-slp          enable SLPv2 support [no]"
82 ac_help="$ac_help
83     --enable-wrappers     enable tcp wrapper support [no]"
84 ac_help="$ac_help
85
86 SLAPD Backend Options:"
87 ac_help="$ac_help
88     --enable-bdb          enable Berkeley DB backend no|yes|mod [yes]"
89 ac_help="$ac_help
90     --enable-dnssrv       enable dnssrv backend no|yes|mod [no]"
91 ac_help="$ac_help
92     --enable-hdb          enable Hierarchical DB backend no|yes|mod [no]"
93 ac_help="$ac_help
94     --enable-ldap         enable ldap backend no|yes|mod [no]"
95 ac_help="$ac_help
96     --enable-ldbm         enable ldbm backend no|yes|mod [no]"
97 ac_help="$ac_help
98       --with-ldbm-api     with LDBM API auto|berkeley|bcompat|mdbm|gdbm [auto]"
99 ac_help="$ac_help
100       --with-ldbm-type    use LDBM type auto|btree|hash [auto]"
101 ac_help="$ac_help
102     --enable-meta         enable metadirectory backend no|yes|mod [no]"
103 ac_help="$ac_help
104     --enable-monitor      enable monitor backend no|yes|mod [yes]"
105 ac_help="$ac_help
106     --enable-null         enable null backend no|yes|mod [no]"
107 ac_help="$ac_help
108     --enable-passwd       enable passwd backend no|yes|mod [no]"
109 ac_help="$ac_help
110     --enable-perl         enable perl backend no|yes|mod [no]"
111 ac_help="$ac_help
112     --enable-relay        enable relay backend no|yes|mod [yes]"
113 ac_help="$ac_help
114     --enable-shell        enable shell backend no|yes|mod [no]"
115 ac_help="$ac_help
116     --enable-sql          enable sql backend no|yes|mod [no]"
117 ac_help="$ac_help
118
119 SLAPD Overlay Options:"
120 ac_help="$ac_help
121     --enable-chain        LDAP Chain Response no|yes|mod [no]"
122 ac_help="$ac_help
123     --enable-denyop       Deny Operation overlay no|yes|mod [no]"
124 ac_help="$ac_help
125     --enable-dyngroup     Dynamic Group overlay no|yes|mod [no]"
126 ac_help="$ac_help
127     --enable-lastmod      Last Modification overlay no|yes|mod [no]"
128 ac_help="$ac_help
129     --enable-ppolicy      Password Policy overlay no|yes|mod [no]"
130 ac_help="$ac_help
131     --enable-proxycache   Proxy Cache overlay no|yes|mod [no]"
132 ac_help="$ac_help
133     --enable-rwm          Rewrite/Remap overlay no|yes|mod [no]"
134 ac_help="$ac_help
135
136 SLURPD (Replication Daemon) Options:"
137 ac_help="$ac_help
138   --enable-slurpd         enable building slurpd [auto]"
139 ac_help="$ac_help
140
141 Library Generation & Linking Options"
142 ac_help="$ac_help
143   --enable-static[=PKGS]  build static libraries [default=yes]"
144 ac_help="$ac_help
145   --enable-shared[=PKGS]  build shared libraries [default=yes]"
146 ac_help="$ac_help
147   --enable-fast-install[=PKGS]  optimize for fast installation [default=yes]"
148 ac_help="$ac_help
149   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]"
150
151 # Find the correct PATH separator.  Usually this is `:', but
152 # DJGPP uses `;' like DOS.
153 if test "X${PATH_SEPARATOR+set}" != Xset; then
154   UNAME=${UNAME-`uname 2>/dev/null`}
155   case X$UNAME in
156     *-DOS) lt_cv_sys_path_separator=';' ;;
157     *)     lt_cv_sys_path_separator=':' ;;
158   esac
159   PATH_SEPARATOR=$lt_cv_sys_path_separator
160 fi
161
162
163 # Check that we are running under the correct shell.
164 SHELL=${CONFIG_SHELL-/bin/sh}
165
166 case X$ECHO in
167 X*--fallback-echo)
168   # Remove one level of quotation (which was required for Make).
169   ECHO=`echo "$ECHO" | sed 's,\\\\\$\\$0,'$0','`
170   ;;
171 esac
172
173 echo=${ECHO-echo}
174 if test "X$1" = X--no-reexec; then
175   # Discard the --no-reexec flag, and continue.
176   shift
177 elif test "X$1" = X--fallback-echo; then
178   # Avoid inline document here, it may be left over
179   :
180 elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then
181   # Yippee, $echo works!
182   :
183 else
184   # Restart under the correct shell.
185   exec $SHELL "$0" --no-reexec ${1+"$@"}
186 fi
187
188 if test "X$1" = X--fallback-echo; then
189   # used as fallback echo
190   shift
191   cat <<EOF
192
193 EOF
194   exit 0
195 fi
196
197 # The HP-UX ksh and POSIX shell print the target directory to stdout
198 # if CDPATH is set.
199 if test "X${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
200
201 if test -z "$ECHO"; then
202 if test "X${echo_test_string+set}" != Xset; then
203 # find a string as large as possible, as long as the shell can cope with it
204   for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do
205     # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
206     if (echo_test_string="`eval $cmd`") 2>/dev/null &&
207        echo_test_string="`eval $cmd`" &&
208        (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
209     then
210       break
211     fi
212   done
213 fi
214
215 if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
216    echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
217    test "X$echo_testing_string" = "X$echo_test_string"; then
218   :
219 else
220   # The Solaris, AIX, and Digital Unix default echo programs unquote
221   # backslashes.  This makes it impossible to quote backslashes using
222   #   echo "$something" | sed 's/\\/\\\\/g'
223   #
224   # So, first we look for a working echo in the user's PATH.
225
226   IFS="${IFS=   }"; save_ifs="$IFS"; IFS=$PATH_SEPARATOR
227   for dir in $PATH /usr/ucb; do
228     if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
229        test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
230        echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
231        test "X$echo_testing_string" = "X$echo_test_string"; then
232       echo="$dir/echo"
233       break
234     fi
235   done
236   IFS="$save_ifs"
237
238   if test "X$echo" = Xecho; then
239     # We didn't find a better echo, so look for alternatives.
240     if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
241        echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
242        test "X$echo_testing_string" = "X$echo_test_string"; then
243       # This shell has a builtin print -r that does the trick.
244       echo='print -r'
245     elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
246          test "X$CONFIG_SHELL" != X/bin/ksh; then
247       # If we have ksh, try running configure again with it.
248       ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
249       export ORIGINAL_CONFIG_SHELL
250       CONFIG_SHELL=/bin/ksh
251       export CONFIG_SHELL
252       exec $CONFIG_SHELL "$0" --no-reexec ${1+"$@"}
253     else
254       # Try using printf.
255       echo='printf %s\n'
256       if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
257          echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
258          test "X$echo_testing_string" = "X$echo_test_string"; then
259         # Cool, printf works
260         :
261       elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` &&
262            test "X$echo_testing_string" = 'X\t' &&
263            echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
264            test "X$echo_testing_string" = "X$echo_test_string"; then
265         CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
266         export CONFIG_SHELL
267         SHELL="$CONFIG_SHELL"
268         export SHELL
269         echo="$CONFIG_SHELL $0 --fallback-echo"
270       elif echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` &&
271            test "X$echo_testing_string" = 'X\t' &&
272            echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
273            test "X$echo_testing_string" = "X$echo_test_string"; then
274         echo="$CONFIG_SHELL $0 --fallback-echo"
275       else
276         # maybe with a smaller string...
277         prev=:
278
279         for cmd in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed 50q "$0"'; do
280           if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
281           then
282             break
283           fi
284           prev="$cmd"
285         done
286
287         if test "$prev" != 'sed 50q "$0"'; then
288           echo_test_string=`eval $prev`
289           export echo_test_string
290           exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "$0" ${1+"$@"}
291         else
292           # Oops.  We lost completely, so just stick with echo.
293           echo=echo
294         fi
295       fi
296     fi
297   fi
298 fi
299 fi
300
301 # Copy echo and quote the copy suitably for passing to libtool from
302 # the Makefile, instead of quoting the original, which is used later.
303 ECHO=$echo
304 if test "X$ECHO" = "X$CONFIG_SHELL $0 --fallback-echo"; then
305    ECHO="$CONFIG_SHELL \\\$\$0 --fallback-echo"
306 fi
307
308
309 ac_help="$ac_help
310   --disable-libtool-lock  avoid locking (might break parallel builds)"
311 ac_help="$ac_help
312   --with-pic              try to use only PIC/non-PIC objects [default=use both]"
313 ac_help="$ac_help
314
315 See INSTALL file for further details."
316
317 # Initialize some variables set by options.
318 # The variables have the same names as the options, with
319 # dashes changed to underlines.
320 build=NONE
321 cache_file=./config.cache
322 exec_prefix=NONE
323 host=NONE
324 no_create=
325 nonopt=NONE
326 no_recursion=
327 prefix=NONE
328 program_prefix=NONE
329 program_suffix=NONE
330 program_transform_name=s,x,x,
331 silent=
332 site=
333 srcdir=
334 target=NONE
335 verbose=
336 x_includes=NONE
337 x_libraries=NONE
338 bindir='${exec_prefix}/bin'
339 sbindir='${exec_prefix}/sbin'
340 libexecdir='${exec_prefix}/libexec'
341 datadir='${prefix}/share'
342 sysconfdir='${prefix}/etc'
343 sharedstatedir='${prefix}/com'
344 localstatedir='${prefix}/var'
345 libdir='${exec_prefix}/lib'
346 includedir='${prefix}/include'
347 oldincludedir='/usr/include'
348 infodir='${prefix}/info'
349 mandir='${prefix}/man'
350
351 # Initialize some other variables.
352 subdirs=
353 MFLAGS= MAKEFLAGS=
354 SHELL=${CONFIG_SHELL-/bin/sh}
355 # Maximum number of lines to put in a shell here document.
356 ac_max_here_lines=12
357
358 ac_prev=
359 for ac_option
360 do
361
362   # If the previous option needs an argument, assign it.
363   if test -n "$ac_prev"; then
364     eval "$ac_prev=\$ac_option"
365     ac_prev=
366     continue
367   fi
368
369   case "$ac_option" in
370   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
371   *) ac_optarg= ;;
372   esac
373
374   # Accept the important Cygnus configure options, so we can diagnose typos.
375
376   case "$ac_option" in
377
378   -bindir | --bindir | --bindi | --bind | --bin | --bi)
379     ac_prev=bindir ;;
380   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
381     bindir="$ac_optarg" ;;
382
383   -build | --build | --buil | --bui | --bu)
384     ac_prev=build ;;
385   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
386     build="$ac_optarg" ;;
387
388   -cache-file | --cache-file | --cache-fil | --cache-fi \
389   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
390     ac_prev=cache_file ;;
391   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
392   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
393     cache_file="$ac_optarg" ;;
394
395   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
396     ac_prev=datadir ;;
397   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
398   | --da=*)
399     datadir="$ac_optarg" ;;
400
401   -disable-* | --disable-*)
402     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
403     # Reject names that are not valid shell variable names.
404     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
405       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
406     fi
407     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
408     eval "enable_${ac_feature}=no" ;;
409
410   -enable-* | --enable-*)
411     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
412     # Reject names that are not valid shell variable names.
413     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
414       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
415     fi
416     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
417     case "$ac_option" in
418       *=*) ;;
419       *) ac_optarg=yes ;;
420     esac
421     eval "enable_${ac_feature}='$ac_optarg'" ;;
422
423   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
424   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
425   | --exec | --exe | --ex)
426     ac_prev=exec_prefix ;;
427   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
428   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
429   | --exec=* | --exe=* | --ex=*)
430     exec_prefix="$ac_optarg" ;;
431
432   -gas | --gas | --ga | --g)
433     # Obsolete; use --with-gas.
434     with_gas=yes ;;
435
436   -help | --help | --hel | --he)
437     # Omit some internal or obsolete options to make the list less imposing.
438     # This message is too long to be a string in the A/UX 3.1 sh.
439     cat << EOF
440 Usage: configure [options] [host]
441 Options: [defaults in brackets after descriptions]
442 Configuration:
443   --cache-file=FILE       cache test results in FILE
444   --help                  print this message
445   --no-create             do not create output files
446   --quiet, --silent       do not print \`checking...' messages
447   --version               print the version of autoconf that created configure
448 Directory and file names:
449   --prefix=PREFIX         install architecture-independent files in PREFIX
450                           [$ac_default_prefix]
451   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
452                           [same as prefix]
453   --bindir=DIR            user executables in DIR [EPREFIX/bin]
454   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
455   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
456   --datadir=DIR           read-only architecture-independent data in DIR
457                           [PREFIX/share]
458   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
459   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
460                           [PREFIX/com]
461   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
462   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
463   --includedir=DIR        C header files in DIR [PREFIX/include]
464   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
465   --infodir=DIR           info documentation in DIR [PREFIX/info]
466   --mandir=DIR            man documentation in DIR [PREFIX/man]
467   --srcdir=DIR            find the sources in DIR [configure dir or ..]
468   --program-prefix=PREFIX prepend PREFIX to installed program names
469   --program-suffix=SUFFIX append SUFFIX to installed program names
470   --program-transform-name=PROGRAM
471                           run sed PROGRAM on installed program names
472 EOF
473     cat << EOF
474 Host type:
475   --build=BUILD           configure for building on BUILD [BUILD=HOST]
476   --host=HOST             configure for HOST [guessed]
477   --target=TARGET         configure for TARGET [TARGET=HOST]
478 Features and packages:
479   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
480   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
481   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
482   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
483   --x-includes=DIR        X include files are in DIR
484   --x-libraries=DIR       X library files are in DIR
485 EOF
486     if test -n "$ac_help"; then
487       echo "--enable and --with options recognized:$ac_help"
488     fi
489     exit 0 ;;
490
491   -host | --host | --hos | --ho)
492     ac_prev=host ;;
493   -host=* | --host=* | --hos=* | --ho=*)
494     host="$ac_optarg" ;;
495
496   -includedir | --includedir | --includedi | --included | --include \
497   | --includ | --inclu | --incl | --inc)
498     ac_prev=includedir ;;
499   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
500   | --includ=* | --inclu=* | --incl=* | --inc=*)
501     includedir="$ac_optarg" ;;
502
503   -infodir | --infodir | --infodi | --infod | --info | --inf)
504     ac_prev=infodir ;;
505   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
506     infodir="$ac_optarg" ;;
507
508   -libdir | --libdir | --libdi | --libd)
509     ac_prev=libdir ;;
510   -libdir=* | --libdir=* | --libdi=* | --libd=*)
511     libdir="$ac_optarg" ;;
512
513   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
514   | --libexe | --libex | --libe)
515     ac_prev=libexecdir ;;
516   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
517   | --libexe=* | --libex=* | --libe=*)
518     libexecdir="$ac_optarg" ;;
519
520   -localstatedir | --localstatedir | --localstatedi | --localstated \
521   | --localstate | --localstat | --localsta | --localst \
522   | --locals | --local | --loca | --loc | --lo)
523     ac_prev=localstatedir ;;
524   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
525   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
526   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
527     localstatedir="$ac_optarg" ;;
528
529   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
530     ac_prev=mandir ;;
531   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
532     mandir="$ac_optarg" ;;
533
534   -nfp | --nfp | --nf)
535     # Obsolete; use --without-fp.
536     with_fp=no ;;
537
538   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
539   | --no-cr | --no-c)
540     no_create=yes ;;
541
542   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
543   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
544     no_recursion=yes ;;
545
546   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
547   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
548   | --oldin | --oldi | --old | --ol | --o)
549     ac_prev=oldincludedir ;;
550   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
551   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
552   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
553     oldincludedir="$ac_optarg" ;;
554
555   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
556     ac_prev=prefix ;;
557   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
558     prefix="$ac_optarg" ;;
559
560   -program-prefix | --program-prefix | --program-prefi | --program-pref \
561   | --program-pre | --program-pr | --program-p)
562     ac_prev=program_prefix ;;
563   -program-prefix=* | --program-prefix=* | --program-prefi=* \
564   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
565     program_prefix="$ac_optarg" ;;
566
567   -program-suffix | --program-suffix | --program-suffi | --program-suff \
568   | --program-suf | --program-su | --program-s)
569     ac_prev=program_suffix ;;
570   -program-suffix=* | --program-suffix=* | --program-suffi=* \
571   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
572     program_suffix="$ac_optarg" ;;
573
574   -program-transform-name | --program-transform-name \
575   | --program-transform-nam | --program-transform-na \
576   | --program-transform-n | --program-transform- \
577   | --program-transform | --program-transfor \
578   | --program-transfo | --program-transf \
579   | --program-trans | --program-tran \
580   | --progr-tra | --program-tr | --program-t)
581     ac_prev=program_transform_name ;;
582   -program-transform-name=* | --program-transform-name=* \
583   | --program-transform-nam=* | --program-transform-na=* \
584   | --program-transform-n=* | --program-transform-=* \
585   | --program-transform=* | --program-transfor=* \
586   | --program-transfo=* | --program-transf=* \
587   | --program-trans=* | --program-tran=* \
588   | --progr-tra=* | --program-tr=* | --program-t=*)
589     program_transform_name="$ac_optarg" ;;
590
591   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
592   | -silent | --silent | --silen | --sile | --sil)
593     silent=yes ;;
594
595   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
596     ac_prev=sbindir ;;
597   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
598   | --sbi=* | --sb=*)
599     sbindir="$ac_optarg" ;;
600
601   -sharedstatedir | --sharedstatedir | --sharedstatedi \
602   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
603   | --sharedst | --shareds | --shared | --share | --shar \
604   | --sha | --sh)
605     ac_prev=sharedstatedir ;;
606   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
607   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
608   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
609   | --sha=* | --sh=*)
610     sharedstatedir="$ac_optarg" ;;
611
612   -site | --site | --sit)
613     ac_prev=site ;;
614   -site=* | --site=* | --sit=*)
615     site="$ac_optarg" ;;
616
617   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
618     ac_prev=srcdir ;;
619   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
620     srcdir="$ac_optarg" ;;
621
622   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
623   | --syscon | --sysco | --sysc | --sys | --sy)
624     ac_prev=sysconfdir ;;
625   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
626   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
627     sysconfdir="$ac_optarg" ;;
628
629   -target | --target | --targe | --targ | --tar | --ta | --t)
630     ac_prev=target ;;
631   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
632     target="$ac_optarg" ;;
633
634   -v | -verbose | --verbose | --verbos | --verbo | --verb)
635     verbose=yes ;;
636
637   -version | --version | --versio | --versi | --vers)
638     echo "configure generated by autoconf version 2.13.1"
639     exit 0 ;;
640
641   -with-* | --with-*)
642     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
643     # Reject names that are not valid shell variable names.
644     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
645       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
646     fi
647     ac_package=`echo $ac_package| sed 's/-/_/g'`
648     case "$ac_option" in
649       *=*) ;;
650       *) ac_optarg=yes ;;
651     esac
652     eval "with_${ac_package}='$ac_optarg'" ;;
653
654   -without-* | --without-*)
655     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
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     eval "with_${ac_package}=no" ;;
662
663   --x)
664     # Obsolete; use --with-x.
665     with_x=yes ;;
666
667   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
668   | --x-incl | --x-inc | --x-in | --x-i)
669     ac_prev=x_includes ;;
670   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
671   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
672     x_includes="$ac_optarg" ;;
673
674   -x-libraries | --x-libraries | --x-librarie | --x-librari \
675   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
676     ac_prev=x_libraries ;;
677   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
678   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
679     x_libraries="$ac_optarg" ;;
680
681   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
682     ;;
683
684   *)
685     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
686       echo "configure: warning: $ac_option: invalid host type" 1>&2
687     fi
688     if test "x$nonopt" != xNONE; then
689       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
690     fi
691     nonopt="$ac_option"
692     ;;
693
694   esac
695 done
696
697 if test -n "$ac_prev"; then
698   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
699 fi
700
701 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
702
703 # File descriptor usage:
704 # 0 standard input
705 # 1 file creation
706 # 2 errors and warnings
707 # 3 some systems may open it to /dev/tty
708 # 4 used on the Kubota Titan
709 # 6 checking for... messages and results
710 # 5 compiler messages saved in config.log
711 if test "$silent" = yes; then
712   exec 6>/dev/null
713 else
714   exec 6>&1
715 fi
716 exec 5>./config.log
717
718 echo "\
719 This file contains any messages produced by compilers while
720 running configure, to aid debugging if configure makes a mistake.
721 " 1>&5
722
723 # Strip out --no-create and --no-recursion so they do not pile up.
724 # Also quote any args containing shell metacharacters.
725 ac_configure_args=
726 for ac_arg
727 do
728   case "$ac_arg" in
729   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
730   | --no-cr | --no-c) ;;
731   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
732   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
733   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
734   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
735   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
736   esac
737 done
738
739 # NLS nuisances.
740 # Only set these to C if already set.  These must not be set unconditionally
741 # because not all systems understand e.g. LANG=C (notably SCO).
742 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
743 # Non-C LC_CTYPE values break the ctype check.
744 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
745 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
746 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
747 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
748
749 # confdefs.h avoids OS command line length limits that DEFS can exceed.
750 rm -rf conftest* confdefs.h
751 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
752 echo > confdefs.h
753
754 # A filename unique to this package, relative to the directory that
755 # configure is in, which we can look for to find out if srcdir is correct.
756 ac_unique_file=build/version.sh
757
758 # Find the source files, if location was not specified.
759 if test -z "$srcdir"; then
760   ac_srcdir_defaulted=yes
761   # Try the directory containing this script, then its parent.
762   ac_prog=$0
763   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
764   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
765   srcdir=$ac_confdir
766   if test ! -r $srcdir/$ac_unique_file; then
767     srcdir=..
768   fi
769 else
770   ac_srcdir_defaulted=no
771 fi
772 if test ! -r $srcdir/$ac_unique_file; then
773   if test "$ac_srcdir_defaulted" = yes; then
774     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
775   else
776     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
777   fi
778 fi
779 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
780
781 # Prefer explicitly selected file to automatically selected ones.
782 if test -z "$CONFIG_SITE"; then
783   if test "x$prefix" != xNONE; then
784     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
785   else
786     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
787   fi
788 fi
789 for ac_site_file in $CONFIG_SITE; do
790   if test -r "$ac_site_file"; then
791     echo "loading site script $ac_site_file"
792     . "$ac_site_file"
793   fi
794 done
795
796
797 ac_ext=c
798 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
799 ac_cpp='$CPP $CPPFLAGS'
800 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
801 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
802 cross_compiling=$ac_cv_prog_cc_cross
803
804 ac_exeext=
805 ac_objext=o
806 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
807   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
808   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
809     ac_n= ac_c='
810 ' ac_t='        '
811   else
812     ac_n=-n ac_c= ac_t=
813   fi
814 else
815   ac_n= ac_c='\c' ac_t=
816 fi
817
818
819 # set unset (borrowed from autoconf 2.49c)
820 if (OL_FOO=OL_FOO; unset OL_FOO) >/dev/null 2>&1; then
821   ol_unset=unset
822 else
823   ol_unset=false
824 fi
825 # unset CDPATH
826 $ol_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
827
828 ac_aux_dir=
829 for ac_dir in build $srcdir/build; do
830   if test -f $ac_dir/install-sh; then
831     ac_aux_dir=$ac_dir
832     ac_install_sh="$ac_aux_dir/install-sh -c"
833     break
834   elif test -f $ac_dir/install.sh; then
835     ac_aux_dir=$ac_dir
836     ac_install_sh="$ac_aux_dir/install.sh -c"
837     break
838   elif test -f $ac_dir/shtool; then
839     ac_aux_dir=$ac_dir
840     ac_install_sh="$ac_aux_dir/shtool install -c"
841     break
842   fi
843 done
844 if test -z "$ac_aux_dir"; then
845   { echo "configure: error: can not find install-sh or install.sh in build $srcdir/build" 1>&2; exit 1; }
846 fi
847 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
848 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
849 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
850
851 eval `$ac_aux_dir/version.sh`
852 if test -z "$OL_STRING"; then
853         { echo "configure: error: could not determine version" 1>&2; exit 1; }
854 fi
855
856 if test -f "$ac_aux_dir/shtool" -a ! -d $ac_aux_dir/shtool; then
857         ac_cv_shtool="$ac_aux_dir/shtool"
858 else
859         { echo "configure: error: no shtool found in $ac_aux_dir" 1>&2; exit 1; }
860 fi
861
862 SHTOOL="$ac_cv_shtool"
863
864 TB="`$SHTOOL echo -e '%B' 2>/dev/null`"
865 TN="`$SHTOOL echo -e '%b' 2>/dev/null`"
866
867 OPENLDAP_CVS=""
868 if test -d $ac_aux_dir/CVS; then
869         OPENLDAP_CVS="(from CVS sources) "
870 fi
871
872 echo "Configuring ${TB}${OL_STRING}${TN} ${OPENLDAP_CVS}..."
873
874
875 echo $ac_n "checking host system type""... $ac_c" 1>&6
876 echo "configure:877: checking host system type" >&5
877 if test "x$ac_cv_host" = "x" || (test "x$host" != "xNONE" && test "x$host" != "x$ac_cv_host_alias"); then
878
879 # Make sure we can run config.sub.
880   if $ac_config_sub sun4 >/dev/null 2>&1; then :
881     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
882   fi
883
884   ac_cv_host_alias=$host
885   case "$ac_cv_host_alias" in
886   NONE)
887     case $nonopt in
888     NONE)
889       if ac_cv_host_alias=`$ac_config_guess`; then :
890       else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
891       fi ;;
892     *) ac_cv_host_alias=$nonopt ;;
893     esac ;;
894   esac
895
896   ac_cv_host=`$ac_config_sub $ac_cv_host_alias`
897   ac_cv_host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
898   ac_cv_host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
899   ac_cv_host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
900 else
901   echo $ac_n "(cached) $ac_c" 1>&6
902 fi
903
904 echo "$ac_t""$ac_cv_host" 1>&6
905
906 host=$ac_cv_host
907 host_alias=$ac_cv_host_alias
908 host_cpu=$ac_cv_host_cpu
909 host_vendor=$ac_cv_host_vendor
910 host_os=$ac_cv_host_os
911
912
913
914
915
916 echo $ac_n "checking target system type""... $ac_c" 1>&6
917 echo "configure:918: checking target system type" >&5
918 if test "x$ac_cv_target" = "x" || (test "x$target" != "xNONE" && test "x$target" != "x$ac_cv_target_alias"); then
919
920 # Make sure we can run config.sub.
921   if $ac_config_sub sun4 >/dev/null 2>&1; then :
922     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
923   fi
924
925   ac_cv_target_alias=$target
926   case "$ac_cv_target_alias" in
927   NONE)
928     case $nonopt in
929     NONE)
930       ac_cv_target_alias=$host_alias ;;
931
932     *) ac_cv_target_alias=$nonopt ;;
933     esac ;;
934   esac
935
936   ac_cv_target=`$ac_config_sub $ac_cv_target_alias`
937   ac_cv_target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
938   ac_cv_target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
939   ac_cv_target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
940 else
941   echo $ac_n "(cached) $ac_c" 1>&6
942 fi
943
944 echo "$ac_t""$ac_cv_target" 1>&6
945
946 target=$ac_cv_target
947 target_alias=$ac_cv_target_alias
948 target_cpu=$ac_cv_target_cpu
949 target_vendor=$ac_cv_target_vendor
950 target_os=$ac_cv_target_os
951
952
953
954
955
956 echo $ac_n "checking build system type""... $ac_c" 1>&6
957 echo "configure:958: checking build system type" >&5
958 if test "x$ac_cv_build" = "x" || (test "x$build" != "xNONE" && test "x$build" != "x$ac_cv_build_alias"); then
959
960 # Make sure we can run config.sub.
961   if $ac_config_sub sun4 >/dev/null 2>&1; then :
962     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
963   fi
964
965   ac_cv_build_alias=$build
966   case "$ac_cv_build_alias" in
967   NONE)
968     case $nonopt in
969     NONE)
970       ac_cv_build_alias=$host_alias ;;
971
972     *) ac_cv_build_alias=$nonopt ;;
973     esac ;;
974   esac
975
976   ac_cv_build=`$ac_config_sub $ac_cv_build_alias`
977   ac_cv_build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
978   ac_cv_build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
979   ac_cv_build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
980 else
981   echo $ac_n "(cached) $ac_c" 1>&6
982 fi
983
984 echo "$ac_t""$ac_cv_build" 1>&6
985
986 build=$ac_cv_build
987 build_alias=$ac_cv_build_alias
988 build_cpu=$ac_cv_build_cpu
989 build_vendor=$ac_cv_build_vendor
990 build_os=$ac_cv_build_os
991
992
993
994
995
996 # Do some error checking and defaulting for the host and target type.
997 # The inputs are:
998 #    configure --host=HOST --target=TARGET --build=BUILD NONOPT
999 #
1000 # The rules are:
1001 # 1. You are not allowed to specify --host, --target, and nonopt at the
1002 #    same time.
1003 # 2. Host defaults to nonopt.
1004 # 3. If nonopt is not specified, then host defaults to the current host,
1005 #    as determined by config.guess.
1006 # 4. Target and build default to nonopt.
1007 # 5. If nonopt is not specified, then target and build default to host.
1008
1009 # The aliases save the names the user supplied, while $host etc.
1010 # will get canonicalized.
1011 case $host---$target---$nonopt in
1012 NONE---*---* | *---NONE---* | *---*---NONE) ;;
1013 *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
1014 esac
1015
1016 test "$host_alias" != "$target_alias" &&
1017   test "$program_prefix$program_suffix$program_transform_name" = \
1018     NONENONEs,x,x, &&
1019   program_prefix=${target_alias}-
1020
1021
1022 # Find a good install program.  We prefer a C program (faster),
1023 # so one script is as good as another.  But avoid the broken or
1024 # incompatible versions:
1025 # SysV /etc/install, /usr/sbin/install
1026 # SunOS /usr/etc/install
1027 # IRIX /sbin/install
1028 # AIX /bin/install
1029 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
1030 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
1031 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
1032 # ./install, which can be erroneously created by make from ./install.sh.
1033 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
1034 echo "configure:1035: checking for a BSD compatible install" >&5
1035 if test -z "$INSTALL"; then
1036 if eval "test \"\${ac_cv_path_install+set}\" = set"; then
1037   echo $ac_n "(cached) $ac_c" 1>&6
1038 else
1039     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
1040   for ac_dir in $PATH; do
1041     # Account for people who put trailing slashes in PATH elements.
1042     case "$ac_dir/" in
1043     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
1044     *)
1045       # OSF1 and SCO ODT 3.0 have their own names for install.
1046       # Don't use installbsd from OSF since it installs stuff as root
1047       # by default.
1048       for ac_prog in ginstall scoinst install; do
1049         if test -f $ac_dir/$ac_prog; then
1050           if test $ac_prog = install &&
1051             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
1052             # AIX install.  It has an incompatible calling convention.
1053             :
1054           elif test $ac_prog = install &&
1055             grep pwplus $ac_dir/$ac_prog >/dev/null 2>&1; then
1056             # program-specific install script used by HP pwplus--don't use.
1057             :
1058           else
1059             ac_cv_path_install="$ac_dir/$ac_prog -c"
1060             break 2
1061           fi
1062         fi
1063       done
1064       ;;
1065     esac
1066   done
1067   IFS="$ac_save_IFS"
1068
1069 fi
1070   if test "${ac_cv_path_install+set}" = set; then
1071     INSTALL="$ac_cv_path_install"
1072   else
1073     # As a last resort, use the slow shell script.  We don't cache a
1074     # path for INSTALL within a source directory, because that will
1075     # break other packages using the cache if that directory is
1076     # removed, or if the path is relative.
1077     INSTALL="$ac_install_sh"
1078   fi
1079 fi
1080 echo "$ac_t""$INSTALL" 1>&6
1081
1082 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
1083 # It thinks the first close brace ends the variable substitution.
1084 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
1085
1086 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
1087
1088 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1089
1090 echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
1091 echo "configure:1092: checking whether build environment is sane" >&5
1092 # Just in case
1093 sleep 1
1094 echo timestamp > conftestfile
1095 # Do `set' in a subshell so we don't clobber the current shell's
1096 # arguments.  Must try -L first in case configure is actually a
1097 # symlink; some systems play weird games with the mod time of symlinks
1098 # (eg FreeBSD returns the mod time of the symlink's containing
1099 # directory).
1100 if (
1101    set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
1102    if test "$*" = "X"; then
1103       # -L didn't work.
1104       set X `ls -t $srcdir/configure conftestfile`
1105    fi
1106    if test "$*" != "X $srcdir/configure conftestfile" \
1107       && test "$*" != "X conftestfile $srcdir/configure"; then
1108
1109       # If neither matched, then we have a broken ls.  This can happen
1110       # if, for instance, CONFIG_SHELL is bash and it inherits a
1111       # broken ls alias from the environment.  This has actually
1112       # happened.  Such a system could not be considered "sane".
1113       { echo "configure: error: ls -t appears to fail.  Make sure there is not a broken
1114 alias in your environment" 1>&2; exit 1; }
1115    fi
1116
1117    test "$2" = conftestfile
1118    )
1119 then
1120    # Ok.
1121    :
1122 else
1123    { echo "configure: error: newly created file is older than distributed files!
1124 Check your system clock" 1>&2; exit 1; }
1125 fi
1126 rm -f conftest*
1127 echo "$ac_t""yes" 1>&6
1128 if test "$program_transform_name" = s,x,x,; then
1129   program_transform_name=
1130 else
1131   # Double any \ or $.  echo might interpret backslashes.
1132   cat <<\EOF_SED > conftestsed
1133 s,\\,\\\\,g; s,\$,$$,g
1134 EOF_SED
1135   program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
1136   rm -f conftestsed
1137 fi
1138 test "$program_prefix" != NONE &&
1139   program_transform_name="s,^,${program_prefix},;$program_transform_name"
1140 # Use a double $ so make ignores it.
1141 test "$program_suffix" != NONE &&
1142   program_transform_name="s,\$\$,${program_suffix},;$program_transform_name"
1143
1144 # sed with no file args requires a program.
1145 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
1146
1147 for ac_prog in mawk gawk nawk awk
1148 do
1149 # Extract the first word of "$ac_prog", so it can be a program name with args.
1150 set dummy $ac_prog; ac_word=$2
1151 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1152 echo "configure:1153: checking for $ac_word" >&5
1153 if eval "test \"\${ac_cv_prog_AWK+set}\" = set"; then
1154   echo $ac_n "(cached) $ac_c" 1>&6
1155 else
1156   if test -n "$AWK"; then
1157   ac_cv_prog_AWK="$AWK" # Let the user override the test.
1158 else
1159   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1160   ac_dummy="$PATH"
1161   for ac_dir in $ac_dummy; do
1162     test -z "$ac_dir" && ac_dir=.
1163     if test -f $ac_dir/$ac_word; then
1164       ac_cv_prog_AWK="$ac_prog"
1165       break
1166     fi
1167   done
1168   IFS="$ac_save_ifs"
1169 fi
1170 fi
1171 AWK="$ac_cv_prog_AWK"
1172 if test -n "$AWK"; then
1173   echo "$ac_t""$AWK" 1>&6
1174 else
1175   echo "$ac_t""no" 1>&6
1176 fi
1177
1178 test -n "$AWK" && break
1179 done
1180
1181 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
1182 echo "configure:1183: checking whether ${MAKE-make} sets \${MAKE}" >&5
1183 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
1184 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
1185   echo $ac_n "(cached) $ac_c" 1>&6
1186 else
1187   cat > conftestmake <<\EOF
1188 all:
1189         @echo 'ac_maketemp="${MAKE}"'
1190 EOF
1191 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
1192 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
1193 if test -n "$ac_maketemp"; then
1194   eval ac_cv_prog_make_${ac_make}_set=yes
1195 else
1196   eval ac_cv_prog_make_${ac_make}_set=no
1197 fi
1198 rm -f conftestmake
1199 fi
1200 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
1201   echo "$ac_t""yes" 1>&6
1202   SET_MAKE=
1203 else
1204   echo "$ac_t""no" 1>&6
1205   SET_MAKE="MAKE=${MAKE-make}"
1206 fi
1207
1208
1209
1210 PACKAGE=$OL_PACKAGE
1211
1212 VERSION=$OL_VERSION
1213
1214 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
1215   { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
1216 fi
1217
1218
1219
1220 missing_dir=`cd $ac_aux_dir && pwd`
1221 echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
1222 echo "configure:1223: checking for working aclocal" >&5
1223 # Run test in a subshell; some versions of sh will print an error if
1224 # an executable is not found, even if stderr is redirected.
1225 # Redirect stdin to placate older versions of autoconf.  Sigh.
1226 if (aclocal --version) < /dev/null > /dev/null 2>&1; then
1227    ACLOCAL=aclocal
1228    echo "$ac_t""found" 1>&6
1229 else
1230    ACLOCAL="$missing_dir/missing aclocal"
1231    echo "$ac_t""missing" 1>&6
1232 fi
1233
1234 echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
1235 echo "configure:1236: checking for working autoconf" >&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 (autoconf --version) < /dev/null > /dev/null 2>&1; then
1240    AUTOCONF=autoconf
1241    echo "$ac_t""found" 1>&6
1242 else
1243    AUTOCONF="$missing_dir/missing autoconf"
1244    echo "$ac_t""missing" 1>&6
1245 fi
1246
1247 echo $ac_n "checking for working automake""... $ac_c" 1>&6
1248 echo "configure:1249: checking for working automake" >&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 (automake --version) < /dev/null > /dev/null 2>&1; then
1253    AUTOMAKE=automake
1254    echo "$ac_t""found" 1>&6
1255 else
1256    AUTOMAKE="$missing_dir/missing automake"
1257    echo "$ac_t""missing" 1>&6
1258 fi
1259
1260 echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
1261 echo "configure:1262: checking for working autoheader" >&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 (autoheader --version) < /dev/null > /dev/null 2>&1; then
1266    AUTOHEADER=autoheader
1267    echo "$ac_t""found" 1>&6
1268 else
1269    AUTOHEADER="$missing_dir/missing autoheader"
1270    echo "$ac_t""missing" 1>&6
1271 fi
1272
1273 echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
1274 echo "configure:1275: checking for working makeinfo" >&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 (makeinfo --version) < /dev/null > /dev/null 2>&1; then
1279    MAKEINFO=makeinfo
1280    echo "$ac_t""found" 1>&6
1281 else
1282    MAKEINFO="$missing_dir/missing makeinfo"
1283    echo "$ac_t""missing" 1>&6
1284 fi
1285
1286 install_sh="$missing_dir/install-sh"
1287 test -f "$install_sh" || install_sh="$missing_dir/install.sh"
1288
1289 for ac_prog in gnutar gtar tar
1290 do
1291 # Extract the first word of "$ac_prog", so it can be a program name with args.
1292 set dummy $ac_prog; ac_word=$2
1293 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1294 echo "configure:1295: checking for $ac_word" >&5
1295 if eval "test \"\${ac_cv_prog_AMTAR+set}\" = set"; then
1296   echo $ac_n "(cached) $ac_c" 1>&6
1297 else
1298   if test -n "$AMTAR"; then
1299   ac_cv_prog_AMTAR="$AMTAR" # Let the user override the test.
1300 else
1301   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1302   ac_dummy="$PATH"
1303   for ac_dir in $ac_dummy; do
1304     test -z "$ac_dir" && ac_dir=.
1305     if test -f $ac_dir/$ac_word; then
1306       ac_cv_prog_AMTAR="$ac_prog"
1307       break
1308     fi
1309   done
1310   IFS="$ac_save_ifs"
1311 fi
1312 fi
1313 AMTAR="$ac_cv_prog_AMTAR"
1314 if test -n "$AMTAR"; then
1315   echo "$ac_t""$AMTAR" 1>&6
1316 else
1317   echo "$ac_t""no" 1>&6
1318 fi
1319
1320 test -n "$AMTAR" && break
1321 done
1322
1323
1324 AMTARFLAGS=
1325 if test -n "$AMTAR"; then
1326   if $SHELL -c "$AMTAR --version" > /dev/null 2>&1; then
1327         AMTARFLAGS=o
1328   fi
1329 fi
1330
1331 cat >> confdefs.h <<EOF
1332 #define OPENLDAP_PACKAGE "$PACKAGE"
1333 EOF
1334
1335 cat >> confdefs.h <<EOF
1336 #define OPENLDAP_VERSION "$VERSION"
1337 EOF
1338
1339
1340 cat >> confdefs.h <<EOF
1341 #define LDAP_VENDOR_VERSION $OL_API_INC
1342 EOF
1343
1344 cat >> confdefs.h <<EOF
1345 #define LDAP_VENDOR_VERSION_MAJOR $OL_MAJOR
1346 EOF
1347
1348 cat >> confdefs.h <<EOF
1349 #define LDAP_VENDOR_VERSION_MINOR $OL_MINOR
1350 EOF
1351
1352 cat >> confdefs.h <<EOF
1353 #define LDAP_VENDOR_VERSION_PATCH $OL_PATCH
1354 EOF
1355
1356
1357 OPENLDAP_LIBRELEASE=$OL_API_LIB_RELEASE
1358
1359 OPENLDAP_LIBVERSION=$OL_API_LIB_VERSION
1360
1361 OPENLDAP_RELEASE_DATE="$OL_RELEASE_DATE"
1362
1363
1364
1365 echo $ac_n "checking configure arguments""... $ac_c" 1>&6
1366 echo "configure:1367: checking configure arguments" >&5
1367
1368
1369 top_builddir=`pwd`
1370
1371 ldap_subdir="/openldap"
1372
1373 # Check whether --with-subdir or --without-subdir was given.
1374 if test "${with_subdir+set}" = set; then
1375   withval="$with_subdir"
1376   case "$withval" in
1377         no) ldap_subdir=""
1378                 ;;
1379         yes)
1380                 ;;
1381         /*|\\*)
1382                 ldap_subdir="$withval"
1383                 ;;
1384         *)
1385                 ldap_subdir="/$withval"
1386                 ;;
1387 esac
1388
1389 fi
1390
1391
1392 # OpenLDAP --enable-debug
1393         # Check whether --enable-debug or --disable-debug was given.
1394 if test "${enable_debug+set}" = set; then
1395   enableval="$enable_debug"
1396   
1397         ol_arg=invalid
1398         for ol_val in auto yes no ; do
1399                 if test "$enableval" = "$ol_val" ; then
1400                         ol_arg="$ol_val"
1401                 fi
1402         done
1403         if test "$ol_arg" = "invalid" ; then
1404                 { echo "configure: error: bad value $enableval for --enable-debug" 1>&2; exit 1; }
1405         fi
1406         ol_enable_debug="$ol_arg"
1407
1408 else
1409         ol_enable_debug="yes"
1410 fi
1411 # end --enable-debug
1412 # OpenLDAP --enable-dynamic
1413         # Check whether --enable-dynamic or --disable-dynamic was given.
1414 if test "${enable_dynamic+set}" = set; then
1415   enableval="$enable_dynamic"
1416   
1417         ol_arg=invalid
1418         for ol_val in auto yes no ; do
1419                 if test "$enableval" = "$ol_val" ; then
1420                         ol_arg="$ol_val"
1421                 fi
1422         done
1423         if test "$ol_arg" = "invalid" ; then
1424                 { echo "configure: error: bad value $enableval for --enable-dynamic" 1>&2; exit 1; }
1425         fi
1426         ol_enable_dynamic="$ol_arg"
1427
1428 else
1429         ol_enable_dynamic="no"
1430 fi
1431 # end --enable-dynamic
1432 # OpenLDAP --enable-syslog
1433         # Check whether --enable-syslog or --disable-syslog was given.
1434 if test "${enable_syslog+set}" = set; then
1435   enableval="$enable_syslog"
1436   
1437         ol_arg=invalid
1438         for ol_val in auto yes no ; do
1439                 if test "$enableval" = "$ol_val" ; then
1440                         ol_arg="$ol_val"
1441                 fi
1442         done
1443         if test "$ol_arg" = "invalid" ; then
1444                 { echo "configure: error: bad value $enableval for --enable-syslog" 1>&2; exit 1; }
1445         fi
1446         ol_enable_syslog="$ol_arg"
1447
1448 else
1449         ol_enable_syslog="auto"
1450 fi
1451 # end --enable-syslog
1452 # OpenLDAP --enable-proctitle
1453         # Check whether --enable-proctitle or --disable-proctitle was given.
1454 if test "${enable_proctitle+set}" = set; then
1455   enableval="$enable_proctitle"
1456   
1457         ol_arg=invalid
1458         for ol_val in auto yes no ; do
1459                 if test "$enableval" = "$ol_val" ; then
1460                         ol_arg="$ol_val"
1461                 fi
1462         done
1463         if test "$ol_arg" = "invalid" ; then
1464                 { echo "configure: error: bad value $enableval for --enable-proctitle" 1>&2; exit 1; }
1465         fi
1466         ol_enable_proctitle="$ol_arg"
1467
1468 else
1469         ol_enable_proctitle="yes"
1470 fi
1471 # end --enable-proctitle
1472 ol_enable_referrals=${ol_enable_referrals-no}
1473 ol_enable_kbind=${ol_enable_kbind-no}
1474 # OpenLDAP --enable-ipv6
1475         # Check whether --enable-ipv6 or --disable-ipv6 was given.
1476 if test "${enable_ipv6+set}" = set; then
1477   enableval="$enable_ipv6"
1478   
1479         ol_arg=invalid
1480         for ol_val in auto yes no ; do
1481                 if test "$enableval" = "$ol_val" ; then
1482                         ol_arg="$ol_val"
1483                 fi
1484         done
1485         if test "$ol_arg" = "invalid" ; then
1486                 { echo "configure: error: bad value $enableval for --enable-ipv6" 1>&2; exit 1; }
1487         fi
1488         ol_enable_ipv6="$ol_arg"
1489
1490 else
1491         ol_enable_ipv6="auto"
1492 fi
1493 # end --enable-ipv6
1494 # OpenLDAP --enable-local
1495         # Check whether --enable-local or --disable-local was given.
1496 if test "${enable_local+set}" = set; then
1497   enableval="$enable_local"
1498   
1499         ol_arg=invalid
1500         for ol_val in auto yes no ; do
1501                 if test "$enableval" = "$ol_val" ; then
1502                         ol_arg="$ol_val"
1503                 fi
1504         done
1505         if test "$ol_arg" = "invalid" ; then
1506                 { echo "configure: error: bad value $enableval for --enable-local" 1>&2; exit 1; }
1507         fi
1508         ol_enable_local="$ol_arg"
1509
1510 else
1511         ol_enable_local="auto"
1512 fi
1513 # end --enable-local
1514
1515
1516 # OpenLDAP --with-cyrus_sasl
1517         # Check whether --with-cyrus_sasl or --without-cyrus_sasl was given.
1518 if test "${with_cyrus_sasl+set}" = set; then
1519   withval="$with_cyrus_sasl"
1520   
1521         ol_arg=invalid
1522         for ol_val in auto yes no  ; do
1523                 if test "$withval" = "$ol_val" ; then
1524                         ol_arg="$ol_val"
1525                 fi
1526         done
1527         if test "$ol_arg" = "invalid" ; then
1528                 { echo "configure: error: bad value $withval for --with-cyrus_sasl" 1>&2; exit 1; }
1529         fi
1530         ol_with_cyrus_sasl="$ol_arg"
1531
1532 else
1533         ol_with_cyrus_sasl="auto"
1534 fi
1535 # end --with-cyrus_sasl
1536
1537 # OpenLDAP --with-fetch
1538         # Check whether --with-fetch or --without-fetch was given.
1539 if test "${with_fetch+set}" = set; then
1540   withval="$with_fetch"
1541   
1542         ol_arg=invalid
1543         for ol_val in auto yes no  ; do
1544                 if test "$withval" = "$ol_val" ; then
1545                         ol_arg="$ol_val"
1546                 fi
1547         done
1548         if test "$ol_arg" = "invalid" ; then
1549                 { echo "configure: error: bad value $withval for --with-fetch" 1>&2; exit 1; }
1550         fi
1551         ol_with_fetch="$ol_arg"
1552
1553 else
1554         ol_with_fetch="auto"
1555 fi
1556 # end --with-fetch
1557
1558 ol_with_kerberos=${ol_with_kerberos-auto}
1559 # OpenLDAP --with-threads
1560         # Check whether --with-threads or --without-threads was given.
1561 if test "${with_threads+set}" = set; then
1562   withval="$with_threads"
1563   
1564         ol_arg=invalid
1565         for ol_val in auto nt posix mach pth lwp yes no manual  ; do
1566                 if test "$withval" = "$ol_val" ; then
1567                         ol_arg="$ol_val"
1568                 fi
1569         done
1570         if test "$ol_arg" = "invalid" ; then
1571                 { echo "configure: error: bad value $withval for --with-threads" 1>&2; exit 1; }
1572         fi
1573         ol_with_threads="$ol_arg"
1574
1575 else
1576         ol_with_threads="auto"
1577 fi
1578 # end --with-threads
1579
1580 # OpenLDAP --with-tls
1581         # Check whether --with-tls or --without-tls was given.
1582 if test "${with_tls+set}" = set; then
1583   withval="$with_tls"
1584   
1585         ol_arg=invalid
1586         for ol_val in auto ssleay openssl yes no  ; do
1587                 if test "$withval" = "$ol_val" ; then
1588                         ol_arg="$ol_val"
1589                 fi
1590         done
1591         if test "$ol_arg" = "invalid" ; then
1592                 { echo "configure: error: bad value $withval for --with-tls" 1>&2; exit 1; }
1593         fi
1594         ol_with_tls="$ol_arg"
1595
1596 else
1597         ol_with_tls="auto"
1598 fi
1599 # end --with-tls
1600
1601 # OpenLDAP --with-yielding_select
1602         # Check whether --with-yielding_select or --without-yielding_select was given.
1603 if test "${with_yielding_select+set}" = set; then
1604   withval="$with_yielding_select"
1605   
1606         ol_arg=invalid
1607         for ol_val in auto yes no manual  ; do
1608                 if test "$withval" = "$ol_val" ; then
1609                         ol_arg="$ol_val"
1610                 fi
1611         done
1612         if test "$ol_arg" = "invalid" ; then
1613                 { echo "configure: error: bad value $withval for --with-yielding_select" 1>&2; exit 1; }
1614         fi
1615         ol_with_yielding_select="$ol_arg"
1616
1617 else
1618         ol_with_yielding_select="auto"
1619 fi
1620 # end --with-yielding_select
1621
1622
1623
1624 # Check whether --with-xxslapdoptions or --without-xxslapdoptions was given.
1625 if test "${with_xxslapdoptions+set}" = set; then
1626   withval="$with_xxslapdoptions"
1627   :
1628 fi
1629
1630 # OpenLDAP --enable-slapd
1631         # Check whether --enable-slapd or --disable-slapd was given.
1632 if test "${enable_slapd+set}" = set; then
1633   enableval="$enable_slapd"
1634   
1635         ol_arg=invalid
1636         for ol_val in auto yes no ; do
1637                 if test "$enableval" = "$ol_val" ; then
1638                         ol_arg="$ol_val"
1639                 fi
1640         done
1641         if test "$ol_arg" = "invalid" ; then
1642                 { echo "configure: error: bad value $enableval for --enable-slapd" 1>&2; exit 1; }
1643         fi
1644         ol_enable_slapd="$ol_arg"
1645
1646 else
1647         ol_enable_slapd="yes"
1648 fi
1649 # end --enable-slapd
1650 # OpenLDAP --enable-aci
1651         # Check whether --enable-aci or --disable-aci was given.
1652 if test "${enable_aci+set}" = set; then
1653   enableval="$enable_aci"
1654   
1655         ol_arg=invalid
1656         for ol_val in auto yes no ; do
1657                 if test "$enableval" = "$ol_val" ; then
1658                         ol_arg="$ol_val"
1659                 fi
1660         done
1661         if test "$ol_arg" = "invalid" ; then
1662                 { echo "configure: error: bad value $enableval for --enable-aci" 1>&2; exit 1; }
1663         fi
1664         ol_enable_aci="$ol_arg"
1665
1666 else
1667         ol_enable_aci="no"
1668 fi
1669 # end --enable-aci
1670 # OpenLDAP --enable-cleartext
1671         # Check whether --enable-cleartext or --disable-cleartext was given.
1672 if test "${enable_cleartext+set}" = set; then
1673   enableval="$enable_cleartext"
1674   
1675         ol_arg=invalid
1676         for ol_val in auto yes no ; do
1677                 if test "$enableval" = "$ol_val" ; then
1678                         ol_arg="$ol_val"
1679                 fi
1680         done
1681         if test "$ol_arg" = "invalid" ; then
1682                 { echo "configure: error: bad value $enableval for --enable-cleartext" 1>&2; exit 1; }
1683         fi
1684         ol_enable_cleartext="$ol_arg"
1685
1686 else
1687         ol_enable_cleartext="yes"
1688 fi
1689 # end --enable-cleartext
1690 # OpenLDAP --enable-crypt
1691         # Check whether --enable-crypt or --disable-crypt was given.
1692 if test "${enable_crypt+set}" = set; then
1693   enableval="$enable_crypt"
1694   
1695         ol_arg=invalid
1696         for ol_val in auto yes no ; do
1697                 if test "$enableval" = "$ol_val" ; then
1698                         ol_arg="$ol_val"
1699                 fi
1700         done
1701         if test "$ol_arg" = "invalid" ; then
1702                 { echo "configure: error: bad value $enableval for --enable-crypt" 1>&2; exit 1; }
1703         fi
1704         ol_enable_crypt="$ol_arg"
1705
1706 else
1707         ol_enable_crypt="no"
1708 fi
1709 # end --enable-crypt
1710 # OpenLDAP --enable-lmpasswd
1711         # Check whether --enable-lmpasswd or --disable-lmpasswd was given.
1712 if test "${enable_lmpasswd+set}" = set; then
1713   enableval="$enable_lmpasswd"
1714   
1715         ol_arg=invalid
1716         for ol_val in auto yes no ; do
1717                 if test "$enableval" = "$ol_val" ; then
1718                         ol_arg="$ol_val"
1719                 fi
1720         done
1721         if test "$ol_arg" = "invalid" ; then
1722                 { echo "configure: error: bad value $enableval for --enable-lmpasswd" 1>&2; exit 1; }
1723         fi
1724         ol_enable_lmpasswd="$ol_arg"
1725
1726 else
1727         ol_enable_lmpasswd="no"
1728 fi
1729 # end --enable-lmpasswd
1730 # OpenLDAP --enable-spasswd
1731         # Check whether --enable-spasswd or --disable-spasswd was given.
1732 if test "${enable_spasswd+set}" = set; then
1733   enableval="$enable_spasswd"
1734   
1735         ol_arg=invalid
1736         for ol_val in auto yes no ; do
1737                 if test "$enableval" = "$ol_val" ; then
1738                         ol_arg="$ol_val"
1739                 fi
1740         done
1741         if test "$ol_arg" = "invalid" ; then
1742                 { echo "configure: error: bad value $enableval for --enable-spasswd" 1>&2; exit 1; }
1743         fi
1744         ol_enable_spasswd="$ol_arg"
1745
1746 else
1747         ol_enable_spasswd="no"
1748 fi
1749 # end --enable-spasswd
1750 # OpenLDAP --enable-modules
1751         # Check whether --enable-modules or --disable-modules was given.
1752 if test "${enable_modules+set}" = set; then
1753   enableval="$enable_modules"
1754   
1755         ol_arg=invalid
1756         for ol_val in auto yes no ; do
1757                 if test "$enableval" = "$ol_val" ; then
1758                         ol_arg="$ol_val"
1759                 fi
1760         done
1761         if test "$ol_arg" = "invalid" ; then
1762                 { echo "configure: error: bad value $enableval for --enable-modules" 1>&2; exit 1; }
1763         fi
1764         ol_enable_modules="$ol_arg"
1765
1766 else
1767         ol_enable_modules="no"
1768 fi
1769 # end --enable-modules
1770 ol_enable_multimaster=${ol_enable_multimaster-no}
1771 # OpenLDAP --enable-rewrite
1772         # Check whether --enable-rewrite or --disable-rewrite was given.
1773 if test "${enable_rewrite+set}" = set; then
1774   enableval="$enable_rewrite"
1775   
1776         ol_arg=invalid
1777         for ol_val in auto yes no ; do
1778                 if test "$enableval" = "$ol_val" ; then
1779                         ol_arg="$ol_val"
1780                 fi
1781         done
1782         if test "$ol_arg" = "invalid" ; then
1783                 { echo "configure: error: bad value $enableval for --enable-rewrite" 1>&2; exit 1; }
1784         fi
1785         ol_enable_rewrite="$ol_arg"
1786
1787 else
1788         ol_enable_rewrite="auto"
1789 fi
1790 # end --enable-rewrite
1791 # OpenLDAP --enable-rlookups
1792         # Check whether --enable-rlookups or --disable-rlookups was given.
1793 if test "${enable_rlookups+set}" = set; then
1794   enableval="$enable_rlookups"
1795   
1796         ol_arg=invalid
1797         for ol_val in auto yes no ; do
1798                 if test "$enableval" = "$ol_val" ; then
1799                         ol_arg="$ol_val"
1800                 fi
1801         done
1802         if test "$ol_arg" = "invalid" ; then
1803                 { echo "configure: error: bad value $enableval for --enable-rlookups" 1>&2; exit 1; }
1804         fi
1805         ol_enable_rlookups="$ol_arg"
1806
1807 else
1808         ol_enable_rlookups="no"
1809 fi
1810 # end --enable-rlookups
1811 # OpenLDAP --enable-slapi
1812         # Check whether --enable-slapi or --disable-slapi was given.
1813 if test "${enable_slapi+set}" = set; then
1814   enableval="$enable_slapi"
1815   
1816         ol_arg=invalid
1817         for ol_val in auto yes no ; do
1818                 if test "$enableval" = "$ol_val" ; then
1819                         ol_arg="$ol_val"
1820                 fi
1821         done
1822         if test "$ol_arg" = "invalid" ; then
1823                 { echo "configure: error: bad value $enableval for --enable-slapi" 1>&2; exit 1; }
1824         fi
1825         ol_enable_slapi="$ol_arg"
1826
1827 else
1828         ol_enable_slapi="no"
1829 fi
1830 # end --enable-slapi
1831 # OpenLDAP --enable-slp
1832         # Check whether --enable-slp or --disable-slp was given.
1833 if test "${enable_slp+set}" = set; then
1834   enableval="$enable_slp"
1835   
1836         ol_arg=invalid
1837         for ol_val in auto yes no ; do
1838                 if test "$enableval" = "$ol_val" ; then
1839                         ol_arg="$ol_val"
1840                 fi
1841         done
1842         if test "$ol_arg" = "invalid" ; then
1843                 { echo "configure: error: bad value $enableval for --enable-slp" 1>&2; exit 1; }
1844         fi
1845         ol_enable_slp="$ol_arg"
1846
1847 else
1848         ol_enable_slp="no"
1849 fi
1850 # end --enable-slp
1851 # OpenLDAP --enable-wrappers
1852         # Check whether --enable-wrappers or --disable-wrappers was given.
1853 if test "${enable_wrappers+set}" = set; then
1854   enableval="$enable_wrappers"
1855   
1856         ol_arg=invalid
1857         for ol_val in auto yes no ; do
1858                 if test "$enableval" = "$ol_val" ; then
1859                         ol_arg="$ol_val"
1860                 fi
1861         done
1862         if test "$ol_arg" = "invalid" ; then
1863                 { echo "configure: error: bad value $enableval for --enable-wrappers" 1>&2; exit 1; }
1864         fi
1865         ol_enable_wrappers="$ol_arg"
1866
1867 else
1868         ol_enable_wrappers="no"
1869 fi
1870 # end --enable-wrappers
1871
1872 Backends="bdb dnssrv hdb ldap ldbm meta monitor null \
1873         passwd perl relay shell sql"
1874
1875 # Check whether --with-xxslapoverlays or --without-xxslapoverlays was given.
1876 if test "${with_xxslapoverlays+set}" = set; then
1877   withval="$with_xxslapoverlays"
1878   :
1879 fi
1880
1881
1882 # OpenLDAP --enable-bdb
1883         # Check whether --enable-bdb or --disable-bdb was given.
1884 if test "${enable_bdb+set}" = set; then
1885   enableval="$enable_bdb"
1886   
1887         ol_arg=invalid
1888         for ol_val in no yes mod ; do
1889                 if test "$enableval" = "$ol_val" ; then
1890                         ol_arg="$ol_val"
1891                 fi
1892         done
1893         if test "$ol_arg" = "invalid" ; then
1894                 { echo "configure: error: bad value $enableval for --enable-bdb" 1>&2; exit 1; }
1895         fi
1896         ol_enable_bdb="$ol_arg"
1897
1898 else
1899         ol_enable_bdb="yes"
1900 fi
1901 # end --enable-bdb
1902 # OpenLDAP --enable-dnssrv
1903         # Check whether --enable-dnssrv or --disable-dnssrv was given.
1904 if test "${enable_dnssrv+set}" = set; then
1905   enableval="$enable_dnssrv"
1906   
1907         ol_arg=invalid
1908         for ol_val in no yes mod ; do
1909                 if test "$enableval" = "$ol_val" ; then
1910                         ol_arg="$ol_val"
1911                 fi
1912         done
1913         if test "$ol_arg" = "invalid" ; then
1914                 { echo "configure: error: bad value $enableval for --enable-dnssrv" 1>&2; exit 1; }
1915         fi
1916         ol_enable_dnssrv="$ol_arg"
1917
1918 else
1919         ol_enable_dnssrv="no"
1920 fi
1921 # end --enable-dnssrv
1922 # OpenLDAP --enable-hdb
1923         # Check whether --enable-hdb or --disable-hdb was given.
1924 if test "${enable_hdb+set}" = set; then
1925   enableval="$enable_hdb"
1926   
1927         ol_arg=invalid
1928         for ol_val in no yes mod ; do
1929                 if test "$enableval" = "$ol_val" ; then
1930                         ol_arg="$ol_val"
1931                 fi
1932         done
1933         if test "$ol_arg" = "invalid" ; then
1934                 { echo "configure: error: bad value $enableval for --enable-hdb" 1>&2; exit 1; }
1935         fi
1936         ol_enable_hdb="$ol_arg"
1937
1938 else
1939         ol_enable_hdb="no"
1940 fi
1941 # end --enable-hdb
1942 # OpenLDAP --enable-ldap
1943         # Check whether --enable-ldap or --disable-ldap was given.
1944 if test "${enable_ldap+set}" = set; then
1945   enableval="$enable_ldap"
1946   
1947         ol_arg=invalid
1948         for ol_val in no yes mod ; do
1949                 if test "$enableval" = "$ol_val" ; then
1950                         ol_arg="$ol_val"
1951                 fi
1952         done
1953         if test "$ol_arg" = "invalid" ; then
1954                 { echo "configure: error: bad value $enableval for --enable-ldap" 1>&2; exit 1; }
1955         fi
1956         ol_enable_ldap="$ol_arg"
1957
1958 else
1959         ol_enable_ldap="no"
1960 fi
1961 # end --enable-ldap
1962 # OpenLDAP --enable-ldbm
1963         # Check whether --enable-ldbm or --disable-ldbm was given.
1964 if test "${enable_ldbm+set}" = set; then
1965   enableval="$enable_ldbm"
1966   
1967         ol_arg=invalid
1968         for ol_val in no yes mod ; do
1969                 if test "$enableval" = "$ol_val" ; then
1970                         ol_arg="$ol_val"
1971                 fi
1972         done
1973         if test "$ol_arg" = "invalid" ; then
1974                 { echo "configure: error: bad value $enableval for --enable-ldbm" 1>&2; exit 1; }
1975         fi
1976         ol_enable_ldbm="$ol_arg"
1977
1978 else
1979         ol_enable_ldbm="no"
1980 fi
1981 # end --enable-ldbm
1982 # OpenLDAP --with-ldbm_api
1983         # Check whether --with-ldbm_api or --without-ldbm_api was given.
1984 if test "${with_ldbm_api+set}" = set; then
1985   withval="$with_ldbm_api"
1986   
1987         ol_arg=invalid
1988         for ol_val in auto berkeley bcompat mdbm gdbm ; do
1989                 if test "$withval" = "$ol_val" ; then
1990                         ol_arg="$ol_val"
1991                 fi
1992         done
1993         if test "$ol_arg" = "invalid" ; then
1994                 { echo "configure: error: bad value $withval for --with-ldbm_api" 1>&2; exit 1; }
1995         fi
1996         ol_with_ldbm_api="$ol_arg"
1997
1998 else
1999         ol_with_ldbm_api="auto"
2000 fi
2001 # end --with-ldbm_api
2002
2003 # OpenLDAP --with-ldbm_type
2004         # Check whether --with-ldbm_type or --without-ldbm_type was given.
2005 if test "${with_ldbm_type+set}" = set; then
2006   withval="$with_ldbm_type"
2007   
2008         ol_arg=invalid
2009         for ol_val in auto btree hash ; do
2010                 if test "$withval" = "$ol_val" ; then
2011                         ol_arg="$ol_val"
2012                 fi
2013         done
2014         if test "$ol_arg" = "invalid" ; then
2015                 { echo "configure: error: bad value $withval for --with-ldbm_type" 1>&2; exit 1; }
2016         fi
2017         ol_with_ldbm_type="$ol_arg"
2018
2019 else
2020         ol_with_ldbm_type="auto"
2021 fi
2022 # end --with-ldbm_type
2023
2024 # OpenLDAP --enable-meta
2025         # Check whether --enable-meta or --disable-meta was given.
2026 if test "${enable_meta+set}" = set; then
2027   enableval="$enable_meta"
2028   
2029         ol_arg=invalid
2030         for ol_val in no yes mod ; do
2031                 if test "$enableval" = "$ol_val" ; then
2032                         ol_arg="$ol_val"
2033                 fi
2034         done
2035         if test "$ol_arg" = "invalid" ; then
2036                 { echo "configure: error: bad value $enableval for --enable-meta" 1>&2; exit 1; }
2037         fi
2038         ol_enable_meta="$ol_arg"
2039
2040 else
2041         ol_enable_meta="no"
2042 fi
2043 # end --enable-meta
2044 # OpenLDAP --enable-monitor
2045         # Check whether --enable-monitor or --disable-monitor was given.
2046 if test "${enable_monitor+set}" = set; then
2047   enableval="$enable_monitor"
2048   
2049         ol_arg=invalid
2050         for ol_val in no yes mod ; do
2051                 if test "$enableval" = "$ol_val" ; then
2052                         ol_arg="$ol_val"
2053                 fi
2054         done
2055         if test "$ol_arg" = "invalid" ; then
2056                 { echo "configure: error: bad value $enableval for --enable-monitor" 1>&2; exit 1; }
2057         fi
2058         ol_enable_monitor="$ol_arg"
2059
2060 else
2061         ol_enable_monitor="yes"
2062 fi
2063 # end --enable-monitor
2064 # OpenLDAP --enable-null
2065         # Check whether --enable-null or --disable-null was given.
2066 if test "${enable_null+set}" = set; then
2067   enableval="$enable_null"
2068   
2069         ol_arg=invalid
2070         for ol_val in no yes mod ; do
2071                 if test "$enableval" = "$ol_val" ; then
2072                         ol_arg="$ol_val"
2073                 fi
2074         done
2075         if test "$ol_arg" = "invalid" ; then
2076                 { echo "configure: error: bad value $enableval for --enable-null" 1>&2; exit 1; }
2077         fi
2078         ol_enable_null="$ol_arg"
2079
2080 else
2081         ol_enable_null="no"
2082 fi
2083 # end --enable-null
2084 # OpenLDAP --enable-passwd
2085         # Check whether --enable-passwd or --disable-passwd was given.
2086 if test "${enable_passwd+set}" = set; then
2087   enableval="$enable_passwd"
2088   
2089         ol_arg=invalid
2090         for ol_val in no yes mod ; do
2091                 if test "$enableval" = "$ol_val" ; then
2092                         ol_arg="$ol_val"
2093                 fi
2094         done
2095         if test "$ol_arg" = "invalid" ; then
2096                 { echo "configure: error: bad value $enableval for --enable-passwd" 1>&2; exit 1; }
2097         fi
2098         ol_enable_passwd="$ol_arg"
2099
2100 else
2101         ol_enable_passwd="no"
2102 fi
2103 # end --enable-passwd
2104 # OpenLDAP --enable-perl
2105         # Check whether --enable-perl or --disable-perl was given.
2106 if test "${enable_perl+set}" = set; then
2107   enableval="$enable_perl"
2108   
2109         ol_arg=invalid
2110         for ol_val in no yes mod ; do
2111                 if test "$enableval" = "$ol_val" ; then
2112                         ol_arg="$ol_val"
2113                 fi
2114         done
2115         if test "$ol_arg" = "invalid" ; then
2116                 { echo "configure: error: bad value $enableval for --enable-perl" 1>&2; exit 1; }
2117         fi
2118         ol_enable_perl="$ol_arg"
2119
2120 else
2121         ol_enable_perl="no"
2122 fi
2123 # end --enable-perl
2124 # OpenLDAP --enable-relay
2125         # Check whether --enable-relay or --disable-relay was given.
2126 if test "${enable_relay+set}" = set; then
2127   enableval="$enable_relay"
2128   
2129         ol_arg=invalid
2130         for ol_val in no yes mod ; do
2131                 if test "$enableval" = "$ol_val" ; then
2132                         ol_arg="$ol_val"
2133                 fi
2134         done
2135         if test "$ol_arg" = "invalid" ; then
2136                 { echo "configure: error: bad value $enableval for --enable-relay" 1>&2; exit 1; }
2137         fi
2138         ol_enable_relay="$ol_arg"
2139
2140 else
2141         ol_enable_relay="yes"
2142 fi
2143 # end --enable-relay
2144 # OpenLDAP --enable-shell
2145         # Check whether --enable-shell or --disable-shell was given.
2146 if test "${enable_shell+set}" = set; then
2147   enableval="$enable_shell"
2148   
2149         ol_arg=invalid
2150         for ol_val in no yes mod ; do
2151                 if test "$enableval" = "$ol_val" ; then
2152                         ol_arg="$ol_val"
2153                 fi
2154         done
2155         if test "$ol_arg" = "invalid" ; then
2156                 { echo "configure: error: bad value $enableval for --enable-shell" 1>&2; exit 1; }
2157         fi
2158         ol_enable_shell="$ol_arg"
2159
2160 else
2161         ol_enable_shell="no"
2162 fi
2163 # end --enable-shell
2164 # OpenLDAP --enable-sql
2165         # Check whether --enable-sql or --disable-sql was given.
2166 if test "${enable_sql+set}" = set; then
2167   enableval="$enable_sql"
2168   
2169         ol_arg=invalid
2170         for ol_val in no yes mod ; do
2171                 if test "$enableval" = "$ol_val" ; then
2172                         ol_arg="$ol_val"
2173                 fi
2174         done
2175         if test "$ol_arg" = "invalid" ; then
2176                 { echo "configure: error: bad value $enableval for --enable-sql" 1>&2; exit 1; }
2177         fi
2178         ol_enable_sql="$ol_arg"
2179
2180 else
2181         ol_enable_sql="no"
2182 fi
2183 # end --enable-sql
2184
2185 Overlays="chain denyop dyngroup lastmod ppolicy proxycache rwm"
2186
2187 # Check whether --with-xxslapoverlays or --without-xxslapoverlays was given.
2188 if test "${with_xxslapoverlays+set}" = set; then
2189   withval="$with_xxslapoverlays"
2190   :
2191 fi
2192
2193
2194 # OpenLDAP --enable-chain
2195         # Check whether --enable-chain or --disable-chain was given.
2196 if test "${enable_chain+set}" = set; then
2197   enableval="$enable_chain"
2198   
2199         ol_arg=invalid
2200         for ol_val in no yes mod ; do
2201                 if test "$enableval" = "$ol_val" ; then
2202                         ol_arg="$ol_val"
2203                 fi
2204         done
2205         if test "$ol_arg" = "invalid" ; then
2206                 { echo "configure: error: bad value $enableval for --enable-chain" 1>&2; exit 1; }
2207         fi
2208         ol_enable_chain="$ol_arg"
2209
2210 else
2211         ol_enable_chain="no"
2212 fi
2213 # end --enable-chain
2214
2215 # OpenLDAP --enable-denyop
2216         # Check whether --enable-denyop or --disable-denyop was given.
2217 if test "${enable_denyop+set}" = set; then
2218   enableval="$enable_denyop"
2219   
2220         ol_arg=invalid
2221         for ol_val in no yes mod ; do
2222                 if test "$enableval" = "$ol_val" ; then
2223                         ol_arg="$ol_val"
2224                 fi
2225         done
2226         if test "$ol_arg" = "invalid" ; then
2227                 { echo "configure: error: bad value $enableval for --enable-denyop" 1>&2; exit 1; }
2228         fi
2229         ol_enable_denyop="$ol_arg"
2230
2231 else
2232         ol_enable_denyop="no"
2233 fi
2234 # end --enable-denyop
2235
2236 # OpenLDAP --enable-dyngroup
2237         # Check whether --enable-dyngroup or --disable-dyngroup was given.
2238 if test "${enable_dyngroup+set}" = set; then
2239   enableval="$enable_dyngroup"
2240   
2241         ol_arg=invalid
2242         for ol_val in no yes mod ; do
2243                 if test "$enableval" = "$ol_val" ; then
2244                         ol_arg="$ol_val"
2245                 fi
2246         done
2247         if test "$ol_arg" = "invalid" ; then
2248                 { echo "configure: error: bad value $enableval for --enable-dyngroup" 1>&2; exit 1; }
2249         fi
2250         ol_enable_dyngroup="$ol_arg"
2251
2252 else
2253         ol_enable_dyngroup="no"
2254 fi
2255 # end --enable-dyngroup
2256
2257 # OpenLDAP --enable-lastmod
2258         # Check whether --enable-lastmod or --disable-lastmod was given.
2259 if test "${enable_lastmod+set}" = set; then
2260   enableval="$enable_lastmod"
2261   
2262         ol_arg=invalid
2263         for ol_val in no yes mod ; do
2264                 if test "$enableval" = "$ol_val" ; then
2265                         ol_arg="$ol_val"
2266                 fi
2267         done
2268         if test "$ol_arg" = "invalid" ; then
2269                 { echo "configure: error: bad value $enableval for --enable-lastmod" 1>&2; exit 1; }
2270         fi
2271         ol_enable_lastmod="$ol_arg"
2272
2273 else
2274         ol_enable_lastmod="no"
2275 fi
2276 # end --enable-lastmod
2277
2278 # OpenLDAP --enable-ppolicy
2279         # Check whether --enable-ppolicy or --disable-ppolicy was given.
2280 if test "${enable_ppolicy+set}" = set; then
2281   enableval="$enable_ppolicy"
2282   
2283         ol_arg=invalid
2284         for ol_val in no yes mod ; do
2285                 if test "$enableval" = "$ol_val" ; then
2286                         ol_arg="$ol_val"
2287                 fi
2288         done
2289         if test "$ol_arg" = "invalid" ; then
2290                 { echo "configure: error: bad value $enableval for --enable-ppolicy" 1>&2; exit 1; }
2291         fi
2292         ol_enable_ppolicy="$ol_arg"
2293
2294 else
2295         ol_enable_ppolicy="no"
2296 fi
2297 # end --enable-ppolicy
2298
2299 # OpenLDAP --enable-proxycache
2300         # Check whether --enable-proxycache or --disable-proxycache was given.
2301 if test "${enable_proxycache+set}" = set; then
2302   enableval="$enable_proxycache"
2303   
2304         ol_arg=invalid
2305         for ol_val in no yes mod ; do
2306                 if test "$enableval" = "$ol_val" ; then
2307                         ol_arg="$ol_val"
2308                 fi
2309         done
2310         if test "$ol_arg" = "invalid" ; then
2311                 { echo "configure: error: bad value $enableval for --enable-proxycache" 1>&2; exit 1; }
2312         fi
2313         ol_enable_proxycache="$ol_arg"
2314
2315 else
2316         ol_enable_proxycache="no"
2317 fi
2318 # end --enable-proxycache
2319
2320 # OpenLDAP --enable-rwm
2321         # Check whether --enable-rwm or --disable-rwm was given.
2322 if test "${enable_rwm+set}" = set; then
2323   enableval="$enable_rwm"
2324   
2325         ol_arg=invalid
2326         for ol_val in no yes mod ; do
2327                 if test "$enableval" = "$ol_val" ; then
2328                         ol_arg="$ol_val"
2329                 fi
2330         done
2331         if test "$ol_arg" = "invalid" ; then
2332                 { echo "configure: error: bad value $enableval for --enable-rwm" 1>&2; exit 1; }
2333         fi
2334         ol_enable_rwm="$ol_arg"
2335
2336 else
2337         ol_enable_rwm="no"
2338 fi
2339 # end --enable-rwm
2340
2341
2342 # Check whether --with-xxslurpdoptions or --without-xxslurpdoptions was given.
2343 if test "${with_xxslurpdoptions+set}" = set; then
2344   withval="$with_xxslurpdoptions"
2345   :
2346 fi
2347
2348 # OpenLDAP --enable-slurpd
2349         # Check whether --enable-slurpd or --disable-slurpd was given.
2350 if test "${enable_slurpd+set}" = set; then
2351   enableval="$enable_slurpd"
2352   
2353         ol_arg=invalid
2354         for ol_val in auto yes no ; do
2355                 if test "$enableval" = "$ol_val" ; then
2356                         ol_arg="$ol_val"
2357                 fi
2358         done
2359         if test "$ol_arg" = "invalid" ; then
2360                 { echo "configure: error: bad value $enableval for --enable-slurpd" 1>&2; exit 1; }
2361         fi
2362         ol_enable_slurpd="$ol_arg"
2363
2364 else
2365         ol_enable_slurpd="auto"
2366 fi
2367 # end --enable-slurpd
2368
2369 # Check whether --with-xxliboptions or --without-xxliboptions was given.
2370 if test "${with_xxliboptions+set}" = set; then
2371   withval="$with_xxliboptions"
2372   :
2373 fi
2374
2375 # Check whether --enable-static or --disable-static was given.
2376 if test "${enable_static+set}" = set; then
2377   enableval="$enable_static"
2378   p=${PACKAGE-default}
2379 case $enableval in
2380 yes) enable_static=yes ;;
2381 no) enable_static=no ;;
2382 *)
2383   enable_static=no
2384   # Look at the argument we got.  We use all the common list separators.
2385   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2386   for pkg in $enableval; do
2387     if test "X$pkg" = "X$p"; then
2388       enable_static=yes
2389     fi
2390   done
2391   IFS="$ac_save_ifs"
2392   ;;
2393 esac
2394 else
2395   enable_static=yes
2396 fi
2397
2398 # Check whether --enable-shared or --disable-shared was given.
2399 if test "${enable_shared+set}" = set; then
2400   enableval="$enable_shared"
2401   p=${PACKAGE-default}
2402 case $enableval in
2403 yes) enable_shared=yes ;;
2404 no) enable_shared=no ;;
2405 *)
2406   enable_shared=no
2407   # Look at the argument we got.  We use all the common list separators.
2408   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2409   for pkg in $enableval; do
2410     if test "X$pkg" = "X$p"; then
2411       enable_shared=yes
2412     fi
2413   done
2414   IFS="$ac_save_ifs"
2415   ;;
2416 esac
2417 else
2418   enable_shared=yes
2419 fi
2420
2421
2422
2423 # validate options
2424 if test $ol_enable_slapd = no ; then
2425                 if test $ol_enable_slapi = yes ; then
2426                 echo "configure: warning: slapd disabled, ignoring --enable-slapi argument" 1>&2
2427         fi
2428         for i in $Backends; do
2429                 eval "ol_tmp=\$ol_enable_$i"
2430                 if test $ol_tmp != no ; then
2431                         echo "configure: warning: slapd disabled, ignoring --enable-$i argument" 1>&2
2432                         eval "ol_enable_$i=no"
2433                 fi
2434         done
2435         if test $ol_enable_modules = yes ; then
2436                 echo "configure: warning: slapd disabled, ignoring --enable-modules argument" 1>&2
2437         fi
2438         if test $ol_enable_multimaster = yes ; then
2439                 echo "configure: warning: slapd disabled, ignoring --enable-multimaster argument" 1>&2
2440         fi
2441         if test $ol_enable_wrappers = yes ; then
2442                 echo "configure: warning: slapd disabled, ignoring --enable-wrappers argument" 1>&2
2443         fi
2444         if test $ol_enable_rlookups = yes ; then
2445                 echo "configure: warning: slapd disabled, ignoring --enable-rlookups argument" 1>&2
2446         fi
2447         if test $ol_enable_aci = yes ; then
2448                 echo "configure: warning: slapd disabled, ignoring --enable-aci argument" 1>&2
2449         fi
2450         if test $ol_with_ldbm_api != auto ; then
2451                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-api argument" 1>&2
2452         fi
2453         if test $ol_with_ldbm_type != auto ; then
2454                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-type argument" 1>&2
2455         fi
2456         if test $ol_enable_slurpd = yes ; then
2457                 { echo "configure: error: slurpd requires slapd" 1>&2; exit 1; }
2458         fi
2459         if test $ol_enable_rewrite = yes ; then
2460                 echo "configure: warning: slapd disabled, ignoring --enable-rewrite argument" 1>&2
2461         fi
2462                 for i in $Overlays; do
2463                 eval "ol_tmp=\$ol_enable_$i"
2464                 if test $ol_tmp != no ; then
2465                         echo "configure: warning: slapd disabled, ignoring --enable-$i argument" 1>&2
2466                         eval "ol_enable_$i=no"
2467                 fi
2468         done
2469
2470         # force settings to no
2471         ol_enable_slapi=no
2472
2473         ol_enable_modules=no
2474         ol_enable_multimaster=no
2475         ol_enable_rlookups=no
2476         ol_enable_aci=no
2477         ol_enable_wrappers=no
2478
2479         ol_with_ldbm_api=no
2480         ol_with_ldbm_type=no
2481
2482         ol_enable_slurpd=no
2483
2484         ol_enable_rewrite=no
2485
2486 elif test $ol_enable_ldbm = no ; then
2487         
2488         if test $ol_with_ldbm_api != auto ; then
2489                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-api argument" 1>&2
2490         fi
2491
2492         if test $ol_with_ldbm_type != auto ; then
2493                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-type argument" 1>&2
2494         fi
2495
2496         if test $ol_enable_modules != yes -a \
2497                 $ol_enable_bdb = no -a \
2498                 $ol_enable_dnssrv = no -a \
2499                 $ol_enable_hdb = no -a \
2500                 $ol_enable_ldap = no -a \
2501                 $ol_enable_meta = no -a \
2502                 $ol_enable_monitor = no -a \
2503                 $ol_enable_null = no -a \
2504                 $ol_enable_passwd = no -a \
2505                 $ol_enable_perl = no -a \
2506                 $ol_enable_relay = no -a \
2507                 $ol_enable_shell = no -a \
2508                 $ol_enable_sql = no ; then
2509
2510                 if test $ol_enable_slapd = yes ; then
2511                         { echo "configure: error: slapd requires a backend" 1>&2; exit 1; }
2512                 else
2513                         echo "configure: warning: skipping slapd, no backend specified" 1>&2
2514                         ol_enable_slapd=no
2515                 fi
2516         fi
2517
2518         ol_with_ldbm_api=no
2519         ol_with_ldbm_type=no
2520
2521         if test $ol_enable_bdb != no -o $ol_enable_hdb != no; then
2522                 ol_with_ldbm_api=berkeley
2523         fi
2524
2525 else
2526                 if test $ol_with_ldbm_api = gdbm -a \
2527                 $ol_with_ldbm_type = btree ; then
2528                 { echo "configure: error: GDBM only supports LDBM type hash" 1>&2; exit 1; }
2529         fi
2530         if test $ol_with_ldbm_api = mdbm -a \
2531                 $ol_with_ldbm_type = btree ; then
2532                 { echo "configure: error: MDBM only supports LDBM type hash" 1>&2; exit 1; }
2533         fi
2534         if test $ol_with_ldbm_api = ndbm -a \
2535                 $ol_with_ldbm_type = btree ; then
2536                 { echo "configure: error: NDBM only supports LDBM type hash" 1>&2; exit 1; }
2537         fi
2538
2539         if test $ol_enable_bdb = yes -o $ol_enable_hdb = yes ; then
2540                 if test $ol_with_ldbm_api = auto ; then
2541                         ol_with_ldbm_api=berkeley
2542                 elif test $ol_with_ldbm_api != berkeley ; then
2543                         { echo "configure: error: LDBM API not compatible with BDB/HDB" 1>&2; exit 1; }
2544                 fi
2545
2546         elif test $ol_enable_bdb = auto ; then
2547                 if test $ol_with_ldbm_api != berkeley \
2548                         -o $ol_with_ldbm_api != auto ; then
2549                         echo "configure: warning: LDBM API not compatible with BDB, disabling BDB" 1>&2
2550                         ol_enable_bdb=no
2551                 fi
2552         fi
2553 fi
2554
2555 if test $ol_enable_chain != no -a $ol_enable_ldap = no ; then
2556         { echo "configure: error: --enable-chain requires --enable-ldap" 1>&2; exit 1; }
2557 fi
2558
2559 if test $ol_enable_meta = yes -a $ol_enable_ldap = no ; then
2560         { echo "configure: error: --enable-meta requires --enable-ldap" 1>&2; exit 1; }
2561 fi
2562
2563 if test $ol_enable_slurpd = yes ; then
2564                 if test $ol_with_threads = no ; then
2565                 { echo "configure: error: slurpd requires threads" 1>&2; exit 1; }
2566         fi
2567 fi
2568
2569 if test $ol_enable_lmpasswd = yes ; then
2570         if test $ol_with_tls = no ; then
2571                 { echo "configure: error: LAN Manager passwords require OpenSSL" 1>&2; exit 1; }
2572         fi
2573 fi
2574
2575 if test $ol_enable_kbind = yes ; then
2576         if test $ol_with_kerberos = no ; then
2577                 { echo "configure: error: options require --with-kerberos" 1>&2; exit 1; }
2578         elif test $ol_with_kerberos = auto ; then
2579                 ol_with_kerberos=yes
2580         fi
2581
2582 elif test $ol_enable_kbind = no ; then
2583         if test $ol_with_kerberos = auto ; then
2584                 ol_with_kerberos=no
2585         elif test $ol_with_kerberos != no ; then
2586                 echo "configure: warning: Kerberos detection enabled unnecessarily" 1>&2;
2587                 ol_with_kerberos=no
2588         fi
2589 fi
2590
2591 if test $ol_enable_spasswd = yes ; then
2592         if test $ol_with_cyrus_sasl = no ; then
2593                 { echo "configure: error: options require --with-cyrus-sasl" 1>&2; exit 1; }
2594         fi
2595         ol_with_cyrus_sasl=yes
2596 fi
2597
2598 echo "$ac_t""done" 1>&6
2599
2600 LDAP_LIBS=
2601 LDBM_LIBS=
2602 LTHREAD_LIBS=
2603 LUTIL_LIBS=
2604
2605 SLAPD_LIBS=
2606 SLURPD_LIBS=
2607
2608 BUILD_SLAPD=no
2609 BUILD_SLURPD=no
2610
2611 BUILD_THREAD=no
2612
2613 BUILD_SLAPI=no
2614 SLAPD_SLAPI_DEPEND=
2615
2616 BUILD_BDB=no
2617 BUILD_DNSSRV=no
2618 BUILD_HDB=no
2619 BUILD_LDAP=no
2620 BUILD_LDBM=no
2621 BUILD_META=no
2622 BUILD_MONITOR=no
2623 BUILD_NULL=no
2624 BUILD_PASSWD=no
2625 BUILD_PERL=no
2626 BUILD_RELAY=no
2627 BUILD_SHELL=no
2628 BUILD_SQL=no
2629
2630 BUILD_CHAIN=no
2631 BUILD_DENYOP=no
2632 BUILD_DYNGROUP=no
2633 BUILD_LASTMOD=no
2634 BUILD_PPOLICY=no
2635 BUILD_PROXYCACHE=no
2636 BUILD_RWM=no
2637
2638 SLAPD_DYNAMIC_OVERLAYS=
2639
2640 SLAPD_MODULES_LDFLAGS=
2641 SLAPD_MODULES_CPPFLAGS=
2642
2643 SLAPD_STATIC_BACKENDS=
2644 SLAPD_DYNAMIC_BACKENDS=
2645
2646 SLAPD_PERL_LDFLAGS=
2647 MOD_PERL_LDFLAGS=
2648 PERL_CPPFLAGS=
2649
2650 SLAPD_SQL_LDFLAGS=
2651 SLAPD_SQL_LIBS=
2652 SLAPD_SQL_INCLUDES=
2653
2654 KRB4_LIBS=
2655 KRB5_LIBS=
2656 SASL_LIBS=
2657 TLS_LIBS=
2658 MODULES_LIBS=
2659 SLAPI_LIBS=
2660 LIBSLAPI=
2661 LIBSLAPITOOLS=
2662 AUTH_LIBS=
2663
2664 SLAPD_SLP_LIBS=
2665
2666
2667 # Find a good install program.  We prefer a C program (faster),
2668 # so one script is as good as another.  But avoid the broken or
2669 # incompatible versions:
2670 # SysV /etc/install, /usr/sbin/install
2671 # SunOS /usr/etc/install
2672 # IRIX /sbin/install
2673 # AIX /bin/install
2674 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
2675 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
2676 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2677 # ./install, which can be erroneously created by make from ./install.sh.
2678 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
2679 echo "configure:2680: checking for a BSD compatible install" >&5
2680 if test -z "$INSTALL"; then
2681 if eval "test \"\${ac_cv_path_install+set}\" = set"; then
2682   echo $ac_n "(cached) $ac_c" 1>&6
2683 else
2684     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
2685   for ac_dir in $PATH; do
2686     # Account for people who put trailing slashes in PATH elements.
2687     case "$ac_dir/" in
2688     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
2689     *)
2690       # OSF1 and SCO ODT 3.0 have their own names for install.
2691       # Don't use installbsd from OSF since it installs stuff as root
2692       # by default.
2693       for ac_prog in ginstall scoinst install; do
2694         if test -f $ac_dir/$ac_prog; then
2695           if test $ac_prog = install &&
2696             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
2697             # AIX install.  It has an incompatible calling convention.
2698             :
2699           elif test $ac_prog = install &&
2700             grep pwplus $ac_dir/$ac_prog >/dev/null 2>&1; then
2701             # program-specific install script used by HP pwplus--don't use.
2702             :
2703           else
2704             ac_cv_path_install="$ac_dir/$ac_prog -c"
2705             break 2
2706           fi
2707         fi
2708       done
2709       ;;
2710     esac
2711   done
2712   IFS="$ac_save_IFS"
2713
2714 fi
2715   if test "${ac_cv_path_install+set}" = set; then
2716     INSTALL="$ac_cv_path_install"
2717   else
2718     # As a last resort, use the slow shell script.  We don't cache a
2719     # path for INSTALL within a source directory, because that will
2720     # break other packages using the cache if that directory is
2721     # removed, or if the path is relative.
2722     INSTALL="$ac_install_sh"
2723   fi
2724 fi
2725 echo "$ac_t""$INSTALL" 1>&6
2726
2727 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2728 # It thinks the first close brace ends the variable substitution.
2729 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2730
2731 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
2732
2733 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
2734
2735
2736 cat >> confdefs.h <<\EOF
2737 #define HAVE_MKVERSION 1
2738 EOF
2739
2740
2741
2742
2743 ol_aix_threads=no
2744 case "$target" in
2745 *-*-aix*)       if test -z "$CC" ; then
2746                 case "$ol_with_threads" in
2747                 auto | yes |  posix) ol_aix_threads=yes ;;
2748                 esac
2749         fi
2750 ;;
2751 esac
2752
2753 if test $ol_aix_threads = yes ; then
2754         if test -z "${CC}" ; then
2755                 for ac_prog in cc_r xlc_r cc
2756 do
2757 # Extract the first word of "$ac_prog", so it can be a program name with args.
2758 set dummy $ac_prog; ac_word=$2
2759 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2760 echo "configure:2761: checking for $ac_word" >&5
2761 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2762   echo $ac_n "(cached) $ac_c" 1>&6
2763 else
2764   if test -n "$CC"; then
2765   ac_cv_prog_CC="$CC" # Let the user override the test.
2766 else
2767   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2768   ac_dummy="$PATH"
2769   for ac_dir in $ac_dummy; do
2770     test -z "$ac_dir" && ac_dir=.
2771     if test -f $ac_dir/$ac_word; then
2772       ac_cv_prog_CC="$ac_prog"
2773       break
2774     fi
2775   done
2776   IFS="$ac_save_ifs"
2777 fi
2778 fi
2779 CC="$ac_cv_prog_CC"
2780 if test -n "$CC"; then
2781   echo "$ac_t""$CC" 1>&6
2782 else
2783   echo "$ac_t""no" 1>&6
2784 fi
2785
2786 test -n "$CC" && break
2787 done
2788
2789
2790                 if test "$CC" = cc ; then
2791                                                 if test $ol_with_threads != auto ; then
2792                                 { echo "configure: error: --with-threads requires cc_r (or other suitable compiler) on AIX" 1>&2; exit 1; }
2793                         else
2794                                 echo "configure: warning: disabling threads, no cc_r on AIX" 1>&2
2795                         fi
2796                         ol_with_threads=no
2797                 fi
2798         fi
2799
2800         if test "${CC}" = "cc_r" -o "${CC}" = "xlc_r" ; then
2801                 ol_with_threads=posix
2802                 ol_cv_pthread_create=yes
2803         fi
2804 fi
2805
2806 if test -z "${CC}"; then
2807         for ac_prog in cc gcc
2808 do
2809 # Extract the first word of "$ac_prog", so it can be a program name with args.
2810 set dummy $ac_prog; ac_word=$2
2811 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2812 echo "configure:2813: checking for $ac_word" >&5
2813 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2814   echo $ac_n "(cached) $ac_c" 1>&6
2815 else
2816   if test -n "$CC"; then
2817   ac_cv_prog_CC="$CC" # Let the user override the test.
2818 else
2819   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2820   ac_dummy="$PATH"
2821   for ac_dir in $ac_dummy; do
2822     test -z "$ac_dir" && ac_dir=.
2823     if test -f $ac_dir/$ac_word; then
2824       ac_cv_prog_CC="$ac_prog"
2825       break
2826     fi
2827   done
2828   IFS="$ac_save_ifs"
2829 fi
2830 fi
2831 CC="$ac_cv_prog_CC"
2832 if test -n "$CC"; then
2833   echo "$ac_t""$CC" 1>&6
2834 else
2835   echo "$ac_t""no" 1>&6
2836 fi
2837
2838 test -n "$CC" && break
2839 done
2840 test -n "$CC" || CC="missing"
2841
2842
2843         if test "${CC}" = "missing" ; then
2844                 { echo "configure: error: Unable to locate cc(1) or suitable replacement.  Check PATH or set CC." 1>&2; exit 1; }
2845         fi
2846 fi
2847
2848 if test -z "${AR}"; then
2849         for ac_prog in ar gar
2850 do
2851 # Extract the first word of "$ac_prog", so it can be a program name with args.
2852 set dummy $ac_prog; ac_word=$2
2853 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2854 echo "configure:2855: checking for $ac_word" >&5
2855 if eval "test \"\${ac_cv_prog_AR+set}\" = set"; then
2856   echo $ac_n "(cached) $ac_c" 1>&6
2857 else
2858   if test -n "$AR"; then
2859   ac_cv_prog_AR="$AR" # Let the user override the test.
2860 else
2861   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2862   ac_dummy="$PATH"
2863   for ac_dir in $ac_dummy; do
2864     test -z "$ac_dir" && ac_dir=.
2865     if test -f $ac_dir/$ac_word; then
2866       ac_cv_prog_AR="$ac_prog"
2867       break
2868     fi
2869   done
2870   IFS="$ac_save_ifs"
2871 fi
2872 fi
2873 AR="$ac_cv_prog_AR"
2874 if test -n "$AR"; then
2875   echo "$ac_t""$AR" 1>&6
2876 else
2877   echo "$ac_t""no" 1>&6
2878 fi
2879
2880 test -n "$AR" && break
2881 done
2882 test -n "$AR" || AR="missing"
2883
2884
2885         if test "${AR}" = "missing" ; then
2886                 { echo "configure: error: Unable to locate ar(1) or suitable replacement.  Check PATH or set AR." 1>&2; exit 1; }
2887         fi
2888 fi
2889
2890
2891
2892 # Find the correct PATH separator.  Usually this is `:', but
2893 # DJGPP uses `;' like DOS.
2894 if test "X${PATH_SEPARATOR+set}" != Xset; then
2895   UNAME=${UNAME-`uname 2>/dev/null`}
2896   case X$UNAME in
2897     *-DOS) lt_cv_sys_path_separator=';' ;;
2898     *)     lt_cv_sys_path_separator=':' ;;
2899   esac
2900   PATH_SEPARATOR=$lt_cv_sys_path_separator
2901 fi
2902
2903 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
2904 echo "configure:2905: checking for Cygwin environment" >&5
2905 if eval "test \"\${ac_cv_cygwin+set}\" = set"; then
2906   echo $ac_n "(cached) $ac_c" 1>&6
2907 else
2908   cat > conftest.$ac_ext <<EOF
2909 #line 2910 "configure"
2910 #include "confdefs.h"
2911
2912 int main() {
2913
2914 #ifndef __CYGWIN__
2915 #define __CYGWIN__ __CYGWIN32__
2916 #endif
2917 return __CYGWIN__;
2918 ; return 0; }
2919 EOF
2920 if { (eval echo configure:2921: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2921   rm -rf conftest*
2922   ac_cv_cygwin=yes
2923 else
2924   echo "configure: failed program was:" >&5
2925   cat conftest.$ac_ext >&5
2926   rm -rf conftest*
2927   ac_cv_cygwin=no
2928 fi
2929 rm -f conftest*
2930 fi
2931
2932 echo "$ac_t""$ac_cv_cygwin" 1>&6
2933 CYGWIN=
2934 test "$ac_cv_cygwin" = yes && CYGWIN=yes
2935 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
2936 echo "configure:2937: checking for mingw32 environment" >&5
2937 if eval "test \"\${ac_cv_mingw32+set}\" = set"; then
2938   echo $ac_n "(cached) $ac_c" 1>&6
2939 else
2940   cat > conftest.$ac_ext <<EOF
2941 #line 2942 "configure"
2942 #include "confdefs.h"
2943
2944 int main() {
2945 return __MINGW32__;
2946 ; return 0; }
2947 EOF
2948 if { (eval echo configure:2949: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2949   rm -rf conftest*
2950   ac_cv_mingw32=yes
2951 else
2952   echo "configure: failed program was:" >&5
2953   cat conftest.$ac_ext >&5
2954   rm -rf conftest*
2955   ac_cv_mingw32=no
2956 fi
2957 rm -f conftest*
2958 fi
2959
2960 echo "$ac_t""$ac_cv_mingw32" 1>&6
2961 MINGW32=
2962 test "$ac_cv_mingw32" = yes && MINGW32=yes
2963 echo $ac_n "checking for EMX OS/2 environment""... $ac_c" 1>&6
2964 echo "configure:2965: checking for EMX OS/2 environment" >&5
2965 if eval "test \"\${ac_cv_emxos2+set}\" = set"; then
2966   echo $ac_n "(cached) $ac_c" 1>&6
2967 else
2968   cat > conftest.$ac_ext <<EOF
2969 #line 2970 "configure"
2970 #include "confdefs.h"
2971
2972 int main() {
2973 return __EMX__;
2974 ; return 0; }
2975 EOF
2976 if { (eval echo configure:2977: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2977   rm -rf conftest*
2978   ac_cv_emxos2=yes
2979 else
2980   echo "configure: failed program was:" >&5
2981   cat conftest.$ac_ext >&5
2982   rm -rf conftest*
2983   ac_cv_emxos2=no
2984 fi
2985 rm -f conftest*
2986 fi
2987
2988 echo "$ac_t""$ac_cv_emxos2" 1>&6
2989 EMXOS2=
2990 test "$ac_cv_emxos2" = yes && EMXOS2=yes
2991 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
2992 echo "configure:2993: checking how to run the C preprocessor" >&5
2993 # On Suns, sometimes $CPP names a directory.
2994 if test -n "$CPP" && test -d "$CPP"; then
2995   CPP=
2996 fi
2997 if test -z "$CPP"; then
2998 if eval "test \"\${ac_cv_prog_CPP+set}\" = set"; then
2999   echo $ac_n "(cached) $ac_c" 1>&6
3000 else
3001     # This must be in double quotes, not single quotes, because CPP may get
3002   # substituted into the Makefile and "${CC-cc}" will confuse make.
3003   CPP="${CC-cc} -E"
3004   # On the NeXT, cc -E runs the code through the compiler's parser,
3005   # not just through cpp.
3006   cat > conftest.$ac_ext <<EOF
3007 #line 3008 "configure"
3008 #include "confdefs.h"
3009 #include <assert.h>
3010 Syntax Error
3011 EOF
3012 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3013 { (eval echo configure:3014: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3014 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3015 if test -z "$ac_err"; then
3016   :
3017 else
3018   echo "$ac_err" >&5
3019   echo "configure: failed program was:" >&5
3020   cat conftest.$ac_ext >&5
3021   rm -rf conftest*
3022   CPP="${CC-cc} -E -traditional-cpp"
3023   cat > conftest.$ac_ext <<EOF
3024 #line 3025 "configure"
3025 #include "confdefs.h"
3026 #include <assert.h>
3027 Syntax Error
3028 EOF
3029 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3030 { (eval echo configure:3031: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3031 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3032 if test -z "$ac_err"; then
3033   :
3034 else
3035   echo "$ac_err" >&5
3036   echo "configure: failed program was:" >&5
3037   cat conftest.$ac_ext >&5
3038   rm -rf conftest*
3039   CPP="${CC-cc} -nologo -E"
3040   cat > conftest.$ac_ext <<EOF
3041 #line 3042 "configure"
3042 #include "confdefs.h"
3043 #include <assert.h>
3044 Syntax Error
3045 EOF
3046 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3047 { (eval echo configure:3048: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3048 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3049 if test -z "$ac_err"; then
3050   :
3051 else
3052   echo "$ac_err" >&5
3053   echo "configure: failed program was:" >&5
3054   cat conftest.$ac_ext >&5
3055   rm -rf conftest*
3056   CPP=/lib/cpp
3057 fi
3058 rm -f conftest*
3059 fi
3060 rm -f conftest*
3061 fi
3062 rm -f conftest*
3063   ac_cv_prog_CPP="$CPP"
3064 fi
3065   CPP="$ac_cv_prog_CPP"
3066 else
3067   ac_cv_prog_CPP="$CPP"
3068 fi
3069 echo "$ac_t""$CPP" 1>&6
3070
3071 # Check whether --enable-fast-install or --disable-fast-install was given.
3072 if test "${enable_fast_install+set}" = set; then
3073   enableval="$enable_fast_install"
3074   p=${PACKAGE-default}
3075 case $enableval in
3076 yes) enable_fast_install=yes ;;
3077 no) enable_fast_install=no ;;
3078 *)
3079   enable_fast_install=no
3080   # Look at the argument we got.  We use all the common list separators.
3081   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
3082   for pkg in $enableval; do
3083     if test "X$pkg" = "X$p"; then
3084       enable_fast_install=yes
3085     fi
3086   done
3087   IFS="$ac_save_ifs"
3088   ;;
3089 esac
3090 else
3091   enable_fast_install=yes
3092 fi
3093
3094 # Extract the first word of "gcc", so it can be a program name with args.
3095 set dummy gcc; ac_word=$2
3096 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3097 echo "configure:3098: checking for $ac_word" >&5
3098 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3099   echo $ac_n "(cached) $ac_c" 1>&6
3100 else
3101   if test -n "$CC"; then
3102   ac_cv_prog_CC="$CC" # Let the user override the test.
3103 else
3104   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3105   ac_dummy="$PATH"
3106   for ac_dir in $ac_dummy; do
3107     test -z "$ac_dir" && ac_dir=.
3108     if test -f $ac_dir/$ac_word; then
3109       ac_cv_prog_CC="gcc"
3110       break
3111     fi
3112   done
3113   IFS="$ac_save_ifs"
3114 fi
3115 fi
3116 CC="$ac_cv_prog_CC"
3117 if test -n "$CC"; then
3118   echo "$ac_t""$CC" 1>&6
3119 else
3120   echo "$ac_t""no" 1>&6
3121 fi
3122
3123 if test -z "$CC"; then
3124   # Extract the first word of "cc", so it can be a program name with args.
3125 set dummy cc; ac_word=$2
3126 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3127 echo "configure:3128: checking for $ac_word" >&5
3128 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3129   echo $ac_n "(cached) $ac_c" 1>&6
3130 else
3131   if test -n "$CC"; then
3132   ac_cv_prog_CC="$CC" # Let the user override the test.
3133 else
3134   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3135   ac_prog_rejected=no
3136   ac_dummy="$PATH"
3137   for ac_dir in $ac_dummy; do
3138     test -z "$ac_dir" && ac_dir=.
3139     if test -f $ac_dir/$ac_word; then
3140       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
3141         ac_prog_rejected=yes
3142         continue
3143       fi
3144       ac_cv_prog_CC="cc"
3145       break
3146     fi
3147   done
3148   IFS="$ac_save_ifs"
3149 if test $ac_prog_rejected = yes; then
3150   # We found a bogon in the path, so make sure we never use it.
3151   set dummy $ac_cv_prog_CC
3152   shift
3153   if test $# -gt 0; then
3154     # We chose a different compiler from the bogus one.
3155     # However, it has the same basename, so the bogon will be chosen
3156     # first if we set CC to just the basename; use the full file name.
3157     shift
3158     set dummy "$ac_dir/$ac_word" "$@"
3159     shift
3160     ac_cv_prog_CC="$@"
3161   fi
3162 fi
3163 fi
3164 fi
3165 CC="$ac_cv_prog_CC"
3166 if test -n "$CC"; then
3167   echo "$ac_t""$CC" 1>&6
3168 else
3169   echo "$ac_t""no" 1>&6
3170 fi
3171
3172   if test -z "$CC"; then
3173     case "`uname -s`" in
3174     *win32* | *WIN32* | *CYGWIN*)
3175       # Extract the first word of "cl", so it can be a program name with args.
3176 set dummy cl; ac_word=$2
3177 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3178 echo "configure:3179: checking for $ac_word" >&5
3179 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3180   echo $ac_n "(cached) $ac_c" 1>&6
3181 else
3182   if test -n "$CC"; then
3183   ac_cv_prog_CC="$CC" # Let the user override the test.
3184 else
3185   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3186   ac_dummy="$PATH"
3187   for ac_dir in $ac_dummy; do
3188     test -z "$ac_dir" && ac_dir=.
3189     if test -f $ac_dir/$ac_word; then
3190       ac_cv_prog_CC="cl"
3191       break
3192     fi
3193   done
3194   IFS="$ac_save_ifs"
3195 fi
3196 fi
3197 CC="$ac_cv_prog_CC"
3198 if test -n "$CC"; then
3199   echo "$ac_t""$CC" 1>&6
3200 else
3201   echo "$ac_t""no" 1>&6
3202 fi
3203  ;;
3204     esac
3205   fi
3206   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
3207 fi
3208
3209 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works""... $ac_c" 1>&6
3210 echo "configure:3211: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works" >&5
3211
3212 ac_ext=c
3213 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
3214 ac_cpp='$CPP $CPPFLAGS'
3215 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
3216 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
3217 cross_compiling=$ac_cv_prog_cc_cross
3218
3219 cat > conftest.$ac_ext << EOF
3220
3221 #line 3222 "configure"
3222 #include "confdefs.h"
3223
3224 main(){return(0);}
3225 EOF
3226 if { (eval echo configure:3227: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3227   ac_cv_prog_cc_works=yes
3228   # If we can't run a trivial program, we are probably using a cross compiler.
3229   if (./conftest; exit) 2>/dev/null; then
3230     ac_cv_prog_cc_cross=no
3231   else
3232     ac_cv_prog_cc_cross=yes
3233   fi
3234 else
3235   echo "configure: failed program was:" >&5
3236   cat conftest.$ac_ext >&5
3237   ac_cv_prog_cc_works=no
3238 fi
3239 rm -fr conftest*
3240 ac_ext=c
3241 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
3242 ac_cpp='$CPP $CPPFLAGS'
3243 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
3244 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
3245 cross_compiling=$ac_cv_prog_cc_cross
3246
3247 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
3248 if test $ac_cv_prog_cc_works = no; then
3249   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
3250 fi
3251 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
3252 echo "configure:3253: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler" >&5
3253 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
3254 cross_compiling=$ac_cv_prog_cc_cross
3255
3256 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
3257 echo "configure:3258: checking whether we are using GNU C" >&5
3258 if eval "test \"\${ac_cv_prog_gcc+set}\" = set"; then
3259   echo $ac_n "(cached) $ac_c" 1>&6
3260 else
3261   cat > conftest.c <<EOF
3262 #ifdef __GNUC__
3263   yes;
3264 #endif
3265 EOF
3266 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:3267: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
3267   ac_cv_prog_gcc=yes
3268 else
3269   ac_cv_prog_gcc=no
3270 fi
3271 fi
3272
3273 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
3274
3275 if test $ac_cv_prog_gcc = yes; then
3276   GCC=yes
3277 else
3278   GCC=
3279 fi
3280
3281 ac_test_CFLAGS="${CFLAGS+set}"
3282 ac_save_CFLAGS="$CFLAGS"
3283 CFLAGS=
3284 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
3285 echo "configure:3286: checking whether ${CC-cc} accepts -g" >&5
3286 if eval "test \"\${ac_cv_prog_cc_g+set}\" = set"; then
3287   echo $ac_n "(cached) $ac_c" 1>&6
3288 else
3289   echo 'void f(){}' > conftest.c
3290 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
3291   ac_cv_prog_cc_g=yes
3292 else
3293   ac_cv_prog_cc_g=no
3294 fi
3295 rm -f conftest*
3296
3297 fi
3298
3299 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
3300 if test "$ac_test_CFLAGS" = set; then
3301   CFLAGS="$ac_save_CFLAGS"
3302 elif test $ac_cv_prog_cc_g = yes; then
3303   if test "$GCC" = yes; then
3304     CFLAGS="-g -O2"
3305   else
3306     CFLAGS="-g"
3307   fi
3308 else
3309   if test "$GCC" = yes; then
3310     CFLAGS="-O2"
3311   else
3312     CFLAGS=
3313   fi
3314 fi
3315
3316 # Check whether --with-gnu-ld or --without-gnu-ld was given.
3317 if test "${with_gnu_ld+set}" = set; then
3318   withval="$with_gnu_ld"
3319   test "$withval" = no || with_gnu_ld=yes
3320 else
3321   with_gnu_ld=no
3322 fi
3323
3324 ac_prog=ld
3325 if test "$GCC" = yes; then
3326   # Check if gcc -print-prog-name=ld gives a path.
3327   echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
3328 echo "configure:3329: checking for ld used by GCC" >&5
3329   case $host in
3330   *-*-mingw*)
3331     # gcc leaves a trailing carriage return which upsets mingw
3332     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
3333   *)
3334     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
3335   esac
3336   case $ac_prog in
3337     # Accept absolute paths.
3338     [\\/]* | [A-Za-z]:[\\/]*)
3339       re_direlt='/[^/][^/]*/\.\./'
3340       # Canonicalize the path of ld
3341       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
3342       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
3343         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
3344       done
3345       test -z "$LD" && LD="$ac_prog"
3346       ;;
3347   "")
3348     # If it fails, then pretend we aren't using GCC.
3349     ac_prog=ld
3350     ;;
3351   *)
3352     # If it is relative, then search for the first ld in PATH.
3353     with_gnu_ld=unknown
3354     ;;
3355   esac
3356 elif test "$with_gnu_ld" = yes; then
3357   echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
3358 echo "configure:3359: checking for GNU ld" >&5
3359 else
3360   echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
3361 echo "configure:3362: checking for non-GNU ld" >&5
3362 fi
3363 if eval "test \"\${lt_cv_path_LD+set}\" = set"; then
3364   echo $ac_n "(cached) $ac_c" 1>&6
3365 else
3366   if test -z "$LD"; then
3367   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3368   for ac_dir in $PATH; do
3369     test -z "$ac_dir" && ac_dir=.
3370     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
3371       lt_cv_path_LD="$ac_dir/$ac_prog"
3372       # Check to see if the program is GNU ld.  I'd rather use --version,
3373       # but apparently some GNU ld's only accept -v.
3374       # Break only if it was the GNU/non-GNU ld that we prefer.
3375       if "$lt_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
3376         test "$with_gnu_ld" != no && break
3377       else
3378         test "$with_gnu_ld" != yes && break
3379       fi
3380     fi
3381   done
3382   IFS="$ac_save_ifs"
3383 else
3384   lt_cv_path_LD="$LD" # Let the user override the test with a path.
3385 fi
3386 fi
3387
3388 LD="$lt_cv_path_LD"
3389 if test -n "$LD"; then
3390   echo "$ac_t""$LD" 1>&6
3391 else
3392   echo "$ac_t""no" 1>&6
3393 fi
3394 test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
3395 echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
3396 echo "configure:3397: checking if the linker ($LD) is GNU ld" >&5
3397 if eval "test \"\${lt_cv_prog_gnu_ld+set}\" = set"; then
3398   echo $ac_n "(cached) $ac_c" 1>&6
3399 else
3400   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
3401 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
3402   lt_cv_prog_gnu_ld=yes
3403 else
3404   lt_cv_prog_gnu_ld=no
3405 fi
3406 fi
3407
3408 echo "$ac_t""$lt_cv_prog_gnu_ld" 1>&6
3409 with_gnu_ld=$lt_cv_prog_gnu_ld
3410
3411
3412 echo $ac_n "checking for $LD option to reload object files""... $ac_c" 1>&6
3413 echo "configure:3414: checking for $LD option to reload object files" >&5
3414 if eval "test \"\${lt_cv_ld_reload_flag+set}\" = set"; then
3415   echo $ac_n "(cached) $ac_c" 1>&6
3416 else
3417   lt_cv_ld_reload_flag='-r'
3418 fi
3419
3420 echo "$ac_t""$lt_cv_ld_reload_flag" 1>&6
3421 reload_flag=$lt_cv_ld_reload_flag
3422 test -n "$reload_flag" && reload_flag=" $reload_flag"
3423
3424 echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
3425 echo "configure:3426: checking for BSD-compatible nm" >&5
3426 if eval "test \"\${lt_cv_path_NM+set}\" = set"; then
3427   echo $ac_n "(cached) $ac_c" 1>&6
3428 else
3429   if test -n "$NM"; then
3430   # Let the user override the test.
3431   lt_cv_path_NM="$NM"
3432 else
3433   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3434   for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
3435     test -z "$ac_dir" && ac_dir=.
3436     tmp_nm=$ac_dir/${ac_tool_prefix}nm
3437     if test -f $tmp_nm || test -f $tmp_nm$ac_exeext ; then
3438       # Check to see if the nm accepts a BSD-compat flag.
3439       # Adding the `sed 1q' prevents false positives on HP-UX, which says:
3440       #   nm: unknown option "B" ignored
3441       # Tru64's nm complains that /dev/null is an invalid object file
3442       if ($tmp_nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then
3443         lt_cv_path_NM="$tmp_nm -B"
3444         break
3445       elif ($tmp_nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
3446         lt_cv_path_NM="$tmp_nm -p"
3447         break
3448       else
3449         lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
3450         continue # so that we can try to find one that supports BSD flags
3451       fi
3452     fi
3453   done
3454   IFS="$ac_save_ifs"
3455   test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
3456 fi
3457 fi
3458
3459 NM="$lt_cv_path_NM"
3460 echo "$ac_t""$NM" 1>&6
3461
3462 echo $ac_n "checking for a sed that does not truncate output""... $ac_c" 1>&6
3463 echo "configure:3464: checking for a sed that does not truncate output" >&5
3464 if eval "test \"\${lt_cv_path_SED+set}\" = set"; then
3465   echo $ac_n "(cached) $ac_c" 1>&6
3466 else
3467   # Loop through the user's path and test for sed and gsed.
3468 # Then use that list of sed's as ones to test for truncation.
3469 as_executable_p="test -f"
3470 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3471 for as_dir in $PATH
3472 do
3473   IFS=$as_save_IFS
3474   test -z "$as_dir" && as_dir=.
3475   for ac_prog in sed gsed; do
3476     for ac_exec_ext in '' $ac_executable_extensions; do
3477       if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
3478         _sed_list="$_sed_list $as_dir/$ac_prog$ac_exec_ext"
3479       fi
3480     done
3481   done
3482 done
3483
3484   # Create a temporary directory, and hook for its removal unless debugging.
3485 $debug ||
3486 {
3487   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
3488   trap '{ (exit 1); exit 1; }' 1 2 13 15
3489 }
3490
3491 # Create a (secure) tmp directory for tmp files.
3492 : ${TMPDIR=/tmp}
3493 {
3494   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/sedXXXXXX") 2>/dev/null` &&
3495   test -n "$tmp" && test -d "$tmp"
3496 }  ||
3497 {
3498   tmp=$TMPDIR/sed$$-$RANDOM
3499   (umask 077 && mkdir $tmp)
3500 } ||
3501 {
3502    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
3503    { (exit 1); exit 1; }
3504 }
3505   _max=0
3506   _count=0
3507   # Add /usr/xpg4/bin/sed as it is typically found on Solaris
3508   # along with /bin/sed that truncates output.
3509   for _sed in $_sed_list /usr/xpg4/bin/sed; do
3510     test ! -f ${_sed} && break
3511     cat /dev/null > "$tmp/sed.in"
3512     _count=0
3513     echo ${ECHO_N-$ac_n} "0123456789${ECHO_C-$ac_c}" >"$tmp/sed.in"
3514     # Check for GNU sed and select it if it is found.
3515     if "${_sed}" --version 2>&1 < /dev/null | egrep '(GNU)' > /dev/null; then
3516       lt_cv_path_SED=${_sed}
3517       break
3518     fi
3519     while true; do
3520       cat "$tmp/sed.in" "$tmp/sed.in" >"$tmp/sed.tmp"
3521       mv "$tmp/sed.tmp" "$tmp/sed.in"
3522       cp "$tmp/sed.in" "$tmp/sed.nl"
3523       echo >>"$tmp/sed.nl"
3524       ${_sed} -e 's/a$//' < "$tmp/sed.nl" >"$tmp/sed.out" || break
3525       cmp -s "$tmp/sed.out" "$tmp/sed.nl" || break
3526       # 40000 chars as input seems more than enough
3527       test $_count -gt 10 && break
3528       _count=`expr $_count + 1`
3529       if test $_count -gt $_max; then
3530         _max=$_count
3531         lt_cv_path_SED=$_sed
3532       fi
3533     done
3534   done
3535   rm -rf "$tmp"
3536
3537 fi
3538
3539 if test "X$SED" != "X"; then
3540   lt_cv_path_SED=$SED
3541 else
3542   SED=$lt_cv_path_SED
3543 fi
3544 echo "$ac_t""$SED" 1>&6
3545
3546 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
3547 echo "configure:3548: checking whether ln -s works" >&5
3548 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
3549   echo $ac_n "(cached) $ac_c" 1>&6
3550 else
3551   rm -f conftestdata
3552 if ln -s X conftestdata 2>/dev/null
3553 then
3554   rm -f conftestdata
3555   ac_cv_prog_LN_S="ln -s"
3556 else
3557   ac_cv_prog_LN_S=ln
3558 fi
3559 fi
3560 LN_S="$ac_cv_prog_LN_S"
3561 if test "$ac_cv_prog_LN_S" = "ln -s"; then
3562   echo "$ac_t""yes" 1>&6
3563 else
3564   echo "$ac_t""no" 1>&6
3565 fi
3566
3567 echo $ac_n "checking how to recognise dependent libraries""... $ac_c" 1>&6
3568 echo "configure:3569: checking how to recognise dependent libraries" >&5
3569 if eval "test \"\${lt_cv_deplibs_check_method+set}\" = set"; then
3570   echo $ac_n "(cached) $ac_c" 1>&6
3571 else
3572   lt_cv_file_magic_cmd='$MAGIC_CMD'
3573 lt_cv_file_magic_test_file=
3574 lt_cv_deplibs_check_method='unknown'
3575 # Need to set the preceding variable on all platforms that support
3576 # interlibrary dependencies.
3577 # 'none' -- dependencies not supported.
3578 # `unknown' -- same as none, but documents that we really don't know.
3579 # 'pass_all' -- all dependencies passed with no checks.
3580 # 'test_compile' -- check by making test program.
3581 # 'file_magic [[regex]]' -- check by looking for files in library path
3582 # which responds to the $file_magic_cmd with a given egrep regex.
3583 # If you have `file' or equivalent on your system and you're not sure
3584 # whether `pass_all' will *always* work, you probably want this one.
3585
3586 case $host_os in
3587 aix4* | aix5*)
3588   lt_cv_deplibs_check_method=pass_all
3589   ;;
3590
3591 beos*)
3592   lt_cv_deplibs_check_method=pass_all
3593   ;;
3594
3595 bsdi4*)
3596   lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
3597   lt_cv_file_magic_cmd='/usr/bin/file -L'
3598   lt_cv_file_magic_test_file=/shlib/libc.so
3599   ;;
3600
3601 cygwin* | mingw* | pw32*)
3602   lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
3603   lt_cv_file_magic_cmd='$OBJDUMP -f'
3604   ;;
3605
3606 darwin* | rhapsody*)
3607   lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library'
3608   lt_cv_file_magic_cmd='/usr/bin/file -L'
3609   case "$host_os" in
3610   rhapsody* | darwin1.[012])
3611     lt_cv_file_magic_test_file=`echo /System/Library/Frameworks/System.framework/Versions/*/System | head -1`
3612     ;;
3613   *) # Darwin 1.3 on
3614     lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
3615     ;;
3616   esac
3617   ;;
3618
3619 freebsd*)
3620   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3621     case $host_cpu in
3622     i*86 )
3623       # Not sure whether the presence of OpenBSD here was a mistake.
3624       # Let's accept both of them until this is cleared up.
3625       lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[3-9]86 (compact )?demand paged shared library'
3626       lt_cv_file_magic_cmd=/usr/bin/file
3627       lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3628       ;;
3629     esac
3630   else
3631     lt_cv_deplibs_check_method=pass_all
3632   fi
3633   ;;
3634
3635 gnu*)
3636   lt_cv_deplibs_check_method=pass_all
3637   ;;
3638
3639 hpux10.20*|hpux11*)
3640   lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library'
3641   lt_cv_file_magic_cmd=/usr/bin/file
3642   lt_cv_file_magic_test_file=/usr/lib/libc.sl
3643   ;;
3644
3645 irix5* | irix6* | nonstopux*)
3646   case $host_os in
3647   irix5* | nonstopux*)
3648     # this will be overridden with pass_all, but let us keep it just in case
3649     lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
3650     ;;
3651   *)
3652     case $LD in
3653     *-32|*"-32 ") libmagic=32-bit;;
3654     *-n32|*"-n32 ") libmagic=N32;;
3655     *-64|*"-64 ") libmagic=64-bit;;
3656     *) libmagic=never-match;;
3657     esac
3658     # this will be overridden with pass_all, but let us keep it just in case
3659     lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[1234] dynamic lib MIPS - version 1"
3660     ;;
3661   esac
3662   lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
3663   lt_cv_deplibs_check_method=pass_all
3664   ;;
3665
3666 # This must be Linux ELF.
3667 linux-gnu*)
3668   case $host_cpu in
3669   alpha* | hppa* | i*86 | mips | mipsel | powerpc* | sparc* | ia64*)
3670     lt_cv_deplibs_check_method=pass_all ;;
3671   *)
3672     # glibc up to 2.1.1 does not perform some relocations on ARM
3673     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;;
3674   esac
3675   lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
3676   ;;
3677
3678 netbsd*)
3679   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3680     lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
3681   else
3682     lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so$'
3683   fi
3684   ;;
3685
3686 newos6*)
3687   lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
3688   lt_cv_file_magic_cmd=/usr/bin/file
3689   lt_cv_file_magic_test_file=/usr/lib/libnls.so
3690   ;;
3691
3692 openbsd*)
3693   lt_cv_file_magic_cmd=/usr/bin/file
3694   lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3695   if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
3696     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB shared object'
3697   else
3698     lt_cv_deplibs_check_method='file_magic OpenBSD.* shared library'
3699   fi
3700   ;;
3701
3702 openedition*)
3703   lt_cv_deplibs_check_method=pass_all
3704   ;;
3705
3706 osf3* | osf4* | osf5*)
3707   # this will be overridden with pass_all, but let us keep it just in case
3708   lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
3709   lt_cv_file_magic_test_file=/shlib/libc.so
3710   lt_cv_deplibs_check_method=pass_all
3711   ;;
3712
3713 sco3.2v5*)
3714   lt_cv_deplibs_check_method=pass_all
3715   ;;
3716
3717 solaris*)
3718   lt_cv_deplibs_check_method=pass_all
3719   lt_cv_file_magic_test_file=/lib/libc.so
3720   ;;
3721
3722 sysv5uw[78]* | sysv4*uw2*)
3723   lt_cv_deplibs_check_method=pass_all
3724   ;;
3725
3726 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
3727   case $host_vendor in
3728   motorola)
3729     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]'
3730     lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
3731     ;;
3732   ncr)
3733     lt_cv_deplibs_check_method=pass_all
3734     ;;
3735   sequent)
3736     lt_cv_file_magic_cmd='/bin/file'
3737     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'
3738     ;;
3739   sni)
3740     lt_cv_file_magic_cmd='/bin/file'
3741     lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib"
3742     lt_cv_file_magic_test_file=/lib/libc.so
3743     ;;
3744   siemens)
3745     lt_cv_deplibs_check_method=pass_all
3746     ;;
3747   esac
3748   ;;
3749 esac
3750
3751 fi
3752
3753 echo "$ac_t""$lt_cv_deplibs_check_method" 1>&6
3754 file_magic_cmd=$lt_cv_file_magic_cmd
3755 deplibs_check_method=$lt_cv_deplibs_check_method
3756
3757 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
3758 echo "configure:3759: checking for object suffix" >&5
3759 if eval "test \"\${ac_cv_objext+set}\" = set"; then
3760   echo $ac_n "(cached) $ac_c" 1>&6
3761 else
3762   rm -f conftest*
3763 echo 'int i = 1;' > conftest.$ac_ext
3764 if { (eval echo configure:3765: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3765   for ac_file in conftest.*; do
3766     case $ac_file in
3767     *.c) ;;
3768     *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
3769     esac
3770   done
3771 else
3772   { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
3773 fi
3774 rm -f conftest*
3775 fi
3776
3777 echo "$ac_t""$ac_cv_objext" 1>&6
3778 OBJEXT=$ac_cv_objext
3779 ac_objext=$ac_cv_objext
3780
3781
3782
3783
3784 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
3785 echo "configure:3786: checking for executable suffix" >&5
3786 if eval "test \"\${ac_cv_exeext+set}\" = set"; then
3787   echo $ac_n "(cached) $ac_c" 1>&6
3788 else
3789   if test "$CYGWIN" = yes || test "$MINGW32" = yes || test "$EMXOS2" = yes; then
3790   ac_cv_exeext=.exe
3791 else
3792   rm -f conftest*
3793   echo 'int main () { return 0; }' > conftest.$ac_ext
3794   ac_cv_exeext=
3795   if { (eval echo configure:3796: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
3796     for file in conftest.*; do
3797       case $file in
3798       *.c | *.C | *.o | *.obj | *.xcoff) ;;
3799       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
3800       esac
3801     done
3802   else
3803     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
3804   fi
3805   rm -f conftest*
3806   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
3807 fi
3808 fi
3809
3810 EXEEXT=""
3811 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
3812 echo "$ac_t""${ac_cv_exeext}" 1>&6
3813 ac_exeext=$EXEEXT
3814
3815 if test $host != $build; then
3816   ac_tool_prefix=${host_alias}-
3817 else
3818   ac_tool_prefix=
3819 fi
3820
3821
3822
3823
3824 # Check for command to grab the raw symbol name followed by C symbol from nm.
3825 echo $ac_n "checking command to parse $NM output""... $ac_c" 1>&6
3826 echo "configure:3827: checking command to parse $NM output" >&5
3827 if eval "test \"\${lt_cv_sys_global_symbol_pipe+set}\" = set"; then
3828   echo $ac_n "(cached) $ac_c" 1>&6
3829 else
3830   
3831 # These are sane defaults that work on at least a few old systems.
3832 # [They come from Ultrix.  What could be older than Ultrix?!! ;)]
3833
3834 # Character class describing NM global symbol codes.
3835 symcode='[BCDEGRST]'
3836
3837 # Regexp to match symbols that can be accessed directly from C.
3838 sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
3839
3840 # Transform the above into a raw symbol and a C symbol.
3841 symxfrm='\1 \2\3 \3'
3842
3843 # Transform an extracted symbol line into a proper C declaration
3844 lt_cv_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern char \1;/p'"
3845
3846 # Transform an extracted symbol line into symbol name and symbol address
3847 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'"
3848
3849 # Define system-specific variables.
3850 case $host_os in
3851 aix*)
3852   symcode='[BCDT]'
3853   ;;
3854 cygwin* | mingw* | pw32*)
3855   symcode='[ABCDGISTW]'
3856   ;;
3857 hpux*) # Its linker distinguishes data from code symbols
3858   lt_cv_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern char \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
3859   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'"
3860   ;;
3861 irix* | nonstopux*)
3862   symcode='[BCDEGRST]'
3863   ;;
3864 osf*)
3865   symcode='[BCDEGQRST]'
3866   ;;
3867 solaris* | sysv5*)
3868   symcode='[BDT]'
3869   ;;
3870 sysv4)
3871   symcode='[DFNSTU]'
3872   ;;
3873 esac
3874
3875 # Handle CRLF in mingw tool chain
3876 opt_cr=
3877 case $host_os in
3878 mingw*)
3879   opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
3880   ;;
3881 esac
3882
3883 # If we're using GNU nm, then use its standard symbol codes.
3884 if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then
3885   symcode='[ABCDGISTW]'
3886 fi
3887
3888 # Try without a prefix undercore, then with it.
3889 for ac_symprfx in "" "_"; do
3890
3891   # Write the raw and C identifiers.
3892 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[         ]\($symcode$symcode*\)[         ][      ]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'"
3893
3894   # Check to see that the pipe works correctly.
3895   pipe_works=no
3896   rm -f conftest*
3897   cat > conftest.$ac_ext <<EOF
3898 #ifdef __cplusplus
3899 extern "C" {
3900 #endif
3901 char nm_test_var;
3902 void nm_test_func(){}
3903 #ifdef __cplusplus
3904 }
3905 #endif
3906 int main(){nm_test_var='a';nm_test_func();return(0);}
3907 EOF
3908
3909   if { (eval echo configure:3910: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3910     # Now try to grab the symbols.
3911     nlist=conftest.nm
3912     if { (eval echo configure:3913: \"$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
3913       # Try sorting and uniquifying the output.
3914       if sort "$nlist" | uniq > "$nlist"T; then
3915         mv -f "$nlist"T "$nlist"
3916       else
3917         rm -f "$nlist"T
3918       fi
3919
3920       # Make sure that we snagged all the symbols we need.
3921       if egrep ' nm_test_var$' "$nlist" >/dev/null; then
3922         if egrep ' nm_test_func$' "$nlist" >/dev/null; then
3923           cat <<EOF > conftest.$ac_ext
3924 #ifdef __cplusplus
3925 extern "C" {
3926 #endif
3927
3928 EOF
3929           # Now generate the symbol file.
3930           eval "$lt_cv_global_symbol_to_cdecl"' < "$nlist" >> conftest.$ac_ext'
3931
3932           cat <<EOF >> conftest.$ac_ext
3933 #if defined (__STDC__) && __STDC__
3934 # define lt_ptr void *
3935 #else
3936 # define lt_ptr char *
3937 # define const
3938 #endif
3939
3940 /* The mapping between symbol names and symbols. */
3941 const struct {
3942   const char *name;
3943   lt_ptr address;
3944 }
3945 lt_preloaded_symbols[] =
3946 {
3947 EOF
3948           sed "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (lt_ptr) \&\2},/" < "$nlist" >> conftest.$ac_ext
3949           cat <<\EOF >> conftest.$ac_ext
3950   {0, (lt_ptr) 0}
3951 };
3952
3953 #ifdef __cplusplus
3954 }
3955 #endif
3956 EOF
3957           # Now try linking the two files.
3958           mv conftest.$ac_objext conftstm.$ac_objext
3959           save_LIBS="$LIBS"
3960           save_CFLAGS="$CFLAGS"
3961           LIBS="conftstm.$ac_objext"
3962           CFLAGS="$CFLAGS$no_builtin_flag"
3963           if { (eval echo configure:3964: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest$ac_exeext; then
3964             pipe_works=yes
3965           fi
3966           LIBS="$save_LIBS"
3967           CFLAGS="$save_CFLAGS"
3968         else
3969           echo "cannot find nm_test_func in $nlist" >&5
3970         fi
3971       else
3972         echo "cannot find nm_test_var in $nlist" >&5
3973       fi
3974     else
3975       echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5
3976     fi
3977   else
3978     echo "$progname: failed program was:" >&5
3979     cat conftest.$ac_ext >&5
3980   fi
3981   rm -f conftest* conftst*
3982
3983   # Do not use the global_symbol_pipe unless it works.
3984   if test "$pipe_works" = yes; then
3985     break
3986   else
3987     lt_cv_sys_global_symbol_pipe=
3988   fi
3989 done
3990
3991 fi
3992
3993 global_symbol_pipe="$lt_cv_sys_global_symbol_pipe"
3994 if test -z "$lt_cv_sys_global_symbol_pipe"; then
3995   global_symbol_to_cdecl=
3996   global_symbol_to_c_name_address=
3997 else
3998   global_symbol_to_cdecl="$lt_cv_global_symbol_to_cdecl"
3999   global_symbol_to_c_name_address="$lt_cv_global_symbol_to_c_name_address"
4000 fi
4001 if test -z "$global_symbol_pipe$global_symbol_to_cdec$global_symbol_to_c_name_address";
4002 then
4003   echo "$ac_t""failed" 1>&6
4004 else
4005   echo "$ac_t""ok" 1>&6
4006 fi
4007
4008 for ac_hdr in dlfcn.h
4009 do
4010 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4011 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4012 echo "configure:4013: checking for $ac_hdr" >&5
4013 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
4014   echo $ac_n "(cached) $ac_c" 1>&6
4015 else
4016   cat > conftest.$ac_ext <<EOF
4017 #line 4018 "configure"
4018 #include "confdefs.h"
4019 #include <$ac_hdr>
4020 EOF
4021 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4022 { (eval echo configure:4023: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4023 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4024 if test -z "$ac_err"; then
4025   rm -rf conftest*
4026   eval "ac_cv_header_$ac_safe=yes"
4027 else
4028   echo "$ac_err" >&5
4029   echo "configure: failed program was:" >&5
4030   cat conftest.$ac_ext >&5
4031   rm -rf conftest*
4032   eval "ac_cv_header_$ac_safe=no"
4033 fi
4034 rm -f conftest*
4035 fi
4036 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4037   echo "$ac_t""yes" 1>&6
4038     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4039   cat >> confdefs.h <<EOF
4040 #define $ac_tr_hdr 1
4041 EOF
4042  
4043 else
4044   echo "$ac_t""no" 1>&6
4045 fi
4046 done
4047
4048
4049
4050
4051
4052
4053 # Only perform the check for file, if the check method requires it
4054 case $deplibs_check_method in
4055 file_magic*)
4056   if test "$file_magic_cmd" = '$MAGIC_CMD'; then
4057     echo $ac_n "checking for ${ac_tool_prefix}file""... $ac_c" 1>&6
4058 echo "configure:4059: checking for ${ac_tool_prefix}file" >&5
4059 if eval "test \"\${lt_cv_path_MAGIC_CMD+set}\" = set"; then
4060   echo $ac_n "(cached) $ac_c" 1>&6
4061 else
4062   case $MAGIC_CMD in
4063   /*)
4064   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
4065   ;;
4066   ?:/*)
4067   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
4068   ;;
4069   *)
4070   ac_save_MAGIC_CMD="$MAGIC_CMD"
4071   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4072   ac_dummy="/usr/bin:$PATH"
4073   for ac_dir in $ac_dummy; do
4074     test -z "$ac_dir" && ac_dir=.
4075     if test -f $ac_dir/${ac_tool_prefix}file; then
4076       lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file"
4077       if test -n "$file_magic_test_file"; then
4078         case $deplibs_check_method in
4079         "file_magic "*)
4080           file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
4081           MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4082           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
4083             egrep "$file_magic_regex" > /dev/null; then
4084             :
4085           else
4086             cat <<EOF 1>&2
4087
4088 *** Warning: the command libtool uses to detect shared libraries,
4089 *** $file_magic_cmd, produces output that libtool cannot recognize.
4090 *** The result is that libtool may fail to recognize shared libraries
4091 *** as such.  This will affect the creation of libtool libraries that
4092 *** depend on shared libraries, but programs linked with such libtool
4093 *** libraries will work regardless of this problem.  Nevertheless, you
4094 *** may want to report the problem to your system manager and/or to
4095 *** bug-libtool@gnu.org
4096
4097 EOF
4098           fi ;;
4099         esac
4100       fi
4101       break
4102     fi
4103   done
4104   IFS="$ac_save_ifs"
4105   MAGIC_CMD="$ac_save_MAGIC_CMD"
4106   ;;
4107 esac
4108 fi
4109
4110 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4111 if test -n "$MAGIC_CMD"; then
4112   echo "$ac_t""$MAGIC_CMD" 1>&6
4113 else
4114   echo "$ac_t""no" 1>&6
4115 fi
4116
4117 if test -z "$lt_cv_path_MAGIC_CMD"; then
4118   if test -n "$ac_tool_prefix"; then
4119     echo $ac_n "checking for file""... $ac_c" 1>&6
4120 echo "configure:4121: checking for file" >&5
4121 if eval "test \"\${lt_cv_path_MAGIC_CMD+set}\" = set"; then
4122   echo $ac_n "(cached) $ac_c" 1>&6
4123 else
4124   case $MAGIC_CMD in
4125   /*)
4126   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
4127   ;;
4128   ?:/*)
4129   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
4130   ;;
4131   *)
4132   ac_save_MAGIC_CMD="$MAGIC_CMD"
4133   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4134   ac_dummy="/usr/bin:$PATH"
4135   for ac_dir in $ac_dummy; do
4136     test -z "$ac_dir" && ac_dir=.
4137     if test -f $ac_dir/file; then
4138       lt_cv_path_MAGIC_CMD="$ac_dir/file"
4139       if test -n "$file_magic_test_file"; then
4140         case $deplibs_check_method in
4141         "file_magic "*)
4142           file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
4143           MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4144           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
4145             egrep "$file_magic_regex" > /dev/null; then
4146             :
4147           else
4148             cat <<EOF 1>&2
4149
4150 *** Warning: the command libtool uses to detect shared libraries,
4151 *** $file_magic_cmd, produces output that libtool cannot recognize.
4152 *** The result is that libtool may fail to recognize shared libraries
4153 *** as such.  This will affect the creation of libtool libraries that
4154 *** depend on shared libraries, but programs linked with such libtool
4155 *** libraries will work regardless of this problem.  Nevertheless, you
4156 *** may want to report the problem to your system manager and/or to
4157 *** bug-libtool@gnu.org
4158
4159 EOF
4160           fi ;;
4161         esac
4162       fi
4163       break
4164     fi
4165   done
4166   IFS="$ac_save_ifs"
4167   MAGIC_CMD="$ac_save_MAGIC_CMD"
4168   ;;
4169 esac
4170 fi
4171
4172 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4173 if test -n "$MAGIC_CMD"; then
4174   echo "$ac_t""$MAGIC_CMD" 1>&6
4175 else
4176   echo "$ac_t""no" 1>&6
4177 fi
4178
4179   else
4180     MAGIC_CMD=:
4181   fi
4182 fi
4183
4184   fi
4185   ;;
4186 esac
4187
4188 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4189 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
4190 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4191 echo "configure:4192: checking for $ac_word" >&5
4192 if eval "test \"\${ac_cv_prog_RANLIB+set}\" = set"; then
4193   echo $ac_n "(cached) $ac_c" 1>&6
4194 else
4195   if test -n "$RANLIB"; then
4196   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4197 else
4198   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4199   ac_dummy="$PATH"
4200   for ac_dir in $ac_dummy; do
4201     test -z "$ac_dir" && ac_dir=.
4202     if test -f $ac_dir/$ac_word; then
4203       ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4204       break
4205     fi
4206   done
4207   IFS="$ac_save_ifs"
4208 fi
4209 fi
4210 RANLIB="$ac_cv_prog_RANLIB"
4211 if test -n "$RANLIB"; then
4212   echo "$ac_t""$RANLIB" 1>&6
4213 else
4214   echo "$ac_t""no" 1>&6
4215 fi
4216
4217
4218 if test -z "$ac_cv_prog_RANLIB"; then
4219 if test -n "$ac_tool_prefix"; then
4220   # Extract the first word of "ranlib", so it can be a program name with args.
4221 set dummy ranlib; ac_word=$2
4222 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4223 echo "configure:4224: checking for $ac_word" >&5
4224 if eval "test \"\${ac_cv_prog_RANLIB+set}\" = set"; then
4225   echo $ac_n "(cached) $ac_c" 1>&6
4226 else
4227   if test -n "$RANLIB"; then
4228   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4229 else
4230   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4231   ac_dummy="$PATH"
4232   for ac_dir in $ac_dummy; do
4233     test -z "$ac_dir" && ac_dir=.
4234     if test -f $ac_dir/$ac_word; then
4235       ac_cv_prog_RANLIB="ranlib"
4236       break
4237     fi
4238   done
4239   IFS="$ac_save_ifs"
4240   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
4241 fi
4242 fi
4243 RANLIB="$ac_cv_prog_RANLIB"
4244 if test -n "$RANLIB"; then
4245   echo "$ac_t""$RANLIB" 1>&6
4246 else
4247   echo "$ac_t""no" 1>&6
4248 fi
4249
4250 else
4251   RANLIB=":"
4252 fi
4253 fi
4254
4255 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
4256 set dummy ${ac_tool_prefix}strip; ac_word=$2
4257 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4258 echo "configure:4259: checking for $ac_word" >&5
4259 if eval "test \"\${ac_cv_prog_STRIP+set}\" = set"; then
4260   echo $ac_n "(cached) $ac_c" 1>&6
4261 else
4262   if test -n "$STRIP"; then
4263   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
4264 else
4265   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4266   ac_dummy="$PATH"
4267   for ac_dir in $ac_dummy; do
4268     test -z "$ac_dir" && ac_dir=.
4269     if test -f $ac_dir/$ac_word; then
4270       ac_cv_prog_STRIP="${ac_tool_prefix}strip"
4271       break
4272     fi
4273   done
4274   IFS="$ac_save_ifs"
4275 fi
4276 fi
4277 STRIP="$ac_cv_prog_STRIP"
4278 if test -n "$STRIP"; then
4279   echo "$ac_t""$STRIP" 1>&6
4280 else
4281   echo "$ac_t""no" 1>&6
4282 fi
4283
4284
4285 if test -z "$ac_cv_prog_STRIP"; then
4286 if test -n "$ac_tool_prefix"; then
4287   # Extract the first word of "strip", so it can be a program name with args.
4288 set dummy strip; ac_word=$2
4289 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4290 echo "configure:4291: checking for $ac_word" >&5
4291 if eval "test \"\${ac_cv_prog_STRIP+set}\" = set"; then
4292   echo $ac_n "(cached) $ac_c" 1>&6
4293 else
4294   if test -n "$STRIP"; then
4295   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
4296 else
4297   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4298   ac_dummy="$PATH"
4299   for ac_dir in $ac_dummy; do
4300     test -z "$ac_dir" && ac_dir=.
4301     if test -f $ac_dir/$ac_word; then
4302       ac_cv_prog_STRIP="strip"
4303       break
4304     fi
4305   done
4306   IFS="$ac_save_ifs"
4307   test -z "$ac_cv_prog_STRIP" && ac_cv_prog_STRIP=":"
4308 fi
4309 fi
4310 STRIP="$ac_cv_prog_STRIP"
4311 if test -n "$STRIP"; then
4312   echo "$ac_t""$STRIP" 1>&6
4313 else
4314   echo "$ac_t""no" 1>&6
4315 fi
4316
4317 else
4318   STRIP=":"
4319 fi
4320 fi
4321
4322
4323 enable_dlopen=yes
4324 enable_win32_dll=yes
4325
4326 # Check whether --enable-libtool-lock or --disable-libtool-lock was given.
4327 if test "${enable_libtool_lock+set}" = set; then
4328   enableval="$enable_libtool_lock"
4329   :
4330 fi
4331
4332 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
4333
4334 # Some flags need to be propagated to the compiler or linker for good
4335 # libtool support.
4336 case $host in
4337 *-*-irix6*)
4338   # Find out which ABI we are using.
4339   echo '#line 4340 "configure"' > conftest.$ac_ext
4340   if { (eval echo configure:4341: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4341     case `/usr/bin/file conftest.$ac_objext` in
4342     *32-bit*)
4343       LD="${LD-ld} -32"
4344       ;;
4345     *N32*)
4346       LD="${LD-ld} -n32"
4347       ;;
4348     *64-bit*)
4349       LD="${LD-ld} -64"
4350       ;;
4351     esac
4352   fi
4353   rm -rf conftest*
4354   ;;
4355
4356 *-*-sco3.2v5*)
4357   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
4358   SAVE_CFLAGS="$CFLAGS"
4359   CFLAGS="$CFLAGS -belf"
4360   echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
4361 echo "configure:4362: checking whether the C compiler needs -belf" >&5
4362 if eval "test \"\${lt_cv_cc_needs_belf+set}\" = set"; then
4363   echo $ac_n "(cached) $ac_c" 1>&6
4364 else
4365   
4366      ac_ext=c
4367 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
4368 ac_cpp='$CPP $CPPFLAGS'
4369 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
4370 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
4371 cross_compiling=$ac_cv_prog_cc_cross
4372
4373      cat > conftest.$ac_ext <<EOF
4374 #line 4375 "configure"
4375 #include "confdefs.h"
4376
4377 int main() {
4378
4379 ; return 0; }
4380 EOF
4381 if { (eval echo configure:4382: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4382   rm -rf conftest*
4383   lt_cv_cc_needs_belf=yes
4384 else
4385   echo "configure: failed program was:" >&5
4386   cat conftest.$ac_ext >&5
4387   rm -rf conftest*
4388   lt_cv_cc_needs_belf=no
4389 fi
4390 rm -f conftest*
4391      ac_ext=c
4392 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
4393 ac_cpp='$CPP $CPPFLAGS'
4394 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
4395 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
4396 cross_compiling=$ac_cv_prog_cc_cross
4397
4398 fi
4399
4400 echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6
4401   if test x"$lt_cv_cc_needs_belf" != x"yes"; then
4402     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
4403     CFLAGS="$SAVE_CFLAGS"
4404   fi
4405   ;;
4406
4407 *-*-cygwin* | *-*-mingw* | *-*-pw32*)
4408   # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
4409 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
4410 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4411 echo "configure:4412: checking for $ac_word" >&5
4412 if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then
4413   echo $ac_n "(cached) $ac_c" 1>&6
4414 else
4415   if test -n "$DLLTOOL"; then
4416   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
4417 else
4418   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4419   ac_dummy="$PATH"
4420   for ac_dir in $ac_dummy; do
4421     test -z "$ac_dir" && ac_dir=.
4422     if test -f $ac_dir/$ac_word; then
4423       ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
4424       break
4425     fi
4426   done
4427   IFS="$ac_save_ifs"
4428 fi
4429 fi
4430 DLLTOOL="$ac_cv_prog_DLLTOOL"
4431 if test -n "$DLLTOOL"; then
4432   echo "$ac_t""$DLLTOOL" 1>&6
4433 else
4434   echo "$ac_t""no" 1>&6
4435 fi
4436
4437
4438 if test -z "$ac_cv_prog_DLLTOOL"; then
4439 if test -n "$ac_tool_prefix"; then
4440   # Extract the first word of "dlltool", so it can be a program name with args.
4441 set dummy dlltool; ac_word=$2
4442 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4443 echo "configure:4444: checking for $ac_word" >&5
4444 if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then
4445   echo $ac_n "(cached) $ac_c" 1>&6
4446 else
4447   if test -n "$DLLTOOL"; then
4448   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
4449 else
4450   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4451   ac_dummy="$PATH"
4452   for ac_dir in $ac_dummy; do
4453     test -z "$ac_dir" && ac_dir=.
4454     if test -f $ac_dir/$ac_word; then
4455       ac_cv_prog_DLLTOOL="dlltool"
4456       break
4457     fi
4458   done
4459   IFS="$ac_save_ifs"
4460   test -z "$ac_cv_prog_DLLTOOL" && ac_cv_prog_DLLTOOL="false"
4461 fi
4462 fi
4463 DLLTOOL="$ac_cv_prog_DLLTOOL"
4464 if test -n "$DLLTOOL"; then
4465   echo "$ac_t""$DLLTOOL" 1>&6
4466 else
4467   echo "$ac_t""no" 1>&6
4468 fi
4469
4470 else
4471   DLLTOOL="false"
4472 fi
4473 fi
4474
4475   # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
4476 set dummy ${ac_tool_prefix}as; ac_word=$2
4477 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4478 echo "configure:4479: checking for $ac_word" >&5
4479 if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then
4480   echo $ac_n "(cached) $ac_c" 1>&6
4481 else
4482   if test -n "$AS"; then
4483   ac_cv_prog_AS="$AS" # Let the user override the test.
4484 else
4485   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4486   ac_dummy="$PATH"
4487   for ac_dir in $ac_dummy; do
4488     test -z "$ac_dir" && ac_dir=.
4489     if test -f $ac_dir/$ac_word; then
4490       ac_cv_prog_AS="${ac_tool_prefix}as"
4491       break
4492     fi
4493   done
4494   IFS="$ac_save_ifs"
4495 fi
4496 fi
4497 AS="$ac_cv_prog_AS"
4498 if test -n "$AS"; then
4499   echo "$ac_t""$AS" 1>&6
4500 else
4501   echo "$ac_t""no" 1>&6
4502 fi
4503
4504
4505 if test -z "$ac_cv_prog_AS"; then
4506 if test -n "$ac_tool_prefix"; then
4507   # Extract the first word of "as", so it can be a program name with args.
4508 set dummy as; ac_word=$2
4509 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4510 echo "configure:4511: checking for $ac_word" >&5
4511 if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then
4512   echo $ac_n "(cached) $ac_c" 1>&6
4513 else
4514   if test -n "$AS"; then
4515   ac_cv_prog_AS="$AS" # Let the user override the test.
4516 else
4517   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4518   ac_dummy="$PATH"
4519   for ac_dir in $ac_dummy; do
4520     test -z "$ac_dir" && ac_dir=.
4521     if test -f $ac_dir/$ac_word; then
4522       ac_cv_prog_AS="as"
4523       break
4524     fi
4525   done
4526   IFS="$ac_save_ifs"
4527   test -z "$ac_cv_prog_AS" && ac_cv_prog_AS="false"
4528 fi
4529 fi
4530 AS="$ac_cv_prog_AS"
4531 if test -n "$AS"; then
4532   echo "$ac_t""$AS" 1>&6
4533 else
4534   echo "$ac_t""no" 1>&6
4535 fi
4536
4537 else
4538   AS="false"
4539 fi
4540 fi
4541
4542   # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
4543 set dummy ${ac_tool_prefix}objdump; ac_word=$2
4544 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4545 echo "configure:4546: checking for $ac_word" >&5
4546 if eval "test \"\${ac_cv_prog_OBJDUMP+set}\" = set"; then
4547   echo $ac_n "(cached) $ac_c" 1>&6
4548 else
4549   if test -n "$OBJDUMP"; then
4550   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
4551 else
4552   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4553   ac_dummy="$PATH"
4554   for ac_dir in $ac_dummy; do
4555     test -z "$ac_dir" && ac_dir=.
4556     if test -f $ac_dir/$ac_word; then
4557       ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
4558       break
4559     fi
4560   done
4561   IFS="$ac_save_ifs"
4562 fi
4563 fi
4564 OBJDUMP="$ac_cv_prog_OBJDUMP"
4565 if test -n "$OBJDUMP"; then
4566   echo "$ac_t""$OBJDUMP" 1>&6
4567 else
4568   echo "$ac_t""no" 1>&6
4569 fi
4570
4571
4572 if test -z "$ac_cv_prog_OBJDUMP"; then
4573 if test -n "$ac_tool_prefix"; then
4574   # Extract the first word of "objdump", so it can be a program name with args.
4575 set dummy objdump; ac_word=$2
4576 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4577 echo "configure:4578: checking for $ac_word" >&5
4578 if eval "test \"\${ac_cv_prog_OBJDUMP+set}\" = set"; then
4579   echo $ac_n "(cached) $ac_c" 1>&6
4580 else
4581   if test -n "$OBJDUMP"; then
4582   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
4583 else
4584   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4585   ac_dummy="$PATH"
4586   for ac_dir in $ac_dummy; do
4587     test -z "$ac_dir" && ac_dir=.
4588     if test -f $ac_dir/$ac_word; then
4589       ac_cv_prog_OBJDUMP="objdump"
4590       break
4591     fi
4592   done
4593   IFS="$ac_save_ifs"
4594   test -z "$ac_cv_prog_OBJDUMP" && ac_cv_prog_OBJDUMP="false"
4595 fi
4596 fi
4597 OBJDUMP="$ac_cv_prog_OBJDUMP"
4598 if test -n "$OBJDUMP"; then
4599   echo "$ac_t""$OBJDUMP" 1>&6
4600 else
4601   echo "$ac_t""no" 1>&6
4602 fi
4603
4604 else
4605   OBJDUMP="false"
4606 fi
4607 fi
4608
4609
4610   # recent cygwin and mingw systems supply a stub DllMain which the user
4611   # can override, but on older systems we have to supply one
4612   echo $ac_n "checking if libtool should supply DllMain function""... $ac_c" 1>&6
4613 echo "configure:4614: checking if libtool should supply DllMain function" >&5
4614 if eval "test \"\${lt_cv_need_dllmain+set}\" = set"; then
4615   echo $ac_n "(cached) $ac_c" 1>&6
4616 else
4617   cat > conftest.$ac_ext <<EOF
4618 #line 4619 "configure"
4619 #include "confdefs.h"
4620
4621 int main() {
4622 extern int __attribute__((__stdcall__)) DllMain(void*, int, void*);
4623       DllMain (0, 0, 0);
4624 ; return 0; }
4625 EOF
4626 if { (eval echo configure:4627: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4627   rm -rf conftest*
4628   lt_cv_need_dllmain=no
4629 else
4630   echo "configure: failed program was:" >&5
4631   cat conftest.$ac_ext >&5
4632   rm -rf conftest*
4633   lt_cv_need_dllmain=yes
4634 fi
4635 rm -f conftest*
4636 fi
4637
4638 echo "$ac_t""$lt_cv_need_dllmain" 1>&6
4639
4640   case $host/$CC in
4641   *-*-cygwin*/gcc*-mno-cygwin*|*-*-mingw*)
4642     # old mingw systems require "-dll" to link a DLL, while more recent ones
4643     # require "-mdll"
4644     SAVE_CFLAGS="$CFLAGS"
4645     CFLAGS="$CFLAGS -mdll"
4646     echo $ac_n "checking how to link DLLs""... $ac_c" 1>&6
4647 echo "configure:4648: checking how to link DLLs" >&5
4648 if eval "test \"\${lt_cv_cc_dll_switch+set}\" = set"; then
4649   echo $ac_n "(cached) $ac_c" 1>&6
4650 else
4651   cat > conftest.$ac_ext <<EOF
4652 #line 4653 "configure"
4653 #include "confdefs.h"
4654
4655 int main() {
4656
4657 ; return 0; }
4658 EOF
4659 if { (eval echo configure:4660: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4660   rm -rf conftest*
4661   lt_cv_cc_dll_switch=-mdll
4662 else
4663   echo "configure: failed program was:" >&5
4664   cat conftest.$ac_ext >&5
4665   rm -rf conftest*
4666   lt_cv_cc_dll_switch=-dll
4667 fi
4668 rm -f conftest*
4669 fi
4670
4671 echo "$ac_t""$lt_cv_cc_dll_switch" 1>&6
4672     CFLAGS="$SAVE_CFLAGS" ;;
4673   *-*-cygwin* | *-*-pw32*)
4674     # cygwin systems need to pass --dll to the linker, and not link
4675     # crt.o which will require a WinMain@16 definition.
4676     lt_cv_cc_dll_switch="-Wl,--dll -nostartfiles" ;;
4677   esac
4678   ;;
4679   
4680 esac
4681
4682 # Sed substitution that helps us do robust quoting.  It backslashifies
4683 # metacharacters that are still active within double-quoted strings.
4684 Xsed='sed -e s/^X//'
4685 sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g'
4686
4687 # Same as above, but do not quote variable references.
4688 double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g'
4689
4690 # Sed substitution to delay expansion of an escaped shell variable in a
4691 # double_quote_subst'ed string.
4692 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
4693
4694 # Constants:
4695 rm="rm -f"
4696
4697 # Global variables:
4698 default_ofile=libtool
4699 can_build_shared=yes
4700
4701 # All known linkers require a `.a' archive for static linking (except M$VC,
4702 # which needs '.lib').
4703 libext=a
4704 ltmain="$ac_aux_dir/ltmain.sh"
4705 ofile="$default_ofile"
4706 with_gnu_ld="$lt_cv_prog_gnu_ld"
4707 need_locks="$enable_libtool_lock"
4708
4709 old_CC="$CC"
4710 old_CFLAGS="$CFLAGS"
4711
4712 # Set sane defaults for various variables
4713 test -z "$AR" && AR=ar
4714 test -z "$AR_FLAGS" && AR_FLAGS=cru
4715 test -z "$AS" && AS=as
4716 test -z "$CC" && CC=cc
4717 test -z "$DLLTOOL" && DLLTOOL=dlltool
4718 test -z "$LD" && LD=ld
4719 test -z "$LN_S" && LN_S="ln -s"
4720 test -z "$MAGIC_CMD" && MAGIC_CMD=file
4721 test -z "$NM" && NM=nm
4722 test -z "$OBJDUMP" && OBJDUMP=objdump
4723 test -z "$RANLIB" && RANLIB=:
4724 test -z "$STRIP" && STRIP=:
4725 test -z "$ac_objext" && ac_objext=o
4726
4727 if test x"$host" != x"$build"; then
4728   ac_tool_prefix=${host_alias}-
4729 else
4730   ac_tool_prefix=
4731 fi
4732
4733 # Transform linux* to *-*-linux-gnu*, to support old configure scripts.
4734 case $host_os in
4735 linux-gnu*) ;;
4736 linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
4737 esac
4738
4739 case $host_os in
4740 aix3*)
4741   # AIX sometimes has problems with the GCC collect2 program.  For some
4742   # reason, if we set the COLLECT_NAMES environment variable, the problems
4743   # vanish in a puff of smoke.
4744   if test "X${COLLECT_NAMES+set}" != Xset; then
4745     COLLECT_NAMES=
4746     export COLLECT_NAMES
4747   fi
4748   ;;
4749 esac
4750
4751 # Determine commands to create old-style static archives.
4752 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
4753 old_postinstall_cmds='chmod 644 $oldlib'
4754 old_postuninstall_cmds=
4755
4756 if test -n "$RANLIB"; then
4757   case $host_os in
4758   openbsd*)
4759     old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds"
4760     ;;
4761   *)
4762     old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
4763     ;;
4764   esac
4765   old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
4766 fi
4767
4768 # Allow CC to be a program name with arguments.
4769 set dummy $CC
4770 compiler="$2"
4771
4772 echo $ac_n "checking for objdir""... $ac_c" 1>&6
4773 echo "configure:4774: checking for objdir" >&5
4774 rm -f .libs 2>/dev/null
4775 mkdir .libs 2>/dev/null
4776 if test -d .libs; then
4777   objdir=.libs
4778 else
4779   # MS-DOS does not allow filenames that begin with a dot.
4780   objdir=_libs
4781 fi
4782 rmdir .libs 2>/dev/null
4783 echo "$ac_t""$objdir" 1>&6
4784
4785
4786 # Check whether --with-pic or --without-pic was given.
4787 if test "${with_pic+set}" = set; then
4788   withval="$with_pic"
4789   pic_mode="$withval"
4790 else
4791   pic_mode=default
4792 fi
4793
4794 test -z "$pic_mode" && pic_mode=default
4795
4796 # We assume here that the value for lt_cv_prog_cc_pic will not be cached
4797 # in isolation, and that seeing it set (from the cache) indicates that
4798 # the associated values are set (in the cache) correctly too.
4799 echo $ac_n "checking for $compiler option to produce PIC""... $ac_c" 1>&6
4800 echo "configure:4801: checking for $compiler option to produce PIC" >&5
4801 if eval "test \"\${lt_cv_prog_cc_pic+set}\" = set"; then
4802   echo $ac_n "(cached) $ac_c" 1>&6
4803 else
4804    lt_cv_prog_cc_pic=
4805   lt_cv_prog_cc_shlib=
4806   lt_cv_prog_cc_wl=
4807   lt_cv_prog_cc_static=
4808   lt_cv_prog_cc_no_builtin=
4809   lt_cv_prog_cc_can_build_shared=$can_build_shared
4810
4811   if test "$GCC" = yes; then
4812     lt_cv_prog_cc_wl='-Wl,'
4813     lt_cv_prog_cc_static='-static'
4814
4815     case $host_os in
4816     aix*)
4817       # Below there is a dirty hack to force normal static linking with -ldl
4818       # The problem is because libdl dynamically linked with both libc and
4819       # libC (AIX C++ library), which obviously doesn't included in libraries
4820       # list by gcc. This cause undefined symbols with -static flags.
4821       # This hack allows C programs to be linked with "-static -ldl", but
4822       # not sure about C++ programs.
4823       lt_cv_prog_cc_static="$lt_cv_prog_cc_static ${lt_cv_prog_cc_wl}-lC"
4824       ;;
4825     amigaos*)
4826       # FIXME: we need at least 68020 code to build shared libraries, but
4827       # adding the `-m68020' flag to GCC prevents building anything better,
4828       # like `-m68040'.
4829       lt_cv_prog_cc_pic='-m68020 -resident32 -malways-restore-a4'
4830       ;;
4831     beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
4832       # PIC is the default for these OSes.
4833       ;;
4834     darwin* | rhapsody*)
4835       # PIC is the default on this platform
4836       # Common symbols not allowed in MH_DYLIB files
4837       lt_cv_prog_cc_pic='-fno-common'
4838       ;;
4839     cygwin* | mingw* | pw32* | os2*)
4840       # This hack is so that the source file can tell whether it is being
4841       # built for inclusion in a dll (and should export symbols for example).
4842       lt_cv_prog_cc_pic='-DDLL_EXPORT'
4843       ;;
4844     sysv4*MP*)
4845       if test -d /usr/nec; then
4846          lt_cv_prog_cc_pic=-Kconform_pic
4847       fi
4848       ;;
4849     *)
4850       lt_cv_prog_cc_pic='-fPIC'
4851       ;;
4852     esac
4853   else
4854     # PORTME Check for PIC flags for the system compiler.
4855     case $host_os in
4856     aix3* | aix4* | aix5*)
4857       lt_cv_prog_cc_wl='-Wl,'
4858       # All AIX code is PIC.
4859       if test "$host_cpu" = ia64; then
4860         # AIX 5 now supports IA64 processor
4861         lt_cv_prog_cc_static='-Bstatic'
4862       else
4863         lt_cv_prog_cc_static='-bnso -bI:/lib/syscalls.exp'
4864       fi
4865       ;;
4866
4867     hpux9* | hpux10* | hpux11*)
4868       # Is there a better lt_cv_prog_cc_static that works with the bundled CC?
4869       lt_cv_prog_cc_wl='-Wl,'
4870       lt_cv_prog_cc_static="${lt_cv_prog_cc_wl}-a ${lt_cv_prog_cc_wl}archive"
4871       lt_cv_prog_cc_pic='+Z'
4872       ;;
4873
4874     irix5* | irix6* | nonstopux*)
4875       lt_cv_prog_cc_wl='-Wl,'
4876       lt_cv_prog_cc_static='-non_shared'
4877       # PIC (with -KPIC) is the default.
4878       ;;
4879
4880     cygwin* | mingw* | pw32* | os2*)
4881       # This hack is so that the source file can tell whether it is being
4882       # built for inclusion in a dll (and should export symbols for example).
4883       lt_cv_prog_cc_pic='-DDLL_EXPORT'
4884       ;;
4885
4886     newsos6)
4887       lt_cv_prog_cc_pic='-KPIC'
4888       lt_cv_prog_cc_static='-Bstatic'
4889       ;;
4890     
4891     openedition)
4892       # XPLINK code is PIC by default
4893       ;;
4894
4895     osf3* | osf4* | osf5*)
4896       # All OSF/1 code is PIC.
4897       lt_cv_prog_cc_wl='-Wl,'
4898       lt_cv_prog_cc_static='-non_shared'
4899       ;;
4900
4901     sco3.2v5*)
4902       lt_cv_prog_cc_pic='-Kpic'
4903       lt_cv_prog_cc_static='-dn'
4904       lt_cv_prog_cc_shlib='-belf'
4905       ;;
4906
4907     solaris*)
4908       lt_cv_prog_cc_pic='-KPIC'
4909       lt_cv_prog_cc_static='-Bstatic'
4910       lt_cv_prog_cc_wl='-Wl,'
4911       ;;
4912
4913     sunos4*)
4914       lt_cv_prog_cc_pic='-PIC'
4915       lt_cv_prog_cc_static='-Bstatic'
4916       lt_cv_prog_cc_wl='-Qoption ld '
4917       ;;
4918
4919     sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
4920       lt_cv_prog_cc_pic='-KPIC'
4921       lt_cv_prog_cc_static='-Bstatic'
4922       lt_cv_prog_cc_wl='-Wl,'
4923       ;;
4924
4925     uts4*)
4926       lt_cv_prog_cc_pic='-pic'
4927       lt_cv_prog_cc_static='-Bstatic'
4928       ;;
4929
4930     sysv4*MP*)
4931       if test -d /usr/nec ;then
4932         lt_cv_prog_cc_pic='-Kconform_pic'
4933         lt_cv_prog_cc_static='-Bstatic'
4934       fi
4935       ;;
4936
4937     *)
4938       lt_cv_prog_cc_can_build_shared=no
4939       ;;
4940     esac
4941   fi
4942
4943 fi
4944
4945 if test -z "$lt_cv_prog_cc_pic"; then
4946   echo "$ac_t""none" 1>&6
4947 else
4948   echo "$ac_t""$lt_cv_prog_cc_pic" 1>&6
4949
4950   # Check to make sure the pic_flag actually works.
4951   echo $ac_n "checking if $compiler PIC flag $lt_cv_prog_cc_pic works""... $ac_c" 1>&6
4952 echo "configure:4953: checking if $compiler PIC flag $lt_cv_prog_cc_pic works" >&5
4953   if eval "test \"\${lt_cv_prog_cc_pic_works+set}\" = set"; then
4954   echo $ac_n "(cached) $ac_c" 1>&6
4955 else
4956       save_CFLAGS="$CFLAGS"
4957     CFLAGS="$CFLAGS $lt_cv_prog_cc_pic -DPIC"
4958     cat > conftest.$ac_ext <<EOF
4959 #line 4960 "configure"
4960 #include "confdefs.h"
4961
4962 int main() {
4963
4964 ; return 0; }
4965 EOF
4966 if { (eval echo configure:4967: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4967   rm -rf conftest*
4968         case $host_os in
4969       hpux9* | hpux10* | hpux11*)
4970         # On HP-UX, both CC and GCC only warn that PIC is supported... then
4971         # they create non-PIC objects.  So, if there were any warnings, we
4972         # assume that PIC is not supported.
4973         if test -s conftest.err; then
4974           lt_cv_prog_cc_pic_works=no
4975         else
4976           lt_cv_prog_cc_pic_works=yes
4977         fi
4978         ;;
4979       *)
4980         lt_cv_prog_cc_pic_works=yes
4981         ;;
4982       esac
4983     
4984 else
4985   echo "configure: failed program was:" >&5
4986   cat conftest.$ac_ext >&5
4987   rm -rf conftest*
4988         lt_cv_prog_cc_pic_works=no
4989     
4990 fi
4991 rm -f conftest*
4992     CFLAGS="$save_CFLAGS"
4993   
4994 fi
4995
4996
4997   if test "X$lt_cv_prog_cc_pic_works" = Xno; then
4998     lt_cv_prog_cc_pic=
4999     lt_cv_prog_cc_can_build_shared=no
5000   else
5001     lt_cv_prog_cc_pic=" $lt_cv_prog_cc_pic"
5002   fi
5003
5004   echo "$ac_t""$lt_cv_prog_cc_pic_works" 1>&6
5005 fi
5006
5007 # Check for any special shared library compilation flags.
5008 if test -n "$lt_cv_prog_cc_shlib"; then
5009   echo "configure: warning: \`$CC' requires \`$lt_cv_prog_cc_shlib' to build shared libraries" 1>&2
5010   if echo "$old_CC $old_CFLAGS " | egrep -e "[  ]$lt_cv_prog_cc_shlib[  ]" >/dev/null; then :
5011   else
5012    echo "configure: warning: add \`$lt_cv_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure" 1>&2
5013     lt_cv_prog_cc_can_build_shared=no
5014   fi
5015 fi
5016
5017 echo $ac_n "checking if $compiler static flag $lt_cv_prog_cc_static works""... $ac_c" 1>&6
5018 echo "configure:5019: checking if $compiler static flag $lt_cv_prog_cc_static works" >&5
5019 if eval "test \"\${lt_cv_prog_cc_static_works+set}\" = set"; then
5020   echo $ac_n "(cached) $ac_c" 1>&6
5021 else
5022     lt_cv_prog_cc_static_works=no
5023   save_LDFLAGS="$LDFLAGS"
5024   LDFLAGS="$LDFLAGS $lt_cv_prog_cc_static"
5025   cat > conftest.$ac_ext <<EOF
5026 #line 5027 "configure"
5027 #include "confdefs.h"
5028
5029 int main() {
5030
5031 ; return 0; }
5032 EOF
5033 if { (eval echo configure:5034: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5034   rm -rf conftest*
5035   lt_cv_prog_cc_static_works=yes
5036 else
5037   echo "configure: failed program was:" >&5
5038   cat conftest.$ac_ext >&5
5039 fi
5040 rm -f conftest*
5041   LDFLAGS="$save_LDFLAGS"
5042
5043 fi
5044
5045
5046 # Belt *and* braces to stop my trousers falling down:
5047 test "X$lt_cv_prog_cc_static_works" = Xno && lt_cv_prog_cc_static=
5048 echo "$ac_t""$lt_cv_prog_cc_static_works" 1>&6
5049
5050 pic_flag="$lt_cv_prog_cc_pic"
5051 special_shlib_compile_flags="$lt_cv_prog_cc_shlib"
5052 wl="$lt_cv_prog_cc_wl"
5053 link_static_flag="$lt_cv_prog_cc_static"
5054 no_builtin_flag="$lt_cv_prog_cc_no_builtin"
5055 can_build_shared="$lt_cv_prog_cc_can_build_shared"
5056
5057
5058 # Check to see if options -o and -c are simultaneously supported by compiler
5059 echo $ac_n "checking if $compiler supports -c -o file.$ac_objext""... $ac_c" 1>&6
5060 echo "configure:5061: checking if $compiler supports -c -o file.$ac_objext" >&5
5061 if eval "test \"\${lt_cv_compiler_c_o+set}\" = set"; then
5062   echo $ac_n "(cached) $ac_c" 1>&6
5063 else
5064   
5065 $rm -r conftest 2>/dev/null
5066 mkdir conftest
5067 cd conftest
5068 echo "int some_variable = 0;" > conftest.$ac_ext
5069 mkdir out
5070 # According to Tom Tromey, Ian Lance Taylor reported there are C compilers
5071 # that will create temporary files in the current directory regardless of
5072 # the output directory.  Thus, making CWD read-only will cause this test
5073 # to fail, enabling locking or at least warning the user not to do parallel
5074 # builds.
5075 chmod -w .
5076 save_CFLAGS="$CFLAGS"
5077 CFLAGS="$CFLAGS -o out/conftest2.$ac_objext"
5078 compiler_c_o=no
5079 if { (eval echo configure:5080: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then
5080   # The compiler can only warn and ignore the option if not recognized
5081   # So say no if there are warnings
5082   if test -s out/conftest.err; then
5083     lt_cv_compiler_c_o=no
5084   else
5085     lt_cv_compiler_c_o=yes
5086   fi
5087 else
5088   # Append any errors to the config.log.
5089   cat out/conftest.err 1>&5
5090   lt_cv_compiler_c_o=no
5091 fi
5092 CFLAGS="$save_CFLAGS"
5093 chmod u+w .
5094 $rm conftest* out/*
5095 rmdir out
5096 cd ..
5097 rmdir conftest
5098 $rm -r conftest 2>/dev/null
5099
5100 fi
5101
5102 compiler_c_o=$lt_cv_compiler_c_o
5103 echo "$ac_t""$compiler_c_o" 1>&6
5104
5105 if test x"$compiler_c_o" = x"yes"; then
5106   # Check to see if we can write to a .lo
5107   echo $ac_n "checking if $compiler supports -c -o file.lo""... $ac_c" 1>&6
5108 echo "configure:5109: checking if $compiler supports -c -o file.lo" >&5
5109   if eval "test \"\${lt_cv_compiler_o_lo+set}\" = set"; then
5110   echo $ac_n "(cached) $ac_c" 1>&6
5111 else
5112   
5113   lt_cv_compiler_o_lo=no
5114   save_CFLAGS="$CFLAGS"
5115   CFLAGS="$CFLAGS -c -o conftest.lo"
5116   save_objext="$ac_objext"
5117   ac_objext=lo
5118   cat > conftest.$ac_ext <<EOF
5119 #line 5120 "configure"
5120 #include "confdefs.h"
5121
5122 int main() {
5123 int some_variable = 0;
5124 ; return 0; }
5125 EOF
5126 if { (eval echo configure:5127: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5127   rm -rf conftest*
5128       # The compiler can only warn and ignore the option if not recognized
5129     # So say no if there are warnings
5130     if test -s conftest.err; then
5131       lt_cv_compiler_o_lo=no
5132     else
5133       lt_cv_compiler_o_lo=yes
5134     fi
5135   
5136 else
5137   echo "configure: failed program was:" >&5
5138   cat conftest.$ac_ext >&5
5139 fi
5140 rm -f conftest*
5141   ac_objext="$save_objext"
5142   CFLAGS="$save_CFLAGS"
5143   
5144 fi
5145
5146   compiler_o_lo=$lt_cv_compiler_o_lo
5147   echo "$ac_t""$compiler_o_lo" 1>&6
5148 else
5149   compiler_o_lo=no
5150 fi
5151
5152 # Check to see if we can do hard links to lock some files if needed
5153 hard_links="nottested"
5154 if test "$compiler_c_o" = no && test "$need_locks" != no; then
5155   # do not overwrite the value of need_locks provided by the user
5156   echo $ac_n "checking if we can lock with hard links""... $ac_c" 1>&6
5157 echo "configure:5158: checking if we can lock with hard links" >&5
5158   hard_links=yes
5159   $rm conftest*
5160   ln conftest.a conftest.b 2>/dev/null && hard_links=no
5161   touch conftest.a
5162   ln conftest.a conftest.b 2>&5 || hard_links=no
5163   ln conftest.a conftest.b 2>/dev/null && hard_links=no
5164   echo "$ac_t""$hard_links" 1>&6
5165   if test "$hard_links" = no; then
5166     echo "configure: warning: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" 1>&2
5167     need_locks=warn
5168   fi
5169 else
5170   need_locks=no
5171 fi
5172
5173 if test "$GCC" = yes; then
5174   # Check to see if options -fno-rtti -fno-exceptions are supported by compiler
5175   echo $ac_n "checking if $compiler supports -fno-rtti -fno-exceptions""... $ac_c" 1>&6
5176 echo "configure:5177: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
5177   echo "int some_variable = 0;" > conftest.$ac_ext
5178   save_CFLAGS="$CFLAGS"
5179   CFLAGS="$CFLAGS -fno-rtti -fno-exceptions -c conftest.$ac_ext"
5180   compiler_rtti_exceptions=no
5181   cat > conftest.$ac_ext <<EOF
5182 #line 5183 "configure"
5183 #include "confdefs.h"
5184
5185 int main() {
5186 int some_variable = 0;
5187 ; return 0; }
5188 EOF
5189 if { (eval echo configure:5190: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5190   rm -rf conftest*
5191       # The compiler can only warn and ignore the option if not recognized
5192     # So say no if there are warnings
5193     if test -s conftest.err; then
5194       compiler_rtti_exceptions=no
5195     else
5196       compiler_rtti_exceptions=yes
5197     fi
5198   
5199 else
5200   echo "configure: failed program was:" >&5
5201   cat conftest.$ac_ext >&5
5202 fi
5203 rm -f conftest*
5204   CFLAGS="$save_CFLAGS"
5205   echo "$ac_t""$compiler_rtti_exceptions" 1>&6
5206
5207   if test "$compiler_rtti_exceptions" = "yes"; then
5208     no_builtin_flag=' -fno-builtin -fno-rtti -fno-exceptions'
5209   else
5210     no_builtin_flag=' -fno-builtin'
5211   fi
5212 fi
5213
5214 # See if the linker supports building shared libraries.
5215 echo $ac_n "checking whether the linker ($LD) supports shared libraries""... $ac_c" 1>&6
5216 echo "configure:5217: checking whether the linker ($LD) supports shared libraries" >&5
5217
5218 allow_undefined_flag=
5219 no_undefined_flag=
5220 need_lib_prefix=unknown
5221 need_version=unknown
5222 # when you set need_version to no, make sure it does not cause -set_version
5223 # flags to be left without arguments
5224 archive_cmds=
5225 archive_expsym_cmds=
5226 old_archive_from_new_cmds=
5227 old_archive_from_expsyms_cmds=
5228 export_dynamic_flag_spec=
5229 whole_archive_flag_spec=
5230 thread_safe_flag_spec=
5231 hardcode_into_libs=no
5232 hardcode_libdir_flag_spec=
5233 hardcode_libdir_separator=
5234 hardcode_direct=no
5235 hardcode_minus_L=no
5236 hardcode_shlibpath_var=unsupported
5237 runpath_var=
5238 link_all_deplibs=unknown
5239 always_export_symbols=no
5240 export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols'
5241 # include_expsyms should be a list of space-separated symbols to be *always*
5242 # included in the symbol list
5243 include_expsyms=
5244 # exclude_expsyms can be an egrep regular expression of symbols to exclude
5245 # it will be wrapped by ` (' and `)$', so one must not match beginning or
5246 # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
5247 # as well as any symbol that contains `d'.
5248 exclude_expsyms="_GLOBAL_OFFSET_TABLE_"
5249 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
5250 # platforms (ab)use it in PIC code, but their linkers get confused if
5251 # the symbol is explicitly referenced.  Since portable code cannot
5252 # rely on this symbol name, it's probably fine to never include it in
5253 # preloaded symbol tables.
5254 extract_expsyms_cmds=
5255
5256 case $host_os in
5257 cygwin* | mingw* | pw32*)
5258   # FIXME: the MSVC++ port hasn't been tested in a loooong time
5259   # When not using gcc, we currently assume that we are using
5260   # Microsoft Visual C++.
5261   if test "$GCC" != yes; then
5262     with_gnu_ld=no
5263   fi
5264   ;;
5265 openbsd*)
5266   with_gnu_ld=no
5267   ;;
5268 esac
5269
5270 ld_shlibs=yes
5271 if test "$with_gnu_ld" = yes; then
5272   # If archive_cmds runs LD, not CC, wlarc should be empty
5273   wlarc='${wl}'
5274
5275   # See if GNU ld supports shared libraries.
5276   case $host_os in
5277   aix3* | aix4* | aix5*)
5278     # On AIX, the GNU linker is very broken
5279     # Note:Check GNU linker on AIX 5-IA64 when/if it becomes available.
5280     ld_shlibs=no
5281     cat <<EOF 1>&2
5282
5283 *** Warning: the GNU linker, at least up to release 2.9.1, is reported
5284 *** to be unable to reliably create shared libraries on AIX.
5285 *** Therefore, libtool is disabling shared libraries support.  If you
5286 *** really care for shared libraries, you may want to modify your PATH
5287 *** so that a non-GNU linker is found, and then restart.
5288
5289 EOF
5290     ;;
5291
5292   amigaos*)
5293     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)'
5294     hardcode_libdir_flag_spec='-L$libdir'
5295     hardcode_minus_L=yes
5296
5297     # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
5298     # that the semantics of dynamic libraries on AmigaOS, at least up
5299     # to version 4, is to share data among multiple programs linked
5300     # with the same dynamic library.  Since this doesn't match the
5301     # behavior of shared libraries on other platforms, we can use
5302     # them.
5303     ld_shlibs=no
5304     ;;
5305
5306   beos*)
5307     if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
5308       allow_undefined_flag=unsupported
5309       # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
5310       # support --undefined.  This deserves some investigation.  FIXME
5311       archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5312     else
5313       ld_shlibs=no
5314     fi
5315     ;;
5316
5317   cygwin* | mingw* | pw32*)
5318     # hardcode_libdir_flag_spec is actually meaningless, as there is
5319     # no search path for DLLs.
5320     hardcode_libdir_flag_spec='-L$libdir'
5321     allow_undefined_flag=unsupported
5322     always_export_symbols=yes
5323
5324     extract_expsyms_cmds='test -f $output_objdir/impgen.c || \
5325       sed -e "/^# \/\* impgen\.c starts here \*\//,/^# \/\* impgen.c ends here \*\// { s/^# //;s/^# *$//; p; }" -e d < $''0 > $output_objdir/impgen.c~
5326       test -f $output_objdir/impgen.exe || (cd $output_objdir && \
5327       if test "x$HOST_CC" != "x" ; then $HOST_CC -o impgen impgen.c ; \
5328       else $CC -o impgen impgen.c ; fi)~
5329       $output_objdir/impgen $dir/$soroot > $output_objdir/$soname-def'
5330
5331     old_archive_from_expsyms_cmds='$DLLTOOL --as=$AS --dllname $soname --def $output_objdir/$soname-def --output-lib $output_objdir/$newlib'
5332
5333     # cygwin and mingw dlls have different entry points and sets of symbols
5334     # to exclude.
5335     # FIXME: what about values for MSVC?
5336     dll_entry=__cygwin_dll_entry@12
5337     dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12~
5338     case $host_os in
5339     mingw*)
5340       # mingw values
5341       dll_entry=_DllMainCRTStartup@12
5342       dll_exclude_symbols=DllMain@12,DllMainCRTStartup@12,DllEntryPoint@12~
5343       ;;
5344     esac
5345
5346     # mingw and cygwin differ, and it's simplest to just exclude the union
5347     # of the two symbol sets.
5348     dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12,DllMainCRTStartup@12,DllEntryPoint@12
5349
5350     # recent cygwin and mingw systems supply a stub DllMain which the user
5351     # can override, but on older systems we have to supply one (in ltdll.c)
5352     if test "x$lt_cv_need_dllmain" = "xyes"; then
5353       ltdll_obj='$output_objdir/$soname-ltdll.'"$ac_objext "
5354       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~
5355         test -f $output_objdir/$soname-ltdll.$ac_objext || (cd $output_objdir && $CC -c $soname-ltdll.c)~'
5356     else
5357       ltdll_obj=
5358       ltdll_cmds=
5359     fi
5360
5361     # Extract the symbol export list from an `--export-all' def file,
5362     # then regenerate the def file from the symbol export list, so that
5363     # the compiled dll only exports the symbol export list.
5364     # Be careful not to strip the DATA tag left be newer dlltools.
5365     export_symbols_cmds="$ltdll_cmds"'
5366       $DLLTOOL --export-all --exclude-symbols '$dll_exclude_symbols' --output-def $output_objdir/$soname-def '$ltdll_obj'$libobjs $convenience~
5367       sed -e "1,/EXPORTS/d" -e "s/ @ [0-9]*//" -e "s/ *;.*$//" < $output_objdir/$soname-def > $export_symbols'
5368
5369     # If the export-symbols file already is a .def file (1st line
5370     # is EXPORTS), use it as is.
5371     # If DATA tags from a recent dlltool are present, honour them!
5372     archive_expsym_cmds='if test "x`sed 1q $export_symbols`" = xEXPORTS; then
5373         cp $export_symbols $output_objdir/$soname-def;
5374       else
5375         echo EXPORTS > $output_objdir/$soname-def;
5376         _lt_hint=1;
5377         cat $export_symbols | while read symbol; do
5378          set dummy \$symbol;
5379          case \$# in
5380            2) echo "   \$2 @ \$_lt_hint ; " >> $output_objdir/$soname-def;;
5381            4) echo "   \$2 \$3 \$4 ; " >> $output_objdir/$soname-def; _lt_hint=`expr \$_lt_hint - 1`;;
5382            *) echo "     \$2 @ \$_lt_hint \$3 ; " >> $output_objdir/$soname-def;;
5383          esac;
5384          _lt_hint=`expr 1 + \$_lt_hint`;
5385         done;
5386       fi~
5387       '"$ltdll_cmds"'
5388       $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~
5389       $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~
5390       $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~
5391       $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~
5392       $CC $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags'
5393     ;;
5394
5395   netbsd*)
5396     if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
5397       archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
5398       wlarc=
5399     else
5400       archive_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5401       archive_expsym_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5402     fi
5403     ;;
5404
5405   solaris* | sysv5*)
5406     if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then
5407       ld_shlibs=no
5408       cat <<EOF 1>&2
5409
5410 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
5411 *** create shared libraries on Solaris systems.  Therefore, libtool
5412 *** is disabling shared libraries support.  We urge you to upgrade GNU
5413 *** binutils to release 2.9.1 or newer.  Another option is to modify
5414 *** your PATH or compiler configuration so that the native linker is
5415 *** used, and then restart.
5416
5417 EOF
5418     elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
5419       archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5420       archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5421     else
5422       ld_shlibs=no
5423     fi
5424     ;;
5425
5426   sunos4*)
5427     archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5428     wlarc=
5429     hardcode_direct=yes
5430     hardcode_shlibpath_var=no
5431     ;;
5432
5433   *)
5434     if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
5435       archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5436       archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5437     else
5438       ld_shlibs=no
5439     fi
5440     ;;
5441   esac
5442
5443   if test "$ld_shlibs" = yes; then
5444     runpath_var=LD_RUN_PATH
5445     hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir'
5446     export_dynamic_flag_spec='${wl}--export-dynamic'
5447     case $host_os in
5448     cygwin* | mingw* | pw32*)
5449       # dlltool doesn't understand --whole-archive et. al.
5450       whole_archive_flag_spec=
5451       ;;
5452     *)
5453       # ancient GNU ld didn't support --whole-archive et. al.
5454       if $LD --help 2>&1 | egrep 'no-whole-archive' > /dev/null; then
5455         whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
5456       else
5457         whole_archive_flag_spec=
5458       fi
5459       ;;
5460     esac
5461   fi
5462 else
5463   # PORTME fill in a description of your system's linker (not GNU ld)
5464   case $host_os in
5465   aix3*)
5466     allow_undefined_flag=unsupported
5467     always_export_symbols=yes
5468     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'
5469     # Note: this linker hardcodes the directories in LIBPATH if there
5470     # are no directories specified by -L.
5471     hardcode_minus_L=yes
5472     if test "$GCC" = yes && test -z "$link_static_flag"; then
5473       # Neither direct hardcoding nor static linking is supported with a
5474       # broken collect2.
5475       hardcode_direct=unsupported
5476     fi
5477     ;;
5478
5479   aix4* | aix5*)
5480     if test "$host_cpu" = ia64; then
5481       # On IA64, the linker does run time linking by default, so we don't
5482       # have to do anything special.
5483       aix_use_runtimelinking=no
5484       exp_sym_flag='-Bexport'
5485       no_entry_flag=""
5486     else
5487       aix_use_runtimelinking=no
5488
5489       # Test if we are trying to use run time linking or normal
5490       # AIX style linking. If -brtl is somewhere in LDFLAGS, we
5491       # need to do runtime linking.
5492       case $host_os in aix4.[23]|aix4.[23].*|aix5*)
5493         for ld_flag in $LDFLAGS; do
5494           case $ld_flag in
5495           *-brtl*)
5496             aix_use_runtimelinking=yes
5497             break
5498           ;;
5499           esac
5500         done
5501       esac
5502
5503       exp_sym_flag='-bexport'
5504       no_entry_flag='-bnoentry'
5505     fi
5506
5507     # When large executables or shared objects are built, AIX ld can
5508     # have problems creating the table of contents.  If linking a library
5509     # or program results in "error TOC overflow" add -mminimal-toc to
5510     # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
5511     # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
5512
5513     hardcode_direct=yes
5514     archive_cmds=''
5515     hardcode_libdir_separator=':'
5516     if test "$GCC" = yes; then
5517       case $host_os in aix4.[012]|aix4.[012].*)
5518         collect2name=`${CC} -print-prog-name=collect2`
5519         if test -f "$collect2name" && \
5520           strings "$collect2name" | grep resolve_lib_name >/dev/null
5521         then
5522           # We have reworked collect2
5523           hardcode_direct=yes
5524         else
5525           # We have old collect2
5526           hardcode_direct=unsupported
5527           # It fails to find uninstalled libraries when the uninstalled
5528           # path is not listed in the libpath.  Setting hardcode_minus_L
5529           # to unsupported forces relinking
5530           hardcode_minus_L=yes
5531           hardcode_libdir_flag_spec='-L$libdir'
5532           hardcode_libdir_separator=
5533         fi
5534       esac
5535
5536       shared_flag='-shared'
5537     else
5538       # not using gcc
5539       if test "$host_cpu" = ia64; then
5540         shared_flag='${wl}-G'
5541       else
5542         if test "$aix_use_runtimelinking" = yes; then
5543           shared_flag='${wl}-G'
5544         else
5545           shared_flag='${wl}-bM:SRE'
5546         fi
5547       fi
5548     fi
5549
5550     # It seems that -bexpall can do strange things, so it is better to
5551     # generate a list of symbols to export.
5552     always_export_symbols=yes
5553     if test "$aix_use_runtimelinking" = yes; then
5554       # Warning - without using the other runtime loading flags (-brtl),
5555       # -berok will link without error, but may produce a broken library.
5556       allow_undefined_flag='-berok'
5557       hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:/usr/lib:/lib'
5558       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"
5559     else
5560       if test "$host_cpu" = ia64; then
5561         hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
5562         allow_undefined_flag="-z nodefs"
5563         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"
5564       else
5565         hardcode_libdir_flag_spec='${wl}-bnolibpath ${wl}-blibpath:$libdir:/usr/lib:/lib'
5566         # Warning - without using the other run time loading flags,
5567         # -berok will link without error, but may produce a broken library.
5568         allow_undefined_flag='${wl}-berok'
5569         # This is a bit strange, but is similar to how AIX traditionally builds
5570         # it's shared libraries.
5571         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'
5572       fi
5573     fi
5574     ;;
5575
5576   amigaos*)
5577     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)'
5578     hardcode_libdir_flag_spec='-L$libdir'
5579     hardcode_minus_L=yes
5580     # see comment about different semantics on the GNU ld section
5581     ld_shlibs=no
5582     ;;
5583
5584   cygwin* | mingw* | pw32*)
5585     # When not using gcc, we currently assume that we are using
5586     # Microsoft Visual C++.
5587     # hardcode_libdir_flag_spec is actually meaningless, as there is
5588     # no search path for DLLs.
5589     hardcode_libdir_flag_spec=' '
5590     allow_undefined_flag=unsupported
5591     # Tell ltmain to make .lib files, not .a files.
5592     libext=lib
5593     # FIXME: Setting linknames here is a bad hack.
5594     archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | sed -e '\''s/ -lc$//'\''` -link -dll~linknames='
5595     # The linker will automatically build a .lib file if we build a DLL.
5596     old_archive_from_new_cmds='true'
5597     # FIXME: Should let the user specify the lib program.
5598     old_archive_cmds='lib /OUT:$oldlib$oldobjs$old_deplibs'
5599     fix_srcfile_path='`cygpath -w "$srcfile"`'
5600     ;;
5601
5602   darwin* | rhapsody*)
5603     case "$host_os" in
5604     rhapsody* | darwin1.[012])
5605       allow_undefined_flag='-undefined suppress'
5606       ;;
5607     *) # Darwin 1.3 on
5608       allow_undefined_flag='-flat_namespace -undefined suppress'
5609       ;;
5610     esac
5611     # FIXME: Relying on posixy $() will cause problems for
5612     #        cross-compilation, but unfortunately the echo tests do not
5613     #        yet detect zsh echo's removal of \ escapes.  Also zsh mangles
5614     #        `"' quotes if we put them in here... so don't!
5615     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)'
5616     # We need to add '_' to the symbols in $export_symbols first
5617     #archive_expsym_cmds="$archive_cmds"' && strip -s $export_symbols'
5618     hardcode_direct=yes
5619     hardcode_shlibpath_var=no
5620     whole_archive_flag_spec='-all_load $convenience'
5621     ;;
5622
5623   freebsd1*)
5624     ld_shlibs=no
5625     ;;
5626
5627   # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
5628   # support.  Future versions do this automatically, but an explicit c++rt0.o
5629   # does not break anything, and helps significantly (at the cost of a little
5630   # extra space).
5631   freebsd2.2*)
5632     archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
5633     hardcode_libdir_flag_spec='-R$libdir'
5634     hardcode_direct=yes
5635     hardcode_shlibpath_var=no
5636     ;;
5637
5638   # Unfortunately, older versions of FreeBSD 2 do not have this feature.
5639   freebsd2*)
5640     archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5641     hardcode_direct=yes
5642     hardcode_minus_L=yes
5643     hardcode_shlibpath_var=no
5644     ;;
5645
5646   # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
5647   freebsd*)
5648     archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
5649     hardcode_libdir_flag_spec='-R$libdir'
5650     hardcode_direct=yes
5651     hardcode_shlibpath_var=no
5652     ;;
5653
5654   hpux9* | hpux10* | hpux11*)
5655     case $host_os in
5656     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' ;;
5657     *) archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' ;;
5658     esac
5659     hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
5660     hardcode_libdir_separator=:
5661     hardcode_direct=yes
5662     hardcode_minus_L=yes # Not in the search PATH, but as the default
5663                          # location of the library.
5664     export_dynamic_flag_spec='${wl}-E'
5665     ;;
5666
5667   irix5* | irix6* | nonstopux*)
5668     if test "$GCC" = yes; then
5669       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'
5670       hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5671     else
5672       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'
5673       hardcode_libdir_flag_spec='-rpath $libdir'
5674     fi
5675     hardcode_libdir_separator=:
5676     link_all_deplibs=yes
5677     ;;
5678
5679   netbsd*)
5680     if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
5681       archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
5682     else
5683       archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
5684     fi
5685     hardcode_libdir_flag_spec='-R$libdir'
5686     hardcode_direct=yes
5687     hardcode_shlibpath_var=no
5688     ;;
5689
5690   newsos6)
5691     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5692     hardcode_direct=yes
5693     hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5694     hardcode_libdir_separator=:
5695     hardcode_shlibpath_var=no
5696     ;;
5697
5698   openbsd*)
5699     hardcode_direct=yes
5700     hardcode_shlibpath_var=no
5701     if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
5702       archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5703       hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
5704       export_dynamic_flag_spec='${wl}-E'
5705     else
5706       case "$host_os" in
5707       openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
5708         archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5709         hardcode_libdir_flag_spec='-R$libdir'
5710         ;;
5711       *)
5712         archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5713         hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
5714         ;;
5715       esac
5716     fi
5717     ;;
5718
5719   openedition*)
5720     archive_cmds="\$CC -Wl,DLL \$libobjs \$deplibs \$compiler_flags -o \$lib &&
5721         cp \$linknames \$output_objdir && linknames=''"
5722     export_dynamic_flag_spec="-Wl,DLL"
5723     ;;
5724
5725   os2*)
5726     hardcode_libdir_flag_spec='-L$libdir'
5727     hardcode_minus_L=yes
5728     allow_undefined_flag=unsupported
5729     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'
5730     old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
5731     ;;
5732
5733   osf3*)
5734     if test "$GCC" = yes; then
5735       allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
5736       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'
5737     else
5738       allow_undefined_flag=' -expect_unresolved \*'
5739       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'
5740     fi
5741     hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5742     hardcode_libdir_separator=:
5743     ;;
5744
5745   osf4* | osf5*)        # as osf3* with the addition of -msym flag
5746     if test "$GCC" = yes; then
5747       allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
5748       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'
5749       hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5750     else
5751       allow_undefined_flag=' -expect_unresolved \*'
5752       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'
5753       archive_expsym_cmds='for i in `cat $export_symbols`; do printf "-exported_symbol " >> $lib.exp; echo "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
5754       $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'
5755
5756       #Both c and cxx compiler support -rpath directly
5757       hardcode_libdir_flag_spec='-rpath $libdir'
5758     fi
5759     hardcode_libdir_separator=:
5760     ;;
5761
5762   sco3.2v5*)
5763     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5764     hardcode_shlibpath_var=no
5765     runpath_var=LD_RUN_PATH
5766     hardcode_runpath_var=yes
5767     export_dynamic_flag_spec='${wl}-Bexport'
5768     ;;
5769
5770   solaris*)
5771     # gcc --version < 3.0 without binutils cannot create self contained
5772     # shared libraries reliably, requiring libgcc.a to resolve some of
5773     # the object symbols generated in some cases.  Libraries that use
5774     # assert need libgcc.a to resolve __eprintf, for example.  Linking
5775     # a copy of libgcc.a into every shared library to guarantee resolving
5776     # such symbols causes other problems:  According to Tim Van Holder
5777     # <tim.van.holder@pandora.be>, C++ libraries end up with a separate
5778     # (to the application) exception stack for one thing.
5779     no_undefined_flag=' -z defs'
5780     if test "$GCC" = yes; then
5781       case `$CC --version 2>/dev/null` in
5782       [12].*)
5783         cat <<EOF 1>&2
5784
5785 *** Warning: Releases of GCC earlier than version 3.0 cannot reliably
5786 *** create self contained shared libraries on Solaris systems, without
5787 *** introducing a dependency on libgcc.a.  Therefore, libtool is disabling
5788 *** -no-undefined support, which will at least allow you to build shared
5789 *** libraries.  However, you may find that when you link such libraries
5790 *** into an application without using GCC, you have to manually add
5791 *** \`gcc --print-libgcc-file-name\` to the link command.  We urge you to
5792 *** upgrade to a newer version of GCC.  Another option is to rebuild your
5793 *** current GCC to use the GNU linker from GNU binutils 2.9.1 or newer.
5794
5795 EOF
5796         no_undefined_flag=
5797         ;;
5798       esac
5799     fi
5800     # $CC -shared without GNU ld will not create a library from C++
5801     # object files and a static libstdc++, better avoid it by now
5802     archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
5803     archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
5804                 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
5805     hardcode_libdir_flag_spec='-R$libdir'
5806     hardcode_shlibpath_var=no
5807     case $host_os in
5808     solaris2.[0-5] | solaris2.[0-5].*) ;;
5809     *) # Supported since Solaris 2.6 (maybe 2.5.1?)
5810       whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;;
5811     esac
5812     link_all_deplibs=yes
5813     ;;
5814
5815   sunos4*)
5816     if test "x$host_vendor" = xsequent; then
5817       # Use $CC to link under sequent, because it throws in some extra .o
5818       # files that make .init and .fini sections work.
5819       archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
5820     else
5821       archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
5822     fi
5823     hardcode_libdir_flag_spec='-L$libdir'
5824     hardcode_direct=yes
5825     hardcode_minus_L=yes
5826     hardcode_shlibpath_var=no
5827     ;;
5828
5829   sysv4)
5830     case $host_vendor in
5831       sni)
5832         archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5833         hardcode_direct=yes # is this really true???
5834         ;;
5835       siemens)
5836         ## LD is ld it makes a PLAMLIB
5837         ## CC just makes a GrossModule.
5838         archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
5839         reload_cmds='$CC -r -o $output$reload_objs'
5840         hardcode_direct=no
5841         ;;
5842       motorola)
5843         archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5844         hardcode_direct=no #Motorola manual says yes, but my tests say they lie
5845         ;;
5846     esac
5847     runpath_var='LD_RUN_PATH'
5848     hardcode_shlibpath_var=no
5849     ;;
5850
5851   sysv4.3*)
5852     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5853     hardcode_shlibpath_var=no
5854     export_dynamic_flag_spec='-Bexport'
5855     ;;
5856
5857   sysv5*)
5858     no_undefined_flag=' -z text'
5859     # $CC -shared without GNU ld will not create a library from C++
5860     # object files and a static libstdc++, better avoid it by now
5861     archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
5862     archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
5863                 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
5864     hardcode_libdir_flag_spec=
5865     hardcode_shlibpath_var=no
5866     runpath_var='LD_RUN_PATH'
5867     ;;
5868
5869   uts4*)
5870     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5871     hardcode_libdir_flag_spec='-L$libdir'
5872     hardcode_shlibpath_var=no
5873     ;;
5874
5875   dgux*)
5876     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5877     hardcode_libdir_flag_spec='-L$libdir'
5878     hardcode_shlibpath_var=no
5879     ;;
5880
5881   sysv4*MP*)
5882     if test -d /usr/nec; then
5883       archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5884       hardcode_shlibpath_var=no
5885       runpath_var=LD_RUN_PATH
5886       hardcode_runpath_var=yes
5887       ld_shlibs=yes
5888     fi
5889     ;;
5890
5891   sysv4.2uw2*)
5892     archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
5893     hardcode_direct=yes
5894     hardcode_minus_L=no
5895     hardcode_shlibpath_var=no
5896     hardcode_runpath_var=yes
5897     runpath_var=LD_RUN_PATH
5898     ;;
5899
5900   sysv5uw7* | unixware7*)
5901     no_undefined_flag='${wl}-z ${wl}text'
5902     if test "$GCC" = yes; then
5903       archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
5904     else
5905       archive_cmds='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
5906     fi
5907     runpath_var='LD_RUN_PATH'
5908     hardcode_shlibpath_var=no
5909     ;;
5910
5911   *)
5912     ld_shlibs=no
5913     ;;
5914   esac
5915 fi
5916 echo "$ac_t""$ld_shlibs" 1>&6
5917 test "$ld_shlibs" = no && can_build_shared=no
5918
5919 # Check hardcoding attributes.
5920 echo $ac_n "checking how to hardcode library paths into programs""... $ac_c" 1>&6
5921 echo "configure:5922: checking how to hardcode library paths into programs" >&5
5922 hardcode_action=
5923 if test -n "$hardcode_libdir_flag_spec" || \
5924    test -n "$runpath_var"; then
5925
5926   # We can hardcode non-existant directories.
5927   if test "$hardcode_direct" != no &&
5928      # If the only mechanism to avoid hardcoding is shlibpath_var, we
5929      # have to relink, otherwise we might link with an installed library
5930      # when we should be linking with a yet-to-be-installed one
5931      ## test "$hardcode_shlibpath_var" != no &&
5932      test "$hardcode_minus_L" != no; then
5933     # Linking always hardcodes the temporary library directory.
5934     hardcode_action=relink
5935   else
5936     # We can link without hardcoding, and we can hardcode nonexisting dirs.
5937     hardcode_action=immediate
5938   fi
5939 else
5940   # We cannot hardcode anything, or else we can only hardcode existing
5941   # directories.
5942   hardcode_action=unsupported
5943 fi
5944 echo "$ac_t""$hardcode_action" 1>&6
5945
5946 striplib=
5947 old_striplib=
5948 echo $ac_n "checking whether stripping libraries is possible""... $ac_c" 1>&6
5949 echo "configure:5950: checking whether stripping libraries is possible" >&5
5950 if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
5951   test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
5952   test -z "$striplib" && striplib="$STRIP --strip-unneeded"
5953   echo "$ac_t""yes" 1>&6
5954 else
5955   echo "$ac_t""no" 1>&6
5956 fi
5957
5958 reload_cmds='$LD$reload_flag -o $output$reload_objs'
5959 test -z "$deplibs_check_method" && deplibs_check_method=unknown
5960
5961 # PORTME Fill in your ld.so characteristics
5962 echo $ac_n "checking dynamic linker characteristics""... $ac_c" 1>&6
5963 echo "configure:5964: checking dynamic linker characteristics" >&5
5964 library_names_spec=
5965 libname_spec='lib$name'
5966 soname_spec=
5967 postinstall_cmds=
5968 postuninstall_cmds=
5969 finish_cmds=
5970 finish_eval=
5971 shlibpath_var=
5972 shlibpath_overrides_runpath=unknown
5973 version_type=none
5974 dynamic_linker="$host_os ld.so"
5975 sys_lib_dlsearch_path_spec="/lib /usr/lib"
5976 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
5977
5978 case $host_os in
5979 aix3*)
5980   version_type=linux
5981   library_names_spec='${libname}${release}.so$versuffix $libname.a'
5982   shlibpath_var=LIBPATH
5983
5984   # AIX has no versioning support, so we append a major version to the name.
5985   soname_spec='${libname}${release}.so$major'
5986   ;;
5987
5988 aix4* | aix5*)
5989   version_type=linux
5990   need_lib_prefix=no
5991   need_version=no
5992   hardcode_into_libs=yes
5993   if test "$host_cpu" = ia64; then
5994     # AIX 5 supports IA64
5995     library_names_spec='${libname}${release}.so$major ${libname}${release}.so$versuffix $libname.so'
5996     shlibpath_var=LD_LIBRARY_PATH
5997   else
5998     # With GCC up to 2.95.x, collect2 would create an import file
5999     # for dependence libraries.  The import file would start with
6000     # the line `#! .'.  This would cause the generated library to
6001     # depend on `.', always an invalid library.  This was fixed in
6002     # development snapshots of GCC prior to 3.0.
6003     case $host_os in
6004       aix4 | aix4.[01] | aix4.[01].*)
6005         if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
6006              echo ' yes '
6007              echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
6008           :
6009         else
6010           can_build_shared=no
6011         fi
6012         ;;
6013     esac
6014     # AIX (on Power*) has no versioning support, so currently we can
6015     # not hardcode correct soname into executable. Probably we can
6016     # add versioning support to collect2, so additional links can
6017     # be useful in future.
6018     if test "$aix_use_runtimelinking" = yes; then
6019       # If using run time linking (on AIX 4.2 or later) use lib<name>.so
6020       # instead of lib<name>.a to let people know that these are not
6021       # typical AIX shared libraries.
6022       library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6023     else
6024       # We preserve .a as extension for shared libraries through AIX4.2
6025       # and later when we are not doing run time linking.
6026       library_names_spec='${libname}${release}.a $libname.a'
6027       soname_spec='${libname}${release}.so$major'
6028     fi
6029     shlibpath_var=LIBPATH
6030   fi
6031   hardcode_into_libs=yes
6032   ;;
6033
6034 amigaos*)
6035   library_names_spec='$libname.ixlibrary $libname.a'
6036   # Create ${libname}_ixlibrary.a entries in /sys/libs.
6037   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'
6038   ;;
6039
6040 beos*)
6041   library_names_spec='${libname}.so'
6042   dynamic_linker="$host_os ld.so"
6043   shlibpath_var=LIBRARY_PATH
6044   ;;
6045
6046 bsdi4*)
6047   version_type=linux
6048   need_version=no
6049   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6050   soname_spec='${libname}${release}.so$major'
6051   finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
6052   shlibpath_var=LD_LIBRARY_PATH
6053   sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
6054   sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
6055   export_dynamic_flag_spec=-rdynamic
6056   # the default ld.so.conf also contains /usr/contrib/lib and
6057   # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
6058   # libtool to hard-code these into programs
6059   ;;
6060
6061 cygwin* | mingw* | pw32*)
6062   version_type=windows
6063   need_version=no
6064   need_lib_prefix=no
6065   case $GCC,$host_os in
6066   yes,cygwin*)
6067     library_names_spec='$libname.dll.a'
6068     soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
6069     postinstall_cmds='dlpath=`bash 2>&1 -c '\''. $dir/${file}i;echo \$dlname'\''`~
6070       dldir=$destdir/`dirname \$dlpath`~
6071       test -d \$dldir || mkdir -p \$dldir~
6072       $install_prog .libs/$dlname \$dldir/$dlname'
6073     postuninstall_cmds='dldll=`bash 2>&1 -c '\''. $file; echo \$dlname'\''`~
6074       dlpath=$dir/\$dldll~
6075        $rm \$dlpath'
6076     ;;
6077   yes,mingw*)
6078     library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
6079     sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | sed -e "s/^libraries://" -e "s/;/ /g" -e "s,=/,/,g"`
6080     ;;
6081   yes,pw32*)
6082     library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | sed -e 's/./-/g'`${versuffix}.dll'
6083     ;;
6084   *)
6085     library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll $libname.lib'
6086     ;;
6087   esac
6088   dynamic_linker='Win32 ld.exe'
6089   # FIXME: first we should search . and the directory the executable is in
6090   shlibpath_var=PATH
6091   ;;
6092
6093 darwin* | rhapsody*)
6094   dynamic_linker="$host_os dyld"
6095   version_type=darwin
6096   need_lib_prefix=no
6097   need_version=no
6098   # FIXME: Relying on posixy $() will cause problems for
6099   #        cross-compilation, but unfortunately the echo tests do not
6100   #        yet detect zsh echo's removal of \ escapes.
6101   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)'
6102   soname_spec='${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib)'
6103   shlibpath_overrides_runpath=yes
6104   shlibpath_var=DYLD_LIBRARY_PATH
6105   ;;
6106
6107 freebsd1*)
6108   dynamic_linker=no
6109   ;;
6110
6111 freebsd*)
6112   objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
6113   version_type=freebsd-$objformat
6114   case $version_type in
6115     freebsd-elf*)
6116       library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
6117       need_version=no
6118       need_lib_prefix=no
6119       ;;
6120     freebsd-*)
6121       library_names_spec='${libname}${release}.so$versuffix $libname.so$versuffix'
6122       need_version=yes
6123       ;;
6124   esac
6125   shlibpath_var=LD_LIBRARY_PATH
6126   case $host_os in
6127   freebsd2*)
6128     shlibpath_overrides_runpath=yes
6129     ;;
6130   *)
6131     shlibpath_overrides_runpath=no
6132     hardcode_into_libs=yes
6133     ;;
6134   esac
6135   ;;
6136
6137 gnu*)
6138   version_type=linux
6139   need_lib_prefix=no
6140   need_version=no
6141   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so${major} ${libname}.so'
6142   soname_spec='${libname}${release}.so$major'
6143   shlibpath_var=LD_LIBRARY_PATH
6144   hardcode_into_libs=yes
6145   ;;
6146
6147 hpux9* | hpux10* | hpux11*)
6148   # Give a soname corresponding to the major version so that dld.sl refuses to
6149   # link against other versions.
6150   dynamic_linker="$host_os dld.sl"
6151   version_type=sunos
6152   need_lib_prefix=no
6153   need_version=no
6154   shlibpath_var=SHLIB_PATH
6155   shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
6156   library_names_spec='${libname}${release}.sl$versuffix ${libname}${release}.sl$major $libname.sl'
6157   soname_spec='${libname}${release}.sl$major'
6158   # HP-UX runs *really* slowly unless shared libraries are mode 555.
6159   postinstall_cmds='chmod 555 $lib'
6160   ;;
6161
6162 irix5* | irix6* | nonstopux*)
6163   case $host_os in
6164     nonstopux*) version_type=nonstopux ;;
6165     *)          version_type=irix ;;
6166   esac
6167   need_lib_prefix=no
6168   need_version=no
6169   soname_spec='${libname}${release}.so$major'
6170   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so $libname.so'
6171   case $host_os in
6172   irix5* | nonstopux*)
6173     libsuff= shlibsuff=
6174     ;;
6175   *)
6176     case $LD in # libtool.m4 will add one of these switches to LD
6177     *-32|*"-32 ") libsuff= shlibsuff= libmagic=32-bit;;
6178     *-n32|*"-n32 ") libsuff=32 shlibsuff=N32 libmagic=N32;;
6179     *-64|*"-64 ") libsuff=64 shlibsuff=64 libmagic=64-bit;;
6180     *) libsuff= shlibsuff= libmagic=never-match;;
6181     esac
6182     ;;
6183   esac
6184   shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
6185   shlibpath_overrides_runpath=no
6186   sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
6187   sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
6188   ;;
6189
6190 # No shared lib support for Linux oldld, aout, or coff.
6191 linux-gnuoldld* | linux-gnuaout* | linux-gnucoff*)
6192   dynamic_linker=no
6193   ;;
6194
6195 # This must be Linux ELF.
6196 linux-gnu*)
6197   version_type=linux
6198   need_lib_prefix=no
6199   need_version=no
6200   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6201   soname_spec='${libname}${release}.so$major'
6202   finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
6203   shlibpath_var=LD_LIBRARY_PATH
6204   shlibpath_overrides_runpath=no
6205   # This implies no fast_install, which is unacceptable.
6206   # Some rework will be needed to allow for fast_install
6207   # before this can be enabled.
6208   hardcode_into_libs=yes
6209
6210   # We used to test for /lib/ld.so.1 and disable shared libraries on
6211   # powerpc, because MkLinux only supported shared libraries with the
6212   # GNU dynamic linker.  Since this was broken with cross compilers,
6213   # most powerpc-linux boxes support dynamic linking these days and
6214   # people can always --disable-shared, the test was removed, and we
6215   # assume the GNU/Linux dynamic linker is in use.
6216   dynamic_linker='GNU/Linux ld.so'
6217   ;;
6218
6219 netbsd*)
6220   version_type=sunos
6221   need_lib_prefix=no
6222   need_version=no
6223   if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
6224     library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
6225     finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
6226     dynamic_linker='NetBSD (a.out) ld.so'
6227   else
6228     library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so ${libname}.so'
6229     soname_spec='${libname}${release}.so$major'
6230     dynamic_linker='NetBSD ld.elf_so'
6231   fi
6232   shlibpath_var=LD_LIBRARY_PATH
6233   shlibpath_overrides_runpath=yes
6234   hardcode_into_libs=yes
6235   ;;
6236
6237 newsos6)
6238   version_type=linux
6239   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6240   shlibpath_var=LD_LIBRARY_PATH
6241   shlibpath_overrides_runpath=yes
6242   ;;
6243
6244 openbsd*)
6245   version_type=sunos
6246   need_lib_prefix=no
6247   need_version=no
6248   if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
6249     case "$host_os" in
6250     openbsd2.[89] | openbsd2.[89].*)
6251       shlibpath_overrides_runpath=no
6252       ;;
6253     *)
6254       shlibpath_overrides_runpath=yes
6255       ;;
6256     esac
6257   else
6258     shlibpath_overrides_runpath=yes
6259   fi
6260   library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
6261   finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
6262   shlibpath_var=LD_LIBRARY_PATH
6263   ;;
6264
6265 openedition*)
6266   need_lib_prefix=no
6267   need_version=no
6268   shlibpath_overrides_runpath=yes
6269   shlibpath_var=LIBPATH
6270   postinstall_cmds="rm \$destdir/\$linkname; cp \$linkname \$destdir; chmod a+x \$lib"
6271   # the library's exports are in libname.x; this is the file that must
6272   # actually be linked with to use a DLL.
6273   library_names_spec="\${libname}\${release}.so\$versuffix \${libname}.x"
6274   ;;
6275
6276 os2*)
6277   libname_spec='$name'
6278   need_lib_prefix=no
6279   library_names_spec='$libname.dll $libname.a'
6280   dynamic_linker='OS/2 ld.exe'
6281   shlibpath_var=LIBPATH
6282   ;;
6283
6284 osf3* | osf4* | osf5*)
6285   version_type=osf
6286   need_version=no
6287   soname_spec='${libname}${release}.so$major'
6288   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6289   shlibpath_var=LD_LIBRARY_PATH
6290   sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
6291   sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
6292   hardcode_into_libs=yes
6293   ;;
6294
6295 sco3.2v5*)
6296   version_type=osf
6297   soname_spec='${libname}${release}.so$major'
6298   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6299   shlibpath_var=LD_LIBRARY_PATH
6300   ;;
6301
6302 solaris*)
6303   version_type=linux
6304   need_lib_prefix=no
6305   need_version=no
6306   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6307   soname_spec='${libname}${release}.so$major'
6308   shlibpath_var=LD_LIBRARY_PATH
6309   shlibpath_overrides_runpath=yes
6310   hardcode_into_libs=yes
6311   # ldd complains unless libraries are executable
6312   postinstall_cmds='chmod +x $lib'
6313   ;;
6314
6315 sunos4*)
6316   version_type=sunos
6317   library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
6318   finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
6319   shlibpath_var=LD_LIBRARY_PATH
6320   shlibpath_overrides_runpath=yes
6321   if test "$with_gnu_ld" = yes; then
6322     need_lib_prefix=no
6323   fi
6324   need_version=yes
6325   ;;
6326
6327 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
6328   version_type=linux
6329   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6330   soname_spec='${libname}${release}.so$major'
6331   shlibpath_var=LD_LIBRARY_PATH
6332   case $host_vendor in
6333     sni)
6334       shlibpath_overrides_runpath=no
6335       need_lib_prefix=no
6336       export_dynamic_flag_spec='${wl}-Blargedynsym'
6337       runpath_var=LD_RUN_PATH
6338       ;;
6339     siemens)
6340       need_lib_prefix=no
6341       ;;
6342     motorola)
6343       need_lib_prefix=no
6344       need_version=no
6345       shlibpath_overrides_runpath=no
6346       sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
6347       ;;
6348   esac
6349   ;;
6350
6351 uts4*)
6352   version_type=linux
6353   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6354   soname_spec='${libname}${release}.so$major'
6355   shlibpath_var=LD_LIBRARY_PATH
6356   ;;
6357
6358 dgux*)
6359   version_type=linux
6360   need_lib_prefix=no
6361   need_version=no
6362   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6363   soname_spec='${libname}${release}.so$major'
6364   shlibpath_var=LD_LIBRARY_PATH
6365   ;;
6366
6367 sysv4*MP*)
6368   if test -d /usr/nec ;then
6369     version_type=linux
6370     library_names_spec='$libname.so.$versuffix $libname.so.$major $libname.so'
6371     soname_spec='$libname.so.$major'
6372     shlibpath_var=LD_LIBRARY_PATH
6373   fi
6374   ;;
6375
6376 *)
6377   dynamic_linker=no
6378   ;;
6379 esac
6380 echo "$ac_t""$dynamic_linker" 1>&6
6381 test "$dynamic_linker" = no && can_build_shared=no
6382
6383 # Report the final consequences.
6384 echo $ac_n "checking if libtool supports shared libraries""... $ac_c" 1>&6
6385 echo "configure:6386: checking if libtool supports shared libraries" >&5
6386 echo "$ac_t""$can_build_shared" 1>&6
6387
6388 echo $ac_n "checking whether to build shared libraries""... $ac_c" 1>&6
6389 echo "configure:6390: checking whether to build shared libraries" >&5
6390 test "$can_build_shared" = "no" && enable_shared=no
6391
6392 # On AIX, shared libraries and static libraries use the same namespace, and
6393 # are all built from PIC.
6394 case "$host_os" in
6395 aix3*)
6396   test "$enable_shared" = yes && enable_static=no
6397   if test -n "$RANLIB"; then
6398     archive_cmds="$archive_cmds~\$RANLIB \$lib"
6399     postinstall_cmds='$RANLIB $lib'
6400   fi
6401   ;;
6402
6403 aix4*)
6404   if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
6405     test "$enable_shared" = yes && enable_static=no
6406   fi
6407   ;;
6408 esac
6409 echo "$ac_t""$enable_shared" 1>&6
6410
6411 echo $ac_n "checking whether to build static libraries""... $ac_c" 1>&6
6412 echo "configure:6413: checking whether to build static libraries" >&5
6413 # Make sure either enable_shared or enable_static is yes.
6414 test "$enable_shared" = yes || enable_static=yes
6415 echo "$ac_t""$enable_static" 1>&6
6416
6417 if test "$hardcode_action" = relink; then
6418   # Fast installation is not supported
6419   enable_fast_install=no
6420 elif test "$shlibpath_overrides_runpath" = yes ||
6421      test "$enable_shared" = no; then
6422   # Fast installation is not necessary
6423   enable_fast_install=needless
6424 fi
6425
6426 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
6427 if test "$GCC" = yes; then
6428   variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
6429 fi
6430
6431 if test "x$enable_dlopen" != xyes; then
6432   enable_dlopen=unknown
6433   enable_dlopen_self=unknown
6434   enable_dlopen_self_static=unknown
6435 else
6436   lt_cv_dlopen=no
6437   lt_cv_dlopen_libs=
6438
6439   case $host_os in
6440   beos*)
6441     lt_cv_dlopen="load_add_on"
6442     lt_cv_dlopen_libs=
6443     lt_cv_dlopen_self=yes
6444     ;;
6445
6446   cygwin* | mingw* | pw32*)
6447     lt_cv_dlopen="LoadLibrary"
6448     lt_cv_dlopen_libs=
6449    ;;
6450
6451   *)
6452     echo $ac_n "checking for dllload""... $ac_c" 1>&6
6453 echo "configure:6454: checking for dllload" >&5
6454 if eval "test \"\${ac_cv_func_dllload+set}\" = set"; then
6455   echo $ac_n "(cached) $ac_c" 1>&6
6456 else
6457   cat > conftest.$ac_ext <<EOF
6458 #line 6459 "configure"
6459 #include "confdefs.h"
6460 /* System header to define __stub macros and hopefully few prototypes,
6461     which can conflict with char dllload(); below.  */
6462 #include <assert.h>
6463 /* Override any gcc2 internal prototype to avoid an error.  */
6464 /* We use char because int might match the return type of a gcc2
6465     builtin and then its argument prototype would still apply.  */
6466 char dllload();
6467 char (*f)();
6468
6469 int main() {
6470
6471 /* The GNU C library defines this for functions which it implements
6472     to always fail with ENOSYS.  Some functions are actually named
6473     something starting with __ and the normal name is an alias.  */
6474 #if defined (__stub_dllload) || defined (__stub___dllload)
6475 choke me
6476 #else
6477 f = dllload;
6478 #endif
6479
6480 ; return 0; }
6481 EOF
6482 if { (eval echo configure:6483: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6483   rm -rf conftest*
6484   eval "ac_cv_func_dllload=yes"
6485 else
6486   echo "configure: failed program was:" >&5
6487   cat conftest.$ac_ext >&5
6488   rm -rf conftest*
6489   eval "ac_cv_func_dllload=no"
6490 fi
6491 rm -f conftest*
6492 fi
6493
6494 if eval "test \"`echo '$ac_cv_func_'dllload`\" = yes"; then
6495   echo "$ac_t""yes" 1>&6
6496   lt_cv_dlopen="dllload"
6497 else
6498   echo "$ac_t""no" 1>&6
6499 echo $ac_n "checking for shl_load""... $ac_c" 1>&6
6500 echo "configure:6501: checking for shl_load" >&5
6501 if eval "test \"\${ac_cv_func_shl_load+set}\" = set"; then
6502   echo $ac_n "(cached) $ac_c" 1>&6
6503 else
6504   cat > conftest.$ac_ext <<EOF
6505 #line 6506 "configure"
6506 #include "confdefs.h"
6507 /* System header to define __stub macros and hopefully few prototypes,
6508     which can conflict with char shl_load(); below.  */
6509 #include <assert.h>
6510 /* Override any gcc2 internal prototype to avoid an error.  */
6511 /* We use char because int might match the return type of a gcc2
6512     builtin and then its argument prototype would still apply.  */
6513 char shl_load();
6514 char (*f)();
6515
6516 int main() {
6517
6518 /* The GNU C library defines this for functions which it implements
6519     to always fail with ENOSYS.  Some functions are actually named
6520     something starting with __ and the normal name is an alias.  */
6521 #if defined (__stub_shl_load) || defined (__stub___shl_load)
6522 choke me
6523 #else
6524 f = shl_load;
6525 #endif
6526
6527 ; return 0; }
6528 EOF
6529 if { (eval echo configure:6530: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6530   rm -rf conftest*
6531   eval "ac_cv_func_shl_load=yes"
6532 else
6533   echo "configure: failed program was:" >&5
6534   cat conftest.$ac_ext >&5
6535   rm -rf conftest*
6536   eval "ac_cv_func_shl_load=no"
6537 fi
6538 rm -f conftest*
6539 fi
6540
6541 if eval "test \"`echo '$ac_cv_func_'shl_load`\" = yes"; then
6542   echo "$ac_t""yes" 1>&6
6543   lt_cv_dlopen="shl_load"
6544 else
6545   echo "$ac_t""no" 1>&6
6546 echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
6547 echo "configure:6548: checking for shl_load in -ldld" >&5
6548 ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-:%__p__%'`
6549 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6550   echo $ac_n "(cached) $ac_c" 1>&6
6551 else
6552   ac_save_LIBS="$LIBS"
6553 LIBS="-ldld  $LIBS"
6554 cat > conftest.$ac_ext <<EOF
6555 #line 6556 "configure"
6556 #include "confdefs.h"
6557 /* Override any gcc2 internal prototype to avoid an error.  */
6558 /* We use char because int might match the return type of a gcc2
6559     builtin and then its argument prototype would still apply.  */
6560 char shl_load();
6561
6562 int main() {
6563 shl_load()
6564 ; return 0; }
6565 EOF
6566 if { (eval echo configure:6567: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6567   rm -rf conftest*
6568   eval "ac_cv_lib_$ac_lib_var=yes"
6569 else
6570   echo "configure: failed program was:" >&5
6571   cat conftest.$ac_ext >&5
6572   rm -rf conftest*
6573   eval "ac_cv_lib_$ac_lib_var=no"
6574 fi
6575 rm -f conftest*
6576 LIBS="$ac_save_LIBS"
6577
6578 fi
6579 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6580   echo "$ac_t""yes" 1>&6
6581   lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"
6582 else
6583   echo "$ac_t""no" 1>&6
6584 echo $ac_n "checking for dlopen""... $ac_c" 1>&6
6585 echo "configure:6586: checking for dlopen" >&5
6586 if eval "test \"\${ac_cv_func_dlopen+set}\" = set"; then
6587   echo $ac_n "(cached) $ac_c" 1>&6
6588 else
6589   cat > conftest.$ac_ext <<EOF
6590 #line 6591 "configure"
6591 #include "confdefs.h"
6592 /* System header to define __stub macros and hopefully few prototypes,
6593     which can conflict with char dlopen(); below.  */
6594 #include <assert.h>
6595 /* Override any gcc2 internal prototype to avoid an error.  */
6596 /* We use char because int might match the return type of a gcc2
6597     builtin and then its argument prototype would still apply.  */
6598 char dlopen();
6599 char (*f)();
6600
6601 int main() {
6602
6603 /* The GNU C library defines this for functions which it implements
6604     to always fail with ENOSYS.  Some functions are actually named
6605     something starting with __ and the normal name is an alias.  */
6606 #if defined (__stub_dlopen) || defined (__stub___dlopen)
6607 choke me
6608 #else
6609 f = dlopen;
6610 #endif
6611
6612 ; return 0; }
6613 EOF
6614 if { (eval echo configure:6615: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6615   rm -rf conftest*
6616   eval "ac_cv_func_dlopen=yes"
6617 else
6618   echo "configure: failed program was:" >&5
6619   cat conftest.$ac_ext >&5
6620   rm -rf conftest*
6621   eval "ac_cv_func_dlopen=no"
6622 fi
6623 rm -f conftest*
6624 fi
6625
6626 if eval "test \"`echo '$ac_cv_func_'dlopen`\" = yes"; then
6627   echo "$ac_t""yes" 1>&6
6628   lt_cv_dlopen="dlopen"
6629 else
6630   echo "$ac_t""no" 1>&6
6631 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
6632 echo "configure:6633: checking for dlopen in -ldl" >&5
6633 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-:%__p__%'`
6634 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6635   echo $ac_n "(cached) $ac_c" 1>&6
6636 else
6637   ac_save_LIBS="$LIBS"
6638 LIBS="-ldl  $LIBS"
6639 cat > conftest.$ac_ext <<EOF
6640 #line 6641 "configure"
6641 #include "confdefs.h"
6642 /* Override any gcc2 internal prototype to avoid an error.  */
6643 /* We use char because int might match the return type of a gcc2
6644     builtin and then its argument prototype would still apply.  */
6645 char dlopen();
6646
6647 int main() {
6648 dlopen()
6649 ; return 0; }
6650 EOF
6651 if { (eval echo configure:6652: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6652   rm -rf conftest*
6653   eval "ac_cv_lib_$ac_lib_var=yes"
6654 else
6655   echo "configure: failed program was:" >&5
6656   cat conftest.$ac_ext >&5
6657   rm -rf conftest*
6658   eval "ac_cv_lib_$ac_lib_var=no"
6659 fi
6660 rm -f conftest*
6661 LIBS="$ac_save_LIBS"
6662
6663 fi
6664 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6665   echo "$ac_t""yes" 1>&6
6666   lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
6667 else
6668   echo "$ac_t""no" 1>&6
6669 echo $ac_n "checking for dlopen in -lsvld""... $ac_c" 1>&6
6670 echo "configure:6671: checking for dlopen in -lsvld" >&5
6671 ac_lib_var=`echo svld'_'dlopen | sed 'y%./+-:%__p__%'`
6672 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6673   echo $ac_n "(cached) $ac_c" 1>&6
6674 else
6675   ac_save_LIBS="$LIBS"
6676 LIBS="-lsvld  $LIBS"
6677 cat > conftest.$ac_ext <<EOF
6678 #line 6679 "configure"
6679 #include "confdefs.h"
6680 /* Override any gcc2 internal prototype to avoid an error.  */
6681 /* We use char because int might match the return type of a gcc2
6682     builtin and then its argument prototype would still apply.  */
6683 char dlopen();
6684
6685 int main() {
6686 dlopen()
6687 ; return 0; }
6688 EOF
6689 if { (eval echo configure:6690: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6690   rm -rf conftest*
6691   eval "ac_cv_lib_$ac_lib_var=yes"
6692 else
6693   echo "configure: failed program was:" >&5
6694   cat conftest.$ac_ext >&5
6695   rm -rf conftest*
6696   eval "ac_cv_lib_$ac_lib_var=no"
6697 fi
6698 rm -f conftest*
6699 LIBS="$ac_save_LIBS"
6700
6701 fi
6702 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6703   echo "$ac_t""yes" 1>&6
6704   lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"
6705 else
6706   echo "$ac_t""no" 1>&6
6707 echo $ac_n "checking for dld_link in -ldld""... $ac_c" 1>&6
6708 echo "configure:6709: checking for dld_link in -ldld" >&5
6709 ac_lib_var=`echo dld'_'dld_link | sed 'y%./+-:%__p__%'`
6710 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6711   echo $ac_n "(cached) $ac_c" 1>&6
6712 else
6713   ac_save_LIBS="$LIBS"
6714 LIBS="-ldld  $LIBS"
6715 cat > conftest.$ac_ext <<EOF
6716 #line 6717 "configure"
6717 #include "confdefs.h"
6718 /* Override any gcc2 internal prototype to avoid an error.  */
6719 /* We use char because int might match the return type of a gcc2
6720     builtin and then its argument prototype would still apply.  */
6721 char dld_link();
6722
6723 int main() {
6724 dld_link()
6725 ; return 0; }
6726 EOF
6727 if { (eval echo configure:6728: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6728   rm -rf conftest*
6729   eval "ac_cv_lib_$ac_lib_var=yes"
6730 else
6731   echo "configure: failed program was:" >&5
6732   cat conftest.$ac_ext >&5
6733   rm -rf conftest*
6734   eval "ac_cv_lib_$ac_lib_var=no"
6735 fi
6736 rm -f conftest*
6737 LIBS="$ac_save_LIBS"
6738
6739 fi
6740 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6741   echo "$ac_t""yes" 1>&6
6742   lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"
6743 else
6744   echo "$ac_t""no" 1>&6
6745 fi
6746
6747               
6748 fi
6749
6750             
6751 fi
6752
6753           
6754 fi
6755
6756         
6757 fi
6758
6759       
6760 fi
6761
6762     
6763 fi
6764
6765     ;;
6766   esac
6767
6768   if test "x$lt_cv_dlopen" != xno; then
6769     enable_dlopen=yes
6770   else
6771     enable_dlopen=no
6772   fi
6773
6774   case $lt_cv_dlopen in
6775   dlopen)
6776     save_CPPFLAGS="$CPPFLAGS"
6777         test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
6778
6779     save_LDFLAGS="$LDFLAGS"
6780     eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
6781
6782     save_LIBS="$LIBS"
6783     LIBS="$lt_cv_dlopen_libs $LIBS"
6784
6785     echo $ac_n "checking whether a program can dlopen itself""... $ac_c" 1>&6
6786 echo "configure:6787: checking whether a program can dlopen itself" >&5
6787 if eval "test \"\${lt_cv_dlopen_self+set}\" = set"; then
6788   echo $ac_n "(cached) $ac_c" 1>&6
6789 else
6790           if test "$cross_compiling" = yes; then :
6791   lt_cv_dlopen_self=cross
6792 else
6793     lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
6794   lt_status=$lt_dlunknown
6795   cat > conftest.$ac_ext <<EOF
6796 #line 6797 "configure"
6797 #include "confdefs.h"
6798
6799 #if HAVE_DLFCN_H
6800 #include <dlfcn.h>
6801 #endif
6802
6803 #include <stdio.h>
6804
6805 #ifdef RTLD_GLOBAL
6806 #  define LT_DLGLOBAL           RTLD_GLOBAL
6807 #else
6808 #  ifdef DL_GLOBAL
6809 #    define LT_DLGLOBAL         DL_GLOBAL
6810 #  else
6811 #    define LT_DLGLOBAL         0
6812 #  endif
6813 #endif
6814
6815 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
6816    find out it does not work in some platform. */
6817 #ifndef LT_DLLAZY_OR_NOW
6818 #  ifdef RTLD_LAZY
6819 #    define LT_DLLAZY_OR_NOW            RTLD_LAZY
6820 #  else
6821 #    ifdef DL_LAZY
6822 #      define LT_DLLAZY_OR_NOW          DL_LAZY
6823 #    else
6824 #      ifdef RTLD_NOW
6825 #        define LT_DLLAZY_OR_NOW        RTLD_NOW
6826 #      else
6827 #        ifdef DL_NOW
6828 #          define LT_DLLAZY_OR_NOW      DL_NOW
6829 #        else
6830 #          define LT_DLLAZY_OR_NOW      0
6831 #        endif
6832 #      endif
6833 #    endif
6834 #  endif
6835 #endif
6836
6837 #ifdef __cplusplus
6838 extern "C" void exit (int);
6839 #endif
6840
6841 void fnord() { int i=42;}
6842 int main ()
6843 {
6844   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
6845   int status = $lt_dlunknown;
6846
6847   if (self)
6848     {
6849       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
6850       else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
6851       /* dlclose (self); */
6852     }
6853
6854     exit (status);
6855 }
6856 EOF
6857   if { (eval echo configure:6858: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} 2>/dev/null; then
6858     (./conftest; exit; ) 2>/dev/null
6859     lt_status=$?
6860     case x$lt_status in
6861       x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;;
6862       x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;;
6863       x$lt_unknown|x*) lt_cv_dlopen_self=no ;;
6864     esac
6865   else :
6866     # compilation failed
6867     lt_cv_dlopen_self=no
6868   fi
6869 fi
6870 rm -fr conftest*
6871
6872     
6873 fi
6874
6875 echo "$ac_t""$lt_cv_dlopen_self" 1>&6
6876
6877     if test "x$lt_cv_dlopen_self" = xyes; then
6878       LDFLAGS="$LDFLAGS $link_static_flag"
6879       echo $ac_n "checking whether a statically linked program can dlopen itself""... $ac_c" 1>&6
6880 echo "configure:6881: checking whether a statically linked program can dlopen itself" >&5
6881 if eval "test \"\${lt_cv_dlopen_self_static+set}\" = set"; then
6882   echo $ac_n "(cached) $ac_c" 1>&6
6883 else
6884           if test "$cross_compiling" = yes; then :
6885   lt_cv_dlopen_self_static=cross
6886 else
6887     lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
6888   lt_status=$lt_dlunknown
6889   cat > conftest.$ac_ext <<EOF
6890 #line 6891 "configure"
6891 #include "confdefs.h"
6892
6893 #if HAVE_DLFCN_H
6894 #include <dlfcn.h>
6895 #endif
6896
6897 #include <stdio.h>
6898
6899 #ifdef RTLD_GLOBAL
6900 #  define LT_DLGLOBAL           RTLD_GLOBAL
6901 #else
6902 #  ifdef DL_GLOBAL
6903 #    define LT_DLGLOBAL         DL_GLOBAL
6904 #  else
6905 #    define LT_DLGLOBAL         0
6906 #  endif
6907 #endif
6908
6909 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
6910    find out it does not work in some platform. */
6911 #ifndef LT_DLLAZY_OR_NOW
6912 #  ifdef RTLD_LAZY
6913 #    define LT_DLLAZY_OR_NOW            RTLD_LAZY
6914 #  else
6915 #    ifdef DL_LAZY
6916 #      define LT_DLLAZY_OR_NOW          DL_LAZY
6917 #    else
6918 #      ifdef RTLD_NOW
6919 #        define LT_DLLAZY_OR_NOW        RTLD_NOW
6920 #      else
6921 #        ifdef DL_NOW
6922 #          define LT_DLLAZY_OR_NOW      DL_NOW
6923 #        else
6924 #          define LT_DLLAZY_OR_NOW      0
6925 #        endif
6926 #      endif
6927 #    endif
6928 #  endif
6929 #endif
6930
6931 #ifdef __cplusplus
6932 extern "C" void exit (int);
6933 #endif
6934
6935 void fnord() { int i=42;}
6936 int main ()
6937 {
6938   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
6939   int status = $lt_dlunknown;
6940
6941   if (self)
6942     {
6943       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
6944       else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
6945       /* dlclose (self); */
6946     }
6947
6948     exit (status);
6949 }
6950 EOF
6951   if { (eval echo configure:6952: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} 2>/dev/null; then
6952     (./conftest; exit; ) 2>/dev/null
6953     lt_status=$?
6954     case x$lt_status in
6955       x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;;
6956       x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;;
6957       x$lt_unknown|x*) lt_cv_dlopen_self_static=no ;;
6958     esac
6959   else :
6960     # compilation failed
6961     lt_cv_dlopen_self_static=no
6962   fi
6963 fi
6964 rm -fr conftest*
6965
6966       
6967 fi
6968
6969 echo "$ac_t""$lt_cv_dlopen_self_static" 1>&6
6970     fi
6971
6972     CPPFLAGS="$save_CPPFLAGS"
6973     LDFLAGS="$save_LDFLAGS"
6974     LIBS="$save_LIBS"
6975     ;;
6976   esac
6977
6978   case $lt_cv_dlopen_self in
6979   yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
6980   *) enable_dlopen_self=unknown ;;
6981   esac
6982
6983   case $lt_cv_dlopen_self_static in
6984   yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
6985   *) enable_dlopen_self_static=unknown ;;
6986   esac
6987 fi
6988
6989
6990 if test "$enable_shared" = yes && test "$GCC" = yes; then
6991   case $archive_cmds in
6992   *'~'*)
6993     # FIXME: we may have to deal with multi-command sequences.
6994     ;;
6995   '$CC '*)
6996     # Test whether the compiler implicitly links with -lc since on some
6997     # systems, -lgcc has to come before -lc. If gcc already passes -lc
6998     # to ld, don't add -lc before -lgcc.
6999     echo $ac_n "checking whether -lc should be explicitly linked in""... $ac_c" 1>&6
7000 echo "configure:7001: checking whether -lc should be explicitly linked in" >&5
7001     if eval "test \"\${lt_cv_archive_cmds_need_lc+set}\" = set"; then
7002   echo $ac_n "(cached) $ac_c" 1>&6
7003 else
7004   $rm conftest*
7005     echo 'static int dummy;' > conftest.$ac_ext
7006
7007     if { (eval echo configure:7008: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7008       soname=conftest
7009       lib=conftest
7010       libobjs=conftest.$ac_objext
7011       deplibs=
7012       wl=$lt_cv_prog_cc_wl
7013       compiler_flags=-v
7014       linker_flags=-v
7015       verstring=
7016       output_objdir=.
7017       libname=conftest
7018       save_allow_undefined_flag=$allow_undefined_flag
7019       allow_undefined_flag=
7020       if { (eval echo configure:7021: \"$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; }
7021       then
7022         lt_cv_archive_cmds_need_lc=no
7023       else
7024         lt_cv_archive_cmds_need_lc=yes
7025       fi
7026       allow_undefined_flag=$save_allow_undefined_flag
7027     else
7028       cat conftest.err 1>&5
7029     fi
7030 fi
7031
7032     echo "$ac_t""$lt_cv_archive_cmds_need_lc" 1>&6
7033     ;;
7034   esac
7035 fi
7036 need_lc=${lt_cv_archive_cmds_need_lc-yes}
7037
7038 # The second clause should only fire when bootstrapping the
7039 # libtool distribution, otherwise you forgot to ship ltmain.sh
7040 # with your package, and you will get complaints that there are
7041 # no rules to generate ltmain.sh.
7042 if test -f "$ltmain"; then
7043   :
7044 else
7045   # If there is no Makefile yet, we rely on a make rule to execute
7046   # `config.status --recheck' to rerun these tests and create the
7047   # libtool script then.
7048   test -f Makefile && make "$ltmain"
7049 fi
7050
7051 if test -f "$ltmain"; then
7052   trap "$rm \"${ofile}T\"; exit 1" 1 2 15
7053   $rm -f "${ofile}T"
7054
7055   echo creating $ofile
7056
7057   # Now quote all the things that may contain metacharacters while being
7058   # careful not to overquote the AC_SUBSTed values.  We take copies of the
7059   # variables and quote the copies for generation of the libtool script.
7060   for var in echo old_CC old_CFLAGS SED \
7061     AR AR_FLAGS CC LD LN_S NM SHELL \
7062     reload_flag reload_cmds wl \
7063     pic_flag link_static_flag no_builtin_flag export_dynamic_flag_spec \
7064     thread_safe_flag_spec whole_archive_flag_spec libname_spec \
7065     library_names_spec soname_spec \
7066     RANLIB old_archive_cmds old_archive_from_new_cmds old_postinstall_cmds \
7067     old_postuninstall_cmds archive_cmds archive_expsym_cmds postinstall_cmds \
7068     postuninstall_cmds extract_expsyms_cmds old_archive_from_expsyms_cmds \
7069     old_striplib striplib file_magic_cmd export_symbols_cmds \
7070     deplibs_check_method allow_undefined_flag no_undefined_flag \
7071     finish_cmds finish_eval global_symbol_pipe global_symbol_to_cdecl \
7072     global_symbol_to_c_name_address \
7073     hardcode_libdir_flag_spec hardcode_libdir_separator  \
7074     sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
7075     compiler_c_o compiler_o_lo need_locks exclude_expsyms include_expsyms; do
7076
7077     case $var in
7078     reload_cmds | old_archive_cmds | old_archive_from_new_cmds | \
7079     old_postinstall_cmds | old_postuninstall_cmds | \
7080     export_symbols_cmds | archive_cmds | archive_expsym_cmds | \
7081     extract_expsyms_cmds | old_archive_from_expsyms_cmds | \
7082     postinstall_cmds | postuninstall_cmds | \
7083     finish_cmds | sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
7084       # Double-quote double-evaled strings.
7085       eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
7086       ;;
7087     *)
7088       eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
7089       ;;
7090     esac
7091   done
7092
7093   cat <<__EOF__ > "${ofile}T"
7094 #! $SHELL
7095
7096 # `$echo "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
7097 # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
7098 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
7099 #
7100 # Copyright (C) 1996-2000 Free Software Foundation, Inc.
7101 # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
7102 #
7103 # This program is free software; you can redistribute it and/or modify
7104 # it under the terms of the GNU General Public License as published by
7105 # the Free Software Foundation; either version 2 of the License, or
7106 # (at your option) any later version.
7107 #
7108 # This program is distributed in the hope that it will be useful, but
7109 # WITHOUT ANY WARRANTY; without even the implied warranty of
7110 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
7111 # General Public License for more details.
7112 #
7113 # You should have received a copy of the GNU General Public License
7114 # along with this program; if not, write to the Free Software
7115 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
7116 #
7117 # As a special exception to the GNU General Public License, if you
7118 # distribute this file as part of a program that contains a
7119 # configuration script generated by Autoconf, you may include it under
7120 # the same distribution terms that you use for the rest of that program.
7121
7122 # A sed that does not truncate output.
7123 SED=$lt_SED
7124
7125 # Sed that helps us avoid accidentally triggering echo(1) options like -n.
7126 Xsed="${SED} -e s/^X//"
7127
7128 # The HP-UX ksh and POSIX shell print the target directory to stdout
7129 # if CDPATH is set.
7130 if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
7131
7132 # ### BEGIN LIBTOOL CONFIG
7133
7134 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
7135
7136 # Shell to use when invoking shell scripts.
7137 SHELL=$lt_SHELL
7138
7139 # Whether or not to build shared libraries.
7140 build_libtool_libs=$enable_shared
7141
7142 # Whether or not to build static libraries.
7143 build_old_libs=$enable_static
7144
7145 # Whether or not to add -lc for building shared libraries.
7146 build_libtool_need_lc=$need_lc
7147
7148 # Whether or not to optimize for fast installation.
7149 fast_install=$enable_fast_install
7150
7151 # The host system.
7152 host_alias=$host_alias
7153 host=$host
7154
7155 # An echo program that does not interpret backslashes.
7156 echo=$lt_echo
7157
7158 # The archiver.
7159 AR=$lt_AR
7160 AR_FLAGS=$lt_AR_FLAGS
7161
7162 # The default C compiler.
7163 CC=$lt_CC
7164
7165 # Is the compiler the GNU C compiler?
7166 with_gcc=$GCC
7167
7168 # The linker used to build libraries.
7169 LD=$lt_LD
7170
7171 # Whether we need hard or soft links.
7172 LN_S=$lt_LN_S
7173
7174 # A BSD-compatible nm program.
7175 NM=$lt_NM
7176
7177 # A symbol stripping program
7178 STRIP=$STRIP
7179
7180 # Used to examine libraries when file_magic_cmd begins "file"
7181 MAGIC_CMD=$MAGIC_CMD
7182
7183 # Used on cygwin: DLL creation program.
7184 DLLTOOL="$DLLTOOL"
7185
7186 # Used on cygwin: object dumper.
7187 OBJDUMP="$OBJDUMP"
7188
7189 # Used on cygwin: assembler.
7190 AS="$AS"
7191
7192 # The name of the directory that contains temporary libtool files.
7193 objdir=$objdir
7194
7195 # How to create reloadable object files.
7196 reload_flag=$lt_reload_flag
7197 reload_cmds=$lt_reload_cmds
7198
7199 # How to pass a linker flag through the compiler.
7200 wl=$lt_wl
7201
7202 # Object file suffix (normally "o").
7203 objext="$ac_objext"
7204
7205 # Old archive suffix (normally "a").
7206 libext="$libext"
7207
7208 # Executable file suffix (normally "").
7209 exeext="$exeext"
7210
7211 # Additional compiler flags for building library objects.
7212 pic_flag=$lt_pic_flag
7213 pic_mode=$pic_mode
7214
7215 # Does compiler simultaneously support -c and -o options?
7216 compiler_c_o=$lt_compiler_c_o
7217
7218 # Can we write directly to a .lo ?
7219 compiler_o_lo=$lt_compiler_o_lo
7220
7221 # Must we lock files when doing compilation ?
7222 need_locks=$lt_need_locks
7223
7224 # Do we need the lib prefix for modules?
7225 need_lib_prefix=$need_lib_prefix
7226
7227 # Do we need a version for libraries?
7228 need_version=$need_version
7229
7230 # Whether dlopen is supported.
7231 dlopen_support=$enable_dlopen
7232
7233 # Whether dlopen of programs is supported.
7234 dlopen_self=$enable_dlopen_self
7235
7236 # Whether dlopen of statically linked programs is supported.
7237 dlopen_self_static=$enable_dlopen_self_static
7238
7239 # Compiler flag to prevent dynamic linking.
7240 link_static_flag=$lt_link_static_flag
7241
7242 # Compiler flag to turn off builtin functions.
7243 no_builtin_flag=$lt_no_builtin_flag
7244
7245 # Compiler flag to allow reflexive dlopens.
7246 export_dynamic_flag_spec=$lt_export_dynamic_flag_spec
7247
7248 # Compiler flag to generate shared objects directly from archives.
7249 whole_archive_flag_spec=$lt_whole_archive_flag_spec
7250
7251 # Compiler flag to generate thread-safe objects.
7252 thread_safe_flag_spec=$lt_thread_safe_flag_spec
7253
7254 # Library versioning type.
7255 version_type=$version_type
7256
7257 # Format of library name prefix.
7258 libname_spec=$lt_libname_spec
7259
7260 # List of archive names.  First name is the real one, the rest are links.
7261 # The last name is the one that the linker finds with -lNAME.
7262 library_names_spec=$lt_library_names_spec
7263
7264 # The coded name of the library, if different from the real name.
7265 soname_spec=$lt_soname_spec
7266
7267 # Commands used to build and install an old-style archive.
7268 RANLIB=$lt_RANLIB
7269 old_archive_cmds=$lt_old_archive_cmds
7270 old_postinstall_cmds=$lt_old_postinstall_cmds
7271 old_postuninstall_cmds=$lt_old_postuninstall_cmds
7272
7273 # Create an old-style archive from a shared archive.
7274 old_archive_from_new_cmds=$lt_old_archive_from_new_cmds
7275
7276 # Create a temporary old-style archive to link instead of a shared archive.
7277 old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds
7278
7279 # Commands used to build and install a shared archive.
7280 archive_cmds=$lt_archive_cmds
7281 archive_expsym_cmds=$lt_archive_expsym_cmds
7282 postinstall_cmds=$lt_postinstall_cmds
7283 postuninstall_cmds=$lt_postuninstall_cmds
7284
7285 # Commands to strip libraries.
7286 old_striplib=$lt_old_striplib
7287 striplib=$lt_striplib
7288
7289 # Method to check whether dependent libraries are shared objects.
7290 deplibs_check_method=$lt_deplibs_check_method
7291
7292 # Command to use when deplibs_check_method == file_magic.
7293 file_magic_cmd=$lt_file_magic_cmd
7294
7295 # Flag that allows shared libraries with undefined symbols to be built.
7296 allow_undefined_flag=$lt_allow_undefined_flag
7297
7298 # Flag that forces no undefined symbols.
7299 no_undefined_flag=$lt_no_undefined_flag
7300
7301 # Commands used to finish a libtool library installation in a directory.
7302 finish_cmds=$lt_finish_cmds
7303
7304 # Same as above, but a single script fragment to be evaled but not shown.
7305 finish_eval=$lt_finish_eval
7306
7307 # Take the output of nm and produce a listing of raw symbols and C names.
7308 global_symbol_pipe=$lt_global_symbol_pipe
7309
7310 # Transform the output of nm in a proper C declaration
7311 global_symbol_to_cdecl=$lt_global_symbol_to_cdecl
7312
7313 # Transform the output of nm in a C name address pair
7314 global_symbol_to_c_name_address=$lt_global_symbol_to_c_name_address
7315
7316 # This is the shared library runtime path variable.
7317 runpath_var=$runpath_var
7318
7319 # This is the shared library path variable.
7320 shlibpath_var=$shlibpath_var
7321
7322 # Is shlibpath searched before the hard-coded library search path?
7323 shlibpath_overrides_runpath=$shlibpath_overrides_runpath
7324
7325 # How to hardcode a shared library path into an executable.
7326 hardcode_action=$hardcode_action
7327
7328 # Whether we should hardcode library paths into libraries.
7329 hardcode_into_libs=$hardcode_into_libs
7330
7331 # Flag to hardcode \$libdir into a binary during linking.
7332 # This must work even if \$libdir does not exist.
7333 hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
7334
7335 # Whether we need a single -rpath flag with a separated argument.
7336 hardcode_libdir_separator=$lt_hardcode_libdir_separator
7337
7338 # Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
7339 # resulting binary.
7340 hardcode_direct=$hardcode_direct
7341
7342 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
7343 # resulting binary.
7344 hardcode_minus_L=$hardcode_minus_L
7345
7346 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
7347 # the resulting binary.
7348 hardcode_shlibpath_var=$hardcode_shlibpath_var
7349
7350 # Variables whose values should be saved in libtool wrapper scripts and
7351 # restored at relink time.
7352 variables_saved_for_relink="$variables_saved_for_relink"
7353
7354 # Whether libtool must link a program against all its dependency libraries.
7355 link_all_deplibs=$link_all_deplibs
7356
7357 # Compile-time system search path for libraries
7358 sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
7359
7360 # Run-time system search path for libraries
7361 sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
7362
7363 # Fix the shell variable \$srcfile for the compiler.
7364 fix_srcfile_path="$fix_srcfile_path"
7365
7366 # Set to yes if exported symbols are required.
7367 always_export_symbols=$always_export_symbols
7368
7369 # The commands to list exported symbols.
7370 export_symbols_cmds=$lt_export_symbols_cmds
7371
7372 # The commands to extract the exported symbol list from a shared archive.
7373 extract_expsyms_cmds=$lt_extract_expsyms_cmds
7374
7375 # Symbols that should not be listed in the preloaded symbols.
7376 exclude_expsyms=$lt_exclude_expsyms
7377
7378 # Symbols that must always be exported.
7379 include_expsyms=$lt_include_expsyms
7380
7381 # ### END LIBTOOL CONFIG
7382
7383 __EOF__
7384
7385   case $host_os in
7386   aix3*)
7387     cat <<\EOF >> "${ofile}T"
7388
7389 # AIX sometimes has problems with the GCC collect2 program.  For some
7390 # reason, if we set the COLLECT_NAMES environment variable, the problems
7391 # vanish in a puff of smoke.
7392 if test "X${COLLECT_NAMES+set}" != Xset; then
7393   COLLECT_NAMES=
7394   export COLLECT_NAMES
7395 fi
7396 EOF
7397     ;;
7398   esac
7399
7400   case $host_os in
7401   cygwin* | mingw* | pw32* | os2*)
7402     cat <<'EOF' >> "${ofile}T"
7403       # This is a source program that is used to create dlls on Windows
7404       # Don't remove nor modify the starting and closing comments
7405 # /* ltdll.c starts here */
7406 # #define WIN32_LEAN_AND_MEAN
7407 # #include <windows.h>
7408 # #undef WIN32_LEAN_AND_MEAN
7409 # #include <stdio.h>
7410 #
7411 # #ifndef __CYGWIN__
7412 # #  ifdef __CYGWIN32__
7413 # #    define __CYGWIN__ __CYGWIN32__
7414 # #  endif
7415 # #endif
7416 #
7417 # #ifdef __cplusplus
7418 # extern "C" {
7419 # #endif
7420 # BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
7421 # #ifdef __cplusplus
7422 # }
7423 # #endif
7424 #
7425 # #ifdef __CYGWIN__
7426 # #include <cygwin/cygwin_dll.h>
7427 # DECLARE_CYGWIN_DLL( DllMain );
7428 # #endif
7429 # HINSTANCE __hDllInstance_base;
7430 #
7431 # BOOL APIENTRY
7432 # DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
7433 # {
7434 #   __hDllInstance_base = hInst;
7435 #   return TRUE;
7436 # }
7437 # /* ltdll.c ends here */
7438         # This is a source program that is used to create import libraries
7439         # on Windows for dlls which lack them. Don't remove nor modify the
7440         # starting and closing comments
7441 # /* impgen.c starts here */
7442 # /*   Copyright (C) 1999-2000 Free Software Foundation, Inc.
7443 #
7444 #  This file is part of GNU libtool.
7445 #
7446 #  This program is free software; you can redistribute it and/or modify
7447 #  it under the terms of the GNU General Public License as published by
7448 #  the Free Software Foundation; either version 2 of the License, or
7449 #  (at your option) any later version.
7450 #
7451 #  This program is distributed in the hope that it will be useful,
7452 #  but WITHOUT ANY WARRANTY; without even the implied warranty of
7453 #  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
7454 #  GNU General Public License for more details.
7455 #
7456 #  You should have received a copy of the GNU General Public License
7457 #  along with this program; if not, write to the Free Software
7458 #  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
7459 #  */
7460 #
7461 # #include <stdio.h>            /* for printf() */
7462 # #include <unistd.h>           /* for open(), lseek(), read() */
7463 # #include <fcntl.h>            /* for O_RDONLY, O_BINARY */
7464 # #include <string.h>           /* for strdup() */
7465 #
7466 # /* O_BINARY isn't required (or even defined sometimes) under Unix */
7467 # #ifndef O_BINARY
7468 # #define O_BINARY 0
7469 # #endif
7470 #
7471 # static unsigned int
7472 # pe_get16 (fd, offset)
7473 #      int fd;
7474 #      int offset;
7475 # {
7476 #   unsigned char b[2];
7477 #   lseek (fd, offset, SEEK_SET);
7478 #   read (fd, b, 2);
7479 #   return b[0] + (b[1]<<8);
7480 # }
7481 #
7482 # static unsigned int
7483 # pe_get32 (fd, offset)
7484 #     int fd;
7485 #     int offset;
7486 # {
7487 #   unsigned char b[4];
7488 #   lseek (fd, offset, SEEK_SET);
7489 #   read (fd, b, 4);
7490 #   return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
7491 # }
7492 #
7493 # static unsigned int
7494 # pe_as32 (ptr)
7495 #      void *ptr;
7496 # {
7497 #   unsigned char *b = ptr;
7498 #   return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
7499 # }
7500 #
7501 # int
7502 # main (argc, argv)
7503 #     int argc;
7504 #     char *argv[];
7505 # {
7506 #     int dll;
7507 #     unsigned long pe_header_offset, opthdr_ofs, num_entries, i;
7508 #     unsigned long export_rva, export_size, nsections, secptr, expptr;
7509 #     unsigned long name_rvas, nexp;
7510 #     unsigned char *expdata, *erva;
7511 #     char *filename, *dll_name;
7512 #
7513 #     filename = argv[1];
7514 #
7515 #     dll = open(filename, O_RDONLY|O_BINARY);
7516 #     if (dll < 1)
7517 #       return 1;
7518 #
7519 #     dll_name = filename;
7520 #
7521 #     for (i=0; filename[i]; i++)
7522 #       if (filename[i] == '/' || filename[i] == '\\'  || filename[i] == ':')
7523 #           dll_name = filename + i +1;
7524 #
7525 #     pe_header_offset = pe_get32 (dll, 0x3c);
7526 #     opthdr_ofs = pe_header_offset + 4 + 20;
7527 #     num_entries = pe_get32 (dll, opthdr_ofs + 92);
7528 #
7529 #     if (num_entries < 1) /* no exports */
7530 #       return 1;
7531 #
7532 #     export_rva = pe_get32 (dll, opthdr_ofs + 96);
7533 #     export_size = pe_get32 (dll, opthdr_ofs + 100);
7534 #     nsections = pe_get16 (dll, pe_header_offset + 4 +2);
7535 #     secptr = (pe_header_offset + 4 + 20 +
7536 #             pe_get16 (dll, pe_header_offset + 4 + 16));
7537 #
7538 #     expptr = 0;
7539 #     for (i = 0; i < nsections; i++)
7540 #     {
7541 #       char sname[8];
7542 #       unsigned long secptr1 = secptr + 40 * i;
7543 #       unsigned long vaddr = pe_get32 (dll, secptr1 + 12);
7544 #       unsigned long vsize = pe_get32 (dll, secptr1 + 16);
7545 #       unsigned long fptr = pe_get32 (dll, secptr1 + 20);
7546 #       lseek(dll, secptr1, SEEK_SET);
7547 #       read(dll, sname, 8);
7548 #       if (vaddr <= export_rva && vaddr+vsize > export_rva)
7549 #       {
7550 #           expptr = fptr + (export_rva - vaddr);
7551 #           if (export_rva + export_size > vaddr + vsize)
7552 #               export_size = vsize - (export_rva - vaddr);
7553 #           break;
7554 #       }
7555 #     }
7556 #
7557 #     expdata = (unsigned char*)malloc(export_size);
7558 #     lseek (dll, expptr, SEEK_SET);
7559 #     read (dll, expdata, export_size);
7560 #     erva = expdata - export_rva;
7561 #
7562 #     nexp = pe_as32 (expdata+24);
7563 #     name_rvas = pe_as32 (expdata+32);
7564 #
7565 #     printf ("EXPORTS\n");
7566 #     for (i = 0; i<nexp; i++)
7567 #     {
7568 #       unsigned long name_rva = pe_as32 (erva+name_rvas+i*4);
7569 #       printf ("\t%s @ %ld ;\n", erva+name_rva, 1+ i);
7570 #     }
7571 #
7572 #     return 0;
7573 # }
7574 # /* impgen.c ends here */
7575
7576 EOF
7577     ;;
7578   esac
7579
7580   # We use sed instead of cat because bash on DJGPP gets confused if
7581   # if finds mixed CR/LF and LF-only lines.  Since sed operates in
7582   # text mode, it properly converts lines to CR/LF.  This bash problem
7583   # is reportedly fixed, but why not run on old versions too?
7584   sed '$q' "$ltmain" >> "${ofile}T" || (rm -f "${ofile}T"; exit 1)
7585
7586   mv -f "${ofile}T" "$ofile" || \
7587     (rm -f "$ofile" && cp "${ofile}T" "$ofile" && rm -f "${ofile}T")
7588   chmod +x "$ofile"
7589 fi
7590
7591
7592
7593
7594
7595 # This can be used to rebuild libtool when needed
7596 LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
7597
7598 # Always use our own libtool.
7599 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
7600
7601 # Prevent multiple expansion
7602
7603
7604
7605 # test for ln hardlink support
7606 echo $ac_n "checking whether ln works""... $ac_c" 1>&6
7607 echo "configure:7608: checking whether ln works" >&5
7608 if eval "test \"\${ol_cv_prog_LN_H+set}\" = set"; then
7609   echo $ac_n "(cached) $ac_c" 1>&6
7610 else
7611   rm -f conftest.src conftest.dst
7612 echo "conftest" > conftest.src
7613 if ln conftest.src conftest.dst 2>/dev/null
7614 then
7615   ol_cv_prog_LN_H="ln"
7616 else
7617   ol_cv_prog_LN_H="cp"
7618 fi
7619 rm -f conftest.src conftest.dst
7620
7621 fi
7622 LN_H="$ol_cv_prog_LN_H"
7623 if test "$ol_cv_prog_LN_H" = "ln"; then
7624         echo "$ac_t""yes" 1>&6
7625 else
7626         echo "$ac_t""no" 1>&6
7627 fi
7628
7629 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
7630 echo "configure:7631: checking whether ln -s works" >&5
7631 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
7632   echo $ac_n "(cached) $ac_c" 1>&6
7633 else
7634   rm -f conftestdata
7635 if ln -s X conftestdata 2>/dev/null
7636 then
7637   rm -f conftestdata
7638   ac_cv_prog_LN_S="ln -s"
7639 else
7640   ac_cv_prog_LN_S=ln
7641 fi
7642 fi
7643 LN_S="$ac_cv_prog_LN_S"
7644 if test "$ac_cv_prog_LN_S" = "ln -s"; then
7645   echo "$ac_t""yes" 1>&6
7646 else
7647   echo "$ac_t""no" 1>&6
7648 fi
7649
7650
7651 ol_link_perl=no
7652 if test $ol_enable_perl != no ; then
7653         # Extract the first word of "perl", so it can be a program name with args.
7654 set dummy perl; ac_word=$2
7655 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
7656 echo "configure:7657: checking for $ac_word" >&5
7657 if eval "test \"\${ac_cv_path_PERLBIN+set}\" = set"; then
7658   echo $ac_n "(cached) $ac_c" 1>&6
7659 else
7660   case "$PERLBIN" in
7661   /*)
7662   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a path.
7663   ;;
7664   ?:/*)
7665   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a dos path.
7666   ;;
7667   *)
7668   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
7669   ac_dummy="$PATH"
7670   for ac_dir in $ac_dummy; do 
7671     test -z "$ac_dir" && ac_dir=.
7672     if test -f $ac_dir/$ac_word; then
7673       ac_cv_path_PERLBIN="$ac_dir/$ac_word"
7674       break
7675     fi
7676   done
7677   IFS="$ac_save_ifs"
7678   test -z "$ac_cv_path_PERLBIN" && ac_cv_path_PERLBIN="/usr/bin/perl"
7679   ;;
7680 esac
7681 fi
7682 PERLBIN="$ac_cv_path_PERLBIN"
7683 if test -n "$PERLBIN"; then
7684   echo "$ac_t""$PERLBIN" 1>&6
7685 else
7686   echo "$ac_t""no" 1>&6
7687 fi
7688
7689
7690         if test "no$PERLBIN" = "no" ; then
7691                 if test $ol_enable_perl = yes ; then
7692                         { echo "configure: error: could not locate perl" 1>&2; exit 1; }
7693                 fi
7694
7695         else
7696                 PERL_CPPFLAGS="`$PERLBIN -MExtUtils::Embed -e ccopts`"
7697                 PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e 's/ -lc / /' -e 's/ -lc$//'`"
7698
7699                 if test x"$ol_enable_perl" = "xyes" ; then
7700                         SLAPD_PERL_LDFLAGS="$PERL_LDFLAGS"
7701                 else
7702                         MOD_PERL_LDFLAGS="$PERL_LDFLAGS"
7703                 fi
7704                                 ol_link_perl=yes
7705         fi
7706 fi
7707
7708 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
7709 echo "configure:7710: checking how to run the C preprocessor" >&5
7710 # On Suns, sometimes $CPP names a directory.
7711 if test -n "$CPP" && test -d "$CPP"; then
7712   CPP=
7713 fi
7714 if test -z "$CPP"; then
7715 if eval "test \"\${ac_cv_prog_CPP+set}\" = set"; then
7716   echo $ac_n "(cached) $ac_c" 1>&6
7717 else
7718     # This must be in double quotes, not single quotes, because CPP may get
7719   # substituted into the Makefile and "${CC-cc}" will confuse make.
7720   CPP="${CC-cc} -E"
7721   # On the NeXT, cc -E runs the code through the compiler's parser,
7722   # not just through cpp.
7723   cat > conftest.$ac_ext <<EOF
7724 #line 7725 "configure"
7725 #include "confdefs.h"
7726 #include <assert.h>
7727 Syntax Error
7728 EOF
7729 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7730 { (eval echo configure:7731: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7731 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7732 if test -z "$ac_err"; then
7733   :
7734 else
7735   echo "$ac_err" >&5
7736   echo "configure: failed program was:" >&5
7737   cat conftest.$ac_ext >&5
7738   rm -rf conftest*
7739   CPP="${CC-cc} -E -traditional-cpp"
7740   cat > conftest.$ac_ext <<EOF
7741 #line 7742 "configure"
7742 #include "confdefs.h"
7743 #include <assert.h>
7744 Syntax Error
7745 EOF
7746 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7747 { (eval echo configure:7748: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7748 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7749 if test -z "$ac_err"; then
7750   :
7751 else
7752   echo "$ac_err" >&5
7753   echo "configure: failed program was:" >&5
7754   cat conftest.$ac_ext >&5
7755   rm -rf conftest*
7756   CPP="${CC-cc} -nologo -E"
7757   cat > conftest.$ac_ext <<EOF
7758 #line 7759 "configure"
7759 #include "confdefs.h"
7760 #include <assert.h>
7761 Syntax Error
7762 EOF
7763 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7764 { (eval echo configure:7765: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7765 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7766 if test -z "$ac_err"; then
7767   :
7768 else
7769   echo "$ac_err" >&5
7770   echo "configure: failed program was:" >&5
7771   cat conftest.$ac_ext >&5
7772   rm -rf conftest*
7773   CPP=/lib/cpp
7774 fi
7775 rm -f conftest*
7776 fi
7777 rm -f conftest*
7778 fi
7779 rm -f conftest*
7780   ac_cv_prog_CPP="$CPP"
7781 fi
7782   CPP="$ac_cv_prog_CPP"
7783 else
7784   ac_cv_prog_CPP="$CPP"
7785 fi
7786 echo "$ac_t""$CPP" 1>&6
7787
7788
7789
7790 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
7791 echo "configure:7792: checking for Cygwin environment" >&5
7792 if eval "test \"\${ac_cv_cygwin+set}\" = set"; then
7793   echo $ac_n "(cached) $ac_c" 1>&6
7794 else
7795   cat > conftest.$ac_ext <<EOF
7796 #line 7797 "configure"
7797 #include "confdefs.h"
7798
7799 int main() {
7800
7801 #ifndef __CYGWIN__
7802 #define __CYGWIN__ __CYGWIN32__
7803 #endif
7804 return __CYGWIN__;
7805 ; return 0; }
7806 EOF
7807 if { (eval echo configure:7808: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7808   rm -rf conftest*
7809   ac_cv_cygwin=yes
7810 else
7811   echo "configure: failed program was:" >&5
7812   cat conftest.$ac_ext >&5
7813   rm -rf conftest*
7814   ac_cv_cygwin=no
7815 fi
7816 rm -f conftest*
7817 fi
7818
7819 echo "$ac_t""$ac_cv_cygwin" 1>&6
7820 CYGWIN=
7821 test "$ac_cv_cygwin" = yes && CYGWIN=yes
7822 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
7823 echo "configure:7824: checking for mingw32 environment" >&5
7824 if eval "test \"\${ac_cv_mingw32+set}\" = set"; then
7825   echo $ac_n "(cached) $ac_c" 1>&6
7826 else
7827   cat > conftest.$ac_ext <<EOF
7828 #line 7829 "configure"
7829 #include "confdefs.h"
7830
7831 int main() {
7832 return __MINGW32__;
7833 ; return 0; }
7834 EOF
7835 if { (eval echo configure:7836: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7836   rm -rf conftest*
7837   ac_cv_mingw32=yes
7838 else
7839   echo "configure: failed program was:" >&5
7840   cat conftest.$ac_ext >&5
7841   rm -rf conftest*
7842   ac_cv_mingw32=no
7843 fi
7844 rm -f conftest*
7845 fi
7846
7847 echo "$ac_t""$ac_cv_mingw32" 1>&6
7848 MINGW32=
7849 test "$ac_cv_mingw32" = yes && MINGW32=yes
7850
7851
7852
7853 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
7854 echo "configure:7855: checking for executable suffix" >&5
7855 if eval "test \"\${ac_cv_exeext+set}\" = set"; then
7856   echo $ac_n "(cached) $ac_c" 1>&6
7857 else
7858   if test "$CYGWIN" = yes || test "$MINGW32" = yes || test "$EMXOS2" = yes; then
7859   ac_cv_exeext=.exe
7860 else
7861   rm -f conftest*
7862   echo 'int main () { return 0; }' > conftest.$ac_ext
7863   ac_cv_exeext=
7864   if { (eval echo configure:7865: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
7865     for file in conftest.*; do
7866       case $file in
7867       *.c | *.C | *.o | *.obj | *.xcoff) ;;
7868       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
7869       esac
7870     done
7871   else
7872     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
7873   fi
7874   rm -f conftest*
7875   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
7876 fi
7877 fi
7878
7879 EXEEXT=""
7880 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
7881 echo "$ac_t""${ac_cv_exeext}" 1>&6
7882 ac_exeext=$EXEEXT
7883
7884 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
7885 echo "configure:7886: checking for object suffix" >&5
7886 if eval "test \"\${ac_cv_objext+set}\" = set"; then
7887   echo $ac_n "(cached) $ac_c" 1>&6
7888 else
7889   rm -f conftest*
7890 echo 'int i = 1;' > conftest.$ac_ext
7891 if { (eval echo configure:7892: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7892   for ac_file in conftest.*; do
7893     case $ac_file in
7894     *.c) ;;
7895     *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
7896     esac
7897   done
7898 else
7899   { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
7900 fi
7901 rm -f conftest*
7902 fi
7903
7904 echo "$ac_t""$ac_cv_objext" 1>&6
7905 OBJEXT=$ac_cv_objext
7906 ac_objext=$ac_cv_objext
7907
7908
7909 cat >> confdefs.h <<EOF
7910 #define EXEEXT "${EXEEXT}"
7911 EOF
7912
7913
7914 echo $ac_n "checking for be_app in -lbe""... $ac_c" 1>&6
7915 echo "configure:7916: checking for be_app in -lbe" >&5
7916 ac_lib_var=`echo be'_'be_app | sed 'y%./+-:%__p__%'`
7917 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
7918   echo $ac_n "(cached) $ac_c" 1>&6
7919 else
7920   ac_save_LIBS="$LIBS"
7921 LIBS="-lbe -lroot -lnet $LIBS"
7922 cat > conftest.$ac_ext <<EOF
7923 #line 7924 "configure"
7924 #include "confdefs.h"
7925 /* Override any gcc2 internal prototype to avoid an error.  */
7926 /* We use char because int might match the return type of a gcc2
7927     builtin and then its argument prototype would still apply.  */
7928 char be_app();
7929
7930 int main() {
7931 be_app()
7932 ; return 0; }
7933 EOF
7934 if { (eval echo configure:7935: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7935   rm -rf conftest*
7936   eval "ac_cv_lib_$ac_lib_var=yes"
7937 else
7938   echo "configure: failed program was:" >&5
7939   cat conftest.$ac_ext >&5
7940   rm -rf conftest*
7941   eval "ac_cv_lib_$ac_lib_var=no"
7942 fi
7943 rm -f conftest*
7944 LIBS="$ac_save_LIBS"
7945
7946 fi
7947 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7948   echo "$ac_t""yes" 1>&6
7949   LIBS="$LIBS -lbe -lroot -lnet"
7950 else
7951   echo "$ac_t""no" 1>&6
7952 :
7953 fi
7954
7955
7956
7957
7958
7959 echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
7960 echo "configure:7961: checking for ${CC-cc} option to accept ANSI C" >&5
7961 if eval "test \"\${am_cv_prog_cc_stdc+set}\" = set"; then
7962   echo $ac_n "(cached) $ac_c" 1>&6
7963 else
7964   am_cv_prog_cc_stdc=no
7965 ac_save_CC="$CC"
7966 # Don't try gcc -ansi; that turns off useful extensions and
7967 # breaks some systems' header files.
7968 # AIX                   -qlanglvl=ansi
7969 # Ultrix and OSF/1      -std1
7970 # HP-UX 10.20 and later -Ae
7971 # HP-UX older versions  -Aa -D_HPUX_SOURCE
7972 # SVR4                  -Xc -D__EXTENSIONS__
7973 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
7974 do
7975   CC="$ac_save_CC $ac_arg"
7976   cat > conftest.$ac_ext <<EOF
7977 #line 7978 "configure"
7978 #include "confdefs.h"
7979 #include <stdarg.h>
7980 #include <stdio.h>
7981 #include <sys/types.h>
7982 #include <sys/stat.h>
7983 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
7984 struct buf { int x; };
7985 FILE * (*rcsopen) (struct buf *, struct stat *, int);
7986 static char *e (p, i)
7987      char **p;
7988      int i;
7989 {
7990   return p[i];
7991 }
7992 static char *f (char * (*g) (char **, int), char **p, ...)
7993 {
7994   char *s;
7995   va_list v;
7996   va_start (v,p);
7997   s = g (p, va_arg (v,int));
7998   va_end (v);
7999   return s;
8000 }
8001 int test (int i, double x);
8002 struct s1 {int (*f) (int a);};
8003 struct s2 {int (*f) (double a);};
8004 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
8005 int argc;
8006 char **argv;
8007
8008 int main() {
8009
8010 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
8011
8012 ; return 0; }
8013 EOF
8014 if { (eval echo configure:8015: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8015   rm -rf conftest*
8016   am_cv_prog_cc_stdc="$ac_arg"; break
8017 else
8018   echo "configure: failed program was:" >&5
8019   cat conftest.$ac_ext >&5
8020 fi
8021 rm -f conftest*
8022 done
8023 CC="$ac_save_CC"
8024
8025 fi
8026
8027 if test -z "$am_cv_prog_cc_stdc"; then
8028   echo "$ac_t""none needed" 1>&6
8029 else
8030   echo "$ac_t""$am_cv_prog_cc_stdc" 1>&6
8031 fi
8032 case "x$am_cv_prog_cc_stdc" in
8033   x|xno) ;;
8034   *) CC="$CC $am_cv_prog_cc_stdc" ;;
8035 esac
8036
8037 if test "X${am_cv_prog_cc_stdc}" = "Xno" ; then
8038         { echo "configure: error: OpenLDAP requires compiler to support STDC constructs." 1>&2; exit 1; }
8039 fi
8040
8041 # test for make depend flag
8042 OL_MKDEP=
8043 OL_MKDEP_FLAGS=
8044 if test -z "${MKDEP}"; then
8045         OL_MKDEP="${CC-cc}"
8046         if test -z "${MKDEP_FLAGS}"; then
8047                 echo $ac_n "checking for ${OL_MKDEP} depend flag""... $ac_c" 1>&6
8048 echo "configure:8049: checking for ${OL_MKDEP} depend flag" >&5
8049 if eval "test \"\${ol_cv_mkdep+set}\" = set"; then
8050   echo $ac_n "(cached) $ac_c" 1>&6
8051 else
8052   
8053                         ol_cv_mkdep=no
8054                         for flag in "-M" "-xM"; do
8055                                 cat > conftest.c <<EOF
8056  noCode;
8057 EOF
8058                                 if { ac_try='$OL_MKDEP $flag conftest.c'; { (eval echo configure:8059: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } \
8059                                         | egrep '^conftest\.'"${ac_objext}" >/dev/null 2>&1
8060                                 then
8061                                         if test ! -f conftest."${ac_object}" ; then
8062                                                 ol_cv_mkdep=$flag
8063                                                 OL_MKDEP_FLAGS="$flag"
8064                                                 break
8065                                         fi
8066                                 fi
8067                         done
8068                         rm -f conftest*
8069                 
8070 fi
8071
8072 echo "$ac_t""$ol_cv_mkdep" 1>&6
8073         else
8074                 cc_cv_mkdep=yes
8075                 OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
8076         fi
8077 else
8078         cc_cv_mkdep=yes
8079         OL_MKDEP="${MKDEP}"
8080         OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
8081 fi
8082
8083
8084
8085 if test "${ol_cv_mkdep}" = no ; then
8086         # this will soon become an error
8087         echo "configure: warning: do not know how to generate dependencies" 1>&2
8088 fi
8089
8090 echo $ac_n "checking for afopen in -ls""... $ac_c" 1>&6
8091 echo "configure:8092: checking for afopen in -ls" >&5
8092 ac_lib_var=`echo s'_'afopen | sed 'y%./+-:%__p__%'`
8093 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8094   echo $ac_n "(cached) $ac_c" 1>&6
8095 else
8096   ac_save_LIBS="$LIBS"
8097 LIBS="-ls  $LIBS"
8098 cat > conftest.$ac_ext <<EOF
8099 #line 8100 "configure"
8100 #include "confdefs.h"
8101 /* Override any gcc2 internal prototype to avoid an error.  */
8102 /* We use char because int might match the return type of a gcc2
8103     builtin and then its argument prototype would still apply.  */
8104 char afopen();
8105
8106 int main() {
8107 afopen()
8108 ; return 0; }
8109 EOF
8110 if { (eval echo configure:8111: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8111   rm -rf conftest*
8112   eval "ac_cv_lib_$ac_lib_var=yes"
8113 else
8114   echo "configure: failed program was:" >&5
8115   cat conftest.$ac_ext >&5
8116   rm -rf conftest*
8117   eval "ac_cv_lib_$ac_lib_var=no"
8118 fi
8119 rm -f conftest*
8120 LIBS="$ac_save_LIBS"
8121
8122 fi
8123 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8124   echo "$ac_t""yes" 1>&6
8125   
8126         AUTH_LIBS=-ls
8127         cat >> confdefs.h <<\EOF
8128 #define HAVE_AIX_SECURITY 1
8129 EOF
8130
8131
8132 else
8133   echo "$ac_t""no" 1>&6
8134 fi
8135
8136
8137 case "$target" in
8138 *-ibm-openedition)
8139         ac_cv_func_getopt=no
8140         cat >> confdefs.h <<\EOF
8141 #define BOTH_STRINGS_H 1
8142 EOF
8143
8144         ;;
8145 esac
8146
8147 ol_link_modules=no
8148 if test $ol_enable_modules != no ; then
8149         for ac_hdr in ltdl.h
8150 do
8151 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8152 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8153 echo "configure:8154: checking for $ac_hdr" >&5
8154 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
8155   echo $ac_n "(cached) $ac_c" 1>&6
8156 else
8157   cat > conftest.$ac_ext <<EOF
8158 #line 8159 "configure"
8159 #include "confdefs.h"
8160 #include <$ac_hdr>
8161 EOF
8162 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8163 { (eval echo configure:8164: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8164 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8165 if test -z "$ac_err"; then
8166   rm -rf conftest*
8167   eval "ac_cv_header_$ac_safe=yes"
8168 else
8169   echo "$ac_err" >&5
8170   echo "configure: failed program was:" >&5
8171   cat conftest.$ac_ext >&5
8172   rm -rf conftest*
8173   eval "ac_cv_header_$ac_safe=no"
8174 fi
8175 rm -f conftest*
8176 fi
8177 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8178   echo "$ac_t""yes" 1>&6
8179     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8180   cat >> confdefs.h <<EOF
8181 #define $ac_tr_hdr 1
8182 EOF
8183  
8184 else
8185   echo "$ac_t""no" 1>&6
8186 fi
8187 done
8188
8189
8190         if test $ac_cv_header_ltdl_h = no ; then
8191                 { echo "configure: error: could not locate libtool ltdl.h" 1>&2; exit 1; }
8192         fi
8193
8194         echo $ac_n "checking for lt_dlinit in -lltdl""... $ac_c" 1>&6
8195 echo "configure:8196: checking for lt_dlinit in -lltdl" >&5
8196 ac_lib_var=`echo ltdl'_'lt_dlinit | sed 'y%./+-:%__p__%'`
8197 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8198   echo $ac_n "(cached) $ac_c" 1>&6
8199 else
8200   ac_save_LIBS="$LIBS"
8201 LIBS="-lltdl  $LIBS"
8202 cat > conftest.$ac_ext <<EOF
8203 #line 8204 "configure"
8204 #include "confdefs.h"
8205 /* Override any gcc2 internal prototype to avoid an error.  */
8206 /* We use char because int might match the return type of a gcc2
8207     builtin and then its argument prototype would still apply.  */
8208 char lt_dlinit();
8209
8210 int main() {
8211 lt_dlinit()
8212 ; return 0; }
8213 EOF
8214 if { (eval echo configure:8215: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8215   rm -rf conftest*
8216   eval "ac_cv_lib_$ac_lib_var=yes"
8217 else
8218   echo "configure: failed program was:" >&5
8219   cat conftest.$ac_ext >&5
8220   rm -rf conftest*
8221   eval "ac_cv_lib_$ac_lib_var=no"
8222 fi
8223 rm -f conftest*
8224 LIBS="$ac_save_LIBS"
8225
8226 fi
8227 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8228   echo "$ac_t""yes" 1>&6
8229   
8230                 MODULES_LIBS=-lltdl
8231                 cat >> confdefs.h <<\EOF
8232 #define HAVE_LIBLTDL 1
8233 EOF
8234
8235         
8236 else
8237   echo "$ac_t""no" 1>&6
8238 fi
8239
8240
8241         if test "$ac_cv_lib_ltdl_lt_dlinit" = no ; then
8242                 { echo "configure: error: could not locate libtool -lltdl" 1>&2; exit 1; }
8243         fi
8244         ol_link_modules=yes
8245
8246 else
8247         for i in $Backends; do
8248                 eval "ol_tmp=\$ol_enable_$i"
8249                 if test $ol_tmp = mod ; then
8250                         echo "configure: warning: building static $i backend" 1>&2
8251                         eval "ol_enable_$i=yes"
8252                 fi
8253         done
8254         for i in $Overlays; do
8255                 eval "ol_tmp=\$ol_enable_$i"
8256                 if test $ol_tmp = mod ; then
8257                         echo "configure: warning: building static $i overlay" 1>&2
8258                         eval "ol_enable_$i=yes"
8259                 fi
8260         done
8261 fi
8262
8263 # test for EBCDIC
8264 echo $ac_n "checking for EBCDIC""... $ac_c" 1>&6
8265 echo "configure:8266: checking for EBCDIC" >&5
8266 if eval "test \"\${ol_cv_cpp_ebcdic+set}\" = set"; then
8267   echo $ac_n "(cached) $ac_c" 1>&6
8268 else
8269   
8270         cat > conftest.$ac_ext <<EOF
8271 #line 8272 "configure"
8272 #include "confdefs.h"
8273
8274 #if !('M' == 0xd4)
8275 #include <__ASCII__/generate_error.h>
8276 #endif
8277
8278 EOF
8279 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8280 { (eval echo configure:8281: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8281 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8282 if test -z "$ac_err"; then
8283   rm -rf conftest*
8284   ol_cv_cpp_ebcdic=yes
8285 else
8286   echo "$ac_err" >&5
8287   echo "configure: failed program was:" >&5
8288   cat conftest.$ac_ext >&5
8289   rm -rf conftest*
8290   ol_cv_cpp_ebcdic=no
8291 fi
8292 rm -f conftest*
8293 fi
8294
8295 echo "$ac_t""$ol_cv_cpp_ebcdic" 1>&6
8296 if test $ol_cv_cpp_ebcdic = yes ; then
8297         cat >> confdefs.h <<\EOF
8298 #define HAVE_EBCDIC 1
8299 EOF
8300
8301 fi
8302
8303 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
8304 echo "configure:8305: checking for ANSI C header files" >&5
8305 if eval "test \"\${ol_cv_header_stdc+set}\" = set"; then
8306   echo $ac_n "(cached) $ac_c" 1>&6
8307 else
8308   cat > conftest.$ac_ext <<EOF
8309 #line 8310 "configure"
8310 #include "confdefs.h"
8311 #include <stdlib.h>
8312 #include <stdarg.h>
8313 #include <string.h>
8314 #include <float.h>
8315 EOF
8316 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8317 { (eval echo configure:8318: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8318 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8319 if test -z "$ac_err"; then
8320   rm -rf conftest*
8321   ol_cv_header_stdc=yes
8322 else
8323   echo "$ac_err" >&5
8324   echo "configure: failed program was:" >&5
8325   cat conftest.$ac_ext >&5
8326   rm -rf conftest*
8327   ol_cv_header_stdc=no
8328 fi
8329 rm -f conftest*
8330
8331 if test $ol_cv_header_stdc = yes; then
8332   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
8333 cat > conftest.$ac_ext <<EOF
8334 #line 8335 "configure"
8335 #include "confdefs.h"
8336 #include <string.h>
8337 EOF
8338 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8339   egrep "memchr" >/dev/null 2>&1; then
8340   :
8341 else
8342   rm -rf conftest*
8343   ol_cv_header_stdc=no
8344 fi
8345 rm -f conftest*
8346
8347 fi
8348
8349 if test $ol_cv_header_stdc = yes; then
8350   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
8351 cat > conftest.$ac_ext <<EOF
8352 #line 8353 "configure"
8353 #include "confdefs.h"
8354 #include <stdlib.h>
8355 EOF
8356 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8357   egrep "free" >/dev/null 2>&1; then
8358   :
8359 else
8360   rm -rf conftest*
8361   ol_cv_header_stdc=no
8362 fi
8363 rm -f conftest*
8364
8365 fi
8366
8367 if test $ol_cv_header_stdc = yes; then
8368   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
8369 if test "$cross_compiling" = yes; then
8370   :
8371 else
8372   cat > conftest.$ac_ext <<EOF
8373 #line 8374 "configure"
8374 #include "confdefs.h"
8375 #include <ctype.h>
8376 #ifndef HAVE_EBCDIC
8377 #       define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
8378 #       define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
8379 #else
8380 #       define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
8381                 || ('j' <= (c) && (c) <= 'r') \
8382                 || ('s' <= (c) && (c) <= 'z'))
8383 #       define TOUPPER(c)       (ISLOWER(c) ? ((c) | 0x40) : (c))
8384 #endif
8385 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
8386 int main () { int i; for (i = 0; i < 256; i++)
8387 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
8388 exit (0); }
8389
8390 EOF
8391 if { (eval echo configure:8392: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8392 then
8393   :
8394 else
8395   echo "configure: failed program was:" >&5
8396   cat conftest.$ac_ext >&5
8397   rm -fr conftest*
8398   ol_cv_header_stdc=no
8399 fi
8400 rm -fr conftest*
8401 fi
8402
8403 fi
8404 fi
8405
8406 echo "$ac_t""$ol_cv_header_stdc" 1>&6
8407 if test $ol_cv_header_stdc = yes; then
8408   cat >> confdefs.h <<\EOF
8409 #define STDC_HEADERS 1
8410 EOF
8411
8412 fi
8413 ac_cv_header_stdc=disable
8414
8415
8416 if test $ol_cv_header_stdc != yes; then
8417         echo "configure: warning: could not locate Standard C compliant headers" 1>&2
8418 fi
8419
8420 ac_header_dirent=no
8421 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
8422 do
8423 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8424 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
8425 echo "configure:8426: checking for $ac_hdr that defines DIR" >&5
8426 if eval "test \"\${ac_cv_header_dirent_$ac_safe+set}\" = set"; then
8427   echo $ac_n "(cached) $ac_c" 1>&6
8428 else
8429   cat > conftest.$ac_ext <<EOF
8430 #line 8431 "configure"
8431 #include "confdefs.h"
8432 #include <sys/types.h>
8433 #include <$ac_hdr>
8434 int main() {
8435 DIR *dirp = 0;
8436 ; return 0; }
8437 EOF
8438 if { (eval echo configure:8439: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8439   rm -rf conftest*
8440   eval "ac_cv_header_dirent_$ac_safe=yes"
8441 else
8442   echo "configure: failed program was:" >&5
8443   cat conftest.$ac_ext >&5
8444   rm -rf conftest*
8445   eval "ac_cv_header_dirent_$ac_safe=no"
8446 fi
8447 rm -f conftest*
8448 fi
8449 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
8450   echo "$ac_t""yes" 1>&6
8451     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8452   cat >> confdefs.h <<EOF
8453 #define $ac_tr_hdr 1
8454 EOF
8455  ac_header_dirent=$ac_hdr; break
8456 else
8457   echo "$ac_t""no" 1>&6
8458 fi
8459 done
8460 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
8461 if test $ac_header_dirent = dirent.h; then
8462 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
8463 echo "configure:8464: checking for opendir in -ldir" >&5
8464 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-:%__p__%'`
8465 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8466   echo $ac_n "(cached) $ac_c" 1>&6
8467 else
8468   ac_save_LIBS="$LIBS"
8469 LIBS="-ldir  $LIBS"
8470 cat > conftest.$ac_ext <<EOF
8471 #line 8472 "configure"
8472 #include "confdefs.h"
8473 /* Override any gcc2 internal prototype to avoid an error.  */
8474 /* We use char because int might match the return type of a gcc2
8475     builtin and then its argument prototype would still apply.  */
8476 char opendir();
8477
8478 int main() {
8479 opendir()
8480 ; return 0; }
8481 EOF
8482 if { (eval echo configure:8483: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8483   rm -rf conftest*
8484   eval "ac_cv_lib_$ac_lib_var=yes"
8485 else
8486   echo "configure: failed program was:" >&5
8487   cat conftest.$ac_ext >&5
8488   rm -rf conftest*
8489   eval "ac_cv_lib_$ac_lib_var=no"
8490 fi
8491 rm -f conftest*
8492 LIBS="$ac_save_LIBS"
8493
8494 fi
8495 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8496   echo "$ac_t""yes" 1>&6
8497   LIBS="$LIBS -ldir"
8498 else
8499   echo "$ac_t""no" 1>&6
8500 fi
8501
8502 else
8503 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
8504 echo "configure:8505: checking for opendir in -lx" >&5
8505 ac_lib_var=`echo x'_'opendir | sed 'y%./+-:%__p__%'`
8506 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8507   echo $ac_n "(cached) $ac_c" 1>&6
8508 else
8509   ac_save_LIBS="$LIBS"
8510 LIBS="-lx  $LIBS"
8511 cat > conftest.$ac_ext <<EOF
8512 #line 8513 "configure"
8513 #include "confdefs.h"
8514 /* Override any gcc2 internal prototype to avoid an error.  */
8515 /* We use char because int might match the return type of a gcc2
8516     builtin and then its argument prototype would still apply.  */
8517 char opendir();
8518
8519 int main() {
8520 opendir()
8521 ; return 0; }
8522 EOF
8523 if { (eval echo configure:8524: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8524   rm -rf conftest*
8525   eval "ac_cv_lib_$ac_lib_var=yes"
8526 else
8527   echo "configure: failed program was:" >&5
8528   cat conftest.$ac_ext >&5
8529   rm -rf conftest*
8530   eval "ac_cv_lib_$ac_lib_var=no"
8531 fi
8532 rm -f conftest*
8533 LIBS="$ac_save_LIBS"
8534
8535 fi
8536 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8537   echo "$ac_t""yes" 1>&6
8538   LIBS="$LIBS -lx"
8539 else
8540   echo "$ac_t""no" 1>&6
8541 fi
8542
8543 fi
8544
8545 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
8546 echo "configure:8547: checking for sys/wait.h that is POSIX.1 compatible" >&5
8547 if eval "test \"\${ac_cv_header_sys_wait_h+set}\" = set"; then
8548   echo $ac_n "(cached) $ac_c" 1>&6
8549 else
8550   cat > conftest.$ac_ext <<EOF
8551 #line 8552 "configure"
8552 #include "confdefs.h"
8553 #include <sys/types.h>
8554 #include <sys/wait.h>
8555 #ifndef WEXITSTATUS
8556 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
8557 #endif
8558 #ifndef WIFEXITED
8559 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
8560 #endif
8561 int main() {
8562 int s;
8563 wait (&s);
8564 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
8565 ; return 0; }
8566 EOF
8567 if { (eval echo configure:8568: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8568   rm -rf conftest*
8569   ac_cv_header_sys_wait_h=yes
8570 else
8571   echo "configure: failed program was:" >&5
8572   cat conftest.$ac_ext >&5
8573   rm -rf conftest*
8574   ac_cv_header_sys_wait_h=no
8575 fi
8576 rm -f conftest*
8577 fi
8578
8579 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
8580 if test $ac_cv_header_sys_wait_h = yes; then
8581   cat >> confdefs.h <<\EOF
8582 #define HAVE_SYS_WAIT_H 1
8583 EOF
8584
8585 fi
8586
8587 echo $ac_n "checking POSIX termios""... $ac_c" 1>&6
8588 echo "configure:8589: checking POSIX termios" >&5
8589 if eval "test \"\${am_cv_sys_posix_termios+set}\" = set"; then
8590   echo $ac_n "(cached) $ac_c" 1>&6
8591 else
8592   cat > conftest.$ac_ext <<EOF
8593 #line 8594 "configure"
8594 #include "confdefs.h"
8595 #include <sys/types.h>
8596 #include <unistd.h>
8597 #include <termios.h>
8598 int main() {
8599 /* SunOS 4.0.3 has termios.h but not the library calls.  */
8600    tcgetattr(0, 0);
8601 ; return 0; }
8602 EOF
8603 if { (eval echo configure:8604: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8604   rm -rf conftest*
8605   am_cv_sys_posix_termios=yes
8606 else
8607   echo "configure: failed program was:" >&5
8608   cat conftest.$ac_ext >&5
8609   rm -rf conftest*
8610   am_cv_sys_posix_termios=no
8611 fi
8612 rm -f conftest*
8613 fi
8614
8615 echo "$ac_t""$am_cv_sys_posix_termios" 1>&6
8616
8617
8618  echo $ac_n "checking whether use of TIOCGWINSZ requires sys/ioctl.h""... $ac_c" 1>&6
8619 echo "configure:8620: checking whether use of TIOCGWINSZ requires sys/ioctl.h" >&5
8620 if eval "test \"\${am_cv_sys_tiocgwinsz_needs_sys_ioctl_h+set}\" = set"; then
8621   echo $ac_n "(cached) $ac_c" 1>&6
8622 else
8623   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=no
8624
8625   gwinsz_in_termios_h=no
8626   if test $am_cv_sys_posix_termios = yes; then
8627     cat > conftest.$ac_ext <<EOF
8628 #line 8629 "configure"
8629 #include "confdefs.h"
8630 #include <sys/types.h>
8631 #     include <termios.h>
8632 #     ifdef TIOCGWINSZ
8633         yes
8634 #     endif
8635     
8636 EOF
8637 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8638   egrep "yes" >/dev/null 2>&1; then
8639   rm -rf conftest*
8640   gwinsz_in_termios_h=yes
8641 fi
8642 rm -f conftest*
8643
8644   fi
8645
8646   if test $gwinsz_in_termios_h = no; then
8647     cat > conftest.$ac_ext <<EOF
8648 #line 8649 "configure"
8649 #include "confdefs.h"
8650 #include <sys/types.h>
8651 #     include <sys/ioctl.h>
8652 #     ifdef TIOCGWINSZ
8653         yes
8654 #     endif
8655     
8656 EOF
8657 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8658   egrep "yes" >/dev/null 2>&1; then
8659   rm -rf conftest*
8660   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=yes
8661 fi
8662 rm -f conftest*
8663
8664   fi
8665   
8666 fi
8667
8668 echo "$ac_t""$am_cv_sys_tiocgwinsz_needs_sys_ioctl_h" 1>&6
8669   if test $am_cv_sys_tiocgwinsz_needs_sys_ioctl_h = yes; then
8670     cat >> confdefs.h <<\EOF
8671 #define GWINSZ_IN_SYS_IOCTL 1
8672 EOF
8673
8674   fi
8675
8676 if test $am_cv_sys_posix_termios = yes ; then
8677         cat >> confdefs.h <<\EOF
8678 #define HAVE_POSIX_TERMIOS 1
8679 EOF
8680
8681 fi
8682
8683 for ac_hdr in \
8684         arpa/inet.h             \
8685         arpa/nameser.h  \
8686         assert.h                \
8687         bits/types.h    \
8688         conio.h                 \
8689         crypt.h                 \
8690         direct.h                \
8691         errno.h                 \
8692         fcntl.h                 \
8693         filio.h                 \
8694         getopt.h                \
8695         grp.h                   \
8696         io.h                    \
8697         libutil.h               \
8698         limits.h                \
8699         locale.h                \
8700         netinet/tcp.h   \
8701         malloc.h                \
8702         memory.h                \
8703         psap.h                  \
8704         pwd.h                   \
8705         process.h               \
8706         resolv.h                \
8707         sgtty.h                 \
8708         shadow.h                \
8709         stddef.h                \
8710         string.h                \
8711         strings.h               \
8712         sysexits.h              \
8713         sys/file.h              \
8714         sys/filio.h             \
8715         sys/errno.h             \
8716         sys/ioctl.h             \
8717         sys/param.h             \
8718         sys/resource.h  \
8719         sys/select.h    \
8720         sys/socket.h    \
8721         sys/stat.h              \
8722         sys/syslog.h    \
8723         sys/time.h              \
8724         sys/types.h             \
8725         sys/ucred.h             \
8726         sys/uio.h               \
8727         syslog.h                \
8728         termios.h               \
8729         unistd.h                \
8730         winsock.h               \
8731         winsock2.h              \
8732
8733 do
8734 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8735 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8736 echo "configure:8737: checking for $ac_hdr" >&5
8737 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
8738   echo $ac_n "(cached) $ac_c" 1>&6
8739 else
8740   cat > conftest.$ac_ext <<EOF
8741 #line 8742 "configure"
8742 #include "confdefs.h"
8743 #include <$ac_hdr>
8744 EOF
8745 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8746 { (eval echo configure:8747: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8747 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8748 if test -z "$ac_err"; then
8749   rm -rf conftest*
8750   eval "ac_cv_header_$ac_safe=yes"
8751 else
8752   echo "$ac_err" >&5
8753   echo "configure: failed program was:" >&5
8754   cat conftest.$ac_ext >&5
8755   rm -rf conftest*
8756   eval "ac_cv_header_$ac_safe=no"
8757 fi
8758 rm -f conftest*
8759 fi
8760 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8761   echo "$ac_t""yes" 1>&6
8762     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8763   cat >> confdefs.h <<EOF
8764 #define $ac_tr_hdr 1
8765 EOF
8766  
8767 else
8768   echo "$ac_t""no" 1>&6
8769 fi
8770 done
8771
8772
8773
8774
8775 echo $ac_n "checking for sigset in -lV3""... $ac_c" 1>&6
8776 echo "configure:8777: checking for sigset in -lV3" >&5
8777 ac_lib_var=`echo V3'_'sigset | sed 'y%./+-:%__p__%'`
8778 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8779   echo $ac_n "(cached) $ac_c" 1>&6
8780 else
8781   ac_save_LIBS="$LIBS"
8782 LIBS="-lV3  $LIBS"
8783 cat > conftest.$ac_ext <<EOF
8784 #line 8785 "configure"
8785 #include "confdefs.h"
8786 /* Override any gcc2 internal prototype to avoid an error.  */
8787 /* We use char because int might match the return type of a gcc2
8788     builtin and then its argument prototype would still apply.  */
8789 char sigset();
8790
8791 int main() {
8792 sigset()
8793 ; return 0; }
8794 EOF
8795 if { (eval echo configure:8796: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8796   rm -rf conftest*
8797   eval "ac_cv_lib_$ac_lib_var=yes"
8798 else
8799   echo "configure: failed program was:" >&5
8800   cat conftest.$ac_ext >&5
8801   rm -rf conftest*
8802   eval "ac_cv_lib_$ac_lib_var=no"
8803 fi
8804 rm -f conftest*
8805 LIBS="$ac_save_LIBS"
8806
8807 fi
8808 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8809   echo "$ac_t""yes" 1>&6
8810     ac_tr_lib=HAVE_LIB`echo V3 | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8811     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8812   cat >> confdefs.h <<EOF
8813 #define $ac_tr_lib 1
8814 EOF
8815
8816   LIBS="-lV3 $LIBS"
8817
8818 else
8819   echo "$ac_t""no" 1>&6
8820 fi
8821
8822
8823 if test "$ac_cv_header_winsock_h" = yes; then
8824 echo $ac_n "checking for winsock""... $ac_c" 1>&6
8825 echo "configure:8826: checking for winsock" >&5
8826 if eval "test \"\${ol_cv_winsock+set}\" = set"; then
8827   echo $ac_n "(cached) $ac_c" 1>&6
8828 else
8829   save_LIBS="$LIBS"
8830 for curlib in ws2_32 wsock32; do
8831         LIBS="$LIBS -l$curlib"
8832         cat > conftest.$ac_ext <<EOF
8833 #line 8834 "configure"
8834 #include "confdefs.h"
8835 #include <winsock.h>
8836                         
8837 int main() {
8838
8839                         socket(0,0,0);
8840                         select(0,NULL,NULL,NULL,NULL);
8841                         closesocket(0);
8842                         gethostname(NULL,0);
8843                         
8844 ; return 0; }
8845 EOF
8846 if { (eval echo configure:8847: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8847   rm -rf conftest*
8848   ol_cv_winsock=yes
8849 else
8850   echo "configure: failed program was:" >&5
8851   cat conftest.$ac_ext >&5
8852   rm -rf conftest*
8853   ol_cv_winsock=no
8854 fi
8855 rm -f conftest*
8856
8857         if test $ol_cv_winsock = yes; then
8858                 cat >> confdefs.h <<\EOF
8859 #define HAVE_WINSOCK 1
8860 EOF
8861
8862                 ac_cv_func_socket=yes
8863                 ac_cv_func_select=yes
8864                 ac_cv_func_closesocket=yes
8865                 ac_cv_func_gethostname=yes
8866                 if test $curlib = ws2_32; then
8867                         ol_cv_winsock=winsock2
8868                         cat >> confdefs.h <<\EOF
8869 #define HAVE_WINSOCK2 1
8870 EOF
8871
8872                 fi
8873                 break
8874         fi
8875         LIBS="$save_LIBS"
8876 done
8877 fi
8878
8879 echo "$ac_t""$ol_cv_winsock" 1>&6
8880 fi
8881
8882
8883 echo $ac_n "checking for socket""... $ac_c" 1>&6
8884 echo "configure:8885: checking for socket" >&5
8885 if eval "test \"\${ac_cv_func_socket+set}\" = set"; then
8886   echo $ac_n "(cached) $ac_c" 1>&6
8887 else
8888   cat > conftest.$ac_ext <<EOF
8889 #line 8890 "configure"
8890 #include "confdefs.h"
8891 /* System header to define __stub macros and hopefully few prototypes,
8892     which can conflict with char socket(); below.  */
8893 #include <assert.h>
8894 /* Override any gcc2 internal prototype to avoid an error.  */
8895 /* We use char because int might match the return type of a gcc2
8896     builtin and then its argument prototype would still apply.  */
8897 char socket();
8898 char (*f)();
8899
8900 int main() {
8901
8902 /* The GNU C library defines this for functions which it implements
8903     to always fail with ENOSYS.  Some functions are actually named
8904     something starting with __ and the normal name is an alias.  */
8905 #if defined (__stub_socket) || defined (__stub___socket)
8906 choke me
8907 #else
8908 f = socket;
8909 #endif
8910
8911 ; return 0; }
8912 EOF
8913 if { (eval echo configure:8914: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8914   rm -rf conftest*
8915   eval "ac_cv_func_socket=yes"
8916 else
8917   echo "configure: failed program was:" >&5
8918   cat conftest.$ac_ext >&5
8919   rm -rf conftest*
8920   eval "ac_cv_func_socket=no"
8921 fi
8922 rm -f conftest*
8923 fi
8924
8925 if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
8926   echo "$ac_t""yes" 1>&6
8927   :
8928 else
8929   echo "$ac_t""no" 1>&6
8930         
8931         echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6
8932 echo "configure:8933: checking for main in -lsocket" >&5
8933 ac_lib_var=`echo socket'_'main | sed 'y%./+-:%__p__%'`
8934 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8935   echo $ac_n "(cached) $ac_c" 1>&6
8936 else
8937   ac_save_LIBS="$LIBS"
8938 LIBS="-lsocket  $LIBS"
8939 cat > conftest.$ac_ext <<EOF
8940 #line 8941 "configure"
8941 #include "confdefs.h"
8942
8943 int main() {
8944 main()
8945 ; return 0; }
8946 EOF
8947 if { (eval echo configure:8948: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8948   rm -rf conftest*
8949   eval "ac_cv_lib_$ac_lib_var=yes"
8950 else
8951   echo "configure: failed program was:" >&5
8952   cat conftest.$ac_ext >&5
8953   rm -rf conftest*
8954   eval "ac_cv_lib_$ac_lib_var=no"
8955 fi
8956 rm -f conftest*
8957 LIBS="$ac_save_LIBS"
8958
8959 fi
8960 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8961   echo "$ac_t""yes" 1>&6
8962     ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8963     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8964   cat >> confdefs.h <<EOF
8965 #define $ac_tr_lib 1
8966 EOF
8967
8968   LIBS="-lsocket $LIBS"
8969
8970 else
8971   echo "$ac_t""no" 1>&6
8972 fi
8973
8974         echo $ac_n "checking for main in -lnet""... $ac_c" 1>&6
8975 echo "configure:8976: checking for main in -lnet" >&5
8976 ac_lib_var=`echo net'_'main | sed 'y%./+-:%__p__%'`
8977 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8978   echo $ac_n "(cached) $ac_c" 1>&6
8979 else
8980   ac_save_LIBS="$LIBS"
8981 LIBS="-lnet  $LIBS"
8982 cat > conftest.$ac_ext <<EOF
8983 #line 8984 "configure"
8984 #include "confdefs.h"
8985
8986 int main() {
8987 main()
8988 ; return 0; }
8989 EOF
8990 if { (eval echo configure:8991: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8991   rm -rf conftest*
8992   eval "ac_cv_lib_$ac_lib_var=yes"
8993 else
8994   echo "configure: failed program was:" >&5
8995   cat conftest.$ac_ext >&5
8996   rm -rf conftest*
8997   eval "ac_cv_lib_$ac_lib_var=no"
8998 fi
8999 rm -f conftest*
9000 LIBS="$ac_save_LIBS"
9001
9002 fi
9003 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9004   echo "$ac_t""yes" 1>&6
9005     ac_tr_lib=HAVE_LIB`echo net | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9006     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9007   cat >> confdefs.h <<EOF
9008 #define $ac_tr_lib 1
9009 EOF
9010
9011   LIBS="-lnet $LIBS"
9012
9013 else
9014   echo "$ac_t""no" 1>&6
9015 fi
9016
9017         echo $ac_n "checking for main in -lnsl_s""... $ac_c" 1>&6
9018 echo "configure:9019: checking for main in -lnsl_s" >&5
9019 ac_lib_var=`echo nsl_s'_'main | sed 'y%./+-:%__p__%'`
9020 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9021   echo $ac_n "(cached) $ac_c" 1>&6
9022 else
9023   ac_save_LIBS="$LIBS"
9024 LIBS="-lnsl_s  $LIBS"
9025 cat > conftest.$ac_ext <<EOF
9026 #line 9027 "configure"
9027 #include "confdefs.h"
9028
9029 int main() {
9030 main()
9031 ; return 0; }
9032 EOF
9033 if { (eval echo configure:9034: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9034   rm -rf conftest*
9035   eval "ac_cv_lib_$ac_lib_var=yes"
9036 else
9037   echo "configure: failed program was:" >&5
9038   cat conftest.$ac_ext >&5
9039   rm -rf conftest*
9040   eval "ac_cv_lib_$ac_lib_var=no"
9041 fi
9042 rm -f conftest*
9043 LIBS="$ac_save_LIBS"
9044
9045 fi
9046 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9047   echo "$ac_t""yes" 1>&6
9048     ac_tr_lib=HAVE_LIB`echo nsl_s | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9049     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9050   cat >> confdefs.h <<EOF
9051 #define $ac_tr_lib 1
9052 EOF
9053
9054   LIBS="-lnsl_s $LIBS"
9055
9056 else
9057   echo "$ac_t""no" 1>&6
9058 fi
9059
9060         echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
9061 echo "configure:9062: checking for main in -lnsl" >&5
9062 ac_lib_var=`echo nsl'_'main | sed 'y%./+-:%__p__%'`
9063 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9064   echo $ac_n "(cached) $ac_c" 1>&6
9065 else
9066   ac_save_LIBS="$LIBS"
9067 LIBS="-lnsl  $LIBS"
9068 cat > conftest.$ac_ext <<EOF
9069 #line 9070 "configure"
9070 #include "confdefs.h"
9071
9072 int main() {
9073 main()
9074 ; return 0; }
9075 EOF
9076 if { (eval echo configure:9077: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9077   rm -rf conftest*
9078   eval "ac_cv_lib_$ac_lib_var=yes"
9079 else
9080   echo "configure: failed program was:" >&5
9081   cat conftest.$ac_ext >&5
9082   rm -rf conftest*
9083   eval "ac_cv_lib_$ac_lib_var=no"
9084 fi
9085 rm -f conftest*
9086 LIBS="$ac_save_LIBS"
9087
9088 fi
9089 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9090   echo "$ac_t""yes" 1>&6
9091     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9092     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9093   cat >> confdefs.h <<EOF
9094 #define $ac_tr_lib 1
9095 EOF
9096
9097   LIBS="-lnsl $LIBS"
9098
9099 else
9100   echo "$ac_t""no" 1>&6
9101 fi
9102
9103         echo $ac_n "checking for socket in -linet""... $ac_c" 1>&6
9104 echo "configure:9105: checking for socket in -linet" >&5
9105 ac_lib_var=`echo inet'_'socket | sed 'y%./+-:%__p__%'`
9106 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9107   echo $ac_n "(cached) $ac_c" 1>&6
9108 else
9109   ac_save_LIBS="$LIBS"
9110 LIBS="-linet  $LIBS"
9111 cat > conftest.$ac_ext <<EOF
9112 #line 9113 "configure"
9113 #include "confdefs.h"
9114 /* Override any gcc2 internal prototype to avoid an error.  */
9115 /* We use char because int might match the return type of a gcc2
9116     builtin and then its argument prototype would still apply.  */
9117 char socket();
9118
9119 int main() {
9120 socket()
9121 ; return 0; }
9122 EOF
9123 if { (eval echo configure:9124: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9124   rm -rf conftest*
9125   eval "ac_cv_lib_$ac_lib_var=yes"
9126 else
9127   echo "configure: failed program was:" >&5
9128   cat conftest.$ac_ext >&5
9129   rm -rf conftest*
9130   eval "ac_cv_lib_$ac_lib_var=no"
9131 fi
9132 rm -f conftest*
9133 LIBS="$ac_save_LIBS"
9134
9135 fi
9136 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9137   echo "$ac_t""yes" 1>&6
9138     ac_tr_lib=HAVE_LIB`echo inet | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9139     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9140   cat >> confdefs.h <<EOF
9141 #define $ac_tr_lib 1
9142 EOF
9143
9144   LIBS="-linet $LIBS"
9145
9146 else
9147   echo "$ac_t""no" 1>&6
9148 fi
9149
9150         echo $ac_n "checking for main in -lgen""... $ac_c" 1>&6
9151 echo "configure:9152: checking for main in -lgen" >&5
9152 ac_lib_var=`echo gen'_'main | sed 'y%./+-:%__p__%'`
9153 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9154   echo $ac_n "(cached) $ac_c" 1>&6
9155 else
9156   ac_save_LIBS="$LIBS"
9157 LIBS="-lgen  $LIBS"
9158 cat > conftest.$ac_ext <<EOF
9159 #line 9160 "configure"
9160 #include "confdefs.h"
9161
9162 int main() {
9163 main()
9164 ; return 0; }
9165 EOF
9166 if { (eval echo configure:9167: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9167   rm -rf conftest*
9168   eval "ac_cv_lib_$ac_lib_var=yes"
9169 else
9170   echo "configure: failed program was:" >&5
9171   cat conftest.$ac_ext >&5
9172   rm -rf conftest*
9173   eval "ac_cv_lib_$ac_lib_var=no"
9174 fi
9175 rm -f conftest*
9176 LIBS="$ac_save_LIBS"
9177
9178 fi
9179 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9180   echo "$ac_t""yes" 1>&6
9181     ac_tr_lib=HAVE_LIB`echo gen | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9182     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9183   cat >> confdefs.h <<EOF
9184 #define $ac_tr_lib 1
9185 EOF
9186
9187   LIBS="-lgen $LIBS"
9188
9189 else
9190   echo "$ac_t""no" 1>&6
9191 fi
9192
9193
9194 fi
9195
9196
9197 echo $ac_n "checking for select""... $ac_c" 1>&6
9198 echo "configure:9199: checking for select" >&5
9199 if eval "test \"\${ac_cv_func_select+set}\" = set"; then
9200   echo $ac_n "(cached) $ac_c" 1>&6
9201 else
9202   cat > conftest.$ac_ext <<EOF
9203 #line 9204 "configure"
9204 #include "confdefs.h"
9205 /* System header to define __stub macros and hopefully few prototypes,
9206     which can conflict with char select(); below.  */
9207 #include <assert.h>
9208 /* Override any gcc2 internal prototype to avoid an error.  */
9209 /* We use char because int might match the return type of a gcc2
9210     builtin and then its argument prototype would still apply.  */
9211 char select();
9212 char (*f)();
9213
9214 int main() {
9215
9216 /* The GNU C library defines this for functions which it implements
9217     to always fail with ENOSYS.  Some functions are actually named
9218     something starting with __ and the normal name is an alias.  */
9219 #if defined (__stub_select) || defined (__stub___select)
9220 choke me
9221 #else
9222 f = select;
9223 #endif
9224
9225 ; return 0; }
9226 EOF
9227 if { (eval echo configure:9228: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9228   rm -rf conftest*
9229   eval "ac_cv_func_select=yes"
9230 else
9231   echo "configure: failed program was:" >&5
9232   cat conftest.$ac_ext >&5
9233   rm -rf conftest*
9234   eval "ac_cv_func_select=no"
9235 fi
9236 rm -f conftest*
9237 fi
9238
9239 if eval "test \"`echo '$ac_cv_func_'select`\" = yes"; then
9240   echo "$ac_t""yes" 1>&6
9241   :
9242 else
9243   echo "$ac_t""no" 1>&6
9244 { echo "configure: error: select() required." 1>&2; exit 1; }
9245 fi
9246
9247
9248 if test "${ac_cv_header_winsock_h}" != yes; then
9249                                 echo $ac_n "checking types of arguments for select()""... $ac_c" 1>&6
9250 echo "configure:9251: checking types of arguments for select()" >&5
9251  if eval "test \"\${ac_cv_func_select_arg234+set}\" = set"; then
9252   echo $ac_n "(cached) $ac_c" 1>&6
9253 else
9254    if eval "test \"\${ac_cv_func_select_arg1+set}\" = set"; then
9255   echo $ac_n "(cached) $ac_c" 1>&6
9256 else
9257     if eval "test \"\${ac_cv_func_select_arg5+set}\" = set"; then
9258   echo $ac_n "(cached) $ac_c" 1>&6
9259 else
9260      for ac_cv_func_select_arg234 in 'fd_set *' 'int *' 'void *'; do
9261      for ac_cv_func_select_arg1 in 'int' 'size_t' 'unsigned long' 'unsigned'; do
9262       for ac_cv_func_select_arg5 in 'struct timeval *' 'const struct timeval *'; do
9263        cat > conftest.$ac_ext <<EOF
9264 #line 9265 "configure"
9265 #include "confdefs.h"
9266 #ifdef HAVE_SYS_TYPES_H
9267 #include <sys/types.h>
9268 #endif
9269 #ifdef HAVE_SYS_TIME_H
9270 #include <sys/time.h>
9271 #endif
9272 #ifdef HAVE_SYS_SELECT_H
9273 #include <sys/select.h>
9274 #endif
9275 #ifdef HAVE_SYS_SOCKET_H
9276 #include <sys/socket.h>
9277 #endif
9278 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);
9279 int main() {
9280
9281 ; return 0; }
9282 EOF
9283 if { (eval echo configure:9284: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9284   rm -rf conftest*
9285           ac_not_found=no ; break 3
9286 else
9287   echo "configure: failed program was:" >&5
9288   cat conftest.$ac_ext >&5
9289   rm -rf conftest*
9290   ac_not_found=yes
9291 fi
9292 rm -f conftest*
9293       done
9294      done
9295     done
9296    
9297 fi
9298   
9299 fi
9300  
9301 fi
9302  if test "$ac_not_found" = yes; then
9303   ac_cv_func_select_arg1=int 
9304   ac_cv_func_select_arg234='int *' 
9305   ac_cv_func_select_arg5='struct timeval *'
9306  fi
9307  echo "$ac_t""$ac_cv_func_select_arg1,$ac_cv_func_select_arg234,$ac_cv_func_select_arg5" 1>&6
9308  cat >> confdefs.h <<EOF
9309 #define SELECT_TYPE_ARG1 $ac_cv_func_select_arg1
9310 EOF
9311
9312  cat >> confdefs.h <<EOF
9313 #define SELECT_TYPE_ARG234 ($ac_cv_func_select_arg234)
9314 EOF
9315
9316  cat >> confdefs.h <<EOF
9317 #define SELECT_TYPE_ARG5 ($ac_cv_func_select_arg5)
9318 EOF
9319
9320
9321 fi
9322
9323
9324 for ac_hdr in regex.h 
9325 do
9326 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9327 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9328 echo "configure:9329: checking for $ac_hdr" >&5
9329 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9330   echo $ac_n "(cached) $ac_c" 1>&6
9331 else
9332   cat > conftest.$ac_ext <<EOF
9333 #line 9334 "configure"
9334 #include "confdefs.h"
9335 #include <$ac_hdr>
9336 EOF
9337 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9338 { (eval echo configure:9339: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9339 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9340 if test -z "$ac_err"; then
9341   rm -rf conftest*
9342   eval "ac_cv_header_$ac_safe=yes"
9343 else
9344   echo "$ac_err" >&5
9345   echo "configure: failed program was:" >&5
9346   cat conftest.$ac_ext >&5
9347   rm -rf conftest*
9348   eval "ac_cv_header_$ac_safe=no"
9349 fi
9350 rm -f conftest*
9351 fi
9352 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9353   echo "$ac_t""yes" 1>&6
9354     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9355   cat >> confdefs.h <<EOF
9356 #define $ac_tr_hdr 1
9357 EOF
9358  
9359 else
9360   echo "$ac_t""no" 1>&6
9361 fi
9362 done
9363
9364 if test "$ac_cv_header_regex_h" != yes ; then
9365         { echo "configure: error: POSIX regex.h required." 1>&2; exit 1; }
9366 fi
9367
9368 echo $ac_n "checking for library containing regfree""... $ac_c" 1>&6
9369 echo "configure:9370: checking for library containing regfree" >&5
9370 if eval "test \"\${ac_cv_search_regfree+set}\" = set"; then
9371   echo $ac_n "(cached) $ac_c" 1>&6
9372 else
9373   ac_func_search_save_LIBS="$LIBS"
9374 ac_cv_search_regfree="no"
9375 cat > conftest.$ac_ext <<EOF
9376 #line 9377 "configure"
9377 #include "confdefs.h"
9378 /* Override any gcc2 internal prototype to avoid an error.  */
9379 /* We use char because int might match the return type of a gcc2
9380     builtin and then its argument prototype would still apply.  */
9381 char regfree();
9382
9383 int main() {
9384 regfree()
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   ac_cv_search_regfree="none required"
9390 else
9391   echo "configure: failed program was:" >&5
9392   cat conftest.$ac_ext >&5
9393 fi
9394 rm -f conftest*
9395 test "$ac_cv_search_regfree" = "no" && for ac_lib in regex gnuregex; do
9396 LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9397 cat > conftest.$ac_ext <<EOF
9398 #line 9399 "configure"
9399 #include "confdefs.h"
9400 /* Override any gcc2 internal prototype to avoid an error.  */
9401 /* We use char because int might match the return type of a gcc2
9402     builtin and then its argument prototype would still apply.  */
9403 char regfree();
9404
9405 int main() {
9406 regfree()
9407 ; return 0; }
9408 EOF
9409 if { (eval echo configure:9410: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9410   rm -rf conftest*
9411   ac_cv_search_regfree="-l$ac_lib"
9412 break
9413 else
9414   echo "configure: failed program was:" >&5
9415   cat conftest.$ac_ext >&5
9416 fi
9417 rm -f conftest*
9418 done
9419 LIBS="$ac_func_search_save_LIBS"
9420 fi
9421
9422 echo "$ac_t""$ac_cv_search_regfree" 1>&6
9423 if test "$ac_cv_search_regfree" != "no"; then
9424   test "$ac_cv_search_regfree" = "none required" || LIBS="$ac_cv_search_regfree $LIBS"
9425   :
9426 else :
9427   { echo "configure: error: POSIX regex required." 1>&2; exit 1; }
9428 fi
9429
9430
9431 echo $ac_n "checking for compatible POSIX regex""... $ac_c" 1>&6
9432 echo "configure:9433: checking for compatible POSIX regex" >&5
9433 if eval "test \"\${ol_cv_c_posix_regex+set}\" = set"; then
9434   echo $ac_n "(cached) $ac_c" 1>&6
9435 else
9436   
9437         if test "$cross_compiling" = yes; then
9438   ol_cv_c_posix_regex=cross
9439 else
9440   cat > conftest.$ac_ext <<EOF
9441 #line 9442 "configure"
9442 #include "confdefs.h"
9443
9444 #include <sys/types.h>
9445 #include <regex.h>
9446 static char *pattern, *string;
9447 main()
9448 {
9449         int rc;
9450         regex_t re;
9451
9452         pattern = "^A";
9453
9454         if(regcomp(&re, pattern, 0)) {
9455                 return -1;
9456         }
9457         
9458         string = "ALL MATCH";
9459         
9460         rc = regexec(&re, string, 0, (void*)0, 0);
9461
9462         regfree(&re);
9463
9464         return rc;
9465 }
9466 EOF
9467 if { (eval echo configure:9468: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9468 then
9469   ol_cv_c_posix_regex=yes
9470 else
9471   echo "configure: failed program was:" >&5
9472   cat conftest.$ac_ext >&5
9473   rm -fr conftest*
9474   ol_cv_c_posix_regex=no
9475 fi
9476 rm -fr conftest*
9477 fi
9478
9479 fi
9480
9481 echo "$ac_t""$ol_cv_c_posix_regex" 1>&6
9482
9483 if test "$ol_cv_c_posix_regex" = no ; then
9484         { echo "configure: error: broken POSIX regex!" 1>&2; exit 1; }
9485 fi
9486
9487
9488 have_uuid=no
9489 for ac_hdr in sys/uuid.h
9490 do
9491 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9492 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9493 echo "configure:9494: checking for $ac_hdr" >&5
9494 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9495   echo $ac_n "(cached) $ac_c" 1>&6
9496 else
9497   cat > conftest.$ac_ext <<EOF
9498 #line 9499 "configure"
9499 #include "confdefs.h"
9500 #include <$ac_hdr>
9501 EOF
9502 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9503 { (eval echo configure:9504: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9504 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9505 if test -z "$ac_err"; then
9506   rm -rf conftest*
9507   eval "ac_cv_header_$ac_safe=yes"
9508 else
9509   echo "$ac_err" >&5
9510   echo "configure: failed program was:" >&5
9511   cat conftest.$ac_ext >&5
9512   rm -rf conftest*
9513   eval "ac_cv_header_$ac_safe=no"
9514 fi
9515 rm -f conftest*
9516 fi
9517 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9518   echo "$ac_t""yes" 1>&6
9519     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9520   cat >> confdefs.h <<EOF
9521 #define $ac_tr_hdr 1
9522 EOF
9523  
9524 else
9525   echo "$ac_t""no" 1>&6
9526 fi
9527 done
9528
9529 if test $ac_cv_header_sys_uuid_h = yes ; then
9530         save_LIBS="$LIBS"
9531         
9532 echo $ac_n "checking for library containing uuid_to_str""... $ac_c" 1>&6
9533 echo "configure:9534: checking for library containing uuid_to_str" >&5
9534 if eval "test \"\${ac_cv_search_uuid_to_str+set}\" = set"; then
9535   echo $ac_n "(cached) $ac_c" 1>&6
9536 else
9537   ac_func_search_save_LIBS="$LIBS"
9538 ac_cv_search_uuid_to_str="no"
9539 cat > conftest.$ac_ext <<EOF
9540 #line 9541 "configure"
9541 #include "confdefs.h"
9542 /* Override any gcc2 internal prototype to avoid an error.  */
9543 /* We use char because int might match the return type of a gcc2
9544     builtin and then its argument prototype would still apply.  */
9545 char uuid_to_str();
9546
9547 int main() {
9548 uuid_to_str()
9549 ; return 0; }
9550 EOF
9551 if { (eval echo configure:9552: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9552   rm -rf conftest*
9553   ac_cv_search_uuid_to_str="none required"
9554 else
9555   echo "configure: failed program was:" >&5
9556   cat conftest.$ac_ext >&5
9557 fi
9558 rm -f conftest*
9559 test "$ac_cv_search_uuid_to_str" = "no" && for ac_lib in uuid; do
9560 LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9561 cat > conftest.$ac_ext <<EOF
9562 #line 9563 "configure"
9563 #include "confdefs.h"
9564 /* Override any gcc2 internal prototype to avoid an error.  */
9565 /* We use char because int might match the return type of a gcc2
9566     builtin and then its argument prototype would still apply.  */
9567 char uuid_to_str();
9568
9569 int main() {
9570 uuid_to_str()
9571 ; return 0; }
9572 EOF
9573 if { (eval echo configure:9574: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9574   rm -rf conftest*
9575   ac_cv_search_uuid_to_str="-l$ac_lib"
9576 break
9577 else
9578   echo "configure: failed program was:" >&5
9579   cat conftest.$ac_ext >&5
9580 fi
9581 rm -f conftest*
9582 done
9583 LIBS="$ac_func_search_save_LIBS"
9584 fi
9585
9586 echo "$ac_t""$ac_cv_search_uuid_to_str" 1>&6
9587 if test "$ac_cv_search_uuid_to_str" != "no"; then
9588   test "$ac_cv_search_uuid_to_str" = "none required" || LIBS="$ac_cv_search_uuid_to_str $LIBS"
9589   have_uuid=yes
9590 else :
9591   :
9592 fi
9593         LIBS="$save_LIBS"
9594
9595         if test have_uuid = yes ; then
9596                 cat >> confdefs.h <<\EOF
9597 #define HAVE_UUID_TO_STR 1
9598 EOF
9599
9600
9601                 test "$ac_cv_search_uuid_to_str" = "none required" || \
9602                         SLAPD_LIBS="$SLAPD_LIBS $ac_cv_search_uuid_to_str"
9603         fi
9604 fi
9605
9606 if test $have_uuid = no ; then
9607         echo $ac_n "checking to see if -lrpcrt4 is needed for win32 UUID support""... $ac_c" 1>&6
9608 echo "configure:9609: checking to see if -lrpcrt4 is needed for win32 UUID support" >&5
9609         save_LIBS="$LIBS"
9610         LIBS="$LIBS -lrpcrt4"
9611         cat > conftest.$ac_ext <<EOF
9612 #line 9613 "configure"
9613 #include "confdefs.h"
9614
9615                 int __stdcall UuidCreate(void *);
9616                 int __stdcall UuidToStringA(void *,void **);
9617                 
9618 int main() {
9619
9620                 UuidCreate(0);
9621                 UuidToStringA(0,0);
9622                 
9623 ; return 0; }
9624 EOF
9625 if { (eval echo configure:9626: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9626   rm -rf conftest*
9627   need_rpcrt=yes
9628 else
9629   echo "configure: failed program was:" >&5
9630   cat conftest.$ac_ext >&5
9631   rm -rf conftest*
9632   need_rpcrt=no
9633 fi
9634 rm -f conftest*
9635         if test $need_rpcrt = yes; then
9636                 SLAPD_LIBS="$SLAPD_LIBS -lrpcrt4"
9637         fi
9638         LIBS="$save_LIBS"
9639         echo "$ac_t""$need_rpcrt" 1>&6
9640 fi
9641
9642 ol_link_dnssrv=no
9643 echo $ac_n "checking for res_query""... $ac_c" 1>&6
9644 echo "configure:9645: checking for res_query" >&5
9645 if eval "test \"\${ac_cv_func_res_query+set}\" = set"; then
9646   echo $ac_n "(cached) $ac_c" 1>&6
9647 else
9648   cat > conftest.$ac_ext <<EOF
9649 #line 9650 "configure"
9650 #include "confdefs.h"
9651 /* System header to define __stub macros and hopefully few prototypes,
9652     which can conflict with char res_query(); below.  */
9653 #include <assert.h>
9654 /* Override any gcc2 internal prototype to avoid an error.  */
9655 /* We use char because int might match the return type of a gcc2
9656     builtin and then its argument prototype would still apply.  */
9657 char res_query();
9658 char (*f)();
9659
9660 int main() {
9661
9662 /* The GNU C library defines this for functions which it implements
9663     to always fail with ENOSYS.  Some functions are actually named
9664     something starting with __ and the normal name is an alias.  */
9665 #if defined (__stub_res_query) || defined (__stub___res_query)
9666 choke me
9667 #else
9668 f = res_query;
9669 #endif
9670
9671 ; return 0; }
9672 EOF
9673 if { (eval echo configure:9674: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9674   rm -rf conftest*
9675   eval "ac_cv_func_res_query=yes"
9676 else
9677   echo "configure: failed program was:" >&5
9678   cat conftest.$ac_ext >&5
9679   rm -rf conftest*
9680   eval "ac_cv_func_res_query=no"
9681 fi
9682 rm -f conftest*
9683 fi
9684
9685 if eval "test \"`echo '$ac_cv_func_'res_query`\" = yes"; then
9686   echo "$ac_t""yes" 1>&6
9687   :
9688 else
9689   echo "$ac_t""no" 1>&6
9690 fi
9691
9692 if test $ac_cv_func_res_query = no ; then 
9693         echo $ac_n "checking for __res_query""... $ac_c" 1>&6
9694 echo "configure:9695: checking for __res_query" >&5
9695 if eval "test \"\${ac_cv_func___res_query+set}\" = set"; then
9696   echo $ac_n "(cached) $ac_c" 1>&6
9697 else
9698   cat > conftest.$ac_ext <<EOF
9699 #line 9700 "configure"
9700 #include "confdefs.h"
9701 /* System header to define __stub macros and hopefully few prototypes,
9702     which can conflict with char __res_query(); below.  */
9703 #include <assert.h>
9704 /* Override any gcc2 internal prototype to avoid an error.  */
9705 /* We use char because int might match the return type of a gcc2
9706     builtin and then its argument prototype would still apply.  */
9707 char __res_query();
9708 char (*f)();
9709
9710 int main() {
9711
9712 /* The GNU C library defines this for functions which it implements
9713     to always fail with ENOSYS.  Some functions are actually named
9714     something starting with __ and the normal name is an alias.  */
9715 #if defined (__stub___res_query) || defined (__stub_____res_query)
9716 choke me
9717 #else
9718 f = __res_query;
9719 #endif
9720
9721 ; return 0; }
9722 EOF
9723 if { (eval echo configure:9724: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9724   rm -rf conftest*
9725   eval "ac_cv_func___res_query=yes"
9726 else
9727   echo "configure: failed program was:" >&5
9728   cat conftest.$ac_ext >&5
9729   rm -rf conftest*
9730   eval "ac_cv_func___res_query=no"
9731 fi
9732 rm -f conftest*
9733 fi
9734
9735 if eval "test \"`echo '$ac_cv_func_'__res_query`\" = yes"; then
9736   echo "$ac_t""yes" 1>&6
9737   :
9738 else
9739   echo "$ac_t""no" 1>&6
9740 fi
9741
9742         ac_cv_func_res_query=$ac_cv_func___res_query
9743 fi
9744
9745 if test $ac_cv_func_res_query = no ; then 
9746         echo $ac_n "checking for res_query in -lbind""... $ac_c" 1>&6
9747 echo "configure:9748: checking for res_query in -lbind" >&5
9748 ac_lib_var=`echo bind'_'res_query | sed 'y%./+-:%__p__%'`
9749 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9750   echo $ac_n "(cached) $ac_c" 1>&6
9751 else
9752   ac_save_LIBS="$LIBS"
9753 LIBS="-lbind  $LIBS"
9754 cat > conftest.$ac_ext <<EOF
9755 #line 9756 "configure"
9756 #include "confdefs.h"
9757 /* Override any gcc2 internal prototype to avoid an error.  */
9758 /* We use char because int might match the return type of a gcc2
9759     builtin and then its argument prototype would still apply.  */
9760 char res_query();
9761
9762 int main() {
9763 res_query()
9764 ; return 0; }
9765 EOF
9766 if { (eval echo configure:9767: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9767   rm -rf conftest*
9768   eval "ac_cv_lib_$ac_lib_var=yes"
9769 else
9770   echo "configure: failed program was:" >&5
9771   cat conftest.$ac_ext >&5
9772   rm -rf conftest*
9773   eval "ac_cv_lib_$ac_lib_var=no"
9774 fi
9775 rm -f conftest*
9776 LIBS="$ac_save_LIBS"
9777
9778 fi
9779 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9780   echo "$ac_t""yes" 1>&6
9781     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9782     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9783   cat >> confdefs.h <<EOF
9784 #define $ac_tr_lib 1
9785 EOF
9786
9787   LIBS="-lbind $LIBS"
9788
9789 else
9790   echo "$ac_t""no" 1>&6
9791 fi
9792
9793         ac_cv_func_res_query=$ac_cv_lib_bind_res_query
9794 fi
9795
9796 if test $ac_cv_func_res_query = no ; then 
9797         echo $ac_n "checking for __res_query in -lbind""... $ac_c" 1>&6
9798 echo "configure:9799: checking for __res_query in -lbind" >&5
9799 ac_lib_var=`echo bind'_'__res_query | sed 'y%./+-:%__p__%'`
9800 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9801   echo $ac_n "(cached) $ac_c" 1>&6
9802 else
9803   ac_save_LIBS="$LIBS"
9804 LIBS="-lbind  $LIBS"
9805 cat > conftest.$ac_ext <<EOF
9806 #line 9807 "configure"
9807 #include "confdefs.h"
9808 /* Override any gcc2 internal prototype to avoid an error.  */
9809 /* We use char because int might match the return type of a gcc2
9810     builtin and then its argument prototype would still apply.  */
9811 char __res_query();
9812
9813 int main() {
9814 __res_query()
9815 ; return 0; }
9816 EOF
9817 if { (eval echo configure:9818: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9818   rm -rf conftest*
9819   eval "ac_cv_lib_$ac_lib_var=yes"
9820 else
9821   echo "configure: failed program was:" >&5
9822   cat conftest.$ac_ext >&5
9823   rm -rf conftest*
9824   eval "ac_cv_lib_$ac_lib_var=no"
9825 fi
9826 rm -f conftest*
9827 LIBS="$ac_save_LIBS"
9828
9829 fi
9830 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9831   echo "$ac_t""yes" 1>&6
9832     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9833     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9834   cat >> confdefs.h <<EOF
9835 #define $ac_tr_lib 1
9836 EOF
9837
9838   LIBS="-lbind $LIBS"
9839
9840 else
9841   echo "$ac_t""no" 1>&6
9842 fi
9843
9844         ac_cv_func_res_query=$ac_cv_lib_bind___res_query
9845 fi
9846
9847 if test $ac_cv_func_res_query = no ; then 
9848         echo $ac_n "checking for res_query in -lresolv""... $ac_c" 1>&6
9849 echo "configure:9850: checking for res_query in -lresolv" >&5
9850 ac_lib_var=`echo resolv'_'res_query | sed 'y%./+-:%__p__%'`
9851 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9852   echo $ac_n "(cached) $ac_c" 1>&6
9853 else
9854   ac_save_LIBS="$LIBS"
9855 LIBS="-lresolv  $LIBS"
9856 cat > conftest.$ac_ext <<EOF
9857 #line 9858 "configure"
9858 #include "confdefs.h"
9859 /* Override any gcc2 internal prototype to avoid an error.  */
9860 /* We use char because int might match the return type of a gcc2
9861     builtin and then its argument prototype would still apply.  */
9862 char res_query();
9863
9864 int main() {
9865 res_query()
9866 ; return 0; }
9867 EOF
9868 if { (eval echo configure:9869: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9869   rm -rf conftest*
9870   eval "ac_cv_lib_$ac_lib_var=yes"
9871 else
9872   echo "configure: failed program was:" >&5
9873   cat conftest.$ac_ext >&5
9874   rm -rf conftest*
9875   eval "ac_cv_lib_$ac_lib_var=no"
9876 fi
9877 rm -f conftest*
9878 LIBS="$ac_save_LIBS"
9879
9880 fi
9881 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9882   echo "$ac_t""yes" 1>&6
9883     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9884     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9885   cat >> confdefs.h <<EOF
9886 #define $ac_tr_lib 1
9887 EOF
9888
9889   LIBS="-lresolv $LIBS"
9890
9891 else
9892   echo "$ac_t""no" 1>&6
9893 fi
9894
9895         ac_cv_func_res_query=$ac_cv_lib_resolv_res_query
9896 fi
9897
9898 if test $ac_cv_func_res_query = no ; then 
9899         echo $ac_n "checking for __res_query in -lresolv""... $ac_c" 1>&6
9900 echo "configure:9901: checking for __res_query in -lresolv" >&5
9901 ac_lib_var=`echo resolv'_'__res_query | sed 'y%./+-:%__p__%'`
9902 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9903   echo $ac_n "(cached) $ac_c" 1>&6
9904 else
9905   ac_save_LIBS="$LIBS"
9906 LIBS="-lresolv  $LIBS"
9907 cat > conftest.$ac_ext <<EOF
9908 #line 9909 "configure"
9909 #include "confdefs.h"
9910 /* Override any gcc2 internal prototype to avoid an error.  */
9911 /* We use char because int might match the return type of a gcc2
9912     builtin and then its argument prototype would still apply.  */
9913 char __res_query();
9914
9915 int main() {
9916 __res_query()
9917 ; return 0; }
9918 EOF
9919 if { (eval echo configure:9920: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9920   rm -rf conftest*
9921   eval "ac_cv_lib_$ac_lib_var=yes"
9922 else
9923   echo "configure: failed program was:" >&5
9924   cat conftest.$ac_ext >&5
9925   rm -rf conftest*
9926   eval "ac_cv_lib_$ac_lib_var=no"
9927 fi
9928 rm -f conftest*
9929 LIBS="$ac_save_LIBS"
9930
9931 fi
9932 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9933   echo "$ac_t""yes" 1>&6
9934     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9935     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9936   cat >> confdefs.h <<EOF
9937 #define $ac_tr_lib 1
9938 EOF
9939
9940   LIBS="-lresolv $LIBS"
9941
9942 else
9943   echo "$ac_t""no" 1>&6
9944 fi
9945
9946         ac_cv_func_res_query=$ac_cv_lib_resolv___res_query
9947 fi
9948
9949 if test "$ac_cv_func_res_query" = yes ; then
9950         cat >> confdefs.h <<\EOF
9951 #define HAVE_RES_QUERY 1
9952 EOF
9953
9954
9955         if test $ol_enable_dnssrv != no ; then
9956                 ol_link_dnssrv=yes
9957         fi
9958 fi
9959
9960 if test "$ol_enable_dnssrv" != no -a "$ol_link_dnssrv" = no ; then
9961         { echo "configure: error: DNSSRV requires res_query()" 1>&2; exit 1; }
9962 fi
9963
9964 for ac_func in getaddrinfo getnameinfo gai_strerror inet_ntop 
9965 do
9966 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9967 echo "configure:9968: checking for $ac_func" >&5
9968 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
9969   echo $ac_n "(cached) $ac_c" 1>&6
9970 else
9971   cat > conftest.$ac_ext <<EOF
9972 #line 9973 "configure"
9973 #include "confdefs.h"
9974 /* System header to define __stub macros and hopefully few prototypes,
9975     which can conflict with char $ac_func(); below.  */
9976 #include <assert.h>
9977 /* Override any gcc2 internal prototype to avoid an error.  */
9978 /* We use char because int might match the return type of a gcc2
9979     builtin and then its argument prototype would still apply.  */
9980 char $ac_func();
9981 char (*f)();
9982
9983 int main() {
9984
9985 /* The GNU C library defines this for functions which it implements
9986     to always fail with ENOSYS.  Some functions are actually named
9987     something starting with __ and the normal name is an alias.  */
9988 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9989 choke me
9990 #else
9991 f = $ac_func;
9992 #endif
9993
9994 ; return 0; }
9995 EOF
9996 if { (eval echo configure:9997: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9997   rm -rf conftest*
9998   eval "ac_cv_func_$ac_func=yes"
9999 else
10000   echo "configure: failed program was:" >&5
10001   cat conftest.$ac_ext >&5
10002   rm -rf conftest*
10003   eval "ac_cv_func_$ac_func=no"
10004 fi
10005 rm -f conftest*
10006 fi
10007
10008 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10009   echo "$ac_t""yes" 1>&6
10010     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10011   cat >> confdefs.h <<EOF
10012 #define $ac_tr_func 1
10013 EOF
10014  
10015 else
10016   echo "$ac_t""no" 1>&6
10017 fi
10018 done
10019
10020
10021 ol_link_ipv6=no
10022 if test $ac_cv_func_getaddrinfo = no -o $ac_cv_func_inet_ntop = no ; then
10023         if test $ol_enable_ipv6 = yes ; then
10024                 { echo "configure: error: IPv6 support requires getaddrinfo() and inet_ntop()" 1>&2; exit 1; }
10025         fi
10026 elif test $ol_enable_ipv6 != no ; then
10027         echo $ac_n "checking INET6_ADDRSTRLEN""... $ac_c" 1>&6
10028 echo "configure:10029: checking INET6_ADDRSTRLEN" >&5
10029 if eval "test \"\${ol_cv_inet6_addrstrlen+set}\" = set"; then
10030   echo $ac_n "(cached) $ac_c" 1>&6
10031 else
10032   
10033                 cat > conftest.$ac_ext <<EOF
10034 #line 10035 "configure"
10035 #include "confdefs.h"
10036
10037 #                       include <netinet/in.h>
10038 #                       ifdef INET6_ADDRSTRLEN
10039                                 __has_inet6_addrstrlen__;
10040 #                       endif
10041                 
10042 EOF
10043 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10044   egrep "__has_inet6_addrstrlen__" >/dev/null 2>&1; then
10045   rm -rf conftest*
10046   ol_cv_inet6_addrstrlen=yes
10047 else
10048   rm -rf conftest*
10049   ol_cv_inet6_addrstrlen=no
10050 fi
10051 rm -f conftest*
10052
10053 fi
10054
10055 echo "$ac_t""$ol_cv_inet6_addrstrlen" 1>&6
10056
10057
10058         echo $ac_n "checking struct sockaddr_storage""... $ac_c" 1>&6
10059 echo "configure:10060: checking struct sockaddr_storage" >&5
10060 if eval "test \"\${ol_cv_struct_sockaddr_storage+set}\" = set"; then
10061   echo $ac_n "(cached) $ac_c" 1>&6
10062 else
10063   
10064                 cat > conftest.$ac_ext <<EOF
10065 #line 10066 "configure"
10066 #include "confdefs.h"
10067
10068 #include <sys/types.h>
10069 #include <sys/socket.h>
10070
10071 int main() {
10072
10073                         struct sockaddr_storage ss;
10074
10075 ; return 0; }
10076 EOF
10077 if { (eval echo configure:10078: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10078   rm -rf conftest*
10079   ol_cv_struct_sockaddr_storage=yes
10080 else
10081   echo "configure: failed program was:" >&5
10082   cat conftest.$ac_ext >&5
10083   rm -rf conftest*
10084   ol_cv_struct_sockaddr_storage=no
10085 fi
10086 rm -f conftest*
10087 fi
10088
10089 echo "$ac_t""$ol_cv_struct_sockaddr_storage" 1>&6
10090
10091         if test $ol_cv_inet6_addrstrlen = yes \
10092                 -a $ol_cv_struct_sockaddr_storage = yes ; then
10093                 ol_link_ipv6=yes
10094         elif test $ol_enable_ipv6 = yes \
10095                         -a $ol_cv_inet6_addrstrlen = no ; then
10096                 { echo "configure: error: IPv6 support requires INET6_ADDRSTRLEN" 1>&2; exit 1; }
10097         elif test $ol_enable_ipv6 = yes \
10098                         -a $ol_cv_struct_sockaddr_storage = no ; then
10099                 { echo "configure: error: IPv6 support requires struct sockaddr_storage" 1>&2; exit 1; }
10100         fi
10101 fi
10102
10103 if test $ol_enable_local != no ; then
10104         for ac_hdr in sys/un.h 
10105 do
10106 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10107 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10108 echo "configure:10109: checking for $ac_hdr" >&5
10109 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10110   echo $ac_n "(cached) $ac_c" 1>&6
10111 else
10112   cat > conftest.$ac_ext <<EOF
10113 #line 10114 "configure"
10114 #include "confdefs.h"
10115 #include <$ac_hdr>
10116 EOF
10117 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10118 { (eval echo configure:10119: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10119 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10120 if test -z "$ac_err"; then
10121   rm -rf conftest*
10122   eval "ac_cv_header_$ac_safe=yes"
10123 else
10124   echo "$ac_err" >&5
10125   echo "configure: failed program was:" >&5
10126   cat conftest.$ac_ext >&5
10127   rm -rf conftest*
10128   eval "ac_cv_header_$ac_safe=no"
10129 fi
10130 rm -f conftest*
10131 fi
10132 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10133   echo "$ac_t""yes" 1>&6
10134     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10135   cat >> confdefs.h <<EOF
10136 #define $ac_tr_hdr 1
10137 EOF
10138  
10139 else
10140   echo "$ac_t""no" 1>&6
10141 fi
10142 done
10143
10144
10145         if test $ol_enable_local = auto ; then
10146                 ol_enable_local=$ac_cv_header_sys_un_h
10147         elif test $ac_cv_header_sys_un_h = no ; then
10148                 { echo "configure: error: AF_LOCAL domain support requires sys/un.h" 1>&2; exit 1; }
10149         fi
10150 fi
10151
10152 ol_link_kbind=no
10153 ol_link_krb5=no
10154 ol_link_krb4=no
10155
10156 if test $ol_with_kerberos = yes -o $ol_with_kerberos = auto \
10157         -o $ol_with_kerberos = k5 -o $ol_with_kerberos = k5only \
10158         -o $ol_with_kerberos = k425 ; then
10159
10160         for ac_hdr in krb5.h
10161 do
10162 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10163 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10164 echo "configure:10165: checking for $ac_hdr" >&5
10165 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10166   echo $ac_n "(cached) $ac_c" 1>&6
10167 else
10168   cat > conftest.$ac_ext <<EOF
10169 #line 10170 "configure"
10170 #include "confdefs.h"
10171 #include <$ac_hdr>
10172 EOF
10173 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10174 { (eval echo configure:10175: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10175 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10176 if test -z "$ac_err"; then
10177   rm -rf conftest*
10178   eval "ac_cv_header_$ac_safe=yes"
10179 else
10180   echo "$ac_err" >&5
10181   echo "configure: failed program was:" >&5
10182   cat conftest.$ac_ext >&5
10183   rm -rf conftest*
10184   eval "ac_cv_header_$ac_safe=no"
10185 fi
10186 rm -f conftest*
10187 fi
10188 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10189   echo "$ac_t""yes" 1>&6
10190     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10191   cat >> confdefs.h <<EOF
10192 #define $ac_tr_hdr 1
10193 EOF
10194  
10195 else
10196   echo "$ac_t""no" 1>&6
10197 fi
10198 done
10199
10200
10201         if test $ac_cv_header_krb5_h = yes ; then
10202                                 for ac_hdr in heim_err.h
10203 do
10204 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10205 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10206 echo "configure:10207: checking for $ac_hdr" >&5
10207 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10208   echo $ac_n "(cached) $ac_c" 1>&6
10209 else
10210   cat > conftest.$ac_ext <<EOF
10211 #line 10212 "configure"
10212 #include "confdefs.h"
10213 #include <$ac_hdr>
10214 EOF
10215 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10216 { (eval echo configure:10217: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10217 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10218 if test -z "$ac_err"; then
10219   rm -rf conftest*
10220   eval "ac_cv_header_$ac_safe=yes"
10221 else
10222   echo "$ac_err" >&5
10223   echo "configure: failed program was:" >&5
10224   cat conftest.$ac_ext >&5
10225   rm -rf conftest*
10226   eval "ac_cv_header_$ac_safe=no"
10227 fi
10228 rm -f conftest*
10229 fi
10230 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10231   echo "$ac_t""yes" 1>&6
10232     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10233   cat >> confdefs.h <<EOF
10234 #define $ac_tr_hdr 1
10235 EOF
10236  
10237 else
10238   echo "$ac_t""no" 1>&6
10239 fi
10240 done
10241
10242                 if test $ac_cv_header_heim_err_h = yes ; then
10243                         krb5_impl=heimdal
10244                 else
10245                         krb5_impl=mit
10246                 fi
10247
10248                 if test $krb5_impl = mit; then
10249                         echo $ac_n "checking for main in -lk5crypto""... $ac_c" 1>&6
10250 echo "configure:10251: checking for main in -lk5crypto" >&5
10251 ac_lib_var=`echo k5crypto'_'main | sed 'y%./+-:%__p__%'`
10252 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10253   echo $ac_n "(cached) $ac_c" 1>&6
10254 else
10255   ac_save_LIBS="$LIBS"
10256 LIBS="-lk5crypto  $LIBS"
10257 cat > conftest.$ac_ext <<EOF
10258 #line 10259 "configure"
10259 #include "confdefs.h"
10260
10261 int main() {
10262 main()
10263 ; return 0; }
10264 EOF
10265 if { (eval echo configure:10266: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10266   rm -rf conftest*
10267   eval "ac_cv_lib_$ac_lib_var=yes"
10268 else
10269   echo "configure: failed program was:" >&5
10270   cat conftest.$ac_ext >&5
10271   rm -rf conftest*
10272   eval "ac_cv_lib_$ac_lib_var=no"
10273 fi
10274 rm -f conftest*
10275 LIBS="$ac_save_LIBS"
10276
10277 fi
10278 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10279   echo "$ac_t""yes" 1>&6
10280   krb5crypto=k5crypto
10281 else
10282   echo "$ac_t""no" 1>&6
10283 krb5crypto=crypto
10284 fi
10285
10286
10287                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
10288 echo "configure:10289: checking for main in -lkrb5" >&5
10289 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
10290 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10291   echo $ac_n "(cached) $ac_c" 1>&6
10292 else
10293   ac_save_LIBS="$LIBS"
10294 LIBS="-lkrb5 -l$krb5crypto -lcom_err $LIBS"
10295 cat > conftest.$ac_ext <<EOF
10296 #line 10297 "configure"
10297 #include "confdefs.h"
10298
10299 int main() {
10300 main()
10301 ; return 0; }
10302 EOF
10303 if { (eval echo configure:10304: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10304   rm -rf conftest*
10305   eval "ac_cv_lib_$ac_lib_var=yes"
10306 else
10307   echo "configure: failed program was:" >&5
10308   cat conftest.$ac_ext >&5
10309   rm -rf conftest*
10310   eval "ac_cv_lib_$ac_lib_var=no"
10311 fi
10312 rm -f conftest*
10313 LIBS="$ac_save_LIBS"
10314
10315 fi
10316 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10317   echo "$ac_t""yes" 1>&6
10318   have_krb5=yes
10319                                 KRB5_LIBS="-lkrb5 -l$krb5crypto -lcom_err"
10320 else
10321   echo "$ac_t""no" 1>&6
10322 have_krb5=no
10323 fi
10324
10325
10326                 elif test $krb5_impl = heimdal; then
10327                         echo $ac_n "checking for main in -ldes""... $ac_c" 1>&6
10328 echo "configure:10329: checking for main in -ldes" >&5
10329 ac_lib_var=`echo des'_'main | sed 'y%./+-:%__p__%'`
10330 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10331   echo $ac_n "(cached) $ac_c" 1>&6
10332 else
10333   ac_save_LIBS="$LIBS"
10334 LIBS="-ldes  $LIBS"
10335 cat > conftest.$ac_ext <<EOF
10336 #line 10337 "configure"
10337 #include "confdefs.h"
10338
10339 int main() {
10340 main()
10341 ; return 0; }
10342 EOF
10343 if { (eval echo configure:10344: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10344   rm -rf conftest*
10345   eval "ac_cv_lib_$ac_lib_var=yes"
10346 else
10347   echo "configure: failed program was:" >&5
10348   cat conftest.$ac_ext >&5
10349   rm -rf conftest*
10350   eval "ac_cv_lib_$ac_lib_var=no"
10351 fi
10352 rm -f conftest*
10353 LIBS="$ac_save_LIBS"
10354
10355 fi
10356 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10357   echo "$ac_t""yes" 1>&6
10358   krb5crypto=des
10359 else
10360   echo "$ac_t""no" 1>&6
10361 krb5crypto=crypto
10362 fi
10363
10364
10365                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
10366 echo "configure:10367: checking for main in -lkrb5" >&5
10367 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
10368 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10369   echo $ac_n "(cached) $ac_c" 1>&6
10370 else
10371   ac_save_LIBS="$LIBS"
10372 LIBS="-lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err $LIBS"
10373 cat > conftest.$ac_ext <<EOF
10374 #line 10375 "configure"
10375 #include "confdefs.h"
10376
10377 int main() {
10378 main()
10379 ; return 0; }
10380 EOF
10381 if { (eval echo configure:10382: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10382   rm -rf conftest*
10383   eval "ac_cv_lib_$ac_lib_var=yes"
10384 else
10385   echo "configure: failed program was:" >&5
10386   cat conftest.$ac_ext >&5
10387   rm -rf conftest*
10388   eval "ac_cv_lib_$ac_lib_var=no"
10389 fi
10390 rm -f conftest*
10391 LIBS="$ac_save_LIBS"
10392
10393 fi
10394 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10395   echo "$ac_t""yes" 1>&6
10396   have_krb5=yes
10397                                 KRB5_LIBS="-lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err"
10398 else
10399   echo "$ac_t""no" 1>&6
10400 have_krb5=no
10401 fi
10402
10403
10404                         cat >> confdefs.h <<\EOF
10405 #define HAVE_HEIMDAL_KERBEROS 1
10406 EOF
10407
10408
10409                 else
10410                         have_krb5=no
10411                         echo "configure: warning: Unrecognized Kerberos5 Implementation" 1>&2
10412                 fi
10413
10414                 if test $have_krb5 = yes ; then
10415                         ol_link_krb5=yes
10416
10417                         cat >> confdefs.h <<\EOF
10418 #define HAVE_KRB5 1
10419 EOF
10420
10421
10422                         if test $ol_with_kerberos = k5only ; then
10423                                 ol_with_kerberos=found
10424                         fi
10425
10426                 elif test $ol_with_kerberos != auto ; then
10427                         { echo "configure: error: Required Kerberos 5 support not available" 1>&2; exit 1; }
10428                 fi
10429
10430         fi
10431 fi
10432
10433 if test $ol_link_krb5 = yes -a \( $ol_with_kerberos = yes -o \
10434         $ol_with_kerberos = auto -o $ol_with_kerberos = k425 \) ; then
10435
10436         for ac_hdr in kerberosIV/krb.h kerberosIV/des.h
10437 do
10438 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10439 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10440 echo "configure:10441: checking for $ac_hdr" >&5
10441 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10442   echo $ac_n "(cached) $ac_c" 1>&6
10443 else
10444   cat > conftest.$ac_ext <<EOF
10445 #line 10446 "configure"
10446 #include "confdefs.h"
10447 #include <$ac_hdr>
10448 EOF
10449 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10450 { (eval echo configure:10451: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10451 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10452 if test -z "$ac_err"; then
10453   rm -rf conftest*
10454   eval "ac_cv_header_$ac_safe=yes"
10455 else
10456   echo "$ac_err" >&5
10457   echo "configure: failed program was:" >&5
10458   cat conftest.$ac_ext >&5
10459   rm -rf conftest*
10460   eval "ac_cv_header_$ac_safe=no"
10461 fi
10462 rm -f conftest*
10463 fi
10464 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10465   echo "$ac_t""yes" 1>&6
10466     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10467   cat >> confdefs.h <<EOF
10468 #define $ac_tr_hdr 1
10469 EOF
10470  
10471 else
10472   echo "$ac_t""no" 1>&6
10473 fi
10474 done
10475
10476
10477         if test $ac_cv_header_kerberosIV_krb_h = yes ; then
10478                 if test $krb5_impl = mit; then
10479                         echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
10480 echo "configure:10481: checking for main in -lkrb4" >&5
10481 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
10482 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10483   echo $ac_n "(cached) $ac_c" 1>&6
10484 else
10485   ac_save_LIBS="$LIBS"
10486 LIBS="-lkrb4 -ldes425 -lkrb5 -l$krb5crypto -lcom_err $LIBS"
10487 cat > conftest.$ac_ext <<EOF
10488 #line 10489 "configure"
10489 #include "confdefs.h"
10490
10491 int main() {
10492 main()
10493 ; return 0; }
10494 EOF
10495 if { (eval echo configure:10496: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10496   rm -rf conftest*
10497   eval "ac_cv_lib_$ac_lib_var=yes"
10498 else
10499   echo "configure: failed program was:" >&5
10500   cat conftest.$ac_ext >&5
10501   rm -rf conftest*
10502   eval "ac_cv_lib_$ac_lib_var=no"
10503 fi
10504 rm -f conftest*
10505 LIBS="$ac_save_LIBS"
10506
10507 fi
10508 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10509   echo "$ac_t""yes" 1>&6
10510   have_k425=yes
10511                                 KRB4_LIBS="-lkrb4 -ldes425"
10512 else
10513   echo "$ac_t""no" 1>&6
10514 have_k425=no
10515 fi
10516
10517
10518                 elif test $krb5_impl = heimdal; then
10519                         echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
10520 echo "configure:10521: checking for main in -lkrb4" >&5
10521 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
10522 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10523   echo $ac_n "(cached) $ac_c" 1>&6
10524 else
10525   ac_save_LIBS="$LIBS"
10526 LIBS="-lkrb4 -lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err $LIBS"
10527 cat > conftest.$ac_ext <<EOF
10528 #line 10529 "configure"
10529 #include "confdefs.h"
10530
10531 int main() {
10532 main()
10533 ; return 0; }
10534 EOF
10535 if { (eval echo configure:10536: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10536   rm -rf conftest*
10537   eval "ac_cv_lib_$ac_lib_var=yes"
10538 else
10539   echo "configure: failed program was:" >&5
10540   cat conftest.$ac_ext >&5
10541   rm -rf conftest*
10542   eval "ac_cv_lib_$ac_lib_var=no"
10543 fi
10544 rm -f conftest*
10545 LIBS="$ac_save_LIBS"
10546
10547 fi
10548 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10549   echo "$ac_t""yes" 1>&6
10550   have_k425=yes
10551                                 KRB4_LIBS="-lkrb4"
10552 else
10553   echo "$ac_t""no" 1>&6
10554 have_k425=no
10555 fi
10556
10557
10558                 else
10559                         have_425=no
10560                         echo "configure: warning: Unrecongized Kerberos V Implementation" 1>&2
10561                 fi
10562
10563                 if test $have_k425 = yes ; then
10564                         ol_with_kerberos=found
10565                         ol_link_krb4=yes
10566
10567                         cat >> confdefs.h <<\EOF
10568 #define HAVE_KRB425 1
10569 EOF
10570
10571                         cat >> confdefs.h <<\EOF
10572 #define HAVE_KRB4 1
10573 EOF
10574
10575
10576                         echo $ac_n "checking for des_debug in Kerberos libraries""... $ac_c" 1>&6
10577 echo "configure:10578: checking for des_debug in Kerberos libraries" >&5
10578 if eval "test \"\${ol_cv_var_des_debug+set}\" = set"; then
10579   echo $ac_n "(cached) $ac_c" 1>&6
10580 else
10581   
10582                                                                 save_LIBS="$LIBS"
10583                                 LIBS="$KRB4_LIBS $KRB5_LIBS $LIBS"
10584                                 cat > conftest.$ac_ext <<EOF
10585 #line 10586 "configure"
10586 #include "confdefs.h"
10587
10588 #include <kerberosIV/krb.h>
10589 #include <kerberosIV/des.h>
10590 extern int des_debug;
10591
10592 int main() {
10593
10594 des_debug = 1;
10595
10596 ; return 0; }
10597 EOF
10598 if { (eval echo configure:10599: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10599   rm -rf conftest*
10600   ol_cv_var_des_debug=yes
10601 else
10602   echo "configure: failed program was:" >&5
10603   cat conftest.$ac_ext >&5
10604   rm -rf conftest*
10605   ol_cv_var_des_debug=no
10606 fi
10607 rm -f conftest*
10608                                                                 LIBS="$save_LIBS"
10609                         
10610 fi
10611
10612 echo "$ac_t""$ol_cv_var_des_debug" 1>&6
10613
10614                         if test $ol_cv_var_des_debug = yes ; then
10615                                 cat >> confdefs.h <<\EOF
10616 #define HAVE_DES_DEBUG 1
10617 EOF
10618
10619                         fi
10620
10621                         LIBS="$save_LIBS"
10622                 fi
10623         fi
10624 fi
10625
10626 if test $ol_link_krb5 = yes ; then
10627         ol_with_kerberos=found
10628 fi
10629
10630 if test $ol_with_kerberos = yes -o $ol_with_kerberos = auto \
10631         -o $ol_with_kerberos = k4 -o $ol_with_kerberos = kth ; then
10632
10633         for ac_hdr in krb.h des.h krb-archaeology.h 
10634 do
10635 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10636 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10637 echo "configure:10638: checking for $ac_hdr" >&5
10638 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10639   echo $ac_n "(cached) $ac_c" 1>&6
10640 else
10641   cat > conftest.$ac_ext <<EOF
10642 #line 10643 "configure"
10643 #include "confdefs.h"
10644 #include <$ac_hdr>
10645 EOF
10646 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10647 { (eval echo configure:10648: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10648 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10649 if test -z "$ac_err"; then
10650   rm -rf conftest*
10651   eval "ac_cv_header_$ac_safe=yes"
10652 else
10653   echo "$ac_err" >&5
10654   echo "configure: failed program was:" >&5
10655   cat conftest.$ac_ext >&5
10656   rm -rf conftest*
10657   eval "ac_cv_header_$ac_safe=no"
10658 fi
10659 rm -f conftest*
10660 fi
10661 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10662   echo "$ac_t""yes" 1>&6
10663     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10664   cat >> confdefs.h <<EOF
10665 #define $ac_tr_hdr 1
10666 EOF
10667  
10668 else
10669   echo "$ac_t""no" 1>&6
10670 fi
10671 done
10672
10673
10674         if test $ac_cv_header_krb_h = yes ; then
10675                 echo $ac_n "checking for main in -lkrb""... $ac_c" 1>&6
10676 echo "configure:10677: checking for main in -lkrb" >&5
10677 ac_lib_var=`echo krb'_'main | sed 'y%./+-:%__p__%'`
10678 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10679   echo $ac_n "(cached) $ac_c" 1>&6
10680 else
10681   ac_save_LIBS="$LIBS"
10682 LIBS="-lkrb -ldes $LIBS"
10683 cat > conftest.$ac_ext <<EOF
10684 #line 10685 "configure"
10685 #include "confdefs.h"
10686
10687 int main() {
10688 main()
10689 ; return 0; }
10690 EOF
10691 if { (eval echo configure:10692: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10692   rm -rf conftest*
10693   eval "ac_cv_lib_$ac_lib_var=yes"
10694 else
10695   echo "configure: failed program was:" >&5
10696   cat conftest.$ac_ext >&5
10697   rm -rf conftest*
10698   eval "ac_cv_lib_$ac_lib_var=no"
10699 fi
10700 rm -f conftest*
10701 LIBS="$ac_save_LIBS"
10702
10703 fi
10704 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10705   echo "$ac_t""yes" 1>&6
10706   have_k4=yes
10707 else
10708   echo "$ac_t""no" 1>&6
10709 have_k4=no
10710 fi
10711
10712
10713                 if test $have_k4 = yes ; then
10714                         ol_with_kerberos=found
10715                         ol_link_krb4=yes
10716
10717                         cat >> confdefs.h <<\EOF
10718 #define HAVE_KRB4 1
10719 EOF
10720
10721
10722                         KRB4_LIBS="-lkrb -ldes"
10723
10724                         if test $ac_cv_header_krb_archaeology_h = yes ; then
10725                                 cat >> confdefs.h <<\EOF
10726 #define HAVE_KTH_KERBEROS 1
10727 EOF
10728
10729                         fi
10730                 fi
10731         fi
10732 fi
10733
10734 if test $ol_link_krb4 = yes -a $ol_enable_kbind != no ; then
10735         ol_link_kbind=yes
10736
10737 elif test $ol_enable_kbind = yes ; then
10738         { echo "configure: error: Kerberos IV detection failed" 1>&2; exit 1; }
10739 fi
10740
10741 if test $ol_link_krb4 = yes -o $ol_link_krb5 = yes ; then
10742         cat >> confdefs.h <<\EOF
10743 #define HAVE_KERBEROS 1
10744 EOF
10745
10746
10747 elif test $ol_with_kerberos != auto -a $ol_with_kerberos != no ; then
10748         { echo "configure: error: Kerberos detection failed" 1>&2; exit 1; }
10749 fi
10750
10751 ol_link_tls=no
10752 if test $ol_with_tls != no ; then
10753         for ac_hdr in openssl/ssl.h ssl.h
10754 do
10755 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10756 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10757 echo "configure:10758: checking for $ac_hdr" >&5
10758 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10759   echo $ac_n "(cached) $ac_c" 1>&6
10760 else
10761   cat > conftest.$ac_ext <<EOF
10762 #line 10763 "configure"
10763 #include "confdefs.h"
10764 #include <$ac_hdr>
10765 EOF
10766 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10767 { (eval echo configure:10768: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10768 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10769 if test -z "$ac_err"; then
10770   rm -rf conftest*
10771   eval "ac_cv_header_$ac_safe=yes"
10772 else
10773   echo "$ac_err" >&5
10774   echo "configure: failed program was:" >&5
10775   cat conftest.$ac_ext >&5
10776   rm -rf conftest*
10777   eval "ac_cv_header_$ac_safe=no"
10778 fi
10779 rm -f conftest*
10780 fi
10781 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10782   echo "$ac_t""yes" 1>&6
10783     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10784   cat >> confdefs.h <<EOF
10785 #define $ac_tr_hdr 1
10786 EOF
10787  
10788 else
10789   echo "$ac_t""no" 1>&6
10790 fi
10791 done
10792
10793         
10794         if test $ac_cv_header_openssl_ssl_h = yes \
10795                 -o $ac_cv_header_ssl_h = yes ; then
10796                 echo $ac_n "checking for SSLeay_add_ssl_algorithms in -lssl""... $ac_c" 1>&6
10797 echo "configure:10798: checking for SSLeay_add_ssl_algorithms in -lssl" >&5
10798 ac_lib_var=`echo ssl'_'SSLeay_add_ssl_algorithms | sed 'y%./+-:%__p__%'`
10799 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10800   echo $ac_n "(cached) $ac_c" 1>&6
10801 else
10802   ac_save_LIBS="$LIBS"
10803 LIBS="-lssl -lcrypto $LIBS"
10804 cat > conftest.$ac_ext <<EOF
10805 #line 10806 "configure"
10806 #include "confdefs.h"
10807 /* Override any gcc2 internal prototype to avoid an error.  */
10808 /* We use char because int might match the return type of a gcc2
10809     builtin and then its argument prototype would still apply.  */
10810 char SSLeay_add_ssl_algorithms();
10811
10812 int main() {
10813 SSLeay_add_ssl_algorithms()
10814 ; return 0; }
10815 EOF
10816 if { (eval echo configure:10817: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10817   rm -rf conftest*
10818   eval "ac_cv_lib_$ac_lib_var=yes"
10819 else
10820   echo "configure: failed program was:" >&5
10821   cat conftest.$ac_ext >&5
10822   rm -rf conftest*
10823   eval "ac_cv_lib_$ac_lib_var=no"
10824 fi
10825 rm -f conftest*
10826 LIBS="$ac_save_LIBS"
10827
10828 fi
10829 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10830   echo "$ac_t""yes" 1>&6
10831   have_ssleay=yes
10832                         need_rsaref=no
10833 else
10834   echo "$ac_t""no" 1>&6
10835 have_ssleay=no
10836 fi
10837
10838                         
10839                 if test $have_ssleay = no ; then
10840                         echo $ac_n "checking for SSL_library_init in -lssl""... $ac_c" 1>&6
10841 echo "configure:10842: checking for SSL_library_init in -lssl" >&5
10842 ac_lib_var=`echo ssl'_'SSL_library_init | sed 'y%./+-:%__p__%'`
10843 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10844   echo $ac_n "(cached) $ac_c" 1>&6
10845 else
10846   ac_save_LIBS="$LIBS"
10847 LIBS="-lssl -lcrypto $LIBS"
10848 cat > conftest.$ac_ext <<EOF
10849 #line 10850 "configure"
10850 #include "confdefs.h"
10851 /* Override any gcc2 internal prototype to avoid an error.  */
10852 /* We use char because int might match the return type of a gcc2
10853     builtin and then its argument prototype would still apply.  */
10854 char SSL_library_init();
10855
10856 int main() {
10857 SSL_library_init()
10858 ; return 0; }
10859 EOF
10860 if { (eval echo configure:10861: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10861   rm -rf conftest*
10862   eval "ac_cv_lib_$ac_lib_var=yes"
10863 else
10864   echo "configure: failed program was:" >&5
10865   cat conftest.$ac_ext >&5
10866   rm -rf conftest*
10867   eval "ac_cv_lib_$ac_lib_var=no"
10868 fi
10869 rm -f conftest*
10870 LIBS="$ac_save_LIBS"
10871
10872 fi
10873 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10874   echo "$ac_t""yes" 1>&6
10875   have_ssleay=yes
10876                                 need_rsaref=no
10877 else
10878   echo "$ac_t""no" 1>&6
10879 have_ssleay=no
10880 fi
10881
10882                 fi
10883
10884                 if test $have_ssleay = no ; then
10885                         echo $ac_n "checking for ssl3_accept in -lssl""... $ac_c" 1>&6
10886 echo "configure:10887: checking for ssl3_accept in -lssl" >&5
10887 ac_lib_var=`echo ssl'_'ssl3_accept | sed 'y%./+-:%__p__%'`
10888 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10889   echo $ac_n "(cached) $ac_c" 1>&6
10890 else
10891   ac_save_LIBS="$LIBS"
10892 LIBS="-lssl -lcrypto -lRSAglue -lrsaref $LIBS"
10893 cat > conftest.$ac_ext <<EOF
10894 #line 10895 "configure"
10895 #include "confdefs.h"
10896 /* Override any gcc2 internal prototype to avoid an error.  */
10897 /* We use char because int might match the return type of a gcc2
10898     builtin and then its argument prototype would still apply.  */
10899 char ssl3_accept();
10900
10901 int main() {
10902 ssl3_accept()
10903 ; return 0; }
10904 EOF
10905 if { (eval echo configure:10906: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10906   rm -rf conftest*
10907   eval "ac_cv_lib_$ac_lib_var=yes"
10908 else
10909   echo "configure: failed program was:" >&5
10910   cat conftest.$ac_ext >&5
10911   rm -rf conftest*
10912   eval "ac_cv_lib_$ac_lib_var=no"
10913 fi
10914 rm -f conftest*
10915 LIBS="$ac_save_LIBS"
10916
10917 fi
10918 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10919   echo "$ac_t""yes" 1>&6
10920   have_ssleay=yes
10921                                 need_rsaref=yes
10922 else
10923   echo "$ac_t""no" 1>&6
10924 have_ssleay=no
10925 fi
10926
10927                 fi
10928
10929                 if test $have_ssleay = yes ; then
10930                         ol_with_tls=found
10931                         ol_link_tls=yes
10932
10933                         cat >> confdefs.h <<\EOF
10934 #define HAVE_SSLEAY 1
10935 EOF
10936
10937
10938                         if test $need_rsaref = yes; then
10939                                 cat >> confdefs.h <<\EOF
10940 #define HAVE_RSAREF 1
10941 EOF
10942
10943
10944                                 TLS_LIBS="-lssl -lcrypto -lRSAglue -lrsaref"
10945                         else
10946                                 TLS_LIBS="-lssl -lcrypto"
10947                         fi
10948                 fi
10949         fi
10950
10951 else
10952         echo "configure: warning: TLS data protection not supported!" 1>&2
10953 fi
10954
10955 WITH_TLS=no
10956 if test $ol_link_tls = yes ; then
10957         cat >> confdefs.h <<\EOF
10958 #define HAVE_TLS 1
10959 EOF
10960
10961         WITH_TLS=yes
10962
10963 elif test $ol_with_tls = auto ; then
10964         echo "configure: warning: Could not locate TLS/SSL package" 1>&2
10965         echo "configure: warning: TLS data protection not supported!" 1>&2
10966
10967 elif test $ol_with_tls != no ; then
10968         { echo "configure: error: Could not locate TLS/SSL package" 1>&2; exit 1; }
10969 fi
10970
10971 if test $ol_enable_lmpasswd != no; then
10972         if test $ol_link_tls != yes ; then
10973                 { echo "configure: error: LAN Manager passwords require OpenSSL" 1>&2; exit 1; }
10974         fi
10975
10976         cat >> confdefs.h <<\EOF
10977 #define SLAPD_LMHASH 1
10978 EOF
10979
10980 fi
10981
10982 ol_link_threads=no
10983
10984 if test $ol_with_threads = auto -o $ol_with_threads = yes \
10985         -o $ol_with_threads = nt ; then
10986
10987         
10988         echo $ac_n "checking for _beginthread""... $ac_c" 1>&6
10989 echo "configure:10990: checking for _beginthread" >&5
10990 if eval "test \"\${ac_cv_func__beginthread+set}\" = set"; then
10991   echo $ac_n "(cached) $ac_c" 1>&6
10992 else
10993   cat > conftest.$ac_ext <<EOF
10994 #line 10995 "configure"
10995 #include "confdefs.h"
10996 /* System header to define __stub macros and hopefully few prototypes,
10997     which can conflict with char _beginthread(); below.  */
10998 #include <assert.h>
10999 /* Override any gcc2 internal prototype to avoid an error.  */
11000 /* We use char because int might match the return type of a gcc2
11001     builtin and then its argument prototype would still apply.  */
11002 char _beginthread();
11003 char (*f)();
11004
11005 int main() {
11006
11007 /* The GNU C library defines this for functions which it implements
11008     to always fail with ENOSYS.  Some functions are actually named
11009     something starting with __ and the normal name is an alias.  */
11010 #if defined (__stub__beginthread) || defined (__stub____beginthread)
11011 choke me
11012 #else
11013 f = _beginthread;
11014 #endif
11015
11016 ; return 0; }
11017 EOF
11018 if { (eval echo configure:11019: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11019   rm -rf conftest*
11020   eval "ac_cv_func__beginthread=yes"
11021 else
11022   echo "configure: failed program was:" >&5
11023   cat conftest.$ac_ext >&5
11024   rm -rf conftest*
11025   eval "ac_cv_func__beginthread=no"
11026 fi
11027 rm -f conftest*
11028 fi
11029
11030 if eval "test \"`echo '$ac_cv_func_'_beginthread`\" = yes"; then
11031   echo "$ac_t""yes" 1>&6
11032   :
11033 else
11034   echo "$ac_t""no" 1>&6
11035 fi
11036
11037
11038         if test $ac_cv_func__beginthread = yes ; then
11039                 cat >> confdefs.h <<\EOF
11040 #define HAVE_NT_THREADS 1
11041 EOF
11042
11043                 ol_cv_nt_threads=yes
11044         fi
11045
11046
11047         if test "$ol_cv_nt_threads" = yes ; then
11048                 ol_link_threads=nt
11049                 ol_with_threads=found
11050                 ol_with_yielding_select=yes
11051
11052                 cat >> confdefs.h <<\EOF
11053 #define HAVE_NT_SERVICE_MANAGER 1
11054 EOF
11055
11056                 cat >> confdefs.h <<\EOF
11057 #define HAVE_NT_EVENT_LOG 1
11058 EOF
11059
11060         fi
11061
11062         if test $ol_with_threads = nt ; then
11063                 { echo "configure: error: could not locate NT Threads" 1>&2; exit 1; }
11064         fi
11065 fi
11066
11067 if test $ol_with_threads = auto -o $ol_with_threads = yes \
11068         -o $ol_with_threads = posix ; then
11069
11070         for ac_hdr in pthread.h
11071 do
11072 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11073 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11074 echo "configure:11075: checking for $ac_hdr" >&5
11075 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11076   echo $ac_n "(cached) $ac_c" 1>&6
11077 else
11078   cat > conftest.$ac_ext <<EOF
11079 #line 11080 "configure"
11080 #include "confdefs.h"
11081 #include <$ac_hdr>
11082 EOF
11083 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11084 { (eval echo configure:11085: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11085 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11086 if test -z "$ac_err"; then
11087   rm -rf conftest*
11088   eval "ac_cv_header_$ac_safe=yes"
11089 else
11090   echo "$ac_err" >&5
11091   echo "configure: failed program was:" >&5
11092   cat conftest.$ac_ext >&5
11093   rm -rf conftest*
11094   eval "ac_cv_header_$ac_safe=no"
11095 fi
11096 rm -f conftest*
11097 fi
11098 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11099   echo "$ac_t""yes" 1>&6
11100     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11101   cat >> confdefs.h <<EOF
11102 #define $ac_tr_hdr 1
11103 EOF
11104  
11105 else
11106   echo "$ac_t""no" 1>&6
11107 fi
11108 done
11109
11110
11111         if test $ac_cv_header_pthread_h = yes ; then
11112                 echo $ac_n "checking POSIX thread version""... $ac_c" 1>&6
11113 echo "configure:11114: checking POSIX thread version" >&5
11114 if eval "test \"\${ol_cv_pthread_version+set}\" = set"; then
11115   echo $ac_n "(cached) $ac_c" 1>&6
11116 else
11117   
11118         cat > conftest.$ac_ext <<EOF
11119 #line 11120 "configure"
11120 #include "confdefs.h"
11121
11122 #               include <pthread.h>
11123         
11124 int main() {
11125
11126                 int i = PTHREAD_CREATE_JOINABLE;
11127         
11128 ; return 0; }
11129 EOF
11130 if { (eval echo configure:11131: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11131   rm -rf conftest*
11132   
11133         cat > conftest.$ac_ext <<EOF
11134 #line 11135 "configure"
11135 #include "confdefs.h"
11136 #include <pthread.h>
11137 EOF
11138 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11139   egrep "pthread_detach" >/dev/null 2>&1; then
11140   rm -rf conftest*
11141   ol_cv_pthread_version=10
11142 else
11143   rm -rf conftest*
11144   ol_cv_pthread_version=8
11145 fi
11146 rm -f conftest*
11147
11148 else
11149   echo "configure: failed program was:" >&5
11150   cat conftest.$ac_ext >&5
11151   rm -rf conftest*
11152   
11153         cat > conftest.$ac_ext <<EOF
11154 #line 11155 "configure"
11155 #include "confdefs.h"
11156
11157 #               include <pthread.h>
11158 #               ifdef PTHREAD_CREATE_UNDETACHED
11159                 draft7
11160 #               endif
11161         
11162 EOF
11163 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11164   egrep "draft7" >/dev/null 2>&1; then
11165   rm -rf conftest*
11166   ol_cv_pthread_version=7
11167 else
11168   rm -rf conftest*
11169   
11170         cat > conftest.$ac_ext <<EOF
11171 #line 11172 "configure"
11172 #include "confdefs.h"
11173 #include <pthread.h>
11174 EOF
11175 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11176   egrep "pthread_attr_init" >/dev/null 2>&1; then
11177   rm -rf conftest*
11178   ol_cv_pthread_version=6
11179 else
11180   rm -rf conftest*
11181   
11182         cat > conftest.$ac_ext <<EOF
11183 #line 11184 "configure"
11184 #include "confdefs.h"
11185
11186 #               include <pthread.h>
11187 #ifdef          PTHREAD_MUTEX_INITIALIZER
11188                 draft5
11189 #endif
11190         
11191 EOF
11192 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11193   egrep "draft5" >/dev/null 2>&1; then
11194   rm -rf conftest*
11195   ol_cv_pthread_version=5
11196 else
11197   rm -rf conftest*
11198   ol_cv_pthread_version=4
11199 fi
11200 rm -f conftest*
11201  
11202 fi
11203 rm -f conftest*
11204  
11205 fi
11206 rm -f conftest*
11207  
11208 fi
11209 rm -f conftest*
11210
11211 fi
11212
11213 echo "$ac_t""$ol_cv_pthread_version" 1>&6
11214
11215
11216                 if test $ol_cv_pthread_version != 0 ; then
11217                         cat >> confdefs.h <<EOF
11218 #define HAVE_PTHREADS $ol_cv_pthread_version
11219 EOF
11220
11221                 else
11222                         { echo "configure: error: unknown pthread version" 1>&2; exit 1; }
11223                 fi
11224
11225                 # consider threads found
11226                 ol_with_threads=found
11227
11228                 
11229         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
11230 echo "configure:11231: checking for LinuxThreads pthread.h" >&5
11231 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
11232   echo $ac_n "(cached) $ac_c" 1>&6
11233 else
11234   cat > conftest.$ac_ext <<EOF
11235 #line 11236 "configure"
11236 #include "confdefs.h"
11237 #include <pthread.h>
11238 EOF
11239 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11240   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
11241   rm -rf conftest*
11242   ol_cv_header_linux_threads=yes
11243 else
11244   rm -rf conftest*
11245   ol_cv_header_linux_threads=no
11246 fi
11247 rm -f conftest*
11248
11249                 
11250 fi
11251
11252 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
11253         if test $ol_cv_header_linux_threads = yes; then
11254                 cat >> confdefs.h <<\EOF
11255 #define HAVE_LINUX_THREADS 1
11256 EOF
11257
11258         fi
11259
11260                 
11261         echo $ac_n "checking for GNU Pth pthread.h""... $ac_c" 1>&6
11262 echo "configure:11263: checking for GNU Pth pthread.h" >&5
11263 if eval "test \"\${ol_cv_header_gnu_pth_pthread_h+set}\" = set"; then
11264   echo $ac_n "(cached) $ac_c" 1>&6
11265 else
11266   cat > conftest.$ac_ext <<EOF
11267 #line 11268 "configure"
11268 #include "confdefs.h"
11269 #include <pthread.h>
11270 #ifdef _POSIX_THREAD_IS_GNU_PTH
11271         __gnu_pth__;
11272 #endif
11273
11274 EOF
11275 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11276   egrep "__gnu_pth__" >/dev/null 2>&1; then
11277   rm -rf conftest*
11278   ol_cv_header_gnu_pth_pthread_h=yes
11279 else
11280   rm -rf conftest*
11281   ol_cv_header_gnu_pth_pthread_h=no
11282 fi
11283 rm -f conftest*
11284
11285                 
11286 fi
11287
11288 echo "$ac_t""$ol_cv_header_gnu_pth_pthread_h" 1>&6
11289
11290
11291                 if test $ol_cv_header_gnu_pth_pthread_h = no ; then
11292                         for ac_hdr in sched.h
11293 do
11294 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11295 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11296 echo "configure:11297: checking for $ac_hdr" >&5
11297 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11298   echo $ac_n "(cached) $ac_c" 1>&6
11299 else
11300   cat > conftest.$ac_ext <<EOF
11301 #line 11302 "configure"
11302 #include "confdefs.h"
11303 #include <$ac_hdr>
11304 EOF
11305 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11306 { (eval echo configure:11307: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11307 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11308 if test -z "$ac_err"; then
11309   rm -rf conftest*
11310   eval "ac_cv_header_$ac_safe=yes"
11311 else
11312   echo "$ac_err" >&5
11313   echo "configure: failed program was:" >&5
11314   cat conftest.$ac_ext >&5
11315   rm -rf conftest*
11316   eval "ac_cv_header_$ac_safe=no"
11317 fi
11318 rm -f conftest*
11319 fi
11320 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11321   echo "$ac_t""yes" 1>&6
11322     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11323   cat >> confdefs.h <<EOF
11324 #define $ac_tr_hdr 1
11325 EOF
11326  
11327 else
11328   echo "$ac_t""no" 1>&6
11329 fi
11330 done
11331
11332                 fi
11333
11334                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
11335                                 echo $ac_n "checking for pthread_create in default libraries""... $ac_c" 1>&6
11336 echo "configure:11337: checking for pthread_create in default libraries" >&5
11337 if eval "test \"\${ol_cv_pthread_create+set}\" = set"; then
11338   echo $ac_n "(cached) $ac_c" 1>&6
11339 else
11340   
11341                 if test "$cross_compiling" = yes; then
11342   cat > conftest.$ac_ext <<EOF
11343 #line 11344 "configure"
11344 #include "confdefs.h"
11345 /* pthread test headers */
11346 #include <pthread.h>
11347 #if HAVE_PTHREADS < 7
11348 #include <errno.h>
11349 #endif
11350 #ifndef NULL
11351 #define NULL (void*)0
11352 #endif
11353
11354 static void *task(p)
11355         void *p;
11356 {
11357         return (void *) (p == NULL);
11358 }
11359
11360 int main() {
11361
11362         /* pthread test function */
11363 #ifndef PTHREAD_CREATE_DETACHED
11364 #define PTHREAD_CREATE_DETACHED 1
11365 #endif
11366         pthread_t t;
11367         int status;
11368         int detach = PTHREAD_CREATE_DETACHED;
11369
11370 #if HAVE_PTHREADS > 4
11371         /* Final pthreads */
11372         pthread_attr_t attr;
11373
11374         status = pthread_attr_init(&attr);
11375         if( status ) return status;
11376
11377 #if HAVE_PTHREADS < 7
11378         status = pthread_attr_setdetachstate(&attr, &detach);
11379         if( status < 0 ) status = errno;
11380 #else
11381         status = pthread_attr_setdetachstate(&attr, detach);
11382 #endif
11383         if( status ) return status;
11384         status = pthread_create( &t, &attr, task, NULL );
11385 #if HAVE_PTHREADS < 7
11386         if( status < 0 ) status = errno;
11387 #endif
11388         if( status ) return status;
11389 #else
11390         /* Draft 4 pthreads */
11391         status = pthread_create( &t, pthread_attr_default, task, NULL );
11392         if( status ) return errno;
11393
11394         /* give thread a chance to complete */
11395         /* it should remain joinable and hence detachable */
11396         sleep( 1 );
11397
11398         status = pthread_detach( &t );
11399         if( status ) return errno;
11400 #endif
11401
11402 #ifdef HAVE_LINUX_THREADS
11403         pthread_kill_other_threads_np();
11404 #endif
11405
11406         return 0;
11407
11408 ; return 0; }
11409 EOF
11410 if { (eval echo configure:11411: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11411   rm -rf conftest*
11412   ol_cv_pthread_create=yes
11413 else
11414   echo "configure: failed program was:" >&5
11415   cat conftest.$ac_ext >&5
11416   rm -rf conftest*
11417   ol_cv_pthread_create=no
11418 fi
11419 rm -f conftest*
11420 else
11421   cat > conftest.$ac_ext <<EOF
11422 #line 11423 "configure"
11423 #include "confdefs.h"
11424 /* pthread test headers */
11425 #include <pthread.h>
11426 #if HAVE_PTHREADS < 7
11427 #include <errno.h>
11428 #endif
11429 #ifndef NULL
11430 #define NULL (void*)0
11431 #endif
11432
11433 static void *task(p)
11434         void *p;
11435 {
11436         return (void *) (p == NULL);
11437 }
11438
11439
11440 int main(argc, argv)
11441         int argc;
11442         char **argv;
11443 {
11444
11445         /* pthread test function */
11446 #ifndef PTHREAD_CREATE_DETACHED
11447 #define PTHREAD_CREATE_DETACHED 1
11448 #endif
11449         pthread_t t;
11450         int status;
11451         int detach = PTHREAD_CREATE_DETACHED;
11452
11453 #if HAVE_PTHREADS > 4
11454         /* Final pthreads */
11455         pthread_attr_t attr;
11456
11457         status = pthread_attr_init(&attr);
11458         if( status ) return status;
11459
11460 #if HAVE_PTHREADS < 7
11461         status = pthread_attr_setdetachstate(&attr, &detach);
11462         if( status < 0 ) status = errno;
11463 #else
11464         status = pthread_attr_setdetachstate(&attr, detach);
11465 #endif
11466         if( status ) return status;
11467         status = pthread_create( &t, &attr, task, NULL );
11468 #if HAVE_PTHREADS < 7
11469         if( status < 0 ) status = errno;
11470 #endif
11471         if( status ) return status;
11472 #else
11473         /* Draft 4 pthreads */
11474         status = pthread_create( &t, pthread_attr_default, task, NULL );
11475         if( status ) return errno;
11476
11477         /* give thread a chance to complete */
11478         /* it should remain joinable and hence detachable */
11479         sleep( 1 );
11480
11481         status = pthread_detach( &t );
11482         if( status ) return errno;
11483 #endif
11484
11485 #ifdef HAVE_LINUX_THREADS
11486         pthread_kill_other_threads_np();
11487 #endif
11488
11489         return 0;
11490
11491 }
11492
11493 EOF
11494 if { (eval echo configure:11495: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11495 then
11496   ol_cv_pthread_create=yes
11497 else
11498   echo "configure: failed program was:" >&5
11499   cat conftest.$ac_ext >&5
11500   rm -fr conftest*
11501   ol_cv_pthread_create=no
11502 fi
11503 rm -fr conftest*
11504 fi
11505
11506 fi
11507
11508 echo "$ac_t""$ol_cv_pthread_create" 1>&6
11509
11510                 if test $ol_cv_pthread_create != no ; then
11511                         ol_link_threads=posix
11512                         ol_link_pthreads=""
11513                 fi
11514                 
11515                 # Pthread try link: -kthread (ol_cv_pthread_kthread)
11516 if test "$ol_link_threads" = no ; then
11517         # try -kthread
11518         echo $ac_n "checking for pthread link with -kthread""... $ac_c" 1>&6
11519 echo "configure:11520: checking for pthread link with -kthread" >&5
11520 if eval "test \"\${ol_cv_pthread_kthread+set}\" = set"; then
11521   echo $ac_n "(cached) $ac_c" 1>&6
11522 else
11523   
11524                 # save the flags
11525                 ol_LIBS="$LIBS"
11526                 LIBS="-kthread $LIBS"
11527
11528                 if test "$cross_compiling" = yes; then
11529   cat > conftest.$ac_ext <<EOF
11530 #line 11531 "configure"
11531 #include "confdefs.h"
11532 /* pthread test headers */
11533 #include <pthread.h>
11534 #if HAVE_PTHREADS < 7
11535 #include <errno.h>
11536 #endif
11537 #ifndef NULL
11538 #define NULL (void*)0
11539 #endif
11540
11541 static void *task(p)
11542         void *p;
11543 {
11544         return (void *) (p == NULL);
11545 }
11546
11547 int main() {
11548
11549         /* pthread test function */
11550 #ifndef PTHREAD_CREATE_DETACHED
11551 #define PTHREAD_CREATE_DETACHED 1
11552 #endif
11553         pthread_t t;
11554         int status;
11555         int detach = PTHREAD_CREATE_DETACHED;
11556
11557 #if HAVE_PTHREADS > 4
11558         /* Final pthreads */
11559         pthread_attr_t attr;
11560
11561         status = pthread_attr_init(&attr);
11562         if( status ) return status;
11563
11564 #if HAVE_PTHREADS < 7
11565         status = pthread_attr_setdetachstate(&attr, &detach);
11566         if( status < 0 ) status = errno;
11567 #else
11568         status = pthread_attr_setdetachstate(&attr, detach);
11569 #endif
11570         if( status ) return status;
11571         status = pthread_create( &t, &attr, task, NULL );
11572 #if HAVE_PTHREADS < 7
11573         if( status < 0 ) status = errno;
11574 #endif
11575         if( status ) return status;
11576 #else
11577         /* Draft 4 pthreads */
11578         status = pthread_create( &t, pthread_attr_default, task, NULL );
11579         if( status ) return errno;
11580
11581         /* give thread a chance to complete */
11582         /* it should remain joinable and hence detachable */
11583         sleep( 1 );
11584
11585         status = pthread_detach( &t );
11586         if( status ) return errno;
11587 #endif
11588
11589 #ifdef HAVE_LINUX_THREADS
11590         pthread_kill_other_threads_np();
11591 #endif
11592
11593         return 0;
11594
11595 ; return 0; }
11596 EOF
11597 if { (eval echo configure:11598: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11598   rm -rf conftest*
11599   ol_cv_pthread_kthread=yes
11600 else
11601   echo "configure: failed program was:" >&5
11602   cat conftest.$ac_ext >&5
11603   rm -rf conftest*
11604   ol_cv_pthread_kthread=no
11605 fi
11606 rm -f conftest*
11607 else
11608   cat > conftest.$ac_ext <<EOF
11609 #line 11610 "configure"
11610 #include "confdefs.h"
11611 /* pthread test headers */
11612 #include <pthread.h>
11613 #if HAVE_PTHREADS < 7
11614 #include <errno.h>
11615 #endif
11616 #ifndef NULL
11617 #define NULL (void*)0
11618 #endif
11619
11620 static void *task(p)
11621         void *p;
11622 {
11623         return (void *) (p == NULL);
11624 }
11625
11626
11627 int main(argc, argv)
11628         int argc;
11629         char **argv;
11630 {
11631
11632         /* pthread test function */
11633 #ifndef PTHREAD_CREATE_DETACHED
11634 #define PTHREAD_CREATE_DETACHED 1
11635 #endif
11636         pthread_t t;
11637         int status;
11638         int detach = PTHREAD_CREATE_DETACHED;
11639
11640 #if HAVE_PTHREADS > 4
11641         /* Final pthreads */
11642         pthread_attr_t attr;
11643
11644         status = pthread_attr_init(&attr);
11645         if( status ) return status;
11646
11647 #if HAVE_PTHREADS < 7
11648         status = pthread_attr_setdetachstate(&attr, &detach);
11649         if( status < 0 ) status = errno;
11650 #else
11651         status = pthread_attr_setdetachstate(&attr, detach);
11652 #endif
11653         if( status ) return status;
11654         status = pthread_create( &t, &attr, task, NULL );
11655 #if HAVE_PTHREADS < 7
11656         if( status < 0 ) status = errno;
11657 #endif
11658         if( status ) return status;
11659 #else
11660         /* Draft 4 pthreads */
11661         status = pthread_create( &t, pthread_attr_default, task, NULL );
11662         if( status ) return errno;
11663
11664         /* give thread a chance to complete */
11665         /* it should remain joinable and hence detachable */
11666         sleep( 1 );
11667
11668         status = pthread_detach( &t );
11669         if( status ) return errno;
11670 #endif
11671
11672 #ifdef HAVE_LINUX_THREADS
11673         pthread_kill_other_threads_np();
11674 #endif
11675
11676         return 0;
11677
11678 }
11679
11680 EOF
11681 if { (eval echo configure:11682: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11682 then
11683   ol_cv_pthread_kthread=yes
11684 else
11685   echo "configure: failed program was:" >&5
11686   cat conftest.$ac_ext >&5
11687   rm -fr conftest*
11688   ol_cv_pthread_kthread=no
11689 fi
11690 rm -fr conftest*
11691 fi
11692
11693
11694                 # restore the LIBS
11695                 LIBS="$ol_LIBS"
11696         
11697 fi
11698
11699 echo "$ac_t""$ol_cv_pthread_kthread" 1>&6
11700
11701         if test $ol_cv_pthread_kthread = yes ; then
11702                 ol_link_pthreads="-kthread"
11703                 ol_link_threads=posix
11704         fi
11705 fi
11706
11707                 # Pthread try link: -pthread (ol_cv_pthread_pthread)
11708 if test "$ol_link_threads" = no ; then
11709         # try -pthread
11710         echo $ac_n "checking for pthread link with -pthread""... $ac_c" 1>&6
11711 echo "configure:11712: checking for pthread link with -pthread" >&5
11712 if eval "test \"\${ol_cv_pthread_pthread+set}\" = set"; then
11713   echo $ac_n "(cached) $ac_c" 1>&6
11714 else
11715   
11716                 # save the flags
11717                 ol_LIBS="$LIBS"
11718                 LIBS="-pthread $LIBS"
11719
11720                 if test "$cross_compiling" = yes; then
11721   cat > conftest.$ac_ext <<EOF
11722 #line 11723 "configure"
11723 #include "confdefs.h"
11724 /* pthread test headers */
11725 #include <pthread.h>
11726 #if HAVE_PTHREADS < 7
11727 #include <errno.h>
11728 #endif
11729 #ifndef NULL
11730 #define NULL (void*)0
11731 #endif
11732
11733 static void *task(p)
11734         void *p;
11735 {
11736         return (void *) (p == NULL);
11737 }
11738
11739 int main() {
11740
11741         /* pthread test function */
11742 #ifndef PTHREAD_CREATE_DETACHED
11743 #define PTHREAD_CREATE_DETACHED 1
11744 #endif
11745         pthread_t t;
11746         int status;
11747         int detach = PTHREAD_CREATE_DETACHED;
11748
11749 #if HAVE_PTHREADS > 4
11750         /* Final pthreads */
11751         pthread_attr_t attr;
11752
11753         status = pthread_attr_init(&attr);
11754         if( status ) return status;
11755
11756 #if HAVE_PTHREADS < 7
11757         status = pthread_attr_setdetachstate(&attr, &detach);
11758         if( status < 0 ) status = errno;
11759 #else
11760         status = pthread_attr_setdetachstate(&attr, detach);
11761 #endif
11762         if( status ) return status;
11763         status = pthread_create( &t, &attr, task, NULL );
11764 #if HAVE_PTHREADS < 7
11765         if( status < 0 ) status = errno;
11766 #endif
11767         if( status ) return status;
11768 #else
11769         /* Draft 4 pthreads */
11770         status = pthread_create( &t, pthread_attr_default, task, NULL );
11771         if( status ) return errno;
11772
11773         /* give thread a chance to complete */
11774         /* it should remain joinable and hence detachable */
11775         sleep( 1 );
11776
11777         status = pthread_detach( &t );
11778         if( status ) return errno;
11779 #endif
11780
11781 #ifdef HAVE_LINUX_THREADS
11782         pthread_kill_other_threads_np();
11783 #endif
11784
11785         return 0;
11786
11787 ; return 0; }
11788 EOF
11789 if { (eval echo configure:11790: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11790   rm -rf conftest*
11791   ol_cv_pthread_pthread=yes
11792 else
11793   echo "configure: failed program was:" >&5
11794   cat conftest.$ac_ext >&5
11795   rm -rf conftest*
11796   ol_cv_pthread_pthread=no
11797 fi
11798 rm -f conftest*
11799 else
11800   cat > conftest.$ac_ext <<EOF
11801 #line 11802 "configure"
11802 #include "confdefs.h"
11803 /* pthread test headers */
11804 #include <pthread.h>
11805 #if HAVE_PTHREADS < 7
11806 #include <errno.h>
11807 #endif
11808 #ifndef NULL
11809 #define NULL (void*)0
11810 #endif
11811
11812 static void *task(p)
11813         void *p;
11814 {
11815         return (void *) (p == NULL);
11816 }
11817
11818
11819 int main(argc, argv)
11820         int argc;
11821         char **argv;
11822 {
11823
11824         /* pthread test function */
11825 #ifndef PTHREAD_CREATE_DETACHED
11826 #define PTHREAD_CREATE_DETACHED 1
11827 #endif
11828         pthread_t t;
11829         int status;
11830         int detach = PTHREAD_CREATE_DETACHED;
11831
11832 #if HAVE_PTHREADS > 4
11833         /* Final pthreads */
11834         pthread_attr_t attr;
11835
11836         status = pthread_attr_init(&attr);
11837         if( status ) return status;
11838
11839 #if HAVE_PTHREADS < 7
11840         status = pthread_attr_setdetachstate(&attr, &detach);
11841         if( status < 0 ) status = errno;
11842 #else
11843         status = pthread_attr_setdetachstate(&attr, detach);
11844 #endif
11845         if( status ) return status;
11846         status = pthread_create( &t, &attr, task, NULL );
11847 #if HAVE_PTHREADS < 7
11848         if( status < 0 ) status = errno;
11849 #endif
11850         if( status ) return status;
11851 #else
11852         /* Draft 4 pthreads */
11853         status = pthread_create( &t, pthread_attr_default, task, NULL );
11854         if( status ) return errno;
11855
11856         /* give thread a chance to complete */
11857         /* it should remain joinable and hence detachable */
11858         sleep( 1 );
11859
11860         status = pthread_detach( &t );
11861         if( status ) return errno;
11862 #endif
11863
11864 #ifdef HAVE_LINUX_THREADS
11865         pthread_kill_other_threads_np();
11866 #endif
11867
11868         return 0;
11869
11870 }
11871
11872 EOF
11873 if { (eval echo configure:11874: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11874 then
11875   ol_cv_pthread_pthread=yes
11876 else
11877   echo "configure: failed program was:" >&5
11878   cat conftest.$ac_ext >&5
11879   rm -fr conftest*
11880   ol_cv_pthread_pthread=no
11881 fi
11882 rm -fr conftest*
11883 fi
11884
11885
11886                 # restore the LIBS
11887                 LIBS="$ol_LIBS"
11888         
11889 fi
11890
11891 echo "$ac_t""$ol_cv_pthread_pthread" 1>&6
11892
11893         if test $ol_cv_pthread_pthread = yes ; then
11894                 ol_link_pthreads="-pthread"
11895                 ol_link_threads=posix
11896         fi
11897 fi
11898
11899                 # Pthread try link: -pthreads (ol_cv_pthread_pthreads)
11900 if test "$ol_link_threads" = no ; then
11901         # try -pthreads
11902         echo $ac_n "checking for pthread link with -pthreads""... $ac_c" 1>&6
11903 echo "configure:11904: checking for pthread link with -pthreads" >&5
11904 if eval "test \"\${ol_cv_pthread_pthreads+set}\" = set"; then
11905   echo $ac_n "(cached) $ac_c" 1>&6
11906 else
11907   
11908                 # save the flags
11909                 ol_LIBS="$LIBS"
11910                 LIBS="-pthreads $LIBS"
11911
11912                 if test "$cross_compiling" = yes; then
11913   cat > conftest.$ac_ext <<EOF
11914 #line 11915 "configure"
11915 #include "confdefs.h"
11916 /* pthread test headers */
11917 #include <pthread.h>
11918 #if HAVE_PTHREADS < 7
11919 #include <errno.h>
11920 #endif
11921 #ifndef NULL
11922 #define NULL (void*)0
11923 #endif
11924
11925 static void *task(p)
11926         void *p;
11927 {
11928         return (void *) (p == NULL);
11929 }
11930
11931 int main() {
11932
11933         /* pthread test function */
11934 #ifndef PTHREAD_CREATE_DETACHED
11935 #define PTHREAD_CREATE_DETACHED 1
11936 #endif
11937         pthread_t t;
11938         int status;
11939         int detach = PTHREAD_CREATE_DETACHED;
11940
11941 #if HAVE_PTHREADS > 4
11942         /* Final pthreads */
11943         pthread_attr_t attr;
11944
11945         status = pthread_attr_init(&attr);
11946         if( status ) return status;
11947
11948 #if HAVE_PTHREADS < 7
11949         status = pthread_attr_setdetachstate(&attr, &detach);
11950         if( status < 0 ) status = errno;
11951 #else
11952         status = pthread_attr_setdetachstate(&attr, detach);
11953 #endif
11954         if( status ) return status;
11955         status = pthread_create( &t, &attr, task, NULL );
11956 #if HAVE_PTHREADS < 7
11957         if( status < 0 ) status = errno;
11958 #endif
11959         if( status ) return status;
11960 #else
11961         /* Draft 4 pthreads */
11962         status = pthread_create( &t, pthread_attr_default, task, NULL );
11963         if( status ) return errno;
11964
11965         /* give thread a chance to complete */
11966         /* it should remain joinable and hence detachable */
11967         sleep( 1 );
11968
11969         status = pthread_detach( &t );
11970         if( status ) return errno;
11971 #endif
11972
11973 #ifdef HAVE_LINUX_THREADS
11974         pthread_kill_other_threads_np();
11975 #endif
11976
11977         return 0;
11978
11979 ; return 0; }
11980 EOF
11981 if { (eval echo configure:11982: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11982   rm -rf conftest*
11983   ol_cv_pthread_pthreads=yes
11984 else
11985   echo "configure: failed program was:" >&5
11986   cat conftest.$ac_ext >&5
11987   rm -rf conftest*
11988   ol_cv_pthread_pthreads=no
11989 fi
11990 rm -f conftest*
11991 else
11992   cat > conftest.$ac_ext <<EOF
11993 #line 11994 "configure"
11994 #include "confdefs.h"
11995 /* pthread test headers */
11996 #include <pthread.h>
11997 #if HAVE_PTHREADS < 7
11998 #include <errno.h>
11999 #endif
12000 #ifndef NULL
12001 #define NULL (void*)0
12002 #endif
12003
12004 static void *task(p)
12005         void *p;
12006 {
12007         return (void *) (p == NULL);
12008 }
12009
12010
12011 int main(argc, argv)
12012         int argc;
12013         char **argv;
12014 {
12015
12016         /* pthread test function */
12017 #ifndef PTHREAD_CREATE_DETACHED
12018 #define PTHREAD_CREATE_DETACHED 1
12019 #endif
12020         pthread_t t;
12021         int status;
12022         int detach = PTHREAD_CREATE_DETACHED;
12023
12024 #if HAVE_PTHREADS > 4
12025         /* Final pthreads */
12026         pthread_attr_t attr;
12027
12028         status = pthread_attr_init(&attr);
12029         if( status ) return status;
12030
12031 #if HAVE_PTHREADS < 7
12032         status = pthread_attr_setdetachstate(&attr, &detach);
12033         if( status < 0 ) status = errno;
12034 #else
12035         status = pthread_attr_setdetachstate(&attr, detach);
12036 #endif
12037         if( status ) return status;
12038         status = pthread_create( &t, &attr, task, NULL );
12039 #if HAVE_PTHREADS < 7
12040         if( status < 0 ) status = errno;
12041 #endif
12042         if( status ) return status;
12043 #else
12044         /* Draft 4 pthreads */
12045         status = pthread_create( &t, pthread_attr_default, task, NULL );
12046         if( status ) return errno;
12047
12048         /* give thread a chance to complete */
12049         /* it should remain joinable and hence detachable */
12050         sleep( 1 );
12051
12052         status = pthread_detach( &t );
12053         if( status ) return errno;
12054 #endif
12055
12056 #ifdef HAVE_LINUX_THREADS
12057         pthread_kill_other_threads_np();
12058 #endif
12059
12060         return 0;
12061
12062 }
12063
12064 EOF
12065 if { (eval echo configure:12066: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12066 then
12067   ol_cv_pthread_pthreads=yes
12068 else
12069   echo "configure: failed program was:" >&5
12070   cat conftest.$ac_ext >&5
12071   rm -fr conftest*
12072   ol_cv_pthread_pthreads=no
12073 fi
12074 rm -fr conftest*
12075 fi
12076
12077
12078                 # restore the LIBS
12079                 LIBS="$ol_LIBS"
12080         
12081 fi
12082
12083 echo "$ac_t""$ol_cv_pthread_pthreads" 1>&6
12084
12085         if test $ol_cv_pthread_pthreads = yes ; then
12086                 ol_link_pthreads="-pthreads"
12087                 ol_link_threads=posix
12088         fi
12089 fi
12090
12091                 # Pthread try link: -mthreads (ol_cv_pthread_mthreads)
12092 if test "$ol_link_threads" = no ; then
12093         # try -mthreads
12094         echo $ac_n "checking for pthread link with -mthreads""... $ac_c" 1>&6
12095 echo "configure:12096: checking for pthread link with -mthreads" >&5
12096 if eval "test \"\${ol_cv_pthread_mthreads+set}\" = set"; then
12097   echo $ac_n "(cached) $ac_c" 1>&6
12098 else
12099   
12100                 # save the flags
12101                 ol_LIBS="$LIBS"
12102                 LIBS="-mthreads $LIBS"
12103
12104                 if test "$cross_compiling" = yes; then
12105   cat > conftest.$ac_ext <<EOF
12106 #line 12107 "configure"
12107 #include "confdefs.h"
12108 /* pthread test headers */
12109 #include <pthread.h>
12110 #if HAVE_PTHREADS < 7
12111 #include <errno.h>
12112 #endif
12113 #ifndef NULL
12114 #define NULL (void*)0
12115 #endif
12116
12117 static void *task(p)
12118         void *p;
12119 {
12120         return (void *) (p == NULL);
12121 }
12122
12123 int main() {
12124
12125         /* pthread test function */
12126 #ifndef PTHREAD_CREATE_DETACHED
12127 #define PTHREAD_CREATE_DETACHED 1
12128 #endif
12129         pthread_t t;
12130         int status;
12131         int detach = PTHREAD_CREATE_DETACHED;
12132
12133 #if HAVE_PTHREADS > 4
12134         /* Final pthreads */
12135         pthread_attr_t attr;
12136
12137         status = pthread_attr_init(&attr);
12138         if( status ) return status;
12139
12140 #if HAVE_PTHREADS < 7
12141         status = pthread_attr_setdetachstate(&attr, &detach);
12142         if( status < 0 ) status = errno;
12143 #else
12144         status = pthread_attr_setdetachstate(&attr, detach);
12145 #endif
12146         if( status ) return status;
12147         status = pthread_create( &t, &attr, task, NULL );
12148 #if HAVE_PTHREADS < 7
12149         if( status < 0 ) status = errno;
12150 #endif
12151         if( status ) return status;
12152 #else
12153         /* Draft 4 pthreads */
12154         status = pthread_create( &t, pthread_attr_default, task, NULL );
12155         if( status ) return errno;
12156
12157         /* give thread a chance to complete */
12158         /* it should remain joinable and hence detachable */
12159         sleep( 1 );
12160
12161         status = pthread_detach( &t );
12162         if( status ) return errno;
12163 #endif
12164
12165 #ifdef HAVE_LINUX_THREADS
12166         pthread_kill_other_threads_np();
12167 #endif
12168
12169         return 0;
12170
12171 ; return 0; }
12172 EOF
12173 if { (eval echo configure:12174: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12174   rm -rf conftest*
12175   ol_cv_pthread_mthreads=yes
12176 else
12177   echo "configure: failed program was:" >&5
12178   cat conftest.$ac_ext >&5
12179   rm -rf conftest*
12180   ol_cv_pthread_mthreads=no
12181 fi
12182 rm -f conftest*
12183 else
12184   cat > conftest.$ac_ext <<EOF
12185 #line 12186 "configure"
12186 #include "confdefs.h"
12187 /* pthread test headers */
12188 #include <pthread.h>
12189 #if HAVE_PTHREADS < 7
12190 #include <errno.h>
12191 #endif
12192 #ifndef NULL
12193 #define NULL (void*)0
12194 #endif
12195
12196 static void *task(p)
12197         void *p;
12198 {
12199         return (void *) (p == NULL);
12200 }
12201
12202
12203 int main(argc, argv)
12204         int argc;
12205         char **argv;
12206 {
12207
12208         /* pthread test function */
12209 #ifndef PTHREAD_CREATE_DETACHED
12210 #define PTHREAD_CREATE_DETACHED 1
12211 #endif
12212         pthread_t t;
12213         int status;
12214         int detach = PTHREAD_CREATE_DETACHED;
12215
12216 #if HAVE_PTHREADS > 4
12217         /* Final pthreads */
12218         pthread_attr_t attr;
12219
12220         status = pthread_attr_init(&attr);
12221         if( status ) return status;
12222
12223 #if HAVE_PTHREADS < 7
12224         status = pthread_attr_setdetachstate(&attr, &detach);
12225         if( status < 0 ) status = errno;
12226 #else
12227         status = pthread_attr_setdetachstate(&attr, detach);
12228 #endif
12229         if( status ) return status;
12230         status = pthread_create( &t, &attr, task, NULL );
12231 #if HAVE_PTHREADS < 7
12232         if( status < 0 ) status = errno;
12233 #endif
12234         if( status ) return status;
12235 #else
12236         /* Draft 4 pthreads */
12237         status = pthread_create( &t, pthread_attr_default, task, NULL );
12238         if( status ) return errno;
12239
12240         /* give thread a chance to complete */
12241         /* it should remain joinable and hence detachable */
12242         sleep( 1 );
12243
12244         status = pthread_detach( &t );
12245         if( status ) return errno;
12246 #endif
12247
12248 #ifdef HAVE_LINUX_THREADS
12249         pthread_kill_other_threads_np();
12250 #endif
12251
12252         return 0;
12253
12254 }
12255
12256 EOF
12257 if { (eval echo configure:12258: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12258 then
12259   ol_cv_pthread_mthreads=yes
12260 else
12261   echo "configure: failed program was:" >&5
12262   cat conftest.$ac_ext >&5
12263   rm -fr conftest*
12264   ol_cv_pthread_mthreads=no
12265 fi
12266 rm -fr conftest*
12267 fi
12268
12269
12270                 # restore the LIBS
12271                 LIBS="$ol_LIBS"
12272         
12273 fi
12274
12275 echo "$ac_t""$ol_cv_pthread_mthreads" 1>&6
12276
12277         if test $ol_cv_pthread_mthreads = yes ; then
12278                 ol_link_pthreads="-mthreads"
12279                 ol_link_threads=posix
12280         fi
12281 fi
12282
12283                 # Pthread try link: -thread (ol_cv_pthread_thread)
12284 if test "$ol_link_threads" = no ; then
12285         # try -thread
12286         echo $ac_n "checking for pthread link with -thread""... $ac_c" 1>&6
12287 echo "configure:12288: checking for pthread link with -thread" >&5
12288 if eval "test \"\${ol_cv_pthread_thread+set}\" = set"; then
12289   echo $ac_n "(cached) $ac_c" 1>&6
12290 else
12291   
12292                 # save the flags
12293                 ol_LIBS="$LIBS"
12294                 LIBS="-thread $LIBS"
12295
12296                 if test "$cross_compiling" = yes; then
12297   cat > conftest.$ac_ext <<EOF
12298 #line 12299 "configure"
12299 #include "confdefs.h"
12300 /* pthread test headers */
12301 #include <pthread.h>
12302 #if HAVE_PTHREADS < 7
12303 #include <errno.h>
12304 #endif
12305 #ifndef NULL
12306 #define NULL (void*)0
12307 #endif
12308
12309 static void *task(p)
12310         void *p;
12311 {
12312         return (void *) (p == NULL);
12313 }
12314
12315 int main() {
12316
12317         /* pthread test function */
12318 #ifndef PTHREAD_CREATE_DETACHED
12319 #define PTHREAD_CREATE_DETACHED 1
12320 #endif
12321         pthread_t t;
12322         int status;
12323         int detach = PTHREAD_CREATE_DETACHED;
12324
12325 #if HAVE_PTHREADS > 4
12326         /* Final pthreads */
12327         pthread_attr_t attr;
12328
12329         status = pthread_attr_init(&attr);
12330         if( status ) return status;
12331
12332 #if HAVE_PTHREADS < 7
12333         status = pthread_attr_setdetachstate(&attr, &detach);
12334         if( status < 0 ) status = errno;
12335 #else
12336         status = pthread_attr_setdetachstate(&attr, detach);
12337 #endif
12338         if( status ) return status;
12339         status = pthread_create( &t, &attr, task, NULL );
12340 #if HAVE_PTHREADS < 7
12341         if( status < 0 ) status = errno;
12342 #endif
12343         if( status ) return status;
12344 #else
12345         /* Draft 4 pthreads */
12346         status = pthread_create( &t, pthread_attr_default, task, NULL );
12347         if( status ) return errno;
12348
12349         /* give thread a chance to complete */
12350         /* it should remain joinable and hence detachable */
12351         sleep( 1 );
12352
12353         status = pthread_detach( &t );
12354         if( status ) return errno;
12355 #endif
12356
12357 #ifdef HAVE_LINUX_THREADS
12358         pthread_kill_other_threads_np();
12359 #endif
12360
12361         return 0;
12362
12363 ; return 0; }
12364 EOF
12365 if { (eval echo configure:12366: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12366   rm -rf conftest*
12367   ol_cv_pthread_thread=yes
12368 else
12369   echo "configure: failed program was:" >&5
12370   cat conftest.$ac_ext >&5
12371   rm -rf conftest*
12372   ol_cv_pthread_thread=no
12373 fi
12374 rm -f conftest*
12375 else
12376   cat > conftest.$ac_ext <<EOF
12377 #line 12378 "configure"
12378 #include "confdefs.h"
12379 /* pthread test headers */
12380 #include <pthread.h>
12381 #if HAVE_PTHREADS < 7
12382 #include <errno.h>
12383 #endif
12384 #ifndef NULL
12385 #define NULL (void*)0
12386 #endif
12387
12388 static void *task(p)
12389         void *p;
12390 {
12391         return (void *) (p == NULL);
12392 }
12393
12394
12395 int main(argc, argv)
12396         int argc;
12397         char **argv;
12398 {
12399
12400         /* pthread test function */
12401 #ifndef PTHREAD_CREATE_DETACHED
12402 #define PTHREAD_CREATE_DETACHED 1
12403 #endif
12404         pthread_t t;
12405         int status;
12406         int detach = PTHREAD_CREATE_DETACHED;
12407
12408 #if HAVE_PTHREADS > 4
12409         /* Final pthreads */
12410         pthread_attr_t attr;
12411
12412         status = pthread_attr_init(&attr);
12413         if( status ) return status;
12414
12415 #if HAVE_PTHREADS < 7
12416         status = pthread_attr_setdetachstate(&attr, &detach);
12417         if( status < 0 ) status = errno;
12418 #else
12419         status = pthread_attr_setdetachstate(&attr, detach);
12420 #endif
12421         if( status ) return status;
12422         status = pthread_create( &t, &attr, task, NULL );
12423 #if HAVE_PTHREADS < 7
12424         if( status < 0 ) status = errno;
12425 #endif
12426         if( status ) return status;
12427 #else
12428         /* Draft 4 pthreads */
12429         status = pthread_create( &t, pthread_attr_default, task, NULL );
12430         if( status ) return errno;
12431
12432         /* give thread a chance to complete */
12433         /* it should remain joinable and hence detachable */
12434         sleep( 1 );
12435
12436         status = pthread_detach( &t );
12437         if( status ) return errno;
12438 #endif
12439
12440 #ifdef HAVE_LINUX_THREADS
12441         pthread_kill_other_threads_np();
12442 #endif
12443
12444         return 0;
12445
12446 }
12447
12448 EOF
12449 if { (eval echo configure:12450: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12450 then
12451   ol_cv_pthread_thread=yes
12452 else
12453   echo "configure: failed program was:" >&5
12454   cat conftest.$ac_ext >&5
12455   rm -fr conftest*
12456   ol_cv_pthread_thread=no
12457 fi
12458 rm -fr conftest*
12459 fi
12460
12461
12462                 # restore the LIBS
12463                 LIBS="$ol_LIBS"
12464         
12465 fi
12466
12467 echo "$ac_t""$ol_cv_pthread_thread" 1>&6
12468
12469         if test $ol_cv_pthread_thread = yes ; then
12470                 ol_link_pthreads="-thread"
12471                 ol_link_threads=posix
12472         fi
12473 fi
12474
12475
12476                 # Pthread try link: -lpthread -lmach -lexc -lc_r (ol_cv_pthread_lpthread_lmach_lexc_lc_r)
12477 if test "$ol_link_threads" = no ; then
12478         # try -lpthread -lmach -lexc -lc_r
12479         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc -lc_r""... $ac_c" 1>&6
12480 echo "configure:12481: checking for pthread link with -lpthread -lmach -lexc -lc_r" >&5
12481 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc_lc_r+set}\" = set"; then
12482   echo $ac_n "(cached) $ac_c" 1>&6
12483 else
12484   
12485                 # save the flags
12486                 ol_LIBS="$LIBS"
12487                 LIBS="-lpthread -lmach -lexc -lc_r $LIBS"
12488
12489                 if test "$cross_compiling" = yes; then
12490   cat > conftest.$ac_ext <<EOF
12491 #line 12492 "configure"
12492 #include "confdefs.h"
12493 /* pthread test headers */
12494 #include <pthread.h>
12495 #if HAVE_PTHREADS < 7
12496 #include <errno.h>
12497 #endif
12498 #ifndef NULL
12499 #define NULL (void*)0
12500 #endif
12501
12502 static void *task(p)
12503         void *p;
12504 {
12505         return (void *) (p == NULL);
12506 }
12507
12508 int main() {
12509
12510         /* pthread test function */
12511 #ifndef PTHREAD_CREATE_DETACHED
12512 #define PTHREAD_CREATE_DETACHED 1
12513 #endif
12514         pthread_t t;
12515         int status;
12516         int detach = PTHREAD_CREATE_DETACHED;
12517
12518 #if HAVE_PTHREADS > 4
12519         /* Final pthreads */
12520         pthread_attr_t attr;
12521
12522         status = pthread_attr_init(&attr);
12523         if( status ) return status;
12524
12525 #if HAVE_PTHREADS < 7
12526         status = pthread_attr_setdetachstate(&attr, &detach);
12527         if( status < 0 ) status = errno;
12528 #else
12529         status = pthread_attr_setdetachstate(&attr, detach);
12530 #endif
12531         if( status ) return status;
12532         status = pthread_create( &t, &attr, task, NULL );
12533 #if HAVE_PTHREADS < 7
12534         if( status < 0 ) status = errno;
12535 #endif
12536         if( status ) return status;
12537 #else
12538         /* Draft 4 pthreads */
12539         status = pthread_create( &t, pthread_attr_default, task, NULL );
12540         if( status ) return errno;
12541
12542         /* give thread a chance to complete */
12543         /* it should remain joinable and hence detachable */
12544         sleep( 1 );
12545
12546         status = pthread_detach( &t );
12547         if( status ) return errno;
12548 #endif
12549
12550 #ifdef HAVE_LINUX_THREADS
12551         pthread_kill_other_threads_np();
12552 #endif
12553
12554         return 0;
12555
12556 ; return 0; }
12557 EOF
12558 if { (eval echo configure:12559: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12559   rm -rf conftest*
12560   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
12561 else
12562   echo "configure: failed program was:" >&5
12563   cat conftest.$ac_ext >&5
12564   rm -rf conftest*
12565   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
12566 fi
12567 rm -f conftest*
12568 else
12569   cat > conftest.$ac_ext <<EOF
12570 #line 12571 "configure"
12571 #include "confdefs.h"
12572 /* pthread test headers */
12573 #include <pthread.h>
12574 #if HAVE_PTHREADS < 7
12575 #include <errno.h>
12576 #endif
12577 #ifndef NULL
12578 #define NULL (void*)0
12579 #endif
12580
12581 static void *task(p)
12582         void *p;
12583 {
12584         return (void *) (p == NULL);
12585 }
12586
12587
12588 int main(argc, argv)
12589         int argc;
12590         char **argv;
12591 {
12592
12593         /* pthread test function */
12594 #ifndef PTHREAD_CREATE_DETACHED
12595 #define PTHREAD_CREATE_DETACHED 1
12596 #endif
12597         pthread_t t;
12598         int status;
12599         int detach = PTHREAD_CREATE_DETACHED;
12600
12601 #if HAVE_PTHREADS > 4
12602         /* Final pthreads */
12603         pthread_attr_t attr;
12604
12605         status = pthread_attr_init(&attr);
12606         if( status ) return status;
12607
12608 #if HAVE_PTHREADS < 7
12609         status = pthread_attr_setdetachstate(&attr, &detach);
12610         if( status < 0 ) status = errno;
12611 #else
12612         status = pthread_attr_setdetachstate(&attr, detach);
12613 #endif
12614         if( status ) return status;
12615         status = pthread_create( &t, &attr, task, NULL );
12616 #if HAVE_PTHREADS < 7
12617         if( status < 0 ) status = errno;
12618 #endif
12619         if( status ) return status;
12620 #else
12621         /* Draft 4 pthreads */
12622         status = pthread_create( &t, pthread_attr_default, task, NULL );
12623         if( status ) return errno;
12624
12625         /* give thread a chance to complete */
12626         /* it should remain joinable and hence detachable */
12627         sleep( 1 );
12628
12629         status = pthread_detach( &t );
12630         if( status ) return errno;
12631 #endif
12632
12633 #ifdef HAVE_LINUX_THREADS
12634         pthread_kill_other_threads_np();
12635 #endif
12636
12637         return 0;
12638
12639 }
12640
12641 EOF
12642 if { (eval echo configure:12643: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12643 then
12644   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
12645 else
12646   echo "configure: failed program was:" >&5
12647   cat conftest.$ac_ext >&5
12648   rm -fr conftest*
12649   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
12650 fi
12651 rm -fr conftest*
12652 fi
12653
12654
12655                 # restore the LIBS
12656                 LIBS="$ol_LIBS"
12657         
12658 fi
12659
12660 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc_lc_r" 1>&6
12661
12662         if test $ol_cv_pthread_lpthread_lmach_lexc_lc_r = yes ; then
12663                 ol_link_pthreads="-lpthread -lmach -lexc -lc_r"
12664                 ol_link_threads=posix
12665         fi
12666 fi
12667
12668                 # Pthread try link: -lpthread -lmach -lexc (ol_cv_pthread_lpthread_lmach_lexc)
12669 if test "$ol_link_threads" = no ; then
12670         # try -lpthread -lmach -lexc
12671         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc""... $ac_c" 1>&6
12672 echo "configure:12673: checking for pthread link with -lpthread -lmach -lexc" >&5
12673 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc+set}\" = set"; then
12674   echo $ac_n "(cached) $ac_c" 1>&6
12675 else
12676   
12677                 # save the flags
12678                 ol_LIBS="$LIBS"
12679                 LIBS="-lpthread -lmach -lexc $LIBS"
12680
12681                 if test "$cross_compiling" = yes; then
12682   cat > conftest.$ac_ext <<EOF
12683 #line 12684 "configure"
12684 #include "confdefs.h"
12685 /* pthread test headers */
12686 #include <pthread.h>
12687 #if HAVE_PTHREADS < 7
12688 #include <errno.h>
12689 #endif
12690 #ifndef NULL
12691 #define NULL (void*)0
12692 #endif
12693
12694 static void *task(p)
12695         void *p;
12696 {
12697         return (void *) (p == NULL);
12698 }
12699
12700 int main() {
12701
12702         /* pthread test function */
12703 #ifndef PTHREAD_CREATE_DETACHED
12704 #define PTHREAD_CREATE_DETACHED 1
12705 #endif
12706         pthread_t t;
12707         int status;
12708         int detach = PTHREAD_CREATE_DETACHED;
12709
12710 #if HAVE_PTHREADS > 4
12711         /* Final pthreads */
12712         pthread_attr_t attr;
12713
12714         status = pthread_attr_init(&attr);
12715         if( status ) return status;
12716
12717 #if HAVE_PTHREADS < 7
12718         status = pthread_attr_setdetachstate(&attr, &detach);
12719         if( status < 0 ) status = errno;
12720 #else
12721         status = pthread_attr_setdetachstate(&attr, detach);
12722 #endif
12723         if( status ) return status;
12724         status = pthread_create( &t, &attr, task, NULL );
12725 #if HAVE_PTHREADS < 7
12726         if( status < 0 ) status = errno;
12727 #endif
12728         if( status ) return status;
12729 #else
12730         /* Draft 4 pthreads */
12731         status = pthread_create( &t, pthread_attr_default, task, NULL );
12732         if( status ) return errno;
12733
12734         /* give thread a chance to complete */
12735         /* it should remain joinable and hence detachable */
12736         sleep( 1 );
12737
12738         status = pthread_detach( &t );
12739         if( status ) return errno;
12740 #endif
12741
12742 #ifdef HAVE_LINUX_THREADS
12743         pthread_kill_other_threads_np();
12744 #endif
12745
12746         return 0;
12747
12748 ; return 0; }
12749 EOF
12750 if { (eval echo configure:12751: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12751   rm -rf conftest*
12752   ol_cv_pthread_lpthread_lmach_lexc=yes
12753 else
12754   echo "configure: failed program was:" >&5
12755   cat conftest.$ac_ext >&5
12756   rm -rf conftest*
12757   ol_cv_pthread_lpthread_lmach_lexc=no
12758 fi
12759 rm -f conftest*
12760 else
12761   cat > conftest.$ac_ext <<EOF
12762 #line 12763 "configure"
12763 #include "confdefs.h"
12764 /* pthread test headers */
12765 #include <pthread.h>
12766 #if HAVE_PTHREADS < 7
12767 #include <errno.h>
12768 #endif
12769 #ifndef NULL
12770 #define NULL (void*)0
12771 #endif
12772
12773 static void *task(p)
12774         void *p;
12775 {
12776         return (void *) (p == NULL);
12777 }
12778
12779
12780 int main(argc, argv)
12781         int argc;
12782         char **argv;
12783 {
12784
12785         /* pthread test function */
12786 #ifndef PTHREAD_CREATE_DETACHED
12787 #define PTHREAD_CREATE_DETACHED 1
12788 #endif
12789         pthread_t t;
12790         int status;
12791         int detach = PTHREAD_CREATE_DETACHED;
12792
12793 #if HAVE_PTHREADS > 4
12794         /* Final pthreads */
12795         pthread_attr_t attr;
12796
12797         status = pthread_attr_init(&attr);
12798         if( status ) return status;
12799
12800 #if HAVE_PTHREADS < 7
12801         status = pthread_attr_setdetachstate(&attr, &detach);
12802         if( status < 0 ) status = errno;
12803 #else
12804         status = pthread_attr_setdetachstate(&attr, detach);
12805 #endif
12806         if( status ) return status;
12807         status = pthread_create( &t, &attr, task, NULL );
12808 #if HAVE_PTHREADS < 7
12809         if( status < 0 ) status = errno;
12810 #endif
12811         if( status ) return status;
12812 #else
12813         /* Draft 4 pthreads */
12814         status = pthread_create( &t, pthread_attr_default, task, NULL );
12815         if( status ) return errno;
12816
12817         /* give thread a chance to complete */
12818         /* it should remain joinable and hence detachable */
12819         sleep( 1 );
12820
12821         status = pthread_detach( &t );
12822         if( status ) return errno;
12823 #endif
12824
12825 #ifdef HAVE_LINUX_THREADS
12826         pthread_kill_other_threads_np();
12827 #endif
12828
12829         return 0;
12830
12831 }
12832
12833 EOF
12834 if { (eval echo configure:12835: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12835 then
12836   ol_cv_pthread_lpthread_lmach_lexc=yes
12837 else
12838   echo "configure: failed program was:" >&5
12839   cat conftest.$ac_ext >&5
12840   rm -fr conftest*
12841   ol_cv_pthread_lpthread_lmach_lexc=no
12842 fi
12843 rm -fr conftest*
12844 fi
12845
12846
12847                 # restore the LIBS
12848                 LIBS="$ol_LIBS"
12849         
12850 fi
12851
12852 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc" 1>&6
12853
12854         if test $ol_cv_pthread_lpthread_lmach_lexc = yes ; then
12855                 ol_link_pthreads="-lpthread -lmach -lexc"
12856                 ol_link_threads=posix
12857         fi
12858 fi
12859
12860
12861                 # Pthread try link: -lpthread -Wl,-woff,85 (ol_cv_pthread_lib_lpthread_woff)
12862 if test "$ol_link_threads" = no ; then
12863         # try -lpthread -Wl,-woff,85
12864         echo $ac_n "checking for pthread link with -lpthread -Wl,-woff,85""... $ac_c" 1>&6
12865 echo "configure:12866: checking for pthread link with -lpthread -Wl,-woff,85" >&5
12866 if eval "test \"\${ol_cv_pthread_lib_lpthread_woff+set}\" = set"; then
12867   echo $ac_n "(cached) $ac_c" 1>&6
12868 else
12869   
12870                 # save the flags
12871                 ol_LIBS="$LIBS"
12872                 LIBS="-lpthread -Wl,-woff,85 $LIBS"
12873
12874                 if test "$cross_compiling" = yes; then
12875   cat > conftest.$ac_ext <<EOF
12876 #line 12877 "configure"
12877 #include "confdefs.h"
12878 /* pthread test headers */
12879 #include <pthread.h>
12880 #if HAVE_PTHREADS < 7
12881 #include <errno.h>
12882 #endif
12883 #ifndef NULL
12884 #define NULL (void*)0
12885 #endif
12886
12887 static void *task(p)
12888         void *p;
12889 {
12890         return (void *) (p == NULL);
12891 }
12892
12893 int main() {
12894
12895         /* pthread test function */
12896 #ifndef PTHREAD_CREATE_DETACHED
12897 #define PTHREAD_CREATE_DETACHED 1
12898 #endif
12899         pthread_t t;
12900         int status;
12901         int detach = PTHREAD_CREATE_DETACHED;
12902
12903 #if HAVE_PTHREADS > 4
12904         /* Final pthreads */
12905         pthread_attr_t attr;
12906
12907         status = pthread_attr_init(&attr);
12908         if( status ) return status;
12909
12910 #if HAVE_PTHREADS < 7
12911         status = pthread_attr_setdetachstate(&attr, &detach);
12912         if( status < 0 ) status = errno;
12913 #else
12914         status = pthread_attr_setdetachstate(&attr, detach);
12915 #endif
12916         if( status ) return status;
12917         status = pthread_create( &t, &attr, task, NULL );
12918 #if HAVE_PTHREADS < 7
12919         if( status < 0 ) status = errno;
12920 #endif
12921         if( status ) return status;
12922 #else
12923         /* Draft 4 pthreads */
12924         status = pthread_create( &t, pthread_attr_default, task, NULL );
12925         if( status ) return errno;
12926
12927         /* give thread a chance to complete */
12928         /* it should remain joinable and hence detachable */
12929         sleep( 1 );
12930
12931         status = pthread_detach( &t );
12932         if( status ) return errno;
12933 #endif
12934
12935 #ifdef HAVE_LINUX_THREADS
12936         pthread_kill_other_threads_np();
12937 #endif
12938
12939         return 0;
12940
12941 ; return 0; }
12942 EOF
12943 if { (eval echo configure:12944: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12944   rm -rf conftest*
12945   ol_cv_pthread_lib_lpthread_woff=yes
12946 else
12947   echo "configure: failed program was:" >&5
12948   cat conftest.$ac_ext >&5
12949   rm -rf conftest*
12950   ol_cv_pthread_lib_lpthread_woff=no
12951 fi
12952 rm -f conftest*
12953 else
12954   cat > conftest.$ac_ext <<EOF
12955 #line 12956 "configure"
12956 #include "confdefs.h"
12957 /* pthread test headers */
12958 #include <pthread.h>
12959 #if HAVE_PTHREADS < 7
12960 #include <errno.h>
12961 #endif
12962 #ifndef NULL
12963 #define NULL (void*)0
12964 #endif
12965
12966 static void *task(p)
12967         void *p;
12968 {
12969         return (void *) (p == NULL);
12970 }
12971
12972
12973 int main(argc, argv)
12974         int argc;
12975         char **argv;
12976 {
12977
12978         /* pthread test function */
12979 #ifndef PTHREAD_CREATE_DETACHED
12980 #define PTHREAD_CREATE_DETACHED 1
12981 #endif
12982         pthread_t t;
12983         int status;
12984         int detach = PTHREAD_CREATE_DETACHED;
12985
12986 #if HAVE_PTHREADS > 4
12987         /* Final pthreads */
12988         pthread_attr_t attr;
12989
12990         status = pthread_attr_init(&attr);
12991         if( status ) return status;
12992
12993 #if HAVE_PTHREADS < 7
12994         status = pthread_attr_setdetachstate(&attr, &detach);
12995         if( status < 0 ) status = errno;
12996 #else
12997         status = pthread_attr_setdetachstate(&attr, detach);
12998 #endif
12999         if( status ) return status;
13000         status = pthread_create( &t, &attr, task, NULL );
13001 #if HAVE_PTHREADS < 7
13002         if( status < 0 ) status = errno;
13003 #endif
13004         if( status ) return status;
13005 #else
13006         /* Draft 4 pthreads */
13007         status = pthread_create( &t, pthread_attr_default, task, NULL );
13008         if( status ) return errno;
13009
13010         /* give thread a chance to complete */
13011         /* it should remain joinable and hence detachable */
13012         sleep( 1 );
13013
13014         status = pthread_detach( &t );
13015         if( status ) return errno;
13016 #endif
13017
13018 #ifdef HAVE_LINUX_THREADS
13019         pthread_kill_other_threads_np();
13020 #endif
13021
13022         return 0;
13023
13024 }
13025
13026 EOF
13027 if { (eval echo configure:13028: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13028 then
13029   ol_cv_pthread_lib_lpthread_woff=yes
13030 else
13031   echo "configure: failed program was:" >&5
13032   cat conftest.$ac_ext >&5
13033   rm -fr conftest*
13034   ol_cv_pthread_lib_lpthread_woff=no
13035 fi
13036 rm -fr conftest*
13037 fi
13038
13039
13040                 # restore the LIBS
13041                 LIBS="$ol_LIBS"
13042         
13043 fi
13044
13045 echo "$ac_t""$ol_cv_pthread_lib_lpthread_woff" 1>&6
13046
13047         if test $ol_cv_pthread_lib_lpthread_woff = yes ; then
13048                 ol_link_pthreads="-lpthread -Wl,-woff,85"
13049                 ol_link_threads=posix
13050         fi
13051 fi
13052
13053
13054                 # Pthread try link: -lpthread (ol_cv_pthread_lpthread)
13055 if test "$ol_link_threads" = no ; then
13056         # try -lpthread
13057         echo $ac_n "checking for pthread link with -lpthread""... $ac_c" 1>&6
13058 echo "configure:13059: checking for pthread link with -lpthread" >&5
13059 if eval "test \"\${ol_cv_pthread_lpthread+set}\" = set"; then
13060   echo $ac_n "(cached) $ac_c" 1>&6
13061 else
13062   
13063                 # save the flags
13064                 ol_LIBS="$LIBS"
13065                 LIBS="-lpthread $LIBS"
13066
13067                 if test "$cross_compiling" = yes; then
13068   cat > conftest.$ac_ext <<EOF
13069 #line 13070 "configure"
13070 #include "confdefs.h"
13071 /* pthread test headers */
13072 #include <pthread.h>
13073 #if HAVE_PTHREADS < 7
13074 #include <errno.h>
13075 #endif
13076 #ifndef NULL
13077 #define NULL (void*)0
13078 #endif
13079
13080 static void *task(p)
13081         void *p;
13082 {
13083         return (void *) (p == NULL);
13084 }
13085
13086 int main() {
13087
13088         /* pthread test function */
13089 #ifndef PTHREAD_CREATE_DETACHED
13090 #define PTHREAD_CREATE_DETACHED 1
13091 #endif
13092         pthread_t t;
13093         int status;
13094         int detach = PTHREAD_CREATE_DETACHED;
13095
13096 #if HAVE_PTHREADS > 4
13097         /* Final pthreads */
13098         pthread_attr_t attr;
13099
13100         status = pthread_attr_init(&attr);
13101         if( status ) return status;
13102
13103 #if HAVE_PTHREADS < 7
13104         status = pthread_attr_setdetachstate(&attr, &detach);
13105         if( status < 0 ) status = errno;
13106 #else
13107         status = pthread_attr_setdetachstate(&attr, detach);
13108 #endif
13109         if( status ) return status;
13110         status = pthread_create( &t, &attr, task, NULL );
13111 #if HAVE_PTHREADS < 7
13112         if( status < 0 ) status = errno;
13113 #endif
13114         if( status ) return status;
13115 #else
13116         /* Draft 4 pthreads */
13117         status = pthread_create( &t, pthread_attr_default, task, NULL );
13118         if( status ) return errno;
13119
13120         /* give thread a chance to complete */
13121         /* it should remain joinable and hence detachable */
13122         sleep( 1 );
13123
13124         status = pthread_detach( &t );
13125         if( status ) return errno;
13126 #endif
13127
13128 #ifdef HAVE_LINUX_THREADS
13129         pthread_kill_other_threads_np();
13130 #endif
13131
13132         return 0;
13133
13134 ; return 0; }
13135 EOF
13136 if { (eval echo configure:13137: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13137   rm -rf conftest*
13138   ol_cv_pthread_lpthread=yes
13139 else
13140   echo "configure: failed program was:" >&5
13141   cat conftest.$ac_ext >&5
13142   rm -rf conftest*
13143   ol_cv_pthread_lpthread=no
13144 fi
13145 rm -f conftest*
13146 else
13147   cat > conftest.$ac_ext <<EOF
13148 #line 13149 "configure"
13149 #include "confdefs.h"
13150 /* pthread test headers */
13151 #include <pthread.h>
13152 #if HAVE_PTHREADS < 7
13153 #include <errno.h>
13154 #endif
13155 #ifndef NULL
13156 #define NULL (void*)0
13157 #endif
13158
13159 static void *task(p)
13160         void *p;
13161 {
13162         return (void *) (p == NULL);
13163 }
13164
13165
13166 int main(argc, argv)
13167         int argc;
13168         char **argv;
13169 {
13170
13171         /* pthread test function */
13172 #ifndef PTHREAD_CREATE_DETACHED
13173 #define PTHREAD_CREATE_DETACHED 1
13174 #endif
13175         pthread_t t;
13176         int status;
13177         int detach = PTHREAD_CREATE_DETACHED;
13178
13179 #if HAVE_PTHREADS > 4
13180         /* Final pthreads */
13181         pthread_attr_t attr;
13182
13183         status = pthread_attr_init(&attr);
13184         if( status ) return status;
13185
13186 #if HAVE_PTHREADS < 7
13187         status = pthread_attr_setdetachstate(&attr, &detach);
13188         if( status < 0 ) status = errno;
13189 #else
13190         status = pthread_attr_setdetachstate(&attr, detach);
13191 #endif
13192         if( status ) return status;
13193         status = pthread_create( &t, &attr, task, NULL );
13194 #if HAVE_PTHREADS < 7
13195         if( status < 0 ) status = errno;
13196 #endif
13197         if( status ) return status;
13198 #else
13199         /* Draft 4 pthreads */
13200         status = pthread_create( &t, pthread_attr_default, task, NULL );
13201         if( status ) return errno;
13202
13203         /* give thread a chance to complete */
13204         /* it should remain joinable and hence detachable */
13205         sleep( 1 );
13206
13207         status = pthread_detach( &t );
13208         if( status ) return errno;
13209 #endif
13210
13211 #ifdef HAVE_LINUX_THREADS
13212         pthread_kill_other_threads_np();
13213 #endif
13214
13215         return 0;
13216
13217 }
13218
13219 EOF
13220 if { (eval echo configure:13221: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13221 then
13222   ol_cv_pthread_lpthread=yes
13223 else
13224   echo "configure: failed program was:" >&5
13225   cat conftest.$ac_ext >&5
13226   rm -fr conftest*
13227   ol_cv_pthread_lpthread=no
13228 fi
13229 rm -fr conftest*
13230 fi
13231
13232
13233                 # restore the LIBS
13234                 LIBS="$ol_LIBS"
13235         
13236 fi
13237
13238 echo "$ac_t""$ol_cv_pthread_lpthread" 1>&6
13239
13240         if test $ol_cv_pthread_lpthread = yes ; then
13241                 ol_link_pthreads="-lpthread"
13242                 ol_link_threads=posix
13243         fi
13244 fi
13245
13246                 # Pthread try link: -lc_r (ol_cv_pthread_lc_r)
13247 if test "$ol_link_threads" = no ; then
13248         # try -lc_r
13249         echo $ac_n "checking for pthread link with -lc_r""... $ac_c" 1>&6
13250 echo "configure:13251: checking for pthread link with -lc_r" >&5
13251 if eval "test \"\${ol_cv_pthread_lc_r+set}\" = set"; then
13252   echo $ac_n "(cached) $ac_c" 1>&6
13253 else
13254   
13255                 # save the flags
13256                 ol_LIBS="$LIBS"
13257                 LIBS="-lc_r $LIBS"
13258
13259                 if test "$cross_compiling" = yes; then
13260   cat > conftest.$ac_ext <<EOF
13261 #line 13262 "configure"
13262 #include "confdefs.h"
13263 /* pthread test headers */
13264 #include <pthread.h>
13265 #if HAVE_PTHREADS < 7
13266 #include <errno.h>
13267 #endif
13268 #ifndef NULL
13269 #define NULL (void*)0
13270 #endif
13271
13272 static void *task(p)
13273         void *p;
13274 {
13275         return (void *) (p == NULL);
13276 }
13277
13278 int main() {
13279
13280         /* pthread test function */
13281 #ifndef PTHREAD_CREATE_DETACHED
13282 #define PTHREAD_CREATE_DETACHED 1
13283 #endif
13284         pthread_t t;
13285         int status;
13286         int detach = PTHREAD_CREATE_DETACHED;
13287
13288 #if HAVE_PTHREADS > 4
13289         /* Final pthreads */
13290         pthread_attr_t attr;
13291
13292         status = pthread_attr_init(&attr);
13293         if( status ) return status;
13294
13295 #if HAVE_PTHREADS < 7
13296         status = pthread_attr_setdetachstate(&attr, &detach);
13297         if( status < 0 ) status = errno;
13298 #else
13299         status = pthread_attr_setdetachstate(&attr, detach);
13300 #endif
13301         if( status ) return status;
13302         status = pthread_create( &t, &attr, task, NULL );
13303 #if HAVE_PTHREADS < 7
13304         if( status < 0 ) status = errno;
13305 #endif
13306         if( status ) return status;
13307 #else
13308         /* Draft 4 pthreads */
13309         status = pthread_create( &t, pthread_attr_default, task, NULL );
13310         if( status ) return errno;
13311
13312         /* give thread a chance to complete */
13313         /* it should remain joinable and hence detachable */
13314         sleep( 1 );
13315
13316         status = pthread_detach( &t );
13317         if( status ) return errno;
13318 #endif
13319
13320 #ifdef HAVE_LINUX_THREADS
13321         pthread_kill_other_threads_np();
13322 #endif
13323
13324         return 0;
13325
13326 ; return 0; }
13327 EOF
13328 if { (eval echo configure:13329: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13329   rm -rf conftest*
13330   ol_cv_pthread_lc_r=yes
13331 else
13332   echo "configure: failed program was:" >&5
13333   cat conftest.$ac_ext >&5
13334   rm -rf conftest*
13335   ol_cv_pthread_lc_r=no
13336 fi
13337 rm -f conftest*
13338 else
13339   cat > conftest.$ac_ext <<EOF
13340 #line 13341 "configure"
13341 #include "confdefs.h"
13342 /* pthread test headers */
13343 #include <pthread.h>
13344 #if HAVE_PTHREADS < 7
13345 #include <errno.h>
13346 #endif
13347 #ifndef NULL
13348 #define NULL (void*)0
13349 #endif
13350
13351 static void *task(p)
13352         void *p;
13353 {
13354         return (void *) (p == NULL);
13355 }
13356
13357
13358 int main(argc, argv)
13359         int argc;
13360         char **argv;
13361 {
13362
13363         /* pthread test function */
13364 #ifndef PTHREAD_CREATE_DETACHED
13365 #define PTHREAD_CREATE_DETACHED 1
13366 #endif
13367         pthread_t t;
13368         int status;
13369         int detach = PTHREAD_CREATE_DETACHED;
13370
13371 #if HAVE_PTHREADS > 4
13372         /* Final pthreads */
13373         pthread_attr_t attr;
13374
13375         status = pthread_attr_init(&attr);
13376         if( status ) return status;
13377
13378 #if HAVE_PTHREADS < 7
13379         status = pthread_attr_setdetachstate(&attr, &detach);
13380         if( status < 0 ) status = errno;
13381 #else
13382         status = pthread_attr_setdetachstate(&attr, detach);
13383 #endif
13384         if( status ) return status;
13385         status = pthread_create( &t, &attr, task, NULL );
13386 #if HAVE_PTHREADS < 7
13387         if( status < 0 ) status = errno;
13388 #endif
13389         if( status ) return status;
13390 #else
13391         /* Draft 4 pthreads */
13392         status = pthread_create( &t, pthread_attr_default, task, NULL );
13393         if( status ) return errno;
13394
13395         /* give thread a chance to complete */
13396         /* it should remain joinable and hence detachable */
13397         sleep( 1 );
13398
13399         status = pthread_detach( &t );
13400         if( status ) return errno;
13401 #endif
13402
13403 #ifdef HAVE_LINUX_THREADS
13404         pthread_kill_other_threads_np();
13405 #endif
13406
13407         return 0;
13408
13409 }
13410
13411 EOF
13412 if { (eval echo configure:13413: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13413 then
13414   ol_cv_pthread_lc_r=yes
13415 else
13416   echo "configure: failed program was:" >&5
13417   cat conftest.$ac_ext >&5
13418   rm -fr conftest*
13419   ol_cv_pthread_lc_r=no
13420 fi
13421 rm -fr conftest*
13422 fi
13423
13424
13425                 # restore the LIBS
13426                 LIBS="$ol_LIBS"
13427         
13428 fi
13429
13430 echo "$ac_t""$ol_cv_pthread_lc_r" 1>&6
13431
13432         if test $ol_cv_pthread_lc_r = yes ; then
13433                 ol_link_pthreads="-lc_r"
13434                 ol_link_threads=posix
13435         fi
13436 fi
13437
13438
13439                 # Pthread try link: -threads (ol_cv_pthread_threads)
13440 if test "$ol_link_threads" = no ; then
13441         # try -threads
13442         echo $ac_n "checking for pthread link with -threads""... $ac_c" 1>&6
13443 echo "configure:13444: checking for pthread link with -threads" >&5
13444 if eval "test \"\${ol_cv_pthread_threads+set}\" = set"; then
13445   echo $ac_n "(cached) $ac_c" 1>&6
13446 else
13447   
13448                 # save the flags
13449                 ol_LIBS="$LIBS"
13450                 LIBS="-threads $LIBS"
13451
13452                 if test "$cross_compiling" = yes; then
13453   cat > conftest.$ac_ext <<EOF
13454 #line 13455 "configure"
13455 #include "confdefs.h"
13456 /* pthread test headers */
13457 #include <pthread.h>
13458 #if HAVE_PTHREADS < 7
13459 #include <errno.h>
13460 #endif
13461 #ifndef NULL
13462 #define NULL (void*)0
13463 #endif
13464
13465 static void *task(p)
13466         void *p;
13467 {
13468         return (void *) (p == NULL);
13469 }
13470
13471 int main() {
13472
13473         /* pthread test function */
13474 #ifndef PTHREAD_CREATE_DETACHED
13475 #define PTHREAD_CREATE_DETACHED 1
13476 #endif
13477         pthread_t t;
13478         int status;
13479         int detach = PTHREAD_CREATE_DETACHED;
13480
13481 #if HAVE_PTHREADS > 4
13482         /* Final pthreads */
13483         pthread_attr_t attr;
13484
13485         status = pthread_attr_init(&attr);
13486         if( status ) return status;
13487
13488 #if HAVE_PTHREADS < 7
13489         status = pthread_attr_setdetachstate(&attr, &detach);
13490         if( status < 0 ) status = errno;
13491 #else
13492         status = pthread_attr_setdetachstate(&attr, detach);
13493 #endif
13494         if( status ) return status;
13495         status = pthread_create( &t, &attr, task, NULL );
13496 #if HAVE_PTHREADS < 7
13497         if( status < 0 ) status = errno;
13498 #endif
13499         if( status ) return status;
13500 #else
13501         /* Draft 4 pthreads */
13502         status = pthread_create( &t, pthread_attr_default, task, NULL );
13503         if( status ) return errno;
13504
13505         /* give thread a chance to complete */
13506         /* it should remain joinable and hence detachable */
13507         sleep( 1 );
13508
13509         status = pthread_detach( &t );
13510         if( status ) return errno;
13511 #endif
13512
13513 #ifdef HAVE_LINUX_THREADS
13514         pthread_kill_other_threads_np();
13515 #endif
13516
13517         return 0;
13518
13519 ; return 0; }
13520 EOF
13521 if { (eval echo configure:13522: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13522   rm -rf conftest*
13523   ol_cv_pthread_threads=yes
13524 else
13525   echo "configure: failed program was:" >&5
13526   cat conftest.$ac_ext >&5
13527   rm -rf conftest*
13528   ol_cv_pthread_threads=no
13529 fi
13530 rm -f conftest*
13531 else
13532   cat > conftest.$ac_ext <<EOF
13533 #line 13534 "configure"
13534 #include "confdefs.h"
13535 /* pthread test headers */
13536 #include <pthread.h>
13537 #if HAVE_PTHREADS < 7
13538 #include <errno.h>
13539 #endif
13540 #ifndef NULL
13541 #define NULL (void*)0
13542 #endif
13543
13544 static void *task(p)
13545         void *p;
13546 {
13547         return (void *) (p == NULL);
13548 }
13549
13550
13551 int main(argc, argv)
13552         int argc;
13553         char **argv;
13554 {
13555
13556         /* pthread test function */
13557 #ifndef PTHREAD_CREATE_DETACHED
13558 #define PTHREAD_CREATE_DETACHED 1
13559 #endif
13560         pthread_t t;
13561         int status;
13562         int detach = PTHREAD_CREATE_DETACHED;
13563
13564 #if HAVE_PTHREADS > 4
13565         /* Final pthreads */
13566         pthread_attr_t attr;
13567
13568         status = pthread_attr_init(&attr);
13569         if( status ) return status;
13570
13571 #if HAVE_PTHREADS < 7
13572         status = pthread_attr_setdetachstate(&attr, &detach);
13573         if( status < 0 ) status = errno;
13574 #else
13575         status = pthread_attr_setdetachstate(&attr, detach);
13576 #endif
13577         if( status ) return status;
13578         status = pthread_create( &t, &attr, task, NULL );
13579 #if HAVE_PTHREADS < 7
13580         if( status < 0 ) status = errno;
13581 #endif
13582         if( status ) return status;
13583 #else
13584         /* Draft 4 pthreads */
13585         status = pthread_create( &t, pthread_attr_default, task, NULL );
13586         if( status ) return errno;
13587
13588         /* give thread a chance to complete */
13589         /* it should remain joinable and hence detachable */
13590         sleep( 1 );
13591
13592         status = pthread_detach( &t );
13593         if( status ) return errno;
13594 #endif
13595
13596 #ifdef HAVE_LINUX_THREADS
13597         pthread_kill_other_threads_np();
13598 #endif
13599
13600         return 0;
13601
13602 }
13603
13604 EOF
13605 if { (eval echo configure:13606: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13606 then
13607   ol_cv_pthread_threads=yes
13608 else
13609   echo "configure: failed program was:" >&5
13610   cat conftest.$ac_ext >&5
13611   rm -fr conftest*
13612   ol_cv_pthread_threads=no
13613 fi
13614 rm -fr conftest*
13615 fi
13616
13617
13618                 # restore the LIBS
13619                 LIBS="$ol_LIBS"
13620         
13621 fi
13622
13623 echo "$ac_t""$ol_cv_pthread_threads" 1>&6
13624
13625         if test $ol_cv_pthread_threads = yes ; then
13626                 ol_link_pthreads="-threads"
13627                 ol_link_threads=posix
13628         fi
13629 fi
13630
13631
13632                 # Pthread try link: -lpthreads -lmach -lexc -lc_r (ol_cv_pthread_lpthreads_lmach_lexc_lc_r)
13633 if test "$ol_link_threads" = no ; then
13634         # try -lpthreads -lmach -lexc -lc_r
13635         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc -lc_r""... $ac_c" 1>&6
13636 echo "configure:13637: checking for pthread link with -lpthreads -lmach -lexc -lc_r" >&5
13637 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc_lc_r+set}\" = set"; then
13638   echo $ac_n "(cached) $ac_c" 1>&6
13639 else
13640   
13641                 # save the flags
13642                 ol_LIBS="$LIBS"
13643                 LIBS="-lpthreads -lmach -lexc -lc_r $LIBS"
13644
13645                 if test "$cross_compiling" = yes; then
13646   cat > conftest.$ac_ext <<EOF
13647 #line 13648 "configure"
13648 #include "confdefs.h"
13649 /* pthread test headers */
13650 #include <pthread.h>
13651 #if HAVE_PTHREADS < 7
13652 #include <errno.h>
13653 #endif
13654 #ifndef NULL
13655 #define NULL (void*)0
13656 #endif
13657
13658 static void *task(p)
13659         void *p;
13660 {
13661         return (void *) (p == NULL);
13662 }
13663
13664 int main() {
13665
13666         /* pthread test function */
13667 #ifndef PTHREAD_CREATE_DETACHED
13668 #define PTHREAD_CREATE_DETACHED 1
13669 #endif
13670         pthread_t t;
13671         int status;
13672         int detach = PTHREAD_CREATE_DETACHED;
13673
13674 #if HAVE_PTHREADS > 4
13675         /* Final pthreads */
13676         pthread_attr_t attr;
13677
13678         status = pthread_attr_init(&attr);
13679         if( status ) return status;
13680
13681 #if HAVE_PTHREADS < 7
13682         status = pthread_attr_setdetachstate(&attr, &detach);
13683         if( status < 0 ) status = errno;
13684 #else
13685         status = pthread_attr_setdetachstate(&attr, detach);
13686 #endif
13687         if( status ) return status;
13688         status = pthread_create( &t, &attr, task, NULL );
13689 #if HAVE_PTHREADS < 7
13690         if( status < 0 ) status = errno;
13691 #endif
13692         if( status ) return status;
13693 #else
13694         /* Draft 4 pthreads */
13695         status = pthread_create( &t, pthread_attr_default, task, NULL );
13696         if( status ) return errno;
13697
13698         /* give thread a chance to complete */
13699         /* it should remain joinable and hence detachable */
13700         sleep( 1 );
13701
13702         status = pthread_detach( &t );
13703         if( status ) return errno;
13704 #endif
13705
13706 #ifdef HAVE_LINUX_THREADS
13707         pthread_kill_other_threads_np();
13708 #endif
13709
13710         return 0;
13711
13712 ; return 0; }
13713 EOF
13714 if { (eval echo configure:13715: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13715   rm -rf conftest*
13716   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
13717 else
13718   echo "configure: failed program was:" >&5
13719   cat conftest.$ac_ext >&5
13720   rm -rf conftest*
13721   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
13722 fi
13723 rm -f conftest*
13724 else
13725   cat > conftest.$ac_ext <<EOF
13726 #line 13727 "configure"
13727 #include "confdefs.h"
13728 /* pthread test headers */
13729 #include <pthread.h>
13730 #if HAVE_PTHREADS < 7
13731 #include <errno.h>
13732 #endif
13733 #ifndef NULL
13734 #define NULL (void*)0
13735 #endif
13736
13737 static void *task(p)
13738         void *p;
13739 {
13740         return (void *) (p == NULL);
13741 }
13742
13743
13744 int main(argc, argv)
13745         int argc;
13746         char **argv;
13747 {
13748
13749         /* pthread test function */
13750 #ifndef PTHREAD_CREATE_DETACHED
13751 #define PTHREAD_CREATE_DETACHED 1
13752 #endif
13753         pthread_t t;
13754         int status;
13755         int detach = PTHREAD_CREATE_DETACHED;
13756
13757 #if HAVE_PTHREADS > 4
13758         /* Final pthreads */
13759         pthread_attr_t attr;
13760
13761         status = pthread_attr_init(&attr);
13762         if( status ) return status;
13763
13764 #if HAVE_PTHREADS < 7
13765         status = pthread_attr_setdetachstate(&attr, &detach);
13766         if( status < 0 ) status = errno;
13767 #else
13768         status = pthread_attr_setdetachstate(&attr, detach);
13769 #endif
13770         if( status ) return status;
13771         status = pthread_create( &t, &attr, task, NULL );
13772 #if HAVE_PTHREADS < 7
13773         if( status < 0 ) status = errno;
13774 #endif
13775         if( status ) return status;
13776 #else
13777         /* Draft 4 pthreads */
13778         status = pthread_create( &t, pthread_attr_default, task, NULL );
13779         if( status ) return errno;
13780
13781         /* give thread a chance to complete */
13782         /* it should remain joinable and hence detachable */
13783         sleep( 1 );
13784
13785         status = pthread_detach( &t );
13786         if( status ) return errno;
13787 #endif
13788
13789 #ifdef HAVE_LINUX_THREADS
13790         pthread_kill_other_threads_np();
13791 #endif
13792
13793         return 0;
13794
13795 }
13796
13797 EOF
13798 if { (eval echo configure:13799: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13799 then
13800   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
13801 else
13802   echo "configure: failed program was:" >&5
13803   cat conftest.$ac_ext >&5
13804   rm -fr conftest*
13805   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
13806 fi
13807 rm -fr conftest*
13808 fi
13809
13810
13811                 # restore the LIBS
13812                 LIBS="$ol_LIBS"
13813         
13814 fi
13815
13816 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc_lc_r" 1>&6
13817
13818         if test $ol_cv_pthread_lpthreads_lmach_lexc_lc_r = yes ; then
13819                 ol_link_pthreads="-lpthreads -lmach -lexc -lc_r"
13820                 ol_link_threads=posix
13821         fi
13822 fi
13823
13824                 # Pthread try link: -lpthreads -lmach -lexc (ol_cv_pthread_lpthreads_lmach_lexc)
13825 if test "$ol_link_threads" = no ; then
13826         # try -lpthreads -lmach -lexc
13827         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc""... $ac_c" 1>&6
13828 echo "configure:13829: checking for pthread link with -lpthreads -lmach -lexc" >&5
13829 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc+set}\" = set"; then
13830   echo $ac_n "(cached) $ac_c" 1>&6
13831 else
13832   
13833                 # save the flags
13834                 ol_LIBS="$LIBS"
13835                 LIBS="-lpthreads -lmach -lexc $LIBS"
13836
13837                 if test "$cross_compiling" = yes; then
13838   cat > conftest.$ac_ext <<EOF
13839 #line 13840 "configure"
13840 #include "confdefs.h"
13841 /* pthread test headers */
13842 #include <pthread.h>
13843 #if HAVE_PTHREADS < 7
13844 #include <errno.h>
13845 #endif
13846 #ifndef NULL
13847 #define NULL (void*)0
13848 #endif
13849
13850 static void *task(p)
13851         void *p;
13852 {
13853         return (void *) (p == NULL);
13854 }
13855
13856 int main() {
13857
13858         /* pthread test function */
13859 #ifndef PTHREAD_CREATE_DETACHED
13860 #define PTHREAD_CREATE_DETACHED 1
13861 #endif
13862         pthread_t t;
13863         int status;
13864         int detach = PTHREAD_CREATE_DETACHED;
13865
13866 #if HAVE_PTHREADS > 4
13867         /* Final pthreads */
13868         pthread_attr_t attr;
13869
13870         status = pthread_attr_init(&attr);
13871         if( status ) return status;
13872
13873 #if HAVE_PTHREADS < 7
13874         status = pthread_attr_setdetachstate(&attr, &detach);
13875         if( status < 0 ) status = errno;
13876 #else
13877         status = pthread_attr_setdetachstate(&attr, detach);
13878 #endif
13879         if( status ) return status;
13880         status = pthread_create( &t, &attr, task, NULL );
13881 #if HAVE_PTHREADS < 7
13882         if( status < 0 ) status = errno;
13883 #endif
13884         if( status ) return status;
13885 #else
13886         /* Draft 4 pthreads */
13887         status = pthread_create( &t, pthread_attr_default, task, NULL );
13888         if( status ) return errno;
13889
13890         /* give thread a chance to complete */
13891         /* it should remain joinable and hence detachable */
13892         sleep( 1 );
13893
13894         status = pthread_detach( &t );
13895         if( status ) return errno;
13896 #endif
13897
13898 #ifdef HAVE_LINUX_THREADS
13899         pthread_kill_other_threads_np();
13900 #endif
13901
13902         return 0;
13903
13904 ; return 0; }
13905 EOF
13906 if { (eval echo configure:13907: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13907   rm -rf conftest*
13908   ol_cv_pthread_lpthreads_lmach_lexc=yes
13909 else
13910   echo "configure: failed program was:" >&5
13911   cat conftest.$ac_ext >&5
13912   rm -rf conftest*
13913   ol_cv_pthread_lpthreads_lmach_lexc=no
13914 fi
13915 rm -f conftest*
13916 else
13917   cat > conftest.$ac_ext <<EOF
13918 #line 13919 "configure"
13919 #include "confdefs.h"
13920 /* pthread test headers */
13921 #include <pthread.h>
13922 #if HAVE_PTHREADS < 7
13923 #include <errno.h>
13924 #endif
13925 #ifndef NULL
13926 #define NULL (void*)0
13927 #endif
13928
13929 static void *task(p)
13930         void *p;
13931 {
13932         return (void *) (p == NULL);
13933 }
13934
13935
13936 int main(argc, argv)
13937         int argc;
13938         char **argv;
13939 {
13940
13941         /* pthread test function */
13942 #ifndef PTHREAD_CREATE_DETACHED
13943 #define PTHREAD_CREATE_DETACHED 1
13944 #endif
13945         pthread_t t;
13946         int status;
13947         int detach = PTHREAD_CREATE_DETACHED;
13948
13949 #if HAVE_PTHREADS > 4
13950         /* Final pthreads */
13951         pthread_attr_t attr;
13952
13953         status = pthread_attr_init(&attr);
13954         if( status ) return status;
13955
13956 #if HAVE_PTHREADS < 7
13957         status = pthread_attr_setdetachstate(&attr, &detach);
13958         if( status < 0 ) status = errno;
13959 #else
13960         status = pthread_attr_setdetachstate(&attr, detach);
13961 #endif
13962         if( status ) return status;
13963         status = pthread_create( &t, &attr, task, NULL );
13964 #if HAVE_PTHREADS < 7
13965         if( status < 0 ) status = errno;
13966 #endif
13967         if( status ) return status;
13968 #else
13969         /* Draft 4 pthreads */
13970         status = pthread_create( &t, pthread_attr_default, task, NULL );
13971         if( status ) return errno;
13972
13973         /* give thread a chance to complete */
13974         /* it should remain joinable and hence detachable */
13975         sleep( 1 );
13976
13977         status = pthread_detach( &t );
13978         if( status ) return errno;
13979 #endif
13980
13981 #ifdef HAVE_LINUX_THREADS
13982         pthread_kill_other_threads_np();
13983 #endif
13984
13985         return 0;
13986
13987 }
13988
13989 EOF
13990 if { (eval echo configure:13991: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13991 then
13992   ol_cv_pthread_lpthreads_lmach_lexc=yes
13993 else
13994   echo "configure: failed program was:" >&5
13995   cat conftest.$ac_ext >&5
13996   rm -fr conftest*
13997   ol_cv_pthread_lpthreads_lmach_lexc=no
13998 fi
13999 rm -fr conftest*
14000 fi
14001
14002
14003                 # restore the LIBS
14004                 LIBS="$ol_LIBS"
14005         
14006 fi
14007
14008 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc" 1>&6
14009
14010         if test $ol_cv_pthread_lpthreads_lmach_lexc = yes ; then
14011                 ol_link_pthreads="-lpthreads -lmach -lexc"
14012                 ol_link_threads=posix
14013         fi
14014 fi
14015
14016                 # Pthread try link: -lpthreads -lexc (ol_cv_pthread_lpthreads_lexc)
14017 if test "$ol_link_threads" = no ; then
14018         # try -lpthreads -lexc
14019         echo $ac_n "checking for pthread link with -lpthreads -lexc""... $ac_c" 1>&6
14020 echo "configure:14021: checking for pthread link with -lpthreads -lexc" >&5
14021 if eval "test \"\${ol_cv_pthread_lpthreads_lexc+set}\" = set"; then
14022   echo $ac_n "(cached) $ac_c" 1>&6
14023 else
14024   
14025                 # save the flags
14026                 ol_LIBS="$LIBS"
14027                 LIBS="-lpthreads -lexc $LIBS"
14028
14029                 if test "$cross_compiling" = yes; then
14030   cat > conftest.$ac_ext <<EOF
14031 #line 14032 "configure"
14032 #include "confdefs.h"
14033 /* pthread test headers */
14034 #include <pthread.h>
14035 #if HAVE_PTHREADS < 7
14036 #include <errno.h>
14037 #endif
14038 #ifndef NULL
14039 #define NULL (void*)0
14040 #endif
14041
14042 static void *task(p)
14043         void *p;
14044 {
14045         return (void *) (p == NULL);
14046 }
14047
14048 int main() {
14049
14050         /* pthread test function */
14051 #ifndef PTHREAD_CREATE_DETACHED
14052 #define PTHREAD_CREATE_DETACHED 1
14053 #endif
14054         pthread_t t;
14055         int status;
14056         int detach = PTHREAD_CREATE_DETACHED;
14057
14058 #if HAVE_PTHREADS > 4
14059         /* Final pthreads */
14060         pthread_attr_t attr;
14061
14062         status = pthread_attr_init(&attr);
14063         if( status ) return status;
14064
14065 #if HAVE_PTHREADS < 7
14066         status = pthread_attr_setdetachstate(&attr, &detach);
14067         if( status < 0 ) status = errno;
14068 #else
14069         status = pthread_attr_setdetachstate(&attr, detach);
14070 #endif
14071         if( status ) return status;
14072         status = pthread_create( &t, &attr, task, NULL );
14073 #if HAVE_PTHREADS < 7
14074         if( status < 0 ) status = errno;
14075 #endif
14076         if( status ) return status;
14077 #else
14078         /* Draft 4 pthreads */
14079         status = pthread_create( &t, pthread_attr_default, task, NULL );
14080         if( status ) return errno;
14081
14082         /* give thread a chance to complete */
14083         /* it should remain joinable and hence detachable */
14084         sleep( 1 );
14085
14086         status = pthread_detach( &t );
14087         if( status ) return errno;
14088 #endif
14089
14090 #ifdef HAVE_LINUX_THREADS
14091         pthread_kill_other_threads_np();
14092 #endif
14093
14094         return 0;
14095
14096 ; return 0; }
14097 EOF
14098 if { (eval echo configure:14099: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14099   rm -rf conftest*
14100   ol_cv_pthread_lpthreads_lexc=yes
14101 else
14102   echo "configure: failed program was:" >&5
14103   cat conftest.$ac_ext >&5
14104   rm -rf conftest*
14105   ol_cv_pthread_lpthreads_lexc=no
14106 fi
14107 rm -f conftest*
14108 else
14109   cat > conftest.$ac_ext <<EOF
14110 #line 14111 "configure"
14111 #include "confdefs.h"
14112 /* pthread test headers */
14113 #include <pthread.h>
14114 #if HAVE_PTHREADS < 7
14115 #include <errno.h>
14116 #endif
14117 #ifndef NULL
14118 #define NULL (void*)0
14119 #endif
14120
14121 static void *task(p)
14122         void *p;
14123 {
14124         return (void *) (p == NULL);
14125 }
14126
14127
14128 int main(argc, argv)
14129         int argc;
14130         char **argv;
14131 {
14132
14133         /* pthread test function */
14134 #ifndef PTHREAD_CREATE_DETACHED
14135 #define PTHREAD_CREATE_DETACHED 1
14136 #endif
14137         pthread_t t;
14138         int status;
14139         int detach = PTHREAD_CREATE_DETACHED;
14140
14141 #if HAVE_PTHREADS > 4
14142         /* Final pthreads */
14143         pthread_attr_t attr;
14144
14145         status = pthread_attr_init(&attr);
14146         if( status ) return status;
14147
14148 #if HAVE_PTHREADS < 7
14149         status = pthread_attr_setdetachstate(&attr, &detach);
14150         if( status < 0 ) status = errno;
14151 #else
14152         status = pthread_attr_setdetachstate(&attr, detach);
14153 #endif
14154         if( status ) return status;
14155         status = pthread_create( &t, &attr, task, NULL );
14156 #if HAVE_PTHREADS < 7
14157         if( status < 0 ) status = errno;
14158 #endif
14159         if( status ) return status;
14160 #else
14161         /* Draft 4 pthreads */
14162         status = pthread_create( &t, pthread_attr_default, task, NULL );
14163         if( status ) return errno;
14164
14165         /* give thread a chance to complete */
14166         /* it should remain joinable and hence detachable */
14167         sleep( 1 );
14168
14169         status = pthread_detach( &t );
14170         if( status ) return errno;
14171 #endif
14172
14173 #ifdef HAVE_LINUX_THREADS
14174         pthread_kill_other_threads_np();
14175 #endif
14176
14177         return 0;
14178
14179 }
14180
14181 EOF
14182 if { (eval echo configure:14183: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14183 then
14184   ol_cv_pthread_lpthreads_lexc=yes
14185 else
14186   echo "configure: failed program was:" >&5
14187   cat conftest.$ac_ext >&5
14188   rm -fr conftest*
14189   ol_cv_pthread_lpthreads_lexc=no
14190 fi
14191 rm -fr conftest*
14192 fi
14193
14194
14195                 # restore the LIBS
14196                 LIBS="$ol_LIBS"
14197         
14198 fi
14199
14200 echo "$ac_t""$ol_cv_pthread_lpthreads_lexc" 1>&6
14201
14202         if test $ol_cv_pthread_lpthreads_lexc = yes ; then
14203                 ol_link_pthreads="-lpthreads -lexc"
14204                 ol_link_threads=posix
14205         fi
14206 fi
14207
14208
14209                 # Pthread try link: -lpthreads (ol_cv_pthread_lib_lpthreads)
14210 if test "$ol_link_threads" = no ; then
14211         # try -lpthreads
14212         echo $ac_n "checking for pthread link with -lpthreads""... $ac_c" 1>&6
14213 echo "configure:14214: checking for pthread link with -lpthreads" >&5
14214 if eval "test \"\${ol_cv_pthread_lib_lpthreads+set}\" = set"; then
14215   echo $ac_n "(cached) $ac_c" 1>&6
14216 else
14217   
14218                 # save the flags
14219                 ol_LIBS="$LIBS"
14220                 LIBS="-lpthreads $LIBS"
14221
14222                 if test "$cross_compiling" = yes; then
14223   cat > conftest.$ac_ext <<EOF
14224 #line 14225 "configure"
14225 #include "confdefs.h"
14226 /* pthread test headers */
14227 #include <pthread.h>
14228 #if HAVE_PTHREADS < 7
14229 #include <errno.h>
14230 #endif
14231 #ifndef NULL
14232 #define NULL (void*)0
14233 #endif
14234
14235 static void *task(p)
14236         void *p;
14237 {
14238         return (void *) (p == NULL);
14239 }
14240
14241 int main() {
14242
14243         /* pthread test function */
14244 #ifndef PTHREAD_CREATE_DETACHED
14245 #define PTHREAD_CREATE_DETACHED 1
14246 #endif
14247         pthread_t t;
14248         int status;
14249         int detach = PTHREAD_CREATE_DETACHED;
14250
14251 #if HAVE_PTHREADS > 4
14252         /* Final pthreads */
14253         pthread_attr_t attr;
14254
14255         status = pthread_attr_init(&attr);
14256         if( status ) return status;
14257
14258 #if HAVE_PTHREADS < 7
14259         status = pthread_attr_setdetachstate(&attr, &detach);
14260         if( status < 0 ) status = errno;
14261 #else
14262         status = pthread_attr_setdetachstate(&attr, detach);
14263 #endif
14264         if( status ) return status;
14265         status = pthread_create( &t, &attr, task, NULL );
14266 #if HAVE_PTHREADS < 7
14267         if( status < 0 ) status = errno;
14268 #endif
14269         if( status ) return status;
14270 #else
14271         /* Draft 4 pthreads */
14272         status = pthread_create( &t, pthread_attr_default, task, NULL );
14273         if( status ) return errno;
14274
14275         /* give thread a chance to complete */
14276         /* it should remain joinable and hence detachable */
14277         sleep( 1 );
14278
14279         status = pthread_detach( &t );
14280         if( status ) return errno;
14281 #endif
14282
14283 #ifdef HAVE_LINUX_THREADS
14284         pthread_kill_other_threads_np();
14285 #endif
14286
14287         return 0;
14288
14289 ; return 0; }
14290 EOF
14291 if { (eval echo configure:14292: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14292   rm -rf conftest*
14293   ol_cv_pthread_lib_lpthreads=yes
14294 else
14295   echo "configure: failed program was:" >&5
14296   cat conftest.$ac_ext >&5
14297   rm -rf conftest*
14298   ol_cv_pthread_lib_lpthreads=no
14299 fi
14300 rm -f conftest*
14301 else
14302   cat > conftest.$ac_ext <<EOF
14303 #line 14304 "configure"
14304 #include "confdefs.h"
14305 /* pthread test headers */
14306 #include <pthread.h>
14307 #if HAVE_PTHREADS < 7
14308 #include <errno.h>
14309 #endif
14310 #ifndef NULL
14311 #define NULL (void*)0
14312 #endif
14313
14314 static void *task(p)
14315         void *p;
14316 {
14317         return (void *) (p == NULL);
14318 }
14319
14320
14321 int main(argc, argv)
14322         int argc;
14323         char **argv;
14324 {
14325
14326         /* pthread test function */
14327 #ifndef PTHREAD_CREATE_DETACHED
14328 #define PTHREAD_CREATE_DETACHED 1
14329 #endif
14330         pthread_t t;
14331         int status;
14332         int detach = PTHREAD_CREATE_DETACHED;
14333
14334 #if HAVE_PTHREADS > 4
14335         /* Final pthreads */
14336         pthread_attr_t attr;
14337
14338         status = pthread_attr_init(&attr);
14339         if( status ) return status;
14340
14341 #if HAVE_PTHREADS < 7
14342         status = pthread_attr_setdetachstate(&attr, &detach);
14343         if( status < 0 ) status = errno;
14344 #else
14345         status = pthread_attr_setdetachstate(&attr, detach);
14346 #endif
14347         if( status ) return status;
14348         status = pthread_create( &t, &attr, task, NULL );
14349 #if HAVE_PTHREADS < 7
14350         if( status < 0 ) status = errno;
14351 #endif
14352         if( status ) return status;
14353 #else
14354         /* Draft 4 pthreads */
14355         status = pthread_create( &t, pthread_attr_default, task, NULL );
14356         if( status ) return errno;
14357
14358         /* give thread a chance to complete */
14359         /* it should remain joinable and hence detachable */
14360         sleep( 1 );
14361
14362         status = pthread_detach( &t );
14363         if( status ) return errno;
14364 #endif
14365
14366 #ifdef HAVE_LINUX_THREADS
14367         pthread_kill_other_threads_np();
14368 #endif
14369
14370         return 0;
14371
14372 }
14373
14374 EOF
14375 if { (eval echo configure:14376: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14376 then
14377   ol_cv_pthread_lib_lpthreads=yes
14378 else
14379   echo "configure: failed program was:" >&5
14380   cat conftest.$ac_ext >&5
14381   rm -fr conftest*
14382   ol_cv_pthread_lib_lpthreads=no
14383 fi
14384 rm -fr conftest*
14385 fi
14386
14387
14388                 # restore the LIBS
14389                 LIBS="$ol_LIBS"
14390         
14391 fi
14392
14393 echo "$ac_t""$ol_cv_pthread_lib_lpthreads" 1>&6
14394
14395         if test $ol_cv_pthread_lib_lpthreads = yes ; then
14396                 ol_link_pthreads="-lpthreads"
14397                 ol_link_threads=posix
14398         fi
14399 fi
14400
14401
14402                 if test $ol_link_threads != no ; then
14403                         LTHREAD_LIBS="$LTHREAD_LIBS $ol_link_pthreads"
14404
14405                                                 save_CPPFLAGS="$CPPFLAGS"
14406                         save_LIBS="$LIBS"
14407                         LIBS="$LTHREAD_LIBS $LIBS"
14408
14409                                                                                                 for ac_func in sched_yield pthread_yield thr_yield
14410 do
14411 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
14412 echo "configure:14413: checking for $ac_func" >&5
14413 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
14414   echo $ac_n "(cached) $ac_c" 1>&6
14415 else
14416   cat > conftest.$ac_ext <<EOF
14417 #line 14418 "configure"
14418 #include "confdefs.h"
14419 /* System header to define __stub macros and hopefully few prototypes,
14420     which can conflict with char $ac_func(); below.  */
14421 #include <assert.h>
14422 /* Override any gcc2 internal prototype to avoid an error.  */
14423 /* We use char because int might match the return type of a gcc2
14424     builtin and then its argument prototype would still apply.  */
14425 char $ac_func();
14426 char (*f)();
14427
14428 int main() {
14429
14430 /* The GNU C library defines this for functions which it implements
14431     to always fail with ENOSYS.  Some functions are actually named
14432     something starting with __ and the normal name is an alias.  */
14433 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14434 choke me
14435 #else
14436 f = $ac_func;
14437 #endif
14438
14439 ; return 0; }
14440 EOF
14441 if { (eval echo configure:14442: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14442   rm -rf conftest*
14443   eval "ac_cv_func_$ac_func=yes"
14444 else
14445   echo "configure: failed program was:" >&5
14446   cat conftest.$ac_ext >&5
14447   rm -rf conftest*
14448   eval "ac_cv_func_$ac_func=no"
14449 fi
14450 rm -f conftest*
14451 fi
14452
14453 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
14454   echo "$ac_t""yes" 1>&6
14455     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
14456   cat >> confdefs.h <<EOF
14457 #define $ac_tr_func 1
14458 EOF
14459  
14460 else
14461   echo "$ac_t""no" 1>&6
14462 fi
14463 done
14464
14465
14466                         if test $ac_cv_func_sched_yield = no -a \
14467                                 $ac_cv_func_pthread_yield = no -a \
14468                                 $ac_cv_func_thr_yield = no ; then
14469                                                                 echo $ac_n "checking for sched_yield in -lrt""... $ac_c" 1>&6
14470 echo "configure:14471: checking for sched_yield in -lrt" >&5
14471 ac_lib_var=`echo rt'_'sched_yield | sed 'y%./+-:%__p__%'`
14472 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
14473   echo $ac_n "(cached) $ac_c" 1>&6
14474 else
14475   ac_save_LIBS="$LIBS"
14476 LIBS="-lrt  $LIBS"
14477 cat > conftest.$ac_ext <<EOF
14478 #line 14479 "configure"
14479 #include "confdefs.h"
14480 /* Override any gcc2 internal prototype to avoid an error.  */
14481 /* We use char because int might match the return type of a gcc2
14482     builtin and then its argument prototype would still apply.  */
14483 char sched_yield();
14484
14485 int main() {
14486 sched_yield()
14487 ; return 0; }
14488 EOF
14489 if { (eval echo configure:14490: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14490   rm -rf conftest*
14491   eval "ac_cv_lib_$ac_lib_var=yes"
14492 else
14493   echo "configure: failed program was:" >&5
14494   cat conftest.$ac_ext >&5
14495   rm -rf conftest*
14496   eval "ac_cv_lib_$ac_lib_var=no"
14497 fi
14498 rm -f conftest*
14499 LIBS="$ac_save_LIBS"
14500
14501 fi
14502 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
14503   echo "$ac_t""yes" 1>&6
14504   LTHREAD_LIBS="$LTHREAD_LIBS -lrt"
14505                                         cat >> confdefs.h <<\EOF
14506 #define HAVE_SCHED_YIELD 1
14507 EOF
14508
14509                                         ac_cv_func_sched_yield=yes
14510 else
14511   echo "$ac_t""no" 1>&6
14512 ac_cv_func_sched_yield=no
14513 fi
14514
14515                         fi
14516                         if test $ac_cv_func_sched_yield = no -a \
14517                                 $ac_cv_func_pthread_yield = no -a \
14518                                 "$ac_cv_func_thr_yield" = no ; then
14519                                 echo "configure: warning: could not locate sched_yield() or pthread_yield()" 1>&2
14520                         fi
14521
14522                                                 for ac_func in pthread_kill pthread_rwlock_destroy
14523 do
14524 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
14525 echo "configure:14526: checking for $ac_func" >&5
14526 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
14527   echo $ac_n "(cached) $ac_c" 1>&6
14528 else
14529   cat > conftest.$ac_ext <<EOF
14530 #line 14531 "configure"
14531 #include "confdefs.h"
14532 /* System header to define __stub macros and hopefully few prototypes,
14533     which can conflict with char $ac_func(); below.  */
14534 #include <assert.h>
14535 /* Override any gcc2 internal prototype to avoid an error.  */
14536 /* We use char because int might match the return type of a gcc2
14537     builtin and then its argument prototype would still apply.  */
14538 char $ac_func();
14539 char (*f)();
14540
14541 int main() {
14542
14543 /* The GNU C library defines this for functions which it implements
14544     to always fail with ENOSYS.  Some functions are actually named
14545     something starting with __ and the normal name is an alias.  */
14546 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14547 choke me
14548 #else
14549 f = $ac_func;
14550 #endif
14551
14552 ; return 0; }
14553 EOF
14554 if { (eval echo configure:14555: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14555   rm -rf conftest*
14556   eval "ac_cv_func_$ac_func=yes"
14557 else
14558   echo "configure: failed program was:" >&5
14559   cat conftest.$ac_ext >&5
14560   rm -rf conftest*
14561   eval "ac_cv_func_$ac_func=no"
14562 fi
14563 rm -f conftest*
14564 fi
14565
14566 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
14567   echo "$ac_t""yes" 1>&6
14568     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
14569   cat >> confdefs.h <<EOF
14570 #define $ac_tr_func 1
14571 EOF
14572  
14573 else
14574   echo "$ac_t""no" 1>&6
14575 fi
14576 done
14577
14578
14579                                                                         echo $ac_n "checking for pthread_detach with <pthread.h>""... $ac_c" 1>&6
14580 echo "configure:14581: checking for pthread_detach with <pthread.h>" >&5
14581 if eval "test \"\${ol_cv_func_pthread_detach+set}\" = set"; then
14582   echo $ac_n "(cached) $ac_c" 1>&6
14583 else
14584   
14585                                                                 cat > conftest.$ac_ext <<EOF
14586 #line 14587 "configure"
14587 #include "confdefs.h"
14588
14589 #include <pthread.h>
14590 #ifndef NULL
14591 #define NULL (void*)0
14592 #endif
14593
14594 int main() {
14595 pthread_detach(NULL);
14596 ; return 0; }
14597 EOF
14598 if { (eval echo configure:14599: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14599   rm -rf conftest*
14600   ol_cv_func_pthread_detach=yes
14601 else
14602   echo "configure: failed program was:" >&5
14603   cat conftest.$ac_ext >&5
14604   rm -rf conftest*
14605   ol_cv_func_pthread_detach=no
14606 fi
14607 rm -f conftest*
14608                         
14609 fi
14610
14611 echo "$ac_t""$ol_cv_func_pthread_detach" 1>&6
14612
14613                         if test $ol_cv_func_pthread_detach = no ; then
14614                                 { echo "configure: error: could not locate pthread_detach()" 1>&2; exit 1; }
14615                         fi
14616
14617                         cat >> confdefs.h <<\EOF
14618 #define HAVE_PTHREAD_DETACH 1
14619 EOF
14620
14621
14622                                                 for ac_func in \
14623                                 pthread_setconcurrency \
14624                                 pthread_getconcurrency \
14625                                 thr_setconcurrency \
14626                                 thr_getconcurrency \
14627                         
14628 do
14629 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
14630 echo "configure:14631: checking for $ac_func" >&5
14631 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
14632   echo $ac_n "(cached) $ac_c" 1>&6
14633 else
14634   cat > conftest.$ac_ext <<EOF
14635 #line 14636 "configure"
14636 #include "confdefs.h"
14637 /* System header to define __stub macros and hopefully few prototypes,
14638     which can conflict with char $ac_func(); below.  */
14639 #include <assert.h>
14640 /* Override any gcc2 internal prototype to avoid an error.  */
14641 /* We use char because int might match the return type of a gcc2
14642     builtin and then its argument prototype would still apply.  */
14643 char $ac_func();
14644 char (*f)();
14645
14646 int main() {
14647
14648 /* The GNU C library defines this for functions which it implements
14649     to always fail with ENOSYS.  Some functions are actually named
14650     something starting with __ and the normal name is an alias.  */
14651 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14652 choke me
14653 #else
14654 f = $ac_func;
14655 #endif
14656
14657 ; return 0; }
14658 EOF
14659 if { (eval echo configure:14660: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14660   rm -rf conftest*
14661   eval "ac_cv_func_$ac_func=yes"
14662 else
14663   echo "configure: failed program was:" >&5
14664   cat conftest.$ac_ext >&5
14665   rm -rf conftest*
14666   eval "ac_cv_func_$ac_func=no"
14667 fi
14668 rm -f conftest*
14669 fi
14670
14671 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
14672   echo "$ac_t""yes" 1>&6
14673     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
14674   cat >> confdefs.h <<EOF
14675 #define $ac_tr_func 1
14676 EOF
14677  
14678 else
14679   echo "$ac_t""no" 1>&6
14680 fi
14681 done
14682
14683
14684                         
14685         for ac_func in pthread_kill_other_threads_np
14686 do
14687 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
14688 echo "configure:14689: checking for $ac_func" >&5
14689 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
14690   echo $ac_n "(cached) $ac_c" 1>&6
14691 else
14692   cat > conftest.$ac_ext <<EOF
14693 #line 14694 "configure"
14694 #include "confdefs.h"
14695 /* System header to define __stub macros and hopefully few prototypes,
14696     which can conflict with char $ac_func(); below.  */
14697 #include <assert.h>
14698 /* Override any gcc2 internal prototype to avoid an error.  */
14699 /* We use char because int might match the return type of a gcc2
14700     builtin and then its argument prototype would still apply.  */
14701 char $ac_func();
14702 char (*f)();
14703
14704 int main() {
14705
14706 /* The GNU C library defines this for functions which it implements
14707     to always fail with ENOSYS.  Some functions are actually named
14708     something starting with __ and the normal name is an alias.  */
14709 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14710 choke me
14711 #else
14712 f = $ac_func;
14713 #endif
14714
14715 ; return 0; }
14716 EOF
14717 if { (eval echo configure:14718: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14718   rm -rf conftest*
14719   eval "ac_cv_func_$ac_func=yes"
14720 else
14721   echo "configure: failed program was:" >&5
14722   cat conftest.$ac_ext >&5
14723   rm -rf conftest*
14724   eval "ac_cv_func_$ac_func=no"
14725 fi
14726 rm -f conftest*
14727 fi
14728
14729 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
14730   echo "$ac_t""yes" 1>&6
14731     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
14732   cat >> confdefs.h <<EOF
14733 #define $ac_tr_func 1
14734 EOF
14735  
14736 else
14737   echo "$ac_t""no" 1>&6
14738 fi
14739 done
14740
14741         echo $ac_n "checking for LinuxThreads implementation""... $ac_c" 1>&6
14742 echo "configure:14743: checking for LinuxThreads implementation" >&5
14743 if eval "test \"\${ol_cv_sys_linux_threads+set}\" = set"; then
14744   echo $ac_n "(cached) $ac_c" 1>&6
14745 else
14746   ol_cv_sys_linux_threads=$ac_cv_func_pthread_kill_other_threads_np
14747 fi
14748
14749 echo "$ac_t""$ol_cv_sys_linux_threads" 1>&6
14750
14751                         
14752         
14753         
14754         echo $ac_n "checking for LinuxThreads consistency""... $ac_c" 1>&6
14755 echo "configure:14756: checking for LinuxThreads consistency" >&5
14756 if eval "test \"\${ol_cv_linux_threads+set}\" = set"; then
14757   echo $ac_n "(cached) $ac_c" 1>&6
14758 else
14759   
14760                 if test $ol_cv_header_linux_threads = yes -a \
14761                         $ol_cv_sys_linux_threads = yes; then
14762                         ol_cv_linux_threads=yes
14763                 elif test $ol_cv_header_linux_threads = no -a \
14764                         $ol_cv_sys_linux_threads = no; then
14765                         ol_cv_linux_threads=no
14766                 else
14767                         ol_cv_linux_threads=error
14768                 fi
14769         
14770 fi
14771
14772 echo "$ac_t""$ol_cv_linux_threads" 1>&6
14773
14774
14775                         if test $ol_cv_linux_threads = error; then
14776                                 { echo "configure: error: LinuxThreads header/library mismatch" 1>&2; exit 1; };
14777                         fi
14778
14779                         echo $ac_n "checking if pthread_create() works""... $ac_c" 1>&6
14780 echo "configure:14781: checking if pthread_create() works" >&5
14781 if eval "test \"\${ol_cv_pthread_create_works+set}\" = set"; then
14782   echo $ac_n "(cached) $ac_c" 1>&6
14783 else
14784   
14785                         if test "$cross_compiling" = yes; then
14786                                 ol_cv_pthread_create_works=yes
14787 else
14788   cat > conftest.$ac_ext <<EOF
14789 #line 14790 "configure"
14790 #include "confdefs.h"
14791 /* pthread test headers */
14792 #include <pthread.h>
14793 #if HAVE_PTHREADS < 7
14794 #include <errno.h>
14795 #endif
14796 #ifndef NULL
14797 #define NULL (void*)0
14798 #endif
14799
14800 static void *task(p)
14801         void *p;
14802 {
14803         return (void *) (p == NULL);
14804 }
14805
14806
14807 int main(argc, argv)
14808         int argc;
14809         char **argv;
14810 {
14811
14812         /* pthread test function */
14813 #ifndef PTHREAD_CREATE_DETACHED
14814 #define PTHREAD_CREATE_DETACHED 1
14815 #endif
14816         pthread_t t;
14817         int status;
14818         int detach = PTHREAD_CREATE_DETACHED;
14819
14820 #if HAVE_PTHREADS > 4
14821         /* Final pthreads */
14822         pthread_attr_t attr;
14823
14824         status = pthread_attr_init(&attr);
14825         if( status ) return status;
14826
14827 #if HAVE_PTHREADS < 7
14828         status = pthread_attr_setdetachstate(&attr, &detach);
14829         if( status < 0 ) status = errno;
14830 #else
14831         status = pthread_attr_setdetachstate(&attr, detach);
14832 #endif
14833         if( status ) return status;
14834         status = pthread_create( &t, &attr, task, NULL );
14835 #if HAVE_PTHREADS < 7
14836         if( status < 0 ) status = errno;
14837 #endif
14838         if( status ) return status;
14839 #else
14840         /* Draft 4 pthreads */
14841         status = pthread_create( &t, pthread_attr_default, task, NULL );
14842         if( status ) return errno;
14843
14844         /* give thread a chance to complete */
14845         /* it should remain joinable and hence detachable */
14846         sleep( 1 );
14847
14848         status = pthread_detach( &t );
14849         if( status ) return errno;
14850 #endif
14851
14852 #ifdef HAVE_LINUX_THREADS
14853         pthread_kill_other_threads_np();
14854 #endif
14855
14856         return 0;
14857
14858 }
14859
14860 EOF
14861 if { (eval echo configure:14862: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14862 then
14863   ol_cv_pthread_create_works=yes
14864 else
14865   echo "configure: failed program was:" >&5
14866   cat conftest.$ac_ext >&5
14867   rm -fr conftest*
14868   ol_cv_pthread_create_works=no
14869 fi
14870 rm -fr conftest*
14871 fi
14872
14873 fi
14874
14875 echo "$ac_t""$ol_cv_pthread_create_works" 1>&6
14876
14877                         if test $ol_cv_pthread_create_works = no ; then
14878                                 { echo "configure: error: pthread_create is not usable, check environment settings" 1>&2; exit 1; }
14879                         fi
14880
14881                                                 if test $ol_with_yielding_select = auto ; then
14882                                 echo $ac_n "checking if select yields when using pthreads""... $ac_c" 1>&6
14883 echo "configure:14884: checking if select yields when using pthreads" >&5
14884 if eval "test \"\${ol_cv_pthread_select_yields+set}\" = set"; then
14885   echo $ac_n "(cached) $ac_c" 1>&6
14886 else
14887   
14888                                 if test "$cross_compiling" = yes; then
14889   ol_cv_pthread_select_yields=cross
14890 else
14891   cat > conftest.$ac_ext <<EOF
14892 #line 14893 "configure"
14893 #include "confdefs.h"
14894
14895 #include <sys/types.h>
14896 #include <sys/time.h>
14897 #include <unistd.h>
14898 #include <pthread.h>
14899 #ifndef NULL
14900 #define NULL (void*) 0
14901 #endif
14902
14903 static int fildes[2];
14904
14905 static void *task(p)
14906         void *p;
14907 {
14908         int i;
14909         struct timeval tv;
14910
14911         fd_set rfds;
14912
14913         tv.tv_sec=10;
14914         tv.tv_usec=0;
14915
14916         FD_ZERO(&rfds);
14917         FD_SET(fildes[0], &rfds);
14918
14919         /* we're not interested in any fds */
14920         i = select(FD_SETSIZE, &rfds, NULL, NULL, &tv);
14921
14922         if(i < 0) {
14923                 perror("select");
14924                 exit(10);
14925         }
14926
14927         exit(0); /* if we exit here, the select blocked the whole process */
14928 }
14929
14930 int main(argc, argv)
14931         int argc;
14932         char **argv;
14933 {
14934         pthread_t t;
14935
14936         /* create a pipe to select */
14937         if(pipe(&fildes[0])) {
14938                 perror("select");
14939                 exit(1);
14940         }
14941
14942 #ifdef HAVE_PTHREAD_SETCONCURRENCY
14943         (void) pthread_setconcurrency(2);
14944 #else
14945 #ifdef HAVE_THR_SETCONCURRENCY
14946         /* Set Solaris LWP concurrency to 2 */
14947         thr_setconcurrency(2);
14948 #endif
14949 #endif
14950
14951 #if HAVE_PTHREADS < 6
14952         pthread_create(&t, pthread_attr_default, task, NULL);
14953 #else
14954         pthread_create(&t, NULL, task, NULL);
14955 #endif
14956
14957         /* make sure task runs first */
14958 #if HAVE_THR_YIELD
14959         thr_yield();
14960 #elif defined( HAVE_SCHED_YIELD )
14961         sched_yield();
14962 #elif defined( HAVE_PTHREAD_YIELD )
14963         pthread_yield();
14964 #endif
14965
14966         exit(2);
14967 }
14968 EOF
14969 if { (eval echo configure:14970: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14970 then
14971   ol_cv_pthread_select_yields=no
14972 else
14973   echo "configure: failed program was:" >&5
14974   cat conftest.$ac_ext >&5
14975   rm -fr conftest*
14976   ol_cv_pthread_select_yields=yes
14977 fi
14978 rm -fr conftest*
14979 fi
14980
14981 fi
14982
14983 echo "$ac_t""$ol_cv_pthread_select_yields" 1>&6
14984
14985                                 if test $ol_cv_pthread_select_yields = cross ; then
14986                                         { echo "configure: error: crossing compiling: use --with-yielding_select=yes|no|manual" 1>&2; exit 1; }
14987                                 fi
14988
14989                                 if test $ol_cv_pthread_select_yields = yes ; then
14990                                         ol_with_yielding_select=yes
14991                                 fi
14992                         fi
14993
14994                                                 CPPFLAGS="$save_CPPFLAGS"
14995                         LIBS="$save_LIBS"
14996                 else
14997                         { echo "configure: error: could not locate usable POSIX Threads" 1>&2; exit 1; }
14998                 fi
14999         fi
15000
15001         if test $ol_with_threads = posix ; then
15002                 { echo "configure: error: could not locate POSIX Threads" 1>&2; exit 1; }
15003         fi
15004 fi
15005
15006 if test $ol_with_threads = auto -o $ol_with_threads = yes \
15007         -o $ol_with_threads = mach ; then
15008
15009                 for ac_hdr in mach/cthreads.h cthreads.h
15010 do
15011 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15012 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15013 echo "configure:15014: checking for $ac_hdr" >&5
15014 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15015   echo $ac_n "(cached) $ac_c" 1>&6
15016 else
15017   cat > conftest.$ac_ext <<EOF
15018 #line 15019 "configure"
15019 #include "confdefs.h"
15020 #include <$ac_hdr>
15021 EOF
15022 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15023 { (eval echo configure:15024: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15024 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15025 if test -z "$ac_err"; then
15026   rm -rf conftest*
15027   eval "ac_cv_header_$ac_safe=yes"
15028 else
15029   echo "$ac_err" >&5
15030   echo "configure: failed program was:" >&5
15031   cat conftest.$ac_ext >&5
15032   rm -rf conftest*
15033   eval "ac_cv_header_$ac_safe=no"
15034 fi
15035 rm -f conftest*
15036 fi
15037 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15038   echo "$ac_t""yes" 1>&6
15039     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15040   cat >> confdefs.h <<EOF
15041 #define $ac_tr_hdr 1
15042 EOF
15043  
15044 else
15045   echo "$ac_t""no" 1>&6
15046 fi
15047 done
15048
15049         if test $ac_cv_header_mach_cthreads_h = yes ; then
15050                 ol_with_threads=found
15051
15052                                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
15053 echo "configure:15054: checking for cthread_fork" >&5
15054 if eval "test \"\${ac_cv_func_cthread_fork+set}\" = set"; then
15055   echo $ac_n "(cached) $ac_c" 1>&6
15056 else
15057   cat > conftest.$ac_ext <<EOF
15058 #line 15059 "configure"
15059 #include "confdefs.h"
15060 /* System header to define __stub macros and hopefully few prototypes,
15061     which can conflict with char cthread_fork(); below.  */
15062 #include <assert.h>
15063 /* Override any gcc2 internal prototype to avoid an error.  */
15064 /* We use char because int might match the return type of a gcc2
15065     builtin and then its argument prototype would still apply.  */
15066 char cthread_fork();
15067 char (*f)();
15068
15069 int main() {
15070
15071 /* The GNU C library defines this for functions which it implements
15072     to always fail with ENOSYS.  Some functions are actually named
15073     something starting with __ and the normal name is an alias.  */
15074 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
15075 choke me
15076 #else
15077 f = cthread_fork;
15078 #endif
15079
15080 ; return 0; }
15081 EOF
15082 if { (eval echo configure:15083: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15083   rm -rf conftest*
15084   eval "ac_cv_func_cthread_fork=yes"
15085 else
15086   echo "configure: failed program was:" >&5
15087   cat conftest.$ac_ext >&5
15088   rm -rf conftest*
15089   eval "ac_cv_func_cthread_fork=no"
15090 fi
15091 rm -f conftest*
15092 fi
15093
15094 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
15095   echo "$ac_t""yes" 1>&6
15096   ol_link_threads=yes
15097 else
15098   echo "$ac_t""no" 1>&6
15099 fi
15100
15101
15102                 if test $ol_link_threads = no ; then
15103                                                                         echo $ac_n "checking for cthread_fork with -all_load""... $ac_c" 1>&6
15104 echo "configure:15105: checking for cthread_fork with -all_load" >&5
15105 if eval "test \"\${ol_cv_cthread_all_load+set}\" = set"; then
15106   echo $ac_n "(cached) $ac_c" 1>&6
15107 else
15108   
15109                                                                 save_LIBS="$LIBS"
15110                                 LIBS="-all_load $LIBS"
15111                                 cat > conftest.$ac_ext <<EOF
15112 #line 15113 "configure"
15113 #include "confdefs.h"
15114 #include <mach/cthreads.h>
15115 int main() {
15116
15117                                         cthread_fork((void *)0, (void *)0);
15118                                         
15119 ; return 0; }
15120 EOF
15121 if { (eval echo configure:15122: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15122   rm -rf conftest*
15123   ol_cv_cthread_all_load=yes
15124 else
15125   echo "configure: failed program was:" >&5
15126   cat conftest.$ac_ext >&5
15127   rm -rf conftest*
15128   ol_cv_cthread_all_load=no
15129 fi
15130 rm -f conftest*
15131                                                                 LIBS="$save_LIBS"
15132                         
15133 fi
15134
15135 echo "$ac_t""$ol_cv_cthread_all_load" 1>&6
15136
15137                         if test $ol_cv_cthread_all_load = yes ; then
15138                                 LTHREAD_LIBS="$LTHREAD_LIBS -all_load"
15139                                 ol_link_threads=mach
15140                                 ol_with_threads=found
15141                         fi
15142                 fi
15143
15144         elif test $ac_cv_header_cthreads_h = yes ; then
15145                                 
15146                 ol_with_threads=found
15147  
15148                                 save_LIBS="$LIBS"
15149                 LIBS="$LIBS -lthreads"
15150                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
15151 echo "configure:15152: checking for cthread_fork" >&5
15152 if eval "test \"\${ac_cv_func_cthread_fork+set}\" = set"; then
15153   echo $ac_n "(cached) $ac_c" 1>&6
15154 else
15155   cat > conftest.$ac_ext <<EOF
15156 #line 15157 "configure"
15157 #include "confdefs.h"
15158 /* System header to define __stub macros and hopefully few prototypes,
15159     which can conflict with char cthread_fork(); below.  */
15160 #include <assert.h>
15161 /* Override any gcc2 internal prototype to avoid an error.  */
15162 /* We use char because int might match the return type of a gcc2
15163     builtin and then its argument prototype would still apply.  */
15164 char cthread_fork();
15165 char (*f)();
15166
15167 int main() {
15168
15169 /* The GNU C library defines this for functions which it implements
15170     to always fail with ENOSYS.  Some functions are actually named
15171     something starting with __ and the normal name is an alias.  */
15172 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
15173 choke me
15174 #else
15175 f = cthread_fork;
15176 #endif
15177
15178 ; return 0; }
15179 EOF
15180 if { (eval echo configure:15181: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15181   rm -rf conftest*
15182   eval "ac_cv_func_cthread_fork=yes"
15183 else
15184   echo "configure: failed program was:" >&5
15185   cat conftest.$ac_ext >&5
15186   rm -rf conftest*
15187   eval "ac_cv_func_cthread_fork=no"
15188 fi
15189 rm -f conftest*
15190 fi
15191
15192 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
15193   echo "$ac_t""yes" 1>&6
15194   ol_link_threads=yes
15195 else
15196   echo "$ac_t""no" 1>&6
15197 fi
15198
15199                 LIBS="$save_LIBS"
15200
15201                 if test $ol_link_threads = yes ; then
15202                         LTHREAD_LIBS="-lthreads"
15203                         ol_link_threads=mach
15204                         ol_with_threads=found
15205                 else
15206                         { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
15207                 fi
15208
15209         elif test $ol_with_threads = mach ; then
15210                 { echo "configure: error: could not locate Mach CThreads" 1>&2; exit 1; }
15211         fi
15212
15213         if test $ol_link_threads = mach ; then
15214                 cat >> confdefs.h <<\EOF
15215 #define HAVE_MACH_CTHREADS 1
15216 EOF
15217
15218         elif test $ol_with_threads = found ; then
15219                 { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
15220         fi
15221 fi
15222
15223 if test $ol_with_threads = auto -o $ol_with_threads = yes \
15224         -o $ol_with_threads = pth ; then
15225
15226         for ac_hdr in pth.h
15227 do
15228 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15229 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15230 echo "configure:15231: checking for $ac_hdr" >&5
15231 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15232   echo $ac_n "(cached) $ac_c" 1>&6
15233 else
15234   cat > conftest.$ac_ext <<EOF
15235 #line 15236 "configure"
15236 #include "confdefs.h"
15237 #include <$ac_hdr>
15238 EOF
15239 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15240 { (eval echo configure:15241: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15241 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15242 if test -z "$ac_err"; then
15243   rm -rf conftest*
15244   eval "ac_cv_header_$ac_safe=yes"
15245 else
15246   echo "$ac_err" >&5
15247   echo "configure: failed program was:" >&5
15248   cat conftest.$ac_ext >&5
15249   rm -rf conftest*
15250   eval "ac_cv_header_$ac_safe=no"
15251 fi
15252 rm -f conftest*
15253 fi
15254 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15255   echo "$ac_t""yes" 1>&6
15256     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15257   cat >> confdefs.h <<EOF
15258 #define $ac_tr_hdr 1
15259 EOF
15260  
15261 else
15262   echo "$ac_t""no" 1>&6
15263 fi
15264 done
15265
15266
15267         if test $ac_cv_header_pth_h = yes ; then
15268                 echo $ac_n "checking for pth_version in -lpth""... $ac_c" 1>&6
15269 echo "configure:15270: checking for pth_version in -lpth" >&5
15270 ac_lib_var=`echo pth'_'pth_version | sed 'y%./+-:%__p__%'`
15271 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
15272   echo $ac_n "(cached) $ac_c" 1>&6
15273 else
15274   ac_save_LIBS="$LIBS"
15275 LIBS="-lpth  $LIBS"
15276 cat > conftest.$ac_ext <<EOF
15277 #line 15278 "configure"
15278 #include "confdefs.h"
15279 /* Override any gcc2 internal prototype to avoid an error.  */
15280 /* We use char because int might match the return type of a gcc2
15281     builtin and then its argument prototype would still apply.  */
15282 char pth_version();
15283
15284 int main() {
15285 pth_version()
15286 ; return 0; }
15287 EOF
15288 if { (eval echo configure:15289: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15289   rm -rf conftest*
15290   eval "ac_cv_lib_$ac_lib_var=yes"
15291 else
15292   echo "configure: failed program was:" >&5
15293   cat conftest.$ac_ext >&5
15294   rm -rf conftest*
15295   eval "ac_cv_lib_$ac_lib_var=no"
15296 fi
15297 rm -f conftest*
15298 LIBS="$ac_save_LIBS"
15299
15300 fi
15301 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
15302   echo "$ac_t""yes" 1>&6
15303   have_pth=yes
15304 else
15305   echo "$ac_t""no" 1>&6
15306 have_pth=no
15307 fi
15308
15309
15310                 if test $have_pth = yes ; then
15311                         cat >> confdefs.h <<\EOF
15312 #define HAVE_GNU_PTH 1
15313 EOF
15314
15315                         LTHREAD_LIBS="$LTHREAD_LIBS -lpth"
15316                         ol_link_threads=pth
15317                         ol_with_threads=found
15318
15319                         if test $ol_with_yielding_select = auto ; then
15320                                 ol_with_yielding_select=yes
15321                         fi
15322                 fi
15323         fi
15324 fi
15325
15326 if test $ol_with_threads = auto -o $ol_with_threads = yes \
15327         -o $ol_with_threads = lwp ; then
15328
15329                 for ac_hdr in thread.h synch.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_thread_h = yes -a $ac_cv_header_synch_h = yes ; then
15370                 echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6
15371 echo "configure:15372: checking for thr_create in -lthread" >&5
15372 ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-:%__p__%'`
15373 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
15374   echo $ac_n "(cached) $ac_c" 1>&6
15375 else
15376   ac_save_LIBS="$LIBS"
15377 LIBS="-lthread  $LIBS"
15378 cat > conftest.$ac_ext <<EOF
15379 #line 15380 "configure"
15380 #include "confdefs.h"
15381 /* Override any gcc2 internal prototype to avoid an error.  */
15382 /* We use char because int might match the return type of a gcc2
15383     builtin and then its argument prototype would still apply.  */
15384 char thr_create();
15385
15386 int main() {
15387 thr_create()
15388 ; return 0; }
15389 EOF
15390 if { (eval echo configure:15391: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15391   rm -rf conftest*
15392   eval "ac_cv_lib_$ac_lib_var=yes"
15393 else
15394   echo "configure: failed program was:" >&5
15395   cat conftest.$ac_ext >&5
15396   rm -rf conftest*
15397   eval "ac_cv_lib_$ac_lib_var=no"
15398 fi
15399 rm -f conftest*
15400 LIBS="$ac_save_LIBS"
15401
15402 fi
15403 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
15404   echo "$ac_t""yes" 1>&6
15405   have_thr=yes
15406 else
15407   echo "$ac_t""no" 1>&6
15408 have_thr=no
15409 fi
15410
15411
15412                 if test $have_thr = yes ; then
15413                         cat >> confdefs.h <<\EOF
15414 #define HAVE_THR 1
15415 EOF
15416
15417                         LTHREAD_LIBS="$LTHREAD_LIBS -lthread"
15418                         ol_link_threads=thr
15419
15420                         if test $ol_with_yielding_select = auto ; then
15421                                 ol_with_yielding_select=yes
15422                         fi
15423
15424                                                 for ac_func in \
15425                                 thr_setconcurrency \
15426                                 thr_getconcurrency \
15427                         
15428 do
15429 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15430 echo "configure:15431: checking for $ac_func" >&5
15431 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15432   echo $ac_n "(cached) $ac_c" 1>&6
15433 else
15434   cat > conftest.$ac_ext <<EOF
15435 #line 15436 "configure"
15436 #include "confdefs.h"
15437 /* System header to define __stub macros and hopefully few prototypes,
15438     which can conflict with char $ac_func(); below.  */
15439 #include <assert.h>
15440 /* Override any gcc2 internal prototype to avoid an error.  */
15441 /* We use char because int might match the return type of a gcc2
15442     builtin and then its argument prototype would still apply.  */
15443 char $ac_func();
15444 char (*f)();
15445
15446 int main() {
15447
15448 /* The GNU C library defines this for functions which it implements
15449     to always fail with ENOSYS.  Some functions are actually named
15450     something starting with __ and the normal name is an alias.  */
15451 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15452 choke me
15453 #else
15454 f = $ac_func;
15455 #endif
15456
15457 ; return 0; }
15458 EOF
15459 if { (eval echo configure:15460: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15460   rm -rf conftest*
15461   eval "ac_cv_func_$ac_func=yes"
15462 else
15463   echo "configure: failed program was:" >&5
15464   cat conftest.$ac_ext >&5
15465   rm -rf conftest*
15466   eval "ac_cv_func_$ac_func=no"
15467 fi
15468 rm -f conftest*
15469 fi
15470
15471 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15472   echo "$ac_t""yes" 1>&6
15473     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15474   cat >> confdefs.h <<EOF
15475 #define $ac_tr_func 1
15476 EOF
15477  
15478 else
15479   echo "$ac_t""no" 1>&6
15480 fi
15481 done
15482
15483                 fi
15484         fi
15485
15486                 for ac_hdr in lwp/lwp.h
15487 do
15488 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15489 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15490 echo "configure:15491: checking for $ac_hdr" >&5
15491 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15492   echo $ac_n "(cached) $ac_c" 1>&6
15493 else
15494   cat > conftest.$ac_ext <<EOF
15495 #line 15496 "configure"
15496 #include "confdefs.h"
15497 #include <$ac_hdr>
15498 EOF
15499 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15500 { (eval echo configure:15501: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15501 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15502 if test -z "$ac_err"; then
15503   rm -rf conftest*
15504   eval "ac_cv_header_$ac_safe=yes"
15505 else
15506   echo "$ac_err" >&5
15507   echo "configure: failed program was:" >&5
15508   cat conftest.$ac_ext >&5
15509   rm -rf conftest*
15510   eval "ac_cv_header_$ac_safe=no"
15511 fi
15512 rm -f conftest*
15513 fi
15514 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15515   echo "$ac_t""yes" 1>&6
15516     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15517   cat >> confdefs.h <<EOF
15518 #define $ac_tr_hdr 1
15519 EOF
15520  
15521 else
15522   echo "$ac_t""no" 1>&6
15523 fi
15524 done
15525
15526         if test $ac_cv_header_lwp_lwp_h = yes ; then
15527                 echo $ac_n "checking for lwp_create in -llwp""... $ac_c" 1>&6
15528 echo "configure:15529: checking for lwp_create in -llwp" >&5
15529 ac_lib_var=`echo lwp'_'lwp_create | sed 'y%./+-:%__p__%'`
15530 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
15531   echo $ac_n "(cached) $ac_c" 1>&6
15532 else
15533   ac_save_LIBS="$LIBS"
15534 LIBS="-llwp  $LIBS"
15535 cat > conftest.$ac_ext <<EOF
15536 #line 15537 "configure"
15537 #include "confdefs.h"
15538 /* Override any gcc2 internal prototype to avoid an error.  */
15539 /* We use char because int might match the return type of a gcc2
15540     builtin and then its argument prototype would still apply.  */
15541 char lwp_create();
15542
15543 int main() {
15544 lwp_create()
15545 ; return 0; }
15546 EOF
15547 if { (eval echo configure:15548: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15548   rm -rf conftest*
15549   eval "ac_cv_lib_$ac_lib_var=yes"
15550 else
15551   echo "configure: failed program was:" >&5
15552   cat conftest.$ac_ext >&5
15553   rm -rf conftest*
15554   eval "ac_cv_lib_$ac_lib_var=no"
15555 fi
15556 rm -f conftest*
15557 LIBS="$ac_save_LIBS"
15558
15559 fi
15560 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
15561   echo "$ac_t""yes" 1>&6
15562   have_lwp=yes
15563 else
15564   echo "$ac_t""no" 1>&6
15565 have_lwp=no
15566 fi
15567
15568
15569                 if test $have_lwp = yes ; then
15570                         cat >> confdefs.h <<\EOF
15571 #define HAVE_LWP 1
15572 EOF
15573
15574                         LTHREAD_LIBS="$LTHREAD_LIBS -llwp"
15575                         ol_link_threads=lwp
15576
15577                         if test $ol_with_yielding_select = auto ; then
15578                                 ol_with_yielding_select=no
15579                         fi
15580                 fi
15581         fi
15582 fi
15583
15584 if test $ol_with_yielding_select = yes ; then
15585         cat >> confdefs.h <<\EOF
15586 #define HAVE_YIELDING_SELECT 1
15587 EOF
15588
15589 fi
15590
15591 if test $ol_with_threads = manual ; then
15592                 ol_link_threads=yes
15593
15594         echo "configure: warning: thread defines and link options must be set manually" 1>&2
15595
15596         for ac_hdr in pthread.h sched.h
15597 do
15598 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15599 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15600 echo "configure:15601: checking for $ac_hdr" >&5
15601 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15602   echo $ac_n "(cached) $ac_c" 1>&6
15603 else
15604   cat > conftest.$ac_ext <<EOF
15605 #line 15606 "configure"
15606 #include "confdefs.h"
15607 #include <$ac_hdr>
15608 EOF
15609 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15610 { (eval echo configure:15611: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15611 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15612 if test -z "$ac_err"; then
15613   rm -rf conftest*
15614   eval "ac_cv_header_$ac_safe=yes"
15615 else
15616   echo "$ac_err" >&5
15617   echo "configure: failed program was:" >&5
15618   cat conftest.$ac_ext >&5
15619   rm -rf conftest*
15620   eval "ac_cv_header_$ac_safe=no"
15621 fi
15622 rm -f conftest*
15623 fi
15624 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15625   echo "$ac_t""yes" 1>&6
15626     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15627   cat >> confdefs.h <<EOF
15628 #define $ac_tr_hdr 1
15629 EOF
15630  
15631 else
15632   echo "$ac_t""no" 1>&6
15633 fi
15634 done
15635
15636         for ac_func in sched_yield pthread_yield
15637 do
15638 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15639 echo "configure:15640: checking for $ac_func" >&5
15640 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15641   echo $ac_n "(cached) $ac_c" 1>&6
15642 else
15643   cat > conftest.$ac_ext <<EOF
15644 #line 15645 "configure"
15645 #include "confdefs.h"
15646 /* System header to define __stub macros and hopefully few prototypes,
15647     which can conflict with char $ac_func(); below.  */
15648 #include <assert.h>
15649 /* Override any gcc2 internal prototype to avoid an error.  */
15650 /* We use char because int might match the return type of a gcc2
15651     builtin and then its argument prototype would still apply.  */
15652 char $ac_func();
15653 char (*f)();
15654
15655 int main() {
15656
15657 /* The GNU C library defines this for functions which it implements
15658     to always fail with ENOSYS.  Some functions are actually named
15659     something starting with __ and the normal name is an alias.  */
15660 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15661 choke me
15662 #else
15663 f = $ac_func;
15664 #endif
15665
15666 ; return 0; }
15667 EOF
15668 if { (eval echo configure:15669: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15669   rm -rf conftest*
15670   eval "ac_cv_func_$ac_func=yes"
15671 else
15672   echo "configure: failed program was:" >&5
15673   cat conftest.$ac_ext >&5
15674   rm -rf conftest*
15675   eval "ac_cv_func_$ac_func=no"
15676 fi
15677 rm -f conftest*
15678 fi
15679
15680 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15681   echo "$ac_t""yes" 1>&6
15682     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15683   cat >> confdefs.h <<EOF
15684 #define $ac_tr_func 1
15685 EOF
15686  
15687 else
15688   echo "$ac_t""no" 1>&6
15689 fi
15690 done
15691
15692         
15693         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
15694 echo "configure:15695: checking for LinuxThreads pthread.h" >&5
15695 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
15696   echo $ac_n "(cached) $ac_c" 1>&6
15697 else
15698   cat > conftest.$ac_ext <<EOF
15699 #line 15700 "configure"
15700 #include "confdefs.h"
15701 #include <pthread.h>
15702 EOF
15703 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15704   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
15705   rm -rf conftest*
15706   ol_cv_header_linux_threads=yes
15707 else
15708   rm -rf conftest*
15709   ol_cv_header_linux_threads=no
15710 fi
15711 rm -f conftest*
15712
15713                 
15714 fi
15715
15716 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
15717         if test $ol_cv_header_linux_threads = yes; then
15718                 cat >> confdefs.h <<\EOF
15719 #define HAVE_LINUX_THREADS 1
15720 EOF
15721
15722         fi
15723
15724
15725         for ac_hdr in mach/cthreads.h
15726 do
15727 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15728 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15729 echo "configure:15730: checking for $ac_hdr" >&5
15730 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15731   echo $ac_n "(cached) $ac_c" 1>&6
15732 else
15733   cat > conftest.$ac_ext <<EOF
15734 #line 15735 "configure"
15735 #include "confdefs.h"
15736 #include <$ac_hdr>
15737 EOF
15738 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15739 { (eval echo configure:15740: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15740 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15741 if test -z "$ac_err"; then
15742   rm -rf conftest*
15743   eval "ac_cv_header_$ac_safe=yes"
15744 else
15745   echo "$ac_err" >&5
15746   echo "configure: failed program was:" >&5
15747   cat conftest.$ac_ext >&5
15748   rm -rf conftest*
15749   eval "ac_cv_header_$ac_safe=no"
15750 fi
15751 rm -f conftest*
15752 fi
15753 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15754   echo "$ac_t""yes" 1>&6
15755     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15756   cat >> confdefs.h <<EOF
15757 #define $ac_tr_hdr 1
15758 EOF
15759  
15760 else
15761   echo "$ac_t""no" 1>&6
15762 fi
15763 done
15764
15765         for ac_hdr in lwp/lwp.h
15766 do
15767 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15768 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15769 echo "configure:15770: checking for $ac_hdr" >&5
15770 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15771   echo $ac_n "(cached) $ac_c" 1>&6
15772 else
15773   cat > conftest.$ac_ext <<EOF
15774 #line 15775 "configure"
15775 #include "confdefs.h"
15776 #include <$ac_hdr>
15777 EOF
15778 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15779 { (eval echo configure:15780: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15780 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15781 if test -z "$ac_err"; then
15782   rm -rf conftest*
15783   eval "ac_cv_header_$ac_safe=yes"
15784 else
15785   echo "$ac_err" >&5
15786   echo "configure: failed program was:" >&5
15787   cat conftest.$ac_ext >&5
15788   rm -rf conftest*
15789   eval "ac_cv_header_$ac_safe=no"
15790 fi
15791 rm -f conftest*
15792 fi
15793 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15794   echo "$ac_t""yes" 1>&6
15795     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15796   cat >> confdefs.h <<EOF
15797 #define $ac_tr_hdr 1
15798 EOF
15799  
15800 else
15801   echo "$ac_t""no" 1>&6
15802 fi
15803 done
15804
15805         for ac_hdr in thread.h synch.h
15806 do
15807 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15808 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15809 echo "configure:15810: checking for $ac_hdr" >&5
15810 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15811   echo $ac_n "(cached) $ac_c" 1>&6
15812 else
15813   cat > conftest.$ac_ext <<EOF
15814 #line 15815 "configure"
15815 #include "confdefs.h"
15816 #include <$ac_hdr>
15817 EOF
15818 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15819 { (eval echo configure:15820: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15820 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15821 if test -z "$ac_err"; then
15822   rm -rf conftest*
15823   eval "ac_cv_header_$ac_safe=yes"
15824 else
15825   echo "$ac_err" >&5
15826   echo "configure: failed program was:" >&5
15827   cat conftest.$ac_ext >&5
15828   rm -rf conftest*
15829   eval "ac_cv_header_$ac_safe=no"
15830 fi
15831 rm -f conftest*
15832 fi
15833 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15834   echo "$ac_t""yes" 1>&6
15835     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15836   cat >> confdefs.h <<EOF
15837 #define $ac_tr_hdr 1
15838 EOF
15839  
15840 else
15841   echo "$ac_t""no" 1>&6
15842 fi
15843 done
15844
15845 fi
15846
15847 if test $ol_link_threads != no -a $ol_link_threads != nt ; then  
15848                         cat >> confdefs.h <<\EOF
15849 #define REENTRANT 1
15850 EOF
15851
15852         cat >> confdefs.h <<\EOF
15853 #define _REENTRANT 1
15854 EOF
15855
15856         cat >> confdefs.h <<\EOF
15857 #define THREAD_SAFE 1
15858 EOF
15859
15860         cat >> confdefs.h <<\EOF
15861 #define _THREAD_SAFE 1
15862 EOF
15863
15864         cat >> confdefs.h <<\EOF
15865 #define THREADSAFE 1
15866 EOF
15867
15868         cat >> confdefs.h <<\EOF
15869 #define _THREADSAFE 1
15870 EOF
15871
15872         cat >> confdefs.h <<\EOF
15873 #define _SGI_MP_SOURCE 1
15874 EOF
15875
15876
15877                         echo $ac_n "checking for thread specific errno""... $ac_c" 1>&6
15878 echo "configure:15879: checking for thread specific errno" >&5
15879 if eval "test \"\${ol_cv_errno_thread_specific+set}\" = set"; then
15880   echo $ac_n "(cached) $ac_c" 1>&6
15881 else
15882   
15883                 cat > conftest.$ac_ext <<EOF
15884 #line 15885 "configure"
15885 #include "confdefs.h"
15886 #include <errno.h>
15887 int main() {
15888 errno = 0;
15889 ; return 0; }
15890 EOF
15891 if { (eval echo configure:15892: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15892   rm -rf conftest*
15893   ol_cv_errno_thread_specific=yes
15894 else
15895   echo "configure: failed program was:" >&5
15896   cat conftest.$ac_ext >&5
15897   rm -rf conftest*
15898   ol_cv_errno_thread_specific=no
15899 fi
15900 rm -f conftest*
15901         
15902 fi
15903
15904 echo "$ac_t""$ol_cv_errno_thread_specific" 1>&6
15905
15906                         echo $ac_n "checking for thread specific h_errno""... $ac_c" 1>&6
15907 echo "configure:15908: checking for thread specific h_errno" >&5
15908 if eval "test \"\${ol_cv_h_errno_thread_specific+set}\" = set"; then
15909   echo $ac_n "(cached) $ac_c" 1>&6
15910 else
15911   
15912                 cat > conftest.$ac_ext <<EOF
15913 #line 15914 "configure"
15914 #include "confdefs.h"
15915 #include <netdb.h>
15916 int main() {
15917 h_errno = 0;
15918 ; return 0; }
15919 EOF
15920 if { (eval echo configure:15921: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15921   rm -rf conftest*
15922   ol_cv_h_errno_thread_specific=yes
15923 else
15924   echo "configure: failed program was:" >&5
15925   cat conftest.$ac_ext >&5
15926   rm -rf conftest*
15927   ol_cv_h_errno_thread_specific=no
15928 fi
15929 rm -f conftest*
15930         
15931 fi
15932
15933 echo "$ac_t""$ol_cv_h_errno_thread_specific" 1>&6
15934
15935         if test $ol_cv_errno_thread_specific != yes \
15936                 -o $ol_cv_h_errno_thread_specific != yes ; then
15937                 LIBS="$LTHREAD_LIBS $LIBS"
15938                 LTHREAD_LIBS=""
15939         fi
15940
15941 fi  
15942
15943 if test $ol_link_threads = no ; then
15944         if test $ol_with_threads = yes ; then
15945                 { echo "configure: error: no suitable thread support" 1>&2; exit 1; }
15946         fi
15947
15948         if test $ol_with_threads = auto ; then
15949                 echo "configure: warning: no suitable thread support, disabling threads" 1>&2
15950                 ol_with_threads=no
15951         fi
15952
15953         cat >> confdefs.h <<\EOF
15954 #define NO_THREADS 1
15955 EOF
15956
15957         LTHREAD_LIBS=""
15958 fi
15959
15960 if test $ol_link_threads != no ; then
15961         cat >> confdefs.h <<\EOF
15962 #define LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE 1
15963 EOF
15964
15965 fi
15966
15967 for ac_func in \
15968         ctime_r                 \
15969         gethostbyname_r gethostbyaddr_r \
15970
15971 do
15972 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15973 echo "configure:15974: checking for $ac_func" >&5
15974 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15975   echo $ac_n "(cached) $ac_c" 1>&6
15976 else
15977   cat > conftest.$ac_ext <<EOF
15978 #line 15979 "configure"
15979 #include "confdefs.h"
15980 /* System header to define __stub macros and hopefully few prototypes,
15981     which can conflict with char $ac_func(); below.  */
15982 #include <assert.h>
15983 /* Override any gcc2 internal prototype to avoid an error.  */
15984 /* We use char because int might match the return type of a gcc2
15985     builtin and then its argument prototype would still apply.  */
15986 char $ac_func();
15987 char (*f)();
15988
15989 int main() {
15990
15991 /* The GNU C library defines this for functions which it implements
15992     to always fail with ENOSYS.  Some functions are actually named
15993     something starting with __ and the normal name is an alias.  */
15994 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15995 choke me
15996 #else
15997 f = $ac_func;
15998 #endif
15999
16000 ; return 0; }
16001 EOF
16002 if { (eval echo configure:16003: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16003   rm -rf conftest*
16004   eval "ac_cv_func_$ac_func=yes"
16005 else
16006   echo "configure: failed program was:" >&5
16007   cat conftest.$ac_ext >&5
16008   rm -rf conftest*
16009   eval "ac_cv_func_$ac_func=no"
16010 fi
16011 rm -f conftest*
16012 fi
16013
16014 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
16015   echo "$ac_t""yes" 1>&6
16016     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
16017   cat >> confdefs.h <<EOF
16018 #define $ac_tr_func 1
16019 EOF
16020  
16021 else
16022   echo "$ac_t""no" 1>&6
16023 fi
16024 done
16025
16026
16027 if test "$ac_cv_func_ctime_r" = no ; then
16028         ol_cv_func_ctime_r_nargs=0
16029 else
16030         echo $ac_n "checking number of arguments of ctime_r""... $ac_c" 1>&6
16031 echo "configure:16032: checking number of arguments of ctime_r" >&5
16032 if eval "test \"\${ol_cv_func_ctime_r_nargs+set}\" = set"; then
16033   echo $ac_n "(cached) $ac_c" 1>&6
16034 else
16035   cat > conftest.$ac_ext <<EOF
16036 #line 16037 "configure"
16037 #include "confdefs.h"
16038 #include <time.h>
16039 int main() {
16040 time_t ti; char *buffer; ctime_r(&ti,buffer,32);
16041 ; return 0; }
16042 EOF
16043 if { (eval echo configure:16044: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16044   rm -rf conftest*
16045   ol_cv_func_ctime_r_nargs3=yes
16046 else
16047   echo "configure: failed program was:" >&5
16048   cat conftest.$ac_ext >&5
16049   rm -rf conftest*
16050   ol_cv_func_ctime_r_nargs3=no
16051 fi
16052 rm -f conftest*
16053
16054         cat > conftest.$ac_ext <<EOF
16055 #line 16056 "configure"
16056 #include "confdefs.h"
16057 #include <time.h>
16058 int main() {
16059 time_t ti; char *buffer; ctime_r(&ti,buffer);
16060 ; return 0; }
16061 EOF
16062 if { (eval echo configure:16063: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16063   rm -rf conftest*
16064   ol_cv_func_ctime_r_nargs2=yes
16065 else
16066   echo "configure: failed program was:" >&5
16067   cat conftest.$ac_ext >&5
16068   rm -rf conftest*
16069   ol_cv_func_ctime_r_nargs2=no
16070 fi
16071 rm -f conftest*
16072
16073         if test $ol_cv_func_ctime_r_nargs3 = yes -a \
16074                 $ol_cv_func_ctime_r_nargs2 = no ; then
16075
16076                 ol_cv_func_ctime_r_nargs=3
16077
16078         elif test $ol_cv_func_ctime_r_nargs3 = no -a \
16079                 $ol_cv_func_ctime_r_nargs2 = yes ; then
16080
16081                 ol_cv_func_ctime_r_nargs=2
16082
16083         else
16084                 ol_cv_func_ctime_r_nargs=0
16085         fi
16086   
16087 fi
16088
16089 echo "$ac_t""$ol_cv_func_ctime_r_nargs" 1>&6
16090
16091   if test $ol_cv_func_ctime_r_nargs -gt 1 ; then
16092         cat >> confdefs.h <<EOF
16093 #define CTIME_R_NARGS $ol_cv_func_ctime_r_nargs
16094 EOF
16095
16096   fi
16097
16098 fi
16099
16100 if test "$ac_cv_func_gethostbyname_r" = yes ; then
16101         echo $ac_n "checking number of arguments of gethostbyname_r""... $ac_c" 1>&6
16102 echo "configure:16103: checking number of arguments of gethostbyname_r" >&5
16103 if eval "test \"\${ol_cv_func_gethostbyname_r_nargs+set}\" = set"; then
16104   echo $ac_n "(cached) $ac_c" 1>&6
16105 else
16106   cat > conftest.$ac_ext <<EOF
16107 #line 16108 "configure"
16108 #include "confdefs.h"
16109 #include <sys/types.h>
16110 #include <sys/socket.h>
16111 #include <netinet/in.h>
16112 #include <netdb.h>
16113 #define BUFSIZE (sizeof(struct hostent)+10)
16114 int main() {
16115 struct hostent hent; char buffer[BUFSIZE];
16116                 int bufsize=BUFSIZE;int h_errno;
16117                 (void)gethostbyname_r("segovia.cs.purdue.edu", &hent,
16118                         buffer, bufsize, &h_errno);
16119 ; return 0; }
16120 EOF
16121 if { (eval echo configure:16122: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16122   rm -rf conftest*
16123   ol_cv_func_gethostbyname_r_nargs5=yes
16124 else
16125   echo "configure: failed program was:" >&5
16126   cat conftest.$ac_ext >&5
16127   rm -rf conftest*
16128   ol_cv_func_gethostbyname_r_nargs5=no
16129 fi
16130 rm -f conftest*
16131
16132         cat > conftest.$ac_ext <<EOF
16133 #line 16134 "configure"
16134 #include "confdefs.h"
16135 #include <sys/types.h>
16136 #include <sys/socket.h>
16137 #include <netinet/in.h>
16138 #include <netdb.h>
16139 #define BUFSIZE (sizeof(struct hostent)+10)
16140 int main() {
16141 struct hostent hent;struct hostent *rhent;
16142                 char buffer[BUFSIZE];
16143                 int bufsize=BUFSIZE;int h_errno;
16144                 (void)gethostbyname_r("localhost", &hent, buffer, bufsize,
16145                         &rhent, &h_errno);
16146 ; return 0; }
16147 EOF
16148 if { (eval echo configure:16149: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16149   rm -rf conftest*
16150   ol_cv_func_gethostbyname_r_nargs6=yes
16151 else
16152   echo "configure: failed program was:" >&5
16153   cat conftest.$ac_ext >&5
16154   rm -rf conftest*
16155   ol_cv_func_gethostbyname_r_nargs6=no
16156 fi
16157 rm -f conftest*
16158
16159         if test $ol_cv_func_gethostbyname_r_nargs5 = yes -a \
16160                 $ol_cv_func_gethostbyname_r_nargs6 = no ; then
16161
16162                 ol_cv_func_gethostbyname_r_nargs=5
16163
16164         elif test $ol_cv_func_gethostbyname_r_nargs5 = no -a \
16165                 $ol_cv_func_gethostbyname_r_nargs6 = yes ; then
16166
16167                 ol_cv_func_gethostbyname_r_nargs=6
16168
16169         else
16170                 ol_cv_func_gethostbyname_r_nargs=0
16171         fi
16172   
16173 fi
16174
16175 echo "$ac_t""$ol_cv_func_gethostbyname_r_nargs" 1>&6
16176   if test $ol_cv_func_gethostbyname_r_nargs -gt 1 ; then
16177         cat >> confdefs.h <<EOF
16178 #define GETHOSTBYNAME_R_NARGS $ol_cv_func_gethostbyname_r_nargs
16179 EOF
16180
16181   fi
16182
16183 else
16184         ol_cv_func_gethostbyname_r_nargs=0
16185 fi
16186  
16187 if test "$ac_cv_func_gethostbyaddr_r" = yes ; then
16188         echo $ac_n "checking number of arguments of gethostbyaddr_r""... $ac_c" 1>&6
16189 echo "configure:16190: checking number of arguments of gethostbyaddr_r" >&5
16190 if eval "test \"\${ol_cv_func_gethostbyaddr_r_nargs+set}\" = set"; then
16191   echo $ac_n "(cached) $ac_c" 1>&6
16192 else
16193   cat > conftest.$ac_ext <<EOF
16194 #line 16195 "configure"
16195 #include "confdefs.h"
16196 #include <sys/types.h>
16197 #include <sys/socket.h>
16198 #include <netinet/in.h>
16199 #include <netdb.h>
16200 #define BUFSIZE (sizeof(struct hostent)+10)
16201 int main() {
16202 struct hostent hent; char buffer[BUFSIZE]; 
16203             struct in_addr add;
16204             size_t alen=sizeof(struct in_addr);
16205             int bufsize=BUFSIZE;int h_errno;
16206                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
16207                         alen, AF_INET, &hent, buffer, bufsize, &h_errno);
16208 ; return 0; }
16209 EOF
16210 if { (eval echo configure:16211: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16211   rm -rf conftest*
16212   ol_cv_func_gethostbyaddr_r_nargs7=yes
16213 else
16214   echo "configure: failed program was:" >&5
16215   cat conftest.$ac_ext >&5
16216   rm -rf conftest*
16217   ol_cv_func_gethostbyaddr_r_nargs7=no
16218 fi
16219 rm -f conftest*
16220
16221         cat > conftest.$ac_ext <<EOF
16222 #line 16223 "configure"
16223 #include "confdefs.h"
16224 #include <sys/types.h>
16225 #include <sys/socket.h>
16226 #include <netinet/in.h>
16227 #include <netdb.h>
16228 #define BUFSIZE (sizeof(struct hostent)+10)
16229 int main() {
16230 struct hostent hent;
16231                 struct hostent *rhent; char buffer[BUFSIZE]; 
16232                 struct in_addr add;
16233                 size_t alen=sizeof(struct in_addr);
16234                 int bufsize=BUFSIZE;int h_errno;
16235                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
16236                         alen, AF_INET, &hent, buffer, bufsize, 
16237                         &rhent, &h_errno);
16238 ; return 0; }
16239 EOF
16240 if { (eval echo configure:16241: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16241   rm -rf conftest*
16242   ol_cv_func_gethostbyaddr_r_nargs8=yes
16243 else
16244   echo "configure: failed program was:" >&5
16245   cat conftest.$ac_ext >&5
16246   rm -rf conftest*
16247   ol_cv_func_gethostbyaddr_r_nargs8=no
16248 fi
16249 rm -f conftest*
16250
16251         if test $ol_cv_func_gethostbyaddr_r_nargs7 = yes -a \
16252                 $ol_cv_func_gethostbyaddr_r_nargs8 = no ; then
16253
16254                 ol_cv_func_gethostbyaddr_r_nargs=7
16255
16256         elif test $ol_cv_func_gethostbyaddr_r_nargs7 = no -a \
16257                 $ol_cv_func_gethostbyaddr_r_nargs8 = yes ; then
16258
16259                 ol_cv_func_gethostbyaddr_r_nargs=8
16260
16261         else
16262                 ol_cv_func_gethostbyaddr_r_nargs=0
16263         fi
16264   
16265 fi
16266
16267 echo "$ac_t""$ol_cv_func_gethostbyaddr_r_nargs" 1>&6
16268   if test $ol_cv_func_gethostbyaddr_r_nargs -gt 1 ; then
16269     cat >> confdefs.h <<EOF
16270 #define GETHOSTBYADDR_R_NARGS $ol_cv_func_gethostbyaddr_r_nargs
16271 EOF
16272
16273   fi
16274
16275 else
16276         ol_cv_func_gethostbyaddr_r_nargs=0
16277 fi
16278
16279 ol_link_ldbm=no 
16280
16281 if test $ol_with_ldbm_api = auto \
16282         -o $ol_with_ldbm_api = berkeley \
16283         -o $ol_with_ldbm_api = bcompat ; then
16284
16285         if test $ol_with_ldbm_api = bcompat; then \
16286                 for ac_hdr in db_185.h db.h
16287 do
16288 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16289 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16290 echo "configure:16291: checking for $ac_hdr" >&5
16291 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16292   echo $ac_n "(cached) $ac_c" 1>&6
16293 else
16294   cat > conftest.$ac_ext <<EOF
16295 #line 16296 "configure"
16296 #include "confdefs.h"
16297 #include <$ac_hdr>
16298 EOF
16299 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16300 { (eval echo configure:16301: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16301 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16302 if test -z "$ac_err"; then
16303   rm -rf conftest*
16304   eval "ac_cv_header_$ac_safe=yes"
16305 else
16306   echo "$ac_err" >&5
16307   echo "configure: failed program was:" >&5
16308   cat conftest.$ac_ext >&5
16309   rm -rf conftest*
16310   eval "ac_cv_header_$ac_safe=no"
16311 fi
16312 rm -f conftest*
16313 fi
16314 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16315   echo "$ac_t""yes" 1>&6
16316     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16317   cat >> confdefs.h <<EOF
16318 #define $ac_tr_hdr 1
16319 EOF
16320  
16321 else
16322   echo "$ac_t""no" 1>&6
16323 fi
16324 done
16325
16326 if test $ac_cv_header_db_185_h = yes -o $ac_cv_header_db_h = yes; then
16327         echo $ac_n "checking if Berkeley DB header compatibility""... $ac_c" 1>&6
16328 echo "configure:16329: checking if Berkeley DB header compatibility" >&5
16329 if eval "test \"\${ol_cv_header_db1+set}\" = set"; then
16330   echo $ac_n "(cached) $ac_c" 1>&6
16331 else
16332   
16333                 cat > conftest.$ac_ext <<EOF
16334 #line 16335 "configure"
16335 #include "confdefs.h"
16336
16337 #if HAVE_DB_185_H
16338 #       include <db_185.h>
16339 #else
16340 #       include <db.h>
16341 #endif
16342
16343  /* this check could be improved */
16344 #ifndef DB_VERSION_MAJOR
16345 #       define DB_VERSION_MAJOR 1
16346 #endif
16347
16348 #if DB_VERSION_MAJOR == 1 
16349         __db_version_1
16350 #endif
16351
16352 EOF
16353 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16354   egrep "__db_version_1" >/dev/null 2>&1; then
16355   rm -rf conftest*
16356   ol_cv_header_db1=yes
16357 else
16358   rm -rf conftest*
16359   ol_cv_header_db1=no
16360 fi
16361 rm -f conftest*
16362
16363 fi
16364
16365 echo "$ac_t""$ol_cv_header_db1" 1>&6
16366
16367         if test $ol_cv_header_db1 = yes ; then
16368                 ol_cv_lib_db=no
16369 if test $ol_cv_lib_db = no ; then
16370         echo $ac_n "checking for Berkeley DB link (default)""... $ac_c" 1>&6
16371 echo "configure:16372: checking for Berkeley DB link (default)" >&5
16372 if eval "test \"\${ol_cv_db_none+set}\" = set"; then
16373   echo $ac_n "(cached) $ac_c" 1>&6
16374 else
16375   
16376         ol_DB_LIB=
16377         ol_LIBS=$LIBS
16378         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
16379
16380         cat > conftest.$ac_ext <<EOF
16381 #line 16382 "configure"
16382 #include "confdefs.h"
16383
16384 #ifdef HAVE_DB_185_H
16385 # include <db_185.h>
16386 #else
16387 # include <db.h>
16388 #endif
16389
16390 #ifndef DB_VERSION_MAJOR
16391 # define DB_VERSION_MAJOR 1
16392 #endif
16393
16394 #ifndef NULL
16395 #define NULL ((void*)0)
16396 #endif
16397
16398 int main() {
16399
16400 #if DB_VERSION_MAJOR > 1
16401         {
16402                 char *version;
16403                 int major, minor, patch;
16404
16405                 version = db_version( &major, &minor, &patch );
16406
16407                 if( major != DB_VERSION_MAJOR ||
16408                         minor < DB_VERSION_MINOR )
16409                 {
16410                         printf("Berkeley DB version mismatch\n"
16411                                 "\texpected: %s\n\tgot: %s\n",
16412                                 DB_VERSION_STRING, version);
16413                         return 1;
16414                 }
16415         }
16416 #endif
16417
16418 #if DB_VERSION_MAJOR > 2
16419         db_env_create( NULL, 0 );
16420 #elif DB_VERSION_MAJOR > 1
16421         db_appexit( NULL );
16422 #else
16423         (void) dbopen( NULL, 0, 0, 0, NULL);
16424 #endif
16425
16426 ; return 0; }
16427 EOF
16428 if { (eval echo configure:16429: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16429   rm -rf conftest*
16430   ol_cv_db_none=yes
16431 else
16432   echo "configure: failed program was:" >&5
16433   cat conftest.$ac_ext >&5
16434   rm -rf conftest*
16435   ol_cv_db_none=no
16436 fi
16437 rm -f conftest*
16438
16439         LIBS="$ol_LIBS"
16440
16441 fi
16442
16443 echo "$ac_t""$ol_cv_db_none" 1>&6
16444
16445         if test $ol_cv_db_none = yes ; then
16446                 ol_cv_lib_db=yes
16447         fi
16448 fi
16449
16450 if test $ol_cv_lib_db = no ; then
16451         echo $ac_n "checking for Berkeley DB link (-ldb42)""... $ac_c" 1>&6
16452 echo "configure:16453: checking for Berkeley DB link (-ldb42)" >&5
16453 if eval "test \"\${ol_cv_db_db42+set}\" = set"; then
16454   echo $ac_n "(cached) $ac_c" 1>&6
16455 else
16456   
16457         ol_DB_LIB=-ldb42
16458         ol_LIBS=$LIBS
16459         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
16460
16461         cat > conftest.$ac_ext <<EOF
16462 #line 16463 "configure"
16463 #include "confdefs.h"
16464
16465 #ifdef HAVE_DB_185_H
16466 # include <db_185.h>
16467 #else
16468 # include <db.h>
16469 #endif
16470
16471 #ifndef DB_VERSION_MAJOR
16472 # define DB_VERSION_MAJOR 1
16473 #endif
16474
16475 #ifndef NULL
16476 #define NULL ((void*)0)
16477 #endif
16478
16479 int main() {
16480
16481 #if DB_VERSION_MAJOR > 1
16482         {
16483                 char *version;
16484                 int major, minor, patch;
16485
16486                 version = db_version( &major, &minor, &patch );
16487
16488                 if( major != DB_VERSION_MAJOR ||
16489                         minor < DB_VERSION_MINOR )
16490                 {
16491                         printf("Berkeley DB version mismatch\n"
16492                                 "\texpected: %s\n\tgot: %s\n",
16493                                 DB_VERSION_STRING, version);
16494                         return 1;
16495                 }
16496         }
16497 #endif
16498
16499 #if DB_VERSION_MAJOR > 2
16500         db_env_create( NULL, 0 );
16501 #elif DB_VERSION_MAJOR > 1
16502         db_appexit( NULL );
16503 #else
16504         (void) dbopen( NULL, 0, 0, 0, NULL);
16505 #endif
16506
16507 ; return 0; }
16508 EOF
16509 if { (eval echo configure:16510: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16510   rm -rf conftest*
16511   ol_cv_db_db42=yes
16512 else
16513   echo "configure: failed program was:" >&5
16514   cat conftest.$ac_ext >&5
16515   rm -rf conftest*
16516   ol_cv_db_db42=no
16517 fi
16518 rm -f conftest*
16519
16520         LIBS="$ol_LIBS"
16521
16522 fi
16523
16524 echo "$ac_t""$ol_cv_db_db42" 1>&6
16525
16526         if test $ol_cv_db_db42 = yes ; then
16527                 ol_cv_lib_db=-ldb42
16528         fi
16529 fi
16530
16531 if test $ol_cv_lib_db = no ; then
16532         echo $ac_n "checking for Berkeley DB link (-ldb-42)""... $ac_c" 1>&6
16533 echo "configure:16534: checking for Berkeley DB link (-ldb-42)" >&5
16534 if eval "test \"\${ol_cv_db_db_42+set}\" = set"; then
16535   echo $ac_n "(cached) $ac_c" 1>&6
16536 else
16537   
16538         ol_DB_LIB=-ldb-42
16539         ol_LIBS=$LIBS
16540         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
16541
16542         cat > conftest.$ac_ext <<EOF
16543 #line 16544 "configure"
16544 #include "confdefs.h"
16545
16546 #ifdef HAVE_DB_185_H
16547 # include <db_185.h>
16548 #else
16549 # include <db.h>
16550 #endif
16551
16552 #ifndef DB_VERSION_MAJOR
16553 # define DB_VERSION_MAJOR 1
16554 #endif
16555
16556 #ifndef NULL
16557 #define NULL ((void*)0)
16558 #endif
16559
16560 int main() {
16561
16562 #if DB_VERSION_MAJOR > 1
16563         {
16564                 char *version;
16565                 int major, minor, patch;
16566
16567                 version = db_version( &major, &minor, &patch );
16568
16569                 if( major != DB_VERSION_MAJOR ||
16570                         minor < DB_VERSION_MINOR )
16571                 {
16572                         printf("Berkeley DB version mismatch\n"
16573                                 "\texpected: %s\n\tgot: %s\n",
16574                                 DB_VERSION_STRING, version);
16575                         return 1;
16576                 }
16577         }
16578 #endif
16579
16580 #if DB_VERSION_MAJOR > 2
16581         db_env_create( NULL, 0 );
16582 #elif DB_VERSION_MAJOR > 1
16583         db_appexit( NULL );
16584 #else
16585         (void) dbopen( NULL, 0, 0, 0, NULL);
16586 #endif
16587
16588 ; return 0; }
16589 EOF
16590 if { (eval echo configure:16591: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16591   rm -rf conftest*
16592   ol_cv_db_db_42=yes
16593 else
16594   echo "configure: failed program was:" >&5
16595   cat conftest.$ac_ext >&5
16596   rm -rf conftest*
16597   ol_cv_db_db_42=no
16598 fi
16599 rm -f conftest*
16600
16601         LIBS="$ol_LIBS"
16602
16603 fi
16604
16605 echo "$ac_t""$ol_cv_db_db_42" 1>&6
16606
16607         if test $ol_cv_db_db_42 = yes ; then
16608                 ol_cv_lib_db=-ldb-42
16609         fi
16610 fi
16611
16612 if test $ol_cv_lib_db = no ; then
16613         echo $ac_n "checking for Berkeley DB link (-ldb-4.2)""... $ac_c" 1>&6
16614 echo "configure:16615: checking for Berkeley DB link (-ldb-4.2)" >&5
16615 if eval "test \"\${ol_cv_db_db_4_dot_2+set}\" = set"; then
16616   echo $ac_n "(cached) $ac_c" 1>&6
16617 else
16618   
16619         ol_DB_LIB=-ldb-4.2
16620         ol_LIBS=$LIBS
16621         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
16622
16623         cat > conftest.$ac_ext <<EOF
16624 #line 16625 "configure"
16625 #include "confdefs.h"
16626
16627 #ifdef HAVE_DB_185_H
16628 # include <db_185.h>
16629 #else
16630 # include <db.h>
16631 #endif
16632
16633 #ifndef DB_VERSION_MAJOR
16634 # define DB_VERSION_MAJOR 1
16635 #endif
16636
16637 #ifndef NULL
16638 #define NULL ((void*)0)
16639 #endif
16640
16641 int main() {
16642
16643 #if DB_VERSION_MAJOR > 1
16644         {
16645                 char *version;
16646                 int major, minor, patch;
16647
16648                 version = db_version( &major, &minor, &patch );
16649
16650                 if( major != DB_VERSION_MAJOR ||
16651                         minor < DB_VERSION_MINOR )
16652                 {
16653                         printf("Berkeley DB version mismatch\n"
16654                                 "\texpected: %s\n\tgot: %s\n",
16655                                 DB_VERSION_STRING, version);
16656                         return 1;
16657                 }
16658         }
16659 #endif
16660
16661 #if DB_VERSION_MAJOR > 2
16662         db_env_create( NULL, 0 );
16663 #elif DB_VERSION_MAJOR > 1
16664         db_appexit( NULL );
16665 #else
16666         (void) dbopen( NULL, 0, 0, 0, NULL);
16667 #endif
16668
16669 ; return 0; }
16670 EOF
16671 if { (eval echo configure:16672: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16672   rm -rf conftest*
16673   ol_cv_db_db_4_dot_2=yes
16674 else
16675   echo "configure: failed program was:" >&5
16676   cat conftest.$ac_ext >&5
16677   rm -rf conftest*
16678   ol_cv_db_db_4_dot_2=no
16679 fi
16680 rm -f conftest*
16681
16682         LIBS="$ol_LIBS"
16683
16684 fi
16685
16686 echo "$ac_t""$ol_cv_db_db_4_dot_2" 1>&6
16687
16688         if test $ol_cv_db_db_4_dot_2 = yes ; then
16689                 ol_cv_lib_db=-ldb-4.2
16690         fi
16691 fi
16692
16693 if test $ol_cv_lib_db = no ; then
16694         echo $ac_n "checking for Berkeley DB link (-ldb-4-2)""... $ac_c" 1>&6
16695 echo "configure:16696: checking for Berkeley DB link (-ldb-4-2)" >&5
16696 if eval "test \"\${ol_cv_db_db_4_2+set}\" = set"; then
16697   echo $ac_n "(cached) $ac_c" 1>&6
16698 else
16699   
16700         ol_DB_LIB=-ldb-4-2
16701         ol_LIBS=$LIBS
16702         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
16703
16704         cat > conftest.$ac_ext <<EOF
16705 #line 16706 "configure"
16706 #include "confdefs.h"
16707
16708 #ifdef HAVE_DB_185_H
16709 # include <db_185.h>
16710 #else
16711 # include <db.h>
16712 #endif
16713
16714 #ifndef DB_VERSION_MAJOR
16715 # define DB_VERSION_MAJOR 1
16716 #endif
16717
16718 #ifndef NULL
16719 #define NULL ((void*)0)
16720 #endif
16721
16722 int main() {
16723
16724 #if DB_VERSION_MAJOR > 1
16725         {
16726                 char *version;
16727                 int major, minor, patch;
16728
16729                 version = db_version( &major, &minor, &patch );
16730
16731                 if( major != DB_VERSION_MAJOR ||
16732                         minor < DB_VERSION_MINOR )
16733                 {
16734                         printf("Berkeley DB version mismatch\n"
16735                                 "\texpected: %s\n\tgot: %s\n",
16736                                 DB_VERSION_STRING, version);
16737                         return 1;
16738                 }
16739         }
16740 #endif
16741
16742 #if DB_VERSION_MAJOR > 2
16743         db_env_create( NULL, 0 );
16744 #elif DB_VERSION_MAJOR > 1
16745         db_appexit( NULL );
16746 #else
16747         (void) dbopen( NULL, 0, 0, 0, NULL);
16748 #endif
16749
16750 ; return 0; }
16751 EOF
16752 if { (eval echo configure:16753: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16753   rm -rf conftest*
16754   ol_cv_db_db_4_2=yes
16755 else
16756   echo "configure: failed program was:" >&5
16757   cat conftest.$ac_ext >&5
16758   rm -rf conftest*
16759   ol_cv_db_db_4_2=no
16760 fi
16761 rm -f conftest*
16762
16763         LIBS="$ol_LIBS"
16764
16765 fi
16766
16767 echo "$ac_t""$ol_cv_db_db_4_2" 1>&6
16768
16769         if test $ol_cv_db_db_4_2 = yes ; then
16770                 ol_cv_lib_db=-ldb-4-2
16771         fi
16772 fi
16773
16774 if test $ol_cv_lib_db = no ; then
16775         echo $ac_n "checking for Berkeley DB link (-ldb-4)""... $ac_c" 1>&6
16776 echo "configure:16777: checking for Berkeley DB link (-ldb-4)" >&5
16777 if eval "test \"\${ol_cv_db_db_4+set}\" = set"; then
16778   echo $ac_n "(cached) $ac_c" 1>&6
16779 else
16780   
16781         ol_DB_LIB=-ldb-4
16782         ol_LIBS=$LIBS
16783         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
16784
16785         cat > conftest.$ac_ext <<EOF
16786 #line 16787 "configure"
16787 #include "confdefs.h"
16788
16789 #ifdef HAVE_DB_185_H
16790 # include <db_185.h>
16791 #else
16792 # include <db.h>
16793 #endif
16794
16795 #ifndef DB_VERSION_MAJOR
16796 # define DB_VERSION_MAJOR 1
16797 #endif
16798
16799 #ifndef NULL
16800 #define NULL ((void*)0)
16801 #endif
16802
16803 int main() {
16804
16805 #if DB_VERSION_MAJOR > 1
16806         {
16807                 char *version;
16808                 int major, minor, patch;
16809
16810                 version = db_version( &major, &minor, &patch );
16811
16812                 if( major != DB_VERSION_MAJOR ||
16813                         minor < DB_VERSION_MINOR )
16814                 {
16815                         printf("Berkeley DB version mismatch\n"
16816                                 "\texpected: %s\n\tgot: %s\n",
16817                                 DB_VERSION_STRING, version);
16818                         return 1;
16819                 }
16820         }
16821 #endif
16822
16823 #if DB_VERSION_MAJOR > 2
16824         db_env_create( NULL, 0 );
16825 #elif DB_VERSION_MAJOR > 1
16826         db_appexit( NULL );
16827 #else
16828         (void) dbopen( NULL, 0, 0, 0, NULL);
16829 #endif
16830
16831 ; return 0; }
16832 EOF
16833 if { (eval echo configure:16834: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16834   rm -rf conftest*
16835   ol_cv_db_db_4=yes
16836 else
16837   echo "configure: failed program was:" >&5
16838   cat conftest.$ac_ext >&5
16839   rm -rf conftest*
16840   ol_cv_db_db_4=no
16841 fi
16842 rm -f conftest*
16843
16844         LIBS="$ol_LIBS"
16845
16846 fi
16847
16848 echo "$ac_t""$ol_cv_db_db_4" 1>&6
16849
16850         if test $ol_cv_db_db_4 = yes ; then
16851                 ol_cv_lib_db=-ldb-4
16852         fi
16853 fi
16854
16855 if test $ol_cv_lib_db = no ; then
16856         echo $ac_n "checking for Berkeley DB link (-ldb4)""... $ac_c" 1>&6
16857 echo "configure:16858: checking for Berkeley DB link (-ldb4)" >&5
16858 if eval "test \"\${ol_cv_db_db4+set}\" = set"; then
16859   echo $ac_n "(cached) $ac_c" 1>&6
16860 else
16861   
16862         ol_DB_LIB=-ldb4
16863         ol_LIBS=$LIBS
16864         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
16865
16866         cat > conftest.$ac_ext <<EOF
16867 #line 16868 "configure"
16868 #include "confdefs.h"
16869
16870 #ifdef HAVE_DB_185_H
16871 # include <db_185.h>
16872 #else
16873 # include <db.h>
16874 #endif
16875
16876 #ifndef DB_VERSION_MAJOR
16877 # define DB_VERSION_MAJOR 1
16878 #endif
16879
16880 #ifndef NULL
16881 #define NULL ((void*)0)
16882 #endif
16883
16884 int main() {
16885
16886 #if DB_VERSION_MAJOR > 1
16887         {
16888                 char *version;
16889                 int major, minor, patch;
16890
16891                 version = db_version( &major, &minor, &patch );
16892
16893                 if( major != DB_VERSION_MAJOR ||
16894                         minor < DB_VERSION_MINOR )
16895                 {
16896                         printf("Berkeley DB version mismatch\n"
16897                                 "\texpected: %s\n\tgot: %s\n",
16898                                 DB_VERSION_STRING, version);
16899                         return 1;
16900                 }
16901         }
16902 #endif
16903
16904 #if DB_VERSION_MAJOR > 2
16905         db_env_create( NULL, 0 );
16906 #elif DB_VERSION_MAJOR > 1
16907         db_appexit( NULL );
16908 #else
16909         (void) dbopen( NULL, 0, 0, 0, NULL);
16910 #endif
16911
16912 ; return 0; }
16913 EOF
16914 if { (eval echo configure:16915: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16915   rm -rf conftest*
16916   ol_cv_db_db4=yes
16917 else
16918   echo "configure: failed program was:" >&5
16919   cat conftest.$ac_ext >&5
16920   rm -rf conftest*
16921   ol_cv_db_db4=no
16922 fi
16923 rm -f conftest*
16924
16925         LIBS="$ol_LIBS"
16926
16927 fi
16928
16929 echo "$ac_t""$ol_cv_db_db4" 1>&6
16930
16931         if test $ol_cv_db_db4 = yes ; then
16932                 ol_cv_lib_db=-ldb4
16933         fi
16934 fi
16935
16936 if test $ol_cv_lib_db = no ; then
16937         echo $ac_n "checking for Berkeley DB link (-ldb)""... $ac_c" 1>&6
16938 echo "configure:16939: checking for Berkeley DB link (-ldb)" >&5
16939 if eval "test \"\${ol_cv_db_db+set}\" = set"; then
16940   echo $ac_n "(cached) $ac_c" 1>&6
16941 else
16942   
16943         ol_DB_LIB=-ldb
16944         ol_LIBS=$LIBS
16945         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
16946
16947         cat > conftest.$ac_ext <<EOF
16948 #line 16949 "configure"
16949 #include "confdefs.h"
16950
16951 #ifdef HAVE_DB_185_H
16952 # include <db_185.h>
16953 #else
16954 # include <db.h>
16955 #endif
16956
16957 #ifndef DB_VERSION_MAJOR
16958 # define DB_VERSION_MAJOR 1
16959 #endif
16960
16961 #ifndef NULL
16962 #define NULL ((void*)0)
16963 #endif
16964
16965 int main() {
16966
16967 #if DB_VERSION_MAJOR > 1
16968         {
16969                 char *version;
16970                 int major, minor, patch;
16971
16972                 version = db_version( &major, &minor, &patch );
16973
16974                 if( major != DB_VERSION_MAJOR ||
16975                         minor < DB_VERSION_MINOR )
16976                 {
16977                         printf("Berkeley DB version mismatch\n"
16978                                 "\texpected: %s\n\tgot: %s\n",
16979                                 DB_VERSION_STRING, version);
16980                         return 1;
16981                 }
16982         }
16983 #endif
16984
16985 #if DB_VERSION_MAJOR > 2
16986         db_env_create( NULL, 0 );
16987 #elif DB_VERSION_MAJOR > 1
16988         db_appexit( NULL );
16989 #else
16990         (void) dbopen( NULL, 0, 0, 0, NULL);
16991 #endif
16992
16993 ; return 0; }
16994 EOF
16995 if { (eval echo configure:16996: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16996   rm -rf conftest*
16997   ol_cv_db_db=yes
16998 else
16999   echo "configure: failed program was:" >&5
17000   cat conftest.$ac_ext >&5
17001   rm -rf conftest*
17002   ol_cv_db_db=no
17003 fi
17004 rm -f conftest*
17005
17006         LIBS="$ol_LIBS"
17007
17008 fi
17009
17010 echo "$ac_t""$ol_cv_db_db" 1>&6
17011
17012         if test $ol_cv_db_db = yes ; then
17013                 ol_cv_lib_db=-ldb
17014         fi
17015 fi
17016
17017 if test $ol_cv_lib_db = no ; then
17018         echo $ac_n "checking for Berkeley DB link (-ldb41)""... $ac_c" 1>&6
17019 echo "configure:17020: checking for Berkeley DB link (-ldb41)" >&5
17020 if eval "test \"\${ol_cv_db_db41+set}\" = set"; then
17021   echo $ac_n "(cached) $ac_c" 1>&6
17022 else
17023   
17024         ol_DB_LIB=-ldb41
17025         ol_LIBS=$LIBS
17026         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17027
17028         cat > conftest.$ac_ext <<EOF
17029 #line 17030 "configure"
17030 #include "confdefs.h"
17031
17032 #ifdef HAVE_DB_185_H
17033 # include <db_185.h>
17034 #else
17035 # include <db.h>
17036 #endif
17037
17038 #ifndef DB_VERSION_MAJOR
17039 # define DB_VERSION_MAJOR 1
17040 #endif
17041
17042 #ifndef NULL
17043 #define NULL ((void*)0)
17044 #endif
17045
17046 int main() {
17047
17048 #if DB_VERSION_MAJOR > 1
17049         {
17050                 char *version;
17051                 int major, minor, patch;
17052
17053                 version = db_version( &major, &minor, &patch );
17054
17055                 if( major != DB_VERSION_MAJOR ||
17056                         minor < DB_VERSION_MINOR )
17057                 {
17058                         printf("Berkeley DB version mismatch\n"
17059                                 "\texpected: %s\n\tgot: %s\n",
17060                                 DB_VERSION_STRING, version);
17061                         return 1;
17062                 }
17063         }
17064 #endif
17065
17066 #if DB_VERSION_MAJOR > 2
17067         db_env_create( NULL, 0 );
17068 #elif DB_VERSION_MAJOR > 1
17069         db_appexit( NULL );
17070 #else
17071         (void) dbopen( NULL, 0, 0, 0, NULL);
17072 #endif
17073
17074 ; return 0; }
17075 EOF
17076 if { (eval echo configure:17077: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17077   rm -rf conftest*
17078   ol_cv_db_db41=yes
17079 else
17080   echo "configure: failed program was:" >&5
17081   cat conftest.$ac_ext >&5
17082   rm -rf conftest*
17083   ol_cv_db_db41=no
17084 fi
17085 rm -f conftest*
17086
17087         LIBS="$ol_LIBS"
17088
17089 fi
17090
17091 echo "$ac_t""$ol_cv_db_db41" 1>&6
17092
17093         if test $ol_cv_db_db41 = yes ; then
17094                 ol_cv_lib_db=-ldb41
17095         fi
17096 fi
17097
17098 if test $ol_cv_lib_db = no ; then
17099         echo $ac_n "checking for Berkeley DB link (-ldb-41)""... $ac_c" 1>&6
17100 echo "configure:17101: checking for Berkeley DB link (-ldb-41)" >&5
17101 if eval "test \"\${ol_cv_db_db_41+set}\" = set"; then
17102   echo $ac_n "(cached) $ac_c" 1>&6
17103 else
17104   
17105         ol_DB_LIB=-ldb-41
17106         ol_LIBS=$LIBS
17107         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17108
17109         cat > conftest.$ac_ext <<EOF
17110 #line 17111 "configure"
17111 #include "confdefs.h"
17112
17113 #ifdef HAVE_DB_185_H
17114 # include <db_185.h>
17115 #else
17116 # include <db.h>
17117 #endif
17118
17119 #ifndef DB_VERSION_MAJOR
17120 # define DB_VERSION_MAJOR 1
17121 #endif
17122
17123 #ifndef NULL
17124 #define NULL ((void*)0)
17125 #endif
17126
17127 int main() {
17128
17129 #if DB_VERSION_MAJOR > 1
17130         {
17131                 char *version;
17132                 int major, minor, patch;
17133
17134                 version = db_version( &major, &minor, &patch );
17135
17136                 if( major != DB_VERSION_MAJOR ||
17137                         minor < DB_VERSION_MINOR )
17138                 {
17139                         printf("Berkeley DB version mismatch\n"
17140                                 "\texpected: %s\n\tgot: %s\n",
17141                                 DB_VERSION_STRING, version);
17142                         return 1;
17143                 }
17144         }
17145 #endif
17146
17147 #if DB_VERSION_MAJOR > 2
17148         db_env_create( NULL, 0 );
17149 #elif DB_VERSION_MAJOR > 1
17150         db_appexit( NULL );
17151 #else
17152         (void) dbopen( NULL, 0, 0, 0, NULL);
17153 #endif
17154
17155 ; return 0; }
17156 EOF
17157 if { (eval echo configure:17158: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17158   rm -rf conftest*
17159   ol_cv_db_db_41=yes
17160 else
17161   echo "configure: failed program was:" >&5
17162   cat conftest.$ac_ext >&5
17163   rm -rf conftest*
17164   ol_cv_db_db_41=no
17165 fi
17166 rm -f conftest*
17167
17168         LIBS="$ol_LIBS"
17169
17170 fi
17171
17172 echo "$ac_t""$ol_cv_db_db_41" 1>&6
17173
17174         if test $ol_cv_db_db_41 = yes ; then
17175                 ol_cv_lib_db=-ldb-41
17176         fi
17177 fi
17178
17179 if test $ol_cv_lib_db = no ; then
17180         echo $ac_n "checking for Berkeley DB link (-ldb-4.1)""... $ac_c" 1>&6
17181 echo "configure:17182: checking for Berkeley DB link (-ldb-4.1)" >&5
17182 if eval "test \"\${ol_cv_db_db_4_dot_1+set}\" = set"; then
17183   echo $ac_n "(cached) $ac_c" 1>&6
17184 else
17185   
17186         ol_DB_LIB=-ldb-4.1
17187         ol_LIBS=$LIBS
17188         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17189
17190         cat > conftest.$ac_ext <<EOF
17191 #line 17192 "configure"
17192 #include "confdefs.h"
17193
17194 #ifdef HAVE_DB_185_H
17195 # include <db_185.h>
17196 #else
17197 # include <db.h>
17198 #endif
17199
17200 #ifndef DB_VERSION_MAJOR
17201 # define DB_VERSION_MAJOR 1
17202 #endif
17203
17204 #ifndef NULL
17205 #define NULL ((void*)0)
17206 #endif
17207
17208 int main() {
17209
17210 #if DB_VERSION_MAJOR > 1
17211         {
17212                 char *version;
17213                 int major, minor, patch;
17214
17215                 version = db_version( &major, &minor, &patch );
17216
17217                 if( major != DB_VERSION_MAJOR ||
17218                         minor < DB_VERSION_MINOR )
17219                 {
17220                         printf("Berkeley DB version mismatch\n"
17221                                 "\texpected: %s\n\tgot: %s\n",
17222                                 DB_VERSION_STRING, version);
17223                         return 1;
17224                 }
17225         }
17226 #endif
17227
17228 #if DB_VERSION_MAJOR > 2
17229         db_env_create( NULL, 0 );
17230 #elif DB_VERSION_MAJOR > 1
17231         db_appexit( NULL );
17232 #else
17233         (void) dbopen( NULL, 0, 0, 0, NULL);
17234 #endif
17235
17236 ; return 0; }
17237 EOF
17238 if { (eval echo configure:17239: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17239   rm -rf conftest*
17240   ol_cv_db_db_4_dot_1=yes
17241 else
17242   echo "configure: failed program was:" >&5
17243   cat conftest.$ac_ext >&5
17244   rm -rf conftest*
17245   ol_cv_db_db_4_dot_1=no
17246 fi
17247 rm -f conftest*
17248
17249         LIBS="$ol_LIBS"
17250
17251 fi
17252
17253 echo "$ac_t""$ol_cv_db_db_4_dot_1" 1>&6
17254
17255         if test $ol_cv_db_db_4_dot_1 = yes ; then
17256                 ol_cv_lib_db=-ldb-4.1
17257         fi
17258 fi
17259
17260 if test $ol_cv_lib_db = no ; then
17261         echo $ac_n "checking for Berkeley DB link (-ldb-4-1)""... $ac_c" 1>&6
17262 echo "configure:17263: checking for Berkeley DB link (-ldb-4-1)" >&5
17263 if eval "test \"\${ol_cv_db_db_4_1+set}\" = set"; then
17264   echo $ac_n "(cached) $ac_c" 1>&6
17265 else
17266   
17267         ol_DB_LIB=-ldb-4-1
17268         ol_LIBS=$LIBS
17269         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17270
17271         cat > conftest.$ac_ext <<EOF
17272 #line 17273 "configure"
17273 #include "confdefs.h"
17274
17275 #ifdef HAVE_DB_185_H
17276 # include <db_185.h>
17277 #else
17278 # include <db.h>
17279 #endif
17280
17281 #ifndef DB_VERSION_MAJOR
17282 # define DB_VERSION_MAJOR 1
17283 #endif
17284
17285 #ifndef NULL
17286 #define NULL ((void*)0)
17287 #endif
17288
17289 int main() {
17290
17291 #if DB_VERSION_MAJOR > 1
17292         {
17293                 char *version;
17294                 int major, minor, patch;
17295
17296                 version = db_version( &major, &minor, &patch );
17297
17298                 if( major != DB_VERSION_MAJOR ||
17299                         minor < DB_VERSION_MINOR )
17300                 {
17301                         printf("Berkeley DB version mismatch\n"
17302                                 "\texpected: %s\n\tgot: %s\n",
17303                                 DB_VERSION_STRING, version);
17304                         return 1;
17305                 }
17306         }
17307 #endif
17308
17309 #if DB_VERSION_MAJOR > 2
17310         db_env_create( NULL, 0 );
17311 #elif DB_VERSION_MAJOR > 1
17312         db_appexit( NULL );
17313 #else
17314         (void) dbopen( NULL, 0, 0, 0, NULL);
17315 #endif
17316
17317 ; return 0; }
17318 EOF
17319 if { (eval echo configure:17320: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17320   rm -rf conftest*
17321   ol_cv_db_db_4_1=yes
17322 else
17323   echo "configure: failed program was:" >&5
17324   cat conftest.$ac_ext >&5
17325   rm -rf conftest*
17326   ol_cv_db_db_4_1=no
17327 fi
17328 rm -f conftest*
17329
17330         LIBS="$ol_LIBS"
17331
17332 fi
17333
17334 echo "$ac_t""$ol_cv_db_db_4_1" 1>&6
17335
17336         if test $ol_cv_db_db_4_1 = yes ; then
17337                 ol_cv_lib_db=-ldb-4-1
17338         fi
17339 fi
17340
17341 if test $ol_cv_lib_db = no ; then
17342         echo $ac_n "checking for Berkeley DB link (-ldb3)""... $ac_c" 1>&6
17343 echo "configure:17344: checking for Berkeley DB link (-ldb3)" >&5
17344 if eval "test \"\${ol_cv_db_db3+set}\" = set"; then
17345   echo $ac_n "(cached) $ac_c" 1>&6
17346 else
17347   
17348         ol_DB_LIB=-ldb3
17349         ol_LIBS=$LIBS
17350         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17351
17352         cat > conftest.$ac_ext <<EOF
17353 #line 17354 "configure"
17354 #include "confdefs.h"
17355
17356 #ifdef HAVE_DB_185_H
17357 # include <db_185.h>
17358 #else
17359 # include <db.h>
17360 #endif
17361
17362 #ifndef DB_VERSION_MAJOR
17363 # define DB_VERSION_MAJOR 1
17364 #endif
17365
17366 #ifndef NULL
17367 #define NULL ((void*)0)
17368 #endif
17369
17370 int main() {
17371
17372 #if DB_VERSION_MAJOR > 1
17373         {
17374                 char *version;
17375                 int major, minor, patch;
17376
17377                 version = db_version( &major, &minor, &patch );
17378
17379                 if( major != DB_VERSION_MAJOR ||
17380                         minor < DB_VERSION_MINOR )
17381                 {
17382                         printf("Berkeley DB version mismatch\n"
17383                                 "\texpected: %s\n\tgot: %s\n",
17384                                 DB_VERSION_STRING, version);
17385                         return 1;
17386                 }
17387         }
17388 #endif
17389
17390 #if DB_VERSION_MAJOR > 2
17391         db_env_create( NULL, 0 );
17392 #elif DB_VERSION_MAJOR > 1
17393         db_appexit( NULL );
17394 #else
17395         (void) dbopen( NULL, 0, 0, 0, NULL);
17396 #endif
17397
17398 ; return 0; }
17399 EOF
17400 if { (eval echo configure:17401: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17401   rm -rf conftest*
17402   ol_cv_db_db3=yes
17403 else
17404   echo "configure: failed program was:" >&5
17405   cat conftest.$ac_ext >&5
17406   rm -rf conftest*
17407   ol_cv_db_db3=no
17408 fi
17409 rm -f conftest*
17410
17411         LIBS="$ol_LIBS"
17412
17413 fi
17414
17415 echo "$ac_t""$ol_cv_db_db3" 1>&6
17416
17417         if test $ol_cv_db_db3 = yes ; then
17418                 ol_cv_lib_db=-ldb3
17419         fi
17420 fi
17421
17422 if test $ol_cv_lib_db = no ; then
17423         echo $ac_n "checking for Berkeley DB link (-ldb-3)""... $ac_c" 1>&6
17424 echo "configure:17425: checking for Berkeley DB link (-ldb-3)" >&5
17425 if eval "test \"\${ol_cv_db_db_3+set}\" = set"; then
17426   echo $ac_n "(cached) $ac_c" 1>&6
17427 else
17428   
17429         ol_DB_LIB=-ldb-3
17430         ol_LIBS=$LIBS
17431         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17432
17433         cat > conftest.$ac_ext <<EOF
17434 #line 17435 "configure"
17435 #include "confdefs.h"
17436
17437 #ifdef HAVE_DB_185_H
17438 # include <db_185.h>
17439 #else
17440 # include <db.h>
17441 #endif
17442
17443 #ifndef DB_VERSION_MAJOR
17444 # define DB_VERSION_MAJOR 1
17445 #endif
17446
17447 #ifndef NULL
17448 #define NULL ((void*)0)
17449 #endif
17450
17451 int main() {
17452
17453 #if DB_VERSION_MAJOR > 1
17454         {
17455                 char *version;
17456                 int major, minor, patch;
17457
17458                 version = db_version( &major, &minor, &patch );
17459
17460                 if( major != DB_VERSION_MAJOR ||
17461                         minor < DB_VERSION_MINOR )
17462                 {
17463                         printf("Berkeley DB version mismatch\n"
17464                                 "\texpected: %s\n\tgot: %s\n",
17465                                 DB_VERSION_STRING, version);
17466                         return 1;
17467                 }
17468         }
17469 #endif
17470
17471 #if DB_VERSION_MAJOR > 2
17472         db_env_create( NULL, 0 );
17473 #elif DB_VERSION_MAJOR > 1
17474         db_appexit( NULL );
17475 #else
17476         (void) dbopen( NULL, 0, 0, 0, NULL);
17477 #endif
17478
17479 ; return 0; }
17480 EOF
17481 if { (eval echo configure:17482: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17482   rm -rf conftest*
17483   ol_cv_db_db_3=yes
17484 else
17485   echo "configure: failed program was:" >&5
17486   cat conftest.$ac_ext >&5
17487   rm -rf conftest*
17488   ol_cv_db_db_3=no
17489 fi
17490 rm -f conftest*
17491
17492         LIBS="$ol_LIBS"
17493
17494 fi
17495
17496 echo "$ac_t""$ol_cv_db_db_3" 1>&6
17497
17498         if test $ol_cv_db_db_3 = yes ; then
17499                 ol_cv_lib_db=-ldb-3
17500         fi
17501 fi
17502
17503 if test $ol_cv_lib_db = no ; then
17504         echo $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6
17505 echo "configure:17506: checking for Berkeley DB link (-ldb2)" >&5
17506 if eval "test \"\${ol_cv_db_db2+set}\" = set"; then
17507   echo $ac_n "(cached) $ac_c" 1>&6
17508 else
17509   
17510         ol_DB_LIB=-ldb2
17511         ol_LIBS=$LIBS
17512         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17513
17514         cat > conftest.$ac_ext <<EOF
17515 #line 17516 "configure"
17516 #include "confdefs.h"
17517
17518 #ifdef HAVE_DB_185_H
17519 # include <db_185.h>
17520 #else
17521 # include <db.h>
17522 #endif
17523
17524 #ifndef DB_VERSION_MAJOR
17525 # define DB_VERSION_MAJOR 1
17526 #endif
17527
17528 #ifndef NULL
17529 #define NULL ((void*)0)
17530 #endif
17531
17532 int main() {
17533
17534 #if DB_VERSION_MAJOR > 1
17535         {
17536                 char *version;
17537                 int major, minor, patch;
17538
17539                 version = db_version( &major, &minor, &patch );
17540
17541                 if( major != DB_VERSION_MAJOR ||
17542                         minor < DB_VERSION_MINOR )
17543                 {
17544                         printf("Berkeley DB version mismatch\n"
17545                                 "\texpected: %s\n\tgot: %s\n",
17546                                 DB_VERSION_STRING, version);
17547                         return 1;
17548                 }
17549         }
17550 #endif
17551
17552 #if DB_VERSION_MAJOR > 2
17553         db_env_create( NULL, 0 );
17554 #elif DB_VERSION_MAJOR > 1
17555         db_appexit( NULL );
17556 #else
17557         (void) dbopen( NULL, 0, 0, 0, NULL);
17558 #endif
17559
17560 ; return 0; }
17561 EOF
17562 if { (eval echo configure:17563: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17563   rm -rf conftest*
17564   ol_cv_db_db2=yes
17565 else
17566   echo "configure: failed program was:" >&5
17567   cat conftest.$ac_ext >&5
17568   rm -rf conftest*
17569   ol_cv_db_db2=no
17570 fi
17571 rm -f conftest*
17572
17573         LIBS="$ol_LIBS"
17574
17575 fi
17576
17577 echo "$ac_t""$ol_cv_db_db2" 1>&6
17578
17579         if test $ol_cv_db_db2 = yes ; then
17580                 ol_cv_lib_db=-ldb2
17581         fi
17582 fi
17583
17584 if test $ol_cv_lib_db = no ; then
17585         echo $ac_n "checking for Berkeley DB link (-ldb-2)""... $ac_c" 1>&6
17586 echo "configure:17587: checking for Berkeley DB link (-ldb-2)" >&5
17587 if eval "test \"\${ol_cv_db_db_2+set}\" = set"; then
17588   echo $ac_n "(cached) $ac_c" 1>&6
17589 else
17590   
17591         ol_DB_LIB=-ldb-2
17592         ol_LIBS=$LIBS
17593         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17594
17595         cat > conftest.$ac_ext <<EOF
17596 #line 17597 "configure"
17597 #include "confdefs.h"
17598
17599 #ifdef HAVE_DB_185_H
17600 # include <db_185.h>
17601 #else
17602 # include <db.h>
17603 #endif
17604
17605 #ifndef DB_VERSION_MAJOR
17606 # define DB_VERSION_MAJOR 1
17607 #endif
17608
17609 #ifndef NULL
17610 #define NULL ((void*)0)
17611 #endif
17612
17613 int main() {
17614
17615 #if DB_VERSION_MAJOR > 1
17616         {
17617                 char *version;
17618                 int major, minor, patch;
17619
17620                 version = db_version( &major, &minor, &patch );
17621
17622                 if( major != DB_VERSION_MAJOR ||
17623                         minor < DB_VERSION_MINOR )
17624                 {
17625                         printf("Berkeley DB version mismatch\n"
17626                                 "\texpected: %s\n\tgot: %s\n",
17627                                 DB_VERSION_STRING, version);
17628                         return 1;
17629                 }
17630         }
17631 #endif
17632
17633 #if DB_VERSION_MAJOR > 2
17634         db_env_create( NULL, 0 );
17635 #elif DB_VERSION_MAJOR > 1
17636         db_appexit( NULL );
17637 #else
17638         (void) dbopen( NULL, 0, 0, 0, NULL);
17639 #endif
17640
17641 ; return 0; }
17642 EOF
17643 if { (eval echo configure:17644: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17644   rm -rf conftest*
17645   ol_cv_db_db_2=yes
17646 else
17647   echo "configure: failed program was:" >&5
17648   cat conftest.$ac_ext >&5
17649   rm -rf conftest*
17650   ol_cv_db_db_2=no
17651 fi
17652 rm -f conftest*
17653
17654         LIBS="$ol_LIBS"
17655
17656 fi
17657
17658 echo "$ac_t""$ol_cv_db_db_2" 1>&6
17659
17660         if test $ol_cv_db_db_2 = yes ; then
17661                 ol_cv_lib_db=-ldb-2
17662         fi
17663 fi
17664
17665 if test $ol_cv_lib_db = no ; then
17666         echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6
17667 echo "configure:17668: checking for Berkeley DB link (-ldb1)" >&5
17668 if eval "test \"\${ol_cv_db_db1+set}\" = set"; then
17669   echo $ac_n "(cached) $ac_c" 1>&6
17670 else
17671   
17672         ol_DB_LIB=-ldb1
17673         ol_LIBS=$LIBS
17674         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17675
17676         cat > conftest.$ac_ext <<EOF
17677 #line 17678 "configure"
17678 #include "confdefs.h"
17679
17680 #ifdef HAVE_DB_185_H
17681 # include <db_185.h>
17682 #else
17683 # include <db.h>
17684 #endif
17685
17686 #ifndef DB_VERSION_MAJOR
17687 # define DB_VERSION_MAJOR 1
17688 #endif
17689
17690 #ifndef NULL
17691 #define NULL ((void*)0)
17692 #endif
17693
17694 int main() {
17695
17696 #if DB_VERSION_MAJOR > 1
17697         {
17698                 char *version;
17699                 int major, minor, patch;
17700
17701                 version = db_version( &major, &minor, &patch );
17702
17703                 if( major != DB_VERSION_MAJOR ||
17704                         minor < DB_VERSION_MINOR )
17705                 {
17706                         printf("Berkeley DB version mismatch\n"
17707                                 "\texpected: %s\n\tgot: %s\n",
17708                                 DB_VERSION_STRING, version);
17709                         return 1;
17710                 }
17711         }
17712 #endif
17713
17714 #if DB_VERSION_MAJOR > 2
17715         db_env_create( NULL, 0 );
17716 #elif DB_VERSION_MAJOR > 1
17717         db_appexit( NULL );
17718 #else
17719         (void) dbopen( NULL, 0, 0, 0, NULL);
17720 #endif
17721
17722 ; return 0; }
17723 EOF
17724 if { (eval echo configure:17725: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17725   rm -rf conftest*
17726   ol_cv_db_db1=yes
17727 else
17728   echo "configure: failed program was:" >&5
17729   cat conftest.$ac_ext >&5
17730   rm -rf conftest*
17731   ol_cv_db_db1=no
17732 fi
17733 rm -f conftest*
17734
17735         LIBS="$ol_LIBS"
17736
17737 fi
17738
17739 echo "$ac_t""$ol_cv_db_db1" 1>&6
17740
17741         if test $ol_cv_db_db1 = yes ; then
17742                 ol_cv_lib_db=-ldb1
17743         fi
17744 fi
17745
17746 if test $ol_cv_lib_db = no ; then
17747         echo $ac_n "checking for Berkeley DB link (-ldb-1)""... $ac_c" 1>&6
17748 echo "configure:17749: checking for Berkeley DB link (-ldb-1)" >&5
17749 if eval "test \"\${ol_cv_db_db_1+set}\" = set"; then
17750   echo $ac_n "(cached) $ac_c" 1>&6
17751 else
17752   
17753         ol_DB_LIB=-ldb-1
17754         ol_LIBS=$LIBS
17755         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17756
17757         cat > conftest.$ac_ext <<EOF
17758 #line 17759 "configure"
17759 #include "confdefs.h"
17760
17761 #ifdef HAVE_DB_185_H
17762 # include <db_185.h>
17763 #else
17764 # include <db.h>
17765 #endif
17766
17767 #ifndef DB_VERSION_MAJOR
17768 # define DB_VERSION_MAJOR 1
17769 #endif
17770
17771 #ifndef NULL
17772 #define NULL ((void*)0)
17773 #endif
17774
17775 int main() {
17776
17777 #if DB_VERSION_MAJOR > 1
17778         {
17779                 char *version;
17780                 int major, minor, patch;
17781
17782                 version = db_version( &major, &minor, &patch );
17783
17784                 if( major != DB_VERSION_MAJOR ||
17785                         minor < DB_VERSION_MINOR )
17786                 {
17787                         printf("Berkeley DB version mismatch\n"
17788                                 "\texpected: %s\n\tgot: %s\n",
17789                                 DB_VERSION_STRING, version);
17790                         return 1;
17791                 }
17792         }
17793 #endif
17794
17795 #if DB_VERSION_MAJOR > 2
17796         db_env_create( NULL, 0 );
17797 #elif DB_VERSION_MAJOR > 1
17798         db_appexit( NULL );
17799 #else
17800         (void) dbopen( NULL, 0, 0, 0, NULL);
17801 #endif
17802
17803 ; return 0; }
17804 EOF
17805 if { (eval echo configure:17806: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17806   rm -rf conftest*
17807   ol_cv_db_db_1=yes
17808 else
17809   echo "configure: failed program was:" >&5
17810   cat conftest.$ac_ext >&5
17811   rm -rf conftest*
17812   ol_cv_db_db_1=no
17813 fi
17814 rm -f conftest*
17815
17816         LIBS="$ol_LIBS"
17817
17818 fi
17819
17820 echo "$ac_t""$ol_cv_db_db_1" 1>&6
17821
17822         if test $ol_cv_db_db_1 = yes ; then
17823                 ol_cv_lib_db=-ldb-1
17824         fi
17825 fi
17826
17827
17828                 if test "$ol_cv_lib_db" != no ; then
17829                         ol_cv_berkeley_db=yes
17830                 fi
17831         fi
17832 fi
17833
17834         else
17835                 ol_cv_berkeley_db=no
17836 for ac_hdr in db.h
17837 do
17838 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
17839 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
17840 echo "configure:17841: checking for $ac_hdr" >&5
17841 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
17842   echo $ac_n "(cached) $ac_c" 1>&6
17843 else
17844   cat > conftest.$ac_ext <<EOF
17845 #line 17846 "configure"
17846 #include "confdefs.h"
17847 #include <$ac_hdr>
17848 EOF
17849 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
17850 { (eval echo configure:17851: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
17851 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
17852 if test -z "$ac_err"; then
17853   rm -rf conftest*
17854   eval "ac_cv_header_$ac_safe=yes"
17855 else
17856   echo "$ac_err" >&5
17857   echo "configure: failed program was:" >&5
17858   cat conftest.$ac_ext >&5
17859   rm -rf conftest*
17860   eval "ac_cv_header_$ac_safe=no"
17861 fi
17862 rm -f conftest*
17863 fi
17864 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
17865   echo "$ac_t""yes" 1>&6
17866     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
17867   cat >> confdefs.h <<EOF
17868 #define $ac_tr_hdr 1
17869 EOF
17870  
17871 else
17872   echo "$ac_t""no" 1>&6
17873 fi
17874 done
17875
17876 if test $ac_cv_header_db_h = yes; then
17877         ol_cv_lib_db=no
17878 if test $ol_cv_lib_db = no ; then
17879         echo $ac_n "checking for Berkeley DB link (default)""... $ac_c" 1>&6
17880 echo "configure:17881: checking for Berkeley DB link (default)" >&5
17881 if eval "test \"\${ol_cv_db_none+set}\" = set"; then
17882   echo $ac_n "(cached) $ac_c" 1>&6
17883 else
17884   
17885         ol_DB_LIB=
17886         ol_LIBS=$LIBS
17887         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17888
17889         cat > conftest.$ac_ext <<EOF
17890 #line 17891 "configure"
17891 #include "confdefs.h"
17892
17893 #ifdef HAVE_DB_185_H
17894 # include <db_185.h>
17895 #else
17896 # include <db.h>
17897 #endif
17898
17899 #ifndef DB_VERSION_MAJOR
17900 # define DB_VERSION_MAJOR 1
17901 #endif
17902
17903 #ifndef NULL
17904 #define NULL ((void*)0)
17905 #endif
17906
17907 int main() {
17908
17909 #if DB_VERSION_MAJOR > 1
17910         {
17911                 char *version;
17912                 int major, minor, patch;
17913
17914                 version = db_version( &major, &minor, &patch );
17915
17916                 if( major != DB_VERSION_MAJOR ||
17917                         minor < DB_VERSION_MINOR )
17918                 {
17919                         printf("Berkeley DB version mismatch\n"
17920                                 "\texpected: %s\n\tgot: %s\n",
17921                                 DB_VERSION_STRING, version);
17922                         return 1;
17923                 }
17924         }
17925 #endif
17926
17927 #if DB_VERSION_MAJOR > 2
17928         db_env_create( NULL, 0 );
17929 #elif DB_VERSION_MAJOR > 1
17930         db_appexit( NULL );
17931 #else
17932         (void) dbopen( NULL, 0, 0, 0, NULL);
17933 #endif
17934
17935 ; return 0; }
17936 EOF
17937 if { (eval echo configure:17938: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17938   rm -rf conftest*
17939   ol_cv_db_none=yes
17940 else
17941   echo "configure: failed program was:" >&5
17942   cat conftest.$ac_ext >&5
17943   rm -rf conftest*
17944   ol_cv_db_none=no
17945 fi
17946 rm -f conftest*
17947
17948         LIBS="$ol_LIBS"
17949
17950 fi
17951
17952 echo "$ac_t""$ol_cv_db_none" 1>&6
17953
17954         if test $ol_cv_db_none = yes ; then
17955                 ol_cv_lib_db=yes
17956         fi
17957 fi
17958
17959 if test $ol_cv_lib_db = no ; then
17960         echo $ac_n "checking for Berkeley DB link (-ldb42)""... $ac_c" 1>&6
17961 echo "configure:17962: checking for Berkeley DB link (-ldb42)" >&5
17962 if eval "test \"\${ol_cv_db_db42+set}\" = set"; then
17963   echo $ac_n "(cached) $ac_c" 1>&6
17964 else
17965   
17966         ol_DB_LIB=-ldb42
17967         ol_LIBS=$LIBS
17968         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17969
17970         cat > conftest.$ac_ext <<EOF
17971 #line 17972 "configure"
17972 #include "confdefs.h"
17973
17974 #ifdef HAVE_DB_185_H
17975 # include <db_185.h>
17976 #else
17977 # include <db.h>
17978 #endif
17979
17980 #ifndef DB_VERSION_MAJOR
17981 # define DB_VERSION_MAJOR 1
17982 #endif
17983
17984 #ifndef NULL
17985 #define NULL ((void*)0)
17986 #endif
17987
17988 int main() {
17989
17990 #if DB_VERSION_MAJOR > 1
17991         {
17992                 char *version;
17993                 int major, minor, patch;
17994
17995                 version = db_version( &major, &minor, &patch );
17996
17997                 if( major != DB_VERSION_MAJOR ||
17998                         minor < DB_VERSION_MINOR )
17999                 {
18000                         printf("Berkeley DB version mismatch\n"
18001                                 "\texpected: %s\n\tgot: %s\n",
18002                                 DB_VERSION_STRING, version);
18003                         return 1;
18004                 }
18005         }
18006 #endif
18007
18008 #if DB_VERSION_MAJOR > 2
18009         db_env_create( NULL, 0 );
18010 #elif DB_VERSION_MAJOR > 1
18011         db_appexit( NULL );
18012 #else
18013         (void) dbopen( NULL, 0, 0, 0, NULL);
18014 #endif
18015
18016 ; return 0; }
18017 EOF
18018 if { (eval echo configure:18019: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18019   rm -rf conftest*
18020   ol_cv_db_db42=yes
18021 else
18022   echo "configure: failed program was:" >&5
18023   cat conftest.$ac_ext >&5
18024   rm -rf conftest*
18025   ol_cv_db_db42=no
18026 fi
18027 rm -f conftest*
18028
18029         LIBS="$ol_LIBS"
18030
18031 fi
18032
18033 echo "$ac_t""$ol_cv_db_db42" 1>&6
18034
18035         if test $ol_cv_db_db42 = yes ; then
18036                 ol_cv_lib_db=-ldb42
18037         fi
18038 fi
18039
18040 if test $ol_cv_lib_db = no ; then
18041         echo $ac_n "checking for Berkeley DB link (-ldb-42)""... $ac_c" 1>&6
18042 echo "configure:18043: checking for Berkeley DB link (-ldb-42)" >&5
18043 if eval "test \"\${ol_cv_db_db_42+set}\" = set"; then
18044   echo $ac_n "(cached) $ac_c" 1>&6
18045 else
18046   
18047         ol_DB_LIB=-ldb-42
18048         ol_LIBS=$LIBS
18049         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18050
18051         cat > conftest.$ac_ext <<EOF
18052 #line 18053 "configure"
18053 #include "confdefs.h"
18054
18055 #ifdef HAVE_DB_185_H
18056 # include <db_185.h>
18057 #else
18058 # include <db.h>
18059 #endif
18060
18061 #ifndef DB_VERSION_MAJOR
18062 # define DB_VERSION_MAJOR 1
18063 #endif
18064
18065 #ifndef NULL
18066 #define NULL ((void*)0)
18067 #endif
18068
18069 int main() {
18070
18071 #if DB_VERSION_MAJOR > 1
18072         {
18073                 char *version;
18074                 int major, minor, patch;
18075
18076                 version = db_version( &major, &minor, &patch );
18077
18078                 if( major != DB_VERSION_MAJOR ||
18079                         minor < DB_VERSION_MINOR )
18080                 {
18081                         printf("Berkeley DB version mismatch\n"
18082                                 "\texpected: %s\n\tgot: %s\n",
18083                                 DB_VERSION_STRING, version);
18084                         return 1;
18085                 }
18086         }
18087 #endif
18088
18089 #if DB_VERSION_MAJOR > 2
18090         db_env_create( NULL, 0 );
18091 #elif DB_VERSION_MAJOR > 1
18092         db_appexit( NULL );
18093 #else
18094         (void) dbopen( NULL, 0, 0, 0, NULL);
18095 #endif
18096
18097 ; return 0; }
18098 EOF
18099 if { (eval echo configure:18100: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18100   rm -rf conftest*
18101   ol_cv_db_db_42=yes
18102 else
18103   echo "configure: failed program was:" >&5
18104   cat conftest.$ac_ext >&5
18105   rm -rf conftest*
18106   ol_cv_db_db_42=no
18107 fi
18108 rm -f conftest*
18109
18110         LIBS="$ol_LIBS"
18111
18112 fi
18113
18114 echo "$ac_t""$ol_cv_db_db_42" 1>&6
18115
18116         if test $ol_cv_db_db_42 = yes ; then
18117                 ol_cv_lib_db=-ldb-42
18118         fi
18119 fi
18120
18121 if test $ol_cv_lib_db = no ; then
18122         echo $ac_n "checking for Berkeley DB link (-ldb-4.2)""... $ac_c" 1>&6
18123 echo "configure:18124: checking for Berkeley DB link (-ldb-4.2)" >&5
18124 if eval "test \"\${ol_cv_db_db_4_dot_2+set}\" = set"; then
18125   echo $ac_n "(cached) $ac_c" 1>&6
18126 else
18127   
18128         ol_DB_LIB=-ldb-4.2
18129         ol_LIBS=$LIBS
18130         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18131
18132         cat > conftest.$ac_ext <<EOF
18133 #line 18134 "configure"
18134 #include "confdefs.h"
18135
18136 #ifdef HAVE_DB_185_H
18137 # include <db_185.h>
18138 #else
18139 # include <db.h>
18140 #endif
18141
18142 #ifndef DB_VERSION_MAJOR
18143 # define DB_VERSION_MAJOR 1
18144 #endif
18145
18146 #ifndef NULL
18147 #define NULL ((void*)0)
18148 #endif
18149
18150 int main() {
18151
18152 #if DB_VERSION_MAJOR > 1
18153         {
18154                 char *version;
18155                 int major, minor, patch;
18156
18157                 version = db_version( &major, &minor, &patch );
18158
18159                 if( major != DB_VERSION_MAJOR ||
18160                         minor < DB_VERSION_MINOR )
18161                 {
18162                         printf("Berkeley DB version mismatch\n"
18163                                 "\texpected: %s\n\tgot: %s\n",
18164                                 DB_VERSION_STRING, version);
18165                         return 1;
18166                 }
18167         }
18168 #endif
18169
18170 #if DB_VERSION_MAJOR > 2
18171         db_env_create( NULL, 0 );
18172 #elif DB_VERSION_MAJOR > 1
18173         db_appexit( NULL );
18174 #else
18175         (void) dbopen( NULL, 0, 0, 0, NULL);
18176 #endif
18177
18178 ; return 0; }
18179 EOF
18180 if { (eval echo configure:18181: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18181   rm -rf conftest*
18182   ol_cv_db_db_4_dot_2=yes
18183 else
18184   echo "configure: failed program was:" >&5
18185   cat conftest.$ac_ext >&5
18186   rm -rf conftest*
18187   ol_cv_db_db_4_dot_2=no
18188 fi
18189 rm -f conftest*
18190
18191         LIBS="$ol_LIBS"
18192
18193 fi
18194
18195 echo "$ac_t""$ol_cv_db_db_4_dot_2" 1>&6
18196
18197         if test $ol_cv_db_db_4_dot_2 = yes ; then
18198                 ol_cv_lib_db=-ldb-4.2
18199         fi
18200 fi
18201
18202 if test $ol_cv_lib_db = no ; then
18203         echo $ac_n "checking for Berkeley DB link (-ldb-4-2)""... $ac_c" 1>&6
18204 echo "configure:18205: checking for Berkeley DB link (-ldb-4-2)" >&5
18205 if eval "test \"\${ol_cv_db_db_4_2+set}\" = set"; then
18206   echo $ac_n "(cached) $ac_c" 1>&6
18207 else
18208   
18209         ol_DB_LIB=-ldb-4-2
18210         ol_LIBS=$LIBS
18211         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18212
18213         cat > conftest.$ac_ext <<EOF
18214 #line 18215 "configure"
18215 #include "confdefs.h"
18216
18217 #ifdef HAVE_DB_185_H
18218 # include <db_185.h>
18219 #else
18220 # include <db.h>
18221 #endif
18222
18223 #ifndef DB_VERSION_MAJOR
18224 # define DB_VERSION_MAJOR 1
18225 #endif
18226
18227 #ifndef NULL
18228 #define NULL ((void*)0)
18229 #endif
18230
18231 int main() {
18232
18233 #if DB_VERSION_MAJOR > 1
18234         {
18235                 char *version;
18236                 int major, minor, patch;
18237
18238                 version = db_version( &major, &minor, &patch );
18239
18240                 if( major != DB_VERSION_MAJOR ||
18241                         minor < DB_VERSION_MINOR )
18242                 {
18243                         printf("Berkeley DB version mismatch\n"
18244                                 "\texpected: %s\n\tgot: %s\n",
18245                                 DB_VERSION_STRING, version);
18246                         return 1;
18247                 }
18248         }
18249 #endif
18250
18251 #if DB_VERSION_MAJOR > 2
18252         db_env_create( NULL, 0 );
18253 #elif DB_VERSION_MAJOR > 1
18254         db_appexit( NULL );
18255 #else
18256         (void) dbopen( NULL, 0, 0, 0, NULL);
18257 #endif
18258
18259 ; return 0; }
18260 EOF
18261 if { (eval echo configure:18262: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18262   rm -rf conftest*
18263   ol_cv_db_db_4_2=yes
18264 else
18265   echo "configure: failed program was:" >&5
18266   cat conftest.$ac_ext >&5
18267   rm -rf conftest*
18268   ol_cv_db_db_4_2=no
18269 fi
18270 rm -f conftest*
18271
18272         LIBS="$ol_LIBS"
18273
18274 fi
18275
18276 echo "$ac_t""$ol_cv_db_db_4_2" 1>&6
18277
18278         if test $ol_cv_db_db_4_2 = yes ; then
18279                 ol_cv_lib_db=-ldb-4-2
18280         fi
18281 fi
18282
18283 if test $ol_cv_lib_db = no ; then
18284         echo $ac_n "checking for Berkeley DB link (-ldb-4)""... $ac_c" 1>&6
18285 echo "configure:18286: checking for Berkeley DB link (-ldb-4)" >&5
18286 if eval "test \"\${ol_cv_db_db_4+set}\" = set"; then
18287   echo $ac_n "(cached) $ac_c" 1>&6
18288 else
18289   
18290         ol_DB_LIB=-ldb-4
18291         ol_LIBS=$LIBS
18292         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18293
18294         cat > conftest.$ac_ext <<EOF
18295 #line 18296 "configure"
18296 #include "confdefs.h"
18297
18298 #ifdef HAVE_DB_185_H
18299 # include <db_185.h>
18300 #else
18301 # include <db.h>
18302 #endif
18303
18304 #ifndef DB_VERSION_MAJOR
18305 # define DB_VERSION_MAJOR 1
18306 #endif
18307
18308 #ifndef NULL
18309 #define NULL ((void*)0)
18310 #endif
18311
18312 int main() {
18313
18314 #if DB_VERSION_MAJOR > 1
18315         {
18316                 char *version;
18317                 int major, minor, patch;
18318
18319                 version = db_version( &major, &minor, &patch );
18320
18321                 if( major != DB_VERSION_MAJOR ||
18322                         minor < DB_VERSION_MINOR )
18323                 {
18324                         printf("Berkeley DB version mismatch\n"
18325                                 "\texpected: %s\n\tgot: %s\n",
18326                                 DB_VERSION_STRING, version);
18327                         return 1;
18328                 }
18329         }
18330 #endif
18331
18332 #if DB_VERSION_MAJOR > 2
18333         db_env_create( NULL, 0 );
18334 #elif DB_VERSION_MAJOR > 1
18335         db_appexit( NULL );
18336 #else
18337         (void) dbopen( NULL, 0, 0, 0, NULL);
18338 #endif
18339
18340 ; return 0; }
18341 EOF
18342 if { (eval echo configure:18343: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18343   rm -rf conftest*
18344   ol_cv_db_db_4=yes
18345 else
18346   echo "configure: failed program was:" >&5
18347   cat conftest.$ac_ext >&5
18348   rm -rf conftest*
18349   ol_cv_db_db_4=no
18350 fi
18351 rm -f conftest*
18352
18353         LIBS="$ol_LIBS"
18354
18355 fi
18356
18357 echo "$ac_t""$ol_cv_db_db_4" 1>&6
18358
18359         if test $ol_cv_db_db_4 = yes ; then
18360                 ol_cv_lib_db=-ldb-4
18361         fi
18362 fi
18363
18364 if test $ol_cv_lib_db = no ; then
18365         echo $ac_n "checking for Berkeley DB link (-ldb4)""... $ac_c" 1>&6
18366 echo "configure:18367: checking for Berkeley DB link (-ldb4)" >&5
18367 if eval "test \"\${ol_cv_db_db4+set}\" = set"; then
18368   echo $ac_n "(cached) $ac_c" 1>&6
18369 else
18370   
18371         ol_DB_LIB=-ldb4
18372         ol_LIBS=$LIBS
18373         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18374
18375         cat > conftest.$ac_ext <<EOF
18376 #line 18377 "configure"
18377 #include "confdefs.h"
18378
18379 #ifdef HAVE_DB_185_H
18380 # include <db_185.h>
18381 #else
18382 # include <db.h>
18383 #endif
18384
18385 #ifndef DB_VERSION_MAJOR
18386 # define DB_VERSION_MAJOR 1
18387 #endif
18388
18389 #ifndef NULL
18390 #define NULL ((void*)0)
18391 #endif
18392
18393 int main() {
18394
18395 #if DB_VERSION_MAJOR > 1
18396         {
18397                 char *version;
18398                 int major, minor, patch;
18399
18400                 version = db_version( &major, &minor, &patch );
18401
18402                 if( major != DB_VERSION_MAJOR ||
18403                         minor < DB_VERSION_MINOR )
18404                 {
18405                         printf("Berkeley DB version mismatch\n"
18406                                 "\texpected: %s\n\tgot: %s\n",
18407                                 DB_VERSION_STRING, version);
18408                         return 1;
18409                 }
18410         }
18411 #endif
18412
18413 #if DB_VERSION_MAJOR > 2
18414         db_env_create( NULL, 0 );
18415 #elif DB_VERSION_MAJOR > 1
18416         db_appexit( NULL );
18417 #else
18418         (void) dbopen( NULL, 0, 0, 0, NULL);
18419 #endif
18420
18421 ; return 0; }
18422 EOF
18423 if { (eval echo configure:18424: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18424   rm -rf conftest*
18425   ol_cv_db_db4=yes
18426 else
18427   echo "configure: failed program was:" >&5
18428   cat conftest.$ac_ext >&5
18429   rm -rf conftest*
18430   ol_cv_db_db4=no
18431 fi
18432 rm -f conftest*
18433
18434         LIBS="$ol_LIBS"
18435
18436 fi
18437
18438 echo "$ac_t""$ol_cv_db_db4" 1>&6
18439
18440         if test $ol_cv_db_db4 = yes ; then
18441                 ol_cv_lib_db=-ldb4
18442         fi
18443 fi
18444
18445 if test $ol_cv_lib_db = no ; then
18446         echo $ac_n "checking for Berkeley DB link (-ldb)""... $ac_c" 1>&6
18447 echo "configure:18448: checking for Berkeley DB link (-ldb)" >&5
18448 if eval "test \"\${ol_cv_db_db+set}\" = set"; then
18449   echo $ac_n "(cached) $ac_c" 1>&6
18450 else
18451   
18452         ol_DB_LIB=-ldb
18453         ol_LIBS=$LIBS
18454         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18455
18456         cat > conftest.$ac_ext <<EOF
18457 #line 18458 "configure"
18458 #include "confdefs.h"
18459
18460 #ifdef HAVE_DB_185_H
18461 # include <db_185.h>
18462 #else
18463 # include <db.h>
18464 #endif
18465
18466 #ifndef DB_VERSION_MAJOR
18467 # define DB_VERSION_MAJOR 1
18468 #endif
18469
18470 #ifndef NULL
18471 #define NULL ((void*)0)
18472 #endif
18473
18474 int main() {
18475
18476 #if DB_VERSION_MAJOR > 1
18477         {
18478                 char *version;
18479                 int major, minor, patch;
18480
18481                 version = db_version( &major, &minor, &patch );
18482
18483                 if( major != DB_VERSION_MAJOR ||
18484                         minor < DB_VERSION_MINOR )
18485                 {
18486                         printf("Berkeley DB version mismatch\n"
18487                                 "\texpected: %s\n\tgot: %s\n",
18488                                 DB_VERSION_STRING, version);
18489                         return 1;
18490                 }
18491         }
18492 #endif
18493
18494 #if DB_VERSION_MAJOR > 2
18495         db_env_create( NULL, 0 );
18496 #elif DB_VERSION_MAJOR > 1
18497         db_appexit( NULL );
18498 #else
18499         (void) dbopen( NULL, 0, 0, 0, NULL);
18500 #endif
18501
18502 ; return 0; }
18503 EOF
18504 if { (eval echo configure:18505: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18505   rm -rf conftest*
18506   ol_cv_db_db=yes
18507 else
18508   echo "configure: failed program was:" >&5
18509   cat conftest.$ac_ext >&5
18510   rm -rf conftest*
18511   ol_cv_db_db=no
18512 fi
18513 rm -f conftest*
18514
18515         LIBS="$ol_LIBS"
18516
18517 fi
18518
18519 echo "$ac_t""$ol_cv_db_db" 1>&6
18520
18521         if test $ol_cv_db_db = yes ; then
18522                 ol_cv_lib_db=-ldb
18523         fi
18524 fi
18525
18526 if test $ol_cv_lib_db = no ; then
18527         echo $ac_n "checking for Berkeley DB link (-ldb41)""... $ac_c" 1>&6
18528 echo "configure:18529: checking for Berkeley DB link (-ldb41)" >&5
18529 if eval "test \"\${ol_cv_db_db41+set}\" = set"; then
18530   echo $ac_n "(cached) $ac_c" 1>&6
18531 else
18532   
18533         ol_DB_LIB=-ldb41
18534         ol_LIBS=$LIBS
18535         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18536
18537         cat > conftest.$ac_ext <<EOF
18538 #line 18539 "configure"
18539 #include "confdefs.h"
18540
18541 #ifdef HAVE_DB_185_H
18542 # include <db_185.h>
18543 #else
18544 # include <db.h>
18545 #endif
18546
18547 #ifndef DB_VERSION_MAJOR
18548 # define DB_VERSION_MAJOR 1
18549 #endif
18550
18551 #ifndef NULL
18552 #define NULL ((void*)0)
18553 #endif
18554
18555 int main() {
18556
18557 #if DB_VERSION_MAJOR > 1
18558         {
18559                 char *version;
18560                 int major, minor, patch;
18561
18562                 version = db_version( &major, &minor, &patch );
18563
18564                 if( major != DB_VERSION_MAJOR ||
18565                         minor < DB_VERSION_MINOR )
18566                 {
18567                         printf("Berkeley DB version mismatch\n"
18568                                 "\texpected: %s\n\tgot: %s\n",
18569                                 DB_VERSION_STRING, version);
18570                         return 1;
18571                 }
18572         }
18573 #endif
18574
18575 #if DB_VERSION_MAJOR > 2
18576         db_env_create( NULL, 0 );
18577 #elif DB_VERSION_MAJOR > 1
18578         db_appexit( NULL );
18579 #else
18580         (void) dbopen( NULL, 0, 0, 0, NULL);
18581 #endif
18582
18583 ; return 0; }
18584 EOF
18585 if { (eval echo configure:18586: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18586   rm -rf conftest*
18587   ol_cv_db_db41=yes
18588 else
18589   echo "configure: failed program was:" >&5
18590   cat conftest.$ac_ext >&5
18591   rm -rf conftest*
18592   ol_cv_db_db41=no
18593 fi
18594 rm -f conftest*
18595
18596         LIBS="$ol_LIBS"
18597
18598 fi
18599
18600 echo "$ac_t""$ol_cv_db_db41" 1>&6
18601
18602         if test $ol_cv_db_db41 = yes ; then
18603                 ol_cv_lib_db=-ldb41
18604         fi
18605 fi
18606
18607 if test $ol_cv_lib_db = no ; then
18608         echo $ac_n "checking for Berkeley DB link (-ldb-41)""... $ac_c" 1>&6
18609 echo "configure:18610: checking for Berkeley DB link (-ldb-41)" >&5
18610 if eval "test \"\${ol_cv_db_db_41+set}\" = set"; then
18611   echo $ac_n "(cached) $ac_c" 1>&6
18612 else
18613   
18614         ol_DB_LIB=-ldb-41
18615         ol_LIBS=$LIBS
18616         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18617
18618         cat > conftest.$ac_ext <<EOF
18619 #line 18620 "configure"
18620 #include "confdefs.h"
18621
18622 #ifdef HAVE_DB_185_H
18623 # include <db_185.h>
18624 #else
18625 # include <db.h>
18626 #endif
18627
18628 #ifndef DB_VERSION_MAJOR
18629 # define DB_VERSION_MAJOR 1
18630 #endif
18631
18632 #ifndef NULL
18633 #define NULL ((void*)0)
18634 #endif
18635
18636 int main() {
18637
18638 #if DB_VERSION_MAJOR > 1
18639         {
18640                 char *version;
18641                 int major, minor, patch;
18642
18643                 version = db_version( &major, &minor, &patch );
18644
18645                 if( major != DB_VERSION_MAJOR ||
18646                         minor < DB_VERSION_MINOR )
18647                 {
18648                         printf("Berkeley DB version mismatch\n"
18649                                 "\texpected: %s\n\tgot: %s\n",
18650                                 DB_VERSION_STRING, version);
18651                         return 1;
18652                 }
18653         }
18654 #endif
18655
18656 #if DB_VERSION_MAJOR > 2
18657         db_env_create( NULL, 0 );
18658 #elif DB_VERSION_MAJOR > 1
18659         db_appexit( NULL );
18660 #else
18661         (void) dbopen( NULL, 0, 0, 0, NULL);
18662 #endif
18663
18664 ; return 0; }
18665 EOF
18666 if { (eval echo configure:18667: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18667   rm -rf conftest*
18668   ol_cv_db_db_41=yes
18669 else
18670   echo "configure: failed program was:" >&5
18671   cat conftest.$ac_ext >&5
18672   rm -rf conftest*
18673   ol_cv_db_db_41=no
18674 fi
18675 rm -f conftest*
18676
18677         LIBS="$ol_LIBS"
18678
18679 fi
18680
18681 echo "$ac_t""$ol_cv_db_db_41" 1>&6
18682
18683         if test $ol_cv_db_db_41 = yes ; then
18684                 ol_cv_lib_db=-ldb-41
18685         fi
18686 fi
18687
18688 if test $ol_cv_lib_db = no ; then
18689         echo $ac_n "checking for Berkeley DB link (-ldb-4.1)""... $ac_c" 1>&6
18690 echo "configure:18691: checking for Berkeley DB link (-ldb-4.1)" >&5
18691 if eval "test \"\${ol_cv_db_db_4_dot_1+set}\" = set"; then
18692   echo $ac_n "(cached) $ac_c" 1>&6
18693 else
18694   
18695         ol_DB_LIB=-ldb-4.1
18696         ol_LIBS=$LIBS
18697         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18698
18699         cat > conftest.$ac_ext <<EOF
18700 #line 18701 "configure"
18701 #include "confdefs.h"
18702
18703 #ifdef HAVE_DB_185_H
18704 # include <db_185.h>
18705 #else
18706 # include <db.h>
18707 #endif
18708
18709 #ifndef DB_VERSION_MAJOR
18710 # define DB_VERSION_MAJOR 1
18711 #endif
18712
18713 #ifndef NULL
18714 #define NULL ((void*)0)
18715 #endif
18716
18717 int main() {
18718
18719 #if DB_VERSION_MAJOR > 1
18720         {
18721                 char *version;
18722                 int major, minor, patch;
18723
18724                 version = db_version( &major, &minor, &patch );
18725
18726                 if( major != DB_VERSION_MAJOR ||
18727                         minor < DB_VERSION_MINOR )
18728                 {
18729                         printf("Berkeley DB version mismatch\n"
18730                                 "\texpected: %s\n\tgot: %s\n",
18731                                 DB_VERSION_STRING, version);
18732                         return 1;
18733                 }
18734         }
18735 #endif
18736
18737 #if DB_VERSION_MAJOR > 2
18738         db_env_create( NULL, 0 );
18739 #elif DB_VERSION_MAJOR > 1
18740         db_appexit( NULL );
18741 #else
18742         (void) dbopen( NULL, 0, 0, 0, NULL);
18743 #endif
18744
18745 ; return 0; }
18746 EOF
18747 if { (eval echo configure:18748: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18748   rm -rf conftest*
18749   ol_cv_db_db_4_dot_1=yes
18750 else
18751   echo "configure: failed program was:" >&5
18752   cat conftest.$ac_ext >&5
18753   rm -rf conftest*
18754   ol_cv_db_db_4_dot_1=no
18755 fi
18756 rm -f conftest*
18757
18758         LIBS="$ol_LIBS"
18759
18760 fi
18761
18762 echo "$ac_t""$ol_cv_db_db_4_dot_1" 1>&6
18763
18764         if test $ol_cv_db_db_4_dot_1 = yes ; then
18765                 ol_cv_lib_db=-ldb-4.1
18766         fi
18767 fi
18768
18769 if test $ol_cv_lib_db = no ; then
18770         echo $ac_n "checking for Berkeley DB link (-ldb-4-1)""... $ac_c" 1>&6
18771 echo "configure:18772: checking for Berkeley DB link (-ldb-4-1)" >&5
18772 if eval "test \"\${ol_cv_db_db_4_1+set}\" = set"; then
18773   echo $ac_n "(cached) $ac_c" 1>&6
18774 else
18775   
18776         ol_DB_LIB=-ldb-4-1
18777         ol_LIBS=$LIBS
18778         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18779
18780         cat > conftest.$ac_ext <<EOF
18781 #line 18782 "configure"
18782 #include "confdefs.h"
18783
18784 #ifdef HAVE_DB_185_H
18785 # include <db_185.h>
18786 #else
18787 # include <db.h>
18788 #endif
18789
18790 #ifndef DB_VERSION_MAJOR
18791 # define DB_VERSION_MAJOR 1
18792 #endif
18793
18794 #ifndef NULL
18795 #define NULL ((void*)0)
18796 #endif
18797
18798 int main() {
18799
18800 #if DB_VERSION_MAJOR > 1
18801         {
18802                 char *version;
18803                 int major, minor, patch;
18804
18805                 version = db_version( &major, &minor, &patch );
18806
18807                 if( major != DB_VERSION_MAJOR ||
18808                         minor < DB_VERSION_MINOR )
18809                 {
18810                         printf("Berkeley DB version mismatch\n"
18811                                 "\texpected: %s\n\tgot: %s\n",
18812                                 DB_VERSION_STRING, version);
18813                         return 1;
18814                 }
18815         }
18816 #endif
18817
18818 #if DB_VERSION_MAJOR > 2
18819         db_env_create( NULL, 0 );
18820 #elif DB_VERSION_MAJOR > 1
18821         db_appexit( NULL );
18822 #else
18823         (void) dbopen( NULL, 0, 0, 0, NULL);
18824 #endif
18825
18826 ; return 0; }
18827 EOF
18828 if { (eval echo configure:18829: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18829   rm -rf conftest*
18830   ol_cv_db_db_4_1=yes
18831 else
18832   echo "configure: failed program was:" >&5
18833   cat conftest.$ac_ext >&5
18834   rm -rf conftest*
18835   ol_cv_db_db_4_1=no
18836 fi
18837 rm -f conftest*
18838
18839         LIBS="$ol_LIBS"
18840
18841 fi
18842
18843 echo "$ac_t""$ol_cv_db_db_4_1" 1>&6
18844
18845         if test $ol_cv_db_db_4_1 = yes ; then
18846                 ol_cv_lib_db=-ldb-4-1
18847         fi
18848 fi
18849
18850 if test $ol_cv_lib_db = no ; then
18851         echo $ac_n "checking for Berkeley DB link (-ldb3)""... $ac_c" 1>&6
18852 echo "configure:18853: checking for Berkeley DB link (-ldb3)" >&5
18853 if eval "test \"\${ol_cv_db_db3+set}\" = set"; then
18854   echo $ac_n "(cached) $ac_c" 1>&6
18855 else
18856   
18857         ol_DB_LIB=-ldb3
18858         ol_LIBS=$LIBS
18859         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18860
18861         cat > conftest.$ac_ext <<EOF
18862 #line 18863 "configure"
18863 #include "confdefs.h"
18864
18865 #ifdef HAVE_DB_185_H
18866 # include <db_185.h>
18867 #else
18868 # include <db.h>
18869 #endif
18870
18871 #ifndef DB_VERSION_MAJOR
18872 # define DB_VERSION_MAJOR 1
18873 #endif
18874
18875 #ifndef NULL
18876 #define NULL ((void*)0)
18877 #endif
18878
18879 int main() {
18880
18881 #if DB_VERSION_MAJOR > 1
18882         {
18883                 char *version;
18884                 int major, minor, patch;
18885
18886                 version = db_version( &major, &minor, &patch );
18887
18888                 if( major != DB_VERSION_MAJOR ||
18889                         minor < DB_VERSION_MINOR )
18890                 {
18891                         printf("Berkeley DB version mismatch\n"
18892                                 "\texpected: %s\n\tgot: %s\n",
18893                                 DB_VERSION_STRING, version);
18894                         return 1;
18895                 }
18896         }
18897 #endif
18898
18899 #if DB_VERSION_MAJOR > 2
18900         db_env_create( NULL, 0 );
18901 #elif DB_VERSION_MAJOR > 1
18902         db_appexit( NULL );
18903 #else
18904         (void) dbopen( NULL, 0, 0, 0, NULL);
18905 #endif
18906
18907 ; return 0; }
18908 EOF
18909 if { (eval echo configure:18910: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18910   rm -rf conftest*
18911   ol_cv_db_db3=yes
18912 else
18913   echo "configure: failed program was:" >&5
18914   cat conftest.$ac_ext >&5
18915   rm -rf conftest*
18916   ol_cv_db_db3=no
18917 fi
18918 rm -f conftest*
18919
18920         LIBS="$ol_LIBS"
18921
18922 fi
18923
18924 echo "$ac_t""$ol_cv_db_db3" 1>&6
18925
18926         if test $ol_cv_db_db3 = yes ; then
18927                 ol_cv_lib_db=-ldb3
18928         fi
18929 fi
18930
18931 if test $ol_cv_lib_db = no ; then
18932         echo $ac_n "checking for Berkeley DB link (-ldb-3)""... $ac_c" 1>&6
18933 echo "configure:18934: checking for Berkeley DB link (-ldb-3)" >&5
18934 if eval "test \"\${ol_cv_db_db_3+set}\" = set"; then
18935   echo $ac_n "(cached) $ac_c" 1>&6
18936 else
18937   
18938         ol_DB_LIB=-ldb-3
18939         ol_LIBS=$LIBS
18940         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18941
18942         cat > conftest.$ac_ext <<EOF
18943 #line 18944 "configure"
18944 #include "confdefs.h"
18945
18946 #ifdef HAVE_DB_185_H
18947 # include <db_185.h>
18948 #else
18949 # include <db.h>
18950 #endif
18951
18952 #ifndef DB_VERSION_MAJOR
18953 # define DB_VERSION_MAJOR 1
18954 #endif
18955
18956 #ifndef NULL
18957 #define NULL ((void*)0)
18958 #endif
18959
18960 int main() {
18961
18962 #if DB_VERSION_MAJOR > 1
18963         {
18964                 char *version;
18965                 int major, minor, patch;
18966
18967                 version = db_version( &major, &minor, &patch );
18968
18969                 if( major != DB_VERSION_MAJOR ||
18970                         minor < DB_VERSION_MINOR )
18971                 {
18972                         printf("Berkeley DB version mismatch\n"
18973                                 "\texpected: %s\n\tgot: %s\n",
18974                                 DB_VERSION_STRING, version);
18975                         return 1;
18976                 }
18977         }
18978 #endif
18979
18980 #if DB_VERSION_MAJOR > 2
18981         db_env_create( NULL, 0 );
18982 #elif DB_VERSION_MAJOR > 1
18983         db_appexit( NULL );
18984 #else
18985         (void) dbopen( NULL, 0, 0, 0, NULL);
18986 #endif
18987
18988 ; return 0; }
18989 EOF
18990 if { (eval echo configure:18991: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18991   rm -rf conftest*
18992   ol_cv_db_db_3=yes
18993 else
18994   echo "configure: failed program was:" >&5
18995   cat conftest.$ac_ext >&5
18996   rm -rf conftest*
18997   ol_cv_db_db_3=no
18998 fi
18999 rm -f conftest*
19000
19001         LIBS="$ol_LIBS"
19002
19003 fi
19004
19005 echo "$ac_t""$ol_cv_db_db_3" 1>&6
19006
19007         if test $ol_cv_db_db_3 = yes ; then
19008                 ol_cv_lib_db=-ldb-3
19009         fi
19010 fi
19011
19012 if test $ol_cv_lib_db = no ; then
19013         echo $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6
19014 echo "configure:19015: checking for Berkeley DB link (-ldb2)" >&5
19015 if eval "test \"\${ol_cv_db_db2+set}\" = set"; then
19016   echo $ac_n "(cached) $ac_c" 1>&6
19017 else
19018   
19019         ol_DB_LIB=-ldb2
19020         ol_LIBS=$LIBS
19021         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19022
19023         cat > conftest.$ac_ext <<EOF
19024 #line 19025 "configure"
19025 #include "confdefs.h"
19026
19027 #ifdef HAVE_DB_185_H
19028 # include <db_185.h>
19029 #else
19030 # include <db.h>
19031 #endif
19032
19033 #ifndef DB_VERSION_MAJOR
19034 # define DB_VERSION_MAJOR 1
19035 #endif
19036
19037 #ifndef NULL
19038 #define NULL ((void*)0)
19039 #endif
19040
19041 int main() {
19042
19043 #if DB_VERSION_MAJOR > 1
19044         {
19045                 char *version;
19046                 int major, minor, patch;
19047
19048                 version = db_version( &major, &minor, &patch );
19049
19050                 if( major != DB_VERSION_MAJOR ||
19051                         minor < DB_VERSION_MINOR )
19052                 {
19053                         printf("Berkeley DB version mismatch\n"
19054                                 "\texpected: %s\n\tgot: %s\n",
19055                                 DB_VERSION_STRING, version);
19056                         return 1;
19057                 }
19058         }
19059 #endif
19060
19061 #if DB_VERSION_MAJOR > 2
19062         db_env_create( NULL, 0 );
19063 #elif DB_VERSION_MAJOR > 1
19064         db_appexit( NULL );
19065 #else
19066         (void) dbopen( NULL, 0, 0, 0, NULL);
19067 #endif
19068
19069 ; return 0; }
19070 EOF
19071 if { (eval echo configure:19072: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19072   rm -rf conftest*
19073   ol_cv_db_db2=yes
19074 else
19075   echo "configure: failed program was:" >&5
19076   cat conftest.$ac_ext >&5
19077   rm -rf conftest*
19078   ol_cv_db_db2=no
19079 fi
19080 rm -f conftest*
19081
19082         LIBS="$ol_LIBS"
19083
19084 fi
19085
19086 echo "$ac_t""$ol_cv_db_db2" 1>&6
19087
19088         if test $ol_cv_db_db2 = yes ; then
19089                 ol_cv_lib_db=-ldb2
19090         fi
19091 fi
19092
19093 if test $ol_cv_lib_db = no ; then
19094         echo $ac_n "checking for Berkeley DB link (-ldb-2)""... $ac_c" 1>&6
19095 echo "configure:19096: checking for Berkeley DB link (-ldb-2)" >&5
19096 if eval "test \"\${ol_cv_db_db_2+set}\" = set"; then
19097   echo $ac_n "(cached) $ac_c" 1>&6
19098 else
19099   
19100         ol_DB_LIB=-ldb-2
19101         ol_LIBS=$LIBS
19102         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19103
19104         cat > conftest.$ac_ext <<EOF
19105 #line 19106 "configure"
19106 #include "confdefs.h"
19107
19108 #ifdef HAVE_DB_185_H
19109 # include <db_185.h>
19110 #else
19111 # include <db.h>
19112 #endif
19113
19114 #ifndef DB_VERSION_MAJOR
19115 # define DB_VERSION_MAJOR 1
19116 #endif
19117
19118 #ifndef NULL
19119 #define NULL ((void*)0)
19120 #endif
19121
19122 int main() {
19123
19124 #if DB_VERSION_MAJOR > 1
19125         {
19126                 char *version;
19127                 int major, minor, patch;
19128
19129                 version = db_version( &major, &minor, &patch );
19130
19131                 if( major != DB_VERSION_MAJOR ||
19132                         minor < DB_VERSION_MINOR )
19133                 {
19134                         printf("Berkeley DB version mismatch\n"
19135                                 "\texpected: %s\n\tgot: %s\n",
19136                                 DB_VERSION_STRING, version);
19137                         return 1;
19138                 }
19139         }
19140 #endif
19141
19142 #if DB_VERSION_MAJOR > 2
19143         db_env_create( NULL, 0 );
19144 #elif DB_VERSION_MAJOR > 1
19145         db_appexit( NULL );
19146 #else
19147         (void) dbopen( NULL, 0, 0, 0, NULL);
19148 #endif
19149
19150 ; return 0; }
19151 EOF
19152 if { (eval echo configure:19153: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19153   rm -rf conftest*
19154   ol_cv_db_db_2=yes
19155 else
19156   echo "configure: failed program was:" >&5
19157   cat conftest.$ac_ext >&5
19158   rm -rf conftest*
19159   ol_cv_db_db_2=no
19160 fi
19161 rm -f conftest*
19162
19163         LIBS="$ol_LIBS"
19164
19165 fi
19166
19167 echo "$ac_t""$ol_cv_db_db_2" 1>&6
19168
19169         if test $ol_cv_db_db_2 = yes ; then
19170                 ol_cv_lib_db=-ldb-2
19171         fi
19172 fi
19173
19174 if test $ol_cv_lib_db = no ; then
19175         echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6
19176 echo "configure:19177: checking for Berkeley DB link (-ldb1)" >&5
19177 if eval "test \"\${ol_cv_db_db1+set}\" = set"; then
19178   echo $ac_n "(cached) $ac_c" 1>&6
19179 else
19180   
19181         ol_DB_LIB=-ldb1
19182         ol_LIBS=$LIBS
19183         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19184
19185         cat > conftest.$ac_ext <<EOF
19186 #line 19187 "configure"
19187 #include "confdefs.h"
19188
19189 #ifdef HAVE_DB_185_H
19190 # include <db_185.h>
19191 #else
19192 # include <db.h>
19193 #endif
19194
19195 #ifndef DB_VERSION_MAJOR
19196 # define DB_VERSION_MAJOR 1
19197 #endif
19198
19199 #ifndef NULL
19200 #define NULL ((void*)0)
19201 #endif
19202
19203 int main() {
19204
19205 #if DB_VERSION_MAJOR > 1
19206         {
19207                 char *version;
19208                 int major, minor, patch;
19209
19210                 version = db_version( &major, &minor, &patch );
19211
19212                 if( major != DB_VERSION_MAJOR ||
19213                         minor < DB_VERSION_MINOR )
19214                 {
19215                         printf("Berkeley DB version mismatch\n"
19216                                 "\texpected: %s\n\tgot: %s\n",
19217                                 DB_VERSION_STRING, version);
19218                         return 1;
19219                 }
19220         }
19221 #endif
19222
19223 #if DB_VERSION_MAJOR > 2
19224         db_env_create( NULL, 0 );
19225 #elif DB_VERSION_MAJOR > 1
19226         db_appexit( NULL );
19227 #else
19228         (void) dbopen( NULL, 0, 0, 0, NULL);
19229 #endif
19230
19231 ; return 0; }
19232 EOF
19233 if { (eval echo configure:19234: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19234   rm -rf conftest*
19235   ol_cv_db_db1=yes
19236 else
19237   echo "configure: failed program was:" >&5
19238   cat conftest.$ac_ext >&5
19239   rm -rf conftest*
19240   ol_cv_db_db1=no
19241 fi
19242 rm -f conftest*
19243
19244         LIBS="$ol_LIBS"
19245
19246 fi
19247
19248 echo "$ac_t""$ol_cv_db_db1" 1>&6
19249
19250         if test $ol_cv_db_db1 = yes ; then
19251                 ol_cv_lib_db=-ldb1
19252         fi
19253 fi
19254
19255 if test $ol_cv_lib_db = no ; then
19256         echo $ac_n "checking for Berkeley DB link (-ldb-1)""... $ac_c" 1>&6
19257 echo "configure:19258: checking for Berkeley DB link (-ldb-1)" >&5
19258 if eval "test \"\${ol_cv_db_db_1+set}\" = set"; then
19259   echo $ac_n "(cached) $ac_c" 1>&6
19260 else
19261   
19262         ol_DB_LIB=-ldb-1
19263         ol_LIBS=$LIBS
19264         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19265
19266         cat > conftest.$ac_ext <<EOF
19267 #line 19268 "configure"
19268 #include "confdefs.h"
19269
19270 #ifdef HAVE_DB_185_H
19271 # include <db_185.h>
19272 #else
19273 # include <db.h>
19274 #endif
19275
19276 #ifndef DB_VERSION_MAJOR
19277 # define DB_VERSION_MAJOR 1
19278 #endif
19279
19280 #ifndef NULL
19281 #define NULL ((void*)0)
19282 #endif
19283
19284 int main() {
19285
19286 #if DB_VERSION_MAJOR > 1
19287         {
19288                 char *version;
19289                 int major, minor, patch;
19290
19291                 version = db_version( &major, &minor, &patch );
19292
19293                 if( major != DB_VERSION_MAJOR ||
19294                         minor < DB_VERSION_MINOR )
19295                 {
19296                         printf("Berkeley DB version mismatch\n"
19297                                 "\texpected: %s\n\tgot: %s\n",
19298                                 DB_VERSION_STRING, version);
19299                         return 1;
19300                 }
19301         }
19302 #endif
19303
19304 #if DB_VERSION_MAJOR > 2
19305         db_env_create( NULL, 0 );
19306 #elif DB_VERSION_MAJOR > 1
19307         db_appexit( NULL );
19308 #else
19309         (void) dbopen( NULL, 0, 0, 0, NULL);
19310 #endif
19311
19312 ; return 0; }
19313 EOF
19314 if { (eval echo configure:19315: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19315   rm -rf conftest*
19316   ol_cv_db_db_1=yes
19317 else
19318   echo "configure: failed program was:" >&5
19319   cat conftest.$ac_ext >&5
19320   rm -rf conftest*
19321   ol_cv_db_db_1=no
19322 fi
19323 rm -f conftest*
19324
19325         LIBS="$ol_LIBS"
19326
19327 fi
19328
19329 echo "$ac_t""$ol_cv_db_db_1" 1>&6
19330
19331         if test $ol_cv_db_db_1 = yes ; then
19332                 ol_cv_lib_db=-ldb-1
19333         fi
19334 fi
19335
19336
19337         if test "$ol_cv_lib_db" != no ; then
19338                 ol_cv_berkeley_db=yes
19339                 echo $ac_n "checking for Berkeley DB thread support""... $ac_c" 1>&6
19340 echo "configure:19341: checking for Berkeley DB thread support" >&5
19341 if eval "test \"\${ol_cv_berkeley_db_thread+set}\" = set"; then
19342   echo $ac_n "(cached) $ac_c" 1>&6
19343 else
19344   
19345         ol_LIBS="$LIBS"
19346         LIBS="$LTHREAD_LIBS $LIBS"
19347         if test $ol_cv_lib_db != yes ; then
19348                 LIBS="$ol_cv_lib_db $LIBS"
19349         fi
19350
19351         if test "$cross_compiling" = yes; then
19352   ol_cv_berkeley_db_thread=cross
19353 else
19354   cat > conftest.$ac_ext <<EOF
19355 #line 19356 "configure"
19356 #include "confdefs.h"
19357
19358 #ifdef HAVE_DB_185_H
19359         choke me;
19360 #else
19361 #include <db.h>
19362 #endif
19363 #ifndef NULL
19364 #define NULL ((void *)0)
19365 #endif
19366 main()
19367 {
19368         int rc;
19369         u_int32_t flags = DB_CREATE |
19370 #ifdef DB_PRIVATE
19371                 DB_PRIVATE |
19372 #endif
19373                 DB_THREAD;
19374
19375 #if DB_VERSION_MAJOR > 2
19376         DB_ENV *env = NULL;
19377
19378         rc = db_env_create( &env, 0 );
19379
19380         flags |= DB_INIT_MPOOL;
19381 #ifdef DB_MPOOL_PRIVATE
19382         flags |= DB_MPOOL_PRIVATE;
19383 #endif
19384
19385         if( rc ) {
19386                 printf("BerkeleyDB: %s\n", db_strerror(rc) );
19387                 return rc;
19388         }
19389
19390 #if (DB_VERSION_MAJOR > 3) || (DB_VERSION_MINOR >= 1)
19391         rc = env->open( env, NULL, flags, 0 );
19392 #else
19393         rc = env->open( env, NULL, NULL, flags, 0 );
19394 #endif
19395
19396         if ( rc == 0 ) {
19397                 rc = env->close( env, 0 );
19398         }
19399
19400         if( rc ) {
19401                 printf("BerkeleyDB: %s\n", db_strerror(rc) );
19402                 return rc;
19403         }
19404
19405 #else
19406         DB_ENV env;
19407         memset( &env, '\0', sizeof(env) );
19408
19409         rc = db_appinit( NULL, NULL, &env, flags );
19410
19411         if( rc == 0 ) {
19412                 db_appexit( &env );
19413         }
19414
19415         unlink("__db_mpool.share");
19416         unlink("__db_lock.share");
19417 #endif
19418
19419         return rc;
19420 }
19421 EOF
19422 if { (eval echo configure:19423: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
19423 then
19424   ol_cv_berkeley_db_thread=yes
19425 else
19426   echo "configure: failed program was:" >&5
19427   cat conftest.$ac_ext >&5
19428   rm -fr conftest*
19429   ol_cv_berkeley_db_thread=no
19430 fi
19431 rm -fr conftest*
19432 fi
19433
19434
19435         LIBS="$ol_LIBS"
19436
19437 fi
19438
19439 echo "$ac_t""$ol_cv_berkeley_db_thread" 1>&6
19440
19441         if test $ol_cv_berkeley_db_thread != no ; then
19442                 cat >> confdefs.h <<\EOF
19443 #define HAVE_BERKELEY_DB_THREAD 1
19444 EOF
19445
19446         fi
19447
19448         fi
19449 fi
19450
19451         fi
19452
19453         if test $ol_cv_berkeley_db != no ; then
19454                 cat >> confdefs.h <<\EOF
19455 #define HAVE_BERKELEY_DB 1
19456 EOF
19457
19458
19459                 ol_link_ldbm=berkeley
19460                 ol_with_ldbm_api=berkeley
19461
19462                 if test $ol_with_ldbm_type = hash ; then
19463                         cat >> confdefs.h <<\EOF
19464 #define LDBM_USE_DBHASH 1
19465 EOF
19466
19467                 else
19468                         cat >> confdefs.h <<\EOF
19469 #define LDBM_USE_DBBTREE 1
19470 EOF
19471
19472                 fi
19473
19474                                                 if test $ol_cv_lib_db != yes ; then
19475                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db"
19476                 fi
19477         fi
19478 fi
19479
19480 if test $ol_enable_bdb = yes -a $ol_link_ldbm != berkeley ; then
19481         { echo "configure: error: BDB: BerkeleyDB not available" 1>&2; exit 1; }
19482 elif test $ol_enable_bdb != no -a $ol_link_ldbm = berkeley ; then
19483         echo $ac_n "checking Berkeley DB version for BDB backend""... $ac_c" 1>&6
19484 echo "configure:19485: checking Berkeley DB version for BDB backend" >&5
19485 if eval "test \"\${ol_cv_bdb_compat+set}\" = set"; then
19486   echo $ac_n "(cached) $ac_c" 1>&6
19487 else
19488   
19489         cat > conftest.$ac_ext <<EOF
19490 #line 19491 "configure"
19491 #include "confdefs.h"
19492
19493 #include <db.h>
19494
19495  /* this check could be improved */
19496 #ifndef DB_VERSION_MAJOR
19497 #       define DB_VERSION_MAJOR 1
19498 #endif
19499 #ifndef DB_VERSION_MINOR
19500 #       define DB_VERSION_MINOR 0
19501 #endif
19502
19503 /* require 4.2 or later */
19504 #if (DB_VERSION_MAJOR >= 4) && (DB_VERSION_MINOR >= 2)
19505         __db_version_compat
19506 #endif
19507         
19508 EOF
19509 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
19510   egrep "__db_version_compat" >/dev/null 2>&1; then
19511   rm -rf conftest*
19512   ol_cv_bdb_compat=yes
19513 else
19514   rm -rf conftest*
19515   ol_cv_bdb_compat=no
19516 fi
19517 rm -f conftest*
19518
19519 fi
19520
19521 echo "$ac_t""$ol_cv_bdb_compat" 1>&6
19522
19523
19524         if test $ol_cv_bdb_compat = yes ; then
19525                 ol_enable_bdb=yes
19526         elif test $ol_enable_bdb = yes ; then
19527                 { echo "configure: error: BDB: BerkeleyDB version incompatible" 1>&2; exit 1; }
19528         else
19529                 ol_enable_bdb=no
19530         fi
19531 fi
19532 if test $ol_enable_hdb = yes -a $ol_link_ldbm != berkeley ; then
19533         { echo "configure: error: HDB: BerkeleyDB not available" 1>&2; exit 1; }
19534 fi
19535
19536 if test $ol_link_ldbm = no -a $ol_with_ldbm_type = btree ; then
19537         echo "configure: warning: Could not find LDBM with BTREE support" 1>&2
19538         ol_with_ldbm_api=none
19539 fi
19540
19541 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = mdbm ; then
19542         echo $ac_n "checking for MDBM library""... $ac_c" 1>&6
19543 echo "configure:19544: checking for MDBM library" >&5
19544 if eval "test \"\${ol_cv_lib_mdbm+set}\" = set"; then
19545   echo $ac_n "(cached) $ac_c" 1>&6
19546 else
19547         ol_LIBS="$LIBS"
19548         echo $ac_n "checking for mdbm_set_chain""... $ac_c" 1>&6
19549 echo "configure:19550: checking for mdbm_set_chain" >&5
19550 if eval "test \"\${ac_cv_func_mdbm_set_chain+set}\" = set"; then
19551   echo $ac_n "(cached) $ac_c" 1>&6
19552 else
19553   cat > conftest.$ac_ext <<EOF
19554 #line 19555 "configure"
19555 #include "confdefs.h"
19556 /* System header to define __stub macros and hopefully few prototypes,
19557     which can conflict with char mdbm_set_chain(); below.  */
19558 #include <assert.h>
19559 /* Override any gcc2 internal prototype to avoid an error.  */
19560 /* We use char because int might match the return type of a gcc2
19561     builtin and then its argument prototype would still apply.  */
19562 char mdbm_set_chain();
19563 char (*f)();
19564
19565 int main() {
19566
19567 /* The GNU C library defines this for functions which it implements
19568     to always fail with ENOSYS.  Some functions are actually named
19569     something starting with __ and the normal name is an alias.  */
19570 #if defined (__stub_mdbm_set_chain) || defined (__stub___mdbm_set_chain)
19571 choke me
19572 #else
19573 f = mdbm_set_chain;
19574 #endif
19575
19576 ; return 0; }
19577 EOF
19578 if { (eval echo configure:19579: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19579   rm -rf conftest*
19580   eval "ac_cv_func_mdbm_set_chain=yes"
19581 else
19582   echo "configure: failed program was:" >&5
19583   cat conftest.$ac_ext >&5
19584   rm -rf conftest*
19585   eval "ac_cv_func_mdbm_set_chain=no"
19586 fi
19587 rm -f conftest*
19588 fi
19589
19590 if eval "test \"`echo '$ac_cv_func_'mdbm_set_chain`\" = yes"; then
19591   echo "$ac_t""yes" 1>&6
19592   ol_cv_lib_mdbm=yes
19593 else
19594   echo "$ac_t""no" 1>&6
19595
19596                 echo $ac_n "checking for mdbm_set_chain in -lmdbm""... $ac_c" 1>&6
19597 echo "configure:19598: checking for mdbm_set_chain in -lmdbm" >&5
19598 ac_lib_var=`echo mdbm'_'mdbm_set_chain | sed 'y%./+-:%__p__%'`
19599 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19600   echo $ac_n "(cached) $ac_c" 1>&6
19601 else
19602   ac_save_LIBS="$LIBS"
19603 LIBS="-lmdbm  $LIBS"
19604 cat > conftest.$ac_ext <<EOF
19605 #line 19606 "configure"
19606 #include "confdefs.h"
19607 /* Override any gcc2 internal prototype to avoid an error.  */
19608 /* We use char because int might match the return type of a gcc2
19609     builtin and then its argument prototype would still apply.  */
19610 char mdbm_set_chain();
19611
19612 int main() {
19613 mdbm_set_chain()
19614 ; return 0; }
19615 EOF
19616 if { (eval echo configure:19617: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19617   rm -rf conftest*
19618   eval "ac_cv_lib_$ac_lib_var=yes"
19619 else
19620   echo "configure: failed program was:" >&5
19621   cat conftest.$ac_ext >&5
19622   rm -rf conftest*
19623   eval "ac_cv_lib_$ac_lib_var=no"
19624 fi
19625 rm -f conftest*
19626 LIBS="$ac_save_LIBS"
19627
19628 fi
19629 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19630   echo "$ac_t""yes" 1>&6
19631   ol_cv_lib_mdbm=-lmdbm
19632 else
19633   echo "$ac_t""no" 1>&6
19634 ol_cv_lib_mdbm=no
19635 fi
19636
19637         
19638 fi
19639
19640         LIBS="$ol_LIBS"
19641
19642 fi
19643
19644 echo "$ac_t""$ol_cv_lib_mdbm" 1>&6
19645
19646
19647  for ac_hdr in mdbm.h
19648 do
19649 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
19650 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
19651 echo "configure:19652: checking for $ac_hdr" >&5
19652 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
19653   echo $ac_n "(cached) $ac_c" 1>&6
19654 else
19655   cat > conftest.$ac_ext <<EOF
19656 #line 19657 "configure"
19657 #include "confdefs.h"
19658 #include <$ac_hdr>
19659 EOF
19660 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
19661 { (eval echo configure:19662: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
19662 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
19663 if test -z "$ac_err"; then
19664   rm -rf conftest*
19665   eval "ac_cv_header_$ac_safe=yes"
19666 else
19667   echo "$ac_err" >&5
19668   echo "configure: failed program was:" >&5
19669   cat conftest.$ac_ext >&5
19670   rm -rf conftest*
19671   eval "ac_cv_header_$ac_safe=no"
19672 fi
19673 rm -f conftest*
19674 fi
19675 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
19676   echo "$ac_t""yes" 1>&6
19677     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
19678   cat >> confdefs.h <<EOF
19679 #define $ac_tr_hdr 1
19680 EOF
19681  
19682 else
19683   echo "$ac_t""no" 1>&6
19684 fi
19685 done
19686
19687  echo $ac_n "checking for db""... $ac_c" 1>&6
19688 echo "configure:19689: checking for db" >&5
19689 if eval "test \"\${ol_cv_mdbm+set}\" = set"; then
19690   echo $ac_n "(cached) $ac_c" 1>&6
19691 else
19692   
19693         if test $ol_cv_lib_mdbm = no -o $ac_cv_header_mdbm_h = no ; then
19694                 ol_cv_mdbm=no
19695         else
19696                 ol_cv_mdbm=yes
19697         fi
19698
19699 fi
19700
19701 echo "$ac_t""$ol_cv_mdbm" 1>&6
19702  if test $ol_cv_mdbm = yes ; then
19703         cat >> confdefs.h <<\EOF
19704 #define HAVE_MDBM 1
19705 EOF
19706
19707  fi
19708
19709
19710         if test $ol_cv_mdbm = yes ; then
19711                 ol_link_ldbm=mdbm
19712                 ol_with_ldbm_api=mdbm
19713                 if test $ol_cv_lib_mdbm != yes ; then
19714                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_mdbm"
19715                 fi
19716         fi
19717 fi
19718
19719 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = gdbm ; then
19720         echo $ac_n "checking for GDBM library""... $ac_c" 1>&6
19721 echo "configure:19722: checking for GDBM library" >&5
19722 if eval "test \"\${ol_cv_lib_gdbm+set}\" = set"; then
19723   echo $ac_n "(cached) $ac_c" 1>&6
19724 else
19725         ol_LIBS="$LIBS"
19726         echo $ac_n "checking for gdbm_open""... $ac_c" 1>&6
19727 echo "configure:19728: checking for gdbm_open" >&5
19728 if eval "test \"\${ac_cv_func_gdbm_open+set}\" = set"; then
19729   echo $ac_n "(cached) $ac_c" 1>&6
19730 else
19731   cat > conftest.$ac_ext <<EOF
19732 #line 19733 "configure"
19733 #include "confdefs.h"
19734 /* System header to define __stub macros and hopefully few prototypes,
19735     which can conflict with char gdbm_open(); below.  */
19736 #include <assert.h>
19737 /* Override any gcc2 internal prototype to avoid an error.  */
19738 /* We use char because int might match the return type of a gcc2
19739     builtin and then its argument prototype would still apply.  */
19740 char gdbm_open();
19741 char (*f)();
19742
19743 int main() {
19744
19745 /* The GNU C library defines this for functions which it implements
19746     to always fail with ENOSYS.  Some functions are actually named
19747     something starting with __ and the normal name is an alias.  */
19748 #if defined (__stub_gdbm_open) || defined (__stub___gdbm_open)
19749 choke me
19750 #else
19751 f = gdbm_open;
19752 #endif
19753
19754 ; return 0; }
19755 EOF
19756 if { (eval echo configure:19757: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19757   rm -rf conftest*
19758   eval "ac_cv_func_gdbm_open=yes"
19759 else
19760   echo "configure: failed program was:" >&5
19761   cat conftest.$ac_ext >&5
19762   rm -rf conftest*
19763   eval "ac_cv_func_gdbm_open=no"
19764 fi
19765 rm -f conftest*
19766 fi
19767
19768 if eval "test \"`echo '$ac_cv_func_'gdbm_open`\" = yes"; then
19769   echo "$ac_t""yes" 1>&6
19770   ol_cv_lib_gdbm=yes
19771 else
19772   echo "$ac_t""no" 1>&6
19773
19774                 echo $ac_n "checking for gdbm_open in -lgdbm""... $ac_c" 1>&6
19775 echo "configure:19776: checking for gdbm_open in -lgdbm" >&5
19776 ac_lib_var=`echo gdbm'_'gdbm_open | sed 'y%./+-:%__p__%'`
19777 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19778   echo $ac_n "(cached) $ac_c" 1>&6
19779 else
19780   ac_save_LIBS="$LIBS"
19781 LIBS="-lgdbm  $LIBS"
19782 cat > conftest.$ac_ext <<EOF
19783 #line 19784 "configure"
19784 #include "confdefs.h"
19785 /* Override any gcc2 internal prototype to avoid an error.  */
19786 /* We use char because int might match the return type of a gcc2
19787     builtin and then its argument prototype would still apply.  */
19788 char gdbm_open();
19789
19790 int main() {
19791 gdbm_open()
19792 ; return 0; }
19793 EOF
19794 if { (eval echo configure:19795: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19795   rm -rf conftest*
19796   eval "ac_cv_lib_$ac_lib_var=yes"
19797 else
19798   echo "configure: failed program was:" >&5
19799   cat conftest.$ac_ext >&5
19800   rm -rf conftest*
19801   eval "ac_cv_lib_$ac_lib_var=no"
19802 fi
19803 rm -f conftest*
19804 LIBS="$ac_save_LIBS"
19805
19806 fi
19807 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19808   echo "$ac_t""yes" 1>&6
19809   ol_cv_lib_gdbm=-lgdbm
19810 else
19811   echo "$ac_t""no" 1>&6
19812 ol_cv_lib_gdbm=no
19813 fi
19814
19815         
19816 fi
19817
19818         LIBS="$ol_LIBS"
19819
19820 fi
19821
19822 echo "$ac_t""$ol_cv_lib_gdbm" 1>&6
19823
19824
19825  for ac_hdr in gdbm.h
19826 do
19827 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
19828 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
19829 echo "configure:19830: checking for $ac_hdr" >&5
19830 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
19831   echo $ac_n "(cached) $ac_c" 1>&6
19832 else
19833   cat > conftest.$ac_ext <<EOF
19834 #line 19835 "configure"
19835 #include "confdefs.h"
19836 #include <$ac_hdr>
19837 EOF
19838 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
19839 { (eval echo configure:19840: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
19840 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
19841 if test -z "$ac_err"; then
19842   rm -rf conftest*
19843   eval "ac_cv_header_$ac_safe=yes"
19844 else
19845   echo "$ac_err" >&5
19846   echo "configure: failed program was:" >&5
19847   cat conftest.$ac_ext >&5
19848   rm -rf conftest*
19849   eval "ac_cv_header_$ac_safe=no"
19850 fi
19851 rm -f conftest*
19852 fi
19853 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
19854   echo "$ac_t""yes" 1>&6
19855     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
19856   cat >> confdefs.h <<EOF
19857 #define $ac_tr_hdr 1
19858 EOF
19859  
19860 else
19861   echo "$ac_t""no" 1>&6
19862 fi
19863 done
19864
19865  echo $ac_n "checking for db""... $ac_c" 1>&6
19866 echo "configure:19867: checking for db" >&5
19867 if eval "test \"\${ol_cv_gdbm+set}\" = set"; then
19868   echo $ac_n "(cached) $ac_c" 1>&6
19869 else
19870   
19871         if test $ol_cv_lib_gdbm = no -o $ac_cv_header_gdbm_h = no ; then
19872                 ol_cv_gdbm=no
19873         else
19874                 ol_cv_gdbm=yes
19875         fi
19876
19877 fi
19878
19879 echo "$ac_t""$ol_cv_gdbm" 1>&6
19880  if test $ol_cv_gdbm = yes ; then
19881         cat >> confdefs.h <<\EOF
19882 #define HAVE_GDBM 1
19883 EOF
19884
19885  fi
19886
19887
19888         if test $ol_cv_gdbm = yes ; then
19889                 ol_link_ldbm=gdbm
19890                 ol_with_ldbm_api=gdbm
19891
19892                 if test $ol_cv_lib_gdbm != yes ; then
19893                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_gdbm"
19894                 fi
19895         fi
19896 fi
19897
19898 if test $ol_with_ldbm_api = ndbm ; then
19899         echo $ac_n "checking for NDBM library""... $ac_c" 1>&6
19900 echo "configure:19901: checking for NDBM library" >&5
19901 if eval "test \"\${ol_cv_lib_ndbm+set}\" = set"; then
19902   echo $ac_n "(cached) $ac_c" 1>&6
19903 else
19904         ol_LIBS="$LIBS"
19905         echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
19906 echo "configure:19907: checking for dbm_open" >&5
19907 if eval "test \"\${ac_cv_func_dbm_open+set}\" = set"; then
19908   echo $ac_n "(cached) $ac_c" 1>&6
19909 else
19910   cat > conftest.$ac_ext <<EOF
19911 #line 19912 "configure"
19912 #include "confdefs.h"
19913 /* System header to define __stub macros and hopefully few prototypes,
19914     which can conflict with char dbm_open(); below.  */
19915 #include <assert.h>
19916 /* Override any gcc2 internal prototype to avoid an error.  */
19917 /* We use char because int might match the return type of a gcc2
19918     builtin and then its argument prototype would still apply.  */
19919 char dbm_open();
19920 char (*f)();
19921
19922 int main() {
19923
19924 /* The GNU C library defines this for functions which it implements
19925     to always fail with ENOSYS.  Some functions are actually named
19926     something starting with __ and the normal name is an alias.  */
19927 #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
19928 choke me
19929 #else
19930 f = dbm_open;
19931 #endif
19932
19933 ; return 0; }
19934 EOF
19935 if { (eval echo configure:19936: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19936   rm -rf conftest*
19937   eval "ac_cv_func_dbm_open=yes"
19938 else
19939   echo "configure: failed program was:" >&5
19940   cat conftest.$ac_ext >&5
19941   rm -rf conftest*
19942   eval "ac_cv_func_dbm_open=no"
19943 fi
19944 rm -f conftest*
19945 fi
19946
19947 if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then
19948   echo "$ac_t""yes" 1>&6
19949   ol_cv_lib_ndbm=yes
19950 else
19951   echo "$ac_t""no" 1>&6
19952
19953                 echo $ac_n "checking for dbm_open in -lndbm""... $ac_c" 1>&6
19954 echo "configure:19955: checking for dbm_open in -lndbm" >&5
19955 ac_lib_var=`echo ndbm'_'dbm_open | sed 'y%./+-:%__p__%'`
19956 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19957   echo $ac_n "(cached) $ac_c" 1>&6
19958 else
19959   ac_save_LIBS="$LIBS"
19960 LIBS="-lndbm  $LIBS"
19961 cat > conftest.$ac_ext <<EOF
19962 #line 19963 "configure"
19963 #include "confdefs.h"
19964 /* Override any gcc2 internal prototype to avoid an error.  */
19965 /* We use char because int might match the return type of a gcc2
19966     builtin and then its argument prototype would still apply.  */
19967 char dbm_open();
19968
19969 int main() {
19970 dbm_open()
19971 ; return 0; }
19972 EOF
19973 if { (eval echo configure:19974: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19974   rm -rf conftest*
19975   eval "ac_cv_lib_$ac_lib_var=yes"
19976 else
19977   echo "configure: failed program was:" >&5
19978   cat conftest.$ac_ext >&5
19979   rm -rf conftest*
19980   eval "ac_cv_lib_$ac_lib_var=no"
19981 fi
19982 rm -f conftest*
19983 LIBS="$ac_save_LIBS"
19984
19985 fi
19986 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19987   echo "$ac_t""yes" 1>&6
19988   ol_cv_lib_ndbm=-lndbm
19989 else
19990   echo "$ac_t""no" 1>&6
19991
19992                         echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
19993 echo "configure:19994: checking for dbm_open in -ldbm" >&5
19994 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-:%__p__%'`
19995 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19996   echo $ac_n "(cached) $ac_c" 1>&6
19997 else
19998   ac_save_LIBS="$LIBS"
19999 LIBS="-ldbm  $LIBS"
20000 cat > conftest.$ac_ext <<EOF
20001 #line 20002 "configure"
20002 #include "confdefs.h"
20003 /* Override any gcc2 internal prototype to avoid an error.  */
20004 /* We use char because int might match the return type of a gcc2
20005     builtin and then its argument prototype would still apply.  */
20006 char dbm_open();
20007
20008 int main() {
20009 dbm_open()
20010 ; return 0; }
20011 EOF
20012 if { (eval echo configure:20013: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20013   rm -rf conftest*
20014   eval "ac_cv_lib_$ac_lib_var=yes"
20015 else
20016   echo "configure: failed program was:" >&5
20017   cat conftest.$ac_ext >&5
20018   rm -rf conftest*
20019   eval "ac_cv_lib_$ac_lib_var=no"
20020 fi
20021 rm -f conftest*
20022 LIBS="$ac_save_LIBS"
20023
20024 fi
20025 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20026   echo "$ac_t""yes" 1>&6
20027   ol_cv_lib_ndbm=-ldbm
20028 else
20029   echo "$ac_t""no" 1>&6
20030 ol_cv_lib_ndbm=no
20031 fi
20032                 
20033 fi
20034
20035         
20036 fi
20037
20038         LIBS="$ol_LIBS"
20039
20040 fi
20041
20042 echo "$ac_t""$ol_cv_lib_ndbm" 1>&6
20043
20044
20045  for ac_hdr in ndbm.h
20046 do
20047 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
20048 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
20049 echo "configure:20050: checking for $ac_hdr" >&5
20050 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
20051   echo $ac_n "(cached) $ac_c" 1>&6
20052 else
20053   cat > conftest.$ac_ext <<EOF
20054 #line 20055 "configure"
20055 #include "confdefs.h"
20056 #include <$ac_hdr>
20057 EOF
20058 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20059 { (eval echo configure:20060: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20060 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20061 if test -z "$ac_err"; then
20062   rm -rf conftest*
20063   eval "ac_cv_header_$ac_safe=yes"
20064 else
20065   echo "$ac_err" >&5
20066   echo "configure: failed program was:" >&5
20067   cat conftest.$ac_ext >&5
20068   rm -rf conftest*
20069   eval "ac_cv_header_$ac_safe=no"
20070 fi
20071 rm -f conftest*
20072 fi
20073 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
20074   echo "$ac_t""yes" 1>&6
20075     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
20076   cat >> confdefs.h <<EOF
20077 #define $ac_tr_hdr 1
20078 EOF
20079  
20080 else
20081   echo "$ac_t""no" 1>&6
20082 fi
20083 done
20084
20085  echo $ac_n "checking for db""... $ac_c" 1>&6
20086 echo "configure:20087: checking for db" >&5
20087 if eval "test \"\${ol_cv_ndbm+set}\" = set"; then
20088   echo $ac_n "(cached) $ac_c" 1>&6
20089 else
20090   
20091         if test $ol_cv_lib_ndbm = no -o $ac_cv_header_ndbm_h = no ; then
20092                 ol_cv_ndbm=no
20093         else
20094                 ol_cv_ndbm=yes
20095         fi
20096
20097 fi
20098
20099 echo "$ac_t""$ol_cv_ndbm" 1>&6
20100  if test $ol_cv_ndbm = yes ; then
20101         cat >> confdefs.h <<\EOF
20102 #define HAVE_NDBM 1
20103 EOF
20104
20105  fi
20106
20107
20108         if test $ol_cv_ndbm = yes ; then
20109                 ol_link_ldbm=ndbm
20110                 ol_with_ldbm_api=ndbm
20111
20112                 if test $ol_cv_lib_ndbm != yes ; then
20113                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_ndbm"
20114                 fi
20115         fi
20116 fi
20117
20118 if test $ol_link_ldbm = no -a $ol_enable_ldbm != no ; then
20119         echo "configure: warning: could not find suitable LDBM backend" 1>&2
20120         if test $ol_enable_ldbm = yes ; then
20121                 { echo "configure: error: select appropriate LDBM options or disable" 1>&2; exit 1; }
20122         fi
20123
20124         echo "configure: warning: disabling LDBM" 1>&2
20125         ol_enable_ldbm=no
20126 fi
20127
20128
20129 if test $ol_enable_dynamic = yes -a $enable_shared = yes ; then
20130         BUILD_LIBS_DYNAMIC=shared
20131         cat >> confdefs.h <<\EOF
20132 #define LDAP_LIBS_DYNAMIC 1
20133 EOF
20134
20135         LTSTATIC=""
20136 else
20137         BUILD_LIBS_DYNAMIC=static
20138         LTSTATIC="-static"
20139 fi
20140
20141 if test $ol_enable_wrappers != no ; then
20142         for ac_hdr in tcpd.h
20143 do
20144 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
20145 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
20146 echo "configure:20147: checking for $ac_hdr" >&5
20147 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
20148   echo $ac_n "(cached) $ac_c" 1>&6
20149 else
20150   cat > conftest.$ac_ext <<EOF
20151 #line 20152 "configure"
20152 #include "confdefs.h"
20153 #include <$ac_hdr>
20154 EOF
20155 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20156 { (eval echo configure:20157: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20157 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20158 if test -z "$ac_err"; then
20159   rm -rf conftest*
20160   eval "ac_cv_header_$ac_safe=yes"
20161 else
20162   echo "$ac_err" >&5
20163   echo "configure: failed program was:" >&5
20164   cat conftest.$ac_ext >&5
20165   rm -rf conftest*
20166   eval "ac_cv_header_$ac_safe=no"
20167 fi
20168 rm -f conftest*
20169 fi
20170 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
20171   echo "$ac_t""yes" 1>&6
20172     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
20173   cat >> confdefs.h <<EOF
20174 #define $ac_tr_hdr 1
20175 EOF
20176  
20177                 echo $ac_n "checking for TCP wrappers library""... $ac_c" 1>&6
20178 echo "configure:20179: checking for TCP wrappers library" >&5
20179                 save_LIBS="$LIBS"
20180                 LIBS="$LIBS -lwrap"
20181                 cat > conftest.$ac_ext <<EOF
20182 #line 20183 "configure"
20183 #include "confdefs.h"
20184
20185 #include <tcpd.h>
20186 int allow_severity = 0;
20187 int deny_severity  = 0;
20188
20189 struct request_info *req;
20190                 
20191 int main() {
20192
20193 hosts_access(req)
20194                 
20195 ; return 0; }
20196 EOF
20197 if { (eval echo configure:20198: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20198   rm -rf conftest*
20199   echo "$ac_t""-lwrap" 1>&6
20200                 have_wrappers=yes
20201                 LIBS="$save_LIBS"
20202 else
20203   echo "configure: failed program was:" >&5
20204   cat conftest.$ac_ext >&5
20205   rm -rf conftest*
20206   
20207                                 LIBS="$LIBS -lnsl"
20208                 cat > conftest.$ac_ext <<EOF
20209 #line 20210 "configure"
20210 #include "confdefs.h"
20211
20212 #include <tcpd.h>
20213 int allow_severity = 0;
20214 int deny_severity  = 0;
20215
20216 struct request_info *req;
20217                 
20218 int main() {
20219
20220 hosts_access(req)
20221                 
20222 ; return 0; }
20223 EOF
20224 if { (eval echo configure:20225: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20225   rm -rf conftest*
20226   echo "$ac_t""-lwrap -lnsl" 1>&6
20227                 have_wrappers=yes
20228                 LIBS="$save_LIBS -lnsl"
20229 else
20230   echo "configure: failed program was:" >&5
20231   cat conftest.$ac_ext >&5
20232   rm -rf conftest*
20233   
20234                 echo "$ac_t""no" 1>&6
20235                 have_wrappers=no
20236                 LIBS=$save_LIBS
20237 fi
20238 rm -f conftest*
20239 fi
20240 rm -f conftest*
20241 else
20242   echo "$ac_t""no" 1>&6
20243 have_wrappers=no
20244 fi
20245 done
20246
20247
20248         if test $have_wrappers = yes ; then
20249                 cat >> confdefs.h <<\EOF
20250 #define HAVE_TCPD 1
20251 EOF
20252
20253                 WRAP_LIBS="-lwrap"
20254         elif test $ol_enable_wrappers = yes ; then
20255                 { echo "configure: error: could not find TCP wrappers, select apppropriate options or disable" 1>&2; exit 1; }
20256         else
20257                 echo "configure: warning: could not find TCP wrappers, support disabled" 1>&2
20258                 WRAP_LIBS=""
20259         fi
20260 fi
20261
20262 if test $ol_enable_syslog != no ; then
20263         echo $ac_n "checking for openlog""... $ac_c" 1>&6
20264 echo "configure:20265: checking for openlog" >&5
20265 if eval "test \"\${ac_cv_func_openlog+set}\" = set"; then
20266   echo $ac_n "(cached) $ac_c" 1>&6
20267 else
20268   cat > conftest.$ac_ext <<EOF
20269 #line 20270 "configure"
20270 #include "confdefs.h"
20271 /* System header to define __stub macros and hopefully few prototypes,
20272     which can conflict with char openlog(); below.  */
20273 #include <assert.h>
20274 /* Override any gcc2 internal prototype to avoid an error.  */
20275 /* We use char because int might match the return type of a gcc2
20276     builtin and then its argument prototype would still apply.  */
20277 char openlog();
20278 char (*f)();
20279
20280 int main() {
20281
20282 /* The GNU C library defines this for functions which it implements
20283     to always fail with ENOSYS.  Some functions are actually named
20284     something starting with __ and the normal name is an alias.  */
20285 #if defined (__stub_openlog) || defined (__stub___openlog)
20286 choke me
20287 #else
20288 f = openlog;
20289 #endif
20290
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_func_openlog=yes"
20296 else
20297   echo "configure: failed program was:" >&5
20298   cat conftest.$ac_ext >&5
20299   rm -rf conftest*
20300   eval "ac_cv_func_openlog=no"
20301 fi
20302 rm -f conftest*
20303 fi
20304
20305 if eval "test \"`echo '$ac_cv_func_'openlog`\" = yes"; then
20306   echo "$ac_t""yes" 1>&6
20307   :
20308 else
20309   echo "$ac_t""no" 1>&6
20310 fi
20311
20312         if test $ac_cv_func_openlog = no -a $ol_enable_syslog = yes; then
20313                 { echo "configure: error: could not find syslog" 1>&2; exit 1; }
20314         fi
20315         ol_enable_syslog=$ac_cv_func_openlog
20316 fi
20317
20318
20319 ol_link_sql=no
20320 if test $ol_enable_sql != no ; then
20321         for ac_hdr in sql.h sqlext.h
20322 do
20323 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
20324 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
20325 echo "configure:20326: checking for $ac_hdr" >&5
20326 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
20327   echo $ac_n "(cached) $ac_c" 1>&6
20328 else
20329   cat > conftest.$ac_ext <<EOF
20330 #line 20331 "configure"
20331 #include "confdefs.h"
20332 #include <$ac_hdr>
20333 EOF
20334 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20335 { (eval echo configure:20336: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20336 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20337 if test -z "$ac_err"; then
20338   rm -rf conftest*
20339   eval "ac_cv_header_$ac_safe=yes"
20340 else
20341   echo "$ac_err" >&5
20342   echo "configure: failed program was:" >&5
20343   cat conftest.$ac_ext >&5
20344   rm -rf conftest*
20345   eval "ac_cv_header_$ac_safe=no"
20346 fi
20347 rm -f conftest*
20348 fi
20349 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
20350   echo "$ac_t""yes" 1>&6
20351     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
20352   cat >> confdefs.h <<EOF
20353 #define $ac_tr_hdr 1
20354 EOF
20355  
20356 else
20357   echo "$ac_t""no" 1>&6
20358 { echo "configure: error: could not locate SQL headers" 1>&2; exit 1; }
20359         
20360 fi
20361 done
20362
20363
20364         echo $ac_n "checking for SQLDriverConnect in -liodbc""... $ac_c" 1>&6
20365 echo "configure:20366: checking for SQLDriverConnect in -liodbc" >&5
20366 ac_lib_var=`echo iodbc'_'SQLDriverConnect | sed 'y%./+-:%__p__%'`
20367 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20368   echo $ac_n "(cached) $ac_c" 1>&6
20369 else
20370   ac_save_LIBS="$LIBS"
20371 LIBS="-liodbc  $LIBS"
20372 cat > conftest.$ac_ext <<EOF
20373 #line 20374 "configure"
20374 #include "confdefs.h"
20375 /* Override any gcc2 internal prototype to avoid an error.  */
20376 /* We use char because int might match the return type of a gcc2
20377     builtin and then its argument prototype would still apply.  */
20378 char SQLDriverConnect();
20379
20380 int main() {
20381 SQLDriverConnect()
20382 ; return 0; }
20383 EOF
20384 if { (eval echo configure:20385: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20385   rm -rf conftest*
20386   eval "ac_cv_lib_$ac_lib_var=yes"
20387 else
20388   echo "configure: failed program was:" >&5
20389   cat conftest.$ac_ext >&5
20390   rm -rf conftest*
20391   eval "ac_cv_lib_$ac_lib_var=no"
20392 fi
20393 rm -f conftest*
20394 LIBS="$ac_save_LIBS"
20395
20396 fi
20397 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20398   echo "$ac_t""yes" 1>&6
20399   have_iodbc=yes
20400 else
20401   echo "$ac_t""no" 1>&6
20402 have_iodbc=no
20403 fi
20404
20405         if test $have_iodbc = yes ; then
20406                 ol_link_sql="-liodbc"
20407         else
20408                 echo $ac_n "checking for SQLDriverConnect in -lodbc""... $ac_c" 1>&6
20409 echo "configure:20410: checking for SQLDriverConnect in -lodbc" >&5
20410 ac_lib_var=`echo odbc'_'SQLDriverConnect | sed 'y%./+-:%__p__%'`
20411 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20412   echo $ac_n "(cached) $ac_c" 1>&6
20413 else
20414   ac_save_LIBS="$LIBS"
20415 LIBS="-lodbc  $LIBS"
20416 cat > conftest.$ac_ext <<EOF
20417 #line 20418 "configure"
20418 #include "confdefs.h"
20419 /* Override any gcc2 internal prototype to avoid an error.  */
20420 /* We use char because int might match the return type of a gcc2
20421     builtin and then its argument prototype would still apply.  */
20422 char SQLDriverConnect();
20423
20424 int main() {
20425 SQLDriverConnect()
20426 ; return 0; }
20427 EOF
20428 if { (eval echo configure:20429: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20429   rm -rf conftest*
20430   eval "ac_cv_lib_$ac_lib_var=yes"
20431 else
20432   echo "configure: failed program was:" >&5
20433   cat conftest.$ac_ext >&5
20434   rm -rf conftest*
20435   eval "ac_cv_lib_$ac_lib_var=no"
20436 fi
20437 rm -f conftest*
20438 LIBS="$ac_save_LIBS"
20439
20440 fi
20441 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20442   echo "$ac_t""yes" 1>&6
20443   have_odbc=yes
20444 else
20445   echo "$ac_t""no" 1>&6
20446 have_odbc=no
20447 fi
20448
20449                 if test $have_odbc = yes ; then
20450                         ol_link_sql="-lodbc"
20451                 fi
20452         fi
20453
20454         if test $ol_link_sql != no ; then
20455                 SLAPD_SQL_LIBS="$ol_link_sql"
20456
20457         elif test $ol_enable_sql != auto ; then
20458                 { echo "configure: error: could not locate suitable ODBC library" 1>&2; exit 1; }
20459         fi
20460 fi
20461
20462 ol_link_sasl=no
20463 ol_link_spasswd=no
20464 if test $ol_with_cyrus_sasl != no ; then
20465         for ac_hdr in sasl/sasl.h sasl.h
20466 do
20467 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
20468 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
20469 echo "configure:20470: checking for $ac_hdr" >&5
20470 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
20471   echo $ac_n "(cached) $ac_c" 1>&6
20472 else
20473   cat > conftest.$ac_ext <<EOF
20474 #line 20475 "configure"
20475 #include "confdefs.h"
20476 #include <$ac_hdr>
20477 EOF
20478 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20479 { (eval echo configure:20480: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20480 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20481 if test -z "$ac_err"; then
20482   rm -rf conftest*
20483   eval "ac_cv_header_$ac_safe=yes"
20484 else
20485   echo "$ac_err" >&5
20486   echo "configure: failed program was:" >&5
20487   cat conftest.$ac_ext >&5
20488   rm -rf conftest*
20489   eval "ac_cv_header_$ac_safe=no"
20490 fi
20491 rm -f conftest*
20492 fi
20493 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
20494   echo "$ac_t""yes" 1>&6
20495     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
20496   cat >> confdefs.h <<EOF
20497 #define $ac_tr_hdr 1
20498 EOF
20499  
20500 else
20501   echo "$ac_t""no" 1>&6
20502 fi
20503 done
20504
20505
20506         if test $ac_cv_header_sasl_sasl_h = yes -o $ac_cv_header_sasl_h = yes; then
20507                 echo $ac_n "checking for sasl_client_init in -lsasl2""... $ac_c" 1>&6
20508 echo "configure:20509: checking for sasl_client_init in -lsasl2" >&5
20509 ac_lib_var=`echo sasl2'_'sasl_client_init | sed 'y%./+-:%__p__%'`
20510 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20511   echo $ac_n "(cached) $ac_c" 1>&6
20512 else
20513   ac_save_LIBS="$LIBS"
20514 LIBS="-lsasl2  $LIBS"
20515 cat > conftest.$ac_ext <<EOF
20516 #line 20517 "configure"
20517 #include "confdefs.h"
20518 /* Override any gcc2 internal prototype to avoid an error.  */
20519 /* We use char because int might match the return type of a gcc2
20520     builtin and then its argument prototype would still apply.  */
20521 char sasl_client_init();
20522
20523 int main() {
20524 sasl_client_init()
20525 ; return 0; }
20526 EOF
20527 if { (eval echo configure:20528: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20528   rm -rf conftest*
20529   eval "ac_cv_lib_$ac_lib_var=yes"
20530 else
20531   echo "configure: failed program was:" >&5
20532   cat conftest.$ac_ext >&5
20533   rm -rf conftest*
20534   eval "ac_cv_lib_$ac_lib_var=no"
20535 fi
20536 rm -f conftest*
20537 LIBS="$ac_save_LIBS"
20538
20539 fi
20540 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20541   echo "$ac_t""yes" 1>&6
20542   ol_link_sasl="-lsasl2"
20543 else
20544   echo "$ac_t""no" 1>&6
20545 echo $ac_n "checking for sasl_client_init in -lsasl""... $ac_c" 1>&6
20546 echo "configure:20547: checking for sasl_client_init in -lsasl" >&5
20547 ac_lib_var=`echo sasl'_'sasl_client_init | sed 'y%./+-:%__p__%'`
20548 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20549   echo $ac_n "(cached) $ac_c" 1>&6
20550 else
20551   ac_save_LIBS="$LIBS"
20552 LIBS="-lsasl  $LIBS"
20553 cat > conftest.$ac_ext <<EOF
20554 #line 20555 "configure"
20555 #include "confdefs.h"
20556 /* Override any gcc2 internal prototype to avoid an error.  */
20557 /* We use char because int might match the return type of a gcc2
20558     builtin and then its argument prototype would still apply.  */
20559 char sasl_client_init();
20560
20561 int main() {
20562 sasl_client_init()
20563 ; return 0; }
20564 EOF
20565 if { (eval echo configure:20566: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20566   rm -rf conftest*
20567   eval "ac_cv_lib_$ac_lib_var=yes"
20568 else
20569   echo "configure: failed program was:" >&5
20570   cat conftest.$ac_ext >&5
20571   rm -rf conftest*
20572   eval "ac_cv_lib_$ac_lib_var=no"
20573 fi
20574 rm -f conftest*
20575 LIBS="$ac_save_LIBS"
20576
20577 fi
20578 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20579   echo "$ac_t""yes" 1>&6
20580   ol_link_sasl="-lsasl"
20581 else
20582   echo "$ac_t""no" 1>&6
20583 fi
20584
20585 fi
20586
20587         fi
20588
20589         if test $ol_link_sasl = no ; then
20590                 if test $ol_with_cyrus_sasl != auto ; then
20591                         { echo "configure: error: Could not locate Cyrus SASL" 1>&2; exit 1; }
20592                 else
20593                         echo "configure: warning: Could not locate Cyrus SASL" 1>&2
20594                         echo "configure: warning: SASL authentication not supported!" 1>&2
20595                         if test $ol_link_tls = no ; then
20596                                 echo "configure: warning: Strong authentication not supported!" 1>&2
20597                         fi
20598                 fi
20599         else
20600                 echo $ac_n "checking Cyrus SASL library version""... $ac_c" 1>&6
20601 echo "configure:20602: checking Cyrus SASL library version" >&5
20602 if eval "test \"\${ol_cv_sasl_compat+set}\" = set"; then
20603   echo $ac_n "(cached) $ac_c" 1>&6
20604 else
20605   
20606         cat > conftest.$ac_ext <<EOF
20607 #line 20608 "configure"
20608 #include "confdefs.h"
20609
20610 #ifdef HAVE_SASL_SASL_H
20611 #include <sasl/sasl.h>
20612 #else
20613 #include <sasl.h>
20614 #endif
20615
20616 /* Require 2.1.15+ */
20617 #if SASL_VERSION_MAJOR == 2  && SASL_VERSION_MINOR > 1
20618         char *__sasl_compat = "2.2+ or better okay (we guess)";
20619 #elif SASL_VERSION_MAJOR == 2  && SASL_VERSION_MINOR == 1 \
20620         && SASL_VERSION_STEP >=15
20621         char *__sasl_compat = "2.1.15+ or better okay";
20622 #endif
20623         
20624 EOF
20625 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20626   egrep "__sasl_compat" >/dev/null 2>&1; then
20627   rm -rf conftest*
20628   ol_cv_sasl_compat=yes
20629 else
20630   rm -rf conftest*
20631   ol_cv_sasl_compat=no
20632 fi
20633 rm -f conftest*
20634
20635 fi
20636
20637 echo "$ac_t""$ol_cv_sasl_compat" 1>&6
20638
20639                 if test $ol_cv_sasl_compat = no ; then
20640                         ol_link_sasl=no
20641                         { echo "configure: error: Cyrus SASL library located but is incompatible" 1>&2; exit 1; }
20642                 fi
20643
20644                 cat >> confdefs.h <<\EOF
20645 #define HAVE_CYRUS_SASL 1
20646 EOF
20647
20648                 SASL_LIBS="$ol_link_sasl"
20649                 if test $ol_enable_spasswd != no ; then
20650                         ol_link_spasswd=yes
20651                 fi
20652
20653                 ac_save_LIBS="$LIBS"
20654                 LIBS="$LIBS $ol_link_sasl"
20655                 echo $ac_n "checking for sasl_version""... $ac_c" 1>&6
20656 echo "configure:20657: checking for sasl_version" >&5
20657 if eval "test \"\${ac_cv_func_sasl_version+set}\" = set"; then
20658   echo $ac_n "(cached) $ac_c" 1>&6
20659 else
20660   cat > conftest.$ac_ext <<EOF
20661 #line 20662 "configure"
20662 #include "confdefs.h"
20663 /* System header to define __stub macros and hopefully few prototypes,
20664     which can conflict with char sasl_version(); below.  */
20665 #include <assert.h>
20666 /* Override any gcc2 internal prototype to avoid an error.  */
20667 /* We use char because int might match the return type of a gcc2
20668     builtin and then its argument prototype would still apply.  */
20669 char sasl_version();
20670 char (*f)();
20671
20672 int main() {
20673
20674 /* The GNU C library defines this for functions which it implements
20675     to always fail with ENOSYS.  Some functions are actually named
20676     something starting with __ and the normal name is an alias.  */
20677 #if defined (__stub_sasl_version) || defined (__stub___sasl_version)
20678 choke me
20679 #else
20680 f = sasl_version;
20681 #endif
20682
20683 ; return 0; }
20684 EOF
20685 if { (eval echo configure:20686: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20686   rm -rf conftest*
20687   eval "ac_cv_func_sasl_version=yes"
20688 else
20689   echo "configure: failed program was:" >&5
20690   cat conftest.$ac_ext >&5
20691   rm -rf conftest*
20692   eval "ac_cv_func_sasl_version=no"
20693 fi
20694 rm -f conftest*
20695 fi
20696
20697 if eval "test \"`echo '$ac_cv_func_'sasl_version`\" = yes"; then
20698   echo "$ac_t""yes" 1>&6
20699   cat >> confdefs.h <<\EOF
20700 #define HAVE_SASL_VERSION 1
20701 EOF
20702
20703 else
20704   echo "$ac_t""no" 1>&6
20705 fi
20706
20707                 LIBS="$ac_save_LIBS"
20708         fi
20709
20710 else
20711         echo "configure: warning: SASL authentication not supported!" 1>&2
20712         if test $ol_link_tls = no ; then
20713                 echo "configure: warning: Strong authentication not supported!" 1>&2
20714         fi
20715 fi
20716
20717 if test $cross_compiling != yes -a "$ac_cv_mingw32" != yes ; then
20718         dev=no
20719         if test -r /dev/urandom ; then
20720                 dev="/dev/urandom";
20721         elif test -r /idev/urandom ; then
20722                 dev="/idev/urandom";
20723         elif test -r /dev/srandom ; then
20724                 dev="/dev/srandom";
20725         elif test -r /dev/random ; then
20726                 dev="/dev/random";
20727         elif test -r /idev/random ; then
20728                 dev="/idev/random";
20729         fi
20730
20731         if test $dev != no ; then
20732                 cat >> confdefs.h <<EOF
20733 #define URANDOM_DEVICE "$dev"
20734 EOF
20735
20736         fi
20737 fi
20738
20739 ol_link_fetch=no
20740 if test $ol_with_fetch != no ; then
20741         ol_LIBS=$LIBS
20742 LIBS="-lfetch -lcom_err $LIBS"
20743 echo $ac_n "checking fetch(3) library""... $ac_c" 1>&6
20744 echo "configure:20745: checking fetch(3) library" >&5
20745 if eval "test \"\${ol_cv_lib_fetch+set}\" = set"; then
20746   echo $ac_n "(cached) $ac_c" 1>&6
20747 else
20748   
20749         cat > conftest.$ac_ext <<EOF
20750 #line 20751 "configure"
20751 #include "confdefs.h"
20752
20753 #include <sys/param.h>
20754 #include <stdio.h>
20755 #include <fetch.h>
20756 int main() {
20757 struct url *u = fetchParseURL("file:///"); 
20758 ; return 0; }
20759 EOF
20760 if { (eval echo configure:20761: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20761   rm -rf conftest*
20762   ol_cv_lib_fetch=yes
20763 else
20764   echo "configure: failed program was:" >&5
20765   cat conftest.$ac_ext >&5
20766   rm -rf conftest*
20767   ol_cv_lib_fetch=no
20768 fi
20769 rm -f conftest*
20770 fi
20771
20772 echo "$ac_t""$ol_cv_lib_fetch" 1>&6
20773 LIBS=$ol_LIBS
20774 if test $ol_cv_lib_fetch != no ; then
20775         ol_link_fetch="-lfetch -lcom_err"
20776         cat >> confdefs.h <<\EOF
20777 #define HAVE_FETCH 1
20778 EOF
20779
20780 fi
20781
20782
20783         if test $ol_cv_lib_fetch != no ; then
20784                 LUTIL_LIBS="$LUTIL_LIBS $ol_link_fetch"
20785                 ol_link_fetch=freebsd
20786
20787         elif test $ol_with_fetch != auto ; then
20788                 { echo "configure: error: no suitable API for --with-fetch=$ol_with_fetch" 1>&2; exit 1; }
20789         fi 
20790 fi
20791
20792 if test $ol_enable_crypt != no ; then
20793         save_LIBS="$LIBS"
20794         LIBS="$TLS_LIBS $LIBS"
20795
20796         echo $ac_n "checking for crypt""... $ac_c" 1>&6
20797 echo "configure:20798: checking for crypt" >&5
20798 if eval "test \"\${ac_cv_func_crypt+set}\" = set"; then
20799   echo $ac_n "(cached) $ac_c" 1>&6
20800 else
20801   cat > conftest.$ac_ext <<EOF
20802 #line 20803 "configure"
20803 #include "confdefs.h"
20804 /* System header to define __stub macros and hopefully few prototypes,
20805     which can conflict with char crypt(); below.  */
20806 #include <assert.h>
20807 /* Override any gcc2 internal prototype to avoid an error.  */
20808 /* We use char because int might match the return type of a gcc2
20809     builtin and then its argument prototype would still apply.  */
20810 char crypt();
20811 char (*f)();
20812
20813 int main() {
20814
20815 /* The GNU C library defines this for functions which it implements
20816     to always fail with ENOSYS.  Some functions are actually named
20817     something starting with __ and the normal name is an alias.  */
20818 #if defined (__stub_crypt) || defined (__stub___crypt)
20819 choke me
20820 #else
20821 f = crypt;
20822 #endif
20823
20824 ; return 0; }
20825 EOF
20826 if { (eval echo configure:20827: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20827   rm -rf conftest*
20828   eval "ac_cv_func_crypt=yes"
20829 else
20830   echo "configure: failed program was:" >&5
20831   cat conftest.$ac_ext >&5
20832   rm -rf conftest*
20833   eval "ac_cv_func_crypt=no"
20834 fi
20835 rm -f conftest*
20836 fi
20837
20838 if eval "test \"`echo '$ac_cv_func_'crypt`\" = yes"; then
20839   echo "$ac_t""yes" 1>&6
20840   have_crypt=yes
20841 else
20842   echo "$ac_t""no" 1>&6
20843
20844                 LIBS="$save_LIBS"
20845                 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
20846 echo "configure:20847: checking for crypt in -lcrypt" >&5
20847 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-:%__p__%'`
20848 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20849   echo $ac_n "(cached) $ac_c" 1>&6
20850 else
20851   ac_save_LIBS="$LIBS"
20852 LIBS="-lcrypt  $LIBS"
20853 cat > conftest.$ac_ext <<EOF
20854 #line 20855 "configure"
20855 #include "confdefs.h"
20856 /* Override any gcc2 internal prototype to avoid an error.  */
20857 /* We use char because int might match the return type of a gcc2
20858     builtin and then its argument prototype would still apply.  */
20859 char crypt();
20860
20861 int main() {
20862 crypt()
20863 ; return 0; }
20864 EOF
20865 if { (eval echo configure:20866: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20866   rm -rf conftest*
20867   eval "ac_cv_lib_$ac_lib_var=yes"
20868 else
20869   echo "configure: failed program was:" >&5
20870   cat conftest.$ac_ext >&5
20871   rm -rf conftest*
20872   eval "ac_cv_lib_$ac_lib_var=no"
20873 fi
20874 rm -f conftest*
20875 LIBS="$ac_save_LIBS"
20876
20877 fi
20878 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20879   echo "$ac_t""yes" 1>&6
20880   LUTIL_LIBS="$LUTIL_LIBS -lcrypt"
20881                         have_crypt=yes
20882 else
20883   echo "$ac_t""no" 1>&6
20884 have_crypt=no
20885 fi
20886
20887 fi
20888
20889
20890         LIBS="$save_LIBS"
20891
20892         if test $have_crypt = yes ; then
20893                 cat >> confdefs.h <<\EOF
20894 #define HAVE_CRYPT 1
20895 EOF
20896
20897         else
20898                 echo "configure: warning: could not find crypt" 1>&2
20899                 if test $ol_enable_crypt = yes ; then
20900                         { echo "configure: error: could not find crypt, select appropriate options or disable" 1>&2; exit 1; }
20901                 fi
20902
20903                 echo "configure: warning: disabling crypt support" 1>&2
20904                 ol_enable_crypt=no
20905         fi
20906 fi
20907
20908 if test $ol_enable_proctitle != no ; then
20909         echo $ac_n "checking for setproctitle""... $ac_c" 1>&6
20910 echo "configure:20911: checking for setproctitle" >&5
20911 if eval "test \"\${ac_cv_func_setproctitle+set}\" = set"; then
20912   echo $ac_n "(cached) $ac_c" 1>&6
20913 else
20914   cat > conftest.$ac_ext <<EOF
20915 #line 20916 "configure"
20916 #include "confdefs.h"
20917 /* System header to define __stub macros and hopefully few prototypes,
20918     which can conflict with char setproctitle(); below.  */
20919 #include <assert.h>
20920 /* Override any gcc2 internal prototype to avoid an error.  */
20921 /* We use char because int might match the return type of a gcc2
20922     builtin and then its argument prototype would still apply.  */
20923 char setproctitle();
20924 char (*f)();
20925
20926 int main() {
20927
20928 /* The GNU C library defines this for functions which it implements
20929     to always fail with ENOSYS.  Some functions are actually named
20930     something starting with __ and the normal name is an alias.  */
20931 #if defined (__stub_setproctitle) || defined (__stub___setproctitle)
20932 choke me
20933 #else
20934 f = setproctitle;
20935 #endif
20936
20937 ; return 0; }
20938 EOF
20939 if { (eval echo configure:20940: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20940   rm -rf conftest*
20941   eval "ac_cv_func_setproctitle=yes"
20942 else
20943   echo "configure: failed program was:" >&5
20944   cat conftest.$ac_ext >&5
20945   rm -rf conftest*
20946   eval "ac_cv_func_setproctitle=no"
20947 fi
20948 rm -f conftest*
20949 fi
20950
20951 if eval "test \"`echo '$ac_cv_func_'setproctitle`\" = yes"; then
20952   echo "$ac_t""yes" 1>&6
20953   have_setproctitle=yes
20954 else
20955   echo "$ac_t""no" 1>&6
20956
20957                 echo $ac_n "checking for setproctitle in -lutil""... $ac_c" 1>&6
20958 echo "configure:20959: checking for setproctitle in -lutil" >&5
20959 ac_lib_var=`echo util'_'setproctitle | sed 'y%./+-:%__p__%'`
20960 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20961   echo $ac_n "(cached) $ac_c" 1>&6
20962 else
20963   ac_save_LIBS="$LIBS"
20964 LIBS="-lutil  $LIBS"
20965 cat > conftest.$ac_ext <<EOF
20966 #line 20967 "configure"
20967 #include "confdefs.h"
20968 /* Override any gcc2 internal prototype to avoid an error.  */
20969 /* We use char because int might match the return type of a gcc2
20970     builtin and then its argument prototype would still apply.  */
20971 char setproctitle();
20972
20973 int main() {
20974 setproctitle()
20975 ; return 0; }
20976 EOF
20977 if { (eval echo configure:20978: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20978   rm -rf conftest*
20979   eval "ac_cv_lib_$ac_lib_var=yes"
20980 else
20981   echo "configure: failed program was:" >&5
20982   cat conftest.$ac_ext >&5
20983   rm -rf conftest*
20984   eval "ac_cv_lib_$ac_lib_var=no"
20985 fi
20986 rm -f conftest*
20987 LIBS="$ac_save_LIBS"
20988
20989 fi
20990 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20991   echo "$ac_t""yes" 1>&6
20992   have_setproctitle=yes
20993                         LUTIL_LIBS="$LUTIL_LIBS -lutil"
20994 else
20995   echo "$ac_t""no" 1>&6
20996 have_setproctitle=no
20997                         LIBOBJS="$LIBOBJS setproctitle.o"
20998                         LIBSRCS="$LIBSRCS setproctitle.c"
20999 fi
21000
21001 fi
21002
21003
21004         if test $have_setproctitle = yes ; then
21005                 cat >> confdefs.h <<\EOF
21006 #define HAVE_SETPROCTITLE 1
21007 EOF
21008
21009         fi
21010 fi
21011
21012 if test $ol_enable_slp != no ; then
21013         for ac_hdr in slp.h 
21014 do
21015 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
21016 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
21017 echo "configure:21018: checking for $ac_hdr" >&5
21018 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
21019   echo $ac_n "(cached) $ac_c" 1>&6
21020 else
21021   cat > conftest.$ac_ext <<EOF
21022 #line 21023 "configure"
21023 #include "confdefs.h"
21024 #include <$ac_hdr>
21025 EOF
21026 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
21027 { (eval echo configure:21028: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
21028 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
21029 if test -z "$ac_err"; then
21030   rm -rf conftest*
21031   eval "ac_cv_header_$ac_safe=yes"
21032 else
21033   echo "$ac_err" >&5
21034   echo "configure: failed program was:" >&5
21035   cat conftest.$ac_ext >&5
21036   rm -rf conftest*
21037   eval "ac_cv_header_$ac_safe=no"
21038 fi
21039 rm -f conftest*
21040 fi
21041 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
21042   echo "$ac_t""yes" 1>&6
21043     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
21044   cat >> confdefs.h <<EOF
21045 #define $ac_tr_hdr 1
21046 EOF
21047  
21048 else
21049   echo "$ac_t""no" 1>&6
21050 fi
21051 done
21052
21053
21054         if test $ac_cv_header_slp_h = yes ; then
21055                 echo $ac_n "checking for SLPOpen in -lslp""... $ac_c" 1>&6
21056 echo "configure:21057: checking for SLPOpen in -lslp" >&5
21057 ac_lib_var=`echo slp'_'SLPOpen | sed 'y%./+-:%__p__%'`
21058 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
21059   echo $ac_n "(cached) $ac_c" 1>&6
21060 else
21061   ac_save_LIBS="$LIBS"
21062 LIBS="-lslp  $LIBS"
21063 cat > conftest.$ac_ext <<EOF
21064 #line 21065 "configure"
21065 #include "confdefs.h"
21066 /* Override any gcc2 internal prototype to avoid an error.  */
21067 /* We use char because int might match the return type of a gcc2
21068     builtin and then its argument prototype would still apply.  */
21069 char SLPOpen();
21070
21071 int main() {
21072 SLPOpen()
21073 ; return 0; }
21074 EOF
21075 if { (eval echo configure:21076: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21076   rm -rf conftest*
21077   eval "ac_cv_lib_$ac_lib_var=yes"
21078 else
21079   echo "configure: failed program was:" >&5
21080   cat conftest.$ac_ext >&5
21081   rm -rf conftest*
21082   eval "ac_cv_lib_$ac_lib_var=no"
21083 fi
21084 rm -f conftest*
21085 LIBS="$ac_save_LIBS"
21086
21087 fi
21088 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
21089   echo "$ac_t""yes" 1>&6
21090   have_slp=yes
21091 else
21092   echo "$ac_t""no" 1>&6
21093 have_slp=no
21094 fi
21095
21096                 if test $have_slp = yes ; then
21097                         cat >> confdefs.h <<\EOF
21098 #define HAVE_SLP 1
21099 EOF
21100
21101                         SLAPD_SLP_LIBS=-lslp
21102                 fi
21103
21104         elif test $ol_enable_slp = yes ; then
21105                 { echo "configure: error: SLP not found" 1>&2; exit 1; }
21106         fi
21107 fi
21108
21109
21110 echo $ac_n "checking long long""... $ac_c" 1>&6
21111 echo "configure:21112: checking long long" >&5
21112 if eval "test \"\${ol_cv_type_long_long+set}\" = set"; then
21113   echo $ac_n "(cached) $ac_c" 1>&6
21114 else
21115   
21116         cat > conftest.$ac_ext <<EOF
21117 #line 21118 "configure"
21118 #include "confdefs.h"
21119
21120 int main() {
21121 long long x;
21122 ; return 0; }
21123 EOF
21124 if { (eval echo configure:21125: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21125   rm -rf conftest*
21126   ol_cv_type_long_long=yes
21127 else
21128   echo "configure: failed program was:" >&5
21129   cat conftest.$ac_ext >&5
21130   rm -rf conftest*
21131   ol_cv_type_long_long=no
21132 fi
21133 rm -f conftest*
21134 fi
21135
21136 echo "$ac_t""$ol_cv_type_long_long" 1>&6
21137 if test $ol_cv_type_long_long = yes; then
21138         cat >> confdefs.h <<\EOF
21139 #define HAVE_LONG_LONG 1
21140 EOF
21141
21142 fi
21143
21144 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
21145 echo "configure:21146: checking for ANSI C header files" >&5
21146 if eval "test \"\${ac_cv_header_stdc+set}\" = set"; then
21147   echo $ac_n "(cached) $ac_c" 1>&6
21148 else
21149   cat > conftest.$ac_ext <<EOF
21150 #line 21151 "configure"
21151 #include "confdefs.h"
21152 #include <stdlib.h>
21153 #include <stdarg.h>
21154 #include <string.h>
21155 #include <float.h>
21156 EOF
21157 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
21158 { (eval echo configure:21159: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
21159 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
21160 if test -z "$ac_err"; then
21161   rm -rf conftest*
21162   ac_cv_header_stdc=yes
21163 else
21164   echo "$ac_err" >&5
21165   echo "configure: failed program was:" >&5
21166   cat conftest.$ac_ext >&5
21167   rm -rf conftest*
21168   ac_cv_header_stdc=no
21169 fi
21170 rm -f conftest*
21171
21172 if test $ac_cv_header_stdc = yes; then
21173   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
21174 cat > conftest.$ac_ext <<EOF
21175 #line 21176 "configure"
21176 #include "confdefs.h"
21177 #include <string.h>
21178 EOF
21179 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21180   egrep "memchr" >/dev/null 2>&1; then
21181   :
21182 else
21183   rm -rf conftest*
21184   ac_cv_header_stdc=no
21185 fi
21186 rm -f conftest*
21187
21188 fi
21189
21190 if test $ac_cv_header_stdc = yes; then
21191   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
21192 cat > conftest.$ac_ext <<EOF
21193 #line 21194 "configure"
21194 #include "confdefs.h"
21195 #include <stdlib.h>
21196 EOF
21197 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21198   egrep "free" >/dev/null 2>&1; then
21199   :
21200 else
21201   rm -rf conftest*
21202   ac_cv_header_stdc=no
21203 fi
21204 rm -f conftest*
21205
21206 fi
21207
21208 if test $ac_cv_header_stdc = yes; then
21209   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
21210 if test "$cross_compiling" = yes; then
21211   :
21212 else
21213   cat > conftest.$ac_ext <<EOF
21214 #line 21215 "configure"
21215 #include "confdefs.h"
21216 #include <ctype.h>
21217 #if ((' ' & 0x0FF) == 0x020)
21218 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
21219 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
21220 #else
21221 #define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
21222  || ('j' <= (c) && (c) <= 'r') \
21223  || ('s' <= (c) && (c) <= 'z'))
21224 #define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
21225 #endif
21226 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
21227 int main () { int i; for (i = 0; i < 256; i++)
21228 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
21229 exit (0); }
21230
21231 EOF
21232 if { (eval echo configure:21233: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
21233 then
21234   :
21235 else
21236   echo "configure: failed program was:" >&5
21237   cat conftest.$ac_ext >&5
21238   rm -fr conftest*
21239   ac_cv_header_stdc=no
21240 fi
21241 rm -fr conftest*
21242 fi
21243
21244 fi
21245 fi
21246
21247 echo "$ac_t""$ac_cv_header_stdc" 1>&6
21248 if test $ac_cv_header_stdc = yes; then
21249   cat >> confdefs.h <<\EOF
21250 #define STDC_HEADERS 1
21251 EOF
21252
21253 fi
21254
21255 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
21256 echo "configure:21257: checking for mode_t" >&5
21257 if eval "test \"\${ac_cv_type_mode_t+set}\" = set"; then
21258   echo $ac_n "(cached) $ac_c" 1>&6
21259 else
21260   cat > conftest.$ac_ext <<EOF
21261 #line 21262 "configure"
21262 #include "confdefs.h"
21263 #include <sys/types.h>
21264 #if STDC_HEADERS
21265 #include <stdlib.h>
21266 #include <stddef.h>
21267 #endif
21268
21269 EOF
21270 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21271   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
21272   rm -rf conftest*
21273   eval "ac_cv_type_mode_t=yes"
21274 else
21275   rm -rf conftest*
21276   eval "ac_cv_type_mode_t=no"
21277 fi
21278 rm -f conftest*
21279
21280 fi
21281 if eval "test \"`echo '$ac_cv_type_'mode_t`\" = yes"; then
21282   echo "$ac_t""yes" 1>&6
21283 else
21284   echo "$ac_t""no" 1>&6
21285   cat >> confdefs.h <<EOF
21286 #define mode_t int
21287 EOF
21288
21289 fi
21290
21291 echo $ac_n "checking for off_t""... $ac_c" 1>&6
21292 echo "configure:21293: checking for off_t" >&5
21293 if eval "test \"\${ac_cv_type_off_t+set}\" = set"; then
21294   echo $ac_n "(cached) $ac_c" 1>&6
21295 else
21296   cat > conftest.$ac_ext <<EOF
21297 #line 21298 "configure"
21298 #include "confdefs.h"
21299 #include <sys/types.h>
21300 #if STDC_HEADERS
21301 #include <stdlib.h>
21302 #include <stddef.h>
21303 #endif
21304
21305 EOF
21306 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21307   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
21308   rm -rf conftest*
21309   eval "ac_cv_type_off_t=yes"
21310 else
21311   rm -rf conftest*
21312   eval "ac_cv_type_off_t=no"
21313 fi
21314 rm -f conftest*
21315
21316 fi
21317 if eval "test \"`echo '$ac_cv_type_'off_t`\" = yes"; then
21318   echo "$ac_t""yes" 1>&6
21319 else
21320   echo "$ac_t""no" 1>&6
21321   cat >> confdefs.h <<EOF
21322 #define off_t long
21323 EOF
21324
21325 fi
21326
21327 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
21328 echo "configure:21329: checking for pid_t" >&5
21329 if eval "test \"\${ac_cv_type_pid_t+set}\" = set"; then
21330   echo $ac_n "(cached) $ac_c" 1>&6
21331 else
21332   cat > conftest.$ac_ext <<EOF
21333 #line 21334 "configure"
21334 #include "confdefs.h"
21335 #include <sys/types.h>
21336 #if STDC_HEADERS
21337 #include <stdlib.h>
21338 #include <stddef.h>
21339 #endif
21340
21341 EOF
21342 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21343   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
21344   rm -rf conftest*
21345   eval "ac_cv_type_pid_t=yes"
21346 else
21347   rm -rf conftest*
21348   eval "ac_cv_type_pid_t=no"
21349 fi
21350 rm -f conftest*
21351
21352 fi
21353 if eval "test \"`echo '$ac_cv_type_'pid_t`\" = yes"; then
21354   echo "$ac_t""yes" 1>&6
21355 else
21356   echo "$ac_t""no" 1>&6
21357   cat >> confdefs.h <<EOF
21358 #define pid_t int
21359 EOF
21360
21361 fi
21362
21363 echo $ac_n "checking for ptrdiff_t""... $ac_c" 1>&6
21364 echo "configure:21365: checking for ptrdiff_t" >&5
21365 if eval "test \"\${am_cv_type_ptrdiff_t+set}\" = set"; then
21366   echo $ac_n "(cached) $ac_c" 1>&6
21367 else
21368   cat > conftest.$ac_ext <<EOF
21369 #line 21370 "configure"
21370 #include "confdefs.h"
21371 #include <stddef.h>
21372 int main() {
21373 ptrdiff_t p
21374 ; return 0; }
21375 EOF
21376 if { (eval echo configure:21377: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21377   rm -rf conftest*
21378   am_cv_type_ptrdiff_t=yes
21379 else
21380   echo "configure: failed program was:" >&5
21381   cat conftest.$ac_ext >&5
21382   rm -rf conftest*
21383   am_cv_type_ptrdiff_t=no
21384 fi
21385 rm -f conftest*
21386 fi
21387
21388 echo "$ac_t""$am_cv_type_ptrdiff_t" 1>&6
21389    if test $am_cv_type_ptrdiff_t = yes; then
21390      cat >> confdefs.h <<\EOF
21391 #define HAVE_PTRDIFF_T 1
21392 EOF
21393
21394    fi
21395
21396 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
21397 echo "configure:21398: checking return type of signal handlers" >&5
21398 if eval "test \"\${ac_cv_type_signal+set}\" = set"; then
21399   echo $ac_n "(cached) $ac_c" 1>&6
21400 else
21401   cat > conftest.$ac_ext <<EOF
21402 #line 21403 "configure"
21403 #include "confdefs.h"
21404 #include <sys/types.h>
21405 #include <signal.h>
21406 #ifdef signal
21407 #undef signal
21408 #endif
21409 #ifdef __cplusplus
21410 extern "C" void (*signal (int, void (*)(int)))(int);
21411 #else
21412 void (*signal ()) ();
21413 #endif
21414
21415 int main() {
21416 int i;
21417 ; return 0; }
21418 EOF
21419 if { (eval echo configure:21420: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21420   rm -rf conftest*
21421   ac_cv_type_signal=void
21422 else
21423   echo "configure: failed program was:" >&5
21424   cat conftest.$ac_ext >&5
21425   rm -rf conftest*
21426   ac_cv_type_signal=int
21427 fi
21428 rm -f conftest*
21429 fi
21430
21431 echo "$ac_t""$ac_cv_type_signal" 1>&6
21432 cat >> confdefs.h <<EOF
21433 #define RETSIGTYPE $ac_cv_type_signal
21434 EOF
21435
21436
21437 echo $ac_n "checking for size_t""... $ac_c" 1>&6
21438 echo "configure:21439: checking for size_t" >&5
21439 if eval "test \"\${ac_cv_type_size_t+set}\" = set"; then
21440   echo $ac_n "(cached) $ac_c" 1>&6
21441 else
21442   cat > conftest.$ac_ext <<EOF
21443 #line 21444 "configure"
21444 #include "confdefs.h"
21445 #include <sys/types.h>
21446 #if STDC_HEADERS
21447 #include <stdlib.h>
21448 #include <stddef.h>
21449 #endif
21450
21451 EOF
21452 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21453   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
21454   rm -rf conftest*
21455   eval "ac_cv_type_size_t=yes"
21456 else
21457   rm -rf conftest*
21458   eval "ac_cv_type_size_t=no"
21459 fi
21460 rm -f conftest*
21461
21462 fi
21463 if eval "test \"`echo '$ac_cv_type_'size_t`\" = yes"; then
21464   echo "$ac_t""yes" 1>&6
21465 else
21466   echo "$ac_t""no" 1>&6
21467   cat >> confdefs.h <<EOF
21468 #define size_t unsigned
21469 EOF
21470
21471 fi
21472
21473
21474 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
21475 echo "configure:21476: checking for ssize_t" >&5
21476 if eval "test \"\${ac_cv_type_ssize_t+set}\" = set"; then
21477   echo $ac_n "(cached) $ac_c" 1>&6
21478 else
21479   cat > conftest.$ac_ext <<EOF
21480 #line 21481 "configure"
21481 #include "confdefs.h"
21482 #include <sys/types.h>
21483 #if STDC_HEADERS
21484 #include <stdlib.h>
21485 #include <stddef.h>
21486 #endif
21487
21488 EOF
21489 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21490   egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
21491   rm -rf conftest*
21492   eval "ac_cv_type_ssize_t=yes"
21493 else
21494   rm -rf conftest*
21495   eval "ac_cv_type_ssize_t=no"
21496 fi
21497 rm -f conftest*
21498
21499 fi
21500 if eval "test \"`echo '$ac_cv_type_'ssize_t`\" = yes"; then
21501   echo "$ac_t""yes" 1>&6
21502 else
21503   echo "$ac_t""no" 1>&6
21504   cat >> confdefs.h <<EOF
21505 #define ssize_t signed int
21506 EOF
21507
21508 fi
21509
21510 echo $ac_n "checking for caddr_t""... $ac_c" 1>&6
21511 echo "configure:21512: checking for caddr_t" >&5
21512 if eval "test \"\${ac_cv_type_caddr_t+set}\" = set"; then
21513   echo $ac_n "(cached) $ac_c" 1>&6
21514 else
21515   cat > conftest.$ac_ext <<EOF
21516 #line 21517 "configure"
21517 #include "confdefs.h"
21518 #include <sys/types.h>
21519 #if STDC_HEADERS
21520 #include <stdlib.h>
21521 #include <stddef.h>
21522 #endif
21523
21524 EOF
21525 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21526   egrep "(^|[^a-zA-Z_0-9])caddr_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
21527   rm -rf conftest*
21528   eval "ac_cv_type_caddr_t=yes"
21529 else
21530   rm -rf conftest*
21531   eval "ac_cv_type_caddr_t=no"
21532 fi
21533 rm -f conftest*
21534
21535 fi
21536 if eval "test \"`echo '$ac_cv_type_'caddr_t`\" = yes"; then
21537   echo "$ac_t""yes" 1>&6
21538 else
21539   echo "$ac_t""no" 1>&6
21540   cat >> confdefs.h <<EOF
21541 #define caddr_t char *
21542 EOF
21543
21544 fi
21545
21546
21547 echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
21548 echo "configure:21549: checking for socklen_t" >&5
21549 if eval "test \"\${ol_cv_type_socklen_t+set}\" = set"; then
21550   echo $ac_n "(cached) $ac_c" 1>&6
21551 else
21552   cat > conftest.$ac_ext <<EOF
21553 #line 21554 "configure"
21554 #include "confdefs.h"
21555
21556 #ifdef HAVE_SYS_TYPES_H
21557 #include <sys/types.h>
21558 #endif
21559 #ifdef HAVE_SYS_SOCKET_H
21560 #include <sys/socket.h>
21561 #endif
21562
21563 int main() {
21564 socklen_t len;
21565 ; return 0; }
21566 EOF
21567 if { (eval echo configure:21568: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21568   rm -rf conftest*
21569   ol_cv_type_socklen_t=yes
21570 else
21571   echo "configure: failed program was:" >&5
21572   cat conftest.$ac_ext >&5
21573   rm -rf conftest*
21574   ol_cv_type_socklen_t=no
21575 fi
21576 rm -f conftest*
21577 fi
21578
21579 echo "$ac_t""$ol_cv_type_socklen_t" 1>&6
21580   if test $ol_cv_type_socklen_t = no; then
21581     cat >> confdefs.h <<\EOF
21582 #define socklen_t int
21583 EOF
21584
21585   fi
21586  
21587 echo $ac_n "checking for member st_blksize in aggregate type struct stat""... $ac_c" 1>&6
21588 echo "configure:21589: checking for member st_blksize in aggregate type struct stat" >&5
21589 if eval "test \"\${ac_cv_c_struct_member_st_blksize+set}\" = set"; then
21590   echo $ac_n "(cached) $ac_c" 1>&6
21591 else
21592   cat > conftest.$ac_ext <<EOF
21593 #line 21594 "configure"
21594 #include "confdefs.h"
21595 #include <sys/types.h>
21596 #include <sys/stat.h>
21597 int main() {
21598 struct stat foo; foo.st_blksize;
21599 ; return 0; }
21600 EOF
21601 if { (eval echo configure:21602: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21602   rm -rf conftest*
21603   ac_cv_c_struct_member_st_blksize=yes
21604 else
21605   echo "configure: failed program was:" >&5
21606   cat conftest.$ac_ext >&5
21607   rm -rf conftest*
21608   ac_cv_c_struct_member_st_blksize=no
21609 fi
21610 rm -f conftest*
21611 fi
21612
21613 echo "$ac_t""$ac_cv_c_struct_member_st_blksize" 1>&6
21614 st_blksize="$ac_cv_c_struct_member_st_blksize"
21615 if test $ac_cv_c_struct_member_st_blksize = yes; then
21616   cat >> confdefs.h <<\EOF
21617 #define HAVE_ST_BLKSIZE 1
21618 EOF
21619
21620 fi
21621
21622 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
21623 echo "configure:21624: checking whether time.h and sys/time.h may both be included" >&5
21624 if eval "test \"\${ac_cv_header_time+set}\" = set"; then
21625   echo $ac_n "(cached) $ac_c" 1>&6
21626 else
21627   cat > conftest.$ac_ext <<EOF
21628 #line 21629 "configure"
21629 #include "confdefs.h"
21630 #include <sys/types.h>
21631 #include <sys/time.h>
21632 #include <time.h>
21633 int main() {
21634 struct tm *tp;
21635 ; return 0; }
21636 EOF
21637 if { (eval echo configure:21638: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21638   rm -rf conftest*
21639   ac_cv_header_time=yes
21640 else
21641   echo "configure: failed program was:" >&5
21642   cat conftest.$ac_ext >&5
21643   rm -rf conftest*
21644   ac_cv_header_time=no
21645 fi
21646 rm -f conftest*
21647 fi
21648
21649 echo "$ac_t""$ac_cv_header_time" 1>&6
21650 if test $ac_cv_header_time = yes; then
21651   cat >> confdefs.h <<\EOF
21652 #define TIME_WITH_SYS_TIME 1
21653 EOF
21654
21655 fi
21656
21657 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
21658 echo "configure:21659: checking whether struct tm is in sys/time.h or time.h" >&5
21659 if eval "test \"\${ac_cv_struct_tm+set}\" = set"; then
21660   echo $ac_n "(cached) $ac_c" 1>&6
21661 else
21662   cat > conftest.$ac_ext <<EOF
21663 #line 21664 "configure"
21664 #include "confdefs.h"
21665 #include <sys/types.h>
21666 #include <time.h>
21667 int main() {
21668 struct tm *tp; tp->tm_sec;
21669 ; return 0; }
21670 EOF
21671 if { (eval echo configure:21672: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21672   rm -rf conftest*
21673   ac_cv_struct_tm=time.h
21674 else
21675   echo "configure: failed program was:" >&5
21676   cat conftest.$ac_ext >&5
21677   rm -rf conftest*
21678   ac_cv_struct_tm=sys/time.h
21679 fi
21680 rm -f conftest*
21681 fi
21682
21683 echo "$ac_t""$ac_cv_struct_tm" 1>&6
21684 if test $ac_cv_struct_tm = sys/time.h; then
21685   cat >> confdefs.h <<\EOF
21686 #define TM_IN_SYS_TIME 1
21687 EOF
21688
21689 fi
21690
21691 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
21692 echo "configure:21693: checking for uid_t in sys/types.h" >&5
21693 if eval "test \"\${ac_cv_type_uid_t+set}\" = set"; then
21694   echo $ac_n "(cached) $ac_c" 1>&6
21695 else
21696   cat > conftest.$ac_ext <<EOF
21697 #line 21698 "configure"
21698 #include "confdefs.h"
21699 #include <sys/types.h>
21700 EOF
21701 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21702   egrep "uid_t" >/dev/null 2>&1; then
21703   rm -rf conftest*
21704   ac_cv_type_uid_t=yes
21705 else
21706   rm -rf conftest*
21707   ac_cv_type_uid_t=no
21708 fi
21709 rm -f conftest*
21710
21711 fi
21712
21713 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
21714 if test $ac_cv_type_uid_t = no; then
21715   cat >> confdefs.h <<\EOF
21716 #define uid_t int
21717 EOF
21718
21719   cat >> confdefs.h <<\EOF
21720 #define gid_t int
21721 EOF
21722
21723 fi
21724
21725 echo $ac_n "checking for sig_atomic_t""... $ac_c" 1>&6
21726 echo "configure:21727: checking for sig_atomic_t" >&5
21727 if eval "test \"\${ol_cv_type_sig_atomic_t+set}\" = set"; then
21728   echo $ac_n "(cached) $ac_c" 1>&6
21729 else
21730   cat > conftest.$ac_ext <<EOF
21731 #line 21732 "configure"
21732 #include "confdefs.h"
21733 #include <signal.h>
21734 int main() {
21735 sig_atomic_t atomic;
21736 ; return 0; }
21737 EOF
21738 if { (eval echo configure:21739: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21739   rm -rf conftest*
21740   ol_cv_type_sig_atomic_t=yes
21741 else
21742   echo "configure: failed program was:" >&5
21743   cat conftest.$ac_ext >&5
21744   rm -rf conftest*
21745   ol_cv_type_sig_atomic_t=no
21746 fi
21747 rm -f conftest*
21748 fi
21749
21750 echo "$ac_t""$ol_cv_type_sig_atomic_t" 1>&6
21751   if test $ol_cv_type_sig_atomic_t = no; then
21752     cat >> confdefs.h <<\EOF
21753 #define sig_atomic_t int
21754 EOF
21755
21756   fi
21757  
21758
21759
21760 # test for pw_gecos in struct passwd
21761 echo $ac_n "checking struct passwd for pw_gecos""... $ac_c" 1>&6
21762 echo "configure:21763: checking struct passwd for pw_gecos" >&5
21763 if eval "test \"\${ol_cv_struct_passwd_pw_gecos+set}\" = set"; then
21764   echo $ac_n "(cached) $ac_c" 1>&6
21765 else
21766   
21767         cat > conftest.$ac_ext <<EOF
21768 #line 21769 "configure"
21769 #include "confdefs.h"
21770 #include <pwd.h>
21771 int main() {
21772
21773         struct passwd pwd;
21774         pwd.pw_gecos = pwd.pw_name;
21775
21776 ; return 0; }
21777 EOF
21778 if { (eval echo configure:21779: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21779   rm -rf conftest*
21780   ol_cv_struct_passwd_pw_gecos=yes
21781 else
21782   echo "configure: failed program was:" >&5
21783   cat conftest.$ac_ext >&5
21784   rm -rf conftest*
21785   ol_cv_struct_passwd_pw_gecos=no
21786 fi
21787 rm -f conftest*
21788 fi
21789
21790 echo "$ac_t""$ol_cv_struct_passwd_pw_gecos" 1>&6
21791 if test $ol_cv_struct_passwd_pw_gecos = yes ; then
21792         cat >> confdefs.h <<\EOF
21793 #define HAVE_PW_GECOS 1
21794 EOF
21795
21796 fi
21797
21798 # test for pw_passwd in struct passwd
21799 echo $ac_n "checking struct passwd for pw_passwd""... $ac_c" 1>&6
21800 echo "configure:21801: checking struct passwd for pw_passwd" >&5
21801 if eval "test \"\${ol_cv_struct_passwd_pw_passwd+set}\" = set"; then
21802   echo $ac_n "(cached) $ac_c" 1>&6
21803 else
21804   
21805         cat > conftest.$ac_ext <<EOF
21806 #line 21807 "configure"
21807 #include "confdefs.h"
21808 #include <pwd.h>
21809 int main() {
21810
21811         struct passwd pwd;
21812         pwd.pw_passwd = pwd.pw_name;
21813
21814 ; return 0; }
21815 EOF
21816 if { (eval echo configure:21817: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21817   rm -rf conftest*
21818   ol_cv_struct_passwd_pw_passwd=yes
21819 else
21820   echo "configure: failed program was:" >&5
21821   cat conftest.$ac_ext >&5
21822   rm -rf conftest*
21823   ol_cv_struct_passwd_pw_passwd=no
21824 fi
21825 rm -f conftest*
21826 fi
21827
21828 echo "$ac_t""$ol_cv_struct_passwd_pw_passwd" 1>&6
21829 if test $ol_cv_struct_passwd_pw_passwd = yes ; then
21830         cat >> confdefs.h <<\EOF
21831 #define HAVE_PW_PASSWD 1
21832 EOF
21833
21834 fi
21835
21836
21837 echo $ac_n "checking if toupper() requires islower()""... $ac_c" 1>&6
21838 echo "configure:21839: checking if toupper() requires islower()" >&5
21839 if eval "test \"\${ol_cv_c_upper_lower+set}\" = set"; then
21840   echo $ac_n "(cached) $ac_c" 1>&6
21841 else
21842   
21843         if test "$cross_compiling" = yes; then
21844   ol_cv_c_upper_lower=safe
21845 else
21846   cat > conftest.$ac_ext <<EOF
21847 #line 21848 "configure"
21848 #include "confdefs.h"
21849
21850 #include <ctype.h>
21851 main()
21852 {
21853         if ('C' == toupper('C'))
21854                 exit(0);
21855         else
21856                 exit(1);
21857 }
21858 EOF
21859 if { (eval echo configure:21860: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
21860 then
21861   ol_cv_c_upper_lower=no
21862 else
21863   echo "configure: failed program was:" >&5
21864   cat conftest.$ac_ext >&5
21865   rm -fr conftest*
21866   ol_cv_c_upper_lower=yes
21867 fi
21868 rm -fr conftest*
21869 fi
21870
21871 fi
21872
21873 echo "$ac_t""$ol_cv_c_upper_lower" 1>&6
21874 if test $ol_cv_c_upper_lower != no ; then
21875         cat >> confdefs.h <<\EOF
21876 #define C_UPPER_LOWER 1
21877 EOF
21878
21879 fi
21880
21881 echo $ac_n "checking for working const""... $ac_c" 1>&6
21882 echo "configure:21883: checking for working const" >&5
21883 if eval "test \"\${ac_cv_c_const+set}\" = set"; then
21884   echo $ac_n "(cached) $ac_c" 1>&6
21885 else
21886   cat > conftest.$ac_ext <<EOF
21887 #line 21888 "configure"
21888 #include "confdefs.h"
21889
21890 int main() {
21891
21892 /* Ultrix mips cc rejects this.  */
21893 typedef int charset[2]; const charset x;
21894 /* SunOS 4.1.1 cc rejects this.  */
21895 char const *const *ccp;
21896 char **p;
21897 /* NEC SVR4.0.2 mips cc rejects this.  */
21898 struct point {int x, y;};
21899 static struct point const zero = {0,0};
21900 /* AIX XL C 1.02.0.0 rejects this.
21901    It does not let you subtract one const X* pointer from another in an arm
21902    of an if-expression whose if-part is not a constant expression */
21903 const char *g = "string";
21904 ccp = &g + (g ? g-g : 0);
21905 /* HPUX 7.0 cc rejects these. */
21906 ++ccp;
21907 p = (char**) ccp;
21908 ccp = (char const *const *) p;
21909 { /* SCO 3.2v4 cc rejects this.  */
21910   char *t;
21911   char const *s = 0 ? (char *) 0 : (char const *) 0;
21912
21913   *t++ = 0;
21914 }
21915 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
21916   int x[] = {25, 17};
21917   const int *foo = &x[0];
21918   ++foo;
21919 }
21920 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
21921   typedef const int *iptr;
21922   iptr p = 0;
21923   ++p;
21924 }
21925 { /* AIX XL C 1.02.0.0 rejects this saying
21926      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
21927   struct s { int j; const int *ap[3]; };
21928   struct s *b; b->j = 5;
21929 }
21930 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
21931   const int foo = 10;
21932 }
21933
21934 ; return 0; }
21935 EOF
21936 if { (eval echo configure:21937: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21937   rm -rf conftest*
21938   ac_cv_c_const=yes
21939 else
21940   echo "configure: failed program was:" >&5
21941   cat conftest.$ac_ext >&5
21942   rm -rf conftest*
21943   ac_cv_c_const=no
21944 fi
21945 rm -f conftest*
21946 fi
21947
21948 echo "$ac_t""$ac_cv_c_const" 1>&6
21949 if test $ac_cv_c_const = no; then
21950   cat >> confdefs.h <<\EOF
21951 #define const 
21952 EOF
21953
21954 fi
21955
21956 echo $ac_n "checking if compiler understands volatile""... $ac_c" 1>&6
21957 echo "configure:21958: checking if compiler understands volatile" >&5
21958 if eval "test \"\${ol_cv_c_volatile+set}\" = set"; then
21959   echo $ac_n "(cached) $ac_c" 1>&6
21960 else
21961   cat > conftest.$ac_ext <<EOF
21962 #line 21963 "configure"
21963 #include "confdefs.h"
21964 int x, y, z;
21965 int main() {
21966 volatile int a; int * volatile b = x ? &y : &z;
21967       /* Older MIPS compilers (eg., in Ultrix 4.2) don't like *b = 0 */
21968       *b = 0;
21969 ; return 0; }
21970 EOF
21971 if { (eval echo configure:21972: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21972   rm -rf conftest*
21973   ol_cv_c_volatile=yes
21974 else
21975   echo "configure: failed program was:" >&5
21976   cat conftest.$ac_ext >&5
21977   rm -rf conftest*
21978   ol_cv_c_volatile=no
21979 fi
21980 rm -f conftest*
21981 fi
21982
21983 echo "$ac_t""$ol_cv_c_volatile" 1>&6
21984   if test $ol_cv_c_volatile = yes; then
21985     : 
21986   else
21987     cat >> confdefs.h <<\EOF
21988 #define volatile 
21989 EOF
21990
21991   fi
21992  
21993
21994 if test $cross_compiling = yes ; then
21995         echo "configure: warning: Crossing compiling... all bets are off!" 1>&2
21996         cat >> confdefs.h <<\EOF
21997 #define CROSS_COMPILING 1
21998 EOF
21999
22000 else
22001         echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
22002 echo "configure:22003: checking whether byte ordering is bigendian" >&5
22003 if eval "test \"\${ac_cv_c_bigendian+set}\" = set"; then
22004   echo $ac_n "(cached) $ac_c" 1>&6
22005 else
22006   ac_cv_c_bigendian=unknown
22007 # See if sys/param.h defines the BYTE_ORDER macro.
22008 cat > conftest.$ac_ext <<EOF
22009 #line 22010 "configure"
22010 #include "confdefs.h"
22011 #include <sys/types.h>
22012 #include <sys/param.h>
22013 int main() {
22014
22015 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
22016  bogus endian macros
22017 #endif
22018 ; return 0; }
22019 EOF
22020 if { (eval echo configure:22021: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22021   rm -rf conftest*
22022   # It does; now see whether it defined to BIG_ENDIAN or not.
22023 cat > conftest.$ac_ext <<EOF
22024 #line 22025 "configure"
22025 #include "confdefs.h"
22026 #include <sys/types.h>
22027 #include <sys/param.h>
22028 int main() {
22029
22030 #if BYTE_ORDER != BIG_ENDIAN
22031  not big endian
22032 #endif
22033 ; return 0; }
22034 EOF
22035 if { (eval echo configure:22036: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22036   rm -rf conftest*
22037   ac_cv_c_bigendian=yes
22038 else
22039   echo "configure: failed program was:" >&5
22040   cat conftest.$ac_ext >&5
22041   rm -rf conftest*
22042   ac_cv_c_bigendian=no
22043 fi
22044 rm -f conftest*
22045 else
22046   echo "configure: failed program was:" >&5
22047   cat conftest.$ac_ext >&5
22048 fi
22049 rm -f conftest*
22050 if test $ac_cv_c_bigendian = unknown; then
22051 if test "$cross_compiling" = yes; then
22052     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
22053 else
22054   cat > conftest.$ac_ext <<EOF
22055 #line 22056 "configure"
22056 #include "confdefs.h"
22057 main () {
22058   /* Are we little or big endian?  From Harbison&Steele.  */
22059   union
22060   {
22061     long l;
22062     char c[sizeof (long)];
22063   } u;
22064   u.l = 1;
22065   exit (u.c[sizeof (long) - 1] == 1);
22066 }
22067 EOF
22068 if { (eval echo configure:22069: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
22069 then
22070   ac_cv_c_bigendian=no
22071 else
22072   echo "configure: failed program was:" >&5
22073   cat conftest.$ac_ext >&5
22074   rm -fr conftest*
22075   ac_cv_c_bigendian=yes
22076 fi
22077 rm -fr conftest*
22078 fi
22079
22080 fi
22081 fi
22082
22083 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
22084 if test $ac_cv_c_bigendian = yes; then
22085   cat >> confdefs.h <<\EOF
22086 #define WORDS_BIGENDIAN 1
22087 EOF
22088
22089 fi
22090
22091 fi
22092
22093 echo $ac_n "checking size of short""... $ac_c" 1>&6
22094 echo "configure:22095: checking size of short" >&5 
22095 if eval "test \"\${ac_cv_sizeof_short+set}\" = set"; then
22096   echo $ac_n "(cached) $ac_c" 1>&6
22097 else
22098   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
22099   cat > conftest.$ac_ext <<EOF
22100 #line 22101 "configure"
22101 #include "confdefs.h"
22102 #include "confdefs.h" 
22103 #include <stdlib.h>
22104 #include <sys/types.h> 
22105  
22106
22107 int main() {
22108 switch (0) case 0: case (sizeof (short) == $ac_size):;
22109 ; return 0; }
22110 EOF
22111 if { (eval echo configure:22112: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22112   rm -rf conftest*
22113   ac_cv_sizeof_short=$ac_size
22114 else
22115   echo "configure: failed program was:" >&5
22116   cat conftest.$ac_ext >&5
22117 fi
22118 rm -f conftest* 
22119   if test x$ac_cv_sizeof_short != x ; then break; fi 
22120 done 
22121
22122 fi
22123  
22124 if test x$ac_cv_sizeof_short = x ; then 
22125   { echo "configure: error: cannot determine a size for short" 1>&2; exit 1; } 
22126 fi 
22127 echo "$ac_t""$ac_cv_sizeof_short" 1>&6 
22128 cat >> confdefs.h <<EOF
22129 #define SIZEOF_SHORT $ac_cv_sizeof_short
22130 EOF
22131  
22132  
22133 echo $ac_n "checking size of int""... $ac_c" 1>&6
22134 echo "configure:22135: checking size of int" >&5 
22135 if eval "test \"\${ac_cv_sizeof_int+set}\" = set"; then
22136   echo $ac_n "(cached) $ac_c" 1>&6
22137 else
22138   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
22139   cat > conftest.$ac_ext <<EOF
22140 #line 22141 "configure"
22141 #include "confdefs.h"
22142 #include "confdefs.h" 
22143 #include <stdlib.h>
22144 #include <sys/types.h> 
22145  
22146
22147 int main() {
22148 switch (0) case 0: case (sizeof (int) == $ac_size):;
22149 ; return 0; }
22150 EOF
22151 if { (eval echo configure:22152: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22152   rm -rf conftest*
22153   ac_cv_sizeof_int=$ac_size
22154 else
22155   echo "configure: failed program was:" >&5
22156   cat conftest.$ac_ext >&5
22157 fi
22158 rm -f conftest* 
22159   if test x$ac_cv_sizeof_int != x ; then break; fi 
22160 done 
22161
22162 fi
22163  
22164 if test x$ac_cv_sizeof_int = x ; then 
22165   { echo "configure: error: cannot determine a size for int" 1>&2; exit 1; } 
22166 fi 
22167 echo "$ac_t""$ac_cv_sizeof_int" 1>&6 
22168 cat >> confdefs.h <<EOF
22169 #define SIZEOF_INT $ac_cv_sizeof_int
22170 EOF
22171  
22172  
22173 echo $ac_n "checking size of long""... $ac_c" 1>&6
22174 echo "configure:22175: checking size of long" >&5 
22175 if eval "test \"\${ac_cv_sizeof_long+set}\" = set"; then
22176   echo $ac_n "(cached) $ac_c" 1>&6
22177 else
22178   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
22179   cat > conftest.$ac_ext <<EOF
22180 #line 22181 "configure"
22181 #include "confdefs.h"
22182 #include "confdefs.h" 
22183 #include <stdlib.h>
22184 #include <sys/types.h> 
22185  
22186
22187 int main() {
22188 switch (0) case 0: case (sizeof (long) == $ac_size):;
22189 ; return 0; }
22190 EOF
22191 if { (eval echo configure:22192: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22192   rm -rf conftest*
22193   ac_cv_sizeof_long=$ac_size
22194 else
22195   echo "configure: failed program was:" >&5
22196   cat conftest.$ac_ext >&5
22197 fi
22198 rm -f conftest* 
22199   if test x$ac_cv_sizeof_long != x ; then break; fi 
22200 done 
22201
22202 fi
22203  
22204 if test x$ac_cv_sizeof_long = x ; then 
22205   { echo "configure: error: cannot determine a size for long" 1>&2; exit 1; } 
22206 fi 
22207 echo "$ac_t""$ac_cv_sizeof_long" 1>&6 
22208 cat >> confdefs.h <<EOF
22209 #define SIZEOF_LONG $ac_cv_sizeof_long
22210 EOF
22211  
22212
22213 echo $ac_n "checking size of wchar_t""... $ac_c" 1>&6
22214 echo "configure:22215: checking size of wchar_t" >&5 
22215 if eval "test \"\${ac_cv_sizeof_wchar_t+set}\" = set"; then
22216   echo $ac_n "(cached) $ac_c" 1>&6
22217 else
22218   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
22219   cat > conftest.$ac_ext <<EOF
22220 #line 22221 "configure"
22221 #include "confdefs.h"
22222 #include "confdefs.h" 
22223 #include <stdlib.h>
22224 #include <sys/types.h> 
22225  
22226
22227 int main() {
22228 switch (0) case 0: case (sizeof (wchar_t) == $ac_size):;
22229 ; return 0; }
22230 EOF
22231 if { (eval echo configure:22232: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22232   rm -rf conftest*
22233   ac_cv_sizeof_wchar_t=$ac_size
22234 else
22235   echo "configure: failed program was:" >&5
22236   cat conftest.$ac_ext >&5
22237 fi
22238 rm -f conftest* 
22239   if test x$ac_cv_sizeof_wchar_t != x ; then break; fi 
22240 done 
22241
22242 fi
22243  
22244 if test x$ac_cv_sizeof_wchar_t = x ; then 
22245   { echo "configure: error: cannot determine a size for wchar_t" 1>&2; exit 1; } 
22246 fi 
22247 echo "$ac_t""$ac_cv_sizeof_wchar_t" 1>&6 
22248 cat >> confdefs.h <<EOF
22249 #define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
22250 EOF
22251  
22252
22253
22254 if test "$ac_cv_sizeof_int" -lt 4 ; then
22255         echo "configure: warning: OpenLDAP requires 'int' to be 32 bits or greater." 1>&2
22256
22257         cat >> confdefs.h <<\EOF
22258 #define LBER_INT_T long
22259 EOF
22260
22261 else
22262         cat >> confdefs.h <<\EOF
22263 #define LBER_INT_T int
22264 EOF
22265
22266 fi
22267
22268 cat >> confdefs.h <<\EOF
22269 #define LBER_LEN_T long
22270 EOF
22271
22272 cat >> confdefs.h <<\EOF
22273 #define LBER_SOCKET_T int
22274 EOF
22275
22276 cat >> confdefs.h <<\EOF
22277 #define LBER_TAG_T long
22278 EOF
22279
22280
22281 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
22282 echo "configure:22283: checking for 8-bit clean memcmp" >&5
22283 if eval "test \"\${ac_cv_func_memcmp_clean+set}\" = set"; then
22284   echo $ac_n "(cached) $ac_c" 1>&6
22285 else
22286   if test "$cross_compiling" = yes; then
22287   ac_cv_func_memcmp_clean=no
22288 else
22289   cat > conftest.$ac_ext <<EOF
22290 #line 22291 "configure"
22291 #include "confdefs.h"
22292
22293 main()
22294 {
22295   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
22296   exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
22297 }
22298
22299 EOF
22300 if { (eval echo configure:22301: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
22301 then
22302   ac_cv_func_memcmp_clean=yes
22303 else
22304   echo "configure: failed program was:" >&5
22305   cat conftest.$ac_ext >&5
22306   rm -fr conftest*
22307   ac_cv_func_memcmp_clean=no
22308 fi
22309 rm -fr conftest*
22310 fi
22311
22312 fi
22313
22314 echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
22315 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
22316
22317 echo $ac_n "checking for strftime""... $ac_c" 1>&6
22318 echo "configure:22319: checking for strftime" >&5
22319 if eval "test \"\${ac_cv_func_strftime+set}\" = set"; then
22320   echo $ac_n "(cached) $ac_c" 1>&6
22321 else
22322   cat > conftest.$ac_ext <<EOF
22323 #line 22324 "configure"
22324 #include "confdefs.h"
22325 /* System header to define __stub macros and hopefully few prototypes,
22326     which can conflict with char strftime(); below.  */
22327 #include <assert.h>
22328 /* Override any gcc2 internal prototype to avoid an error.  */
22329 /* We use char because int might match the return type of a gcc2
22330     builtin and then its argument prototype would still apply.  */
22331 char strftime();
22332 char (*f)();
22333
22334 int main() {
22335
22336 /* The GNU C library defines this for functions which it implements
22337     to always fail with ENOSYS.  Some functions are actually named
22338     something starting with __ and the normal name is an alias.  */
22339 #if defined (__stub_strftime) || defined (__stub___strftime)
22340 choke me
22341 #else
22342 f = strftime;
22343 #endif
22344
22345 ; return 0; }
22346 EOF
22347 if { (eval echo configure:22348: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22348   rm -rf conftest*
22349   eval "ac_cv_func_strftime=yes"
22350 else
22351   echo "configure: failed program was:" >&5
22352   cat conftest.$ac_ext >&5
22353   rm -rf conftest*
22354   eval "ac_cv_func_strftime=no"
22355 fi
22356 rm -f conftest*
22357 fi
22358
22359 if eval "test \"`echo '$ac_cv_func_'strftime`\" = yes"; then
22360   echo "$ac_t""yes" 1>&6
22361   cat >> confdefs.h <<\EOF
22362 #define HAVE_STRFTIME 1
22363 EOF
22364
22365 else
22366   echo "$ac_t""no" 1>&6
22367 # strftime is in -lintl on SCO UNIX.
22368 echo $ac_n "checking for strftime in -lintl""... $ac_c" 1>&6
22369 echo "configure:22370: checking for strftime in -lintl" >&5
22370 ac_lib_var=`echo intl'_'strftime | sed 'y%./+-:%__p__%'`
22371 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
22372   echo $ac_n "(cached) $ac_c" 1>&6
22373 else
22374   ac_save_LIBS="$LIBS"
22375 LIBS="-lintl  $LIBS"
22376 cat > conftest.$ac_ext <<EOF
22377 #line 22378 "configure"
22378 #include "confdefs.h"
22379 /* Override any gcc2 internal prototype to avoid an error.  */
22380 /* We use char because int might match the return type of a gcc2
22381     builtin and then its argument prototype would still apply.  */
22382 char strftime();
22383
22384 int main() {
22385 strftime()
22386 ; return 0; }
22387 EOF
22388 if { (eval echo configure:22389: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22389   rm -rf conftest*
22390   eval "ac_cv_lib_$ac_lib_var=yes"
22391 else
22392   echo "configure: failed program was:" >&5
22393   cat conftest.$ac_ext >&5
22394   rm -rf conftest*
22395   eval "ac_cv_lib_$ac_lib_var=no"
22396 fi
22397 rm -f conftest*
22398 LIBS="$ac_save_LIBS"
22399
22400 fi
22401 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
22402   echo "$ac_t""yes" 1>&6
22403   cat >> confdefs.h <<\EOF
22404 #define HAVE_STRFTIME 1
22405 EOF
22406
22407 LIBS="-lintl $LIBS"
22408 else
22409   echo "$ac_t""no" 1>&6
22410 fi
22411
22412 fi
22413
22414
22415 echo $ac_n "checking for inet_aton()""... $ac_c" 1>&6
22416 echo "configure:22417: checking for inet_aton()" >&5
22417 if eval "test \"\${ol_cv_func_inet_aton+set}\" = set"; then
22418   echo $ac_n "(cached) $ac_c" 1>&6
22419 else
22420   cat > conftest.$ac_ext <<EOF
22421 #line 22422 "configure"
22422 #include "confdefs.h"
22423
22424 #ifdef HAVE_SYS_TYPES_H
22425 #       include <sys/types.h>
22426 #endif
22427 #ifdef HAVE_SYS_SOCKET_H
22428 #       include <sys/socket.h>
22429 #       ifdef HAVE_SYS_SELECT_H
22430 #               include <sys/select.h>
22431 #       endif
22432 #       include <netinet/in.h>
22433 #       ifdef HAVE_ARPA_INET_H
22434 #               include <arpa/inet.h>
22435 #       endif
22436 #endif
22437
22438 int main() {
22439 struct in_addr in;
22440 int rc = inet_aton( "255.255.255.255", &in );
22441 ; return 0; }
22442 EOF
22443 if { (eval echo configure:22444: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22444   rm -rf conftest*
22445   ol_cv_func_inet_aton=yes
22446 else
22447   echo "configure: failed program was:" >&5
22448   cat conftest.$ac_ext >&5
22449   rm -rf conftest*
22450   ol_cv_func_inet_aton=no
22451 fi
22452 rm -f conftest*
22453 fi
22454
22455 echo "$ac_t""$ol_cv_func_inet_aton" 1>&6
22456   if test $ol_cv_func_inet_aton != no; then
22457     cat >> confdefs.h <<\EOF
22458 #define HAVE_INET_ATON 1
22459 EOF
22460
22461   fi
22462  
22463
22464 echo $ac_n "checking for _spawnlp""... $ac_c" 1>&6
22465 echo "configure:22466: checking for _spawnlp" >&5
22466 if eval "test \"\${ac_cv_func__spawnlp+set}\" = set"; then
22467   echo $ac_n "(cached) $ac_c" 1>&6
22468 else
22469   cat > conftest.$ac_ext <<EOF
22470 #line 22471 "configure"
22471 #include "confdefs.h"
22472 /* System header to define __stub macros and hopefully few prototypes,
22473     which can conflict with char _spawnlp(); below.  */
22474 #include <assert.h>
22475 /* Override any gcc2 internal prototype to avoid an error.  */
22476 /* We use char because int might match the return type of a gcc2
22477     builtin and then its argument prototype would still apply.  */
22478 char _spawnlp();
22479 char (*f)();
22480
22481 int main() {
22482
22483 /* The GNU C library defines this for functions which it implements
22484     to always fail with ENOSYS.  Some functions are actually named
22485     something starting with __ and the normal name is an alias.  */
22486 #if defined (__stub__spawnlp) || defined (__stub____spawnlp)
22487 choke me
22488 #else
22489 f = _spawnlp;
22490 #endif
22491
22492 ; return 0; }
22493 EOF
22494 if { (eval echo configure:22495: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22495   rm -rf conftest*
22496   eval "ac_cv_func__spawnlp=yes"
22497 else
22498   echo "configure: failed program was:" >&5
22499   cat conftest.$ac_ext >&5
22500   rm -rf conftest*
22501   eval "ac_cv_func__spawnlp=no"
22502 fi
22503 rm -f conftest*
22504 fi
22505
22506 if eval "test \"`echo '$ac_cv_func_'_spawnlp`\" = yes"; then
22507   echo "$ac_t""yes" 1>&6
22508   cat >> confdefs.h <<\EOF
22509 #define HAVE_SPAWNLP 1
22510 EOF
22511
22512 else
22513   echo "$ac_t""no" 1>&6
22514 fi
22515
22516
22517 echo $ac_n "checking for _snprintf""... $ac_c" 1>&6
22518 echo "configure:22519: checking for _snprintf" >&5
22519 if eval "test \"\${ac_cv_func__snprintf+set}\" = set"; then
22520   echo $ac_n "(cached) $ac_c" 1>&6
22521 else
22522   cat > conftest.$ac_ext <<EOF
22523 #line 22524 "configure"
22524 #include "confdefs.h"
22525 /* System header to define __stub macros and hopefully few prototypes,
22526     which can conflict with char _snprintf(); below.  */
22527 #include <assert.h>
22528 /* Override any gcc2 internal prototype to avoid an error.  */
22529 /* We use char because int might match the return type of a gcc2
22530     builtin and then its argument prototype would still apply.  */
22531 char _snprintf();
22532 char (*f)();
22533
22534 int main() {
22535
22536 /* The GNU C library defines this for functions which it implements
22537     to always fail with ENOSYS.  Some functions are actually named
22538     something starting with __ and the normal name is an alias.  */
22539 #if defined (__stub__snprintf) || defined (__stub____snprintf)
22540 choke me
22541 #else
22542 f = _snprintf;
22543 #endif
22544
22545 ; return 0; }
22546 EOF
22547 if { (eval echo configure:22548: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22548   rm -rf conftest*
22549   eval "ac_cv_func__snprintf=yes"
22550 else
22551   echo "configure: failed program was:" >&5
22552   cat conftest.$ac_ext >&5
22553   rm -rf conftest*
22554   eval "ac_cv_func__snprintf=no"
22555 fi
22556 rm -f conftest*
22557 fi
22558
22559 if eval "test \"`echo '$ac_cv_func_'_snprintf`\" = yes"; then
22560   echo "$ac_t""yes" 1>&6
22561   ac_cv_func_snprintf=yes
22562         cat >> confdefs.h <<\EOF
22563 #define snprintf _snprintf
22564 EOF
22565
22566
22567 else
22568   echo "$ac_t""no" 1>&6
22569 fi
22570
22571
22572 echo $ac_n "checking for _vsnprintf""... $ac_c" 1>&6
22573 echo "configure:22574: checking for _vsnprintf" >&5
22574 if eval "test \"\${ac_cv_func__vsnprintf+set}\" = set"; then
22575   echo $ac_n "(cached) $ac_c" 1>&6
22576 else
22577   cat > conftest.$ac_ext <<EOF
22578 #line 22579 "configure"
22579 #include "confdefs.h"
22580 /* System header to define __stub macros and hopefully few prototypes,
22581     which can conflict with char _vsnprintf(); below.  */
22582 #include <assert.h>
22583 /* Override any gcc2 internal prototype to avoid an error.  */
22584 /* We use char because int might match the return type of a gcc2
22585     builtin and then its argument prototype would still apply.  */
22586 char _vsnprintf();
22587 char (*f)();
22588
22589 int main() {
22590
22591 /* The GNU C library defines this for functions which it implements
22592     to always fail with ENOSYS.  Some functions are actually named
22593     something starting with __ and the normal name is an alias.  */
22594 #if defined (__stub__vsnprintf) || defined (__stub____vsnprintf)
22595 choke me
22596 #else
22597 f = _vsnprintf;
22598 #endif
22599
22600 ; return 0; }
22601 EOF
22602 if { (eval echo configure:22603: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22603   rm -rf conftest*
22604   eval "ac_cv_func__vsnprintf=yes"
22605 else
22606   echo "configure: failed program was:" >&5
22607   cat conftest.$ac_ext >&5
22608   rm -rf conftest*
22609   eval "ac_cv_func__vsnprintf=no"
22610 fi
22611 rm -f conftest*
22612 fi
22613
22614 if eval "test \"`echo '$ac_cv_func_'_vsnprintf`\" = yes"; then
22615   echo "$ac_t""yes" 1>&6
22616   ac_cv_func_vsnprintf=yes
22617         cat >> confdefs.h <<\EOF
22618 #define vsnprintf _vsnprintf
22619 EOF
22620
22621
22622 else
22623   echo "$ac_t""no" 1>&6
22624 fi
22625
22626
22627 echo $ac_n "checking for vprintf""... $ac_c" 1>&6
22628 echo "configure:22629: checking for vprintf" >&5
22629 if eval "test \"\${ac_cv_func_vprintf+set}\" = set"; then
22630   echo $ac_n "(cached) $ac_c" 1>&6
22631 else
22632   cat > conftest.$ac_ext <<EOF
22633 #line 22634 "configure"
22634 #include "confdefs.h"
22635 /* System header to define __stub macros and hopefully few prototypes,
22636     which can conflict with char vprintf(); below.  */
22637 #include <assert.h>
22638 /* Override any gcc2 internal prototype to avoid an error.  */
22639 /* We use char because int might match the return type of a gcc2
22640     builtin and then its argument prototype would still apply.  */
22641 char vprintf();
22642 char (*f)();
22643
22644 int main() {
22645
22646 /* The GNU C library defines this for functions which it implements
22647     to always fail with ENOSYS.  Some functions are actually named
22648     something starting with __ and the normal name is an alias.  */
22649 #if defined (__stub_vprintf) || defined (__stub___vprintf)
22650 choke me
22651 #else
22652 f = vprintf;
22653 #endif
22654
22655 ; return 0; }
22656 EOF
22657 if { (eval echo configure:22658: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22658   rm -rf conftest*
22659   eval "ac_cv_func_vprintf=yes"
22660 else
22661   echo "configure: failed program was:" >&5
22662   cat conftest.$ac_ext >&5
22663   rm -rf conftest*
22664   eval "ac_cv_func_vprintf=no"
22665 fi
22666 rm -f conftest*
22667 fi
22668
22669 if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
22670   echo "$ac_t""yes" 1>&6
22671   cat >> confdefs.h <<\EOF
22672 #define HAVE_VPRINTF 1
22673 EOF
22674
22675 else
22676   echo "$ac_t""no" 1>&6
22677 fi
22678
22679 if test "$ac_cv_func_vprintf" != yes; then
22680 echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
22681 echo "configure:22682: checking for _doprnt" >&5
22682 if eval "test \"\${ac_cv_func__doprnt+set}\" = set"; then
22683   echo $ac_n "(cached) $ac_c" 1>&6
22684 else
22685   cat > conftest.$ac_ext <<EOF
22686 #line 22687 "configure"
22687 #include "confdefs.h"
22688 /* System header to define __stub macros and hopefully few prototypes,
22689     which can conflict with char _doprnt(); below.  */
22690 #include <assert.h>
22691 /* Override any gcc2 internal prototype to avoid an error.  */
22692 /* We use char because int might match the return type of a gcc2
22693     builtin and then its argument prototype would still apply.  */
22694 char _doprnt();
22695 char (*f)();
22696
22697 int main() {
22698
22699 /* The GNU C library defines this for functions which it implements
22700     to always fail with ENOSYS.  Some functions are actually named
22701     something starting with __ and the normal name is an alias.  */
22702 #if defined (__stub__doprnt) || defined (__stub____doprnt)
22703 choke me
22704 #else
22705 f = _doprnt;
22706 #endif
22707
22708 ; return 0; }
22709 EOF
22710 if { (eval echo configure:22711: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22711   rm -rf conftest*
22712   eval "ac_cv_func__doprnt=yes"
22713 else
22714   echo "configure: failed program was:" >&5
22715   cat conftest.$ac_ext >&5
22716   rm -rf conftest*
22717   eval "ac_cv_func__doprnt=no"
22718 fi
22719 rm -f conftest*
22720 fi
22721
22722 if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
22723   echo "$ac_t""yes" 1>&6
22724   cat >> confdefs.h <<\EOF
22725 #define HAVE_DOPRNT 1
22726 EOF
22727
22728 else
22729   echo "$ac_t""no" 1>&6
22730 fi
22731
22732 fi
22733
22734
22735 if test $ac_cv_func_vprintf = yes ; then
22736                 for ac_func in snprintf vsnprintf
22737 do
22738 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
22739 echo "configure:22740: checking for $ac_func" >&5
22740 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
22741   echo $ac_n "(cached) $ac_c" 1>&6
22742 else
22743   cat > conftest.$ac_ext <<EOF
22744 #line 22745 "configure"
22745 #include "confdefs.h"
22746 /* System header to define __stub macros and hopefully few prototypes,
22747     which can conflict with char $ac_func(); below.  */
22748 #include <assert.h>
22749 /* Override any gcc2 internal prototype to avoid an error.  */
22750 /* We use char because int might match the return type of a gcc2
22751     builtin and then its argument prototype would still apply.  */
22752 char $ac_func();
22753 char (*f)();
22754
22755 int main() {
22756
22757 /* The GNU C library defines this for functions which it implements
22758     to always fail with ENOSYS.  Some functions are actually named
22759     something starting with __ and the normal name is an alias.  */
22760 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
22761 choke me
22762 #else
22763 f = $ac_func;
22764 #endif
22765
22766 ; return 0; }
22767 EOF
22768 if { (eval echo configure:22769: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22769   rm -rf conftest*
22770   eval "ac_cv_func_$ac_func=yes"
22771 else
22772   echo "configure: failed program was:" >&5
22773   cat conftest.$ac_ext >&5
22774   rm -rf conftest*
22775   eval "ac_cv_func_$ac_func=no"
22776 fi
22777 rm -f conftest*
22778 fi
22779
22780 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
22781   echo "$ac_t""yes" 1>&6
22782     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
22783   cat >> confdefs.h <<EOF
22784 #define $ac_tr_func 1
22785 EOF
22786  
22787 else
22788   echo "$ac_t""no" 1>&6
22789 fi
22790 done
22791
22792 fi
22793
22794 for ac_func in \
22795         bcopy                   \
22796         closesocket             \
22797         chroot                  \
22798         endgrent                \
22799         endpwent                \
22800         fcntl                   \
22801         flock                   \
22802         fstat                   \
22803         getdtablesize   \
22804         getgrgid                \
22805         gethostname             \
22806         getpass                 \
22807         getpassphrase   \
22808         getpwuid                \
22809         getpwnam                \
22810         getspnam                \
22811         gettimeofday    \
22812         initgroups              \
22813         lockf                   \
22814         memcpy                  \
22815         memmove                 \
22816         mkstemp                 \
22817         mktemp                  \
22818         pipe                    \
22819         read                    \
22820         recv                    \
22821         recvfrom                \
22822         setpwfile               \
22823         setgid                  \
22824         setegid                 \
22825         setsid                  \
22826         setuid                  \
22827         seteuid                 \
22828         sigaction               \
22829         signal                  \
22830         sigset                  \
22831         strdup                  \
22832         strerror                \
22833         strpbrk                 \
22834         strrchr                 \
22835         strsep                  \
22836         strstr                  \
22837         strtol                  \
22838         strtoul                 \
22839         strtoq                  \
22840         strtouq                 \
22841         strtoll                 \
22842         strspn                  \
22843         sysconf                 \
22844         usleep                  \
22845         waitpid                 \
22846         wait4                   \
22847         write                   \
22848         send                    \
22849         sendmsg                 \
22850         sendto                  \
22851
22852 do
22853 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
22854 echo "configure:22855: checking for $ac_func" >&5
22855 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
22856   echo $ac_n "(cached) $ac_c" 1>&6
22857 else
22858   cat > conftest.$ac_ext <<EOF
22859 #line 22860 "configure"
22860 #include "confdefs.h"
22861 /* System header to define __stub macros and hopefully few prototypes,
22862     which can conflict with char $ac_func(); below.  */
22863 #include <assert.h>
22864 /* Override any gcc2 internal prototype to avoid an error.  */
22865 /* We use char because int might match the return type of a gcc2
22866     builtin and then its argument prototype would still apply.  */
22867 char $ac_func();
22868 char (*f)();
22869
22870 int main() {
22871
22872 /* The GNU C library defines this for functions which it implements
22873     to always fail with ENOSYS.  Some functions are actually named
22874     something starting with __ and the normal name is an alias.  */
22875 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
22876 choke me
22877 #else
22878 f = $ac_func;
22879 #endif
22880
22881 ; return 0; }
22882 EOF
22883 if { (eval echo configure:22884: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22884   rm -rf conftest*
22885   eval "ac_cv_func_$ac_func=yes"
22886 else
22887   echo "configure: failed program was:" >&5
22888   cat conftest.$ac_ext >&5
22889   rm -rf conftest*
22890   eval "ac_cv_func_$ac_func=no"
22891 fi
22892 rm -f conftest*
22893 fi
22894
22895 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
22896   echo "$ac_t""yes" 1>&6
22897     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
22898   cat >> confdefs.h <<EOF
22899 #define $ac_tr_func 1
22900 EOF
22901  
22902 else
22903   echo "$ac_t""no" 1>&6
22904 fi
22905 done
22906
22907
22908 for ac_func in getopt getpeereid
22909 do
22910 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
22911 echo "configure:22912: checking for $ac_func" >&5
22912 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
22913   echo $ac_n "(cached) $ac_c" 1>&6
22914 else
22915   cat > conftest.$ac_ext <<EOF
22916 #line 22917 "configure"
22917 #include "confdefs.h"
22918 /* System header to define __stub macros and hopefully few prototypes,
22919     which can conflict with char $ac_func(); below.  */
22920 #include <assert.h>
22921 /* Override any gcc2 internal prototype to avoid an error.  */
22922 /* We use char because int might match the return type of a gcc2
22923     builtin and then its argument prototype would still apply.  */
22924 char $ac_func();
22925 char (*f)();
22926
22927 int main() {
22928
22929 /* The GNU C library defines this for functions which it implements
22930     to always fail with ENOSYS.  Some functions are actually named
22931     something starting with __ and the normal name is an alias.  */
22932 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
22933 choke me
22934 #else
22935 f = $ac_func;
22936 #endif
22937
22938 ; return 0; }
22939 EOF
22940 if { (eval echo configure:22941: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22941   rm -rf conftest*
22942   eval "ac_cv_func_$ac_func=yes"
22943 else
22944   echo "configure: failed program was:" >&5
22945   cat conftest.$ac_ext >&5
22946   rm -rf conftest*
22947   eval "ac_cv_func_$ac_func=no"
22948 fi
22949 rm -f conftest*
22950 fi
22951
22952 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
22953   echo "$ac_t""yes" 1>&6
22954     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
22955   cat >> confdefs.h <<EOF
22956 #define $ac_tr_func 1
22957 EOF
22958  
22959 else
22960   echo "$ac_t""no" 1>&6
22961 LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
22962 fi
22963 done
22964
22965
22966
22967 if test "$ac_cv_func_getopt" != yes; then
22968         LIBSRCS="$LIBSRCS getopt.c"
22969 fi
22970 if test "$ac_cv_func_getpeereid" != yes; then
22971         echo $ac_n "checking for msg_accrights in msghdr""... $ac_c" 1>&6
22972 echo "configure:22973: checking for msg_accrights in msghdr" >&5
22973 if eval "test \"\${ol_cv_msghdr_msg_accrights+set}\" = set"; then
22974   echo $ac_n "(cached) $ac_c" 1>&6
22975 else
22976   cat > conftest.$ac_ext <<EOF
22977 #line 22978 "configure"
22978 #include "confdefs.h"
22979 #include <sys/socket.h>
22980 int main() {
22981 struct msghdr m; m.msg_accrightslen=0
22982 ; return 0; }
22983 EOF
22984 if { (eval echo configure:22985: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22985   rm -rf conftest*
22986   ol_cv_msghdr_msg_accrights=yes
22987 else
22988   echo "configure: failed program was:" >&5
22989   cat conftest.$ac_ext >&5
22990   rm -rf conftest*
22991   ol_cv_msghdr_msg_accrights=no
22992 fi
22993 rm -f conftest*
22994         
22995 fi
22996
22997 echo "$ac_t""$ol_cv_msghdr_msg_accrights" 1>&6
22998   if test $ol_cv_msghdr_msg_accrights = "yes" ; then
22999         cat >> confdefs.h <<\EOF
23000 #define HAVE_MSGHDR_MSG_ACCRIGHTS 1
23001 EOF
23002
23003   fi
23004
23005         LIBSRCS="$LIBSRCS getpeereid.c"
23006 fi
23007 if test "$ac_cv_func_snprintf" != yes -o "$ac_cv_func_vsnprintf" != yes; then
23008         if test "$ac_cv_func_snprintf" != yes; then
23009                 cat >> confdefs.h <<\EOF
23010 #define snprintf ber_pvt_snprintf
23011 EOF
23012
23013         fi
23014         if test "$ac_cv_func_vsnprintf" != yes; then
23015                 cat >> confdefs.h <<\EOF
23016 #define vsnprintf ber_pvt_vsnprintf
23017 EOF
23018
23019         fi
23020 fi
23021
23022 # Check Configuration
23023 echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6
23024 echo "configure:23025: checking declaration of sys_errlist" >&5
23025 if eval "test \"\${ol_cv_dcl_sys_errlist+set}\" = set"; then
23026   echo $ac_n "(cached) $ac_c" 1>&6
23027 else
23028   
23029         cat > conftest.$ac_ext <<EOF
23030 #line 23031 "configure"
23031 #include "confdefs.h"
23032
23033 #include <stdio.h>
23034 #include <sys/types.h>
23035 #include <errno.h>
23036 #ifdef WINNT
23037 #include <stdlib.h>
23038 #endif 
23039 int main() {
23040 char *c = (char *) *sys_errlist
23041 ; return 0; }
23042 EOF
23043 if { (eval echo configure:23044: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23044   rm -rf conftest*
23045   ol_cv_dcl_sys_errlist=yes
23046         ol_cv_have_sys_errlist=yes
23047 else
23048   echo "configure: failed program was:" >&5
23049   cat conftest.$ac_ext >&5
23050   rm -rf conftest*
23051   ol_cv_dcl_sys_errlist=no
23052 fi
23053 rm -f conftest*
23054 fi
23055
23056 echo "$ac_t""$ol_cv_dcl_sys_errlist" 1>&6
23057 #
23058 # It's possible (for near-UNIX clones) that sys_errlist doesn't exist
23059 if test $ol_cv_dcl_sys_errlist = no ; then
23060         cat >> confdefs.h <<\EOF
23061 #define DECL_SYS_ERRLIST 1
23062 EOF
23063
23064
23065         echo $ac_n "checking existence of sys_errlist""... $ac_c" 1>&6
23066 echo "configure:23067: checking existence of sys_errlist" >&5
23067 if eval "test \"\${ol_cv_have_sys_errlist+set}\" = set"; then
23068   echo $ac_n "(cached) $ac_c" 1>&6
23069 else
23070   
23071                 cat > conftest.$ac_ext <<EOF
23072 #line 23073 "configure"
23073 #include "confdefs.h"
23074 #include <errno.h>
23075 int main() {
23076 char *c = (char *) *sys_errlist
23077 ; return 0; }
23078 EOF
23079 if { (eval echo configure:23080: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
23080   rm -rf conftest*
23081   ol_cv_have_sys_errlist=yes
23082 else
23083   echo "configure: failed program was:" >&5
23084   cat conftest.$ac_ext >&5
23085   rm -rf conftest*
23086   ol_cv_have_sys_errlist=no
23087 fi
23088 rm -f conftest*
23089 fi
23090
23091 echo "$ac_t""$ol_cv_have_sys_errlist" 1>&6
23092 fi
23093 if test $ol_cv_have_sys_errlist = yes ; then
23094         cat >> confdefs.h <<\EOF
23095 #define HAVE_SYS_ERRLIST 1
23096 EOF
23097
23098 fi
23099
23100
23101
23102 if test "$ol_enable_slapi" != no ; then
23103                         for ac_hdr in ltdl.h
23104 do
23105 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
23106 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
23107 echo "configure:23108: checking for $ac_hdr" >&5
23108 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
23109   echo $ac_n "(cached) $ac_c" 1>&6
23110 else
23111   cat > conftest.$ac_ext <<EOF
23112 #line 23113 "configure"
23113 #include "confdefs.h"
23114 #include <$ac_hdr>
23115 EOF
23116 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
23117 { (eval echo configure:23118: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
23118 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
23119 if test -z "$ac_err"; then
23120   rm -rf conftest*
23121   eval "ac_cv_header_$ac_safe=yes"
23122 else
23123   echo "$ac_err" >&5
23124   echo "configure: failed program was:" >&5
23125   cat conftest.$ac_ext >&5
23126   rm -rf conftest*
23127   eval "ac_cv_header_$ac_safe=no"
23128 fi
23129 rm -f conftest*
23130 fi
23131 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
23132   echo "$ac_t""yes" 1>&6
23133     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
23134   cat >> confdefs.h <<EOF
23135 #define $ac_tr_hdr 1
23136 EOF
23137  
23138 else
23139   echo "$ac_t""no" 1>&6
23140 fi
23141 done
23142
23143
23144         if test $ac_cv_header_ltdl_h != yes ; then
23145                 { echo "configure: error: could not locate <ltdl.h>" 1>&2; exit 1; }
23146         fi
23147         echo $ac_n "checking for lt_dlinit in -lltdl""... $ac_c" 1>&6
23148 echo "configure:23149: checking for lt_dlinit in -lltdl" >&5
23149 ac_lib_var=`echo ltdl'_'lt_dlinit | sed 'y%./+-:%__p__%'`
23150 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
23151   echo $ac_n "(cached) $ac_c" 1>&6
23152 else
23153   ac_save_LIBS="$LIBS"
23154 LIBS="-lltdl  $LIBS"
23155 cat > conftest.$ac_ext <<EOF
23156 #line 23157 "configure"
23157 #include "confdefs.h"
23158 /* Override any gcc2 internal prototype to avoid an error.  */
23159 /* We use char because int might match the return type of a gcc2
23160     builtin and then its argument prototype would still apply.  */
23161 char lt_dlinit();
23162
23163 int main() {
23164 lt_dlinit()
23165 ; return 0; }
23166 EOF
23167 if { (eval echo configure:23168: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
23168   rm -rf conftest*
23169   eval "ac_cv_lib_$ac_lib_var=yes"
23170 else
23171   echo "configure: failed program was:" >&5
23172   cat conftest.$ac_ext >&5
23173   rm -rf conftest*
23174   eval "ac_cv_lib_$ac_lib_var=no"
23175 fi
23176 rm -f conftest*
23177 LIBS="$ac_save_LIBS"
23178
23179 fi
23180 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
23181   echo "$ac_t""yes" 1>&6
23182   
23183                 SLAPI_LIBS=-lltdl
23184                 LIBSLAPI=libslapi.a
23185                 LIBSLAPITOOLS=../libslapi.a
23186                 cat >> confdefs.h <<\EOF
23187 #define HAVE_LIBLTDL 1
23188 EOF
23189
23190         
23191 else
23192   echo "$ac_t""no" 1>&6
23193 { echo "configure: error: could not locate libtool -lltdl" 1>&2; exit 1; }
23194 fi
23195
23196
23197         cat >> confdefs.h <<\EOF
23198 #define LDAP_SLAPI 1
23199 EOF
23200
23201 fi
23202
23203 if test "$ol_enable_debug" != no ; then
23204         cat >> confdefs.h <<\EOF
23205 #define LDAP_DEBUG 1
23206 EOF
23207
23208 fi
23209 if test "$ol_enable_syslog" = yes ; then
23210         cat >> confdefs.h <<\EOF
23211 #define LDAP_SYSLOG 1
23212 EOF
23213
23214 fi
23215 if test "$ol_link_kbind" != no ; then
23216         cat >> confdefs.h <<\EOF
23217 #define LDAP_API_FEATURE_X_OPENLDAP_V2_KBIND LDAP_VENDOR_VERSION
23218 EOF
23219
23220 fi
23221 if test "$ol_enable_proctitle" != no ; then
23222         cat >> confdefs.h <<\EOF
23223 #define LDAP_PROCTITLE 1
23224 EOF
23225
23226 fi
23227 if test "$ol_enable_referrals" != no ; then
23228         cat >> confdefs.h <<\EOF
23229 #define LDAP_API_FEATURE_X_OPENLDAP_V2_REFERRALS LDAP_VENDOR_VERSION
23230 EOF
23231
23232 fi
23233 if test "$ol_enable_local" != no; then
23234         cat >> confdefs.h <<\EOF
23235 #define LDAP_PF_LOCAL 1
23236 EOF
23237
23238 fi
23239 if test "$ol_link_ipv6" != no; then
23240         cat >> confdefs.h <<\EOF
23241 #define LDAP_PF_INET6 1
23242 EOF
23243
23244 fi
23245 if test "$ol_enable_cleartext" != no ; then
23246         cat >> confdefs.h <<\EOF
23247 #define SLAPD_CLEARTEXT 1
23248 EOF
23249
23250 fi
23251 if test "$ol_enable_crypt" != no ; then
23252         cat >> confdefs.h <<\EOF
23253 #define SLAPD_CRYPT 1
23254 EOF
23255
23256 fi
23257 if test "$ol_link_spasswd" != no ; then
23258         cat >> confdefs.h <<\EOF
23259 #define SLAPD_SPASSWD 1
23260 EOF
23261
23262 fi
23263 if test "$ol_enable_multimaster" != no ; then
23264         cat >> confdefs.h <<\EOF
23265 #define SLAPD_MULTIMASTER 1
23266 EOF
23267
23268 fi
23269 if test "$ol_enable_rlookups" != no ; then
23270         cat >> confdefs.h <<\EOF
23271 #define SLAPD_RLOOKUPS 1
23272 EOF
23273
23274 fi
23275 if test "$ol_enable_aci" != no ; then
23276         cat >> confdefs.h <<\EOF
23277 #define SLAPD_ACI_ENABLED 1
23278 EOF
23279
23280 fi
23281
23282 if test "$ol_link_modules" != no ; then
23283         cat >> confdefs.h <<\EOF
23284 #define SLAPD_MODULES 1
23285 EOF
23286
23287         BUILD_SLAPD=yes
23288         SLAPD_MODULES_LDFLAGS="-dlopen self"
23289 fi
23290
23291 cat >> confdefs.h <<\EOF
23292 #define SLAPD_MOD_STATIC 1
23293 EOF
23294
23295 cat >> confdefs.h <<\EOF
23296 #define SLAPD_MOD_DYNAMIC 2
23297 EOF
23298
23299
23300 if test "$ol_enable_bdb" != no ; then
23301         BUILD_SLAPD=yes
23302         BUILD_BDB=$ol_enable_bdb
23303         if test "$ol_enable_bdb" = mod ; then
23304                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-bdb"
23305                 MFLAG=SLAPD_MOD_DYNAMIC
23306         else
23307                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-bdb"
23308                 MFLAG=SLAPD_MOD_STATIC
23309         fi
23310         cat >> confdefs.h <<EOF
23311 #define SLAPD_BDB $MFLAG
23312 EOF
23313
23314 fi
23315
23316 if test "$ol_enable_dnssrv" != no ; then
23317         BUILD_SLAPD=yes
23318         BUILD_DNSSRV=$ol_enable_dnssrv
23319         if test "$ol_enable_dnssrv" = mod ; then
23320                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-dnssrv"
23321                 MFLAG=SLAPD_MOD_DYNAMIC
23322         else
23323                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-dnssrv"
23324                 MFLAG=SLAPD_MOD_STATIC
23325         fi
23326         cat >> confdefs.h <<EOF
23327 #define SLAPD_DNSSRV $MFLAG
23328 EOF
23329
23330 fi
23331
23332 if test "$ol_enable_hdb" != no ; then
23333         BUILD_SLAPD=yes
23334         BUILD_HDB=$ol_enable_hdb
23335         if test "$ol_enable_hdb" = mod ; then
23336                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-hdb"
23337                 MFLAG=SLAPD_MOD_DYNAMIC
23338         else
23339                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-hdb"
23340                 MFLAG=SLAPD_MOD_STATIC
23341         fi
23342         cat >> confdefs.h <<EOF
23343 #define SLAPD_HDB $MFLAG
23344 EOF
23345
23346 fi
23347
23348 if test "$ol_enable_ldap" != no ; then
23349         BUILD_SLAPD=yes
23350         BUILD_LDAP=$ol_enable_ldap
23351         if test "$ol_enable_ldap" = mod ; then
23352                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-ldap"
23353                 MFLAG=SLAPD_MOD_DYNAMIC
23354         else
23355                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-ldap"
23356                 MFLAG=SLAPD_MOD_STATIC
23357         fi
23358         cat >> confdefs.h <<EOF
23359 #define SLAPD_LDAP $MFLAG
23360 EOF
23361
23362 fi
23363
23364 if test "$ol_link_ldbm" != no -a $ol_enable_ldbm != no; then
23365         BUILD_SLAPD=yes
23366         BUILD_LDBM=$ol_enable_ldbm
23367         if test "$ol_enable_ldbm" = mod ; then
23368                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-ldbm"
23369                 MFLAG=SLAPD_MOD_DYNAMIC
23370         else
23371                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-ldbm"
23372                 MFLAG=SLAPD_MOD_STATIC
23373         fi
23374         cat >> confdefs.h <<EOF
23375 #define SLAPD_LDBM $MFLAG
23376 EOF
23377
23378 fi
23379
23380 if test "$ol_enable_meta" != no ; then
23381         BUILD_SLAPD=yes
23382         BUILD_META=$ol_enable_meta
23383         BUILD_REWRITE=yes
23384         if test "$ol_enable_meta" = mod ; then
23385                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-meta"
23386                 MFLAG=SLAPD_MOD_DYNAMIC
23387         else
23388                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-meta"
23389                 MFLAG=SLAPD_MOD_STATIC
23390         fi
23391         cat >> confdefs.h <<EOF
23392 #define SLAPD_META $MFLAG
23393 EOF
23394
23395 fi
23396
23397 if test "$ol_enable_monitor" != no ; then
23398         BUILD_SLAPD=yes
23399         BUILD_MONITOR=$ol_enable_monitor
23400         if test "$ol_enable_monitor" = mod ; then
23401                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-monitor"
23402                 MFLAG=SLAPD_MOD_DYNAMIC
23403         else
23404                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-monitor"
23405                 MFLAG=SLAPD_MOD_STATIC
23406         fi
23407         cat >> confdefs.h <<EOF
23408 #define SLAPD_MONITOR $MFLAG
23409 EOF
23410
23411 fi
23412
23413 if test "$ol_enable_null" != no ; then
23414         BUILD_SLAPD=yes
23415         BUILD_NULL=$ol_enable_null
23416         if test "$ol_enable_null" = mod ; then
23417                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-null"
23418                 MFLAG=SLAPD_MOD_DYNAMIC
23419         else
23420                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-null"
23421                 MFLAG=SLAPD_MOD_STATIC
23422         fi
23423         cat >> confdefs.h <<EOF
23424 #define SLAPD_NULL $MFLAG
23425 EOF
23426
23427 fi
23428
23429 if test "$ol_enable_passwd" != no ; then
23430         BUILD_SLAPD=yes
23431         BUILD_PASSWD=$ol_enable_passwd
23432         if test "$ol_enable_passwd" = mod ; then
23433                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-passwd"
23434                 MFLAG=SLAPD_MOD_DYNAMIC
23435         else
23436                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-passwd"
23437                 MFLAG=SLAPD_MOD_STATIC
23438         fi
23439         cat >> confdefs.h <<EOF
23440 #define SLAPD_PASSWD $MFLAG
23441 EOF
23442
23443 fi
23444
23445 if test "$ol_link_perl" != no ; then
23446         BUILD_SLAPD=yes
23447         BUILD_PERL=$ol_enable_perl
23448         if test "$ol_enable_perl" = mod ; then
23449                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-perl"
23450                 MFLAG=SLAPD_MOD_DYNAMIC
23451         else
23452                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-perl"
23453                 MFLAG=SLAPD_MOD_STATIC
23454         fi
23455         cat >> confdefs.h <<EOF
23456 #define SLAPD_PERL $MFLAG
23457 EOF
23458
23459 fi
23460
23461 if test "$ol_enable_relay" != no ; then
23462         BUILD_SLAPD=yes
23463         BUILD_RELAY=$ol_enable_relay
23464         if test "$ol_enable_relay" = mod ; then
23465                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-relay"
23466                 MFLAG=SLAPD_MOD_DYNAMIC
23467         else
23468                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-relay"
23469                 MFLAG=SLAPD_MOD_STATIC
23470         fi
23471         cat >> confdefs.h <<EOF
23472 #define SLAPD_RELAY $MFLAG
23473 EOF
23474
23475 fi
23476
23477 if test "$ol_enable_shell" != no ; then
23478         if test "$ol_link_thread" != no ; then
23479                 echo "configure: warning: Use of --without-threads is recommended with back-shell" 1>&2
23480         fi
23481         BUILD_SLAPD=yes
23482         BUILD_SHELL=$ol_enable_shell
23483         if test "$ol_enable_shell" = mod ; then
23484                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-shell"
23485                 MFLAG=SLAPD_MOD_DYNAMIC
23486         else
23487                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-shell"
23488                 MFLAG=SLAPD_MOD_STATIC
23489         fi
23490         cat >> confdefs.h <<EOF
23491 #define SLAPD_SHELL $MFLAG
23492 EOF
23493
23494 fi
23495
23496 if test "$ol_link_sql" != no ; then
23497         BUILD_SLAPD=yes
23498         BUILD_SQL=$ol_enable_sql
23499         if test "$ol_enable_sql" = mod; then
23500                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-sql"
23501                 MFLAG=SLAPD_MOD_DYNAMIC
23502         else
23503                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-sql"
23504                 MFLAG=SLAPD_MOD_STATIC
23505         fi
23506         cat >> confdefs.h <<EOF
23507 #define SLAPD_SQL $MFLAG
23508 EOF
23509
23510 fi
23511
23512 if test "$ol_enable_chain" != no ; then
23513         BUILD_CHAIN=$ol_enable_chain
23514         if test "$ol_enable_chain" = mod ; then
23515                 MFLAG=SLAPD_MOD_DYNAMIC
23516                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS chain.la"
23517         else
23518                 MFLAG=SLAPD_MOD_STATIC
23519         fi
23520         cat >> confdefs.h <<EOF
23521 #define SLAPD_OVER_CHAIN $MFLAG
23522 EOF
23523
23524 fi
23525
23526 if test "$ol_enable_denyop" != no ; then
23527         BUILD_DENYOP=$ol_enable_denyop
23528         if test "$ol_enable_denyop" = mod ; then
23529                 MFLAG=SLAPD_MOD_DYNAMIC
23530                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS denyop.la"
23531         else
23532                 MFLAG=SLAPD_MOD_STATIC
23533         fi
23534         cat >> confdefs.h <<EOF
23535 #define SLAPD_OVER_DENYOP $MFLAG
23536 EOF
23537
23538 fi
23539
23540 if test "$ol_enable_dyngroup" != no ; then
23541         BUILD_DYNGROUP=$ol_enable_dyngroup
23542         if test "$ol_enable_dyngroup" = mod ; then
23543                 MFLAG=SLAPD_MOD_DYNAMIC
23544                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS dyngroup.la"
23545         else
23546                 MFLAG=SLAPD_MOD_STATIC
23547         fi
23548         cat >> confdefs.h <<EOF
23549 #define SLAPD_OVER_DYNGROUP $MFLAG
23550 EOF
23551
23552 fi
23553
23554 if test "$ol_enable_lastmod" != no ; then
23555         BUILD_LASTMOD=$ol_enable_lastmod
23556         if test "$ol_enable_lastmod" = mod ; then
23557                 MFLAG=SLAPD_MOD_DYNAMIC
23558                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS lastmod.la"
23559         else
23560                 MFLAG=SLAPD_MOD_STATIC
23561         fi
23562         cat >> confdefs.h <<EOF
23563 #define SLAPD_OVER_LASTMOD $MFLAG
23564 EOF
23565
23566 fi
23567
23568 if test "$ol_enable_ppolicy" != no ; then
23569         BUILD_PPOLICY=$ol_enable_ppolicy
23570         if test "$ol_enable_ppolicy" = mod ; then
23571                 MFLAG=SLAPD_MOD_DYNAMIC
23572                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS ppolicy.la"
23573         else
23574                 MFLAG=SLAPD_MOD_STATIC
23575         fi
23576         cat >> confdefs.h <<EOF
23577 #define SLAPD_OVER_PPOLICY $MFLAG
23578 EOF
23579
23580 fi
23581
23582 if test "$ol_enable_proxycache" != no ; then
23583         BUILD_PROXYCACHE=$ol_enable_proxycache
23584         if test "$ol_enable_proxycache" = mod ; then
23585                 MFLAG=SLAPD_MOD_DYNAMIC
23586                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS pcache.la"
23587         else
23588                 MFLAG=SLAPD_MOD_STATIC
23589         fi
23590         cat >> confdefs.h <<EOF
23591 #define SLAPD_OVER_PROXYCACHE $MFLAG
23592 EOF
23593
23594 fi
23595
23596 if test "$ol_enable_rwm" != no ; then
23597         BUILD_REWRITE=yes
23598         BUILD_RWM=$ol_enable_rwm
23599         if test "$ol_enable_rwm" = mod ; then
23600                 MFLAG=SLAPD_MOD_DYNAMIC
23601                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS rwm.la"
23602         else
23603                 MFLAG=SLAPD_MOD_STATIC
23604         fi
23605         cat >> confdefs.h <<EOF
23606 #define SLAPD_OVER_RWM $MFLAG
23607 EOF
23608
23609 fi
23610
23611 if test "$ol_enable_slurpd" != no -a "$ol_link_threads" != no -a \
23612         $BUILD_SLAPD = yes ; then
23613         BUILD_SLURPD=yes
23614 fi
23615
23616 if test "$ol_enable_rewrite" != no ; then
23617         cat >> confdefs.h <<\EOF
23618 #define ENABLE_REWRITE 1
23619 EOF
23620
23621         BUILD_REWRITE=yes
23622 fi
23623
23624 if test "$ol_enable_slapi" != no ; then
23625         cat >> confdefs.h <<\EOF
23626 #define ENABLE_SLAPI 1
23627 EOF
23628
23629         BUILD_SLAPI=yes
23630         SLAPD_SLAPI_DEPEND=libslapi.a
23631 fi
23632
23633
23634
23635 if test "$ac_cv_mingw32" = yes ; then
23636         PLAT=NT
23637         SLAPD_MODULES_LDFLAGS=
23638 else
23639         PLAT=UNIX
23640 fi
23641
23642 if test -z "$SLAPD_STATIC_BACKENDS"; then
23643         SLAPD_NO_STATIC='#'
23644 else
23645         SLAPD_NO_STATIC=
23646 fi
23647
23648
23649
23650
23651
23652
23653
23654   
23655   
23656   
23657   
23658   
23659   
23660   
23661   
23662   
23663   
23664   
23665   
23666   
23667   
23668   
23669   
23670   
23671   
23672   
23673   
23674   
23675   
23676
23677
23678
23679
23680
23681
23682
23683
23684
23685
23686
23687
23688
23689
23690
23691
23692
23693
23694
23695
23696
23697
23698
23699
23700
23701
23702
23703
23704
23705
23706
23707
23708
23709
23710
23711
23712
23713
23714 # Check whether --with-xxinstall or --without-xxinstall was given.
23715 if test "${with_xxinstall+set}" = set; then
23716   withval="$with_xxinstall"
23717   :
23718 fi
23719
23720
23721
23722 trap '' 1 2 15
23723
23724 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
23725
23726 test "x$prefix" = xNONE && prefix=$ac_default_prefix
23727 # Let make expand exec_prefix.
23728 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
23729
23730 # Any assignment to VPATH causes Sun make to only execute
23731 # the first set of double-colon rules, so remove it if not needed.
23732 # If there is a colon in the path, we need to keep it.
23733 if test "x$srcdir" = x.; then
23734   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
23735 fi
23736
23737 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
23738
23739 DEFS=-DHAVE_CONFIG_H
23740
23741 # Without the "./", some shells look in PATH for config.status.
23742 : ${CONFIG_STATUS=./config.status}
23743
23744 echo creating $CONFIG_STATUS
23745 rm -f $CONFIG_STATUS
23746 cat > $CONFIG_STATUS <<EOF
23747 #! /bin/sh
23748 # Generated automatically by configure.
23749 # Run this file to recreate the current configuration.
23750 # This directory was configured as follows,
23751 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
23752 #
23753 # $0 $ac_configure_args
23754 #
23755 # Compiler output produced by configure, useful for debugging
23756 # configure, is in ./config.log if it exists.
23757
23758 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
23759 for ac_option
23760 do
23761   case "\$ac_option" in
23762   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
23763     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
23764     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
23765   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
23766     echo "$CONFIG_STATUS generated by autoconf version 2.13.1"
23767     exit 0 ;;
23768   -help | --help | --hel | --he | --h)
23769     echo "\$ac_cs_usage"; exit 0 ;;
23770   *) echo "\$ac_cs_usage"; exit 1 ;;
23771   esac
23772 done
23773
23774 ac_given_srcdir=$srcdir
23775 ac_given_INSTALL="$INSTALL"
23776
23777 trap 'rm -fr `echo "\
23778 Makefile:build/top.mk:Makefile.in:build/dir.mk \
23779 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
23780 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
23781 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
23782 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
23783 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
23784 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
23785 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
23786 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
23787 include/Makefile:build/top.mk:include/Makefile.in \
23788 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
23789 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
23790 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
23791 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
23792 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk  \
23793 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
23794 libraries/librewrite/Makefile:build/top.mk:libraries/librewrite/Makefile.in:build/lib.mk:build/lib-static.mk \
23795 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
23796 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
23797 servers/slapd/back-bdb/Makefile:build/top.mk:servers/slapd/back-bdb/Makefile.in:build/mod.mk \
23798 servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
23799 servers/slapd/back-hdb/Makefile:build/top.mk:servers/slapd/back-hdb/Makefile.in:build/mod.mk \
23800 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
23801 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
23802 servers/slapd/back-meta/Makefile:build/top.mk:servers/slapd/back-meta/Makefile.in:build/mod.mk \
23803 servers/slapd/back-monitor/Makefile:build/top.mk:servers/slapd/back-monitor/Makefile.in:build/mod.mk \
23804 servers/slapd/back-null/Makefile:build/top.mk:servers/slapd/back-null/Makefile.in:build/mod.mk \
23805 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
23806 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
23807 servers/slapd/back-relay/Makefile:build/top.mk:servers/slapd/back-relay/Makefile.in:build/mod.mk \
23808 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
23809 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
23810 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
23811 servers/slapd/slapi/Makefile:build/top.mk:servers/slapd/slapi/Makefile.in:build/lib.mk:build/lib-shared.mk  \
23812 servers/slapd/overlays/Makefile:build/top.mk:servers/slapd/overlays/Makefile.in:build/lib.mk \
23813 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
23814 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
23815 tests/run \
23816 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
23817  include/portable.h include/ldap_features.h include/lber_types.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
23818 EOF
23819 cat >> $CONFIG_STATUS <<EOF
23820
23821 # Protect against being on the right side of a sed subst in config.status.
23822 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
23823  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
23824 $ac_vpsub
23825 $extrasub
23826 s%@SHELL@%$SHELL%g
23827 s%@CFLAGS@%$CFLAGS%g
23828 s%@CPPFLAGS@%$CPPFLAGS%g
23829 s%@CXXFLAGS@%$CXXFLAGS%g
23830 s%@FFLAGS@%$FFLAGS%g
23831 s%@DEFS@%$DEFS%g
23832 s%@LDFLAGS@%$LDFLAGS%g
23833 s%@LIBS@%$LIBS%g
23834 s%@exec_prefix@%$exec_prefix%g
23835 s%@prefix@%$prefix%g
23836 s%@program_transform_name@%$program_transform_name%g
23837 s%@bindir@%$bindir%g
23838 s%@sbindir@%$sbindir%g
23839 s%@libexecdir@%$libexecdir%g
23840 s%@datadir@%$datadir%g
23841 s%@sysconfdir@%$sysconfdir%g
23842 s%@sharedstatedir@%$sharedstatedir%g
23843 s%@localstatedir@%$localstatedir%g
23844 s%@libdir@%$libdir%g
23845 s%@includedir@%$includedir%g
23846 s%@oldincludedir@%$oldincludedir%g
23847 s%@infodir@%$infodir%g
23848 s%@mandir@%$mandir%g
23849 s%@host@%$host%g
23850 s%@host_alias@%$host_alias%g
23851 s%@host_cpu@%$host_cpu%g
23852 s%@host_vendor@%$host_vendor%g
23853 s%@host_os@%$host_os%g
23854 s%@target@%$target%g
23855 s%@target_alias@%$target_alias%g
23856 s%@target_cpu@%$target_cpu%g
23857 s%@target_vendor@%$target_vendor%g
23858 s%@target_os@%$target_os%g
23859 s%@build@%$build%g
23860 s%@build_alias@%$build_alias%g
23861 s%@build_cpu@%$build_cpu%g
23862 s%@build_vendor@%$build_vendor%g
23863 s%@build_os@%$build_os%g
23864 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
23865 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
23866 s%@INSTALL_DATA@%$INSTALL_DATA%g
23867 s%@PACKAGE@%$PACKAGE%g
23868 s%@VERSION@%$VERSION%g
23869 s%@ACLOCAL@%$ACLOCAL%g
23870 s%@AUTOCONF@%$AUTOCONF%g
23871 s%@AUTOMAKE@%$AUTOMAKE%g
23872 s%@AUTOHEADER@%$AUTOHEADER%g
23873 s%@MAKEINFO@%$MAKEINFO%g
23874 s%@install_sh@%$install_sh%g
23875 s%@AMTAR@%$AMTAR%g
23876 s%@AWK@%$AWK%g
23877 s%@AMTARFLAGS@%$AMTARFLAGS%g
23878 s%@SET_MAKE@%$SET_MAKE%g
23879 s%@OPENLDAP_LIBRELEASE@%$OPENLDAP_LIBRELEASE%g
23880 s%@OPENLDAP_LIBVERSION@%$OPENLDAP_LIBVERSION%g
23881 s%@OPENLDAP_RELEASE_DATE@%$OPENLDAP_RELEASE_DATE%g
23882 s%@top_builddir@%$top_builddir%g
23883 s%@ldap_subdir@%$ldap_subdir%g
23884 s%@CC@%$CC%g
23885 s%@AR@%$AR%g
23886 s%@LN_S@%$LN_S%g
23887 s%@OBJEXT@%$OBJEXT%g
23888 s%@EXEEXT@%$EXEEXT%g
23889 s%@ECHO@%$ECHO%g
23890 s%@RANLIB@%$RANLIB%g
23891 s%@STRIP@%$STRIP%g
23892 s%@DLLTOOL@%$DLLTOOL%g
23893 s%@AS@%$AS%g
23894 s%@OBJDUMP@%$OBJDUMP%g
23895 s%@CPP@%$CPP%g
23896 s%@LIBTOOL@%$LIBTOOL%g
23897 s%@LN_H@%$LN_H%g
23898 s%@PERLBIN@%$PERLBIN%g
23899 s%@OL_MKDEP@%$OL_MKDEP%g
23900 s%@OL_MKDEP_FLAGS@%$OL_MKDEP_FLAGS%g
23901 s%@LTSTATIC@%$LTSTATIC%g
23902 s%@LIBOBJS@%$LIBOBJS%g
23903 s%@LIBSRCS@%$LIBSRCS%g
23904 s%@PLAT@%$PLAT%g
23905 s%@WITH_TLS@%$WITH_TLS%g
23906 s%@BUILD_LIBS_DYNAMIC@%$BUILD_LIBS_DYNAMIC%g
23907 s%@BUILD_SLAPD@%$BUILD_SLAPD%g
23908 s%@BUILD_SLAPI@%$BUILD_SLAPI%g
23909 s%@SLAPD_SLAPI_DEPEND@%$SLAPD_SLAPI_DEPEND%g
23910 s%@BUILD_BDB@%$BUILD_BDB%g
23911 s%@BUILD_DNSSRV@%$BUILD_DNSSRV%g
23912 s%@BUILD_HDB@%$BUILD_HDB%g
23913 s%@BUILD_LDAP@%$BUILD_LDAP%g
23914 s%@BUILD_LDBM@%$BUILD_LDBM%g
23915 s%@BUILD_META@%$BUILD_META%g
23916 s%@BUILD_MONITOR@%$BUILD_MONITOR%g
23917 s%@BUILD_NULL@%$BUILD_NULL%g
23918 s%@BUILD_PASSWD@%$BUILD_PASSWD%g
23919 s%@BUILD_RELAY@%$BUILD_RELAY%g
23920 s%@BUILD_PERL@%$BUILD_PERL%g
23921 s%@BUILD_SHELL@%$BUILD_SHELL%g
23922 s%@BUILD_SQL@%$BUILD_SQL%g
23923 s%@BUILD_CHAIN@%$BUILD_CHAIN%g
23924 s%@BUILD_DENYOP@%$BUILD_DENYOP%g
23925 s%@BUILD_DYNGROUP@%$BUILD_DYNGROUP%g
23926 s%@BUILD_LASTMOD@%$BUILD_LASTMOD%g
23927 s%@BUILD_PPOLICY@%$BUILD_PPOLICY%g
23928 s%@BUILD_PROXYCACHE@%$BUILD_PROXYCACHE%g
23929 s%@BUILD_RWM@%$BUILD_RWM%g
23930 s%@BUILD_SLURPD@%$BUILD_SLURPD%g
23931 s%@LDAP_LIBS@%$LDAP_LIBS%g
23932 s%@SLAPD_LIBS@%$SLAPD_LIBS%g
23933 s%@SLURPD_LIBS@%$SLURPD_LIBS%g
23934 s%@LDBM_LIBS@%$LDBM_LIBS%g
23935 s%@LTHREAD_LIBS@%$LTHREAD_LIBS%g
23936 s%@LUTIL_LIBS@%$LUTIL_LIBS%g
23937 s%@WRAP_LIBS@%$WRAP_LIBS%g
23938 s%@SLAPD_MODULES_CPPFLAGS@%$SLAPD_MODULES_CPPFLAGS%g
23939 s%@SLAPD_MODULES_LDFLAGS@%$SLAPD_MODULES_LDFLAGS%g
23940 s%@SLAPD_NO_STATIC@%$SLAPD_NO_STATIC%g
23941 s%@SLAPD_STATIC_BACKENDS@%$SLAPD_STATIC_BACKENDS%g
23942 s%@SLAPD_DYNAMIC_BACKENDS@%$SLAPD_DYNAMIC_BACKENDS%g
23943 s%@SLAPD_DYNAMIC_OVERLAYS@%$SLAPD_DYNAMIC_OVERLAYS%g
23944 s%@PERL_CPPFLAGS@%$PERL_CPPFLAGS%g
23945 s%@SLAPD_PERL_LDFLAGS@%$SLAPD_PERL_LDFLAGS%g
23946 s%@MOD_PERL_LDFLAGS@%$MOD_PERL_LDFLAGS%g
23947 s%@KRB4_LIBS@%$KRB4_LIBS%g
23948 s%@KRB5_LIBS@%$KRB5_LIBS%g
23949 s%@SASL_LIBS@%$SASL_LIBS%g
23950 s%@TLS_LIBS@%$TLS_LIBS%g
23951 s%@MODULES_LIBS@%$MODULES_LIBS%g
23952 s%@SLAPI_LIBS@%$SLAPI_LIBS%g
23953 s%@LIBSLAPI@%$LIBSLAPI%g
23954 s%@LIBSLAPITOOLS@%$LIBSLAPITOOLS%g
23955 s%@AUTH_LIBS@%$AUTH_LIBS%g
23956 s%@SLAPD_SLP_LIBS@%$SLAPD_SLP_LIBS%g
23957 s%@SLAPD_SQL_LDFLAGS@%$SLAPD_SQL_LDFLAGS%g
23958 s%@SLAPD_SQL_LIBS@%$SLAPD_SQL_LIBS%g
23959 s%@SLAPD_SQL_INCLUDES@%$SLAPD_SQL_INCLUDES%g
23960
23961 CEOF
23962 EOF
23963
23964 cat >> $CONFIG_STATUS <<\EOF
23965
23966 # Split the substitutions into bite-sized pieces for seds with
23967 # small command number limits, like on Digital OSF/1 and HP-UX.
23968 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
23969 ac_file=1 # Number of current file.
23970 ac_beg=1 # First line for current file.
23971 ac_end=$ac_max_sed_cmds # Line after last line for current file.
23972 ac_more_lines=:
23973 ac_sed_cmds=""
23974 while $ac_more_lines; do
23975   if test $ac_beg -gt 1; then
23976     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
23977   else
23978     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
23979   fi
23980   if test ! -s conftest.s$ac_file; then
23981     ac_more_lines=false
23982     rm -f conftest.s$ac_file
23983   else
23984     if test -z "$ac_sed_cmds"; then
23985       ac_sed_cmds="sed -f conftest.s$ac_file"
23986     else
23987       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
23988     fi
23989     ac_file=`expr $ac_file + 1`
23990     ac_beg=$ac_end
23991     ac_end=`expr $ac_end + $ac_max_sed_cmds`
23992   fi
23993 done
23994 if test -z "$ac_sed_cmds"; then
23995   ac_sed_cmds=cat
23996 fi
23997 EOF
23998
23999 cat >> $CONFIG_STATUS <<EOF
24000
24001 CONFIG_FILES=\${CONFIG_FILES-"\
24002 Makefile:build/top.mk:Makefile.in:build/dir.mk \
24003 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
24004 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
24005 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
24006 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
24007 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
24008 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
24009 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
24010 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
24011 include/Makefile:build/top.mk:include/Makefile.in \
24012 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
24013 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
24014 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
24015 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
24016 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk  \
24017 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
24018 libraries/librewrite/Makefile:build/top.mk:libraries/librewrite/Makefile.in:build/lib.mk:build/lib-static.mk \
24019 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
24020 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
24021 servers/slapd/back-bdb/Makefile:build/top.mk:servers/slapd/back-bdb/Makefile.in:build/mod.mk \
24022 servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
24023 servers/slapd/back-hdb/Makefile:build/top.mk:servers/slapd/back-hdb/Makefile.in:build/mod.mk \
24024 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
24025 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
24026 servers/slapd/back-meta/Makefile:build/top.mk:servers/slapd/back-meta/Makefile.in:build/mod.mk \
24027 servers/slapd/back-monitor/Makefile:build/top.mk:servers/slapd/back-monitor/Makefile.in:build/mod.mk \
24028 servers/slapd/back-null/Makefile:build/top.mk:servers/slapd/back-null/Makefile.in:build/mod.mk \
24029 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
24030 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
24031 servers/slapd/back-relay/Makefile:build/top.mk:servers/slapd/back-relay/Makefile.in:build/mod.mk \
24032 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
24033 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
24034 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
24035 servers/slapd/slapi/Makefile:build/top.mk:servers/slapd/slapi/Makefile.in:build/lib.mk:build/lib-shared.mk  \
24036 servers/slapd/overlays/Makefile:build/top.mk:servers/slapd/overlays/Makefile.in:build/lib.mk \
24037 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
24038 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
24039 tests/run \
24040 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
24041 "}
24042 EOF
24043 cat >> $CONFIG_STATUS <<\EOF
24044 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
24045   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
24046   case "$ac_file" in
24047   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
24048        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
24049   *) ac_file_in="${ac_file}.in" ;;
24050   esac
24051
24052   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
24053
24054   # Remove last slash and all that follows it.  Not all systems have dirname.
24055   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
24056   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
24057     # The file is in a subdirectory.
24058     test ! -d "$ac_dir" && mkdir "$ac_dir"
24059     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
24060     # A "../" for each directory in $ac_dir_suffix.
24061     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
24062   else
24063     ac_dir_suffix= ac_dots=
24064   fi
24065
24066   case "$ac_given_srcdir" in
24067   .)  srcdir=.
24068       if test -z "$ac_dots"; then top_srcdir=.
24069       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
24070   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
24071   *) # Relative path.
24072     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
24073     top_srcdir="$ac_dots$ac_given_srcdir" ;;
24074   esac
24075
24076   case "$ac_given_INSTALL" in
24077   [/$]*) INSTALL="$ac_given_INSTALL" ;;
24078   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
24079   esac
24080
24081   echo creating "$ac_file"
24082   rm -f "$ac_file"
24083   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
24084   case "$ac_file" in
24085   *[Mm]akefile*) ac_comsub="1i\\
24086 # $configure_input" ;;
24087   *) ac_comsub= ;;
24088   esac
24089
24090   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
24091   sed -e "$ac_comsub
24092 s%@configure_input@%$configure_input%g
24093 s%@srcdir@%$srcdir%g
24094 s%@top_srcdir@%$top_srcdir%g
24095 s%@INSTALL@%$INSTALL%g
24096 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
24097 fi; done
24098 rm -f conftest.s*
24099
24100 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
24101 # NAME is the cpp macro being defined and VALUE is the value it is being given.
24102 #
24103 # ac_d sets the value in "#define NAME VALUE" lines.
24104 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
24105 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
24106 ac_dC='\3'
24107 ac_dD='%g'
24108 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
24109 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
24110 ac_uB='\([      ]\)%\1#\2define\3'
24111 ac_uC=' '
24112 ac_uD='\4%g'
24113 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
24114 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
24115 ac_eB='$%\1#\2define\3'
24116 ac_eC=' '
24117 ac_eD='%g'
24118
24119 if test "${CONFIG_HEADERS+set}" != set; then
24120 EOF
24121 cat >> $CONFIG_STATUS <<EOF
24122   CONFIG_HEADERS="include/portable.h include/ldap_features.h include/lber_types.h"
24123 EOF
24124 cat >> $CONFIG_STATUS <<\EOF
24125 fi
24126 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
24127   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
24128   case "$ac_file" in
24129   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
24130        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
24131   *) ac_file_in="${ac_file}.in" ;;
24132   esac
24133
24134   echo creating $ac_file
24135
24136   rm -f conftest.frag conftest.in conftest.out
24137   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
24138   cat $ac_file_inputs > conftest.in
24139
24140 EOF
24141
24142 # Transform confdefs.h into a sed script conftest.vals that substitutes
24143 # the proper values into config.h.in to produce config.h.  And first:
24144 # Protect against being on the right side of a sed subst in config.status.
24145 # Protect against being in an unquoted here document in config.status.
24146 rm -f conftest.vals
24147 cat > conftest.hdr <<\EOF
24148 s/[\\&%]/\\&/g
24149 s%[\\$`]%\\&%g
24150 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
24151 s%ac_d%ac_u%gp
24152 s%ac_u%ac_e%gp
24153 EOF
24154 sed -n -f conftest.hdr confdefs.h > conftest.vals
24155 rm -f conftest.hdr
24156
24157 # This sed command replaces #undef with comments.  This is necessary, for
24158 # example, in the case of _POSIX_SOURCE, which is predefined and required
24159 # on some systems where configure will not decide to define it.
24160 cat >> conftest.vals <<\EOF
24161 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
24162 EOF
24163
24164 # Break up conftest.vals because some shells have a limit on
24165 # the size of here documents, and old seds have small limits too.
24166
24167 rm -f conftest.tail
24168 while :
24169 do
24170   ac_lines=`grep -c . conftest.vals`
24171   # grep -c gives empty output for an empty file on some AIX systems.
24172   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
24173   # Write a limited-size here document to conftest.frag.
24174   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
24175   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
24176   echo 'CEOF
24177   sed -f conftest.frag conftest.in > conftest.out
24178   rm -f conftest.in
24179   mv conftest.out conftest.in
24180 ' >> $CONFIG_STATUS
24181   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
24182   rm -f conftest.vals
24183   mv conftest.tail conftest.vals
24184 done
24185 rm -f conftest.vals
24186
24187 cat >> $CONFIG_STATUS <<\EOF
24188   rm -f conftest.frag conftest.h
24189   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
24190   cat conftest.in >> conftest.h
24191   rm -f conftest.in
24192   if cmp -s $ac_file conftest.h 2>/dev/null; then
24193     echo "$ac_file is unchanged"
24194     rm -f conftest.h
24195   else
24196     # Remove last slash and all that follows it.  Not all systems have dirname.
24197       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
24198       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
24199       # The file is in a subdirectory.
24200       test ! -d "$ac_dir" && mkdir "$ac_dir"
24201     fi
24202     rm -f $ac_file
24203     mv conftest.h $ac_file
24204   fi
24205 fi; done
24206
24207 EOF
24208 cat >> $CONFIG_STATUS <<EOF
24209
24210 EOF
24211 cat >> $CONFIG_STATUS <<\EOF
24212
24213 chmod +x tests/run
24214 date > stamp-h
24215 echo Please run \"make depend\" to build dependencies
24216
24217 exit 0
24218 EOF
24219 chmod +x $CONFIG_STATUS
24220 rm -fr confdefs* $ac_clean_files
24221 test "$no_create" = yes || $SHELL $CONFIG_STATUS || exit 1
24222