]> git.sur5r.net Git - openldap/blob - configure
import fix from HEAD (error return when there's no write access to naming attributes...
[openldap] / configure
1 #! /bin/sh
2 # $OpenLDAP$
3 # from OpenLDAP: pkg/ldap/configure.in,v 1.478.2.21 2004/07/26 18:15:05 hyc 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-shell        enable shell backend no|yes|mod [no]"
113 ac_help="$ac_help
114     --enable-sql          enable sql backend no|yes|mod [no]"
115 ac_help="$ac_help
116
117 SLAPD Overlay Options:"
118 ac_help="$ac_help
119     --enable-dyngroup     Dynamic Group overlay no|yes|mod [no]"
120 ac_help="$ac_help
121     --enable-proxycache   Proxy Cache overlay no|yes|mod [no]"
122 ac_help="$ac_help
123
124 SLURPD (Replication Daemon) Options:"
125 ac_help="$ac_help
126   --enable-slurpd         enable building slurpd [auto]"
127 ac_help="$ac_help
128
129 Library Generation & Linking Options"
130 ac_help="$ac_help
131   --enable-static[=PKGS]  build static libraries [default=yes]"
132 ac_help="$ac_help
133   --enable-shared[=PKGS]  build shared libraries [default=yes]"
134 ac_help="$ac_help
135   --enable-fast-install[=PKGS]  optimize for fast installation [default=yes]"
136 ac_help="$ac_help
137   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]"
138
139 # Find the correct PATH separator.  Usually this is `:', but
140 # DJGPP uses `;' like DOS.
141 if test "X${PATH_SEPARATOR+set}" != Xset; then
142   UNAME=${UNAME-`uname 2>/dev/null`}
143   case X$UNAME in
144     *-DOS) lt_cv_sys_path_separator=';' ;;
145     *)     lt_cv_sys_path_separator=':' ;;
146   esac
147   PATH_SEPARATOR=$lt_cv_sys_path_separator
148 fi
149
150
151 # Check that we are running under the correct shell.
152 SHELL=${CONFIG_SHELL-/bin/sh}
153
154 case X$ECHO in
155 X*--fallback-echo)
156   # Remove one level of quotation (which was required for Make).
157   ECHO=`echo "$ECHO" | sed 's,\\\\\$\\$0,'$0','`
158   ;;
159 esac
160
161 echo=${ECHO-echo}
162 if test "X$1" = X--no-reexec; then
163   # Discard the --no-reexec flag, and continue.
164   shift
165 elif test "X$1" = X--fallback-echo; then
166   # Avoid inline document here, it may be left over
167   :
168 elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then
169   # Yippee, $echo works!
170   :
171 else
172   # Restart under the correct shell.
173   exec $SHELL "$0" --no-reexec ${1+"$@"}
174 fi
175
176 if test "X$1" = X--fallback-echo; then
177   # used as fallback echo
178   shift
179   cat <<EOF
180
181 EOF
182   exit 0
183 fi
184
185 # The HP-UX ksh and POSIX shell print the target directory to stdout
186 # if CDPATH is set.
187 if test "X${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
188
189 if test -z "$ECHO"; then
190 if test "X${echo_test_string+set}" != Xset; then
191 # find a string as large as possible, as long as the shell can cope with it
192   for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do
193     # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
194     if (echo_test_string="`eval $cmd`") 2>/dev/null &&
195        echo_test_string="`eval $cmd`" &&
196        (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
197     then
198       break
199     fi
200   done
201 fi
202
203 if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
204    echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
205    test "X$echo_testing_string" = "X$echo_test_string"; then
206   :
207 else
208   # The Solaris, AIX, and Digital Unix default echo programs unquote
209   # backslashes.  This makes it impossible to quote backslashes using
210   #   echo "$something" | sed 's/\\/\\\\/g'
211   #
212   # So, first we look for a working echo in the user's PATH.
213
214   IFS="${IFS=   }"; save_ifs="$IFS"; IFS=$PATH_SEPARATOR
215   for dir in $PATH /usr/ucb; do
216     if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
217        test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
218        echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
219        test "X$echo_testing_string" = "X$echo_test_string"; then
220       echo="$dir/echo"
221       break
222     fi
223   done
224   IFS="$save_ifs"
225
226   if test "X$echo" = Xecho; then
227     # We didn't find a better echo, so look for alternatives.
228     if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
229        echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
230        test "X$echo_testing_string" = "X$echo_test_string"; then
231       # This shell has a builtin print -r that does the trick.
232       echo='print -r'
233     elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
234          test "X$CONFIG_SHELL" != X/bin/ksh; then
235       # If we have ksh, try running configure again with it.
236       ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
237       export ORIGINAL_CONFIG_SHELL
238       CONFIG_SHELL=/bin/ksh
239       export CONFIG_SHELL
240       exec $CONFIG_SHELL "$0" --no-reexec ${1+"$@"}
241     else
242       # Try using printf.
243       echo='printf %s\n'
244       if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
245          echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
246          test "X$echo_testing_string" = "X$echo_test_string"; then
247         # Cool, printf works
248         :
249       elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` &&
250            test "X$echo_testing_string" = 'X\t' &&
251            echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
252            test "X$echo_testing_string" = "X$echo_test_string"; then
253         CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
254         export CONFIG_SHELL
255         SHELL="$CONFIG_SHELL"
256         export SHELL
257         echo="$CONFIG_SHELL $0 --fallback-echo"
258       elif echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` &&
259            test "X$echo_testing_string" = 'X\t' &&
260            echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
261            test "X$echo_testing_string" = "X$echo_test_string"; then
262         echo="$CONFIG_SHELL $0 --fallback-echo"
263       else
264         # maybe with a smaller string...
265         prev=:
266
267         for cmd in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed 50q "$0"'; do
268           if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
269           then
270             break
271           fi
272           prev="$cmd"
273         done
274
275         if test "$prev" != 'sed 50q "$0"'; then
276           echo_test_string=`eval $prev`
277           export echo_test_string
278           exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "$0" ${1+"$@"}
279         else
280           # Oops.  We lost completely, so just stick with echo.
281           echo=echo
282         fi
283       fi
284     fi
285   fi
286 fi
287 fi
288
289 # Copy echo and quote the copy suitably for passing to libtool from
290 # the Makefile, instead of quoting the original, which is used later.
291 ECHO=$echo
292 if test "X$ECHO" = "X$CONFIG_SHELL $0 --fallback-echo"; then
293    ECHO="$CONFIG_SHELL \\\$\$0 --fallback-echo"
294 fi
295
296
297 ac_help="$ac_help
298   --disable-libtool-lock  avoid locking (might break parallel builds)"
299 ac_help="$ac_help
300   --with-pic              try to use only PIC/non-PIC objects [default=use both]"
301 ac_help="$ac_help
302
303 See INSTALL file for further details."
304
305 # Initialize some variables set by options.
306 # The variables have the same names as the options, with
307 # dashes changed to underlines.
308 build=NONE
309 cache_file=./config.cache
310 exec_prefix=NONE
311 host=NONE
312 no_create=
313 nonopt=NONE
314 no_recursion=
315 prefix=NONE
316 program_prefix=NONE
317 program_suffix=NONE
318 program_transform_name=s,x,x,
319 silent=
320 site=
321 srcdir=
322 target=NONE
323 verbose=
324 x_includes=NONE
325 x_libraries=NONE
326 bindir='${exec_prefix}/bin'
327 sbindir='${exec_prefix}/sbin'
328 libexecdir='${exec_prefix}/libexec'
329 datadir='${prefix}/share'
330 sysconfdir='${prefix}/etc'
331 sharedstatedir='${prefix}/com'
332 localstatedir='${prefix}/var'
333 libdir='${exec_prefix}/lib'
334 includedir='${prefix}/include'
335 oldincludedir='/usr/include'
336 infodir='${prefix}/info'
337 mandir='${prefix}/man'
338
339 # Initialize some other variables.
340 subdirs=
341 MFLAGS= MAKEFLAGS=
342 SHELL=${CONFIG_SHELL-/bin/sh}
343 # Maximum number of lines to put in a shell here document.
344 ac_max_here_lines=12
345
346 ac_prev=
347 for ac_option
348 do
349
350   # If the previous option needs an argument, assign it.
351   if test -n "$ac_prev"; then
352     eval "$ac_prev=\$ac_option"
353     ac_prev=
354     continue
355   fi
356
357   case "$ac_option" in
358   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
359   *) ac_optarg= ;;
360   esac
361
362   # Accept the important Cygnus configure options, so we can diagnose typos.
363
364   case "$ac_option" in
365
366   -bindir | --bindir | --bindi | --bind | --bin | --bi)
367     ac_prev=bindir ;;
368   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
369     bindir="$ac_optarg" ;;
370
371   -build | --build | --buil | --bui | --bu)
372     ac_prev=build ;;
373   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
374     build="$ac_optarg" ;;
375
376   -cache-file | --cache-file | --cache-fil | --cache-fi \
377   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
378     ac_prev=cache_file ;;
379   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
380   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
381     cache_file="$ac_optarg" ;;
382
383   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
384     ac_prev=datadir ;;
385   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
386   | --da=*)
387     datadir="$ac_optarg" ;;
388
389   -disable-* | --disable-*)
390     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
391     # Reject names that are not valid shell variable names.
392     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
393       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
394     fi
395     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
396     eval "enable_${ac_feature}=no" ;;
397
398   -enable-* | --enable-*)
399     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
400     # Reject names that are not valid shell variable names.
401     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
402       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
403     fi
404     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
405     case "$ac_option" in
406       *=*) ;;
407       *) ac_optarg=yes ;;
408     esac
409     eval "enable_${ac_feature}='$ac_optarg'" ;;
410
411   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
412   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
413   | --exec | --exe | --ex)
414     ac_prev=exec_prefix ;;
415   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
416   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
417   | --exec=* | --exe=* | --ex=*)
418     exec_prefix="$ac_optarg" ;;
419
420   -gas | --gas | --ga | --g)
421     # Obsolete; use --with-gas.
422     with_gas=yes ;;
423
424   -help | --help | --hel | --he)
425     # Omit some internal or obsolete options to make the list less imposing.
426     # This message is too long to be a string in the A/UX 3.1 sh.
427     cat << EOF
428 Usage: configure [options] [host]
429 Options: [defaults in brackets after descriptions]
430 Configuration:
431   --cache-file=FILE       cache test results in FILE
432   --help                  print this message
433   --no-create             do not create output files
434   --quiet, --silent       do not print \`checking...' messages
435   --version               print the version of autoconf that created configure
436 Directory and file names:
437   --prefix=PREFIX         install architecture-independent files in PREFIX
438                           [$ac_default_prefix]
439   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
440                           [same as prefix]
441   --bindir=DIR            user executables in DIR [EPREFIX/bin]
442   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
443   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
444   --datadir=DIR           read-only architecture-independent data in DIR
445                           [PREFIX/share]
446   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
447   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
448                           [PREFIX/com]
449   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
450   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
451   --includedir=DIR        C header files in DIR [PREFIX/include]
452   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
453   --infodir=DIR           info documentation in DIR [PREFIX/info]
454   --mandir=DIR            man documentation in DIR [PREFIX/man]
455   --srcdir=DIR            find the sources in DIR [configure dir or ..]
456   --program-prefix=PREFIX prepend PREFIX to installed program names
457   --program-suffix=SUFFIX append SUFFIX to installed program names
458   --program-transform-name=PROGRAM
459                           run sed PROGRAM on installed program names
460 EOF
461     cat << EOF
462 Host type:
463   --build=BUILD           configure for building on BUILD [BUILD=HOST]
464   --host=HOST             configure for HOST [guessed]
465   --target=TARGET         configure for TARGET [TARGET=HOST]
466 Features and packages:
467   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
468   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
469   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
470   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
471   --x-includes=DIR        X include files are in DIR
472   --x-libraries=DIR       X library files are in DIR
473 EOF
474     if test -n "$ac_help"; then
475       echo "--enable and --with options recognized:$ac_help"
476     fi
477     exit 0 ;;
478
479   -host | --host | --hos | --ho)
480     ac_prev=host ;;
481   -host=* | --host=* | --hos=* | --ho=*)
482     host="$ac_optarg" ;;
483
484   -includedir | --includedir | --includedi | --included | --include \
485   | --includ | --inclu | --incl | --inc)
486     ac_prev=includedir ;;
487   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
488   | --includ=* | --inclu=* | --incl=* | --inc=*)
489     includedir="$ac_optarg" ;;
490
491   -infodir | --infodir | --infodi | --infod | --info | --inf)
492     ac_prev=infodir ;;
493   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
494     infodir="$ac_optarg" ;;
495
496   -libdir | --libdir | --libdi | --libd)
497     ac_prev=libdir ;;
498   -libdir=* | --libdir=* | --libdi=* | --libd=*)
499     libdir="$ac_optarg" ;;
500
501   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
502   | --libexe | --libex | --libe)
503     ac_prev=libexecdir ;;
504   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
505   | --libexe=* | --libex=* | --libe=*)
506     libexecdir="$ac_optarg" ;;
507
508   -localstatedir | --localstatedir | --localstatedi | --localstated \
509   | --localstate | --localstat | --localsta | --localst \
510   | --locals | --local | --loca | --loc | --lo)
511     ac_prev=localstatedir ;;
512   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
513   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
514   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
515     localstatedir="$ac_optarg" ;;
516
517   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
518     ac_prev=mandir ;;
519   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
520     mandir="$ac_optarg" ;;
521
522   -nfp | --nfp | --nf)
523     # Obsolete; use --without-fp.
524     with_fp=no ;;
525
526   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
527   | --no-cr | --no-c)
528     no_create=yes ;;
529
530   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
531   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
532     no_recursion=yes ;;
533
534   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
535   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
536   | --oldin | --oldi | --old | --ol | --o)
537     ac_prev=oldincludedir ;;
538   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
539   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
540   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
541     oldincludedir="$ac_optarg" ;;
542
543   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
544     ac_prev=prefix ;;
545   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
546     prefix="$ac_optarg" ;;
547
548   -program-prefix | --program-prefix | --program-prefi | --program-pref \
549   | --program-pre | --program-pr | --program-p)
550     ac_prev=program_prefix ;;
551   -program-prefix=* | --program-prefix=* | --program-prefi=* \
552   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
553     program_prefix="$ac_optarg" ;;
554
555   -program-suffix | --program-suffix | --program-suffi | --program-suff \
556   | --program-suf | --program-su | --program-s)
557     ac_prev=program_suffix ;;
558   -program-suffix=* | --program-suffix=* | --program-suffi=* \
559   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
560     program_suffix="$ac_optarg" ;;
561
562   -program-transform-name | --program-transform-name \
563   | --program-transform-nam | --program-transform-na \
564   | --program-transform-n | --program-transform- \
565   | --program-transform | --program-transfor \
566   | --program-transfo | --program-transf \
567   | --program-trans | --program-tran \
568   | --progr-tra | --program-tr | --program-t)
569     ac_prev=program_transform_name ;;
570   -program-transform-name=* | --program-transform-name=* \
571   | --program-transform-nam=* | --program-transform-na=* \
572   | --program-transform-n=* | --program-transform-=* \
573   | --program-transform=* | --program-transfor=* \
574   | --program-transfo=* | --program-transf=* \
575   | --program-trans=* | --program-tran=* \
576   | --progr-tra=* | --program-tr=* | --program-t=*)
577     program_transform_name="$ac_optarg" ;;
578
579   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
580   | -silent | --silent | --silen | --sile | --sil)
581     silent=yes ;;
582
583   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
584     ac_prev=sbindir ;;
585   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
586   | --sbi=* | --sb=*)
587     sbindir="$ac_optarg" ;;
588
589   -sharedstatedir | --sharedstatedir | --sharedstatedi \
590   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
591   | --sharedst | --shareds | --shared | --share | --shar \
592   | --sha | --sh)
593     ac_prev=sharedstatedir ;;
594   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
595   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
596   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
597   | --sha=* | --sh=*)
598     sharedstatedir="$ac_optarg" ;;
599
600   -site | --site | --sit)
601     ac_prev=site ;;
602   -site=* | --site=* | --sit=*)
603     site="$ac_optarg" ;;
604
605   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
606     ac_prev=srcdir ;;
607   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
608     srcdir="$ac_optarg" ;;
609
610   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
611   | --syscon | --sysco | --sysc | --sys | --sy)
612     ac_prev=sysconfdir ;;
613   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
614   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
615     sysconfdir="$ac_optarg" ;;
616
617   -target | --target | --targe | --targ | --tar | --ta | --t)
618     ac_prev=target ;;
619   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
620     target="$ac_optarg" ;;
621
622   -v | -verbose | --verbose | --verbos | --verbo | --verb)
623     verbose=yes ;;
624
625   -version | --version | --versio | --versi | --vers)
626     echo "configure generated by autoconf version 2.13.1"
627     exit 0 ;;
628
629   -with-* | --with-*)
630     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
631     # Reject names that are not valid shell variable names.
632     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
633       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
634     fi
635     ac_package=`echo $ac_package| sed 's/-/_/g'`
636     case "$ac_option" in
637       *=*) ;;
638       *) ac_optarg=yes ;;
639     esac
640     eval "with_${ac_package}='$ac_optarg'" ;;
641
642   -without-* | --without-*)
643     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
644     # Reject names that are not valid shell variable names.
645     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
646       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
647     fi
648     ac_package=`echo $ac_package| sed 's/-/_/g'`
649     eval "with_${ac_package}=no" ;;
650
651   --x)
652     # Obsolete; use --with-x.
653     with_x=yes ;;
654
655   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
656   | --x-incl | --x-inc | --x-in | --x-i)
657     ac_prev=x_includes ;;
658   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
659   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
660     x_includes="$ac_optarg" ;;
661
662   -x-libraries | --x-libraries | --x-librarie | --x-librari \
663   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
664     ac_prev=x_libraries ;;
665   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
666   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
667     x_libraries="$ac_optarg" ;;
668
669   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
670     ;;
671
672   *)
673     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
674       echo "configure: warning: $ac_option: invalid host type" 1>&2
675     fi
676     if test "x$nonopt" != xNONE; then
677       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
678     fi
679     nonopt="$ac_option"
680     ;;
681
682   esac
683 done
684
685 if test -n "$ac_prev"; then
686   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
687 fi
688
689 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
690
691 # File descriptor usage:
692 # 0 standard input
693 # 1 file creation
694 # 2 errors and warnings
695 # 3 some systems may open it to /dev/tty
696 # 4 used on the Kubota Titan
697 # 6 checking for... messages and results
698 # 5 compiler messages saved in config.log
699 if test "$silent" = yes; then
700   exec 6>/dev/null
701 else
702   exec 6>&1
703 fi
704 exec 5>./config.log
705
706 echo "\
707 This file contains any messages produced by compilers while
708 running configure, to aid debugging if configure makes a mistake.
709 " 1>&5
710
711 # Strip out --no-create and --no-recursion so they do not pile up.
712 # Also quote any args containing shell metacharacters.
713 ac_configure_args=
714 for ac_arg
715 do
716   case "$ac_arg" in
717   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
718   | --no-cr | --no-c) ;;
719   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
720   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
721   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
722   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
723   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
724   esac
725 done
726
727 # NLS nuisances.
728 # Only set these to C if already set.  These must not be set unconditionally
729 # because not all systems understand e.g. LANG=C (notably SCO).
730 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
731 # Non-C LC_CTYPE values break the ctype check.
732 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
733 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
734 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
735 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
736
737 # confdefs.h avoids OS command line length limits that DEFS can exceed.
738 rm -rf conftest* confdefs.h
739 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
740 echo > confdefs.h
741
742 # A filename unique to this package, relative to the directory that
743 # configure is in, which we can look for to find out if srcdir is correct.
744 ac_unique_file=build/version.sh
745
746 # Find the source files, if location was not specified.
747 if test -z "$srcdir"; then
748   ac_srcdir_defaulted=yes
749   # Try the directory containing this script, then its parent.
750   ac_prog=$0
751   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
752   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
753   srcdir=$ac_confdir
754   if test ! -r $srcdir/$ac_unique_file; then
755     srcdir=..
756   fi
757 else
758   ac_srcdir_defaulted=no
759 fi
760 if test ! -r $srcdir/$ac_unique_file; then
761   if test "$ac_srcdir_defaulted" = yes; then
762     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
763   else
764     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
765   fi
766 fi
767 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
768
769 # Prefer explicitly selected file to automatically selected ones.
770 if test -z "$CONFIG_SITE"; then
771   if test "x$prefix" != xNONE; then
772     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
773   else
774     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
775   fi
776 fi
777 for ac_site_file in $CONFIG_SITE; do
778   if test -r "$ac_site_file"; then
779     echo "loading site script $ac_site_file"
780     . "$ac_site_file"
781   fi
782 done
783
784
785 ac_ext=c
786 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
787 ac_cpp='$CPP $CPPFLAGS'
788 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
789 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
790 cross_compiling=$ac_cv_prog_cc_cross
791
792 ac_exeext=
793 ac_objext=o
794 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
795   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
796   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
797     ac_n= ac_c='
798 ' ac_t='        '
799   else
800     ac_n=-n ac_c= ac_t=
801   fi
802 else
803   ac_n= ac_c='\c' ac_t=
804 fi
805
806
807 # set unset (borrowed from autoconf 2.49c)
808 if (OL_FOO=OL_FOO; unset OL_FOO) >/dev/null 2>&1; then
809   ol_unset=unset
810 else
811   ol_unset=false
812 fi
813 # unset CDPATH
814 $ol_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
815
816 ac_aux_dir=
817 for ac_dir in build $srcdir/build; do
818   if test -f $ac_dir/install-sh; then
819     ac_aux_dir=$ac_dir
820     ac_install_sh="$ac_aux_dir/install-sh -c"
821     break
822   elif test -f $ac_dir/install.sh; then
823     ac_aux_dir=$ac_dir
824     ac_install_sh="$ac_aux_dir/install.sh -c"
825     break
826   elif test -f $ac_dir/shtool; then
827     ac_aux_dir=$ac_dir
828     ac_install_sh="$ac_aux_dir/shtool install -c"
829     break
830   fi
831 done
832 if test -z "$ac_aux_dir"; then
833   { echo "configure: error: can not find install-sh or install.sh in build $srcdir/build" 1>&2; exit 1; }
834 fi
835 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
836 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
837 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
838
839 eval `$ac_aux_dir/version.sh`
840 if test -z "$OL_STRING"; then
841         { echo "configure: error: could not determine version" 1>&2; exit 1; }
842 fi
843
844 if test -f "$ac_aux_dir/shtool" -a ! -d $ac_aux_dir/shtool; then
845         ac_cv_shtool="$ac_aux_dir/shtool"
846 else
847         { echo "configure: error: no shtool found in $ac_aux_dir" 1>&2; exit 1; }
848 fi
849
850 SHTOOL="$ac_cv_shtool"
851
852 TB="`$SHTOOL echo -e '%B' 2>/dev/null`"
853 TN="`$SHTOOL echo -e '%b' 2>/dev/null`"
854
855 OPENLDAP_CVS=""
856 if test -d $ac_aux_dir/CVS; then
857         OPENLDAP_CVS="(from CVS sources) "
858 fi
859
860 echo "Configuring ${TB}${OL_STRING}${TN} ${OPENLDAP_CVS}..."
861
862
863 echo $ac_n "checking host system type""... $ac_c" 1>&6
864 echo "configure:865: checking host system type" >&5
865 if test "x$ac_cv_host" = "x" || (test "x$host" != "xNONE" && test "x$host" != "x$ac_cv_host_alias"); then
866
867 # Make sure we can run config.sub.
868   if $ac_config_sub sun4 >/dev/null 2>&1; then :
869     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
870   fi
871
872   ac_cv_host_alias=$host
873   case "$ac_cv_host_alias" in
874   NONE)
875     case $nonopt in
876     NONE)
877       if ac_cv_host_alias=`$ac_config_guess`; then :
878       else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
879       fi ;;
880     *) ac_cv_host_alias=$nonopt ;;
881     esac ;;
882   esac
883
884   ac_cv_host=`$ac_config_sub $ac_cv_host_alias`
885   ac_cv_host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
886   ac_cv_host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
887   ac_cv_host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
888 else
889   echo $ac_n "(cached) $ac_c" 1>&6
890 fi
891
892 echo "$ac_t""$ac_cv_host" 1>&6
893
894 host=$ac_cv_host
895 host_alias=$ac_cv_host_alias
896 host_cpu=$ac_cv_host_cpu
897 host_vendor=$ac_cv_host_vendor
898 host_os=$ac_cv_host_os
899
900
901
902
903
904 echo $ac_n "checking target system type""... $ac_c" 1>&6
905 echo "configure:906: checking target system type" >&5
906 if test "x$ac_cv_target" = "x" || (test "x$target" != "xNONE" && test "x$target" != "x$ac_cv_target_alias"); then
907
908 # Make sure we can run config.sub.
909   if $ac_config_sub sun4 >/dev/null 2>&1; then :
910     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
911   fi
912
913   ac_cv_target_alias=$target
914   case "$ac_cv_target_alias" in
915   NONE)
916     case $nonopt in
917     NONE)
918       ac_cv_target_alias=$host_alias ;;
919
920     *) ac_cv_target_alias=$nonopt ;;
921     esac ;;
922   esac
923
924   ac_cv_target=`$ac_config_sub $ac_cv_target_alias`
925   ac_cv_target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
926   ac_cv_target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
927   ac_cv_target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
928 else
929   echo $ac_n "(cached) $ac_c" 1>&6
930 fi
931
932 echo "$ac_t""$ac_cv_target" 1>&6
933
934 target=$ac_cv_target
935 target_alias=$ac_cv_target_alias
936 target_cpu=$ac_cv_target_cpu
937 target_vendor=$ac_cv_target_vendor
938 target_os=$ac_cv_target_os
939
940
941
942
943
944 echo $ac_n "checking build system type""... $ac_c" 1>&6
945 echo "configure:946: checking build system type" >&5
946 if test "x$ac_cv_build" = "x" || (test "x$build" != "xNONE" && test "x$build" != "x$ac_cv_build_alias"); then
947
948 # Make sure we can run config.sub.
949   if $ac_config_sub sun4 >/dev/null 2>&1; then :
950     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
951   fi
952
953   ac_cv_build_alias=$build
954   case "$ac_cv_build_alias" in
955   NONE)
956     case $nonopt in
957     NONE)
958       ac_cv_build_alias=$host_alias ;;
959
960     *) ac_cv_build_alias=$nonopt ;;
961     esac ;;
962   esac
963
964   ac_cv_build=`$ac_config_sub $ac_cv_build_alias`
965   ac_cv_build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
966   ac_cv_build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
967   ac_cv_build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
968 else
969   echo $ac_n "(cached) $ac_c" 1>&6
970 fi
971
972 echo "$ac_t""$ac_cv_build" 1>&6
973
974 build=$ac_cv_build
975 build_alias=$ac_cv_build_alias
976 build_cpu=$ac_cv_build_cpu
977 build_vendor=$ac_cv_build_vendor
978 build_os=$ac_cv_build_os
979
980
981
982
983
984 # Do some error checking and defaulting for the host and target type.
985 # The inputs are:
986 #    configure --host=HOST --target=TARGET --build=BUILD NONOPT
987 #
988 # The rules are:
989 # 1. You are not allowed to specify --host, --target, and nonopt at the
990 #    same time.
991 # 2. Host defaults to nonopt.
992 # 3. If nonopt is not specified, then host defaults to the current host,
993 #    as determined by config.guess.
994 # 4. Target and build default to nonopt.
995 # 5. If nonopt is not specified, then target and build default to host.
996
997 # The aliases save the names the user supplied, while $host etc.
998 # will get canonicalized.
999 case $host---$target---$nonopt in
1000 NONE---*---* | *---NONE---* | *---*---NONE) ;;
1001 *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
1002 esac
1003
1004 test "$host_alias" != "$target_alias" &&
1005   test "$program_prefix$program_suffix$program_transform_name" = \
1006     NONENONEs,x,x, &&
1007   program_prefix=${target_alias}-
1008
1009
1010 # Find a good install program.  We prefer a C program (faster),
1011 # so one script is as good as another.  But avoid the broken or
1012 # incompatible versions:
1013 # SysV /etc/install, /usr/sbin/install
1014 # SunOS /usr/etc/install
1015 # IRIX /sbin/install
1016 # AIX /bin/install
1017 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
1018 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
1019 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
1020 # ./install, which can be erroneously created by make from ./install.sh.
1021 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
1022 echo "configure:1023: checking for a BSD compatible install" >&5
1023 if test -z "$INSTALL"; then
1024 if eval "test \"\${ac_cv_path_install+set}\" = set"; then
1025   echo $ac_n "(cached) $ac_c" 1>&6
1026 else
1027     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
1028   for ac_dir in $PATH; do
1029     # Account for people who put trailing slashes in PATH elements.
1030     case "$ac_dir/" in
1031     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
1032     *)
1033       # OSF1 and SCO ODT 3.0 have their own names for install.
1034       # Don't use installbsd from OSF since it installs stuff as root
1035       # by default.
1036       for ac_prog in ginstall scoinst install; do
1037         if test -f $ac_dir/$ac_prog; then
1038           if test $ac_prog = install &&
1039             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
1040             # AIX install.  It has an incompatible calling convention.
1041             :
1042           elif test $ac_prog = install &&
1043             grep pwplus $ac_dir/$ac_prog >/dev/null 2>&1; then
1044             # program-specific install script used by HP pwplus--don't use.
1045             :
1046           else
1047             ac_cv_path_install="$ac_dir/$ac_prog -c"
1048             break 2
1049           fi
1050         fi
1051       done
1052       ;;
1053     esac
1054   done
1055   IFS="$ac_save_IFS"
1056
1057 fi
1058   if test "${ac_cv_path_install+set}" = set; then
1059     INSTALL="$ac_cv_path_install"
1060   else
1061     # As a last resort, use the slow shell script.  We don't cache a
1062     # path for INSTALL within a source directory, because that will
1063     # break other packages using the cache if that directory is
1064     # removed, or if the path is relative.
1065     INSTALL="$ac_install_sh"
1066   fi
1067 fi
1068 echo "$ac_t""$INSTALL" 1>&6
1069
1070 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
1071 # It thinks the first close brace ends the variable substitution.
1072 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
1073
1074 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
1075
1076 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1077
1078 echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
1079 echo "configure:1080: checking whether build environment is sane" >&5
1080 # Just in case
1081 sleep 1
1082 echo timestamp > conftestfile
1083 # Do `set' in a subshell so we don't clobber the current shell's
1084 # arguments.  Must try -L first in case configure is actually a
1085 # symlink; some systems play weird games with the mod time of symlinks
1086 # (eg FreeBSD returns the mod time of the symlink's containing
1087 # directory).
1088 if (
1089    set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
1090    if test "$*" = "X"; then
1091       # -L didn't work.
1092       set X `ls -t $srcdir/configure conftestfile`
1093    fi
1094    if test "$*" != "X $srcdir/configure conftestfile" \
1095       && test "$*" != "X conftestfile $srcdir/configure"; then
1096
1097       # If neither matched, then we have a broken ls.  This can happen
1098       # if, for instance, CONFIG_SHELL is bash and it inherits a
1099       # broken ls alias from the environment.  This has actually
1100       # happened.  Such a system could not be considered "sane".
1101       { echo "configure: error: ls -t appears to fail.  Make sure there is not a broken
1102 alias in your environment" 1>&2; exit 1; }
1103    fi
1104
1105    test "$2" = conftestfile
1106    )
1107 then
1108    # Ok.
1109    :
1110 else
1111    { echo "configure: error: newly created file is older than distributed files!
1112 Check your system clock" 1>&2; exit 1; }
1113 fi
1114 rm -f conftest*
1115 echo "$ac_t""yes" 1>&6
1116 if test "$program_transform_name" = s,x,x,; then
1117   program_transform_name=
1118 else
1119   # Double any \ or $.  echo might interpret backslashes.
1120   cat <<\EOF_SED > conftestsed
1121 s,\\,\\\\,g; s,\$,$$,g
1122 EOF_SED
1123   program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
1124   rm -f conftestsed
1125 fi
1126 test "$program_prefix" != NONE &&
1127   program_transform_name="s,^,${program_prefix},;$program_transform_name"
1128 # Use a double $ so make ignores it.
1129 test "$program_suffix" != NONE &&
1130   program_transform_name="s,\$\$,${program_suffix},;$program_transform_name"
1131
1132 # sed with no file args requires a program.
1133 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
1134
1135 for ac_prog in mawk gawk nawk awk
1136 do
1137 # Extract the first word of "$ac_prog", so it can be a program name with args.
1138 set dummy $ac_prog; ac_word=$2
1139 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1140 echo "configure:1141: checking for $ac_word" >&5
1141 if eval "test \"\${ac_cv_prog_AWK+set}\" = set"; then
1142   echo $ac_n "(cached) $ac_c" 1>&6
1143 else
1144   if test -n "$AWK"; then
1145   ac_cv_prog_AWK="$AWK" # Let the user override the test.
1146 else
1147   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1148   ac_dummy="$PATH"
1149   for ac_dir in $ac_dummy; do
1150     test -z "$ac_dir" && ac_dir=.
1151     if test -f $ac_dir/$ac_word; then
1152       ac_cv_prog_AWK="$ac_prog"
1153       break
1154     fi
1155   done
1156   IFS="$ac_save_ifs"
1157 fi
1158 fi
1159 AWK="$ac_cv_prog_AWK"
1160 if test -n "$AWK"; then
1161   echo "$ac_t""$AWK" 1>&6
1162 else
1163   echo "$ac_t""no" 1>&6
1164 fi
1165
1166 test -n "$AWK" && break
1167 done
1168
1169 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
1170 echo "configure:1171: checking whether ${MAKE-make} sets \${MAKE}" >&5
1171 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
1172 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
1173   echo $ac_n "(cached) $ac_c" 1>&6
1174 else
1175   cat > conftestmake <<\EOF
1176 all:
1177         @echo 'ac_maketemp="${MAKE}"'
1178 EOF
1179 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
1180 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
1181 if test -n "$ac_maketemp"; then
1182   eval ac_cv_prog_make_${ac_make}_set=yes
1183 else
1184   eval ac_cv_prog_make_${ac_make}_set=no
1185 fi
1186 rm -f conftestmake
1187 fi
1188 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
1189   echo "$ac_t""yes" 1>&6
1190   SET_MAKE=
1191 else
1192   echo "$ac_t""no" 1>&6
1193   SET_MAKE="MAKE=${MAKE-make}"
1194 fi
1195
1196
1197
1198 PACKAGE=$OL_PACKAGE
1199
1200 VERSION=$OL_VERSION
1201
1202 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
1203   { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
1204 fi
1205
1206
1207
1208 missing_dir=`cd $ac_aux_dir && pwd`
1209 echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
1210 echo "configure:1211: checking for working aclocal" >&5
1211 # Run test in a subshell; some versions of sh will print an error if
1212 # an executable is not found, even if stderr is redirected.
1213 # Redirect stdin to placate older versions of autoconf.  Sigh.
1214 if (aclocal --version) < /dev/null > /dev/null 2>&1; then
1215    ACLOCAL=aclocal
1216    echo "$ac_t""found" 1>&6
1217 else
1218    ACLOCAL="$missing_dir/missing aclocal"
1219    echo "$ac_t""missing" 1>&6
1220 fi
1221
1222 echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
1223 echo "configure:1224: checking for working autoconf" >&5
1224 # Run test in a subshell; some versions of sh will print an error if
1225 # an executable is not found, even if stderr is redirected.
1226 # Redirect stdin to placate older versions of autoconf.  Sigh.
1227 if (autoconf --version) < /dev/null > /dev/null 2>&1; then
1228    AUTOCONF=autoconf
1229    echo "$ac_t""found" 1>&6
1230 else
1231    AUTOCONF="$missing_dir/missing autoconf"
1232    echo "$ac_t""missing" 1>&6
1233 fi
1234
1235 echo $ac_n "checking for working automake""... $ac_c" 1>&6
1236 echo "configure:1237: checking for working automake" >&5
1237 # Run test in a subshell; some versions of sh will print an error if
1238 # an executable is not found, even if stderr is redirected.
1239 # Redirect stdin to placate older versions of autoconf.  Sigh.
1240 if (automake --version) < /dev/null > /dev/null 2>&1; then
1241    AUTOMAKE=automake
1242    echo "$ac_t""found" 1>&6
1243 else
1244    AUTOMAKE="$missing_dir/missing automake"
1245    echo "$ac_t""missing" 1>&6
1246 fi
1247
1248 echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
1249 echo "configure:1250: checking for working autoheader" >&5
1250 # Run test in a subshell; some versions of sh will print an error if
1251 # an executable is not found, even if stderr is redirected.
1252 # Redirect stdin to placate older versions of autoconf.  Sigh.
1253 if (autoheader --version) < /dev/null > /dev/null 2>&1; then
1254    AUTOHEADER=autoheader
1255    echo "$ac_t""found" 1>&6
1256 else
1257    AUTOHEADER="$missing_dir/missing autoheader"
1258    echo "$ac_t""missing" 1>&6
1259 fi
1260
1261 echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
1262 echo "configure:1263: checking for working makeinfo" >&5
1263 # Run test in a subshell; some versions of sh will print an error if
1264 # an executable is not found, even if stderr is redirected.
1265 # Redirect stdin to placate older versions of autoconf.  Sigh.
1266 if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
1267    MAKEINFO=makeinfo
1268    echo "$ac_t""found" 1>&6
1269 else
1270    MAKEINFO="$missing_dir/missing makeinfo"
1271    echo "$ac_t""missing" 1>&6
1272 fi
1273
1274 install_sh="$missing_dir/install-sh"
1275 test -f "$install_sh" || install_sh="$missing_dir/install.sh"
1276
1277 for ac_prog in gnutar gtar tar
1278 do
1279 # Extract the first word of "$ac_prog", so it can be a program name with args.
1280 set dummy $ac_prog; ac_word=$2
1281 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1282 echo "configure:1283: checking for $ac_word" >&5
1283 if eval "test \"\${ac_cv_prog_AMTAR+set}\" = set"; then
1284   echo $ac_n "(cached) $ac_c" 1>&6
1285 else
1286   if test -n "$AMTAR"; then
1287   ac_cv_prog_AMTAR="$AMTAR" # Let the user override the test.
1288 else
1289   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1290   ac_dummy="$PATH"
1291   for ac_dir in $ac_dummy; do
1292     test -z "$ac_dir" && ac_dir=.
1293     if test -f $ac_dir/$ac_word; then
1294       ac_cv_prog_AMTAR="$ac_prog"
1295       break
1296     fi
1297   done
1298   IFS="$ac_save_ifs"
1299 fi
1300 fi
1301 AMTAR="$ac_cv_prog_AMTAR"
1302 if test -n "$AMTAR"; then
1303   echo "$ac_t""$AMTAR" 1>&6
1304 else
1305   echo "$ac_t""no" 1>&6
1306 fi
1307
1308 test -n "$AMTAR" && break
1309 done
1310
1311
1312 AMTARFLAGS=
1313 if test -n "$AMTAR"; then
1314   if $SHELL -c "$AMTAR --version" > /dev/null 2>&1; then
1315         AMTARFLAGS=o
1316   fi
1317 fi
1318
1319 cat >> confdefs.h <<EOF
1320 #define OPENLDAP_PACKAGE "$PACKAGE"
1321 EOF
1322
1323 cat >> confdefs.h <<EOF
1324 #define OPENLDAP_VERSION "$VERSION"
1325 EOF
1326
1327
1328 cat >> confdefs.h <<EOF
1329 #define LDAP_VENDOR_VERSION $OL_API_INC
1330 EOF
1331
1332 cat >> confdefs.h <<EOF
1333 #define LDAP_VENDOR_VERSION_MAJOR $OL_MAJOR
1334 EOF
1335
1336 cat >> confdefs.h <<EOF
1337 #define LDAP_VENDOR_VERSION_MINOR $OL_MINOR
1338 EOF
1339
1340 cat >> confdefs.h <<EOF
1341 #define LDAP_VENDOR_VERSION_PATCH $OL_PATCH
1342 EOF
1343
1344
1345 OPENLDAP_LIBRELEASE=$OL_API_LIB_RELEASE
1346
1347 OPENLDAP_LIBVERSION=$OL_API_LIB_VERSION
1348
1349 OPENLDAP_RELEASE_DATE="$OL_RELEASE_DATE"
1350
1351
1352
1353 echo $ac_n "checking configure arguments""... $ac_c" 1>&6
1354 echo "configure:1355: checking configure arguments" >&5
1355
1356
1357 top_builddir=`pwd`
1358
1359 ldap_subdir="/openldap"
1360
1361 # Check whether --with-subdir or --without-subdir was given.
1362 if test "${with_subdir+set}" = set; then
1363   withval="$with_subdir"
1364   case "$withval" in
1365         no) ldap_subdir=""
1366                 ;;
1367         yes)
1368                 ;;
1369         /*|\\*)
1370                 ldap_subdir="$withval"
1371                 ;;
1372         *)
1373                 ldap_subdir="/$withval"
1374                 ;;
1375 esac
1376
1377 fi
1378
1379
1380 # OpenLDAP --enable-debug
1381         # Check whether --enable-debug or --disable-debug was given.
1382 if test "${enable_debug+set}" = set; then
1383   enableval="$enable_debug"
1384   
1385         ol_arg=invalid
1386         for ol_val in auto yes no ; do
1387                 if test "$enableval" = "$ol_val" ; then
1388                         ol_arg="$ol_val"
1389                 fi
1390         done
1391         if test "$ol_arg" = "invalid" ; then
1392                 { echo "configure: error: bad value $enableval for --enable-debug" 1>&2; exit 1; }
1393         fi
1394         ol_enable_debug="$ol_arg"
1395
1396 else
1397         ol_enable_debug="yes"
1398 fi
1399 # end --enable-debug
1400 # OpenLDAP --enable-dynamic
1401         # Check whether --enable-dynamic or --disable-dynamic was given.
1402 if test "${enable_dynamic+set}" = set; then
1403   enableval="$enable_dynamic"
1404   
1405         ol_arg=invalid
1406         for ol_val in auto yes no ; do
1407                 if test "$enableval" = "$ol_val" ; then
1408                         ol_arg="$ol_val"
1409                 fi
1410         done
1411         if test "$ol_arg" = "invalid" ; then
1412                 { echo "configure: error: bad value $enableval for --enable-dynamic" 1>&2; exit 1; }
1413         fi
1414         ol_enable_dynamic="$ol_arg"
1415
1416 else
1417         ol_enable_dynamic="no"
1418 fi
1419 # end --enable-dynamic
1420 # OpenLDAP --enable-syslog
1421         # Check whether --enable-syslog or --disable-syslog was given.
1422 if test "${enable_syslog+set}" = set; then
1423   enableval="$enable_syslog"
1424   
1425         ol_arg=invalid
1426         for ol_val in auto yes no ; do
1427                 if test "$enableval" = "$ol_val" ; then
1428                         ol_arg="$ol_val"
1429                 fi
1430         done
1431         if test "$ol_arg" = "invalid" ; then
1432                 { echo "configure: error: bad value $enableval for --enable-syslog" 1>&2; exit 1; }
1433         fi
1434         ol_enable_syslog="$ol_arg"
1435
1436 else
1437         ol_enable_syslog="auto"
1438 fi
1439 # end --enable-syslog
1440 # OpenLDAP --enable-proctitle
1441         # Check whether --enable-proctitle or --disable-proctitle was given.
1442 if test "${enable_proctitle+set}" = set; then
1443   enableval="$enable_proctitle"
1444   
1445         ol_arg=invalid
1446         for ol_val in auto yes no ; do
1447                 if test "$enableval" = "$ol_val" ; then
1448                         ol_arg="$ol_val"
1449                 fi
1450         done
1451         if test "$ol_arg" = "invalid" ; then
1452                 { echo "configure: error: bad value $enableval for --enable-proctitle" 1>&2; exit 1; }
1453         fi
1454         ol_enable_proctitle="$ol_arg"
1455
1456 else
1457         ol_enable_proctitle="yes"
1458 fi
1459 # end --enable-proctitle
1460 ol_enable_referrals=${ol_enable_referrals-no}
1461 ol_enable_kbind=${ol_enable_kbind-no}
1462 # OpenLDAP --enable-ipv6
1463         # Check whether --enable-ipv6 or --disable-ipv6 was given.
1464 if test "${enable_ipv6+set}" = set; then
1465   enableval="$enable_ipv6"
1466   
1467         ol_arg=invalid
1468         for ol_val in auto yes no ; do
1469                 if test "$enableval" = "$ol_val" ; then
1470                         ol_arg="$ol_val"
1471                 fi
1472         done
1473         if test "$ol_arg" = "invalid" ; then
1474                 { echo "configure: error: bad value $enableval for --enable-ipv6" 1>&2; exit 1; }
1475         fi
1476         ol_enable_ipv6="$ol_arg"
1477
1478 else
1479         ol_enable_ipv6="auto"
1480 fi
1481 # end --enable-ipv6
1482 # OpenLDAP --enable-local
1483         # Check whether --enable-local or --disable-local was given.
1484 if test "${enable_local+set}" = set; then
1485   enableval="$enable_local"
1486   
1487         ol_arg=invalid
1488         for ol_val in auto yes no ; do
1489                 if test "$enableval" = "$ol_val" ; then
1490                         ol_arg="$ol_val"
1491                 fi
1492         done
1493         if test "$ol_arg" = "invalid" ; then
1494                 { echo "configure: error: bad value $enableval for --enable-local" 1>&2; exit 1; }
1495         fi
1496         ol_enable_local="$ol_arg"
1497
1498 else
1499         ol_enable_local="auto"
1500 fi
1501 # end --enable-local
1502
1503
1504 # OpenLDAP --with-cyrus_sasl
1505         # Check whether --with-cyrus_sasl or --without-cyrus_sasl was given.
1506 if test "${with_cyrus_sasl+set}" = set; then
1507   withval="$with_cyrus_sasl"
1508   
1509         ol_arg=invalid
1510         for ol_val in auto yes no  ; do
1511                 if test "$withval" = "$ol_val" ; then
1512                         ol_arg="$ol_val"
1513                 fi
1514         done
1515         if test "$ol_arg" = "invalid" ; then
1516                 { echo "configure: error: bad value $withval for --with-cyrus_sasl" 1>&2; exit 1; }
1517         fi
1518         ol_with_cyrus_sasl="$ol_arg"
1519
1520 else
1521         ol_with_cyrus_sasl="auto"
1522 fi
1523 # end --with-cyrus_sasl
1524
1525 # OpenLDAP --with-fetch
1526         # Check whether --with-fetch or --without-fetch was given.
1527 if test "${with_fetch+set}" = set; then
1528   withval="$with_fetch"
1529   
1530         ol_arg=invalid
1531         for ol_val in auto yes no  ; do
1532                 if test "$withval" = "$ol_val" ; then
1533                         ol_arg="$ol_val"
1534                 fi
1535         done
1536         if test "$ol_arg" = "invalid" ; then
1537                 { echo "configure: error: bad value $withval for --with-fetch" 1>&2; exit 1; }
1538         fi
1539         ol_with_fetch="$ol_arg"
1540
1541 else
1542         ol_with_fetch="auto"
1543 fi
1544 # end --with-fetch
1545
1546 ol_with_kerberos=${ol_with_kerberos-auto}
1547 # OpenLDAP --with-threads
1548         # Check whether --with-threads or --without-threads was given.
1549 if test "${with_threads+set}" = set; then
1550   withval="$with_threads"
1551   
1552         ol_arg=invalid
1553         for ol_val in auto nt posix mach pth lwp yes no manual  ; do
1554                 if test "$withval" = "$ol_val" ; then
1555                         ol_arg="$ol_val"
1556                 fi
1557         done
1558         if test "$ol_arg" = "invalid" ; then
1559                 { echo "configure: error: bad value $withval for --with-threads" 1>&2; exit 1; }
1560         fi
1561         ol_with_threads="$ol_arg"
1562
1563 else
1564         ol_with_threads="auto"
1565 fi
1566 # end --with-threads
1567
1568 # OpenLDAP --with-tls
1569         # Check whether --with-tls or --without-tls was given.
1570 if test "${with_tls+set}" = set; then
1571   withval="$with_tls"
1572   
1573         ol_arg=invalid
1574         for ol_val in auto ssleay openssl yes no  ; do
1575                 if test "$withval" = "$ol_val" ; then
1576                         ol_arg="$ol_val"
1577                 fi
1578         done
1579         if test "$ol_arg" = "invalid" ; then
1580                 { echo "configure: error: bad value $withval for --with-tls" 1>&2; exit 1; }
1581         fi
1582         ol_with_tls="$ol_arg"
1583
1584 else
1585         ol_with_tls="auto"
1586 fi
1587 # end --with-tls
1588
1589 # OpenLDAP --with-yielding_select
1590         # Check whether --with-yielding_select or --without-yielding_select was given.
1591 if test "${with_yielding_select+set}" = set; then
1592   withval="$with_yielding_select"
1593   
1594         ol_arg=invalid
1595         for ol_val in auto yes no manual  ; do
1596                 if test "$withval" = "$ol_val" ; then
1597                         ol_arg="$ol_val"
1598                 fi
1599         done
1600         if test "$ol_arg" = "invalid" ; then
1601                 { echo "configure: error: bad value $withval for --with-yielding_select" 1>&2; exit 1; }
1602         fi
1603         ol_with_yielding_select="$ol_arg"
1604
1605 else
1606         ol_with_yielding_select="auto"
1607 fi
1608 # end --with-yielding_select
1609
1610
1611
1612 # Check whether --with-xxslapdoptions or --without-xxslapdoptions was given.
1613 if test "${with_xxslapdoptions+set}" = set; then
1614   withval="$with_xxslapdoptions"
1615   :
1616 fi
1617
1618 # OpenLDAP --enable-slapd
1619         # Check whether --enable-slapd or --disable-slapd was given.
1620 if test "${enable_slapd+set}" = set; then
1621   enableval="$enable_slapd"
1622   
1623         ol_arg=invalid
1624         for ol_val in auto yes no ; do
1625                 if test "$enableval" = "$ol_val" ; then
1626                         ol_arg="$ol_val"
1627                 fi
1628         done
1629         if test "$ol_arg" = "invalid" ; then
1630                 { echo "configure: error: bad value $enableval for --enable-slapd" 1>&2; exit 1; }
1631         fi
1632         ol_enable_slapd="$ol_arg"
1633
1634 else
1635         ol_enable_slapd="yes"
1636 fi
1637 # end --enable-slapd
1638 # OpenLDAP --enable-aci
1639         # Check whether --enable-aci or --disable-aci was given.
1640 if test "${enable_aci+set}" = set; then
1641   enableval="$enable_aci"
1642   
1643         ol_arg=invalid
1644         for ol_val in auto yes no ; do
1645                 if test "$enableval" = "$ol_val" ; then
1646                         ol_arg="$ol_val"
1647                 fi
1648         done
1649         if test "$ol_arg" = "invalid" ; then
1650                 { echo "configure: error: bad value $enableval for --enable-aci" 1>&2; exit 1; }
1651         fi
1652         ol_enable_aci="$ol_arg"
1653
1654 else
1655         ol_enable_aci="no"
1656 fi
1657 # end --enable-aci
1658 # OpenLDAP --enable-cleartext
1659         # Check whether --enable-cleartext or --disable-cleartext was given.
1660 if test "${enable_cleartext+set}" = set; then
1661   enableval="$enable_cleartext"
1662   
1663         ol_arg=invalid
1664         for ol_val in auto yes no ; do
1665                 if test "$enableval" = "$ol_val" ; then
1666                         ol_arg="$ol_val"
1667                 fi
1668         done
1669         if test "$ol_arg" = "invalid" ; then
1670                 { echo "configure: error: bad value $enableval for --enable-cleartext" 1>&2; exit 1; }
1671         fi
1672         ol_enable_cleartext="$ol_arg"
1673
1674 else
1675         ol_enable_cleartext="yes"
1676 fi
1677 # end --enable-cleartext
1678 # OpenLDAP --enable-crypt
1679         # Check whether --enable-crypt or --disable-crypt was given.
1680 if test "${enable_crypt+set}" = set; then
1681   enableval="$enable_crypt"
1682   
1683         ol_arg=invalid
1684         for ol_val in auto yes no ; do
1685                 if test "$enableval" = "$ol_val" ; then
1686                         ol_arg="$ol_val"
1687                 fi
1688         done
1689         if test "$ol_arg" = "invalid" ; then
1690                 { echo "configure: error: bad value $enableval for --enable-crypt" 1>&2; exit 1; }
1691         fi
1692         ol_enable_crypt="$ol_arg"
1693
1694 else
1695         ol_enable_crypt="no"
1696 fi
1697 # end --enable-crypt
1698 # OpenLDAP --enable-lmpasswd
1699         # Check whether --enable-lmpasswd or --disable-lmpasswd was given.
1700 if test "${enable_lmpasswd+set}" = set; then
1701   enableval="$enable_lmpasswd"
1702   
1703         ol_arg=invalid
1704         for ol_val in auto yes no ; do
1705                 if test "$enableval" = "$ol_val" ; then
1706                         ol_arg="$ol_val"
1707                 fi
1708         done
1709         if test "$ol_arg" = "invalid" ; then
1710                 { echo "configure: error: bad value $enableval for --enable-lmpasswd" 1>&2; exit 1; }
1711         fi
1712         ol_enable_lmpasswd="$ol_arg"
1713
1714 else
1715         ol_enable_lmpasswd="no"
1716 fi
1717 # end --enable-lmpasswd
1718 # OpenLDAP --enable-spasswd
1719         # Check whether --enable-spasswd or --disable-spasswd was given.
1720 if test "${enable_spasswd+set}" = set; then
1721   enableval="$enable_spasswd"
1722   
1723         ol_arg=invalid
1724         for ol_val in auto yes no ; do
1725                 if test "$enableval" = "$ol_val" ; then
1726                         ol_arg="$ol_val"
1727                 fi
1728         done
1729         if test "$ol_arg" = "invalid" ; then
1730                 { echo "configure: error: bad value $enableval for --enable-spasswd" 1>&2; exit 1; }
1731         fi
1732         ol_enable_spasswd="$ol_arg"
1733
1734 else
1735         ol_enable_spasswd="no"
1736 fi
1737 # end --enable-spasswd
1738 # OpenLDAP --enable-modules
1739         # Check whether --enable-modules or --disable-modules was given.
1740 if test "${enable_modules+set}" = set; then
1741   enableval="$enable_modules"
1742   
1743         ol_arg=invalid
1744         for ol_val in auto yes no ; do
1745                 if test "$enableval" = "$ol_val" ; then
1746                         ol_arg="$ol_val"
1747                 fi
1748         done
1749         if test "$ol_arg" = "invalid" ; then
1750                 { echo "configure: error: bad value $enableval for --enable-modules" 1>&2; exit 1; }
1751         fi
1752         ol_enable_modules="$ol_arg"
1753
1754 else
1755         ol_enable_modules="no"
1756 fi
1757 # end --enable-modules
1758 ol_enable_multimaster=${ol_enable_multimaster-no}
1759 # OpenLDAP --enable-rewrite
1760         # Check whether --enable-rewrite or --disable-rewrite was given.
1761 if test "${enable_rewrite+set}" = set; then
1762   enableval="$enable_rewrite"
1763   
1764         ol_arg=invalid
1765         for ol_val in auto yes no ; do
1766                 if test "$enableval" = "$ol_val" ; then
1767                         ol_arg="$ol_val"
1768                 fi
1769         done
1770         if test "$ol_arg" = "invalid" ; then
1771                 { echo "configure: error: bad value $enableval for --enable-rewrite" 1>&2; exit 1; }
1772         fi
1773         ol_enable_rewrite="$ol_arg"
1774
1775 else
1776         ol_enable_rewrite="auto"
1777 fi
1778 # end --enable-rewrite
1779 # OpenLDAP --enable-rlookups
1780         # Check whether --enable-rlookups or --disable-rlookups was given.
1781 if test "${enable_rlookups+set}" = set; then
1782   enableval="$enable_rlookups"
1783   
1784         ol_arg=invalid
1785         for ol_val in auto yes no ; do
1786                 if test "$enableval" = "$ol_val" ; then
1787                         ol_arg="$ol_val"
1788                 fi
1789         done
1790         if test "$ol_arg" = "invalid" ; then
1791                 { echo "configure: error: bad value $enableval for --enable-rlookups" 1>&2; exit 1; }
1792         fi
1793         ol_enable_rlookups="$ol_arg"
1794
1795 else
1796         ol_enable_rlookups="no"
1797 fi
1798 # end --enable-rlookups
1799 # OpenLDAP --enable-slapi
1800         # Check whether --enable-slapi or --disable-slapi was given.
1801 if test "${enable_slapi+set}" = set; then
1802   enableval="$enable_slapi"
1803   
1804         ol_arg=invalid
1805         for ol_val in auto yes no ; do
1806                 if test "$enableval" = "$ol_val" ; then
1807                         ol_arg="$ol_val"
1808                 fi
1809         done
1810         if test "$ol_arg" = "invalid" ; then
1811                 { echo "configure: error: bad value $enableval for --enable-slapi" 1>&2; exit 1; }
1812         fi
1813         ol_enable_slapi="$ol_arg"
1814
1815 else
1816         ol_enable_slapi="no"
1817 fi
1818 # end --enable-slapi
1819 # OpenLDAP --enable-slp
1820         # Check whether --enable-slp or --disable-slp was given.
1821 if test "${enable_slp+set}" = set; then
1822   enableval="$enable_slp"
1823   
1824         ol_arg=invalid
1825         for ol_val in auto yes no ; do
1826                 if test "$enableval" = "$ol_val" ; then
1827                         ol_arg="$ol_val"
1828                 fi
1829         done
1830         if test "$ol_arg" = "invalid" ; then
1831                 { echo "configure: error: bad value $enableval for --enable-slp" 1>&2; exit 1; }
1832         fi
1833         ol_enable_slp="$ol_arg"
1834
1835 else
1836         ol_enable_slp="no"
1837 fi
1838 # end --enable-slp
1839 # OpenLDAP --enable-wrappers
1840         # Check whether --enable-wrappers or --disable-wrappers was given.
1841 if test "${enable_wrappers+set}" = set; then
1842   enableval="$enable_wrappers"
1843   
1844         ol_arg=invalid
1845         for ol_val in auto yes no ; do
1846                 if test "$enableval" = "$ol_val" ; then
1847                         ol_arg="$ol_val"
1848                 fi
1849         done
1850         if test "$ol_arg" = "invalid" ; then
1851                 { echo "configure: error: bad value $enableval for --enable-wrappers" 1>&2; exit 1; }
1852         fi
1853         ol_enable_wrappers="$ol_arg"
1854
1855 else
1856         ol_enable_wrappers="no"
1857 fi
1858 # end --enable-wrappers
1859
1860 Backends="bdb dnssrv hdb ldap ldbm meta monitor null \
1861         passwd perl shell sql"
1862
1863 # Check whether --with-xxslapoverlays or --without-xxslapoverlays was given.
1864 if test "${with_xxslapoverlays+set}" = set; then
1865   withval="$with_xxslapoverlays"
1866   :
1867 fi
1868
1869
1870 # OpenLDAP --enable-bdb
1871         # Check whether --enable-bdb or --disable-bdb was given.
1872 if test "${enable_bdb+set}" = set; then
1873   enableval="$enable_bdb"
1874   
1875         ol_arg=invalid
1876         for ol_val in no yes mod ; do
1877                 if test "$enableval" = "$ol_val" ; then
1878                         ol_arg="$ol_val"
1879                 fi
1880         done
1881         if test "$ol_arg" = "invalid" ; then
1882                 { echo "configure: error: bad value $enableval for --enable-bdb" 1>&2; exit 1; }
1883         fi
1884         ol_enable_bdb="$ol_arg"
1885
1886 else
1887         ol_enable_bdb="yes"
1888 fi
1889 # end --enable-bdb
1890 # OpenLDAP --enable-dnssrv
1891         # Check whether --enable-dnssrv or --disable-dnssrv was given.
1892 if test "${enable_dnssrv+set}" = set; then
1893   enableval="$enable_dnssrv"
1894   
1895         ol_arg=invalid
1896         for ol_val in no yes mod ; do
1897                 if test "$enableval" = "$ol_val" ; then
1898                         ol_arg="$ol_val"
1899                 fi
1900         done
1901         if test "$ol_arg" = "invalid" ; then
1902                 { echo "configure: error: bad value $enableval for --enable-dnssrv" 1>&2; exit 1; }
1903         fi
1904         ol_enable_dnssrv="$ol_arg"
1905
1906 else
1907         ol_enable_dnssrv="no"
1908 fi
1909 # end --enable-dnssrv
1910 # OpenLDAP --enable-hdb
1911         # Check whether --enable-hdb or --disable-hdb was given.
1912 if test "${enable_hdb+set}" = set; then
1913   enableval="$enable_hdb"
1914   
1915         ol_arg=invalid
1916         for ol_val in no yes mod ; do
1917                 if test "$enableval" = "$ol_val" ; then
1918                         ol_arg="$ol_val"
1919                 fi
1920         done
1921         if test "$ol_arg" = "invalid" ; then
1922                 { echo "configure: error: bad value $enableval for --enable-hdb" 1>&2; exit 1; }
1923         fi
1924         ol_enable_hdb="$ol_arg"
1925
1926 else
1927         ol_enable_hdb="no"
1928 fi
1929 # end --enable-hdb
1930 # OpenLDAP --enable-ldap
1931         # Check whether --enable-ldap or --disable-ldap was given.
1932 if test "${enable_ldap+set}" = set; then
1933   enableval="$enable_ldap"
1934   
1935         ol_arg=invalid
1936         for ol_val in no yes mod ; do
1937                 if test "$enableval" = "$ol_val" ; then
1938                         ol_arg="$ol_val"
1939                 fi
1940         done
1941         if test "$ol_arg" = "invalid" ; then
1942                 { echo "configure: error: bad value $enableval for --enable-ldap" 1>&2; exit 1; }
1943         fi
1944         ol_enable_ldap="$ol_arg"
1945
1946 else
1947         ol_enable_ldap="no"
1948 fi
1949 # end --enable-ldap
1950 # OpenLDAP --enable-ldbm
1951         # Check whether --enable-ldbm or --disable-ldbm was given.
1952 if test "${enable_ldbm+set}" = set; then
1953   enableval="$enable_ldbm"
1954   
1955         ol_arg=invalid
1956         for ol_val in no yes mod ; do
1957                 if test "$enableval" = "$ol_val" ; then
1958                         ol_arg="$ol_val"
1959                 fi
1960         done
1961         if test "$ol_arg" = "invalid" ; then
1962                 { echo "configure: error: bad value $enableval for --enable-ldbm" 1>&2; exit 1; }
1963         fi
1964         ol_enable_ldbm="$ol_arg"
1965
1966 else
1967         ol_enable_ldbm="no"
1968 fi
1969 # end --enable-ldbm
1970 # OpenLDAP --with-ldbm_api
1971         # Check whether --with-ldbm_api or --without-ldbm_api was given.
1972 if test "${with_ldbm_api+set}" = set; then
1973   withval="$with_ldbm_api"
1974   
1975         ol_arg=invalid
1976         for ol_val in auto berkeley bcompat mdbm gdbm ; do
1977                 if test "$withval" = "$ol_val" ; then
1978                         ol_arg="$ol_val"
1979                 fi
1980         done
1981         if test "$ol_arg" = "invalid" ; then
1982                 { echo "configure: error: bad value $withval for --with-ldbm_api" 1>&2; exit 1; }
1983         fi
1984         ol_with_ldbm_api="$ol_arg"
1985
1986 else
1987         ol_with_ldbm_api="auto"
1988 fi
1989 # end --with-ldbm_api
1990
1991 # OpenLDAP --with-ldbm_type
1992         # Check whether --with-ldbm_type or --without-ldbm_type was given.
1993 if test "${with_ldbm_type+set}" = set; then
1994   withval="$with_ldbm_type"
1995   
1996         ol_arg=invalid
1997         for ol_val in auto btree hash ; do
1998                 if test "$withval" = "$ol_val" ; then
1999                         ol_arg="$ol_val"
2000                 fi
2001         done
2002         if test "$ol_arg" = "invalid" ; then
2003                 { echo "configure: error: bad value $withval for --with-ldbm_type" 1>&2; exit 1; }
2004         fi
2005         ol_with_ldbm_type="$ol_arg"
2006
2007 else
2008         ol_with_ldbm_type="auto"
2009 fi
2010 # end --with-ldbm_type
2011
2012 # OpenLDAP --enable-meta
2013         # Check whether --enable-meta or --disable-meta was given.
2014 if test "${enable_meta+set}" = set; then
2015   enableval="$enable_meta"
2016   
2017         ol_arg=invalid
2018         for ol_val in no yes mod ; do
2019                 if test "$enableval" = "$ol_val" ; then
2020                         ol_arg="$ol_val"
2021                 fi
2022         done
2023         if test "$ol_arg" = "invalid" ; then
2024                 { echo "configure: error: bad value $enableval for --enable-meta" 1>&2; exit 1; }
2025         fi
2026         ol_enable_meta="$ol_arg"
2027
2028 else
2029         ol_enable_meta="no"
2030 fi
2031 # end --enable-meta
2032 # OpenLDAP --enable-monitor
2033         # Check whether --enable-monitor or --disable-monitor was given.
2034 if test "${enable_monitor+set}" = set; then
2035   enableval="$enable_monitor"
2036   
2037         ol_arg=invalid
2038         for ol_val in no yes mod ; do
2039                 if test "$enableval" = "$ol_val" ; then
2040                         ol_arg="$ol_val"
2041                 fi
2042         done
2043         if test "$ol_arg" = "invalid" ; then
2044                 { echo "configure: error: bad value $enableval for --enable-monitor" 1>&2; exit 1; }
2045         fi
2046         ol_enable_monitor="$ol_arg"
2047
2048 else
2049         ol_enable_monitor="yes"
2050 fi
2051 # end --enable-monitor
2052 # OpenLDAP --enable-null
2053         # Check whether --enable-null or --disable-null was given.
2054 if test "${enable_null+set}" = set; then
2055   enableval="$enable_null"
2056   
2057         ol_arg=invalid
2058         for ol_val in no yes mod ; do
2059                 if test "$enableval" = "$ol_val" ; then
2060                         ol_arg="$ol_val"
2061                 fi
2062         done
2063         if test "$ol_arg" = "invalid" ; then
2064                 { echo "configure: error: bad value $enableval for --enable-null" 1>&2; exit 1; }
2065         fi
2066         ol_enable_null="$ol_arg"
2067
2068 else
2069         ol_enable_null="no"
2070 fi
2071 # end --enable-null
2072 # OpenLDAP --enable-passwd
2073         # Check whether --enable-passwd or --disable-passwd was given.
2074 if test "${enable_passwd+set}" = set; then
2075   enableval="$enable_passwd"
2076   
2077         ol_arg=invalid
2078         for ol_val in no yes mod ; do
2079                 if test "$enableval" = "$ol_val" ; then
2080                         ol_arg="$ol_val"
2081                 fi
2082         done
2083         if test "$ol_arg" = "invalid" ; then
2084                 { echo "configure: error: bad value $enableval for --enable-passwd" 1>&2; exit 1; }
2085         fi
2086         ol_enable_passwd="$ol_arg"
2087
2088 else
2089         ol_enable_passwd="no"
2090 fi
2091 # end --enable-passwd
2092 # OpenLDAP --enable-perl
2093         # Check whether --enable-perl or --disable-perl was given.
2094 if test "${enable_perl+set}" = set; then
2095   enableval="$enable_perl"
2096   
2097         ol_arg=invalid
2098         for ol_val in no yes mod ; do
2099                 if test "$enableval" = "$ol_val" ; then
2100                         ol_arg="$ol_val"
2101                 fi
2102         done
2103         if test "$ol_arg" = "invalid" ; then
2104                 { echo "configure: error: bad value $enableval for --enable-perl" 1>&2; exit 1; }
2105         fi
2106         ol_enable_perl="$ol_arg"
2107
2108 else
2109         ol_enable_perl="no"
2110 fi
2111 # end --enable-perl
2112 # OpenLDAP --enable-shell
2113         # Check whether --enable-shell or --disable-shell was given.
2114 if test "${enable_shell+set}" = set; then
2115   enableval="$enable_shell"
2116   
2117         ol_arg=invalid
2118         for ol_val in no yes mod ; do
2119                 if test "$enableval" = "$ol_val" ; then
2120                         ol_arg="$ol_val"
2121                 fi
2122         done
2123         if test "$ol_arg" = "invalid" ; then
2124                 { echo "configure: error: bad value $enableval for --enable-shell" 1>&2; exit 1; }
2125         fi
2126         ol_enable_shell="$ol_arg"
2127
2128 else
2129         ol_enable_shell="no"
2130 fi
2131 # end --enable-shell
2132 # OpenLDAP --enable-sql
2133         # Check whether --enable-sql or --disable-sql was given.
2134 if test "${enable_sql+set}" = set; then
2135   enableval="$enable_sql"
2136   
2137         ol_arg=invalid
2138         for ol_val in no yes mod ; do
2139                 if test "$enableval" = "$ol_val" ; then
2140                         ol_arg="$ol_val"
2141                 fi
2142         done
2143         if test "$ol_arg" = "invalid" ; then
2144                 { echo "configure: error: bad value $enableval for --enable-sql" 1>&2; exit 1; }
2145         fi
2146         ol_enable_sql="$ol_arg"
2147
2148 else
2149         ol_enable_sql="no"
2150 fi
2151 # end --enable-sql
2152
2153 Overlays="dyngroup proxycache"
2154
2155 # Check whether --with-xxslapoverlays or --without-xxslapoverlays was given.
2156 if test "${with_xxslapoverlays+set}" = set; then
2157   withval="$with_xxslapoverlays"
2158   :
2159 fi
2160
2161
2162 # OpenLDAP --enable-dyngroup
2163         # Check whether --enable-dyngroup or --disable-dyngroup was given.
2164 if test "${enable_dyngroup+set}" = set; then
2165   enableval="$enable_dyngroup"
2166   
2167         ol_arg=invalid
2168         for ol_val in no yes mod ; do
2169                 if test "$enableval" = "$ol_val" ; then
2170                         ol_arg="$ol_val"
2171                 fi
2172         done
2173         if test "$ol_arg" = "invalid" ; then
2174                 { echo "configure: error: bad value $enableval for --enable-dyngroup" 1>&2; exit 1; }
2175         fi
2176         ol_enable_dyngroup="$ol_arg"
2177
2178 else
2179         ol_enable_dyngroup="no"
2180 fi
2181 # end --enable-dyngroup
2182
2183 # OpenLDAP --enable-proxycache
2184         # Check whether --enable-proxycache or --disable-proxycache was given.
2185 if test "${enable_proxycache+set}" = set; then
2186   enableval="$enable_proxycache"
2187   
2188         ol_arg=invalid
2189         for ol_val in no yes mod ; do
2190                 if test "$enableval" = "$ol_val" ; then
2191                         ol_arg="$ol_val"
2192                 fi
2193         done
2194         if test "$ol_arg" = "invalid" ; then
2195                 { echo "configure: error: bad value $enableval for --enable-proxycache" 1>&2; exit 1; }
2196         fi
2197         ol_enable_proxycache="$ol_arg"
2198
2199 else
2200         ol_enable_proxycache="no"
2201 fi
2202 # end --enable-proxycache
2203
2204
2205 # Check whether --with-xxslurpdoptions or --without-xxslurpdoptions was given.
2206 if test "${with_xxslurpdoptions+set}" = set; then
2207   withval="$with_xxslurpdoptions"
2208   :
2209 fi
2210
2211 # OpenLDAP --enable-slurpd
2212         # Check whether --enable-slurpd or --disable-slurpd was given.
2213 if test "${enable_slurpd+set}" = set; then
2214   enableval="$enable_slurpd"
2215   
2216         ol_arg=invalid
2217         for ol_val in auto yes no ; do
2218                 if test "$enableval" = "$ol_val" ; then
2219                         ol_arg="$ol_val"
2220                 fi
2221         done
2222         if test "$ol_arg" = "invalid" ; then
2223                 { echo "configure: error: bad value $enableval for --enable-slurpd" 1>&2; exit 1; }
2224         fi
2225         ol_enable_slurpd="$ol_arg"
2226
2227 else
2228         ol_enable_slurpd="auto"
2229 fi
2230 # end --enable-slurpd
2231
2232 # Check whether --with-xxliboptions or --without-xxliboptions was given.
2233 if test "${with_xxliboptions+set}" = set; then
2234   withval="$with_xxliboptions"
2235   :
2236 fi
2237
2238 # Check whether --enable-static or --disable-static was given.
2239 if test "${enable_static+set}" = set; then
2240   enableval="$enable_static"
2241   p=${PACKAGE-default}
2242 case $enableval in
2243 yes) enable_static=yes ;;
2244 no) enable_static=no ;;
2245 *)
2246   enable_static=no
2247   # Look at the argument we got.  We use all the common list separators.
2248   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2249   for pkg in $enableval; do
2250     if test "X$pkg" = "X$p"; then
2251       enable_static=yes
2252     fi
2253   done
2254   IFS="$ac_save_ifs"
2255   ;;
2256 esac
2257 else
2258   enable_static=yes
2259 fi
2260
2261 # Check whether --enable-shared or --disable-shared was given.
2262 if test "${enable_shared+set}" = set; then
2263   enableval="$enable_shared"
2264   p=${PACKAGE-default}
2265 case $enableval in
2266 yes) enable_shared=yes ;;
2267 no) enable_shared=no ;;
2268 *)
2269   enable_shared=no
2270   # Look at the argument we got.  We use all the common list separators.
2271   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2272   for pkg in $enableval; do
2273     if test "X$pkg" = "X$p"; then
2274       enable_shared=yes
2275     fi
2276   done
2277   IFS="$ac_save_ifs"
2278   ;;
2279 esac
2280 else
2281   enable_shared=yes
2282 fi
2283
2284
2285
2286 # validate options
2287 if test $ol_enable_slapd = no ; then
2288                 if test $ol_enable_slapi = yes ; then
2289                 echo "configure: warning: slapd disabled, ignoring --enable-slapi argument" 1>&2
2290         fi
2291         for i in $Backends; do
2292                 eval "ol_tmp=\$ol_enable_$i"
2293                 if test $ol_tmp != no ; then
2294                         echo "configure: warning: slapd disabled, ignoring --enable-$i argument" 1>&2
2295                         eval "ol_enable_$i=no"
2296                 fi
2297         done
2298         if test $ol_enable_modules = yes ; then
2299                 echo "configure: warning: slapd disabled, ignoring --enable-modules argument" 1>&2
2300         fi
2301         if test $ol_enable_multimaster = yes ; then
2302                 echo "configure: warning: slapd disabled, ignoring --enable-multimaster argument" 1>&2
2303         fi
2304         if test $ol_enable_wrappers = yes ; then
2305                 echo "configure: warning: slapd disabled, ignoring --enable-wrappers argument" 1>&2
2306         fi
2307         if test $ol_enable_rlookups = yes ; then
2308                 echo "configure: warning: slapd disabled, ignoring --enable-rlookups argument" 1>&2
2309         fi
2310         if test $ol_enable_aci = yes ; then
2311                 echo "configure: warning: slapd disabled, ignoring --enable-aci argument" 1>&2
2312         fi
2313         if test $ol_with_ldbm_api != auto ; then
2314                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-api argument" 1>&2
2315         fi
2316         if test $ol_with_ldbm_type != auto ; then
2317                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-type argument" 1>&2
2318         fi
2319         if test $ol_enable_slurpd = yes ; then
2320                 { echo "configure: error: slurpd requires slapd" 1>&2; exit 1; }
2321         fi
2322         if test $ol_enable_rewrite = yes ; then
2323                 echo "configure: warning: slapd disabled, ignoring --enable-rewrite argument" 1>&2
2324         fi
2325                 for i in $Overlays; do
2326                 eval "ol_tmp=\$ol_enable_$i"
2327                 if test $ol_tmp != no ; then
2328                         echo "configure: warning: slapd disabled, ignoring --enable-$i argument" 1>&2
2329                         eval "ol_enable_$i=no"
2330                 fi
2331         done
2332
2333         # force settings to no
2334         ol_enable_slapi=no
2335
2336         ol_enable_modules=no
2337         ol_enable_multimaster=no
2338         ol_enable_rlookups=no
2339         ol_enable_aci=no
2340         ol_enable_wrappers=no
2341
2342         ol_with_ldbm_api=no
2343         ol_with_ldbm_type=no
2344
2345         ol_enable_slurpd=no
2346
2347         ol_enable_rewrite=no
2348
2349 elif test $ol_enable_ldbm = no ; then
2350         
2351         if test $ol_with_ldbm_api != auto ; then
2352                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-api argument" 1>&2
2353         fi
2354
2355         if test $ol_with_ldbm_type != auto ; then
2356                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-type argument" 1>&2
2357         fi
2358
2359         if test $ol_enable_modules != yes -a \
2360                 $ol_enable_bdb = no -a \
2361                 $ol_enable_dnssrv = no -a \
2362                 $ol_enable_hdb = no -a \
2363                 $ol_enable_ldap = no -a \
2364                 $ol_enable_meta = no -a \
2365                 $ol_enable_monitor = no -a \
2366                 $ol_enable_null = no -a \
2367                 $ol_enable_passwd = no -a \
2368                 $ol_enable_perl = no -a \
2369                 $ol_enable_shell = no -a \
2370                 $ol_enable_sql = no ; then
2371
2372                 if test $ol_enable_slapd = yes ; then
2373                         { echo "configure: error: slapd requires a backend" 1>&2; exit 1; }
2374                 else
2375                         echo "configure: warning: skipping slapd, no backend specified" 1>&2
2376                         ol_enable_slapd=no
2377                 fi
2378         fi
2379
2380         ol_with_ldbm_api=no
2381         ol_with_ldbm_type=no
2382
2383         if test $ol_enable_bdb != no -o $ol_enable_hdb != no; then
2384                 ol_with_ldbm_api=berkeley
2385         fi
2386
2387 else
2388                 if test $ol_with_ldbm_api = gdbm -a \
2389                 $ol_with_ldbm_type = btree ; then
2390                 { echo "configure: error: GDBM only supports LDBM type hash" 1>&2; exit 1; }
2391         fi
2392         if test $ol_with_ldbm_api = mdbm -a \
2393                 $ol_with_ldbm_type = btree ; then
2394                 { echo "configure: error: MDBM only supports LDBM type hash" 1>&2; exit 1; }
2395         fi
2396         if test $ol_with_ldbm_api = ndbm -a \
2397                 $ol_with_ldbm_type = btree ; then
2398                 { echo "configure: error: NDBM only supports LDBM type hash" 1>&2; exit 1; }
2399         fi
2400
2401         if test $ol_enable_bdb = yes -o $ol_enable_hdb = yes ; then
2402                 if test $ol_with_ldbm_api = auto ; then
2403                         ol_with_ldbm_api=berkeley
2404                 elif test $ol_with_ldbm_api != berkeley ; then
2405                         { echo "configure: error: LDBM API not compatible with BDB/HDB" 1>&2; exit 1; }
2406                 fi
2407
2408         elif test $ol_enable_bdb = auto ; then
2409                 if test $ol_with_ldbm_api != berkeley \
2410                         -o $ol_with_ldbm_api != auto ; then
2411                         echo "configure: warning: LDBM API not compatible with BDB, disabling BDB" 1>&2
2412                         ol_enable_bdb=no
2413                 fi
2414         fi
2415 fi
2416
2417 if test $ol_enable_meta = yes -a $ol_enable_ldap = no ; then
2418         { echo "configure: error: --enable-meta requires --enable-ldap" 1>&2; exit 1; }
2419 fi
2420
2421 if test $ol_enable_slurpd = yes ; then
2422                 if test $ol_with_threads = no ; then
2423                 { echo "configure: error: slurpd requires threads" 1>&2; exit 1; }
2424         fi
2425 fi
2426
2427 if test $ol_enable_lmpasswd = yes ; then
2428         if test $ol_with_tls = no ; then
2429                 { echo "configure: error: LAN Manager passwords require OpenSSL" 1>&2; exit 1; }
2430         fi
2431 fi
2432
2433 if test $ol_enable_kbind = yes ; then
2434         if test $ol_with_kerberos = no ; then
2435                 { echo "configure: error: options require --with-kerberos" 1>&2; exit 1; }
2436         elif test $ol_with_kerberos = auto ; then
2437                 ol_with_kerberos=yes
2438         fi
2439
2440 elif test $ol_enable_kbind = no ; then
2441         if test $ol_with_kerberos = auto ; then
2442                 ol_with_kerberos=no
2443         elif test $ol_with_kerberos != no ; then
2444                 echo "configure: warning: Kerberos detection enabled unnecessarily" 1>&2;
2445                 ol_with_kerberos=no
2446         fi
2447 fi
2448
2449 if test $ol_enable_spasswd = yes ; then
2450         if test $ol_with_cyrus_sasl = no ; then
2451                 { echo "configure: error: options require --with-cyrus-sasl" 1>&2; exit 1; }
2452         fi
2453         ol_with_cyrus_sasl=yes
2454 fi
2455
2456 echo "$ac_t""done" 1>&6
2457
2458 LDAP_LIBS=
2459 LDBM_LIBS=
2460 LTHREAD_LIBS=
2461 LUTIL_LIBS=
2462
2463 SLAPD_LIBS=
2464 SLURPD_LIBS=
2465
2466 BUILD_SLAPD=no
2467 BUILD_SLURPD=no
2468
2469 BUILD_THREAD=no
2470
2471 BUILD_SLAPI=no
2472 SLAPD_SLAPI_DEPEND=
2473
2474 BUILD_BDB=no
2475 BUILD_DNSSRV=no
2476 BUILD_HDB=no
2477 BUILD_LDAP=no
2478 BUILD_LDBM=no
2479 BUILD_META=no
2480 BUILD_MONITOR=no
2481 BUILD_NULL=no
2482 BUILD_PASSWD=no
2483 BUILD_PERL=no
2484 BUILD_SHELL=no
2485 BUILD_SQL=no
2486
2487 BUILD_DYNGROUP=no
2488 BUILD_PROXYCACHE=no
2489
2490 SLAPD_DYNAMIC_OVERLAYS=
2491
2492 SLAPD_MODULES_LDFLAGS=
2493 SLAPD_MODULES_CPPFLAGS=
2494
2495 SLAPD_STATIC_BACKENDS=
2496 SLAPD_DYNAMIC_BACKENDS=
2497
2498 SLAPD_PERL_LDFLAGS=
2499 MOD_PERL_LDFLAGS=
2500 PERL_CPPFLAGS=
2501
2502 SLAPD_SQL_LDFLAGS=
2503 SLAPD_SQL_LIBS=
2504 SLAPD_SQL_INCLUDES=
2505
2506 KRB4_LIBS=
2507 KRB5_LIBS=
2508 SASL_LIBS=
2509 TLS_LIBS=
2510 MODULES_LIBS=
2511 SLAPI_LIBS=
2512 LIBSLAPI=
2513 LIBSLAPITOOLS=
2514 AUTH_LIBS=
2515
2516 SLAPD_SLP_LIBS=
2517
2518
2519 # Find a good install program.  We prefer a C program (faster),
2520 # so one script is as good as another.  But avoid the broken or
2521 # incompatible versions:
2522 # SysV /etc/install, /usr/sbin/install
2523 # SunOS /usr/etc/install
2524 # IRIX /sbin/install
2525 # AIX /bin/install
2526 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
2527 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
2528 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2529 # ./install, which can be erroneously created by make from ./install.sh.
2530 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
2531 echo "configure:2532: checking for a BSD compatible install" >&5
2532 if test -z "$INSTALL"; then
2533 if eval "test \"\${ac_cv_path_install+set}\" = set"; then
2534   echo $ac_n "(cached) $ac_c" 1>&6
2535 else
2536     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
2537   for ac_dir in $PATH; do
2538     # Account for people who put trailing slashes in PATH elements.
2539     case "$ac_dir/" in
2540     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
2541     *)
2542       # OSF1 and SCO ODT 3.0 have their own names for install.
2543       # Don't use installbsd from OSF since it installs stuff as root
2544       # by default.
2545       for ac_prog in ginstall scoinst install; do
2546         if test -f $ac_dir/$ac_prog; then
2547           if test $ac_prog = install &&
2548             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
2549             # AIX install.  It has an incompatible calling convention.
2550             :
2551           elif test $ac_prog = install &&
2552             grep pwplus $ac_dir/$ac_prog >/dev/null 2>&1; then
2553             # program-specific install script used by HP pwplus--don't use.
2554             :
2555           else
2556             ac_cv_path_install="$ac_dir/$ac_prog -c"
2557             break 2
2558           fi
2559         fi
2560       done
2561       ;;
2562     esac
2563   done
2564   IFS="$ac_save_IFS"
2565
2566 fi
2567   if test "${ac_cv_path_install+set}" = set; then
2568     INSTALL="$ac_cv_path_install"
2569   else
2570     # As a last resort, use the slow shell script.  We don't cache a
2571     # path for INSTALL within a source directory, because that will
2572     # break other packages using the cache if that directory is
2573     # removed, or if the path is relative.
2574     INSTALL="$ac_install_sh"
2575   fi
2576 fi
2577 echo "$ac_t""$INSTALL" 1>&6
2578
2579 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2580 # It thinks the first close brace ends the variable substitution.
2581 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2582
2583 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
2584
2585 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
2586
2587
2588 cat >> confdefs.h <<\EOF
2589 #define HAVE_MKVERSION 1
2590 EOF
2591
2592
2593
2594
2595 ol_aix_threads=no
2596 case "$target" in
2597 *-*-aix*)       if test -z "$CC" ; then
2598                 case "$ol_with_threads" in
2599                 auto | yes |  posix) ol_aix_threads=yes ;;
2600                 esac
2601         fi
2602 ;;
2603 esac
2604
2605 if test $ol_aix_threads = yes ; then
2606         if test -z "${CC}" ; then
2607                 for ac_prog in cc_r xlc_r cc
2608 do
2609 # Extract the first word of "$ac_prog", so it can be a program name with args.
2610 set dummy $ac_prog; ac_word=$2
2611 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2612 echo "configure:2613: checking for $ac_word" >&5
2613 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2614   echo $ac_n "(cached) $ac_c" 1>&6
2615 else
2616   if test -n "$CC"; then
2617   ac_cv_prog_CC="$CC" # Let the user override the test.
2618 else
2619   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2620   ac_dummy="$PATH"
2621   for ac_dir in $ac_dummy; do
2622     test -z "$ac_dir" && ac_dir=.
2623     if test -f $ac_dir/$ac_word; then
2624       ac_cv_prog_CC="$ac_prog"
2625       break
2626     fi
2627   done
2628   IFS="$ac_save_ifs"
2629 fi
2630 fi
2631 CC="$ac_cv_prog_CC"
2632 if test -n "$CC"; then
2633   echo "$ac_t""$CC" 1>&6
2634 else
2635   echo "$ac_t""no" 1>&6
2636 fi
2637
2638 test -n "$CC" && break
2639 done
2640
2641
2642                 if test "$CC" = cc ; then
2643                                                 if test $ol_with_threads != auto ; then
2644                                 { echo "configure: error: --with-threads requires cc_r (or other suitable compiler) on AIX" 1>&2; exit 1; }
2645                         else
2646                                 echo "configure: warning: disabling threads, no cc_r on AIX" 1>&2
2647                         fi
2648                         ol_with_threads=no
2649                 fi
2650         fi
2651
2652         if test "${CC}" = "cc_r" -o "${CC}" = "xlc_r" ; then
2653                 ol_with_threads=posix
2654                 ol_cv_pthread_create=yes
2655         fi
2656 fi
2657
2658 if test -z "${CC}"; then
2659         for ac_prog in cc gcc
2660 do
2661 # Extract the first word of "$ac_prog", so it can be a program name with args.
2662 set dummy $ac_prog; ac_word=$2
2663 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2664 echo "configure:2665: checking for $ac_word" >&5
2665 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2666   echo $ac_n "(cached) $ac_c" 1>&6
2667 else
2668   if test -n "$CC"; then
2669   ac_cv_prog_CC="$CC" # Let the user override the test.
2670 else
2671   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2672   ac_dummy="$PATH"
2673   for ac_dir in $ac_dummy; do
2674     test -z "$ac_dir" && ac_dir=.
2675     if test -f $ac_dir/$ac_word; then
2676       ac_cv_prog_CC="$ac_prog"
2677       break
2678     fi
2679   done
2680   IFS="$ac_save_ifs"
2681 fi
2682 fi
2683 CC="$ac_cv_prog_CC"
2684 if test -n "$CC"; then
2685   echo "$ac_t""$CC" 1>&6
2686 else
2687   echo "$ac_t""no" 1>&6
2688 fi
2689
2690 test -n "$CC" && break
2691 done
2692 test -n "$CC" || CC="missing"
2693
2694
2695         if test "${CC}" = "missing" ; then
2696                 { echo "configure: error: Unable to locate cc(1) or suitable replacement.  Check PATH or set CC." 1>&2; exit 1; }
2697         fi
2698 fi
2699
2700 if test -z "${AR}"; then
2701         for ac_prog in ar gar
2702 do
2703 # Extract the first word of "$ac_prog", so it can be a program name with args.
2704 set dummy $ac_prog; ac_word=$2
2705 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2706 echo "configure:2707: checking for $ac_word" >&5
2707 if eval "test \"\${ac_cv_prog_AR+set}\" = set"; then
2708   echo $ac_n "(cached) $ac_c" 1>&6
2709 else
2710   if test -n "$AR"; then
2711   ac_cv_prog_AR="$AR" # Let the user override the test.
2712 else
2713   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2714   ac_dummy="$PATH"
2715   for ac_dir in $ac_dummy; do
2716     test -z "$ac_dir" && ac_dir=.
2717     if test -f $ac_dir/$ac_word; then
2718       ac_cv_prog_AR="$ac_prog"
2719       break
2720     fi
2721   done
2722   IFS="$ac_save_ifs"
2723 fi
2724 fi
2725 AR="$ac_cv_prog_AR"
2726 if test -n "$AR"; then
2727   echo "$ac_t""$AR" 1>&6
2728 else
2729   echo "$ac_t""no" 1>&6
2730 fi
2731
2732 test -n "$AR" && break
2733 done
2734 test -n "$AR" || AR="missing"
2735
2736
2737         if test "${AR}" = "missing" ; then
2738                 { echo "configure: error: Unable to locate ar(1) or suitable replacement.  Check PATH or set AR." 1>&2; exit 1; }
2739         fi
2740 fi
2741
2742
2743
2744 # Find the correct PATH separator.  Usually this is `:', but
2745 # DJGPP uses `;' like DOS.
2746 if test "X${PATH_SEPARATOR+set}" != Xset; then
2747   UNAME=${UNAME-`uname 2>/dev/null`}
2748   case X$UNAME in
2749     *-DOS) lt_cv_sys_path_separator=';' ;;
2750     *)     lt_cv_sys_path_separator=':' ;;
2751   esac
2752   PATH_SEPARATOR=$lt_cv_sys_path_separator
2753 fi
2754
2755 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
2756 echo "configure:2757: checking for Cygwin environment" >&5
2757 if eval "test \"\${ac_cv_cygwin+set}\" = set"; then
2758   echo $ac_n "(cached) $ac_c" 1>&6
2759 else
2760   cat > conftest.$ac_ext <<EOF
2761 #line 2762 "configure"
2762 #include "confdefs.h"
2763
2764 int main() {
2765
2766 #ifndef __CYGWIN__
2767 #define __CYGWIN__ __CYGWIN32__
2768 #endif
2769 return __CYGWIN__;
2770 ; return 0; }
2771 EOF
2772 if { (eval echo configure:2773: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2773   rm -rf conftest*
2774   ac_cv_cygwin=yes
2775 else
2776   echo "configure: failed program was:" >&5
2777   cat conftest.$ac_ext >&5
2778   rm -rf conftest*
2779   ac_cv_cygwin=no
2780 fi
2781 rm -f conftest*
2782 fi
2783
2784 echo "$ac_t""$ac_cv_cygwin" 1>&6
2785 CYGWIN=
2786 test "$ac_cv_cygwin" = yes && CYGWIN=yes
2787 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
2788 echo "configure:2789: checking for mingw32 environment" >&5
2789 if eval "test \"\${ac_cv_mingw32+set}\" = set"; then
2790   echo $ac_n "(cached) $ac_c" 1>&6
2791 else
2792   cat > conftest.$ac_ext <<EOF
2793 #line 2794 "configure"
2794 #include "confdefs.h"
2795
2796 int main() {
2797 return __MINGW32__;
2798 ; return 0; }
2799 EOF
2800 if { (eval echo configure:2801: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2801   rm -rf conftest*
2802   ac_cv_mingw32=yes
2803 else
2804   echo "configure: failed program was:" >&5
2805   cat conftest.$ac_ext >&5
2806   rm -rf conftest*
2807   ac_cv_mingw32=no
2808 fi
2809 rm -f conftest*
2810 fi
2811
2812 echo "$ac_t""$ac_cv_mingw32" 1>&6
2813 MINGW32=
2814 test "$ac_cv_mingw32" = yes && MINGW32=yes
2815 echo $ac_n "checking for EMX OS/2 environment""... $ac_c" 1>&6
2816 echo "configure:2817: checking for EMX OS/2 environment" >&5
2817 if eval "test \"\${ac_cv_emxos2+set}\" = set"; then
2818   echo $ac_n "(cached) $ac_c" 1>&6
2819 else
2820   cat > conftest.$ac_ext <<EOF
2821 #line 2822 "configure"
2822 #include "confdefs.h"
2823
2824 int main() {
2825 return __EMX__;
2826 ; return 0; }
2827 EOF
2828 if { (eval echo configure:2829: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2829   rm -rf conftest*
2830   ac_cv_emxos2=yes
2831 else
2832   echo "configure: failed program was:" >&5
2833   cat conftest.$ac_ext >&5
2834   rm -rf conftest*
2835   ac_cv_emxos2=no
2836 fi
2837 rm -f conftest*
2838 fi
2839
2840 echo "$ac_t""$ac_cv_emxos2" 1>&6
2841 EMXOS2=
2842 test "$ac_cv_emxos2" = yes && EMXOS2=yes
2843 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
2844 echo "configure:2845: checking how to run the C preprocessor" >&5
2845 # On Suns, sometimes $CPP names a directory.
2846 if test -n "$CPP" && test -d "$CPP"; then
2847   CPP=
2848 fi
2849 if test -z "$CPP"; then
2850 if eval "test \"\${ac_cv_prog_CPP+set}\" = set"; then
2851   echo $ac_n "(cached) $ac_c" 1>&6
2852 else
2853     # This must be in double quotes, not single quotes, because CPP may get
2854   # substituted into the Makefile and "${CC-cc}" will confuse make.
2855   CPP="${CC-cc} -E"
2856   # On the NeXT, cc -E runs the code through the compiler's parser,
2857   # not just through cpp.
2858   cat > conftest.$ac_ext <<EOF
2859 #line 2860 "configure"
2860 #include "confdefs.h"
2861 #include <assert.h>
2862 Syntax Error
2863 EOF
2864 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2865 { (eval echo configure:2866: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2866 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2867 if test -z "$ac_err"; then
2868   :
2869 else
2870   echo "$ac_err" >&5
2871   echo "configure: failed program was:" >&5
2872   cat conftest.$ac_ext >&5
2873   rm -rf conftest*
2874   CPP="${CC-cc} -E -traditional-cpp"
2875   cat > conftest.$ac_ext <<EOF
2876 #line 2877 "configure"
2877 #include "confdefs.h"
2878 #include <assert.h>
2879 Syntax Error
2880 EOF
2881 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2882 { (eval echo configure:2883: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2883 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2884 if test -z "$ac_err"; then
2885   :
2886 else
2887   echo "$ac_err" >&5
2888   echo "configure: failed program was:" >&5
2889   cat conftest.$ac_ext >&5
2890   rm -rf conftest*
2891   CPP="${CC-cc} -nologo -E"
2892   cat > conftest.$ac_ext <<EOF
2893 #line 2894 "configure"
2894 #include "confdefs.h"
2895 #include <assert.h>
2896 Syntax Error
2897 EOF
2898 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2899 { (eval echo configure:2900: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2900 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2901 if test -z "$ac_err"; then
2902   :
2903 else
2904   echo "$ac_err" >&5
2905   echo "configure: failed program was:" >&5
2906   cat conftest.$ac_ext >&5
2907   rm -rf conftest*
2908   CPP=/lib/cpp
2909 fi
2910 rm -f conftest*
2911 fi
2912 rm -f conftest*
2913 fi
2914 rm -f conftest*
2915   ac_cv_prog_CPP="$CPP"
2916 fi
2917   CPP="$ac_cv_prog_CPP"
2918 else
2919   ac_cv_prog_CPP="$CPP"
2920 fi
2921 echo "$ac_t""$CPP" 1>&6
2922
2923 # Check whether --enable-fast-install or --disable-fast-install was given.
2924 if test "${enable_fast_install+set}" = set; then
2925   enableval="$enable_fast_install"
2926   p=${PACKAGE-default}
2927 case $enableval in
2928 yes) enable_fast_install=yes ;;
2929 no) enable_fast_install=no ;;
2930 *)
2931   enable_fast_install=no
2932   # Look at the argument we got.  We use all the common list separators.
2933   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2934   for pkg in $enableval; do
2935     if test "X$pkg" = "X$p"; then
2936       enable_fast_install=yes
2937     fi
2938   done
2939   IFS="$ac_save_ifs"
2940   ;;
2941 esac
2942 else
2943   enable_fast_install=yes
2944 fi
2945
2946 # Extract the first word of "gcc", so it can be a program name with args.
2947 set dummy gcc; ac_word=$2
2948 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2949 echo "configure:2950: checking for $ac_word" >&5
2950 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2951   echo $ac_n "(cached) $ac_c" 1>&6
2952 else
2953   if test -n "$CC"; then
2954   ac_cv_prog_CC="$CC" # Let the user override the test.
2955 else
2956   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2957   ac_dummy="$PATH"
2958   for ac_dir in $ac_dummy; do
2959     test -z "$ac_dir" && ac_dir=.
2960     if test -f $ac_dir/$ac_word; then
2961       ac_cv_prog_CC="gcc"
2962       break
2963     fi
2964   done
2965   IFS="$ac_save_ifs"
2966 fi
2967 fi
2968 CC="$ac_cv_prog_CC"
2969 if test -n "$CC"; then
2970   echo "$ac_t""$CC" 1>&6
2971 else
2972   echo "$ac_t""no" 1>&6
2973 fi
2974
2975 if test -z "$CC"; then
2976   # Extract the first word of "cc", so it can be a program name with args.
2977 set dummy cc; ac_word=$2
2978 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2979 echo "configure:2980: checking for $ac_word" >&5
2980 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2981   echo $ac_n "(cached) $ac_c" 1>&6
2982 else
2983   if test -n "$CC"; then
2984   ac_cv_prog_CC="$CC" # Let the user override the test.
2985 else
2986   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2987   ac_prog_rejected=no
2988   ac_dummy="$PATH"
2989   for ac_dir in $ac_dummy; do
2990     test -z "$ac_dir" && ac_dir=.
2991     if test -f $ac_dir/$ac_word; then
2992       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
2993         ac_prog_rejected=yes
2994         continue
2995       fi
2996       ac_cv_prog_CC="cc"
2997       break
2998     fi
2999   done
3000   IFS="$ac_save_ifs"
3001 if test $ac_prog_rejected = yes; then
3002   # We found a bogon in the path, so make sure we never use it.
3003   set dummy $ac_cv_prog_CC
3004   shift
3005   if test $# -gt 0; then
3006     # We chose a different compiler from the bogus one.
3007     # However, it has the same basename, so the bogon will be chosen
3008     # first if we set CC to just the basename; use the full file name.
3009     shift
3010     set dummy "$ac_dir/$ac_word" "$@"
3011     shift
3012     ac_cv_prog_CC="$@"
3013   fi
3014 fi
3015 fi
3016 fi
3017 CC="$ac_cv_prog_CC"
3018 if test -n "$CC"; then
3019   echo "$ac_t""$CC" 1>&6
3020 else
3021   echo "$ac_t""no" 1>&6
3022 fi
3023
3024   if test -z "$CC"; then
3025     case "`uname -s`" in
3026     *win32* | *WIN32* | *CYGWIN*)
3027       # Extract the first word of "cl", so it can be a program name with args.
3028 set dummy cl; ac_word=$2
3029 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3030 echo "configure:3031: checking for $ac_word" >&5
3031 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3032   echo $ac_n "(cached) $ac_c" 1>&6
3033 else
3034   if test -n "$CC"; then
3035   ac_cv_prog_CC="$CC" # Let the user override the test.
3036 else
3037   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3038   ac_dummy="$PATH"
3039   for ac_dir in $ac_dummy; do
3040     test -z "$ac_dir" && ac_dir=.
3041     if test -f $ac_dir/$ac_word; then
3042       ac_cv_prog_CC="cl"
3043       break
3044     fi
3045   done
3046   IFS="$ac_save_ifs"
3047 fi
3048 fi
3049 CC="$ac_cv_prog_CC"
3050 if test -n "$CC"; then
3051   echo "$ac_t""$CC" 1>&6
3052 else
3053   echo "$ac_t""no" 1>&6
3054 fi
3055  ;;
3056     esac
3057   fi
3058   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
3059 fi
3060
3061 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works""... $ac_c" 1>&6
3062 echo "configure:3063: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works" >&5
3063
3064 ac_ext=c
3065 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
3066 ac_cpp='$CPP $CPPFLAGS'
3067 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
3068 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
3069 cross_compiling=$ac_cv_prog_cc_cross
3070
3071 cat > conftest.$ac_ext << EOF
3072
3073 #line 3074 "configure"
3074 #include "confdefs.h"
3075
3076 main(){return(0);}
3077 EOF
3078 if { (eval echo configure:3079: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3079   ac_cv_prog_cc_works=yes
3080   # If we can't run a trivial program, we are probably using a cross compiler.
3081   if (./conftest; exit) 2>/dev/null; then
3082     ac_cv_prog_cc_cross=no
3083   else
3084     ac_cv_prog_cc_cross=yes
3085   fi
3086 else
3087   echo "configure: failed program was:" >&5
3088   cat conftest.$ac_ext >&5
3089   ac_cv_prog_cc_works=no
3090 fi
3091 rm -fr conftest*
3092 ac_ext=c
3093 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
3094 ac_cpp='$CPP $CPPFLAGS'
3095 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
3096 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
3097 cross_compiling=$ac_cv_prog_cc_cross
3098
3099 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
3100 if test $ac_cv_prog_cc_works = no; then
3101   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
3102 fi
3103 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
3104 echo "configure:3105: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler" >&5
3105 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
3106 cross_compiling=$ac_cv_prog_cc_cross
3107
3108 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
3109 echo "configure:3110: checking whether we are using GNU C" >&5
3110 if eval "test \"\${ac_cv_prog_gcc+set}\" = set"; then
3111   echo $ac_n "(cached) $ac_c" 1>&6
3112 else
3113   cat > conftest.c <<EOF
3114 #ifdef __GNUC__
3115   yes;
3116 #endif
3117 EOF
3118 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:3119: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
3119   ac_cv_prog_gcc=yes
3120 else
3121   ac_cv_prog_gcc=no
3122 fi
3123 fi
3124
3125 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
3126
3127 if test $ac_cv_prog_gcc = yes; then
3128   GCC=yes
3129 else
3130   GCC=
3131 fi
3132
3133 ac_test_CFLAGS="${CFLAGS+set}"
3134 ac_save_CFLAGS="$CFLAGS"
3135 CFLAGS=
3136 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
3137 echo "configure:3138: checking whether ${CC-cc} accepts -g" >&5
3138 if eval "test \"\${ac_cv_prog_cc_g+set}\" = set"; then
3139   echo $ac_n "(cached) $ac_c" 1>&6
3140 else
3141   echo 'void f(){}' > conftest.c
3142 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
3143   ac_cv_prog_cc_g=yes
3144 else
3145   ac_cv_prog_cc_g=no
3146 fi
3147 rm -f conftest*
3148
3149 fi
3150
3151 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
3152 if test "$ac_test_CFLAGS" = set; then
3153   CFLAGS="$ac_save_CFLAGS"
3154 elif test $ac_cv_prog_cc_g = yes; then
3155   if test "$GCC" = yes; then
3156     CFLAGS="-g -O2"
3157   else
3158     CFLAGS="-g"
3159   fi
3160 else
3161   if test "$GCC" = yes; then
3162     CFLAGS="-O2"
3163   else
3164     CFLAGS=
3165   fi
3166 fi
3167
3168 # Check whether --with-gnu-ld or --without-gnu-ld was given.
3169 if test "${with_gnu_ld+set}" = set; then
3170   withval="$with_gnu_ld"
3171   test "$withval" = no || with_gnu_ld=yes
3172 else
3173   with_gnu_ld=no
3174 fi
3175
3176 ac_prog=ld
3177 if test "$GCC" = yes; then
3178   # Check if gcc -print-prog-name=ld gives a path.
3179   echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
3180 echo "configure:3181: checking for ld used by GCC" >&5
3181   case $host in
3182   *-*-mingw*)
3183     # gcc leaves a trailing carriage return which upsets mingw
3184     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
3185   *)
3186     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
3187   esac
3188   case $ac_prog in
3189     # Accept absolute paths.
3190     [\\/]* | [A-Za-z]:[\\/]*)
3191       re_direlt='/[^/][^/]*/\.\./'
3192       # Canonicalize the path of ld
3193       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
3194       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
3195         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
3196       done
3197       test -z "$LD" && LD="$ac_prog"
3198       ;;
3199   "")
3200     # If it fails, then pretend we aren't using GCC.
3201     ac_prog=ld
3202     ;;
3203   *)
3204     # If it is relative, then search for the first ld in PATH.
3205     with_gnu_ld=unknown
3206     ;;
3207   esac
3208 elif test "$with_gnu_ld" = yes; then
3209   echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
3210 echo "configure:3211: checking for GNU ld" >&5
3211 else
3212   echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
3213 echo "configure:3214: checking for non-GNU ld" >&5
3214 fi
3215 if eval "test \"\${lt_cv_path_LD+set}\" = set"; then
3216   echo $ac_n "(cached) $ac_c" 1>&6
3217 else
3218   if test -z "$LD"; then
3219   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3220   for ac_dir in $PATH; do
3221     test -z "$ac_dir" && ac_dir=.
3222     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
3223       lt_cv_path_LD="$ac_dir/$ac_prog"
3224       # Check to see if the program is GNU ld.  I'd rather use --version,
3225       # but apparently some GNU ld's only accept -v.
3226       # Break only if it was the GNU/non-GNU ld that we prefer.
3227       if "$lt_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
3228         test "$with_gnu_ld" != no && break
3229       else
3230         test "$with_gnu_ld" != yes && break
3231       fi
3232     fi
3233   done
3234   IFS="$ac_save_ifs"
3235 else
3236   lt_cv_path_LD="$LD" # Let the user override the test with a path.
3237 fi
3238 fi
3239
3240 LD="$lt_cv_path_LD"
3241 if test -n "$LD"; then
3242   echo "$ac_t""$LD" 1>&6
3243 else
3244   echo "$ac_t""no" 1>&6
3245 fi
3246 test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
3247 echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
3248 echo "configure:3249: checking if the linker ($LD) is GNU ld" >&5
3249 if eval "test \"\${lt_cv_prog_gnu_ld+set}\" = set"; then
3250   echo $ac_n "(cached) $ac_c" 1>&6
3251 else
3252   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
3253 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
3254   lt_cv_prog_gnu_ld=yes
3255 else
3256   lt_cv_prog_gnu_ld=no
3257 fi
3258 fi
3259
3260 echo "$ac_t""$lt_cv_prog_gnu_ld" 1>&6
3261 with_gnu_ld=$lt_cv_prog_gnu_ld
3262
3263
3264 echo $ac_n "checking for $LD option to reload object files""... $ac_c" 1>&6
3265 echo "configure:3266: checking for $LD option to reload object files" >&5
3266 if eval "test \"\${lt_cv_ld_reload_flag+set}\" = set"; then
3267   echo $ac_n "(cached) $ac_c" 1>&6
3268 else
3269   lt_cv_ld_reload_flag='-r'
3270 fi
3271
3272 echo "$ac_t""$lt_cv_ld_reload_flag" 1>&6
3273 reload_flag=$lt_cv_ld_reload_flag
3274 test -n "$reload_flag" && reload_flag=" $reload_flag"
3275
3276 echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
3277 echo "configure:3278: checking for BSD-compatible nm" >&5
3278 if eval "test \"\${lt_cv_path_NM+set}\" = set"; then
3279   echo $ac_n "(cached) $ac_c" 1>&6
3280 else
3281   if test -n "$NM"; then
3282   # Let the user override the test.
3283   lt_cv_path_NM="$NM"
3284 else
3285   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3286   for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
3287     test -z "$ac_dir" && ac_dir=.
3288     tmp_nm=$ac_dir/${ac_tool_prefix}nm
3289     if test -f $tmp_nm || test -f $tmp_nm$ac_exeext ; then
3290       # Check to see if the nm accepts a BSD-compat flag.
3291       # Adding the `sed 1q' prevents false positives on HP-UX, which says:
3292       #   nm: unknown option "B" ignored
3293       # Tru64's nm complains that /dev/null is an invalid object file
3294       if ($tmp_nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then
3295         lt_cv_path_NM="$tmp_nm -B"
3296         break
3297       elif ($tmp_nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
3298         lt_cv_path_NM="$tmp_nm -p"
3299         break
3300       else
3301         lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
3302         continue # so that we can try to find one that supports BSD flags
3303       fi
3304     fi
3305   done
3306   IFS="$ac_save_ifs"
3307   test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
3308 fi
3309 fi
3310
3311 NM="$lt_cv_path_NM"
3312 echo "$ac_t""$NM" 1>&6
3313
3314 echo $ac_n "checking for a sed that does not truncate output""... $ac_c" 1>&6
3315 echo "configure:3316: checking for a sed that does not truncate output" >&5
3316 if eval "test \"\${lt_cv_path_SED+set}\" = set"; then
3317   echo $ac_n "(cached) $ac_c" 1>&6
3318 else
3319   # Loop through the user's path and test for sed and gsed.
3320 # Then use that list of sed's as ones to test for truncation.
3321 as_executable_p="test -f"
3322 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3323 for as_dir in $PATH
3324 do
3325   IFS=$as_save_IFS
3326   test -z "$as_dir" && as_dir=.
3327   for ac_prog in sed gsed; do
3328     for ac_exec_ext in '' $ac_executable_extensions; do
3329       if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
3330         _sed_list="$_sed_list $as_dir/$ac_prog$ac_exec_ext"
3331       fi
3332     done
3333   done
3334 done
3335
3336   # Create a temporary directory, and hook for its removal unless debugging.
3337 $debug ||
3338 {
3339   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
3340   trap '{ (exit 1); exit 1; }' 1 2 13 15
3341 }
3342
3343 # Create a (secure) tmp directory for tmp files.
3344 : ${TMPDIR=/tmp}
3345 {
3346   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/sedXXXXXX") 2>/dev/null` &&
3347   test -n "$tmp" && test -d "$tmp"
3348 }  ||
3349 {
3350   tmp=$TMPDIR/sed$$-$RANDOM
3351   (umask 077 && mkdir $tmp)
3352 } ||
3353 {
3354    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
3355    { (exit 1); exit 1; }
3356 }
3357   _max=0
3358   _count=0
3359   # Add /usr/xpg4/bin/sed as it is typically found on Solaris
3360   # along with /bin/sed that truncates output.
3361   for _sed in $_sed_list /usr/xpg4/bin/sed; do
3362     test ! -f ${_sed} && break
3363     cat /dev/null > "$tmp/sed.in"
3364     _count=0
3365     echo ${ECHO_N-$ac_n} "0123456789${ECHO_C-$ac_c}" >"$tmp/sed.in"
3366     # Check for GNU sed and select it if it is found.
3367     if "${_sed}" --version 2>&1 < /dev/null | egrep '(GNU)' > /dev/null; then
3368       lt_cv_path_SED=${_sed}
3369       break
3370     fi
3371     while true; do
3372       cat "$tmp/sed.in" "$tmp/sed.in" >"$tmp/sed.tmp"
3373       mv "$tmp/sed.tmp" "$tmp/sed.in"
3374       cp "$tmp/sed.in" "$tmp/sed.nl"
3375       echo >>"$tmp/sed.nl"
3376       ${_sed} -e 's/a$//' < "$tmp/sed.nl" >"$tmp/sed.out" || break
3377       cmp -s "$tmp/sed.out" "$tmp/sed.nl" || break
3378       # 40000 chars as input seems more than enough
3379       test $_count -gt 10 && break
3380       _count=`expr $_count + 1`
3381       if test $_count -gt $_max; then
3382         _max=$_count
3383         lt_cv_path_SED=$_sed
3384       fi
3385     done
3386   done
3387   rm -rf "$tmp"
3388
3389 fi
3390
3391 if test "X$SED" != "X"; then
3392   lt_cv_path_SED=$SED
3393 else
3394   SED=$lt_cv_path_SED
3395 fi
3396 echo "$ac_t""$SED" 1>&6
3397
3398 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
3399 echo "configure:3400: checking whether ln -s works" >&5
3400 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
3401   echo $ac_n "(cached) $ac_c" 1>&6
3402 else
3403   rm -f conftestdata
3404 if ln -s X conftestdata 2>/dev/null
3405 then
3406   rm -f conftestdata
3407   ac_cv_prog_LN_S="ln -s"
3408 else
3409   ac_cv_prog_LN_S=ln
3410 fi
3411 fi
3412 LN_S="$ac_cv_prog_LN_S"
3413 if test "$ac_cv_prog_LN_S" = "ln -s"; then
3414   echo "$ac_t""yes" 1>&6
3415 else
3416   echo "$ac_t""no" 1>&6
3417 fi
3418
3419 echo $ac_n "checking how to recognise dependent libraries""... $ac_c" 1>&6
3420 echo "configure:3421: checking how to recognise dependent libraries" >&5
3421 if eval "test \"\${lt_cv_deplibs_check_method+set}\" = set"; then
3422   echo $ac_n "(cached) $ac_c" 1>&6
3423 else
3424   lt_cv_file_magic_cmd='$MAGIC_CMD'
3425 lt_cv_file_magic_test_file=
3426 lt_cv_deplibs_check_method='unknown'
3427 # Need to set the preceding variable on all platforms that support
3428 # interlibrary dependencies.
3429 # 'none' -- dependencies not supported.
3430 # `unknown' -- same as none, but documents that we really don't know.
3431 # 'pass_all' -- all dependencies passed with no checks.
3432 # 'test_compile' -- check by making test program.
3433 # 'file_magic [[regex]]' -- check by looking for files in library path
3434 # which responds to the $file_magic_cmd with a given egrep regex.
3435 # If you have `file' or equivalent on your system and you're not sure
3436 # whether `pass_all' will *always* work, you probably want this one.
3437
3438 case $host_os in
3439 aix4* | aix5*)
3440   lt_cv_deplibs_check_method=pass_all
3441   ;;
3442
3443 beos*)
3444   lt_cv_deplibs_check_method=pass_all
3445   ;;
3446
3447 bsdi4*)
3448   lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
3449   lt_cv_file_magic_cmd='/usr/bin/file -L'
3450   lt_cv_file_magic_test_file=/shlib/libc.so
3451   ;;
3452
3453 cygwin* | mingw* | pw32*)
3454   lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
3455   lt_cv_file_magic_cmd='$OBJDUMP -f'
3456   ;;
3457
3458 darwin* | rhapsody*)
3459   lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library'
3460   lt_cv_file_magic_cmd='/usr/bin/file -L'
3461   case "$host_os" in
3462   rhapsody* | darwin1.[012])
3463     lt_cv_file_magic_test_file=`echo /System/Library/Frameworks/System.framework/Versions/*/System | head -1`
3464     ;;
3465   *) # Darwin 1.3 on
3466     lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
3467     ;;
3468   esac
3469   ;;
3470
3471 freebsd*)
3472   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3473     case $host_cpu in
3474     i*86 )
3475       # Not sure whether the presence of OpenBSD here was a mistake.
3476       # Let's accept both of them until this is cleared up.
3477       lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[3-9]86 (compact )?demand paged shared library'
3478       lt_cv_file_magic_cmd=/usr/bin/file
3479       lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3480       ;;
3481     esac
3482   else
3483     lt_cv_deplibs_check_method=pass_all
3484   fi
3485   ;;
3486
3487 gnu*)
3488   lt_cv_deplibs_check_method=pass_all
3489   ;;
3490
3491 hpux10.20*|hpux11*)
3492   lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library'
3493   lt_cv_file_magic_cmd=/usr/bin/file
3494   lt_cv_file_magic_test_file=/usr/lib/libc.sl
3495   ;;
3496
3497 irix5* | irix6* | nonstopux*)
3498   case $host_os in
3499   irix5* | nonstopux*)
3500     # this will be overridden with pass_all, but let us keep it just in case
3501     lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
3502     ;;
3503   *)
3504     case $LD in
3505     *-32|*"-32 ") libmagic=32-bit;;
3506     *-n32|*"-n32 ") libmagic=N32;;
3507     *-64|*"-64 ") libmagic=64-bit;;
3508     *) libmagic=never-match;;
3509     esac
3510     # this will be overridden with pass_all, but let us keep it just in case
3511     lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[1234] dynamic lib MIPS - version 1"
3512     ;;
3513   esac
3514   lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
3515   lt_cv_deplibs_check_method=pass_all
3516   ;;
3517
3518 # This must be Linux ELF.
3519 linux-gnu*)
3520   case $host_cpu in
3521   alpha* | hppa* | i*86 | mips | mipsel | powerpc* | sparc* | ia64*)
3522     lt_cv_deplibs_check_method=pass_all ;;
3523   *)
3524     # glibc up to 2.1.1 does not perform some relocations on ARM
3525     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;;
3526   esac
3527   lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
3528   ;;
3529
3530 netbsd*)
3531   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3532     lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
3533   else
3534     lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so$'
3535   fi
3536   ;;
3537
3538 newos6*)
3539   lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
3540   lt_cv_file_magic_cmd=/usr/bin/file
3541   lt_cv_file_magic_test_file=/usr/lib/libnls.so
3542   ;;
3543
3544 openbsd*)
3545   lt_cv_file_magic_cmd=/usr/bin/file
3546   lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3547   if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
3548     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB shared object'
3549   else
3550     lt_cv_deplibs_check_method='file_magic OpenBSD.* shared library'
3551   fi
3552   ;;
3553
3554 openedition*)
3555   lt_cv_deplibs_check_method=pass_all
3556   ;;
3557
3558 osf3* | osf4* | osf5*)
3559   # this will be overridden with pass_all, but let us keep it just in case
3560   lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
3561   lt_cv_file_magic_test_file=/shlib/libc.so
3562   lt_cv_deplibs_check_method=pass_all
3563   ;;
3564
3565 sco3.2v5*)
3566   lt_cv_deplibs_check_method=pass_all
3567   ;;
3568
3569 solaris*)
3570   lt_cv_deplibs_check_method=pass_all
3571   lt_cv_file_magic_test_file=/lib/libc.so
3572   ;;
3573
3574 sysv5uw[78]* | sysv4*uw2*)
3575   lt_cv_deplibs_check_method=pass_all
3576   ;;
3577
3578 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
3579   case $host_vendor in
3580   motorola)
3581     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]'
3582     lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
3583     ;;
3584   ncr)
3585     lt_cv_deplibs_check_method=pass_all
3586     ;;
3587   sequent)
3588     lt_cv_file_magic_cmd='/bin/file'
3589     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'
3590     ;;
3591   sni)
3592     lt_cv_file_magic_cmd='/bin/file'
3593     lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib"
3594     lt_cv_file_magic_test_file=/lib/libc.so
3595     ;;
3596   siemens)
3597     lt_cv_deplibs_check_method=pass_all
3598     ;;
3599   esac
3600   ;;
3601 esac
3602
3603 fi
3604
3605 echo "$ac_t""$lt_cv_deplibs_check_method" 1>&6
3606 file_magic_cmd=$lt_cv_file_magic_cmd
3607 deplibs_check_method=$lt_cv_deplibs_check_method
3608
3609 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
3610 echo "configure:3611: checking for object suffix" >&5
3611 if eval "test \"\${ac_cv_objext+set}\" = set"; then
3612   echo $ac_n "(cached) $ac_c" 1>&6
3613 else
3614   rm -f conftest*
3615 echo 'int i = 1;' > conftest.$ac_ext
3616 if { (eval echo configure:3617: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3617   for ac_file in conftest.*; do
3618     case $ac_file in
3619     *.c) ;;
3620     *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
3621     esac
3622   done
3623 else
3624   { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
3625 fi
3626 rm -f conftest*
3627 fi
3628
3629 echo "$ac_t""$ac_cv_objext" 1>&6
3630 OBJEXT=$ac_cv_objext
3631 ac_objext=$ac_cv_objext
3632
3633
3634
3635
3636 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
3637 echo "configure:3638: checking for executable suffix" >&5
3638 if eval "test \"\${ac_cv_exeext+set}\" = set"; then
3639   echo $ac_n "(cached) $ac_c" 1>&6
3640 else
3641   if test "$CYGWIN" = yes || test "$MINGW32" = yes || test "$EMXOS2" = yes; then
3642   ac_cv_exeext=.exe
3643 else
3644   rm -f conftest*
3645   echo 'int main () { return 0; }' > conftest.$ac_ext
3646   ac_cv_exeext=
3647   if { (eval echo configure:3648: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
3648     for file in conftest.*; do
3649       case $file in
3650       *.c | *.C | *.o | *.obj | *.xcoff) ;;
3651       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
3652       esac
3653     done
3654   else
3655     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
3656   fi
3657   rm -f conftest*
3658   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
3659 fi
3660 fi
3661
3662 EXEEXT=""
3663 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
3664 echo "$ac_t""${ac_cv_exeext}" 1>&6
3665 ac_exeext=$EXEEXT
3666
3667 if test $host != $build; then
3668   ac_tool_prefix=${host_alias}-
3669 else
3670   ac_tool_prefix=
3671 fi
3672
3673
3674
3675
3676 # Check for command to grab the raw symbol name followed by C symbol from nm.
3677 echo $ac_n "checking command to parse $NM output""... $ac_c" 1>&6
3678 echo "configure:3679: checking command to parse $NM output" >&5
3679 if eval "test \"\${lt_cv_sys_global_symbol_pipe+set}\" = set"; then
3680   echo $ac_n "(cached) $ac_c" 1>&6
3681 else
3682   
3683 # These are sane defaults that work on at least a few old systems.
3684 # [They come from Ultrix.  What could be older than Ultrix?!! ;)]
3685
3686 # Character class describing NM global symbol codes.
3687 symcode='[BCDEGRST]'
3688
3689 # Regexp to match symbols that can be accessed directly from C.
3690 sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
3691
3692 # Transform the above into a raw symbol and a C symbol.
3693 symxfrm='\1 \2\3 \3'
3694
3695 # Transform an extracted symbol line into a proper C declaration
3696 lt_cv_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern char \1;/p'"
3697
3698 # Transform an extracted symbol line into symbol name and symbol address
3699 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'"
3700
3701 # Define system-specific variables.
3702 case $host_os in
3703 aix*)
3704   symcode='[BCDT]'
3705   ;;
3706 cygwin* | mingw* | pw32*)
3707   symcode='[ABCDGISTW]'
3708   ;;
3709 hpux*) # Its linker distinguishes data from code symbols
3710   lt_cv_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern char \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
3711   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'"
3712   ;;
3713 irix* | nonstopux*)
3714   symcode='[BCDEGRST]'
3715   ;;
3716 osf*)
3717   symcode='[BCDEGQRST]'
3718   ;;
3719 solaris* | sysv5*)
3720   symcode='[BDT]'
3721   ;;
3722 sysv4)
3723   symcode='[DFNSTU]'
3724   ;;
3725 esac
3726
3727 # Handle CRLF in mingw tool chain
3728 opt_cr=
3729 case $host_os in
3730 mingw*)
3731   opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
3732   ;;
3733 esac
3734
3735 # If we're using GNU nm, then use its standard symbol codes.
3736 if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then
3737   symcode='[ABCDGISTW]'
3738 fi
3739
3740 # Try without a prefix undercore, then with it.
3741 for ac_symprfx in "" "_"; do
3742
3743   # Write the raw and C identifiers.
3744 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[         ]\($symcode$symcode*\)[         ][      ]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'"
3745
3746   # Check to see that the pipe works correctly.
3747   pipe_works=no
3748   rm -f conftest*
3749   cat > conftest.$ac_ext <<EOF
3750 #ifdef __cplusplus
3751 extern "C" {
3752 #endif
3753 char nm_test_var;
3754 void nm_test_func(){}
3755 #ifdef __cplusplus
3756 }
3757 #endif
3758 int main(){nm_test_var='a';nm_test_func();return(0);}
3759 EOF
3760
3761   if { (eval echo configure:3762: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3762     # Now try to grab the symbols.
3763     nlist=conftest.nm
3764     if { (eval echo configure:3765: \"$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
3765       # Try sorting and uniquifying the output.
3766       if sort "$nlist" | uniq > "$nlist"T; then
3767         mv -f "$nlist"T "$nlist"
3768       else
3769         rm -f "$nlist"T
3770       fi
3771
3772       # Make sure that we snagged all the symbols we need.
3773       if egrep ' nm_test_var$' "$nlist" >/dev/null; then
3774         if egrep ' nm_test_func$' "$nlist" >/dev/null; then
3775           cat <<EOF > conftest.$ac_ext
3776 #ifdef __cplusplus
3777 extern "C" {
3778 #endif
3779
3780 EOF
3781           # Now generate the symbol file.
3782           eval "$lt_cv_global_symbol_to_cdecl"' < "$nlist" >> conftest.$ac_ext'
3783
3784           cat <<EOF >> conftest.$ac_ext
3785 #if defined (__STDC__) && __STDC__
3786 # define lt_ptr void *
3787 #else
3788 # define lt_ptr char *
3789 # define const
3790 #endif
3791
3792 /* The mapping between symbol names and symbols. */
3793 const struct {
3794   const char *name;
3795   lt_ptr address;
3796 }
3797 lt_preloaded_symbols[] =
3798 {
3799 EOF
3800           sed "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (lt_ptr) \&\2},/" < "$nlist" >> conftest.$ac_ext
3801           cat <<\EOF >> conftest.$ac_ext
3802   {0, (lt_ptr) 0}
3803 };
3804
3805 #ifdef __cplusplus
3806 }
3807 #endif
3808 EOF
3809           # Now try linking the two files.
3810           mv conftest.$ac_objext conftstm.$ac_objext
3811           save_LIBS="$LIBS"
3812           save_CFLAGS="$CFLAGS"
3813           LIBS="conftstm.$ac_objext"
3814           CFLAGS="$CFLAGS$no_builtin_flag"
3815           if { (eval echo configure:3816: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest$ac_exeext; then
3816             pipe_works=yes
3817           fi
3818           LIBS="$save_LIBS"
3819           CFLAGS="$save_CFLAGS"
3820         else
3821           echo "cannot find nm_test_func in $nlist" >&5
3822         fi
3823       else
3824         echo "cannot find nm_test_var in $nlist" >&5
3825       fi
3826     else
3827       echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5
3828     fi
3829   else
3830     echo "$progname: failed program was:" >&5
3831     cat conftest.$ac_ext >&5
3832   fi
3833   rm -f conftest* conftst*
3834
3835   # Do not use the global_symbol_pipe unless it works.
3836   if test "$pipe_works" = yes; then
3837     break
3838   else
3839     lt_cv_sys_global_symbol_pipe=
3840   fi
3841 done
3842
3843 fi
3844
3845 global_symbol_pipe="$lt_cv_sys_global_symbol_pipe"
3846 if test -z "$lt_cv_sys_global_symbol_pipe"; then
3847   global_symbol_to_cdecl=
3848   global_symbol_to_c_name_address=
3849 else
3850   global_symbol_to_cdecl="$lt_cv_global_symbol_to_cdecl"
3851   global_symbol_to_c_name_address="$lt_cv_global_symbol_to_c_name_address"
3852 fi
3853 if test -z "$global_symbol_pipe$global_symbol_to_cdec$global_symbol_to_c_name_address";
3854 then
3855   echo "$ac_t""failed" 1>&6
3856 else
3857   echo "$ac_t""ok" 1>&6
3858 fi
3859
3860 for ac_hdr in dlfcn.h
3861 do
3862 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3863 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3864 echo "configure:3865: checking for $ac_hdr" >&5
3865 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
3866   echo $ac_n "(cached) $ac_c" 1>&6
3867 else
3868   cat > conftest.$ac_ext <<EOF
3869 #line 3870 "configure"
3870 #include "confdefs.h"
3871 #include <$ac_hdr>
3872 EOF
3873 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3874 { (eval echo configure:3875: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3875 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3876 if test -z "$ac_err"; then
3877   rm -rf conftest*
3878   eval "ac_cv_header_$ac_safe=yes"
3879 else
3880   echo "$ac_err" >&5
3881   echo "configure: failed program was:" >&5
3882   cat conftest.$ac_ext >&5
3883   rm -rf conftest*
3884   eval "ac_cv_header_$ac_safe=no"
3885 fi
3886 rm -f conftest*
3887 fi
3888 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3889   echo "$ac_t""yes" 1>&6
3890     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3891   cat >> confdefs.h <<EOF
3892 #define $ac_tr_hdr 1
3893 EOF
3894  
3895 else
3896   echo "$ac_t""no" 1>&6
3897 fi
3898 done
3899
3900
3901
3902
3903
3904
3905 # Only perform the check for file, if the check method requires it
3906 case $deplibs_check_method in
3907 file_magic*)
3908   if test "$file_magic_cmd" = '$MAGIC_CMD'; then
3909     echo $ac_n "checking for ${ac_tool_prefix}file""... $ac_c" 1>&6
3910 echo "configure:3911: checking for ${ac_tool_prefix}file" >&5
3911 if eval "test \"\${lt_cv_path_MAGIC_CMD+set}\" = set"; then
3912   echo $ac_n "(cached) $ac_c" 1>&6
3913 else
3914   case $MAGIC_CMD in
3915   /*)
3916   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
3917   ;;
3918   ?:/*)
3919   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
3920   ;;
3921   *)
3922   ac_save_MAGIC_CMD="$MAGIC_CMD"
3923   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3924   ac_dummy="/usr/bin:$PATH"
3925   for ac_dir in $ac_dummy; do
3926     test -z "$ac_dir" && ac_dir=.
3927     if test -f $ac_dir/${ac_tool_prefix}file; then
3928       lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file"
3929       if test -n "$file_magic_test_file"; then
3930         case $deplibs_check_method in
3931         "file_magic "*)
3932           file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
3933           MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
3934           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
3935             egrep "$file_magic_regex" > /dev/null; then
3936             :
3937           else
3938             cat <<EOF 1>&2
3939
3940 *** Warning: the command libtool uses to detect shared libraries,
3941 *** $file_magic_cmd, produces output that libtool cannot recognize.
3942 *** The result is that libtool may fail to recognize shared libraries
3943 *** as such.  This will affect the creation of libtool libraries that
3944 *** depend on shared libraries, but programs linked with such libtool
3945 *** libraries will work regardless of this problem.  Nevertheless, you
3946 *** may want to report the problem to your system manager and/or to
3947 *** bug-libtool@gnu.org
3948
3949 EOF
3950           fi ;;
3951         esac
3952       fi
3953       break
3954     fi
3955   done
3956   IFS="$ac_save_ifs"
3957   MAGIC_CMD="$ac_save_MAGIC_CMD"
3958   ;;
3959 esac
3960 fi
3961
3962 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
3963 if test -n "$MAGIC_CMD"; then
3964   echo "$ac_t""$MAGIC_CMD" 1>&6
3965 else
3966   echo "$ac_t""no" 1>&6
3967 fi
3968
3969 if test -z "$lt_cv_path_MAGIC_CMD"; then
3970   if test -n "$ac_tool_prefix"; then
3971     echo $ac_n "checking for file""... $ac_c" 1>&6
3972 echo "configure:3973: checking for file" >&5
3973 if eval "test \"\${lt_cv_path_MAGIC_CMD+set}\" = set"; then
3974   echo $ac_n "(cached) $ac_c" 1>&6
3975 else
3976   case $MAGIC_CMD in
3977   /*)
3978   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
3979   ;;
3980   ?:/*)
3981   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
3982   ;;
3983   *)
3984   ac_save_MAGIC_CMD="$MAGIC_CMD"
3985   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3986   ac_dummy="/usr/bin:$PATH"
3987   for ac_dir in $ac_dummy; do
3988     test -z "$ac_dir" && ac_dir=.
3989     if test -f $ac_dir/file; then
3990       lt_cv_path_MAGIC_CMD="$ac_dir/file"
3991       if test -n "$file_magic_test_file"; then
3992         case $deplibs_check_method in
3993         "file_magic "*)
3994           file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
3995           MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
3996           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
3997             egrep "$file_magic_regex" > /dev/null; then
3998             :
3999           else
4000             cat <<EOF 1>&2
4001
4002 *** Warning: the command libtool uses to detect shared libraries,
4003 *** $file_magic_cmd, produces output that libtool cannot recognize.
4004 *** The result is that libtool may fail to recognize shared libraries
4005 *** as such.  This will affect the creation of libtool libraries that
4006 *** depend on shared libraries, but programs linked with such libtool
4007 *** libraries will work regardless of this problem.  Nevertheless, you
4008 *** may want to report the problem to your system manager and/or to
4009 *** bug-libtool@gnu.org
4010
4011 EOF
4012           fi ;;
4013         esac
4014       fi
4015       break
4016     fi
4017   done
4018   IFS="$ac_save_ifs"
4019   MAGIC_CMD="$ac_save_MAGIC_CMD"
4020   ;;
4021 esac
4022 fi
4023
4024 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4025 if test -n "$MAGIC_CMD"; then
4026   echo "$ac_t""$MAGIC_CMD" 1>&6
4027 else
4028   echo "$ac_t""no" 1>&6
4029 fi
4030
4031   else
4032     MAGIC_CMD=:
4033   fi
4034 fi
4035
4036   fi
4037   ;;
4038 esac
4039
4040 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4041 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
4042 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4043 echo "configure:4044: checking for $ac_word" >&5
4044 if eval "test \"\${ac_cv_prog_RANLIB+set}\" = set"; then
4045   echo $ac_n "(cached) $ac_c" 1>&6
4046 else
4047   if test -n "$RANLIB"; then
4048   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4049 else
4050   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4051   ac_dummy="$PATH"
4052   for ac_dir in $ac_dummy; do
4053     test -z "$ac_dir" && ac_dir=.
4054     if test -f $ac_dir/$ac_word; then
4055       ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4056       break
4057     fi
4058   done
4059   IFS="$ac_save_ifs"
4060 fi
4061 fi
4062 RANLIB="$ac_cv_prog_RANLIB"
4063 if test -n "$RANLIB"; then
4064   echo "$ac_t""$RANLIB" 1>&6
4065 else
4066   echo "$ac_t""no" 1>&6
4067 fi
4068
4069
4070 if test -z "$ac_cv_prog_RANLIB"; then
4071 if test -n "$ac_tool_prefix"; then
4072   # Extract the first word of "ranlib", so it can be a program name with args.
4073 set dummy ranlib; ac_word=$2
4074 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4075 echo "configure:4076: checking for $ac_word" >&5
4076 if eval "test \"\${ac_cv_prog_RANLIB+set}\" = set"; then
4077   echo $ac_n "(cached) $ac_c" 1>&6
4078 else
4079   if test -n "$RANLIB"; then
4080   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4081 else
4082   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4083   ac_dummy="$PATH"
4084   for ac_dir in $ac_dummy; do
4085     test -z "$ac_dir" && ac_dir=.
4086     if test -f $ac_dir/$ac_word; then
4087       ac_cv_prog_RANLIB="ranlib"
4088       break
4089     fi
4090   done
4091   IFS="$ac_save_ifs"
4092   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
4093 fi
4094 fi
4095 RANLIB="$ac_cv_prog_RANLIB"
4096 if test -n "$RANLIB"; then
4097   echo "$ac_t""$RANLIB" 1>&6
4098 else
4099   echo "$ac_t""no" 1>&6
4100 fi
4101
4102 else
4103   RANLIB=":"
4104 fi
4105 fi
4106
4107 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
4108 set dummy ${ac_tool_prefix}strip; ac_word=$2
4109 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4110 echo "configure:4111: checking for $ac_word" >&5
4111 if eval "test \"\${ac_cv_prog_STRIP+set}\" = set"; then
4112   echo $ac_n "(cached) $ac_c" 1>&6
4113 else
4114   if test -n "$STRIP"; then
4115   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
4116 else
4117   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4118   ac_dummy="$PATH"
4119   for ac_dir in $ac_dummy; do
4120     test -z "$ac_dir" && ac_dir=.
4121     if test -f $ac_dir/$ac_word; then
4122       ac_cv_prog_STRIP="${ac_tool_prefix}strip"
4123       break
4124     fi
4125   done
4126   IFS="$ac_save_ifs"
4127 fi
4128 fi
4129 STRIP="$ac_cv_prog_STRIP"
4130 if test -n "$STRIP"; then
4131   echo "$ac_t""$STRIP" 1>&6
4132 else
4133   echo "$ac_t""no" 1>&6
4134 fi
4135
4136
4137 if test -z "$ac_cv_prog_STRIP"; then
4138 if test -n "$ac_tool_prefix"; then
4139   # Extract the first word of "strip", so it can be a program name with args.
4140 set dummy strip; ac_word=$2
4141 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4142 echo "configure:4143: checking for $ac_word" >&5
4143 if eval "test \"\${ac_cv_prog_STRIP+set}\" = set"; then
4144   echo $ac_n "(cached) $ac_c" 1>&6
4145 else
4146   if test -n "$STRIP"; then
4147   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
4148 else
4149   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4150   ac_dummy="$PATH"
4151   for ac_dir in $ac_dummy; do
4152     test -z "$ac_dir" && ac_dir=.
4153     if test -f $ac_dir/$ac_word; then
4154       ac_cv_prog_STRIP="strip"
4155       break
4156     fi
4157   done
4158   IFS="$ac_save_ifs"
4159   test -z "$ac_cv_prog_STRIP" && ac_cv_prog_STRIP=":"
4160 fi
4161 fi
4162 STRIP="$ac_cv_prog_STRIP"
4163 if test -n "$STRIP"; then
4164   echo "$ac_t""$STRIP" 1>&6
4165 else
4166   echo "$ac_t""no" 1>&6
4167 fi
4168
4169 else
4170   STRIP=":"
4171 fi
4172 fi
4173
4174
4175 enable_dlopen=yes
4176 enable_win32_dll=yes
4177
4178 # Check whether --enable-libtool-lock or --disable-libtool-lock was given.
4179 if test "${enable_libtool_lock+set}" = set; then
4180   enableval="$enable_libtool_lock"
4181   :
4182 fi
4183
4184 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
4185
4186 # Some flags need to be propagated to the compiler or linker for good
4187 # libtool support.
4188 case $host in
4189 *-*-irix6*)
4190   # Find out which ABI we are using.
4191   echo '#line 4192 "configure"' > conftest.$ac_ext
4192   if { (eval echo configure:4193: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4193     case `/usr/bin/file conftest.$ac_objext` in
4194     *32-bit*)
4195       LD="${LD-ld} -32"
4196       ;;
4197     *N32*)
4198       LD="${LD-ld} -n32"
4199       ;;
4200     *64-bit*)
4201       LD="${LD-ld} -64"
4202       ;;
4203     esac
4204   fi
4205   rm -rf conftest*
4206   ;;
4207
4208 *-*-sco3.2v5*)
4209   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
4210   SAVE_CFLAGS="$CFLAGS"
4211   CFLAGS="$CFLAGS -belf"
4212   echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
4213 echo "configure:4214: checking whether the C compiler needs -belf" >&5
4214 if eval "test \"\${lt_cv_cc_needs_belf+set}\" = set"; then
4215   echo $ac_n "(cached) $ac_c" 1>&6
4216 else
4217   
4218      ac_ext=c
4219 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
4220 ac_cpp='$CPP $CPPFLAGS'
4221 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
4222 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
4223 cross_compiling=$ac_cv_prog_cc_cross
4224
4225      cat > conftest.$ac_ext <<EOF
4226 #line 4227 "configure"
4227 #include "confdefs.h"
4228
4229 int main() {
4230
4231 ; return 0; }
4232 EOF
4233 if { (eval echo configure:4234: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4234   rm -rf conftest*
4235   lt_cv_cc_needs_belf=yes
4236 else
4237   echo "configure: failed program was:" >&5
4238   cat conftest.$ac_ext >&5
4239   rm -rf conftest*
4240   lt_cv_cc_needs_belf=no
4241 fi
4242 rm -f conftest*
4243      ac_ext=c
4244 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
4245 ac_cpp='$CPP $CPPFLAGS'
4246 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
4247 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
4248 cross_compiling=$ac_cv_prog_cc_cross
4249
4250 fi
4251
4252 echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6
4253   if test x"$lt_cv_cc_needs_belf" != x"yes"; then
4254     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
4255     CFLAGS="$SAVE_CFLAGS"
4256   fi
4257   ;;
4258
4259 *-*-cygwin* | *-*-mingw* | *-*-pw32*)
4260   # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
4261 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
4262 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4263 echo "configure:4264: checking for $ac_word" >&5
4264 if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then
4265   echo $ac_n "(cached) $ac_c" 1>&6
4266 else
4267   if test -n "$DLLTOOL"; then
4268   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
4269 else
4270   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4271   ac_dummy="$PATH"
4272   for ac_dir in $ac_dummy; do
4273     test -z "$ac_dir" && ac_dir=.
4274     if test -f $ac_dir/$ac_word; then
4275       ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
4276       break
4277     fi
4278   done
4279   IFS="$ac_save_ifs"
4280 fi
4281 fi
4282 DLLTOOL="$ac_cv_prog_DLLTOOL"
4283 if test -n "$DLLTOOL"; then
4284   echo "$ac_t""$DLLTOOL" 1>&6
4285 else
4286   echo "$ac_t""no" 1>&6
4287 fi
4288
4289
4290 if test -z "$ac_cv_prog_DLLTOOL"; then
4291 if test -n "$ac_tool_prefix"; then
4292   # Extract the first word of "dlltool", so it can be a program name with args.
4293 set dummy dlltool; ac_word=$2
4294 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4295 echo "configure:4296: checking for $ac_word" >&5
4296 if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then
4297   echo $ac_n "(cached) $ac_c" 1>&6
4298 else
4299   if test -n "$DLLTOOL"; then
4300   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
4301 else
4302   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4303   ac_dummy="$PATH"
4304   for ac_dir in $ac_dummy; do
4305     test -z "$ac_dir" && ac_dir=.
4306     if test -f $ac_dir/$ac_word; then
4307       ac_cv_prog_DLLTOOL="dlltool"
4308       break
4309     fi
4310   done
4311   IFS="$ac_save_ifs"
4312   test -z "$ac_cv_prog_DLLTOOL" && ac_cv_prog_DLLTOOL="false"
4313 fi
4314 fi
4315 DLLTOOL="$ac_cv_prog_DLLTOOL"
4316 if test -n "$DLLTOOL"; then
4317   echo "$ac_t""$DLLTOOL" 1>&6
4318 else
4319   echo "$ac_t""no" 1>&6
4320 fi
4321
4322 else
4323   DLLTOOL="false"
4324 fi
4325 fi
4326
4327   # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
4328 set dummy ${ac_tool_prefix}as; ac_word=$2
4329 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4330 echo "configure:4331: checking for $ac_word" >&5
4331 if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then
4332   echo $ac_n "(cached) $ac_c" 1>&6
4333 else
4334   if test -n "$AS"; then
4335   ac_cv_prog_AS="$AS" # Let the user override the test.
4336 else
4337   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4338   ac_dummy="$PATH"
4339   for ac_dir in $ac_dummy; do
4340     test -z "$ac_dir" && ac_dir=.
4341     if test -f $ac_dir/$ac_word; then
4342       ac_cv_prog_AS="${ac_tool_prefix}as"
4343       break
4344     fi
4345   done
4346   IFS="$ac_save_ifs"
4347 fi
4348 fi
4349 AS="$ac_cv_prog_AS"
4350 if test -n "$AS"; then
4351   echo "$ac_t""$AS" 1>&6
4352 else
4353   echo "$ac_t""no" 1>&6
4354 fi
4355
4356
4357 if test -z "$ac_cv_prog_AS"; then
4358 if test -n "$ac_tool_prefix"; then
4359   # Extract the first word of "as", so it can be a program name with args.
4360 set dummy as; ac_word=$2
4361 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4362 echo "configure:4363: checking for $ac_word" >&5
4363 if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then
4364   echo $ac_n "(cached) $ac_c" 1>&6
4365 else
4366   if test -n "$AS"; then
4367   ac_cv_prog_AS="$AS" # Let the user override the test.
4368 else
4369   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4370   ac_dummy="$PATH"
4371   for ac_dir in $ac_dummy; do
4372     test -z "$ac_dir" && ac_dir=.
4373     if test -f $ac_dir/$ac_word; then
4374       ac_cv_prog_AS="as"
4375       break
4376     fi
4377   done
4378   IFS="$ac_save_ifs"
4379   test -z "$ac_cv_prog_AS" && ac_cv_prog_AS="false"
4380 fi
4381 fi
4382 AS="$ac_cv_prog_AS"
4383 if test -n "$AS"; then
4384   echo "$ac_t""$AS" 1>&6
4385 else
4386   echo "$ac_t""no" 1>&6
4387 fi
4388
4389 else
4390   AS="false"
4391 fi
4392 fi
4393
4394   # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
4395 set dummy ${ac_tool_prefix}objdump; ac_word=$2
4396 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4397 echo "configure:4398: checking for $ac_word" >&5
4398 if eval "test \"\${ac_cv_prog_OBJDUMP+set}\" = set"; then
4399   echo $ac_n "(cached) $ac_c" 1>&6
4400 else
4401   if test -n "$OBJDUMP"; then
4402   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
4403 else
4404   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4405   ac_dummy="$PATH"
4406   for ac_dir in $ac_dummy; do
4407     test -z "$ac_dir" && ac_dir=.
4408     if test -f $ac_dir/$ac_word; then
4409       ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
4410       break
4411     fi
4412   done
4413   IFS="$ac_save_ifs"
4414 fi
4415 fi
4416 OBJDUMP="$ac_cv_prog_OBJDUMP"
4417 if test -n "$OBJDUMP"; then
4418   echo "$ac_t""$OBJDUMP" 1>&6
4419 else
4420   echo "$ac_t""no" 1>&6
4421 fi
4422
4423
4424 if test -z "$ac_cv_prog_OBJDUMP"; then
4425 if test -n "$ac_tool_prefix"; then
4426   # Extract the first word of "objdump", so it can be a program name with args.
4427 set dummy objdump; ac_word=$2
4428 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4429 echo "configure:4430: checking for $ac_word" >&5
4430 if eval "test \"\${ac_cv_prog_OBJDUMP+set}\" = set"; then
4431   echo $ac_n "(cached) $ac_c" 1>&6
4432 else
4433   if test -n "$OBJDUMP"; then
4434   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
4435 else
4436   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4437   ac_dummy="$PATH"
4438   for ac_dir in $ac_dummy; do
4439     test -z "$ac_dir" && ac_dir=.
4440     if test -f $ac_dir/$ac_word; then
4441       ac_cv_prog_OBJDUMP="objdump"
4442       break
4443     fi
4444   done
4445   IFS="$ac_save_ifs"
4446   test -z "$ac_cv_prog_OBJDUMP" && ac_cv_prog_OBJDUMP="false"
4447 fi
4448 fi
4449 OBJDUMP="$ac_cv_prog_OBJDUMP"
4450 if test -n "$OBJDUMP"; then
4451   echo "$ac_t""$OBJDUMP" 1>&6
4452 else
4453   echo "$ac_t""no" 1>&6
4454 fi
4455
4456 else
4457   OBJDUMP="false"
4458 fi
4459 fi
4460
4461
4462   # recent cygwin and mingw systems supply a stub DllMain which the user
4463   # can override, but on older systems we have to supply one
4464   echo $ac_n "checking if libtool should supply DllMain function""... $ac_c" 1>&6
4465 echo "configure:4466: checking if libtool should supply DllMain function" >&5
4466 if eval "test \"\${lt_cv_need_dllmain+set}\" = set"; then
4467   echo $ac_n "(cached) $ac_c" 1>&6
4468 else
4469   cat > conftest.$ac_ext <<EOF
4470 #line 4471 "configure"
4471 #include "confdefs.h"
4472
4473 int main() {
4474 extern int __attribute__((__stdcall__)) DllMain(void*, int, void*);
4475       DllMain (0, 0, 0);
4476 ; return 0; }
4477 EOF
4478 if { (eval echo configure:4479: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4479   rm -rf conftest*
4480   lt_cv_need_dllmain=no
4481 else
4482   echo "configure: failed program was:" >&5
4483   cat conftest.$ac_ext >&5
4484   rm -rf conftest*
4485   lt_cv_need_dllmain=yes
4486 fi
4487 rm -f conftest*
4488 fi
4489
4490 echo "$ac_t""$lt_cv_need_dllmain" 1>&6
4491
4492   case $host/$CC in
4493   *-*-cygwin*/gcc*-mno-cygwin*|*-*-mingw*)
4494     # old mingw systems require "-dll" to link a DLL, while more recent ones
4495     # require "-mdll"
4496     SAVE_CFLAGS="$CFLAGS"
4497     CFLAGS="$CFLAGS -mdll"
4498     echo $ac_n "checking how to link DLLs""... $ac_c" 1>&6
4499 echo "configure:4500: checking how to link DLLs" >&5
4500 if eval "test \"\${lt_cv_cc_dll_switch+set}\" = set"; then
4501   echo $ac_n "(cached) $ac_c" 1>&6
4502 else
4503   cat > conftest.$ac_ext <<EOF
4504 #line 4505 "configure"
4505 #include "confdefs.h"
4506
4507 int main() {
4508
4509 ; return 0; }
4510 EOF
4511 if { (eval echo configure:4512: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4512   rm -rf conftest*
4513   lt_cv_cc_dll_switch=-mdll
4514 else
4515   echo "configure: failed program was:" >&5
4516   cat conftest.$ac_ext >&5
4517   rm -rf conftest*
4518   lt_cv_cc_dll_switch=-dll
4519 fi
4520 rm -f conftest*
4521 fi
4522
4523 echo "$ac_t""$lt_cv_cc_dll_switch" 1>&6
4524     CFLAGS="$SAVE_CFLAGS" ;;
4525   *-*-cygwin* | *-*-pw32*)
4526     # cygwin systems need to pass --dll to the linker, and not link
4527     # crt.o which will require a WinMain@16 definition.
4528     lt_cv_cc_dll_switch="-Wl,--dll -nostartfiles" ;;
4529   esac
4530   ;;
4531   
4532 esac
4533
4534 # Sed substitution that helps us do robust quoting.  It backslashifies
4535 # metacharacters that are still active within double-quoted strings.
4536 Xsed='sed -e s/^X//'
4537 sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g'
4538
4539 # Same as above, but do not quote variable references.
4540 double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g'
4541
4542 # Sed substitution to delay expansion of an escaped shell variable in a
4543 # double_quote_subst'ed string.
4544 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
4545
4546 # Constants:
4547 rm="rm -f"
4548
4549 # Global variables:
4550 default_ofile=libtool
4551 can_build_shared=yes
4552
4553 # All known linkers require a `.a' archive for static linking (except M$VC,
4554 # which needs '.lib').
4555 libext=a
4556 ltmain="$ac_aux_dir/ltmain.sh"
4557 ofile="$default_ofile"
4558 with_gnu_ld="$lt_cv_prog_gnu_ld"
4559 need_locks="$enable_libtool_lock"
4560
4561 old_CC="$CC"
4562 old_CFLAGS="$CFLAGS"
4563
4564 # Set sane defaults for various variables
4565 test -z "$AR" && AR=ar
4566 test -z "$AR_FLAGS" && AR_FLAGS=cru
4567 test -z "$AS" && AS=as
4568 test -z "$CC" && CC=cc
4569 test -z "$DLLTOOL" && DLLTOOL=dlltool
4570 test -z "$LD" && LD=ld
4571 test -z "$LN_S" && LN_S="ln -s"
4572 test -z "$MAGIC_CMD" && MAGIC_CMD=file
4573 test -z "$NM" && NM=nm
4574 test -z "$OBJDUMP" && OBJDUMP=objdump
4575 test -z "$RANLIB" && RANLIB=:
4576 test -z "$STRIP" && STRIP=:
4577 test -z "$ac_objext" && ac_objext=o
4578
4579 if test x"$host" != x"$build"; then
4580   ac_tool_prefix=${host_alias}-
4581 else
4582   ac_tool_prefix=
4583 fi
4584
4585 # Transform linux* to *-*-linux-gnu*, to support old configure scripts.
4586 case $host_os in
4587 linux-gnu*) ;;
4588 linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
4589 esac
4590
4591 case $host_os in
4592 aix3*)
4593   # AIX sometimes has problems with the GCC collect2 program.  For some
4594   # reason, if we set the COLLECT_NAMES environment variable, the problems
4595   # vanish in a puff of smoke.
4596   if test "X${COLLECT_NAMES+set}" != Xset; then
4597     COLLECT_NAMES=
4598     export COLLECT_NAMES
4599   fi
4600   ;;
4601 esac
4602
4603 # Determine commands to create old-style static archives.
4604 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
4605 old_postinstall_cmds='chmod 644 $oldlib'
4606 old_postuninstall_cmds=
4607
4608 if test -n "$RANLIB"; then
4609   case $host_os in
4610   openbsd*)
4611     old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds"
4612     ;;
4613   *)
4614     old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
4615     ;;
4616   esac
4617   old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
4618 fi
4619
4620 # Allow CC to be a program name with arguments.
4621 set dummy $CC
4622 compiler="$2"
4623
4624 echo $ac_n "checking for objdir""... $ac_c" 1>&6
4625 echo "configure:4626: checking for objdir" >&5
4626 rm -f .libs 2>/dev/null
4627 mkdir .libs 2>/dev/null
4628 if test -d .libs; then
4629   objdir=.libs
4630 else
4631   # MS-DOS does not allow filenames that begin with a dot.
4632   objdir=_libs
4633 fi
4634 rmdir .libs 2>/dev/null
4635 echo "$ac_t""$objdir" 1>&6
4636
4637
4638 # Check whether --with-pic or --without-pic was given.
4639 if test "${with_pic+set}" = set; then
4640   withval="$with_pic"
4641   pic_mode="$withval"
4642 else
4643   pic_mode=default
4644 fi
4645
4646 test -z "$pic_mode" && pic_mode=default
4647
4648 # We assume here that the value for lt_cv_prog_cc_pic will not be cached
4649 # in isolation, and that seeing it set (from the cache) indicates that
4650 # the associated values are set (in the cache) correctly too.
4651 echo $ac_n "checking for $compiler option to produce PIC""... $ac_c" 1>&6
4652 echo "configure:4653: checking for $compiler option to produce PIC" >&5
4653 if eval "test \"\${lt_cv_prog_cc_pic+set}\" = set"; then
4654   echo $ac_n "(cached) $ac_c" 1>&6
4655 else
4656    lt_cv_prog_cc_pic=
4657   lt_cv_prog_cc_shlib=
4658   lt_cv_prog_cc_wl=
4659   lt_cv_prog_cc_static=
4660   lt_cv_prog_cc_no_builtin=
4661   lt_cv_prog_cc_can_build_shared=$can_build_shared
4662
4663   if test "$GCC" = yes; then
4664     lt_cv_prog_cc_wl='-Wl,'
4665     lt_cv_prog_cc_static='-static'
4666
4667     case $host_os in
4668     aix*)
4669       # Below there is a dirty hack to force normal static linking with -ldl
4670       # The problem is because libdl dynamically linked with both libc and
4671       # libC (AIX C++ library), which obviously doesn't included in libraries
4672       # list by gcc. This cause undefined symbols with -static flags.
4673       # This hack allows C programs to be linked with "-static -ldl", but
4674       # not sure about C++ programs.
4675       lt_cv_prog_cc_static="$lt_cv_prog_cc_static ${lt_cv_prog_cc_wl}-lC"
4676       ;;
4677     amigaos*)
4678       # FIXME: we need at least 68020 code to build shared libraries, but
4679       # adding the `-m68020' flag to GCC prevents building anything better,
4680       # like `-m68040'.
4681       lt_cv_prog_cc_pic='-m68020 -resident32 -malways-restore-a4'
4682       ;;
4683     beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
4684       # PIC is the default for these OSes.
4685       ;;
4686     darwin* | rhapsody*)
4687       # PIC is the default on this platform
4688       # Common symbols not allowed in MH_DYLIB files
4689       lt_cv_prog_cc_pic='-fno-common'
4690       ;;
4691     cygwin* | mingw* | pw32* | os2*)
4692       # This hack is so that the source file can tell whether it is being
4693       # built for inclusion in a dll (and should export symbols for example).
4694       lt_cv_prog_cc_pic='-DDLL_EXPORT'
4695       ;;
4696     sysv4*MP*)
4697       if test -d /usr/nec; then
4698          lt_cv_prog_cc_pic=-Kconform_pic
4699       fi
4700       ;;
4701     *)
4702       lt_cv_prog_cc_pic='-fPIC'
4703       ;;
4704     esac
4705   else
4706     # PORTME Check for PIC flags for the system compiler.
4707     case $host_os in
4708     aix3* | aix4* | aix5*)
4709       lt_cv_prog_cc_wl='-Wl,'
4710       # All AIX code is PIC.
4711       if test "$host_cpu" = ia64; then
4712         # AIX 5 now supports IA64 processor
4713         lt_cv_prog_cc_static='-Bstatic'
4714       else
4715         lt_cv_prog_cc_static='-bnso -bI:/lib/syscalls.exp'
4716       fi
4717       ;;
4718
4719     hpux9* | hpux10* | hpux11*)
4720       # Is there a better lt_cv_prog_cc_static that works with the bundled CC?
4721       lt_cv_prog_cc_wl='-Wl,'
4722       lt_cv_prog_cc_static="${lt_cv_prog_cc_wl}-a ${lt_cv_prog_cc_wl}archive"
4723       lt_cv_prog_cc_pic='+Z'
4724       ;;
4725
4726     irix5* | irix6* | nonstopux*)
4727       lt_cv_prog_cc_wl='-Wl,'
4728       lt_cv_prog_cc_static='-non_shared'
4729       # PIC (with -KPIC) is the default.
4730       ;;
4731
4732     cygwin* | mingw* | pw32* | os2*)
4733       # This hack is so that the source file can tell whether it is being
4734       # built for inclusion in a dll (and should export symbols for example).
4735       lt_cv_prog_cc_pic='-DDLL_EXPORT'
4736       ;;
4737
4738     newsos6)
4739       lt_cv_prog_cc_pic='-KPIC'
4740       lt_cv_prog_cc_static='-Bstatic'
4741       ;;
4742     
4743     openedition)
4744       # XPLINK code is PIC by default
4745       ;;
4746
4747     osf3* | osf4* | osf5*)
4748       # All OSF/1 code is PIC.
4749       lt_cv_prog_cc_wl='-Wl,'
4750       lt_cv_prog_cc_static='-non_shared'
4751       ;;
4752
4753     sco3.2v5*)
4754       lt_cv_prog_cc_pic='-Kpic'
4755       lt_cv_prog_cc_static='-dn'
4756       lt_cv_prog_cc_shlib='-belf'
4757       ;;
4758
4759     solaris*)
4760       lt_cv_prog_cc_pic='-KPIC'
4761       lt_cv_prog_cc_static='-Bstatic'
4762       lt_cv_prog_cc_wl='-Wl,'
4763       ;;
4764
4765     sunos4*)
4766       lt_cv_prog_cc_pic='-PIC'
4767       lt_cv_prog_cc_static='-Bstatic'
4768       lt_cv_prog_cc_wl='-Qoption ld '
4769       ;;
4770
4771     sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
4772       lt_cv_prog_cc_pic='-KPIC'
4773       lt_cv_prog_cc_static='-Bstatic'
4774       lt_cv_prog_cc_wl='-Wl,'
4775       ;;
4776
4777     uts4*)
4778       lt_cv_prog_cc_pic='-pic'
4779       lt_cv_prog_cc_static='-Bstatic'
4780       ;;
4781
4782     sysv4*MP*)
4783       if test -d /usr/nec ;then
4784         lt_cv_prog_cc_pic='-Kconform_pic'
4785         lt_cv_prog_cc_static='-Bstatic'
4786       fi
4787       ;;
4788
4789     *)
4790       lt_cv_prog_cc_can_build_shared=no
4791       ;;
4792     esac
4793   fi
4794
4795 fi
4796
4797 if test -z "$lt_cv_prog_cc_pic"; then
4798   echo "$ac_t""none" 1>&6
4799 else
4800   echo "$ac_t""$lt_cv_prog_cc_pic" 1>&6
4801
4802   # Check to make sure the pic_flag actually works.
4803   echo $ac_n "checking if $compiler PIC flag $lt_cv_prog_cc_pic works""... $ac_c" 1>&6
4804 echo "configure:4805: checking if $compiler PIC flag $lt_cv_prog_cc_pic works" >&5
4805   if eval "test \"\${lt_cv_prog_cc_pic_works+set}\" = set"; then
4806   echo $ac_n "(cached) $ac_c" 1>&6
4807 else
4808       save_CFLAGS="$CFLAGS"
4809     CFLAGS="$CFLAGS $lt_cv_prog_cc_pic -DPIC"
4810     cat > conftest.$ac_ext <<EOF
4811 #line 4812 "configure"
4812 #include "confdefs.h"
4813
4814 int main() {
4815
4816 ; return 0; }
4817 EOF
4818 if { (eval echo configure:4819: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4819   rm -rf conftest*
4820         case $host_os in
4821       hpux9* | hpux10* | hpux11*)
4822         # On HP-UX, both CC and GCC only warn that PIC is supported... then
4823         # they create non-PIC objects.  So, if there were any warnings, we
4824         # assume that PIC is not supported.
4825         if test -s conftest.err; then
4826           lt_cv_prog_cc_pic_works=no
4827         else
4828           lt_cv_prog_cc_pic_works=yes
4829         fi
4830         ;;
4831       *)
4832         lt_cv_prog_cc_pic_works=yes
4833         ;;
4834       esac
4835     
4836 else
4837   echo "configure: failed program was:" >&5
4838   cat conftest.$ac_ext >&5
4839   rm -rf conftest*
4840         lt_cv_prog_cc_pic_works=no
4841     
4842 fi
4843 rm -f conftest*
4844     CFLAGS="$save_CFLAGS"
4845   
4846 fi
4847
4848
4849   if test "X$lt_cv_prog_cc_pic_works" = Xno; then
4850     lt_cv_prog_cc_pic=
4851     lt_cv_prog_cc_can_build_shared=no
4852   else
4853     lt_cv_prog_cc_pic=" $lt_cv_prog_cc_pic"
4854   fi
4855
4856   echo "$ac_t""$lt_cv_prog_cc_pic_works" 1>&6
4857 fi
4858
4859 # Check for any special shared library compilation flags.
4860 if test -n "$lt_cv_prog_cc_shlib"; then
4861   echo "configure: warning: \`$CC' requires \`$lt_cv_prog_cc_shlib' to build shared libraries" 1>&2
4862   if echo "$old_CC $old_CFLAGS " | egrep -e "[  ]$lt_cv_prog_cc_shlib[  ]" >/dev/null; then :
4863   else
4864    echo "configure: warning: add \`$lt_cv_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure" 1>&2
4865     lt_cv_prog_cc_can_build_shared=no
4866   fi
4867 fi
4868
4869 echo $ac_n "checking if $compiler static flag $lt_cv_prog_cc_static works""... $ac_c" 1>&6
4870 echo "configure:4871: checking if $compiler static flag $lt_cv_prog_cc_static works" >&5
4871 if eval "test \"\${lt_cv_prog_cc_static_works+set}\" = set"; then
4872   echo $ac_n "(cached) $ac_c" 1>&6
4873 else
4874     lt_cv_prog_cc_static_works=no
4875   save_LDFLAGS="$LDFLAGS"
4876   LDFLAGS="$LDFLAGS $lt_cv_prog_cc_static"
4877   cat > conftest.$ac_ext <<EOF
4878 #line 4879 "configure"
4879 #include "confdefs.h"
4880
4881 int main() {
4882
4883 ; return 0; }
4884 EOF
4885 if { (eval echo configure:4886: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4886   rm -rf conftest*
4887   lt_cv_prog_cc_static_works=yes
4888 else
4889   echo "configure: failed program was:" >&5
4890   cat conftest.$ac_ext >&5
4891 fi
4892 rm -f conftest*
4893   LDFLAGS="$save_LDFLAGS"
4894
4895 fi
4896
4897
4898 # Belt *and* braces to stop my trousers falling down:
4899 test "X$lt_cv_prog_cc_static_works" = Xno && lt_cv_prog_cc_static=
4900 echo "$ac_t""$lt_cv_prog_cc_static_works" 1>&6
4901
4902 pic_flag="$lt_cv_prog_cc_pic"
4903 special_shlib_compile_flags="$lt_cv_prog_cc_shlib"
4904 wl="$lt_cv_prog_cc_wl"
4905 link_static_flag="$lt_cv_prog_cc_static"
4906 no_builtin_flag="$lt_cv_prog_cc_no_builtin"
4907 can_build_shared="$lt_cv_prog_cc_can_build_shared"
4908
4909
4910 # Check to see if options -o and -c are simultaneously supported by compiler
4911 echo $ac_n "checking if $compiler supports -c -o file.$ac_objext""... $ac_c" 1>&6
4912 echo "configure:4913: checking if $compiler supports -c -o file.$ac_objext" >&5
4913 if eval "test \"\${lt_cv_compiler_c_o+set}\" = set"; then
4914   echo $ac_n "(cached) $ac_c" 1>&6
4915 else
4916   
4917 $rm -r conftest 2>/dev/null
4918 mkdir conftest
4919 cd conftest
4920 echo "int some_variable = 0;" > conftest.$ac_ext
4921 mkdir out
4922 # According to Tom Tromey, Ian Lance Taylor reported there are C compilers
4923 # that will create temporary files in the current directory regardless of
4924 # the output directory.  Thus, making CWD read-only will cause this test
4925 # to fail, enabling locking or at least warning the user not to do parallel
4926 # builds.
4927 chmod -w .
4928 save_CFLAGS="$CFLAGS"
4929 CFLAGS="$CFLAGS -o out/conftest2.$ac_objext"
4930 compiler_c_o=no
4931 if { (eval echo configure:4932: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then
4932   # The compiler can only warn and ignore the option if not recognized
4933   # So say no if there are warnings
4934   if test -s out/conftest.err; then
4935     lt_cv_compiler_c_o=no
4936   else
4937     lt_cv_compiler_c_o=yes
4938   fi
4939 else
4940   # Append any errors to the config.log.
4941   cat out/conftest.err 1>&5
4942   lt_cv_compiler_c_o=no
4943 fi
4944 CFLAGS="$save_CFLAGS"
4945 chmod u+w .
4946 $rm conftest* out/*
4947 rmdir out
4948 cd ..
4949 rmdir conftest
4950 $rm -r conftest 2>/dev/null
4951
4952 fi
4953
4954 compiler_c_o=$lt_cv_compiler_c_o
4955 echo "$ac_t""$compiler_c_o" 1>&6
4956
4957 if test x"$compiler_c_o" = x"yes"; then
4958   # Check to see if we can write to a .lo
4959   echo $ac_n "checking if $compiler supports -c -o file.lo""... $ac_c" 1>&6
4960 echo "configure:4961: checking if $compiler supports -c -o file.lo" >&5
4961   if eval "test \"\${lt_cv_compiler_o_lo+set}\" = set"; then
4962   echo $ac_n "(cached) $ac_c" 1>&6
4963 else
4964   
4965   lt_cv_compiler_o_lo=no
4966   save_CFLAGS="$CFLAGS"
4967   CFLAGS="$CFLAGS -c -o conftest.lo"
4968   save_objext="$ac_objext"
4969   ac_objext=lo
4970   cat > conftest.$ac_ext <<EOF
4971 #line 4972 "configure"
4972 #include "confdefs.h"
4973
4974 int main() {
4975 int some_variable = 0;
4976 ; return 0; }
4977 EOF
4978 if { (eval echo configure:4979: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4979   rm -rf conftest*
4980       # The compiler can only warn and ignore the option if not recognized
4981     # So say no if there are warnings
4982     if test -s conftest.err; then
4983       lt_cv_compiler_o_lo=no
4984     else
4985       lt_cv_compiler_o_lo=yes
4986     fi
4987   
4988 else
4989   echo "configure: failed program was:" >&5
4990   cat conftest.$ac_ext >&5
4991 fi
4992 rm -f conftest*
4993   ac_objext="$save_objext"
4994   CFLAGS="$save_CFLAGS"
4995   
4996 fi
4997
4998   compiler_o_lo=$lt_cv_compiler_o_lo
4999   echo "$ac_t""$compiler_o_lo" 1>&6
5000 else
5001   compiler_o_lo=no
5002 fi
5003
5004 # Check to see if we can do hard links to lock some files if needed
5005 hard_links="nottested"
5006 if test "$compiler_c_o" = no && test "$need_locks" != no; then
5007   # do not overwrite the value of need_locks provided by the user
5008   echo $ac_n "checking if we can lock with hard links""... $ac_c" 1>&6
5009 echo "configure:5010: checking if we can lock with hard links" >&5
5010   hard_links=yes
5011   $rm conftest*
5012   ln conftest.a conftest.b 2>/dev/null && hard_links=no
5013   touch conftest.a
5014   ln conftest.a conftest.b 2>&5 || hard_links=no
5015   ln conftest.a conftest.b 2>/dev/null && hard_links=no
5016   echo "$ac_t""$hard_links" 1>&6
5017   if test "$hard_links" = no; then
5018     echo "configure: warning: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" 1>&2
5019     need_locks=warn
5020   fi
5021 else
5022   need_locks=no
5023 fi
5024
5025 if test "$GCC" = yes; then
5026   # Check to see if options -fno-rtti -fno-exceptions are supported by compiler
5027   echo $ac_n "checking if $compiler supports -fno-rtti -fno-exceptions""... $ac_c" 1>&6
5028 echo "configure:5029: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
5029   echo "int some_variable = 0;" > conftest.$ac_ext
5030   save_CFLAGS="$CFLAGS"
5031   CFLAGS="$CFLAGS -fno-rtti -fno-exceptions -c conftest.$ac_ext"
5032   compiler_rtti_exceptions=no
5033   cat > conftest.$ac_ext <<EOF
5034 #line 5035 "configure"
5035 #include "confdefs.h"
5036
5037 int main() {
5038 int some_variable = 0;
5039 ; return 0; }
5040 EOF
5041 if { (eval echo configure:5042: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5042   rm -rf conftest*
5043       # The compiler can only warn and ignore the option if not recognized
5044     # So say no if there are warnings
5045     if test -s conftest.err; then
5046       compiler_rtti_exceptions=no
5047     else
5048       compiler_rtti_exceptions=yes
5049     fi
5050   
5051 else
5052   echo "configure: failed program was:" >&5
5053   cat conftest.$ac_ext >&5
5054 fi
5055 rm -f conftest*
5056   CFLAGS="$save_CFLAGS"
5057   echo "$ac_t""$compiler_rtti_exceptions" 1>&6
5058
5059   if test "$compiler_rtti_exceptions" = "yes"; then
5060     no_builtin_flag=' -fno-builtin -fno-rtti -fno-exceptions'
5061   else
5062     no_builtin_flag=' -fno-builtin'
5063   fi
5064 fi
5065
5066 # See if the linker supports building shared libraries.
5067 echo $ac_n "checking whether the linker ($LD) supports shared libraries""... $ac_c" 1>&6
5068 echo "configure:5069: checking whether the linker ($LD) supports shared libraries" >&5
5069
5070 allow_undefined_flag=
5071 no_undefined_flag=
5072 need_lib_prefix=unknown
5073 need_version=unknown
5074 # when you set need_version to no, make sure it does not cause -set_version
5075 # flags to be left without arguments
5076 archive_cmds=
5077 archive_expsym_cmds=
5078 old_archive_from_new_cmds=
5079 old_archive_from_expsyms_cmds=
5080 export_dynamic_flag_spec=
5081 whole_archive_flag_spec=
5082 thread_safe_flag_spec=
5083 hardcode_into_libs=no
5084 hardcode_libdir_flag_spec=
5085 hardcode_libdir_separator=
5086 hardcode_direct=no
5087 hardcode_minus_L=no
5088 hardcode_shlibpath_var=unsupported
5089 runpath_var=
5090 link_all_deplibs=unknown
5091 always_export_symbols=no
5092 export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols'
5093 # include_expsyms should be a list of space-separated symbols to be *always*
5094 # included in the symbol list
5095 include_expsyms=
5096 # exclude_expsyms can be an egrep regular expression of symbols to exclude
5097 # it will be wrapped by ` (' and `)$', so one must not match beginning or
5098 # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
5099 # as well as any symbol that contains `d'.
5100 exclude_expsyms="_GLOBAL_OFFSET_TABLE_"
5101 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
5102 # platforms (ab)use it in PIC code, but their linkers get confused if
5103 # the symbol is explicitly referenced.  Since portable code cannot
5104 # rely on this symbol name, it's probably fine to never include it in
5105 # preloaded symbol tables.
5106 extract_expsyms_cmds=
5107
5108 case $host_os in
5109 cygwin* | mingw* | pw32*)
5110   # FIXME: the MSVC++ port hasn't been tested in a loooong time
5111   # When not using gcc, we currently assume that we are using
5112   # Microsoft Visual C++.
5113   if test "$GCC" != yes; then
5114     with_gnu_ld=no
5115   fi
5116   ;;
5117 openbsd*)
5118   with_gnu_ld=no
5119   ;;
5120 esac
5121
5122 ld_shlibs=yes
5123 if test "$with_gnu_ld" = yes; then
5124   # If archive_cmds runs LD, not CC, wlarc should be empty
5125   wlarc='${wl}'
5126
5127   # See if GNU ld supports shared libraries.
5128   case $host_os in
5129   aix3* | aix4* | aix5*)
5130     # On AIX, the GNU linker is very broken
5131     # Note:Check GNU linker on AIX 5-IA64 when/if it becomes available.
5132     ld_shlibs=no
5133     cat <<EOF 1>&2
5134
5135 *** Warning: the GNU linker, at least up to release 2.9.1, is reported
5136 *** to be unable to reliably create shared libraries on AIX.
5137 *** Therefore, libtool is disabling shared libraries support.  If you
5138 *** really care for shared libraries, you may want to modify your PATH
5139 *** so that a non-GNU linker is found, and then restart.
5140
5141 EOF
5142     ;;
5143
5144   amigaos*)
5145     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)'
5146     hardcode_libdir_flag_spec='-L$libdir'
5147     hardcode_minus_L=yes
5148
5149     # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
5150     # that the semantics of dynamic libraries on AmigaOS, at least up
5151     # to version 4, is to share data among multiple programs linked
5152     # with the same dynamic library.  Since this doesn't match the
5153     # behavior of shared libraries on other platforms, we can use
5154     # them.
5155     ld_shlibs=no
5156     ;;
5157
5158   beos*)
5159     if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
5160       allow_undefined_flag=unsupported
5161       # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
5162       # support --undefined.  This deserves some investigation.  FIXME
5163       archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5164     else
5165       ld_shlibs=no
5166     fi
5167     ;;
5168
5169   cygwin* | mingw* | pw32*)
5170     # hardcode_libdir_flag_spec is actually meaningless, as there is
5171     # no search path for DLLs.
5172     hardcode_libdir_flag_spec='-L$libdir'
5173     allow_undefined_flag=unsupported
5174     always_export_symbols=yes
5175
5176     extract_expsyms_cmds='test -f $output_objdir/impgen.c || \
5177       sed -e "/^# \/\* impgen\.c starts here \*\//,/^# \/\* impgen.c ends here \*\// { s/^# //;s/^# *$//; p; }" -e d < $''0 > $output_objdir/impgen.c~
5178       test -f $output_objdir/impgen.exe || (cd $output_objdir && \
5179       if test "x$HOST_CC" != "x" ; then $HOST_CC -o impgen impgen.c ; \
5180       else $CC -o impgen impgen.c ; fi)~
5181       $output_objdir/impgen $dir/$soroot > $output_objdir/$soname-def'
5182
5183     old_archive_from_expsyms_cmds='$DLLTOOL --as=$AS --dllname $soname --def $output_objdir/$soname-def --output-lib $output_objdir/$newlib'
5184
5185     # cygwin and mingw dlls have different entry points and sets of symbols
5186     # to exclude.
5187     # FIXME: what about values for MSVC?
5188     dll_entry=__cygwin_dll_entry@12
5189     dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12~
5190     case $host_os in
5191     mingw*)
5192       # mingw values
5193       dll_entry=_DllMainCRTStartup@12
5194       dll_exclude_symbols=DllMain@12,DllMainCRTStartup@12,DllEntryPoint@12~
5195       ;;
5196     esac
5197
5198     # mingw and cygwin differ, and it's simplest to just exclude the union
5199     # of the two symbol sets.
5200     dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12,DllMainCRTStartup@12,DllEntryPoint@12
5201
5202     # recent cygwin and mingw systems supply a stub DllMain which the user
5203     # can override, but on older systems we have to supply one (in ltdll.c)
5204     if test "x$lt_cv_need_dllmain" = "xyes"; then
5205       ltdll_obj='$output_objdir/$soname-ltdll.'"$ac_objext "
5206       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~
5207         test -f $output_objdir/$soname-ltdll.$ac_objext || (cd $output_objdir && $CC -c $soname-ltdll.c)~'
5208     else
5209       ltdll_obj=
5210       ltdll_cmds=
5211     fi
5212
5213     # Extract the symbol export list from an `--export-all' def file,
5214     # then regenerate the def file from the symbol export list, so that
5215     # the compiled dll only exports the symbol export list.
5216     # Be careful not to strip the DATA tag left be newer dlltools.
5217     export_symbols_cmds="$ltdll_cmds"'
5218       $DLLTOOL --export-all --exclude-symbols '$dll_exclude_symbols' --output-def $output_objdir/$soname-def '$ltdll_obj'$libobjs $convenience~
5219       sed -e "1,/EXPORTS/d" -e "s/ @ [0-9]*//" -e "s/ *;.*$//" < $output_objdir/$soname-def > $export_symbols'
5220
5221     # If the export-symbols file already is a .def file (1st line
5222     # is EXPORTS), use it as is.
5223     # If DATA tags from a recent dlltool are present, honour them!
5224     archive_expsym_cmds='if test "x`sed 1q $export_symbols`" = xEXPORTS; then
5225         cp $export_symbols $output_objdir/$soname-def;
5226       else
5227         echo EXPORTS > $output_objdir/$soname-def;
5228         _lt_hint=1;
5229         cat $export_symbols | while read symbol; do
5230          set dummy \$symbol;
5231          case \$# in
5232            2) echo "   \$2 @ \$_lt_hint ; " >> $output_objdir/$soname-def;;
5233            4) echo "   \$2 \$3 \$4 ; " >> $output_objdir/$soname-def; _lt_hint=`expr \$_lt_hint - 1`;;
5234            *) echo "     \$2 @ \$_lt_hint \$3 ; " >> $output_objdir/$soname-def;;
5235          esac;
5236          _lt_hint=`expr 1 + \$_lt_hint`;
5237         done;
5238       fi~
5239       '"$ltdll_cmds"'
5240       $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~
5241       $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~
5242       $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~
5243       $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~
5244       $CC $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags'
5245     ;;
5246
5247   netbsd*)
5248     if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
5249       archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
5250       wlarc=
5251     else
5252       archive_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5253       archive_expsym_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5254     fi
5255     ;;
5256
5257   solaris* | sysv5*)
5258     if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then
5259       ld_shlibs=no
5260       cat <<EOF 1>&2
5261
5262 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
5263 *** create shared libraries on Solaris systems.  Therefore, libtool
5264 *** is disabling shared libraries support.  We urge you to upgrade GNU
5265 *** binutils to release 2.9.1 or newer.  Another option is to modify
5266 *** your PATH or compiler configuration so that the native linker is
5267 *** used, and then restart.
5268
5269 EOF
5270     elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
5271       archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5272       archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5273     else
5274       ld_shlibs=no
5275     fi
5276     ;;
5277
5278   sunos4*)
5279     archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5280     wlarc=
5281     hardcode_direct=yes
5282     hardcode_shlibpath_var=no
5283     ;;
5284
5285   *)
5286     if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
5287       archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5288       archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5289     else
5290       ld_shlibs=no
5291     fi
5292     ;;
5293   esac
5294
5295   if test "$ld_shlibs" = yes; then
5296     runpath_var=LD_RUN_PATH
5297     hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir'
5298     export_dynamic_flag_spec='${wl}--export-dynamic'
5299     case $host_os in
5300     cygwin* | mingw* | pw32*)
5301       # dlltool doesn't understand --whole-archive et. al.
5302       whole_archive_flag_spec=
5303       ;;
5304     *)
5305       # ancient GNU ld didn't support --whole-archive et. al.
5306       if $LD --help 2>&1 | egrep 'no-whole-archive' > /dev/null; then
5307         whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
5308       else
5309         whole_archive_flag_spec=
5310       fi
5311       ;;
5312     esac
5313   fi
5314 else
5315   # PORTME fill in a description of your system's linker (not GNU ld)
5316   case $host_os in
5317   aix3*)
5318     allow_undefined_flag=unsupported
5319     always_export_symbols=yes
5320     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'
5321     # Note: this linker hardcodes the directories in LIBPATH if there
5322     # are no directories specified by -L.
5323     hardcode_minus_L=yes
5324     if test "$GCC" = yes && test -z "$link_static_flag"; then
5325       # Neither direct hardcoding nor static linking is supported with a
5326       # broken collect2.
5327       hardcode_direct=unsupported
5328     fi
5329     ;;
5330
5331   aix4* | aix5*)
5332     if test "$host_cpu" = ia64; then
5333       # On IA64, the linker does run time linking by default, so we don't
5334       # have to do anything special.
5335       aix_use_runtimelinking=no
5336       exp_sym_flag='-Bexport'
5337       no_entry_flag=""
5338     else
5339       aix_use_runtimelinking=no
5340
5341       # Test if we are trying to use run time linking or normal
5342       # AIX style linking. If -brtl is somewhere in LDFLAGS, we
5343       # need to do runtime linking.
5344       case $host_os in aix4.[23]|aix4.[23].*|aix5*)
5345         for ld_flag in $LDFLAGS; do
5346           case $ld_flag in
5347           *-brtl*)
5348             aix_use_runtimelinking=yes
5349             break
5350           ;;
5351           esac
5352         done
5353       esac
5354
5355       exp_sym_flag='-bexport'
5356       no_entry_flag='-bnoentry'
5357     fi
5358
5359     # When large executables or shared objects are built, AIX ld can
5360     # have problems creating the table of contents.  If linking a library
5361     # or program results in "error TOC overflow" add -mminimal-toc to
5362     # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
5363     # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
5364
5365     hardcode_direct=yes
5366     archive_cmds=''
5367     hardcode_libdir_separator=':'
5368     if test "$GCC" = yes; then
5369       case $host_os in aix4.[012]|aix4.[012].*)
5370         collect2name=`${CC} -print-prog-name=collect2`
5371         if test -f "$collect2name" && \
5372           strings "$collect2name" | grep resolve_lib_name >/dev/null
5373         then
5374           # We have reworked collect2
5375           hardcode_direct=yes
5376         else
5377           # We have old collect2
5378           hardcode_direct=unsupported
5379           # It fails to find uninstalled libraries when the uninstalled
5380           # path is not listed in the libpath.  Setting hardcode_minus_L
5381           # to unsupported forces relinking
5382           hardcode_minus_L=yes
5383           hardcode_libdir_flag_spec='-L$libdir'
5384           hardcode_libdir_separator=
5385         fi
5386       esac
5387
5388       shared_flag='-shared'
5389     else
5390       # not using gcc
5391       if test "$host_cpu" = ia64; then
5392         shared_flag='${wl}-G'
5393       else
5394         if test "$aix_use_runtimelinking" = yes; then
5395           shared_flag='${wl}-G'
5396         else
5397           shared_flag='${wl}-bM:SRE'
5398         fi
5399       fi
5400     fi
5401
5402     # It seems that -bexpall can do strange things, so it is better to
5403     # generate a list of symbols to export.
5404     always_export_symbols=yes
5405     if test "$aix_use_runtimelinking" = yes; then
5406       # Warning - without using the other runtime loading flags (-brtl),
5407       # -berok will link without error, but may produce a broken library.
5408       allow_undefined_flag='-berok'
5409       hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:/usr/lib:/lib'
5410       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"
5411     else
5412       if test "$host_cpu" = ia64; then
5413         hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
5414         allow_undefined_flag="-z nodefs"
5415         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"
5416       else
5417         hardcode_libdir_flag_spec='${wl}-bnolibpath ${wl}-blibpath:$libdir:/usr/lib:/lib'
5418         # Warning - without using the other run time loading flags,
5419         # -berok will link without error, but may produce a broken library.
5420         allow_undefined_flag='${wl}-berok'
5421         # This is a bit strange, but is similar to how AIX traditionally builds
5422         # it's shared libraries.
5423         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'
5424       fi
5425     fi
5426     ;;
5427
5428   amigaos*)
5429     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)'
5430     hardcode_libdir_flag_spec='-L$libdir'
5431     hardcode_minus_L=yes
5432     # see comment about different semantics on the GNU ld section
5433     ld_shlibs=no
5434     ;;
5435
5436   cygwin* | mingw* | pw32*)
5437     # When not using gcc, we currently assume that we are using
5438     # Microsoft Visual C++.
5439     # hardcode_libdir_flag_spec is actually meaningless, as there is
5440     # no search path for DLLs.
5441     hardcode_libdir_flag_spec=' '
5442     allow_undefined_flag=unsupported
5443     # Tell ltmain to make .lib files, not .a files.
5444     libext=lib
5445     # FIXME: Setting linknames here is a bad hack.
5446     archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | sed -e '\''s/ -lc$//'\''` -link -dll~linknames='
5447     # The linker will automatically build a .lib file if we build a DLL.
5448     old_archive_from_new_cmds='true'
5449     # FIXME: Should let the user specify the lib program.
5450     old_archive_cmds='lib /OUT:$oldlib$oldobjs$old_deplibs'
5451     fix_srcfile_path='`cygpath -w "$srcfile"`'
5452     ;;
5453
5454   darwin* | rhapsody*)
5455     case "$host_os" in
5456     rhapsody* | darwin1.[012])
5457       allow_undefined_flag='-undefined suppress'
5458       ;;
5459     *) # Darwin 1.3 on
5460       allow_undefined_flag='-flat_namespace -undefined suppress'
5461       ;;
5462     esac
5463     # FIXME: Relying on posixy $() will cause problems for
5464     #        cross-compilation, but unfortunately the echo tests do not
5465     #        yet detect zsh echo's removal of \ escapes.  Also zsh mangles
5466     #        `"' quotes if we put them in here... so don't!
5467     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)'
5468     # We need to add '_' to the symbols in $export_symbols first
5469     #archive_expsym_cmds="$archive_cmds"' && strip -s $export_symbols'
5470     hardcode_direct=yes
5471     hardcode_shlibpath_var=no
5472     whole_archive_flag_spec='-all_load $convenience'
5473     ;;
5474
5475   freebsd1*)
5476     ld_shlibs=no
5477     ;;
5478
5479   # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
5480   # support.  Future versions do this automatically, but an explicit c++rt0.o
5481   # does not break anything, and helps significantly (at the cost of a little
5482   # extra space).
5483   freebsd2.2*)
5484     archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
5485     hardcode_libdir_flag_spec='-R$libdir'
5486     hardcode_direct=yes
5487     hardcode_shlibpath_var=no
5488     ;;
5489
5490   # Unfortunately, older versions of FreeBSD 2 do not have this feature.
5491   freebsd2*)
5492     archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5493     hardcode_direct=yes
5494     hardcode_minus_L=yes
5495     hardcode_shlibpath_var=no
5496     ;;
5497
5498   # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
5499   freebsd*)
5500     archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
5501     hardcode_libdir_flag_spec='-R$libdir'
5502     hardcode_direct=yes
5503     hardcode_shlibpath_var=no
5504     ;;
5505
5506   hpux9* | hpux10* | hpux11*)
5507     case $host_os in
5508     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' ;;
5509     *) archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' ;;
5510     esac
5511     hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
5512     hardcode_libdir_separator=:
5513     hardcode_direct=yes
5514     hardcode_minus_L=yes # Not in the search PATH, but as the default
5515                          # location of the library.
5516     export_dynamic_flag_spec='${wl}-E'
5517     ;;
5518
5519   irix5* | irix6* | nonstopux*)
5520     if test "$GCC" = yes; then
5521       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'
5522       hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5523     else
5524       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'
5525       hardcode_libdir_flag_spec='-rpath $libdir'
5526     fi
5527     hardcode_libdir_separator=:
5528     link_all_deplibs=yes
5529     ;;
5530
5531   netbsd*)
5532     if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
5533       archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
5534     else
5535       archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
5536     fi
5537     hardcode_libdir_flag_spec='-R$libdir'
5538     hardcode_direct=yes
5539     hardcode_shlibpath_var=no
5540     ;;
5541
5542   newsos6)
5543     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5544     hardcode_direct=yes
5545     hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5546     hardcode_libdir_separator=:
5547     hardcode_shlibpath_var=no
5548     ;;
5549
5550   openbsd*)
5551     hardcode_direct=yes
5552     hardcode_shlibpath_var=no
5553     if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
5554       archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5555       hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
5556       export_dynamic_flag_spec='${wl}-E'
5557     else
5558       case "$host_os" in
5559       openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
5560         archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5561         hardcode_libdir_flag_spec='-R$libdir'
5562         ;;
5563       *)
5564         archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5565         hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
5566         ;;
5567       esac
5568     fi
5569     ;;
5570
5571   openedition*)
5572     archive_cmds="\$CC -Wl,DLL \$libobjs \$deplibs \$compiler_flags -o \$lib &&
5573         cp \$linknames \$output_objdir && linknames=''"
5574     export_dynamic_flag_spec="-Wl,DLL"
5575     ;;
5576
5577   os2*)
5578     hardcode_libdir_flag_spec='-L$libdir'
5579     hardcode_minus_L=yes
5580     allow_undefined_flag=unsupported
5581     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'
5582     old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
5583     ;;
5584
5585   osf3*)
5586     if test "$GCC" = yes; then
5587       allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
5588       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'
5589     else
5590       allow_undefined_flag=' -expect_unresolved \*'
5591       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'
5592     fi
5593     hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5594     hardcode_libdir_separator=:
5595     ;;
5596
5597   osf4* | osf5*)        # as osf3* with the addition of -msym flag
5598     if test "$GCC" = yes; then
5599       allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
5600       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'
5601       hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5602     else
5603       allow_undefined_flag=' -expect_unresolved \*'
5604       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'
5605       archive_expsym_cmds='for i in `cat $export_symbols`; do printf "-exported_symbol " >> $lib.exp; echo "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
5606       $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'
5607
5608       #Both c and cxx compiler support -rpath directly
5609       hardcode_libdir_flag_spec='-rpath $libdir'
5610     fi
5611     hardcode_libdir_separator=:
5612     ;;
5613
5614   sco3.2v5*)
5615     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5616     hardcode_shlibpath_var=no
5617     runpath_var=LD_RUN_PATH
5618     hardcode_runpath_var=yes
5619     export_dynamic_flag_spec='${wl}-Bexport'
5620     ;;
5621
5622   solaris*)
5623     # gcc --version < 3.0 without binutils cannot create self contained
5624     # shared libraries reliably, requiring libgcc.a to resolve some of
5625     # the object symbols generated in some cases.  Libraries that use
5626     # assert need libgcc.a to resolve __eprintf, for example.  Linking
5627     # a copy of libgcc.a into every shared library to guarantee resolving
5628     # such symbols causes other problems:  According to Tim Van Holder
5629     # <tim.van.holder@pandora.be>, C++ libraries end up with a separate
5630     # (to the application) exception stack for one thing.
5631     no_undefined_flag=' -z defs'
5632     if test "$GCC" = yes; then
5633       case `$CC --version 2>/dev/null` in
5634       [12].*)
5635         cat <<EOF 1>&2
5636
5637 *** Warning: Releases of GCC earlier than version 3.0 cannot reliably
5638 *** create self contained shared libraries on Solaris systems, without
5639 *** introducing a dependency on libgcc.a.  Therefore, libtool is disabling
5640 *** -no-undefined support, which will at least allow you to build shared
5641 *** libraries.  However, you may find that when you link such libraries
5642 *** into an application without using GCC, you have to manually add
5643 *** \`gcc --print-libgcc-file-name\` to the link command.  We urge you to
5644 *** upgrade to a newer version of GCC.  Another option is to rebuild your
5645 *** current GCC to use the GNU linker from GNU binutils 2.9.1 or newer.
5646
5647 EOF
5648         no_undefined_flag=
5649         ;;
5650       esac
5651     fi
5652     # $CC -shared without GNU ld will not create a library from C++
5653     # object files and a static libstdc++, better avoid it by now
5654     archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
5655     archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
5656                 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
5657     hardcode_libdir_flag_spec='-R$libdir'
5658     hardcode_shlibpath_var=no
5659     case $host_os in
5660     solaris2.[0-5] | solaris2.[0-5].*) ;;
5661     *) # Supported since Solaris 2.6 (maybe 2.5.1?)
5662       whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;;
5663     esac
5664     link_all_deplibs=yes
5665     ;;
5666
5667   sunos4*)
5668     if test "x$host_vendor" = xsequent; then
5669       # Use $CC to link under sequent, because it throws in some extra .o
5670       # files that make .init and .fini sections work.
5671       archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
5672     else
5673       archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
5674     fi
5675     hardcode_libdir_flag_spec='-L$libdir'
5676     hardcode_direct=yes
5677     hardcode_minus_L=yes
5678     hardcode_shlibpath_var=no
5679     ;;
5680
5681   sysv4)
5682     case $host_vendor in
5683       sni)
5684         archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5685         hardcode_direct=yes # is this really true???
5686         ;;
5687       siemens)
5688         ## LD is ld it makes a PLAMLIB
5689         ## CC just makes a GrossModule.
5690         archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
5691         reload_cmds='$CC -r -o $output$reload_objs'
5692         hardcode_direct=no
5693         ;;
5694       motorola)
5695         archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5696         hardcode_direct=no #Motorola manual says yes, but my tests say they lie
5697         ;;
5698     esac
5699     runpath_var='LD_RUN_PATH'
5700     hardcode_shlibpath_var=no
5701     ;;
5702
5703   sysv4.3*)
5704     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5705     hardcode_shlibpath_var=no
5706     export_dynamic_flag_spec='-Bexport'
5707     ;;
5708
5709   sysv5*)
5710     no_undefined_flag=' -z text'
5711     # $CC -shared without GNU ld will not create a library from C++
5712     # object files and a static libstdc++, better avoid it by now
5713     archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
5714     archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
5715                 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
5716     hardcode_libdir_flag_spec=
5717     hardcode_shlibpath_var=no
5718     runpath_var='LD_RUN_PATH'
5719     ;;
5720
5721   uts4*)
5722     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5723     hardcode_libdir_flag_spec='-L$libdir'
5724     hardcode_shlibpath_var=no
5725     ;;
5726
5727   dgux*)
5728     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5729     hardcode_libdir_flag_spec='-L$libdir'
5730     hardcode_shlibpath_var=no
5731     ;;
5732
5733   sysv4*MP*)
5734     if test -d /usr/nec; then
5735       archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5736       hardcode_shlibpath_var=no
5737       runpath_var=LD_RUN_PATH
5738       hardcode_runpath_var=yes
5739       ld_shlibs=yes
5740     fi
5741     ;;
5742
5743   sysv4.2uw2*)
5744     archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
5745     hardcode_direct=yes
5746     hardcode_minus_L=no
5747     hardcode_shlibpath_var=no
5748     hardcode_runpath_var=yes
5749     runpath_var=LD_RUN_PATH
5750     ;;
5751
5752   sysv5uw7* | unixware7*)
5753     no_undefined_flag='${wl}-z ${wl}text'
5754     if test "$GCC" = yes; then
5755       archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
5756     else
5757       archive_cmds='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
5758     fi
5759     runpath_var='LD_RUN_PATH'
5760     hardcode_shlibpath_var=no
5761     ;;
5762
5763   *)
5764     ld_shlibs=no
5765     ;;
5766   esac
5767 fi
5768 echo "$ac_t""$ld_shlibs" 1>&6
5769 test "$ld_shlibs" = no && can_build_shared=no
5770
5771 # Check hardcoding attributes.
5772 echo $ac_n "checking how to hardcode library paths into programs""... $ac_c" 1>&6
5773 echo "configure:5774: checking how to hardcode library paths into programs" >&5
5774 hardcode_action=
5775 if test -n "$hardcode_libdir_flag_spec" || \
5776    test -n "$runpath_var"; then
5777
5778   # We can hardcode non-existant directories.
5779   if test "$hardcode_direct" != no &&
5780      # If the only mechanism to avoid hardcoding is shlibpath_var, we
5781      # have to relink, otherwise we might link with an installed library
5782      # when we should be linking with a yet-to-be-installed one
5783      ## test "$hardcode_shlibpath_var" != no &&
5784      test "$hardcode_minus_L" != no; then
5785     # Linking always hardcodes the temporary library directory.
5786     hardcode_action=relink
5787   else
5788     # We can link without hardcoding, and we can hardcode nonexisting dirs.
5789     hardcode_action=immediate
5790   fi
5791 else
5792   # We cannot hardcode anything, or else we can only hardcode existing
5793   # directories.
5794   hardcode_action=unsupported
5795 fi
5796 echo "$ac_t""$hardcode_action" 1>&6
5797
5798 striplib=
5799 old_striplib=
5800 echo $ac_n "checking whether stripping libraries is possible""... $ac_c" 1>&6
5801 echo "configure:5802: checking whether stripping libraries is possible" >&5
5802 if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
5803   test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
5804   test -z "$striplib" && striplib="$STRIP --strip-unneeded"
5805   echo "$ac_t""yes" 1>&6
5806 else
5807   echo "$ac_t""no" 1>&6
5808 fi
5809
5810 reload_cmds='$LD$reload_flag -o $output$reload_objs'
5811 test -z "$deplibs_check_method" && deplibs_check_method=unknown
5812
5813 # PORTME Fill in your ld.so characteristics
5814 echo $ac_n "checking dynamic linker characteristics""... $ac_c" 1>&6
5815 echo "configure:5816: checking dynamic linker characteristics" >&5
5816 library_names_spec=
5817 libname_spec='lib$name'
5818 soname_spec=
5819 postinstall_cmds=
5820 postuninstall_cmds=
5821 finish_cmds=
5822 finish_eval=
5823 shlibpath_var=
5824 shlibpath_overrides_runpath=unknown
5825 version_type=none
5826 dynamic_linker="$host_os ld.so"
5827 sys_lib_dlsearch_path_spec="/lib /usr/lib"
5828 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
5829
5830 case $host_os in
5831 aix3*)
5832   version_type=linux
5833   library_names_spec='${libname}${release}.so$versuffix $libname.a'
5834   shlibpath_var=LIBPATH
5835
5836   # AIX has no versioning support, so we append a major version to the name.
5837   soname_spec='${libname}${release}.so$major'
5838   ;;
5839
5840 aix4* | aix5*)
5841   version_type=linux
5842   need_lib_prefix=no
5843   need_version=no
5844   hardcode_into_libs=yes
5845   if test "$host_cpu" = ia64; then
5846     # AIX 5 supports IA64
5847     library_names_spec='${libname}${release}.so$major ${libname}${release}.so$versuffix $libname.so'
5848     shlibpath_var=LD_LIBRARY_PATH
5849   else
5850     # With GCC up to 2.95.x, collect2 would create an import file
5851     # for dependence libraries.  The import file would start with
5852     # the line `#! .'.  This would cause the generated library to
5853     # depend on `.', always an invalid library.  This was fixed in
5854     # development snapshots of GCC prior to 3.0.
5855     case $host_os in
5856       aix4 | aix4.[01] | aix4.[01].*)
5857         if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
5858              echo ' yes '
5859              echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
5860           :
5861         else
5862           can_build_shared=no
5863         fi
5864         ;;
5865     esac
5866     # AIX (on Power*) has no versioning support, so currently we can
5867     # not hardcode correct soname into executable. Probably we can
5868     # add versioning support to collect2, so additional links can
5869     # be useful in future.
5870     if test "$aix_use_runtimelinking" = yes; then
5871       # If using run time linking (on AIX 4.2 or later) use lib<name>.so
5872       # instead of lib<name>.a to let people know that these are not
5873       # typical AIX shared libraries.
5874       library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
5875     else
5876       # We preserve .a as extension for shared libraries through AIX4.2
5877       # and later when we are not doing run time linking.
5878       library_names_spec='${libname}${release}.a $libname.a'
5879       soname_spec='${libname}${release}.so$major'
5880     fi
5881     shlibpath_var=LIBPATH
5882   fi
5883   hardcode_into_libs=yes
5884   ;;
5885
5886 amigaos*)
5887   library_names_spec='$libname.ixlibrary $libname.a'
5888   # Create ${libname}_ixlibrary.a entries in /sys/libs.
5889   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'
5890   ;;
5891
5892 beos*)
5893   library_names_spec='${libname}.so'
5894   dynamic_linker="$host_os ld.so"
5895   shlibpath_var=LIBRARY_PATH
5896   ;;
5897
5898 bsdi4*)
5899   version_type=linux
5900   need_version=no
5901   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
5902   soname_spec='${libname}${release}.so$major'
5903   finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
5904   shlibpath_var=LD_LIBRARY_PATH
5905   sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
5906   sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
5907   export_dynamic_flag_spec=-rdynamic
5908   # the default ld.so.conf also contains /usr/contrib/lib and
5909   # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
5910   # libtool to hard-code these into programs
5911   ;;
5912
5913 cygwin* | mingw* | pw32*)
5914   version_type=windows
5915   need_version=no
5916   need_lib_prefix=no
5917   case $GCC,$host_os in
5918   yes,cygwin*)
5919     library_names_spec='$libname.dll.a'
5920     soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
5921     postinstall_cmds='dlpath=`bash 2>&1 -c '\''. $dir/${file}i;echo \$dlname'\''`~
5922       dldir=$destdir/`dirname \$dlpath`~
5923       test -d \$dldir || mkdir -p \$dldir~
5924       $install_prog .libs/$dlname \$dldir/$dlname'
5925     postuninstall_cmds='dldll=`bash 2>&1 -c '\''. $file; echo \$dlname'\''`~
5926       dlpath=$dir/\$dldll~
5927        $rm \$dlpath'
5928     ;;
5929   yes,mingw*)
5930     library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
5931     sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | sed -e "s/^libraries://" -e "s/;/ /g" -e "s,=/,/,g"`
5932     ;;
5933   yes,pw32*)
5934     library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | sed -e 's/./-/g'`${versuffix}.dll'
5935     ;;
5936   *)
5937     library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll $libname.lib'
5938     ;;
5939   esac
5940   dynamic_linker='Win32 ld.exe'
5941   # FIXME: first we should search . and the directory the executable is in
5942   shlibpath_var=PATH
5943   ;;
5944
5945 darwin* | rhapsody*)
5946   dynamic_linker="$host_os dyld"
5947   version_type=darwin
5948   need_lib_prefix=no
5949   need_version=no
5950   # FIXME: Relying on posixy $() will cause problems for
5951   #        cross-compilation, but unfortunately the echo tests do not
5952   #        yet detect zsh echo's removal of \ escapes.
5953   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)'
5954   soname_spec='${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib)'
5955   shlibpath_overrides_runpath=yes
5956   shlibpath_var=DYLD_LIBRARY_PATH
5957   ;;
5958
5959 freebsd1*)
5960   dynamic_linker=no
5961   ;;
5962
5963 freebsd*)
5964   objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
5965   version_type=freebsd-$objformat
5966   case $version_type in
5967     freebsd-elf*)
5968       library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
5969       need_version=no
5970       need_lib_prefix=no
5971       ;;
5972     freebsd-*)
5973       library_names_spec='${libname}${release}.so$versuffix $libname.so$versuffix'
5974       need_version=yes
5975       ;;
5976   esac
5977   shlibpath_var=LD_LIBRARY_PATH
5978   case $host_os in
5979   freebsd2*)
5980     shlibpath_overrides_runpath=yes
5981     ;;
5982   *)
5983     shlibpath_overrides_runpath=no
5984     hardcode_into_libs=yes
5985     ;;
5986   esac
5987   ;;
5988
5989 gnu*)
5990   version_type=linux
5991   need_lib_prefix=no
5992   need_version=no
5993   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so${major} ${libname}.so'
5994   soname_spec='${libname}${release}.so$major'
5995   shlibpath_var=LD_LIBRARY_PATH
5996   hardcode_into_libs=yes
5997   ;;
5998
5999 hpux9* | hpux10* | hpux11*)
6000   # Give a soname corresponding to the major version so that dld.sl refuses to
6001   # link against other versions.
6002   dynamic_linker="$host_os dld.sl"
6003   version_type=sunos
6004   need_lib_prefix=no
6005   need_version=no
6006   shlibpath_var=SHLIB_PATH
6007   shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
6008   library_names_spec='${libname}${release}.sl$versuffix ${libname}${release}.sl$major $libname.sl'
6009   soname_spec='${libname}${release}.sl$major'
6010   # HP-UX runs *really* slowly unless shared libraries are mode 555.
6011   postinstall_cmds='chmod 555 $lib'
6012   ;;
6013
6014 irix5* | irix6* | nonstopux*)
6015   case $host_os in
6016     nonstopux*) version_type=nonstopux ;;
6017     *)          version_type=irix ;;
6018   esac
6019   need_lib_prefix=no
6020   need_version=no
6021   soname_spec='${libname}${release}.so$major'
6022   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so $libname.so'
6023   case $host_os in
6024   irix5* | nonstopux*)
6025     libsuff= shlibsuff=
6026     ;;
6027   *)
6028     case $LD in # libtool.m4 will add one of these switches to LD
6029     *-32|*"-32 ") libsuff= shlibsuff= libmagic=32-bit;;
6030     *-n32|*"-n32 ") libsuff=32 shlibsuff=N32 libmagic=N32;;
6031     *-64|*"-64 ") libsuff=64 shlibsuff=64 libmagic=64-bit;;
6032     *) libsuff= shlibsuff= libmagic=never-match;;
6033     esac
6034     ;;
6035   esac
6036   shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
6037   shlibpath_overrides_runpath=no
6038   sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
6039   sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
6040   ;;
6041
6042 # No shared lib support for Linux oldld, aout, or coff.
6043 linux-gnuoldld* | linux-gnuaout* | linux-gnucoff*)
6044   dynamic_linker=no
6045   ;;
6046
6047 # This must be Linux ELF.
6048 linux-gnu*)
6049   version_type=linux
6050   need_lib_prefix=no
6051   need_version=no
6052   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6053   soname_spec='${libname}${release}.so$major'
6054   finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
6055   shlibpath_var=LD_LIBRARY_PATH
6056   shlibpath_overrides_runpath=no
6057   # This implies no fast_install, which is unacceptable.
6058   # Some rework will be needed to allow for fast_install
6059   # before this can be enabled.
6060   hardcode_into_libs=yes
6061
6062   # We used to test for /lib/ld.so.1 and disable shared libraries on
6063   # powerpc, because MkLinux only supported shared libraries with the
6064   # GNU dynamic linker.  Since this was broken with cross compilers,
6065   # most powerpc-linux boxes support dynamic linking these days and
6066   # people can always --disable-shared, the test was removed, and we
6067   # assume the GNU/Linux dynamic linker is in use.
6068   dynamic_linker='GNU/Linux ld.so'
6069   ;;
6070
6071 netbsd*)
6072   version_type=sunos
6073   need_lib_prefix=no
6074   need_version=no
6075   if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
6076     library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
6077     finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
6078     dynamic_linker='NetBSD (a.out) ld.so'
6079   else
6080     library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so ${libname}.so'
6081     soname_spec='${libname}${release}.so$major'
6082     dynamic_linker='NetBSD ld.elf_so'
6083   fi
6084   shlibpath_var=LD_LIBRARY_PATH
6085   shlibpath_overrides_runpath=yes
6086   hardcode_into_libs=yes
6087   ;;
6088
6089 newsos6)
6090   version_type=linux
6091   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6092   shlibpath_var=LD_LIBRARY_PATH
6093   shlibpath_overrides_runpath=yes
6094   ;;
6095
6096 openbsd*)
6097   version_type=sunos
6098   need_lib_prefix=no
6099   need_version=no
6100   if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
6101     case "$host_os" in
6102     openbsd2.[89] | openbsd2.[89].*)
6103       shlibpath_overrides_runpath=no
6104       ;;
6105     *)
6106       shlibpath_overrides_runpath=yes
6107       ;;
6108     esac
6109   else
6110     shlibpath_overrides_runpath=yes
6111   fi
6112   library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
6113   finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
6114   shlibpath_var=LD_LIBRARY_PATH
6115   ;;
6116
6117 openedition*)
6118   need_lib_prefix=no
6119   need_version=no
6120   shlibpath_overrides_runpath=yes
6121   shlibpath_var=LIBPATH
6122   postinstall_cmds="rm \$destdir/\$linkname; cp \$linkname \$destdir; chmod a+x \$lib"
6123   # the library's exports are in libname.x; this is the file that must
6124   # actually be linked with to use a DLL.
6125   library_names_spec="\${libname}\${release}.so\$versuffix \${libname}.x"
6126   ;;
6127
6128 os2*)
6129   libname_spec='$name'
6130   need_lib_prefix=no
6131   library_names_spec='$libname.dll $libname.a'
6132   dynamic_linker='OS/2 ld.exe'
6133   shlibpath_var=LIBPATH
6134   ;;
6135
6136 osf3* | osf4* | osf5*)
6137   version_type=osf
6138   need_version=no
6139   soname_spec='${libname}${release}.so$major'
6140   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6141   shlibpath_var=LD_LIBRARY_PATH
6142   sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
6143   sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
6144   hardcode_into_libs=yes
6145   ;;
6146
6147 sco3.2v5*)
6148   version_type=osf
6149   soname_spec='${libname}${release}.so$major'
6150   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6151   shlibpath_var=LD_LIBRARY_PATH
6152   ;;
6153
6154 solaris*)
6155   version_type=linux
6156   need_lib_prefix=no
6157   need_version=no
6158   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6159   soname_spec='${libname}${release}.so$major'
6160   shlibpath_var=LD_LIBRARY_PATH
6161   shlibpath_overrides_runpath=yes
6162   hardcode_into_libs=yes
6163   # ldd complains unless libraries are executable
6164   postinstall_cmds='chmod +x $lib'
6165   ;;
6166
6167 sunos4*)
6168   version_type=sunos
6169   library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
6170   finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
6171   shlibpath_var=LD_LIBRARY_PATH
6172   shlibpath_overrides_runpath=yes
6173   if test "$with_gnu_ld" = yes; then
6174     need_lib_prefix=no
6175   fi
6176   need_version=yes
6177   ;;
6178
6179 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
6180   version_type=linux
6181   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6182   soname_spec='${libname}${release}.so$major'
6183   shlibpath_var=LD_LIBRARY_PATH
6184   case $host_vendor in
6185     sni)
6186       shlibpath_overrides_runpath=no
6187       need_lib_prefix=no
6188       export_dynamic_flag_spec='${wl}-Blargedynsym'
6189       runpath_var=LD_RUN_PATH
6190       ;;
6191     siemens)
6192       need_lib_prefix=no
6193       ;;
6194     motorola)
6195       need_lib_prefix=no
6196       need_version=no
6197       shlibpath_overrides_runpath=no
6198       sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
6199       ;;
6200   esac
6201   ;;
6202
6203 uts4*)
6204   version_type=linux
6205   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6206   soname_spec='${libname}${release}.so$major'
6207   shlibpath_var=LD_LIBRARY_PATH
6208   ;;
6209
6210 dgux*)
6211   version_type=linux
6212   need_lib_prefix=no
6213   need_version=no
6214   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6215   soname_spec='${libname}${release}.so$major'
6216   shlibpath_var=LD_LIBRARY_PATH
6217   ;;
6218
6219 sysv4*MP*)
6220   if test -d /usr/nec ;then
6221     version_type=linux
6222     library_names_spec='$libname.so.$versuffix $libname.so.$major $libname.so'
6223     soname_spec='$libname.so.$major'
6224     shlibpath_var=LD_LIBRARY_PATH
6225   fi
6226   ;;
6227
6228 *)
6229   dynamic_linker=no
6230   ;;
6231 esac
6232 echo "$ac_t""$dynamic_linker" 1>&6
6233 test "$dynamic_linker" = no && can_build_shared=no
6234
6235 # Report the final consequences.
6236 echo $ac_n "checking if libtool supports shared libraries""... $ac_c" 1>&6
6237 echo "configure:6238: checking if libtool supports shared libraries" >&5
6238 echo "$ac_t""$can_build_shared" 1>&6
6239
6240 echo $ac_n "checking whether to build shared libraries""... $ac_c" 1>&6
6241 echo "configure:6242: checking whether to build shared libraries" >&5
6242 test "$can_build_shared" = "no" && enable_shared=no
6243
6244 # On AIX, shared libraries and static libraries use the same namespace, and
6245 # are all built from PIC.
6246 case "$host_os" in
6247 aix3*)
6248   test "$enable_shared" = yes && enable_static=no
6249   if test -n "$RANLIB"; then
6250     archive_cmds="$archive_cmds~\$RANLIB \$lib"
6251     postinstall_cmds='$RANLIB $lib'
6252   fi
6253   ;;
6254
6255 aix4*)
6256   if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
6257     test "$enable_shared" = yes && enable_static=no
6258   fi
6259   ;;
6260 esac
6261 echo "$ac_t""$enable_shared" 1>&6
6262
6263 echo $ac_n "checking whether to build static libraries""... $ac_c" 1>&6
6264 echo "configure:6265: checking whether to build static libraries" >&5
6265 # Make sure either enable_shared or enable_static is yes.
6266 test "$enable_shared" = yes || enable_static=yes
6267 echo "$ac_t""$enable_static" 1>&6
6268
6269 if test "$hardcode_action" = relink; then
6270   # Fast installation is not supported
6271   enable_fast_install=no
6272 elif test "$shlibpath_overrides_runpath" = yes ||
6273      test "$enable_shared" = no; then
6274   # Fast installation is not necessary
6275   enable_fast_install=needless
6276 fi
6277
6278 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
6279 if test "$GCC" = yes; then
6280   variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
6281 fi
6282
6283 if test "x$enable_dlopen" != xyes; then
6284   enable_dlopen=unknown
6285   enable_dlopen_self=unknown
6286   enable_dlopen_self_static=unknown
6287 else
6288   lt_cv_dlopen=no
6289   lt_cv_dlopen_libs=
6290
6291   case $host_os in
6292   beos*)
6293     lt_cv_dlopen="load_add_on"
6294     lt_cv_dlopen_libs=
6295     lt_cv_dlopen_self=yes
6296     ;;
6297
6298   cygwin* | mingw* | pw32*)
6299     lt_cv_dlopen="LoadLibrary"
6300     lt_cv_dlopen_libs=
6301    ;;
6302
6303   *)
6304     echo $ac_n "checking for dllload""... $ac_c" 1>&6
6305 echo "configure:6306: checking for dllload" >&5
6306 if eval "test \"\${ac_cv_func_dllload+set}\" = set"; then
6307   echo $ac_n "(cached) $ac_c" 1>&6
6308 else
6309   cat > conftest.$ac_ext <<EOF
6310 #line 6311 "configure"
6311 #include "confdefs.h"
6312 /* System header to define __stub macros and hopefully few prototypes,
6313     which can conflict with char dllload(); below.  */
6314 #include <assert.h>
6315 /* Override any gcc2 internal prototype to avoid an error.  */
6316 /* We use char because int might match the return type of a gcc2
6317     builtin and then its argument prototype would still apply.  */
6318 char dllload();
6319 char (*f)();
6320
6321 int main() {
6322
6323 /* The GNU C library defines this for functions which it implements
6324     to always fail with ENOSYS.  Some functions are actually named
6325     something starting with __ and the normal name is an alias.  */
6326 #if defined (__stub_dllload) || defined (__stub___dllload)
6327 choke me
6328 #else
6329 f = dllload;
6330 #endif
6331
6332 ; return 0; }
6333 EOF
6334 if { (eval echo configure:6335: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6335   rm -rf conftest*
6336   eval "ac_cv_func_dllload=yes"
6337 else
6338   echo "configure: failed program was:" >&5
6339   cat conftest.$ac_ext >&5
6340   rm -rf conftest*
6341   eval "ac_cv_func_dllload=no"
6342 fi
6343 rm -f conftest*
6344 fi
6345
6346 if eval "test \"`echo '$ac_cv_func_'dllload`\" = yes"; then
6347   echo "$ac_t""yes" 1>&6
6348   lt_cv_dlopen="dllload"
6349 else
6350   echo "$ac_t""no" 1>&6
6351 echo $ac_n "checking for shl_load""... $ac_c" 1>&6
6352 echo "configure:6353: checking for shl_load" >&5
6353 if eval "test \"\${ac_cv_func_shl_load+set}\" = set"; then
6354   echo $ac_n "(cached) $ac_c" 1>&6
6355 else
6356   cat > conftest.$ac_ext <<EOF
6357 #line 6358 "configure"
6358 #include "confdefs.h"
6359 /* System header to define __stub macros and hopefully few prototypes,
6360     which can conflict with char shl_load(); below.  */
6361 #include <assert.h>
6362 /* Override any gcc2 internal prototype to avoid an error.  */
6363 /* We use char because int might match the return type of a gcc2
6364     builtin and then its argument prototype would still apply.  */
6365 char shl_load();
6366 char (*f)();
6367
6368 int main() {
6369
6370 /* The GNU C library defines this for functions which it implements
6371     to always fail with ENOSYS.  Some functions are actually named
6372     something starting with __ and the normal name is an alias.  */
6373 #if defined (__stub_shl_load) || defined (__stub___shl_load)
6374 choke me
6375 #else
6376 f = shl_load;
6377 #endif
6378
6379 ; return 0; }
6380 EOF
6381 if { (eval echo configure:6382: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6382   rm -rf conftest*
6383   eval "ac_cv_func_shl_load=yes"
6384 else
6385   echo "configure: failed program was:" >&5
6386   cat conftest.$ac_ext >&5
6387   rm -rf conftest*
6388   eval "ac_cv_func_shl_load=no"
6389 fi
6390 rm -f conftest*
6391 fi
6392
6393 if eval "test \"`echo '$ac_cv_func_'shl_load`\" = yes"; then
6394   echo "$ac_t""yes" 1>&6
6395   lt_cv_dlopen="shl_load"
6396 else
6397   echo "$ac_t""no" 1>&6
6398 echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
6399 echo "configure:6400: checking for shl_load in -ldld" >&5
6400 ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-:%__p__%'`
6401 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6402   echo $ac_n "(cached) $ac_c" 1>&6
6403 else
6404   ac_save_LIBS="$LIBS"
6405 LIBS="-ldld  $LIBS"
6406 cat > conftest.$ac_ext <<EOF
6407 #line 6408 "configure"
6408 #include "confdefs.h"
6409 /* Override any gcc2 internal prototype to avoid an error.  */
6410 /* We use char because int might match the return type of a gcc2
6411     builtin and then its argument prototype would still apply.  */
6412 char shl_load();
6413
6414 int main() {
6415 shl_load()
6416 ; return 0; }
6417 EOF
6418 if { (eval echo configure:6419: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6419   rm -rf conftest*
6420   eval "ac_cv_lib_$ac_lib_var=yes"
6421 else
6422   echo "configure: failed program was:" >&5
6423   cat conftest.$ac_ext >&5
6424   rm -rf conftest*
6425   eval "ac_cv_lib_$ac_lib_var=no"
6426 fi
6427 rm -f conftest*
6428 LIBS="$ac_save_LIBS"
6429
6430 fi
6431 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6432   echo "$ac_t""yes" 1>&6
6433   lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"
6434 else
6435   echo "$ac_t""no" 1>&6
6436 echo $ac_n "checking for dlopen""... $ac_c" 1>&6
6437 echo "configure:6438: checking for dlopen" >&5
6438 if eval "test \"\${ac_cv_func_dlopen+set}\" = set"; then
6439   echo $ac_n "(cached) $ac_c" 1>&6
6440 else
6441   cat > conftest.$ac_ext <<EOF
6442 #line 6443 "configure"
6443 #include "confdefs.h"
6444 /* System header to define __stub macros and hopefully few prototypes,
6445     which can conflict with char dlopen(); below.  */
6446 #include <assert.h>
6447 /* Override any gcc2 internal prototype to avoid an error.  */
6448 /* We use char because int might match the return type of a gcc2
6449     builtin and then its argument prototype would still apply.  */
6450 char dlopen();
6451 char (*f)();
6452
6453 int main() {
6454
6455 /* The GNU C library defines this for functions which it implements
6456     to always fail with ENOSYS.  Some functions are actually named
6457     something starting with __ and the normal name is an alias.  */
6458 #if defined (__stub_dlopen) || defined (__stub___dlopen)
6459 choke me
6460 #else
6461 f = dlopen;
6462 #endif
6463
6464 ; return 0; }
6465 EOF
6466 if { (eval echo configure:6467: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6467   rm -rf conftest*
6468   eval "ac_cv_func_dlopen=yes"
6469 else
6470   echo "configure: failed program was:" >&5
6471   cat conftest.$ac_ext >&5
6472   rm -rf conftest*
6473   eval "ac_cv_func_dlopen=no"
6474 fi
6475 rm -f conftest*
6476 fi
6477
6478 if eval "test \"`echo '$ac_cv_func_'dlopen`\" = yes"; then
6479   echo "$ac_t""yes" 1>&6
6480   lt_cv_dlopen="dlopen"
6481 else
6482   echo "$ac_t""no" 1>&6
6483 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
6484 echo "configure:6485: checking for dlopen in -ldl" >&5
6485 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-:%__p__%'`
6486 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6487   echo $ac_n "(cached) $ac_c" 1>&6
6488 else
6489   ac_save_LIBS="$LIBS"
6490 LIBS="-ldl  $LIBS"
6491 cat > conftest.$ac_ext <<EOF
6492 #line 6493 "configure"
6493 #include "confdefs.h"
6494 /* Override any gcc2 internal prototype to avoid an error.  */
6495 /* We use char because int might match the return type of a gcc2
6496     builtin and then its argument prototype would still apply.  */
6497 char dlopen();
6498
6499 int main() {
6500 dlopen()
6501 ; return 0; }
6502 EOF
6503 if { (eval echo configure:6504: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6504   rm -rf conftest*
6505   eval "ac_cv_lib_$ac_lib_var=yes"
6506 else
6507   echo "configure: failed program was:" >&5
6508   cat conftest.$ac_ext >&5
6509   rm -rf conftest*
6510   eval "ac_cv_lib_$ac_lib_var=no"
6511 fi
6512 rm -f conftest*
6513 LIBS="$ac_save_LIBS"
6514
6515 fi
6516 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6517   echo "$ac_t""yes" 1>&6
6518   lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
6519 else
6520   echo "$ac_t""no" 1>&6
6521 echo $ac_n "checking for dlopen in -lsvld""... $ac_c" 1>&6
6522 echo "configure:6523: checking for dlopen in -lsvld" >&5
6523 ac_lib_var=`echo svld'_'dlopen | sed 'y%./+-:%__p__%'`
6524 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6525   echo $ac_n "(cached) $ac_c" 1>&6
6526 else
6527   ac_save_LIBS="$LIBS"
6528 LIBS="-lsvld  $LIBS"
6529 cat > conftest.$ac_ext <<EOF
6530 #line 6531 "configure"
6531 #include "confdefs.h"
6532 /* Override any gcc2 internal prototype to avoid an error.  */
6533 /* We use char because int might match the return type of a gcc2
6534     builtin and then its argument prototype would still apply.  */
6535 char dlopen();
6536
6537 int main() {
6538 dlopen()
6539 ; return 0; }
6540 EOF
6541 if { (eval echo configure:6542: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6542   rm -rf conftest*
6543   eval "ac_cv_lib_$ac_lib_var=yes"
6544 else
6545   echo "configure: failed program was:" >&5
6546   cat conftest.$ac_ext >&5
6547   rm -rf conftest*
6548   eval "ac_cv_lib_$ac_lib_var=no"
6549 fi
6550 rm -f conftest*
6551 LIBS="$ac_save_LIBS"
6552
6553 fi
6554 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6555   echo "$ac_t""yes" 1>&6
6556   lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"
6557 else
6558   echo "$ac_t""no" 1>&6
6559 echo $ac_n "checking for dld_link in -ldld""... $ac_c" 1>&6
6560 echo "configure:6561: checking for dld_link in -ldld" >&5
6561 ac_lib_var=`echo dld'_'dld_link | sed 'y%./+-:%__p__%'`
6562 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6563   echo $ac_n "(cached) $ac_c" 1>&6
6564 else
6565   ac_save_LIBS="$LIBS"
6566 LIBS="-ldld  $LIBS"
6567 cat > conftest.$ac_ext <<EOF
6568 #line 6569 "configure"
6569 #include "confdefs.h"
6570 /* Override any gcc2 internal prototype to avoid an error.  */
6571 /* We use char because int might match the return type of a gcc2
6572     builtin and then its argument prototype would still apply.  */
6573 char dld_link();
6574
6575 int main() {
6576 dld_link()
6577 ; return 0; }
6578 EOF
6579 if { (eval echo configure:6580: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6580   rm -rf conftest*
6581   eval "ac_cv_lib_$ac_lib_var=yes"
6582 else
6583   echo "configure: failed program was:" >&5
6584   cat conftest.$ac_ext >&5
6585   rm -rf conftest*
6586   eval "ac_cv_lib_$ac_lib_var=no"
6587 fi
6588 rm -f conftest*
6589 LIBS="$ac_save_LIBS"
6590
6591 fi
6592 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6593   echo "$ac_t""yes" 1>&6
6594   lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"
6595 else
6596   echo "$ac_t""no" 1>&6
6597 fi
6598
6599               
6600 fi
6601
6602             
6603 fi
6604
6605           
6606 fi
6607
6608         
6609 fi
6610
6611       
6612 fi
6613
6614     
6615 fi
6616
6617     ;;
6618   esac
6619
6620   if test "x$lt_cv_dlopen" != xno; then
6621     enable_dlopen=yes
6622   else
6623     enable_dlopen=no
6624   fi
6625
6626   case $lt_cv_dlopen in
6627   dlopen)
6628     save_CPPFLAGS="$CPPFLAGS"
6629         test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
6630
6631     save_LDFLAGS="$LDFLAGS"
6632     eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
6633
6634     save_LIBS="$LIBS"
6635     LIBS="$lt_cv_dlopen_libs $LIBS"
6636
6637     echo $ac_n "checking whether a program can dlopen itself""... $ac_c" 1>&6
6638 echo "configure:6639: checking whether a program can dlopen itself" >&5
6639 if eval "test \"\${lt_cv_dlopen_self+set}\" = set"; then
6640   echo $ac_n "(cached) $ac_c" 1>&6
6641 else
6642           if test "$cross_compiling" = yes; then :
6643   lt_cv_dlopen_self=cross
6644 else
6645     lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
6646   lt_status=$lt_dlunknown
6647   cat > conftest.$ac_ext <<EOF
6648 #line 6649 "configure"
6649 #include "confdefs.h"
6650
6651 #if HAVE_DLFCN_H
6652 #include <dlfcn.h>
6653 #endif
6654
6655 #include <stdio.h>
6656
6657 #ifdef RTLD_GLOBAL
6658 #  define LT_DLGLOBAL           RTLD_GLOBAL
6659 #else
6660 #  ifdef DL_GLOBAL
6661 #    define LT_DLGLOBAL         DL_GLOBAL
6662 #  else
6663 #    define LT_DLGLOBAL         0
6664 #  endif
6665 #endif
6666
6667 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
6668    find out it does not work in some platform. */
6669 #ifndef LT_DLLAZY_OR_NOW
6670 #  ifdef RTLD_LAZY
6671 #    define LT_DLLAZY_OR_NOW            RTLD_LAZY
6672 #  else
6673 #    ifdef DL_LAZY
6674 #      define LT_DLLAZY_OR_NOW          DL_LAZY
6675 #    else
6676 #      ifdef RTLD_NOW
6677 #        define LT_DLLAZY_OR_NOW        RTLD_NOW
6678 #      else
6679 #        ifdef DL_NOW
6680 #          define LT_DLLAZY_OR_NOW      DL_NOW
6681 #        else
6682 #          define LT_DLLAZY_OR_NOW      0
6683 #        endif
6684 #      endif
6685 #    endif
6686 #  endif
6687 #endif
6688
6689 #ifdef __cplusplus
6690 extern "C" void exit (int);
6691 #endif
6692
6693 void fnord() { int i=42;}
6694 int main ()
6695 {
6696   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
6697   int status = $lt_dlunknown;
6698
6699   if (self)
6700     {
6701       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
6702       else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
6703       /* dlclose (self); */
6704     }
6705
6706     exit (status);
6707 }
6708 EOF
6709   if { (eval echo configure:6710: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} 2>/dev/null; then
6710     (./conftest; exit; ) 2>/dev/null
6711     lt_status=$?
6712     case x$lt_status in
6713       x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;;
6714       x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;;
6715       x$lt_unknown|x*) lt_cv_dlopen_self=no ;;
6716     esac
6717   else :
6718     # compilation failed
6719     lt_cv_dlopen_self=no
6720   fi
6721 fi
6722 rm -fr conftest*
6723
6724     
6725 fi
6726
6727 echo "$ac_t""$lt_cv_dlopen_self" 1>&6
6728
6729     if test "x$lt_cv_dlopen_self" = xyes; then
6730       LDFLAGS="$LDFLAGS $link_static_flag"
6731       echo $ac_n "checking whether a statically linked program can dlopen itself""... $ac_c" 1>&6
6732 echo "configure:6733: checking whether a statically linked program can dlopen itself" >&5
6733 if eval "test \"\${lt_cv_dlopen_self_static+set}\" = set"; then
6734   echo $ac_n "(cached) $ac_c" 1>&6
6735 else
6736           if test "$cross_compiling" = yes; then :
6737   lt_cv_dlopen_self_static=cross
6738 else
6739     lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
6740   lt_status=$lt_dlunknown
6741   cat > conftest.$ac_ext <<EOF
6742 #line 6743 "configure"
6743 #include "confdefs.h"
6744
6745 #if HAVE_DLFCN_H
6746 #include <dlfcn.h>
6747 #endif
6748
6749 #include <stdio.h>
6750
6751 #ifdef RTLD_GLOBAL
6752 #  define LT_DLGLOBAL           RTLD_GLOBAL
6753 #else
6754 #  ifdef DL_GLOBAL
6755 #    define LT_DLGLOBAL         DL_GLOBAL
6756 #  else
6757 #    define LT_DLGLOBAL         0
6758 #  endif
6759 #endif
6760
6761 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
6762    find out it does not work in some platform. */
6763 #ifndef LT_DLLAZY_OR_NOW
6764 #  ifdef RTLD_LAZY
6765 #    define LT_DLLAZY_OR_NOW            RTLD_LAZY
6766 #  else
6767 #    ifdef DL_LAZY
6768 #      define LT_DLLAZY_OR_NOW          DL_LAZY
6769 #    else
6770 #      ifdef RTLD_NOW
6771 #        define LT_DLLAZY_OR_NOW        RTLD_NOW
6772 #      else
6773 #        ifdef DL_NOW
6774 #          define LT_DLLAZY_OR_NOW      DL_NOW
6775 #        else
6776 #          define LT_DLLAZY_OR_NOW      0
6777 #        endif
6778 #      endif
6779 #    endif
6780 #  endif
6781 #endif
6782
6783 #ifdef __cplusplus
6784 extern "C" void exit (int);
6785 #endif
6786
6787 void fnord() { int i=42;}
6788 int main ()
6789 {
6790   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
6791   int status = $lt_dlunknown;
6792
6793   if (self)
6794     {
6795       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
6796       else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
6797       /* dlclose (self); */
6798     }
6799
6800     exit (status);
6801 }
6802 EOF
6803   if { (eval echo configure:6804: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} 2>/dev/null; then
6804     (./conftest; exit; ) 2>/dev/null
6805     lt_status=$?
6806     case x$lt_status in
6807       x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;;
6808       x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;;
6809       x$lt_unknown|x*) lt_cv_dlopen_self_static=no ;;
6810     esac
6811   else :
6812     # compilation failed
6813     lt_cv_dlopen_self_static=no
6814   fi
6815 fi
6816 rm -fr conftest*
6817
6818       
6819 fi
6820
6821 echo "$ac_t""$lt_cv_dlopen_self_static" 1>&6
6822     fi
6823
6824     CPPFLAGS="$save_CPPFLAGS"
6825     LDFLAGS="$save_LDFLAGS"
6826     LIBS="$save_LIBS"
6827     ;;
6828   esac
6829
6830   case $lt_cv_dlopen_self in
6831   yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
6832   *) enable_dlopen_self=unknown ;;
6833   esac
6834
6835   case $lt_cv_dlopen_self_static in
6836   yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
6837   *) enable_dlopen_self_static=unknown ;;
6838   esac
6839 fi
6840
6841
6842 if test "$enable_shared" = yes && test "$GCC" = yes; then
6843   case $archive_cmds in
6844   *'~'*)
6845     # FIXME: we may have to deal with multi-command sequences.
6846     ;;
6847   '$CC '*)
6848     # Test whether the compiler implicitly links with -lc since on some
6849     # systems, -lgcc has to come before -lc. If gcc already passes -lc
6850     # to ld, don't add -lc before -lgcc.
6851     echo $ac_n "checking whether -lc should be explicitly linked in""... $ac_c" 1>&6
6852 echo "configure:6853: checking whether -lc should be explicitly linked in" >&5
6853     if eval "test \"\${lt_cv_archive_cmds_need_lc+set}\" = set"; then
6854   echo $ac_n "(cached) $ac_c" 1>&6
6855 else
6856   $rm conftest*
6857     echo 'static int dummy;' > conftest.$ac_ext
6858
6859     if { (eval echo configure:6860: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6860       soname=conftest
6861       lib=conftest
6862       libobjs=conftest.$ac_objext
6863       deplibs=
6864       wl=$lt_cv_prog_cc_wl
6865       compiler_flags=-v
6866       linker_flags=-v
6867       verstring=
6868       output_objdir=.
6869       libname=conftest
6870       save_allow_undefined_flag=$allow_undefined_flag
6871       allow_undefined_flag=
6872       if { (eval echo configure:6873: \"$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; }
6873       then
6874         lt_cv_archive_cmds_need_lc=no
6875       else
6876         lt_cv_archive_cmds_need_lc=yes
6877       fi
6878       allow_undefined_flag=$save_allow_undefined_flag
6879     else
6880       cat conftest.err 1>&5
6881     fi
6882 fi
6883
6884     echo "$ac_t""$lt_cv_archive_cmds_need_lc" 1>&6
6885     ;;
6886   esac
6887 fi
6888 need_lc=${lt_cv_archive_cmds_need_lc-yes}
6889
6890 # The second clause should only fire when bootstrapping the
6891 # libtool distribution, otherwise you forgot to ship ltmain.sh
6892 # with your package, and you will get complaints that there are
6893 # no rules to generate ltmain.sh.
6894 if test -f "$ltmain"; then
6895   :
6896 else
6897   # If there is no Makefile yet, we rely on a make rule to execute
6898   # `config.status --recheck' to rerun these tests and create the
6899   # libtool script then.
6900   test -f Makefile && make "$ltmain"
6901 fi
6902
6903 if test -f "$ltmain"; then
6904   trap "$rm \"${ofile}T\"; exit 1" 1 2 15
6905   $rm -f "${ofile}T"
6906
6907   echo creating $ofile
6908
6909   # Now quote all the things that may contain metacharacters while being
6910   # careful not to overquote the AC_SUBSTed values.  We take copies of the
6911   # variables and quote the copies for generation of the libtool script.
6912   for var in echo old_CC old_CFLAGS SED \
6913     AR AR_FLAGS CC LD LN_S NM SHELL \
6914     reload_flag reload_cmds wl \
6915     pic_flag link_static_flag no_builtin_flag export_dynamic_flag_spec \
6916     thread_safe_flag_spec whole_archive_flag_spec libname_spec \
6917     library_names_spec soname_spec \
6918     RANLIB old_archive_cmds old_archive_from_new_cmds old_postinstall_cmds \
6919     old_postuninstall_cmds archive_cmds archive_expsym_cmds postinstall_cmds \
6920     postuninstall_cmds extract_expsyms_cmds old_archive_from_expsyms_cmds \
6921     old_striplib striplib file_magic_cmd export_symbols_cmds \
6922     deplibs_check_method allow_undefined_flag no_undefined_flag \
6923     finish_cmds finish_eval global_symbol_pipe global_symbol_to_cdecl \
6924     global_symbol_to_c_name_address \
6925     hardcode_libdir_flag_spec hardcode_libdir_separator  \
6926     sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
6927     compiler_c_o compiler_o_lo need_locks exclude_expsyms include_expsyms; do
6928
6929     case $var in
6930     reload_cmds | old_archive_cmds | old_archive_from_new_cmds | \
6931     old_postinstall_cmds | old_postuninstall_cmds | \
6932     export_symbols_cmds | archive_cmds | archive_expsym_cmds | \
6933     extract_expsyms_cmds | old_archive_from_expsyms_cmds | \
6934     postinstall_cmds | postuninstall_cmds | \
6935     finish_cmds | sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
6936       # Double-quote double-evaled strings.
6937       eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
6938       ;;
6939     *)
6940       eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
6941       ;;
6942     esac
6943   done
6944
6945   cat <<__EOF__ > "${ofile}T"
6946 #! $SHELL
6947
6948 # `$echo "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
6949 # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
6950 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
6951 #
6952 # Copyright (C) 1996-2000 Free Software Foundation, Inc.
6953 # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
6954 #
6955 # This program is free software; you can redistribute it and/or modify
6956 # it under the terms of the GNU General Public License as published by
6957 # the Free Software Foundation; either version 2 of the License, or
6958 # (at your option) any later version.
6959 #
6960 # This program is distributed in the hope that it will be useful, but
6961 # WITHOUT ANY WARRANTY; without even the implied warranty of
6962 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
6963 # General Public License for more details.
6964 #
6965 # You should have received a copy of the GNU General Public License
6966 # along with this program; if not, write to the Free Software
6967 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
6968 #
6969 # As a special exception to the GNU General Public License, if you
6970 # distribute this file as part of a program that contains a
6971 # configuration script generated by Autoconf, you may include it under
6972 # the same distribution terms that you use for the rest of that program.
6973
6974 # A sed that does not truncate output.
6975 SED=$lt_SED
6976
6977 # Sed that helps us avoid accidentally triggering echo(1) options like -n.
6978 Xsed="${SED} -e s/^X//"
6979
6980 # The HP-UX ksh and POSIX shell print the target directory to stdout
6981 # if CDPATH is set.
6982 if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
6983
6984 # ### BEGIN LIBTOOL CONFIG
6985
6986 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
6987
6988 # Shell to use when invoking shell scripts.
6989 SHELL=$lt_SHELL
6990
6991 # Whether or not to build shared libraries.
6992 build_libtool_libs=$enable_shared
6993
6994 # Whether or not to build static libraries.
6995 build_old_libs=$enable_static
6996
6997 # Whether or not to add -lc for building shared libraries.
6998 build_libtool_need_lc=$need_lc
6999
7000 # Whether or not to optimize for fast installation.
7001 fast_install=$enable_fast_install
7002
7003 # The host system.
7004 host_alias=$host_alias
7005 host=$host
7006
7007 # An echo program that does not interpret backslashes.
7008 echo=$lt_echo
7009
7010 # The archiver.
7011 AR=$lt_AR
7012 AR_FLAGS=$lt_AR_FLAGS
7013
7014 # The default C compiler.
7015 CC=$lt_CC
7016
7017 # Is the compiler the GNU C compiler?
7018 with_gcc=$GCC
7019
7020 # The linker used to build libraries.
7021 LD=$lt_LD
7022
7023 # Whether we need hard or soft links.
7024 LN_S=$lt_LN_S
7025
7026 # A BSD-compatible nm program.
7027 NM=$lt_NM
7028
7029 # A symbol stripping program
7030 STRIP=$STRIP
7031
7032 # Used to examine libraries when file_magic_cmd begins "file"
7033 MAGIC_CMD=$MAGIC_CMD
7034
7035 # Used on cygwin: DLL creation program.
7036 DLLTOOL="$DLLTOOL"
7037
7038 # Used on cygwin: object dumper.
7039 OBJDUMP="$OBJDUMP"
7040
7041 # Used on cygwin: assembler.
7042 AS="$AS"
7043
7044 # The name of the directory that contains temporary libtool files.
7045 objdir=$objdir
7046
7047 # How to create reloadable object files.
7048 reload_flag=$lt_reload_flag
7049 reload_cmds=$lt_reload_cmds
7050
7051 # How to pass a linker flag through the compiler.
7052 wl=$lt_wl
7053
7054 # Object file suffix (normally "o").
7055 objext="$ac_objext"
7056
7057 # Old archive suffix (normally "a").
7058 libext="$libext"
7059
7060 # Executable file suffix (normally "").
7061 exeext="$exeext"
7062
7063 # Additional compiler flags for building library objects.
7064 pic_flag=$lt_pic_flag
7065 pic_mode=$pic_mode
7066
7067 # Does compiler simultaneously support -c and -o options?
7068 compiler_c_o=$lt_compiler_c_o
7069
7070 # Can we write directly to a .lo ?
7071 compiler_o_lo=$lt_compiler_o_lo
7072
7073 # Must we lock files when doing compilation ?
7074 need_locks=$lt_need_locks
7075
7076 # Do we need the lib prefix for modules?
7077 need_lib_prefix=$need_lib_prefix
7078
7079 # Do we need a version for libraries?
7080 need_version=$need_version
7081
7082 # Whether dlopen is supported.
7083 dlopen_support=$enable_dlopen
7084
7085 # Whether dlopen of programs is supported.
7086 dlopen_self=$enable_dlopen_self
7087
7088 # Whether dlopen of statically linked programs is supported.
7089 dlopen_self_static=$enable_dlopen_self_static
7090
7091 # Compiler flag to prevent dynamic linking.
7092 link_static_flag=$lt_link_static_flag
7093
7094 # Compiler flag to turn off builtin functions.
7095 no_builtin_flag=$lt_no_builtin_flag
7096
7097 # Compiler flag to allow reflexive dlopens.
7098 export_dynamic_flag_spec=$lt_export_dynamic_flag_spec
7099
7100 # Compiler flag to generate shared objects directly from archives.
7101 whole_archive_flag_spec=$lt_whole_archive_flag_spec
7102
7103 # Compiler flag to generate thread-safe objects.
7104 thread_safe_flag_spec=$lt_thread_safe_flag_spec
7105
7106 # Library versioning type.
7107 version_type=$version_type
7108
7109 # Format of library name prefix.
7110 libname_spec=$lt_libname_spec
7111
7112 # List of archive names.  First name is the real one, the rest are links.
7113 # The last name is the one that the linker finds with -lNAME.
7114 library_names_spec=$lt_library_names_spec
7115
7116 # The coded name of the library, if different from the real name.
7117 soname_spec=$lt_soname_spec
7118
7119 # Commands used to build and install an old-style archive.
7120 RANLIB=$lt_RANLIB
7121 old_archive_cmds=$lt_old_archive_cmds
7122 old_postinstall_cmds=$lt_old_postinstall_cmds
7123 old_postuninstall_cmds=$lt_old_postuninstall_cmds
7124
7125 # Create an old-style archive from a shared archive.
7126 old_archive_from_new_cmds=$lt_old_archive_from_new_cmds
7127
7128 # Create a temporary old-style archive to link instead of a shared archive.
7129 old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds
7130
7131 # Commands used to build and install a shared archive.
7132 archive_cmds=$lt_archive_cmds
7133 archive_expsym_cmds=$lt_archive_expsym_cmds
7134 postinstall_cmds=$lt_postinstall_cmds
7135 postuninstall_cmds=$lt_postuninstall_cmds
7136
7137 # Commands to strip libraries.
7138 old_striplib=$lt_old_striplib
7139 striplib=$lt_striplib
7140
7141 # Method to check whether dependent libraries are shared objects.
7142 deplibs_check_method=$lt_deplibs_check_method
7143
7144 # Command to use when deplibs_check_method == file_magic.
7145 file_magic_cmd=$lt_file_magic_cmd
7146
7147 # Flag that allows shared libraries with undefined symbols to be built.
7148 allow_undefined_flag=$lt_allow_undefined_flag
7149
7150 # Flag that forces no undefined symbols.
7151 no_undefined_flag=$lt_no_undefined_flag
7152
7153 # Commands used to finish a libtool library installation in a directory.
7154 finish_cmds=$lt_finish_cmds
7155
7156 # Same as above, but a single script fragment to be evaled but not shown.
7157 finish_eval=$lt_finish_eval
7158
7159 # Take the output of nm and produce a listing of raw symbols and C names.
7160 global_symbol_pipe=$lt_global_symbol_pipe
7161
7162 # Transform the output of nm in a proper C declaration
7163 global_symbol_to_cdecl=$lt_global_symbol_to_cdecl
7164
7165 # Transform the output of nm in a C name address pair
7166 global_symbol_to_c_name_address=$lt_global_symbol_to_c_name_address
7167
7168 # This is the shared library runtime path variable.
7169 runpath_var=$runpath_var
7170
7171 # This is the shared library path variable.
7172 shlibpath_var=$shlibpath_var
7173
7174 # Is shlibpath searched before the hard-coded library search path?
7175 shlibpath_overrides_runpath=$shlibpath_overrides_runpath
7176
7177 # How to hardcode a shared library path into an executable.
7178 hardcode_action=$hardcode_action
7179
7180 # Whether we should hardcode library paths into libraries.
7181 hardcode_into_libs=$hardcode_into_libs
7182
7183 # Flag to hardcode \$libdir into a binary during linking.
7184 # This must work even if \$libdir does not exist.
7185 hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
7186
7187 # Whether we need a single -rpath flag with a separated argument.
7188 hardcode_libdir_separator=$lt_hardcode_libdir_separator
7189
7190 # Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
7191 # resulting binary.
7192 hardcode_direct=$hardcode_direct
7193
7194 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
7195 # resulting binary.
7196 hardcode_minus_L=$hardcode_minus_L
7197
7198 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
7199 # the resulting binary.
7200 hardcode_shlibpath_var=$hardcode_shlibpath_var
7201
7202 # Variables whose values should be saved in libtool wrapper scripts and
7203 # restored at relink time.
7204 variables_saved_for_relink="$variables_saved_for_relink"
7205
7206 # Whether libtool must link a program against all its dependency libraries.
7207 link_all_deplibs=$link_all_deplibs
7208
7209 # Compile-time system search path for libraries
7210 sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
7211
7212 # Run-time system search path for libraries
7213 sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
7214
7215 # Fix the shell variable \$srcfile for the compiler.
7216 fix_srcfile_path="$fix_srcfile_path"
7217
7218 # Set to yes if exported symbols are required.
7219 always_export_symbols=$always_export_symbols
7220
7221 # The commands to list exported symbols.
7222 export_symbols_cmds=$lt_export_symbols_cmds
7223
7224 # The commands to extract the exported symbol list from a shared archive.
7225 extract_expsyms_cmds=$lt_extract_expsyms_cmds
7226
7227 # Symbols that should not be listed in the preloaded symbols.
7228 exclude_expsyms=$lt_exclude_expsyms
7229
7230 # Symbols that must always be exported.
7231 include_expsyms=$lt_include_expsyms
7232
7233 # ### END LIBTOOL CONFIG
7234
7235 __EOF__
7236
7237   case $host_os in
7238   aix3*)
7239     cat <<\EOF >> "${ofile}T"
7240
7241 # AIX sometimes has problems with the GCC collect2 program.  For some
7242 # reason, if we set the COLLECT_NAMES environment variable, the problems
7243 # vanish in a puff of smoke.
7244 if test "X${COLLECT_NAMES+set}" != Xset; then
7245   COLLECT_NAMES=
7246   export COLLECT_NAMES
7247 fi
7248 EOF
7249     ;;
7250   esac
7251
7252   case $host_os in
7253   cygwin* | mingw* | pw32* | os2*)
7254     cat <<'EOF' >> "${ofile}T"
7255       # This is a source program that is used to create dlls on Windows
7256       # Don't remove nor modify the starting and closing comments
7257 # /* ltdll.c starts here */
7258 # #define WIN32_LEAN_AND_MEAN
7259 # #include <windows.h>
7260 # #undef WIN32_LEAN_AND_MEAN
7261 # #include <stdio.h>
7262 #
7263 # #ifndef __CYGWIN__
7264 # #  ifdef __CYGWIN32__
7265 # #    define __CYGWIN__ __CYGWIN32__
7266 # #  endif
7267 # #endif
7268 #
7269 # #ifdef __cplusplus
7270 # extern "C" {
7271 # #endif
7272 # BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
7273 # #ifdef __cplusplus
7274 # }
7275 # #endif
7276 #
7277 # #ifdef __CYGWIN__
7278 # #include <cygwin/cygwin_dll.h>
7279 # DECLARE_CYGWIN_DLL( DllMain );
7280 # #endif
7281 # HINSTANCE __hDllInstance_base;
7282 #
7283 # BOOL APIENTRY
7284 # DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
7285 # {
7286 #   __hDllInstance_base = hInst;
7287 #   return TRUE;
7288 # }
7289 # /* ltdll.c ends here */
7290         # This is a source program that is used to create import libraries
7291         # on Windows for dlls which lack them. Don't remove nor modify the
7292         # starting and closing comments
7293 # /* impgen.c starts here */
7294 # /*   Copyright (C) 1999-2000 Free Software Foundation, Inc.
7295 #
7296 #  This file is part of GNU libtool.
7297 #
7298 #  This program is free software; you can redistribute it and/or modify
7299 #  it under the terms of the GNU General Public License as published by
7300 #  the Free Software Foundation; either version 2 of the License, or
7301 #  (at your option) any later version.
7302 #
7303 #  This program is distributed in the hope that it will be useful,
7304 #  but WITHOUT ANY WARRANTY; without even the implied warranty of
7305 #  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
7306 #  GNU General Public License for more details.
7307 #
7308 #  You should have received a copy of the GNU General Public License
7309 #  along with this program; if not, write to the Free Software
7310 #  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
7311 #  */
7312 #
7313 # #include <stdio.h>            /* for printf() */
7314 # #include <unistd.h>           /* for open(), lseek(), read() */
7315 # #include <fcntl.h>            /* for O_RDONLY, O_BINARY */
7316 # #include <string.h>           /* for strdup() */
7317 #
7318 # /* O_BINARY isn't required (or even defined sometimes) under Unix */
7319 # #ifndef O_BINARY
7320 # #define O_BINARY 0
7321 # #endif
7322 #
7323 # static unsigned int
7324 # pe_get16 (fd, offset)
7325 #      int fd;
7326 #      int offset;
7327 # {
7328 #   unsigned char b[2];
7329 #   lseek (fd, offset, SEEK_SET);
7330 #   read (fd, b, 2);
7331 #   return b[0] + (b[1]<<8);
7332 # }
7333 #
7334 # static unsigned int
7335 # pe_get32 (fd, offset)
7336 #     int fd;
7337 #     int offset;
7338 # {
7339 #   unsigned char b[4];
7340 #   lseek (fd, offset, SEEK_SET);
7341 #   read (fd, b, 4);
7342 #   return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
7343 # }
7344 #
7345 # static unsigned int
7346 # pe_as32 (ptr)
7347 #      void *ptr;
7348 # {
7349 #   unsigned char *b = ptr;
7350 #   return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
7351 # }
7352 #
7353 # int
7354 # main (argc, argv)
7355 #     int argc;
7356 #     char *argv[];
7357 # {
7358 #     int dll;
7359 #     unsigned long pe_header_offset, opthdr_ofs, num_entries, i;
7360 #     unsigned long export_rva, export_size, nsections, secptr, expptr;
7361 #     unsigned long name_rvas, nexp;
7362 #     unsigned char *expdata, *erva;
7363 #     char *filename, *dll_name;
7364 #
7365 #     filename = argv[1];
7366 #
7367 #     dll = open(filename, O_RDONLY|O_BINARY);
7368 #     if (dll < 1)
7369 #       return 1;
7370 #
7371 #     dll_name = filename;
7372 #
7373 #     for (i=0; filename[i]; i++)
7374 #       if (filename[i] == '/' || filename[i] == '\\'  || filename[i] == ':')
7375 #           dll_name = filename + i +1;
7376 #
7377 #     pe_header_offset = pe_get32 (dll, 0x3c);
7378 #     opthdr_ofs = pe_header_offset + 4 + 20;
7379 #     num_entries = pe_get32 (dll, opthdr_ofs + 92);
7380 #
7381 #     if (num_entries < 1) /* no exports */
7382 #       return 1;
7383 #
7384 #     export_rva = pe_get32 (dll, opthdr_ofs + 96);
7385 #     export_size = pe_get32 (dll, opthdr_ofs + 100);
7386 #     nsections = pe_get16 (dll, pe_header_offset + 4 +2);
7387 #     secptr = (pe_header_offset + 4 + 20 +
7388 #             pe_get16 (dll, pe_header_offset + 4 + 16));
7389 #
7390 #     expptr = 0;
7391 #     for (i = 0; i < nsections; i++)
7392 #     {
7393 #       char sname[8];
7394 #       unsigned long secptr1 = secptr + 40 * i;
7395 #       unsigned long vaddr = pe_get32 (dll, secptr1 + 12);
7396 #       unsigned long vsize = pe_get32 (dll, secptr1 + 16);
7397 #       unsigned long fptr = pe_get32 (dll, secptr1 + 20);
7398 #       lseek(dll, secptr1, SEEK_SET);
7399 #       read(dll, sname, 8);
7400 #       if (vaddr <= export_rva && vaddr+vsize > export_rva)
7401 #       {
7402 #           expptr = fptr + (export_rva - vaddr);
7403 #           if (export_rva + export_size > vaddr + vsize)
7404 #               export_size = vsize - (export_rva - vaddr);
7405 #           break;
7406 #       }
7407 #     }
7408 #
7409 #     expdata = (unsigned char*)malloc(export_size);
7410 #     lseek (dll, expptr, SEEK_SET);
7411 #     read (dll, expdata, export_size);
7412 #     erva = expdata - export_rva;
7413 #
7414 #     nexp = pe_as32 (expdata+24);
7415 #     name_rvas = pe_as32 (expdata+32);
7416 #
7417 #     printf ("EXPORTS\n");
7418 #     for (i = 0; i<nexp; i++)
7419 #     {
7420 #       unsigned long name_rva = pe_as32 (erva+name_rvas+i*4);
7421 #       printf ("\t%s @ %ld ;\n", erva+name_rva, 1+ i);
7422 #     }
7423 #
7424 #     return 0;
7425 # }
7426 # /* impgen.c ends here */
7427
7428 EOF
7429     ;;
7430   esac
7431
7432   # We use sed instead of cat because bash on DJGPP gets confused if
7433   # if finds mixed CR/LF and LF-only lines.  Since sed operates in
7434   # text mode, it properly converts lines to CR/LF.  This bash problem
7435   # is reportedly fixed, but why not run on old versions too?
7436   sed '$q' "$ltmain" >> "${ofile}T" || (rm -f "${ofile}T"; exit 1)
7437
7438   mv -f "${ofile}T" "$ofile" || \
7439     (rm -f "$ofile" && cp "${ofile}T" "$ofile" && rm -f "${ofile}T")
7440   chmod +x "$ofile"
7441 fi
7442
7443
7444
7445
7446
7447 # This can be used to rebuild libtool when needed
7448 LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
7449
7450 # Always use our own libtool.
7451 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
7452
7453 # Prevent multiple expansion
7454
7455
7456
7457 # test for ln hardlink support
7458 echo $ac_n "checking whether ln works""... $ac_c" 1>&6
7459 echo "configure:7460: checking whether ln works" >&5
7460 if eval "test \"\${ol_cv_prog_LN_H+set}\" = set"; then
7461   echo $ac_n "(cached) $ac_c" 1>&6
7462 else
7463   rm -f conftest.src conftest.dst
7464 echo "conftest" > conftest.src
7465 if ln conftest.src conftest.dst 2>/dev/null
7466 then
7467   ol_cv_prog_LN_H="ln"
7468 else
7469   ol_cv_prog_LN_H="cp"
7470 fi
7471 rm -f conftest.src conftest.dst
7472
7473 fi
7474 LN_H="$ol_cv_prog_LN_H"
7475 if test "$ol_cv_prog_LN_H" = "ln"; then
7476         echo "$ac_t""yes" 1>&6
7477 else
7478         echo "$ac_t""no" 1>&6
7479 fi
7480
7481 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
7482 echo "configure:7483: checking whether ln -s works" >&5
7483 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
7484   echo $ac_n "(cached) $ac_c" 1>&6
7485 else
7486   rm -f conftestdata
7487 if ln -s X conftestdata 2>/dev/null
7488 then
7489   rm -f conftestdata
7490   ac_cv_prog_LN_S="ln -s"
7491 else
7492   ac_cv_prog_LN_S=ln
7493 fi
7494 fi
7495 LN_S="$ac_cv_prog_LN_S"
7496 if test "$ac_cv_prog_LN_S" = "ln -s"; then
7497   echo "$ac_t""yes" 1>&6
7498 else
7499   echo "$ac_t""no" 1>&6
7500 fi
7501
7502
7503 ol_link_perl=no
7504 if test $ol_enable_perl != no ; then
7505         # Extract the first word of "perl", so it can be a program name with args.
7506 set dummy perl; ac_word=$2
7507 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
7508 echo "configure:7509: checking for $ac_word" >&5
7509 if eval "test \"\${ac_cv_path_PERLBIN+set}\" = set"; then
7510   echo $ac_n "(cached) $ac_c" 1>&6
7511 else
7512   case "$PERLBIN" in
7513   /*)
7514   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a path.
7515   ;;
7516   ?:/*)
7517   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a dos path.
7518   ;;
7519   *)
7520   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
7521   ac_dummy="$PATH"
7522   for ac_dir in $ac_dummy; do 
7523     test -z "$ac_dir" && ac_dir=.
7524     if test -f $ac_dir/$ac_word; then
7525       ac_cv_path_PERLBIN="$ac_dir/$ac_word"
7526       break
7527     fi
7528   done
7529   IFS="$ac_save_ifs"
7530   test -z "$ac_cv_path_PERLBIN" && ac_cv_path_PERLBIN="/usr/bin/perl"
7531   ;;
7532 esac
7533 fi
7534 PERLBIN="$ac_cv_path_PERLBIN"
7535 if test -n "$PERLBIN"; then
7536   echo "$ac_t""$PERLBIN" 1>&6
7537 else
7538   echo "$ac_t""no" 1>&6
7539 fi
7540
7541
7542         if test "no$PERLBIN" = "no" ; then
7543                 if test $ol_enable_perl = yes ; then
7544                         { echo "configure: error: could not locate perl" 1>&2; exit 1; }
7545                 fi
7546
7547         else
7548                 PERL_CPPFLAGS="`$PERLBIN -MExtUtils::Embed -e ccopts`"
7549                 PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e 's/ -lc / /' -e 's/ -lc$//'`"
7550
7551                 if test x"$ol_enable_perl" = "xyes" ; then
7552                         SLAPD_PERL_LDFLAGS="$PERL_LDFLAGS"
7553                 else
7554                         MOD_PERL_LDFLAGS="$PERL_LDFLAGS"
7555                 fi
7556                                 ol_link_perl=yes
7557         fi
7558 fi
7559
7560 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
7561 echo "configure:7562: checking how to run the C preprocessor" >&5
7562 # On Suns, sometimes $CPP names a directory.
7563 if test -n "$CPP" && test -d "$CPP"; then
7564   CPP=
7565 fi
7566 if test -z "$CPP"; then
7567 if eval "test \"\${ac_cv_prog_CPP+set}\" = set"; then
7568   echo $ac_n "(cached) $ac_c" 1>&6
7569 else
7570     # This must be in double quotes, not single quotes, because CPP may get
7571   # substituted into the Makefile and "${CC-cc}" will confuse make.
7572   CPP="${CC-cc} -E"
7573   # On the NeXT, cc -E runs the code through the compiler's parser,
7574   # not just through cpp.
7575   cat > conftest.$ac_ext <<EOF
7576 #line 7577 "configure"
7577 #include "confdefs.h"
7578 #include <assert.h>
7579 Syntax Error
7580 EOF
7581 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7582 { (eval echo configure:7583: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7583 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7584 if test -z "$ac_err"; then
7585   :
7586 else
7587   echo "$ac_err" >&5
7588   echo "configure: failed program was:" >&5
7589   cat conftest.$ac_ext >&5
7590   rm -rf conftest*
7591   CPP="${CC-cc} -E -traditional-cpp"
7592   cat > conftest.$ac_ext <<EOF
7593 #line 7594 "configure"
7594 #include "confdefs.h"
7595 #include <assert.h>
7596 Syntax Error
7597 EOF
7598 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7599 { (eval echo configure:7600: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7600 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7601 if test -z "$ac_err"; then
7602   :
7603 else
7604   echo "$ac_err" >&5
7605   echo "configure: failed program was:" >&5
7606   cat conftest.$ac_ext >&5
7607   rm -rf conftest*
7608   CPP="${CC-cc} -nologo -E"
7609   cat > conftest.$ac_ext <<EOF
7610 #line 7611 "configure"
7611 #include "confdefs.h"
7612 #include <assert.h>
7613 Syntax Error
7614 EOF
7615 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7616 { (eval echo configure:7617: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7617 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7618 if test -z "$ac_err"; then
7619   :
7620 else
7621   echo "$ac_err" >&5
7622   echo "configure: failed program was:" >&5
7623   cat conftest.$ac_ext >&5
7624   rm -rf conftest*
7625   CPP=/lib/cpp
7626 fi
7627 rm -f conftest*
7628 fi
7629 rm -f conftest*
7630 fi
7631 rm -f conftest*
7632   ac_cv_prog_CPP="$CPP"
7633 fi
7634   CPP="$ac_cv_prog_CPP"
7635 else
7636   ac_cv_prog_CPP="$CPP"
7637 fi
7638 echo "$ac_t""$CPP" 1>&6
7639
7640
7641
7642 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
7643 echo "configure:7644: checking for Cygwin environment" >&5
7644 if eval "test \"\${ac_cv_cygwin+set}\" = set"; then
7645   echo $ac_n "(cached) $ac_c" 1>&6
7646 else
7647   cat > conftest.$ac_ext <<EOF
7648 #line 7649 "configure"
7649 #include "confdefs.h"
7650
7651 int main() {
7652
7653 #ifndef __CYGWIN__
7654 #define __CYGWIN__ __CYGWIN32__
7655 #endif
7656 return __CYGWIN__;
7657 ; return 0; }
7658 EOF
7659 if { (eval echo configure:7660: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7660   rm -rf conftest*
7661   ac_cv_cygwin=yes
7662 else
7663   echo "configure: failed program was:" >&5
7664   cat conftest.$ac_ext >&5
7665   rm -rf conftest*
7666   ac_cv_cygwin=no
7667 fi
7668 rm -f conftest*
7669 fi
7670
7671 echo "$ac_t""$ac_cv_cygwin" 1>&6
7672 CYGWIN=
7673 test "$ac_cv_cygwin" = yes && CYGWIN=yes
7674 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
7675 echo "configure:7676: checking for mingw32 environment" >&5
7676 if eval "test \"\${ac_cv_mingw32+set}\" = set"; then
7677   echo $ac_n "(cached) $ac_c" 1>&6
7678 else
7679   cat > conftest.$ac_ext <<EOF
7680 #line 7681 "configure"
7681 #include "confdefs.h"
7682
7683 int main() {
7684 return __MINGW32__;
7685 ; return 0; }
7686 EOF
7687 if { (eval echo configure:7688: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7688   rm -rf conftest*
7689   ac_cv_mingw32=yes
7690 else
7691   echo "configure: failed program was:" >&5
7692   cat conftest.$ac_ext >&5
7693   rm -rf conftest*
7694   ac_cv_mingw32=no
7695 fi
7696 rm -f conftest*
7697 fi
7698
7699 echo "$ac_t""$ac_cv_mingw32" 1>&6
7700 MINGW32=
7701 test "$ac_cv_mingw32" = yes && MINGW32=yes
7702
7703
7704
7705 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
7706 echo "configure:7707: checking for executable suffix" >&5
7707 if eval "test \"\${ac_cv_exeext+set}\" = set"; then
7708   echo $ac_n "(cached) $ac_c" 1>&6
7709 else
7710   if test "$CYGWIN" = yes || test "$MINGW32" = yes || test "$EMXOS2" = yes; then
7711   ac_cv_exeext=.exe
7712 else
7713   rm -f conftest*
7714   echo 'int main () { return 0; }' > conftest.$ac_ext
7715   ac_cv_exeext=
7716   if { (eval echo configure:7717: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
7717     for file in conftest.*; do
7718       case $file in
7719       *.c | *.C | *.o | *.obj | *.xcoff) ;;
7720       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
7721       esac
7722     done
7723   else
7724     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
7725   fi
7726   rm -f conftest*
7727   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
7728 fi
7729 fi
7730
7731 EXEEXT=""
7732 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
7733 echo "$ac_t""${ac_cv_exeext}" 1>&6
7734 ac_exeext=$EXEEXT
7735
7736 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
7737 echo "configure:7738: checking for object suffix" >&5
7738 if eval "test \"\${ac_cv_objext+set}\" = set"; then
7739   echo $ac_n "(cached) $ac_c" 1>&6
7740 else
7741   rm -f conftest*
7742 echo 'int i = 1;' > conftest.$ac_ext
7743 if { (eval echo configure:7744: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7744   for ac_file in conftest.*; do
7745     case $ac_file in
7746     *.c) ;;
7747     *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
7748     esac
7749   done
7750 else
7751   { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
7752 fi
7753 rm -f conftest*
7754 fi
7755
7756 echo "$ac_t""$ac_cv_objext" 1>&6
7757 OBJEXT=$ac_cv_objext
7758 ac_objext=$ac_cv_objext
7759
7760
7761 cat >> confdefs.h <<EOF
7762 #define EXEEXT "${EXEEXT}"
7763 EOF
7764
7765
7766 echo $ac_n "checking for be_app in -lbe""... $ac_c" 1>&6
7767 echo "configure:7768: checking for be_app in -lbe" >&5
7768 ac_lib_var=`echo be'_'be_app | sed 'y%./+-:%__p__%'`
7769 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
7770   echo $ac_n "(cached) $ac_c" 1>&6
7771 else
7772   ac_save_LIBS="$LIBS"
7773 LIBS="-lbe -lroot -lnet $LIBS"
7774 cat > conftest.$ac_ext <<EOF
7775 #line 7776 "configure"
7776 #include "confdefs.h"
7777 /* Override any gcc2 internal prototype to avoid an error.  */
7778 /* We use char because int might match the return type of a gcc2
7779     builtin and then its argument prototype would still apply.  */
7780 char be_app();
7781
7782 int main() {
7783 be_app()
7784 ; return 0; }
7785 EOF
7786 if { (eval echo configure:7787: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7787   rm -rf conftest*
7788   eval "ac_cv_lib_$ac_lib_var=yes"
7789 else
7790   echo "configure: failed program was:" >&5
7791   cat conftest.$ac_ext >&5
7792   rm -rf conftest*
7793   eval "ac_cv_lib_$ac_lib_var=no"
7794 fi
7795 rm -f conftest*
7796 LIBS="$ac_save_LIBS"
7797
7798 fi
7799 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7800   echo "$ac_t""yes" 1>&6
7801   LIBS="$LIBS -lbe -lroot -lnet"
7802 else
7803   echo "$ac_t""no" 1>&6
7804 :
7805 fi
7806
7807
7808
7809
7810
7811 echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
7812 echo "configure:7813: checking for ${CC-cc} option to accept ANSI C" >&5
7813 if eval "test \"\${am_cv_prog_cc_stdc+set}\" = set"; then
7814   echo $ac_n "(cached) $ac_c" 1>&6
7815 else
7816   am_cv_prog_cc_stdc=no
7817 ac_save_CC="$CC"
7818 # Don't try gcc -ansi; that turns off useful extensions and
7819 # breaks some systems' header files.
7820 # AIX                   -qlanglvl=ansi
7821 # Ultrix and OSF/1      -std1
7822 # HP-UX 10.20 and later -Ae
7823 # HP-UX older versions  -Aa -D_HPUX_SOURCE
7824 # SVR4                  -Xc -D__EXTENSIONS__
7825 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
7826 do
7827   CC="$ac_save_CC $ac_arg"
7828   cat > conftest.$ac_ext <<EOF
7829 #line 7830 "configure"
7830 #include "confdefs.h"
7831 #include <stdarg.h>
7832 #include <stdio.h>
7833 #include <sys/types.h>
7834 #include <sys/stat.h>
7835 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
7836 struct buf { int x; };
7837 FILE * (*rcsopen) (struct buf *, struct stat *, int);
7838 static char *e (p, i)
7839      char **p;
7840      int i;
7841 {
7842   return p[i];
7843 }
7844 static char *f (char * (*g) (char **, int), char **p, ...)
7845 {
7846   char *s;
7847   va_list v;
7848   va_start (v,p);
7849   s = g (p, va_arg (v,int));
7850   va_end (v);
7851   return s;
7852 }
7853 int test (int i, double x);
7854 struct s1 {int (*f) (int a);};
7855 struct s2 {int (*f) (double a);};
7856 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
7857 int argc;
7858 char **argv;
7859
7860 int main() {
7861
7862 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
7863
7864 ; return 0; }
7865 EOF
7866 if { (eval echo configure:7867: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7867   rm -rf conftest*
7868   am_cv_prog_cc_stdc="$ac_arg"; break
7869 else
7870   echo "configure: failed program was:" >&5
7871   cat conftest.$ac_ext >&5
7872 fi
7873 rm -f conftest*
7874 done
7875 CC="$ac_save_CC"
7876
7877 fi
7878
7879 if test -z "$am_cv_prog_cc_stdc"; then
7880   echo "$ac_t""none needed" 1>&6
7881 else
7882   echo "$ac_t""$am_cv_prog_cc_stdc" 1>&6
7883 fi
7884 case "x$am_cv_prog_cc_stdc" in
7885   x|xno) ;;
7886   *) CC="$CC $am_cv_prog_cc_stdc" ;;
7887 esac
7888
7889 if test "X${am_cv_prog_cc_stdc}" = "Xno" ; then
7890         { echo "configure: error: OpenLDAP requires compiler to support STDC constructs." 1>&2; exit 1; }
7891 fi
7892
7893 # test for make depend flag
7894 OL_MKDEP=
7895 OL_MKDEP_FLAGS=
7896 if test -z "${MKDEP}"; then
7897         OL_MKDEP="${CC-cc}"
7898         if test -z "${MKDEP_FLAGS}"; then
7899                 echo $ac_n "checking for ${OL_MKDEP} depend flag""... $ac_c" 1>&6
7900 echo "configure:7901: checking for ${OL_MKDEP} depend flag" >&5
7901 if eval "test \"\${ol_cv_mkdep+set}\" = set"; then
7902   echo $ac_n "(cached) $ac_c" 1>&6
7903 else
7904   
7905                         ol_cv_mkdep=no
7906                         for flag in "-M" "-xM"; do
7907                                 cat > conftest.c <<EOF
7908  noCode;
7909 EOF
7910                                 if { ac_try='$OL_MKDEP $flag conftest.c'; { (eval echo configure:7911: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } \
7911                                         | egrep '^conftest\.'"${ac_objext}" >/dev/null 2>&1
7912                                 then
7913                                         if test ! -f conftest."${ac_object}" ; then
7914                                                 ol_cv_mkdep=$flag
7915                                                 OL_MKDEP_FLAGS="$flag"
7916                                                 break
7917                                         fi
7918                                 fi
7919                         done
7920                         rm -f conftest*
7921                 
7922 fi
7923
7924 echo "$ac_t""$ol_cv_mkdep" 1>&6
7925         else
7926                 cc_cv_mkdep=yes
7927                 OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
7928         fi
7929 else
7930         cc_cv_mkdep=yes
7931         OL_MKDEP="${MKDEP}"
7932         OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
7933 fi
7934
7935
7936
7937 if test "${ol_cv_mkdep}" = no ; then
7938         # this will soon become an error
7939         echo "configure: warning: do not know how to generate dependencies" 1>&2
7940 fi
7941
7942 echo $ac_n "checking for afopen in -ls""... $ac_c" 1>&6
7943 echo "configure:7944: checking for afopen in -ls" >&5
7944 ac_lib_var=`echo s'_'afopen | sed 'y%./+-:%__p__%'`
7945 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
7946   echo $ac_n "(cached) $ac_c" 1>&6
7947 else
7948   ac_save_LIBS="$LIBS"
7949 LIBS="-ls  $LIBS"
7950 cat > conftest.$ac_ext <<EOF
7951 #line 7952 "configure"
7952 #include "confdefs.h"
7953 /* Override any gcc2 internal prototype to avoid an error.  */
7954 /* We use char because int might match the return type of a gcc2
7955     builtin and then its argument prototype would still apply.  */
7956 char afopen();
7957
7958 int main() {
7959 afopen()
7960 ; return 0; }
7961 EOF
7962 if { (eval echo configure:7963: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7963   rm -rf conftest*
7964   eval "ac_cv_lib_$ac_lib_var=yes"
7965 else
7966   echo "configure: failed program was:" >&5
7967   cat conftest.$ac_ext >&5
7968   rm -rf conftest*
7969   eval "ac_cv_lib_$ac_lib_var=no"
7970 fi
7971 rm -f conftest*
7972 LIBS="$ac_save_LIBS"
7973
7974 fi
7975 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7976   echo "$ac_t""yes" 1>&6
7977   
7978         AUTH_LIBS=-ls
7979         cat >> confdefs.h <<\EOF
7980 #define HAVE_AIX_SECURITY 1
7981 EOF
7982
7983
7984 else
7985   echo "$ac_t""no" 1>&6
7986 fi
7987
7988
7989 case "$target" in
7990 *-ibm-openedition)
7991         ac_cv_func_getopt=no
7992         cat >> confdefs.h <<\EOF
7993 #define BOTH_STRINGS_H 1
7994 EOF
7995
7996         ;;
7997 esac
7998
7999 ol_link_modules=no
8000 if test $ol_enable_modules != no ; then
8001         for ac_hdr in ltdl.h
8002 do
8003 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8004 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8005 echo "configure:8006: checking for $ac_hdr" >&5
8006 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
8007   echo $ac_n "(cached) $ac_c" 1>&6
8008 else
8009   cat > conftest.$ac_ext <<EOF
8010 #line 8011 "configure"
8011 #include "confdefs.h"
8012 #include <$ac_hdr>
8013 EOF
8014 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8015 { (eval echo configure:8016: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8016 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8017 if test -z "$ac_err"; then
8018   rm -rf conftest*
8019   eval "ac_cv_header_$ac_safe=yes"
8020 else
8021   echo "$ac_err" >&5
8022   echo "configure: failed program was:" >&5
8023   cat conftest.$ac_ext >&5
8024   rm -rf conftest*
8025   eval "ac_cv_header_$ac_safe=no"
8026 fi
8027 rm -f conftest*
8028 fi
8029 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8030   echo "$ac_t""yes" 1>&6
8031     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8032   cat >> confdefs.h <<EOF
8033 #define $ac_tr_hdr 1
8034 EOF
8035  
8036 else
8037   echo "$ac_t""no" 1>&6
8038 fi
8039 done
8040
8041
8042         if test $ac_cv_header_ltdl_h = no ; then
8043                 { echo "configure: error: could not locate libtool ltdl.h" 1>&2; exit 1; }
8044         fi
8045
8046         echo $ac_n "checking for lt_dlinit in -lltdl""... $ac_c" 1>&6
8047 echo "configure:8048: checking for lt_dlinit in -lltdl" >&5
8048 ac_lib_var=`echo ltdl'_'lt_dlinit | sed 'y%./+-:%__p__%'`
8049 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8050   echo $ac_n "(cached) $ac_c" 1>&6
8051 else
8052   ac_save_LIBS="$LIBS"
8053 LIBS="-lltdl  $LIBS"
8054 cat > conftest.$ac_ext <<EOF
8055 #line 8056 "configure"
8056 #include "confdefs.h"
8057 /* Override any gcc2 internal prototype to avoid an error.  */
8058 /* We use char because int might match the return type of a gcc2
8059     builtin and then its argument prototype would still apply.  */
8060 char lt_dlinit();
8061
8062 int main() {
8063 lt_dlinit()
8064 ; return 0; }
8065 EOF
8066 if { (eval echo configure:8067: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8067   rm -rf conftest*
8068   eval "ac_cv_lib_$ac_lib_var=yes"
8069 else
8070   echo "configure: failed program was:" >&5
8071   cat conftest.$ac_ext >&5
8072   rm -rf conftest*
8073   eval "ac_cv_lib_$ac_lib_var=no"
8074 fi
8075 rm -f conftest*
8076 LIBS="$ac_save_LIBS"
8077
8078 fi
8079 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8080   echo "$ac_t""yes" 1>&6
8081   
8082                 MODULES_LIBS=-lltdl
8083                 cat >> confdefs.h <<\EOF
8084 #define HAVE_LIBLTDL 1
8085 EOF
8086
8087         
8088 else
8089   echo "$ac_t""no" 1>&6
8090 fi
8091
8092
8093         if test "$ac_cv_lib_ltdl_lt_dlinit" = no ; then
8094                 { echo "configure: error: could not locate libtool -lltdl" 1>&2; exit 1; }
8095         fi
8096         ol_link_modules=yes
8097
8098 else
8099         for i in $Backends; do
8100                 eval "ol_tmp=\$ol_enable_$i"
8101                 if test $ol_tmp = mod ; then
8102                         echo "configure: warning: building static $i backend" 1>&2
8103                         eval "ol_enable_$i=yes"
8104                 fi
8105         done
8106         for i in $Overlays; do
8107                 eval "ol_tmp=\$ol_enable_$i"
8108                 if test $ol_tmp = mod ; then
8109                         echo "configure: warning: building static $i overlay" 1>&2
8110                         eval "ol_enable_$i=yes"
8111                 fi
8112         done
8113 fi
8114
8115 # test for EBCDIC
8116 echo $ac_n "checking for EBCDIC""... $ac_c" 1>&6
8117 echo "configure:8118: checking for EBCDIC" >&5
8118 if eval "test \"\${ol_cv_cpp_ebcdic+set}\" = set"; then
8119   echo $ac_n "(cached) $ac_c" 1>&6
8120 else
8121   
8122         cat > conftest.$ac_ext <<EOF
8123 #line 8124 "configure"
8124 #include "confdefs.h"
8125
8126 #if !('M' == 0xd4)
8127 #include <__ASCII__/generate_error.h>
8128 #endif
8129
8130 EOF
8131 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8132 { (eval echo configure:8133: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8133 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8134 if test -z "$ac_err"; then
8135   rm -rf conftest*
8136   ol_cv_cpp_ebcdic=yes
8137 else
8138   echo "$ac_err" >&5
8139   echo "configure: failed program was:" >&5
8140   cat conftest.$ac_ext >&5
8141   rm -rf conftest*
8142   ol_cv_cpp_ebcdic=no
8143 fi
8144 rm -f conftest*
8145 fi
8146
8147 echo "$ac_t""$ol_cv_cpp_ebcdic" 1>&6
8148 if test $ol_cv_cpp_ebcdic = yes ; then
8149         cat >> confdefs.h <<\EOF
8150 #define HAVE_EBCDIC 1
8151 EOF
8152
8153 fi
8154
8155 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
8156 echo "configure:8157: checking for ANSI C header files" >&5
8157 if eval "test \"\${ol_cv_header_stdc+set}\" = set"; then
8158   echo $ac_n "(cached) $ac_c" 1>&6
8159 else
8160   cat > conftest.$ac_ext <<EOF
8161 #line 8162 "configure"
8162 #include "confdefs.h"
8163 #include <stdlib.h>
8164 #include <stdarg.h>
8165 #include <string.h>
8166 #include <float.h>
8167 EOF
8168 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8169 { (eval echo configure:8170: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8170 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8171 if test -z "$ac_err"; then
8172   rm -rf conftest*
8173   ol_cv_header_stdc=yes
8174 else
8175   echo "$ac_err" >&5
8176   echo "configure: failed program was:" >&5
8177   cat conftest.$ac_ext >&5
8178   rm -rf conftest*
8179   ol_cv_header_stdc=no
8180 fi
8181 rm -f conftest*
8182
8183 if test $ol_cv_header_stdc = yes; then
8184   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
8185 cat > conftest.$ac_ext <<EOF
8186 #line 8187 "configure"
8187 #include "confdefs.h"
8188 #include <string.h>
8189 EOF
8190 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8191   egrep "memchr" >/dev/null 2>&1; then
8192   :
8193 else
8194   rm -rf conftest*
8195   ol_cv_header_stdc=no
8196 fi
8197 rm -f conftest*
8198
8199 fi
8200
8201 if test $ol_cv_header_stdc = yes; then
8202   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
8203 cat > conftest.$ac_ext <<EOF
8204 #line 8205 "configure"
8205 #include "confdefs.h"
8206 #include <stdlib.h>
8207 EOF
8208 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8209   egrep "free" >/dev/null 2>&1; then
8210   :
8211 else
8212   rm -rf conftest*
8213   ol_cv_header_stdc=no
8214 fi
8215 rm -f conftest*
8216
8217 fi
8218
8219 if test $ol_cv_header_stdc = yes; then
8220   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
8221 if test "$cross_compiling" = yes; then
8222   :
8223 else
8224   cat > conftest.$ac_ext <<EOF
8225 #line 8226 "configure"
8226 #include "confdefs.h"
8227 #include <ctype.h>
8228 #ifndef HAVE_EBCDIC
8229 #       define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
8230 #       define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
8231 #else
8232 #       define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
8233                 || ('j' <= (c) && (c) <= 'r') \
8234                 || ('s' <= (c) && (c) <= 'z'))
8235 #       define TOUPPER(c)       (ISLOWER(c) ? ((c) | 0x40) : (c))
8236 #endif
8237 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
8238 int main () { int i; for (i = 0; i < 256; i++)
8239 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
8240 exit (0); }
8241
8242 EOF
8243 if { (eval echo configure:8244: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8244 then
8245   :
8246 else
8247   echo "configure: failed program was:" >&5
8248   cat conftest.$ac_ext >&5
8249   rm -fr conftest*
8250   ol_cv_header_stdc=no
8251 fi
8252 rm -fr conftest*
8253 fi
8254
8255 fi
8256 fi
8257
8258 echo "$ac_t""$ol_cv_header_stdc" 1>&6
8259 if test $ol_cv_header_stdc = yes; then
8260   cat >> confdefs.h <<\EOF
8261 #define STDC_HEADERS 1
8262 EOF
8263
8264 fi
8265 ac_cv_header_stdc=disable
8266
8267
8268 if test $ol_cv_header_stdc != yes; then
8269         echo "configure: warning: could not locate Standard C compliant headers" 1>&2
8270 fi
8271
8272 ac_header_dirent=no
8273 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
8274 do
8275 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8276 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
8277 echo "configure:8278: checking for $ac_hdr that defines DIR" >&5
8278 if eval "test \"\${ac_cv_header_dirent_$ac_safe+set}\" = set"; then
8279   echo $ac_n "(cached) $ac_c" 1>&6
8280 else
8281   cat > conftest.$ac_ext <<EOF
8282 #line 8283 "configure"
8283 #include "confdefs.h"
8284 #include <sys/types.h>
8285 #include <$ac_hdr>
8286 int main() {
8287 DIR *dirp = 0;
8288 ; return 0; }
8289 EOF
8290 if { (eval echo configure:8291: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8291   rm -rf conftest*
8292   eval "ac_cv_header_dirent_$ac_safe=yes"
8293 else
8294   echo "configure: failed program was:" >&5
8295   cat conftest.$ac_ext >&5
8296   rm -rf conftest*
8297   eval "ac_cv_header_dirent_$ac_safe=no"
8298 fi
8299 rm -f conftest*
8300 fi
8301 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
8302   echo "$ac_t""yes" 1>&6
8303     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8304   cat >> confdefs.h <<EOF
8305 #define $ac_tr_hdr 1
8306 EOF
8307  ac_header_dirent=$ac_hdr; break
8308 else
8309   echo "$ac_t""no" 1>&6
8310 fi
8311 done
8312 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
8313 if test $ac_header_dirent = dirent.h; then
8314 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
8315 echo "configure:8316: checking for opendir in -ldir" >&5
8316 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-:%__p__%'`
8317 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8318   echo $ac_n "(cached) $ac_c" 1>&6
8319 else
8320   ac_save_LIBS="$LIBS"
8321 LIBS="-ldir  $LIBS"
8322 cat > conftest.$ac_ext <<EOF
8323 #line 8324 "configure"
8324 #include "confdefs.h"
8325 /* Override any gcc2 internal prototype to avoid an error.  */
8326 /* We use char because int might match the return type of a gcc2
8327     builtin and then its argument prototype would still apply.  */
8328 char opendir();
8329
8330 int main() {
8331 opendir()
8332 ; return 0; }
8333 EOF
8334 if { (eval echo configure:8335: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8335   rm -rf conftest*
8336   eval "ac_cv_lib_$ac_lib_var=yes"
8337 else
8338   echo "configure: failed program was:" >&5
8339   cat conftest.$ac_ext >&5
8340   rm -rf conftest*
8341   eval "ac_cv_lib_$ac_lib_var=no"
8342 fi
8343 rm -f conftest*
8344 LIBS="$ac_save_LIBS"
8345
8346 fi
8347 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8348   echo "$ac_t""yes" 1>&6
8349   LIBS="$LIBS -ldir"
8350 else
8351   echo "$ac_t""no" 1>&6
8352 fi
8353
8354 else
8355 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
8356 echo "configure:8357: checking for opendir in -lx" >&5
8357 ac_lib_var=`echo x'_'opendir | sed 'y%./+-:%__p__%'`
8358 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8359   echo $ac_n "(cached) $ac_c" 1>&6
8360 else
8361   ac_save_LIBS="$LIBS"
8362 LIBS="-lx  $LIBS"
8363 cat > conftest.$ac_ext <<EOF
8364 #line 8365 "configure"
8365 #include "confdefs.h"
8366 /* Override any gcc2 internal prototype to avoid an error.  */
8367 /* We use char because int might match the return type of a gcc2
8368     builtin and then its argument prototype would still apply.  */
8369 char opendir();
8370
8371 int main() {
8372 opendir()
8373 ; return 0; }
8374 EOF
8375 if { (eval echo configure:8376: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8376   rm -rf conftest*
8377   eval "ac_cv_lib_$ac_lib_var=yes"
8378 else
8379   echo "configure: failed program was:" >&5
8380   cat conftest.$ac_ext >&5
8381   rm -rf conftest*
8382   eval "ac_cv_lib_$ac_lib_var=no"
8383 fi
8384 rm -f conftest*
8385 LIBS="$ac_save_LIBS"
8386
8387 fi
8388 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8389   echo "$ac_t""yes" 1>&6
8390   LIBS="$LIBS -lx"
8391 else
8392   echo "$ac_t""no" 1>&6
8393 fi
8394
8395 fi
8396
8397 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
8398 echo "configure:8399: checking for sys/wait.h that is POSIX.1 compatible" >&5
8399 if eval "test \"\${ac_cv_header_sys_wait_h+set}\" = set"; then
8400   echo $ac_n "(cached) $ac_c" 1>&6
8401 else
8402   cat > conftest.$ac_ext <<EOF
8403 #line 8404 "configure"
8404 #include "confdefs.h"
8405 #include <sys/types.h>
8406 #include <sys/wait.h>
8407 #ifndef WEXITSTATUS
8408 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
8409 #endif
8410 #ifndef WIFEXITED
8411 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
8412 #endif
8413 int main() {
8414 int s;
8415 wait (&s);
8416 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
8417 ; return 0; }
8418 EOF
8419 if { (eval echo configure:8420: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8420   rm -rf conftest*
8421   ac_cv_header_sys_wait_h=yes
8422 else
8423   echo "configure: failed program was:" >&5
8424   cat conftest.$ac_ext >&5
8425   rm -rf conftest*
8426   ac_cv_header_sys_wait_h=no
8427 fi
8428 rm -f conftest*
8429 fi
8430
8431 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
8432 if test $ac_cv_header_sys_wait_h = yes; then
8433   cat >> confdefs.h <<\EOF
8434 #define HAVE_SYS_WAIT_H 1
8435 EOF
8436
8437 fi
8438
8439 echo $ac_n "checking POSIX termios""... $ac_c" 1>&6
8440 echo "configure:8441: checking POSIX termios" >&5
8441 if eval "test \"\${am_cv_sys_posix_termios+set}\" = set"; then
8442   echo $ac_n "(cached) $ac_c" 1>&6
8443 else
8444   cat > conftest.$ac_ext <<EOF
8445 #line 8446 "configure"
8446 #include "confdefs.h"
8447 #include <sys/types.h>
8448 #include <unistd.h>
8449 #include <termios.h>
8450 int main() {
8451 /* SunOS 4.0.3 has termios.h but not the library calls.  */
8452    tcgetattr(0, 0);
8453 ; return 0; }
8454 EOF
8455 if { (eval echo configure:8456: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8456   rm -rf conftest*
8457   am_cv_sys_posix_termios=yes
8458 else
8459   echo "configure: failed program was:" >&5
8460   cat conftest.$ac_ext >&5
8461   rm -rf conftest*
8462   am_cv_sys_posix_termios=no
8463 fi
8464 rm -f conftest*
8465 fi
8466
8467 echo "$ac_t""$am_cv_sys_posix_termios" 1>&6
8468
8469
8470  echo $ac_n "checking whether use of TIOCGWINSZ requires sys/ioctl.h""... $ac_c" 1>&6
8471 echo "configure:8472: checking whether use of TIOCGWINSZ requires sys/ioctl.h" >&5
8472 if eval "test \"\${am_cv_sys_tiocgwinsz_needs_sys_ioctl_h+set}\" = set"; then
8473   echo $ac_n "(cached) $ac_c" 1>&6
8474 else
8475   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=no
8476
8477   gwinsz_in_termios_h=no
8478   if test $am_cv_sys_posix_termios = yes; then
8479     cat > conftest.$ac_ext <<EOF
8480 #line 8481 "configure"
8481 #include "confdefs.h"
8482 #include <sys/types.h>
8483 #     include <termios.h>
8484 #     ifdef TIOCGWINSZ
8485         yes
8486 #     endif
8487     
8488 EOF
8489 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8490   egrep "yes" >/dev/null 2>&1; then
8491   rm -rf conftest*
8492   gwinsz_in_termios_h=yes
8493 fi
8494 rm -f conftest*
8495
8496   fi
8497
8498   if test $gwinsz_in_termios_h = no; then
8499     cat > conftest.$ac_ext <<EOF
8500 #line 8501 "configure"
8501 #include "confdefs.h"
8502 #include <sys/types.h>
8503 #     include <sys/ioctl.h>
8504 #     ifdef TIOCGWINSZ
8505         yes
8506 #     endif
8507     
8508 EOF
8509 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8510   egrep "yes" >/dev/null 2>&1; then
8511   rm -rf conftest*
8512   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=yes
8513 fi
8514 rm -f conftest*
8515
8516   fi
8517   
8518 fi
8519
8520 echo "$ac_t""$am_cv_sys_tiocgwinsz_needs_sys_ioctl_h" 1>&6
8521   if test $am_cv_sys_tiocgwinsz_needs_sys_ioctl_h = yes; then
8522     cat >> confdefs.h <<\EOF
8523 #define GWINSZ_IN_SYS_IOCTL 1
8524 EOF
8525
8526   fi
8527
8528 if test $am_cv_sys_posix_termios = yes ; then
8529         cat >> confdefs.h <<\EOF
8530 #define HAVE_POSIX_TERMIOS 1
8531 EOF
8532
8533 fi
8534
8535 for ac_hdr in \
8536         arpa/inet.h             \
8537         arpa/nameser.h  \
8538         assert.h                \
8539         bits/types.h    \
8540         conio.h                 \
8541         crypt.h                 \
8542         direct.h                \
8543         errno.h                 \
8544         fcntl.h                 \
8545         filio.h                 \
8546         getopt.h                \
8547         grp.h                   \
8548         io.h                    \
8549         libutil.h               \
8550         limits.h                \
8551         locale.h                \
8552         netinet/tcp.h   \
8553         malloc.h                \
8554         memory.h                \
8555         psap.h                  \
8556         pwd.h                   \
8557         process.h               \
8558         resolv.h                \
8559         sgtty.h                 \
8560         shadow.h                \
8561         stddef.h                \
8562         string.h                \
8563         strings.h               \
8564         sysexits.h              \
8565         sys/file.h              \
8566         sys/filio.h             \
8567         sys/errno.h             \
8568         sys/ioctl.h             \
8569         sys/param.h             \
8570         sys/resource.h  \
8571         sys/select.h    \
8572         sys/socket.h    \
8573         sys/stat.h              \
8574         sys/syslog.h    \
8575         sys/time.h              \
8576         sys/types.h             \
8577         sys/ucred.h             \
8578         sys/uio.h               \
8579         syslog.h                \
8580         termios.h               \
8581         unistd.h                \
8582         winsock.h               \
8583         winsock2.h              \
8584
8585 do
8586 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8587 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8588 echo "configure:8589: checking for $ac_hdr" >&5
8589 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
8590   echo $ac_n "(cached) $ac_c" 1>&6
8591 else
8592   cat > conftest.$ac_ext <<EOF
8593 #line 8594 "configure"
8594 #include "confdefs.h"
8595 #include <$ac_hdr>
8596 EOF
8597 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8598 { (eval echo configure:8599: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8599 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8600 if test -z "$ac_err"; then
8601   rm -rf conftest*
8602   eval "ac_cv_header_$ac_safe=yes"
8603 else
8604   echo "$ac_err" >&5
8605   echo "configure: failed program was:" >&5
8606   cat conftest.$ac_ext >&5
8607   rm -rf conftest*
8608   eval "ac_cv_header_$ac_safe=no"
8609 fi
8610 rm -f conftest*
8611 fi
8612 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8613   echo "$ac_t""yes" 1>&6
8614     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8615   cat >> confdefs.h <<EOF
8616 #define $ac_tr_hdr 1
8617 EOF
8618  
8619 else
8620   echo "$ac_t""no" 1>&6
8621 fi
8622 done
8623
8624
8625
8626
8627 echo $ac_n "checking for sigset in -lV3""... $ac_c" 1>&6
8628 echo "configure:8629: checking for sigset in -lV3" >&5
8629 ac_lib_var=`echo V3'_'sigset | sed 'y%./+-:%__p__%'`
8630 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8631   echo $ac_n "(cached) $ac_c" 1>&6
8632 else
8633   ac_save_LIBS="$LIBS"
8634 LIBS="-lV3  $LIBS"
8635 cat > conftest.$ac_ext <<EOF
8636 #line 8637 "configure"
8637 #include "confdefs.h"
8638 /* Override any gcc2 internal prototype to avoid an error.  */
8639 /* We use char because int might match the return type of a gcc2
8640     builtin and then its argument prototype would still apply.  */
8641 char sigset();
8642
8643 int main() {
8644 sigset()
8645 ; return 0; }
8646 EOF
8647 if { (eval echo configure:8648: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8648   rm -rf conftest*
8649   eval "ac_cv_lib_$ac_lib_var=yes"
8650 else
8651   echo "configure: failed program was:" >&5
8652   cat conftest.$ac_ext >&5
8653   rm -rf conftest*
8654   eval "ac_cv_lib_$ac_lib_var=no"
8655 fi
8656 rm -f conftest*
8657 LIBS="$ac_save_LIBS"
8658
8659 fi
8660 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8661   echo "$ac_t""yes" 1>&6
8662     ac_tr_lib=HAVE_LIB`echo V3 | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8663     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8664   cat >> confdefs.h <<EOF
8665 #define $ac_tr_lib 1
8666 EOF
8667
8668   LIBS="-lV3 $LIBS"
8669
8670 else
8671   echo "$ac_t""no" 1>&6
8672 fi
8673
8674
8675 if test "$ac_cv_header_winsock_h" = yes; then
8676 echo $ac_n "checking for winsock""... $ac_c" 1>&6
8677 echo "configure:8678: checking for winsock" >&5
8678 if eval "test \"\${ol_cv_winsock+set}\" = set"; then
8679   echo $ac_n "(cached) $ac_c" 1>&6
8680 else
8681   save_LIBS="$LIBS"
8682 for curlib in ws2_32 wsock32; do
8683         LIBS="$LIBS -l$curlib"
8684         cat > conftest.$ac_ext <<EOF
8685 #line 8686 "configure"
8686 #include "confdefs.h"
8687 #include <winsock.h>
8688                         
8689 int main() {
8690
8691                         socket(0,0,0);
8692                         select(0,NULL,NULL,NULL,NULL);
8693                         closesocket(0);
8694                         gethostname(NULL,0);
8695                         
8696 ; return 0; }
8697 EOF
8698 if { (eval echo configure:8699: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8699   rm -rf conftest*
8700   ol_cv_winsock=yes
8701 else
8702   echo "configure: failed program was:" >&5
8703   cat conftest.$ac_ext >&5
8704   rm -rf conftest*
8705   ol_cv_winsock=no
8706 fi
8707 rm -f conftest*
8708
8709         if test $ol_cv_winsock = yes; then
8710                 cat >> confdefs.h <<\EOF
8711 #define HAVE_WINSOCK 1
8712 EOF
8713
8714                 ac_cv_func_socket=yes
8715                 ac_cv_func_select=yes
8716                 ac_cv_func_closesocket=yes
8717                 ac_cv_func_gethostname=yes
8718                 if test $curlib = ws2_32; then
8719                         ol_cv_winsock=winsock2
8720                         cat >> confdefs.h <<\EOF
8721 #define HAVE_WINSOCK2 1
8722 EOF
8723
8724                 fi
8725                 break
8726         fi
8727         LIBS="$save_LIBS"
8728 done
8729 fi
8730
8731 echo "$ac_t""$ol_cv_winsock" 1>&6
8732 fi
8733
8734
8735 echo $ac_n "checking for socket""... $ac_c" 1>&6
8736 echo "configure:8737: checking for socket" >&5
8737 if eval "test \"\${ac_cv_func_socket+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 /* System header to define __stub macros and hopefully few prototypes,
8744     which can conflict with char socket(); below.  */
8745 #include <assert.h>
8746 /* Override any gcc2 internal prototype to avoid an error.  */
8747 /* We use char because int might match the return type of a gcc2
8748     builtin and then its argument prototype would still apply.  */
8749 char socket();
8750 char (*f)();
8751
8752 int main() {
8753
8754 /* The GNU C library defines this for functions which it implements
8755     to always fail with ENOSYS.  Some functions are actually named
8756     something starting with __ and the normal name is an alias.  */
8757 #if defined (__stub_socket) || defined (__stub___socket)
8758 choke me
8759 #else
8760 f = socket;
8761 #endif
8762
8763 ; return 0; }
8764 EOF
8765 if { (eval echo configure:8766: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8766   rm -rf conftest*
8767   eval "ac_cv_func_socket=yes"
8768 else
8769   echo "configure: failed program was:" >&5
8770   cat conftest.$ac_ext >&5
8771   rm -rf conftest*
8772   eval "ac_cv_func_socket=no"
8773 fi
8774 rm -f conftest*
8775 fi
8776
8777 if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
8778   echo "$ac_t""yes" 1>&6
8779   :
8780 else
8781   echo "$ac_t""no" 1>&6
8782         
8783         echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6
8784 echo "configure:8785: checking for main in -lsocket" >&5
8785 ac_lib_var=`echo socket'_'main | sed 'y%./+-:%__p__%'`
8786 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8787   echo $ac_n "(cached) $ac_c" 1>&6
8788 else
8789   ac_save_LIBS="$LIBS"
8790 LIBS="-lsocket  $LIBS"
8791 cat > conftest.$ac_ext <<EOF
8792 #line 8793 "configure"
8793 #include "confdefs.h"
8794
8795 int main() {
8796 main()
8797 ; return 0; }
8798 EOF
8799 if { (eval echo configure:8800: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8800   rm -rf conftest*
8801   eval "ac_cv_lib_$ac_lib_var=yes"
8802 else
8803   echo "configure: failed program was:" >&5
8804   cat conftest.$ac_ext >&5
8805   rm -rf conftest*
8806   eval "ac_cv_lib_$ac_lib_var=no"
8807 fi
8808 rm -f conftest*
8809 LIBS="$ac_save_LIBS"
8810
8811 fi
8812 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8813   echo "$ac_t""yes" 1>&6
8814     ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8815     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8816   cat >> confdefs.h <<EOF
8817 #define $ac_tr_lib 1
8818 EOF
8819
8820   LIBS="-lsocket $LIBS"
8821
8822 else
8823   echo "$ac_t""no" 1>&6
8824 fi
8825
8826         echo $ac_n "checking for main in -lnet""... $ac_c" 1>&6
8827 echo "configure:8828: checking for main in -lnet" >&5
8828 ac_lib_var=`echo net'_'main | sed 'y%./+-:%__p__%'`
8829 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8830   echo $ac_n "(cached) $ac_c" 1>&6
8831 else
8832   ac_save_LIBS="$LIBS"
8833 LIBS="-lnet  $LIBS"
8834 cat > conftest.$ac_ext <<EOF
8835 #line 8836 "configure"
8836 #include "confdefs.h"
8837
8838 int main() {
8839 main()
8840 ; return 0; }
8841 EOF
8842 if { (eval echo configure:8843: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8843   rm -rf conftest*
8844   eval "ac_cv_lib_$ac_lib_var=yes"
8845 else
8846   echo "configure: failed program was:" >&5
8847   cat conftest.$ac_ext >&5
8848   rm -rf conftest*
8849   eval "ac_cv_lib_$ac_lib_var=no"
8850 fi
8851 rm -f conftest*
8852 LIBS="$ac_save_LIBS"
8853
8854 fi
8855 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8856   echo "$ac_t""yes" 1>&6
8857     ac_tr_lib=HAVE_LIB`echo net | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8858     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8859   cat >> confdefs.h <<EOF
8860 #define $ac_tr_lib 1
8861 EOF
8862
8863   LIBS="-lnet $LIBS"
8864
8865 else
8866   echo "$ac_t""no" 1>&6
8867 fi
8868
8869         echo $ac_n "checking for main in -lnsl_s""... $ac_c" 1>&6
8870 echo "configure:8871: checking for main in -lnsl_s" >&5
8871 ac_lib_var=`echo nsl_s'_'main | sed 'y%./+-:%__p__%'`
8872 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8873   echo $ac_n "(cached) $ac_c" 1>&6
8874 else
8875   ac_save_LIBS="$LIBS"
8876 LIBS="-lnsl_s  $LIBS"
8877 cat > conftest.$ac_ext <<EOF
8878 #line 8879 "configure"
8879 #include "confdefs.h"
8880
8881 int main() {
8882 main()
8883 ; return 0; }
8884 EOF
8885 if { (eval echo configure:8886: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8886   rm -rf conftest*
8887   eval "ac_cv_lib_$ac_lib_var=yes"
8888 else
8889   echo "configure: failed program was:" >&5
8890   cat conftest.$ac_ext >&5
8891   rm -rf conftest*
8892   eval "ac_cv_lib_$ac_lib_var=no"
8893 fi
8894 rm -f conftest*
8895 LIBS="$ac_save_LIBS"
8896
8897 fi
8898 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8899   echo "$ac_t""yes" 1>&6
8900     ac_tr_lib=HAVE_LIB`echo nsl_s | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8901     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8902   cat >> confdefs.h <<EOF
8903 #define $ac_tr_lib 1
8904 EOF
8905
8906   LIBS="-lnsl_s $LIBS"
8907
8908 else
8909   echo "$ac_t""no" 1>&6
8910 fi
8911
8912         echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
8913 echo "configure:8914: checking for main in -lnsl" >&5
8914 ac_lib_var=`echo nsl'_'main | sed 'y%./+-:%__p__%'`
8915 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8916   echo $ac_n "(cached) $ac_c" 1>&6
8917 else
8918   ac_save_LIBS="$LIBS"
8919 LIBS="-lnsl  $LIBS"
8920 cat > conftest.$ac_ext <<EOF
8921 #line 8922 "configure"
8922 #include "confdefs.h"
8923
8924 int main() {
8925 main()
8926 ; return 0; }
8927 EOF
8928 if { (eval echo configure:8929: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8929   rm -rf conftest*
8930   eval "ac_cv_lib_$ac_lib_var=yes"
8931 else
8932   echo "configure: failed program was:" >&5
8933   cat conftest.$ac_ext >&5
8934   rm -rf conftest*
8935   eval "ac_cv_lib_$ac_lib_var=no"
8936 fi
8937 rm -f conftest*
8938 LIBS="$ac_save_LIBS"
8939
8940 fi
8941 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8942   echo "$ac_t""yes" 1>&6
8943     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8944     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8945   cat >> confdefs.h <<EOF
8946 #define $ac_tr_lib 1
8947 EOF
8948
8949   LIBS="-lnsl $LIBS"
8950
8951 else
8952   echo "$ac_t""no" 1>&6
8953 fi
8954
8955         echo $ac_n "checking for socket in -linet""... $ac_c" 1>&6
8956 echo "configure:8957: checking for socket in -linet" >&5
8957 ac_lib_var=`echo inet'_'socket | sed 'y%./+-:%__p__%'`
8958 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8959   echo $ac_n "(cached) $ac_c" 1>&6
8960 else
8961   ac_save_LIBS="$LIBS"
8962 LIBS="-linet  $LIBS"
8963 cat > conftest.$ac_ext <<EOF
8964 #line 8965 "configure"
8965 #include "confdefs.h"
8966 /* Override any gcc2 internal prototype to avoid an error.  */
8967 /* We use char because int might match the return type of a gcc2
8968     builtin and then its argument prototype would still apply.  */
8969 char socket();
8970
8971 int main() {
8972 socket()
8973 ; return 0; }
8974 EOF
8975 if { (eval echo configure:8976: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8976   rm -rf conftest*
8977   eval "ac_cv_lib_$ac_lib_var=yes"
8978 else
8979   echo "configure: failed program was:" >&5
8980   cat conftest.$ac_ext >&5
8981   rm -rf conftest*
8982   eval "ac_cv_lib_$ac_lib_var=no"
8983 fi
8984 rm -f conftest*
8985 LIBS="$ac_save_LIBS"
8986
8987 fi
8988 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8989   echo "$ac_t""yes" 1>&6
8990     ac_tr_lib=HAVE_LIB`echo inet | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8991     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8992   cat >> confdefs.h <<EOF
8993 #define $ac_tr_lib 1
8994 EOF
8995
8996   LIBS="-linet $LIBS"
8997
8998 else
8999   echo "$ac_t""no" 1>&6
9000 fi
9001
9002         echo $ac_n "checking for main in -lgen""... $ac_c" 1>&6
9003 echo "configure:9004: checking for main in -lgen" >&5
9004 ac_lib_var=`echo gen'_'main | sed 'y%./+-:%__p__%'`
9005 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9006   echo $ac_n "(cached) $ac_c" 1>&6
9007 else
9008   ac_save_LIBS="$LIBS"
9009 LIBS="-lgen  $LIBS"
9010 cat > conftest.$ac_ext <<EOF
9011 #line 9012 "configure"
9012 #include "confdefs.h"
9013
9014 int main() {
9015 main()
9016 ; return 0; }
9017 EOF
9018 if { (eval echo configure:9019: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9019   rm -rf conftest*
9020   eval "ac_cv_lib_$ac_lib_var=yes"
9021 else
9022   echo "configure: failed program was:" >&5
9023   cat conftest.$ac_ext >&5
9024   rm -rf conftest*
9025   eval "ac_cv_lib_$ac_lib_var=no"
9026 fi
9027 rm -f conftest*
9028 LIBS="$ac_save_LIBS"
9029
9030 fi
9031 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9032   echo "$ac_t""yes" 1>&6
9033     ac_tr_lib=HAVE_LIB`echo gen | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9034     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9035   cat >> confdefs.h <<EOF
9036 #define $ac_tr_lib 1
9037 EOF
9038
9039   LIBS="-lgen $LIBS"
9040
9041 else
9042   echo "$ac_t""no" 1>&6
9043 fi
9044
9045
9046 fi
9047
9048
9049 echo $ac_n "checking for select""... $ac_c" 1>&6
9050 echo "configure:9051: checking for select" >&5
9051 if eval "test \"\${ac_cv_func_select+set}\" = set"; then
9052   echo $ac_n "(cached) $ac_c" 1>&6
9053 else
9054   cat > conftest.$ac_ext <<EOF
9055 #line 9056 "configure"
9056 #include "confdefs.h"
9057 /* System header to define __stub macros and hopefully few prototypes,
9058     which can conflict with char select(); below.  */
9059 #include <assert.h>
9060 /* Override any gcc2 internal prototype to avoid an error.  */
9061 /* We use char because int might match the return type of a gcc2
9062     builtin and then its argument prototype would still apply.  */
9063 char select();
9064 char (*f)();
9065
9066 int main() {
9067
9068 /* The GNU C library defines this for functions which it implements
9069     to always fail with ENOSYS.  Some functions are actually named
9070     something starting with __ and the normal name is an alias.  */
9071 #if defined (__stub_select) || defined (__stub___select)
9072 choke me
9073 #else
9074 f = select;
9075 #endif
9076
9077 ; return 0; }
9078 EOF
9079 if { (eval echo configure:9080: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9080   rm -rf conftest*
9081   eval "ac_cv_func_select=yes"
9082 else
9083   echo "configure: failed program was:" >&5
9084   cat conftest.$ac_ext >&5
9085   rm -rf conftest*
9086   eval "ac_cv_func_select=no"
9087 fi
9088 rm -f conftest*
9089 fi
9090
9091 if eval "test \"`echo '$ac_cv_func_'select`\" = yes"; then
9092   echo "$ac_t""yes" 1>&6
9093   :
9094 else
9095   echo "$ac_t""no" 1>&6
9096 { echo "configure: error: select() required." 1>&2; exit 1; }
9097 fi
9098
9099
9100 if test "${ac_cv_header_winsock_h}" != yes; then
9101                                 echo $ac_n "checking types of arguments for select()""... $ac_c" 1>&6
9102 echo "configure:9103: checking types of arguments for select()" >&5
9103  if eval "test \"\${ac_cv_func_select_arg234+set}\" = set"; then
9104   echo $ac_n "(cached) $ac_c" 1>&6
9105 else
9106    if eval "test \"\${ac_cv_func_select_arg1+set}\" = set"; then
9107   echo $ac_n "(cached) $ac_c" 1>&6
9108 else
9109     if eval "test \"\${ac_cv_func_select_arg5+set}\" = set"; then
9110   echo $ac_n "(cached) $ac_c" 1>&6
9111 else
9112      for ac_cv_func_select_arg234 in 'fd_set *' 'int *' 'void *'; do
9113      for ac_cv_func_select_arg1 in 'int' 'size_t' 'unsigned long' 'unsigned'; do
9114       for ac_cv_func_select_arg5 in 'struct timeval *' 'const struct timeval *'; do
9115        cat > conftest.$ac_ext <<EOF
9116 #line 9117 "configure"
9117 #include "confdefs.h"
9118 #ifdef HAVE_SYS_TYPES_H
9119 #include <sys/types.h>
9120 #endif
9121 #ifdef HAVE_SYS_TIME_H
9122 #include <sys/time.h>
9123 #endif
9124 #ifdef HAVE_SYS_SELECT_H
9125 #include <sys/select.h>
9126 #endif
9127 #ifdef HAVE_SYS_SOCKET_H
9128 #include <sys/socket.h>
9129 #endif
9130 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);
9131 int main() {
9132
9133 ; return 0; }
9134 EOF
9135 if { (eval echo configure:9136: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9136   rm -rf conftest*
9137           ac_not_found=no ; break 3
9138 else
9139   echo "configure: failed program was:" >&5
9140   cat conftest.$ac_ext >&5
9141   rm -rf conftest*
9142   ac_not_found=yes
9143 fi
9144 rm -f conftest*
9145       done
9146      done
9147     done
9148    
9149 fi
9150   
9151 fi
9152  
9153 fi
9154  if test "$ac_not_found" = yes; then
9155   ac_cv_func_select_arg1=int 
9156   ac_cv_func_select_arg234='int *' 
9157   ac_cv_func_select_arg5='struct timeval *'
9158  fi
9159  echo "$ac_t""$ac_cv_func_select_arg1,$ac_cv_func_select_arg234,$ac_cv_func_select_arg5" 1>&6
9160  cat >> confdefs.h <<EOF
9161 #define SELECT_TYPE_ARG1 $ac_cv_func_select_arg1
9162 EOF
9163
9164  cat >> confdefs.h <<EOF
9165 #define SELECT_TYPE_ARG234 ($ac_cv_func_select_arg234)
9166 EOF
9167
9168  cat >> confdefs.h <<EOF
9169 #define SELECT_TYPE_ARG5 ($ac_cv_func_select_arg5)
9170 EOF
9171
9172
9173 fi
9174
9175
9176 for ac_hdr in regex.h 
9177 do
9178 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9179 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9180 echo "configure:9181: checking for $ac_hdr" >&5
9181 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9182   echo $ac_n "(cached) $ac_c" 1>&6
9183 else
9184   cat > conftest.$ac_ext <<EOF
9185 #line 9186 "configure"
9186 #include "confdefs.h"
9187 #include <$ac_hdr>
9188 EOF
9189 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9190 { (eval echo configure:9191: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9191 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9192 if test -z "$ac_err"; then
9193   rm -rf conftest*
9194   eval "ac_cv_header_$ac_safe=yes"
9195 else
9196   echo "$ac_err" >&5
9197   echo "configure: failed program was:" >&5
9198   cat conftest.$ac_ext >&5
9199   rm -rf conftest*
9200   eval "ac_cv_header_$ac_safe=no"
9201 fi
9202 rm -f conftest*
9203 fi
9204 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9205   echo "$ac_t""yes" 1>&6
9206     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9207   cat >> confdefs.h <<EOF
9208 #define $ac_tr_hdr 1
9209 EOF
9210  
9211 else
9212   echo "$ac_t""no" 1>&6
9213 fi
9214 done
9215
9216 if test "$ac_cv_header_regex_h" != yes ; then
9217         { echo "configure: error: POSIX regex.h required." 1>&2; exit 1; }
9218 fi
9219
9220 echo $ac_n "checking for library containing regfree""... $ac_c" 1>&6
9221 echo "configure:9222: checking for library containing regfree" >&5
9222 if eval "test \"\${ac_cv_search_regfree+set}\" = set"; then
9223   echo $ac_n "(cached) $ac_c" 1>&6
9224 else
9225   ac_func_search_save_LIBS="$LIBS"
9226 ac_cv_search_regfree="no"
9227 cat > conftest.$ac_ext <<EOF
9228 #line 9229 "configure"
9229 #include "confdefs.h"
9230 /* Override any gcc2 internal prototype to avoid an error.  */
9231 /* We use char because int might match the return type of a gcc2
9232     builtin and then its argument prototype would still apply.  */
9233 char regfree();
9234
9235 int main() {
9236 regfree()
9237 ; return 0; }
9238 EOF
9239 if { (eval echo configure:9240: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9240   rm -rf conftest*
9241   ac_cv_search_regfree="none required"
9242 else
9243   echo "configure: failed program was:" >&5
9244   cat conftest.$ac_ext >&5
9245 fi
9246 rm -f conftest*
9247 test "$ac_cv_search_regfree" = "no" && for ac_lib in regex gnuregex; do
9248 LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9249 cat > conftest.$ac_ext <<EOF
9250 #line 9251 "configure"
9251 #include "confdefs.h"
9252 /* Override any gcc2 internal prototype to avoid an error.  */
9253 /* We use char because int might match the return type of a gcc2
9254     builtin and then its argument prototype would still apply.  */
9255 char regfree();
9256
9257 int main() {
9258 regfree()
9259 ; return 0; }
9260 EOF
9261 if { (eval echo configure:9262: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9262   rm -rf conftest*
9263   ac_cv_search_regfree="-l$ac_lib"
9264 break
9265 else
9266   echo "configure: failed program was:" >&5
9267   cat conftest.$ac_ext >&5
9268 fi
9269 rm -f conftest*
9270 done
9271 LIBS="$ac_func_search_save_LIBS"
9272 fi
9273
9274 echo "$ac_t""$ac_cv_search_regfree" 1>&6
9275 if test "$ac_cv_search_regfree" != "no"; then
9276   test "$ac_cv_search_regfree" = "none required" || LIBS="$ac_cv_search_regfree $LIBS"
9277   :
9278 else :
9279   { echo "configure: error: POSIX regex required." 1>&2; exit 1; }
9280 fi
9281
9282
9283 echo $ac_n "checking for compatible POSIX regex""... $ac_c" 1>&6
9284 echo "configure:9285: checking for compatible POSIX regex" >&5
9285 if eval "test \"\${ol_cv_c_posix_regex+set}\" = set"; then
9286   echo $ac_n "(cached) $ac_c" 1>&6
9287 else
9288   
9289         if test "$cross_compiling" = yes; then
9290   ol_cv_c_posix_regex=cross
9291 else
9292   cat > conftest.$ac_ext <<EOF
9293 #line 9294 "configure"
9294 #include "confdefs.h"
9295
9296 #include <sys/types.h>
9297 #include <regex.h>
9298 static char *pattern, *string;
9299 main()
9300 {
9301         int rc;
9302         regex_t re;
9303
9304         pattern = "^A";
9305
9306         if(regcomp(&re, pattern, 0)) {
9307                 return -1;
9308         }
9309         
9310         string = "ALL MATCH";
9311         
9312         rc = regexec(&re, string, 0, (void*)0, 0);
9313
9314         regfree(&re);
9315
9316         return rc;
9317 }
9318 EOF
9319 if { (eval echo configure:9320: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9320 then
9321   ol_cv_c_posix_regex=yes
9322 else
9323   echo "configure: failed program was:" >&5
9324   cat conftest.$ac_ext >&5
9325   rm -fr conftest*
9326   ol_cv_c_posix_regex=no
9327 fi
9328 rm -fr conftest*
9329 fi
9330
9331 fi
9332
9333 echo "$ac_t""$ol_cv_c_posix_regex" 1>&6
9334
9335 if test "$ol_cv_c_posix_regex" = no ; then
9336         { echo "configure: error: broken POSIX regex!" 1>&2; exit 1; }
9337 fi
9338
9339
9340 have_uuid=no
9341 for ac_hdr in sys/uuid.h
9342 do
9343 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9344 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9345 echo "configure:9346: checking for $ac_hdr" >&5
9346 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9347   echo $ac_n "(cached) $ac_c" 1>&6
9348 else
9349   cat > conftest.$ac_ext <<EOF
9350 #line 9351 "configure"
9351 #include "confdefs.h"
9352 #include <$ac_hdr>
9353 EOF
9354 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9355 { (eval echo configure:9356: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9356 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9357 if test -z "$ac_err"; then
9358   rm -rf conftest*
9359   eval "ac_cv_header_$ac_safe=yes"
9360 else
9361   echo "$ac_err" >&5
9362   echo "configure: failed program was:" >&5
9363   cat conftest.$ac_ext >&5
9364   rm -rf conftest*
9365   eval "ac_cv_header_$ac_safe=no"
9366 fi
9367 rm -f conftest*
9368 fi
9369 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9370   echo "$ac_t""yes" 1>&6
9371     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9372   cat >> confdefs.h <<EOF
9373 #define $ac_tr_hdr 1
9374 EOF
9375  
9376 else
9377   echo "$ac_t""no" 1>&6
9378 fi
9379 done
9380
9381 if test $ac_cv_header_sys_uuid_h = yes ; then
9382         save_LIBS="$LIBS"
9383         
9384 echo $ac_n "checking for library containing uuid_to_str""... $ac_c" 1>&6
9385 echo "configure:9386: checking for library containing uuid_to_str" >&5
9386 if eval "test \"\${ac_cv_search_uuid_to_str+set}\" = set"; then
9387   echo $ac_n "(cached) $ac_c" 1>&6
9388 else
9389   ac_func_search_save_LIBS="$LIBS"
9390 ac_cv_search_uuid_to_str="no"
9391 cat > conftest.$ac_ext <<EOF
9392 #line 9393 "configure"
9393 #include "confdefs.h"
9394 /* Override any gcc2 internal prototype to avoid an error.  */
9395 /* We use char because int might match the return type of a gcc2
9396     builtin and then its argument prototype would still apply.  */
9397 char uuid_to_str();
9398
9399 int main() {
9400 uuid_to_str()
9401 ; return 0; }
9402 EOF
9403 if { (eval echo configure:9404: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9404   rm -rf conftest*
9405   ac_cv_search_uuid_to_str="none required"
9406 else
9407   echo "configure: failed program was:" >&5
9408   cat conftest.$ac_ext >&5
9409 fi
9410 rm -f conftest*
9411 test "$ac_cv_search_uuid_to_str" = "no" && for ac_lib in uuid; do
9412 LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9413 cat > conftest.$ac_ext <<EOF
9414 #line 9415 "configure"
9415 #include "confdefs.h"
9416 /* Override any gcc2 internal prototype to avoid an error.  */
9417 /* We use char because int might match the return type of a gcc2
9418     builtin and then its argument prototype would still apply.  */
9419 char uuid_to_str();
9420
9421 int main() {
9422 uuid_to_str()
9423 ; return 0; }
9424 EOF
9425 if { (eval echo configure:9426: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9426   rm -rf conftest*
9427   ac_cv_search_uuid_to_str="-l$ac_lib"
9428 break
9429 else
9430   echo "configure: failed program was:" >&5
9431   cat conftest.$ac_ext >&5
9432 fi
9433 rm -f conftest*
9434 done
9435 LIBS="$ac_func_search_save_LIBS"
9436 fi
9437
9438 echo "$ac_t""$ac_cv_search_uuid_to_str" 1>&6
9439 if test "$ac_cv_search_uuid_to_str" != "no"; then
9440   test "$ac_cv_search_uuid_to_str" = "none required" || LIBS="$ac_cv_search_uuid_to_str $LIBS"
9441   have_uuid=yes
9442 else :
9443   :
9444 fi
9445         LIBS="$save_LIBS"
9446
9447         if test have_uuid = yes ; then
9448                 cat >> confdefs.h <<\EOF
9449 #define HAVE_UUID_TO_STR 1
9450 EOF
9451
9452
9453                 test "$ac_cv_search_uuid_to_str" = "none required" || \
9454                         SLAPD_LIBS="$SLAPD_LIBS $ac_cv_search_uuid_to_str"
9455         fi
9456 fi
9457
9458 if test $have_uuid = no ; then
9459         echo $ac_n "checking to see if -lrpcrt4 is needed for win32 UUID support""... $ac_c" 1>&6
9460 echo "configure:9461: checking to see if -lrpcrt4 is needed for win32 UUID support" >&5
9461         save_LIBS="$LIBS"
9462         LIBS="$LIBS -lrpcrt4"
9463         cat > conftest.$ac_ext <<EOF
9464 #line 9465 "configure"
9465 #include "confdefs.h"
9466
9467                 int __stdcall UuidCreate(void *);
9468                 int __stdcall UuidToStringA(void *,void **);
9469                 
9470 int main() {
9471
9472                 UuidCreate(0);
9473                 UuidToStringA(0,0);
9474                 
9475 ; return 0; }
9476 EOF
9477 if { (eval echo configure:9478: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9478   rm -rf conftest*
9479   need_rpcrt=yes
9480 else
9481   echo "configure: failed program was:" >&5
9482   cat conftest.$ac_ext >&5
9483   rm -rf conftest*
9484   need_rpcrt=no
9485 fi
9486 rm -f conftest*
9487         if test $need_rpcrt = yes; then
9488                 SLAPD_LIBS="$SLAPD_LIBS -lrpcrt4"
9489         fi
9490         LIBS="$save_LIBS"
9491         echo "$ac_t""$need_rpcrt" 1>&6
9492 fi
9493
9494 ol_link_dnssrv=no
9495 echo $ac_n "checking for res_query""... $ac_c" 1>&6
9496 echo "configure:9497: checking for res_query" >&5
9497 if eval "test \"\${ac_cv_func_res_query+set}\" = set"; then
9498   echo $ac_n "(cached) $ac_c" 1>&6
9499 else
9500   cat > conftest.$ac_ext <<EOF
9501 #line 9502 "configure"
9502 #include "confdefs.h"
9503 /* System header to define __stub macros and hopefully few prototypes,
9504     which can conflict with char res_query(); below.  */
9505 #include <assert.h>
9506 /* Override any gcc2 internal prototype to avoid an error.  */
9507 /* We use char because int might match the return type of a gcc2
9508     builtin and then its argument prototype would still apply.  */
9509 char res_query();
9510 char (*f)();
9511
9512 int main() {
9513
9514 /* The GNU C library defines this for functions which it implements
9515     to always fail with ENOSYS.  Some functions are actually named
9516     something starting with __ and the normal name is an alias.  */
9517 #if defined (__stub_res_query) || defined (__stub___res_query)
9518 choke me
9519 #else
9520 f = res_query;
9521 #endif
9522
9523 ; return 0; }
9524 EOF
9525 if { (eval echo configure:9526: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9526   rm -rf conftest*
9527   eval "ac_cv_func_res_query=yes"
9528 else
9529   echo "configure: failed program was:" >&5
9530   cat conftest.$ac_ext >&5
9531   rm -rf conftest*
9532   eval "ac_cv_func_res_query=no"
9533 fi
9534 rm -f conftest*
9535 fi
9536
9537 if eval "test \"`echo '$ac_cv_func_'res_query`\" = yes"; then
9538   echo "$ac_t""yes" 1>&6
9539   :
9540 else
9541   echo "$ac_t""no" 1>&6
9542 fi
9543
9544 if test $ac_cv_func_res_query = no ; then 
9545         echo $ac_n "checking for __res_query""... $ac_c" 1>&6
9546 echo "configure:9547: checking for __res_query" >&5
9547 if eval "test \"\${ac_cv_func___res_query+set}\" = set"; then
9548   echo $ac_n "(cached) $ac_c" 1>&6
9549 else
9550   cat > conftest.$ac_ext <<EOF
9551 #line 9552 "configure"
9552 #include "confdefs.h"
9553 /* System header to define __stub macros and hopefully few prototypes,
9554     which can conflict with char __res_query(); below.  */
9555 #include <assert.h>
9556 /* Override any gcc2 internal prototype to avoid an error.  */
9557 /* We use char because int might match the return type of a gcc2
9558     builtin and then its argument prototype would still apply.  */
9559 char __res_query();
9560 char (*f)();
9561
9562 int main() {
9563
9564 /* The GNU C library defines this for functions which it implements
9565     to always fail with ENOSYS.  Some functions are actually named
9566     something starting with __ and the normal name is an alias.  */
9567 #if defined (__stub___res_query) || defined (__stub_____res_query)
9568 choke me
9569 #else
9570 f = __res_query;
9571 #endif
9572
9573 ; return 0; }
9574 EOF
9575 if { (eval echo configure:9576: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9576   rm -rf conftest*
9577   eval "ac_cv_func___res_query=yes"
9578 else
9579   echo "configure: failed program was:" >&5
9580   cat conftest.$ac_ext >&5
9581   rm -rf conftest*
9582   eval "ac_cv_func___res_query=no"
9583 fi
9584 rm -f conftest*
9585 fi
9586
9587 if eval "test \"`echo '$ac_cv_func_'__res_query`\" = yes"; then
9588   echo "$ac_t""yes" 1>&6
9589   :
9590 else
9591   echo "$ac_t""no" 1>&6
9592 fi
9593
9594         ac_cv_func_res_query=$ac_cv_func___res_query
9595 fi
9596
9597 if test $ac_cv_func_res_query = no ; then 
9598         echo $ac_n "checking for res_query in -lbind""... $ac_c" 1>&6
9599 echo "configure:9600: checking for res_query in -lbind" >&5
9600 ac_lib_var=`echo bind'_'res_query | sed 'y%./+-:%__p__%'`
9601 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9602   echo $ac_n "(cached) $ac_c" 1>&6
9603 else
9604   ac_save_LIBS="$LIBS"
9605 LIBS="-lbind  $LIBS"
9606 cat > conftest.$ac_ext <<EOF
9607 #line 9608 "configure"
9608 #include "confdefs.h"
9609 /* Override any gcc2 internal prototype to avoid an error.  */
9610 /* We use char because int might match the return type of a gcc2
9611     builtin and then its argument prototype would still apply.  */
9612 char res_query();
9613
9614 int main() {
9615 res_query()
9616 ; return 0; }
9617 EOF
9618 if { (eval echo configure:9619: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9619   rm -rf conftest*
9620   eval "ac_cv_lib_$ac_lib_var=yes"
9621 else
9622   echo "configure: failed program was:" >&5
9623   cat conftest.$ac_ext >&5
9624   rm -rf conftest*
9625   eval "ac_cv_lib_$ac_lib_var=no"
9626 fi
9627 rm -f conftest*
9628 LIBS="$ac_save_LIBS"
9629
9630 fi
9631 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9632   echo "$ac_t""yes" 1>&6
9633     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9634     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9635   cat >> confdefs.h <<EOF
9636 #define $ac_tr_lib 1
9637 EOF
9638
9639   LIBS="-lbind $LIBS"
9640
9641 else
9642   echo "$ac_t""no" 1>&6
9643 fi
9644
9645         ac_cv_func_res_query=$ac_cv_lib_bind_res_query
9646 fi
9647
9648 if test $ac_cv_func_res_query = no ; then 
9649         echo $ac_n "checking for __res_query in -lbind""... $ac_c" 1>&6
9650 echo "configure:9651: checking for __res_query in -lbind" >&5
9651 ac_lib_var=`echo bind'_'__res_query | sed 'y%./+-:%__p__%'`
9652 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9653   echo $ac_n "(cached) $ac_c" 1>&6
9654 else
9655   ac_save_LIBS="$LIBS"
9656 LIBS="-lbind  $LIBS"
9657 cat > conftest.$ac_ext <<EOF
9658 #line 9659 "configure"
9659 #include "confdefs.h"
9660 /* Override any gcc2 internal prototype to avoid an error.  */
9661 /* We use char because int might match the return type of a gcc2
9662     builtin and then its argument prototype would still apply.  */
9663 char __res_query();
9664
9665 int main() {
9666 __res_query()
9667 ; return 0; }
9668 EOF
9669 if { (eval echo configure:9670: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9670   rm -rf conftest*
9671   eval "ac_cv_lib_$ac_lib_var=yes"
9672 else
9673   echo "configure: failed program was:" >&5
9674   cat conftest.$ac_ext >&5
9675   rm -rf conftest*
9676   eval "ac_cv_lib_$ac_lib_var=no"
9677 fi
9678 rm -f conftest*
9679 LIBS="$ac_save_LIBS"
9680
9681 fi
9682 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9683   echo "$ac_t""yes" 1>&6
9684     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9685     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9686   cat >> confdefs.h <<EOF
9687 #define $ac_tr_lib 1
9688 EOF
9689
9690   LIBS="-lbind $LIBS"
9691
9692 else
9693   echo "$ac_t""no" 1>&6
9694 fi
9695
9696         ac_cv_func_res_query=$ac_cv_lib_bind___res_query
9697 fi
9698
9699 if test $ac_cv_func_res_query = no ; then 
9700         echo $ac_n "checking for res_query in -lresolv""... $ac_c" 1>&6
9701 echo "configure:9702: checking for res_query in -lresolv" >&5
9702 ac_lib_var=`echo resolv'_'res_query | sed 'y%./+-:%__p__%'`
9703 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9704   echo $ac_n "(cached) $ac_c" 1>&6
9705 else
9706   ac_save_LIBS="$LIBS"
9707 LIBS="-lresolv  $LIBS"
9708 cat > conftest.$ac_ext <<EOF
9709 #line 9710 "configure"
9710 #include "confdefs.h"
9711 /* Override any gcc2 internal prototype to avoid an error.  */
9712 /* We use char because int might match the return type of a gcc2
9713     builtin and then its argument prototype would still apply.  */
9714 char res_query();
9715
9716 int main() {
9717 res_query()
9718 ; return 0; }
9719 EOF
9720 if { (eval echo configure:9721: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9721   rm -rf conftest*
9722   eval "ac_cv_lib_$ac_lib_var=yes"
9723 else
9724   echo "configure: failed program was:" >&5
9725   cat conftest.$ac_ext >&5
9726   rm -rf conftest*
9727   eval "ac_cv_lib_$ac_lib_var=no"
9728 fi
9729 rm -f conftest*
9730 LIBS="$ac_save_LIBS"
9731
9732 fi
9733 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9734   echo "$ac_t""yes" 1>&6
9735     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9736     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9737   cat >> confdefs.h <<EOF
9738 #define $ac_tr_lib 1
9739 EOF
9740
9741   LIBS="-lresolv $LIBS"
9742
9743 else
9744   echo "$ac_t""no" 1>&6
9745 fi
9746
9747         ac_cv_func_res_query=$ac_cv_lib_resolv_res_query
9748 fi
9749
9750 if test $ac_cv_func_res_query = no ; then 
9751         echo $ac_n "checking for __res_query in -lresolv""... $ac_c" 1>&6
9752 echo "configure:9753: checking for __res_query in -lresolv" >&5
9753 ac_lib_var=`echo resolv'_'__res_query | sed 'y%./+-:%__p__%'`
9754 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9755   echo $ac_n "(cached) $ac_c" 1>&6
9756 else
9757   ac_save_LIBS="$LIBS"
9758 LIBS="-lresolv  $LIBS"
9759 cat > conftest.$ac_ext <<EOF
9760 #line 9761 "configure"
9761 #include "confdefs.h"
9762 /* Override any gcc2 internal prototype to avoid an error.  */
9763 /* We use char because int might match the return type of a gcc2
9764     builtin and then its argument prototype would still apply.  */
9765 char __res_query();
9766
9767 int main() {
9768 __res_query()
9769 ; return 0; }
9770 EOF
9771 if { (eval echo configure:9772: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9772   rm -rf conftest*
9773   eval "ac_cv_lib_$ac_lib_var=yes"
9774 else
9775   echo "configure: failed program was:" >&5
9776   cat conftest.$ac_ext >&5
9777   rm -rf conftest*
9778   eval "ac_cv_lib_$ac_lib_var=no"
9779 fi
9780 rm -f conftest*
9781 LIBS="$ac_save_LIBS"
9782
9783 fi
9784 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9785   echo "$ac_t""yes" 1>&6
9786     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9787     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9788   cat >> confdefs.h <<EOF
9789 #define $ac_tr_lib 1
9790 EOF
9791
9792   LIBS="-lresolv $LIBS"
9793
9794 else
9795   echo "$ac_t""no" 1>&6
9796 fi
9797
9798         ac_cv_func_res_query=$ac_cv_lib_resolv___res_query
9799 fi
9800
9801 if test $ac_cv_func_res_query = no ; then 
9802         echo $ac_n "checking for _res_9_query in -lresolv""... $ac_c" 1>&6
9803 echo "configure:9804: checking for _res_9_query in -lresolv" >&5
9804 ac_lib_var=`echo resolv'_'_res_9_query | sed 'y%./+-:%__p__%'`
9805 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9806   echo $ac_n "(cached) $ac_c" 1>&6
9807 else
9808   ac_save_LIBS="$LIBS"
9809 LIBS="-lresolv  $LIBS"
9810 cat > conftest.$ac_ext <<EOF
9811 #line 9812 "configure"
9812 #include "confdefs.h"
9813 /* Override any gcc2 internal prototype to avoid an error.  */
9814 /* We use char because int might match the return type of a gcc2
9815     builtin and then its argument prototype would still apply.  */
9816 char _res_9_query();
9817
9818 int main() {
9819 _res_9_query()
9820 ; return 0; }
9821 EOF
9822 if { (eval echo configure:9823: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9823   rm -rf conftest*
9824   eval "ac_cv_lib_$ac_lib_var=yes"
9825 else
9826   echo "configure: failed program was:" >&5
9827   cat conftest.$ac_ext >&5
9828   rm -rf conftest*
9829   eval "ac_cv_lib_$ac_lib_var=no"
9830 fi
9831 rm -f conftest*
9832 LIBS="$ac_save_LIBS"
9833
9834 fi
9835 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9836   echo "$ac_t""yes" 1>&6
9837     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9838     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9839   cat >> confdefs.h <<EOF
9840 #define $ac_tr_lib 1
9841 EOF
9842
9843   LIBS="-lresolv $LIBS"
9844
9845 else
9846   echo "$ac_t""no" 1>&6
9847 fi
9848
9849         ac_cv_func_res_query=$ac_cv_lib_resolv_res_9_query
9850 fi
9851
9852 if test "$ac_cv_func_res_query" = yes ; then
9853         cat >> confdefs.h <<\EOF
9854 #define HAVE_RES_QUERY 1
9855 EOF
9856
9857
9858         if test $ol_enable_dnssrv != no ; then
9859                 ol_link_dnssrv=yes
9860         fi
9861 fi
9862
9863 if test "$ol_enable_dnssrv" != no -a "$ol_link_dnssrv" = no ; then
9864         { echo "configure: error: DNSSRV requires res_query()" 1>&2; exit 1; }
9865 fi
9866
9867 for ac_func in getaddrinfo getnameinfo gai_strerror inet_ntop 
9868 do
9869 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9870 echo "configure:9871: checking for $ac_func" >&5
9871 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
9872   echo $ac_n "(cached) $ac_c" 1>&6
9873 else
9874   cat > conftest.$ac_ext <<EOF
9875 #line 9876 "configure"
9876 #include "confdefs.h"
9877 /* System header to define __stub macros and hopefully few prototypes,
9878     which can conflict with char $ac_func(); below.  */
9879 #include <assert.h>
9880 /* Override any gcc2 internal prototype to avoid an error.  */
9881 /* We use char because int might match the return type of a gcc2
9882     builtin and then its argument prototype would still apply.  */
9883 char $ac_func();
9884 char (*f)();
9885
9886 int main() {
9887
9888 /* The GNU C library defines this for functions which it implements
9889     to always fail with ENOSYS.  Some functions are actually named
9890     something starting with __ and the normal name is an alias.  */
9891 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9892 choke me
9893 #else
9894 f = $ac_func;
9895 #endif
9896
9897 ; return 0; }
9898 EOF
9899 if { (eval echo configure:9900: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9900   rm -rf conftest*
9901   eval "ac_cv_func_$ac_func=yes"
9902 else
9903   echo "configure: failed program was:" >&5
9904   cat conftest.$ac_ext >&5
9905   rm -rf conftest*
9906   eval "ac_cv_func_$ac_func=no"
9907 fi
9908 rm -f conftest*
9909 fi
9910
9911 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9912   echo "$ac_t""yes" 1>&6
9913     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9914   cat >> confdefs.h <<EOF
9915 #define $ac_tr_func 1
9916 EOF
9917  
9918 else
9919   echo "$ac_t""no" 1>&6
9920 fi
9921 done
9922
9923
9924 ol_link_ipv6=no
9925 if test $ac_cv_func_getaddrinfo = no -o $ac_cv_func_inet_ntop = no ; then
9926         if test $ol_enable_ipv6 = yes ; then
9927                 { echo "configure: error: IPv6 support requires getaddrinfo() and inet_ntop()" 1>&2; exit 1; }
9928         fi
9929 elif test $ol_enable_ipv6 != no ; then
9930         echo $ac_n "checking INET6_ADDRSTRLEN""... $ac_c" 1>&6
9931 echo "configure:9932: checking INET6_ADDRSTRLEN" >&5
9932 if eval "test \"\${ol_cv_inet6_addrstrlen+set}\" = set"; then
9933   echo $ac_n "(cached) $ac_c" 1>&6
9934 else
9935   
9936                 cat > conftest.$ac_ext <<EOF
9937 #line 9938 "configure"
9938 #include "confdefs.h"
9939
9940 #                       include <netinet/in.h>
9941 #                       ifdef INET6_ADDRSTRLEN
9942                                 __has_inet6_addrstrlen__;
9943 #                       endif
9944                 
9945 EOF
9946 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9947   egrep "__has_inet6_addrstrlen__" >/dev/null 2>&1; then
9948   rm -rf conftest*
9949   ol_cv_inet6_addrstrlen=yes
9950 else
9951   rm -rf conftest*
9952   ol_cv_inet6_addrstrlen=no
9953 fi
9954 rm -f conftest*
9955
9956 fi
9957
9958 echo "$ac_t""$ol_cv_inet6_addrstrlen" 1>&6
9959
9960
9961         echo $ac_n "checking struct sockaddr_storage""... $ac_c" 1>&6
9962 echo "configure:9963: checking struct sockaddr_storage" >&5
9963 if eval "test \"\${ol_cv_struct_sockaddr_storage+set}\" = set"; then
9964   echo $ac_n "(cached) $ac_c" 1>&6
9965 else
9966   
9967                 cat > conftest.$ac_ext <<EOF
9968 #line 9969 "configure"
9969 #include "confdefs.h"
9970
9971 #include <sys/types.h>
9972 #include <sys/socket.h>
9973
9974 int main() {
9975
9976                         struct sockaddr_storage ss;
9977
9978 ; return 0; }
9979 EOF
9980 if { (eval echo configure:9981: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9981   rm -rf conftest*
9982   ol_cv_struct_sockaddr_storage=yes
9983 else
9984   echo "configure: failed program was:" >&5
9985   cat conftest.$ac_ext >&5
9986   rm -rf conftest*
9987   ol_cv_struct_sockaddr_storage=no
9988 fi
9989 rm -f conftest*
9990 fi
9991
9992 echo "$ac_t""$ol_cv_struct_sockaddr_storage" 1>&6
9993
9994         if test $ol_cv_inet6_addrstrlen = yes \
9995                 -a $ol_cv_struct_sockaddr_storage = yes ; then
9996                 ol_link_ipv6=yes
9997         elif test $ol_enable_ipv6 = yes \
9998                         -a $ol_cv_inet6_addrstrlen = no ; then
9999                 { echo "configure: error: IPv6 support requires INET6_ADDRSTRLEN" 1>&2; exit 1; }
10000         elif test $ol_enable_ipv6 = yes \
10001                         -a $ol_cv_struct_sockaddr_storage = no ; then
10002                 { echo "configure: error: IPv6 support requires struct sockaddr_storage" 1>&2; exit 1; }
10003         fi
10004 fi
10005
10006 if test $ol_enable_local != no ; then
10007         for ac_hdr in sys/un.h 
10008 do
10009 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10010 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10011 echo "configure:10012: checking for $ac_hdr" >&5
10012 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10013   echo $ac_n "(cached) $ac_c" 1>&6
10014 else
10015   cat > conftest.$ac_ext <<EOF
10016 #line 10017 "configure"
10017 #include "confdefs.h"
10018 #include <$ac_hdr>
10019 EOF
10020 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10021 { (eval echo configure:10022: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10022 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10023 if test -z "$ac_err"; then
10024   rm -rf conftest*
10025   eval "ac_cv_header_$ac_safe=yes"
10026 else
10027   echo "$ac_err" >&5
10028   echo "configure: failed program was:" >&5
10029   cat conftest.$ac_ext >&5
10030   rm -rf conftest*
10031   eval "ac_cv_header_$ac_safe=no"
10032 fi
10033 rm -f conftest*
10034 fi
10035 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10036   echo "$ac_t""yes" 1>&6
10037     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10038   cat >> confdefs.h <<EOF
10039 #define $ac_tr_hdr 1
10040 EOF
10041  
10042 else
10043   echo "$ac_t""no" 1>&6
10044 fi
10045 done
10046
10047
10048         if test $ol_enable_local = auto ; then
10049                 ol_enable_local=$ac_cv_header_sys_un_h
10050         elif test $ac_cv_header_sys_un_h = no ; then
10051                 { echo "configure: error: AF_LOCAL domain support requires sys/un.h" 1>&2; exit 1; }
10052         fi
10053 fi
10054
10055 ol_link_kbind=no
10056 ol_link_krb5=no
10057 ol_link_krb4=no
10058
10059 if test $ol_with_kerberos = yes -o $ol_with_kerberos = auto \
10060         -o $ol_with_kerberos = k5 -o $ol_with_kerberos = k5only \
10061         -o $ol_with_kerberos = k425 ; then
10062
10063         for ac_hdr in krb5.h
10064 do
10065 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10066 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10067 echo "configure:10068: checking for $ac_hdr" >&5
10068 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10069   echo $ac_n "(cached) $ac_c" 1>&6
10070 else
10071   cat > conftest.$ac_ext <<EOF
10072 #line 10073 "configure"
10073 #include "confdefs.h"
10074 #include <$ac_hdr>
10075 EOF
10076 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10077 { (eval echo configure:10078: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10078 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10079 if test -z "$ac_err"; then
10080   rm -rf conftest*
10081   eval "ac_cv_header_$ac_safe=yes"
10082 else
10083   echo "$ac_err" >&5
10084   echo "configure: failed program was:" >&5
10085   cat conftest.$ac_ext >&5
10086   rm -rf conftest*
10087   eval "ac_cv_header_$ac_safe=no"
10088 fi
10089 rm -f conftest*
10090 fi
10091 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10092   echo "$ac_t""yes" 1>&6
10093     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10094   cat >> confdefs.h <<EOF
10095 #define $ac_tr_hdr 1
10096 EOF
10097  
10098 else
10099   echo "$ac_t""no" 1>&6
10100 fi
10101 done
10102
10103
10104         if test $ac_cv_header_krb5_h = yes ; then
10105                                 for ac_hdr in heim_err.h
10106 do
10107 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10108 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10109 echo "configure:10110: checking for $ac_hdr" >&5
10110 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10111   echo $ac_n "(cached) $ac_c" 1>&6
10112 else
10113   cat > conftest.$ac_ext <<EOF
10114 #line 10115 "configure"
10115 #include "confdefs.h"
10116 #include <$ac_hdr>
10117 EOF
10118 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10119 { (eval echo configure:10120: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10120 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10121 if test -z "$ac_err"; then
10122   rm -rf conftest*
10123   eval "ac_cv_header_$ac_safe=yes"
10124 else
10125   echo "$ac_err" >&5
10126   echo "configure: failed program was:" >&5
10127   cat conftest.$ac_ext >&5
10128   rm -rf conftest*
10129   eval "ac_cv_header_$ac_safe=no"
10130 fi
10131 rm -f conftest*
10132 fi
10133 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10134   echo "$ac_t""yes" 1>&6
10135     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10136   cat >> confdefs.h <<EOF
10137 #define $ac_tr_hdr 1
10138 EOF
10139  
10140 else
10141   echo "$ac_t""no" 1>&6
10142 fi
10143 done
10144
10145                 if test $ac_cv_header_heim_err_h = yes ; then
10146                         krb5_impl=heimdal
10147                 else
10148                         krb5_impl=mit
10149                 fi
10150
10151                 if test $krb5_impl = mit; then
10152                         echo $ac_n "checking for main in -lk5crypto""... $ac_c" 1>&6
10153 echo "configure:10154: checking for main in -lk5crypto" >&5
10154 ac_lib_var=`echo k5crypto'_'main | sed 'y%./+-:%__p__%'`
10155 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10156   echo $ac_n "(cached) $ac_c" 1>&6
10157 else
10158   ac_save_LIBS="$LIBS"
10159 LIBS="-lk5crypto  $LIBS"
10160 cat > conftest.$ac_ext <<EOF
10161 #line 10162 "configure"
10162 #include "confdefs.h"
10163
10164 int main() {
10165 main()
10166 ; return 0; }
10167 EOF
10168 if { (eval echo configure:10169: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10169   rm -rf conftest*
10170   eval "ac_cv_lib_$ac_lib_var=yes"
10171 else
10172   echo "configure: failed program was:" >&5
10173   cat conftest.$ac_ext >&5
10174   rm -rf conftest*
10175   eval "ac_cv_lib_$ac_lib_var=no"
10176 fi
10177 rm -f conftest*
10178 LIBS="$ac_save_LIBS"
10179
10180 fi
10181 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10182   echo "$ac_t""yes" 1>&6
10183   krb5crypto=k5crypto
10184 else
10185   echo "$ac_t""no" 1>&6
10186 krb5crypto=crypto
10187 fi
10188
10189
10190                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
10191 echo "configure:10192: checking for main in -lkrb5" >&5
10192 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
10193 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10194   echo $ac_n "(cached) $ac_c" 1>&6
10195 else
10196   ac_save_LIBS="$LIBS"
10197 LIBS="-lkrb5 -l$krb5crypto -lcom_err $LIBS"
10198 cat > conftest.$ac_ext <<EOF
10199 #line 10200 "configure"
10200 #include "confdefs.h"
10201
10202 int main() {
10203 main()
10204 ; return 0; }
10205 EOF
10206 if { (eval echo configure:10207: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10207   rm -rf conftest*
10208   eval "ac_cv_lib_$ac_lib_var=yes"
10209 else
10210   echo "configure: failed program was:" >&5
10211   cat conftest.$ac_ext >&5
10212   rm -rf conftest*
10213   eval "ac_cv_lib_$ac_lib_var=no"
10214 fi
10215 rm -f conftest*
10216 LIBS="$ac_save_LIBS"
10217
10218 fi
10219 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10220   echo "$ac_t""yes" 1>&6
10221   have_krb5=yes
10222                                 KRB5_LIBS="-lkrb5 -l$krb5crypto -lcom_err"
10223 else
10224   echo "$ac_t""no" 1>&6
10225 have_krb5=no
10226 fi
10227
10228
10229                 elif test $krb5_impl = heimdal; then
10230                         echo $ac_n "checking for main in -ldes""... $ac_c" 1>&6
10231 echo "configure:10232: checking for main in -ldes" >&5
10232 ac_lib_var=`echo des'_'main | sed 'y%./+-:%__p__%'`
10233 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10234   echo $ac_n "(cached) $ac_c" 1>&6
10235 else
10236   ac_save_LIBS="$LIBS"
10237 LIBS="-ldes  $LIBS"
10238 cat > conftest.$ac_ext <<EOF
10239 #line 10240 "configure"
10240 #include "confdefs.h"
10241
10242 int main() {
10243 main()
10244 ; return 0; }
10245 EOF
10246 if { (eval echo configure:10247: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10247   rm -rf conftest*
10248   eval "ac_cv_lib_$ac_lib_var=yes"
10249 else
10250   echo "configure: failed program was:" >&5
10251   cat conftest.$ac_ext >&5
10252   rm -rf conftest*
10253   eval "ac_cv_lib_$ac_lib_var=no"
10254 fi
10255 rm -f conftest*
10256 LIBS="$ac_save_LIBS"
10257
10258 fi
10259 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10260   echo "$ac_t""yes" 1>&6
10261   krb5crypto=des
10262 else
10263   echo "$ac_t""no" 1>&6
10264 krb5crypto=crypto
10265 fi
10266
10267
10268                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
10269 echo "configure:10270: checking for main in -lkrb5" >&5
10270 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
10271 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10272   echo $ac_n "(cached) $ac_c" 1>&6
10273 else
10274   ac_save_LIBS="$LIBS"
10275 LIBS="-lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err $LIBS"
10276 cat > conftest.$ac_ext <<EOF
10277 #line 10278 "configure"
10278 #include "confdefs.h"
10279
10280 int main() {
10281 main()
10282 ; return 0; }
10283 EOF
10284 if { (eval echo configure:10285: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10285   rm -rf conftest*
10286   eval "ac_cv_lib_$ac_lib_var=yes"
10287 else
10288   echo "configure: failed program was:" >&5
10289   cat conftest.$ac_ext >&5
10290   rm -rf conftest*
10291   eval "ac_cv_lib_$ac_lib_var=no"
10292 fi
10293 rm -f conftest*
10294 LIBS="$ac_save_LIBS"
10295
10296 fi
10297 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10298   echo "$ac_t""yes" 1>&6
10299   have_krb5=yes
10300                                 KRB5_LIBS="-lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err"
10301 else
10302   echo "$ac_t""no" 1>&6
10303 have_krb5=no
10304 fi
10305
10306
10307                         cat >> confdefs.h <<\EOF
10308 #define HAVE_HEIMDAL_KERBEROS 1
10309 EOF
10310
10311
10312                 else
10313                         have_krb5=no
10314                         echo "configure: warning: Unrecognized Kerberos5 Implementation" 1>&2
10315                 fi
10316
10317                 if test $have_krb5 = yes ; then
10318                         ol_link_krb5=yes
10319
10320                         cat >> confdefs.h <<\EOF
10321 #define HAVE_KRB5 1
10322 EOF
10323
10324
10325                         if test $ol_with_kerberos = k5only ; then
10326                                 ol_with_kerberos=found
10327                         fi
10328
10329                 elif test $ol_with_kerberos != auto ; then
10330                         { echo "configure: error: Required Kerberos 5 support not available" 1>&2; exit 1; }
10331                 fi
10332
10333         fi
10334 fi
10335
10336 if test $ol_link_krb5 = yes -a \( $ol_with_kerberos = yes -o \
10337         $ol_with_kerberos = auto -o $ol_with_kerberos = k425 \) ; then
10338
10339         for ac_hdr in kerberosIV/krb.h kerberosIV/des.h
10340 do
10341 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10342 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10343 echo "configure:10344: checking for $ac_hdr" >&5
10344 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10345   echo $ac_n "(cached) $ac_c" 1>&6
10346 else
10347   cat > conftest.$ac_ext <<EOF
10348 #line 10349 "configure"
10349 #include "confdefs.h"
10350 #include <$ac_hdr>
10351 EOF
10352 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10353 { (eval echo configure:10354: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10354 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10355 if test -z "$ac_err"; then
10356   rm -rf conftest*
10357   eval "ac_cv_header_$ac_safe=yes"
10358 else
10359   echo "$ac_err" >&5
10360   echo "configure: failed program was:" >&5
10361   cat conftest.$ac_ext >&5
10362   rm -rf conftest*
10363   eval "ac_cv_header_$ac_safe=no"
10364 fi
10365 rm -f conftest*
10366 fi
10367 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10368   echo "$ac_t""yes" 1>&6
10369     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10370   cat >> confdefs.h <<EOF
10371 #define $ac_tr_hdr 1
10372 EOF
10373  
10374 else
10375   echo "$ac_t""no" 1>&6
10376 fi
10377 done
10378
10379
10380         if test $ac_cv_header_kerberosIV_krb_h = yes ; then
10381                 if test $krb5_impl = mit; then
10382                         echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
10383 echo "configure:10384: checking for main in -lkrb4" >&5
10384 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
10385 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10386   echo $ac_n "(cached) $ac_c" 1>&6
10387 else
10388   ac_save_LIBS="$LIBS"
10389 LIBS="-lkrb4 -ldes425 -lkrb5 -l$krb5crypto -lcom_err $LIBS"
10390 cat > conftest.$ac_ext <<EOF
10391 #line 10392 "configure"
10392 #include "confdefs.h"
10393
10394 int main() {
10395 main()
10396 ; return 0; }
10397 EOF
10398 if { (eval echo configure:10399: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10399   rm -rf conftest*
10400   eval "ac_cv_lib_$ac_lib_var=yes"
10401 else
10402   echo "configure: failed program was:" >&5
10403   cat conftest.$ac_ext >&5
10404   rm -rf conftest*
10405   eval "ac_cv_lib_$ac_lib_var=no"
10406 fi
10407 rm -f conftest*
10408 LIBS="$ac_save_LIBS"
10409
10410 fi
10411 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10412   echo "$ac_t""yes" 1>&6
10413   have_k425=yes
10414                                 KRB4_LIBS="-lkrb4 -ldes425"
10415 else
10416   echo "$ac_t""no" 1>&6
10417 have_k425=no
10418 fi
10419
10420
10421                 elif test $krb5_impl = heimdal; then
10422                         echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
10423 echo "configure:10424: checking for main in -lkrb4" >&5
10424 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
10425 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10426   echo $ac_n "(cached) $ac_c" 1>&6
10427 else
10428   ac_save_LIBS="$LIBS"
10429 LIBS="-lkrb4 -lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err $LIBS"
10430 cat > conftest.$ac_ext <<EOF
10431 #line 10432 "configure"
10432 #include "confdefs.h"
10433
10434 int main() {
10435 main()
10436 ; return 0; }
10437 EOF
10438 if { (eval echo configure:10439: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10439   rm -rf conftest*
10440   eval "ac_cv_lib_$ac_lib_var=yes"
10441 else
10442   echo "configure: failed program was:" >&5
10443   cat conftest.$ac_ext >&5
10444   rm -rf conftest*
10445   eval "ac_cv_lib_$ac_lib_var=no"
10446 fi
10447 rm -f conftest*
10448 LIBS="$ac_save_LIBS"
10449
10450 fi
10451 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10452   echo "$ac_t""yes" 1>&6
10453   have_k425=yes
10454                                 KRB4_LIBS="-lkrb4"
10455 else
10456   echo "$ac_t""no" 1>&6
10457 have_k425=no
10458 fi
10459
10460
10461                 else
10462                         have_425=no
10463                         echo "configure: warning: Unrecongized Kerberos V Implementation" 1>&2
10464                 fi
10465
10466                 if test $have_k425 = yes ; then
10467                         ol_with_kerberos=found
10468                         ol_link_krb4=yes
10469
10470                         cat >> confdefs.h <<\EOF
10471 #define HAVE_KRB425 1
10472 EOF
10473
10474                         cat >> confdefs.h <<\EOF
10475 #define HAVE_KRB4 1
10476 EOF
10477
10478
10479                         echo $ac_n "checking for des_debug in Kerberos libraries""... $ac_c" 1>&6
10480 echo "configure:10481: checking for des_debug in Kerberos libraries" >&5
10481 if eval "test \"\${ol_cv_var_des_debug+set}\" = set"; then
10482   echo $ac_n "(cached) $ac_c" 1>&6
10483 else
10484   
10485                                                                 save_LIBS="$LIBS"
10486                                 LIBS="$KRB4_LIBS $KRB5_LIBS $LIBS"
10487                                 cat > conftest.$ac_ext <<EOF
10488 #line 10489 "configure"
10489 #include "confdefs.h"
10490
10491 #include <kerberosIV/krb.h>
10492 #include <kerberosIV/des.h>
10493 extern int des_debug;
10494
10495 int main() {
10496
10497 des_debug = 1;
10498
10499 ; return 0; }
10500 EOF
10501 if { (eval echo configure:10502: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10502   rm -rf conftest*
10503   ol_cv_var_des_debug=yes
10504 else
10505   echo "configure: failed program was:" >&5
10506   cat conftest.$ac_ext >&5
10507   rm -rf conftest*
10508   ol_cv_var_des_debug=no
10509 fi
10510 rm -f conftest*
10511                                                                 LIBS="$save_LIBS"
10512                         
10513 fi
10514
10515 echo "$ac_t""$ol_cv_var_des_debug" 1>&6
10516
10517                         if test $ol_cv_var_des_debug = yes ; then
10518                                 cat >> confdefs.h <<\EOF
10519 #define HAVE_DES_DEBUG 1
10520 EOF
10521
10522                         fi
10523
10524                         LIBS="$save_LIBS"
10525                 fi
10526         fi
10527 fi
10528
10529 if test $ol_link_krb5 = yes ; then
10530         ol_with_kerberos=found
10531 fi
10532
10533 if test $ol_with_kerberos = yes -o $ol_with_kerberos = auto \
10534         -o $ol_with_kerberos = k4 -o $ol_with_kerberos = kth ; then
10535
10536         for ac_hdr in krb.h des.h krb-archaeology.h 
10537 do
10538 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10539 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10540 echo "configure:10541: checking for $ac_hdr" >&5
10541 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10542   echo $ac_n "(cached) $ac_c" 1>&6
10543 else
10544   cat > conftest.$ac_ext <<EOF
10545 #line 10546 "configure"
10546 #include "confdefs.h"
10547 #include <$ac_hdr>
10548 EOF
10549 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10550 { (eval echo configure:10551: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10551 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10552 if test -z "$ac_err"; then
10553   rm -rf conftest*
10554   eval "ac_cv_header_$ac_safe=yes"
10555 else
10556   echo "$ac_err" >&5
10557   echo "configure: failed program was:" >&5
10558   cat conftest.$ac_ext >&5
10559   rm -rf conftest*
10560   eval "ac_cv_header_$ac_safe=no"
10561 fi
10562 rm -f conftest*
10563 fi
10564 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10565   echo "$ac_t""yes" 1>&6
10566     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10567   cat >> confdefs.h <<EOF
10568 #define $ac_tr_hdr 1
10569 EOF
10570  
10571 else
10572   echo "$ac_t""no" 1>&6
10573 fi
10574 done
10575
10576
10577         if test $ac_cv_header_krb_h = yes ; then
10578                 echo $ac_n "checking for main in -lkrb""... $ac_c" 1>&6
10579 echo "configure:10580: checking for main in -lkrb" >&5
10580 ac_lib_var=`echo krb'_'main | sed 'y%./+-:%__p__%'`
10581 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10582   echo $ac_n "(cached) $ac_c" 1>&6
10583 else
10584   ac_save_LIBS="$LIBS"
10585 LIBS="-lkrb -ldes $LIBS"
10586 cat > conftest.$ac_ext <<EOF
10587 #line 10588 "configure"
10588 #include "confdefs.h"
10589
10590 int main() {
10591 main()
10592 ; return 0; }
10593 EOF
10594 if { (eval echo configure:10595: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10595   rm -rf conftest*
10596   eval "ac_cv_lib_$ac_lib_var=yes"
10597 else
10598   echo "configure: failed program was:" >&5
10599   cat conftest.$ac_ext >&5
10600   rm -rf conftest*
10601   eval "ac_cv_lib_$ac_lib_var=no"
10602 fi
10603 rm -f conftest*
10604 LIBS="$ac_save_LIBS"
10605
10606 fi
10607 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10608   echo "$ac_t""yes" 1>&6
10609   have_k4=yes
10610 else
10611   echo "$ac_t""no" 1>&6
10612 have_k4=no
10613 fi
10614
10615
10616                 if test $have_k4 = yes ; then
10617                         ol_with_kerberos=found
10618                         ol_link_krb4=yes
10619
10620                         cat >> confdefs.h <<\EOF
10621 #define HAVE_KRB4 1
10622 EOF
10623
10624
10625                         KRB4_LIBS="-lkrb -ldes"
10626
10627                         if test $ac_cv_header_krb_archaeology_h = yes ; then
10628                                 cat >> confdefs.h <<\EOF
10629 #define HAVE_KTH_KERBEROS 1
10630 EOF
10631
10632                         fi
10633                 fi
10634         fi
10635 fi
10636
10637 if test $ol_link_krb4 = yes -a $ol_enable_kbind != no ; then
10638         ol_link_kbind=yes
10639
10640 elif test $ol_enable_kbind = yes ; then
10641         { echo "configure: error: Kerberos IV detection failed" 1>&2; exit 1; }
10642 fi
10643
10644 if test $ol_link_krb4 = yes -o $ol_link_krb5 = yes ; then
10645         cat >> confdefs.h <<\EOF
10646 #define HAVE_KERBEROS 1
10647 EOF
10648
10649
10650 elif test $ol_with_kerberos != auto -a $ol_with_kerberos != no ; then
10651         { echo "configure: error: Kerberos detection failed" 1>&2; exit 1; }
10652 fi
10653
10654 ol_link_tls=no
10655 if test $ol_with_tls != no ; then
10656         for ac_hdr in openssl/ssl.h ssl.h
10657 do
10658 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10659 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10660 echo "configure:10661: checking for $ac_hdr" >&5
10661 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10662   echo $ac_n "(cached) $ac_c" 1>&6
10663 else
10664   cat > conftest.$ac_ext <<EOF
10665 #line 10666 "configure"
10666 #include "confdefs.h"
10667 #include <$ac_hdr>
10668 EOF
10669 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10670 { (eval echo configure:10671: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10671 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10672 if test -z "$ac_err"; then
10673   rm -rf conftest*
10674   eval "ac_cv_header_$ac_safe=yes"
10675 else
10676   echo "$ac_err" >&5
10677   echo "configure: failed program was:" >&5
10678   cat conftest.$ac_ext >&5
10679   rm -rf conftest*
10680   eval "ac_cv_header_$ac_safe=no"
10681 fi
10682 rm -f conftest*
10683 fi
10684 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10685   echo "$ac_t""yes" 1>&6
10686     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10687   cat >> confdefs.h <<EOF
10688 #define $ac_tr_hdr 1
10689 EOF
10690  
10691 else
10692   echo "$ac_t""no" 1>&6
10693 fi
10694 done
10695
10696         
10697         if test $ac_cv_header_openssl_ssl_h = yes \
10698                 -o $ac_cv_header_ssl_h = yes ; then
10699                 echo $ac_n "checking for SSLeay_add_ssl_algorithms in -lssl""... $ac_c" 1>&6
10700 echo "configure:10701: checking for SSLeay_add_ssl_algorithms in -lssl" >&5
10701 ac_lib_var=`echo ssl'_'SSLeay_add_ssl_algorithms | sed 'y%./+-:%__p__%'`
10702 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10703   echo $ac_n "(cached) $ac_c" 1>&6
10704 else
10705   ac_save_LIBS="$LIBS"
10706 LIBS="-lssl -lcrypto $LIBS"
10707 cat > conftest.$ac_ext <<EOF
10708 #line 10709 "configure"
10709 #include "confdefs.h"
10710 /* Override any gcc2 internal prototype to avoid an error.  */
10711 /* We use char because int might match the return type of a gcc2
10712     builtin and then its argument prototype would still apply.  */
10713 char SSLeay_add_ssl_algorithms();
10714
10715 int main() {
10716 SSLeay_add_ssl_algorithms()
10717 ; return 0; }
10718 EOF
10719 if { (eval echo configure:10720: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10720   rm -rf conftest*
10721   eval "ac_cv_lib_$ac_lib_var=yes"
10722 else
10723   echo "configure: failed program was:" >&5
10724   cat conftest.$ac_ext >&5
10725   rm -rf conftest*
10726   eval "ac_cv_lib_$ac_lib_var=no"
10727 fi
10728 rm -f conftest*
10729 LIBS="$ac_save_LIBS"
10730
10731 fi
10732 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10733   echo "$ac_t""yes" 1>&6
10734   have_ssleay=yes
10735                         need_rsaref=no
10736 else
10737   echo "$ac_t""no" 1>&6
10738 have_ssleay=no
10739 fi
10740
10741                         
10742                 if test $have_ssleay = no ; then
10743                         echo $ac_n "checking for SSL_library_init in -lssl""... $ac_c" 1>&6
10744 echo "configure:10745: checking for SSL_library_init in -lssl" >&5
10745 ac_lib_var=`echo ssl'_'SSL_library_init | sed 'y%./+-:%__p__%'`
10746 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10747   echo $ac_n "(cached) $ac_c" 1>&6
10748 else
10749   ac_save_LIBS="$LIBS"
10750 LIBS="-lssl -lcrypto $LIBS"
10751 cat > conftest.$ac_ext <<EOF
10752 #line 10753 "configure"
10753 #include "confdefs.h"
10754 /* Override any gcc2 internal prototype to avoid an error.  */
10755 /* We use char because int might match the return type of a gcc2
10756     builtin and then its argument prototype would still apply.  */
10757 char SSL_library_init();
10758
10759 int main() {
10760 SSL_library_init()
10761 ; return 0; }
10762 EOF
10763 if { (eval echo configure:10764: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10764   rm -rf conftest*
10765   eval "ac_cv_lib_$ac_lib_var=yes"
10766 else
10767   echo "configure: failed program was:" >&5
10768   cat conftest.$ac_ext >&5
10769   rm -rf conftest*
10770   eval "ac_cv_lib_$ac_lib_var=no"
10771 fi
10772 rm -f conftest*
10773 LIBS="$ac_save_LIBS"
10774
10775 fi
10776 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10777   echo "$ac_t""yes" 1>&6
10778   have_ssleay=yes
10779                                 need_rsaref=no
10780 else
10781   echo "$ac_t""no" 1>&6
10782 have_ssleay=no
10783 fi
10784
10785                 fi
10786
10787                 if test $have_ssleay = no ; then
10788                         echo $ac_n "checking for ssl3_accept in -lssl""... $ac_c" 1>&6
10789 echo "configure:10790: checking for ssl3_accept in -lssl" >&5
10790 ac_lib_var=`echo ssl'_'ssl3_accept | sed 'y%./+-:%__p__%'`
10791 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10792   echo $ac_n "(cached) $ac_c" 1>&6
10793 else
10794   ac_save_LIBS="$LIBS"
10795 LIBS="-lssl -lcrypto -lRSAglue -lrsaref $LIBS"
10796 cat > conftest.$ac_ext <<EOF
10797 #line 10798 "configure"
10798 #include "confdefs.h"
10799 /* Override any gcc2 internal prototype to avoid an error.  */
10800 /* We use char because int might match the return type of a gcc2
10801     builtin and then its argument prototype would still apply.  */
10802 char ssl3_accept();
10803
10804 int main() {
10805 ssl3_accept()
10806 ; return 0; }
10807 EOF
10808 if { (eval echo configure:10809: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10809   rm -rf conftest*
10810   eval "ac_cv_lib_$ac_lib_var=yes"
10811 else
10812   echo "configure: failed program was:" >&5
10813   cat conftest.$ac_ext >&5
10814   rm -rf conftest*
10815   eval "ac_cv_lib_$ac_lib_var=no"
10816 fi
10817 rm -f conftest*
10818 LIBS="$ac_save_LIBS"
10819
10820 fi
10821 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10822   echo "$ac_t""yes" 1>&6
10823   have_ssleay=yes
10824                                 need_rsaref=yes
10825 else
10826   echo "$ac_t""no" 1>&6
10827 have_ssleay=no
10828 fi
10829
10830                 fi
10831
10832                 if test $have_ssleay = yes ; then
10833                         ol_with_tls=found
10834                         ol_link_tls=yes
10835
10836                         cat >> confdefs.h <<\EOF
10837 #define HAVE_SSLEAY 1
10838 EOF
10839
10840
10841                         if test $need_rsaref = yes; then
10842                                 cat >> confdefs.h <<\EOF
10843 #define HAVE_RSAREF 1
10844 EOF
10845
10846
10847                                 TLS_LIBS="-lssl -lcrypto -lRSAglue -lrsaref"
10848                         else
10849                                 TLS_LIBS="-lssl -lcrypto"
10850                         fi
10851                 fi
10852         fi
10853
10854 else
10855         echo "configure: warning: TLS data protection not supported!" 1>&2
10856 fi
10857
10858 WITH_TLS=no
10859 if test $ol_link_tls = yes ; then
10860         cat >> confdefs.h <<\EOF
10861 #define HAVE_TLS 1
10862 EOF
10863
10864         WITH_TLS=yes
10865
10866 elif test $ol_with_tls = auto ; then
10867         echo "configure: warning: Could not locate TLS/SSL package" 1>&2
10868         echo "configure: warning: TLS data protection not supported!" 1>&2
10869
10870 elif test $ol_with_tls != no ; then
10871         { echo "configure: error: Could not locate TLS/SSL package" 1>&2; exit 1; }
10872 fi
10873
10874 if test $ol_enable_lmpasswd != no; then
10875         if test $ol_link_tls != yes ; then
10876                 { echo "configure: error: LAN Manager passwords require OpenSSL" 1>&2; exit 1; }
10877         fi
10878
10879         cat >> confdefs.h <<\EOF
10880 #define SLAPD_LMHASH 1
10881 EOF
10882
10883 fi
10884
10885 ol_link_threads=no
10886
10887 if test $ol_with_threads = auto -o $ol_with_threads = yes \
10888         -o $ol_with_threads = nt ; then
10889
10890         
10891         echo $ac_n "checking for _beginthread""... $ac_c" 1>&6
10892 echo "configure:10893: checking for _beginthread" >&5
10893 if eval "test \"\${ac_cv_func__beginthread+set}\" = set"; then
10894   echo $ac_n "(cached) $ac_c" 1>&6
10895 else
10896   cat > conftest.$ac_ext <<EOF
10897 #line 10898 "configure"
10898 #include "confdefs.h"
10899 /* System header to define __stub macros and hopefully few prototypes,
10900     which can conflict with char _beginthread(); below.  */
10901 #include <assert.h>
10902 /* Override any gcc2 internal prototype to avoid an error.  */
10903 /* We use char because int might match the return type of a gcc2
10904     builtin and then its argument prototype would still apply.  */
10905 char _beginthread();
10906 char (*f)();
10907
10908 int main() {
10909
10910 /* The GNU C library defines this for functions which it implements
10911     to always fail with ENOSYS.  Some functions are actually named
10912     something starting with __ and the normal name is an alias.  */
10913 #if defined (__stub__beginthread) || defined (__stub____beginthread)
10914 choke me
10915 #else
10916 f = _beginthread;
10917 #endif
10918
10919 ; return 0; }
10920 EOF
10921 if { (eval echo configure:10922: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10922   rm -rf conftest*
10923   eval "ac_cv_func__beginthread=yes"
10924 else
10925   echo "configure: failed program was:" >&5
10926   cat conftest.$ac_ext >&5
10927   rm -rf conftest*
10928   eval "ac_cv_func__beginthread=no"
10929 fi
10930 rm -f conftest*
10931 fi
10932
10933 if eval "test \"`echo '$ac_cv_func_'_beginthread`\" = yes"; then
10934   echo "$ac_t""yes" 1>&6
10935   :
10936 else
10937   echo "$ac_t""no" 1>&6
10938 fi
10939
10940
10941         if test $ac_cv_func__beginthread = yes ; then
10942                 cat >> confdefs.h <<\EOF
10943 #define HAVE_NT_THREADS 1
10944 EOF
10945
10946                 ol_cv_nt_threads=yes
10947         fi
10948
10949
10950         if test "$ol_cv_nt_threads" = yes ; then
10951                 ol_link_threads=nt
10952                 ol_with_threads=found
10953                 ol_with_yielding_select=yes
10954
10955                 cat >> confdefs.h <<\EOF
10956 #define HAVE_NT_SERVICE_MANAGER 1
10957 EOF
10958
10959                 cat >> confdefs.h <<\EOF
10960 #define HAVE_NT_EVENT_LOG 1
10961 EOF
10962
10963         fi
10964
10965         if test $ol_with_threads = nt ; then
10966                 { echo "configure: error: could not locate NT Threads" 1>&2; exit 1; }
10967         fi
10968 fi
10969
10970 if test $ol_with_threads = auto -o $ol_with_threads = yes \
10971         -o $ol_with_threads = posix ; then
10972
10973         for ac_hdr in pthread.h
10974 do
10975 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10976 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10977 echo "configure:10978: checking for $ac_hdr" >&5
10978 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10979   echo $ac_n "(cached) $ac_c" 1>&6
10980 else
10981   cat > conftest.$ac_ext <<EOF
10982 #line 10983 "configure"
10983 #include "confdefs.h"
10984 #include <$ac_hdr>
10985 EOF
10986 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10987 { (eval echo configure:10988: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10988 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10989 if test -z "$ac_err"; then
10990   rm -rf conftest*
10991   eval "ac_cv_header_$ac_safe=yes"
10992 else
10993   echo "$ac_err" >&5
10994   echo "configure: failed program was:" >&5
10995   cat conftest.$ac_ext >&5
10996   rm -rf conftest*
10997   eval "ac_cv_header_$ac_safe=no"
10998 fi
10999 rm -f conftest*
11000 fi
11001 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11002   echo "$ac_t""yes" 1>&6
11003     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11004   cat >> confdefs.h <<EOF
11005 #define $ac_tr_hdr 1
11006 EOF
11007  
11008 else
11009   echo "$ac_t""no" 1>&6
11010 fi
11011 done
11012
11013
11014         if test $ac_cv_header_pthread_h = yes ; then
11015                 echo $ac_n "checking POSIX thread version""... $ac_c" 1>&6
11016 echo "configure:11017: checking POSIX thread version" >&5
11017 if eval "test \"\${ol_cv_pthread_version+set}\" = set"; then
11018   echo $ac_n "(cached) $ac_c" 1>&6
11019 else
11020   
11021         cat > conftest.$ac_ext <<EOF
11022 #line 11023 "configure"
11023 #include "confdefs.h"
11024
11025 #               include <pthread.h>
11026         
11027 int main() {
11028
11029                 int i = PTHREAD_CREATE_JOINABLE;
11030         
11031 ; return 0; }
11032 EOF
11033 if { (eval echo configure:11034: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11034   rm -rf conftest*
11035   
11036         cat > conftest.$ac_ext <<EOF
11037 #line 11038 "configure"
11038 #include "confdefs.h"
11039 #include <pthread.h>
11040 EOF
11041 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11042   egrep "pthread_detach" >/dev/null 2>&1; then
11043   rm -rf conftest*
11044   ol_cv_pthread_version=10
11045 else
11046   rm -rf conftest*
11047   ol_cv_pthread_version=8
11048 fi
11049 rm -f conftest*
11050
11051 else
11052   echo "configure: failed program was:" >&5
11053   cat conftest.$ac_ext >&5
11054   rm -rf conftest*
11055   
11056         cat > conftest.$ac_ext <<EOF
11057 #line 11058 "configure"
11058 #include "confdefs.h"
11059
11060 #               include <pthread.h>
11061 #               ifdef PTHREAD_CREATE_UNDETACHED
11062                 draft7
11063 #               endif
11064         
11065 EOF
11066 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11067   egrep "draft7" >/dev/null 2>&1; then
11068   rm -rf conftest*
11069   ol_cv_pthread_version=7
11070 else
11071   rm -rf conftest*
11072   
11073         cat > conftest.$ac_ext <<EOF
11074 #line 11075 "configure"
11075 #include "confdefs.h"
11076 #include <pthread.h>
11077 EOF
11078 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11079   egrep "pthread_attr_init" >/dev/null 2>&1; then
11080   rm -rf conftest*
11081   ol_cv_pthread_version=6
11082 else
11083   rm -rf conftest*
11084   
11085         cat > conftest.$ac_ext <<EOF
11086 #line 11087 "configure"
11087 #include "confdefs.h"
11088
11089 #               include <pthread.h>
11090 #ifdef          PTHREAD_MUTEX_INITIALIZER
11091                 draft5
11092 #endif
11093         
11094 EOF
11095 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11096   egrep "draft5" >/dev/null 2>&1; then
11097   rm -rf conftest*
11098   ol_cv_pthread_version=5
11099 else
11100   rm -rf conftest*
11101   ol_cv_pthread_version=4
11102 fi
11103 rm -f conftest*
11104  
11105 fi
11106 rm -f conftest*
11107  
11108 fi
11109 rm -f conftest*
11110  
11111 fi
11112 rm -f conftest*
11113
11114 fi
11115
11116 echo "$ac_t""$ol_cv_pthread_version" 1>&6
11117
11118
11119                 if test $ol_cv_pthread_version != 0 ; then
11120                         cat >> confdefs.h <<EOF
11121 #define HAVE_PTHREADS $ol_cv_pthread_version
11122 EOF
11123
11124                 else
11125                         { echo "configure: error: unknown pthread version" 1>&2; exit 1; }
11126                 fi
11127
11128                 # consider threads found
11129                 ol_with_threads=found
11130
11131                 
11132         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
11133 echo "configure:11134: checking for LinuxThreads pthread.h" >&5
11134 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
11135   echo $ac_n "(cached) $ac_c" 1>&6
11136 else
11137   cat > conftest.$ac_ext <<EOF
11138 #line 11139 "configure"
11139 #include "confdefs.h"
11140 #include <pthread.h>
11141 EOF
11142 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11143   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
11144   rm -rf conftest*
11145   ol_cv_header_linux_threads=yes
11146 else
11147   rm -rf conftest*
11148   ol_cv_header_linux_threads=no
11149 fi
11150 rm -f conftest*
11151
11152                 
11153 fi
11154
11155 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
11156         if test $ol_cv_header_linux_threads = yes; then
11157                 cat >> confdefs.h <<\EOF
11158 #define HAVE_LINUX_THREADS 1
11159 EOF
11160
11161         fi
11162
11163                 
11164         echo $ac_n "checking for GNU Pth pthread.h""... $ac_c" 1>&6
11165 echo "configure:11166: checking for GNU Pth pthread.h" >&5
11166 if eval "test \"\${ol_cv_header_gnu_pth_pthread_h+set}\" = set"; then
11167   echo $ac_n "(cached) $ac_c" 1>&6
11168 else
11169   cat > conftest.$ac_ext <<EOF
11170 #line 11171 "configure"
11171 #include "confdefs.h"
11172 #include <pthread.h>
11173 #ifdef _POSIX_THREAD_IS_GNU_PTH
11174         __gnu_pth__;
11175 #endif
11176
11177 EOF
11178 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11179   egrep "__gnu_pth__" >/dev/null 2>&1; then
11180   rm -rf conftest*
11181   ol_cv_header_gnu_pth_pthread_h=yes
11182 else
11183   rm -rf conftest*
11184   ol_cv_header_gnu_pth_pthread_h=no
11185 fi
11186 rm -f conftest*
11187
11188                 
11189 fi
11190
11191 echo "$ac_t""$ol_cv_header_gnu_pth_pthread_h" 1>&6
11192
11193
11194                 if test $ol_cv_header_gnu_pth_pthread_h = no ; then
11195                         for ac_hdr in sched.h
11196 do
11197 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11198 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11199 echo "configure:11200: checking for $ac_hdr" >&5
11200 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11201   echo $ac_n "(cached) $ac_c" 1>&6
11202 else
11203   cat > conftest.$ac_ext <<EOF
11204 #line 11205 "configure"
11205 #include "confdefs.h"
11206 #include <$ac_hdr>
11207 EOF
11208 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11209 { (eval echo configure:11210: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11210 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11211 if test -z "$ac_err"; then
11212   rm -rf conftest*
11213   eval "ac_cv_header_$ac_safe=yes"
11214 else
11215   echo "$ac_err" >&5
11216   echo "configure: failed program was:" >&5
11217   cat conftest.$ac_ext >&5
11218   rm -rf conftest*
11219   eval "ac_cv_header_$ac_safe=no"
11220 fi
11221 rm -f conftest*
11222 fi
11223 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11224   echo "$ac_t""yes" 1>&6
11225     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11226   cat >> confdefs.h <<EOF
11227 #define $ac_tr_hdr 1
11228 EOF
11229  
11230 else
11231   echo "$ac_t""no" 1>&6
11232 fi
11233 done
11234
11235                 fi
11236
11237                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
11238                                 echo $ac_n "checking for pthread_create in default libraries""... $ac_c" 1>&6
11239 echo "configure:11240: checking for pthread_create in default libraries" >&5
11240 if eval "test \"\${ol_cv_pthread_create+set}\" = set"; then
11241   echo $ac_n "(cached) $ac_c" 1>&6
11242 else
11243   
11244                 if test "$cross_compiling" = yes; then
11245   cat > conftest.$ac_ext <<EOF
11246 #line 11247 "configure"
11247 #include "confdefs.h"
11248 /* pthread test headers */
11249 #include <pthread.h>
11250 #if HAVE_PTHREADS < 7
11251 #include <errno.h>
11252 #endif
11253 #ifndef NULL
11254 #define NULL (void*)0
11255 #endif
11256
11257 static void *task(p)
11258         void *p;
11259 {
11260         return (void *) (p == NULL);
11261 }
11262
11263 int main() {
11264
11265         /* pthread test function */
11266 #ifndef PTHREAD_CREATE_DETACHED
11267 #define PTHREAD_CREATE_DETACHED 1
11268 #endif
11269         pthread_t t;
11270         int status;
11271         int detach = PTHREAD_CREATE_DETACHED;
11272
11273 #if HAVE_PTHREADS > 4
11274         /* Final pthreads */
11275         pthread_attr_t attr;
11276
11277         status = pthread_attr_init(&attr);
11278         if( status ) return status;
11279
11280 #if HAVE_PTHREADS < 7
11281         status = pthread_attr_setdetachstate(&attr, &detach);
11282         if( status < 0 ) status = errno;
11283 #else
11284         status = pthread_attr_setdetachstate(&attr, detach);
11285 #endif
11286         if( status ) return status;
11287         status = pthread_create( &t, &attr, task, NULL );
11288 #if HAVE_PTHREADS < 7
11289         if( status < 0 ) status = errno;
11290 #endif
11291         if( status ) return status;
11292 #else
11293         /* Draft 4 pthreads */
11294         status = pthread_create( &t, pthread_attr_default, task, NULL );
11295         if( status ) return errno;
11296
11297         /* give thread a chance to complete */
11298         /* it should remain joinable and hence detachable */
11299         sleep( 1 );
11300
11301         status = pthread_detach( &t );
11302         if( status ) return errno;
11303 #endif
11304
11305 #ifdef HAVE_LINUX_THREADS
11306         pthread_kill_other_threads_np();
11307 #endif
11308
11309         return 0;
11310
11311 ; return 0; }
11312 EOF
11313 if { (eval echo configure:11314: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11314   rm -rf conftest*
11315   ol_cv_pthread_create=yes
11316 else
11317   echo "configure: failed program was:" >&5
11318   cat conftest.$ac_ext >&5
11319   rm -rf conftest*
11320   ol_cv_pthread_create=no
11321 fi
11322 rm -f conftest*
11323 else
11324   cat > conftest.$ac_ext <<EOF
11325 #line 11326 "configure"
11326 #include "confdefs.h"
11327 /* pthread test headers */
11328 #include <pthread.h>
11329 #if HAVE_PTHREADS < 7
11330 #include <errno.h>
11331 #endif
11332 #ifndef NULL
11333 #define NULL (void*)0
11334 #endif
11335
11336 static void *task(p)
11337         void *p;
11338 {
11339         return (void *) (p == NULL);
11340 }
11341
11342
11343 int main(argc, argv)
11344         int argc;
11345         char **argv;
11346 {
11347
11348         /* pthread test function */
11349 #ifndef PTHREAD_CREATE_DETACHED
11350 #define PTHREAD_CREATE_DETACHED 1
11351 #endif
11352         pthread_t t;
11353         int status;
11354         int detach = PTHREAD_CREATE_DETACHED;
11355
11356 #if HAVE_PTHREADS > 4
11357         /* Final pthreads */
11358         pthread_attr_t attr;
11359
11360         status = pthread_attr_init(&attr);
11361         if( status ) return status;
11362
11363 #if HAVE_PTHREADS < 7
11364         status = pthread_attr_setdetachstate(&attr, &detach);
11365         if( status < 0 ) status = errno;
11366 #else
11367         status = pthread_attr_setdetachstate(&attr, detach);
11368 #endif
11369         if( status ) return status;
11370         status = pthread_create( &t, &attr, task, NULL );
11371 #if HAVE_PTHREADS < 7
11372         if( status < 0 ) status = errno;
11373 #endif
11374         if( status ) return status;
11375 #else
11376         /* Draft 4 pthreads */
11377         status = pthread_create( &t, pthread_attr_default, task, NULL );
11378         if( status ) return errno;
11379
11380         /* give thread a chance to complete */
11381         /* it should remain joinable and hence detachable */
11382         sleep( 1 );
11383
11384         status = pthread_detach( &t );
11385         if( status ) return errno;
11386 #endif
11387
11388 #ifdef HAVE_LINUX_THREADS
11389         pthread_kill_other_threads_np();
11390 #endif
11391
11392         return 0;
11393
11394 }
11395
11396 EOF
11397 if { (eval echo configure:11398: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11398 then
11399   ol_cv_pthread_create=yes
11400 else
11401   echo "configure: failed program was:" >&5
11402   cat conftest.$ac_ext >&5
11403   rm -fr conftest*
11404   ol_cv_pthread_create=no
11405 fi
11406 rm -fr conftest*
11407 fi
11408
11409 fi
11410
11411 echo "$ac_t""$ol_cv_pthread_create" 1>&6
11412
11413                 if test $ol_cv_pthread_create != no ; then
11414                         ol_link_threads=posix
11415                         ol_link_pthreads=""
11416                 fi
11417                 
11418                 # Pthread try link: -kthread (ol_cv_pthread_kthread)
11419 if test "$ol_link_threads" = no ; then
11420         # try -kthread
11421         echo $ac_n "checking for pthread link with -kthread""... $ac_c" 1>&6
11422 echo "configure:11423: checking for pthread link with -kthread" >&5
11423 if eval "test \"\${ol_cv_pthread_kthread+set}\" = set"; then
11424   echo $ac_n "(cached) $ac_c" 1>&6
11425 else
11426   
11427                 # save the flags
11428                 ol_LIBS="$LIBS"
11429                 LIBS="-kthread $LIBS"
11430
11431                 if test "$cross_compiling" = yes; then
11432   cat > conftest.$ac_ext <<EOF
11433 #line 11434 "configure"
11434 #include "confdefs.h"
11435 /* pthread test headers */
11436 #include <pthread.h>
11437 #if HAVE_PTHREADS < 7
11438 #include <errno.h>
11439 #endif
11440 #ifndef NULL
11441 #define NULL (void*)0
11442 #endif
11443
11444 static void *task(p)
11445         void *p;
11446 {
11447         return (void *) (p == NULL);
11448 }
11449
11450 int main() {
11451
11452         /* pthread test function */
11453 #ifndef PTHREAD_CREATE_DETACHED
11454 #define PTHREAD_CREATE_DETACHED 1
11455 #endif
11456         pthread_t t;
11457         int status;
11458         int detach = PTHREAD_CREATE_DETACHED;
11459
11460 #if HAVE_PTHREADS > 4
11461         /* Final pthreads */
11462         pthread_attr_t attr;
11463
11464         status = pthread_attr_init(&attr);
11465         if( status ) return status;
11466
11467 #if HAVE_PTHREADS < 7
11468         status = pthread_attr_setdetachstate(&attr, &detach);
11469         if( status < 0 ) status = errno;
11470 #else
11471         status = pthread_attr_setdetachstate(&attr, detach);
11472 #endif
11473         if( status ) return status;
11474         status = pthread_create( &t, &attr, task, NULL );
11475 #if HAVE_PTHREADS < 7
11476         if( status < 0 ) status = errno;
11477 #endif
11478         if( status ) return status;
11479 #else
11480         /* Draft 4 pthreads */
11481         status = pthread_create( &t, pthread_attr_default, task, NULL );
11482         if( status ) return errno;
11483
11484         /* give thread a chance to complete */
11485         /* it should remain joinable and hence detachable */
11486         sleep( 1 );
11487
11488         status = pthread_detach( &t );
11489         if( status ) return errno;
11490 #endif
11491
11492 #ifdef HAVE_LINUX_THREADS
11493         pthread_kill_other_threads_np();
11494 #endif
11495
11496         return 0;
11497
11498 ; return 0; }
11499 EOF
11500 if { (eval echo configure:11501: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11501   rm -rf conftest*
11502   ol_cv_pthread_kthread=yes
11503 else
11504   echo "configure: failed program was:" >&5
11505   cat conftest.$ac_ext >&5
11506   rm -rf conftest*
11507   ol_cv_pthread_kthread=no
11508 fi
11509 rm -f conftest*
11510 else
11511   cat > conftest.$ac_ext <<EOF
11512 #line 11513 "configure"
11513 #include "confdefs.h"
11514 /* pthread test headers */
11515 #include <pthread.h>
11516 #if HAVE_PTHREADS < 7
11517 #include <errno.h>
11518 #endif
11519 #ifndef NULL
11520 #define NULL (void*)0
11521 #endif
11522
11523 static void *task(p)
11524         void *p;
11525 {
11526         return (void *) (p == NULL);
11527 }
11528
11529
11530 int main(argc, argv)
11531         int argc;
11532         char **argv;
11533 {
11534
11535         /* pthread test function */
11536 #ifndef PTHREAD_CREATE_DETACHED
11537 #define PTHREAD_CREATE_DETACHED 1
11538 #endif
11539         pthread_t t;
11540         int status;
11541         int detach = PTHREAD_CREATE_DETACHED;
11542
11543 #if HAVE_PTHREADS > 4
11544         /* Final pthreads */
11545         pthread_attr_t attr;
11546
11547         status = pthread_attr_init(&attr);
11548         if( status ) return status;
11549
11550 #if HAVE_PTHREADS < 7
11551         status = pthread_attr_setdetachstate(&attr, &detach);
11552         if( status < 0 ) status = errno;
11553 #else
11554         status = pthread_attr_setdetachstate(&attr, detach);
11555 #endif
11556         if( status ) return status;
11557         status = pthread_create( &t, &attr, task, NULL );
11558 #if HAVE_PTHREADS < 7
11559         if( status < 0 ) status = errno;
11560 #endif
11561         if( status ) return status;
11562 #else
11563         /* Draft 4 pthreads */
11564         status = pthread_create( &t, pthread_attr_default, task, NULL );
11565         if( status ) return errno;
11566
11567         /* give thread a chance to complete */
11568         /* it should remain joinable and hence detachable */
11569         sleep( 1 );
11570
11571         status = pthread_detach( &t );
11572         if( status ) return errno;
11573 #endif
11574
11575 #ifdef HAVE_LINUX_THREADS
11576         pthread_kill_other_threads_np();
11577 #endif
11578
11579         return 0;
11580
11581 }
11582
11583 EOF
11584 if { (eval echo configure:11585: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11585 then
11586   ol_cv_pthread_kthread=yes
11587 else
11588   echo "configure: failed program was:" >&5
11589   cat conftest.$ac_ext >&5
11590   rm -fr conftest*
11591   ol_cv_pthread_kthread=no
11592 fi
11593 rm -fr conftest*
11594 fi
11595
11596
11597                 # restore the LIBS
11598                 LIBS="$ol_LIBS"
11599         
11600 fi
11601
11602 echo "$ac_t""$ol_cv_pthread_kthread" 1>&6
11603
11604         if test $ol_cv_pthread_kthread = yes ; then
11605                 ol_link_pthreads="-kthread"
11606                 ol_link_threads=posix
11607         fi
11608 fi
11609
11610                 # Pthread try link: -pthread (ol_cv_pthread_pthread)
11611 if test "$ol_link_threads" = no ; then
11612         # try -pthread
11613         echo $ac_n "checking for pthread link with -pthread""... $ac_c" 1>&6
11614 echo "configure:11615: checking for pthread link with -pthread" >&5
11615 if eval "test \"\${ol_cv_pthread_pthread+set}\" = set"; then
11616   echo $ac_n "(cached) $ac_c" 1>&6
11617 else
11618   
11619                 # save the flags
11620                 ol_LIBS="$LIBS"
11621                 LIBS="-pthread $LIBS"
11622
11623                 if test "$cross_compiling" = yes; then
11624   cat > conftest.$ac_ext <<EOF
11625 #line 11626 "configure"
11626 #include "confdefs.h"
11627 /* pthread test headers */
11628 #include <pthread.h>
11629 #if HAVE_PTHREADS < 7
11630 #include <errno.h>
11631 #endif
11632 #ifndef NULL
11633 #define NULL (void*)0
11634 #endif
11635
11636 static void *task(p)
11637         void *p;
11638 {
11639         return (void *) (p == NULL);
11640 }
11641
11642 int main() {
11643
11644         /* pthread test function */
11645 #ifndef PTHREAD_CREATE_DETACHED
11646 #define PTHREAD_CREATE_DETACHED 1
11647 #endif
11648         pthread_t t;
11649         int status;
11650         int detach = PTHREAD_CREATE_DETACHED;
11651
11652 #if HAVE_PTHREADS > 4
11653         /* Final pthreads */
11654         pthread_attr_t attr;
11655
11656         status = pthread_attr_init(&attr);
11657         if( status ) return status;
11658
11659 #if HAVE_PTHREADS < 7
11660         status = pthread_attr_setdetachstate(&attr, &detach);
11661         if( status < 0 ) status = errno;
11662 #else
11663         status = pthread_attr_setdetachstate(&attr, detach);
11664 #endif
11665         if( status ) return status;
11666         status = pthread_create( &t, &attr, task, NULL );
11667 #if HAVE_PTHREADS < 7
11668         if( status < 0 ) status = errno;
11669 #endif
11670         if( status ) return status;
11671 #else
11672         /* Draft 4 pthreads */
11673         status = pthread_create( &t, pthread_attr_default, task, NULL );
11674         if( status ) return errno;
11675
11676         /* give thread a chance to complete */
11677         /* it should remain joinable and hence detachable */
11678         sleep( 1 );
11679
11680         status = pthread_detach( &t );
11681         if( status ) return errno;
11682 #endif
11683
11684 #ifdef HAVE_LINUX_THREADS
11685         pthread_kill_other_threads_np();
11686 #endif
11687
11688         return 0;
11689
11690 ; return 0; }
11691 EOF
11692 if { (eval echo configure:11693: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11693   rm -rf conftest*
11694   ol_cv_pthread_pthread=yes
11695 else
11696   echo "configure: failed program was:" >&5
11697   cat conftest.$ac_ext >&5
11698   rm -rf conftest*
11699   ol_cv_pthread_pthread=no
11700 fi
11701 rm -f conftest*
11702 else
11703   cat > conftest.$ac_ext <<EOF
11704 #line 11705 "configure"
11705 #include "confdefs.h"
11706 /* pthread test headers */
11707 #include <pthread.h>
11708 #if HAVE_PTHREADS < 7
11709 #include <errno.h>
11710 #endif
11711 #ifndef NULL
11712 #define NULL (void*)0
11713 #endif
11714
11715 static void *task(p)
11716         void *p;
11717 {
11718         return (void *) (p == NULL);
11719 }
11720
11721
11722 int main(argc, argv)
11723         int argc;
11724         char **argv;
11725 {
11726
11727         /* pthread test function */
11728 #ifndef PTHREAD_CREATE_DETACHED
11729 #define PTHREAD_CREATE_DETACHED 1
11730 #endif
11731         pthread_t t;
11732         int status;
11733         int detach = PTHREAD_CREATE_DETACHED;
11734
11735 #if HAVE_PTHREADS > 4
11736         /* Final pthreads */
11737         pthread_attr_t attr;
11738
11739         status = pthread_attr_init(&attr);
11740         if( status ) return status;
11741
11742 #if HAVE_PTHREADS < 7
11743         status = pthread_attr_setdetachstate(&attr, &detach);
11744         if( status < 0 ) status = errno;
11745 #else
11746         status = pthread_attr_setdetachstate(&attr, detach);
11747 #endif
11748         if( status ) return status;
11749         status = pthread_create( &t, &attr, task, NULL );
11750 #if HAVE_PTHREADS < 7
11751         if( status < 0 ) status = errno;
11752 #endif
11753         if( status ) return status;
11754 #else
11755         /* Draft 4 pthreads */
11756         status = pthread_create( &t, pthread_attr_default, task, NULL );
11757         if( status ) return errno;
11758
11759         /* give thread a chance to complete */
11760         /* it should remain joinable and hence detachable */
11761         sleep( 1 );
11762
11763         status = pthread_detach( &t );
11764         if( status ) return errno;
11765 #endif
11766
11767 #ifdef HAVE_LINUX_THREADS
11768         pthread_kill_other_threads_np();
11769 #endif
11770
11771         return 0;
11772
11773 }
11774
11775 EOF
11776 if { (eval echo configure:11777: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11777 then
11778   ol_cv_pthread_pthread=yes
11779 else
11780   echo "configure: failed program was:" >&5
11781   cat conftest.$ac_ext >&5
11782   rm -fr conftest*
11783   ol_cv_pthread_pthread=no
11784 fi
11785 rm -fr conftest*
11786 fi
11787
11788
11789                 # restore the LIBS
11790                 LIBS="$ol_LIBS"
11791         
11792 fi
11793
11794 echo "$ac_t""$ol_cv_pthread_pthread" 1>&6
11795
11796         if test $ol_cv_pthread_pthread = yes ; then
11797                 ol_link_pthreads="-pthread"
11798                 ol_link_threads=posix
11799         fi
11800 fi
11801
11802                 # Pthread try link: -pthreads (ol_cv_pthread_pthreads)
11803 if test "$ol_link_threads" = no ; then
11804         # try -pthreads
11805         echo $ac_n "checking for pthread link with -pthreads""... $ac_c" 1>&6
11806 echo "configure:11807: checking for pthread link with -pthreads" >&5
11807 if eval "test \"\${ol_cv_pthread_pthreads+set}\" = set"; then
11808   echo $ac_n "(cached) $ac_c" 1>&6
11809 else
11810   
11811                 # save the flags
11812                 ol_LIBS="$LIBS"
11813                 LIBS="-pthreads $LIBS"
11814
11815                 if test "$cross_compiling" = yes; then
11816   cat > conftest.$ac_ext <<EOF
11817 #line 11818 "configure"
11818 #include "confdefs.h"
11819 /* pthread test headers */
11820 #include <pthread.h>
11821 #if HAVE_PTHREADS < 7
11822 #include <errno.h>
11823 #endif
11824 #ifndef NULL
11825 #define NULL (void*)0
11826 #endif
11827
11828 static void *task(p)
11829         void *p;
11830 {
11831         return (void *) (p == NULL);
11832 }
11833
11834 int main() {
11835
11836         /* pthread test function */
11837 #ifndef PTHREAD_CREATE_DETACHED
11838 #define PTHREAD_CREATE_DETACHED 1
11839 #endif
11840         pthread_t t;
11841         int status;
11842         int detach = PTHREAD_CREATE_DETACHED;
11843
11844 #if HAVE_PTHREADS > 4
11845         /* Final pthreads */
11846         pthread_attr_t attr;
11847
11848         status = pthread_attr_init(&attr);
11849         if( status ) return status;
11850
11851 #if HAVE_PTHREADS < 7
11852         status = pthread_attr_setdetachstate(&attr, &detach);
11853         if( status < 0 ) status = errno;
11854 #else
11855         status = pthread_attr_setdetachstate(&attr, detach);
11856 #endif
11857         if( status ) return status;
11858         status = pthread_create( &t, &attr, task, NULL );
11859 #if HAVE_PTHREADS < 7
11860         if( status < 0 ) status = errno;
11861 #endif
11862         if( status ) return status;
11863 #else
11864         /* Draft 4 pthreads */
11865         status = pthread_create( &t, pthread_attr_default, task, NULL );
11866         if( status ) return errno;
11867
11868         /* give thread a chance to complete */
11869         /* it should remain joinable and hence detachable */
11870         sleep( 1 );
11871
11872         status = pthread_detach( &t );
11873         if( status ) return errno;
11874 #endif
11875
11876 #ifdef HAVE_LINUX_THREADS
11877         pthread_kill_other_threads_np();
11878 #endif
11879
11880         return 0;
11881
11882 ; return 0; }
11883 EOF
11884 if { (eval echo configure:11885: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11885   rm -rf conftest*
11886   ol_cv_pthread_pthreads=yes
11887 else
11888   echo "configure: failed program was:" >&5
11889   cat conftest.$ac_ext >&5
11890   rm -rf conftest*
11891   ol_cv_pthread_pthreads=no
11892 fi
11893 rm -f conftest*
11894 else
11895   cat > conftest.$ac_ext <<EOF
11896 #line 11897 "configure"
11897 #include "confdefs.h"
11898 /* pthread test headers */
11899 #include <pthread.h>
11900 #if HAVE_PTHREADS < 7
11901 #include <errno.h>
11902 #endif
11903 #ifndef NULL
11904 #define NULL (void*)0
11905 #endif
11906
11907 static void *task(p)
11908         void *p;
11909 {
11910         return (void *) (p == NULL);
11911 }
11912
11913
11914 int main(argc, argv)
11915         int argc;
11916         char **argv;
11917 {
11918
11919         /* pthread test function */
11920 #ifndef PTHREAD_CREATE_DETACHED
11921 #define PTHREAD_CREATE_DETACHED 1
11922 #endif
11923         pthread_t t;
11924         int status;
11925         int detach = PTHREAD_CREATE_DETACHED;
11926
11927 #if HAVE_PTHREADS > 4
11928         /* Final pthreads */
11929         pthread_attr_t attr;
11930
11931         status = pthread_attr_init(&attr);
11932         if( status ) return status;
11933
11934 #if HAVE_PTHREADS < 7
11935         status = pthread_attr_setdetachstate(&attr, &detach);
11936         if( status < 0 ) status = errno;
11937 #else
11938         status = pthread_attr_setdetachstate(&attr, detach);
11939 #endif
11940         if( status ) return status;
11941         status = pthread_create( &t, &attr, task, NULL );
11942 #if HAVE_PTHREADS < 7
11943         if( status < 0 ) status = errno;
11944 #endif
11945         if( status ) return status;
11946 #else
11947         /* Draft 4 pthreads */
11948         status = pthread_create( &t, pthread_attr_default, task, NULL );
11949         if( status ) return errno;
11950
11951         /* give thread a chance to complete */
11952         /* it should remain joinable and hence detachable */
11953         sleep( 1 );
11954
11955         status = pthread_detach( &t );
11956         if( status ) return errno;
11957 #endif
11958
11959 #ifdef HAVE_LINUX_THREADS
11960         pthread_kill_other_threads_np();
11961 #endif
11962
11963         return 0;
11964
11965 }
11966
11967 EOF
11968 if { (eval echo configure:11969: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11969 then
11970   ol_cv_pthread_pthreads=yes
11971 else
11972   echo "configure: failed program was:" >&5
11973   cat conftest.$ac_ext >&5
11974   rm -fr conftest*
11975   ol_cv_pthread_pthreads=no
11976 fi
11977 rm -fr conftest*
11978 fi
11979
11980
11981                 # restore the LIBS
11982                 LIBS="$ol_LIBS"
11983         
11984 fi
11985
11986 echo "$ac_t""$ol_cv_pthread_pthreads" 1>&6
11987
11988         if test $ol_cv_pthread_pthreads = yes ; then
11989                 ol_link_pthreads="-pthreads"
11990                 ol_link_threads=posix
11991         fi
11992 fi
11993
11994                 # Pthread try link: -mthreads (ol_cv_pthread_mthreads)
11995 if test "$ol_link_threads" = no ; then
11996         # try -mthreads
11997         echo $ac_n "checking for pthread link with -mthreads""... $ac_c" 1>&6
11998 echo "configure:11999: checking for pthread link with -mthreads" >&5
11999 if eval "test \"\${ol_cv_pthread_mthreads+set}\" = set"; then
12000   echo $ac_n "(cached) $ac_c" 1>&6
12001 else
12002   
12003                 # save the flags
12004                 ol_LIBS="$LIBS"
12005                 LIBS="-mthreads $LIBS"
12006
12007                 if test "$cross_compiling" = yes; then
12008   cat > conftest.$ac_ext <<EOF
12009 #line 12010 "configure"
12010 #include "confdefs.h"
12011 /* pthread test headers */
12012 #include <pthread.h>
12013 #if HAVE_PTHREADS < 7
12014 #include <errno.h>
12015 #endif
12016 #ifndef NULL
12017 #define NULL (void*)0
12018 #endif
12019
12020 static void *task(p)
12021         void *p;
12022 {
12023         return (void *) (p == NULL);
12024 }
12025
12026 int main() {
12027
12028         /* pthread test function */
12029 #ifndef PTHREAD_CREATE_DETACHED
12030 #define PTHREAD_CREATE_DETACHED 1
12031 #endif
12032         pthread_t t;
12033         int status;
12034         int detach = PTHREAD_CREATE_DETACHED;
12035
12036 #if HAVE_PTHREADS > 4
12037         /* Final pthreads */
12038         pthread_attr_t attr;
12039
12040         status = pthread_attr_init(&attr);
12041         if( status ) return status;
12042
12043 #if HAVE_PTHREADS < 7
12044         status = pthread_attr_setdetachstate(&attr, &detach);
12045         if( status < 0 ) status = errno;
12046 #else
12047         status = pthread_attr_setdetachstate(&attr, detach);
12048 #endif
12049         if( status ) return status;
12050         status = pthread_create( &t, &attr, task, NULL );
12051 #if HAVE_PTHREADS < 7
12052         if( status < 0 ) status = errno;
12053 #endif
12054         if( status ) return status;
12055 #else
12056         /* Draft 4 pthreads */
12057         status = pthread_create( &t, pthread_attr_default, task, NULL );
12058         if( status ) return errno;
12059
12060         /* give thread a chance to complete */
12061         /* it should remain joinable and hence detachable */
12062         sleep( 1 );
12063
12064         status = pthread_detach( &t );
12065         if( status ) return errno;
12066 #endif
12067
12068 #ifdef HAVE_LINUX_THREADS
12069         pthread_kill_other_threads_np();
12070 #endif
12071
12072         return 0;
12073
12074 ; return 0; }
12075 EOF
12076 if { (eval echo configure:12077: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12077   rm -rf conftest*
12078   ol_cv_pthread_mthreads=yes
12079 else
12080   echo "configure: failed program was:" >&5
12081   cat conftest.$ac_ext >&5
12082   rm -rf conftest*
12083   ol_cv_pthread_mthreads=no
12084 fi
12085 rm -f conftest*
12086 else
12087   cat > conftest.$ac_ext <<EOF
12088 #line 12089 "configure"
12089 #include "confdefs.h"
12090 /* pthread test headers */
12091 #include <pthread.h>
12092 #if HAVE_PTHREADS < 7
12093 #include <errno.h>
12094 #endif
12095 #ifndef NULL
12096 #define NULL (void*)0
12097 #endif
12098
12099 static void *task(p)
12100         void *p;
12101 {
12102         return (void *) (p == NULL);
12103 }
12104
12105
12106 int main(argc, argv)
12107         int argc;
12108         char **argv;
12109 {
12110
12111         /* pthread test function */
12112 #ifndef PTHREAD_CREATE_DETACHED
12113 #define PTHREAD_CREATE_DETACHED 1
12114 #endif
12115         pthread_t t;
12116         int status;
12117         int detach = PTHREAD_CREATE_DETACHED;
12118
12119 #if HAVE_PTHREADS > 4
12120         /* Final pthreads */
12121         pthread_attr_t attr;
12122
12123         status = pthread_attr_init(&attr);
12124         if( status ) return status;
12125
12126 #if HAVE_PTHREADS < 7
12127         status = pthread_attr_setdetachstate(&attr, &detach);
12128         if( status < 0 ) status = errno;
12129 #else
12130         status = pthread_attr_setdetachstate(&attr, detach);
12131 #endif
12132         if( status ) return status;
12133         status = pthread_create( &t, &attr, task, NULL );
12134 #if HAVE_PTHREADS < 7
12135         if( status < 0 ) status = errno;
12136 #endif
12137         if( status ) return status;
12138 #else
12139         /* Draft 4 pthreads */
12140         status = pthread_create( &t, pthread_attr_default, task, NULL );
12141         if( status ) return errno;
12142
12143         /* give thread a chance to complete */
12144         /* it should remain joinable and hence detachable */
12145         sleep( 1 );
12146
12147         status = pthread_detach( &t );
12148         if( status ) return errno;
12149 #endif
12150
12151 #ifdef HAVE_LINUX_THREADS
12152         pthread_kill_other_threads_np();
12153 #endif
12154
12155         return 0;
12156
12157 }
12158
12159 EOF
12160 if { (eval echo configure:12161: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12161 then
12162   ol_cv_pthread_mthreads=yes
12163 else
12164   echo "configure: failed program was:" >&5
12165   cat conftest.$ac_ext >&5
12166   rm -fr conftest*
12167   ol_cv_pthread_mthreads=no
12168 fi
12169 rm -fr conftest*
12170 fi
12171
12172
12173                 # restore the LIBS
12174                 LIBS="$ol_LIBS"
12175         
12176 fi
12177
12178 echo "$ac_t""$ol_cv_pthread_mthreads" 1>&6
12179
12180         if test $ol_cv_pthread_mthreads = yes ; then
12181                 ol_link_pthreads="-mthreads"
12182                 ol_link_threads=posix
12183         fi
12184 fi
12185
12186                 # Pthread try link: -thread (ol_cv_pthread_thread)
12187 if test "$ol_link_threads" = no ; then
12188         # try -thread
12189         echo $ac_n "checking for pthread link with -thread""... $ac_c" 1>&6
12190 echo "configure:12191: checking for pthread link with -thread" >&5
12191 if eval "test \"\${ol_cv_pthread_thread+set}\" = set"; then
12192   echo $ac_n "(cached) $ac_c" 1>&6
12193 else
12194   
12195                 # save the flags
12196                 ol_LIBS="$LIBS"
12197                 LIBS="-thread $LIBS"
12198
12199                 if test "$cross_compiling" = yes; then
12200   cat > conftest.$ac_ext <<EOF
12201 #line 12202 "configure"
12202 #include "confdefs.h"
12203 /* pthread test headers */
12204 #include <pthread.h>
12205 #if HAVE_PTHREADS < 7
12206 #include <errno.h>
12207 #endif
12208 #ifndef NULL
12209 #define NULL (void*)0
12210 #endif
12211
12212 static void *task(p)
12213         void *p;
12214 {
12215         return (void *) (p == NULL);
12216 }
12217
12218 int main() {
12219
12220         /* pthread test function */
12221 #ifndef PTHREAD_CREATE_DETACHED
12222 #define PTHREAD_CREATE_DETACHED 1
12223 #endif
12224         pthread_t t;
12225         int status;
12226         int detach = PTHREAD_CREATE_DETACHED;
12227
12228 #if HAVE_PTHREADS > 4
12229         /* Final pthreads */
12230         pthread_attr_t attr;
12231
12232         status = pthread_attr_init(&attr);
12233         if( status ) return status;
12234
12235 #if HAVE_PTHREADS < 7
12236         status = pthread_attr_setdetachstate(&attr, &detach);
12237         if( status < 0 ) status = errno;
12238 #else
12239         status = pthread_attr_setdetachstate(&attr, detach);
12240 #endif
12241         if( status ) return status;
12242         status = pthread_create( &t, &attr, task, NULL );
12243 #if HAVE_PTHREADS < 7
12244         if( status < 0 ) status = errno;
12245 #endif
12246         if( status ) return status;
12247 #else
12248         /* Draft 4 pthreads */
12249         status = pthread_create( &t, pthread_attr_default, task, NULL );
12250         if( status ) return errno;
12251
12252         /* give thread a chance to complete */
12253         /* it should remain joinable and hence detachable */
12254         sleep( 1 );
12255
12256         status = pthread_detach( &t );
12257         if( status ) return errno;
12258 #endif
12259
12260 #ifdef HAVE_LINUX_THREADS
12261         pthread_kill_other_threads_np();
12262 #endif
12263
12264         return 0;
12265
12266 ; return 0; }
12267 EOF
12268 if { (eval echo configure:12269: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12269   rm -rf conftest*
12270   ol_cv_pthread_thread=yes
12271 else
12272   echo "configure: failed program was:" >&5
12273   cat conftest.$ac_ext >&5
12274   rm -rf conftest*
12275   ol_cv_pthread_thread=no
12276 fi
12277 rm -f conftest*
12278 else
12279   cat > conftest.$ac_ext <<EOF
12280 #line 12281 "configure"
12281 #include "confdefs.h"
12282 /* pthread test headers */
12283 #include <pthread.h>
12284 #if HAVE_PTHREADS < 7
12285 #include <errno.h>
12286 #endif
12287 #ifndef NULL
12288 #define NULL (void*)0
12289 #endif
12290
12291 static void *task(p)
12292         void *p;
12293 {
12294         return (void *) (p == NULL);
12295 }
12296
12297
12298 int main(argc, argv)
12299         int argc;
12300         char **argv;
12301 {
12302
12303         /* pthread test function */
12304 #ifndef PTHREAD_CREATE_DETACHED
12305 #define PTHREAD_CREATE_DETACHED 1
12306 #endif
12307         pthread_t t;
12308         int status;
12309         int detach = PTHREAD_CREATE_DETACHED;
12310
12311 #if HAVE_PTHREADS > 4
12312         /* Final pthreads */
12313         pthread_attr_t attr;
12314
12315         status = pthread_attr_init(&attr);
12316         if( status ) return status;
12317
12318 #if HAVE_PTHREADS < 7
12319         status = pthread_attr_setdetachstate(&attr, &detach);
12320         if( status < 0 ) status = errno;
12321 #else
12322         status = pthread_attr_setdetachstate(&attr, detach);
12323 #endif
12324         if( status ) return status;
12325         status = pthread_create( &t, &attr, task, NULL );
12326 #if HAVE_PTHREADS < 7
12327         if( status < 0 ) status = errno;
12328 #endif
12329         if( status ) return status;
12330 #else
12331         /* Draft 4 pthreads */
12332         status = pthread_create( &t, pthread_attr_default, task, NULL );
12333         if( status ) return errno;
12334
12335         /* give thread a chance to complete */
12336         /* it should remain joinable and hence detachable */
12337         sleep( 1 );
12338
12339         status = pthread_detach( &t );
12340         if( status ) return errno;
12341 #endif
12342
12343 #ifdef HAVE_LINUX_THREADS
12344         pthread_kill_other_threads_np();
12345 #endif
12346
12347         return 0;
12348
12349 }
12350
12351 EOF
12352 if { (eval echo configure:12353: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12353 then
12354   ol_cv_pthread_thread=yes
12355 else
12356   echo "configure: failed program was:" >&5
12357   cat conftest.$ac_ext >&5
12358   rm -fr conftest*
12359   ol_cv_pthread_thread=no
12360 fi
12361 rm -fr conftest*
12362 fi
12363
12364
12365                 # restore the LIBS
12366                 LIBS="$ol_LIBS"
12367         
12368 fi
12369
12370 echo "$ac_t""$ol_cv_pthread_thread" 1>&6
12371
12372         if test $ol_cv_pthread_thread = yes ; then
12373                 ol_link_pthreads="-thread"
12374                 ol_link_threads=posix
12375         fi
12376 fi
12377
12378
12379                 # Pthread try link: -lpthread -lmach -lexc -lc_r (ol_cv_pthread_lpthread_lmach_lexc_lc_r)
12380 if test "$ol_link_threads" = no ; then
12381         # try -lpthread -lmach -lexc -lc_r
12382         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc -lc_r""... $ac_c" 1>&6
12383 echo "configure:12384: checking for pthread link with -lpthread -lmach -lexc -lc_r" >&5
12384 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc_lc_r+set}\" = set"; then
12385   echo $ac_n "(cached) $ac_c" 1>&6
12386 else
12387   
12388                 # save the flags
12389                 ol_LIBS="$LIBS"
12390                 LIBS="-lpthread -lmach -lexc -lc_r $LIBS"
12391
12392                 if test "$cross_compiling" = yes; then
12393   cat > conftest.$ac_ext <<EOF
12394 #line 12395 "configure"
12395 #include "confdefs.h"
12396 /* pthread test headers */
12397 #include <pthread.h>
12398 #if HAVE_PTHREADS < 7
12399 #include <errno.h>
12400 #endif
12401 #ifndef NULL
12402 #define NULL (void*)0
12403 #endif
12404
12405 static void *task(p)
12406         void *p;
12407 {
12408         return (void *) (p == NULL);
12409 }
12410
12411 int main() {
12412
12413         /* pthread test function */
12414 #ifndef PTHREAD_CREATE_DETACHED
12415 #define PTHREAD_CREATE_DETACHED 1
12416 #endif
12417         pthread_t t;
12418         int status;
12419         int detach = PTHREAD_CREATE_DETACHED;
12420
12421 #if HAVE_PTHREADS > 4
12422         /* Final pthreads */
12423         pthread_attr_t attr;
12424
12425         status = pthread_attr_init(&attr);
12426         if( status ) return status;
12427
12428 #if HAVE_PTHREADS < 7
12429         status = pthread_attr_setdetachstate(&attr, &detach);
12430         if( status < 0 ) status = errno;
12431 #else
12432         status = pthread_attr_setdetachstate(&attr, detach);
12433 #endif
12434         if( status ) return status;
12435         status = pthread_create( &t, &attr, task, NULL );
12436 #if HAVE_PTHREADS < 7
12437         if( status < 0 ) status = errno;
12438 #endif
12439         if( status ) return status;
12440 #else
12441         /* Draft 4 pthreads */
12442         status = pthread_create( &t, pthread_attr_default, task, NULL );
12443         if( status ) return errno;
12444
12445         /* give thread a chance to complete */
12446         /* it should remain joinable and hence detachable */
12447         sleep( 1 );
12448
12449         status = pthread_detach( &t );
12450         if( status ) return errno;
12451 #endif
12452
12453 #ifdef HAVE_LINUX_THREADS
12454         pthread_kill_other_threads_np();
12455 #endif
12456
12457         return 0;
12458
12459 ; return 0; }
12460 EOF
12461 if { (eval echo configure:12462: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12462   rm -rf conftest*
12463   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
12464 else
12465   echo "configure: failed program was:" >&5
12466   cat conftest.$ac_ext >&5
12467   rm -rf conftest*
12468   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
12469 fi
12470 rm -f conftest*
12471 else
12472   cat > conftest.$ac_ext <<EOF
12473 #line 12474 "configure"
12474 #include "confdefs.h"
12475 /* pthread test headers */
12476 #include <pthread.h>
12477 #if HAVE_PTHREADS < 7
12478 #include <errno.h>
12479 #endif
12480 #ifndef NULL
12481 #define NULL (void*)0
12482 #endif
12483
12484 static void *task(p)
12485         void *p;
12486 {
12487         return (void *) (p == NULL);
12488 }
12489
12490
12491 int main(argc, argv)
12492         int argc;
12493         char **argv;
12494 {
12495
12496         /* pthread test function */
12497 #ifndef PTHREAD_CREATE_DETACHED
12498 #define PTHREAD_CREATE_DETACHED 1
12499 #endif
12500         pthread_t t;
12501         int status;
12502         int detach = PTHREAD_CREATE_DETACHED;
12503
12504 #if HAVE_PTHREADS > 4
12505         /* Final pthreads */
12506         pthread_attr_t attr;
12507
12508         status = pthread_attr_init(&attr);
12509         if( status ) return status;
12510
12511 #if HAVE_PTHREADS < 7
12512         status = pthread_attr_setdetachstate(&attr, &detach);
12513         if( status < 0 ) status = errno;
12514 #else
12515         status = pthread_attr_setdetachstate(&attr, detach);
12516 #endif
12517         if( status ) return status;
12518         status = pthread_create( &t, &attr, task, NULL );
12519 #if HAVE_PTHREADS < 7
12520         if( status < 0 ) status = errno;
12521 #endif
12522         if( status ) return status;
12523 #else
12524         /* Draft 4 pthreads */
12525         status = pthread_create( &t, pthread_attr_default, task, NULL );
12526         if( status ) return errno;
12527
12528         /* give thread a chance to complete */
12529         /* it should remain joinable and hence detachable */
12530         sleep( 1 );
12531
12532         status = pthread_detach( &t );
12533         if( status ) return errno;
12534 #endif
12535
12536 #ifdef HAVE_LINUX_THREADS
12537         pthread_kill_other_threads_np();
12538 #endif
12539
12540         return 0;
12541
12542 }
12543
12544 EOF
12545 if { (eval echo configure:12546: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12546 then
12547   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
12548 else
12549   echo "configure: failed program was:" >&5
12550   cat conftest.$ac_ext >&5
12551   rm -fr conftest*
12552   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
12553 fi
12554 rm -fr conftest*
12555 fi
12556
12557
12558                 # restore the LIBS
12559                 LIBS="$ol_LIBS"
12560         
12561 fi
12562
12563 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc_lc_r" 1>&6
12564
12565         if test $ol_cv_pthread_lpthread_lmach_lexc_lc_r = yes ; then
12566                 ol_link_pthreads="-lpthread -lmach -lexc -lc_r"
12567                 ol_link_threads=posix
12568         fi
12569 fi
12570
12571                 # Pthread try link: -lpthread -lmach -lexc (ol_cv_pthread_lpthread_lmach_lexc)
12572 if test "$ol_link_threads" = no ; then
12573         # try -lpthread -lmach -lexc
12574         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc""... $ac_c" 1>&6
12575 echo "configure:12576: checking for pthread link with -lpthread -lmach -lexc" >&5
12576 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc+set}\" = set"; then
12577   echo $ac_n "(cached) $ac_c" 1>&6
12578 else
12579   
12580                 # save the flags
12581                 ol_LIBS="$LIBS"
12582                 LIBS="-lpthread -lmach -lexc $LIBS"
12583
12584                 if test "$cross_compiling" = yes; then
12585   cat > conftest.$ac_ext <<EOF
12586 #line 12587 "configure"
12587 #include "confdefs.h"
12588 /* pthread test headers */
12589 #include <pthread.h>
12590 #if HAVE_PTHREADS < 7
12591 #include <errno.h>
12592 #endif
12593 #ifndef NULL
12594 #define NULL (void*)0
12595 #endif
12596
12597 static void *task(p)
12598         void *p;
12599 {
12600         return (void *) (p == NULL);
12601 }
12602
12603 int main() {
12604
12605         /* pthread test function */
12606 #ifndef PTHREAD_CREATE_DETACHED
12607 #define PTHREAD_CREATE_DETACHED 1
12608 #endif
12609         pthread_t t;
12610         int status;
12611         int detach = PTHREAD_CREATE_DETACHED;
12612
12613 #if HAVE_PTHREADS > 4
12614         /* Final pthreads */
12615         pthread_attr_t attr;
12616
12617         status = pthread_attr_init(&attr);
12618         if( status ) return status;
12619
12620 #if HAVE_PTHREADS < 7
12621         status = pthread_attr_setdetachstate(&attr, &detach);
12622         if( status < 0 ) status = errno;
12623 #else
12624         status = pthread_attr_setdetachstate(&attr, detach);
12625 #endif
12626         if( status ) return status;
12627         status = pthread_create( &t, &attr, task, NULL );
12628 #if HAVE_PTHREADS < 7
12629         if( status < 0 ) status = errno;
12630 #endif
12631         if( status ) return status;
12632 #else
12633         /* Draft 4 pthreads */
12634         status = pthread_create( &t, pthread_attr_default, task, NULL );
12635         if( status ) return errno;
12636
12637         /* give thread a chance to complete */
12638         /* it should remain joinable and hence detachable */
12639         sleep( 1 );
12640
12641         status = pthread_detach( &t );
12642         if( status ) return errno;
12643 #endif
12644
12645 #ifdef HAVE_LINUX_THREADS
12646         pthread_kill_other_threads_np();
12647 #endif
12648
12649         return 0;
12650
12651 ; return 0; }
12652 EOF
12653 if { (eval echo configure:12654: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12654   rm -rf conftest*
12655   ol_cv_pthread_lpthread_lmach_lexc=yes
12656 else
12657   echo "configure: failed program was:" >&5
12658   cat conftest.$ac_ext >&5
12659   rm -rf conftest*
12660   ol_cv_pthread_lpthread_lmach_lexc=no
12661 fi
12662 rm -f conftest*
12663 else
12664   cat > conftest.$ac_ext <<EOF
12665 #line 12666 "configure"
12666 #include "confdefs.h"
12667 /* pthread test headers */
12668 #include <pthread.h>
12669 #if HAVE_PTHREADS < 7
12670 #include <errno.h>
12671 #endif
12672 #ifndef NULL
12673 #define NULL (void*)0
12674 #endif
12675
12676 static void *task(p)
12677         void *p;
12678 {
12679         return (void *) (p == NULL);
12680 }
12681
12682
12683 int main(argc, argv)
12684         int argc;
12685         char **argv;
12686 {
12687
12688         /* pthread test function */
12689 #ifndef PTHREAD_CREATE_DETACHED
12690 #define PTHREAD_CREATE_DETACHED 1
12691 #endif
12692         pthread_t t;
12693         int status;
12694         int detach = PTHREAD_CREATE_DETACHED;
12695
12696 #if HAVE_PTHREADS > 4
12697         /* Final pthreads */
12698         pthread_attr_t attr;
12699
12700         status = pthread_attr_init(&attr);
12701         if( status ) return status;
12702
12703 #if HAVE_PTHREADS < 7
12704         status = pthread_attr_setdetachstate(&attr, &detach);
12705         if( status < 0 ) status = errno;
12706 #else
12707         status = pthread_attr_setdetachstate(&attr, detach);
12708 #endif
12709         if( status ) return status;
12710         status = pthread_create( &t, &attr, task, NULL );
12711 #if HAVE_PTHREADS < 7
12712         if( status < 0 ) status = errno;
12713 #endif
12714         if( status ) return status;
12715 #else
12716         /* Draft 4 pthreads */
12717         status = pthread_create( &t, pthread_attr_default, task, NULL );
12718         if( status ) return errno;
12719
12720         /* give thread a chance to complete */
12721         /* it should remain joinable and hence detachable */
12722         sleep( 1 );
12723
12724         status = pthread_detach( &t );
12725         if( status ) return errno;
12726 #endif
12727
12728 #ifdef HAVE_LINUX_THREADS
12729         pthread_kill_other_threads_np();
12730 #endif
12731
12732         return 0;
12733
12734 }
12735
12736 EOF
12737 if { (eval echo configure:12738: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12738 then
12739   ol_cv_pthread_lpthread_lmach_lexc=yes
12740 else
12741   echo "configure: failed program was:" >&5
12742   cat conftest.$ac_ext >&5
12743   rm -fr conftest*
12744   ol_cv_pthread_lpthread_lmach_lexc=no
12745 fi
12746 rm -fr conftest*
12747 fi
12748
12749
12750                 # restore the LIBS
12751                 LIBS="$ol_LIBS"
12752         
12753 fi
12754
12755 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc" 1>&6
12756
12757         if test $ol_cv_pthread_lpthread_lmach_lexc = yes ; then
12758                 ol_link_pthreads="-lpthread -lmach -lexc"
12759                 ol_link_threads=posix
12760         fi
12761 fi
12762
12763
12764                 # Pthread try link: -lpthread -Wl,-woff,85 (ol_cv_pthread_lib_lpthread_woff)
12765 if test "$ol_link_threads" = no ; then
12766         # try -lpthread -Wl,-woff,85
12767         echo $ac_n "checking for pthread link with -lpthread -Wl,-woff,85""... $ac_c" 1>&6
12768 echo "configure:12769: checking for pthread link with -lpthread -Wl,-woff,85" >&5
12769 if eval "test \"\${ol_cv_pthread_lib_lpthread_woff+set}\" = set"; then
12770   echo $ac_n "(cached) $ac_c" 1>&6
12771 else
12772   
12773                 # save the flags
12774                 ol_LIBS="$LIBS"
12775                 LIBS="-lpthread -Wl,-woff,85 $LIBS"
12776
12777                 if test "$cross_compiling" = yes; then
12778   cat > conftest.$ac_ext <<EOF
12779 #line 12780 "configure"
12780 #include "confdefs.h"
12781 /* pthread test headers */
12782 #include <pthread.h>
12783 #if HAVE_PTHREADS < 7
12784 #include <errno.h>
12785 #endif
12786 #ifndef NULL
12787 #define NULL (void*)0
12788 #endif
12789
12790 static void *task(p)
12791         void *p;
12792 {
12793         return (void *) (p == NULL);
12794 }
12795
12796 int main() {
12797
12798         /* pthread test function */
12799 #ifndef PTHREAD_CREATE_DETACHED
12800 #define PTHREAD_CREATE_DETACHED 1
12801 #endif
12802         pthread_t t;
12803         int status;
12804         int detach = PTHREAD_CREATE_DETACHED;
12805
12806 #if HAVE_PTHREADS > 4
12807         /* Final pthreads */
12808         pthread_attr_t attr;
12809
12810         status = pthread_attr_init(&attr);
12811         if( status ) return status;
12812
12813 #if HAVE_PTHREADS < 7
12814         status = pthread_attr_setdetachstate(&attr, &detach);
12815         if( status < 0 ) status = errno;
12816 #else
12817         status = pthread_attr_setdetachstate(&attr, detach);
12818 #endif
12819         if( status ) return status;
12820         status = pthread_create( &t, &attr, task, NULL );
12821 #if HAVE_PTHREADS < 7
12822         if( status < 0 ) status = errno;
12823 #endif
12824         if( status ) return status;
12825 #else
12826         /* Draft 4 pthreads */
12827         status = pthread_create( &t, pthread_attr_default, task, NULL );
12828         if( status ) return errno;
12829
12830         /* give thread a chance to complete */
12831         /* it should remain joinable and hence detachable */
12832         sleep( 1 );
12833
12834         status = pthread_detach( &t );
12835         if( status ) return errno;
12836 #endif
12837
12838 #ifdef HAVE_LINUX_THREADS
12839         pthread_kill_other_threads_np();
12840 #endif
12841
12842         return 0;
12843
12844 ; return 0; }
12845 EOF
12846 if { (eval echo configure:12847: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12847   rm -rf conftest*
12848   ol_cv_pthread_lib_lpthread_woff=yes
12849 else
12850   echo "configure: failed program was:" >&5
12851   cat conftest.$ac_ext >&5
12852   rm -rf conftest*
12853   ol_cv_pthread_lib_lpthread_woff=no
12854 fi
12855 rm -f conftest*
12856 else
12857   cat > conftest.$ac_ext <<EOF
12858 #line 12859 "configure"
12859 #include "confdefs.h"
12860 /* pthread test headers */
12861 #include <pthread.h>
12862 #if HAVE_PTHREADS < 7
12863 #include <errno.h>
12864 #endif
12865 #ifndef NULL
12866 #define NULL (void*)0
12867 #endif
12868
12869 static void *task(p)
12870         void *p;
12871 {
12872         return (void *) (p == NULL);
12873 }
12874
12875
12876 int main(argc, argv)
12877         int argc;
12878         char **argv;
12879 {
12880
12881         /* pthread test function */
12882 #ifndef PTHREAD_CREATE_DETACHED
12883 #define PTHREAD_CREATE_DETACHED 1
12884 #endif
12885         pthread_t t;
12886         int status;
12887         int detach = PTHREAD_CREATE_DETACHED;
12888
12889 #if HAVE_PTHREADS > 4
12890         /* Final pthreads */
12891         pthread_attr_t attr;
12892
12893         status = pthread_attr_init(&attr);
12894         if( status ) return status;
12895
12896 #if HAVE_PTHREADS < 7
12897         status = pthread_attr_setdetachstate(&attr, &detach);
12898         if( status < 0 ) status = errno;
12899 #else
12900         status = pthread_attr_setdetachstate(&attr, detach);
12901 #endif
12902         if( status ) return status;
12903         status = pthread_create( &t, &attr, task, NULL );
12904 #if HAVE_PTHREADS < 7
12905         if( status < 0 ) status = errno;
12906 #endif
12907         if( status ) return status;
12908 #else
12909         /* Draft 4 pthreads */
12910         status = pthread_create( &t, pthread_attr_default, task, NULL );
12911         if( status ) return errno;
12912
12913         /* give thread a chance to complete */
12914         /* it should remain joinable and hence detachable */
12915         sleep( 1 );
12916
12917         status = pthread_detach( &t );
12918         if( status ) return errno;
12919 #endif
12920
12921 #ifdef HAVE_LINUX_THREADS
12922         pthread_kill_other_threads_np();
12923 #endif
12924
12925         return 0;
12926
12927 }
12928
12929 EOF
12930 if { (eval echo configure:12931: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12931 then
12932   ol_cv_pthread_lib_lpthread_woff=yes
12933 else
12934   echo "configure: failed program was:" >&5
12935   cat conftest.$ac_ext >&5
12936   rm -fr conftest*
12937   ol_cv_pthread_lib_lpthread_woff=no
12938 fi
12939 rm -fr conftest*
12940 fi
12941
12942
12943                 # restore the LIBS
12944                 LIBS="$ol_LIBS"
12945         
12946 fi
12947
12948 echo "$ac_t""$ol_cv_pthread_lib_lpthread_woff" 1>&6
12949
12950         if test $ol_cv_pthread_lib_lpthread_woff = yes ; then
12951                 ol_link_pthreads="-lpthread -Wl,-woff,85"
12952                 ol_link_threads=posix
12953         fi
12954 fi
12955
12956
12957                 # Pthread try link: -lpthread (ol_cv_pthread_lpthread)
12958 if test "$ol_link_threads" = no ; then
12959         # try -lpthread
12960         echo $ac_n "checking for pthread link with -lpthread""... $ac_c" 1>&6
12961 echo "configure:12962: checking for pthread link with -lpthread" >&5
12962 if eval "test \"\${ol_cv_pthread_lpthread+set}\" = set"; then
12963   echo $ac_n "(cached) $ac_c" 1>&6
12964 else
12965   
12966                 # save the flags
12967                 ol_LIBS="$LIBS"
12968                 LIBS="-lpthread $LIBS"
12969
12970                 if test "$cross_compiling" = yes; then
12971   cat > conftest.$ac_ext <<EOF
12972 #line 12973 "configure"
12973 #include "confdefs.h"
12974 /* pthread test headers */
12975 #include <pthread.h>
12976 #if HAVE_PTHREADS < 7
12977 #include <errno.h>
12978 #endif
12979 #ifndef NULL
12980 #define NULL (void*)0
12981 #endif
12982
12983 static void *task(p)
12984         void *p;
12985 {
12986         return (void *) (p == NULL);
12987 }
12988
12989 int main() {
12990
12991         /* pthread test function */
12992 #ifndef PTHREAD_CREATE_DETACHED
12993 #define PTHREAD_CREATE_DETACHED 1
12994 #endif
12995         pthread_t t;
12996         int status;
12997         int detach = PTHREAD_CREATE_DETACHED;
12998
12999 #if HAVE_PTHREADS > 4
13000         /* Final pthreads */
13001         pthread_attr_t attr;
13002
13003         status = pthread_attr_init(&attr);
13004         if( status ) return status;
13005
13006 #if HAVE_PTHREADS < 7
13007         status = pthread_attr_setdetachstate(&attr, &detach);
13008         if( status < 0 ) status = errno;
13009 #else
13010         status = pthread_attr_setdetachstate(&attr, detach);
13011 #endif
13012         if( status ) return status;
13013         status = pthread_create( &t, &attr, task, NULL );
13014 #if HAVE_PTHREADS < 7
13015         if( status < 0 ) status = errno;
13016 #endif
13017         if( status ) return status;
13018 #else
13019         /* Draft 4 pthreads */
13020         status = pthread_create( &t, pthread_attr_default, task, NULL );
13021         if( status ) return errno;
13022
13023         /* give thread a chance to complete */
13024         /* it should remain joinable and hence detachable */
13025         sleep( 1 );
13026
13027         status = pthread_detach( &t );
13028         if( status ) return errno;
13029 #endif
13030
13031 #ifdef HAVE_LINUX_THREADS
13032         pthread_kill_other_threads_np();
13033 #endif
13034
13035         return 0;
13036
13037 ; return 0; }
13038 EOF
13039 if { (eval echo configure:13040: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13040   rm -rf conftest*
13041   ol_cv_pthread_lpthread=yes
13042 else
13043   echo "configure: failed program was:" >&5
13044   cat conftest.$ac_ext >&5
13045   rm -rf conftest*
13046   ol_cv_pthread_lpthread=no
13047 fi
13048 rm -f conftest*
13049 else
13050   cat > conftest.$ac_ext <<EOF
13051 #line 13052 "configure"
13052 #include "confdefs.h"
13053 /* pthread test headers */
13054 #include <pthread.h>
13055 #if HAVE_PTHREADS < 7
13056 #include <errno.h>
13057 #endif
13058 #ifndef NULL
13059 #define NULL (void*)0
13060 #endif
13061
13062 static void *task(p)
13063         void *p;
13064 {
13065         return (void *) (p == NULL);
13066 }
13067
13068
13069 int main(argc, argv)
13070         int argc;
13071         char **argv;
13072 {
13073
13074         /* pthread test function */
13075 #ifndef PTHREAD_CREATE_DETACHED
13076 #define PTHREAD_CREATE_DETACHED 1
13077 #endif
13078         pthread_t t;
13079         int status;
13080         int detach = PTHREAD_CREATE_DETACHED;
13081
13082 #if HAVE_PTHREADS > 4
13083         /* Final pthreads */
13084         pthread_attr_t attr;
13085
13086         status = pthread_attr_init(&attr);
13087         if( status ) return status;
13088
13089 #if HAVE_PTHREADS < 7
13090         status = pthread_attr_setdetachstate(&attr, &detach);
13091         if( status < 0 ) status = errno;
13092 #else
13093         status = pthread_attr_setdetachstate(&attr, detach);
13094 #endif
13095         if( status ) return status;
13096         status = pthread_create( &t, &attr, task, NULL );
13097 #if HAVE_PTHREADS < 7
13098         if( status < 0 ) status = errno;
13099 #endif
13100         if( status ) return status;
13101 #else
13102         /* Draft 4 pthreads */
13103         status = pthread_create( &t, pthread_attr_default, task, NULL );
13104         if( status ) return errno;
13105
13106         /* give thread a chance to complete */
13107         /* it should remain joinable and hence detachable */
13108         sleep( 1 );
13109
13110         status = pthread_detach( &t );
13111         if( status ) return errno;
13112 #endif
13113
13114 #ifdef HAVE_LINUX_THREADS
13115         pthread_kill_other_threads_np();
13116 #endif
13117
13118         return 0;
13119
13120 }
13121
13122 EOF
13123 if { (eval echo configure:13124: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13124 then
13125   ol_cv_pthread_lpthread=yes
13126 else
13127   echo "configure: failed program was:" >&5
13128   cat conftest.$ac_ext >&5
13129   rm -fr conftest*
13130   ol_cv_pthread_lpthread=no
13131 fi
13132 rm -fr conftest*
13133 fi
13134
13135
13136                 # restore the LIBS
13137                 LIBS="$ol_LIBS"
13138         
13139 fi
13140
13141 echo "$ac_t""$ol_cv_pthread_lpthread" 1>&6
13142
13143         if test $ol_cv_pthread_lpthread = yes ; then
13144                 ol_link_pthreads="-lpthread"
13145                 ol_link_threads=posix
13146         fi
13147 fi
13148
13149                 # Pthread try link: -lc_r (ol_cv_pthread_lc_r)
13150 if test "$ol_link_threads" = no ; then
13151         # try -lc_r
13152         echo $ac_n "checking for pthread link with -lc_r""... $ac_c" 1>&6
13153 echo "configure:13154: checking for pthread link with -lc_r" >&5
13154 if eval "test \"\${ol_cv_pthread_lc_r+set}\" = set"; then
13155   echo $ac_n "(cached) $ac_c" 1>&6
13156 else
13157   
13158                 # save the flags
13159                 ol_LIBS="$LIBS"
13160                 LIBS="-lc_r $LIBS"
13161
13162                 if test "$cross_compiling" = yes; then
13163   cat > conftest.$ac_ext <<EOF
13164 #line 13165 "configure"
13165 #include "confdefs.h"
13166 /* pthread test headers */
13167 #include <pthread.h>
13168 #if HAVE_PTHREADS < 7
13169 #include <errno.h>
13170 #endif
13171 #ifndef NULL
13172 #define NULL (void*)0
13173 #endif
13174
13175 static void *task(p)
13176         void *p;
13177 {
13178         return (void *) (p == NULL);
13179 }
13180
13181 int main() {
13182
13183         /* pthread test function */
13184 #ifndef PTHREAD_CREATE_DETACHED
13185 #define PTHREAD_CREATE_DETACHED 1
13186 #endif
13187         pthread_t t;
13188         int status;
13189         int detach = PTHREAD_CREATE_DETACHED;
13190
13191 #if HAVE_PTHREADS > 4
13192         /* Final pthreads */
13193         pthread_attr_t attr;
13194
13195         status = pthread_attr_init(&attr);
13196         if( status ) return status;
13197
13198 #if HAVE_PTHREADS < 7
13199         status = pthread_attr_setdetachstate(&attr, &detach);
13200         if( status < 0 ) status = errno;
13201 #else
13202         status = pthread_attr_setdetachstate(&attr, detach);
13203 #endif
13204         if( status ) return status;
13205         status = pthread_create( &t, &attr, task, NULL );
13206 #if HAVE_PTHREADS < 7
13207         if( status < 0 ) status = errno;
13208 #endif
13209         if( status ) return status;
13210 #else
13211         /* Draft 4 pthreads */
13212         status = pthread_create( &t, pthread_attr_default, task, NULL );
13213         if( status ) return errno;
13214
13215         /* give thread a chance to complete */
13216         /* it should remain joinable and hence detachable */
13217         sleep( 1 );
13218
13219         status = pthread_detach( &t );
13220         if( status ) return errno;
13221 #endif
13222
13223 #ifdef HAVE_LINUX_THREADS
13224         pthread_kill_other_threads_np();
13225 #endif
13226
13227         return 0;
13228
13229 ; return 0; }
13230 EOF
13231 if { (eval echo configure:13232: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13232   rm -rf conftest*
13233   ol_cv_pthread_lc_r=yes
13234 else
13235   echo "configure: failed program was:" >&5
13236   cat conftest.$ac_ext >&5
13237   rm -rf conftest*
13238   ol_cv_pthread_lc_r=no
13239 fi
13240 rm -f conftest*
13241 else
13242   cat > conftest.$ac_ext <<EOF
13243 #line 13244 "configure"
13244 #include "confdefs.h"
13245 /* pthread test headers */
13246 #include <pthread.h>
13247 #if HAVE_PTHREADS < 7
13248 #include <errno.h>
13249 #endif
13250 #ifndef NULL
13251 #define NULL (void*)0
13252 #endif
13253
13254 static void *task(p)
13255         void *p;
13256 {
13257         return (void *) (p == NULL);
13258 }
13259
13260
13261 int main(argc, argv)
13262         int argc;
13263         char **argv;
13264 {
13265
13266         /* pthread test function */
13267 #ifndef PTHREAD_CREATE_DETACHED
13268 #define PTHREAD_CREATE_DETACHED 1
13269 #endif
13270         pthread_t t;
13271         int status;
13272         int detach = PTHREAD_CREATE_DETACHED;
13273
13274 #if HAVE_PTHREADS > 4
13275         /* Final pthreads */
13276         pthread_attr_t attr;
13277
13278         status = pthread_attr_init(&attr);
13279         if( status ) return status;
13280
13281 #if HAVE_PTHREADS < 7
13282         status = pthread_attr_setdetachstate(&attr, &detach);
13283         if( status < 0 ) status = errno;
13284 #else
13285         status = pthread_attr_setdetachstate(&attr, detach);
13286 #endif
13287         if( status ) return status;
13288         status = pthread_create( &t, &attr, task, NULL );
13289 #if HAVE_PTHREADS < 7
13290         if( status < 0 ) status = errno;
13291 #endif
13292         if( status ) return status;
13293 #else
13294         /* Draft 4 pthreads */
13295         status = pthread_create( &t, pthread_attr_default, task, NULL );
13296         if( status ) return errno;
13297
13298         /* give thread a chance to complete */
13299         /* it should remain joinable and hence detachable */
13300         sleep( 1 );
13301
13302         status = pthread_detach( &t );
13303         if( status ) return errno;
13304 #endif
13305
13306 #ifdef HAVE_LINUX_THREADS
13307         pthread_kill_other_threads_np();
13308 #endif
13309
13310         return 0;
13311
13312 }
13313
13314 EOF
13315 if { (eval echo configure:13316: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13316 then
13317   ol_cv_pthread_lc_r=yes
13318 else
13319   echo "configure: failed program was:" >&5
13320   cat conftest.$ac_ext >&5
13321   rm -fr conftest*
13322   ol_cv_pthread_lc_r=no
13323 fi
13324 rm -fr conftest*
13325 fi
13326
13327
13328                 # restore the LIBS
13329                 LIBS="$ol_LIBS"
13330         
13331 fi
13332
13333 echo "$ac_t""$ol_cv_pthread_lc_r" 1>&6
13334
13335         if test $ol_cv_pthread_lc_r = yes ; then
13336                 ol_link_pthreads="-lc_r"
13337                 ol_link_threads=posix
13338         fi
13339 fi
13340
13341
13342                 # Pthread try link: -threads (ol_cv_pthread_threads)
13343 if test "$ol_link_threads" = no ; then
13344         # try -threads
13345         echo $ac_n "checking for pthread link with -threads""... $ac_c" 1>&6
13346 echo "configure:13347: checking for pthread link with -threads" >&5
13347 if eval "test \"\${ol_cv_pthread_threads+set}\" = set"; then
13348   echo $ac_n "(cached) $ac_c" 1>&6
13349 else
13350   
13351                 # save the flags
13352                 ol_LIBS="$LIBS"
13353                 LIBS="-threads $LIBS"
13354
13355                 if test "$cross_compiling" = yes; then
13356   cat > conftest.$ac_ext <<EOF
13357 #line 13358 "configure"
13358 #include "confdefs.h"
13359 /* pthread test headers */
13360 #include <pthread.h>
13361 #if HAVE_PTHREADS < 7
13362 #include <errno.h>
13363 #endif
13364 #ifndef NULL
13365 #define NULL (void*)0
13366 #endif
13367
13368 static void *task(p)
13369         void *p;
13370 {
13371         return (void *) (p == NULL);
13372 }
13373
13374 int main() {
13375
13376         /* pthread test function */
13377 #ifndef PTHREAD_CREATE_DETACHED
13378 #define PTHREAD_CREATE_DETACHED 1
13379 #endif
13380         pthread_t t;
13381         int status;
13382         int detach = PTHREAD_CREATE_DETACHED;
13383
13384 #if HAVE_PTHREADS > 4
13385         /* Final pthreads */
13386         pthread_attr_t attr;
13387
13388         status = pthread_attr_init(&attr);
13389         if( status ) return status;
13390
13391 #if HAVE_PTHREADS < 7
13392         status = pthread_attr_setdetachstate(&attr, &detach);
13393         if( status < 0 ) status = errno;
13394 #else
13395         status = pthread_attr_setdetachstate(&attr, detach);
13396 #endif
13397         if( status ) return status;
13398         status = pthread_create( &t, &attr, task, NULL );
13399 #if HAVE_PTHREADS < 7
13400         if( status < 0 ) status = errno;
13401 #endif
13402         if( status ) return status;
13403 #else
13404         /* Draft 4 pthreads */
13405         status = pthread_create( &t, pthread_attr_default, task, NULL );
13406         if( status ) return errno;
13407
13408         /* give thread a chance to complete */
13409         /* it should remain joinable and hence detachable */
13410         sleep( 1 );
13411
13412         status = pthread_detach( &t );
13413         if( status ) return errno;
13414 #endif
13415
13416 #ifdef HAVE_LINUX_THREADS
13417         pthread_kill_other_threads_np();
13418 #endif
13419
13420         return 0;
13421
13422 ; return 0; }
13423 EOF
13424 if { (eval echo configure:13425: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13425   rm -rf conftest*
13426   ol_cv_pthread_threads=yes
13427 else
13428   echo "configure: failed program was:" >&5
13429   cat conftest.$ac_ext >&5
13430   rm -rf conftest*
13431   ol_cv_pthread_threads=no
13432 fi
13433 rm -f conftest*
13434 else
13435   cat > conftest.$ac_ext <<EOF
13436 #line 13437 "configure"
13437 #include "confdefs.h"
13438 /* pthread test headers */
13439 #include <pthread.h>
13440 #if HAVE_PTHREADS < 7
13441 #include <errno.h>
13442 #endif
13443 #ifndef NULL
13444 #define NULL (void*)0
13445 #endif
13446
13447 static void *task(p)
13448         void *p;
13449 {
13450         return (void *) (p == NULL);
13451 }
13452
13453
13454 int main(argc, argv)
13455         int argc;
13456         char **argv;
13457 {
13458
13459         /* pthread test function */
13460 #ifndef PTHREAD_CREATE_DETACHED
13461 #define PTHREAD_CREATE_DETACHED 1
13462 #endif
13463         pthread_t t;
13464         int status;
13465         int detach = PTHREAD_CREATE_DETACHED;
13466
13467 #if HAVE_PTHREADS > 4
13468         /* Final pthreads */
13469         pthread_attr_t attr;
13470
13471         status = pthread_attr_init(&attr);
13472         if( status ) return status;
13473
13474 #if HAVE_PTHREADS < 7
13475         status = pthread_attr_setdetachstate(&attr, &detach);
13476         if( status < 0 ) status = errno;
13477 #else
13478         status = pthread_attr_setdetachstate(&attr, detach);
13479 #endif
13480         if( status ) return status;
13481         status = pthread_create( &t, &attr, task, NULL );
13482 #if HAVE_PTHREADS < 7
13483         if( status < 0 ) status = errno;
13484 #endif
13485         if( status ) return status;
13486 #else
13487         /* Draft 4 pthreads */
13488         status = pthread_create( &t, pthread_attr_default, task, NULL );
13489         if( status ) return errno;
13490
13491         /* give thread a chance to complete */
13492         /* it should remain joinable and hence detachable */
13493         sleep( 1 );
13494
13495         status = pthread_detach( &t );
13496         if( status ) return errno;
13497 #endif
13498
13499 #ifdef HAVE_LINUX_THREADS
13500         pthread_kill_other_threads_np();
13501 #endif
13502
13503         return 0;
13504
13505 }
13506
13507 EOF
13508 if { (eval echo configure:13509: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13509 then
13510   ol_cv_pthread_threads=yes
13511 else
13512   echo "configure: failed program was:" >&5
13513   cat conftest.$ac_ext >&5
13514   rm -fr conftest*
13515   ol_cv_pthread_threads=no
13516 fi
13517 rm -fr conftest*
13518 fi
13519
13520
13521                 # restore the LIBS
13522                 LIBS="$ol_LIBS"
13523         
13524 fi
13525
13526 echo "$ac_t""$ol_cv_pthread_threads" 1>&6
13527
13528         if test $ol_cv_pthread_threads = yes ; then
13529                 ol_link_pthreads="-threads"
13530                 ol_link_threads=posix
13531         fi
13532 fi
13533
13534
13535                 # Pthread try link: -lpthreads -lmach -lexc -lc_r (ol_cv_pthread_lpthreads_lmach_lexc_lc_r)
13536 if test "$ol_link_threads" = no ; then
13537         # try -lpthreads -lmach -lexc -lc_r
13538         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc -lc_r""... $ac_c" 1>&6
13539 echo "configure:13540: checking for pthread link with -lpthreads -lmach -lexc -lc_r" >&5
13540 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc_lc_r+set}\" = set"; then
13541   echo $ac_n "(cached) $ac_c" 1>&6
13542 else
13543   
13544                 # save the flags
13545                 ol_LIBS="$LIBS"
13546                 LIBS="-lpthreads -lmach -lexc -lc_r $LIBS"
13547
13548                 if test "$cross_compiling" = yes; then
13549   cat > conftest.$ac_ext <<EOF
13550 #line 13551 "configure"
13551 #include "confdefs.h"
13552 /* pthread test headers */
13553 #include <pthread.h>
13554 #if HAVE_PTHREADS < 7
13555 #include <errno.h>
13556 #endif
13557 #ifndef NULL
13558 #define NULL (void*)0
13559 #endif
13560
13561 static void *task(p)
13562         void *p;
13563 {
13564         return (void *) (p == NULL);
13565 }
13566
13567 int main() {
13568
13569         /* pthread test function */
13570 #ifndef PTHREAD_CREATE_DETACHED
13571 #define PTHREAD_CREATE_DETACHED 1
13572 #endif
13573         pthread_t t;
13574         int status;
13575         int detach = PTHREAD_CREATE_DETACHED;
13576
13577 #if HAVE_PTHREADS > 4
13578         /* Final pthreads */
13579         pthread_attr_t attr;
13580
13581         status = pthread_attr_init(&attr);
13582         if( status ) return status;
13583
13584 #if HAVE_PTHREADS < 7
13585         status = pthread_attr_setdetachstate(&attr, &detach);
13586         if( status < 0 ) status = errno;
13587 #else
13588         status = pthread_attr_setdetachstate(&attr, detach);
13589 #endif
13590         if( status ) return status;
13591         status = pthread_create( &t, &attr, task, NULL );
13592 #if HAVE_PTHREADS < 7
13593         if( status < 0 ) status = errno;
13594 #endif
13595         if( status ) return status;
13596 #else
13597         /* Draft 4 pthreads */
13598         status = pthread_create( &t, pthread_attr_default, task, NULL );
13599         if( status ) return errno;
13600
13601         /* give thread a chance to complete */
13602         /* it should remain joinable and hence detachable */
13603         sleep( 1 );
13604
13605         status = pthread_detach( &t );
13606         if( status ) return errno;
13607 #endif
13608
13609 #ifdef HAVE_LINUX_THREADS
13610         pthread_kill_other_threads_np();
13611 #endif
13612
13613         return 0;
13614
13615 ; return 0; }
13616 EOF
13617 if { (eval echo configure:13618: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13618   rm -rf conftest*
13619   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
13620 else
13621   echo "configure: failed program was:" >&5
13622   cat conftest.$ac_ext >&5
13623   rm -rf conftest*
13624   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
13625 fi
13626 rm -f conftest*
13627 else
13628   cat > conftest.$ac_ext <<EOF
13629 #line 13630 "configure"
13630 #include "confdefs.h"
13631 /* pthread test headers */
13632 #include <pthread.h>
13633 #if HAVE_PTHREADS < 7
13634 #include <errno.h>
13635 #endif
13636 #ifndef NULL
13637 #define NULL (void*)0
13638 #endif
13639
13640 static void *task(p)
13641         void *p;
13642 {
13643         return (void *) (p == NULL);
13644 }
13645
13646
13647 int main(argc, argv)
13648         int argc;
13649         char **argv;
13650 {
13651
13652         /* pthread test function */
13653 #ifndef PTHREAD_CREATE_DETACHED
13654 #define PTHREAD_CREATE_DETACHED 1
13655 #endif
13656         pthread_t t;
13657         int status;
13658         int detach = PTHREAD_CREATE_DETACHED;
13659
13660 #if HAVE_PTHREADS > 4
13661         /* Final pthreads */
13662         pthread_attr_t attr;
13663
13664         status = pthread_attr_init(&attr);
13665         if( status ) return status;
13666
13667 #if HAVE_PTHREADS < 7
13668         status = pthread_attr_setdetachstate(&attr, &detach);
13669         if( status < 0 ) status = errno;
13670 #else
13671         status = pthread_attr_setdetachstate(&attr, detach);
13672 #endif
13673         if( status ) return status;
13674         status = pthread_create( &t, &attr, task, NULL );
13675 #if HAVE_PTHREADS < 7
13676         if( status < 0 ) status = errno;
13677 #endif
13678         if( status ) return status;
13679 #else
13680         /* Draft 4 pthreads */
13681         status = pthread_create( &t, pthread_attr_default, task, NULL );
13682         if( status ) return errno;
13683
13684         /* give thread a chance to complete */
13685         /* it should remain joinable and hence detachable */
13686         sleep( 1 );
13687
13688         status = pthread_detach( &t );
13689         if( status ) return errno;
13690 #endif
13691
13692 #ifdef HAVE_LINUX_THREADS
13693         pthread_kill_other_threads_np();
13694 #endif
13695
13696         return 0;
13697
13698 }
13699
13700 EOF
13701 if { (eval echo configure:13702: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13702 then
13703   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
13704 else
13705   echo "configure: failed program was:" >&5
13706   cat conftest.$ac_ext >&5
13707   rm -fr conftest*
13708   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
13709 fi
13710 rm -fr conftest*
13711 fi
13712
13713
13714                 # restore the LIBS
13715                 LIBS="$ol_LIBS"
13716         
13717 fi
13718
13719 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc_lc_r" 1>&6
13720
13721         if test $ol_cv_pthread_lpthreads_lmach_lexc_lc_r = yes ; then
13722                 ol_link_pthreads="-lpthreads -lmach -lexc -lc_r"
13723                 ol_link_threads=posix
13724         fi
13725 fi
13726
13727                 # Pthread try link: -lpthreads -lmach -lexc (ol_cv_pthread_lpthreads_lmach_lexc)
13728 if test "$ol_link_threads" = no ; then
13729         # try -lpthreads -lmach -lexc
13730         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc""... $ac_c" 1>&6
13731 echo "configure:13732: checking for pthread link with -lpthreads -lmach -lexc" >&5
13732 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc+set}\" = set"; then
13733   echo $ac_n "(cached) $ac_c" 1>&6
13734 else
13735   
13736                 # save the flags
13737                 ol_LIBS="$LIBS"
13738                 LIBS="-lpthreads -lmach -lexc $LIBS"
13739
13740                 if test "$cross_compiling" = yes; then
13741   cat > conftest.$ac_ext <<EOF
13742 #line 13743 "configure"
13743 #include "confdefs.h"
13744 /* pthread test headers */
13745 #include <pthread.h>
13746 #if HAVE_PTHREADS < 7
13747 #include <errno.h>
13748 #endif
13749 #ifndef NULL
13750 #define NULL (void*)0
13751 #endif
13752
13753 static void *task(p)
13754         void *p;
13755 {
13756         return (void *) (p == NULL);
13757 }
13758
13759 int main() {
13760
13761         /* pthread test function */
13762 #ifndef PTHREAD_CREATE_DETACHED
13763 #define PTHREAD_CREATE_DETACHED 1
13764 #endif
13765         pthread_t t;
13766         int status;
13767         int detach = PTHREAD_CREATE_DETACHED;
13768
13769 #if HAVE_PTHREADS > 4
13770         /* Final pthreads */
13771         pthread_attr_t attr;
13772
13773         status = pthread_attr_init(&attr);
13774         if( status ) return status;
13775
13776 #if HAVE_PTHREADS < 7
13777         status = pthread_attr_setdetachstate(&attr, &detach);
13778         if( status < 0 ) status = errno;
13779 #else
13780         status = pthread_attr_setdetachstate(&attr, detach);
13781 #endif
13782         if( status ) return status;
13783         status = pthread_create( &t, &attr, task, NULL );
13784 #if HAVE_PTHREADS < 7
13785         if( status < 0 ) status = errno;
13786 #endif
13787         if( status ) return status;
13788 #else
13789         /* Draft 4 pthreads */
13790         status = pthread_create( &t, pthread_attr_default, task, NULL );
13791         if( status ) return errno;
13792
13793         /* give thread a chance to complete */
13794         /* it should remain joinable and hence detachable */
13795         sleep( 1 );
13796
13797         status = pthread_detach( &t );
13798         if( status ) return errno;
13799 #endif
13800
13801 #ifdef HAVE_LINUX_THREADS
13802         pthread_kill_other_threads_np();
13803 #endif
13804
13805         return 0;
13806
13807 ; return 0; }
13808 EOF
13809 if { (eval echo configure:13810: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13810   rm -rf conftest*
13811   ol_cv_pthread_lpthreads_lmach_lexc=yes
13812 else
13813   echo "configure: failed program was:" >&5
13814   cat conftest.$ac_ext >&5
13815   rm -rf conftest*
13816   ol_cv_pthread_lpthreads_lmach_lexc=no
13817 fi
13818 rm -f conftest*
13819 else
13820   cat > conftest.$ac_ext <<EOF
13821 #line 13822 "configure"
13822 #include "confdefs.h"
13823 /* pthread test headers */
13824 #include <pthread.h>
13825 #if HAVE_PTHREADS < 7
13826 #include <errno.h>
13827 #endif
13828 #ifndef NULL
13829 #define NULL (void*)0
13830 #endif
13831
13832 static void *task(p)
13833         void *p;
13834 {
13835         return (void *) (p == NULL);
13836 }
13837
13838
13839 int main(argc, argv)
13840         int argc;
13841         char **argv;
13842 {
13843
13844         /* pthread test function */
13845 #ifndef PTHREAD_CREATE_DETACHED
13846 #define PTHREAD_CREATE_DETACHED 1
13847 #endif
13848         pthread_t t;
13849         int status;
13850         int detach = PTHREAD_CREATE_DETACHED;
13851
13852 #if HAVE_PTHREADS > 4
13853         /* Final pthreads */
13854         pthread_attr_t attr;
13855
13856         status = pthread_attr_init(&attr);
13857         if( status ) return status;
13858
13859 #if HAVE_PTHREADS < 7
13860         status = pthread_attr_setdetachstate(&attr, &detach);
13861         if( status < 0 ) status = errno;
13862 #else
13863         status = pthread_attr_setdetachstate(&attr, detach);
13864 #endif
13865         if( status ) return status;
13866         status = pthread_create( &t, &attr, task, NULL );
13867 #if HAVE_PTHREADS < 7
13868         if( status < 0 ) status = errno;
13869 #endif
13870         if( status ) return status;
13871 #else
13872         /* Draft 4 pthreads */
13873         status = pthread_create( &t, pthread_attr_default, task, NULL );
13874         if( status ) return errno;
13875
13876         /* give thread a chance to complete */
13877         /* it should remain joinable and hence detachable */
13878         sleep( 1 );
13879
13880         status = pthread_detach( &t );
13881         if( status ) return errno;
13882 #endif
13883
13884 #ifdef HAVE_LINUX_THREADS
13885         pthread_kill_other_threads_np();
13886 #endif
13887
13888         return 0;
13889
13890 }
13891
13892 EOF
13893 if { (eval echo configure:13894: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13894 then
13895   ol_cv_pthread_lpthreads_lmach_lexc=yes
13896 else
13897   echo "configure: failed program was:" >&5
13898   cat conftest.$ac_ext >&5
13899   rm -fr conftest*
13900   ol_cv_pthread_lpthreads_lmach_lexc=no
13901 fi
13902 rm -fr conftest*
13903 fi
13904
13905
13906                 # restore the LIBS
13907                 LIBS="$ol_LIBS"
13908         
13909 fi
13910
13911 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc" 1>&6
13912
13913         if test $ol_cv_pthread_lpthreads_lmach_lexc = yes ; then
13914                 ol_link_pthreads="-lpthreads -lmach -lexc"
13915                 ol_link_threads=posix
13916         fi
13917 fi
13918
13919                 # Pthread try link: -lpthreads -lexc (ol_cv_pthread_lpthreads_lexc)
13920 if test "$ol_link_threads" = no ; then
13921         # try -lpthreads -lexc
13922         echo $ac_n "checking for pthread link with -lpthreads -lexc""... $ac_c" 1>&6
13923 echo "configure:13924: checking for pthread link with -lpthreads -lexc" >&5
13924 if eval "test \"\${ol_cv_pthread_lpthreads_lexc+set}\" = set"; then
13925   echo $ac_n "(cached) $ac_c" 1>&6
13926 else
13927   
13928                 # save the flags
13929                 ol_LIBS="$LIBS"
13930                 LIBS="-lpthreads -lexc $LIBS"
13931
13932                 if test "$cross_compiling" = yes; then
13933   cat > conftest.$ac_ext <<EOF
13934 #line 13935 "configure"
13935 #include "confdefs.h"
13936 /* pthread test headers */
13937 #include <pthread.h>
13938 #if HAVE_PTHREADS < 7
13939 #include <errno.h>
13940 #endif
13941 #ifndef NULL
13942 #define NULL (void*)0
13943 #endif
13944
13945 static void *task(p)
13946         void *p;
13947 {
13948         return (void *) (p == NULL);
13949 }
13950
13951 int main() {
13952
13953         /* pthread test function */
13954 #ifndef PTHREAD_CREATE_DETACHED
13955 #define PTHREAD_CREATE_DETACHED 1
13956 #endif
13957         pthread_t t;
13958         int status;
13959         int detach = PTHREAD_CREATE_DETACHED;
13960
13961 #if HAVE_PTHREADS > 4
13962         /* Final pthreads */
13963         pthread_attr_t attr;
13964
13965         status = pthread_attr_init(&attr);
13966         if( status ) return status;
13967
13968 #if HAVE_PTHREADS < 7
13969         status = pthread_attr_setdetachstate(&attr, &detach);
13970         if( status < 0 ) status = errno;
13971 #else
13972         status = pthread_attr_setdetachstate(&attr, detach);
13973 #endif
13974         if( status ) return status;
13975         status = pthread_create( &t, &attr, task, NULL );
13976 #if HAVE_PTHREADS < 7
13977         if( status < 0 ) status = errno;
13978 #endif
13979         if( status ) return status;
13980 #else
13981         /* Draft 4 pthreads */
13982         status = pthread_create( &t, pthread_attr_default, task, NULL );
13983         if( status ) return errno;
13984
13985         /* give thread a chance to complete */
13986         /* it should remain joinable and hence detachable */
13987         sleep( 1 );
13988
13989         status = pthread_detach( &t );
13990         if( status ) return errno;
13991 #endif
13992
13993 #ifdef HAVE_LINUX_THREADS
13994         pthread_kill_other_threads_np();
13995 #endif
13996
13997         return 0;
13998
13999 ; return 0; }
14000 EOF
14001 if { (eval echo configure:14002: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14002   rm -rf conftest*
14003   ol_cv_pthread_lpthreads_lexc=yes
14004 else
14005   echo "configure: failed program was:" >&5
14006   cat conftest.$ac_ext >&5
14007   rm -rf conftest*
14008   ol_cv_pthread_lpthreads_lexc=no
14009 fi
14010 rm -f conftest*
14011 else
14012   cat > conftest.$ac_ext <<EOF
14013 #line 14014 "configure"
14014 #include "confdefs.h"
14015 /* pthread test headers */
14016 #include <pthread.h>
14017 #if HAVE_PTHREADS < 7
14018 #include <errno.h>
14019 #endif
14020 #ifndef NULL
14021 #define NULL (void*)0
14022 #endif
14023
14024 static void *task(p)
14025         void *p;
14026 {
14027         return (void *) (p == NULL);
14028 }
14029
14030
14031 int main(argc, argv)
14032         int argc;
14033         char **argv;
14034 {
14035
14036         /* pthread test function */
14037 #ifndef PTHREAD_CREATE_DETACHED
14038 #define PTHREAD_CREATE_DETACHED 1
14039 #endif
14040         pthread_t t;
14041         int status;
14042         int detach = PTHREAD_CREATE_DETACHED;
14043
14044 #if HAVE_PTHREADS > 4
14045         /* Final pthreads */
14046         pthread_attr_t attr;
14047
14048         status = pthread_attr_init(&attr);
14049         if( status ) return status;
14050
14051 #if HAVE_PTHREADS < 7
14052         status = pthread_attr_setdetachstate(&attr, &detach);
14053         if( status < 0 ) status = errno;
14054 #else
14055         status = pthread_attr_setdetachstate(&attr, detach);
14056 #endif
14057         if( status ) return status;
14058         status = pthread_create( &t, &attr, task, NULL );
14059 #if HAVE_PTHREADS < 7
14060         if( status < 0 ) status = errno;
14061 #endif
14062         if( status ) return status;
14063 #else
14064         /* Draft 4 pthreads */
14065         status = pthread_create( &t, pthread_attr_default, task, NULL );
14066         if( status ) return errno;
14067
14068         /* give thread a chance to complete */
14069         /* it should remain joinable and hence detachable */
14070         sleep( 1 );
14071
14072         status = pthread_detach( &t );
14073         if( status ) return errno;
14074 #endif
14075
14076 #ifdef HAVE_LINUX_THREADS
14077         pthread_kill_other_threads_np();
14078 #endif
14079
14080         return 0;
14081
14082 }
14083
14084 EOF
14085 if { (eval echo configure:14086: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14086 then
14087   ol_cv_pthread_lpthreads_lexc=yes
14088 else
14089   echo "configure: failed program was:" >&5
14090   cat conftest.$ac_ext >&5
14091   rm -fr conftest*
14092   ol_cv_pthread_lpthreads_lexc=no
14093 fi
14094 rm -fr conftest*
14095 fi
14096
14097
14098                 # restore the LIBS
14099                 LIBS="$ol_LIBS"
14100         
14101 fi
14102
14103 echo "$ac_t""$ol_cv_pthread_lpthreads_lexc" 1>&6
14104
14105         if test $ol_cv_pthread_lpthreads_lexc = yes ; then
14106                 ol_link_pthreads="-lpthreads -lexc"
14107                 ol_link_threads=posix
14108         fi
14109 fi
14110
14111
14112                 # Pthread try link: -lpthreads (ol_cv_pthread_lib_lpthreads)
14113 if test "$ol_link_threads" = no ; then
14114         # try -lpthreads
14115         echo $ac_n "checking for pthread link with -lpthreads""... $ac_c" 1>&6
14116 echo "configure:14117: checking for pthread link with -lpthreads" >&5
14117 if eval "test \"\${ol_cv_pthread_lib_lpthreads+set}\" = set"; then
14118   echo $ac_n "(cached) $ac_c" 1>&6
14119 else
14120   
14121                 # save the flags
14122                 ol_LIBS="$LIBS"
14123                 LIBS="-lpthreads $LIBS"
14124
14125                 if test "$cross_compiling" = yes; then
14126   cat > conftest.$ac_ext <<EOF
14127 #line 14128 "configure"
14128 #include "confdefs.h"
14129 /* pthread test headers */
14130 #include <pthread.h>
14131 #if HAVE_PTHREADS < 7
14132 #include <errno.h>
14133 #endif
14134 #ifndef NULL
14135 #define NULL (void*)0
14136 #endif
14137
14138 static void *task(p)
14139         void *p;
14140 {
14141         return (void *) (p == NULL);
14142 }
14143
14144 int main() {
14145
14146         /* pthread test function */
14147 #ifndef PTHREAD_CREATE_DETACHED
14148 #define PTHREAD_CREATE_DETACHED 1
14149 #endif
14150         pthread_t t;
14151         int status;
14152         int detach = PTHREAD_CREATE_DETACHED;
14153
14154 #if HAVE_PTHREADS > 4
14155         /* Final pthreads */
14156         pthread_attr_t attr;
14157
14158         status = pthread_attr_init(&attr);
14159         if( status ) return status;
14160
14161 #if HAVE_PTHREADS < 7
14162         status = pthread_attr_setdetachstate(&attr, &detach);
14163         if( status < 0 ) status = errno;
14164 #else
14165         status = pthread_attr_setdetachstate(&attr, detach);
14166 #endif
14167         if( status ) return status;
14168         status = pthread_create( &t, &attr, task, NULL );
14169 #if HAVE_PTHREADS < 7
14170         if( status < 0 ) status = errno;
14171 #endif
14172         if( status ) return status;
14173 #else
14174         /* Draft 4 pthreads */
14175         status = pthread_create( &t, pthread_attr_default, task, NULL );
14176         if( status ) return errno;
14177
14178         /* give thread a chance to complete */
14179         /* it should remain joinable and hence detachable */
14180         sleep( 1 );
14181
14182         status = pthread_detach( &t );
14183         if( status ) return errno;
14184 #endif
14185
14186 #ifdef HAVE_LINUX_THREADS
14187         pthread_kill_other_threads_np();
14188 #endif
14189
14190         return 0;
14191
14192 ; return 0; }
14193 EOF
14194 if { (eval echo configure:14195: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14195   rm -rf conftest*
14196   ol_cv_pthread_lib_lpthreads=yes
14197 else
14198   echo "configure: failed program was:" >&5
14199   cat conftest.$ac_ext >&5
14200   rm -rf conftest*
14201   ol_cv_pthread_lib_lpthreads=no
14202 fi
14203 rm -f conftest*
14204 else
14205   cat > conftest.$ac_ext <<EOF
14206 #line 14207 "configure"
14207 #include "confdefs.h"
14208 /* pthread test headers */
14209 #include <pthread.h>
14210 #if HAVE_PTHREADS < 7
14211 #include <errno.h>
14212 #endif
14213 #ifndef NULL
14214 #define NULL (void*)0
14215 #endif
14216
14217 static void *task(p)
14218         void *p;
14219 {
14220         return (void *) (p == NULL);
14221 }
14222
14223
14224 int main(argc, argv)
14225         int argc;
14226         char **argv;
14227 {
14228
14229         /* pthread test function */
14230 #ifndef PTHREAD_CREATE_DETACHED
14231 #define PTHREAD_CREATE_DETACHED 1
14232 #endif
14233         pthread_t t;
14234         int status;
14235         int detach = PTHREAD_CREATE_DETACHED;
14236
14237 #if HAVE_PTHREADS > 4
14238         /* Final pthreads */
14239         pthread_attr_t attr;
14240
14241         status = pthread_attr_init(&attr);
14242         if( status ) return status;
14243
14244 #if HAVE_PTHREADS < 7
14245         status = pthread_attr_setdetachstate(&attr, &detach);
14246         if( status < 0 ) status = errno;
14247 #else
14248         status = pthread_attr_setdetachstate(&attr, detach);
14249 #endif
14250         if( status ) return status;
14251         status = pthread_create( &t, &attr, task, NULL );
14252 #if HAVE_PTHREADS < 7
14253         if( status < 0 ) status = errno;
14254 #endif
14255         if( status ) return status;
14256 #else
14257         /* Draft 4 pthreads */
14258         status = pthread_create( &t, pthread_attr_default, task, NULL );
14259         if( status ) return errno;
14260
14261         /* give thread a chance to complete */
14262         /* it should remain joinable and hence detachable */
14263         sleep( 1 );
14264
14265         status = pthread_detach( &t );
14266         if( status ) return errno;
14267 #endif
14268
14269 #ifdef HAVE_LINUX_THREADS
14270         pthread_kill_other_threads_np();
14271 #endif
14272
14273         return 0;
14274
14275 }
14276
14277 EOF
14278 if { (eval echo configure:14279: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14279 then
14280   ol_cv_pthread_lib_lpthreads=yes
14281 else
14282   echo "configure: failed program was:" >&5
14283   cat conftest.$ac_ext >&5
14284   rm -fr conftest*
14285   ol_cv_pthread_lib_lpthreads=no
14286 fi
14287 rm -fr conftest*
14288 fi
14289
14290
14291                 # restore the LIBS
14292                 LIBS="$ol_LIBS"
14293         
14294 fi
14295
14296 echo "$ac_t""$ol_cv_pthread_lib_lpthreads" 1>&6
14297
14298         if test $ol_cv_pthread_lib_lpthreads = yes ; then
14299                 ol_link_pthreads="-lpthreads"
14300                 ol_link_threads=posix
14301         fi
14302 fi
14303
14304
14305                 if test $ol_link_threads != no ; then
14306                         LTHREAD_LIBS="$LTHREAD_LIBS $ol_link_pthreads"
14307
14308                                                 save_CPPFLAGS="$CPPFLAGS"
14309                         save_LIBS="$LIBS"
14310                         LIBS="$LTHREAD_LIBS $LIBS"
14311
14312                                                                                                 for ac_func in sched_yield pthread_yield thr_yield
14313 do
14314 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
14315 echo "configure:14316: checking for $ac_func" >&5
14316 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
14317   echo $ac_n "(cached) $ac_c" 1>&6
14318 else
14319   cat > conftest.$ac_ext <<EOF
14320 #line 14321 "configure"
14321 #include "confdefs.h"
14322 /* System header to define __stub macros and hopefully few prototypes,
14323     which can conflict with char $ac_func(); below.  */
14324 #include <assert.h>
14325 /* Override any gcc2 internal prototype to avoid an error.  */
14326 /* We use char because int might match the return type of a gcc2
14327     builtin and then its argument prototype would still apply.  */
14328 char $ac_func();
14329 char (*f)();
14330
14331 int main() {
14332
14333 /* The GNU C library defines this for functions which it implements
14334     to always fail with ENOSYS.  Some functions are actually named
14335     something starting with __ and the normal name is an alias.  */
14336 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14337 choke me
14338 #else
14339 f = $ac_func;
14340 #endif
14341
14342 ; return 0; }
14343 EOF
14344 if { (eval echo configure:14345: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14345   rm -rf conftest*
14346   eval "ac_cv_func_$ac_func=yes"
14347 else
14348   echo "configure: failed program was:" >&5
14349   cat conftest.$ac_ext >&5
14350   rm -rf conftest*
14351   eval "ac_cv_func_$ac_func=no"
14352 fi
14353 rm -f conftest*
14354 fi
14355
14356 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
14357   echo "$ac_t""yes" 1>&6
14358     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
14359   cat >> confdefs.h <<EOF
14360 #define $ac_tr_func 1
14361 EOF
14362  
14363 else
14364   echo "$ac_t""no" 1>&6
14365 fi
14366 done
14367
14368
14369                         if test $ac_cv_func_sched_yield = no -a \
14370                                 $ac_cv_func_pthread_yield = no -a \
14371                                 $ac_cv_func_thr_yield = no ; then
14372                                                                 echo $ac_n "checking for sched_yield in -lrt""... $ac_c" 1>&6
14373 echo "configure:14374: checking for sched_yield in -lrt" >&5
14374 ac_lib_var=`echo rt'_'sched_yield | sed 'y%./+-:%__p__%'`
14375 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
14376   echo $ac_n "(cached) $ac_c" 1>&6
14377 else
14378   ac_save_LIBS="$LIBS"
14379 LIBS="-lrt  $LIBS"
14380 cat > conftest.$ac_ext <<EOF
14381 #line 14382 "configure"
14382 #include "confdefs.h"
14383 /* Override any gcc2 internal prototype to avoid an error.  */
14384 /* We use char because int might match the return type of a gcc2
14385     builtin and then its argument prototype would still apply.  */
14386 char sched_yield();
14387
14388 int main() {
14389 sched_yield()
14390 ; return 0; }
14391 EOF
14392 if { (eval echo configure:14393: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14393   rm -rf conftest*
14394   eval "ac_cv_lib_$ac_lib_var=yes"
14395 else
14396   echo "configure: failed program was:" >&5
14397   cat conftest.$ac_ext >&5
14398   rm -rf conftest*
14399   eval "ac_cv_lib_$ac_lib_var=no"
14400 fi
14401 rm -f conftest*
14402 LIBS="$ac_save_LIBS"
14403
14404 fi
14405 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
14406   echo "$ac_t""yes" 1>&6
14407   LTHREAD_LIBS="$LTHREAD_LIBS -lrt"
14408                                         cat >> confdefs.h <<\EOF
14409 #define HAVE_SCHED_YIELD 1
14410 EOF
14411
14412                                         ac_cv_func_sched_yield=yes
14413 else
14414   echo "$ac_t""no" 1>&6
14415 ac_cv_func_sched_yield=no
14416 fi
14417
14418                         fi
14419                         if test $ac_cv_func_sched_yield = no -a \
14420                                 $ac_cv_func_pthread_yield = no -a \
14421                                 "$ac_cv_func_thr_yield" = no ; then
14422                                 echo "configure: warning: could not locate sched_yield() or pthread_yield()" 1>&2
14423                         fi
14424
14425                                                 for ac_func in pthread_kill pthread_rwlock_destroy
14426 do
14427 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
14428 echo "configure:14429: checking for $ac_func" >&5
14429 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
14430   echo $ac_n "(cached) $ac_c" 1>&6
14431 else
14432   cat > conftest.$ac_ext <<EOF
14433 #line 14434 "configure"
14434 #include "confdefs.h"
14435 /* System header to define __stub macros and hopefully few prototypes,
14436     which can conflict with char $ac_func(); below.  */
14437 #include <assert.h>
14438 /* Override any gcc2 internal prototype to avoid an error.  */
14439 /* We use char because int might match the return type of a gcc2
14440     builtin and then its argument prototype would still apply.  */
14441 char $ac_func();
14442 char (*f)();
14443
14444 int main() {
14445
14446 /* The GNU C library defines this for functions which it implements
14447     to always fail with ENOSYS.  Some functions are actually named
14448     something starting with __ and the normal name is an alias.  */
14449 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14450 choke me
14451 #else
14452 f = $ac_func;
14453 #endif
14454
14455 ; return 0; }
14456 EOF
14457 if { (eval echo configure:14458: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14458   rm -rf conftest*
14459   eval "ac_cv_func_$ac_func=yes"
14460 else
14461   echo "configure: failed program was:" >&5
14462   cat conftest.$ac_ext >&5
14463   rm -rf conftest*
14464   eval "ac_cv_func_$ac_func=no"
14465 fi
14466 rm -f conftest*
14467 fi
14468
14469 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
14470   echo "$ac_t""yes" 1>&6
14471     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
14472   cat >> confdefs.h <<EOF
14473 #define $ac_tr_func 1
14474 EOF
14475  
14476 else
14477   echo "$ac_t""no" 1>&6
14478 fi
14479 done
14480
14481
14482                                                                         echo $ac_n "checking for pthread_detach with <pthread.h>""... $ac_c" 1>&6
14483 echo "configure:14484: checking for pthread_detach with <pthread.h>" >&5
14484 if eval "test \"\${ol_cv_func_pthread_detach+set}\" = set"; then
14485   echo $ac_n "(cached) $ac_c" 1>&6
14486 else
14487   
14488                                                                 cat > conftest.$ac_ext <<EOF
14489 #line 14490 "configure"
14490 #include "confdefs.h"
14491
14492 #include <pthread.h>
14493 #ifndef NULL
14494 #define NULL (void*)0
14495 #endif
14496
14497 int main() {
14498 pthread_detach(NULL);
14499 ; return 0; }
14500 EOF
14501 if { (eval echo configure:14502: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14502   rm -rf conftest*
14503   ol_cv_func_pthread_detach=yes
14504 else
14505   echo "configure: failed program was:" >&5
14506   cat conftest.$ac_ext >&5
14507   rm -rf conftest*
14508   ol_cv_func_pthread_detach=no
14509 fi
14510 rm -f conftest*
14511                         
14512 fi
14513
14514 echo "$ac_t""$ol_cv_func_pthread_detach" 1>&6
14515
14516                         if test $ol_cv_func_pthread_detach = no ; then
14517                                 { echo "configure: error: could not locate pthread_detach()" 1>&2; exit 1; }
14518                         fi
14519
14520                         cat >> confdefs.h <<\EOF
14521 #define HAVE_PTHREAD_DETACH 1
14522 EOF
14523
14524
14525                                                 for ac_func in \
14526                                 pthread_setconcurrency \
14527                                 pthread_getconcurrency \
14528                                 thr_setconcurrency \
14529                                 thr_getconcurrency \
14530                         
14531 do
14532 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
14533 echo "configure:14534: checking for $ac_func" >&5
14534 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
14535   echo $ac_n "(cached) $ac_c" 1>&6
14536 else
14537   cat > conftest.$ac_ext <<EOF
14538 #line 14539 "configure"
14539 #include "confdefs.h"
14540 /* System header to define __stub macros and hopefully few prototypes,
14541     which can conflict with char $ac_func(); below.  */
14542 #include <assert.h>
14543 /* Override any gcc2 internal prototype to avoid an error.  */
14544 /* We use char because int might match the return type of a gcc2
14545     builtin and then its argument prototype would still apply.  */
14546 char $ac_func();
14547 char (*f)();
14548
14549 int main() {
14550
14551 /* The GNU C library defines this for functions which it implements
14552     to always fail with ENOSYS.  Some functions are actually named
14553     something starting with __ and the normal name is an alias.  */
14554 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14555 choke me
14556 #else
14557 f = $ac_func;
14558 #endif
14559
14560 ; return 0; }
14561 EOF
14562 if { (eval echo configure:14563: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14563   rm -rf conftest*
14564   eval "ac_cv_func_$ac_func=yes"
14565 else
14566   echo "configure: failed program was:" >&5
14567   cat conftest.$ac_ext >&5
14568   rm -rf conftest*
14569   eval "ac_cv_func_$ac_func=no"
14570 fi
14571 rm -f conftest*
14572 fi
14573
14574 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
14575   echo "$ac_t""yes" 1>&6
14576     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
14577   cat >> confdefs.h <<EOF
14578 #define $ac_tr_func 1
14579 EOF
14580  
14581 else
14582   echo "$ac_t""no" 1>&6
14583 fi
14584 done
14585
14586
14587                         
14588         for ac_func in pthread_kill_other_threads_np
14589 do
14590 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
14591 echo "configure:14592: checking for $ac_func" >&5
14592 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
14593   echo $ac_n "(cached) $ac_c" 1>&6
14594 else
14595   cat > conftest.$ac_ext <<EOF
14596 #line 14597 "configure"
14597 #include "confdefs.h"
14598 /* System header to define __stub macros and hopefully few prototypes,
14599     which can conflict with char $ac_func(); below.  */
14600 #include <assert.h>
14601 /* Override any gcc2 internal prototype to avoid an error.  */
14602 /* We use char because int might match the return type of a gcc2
14603     builtin and then its argument prototype would still apply.  */
14604 char $ac_func();
14605 char (*f)();
14606
14607 int main() {
14608
14609 /* The GNU C library defines this for functions which it implements
14610     to always fail with ENOSYS.  Some functions are actually named
14611     something starting with __ and the normal name is an alias.  */
14612 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14613 choke me
14614 #else
14615 f = $ac_func;
14616 #endif
14617
14618 ; return 0; }
14619 EOF
14620 if { (eval echo configure:14621: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14621   rm -rf conftest*
14622   eval "ac_cv_func_$ac_func=yes"
14623 else
14624   echo "configure: failed program was:" >&5
14625   cat conftest.$ac_ext >&5
14626   rm -rf conftest*
14627   eval "ac_cv_func_$ac_func=no"
14628 fi
14629 rm -f conftest*
14630 fi
14631
14632 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
14633   echo "$ac_t""yes" 1>&6
14634     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
14635   cat >> confdefs.h <<EOF
14636 #define $ac_tr_func 1
14637 EOF
14638  
14639 else
14640   echo "$ac_t""no" 1>&6
14641 fi
14642 done
14643
14644         echo $ac_n "checking for LinuxThreads implementation""... $ac_c" 1>&6
14645 echo "configure:14646: checking for LinuxThreads implementation" >&5
14646 if eval "test \"\${ol_cv_sys_linux_threads+set}\" = set"; then
14647   echo $ac_n "(cached) $ac_c" 1>&6
14648 else
14649   ol_cv_sys_linux_threads=$ac_cv_func_pthread_kill_other_threads_np
14650 fi
14651
14652 echo "$ac_t""$ol_cv_sys_linux_threads" 1>&6
14653
14654                         
14655         
14656         
14657         echo $ac_n "checking for LinuxThreads consistency""... $ac_c" 1>&6
14658 echo "configure:14659: checking for LinuxThreads consistency" >&5
14659 if eval "test \"\${ol_cv_linux_threads+set}\" = set"; then
14660   echo $ac_n "(cached) $ac_c" 1>&6
14661 else
14662   
14663                 if test $ol_cv_header_linux_threads = yes -a \
14664                         $ol_cv_sys_linux_threads = yes; then
14665                         ol_cv_linux_threads=yes
14666                 elif test $ol_cv_header_linux_threads = no -a \
14667                         $ol_cv_sys_linux_threads = no; then
14668                         ol_cv_linux_threads=no
14669                 else
14670                         ol_cv_linux_threads=error
14671                 fi
14672         
14673 fi
14674
14675 echo "$ac_t""$ol_cv_linux_threads" 1>&6
14676
14677
14678                         if test $ol_cv_linux_threads = error; then
14679                                 { echo "configure: error: LinuxThreads header/library mismatch" 1>&2; exit 1; };
14680                         fi
14681
14682                         echo $ac_n "checking if pthread_create() works""... $ac_c" 1>&6
14683 echo "configure:14684: checking if pthread_create() works" >&5
14684 if eval "test \"\${ol_cv_pthread_create_works+set}\" = set"; then
14685   echo $ac_n "(cached) $ac_c" 1>&6
14686 else
14687   
14688                         if test "$cross_compiling" = yes; then
14689                                 ol_cv_pthread_create_works=yes
14690 else
14691   cat > conftest.$ac_ext <<EOF
14692 #line 14693 "configure"
14693 #include "confdefs.h"
14694 /* pthread test headers */
14695 #include <pthread.h>
14696 #if HAVE_PTHREADS < 7
14697 #include <errno.h>
14698 #endif
14699 #ifndef NULL
14700 #define NULL (void*)0
14701 #endif
14702
14703 static void *task(p)
14704         void *p;
14705 {
14706         return (void *) (p == NULL);
14707 }
14708
14709
14710 int main(argc, argv)
14711         int argc;
14712         char **argv;
14713 {
14714
14715         /* pthread test function */
14716 #ifndef PTHREAD_CREATE_DETACHED
14717 #define PTHREAD_CREATE_DETACHED 1
14718 #endif
14719         pthread_t t;
14720         int status;
14721         int detach = PTHREAD_CREATE_DETACHED;
14722
14723 #if HAVE_PTHREADS > 4
14724         /* Final pthreads */
14725         pthread_attr_t attr;
14726
14727         status = pthread_attr_init(&attr);
14728         if( status ) return status;
14729
14730 #if HAVE_PTHREADS < 7
14731         status = pthread_attr_setdetachstate(&attr, &detach);
14732         if( status < 0 ) status = errno;
14733 #else
14734         status = pthread_attr_setdetachstate(&attr, detach);
14735 #endif
14736         if( status ) return status;
14737         status = pthread_create( &t, &attr, task, NULL );
14738 #if HAVE_PTHREADS < 7
14739         if( status < 0 ) status = errno;
14740 #endif
14741         if( status ) return status;
14742 #else
14743         /* Draft 4 pthreads */
14744         status = pthread_create( &t, pthread_attr_default, task, NULL );
14745         if( status ) return errno;
14746
14747         /* give thread a chance to complete */
14748         /* it should remain joinable and hence detachable */
14749         sleep( 1 );
14750
14751         status = pthread_detach( &t );
14752         if( status ) return errno;
14753 #endif
14754
14755 #ifdef HAVE_LINUX_THREADS
14756         pthread_kill_other_threads_np();
14757 #endif
14758
14759         return 0;
14760
14761 }
14762
14763 EOF
14764 if { (eval echo configure:14765: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14765 then
14766   ol_cv_pthread_create_works=yes
14767 else
14768   echo "configure: failed program was:" >&5
14769   cat conftest.$ac_ext >&5
14770   rm -fr conftest*
14771   ol_cv_pthread_create_works=no
14772 fi
14773 rm -fr conftest*
14774 fi
14775
14776 fi
14777
14778 echo "$ac_t""$ol_cv_pthread_create_works" 1>&6
14779
14780                         if test $ol_cv_pthread_create_works = no ; then
14781                                 { echo "configure: error: pthread_create is not usable, check environment settings" 1>&2; exit 1; }
14782                         fi
14783
14784                                                 if test $ol_with_yielding_select = auto ; then
14785                                 echo $ac_n "checking if select yields when using pthreads""... $ac_c" 1>&6
14786 echo "configure:14787: checking if select yields when using pthreads" >&5
14787 if eval "test \"\${ol_cv_pthread_select_yields+set}\" = set"; then
14788   echo $ac_n "(cached) $ac_c" 1>&6
14789 else
14790   
14791                                 if test "$cross_compiling" = yes; then
14792   ol_cv_pthread_select_yields=cross
14793 else
14794   cat > conftest.$ac_ext <<EOF
14795 #line 14796 "configure"
14796 #include "confdefs.h"
14797
14798 #include <sys/types.h>
14799 #include <sys/time.h>
14800 #include <unistd.h>
14801 #include <pthread.h>
14802 #ifndef NULL
14803 #define NULL (void*) 0
14804 #endif
14805
14806 static int fildes[2];
14807
14808 static void *task(p)
14809         void *p;
14810 {
14811         int i;
14812         struct timeval tv;
14813
14814         fd_set rfds;
14815
14816         tv.tv_sec=10;
14817         tv.tv_usec=0;
14818
14819         FD_ZERO(&rfds);
14820         FD_SET(fildes[0], &rfds);
14821
14822         /* we're not interested in any fds */
14823         i = select(FD_SETSIZE, &rfds, NULL, NULL, &tv);
14824
14825         if(i < 0) {
14826                 perror("select");
14827                 exit(10);
14828         }
14829
14830         exit(0); /* if we exit here, the select blocked the whole process */
14831 }
14832
14833 int main(argc, argv)
14834         int argc;
14835         char **argv;
14836 {
14837         pthread_t t;
14838
14839         /* create a pipe to select */
14840         if(pipe(&fildes[0])) {
14841                 perror("select");
14842                 exit(1);
14843         }
14844
14845 #ifdef HAVE_PTHREAD_SETCONCURRENCY
14846         (void) pthread_setconcurrency(2);
14847 #else
14848 #ifdef HAVE_THR_SETCONCURRENCY
14849         /* Set Solaris LWP concurrency to 2 */
14850         thr_setconcurrency(2);
14851 #endif
14852 #endif
14853
14854 #if HAVE_PTHREADS < 6
14855         pthread_create(&t, pthread_attr_default, task, NULL);
14856 #else
14857         pthread_create(&t, NULL, task, NULL);
14858 #endif
14859
14860         /* make sure task runs first */
14861 #if HAVE_THR_YIELD
14862         thr_yield();
14863 #elif defined( HAVE_SCHED_YIELD )
14864         sched_yield();
14865 #elif defined( HAVE_PTHREAD_YIELD )
14866         pthread_yield();
14867 #endif
14868
14869         exit(2);
14870 }
14871 EOF
14872 if { (eval echo configure:14873: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14873 then
14874   ol_cv_pthread_select_yields=no
14875 else
14876   echo "configure: failed program was:" >&5
14877   cat conftest.$ac_ext >&5
14878   rm -fr conftest*
14879   ol_cv_pthread_select_yields=yes
14880 fi
14881 rm -fr conftest*
14882 fi
14883
14884 fi
14885
14886 echo "$ac_t""$ol_cv_pthread_select_yields" 1>&6
14887
14888                                 if test $ol_cv_pthread_select_yields = cross ; then
14889                                         { echo "configure: error: crossing compiling: use --with-yielding_select=yes|no|manual" 1>&2; exit 1; }
14890                                 fi
14891
14892                                 if test $ol_cv_pthread_select_yields = yes ; then
14893                                         ol_with_yielding_select=yes
14894                                 fi
14895                         fi
14896
14897                                                 CPPFLAGS="$save_CPPFLAGS"
14898                         LIBS="$save_LIBS"
14899                 else
14900                         { echo "configure: error: could not locate usable POSIX Threads" 1>&2; exit 1; }
14901                 fi
14902         fi
14903
14904         if test $ol_with_threads = posix ; then
14905                 { echo "configure: error: could not locate POSIX Threads" 1>&2; exit 1; }
14906         fi
14907 fi
14908
14909 if test $ol_with_threads = auto -o $ol_with_threads = yes \
14910         -o $ol_with_threads = mach ; then
14911
14912                 for ac_hdr in mach/cthreads.h cthreads.h
14913 do
14914 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
14915 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
14916 echo "configure:14917: checking for $ac_hdr" >&5
14917 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
14918   echo $ac_n "(cached) $ac_c" 1>&6
14919 else
14920   cat > conftest.$ac_ext <<EOF
14921 #line 14922 "configure"
14922 #include "confdefs.h"
14923 #include <$ac_hdr>
14924 EOF
14925 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
14926 { (eval echo configure:14927: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
14927 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
14928 if test -z "$ac_err"; then
14929   rm -rf conftest*
14930   eval "ac_cv_header_$ac_safe=yes"
14931 else
14932   echo "$ac_err" >&5
14933   echo "configure: failed program was:" >&5
14934   cat conftest.$ac_ext >&5
14935   rm -rf conftest*
14936   eval "ac_cv_header_$ac_safe=no"
14937 fi
14938 rm -f conftest*
14939 fi
14940 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
14941   echo "$ac_t""yes" 1>&6
14942     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
14943   cat >> confdefs.h <<EOF
14944 #define $ac_tr_hdr 1
14945 EOF
14946  
14947 else
14948   echo "$ac_t""no" 1>&6
14949 fi
14950 done
14951
14952         if test $ac_cv_header_mach_cthreads_h = yes ; then
14953                 ol_with_threads=found
14954
14955                                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
14956 echo "configure:14957: checking for cthread_fork" >&5
14957 if eval "test \"\${ac_cv_func_cthread_fork+set}\" = set"; then
14958   echo $ac_n "(cached) $ac_c" 1>&6
14959 else
14960   cat > conftest.$ac_ext <<EOF
14961 #line 14962 "configure"
14962 #include "confdefs.h"
14963 /* System header to define __stub macros and hopefully few prototypes,
14964     which can conflict with char cthread_fork(); below.  */
14965 #include <assert.h>
14966 /* Override any gcc2 internal prototype to avoid an error.  */
14967 /* We use char because int might match the return type of a gcc2
14968     builtin and then its argument prototype would still apply.  */
14969 char cthread_fork();
14970 char (*f)();
14971
14972 int main() {
14973
14974 /* The GNU C library defines this for functions which it implements
14975     to always fail with ENOSYS.  Some functions are actually named
14976     something starting with __ and the normal name is an alias.  */
14977 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
14978 choke me
14979 #else
14980 f = cthread_fork;
14981 #endif
14982
14983 ; return 0; }
14984 EOF
14985 if { (eval echo configure:14986: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14986   rm -rf conftest*
14987   eval "ac_cv_func_cthread_fork=yes"
14988 else
14989   echo "configure: failed program was:" >&5
14990   cat conftest.$ac_ext >&5
14991   rm -rf conftest*
14992   eval "ac_cv_func_cthread_fork=no"
14993 fi
14994 rm -f conftest*
14995 fi
14996
14997 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
14998   echo "$ac_t""yes" 1>&6
14999   ol_link_threads=yes
15000 else
15001   echo "$ac_t""no" 1>&6
15002 fi
15003
15004
15005                 if test $ol_link_threads = no ; then
15006                                                                         echo $ac_n "checking for cthread_fork with -all_load""... $ac_c" 1>&6
15007 echo "configure:15008: checking for cthread_fork with -all_load" >&5
15008 if eval "test \"\${ol_cv_cthread_all_load+set}\" = set"; then
15009   echo $ac_n "(cached) $ac_c" 1>&6
15010 else
15011   
15012                                                                 save_LIBS="$LIBS"
15013                                 LIBS="-all_load $LIBS"
15014                                 cat > conftest.$ac_ext <<EOF
15015 #line 15016 "configure"
15016 #include "confdefs.h"
15017 #include <mach/cthreads.h>
15018 int main() {
15019
15020                                         cthread_fork((void *)0, (void *)0);
15021                                         
15022 ; return 0; }
15023 EOF
15024 if { (eval echo configure:15025: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15025   rm -rf conftest*
15026   ol_cv_cthread_all_load=yes
15027 else
15028   echo "configure: failed program was:" >&5
15029   cat conftest.$ac_ext >&5
15030   rm -rf conftest*
15031   ol_cv_cthread_all_load=no
15032 fi
15033 rm -f conftest*
15034                                                                 LIBS="$save_LIBS"
15035                         
15036 fi
15037
15038 echo "$ac_t""$ol_cv_cthread_all_load" 1>&6
15039
15040                         if test $ol_cv_cthread_all_load = yes ; then
15041                                 LTHREAD_LIBS="$LTHREAD_LIBS -all_load"
15042                                 ol_link_threads=mach
15043                                 ol_with_threads=found
15044                         fi
15045                 fi
15046
15047         elif test $ac_cv_header_cthreads_h = yes ; then
15048                                 
15049                 ol_with_threads=found
15050  
15051                                 save_LIBS="$LIBS"
15052                 LIBS="$LIBS -lthreads"
15053                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
15054 echo "configure:15055: checking for cthread_fork" >&5
15055 if eval "test \"\${ac_cv_func_cthread_fork+set}\" = set"; then
15056   echo $ac_n "(cached) $ac_c" 1>&6
15057 else
15058   cat > conftest.$ac_ext <<EOF
15059 #line 15060 "configure"
15060 #include "confdefs.h"
15061 /* System header to define __stub macros and hopefully few prototypes,
15062     which can conflict with char cthread_fork(); below.  */
15063 #include <assert.h>
15064 /* Override any gcc2 internal prototype to avoid an error.  */
15065 /* We use char because int might match the return type of a gcc2
15066     builtin and then its argument prototype would still apply.  */
15067 char cthread_fork();
15068 char (*f)();
15069
15070 int main() {
15071
15072 /* The GNU C library defines this for functions which it implements
15073     to always fail with ENOSYS.  Some functions are actually named
15074     something starting with __ and the normal name is an alias.  */
15075 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
15076 choke me
15077 #else
15078 f = cthread_fork;
15079 #endif
15080
15081 ; return 0; }
15082 EOF
15083 if { (eval echo configure:15084: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15084   rm -rf conftest*
15085   eval "ac_cv_func_cthread_fork=yes"
15086 else
15087   echo "configure: failed program was:" >&5
15088   cat conftest.$ac_ext >&5
15089   rm -rf conftest*
15090   eval "ac_cv_func_cthread_fork=no"
15091 fi
15092 rm -f conftest*
15093 fi
15094
15095 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
15096   echo "$ac_t""yes" 1>&6
15097   ol_link_threads=yes
15098 else
15099   echo "$ac_t""no" 1>&6
15100 fi
15101
15102                 LIBS="$save_LIBS"
15103
15104                 if test $ol_link_threads = yes ; then
15105                         LTHREAD_LIBS="-lthreads"
15106                         ol_link_threads=mach
15107                         ol_with_threads=found
15108                 else
15109                         { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
15110                 fi
15111
15112         elif test $ol_with_threads = mach ; then
15113                 { echo "configure: error: could not locate Mach CThreads" 1>&2; exit 1; }
15114         fi
15115
15116         if test $ol_link_threads = mach ; then
15117                 cat >> confdefs.h <<\EOF
15118 #define HAVE_MACH_CTHREADS 1
15119 EOF
15120
15121         elif test $ol_with_threads = found ; then
15122                 { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
15123         fi
15124 fi
15125
15126 if test $ol_with_threads = auto -o $ol_with_threads = yes \
15127         -o $ol_with_threads = pth ; then
15128
15129         for ac_hdr in pth.h
15130 do
15131 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15132 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15133 echo "configure:15134: checking for $ac_hdr" >&5
15134 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15135   echo $ac_n "(cached) $ac_c" 1>&6
15136 else
15137   cat > conftest.$ac_ext <<EOF
15138 #line 15139 "configure"
15139 #include "confdefs.h"
15140 #include <$ac_hdr>
15141 EOF
15142 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15143 { (eval echo configure:15144: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15144 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15145 if test -z "$ac_err"; then
15146   rm -rf conftest*
15147   eval "ac_cv_header_$ac_safe=yes"
15148 else
15149   echo "$ac_err" >&5
15150   echo "configure: failed program was:" >&5
15151   cat conftest.$ac_ext >&5
15152   rm -rf conftest*
15153   eval "ac_cv_header_$ac_safe=no"
15154 fi
15155 rm -f conftest*
15156 fi
15157 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15158   echo "$ac_t""yes" 1>&6
15159     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15160   cat >> confdefs.h <<EOF
15161 #define $ac_tr_hdr 1
15162 EOF
15163  
15164 else
15165   echo "$ac_t""no" 1>&6
15166 fi
15167 done
15168
15169
15170         if test $ac_cv_header_pth_h = yes ; then
15171                 echo $ac_n "checking for pth_version in -lpth""... $ac_c" 1>&6
15172 echo "configure:15173: checking for pth_version in -lpth" >&5
15173 ac_lib_var=`echo pth'_'pth_version | sed 'y%./+-:%__p__%'`
15174 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
15175   echo $ac_n "(cached) $ac_c" 1>&6
15176 else
15177   ac_save_LIBS="$LIBS"
15178 LIBS="-lpth  $LIBS"
15179 cat > conftest.$ac_ext <<EOF
15180 #line 15181 "configure"
15181 #include "confdefs.h"
15182 /* Override any gcc2 internal prototype to avoid an error.  */
15183 /* We use char because int might match the return type of a gcc2
15184     builtin and then its argument prototype would still apply.  */
15185 char pth_version();
15186
15187 int main() {
15188 pth_version()
15189 ; return 0; }
15190 EOF
15191 if { (eval echo configure:15192: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15192   rm -rf conftest*
15193   eval "ac_cv_lib_$ac_lib_var=yes"
15194 else
15195   echo "configure: failed program was:" >&5
15196   cat conftest.$ac_ext >&5
15197   rm -rf conftest*
15198   eval "ac_cv_lib_$ac_lib_var=no"
15199 fi
15200 rm -f conftest*
15201 LIBS="$ac_save_LIBS"
15202
15203 fi
15204 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
15205   echo "$ac_t""yes" 1>&6
15206   have_pth=yes
15207 else
15208   echo "$ac_t""no" 1>&6
15209 have_pth=no
15210 fi
15211
15212
15213                 if test $have_pth = yes ; then
15214                         cat >> confdefs.h <<\EOF
15215 #define HAVE_GNU_PTH 1
15216 EOF
15217
15218                         LTHREAD_LIBS="$LTHREAD_LIBS -lpth"
15219                         ol_link_threads=pth
15220                         ol_with_threads=found
15221
15222                         if test $ol_with_yielding_select = auto ; then
15223                                 ol_with_yielding_select=yes
15224                         fi
15225                 fi
15226         fi
15227 fi
15228
15229 if test $ol_with_threads = auto -o $ol_with_threads = yes \
15230         -o $ol_with_threads = lwp ; then
15231
15232                 for ac_hdr in thread.h synch.h
15233 do
15234 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15235 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15236 echo "configure:15237: checking for $ac_hdr" >&5
15237 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15238   echo $ac_n "(cached) $ac_c" 1>&6
15239 else
15240   cat > conftest.$ac_ext <<EOF
15241 #line 15242 "configure"
15242 #include "confdefs.h"
15243 #include <$ac_hdr>
15244 EOF
15245 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15246 { (eval echo configure:15247: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15247 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15248 if test -z "$ac_err"; then
15249   rm -rf conftest*
15250   eval "ac_cv_header_$ac_safe=yes"
15251 else
15252   echo "$ac_err" >&5
15253   echo "configure: failed program was:" >&5
15254   cat conftest.$ac_ext >&5
15255   rm -rf conftest*
15256   eval "ac_cv_header_$ac_safe=no"
15257 fi
15258 rm -f conftest*
15259 fi
15260 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15261   echo "$ac_t""yes" 1>&6
15262     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15263   cat >> confdefs.h <<EOF
15264 #define $ac_tr_hdr 1
15265 EOF
15266  
15267 else
15268   echo "$ac_t""no" 1>&6
15269 fi
15270 done
15271
15272         if test $ac_cv_header_thread_h = yes -a $ac_cv_header_synch_h = yes ; then
15273                 echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6
15274 echo "configure:15275: checking for thr_create in -lthread" >&5
15275 ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-:%__p__%'`
15276 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
15277   echo $ac_n "(cached) $ac_c" 1>&6
15278 else
15279   ac_save_LIBS="$LIBS"
15280 LIBS="-lthread  $LIBS"
15281 cat > conftest.$ac_ext <<EOF
15282 #line 15283 "configure"
15283 #include "confdefs.h"
15284 /* Override any gcc2 internal prototype to avoid an error.  */
15285 /* We use char because int might match the return type of a gcc2
15286     builtin and then its argument prototype would still apply.  */
15287 char thr_create();
15288
15289 int main() {
15290 thr_create()
15291 ; return 0; }
15292 EOF
15293 if { (eval echo configure:15294: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15294   rm -rf conftest*
15295   eval "ac_cv_lib_$ac_lib_var=yes"
15296 else
15297   echo "configure: failed program was:" >&5
15298   cat conftest.$ac_ext >&5
15299   rm -rf conftest*
15300   eval "ac_cv_lib_$ac_lib_var=no"
15301 fi
15302 rm -f conftest*
15303 LIBS="$ac_save_LIBS"
15304
15305 fi
15306 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
15307   echo "$ac_t""yes" 1>&6
15308   have_thr=yes
15309 else
15310   echo "$ac_t""no" 1>&6
15311 have_thr=no
15312 fi
15313
15314
15315                 if test $have_thr = yes ; then
15316                         cat >> confdefs.h <<\EOF
15317 #define HAVE_THR 1
15318 EOF
15319
15320                         LTHREAD_LIBS="$LTHREAD_LIBS -lthread"
15321                         ol_link_threads=thr
15322
15323                         if test $ol_with_yielding_select = auto ; then
15324                                 ol_with_yielding_select=yes
15325                         fi
15326
15327                                                 for ac_func in \
15328                                 thr_setconcurrency \
15329                                 thr_getconcurrency \
15330                         
15331 do
15332 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15333 echo "configure:15334: checking for $ac_func" >&5
15334 if eval "test \"\${ac_cv_func_$ac_func+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 /* System header to define __stub macros and hopefully few prototypes,
15341     which can conflict with char $ac_func(); below.  */
15342 #include <assert.h>
15343 /* Override any gcc2 internal prototype to avoid an error.  */
15344 /* We use char because int might match the return type of a gcc2
15345     builtin and then its argument prototype would still apply.  */
15346 char $ac_func();
15347 char (*f)();
15348
15349 int main() {
15350
15351 /* The GNU C library defines this for functions which it implements
15352     to always fail with ENOSYS.  Some functions are actually named
15353     something starting with __ and the normal name is an alias.  */
15354 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15355 choke me
15356 #else
15357 f = $ac_func;
15358 #endif
15359
15360 ; return 0; }
15361 EOF
15362 if { (eval echo configure:15363: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15363   rm -rf conftest*
15364   eval "ac_cv_func_$ac_func=yes"
15365 else
15366   echo "configure: failed program was:" >&5
15367   cat conftest.$ac_ext >&5
15368   rm -rf conftest*
15369   eval "ac_cv_func_$ac_func=no"
15370 fi
15371 rm -f conftest*
15372 fi
15373
15374 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15375   echo "$ac_t""yes" 1>&6
15376     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15377   cat >> confdefs.h <<EOF
15378 #define $ac_tr_func 1
15379 EOF
15380  
15381 else
15382   echo "$ac_t""no" 1>&6
15383 fi
15384 done
15385
15386                 fi
15387         fi
15388
15389                 for ac_hdr in lwp/lwp.h
15390 do
15391 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15392 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15393 echo "configure:15394: checking for $ac_hdr" >&5
15394 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15395   echo $ac_n "(cached) $ac_c" 1>&6
15396 else
15397   cat > conftest.$ac_ext <<EOF
15398 #line 15399 "configure"
15399 #include "confdefs.h"
15400 #include <$ac_hdr>
15401 EOF
15402 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15403 { (eval echo configure:15404: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15404 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15405 if test -z "$ac_err"; then
15406   rm -rf conftest*
15407   eval "ac_cv_header_$ac_safe=yes"
15408 else
15409   echo "$ac_err" >&5
15410   echo "configure: failed program was:" >&5
15411   cat conftest.$ac_ext >&5
15412   rm -rf conftest*
15413   eval "ac_cv_header_$ac_safe=no"
15414 fi
15415 rm -f conftest*
15416 fi
15417 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15418   echo "$ac_t""yes" 1>&6
15419     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15420   cat >> confdefs.h <<EOF
15421 #define $ac_tr_hdr 1
15422 EOF
15423  
15424 else
15425   echo "$ac_t""no" 1>&6
15426 fi
15427 done
15428
15429         if test $ac_cv_header_lwp_lwp_h = yes ; then
15430                 echo $ac_n "checking for lwp_create in -llwp""... $ac_c" 1>&6
15431 echo "configure:15432: checking for lwp_create in -llwp" >&5
15432 ac_lib_var=`echo lwp'_'lwp_create | sed 'y%./+-:%__p__%'`
15433 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
15434   echo $ac_n "(cached) $ac_c" 1>&6
15435 else
15436   ac_save_LIBS="$LIBS"
15437 LIBS="-llwp  $LIBS"
15438 cat > conftest.$ac_ext <<EOF
15439 #line 15440 "configure"
15440 #include "confdefs.h"
15441 /* Override any gcc2 internal prototype to avoid an error.  */
15442 /* We use char because int might match the return type of a gcc2
15443     builtin and then its argument prototype would still apply.  */
15444 char lwp_create();
15445
15446 int main() {
15447 lwp_create()
15448 ; return 0; }
15449 EOF
15450 if { (eval echo configure:15451: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15451   rm -rf conftest*
15452   eval "ac_cv_lib_$ac_lib_var=yes"
15453 else
15454   echo "configure: failed program was:" >&5
15455   cat conftest.$ac_ext >&5
15456   rm -rf conftest*
15457   eval "ac_cv_lib_$ac_lib_var=no"
15458 fi
15459 rm -f conftest*
15460 LIBS="$ac_save_LIBS"
15461
15462 fi
15463 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
15464   echo "$ac_t""yes" 1>&6
15465   have_lwp=yes
15466 else
15467   echo "$ac_t""no" 1>&6
15468 have_lwp=no
15469 fi
15470
15471
15472                 if test $have_lwp = yes ; then
15473                         cat >> confdefs.h <<\EOF
15474 #define HAVE_LWP 1
15475 EOF
15476
15477                         LTHREAD_LIBS="$LTHREAD_LIBS -llwp"
15478                         ol_link_threads=lwp
15479
15480                         if test $ol_with_yielding_select = auto ; then
15481                                 ol_with_yielding_select=no
15482                         fi
15483                 fi
15484         fi
15485 fi
15486
15487 if test $ol_with_yielding_select = yes ; then
15488         cat >> confdefs.h <<\EOF
15489 #define HAVE_YIELDING_SELECT 1
15490 EOF
15491
15492 fi
15493
15494 if test $ol_with_threads = manual ; then
15495                 ol_link_threads=yes
15496
15497         echo "configure: warning: thread defines and link options must be set manually" 1>&2
15498
15499         for ac_hdr in pthread.h sched.h
15500 do
15501 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15502 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15503 echo "configure:15504: checking for $ac_hdr" >&5
15504 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15505   echo $ac_n "(cached) $ac_c" 1>&6
15506 else
15507   cat > conftest.$ac_ext <<EOF
15508 #line 15509 "configure"
15509 #include "confdefs.h"
15510 #include <$ac_hdr>
15511 EOF
15512 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15513 { (eval echo configure:15514: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15514 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15515 if test -z "$ac_err"; then
15516   rm -rf conftest*
15517   eval "ac_cv_header_$ac_safe=yes"
15518 else
15519   echo "$ac_err" >&5
15520   echo "configure: failed program was:" >&5
15521   cat conftest.$ac_ext >&5
15522   rm -rf conftest*
15523   eval "ac_cv_header_$ac_safe=no"
15524 fi
15525 rm -f conftest*
15526 fi
15527 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15528   echo "$ac_t""yes" 1>&6
15529     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15530   cat >> confdefs.h <<EOF
15531 #define $ac_tr_hdr 1
15532 EOF
15533  
15534 else
15535   echo "$ac_t""no" 1>&6
15536 fi
15537 done
15538
15539         for ac_func in sched_yield pthread_yield
15540 do
15541 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15542 echo "configure:15543: checking for $ac_func" >&5
15543 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15544   echo $ac_n "(cached) $ac_c" 1>&6
15545 else
15546   cat > conftest.$ac_ext <<EOF
15547 #line 15548 "configure"
15548 #include "confdefs.h"
15549 /* System header to define __stub macros and hopefully few prototypes,
15550     which can conflict with char $ac_func(); below.  */
15551 #include <assert.h>
15552 /* Override any gcc2 internal prototype to avoid an error.  */
15553 /* We use char because int might match the return type of a gcc2
15554     builtin and then its argument prototype would still apply.  */
15555 char $ac_func();
15556 char (*f)();
15557
15558 int main() {
15559
15560 /* The GNU C library defines this for functions which it implements
15561     to always fail with ENOSYS.  Some functions are actually named
15562     something starting with __ and the normal name is an alias.  */
15563 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15564 choke me
15565 #else
15566 f = $ac_func;
15567 #endif
15568
15569 ; return 0; }
15570 EOF
15571 if { (eval echo configure:15572: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15572   rm -rf conftest*
15573   eval "ac_cv_func_$ac_func=yes"
15574 else
15575   echo "configure: failed program was:" >&5
15576   cat conftest.$ac_ext >&5
15577   rm -rf conftest*
15578   eval "ac_cv_func_$ac_func=no"
15579 fi
15580 rm -f conftest*
15581 fi
15582
15583 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15584   echo "$ac_t""yes" 1>&6
15585     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15586   cat >> confdefs.h <<EOF
15587 #define $ac_tr_func 1
15588 EOF
15589  
15590 else
15591   echo "$ac_t""no" 1>&6
15592 fi
15593 done
15594
15595         
15596         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
15597 echo "configure:15598: checking for LinuxThreads pthread.h" >&5
15598 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
15599   echo $ac_n "(cached) $ac_c" 1>&6
15600 else
15601   cat > conftest.$ac_ext <<EOF
15602 #line 15603 "configure"
15603 #include "confdefs.h"
15604 #include <pthread.h>
15605 EOF
15606 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15607   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
15608   rm -rf conftest*
15609   ol_cv_header_linux_threads=yes
15610 else
15611   rm -rf conftest*
15612   ol_cv_header_linux_threads=no
15613 fi
15614 rm -f conftest*
15615
15616                 
15617 fi
15618
15619 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
15620         if test $ol_cv_header_linux_threads = yes; then
15621                 cat >> confdefs.h <<\EOF
15622 #define HAVE_LINUX_THREADS 1
15623 EOF
15624
15625         fi
15626
15627
15628         for ac_hdr in mach/cthreads.h
15629 do
15630 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15631 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15632 echo "configure:15633: checking for $ac_hdr" >&5
15633 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15634   echo $ac_n "(cached) $ac_c" 1>&6
15635 else
15636   cat > conftest.$ac_ext <<EOF
15637 #line 15638 "configure"
15638 #include "confdefs.h"
15639 #include <$ac_hdr>
15640 EOF
15641 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15642 { (eval echo configure:15643: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15643 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15644 if test -z "$ac_err"; then
15645   rm -rf conftest*
15646   eval "ac_cv_header_$ac_safe=yes"
15647 else
15648   echo "$ac_err" >&5
15649   echo "configure: failed program was:" >&5
15650   cat conftest.$ac_ext >&5
15651   rm -rf conftest*
15652   eval "ac_cv_header_$ac_safe=no"
15653 fi
15654 rm -f conftest*
15655 fi
15656 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15657   echo "$ac_t""yes" 1>&6
15658     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15659   cat >> confdefs.h <<EOF
15660 #define $ac_tr_hdr 1
15661 EOF
15662  
15663 else
15664   echo "$ac_t""no" 1>&6
15665 fi
15666 done
15667
15668         for ac_hdr in lwp/lwp.h
15669 do
15670 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15671 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15672 echo "configure:15673: checking for $ac_hdr" >&5
15673 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15674   echo $ac_n "(cached) $ac_c" 1>&6
15675 else
15676   cat > conftest.$ac_ext <<EOF
15677 #line 15678 "configure"
15678 #include "confdefs.h"
15679 #include <$ac_hdr>
15680 EOF
15681 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15682 { (eval echo configure:15683: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15683 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15684 if test -z "$ac_err"; then
15685   rm -rf conftest*
15686   eval "ac_cv_header_$ac_safe=yes"
15687 else
15688   echo "$ac_err" >&5
15689   echo "configure: failed program was:" >&5
15690   cat conftest.$ac_ext >&5
15691   rm -rf conftest*
15692   eval "ac_cv_header_$ac_safe=no"
15693 fi
15694 rm -f conftest*
15695 fi
15696 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15697   echo "$ac_t""yes" 1>&6
15698     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15699   cat >> confdefs.h <<EOF
15700 #define $ac_tr_hdr 1
15701 EOF
15702  
15703 else
15704   echo "$ac_t""no" 1>&6
15705 fi
15706 done
15707
15708         for ac_hdr in thread.h synch.h
15709 do
15710 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15711 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15712 echo "configure:15713: checking for $ac_hdr" >&5
15713 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15714   echo $ac_n "(cached) $ac_c" 1>&6
15715 else
15716   cat > conftest.$ac_ext <<EOF
15717 #line 15718 "configure"
15718 #include "confdefs.h"
15719 #include <$ac_hdr>
15720 EOF
15721 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15722 { (eval echo configure:15723: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15723 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15724 if test -z "$ac_err"; then
15725   rm -rf conftest*
15726   eval "ac_cv_header_$ac_safe=yes"
15727 else
15728   echo "$ac_err" >&5
15729   echo "configure: failed program was:" >&5
15730   cat conftest.$ac_ext >&5
15731   rm -rf conftest*
15732   eval "ac_cv_header_$ac_safe=no"
15733 fi
15734 rm -f conftest*
15735 fi
15736 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15737   echo "$ac_t""yes" 1>&6
15738     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15739   cat >> confdefs.h <<EOF
15740 #define $ac_tr_hdr 1
15741 EOF
15742  
15743 else
15744   echo "$ac_t""no" 1>&6
15745 fi
15746 done
15747
15748 fi
15749
15750 if test $ol_link_threads != no -a $ol_link_threads != nt ; then  
15751                         cat >> confdefs.h <<\EOF
15752 #define REENTRANT 1
15753 EOF
15754
15755         cat >> confdefs.h <<\EOF
15756 #define _REENTRANT 1
15757 EOF
15758
15759         cat >> confdefs.h <<\EOF
15760 #define THREAD_SAFE 1
15761 EOF
15762
15763         cat >> confdefs.h <<\EOF
15764 #define _THREAD_SAFE 1
15765 EOF
15766
15767         cat >> confdefs.h <<\EOF
15768 #define THREADSAFE 1
15769 EOF
15770
15771         cat >> confdefs.h <<\EOF
15772 #define _THREADSAFE 1
15773 EOF
15774
15775         cat >> confdefs.h <<\EOF
15776 #define _SGI_MP_SOURCE 1
15777 EOF
15778
15779
15780                         echo $ac_n "checking for thread specific errno""... $ac_c" 1>&6
15781 echo "configure:15782: checking for thread specific errno" >&5
15782 if eval "test \"\${ol_cv_errno_thread_specific+set}\" = set"; then
15783   echo $ac_n "(cached) $ac_c" 1>&6
15784 else
15785   
15786                 cat > conftest.$ac_ext <<EOF
15787 #line 15788 "configure"
15788 #include "confdefs.h"
15789 #include <errno.h>
15790 int main() {
15791 errno = 0;
15792 ; return 0; }
15793 EOF
15794 if { (eval echo configure:15795: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15795   rm -rf conftest*
15796   ol_cv_errno_thread_specific=yes
15797 else
15798   echo "configure: failed program was:" >&5
15799   cat conftest.$ac_ext >&5
15800   rm -rf conftest*
15801   ol_cv_errno_thread_specific=no
15802 fi
15803 rm -f conftest*
15804         
15805 fi
15806
15807 echo "$ac_t""$ol_cv_errno_thread_specific" 1>&6
15808
15809                         echo $ac_n "checking for thread specific h_errno""... $ac_c" 1>&6
15810 echo "configure:15811: checking for thread specific h_errno" >&5
15811 if eval "test \"\${ol_cv_h_errno_thread_specific+set}\" = set"; then
15812   echo $ac_n "(cached) $ac_c" 1>&6
15813 else
15814   
15815                 cat > conftest.$ac_ext <<EOF
15816 #line 15817 "configure"
15817 #include "confdefs.h"
15818 #include <netdb.h>
15819 int main() {
15820 h_errno = 0;
15821 ; return 0; }
15822 EOF
15823 if { (eval echo configure:15824: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15824   rm -rf conftest*
15825   ol_cv_h_errno_thread_specific=yes
15826 else
15827   echo "configure: failed program was:" >&5
15828   cat conftest.$ac_ext >&5
15829   rm -rf conftest*
15830   ol_cv_h_errno_thread_specific=no
15831 fi
15832 rm -f conftest*
15833         
15834 fi
15835
15836 echo "$ac_t""$ol_cv_h_errno_thread_specific" 1>&6
15837
15838         if test $ol_cv_errno_thread_specific != yes \
15839                 -o $ol_cv_h_errno_thread_specific != yes ; then
15840                 LIBS="$LTHREAD_LIBS $LIBS"
15841                 LTHREAD_LIBS=""
15842         fi
15843
15844 fi  
15845
15846 if test $ol_link_threads = no ; then
15847         if test $ol_with_threads = yes ; then
15848                 { echo "configure: error: no suitable thread support" 1>&2; exit 1; }
15849         fi
15850
15851         if test $ol_with_threads = auto ; then
15852                 echo "configure: warning: no suitable thread support, disabling threads" 1>&2
15853                 ol_with_threads=no
15854         fi
15855
15856         cat >> confdefs.h <<\EOF
15857 #define NO_THREADS 1
15858 EOF
15859
15860         LTHREAD_LIBS=""
15861 fi
15862
15863 if test $ol_link_threads != no ; then
15864         cat >> confdefs.h <<\EOF
15865 #define LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE 1
15866 EOF
15867
15868 fi
15869
15870 for ac_func in \
15871         ctime_r                 \
15872         gethostbyname_r gethostbyaddr_r \
15873
15874 do
15875 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15876 echo "configure:15877: checking for $ac_func" >&5
15877 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15878   echo $ac_n "(cached) $ac_c" 1>&6
15879 else
15880   cat > conftest.$ac_ext <<EOF
15881 #line 15882 "configure"
15882 #include "confdefs.h"
15883 /* System header to define __stub macros and hopefully few prototypes,
15884     which can conflict with char $ac_func(); below.  */
15885 #include <assert.h>
15886 /* Override any gcc2 internal prototype to avoid an error.  */
15887 /* We use char because int might match the return type of a gcc2
15888     builtin and then its argument prototype would still apply.  */
15889 char $ac_func();
15890 char (*f)();
15891
15892 int main() {
15893
15894 /* The GNU C library defines this for functions which it implements
15895     to always fail with ENOSYS.  Some functions are actually named
15896     something starting with __ and the normal name is an alias.  */
15897 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15898 choke me
15899 #else
15900 f = $ac_func;
15901 #endif
15902
15903 ; return 0; }
15904 EOF
15905 if { (eval echo configure:15906: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15906   rm -rf conftest*
15907   eval "ac_cv_func_$ac_func=yes"
15908 else
15909   echo "configure: failed program was:" >&5
15910   cat conftest.$ac_ext >&5
15911   rm -rf conftest*
15912   eval "ac_cv_func_$ac_func=no"
15913 fi
15914 rm -f conftest*
15915 fi
15916
15917 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15918   echo "$ac_t""yes" 1>&6
15919     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15920   cat >> confdefs.h <<EOF
15921 #define $ac_tr_func 1
15922 EOF
15923  
15924 else
15925   echo "$ac_t""no" 1>&6
15926 fi
15927 done
15928
15929
15930 if test "$ac_cv_func_ctime_r" = no ; then
15931         ol_cv_func_ctime_r_nargs=0
15932 else
15933         echo $ac_n "checking number of arguments of ctime_r""... $ac_c" 1>&6
15934 echo "configure:15935: checking number of arguments of ctime_r" >&5
15935 if eval "test \"\${ol_cv_func_ctime_r_nargs+set}\" = set"; then
15936   echo $ac_n "(cached) $ac_c" 1>&6
15937 else
15938   cat > conftest.$ac_ext <<EOF
15939 #line 15940 "configure"
15940 #include "confdefs.h"
15941 #include <time.h>
15942 int main() {
15943 time_t ti; char *buffer; ctime_r(&ti,buffer,32);
15944 ; return 0; }
15945 EOF
15946 if { (eval echo configure:15947: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
15947   rm -rf conftest*
15948   ol_cv_func_ctime_r_nargs3=yes
15949 else
15950   echo "configure: failed program was:" >&5
15951   cat conftest.$ac_ext >&5
15952   rm -rf conftest*
15953   ol_cv_func_ctime_r_nargs3=no
15954 fi
15955 rm -f conftest*
15956
15957         cat > conftest.$ac_ext <<EOF
15958 #line 15959 "configure"
15959 #include "confdefs.h"
15960 #include <time.h>
15961 int main() {
15962 time_t ti; char *buffer; ctime_r(&ti,buffer);
15963 ; return 0; }
15964 EOF
15965 if { (eval echo configure:15966: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
15966   rm -rf conftest*
15967   ol_cv_func_ctime_r_nargs2=yes
15968 else
15969   echo "configure: failed program was:" >&5
15970   cat conftest.$ac_ext >&5
15971   rm -rf conftest*
15972   ol_cv_func_ctime_r_nargs2=no
15973 fi
15974 rm -f conftest*
15975
15976         if test $ol_cv_func_ctime_r_nargs3 = yes -a \
15977                 $ol_cv_func_ctime_r_nargs2 = no ; then
15978
15979                 ol_cv_func_ctime_r_nargs=3
15980
15981         elif test $ol_cv_func_ctime_r_nargs3 = no -a \
15982                 $ol_cv_func_ctime_r_nargs2 = yes ; then
15983
15984                 ol_cv_func_ctime_r_nargs=2
15985
15986         else
15987                 ol_cv_func_ctime_r_nargs=0
15988         fi
15989   
15990 fi
15991
15992 echo "$ac_t""$ol_cv_func_ctime_r_nargs" 1>&6
15993
15994   if test $ol_cv_func_ctime_r_nargs -gt 1 ; then
15995         cat >> confdefs.h <<EOF
15996 #define CTIME_R_NARGS $ol_cv_func_ctime_r_nargs
15997 EOF
15998
15999   fi
16000
16001 fi
16002
16003 if test "$ac_cv_func_gethostbyname_r" = yes ; then
16004         echo $ac_n "checking number of arguments of gethostbyname_r""... $ac_c" 1>&6
16005 echo "configure:16006: checking number of arguments of gethostbyname_r" >&5
16006 if eval "test \"\${ol_cv_func_gethostbyname_r_nargs+set}\" = set"; then
16007   echo $ac_n "(cached) $ac_c" 1>&6
16008 else
16009   cat > conftest.$ac_ext <<EOF
16010 #line 16011 "configure"
16011 #include "confdefs.h"
16012 #include <sys/types.h>
16013 #include <sys/socket.h>
16014 #include <netinet/in.h>
16015 #include <netdb.h>
16016 #define BUFSIZE (sizeof(struct hostent)+10)
16017 int main() {
16018 struct hostent hent; char buffer[BUFSIZE];
16019                 int bufsize=BUFSIZE;int h_errno;
16020                 (void)gethostbyname_r("segovia.cs.purdue.edu", &hent,
16021                         buffer, bufsize, &h_errno);
16022 ; return 0; }
16023 EOF
16024 if { (eval echo configure:16025: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16025   rm -rf conftest*
16026   ol_cv_func_gethostbyname_r_nargs5=yes
16027 else
16028   echo "configure: failed program was:" >&5
16029   cat conftest.$ac_ext >&5
16030   rm -rf conftest*
16031   ol_cv_func_gethostbyname_r_nargs5=no
16032 fi
16033 rm -f conftest*
16034
16035         cat > conftest.$ac_ext <<EOF
16036 #line 16037 "configure"
16037 #include "confdefs.h"
16038 #include <sys/types.h>
16039 #include <sys/socket.h>
16040 #include <netinet/in.h>
16041 #include <netdb.h>
16042 #define BUFSIZE (sizeof(struct hostent)+10)
16043 int main() {
16044 struct hostent hent;struct hostent *rhent;
16045                 char buffer[BUFSIZE];
16046                 int bufsize=BUFSIZE;int h_errno;
16047                 (void)gethostbyname_r("localhost", &hent, buffer, bufsize,
16048                         &rhent, &h_errno);
16049 ; return 0; }
16050 EOF
16051 if { (eval echo configure:16052: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16052   rm -rf conftest*
16053   ol_cv_func_gethostbyname_r_nargs6=yes
16054 else
16055   echo "configure: failed program was:" >&5
16056   cat conftest.$ac_ext >&5
16057   rm -rf conftest*
16058   ol_cv_func_gethostbyname_r_nargs6=no
16059 fi
16060 rm -f conftest*
16061
16062         if test $ol_cv_func_gethostbyname_r_nargs5 = yes -a \
16063                 $ol_cv_func_gethostbyname_r_nargs6 = no ; then
16064
16065                 ol_cv_func_gethostbyname_r_nargs=5
16066
16067         elif test $ol_cv_func_gethostbyname_r_nargs5 = no -a \
16068                 $ol_cv_func_gethostbyname_r_nargs6 = yes ; then
16069
16070                 ol_cv_func_gethostbyname_r_nargs=6
16071
16072         else
16073                 ol_cv_func_gethostbyname_r_nargs=0
16074         fi
16075   
16076 fi
16077
16078 echo "$ac_t""$ol_cv_func_gethostbyname_r_nargs" 1>&6
16079   if test $ol_cv_func_gethostbyname_r_nargs -gt 1 ; then
16080         cat >> confdefs.h <<EOF
16081 #define GETHOSTBYNAME_R_NARGS $ol_cv_func_gethostbyname_r_nargs
16082 EOF
16083
16084   fi
16085
16086 else
16087         ol_cv_func_gethostbyname_r_nargs=0
16088 fi
16089  
16090 if test "$ac_cv_func_gethostbyaddr_r" = yes ; then
16091         echo $ac_n "checking number of arguments of gethostbyaddr_r""... $ac_c" 1>&6
16092 echo "configure:16093: checking number of arguments of gethostbyaddr_r" >&5
16093 if eval "test \"\${ol_cv_func_gethostbyaddr_r_nargs+set}\" = set"; then
16094   echo $ac_n "(cached) $ac_c" 1>&6
16095 else
16096   cat > conftest.$ac_ext <<EOF
16097 #line 16098 "configure"
16098 #include "confdefs.h"
16099 #include <sys/types.h>
16100 #include <sys/socket.h>
16101 #include <netinet/in.h>
16102 #include <netdb.h>
16103 #define BUFSIZE (sizeof(struct hostent)+10)
16104 int main() {
16105 struct hostent hent; char buffer[BUFSIZE]; 
16106             struct in_addr add;
16107             size_t alen=sizeof(struct in_addr);
16108             int bufsize=BUFSIZE;int h_errno;
16109                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
16110                         alen, AF_INET, &hent, buffer, bufsize, &h_errno);
16111 ; return 0; }
16112 EOF
16113 if { (eval echo configure:16114: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16114   rm -rf conftest*
16115   ol_cv_func_gethostbyaddr_r_nargs7=yes
16116 else
16117   echo "configure: failed program was:" >&5
16118   cat conftest.$ac_ext >&5
16119   rm -rf conftest*
16120   ol_cv_func_gethostbyaddr_r_nargs7=no
16121 fi
16122 rm -f conftest*
16123
16124         cat > conftest.$ac_ext <<EOF
16125 #line 16126 "configure"
16126 #include "confdefs.h"
16127 #include <sys/types.h>
16128 #include <sys/socket.h>
16129 #include <netinet/in.h>
16130 #include <netdb.h>
16131 #define BUFSIZE (sizeof(struct hostent)+10)
16132 int main() {
16133 struct hostent hent;
16134                 struct hostent *rhent; char buffer[BUFSIZE]; 
16135                 struct in_addr add;
16136                 size_t alen=sizeof(struct in_addr);
16137                 int bufsize=BUFSIZE;int h_errno;
16138                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
16139                         alen, AF_INET, &hent, buffer, bufsize, 
16140                         &rhent, &h_errno);
16141 ; return 0; }
16142 EOF
16143 if { (eval echo configure:16144: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16144   rm -rf conftest*
16145   ol_cv_func_gethostbyaddr_r_nargs8=yes
16146 else
16147   echo "configure: failed program was:" >&5
16148   cat conftest.$ac_ext >&5
16149   rm -rf conftest*
16150   ol_cv_func_gethostbyaddr_r_nargs8=no
16151 fi
16152 rm -f conftest*
16153
16154         if test $ol_cv_func_gethostbyaddr_r_nargs7 = yes -a \
16155                 $ol_cv_func_gethostbyaddr_r_nargs8 = no ; then
16156
16157                 ol_cv_func_gethostbyaddr_r_nargs=7
16158
16159         elif test $ol_cv_func_gethostbyaddr_r_nargs7 = no -a \
16160                 $ol_cv_func_gethostbyaddr_r_nargs8 = yes ; then
16161
16162                 ol_cv_func_gethostbyaddr_r_nargs=8
16163
16164         else
16165                 ol_cv_func_gethostbyaddr_r_nargs=0
16166         fi
16167   
16168 fi
16169
16170 echo "$ac_t""$ol_cv_func_gethostbyaddr_r_nargs" 1>&6
16171   if test $ol_cv_func_gethostbyaddr_r_nargs -gt 1 ; then
16172     cat >> confdefs.h <<EOF
16173 #define GETHOSTBYADDR_R_NARGS $ol_cv_func_gethostbyaddr_r_nargs
16174 EOF
16175
16176   fi
16177
16178 else
16179         ol_cv_func_gethostbyaddr_r_nargs=0
16180 fi
16181
16182 ol_link_ldbm=no 
16183
16184 if test $ol_with_ldbm_api = auto \
16185         -o $ol_with_ldbm_api = berkeley \
16186         -o $ol_with_ldbm_api = bcompat ; then
16187
16188         if test $ol_with_ldbm_api = bcompat; then \
16189                 for ac_hdr in db_185.h db.h
16190 do
16191 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16192 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16193 echo "configure:16194: checking for $ac_hdr" >&5
16194 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16195   echo $ac_n "(cached) $ac_c" 1>&6
16196 else
16197   cat > conftest.$ac_ext <<EOF
16198 #line 16199 "configure"
16199 #include "confdefs.h"
16200 #include <$ac_hdr>
16201 EOF
16202 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16203 { (eval echo configure:16204: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16204 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16205 if test -z "$ac_err"; then
16206   rm -rf conftest*
16207   eval "ac_cv_header_$ac_safe=yes"
16208 else
16209   echo "$ac_err" >&5
16210   echo "configure: failed program was:" >&5
16211   cat conftest.$ac_ext >&5
16212   rm -rf conftest*
16213   eval "ac_cv_header_$ac_safe=no"
16214 fi
16215 rm -f conftest*
16216 fi
16217 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16218   echo "$ac_t""yes" 1>&6
16219     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16220   cat >> confdefs.h <<EOF
16221 #define $ac_tr_hdr 1
16222 EOF
16223  
16224 else
16225   echo "$ac_t""no" 1>&6
16226 fi
16227 done
16228
16229 if test $ac_cv_header_db_185_h = yes -o $ac_cv_header_db_h = yes; then
16230         echo $ac_n "checking if Berkeley DB header compatibility""... $ac_c" 1>&6
16231 echo "configure:16232: checking if Berkeley DB header compatibility" >&5
16232 if eval "test \"\${ol_cv_header_db1+set}\" = set"; then
16233   echo $ac_n "(cached) $ac_c" 1>&6
16234 else
16235   
16236                 cat > conftest.$ac_ext <<EOF
16237 #line 16238 "configure"
16238 #include "confdefs.h"
16239
16240 #if HAVE_DB_185_H
16241 #       include <db_185.h>
16242 #else
16243 #       include <db.h>
16244 #endif
16245
16246  /* this check could be improved */
16247 #ifndef DB_VERSION_MAJOR
16248 #       define DB_VERSION_MAJOR 1
16249 #endif
16250
16251 #if DB_VERSION_MAJOR == 1 
16252         __db_version_1
16253 #endif
16254
16255 EOF
16256 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16257   egrep "__db_version_1" >/dev/null 2>&1; then
16258   rm -rf conftest*
16259   ol_cv_header_db1=yes
16260 else
16261   rm -rf conftest*
16262   ol_cv_header_db1=no
16263 fi
16264 rm -f conftest*
16265
16266 fi
16267
16268 echo "$ac_t""$ol_cv_header_db1" 1>&6
16269
16270         if test $ol_cv_header_db1 = yes ; then
16271                 ol_cv_lib_db=no
16272 if test $ol_cv_lib_db = no ; then
16273         echo $ac_n "checking for Berkeley DB link (default)""... $ac_c" 1>&6
16274 echo "configure:16275: checking for Berkeley DB link (default)" >&5
16275 if eval "test \"\${ol_cv_db_none+set}\" = set"; then
16276   echo $ac_n "(cached) $ac_c" 1>&6
16277 else
16278   
16279         ol_DB_LIB=
16280         ol_LIBS=$LIBS
16281         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
16282
16283         cat > conftest.$ac_ext <<EOF
16284 #line 16285 "configure"
16285 #include "confdefs.h"
16286
16287 #ifdef HAVE_DB_185_H
16288 # include <db_185.h>
16289 #else
16290 # include <db.h>
16291 #endif
16292
16293 #ifndef DB_VERSION_MAJOR
16294 # define DB_VERSION_MAJOR 1
16295 #endif
16296
16297 #ifndef NULL
16298 #define NULL ((void*)0)
16299 #endif
16300
16301 int main() {
16302
16303 #if DB_VERSION_MAJOR > 1
16304         {
16305                 char *version;
16306                 int major, minor, patch;
16307
16308                 version = db_version( &major, &minor, &patch );
16309
16310                 if( major != DB_VERSION_MAJOR ||
16311                         minor < DB_VERSION_MINOR )
16312                 {
16313                         printf("Berkeley DB version mismatch\n"
16314                                 "\theader: %s\n\tlibrary: %s\n",
16315                                 DB_VERSION_STRING, version);
16316                         return 1;
16317                 }
16318         }
16319 #endif
16320
16321 #if DB_VERSION_MAJOR > 2
16322         db_env_create( NULL, 0 );
16323 #elif DB_VERSION_MAJOR > 1
16324         db_appexit( NULL );
16325 #else
16326         (void) dbopen( NULL, 0, 0, 0, NULL);
16327 #endif
16328
16329 ; return 0; }
16330 EOF
16331 if { (eval echo configure:16332: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16332   rm -rf conftest*
16333   ol_cv_db_none=yes
16334 else
16335   echo "configure: failed program was:" >&5
16336   cat conftest.$ac_ext >&5
16337   rm -rf conftest*
16338   ol_cv_db_none=no
16339 fi
16340 rm -f conftest*
16341
16342         LIBS="$ol_LIBS"
16343
16344 fi
16345
16346 echo "$ac_t""$ol_cv_db_none" 1>&6
16347
16348         if test $ol_cv_db_none = yes ; then
16349                 ol_cv_lib_db=yes
16350         fi
16351 fi
16352
16353 if test $ol_cv_lib_db = no ; then
16354         echo $ac_n "checking for Berkeley DB link (-ldb43)""... $ac_c" 1>&6
16355 echo "configure:16356: checking for Berkeley DB link (-ldb43)" >&5
16356 if eval "test \"\${ol_cv_db_db43+set}\" = set"; then
16357   echo $ac_n "(cached) $ac_c" 1>&6
16358 else
16359   
16360         ol_DB_LIB=-ldb43
16361         ol_LIBS=$LIBS
16362         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
16363
16364         cat > conftest.$ac_ext <<EOF
16365 #line 16366 "configure"
16366 #include "confdefs.h"
16367
16368 #ifdef HAVE_DB_185_H
16369 # include <db_185.h>
16370 #else
16371 # include <db.h>
16372 #endif
16373
16374 #ifndef DB_VERSION_MAJOR
16375 # define DB_VERSION_MAJOR 1
16376 #endif
16377
16378 #ifndef NULL
16379 #define NULL ((void*)0)
16380 #endif
16381
16382 int main() {
16383
16384 #if DB_VERSION_MAJOR > 1
16385         {
16386                 char *version;
16387                 int major, minor, patch;
16388
16389                 version = db_version( &major, &minor, &patch );
16390
16391                 if( major != DB_VERSION_MAJOR ||
16392                         minor < DB_VERSION_MINOR )
16393                 {
16394                         printf("Berkeley DB version mismatch\n"
16395                                 "\theader: %s\n\tlibrary: %s\n",
16396                                 DB_VERSION_STRING, version);
16397                         return 1;
16398                 }
16399         }
16400 #endif
16401
16402 #if DB_VERSION_MAJOR > 2
16403         db_env_create( NULL, 0 );
16404 #elif DB_VERSION_MAJOR > 1
16405         db_appexit( NULL );
16406 #else
16407         (void) dbopen( NULL, 0, 0, 0, NULL);
16408 #endif
16409
16410 ; return 0; }
16411 EOF
16412 if { (eval echo configure:16413: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16413   rm -rf conftest*
16414   ol_cv_db_db43=yes
16415 else
16416   echo "configure: failed program was:" >&5
16417   cat conftest.$ac_ext >&5
16418   rm -rf conftest*
16419   ol_cv_db_db43=no
16420 fi
16421 rm -f conftest*
16422
16423         LIBS="$ol_LIBS"
16424
16425 fi
16426
16427 echo "$ac_t""$ol_cv_db_db43" 1>&6
16428
16429         if test $ol_cv_db_db43 = yes ; then
16430                 ol_cv_lib_db=-ldb43
16431         fi
16432 fi
16433
16434 if test $ol_cv_lib_db = no ; then
16435         echo $ac_n "checking for Berkeley DB link (-ldb-43)""... $ac_c" 1>&6
16436 echo "configure:16437: checking for Berkeley DB link (-ldb-43)" >&5
16437 if eval "test \"\${ol_cv_db_db_43+set}\" = set"; then
16438   echo $ac_n "(cached) $ac_c" 1>&6
16439 else
16440   
16441         ol_DB_LIB=-ldb-43
16442         ol_LIBS=$LIBS
16443         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
16444
16445         cat > conftest.$ac_ext <<EOF
16446 #line 16447 "configure"
16447 #include "confdefs.h"
16448
16449 #ifdef HAVE_DB_185_H
16450 # include <db_185.h>
16451 #else
16452 # include <db.h>
16453 #endif
16454
16455 #ifndef DB_VERSION_MAJOR
16456 # define DB_VERSION_MAJOR 1
16457 #endif
16458
16459 #ifndef NULL
16460 #define NULL ((void*)0)
16461 #endif
16462
16463 int main() {
16464
16465 #if DB_VERSION_MAJOR > 1
16466         {
16467                 char *version;
16468                 int major, minor, patch;
16469
16470                 version = db_version( &major, &minor, &patch );
16471
16472                 if( major != DB_VERSION_MAJOR ||
16473                         minor < DB_VERSION_MINOR )
16474                 {
16475                         printf("Berkeley DB version mismatch\n"
16476                                 "\theader: %s\n\tlibrary: %s\n",
16477                                 DB_VERSION_STRING, version);
16478                         return 1;
16479                 }
16480         }
16481 #endif
16482
16483 #if DB_VERSION_MAJOR > 2
16484         db_env_create( NULL, 0 );
16485 #elif DB_VERSION_MAJOR > 1
16486         db_appexit( NULL );
16487 #else
16488         (void) dbopen( NULL, 0, 0, 0, NULL);
16489 #endif
16490
16491 ; return 0; }
16492 EOF
16493 if { (eval echo configure:16494: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16494   rm -rf conftest*
16495   ol_cv_db_db_43=yes
16496 else
16497   echo "configure: failed program was:" >&5
16498   cat conftest.$ac_ext >&5
16499   rm -rf conftest*
16500   ol_cv_db_db_43=no
16501 fi
16502 rm -f conftest*
16503
16504         LIBS="$ol_LIBS"
16505
16506 fi
16507
16508 echo "$ac_t""$ol_cv_db_db_43" 1>&6
16509
16510         if test $ol_cv_db_db_43 = yes ; then
16511                 ol_cv_lib_db=-ldb-43
16512         fi
16513 fi
16514
16515 if test $ol_cv_lib_db = no ; then
16516         echo $ac_n "checking for Berkeley DB link (-ldb-4.3)""... $ac_c" 1>&6
16517 echo "configure:16518: checking for Berkeley DB link (-ldb-4.3)" >&5
16518 if eval "test \"\${ol_cv_db_db_4_dot_3+set}\" = set"; then
16519   echo $ac_n "(cached) $ac_c" 1>&6
16520 else
16521   
16522         ol_DB_LIB=-ldb-4.3
16523         ol_LIBS=$LIBS
16524         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
16525
16526         cat > conftest.$ac_ext <<EOF
16527 #line 16528 "configure"
16528 #include "confdefs.h"
16529
16530 #ifdef HAVE_DB_185_H
16531 # include <db_185.h>
16532 #else
16533 # include <db.h>
16534 #endif
16535
16536 #ifndef DB_VERSION_MAJOR
16537 # define DB_VERSION_MAJOR 1
16538 #endif
16539
16540 #ifndef NULL
16541 #define NULL ((void*)0)
16542 #endif
16543
16544 int main() {
16545
16546 #if DB_VERSION_MAJOR > 1
16547         {
16548                 char *version;
16549                 int major, minor, patch;
16550
16551                 version = db_version( &major, &minor, &patch );
16552
16553                 if( major != DB_VERSION_MAJOR ||
16554                         minor < DB_VERSION_MINOR )
16555                 {
16556                         printf("Berkeley DB version mismatch\n"
16557                                 "\theader: %s\n\tlibrary: %s\n",
16558                                 DB_VERSION_STRING, version);
16559                         return 1;
16560                 }
16561         }
16562 #endif
16563
16564 #if DB_VERSION_MAJOR > 2
16565         db_env_create( NULL, 0 );
16566 #elif DB_VERSION_MAJOR > 1
16567         db_appexit( NULL );
16568 #else
16569         (void) dbopen( NULL, 0, 0, 0, NULL);
16570 #endif
16571
16572 ; return 0; }
16573 EOF
16574 if { (eval echo configure:16575: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16575   rm -rf conftest*
16576   ol_cv_db_db_4_dot_3=yes
16577 else
16578   echo "configure: failed program was:" >&5
16579   cat conftest.$ac_ext >&5
16580   rm -rf conftest*
16581   ol_cv_db_db_4_dot_3=no
16582 fi
16583 rm -f conftest*
16584
16585         LIBS="$ol_LIBS"
16586
16587 fi
16588
16589 echo "$ac_t""$ol_cv_db_db_4_dot_3" 1>&6
16590
16591         if test $ol_cv_db_db_4_dot_3 = yes ; then
16592                 ol_cv_lib_db=-ldb-4.3
16593         fi
16594 fi
16595
16596 if test $ol_cv_lib_db = no ; then
16597         echo $ac_n "checking for Berkeley DB link (-ldb-4-3)""... $ac_c" 1>&6
16598 echo "configure:16599: checking for Berkeley DB link (-ldb-4-3)" >&5
16599 if eval "test \"\${ol_cv_db_db_4_3+set}\" = set"; then
16600   echo $ac_n "(cached) $ac_c" 1>&6
16601 else
16602   
16603         ol_DB_LIB=-ldb-4-3
16604         ol_LIBS=$LIBS
16605         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
16606
16607         cat > conftest.$ac_ext <<EOF
16608 #line 16609 "configure"
16609 #include "confdefs.h"
16610
16611 #ifdef HAVE_DB_185_H
16612 # include <db_185.h>
16613 #else
16614 # include <db.h>
16615 #endif
16616
16617 #ifndef DB_VERSION_MAJOR
16618 # define DB_VERSION_MAJOR 1
16619 #endif
16620
16621 #ifndef NULL
16622 #define NULL ((void*)0)
16623 #endif
16624
16625 int main() {
16626
16627 #if DB_VERSION_MAJOR > 1
16628         {
16629                 char *version;
16630                 int major, minor, patch;
16631
16632                 version = db_version( &major, &minor, &patch );
16633
16634                 if( major != DB_VERSION_MAJOR ||
16635                         minor < DB_VERSION_MINOR )
16636                 {
16637                         printf("Berkeley DB version mismatch\n"
16638                                 "\theader: %s\n\tlibrary: %s\n",
16639                                 DB_VERSION_STRING, version);
16640                         return 1;
16641                 }
16642         }
16643 #endif
16644
16645 #if DB_VERSION_MAJOR > 2
16646         db_env_create( NULL, 0 );
16647 #elif DB_VERSION_MAJOR > 1
16648         db_appexit( NULL );
16649 #else
16650         (void) dbopen( NULL, 0, 0, 0, NULL);
16651 #endif
16652
16653 ; return 0; }
16654 EOF
16655 if { (eval echo configure:16656: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16656   rm -rf conftest*
16657   ol_cv_db_db_4_3=yes
16658 else
16659   echo "configure: failed program was:" >&5
16660   cat conftest.$ac_ext >&5
16661   rm -rf conftest*
16662   ol_cv_db_db_4_3=no
16663 fi
16664 rm -f conftest*
16665
16666         LIBS="$ol_LIBS"
16667
16668 fi
16669
16670 echo "$ac_t""$ol_cv_db_db_4_3" 1>&6
16671
16672         if test $ol_cv_db_db_4_3 = yes ; then
16673                 ol_cv_lib_db=-ldb-4-3
16674         fi
16675 fi
16676
16677 if test $ol_cv_lib_db = no ; then
16678         echo $ac_n "checking for Berkeley DB link (-ldb42)""... $ac_c" 1>&6
16679 echo "configure:16680: checking for Berkeley DB link (-ldb42)" >&5
16680 if eval "test \"\${ol_cv_db_db42+set}\" = set"; then
16681   echo $ac_n "(cached) $ac_c" 1>&6
16682 else
16683   
16684         ol_DB_LIB=-ldb42
16685         ol_LIBS=$LIBS
16686         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
16687
16688         cat > conftest.$ac_ext <<EOF
16689 #line 16690 "configure"
16690 #include "confdefs.h"
16691
16692 #ifdef HAVE_DB_185_H
16693 # include <db_185.h>
16694 #else
16695 # include <db.h>
16696 #endif
16697
16698 #ifndef DB_VERSION_MAJOR
16699 # define DB_VERSION_MAJOR 1
16700 #endif
16701
16702 #ifndef NULL
16703 #define NULL ((void*)0)
16704 #endif
16705
16706 int main() {
16707
16708 #if DB_VERSION_MAJOR > 1
16709         {
16710                 char *version;
16711                 int major, minor, patch;
16712
16713                 version = db_version( &major, &minor, &patch );
16714
16715                 if( major != DB_VERSION_MAJOR ||
16716                         minor < DB_VERSION_MINOR )
16717                 {
16718                         printf("Berkeley DB version mismatch\n"
16719                                 "\theader: %s\n\tlibrary: %s\n",
16720                                 DB_VERSION_STRING, version);
16721                         return 1;
16722                 }
16723         }
16724 #endif
16725
16726 #if DB_VERSION_MAJOR > 2
16727         db_env_create( NULL, 0 );
16728 #elif DB_VERSION_MAJOR > 1
16729         db_appexit( NULL );
16730 #else
16731         (void) dbopen( NULL, 0, 0, 0, NULL);
16732 #endif
16733
16734 ; return 0; }
16735 EOF
16736 if { (eval echo configure:16737: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16737   rm -rf conftest*
16738   ol_cv_db_db42=yes
16739 else
16740   echo "configure: failed program was:" >&5
16741   cat conftest.$ac_ext >&5
16742   rm -rf conftest*
16743   ol_cv_db_db42=no
16744 fi
16745 rm -f conftest*
16746
16747         LIBS="$ol_LIBS"
16748
16749 fi
16750
16751 echo "$ac_t""$ol_cv_db_db42" 1>&6
16752
16753         if test $ol_cv_db_db42 = yes ; then
16754                 ol_cv_lib_db=-ldb42
16755         fi
16756 fi
16757
16758 if test $ol_cv_lib_db = no ; then
16759         echo $ac_n "checking for Berkeley DB link (-ldb-42)""... $ac_c" 1>&6
16760 echo "configure:16761: checking for Berkeley DB link (-ldb-42)" >&5
16761 if eval "test \"\${ol_cv_db_db_42+set}\" = set"; then
16762   echo $ac_n "(cached) $ac_c" 1>&6
16763 else
16764   
16765         ol_DB_LIB=-ldb-42
16766         ol_LIBS=$LIBS
16767         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
16768
16769         cat > conftest.$ac_ext <<EOF
16770 #line 16771 "configure"
16771 #include "confdefs.h"
16772
16773 #ifdef HAVE_DB_185_H
16774 # include <db_185.h>
16775 #else
16776 # include <db.h>
16777 #endif
16778
16779 #ifndef DB_VERSION_MAJOR
16780 # define DB_VERSION_MAJOR 1
16781 #endif
16782
16783 #ifndef NULL
16784 #define NULL ((void*)0)
16785 #endif
16786
16787 int main() {
16788
16789 #if DB_VERSION_MAJOR > 1
16790         {
16791                 char *version;
16792                 int major, minor, patch;
16793
16794                 version = db_version( &major, &minor, &patch );
16795
16796                 if( major != DB_VERSION_MAJOR ||
16797                         minor < DB_VERSION_MINOR )
16798                 {
16799                         printf("Berkeley DB version mismatch\n"
16800                                 "\theader: %s\n\tlibrary: %s\n",
16801                                 DB_VERSION_STRING, version);
16802                         return 1;
16803                 }
16804         }
16805 #endif
16806
16807 #if DB_VERSION_MAJOR > 2
16808         db_env_create( NULL, 0 );
16809 #elif DB_VERSION_MAJOR > 1
16810         db_appexit( NULL );
16811 #else
16812         (void) dbopen( NULL, 0, 0, 0, NULL);
16813 #endif
16814
16815 ; return 0; }
16816 EOF
16817 if { (eval echo configure:16818: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16818   rm -rf conftest*
16819   ol_cv_db_db_42=yes
16820 else
16821   echo "configure: failed program was:" >&5
16822   cat conftest.$ac_ext >&5
16823   rm -rf conftest*
16824   ol_cv_db_db_42=no
16825 fi
16826 rm -f conftest*
16827
16828         LIBS="$ol_LIBS"
16829
16830 fi
16831
16832 echo "$ac_t""$ol_cv_db_db_42" 1>&6
16833
16834         if test $ol_cv_db_db_42 = yes ; then
16835                 ol_cv_lib_db=-ldb-42
16836         fi
16837 fi
16838
16839 if test $ol_cv_lib_db = no ; then
16840         echo $ac_n "checking for Berkeley DB link (-ldb-4.2)""... $ac_c" 1>&6
16841 echo "configure:16842: checking for Berkeley DB link (-ldb-4.2)" >&5
16842 if eval "test \"\${ol_cv_db_db_4_dot_2+set}\" = set"; then
16843   echo $ac_n "(cached) $ac_c" 1>&6
16844 else
16845   
16846         ol_DB_LIB=-ldb-4.2
16847         ol_LIBS=$LIBS
16848         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
16849
16850         cat > conftest.$ac_ext <<EOF
16851 #line 16852 "configure"
16852 #include "confdefs.h"
16853
16854 #ifdef HAVE_DB_185_H
16855 # include <db_185.h>
16856 #else
16857 # include <db.h>
16858 #endif
16859
16860 #ifndef DB_VERSION_MAJOR
16861 # define DB_VERSION_MAJOR 1
16862 #endif
16863
16864 #ifndef NULL
16865 #define NULL ((void*)0)
16866 #endif
16867
16868 int main() {
16869
16870 #if DB_VERSION_MAJOR > 1
16871         {
16872                 char *version;
16873                 int major, minor, patch;
16874
16875                 version = db_version( &major, &minor, &patch );
16876
16877                 if( major != DB_VERSION_MAJOR ||
16878                         minor < DB_VERSION_MINOR )
16879                 {
16880                         printf("Berkeley DB version mismatch\n"
16881                                 "\theader: %s\n\tlibrary: %s\n",
16882                                 DB_VERSION_STRING, version);
16883                         return 1;
16884                 }
16885         }
16886 #endif
16887
16888 #if DB_VERSION_MAJOR > 2
16889         db_env_create( NULL, 0 );
16890 #elif DB_VERSION_MAJOR > 1
16891         db_appexit( NULL );
16892 #else
16893         (void) dbopen( NULL, 0, 0, 0, NULL);
16894 #endif
16895
16896 ; return 0; }
16897 EOF
16898 if { (eval echo configure:16899: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16899   rm -rf conftest*
16900   ol_cv_db_db_4_dot_2=yes
16901 else
16902   echo "configure: failed program was:" >&5
16903   cat conftest.$ac_ext >&5
16904   rm -rf conftest*
16905   ol_cv_db_db_4_dot_2=no
16906 fi
16907 rm -f conftest*
16908
16909         LIBS="$ol_LIBS"
16910
16911 fi
16912
16913 echo "$ac_t""$ol_cv_db_db_4_dot_2" 1>&6
16914
16915         if test $ol_cv_db_db_4_dot_2 = yes ; then
16916                 ol_cv_lib_db=-ldb-4.2
16917         fi
16918 fi
16919
16920 if test $ol_cv_lib_db = no ; then
16921         echo $ac_n "checking for Berkeley DB link (-ldb-4-2)""... $ac_c" 1>&6
16922 echo "configure:16923: checking for Berkeley DB link (-ldb-4-2)" >&5
16923 if eval "test \"\${ol_cv_db_db_4_2+set}\" = set"; then
16924   echo $ac_n "(cached) $ac_c" 1>&6
16925 else
16926   
16927         ol_DB_LIB=-ldb-4-2
16928         ol_LIBS=$LIBS
16929         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
16930
16931         cat > conftest.$ac_ext <<EOF
16932 #line 16933 "configure"
16933 #include "confdefs.h"
16934
16935 #ifdef HAVE_DB_185_H
16936 # include <db_185.h>
16937 #else
16938 # include <db.h>
16939 #endif
16940
16941 #ifndef DB_VERSION_MAJOR
16942 # define DB_VERSION_MAJOR 1
16943 #endif
16944
16945 #ifndef NULL
16946 #define NULL ((void*)0)
16947 #endif
16948
16949 int main() {
16950
16951 #if DB_VERSION_MAJOR > 1
16952         {
16953                 char *version;
16954                 int major, minor, patch;
16955
16956                 version = db_version( &major, &minor, &patch );
16957
16958                 if( major != DB_VERSION_MAJOR ||
16959                         minor < DB_VERSION_MINOR )
16960                 {
16961                         printf("Berkeley DB version mismatch\n"
16962                                 "\theader: %s\n\tlibrary: %s\n",
16963                                 DB_VERSION_STRING, version);
16964                         return 1;
16965                 }
16966         }
16967 #endif
16968
16969 #if DB_VERSION_MAJOR > 2
16970         db_env_create( NULL, 0 );
16971 #elif DB_VERSION_MAJOR > 1
16972         db_appexit( NULL );
16973 #else
16974         (void) dbopen( NULL, 0, 0, 0, NULL);
16975 #endif
16976
16977 ; return 0; }
16978 EOF
16979 if { (eval echo configure:16980: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16980   rm -rf conftest*
16981   ol_cv_db_db_4_2=yes
16982 else
16983   echo "configure: failed program was:" >&5
16984   cat conftest.$ac_ext >&5
16985   rm -rf conftest*
16986   ol_cv_db_db_4_2=no
16987 fi
16988 rm -f conftest*
16989
16990         LIBS="$ol_LIBS"
16991
16992 fi
16993
16994 echo "$ac_t""$ol_cv_db_db_4_2" 1>&6
16995
16996         if test $ol_cv_db_db_4_2 = yes ; then
16997                 ol_cv_lib_db=-ldb-4-2
16998         fi
16999 fi
17000
17001 if test $ol_cv_lib_db = no ; then
17002         echo $ac_n "checking for Berkeley DB link (-ldb-4)""... $ac_c" 1>&6
17003 echo "configure:17004: checking for Berkeley DB link (-ldb-4)" >&5
17004 if eval "test \"\${ol_cv_db_db_4+set}\" = set"; then
17005   echo $ac_n "(cached) $ac_c" 1>&6
17006 else
17007   
17008         ol_DB_LIB=-ldb-4
17009         ol_LIBS=$LIBS
17010         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17011
17012         cat > conftest.$ac_ext <<EOF
17013 #line 17014 "configure"
17014 #include "confdefs.h"
17015
17016 #ifdef HAVE_DB_185_H
17017 # include <db_185.h>
17018 #else
17019 # include <db.h>
17020 #endif
17021
17022 #ifndef DB_VERSION_MAJOR
17023 # define DB_VERSION_MAJOR 1
17024 #endif
17025
17026 #ifndef NULL
17027 #define NULL ((void*)0)
17028 #endif
17029
17030 int main() {
17031
17032 #if DB_VERSION_MAJOR > 1
17033         {
17034                 char *version;
17035                 int major, minor, patch;
17036
17037                 version = db_version( &major, &minor, &patch );
17038
17039                 if( major != DB_VERSION_MAJOR ||
17040                         minor < DB_VERSION_MINOR )
17041                 {
17042                         printf("Berkeley DB version mismatch\n"
17043                                 "\theader: %s\n\tlibrary: %s\n",
17044                                 DB_VERSION_STRING, version);
17045                         return 1;
17046                 }
17047         }
17048 #endif
17049
17050 #if DB_VERSION_MAJOR > 2
17051         db_env_create( NULL, 0 );
17052 #elif DB_VERSION_MAJOR > 1
17053         db_appexit( NULL );
17054 #else
17055         (void) dbopen( NULL, 0, 0, 0, NULL);
17056 #endif
17057
17058 ; return 0; }
17059 EOF
17060 if { (eval echo configure:17061: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17061   rm -rf conftest*
17062   ol_cv_db_db_4=yes
17063 else
17064   echo "configure: failed program was:" >&5
17065   cat conftest.$ac_ext >&5
17066   rm -rf conftest*
17067   ol_cv_db_db_4=no
17068 fi
17069 rm -f conftest*
17070
17071         LIBS="$ol_LIBS"
17072
17073 fi
17074
17075 echo "$ac_t""$ol_cv_db_db_4" 1>&6
17076
17077         if test $ol_cv_db_db_4 = yes ; then
17078                 ol_cv_lib_db=-ldb-4
17079         fi
17080 fi
17081
17082 if test $ol_cv_lib_db = no ; then
17083         echo $ac_n "checking for Berkeley DB link (-ldb4)""... $ac_c" 1>&6
17084 echo "configure:17085: checking for Berkeley DB link (-ldb4)" >&5
17085 if eval "test \"\${ol_cv_db_db4+set}\" = set"; then
17086   echo $ac_n "(cached) $ac_c" 1>&6
17087 else
17088   
17089         ol_DB_LIB=-ldb4
17090         ol_LIBS=$LIBS
17091         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17092
17093         cat > conftest.$ac_ext <<EOF
17094 #line 17095 "configure"
17095 #include "confdefs.h"
17096
17097 #ifdef HAVE_DB_185_H
17098 # include <db_185.h>
17099 #else
17100 # include <db.h>
17101 #endif
17102
17103 #ifndef DB_VERSION_MAJOR
17104 # define DB_VERSION_MAJOR 1
17105 #endif
17106
17107 #ifndef NULL
17108 #define NULL ((void*)0)
17109 #endif
17110
17111 int main() {
17112
17113 #if DB_VERSION_MAJOR > 1
17114         {
17115                 char *version;
17116                 int major, minor, patch;
17117
17118                 version = db_version( &major, &minor, &patch );
17119
17120                 if( major != DB_VERSION_MAJOR ||
17121                         minor < DB_VERSION_MINOR )
17122                 {
17123                         printf("Berkeley DB version mismatch\n"
17124                                 "\theader: %s\n\tlibrary: %s\n",
17125                                 DB_VERSION_STRING, version);
17126                         return 1;
17127                 }
17128         }
17129 #endif
17130
17131 #if DB_VERSION_MAJOR > 2
17132         db_env_create( NULL, 0 );
17133 #elif DB_VERSION_MAJOR > 1
17134         db_appexit( NULL );
17135 #else
17136         (void) dbopen( NULL, 0, 0, 0, NULL);
17137 #endif
17138
17139 ; return 0; }
17140 EOF
17141 if { (eval echo configure:17142: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17142   rm -rf conftest*
17143   ol_cv_db_db4=yes
17144 else
17145   echo "configure: failed program was:" >&5
17146   cat conftest.$ac_ext >&5
17147   rm -rf conftest*
17148   ol_cv_db_db4=no
17149 fi
17150 rm -f conftest*
17151
17152         LIBS="$ol_LIBS"
17153
17154 fi
17155
17156 echo "$ac_t""$ol_cv_db_db4" 1>&6
17157
17158         if test $ol_cv_db_db4 = yes ; then
17159                 ol_cv_lib_db=-ldb4
17160         fi
17161 fi
17162
17163 if test $ol_cv_lib_db = no ; then
17164         echo $ac_n "checking for Berkeley DB link (-ldb)""... $ac_c" 1>&6
17165 echo "configure:17166: checking for Berkeley DB link (-ldb)" >&5
17166 if eval "test \"\${ol_cv_db_db+set}\" = set"; then
17167   echo $ac_n "(cached) $ac_c" 1>&6
17168 else
17169   
17170         ol_DB_LIB=-ldb
17171         ol_LIBS=$LIBS
17172         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17173
17174         cat > conftest.$ac_ext <<EOF
17175 #line 17176 "configure"
17176 #include "confdefs.h"
17177
17178 #ifdef HAVE_DB_185_H
17179 # include <db_185.h>
17180 #else
17181 # include <db.h>
17182 #endif
17183
17184 #ifndef DB_VERSION_MAJOR
17185 # define DB_VERSION_MAJOR 1
17186 #endif
17187
17188 #ifndef NULL
17189 #define NULL ((void*)0)
17190 #endif
17191
17192 int main() {
17193
17194 #if DB_VERSION_MAJOR > 1
17195         {
17196                 char *version;
17197                 int major, minor, patch;
17198
17199                 version = db_version( &major, &minor, &patch );
17200
17201                 if( major != DB_VERSION_MAJOR ||
17202                         minor < DB_VERSION_MINOR )
17203                 {
17204                         printf("Berkeley DB version mismatch\n"
17205                                 "\theader: %s\n\tlibrary: %s\n",
17206                                 DB_VERSION_STRING, version);
17207                         return 1;
17208                 }
17209         }
17210 #endif
17211
17212 #if DB_VERSION_MAJOR > 2
17213         db_env_create( NULL, 0 );
17214 #elif DB_VERSION_MAJOR > 1
17215         db_appexit( NULL );
17216 #else
17217         (void) dbopen( NULL, 0, 0, 0, NULL);
17218 #endif
17219
17220 ; return 0; }
17221 EOF
17222 if { (eval echo configure:17223: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17223   rm -rf conftest*
17224   ol_cv_db_db=yes
17225 else
17226   echo "configure: failed program was:" >&5
17227   cat conftest.$ac_ext >&5
17228   rm -rf conftest*
17229   ol_cv_db_db=no
17230 fi
17231 rm -f conftest*
17232
17233         LIBS="$ol_LIBS"
17234
17235 fi
17236
17237 echo "$ac_t""$ol_cv_db_db" 1>&6
17238
17239         if test $ol_cv_db_db = yes ; then
17240                 ol_cv_lib_db=-ldb
17241         fi
17242 fi
17243
17244 if test $ol_cv_lib_db = no ; then
17245         echo $ac_n "checking for Berkeley DB link (-ldb41)""... $ac_c" 1>&6
17246 echo "configure:17247: checking for Berkeley DB link (-ldb41)" >&5
17247 if eval "test \"\${ol_cv_db_db41+set}\" = set"; then
17248   echo $ac_n "(cached) $ac_c" 1>&6
17249 else
17250   
17251         ol_DB_LIB=-ldb41
17252         ol_LIBS=$LIBS
17253         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17254
17255         cat > conftest.$ac_ext <<EOF
17256 #line 17257 "configure"
17257 #include "confdefs.h"
17258
17259 #ifdef HAVE_DB_185_H
17260 # include <db_185.h>
17261 #else
17262 # include <db.h>
17263 #endif
17264
17265 #ifndef DB_VERSION_MAJOR
17266 # define DB_VERSION_MAJOR 1
17267 #endif
17268
17269 #ifndef NULL
17270 #define NULL ((void*)0)
17271 #endif
17272
17273 int main() {
17274
17275 #if DB_VERSION_MAJOR > 1
17276         {
17277                 char *version;
17278                 int major, minor, patch;
17279
17280                 version = db_version( &major, &minor, &patch );
17281
17282                 if( major != DB_VERSION_MAJOR ||
17283                         minor < DB_VERSION_MINOR )
17284                 {
17285                         printf("Berkeley DB version mismatch\n"
17286                                 "\theader: %s\n\tlibrary: %s\n",
17287                                 DB_VERSION_STRING, version);
17288                         return 1;
17289                 }
17290         }
17291 #endif
17292
17293 #if DB_VERSION_MAJOR > 2
17294         db_env_create( NULL, 0 );
17295 #elif DB_VERSION_MAJOR > 1
17296         db_appexit( NULL );
17297 #else
17298         (void) dbopen( NULL, 0, 0, 0, NULL);
17299 #endif
17300
17301 ; return 0; }
17302 EOF
17303 if { (eval echo configure:17304: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17304   rm -rf conftest*
17305   ol_cv_db_db41=yes
17306 else
17307   echo "configure: failed program was:" >&5
17308   cat conftest.$ac_ext >&5
17309   rm -rf conftest*
17310   ol_cv_db_db41=no
17311 fi
17312 rm -f conftest*
17313
17314         LIBS="$ol_LIBS"
17315
17316 fi
17317
17318 echo "$ac_t""$ol_cv_db_db41" 1>&6
17319
17320         if test $ol_cv_db_db41 = yes ; then
17321                 ol_cv_lib_db=-ldb41
17322         fi
17323 fi
17324
17325 if test $ol_cv_lib_db = no ; then
17326         echo $ac_n "checking for Berkeley DB link (-ldb-41)""... $ac_c" 1>&6
17327 echo "configure:17328: checking for Berkeley DB link (-ldb-41)" >&5
17328 if eval "test \"\${ol_cv_db_db_41+set}\" = set"; then
17329   echo $ac_n "(cached) $ac_c" 1>&6
17330 else
17331   
17332         ol_DB_LIB=-ldb-41
17333         ol_LIBS=$LIBS
17334         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17335
17336         cat > conftest.$ac_ext <<EOF
17337 #line 17338 "configure"
17338 #include "confdefs.h"
17339
17340 #ifdef HAVE_DB_185_H
17341 # include <db_185.h>
17342 #else
17343 # include <db.h>
17344 #endif
17345
17346 #ifndef DB_VERSION_MAJOR
17347 # define DB_VERSION_MAJOR 1
17348 #endif
17349
17350 #ifndef NULL
17351 #define NULL ((void*)0)
17352 #endif
17353
17354 int main() {
17355
17356 #if DB_VERSION_MAJOR > 1
17357         {
17358                 char *version;
17359                 int major, minor, patch;
17360
17361                 version = db_version( &major, &minor, &patch );
17362
17363                 if( major != DB_VERSION_MAJOR ||
17364                         minor < DB_VERSION_MINOR )
17365                 {
17366                         printf("Berkeley DB version mismatch\n"
17367                                 "\theader: %s\n\tlibrary: %s\n",
17368                                 DB_VERSION_STRING, version);
17369                         return 1;
17370                 }
17371         }
17372 #endif
17373
17374 #if DB_VERSION_MAJOR > 2
17375         db_env_create( NULL, 0 );
17376 #elif DB_VERSION_MAJOR > 1
17377         db_appexit( NULL );
17378 #else
17379         (void) dbopen( NULL, 0, 0, 0, NULL);
17380 #endif
17381
17382 ; return 0; }
17383 EOF
17384 if { (eval echo configure:17385: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17385   rm -rf conftest*
17386   ol_cv_db_db_41=yes
17387 else
17388   echo "configure: failed program was:" >&5
17389   cat conftest.$ac_ext >&5
17390   rm -rf conftest*
17391   ol_cv_db_db_41=no
17392 fi
17393 rm -f conftest*
17394
17395         LIBS="$ol_LIBS"
17396
17397 fi
17398
17399 echo "$ac_t""$ol_cv_db_db_41" 1>&6
17400
17401         if test $ol_cv_db_db_41 = yes ; then
17402                 ol_cv_lib_db=-ldb-41
17403         fi
17404 fi
17405
17406 if test $ol_cv_lib_db = no ; then
17407         echo $ac_n "checking for Berkeley DB link (-ldb-4.1)""... $ac_c" 1>&6
17408 echo "configure:17409: checking for Berkeley DB link (-ldb-4.1)" >&5
17409 if eval "test \"\${ol_cv_db_db_4_dot_1+set}\" = set"; then
17410   echo $ac_n "(cached) $ac_c" 1>&6
17411 else
17412   
17413         ol_DB_LIB=-ldb-4.1
17414         ol_LIBS=$LIBS
17415         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17416
17417         cat > conftest.$ac_ext <<EOF
17418 #line 17419 "configure"
17419 #include "confdefs.h"
17420
17421 #ifdef HAVE_DB_185_H
17422 # include <db_185.h>
17423 #else
17424 # include <db.h>
17425 #endif
17426
17427 #ifndef DB_VERSION_MAJOR
17428 # define DB_VERSION_MAJOR 1
17429 #endif
17430
17431 #ifndef NULL
17432 #define NULL ((void*)0)
17433 #endif
17434
17435 int main() {
17436
17437 #if DB_VERSION_MAJOR > 1
17438         {
17439                 char *version;
17440                 int major, minor, patch;
17441
17442                 version = db_version( &major, &minor, &patch );
17443
17444                 if( major != DB_VERSION_MAJOR ||
17445                         minor < DB_VERSION_MINOR )
17446                 {
17447                         printf("Berkeley DB version mismatch\n"
17448                                 "\theader: %s\n\tlibrary: %s\n",
17449                                 DB_VERSION_STRING, version);
17450                         return 1;
17451                 }
17452         }
17453 #endif
17454
17455 #if DB_VERSION_MAJOR > 2
17456         db_env_create( NULL, 0 );
17457 #elif DB_VERSION_MAJOR > 1
17458         db_appexit( NULL );
17459 #else
17460         (void) dbopen( NULL, 0, 0, 0, NULL);
17461 #endif
17462
17463 ; return 0; }
17464 EOF
17465 if { (eval echo configure:17466: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17466   rm -rf conftest*
17467   ol_cv_db_db_4_dot_1=yes
17468 else
17469   echo "configure: failed program was:" >&5
17470   cat conftest.$ac_ext >&5
17471   rm -rf conftest*
17472   ol_cv_db_db_4_dot_1=no
17473 fi
17474 rm -f conftest*
17475
17476         LIBS="$ol_LIBS"
17477
17478 fi
17479
17480 echo "$ac_t""$ol_cv_db_db_4_dot_1" 1>&6
17481
17482         if test $ol_cv_db_db_4_dot_1 = yes ; then
17483                 ol_cv_lib_db=-ldb-4.1
17484         fi
17485 fi
17486
17487 if test $ol_cv_lib_db = no ; then
17488         echo $ac_n "checking for Berkeley DB link (-ldb-4-1)""... $ac_c" 1>&6
17489 echo "configure:17490: checking for Berkeley DB link (-ldb-4-1)" >&5
17490 if eval "test \"\${ol_cv_db_db_4_1+set}\" = set"; then
17491   echo $ac_n "(cached) $ac_c" 1>&6
17492 else
17493   
17494         ol_DB_LIB=-ldb-4-1
17495         ol_LIBS=$LIBS
17496         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17497
17498         cat > conftest.$ac_ext <<EOF
17499 #line 17500 "configure"
17500 #include "confdefs.h"
17501
17502 #ifdef HAVE_DB_185_H
17503 # include <db_185.h>
17504 #else
17505 # include <db.h>
17506 #endif
17507
17508 #ifndef DB_VERSION_MAJOR
17509 # define DB_VERSION_MAJOR 1
17510 #endif
17511
17512 #ifndef NULL
17513 #define NULL ((void*)0)
17514 #endif
17515
17516 int main() {
17517
17518 #if DB_VERSION_MAJOR > 1
17519         {
17520                 char *version;
17521                 int major, minor, patch;
17522
17523                 version = db_version( &major, &minor, &patch );
17524
17525                 if( major != DB_VERSION_MAJOR ||
17526                         minor < DB_VERSION_MINOR )
17527                 {
17528                         printf("Berkeley DB version mismatch\n"
17529                                 "\theader: %s\n\tlibrary: %s\n",
17530                                 DB_VERSION_STRING, version);
17531                         return 1;
17532                 }
17533         }
17534 #endif
17535
17536 #if DB_VERSION_MAJOR > 2
17537         db_env_create( NULL, 0 );
17538 #elif DB_VERSION_MAJOR > 1
17539         db_appexit( NULL );
17540 #else
17541         (void) dbopen( NULL, 0, 0, 0, NULL);
17542 #endif
17543
17544 ; return 0; }
17545 EOF
17546 if { (eval echo configure:17547: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17547   rm -rf conftest*
17548   ol_cv_db_db_4_1=yes
17549 else
17550   echo "configure: failed program was:" >&5
17551   cat conftest.$ac_ext >&5
17552   rm -rf conftest*
17553   ol_cv_db_db_4_1=no
17554 fi
17555 rm -f conftest*
17556
17557         LIBS="$ol_LIBS"
17558
17559 fi
17560
17561 echo "$ac_t""$ol_cv_db_db_4_1" 1>&6
17562
17563         if test $ol_cv_db_db_4_1 = yes ; then
17564                 ol_cv_lib_db=-ldb-4-1
17565         fi
17566 fi
17567
17568 if test $ol_cv_lib_db = no ; then
17569         echo $ac_n "checking for Berkeley DB link (-ldb3)""... $ac_c" 1>&6
17570 echo "configure:17571: checking for Berkeley DB link (-ldb3)" >&5
17571 if eval "test \"\${ol_cv_db_db3+set}\" = set"; then
17572   echo $ac_n "(cached) $ac_c" 1>&6
17573 else
17574   
17575         ol_DB_LIB=-ldb3
17576         ol_LIBS=$LIBS
17577         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17578
17579         cat > conftest.$ac_ext <<EOF
17580 #line 17581 "configure"
17581 #include "confdefs.h"
17582
17583 #ifdef HAVE_DB_185_H
17584 # include <db_185.h>
17585 #else
17586 # include <db.h>
17587 #endif
17588
17589 #ifndef DB_VERSION_MAJOR
17590 # define DB_VERSION_MAJOR 1
17591 #endif
17592
17593 #ifndef NULL
17594 #define NULL ((void*)0)
17595 #endif
17596
17597 int main() {
17598
17599 #if DB_VERSION_MAJOR > 1
17600         {
17601                 char *version;
17602                 int major, minor, patch;
17603
17604                 version = db_version( &major, &minor, &patch );
17605
17606                 if( major != DB_VERSION_MAJOR ||
17607                         minor < DB_VERSION_MINOR )
17608                 {
17609                         printf("Berkeley DB version mismatch\n"
17610                                 "\theader: %s\n\tlibrary: %s\n",
17611                                 DB_VERSION_STRING, version);
17612                         return 1;
17613                 }
17614         }
17615 #endif
17616
17617 #if DB_VERSION_MAJOR > 2
17618         db_env_create( NULL, 0 );
17619 #elif DB_VERSION_MAJOR > 1
17620         db_appexit( NULL );
17621 #else
17622         (void) dbopen( NULL, 0, 0, 0, NULL);
17623 #endif
17624
17625 ; return 0; }
17626 EOF
17627 if { (eval echo configure:17628: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17628   rm -rf conftest*
17629   ol_cv_db_db3=yes
17630 else
17631   echo "configure: failed program was:" >&5
17632   cat conftest.$ac_ext >&5
17633   rm -rf conftest*
17634   ol_cv_db_db3=no
17635 fi
17636 rm -f conftest*
17637
17638         LIBS="$ol_LIBS"
17639
17640 fi
17641
17642 echo "$ac_t""$ol_cv_db_db3" 1>&6
17643
17644         if test $ol_cv_db_db3 = yes ; then
17645                 ol_cv_lib_db=-ldb3
17646         fi
17647 fi
17648
17649 if test $ol_cv_lib_db = no ; then
17650         echo $ac_n "checking for Berkeley DB link (-ldb-3)""... $ac_c" 1>&6
17651 echo "configure:17652: checking for Berkeley DB link (-ldb-3)" >&5
17652 if eval "test \"\${ol_cv_db_db_3+set}\" = set"; then
17653   echo $ac_n "(cached) $ac_c" 1>&6
17654 else
17655   
17656         ol_DB_LIB=-ldb-3
17657         ol_LIBS=$LIBS
17658         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17659
17660         cat > conftest.$ac_ext <<EOF
17661 #line 17662 "configure"
17662 #include "confdefs.h"
17663
17664 #ifdef HAVE_DB_185_H
17665 # include <db_185.h>
17666 #else
17667 # include <db.h>
17668 #endif
17669
17670 #ifndef DB_VERSION_MAJOR
17671 # define DB_VERSION_MAJOR 1
17672 #endif
17673
17674 #ifndef NULL
17675 #define NULL ((void*)0)
17676 #endif
17677
17678 int main() {
17679
17680 #if DB_VERSION_MAJOR > 1
17681         {
17682                 char *version;
17683                 int major, minor, patch;
17684
17685                 version = db_version( &major, &minor, &patch );
17686
17687                 if( major != DB_VERSION_MAJOR ||
17688                         minor < DB_VERSION_MINOR )
17689                 {
17690                         printf("Berkeley DB version mismatch\n"
17691                                 "\theader: %s\n\tlibrary: %s\n",
17692                                 DB_VERSION_STRING, version);
17693                         return 1;
17694                 }
17695         }
17696 #endif
17697
17698 #if DB_VERSION_MAJOR > 2
17699         db_env_create( NULL, 0 );
17700 #elif DB_VERSION_MAJOR > 1
17701         db_appexit( NULL );
17702 #else
17703         (void) dbopen( NULL, 0, 0, 0, NULL);
17704 #endif
17705
17706 ; return 0; }
17707 EOF
17708 if { (eval echo configure:17709: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17709   rm -rf conftest*
17710   ol_cv_db_db_3=yes
17711 else
17712   echo "configure: failed program was:" >&5
17713   cat conftest.$ac_ext >&5
17714   rm -rf conftest*
17715   ol_cv_db_db_3=no
17716 fi
17717 rm -f conftest*
17718
17719         LIBS="$ol_LIBS"
17720
17721 fi
17722
17723 echo "$ac_t""$ol_cv_db_db_3" 1>&6
17724
17725         if test $ol_cv_db_db_3 = yes ; then
17726                 ol_cv_lib_db=-ldb-3
17727         fi
17728 fi
17729
17730 if test $ol_cv_lib_db = no ; then
17731         echo $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6
17732 echo "configure:17733: checking for Berkeley DB link (-ldb2)" >&5
17733 if eval "test \"\${ol_cv_db_db2+set}\" = set"; then
17734   echo $ac_n "(cached) $ac_c" 1>&6
17735 else
17736   
17737         ol_DB_LIB=-ldb2
17738         ol_LIBS=$LIBS
17739         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17740
17741         cat > conftest.$ac_ext <<EOF
17742 #line 17743 "configure"
17743 #include "confdefs.h"
17744
17745 #ifdef HAVE_DB_185_H
17746 # include <db_185.h>
17747 #else
17748 # include <db.h>
17749 #endif
17750
17751 #ifndef DB_VERSION_MAJOR
17752 # define DB_VERSION_MAJOR 1
17753 #endif
17754
17755 #ifndef NULL
17756 #define NULL ((void*)0)
17757 #endif
17758
17759 int main() {
17760
17761 #if DB_VERSION_MAJOR > 1
17762         {
17763                 char *version;
17764                 int major, minor, patch;
17765
17766                 version = db_version( &major, &minor, &patch );
17767
17768                 if( major != DB_VERSION_MAJOR ||
17769                         minor < DB_VERSION_MINOR )
17770                 {
17771                         printf("Berkeley DB version mismatch\n"
17772                                 "\theader: %s\n\tlibrary: %s\n",
17773                                 DB_VERSION_STRING, version);
17774                         return 1;
17775                 }
17776         }
17777 #endif
17778
17779 #if DB_VERSION_MAJOR > 2
17780         db_env_create( NULL, 0 );
17781 #elif DB_VERSION_MAJOR > 1
17782         db_appexit( NULL );
17783 #else
17784         (void) dbopen( NULL, 0, 0, 0, NULL);
17785 #endif
17786
17787 ; return 0; }
17788 EOF
17789 if { (eval echo configure:17790: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17790   rm -rf conftest*
17791   ol_cv_db_db2=yes
17792 else
17793   echo "configure: failed program was:" >&5
17794   cat conftest.$ac_ext >&5
17795   rm -rf conftest*
17796   ol_cv_db_db2=no
17797 fi
17798 rm -f conftest*
17799
17800         LIBS="$ol_LIBS"
17801
17802 fi
17803
17804 echo "$ac_t""$ol_cv_db_db2" 1>&6
17805
17806         if test $ol_cv_db_db2 = yes ; then
17807                 ol_cv_lib_db=-ldb2
17808         fi
17809 fi
17810
17811 if test $ol_cv_lib_db = no ; then
17812         echo $ac_n "checking for Berkeley DB link (-ldb-2)""... $ac_c" 1>&6
17813 echo "configure:17814: checking for Berkeley DB link (-ldb-2)" >&5
17814 if eval "test \"\${ol_cv_db_db_2+set}\" = set"; then
17815   echo $ac_n "(cached) $ac_c" 1>&6
17816 else
17817   
17818         ol_DB_LIB=-ldb-2
17819         ol_LIBS=$LIBS
17820         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17821
17822         cat > conftest.$ac_ext <<EOF
17823 #line 17824 "configure"
17824 #include "confdefs.h"
17825
17826 #ifdef HAVE_DB_185_H
17827 # include <db_185.h>
17828 #else
17829 # include <db.h>
17830 #endif
17831
17832 #ifndef DB_VERSION_MAJOR
17833 # define DB_VERSION_MAJOR 1
17834 #endif
17835
17836 #ifndef NULL
17837 #define NULL ((void*)0)
17838 #endif
17839
17840 int main() {
17841
17842 #if DB_VERSION_MAJOR > 1
17843         {
17844                 char *version;
17845                 int major, minor, patch;
17846
17847                 version = db_version( &major, &minor, &patch );
17848
17849                 if( major != DB_VERSION_MAJOR ||
17850                         minor < DB_VERSION_MINOR )
17851                 {
17852                         printf("Berkeley DB version mismatch\n"
17853                                 "\theader: %s\n\tlibrary: %s\n",
17854                                 DB_VERSION_STRING, version);
17855                         return 1;
17856                 }
17857         }
17858 #endif
17859
17860 #if DB_VERSION_MAJOR > 2
17861         db_env_create( NULL, 0 );
17862 #elif DB_VERSION_MAJOR > 1
17863         db_appexit( NULL );
17864 #else
17865         (void) dbopen( NULL, 0, 0, 0, NULL);
17866 #endif
17867
17868 ; return 0; }
17869 EOF
17870 if { (eval echo configure:17871: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17871   rm -rf conftest*
17872   ol_cv_db_db_2=yes
17873 else
17874   echo "configure: failed program was:" >&5
17875   cat conftest.$ac_ext >&5
17876   rm -rf conftest*
17877   ol_cv_db_db_2=no
17878 fi
17879 rm -f conftest*
17880
17881         LIBS="$ol_LIBS"
17882
17883 fi
17884
17885 echo "$ac_t""$ol_cv_db_db_2" 1>&6
17886
17887         if test $ol_cv_db_db_2 = yes ; then
17888                 ol_cv_lib_db=-ldb-2
17889         fi
17890 fi
17891
17892 if test $ol_cv_lib_db = no ; then
17893         echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6
17894 echo "configure:17895: checking for Berkeley DB link (-ldb1)" >&5
17895 if eval "test \"\${ol_cv_db_db1+set}\" = set"; then
17896   echo $ac_n "(cached) $ac_c" 1>&6
17897 else
17898   
17899         ol_DB_LIB=-ldb1
17900         ol_LIBS=$LIBS
17901         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17902
17903         cat > conftest.$ac_ext <<EOF
17904 #line 17905 "configure"
17905 #include "confdefs.h"
17906
17907 #ifdef HAVE_DB_185_H
17908 # include <db_185.h>
17909 #else
17910 # include <db.h>
17911 #endif
17912
17913 #ifndef DB_VERSION_MAJOR
17914 # define DB_VERSION_MAJOR 1
17915 #endif
17916
17917 #ifndef NULL
17918 #define NULL ((void*)0)
17919 #endif
17920
17921 int main() {
17922
17923 #if DB_VERSION_MAJOR > 1
17924         {
17925                 char *version;
17926                 int major, minor, patch;
17927
17928                 version = db_version( &major, &minor, &patch );
17929
17930                 if( major != DB_VERSION_MAJOR ||
17931                         minor < DB_VERSION_MINOR )
17932                 {
17933                         printf("Berkeley DB version mismatch\n"
17934                                 "\theader: %s\n\tlibrary: %s\n",
17935                                 DB_VERSION_STRING, version);
17936                         return 1;
17937                 }
17938         }
17939 #endif
17940
17941 #if DB_VERSION_MAJOR > 2
17942         db_env_create( NULL, 0 );
17943 #elif DB_VERSION_MAJOR > 1
17944         db_appexit( NULL );
17945 #else
17946         (void) dbopen( NULL, 0, 0, 0, NULL);
17947 #endif
17948
17949 ; return 0; }
17950 EOF
17951 if { (eval echo configure:17952: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17952   rm -rf conftest*
17953   ol_cv_db_db1=yes
17954 else
17955   echo "configure: failed program was:" >&5
17956   cat conftest.$ac_ext >&5
17957   rm -rf conftest*
17958   ol_cv_db_db1=no
17959 fi
17960 rm -f conftest*
17961
17962         LIBS="$ol_LIBS"
17963
17964 fi
17965
17966 echo "$ac_t""$ol_cv_db_db1" 1>&6
17967
17968         if test $ol_cv_db_db1 = yes ; then
17969                 ol_cv_lib_db=-ldb1
17970         fi
17971 fi
17972
17973 if test $ol_cv_lib_db = no ; then
17974         echo $ac_n "checking for Berkeley DB link (-ldb-1)""... $ac_c" 1>&6
17975 echo "configure:17976: checking for Berkeley DB link (-ldb-1)" >&5
17976 if eval "test \"\${ol_cv_db_db_1+set}\" = set"; then
17977   echo $ac_n "(cached) $ac_c" 1>&6
17978 else
17979   
17980         ol_DB_LIB=-ldb-1
17981         ol_LIBS=$LIBS
17982         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17983
17984         cat > conftest.$ac_ext <<EOF
17985 #line 17986 "configure"
17986 #include "confdefs.h"
17987
17988 #ifdef HAVE_DB_185_H
17989 # include <db_185.h>
17990 #else
17991 # include <db.h>
17992 #endif
17993
17994 #ifndef DB_VERSION_MAJOR
17995 # define DB_VERSION_MAJOR 1
17996 #endif
17997
17998 #ifndef NULL
17999 #define NULL ((void*)0)
18000 #endif
18001
18002 int main() {
18003
18004 #if DB_VERSION_MAJOR > 1
18005         {
18006                 char *version;
18007                 int major, minor, patch;
18008
18009                 version = db_version( &major, &minor, &patch );
18010
18011                 if( major != DB_VERSION_MAJOR ||
18012                         minor < DB_VERSION_MINOR )
18013                 {
18014                         printf("Berkeley DB version mismatch\n"
18015                                 "\theader: %s\n\tlibrary: %s\n",
18016                                 DB_VERSION_STRING, version);
18017                         return 1;
18018                 }
18019         }
18020 #endif
18021
18022 #if DB_VERSION_MAJOR > 2
18023         db_env_create( NULL, 0 );
18024 #elif DB_VERSION_MAJOR > 1
18025         db_appexit( NULL );
18026 #else
18027         (void) dbopen( NULL, 0, 0, 0, NULL);
18028 #endif
18029
18030 ; return 0; }
18031 EOF
18032 if { (eval echo configure:18033: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18033   rm -rf conftest*
18034   ol_cv_db_db_1=yes
18035 else
18036   echo "configure: failed program was:" >&5
18037   cat conftest.$ac_ext >&5
18038   rm -rf conftest*
18039   ol_cv_db_db_1=no
18040 fi
18041 rm -f conftest*
18042
18043         LIBS="$ol_LIBS"
18044
18045 fi
18046
18047 echo "$ac_t""$ol_cv_db_db_1" 1>&6
18048
18049         if test $ol_cv_db_db_1 = yes ; then
18050                 ol_cv_lib_db=-ldb-1
18051         fi
18052 fi
18053
18054
18055                 if test "$ol_cv_lib_db" != no ; then
18056                         ol_cv_berkeley_db=yes
18057                 fi
18058         fi
18059 fi
18060
18061         else
18062                 ol_cv_berkeley_db=no
18063 for ac_hdr in db.h
18064 do
18065 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
18066 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
18067 echo "configure:18068: checking for $ac_hdr" >&5
18068 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
18069   echo $ac_n "(cached) $ac_c" 1>&6
18070 else
18071   cat > conftest.$ac_ext <<EOF
18072 #line 18073 "configure"
18073 #include "confdefs.h"
18074 #include <$ac_hdr>
18075 EOF
18076 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
18077 { (eval echo configure:18078: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
18078 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
18079 if test -z "$ac_err"; then
18080   rm -rf conftest*
18081   eval "ac_cv_header_$ac_safe=yes"
18082 else
18083   echo "$ac_err" >&5
18084   echo "configure: failed program was:" >&5
18085   cat conftest.$ac_ext >&5
18086   rm -rf conftest*
18087   eval "ac_cv_header_$ac_safe=no"
18088 fi
18089 rm -f conftest*
18090 fi
18091 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
18092   echo "$ac_t""yes" 1>&6
18093     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
18094   cat >> confdefs.h <<EOF
18095 #define $ac_tr_hdr 1
18096 EOF
18097  
18098 else
18099   echo "$ac_t""no" 1>&6
18100 fi
18101 done
18102
18103 if test $ac_cv_header_db_h = yes; then
18104         ol_cv_lib_db=no
18105 if test $ol_cv_lib_db = no ; then
18106         echo $ac_n "checking for Berkeley DB link (default)""... $ac_c" 1>&6
18107 echo "configure:18108: checking for Berkeley DB link (default)" >&5
18108 if eval "test \"\${ol_cv_db_none+set}\" = set"; then
18109   echo $ac_n "(cached) $ac_c" 1>&6
18110 else
18111   
18112         ol_DB_LIB=
18113         ol_LIBS=$LIBS
18114         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18115
18116         cat > conftest.$ac_ext <<EOF
18117 #line 18118 "configure"
18118 #include "confdefs.h"
18119
18120 #ifdef HAVE_DB_185_H
18121 # include <db_185.h>
18122 #else
18123 # include <db.h>
18124 #endif
18125
18126 #ifndef DB_VERSION_MAJOR
18127 # define DB_VERSION_MAJOR 1
18128 #endif
18129
18130 #ifndef NULL
18131 #define NULL ((void*)0)
18132 #endif
18133
18134 int main() {
18135
18136 #if DB_VERSION_MAJOR > 1
18137         {
18138                 char *version;
18139                 int major, minor, patch;
18140
18141                 version = db_version( &major, &minor, &patch );
18142
18143                 if( major != DB_VERSION_MAJOR ||
18144                         minor < DB_VERSION_MINOR )
18145                 {
18146                         printf("Berkeley DB version mismatch\n"
18147                                 "\theader: %s\n\tlibrary: %s\n",
18148                                 DB_VERSION_STRING, version);
18149                         return 1;
18150                 }
18151         }
18152 #endif
18153
18154 #if DB_VERSION_MAJOR > 2
18155         db_env_create( NULL, 0 );
18156 #elif DB_VERSION_MAJOR > 1
18157         db_appexit( NULL );
18158 #else
18159         (void) dbopen( NULL, 0, 0, 0, NULL);
18160 #endif
18161
18162 ; return 0; }
18163 EOF
18164 if { (eval echo configure:18165: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18165   rm -rf conftest*
18166   ol_cv_db_none=yes
18167 else
18168   echo "configure: failed program was:" >&5
18169   cat conftest.$ac_ext >&5
18170   rm -rf conftest*
18171   ol_cv_db_none=no
18172 fi
18173 rm -f conftest*
18174
18175         LIBS="$ol_LIBS"
18176
18177 fi
18178
18179 echo "$ac_t""$ol_cv_db_none" 1>&6
18180
18181         if test $ol_cv_db_none = yes ; then
18182                 ol_cv_lib_db=yes
18183         fi
18184 fi
18185
18186 if test $ol_cv_lib_db = no ; then
18187         echo $ac_n "checking for Berkeley DB link (-ldb43)""... $ac_c" 1>&6
18188 echo "configure:18189: checking for Berkeley DB link (-ldb43)" >&5
18189 if eval "test \"\${ol_cv_db_db43+set}\" = set"; then
18190   echo $ac_n "(cached) $ac_c" 1>&6
18191 else
18192   
18193         ol_DB_LIB=-ldb43
18194         ol_LIBS=$LIBS
18195         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18196
18197         cat > conftest.$ac_ext <<EOF
18198 #line 18199 "configure"
18199 #include "confdefs.h"
18200
18201 #ifdef HAVE_DB_185_H
18202 # include <db_185.h>
18203 #else
18204 # include <db.h>
18205 #endif
18206
18207 #ifndef DB_VERSION_MAJOR
18208 # define DB_VERSION_MAJOR 1
18209 #endif
18210
18211 #ifndef NULL
18212 #define NULL ((void*)0)
18213 #endif
18214
18215 int main() {
18216
18217 #if DB_VERSION_MAJOR > 1
18218         {
18219                 char *version;
18220                 int major, minor, patch;
18221
18222                 version = db_version( &major, &minor, &patch );
18223
18224                 if( major != DB_VERSION_MAJOR ||
18225                         minor < DB_VERSION_MINOR )
18226                 {
18227                         printf("Berkeley DB version mismatch\n"
18228                                 "\theader: %s\n\tlibrary: %s\n",
18229                                 DB_VERSION_STRING, version);
18230                         return 1;
18231                 }
18232         }
18233 #endif
18234
18235 #if DB_VERSION_MAJOR > 2
18236         db_env_create( NULL, 0 );
18237 #elif DB_VERSION_MAJOR > 1
18238         db_appexit( NULL );
18239 #else
18240         (void) dbopen( NULL, 0, 0, 0, NULL);
18241 #endif
18242
18243 ; return 0; }
18244 EOF
18245 if { (eval echo configure:18246: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18246   rm -rf conftest*
18247   ol_cv_db_db43=yes
18248 else
18249   echo "configure: failed program was:" >&5
18250   cat conftest.$ac_ext >&5
18251   rm -rf conftest*
18252   ol_cv_db_db43=no
18253 fi
18254 rm -f conftest*
18255
18256         LIBS="$ol_LIBS"
18257
18258 fi
18259
18260 echo "$ac_t""$ol_cv_db_db43" 1>&6
18261
18262         if test $ol_cv_db_db43 = yes ; then
18263                 ol_cv_lib_db=-ldb43
18264         fi
18265 fi
18266
18267 if test $ol_cv_lib_db = no ; then
18268         echo $ac_n "checking for Berkeley DB link (-ldb-43)""... $ac_c" 1>&6
18269 echo "configure:18270: checking for Berkeley DB link (-ldb-43)" >&5
18270 if eval "test \"\${ol_cv_db_db_43+set}\" = set"; then
18271   echo $ac_n "(cached) $ac_c" 1>&6
18272 else
18273   
18274         ol_DB_LIB=-ldb-43
18275         ol_LIBS=$LIBS
18276         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18277
18278         cat > conftest.$ac_ext <<EOF
18279 #line 18280 "configure"
18280 #include "confdefs.h"
18281
18282 #ifdef HAVE_DB_185_H
18283 # include <db_185.h>
18284 #else
18285 # include <db.h>
18286 #endif
18287
18288 #ifndef DB_VERSION_MAJOR
18289 # define DB_VERSION_MAJOR 1
18290 #endif
18291
18292 #ifndef NULL
18293 #define NULL ((void*)0)
18294 #endif
18295
18296 int main() {
18297
18298 #if DB_VERSION_MAJOR > 1
18299         {
18300                 char *version;
18301                 int major, minor, patch;
18302
18303                 version = db_version( &major, &minor, &patch );
18304
18305                 if( major != DB_VERSION_MAJOR ||
18306                         minor < DB_VERSION_MINOR )
18307                 {
18308                         printf("Berkeley DB version mismatch\n"
18309                                 "\theader: %s\n\tlibrary: %s\n",
18310                                 DB_VERSION_STRING, version);
18311                         return 1;
18312                 }
18313         }
18314 #endif
18315
18316 #if DB_VERSION_MAJOR > 2
18317         db_env_create( NULL, 0 );
18318 #elif DB_VERSION_MAJOR > 1
18319         db_appexit( NULL );
18320 #else
18321         (void) dbopen( NULL, 0, 0, 0, NULL);
18322 #endif
18323
18324 ; return 0; }
18325 EOF
18326 if { (eval echo configure:18327: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18327   rm -rf conftest*
18328   ol_cv_db_db_43=yes
18329 else
18330   echo "configure: failed program was:" >&5
18331   cat conftest.$ac_ext >&5
18332   rm -rf conftest*
18333   ol_cv_db_db_43=no
18334 fi
18335 rm -f conftest*
18336
18337         LIBS="$ol_LIBS"
18338
18339 fi
18340
18341 echo "$ac_t""$ol_cv_db_db_43" 1>&6
18342
18343         if test $ol_cv_db_db_43 = yes ; then
18344                 ol_cv_lib_db=-ldb-43
18345         fi
18346 fi
18347
18348 if test $ol_cv_lib_db = no ; then
18349         echo $ac_n "checking for Berkeley DB link (-ldb-4.3)""... $ac_c" 1>&6
18350 echo "configure:18351: checking for Berkeley DB link (-ldb-4.3)" >&5
18351 if eval "test \"\${ol_cv_db_db_4_dot_3+set}\" = set"; then
18352   echo $ac_n "(cached) $ac_c" 1>&6
18353 else
18354   
18355         ol_DB_LIB=-ldb-4.3
18356         ol_LIBS=$LIBS
18357         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18358
18359         cat > conftest.$ac_ext <<EOF
18360 #line 18361 "configure"
18361 #include "confdefs.h"
18362
18363 #ifdef HAVE_DB_185_H
18364 # include <db_185.h>
18365 #else
18366 # include <db.h>
18367 #endif
18368
18369 #ifndef DB_VERSION_MAJOR
18370 # define DB_VERSION_MAJOR 1
18371 #endif
18372
18373 #ifndef NULL
18374 #define NULL ((void*)0)
18375 #endif
18376
18377 int main() {
18378
18379 #if DB_VERSION_MAJOR > 1
18380         {
18381                 char *version;
18382                 int major, minor, patch;
18383
18384                 version = db_version( &major, &minor, &patch );
18385
18386                 if( major != DB_VERSION_MAJOR ||
18387                         minor < DB_VERSION_MINOR )
18388                 {
18389                         printf("Berkeley DB version mismatch\n"
18390                                 "\theader: %s\n\tlibrary: %s\n",
18391                                 DB_VERSION_STRING, version);
18392                         return 1;
18393                 }
18394         }
18395 #endif
18396
18397 #if DB_VERSION_MAJOR > 2
18398         db_env_create( NULL, 0 );
18399 #elif DB_VERSION_MAJOR > 1
18400         db_appexit( NULL );
18401 #else
18402         (void) dbopen( NULL, 0, 0, 0, NULL);
18403 #endif
18404
18405 ; return 0; }
18406 EOF
18407 if { (eval echo configure:18408: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18408   rm -rf conftest*
18409   ol_cv_db_db_4_dot_3=yes
18410 else
18411   echo "configure: failed program was:" >&5
18412   cat conftest.$ac_ext >&5
18413   rm -rf conftest*
18414   ol_cv_db_db_4_dot_3=no
18415 fi
18416 rm -f conftest*
18417
18418         LIBS="$ol_LIBS"
18419
18420 fi
18421
18422 echo "$ac_t""$ol_cv_db_db_4_dot_3" 1>&6
18423
18424         if test $ol_cv_db_db_4_dot_3 = yes ; then
18425                 ol_cv_lib_db=-ldb-4.3
18426         fi
18427 fi
18428
18429 if test $ol_cv_lib_db = no ; then
18430         echo $ac_n "checking for Berkeley DB link (-ldb-4-3)""... $ac_c" 1>&6
18431 echo "configure:18432: checking for Berkeley DB link (-ldb-4-3)" >&5
18432 if eval "test \"\${ol_cv_db_db_4_3+set}\" = set"; then
18433   echo $ac_n "(cached) $ac_c" 1>&6
18434 else
18435   
18436         ol_DB_LIB=-ldb-4-3
18437         ol_LIBS=$LIBS
18438         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18439
18440         cat > conftest.$ac_ext <<EOF
18441 #line 18442 "configure"
18442 #include "confdefs.h"
18443
18444 #ifdef HAVE_DB_185_H
18445 # include <db_185.h>
18446 #else
18447 # include <db.h>
18448 #endif
18449
18450 #ifndef DB_VERSION_MAJOR
18451 # define DB_VERSION_MAJOR 1
18452 #endif
18453
18454 #ifndef NULL
18455 #define NULL ((void*)0)
18456 #endif
18457
18458 int main() {
18459
18460 #if DB_VERSION_MAJOR > 1
18461         {
18462                 char *version;
18463                 int major, minor, patch;
18464
18465                 version = db_version( &major, &minor, &patch );
18466
18467                 if( major != DB_VERSION_MAJOR ||
18468                         minor < DB_VERSION_MINOR )
18469                 {
18470                         printf("Berkeley DB version mismatch\n"
18471                                 "\theader: %s\n\tlibrary: %s\n",
18472                                 DB_VERSION_STRING, version);
18473                         return 1;
18474                 }
18475         }
18476 #endif
18477
18478 #if DB_VERSION_MAJOR > 2
18479         db_env_create( NULL, 0 );
18480 #elif DB_VERSION_MAJOR > 1
18481         db_appexit( NULL );
18482 #else
18483         (void) dbopen( NULL, 0, 0, 0, NULL);
18484 #endif
18485
18486 ; return 0; }
18487 EOF
18488 if { (eval echo configure:18489: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18489   rm -rf conftest*
18490   ol_cv_db_db_4_3=yes
18491 else
18492   echo "configure: failed program was:" >&5
18493   cat conftest.$ac_ext >&5
18494   rm -rf conftest*
18495   ol_cv_db_db_4_3=no
18496 fi
18497 rm -f conftest*
18498
18499         LIBS="$ol_LIBS"
18500
18501 fi
18502
18503 echo "$ac_t""$ol_cv_db_db_4_3" 1>&6
18504
18505         if test $ol_cv_db_db_4_3 = yes ; then
18506                 ol_cv_lib_db=-ldb-4-3
18507         fi
18508 fi
18509
18510 if test $ol_cv_lib_db = no ; then
18511         echo $ac_n "checking for Berkeley DB link (-ldb42)""... $ac_c" 1>&6
18512 echo "configure:18513: checking for Berkeley DB link (-ldb42)" >&5
18513 if eval "test \"\${ol_cv_db_db42+set}\" = set"; then
18514   echo $ac_n "(cached) $ac_c" 1>&6
18515 else
18516   
18517         ol_DB_LIB=-ldb42
18518         ol_LIBS=$LIBS
18519         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18520
18521         cat > conftest.$ac_ext <<EOF
18522 #line 18523 "configure"
18523 #include "confdefs.h"
18524
18525 #ifdef HAVE_DB_185_H
18526 # include <db_185.h>
18527 #else
18528 # include <db.h>
18529 #endif
18530
18531 #ifndef DB_VERSION_MAJOR
18532 # define DB_VERSION_MAJOR 1
18533 #endif
18534
18535 #ifndef NULL
18536 #define NULL ((void*)0)
18537 #endif
18538
18539 int main() {
18540
18541 #if DB_VERSION_MAJOR > 1
18542         {
18543                 char *version;
18544                 int major, minor, patch;
18545
18546                 version = db_version( &major, &minor, &patch );
18547
18548                 if( major != DB_VERSION_MAJOR ||
18549                         minor < DB_VERSION_MINOR )
18550                 {
18551                         printf("Berkeley DB version mismatch\n"
18552                                 "\theader: %s\n\tlibrary: %s\n",
18553                                 DB_VERSION_STRING, version);
18554                         return 1;
18555                 }
18556         }
18557 #endif
18558
18559 #if DB_VERSION_MAJOR > 2
18560         db_env_create( NULL, 0 );
18561 #elif DB_VERSION_MAJOR > 1
18562         db_appexit( NULL );
18563 #else
18564         (void) dbopen( NULL, 0, 0, 0, NULL);
18565 #endif
18566
18567 ; return 0; }
18568 EOF
18569 if { (eval echo configure:18570: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18570   rm -rf conftest*
18571   ol_cv_db_db42=yes
18572 else
18573   echo "configure: failed program was:" >&5
18574   cat conftest.$ac_ext >&5
18575   rm -rf conftest*
18576   ol_cv_db_db42=no
18577 fi
18578 rm -f conftest*
18579
18580         LIBS="$ol_LIBS"
18581
18582 fi
18583
18584 echo "$ac_t""$ol_cv_db_db42" 1>&6
18585
18586         if test $ol_cv_db_db42 = yes ; then
18587                 ol_cv_lib_db=-ldb42
18588         fi
18589 fi
18590
18591 if test $ol_cv_lib_db = no ; then
18592         echo $ac_n "checking for Berkeley DB link (-ldb-42)""... $ac_c" 1>&6
18593 echo "configure:18594: checking for Berkeley DB link (-ldb-42)" >&5
18594 if eval "test \"\${ol_cv_db_db_42+set}\" = set"; then
18595   echo $ac_n "(cached) $ac_c" 1>&6
18596 else
18597   
18598         ol_DB_LIB=-ldb-42
18599         ol_LIBS=$LIBS
18600         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18601
18602         cat > conftest.$ac_ext <<EOF
18603 #line 18604 "configure"
18604 #include "confdefs.h"
18605
18606 #ifdef HAVE_DB_185_H
18607 # include <db_185.h>
18608 #else
18609 # include <db.h>
18610 #endif
18611
18612 #ifndef DB_VERSION_MAJOR
18613 # define DB_VERSION_MAJOR 1
18614 #endif
18615
18616 #ifndef NULL
18617 #define NULL ((void*)0)
18618 #endif
18619
18620 int main() {
18621
18622 #if DB_VERSION_MAJOR > 1
18623         {
18624                 char *version;
18625                 int major, minor, patch;
18626
18627                 version = db_version( &major, &minor, &patch );
18628
18629                 if( major != DB_VERSION_MAJOR ||
18630                         minor < DB_VERSION_MINOR )
18631                 {
18632                         printf("Berkeley DB version mismatch\n"
18633                                 "\theader: %s\n\tlibrary: %s\n",
18634                                 DB_VERSION_STRING, version);
18635                         return 1;
18636                 }
18637         }
18638 #endif
18639
18640 #if DB_VERSION_MAJOR > 2
18641         db_env_create( NULL, 0 );
18642 #elif DB_VERSION_MAJOR > 1
18643         db_appexit( NULL );
18644 #else
18645         (void) dbopen( NULL, 0, 0, 0, NULL);
18646 #endif
18647
18648 ; return 0; }
18649 EOF
18650 if { (eval echo configure:18651: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18651   rm -rf conftest*
18652   ol_cv_db_db_42=yes
18653 else
18654   echo "configure: failed program was:" >&5
18655   cat conftest.$ac_ext >&5
18656   rm -rf conftest*
18657   ol_cv_db_db_42=no
18658 fi
18659 rm -f conftest*
18660
18661         LIBS="$ol_LIBS"
18662
18663 fi
18664
18665 echo "$ac_t""$ol_cv_db_db_42" 1>&6
18666
18667         if test $ol_cv_db_db_42 = yes ; then
18668                 ol_cv_lib_db=-ldb-42
18669         fi
18670 fi
18671
18672 if test $ol_cv_lib_db = no ; then
18673         echo $ac_n "checking for Berkeley DB link (-ldb-4.2)""... $ac_c" 1>&6
18674 echo "configure:18675: checking for Berkeley DB link (-ldb-4.2)" >&5
18675 if eval "test \"\${ol_cv_db_db_4_dot_2+set}\" = set"; then
18676   echo $ac_n "(cached) $ac_c" 1>&6
18677 else
18678   
18679         ol_DB_LIB=-ldb-4.2
18680         ol_LIBS=$LIBS
18681         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18682
18683         cat > conftest.$ac_ext <<EOF
18684 #line 18685 "configure"
18685 #include "confdefs.h"
18686
18687 #ifdef HAVE_DB_185_H
18688 # include <db_185.h>
18689 #else
18690 # include <db.h>
18691 #endif
18692
18693 #ifndef DB_VERSION_MAJOR
18694 # define DB_VERSION_MAJOR 1
18695 #endif
18696
18697 #ifndef NULL
18698 #define NULL ((void*)0)
18699 #endif
18700
18701 int main() {
18702
18703 #if DB_VERSION_MAJOR > 1
18704         {
18705                 char *version;
18706                 int major, minor, patch;
18707
18708                 version = db_version( &major, &minor, &patch );
18709
18710                 if( major != DB_VERSION_MAJOR ||
18711                         minor < DB_VERSION_MINOR )
18712                 {
18713                         printf("Berkeley DB version mismatch\n"
18714                                 "\theader: %s\n\tlibrary: %s\n",
18715                                 DB_VERSION_STRING, version);
18716                         return 1;
18717                 }
18718         }
18719 #endif
18720
18721 #if DB_VERSION_MAJOR > 2
18722         db_env_create( NULL, 0 );
18723 #elif DB_VERSION_MAJOR > 1
18724         db_appexit( NULL );
18725 #else
18726         (void) dbopen( NULL, 0, 0, 0, NULL);
18727 #endif
18728
18729 ; return 0; }
18730 EOF
18731 if { (eval echo configure:18732: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18732   rm -rf conftest*
18733   ol_cv_db_db_4_dot_2=yes
18734 else
18735   echo "configure: failed program was:" >&5
18736   cat conftest.$ac_ext >&5
18737   rm -rf conftest*
18738   ol_cv_db_db_4_dot_2=no
18739 fi
18740 rm -f conftest*
18741
18742         LIBS="$ol_LIBS"
18743
18744 fi
18745
18746 echo "$ac_t""$ol_cv_db_db_4_dot_2" 1>&6
18747
18748         if test $ol_cv_db_db_4_dot_2 = yes ; then
18749                 ol_cv_lib_db=-ldb-4.2
18750         fi
18751 fi
18752
18753 if test $ol_cv_lib_db = no ; then
18754         echo $ac_n "checking for Berkeley DB link (-ldb-4-2)""... $ac_c" 1>&6
18755 echo "configure:18756: checking for Berkeley DB link (-ldb-4-2)" >&5
18756 if eval "test \"\${ol_cv_db_db_4_2+set}\" = set"; then
18757   echo $ac_n "(cached) $ac_c" 1>&6
18758 else
18759   
18760         ol_DB_LIB=-ldb-4-2
18761         ol_LIBS=$LIBS
18762         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18763
18764         cat > conftest.$ac_ext <<EOF
18765 #line 18766 "configure"
18766 #include "confdefs.h"
18767
18768 #ifdef HAVE_DB_185_H
18769 # include <db_185.h>
18770 #else
18771 # include <db.h>
18772 #endif
18773
18774 #ifndef DB_VERSION_MAJOR
18775 # define DB_VERSION_MAJOR 1
18776 #endif
18777
18778 #ifndef NULL
18779 #define NULL ((void*)0)
18780 #endif
18781
18782 int main() {
18783
18784 #if DB_VERSION_MAJOR > 1
18785         {
18786                 char *version;
18787                 int major, minor, patch;
18788
18789                 version = db_version( &major, &minor, &patch );
18790
18791                 if( major != DB_VERSION_MAJOR ||
18792                         minor < DB_VERSION_MINOR )
18793                 {
18794                         printf("Berkeley DB version mismatch\n"
18795                                 "\theader: %s\n\tlibrary: %s\n",
18796                                 DB_VERSION_STRING, version);
18797                         return 1;
18798                 }
18799         }
18800 #endif
18801
18802 #if DB_VERSION_MAJOR > 2
18803         db_env_create( NULL, 0 );
18804 #elif DB_VERSION_MAJOR > 1
18805         db_appexit( NULL );
18806 #else
18807         (void) dbopen( NULL, 0, 0, 0, NULL);
18808 #endif
18809
18810 ; return 0; }
18811 EOF
18812 if { (eval echo configure:18813: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18813   rm -rf conftest*
18814   ol_cv_db_db_4_2=yes
18815 else
18816   echo "configure: failed program was:" >&5
18817   cat conftest.$ac_ext >&5
18818   rm -rf conftest*
18819   ol_cv_db_db_4_2=no
18820 fi
18821 rm -f conftest*
18822
18823         LIBS="$ol_LIBS"
18824
18825 fi
18826
18827 echo "$ac_t""$ol_cv_db_db_4_2" 1>&6
18828
18829         if test $ol_cv_db_db_4_2 = yes ; then
18830                 ol_cv_lib_db=-ldb-4-2
18831         fi
18832 fi
18833
18834 if test $ol_cv_lib_db = no ; then
18835         echo $ac_n "checking for Berkeley DB link (-ldb-4)""... $ac_c" 1>&6
18836 echo "configure:18837: checking for Berkeley DB link (-ldb-4)" >&5
18837 if eval "test \"\${ol_cv_db_db_4+set}\" = set"; then
18838   echo $ac_n "(cached) $ac_c" 1>&6
18839 else
18840   
18841         ol_DB_LIB=-ldb-4
18842         ol_LIBS=$LIBS
18843         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18844
18845         cat > conftest.$ac_ext <<EOF
18846 #line 18847 "configure"
18847 #include "confdefs.h"
18848
18849 #ifdef HAVE_DB_185_H
18850 # include <db_185.h>
18851 #else
18852 # include <db.h>
18853 #endif
18854
18855 #ifndef DB_VERSION_MAJOR
18856 # define DB_VERSION_MAJOR 1
18857 #endif
18858
18859 #ifndef NULL
18860 #define NULL ((void*)0)
18861 #endif
18862
18863 int main() {
18864
18865 #if DB_VERSION_MAJOR > 1
18866         {
18867                 char *version;
18868                 int major, minor, patch;
18869
18870                 version = db_version( &major, &minor, &patch );
18871
18872                 if( major != DB_VERSION_MAJOR ||
18873                         minor < DB_VERSION_MINOR )
18874                 {
18875                         printf("Berkeley DB version mismatch\n"
18876                                 "\theader: %s\n\tlibrary: %s\n",
18877                                 DB_VERSION_STRING, version);
18878                         return 1;
18879                 }
18880         }
18881 #endif
18882
18883 #if DB_VERSION_MAJOR > 2
18884         db_env_create( NULL, 0 );
18885 #elif DB_VERSION_MAJOR > 1
18886         db_appexit( NULL );
18887 #else
18888         (void) dbopen( NULL, 0, 0, 0, NULL);
18889 #endif
18890
18891 ; return 0; }
18892 EOF
18893 if { (eval echo configure:18894: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18894   rm -rf conftest*
18895   ol_cv_db_db_4=yes
18896 else
18897   echo "configure: failed program was:" >&5
18898   cat conftest.$ac_ext >&5
18899   rm -rf conftest*
18900   ol_cv_db_db_4=no
18901 fi
18902 rm -f conftest*
18903
18904         LIBS="$ol_LIBS"
18905
18906 fi
18907
18908 echo "$ac_t""$ol_cv_db_db_4" 1>&6
18909
18910         if test $ol_cv_db_db_4 = yes ; then
18911                 ol_cv_lib_db=-ldb-4
18912         fi
18913 fi
18914
18915 if test $ol_cv_lib_db = no ; then
18916         echo $ac_n "checking for Berkeley DB link (-ldb4)""... $ac_c" 1>&6
18917 echo "configure:18918: checking for Berkeley DB link (-ldb4)" >&5
18918 if eval "test \"\${ol_cv_db_db4+set}\" = set"; then
18919   echo $ac_n "(cached) $ac_c" 1>&6
18920 else
18921   
18922         ol_DB_LIB=-ldb4
18923         ol_LIBS=$LIBS
18924         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18925
18926         cat > conftest.$ac_ext <<EOF
18927 #line 18928 "configure"
18928 #include "confdefs.h"
18929
18930 #ifdef HAVE_DB_185_H
18931 # include <db_185.h>
18932 #else
18933 # include <db.h>
18934 #endif
18935
18936 #ifndef DB_VERSION_MAJOR
18937 # define DB_VERSION_MAJOR 1
18938 #endif
18939
18940 #ifndef NULL
18941 #define NULL ((void*)0)
18942 #endif
18943
18944 int main() {
18945
18946 #if DB_VERSION_MAJOR > 1
18947         {
18948                 char *version;
18949                 int major, minor, patch;
18950
18951                 version = db_version( &major, &minor, &patch );
18952
18953                 if( major != DB_VERSION_MAJOR ||
18954                         minor < DB_VERSION_MINOR )
18955                 {
18956                         printf("Berkeley DB version mismatch\n"
18957                                 "\theader: %s\n\tlibrary: %s\n",
18958                                 DB_VERSION_STRING, version);
18959                         return 1;
18960                 }
18961         }
18962 #endif
18963
18964 #if DB_VERSION_MAJOR > 2
18965         db_env_create( NULL, 0 );
18966 #elif DB_VERSION_MAJOR > 1
18967         db_appexit( NULL );
18968 #else
18969         (void) dbopen( NULL, 0, 0, 0, NULL);
18970 #endif
18971
18972 ; return 0; }
18973 EOF
18974 if { (eval echo configure:18975: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18975   rm -rf conftest*
18976   ol_cv_db_db4=yes
18977 else
18978   echo "configure: failed program was:" >&5
18979   cat conftest.$ac_ext >&5
18980   rm -rf conftest*
18981   ol_cv_db_db4=no
18982 fi
18983 rm -f conftest*
18984
18985         LIBS="$ol_LIBS"
18986
18987 fi
18988
18989 echo "$ac_t""$ol_cv_db_db4" 1>&6
18990
18991         if test $ol_cv_db_db4 = yes ; then
18992                 ol_cv_lib_db=-ldb4
18993         fi
18994 fi
18995
18996 if test $ol_cv_lib_db = no ; then
18997         echo $ac_n "checking for Berkeley DB link (-ldb)""... $ac_c" 1>&6
18998 echo "configure:18999: checking for Berkeley DB link (-ldb)" >&5
18999 if eval "test \"\${ol_cv_db_db+set}\" = set"; then
19000   echo $ac_n "(cached) $ac_c" 1>&6
19001 else
19002   
19003         ol_DB_LIB=-ldb
19004         ol_LIBS=$LIBS
19005         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19006
19007         cat > conftest.$ac_ext <<EOF
19008 #line 19009 "configure"
19009 #include "confdefs.h"
19010
19011 #ifdef HAVE_DB_185_H
19012 # include <db_185.h>
19013 #else
19014 # include <db.h>
19015 #endif
19016
19017 #ifndef DB_VERSION_MAJOR
19018 # define DB_VERSION_MAJOR 1
19019 #endif
19020
19021 #ifndef NULL
19022 #define NULL ((void*)0)
19023 #endif
19024
19025 int main() {
19026
19027 #if DB_VERSION_MAJOR > 1
19028         {
19029                 char *version;
19030                 int major, minor, patch;
19031
19032                 version = db_version( &major, &minor, &patch );
19033
19034                 if( major != DB_VERSION_MAJOR ||
19035                         minor < DB_VERSION_MINOR )
19036                 {
19037                         printf("Berkeley DB version mismatch\n"
19038                                 "\theader: %s\n\tlibrary: %s\n",
19039                                 DB_VERSION_STRING, version);
19040                         return 1;
19041                 }
19042         }
19043 #endif
19044
19045 #if DB_VERSION_MAJOR > 2
19046         db_env_create( NULL, 0 );
19047 #elif DB_VERSION_MAJOR > 1
19048         db_appexit( NULL );
19049 #else
19050         (void) dbopen( NULL, 0, 0, 0, NULL);
19051 #endif
19052
19053 ; return 0; }
19054 EOF
19055 if { (eval echo configure:19056: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19056   rm -rf conftest*
19057   ol_cv_db_db=yes
19058 else
19059   echo "configure: failed program was:" >&5
19060   cat conftest.$ac_ext >&5
19061   rm -rf conftest*
19062   ol_cv_db_db=no
19063 fi
19064 rm -f conftest*
19065
19066         LIBS="$ol_LIBS"
19067
19068 fi
19069
19070 echo "$ac_t""$ol_cv_db_db" 1>&6
19071
19072         if test $ol_cv_db_db = yes ; then
19073                 ol_cv_lib_db=-ldb
19074         fi
19075 fi
19076
19077 if test $ol_cv_lib_db = no ; then
19078         echo $ac_n "checking for Berkeley DB link (-ldb41)""... $ac_c" 1>&6
19079 echo "configure:19080: checking for Berkeley DB link (-ldb41)" >&5
19080 if eval "test \"\${ol_cv_db_db41+set}\" = set"; then
19081   echo $ac_n "(cached) $ac_c" 1>&6
19082 else
19083   
19084         ol_DB_LIB=-ldb41
19085         ol_LIBS=$LIBS
19086         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19087
19088         cat > conftest.$ac_ext <<EOF
19089 #line 19090 "configure"
19090 #include "confdefs.h"
19091
19092 #ifdef HAVE_DB_185_H
19093 # include <db_185.h>
19094 #else
19095 # include <db.h>
19096 #endif
19097
19098 #ifndef DB_VERSION_MAJOR
19099 # define DB_VERSION_MAJOR 1
19100 #endif
19101
19102 #ifndef NULL
19103 #define NULL ((void*)0)
19104 #endif
19105
19106 int main() {
19107
19108 #if DB_VERSION_MAJOR > 1
19109         {
19110                 char *version;
19111                 int major, minor, patch;
19112
19113                 version = db_version( &major, &minor, &patch );
19114
19115                 if( major != DB_VERSION_MAJOR ||
19116                         minor < DB_VERSION_MINOR )
19117                 {
19118                         printf("Berkeley DB version mismatch\n"
19119                                 "\theader: %s\n\tlibrary: %s\n",
19120                                 DB_VERSION_STRING, version);
19121                         return 1;
19122                 }
19123         }
19124 #endif
19125
19126 #if DB_VERSION_MAJOR > 2
19127         db_env_create( NULL, 0 );
19128 #elif DB_VERSION_MAJOR > 1
19129         db_appexit( NULL );
19130 #else
19131         (void) dbopen( NULL, 0, 0, 0, NULL);
19132 #endif
19133
19134 ; return 0; }
19135 EOF
19136 if { (eval echo configure:19137: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19137   rm -rf conftest*
19138   ol_cv_db_db41=yes
19139 else
19140   echo "configure: failed program was:" >&5
19141   cat conftest.$ac_ext >&5
19142   rm -rf conftest*
19143   ol_cv_db_db41=no
19144 fi
19145 rm -f conftest*
19146
19147         LIBS="$ol_LIBS"
19148
19149 fi
19150
19151 echo "$ac_t""$ol_cv_db_db41" 1>&6
19152
19153         if test $ol_cv_db_db41 = yes ; then
19154                 ol_cv_lib_db=-ldb41
19155         fi
19156 fi
19157
19158 if test $ol_cv_lib_db = no ; then
19159         echo $ac_n "checking for Berkeley DB link (-ldb-41)""... $ac_c" 1>&6
19160 echo "configure:19161: checking for Berkeley DB link (-ldb-41)" >&5
19161 if eval "test \"\${ol_cv_db_db_41+set}\" = set"; then
19162   echo $ac_n "(cached) $ac_c" 1>&6
19163 else
19164   
19165         ol_DB_LIB=-ldb-41
19166         ol_LIBS=$LIBS
19167         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19168
19169         cat > conftest.$ac_ext <<EOF
19170 #line 19171 "configure"
19171 #include "confdefs.h"
19172
19173 #ifdef HAVE_DB_185_H
19174 # include <db_185.h>
19175 #else
19176 # include <db.h>
19177 #endif
19178
19179 #ifndef DB_VERSION_MAJOR
19180 # define DB_VERSION_MAJOR 1
19181 #endif
19182
19183 #ifndef NULL
19184 #define NULL ((void*)0)
19185 #endif
19186
19187 int main() {
19188
19189 #if DB_VERSION_MAJOR > 1
19190         {
19191                 char *version;
19192                 int major, minor, patch;
19193
19194                 version = db_version( &major, &minor, &patch );
19195
19196                 if( major != DB_VERSION_MAJOR ||
19197                         minor < DB_VERSION_MINOR )
19198                 {
19199                         printf("Berkeley DB version mismatch\n"
19200                                 "\theader: %s\n\tlibrary: %s\n",
19201                                 DB_VERSION_STRING, version);
19202                         return 1;
19203                 }
19204         }
19205 #endif
19206
19207 #if DB_VERSION_MAJOR > 2
19208         db_env_create( NULL, 0 );
19209 #elif DB_VERSION_MAJOR > 1
19210         db_appexit( NULL );
19211 #else
19212         (void) dbopen( NULL, 0, 0, 0, NULL);
19213 #endif
19214
19215 ; return 0; }
19216 EOF
19217 if { (eval echo configure:19218: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19218   rm -rf conftest*
19219   ol_cv_db_db_41=yes
19220 else
19221   echo "configure: failed program was:" >&5
19222   cat conftest.$ac_ext >&5
19223   rm -rf conftest*
19224   ol_cv_db_db_41=no
19225 fi
19226 rm -f conftest*
19227
19228         LIBS="$ol_LIBS"
19229
19230 fi
19231
19232 echo "$ac_t""$ol_cv_db_db_41" 1>&6
19233
19234         if test $ol_cv_db_db_41 = yes ; then
19235                 ol_cv_lib_db=-ldb-41
19236         fi
19237 fi
19238
19239 if test $ol_cv_lib_db = no ; then
19240         echo $ac_n "checking for Berkeley DB link (-ldb-4.1)""... $ac_c" 1>&6
19241 echo "configure:19242: checking for Berkeley DB link (-ldb-4.1)" >&5
19242 if eval "test \"\${ol_cv_db_db_4_dot_1+set}\" = set"; then
19243   echo $ac_n "(cached) $ac_c" 1>&6
19244 else
19245   
19246         ol_DB_LIB=-ldb-4.1
19247         ol_LIBS=$LIBS
19248         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19249
19250         cat > conftest.$ac_ext <<EOF
19251 #line 19252 "configure"
19252 #include "confdefs.h"
19253
19254 #ifdef HAVE_DB_185_H
19255 # include <db_185.h>
19256 #else
19257 # include <db.h>
19258 #endif
19259
19260 #ifndef DB_VERSION_MAJOR
19261 # define DB_VERSION_MAJOR 1
19262 #endif
19263
19264 #ifndef NULL
19265 #define NULL ((void*)0)
19266 #endif
19267
19268 int main() {
19269
19270 #if DB_VERSION_MAJOR > 1
19271         {
19272                 char *version;
19273                 int major, minor, patch;
19274
19275                 version = db_version( &major, &minor, &patch );
19276
19277                 if( major != DB_VERSION_MAJOR ||
19278                         minor < DB_VERSION_MINOR )
19279                 {
19280                         printf("Berkeley DB version mismatch\n"
19281                                 "\theader: %s\n\tlibrary: %s\n",
19282                                 DB_VERSION_STRING, version);
19283                         return 1;
19284                 }
19285         }
19286 #endif
19287
19288 #if DB_VERSION_MAJOR > 2
19289         db_env_create( NULL, 0 );
19290 #elif DB_VERSION_MAJOR > 1
19291         db_appexit( NULL );
19292 #else
19293         (void) dbopen( NULL, 0, 0, 0, NULL);
19294 #endif
19295
19296 ; return 0; }
19297 EOF
19298 if { (eval echo configure:19299: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19299   rm -rf conftest*
19300   ol_cv_db_db_4_dot_1=yes
19301 else
19302   echo "configure: failed program was:" >&5
19303   cat conftest.$ac_ext >&5
19304   rm -rf conftest*
19305   ol_cv_db_db_4_dot_1=no
19306 fi
19307 rm -f conftest*
19308
19309         LIBS="$ol_LIBS"
19310
19311 fi
19312
19313 echo "$ac_t""$ol_cv_db_db_4_dot_1" 1>&6
19314
19315         if test $ol_cv_db_db_4_dot_1 = yes ; then
19316                 ol_cv_lib_db=-ldb-4.1
19317         fi
19318 fi
19319
19320 if test $ol_cv_lib_db = no ; then
19321         echo $ac_n "checking for Berkeley DB link (-ldb-4-1)""... $ac_c" 1>&6
19322 echo "configure:19323: checking for Berkeley DB link (-ldb-4-1)" >&5
19323 if eval "test \"\${ol_cv_db_db_4_1+set}\" = set"; then
19324   echo $ac_n "(cached) $ac_c" 1>&6
19325 else
19326   
19327         ol_DB_LIB=-ldb-4-1
19328         ol_LIBS=$LIBS
19329         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19330
19331         cat > conftest.$ac_ext <<EOF
19332 #line 19333 "configure"
19333 #include "confdefs.h"
19334
19335 #ifdef HAVE_DB_185_H
19336 # include <db_185.h>
19337 #else
19338 # include <db.h>
19339 #endif
19340
19341 #ifndef DB_VERSION_MAJOR
19342 # define DB_VERSION_MAJOR 1
19343 #endif
19344
19345 #ifndef NULL
19346 #define NULL ((void*)0)
19347 #endif
19348
19349 int main() {
19350
19351 #if DB_VERSION_MAJOR > 1
19352         {
19353                 char *version;
19354                 int major, minor, patch;
19355
19356                 version = db_version( &major, &minor, &patch );
19357
19358                 if( major != DB_VERSION_MAJOR ||
19359                         minor < DB_VERSION_MINOR )
19360                 {
19361                         printf("Berkeley DB version mismatch\n"
19362                                 "\theader: %s\n\tlibrary: %s\n",
19363                                 DB_VERSION_STRING, version);
19364                         return 1;
19365                 }
19366         }
19367 #endif
19368
19369 #if DB_VERSION_MAJOR > 2
19370         db_env_create( NULL, 0 );
19371 #elif DB_VERSION_MAJOR > 1
19372         db_appexit( NULL );
19373 #else
19374         (void) dbopen( NULL, 0, 0, 0, NULL);
19375 #endif
19376
19377 ; return 0; }
19378 EOF
19379 if { (eval echo configure:19380: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19380   rm -rf conftest*
19381   ol_cv_db_db_4_1=yes
19382 else
19383   echo "configure: failed program was:" >&5
19384   cat conftest.$ac_ext >&5
19385   rm -rf conftest*
19386   ol_cv_db_db_4_1=no
19387 fi
19388 rm -f conftest*
19389
19390         LIBS="$ol_LIBS"
19391
19392 fi
19393
19394 echo "$ac_t""$ol_cv_db_db_4_1" 1>&6
19395
19396         if test $ol_cv_db_db_4_1 = yes ; then
19397                 ol_cv_lib_db=-ldb-4-1
19398         fi
19399 fi
19400
19401 if test $ol_cv_lib_db = no ; then
19402         echo $ac_n "checking for Berkeley DB link (-ldb3)""... $ac_c" 1>&6
19403 echo "configure:19404: checking for Berkeley DB link (-ldb3)" >&5
19404 if eval "test \"\${ol_cv_db_db3+set}\" = set"; then
19405   echo $ac_n "(cached) $ac_c" 1>&6
19406 else
19407   
19408         ol_DB_LIB=-ldb3
19409         ol_LIBS=$LIBS
19410         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19411
19412         cat > conftest.$ac_ext <<EOF
19413 #line 19414 "configure"
19414 #include "confdefs.h"
19415
19416 #ifdef HAVE_DB_185_H
19417 # include <db_185.h>
19418 #else
19419 # include <db.h>
19420 #endif
19421
19422 #ifndef DB_VERSION_MAJOR
19423 # define DB_VERSION_MAJOR 1
19424 #endif
19425
19426 #ifndef NULL
19427 #define NULL ((void*)0)
19428 #endif
19429
19430 int main() {
19431
19432 #if DB_VERSION_MAJOR > 1
19433         {
19434                 char *version;
19435                 int major, minor, patch;
19436
19437                 version = db_version( &major, &minor, &patch );
19438
19439                 if( major != DB_VERSION_MAJOR ||
19440                         minor < DB_VERSION_MINOR )
19441                 {
19442                         printf("Berkeley DB version mismatch\n"
19443                                 "\theader: %s\n\tlibrary: %s\n",
19444                                 DB_VERSION_STRING, version);
19445                         return 1;
19446                 }
19447         }
19448 #endif
19449
19450 #if DB_VERSION_MAJOR > 2
19451         db_env_create( NULL, 0 );
19452 #elif DB_VERSION_MAJOR > 1
19453         db_appexit( NULL );
19454 #else
19455         (void) dbopen( NULL, 0, 0, 0, NULL);
19456 #endif
19457
19458 ; return 0; }
19459 EOF
19460 if { (eval echo configure:19461: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19461   rm -rf conftest*
19462   ol_cv_db_db3=yes
19463 else
19464   echo "configure: failed program was:" >&5
19465   cat conftest.$ac_ext >&5
19466   rm -rf conftest*
19467   ol_cv_db_db3=no
19468 fi
19469 rm -f conftest*
19470
19471         LIBS="$ol_LIBS"
19472
19473 fi
19474
19475 echo "$ac_t""$ol_cv_db_db3" 1>&6
19476
19477         if test $ol_cv_db_db3 = yes ; then
19478                 ol_cv_lib_db=-ldb3
19479         fi
19480 fi
19481
19482 if test $ol_cv_lib_db = no ; then
19483         echo $ac_n "checking for Berkeley DB link (-ldb-3)""... $ac_c" 1>&6
19484 echo "configure:19485: checking for Berkeley DB link (-ldb-3)" >&5
19485 if eval "test \"\${ol_cv_db_db_3+set}\" = set"; then
19486   echo $ac_n "(cached) $ac_c" 1>&6
19487 else
19488   
19489         ol_DB_LIB=-ldb-3
19490         ol_LIBS=$LIBS
19491         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19492
19493         cat > conftest.$ac_ext <<EOF
19494 #line 19495 "configure"
19495 #include "confdefs.h"
19496
19497 #ifdef HAVE_DB_185_H
19498 # include <db_185.h>
19499 #else
19500 # include <db.h>
19501 #endif
19502
19503 #ifndef DB_VERSION_MAJOR
19504 # define DB_VERSION_MAJOR 1
19505 #endif
19506
19507 #ifndef NULL
19508 #define NULL ((void*)0)
19509 #endif
19510
19511 int main() {
19512
19513 #if DB_VERSION_MAJOR > 1
19514         {
19515                 char *version;
19516                 int major, minor, patch;
19517
19518                 version = db_version( &major, &minor, &patch );
19519
19520                 if( major != DB_VERSION_MAJOR ||
19521                         minor < DB_VERSION_MINOR )
19522                 {
19523                         printf("Berkeley DB version mismatch\n"
19524                                 "\theader: %s\n\tlibrary: %s\n",
19525                                 DB_VERSION_STRING, version);
19526                         return 1;
19527                 }
19528         }
19529 #endif
19530
19531 #if DB_VERSION_MAJOR > 2
19532         db_env_create( NULL, 0 );
19533 #elif DB_VERSION_MAJOR > 1
19534         db_appexit( NULL );
19535 #else
19536         (void) dbopen( NULL, 0, 0, 0, NULL);
19537 #endif
19538
19539 ; return 0; }
19540 EOF
19541 if { (eval echo configure:19542: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19542   rm -rf conftest*
19543   ol_cv_db_db_3=yes
19544 else
19545   echo "configure: failed program was:" >&5
19546   cat conftest.$ac_ext >&5
19547   rm -rf conftest*
19548   ol_cv_db_db_3=no
19549 fi
19550 rm -f conftest*
19551
19552         LIBS="$ol_LIBS"
19553
19554 fi
19555
19556 echo "$ac_t""$ol_cv_db_db_3" 1>&6
19557
19558         if test $ol_cv_db_db_3 = yes ; then
19559                 ol_cv_lib_db=-ldb-3
19560         fi
19561 fi
19562
19563 if test $ol_cv_lib_db = no ; then
19564         echo $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6
19565 echo "configure:19566: checking for Berkeley DB link (-ldb2)" >&5
19566 if eval "test \"\${ol_cv_db_db2+set}\" = set"; then
19567   echo $ac_n "(cached) $ac_c" 1>&6
19568 else
19569   
19570         ol_DB_LIB=-ldb2
19571         ol_LIBS=$LIBS
19572         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19573
19574         cat > conftest.$ac_ext <<EOF
19575 #line 19576 "configure"
19576 #include "confdefs.h"
19577
19578 #ifdef HAVE_DB_185_H
19579 # include <db_185.h>
19580 #else
19581 # include <db.h>
19582 #endif
19583
19584 #ifndef DB_VERSION_MAJOR
19585 # define DB_VERSION_MAJOR 1
19586 #endif
19587
19588 #ifndef NULL
19589 #define NULL ((void*)0)
19590 #endif
19591
19592 int main() {
19593
19594 #if DB_VERSION_MAJOR > 1
19595         {
19596                 char *version;
19597                 int major, minor, patch;
19598
19599                 version = db_version( &major, &minor, &patch );
19600
19601                 if( major != DB_VERSION_MAJOR ||
19602                         minor < DB_VERSION_MINOR )
19603                 {
19604                         printf("Berkeley DB version mismatch\n"
19605                                 "\theader: %s\n\tlibrary: %s\n",
19606                                 DB_VERSION_STRING, version);
19607                         return 1;
19608                 }
19609         }
19610 #endif
19611
19612 #if DB_VERSION_MAJOR > 2
19613         db_env_create( NULL, 0 );
19614 #elif DB_VERSION_MAJOR > 1
19615         db_appexit( NULL );
19616 #else
19617         (void) dbopen( NULL, 0, 0, 0, NULL);
19618 #endif
19619
19620 ; return 0; }
19621 EOF
19622 if { (eval echo configure:19623: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19623   rm -rf conftest*
19624   ol_cv_db_db2=yes
19625 else
19626   echo "configure: failed program was:" >&5
19627   cat conftest.$ac_ext >&5
19628   rm -rf conftest*
19629   ol_cv_db_db2=no
19630 fi
19631 rm -f conftest*
19632
19633         LIBS="$ol_LIBS"
19634
19635 fi
19636
19637 echo "$ac_t""$ol_cv_db_db2" 1>&6
19638
19639         if test $ol_cv_db_db2 = yes ; then
19640                 ol_cv_lib_db=-ldb2
19641         fi
19642 fi
19643
19644 if test $ol_cv_lib_db = no ; then
19645         echo $ac_n "checking for Berkeley DB link (-ldb-2)""... $ac_c" 1>&6
19646 echo "configure:19647: checking for Berkeley DB link (-ldb-2)" >&5
19647 if eval "test \"\${ol_cv_db_db_2+set}\" = set"; then
19648   echo $ac_n "(cached) $ac_c" 1>&6
19649 else
19650   
19651         ol_DB_LIB=-ldb-2
19652         ol_LIBS=$LIBS
19653         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19654
19655         cat > conftest.$ac_ext <<EOF
19656 #line 19657 "configure"
19657 #include "confdefs.h"
19658
19659 #ifdef HAVE_DB_185_H
19660 # include <db_185.h>
19661 #else
19662 # include <db.h>
19663 #endif
19664
19665 #ifndef DB_VERSION_MAJOR
19666 # define DB_VERSION_MAJOR 1
19667 #endif
19668
19669 #ifndef NULL
19670 #define NULL ((void*)0)
19671 #endif
19672
19673 int main() {
19674
19675 #if DB_VERSION_MAJOR > 1
19676         {
19677                 char *version;
19678                 int major, minor, patch;
19679
19680                 version = db_version( &major, &minor, &patch );
19681
19682                 if( major != DB_VERSION_MAJOR ||
19683                         minor < DB_VERSION_MINOR )
19684                 {
19685                         printf("Berkeley DB version mismatch\n"
19686                                 "\theader: %s\n\tlibrary: %s\n",
19687                                 DB_VERSION_STRING, version);
19688                         return 1;
19689                 }
19690         }
19691 #endif
19692
19693 #if DB_VERSION_MAJOR > 2
19694         db_env_create( NULL, 0 );
19695 #elif DB_VERSION_MAJOR > 1
19696         db_appexit( NULL );
19697 #else
19698         (void) dbopen( NULL, 0, 0, 0, NULL);
19699 #endif
19700
19701 ; return 0; }
19702 EOF
19703 if { (eval echo configure:19704: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19704   rm -rf conftest*
19705   ol_cv_db_db_2=yes
19706 else
19707   echo "configure: failed program was:" >&5
19708   cat conftest.$ac_ext >&5
19709   rm -rf conftest*
19710   ol_cv_db_db_2=no
19711 fi
19712 rm -f conftest*
19713
19714         LIBS="$ol_LIBS"
19715
19716 fi
19717
19718 echo "$ac_t""$ol_cv_db_db_2" 1>&6
19719
19720         if test $ol_cv_db_db_2 = yes ; then
19721                 ol_cv_lib_db=-ldb-2
19722         fi
19723 fi
19724
19725 if test $ol_cv_lib_db = no ; then
19726         echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6
19727 echo "configure:19728: checking for Berkeley DB link (-ldb1)" >&5
19728 if eval "test \"\${ol_cv_db_db1+set}\" = set"; then
19729   echo $ac_n "(cached) $ac_c" 1>&6
19730 else
19731   
19732         ol_DB_LIB=-ldb1
19733         ol_LIBS=$LIBS
19734         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19735
19736         cat > conftest.$ac_ext <<EOF
19737 #line 19738 "configure"
19738 #include "confdefs.h"
19739
19740 #ifdef HAVE_DB_185_H
19741 # include <db_185.h>
19742 #else
19743 # include <db.h>
19744 #endif
19745
19746 #ifndef DB_VERSION_MAJOR
19747 # define DB_VERSION_MAJOR 1
19748 #endif
19749
19750 #ifndef NULL
19751 #define NULL ((void*)0)
19752 #endif
19753
19754 int main() {
19755
19756 #if DB_VERSION_MAJOR > 1
19757         {
19758                 char *version;
19759                 int major, minor, patch;
19760
19761                 version = db_version( &major, &minor, &patch );
19762
19763                 if( major != DB_VERSION_MAJOR ||
19764                         minor < DB_VERSION_MINOR )
19765                 {
19766                         printf("Berkeley DB version mismatch\n"
19767                                 "\theader: %s\n\tlibrary: %s\n",
19768                                 DB_VERSION_STRING, version);
19769                         return 1;
19770                 }
19771         }
19772 #endif
19773
19774 #if DB_VERSION_MAJOR > 2
19775         db_env_create( NULL, 0 );
19776 #elif DB_VERSION_MAJOR > 1
19777         db_appexit( NULL );
19778 #else
19779         (void) dbopen( NULL, 0, 0, 0, NULL);
19780 #endif
19781
19782 ; return 0; }
19783 EOF
19784 if { (eval echo configure:19785: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19785   rm -rf conftest*
19786   ol_cv_db_db1=yes
19787 else
19788   echo "configure: failed program was:" >&5
19789   cat conftest.$ac_ext >&5
19790   rm -rf conftest*
19791   ol_cv_db_db1=no
19792 fi
19793 rm -f conftest*
19794
19795         LIBS="$ol_LIBS"
19796
19797 fi
19798
19799 echo "$ac_t""$ol_cv_db_db1" 1>&6
19800
19801         if test $ol_cv_db_db1 = yes ; then
19802                 ol_cv_lib_db=-ldb1
19803         fi
19804 fi
19805
19806 if test $ol_cv_lib_db = no ; then
19807         echo $ac_n "checking for Berkeley DB link (-ldb-1)""... $ac_c" 1>&6
19808 echo "configure:19809: checking for Berkeley DB link (-ldb-1)" >&5
19809 if eval "test \"\${ol_cv_db_db_1+set}\" = set"; then
19810   echo $ac_n "(cached) $ac_c" 1>&6
19811 else
19812   
19813         ol_DB_LIB=-ldb-1
19814         ol_LIBS=$LIBS
19815         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19816
19817         cat > conftest.$ac_ext <<EOF
19818 #line 19819 "configure"
19819 #include "confdefs.h"
19820
19821 #ifdef HAVE_DB_185_H
19822 # include <db_185.h>
19823 #else
19824 # include <db.h>
19825 #endif
19826
19827 #ifndef DB_VERSION_MAJOR
19828 # define DB_VERSION_MAJOR 1
19829 #endif
19830
19831 #ifndef NULL
19832 #define NULL ((void*)0)
19833 #endif
19834
19835 int main() {
19836
19837 #if DB_VERSION_MAJOR > 1
19838         {
19839                 char *version;
19840                 int major, minor, patch;
19841
19842                 version = db_version( &major, &minor, &patch );
19843
19844                 if( major != DB_VERSION_MAJOR ||
19845                         minor < DB_VERSION_MINOR )
19846                 {
19847                         printf("Berkeley DB version mismatch\n"
19848                                 "\theader: %s\n\tlibrary: %s\n",
19849                                 DB_VERSION_STRING, version);
19850                         return 1;
19851                 }
19852         }
19853 #endif
19854
19855 #if DB_VERSION_MAJOR > 2
19856         db_env_create( NULL, 0 );
19857 #elif DB_VERSION_MAJOR > 1
19858         db_appexit( NULL );
19859 #else
19860         (void) dbopen( NULL, 0, 0, 0, NULL);
19861 #endif
19862
19863 ; return 0; }
19864 EOF
19865 if { (eval echo configure:19866: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19866   rm -rf conftest*
19867   ol_cv_db_db_1=yes
19868 else
19869   echo "configure: failed program was:" >&5
19870   cat conftest.$ac_ext >&5
19871   rm -rf conftest*
19872   ol_cv_db_db_1=no
19873 fi
19874 rm -f conftest*
19875
19876         LIBS="$ol_LIBS"
19877
19878 fi
19879
19880 echo "$ac_t""$ol_cv_db_db_1" 1>&6
19881
19882         if test $ol_cv_db_db_1 = yes ; then
19883                 ol_cv_lib_db=-ldb-1
19884         fi
19885 fi
19886
19887
19888         if test "$ol_cv_lib_db" != no ; then
19889                 ol_cv_berkeley_db=yes
19890                 echo $ac_n "checking for Berkeley DB version match""... $ac_c" 1>&6
19891 echo "configure:19892: checking for Berkeley DB version match" >&5
19892 if eval "test \"\${ol_cv_berkeley_db_version+set}\" = set"; then
19893   echo $ac_n "(cached) $ac_c" 1>&6
19894 else
19895   
19896         ol_LIBS="$LIBS"
19897         LIBS="$LTHREAD_LIBS $LIBS"
19898         if test $ol_cv_lib_db != yes ; then
19899                 LIBS="$ol_cv_lib_db $LIBS"
19900         fi
19901
19902         if test "$cross_compiling" = yes; then
19903   ol_cv_berkeley_db_version=cross
19904 else
19905   cat > conftest.$ac_ext <<EOF
19906 #line 19907 "configure"
19907 #include "confdefs.h"
19908
19909 #ifdef HAVE_DB_185_H
19910         choke me;
19911 #else
19912 #include <db.h>
19913 #endif
19914 #ifndef DB_VERSION_MAJOR
19915 # define DB_VERSION_MAJOR 1
19916 #endif
19917 #ifndef NULL
19918 #define NULL ((void *)0)
19919 #endif
19920 main()
19921 {
19922 #if DB_VERSION_MAJOR > 1
19923         char *version;
19924         int major, minor, patch;
19925
19926         version = db_version( &major, &minor, &patch );
19927
19928         if( major != DB_VERSION_MAJOR || minor < DB_VERSION_MINOR ) {
19929                 printf("Berkeley DB version mismatch\n"
19930                         "\theader: %s\n\tlibrary: %s\n",
19931                         DB_VERSION_STRING, version);
19932                 return 1;
19933         }
19934 #endif
19935
19936         return 0;
19937 }
19938 EOF
19939 if { (eval echo configure:19940: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
19940 then
19941   ol_cv_berkeley_db_version=yes
19942 else
19943   echo "configure: failed program was:" >&5
19944   cat conftest.$ac_ext >&5
19945   rm -fr conftest*
19946   ol_cv_berkeley_db_version=no
19947 fi
19948 rm -fr conftest*
19949 fi
19950
19951
19952         LIBS="$ol_LIBS"
19953
19954 fi
19955
19956 echo "$ac_t""$ol_cv_berkeley_db_version" 1>&6
19957
19958         if test $ol_cv_berkeley_db_version = no ; then
19959                 { echo "configure: error: Berkeley DB version mismatch" 1>&2; exit 1; }
19960         fi
19961
19962                 echo $ac_n "checking for Berkeley DB thread support""... $ac_c" 1>&6
19963 echo "configure:19964: checking for Berkeley DB thread support" >&5
19964 if eval "test \"\${ol_cv_berkeley_db_thread+set}\" = set"; then
19965   echo $ac_n "(cached) $ac_c" 1>&6
19966 else
19967   
19968         ol_LIBS="$LIBS"
19969         LIBS="$LTHREAD_LIBS $LIBS"
19970         if test $ol_cv_lib_db != yes ; then
19971                 LIBS="$ol_cv_lib_db $LIBS"
19972         fi
19973
19974         if test "$cross_compiling" = yes; then
19975   ol_cv_berkeley_db_thread=cross
19976 else
19977   cat > conftest.$ac_ext <<EOF
19978 #line 19979 "configure"
19979 #include "confdefs.h"
19980
19981 #ifdef HAVE_DB_185_H
19982         choke me;
19983 #else
19984 #include <db.h>
19985 #endif
19986 #ifndef NULL
19987 #define NULL ((void *)0)
19988 #endif
19989 main()
19990 {
19991         int rc;
19992         u_int32_t flags = DB_CREATE |
19993 #ifdef DB_PRIVATE
19994                 DB_PRIVATE |
19995 #endif
19996                 DB_THREAD;
19997
19998 #if DB_VERSION_MAJOR > 2
19999         DB_ENV *env = NULL;
20000
20001         rc = db_env_create( &env, 0 );
20002
20003         flags |= DB_INIT_MPOOL;
20004 #ifdef DB_MPOOL_PRIVATE
20005         flags |= DB_MPOOL_PRIVATE;
20006 #endif
20007
20008         if( rc ) {
20009                 printf("BerkeleyDB: %s\n", db_strerror(rc) );
20010                 return rc;
20011         }
20012
20013 #if (DB_VERSION_MAJOR > 3) || (DB_VERSION_MINOR >= 1)
20014         rc = env->open( env, NULL, flags, 0 );
20015 #else
20016         rc = env->open( env, NULL, NULL, flags, 0 );
20017 #endif
20018
20019         if ( rc == 0 ) {
20020                 rc = env->close( env, 0 );
20021         }
20022
20023         if( rc ) {
20024                 printf("BerkeleyDB: %s\n", db_strerror(rc) );
20025                 return rc;
20026         }
20027
20028 #else
20029         DB_ENV env;
20030         memset( &env, '\0', sizeof(env) );
20031
20032         rc = db_appinit( NULL, NULL, &env, flags );
20033
20034         if( rc == 0 ) {
20035                 db_appexit( &env );
20036         }
20037
20038         unlink("__db_mpool.share");
20039         unlink("__db_lock.share");
20040 #endif
20041
20042         return rc;
20043 }
20044 EOF
20045 if { (eval echo configure:20046: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
20046 then
20047   ol_cv_berkeley_db_thread=yes
20048 else
20049   echo "configure: failed program was:" >&5
20050   cat conftest.$ac_ext >&5
20051   rm -fr conftest*
20052   ol_cv_berkeley_db_thread=no
20053 fi
20054 rm -fr conftest*
20055 fi
20056
20057
20058         LIBS="$ol_LIBS"
20059
20060 fi
20061
20062 echo "$ac_t""$ol_cv_berkeley_db_thread" 1>&6
20063
20064         if test $ol_cv_berkeley_db_thread != no ; then
20065                 cat >> confdefs.h <<\EOF
20066 #define HAVE_BERKELEY_DB_THREAD 1
20067 EOF
20068
20069         fi
20070
20071         fi
20072 fi
20073
20074         fi
20075
20076         if test $ol_cv_berkeley_db != no ; then
20077                 cat >> confdefs.h <<\EOF
20078 #define HAVE_BERKELEY_DB 1
20079 EOF
20080
20081
20082                 ol_link_ldbm=berkeley
20083                 ol_with_ldbm_api=berkeley
20084
20085                 if test $ol_with_ldbm_type = hash ; then
20086                         cat >> confdefs.h <<\EOF
20087 #define LDBM_USE_DBHASH 1
20088 EOF
20089
20090                 else
20091                         cat >> confdefs.h <<\EOF
20092 #define LDBM_USE_DBBTREE 1
20093 EOF
20094
20095                 fi
20096
20097                                                 if test $ol_cv_lib_db != yes ; then
20098                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db"
20099                 fi
20100         fi
20101 fi
20102
20103 if test $ol_enable_bdb = yes -a $ol_link_ldbm != berkeley ; then
20104         { echo "configure: error: BDB: BerkeleyDB not available" 1>&2; exit 1; }
20105 elif test $ol_enable_bdb != no -a $ol_link_ldbm = berkeley ; then
20106         echo $ac_n "checking Berkeley DB version for BDB backend""... $ac_c" 1>&6
20107 echo "configure:20108: checking Berkeley DB version for BDB backend" >&5
20108 if eval "test \"\${ol_cv_bdb_compat+set}\" = set"; then
20109   echo $ac_n "(cached) $ac_c" 1>&6
20110 else
20111   
20112         cat > conftest.$ac_ext <<EOF
20113 #line 20114 "configure"
20114 #include "confdefs.h"
20115
20116 #include <db.h>
20117
20118  /* this check could be improved */
20119 #ifndef DB_VERSION_MAJOR
20120 #       define DB_VERSION_MAJOR 1
20121 #endif
20122 #ifndef DB_VERSION_MINOR
20123 #       define DB_VERSION_MINOR 0
20124 #endif
20125
20126 /* require 4.2 or later */
20127 #if (DB_VERSION_MAJOR >= 4) && (DB_VERSION_MINOR >= 2)
20128         __db_version_compat
20129 #endif
20130         
20131 EOF
20132 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20133   egrep "__db_version_compat" >/dev/null 2>&1; then
20134   rm -rf conftest*
20135   ol_cv_bdb_compat=yes
20136 else
20137   rm -rf conftest*
20138   ol_cv_bdb_compat=no
20139 fi
20140 rm -f conftest*
20141
20142 fi
20143
20144 echo "$ac_t""$ol_cv_bdb_compat" 1>&6
20145
20146
20147         if test $ol_cv_bdb_compat = yes ; then
20148                 ol_enable_bdb=yes
20149         elif test $ol_enable_bdb = yes ; then
20150                 { echo "configure: error: BDB: BerkeleyDB version incompatible" 1>&2; exit 1; }
20151         else
20152                 ol_enable_bdb=no
20153         fi
20154 fi
20155 if test $ol_enable_hdb = yes -a $ol_link_ldbm != berkeley ; then
20156         { echo "configure: error: HDB: BerkeleyDB not available" 1>&2; exit 1; }
20157 fi
20158
20159 if test $ol_link_ldbm = no -a $ol_with_ldbm_type = btree ; then
20160         echo "configure: warning: Could not find LDBM with BTREE support" 1>&2
20161         ol_with_ldbm_api=none
20162 fi
20163
20164 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = mdbm ; then
20165         echo $ac_n "checking for MDBM library""... $ac_c" 1>&6
20166 echo "configure:20167: checking for MDBM library" >&5
20167 if eval "test \"\${ol_cv_lib_mdbm+set}\" = set"; then
20168   echo $ac_n "(cached) $ac_c" 1>&6
20169 else
20170         ol_LIBS="$LIBS"
20171         echo $ac_n "checking for mdbm_set_chain""... $ac_c" 1>&6
20172 echo "configure:20173: checking for mdbm_set_chain" >&5
20173 if eval "test \"\${ac_cv_func_mdbm_set_chain+set}\" = set"; then
20174   echo $ac_n "(cached) $ac_c" 1>&6
20175 else
20176   cat > conftest.$ac_ext <<EOF
20177 #line 20178 "configure"
20178 #include "confdefs.h"
20179 /* System header to define __stub macros and hopefully few prototypes,
20180     which can conflict with char mdbm_set_chain(); below.  */
20181 #include <assert.h>
20182 /* Override any gcc2 internal prototype to avoid an error.  */
20183 /* We use char because int might match the return type of a gcc2
20184     builtin and then its argument prototype would still apply.  */
20185 char mdbm_set_chain();
20186 char (*f)();
20187
20188 int main() {
20189
20190 /* The GNU C library defines this for functions which it implements
20191     to always fail with ENOSYS.  Some functions are actually named
20192     something starting with __ and the normal name is an alias.  */
20193 #if defined (__stub_mdbm_set_chain) || defined (__stub___mdbm_set_chain)
20194 choke me
20195 #else
20196 f = mdbm_set_chain;
20197 #endif
20198
20199 ; return 0; }
20200 EOF
20201 if { (eval echo configure:20202: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20202   rm -rf conftest*
20203   eval "ac_cv_func_mdbm_set_chain=yes"
20204 else
20205   echo "configure: failed program was:" >&5
20206   cat conftest.$ac_ext >&5
20207   rm -rf conftest*
20208   eval "ac_cv_func_mdbm_set_chain=no"
20209 fi
20210 rm -f conftest*
20211 fi
20212
20213 if eval "test \"`echo '$ac_cv_func_'mdbm_set_chain`\" = yes"; then
20214   echo "$ac_t""yes" 1>&6
20215   ol_cv_lib_mdbm=yes
20216 else
20217   echo "$ac_t""no" 1>&6
20218
20219                 echo $ac_n "checking for mdbm_set_chain in -lmdbm""... $ac_c" 1>&6
20220 echo "configure:20221: checking for mdbm_set_chain in -lmdbm" >&5
20221 ac_lib_var=`echo mdbm'_'mdbm_set_chain | sed 'y%./+-:%__p__%'`
20222 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20223   echo $ac_n "(cached) $ac_c" 1>&6
20224 else
20225   ac_save_LIBS="$LIBS"
20226 LIBS="-lmdbm  $LIBS"
20227 cat > conftest.$ac_ext <<EOF
20228 #line 20229 "configure"
20229 #include "confdefs.h"
20230 /* Override any gcc2 internal prototype to avoid an error.  */
20231 /* We use char because int might match the return type of a gcc2
20232     builtin and then its argument prototype would still apply.  */
20233 char mdbm_set_chain();
20234
20235 int main() {
20236 mdbm_set_chain()
20237 ; return 0; }
20238 EOF
20239 if { (eval echo configure:20240: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20240   rm -rf conftest*
20241   eval "ac_cv_lib_$ac_lib_var=yes"
20242 else
20243   echo "configure: failed program was:" >&5
20244   cat conftest.$ac_ext >&5
20245   rm -rf conftest*
20246   eval "ac_cv_lib_$ac_lib_var=no"
20247 fi
20248 rm -f conftest*
20249 LIBS="$ac_save_LIBS"
20250
20251 fi
20252 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20253   echo "$ac_t""yes" 1>&6
20254   ol_cv_lib_mdbm=-lmdbm
20255 else
20256   echo "$ac_t""no" 1>&6
20257 ol_cv_lib_mdbm=no
20258 fi
20259
20260         
20261 fi
20262
20263         LIBS="$ol_LIBS"
20264
20265 fi
20266
20267 echo "$ac_t""$ol_cv_lib_mdbm" 1>&6
20268
20269
20270  for ac_hdr in mdbm.h
20271 do
20272 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
20273 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
20274 echo "configure:20275: checking for $ac_hdr" >&5
20275 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
20276   echo $ac_n "(cached) $ac_c" 1>&6
20277 else
20278   cat > conftest.$ac_ext <<EOF
20279 #line 20280 "configure"
20280 #include "confdefs.h"
20281 #include <$ac_hdr>
20282 EOF
20283 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20284 { (eval echo configure:20285: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20285 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20286 if test -z "$ac_err"; then
20287   rm -rf conftest*
20288   eval "ac_cv_header_$ac_safe=yes"
20289 else
20290   echo "$ac_err" >&5
20291   echo "configure: failed program was:" >&5
20292   cat conftest.$ac_ext >&5
20293   rm -rf conftest*
20294   eval "ac_cv_header_$ac_safe=no"
20295 fi
20296 rm -f conftest*
20297 fi
20298 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
20299   echo "$ac_t""yes" 1>&6
20300     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
20301   cat >> confdefs.h <<EOF
20302 #define $ac_tr_hdr 1
20303 EOF
20304  
20305 else
20306   echo "$ac_t""no" 1>&6
20307 fi
20308 done
20309
20310  echo $ac_n "checking for db""... $ac_c" 1>&6
20311 echo "configure:20312: checking for db" >&5
20312 if eval "test \"\${ol_cv_mdbm+set}\" = set"; then
20313   echo $ac_n "(cached) $ac_c" 1>&6
20314 else
20315   
20316         if test $ol_cv_lib_mdbm = no -o $ac_cv_header_mdbm_h = no ; then
20317                 ol_cv_mdbm=no
20318         else
20319                 ol_cv_mdbm=yes
20320         fi
20321
20322 fi
20323
20324 echo "$ac_t""$ol_cv_mdbm" 1>&6
20325  if test $ol_cv_mdbm = yes ; then
20326         cat >> confdefs.h <<\EOF
20327 #define HAVE_MDBM 1
20328 EOF
20329
20330  fi
20331
20332
20333         if test $ol_cv_mdbm = yes ; then
20334                 ol_link_ldbm=mdbm
20335                 ol_with_ldbm_api=mdbm
20336                 if test $ol_cv_lib_mdbm != yes ; then
20337                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_mdbm"
20338                 fi
20339         fi
20340 fi
20341
20342 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = gdbm ; then
20343         echo $ac_n "checking for GDBM library""... $ac_c" 1>&6
20344 echo "configure:20345: checking for GDBM library" >&5
20345 if eval "test \"\${ol_cv_lib_gdbm+set}\" = set"; then
20346   echo $ac_n "(cached) $ac_c" 1>&6
20347 else
20348         ol_LIBS="$LIBS"
20349         echo $ac_n "checking for gdbm_open""... $ac_c" 1>&6
20350 echo "configure:20351: checking for gdbm_open" >&5
20351 if eval "test \"\${ac_cv_func_gdbm_open+set}\" = set"; then
20352   echo $ac_n "(cached) $ac_c" 1>&6
20353 else
20354   cat > conftest.$ac_ext <<EOF
20355 #line 20356 "configure"
20356 #include "confdefs.h"
20357 /* System header to define __stub macros and hopefully few prototypes,
20358     which can conflict with char gdbm_open(); below.  */
20359 #include <assert.h>
20360 /* Override any gcc2 internal prototype to avoid an error.  */
20361 /* We use char because int might match the return type of a gcc2
20362     builtin and then its argument prototype would still apply.  */
20363 char gdbm_open();
20364 char (*f)();
20365
20366 int main() {
20367
20368 /* The GNU C library defines this for functions which it implements
20369     to always fail with ENOSYS.  Some functions are actually named
20370     something starting with __ and the normal name is an alias.  */
20371 #if defined (__stub_gdbm_open) || defined (__stub___gdbm_open)
20372 choke me
20373 #else
20374 f = gdbm_open;
20375 #endif
20376
20377 ; return 0; }
20378 EOF
20379 if { (eval echo configure:20380: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20380   rm -rf conftest*
20381   eval "ac_cv_func_gdbm_open=yes"
20382 else
20383   echo "configure: failed program was:" >&5
20384   cat conftest.$ac_ext >&5
20385   rm -rf conftest*
20386   eval "ac_cv_func_gdbm_open=no"
20387 fi
20388 rm -f conftest*
20389 fi
20390
20391 if eval "test \"`echo '$ac_cv_func_'gdbm_open`\" = yes"; then
20392   echo "$ac_t""yes" 1>&6
20393   ol_cv_lib_gdbm=yes
20394 else
20395   echo "$ac_t""no" 1>&6
20396
20397                 echo $ac_n "checking for gdbm_open in -lgdbm""... $ac_c" 1>&6
20398 echo "configure:20399: checking for gdbm_open in -lgdbm" >&5
20399 ac_lib_var=`echo gdbm'_'gdbm_open | sed 'y%./+-:%__p__%'`
20400 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20401   echo $ac_n "(cached) $ac_c" 1>&6
20402 else
20403   ac_save_LIBS="$LIBS"
20404 LIBS="-lgdbm  $LIBS"
20405 cat > conftest.$ac_ext <<EOF
20406 #line 20407 "configure"
20407 #include "confdefs.h"
20408 /* Override any gcc2 internal prototype to avoid an error.  */
20409 /* We use char because int might match the return type of a gcc2
20410     builtin and then its argument prototype would still apply.  */
20411 char gdbm_open();
20412
20413 int main() {
20414 gdbm_open()
20415 ; return 0; }
20416 EOF
20417 if { (eval echo configure:20418: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20418   rm -rf conftest*
20419   eval "ac_cv_lib_$ac_lib_var=yes"
20420 else
20421   echo "configure: failed program was:" >&5
20422   cat conftest.$ac_ext >&5
20423   rm -rf conftest*
20424   eval "ac_cv_lib_$ac_lib_var=no"
20425 fi
20426 rm -f conftest*
20427 LIBS="$ac_save_LIBS"
20428
20429 fi
20430 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20431   echo "$ac_t""yes" 1>&6
20432   ol_cv_lib_gdbm=-lgdbm
20433 else
20434   echo "$ac_t""no" 1>&6
20435 ol_cv_lib_gdbm=no
20436 fi
20437
20438         
20439 fi
20440
20441         LIBS="$ol_LIBS"
20442
20443 fi
20444
20445 echo "$ac_t""$ol_cv_lib_gdbm" 1>&6
20446
20447
20448  for ac_hdr in gdbm.h
20449 do
20450 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
20451 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
20452 echo "configure:20453: checking for $ac_hdr" >&5
20453 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
20454   echo $ac_n "(cached) $ac_c" 1>&6
20455 else
20456   cat > conftest.$ac_ext <<EOF
20457 #line 20458 "configure"
20458 #include "confdefs.h"
20459 #include <$ac_hdr>
20460 EOF
20461 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20462 { (eval echo configure:20463: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20463 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20464 if test -z "$ac_err"; then
20465   rm -rf conftest*
20466   eval "ac_cv_header_$ac_safe=yes"
20467 else
20468   echo "$ac_err" >&5
20469   echo "configure: failed program was:" >&5
20470   cat conftest.$ac_ext >&5
20471   rm -rf conftest*
20472   eval "ac_cv_header_$ac_safe=no"
20473 fi
20474 rm -f conftest*
20475 fi
20476 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
20477   echo "$ac_t""yes" 1>&6
20478     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
20479   cat >> confdefs.h <<EOF
20480 #define $ac_tr_hdr 1
20481 EOF
20482  
20483 else
20484   echo "$ac_t""no" 1>&6
20485 fi
20486 done
20487
20488  echo $ac_n "checking for db""... $ac_c" 1>&6
20489 echo "configure:20490: checking for db" >&5
20490 if eval "test \"\${ol_cv_gdbm+set}\" = set"; then
20491   echo $ac_n "(cached) $ac_c" 1>&6
20492 else
20493   
20494         if test $ol_cv_lib_gdbm = no -o $ac_cv_header_gdbm_h = no ; then
20495                 ol_cv_gdbm=no
20496         else
20497                 ol_cv_gdbm=yes
20498         fi
20499
20500 fi
20501
20502 echo "$ac_t""$ol_cv_gdbm" 1>&6
20503  if test $ol_cv_gdbm = yes ; then
20504         cat >> confdefs.h <<\EOF
20505 #define HAVE_GDBM 1
20506 EOF
20507
20508  fi
20509
20510
20511         if test $ol_cv_gdbm = yes ; then
20512                 ol_link_ldbm=gdbm
20513                 ol_with_ldbm_api=gdbm
20514
20515                 if test $ol_cv_lib_gdbm != yes ; then
20516                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_gdbm"
20517                 fi
20518         fi
20519 fi
20520
20521 if test $ol_with_ldbm_api = ndbm ; then
20522         echo $ac_n "checking for NDBM library""... $ac_c" 1>&6
20523 echo "configure:20524: checking for NDBM library" >&5
20524 if eval "test \"\${ol_cv_lib_ndbm+set}\" = set"; then
20525   echo $ac_n "(cached) $ac_c" 1>&6
20526 else
20527         ol_LIBS="$LIBS"
20528         echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
20529 echo "configure:20530: checking for dbm_open" >&5
20530 if eval "test \"\${ac_cv_func_dbm_open+set}\" = set"; then
20531   echo $ac_n "(cached) $ac_c" 1>&6
20532 else
20533   cat > conftest.$ac_ext <<EOF
20534 #line 20535 "configure"
20535 #include "confdefs.h"
20536 /* System header to define __stub macros and hopefully few prototypes,
20537     which can conflict with char dbm_open(); below.  */
20538 #include <assert.h>
20539 /* Override any gcc2 internal prototype to avoid an error.  */
20540 /* We use char because int might match the return type of a gcc2
20541     builtin and then its argument prototype would still apply.  */
20542 char dbm_open();
20543 char (*f)();
20544
20545 int main() {
20546
20547 /* The GNU C library defines this for functions which it implements
20548     to always fail with ENOSYS.  Some functions are actually named
20549     something starting with __ and the normal name is an alias.  */
20550 #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
20551 choke me
20552 #else
20553 f = dbm_open;
20554 #endif
20555
20556 ; return 0; }
20557 EOF
20558 if { (eval echo configure:20559: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20559   rm -rf conftest*
20560   eval "ac_cv_func_dbm_open=yes"
20561 else
20562   echo "configure: failed program was:" >&5
20563   cat conftest.$ac_ext >&5
20564   rm -rf conftest*
20565   eval "ac_cv_func_dbm_open=no"
20566 fi
20567 rm -f conftest*
20568 fi
20569
20570 if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then
20571   echo "$ac_t""yes" 1>&6
20572   ol_cv_lib_ndbm=yes
20573 else
20574   echo "$ac_t""no" 1>&6
20575
20576                 echo $ac_n "checking for dbm_open in -lndbm""... $ac_c" 1>&6
20577 echo "configure:20578: checking for dbm_open in -lndbm" >&5
20578 ac_lib_var=`echo ndbm'_'dbm_open | sed 'y%./+-:%__p__%'`
20579 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20580   echo $ac_n "(cached) $ac_c" 1>&6
20581 else
20582   ac_save_LIBS="$LIBS"
20583 LIBS="-lndbm  $LIBS"
20584 cat > conftest.$ac_ext <<EOF
20585 #line 20586 "configure"
20586 #include "confdefs.h"
20587 /* Override any gcc2 internal prototype to avoid an error.  */
20588 /* We use char because int might match the return type of a gcc2
20589     builtin and then its argument prototype would still apply.  */
20590 char dbm_open();
20591
20592 int main() {
20593 dbm_open()
20594 ; return 0; }
20595 EOF
20596 if { (eval echo configure:20597: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20597   rm -rf conftest*
20598   eval "ac_cv_lib_$ac_lib_var=yes"
20599 else
20600   echo "configure: failed program was:" >&5
20601   cat conftest.$ac_ext >&5
20602   rm -rf conftest*
20603   eval "ac_cv_lib_$ac_lib_var=no"
20604 fi
20605 rm -f conftest*
20606 LIBS="$ac_save_LIBS"
20607
20608 fi
20609 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20610   echo "$ac_t""yes" 1>&6
20611   ol_cv_lib_ndbm=-lndbm
20612 else
20613   echo "$ac_t""no" 1>&6
20614
20615                         echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
20616 echo "configure:20617: checking for dbm_open in -ldbm" >&5
20617 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-:%__p__%'`
20618 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20619   echo $ac_n "(cached) $ac_c" 1>&6
20620 else
20621   ac_save_LIBS="$LIBS"
20622 LIBS="-ldbm  $LIBS"
20623 cat > conftest.$ac_ext <<EOF
20624 #line 20625 "configure"
20625 #include "confdefs.h"
20626 /* Override any gcc2 internal prototype to avoid an error.  */
20627 /* We use char because int might match the return type of a gcc2
20628     builtin and then its argument prototype would still apply.  */
20629 char dbm_open();
20630
20631 int main() {
20632 dbm_open()
20633 ; return 0; }
20634 EOF
20635 if { (eval echo configure:20636: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20636   rm -rf conftest*
20637   eval "ac_cv_lib_$ac_lib_var=yes"
20638 else
20639   echo "configure: failed program was:" >&5
20640   cat conftest.$ac_ext >&5
20641   rm -rf conftest*
20642   eval "ac_cv_lib_$ac_lib_var=no"
20643 fi
20644 rm -f conftest*
20645 LIBS="$ac_save_LIBS"
20646
20647 fi
20648 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20649   echo "$ac_t""yes" 1>&6
20650   ol_cv_lib_ndbm=-ldbm
20651 else
20652   echo "$ac_t""no" 1>&6
20653 ol_cv_lib_ndbm=no
20654 fi
20655                 
20656 fi
20657
20658         
20659 fi
20660
20661         LIBS="$ol_LIBS"
20662
20663 fi
20664
20665 echo "$ac_t""$ol_cv_lib_ndbm" 1>&6
20666
20667
20668  for ac_hdr in ndbm.h
20669 do
20670 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
20671 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
20672 echo "configure:20673: checking for $ac_hdr" >&5
20673 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
20674   echo $ac_n "(cached) $ac_c" 1>&6
20675 else
20676   cat > conftest.$ac_ext <<EOF
20677 #line 20678 "configure"
20678 #include "confdefs.h"
20679 #include <$ac_hdr>
20680 EOF
20681 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20682 { (eval echo configure:20683: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20683 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20684 if test -z "$ac_err"; then
20685   rm -rf conftest*
20686   eval "ac_cv_header_$ac_safe=yes"
20687 else
20688   echo "$ac_err" >&5
20689   echo "configure: failed program was:" >&5
20690   cat conftest.$ac_ext >&5
20691   rm -rf conftest*
20692   eval "ac_cv_header_$ac_safe=no"
20693 fi
20694 rm -f conftest*
20695 fi
20696 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
20697   echo "$ac_t""yes" 1>&6
20698     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
20699   cat >> confdefs.h <<EOF
20700 #define $ac_tr_hdr 1
20701 EOF
20702  
20703 else
20704   echo "$ac_t""no" 1>&6
20705 fi
20706 done
20707
20708  echo $ac_n "checking for db""... $ac_c" 1>&6
20709 echo "configure:20710: checking for db" >&5
20710 if eval "test \"\${ol_cv_ndbm+set}\" = set"; then
20711   echo $ac_n "(cached) $ac_c" 1>&6
20712 else
20713   
20714         if test $ol_cv_lib_ndbm = no -o $ac_cv_header_ndbm_h = no ; then
20715                 ol_cv_ndbm=no
20716         else
20717                 ol_cv_ndbm=yes
20718         fi
20719
20720 fi
20721
20722 echo "$ac_t""$ol_cv_ndbm" 1>&6
20723  if test $ol_cv_ndbm = yes ; then
20724         cat >> confdefs.h <<\EOF
20725 #define HAVE_NDBM 1
20726 EOF
20727
20728  fi
20729
20730
20731         if test $ol_cv_ndbm = yes ; then
20732                 ol_link_ldbm=ndbm
20733                 ol_with_ldbm_api=ndbm
20734
20735                 if test $ol_cv_lib_ndbm != yes ; then
20736                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_ndbm"
20737                 fi
20738         fi
20739 fi
20740
20741 if test $ol_link_ldbm = no -a $ol_enable_ldbm != no ; then
20742         echo "configure: warning: could not find suitable LDBM backend" 1>&2
20743         if test $ol_enable_ldbm = yes ; then
20744                 { echo "configure: error: select appropriate LDBM options or disable" 1>&2; exit 1; }
20745         fi
20746
20747         echo "configure: warning: disabling LDBM" 1>&2
20748         ol_enable_ldbm=no
20749 fi
20750
20751 if test $ol_enable_bdb = yes -o \
20752         $ol_enable_hdb = yes -o \
20753         $ol_enable_ldbm = yes ; then
20754         SLAPD_LIBS="$SLAPD_LIBS \$(LDBM_LIBS)"
20755 fi
20756
20757
20758 if test $ol_enable_dynamic = yes -a $enable_shared = yes ; then
20759         BUILD_LIBS_DYNAMIC=shared
20760         cat >> confdefs.h <<\EOF
20761 #define LDAP_LIBS_DYNAMIC 1
20762 EOF
20763
20764         LTSTATIC=""
20765 else
20766         BUILD_LIBS_DYNAMIC=static
20767         LTSTATIC="-static"
20768 fi
20769
20770 if test $ol_enable_wrappers != no ; then
20771         for ac_hdr in tcpd.h
20772 do
20773 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
20774 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
20775 echo "configure:20776: checking for $ac_hdr" >&5
20776 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
20777   echo $ac_n "(cached) $ac_c" 1>&6
20778 else
20779   cat > conftest.$ac_ext <<EOF
20780 #line 20781 "configure"
20781 #include "confdefs.h"
20782 #include <$ac_hdr>
20783 EOF
20784 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20785 { (eval echo configure:20786: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20786 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20787 if test -z "$ac_err"; then
20788   rm -rf conftest*
20789   eval "ac_cv_header_$ac_safe=yes"
20790 else
20791   echo "$ac_err" >&5
20792   echo "configure: failed program was:" >&5
20793   cat conftest.$ac_ext >&5
20794   rm -rf conftest*
20795   eval "ac_cv_header_$ac_safe=no"
20796 fi
20797 rm -f conftest*
20798 fi
20799 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
20800   echo "$ac_t""yes" 1>&6
20801     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
20802   cat >> confdefs.h <<EOF
20803 #define $ac_tr_hdr 1
20804 EOF
20805  
20806                 echo $ac_n "checking for TCP wrappers library""... $ac_c" 1>&6
20807 echo "configure:20808: checking for TCP wrappers library" >&5
20808                 save_LIBS="$LIBS"
20809                 LIBS="$LIBS -lwrap"
20810                 cat > conftest.$ac_ext <<EOF
20811 #line 20812 "configure"
20812 #include "confdefs.h"
20813
20814 #include <tcpd.h>
20815 int allow_severity = 0;
20816 int deny_severity  = 0;
20817
20818 struct request_info *req;
20819                 
20820 int main() {
20821
20822 hosts_access(req)
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   echo "$ac_t""-lwrap" 1>&6
20829                 have_wrappers=yes
20830                 LIBS="$save_LIBS"
20831 else
20832   echo "configure: failed program was:" >&5
20833   cat conftest.$ac_ext >&5
20834   rm -rf conftest*
20835   
20836                                 LIBS="$LIBS -lnsl"
20837                 cat > conftest.$ac_ext <<EOF
20838 #line 20839 "configure"
20839 #include "confdefs.h"
20840
20841 #include <tcpd.h>
20842 int allow_severity = 0;
20843 int deny_severity  = 0;
20844
20845 struct request_info *req;
20846                 
20847 int main() {
20848
20849 hosts_access(req)
20850                 
20851 ; return 0; }
20852 EOF
20853 if { (eval echo configure:20854: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20854   rm -rf conftest*
20855   echo "$ac_t""-lwrap -lnsl" 1>&6
20856                 have_wrappers=yes
20857                 LIBS="$save_LIBS -lnsl"
20858 else
20859   echo "configure: failed program was:" >&5
20860   cat conftest.$ac_ext >&5
20861   rm -rf conftest*
20862   
20863                 echo "$ac_t""no" 1>&6
20864                 have_wrappers=no
20865                 LIBS=$save_LIBS
20866 fi
20867 rm -f conftest*
20868 fi
20869 rm -f conftest*
20870 else
20871   echo "$ac_t""no" 1>&6
20872 have_wrappers=no
20873 fi
20874 done
20875
20876
20877         if test $have_wrappers = yes ; then
20878                 cat >> confdefs.h <<\EOF
20879 #define HAVE_TCPD 1
20880 EOF
20881
20882                 WRAP_LIBS="-lwrap"
20883         elif test $ol_enable_wrappers = yes ; then
20884                 { echo "configure: error: could not find TCP wrappers, select apppropriate options or disable" 1>&2; exit 1; }
20885         else
20886                 echo "configure: warning: could not find TCP wrappers, support disabled" 1>&2
20887                 WRAP_LIBS=""
20888         fi
20889 fi
20890
20891 if test $ol_enable_syslog != no ; then
20892         echo $ac_n "checking for openlog""... $ac_c" 1>&6
20893 echo "configure:20894: checking for openlog" >&5
20894 if eval "test \"\${ac_cv_func_openlog+set}\" = set"; then
20895   echo $ac_n "(cached) $ac_c" 1>&6
20896 else
20897   cat > conftest.$ac_ext <<EOF
20898 #line 20899 "configure"
20899 #include "confdefs.h"
20900 /* System header to define __stub macros and hopefully few prototypes,
20901     which can conflict with char openlog(); below.  */
20902 #include <assert.h>
20903 /* Override any gcc2 internal prototype to avoid an error.  */
20904 /* We use char because int might match the return type of a gcc2
20905     builtin and then its argument prototype would still apply.  */
20906 char openlog();
20907 char (*f)();
20908
20909 int main() {
20910
20911 /* The GNU C library defines this for functions which it implements
20912     to always fail with ENOSYS.  Some functions are actually named
20913     something starting with __ and the normal name is an alias.  */
20914 #if defined (__stub_openlog) || defined (__stub___openlog)
20915 choke me
20916 #else
20917 f = openlog;
20918 #endif
20919
20920 ; return 0; }
20921 EOF
20922 if { (eval echo configure:20923: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20923   rm -rf conftest*
20924   eval "ac_cv_func_openlog=yes"
20925 else
20926   echo "configure: failed program was:" >&5
20927   cat conftest.$ac_ext >&5
20928   rm -rf conftest*
20929   eval "ac_cv_func_openlog=no"
20930 fi
20931 rm -f conftest*
20932 fi
20933
20934 if eval "test \"`echo '$ac_cv_func_'openlog`\" = yes"; then
20935   echo "$ac_t""yes" 1>&6
20936   :
20937 else
20938   echo "$ac_t""no" 1>&6
20939 fi
20940
20941         if test $ac_cv_func_openlog = no -a $ol_enable_syslog = yes; then
20942                 { echo "configure: error: could not find syslog" 1>&2; exit 1; }
20943         fi
20944         ol_enable_syslog=$ac_cv_func_openlog
20945 fi
20946
20947
20948 ol_link_sql=no
20949 if test $ol_enable_sql != no ; then
20950         for ac_hdr in sql.h sqlext.h
20951 do
20952 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
20953 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
20954 echo "configure:20955: checking for $ac_hdr" >&5
20955 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
20956   echo $ac_n "(cached) $ac_c" 1>&6
20957 else
20958   cat > conftest.$ac_ext <<EOF
20959 #line 20960 "configure"
20960 #include "confdefs.h"
20961 #include <$ac_hdr>
20962 EOF
20963 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20964 { (eval echo configure:20965: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20965 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20966 if test -z "$ac_err"; then
20967   rm -rf conftest*
20968   eval "ac_cv_header_$ac_safe=yes"
20969 else
20970   echo "$ac_err" >&5
20971   echo "configure: failed program was:" >&5
20972   cat conftest.$ac_ext >&5
20973   rm -rf conftest*
20974   eval "ac_cv_header_$ac_safe=no"
20975 fi
20976 rm -f conftest*
20977 fi
20978 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
20979   echo "$ac_t""yes" 1>&6
20980     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
20981   cat >> confdefs.h <<EOF
20982 #define $ac_tr_hdr 1
20983 EOF
20984  
20985 else
20986   echo "$ac_t""no" 1>&6
20987 { echo "configure: error: could not locate SQL headers" 1>&2; exit 1; }
20988         
20989 fi
20990 done
20991
20992
20993         echo $ac_n "checking for SQLDriverConnect in -liodbc""... $ac_c" 1>&6
20994 echo "configure:20995: checking for SQLDriverConnect in -liodbc" >&5
20995 ac_lib_var=`echo iodbc'_'SQLDriverConnect | sed 'y%./+-:%__p__%'`
20996 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20997   echo $ac_n "(cached) $ac_c" 1>&6
20998 else
20999   ac_save_LIBS="$LIBS"
21000 LIBS="-liodbc  $LIBS"
21001 cat > conftest.$ac_ext <<EOF
21002 #line 21003 "configure"
21003 #include "confdefs.h"
21004 /* Override any gcc2 internal prototype to avoid an error.  */
21005 /* We use char because int might match the return type of a gcc2
21006     builtin and then its argument prototype would still apply.  */
21007 char SQLDriverConnect();
21008
21009 int main() {
21010 SQLDriverConnect()
21011 ; return 0; }
21012 EOF
21013 if { (eval echo configure:21014: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21014   rm -rf conftest*
21015   eval "ac_cv_lib_$ac_lib_var=yes"
21016 else
21017   echo "configure: failed program was:" >&5
21018   cat conftest.$ac_ext >&5
21019   rm -rf conftest*
21020   eval "ac_cv_lib_$ac_lib_var=no"
21021 fi
21022 rm -f conftest*
21023 LIBS="$ac_save_LIBS"
21024
21025 fi
21026 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
21027   echo "$ac_t""yes" 1>&6
21028   have_iodbc=yes
21029 else
21030   echo "$ac_t""no" 1>&6
21031 have_iodbc=no
21032 fi
21033
21034         if test $have_iodbc = yes ; then
21035                 ol_link_sql="-liodbc"
21036         else
21037                 echo $ac_n "checking for SQLDriverConnect in -lodbc""... $ac_c" 1>&6
21038 echo "configure:21039: checking for SQLDriverConnect in -lodbc" >&5
21039 ac_lib_var=`echo odbc'_'SQLDriverConnect | sed 'y%./+-:%__p__%'`
21040 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
21041   echo $ac_n "(cached) $ac_c" 1>&6
21042 else
21043   ac_save_LIBS="$LIBS"
21044 LIBS="-lodbc  $LIBS"
21045 cat > conftest.$ac_ext <<EOF
21046 #line 21047 "configure"
21047 #include "confdefs.h"
21048 /* Override any gcc2 internal prototype to avoid an error.  */
21049 /* We use char because int might match the return type of a gcc2
21050     builtin and then its argument prototype would still apply.  */
21051 char SQLDriverConnect();
21052
21053 int main() {
21054 SQLDriverConnect()
21055 ; return 0; }
21056 EOF
21057 if { (eval echo configure:21058: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21058   rm -rf conftest*
21059   eval "ac_cv_lib_$ac_lib_var=yes"
21060 else
21061   echo "configure: failed program was:" >&5
21062   cat conftest.$ac_ext >&5
21063   rm -rf conftest*
21064   eval "ac_cv_lib_$ac_lib_var=no"
21065 fi
21066 rm -f conftest*
21067 LIBS="$ac_save_LIBS"
21068
21069 fi
21070 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
21071   echo "$ac_t""yes" 1>&6
21072   have_odbc=yes
21073 else
21074   echo "$ac_t""no" 1>&6
21075 have_odbc=no
21076 fi
21077
21078                 if test $have_odbc = yes ; then
21079                         ol_link_sql="-lodbc"
21080                 fi
21081         fi
21082
21083         if test $ol_link_sql != no ; then
21084                 SLAPD_SQL_LIBS="$ol_link_sql"
21085
21086         elif test $ol_enable_sql != auto ; then
21087                 { echo "configure: error: could not locate suitable ODBC library" 1>&2; exit 1; }
21088         fi
21089 fi
21090
21091 ol_link_sasl=no
21092 ol_link_spasswd=no
21093 if test $ol_with_cyrus_sasl != no ; then
21094         for ac_hdr in sasl/sasl.h sasl.h
21095 do
21096 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
21097 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
21098 echo "configure:21099: checking for $ac_hdr" >&5
21099 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
21100   echo $ac_n "(cached) $ac_c" 1>&6
21101 else
21102   cat > conftest.$ac_ext <<EOF
21103 #line 21104 "configure"
21104 #include "confdefs.h"
21105 #include <$ac_hdr>
21106 EOF
21107 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
21108 { (eval echo configure:21109: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
21109 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
21110 if test -z "$ac_err"; then
21111   rm -rf conftest*
21112   eval "ac_cv_header_$ac_safe=yes"
21113 else
21114   echo "$ac_err" >&5
21115   echo "configure: failed program was:" >&5
21116   cat conftest.$ac_ext >&5
21117   rm -rf conftest*
21118   eval "ac_cv_header_$ac_safe=no"
21119 fi
21120 rm -f conftest*
21121 fi
21122 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
21123   echo "$ac_t""yes" 1>&6
21124     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
21125   cat >> confdefs.h <<EOF
21126 #define $ac_tr_hdr 1
21127 EOF
21128  
21129 else
21130   echo "$ac_t""no" 1>&6
21131 fi
21132 done
21133
21134
21135         if test $ac_cv_header_sasl_sasl_h = yes -o $ac_cv_header_sasl_h = yes; then
21136                 echo $ac_n "checking for sasl_client_init in -lsasl2""... $ac_c" 1>&6
21137 echo "configure:21138: checking for sasl_client_init in -lsasl2" >&5
21138 ac_lib_var=`echo sasl2'_'sasl_client_init | sed 'y%./+-:%__p__%'`
21139 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
21140   echo $ac_n "(cached) $ac_c" 1>&6
21141 else
21142   ac_save_LIBS="$LIBS"
21143 LIBS="-lsasl2  $LIBS"
21144 cat > conftest.$ac_ext <<EOF
21145 #line 21146 "configure"
21146 #include "confdefs.h"
21147 /* Override any gcc2 internal prototype to avoid an error.  */
21148 /* We use char because int might match the return type of a gcc2
21149     builtin and then its argument prototype would still apply.  */
21150 char sasl_client_init();
21151
21152 int main() {
21153 sasl_client_init()
21154 ; return 0; }
21155 EOF
21156 if { (eval echo configure:21157: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21157   rm -rf conftest*
21158   eval "ac_cv_lib_$ac_lib_var=yes"
21159 else
21160   echo "configure: failed program was:" >&5
21161   cat conftest.$ac_ext >&5
21162   rm -rf conftest*
21163   eval "ac_cv_lib_$ac_lib_var=no"
21164 fi
21165 rm -f conftest*
21166 LIBS="$ac_save_LIBS"
21167
21168 fi
21169 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
21170   echo "$ac_t""yes" 1>&6
21171   ol_link_sasl="-lsasl2"
21172 else
21173   echo "$ac_t""no" 1>&6
21174 echo $ac_n "checking for sasl_client_init in -lsasl""... $ac_c" 1>&6
21175 echo "configure:21176: checking for sasl_client_init in -lsasl" >&5
21176 ac_lib_var=`echo sasl'_'sasl_client_init | sed 'y%./+-:%__p__%'`
21177 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
21178   echo $ac_n "(cached) $ac_c" 1>&6
21179 else
21180   ac_save_LIBS="$LIBS"
21181 LIBS="-lsasl  $LIBS"
21182 cat > conftest.$ac_ext <<EOF
21183 #line 21184 "configure"
21184 #include "confdefs.h"
21185 /* Override any gcc2 internal prototype to avoid an error.  */
21186 /* We use char because int might match the return type of a gcc2
21187     builtin and then its argument prototype would still apply.  */
21188 char sasl_client_init();
21189
21190 int main() {
21191 sasl_client_init()
21192 ; return 0; }
21193 EOF
21194 if { (eval echo configure:21195: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21195   rm -rf conftest*
21196   eval "ac_cv_lib_$ac_lib_var=yes"
21197 else
21198   echo "configure: failed program was:" >&5
21199   cat conftest.$ac_ext >&5
21200   rm -rf conftest*
21201   eval "ac_cv_lib_$ac_lib_var=no"
21202 fi
21203 rm -f conftest*
21204 LIBS="$ac_save_LIBS"
21205
21206 fi
21207 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
21208   echo "$ac_t""yes" 1>&6
21209   ol_link_sasl="-lsasl"
21210 else
21211   echo "$ac_t""no" 1>&6
21212 fi
21213
21214 fi
21215
21216         fi
21217
21218         if test $ol_link_sasl = no ; then
21219                 if test $ol_with_cyrus_sasl != auto ; then
21220                         { echo "configure: error: Could not locate Cyrus SASL" 1>&2; exit 1; }
21221                 else
21222                         echo "configure: warning: Could not locate Cyrus SASL" 1>&2
21223                         echo "configure: warning: SASL authentication not supported!" 1>&2
21224                         if test $ol_link_tls = no ; then
21225                                 echo "configure: warning: Strong authentication not supported!" 1>&2
21226                         fi
21227                 fi
21228         else
21229                 echo $ac_n "checking Cyrus SASL library version""... $ac_c" 1>&6
21230 echo "configure:21231: checking Cyrus SASL library version" >&5
21231 if eval "test \"\${ol_cv_sasl_compat+set}\" = set"; then
21232   echo $ac_n "(cached) $ac_c" 1>&6
21233 else
21234   
21235         cat > conftest.$ac_ext <<EOF
21236 #line 21237 "configure"
21237 #include "confdefs.h"
21238
21239 #ifdef HAVE_SASL_SASL_H
21240 #include <sasl/sasl.h>
21241 #else
21242 #include <sasl.h>
21243 #endif
21244
21245 /* Require 2.1.15+ */
21246 #if SASL_VERSION_MAJOR == 2  && SASL_VERSION_MINOR > 1
21247         char *__sasl_compat = "2.2+ or better okay (we guess)";
21248 #elif SASL_VERSION_MAJOR == 2  && SASL_VERSION_MINOR == 1 \
21249         && SASL_VERSION_STEP >=15
21250         char *__sasl_compat = "2.1.15+ or better okay";
21251 #endif
21252         
21253 EOF
21254 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21255   egrep "__sasl_compat" >/dev/null 2>&1; then
21256   rm -rf conftest*
21257   ol_cv_sasl_compat=yes
21258 else
21259   rm -rf conftest*
21260   ol_cv_sasl_compat=no
21261 fi
21262 rm -f conftest*
21263
21264 fi
21265
21266 echo "$ac_t""$ol_cv_sasl_compat" 1>&6
21267
21268                 if test $ol_cv_sasl_compat = no ; then
21269                         ol_link_sasl=no
21270                         { echo "configure: error: Cyrus SASL library located but is incompatible" 1>&2; exit 1; }
21271                 fi
21272
21273                 cat >> confdefs.h <<\EOF
21274 #define HAVE_CYRUS_SASL 1
21275 EOF
21276
21277                 SASL_LIBS="$ol_link_sasl"
21278                 if test $ol_enable_spasswd != no ; then
21279                         ol_link_spasswd=yes
21280                 fi
21281
21282                 ac_save_LIBS="$LIBS"
21283                 LIBS="$LIBS $ol_link_sasl"
21284                 echo $ac_n "checking for sasl_version""... $ac_c" 1>&6
21285 echo "configure:21286: checking for sasl_version" >&5
21286 if eval "test \"\${ac_cv_func_sasl_version+set}\" = set"; then
21287   echo $ac_n "(cached) $ac_c" 1>&6
21288 else
21289   cat > conftest.$ac_ext <<EOF
21290 #line 21291 "configure"
21291 #include "confdefs.h"
21292 /* System header to define __stub macros and hopefully few prototypes,
21293     which can conflict with char sasl_version(); below.  */
21294 #include <assert.h>
21295 /* Override any gcc2 internal prototype to avoid an error.  */
21296 /* We use char because int might match the return type of a gcc2
21297     builtin and then its argument prototype would still apply.  */
21298 char sasl_version();
21299 char (*f)();
21300
21301 int main() {
21302
21303 /* The GNU C library defines this for functions which it implements
21304     to always fail with ENOSYS.  Some functions are actually named
21305     something starting with __ and the normal name is an alias.  */
21306 #if defined (__stub_sasl_version) || defined (__stub___sasl_version)
21307 choke me
21308 #else
21309 f = sasl_version;
21310 #endif
21311
21312 ; return 0; }
21313 EOF
21314 if { (eval echo configure:21315: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21315   rm -rf conftest*
21316   eval "ac_cv_func_sasl_version=yes"
21317 else
21318   echo "configure: failed program was:" >&5
21319   cat conftest.$ac_ext >&5
21320   rm -rf conftest*
21321   eval "ac_cv_func_sasl_version=no"
21322 fi
21323 rm -f conftest*
21324 fi
21325
21326 if eval "test \"`echo '$ac_cv_func_'sasl_version`\" = yes"; then
21327   echo "$ac_t""yes" 1>&6
21328   cat >> confdefs.h <<\EOF
21329 #define HAVE_SASL_VERSION 1
21330 EOF
21331
21332 else
21333   echo "$ac_t""no" 1>&6
21334 fi
21335
21336                 LIBS="$ac_save_LIBS"
21337         fi
21338
21339 else
21340         echo "configure: warning: SASL authentication not supported!" 1>&2
21341         if test $ol_link_tls = no ; then
21342                 echo "configure: warning: Strong authentication not supported!" 1>&2
21343         fi
21344 fi
21345
21346 if test $cross_compiling != yes -a "$ac_cv_mingw32" != yes ; then
21347         dev=no
21348         if test -r /dev/urandom ; then
21349                 dev="/dev/urandom";
21350         elif test -r /idev/urandom ; then
21351                 dev="/idev/urandom";
21352         elif test -r /dev/srandom ; then
21353                 dev="/dev/srandom";
21354         elif test -r /dev/random ; then
21355                 dev="/dev/random";
21356         elif test -r /idev/random ; then
21357                 dev="/idev/random";
21358         fi
21359
21360         if test $dev != no ; then
21361                 cat >> confdefs.h <<EOF
21362 #define URANDOM_DEVICE "$dev"
21363 EOF
21364
21365         fi
21366 fi
21367
21368 ol_link_fetch=no
21369 if test $ol_with_fetch != no ; then
21370         ol_LIBS=$LIBS
21371 LIBS="-lfetch -lcom_err $LIBS"
21372 echo $ac_n "checking fetch(3) library""... $ac_c" 1>&6
21373 echo "configure:21374: checking fetch(3) library" >&5
21374 if eval "test \"\${ol_cv_lib_fetch+set}\" = set"; then
21375   echo $ac_n "(cached) $ac_c" 1>&6
21376 else
21377   
21378         cat > conftest.$ac_ext <<EOF
21379 #line 21380 "configure"
21380 #include "confdefs.h"
21381
21382 #include <sys/param.h>
21383 #include <stdio.h>
21384 #include <fetch.h>
21385 int main() {
21386 struct url *u = fetchParseURL("file:///"); 
21387 ; return 0; }
21388 EOF
21389 if { (eval echo configure:21390: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21390   rm -rf conftest*
21391   ol_cv_lib_fetch=yes
21392 else
21393   echo "configure: failed program was:" >&5
21394   cat conftest.$ac_ext >&5
21395   rm -rf conftest*
21396   ol_cv_lib_fetch=no
21397 fi
21398 rm -f conftest*
21399 fi
21400
21401 echo "$ac_t""$ol_cv_lib_fetch" 1>&6
21402 LIBS=$ol_LIBS
21403 if test $ol_cv_lib_fetch != no ; then
21404         ol_link_fetch="-lfetch -lcom_err"
21405         cat >> confdefs.h <<\EOF
21406 #define HAVE_FETCH 1
21407 EOF
21408
21409 fi
21410
21411
21412         if test $ol_cv_lib_fetch != no ; then
21413                 LUTIL_LIBS="$LUTIL_LIBS $ol_link_fetch"
21414                 ol_link_fetch=freebsd
21415
21416         elif test $ol_with_fetch != auto ; then
21417                 { echo "configure: error: no suitable API for --with-fetch=$ol_with_fetch" 1>&2; exit 1; }
21418         fi 
21419 fi
21420
21421 if test $ol_enable_crypt != no ; then
21422         save_LIBS="$LIBS"
21423         LIBS="$TLS_LIBS $LIBS"
21424
21425         echo $ac_n "checking for crypt""... $ac_c" 1>&6
21426 echo "configure:21427: checking for crypt" >&5
21427 if eval "test \"\${ac_cv_func_crypt+set}\" = set"; then
21428   echo $ac_n "(cached) $ac_c" 1>&6
21429 else
21430   cat > conftest.$ac_ext <<EOF
21431 #line 21432 "configure"
21432 #include "confdefs.h"
21433 /* System header to define __stub macros and hopefully few prototypes,
21434     which can conflict with char crypt(); below.  */
21435 #include <assert.h>
21436 /* Override any gcc2 internal prototype to avoid an error.  */
21437 /* We use char because int might match the return type of a gcc2
21438     builtin and then its argument prototype would still apply.  */
21439 char crypt();
21440 char (*f)();
21441
21442 int main() {
21443
21444 /* The GNU C library defines this for functions which it implements
21445     to always fail with ENOSYS.  Some functions are actually named
21446     something starting with __ and the normal name is an alias.  */
21447 #if defined (__stub_crypt) || defined (__stub___crypt)
21448 choke me
21449 #else
21450 f = crypt;
21451 #endif
21452
21453 ; return 0; }
21454 EOF
21455 if { (eval echo configure:21456: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21456   rm -rf conftest*
21457   eval "ac_cv_func_crypt=yes"
21458 else
21459   echo "configure: failed program was:" >&5
21460   cat conftest.$ac_ext >&5
21461   rm -rf conftest*
21462   eval "ac_cv_func_crypt=no"
21463 fi
21464 rm -f conftest*
21465 fi
21466
21467 if eval "test \"`echo '$ac_cv_func_'crypt`\" = yes"; then
21468   echo "$ac_t""yes" 1>&6
21469   have_crypt=yes
21470 else
21471   echo "$ac_t""no" 1>&6
21472
21473                 LIBS="$save_LIBS"
21474                 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
21475 echo "configure:21476: checking for crypt in -lcrypt" >&5
21476 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-:%__p__%'`
21477 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
21478   echo $ac_n "(cached) $ac_c" 1>&6
21479 else
21480   ac_save_LIBS="$LIBS"
21481 LIBS="-lcrypt  $LIBS"
21482 cat > conftest.$ac_ext <<EOF
21483 #line 21484 "configure"
21484 #include "confdefs.h"
21485 /* Override any gcc2 internal prototype to avoid an error.  */
21486 /* We use char because int might match the return type of a gcc2
21487     builtin and then its argument prototype would still apply.  */
21488 char crypt();
21489
21490 int main() {
21491 crypt()
21492 ; return 0; }
21493 EOF
21494 if { (eval echo configure:21495: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21495   rm -rf conftest*
21496   eval "ac_cv_lib_$ac_lib_var=yes"
21497 else
21498   echo "configure: failed program was:" >&5
21499   cat conftest.$ac_ext >&5
21500   rm -rf conftest*
21501   eval "ac_cv_lib_$ac_lib_var=no"
21502 fi
21503 rm -f conftest*
21504 LIBS="$ac_save_LIBS"
21505
21506 fi
21507 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
21508   echo "$ac_t""yes" 1>&6
21509   LUTIL_LIBS="$LUTIL_LIBS -lcrypt"
21510                         have_crypt=yes
21511 else
21512   echo "$ac_t""no" 1>&6
21513 have_crypt=no
21514 fi
21515
21516 fi
21517
21518
21519         LIBS="$save_LIBS"
21520
21521         if test $have_crypt = yes ; then
21522                 cat >> confdefs.h <<\EOF
21523 #define HAVE_CRYPT 1
21524 EOF
21525
21526         else
21527                 echo "configure: warning: could not find crypt" 1>&2
21528                 if test $ol_enable_crypt = yes ; then
21529                         { echo "configure: error: could not find crypt, select appropriate options or disable" 1>&2; exit 1; }
21530                 fi
21531
21532                 echo "configure: warning: disabling crypt support" 1>&2
21533                 ol_enable_crypt=no
21534         fi
21535 fi
21536
21537 if test $ol_enable_proctitle != no ; then
21538         echo $ac_n "checking for setproctitle""... $ac_c" 1>&6
21539 echo "configure:21540: checking for setproctitle" >&5
21540 if eval "test \"\${ac_cv_func_setproctitle+set}\" = set"; then
21541   echo $ac_n "(cached) $ac_c" 1>&6
21542 else
21543   cat > conftest.$ac_ext <<EOF
21544 #line 21545 "configure"
21545 #include "confdefs.h"
21546 /* System header to define __stub macros and hopefully few prototypes,
21547     which can conflict with char setproctitle(); below.  */
21548 #include <assert.h>
21549 /* Override any gcc2 internal prototype to avoid an error.  */
21550 /* We use char because int might match the return type of a gcc2
21551     builtin and then its argument prototype would still apply.  */
21552 char setproctitle();
21553 char (*f)();
21554
21555 int main() {
21556
21557 /* The GNU C library defines this for functions which it implements
21558     to always fail with ENOSYS.  Some functions are actually named
21559     something starting with __ and the normal name is an alias.  */
21560 #if defined (__stub_setproctitle) || defined (__stub___setproctitle)
21561 choke me
21562 #else
21563 f = setproctitle;
21564 #endif
21565
21566 ; return 0; }
21567 EOF
21568 if { (eval echo configure:21569: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21569   rm -rf conftest*
21570   eval "ac_cv_func_setproctitle=yes"
21571 else
21572   echo "configure: failed program was:" >&5
21573   cat conftest.$ac_ext >&5
21574   rm -rf conftest*
21575   eval "ac_cv_func_setproctitle=no"
21576 fi
21577 rm -f conftest*
21578 fi
21579
21580 if eval "test \"`echo '$ac_cv_func_'setproctitle`\" = yes"; then
21581   echo "$ac_t""yes" 1>&6
21582   have_setproctitle=yes
21583 else
21584   echo "$ac_t""no" 1>&6
21585
21586                 echo $ac_n "checking for setproctitle in -lutil""... $ac_c" 1>&6
21587 echo "configure:21588: checking for setproctitle in -lutil" >&5
21588 ac_lib_var=`echo util'_'setproctitle | sed 'y%./+-:%__p__%'`
21589 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
21590   echo $ac_n "(cached) $ac_c" 1>&6
21591 else
21592   ac_save_LIBS="$LIBS"
21593 LIBS="-lutil  $LIBS"
21594 cat > conftest.$ac_ext <<EOF
21595 #line 21596 "configure"
21596 #include "confdefs.h"
21597 /* Override any gcc2 internal prototype to avoid an error.  */
21598 /* We use char because int might match the return type of a gcc2
21599     builtin and then its argument prototype would still apply.  */
21600 char setproctitle();
21601
21602 int main() {
21603 setproctitle()
21604 ; return 0; }
21605 EOF
21606 if { (eval echo configure:21607: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21607   rm -rf conftest*
21608   eval "ac_cv_lib_$ac_lib_var=yes"
21609 else
21610   echo "configure: failed program was:" >&5
21611   cat conftest.$ac_ext >&5
21612   rm -rf conftest*
21613   eval "ac_cv_lib_$ac_lib_var=no"
21614 fi
21615 rm -f conftest*
21616 LIBS="$ac_save_LIBS"
21617
21618 fi
21619 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
21620   echo "$ac_t""yes" 1>&6
21621   have_setproctitle=yes
21622                         LUTIL_LIBS="$LUTIL_LIBS -lutil"
21623 else
21624   echo "$ac_t""no" 1>&6
21625 have_setproctitle=no
21626                         LIBOBJS="$LIBOBJS setproctitle.o"
21627                         LIBSRCS="$LIBSRCS setproctitle.c"
21628 fi
21629
21630 fi
21631
21632
21633         if test $have_setproctitle = yes ; then
21634                 cat >> confdefs.h <<\EOF
21635 #define HAVE_SETPROCTITLE 1
21636 EOF
21637
21638         fi
21639 fi
21640
21641 if test $ol_enable_slp != no ; then
21642         for ac_hdr in slp.h 
21643 do
21644 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
21645 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
21646 echo "configure:21647: checking for $ac_hdr" >&5
21647 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
21648   echo $ac_n "(cached) $ac_c" 1>&6
21649 else
21650   cat > conftest.$ac_ext <<EOF
21651 #line 21652 "configure"
21652 #include "confdefs.h"
21653 #include <$ac_hdr>
21654 EOF
21655 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
21656 { (eval echo configure:21657: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
21657 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
21658 if test -z "$ac_err"; then
21659   rm -rf conftest*
21660   eval "ac_cv_header_$ac_safe=yes"
21661 else
21662   echo "$ac_err" >&5
21663   echo "configure: failed program was:" >&5
21664   cat conftest.$ac_ext >&5
21665   rm -rf conftest*
21666   eval "ac_cv_header_$ac_safe=no"
21667 fi
21668 rm -f conftest*
21669 fi
21670 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
21671   echo "$ac_t""yes" 1>&6
21672     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
21673   cat >> confdefs.h <<EOF
21674 #define $ac_tr_hdr 1
21675 EOF
21676  
21677 else
21678   echo "$ac_t""no" 1>&6
21679 fi
21680 done
21681
21682
21683         if test $ac_cv_header_slp_h = yes ; then
21684                 echo $ac_n "checking for SLPOpen in -lslp""... $ac_c" 1>&6
21685 echo "configure:21686: checking for SLPOpen in -lslp" >&5
21686 ac_lib_var=`echo slp'_'SLPOpen | sed 'y%./+-:%__p__%'`
21687 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
21688   echo $ac_n "(cached) $ac_c" 1>&6
21689 else
21690   ac_save_LIBS="$LIBS"
21691 LIBS="-lslp  $LIBS"
21692 cat > conftest.$ac_ext <<EOF
21693 #line 21694 "configure"
21694 #include "confdefs.h"
21695 /* Override any gcc2 internal prototype to avoid an error.  */
21696 /* We use char because int might match the return type of a gcc2
21697     builtin and then its argument prototype would still apply.  */
21698 char SLPOpen();
21699
21700 int main() {
21701 SLPOpen()
21702 ; return 0; }
21703 EOF
21704 if { (eval echo configure:21705: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21705   rm -rf conftest*
21706   eval "ac_cv_lib_$ac_lib_var=yes"
21707 else
21708   echo "configure: failed program was:" >&5
21709   cat conftest.$ac_ext >&5
21710   rm -rf conftest*
21711   eval "ac_cv_lib_$ac_lib_var=no"
21712 fi
21713 rm -f conftest*
21714 LIBS="$ac_save_LIBS"
21715
21716 fi
21717 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
21718   echo "$ac_t""yes" 1>&6
21719   have_slp=yes
21720 else
21721   echo "$ac_t""no" 1>&6
21722 have_slp=no
21723 fi
21724
21725                 if test $have_slp = yes ; then
21726                         cat >> confdefs.h <<\EOF
21727 #define HAVE_SLP 1
21728 EOF
21729
21730                         SLAPD_SLP_LIBS=-lslp
21731                 fi
21732
21733         elif test $ol_enable_slp = yes ; then
21734                 { echo "configure: error: SLP not found" 1>&2; exit 1; }
21735         fi
21736 fi
21737
21738
21739 echo $ac_n "checking long long""... $ac_c" 1>&6
21740 echo "configure:21741: checking long long" >&5
21741 if eval "test \"\${ol_cv_type_long_long+set}\" = set"; then
21742   echo $ac_n "(cached) $ac_c" 1>&6
21743 else
21744   
21745         cat > conftest.$ac_ext <<EOF
21746 #line 21747 "configure"
21747 #include "confdefs.h"
21748
21749 int main() {
21750 long long x;
21751 ; return 0; }
21752 EOF
21753 if { (eval echo configure:21754: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21754   rm -rf conftest*
21755   ol_cv_type_long_long=yes
21756 else
21757   echo "configure: failed program was:" >&5
21758   cat conftest.$ac_ext >&5
21759   rm -rf conftest*
21760   ol_cv_type_long_long=no
21761 fi
21762 rm -f conftest*
21763 fi
21764
21765 echo "$ac_t""$ol_cv_type_long_long" 1>&6
21766 if test $ol_cv_type_long_long = yes; then
21767         cat >> confdefs.h <<\EOF
21768 #define HAVE_LONG_LONG 1
21769 EOF
21770
21771 fi
21772
21773 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
21774 echo "configure:21775: checking for ANSI C header files" >&5
21775 if eval "test \"\${ac_cv_header_stdc+set}\" = set"; then
21776   echo $ac_n "(cached) $ac_c" 1>&6
21777 else
21778   cat > conftest.$ac_ext <<EOF
21779 #line 21780 "configure"
21780 #include "confdefs.h"
21781 #include <stdlib.h>
21782 #include <stdarg.h>
21783 #include <string.h>
21784 #include <float.h>
21785 EOF
21786 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
21787 { (eval echo configure:21788: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
21788 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
21789 if test -z "$ac_err"; then
21790   rm -rf conftest*
21791   ac_cv_header_stdc=yes
21792 else
21793   echo "$ac_err" >&5
21794   echo "configure: failed program was:" >&5
21795   cat conftest.$ac_ext >&5
21796   rm -rf conftest*
21797   ac_cv_header_stdc=no
21798 fi
21799 rm -f conftest*
21800
21801 if test $ac_cv_header_stdc = yes; then
21802   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
21803 cat > conftest.$ac_ext <<EOF
21804 #line 21805 "configure"
21805 #include "confdefs.h"
21806 #include <string.h>
21807 EOF
21808 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21809   egrep "memchr" >/dev/null 2>&1; then
21810   :
21811 else
21812   rm -rf conftest*
21813   ac_cv_header_stdc=no
21814 fi
21815 rm -f conftest*
21816
21817 fi
21818
21819 if test $ac_cv_header_stdc = yes; then
21820   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
21821 cat > conftest.$ac_ext <<EOF
21822 #line 21823 "configure"
21823 #include "confdefs.h"
21824 #include <stdlib.h>
21825 EOF
21826 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21827   egrep "free" >/dev/null 2>&1; then
21828   :
21829 else
21830   rm -rf conftest*
21831   ac_cv_header_stdc=no
21832 fi
21833 rm -f conftest*
21834
21835 fi
21836
21837 if test $ac_cv_header_stdc = yes; then
21838   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
21839 if test "$cross_compiling" = yes; then
21840   :
21841 else
21842   cat > conftest.$ac_ext <<EOF
21843 #line 21844 "configure"
21844 #include "confdefs.h"
21845 #include <ctype.h>
21846 #if ((' ' & 0x0FF) == 0x020)
21847 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
21848 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
21849 #else
21850 #define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
21851  || ('j' <= (c) && (c) <= 'r') \
21852  || ('s' <= (c) && (c) <= 'z'))
21853 #define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
21854 #endif
21855 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
21856 int main () { int i; for (i = 0; i < 256; i++)
21857 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
21858 exit (0); }
21859
21860 EOF
21861 if { (eval echo configure:21862: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
21862 then
21863   :
21864 else
21865   echo "configure: failed program was:" >&5
21866   cat conftest.$ac_ext >&5
21867   rm -fr conftest*
21868   ac_cv_header_stdc=no
21869 fi
21870 rm -fr conftest*
21871 fi
21872
21873 fi
21874 fi
21875
21876 echo "$ac_t""$ac_cv_header_stdc" 1>&6
21877 if test $ac_cv_header_stdc = yes; then
21878   cat >> confdefs.h <<\EOF
21879 #define STDC_HEADERS 1
21880 EOF
21881
21882 fi
21883
21884 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
21885 echo "configure:21886: checking for mode_t" >&5
21886 if eval "test \"\${ac_cv_type_mode_t+set}\" = set"; then
21887   echo $ac_n "(cached) $ac_c" 1>&6
21888 else
21889   cat > conftest.$ac_ext <<EOF
21890 #line 21891 "configure"
21891 #include "confdefs.h"
21892 #include <sys/types.h>
21893 #if STDC_HEADERS
21894 #include <stdlib.h>
21895 #include <stddef.h>
21896 #endif
21897
21898 EOF
21899 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21900   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
21901   rm -rf conftest*
21902   eval "ac_cv_type_mode_t=yes"
21903 else
21904   rm -rf conftest*
21905   eval "ac_cv_type_mode_t=no"
21906 fi
21907 rm -f conftest*
21908
21909 fi
21910 if eval "test \"`echo '$ac_cv_type_'mode_t`\" = yes"; then
21911   echo "$ac_t""yes" 1>&6
21912 else
21913   echo "$ac_t""no" 1>&6
21914   cat >> confdefs.h <<EOF
21915 #define mode_t int
21916 EOF
21917
21918 fi
21919
21920 echo $ac_n "checking for off_t""... $ac_c" 1>&6
21921 echo "configure:21922: checking for off_t" >&5
21922 if eval "test \"\${ac_cv_type_off_t+set}\" = set"; then
21923   echo $ac_n "(cached) $ac_c" 1>&6
21924 else
21925   cat > conftest.$ac_ext <<EOF
21926 #line 21927 "configure"
21927 #include "confdefs.h"
21928 #include <sys/types.h>
21929 #if STDC_HEADERS
21930 #include <stdlib.h>
21931 #include <stddef.h>
21932 #endif
21933
21934 EOF
21935 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21936   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
21937   rm -rf conftest*
21938   eval "ac_cv_type_off_t=yes"
21939 else
21940   rm -rf conftest*
21941   eval "ac_cv_type_off_t=no"
21942 fi
21943 rm -f conftest*
21944
21945 fi
21946 if eval "test \"`echo '$ac_cv_type_'off_t`\" = yes"; then
21947   echo "$ac_t""yes" 1>&6
21948 else
21949   echo "$ac_t""no" 1>&6
21950   cat >> confdefs.h <<EOF
21951 #define off_t long
21952 EOF
21953
21954 fi
21955
21956 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
21957 echo "configure:21958: checking for pid_t" >&5
21958 if eval "test \"\${ac_cv_type_pid_t+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 #include <sys/types.h>
21965 #if STDC_HEADERS
21966 #include <stdlib.h>
21967 #include <stddef.h>
21968 #endif
21969
21970 EOF
21971 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21972   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
21973   rm -rf conftest*
21974   eval "ac_cv_type_pid_t=yes"
21975 else
21976   rm -rf conftest*
21977   eval "ac_cv_type_pid_t=no"
21978 fi
21979 rm -f conftest*
21980
21981 fi
21982 if eval "test \"`echo '$ac_cv_type_'pid_t`\" = yes"; then
21983   echo "$ac_t""yes" 1>&6
21984 else
21985   echo "$ac_t""no" 1>&6
21986   cat >> confdefs.h <<EOF
21987 #define pid_t int
21988 EOF
21989
21990 fi
21991
21992 echo $ac_n "checking for ptrdiff_t""... $ac_c" 1>&6
21993 echo "configure:21994: checking for ptrdiff_t" >&5
21994 if eval "test \"\${am_cv_type_ptrdiff_t+set}\" = set"; then
21995   echo $ac_n "(cached) $ac_c" 1>&6
21996 else
21997   cat > conftest.$ac_ext <<EOF
21998 #line 21999 "configure"
21999 #include "confdefs.h"
22000 #include <stddef.h>
22001 int main() {
22002 ptrdiff_t p
22003 ; return 0; }
22004 EOF
22005 if { (eval echo configure:22006: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22006   rm -rf conftest*
22007   am_cv_type_ptrdiff_t=yes
22008 else
22009   echo "configure: failed program was:" >&5
22010   cat conftest.$ac_ext >&5
22011   rm -rf conftest*
22012   am_cv_type_ptrdiff_t=no
22013 fi
22014 rm -f conftest*
22015 fi
22016
22017 echo "$ac_t""$am_cv_type_ptrdiff_t" 1>&6
22018    if test $am_cv_type_ptrdiff_t = yes; then
22019      cat >> confdefs.h <<\EOF
22020 #define HAVE_PTRDIFF_T 1
22021 EOF
22022
22023    fi
22024
22025 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
22026 echo "configure:22027: checking return type of signal handlers" >&5
22027 if eval "test \"\${ac_cv_type_signal+set}\" = set"; then
22028   echo $ac_n "(cached) $ac_c" 1>&6
22029 else
22030   cat > conftest.$ac_ext <<EOF
22031 #line 22032 "configure"
22032 #include "confdefs.h"
22033 #include <sys/types.h>
22034 #include <signal.h>
22035 #ifdef signal
22036 #undef signal
22037 #endif
22038 #ifdef __cplusplus
22039 extern "C" void (*signal (int, void (*)(int)))(int);
22040 #else
22041 void (*signal ()) ();
22042 #endif
22043
22044 int main() {
22045 int i;
22046 ; return 0; }
22047 EOF
22048 if { (eval echo configure:22049: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22049   rm -rf conftest*
22050   ac_cv_type_signal=void
22051 else
22052   echo "configure: failed program was:" >&5
22053   cat conftest.$ac_ext >&5
22054   rm -rf conftest*
22055   ac_cv_type_signal=int
22056 fi
22057 rm -f conftest*
22058 fi
22059
22060 echo "$ac_t""$ac_cv_type_signal" 1>&6
22061 cat >> confdefs.h <<EOF
22062 #define RETSIGTYPE $ac_cv_type_signal
22063 EOF
22064
22065
22066 echo $ac_n "checking for size_t""... $ac_c" 1>&6
22067 echo "configure:22068: checking for size_t" >&5
22068 if eval "test \"\${ac_cv_type_size_t+set}\" = set"; then
22069   echo $ac_n "(cached) $ac_c" 1>&6
22070 else
22071   cat > conftest.$ac_ext <<EOF
22072 #line 22073 "configure"
22073 #include "confdefs.h"
22074 #include <sys/types.h>
22075 #if STDC_HEADERS
22076 #include <stdlib.h>
22077 #include <stddef.h>
22078 #endif
22079
22080 EOF
22081 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
22082   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
22083   rm -rf conftest*
22084   eval "ac_cv_type_size_t=yes"
22085 else
22086   rm -rf conftest*
22087   eval "ac_cv_type_size_t=no"
22088 fi
22089 rm -f conftest*
22090
22091 fi
22092 if eval "test \"`echo '$ac_cv_type_'size_t`\" = yes"; then
22093   echo "$ac_t""yes" 1>&6
22094 else
22095   echo "$ac_t""no" 1>&6
22096   cat >> confdefs.h <<EOF
22097 #define size_t unsigned
22098 EOF
22099
22100 fi
22101
22102
22103 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
22104 echo "configure:22105: checking for ssize_t" >&5
22105 if eval "test \"\${ac_cv_type_ssize_t+set}\" = set"; then
22106   echo $ac_n "(cached) $ac_c" 1>&6
22107 else
22108   cat > conftest.$ac_ext <<EOF
22109 #line 22110 "configure"
22110 #include "confdefs.h"
22111 #include <sys/types.h>
22112 #if STDC_HEADERS
22113 #include <stdlib.h>
22114 #include <stddef.h>
22115 #endif
22116
22117 EOF
22118 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
22119   egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
22120   rm -rf conftest*
22121   eval "ac_cv_type_ssize_t=yes"
22122 else
22123   rm -rf conftest*
22124   eval "ac_cv_type_ssize_t=no"
22125 fi
22126 rm -f conftest*
22127
22128 fi
22129 if eval "test \"`echo '$ac_cv_type_'ssize_t`\" = yes"; then
22130   echo "$ac_t""yes" 1>&6
22131 else
22132   echo "$ac_t""no" 1>&6
22133   cat >> confdefs.h <<EOF
22134 #define ssize_t signed int
22135 EOF
22136
22137 fi
22138
22139 echo $ac_n "checking for caddr_t""... $ac_c" 1>&6
22140 echo "configure:22141: checking for caddr_t" >&5
22141 if eval "test \"\${ac_cv_type_caddr_t+set}\" = set"; then
22142   echo $ac_n "(cached) $ac_c" 1>&6
22143 else
22144   cat > conftest.$ac_ext <<EOF
22145 #line 22146 "configure"
22146 #include "confdefs.h"
22147 #include <sys/types.h>
22148 #if STDC_HEADERS
22149 #include <stdlib.h>
22150 #include <stddef.h>
22151 #endif
22152
22153 EOF
22154 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
22155   egrep "(^|[^a-zA-Z_0-9])caddr_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
22156   rm -rf conftest*
22157   eval "ac_cv_type_caddr_t=yes"
22158 else
22159   rm -rf conftest*
22160   eval "ac_cv_type_caddr_t=no"
22161 fi
22162 rm -f conftest*
22163
22164 fi
22165 if eval "test \"`echo '$ac_cv_type_'caddr_t`\" = yes"; then
22166   echo "$ac_t""yes" 1>&6
22167 else
22168   echo "$ac_t""no" 1>&6
22169   cat >> confdefs.h <<EOF
22170 #define caddr_t char *
22171 EOF
22172
22173 fi
22174
22175
22176 echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
22177 echo "configure:22178: checking for socklen_t" >&5
22178 if eval "test \"\${ol_cv_type_socklen_t+set}\" = set"; then
22179   echo $ac_n "(cached) $ac_c" 1>&6
22180 else
22181   cat > conftest.$ac_ext <<EOF
22182 #line 22183 "configure"
22183 #include "confdefs.h"
22184
22185 #ifdef HAVE_SYS_TYPES_H
22186 #include <sys/types.h>
22187 #endif
22188 #ifdef HAVE_SYS_SOCKET_H
22189 #include <sys/socket.h>
22190 #endif
22191
22192 int main() {
22193 socklen_t len;
22194 ; return 0; }
22195 EOF
22196 if { (eval echo configure:22197: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22197   rm -rf conftest*
22198   ol_cv_type_socklen_t=yes
22199 else
22200   echo "configure: failed program was:" >&5
22201   cat conftest.$ac_ext >&5
22202   rm -rf conftest*
22203   ol_cv_type_socklen_t=no
22204 fi
22205 rm -f conftest*
22206 fi
22207
22208 echo "$ac_t""$ol_cv_type_socklen_t" 1>&6
22209   if test $ol_cv_type_socklen_t = no; then
22210     cat >> confdefs.h <<\EOF
22211 #define socklen_t int
22212 EOF
22213
22214   fi
22215  
22216 echo $ac_n "checking for member st_blksize in aggregate type struct stat""... $ac_c" 1>&6
22217 echo "configure:22218: checking for member st_blksize in aggregate type struct stat" >&5
22218 if eval "test \"\${ac_cv_c_struct_member_st_blksize+set}\" = set"; then
22219   echo $ac_n "(cached) $ac_c" 1>&6
22220 else
22221   cat > conftest.$ac_ext <<EOF
22222 #line 22223 "configure"
22223 #include "confdefs.h"
22224 #include <sys/types.h>
22225 #include <sys/stat.h>
22226 int main() {
22227 struct stat foo; foo.st_blksize;
22228 ; return 0; }
22229 EOF
22230 if { (eval echo configure:22231: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22231   rm -rf conftest*
22232   ac_cv_c_struct_member_st_blksize=yes
22233 else
22234   echo "configure: failed program was:" >&5
22235   cat conftest.$ac_ext >&5
22236   rm -rf conftest*
22237   ac_cv_c_struct_member_st_blksize=no
22238 fi
22239 rm -f conftest*
22240 fi
22241
22242 echo "$ac_t""$ac_cv_c_struct_member_st_blksize" 1>&6
22243 st_blksize="$ac_cv_c_struct_member_st_blksize"
22244 if test $ac_cv_c_struct_member_st_blksize = yes; then
22245   cat >> confdefs.h <<\EOF
22246 #define HAVE_ST_BLKSIZE 1
22247 EOF
22248
22249 fi
22250
22251 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
22252 echo "configure:22253: checking whether time.h and sys/time.h may both be included" >&5
22253 if eval "test \"\${ac_cv_header_time+set}\" = set"; then
22254   echo $ac_n "(cached) $ac_c" 1>&6
22255 else
22256   cat > conftest.$ac_ext <<EOF
22257 #line 22258 "configure"
22258 #include "confdefs.h"
22259 #include <sys/types.h>
22260 #include <sys/time.h>
22261 #include <time.h>
22262 int main() {
22263 struct tm *tp;
22264 ; return 0; }
22265 EOF
22266 if { (eval echo configure:22267: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22267   rm -rf conftest*
22268   ac_cv_header_time=yes
22269 else
22270   echo "configure: failed program was:" >&5
22271   cat conftest.$ac_ext >&5
22272   rm -rf conftest*
22273   ac_cv_header_time=no
22274 fi
22275 rm -f conftest*
22276 fi
22277
22278 echo "$ac_t""$ac_cv_header_time" 1>&6
22279 if test $ac_cv_header_time = yes; then
22280   cat >> confdefs.h <<\EOF
22281 #define TIME_WITH_SYS_TIME 1
22282 EOF
22283
22284 fi
22285
22286 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
22287 echo "configure:22288: checking whether struct tm is in sys/time.h or time.h" >&5
22288 if eval "test \"\${ac_cv_struct_tm+set}\" = set"; then
22289   echo $ac_n "(cached) $ac_c" 1>&6
22290 else
22291   cat > conftest.$ac_ext <<EOF
22292 #line 22293 "configure"
22293 #include "confdefs.h"
22294 #include <sys/types.h>
22295 #include <time.h>
22296 int main() {
22297 struct tm *tp; tp->tm_sec;
22298 ; return 0; }
22299 EOF
22300 if { (eval echo configure:22301: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22301   rm -rf conftest*
22302   ac_cv_struct_tm=time.h
22303 else
22304   echo "configure: failed program was:" >&5
22305   cat conftest.$ac_ext >&5
22306   rm -rf conftest*
22307   ac_cv_struct_tm=sys/time.h
22308 fi
22309 rm -f conftest*
22310 fi
22311
22312 echo "$ac_t""$ac_cv_struct_tm" 1>&6
22313 if test $ac_cv_struct_tm = sys/time.h; then
22314   cat >> confdefs.h <<\EOF
22315 #define TM_IN_SYS_TIME 1
22316 EOF
22317
22318 fi
22319
22320 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
22321 echo "configure:22322: checking for uid_t in sys/types.h" >&5
22322 if eval "test \"\${ac_cv_type_uid_t+set}\" = set"; then
22323   echo $ac_n "(cached) $ac_c" 1>&6
22324 else
22325   cat > conftest.$ac_ext <<EOF
22326 #line 22327 "configure"
22327 #include "confdefs.h"
22328 #include <sys/types.h>
22329 EOF
22330 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
22331   egrep "uid_t" >/dev/null 2>&1; then
22332   rm -rf conftest*
22333   ac_cv_type_uid_t=yes
22334 else
22335   rm -rf conftest*
22336   ac_cv_type_uid_t=no
22337 fi
22338 rm -f conftest*
22339
22340 fi
22341
22342 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
22343 if test $ac_cv_type_uid_t = no; then
22344   cat >> confdefs.h <<\EOF
22345 #define uid_t int
22346 EOF
22347
22348   cat >> confdefs.h <<\EOF
22349 #define gid_t int
22350 EOF
22351
22352 fi
22353
22354 echo $ac_n "checking for sig_atomic_t""... $ac_c" 1>&6
22355 echo "configure:22356: checking for sig_atomic_t" >&5
22356 if eval "test \"\${ol_cv_type_sig_atomic_t+set}\" = set"; then
22357   echo $ac_n "(cached) $ac_c" 1>&6
22358 else
22359   cat > conftest.$ac_ext <<EOF
22360 #line 22361 "configure"
22361 #include "confdefs.h"
22362 #include <signal.h>
22363 int main() {
22364 sig_atomic_t atomic;
22365 ; return 0; }
22366 EOF
22367 if { (eval echo configure:22368: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22368   rm -rf conftest*
22369   ol_cv_type_sig_atomic_t=yes
22370 else
22371   echo "configure: failed program was:" >&5
22372   cat conftest.$ac_ext >&5
22373   rm -rf conftest*
22374   ol_cv_type_sig_atomic_t=no
22375 fi
22376 rm -f conftest*
22377 fi
22378
22379 echo "$ac_t""$ol_cv_type_sig_atomic_t" 1>&6
22380   if test $ol_cv_type_sig_atomic_t = no; then
22381     cat >> confdefs.h <<\EOF
22382 #define sig_atomic_t int
22383 EOF
22384
22385   fi
22386  
22387
22388
22389 # test for pw_gecos in struct passwd
22390 echo $ac_n "checking struct passwd for pw_gecos""... $ac_c" 1>&6
22391 echo "configure:22392: checking struct passwd for pw_gecos" >&5
22392 if eval "test \"\${ol_cv_struct_passwd_pw_gecos+set}\" = set"; then
22393   echo $ac_n "(cached) $ac_c" 1>&6
22394 else
22395   
22396         cat > conftest.$ac_ext <<EOF
22397 #line 22398 "configure"
22398 #include "confdefs.h"
22399 #include <pwd.h>
22400 int main() {
22401
22402         struct passwd pwd;
22403         pwd.pw_gecos = pwd.pw_name;
22404
22405 ; return 0; }
22406 EOF
22407 if { (eval echo configure:22408: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22408   rm -rf conftest*
22409   ol_cv_struct_passwd_pw_gecos=yes
22410 else
22411   echo "configure: failed program was:" >&5
22412   cat conftest.$ac_ext >&5
22413   rm -rf conftest*
22414   ol_cv_struct_passwd_pw_gecos=no
22415 fi
22416 rm -f conftest*
22417 fi
22418
22419 echo "$ac_t""$ol_cv_struct_passwd_pw_gecos" 1>&6
22420 if test $ol_cv_struct_passwd_pw_gecos = yes ; then
22421         cat >> confdefs.h <<\EOF
22422 #define HAVE_PW_GECOS 1
22423 EOF
22424
22425 fi
22426
22427 # test for pw_passwd in struct passwd
22428 echo $ac_n "checking struct passwd for pw_passwd""... $ac_c" 1>&6
22429 echo "configure:22430: checking struct passwd for pw_passwd" >&5
22430 if eval "test \"\${ol_cv_struct_passwd_pw_passwd+set}\" = set"; then
22431   echo $ac_n "(cached) $ac_c" 1>&6
22432 else
22433   
22434         cat > conftest.$ac_ext <<EOF
22435 #line 22436 "configure"
22436 #include "confdefs.h"
22437 #include <pwd.h>
22438 int main() {
22439
22440         struct passwd pwd;
22441         pwd.pw_passwd = pwd.pw_name;
22442
22443 ; return 0; }
22444 EOF
22445 if { (eval echo configure:22446: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22446   rm -rf conftest*
22447   ol_cv_struct_passwd_pw_passwd=yes
22448 else
22449   echo "configure: failed program was:" >&5
22450   cat conftest.$ac_ext >&5
22451   rm -rf conftest*
22452   ol_cv_struct_passwd_pw_passwd=no
22453 fi
22454 rm -f conftest*
22455 fi
22456
22457 echo "$ac_t""$ol_cv_struct_passwd_pw_passwd" 1>&6
22458 if test $ol_cv_struct_passwd_pw_passwd = yes ; then
22459         cat >> confdefs.h <<\EOF
22460 #define HAVE_PW_PASSWD 1
22461 EOF
22462
22463 fi
22464
22465
22466 echo $ac_n "checking if toupper() requires islower()""... $ac_c" 1>&6
22467 echo "configure:22468: checking if toupper() requires islower()" >&5
22468 if eval "test \"\${ol_cv_c_upper_lower+set}\" = set"; then
22469   echo $ac_n "(cached) $ac_c" 1>&6
22470 else
22471   
22472         if test "$cross_compiling" = yes; then
22473   ol_cv_c_upper_lower=safe
22474 else
22475   cat > conftest.$ac_ext <<EOF
22476 #line 22477 "configure"
22477 #include "confdefs.h"
22478
22479 #include <ctype.h>
22480 main()
22481 {
22482         if ('C' == toupper('C'))
22483                 exit(0);
22484         else
22485                 exit(1);
22486 }
22487 EOF
22488 if { (eval echo configure:22489: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
22489 then
22490   ol_cv_c_upper_lower=no
22491 else
22492   echo "configure: failed program was:" >&5
22493   cat conftest.$ac_ext >&5
22494   rm -fr conftest*
22495   ol_cv_c_upper_lower=yes
22496 fi
22497 rm -fr conftest*
22498 fi
22499
22500 fi
22501
22502 echo "$ac_t""$ol_cv_c_upper_lower" 1>&6
22503 if test $ol_cv_c_upper_lower != no ; then
22504         cat >> confdefs.h <<\EOF
22505 #define C_UPPER_LOWER 1
22506 EOF
22507
22508 fi
22509
22510 echo $ac_n "checking for working const""... $ac_c" 1>&6
22511 echo "configure:22512: checking for working const" >&5
22512 if eval "test \"\${ac_cv_c_const+set}\" = set"; then
22513   echo $ac_n "(cached) $ac_c" 1>&6
22514 else
22515   cat > conftest.$ac_ext <<EOF
22516 #line 22517 "configure"
22517 #include "confdefs.h"
22518
22519 int main() {
22520
22521 /* Ultrix mips cc rejects this.  */
22522 typedef int charset[2]; const charset x;
22523 /* SunOS 4.1.1 cc rejects this.  */
22524 char const *const *ccp;
22525 char **p;
22526 /* NEC SVR4.0.2 mips cc rejects this.  */
22527 struct point {int x, y;};
22528 static struct point const zero = {0,0};
22529 /* AIX XL C 1.02.0.0 rejects this.
22530    It does not let you subtract one const X* pointer from another in an arm
22531    of an if-expression whose if-part is not a constant expression */
22532 const char *g = "string";
22533 ccp = &g + (g ? g-g : 0);
22534 /* HPUX 7.0 cc rejects these. */
22535 ++ccp;
22536 p = (char**) ccp;
22537 ccp = (char const *const *) p;
22538 { /* SCO 3.2v4 cc rejects this.  */
22539   char *t;
22540   char const *s = 0 ? (char *) 0 : (char const *) 0;
22541
22542   *t++ = 0;
22543 }
22544 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
22545   int x[] = {25, 17};
22546   const int *foo = &x[0];
22547   ++foo;
22548 }
22549 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
22550   typedef const int *iptr;
22551   iptr p = 0;
22552   ++p;
22553 }
22554 { /* AIX XL C 1.02.0.0 rejects this saying
22555      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
22556   struct s { int j; const int *ap[3]; };
22557   struct s *b; b->j = 5;
22558 }
22559 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
22560   const int foo = 10;
22561 }
22562
22563 ; return 0; }
22564 EOF
22565 if { (eval echo configure:22566: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22566   rm -rf conftest*
22567   ac_cv_c_const=yes
22568 else
22569   echo "configure: failed program was:" >&5
22570   cat conftest.$ac_ext >&5
22571   rm -rf conftest*
22572   ac_cv_c_const=no
22573 fi
22574 rm -f conftest*
22575 fi
22576
22577 echo "$ac_t""$ac_cv_c_const" 1>&6
22578 if test $ac_cv_c_const = no; then
22579   cat >> confdefs.h <<\EOF
22580 #define const 
22581 EOF
22582
22583 fi
22584
22585 echo $ac_n "checking if compiler understands volatile""... $ac_c" 1>&6
22586 echo "configure:22587: checking if compiler understands volatile" >&5
22587 if eval "test \"\${ol_cv_c_volatile+set}\" = set"; then
22588   echo $ac_n "(cached) $ac_c" 1>&6
22589 else
22590   cat > conftest.$ac_ext <<EOF
22591 #line 22592 "configure"
22592 #include "confdefs.h"
22593 int x, y, z;
22594 int main() {
22595 volatile int a; int * volatile b = x ? &y : &z;
22596       /* Older MIPS compilers (eg., in Ultrix 4.2) don't like *b = 0 */
22597       *b = 0;
22598 ; return 0; }
22599 EOF
22600 if { (eval echo configure:22601: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22601   rm -rf conftest*
22602   ol_cv_c_volatile=yes
22603 else
22604   echo "configure: failed program was:" >&5
22605   cat conftest.$ac_ext >&5
22606   rm -rf conftest*
22607   ol_cv_c_volatile=no
22608 fi
22609 rm -f conftest*
22610 fi
22611
22612 echo "$ac_t""$ol_cv_c_volatile" 1>&6
22613   if test $ol_cv_c_volatile = yes; then
22614     : 
22615   else
22616     cat >> confdefs.h <<\EOF
22617 #define volatile 
22618 EOF
22619
22620   fi
22621  
22622
22623 if test $cross_compiling = yes ; then
22624         echo "configure: warning: Crossing compiling... all bets are off!" 1>&2
22625         cat >> confdefs.h <<\EOF
22626 #define CROSS_COMPILING 1
22627 EOF
22628
22629 else
22630         echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
22631 echo "configure:22632: checking whether byte ordering is bigendian" >&5
22632 if eval "test \"\${ac_cv_c_bigendian+set}\" = set"; then
22633   echo $ac_n "(cached) $ac_c" 1>&6
22634 else
22635   ac_cv_c_bigendian=unknown
22636 # See if sys/param.h defines the BYTE_ORDER macro.
22637 cat > conftest.$ac_ext <<EOF
22638 #line 22639 "configure"
22639 #include "confdefs.h"
22640 #include <sys/types.h>
22641 #include <sys/param.h>
22642 int main() {
22643
22644 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
22645  bogus endian macros
22646 #endif
22647 ; return 0; }
22648 EOF
22649 if { (eval echo configure:22650: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22650   rm -rf conftest*
22651   # It does; now see whether it defined to BIG_ENDIAN or not.
22652 cat > conftest.$ac_ext <<EOF
22653 #line 22654 "configure"
22654 #include "confdefs.h"
22655 #include <sys/types.h>
22656 #include <sys/param.h>
22657 int main() {
22658
22659 #if BYTE_ORDER != BIG_ENDIAN
22660  not big endian
22661 #endif
22662 ; return 0; }
22663 EOF
22664 if { (eval echo configure:22665: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22665   rm -rf conftest*
22666   ac_cv_c_bigendian=yes
22667 else
22668   echo "configure: failed program was:" >&5
22669   cat conftest.$ac_ext >&5
22670   rm -rf conftest*
22671   ac_cv_c_bigendian=no
22672 fi
22673 rm -f conftest*
22674 else
22675   echo "configure: failed program was:" >&5
22676   cat conftest.$ac_ext >&5
22677 fi
22678 rm -f conftest*
22679 if test $ac_cv_c_bigendian = unknown; then
22680 if test "$cross_compiling" = yes; then
22681     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
22682 else
22683   cat > conftest.$ac_ext <<EOF
22684 #line 22685 "configure"
22685 #include "confdefs.h"
22686 main () {
22687   /* Are we little or big endian?  From Harbison&Steele.  */
22688   union
22689   {
22690     long l;
22691     char c[sizeof (long)];
22692   } u;
22693   u.l = 1;
22694   exit (u.c[sizeof (long) - 1] == 1);
22695 }
22696 EOF
22697 if { (eval echo configure:22698: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
22698 then
22699   ac_cv_c_bigendian=no
22700 else
22701   echo "configure: failed program was:" >&5
22702   cat conftest.$ac_ext >&5
22703   rm -fr conftest*
22704   ac_cv_c_bigendian=yes
22705 fi
22706 rm -fr conftest*
22707 fi
22708
22709 fi
22710 fi
22711
22712 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
22713 if test $ac_cv_c_bigendian = yes; then
22714   cat >> confdefs.h <<\EOF
22715 #define WORDS_BIGENDIAN 1
22716 EOF
22717
22718 fi
22719
22720 fi
22721
22722 echo $ac_n "checking size of short""... $ac_c" 1>&6
22723 echo "configure:22724: checking size of short" >&5 
22724 if eval "test \"\${ac_cv_sizeof_short+set}\" = set"; then
22725   echo $ac_n "(cached) $ac_c" 1>&6
22726 else
22727   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
22728   cat > conftest.$ac_ext <<EOF
22729 #line 22730 "configure"
22730 #include "confdefs.h"
22731 #include "confdefs.h" 
22732 #include <stdlib.h>
22733 #include <sys/types.h> 
22734  
22735
22736 int main() {
22737 switch (0) case 0: case (sizeof (short) == $ac_size):;
22738 ; return 0; }
22739 EOF
22740 if { (eval echo configure:22741: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22741   rm -rf conftest*
22742   ac_cv_sizeof_short=$ac_size
22743 else
22744   echo "configure: failed program was:" >&5
22745   cat conftest.$ac_ext >&5
22746 fi
22747 rm -f conftest* 
22748   if test x$ac_cv_sizeof_short != x ; then break; fi 
22749 done 
22750
22751 fi
22752  
22753 if test x$ac_cv_sizeof_short = x ; then 
22754   { echo "configure: error: cannot determine a size for short" 1>&2; exit 1; } 
22755 fi 
22756 echo "$ac_t""$ac_cv_sizeof_short" 1>&6 
22757 cat >> confdefs.h <<EOF
22758 #define SIZEOF_SHORT $ac_cv_sizeof_short
22759 EOF
22760  
22761  
22762 echo $ac_n "checking size of int""... $ac_c" 1>&6
22763 echo "configure:22764: checking size of int" >&5 
22764 if eval "test \"\${ac_cv_sizeof_int+set}\" = set"; then
22765   echo $ac_n "(cached) $ac_c" 1>&6
22766 else
22767   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
22768   cat > conftest.$ac_ext <<EOF
22769 #line 22770 "configure"
22770 #include "confdefs.h"
22771 #include "confdefs.h" 
22772 #include <stdlib.h>
22773 #include <sys/types.h> 
22774  
22775
22776 int main() {
22777 switch (0) case 0: case (sizeof (int) == $ac_size):;
22778 ; return 0; }
22779 EOF
22780 if { (eval echo configure:22781: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22781   rm -rf conftest*
22782   ac_cv_sizeof_int=$ac_size
22783 else
22784   echo "configure: failed program was:" >&5
22785   cat conftest.$ac_ext >&5
22786 fi
22787 rm -f conftest* 
22788   if test x$ac_cv_sizeof_int != x ; then break; fi 
22789 done 
22790
22791 fi
22792  
22793 if test x$ac_cv_sizeof_int = x ; then 
22794   { echo "configure: error: cannot determine a size for int" 1>&2; exit 1; } 
22795 fi 
22796 echo "$ac_t""$ac_cv_sizeof_int" 1>&6 
22797 cat >> confdefs.h <<EOF
22798 #define SIZEOF_INT $ac_cv_sizeof_int
22799 EOF
22800  
22801  
22802 echo $ac_n "checking size of long""... $ac_c" 1>&6
22803 echo "configure:22804: checking size of long" >&5 
22804 if eval "test \"\${ac_cv_sizeof_long+set}\" = set"; then
22805   echo $ac_n "(cached) $ac_c" 1>&6
22806 else
22807   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
22808   cat > conftest.$ac_ext <<EOF
22809 #line 22810 "configure"
22810 #include "confdefs.h"
22811 #include "confdefs.h" 
22812 #include <stdlib.h>
22813 #include <sys/types.h> 
22814  
22815
22816 int main() {
22817 switch (0) case 0: case (sizeof (long) == $ac_size):;
22818 ; return 0; }
22819 EOF
22820 if { (eval echo configure:22821: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22821   rm -rf conftest*
22822   ac_cv_sizeof_long=$ac_size
22823 else
22824   echo "configure: failed program was:" >&5
22825   cat conftest.$ac_ext >&5
22826 fi
22827 rm -f conftest* 
22828   if test x$ac_cv_sizeof_long != x ; then break; fi 
22829 done 
22830
22831 fi
22832  
22833 if test x$ac_cv_sizeof_long = x ; then 
22834   { echo "configure: error: cannot determine a size for long" 1>&2; exit 1; } 
22835 fi 
22836 echo "$ac_t""$ac_cv_sizeof_long" 1>&6 
22837 cat >> confdefs.h <<EOF
22838 #define SIZEOF_LONG $ac_cv_sizeof_long
22839 EOF
22840  
22841
22842 echo $ac_n "checking size of wchar_t""... $ac_c" 1>&6
22843 echo "configure:22844: checking size of wchar_t" >&5 
22844 if eval "test \"\${ac_cv_sizeof_wchar_t+set}\" = set"; then
22845   echo $ac_n "(cached) $ac_c" 1>&6
22846 else
22847   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
22848   cat > conftest.$ac_ext <<EOF
22849 #line 22850 "configure"
22850 #include "confdefs.h"
22851 #include "confdefs.h" 
22852 #include <stdlib.h>
22853 #include <sys/types.h> 
22854  
22855
22856 int main() {
22857 switch (0) case 0: case (sizeof (wchar_t) == $ac_size):;
22858 ; return 0; }
22859 EOF
22860 if { (eval echo configure:22861: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22861   rm -rf conftest*
22862   ac_cv_sizeof_wchar_t=$ac_size
22863 else
22864   echo "configure: failed program was:" >&5
22865   cat conftest.$ac_ext >&5
22866 fi
22867 rm -f conftest* 
22868   if test x$ac_cv_sizeof_wchar_t != x ; then break; fi 
22869 done 
22870
22871 fi
22872  
22873 if test x$ac_cv_sizeof_wchar_t = x ; then 
22874   { echo "configure: error: cannot determine a size for wchar_t" 1>&2; exit 1; } 
22875 fi 
22876 echo "$ac_t""$ac_cv_sizeof_wchar_t" 1>&6 
22877 cat >> confdefs.h <<EOF
22878 #define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
22879 EOF
22880  
22881
22882
22883 if test "$ac_cv_sizeof_int" -lt 4 ; then
22884         echo "configure: warning: OpenLDAP requires 'int' to be 32 bits or greater." 1>&2
22885
22886         cat >> confdefs.h <<\EOF
22887 #define LBER_INT_T long
22888 EOF
22889
22890 else
22891         cat >> confdefs.h <<\EOF
22892 #define LBER_INT_T int
22893 EOF
22894
22895 fi
22896
22897 cat >> confdefs.h <<\EOF
22898 #define LBER_LEN_T long
22899 EOF
22900
22901 cat >> confdefs.h <<\EOF
22902 #define LBER_SOCKET_T int
22903 EOF
22904
22905 cat >> confdefs.h <<\EOF
22906 #define LBER_TAG_T long
22907 EOF
22908
22909
22910 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
22911 echo "configure:22912: checking for 8-bit clean memcmp" >&5
22912 if eval "test \"\${ac_cv_func_memcmp_clean+set}\" = set"; then
22913   echo $ac_n "(cached) $ac_c" 1>&6
22914 else
22915   if test "$cross_compiling" = yes; then
22916   ac_cv_func_memcmp_clean=no
22917 else
22918   cat > conftest.$ac_ext <<EOF
22919 #line 22920 "configure"
22920 #include "confdefs.h"
22921
22922 main()
22923 {
22924   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
22925   exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
22926 }
22927
22928 EOF
22929 if { (eval echo configure:22930: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
22930 then
22931   ac_cv_func_memcmp_clean=yes
22932 else
22933   echo "configure: failed program was:" >&5
22934   cat conftest.$ac_ext >&5
22935   rm -fr conftest*
22936   ac_cv_func_memcmp_clean=no
22937 fi
22938 rm -fr conftest*
22939 fi
22940
22941 fi
22942
22943 echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
22944 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
22945
22946 echo $ac_n "checking for strftime""... $ac_c" 1>&6
22947 echo "configure:22948: checking for strftime" >&5
22948 if eval "test \"\${ac_cv_func_strftime+set}\" = set"; then
22949   echo $ac_n "(cached) $ac_c" 1>&6
22950 else
22951   cat > conftest.$ac_ext <<EOF
22952 #line 22953 "configure"
22953 #include "confdefs.h"
22954 /* System header to define __stub macros and hopefully few prototypes,
22955     which can conflict with char strftime(); below.  */
22956 #include <assert.h>
22957 /* Override any gcc2 internal prototype to avoid an error.  */
22958 /* We use char because int might match the return type of a gcc2
22959     builtin and then its argument prototype would still apply.  */
22960 char strftime();
22961 char (*f)();
22962
22963 int main() {
22964
22965 /* The GNU C library defines this for functions which it implements
22966     to always fail with ENOSYS.  Some functions are actually named
22967     something starting with __ and the normal name is an alias.  */
22968 #if defined (__stub_strftime) || defined (__stub___strftime)
22969 choke me
22970 #else
22971 f = strftime;
22972 #endif
22973
22974 ; return 0; }
22975 EOF
22976 if { (eval echo configure:22977: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22977   rm -rf conftest*
22978   eval "ac_cv_func_strftime=yes"
22979 else
22980   echo "configure: failed program was:" >&5
22981   cat conftest.$ac_ext >&5
22982   rm -rf conftest*
22983   eval "ac_cv_func_strftime=no"
22984 fi
22985 rm -f conftest*
22986 fi
22987
22988 if eval "test \"`echo '$ac_cv_func_'strftime`\" = yes"; then
22989   echo "$ac_t""yes" 1>&6
22990   cat >> confdefs.h <<\EOF
22991 #define HAVE_STRFTIME 1
22992 EOF
22993
22994 else
22995   echo "$ac_t""no" 1>&6
22996 # strftime is in -lintl on SCO UNIX.
22997 echo $ac_n "checking for strftime in -lintl""... $ac_c" 1>&6
22998 echo "configure:22999: checking for strftime in -lintl" >&5
22999 ac_lib_var=`echo intl'_'strftime | sed 'y%./+-:%__p__%'`
23000 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
23001   echo $ac_n "(cached) $ac_c" 1>&6
23002 else
23003   ac_save_LIBS="$LIBS"
23004 LIBS="-lintl  $LIBS"
23005 cat > conftest.$ac_ext <<EOF
23006 #line 23007 "configure"
23007 #include "confdefs.h"
23008 /* Override any gcc2 internal prototype to avoid an error.  */
23009 /* We use char because int might match the return type of a gcc2
23010     builtin and then its argument prototype would still apply.  */
23011 char strftime();
23012
23013 int main() {
23014 strftime()
23015 ; return 0; }
23016 EOF
23017 if { (eval echo configure:23018: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
23018   rm -rf conftest*
23019   eval "ac_cv_lib_$ac_lib_var=yes"
23020 else
23021   echo "configure: failed program was:" >&5
23022   cat conftest.$ac_ext >&5
23023   rm -rf conftest*
23024   eval "ac_cv_lib_$ac_lib_var=no"
23025 fi
23026 rm -f conftest*
23027 LIBS="$ac_save_LIBS"
23028
23029 fi
23030 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
23031   echo "$ac_t""yes" 1>&6
23032   cat >> confdefs.h <<\EOF
23033 #define HAVE_STRFTIME 1
23034 EOF
23035
23036 LIBS="-lintl $LIBS"
23037 else
23038   echo "$ac_t""no" 1>&6
23039 fi
23040
23041 fi
23042
23043
23044 echo $ac_n "checking for inet_aton()""... $ac_c" 1>&6
23045 echo "configure:23046: checking for inet_aton()" >&5
23046 if eval "test \"\${ol_cv_func_inet_aton+set}\" = set"; then
23047   echo $ac_n "(cached) $ac_c" 1>&6
23048 else
23049   cat > conftest.$ac_ext <<EOF
23050 #line 23051 "configure"
23051 #include "confdefs.h"
23052
23053 #ifdef HAVE_SYS_TYPES_H
23054 #       include <sys/types.h>
23055 #endif
23056 #ifdef HAVE_SYS_SOCKET_H
23057 #       include <sys/socket.h>
23058 #       ifdef HAVE_SYS_SELECT_H
23059 #               include <sys/select.h>
23060 #       endif
23061 #       include <netinet/in.h>
23062 #       ifdef HAVE_ARPA_INET_H
23063 #               include <arpa/inet.h>
23064 #       endif
23065 #endif
23066
23067 int main() {
23068 struct in_addr in;
23069 int rc = inet_aton( "255.255.255.255", &in );
23070 ; return 0; }
23071 EOF
23072 if { (eval echo configure:23073: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
23073   rm -rf conftest*
23074   ol_cv_func_inet_aton=yes
23075 else
23076   echo "configure: failed program was:" >&5
23077   cat conftest.$ac_ext >&5
23078   rm -rf conftest*
23079   ol_cv_func_inet_aton=no
23080 fi
23081 rm -f conftest*
23082 fi
23083
23084 echo "$ac_t""$ol_cv_func_inet_aton" 1>&6
23085   if test $ol_cv_func_inet_aton != no; then
23086     cat >> confdefs.h <<\EOF
23087 #define HAVE_INET_ATON 1
23088 EOF
23089
23090   fi
23091  
23092
23093 echo $ac_n "checking for _spawnlp""... $ac_c" 1>&6
23094 echo "configure:23095: checking for _spawnlp" >&5
23095 if eval "test \"\${ac_cv_func__spawnlp+set}\" = set"; then
23096   echo $ac_n "(cached) $ac_c" 1>&6
23097 else
23098   cat > conftest.$ac_ext <<EOF
23099 #line 23100 "configure"
23100 #include "confdefs.h"
23101 /* System header to define __stub macros and hopefully few prototypes,
23102     which can conflict with char _spawnlp(); below.  */
23103 #include <assert.h>
23104 /* Override any gcc2 internal prototype to avoid an error.  */
23105 /* We use char because int might match the return type of a gcc2
23106     builtin and then its argument prototype would still apply.  */
23107 char _spawnlp();
23108 char (*f)();
23109
23110 int main() {
23111
23112 /* The GNU C library defines this for functions which it implements
23113     to always fail with ENOSYS.  Some functions are actually named
23114     something starting with __ and the normal name is an alias.  */
23115 #if defined (__stub__spawnlp) || defined (__stub____spawnlp)
23116 choke me
23117 #else
23118 f = _spawnlp;
23119 #endif
23120
23121 ; return 0; }
23122 EOF
23123 if { (eval echo configure:23124: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
23124   rm -rf conftest*
23125   eval "ac_cv_func__spawnlp=yes"
23126 else
23127   echo "configure: failed program was:" >&5
23128   cat conftest.$ac_ext >&5
23129   rm -rf conftest*
23130   eval "ac_cv_func__spawnlp=no"
23131 fi
23132 rm -f conftest*
23133 fi
23134
23135 if eval "test \"`echo '$ac_cv_func_'_spawnlp`\" = yes"; then
23136   echo "$ac_t""yes" 1>&6
23137   cat >> confdefs.h <<\EOF
23138 #define HAVE_SPAWNLP 1
23139 EOF
23140
23141 else
23142   echo "$ac_t""no" 1>&6
23143 fi
23144
23145
23146 echo $ac_n "checking for _snprintf""... $ac_c" 1>&6
23147 echo "configure:23148: checking for _snprintf" >&5
23148 if eval "test \"\${ac_cv_func__snprintf+set}\" = set"; then
23149   echo $ac_n "(cached) $ac_c" 1>&6
23150 else
23151   cat > conftest.$ac_ext <<EOF
23152 #line 23153 "configure"
23153 #include "confdefs.h"
23154 /* System header to define __stub macros and hopefully few prototypes,
23155     which can conflict with char _snprintf(); below.  */
23156 #include <assert.h>
23157 /* Override any gcc2 internal prototype to avoid an error.  */
23158 /* We use char because int might match the return type of a gcc2
23159     builtin and then its argument prototype would still apply.  */
23160 char _snprintf();
23161 char (*f)();
23162
23163 int main() {
23164
23165 /* The GNU C library defines this for functions which it implements
23166     to always fail with ENOSYS.  Some functions are actually named
23167     something starting with __ and the normal name is an alias.  */
23168 #if defined (__stub__snprintf) || defined (__stub____snprintf)
23169 choke me
23170 #else
23171 f = _snprintf;
23172 #endif
23173
23174 ; return 0; }
23175 EOF
23176 if { (eval echo configure:23177: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
23177   rm -rf conftest*
23178   eval "ac_cv_func__snprintf=yes"
23179 else
23180   echo "configure: failed program was:" >&5
23181   cat conftest.$ac_ext >&5
23182   rm -rf conftest*
23183   eval "ac_cv_func__snprintf=no"
23184 fi
23185 rm -f conftest*
23186 fi
23187
23188 if eval "test \"`echo '$ac_cv_func_'_snprintf`\" = yes"; then
23189   echo "$ac_t""yes" 1>&6
23190   ac_cv_func_snprintf=yes
23191         cat >> confdefs.h <<\EOF
23192 #define snprintf _snprintf
23193 EOF
23194
23195
23196 else
23197   echo "$ac_t""no" 1>&6
23198 fi
23199
23200
23201 echo $ac_n "checking for _vsnprintf""... $ac_c" 1>&6
23202 echo "configure:23203: checking for _vsnprintf" >&5
23203 if eval "test \"\${ac_cv_func__vsnprintf+set}\" = set"; then
23204   echo $ac_n "(cached) $ac_c" 1>&6
23205 else
23206   cat > conftest.$ac_ext <<EOF
23207 #line 23208 "configure"
23208 #include "confdefs.h"
23209 /* System header to define __stub macros and hopefully few prototypes,
23210     which can conflict with char _vsnprintf(); below.  */
23211 #include <assert.h>
23212 /* Override any gcc2 internal prototype to avoid an error.  */
23213 /* We use char because int might match the return type of a gcc2
23214     builtin and then its argument prototype would still apply.  */
23215 char _vsnprintf();
23216 char (*f)();
23217
23218 int main() {
23219
23220 /* The GNU C library defines this for functions which it implements
23221     to always fail with ENOSYS.  Some functions are actually named
23222     something starting with __ and the normal name is an alias.  */
23223 #if defined (__stub__vsnprintf) || defined (__stub____vsnprintf)
23224 choke me
23225 #else
23226 f = _vsnprintf;
23227 #endif
23228
23229 ; return 0; }
23230 EOF
23231 if { (eval echo configure:23232: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
23232   rm -rf conftest*
23233   eval "ac_cv_func__vsnprintf=yes"
23234 else
23235   echo "configure: failed program was:" >&5
23236   cat conftest.$ac_ext >&5
23237   rm -rf conftest*
23238   eval "ac_cv_func__vsnprintf=no"
23239 fi
23240 rm -f conftest*
23241 fi
23242
23243 if eval "test \"`echo '$ac_cv_func_'_vsnprintf`\" = yes"; then
23244   echo "$ac_t""yes" 1>&6
23245   ac_cv_func_vsnprintf=yes
23246         cat >> confdefs.h <<\EOF
23247 #define vsnprintf _vsnprintf
23248 EOF
23249
23250
23251 else
23252   echo "$ac_t""no" 1>&6
23253 fi
23254
23255
23256 echo $ac_n "checking for vprintf""... $ac_c" 1>&6
23257 echo "configure:23258: checking for vprintf" >&5
23258 if eval "test \"\${ac_cv_func_vprintf+set}\" = set"; then
23259   echo $ac_n "(cached) $ac_c" 1>&6
23260 else
23261   cat > conftest.$ac_ext <<EOF
23262 #line 23263 "configure"
23263 #include "confdefs.h"
23264 /* System header to define __stub macros and hopefully few prototypes,
23265     which can conflict with char vprintf(); below.  */
23266 #include <assert.h>
23267 /* Override any gcc2 internal prototype to avoid an error.  */
23268 /* We use char because int might match the return type of a gcc2
23269     builtin and then its argument prototype would still apply.  */
23270 char vprintf();
23271 char (*f)();
23272
23273 int main() {
23274
23275 /* The GNU C library defines this for functions which it implements
23276     to always fail with ENOSYS.  Some functions are actually named
23277     something starting with __ and the normal name is an alias.  */
23278 #if defined (__stub_vprintf) || defined (__stub___vprintf)
23279 choke me
23280 #else
23281 f = vprintf;
23282 #endif
23283
23284 ; return 0; }
23285 EOF
23286 if { (eval echo configure:23287: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
23287   rm -rf conftest*
23288   eval "ac_cv_func_vprintf=yes"
23289 else
23290   echo "configure: failed program was:" >&5
23291   cat conftest.$ac_ext >&5
23292   rm -rf conftest*
23293   eval "ac_cv_func_vprintf=no"
23294 fi
23295 rm -f conftest*
23296 fi
23297
23298 if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
23299   echo "$ac_t""yes" 1>&6
23300   cat >> confdefs.h <<\EOF
23301 #define HAVE_VPRINTF 1
23302 EOF
23303
23304 else
23305   echo "$ac_t""no" 1>&6
23306 fi
23307
23308 if test "$ac_cv_func_vprintf" != yes; then
23309 echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
23310 echo "configure:23311: checking for _doprnt" >&5
23311 if eval "test \"\${ac_cv_func__doprnt+set}\" = set"; then
23312   echo $ac_n "(cached) $ac_c" 1>&6
23313 else
23314   cat > conftest.$ac_ext <<EOF
23315 #line 23316 "configure"
23316 #include "confdefs.h"
23317 /* System header to define __stub macros and hopefully few prototypes,
23318     which can conflict with char _doprnt(); below.  */
23319 #include <assert.h>
23320 /* Override any gcc2 internal prototype to avoid an error.  */
23321 /* We use char because int might match the return type of a gcc2
23322     builtin and then its argument prototype would still apply.  */
23323 char _doprnt();
23324 char (*f)();
23325
23326 int main() {
23327
23328 /* The GNU C library defines this for functions which it implements
23329     to always fail with ENOSYS.  Some functions are actually named
23330     something starting with __ and the normal name is an alias.  */
23331 #if defined (__stub__doprnt) || defined (__stub____doprnt)
23332 choke me
23333 #else
23334 f = _doprnt;
23335 #endif
23336
23337 ; return 0; }
23338 EOF
23339 if { (eval echo configure:23340: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
23340   rm -rf conftest*
23341   eval "ac_cv_func__doprnt=yes"
23342 else
23343   echo "configure: failed program was:" >&5
23344   cat conftest.$ac_ext >&5
23345   rm -rf conftest*
23346   eval "ac_cv_func__doprnt=no"
23347 fi
23348 rm -f conftest*
23349 fi
23350
23351 if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
23352   echo "$ac_t""yes" 1>&6
23353   cat >> confdefs.h <<\EOF
23354 #define HAVE_DOPRNT 1
23355 EOF
23356
23357 else
23358   echo "$ac_t""no" 1>&6
23359 fi
23360
23361 fi
23362
23363
23364 if test $ac_cv_func_vprintf = yes ; then
23365                 for ac_func in snprintf vsnprintf
23366 do
23367 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
23368 echo "configure:23369: checking for $ac_func" >&5
23369 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
23370   echo $ac_n "(cached) $ac_c" 1>&6
23371 else
23372   cat > conftest.$ac_ext <<EOF
23373 #line 23374 "configure"
23374 #include "confdefs.h"
23375 /* System header to define __stub macros and hopefully few prototypes,
23376     which can conflict with char $ac_func(); below.  */
23377 #include <assert.h>
23378 /* Override any gcc2 internal prototype to avoid an error.  */
23379 /* We use char because int might match the return type of a gcc2
23380     builtin and then its argument prototype would still apply.  */
23381 char $ac_func();
23382 char (*f)();
23383
23384 int main() {
23385
23386 /* The GNU C library defines this for functions which it implements
23387     to always fail with ENOSYS.  Some functions are actually named
23388     something starting with __ and the normal name is an alias.  */
23389 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
23390 choke me
23391 #else
23392 f = $ac_func;
23393 #endif
23394
23395 ; return 0; }
23396 EOF
23397 if { (eval echo configure:23398: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
23398   rm -rf conftest*
23399   eval "ac_cv_func_$ac_func=yes"
23400 else
23401   echo "configure: failed program was:" >&5
23402   cat conftest.$ac_ext >&5
23403   rm -rf conftest*
23404   eval "ac_cv_func_$ac_func=no"
23405 fi
23406 rm -f conftest*
23407 fi
23408
23409 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
23410   echo "$ac_t""yes" 1>&6
23411     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
23412   cat >> confdefs.h <<EOF
23413 #define $ac_tr_func 1
23414 EOF
23415  
23416 else
23417   echo "$ac_t""no" 1>&6
23418 fi
23419 done
23420
23421 fi
23422
23423 for ac_func in \
23424         bcopy                   \
23425         closesocket             \
23426         chroot                  \
23427         endgrent                \
23428         endpwent                \
23429         fcntl                   \
23430         flock                   \
23431         fstat                   \
23432         getdtablesize   \
23433         getgrgid                \
23434         gethostname             \
23435         getpass                 \
23436         getpassphrase   \
23437         getpwuid                \
23438         getpwnam                \
23439         getspnam                \
23440         gettimeofday    \
23441         initgroups              \
23442         lockf                   \
23443         memcpy                  \
23444         memmove                 \
23445         mkstemp                 \
23446         mktemp                  \
23447         pipe                    \
23448         read                    \
23449         recv                    \
23450         recvfrom                \
23451         setpwfile               \
23452         setgid                  \
23453         setegid                 \
23454         setsid                  \
23455         setuid                  \
23456         seteuid                 \
23457         sigaction               \
23458         signal                  \
23459         sigset                  \
23460         strdup                  \
23461         strerror                \
23462         strpbrk                 \
23463         strrchr                 \
23464         strsep                  \
23465         strstr                  \
23466         strtol                  \
23467         strtoul                 \
23468         strtoq                  \
23469         strtouq                 \
23470         strtoll                 \
23471         strspn                  \
23472         sysconf                 \
23473         usleep                  \
23474         waitpid                 \
23475         wait4                   \
23476         write                   \
23477         send                    \
23478         sendmsg                 \
23479         sendto                  \
23480
23481 do
23482 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
23483 echo "configure:23484: checking for $ac_func" >&5
23484 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
23485   echo $ac_n "(cached) $ac_c" 1>&6
23486 else
23487   cat > conftest.$ac_ext <<EOF
23488 #line 23489 "configure"
23489 #include "confdefs.h"
23490 /* System header to define __stub macros and hopefully few prototypes,
23491     which can conflict with char $ac_func(); below.  */
23492 #include <assert.h>
23493 /* Override any gcc2 internal prototype to avoid an error.  */
23494 /* We use char because int might match the return type of a gcc2
23495     builtin and then its argument prototype would still apply.  */
23496 char $ac_func();
23497 char (*f)();
23498
23499 int main() {
23500
23501 /* The GNU C library defines this for functions which it implements
23502     to always fail with ENOSYS.  Some functions are actually named
23503     something starting with __ and the normal name is an alias.  */
23504 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
23505 choke me
23506 #else
23507 f = $ac_func;
23508 #endif
23509
23510 ; return 0; }
23511 EOF
23512 if { (eval echo configure:23513: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
23513   rm -rf conftest*
23514   eval "ac_cv_func_$ac_func=yes"
23515 else
23516   echo "configure: failed program was:" >&5
23517   cat conftest.$ac_ext >&5
23518   rm -rf conftest*
23519   eval "ac_cv_func_$ac_func=no"
23520 fi
23521 rm -f conftest*
23522 fi
23523
23524 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
23525   echo "$ac_t""yes" 1>&6
23526     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
23527   cat >> confdefs.h <<EOF
23528 #define $ac_tr_func 1
23529 EOF
23530  
23531 else
23532   echo "$ac_t""no" 1>&6
23533 fi
23534 done
23535
23536
23537 for ac_func in getopt getpeereid
23538 do
23539 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
23540 echo "configure:23541: checking for $ac_func" >&5
23541 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
23542   echo $ac_n "(cached) $ac_c" 1>&6
23543 else
23544   cat > conftest.$ac_ext <<EOF
23545 #line 23546 "configure"
23546 #include "confdefs.h"
23547 /* System header to define __stub macros and hopefully few prototypes,
23548     which can conflict with char $ac_func(); below.  */
23549 #include <assert.h>
23550 /* Override any gcc2 internal prototype to avoid an error.  */
23551 /* We use char because int might match the return type of a gcc2
23552     builtin and then its argument prototype would still apply.  */
23553 char $ac_func();
23554 char (*f)();
23555
23556 int main() {
23557
23558 /* The GNU C library defines this for functions which it implements
23559     to always fail with ENOSYS.  Some functions are actually named
23560     something starting with __ and the normal name is an alias.  */
23561 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
23562 choke me
23563 #else
23564 f = $ac_func;
23565 #endif
23566
23567 ; return 0; }
23568 EOF
23569 if { (eval echo configure:23570: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
23570   rm -rf conftest*
23571   eval "ac_cv_func_$ac_func=yes"
23572 else
23573   echo "configure: failed program was:" >&5
23574   cat conftest.$ac_ext >&5
23575   rm -rf conftest*
23576   eval "ac_cv_func_$ac_func=no"
23577 fi
23578 rm -f conftest*
23579 fi
23580
23581 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
23582   echo "$ac_t""yes" 1>&6
23583     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
23584   cat >> confdefs.h <<EOF
23585 #define $ac_tr_func 1
23586 EOF
23587  
23588 else
23589   echo "$ac_t""no" 1>&6
23590 LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
23591 fi
23592 done
23593
23594
23595
23596 if test "$ac_cv_func_getopt" != yes; then
23597         LIBSRCS="$LIBSRCS getopt.c"
23598 fi
23599 if test "$ac_cv_func_getpeereid" != yes; then
23600         echo $ac_n "checking for msg_accrights in msghdr""... $ac_c" 1>&6
23601 echo "configure:23602: checking for msg_accrights in msghdr" >&5
23602 if eval "test \"\${ol_cv_msghdr_msg_accrights+set}\" = set"; then
23603   echo $ac_n "(cached) $ac_c" 1>&6
23604 else
23605   cat > conftest.$ac_ext <<EOF
23606 #line 23607 "configure"
23607 #include "confdefs.h"
23608 #include <sys/socket.h>
23609 int main() {
23610 struct msghdr m; m.msg_accrightslen=0
23611 ; return 0; }
23612 EOF
23613 if { (eval echo configure:23614: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23614   rm -rf conftest*
23615   ol_cv_msghdr_msg_accrights=yes
23616 else
23617   echo "configure: failed program was:" >&5
23618   cat conftest.$ac_ext >&5
23619   rm -rf conftest*
23620   ol_cv_msghdr_msg_accrights=no
23621 fi
23622 rm -f conftest*
23623         
23624 fi
23625
23626 echo "$ac_t""$ol_cv_msghdr_msg_accrights" 1>&6
23627   if test $ol_cv_msghdr_msg_accrights = "yes" ; then
23628         cat >> confdefs.h <<\EOF
23629 #define HAVE_MSGHDR_MSG_ACCRIGHTS 1
23630 EOF
23631
23632   fi
23633
23634         LIBSRCS="$LIBSRCS getpeereid.c"
23635 fi
23636 if test "$ac_cv_func_snprintf" != yes -o "$ac_cv_func_vsnprintf" != yes; then
23637         if test "$ac_cv_func_snprintf" != yes; then
23638                 cat >> confdefs.h <<\EOF
23639 #define snprintf ber_pvt_snprintf
23640 EOF
23641
23642         fi
23643         if test "$ac_cv_func_vsnprintf" != yes; then
23644                 cat >> confdefs.h <<\EOF
23645 #define vsnprintf ber_pvt_vsnprintf
23646 EOF
23647
23648         fi
23649 fi
23650
23651 # Check Configuration
23652 echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6
23653 echo "configure:23654: checking declaration of sys_errlist" >&5
23654 if eval "test \"\${ol_cv_dcl_sys_errlist+set}\" = set"; then
23655   echo $ac_n "(cached) $ac_c" 1>&6
23656 else
23657   
23658         cat > conftest.$ac_ext <<EOF
23659 #line 23660 "configure"
23660 #include "confdefs.h"
23661
23662 #include <stdio.h>
23663 #include <sys/types.h>
23664 #include <errno.h>
23665 #ifdef WINNT
23666 #include <stdlib.h>
23667 #endif 
23668 int main() {
23669 char *c = (char *) *sys_errlist
23670 ; return 0; }
23671 EOF
23672 if { (eval echo configure:23673: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23673   rm -rf conftest*
23674   ol_cv_dcl_sys_errlist=yes
23675         ol_cv_have_sys_errlist=yes
23676 else
23677   echo "configure: failed program was:" >&5
23678   cat conftest.$ac_ext >&5
23679   rm -rf conftest*
23680   ol_cv_dcl_sys_errlist=no
23681 fi
23682 rm -f conftest*
23683 fi
23684
23685 echo "$ac_t""$ol_cv_dcl_sys_errlist" 1>&6
23686 #
23687 # It's possible (for near-UNIX clones) that sys_errlist doesn't exist
23688 if test $ol_cv_dcl_sys_errlist = no ; then
23689         cat >> confdefs.h <<\EOF
23690 #define DECL_SYS_ERRLIST 1
23691 EOF
23692
23693
23694         echo $ac_n "checking existence of sys_errlist""... $ac_c" 1>&6
23695 echo "configure:23696: checking existence of sys_errlist" >&5
23696 if eval "test \"\${ol_cv_have_sys_errlist+set}\" = set"; then
23697   echo $ac_n "(cached) $ac_c" 1>&6
23698 else
23699   
23700                 cat > conftest.$ac_ext <<EOF
23701 #line 23702 "configure"
23702 #include "confdefs.h"
23703 #include <errno.h>
23704 int main() {
23705 char *c = (char *) *sys_errlist
23706 ; return 0; }
23707 EOF
23708 if { (eval echo configure:23709: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
23709   rm -rf conftest*
23710   ol_cv_have_sys_errlist=yes
23711 else
23712   echo "configure: failed program was:" >&5
23713   cat conftest.$ac_ext >&5
23714   rm -rf conftest*
23715   ol_cv_have_sys_errlist=no
23716 fi
23717 rm -f conftest*
23718 fi
23719
23720 echo "$ac_t""$ol_cv_have_sys_errlist" 1>&6
23721 fi
23722 if test $ol_cv_have_sys_errlist = yes ; then
23723         cat >> confdefs.h <<\EOF
23724 #define HAVE_SYS_ERRLIST 1
23725 EOF
23726
23727 fi
23728
23729
23730
23731 if test "$ol_enable_slapi" != no ; then
23732                         for ac_hdr in ltdl.h
23733 do
23734 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
23735 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
23736 echo "configure:23737: checking for $ac_hdr" >&5
23737 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
23738   echo $ac_n "(cached) $ac_c" 1>&6
23739 else
23740   cat > conftest.$ac_ext <<EOF
23741 #line 23742 "configure"
23742 #include "confdefs.h"
23743 #include <$ac_hdr>
23744 EOF
23745 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
23746 { (eval echo configure:23747: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
23747 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
23748 if test -z "$ac_err"; then
23749   rm -rf conftest*
23750   eval "ac_cv_header_$ac_safe=yes"
23751 else
23752   echo "$ac_err" >&5
23753   echo "configure: failed program was:" >&5
23754   cat conftest.$ac_ext >&5
23755   rm -rf conftest*
23756   eval "ac_cv_header_$ac_safe=no"
23757 fi
23758 rm -f conftest*
23759 fi
23760 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
23761   echo "$ac_t""yes" 1>&6
23762     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
23763   cat >> confdefs.h <<EOF
23764 #define $ac_tr_hdr 1
23765 EOF
23766  
23767 else
23768   echo "$ac_t""no" 1>&6
23769 fi
23770 done
23771
23772
23773         if test $ac_cv_header_ltdl_h != yes ; then
23774                 { echo "configure: error: could not locate <ltdl.h>" 1>&2; exit 1; }
23775         fi
23776         echo $ac_n "checking for lt_dlinit in -lltdl""... $ac_c" 1>&6
23777 echo "configure:23778: checking for lt_dlinit in -lltdl" >&5
23778 ac_lib_var=`echo ltdl'_'lt_dlinit | sed 'y%./+-:%__p__%'`
23779 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
23780   echo $ac_n "(cached) $ac_c" 1>&6
23781 else
23782   ac_save_LIBS="$LIBS"
23783 LIBS="-lltdl  $LIBS"
23784 cat > conftest.$ac_ext <<EOF
23785 #line 23786 "configure"
23786 #include "confdefs.h"
23787 /* Override any gcc2 internal prototype to avoid an error.  */
23788 /* We use char because int might match the return type of a gcc2
23789     builtin and then its argument prototype would still apply.  */
23790 char lt_dlinit();
23791
23792 int main() {
23793 lt_dlinit()
23794 ; return 0; }
23795 EOF
23796 if { (eval echo configure:23797: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
23797   rm -rf conftest*
23798   eval "ac_cv_lib_$ac_lib_var=yes"
23799 else
23800   echo "configure: failed program was:" >&5
23801   cat conftest.$ac_ext >&5
23802   rm -rf conftest*
23803   eval "ac_cv_lib_$ac_lib_var=no"
23804 fi
23805 rm -f conftest*
23806 LIBS="$ac_save_LIBS"
23807
23808 fi
23809 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
23810   echo "$ac_t""yes" 1>&6
23811   
23812                 SLAPI_LIBS=-lltdl
23813                 LIBSLAPI=libslapi.a
23814                 LIBSLAPITOOLS=../libslapi.a
23815                 cat >> confdefs.h <<\EOF
23816 #define HAVE_LIBLTDL 1
23817 EOF
23818
23819         
23820 else
23821   echo "$ac_t""no" 1>&6
23822 { echo "configure: error: could not locate libtool -lltdl" 1>&2; exit 1; }
23823 fi
23824
23825
23826         cat >> confdefs.h <<\EOF
23827 #define LDAP_SLAPI 1
23828 EOF
23829
23830 fi
23831
23832 if test "$ol_enable_debug" != no ; then
23833         cat >> confdefs.h <<\EOF
23834 #define LDAP_DEBUG 1
23835 EOF
23836
23837 fi
23838 if test "$ol_enable_syslog" = yes ; then
23839         cat >> confdefs.h <<\EOF
23840 #define LDAP_SYSLOG 1
23841 EOF
23842
23843 fi
23844 if test "$ol_link_kbind" != no ; then
23845         cat >> confdefs.h <<\EOF
23846 #define LDAP_API_FEATURE_X_OPENLDAP_V2_KBIND LDAP_VENDOR_VERSION
23847 EOF
23848
23849 fi
23850 if test "$ol_enable_proctitle" != no ; then
23851         cat >> confdefs.h <<\EOF
23852 #define LDAP_PROCTITLE 1
23853 EOF
23854
23855 fi
23856 if test "$ol_enable_referrals" != no ; then
23857         cat >> confdefs.h <<\EOF
23858 #define LDAP_API_FEATURE_X_OPENLDAP_V2_REFERRALS LDAP_VENDOR_VERSION
23859 EOF
23860
23861 fi
23862 if test "$ol_enable_local" != no; then
23863         cat >> confdefs.h <<\EOF
23864 #define LDAP_PF_LOCAL 1
23865 EOF
23866
23867 fi
23868 if test "$ol_link_ipv6" != no; then
23869         cat >> confdefs.h <<\EOF
23870 #define LDAP_PF_INET6 1
23871 EOF
23872
23873 fi
23874 if test "$ol_enable_cleartext" != no ; then
23875         cat >> confdefs.h <<\EOF
23876 #define SLAPD_CLEARTEXT 1
23877 EOF
23878
23879 fi
23880 if test "$ol_enable_crypt" != no ; then
23881         cat >> confdefs.h <<\EOF
23882 #define SLAPD_CRYPT 1
23883 EOF
23884
23885 fi
23886 if test "$ol_link_spasswd" != no ; then
23887         cat >> confdefs.h <<\EOF
23888 #define SLAPD_SPASSWD 1
23889 EOF
23890
23891 fi
23892 if test "$ol_enable_multimaster" != no ; then
23893         cat >> confdefs.h <<\EOF
23894 #define SLAPD_MULTIMASTER 1
23895 EOF
23896
23897 fi
23898 if test "$ol_enable_rlookups" != no ; then
23899         cat >> confdefs.h <<\EOF
23900 #define SLAPD_RLOOKUPS 1
23901 EOF
23902
23903 fi
23904 if test "$ol_enable_aci" != no ; then
23905         cat >> confdefs.h <<\EOF
23906 #define SLAPD_ACI_ENABLED 1
23907 EOF
23908
23909 fi
23910
23911 if test "$ol_link_modules" != no ; then
23912         cat >> confdefs.h <<\EOF
23913 #define SLAPD_MODULES 1
23914 EOF
23915
23916         BUILD_SLAPD=yes
23917         SLAPD_MODULES_LDFLAGS="-dlopen self"
23918 fi
23919
23920 cat >> confdefs.h <<\EOF
23921 #define SLAPD_MOD_STATIC 1
23922 EOF
23923
23924 cat >> confdefs.h <<\EOF
23925 #define SLAPD_MOD_DYNAMIC 2
23926 EOF
23927
23928
23929 if test "$ol_enable_bdb" != no ; then
23930         BUILD_SLAPD=yes
23931         BUILD_BDB=$ol_enable_bdb
23932         if test "$ol_enable_bdb" = mod ; then
23933                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-bdb"
23934                 MFLAG=SLAPD_MOD_DYNAMIC
23935         else
23936                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-bdb"
23937                 MFLAG=SLAPD_MOD_STATIC
23938         fi
23939         cat >> confdefs.h <<EOF
23940 #define SLAPD_BDB $MFLAG
23941 EOF
23942
23943 fi
23944
23945 if test "$ol_enable_dnssrv" != no ; then
23946         BUILD_SLAPD=yes
23947         BUILD_DNSSRV=$ol_enable_dnssrv
23948         if test "$ol_enable_dnssrv" = mod ; then
23949                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-dnssrv"
23950                 MFLAG=SLAPD_MOD_DYNAMIC
23951         else
23952                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-dnssrv"
23953                 MFLAG=SLAPD_MOD_STATIC
23954         fi
23955         cat >> confdefs.h <<EOF
23956 #define SLAPD_DNSSRV $MFLAG
23957 EOF
23958
23959 fi
23960
23961 if test "$ol_enable_hdb" != no ; then
23962         BUILD_SLAPD=yes
23963         BUILD_HDB=$ol_enable_hdb
23964         if test "$ol_enable_hdb" = mod ; then
23965                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-hdb"
23966                 MFLAG=SLAPD_MOD_DYNAMIC
23967         else
23968                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-hdb"
23969                 MFLAG=SLAPD_MOD_STATIC
23970         fi
23971         cat >> confdefs.h <<EOF
23972 #define SLAPD_HDB $MFLAG
23973 EOF
23974
23975 fi
23976
23977 if test "$ol_enable_ldap" != no ; then
23978         BUILD_SLAPD=yes
23979         BUILD_LDAP=$ol_enable_ldap
23980         if test "$ol_enable_ldap" = mod ; then
23981                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-ldap"
23982                 MFLAG=SLAPD_MOD_DYNAMIC
23983         else
23984                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-ldap"
23985                 MFLAG=SLAPD_MOD_STATIC
23986         fi
23987         cat >> confdefs.h <<EOF
23988 #define SLAPD_LDAP $MFLAG
23989 EOF
23990
23991 fi
23992
23993 if test "$ol_link_ldbm" != no -a $ol_enable_ldbm != no; then
23994         BUILD_SLAPD=yes
23995         BUILD_LDBM=$ol_enable_ldbm
23996         if test "$ol_enable_ldbm" = mod ; then
23997                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-ldbm"
23998                 MFLAG=SLAPD_MOD_DYNAMIC
23999         else
24000                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-ldbm"
24001                 MFLAG=SLAPD_MOD_STATIC
24002         fi
24003         cat >> confdefs.h <<EOF
24004 #define SLAPD_LDBM $MFLAG
24005 EOF
24006
24007 fi
24008
24009 if test "$ol_enable_meta" != no ; then
24010         BUILD_SLAPD=yes
24011         BUILD_META=$ol_enable_meta
24012         BUILD_REWRITE=yes
24013         if test "$ol_enable_meta" = mod ; then
24014                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-meta"
24015                 MFLAG=SLAPD_MOD_DYNAMIC
24016         else
24017                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-meta"
24018                 MFLAG=SLAPD_MOD_STATIC
24019         fi
24020         cat >> confdefs.h <<EOF
24021 #define SLAPD_META $MFLAG
24022 EOF
24023
24024 fi
24025
24026 if test "$ol_enable_monitor" != no ; then
24027         BUILD_SLAPD=yes
24028         BUILD_MONITOR=$ol_enable_monitor
24029         if test "$ol_enable_monitor" = mod ; then
24030                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-monitor"
24031                 MFLAG=SLAPD_MOD_DYNAMIC
24032         else
24033                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-monitor"
24034                 MFLAG=SLAPD_MOD_STATIC
24035         fi
24036         cat >> confdefs.h <<EOF
24037 #define SLAPD_MONITOR $MFLAG
24038 EOF
24039
24040 fi
24041
24042 if test "$ol_enable_null" != no ; then
24043         BUILD_SLAPD=yes
24044         BUILD_NULL=$ol_enable_null
24045         if test "$ol_enable_null" = mod ; then
24046                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-null"
24047                 MFLAG=SLAPD_MOD_DYNAMIC
24048         else
24049                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-null"
24050                 MFLAG=SLAPD_MOD_STATIC
24051         fi
24052         cat >> confdefs.h <<EOF
24053 #define SLAPD_NULL $MFLAG
24054 EOF
24055
24056 fi
24057
24058 if test "$ol_enable_passwd" != no ; then
24059         BUILD_SLAPD=yes
24060         BUILD_PASSWD=$ol_enable_passwd
24061         if test "$ol_enable_passwd" = mod ; then
24062                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-passwd"
24063                 MFLAG=SLAPD_MOD_DYNAMIC
24064         else
24065                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-passwd"
24066                 MFLAG=SLAPD_MOD_STATIC
24067         fi
24068         cat >> confdefs.h <<EOF
24069 #define SLAPD_PASSWD $MFLAG
24070 EOF
24071
24072 fi
24073
24074 if test "$ol_link_perl" != no ; then
24075         BUILD_SLAPD=yes
24076         BUILD_PERL=$ol_enable_perl
24077         if test "$ol_enable_perl" = mod ; then
24078                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-perl"
24079                 MFLAG=SLAPD_MOD_DYNAMIC
24080         else
24081                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-perl"
24082                 MFLAG=SLAPD_MOD_STATIC
24083         fi
24084         cat >> confdefs.h <<EOF
24085 #define SLAPD_PERL $MFLAG
24086 EOF
24087
24088 fi
24089
24090 if test "$ol_enable_shell" != no ; then
24091         if test "$ol_link_thread" != no ; then
24092                 echo "configure: warning: Use of --without-threads is recommended with back-shell" 1>&2
24093         fi
24094         BUILD_SLAPD=yes
24095         BUILD_SHELL=$ol_enable_shell
24096         if test "$ol_enable_shell" = mod ; then
24097                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-shell"
24098                 MFLAG=SLAPD_MOD_DYNAMIC
24099         else
24100                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-shell"
24101                 MFLAG=SLAPD_MOD_STATIC
24102         fi
24103         cat >> confdefs.h <<EOF
24104 #define SLAPD_SHELL $MFLAG
24105 EOF
24106
24107 fi
24108
24109 if test "$ol_link_sql" != no ; then
24110         BUILD_SLAPD=yes
24111         BUILD_SQL=$ol_enable_sql
24112         if test "$ol_enable_sql" = mod; then
24113                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-sql"
24114                 MFLAG=SLAPD_MOD_DYNAMIC
24115         else
24116                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-sql"
24117                 MFLAG=SLAPD_MOD_STATIC
24118         fi
24119         cat >> confdefs.h <<EOF
24120 #define SLAPD_SQL $MFLAG
24121 EOF
24122
24123 fi
24124
24125 if test "$ol_enable_dyngroup" != no ; then
24126         BUILD_DYNGROUP=$ol_enable_dyngroup
24127         if test "$ol_enable_dyngroup" = mod ; then
24128                 MFLAG=SLAPD_MOD_DYNAMIC
24129                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS dyngroup.la"
24130         else
24131                 MFLAG=SLAPD_MOD_STATIC
24132         fi
24133         cat >> confdefs.h <<EOF
24134 #define SLAPD_OVER_DYNGROUP $MFLAG
24135 EOF
24136
24137 fi
24138
24139 if test "$ol_enable_proxycache" != no ; then
24140         BUILD_PROXYCACHE=$ol_enable_proxycache
24141         if test "$ol_enable_proxycache" = mod ; then
24142                 MFLAG=SLAPD_MOD_DYNAMIC
24143                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS pcache.la"
24144         else
24145                 MFLAG=SLAPD_MOD_STATIC
24146         fi
24147         cat >> confdefs.h <<EOF
24148 #define SLAPD_OVER_PROXYCACHE $MFLAG
24149 EOF
24150
24151 fi
24152
24153 if test "$ol_enable_slurpd" != no -a "$ol_link_threads" != no -a \
24154         $BUILD_SLAPD = yes ; then
24155         BUILD_SLURPD=yes
24156 fi
24157
24158 if test "$ol_enable_rewrite" != no ; then
24159         cat >> confdefs.h <<\EOF
24160 #define ENABLE_REWRITE 1
24161 EOF
24162
24163         BUILD_REWRITE=yes
24164 fi
24165
24166 if test "$ol_enable_slapi" != no ; then
24167         cat >> confdefs.h <<\EOF
24168 #define ENABLE_SLAPI 1
24169 EOF
24170
24171         BUILD_SLAPI=yes
24172         SLAPD_SLAPI_DEPEND=libslapi.a
24173 fi
24174
24175
24176
24177 if test "$ac_cv_mingw32" = yes ; then
24178         PLAT=NT
24179         SLAPD_MODULES_LDFLAGS=
24180 else
24181         PLAT=UNIX
24182 fi
24183
24184 if test -z "$SLAPD_STATIC_BACKENDS"; then
24185         SLAPD_NO_STATIC='#'
24186 else
24187         SLAPD_NO_STATIC=
24188 fi
24189
24190
24191
24192
24193
24194
24195
24196   
24197   
24198   
24199   
24200   
24201   
24202   
24203   
24204   
24205   
24206   
24207   
24208   
24209   
24210   
24211   
24212
24213
24214
24215
24216
24217
24218
24219
24220
24221
24222
24223
24224
24225
24226
24227
24228
24229
24230
24231
24232
24233
24234
24235
24236
24237
24238
24239
24240
24241
24242
24243
24244
24245
24246
24247
24248
24249
24250 # Check whether --with-xxinstall or --without-xxinstall was given.
24251 if test "${with_xxinstall+set}" = set; then
24252   withval="$with_xxinstall"
24253   :
24254 fi
24255
24256
24257
24258 trap '' 1 2 15
24259
24260 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
24261
24262 test "x$prefix" = xNONE && prefix=$ac_default_prefix
24263 # Let make expand exec_prefix.
24264 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
24265
24266 # Any assignment to VPATH causes Sun make to only execute
24267 # the first set of double-colon rules, so remove it if not needed.
24268 # If there is a colon in the path, we need to keep it.
24269 if test "x$srcdir" = x.; then
24270   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
24271 fi
24272
24273 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
24274
24275 DEFS=-DHAVE_CONFIG_H
24276
24277 # Without the "./", some shells look in PATH for config.status.
24278 : ${CONFIG_STATUS=./config.status}
24279
24280 echo creating $CONFIG_STATUS
24281 rm -f $CONFIG_STATUS
24282 cat > $CONFIG_STATUS <<EOF
24283 #! /bin/sh
24284 # Generated automatically by configure.
24285 # Run this file to recreate the current configuration.
24286 # This directory was configured as follows,
24287 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
24288 #
24289 # $0 $ac_configure_args
24290 #
24291 # Compiler output produced by configure, useful for debugging
24292 # configure, is in ./config.log if it exists.
24293
24294 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
24295 for ac_option
24296 do
24297   case "\$ac_option" in
24298   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
24299     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
24300     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
24301   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
24302     echo "$CONFIG_STATUS generated by autoconf version 2.13.1"
24303     exit 0 ;;
24304   -help | --help | --hel | --he | --h)
24305     echo "\$ac_cs_usage"; exit 0 ;;
24306   *) echo "\$ac_cs_usage"; exit 1 ;;
24307   esac
24308 done
24309
24310 ac_given_srcdir=$srcdir
24311 ac_given_INSTALL="$INSTALL"
24312
24313 trap 'rm -fr `echo "\
24314 Makefile:build/top.mk:Makefile.in:build/dir.mk \
24315 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
24316 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
24317 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
24318 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
24319 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
24320 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
24321 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
24322 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
24323 include/Makefile:build/top.mk:include/Makefile.in \
24324 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
24325 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
24326 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
24327 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
24328 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk  \
24329 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
24330 libraries/librewrite/Makefile:build/top.mk:libraries/librewrite/Makefile.in:build/lib.mk:build/lib-static.mk \
24331 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
24332 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
24333 servers/slapd/back-bdb/Makefile:build/top.mk:servers/slapd/back-bdb/Makefile.in:build/mod.mk \
24334 servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
24335 servers/slapd/back-hdb/Makefile:build/top.mk:servers/slapd/back-hdb/Makefile.in:build/mod.mk \
24336 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
24337 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
24338 servers/slapd/back-meta/Makefile:build/top.mk:servers/slapd/back-meta/Makefile.in:build/mod.mk \
24339 servers/slapd/back-monitor/Makefile:build/top.mk:servers/slapd/back-monitor/Makefile.in:build/mod.mk \
24340 servers/slapd/back-null/Makefile:build/top.mk:servers/slapd/back-null/Makefile.in:build/mod.mk \
24341 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
24342 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
24343 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
24344 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
24345 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
24346 servers/slapd/slapi/Makefile:build/top.mk:servers/slapd/slapi/Makefile.in:build/lib.mk:build/lib-shared.mk  \
24347 servers/slapd/overlays/Makefile:build/top.mk:servers/slapd/overlays/Makefile.in:build/lib.mk \
24348 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
24349 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
24350 tests/run \
24351 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
24352  include/portable.h include/ldap_features.h include/lber_types.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
24353 EOF
24354 cat >> $CONFIG_STATUS <<EOF
24355
24356 # Protect against being on the right side of a sed subst in config.status.
24357 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
24358  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
24359 $ac_vpsub
24360 $extrasub
24361 s%@SHELL@%$SHELL%g
24362 s%@CFLAGS@%$CFLAGS%g
24363 s%@CPPFLAGS@%$CPPFLAGS%g
24364 s%@CXXFLAGS@%$CXXFLAGS%g
24365 s%@FFLAGS@%$FFLAGS%g
24366 s%@DEFS@%$DEFS%g
24367 s%@LDFLAGS@%$LDFLAGS%g
24368 s%@LIBS@%$LIBS%g
24369 s%@exec_prefix@%$exec_prefix%g
24370 s%@prefix@%$prefix%g
24371 s%@program_transform_name@%$program_transform_name%g
24372 s%@bindir@%$bindir%g
24373 s%@sbindir@%$sbindir%g
24374 s%@libexecdir@%$libexecdir%g
24375 s%@datadir@%$datadir%g
24376 s%@sysconfdir@%$sysconfdir%g
24377 s%@sharedstatedir@%$sharedstatedir%g
24378 s%@localstatedir@%$localstatedir%g
24379 s%@libdir@%$libdir%g
24380 s%@includedir@%$includedir%g
24381 s%@oldincludedir@%$oldincludedir%g
24382 s%@infodir@%$infodir%g
24383 s%@mandir@%$mandir%g
24384 s%@host@%$host%g
24385 s%@host_alias@%$host_alias%g
24386 s%@host_cpu@%$host_cpu%g
24387 s%@host_vendor@%$host_vendor%g
24388 s%@host_os@%$host_os%g
24389 s%@target@%$target%g
24390 s%@target_alias@%$target_alias%g
24391 s%@target_cpu@%$target_cpu%g
24392 s%@target_vendor@%$target_vendor%g
24393 s%@target_os@%$target_os%g
24394 s%@build@%$build%g
24395 s%@build_alias@%$build_alias%g
24396 s%@build_cpu@%$build_cpu%g
24397 s%@build_vendor@%$build_vendor%g
24398 s%@build_os@%$build_os%g
24399 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
24400 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
24401 s%@INSTALL_DATA@%$INSTALL_DATA%g
24402 s%@PACKAGE@%$PACKAGE%g
24403 s%@VERSION@%$VERSION%g
24404 s%@ACLOCAL@%$ACLOCAL%g
24405 s%@AUTOCONF@%$AUTOCONF%g
24406 s%@AUTOMAKE@%$AUTOMAKE%g
24407 s%@AUTOHEADER@%$AUTOHEADER%g
24408 s%@MAKEINFO@%$MAKEINFO%g
24409 s%@install_sh@%$install_sh%g
24410 s%@AMTAR@%$AMTAR%g
24411 s%@AWK@%$AWK%g
24412 s%@AMTARFLAGS@%$AMTARFLAGS%g
24413 s%@SET_MAKE@%$SET_MAKE%g
24414 s%@OPENLDAP_LIBRELEASE@%$OPENLDAP_LIBRELEASE%g
24415 s%@OPENLDAP_LIBVERSION@%$OPENLDAP_LIBVERSION%g
24416 s%@OPENLDAP_RELEASE_DATE@%$OPENLDAP_RELEASE_DATE%g
24417 s%@top_builddir@%$top_builddir%g
24418 s%@ldap_subdir@%$ldap_subdir%g
24419 s%@CC@%$CC%g
24420 s%@AR@%$AR%g
24421 s%@LN_S@%$LN_S%g
24422 s%@OBJEXT@%$OBJEXT%g
24423 s%@EXEEXT@%$EXEEXT%g
24424 s%@ECHO@%$ECHO%g
24425 s%@RANLIB@%$RANLIB%g
24426 s%@STRIP@%$STRIP%g
24427 s%@DLLTOOL@%$DLLTOOL%g
24428 s%@AS@%$AS%g
24429 s%@OBJDUMP@%$OBJDUMP%g
24430 s%@CPP@%$CPP%g
24431 s%@LIBTOOL@%$LIBTOOL%g
24432 s%@LN_H@%$LN_H%g
24433 s%@PERLBIN@%$PERLBIN%g
24434 s%@OL_MKDEP@%$OL_MKDEP%g
24435 s%@OL_MKDEP_FLAGS@%$OL_MKDEP_FLAGS%g
24436 s%@LTSTATIC@%$LTSTATIC%g
24437 s%@LIBOBJS@%$LIBOBJS%g
24438 s%@LIBSRCS@%$LIBSRCS%g
24439 s%@PLAT@%$PLAT%g
24440 s%@WITH_TLS@%$WITH_TLS%g
24441 s%@BUILD_LIBS_DYNAMIC@%$BUILD_LIBS_DYNAMIC%g
24442 s%@BUILD_SLAPD@%$BUILD_SLAPD%g
24443 s%@BUILD_SLAPI@%$BUILD_SLAPI%g
24444 s%@SLAPD_SLAPI_DEPEND@%$SLAPD_SLAPI_DEPEND%g
24445 s%@BUILD_BDB@%$BUILD_BDB%g
24446 s%@BUILD_DNSSRV@%$BUILD_DNSSRV%g
24447 s%@BUILD_HDB@%$BUILD_HDB%g
24448 s%@BUILD_LDAP@%$BUILD_LDAP%g
24449 s%@BUILD_LDBM@%$BUILD_LDBM%g
24450 s%@BUILD_META@%$BUILD_META%g
24451 s%@BUILD_MONITOR@%$BUILD_MONITOR%g
24452 s%@BUILD_NULL@%$BUILD_NULL%g
24453 s%@BUILD_PASSWD@%$BUILD_PASSWD%g
24454 s%@BUILD_PERL@%$BUILD_PERL%g
24455 s%@BUILD_SHELL@%$BUILD_SHELL%g
24456 s%@BUILD_SQL@%$BUILD_SQL%g
24457 s%@BUILD_DYNGROUP@%$BUILD_DYNGROUP%g
24458 s%@BUILD_PROXYCACHE@%$BUILD_PROXYCACHE%g
24459 s%@BUILD_SLURPD@%$BUILD_SLURPD%g
24460 s%@LDAP_LIBS@%$LDAP_LIBS%g
24461 s%@SLAPD_LIBS@%$SLAPD_LIBS%g
24462 s%@SLURPD_LIBS@%$SLURPD_LIBS%g
24463 s%@LDBM_LIBS@%$LDBM_LIBS%g
24464 s%@LTHREAD_LIBS@%$LTHREAD_LIBS%g
24465 s%@LUTIL_LIBS@%$LUTIL_LIBS%g
24466 s%@WRAP_LIBS@%$WRAP_LIBS%g
24467 s%@SLAPD_MODULES_CPPFLAGS@%$SLAPD_MODULES_CPPFLAGS%g
24468 s%@SLAPD_MODULES_LDFLAGS@%$SLAPD_MODULES_LDFLAGS%g
24469 s%@SLAPD_NO_STATIC@%$SLAPD_NO_STATIC%g
24470 s%@SLAPD_STATIC_BACKENDS@%$SLAPD_STATIC_BACKENDS%g
24471 s%@SLAPD_DYNAMIC_BACKENDS@%$SLAPD_DYNAMIC_BACKENDS%g
24472 s%@SLAPD_DYNAMIC_OVERLAYS@%$SLAPD_DYNAMIC_OVERLAYS%g
24473 s%@PERL_CPPFLAGS@%$PERL_CPPFLAGS%g
24474 s%@SLAPD_PERL_LDFLAGS@%$SLAPD_PERL_LDFLAGS%g
24475 s%@MOD_PERL_LDFLAGS@%$MOD_PERL_LDFLAGS%g
24476 s%@KRB4_LIBS@%$KRB4_LIBS%g
24477 s%@KRB5_LIBS@%$KRB5_LIBS%g
24478 s%@SASL_LIBS@%$SASL_LIBS%g
24479 s%@TLS_LIBS@%$TLS_LIBS%g
24480 s%@MODULES_LIBS@%$MODULES_LIBS%g
24481 s%@SLAPI_LIBS@%$SLAPI_LIBS%g
24482 s%@LIBSLAPI@%$LIBSLAPI%g
24483 s%@LIBSLAPITOOLS@%$LIBSLAPITOOLS%g
24484 s%@AUTH_LIBS@%$AUTH_LIBS%g
24485 s%@SLAPD_SLP_LIBS@%$SLAPD_SLP_LIBS%g
24486 s%@SLAPD_SQL_LDFLAGS@%$SLAPD_SQL_LDFLAGS%g
24487 s%@SLAPD_SQL_LIBS@%$SLAPD_SQL_LIBS%g
24488 s%@SLAPD_SQL_INCLUDES@%$SLAPD_SQL_INCLUDES%g
24489
24490 CEOF
24491 EOF
24492
24493 cat >> $CONFIG_STATUS <<\EOF
24494
24495 # Split the substitutions into bite-sized pieces for seds with
24496 # small command number limits, like on Digital OSF/1 and HP-UX.
24497 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
24498 ac_file=1 # Number of current file.
24499 ac_beg=1 # First line for current file.
24500 ac_end=$ac_max_sed_cmds # Line after last line for current file.
24501 ac_more_lines=:
24502 ac_sed_cmds=""
24503 while $ac_more_lines; do
24504   if test $ac_beg -gt 1; then
24505     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
24506   else
24507     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
24508   fi
24509   if test ! -s conftest.s$ac_file; then
24510     ac_more_lines=false
24511     rm -f conftest.s$ac_file
24512   else
24513     if test -z "$ac_sed_cmds"; then
24514       ac_sed_cmds="sed -f conftest.s$ac_file"
24515     else
24516       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
24517     fi
24518     ac_file=`expr $ac_file + 1`
24519     ac_beg=$ac_end
24520     ac_end=`expr $ac_end + $ac_max_sed_cmds`
24521   fi
24522 done
24523 if test -z "$ac_sed_cmds"; then
24524   ac_sed_cmds=cat
24525 fi
24526 EOF
24527
24528 cat >> $CONFIG_STATUS <<EOF
24529
24530 CONFIG_FILES=\${CONFIG_FILES-"\
24531 Makefile:build/top.mk:Makefile.in:build/dir.mk \
24532 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
24533 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
24534 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
24535 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
24536 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
24537 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
24538 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
24539 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
24540 include/Makefile:build/top.mk:include/Makefile.in \
24541 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
24542 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
24543 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
24544 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
24545 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk  \
24546 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
24547 libraries/librewrite/Makefile:build/top.mk:libraries/librewrite/Makefile.in:build/lib.mk:build/lib-static.mk \
24548 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
24549 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
24550 servers/slapd/back-bdb/Makefile:build/top.mk:servers/slapd/back-bdb/Makefile.in:build/mod.mk \
24551 servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
24552 servers/slapd/back-hdb/Makefile:build/top.mk:servers/slapd/back-hdb/Makefile.in:build/mod.mk \
24553 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
24554 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
24555 servers/slapd/back-meta/Makefile:build/top.mk:servers/slapd/back-meta/Makefile.in:build/mod.mk \
24556 servers/slapd/back-monitor/Makefile:build/top.mk:servers/slapd/back-monitor/Makefile.in:build/mod.mk \
24557 servers/slapd/back-null/Makefile:build/top.mk:servers/slapd/back-null/Makefile.in:build/mod.mk \
24558 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
24559 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
24560 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
24561 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
24562 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
24563 servers/slapd/slapi/Makefile:build/top.mk:servers/slapd/slapi/Makefile.in:build/lib.mk:build/lib-shared.mk  \
24564 servers/slapd/overlays/Makefile:build/top.mk:servers/slapd/overlays/Makefile.in:build/lib.mk \
24565 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
24566 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
24567 tests/run \
24568 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
24569 "}
24570 EOF
24571 cat >> $CONFIG_STATUS <<\EOF
24572 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
24573   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
24574   case "$ac_file" in
24575   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
24576        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
24577   *) ac_file_in="${ac_file}.in" ;;
24578   esac
24579
24580   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
24581
24582   # Remove last slash and all that follows it.  Not all systems have dirname.
24583   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
24584   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
24585     # The file is in a subdirectory.
24586     test ! -d "$ac_dir" && mkdir "$ac_dir"
24587     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
24588     # A "../" for each directory in $ac_dir_suffix.
24589     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
24590   else
24591     ac_dir_suffix= ac_dots=
24592   fi
24593
24594   case "$ac_given_srcdir" in
24595   .)  srcdir=.
24596       if test -z "$ac_dots"; then top_srcdir=.
24597       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
24598   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
24599   *) # Relative path.
24600     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
24601     top_srcdir="$ac_dots$ac_given_srcdir" ;;
24602   esac
24603
24604   case "$ac_given_INSTALL" in
24605   [/$]*) INSTALL="$ac_given_INSTALL" ;;
24606   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
24607   esac
24608
24609   echo creating "$ac_file"
24610   rm -f "$ac_file"
24611   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
24612   case "$ac_file" in
24613   *[Mm]akefile*) ac_comsub="1i\\
24614 # $configure_input" ;;
24615   *) ac_comsub= ;;
24616   esac
24617
24618   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
24619   sed -e "$ac_comsub
24620 s%@configure_input@%$configure_input%g
24621 s%@srcdir@%$srcdir%g
24622 s%@top_srcdir@%$top_srcdir%g
24623 s%@INSTALL@%$INSTALL%g
24624 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
24625 fi; done
24626 rm -f conftest.s*
24627
24628 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
24629 # NAME is the cpp macro being defined and VALUE is the value it is being given.
24630 #
24631 # ac_d sets the value in "#define NAME VALUE" lines.
24632 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
24633 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
24634 ac_dC='\3'
24635 ac_dD='%g'
24636 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
24637 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
24638 ac_uB='\([      ]\)%\1#\2define\3'
24639 ac_uC=' '
24640 ac_uD='\4%g'
24641 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
24642 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
24643 ac_eB='$%\1#\2define\3'
24644 ac_eC=' '
24645 ac_eD='%g'
24646
24647 if test "${CONFIG_HEADERS+set}" != set; then
24648 EOF
24649 cat >> $CONFIG_STATUS <<EOF
24650   CONFIG_HEADERS="include/portable.h include/ldap_features.h include/lber_types.h"
24651 EOF
24652 cat >> $CONFIG_STATUS <<\EOF
24653 fi
24654 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
24655   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
24656   case "$ac_file" in
24657   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
24658        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
24659   *) ac_file_in="${ac_file}.in" ;;
24660   esac
24661
24662   echo creating $ac_file
24663
24664   rm -f conftest.frag conftest.in conftest.out
24665   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
24666   cat $ac_file_inputs > conftest.in
24667
24668 EOF
24669
24670 # Transform confdefs.h into a sed script conftest.vals that substitutes
24671 # the proper values into config.h.in to produce config.h.  And first:
24672 # Protect against being on the right side of a sed subst in config.status.
24673 # Protect against being in an unquoted here document in config.status.
24674 rm -f conftest.vals
24675 cat > conftest.hdr <<\EOF
24676 s/[\\&%]/\\&/g
24677 s%[\\$`]%\\&%g
24678 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
24679 s%ac_d%ac_u%gp
24680 s%ac_u%ac_e%gp
24681 EOF
24682 sed -n -f conftest.hdr confdefs.h > conftest.vals
24683 rm -f conftest.hdr
24684
24685 # This sed command replaces #undef with comments.  This is necessary, for
24686 # example, in the case of _POSIX_SOURCE, which is predefined and required
24687 # on some systems where configure will not decide to define it.
24688 cat >> conftest.vals <<\EOF
24689 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
24690 EOF
24691
24692 # Break up conftest.vals because some shells have a limit on
24693 # the size of here documents, and old seds have small limits too.
24694
24695 rm -f conftest.tail
24696 while :
24697 do
24698   ac_lines=`grep -c . conftest.vals`
24699   # grep -c gives empty output for an empty file on some AIX systems.
24700   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
24701   # Write a limited-size here document to conftest.frag.
24702   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
24703   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
24704   echo 'CEOF
24705   sed -f conftest.frag conftest.in > conftest.out
24706   rm -f conftest.in
24707   mv conftest.out conftest.in
24708 ' >> $CONFIG_STATUS
24709   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
24710   rm -f conftest.vals
24711   mv conftest.tail conftest.vals
24712 done
24713 rm -f conftest.vals
24714
24715 cat >> $CONFIG_STATUS <<\EOF
24716   rm -f conftest.frag conftest.h
24717   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
24718   cat conftest.in >> conftest.h
24719   rm -f conftest.in
24720   if cmp -s $ac_file conftest.h 2>/dev/null; then
24721     echo "$ac_file is unchanged"
24722     rm -f conftest.h
24723   else
24724     # Remove last slash and all that follows it.  Not all systems have dirname.
24725       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
24726       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
24727       # The file is in a subdirectory.
24728       test ! -d "$ac_dir" && mkdir "$ac_dir"
24729     fi
24730     rm -f $ac_file
24731     mv conftest.h $ac_file
24732   fi
24733 fi; done
24734
24735 EOF
24736 cat >> $CONFIG_STATUS <<EOF
24737
24738 EOF
24739 cat >> $CONFIG_STATUS <<\EOF
24740
24741 chmod +x tests/run
24742 date > stamp-h
24743 echo Please run \"make depend\" to build dependencies
24744
24745 exit 0
24746 EOF
24747 chmod +x $CONFIG_STATUS
24748 rm -fr confdefs* $ac_clean_files
24749 test "$no_create" = yes || $SHELL $CONFIG_STATUS || exit 1
24750